summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--bin/pax/options.c16
-rw-r--r--distrib/special/more/more.c8
-rw-r--r--games/boggle/boggle/bog.c4
-rw-r--r--games/boggle/boggle/extern.h4
-rw-r--r--games/boggle/boggle/mach.c4
-rw-r--r--games/cribbage/crib.c6
-rw-r--r--games/cribbage/cribbage.h4
-rw-r--r--games/cribbage/io.c10
-rw-r--r--games/gomoku/bdisp.c4
-rw-r--r--games/gomoku/gomoku.h4
-rw-r--r--games/gomoku/main.c14
-rw-r--r--gnu/usr.bin/cvs/lib/getline.c2
-rw-r--r--gnu/usr.bin/cvs/lib/getline.h2
-rw-r--r--gnu/usr.bin/cvs/src/client.c4
-rw-r--r--gnu/usr.bin/cvs/src/commit.c2
-rw-r--r--gnu/usr.bin/cvs/src/cvsrc.c2
-rw-r--r--gnu/usr.bin/cvs/src/edit.c6
-rw-r--r--gnu/usr.bin/cvs/src/entries.c6
-rw-r--r--gnu/usr.bin/cvs/src/fileattr.c2
-rw-r--r--gnu/usr.bin/cvs/src/ignore.c2
-rw-r--r--gnu/usr.bin/cvs/src/login.c4
-rw-r--r--gnu/usr.bin/cvs/src/logmsg.c6
-rw-r--r--gnu/usr.bin/cvs/src/mkmodules.c2
-rw-r--r--gnu/usr.bin/cvs/src/parseinfo.c4
-rw-r--r--gnu/usr.bin/cvs/src/patch.c6
-rw-r--r--gnu/usr.bin/cvs/src/release.c2
-rw-r--r--gnu/usr.bin/cvs/src/repos.c2
-rw-r--r--gnu/usr.bin/cvs/src/root.c2
-rw-r--r--gnu/usr.bin/cvs/src/server.c6
-rw-r--r--gnu/usr.bin/cvs/src/subr.c2
-rw-r--r--gnu/usr.bin/cvs/src/update.c2
-rw-r--r--gnu/usr.bin/cvs/src/wrapper.c2
-rw-r--r--libexec/ftpd/extern.h4
-rw-r--r--libexec/ftpd/ftpcmd.y8
-rw-r--r--libexec/ftpd/ftpd.c4
-rw-r--r--usr.bin/csplit/csplit.c18
-rw-r--r--usr.bin/ctags/C.c10
-rw-r--r--usr.bin/ctags/ctags.h4
-rw-r--r--usr.bin/ctags/fortran.c4
-rw-r--r--usr.bin/ctags/lisp.c4
-rw-r--r--usr.bin/ctags/print.c6
-rw-r--r--usr.bin/ctags/yacc.c4
-rw-r--r--usr.bin/cvs/diff3.c10
-rw-r--r--usr.bin/diff3/diff3prog.c10
-rw-r--r--usr.bin/fsplit/fsplit.c8
-rw-r--r--usr.bin/gencat/gencat.c10
-rw-r--r--usr.bin/rcs/diff3.c10
-rw-r--r--usr.bin/rs/rs.c12
-rw-r--r--usr.bin/unifdef/unifdef.c8
-rw-r--r--usr.bin/uudecode/uudecode.c10
-rw-r--r--usr.sbin/ftp-proxy/ftp-proxy.c10
-rw-r--r--usr.sbin/httpd/src/support/htdigest.c6
-rw-r--r--usr.sbin/httpd/src/support/htpasswd.c6
-rw-r--r--usr.sbin/httpd/src/support/logresolve.c8
-rw-r--r--usr.sbin/lpr/common_source/common.c4
-rw-r--r--usr.sbin/lpr/common_source/displayq.c4
-rw-r--r--usr.sbin/lpr/common_source/lp.h4
-rw-r--r--usr.sbin/lpr/common_source/rmjob.c8
-rw-r--r--usr.sbin/lpr/lpc/cmds.c6
-rw-r--r--usr.sbin/lpr/lpd/printjob.c14
-rw-r--r--usr.sbin/netgroup_mkdb/netgroup_mkdb.c4
-rw-r--r--usr.sbin/netgroup_mkdb/util.c4
-rw-r--r--usr.sbin/netgroup_mkdb/util.h2
63 files changed, 185 insertions, 185 deletions
diff --git a/bin/pax/options.c b/bin/pax/options.c
index 28ace9b827d..cc4a17cbe06 100644
--- a/bin/pax/options.c
+++ b/bin/pax/options.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: options.c,v 1.74 2010/12/02 04:08:27 tedu Exp $ */
+/* $OpenBSD: options.c,v 1.75 2012/03/04 04:05:15 fgsch Exp $ */
/* $NetBSD: options.c,v 1.6 1996/03/26 23:54:18 mrg Exp $ */
/*-
@@ -64,7 +64,7 @@ static int no_op(void);
static void printflg(unsigned int);
static int c_frmt(const void *, const void *);
static off_t str_offt(char *);
-static char *getline(FILE *fp);
+static char *get_line(FILE *fp);
static void pax_options(int, char **);
static void pax_usage(void);
static void tar_options(int, char **);
@@ -72,7 +72,7 @@ static void tar_usage(void);
static void cpio_options(int, char **);
static void cpio_usage(void);
-/* errors from getline */
+/* errors from get_line */
#define GETLINE_FILE_CORRUPT 1
#define GETLINE_OUT_OF_MEM 2
static int getline_error;
@@ -884,7 +884,7 @@ tar_options(int argc, char **argv)
paxwarn(1, "Unable to open file '%s' for read", file);
tar_usage();
}
- while ((str = getline(fp)) != NULL) {
+ while ((str = get_line(fp)) != NULL) {
if (pat_add(str, dir) < 0)
tar_usage();
sawpat = 1;
@@ -963,7 +963,7 @@ tar_options(int argc, char **argv)
paxwarn(1, "Unable to open file '%s' for read", file);
tar_usage();
}
- while ((str = getline(fp)) != NULL) {
+ while ((str = get_line(fp)) != NULL) {
if (ftree_add(str, 0) < 0)
tar_usage();
}
@@ -1185,7 +1185,7 @@ cpio_options(int argc, char **argv)
paxwarn(1, "Unable to open file '%s' for read", optarg);
cpio_usage();
}
- while ((str = getline(fp)) != NULL) {
+ while ((str = get_line(fp)) != NULL) {
pat_add(str, NULL);
}
fclose(fp);
@@ -1284,7 +1284,7 @@ cpio_options(int argc, char **argv)
* no read errors allowed on updates/append operation!
*/
maxflt = 0;
- while ((str = getline(stdin)) != NULL) {
+ while ((str = get_line(stdin)) != NULL) {
ftree_add(str, 0);
}
if (getline_error) {
@@ -1515,7 +1515,7 @@ str_offt(char *val)
}
char *
-getline(FILE *f)
+get_line(FILE *f)
{
char *name, *temp;
size_t len;
diff --git a/distrib/special/more/more.c b/distrib/special/more/more.c
index fb8bf5cdde7..ae66e499f48 100644
--- a/distrib/special/more/more.c
+++ b/distrib/special/more/more.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: more.c,v 1.31 2010/04/28 18:15:49 jsg Exp $ */
+/* $OpenBSD: more.c,v 1.32 2012/03/04 04:05:15 fgsch Exp $ */
/*
* Copyright (c) 2003 Todd C. Miller <Todd.Miller@courtesan.com>
@@ -166,7 +166,7 @@ int colon(char *, int, int);
int command(char *, FILE *);
int do_shell(char *);
int expand(char *, size_t, char *);
-int getline(FILE *, int *);
+int get_line(FILE *, int *);
int magic(FILE *, char *);
int number(char *);
int readch(void);
@@ -517,7 +517,7 @@ screen(FILE *f, int num_lines)
for (;;) {
while (num_lines > 0 && !Pause) {
- if ((nchars = getline(f, &length)) == EOF) {
+ if ((nchars = get_line(f, &length)) == EOF) {
if (clreol)
clreos();
return;
@@ -661,7 +661,7 @@ prompt(char *filename)
* Get a logical line.
*/
int
-getline(FILE *f, int *length)
+get_line(FILE *f, int *length)
{
int ch, lastch;
char *p, *ep;
diff --git a/games/boggle/boggle/bog.c b/games/boggle/boggle/bog.c
index 86170628925..bfaf04afa61 100644
--- a/games/boggle/boggle/bog.c
+++ b/games/boggle/boggle/bog.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: bog.c,v 1.20 2009/10/27 23:59:24 deraadt Exp $ */
+/* $OpenBSD: bog.c,v 1.21 2012/03/04 04:05:15 fgsch Exp $ */
/* $NetBSD: bog.c,v 1.5 1995/04/24 12:22:32 cgd Exp $ */
/*-
@@ -274,7 +274,7 @@ playgame(void)
}
while (1) {
- if (getline(buf) == NULL) {
+ if (get_line(buf) == NULL) {
if (feof(stdin))
clearerr(stdin);
break;
diff --git a/games/boggle/boggle/extern.h b/games/boggle/boggle/extern.h
index 0fc7b0d5bb8..868837ca984 100644
--- a/games/boggle/boggle/extern.h
+++ b/games/boggle/boggle/extern.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: extern.h,v 1.6 2003/06/03 03:01:39 millert Exp $ */
+/* $OpenBSD: extern.h,v 1.7 2012/03/04 04:05:15 fgsch Exp $ */
/* $NetBSD: extern.h,v 1.3 1995/04/24 12:22:37 cgd Exp $ */
/*-
@@ -42,7 +42,7 @@ void delay(int);
long dictseek(FILE *, long, int);
void findword(void);
void flushin(FILE *);
-char *getline(char *);
+char *get_line(char *);
void getword(char *);
int help(void);
int inputch(void);
diff --git a/games/boggle/boggle/mach.c b/games/boggle/boggle/mach.c
index fb16b4b269c..2c9149675a1 100644
--- a/games/boggle/boggle/mach.c
+++ b/games/boggle/boggle/mach.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: mach.c,v 1.12 2009/10/27 23:59:24 deraadt Exp $ */
+/* $OpenBSD: mach.c,v 1.13 2012/03/04 04:05:15 fgsch Exp $ */
/* $NetBSD: mach.c,v 1.5 1995/04/28 22:28:48 mycroft Exp $ */
/*-
@@ -194,7 +194,7 @@ prwidth(char **base, int indx)
* - doesn't accept words longer than MAXWORDLEN or containing caps
*/
char *
-getline(char *q)
+get_line(char *q)
{
int ch, done;
char *p;
diff --git a/games/cribbage/crib.c b/games/cribbage/crib.c
index efbd71d20dd..b6d9970d706 100644
--- a/games/cribbage/crib.c
+++ b/games/cribbage/crib.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: crib.c,v 1.15 2010/05/10 08:53:12 nicm Exp $ */
+/* $OpenBSD: crib.c,v 1.16 2012/03/04 04:05:15 fgsch Exp $ */
/* $NetBSD: crib.c,v 1.7 1997/07/10 06:47:29 mikel Exp $ */
/*-
@@ -207,7 +207,7 @@ game(void)
do {
msg(quiet ? "Cut for crib? " :
"Cut to see whose crib it is -- low card wins? ");
- foo = getline();
+ foo = get_line();
if (*foo != '\0' && ((i = atoi(foo)) < 4 || i > 48))
msg("Invalid cut");
else
@@ -389,7 +389,7 @@ cut(bool mycrib, int pos)
do {
msg(quiet ? "Cut the deck? " :
"How many cards down do you wish to cut the deck? ");
- foo = getline();
+ foo = get_line();
if (*foo != '\0' && ((i = atoi(foo)) < 4 || i > 36))
msg("Invalid cut");
else
diff --git a/games/cribbage/cribbage.h b/games/cribbage/cribbage.h
index 08002905462..bcf33c04fb0 100644
--- a/games/cribbage/cribbage.h
+++ b/games/cribbage/cribbage.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: cribbage.h,v 1.9 2010/05/10 08:53:12 nicm Exp $ */
+/* $OpenBSD: cribbage.h,v 1.10 2012/03/04 04:05:15 fgsch Exp $ */
/* $NetBSD: cribbage.h,v 1.3 1995/03/21 15:08:46 cgd Exp $ */
/*
@@ -78,7 +78,7 @@ int eq(CARD, CARD);
int fifteens(CARD [], int);
void game(void);
void gamescore(void);
-char *getline(void);
+char *get_line(void);
int getuchar(void);
int incard(CARD *);
int infrom(CARD [], int, char *);
diff --git a/games/cribbage/io.c b/games/cribbage/io.c
index b335f9707b2..c46b7d266e6 100644
--- a/games/cribbage/io.c
+++ b/games/cribbage/io.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: io.c,v 1.13 2010/05/10 08:53:12 nicm Exp $ */
+/* $OpenBSD: io.c,v 1.14 2012/03/04 04:05:15 fgsch Exp $ */
/* $NetBSD: io.c,v 1.9 1997/07/09 06:25:47 phil Exp $ */
/*-
@@ -216,7 +216,7 @@ incard(CARD *crd)
retval = FALSE;
rnk = sut = EMPTY;
- if (!(line = getline()))
+ if (!(line = get_line()))
goto gotit;
p = p1 = line;
while (*p1 != ' ' && *p1 != '\0')
@@ -315,7 +315,7 @@ number(int lo, int hi, char *prompt)
for (sum = 0;;) {
msg(prompt);
- if (!(p = getline()) || *p == '\0') {
+ if (!(p = get_line()) || *p == '\0') {
msg(quiet ? "Not a number" :
"That doesn't look like a number");
continue;
@@ -505,12 +505,12 @@ over:
}
/*
- * getline:
+ * get_line:
* Reads the next line up to '\n' or EOF. Multiple spaces are
* compressed to one space; a space is inserted before a ','
*/
char *
-getline(void)
+get_line(void)
{
char *sp;
int c, oy, ox;
diff --git a/games/gomoku/bdisp.c b/games/gomoku/bdisp.c
index d6fb0c6aead..0fe37506ed1 100644
--- a/games/gomoku/bdisp.c
+++ b/games/gomoku/bdisp.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: bdisp.c,v 1.10 2009/10/27 23:59:24 deraadt Exp $ */
+/* $OpenBSD: bdisp.c,v 1.11 2012/03/04 04:05:15 fgsch Exp $ */
/*
* Copyright (c) 1994
* The Regents of the University of California. All rights reserved.
@@ -248,7 +248,7 @@ ask(str)
}
int
-getline(buf, size)
+get_line(buf, size)
char *buf;
int size;
{
diff --git a/games/gomoku/gomoku.h b/games/gomoku/gomoku.h
index e5d6b5360e4..b9b58684161 100644
--- a/games/gomoku/gomoku.h
+++ b/games/gomoku/gomoku.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: gomoku.h,v 1.9 2004/01/16 00:13:19 espie Exp $ */
+/* $OpenBSD: gomoku.h,v 1.10 2012/03/04 04:05:15 fgsch Exp $ */
/*
* Copyright (c) 1994
* The Regents of the University of California. All rights reserved.
@@ -285,7 +285,7 @@ void cursinit(void);
void dislog(char *);
void dlog(char *);
int getcoord(void);
-int getline(char *, int);
+int get_line(char *, int);
void init_overlap(void);
#ifdef DEBUG
int list_eq(struct combostr **, struct combostr **, int);
diff --git a/games/gomoku/main.c b/games/gomoku/main.c
index aeb8f56b0f8..c516fc58a48 100644
--- a/games/gomoku/main.c
+++ b/games/gomoku/main.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: main.c,v 1.22 2009/10/27 23:59:24 deraadt Exp $ */
+/* $OpenBSD: main.c,v 1.23 2012/03/04 04:05:15 fgsch Exp $ */
/*
* Copyright (c) 1994
* The Regents of the University of California. All rights reserved.
@@ -162,7 +162,7 @@ again:
}
} else {
setbuf(stdout, 0);
- getline(buf, sizeof(buf));
+ get_line(buf, sizeof(buf));
if (strcmp(buf, "black") == 0)
color = BLACK;
else if (strcmp(buf, "white") == 0)
@@ -239,7 +239,7 @@ again:
FILE *fp;
ask("save file name? ");
- (void)getline(fname, sizeof(fname));
+ (void)get_line(fname, sizeof(fname));
if ((fp = fopen(fname, "w")) == NULL) {
logit("cannot create save file");
goto getinput;
@@ -257,7 +257,7 @@ again:
goto getinput;
}
} else {
- if (!getline(buf, sizeof(buf))) {
+ if (!get_line(buf, sizeof(buf))) {
curmove = RESIGN;
break;
}
@@ -307,14 +307,14 @@ again:
if (i != RESIGN) {
replay:
ask("replay? ");
- if (getline(buf, sizeof(buf)) &&
+ if (get_line(buf, sizeof(buf)) &&
(buf[0] == 'y' || buf[0] == 'Y'))
goto again;
if (strcmp(buf, "save") == 0) {
FILE *fp;
ask("save file name? ");
- (void)getline(buf, sizeof(buf));
+ (void)get_line(buf, sizeof(buf));
if ((fp = fopen(buf, "w")) == NULL) {
logit("cannot create save file");
goto replay;
@@ -364,7 +364,7 @@ whatsup(signum)
quit(0);
top:
ask("cmd? ");
- if (!getline(fmtbuf, sizeof(fmtbuf)))
+ if (!get_line(fmtbuf, sizeof(fmtbuf)))
quit(0);
switch (*fmtbuf) {
case '\0':
diff --git a/gnu/usr.bin/cvs/lib/getline.c b/gnu/usr.bin/cvs/lib/getline.c
index 84d7fce13e7..bda96e27e14 100644
--- a/gnu/usr.bin/cvs/lib/getline.c
+++ b/gnu/usr.bin/cvs/lib/getline.c
@@ -154,7 +154,7 @@ getstr (lineptr, n, stream, terminator, offset, limit)
}
int
-getline (lineptr, n, stream)
+get_line (lineptr, n, stream)
char **lineptr;
size_t *n;
FILE *stream;
diff --git a/gnu/usr.bin/cvs/lib/getline.h b/gnu/usr.bin/cvs/lib/getline.h
index 93a30eb80ad..3c697c8e6e3 100644
--- a/gnu/usr.bin/cvs/lib/getline.h
+++ b/gnu/usr.bin/cvs/lib/getline.h
@@ -12,7 +12,7 @@
#define GETLINE_NO_LIMIT -1
int
- getline __PROTO ((char **_lineptr, size_t *_n, FILE *_stream));
+ get_line __PROTO ((char **_lineptr, size_t *_n, FILE *_stream));
int
getline_safe __PROTO ((char **_lineptr, size_t *_n, FILE *_stream,
int limit));
diff --git a/gnu/usr.bin/cvs/src/client.c b/gnu/usr.bin/cvs/src/client.c
index 57739524ee2..0c0df1bc91d 100644
--- a/gnu/usr.bin/cvs/src/client.c
+++ b/gnu/usr.bin/cvs/src/client.c
@@ -5818,7 +5818,7 @@ notified_a_file (data, ent_list, short_pathname, filename)
char *p;
fp = open_file (CVSADM_NOTIFY, "r");
- if (getline (&line, &line_len, fp) < 0)
+ if (get_line (&line, &line_len, fp) < 0)
{
if (feof (fp))
error (0, 0, "cannot read %s: end of file", CVSADM_NOTIFY);
@@ -5839,7 +5839,7 @@ notified_a_file (data, ent_list, short_pathname, filename)
line + 1);
}
- if (getline (&line, &line_len, fp) < 0)
+ if (get_line (&line, &line_len, fp) < 0)
{
if (feof (fp))
{
diff --git a/gnu/usr.bin/cvs/src/commit.c b/gnu/usr.bin/cvs/src/commit.c
index 0fe9f9425d7..bb576d394ae 100644
--- a/gnu/usr.bin/cvs/src/commit.c
+++ b/gnu/usr.bin/cvs/src/commit.c
@@ -1482,7 +1482,7 @@ commit_filesdoneproc (callerdat, err, repository, update_dir, entries)
line = NULL;
line_chars_allocated = 0;
- line_length = getline (&line, &line_chars_allocated, fp);
+ line_length = get_line (&line, &line_chars_allocated, fp);
if (line_length > 0)
{
/* Remove any trailing newline. */
diff --git a/gnu/usr.bin/cvs/src/cvsrc.c b/gnu/usr.bin/cvs/src/cvsrc.c
index accc53fa761..03dbb791683 100644
--- a/gnu/usr.bin/cvs/src/cvsrc.c
+++ b/gnu/usr.bin/cvs/src/cvsrc.c
@@ -92,7 +92,7 @@ read_cvsrc (argc, argv, cmdname)
line_chars_allocated = 0;
command_len = strlen (cmdname);
cvsrcfile = open_file (homeinit, "r");
- while ((line_length = getline (&line, &line_chars_allocated, cvsrcfile))
+ while ((line_length = get_line (&line, &line_chars_allocated, cvsrcfile))
>= 0)
{
/* skip over comment lines */
diff --git a/gnu/usr.bin/cvs/src/edit.c b/gnu/usr.bin/cvs/src/edit.c
index b62710573cb..0e34eb0c71e 100644
--- a/gnu/usr.bin/cvs/src/edit.c
+++ b/gnu/usr.bin/cvs/src/edit.c
@@ -174,7 +174,7 @@ ncheck_fileproc (callerdat, finfo)
return 0;
}
- while (getline (&line, &line_len, fp) > 0)
+ while (get_line (&line, &line_len, fp) > 0)
{
notif_type = line[0];
if (notif_type == '\0')
@@ -887,7 +887,7 @@ notify_do (type, filename, who, val, watches, repository)
error (0, errno, "cannot read %s", usersname);
if (fp != NULL)
{
- while (getline (&line, &line_len, fp) >= 0)
+ while (get_line (&line, &line_len, fp) >= 0)
{
if (strncmp (line, p, len) == 0
&& line[len] == ':')
@@ -991,7 +991,7 @@ notify_check (repository, update_dir)
error (0, errno, "cannot open %s", CVSADM_NOTIFY);
return;
}
- while (getline (&line, &line_len, fp) > 0)
+ while (get_line (&line, &line_len, fp) > 0)
{
int notif_type;
char *filename;
diff --git a/gnu/usr.bin/cvs/src/entries.c b/gnu/usr.bin/cvs/src/entries.c
index 686244dbb33..4b8f235199a 100644
--- a/gnu/usr.bin/cvs/src/entries.c
+++ b/gnu/usr.bin/cvs/src/entries.c
@@ -302,7 +302,7 @@ fgetentent(fpin, cmd, sawdir)
line_chars_allocated = 0;
ent = NULL;
- while ((line_length = getline (&line, &line_chars_allocated, fpin)) > 0)
+ while ((line_length = get_line (&line, &line_chars_allocated, fpin)) > 0)
{
l = line;
@@ -737,7 +737,7 @@ ParseTag (tagp, datep, nonbranchp)
line = NULL;
line_chars_allocated = 0;
- if ((line_length = getline (&line, &line_chars_allocated, fp)) > 0)
+ if ((line_length = get_line (&line, &line_chars_allocated, fp)) > 0)
{
/* Remove any trailing newline. */
if (line[line_length - 1] == '\n')
@@ -1070,7 +1070,7 @@ base_walk (code, finfo, rev)
if (fp != NULL)
{
- while (getline (&line, &line_allocated, fp) >= 0)
+ while (get_line (&line, &line_allocated, fp) >= 0)
{
char *linefile;
char *p;
diff --git a/gnu/usr.bin/cvs/src/fileattr.c b/gnu/usr.bin/cvs/src/fileattr.c
index bae03a661d9..24eda660cc0 100644
--- a/gnu/usr.bin/cvs/src/fileattr.c
+++ b/gnu/usr.bin/cvs/src/fileattr.c
@@ -100,7 +100,7 @@ fileattr_read ()
attrlist = getlist ();
while (1) {
int nread;
- nread = getline (&line, &line_len, fp);
+ nread = get_line (&line, &line_len, fp);
if (nread < 0)
break;
/* Remove trailing newline. */
diff --git a/gnu/usr.bin/cvs/src/ignore.c b/gnu/usr.bin/cvs/src/ignore.c
index f46bc5ed746..f1a3a0c88aa 100644
--- a/gnu/usr.bin/cvs/src/ignore.c
+++ b/gnu/usr.bin/cvs/src/ignore.c
@@ -158,7 +158,7 @@ ign_add_file (file, hold)
error (0, errno, "cannot open %s", file);
return;
}
- while (getline (&line, &line_allocated, fp) >= 0)
+ while (get_line (&line, &line_allocated, fp) >= 0)
ign_add (line, hold);
if (ferror (fp))
error (0, errno, "cannot read %s", file);
diff --git a/gnu/usr.bin/cvs/src/login.c b/gnu/usr.bin/cvs/src/login.c
index 8bbfe2406da..c23d31c453b 100644
--- a/gnu/usr.bin/cvs/src/login.c
+++ b/gnu/usr.bin/cvs/src/login.c
@@ -331,7 +331,7 @@ password_entry_operation (operation, root, newpassword)
/* Check each line to see if we have this entry already. */
line = 0;
- while ((line_length = getline (&linebuf, &linebuf_len, fp)) >= 0)
+ while ((line_length = get_line (&linebuf, &linebuf_len, fp)) >= 0)
{
line++;
password = password_entry_parseline(cvsroot_canonical, 1, line, linebuf);
@@ -400,7 +400,7 @@ process:
error (1, errno, "unable to open temp file %s", tmp_name);
line = 0;
- while ((line_length = getline (&linebuf, &linebuf_len, fp)) >= 0)
+ while ((line_length = get_line (&linebuf, &linebuf_len, fp)) >= 0)
{
line++;
if (line < found_at
diff --git a/gnu/usr.bin/cvs/src/logmsg.c b/gnu/usr.bin/cvs/src/logmsg.c
index 89e0ece72fa..ee7f90ed796 100644
--- a/gnu/usr.bin/cvs/src/logmsg.c
+++ b/gnu/usr.bin/cvs/src/logmsg.c
@@ -319,7 +319,7 @@ do_editor (dir, messagep, repository, changes)
size_t offset = 0;
while (1)
{
- line_length = getline (&line, &line_chars_allocated, fp);
+ line_length = get_line (&line, &line_chars_allocated, fp);
if (line_length == -1)
{
if (ferror (fp))
@@ -348,7 +348,7 @@ do_editor (dir, messagep, repository, changes)
(void) printf ("a)bort, c)ontinue, e)dit, !)reuse this message unchanged for remaining dirs\n");
(void) printf ("Action: (continue) ");
(void) fflush (stdout);
- line_length = getline (&line, &line_chars_allocated, stdin);
+ line_length = get_line (&line, &line_chars_allocated, stdin);
if (line_length < 0)
{
error (0, errno, "cannot read from stdin");
@@ -489,7 +489,7 @@ rcsinfo_proc (repository, template)
char *line = NULL;
size_t line_chars_allocated = 0;
- while (getline (&line, &line_chars_allocated, tfp) >= 0)
+ while (get_line (&line, &line_chars_allocated, tfp) >= 0)
(void) fputs (line, fp);
if (ferror (tfp))
error (0, errno, "warning: cannot read %s", template);
diff --git a/gnu/usr.bin/cvs/src/mkmodules.c b/gnu/usr.bin/cvs/src/mkmodules.c
index 48a5f4f1e2d..eb11afed42d 100644
--- a/gnu/usr.bin/cvs/src/mkmodules.c
+++ b/gnu/usr.bin/cvs/src/mkmodules.c
@@ -467,7 +467,7 @@ mkmodules (dir)
*
* comment lines begin with '#'
*/
- while (getline (&line, &line_allocated, fp) >= 0)
+ while (get_line (&line, &line_allocated, fp) >= 0)
{
/* skip lines starting with # */
if (line[0] == '#')
diff --git a/gnu/usr.bin/cvs/src/parseinfo.c b/gnu/usr.bin/cvs/src/parseinfo.c
index fbcc3a53c8c..c1482e63616 100644
--- a/gnu/usr.bin/cvs/src/parseinfo.c
+++ b/gnu/usr.bin/cvs/src/parseinfo.c
@@ -70,7 +70,7 @@ Parse_Info (infofile, repository, callproc, all)
/* search the info file for lines that match */
callback_done = line_number = 0;
- while (getline (&line, &line_allocated, fp_info) >= 0)
+ while (get_line (&line, &line_allocated, fp_info) >= 0)
{
line_number++;
@@ -259,7 +259,7 @@ parse_config (cvsroot)
return 0;
}
- while (getline (&line, &line_allocated, fp_info) >= 0)
+ while (get_line (&line, &line_allocated, fp_info) >= 0)
{
/* Skip comments. */
if (line[0] == '#')
diff --git a/gnu/usr.bin/cvs/src/patch.c b/gnu/usr.bin/cvs/src/patch.c
index 437c395be17..024bc5b9921 100644
--- a/gnu/usr.bin/cvs/src/patch.c
+++ b/gnu/usr.bin/cvs/src/patch.c
@@ -603,8 +603,8 @@ patch_fileproc (callerdat, finfo)
cvs_output ("\n", 1);
fp = open_file (tmpfile3, "r");
- if (getline (&line1, &line1_chars_allocated, fp) < 0 ||
- getline (&line2, &line2_chars_allocated, fp) < 0)
+ if (get_line (&line1, &line1_chars_allocated, fp) < 0 ||
+ get_line (&line2, &line2_chars_allocated, fp) < 0)
{
if (feof (fp))
error (0, 0, "\
@@ -709,7 +709,7 @@ failed to read diff file header %s for %s: end of file", tmpfile3, rcs);
/* spew the rest of the diff out */
while ((line_length
- = getline (&line1, &line1_chars_allocated, fp))
+ = get_line (&line1, &line1_chars_allocated, fp))
>= 0)
cvs_output (line1, 0);
if (line_length < 0 && !feof (fp))
diff --git a/gnu/usr.bin/cvs/src/release.c b/gnu/usr.bin/cvs/src/release.c
index f87583d8e92..5145cb40101 100644
--- a/gnu/usr.bin/cvs/src/release.c
+++ b/gnu/usr.bin/cvs/src/release.c
@@ -186,7 +186,7 @@ release (argc, argv)
c = 0;
- while ((line_length = getline (&line, &line_allocated, fp)) >= 0)
+ while ((line_length = get_line (&line, &line_allocated, fp)) >= 0)
{
if (strchr ("MARCZ", *line))
c++;
diff --git a/gnu/usr.bin/cvs/src/repos.c b/gnu/usr.bin/cvs/src/repos.c
index 8cdcb45424e..be425b14a29 100644
--- a/gnu/usr.bin/cvs/src/repos.c
+++ b/gnu/usr.bin/cvs/src/repos.c
@@ -88,7 +88,7 @@ Name_Repository (dir, update_dir)
error (1, save_errno, "cannot open %s", tmp);
}
- if (getline (&repos, &repos_allocated, fpin) < 0)
+ if (get_line (&repos, &repos_allocated, fpin) < 0)
{
/* FIXME: should be checking for end of file separately. */
error (0, 0, "in directory %s:", xupdate_dir);
diff --git a/gnu/usr.bin/cvs/src/root.c b/gnu/usr.bin/cvs/src/root.c
index 08dab3e94a6..c9870b9e294 100644
--- a/gnu/usr.bin/cvs/src/root.c
+++ b/gnu/usr.bin/cvs/src/root.c
@@ -72,7 +72,7 @@ Name_Root (dir, update_dir)
*/
fpin = open_file (tmp, "r");
- if (getline (&root, &root_allocated, fpin) < 0)
+ if (get_line (&root, &root_allocated, fpin) < 0)
{
/* FIXME: should be checking for end of file separately; errno
is not set in that case. */
diff --git a/gnu/usr.bin/cvs/src/server.c b/gnu/usr.bin/cvs/src/server.c
index da7540f57bb..fa0a95ae689 100644
--- a/gnu/usr.bin/cvs/src/server.c
+++ b/gnu/usr.bin/cvs/src/server.c
@@ -2605,7 +2605,7 @@ check_command_legal_p (cmd_name)
}
else /* successfully opened readers file */
{
- while ((num_red = getline (&linebuf, &linebuf_len, fp)) >= 0)
+ while ((num_red = get_line (&linebuf, &linebuf_len, fp)) >= 0)
{
/* Hmmm, is it worth importing my own readline
library into CVS? It takes care of chopping
@@ -2666,7 +2666,7 @@ check_command_legal_p (cmd_name)
}
found_it = 0;
- while ((num_red = getline (&linebuf, &linebuf_len, fp)) >= 0)
+ while ((num_red = get_line (&linebuf, &linebuf_len, fp)) >= 0)
{
/* Chop newline by hand, for strcmp()'s sake. */
if (num_red > 0 && linebuf[num_red - 1] == '\n')
@@ -5582,7 +5582,7 @@ check_repository_password (username, password, repository, host_user_ptr)
/* Look for a relevant line -- one with this user's name. */
namelen = strlen (username);
- while (getline (&linebuf, &linebuf_len, fp) >= 0)
+ while (get_line (&linebuf, &linebuf_len, fp) >= 0)
{
if ((strncmp (linebuf, username, namelen) == 0)
&& (linebuf[namelen] == ':'))
diff --git a/gnu/usr.bin/cvs/src/subr.c b/gnu/usr.bin/cvs/src/subr.c
index bb647773bcf..597b2f137f6 100644
--- a/gnu/usr.bin/cvs/src/subr.c
+++ b/gnu/usr.bin/cvs/src/subr.c
@@ -605,7 +605,7 @@ file_has_markers (finfo)
fp = CVS_FOPEN (finfo->file, "r");
if (fp == NULL)
error (1, errno, "cannot open %s", finfo->fullname);
- while (getline (&line, &line_allocated, fp) > 0)
+ while (get_line (&line, &line_allocated, fp) > 0)
{
if (strncmp (line, RCS_MERGE_PAT_1, sizeof RCS_MERGE_PAT_1 - 1) == 0 ||
strncmp (line, RCS_MERGE_PAT_2, sizeof RCS_MERGE_PAT_2 - 1) == 0 ||
diff --git a/gnu/usr.bin/cvs/src/update.c b/gnu/usr.bin/cvs/src/update.c
index 16bcc04bdeb..1d11d24f2d5 100644
--- a/gnu/usr.bin/cvs/src/update.c
+++ b/gnu/usr.bin/cvs/src/update.c
@@ -1095,7 +1095,7 @@ update_dirleave_proc (callerdat, dir, err, update_dir, entries)
size_t line_allocated = 0;
repository = Name_Repository ((char *) NULL, update_dir);
- if (getline (&line, &line_allocated, fp) >= 0)
+ if (get_line (&line, &line_allocated, fp) >= 0)
{
if ((cp = strrchr (line, '\n')) != NULL)
*cp = '\0';
diff --git a/gnu/usr.bin/cvs/src/wrapper.c b/gnu/usr.bin/cvs/src/wrapper.c
index 91fdbafbbd0..1ee4e656fb9 100644
--- a/gnu/usr.bin/cvs/src/wrapper.c
+++ b/gnu/usr.bin/cvs/src/wrapper.c
@@ -294,7 +294,7 @@ wrap_add_file (file, temp)
error (0, errno, "cannot open %s", file);
return;
}
- while (getline (&line, &line_allocated, fp) >= 0)
+ while (get_line (&line, &line_allocated, fp) >= 0)
wrap_add (line, temp);
if (line)
free (line);
diff --git a/libexec/ftpd/extern.h b/libexec/ftpd/extern.h
index 7268cdaaadb..fa3bd9ba3a3 100644
--- a/libexec/ftpd/extern.h
+++ b/libexec/ftpd/extern.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: extern.h,v 1.17 2008/09/12 16:12:08 moritz Exp $ */
+/* $OpenBSD: extern.h,v 1.18 2012/03/04 04:05:15 fgsch Exp $ */
/* $NetBSD: extern.h,v 1.2 1995/04/11 02:44:49 cgd Exp $ */
/*
@@ -69,7 +69,7 @@ void dologout(int);
void fatal(char *);
int ftpd_pclose(FILE *);
FILE *ftpd_popen(char *, char *);
-int getline(char *, int, FILE *);
+int get_line(char *, int, FILE *);
void ftpdlogwtmp(char *, char *, char *);
void lreply(int, const char *, ...);
void makedir(char *);
diff --git a/libexec/ftpd/ftpcmd.y b/libexec/ftpd/ftpcmd.y
index ae380720483..619ef4f19f4 100644
--- a/libexec/ftpd/ftpcmd.y
+++ b/libexec/ftpd/ftpcmd.y
@@ -1,4 +1,4 @@
-/* $OpenBSD: ftpcmd.y,v 1.53 2009/10/27 23:59:31 deraadt Exp $ */
+/* $OpenBSD: ftpcmd.y,v 1.54 2012/03/04 04:05:15 fgsch Exp $ */
/* $NetBSD: ftpcmd.y,v 1.7 1996/04/08 19:03:11 jtc Exp $ */
/*
@@ -1077,10 +1077,10 @@ lookup(p, cmd)
#include <arpa/telnet.h>
/*
- * getline - a hacked up version of fgets to ignore TELNET escape codes.
+ * get_line - a hacked up version of fgets to ignore TELNET escape codes.
*/
int
-getline(s, n, iop)
+get_line(s, n, iop)
char *s;
int n;
FILE *iop;
@@ -1195,7 +1195,7 @@ yylex()
case CMD:
(void) alarm((unsigned) timeout);
- n = getline(cbuf, sizeof(cbuf)-1, stdin);
+ n = get_line(cbuf, sizeof(cbuf)-1, stdin);
if (n == -1) {
reply(221, "You could at least say goodbye.");
dologout(0);
diff --git a/libexec/ftpd/ftpd.c b/libexec/ftpd/ftpd.c
index 9aed56217a8..760dd253d35 100644
--- a/libexec/ftpd/ftpd.c
+++ b/libexec/ftpd/ftpd.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ftpd.c,v 1.194 2011/12/14 18:01:55 ajacoutot Exp $ */
+/* $OpenBSD: ftpd.c,v 1.195 2012/03/04 04:05:15 fgsch Exp $ */
/* $NetBSD: ftpd.c,v 1.15 1995/06/03 22:46:47 mycroft Exp $ */
/*
@@ -2226,7 +2226,7 @@ myoob(void)
if (!transflag)
return;
cp = tmpline;
- ret = getline(cp, 7, stdin);
+ ret = get_line(cp, 7, stdin);
if (ret == -1) {
reply(221, "You could at least say goodbye.");
dologout(0);
diff --git a/usr.bin/csplit/csplit.c b/usr.bin/csplit/csplit.c
index e1b3ebcf774..d90c488eb08 100644
--- a/usr.bin/csplit/csplit.c
+++ b/usr.bin/csplit/csplit.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: csplit.c,v 1.3 2006/07/17 22:28:11 deraadt Exp $ */
+/* $OpenBSD: csplit.c,v 1.4 2012/03/04 04:05:15 fgsch Exp $ */
/* $FreeBSD: src/usr.bin/csplit/csplit.c,v 1.9 2004/03/22 11:15:03 tjr Exp $ */
/*-
@@ -63,7 +63,7 @@
void cleanup(void);
void do_lineno(const char *);
void do_rexp(const char *);
-char *getline(void);
+char *get_line(void);
void handlesig(int);
FILE *newfile(void);
void toomuch(FILE *, long);
@@ -195,7 +195,7 @@ main(int argc, char *argv[])
/* Copy the rest into a new file. */
if (!feof(infile)) {
ofp = newfile();
- while ((p = getline()) != NULL && fputs(p, ofp) == 0)
+ while ((p = get_line()) != NULL && fputs(p, ofp) == 0)
;
if (!sflag)
printf("%jd\n", (intmax_t)ftello(ofp));
@@ -270,7 +270,7 @@ cleanup(void)
/* Read a line from the input into a static buffer. */
char *
-getline(void)
+get_line(void)
{
static char lbuf[LINE_MAX];
FILE *src;
@@ -291,7 +291,7 @@ again: if (fgets(lbuf, sizeof(lbuf), src) == NULL) {
return (lbuf);
}
-/* Conceptually rewind the input (as obtained by getline()) back `n' lines. */
+/* Conceptually rewind the input (as obtained by get_line()) back `n' lines. */
void
toomuch(FILE *ofp, long n)
{
@@ -343,7 +343,7 @@ toomuch(FILE *ofp, long n)
err(1, "%s", currfile);
/*
- * getline() will read from here. Next call will truncate to
+ * get_line() will read from here. Next call will truncate to
* truncofs in this file.
*/
overfile = ofp;
@@ -391,7 +391,7 @@ do_rexp(const char *expr)
/* Read and output lines until we get a match. */
first = 1;
- while ((p = getline()) != NULL) {
+ while ((p = get_line()) != NULL) {
if (fputs(p, ofp) != 0)
break;
if (!first && regexec(&cre, p, 0, NULL, 0) == 0)
@@ -417,7 +417,7 @@ do_rexp(const char *expr)
* Positive offset: copy the requested number of lines
* after the match.
*/
- while (--ofs > 0 && (p = getline()) != NULL)
+ while (--ofs > 0 && (p = get_line()) != NULL)
fputs(p, ofp);
toomuch(NULL, 0);
nwritten = (intmax_t)ftello(ofp);
@@ -451,7 +451,7 @@ do_lineno(const char *expr)
while (nfiles < maxfiles - 1) {
ofp = newfile();
while (lineno + 1 != lastline) {
- if ((p = getline()) == NULL)
+ if ((p = get_line()) == NULL)
errx(1, "%ld: out of range", lastline);
if (fputs(p, ofp) != 0)
break;
diff --git a/usr.bin/ctags/C.c b/usr.bin/ctags/C.c
index 10a87e76b1b..3dfbf9b6f86 100644
--- a/usr.bin/ctags/C.c
+++ b/usr.bin/ctags/C.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: C.c,v 1.13 2010/11/03 19:39:38 millert Exp $ */
+/* $OpenBSD: C.c,v 1.14 2012/03/04 04:05:15 fgsch Exp $ */
/* $NetBSD: C.c,v 1.3 1995/03/26 20:14:02 glass Exp $ */
/*
@@ -155,7 +155,7 @@ endtok: if (sp > tok) {
* foo\n
* (arg1,
*/
- getline();
+ get_line();
curline = lineno;
if (func_entry()) {
++level;
@@ -184,7 +184,7 @@ endtok: if (sp > tok) {
case ';':
if (t_def && level == t_level) {
t_def = NO;
- getline();
+ get_line();
if (sp != tok)
*sp = EOS;
pfnote(tok, lineno);
@@ -233,7 +233,7 @@ endtok: if (sp > tok) {
* get line immediately;
* may change before '{'
*/
- getline();
+ get_line();
if (str_entry(c))
++level;
break;
@@ -413,7 +413,7 @@ hash_entry(void)
}
*sp = EOS;
if (dflag || c == '(') { /* only want macros */
- getline();
+ get_line();
pfnote(tok, curline);
}
skip: if (c == '\n') { /* get rid of rest of define */
diff --git a/usr.bin/ctags/ctags.h b/usr.bin/ctags/ctags.h
index 0c52d0bf38e..09dd1a292d1 100644
--- a/usr.bin/ctags/ctags.h
+++ b/usr.bin/ctags/ctags.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: ctags.h,v 1.6 2010/11/03 19:39:38 millert Exp $ */
+/* $OpenBSD: ctags.h,v 1.7 2012/03/04 04:05:15 fgsch Exp $ */
/* $NetBSD: ctags.h,v 1.3 1995/03/26 20:14:07 glass Exp $ */
/*
@@ -76,7 +76,7 @@ extern char *lbp;
extern char searchar; /* ex search character */
extern int cicmp(char *);
-extern void getline(void);
+extern void get_line(void);
extern void pfnote(char *, int);
extern int skip_key(int);
extern void put_entries(NODE *);
diff --git a/usr.bin/ctags/fortran.c b/usr.bin/ctags/fortran.c
index 91bebacd468..61ed7c515e9 100644
--- a/usr.bin/ctags/fortran.c
+++ b/usr.bin/ctags/fortran.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: fortran.c,v 1.7 2009/10/27 23:59:37 deraadt Exp $ */
+/* $OpenBSD: fortran.c,v 1.8 2012/03/04 04:05:15 fgsch Exp $ */
/* $NetBSD: fortran.c,v 1.3 1995/03/26 20:14:08 glass Exp $ */
/*
@@ -118,7 +118,7 @@ PF_funcs(void)
continue;
*cp = EOS;
(void)strlcpy(tok, lbp, sizeof tok); /* possible trunc */
- getline(); /* process line for ex(1) */
+ get_line(); /* process line for ex(1) */
pfnote(tok, lineno);
pfcnt = YES;
}
diff --git a/usr.bin/ctags/lisp.c b/usr.bin/ctags/lisp.c
index 7dafeb9ec9b..e3d91f389c7 100644
--- a/usr.bin/ctags/lisp.c
+++ b/usr.bin/ctags/lisp.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: lisp.c,v 1.6 2009/10/27 23:59:37 deraadt Exp $ */
+/* $OpenBSD: lisp.c,v 1.7 2012/03/04 04:05:15 fgsch Exp $ */
/* $NetBSD: lisp.c,v 1.3 1995/03/26 20:14:09 glass Exp $ */
/*
@@ -93,7 +93,7 @@ l_entries(void)
*cp = EOS;
(void)strlcpy(tok, lbp, sizeof tok);
*cp = savedc;
- getline();
+ get_line();
pfnote(tok, lineno);
}
/*NOTREACHED*/
diff --git a/usr.bin/ctags/print.c b/usr.bin/ctags/print.c
index a7746657f84..ca5d17f5a2e 100644
--- a/usr.bin/ctags/print.c
+++ b/usr.bin/ctags/print.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: print.c,v 1.6 2009/10/27 23:59:37 deraadt Exp $ */
+/* $OpenBSD: print.c,v 1.7 2012/03/04 04:05:15 fgsch Exp $ */
/* $NetBSD: print.c,v 1.4 1995/09/27 01:06:58 jtc Exp $ */
/*
@@ -39,12 +39,12 @@
#include "ctags.h"
/*
- * getline --
+ * get_line --
* get the line the token of interest occurred on,
* prepare it for printing.
*/
void
-getline(void)
+get_line(void)
{
long saveftell;
int c;
diff --git a/usr.bin/ctags/yacc.c b/usr.bin/ctags/yacc.c
index ef302faadb6..e289847a40a 100644
--- a/usr.bin/ctags/yacc.c
+++ b/usr.bin/ctags/yacc.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: yacc.c,v 1.8 2009/10/27 23:59:37 deraadt Exp $ */
+/* $OpenBSD: yacc.c,v 1.9 2012/03/04 04:05:15 fgsch Exp $ */
/* $NetBSD: yacc.c,v 1.3 1995/03/26 20:14:12 glass Exp $ */
/*
@@ -93,7 +93,7 @@ y_entries(void)
while (GETC(!=, EOF) && (intoken(c) || c == '.'))
*sp++ = c;
*sp = EOS;
- getline(); /* may change before ':' */
+ get_line(); /* may change before ':' */
while (iswhite(c)) {
if (c == '\n')
SETLINE;
diff --git a/usr.bin/cvs/diff3.c b/usr.bin/cvs/diff3.c
index 4b8563a31ed..df5eae89d8b 100644
--- a/usr.bin/cvs/diff3.c
+++ b/usr.bin/cvs/diff3.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: diff3.c,v 1.54 2010/10/29 17:49:37 nicm Exp $ */
+/* $OpenBSD: diff3.c,v 1.55 2012/03/04 04:05:15 fgsch Exp $ */
/*
* Copyright (C) Caldera International Inc. 2001-2002.
@@ -133,7 +133,7 @@ static char f1mark[MAXPATHLEN], f3mark[MAXPATHLEN]; /* markers for -E and -X */
static int duplicate(struct range *, struct range *);
static int edit(struct diff *, int, int);
static char *getchange(FILE *);
-static char *getline(FILE *, size_t *);
+static char *get_line(FILE *, size_t *);
static int number(char **);
static size_t readin(int, struct diff **);
static int skip(int, int, char *);
@@ -503,7 +503,7 @@ getchange(FILE *b)
{
char *line;
- while ((line = getline(b, NULL))) {
+ while ((line = get_line(b, NULL))) {
if (isdigit((unsigned char)line[0]))
return (line);
}
@@ -512,7 +512,7 @@ getchange(FILE *b)
}
static char *
-getline(FILE *b, size_t *n)
+get_line(FILE *b, size_t *n)
{
char *cp;
size_t len;
@@ -714,7 +714,7 @@ skip(int i, int from, char *pr)
char *line;
for (n = 0; cline[i] < from - 1; n += j) {
- if ((line = getline(fp[i], &j)) == NULL)
+ if ((line = get_line(fp[i], &j)) == NULL)
return (-1);
if (pr != NULL)
diff_output("%s%s", pr, line);
diff --git a/usr.bin/diff3/diff3prog.c b/usr.bin/diff3/diff3prog.c
index 1d0aa17d70f..c6677ce2b61 100644
--- a/usr.bin/diff3/diff3prog.c
+++ b/usr.bin/diff3/diff3prog.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: diff3prog.c,v 1.11 2009/10/27 23:59:37 deraadt Exp $ */
+/* $OpenBSD: diff3prog.c,v 1.12 2012/03/04 04:05:15 fgsch Exp $ */
/*
* Copyright (C) Caldera International Inc. 2001-2002.
@@ -124,7 +124,7 @@ char f1mark[40], f3mark[40]; /* markers for -E and -X */
int duplicate(struct range *, struct range *);
int edit(struct diff *, int, int);
char *getchange(FILE *);
-char *getline(FILE *, size_t *);
+char *get_line(FILE *, size_t *);
int number(char **);
int readin(char *, struct diff **);
int skip(int, int, char *);
@@ -253,7 +253,7 @@ getchange(FILE *b)
{
char *line;
- while ((line = getline(b, NULL))) {
+ while ((line = get_line(b, NULL))) {
if (isdigit((unsigned char)line[0]))
return (line);
}
@@ -261,7 +261,7 @@ getchange(FILE *b)
}
char *
-getline(FILE *b, size_t *n)
+get_line(FILE *b, size_t *n)
{
char *cp;
size_t len;
@@ -456,7 +456,7 @@ skip(int i, int from, char *pr)
char *line;
for (n = 0; cline[i] < from - 1; n += j) {
- if ((line = getline(fp[i], &j)) == NULL)
+ if ((line = get_line(fp[i], &j)) == NULL)
trouble();
if (pr != NULL)
printf("%s%s", pr, line);
diff --git a/usr.bin/fsplit/fsplit.c b/usr.bin/fsplit/fsplit.c
index 8a41fda22d7..c9fb6ca38c6 100644
--- a/usr.bin/fsplit/fsplit.c
+++ b/usr.bin/fsplit/fsplit.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: fsplit.c,v 1.18 2009/10/27 23:59:38 deraadt Exp $ */
+/* $OpenBSD: fsplit.c,v 1.19 2012/03/04 04:05:15 fgsch Exp $ */
/*
* Copyright (c) 1983, 1993
@@ -45,7 +45,7 @@
void badparms(void);
void get_name(char *, int);
int lname(char *, size_t);
-int getline(void);
+int get_line(void);
int lend(void);
int scan_name(char *, char *);
int saveit(char *);
@@ -161,7 +161,7 @@ main(int argc, char *argv[])
}
nflag = 0;
rv = 0;
- while (getline() > 0) {
+ while (get_line() > 0) {
rv = 1;
fprintf(ofp, "%s", buf);
if (lend()) /* look for an 'end' statement */
@@ -252,7 +252,7 @@ get_name(char *name, int letters)
}
int
-getline(void)
+get_line(void)
{
int c;
char *ptr;
diff --git a/usr.bin/gencat/gencat.c b/usr.bin/gencat/gencat.c
index dc9fa0597c6..da43b71bf1a 100644
--- a/usr.bin/gencat/gencat.c
+++ b/usr.bin/gencat/gencat.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: gencat.c,v 1.14 2011/01/01 11:25:54 lum Exp $ */
+/* $OpenBSD: gencat.c,v 1.15 2012/03/04 04:05:15 fgsch Exp $ */
/* $NetBSD: gencat.c,v 1.9 1998/10/09 17:00:56 itohy Exp $ */
/*-
@@ -106,7 +106,7 @@ extern char *__progname; /* from crt0.o */
static char *cskip(char *);
static void error(char *, char *);
static void nomem(void);
-static char *getline(int);
+static char *get_line(int);
static char *getmsg(int, char *, char);
static void warning(char *, char *);
static char *wskip(char *);
@@ -222,7 +222,7 @@ xstrdup(const char *str)
}
static char *
-getline(int fd)
+get_line(int fd)
{
static long curlen = BUFSIZ;
static char buf[BUFSIZ], *bptr = buf, *bend = buf;
@@ -325,7 +325,7 @@ getmsg(int fd, char *cptr, char quote)
++cptr;
switch (*cptr) {
case '\0':
- cptr = getline(fd);
+ cptr = get_line(fd);
if (!cptr)
error(NULL, "premature end of file");
msglen += strlen(cptr);
@@ -411,7 +411,7 @@ MCParse(int fd)
/* XXX: init sethead? */
- while ((cptr = getline(fd))) {
+ while ((cptr = get_line(fd))) {
if (*cptr == '$') {
++cptr;
if (strncmp(cptr, "set", 3) == 0) {
diff --git a/usr.bin/rcs/diff3.c b/usr.bin/rcs/diff3.c
index bd4a4bd6fcd..d234ba7db81 100644
--- a/usr.bin/rcs/diff3.c
+++ b/usr.bin/rcs/diff3.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: diff3.c,v 1.32 2011/04/20 19:34:16 nicm Exp $ */
+/* $OpenBSD: diff3.c,v 1.33 2012/03/04 04:05:15 fgsch Exp $ */
/*
* Copyright (C) Caldera International Inc. 2001-2002.
@@ -131,7 +131,7 @@ static char f1mark[MAXPATHLEN], f3mark[MAXPATHLEN]; /* markers for -E and -X */
static int duplicate(struct range *, struct range *);
static int edit(struct diff *, int, int);
static char *getchange(FILE *);
-static char *getline(FILE *, size_t *);
+static char *get_line(FILE *, size_t *);
static int number(char **);
static ssize_t readin(char *, struct diff **);
static int skip(int, int, char *);
@@ -612,7 +612,7 @@ getchange(FILE *b)
{
char *line;
- while ((line = getline(b, NULL))) {
+ while ((line = get_line(b, NULL))) {
if (isdigit((unsigned char)line[0]))
return (line);
}
@@ -621,7 +621,7 @@ getchange(FILE *b)
}
static char *
-getline(FILE *b, size_t *n)
+get_line(FILE *b, size_t *n)
{
char *cp;
size_t len;
@@ -823,7 +823,7 @@ skip(int i, int from, char *pr)
char *line;
for (n = 0; cline[i] < from - 1; n += j) {
- if ((line = getline(fp[i], &j)) == NULL)
+ if ((line = get_line(fp[i], &j)) == NULL)
return (-1);
if (pr != NULL)
diff_output("%s%s", pr, line);
diff --git a/usr.bin/rs/rs.c b/usr.bin/rs/rs.c
index a496da41328..e0d4054ca51 100644
--- a/usr.bin/rs/rs.c
+++ b/usr.bin/rs/rs.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: rs.c,v 1.20 2009/10/27 23:59:42 deraadt Exp $ */
+/* $OpenBSD: rs.c,v 1.21 2012/03/04 04:05:15 fgsch Exp $ */
/*-
* Copyright (c) 1993
@@ -78,7 +78,7 @@ int owidth = 80, gutter = 2;
void usage(void);
void getargs(int, char *[]);
void getfile(void);
-int getline(void);
+int get_line(void);
char **getptrs(char **);
void prepfile(void);
void prints(char *, int);
@@ -114,11 +114,11 @@ getfile(void)
char **padto;
while (skip--) {
- getline();
+ get_line();
if (flags & SKIPPRINT)
puts(curline);
}
- getline();
+ get_line();
if (flags & NOARGS && curlen < owidth)
flags |= ONEPERLINE;
if (flags & ONEPERLINE)
@@ -164,7 +164,7 @@ getfile(void)
INCR(ep);
}
}
- } while (getline() != EOF);
+ } while (get_line() != EOF);
*ep = NULL; /* mark end of pointers */
nelem = ep - elem;
}
@@ -303,7 +303,7 @@ prepfile(void)
char ibuf[BSIZE]; /* two screenfuls should do */
int
-getline(void) /* get line; maintain curline, curlen; manage storage */
+get_line(void) /* get line; maintain curline, curlen; manage storage */
{
static int putlength;
static char *endblock = ibuf + BSIZE;
diff --git a/usr.bin/unifdef/unifdef.c b/usr.bin/unifdef/unifdef.c
index 1e48be01954..c96f11f7eea 100644
--- a/usr.bin/unifdef/unifdef.c
+++ b/usr.bin/unifdef/unifdef.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: unifdef.c,v 1.14 2009/10/27 23:59:46 deraadt Exp $ */
+/* $OpenBSD: unifdef.c,v 1.15 2012/03/04 04:05:15 fgsch Exp $ */
/*
* Copyright (c) 2002, 2003 Tony Finch <dot@dotat.at>
* Copyright (c) 1985, 1993
@@ -183,7 +183,7 @@ static void debug(const char *, ...);
static void error(const char *);
static int findsym(const char *);
static void flushline(bool);
-static Linetype getline(void);
+static Linetype get_line(void);
static Linetype ifeval(const char **);
static void ignoreoff(void);
static void ignoreon(void);
@@ -663,7 +663,7 @@ process(void)
for (;;) {
linenum++;
- lineval = getline();
+ lineval = get_line();
trans = trans_table[ifstate[depth]][lineval];
if (trans == NULL)
break;
@@ -681,7 +681,7 @@ process(void)
* parser state between calls in a global variable.
*/
static Linetype
-getline(void)
+get_line(void)
{
const char *cp;
int cursym;
diff --git a/usr.bin/uudecode/uudecode.c b/usr.bin/uudecode/uudecode.c
index c5f1b73a398..f59f5787b06 100644
--- a/usr.bin/uudecode/uudecode.c
+++ b/usr.bin/uudecode/uudecode.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: uudecode.c,v 1.17 2009/10/27 23:59:46 deraadt Exp $ */
+/* $OpenBSD: uudecode.c,v 1.18 2012/03/04 04:05:15 fgsch Exp $ */
/* $FreeBSD: uudecode.c,v 1.49 2003/05/03 19:44:46 obrien Exp $ */
/*-
@@ -304,7 +304,7 @@ decode2(void)
}
static int
-getline(char *buf, size_t size)
+get_line(char *buf, size_t size)
{
if (fgets(buf, size, infp) != NULL)
return (2);
@@ -341,7 +341,7 @@ uu_decode(void)
/* for each input line */
for (;;) {
- switch (getline(buf, sizeof(buf))) {
+ switch (get_line(buf, sizeof(buf))) {
case 0:
return (0);
case 1:
@@ -401,7 +401,7 @@ uu_decode(void)
}
}
}
- switch (getline(buf, sizeof(buf))) {
+ switch (get_line(buf, sizeof(buf))) {
case 0:
return (0);
case 1:
@@ -419,7 +419,7 @@ base64_decode(void)
unsigned char outbuf[MAXPATHLEN * 4];
for (;;) {
- switch (getline(inbuf, sizeof(inbuf))) {
+ switch (get_line(inbuf, sizeof(inbuf))) {
case 0:
return (0);
case 1:
diff --git a/usr.sbin/ftp-proxy/ftp-proxy.c b/usr.sbin/ftp-proxy/ftp-proxy.c
index c077f8e61f9..5a0dbb9f5af 100644
--- a/usr.sbin/ftp-proxy/ftp-proxy.c
+++ b/usr.sbin/ftp-proxy/ftp-proxy.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ftp-proxy.c,v 1.23 2011/06/21 17:31:07 mikeb Exp $ */
+/* $OpenBSD: ftp-proxy.c,v 1.24 2012/03/04 04:05:15 fgsch Exp $ */
/*
* Copyright (c) 2004, 2005 Camiel Dobbelaar, <cd@sentia.nl>
@@ -93,7 +93,7 @@ void client_read(struct bufferevent *, void *);
int drop_privs(void);
void end_session(struct session *);
void exit_daemon(void);
-int getline(char *, size_t *);
+int get_line(char *, size_t *);
void handle_connection(const int, short, void *);
void handle_signal(int, short, void *);
struct session * init_session(void);
@@ -239,7 +239,7 @@ client_read(struct bufferevent *bufev, void *arg)
buf_avail);
s->cbuf_valid += read;
- while ((n = getline(s->cbuf, &s->cbuf_valid)) > 0) {
+ while ((n = get_line(s->cbuf, &s->cbuf_valid)) > 0) {
logmsg(LOG_DEBUG, "#%d client: %s", s->id, linebuf);
if (!client_parse(s)) {
end_session(s);
@@ -333,7 +333,7 @@ exit_daemon(void)
}
int
-getline(char *buf, size_t *valid)
+get_line(char *buf, size_t *valid)
{
size_t i;
@@ -1055,7 +1055,7 @@ server_read(struct bufferevent *bufev, void *arg)
buf_avail);
s->sbuf_valid += read;
- while ((n = getline(s->sbuf, &s->sbuf_valid)) > 0) {
+ while ((n = get_line(s->sbuf, &s->sbuf_valid)) > 0) {
logmsg(LOG_DEBUG, "#%d server: %s", s->id, linebuf);
if (!server_parse(s)) {
end_session(s);
diff --git a/usr.sbin/httpd/src/support/htdigest.c b/usr.sbin/httpd/src/support/htdigest.c
index 849cd013519..9fc243a8309 100644
--- a/usr.sbin/httpd/src/support/htdigest.c
+++ b/usr.sbin/httpd/src/support/htdigest.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: htdigest.c,v 1.12 2008/08/11 17:15:56 tobias Exp $ */
+/* $OpenBSD: htdigest.c,v 1.13 2012/03/04 04:05:15 fgsch Exp $ */
/* ====================================================================
* The Apache Software License, Version 1.1
@@ -102,7 +102,7 @@ getword(char *word, char *line, char stop)
}
static int
-getline(char *s, int n, FILE *f)
+get_line(char *s, int n, FILE *f)
{
int i = 0;
@@ -237,7 +237,7 @@ int main(int argc, char *argv[])
ap_cpystrn(realm, argv[2], sizeof(realm));
found = 0;
- while (!(getline(line, MAX_STRING_LEN, f))) {
+ while (!(get_line(line, MAX_STRING_LEN, f))) {
if (found || (line[0] == '#') || (!line[0])) {
putline(tfp, line);
continue;
diff --git a/usr.sbin/httpd/src/support/htpasswd.c b/usr.sbin/httpd/src/support/htpasswd.c
index 6c71c08a9bc..6d0ca084f17 100644
--- a/usr.sbin/httpd/src/support/htpasswd.c
+++ b/usr.sbin/httpd/src/support/htpasswd.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: htpasswd.c,v 1.18 2008/08/11 17:15:56 tobias Exp $ */
+/* $OpenBSD: htpasswd.c,v 1.19 2012/03/04 04:05:15 fgsch Exp $ */
/* ====================================================================
* The Apache Software License, Version 1.1
@@ -130,7 +130,7 @@ static char *tname_buf = NULL;
* newline.
*/
static int
-getline(char *s, int n, FILE *f)
+get_line(char *s, int n, FILE *f)
{
int i = 0;
@@ -513,7 +513,7 @@ main(int argc, char *argv[])
char scratch[MAX_STRING_LEN];
fpw = fopen(pwfilename, "r");
- while (! (getline(line, sizeof(line), fpw))) {
+ while (! (get_line(line, sizeof(line), fpw))) {
char *colon;
if ((line[0] == '#') || (line[0] == '\0')) {
diff --git a/usr.sbin/httpd/src/support/logresolve.c b/usr.sbin/httpd/src/support/logresolve.c
index e990061c4aa..09da8474dae 100644
--- a/usr.sbin/httpd/src/support/logresolve.c
+++ b/usr.sbin/httpd/src/support/logresolve.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: logresolve.c,v 1.15 2009/06/21 00:38:22 martynas Exp $ */
+/* $OpenBSD: logresolve.c,v 1.16 2012/03/04 04:05:15 fgsch Exp $ */
/*
* logresolve 1.1
@@ -49,7 +49,7 @@
#include <arpa/inet.h>
static void cgethost(struct sockaddr *sa, char *string, int check);
-static int getline(char *s, int n);
+static int get_line(char *s, int n);
static void stats(FILE *output);
static void usage(void);
@@ -258,7 +258,7 @@ stats(FILE *output)
/*gets a line from stdin */
static int
-getline(char *s, int n)
+get_line(char *s, int n)
{
if (!fgets(s, n, stdin))
return (0);
@@ -308,7 +308,7 @@ int main
for (i = 0; i < MAX_ERR + 2; i++)
errors[i] = 0;
- while (getline(line, MAXLINE)) {
+ while (get_line(line, MAXLINE)) {
if (line[0] == '\0')
continue;
entries++;
diff --git a/usr.sbin/lpr/common_source/common.c b/usr.sbin/lpr/common_source/common.c
index bc7c88cf981..bdf5691dccd 100644
--- a/usr.sbin/lpr/common_source/common.c
+++ b/usr.sbin/lpr/common_source/common.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: common.c,v 1.33 2009/10/27 23:59:51 deraadt Exp $ */
+/* $OpenBSD: common.c,v 1.34 2012/03/04 04:05:15 fgsch Exp $ */
/* $NetBSD: common.c,v 1.21 2000/08/09 14:28:50 itojun Exp $ */
/*
@@ -199,7 +199,7 @@ retryport:
* Returns 0 at EOF or the number of characters read.
*/
int
-getline(FILE *cfp)
+get_line(FILE *cfp)
{
int linel = 0;
char *lp = line;
diff --git a/usr.sbin/lpr/common_source/displayq.c b/usr.sbin/lpr/common_source/displayq.c
index 2f37e6c758e..3f8dec20f19 100644
--- a/usr.sbin/lpr/common_source/displayq.c
+++ b/usr.sbin/lpr/common_source/displayq.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: displayq.c,v 1.31 2009/10/27 23:59:51 deraadt Exp $ */
+/* $OpenBSD: displayq.c,v 1.32 2012/03/04 04:05:15 fgsch Exp $ */
/* $NetBSD: displayq.c,v 1.21 2001/08/30 00:51:50 itojun Exp $ */
/*
@@ -352,7 +352,7 @@ inform(char *cf, int rank)
}
j = 0;
- 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)) {
diff --git a/usr.sbin/lpr/common_source/lp.h b/usr.sbin/lpr/common_source/lp.h
index b6b20c6ceb3..09f914f976c 100644
--- a/usr.sbin/lpr/common_source/lp.h
+++ b/usr.sbin/lpr/common_source/lp.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: lp.h,v 1.14 2003/06/02 23:36:53 millert Exp $ */
+/* $OpenBSD: lp.h,v 1.15 2012/03/04 04:05:15 fgsch Exp $ */
/* $NetBSD: lp.h,v 1.14 2000/04/16 14:43:58 mrg Exp $ */
/*
@@ -130,7 +130,7 @@ void displayq(int);
void dump(char *, char *, int);
__dead void fatal(const char *, ...)
__attribute__((__format__(__printf__, 1, 2)));
-int getline(FILE *);
+int get_line(FILE *);
int getport(char *, int);
int getq(struct queue ***);
void header(void);
diff --git a/usr.sbin/lpr/common_source/rmjob.c b/usr.sbin/lpr/common_source/rmjob.c
index 3fb97b1281c..526523c7b4d 100644
--- a/usr.sbin/lpr/common_source/rmjob.c
+++ b/usr.sbin/lpr/common_source/rmjob.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: rmjob.c,v 1.18 2009/10/27 23:59:51 deraadt Exp $ */
+/* $OpenBSD: rmjob.c,v 1.19 2012/03/04 04:05:15 fgsch Exp $ */
/* $NetBSD: rmjob.c,v 1.16 2000/04/16 14:43:58 mrg Exp $ */
/*
@@ -171,7 +171,7 @@ lockchk(char *s)
else
return(0);
}
- if (!getline(fp)) {
+ if (!get_line(fp)) {
(void)fclose(fp);
return(0); /* no daemon present */
}
@@ -211,7 +211,7 @@ process(char *file)
close(fd);
fatal("cannot open %s", file);
}
- while (getline(cfp)) {
+ while (get_line(cfp)) {
switch (line[0]) {
case 'U': /* unlink associated files */
if (strchr(line+1, '/') || strncmp(line+1, "df", 2))
@@ -266,7 +266,7 @@ chk(char *file)
close(fd);
return(0);
}
- while (getline(cfp)) {
+ while (get_line(cfp)) {
if (line[0] == 'P')
break;
}
diff --git a/usr.sbin/lpr/lpc/cmds.c b/usr.sbin/lpr/lpc/cmds.c
index acffabdfe51..b964ae679c3 100644
--- a/usr.sbin/lpr/lpc/cmds.c
+++ b/usr.sbin/lpr/lpc/cmds.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: cmds.c,v 1.21 2009/10/29 20:11:09 sobrado Exp $ */
+/* $OpenBSD: cmds.c,v 1.22 2012/03/04 04:05:15 fgsch Exp $ */
/* $NetBSD: cmds.c,v 1.12 1997/10/05 15:12:06 mrg Exp $ */
/*
@@ -165,7 +165,7 @@ abortpr(int dis)
printf("\tcannot open lock file\n");
goto out;
}
- if (!getline(fp) || flock(fileno(fp), LOCK_SH|LOCK_NB) == 0) {
+ if (!get_line(fp) || flock(fileno(fp), LOCK_SH|LOCK_NB) == 0) {
(void)fclose(fp); /* unlocks as well */
printf("\tno daemon to abort\n");
goto out;
@@ -1098,7 +1098,7 @@ doarg(char *job)
close(fd);
continue;
}
- while (getline(fp) > 0)
+ while (get_line(fp) > 0)
if (line[0] == 'P')
break;
(void)fclose(fp);
diff --git a/usr.sbin/lpr/lpd/printjob.c b/usr.sbin/lpr/lpd/printjob.c
index 27108a49112..04f36895ee5 100644
--- a/usr.sbin/lpr/lpd/printjob.c
+++ b/usr.sbin/lpr/lpd/printjob.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: printjob.c,v 1.46 2010/03/22 16:50:38 deraadt Exp $ */
+/* $OpenBSD: printjob.c,v 1.47 2012/03/04 04:05:15 fgsch Exp $ */
/* $NetBSD: printjob.c,v 1.31 2002/01/21 14:42:30 wiz Exp $ */
/*
@@ -387,12 +387,12 @@ printit(char *file)
* (after we print it. (Pass 2 only)).
* M -- "mail" to user when done printing
*
- * getline reads a line and expands tabs to blanks
+ * get_line reads a line and expands tabs to blanks
*/
/* pass 1 */
- while (getline(cfp))
+ while (get_line(cfp))
switch (line[0]) {
case 'H':
strlcpy(fromhost, line+1, sizeof(fromhost));
@@ -493,7 +493,7 @@ printit(char *file)
pass2:
fseek(cfp, 0L, SEEK_SET);
- while (getline(cfp))
+ while (get_line(cfp))
switch (line[0]) {
case 'L': /* identification line */
if (!SH && HL)
@@ -808,7 +808,7 @@ sendit(char *file)
/*
* pass 1
*/
- while (getline(cfp)) {
+ while (get_line(cfp)) {
again:
if (line[0] == 'S') {
cp = line+1;
@@ -825,7 +825,7 @@ sendit(char *file)
}
if (line[0] >= 'a' && line[0] <= 'z') {
strlcpy(last, line, sizeof(last));
- while ((i = getline(cfp)) != 0)
+ while ((i = get_line(cfp)) != 0)
if (strcmp(last, line))
break;
switch (sendfile('\3', last+1)) {
@@ -852,7 +852,7 @@ sendit(char *file)
* pass 2
*/
fseek(cfp, 0L, SEEK_SET);
- while (getline(cfp))
+ while (get_line(cfp))
if (line[0] == 'U' && strchr(line+1, '/') == 0)
(void)unlink(line+1);
/*
diff --git a/usr.sbin/netgroup_mkdb/netgroup_mkdb.c b/usr.sbin/netgroup_mkdb/netgroup_mkdb.c
index 3f7926abe1c..fad0746e4a9 100644
--- a/usr.sbin/netgroup_mkdb/netgroup_mkdb.c
+++ b/usr.sbin/netgroup_mkdb/netgroup_mkdb.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: netgroup_mkdb.c,v 1.15 2009/10/27 23:59:53 deraadt Exp $ */
+/* $OpenBSD: netgroup_mkdb.c,v 1.16 2012/03/04 04:05:15 fgsch Exp $ */
/*
* Copyright (c) 1994 Christos Zoulas
@@ -212,7 +212,7 @@ ng_load(const char *fname)
if (db == NULL)
err(1, "dbopen");
- while ((buf = getline(fp, &size)) != NULL) {
+ while ((buf = get_line(fp, &size)) != NULL) {
tail = head = NULL;
p = buf;
diff --git a/usr.sbin/netgroup_mkdb/util.c b/usr.sbin/netgroup_mkdb/util.c
index 1b4439d2fdc..065c5022833 100644
--- a/usr.sbin/netgroup_mkdb/util.c
+++ b/usr.sbin/netgroup_mkdb/util.c
@@ -61,12 +61,12 @@ erealloc(void *p, size_t s)
}
-/* getline():
+/* get_line():
* Read a line from a file parsing continuations ending in \
* and eliminating trailing newlines.
*/
char *
-getline(FILE *fp, size_t *size)
+get_line(FILE *fp, size_t *size)
{
size_t s, len = 0;
char *buf = NULL, *ptr;
diff --git a/usr.sbin/netgroup_mkdb/util.h b/usr.sbin/netgroup_mkdb/util.h
index 84523a4f422..08ca7d7dfad 100644
--- a/usr.sbin/netgroup_mkdb/util.h
+++ b/usr.sbin/netgroup_mkdb/util.h
@@ -36,5 +36,5 @@
__BEGIN_DECLS
void *emalloc(size_t);
void *erealloc(void *, size_t);
-char *getline(FILE *, size_t *);
+char *get_line(FILE *, size_t *);
__END_DECLS