increased BUFSIZ
This commit is contained in:
parent
4ab12ed6bc
commit
340b80cf14
|
@ -1,4 +1,4 @@
|
||||||
/* $Id: conffile.c,v 1.20 1999/11/03 16:13:36 paul Exp $
|
/* $Id: conffile.c,v 1.21 2000/07/19 19:45:43 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: conffile.c,v $
|
* $Log: conffile.c,v $
|
||||||
|
* Revision 1.21 2000/07/19 19:45:43 akool
|
||||||
|
* increased BUFSIZ
|
||||||
|
*
|
||||||
* Revision 1.20 1999/11/03 16:13:36 paul
|
* Revision 1.20 1999/11/03 16:13:36 paul
|
||||||
* Added { } to suppress egcs warnings.
|
* Added { } to suppress egcs warnings.
|
||||||
*
|
*
|
||||||
|
@ -232,7 +235,7 @@ section *read_file(section *Section, const char *FileName, int Flags)
|
||||||
static section *Read_Lines(section *Section, FILE *fp, const char *FileName, int *Line, int Flags)
|
static section *Read_Lines(section *Section, FILE *fp, const char *FileName, int *Line, int Flags)
|
||||||
{
|
{
|
||||||
static int InSubSection = 0;
|
static int InSubSection = 0;
|
||||||
char String[BUFSIZ];
|
char String[8192];
|
||||||
char *Sectionname, *Variable, *Value;
|
char *Sectionname, *Variable, *Value;
|
||||||
int Res;
|
int Res;
|
||||||
int InInclude = 0;
|
int InInclude = 0;
|
||||||
|
@ -241,7 +244,7 @@ static section *Read_Lines(section *Section, FILE *fp, const char *FileName, int
|
||||||
if (Section != NULL)
|
if (Section != NULL)
|
||||||
InInclude = 1;
|
InInclude = 1;
|
||||||
|
|
||||||
while (FGets(String, BUFSIZ, fp, Line) != NULL)
|
while (FGets(String, sizeof(String), fp, Line) != NULL)
|
||||||
{
|
{
|
||||||
if ((Sectionname = Find_Section(String)) != NULL)
|
if ((Sectionname = Find_Section(String)) != NULL)
|
||||||
{
|
{
|
||||||
|
@ -697,7 +700,7 @@ section *Del_Section(section **Section, char *Sectionname)
|
||||||
static section *Insert_Section(section **main_sec, section **ins_sec, char **variables, int flags)
|
static section *Insert_Section(section **main_sec, section **ins_sec, char **variables, int flags)
|
||||||
{
|
{
|
||||||
section *Ptr = NULL;
|
section *Ptr = NULL;
|
||||||
|
|
||||||
|
|
||||||
if (main_sec == NULL || ins_sec == NULL || *ins_sec == NULL)
|
if (main_sec == NULL || ins_sec == NULL || *ins_sec == NULL)
|
||||||
{
|
{
|
||||||
|
@ -735,7 +738,7 @@ static section *Insert_Section(section **main_sec, section **ins_sec, char **var
|
||||||
*main_sec = *ins_sec;
|
*main_sec = *ins_sec;
|
||||||
*ins_sec = NULL;
|
*ins_sec = NULL;
|
||||||
(*main_sec)->next = NULL;
|
(*main_sec)->next = NULL;
|
||||||
|
|
||||||
return *main_sec;
|
return *main_sec;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1248,7 +1251,7 @@ static section* Get_Section_From_Path(section* NewSection, char *Path, entry **E
|
||||||
else if (Path != NULL || NewSection != NULL)
|
else if (Path != NULL || NewSection != NULL)
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
|
|
||||||
if ((RootSection = _Get_Section_From_Path(array,RootSection,&RetSection,&RetEntry,0)) == NULL)
|
if ((RootSection = _Get_Section_From_Path(array,RootSection,&RetSection,&RetEntry,0)) == NULL)
|
||||||
RetSection = NULL;
|
RetSection = NULL;
|
||||||
|
|
||||||
|
@ -1293,7 +1296,7 @@ static entry* _Get_Entry_From_Path(char **array, entry* Entry, section **RetSect
|
||||||
(*RetEntry == NULL || found_first != 0) )
|
(*RetEntry == NULL || found_first != 0) )
|
||||||
{
|
{
|
||||||
found = 1;
|
found = 1;
|
||||||
|
|
||||||
if (flags == F_TAG)
|
if (flags == F_TAG)
|
||||||
Entry->flag = F_TAGGED;
|
Entry->flag = F_TAGGED;
|
||||||
|
|
||||||
|
@ -1429,7 +1432,7 @@ section* Get_Section_Match(section* Section, char *Path,
|
||||||
|
|
||||||
return Entry->subsection;
|
return Entry->subsection;
|
||||||
}
|
}
|
||||||
/* Die naechsten Zeilen sind fuer Syntax-DAU's auskommentiert:
|
/* Die naechsten Zeilen sind fuer Syntax-DAU's auskommentiert:
|
||||||
NUMBER={
|
NUMBER={
|
||||||
[blabla]
|
[blabla]
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue