Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 66713
Collapse All | Expand All

(-)coreutils-5.2.1/src/tail.c.orig (-5 / +7 lines)
Lines 1352-1358 Link Here
1352
  const char *p = argv[1];
1352
  const char *p = argv[1];
1353
  const char *n_string = NULL;
1353
  const char *n_string = NULL;
1354
  const char *n_string_end;
1354
  const char *n_string_end;
1355
  bool obsolete_usage;
1355
  bool obsolete_usage, obsolete_usage_posixly_correct;
1356
1356
1357
  int t_from_start;
1357
  int t_from_start;
1358
  int t_count_lines;
1358
  int t_count_lines;
Lines 1364-1375 Link Here
1364
  if (argc < 2)
1364
  if (argc < 2)
1365
    return 0;
1365
    return 0;
1366
1366
1367
  obsolete_usage = (posix2_version () < 200112) || !getenv ("POSIXLY_CORRECT");
1367
  obsolete_usage = (posix2_version () < 200112);
1368
  obsolete_usage_posixly_correct = !getenv ("POSIXLY_CORRECT");
1368
1369
1369
  /* If P starts with `+' and the POSIX version predates 1003.1-2001,
1370
  /* If P starts with `+' and the POSIX version predates 1003.1-2001,
1370
     or if P starts with `-N' (where N is a digit), or `-l', then it
1371
     or if P starts with `-N' (where N is a digit), or `-l', then it
1371
     is obsolescent.  Return zero otherwise.  */
1372
     is obsolescent.  Return zero otherwise.  */
1372
  if (! ((p[0] == '+' && obsolete_usage)
1373
  if (! ((p[0] == '+')
1373
	 || (p[0] == '-' && (p[1] == 'l' || ISDIGIT (p[1])))))
1374
	 || (p[0] == '-' && (p[1] == 'l' || ISDIGIT (p[1])))))
1374
    return 0;
1375
    return 0;
1375
1376
Lines 1486-1495 Link Here
1486
1487
1487
      if (! obsolete_usage)
1488
      if (! obsolete_usage)
1488
	{
1489
	{
1489
	  error (0, 0, _("`%s' option is obsolete; use `%s-%c %.*s'"),
1490
	  error (0, 0, _("`%s' option is obsolete; use `%s-%c %.*s' since this will be removed in the future"),
1490
		 argv[1], t_forever ? " -f" : "", t_count_lines ? 'n' : 'c',
1491
		 argv[1], t_forever ? " -f" : "", t_count_lines ? 'n' : 'c',
1491
		 (int) (n_string_end - n_string), n_string);
1492
		 (int) (n_string_end - n_string), n_string);
1492
	  usage (EXIT_FAILURE);
1493
	if (!obsolete_usage_posixly_correct)
1494
		  usage (EXIT_FAILURE);
1493
	}
1495
	}
1494
1496
1495
      /* Set globals.  */
1497
      /* Set globals.  */

Return to bug 66713