diff --git a/lib/avon/createDB.c b/lib/avon/createDB.c index 78d17c68..38893b08 100644 --- a/lib/avon/createDB.c +++ b/lib/avon/createDB.c @@ -1,4 +1,4 @@ -/* $Id: createDB.c,v 1.3 1997/05/19 22:58:34 luethje Exp $ +/* $Id: createDB.c,v 1.4 1999/06/11 15:47:01 akool Exp $ * * ISDN accounting for isdn4linux. (Utilities) * @@ -19,6 +19,9 @@ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * * $Log: createDB.c,v $ + * Revision 1.4 1999/06/11 15:47:01 akool + * not required references to libndbm removed + * * Revision 1.3 1997/05/19 22:58:34 luethje * - bugfix: it is possible to install isdnlog now * - improved performance for read files for vbox files and mgetty files. @@ -52,7 +55,9 @@ /****************************************************************************/ +#ifndef LIBAREA static int ln = 0; +#endif /****************************************************************************/ @@ -67,6 +72,7 @@ void set_print_fct_for_avon(int (*new_print_msg)(const char *, ...)) /****************************************************************************/ +#ifndef LIBAREA int createDB(char *fn, int force) { register int f; @@ -230,6 +236,5 @@ void readAVON(char *fn) print_msg( "\n"); } /* if */ } /* readAVON */ - +#endif /******************************************************************************/ - diff --git a/lib/avon/createDB.h b/lib/avon/createDB.h index 987941c2..b53faa76 100644 --- a/lib/avon/createDB.h +++ b/lib/avon/createDB.h @@ -1,4 +1,4 @@ -/* $Id: createDB.h,v 1.4 1999/06/01 12:42:45 paul Exp $ +/* $Id: createDB.h,v 1.5 1999/06/11 15:47:03 akool Exp $ * * ISDN accounting for isdn4linux. * @@ -19,6 +19,9 @@ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * * $Log: createDB.h,v $ + * Revision 1.5 1999/06/11 15:47:03 akool + * not required references to libndbm removed + * * Revision 1.4 1999/06/01 12:42:45 paul * glibc 2.1 compatibility * @@ -36,6 +39,7 @@ #ifndef _CREATEDB_H_ #define _CREATEDB_H_ +#ifndef LIBAREA #ifdef linux # if (__GLIBC__ > 2) || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) # include @@ -46,6 +50,7 @@ # include "/usr/ucbinclude/ndbm.h" /*# include */ #endif +#endif #ifdef DBMALLOC #include "dbmalloc.h" @@ -59,8 +64,10 @@ #define SET_NULL #endif +#ifndef LIBAREA _EXTERN datum key, data; _EXTERN DBM *dbm SET_NULL; +#endif _EXTERN void set_print_fct_for_avon(int (*new_print_msg)(const char *, ...)); _EXTERN int createDB(char *fn, int force); diff --git a/lib/isdntools.c b/lib/isdntools.c index fc64841a..ba8aabf8 100644 --- a/lib/isdntools.c +++ b/lib/isdntools.c @@ -1,4 +1,4 @@ -/* $Id: isdntools.c,v 1.24 1998/12/16 20:57:30 akool Exp $ +/* $Id: isdntools.c,v 1.25 1999/06/11 15:46:54 akool Exp $ * * ISDN accounting for isdn4linux. (Utilities) * @@ -19,6 +19,9 @@ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * * $Log: isdntools.c,v $ + * Revision 1.25 1999/06/11 15:46:54 akool + * not required references to libndbm removed + * * Revision 1.24 1998/12/16 20:57:30 akool * - first try to add the 1999 tarif of the German Telekom * - fix the areacode 2.0 support @@ -204,8 +207,11 @@ typedef struct { /****************************************************************************/ static int (*print_msg)(const char *, ...) = printf; -static char *_get_avon(char *code, int *Len, int flag); +#ifdef LIBAREA static char *_get_areacode(char *code, int *Len, int flag); +#else +static char *_get_avon(char *code, int *Len, int flag); +#endif static int create_runfile(const char *file, const char *format); static long int area_read_value(FILE *fp, int size); static int area_read_file(void); @@ -771,11 +777,13 @@ char *get_areacode(char *code, int *Len, int flag) i++; } - if (codelib != NULL && !strcasecmp(codelib,"AVON")) - Ptr = _get_avon(code,Len,flag); - else +#ifdef LIBAREA if (codelib != NULL && !strcasecmp(codelib,"AREACODE")) Ptr = _get_areacode(code,Len,flag); +#else + if (codelib != NULL && !strcasecmp(codelib,"AVON")) + Ptr = _get_avon(code,Len,flag); +#endif else #ifdef LIBAREA Ptr = _get_areacode(code,Len,flag); @@ -809,6 +817,7 @@ char *get_areacode(char *code, int *Len, int flag) /****************************************************************************/ +#ifndef LIBAREA static char *_get_avon(char *code, int *Len, int flag) { static int opened = 0; @@ -865,6 +874,7 @@ static char *_get_avon(char *code, int *Len, int flag) return (s[0]?s:NULL); } +#endif /****************************************************************************/