Rename getline with get_line to avoid collision with getline(3)
When getline(3) in 2009 was added a _WITH_GETLINE guard has also been added. This rename is made in preparation for the removal of this guard
This commit is contained in:
parent
e77a110d55
commit
c80a45c967
@ -80,12 +80,12 @@ static int compar(const void *_p1, const void *_p2);
|
||||
#define isdigitch(Anychar) isdigit((u_char)(Anychar))
|
||||
|
||||
/*
|
||||
* Getline reads a line from the control file cfp, removes tabs, converts
|
||||
* get_line reads a line from the control file cfp, removes tabs, converts
|
||||
* new-line to null and leaves it in line.
|
||||
* Returns 0 at EOF or the number of characters read.
|
||||
*/
|
||||
int
|
||||
getline(FILE *cfp)
|
||||
get_line(FILE *cfp)
|
||||
{
|
||||
register int linel = 0;
|
||||
register char *lp = line;
|
||||
|
@ -415,7 +415,7 @@ inform(const struct printer *pp, char *cf)
|
||||
file[0] = '\0';
|
||||
savedname[0] = '\0';
|
||||
jnum = calc_jobnum(cf, NULL);
|
||||
while (getline(cfp)) {
|
||||
while (get_line(cfp)) {
|
||||
switch (line[0]) {
|
||||
case 'P': /* Was this file specified in the user's list? */
|
||||
if (!inlist(line+1, cf)) {
|
||||
@ -445,7 +445,7 @@ inform(const struct printer *pp, char *cf)
|
||||
}
|
||||
copycnt++;
|
||||
/*
|
||||
* deliberately 'continue' to another getline(), so
|
||||
* deliberately 'continue' to another get_line(), so
|
||||
* all format-spec lines for this datafile are read
|
||||
* in and counted before calling show()
|
||||
*/
|
||||
|
@ -281,7 +281,7 @@ void fatal(const struct printer *_pp, const char *_msg, ...)
|
||||
int firstprinter(struct printer *_pp, int *_error);
|
||||
void free_printer(struct printer *_pp);
|
||||
void free_request(struct request *_rp);
|
||||
int getline(FILE *_cfp);
|
||||
int get_line(FILE *_cfp);
|
||||
int getport(const struct printer *_pp, const char *_rhost, int _rport);
|
||||
int getprintcap(const char *_printer, struct printer *_pp);
|
||||
int getq(const struct printer *_pp, struct jobqueue *(*_namelist[]));
|
||||
|
@ -163,7 +163,7 @@ lockchk(struct printer *pp, char *slockf)
|
||||
return(0);
|
||||
}
|
||||
PRIV_END
|
||||
if (!getline(fp)) {
|
||||
if (!get_line(fp)) {
|
||||
(void) fclose(fp);
|
||||
return(0); /* no daemon present */
|
||||
}
|
||||
@ -198,7 +198,7 @@ process(const struct printer *pp, char *file)
|
||||
if ((cfp = fopen(file, "r")) == NULL)
|
||||
fatal(pp, "cannot open %s", file);
|
||||
PRIV_END
|
||||
while (getline(cfp)) {
|
||||
while (get_line(cfp)) {
|
||||
switch (line[0]) {
|
||||
case 'U': /* unlink associated files */
|
||||
if (strchr(line+1, '/') || strncmp(line+1, "df", 2))
|
||||
@ -251,7 +251,7 @@ chk(char *file)
|
||||
if ((cfp = fopen(file, "r")) == NULL)
|
||||
return(0);
|
||||
PRIV_END
|
||||
while (getline(cfp)) {
|
||||
while (get_line(cfp)) {
|
||||
if (line[0] == 'P')
|
||||
break;
|
||||
}
|
||||
|
@ -306,7 +306,7 @@ kill_qtask(const char *lf)
|
||||
}
|
||||
|
||||
/* If the lock file is empty, then there is no daemon to kill */
|
||||
if (getline(fp) == 0)
|
||||
if (get_line(fp) == 0)
|
||||
goto killdone;
|
||||
|
||||
/*
|
||||
@ -1292,7 +1292,7 @@ doarg(char *job)
|
||||
PRIV_END
|
||||
if (fp == NULL)
|
||||
continue;
|
||||
while (getline(fp) > 0)
|
||||
while (get_line(fp) > 0)
|
||||
if (line[0] == 'P')
|
||||
break;
|
||||
(void) fclose(fp);
|
||||
|
Loading…
Reference in New Issue
Block a user