summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJim Meyering <jim@meyering.net>1997-01-26 04:43:42 +0000
committerJim Meyering <jim@meyering.net>1997-01-26 04:43:42 +0000
commit3e0c759c3a573887c56a45984ee67176559cb52b (patch)
tree2970b8b49d6fe00a2ab16d77ffacdcb55dfdaa28 /src
parent10f565971b45aeaabfd8c16681381c9d075a0337 (diff)
downloadcoreutils-3e0c759c3a573887c56a45984ee67176559cb52b.tar.xz
(parse_obsolescent_option): Comment.
Diffstat (limited to 'src')
-rw-r--r--src/tail.c13
1 files changed, 12 insertions, 1 deletions
diff --git a/src/tail.c b/src/tail.c
index 61308265a..2aa1b80ca 100644
--- a/src/tail.c
+++ b/src/tail.c
@@ -853,6 +853,15 @@ tail_file (const char *filename, off_t n_units, int filenum)
return errors;
}
+/* If the command line arguments are of the obsolescent form and the
+ option string is well-formed, set *FAIL to zero, set *N_UNITS, the
+ globals COUNT_LINES, FOREVER, and FROM_START, and return non-zero.
+ Otherwise, if the command line arguments appear to be of the
+ obsolescent form but the option string is malformed, set *FAIL to
+ non-zero, don't modify any other parameter or global variable, and
+ return non-zero. Otherwise, return zero and don't modify any parameter
+ or global variable. */
+
static int
parse_obsolescent_option (int argc, const char *const *argv,
off_t *n_units, int *fail)
@@ -865,7 +874,8 @@ parse_obsolescent_option (int argc, const char *const *argv,
int t_count_lines;
int t_forever;
- /* FIXME: comment. */
+ /* With the obsolescent form, there is one option string and at most
+ one file argument. */
if (argc < 2 || argc > 3)
return 0;
@@ -965,6 +975,7 @@ parse_obsolescent_option (int argc, const char *const *argv,
if (!*fail)
{
+ /* Set globals. */
from_start = t_from_start;
count_lines = t_count_lines;
forever = t_forever;