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