]> git.ipfire.org Git - thirdparty/coreutils.git/commitdiff
(parse_obsolescent_option): Comment.
authorJim Meyering <jim@meyering.net>
Sun, 26 Jan 1997 04:43:42 +0000 (04:43 +0000)
committerJim Meyering <jim@meyering.net>
Sun, 26 Jan 1997 04:43:42 +0000 (04:43 +0000)
src/tail.c

index 61308265a926937dc5bbad36e23647e201d60cc3..2aa1b80cacc5709713aef7f23ba9344fcfcc90a0 100644 (file)
@@ -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;