removed avon-, vorwahl- and areacodes-support

This commit is contained in:
akool 1999-08-20 19:43:46 +00:00
parent bd6b4cb0d5
commit f7e13abfde
2 changed files with 46 additions and 7 deletions

View File

@ -1,4 +1,4 @@
/* $Id: isdntools.c,v 1.25 1999/06/11 15:46:54 akool Exp $
/* $Id: isdntools.c,v 1.26 1999/08/20 19:43:46 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.26 1999/08/20 19:43:46 akool
* removed avon-, vorwahl- and areacodes-support
*
* Revision 1.25 1999/06/11 15:46:54 akool
* not required references to libndbm removed
*
@ -207,18 +210,23 @@ typedef struct {
/****************************************************************************/
static int (*print_msg)(const char *, ...) = printf;
#if 0 /* DELETE_ME AK:18-Aug-99 */
#ifdef LIBAREA
static char *_get_areacode(char *code, int *Len, int flag);
#else
static char *_get_avon(char *code, int *Len, int flag);
#endif
#endif
static int create_runfile(const char *file, const char *format);
#if 0 /* DELETE_ME AK:18-Aug-99 */
static long int area_read_value(FILE *fp, int size);
static int area_read_file(void);
static int area_get_index(char *code);
#endif
/****************************************************************************/
#if 0 /* DELETE_ME AK:18-Aug-99 */
static char areacodes[][2][30] = {
{"+49130", "Toll-free"},
{"+491802", "Service 180-2 (0,12/Anruf)"},
@ -265,6 +273,7 @@ static char *avonlib = NULL;
static char *codelib = NULL;
static s_areacode *codes = NULL;
static int codes_number = 0;
#endif
/****************************************************************************/
@ -273,7 +282,9 @@ void set_print_fct_for_lib(int (*new_print_msg)(const char *, ...))
print_msg = new_print_msg;
set_print_fct_for_conffile(new_print_msg);
set_print_fct_for_libtools(new_print_msg);
#if 0 /* DELETE_ME AK:18-Aug-99 */
set_print_fct_for_avon(new_print_msg);
#endif
}
/****************************************************************************/
@ -638,7 +649,7 @@ int Set_Codes(section* Section)
if ((SPtr = Get_Section(Section,CONF_SEC_GLOBAL)) == NULL)
return -1;
#if 0 /* DELETE_ME AK:18-Aug-99 */
if ((Entry = Get_Entry(SPtr->entries,CONF_ENT_AREALIB)) != NULL &&
Entry->value != NULL )
ptr[0] = acFileName = strdup(Entry->value);
@ -651,7 +662,7 @@ int Set_Codes(section* Section)
sprintf(s, "%s%c%s", confdir(), C_SLASH, AVON);
ptr[1] = avonlib = strdup(s);
}
#endif
if ((Entry = Get_Entry(SPtr->entries,CONF_ENT_COUNTRY_PREFIX)) != NULL &&
Entry->value != NULL )
ptr[2] = countryprefix = strdup(Entry->value);
@ -659,11 +670,11 @@ int Set_Codes(section* Section)
if ((Entry = Get_Entry(SPtr->entries,CONF_ENT_AREA_PREFIX)) != NULL &&
Entry->value != NULL )
ptr[3] = areaprefix = strdup(Entry->value);
#if 0 /* DELETE_ME AK:18-Aug-99 */
if ((Entry = Get_Entry(SPtr->entries,CONF_ENT_CODELIB)) != NULL &&
Entry->value != NULL )
ptr[4] = codelib = strdup(Entry->value);
#endif
if ((Entry = Get_Entry(SPtr->entries,CONF_ENT_AREA)) != NULL &&
Entry->value != NULL )
{
@ -698,6 +709,7 @@ int Set_Codes(section* Section)
print_msg("Error: Variable `%s' are not set!\n",CONF_ENT_COUNTRY);
}
#if 0 /* DELETE_ME AK:18-Aug-99 */
if ((Entry = Get_Entry(SPtr->entries,CONF_ENT_AREADIFF)) != NULL &&
Entry->value != NULL )
ptr[7] = areadifffile = strdup(Entry->value);
@ -718,7 +730,7 @@ int Set_Codes(section* Section)
ptr[7] = areadifffile;
}
}
#endif
SPtr = Section;
while ((SPtr = Get_Section(SPtr,CONF_SEC_VAR)) != NULL)
@ -741,6 +753,7 @@ int Set_Codes(section* Section)
/****************************************************************************/
#if 0 /* DELETE_ME AK:18-Aug-99 */
char *get_areacode(char *code, int *Len, int flag)
{
auto char *Ptr;
@ -777,6 +790,7 @@ char *get_areacode(char *code, int *Len, int flag)
i++;
}
#if 0 /* DELETE_ME AK:18-Aug-99 */
#ifdef LIBAREA
if (codelib != NULL && !strcasecmp(codelib,"AREACODE"))
Ptr = _get_areacode(code,Len,flag);
@ -789,6 +803,7 @@ char *get_areacode(char *code, int *Len, int flag)
Ptr = _get_areacode(code,Len,flag);
#else
Ptr = _get_avon(code,Len,flag);
#endif
#endif
if (Ptr != NULL)
@ -816,7 +831,9 @@ char *get_areacode(char *code, int *Len, int flag)
}
/****************************************************************************/
#endif
#if 0 /* DELETE_ME AK:18-Aug-99 */
#ifndef LIBAREA
static char *_get_avon(char *code, int *Len, int flag)
{
@ -875,9 +892,11 @@ static char *_get_avon(char *code, int *Len, int flag)
return (s[0]?s:NULL);
}
#endif
#endif
/****************************************************************************/
#if 0 /* DELETE_ME AK:18-Aug-99 */
static char *_get_areacode(char *code, int *Len, int flag)
{
auto int cc = 0;
@ -926,6 +945,7 @@ static char *_get_areacode(char *code, int *Len, int flag)
return NULL;
}
#endif
/****************************************************************************/
@ -1034,6 +1054,7 @@ int paranoia_check(char *cmd)
/****************************************************************************/
#if 0 /* DELETE_ME AK:18-Aug-99 */
static long int area_read_value(FILE *fp, int size)
{
long value = 0;
@ -1264,3 +1285,4 @@ static int area_read_file(void)
}
/****************************************************************************/
#endif

View File

@ -1,5 +1,5 @@
/* $Id: libisdn.h,v 1.10 1998/10/13 21:53:33 luethje Exp $
/* $Id: libisdn.h,v 1.11 1999/08/20 19:43:48 akool Exp $
*
* ISDN accounting for isdn4linux.
*
@ -20,6 +20,9 @@
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
* $Log: libisdn.h,v $
* Revision 1.11 1999/08/20 19:43:48 akool
* removed avon-, vorwahl- and areacodes-support
*
* Revision 1.10 1998/10/13 21:53:33 luethje
* isdnrep and lib: bugfixes
*
@ -60,8 +63,10 @@
#include "policy.h"
#include "conffile.h"
#if 0 /* DELETE_ME AK:18-Aug-99 */
#include "areacode/areacode.h"
#include "avon/createDB.h"
#endif
/****************************************************************************/
@ -120,6 +125,7 @@ extern char *basename __P((__const char *__name));
# define S_AREA_PREFIX "0"
#endif
#if 0 /* DELETE_ME AK:18-Aug-99 */
#ifndef S_AREA_DIFF_FILE
# define S_AREA_DIFF_FILE "vorwahlen.dat"
#endif
@ -127,6 +133,7 @@ extern char *basename __P((__const char *__name));
#ifndef AVON
# define AVON "avon"
#endif
#endif
/****************************************************************************/
@ -135,10 +142,12 @@ extern char *basename __P((__const char *__name));
#define CONF_ENT_AREA_PREFIX "AREAPREFIX"
#define CONF_ENT_COUNTRY "COUNTRYCODE"
#define CONF_ENT_AREA "AREACODE"
#if 0 /* DELETE_ME AK:18-Aug-99 */
#define CONF_ENT_AREALIB "AREALIB"
#define CONF_ENT_AVONLIB "AVON"
#define CONF_ENT_CODELIB "CODELIB"
#define CONF_ENT_AREADIFF "AREADIFF"
#endif
#define CONF_SEC_VAR "VARIABLES"
@ -168,12 +177,14 @@ extern char *basename __P((__const char *__name));
/****************************************************************************/
#if 0 /* DELETE_ME AK:18-Aug-99 */
#define AREA_ERROR -1
#define AREA_UNKNOWN 0
#define AREA_LOCAL 1
#define AREA_R50 2
#define AREA_FAR 3
#define AREA_ABROAD 4
#endif
/****************************************************************************/
@ -195,7 +206,9 @@ _EXTERN char *mycountry SET_NULL;
_EXTERN char *myarea SET_NULL;
_EXTERN char *areaprefix SET_AREA_PREFIX;
_EXTERN char *countryprefix SET_COUNTRY_PREFIX;
#if 0 /* DELETE_ME AK:18-Aug-99 */
_EXTERN char *areadifffile SET_NULL2;
#endif
_EXTERN void set_print_fct_for_lib(int (*new_print_msg)(const char *, ...));
_EXTERN int num_match(char *Pattern, char *number);
@ -204,11 +217,15 @@ _EXTERN char *expand_file(char *s);
_EXTERN char *confdir(void);
_EXTERN int handle_runfiles(const char *_progname, char **_devices, int flag);
_EXTERN int Set_Codes(section* Section);
#if 0 /* DELETE_ME AK:18-Aug-99 */
_EXTERN char *get_areacode(char *code, int *Len, int flag);
#endif
_EXTERN int read_conffiles(section **Section, char *groupfile);
_EXTERN int paranoia_check(char *cmd);
#if 0 /* DELETE_ME AK:18-Aug-99 */
_EXTERN int area_diff(char* _code, char *_diffcode);
_EXTERN const char* area_diff_string(char* number1, char* number2);
#endif
#undef SET_NULL
#undef SET_NULL2