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