SOURCES: busybox-vi.patch (NEW), busybox-lineedit.patch (NEW) - busybox 1.1...

hawk hawk at pld-linux.org
Fri Oct 31 19:08:52 CET 2008


Author: hawk                         Date: Fri Oct 31 18:08:52 2008 GMT
Module: SOURCES                       Tag: HEAD
---- Log message:
- busybox 1.12.1 fix

---- Files affected:
SOURCES:
   busybox-vi.patch (NONE -> 1.1)  (NEW), busybox-lineedit.patch (NONE -> 1.1)  (NEW)

---- Diffs:

================================================================
Index: SOURCES/busybox-vi.patch
diff -u /dev/null SOURCES/busybox-vi.patch:1.1
--- /dev/null	Fri Oct 31 19:08:53 2008
+++ SOURCES/busybox-vi.patch	Fri Oct 31 19:08:46 2008
@@ -0,0 +1,46 @@
+--- busybox-1.12.1/editors/vi.c	Sun Sep 28 20:04:29 2008
++++ busybox-1.12.1-vi/editors/vi.c	Thu Oct 30 23:54:30 2008
+@@ -291,6 +291,8 @@
+ #define INIT_G() do { \
+ 	SET_PTR_TO_GLOBALS(xzalloc(sizeof(G))); \
+ 	last_file_modified = -1; \
++	/* "" but has space for 2 chars */ \
++	USE_FEATURE_VI_SEARCH(last_search_pattern = xzalloc(2);) \
+ } while (0)
+ 
+ 
+@@ -2974,7 +2976,7 @@
+ 	const char *msg = msg; // for compiler
+ 	char c1, *p, *q, *save_dot;
+ 	char buf[12];
+-	int dir = dir; // for compiler
++	int dir;
+ 	int cnt, i, j;
+ 
+ //	c1 = c; // quiet the compiler
+@@ -3316,7 +3318,7 @@
+ 		q = get_input_line(buf);	// get input line- use "status line"
+ 		if (q[0] && !q[1]) {
+ 			if (last_search_pattern[0])
+-			    last_search_pattern[0] = c;
++				last_search_pattern[0] = c;
+ 			goto dc3; // if no pat re-use old pat
+ 		}
+ 		if (q[0]) {       // strlen(q) > 1: new pat- save it and find
+@@ -3346,14 +3348,8 @@
+ 			do_cmd(c);
+ 		}				// repeat cnt
+  dc3:
+-		if (last_search_pattern == 0) {
+-			msg = "No previous regular expression";
+-			goto dc2;
+-		}
+-		if (last_search_pattern[0] == '/') {
+-			dir = FORWARD;	// assume FORWARD search
+-			p = dot + 1;
+-		}
++		dir = FORWARD;	// assume FORWARD search
++		p = dot + 1;
+ 		if (last_search_pattern[0] == '?') {
+ 			dir = BACK;
+ 			p = dot - 1;

================================================================
Index: SOURCES/busybox-lineedit.patch
diff -u /dev/null SOURCES/busybox-lineedit.patch:1.1
--- /dev/null	Fri Oct 31 19:08:54 2008
+++ SOURCES/busybox-lineedit.patch	Fri Oct 31 19:08:47 2008
@@ -0,0 +1,13 @@
+diff -urpN busybox-1.12.1.orig/libbb/lineedit.c busybox-1.12.1/libbb/lineedit.c
+--- busybox-1.12.1.orig/libbb/lineedit.c	2008-09-28 20:04:20.000000000 +0200
++++ busybox-1.12.1/libbb/lineedit.c	2008-10-31 19:01:43.000000000 +0100
+@@ -1415,7 +1415,8 @@ int FAST_FUNC read_line_input(const char
+ 	if ((state->flags & SAVE_HISTORY) && state->hist_file)
+ 		load_history(state->hist_file);
+ #endif
+-	state->cur_history = state->cnt_history;
++	if (state->flags)
++		state->cur_history = state->cnt_history;
+ 
+ 	/* prepare before init handlers */
+ 	cmdedit_y = 0;  /* quasireal y, not true if line > xt*yt */
================================================================


More information about the pld-cvs-commit mailing list