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:
Baptiste Daroussin 2016-05-10 11:17:19 +00:00
parent f03ef8405b
commit a9c48188b8
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=299357
5 changed files with 10 additions and 10 deletions

View file

@ -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;

View file

@ -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()
*/

View file

@ -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[]));

View file

@ -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;
}

View file

@ -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);