diff options
author | Eric Andersen <andersen@codepoet.org> | 2004-03-15 08:29:22 +0000 |
---|---|---|
committer | Eric Andersen <andersen@codepoet.org> | 2004-03-15 08:29:22 +0000 |
commit | c7bda1ce659294d6e22c06e087f6f265983c7578 (patch) | |
tree | 4c6d2217f4d8306c59cf1096f8664e1cfd167213 /editors | |
parent | 8854004b41065b3d081af7f3df13a100b0c8bfbe (diff) | |
download | busybox-w32-c7bda1ce659294d6e22c06e087f6f265983c7578.tar.gz busybox-w32-c7bda1ce659294d6e22c06e087f6f265983c7578.tar.bz2 busybox-w32-c7bda1ce659294d6e22c06e087f6f265983c7578.zip |
Remove trailing whitespace. Update copyright to include 2004.
Diffstat (limited to 'editors')
-rw-r--r-- | editors/Config.in | 2 | ||||
-rw-r--r-- | editors/Makefile | 2 | ||||
-rw-r--r-- | editors/Makefile.in | 2 | ||||
-rw-r--r-- | editors/awk.c | 14 | ||||
-rw-r--r-- | editors/patch.c | 6 | ||||
-rw-r--r-- | editors/sed.c | 6 | ||||
-rw-r--r-- | editors/vi.c | 76 |
7 files changed, 54 insertions, 54 deletions
diff --git a/editors/Config.in b/editors/Config.in index e2055cede..bb0285976 100644 --- a/editors/Config.in +++ b/editors/Config.in | |||
@@ -38,7 +38,7 @@ config CONFIG_VI | |||
38 | default n | 38 | default n |
39 | help | 39 | help |
40 | 'vi' is a text editor. More specifically, it is the One True | 40 | 'vi' is a text editor. More specifically, it is the One True |
41 | text editor <grin>. It does, however, have a rather steep | 41 | text editor <grin>. It does, however, have a rather steep |
42 | learning curve. If you are not already comfortable with 'vi' | 42 | learning curve. If you are not already comfortable with 'vi' |
43 | you may wish to use something else. | 43 | you may wish to use something else. |
44 | 44 | ||
diff --git a/editors/Makefile b/editors/Makefile index 00ef6d502..1c8223124 100644 --- a/editors/Makefile +++ b/editors/Makefile | |||
@@ -1,6 +1,6 @@ | |||
1 | # Makefile for busybox | 1 | # Makefile for busybox |
2 | # | 2 | # |
3 | # Copyright (C) 1999-2003 by Erik Andersen <andersen@codepoet.org> | 3 | # Copyright (C) 1999-2004 by Erik Andersen <andersen@codepoet.org> |
4 | # | 4 | # |
5 | # This program is free software; you can redistribute it and/or modify | 5 | # This program is free software; you can redistribute it and/or modify |
6 | # it under the terms of the GNU General Public License as published by | 6 | # it under the terms of the GNU General Public License as published by |
diff --git a/editors/Makefile.in b/editors/Makefile.in index 97450479d..017f30934 100644 --- a/editors/Makefile.in +++ b/editors/Makefile.in | |||
@@ -1,6 +1,6 @@ | |||
1 | # Makefile for busybox | 1 | # Makefile for busybox |
2 | # | 2 | # |
3 | # Copyright (C) 1999-2003 by Erik Andersen <andersen@codepoet.org> | 3 | # Copyright (C) 1999-2004 by Erik Andersen <andersen@codepoet.org> |
4 | # | 4 | # |
5 | # This program is free software; you can redistribute it and/or modify | 5 | # This program is free software; you can redistribute it and/or modify |
6 | # it under the terms of the GNU General Public License as published by | 6 | # it under the terms of the GNU General Public License as published by |
diff --git a/editors/awk.c b/editors/awk.c index 09fb41d68..cb74a9832 100644 --- a/editors/awk.c +++ b/editors/awk.c | |||
@@ -378,7 +378,7 @@ static unsigned long tokeninfo[] = { | |||
378 | }; | 378 | }; |
379 | 379 | ||
380 | /* internal variable names and their initial values */ | 380 | /* internal variable names and their initial values */ |
381 | /* asterisk marks SPECIAL vars; $ is just no-named Field0 */ | 381 | /* asterisk marks SPECIAL vars; $ is just no-named Field0 */ |
382 | enum { | 382 | enum { |
383 | CONVFMT=0, OFMT, FS, OFS, | 383 | CONVFMT=0, OFMT, FS, OFS, |
384 | ORS, RS, RT, FILENAME, | 384 | ORS, RS, RT, FILENAME, |
@@ -390,7 +390,7 @@ enum { | |||
390 | 390 | ||
391 | static char * vNames = | 391 | static char * vNames = |
392 | "CONVFMT\0" "OFMT\0" "FS\0*" "OFS\0" | 392 | "CONVFMT\0" "OFMT\0" "FS\0*" "OFS\0" |
393 | "ORS\0" "RS\0*" "RT\0" "FILENAME\0" | 393 | "ORS\0" "RS\0*" "RT\0" "FILENAME\0" |
394 | "SUBSEP\0" "ARGIND\0" "ARGC\0" "ARGV\0" | 394 | "SUBSEP\0" "ARGIND\0" "ARGC\0" "ARGV\0" |
395 | "ERRNO\0" "FNR\0" | 395 | "ERRNO\0" "FNR\0" |
396 | "NR\0" "NF\0*" "IGNORECASE\0*" | 396 | "NR\0" "NF\0*" "IGNORECASE\0*" |
@@ -486,7 +486,7 @@ static unsigned int hashidx(char *name) { | |||
486 | static xhash *hash_init(void) { | 486 | static xhash *hash_init(void) { |
487 | 487 | ||
488 | xhash *newhash; | 488 | xhash *newhash; |
489 | 489 | ||
490 | newhash = (xhash *)xcalloc(1, sizeof(xhash)); | 490 | newhash = (xhash *)xcalloc(1, sizeof(xhash)); |
491 | newhash->csize = FIRST_PRIME; | 491 | newhash->csize = FIRST_PRIME; |
492 | newhash->items = (hash_item **)xcalloc(newhash->csize, sizeof(hash_item *)); | 492 | newhash->items = (hash_item **)xcalloc(newhash->csize, sizeof(hash_item *)); |
@@ -1053,7 +1053,7 @@ static node *parse_expr(unsigned long iexp) { | |||
1053 | /* for binary and postfix-unary operators, jump back over | 1053 | /* for binary and postfix-unary operators, jump back over |
1054 | * previous operators with higher priority */ | 1054 | * previous operators with higher priority */ |
1055 | vn = cn; | 1055 | vn = cn; |
1056 | while ( ((t.info & PRIMASK) > (vn->a.n->info & PRIMASK2)) || | 1056 | while ( ((t.info & PRIMASK) > (vn->a.n->info & PRIMASK2)) || |
1057 | ((t.info == vn->info) && ((t.info & OPCLSMASK) == OC_COLON)) ) | 1057 | ((t.info == vn->info) && ((t.info & OPCLSMASK) == OC_COLON)) ) |
1058 | vn = vn->a.n; | 1058 | vn = vn->a.n; |
1059 | if ((t.info & OPCLSMASK) == OC_TERNARY) | 1059 | if ((t.info & OPCLSMASK) == OC_TERNARY) |
@@ -1085,7 +1085,7 @@ static node *parse_expr(unsigned long iexp) { | |||
1085 | xtc = TC_OPERAND | TC_UOPPRE | TC_REGEXP; | 1085 | xtc = TC_OPERAND | TC_UOPPRE | TC_REGEXP; |
1086 | if (tc & (TC_OPERAND | TC_REGEXP)) { | 1086 | if (tc & (TC_OPERAND | TC_REGEXP)) { |
1087 | xtc = TC_UOPPRE | TC_BINOP | TC_OPERAND | iexp; | 1087 | xtc = TC_UOPPRE | TC_BINOP | TC_OPERAND | iexp; |
1088 | /* one should be very careful with switch on tclass - | 1088 | /* one should be very careful with switch on tclass - |
1089 | * only simple tclasses should be used! */ | 1089 | * only simple tclasses should be used! */ |
1090 | switch (tc) { | 1090 | switch (tc) { |
1091 | case TC_VARIABLE: | 1091 | case TC_VARIABLE: |
@@ -1103,7 +1103,7 @@ static node *parse_expr(unsigned long iexp) { | |||
1103 | } | 1103 | } |
1104 | xtc = TC_UOPPOST | TC_UOPPRE | TC_BINOP | TC_OPERAND | iexp; | 1104 | xtc = TC_UOPPOST | TC_UOPPRE | TC_BINOP | TC_OPERAND | iexp; |
1105 | break; | 1105 | break; |
1106 | 1106 | ||
1107 | case TC_NUMBER: | 1107 | case TC_NUMBER: |
1108 | case TC_STRING: | 1108 | case TC_STRING: |
1109 | cn->info = OC_VAR; | 1109 | cn->info = OC_VAR; |
@@ -1763,7 +1763,7 @@ static char *awk_printf(node *n) { | |||
1763 | s = f; | 1763 | s = f; |
1764 | while (*f && (*f != '%' || *(++f) == '%')) | 1764 | while (*f && (*f != '%' || *(++f) == '%')) |
1765 | f++; | 1765 | f++; |
1766 | while (*f && !isalpha(*f)) | 1766 | while (*f && !isalpha(*f)) |
1767 | f++; | 1767 | f++; |
1768 | 1768 | ||
1769 | incr = (f - s) + MAXVARFMT; | 1769 | incr = (f - s) + MAXVARFMT; |
diff --git a/editors/patch.c b/editors/patch.c index 1587919bc..e3745ef39 100644 --- a/editors/patch.c +++ b/editors/patch.c | |||
@@ -31,7 +31,7 @@ | |||
31 | * - Non-interactive | 31 | * - Non-interactive |
32 | * - Patches must apply cleanly or the hunk will fail. | 32 | * - Patches must apply cleanly or the hunk will fail. |
33 | * - Reject file isnt saved | 33 | * - Reject file isnt saved |
34 | * - | 34 | * - |
35 | */ | 35 | */ |
36 | 36 | ||
37 | #include <getopt.h> | 37 | #include <getopt.h> |
@@ -55,7 +55,7 @@ static int copy_lines(FILE *src_stream, FILE *dest_stream, const unsigned int li | |||
55 | bb_perror_msg_and_die("Error writing to new file"); | 55 | bb_perror_msg_and_die("Error writing to new file"); |
56 | } | 56 | } |
57 | free(line); | 57 | free(line); |
58 | 58 | ||
59 | i++; | 59 | i++; |
60 | } | 60 | } |
61 | return(i); | 61 | return(i); |
@@ -282,7 +282,7 @@ extern int patch_main(int argc, char **argv) | |||
282 | } | 282 | } |
283 | } | 283 | } |
284 | 284 | ||
285 | /* 0 = SUCCESS | 285 | /* 0 = SUCCESS |
286 | * 1 = Some hunks failed | 286 | * 1 = Some hunks failed |
287 | * 2 = More serious problems | 287 | * 2 = More serious problems |
288 | */ | 288 | */ |
diff --git a/editors/sed.c b/editors/sed.c index a7c99a16b..c97092a5c 100644 --- a/editors/sed.c +++ b/editors/sed.c | |||
@@ -209,7 +209,7 @@ static char *copy_parsing_slashn(const char *string, int len) | |||
209 | /* | 209 | /* |
210 | * index_of_next_unescaped_regexp_delim - walks left to right through a string | 210 | * index_of_next_unescaped_regexp_delim - walks left to right through a string |
211 | * beginning at a specified index and returns the index of the next regular | 211 | * beginning at a specified index and returns the index of the next regular |
212 | * expression delimiter (typically a forward * slash ('/')) not preceeded by | 212 | * expression delimiter (typically a forward * slash ('/')) not preceeded by |
213 | * a backslash ('\'). | 213 | * a backslash ('\'). |
214 | */ | 214 | */ |
215 | static int index_of_next_unescaped_regexp_delim(const char delimiter, | 215 | 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) | |||
294 | next = index_of_next_unescaped_regexp_delim(delimiter, ++pos); | 294 | next = index_of_next_unescaped_regexp_delim(delimiter, ++pos); |
295 | if (next == -1) | 295 | if (next == -1) |
296 | bb_error_msg_and_die("unterminated match expression"); | 296 | bb_error_msg_and_die("unterminated match expression"); |
297 | 297 | ||
298 | temp=copy_parsing_slashn(pos,next); | 298 | temp=copy_parsing_slashn(pos,next); |
299 | *regex = (regex_t *) xmalloc(sizeof(regex_t)); | 299 | *regex = (regex_t *) xmalloc(sizeof(regex_t)); |
300 | xregcomp(*regex, temp, REG_NEWLINE); | 300 | xregcomp(*regex, temp, REG_NEWLINE); |
@@ -372,7 +372,7 @@ static int parse_subst_cmd(sed_cmd_t * const sed_cmd, char *substr) | |||
372 | { | 372 | { |
373 | char *temp; | 373 | char *temp; |
374 | idx+=parse_file_cmd(sed_cmd,substr+idx,&temp); | 374 | idx+=parse_file_cmd(sed_cmd,substr+idx,&temp); |
375 | 375 | ||
376 | break; | 376 | break; |
377 | } | 377 | } |
378 | /* Ignore case (gnu exension) */ | 378 | /* Ignore case (gnu exension) */ |
diff --git a/editors/vi.c b/editors/vi.c index 1932742ec..28eca754a 100644 --- a/editors/vi.c +++ b/editors/vi.c | |||
@@ -19,7 +19,7 @@ | |||
19 | */ | 19 | */ |
20 | 20 | ||
21 | static const char vi_Version[] = | 21 | static const char vi_Version[] = |
22 | "$Id: vi.c,v 1.33 2004/02/06 10:36:08 andersen Exp $"; | 22 | "$Id: vi.c,v 1.34 2004/03/15 08:28:32 andersen Exp $"; |
23 | 23 | ||
24 | /* | 24 | /* |
25 | * To compile for standalone use: | 25 | * To compile for standalone use: |
@@ -2548,14 +2548,14 @@ static void place_cursor(int row, int col, int opti) | |||
2548 | // char cm3[BUFSIZ]; | 2548 | // char cm3[BUFSIZ]; |
2549 | int Rrow= last_row; | 2549 | int Rrow= last_row; |
2550 | #endif /* CONFIG_FEATURE_VI_OPTIMIZE_CURSOR */ | 2550 | #endif /* CONFIG_FEATURE_VI_OPTIMIZE_CURSOR */ |
2551 | 2551 | ||
2552 | memset(cm1, '\0', BUFSIZ - 1); // clear the buffer | 2552 | memset(cm1, '\0', BUFSIZ - 1); // clear the buffer |
2553 | 2553 | ||
2554 | if (row < 0) row = 0; | 2554 | if (row < 0) row = 0; |
2555 | if (row >= rows) row = rows - 1; | 2555 | if (row >= rows) row = rows - 1; |
2556 | if (col < 0) col = 0; | 2556 | if (col < 0) col = 0; |
2557 | if (col >= columns) col = columns - 1; | 2557 | if (col >= columns) col = columns - 1; |
2558 | 2558 | ||
2559 | //----- 1. Try the standard terminal ESC sequence | 2559 | //----- 1. Try the standard terminal ESC sequence |
2560 | sprintf((char *) cm1, CMrc, row + 1, col + 1); | 2560 | sprintf((char *) cm1, CMrc, row + 1, col + 1); |
2561 | cm= cm1; | 2561 | cm= cm1; |
@@ -2565,7 +2565,7 @@ static void place_cursor(int row, int col, int opti) | |||
2565 | //----- find the minimum # of chars to move cursor ------------- | 2565 | //----- find the minimum # of chars to move cursor ------------- |
2566 | //----- 2. Try moving with discreet chars (Newline, [back]space, ...) | 2566 | //----- 2. Try moving with discreet chars (Newline, [back]space, ...) |
2567 | memset(cm2, '\0', BUFSIZ - 1); // clear the buffer | 2567 | memset(cm2, '\0', BUFSIZ - 1); // clear the buffer |
2568 | 2568 | ||
2569 | // move to the correct row | 2569 | // move to the correct row |
2570 | while (row < Rrow) { | 2570 | while (row < Rrow) { |
2571 | // the cursor has to move up | 2571 | // the cursor has to move up |
@@ -2577,7 +2577,7 @@ static void place_cursor(int row, int col, int opti) | |||
2577 | strcat(cm2, CMdown); | 2577 | strcat(cm2, CMdown); |
2578 | Rrow++; | 2578 | Rrow++; |
2579 | } | 2579 | } |
2580 | 2580 | ||
2581 | // now move to the correct column | 2581 | // now move to the correct column |
2582 | strcat(cm2, "\r"); // start at col 0 | 2582 | strcat(cm2, "\r"); // start at col 0 |
2583 | // just send out orignal source char to get to correct place | 2583 | // 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) | |||
2748 | { | 2748 | { |
2749 | int co; | 2749 | int co; |
2750 | Byte c; | 2750 | Byte c; |
2751 | 2751 | ||
2752 | for (co= 0; co < MAX_SCR_COLS; co++) { | 2752 | for (co= 0; co < MAX_SCR_COLS; co++) { |
2753 | c= ' '; // assume blank | 2753 | c= ' '; // assume blank |
2754 | if (li > 0 && co == 0) { | 2754 | if (li > 0 && co == 0) { |
@@ -2899,7 +2899,7 @@ static void refresh(int full_screen) | |||
2899 | #else | 2899 | #else |
2900 | place_cursor(crow, ccol, FALSE); | 2900 | place_cursor(crow, ccol, FALSE); |
2901 | #endif /* CONFIG_FEATURE_VI_OPTIMIZE_CURSOR */ | 2901 | #endif /* CONFIG_FEATURE_VI_OPTIMIZE_CURSOR */ |
2902 | 2902 | ||
2903 | if (offset != old_offset) | 2903 | if (offset != old_offset) |
2904 | old_offset = offset; | 2904 | old_offset = offset; |
2905 | } | 2905 | } |
@@ -2997,29 +2997,29 @@ key_cmd_mode: | |||
2997 | //case 0x1d: // gs | 2997 | //case 0x1d: // gs |
2998 | //case 0x1e: // rs | 2998 | //case 0x1e: // rs |
2999 | //case 0x1f: // us | 2999 | //case 0x1f: // us |
3000 | //case '!': // !- | 3000 | //case '!': // !- |
3001 | //case '#': // #- | 3001 | //case '#': // #- |
3002 | //case '&': // &- | 3002 | //case '&': // &- |
3003 | //case '(': // (- | 3003 | //case '(': // (- |
3004 | //case ')': // )- | 3004 | //case ')': // )- |
3005 | //case '*': // *- | 3005 | //case '*': // *- |
3006 | //case ',': // ,- | 3006 | //case ',': // ,- |
3007 | //case '=': // =- | 3007 | //case '=': // =- |
3008 | //case '@': // @- | 3008 | //case '@': // @- |
3009 | //case 'F': // F- | 3009 | //case 'F': // F- |
3010 | //case 'K': // K- | 3010 | //case 'K': // K- |
3011 | //case 'Q': // Q- | 3011 | //case 'Q': // Q- |
3012 | //case 'S': // S- | 3012 | //case 'S': // S- |
3013 | //case 'T': // T- | 3013 | //case 'T': // T- |
3014 | //case 'V': // V- | 3014 | //case 'V': // V- |
3015 | //case '[': // [- | 3015 | //case '[': // [- |
3016 | //case '\\': // \- | 3016 | //case '\\': // \- |
3017 | //case ']': // ]- | 3017 | //case ']': // ]- |
3018 | //case '_': // _- | 3018 | //case '_': // _- |
3019 | //case '`': // `- | 3019 | //case '`': // `- |
3020 | //case 'g': // g- | 3020 | //case 'g': // g- |
3021 | //case 'u': // u- FIXME- there is no undo | 3021 | //case 'u': // u- FIXME- there is no undo |
3022 | //case 'v': // v- | 3022 | //case 'v': // v- |
3023 | default: // unrecognised command | 3023 | default: // unrecognised command |
3024 | buf[0] = c; | 3024 | buf[0] = c; |
3025 | buf[1] = '\0'; | 3025 | buf[1] = '\0'; |
@@ -3338,15 +3338,15 @@ key_cmd_mode: | |||
3338 | break; | 3338 | break; |
3339 | #endif /* CONFIG_FEATURE_VI_SEARCH */ | 3339 | #endif /* CONFIG_FEATURE_VI_SEARCH */ |
3340 | case '0': // 0- goto begining of line | 3340 | case '0': // 0- goto begining of line |
3341 | case '1': // 1- | 3341 | case '1': // 1- |
3342 | case '2': // 2- | 3342 | case '2': // 2- |
3343 | case '3': // 3- | 3343 | case '3': // 3- |
3344 | case '4': // 4- | 3344 | case '4': // 4- |
3345 | case '5': // 5- | 3345 | case '5': // 5- |
3346 | case '6': // 6- | 3346 | case '6': // 6- |
3347 | case '7': // 7- | 3347 | case '7': // 7- |
3348 | case '8': // 8- | 3348 | case '8': // 8- |
3349 | case '9': // 9- | 3349 | case '9': // 9- |
3350 | if (c == '0' && cmdcnt < 1) { | 3350 | if (c == '0' && cmdcnt < 1) { |
3351 | dot_begin(); // this was a standalone zero | 3351 | dot_begin(); // this was a standalone zero |
3352 | } else { | 3352 | } else { |