diff options
author | 2012-03-04 04:05:15 +0000 | |
---|---|---|
committer | 2012-03-04 04:05:15 +0000 | |
commit | f9bbbf4534171e957bb7652e706dd78782fbffa2 (patch) | |
tree | 3828b3cf6a92fdae28d55bf6c8000c490e4996d0 /gnu/usr.bin/cvs/src | |
parent | Document sem_timedwait() (diff) | |
download | wireguard-openbsd-f9bbbf4534171e957bb7652e706dd78782fbffa2.tar.xz wireguard-openbsd-f9bbbf4534171e957bb7652e706dd78782fbffa2.zip |
In preparation for getline and getdelim additions to libc, rename getline()
occurrences to get_line().
Based on a diff from Jan Klemkow <j-dot-klemkow-at-wemelug-dot-de> to tech.
Diffstat (limited to 'gnu/usr.bin/cvs/src')
-rw-r--r-- | gnu/usr.bin/cvs/src/client.c | 4 | ||||
-rw-r--r-- | gnu/usr.bin/cvs/src/commit.c | 2 | ||||
-rw-r--r-- | gnu/usr.bin/cvs/src/cvsrc.c | 2 | ||||
-rw-r--r-- | gnu/usr.bin/cvs/src/edit.c | 6 | ||||
-rw-r--r-- | gnu/usr.bin/cvs/src/entries.c | 6 | ||||
-rw-r--r-- | gnu/usr.bin/cvs/src/fileattr.c | 2 | ||||
-rw-r--r-- | gnu/usr.bin/cvs/src/ignore.c | 2 | ||||
-rw-r--r-- | gnu/usr.bin/cvs/src/login.c | 4 | ||||
-rw-r--r-- | gnu/usr.bin/cvs/src/logmsg.c | 6 | ||||
-rw-r--r-- | gnu/usr.bin/cvs/src/mkmodules.c | 2 | ||||
-rw-r--r-- | gnu/usr.bin/cvs/src/parseinfo.c | 4 | ||||
-rw-r--r-- | gnu/usr.bin/cvs/src/patch.c | 6 | ||||
-rw-r--r-- | gnu/usr.bin/cvs/src/release.c | 2 | ||||
-rw-r--r-- | gnu/usr.bin/cvs/src/repos.c | 2 | ||||
-rw-r--r-- | gnu/usr.bin/cvs/src/root.c | 2 | ||||
-rw-r--r-- | gnu/usr.bin/cvs/src/server.c | 6 | ||||
-rw-r--r-- | gnu/usr.bin/cvs/src/subr.c | 2 | ||||
-rw-r--r-- | gnu/usr.bin/cvs/src/update.c | 2 | ||||
-rw-r--r-- | gnu/usr.bin/cvs/src/wrapper.c | 2 |
19 files changed, 32 insertions, 32 deletions
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); |