summaryrefslogtreecommitdiff
path: root/src/sort.c
diff options
context:
space:
mode:
authorJim Meyering <meyering@redhat.com>2010-12-11 11:29:38 +0100
committerJim Meyering <meyering@redhat.com>2010-12-11 11:29:38 +0100
commit9a9d69e9e463ebfa67e90ecc061305532a91543e (patch)
treecf2c833a04cb4794b5ff806bcfd4af484957f613 /src/sort.c
parent27e997d0ebf3b2411e26b92a90365209e5cc1d00 (diff)
downloadcoreutils-9a9d69e9e463ebfa67e90ecc061305532a91543e.tar.xz
sort: syntax cleanup
* src/sort.c (xfopen, debug_key, sortlines, sort, main): Adjust formatting: fix misplaced braces, use consistent spacing, split a 2-stmt line.
Diffstat (limited to 'src/sort.c')
-rw-r--r--src/sort.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/sort.c b/src/sort.c
index 2c0f8522f..1de8115d7 100644
--- a/src/sort.c
+++ b/src/sort.c
@@ -939,7 +939,7 @@ stream_open (char const *file, char const *how)
static FILE *
xfopen (char const *file, char const *how)
- {
+{
FILE *fp = stream_open (file, how);
if (!fp)
die (_("open failed"), file);
@@ -2207,7 +2207,8 @@ debug_key (struct line const *line, struct keyfield const *key)
if (key->skipsblanks || key->month || key_numeric (key))
{
- char saved = *lim; *lim = '\0';
+ char saved = *lim;
+ *lim = '\0';
while (blanks[to_uchar (*beg)])
beg++;
@@ -3782,7 +3783,7 @@ merge (struct sortfile *files, size_t ntemps, size_t nfiles,
/* Sort NFILES FILES onto OUTPUT_FILE. Use at most NTHREADS threads. */
static void
-sort (char * const *files, size_t nfiles, char const *output_file,
+sort (char *const *files, size_t nfiles, char const *output_file,
size_t nthreads)
{
struct buffer buf;
@@ -4498,7 +4499,7 @@ main (int argc, char **argv)
files = tok.tok;
nfiles = tok.n_tok;
for (i = 0; i < nfiles; i++)
- {
+ {
if (STREQ (files[i], "-"))
error (SORT_FAILURE, 0, _("when reading file names from stdin, "
"no file name of %s allowed"),
@@ -4513,7 +4514,7 @@ main (int argc, char **argv)
_("%s:%lu: invalid zero-length file name"),
quotearg_colon (files_from), file_number);
}
- }
+ }
}
else
error (SORT_FAILURE, 0, _("no input from %s"),