Module Name: src
Committed By: roy
Date: Mon Jul 13 19:05:42 UTC 2009
Modified Files:
src/bin/pax: options.c
src/dist/nawk: maketab.c proctab.c proto.h run.c
src/dist/pf/usr.sbin/ftp-proxy: ftp-proxy.c
src/games/boggle/boggle: bog.c extern.h mach.c
src/games/cribbage: crib.c cribbage.h io.c
src/games/gomoku: bdisp.c gomoku.h main.c
src/libexec/ftpd: extern.h ftpcmd.y ftpd.c
src/usr.bin/csplit: csplit.c
src/usr.bin/ctags: C.c ctags.h fortran.c lisp.c print.c yacc.c
src/usr.bin/fsplit: fsplit.c
src/usr.bin/ftp: cmds.c extern.h fetch.c main.c util.c
src/usr.bin/gencat: gencat.c
src/usr.bin/rs: rs.c
src/usr.bin/unifdef: unifdef.c
src/usr.sbin/inetd: inetd.c
src/usr.sbin/lpr/common_source: common.c displayq.c lp.h rmjob.c
src/usr.sbin/lpr/lpc: cmds.c
src/usr.sbin/lpr/lpd: printjob.c
Log Message:
Rename internal getline() function to get_line() so it does
conflict with the soon to be added getline(3) libc function.
To generate a diff of this commit:
cvs rdiff -u -r1.104 -r1.105 src/bin/pax/options.c
cvs rdiff -u -r1.11 -r1.12 src/dist/nawk/maketab.c
cvs rdiff -u -r1.10 -r1.11 src/dist/nawk/proctab.c
cvs rdiff -u -r1.8 -r1.9 src/dist/nawk/proto.h
cvs rdiff -u -r1.28 -r1.29 src/dist/nawk/run.c
cvs rdiff -u -r1.2 -r1.3 src/dist/pf/usr.sbin/ftp-proxy/ftp-proxy.c
cvs rdiff -u -r1.22 -r1.23 src/games/boggle/boggle/bog.c
cvs rdiff -u -r1.9 -r1.10 src/games/boggle/boggle/extern.h
cvs rdiff -u -r1.18 -r1.19 src/games/boggle/boggle/mach.c
cvs rdiff -u -r1.22 -r1.23 src/games/cribbage/crib.c src/games/cribbage/io.c
cvs rdiff -u -r1.13 -r1.14 src/games/cribbage/cribbage.h
cvs rdiff -u -r1.11 -r1.12 src/games/gomoku/bdisp.c
cvs rdiff -u -r1.15 -r1.16 src/games/gomoku/gomoku.h
cvs rdiff -u -r1.18 -r1.19 src/games/gomoku/main.c
cvs rdiff -u -r1.60 -r1.61 src/libexec/ftpd/extern.h
cvs rdiff -u -r1.89 -r1.90 src/libexec/ftpd/ftpcmd.y
cvs rdiff -u -r1.193 -r1.194 src/libexec/ftpd/ftpd.c
cvs rdiff -u -r1.4 -r1.5 src/usr.bin/csplit/csplit.c
cvs rdiff -u -r1.18 -r1.19 src/usr.bin/ctags/C.c
cvs rdiff -u -r1.8 -r1.9 src/usr.bin/ctags/ctags.h
cvs rdiff -u -r1.10 -r1.11 src/usr.bin/ctags/fortran.c \
src/usr.bin/ctags/lisp.c
cvs rdiff -u -r1.9 -r1.10 src/usr.bin/ctags/print.c
cvs rdiff -u -r1.11 -r1.12 src/usr.bin/ctags/yacc.c
cvs rdiff -u -r1.26 -r1.27 src/usr.bin/fsplit/fsplit.c
cvs rdiff -u -r1.129 -r1.130 src/usr.bin/ftp/cmds.c
cvs rdiff -u -r1.76 -r1.77 src/usr.bin/ftp/extern.h
cvs rdiff -u -r1.187 -r1.188 src/usr.bin/ftp/fetch.c
cvs rdiff -u -r1.116 -r1.117 src/usr.bin/ftp/main.c
cvs rdiff -u -r1.151 -r1.152 src/usr.bin/ftp/util.c
cvs rdiff -u -r1.29 -r1.30 src/usr.bin/gencat/gencat.c
cvs rdiff -u -r1.13 -r1.14 src/usr.bin/rs/rs.c
cvs rdiff -u -r1.14 -r1.15 src/usr.bin/unifdef/unifdef.c
cvs rdiff -u -r1.112 -r1.113 src/usr.sbin/inetd/inetd.c
cvs rdiff -u -r1.39 -r1.40 src/usr.sbin/lpr/common_source/common.c
cvs rdiff -u -r1.33 -r1.34 src/usr.sbin/lpr/common_source/displayq.c
cvs rdiff -u -r1.23 -r1.24 src/usr.sbin/lpr/common_source/lp.h
cvs rdiff -u -r1.24 -r1.25 src/usr.sbin/lpr/common_source/rmjob.c
cvs rdiff -u -r1.21 -r1.22 src/usr.sbin/lpr/lpc/cmds.c
cvs rdiff -u -r1.54 -r1.55 src/usr.sbin/lpr/lpd/printjob.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/bin/pax/options.c
diff -u src/bin/pax/options.c:1.104 src/bin/pax/options.c:1.105
--- src/bin/pax/options.c:1.104 Tue Apr 7 19:52:35 2009
+++ src/bin/pax/options.c Mon Jul 13 19:05:39 2009
@@ -1,4 +1,4 @@
-/* $NetBSD: options.c,v 1.104 2009/04/07 19:52:35 perry Exp $ */
+/* $NetBSD: options.c,v 1.105 2009/07/13 19:05:39 roy Exp $ */
/*-
* Copyright (c) 1992 Keith Muller.
@@ -42,7 +42,7 @@
#if 0
static char sccsid[] = "@(#)options.c 8.2 (Berkeley) 4/18/94";
#else
-__RCSID("$NetBSD: options.c,v 1.104 2009/04/07 19:52:35 perry Exp $");
+__RCSID("$NetBSD: options.c,v 1.105 2009/07/13 19:05:39 roy Exp $");
#endif
#endif /* not lint */
@@ -85,7 +85,7 @@
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 **);
@@ -95,10 +95,10 @@
static void cpio_usage(void);
#endif
-/* errors from getline */
+/* errors from get_line */
#define GETLINE_FILE_CORRUPT 1
#define GETLINE_OUT_OF_MEM 2
-static int getline_error;
+static int get_line_error;
#define BZIP2_CMD "bzip2" /* command to run as bzip2 */
#define GZIP_CMD "gzip" /* command to run as gzip */
@@ -1210,7 +1210,7 @@
tty_warn(1, "Unable to open file '%s' for read", file);
tar_usage();
}
- while ((str = getline(fp)) != NULL) {
+ while ((str = get_line(fp)) != NULL) {
if (dirisnext) {
if (dir && mustfreedir)
free(dir);
@@ -1245,7 +1245,7 @@
free(dir);
if (strcmp(file, "-") != 0)
fclose(fp);
- if (getline_error) {
+ if (get_line_error) {
tty_warn(1, "Problem with file '%s'", file);
tar_usage();
}
@@ -1315,7 +1315,7 @@
tty_warn(1, "Unable to open file '%s' for read", file);
tar_usage();
}
- while ((str = getline(fp)) != NULL) {
+ while ((str = get_line(fp)) != NULL) {
if (dirisnext) {
if (ftree_add(str, 1) < 0)
tar_usage();
@@ -1339,7 +1339,7 @@
tar_usage();
if (strcmp(file, "-") != 0)
fclose(fp);
- if (getline_error) {
+ if (get_line_error) {
tty_warn(1, "Problem with file '%s'",
file);
tar_usage();
@@ -1641,11 +1641,11 @@
optarg);
cpio_usage();
}
- while ((str = getline(fp)) != NULL) {
+ while ((str = get_line(fp)) != NULL) {
pat_add(str, NULL, 0);
}
fclose(fp);
- if (getline_error) {
+ if (get_line_error) {
tty_warn(1, "Problem with file '%s'", optarg);
cpio_usage();
}
@@ -1804,10 +1804,10 @@
* 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) {
+ if (get_line_error) {
tty_warn(1, "Problem while reading stdin");
cpio_usage();
}
@@ -2035,21 +2035,21 @@
}
char *
-getline(FILE *f)
+get_line(FILE *f)
{
char *name, *temp;
size_t len;
name = fgetln(f, &len);
if (!name) {
- getline_error = ferror(f) ? GETLINE_FILE_CORRUPT : 0;
+ get_line_error = ferror(f) ? GETLINE_FILE_CORRUPT : 0;
return 0;
}
if (name[len-1] != '\n')
len++;
temp = malloc(len);
if (!temp) {
- getline_error = GETLINE_OUT_OF_MEM;
+ get_line_error = GETLINE_OUT_OF_MEM;
return 0;
}
memcpy(temp, name, len-1);
Index: src/dist/nawk/maketab.c
diff -u src/dist/nawk/maketab.c:1.11 src/dist/nawk/maketab.c:1.12
--- src/dist/nawk/maketab.c:1.11 Sun Oct 19 19:33:47 2008
+++ src/dist/nawk/maketab.c Mon Jul 13 19:05:39 2009
@@ -106,7 +106,7 @@
{ CALL, "call", "call" },
{ ARG, "arg", "arg" },
{ VARNF, "getnf", "NF" },
- { GETLINE, "getline", "getline" },
+ { GETLINE, "get_line", "getline" },
{ GENSUB, "gensub", "gensub" },
{ 0, "", "" },
};
Index: src/dist/nawk/proctab.c
diff -u src/dist/nawk/proctab.c:1.10 src/dist/nawk/proctab.c:1.11
--- src/dist/nawk/proctab.c:1.10 Sun Oct 19 19:33:47 2008
+++ src/dist/nawk/proctab.c Mon Jul 13 19:05:39 2009
@@ -185,7 +185,7 @@
nullproc, /* NUMBER */
nullproc, /* STRING */
nullproc, /* REGEXPR */
- getline, /* GETLINE */
+ get_line, /* GETLINE */
gensub, /* GENSUB */
jump, /* RETURN */
split, /* SPLIT */
Index: src/dist/nawk/proto.h
diff -u src/dist/nawk/proto.h:1.8 src/dist/nawk/proto.h:1.9
--- src/dist/nawk/proto.h:1.8 Sun Mar 1 23:30:52 2009
+++ src/dist/nawk/proto.h Mon Jul 13 19:05:39 2009
@@ -151,7 +151,7 @@
extern Cell *copycell(Cell *);
extern Cell *arg(Node **, int);
extern Cell *jump(Node **, int);
-extern Cell *getline(Node **, int);
+extern Cell *get_line(Node **, int);
extern Cell *getnf(Node **, int);
extern Cell *array(Node **, int);
extern Cell *awkdelete(Node **, int);
Index: src/dist/nawk/run.c
diff -u src/dist/nawk/run.c:1.28 src/dist/nawk/run.c:1.29
--- src/dist/nawk/run.c:1.28 Tue Jun 16 13:56:09 2009
+++ src/dist/nawk/run.c Mon Jul 13 19:05:39 2009
@@ -398,7 +398,7 @@
return 0; /* not reached */
}
-Cell *getline(Node **a, int n) /* get next line from specific input */
+Cell *get_line(Node **a, int n) /* get next line from specific input */
{ /* a[0] is variable, a[1] is operator, a[2] is filename */
Cell *r, *x;
extern Cell **fldtab;
@@ -408,11 +408,11 @@
int mode;
if ((buf = (char *) malloc(bufsize)) == NULL)
- FATAL("out of memory in getline");
+ FATAL("out of memory in get_line");
fflush(stdout); /* in case someone is waiting for a prompt */
r = gettemp();
- if (a[1] != NULL) { /* getline < file */
+ if (a[1] != NULL) { /* get_line < file */
x = execute(a[2]); /* filename */
mode = ptoi(a[1]);
if (mode == '|') /* input pipe */
@@ -425,21 +425,21 @@
n = readrec(&buf, &bufsize, fp);
if (n <= 0) {
;
- } else if (a[0] != NULL) { /* getline var <file */
+ } else if (a[0] != NULL) { /* get_line var <file */
x = execute(a[0]);
setsval(x, buf);
tempfree(x);
- } else { /* getline <file */
+ } else { /* get_line <file */
setsval(fldtab[0], buf);
if (is_number(fldtab[0]->sval)) {
fldtab[0]->fval = atof(fldtab[0]->sval);
fldtab[0]->tval |= NUM;
}
}
- } else { /* bare getline; use current input */
- if (a[0] == NULL) /* getline */
+ } else { /* bare get_line; use current input */
+ if (a[0] == NULL) /* get_line */
n = getrec(&record, &recsize, 1);
- else { /* getline var */
+ else { /* get_line var */
n = getrec(&buf, &bufsize, 0);
x = execute(a[0]);
setsval(x, buf);
@@ -1746,7 +1746,7 @@
FILE *fp = 0;
if (*s == '\0')
- FATAL("null file name in print or getline");
+ FATAL("null file name in print or get_line");
for (i = 0; i < nfiles; i++)
if (files[i].fname && strcmp(s, files[i].fname) == 0) {
if (a == files[i].mode || (a==APPEND && files[i].mode==GT))
@@ -1781,7 +1781,7 @@
fp = popen(s, "w");
} else if (a == LE) { /* input pipe */
fp = popen(s, "r");
- } else if (a == LT) { /* getline <file */
+ } else if (a == LT) { /* get_line <file */
fp = strcmp(s, "-") == 0 ? stdin : fopen(s, "r"); /* "-" is stdin */
} else /* can't happen */
FATAL("illegal redirection %d", a);
Index: src/dist/pf/usr.sbin/ftp-proxy/ftp-proxy.c
diff -u src/dist/pf/usr.sbin/ftp-proxy/ftp-proxy.c:1.2 src/dist/pf/usr.sbin/ftp-proxy/ftp-proxy.c:1.3
--- src/dist/pf/usr.sbin/ftp-proxy/ftp-proxy.c:1.2 Wed Jun 18 09:06:26 2008
+++ src/dist/pf/usr.sbin/ftp-proxy/ftp-proxy.c Mon Jul 13 19:05:39 2009
@@ -1,4 +1,4 @@
-/* $NetBSD: ftp-proxy.c,v 1.2 2008/06/18 09:06:26 yamt Exp $ */
+/* $NetBSD: ftp-proxy.c,v 1.3 2009/07/13 19:05:39 roy Exp $ */
/* $OpenBSD: ftp-proxy.c,v 1.15 2007/08/15 15:18:02 camield Exp $ */
/*
@@ -107,7 +107,7 @@
int drop_privs(void);
void end_session(struct session *);
int 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);
@@ -257,7 +257,7 @@
buf_avail);
s->cbuf_valid += nread;
- 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);
@@ -356,7 +356,7 @@
}
int
-getline(char *buf, size_t *valid)
+get_line(char *buf, size_t *valid)
{
size_t i;
@@ -1113,7 +1113,7 @@
buf_avail);
s->sbuf_valid += nread;
- 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);
Index: src/games/boggle/boggle/bog.c
diff -u src/games/boggle/boggle/bog.c:1.22 src/games/boggle/boggle/bog.c:1.23
--- src/games/boggle/boggle/bog.c:1.22 Sun Jul 20 01:03:21 2008
+++ src/games/boggle/boggle/bog.c Mon Jul 13 19:05:39 2009
@@ -1,4 +1,4 @@
-/* $NetBSD: bog.c,v 1.22 2008/07/20 01:03:21 lukem Exp $ */
+/* $NetBSD: bog.c,v 1.23 2009/07/13 19:05:39 roy Exp $ */
/*-
* Copyright (c) 1993
@@ -42,7 +42,7 @@
#if 0
static char sccsid[] = "@(#)bog.c 8.2 (Berkeley) 5/4/95";
#else
-__RCSID("$NetBSD: bog.c,v 1.22 2008/07/20 01:03:21 lukem Exp $");
+__RCSID("$NetBSD: bog.c,v 1.23 2009/07/13 19:05:39 roy Exp $");
#endif
#endif /* not lint */
@@ -334,7 +334,7 @@
}
while (1) {
- if (getline(buf) == NULL) {
+ if (get_line(buf) == NULL) {
if (feof(stdin))
clearerr(stdin);
break;
Index: src/games/boggle/boggle/extern.h
diff -u src/games/boggle/boggle/extern.h:1.9 src/games/boggle/boggle/extern.h:1.10
--- src/games/boggle/boggle/extern.h:1.9 Fri Jul 1 16:38:24 2005
+++ src/games/boggle/boggle/extern.h Mon Jul 13 19:05:39 2009
@@ -1,4 +1,4 @@
-/* $NetBSD: extern.h,v 1.9 2005/07/01 16:38:24 jmc Exp $ */
+/* $NetBSD: extern.h,v 1.10 2009/07/13 19:05:39 roy Exp $ */
/*-
* Copyright (c) 1993
@@ -43,7 +43,7 @@
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);
Index: src/games/boggle/boggle/mach.c
diff -u src/games/boggle/boggle/mach.c:1.18 src/games/boggle/boggle/mach.c:1.19
--- src/games/boggle/boggle/mach.c:1.18 Fri Aug 8 16:10:47 2008
+++ src/games/boggle/boggle/mach.c Mon Jul 13 19:05:39 2009
@@ -1,4 +1,4 @@
-/* $NetBSD: mach.c,v 1.18 2008/08/08 16:10:47 drochner Exp $ */
+/* $NetBSD: mach.c,v 1.19 2009/07/13 19:05:39 roy Exp $ */
/*-
* Copyright (c) 1993
@@ -37,7 +37,7 @@
#if 0
static char sccsid[] = "@(#)mach.c 8.1 (Berkeley) 6/11/93";
#else
-__RCSID("$NetBSD: mach.c,v 1.18 2008/08/08 16:10:47 drochner Exp $");
+__RCSID("$NetBSD: mach.c,v 1.19 2009/07/13 19:05:39 roy Exp $");
#endif
#endif /* not lint */
@@ -162,7 +162,7 @@
* - doesn't accept words longer than MAXWORDLEN or containing caps
*/
char *
-getline(char *q)
+get_line(char *q)
{
int ch, done;
char *p;
Index: src/games/cribbage/crib.c
diff -u src/games/cribbage/crib.c:1.22 src/games/cribbage/crib.c:1.23
--- src/games/cribbage/crib.c:1.22 Fri Aug 8 16:10:47 2008
+++ src/games/cribbage/crib.c Mon Jul 13 19:05:40 2009
@@ -1,4 +1,4 @@
-/* $NetBSD: crib.c,v 1.22 2008/08/08 16:10:47 drochner Exp $ */
+/* $NetBSD: crib.c,v 1.23 2009/07/13 19:05:40 roy Exp $ */
/*-
* Copyright (c) 1980, 1993
@@ -39,7 +39,7 @@
#if 0
static char sccsid[] = "@(#)crib.c 8.1 (Berkeley) 5/31/93";
#else
-__RCSID("$NetBSD: crib.c,v 1.22 2008/08/08 16:10:47 drochner Exp $");
+__RCSID("$NetBSD: crib.c,v 1.23 2009/07/13 19:05:40 roy Exp $");
#endif
#endif /* not lint */
@@ -218,7 +218,7 @@
if (!rflag) { /* player cuts deck */
msg(quiet ? "Cut for crib? " :
"Cut to see whose crib it is -- low card wins? ");
- getline();
+ get_line();
}
i = (rand() >> 4) % CARDS; /* random cut */
do { /* comp cuts deck */
@@ -389,7 +389,7 @@
if (!rflag) { /* random cut */
msg(quiet ? "Cut the deck? " :
"How many cards down do you wish to cut the deck? ");
- getline();
+ get_line();
}
i = (rand() >> 4) % (CARDS - pos);
turnover = deck[i + pos];
Index: src/games/cribbage/io.c
diff -u src/games/cribbage/io.c:1.22 src/games/cribbage/io.c:1.23
--- src/games/cribbage/io.c:1.22 Thu Jun 4 04:48:04 2009
+++ src/games/cribbage/io.c Mon Jul 13 19:05:40 2009
@@ -1,4 +1,4 @@
-/* $NetBSD: io.c,v 1.22 2009/06/04 04:48:04 dholland Exp $ */
+/* $NetBSD: io.c,v 1.23 2009/07/13 19:05:40 roy Exp $ */
/*-
* Copyright (c) 1980, 1993
@@ -34,7 +34,7 @@
#if 0
static char sccsid[] = "@(#)io.c 8.1 (Berkeley) 5/31/93";
#else
-__RCSID("$NetBSD: io.c,v 1.22 2009/06/04 04:48:04 dholland Exp $");
+__RCSID("$NetBSD: io.c,v 1.23 2009/07/13 19:05:40 roy Exp $");
#endif
#endif /* not lint */
@@ -226,7 +226,7 @@
retval = FALSE;
rnk = sut = EMPTY;
- if (!(line = getline()))
+ if (!(line = get_line()))
goto gotit;
p = p1 = line;
while (*p1 != ' ' && *p1 != '\0')
@@ -325,7 +325,7 @@
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;
@@ -506,12 +506,12 @@
}
/*
- * 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;
Index: src/games/cribbage/cribbage.h
diff -u src/games/cribbage/cribbage.h:1.13 src/games/cribbage/cribbage.h:1.14
--- src/games/cribbage/cribbage.h:1.13 Sat Jul 2 08:32:32 2005
+++ src/games/cribbage/cribbage.h Mon Jul 13 19:05:40 2009
@@ -1,4 +1,4 @@
-/* $NetBSD: cribbage.h,v 1.13 2005/07/02 08:32:32 jmc Exp $ */
+/* $NetBSD: cribbage.h,v 1.14 2009/07/13 19:05:40 roy Exp $ */
/*
* Copyright (c) 1980, 1993
@@ -76,7 +76,7 @@
int fifteens(const CARD [], int);
void game(void);
void gamescore(void);
-char *getline(void);
+char *get_line(void);
int getuchar(void);
int incard(CARD *);
int infrom(const CARD [], int, const char *);
Index: src/games/gomoku/bdisp.c
diff -u src/games/gomoku/bdisp.c:1.11 src/games/gomoku/bdisp.c:1.12
--- src/games/gomoku/bdisp.c:1.11 Thu Jun 4 05:43:29 2009
+++ src/games/gomoku/bdisp.c Mon Jul 13 19:05:40 2009
@@ -1,4 +1,4 @@
-/* $NetBSD: bdisp.c,v 1.11 2009/06/04 05:43:29 dholland Exp $ */
+/* $NetBSD: bdisp.c,v 1.12 2009/07/13 19:05:40 roy Exp $ */
/*
* Copyright (c) 1994
@@ -37,7 +37,7 @@
#if 0
static char sccsid[] = "@(#)bdisp.c 8.2 (Berkeley) 5/3/95";
#else
-__RCSID("$NetBSD: bdisp.c,v 1.11 2009/06/04 05:43:29 dholland Exp $");
+__RCSID("$NetBSD: bdisp.c,v 1.12 2009/07/13 19:05:40 roy Exp $");
#endif
#endif /* not lint */
@@ -241,7 +241,7 @@
}
int
-getline(char *buf, int size)
+get_line(char *buf, int size)
{
char *cp, *end;
int c;
Index: src/games/gomoku/gomoku.h
diff -u src/games/gomoku/gomoku.h:1.15 src/games/gomoku/gomoku.h:1.16
--- src/games/gomoku/gomoku.h:1.15 Thu Jun 4 06:47:36 2009
+++ src/games/gomoku/gomoku.h Mon Jul 13 19:05:40 2009
@@ -1,4 +1,4 @@
-/* $NetBSD: gomoku.h,v 1.15 2009/06/04 06:47:36 dholland Exp $ */
+/* $NetBSD: gomoku.h,v 1.16 2009/07/13 19:05:40 roy Exp $ */
/*
* Copyright (c) 1994
@@ -262,7 +262,7 @@
void bdinit(struct spotstr *);
void init_overlap(void);
-int getline(char *, int);
+int get_line(char *, int);
void ask(const char *);
void dislog(const char *);
void bdump(FILE *);
Index: src/games/gomoku/main.c
diff -u src/games/gomoku/main.c:1.18 src/games/gomoku/main.c:1.19
--- src/games/gomoku/main.c:1.18 Thu Jun 4 07:01:16 2009
+++ src/games/gomoku/main.c Mon Jul 13 19:05:40 2009
@@ -1,4 +1,4 @@
-/* $NetBSD: main.c,v 1.18 2009/06/04 07:01:16 dholland Exp $ */
+/* $NetBSD: main.c,v 1.19 2009/07/13 19:05:40 roy Exp $ */
/*
* Copyright (c) 1994
@@ -42,7 +42,7 @@
#if 0
static char sccsid[] = "@(#)main.c 8.4 (Berkeley) 5/4/95";
#else
-__RCSID("$NetBSD: main.c,v 1.18 2009/06/04 07:01:16 dholland Exp $");
+__RCSID("$NetBSD: main.c,v 1.19 2009/07/13 19:05:40 roy Exp $");
#endif
#endif /* not lint */
@@ -153,7 +153,7 @@
if (inputfp == NULL && test == 0) {
for (;;) {
ask("black or white? ");
- getline(buf, sizeof(buf));
+ get_line(buf, sizeof(buf));
if (buf[0] == 'b' || buf[0] == 'B') {
color = BLACK;
break;
@@ -170,7 +170,7 @@
}
} 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)
@@ -240,7 +240,7 @@
getinput:
if (interactive)
ask("move? ");
- if (!getline(buf, sizeof(buf))) {
+ if (!get_line(buf, sizeof(buf))) {
curmove = RESIGN;
break;
}
@@ -252,7 +252,7 @@
FILE *fp;
ask("save file name? ");
- (void)getline(buf, sizeof(buf));
+ (void)get_line(buf, sizeof(buf));
if ((fp = fopen(buf, "w")) == NULL) {
misclog("cannot create save file");
goto getinput;
@@ -304,14 +304,14 @@
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) {
misclog("cannot create save file");
goto replay;
@@ -363,7 +363,7 @@
quit();
top:
ask("cmd? ");
- if (!getline(input, sizeof(input)))
+ if (!get_line(input, sizeof(input)))
quit();
switch (*input) {
case '\0':
Index: src/libexec/ftpd/extern.h
diff -u src/libexec/ftpd/extern.h:1.60 src/libexec/ftpd/extern.h:1.61
--- src/libexec/ftpd/extern.h:1.60 Sun Mar 15 07:48:36 2009
+++ src/libexec/ftpd/extern.h Mon Jul 13 19:05:40 2009
@@ -1,4 +1,4 @@
-/* $NetBSD: extern.h,v 1.60 2009/03/15 07:48:36 lukem Exp $ */
+/* $NetBSD: extern.h,v 1.61 2009/07/13 19:05:40 roy Exp $ */
/*-
* Copyright (c) 1992, 1993
@@ -130,7 +130,7 @@
void format_path(char *, const char *);
int ftpd_pclose(FILE *);
FILE *ftpd_popen(const char *[], const char *, int);
-int getline(char *, int, FILE *);
+int get_line(char *, int, FILE *);
void init_curclass(void);
void logxfer(const char *, off_t, const char *, const char *,
const struct timeval *, const char *);
Index: src/libexec/ftpd/ftpcmd.y
diff -u src/libexec/ftpd/ftpcmd.y:1.89 src/libexec/ftpd/ftpcmd.y:1.90
--- src/libexec/ftpd/ftpcmd.y:1.89 Sun Mar 15 07:48:36 2009
+++ src/libexec/ftpd/ftpcmd.y Mon Jul 13 19:05:40 2009
@@ -1,4 +1,4 @@
-/* $NetBSD: ftpcmd.y,v 1.89 2009/03/15 07:48:36 lukem Exp $ */
+/* $NetBSD: ftpcmd.y,v 1.90 2009/07/13 19:05:40 roy Exp $ */
/*-
* Copyright (c) 1997-2009 The NetBSD Foundation, Inc.
@@ -72,7 +72,7 @@
#if 0
static char sccsid[] = "@(#)ftpcmd.y 8.3 (Berkeley) 4/6/94";
#else
-__RCSID("$NetBSD: ftpcmd.y,v 1.89 2009/03/15 07:48:36 lukem Exp $");
+__RCSID("$NetBSD: ftpcmd.y,v 1.90 2009/07/13 19:05:40 roy Exp $");
#endif
#endif /* not lint */
@@ -1356,14 +1356,14 @@
#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.
* `s' is the buffer to read into.
* `n' is the 1 less than the size of the buffer, to allow trailing NUL
* `iop' is the FILE to read from.
* Returns 0 on success, -1 on EOF, -2 if the command was too long.
*/
int
-getline(char *s, int n, FILE *iop)
+get_line(char *s, int n, FILE *iop)
{
int c;
char *cs;
@@ -1474,7 +1474,7 @@
while (1) {
(void) alarm(curclass.timeout);
- ret = getline(cbuf, sizeof(cbuf)-1, stdin);
+ ret = get_line(cbuf, sizeof(cbuf)-1, stdin);
(void) alarm(0);
if (ret == -1) {
reply(221, "You could at least say goodbye.");
Index: src/libexec/ftpd/ftpd.c
diff -u src/libexec/ftpd/ftpd.c:1.193 src/libexec/ftpd/ftpd.c:1.194
--- src/libexec/ftpd/ftpd.c:1.193 Sun Mar 15 07:48:36 2009
+++ src/libexec/ftpd/ftpd.c Mon Jul 13 19:05:40 2009
@@ -1,4 +1,4 @@
-/* $NetBSD: ftpd.c,v 1.193 2009/03/15 07:48:36 lukem Exp $ */
+/* $NetBSD: ftpd.c,v 1.194 2009/07/13 19:05:40 roy Exp $ */
/*
* Copyright (c) 1997-2009 The NetBSD Foundation, Inc.
@@ -97,7 +97,7 @@
#if 0
static char sccsid[] = "@(#)ftpd.c 8.5 (Berkeley) 4/28/95";
#else
-__RCSID("$NetBSD: ftpd.c,v 1.193 2009/03/15 07:48:36 lukem Exp $");
+__RCSID("$NetBSD: ftpd.c,v 1.194 2009/07/13 19:05:40 roy Exp $");
#endif
#endif /* not lint */
@@ -2949,7 +2949,7 @@
if (!transflag)
return (0);
cp = tmpline;
- ret = getline(cp, sizeof(tmpline)-1, stdin);
+ ret = get_line(cp, sizeof(tmpline)-1, stdin);
if (ret == -1) {
reply(221, "You could at least say goodbye.");
dologout(0);
@@ -3803,7 +3803,7 @@
reply(331, "User %s accepted, provide %s.",
cred->uname, pbuf);
(void) alarm(curclass.timeout);
- ret = getline(pbuf, sizeof(pbuf)-1, stdin);
+ ret = get_line(pbuf, sizeof(pbuf)-1, stdin);
(void) alarm(0);
if (ret == -1) {
reply(221, "You could at least say goodbye.");
Index: src/usr.bin/csplit/csplit.c
diff -u src/usr.bin/csplit/csplit.c:1.4 src/usr.bin/csplit/csplit.c:1.5
--- src/usr.bin/csplit/csplit.c:1.4 Sat Dec 15 19:44:49 2007
+++ src/usr.bin/csplit/csplit.c Mon Jul 13 19:05:40 2009
@@ -1,4 +1,4 @@
-/* $NetBSD: csplit.c,v 1.4 2007/12/15 19:44:49 perry Exp $ */
+/* $NetBSD: csplit.c,v 1.5 2009/07/13 19:05:40 roy Exp $ */
/* $FreeBSD: src/usr.bin/csplit/csplit.c,v 1.9 2004/03/22 11:15:03 tjr Exp$ */
/*-
@@ -47,7 +47,7 @@
#include <sys/cdefs.h>
#ifndef lint
-__RCSID("$NetBSD: csplit.c,v 1.4 2007/12/15 19:44:49 perry Exp $");
+__RCSID("$NetBSD: csplit.c,v 1.5 2009/07/13 19:05:40 roy Exp $");
#endif
#include <sys/types.h>
@@ -69,7 +69,7 @@
static void cleanup(void);
static void do_lineno(const char *);
static void do_rexp(const char *);
-static char *getline(void);
+static char *get_line(void);
static void handlesig(int);
static FILE *newfile(void);
static void toomuch(FILE *, long);
@@ -201,7 +201,7 @@
/* 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)
(void)printf("%jd\n", (intmax_t)ftello(ofp));
@@ -281,7 +281,7 @@
/* Read a line from the input into a static buffer. */
static char *
-getline(void)
+get_line(void)
{
static char lbuf[LINE_MAX];
FILE *src;
@@ -302,7 +302,7 @@
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. */
static void
toomuch(FILE *ofp, long n)
{
@@ -354,7 +354,7 @@
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;
@@ -402,7 +402,7 @@
/* 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)
@@ -428,7 +428,7 @@
* Positive offset: copy the requested number of lines
* after the match.
*/
- while (--ofs > 0 && (p = getline()) != NULL)
+ while (--ofs > 0 && (p = get_line()) != NULL)
if (fputs(p, ofp) != 0)
break;
toomuch(NULL, 0L);
@@ -463,7 +463,7 @@
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;
Index: src/usr.bin/ctags/C.c
diff -u src/usr.bin/ctags/C.c:1.18 src/usr.bin/ctags/C.c:1.19
--- src/usr.bin/ctags/C.c:1.18 Sat Apr 11 12:58:03 2009
+++ src/usr.bin/ctags/C.c Mon Jul 13 19:05:40 2009
@@ -1,4 +1,4 @@
-/* $NetBSD: C.c,v 1.18 2009/04/11 12:58:03 lukem Exp $ */
+/* $NetBSD: C.c,v 1.19 2009/07/13 19:05:40 roy Exp $ */
/*
* Copyright (c) 1987, 1993, 1994
@@ -38,7 +38,7 @@
#if 0
static char sccsid[] = "@(#)C.c 8.4 (Berkeley) 4/2/94";
#else
-__RCSID("$NetBSD: C.c,v 1.18 2009/04/11 12:58:03 lukem Exp $");
+__RCSID("$NetBSD: C.c,v 1.19 2009/07/13 19:05:40 roy Exp $");
#endif
#endif /* not lint */
@@ -167,7 +167,7 @@
* foo\n
* (arg1,
*/
- getline();
+ get_line();
curline = lineno;
if (func_entry()) {
++level;
@@ -196,7 +196,7 @@
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 @@
* get line immediately;
* may change before '{'
*/
- getline();
+ get_line();
if (str_entry(c))
++level;
break;
@@ -405,7 +405,7 @@
--sp;
*sp = EOS;
if (dflag || c == '(') { /* only want macros */
- getline();
+ get_line();
pfnote(tok, curline);
}
skip: if (c == '\n') { /* get rid of rest of define */
Index: src/usr.bin/ctags/ctags.h
diff -u src/usr.bin/ctags/ctags.h:1.8 src/usr.bin/ctags/ctags.h:1.9
--- src/usr.bin/ctags/ctags.h:1.8 Thu Feb 17 17:29:58 2005
+++ src/usr.bin/ctags/ctags.h Mon Jul 13 19:05:40 2009
@@ -1,4 +1,4 @@
-/* $NetBSD: ctags.h,v 1.8 2005/02/17 17:29:58 xtraeme Exp $ */
+/* $NetBSD: ctags.h,v 1.9 2009/07/13 19:05:40 roy Exp $ */
/*
* Copyright (c) 1987, 1993, 1994
@@ -80,7 +80,7 @@
extern char searchar; /* ex search character */
extern int cicmp(const char *);
-extern void getline(void);
+extern void get_line(void);
extern void pfnote(const char *, int);
extern int skip_key(int);
extern void put_entries(NODE *);
Index: src/usr.bin/ctags/fortran.c
diff -u src/usr.bin/ctags/fortran.c:1.10 src/usr.bin/ctags/fortran.c:1.11
--- src/usr.bin/ctags/fortran.c:1.10 Thu Feb 17 17:29:58 2005
+++ src/usr.bin/ctags/fortran.c Mon Jul 13 19:05:40 2009
@@ -1,4 +1,4 @@
-/* $NetBSD: fortran.c,v 1.10 2005/02/17 17:29:58 xtraeme Exp $ */
+/* $NetBSD: fortran.c,v 1.11 2009/07/13 19:05:40 roy Exp $ */
/*
* Copyright (c) 1987, 1993, 1994
@@ -38,7 +38,7 @@
#if 0
static char sccsid[] = "@(#)fortran.c 8.3 (Berkeley) 4/2/94";
#else
-__RCSID("$NetBSD: fortran.c,v 1.10 2005/02/17 17:29:58 xtraeme Exp $");
+__RCSID("$NetBSD: fortran.c,v 1.11 2009/07/13 19:05:40 roy Exp $");
#endif
#endif /* not lint */
@@ -130,7 +130,7 @@
continue;
*cp = EOS;
(void)strlcpy(tok, lbp, sizeof(tok));
- getline(); /* process line for ex(1) */
+ get_line(); /* process line for ex(1) */
pfnote(tok, lineno);
pfcnt = YES;
}
Index: src/usr.bin/ctags/lisp.c
diff -u src/usr.bin/ctags/lisp.c:1.10 src/usr.bin/ctags/lisp.c:1.11
--- src/usr.bin/ctags/lisp.c:1.10 Thu Feb 17 17:29:58 2005
+++ src/usr.bin/ctags/lisp.c Mon Jul 13 19:05:40 2009
@@ -1,4 +1,4 @@
-/* $NetBSD: lisp.c,v 1.10 2005/02/17 17:29:58 xtraeme Exp $ */
+/* $NetBSD: lisp.c,v 1.11 2009/07/13 19:05:40 roy Exp $ */
/*
* Copyright (c) 1987, 1993, 1994
@@ -38,7 +38,7 @@
#if 0
static char sccsid[] = "@(#)lisp.c 8.3 (Berkeley) 4/2/94";
#else
-__RCSID("$NetBSD: lisp.c,v 1.10 2005/02/17 17:29:58 xtraeme Exp $");
+__RCSID("$NetBSD: lisp.c,v 1.11 2009/07/13 19:05:40 roy Exp $");
#endif
#endif /* not lint */
@@ -105,7 +105,7 @@
*cp = EOS;
(void)strlcpy(tok, lbp, sizeof(tok));
*cp = savedc;
- getline();
+ get_line();
pfnote(tok, lineno);
}
/*NOTREACHED*/
Index: src/usr.bin/ctags/print.c
diff -u src/usr.bin/ctags/print.c:1.9 src/usr.bin/ctags/print.c:1.10
--- src/usr.bin/ctags/print.c:1.9 Thu Feb 17 17:29:58 2005
+++ src/usr.bin/ctags/print.c Mon Jul 13 19:05:40 2009
@@ -1,4 +1,4 @@
-/* $NetBSD: print.c,v 1.9 2005/02/17 17:29:58 xtraeme Exp $ */
+/* $NetBSD: print.c,v 1.10 2009/07/13 19:05:40 roy Exp $ */
/*
* Copyright (c) 1987, 1993, 1994
@@ -38,7 +38,7 @@
#if 0
static char sccsid[] = "@(#)print.c 8.3 (Berkeley) 4/2/94";
#else
-__RCSID("$NetBSD: print.c,v 1.9 2005/02/17 17:29:58 xtraeme Exp $");
+__RCSID("$NetBSD: print.c,v 1.10 2009/07/13 19:05:40 roy Exp $");
#endif
#endif /* not lint */
@@ -51,12 +51,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;
Index: src/usr.bin/ctags/yacc.c
diff -u src/usr.bin/ctags/yacc.c:1.11 src/usr.bin/ctags/yacc.c:1.12
--- src/usr.bin/ctags/yacc.c:1.11 Wed Apr 5 20:03:14 2006
+++ src/usr.bin/ctags/yacc.c Mon Jul 13 19:05:40 2009
@@ -1,4 +1,4 @@
-/* $NetBSD: yacc.c,v 1.11 2006/04/05 20:03:14 dsl Exp $ */
+/* $NetBSD: yacc.c,v 1.12 2009/07/13 19:05:40 roy Exp $ */
/*
* Copyright (c) 1987, 1993, 1994
@@ -38,7 +38,7 @@
#if 0
static char sccsid[] = "@(#)yacc.c 8.3 (Berkeley) 4/2/94";
#else
-__RCSID("$NetBSD: yacc.c,v 1.11 2006/04/05 20:03:14 dsl Exp $");
+__RCSID("$NetBSD: yacc.c,v 1.12 2009/07/13 19:05:40 roy Exp $");
#endif
#endif /* not lint */
@@ -105,7 +105,7 @@
while (GETC(!=, EOF) && (intoken(c) || c == '.'))
*sp++ = c;
*sp = EOS;
- getline(); /* may change before ':' */
+ get_line(); /* may change before ':' */
if (c == EOF)
return;
while (iswhite(c)) {
Index: src/usr.bin/fsplit/fsplit.c
diff -u src/usr.bin/fsplit/fsplit.c:1.26 src/usr.bin/fsplit/fsplit.c:1.27
--- src/usr.bin/fsplit/fsplit.c:1.26 Sun Nov 23 09:13:20 2008
+++ src/usr.bin/fsplit/fsplit.c Mon Jul 13 19:05:40 2009
@@ -40,7 +40,7 @@
#if 0
static char sccsid[] = "from: @(#)fsplit.c 8.1 (Berkeley) 6/6/93";
#else
-__RCSID("$NetBSD: fsplit.c,v 1.26 2008/11/23 09:13:20 dholland Exp $");
+__RCSID("$NetBSD: fsplit.c,v 1.27 2009/07/13 19:05:40 roy Exp $");
#endif
#endif /* not lint */
@@ -91,7 +91,7 @@
static void badparms(void);
static const char *functs(const char *);
-static int getline(void);
+static int get_line(void);
static void get_name(char *, int);
static int lend(void);
static int lname(char *, size_t);
@@ -158,7 +158,7 @@
}
nflag = 0;
rv = 0;
- while (getline() > 0) {
+ while (get_line() > 0) {
rv = 1;
fprintf(ofp, "%s", buf);
/* look for an 'end' statement */
@@ -269,7 +269,7 @@
}
static int
-getline(void)
+get_line(void)
{
char *ptr;
Index: src/usr.bin/ftp/cmds.c
diff -u src/usr.bin/ftp/cmds.c:1.129 src/usr.bin/ftp/cmds.c:1.130
--- src/usr.bin/ftp/cmds.c:1.129 Sun Apr 12 10:18:52 2009
+++ src/usr.bin/ftp/cmds.c Mon Jul 13 19:05:41 2009
@@ -1,4 +1,4 @@
-/* $NetBSD: cmds.c,v 1.129 2009/04/12 10:18:52 lukem Exp $ */
+/* $NetBSD: cmds.c,v 1.130 2009/07/13 19:05:41 roy Exp $ */
/*-
* Copyright (c) 1996-2009 The NetBSD Foundation, Inc.
@@ -96,7 +96,7 @@
#if 0
static char sccsid[] = "@(#)cmds.c 8.6 (Berkeley) 10/9/94";
#else
-__RCSID("$NetBSD: cmds.c,v 1.129 2009/04/12 10:18:52 lukem Exp $");
+__RCSID("$NetBSD: cmds.c,v 1.130 2009/07/13 19:05:41 roy Exp $");
#endif
#endif /* not lint */
@@ -174,7 +174,7 @@
while (1) {
fprintf(ttyout, "%s %s [anpqy?]? ", promptleft, promptright);
(void)fflush(ttyout);
- if (getline(stdin, cline, sizeof(cline), &errormsg) < 0) {
+ if (get_line(stdin, cline, sizeof(cline), &errormsg) < 0) {
mflag = 0;
fprintf(ttyout, "%s; %s aborted\n", errormsg, cmd);
return (0);
@@ -769,7 +769,7 @@
argv[0] = cmdbuf;
gmode = restart_point ? "r+" : "w";
- while (getline(fp, buf, sizeof(buf), NULL) >= 0) {
+ while (get_line(fp, buf, sizeof(buf), NULL) >= 0) {
if (buf[0] == '\0')
continue;
argv[1] = buf;
Index: src/usr.bin/ftp/extern.h
diff -u src/usr.bin/ftp/extern.h:1.76 src/usr.bin/ftp/extern.h:1.77
--- src/usr.bin/ftp/extern.h:1.76 Sun Apr 12 10:18:52 2009
+++ src/usr.bin/ftp/extern.h Mon Jul 13 19:05:41 2009
@@ -1,4 +1,4 @@
-/* $NetBSD: extern.h,v 1.76 2009/04/12 10:18:52 lukem Exp $ */
+/* $NetBSD: extern.h,v 1.77 2009/07/13 19:05:41 roy Exp $ */
/*-
* Copyright (c) 1996-2009 The NetBSD Foundation, Inc.
@@ -134,7 +134,7 @@
void get(int, char **);
struct cmd *getcmd(const char *);
int getit(int, char **, int, const char *);
-int getline(FILE *, char *, size_t, const char **);
+int get_line(FILE *, char *, size_t, const char **);
struct option *getoption(const char *);
char *getoptionvalue(const char *);
void getremoteinfo(void);
Index: src/usr.bin/ftp/fetch.c
diff -u src/usr.bin/ftp/fetch.c:1.187 src/usr.bin/ftp/fetch.c:1.188
--- src/usr.bin/ftp/fetch.c:1.187 Sun Apr 12 10:18:52 2009
+++ src/usr.bin/ftp/fetch.c Mon Jul 13 19:05:41 2009
@@ -1,4 +1,4 @@
-/* $NetBSD: fetch.c,v 1.187 2009/04/12 10:18:52 lukem Exp $ */
+/* $NetBSD: fetch.c,v 1.188 2009/07/13 19:05:41 roy Exp $ */
/*-
* Copyright (c) 1997-2009 The NetBSD Foundation, Inc.
@@ -34,7 +34,7 @@
#include <sys/cdefs.h>
#ifndef lint
-__RCSID("$NetBSD: fetch.c,v 1.187 2009/04/12 10:18:52 lukem Exp $");
+__RCSID("$NetBSD: fetch.c,v 1.188 2009/07/13 19:05:41 roy Exp $");
#endif /* not lint */
/*
@@ -186,7 +186,7 @@
fprintf(ttyout, "%s\n", uuser);
} else {
(void)fflush(ttyout);
- if (getline(stdin, uuser, sizeof(uuser), &errormsg) < 0) {
+ if (get_line(stdin, uuser, sizeof(uuser), &errormsg) < 0) {
warnx("%s; can't authenticate", errormsg);
goto cleanup_auth_url;
}
@@ -834,7 +834,7 @@
}
/* Read the response */
- len = getline(fin, buf, sizeof(buf), &errormsg);
+ len = get_line(fin, buf, sizeof(buf), &errormsg);
if (len < 0) {
if (*errormsg == '\n')
errormsg++;
@@ -858,7 +858,7 @@
/* Read the rest of the header. */
while (1) {
- len = getline(fin, buf, sizeof(buf), &errormsg);
+ len = get_line(fin, buf, sizeof(buf), &errormsg);
if (len < 0) {
if (*errormsg == '\n')
errormsg++;
@@ -1063,7 +1063,7 @@
fprintf(ttyout,
"Authorization failed. Retry (y/n)? ");
- if (getline(stdin, reply, sizeof(reply), NULL)
+ if (get_line(stdin, reply, sizeof(reply), NULL)
< 0) {
goto cleanup_fetch_url;
}
Index: src/usr.bin/ftp/main.c
diff -u src/usr.bin/ftp/main.c:1.116 src/usr.bin/ftp/main.c:1.117
--- src/usr.bin/ftp/main.c:1.116 Fri Apr 24 08:57:26 2009
+++ src/usr.bin/ftp/main.c Mon Jul 13 19:05:41 2009
@@ -1,4 +1,4 @@
-/* $NetBSD: main.c,v 1.116 2009/04/24 08:57:26 lukem Exp $ */
+/* $NetBSD: main.c,v 1.117 2009/07/13 19:05:41 roy Exp $ */
/*-
* Copyright (c) 1996-2009 The NetBSD Foundation, Inc.
@@ -98,7 +98,7 @@
#if 0
static char sccsid[] = "@(#)main.c 8.6 (Berkeley) 10/9/94";
#else
-__RCSID("$NetBSD: main.c,v 1.116 2009/04/24 08:57:26 lukem Exp $");
+__RCSID("$NetBSD: main.c,v 1.117 2009/07/13 19:05:41 roy Exp $");
#endif
#endif /* not lint */
@@ -673,7 +673,7 @@
fprintf(ttyout, "%s ", p);
}
(void)fflush(ttyout);
- len = getline(stdin, line, sizeof(line), NULL);
+ len = get_line(stdin, line, sizeof(line), NULL);
switch (len) {
case -1: /* EOF */
case -2: /* error */
Index: src/usr.bin/ftp/util.c
diff -u src/usr.bin/ftp/util.c:1.151 src/usr.bin/ftp/util.c:1.152
--- src/usr.bin/ftp/util.c:1.151 Wed Apr 15 04:19:39 2009
+++ src/usr.bin/ftp/util.c Mon Jul 13 19:05:41 2009
@@ -1,4 +1,4 @@
-/* $NetBSD: util.c,v 1.151 2009/04/15 04:19:39 jld Exp $ */
+/* $NetBSD: util.c,v 1.152 2009/07/13 19:05:41 roy Exp $ */
/*-
* Copyright (c) 1997-2009 The NetBSD Foundation, Inc.
@@ -64,7 +64,7 @@
#include <sys/cdefs.h>
#ifndef lint
-__RCSID("$NetBSD: util.c,v 1.151 2009/04/15 04:19:39 jld Exp $");
+__RCSID("$NetBSD: util.c,v 1.152 2009/07/13 19:05:41 roy Exp $");
#endif /* not lint */
/*
@@ -408,7 +408,7 @@
else
fprintf(ttyout, "Name (%s): ", host);
errormsg = NULL;
- nlen = getline(stdin, tmp, sizeof(tmp), &errormsg);
+ nlen = get_line(stdin, tmp, sizeof(tmp), &errormsg);
if (nlen < 0) {
fprintf(ttyout, "%s; %s aborted.\n", errormsg, "login");
code = -1;
@@ -516,7 +516,7 @@
fprintf(ttyout, "(%s) ", aprompt);
line[len++] = ' ';
errormsg = NULL;
- nlen = getline(stdin, line + len, sizeof(line)-len, &errormsg);
+ nlen = get_line(stdin, line + len, sizeof(line)-len, &errormsg);
if (nlen < 0) {
fprintf(ttyout, "%s; %s aborted.\n", errormsg, "operation");
intr(0);
@@ -1248,7 +1248,7 @@
* -3 line was too long
*/
int
-getline(FILE *stream, char *buf, size_t buflen, const char **errormsg)
+get_line(FILE *stream, char *buf, size_t buflen, const char **errormsg)
{
int rv, ch;
size_t len;
Index: src/usr.bin/gencat/gencat.c
diff -u src/usr.bin/gencat/gencat.c:1.29 src/usr.bin/gencat/gencat.c:1.30
--- src/usr.bin/gencat/gencat.c:1.29 Thu Apr 16 13:52:52 2009
+++ src/usr.bin/gencat/gencat.c Mon Jul 13 19:05:41 2009
@@ -1,4 +1,4 @@
-/* $NetBSD: gencat.c,v 1.29 2009/04/16 13:52:52 tron Exp $ */
+/* $NetBSD: gencat.c,v 1.30 2009/07/13 19:05:41 roy Exp $ */
/*
* Copyright (c) 1996 The NetBSD Foundation, Inc.
@@ -31,7 +31,7 @@
#include <sys/cdefs.h>
#if defined(__RCSID) && !defined(lint)
-__RCSID("$NetBSD: gencat.c,v 1.29 2009/04/16 13:52:52 tron Exp $");
+__RCSID("$NetBSD: gencat.c,v 1.30 2009/07/13 19:05:41 roy Exp $");
#endif
/***********************************************************
@@ -117,7 +117,7 @@
static char *cskip(char *);
static void error(const char *);
-static char *getline(int);
+static char *get_line(int);
static char *getmsg(int, char *, char);
static void warning(const char *, const char *);
static char *wskip(char *);
@@ -275,7 +275,7 @@
}
static char *
-getline(int fd)
+get_line(int fd)
{
static long curlen = BUFSIZ;
static char buf[BUFSIZ], *bptr = buf, *bend = buf;
@@ -378,7 +378,7 @@
++cptr;
switch (*cptr) {
case '\0':
- cptr = getline(fd);
+ cptr = get_line(fd);
if (!cptr)
error("premature end of file");
msglen += strlen(cptr);
@@ -452,7 +452,7 @@
/* XXX: init sethead? */
- while ((cptr = getline(fd))) {
+ while ((cptr = get_line(fd))) {
if (*cptr == '$') {
++cptr;
if (strncmp(cptr, "set", 3) == 0) {
Index: src/usr.bin/rs/rs.c
diff -u src/usr.bin/rs/rs.c:1.13 src/usr.bin/rs/rs.c:1.14
--- src/usr.bin/rs/rs.c:1.13 Mon Apr 13 07:06:53 2009
+++ src/usr.bin/rs/rs.c Mon Jul 13 19:05:41 2009
@@ -1,4 +1,4 @@
-/* $NetBSD: rs.c,v 1.13 2009/04/13 07:06:53 lukem Exp $ */
+/* $NetBSD: rs.c,v 1.14 2009/07/13 19:05:41 roy Exp $ */
/*-
* Copyright (c) 1993
@@ -39,7 +39,7 @@
#if 0
static char sccsid[] = "@(#)rs.c 8.1 (Berkeley) 6/6/93";
#else
-__RCSID("$NetBSD: rs.c,v 1.13 2009/04/13 07:06:53 lukem Exp $");
+__RCSID("$NetBSD: rs.c,v 1.14 2009/07/13 19:05:41 roy Exp $");
#endif
#endif /* not lint */
@@ -97,7 +97,7 @@
__attribute__((__format__(__printf__, 1, 2)));
void getargs __P((int, char *[]));
void getfile __P((void));
-int getline __P((void));
+int get_line __P((void));
char *getlist __P((short **, char *));
char *getnum __P((int *, char *, int));
char **getptrs __P((char **));
@@ -139,11 +139,11 @@
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)
@@ -189,7 +189,7 @@
INCR(ep);
}
}
- } while (getline() != EOF);
+ } while (get_line() != EOF);
*ep = 0; /* mark end of pointers */
nelem = ep - elem;
}
@@ -346,7 +346,7 @@
char ibuf[BSIZE]; /* two screenfuls should do */
int
-getline() /* get line; maintain curline, curlen; manage storage */
+get_line() /* get line; maintain curline, curlen; manage storage */
{
static int putlength;
static char *endblock = ibuf + BSIZE;
Index: src/usr.bin/unifdef/unifdef.c
diff -u src/usr.bin/unifdef/unifdef.c:1.14 src/usr.bin/unifdef/unifdef.c:1.15
--- src/usr.bin/unifdef/unifdef.c:1.14 Thu Jun 11 03:16:34 2009
+++ src/usr.bin/unifdef/unifdef.c Mon Jul 13 19:05:41 2009
@@ -1,4 +1,4 @@
-/* $NetBSD: unifdef.c,v 1.14 2009/06/11 03:16:34 ginsbach Exp $ */
+/* $NetBSD: unifdef.c,v 1.15 2009/07/13 19:05:41 roy Exp $ */
/*
* Copyright (c) 1985, 1993
@@ -77,7 +77,7 @@
#endif
#ifdef __IDSTRING
__IDSTRING(Berkeley, "@(#)unifdef.c 8.1 (Berkeley) 6/6/93");
-__IDSTRING(NetBSD, "$NetBSD: unifdef.c,v 1.14 2009/06/11 03:16:34 ginsbach Exp $");
+__IDSTRING(NetBSD, "$NetBSD: unifdef.c,v 1.15 2009/07/13 19:05:41 roy Exp $");
__IDSTRING(dotat, "$dotat: things/unifdef.c,v 1.161 2003/07/01 15:32:48 fanf2 Exp $");
#endif
#endif /* not lint */
@@ -246,7 +246,7 @@
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);
@@ -572,7 +572,7 @@
for (;;) {
linenum++;
- lineval = getline();
+ lineval = get_line();
trans_table[ifstate[depth]][lineval]();
debug("process %s -> %s depth %d",
linetype_name[lineval],
@@ -586,7 +586,7 @@
* help from skipcomment().
*/
static Linetype
-getline(void)
+get_line(void)
{
const char *cp;
int cursym;
Index: src/usr.sbin/inetd/inetd.c
diff -u src/usr.sbin/inetd/inetd.c:1.112 src/usr.sbin/inetd/inetd.c:1.113
--- src/usr.sbin/inetd/inetd.c:1.112 Sat May 23 03:24:51 2009
+++ src/usr.sbin/inetd/inetd.c Mon Jul 13 19:05:41 2009
@@ -1,4 +1,4 @@
-/* $NetBSD: inetd.c,v 1.112 2009/05/23 03:24:51 christos Exp $ */
+/* $NetBSD: inetd.c,v 1.113 2009/07/13 19:05:41 roy Exp $ */
/*-
* Copyright (c) 1998, 2003 The NetBSD Foundation, Inc.
@@ -66,7 +66,7 @@
#if 0
static char sccsid[] = "@(#)inetd.c 8.4 (Berkeley) 4/13/94";
#else
-__RCSID("$NetBSD: inetd.c,v 1.112 2009/05/23 03:24:51 christos Exp $");
+__RCSID("$NetBSD: inetd.c,v 1.113 2009/07/13 19:05:41 roy Exp $");
#endif
#endif /* not lint */
@@ -381,7 +381,7 @@
static int my_kevent(const struct kevent *, size_t, struct kevent *,
size_t);
static struct kevent * allocchange(void);
-static int getline(int, char *, int);
+static int get_line(int, char *, int);
static void spawn(struct servtab *, int);
#ifdef MULOG
static void dolog(struct servtab *, int);
@@ -2165,7 +2165,7 @@
*/
static int /* # of characters upto \r,\n or \0 */
-getline(int fd, char *buf, int len)
+get_line(int fd, char *buf, int len)
{
int count = 0;
ssize_t n;
@@ -2197,7 +2197,7 @@
int len;
/* Get requested service name */
- if ((len = getline(ctrl, service, MAX_SERV_LEN)) < 0) {
+ if ((len = get_line(ctrl, service, MAX_SERV_LEN)) < 0) {
strwrite(ctrl, "-Error reading service name\r\n");
goto reject;
}
Index: src/usr.sbin/lpr/common_source/common.c
diff -u src/usr.sbin/lpr/common_source/common.c:1.39 src/usr.sbin/lpr/common_source/common.c:1.40
--- src/usr.sbin/lpr/common_source/common.c:1.39 Sun Jan 18 09:57:26 2009
+++ src/usr.sbin/lpr/common_source/common.c Mon Jul 13 19:05:41 2009
@@ -1,4 +1,4 @@
-/* $NetBSD: common.c,v 1.39 2009/01/18 09:57:26 lukem Exp $ */
+/* $NetBSD: common.c,v 1.40 2009/07/13 19:05:41 roy Exp $ */
/*
* Copyright (c) 1983, 1993
@@ -39,7 +39,7 @@
#if 0
static char sccsid[] = "@(#)common.c 8.5 (Berkeley) 4/28/95";
#else
-__RCSID("$NetBSD: common.c,v 1.39 2009/01/18 09:57:26 lukem Exp $");
+__RCSID("$NetBSD: common.c,v 1.40 2009/07/13 19:05:41 roy Exp $");
#endif
#endif /* not lint */
@@ -204,7 +204,7 @@
* Returns 0 at EOF or the number of characters read.
*/
size_t
-getline(FILE *cfp)
+get_line(FILE *cfp)
{
size_t linel = 0;
int c;
Index: src/usr.sbin/lpr/common_source/displayq.c
diff -u src/usr.sbin/lpr/common_source/displayq.c:1.33 src/usr.sbin/lpr/common_source/displayq.c:1.34
--- src/usr.sbin/lpr/common_source/displayq.c:1.33 Sun Jan 18 09:57:26 2009
+++ src/usr.sbin/lpr/common_source/displayq.c Mon Jul 13 19:05:41 2009
@@ -1,4 +1,4 @@
-/* $NetBSD: displayq.c,v 1.33 2009/01/18 09:57:26 lukem Exp $ */
+/* $NetBSD: displayq.c,v 1.34 2009/07/13 19:05:41 roy Exp $ */
/*
* Copyright (c) 1983, 1993
@@ -34,7 +34,7 @@
#if 0
static char sccsid[] = "@(#)displayq.c 8.4 (Berkeley) 4/28/95";
#else
-__RCSID("$NetBSD: displayq.c,v 1.33 2009/01/18 09:57:26 lukem Exp $");
+__RCSID("$NetBSD: displayq.c,v 1.34 2009/07/13 19:05:41 roy Exp $");
#endif
#endif /* not lint */
@@ -315,7 +315,7 @@
if (remote || garbage || strcmp(cf, current))
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)) {
Index: src/usr.sbin/lpr/common_source/lp.h
diff -u src/usr.sbin/lpr/common_source/lp.h:1.23 src/usr.sbin/lpr/common_source/lp.h:1.24
--- src/usr.sbin/lpr/common_source/lp.h:1.23 Sun Jan 18 09:57:26 2009
+++ src/usr.sbin/lpr/common_source/lp.h Mon Jul 13 19:05:41 2009
@@ -1,4 +1,4 @@
-/* $NetBSD: lp.h,v 1.23 2009/01/18 09:57:26 lukem Exp $ */
+/* $NetBSD: lp.h,v 1.24 2009/07/13 19:05:41 roy Exp $ */
/*
* Copyright (c) 1983, 1993
@@ -107,7 +107,7 @@
void dump(const char *, const char *, int);
void fatal(const char *, ...)
__attribute__((__format__(__printf__, 1, 2)));
-size_t getline(FILE *);
+size_t get_line(FILE *);
const char *gethost(const char *);
int getport(const char *);
int getq(struct queue *(*[]));
Index: src/usr.sbin/lpr/common_source/rmjob.c
diff -u src/usr.sbin/lpr/common_source/rmjob.c:1.24 src/usr.sbin/lpr/common_source/rmjob.c:1.25
--- src/usr.sbin/lpr/common_source/rmjob.c:1.24 Sun Jan 18 09:57:26 2009
+++ src/usr.sbin/lpr/common_source/rmjob.c Mon Jul 13 19:05:41 2009
@@ -1,4 +1,4 @@
-/* $NetBSD: rmjob.c,v 1.24 2009/01/18 09:57:26 lukem Exp $ */
+/* $NetBSD: rmjob.c,v 1.25 2009/07/13 19:05:41 roy Exp $ */
/*
* Copyright (c) 1983, 1993
@@ -34,7 +34,7 @@
#if 0
static char sccsid[] = "@(#)rmjob.c 8.2 (Berkeley) 4/28/95";
#else
-__RCSID("$NetBSD: rmjob.c,v 1.24 2009/01/18 09:57:26 lukem Exp $");
+__RCSID("$NetBSD: rmjob.c,v 1.25 2009/07/13 19:05:41 roy Exp $");
#endif
#endif /* not lint */
@@ -157,7 +157,7 @@
return(0);
}
seteuid(uid);
- if (!getline(fp)) {
+ if (!get_line(fp)) {
(void)fclose(fp);
return(0); /* no daemon present */
}
@@ -192,7 +192,7 @@
if ((cfp = fopen(file, "r")) == NULL)
fatal("cannot open %s", file);
seteuid(uid);
- while (getline(cfp)) {
+ while (get_line(cfp)) {
switch (line[0]) {
case 'U': /* unlink associated files */
if (strchr(line+1, '/') || strncmp(line+1, "df", 2))
@@ -244,7 +244,7 @@
if ((cfp = fopen(file, "r")) == NULL)
return(0);
seteuid(uid);
- while (getline(cfp)) {
+ while (get_line(cfp)) {
if (line[0] == 'P')
break;
}
Index: src/usr.sbin/lpr/lpc/cmds.c
diff -u src/usr.sbin/lpr/lpc/cmds.c:1.21 src/usr.sbin/lpr/lpc/cmds.c:1.22
--- src/usr.sbin/lpr/lpc/cmds.c:1.21 Sun Jan 18 09:57:26 2009
+++ src/usr.sbin/lpr/lpc/cmds.c Mon Jul 13 19:05:41 2009
@@ -1,4 +1,4 @@
-/* $NetBSD: cmds.c,v 1.21 2009/01/18 09:57:26 lukem Exp $ */
+/* $NetBSD: cmds.c,v 1.22 2009/07/13 19:05:41 roy Exp $ */
/*
* Copyright (c) 1983, 1993
* The Regents of the University of California. All rights reserved.
@@ -36,7 +36,7 @@
#if 0
static char sccsid[] = "@(#)cmds.c 8.2 (Berkeley) 4/28/95";
#else
-__RCSID("$NetBSD: cmds.c,v 1.21 2009/01/18 09:57:26 lukem Exp $");
+__RCSID("$NetBSD: cmds.c,v 1.22 2009/07/13 19:05:41 roy Exp $");
#endif
#endif /* not lint */
@@ -162,7 +162,7 @@
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;
@@ -992,7 +992,7 @@
seteuid(uid);
if (fp == NULL)
continue;
- while (getline(fp) > 0)
+ while (get_line(fp) > 0)
if (line[0] == 'P')
break;
(void)fclose(fp);
Index: src/usr.sbin/lpr/lpd/printjob.c
diff -u src/usr.sbin/lpr/lpd/printjob.c:1.54 src/usr.sbin/lpr/lpd/printjob.c:1.55
--- src/usr.sbin/lpr/lpd/printjob.c:1.54 Mon Jul 21 13:36:58 2008
+++ src/usr.sbin/lpr/lpd/printjob.c Mon Jul 13 19:05:42 2009
@@ -1,4 +1,4 @@
-/* $NetBSD: printjob.c,v 1.54 2008/07/21 13:36:58 lukem Exp $ */
+/* $NetBSD: printjob.c,v 1.55 2009/07/13 19:05:42 roy Exp $ */
/*
* Copyright (c) 1983, 1993
@@ -41,7 +41,7 @@
#if 0
static char sccsid[] = "@(#)printjob.c 8.7 (Berkeley) 5/10/95";
#else
-__RCSID("$NetBSD: printjob.c,v 1.54 2008/07/21 13:36:58 lukem Exp $");
+__RCSID("$NetBSD: printjob.c,v 1.55 2009/07/13 19:05:42 roy Exp $");
#endif
#endif /* not lint */
@@ -392,12 +392,12 @@
* (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));
@@ -502,7 +502,7 @@
pass2:
fseek(cfp, 0L, 0);
- while (getline(cfp))
+ while (get_line(cfp))
switch (line[0]) {
case 'L': /* identification line */
if (!SH && HL)
@@ -820,7 +820,7 @@
/*
* pass 1
*/
- while (getline(cfp)) {
+ while (get_line(cfp)) {
again:
if (line[0] == 'S') {
cp = line+1;
@@ -837,7 +837,7 @@
}
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)) {
@@ -864,7 +864,7 @@
* pass 2
*/
fseek(cfp, 0L, 0);
- while (getline(cfp))
+ while (get_line(cfp))
if (line[0] == 'U' && strchr(line+1, '/') == 0)
(void)unlink(line+1);
/*