diff options
author | Denis Vlasenko | 2008-03-21 08:50:06 +0000 |
---|---|---|
committer | Denis Vlasenko | 2008-03-21 08:50:06 +0000 |
commit | 9924ce1cdcb6e4ab9635d6370ff7db6219c56094 (patch) | |
tree | 519c1bd5ff03997c9b11ceb7972da7467e44ea48 /editors | |
parent | 80297d5f0cbe8a3de497804dcbb1a89e6f9c1562 (diff) | |
download | busybox-9924ce1cdcb6e4ab9635d6370ff7db6219c56094.zip busybox-9924ce1cdcb6e4ab9635d6370ff7db6219c56094.tar.gz |
apply four post-1.8.2 patches; bump to 1.8.31_8_3
Diffstat (limited to 'editors')
-rw-r--r-- | editors/vi.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/editors/vi.c b/editors/vi.c index 345a945..9426ab8 100644 --- a/editors/vi.c +++ b/editors/vi.c @@ -184,6 +184,7 @@ struct globals { #if ENABLE_FEATURE_VI_COLON char *initial_cmds[3]; // currently 2 entries, NULL terminated #endif + char readbuffer[MAX_LINELEN]; }; #define G (*ptr_to_globals) #define text (G.text ) @@ -200,6 +201,10 @@ struct globals { #define term_orig (G.term_orig ) #define term_vi (G.term_vi ) #define initial_cmds (G.initial_cmds ) +#define readbuffer (G.readbuffer ) +#define INIT_G() do { \ + PTR_TO_GLOBALS = xzalloc(sizeof(G)); \ +} while (0) static int init_text_buffer(char *); // init from file or create new static void edit_file(char *); // edit one file @@ -321,7 +326,7 @@ int vi_main(int argc, char **argv) my_pid = getpid(); #endif - PTR_TO_GLOBALS = xzalloc(sizeof(G)); + INIT_G(); #if ENABLE_FEATURE_VI_CRASHME srand((long) my_pid); @@ -2142,8 +2147,6 @@ static int mysleep(int hund) // sleep for 'h' 1/100 seconds return safe_poll(pfd, 1, hund*10) > 0; } -#define readbuffer bb_common_bufsiz1 - static int readed_for_parse; //----- IO Routines -------------------------------------------- |