Contents of /trunk/busybox/patches/busybox-1.8.2-vi.patch
Parent Directory | Revision Log
Revision 448 -
(show annotations)
(download)
Tue Jan 22 22:52:35 2008 UTC (16 years, 8 months ago) by niro
File size: 1193 byte(s)
Tue Jan 22 22:52:35 2008 UTC (16 years, 8 months ago) by niro
File size: 1193 byte(s)
-patches for busybox-1.8.2-r1
1 | diff -urN busybox-1.8.2/editors/vi.c busybox-1.8.2-vi/editors/vi.c |
2 | --- busybox-1.8.2/editors/vi.c 2007-11-10 01:40:54.000000000 +0000 |
3 | +++ busybox-1.8.2-vi/editors/vi.c 2007-12-10 16:26:01.000000000 +0000 |
4 | @@ -184,6 +184,7 @@ |
5 | #if ENABLE_FEATURE_VI_COLON |
6 | char *initial_cmds[3]; // currently 2 entries, NULL terminated |
7 | #endif |
8 | + char readbuffer[MAX_LINELEN]; |
9 | }; |
10 | #define G (*ptr_to_globals) |
11 | #define text (G.text ) |
12 | @@ -200,6 +201,10 @@ |
13 | #define term_orig (G.term_orig ) |
14 | #define term_vi (G.term_vi ) |
15 | #define initial_cmds (G.initial_cmds ) |
16 | +#define readbuffer (G.readbuffer ) |
17 | +#define INIT_G() do { \ |
18 | + PTR_TO_GLOBALS = xzalloc(sizeof(G)); \ |
19 | +} while (0) |
20 | |
21 | static int init_text_buffer(char *); // init from file or create new |
22 | static void edit_file(char *); // edit one file |
23 | @@ -321,7 +326,7 @@ |
24 | my_pid = getpid(); |
25 | #endif |
26 | |
27 | - PTR_TO_GLOBALS = xzalloc(sizeof(G)); |
28 | + INIT_G(); |
29 | |
30 | #if ENABLE_FEATURE_VI_CRASHME |
31 | srand((long) my_pid); |
32 | @@ -2142,8 +2147,6 @@ |
33 | return safe_poll(pfd, 1, hund*10) > 0; |
34 | } |
35 | |
36 | -#define readbuffer bb_common_bufsiz1 |
37 | - |
38 | static int readed_for_parse; |
39 | |
40 | //----- IO Routines -------------------------------------------- |