]> git.pld-linux.org Git - packages/busybox.git/blame - busybox-vi.patch
- BR uClibc-static >= 3:0.9.30.1 (it has combreloc|relro filtering built in)
[packages/busybox.git] / busybox-vi.patch
CommitLineData
15f6552c 1--- busybox-1.12.1/editors/vi.c Sun Sep 28 20:04:29 2008
2+++ busybox-1.12.1-vi/editors/vi.c Thu Oct 30 23:54:30 2008
3@@ -291,6 +291,8 @@
4 #define INIT_G() do { \
5 SET_PTR_TO_GLOBALS(xzalloc(sizeof(G))); \
6 last_file_modified = -1; \
7+ /* "" but has space for 2 chars */ \
8+ USE_FEATURE_VI_SEARCH(last_search_pattern = xzalloc(2);) \
9 } while (0)
10
11
12@@ -2974,7 +2976,7 @@
13 const char *msg = msg; // for compiler
14 char c1, *p, *q, *save_dot;
15 char buf[12];
16- int dir = dir; // for compiler
17+ int dir;
18 int cnt, i, j;
19
20 // c1 = c; // quiet the compiler
21@@ -3316,7 +3318,7 @@
22 q = get_input_line(buf); // get input line- use "status line"
23 if (q[0] && !q[1]) {
24 if (last_search_pattern[0])
25- last_search_pattern[0] = c;
26+ last_search_pattern[0] = c;
27 goto dc3; // if no pat re-use old pat
28 }
29 if (q[0]) { // strlen(q) > 1: new pat- save it and find
30@@ -3346,14 +3348,8 @@
31 do_cmd(c);
32 } // repeat cnt
33 dc3:
34- if (last_search_pattern == 0) {
35- msg = "No previous regular expression";
36- goto dc2;
37- }
38- if (last_search_pattern[0] == '/') {
39- dir = FORWARD; // assume FORWARD search
40- p = dot + 1;
41- }
42+ dir = FORWARD; // assume FORWARD search
43+ p = dot + 1;
44 if (last_search_pattern[0] == '?') {
45 dir = BACK;
46 p = dot - 1;
This page took 0.04972 seconds and 4 git commands to generate.