sort: Cleanup small issues with spaces.

Obtained from:	OpenBSD
This commit is contained in:
Pedro F. Giffuni 2015-04-05 22:22:43 +00:00
parent c2dc6e2aab
commit f79477ebd5
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=281123
6 changed files with 19 additions and 24 deletions

View File

@ -78,7 +78,7 @@ keys_array_alloc(void)
}
/*
* Calculate whether we need key hint space
* Calculate whether we need key hint space
*/
static size_t
key_hint_size(void)
@ -595,12 +595,12 @@ list_coll(struct sort_list_item **ss1, struct sort_list_item **ss2)
return (list_coll_offset(ss1, ss2, 0));
}
#define LSCDEF(N) \
static int \
list_coll_##N(struct sort_list_item **ss1, struct sort_list_item **ss2) \
{ \
\
return (list_coll_offset(ss1, ss2, N)); \
#define LSCDEF(N) \
static int \
list_coll_##N(struct sort_list_item **ss1, struct sort_list_item **ss2) \
{ \
\
return (list_coll_offset(ss1, ss2, N)); \
}
LSCDEF(1)

View File

@ -1127,7 +1127,7 @@ file_headers_merge(size_t fnum, struct file_header **fh, FILE *f_out)
memset(&lp, 0, sizeof(lp));
/*
* construct the initial sort structure
* construct the initial sort structure
*/
for (i = 0; i < fnum; i++)
file_header_list_push(fh[i], fh, i);

View File

@ -55,7 +55,7 @@ struct sort_list
};
/*
* File reader object
* File reader object
*/
struct file_reader;

View File

@ -129,7 +129,7 @@ have_sort_left(void)
* Push sort level to the stack
*/
static inline void
push_ls(struct sort_level* sl)
push_ls(struct sort_level *sl)
{
struct level_stack *new_ls;
@ -231,7 +231,6 @@ add_to_sublevel(struct sort_level *sl, struct sort_list_item *item, size_t indx)
static inline void
add_leaf(struct sort_level *sl, struct sort_list_item *item)
{
if (++(sl->leaves_num) > sl->leaves_sz) {
sl->leaves_sz = sl->leaves_num + 128;
sl->leaves = sort_realloc(sl->leaves,

View File

@ -1,4 +1,4 @@
.\" $OpenBSD: sort.1,v 1.31 2007/08/21 21:22:37 millert Exp $
.\" $OpenBSD: sort.1,v 1.45 2015/03/19 13:51:10 jmc Exp $
.\" $FreeBSD$
.\"
.\" Copyright (c) 1991, 1993
@ -33,7 +33,7 @@
.\"
.\" @(#)sort.1 8.1 (Berkeley) 6/6/93
.\"
.Dd July 3, 2012
.Dd March 19 2015
.Dt SORT 1
.Os
.Sh NAME
@ -160,9 +160,10 @@ before comparison, that is, perform case-independent sorting.
Sort by general numerical value.
As opposed to
.Fl n ,
this option handles general floating points, which have a much
permissive format than those allowed by
. Fl n ,
this option handles general floating points.
It has a more
permissive format than that allowed by
.Fl n
but it has a significant performance drawback.
.It Fl h, Fl Fl human-numeric-sort, Fl Fl sort=human-numeric
Sort by numerical value, but take into account the SI suffix,
@ -247,9 +248,8 @@ can be attached independently to each
argument of the key specifications.
.Fl b .
.It Xo
.Sm off
.Fl k\ \& Ar field1 Op , Ar field2 , Fl Fl key Ns = Ns Ar field1 Op , Ar field2
.Sm on
.Fl k Ar field1 Ns Op , Ns Ar field2 ,
.Fl Fl key Ns = Ns Ar field1 Ns Op , Ns Ar field2
.Xc
Define a restricted sort key that has the starting position
.Ar field1 ,
@ -334,7 +334,7 @@ standard output.
%%THREADS%%Default number equals to the number of CPUs.
.It Fl Fl files0-from Ns = Ns Ar filename
Take the input file list from the file
.Ar filename.
.Ar filename .
The file names must be separated by NUL
(like the output produced by the command "find ... -print0").
.It Fl Fl radixsort

View File

@ -40,21 +40,18 @@ __FBSDID("$FreeBSD$");
static inline bool
isdigit_clocale(wchar_t c)
{
return (c >= L'0' && c <= L'9');
}
static inline bool
isalpha_clocale(wchar_t c)
{
return ((c >= L'a' && c <= L'z') || (c >= L'A' && c <= L'Z'));
}
static inline bool
isalnum_clocale(wchar_t c)
{
return ((c >= L'a' && c <= L'z') || (c >= L'A' && c <= L'Z') ||
(c >= L'0' && c <= L'9'));
}
@ -115,7 +112,6 @@ find_suffix(bwstring_iterator si, bwstring_iterator se, size_t *len)
static inline int
cmp_chars(wchar_t c1, wchar_t c2)
{
if (c1 == c2)
return (0);