summaryrefslogtreecommitdiffstats
path: root/misc-utils/look.c
diff options
context:
space:
mode:
authorKarel Zak2007-03-07 09:53:56 +0100
committerKarel Zak2007-03-07 09:53:56 +0100
commit429ee99745c92cc283472db5efa1c7162f43c2cc (patch)
tree991b7d59a6b9da1a7e5e3d504f64c9d31a10d77a /misc-utils/look.c
parentlook: fix problem with !isalnum() words (diff)
downloadkernel-qcow2-util-linux-429ee99745c92cc283472db5efa1c7162f43c2cc.tar.gz
kernel-qcow2-util-linux-429ee99745c92cc283472db5efa1c7162f43c2cc.tar.xz
kernel-qcow2-util-linux-429ee99745c92cc283472db5efa1c7162f43c2cc.zip
look: remove tailing white-spaces
Signed-off-by: Karel Zak <kzak@redhat.com>
Diffstat (limited to 'misc-utils/look.c')
-rw-r--r--misc-utils/look.c58
1 files changed, 29 insertions, 29 deletions
diff --git a/misc-utils/look.c b/misc-utils/look.c
index 7ffd8a3e2..5c7e30c71 100644
--- a/misc-utils/look.c
+++ b/misc-utils/look.c
@@ -40,7 +40,7 @@
/*
* look -- find lines in a sorted list.
- *
+ *
* The man page said that TABs and SPACEs participate in -d comparisons.
* In fact, they were ignored. This implements historic practice, not
* the manual page.
@@ -92,7 +92,7 @@ main(int argc, char *argv[])
setlocale(LC_ALL, "");
bindtextdomain(PACKAGE, LOCALEDIR);
textdomain(PACKAGE);
-
+
setlocale(LC_ALL, "");
file = _PATH_WORDS;
@@ -193,36 +193,36 @@ look(char *front, char *back)
/*
* Binary search for "string" in memory between "front" and "back".
- *
+ *
* This routine is expected to return a pointer to the start of a line at
* *or before* the first word matching "string". Relaxing the constraint
* this way simplifies the algorithm.
- *
+ *
* Invariants:
- * front points to the beginning of a line at or before the first
+ * front points to the beginning of a line at or before the first
* matching string.
- *
- * back points to the beginning of a line at or after the first
+ *
+ * back points to the beginning of a line at or after the first
* matching line.
- *
+ *
* Advancing the Invariants:
- *
+ *
* p = first newline after halfway point from front to back.
- *
- * If the string at "p" is not greater than the string to match,
+ *
+ * If the string at "p" is not greater than the string to match,
* p is the new front. Otherwise it is the new back.
- *
+ *
* Termination:
- *
- * The definition of the routine allows it return at any point,
+ *
+ * The definition of the routine allows it return at any point,
* since front is always at or before the line to print.
- *
- * In fact, it returns when the chosen "p" equals "back". This
- * implies that there exists a string is least half as long as
- * (back - front), which in turn implies that a linear search will
+ *
+ * In fact, it returns when the chosen "p" equals "back". This
+ * implies that there exists a string is least half as long as
+ * (back - front), which in turn implies that a linear search will
* be no more expensive than the cost of simply printing a string or two.
- *
- * Trying to continue with binary search at this point would be
+ *
+ * Trying to continue with binary search at this point would be
* more trouble than it's worth.
*/
#define SKIP_PAST_NEWLINE(p, back) \
@@ -254,12 +254,12 @@ binary_search(char *front, char *back)
/*
* Find the first line that starts with string, linearly searching from front
* to back.
- *
+ *
* Return NULL for no such line.
- *
+ *
* This routine assumes:
- *
- * o front points at the first character in a line.
+ *
+ * o front points at the first character in a line.
* o front is before or at the first line to be printed.
*/
char *
@@ -284,7 +284,7 @@ linear_search(char *front, char *back)
/*
* Print as many lines as match string, starting at front.
*/
-void
+void
print_from(char *front, char *back)
{
int eol;
@@ -306,13 +306,13 @@ print_from(char *front, char *back)
/*
* Return LESS, GREATER, or EQUAL depending on how string compares with
* string2 (s1 ??? s2).
- *
- * o Matches up to len(s1) are EQUAL.
+ *
+ * o Matches up to len(s1) are EQUAL.
* o Matches up to len(s2) are GREATER.
- *
+ *
* Compare understands about the -f and -d flags, and treats comparisons
* appropriately.
- *
+ *
* The string "string" is null terminated. The string "s2" is '\n' terminated
* (or "s2end" terminated).
*