summaryrefslogtreecommitdiff
path: root/editors
diff options
context:
space:
mode:
authorEric Andersen2004-03-15 08:29:22 +0000
committerEric Andersen2004-03-15 08:29:22 +0000
commitc7bda1ce659294d6e22c06e087f6f265983c7578 (patch)
tree4c6d2217f4d8306c59cf1096f8664e1cfd167213 /editors
parent8854004b41065b3d081af7f3df13a100b0c8bfbe (diff)
downloadbusybox-c7bda1ce659294d6e22c06e087f6f265983c7578.zip
busybox-c7bda1ce659294d6e22c06e087f6f265983c7578.tar.gz
Remove trailing whitespace. Update copyright to include 2004.
Diffstat (limited to 'editors')
-rw-r--r--editors/Config.in2
-rw-r--r--editors/Makefile2
-rw-r--r--editors/Makefile.in2
-rw-r--r--editors/awk.c14
-rw-r--r--editors/patch.c6
-rw-r--r--editors/sed.c6
-rw-r--r--editors/vi.c76
7 files changed, 54 insertions, 54 deletions
diff --git a/editors/Config.in b/editors/Config.in
index e2055ce..bb02859 100644
--- a/editors/Config.in
+++ b/editors/Config.in
@@ -38,7 +38,7 @@ config CONFIG_VI
default n
help
'vi' is a text editor. More specifically, it is the One True
- text editor <grin>. It does, however, have a rather steep
+ text editor <grin>. It does, however, have a rather steep
learning curve. If you are not already comfortable with 'vi'
you may wish to use something else.
diff --git a/editors/Makefile b/editors/Makefile
index 00ef6d5..1c82231 100644
--- a/editors/Makefile
+++ b/editors/Makefile
@@ -1,6 +1,6 @@
# Makefile for busybox
#
-# Copyright (C) 1999-2003 by Erik Andersen <andersen@codepoet.org>
+# Copyright (C) 1999-2004 by Erik Andersen <andersen@codepoet.org>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
diff --git a/editors/Makefile.in b/editors/Makefile.in
index 9745047..017f309 100644
--- a/editors/Makefile.in
+++ b/editors/Makefile.in
@@ -1,6 +1,6 @@
# Makefile for busybox
#
-# Copyright (C) 1999-2003 by Erik Andersen <andersen@codepoet.org>
+# Copyright (C) 1999-2004 by Erik Andersen <andersen@codepoet.org>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
diff --git a/editors/awk.c b/editors/awk.c
index 09fb41d..cb74a98 100644
--- a/editors/awk.c
+++ b/editors/awk.c
@@ -378,7 +378,7 @@ static unsigned long tokeninfo[] = {
};
/* internal variable names and their initial values */
-/* asterisk marks SPECIAL vars; $ is just no-named Field0 */
+/* asterisk marks SPECIAL vars; $ is just no-named Field0 */
enum {
CONVFMT=0, OFMT, FS, OFS,
ORS, RS, RT, FILENAME,
@@ -390,7 +390,7 @@ enum {
static char * vNames =
"CONVFMT\0" "OFMT\0" "FS\0*" "OFS\0"
- "ORS\0" "RS\0*" "RT\0" "FILENAME\0"
+ "ORS\0" "RS\0*" "RT\0" "FILENAME\0"
"SUBSEP\0" "ARGIND\0" "ARGC\0" "ARGV\0"
"ERRNO\0" "FNR\0"
"NR\0" "NF\0*" "IGNORECASE\0*"
@@ -486,7 +486,7 @@ static unsigned int hashidx(char *name) {
static xhash *hash_init(void) {
xhash *newhash;
-
+
newhash = (xhash *)xcalloc(1, sizeof(xhash));
newhash->csize = FIRST_PRIME;
newhash->items = (hash_item **)xcalloc(newhash->csize, sizeof(hash_item *));
@@ -1053,7 +1053,7 @@ static node *parse_expr(unsigned long iexp) {
/* for binary and postfix-unary operators, jump back over
* previous operators with higher priority */
vn = cn;
- while ( ((t.info & PRIMASK) > (vn->a.n->info & PRIMASK2)) ||
+ while ( ((t.info & PRIMASK) > (vn->a.n->info & PRIMASK2)) ||
((t.info == vn->info) && ((t.info & OPCLSMASK) == OC_COLON)) )
vn = vn->a.n;
if ((t.info & OPCLSMASK) == OC_TERNARY)
@@ -1085,7 +1085,7 @@ static node *parse_expr(unsigned long iexp) {
xtc = TC_OPERAND | TC_UOPPRE | TC_REGEXP;
if (tc & (TC_OPERAND | TC_REGEXP)) {
xtc = TC_UOPPRE | TC_BINOP | TC_OPERAND | iexp;
- /* one should be very careful with switch on tclass -
+ /* one should be very careful with switch on tclass -
* only simple tclasses should be used! */
switch (tc) {
case TC_VARIABLE:
@@ -1103,7 +1103,7 @@ static node *parse_expr(unsigned long iexp) {
}
xtc = TC_UOPPOST | TC_UOPPRE | TC_BINOP | TC_OPERAND | iexp;
break;
-
+
case TC_NUMBER:
case TC_STRING:
cn->info = OC_VAR;
@@ -1763,7 +1763,7 @@ static char *awk_printf(node *n) {
s = f;
while (*f && (*f != '%' || *(++f) == '%'))
f++;
- while (*f && !isalpha(*f))
+ while (*f && !isalpha(*f))
f++;
incr = (f - s) + MAXVARFMT;
diff --git a/editors/patch.c b/editors/patch.c
index 1587919..e3745ef 100644
--- a/editors/patch.c
+++ b/editors/patch.c
@@ -31,7 +31,7 @@
* - Non-interactive
* - Patches must apply cleanly or the hunk will fail.
* - Reject file isnt saved
- * -
+ * -
*/
#include <getopt.h>
@@ -55,7 +55,7 @@ static int copy_lines(FILE *src_stream, FILE *dest_stream, const unsigned int li
bb_perror_msg_and_die("Error writing to new file");
}
free(line);
-
+
i++;
}
return(i);
@@ -282,7 +282,7 @@ extern int patch_main(int argc, char **argv)
}
}
- /* 0 = SUCCESS
+ /* 0 = SUCCESS
* 1 = Some hunks failed
* 2 = More serious problems
*/
diff --git a/editors/sed.c b/editors/sed.c
index a7c99a1..c97092a 100644
--- a/editors/sed.c
+++ b/editors/sed.c
@@ -209,7 +209,7 @@ static char *copy_parsing_slashn(const char *string, int len)
/*
* index_of_next_unescaped_regexp_delim - walks left to right through a string
* beginning at a specified index and returns the index of the next regular
- * expression delimiter (typically a forward * slash ('/')) not preceeded by
+ * expression delimiter (typically a forward * slash ('/')) not preceeded by
* a backslash ('\').
*/
static int index_of_next_unescaped_regexp_delim(const char delimiter,
@@ -294,7 +294,7 @@ static int get_address(char *my_str, int *linenum, regex_t ** regex)
next = index_of_next_unescaped_regexp_delim(delimiter, ++pos);
if (next == -1)
bb_error_msg_and_die("unterminated match expression");
-
+
temp=copy_parsing_slashn(pos,next);
*regex = (regex_t *) xmalloc(sizeof(regex_t));
xregcomp(*regex, temp, REG_NEWLINE);
@@ -372,7 +372,7 @@ static int parse_subst_cmd(sed_cmd_t * const sed_cmd, char *substr)
{
char *temp;
idx+=parse_file_cmd(sed_cmd,substr+idx,&temp);
-
+
break;
}
/* Ignore case (gnu exension) */
diff --git a/editors/vi.c b/editors/vi.c
index 1932742..28eca75 100644
--- a/editors/vi.c
+++ b/editors/vi.c
@@ -19,7 +19,7 @@
*/
static const char vi_Version[] =
- "$Id: vi.c,v 1.33 2004/02/06 10:36:08 andersen Exp $";
+ "$Id: vi.c,v 1.34 2004/03/15 08:28:32 andersen Exp $";
/*
* To compile for standalone use:
@@ -2548,14 +2548,14 @@ static void place_cursor(int row, int col, int opti)
// char cm3[BUFSIZ];
int Rrow= last_row;
#endif /* CONFIG_FEATURE_VI_OPTIMIZE_CURSOR */
-
+
memset(cm1, '\0', BUFSIZ - 1); // clear the buffer
if (row < 0) row = 0;
if (row >= rows) row = rows - 1;
if (col < 0) col = 0;
if (col >= columns) col = columns - 1;
-
+
//----- 1. Try the standard terminal ESC sequence
sprintf((char *) cm1, CMrc, row + 1, col + 1);
cm= cm1;
@@ -2565,7 +2565,7 @@ static void place_cursor(int row, int col, int opti)
//----- find the minimum # of chars to move cursor -------------
//----- 2. Try moving with discreet chars (Newline, [back]space, ...)
memset(cm2, '\0', BUFSIZ - 1); // clear the buffer
-
+
// move to the correct row
while (row < Rrow) {
// the cursor has to move up
@@ -2577,7 +2577,7 @@ static void place_cursor(int row, int col, int opti)
strcat(cm2, CMdown);
Rrow++;
}
-
+
// now move to the correct column
strcat(cm2, "\r"); // start at col 0
// just send out orignal source char to get to correct place
@@ -2748,7 +2748,7 @@ static void format_line(Byte *dest, Byte *src, int li)
{
int co;
Byte c;
-
+
for (co= 0; co < MAX_SCR_COLS; co++) {
c= ' '; // assume blank
if (li > 0 && co == 0) {
@@ -2899,7 +2899,7 @@ static void refresh(int full_screen)
#else
place_cursor(crow, ccol, FALSE);
#endif /* CONFIG_FEATURE_VI_OPTIMIZE_CURSOR */
-
+
if (offset != old_offset)
old_offset = offset;
}
@@ -2997,29 +2997,29 @@ key_cmd_mode:
//case 0x1d: // gs
//case 0x1e: // rs
//case 0x1f: // us
- //case '!': // !-
- //case '#': // #-
- //case '&': // &-
- //case '(': // (-
- //case ')': // )-
- //case '*': // *-
- //case ',': // ,-
- //case '=': // =-
- //case '@': // @-
- //case 'F': // F-
- //case 'K': // K-
- //case 'Q': // Q-
- //case 'S': // S-
- //case 'T': // T-
- //case 'V': // V-
- //case '[': // [-
- //case '\\': // \-
- //case ']': // ]-
- //case '_': // _-
- //case '`': // `-
- //case 'g': // g-
+ //case '!': // !-
+ //case '#': // #-
+ //case '&': // &-
+ //case '(': // (-
+ //case ')': // )-
+ //case '*': // *-
+ //case ',': // ,-
+ //case '=': // =-
+ //case '@': // @-
+ //case 'F': // F-
+ //case 'K': // K-
+ //case 'Q': // Q-
+ //case 'S': // S-
+ //case 'T': // T-
+ //case 'V': // V-
+ //case '[': // [-
+ //case '\\': // \-
+ //case ']': // ]-
+ //case '_': // _-
+ //case '`': // `-
+ //case 'g': // g-
//case 'u': // u- FIXME- there is no undo
- //case 'v': // v-
+ //case 'v': // v-
default: // unrecognised command
buf[0] = c;
buf[1] = '\0';
@@ -3338,15 +3338,15 @@ key_cmd_mode:
break;
#endif /* CONFIG_FEATURE_VI_SEARCH */
case '0': // 0- goto begining of line
- case '1': // 1-
- case '2': // 2-
- case '3': // 3-
- case '4': // 4-
- case '5': // 5-
- case '6': // 6-
- case '7': // 7-
- case '8': // 8-
- case '9': // 9-
+ case '1': // 1-
+ case '2': // 2-
+ case '3': // 3-
+ case '4': // 4-
+ case '5': // 5-
+ case '6': // 6-
+ case '7': // 7-
+ case '8': // 8-
+ case '9': // 9-
if (c == '0' && cmdcnt < 1) {
dot_begin(); // this was a standalone zero
} else {