diff options
author | Manuel Novoa III <mjn3@codepoet.org> | 2003-03-19 09:13:01 +0000 |
---|---|---|
committer | Manuel Novoa III <mjn3@codepoet.org> | 2003-03-19 09:13:01 +0000 |
commit | cad5364599eb5062d59e0c397ed638ddd61a8d5d (patch) | |
tree | a318d0f03aa076c74b576ea45dc543a5669e8e91 /editors/vi.c | |
parent | e01f9662a5bd5d91be4f6b3941b57fff73cd5af1 (diff) | |
download | busybox-w32-cad5364599eb5062d59e0c397ed638ddd61a8d5d.tar.gz busybox-w32-cad5364599eb5062d59e0c397ed638ddd61a8d5d.tar.bz2 busybox-w32-cad5364599eb5062d59e0c397ed638ddd61a8d5d.zip |
Major coreutils update.
Diffstat (limited to 'editors/vi.c')
-rw-r--r-- | editors/vi.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/editors/vi.c b/editors/vi.c index cda17db1a..144e9d760 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.27 2002/12/03 21:48:15 bug1 Exp $"; | 22 | "$Id: vi.c,v 1.28 2003/03/19 09:11:45 mjn3 Exp $"; |
23 | 23 | ||
24 | /* | 24 | /* |
25 | * To compile for standalone use: | 25 | * To compile for standalone use: |
@@ -403,7 +403,7 @@ extern int vi_main(int argc, char **argv) | |||
403 | for (; optind < argc; optind++) { | 403 | for (; optind < argc; optind++) { |
404 | editing = 1; // 0=exit, 1=one file, 2+ =many files | 404 | editing = 1; // 0=exit, 1=one file, 2+ =many files |
405 | free(cfn); | 405 | free(cfn); |
406 | cfn = (Byte *) xstrdup(argv[optind]); | 406 | cfn = (Byte *) bb_xstrdup(argv[optind]); |
407 | edit_file(cfn); | 407 | edit_file(cfn); |
408 | } | 408 | } |
409 | } | 409 | } |
@@ -597,7 +597,7 @@ static Byte *get_one_address(Byte * p, int *addr) // get colon addr, if present | |||
597 | *q++ = *p; | 597 | *q++ = *p; |
598 | *q = '\0'; | 598 | *q = '\0'; |
599 | } | 599 | } |
600 | pat = (Byte *) xstrdup((char *) buf); // save copy of pattern | 600 | pat = (Byte *) bb_xstrdup((char *) buf); // save copy of pattern |
601 | if (*p == '/') | 601 | if (*p == '/') |
602 | p++; | 602 | p++; |
603 | q = char_search(dot, pat, FORWARD, FULL); | 603 | q = char_search(dot, pat, FORWARD, FULL); |
@@ -811,7 +811,7 @@ static void colon(Byte * buf) | |||
811 | 811 | ||
812 | // There is a read-able regular file | 812 | // There is a read-able regular file |
813 | // make this the current file | 813 | // make this the current file |
814 | q = (Byte *) xstrdup((char *) fn); // save the cfn | 814 | q = (Byte *) bb_xstrdup((char *) fn); // save the cfn |
815 | free(cfn); // free the old name | 815 | free(cfn); // free the old name |
816 | cfn = q; // remember new cfn | 816 | cfn = q; // remember new cfn |
817 | 817 | ||
@@ -862,7 +862,7 @@ static void colon(Byte * buf) | |||
862 | if (strlen((char *) args) > 0) { | 862 | if (strlen((char *) args) > 0) { |
863 | // user wants a new filename | 863 | // user wants a new filename |
864 | free(cfn); | 864 | free(cfn); |
865 | cfn = (Byte *) xstrdup((char *) args); | 865 | cfn = (Byte *) bb_xstrdup((char *) args); |
866 | } else { | 866 | } else { |
867 | // user wants file status info | 867 | // user wants file status info |
868 | edit_status(); | 868 | edit_status(); |
@@ -2432,7 +2432,7 @@ static Byte *get_input_line(Byte * prompt) // get input line- use "status line" | |||
2432 | } | 2432 | } |
2433 | refresh(FALSE); | 2433 | refresh(FALSE); |
2434 | free(obufp); | 2434 | free(obufp); |
2435 | obufp = (Byte *) xstrdup((char *) buf); | 2435 | obufp = (Byte *) bb_xstrdup((char *) buf); |
2436 | return (obufp); | 2436 | return (obufp); |
2437 | } | 2437 | } |
2438 | 2438 | ||
@@ -3263,7 +3263,7 @@ key_cmd_mode: | |||
3263 | // Stuff the last_modifying_cmd back into stdin | 3263 | // Stuff the last_modifying_cmd back into stdin |
3264 | // and let it be re-executed. | 3264 | // and let it be re-executed. |
3265 | if (last_modifying_cmd != 0) { | 3265 | if (last_modifying_cmd != 0) { |
3266 | ioq = ioq_start = (Byte *) xstrdup((char *) last_modifying_cmd); | 3266 | ioq = ioq_start = (Byte *) bb_xstrdup((char *) last_modifying_cmd); |
3267 | } | 3267 | } |
3268 | break; | 3268 | break; |
3269 | #endif /* CONFIG_FEATURE_VI_DOT_CMD */ | 3269 | #endif /* CONFIG_FEATURE_VI_DOT_CMD */ |
@@ -3278,7 +3278,7 @@ key_cmd_mode: | |||
3278 | if (strlen((char *) q) > 1) { // new pat- save it and find | 3278 | if (strlen((char *) q) > 1) { // new pat- save it and find |
3279 | // there is a new pat | 3279 | // there is a new pat |
3280 | free(last_search_pattern); | 3280 | free(last_search_pattern); |
3281 | last_search_pattern = (Byte *) xstrdup((char *) q); | 3281 | last_search_pattern = (Byte *) bb_xstrdup((char *) q); |
3282 | goto dc3; // now find the pattern | 3282 | goto dc3; // now find the pattern |
3283 | } | 3283 | } |
3284 | // user changed mind and erased the "/"- do nothing | 3284 | // user changed mind and erased the "/"- do nothing |