mirror of
git://git.sv.gnu.org/coreutils.git
synced 2026-08-04 07:43:58 +02:00
.
This commit is contained in:
@@ -288,7 +288,13 @@ main (argc, argv)
|
||||
out_ino = stat_buf.st_ino;
|
||||
}
|
||||
else
|
||||
check_redirection = 0;
|
||||
{
|
||||
check_redirection = 0;
|
||||
#ifdef lint /* Suppress `used before initialized' warning. */
|
||||
out_dev = 0;
|
||||
out_ino = 0;
|
||||
#endif
|
||||
}
|
||||
|
||||
/* Check if any of the input files are the same as the output file. */
|
||||
|
||||
@@ -549,9 +555,11 @@ cat (inbuf, insize, outbuf, outsize, quote,
|
||||
HP-UX returns ENOTTY on pipes.
|
||||
SunOS returns EINVAL and
|
||||
More/BSD returns ENODEV on special files
|
||||
like /dev/null. */
|
||||
like /dev/null.
|
||||
Irix-5 returns ENOSYS on pipes. */
|
||||
if (errno == EOPNOTSUPP || errno == ENOTTY
|
||||
|| errno == EINVAL || errno == ENODEV)
|
||||
|| errno == EINVAL || errno == ENODEV
|
||||
|| errno == ENOSYS)
|
||||
use_fionread = 0;
|
||||
else
|
||||
{
|
||||
|
||||
+4
-4
@@ -236,7 +236,7 @@ static struct option const longopts[] =
|
||||
{"keep-files", no_argument, NULL, 'k'},
|
||||
{"elide-empty-files", no_argument, NULL, 'z'},
|
||||
{"prefix", required_argument, NULL, 'f'},
|
||||
{"suffix", required_argument, NULL, 'b'},
|
||||
{"suffix-format", required_argument, NULL, 'b'},
|
||||
{"help", no_argument, &show_help, 1},
|
||||
{"version", no_argument, &show_version, 1},
|
||||
{NULL, 0, NULL, 0}
|
||||
@@ -1574,8 +1574,8 @@ Usage: %s [OPTION]... FILE PATTERN...\n\
|
||||
program_name);
|
||||
printf ("\
|
||||
\n\
|
||||
-b, --suffix=FORMAT use sprintf FORMAT instead of %%d\n\
|
||||
-f, --prefix=PREFIX use PREFIX instead of xx\n\
|
||||
-b, --suffix-format=FORMAT use sprintf FORMAT instead of %%d\n\
|
||||
-f, --prefix=PREFIX use PREFIX instead of `xx'\n\
|
||||
-k, --keep-files do not remove output files on errors\n\
|
||||
-n, --digits=DIGITS use specified number of digits instead of 2\n\
|
||||
-s, --quiet, --silent do not print counts of output file sizes\n\
|
||||
@@ -1591,7 +1591,7 @@ Read standard input if FILE is -. Each PATTERN may be:\n\
|
||||
{INTEGER} repeat the previous pattern specified number of times\n\
|
||||
{*} repeat the previous pattern as many times as possible\n\
|
||||
\n\
|
||||
A line OFFSET is a `+' or `-' (required) followed by a positive integer.\n\
|
||||
A line OFFSET is a required `+' or `-' followed by a positive integer.\n\
|
||||
");
|
||||
}
|
||||
exit (status);
|
||||
|
||||
@@ -277,6 +277,8 @@ expand ()
|
||||
int convert = 1; /* If nonzero, perform translations. */
|
||||
|
||||
fp = next_file ((FILE *) NULL);
|
||||
if (fp == NULL)
|
||||
return;
|
||||
for (;;)
|
||||
{
|
||||
c = getc (fp);
|
||||
|
||||
@@ -1040,9 +1040,10 @@ decode_format_string (s)
|
||||
/* Given a list of one or more input filenames FILE_LIST, set the global
|
||||
file pointer IN_STREAM to position N_SKIP in the concatenation of
|
||||
those files. If any file operation fails or if there are fewer than
|
||||
N_SKIP bytes in the combined input, give an error message and exit.
|
||||
When possible, use seek- rather than read operations to advance
|
||||
IN_STREAM. A file name of "-" is interpreted as standard input. */
|
||||
N_SKIP bytes in the combined input, give an error message and return
|
||||
non-zero. When possible, use seek- rather than read operations to
|
||||
advance IN_STREAM. A file name of "-" is interpreted as standard
|
||||
input. */
|
||||
|
||||
static int
|
||||
skip (n_skip)
|
||||
@@ -1495,6 +1496,10 @@ dump ()
|
||||
size_t n_bytes_read;
|
||||
size_t end_offset;
|
||||
|
||||
#ifdef lint /* Suppress `used before initialized' warning. */
|
||||
end_offset = 0;
|
||||
#endif
|
||||
|
||||
block[0] = (char *) alloca (bytes_per_block);
|
||||
block[1] = (char *) alloca (bytes_per_block);
|
||||
|
||||
@@ -1702,6 +1707,10 @@ main (argc, argv)
|
||||
after any true address. */
|
||||
long int pseudo_start;
|
||||
|
||||
#ifdef lint /* Suppress `used before initialized' warning. */
|
||||
pseudo_start = 0;
|
||||
#endif
|
||||
|
||||
program_name = argv[0];
|
||||
err = 0;
|
||||
|
||||
@@ -1993,6 +2002,8 @@ main (argc, argv)
|
||||
}
|
||||
|
||||
err |= skip (n_bytes_to_skip);
|
||||
if (in_stream == NULL)
|
||||
goto cleanup;
|
||||
|
||||
pseudo_offset = (flag_pseudo_start ? pseudo_start - n_bytes_to_skip : 0);
|
||||
|
||||
@@ -2028,6 +2039,8 @@ main (argc, argv)
|
||||
|
||||
err |= (flag_dump_strings ? dump_strings () : dump ());
|
||||
|
||||
cleanup:;
|
||||
|
||||
if (have_read_stdin && fclose (stdin) == EOF)
|
||||
error (2, errno, "standard input");
|
||||
|
||||
|
||||
@@ -257,6 +257,10 @@ paste_parallel (nfiles, fnamptr)
|
||||
int i; /* Loop index. */
|
||||
int opened_stdin = 0; /* Nonzero if any fopen got fd 0. */
|
||||
|
||||
#ifdef lint /* Suppress `used before initialized' warning. */
|
||||
chr = 0;
|
||||
#endif
|
||||
|
||||
delbuf = (char *) xmalloc (file_list_size + 2);
|
||||
fileptr = (FILE **) xmalloc ((file_list_size + 1) * sizeof (FILE *));
|
||||
|
||||
|
||||
+3
-3
@@ -107,17 +107,17 @@ static struct month
|
||||
|
||||
/* Initial buffer size for in core sorting. Will not grow unless a
|
||||
line longer than this is seen. */
|
||||
static int sortalloc = 524288;
|
||||
static int sortalloc = 4 * 1024 * 1024;
|
||||
|
||||
/* Initial buffer size for in core merge buffers. Bear in mind that
|
||||
up to NMERGE * mergealloc bytes may be allocated for merge buffers. */
|
||||
static int mergealloc = 16384;
|
||||
static int mergealloc = 64 * 1024;
|
||||
|
||||
/* Guess of average line length. */
|
||||
static int linelength = 30;
|
||||
|
||||
/* Maximum number of elements for the array(s) of struct line's, in bytes. */
|
||||
#define LINEALLOC 262144
|
||||
#define LINEALLOC (1024 * 1024)
|
||||
|
||||
/* Prefix for temporary file names. */
|
||||
static char *temp_file_prefix;
|
||||
|
||||
Reference in New Issue
Block a user