aboutsummaryrefslogtreecommitdiff
path: root/editors
diff options
context:
space:
mode:
authorRon Yorston <rmy@pobox.com>2012-03-22 13:15:08 +0000
committerRon Yorston <rmy@pobox.com>2012-03-22 13:15:08 +0000
commitc0d4367d6b581eb5989c02815880cf0fa2851ae8 (patch)
tree868c266e627e2d7f65ba5a4d5f98a1c421453181 /editors
parentf6bad5ef766b0447158e3de2f55c35f1f6cecb58 (diff)
parentda4441c44f6efccb6f7b7588404d9c6bfb7b6af8 (diff)
downloadbusybox-w32-c0d4367d6b581eb5989c02815880cf0fa2851ae8.tar.gz
busybox-w32-c0d4367d6b581eb5989c02815880cf0fa2851ae8.tar.bz2
busybox-w32-c0d4367d6b581eb5989c02815880cf0fa2851ae8.zip
Merge commit 'da4441c44f6efccb6f7b7588404d9c6bfb7b6af8' into merge
Conflicts: libbb/vfork_daemon_rexec.c networking/wget.c procps/ps.c
Diffstat (limited to 'editors')
-rw-r--r--editors/diff.c9
-rw-r--r--editors/ed.c6
-rw-r--r--editors/sed.c2
3 files changed, 10 insertions, 7 deletions
diff --git a/editors/diff.c b/editors/diff.c
index cc7ba472e..ca4a4eae7 100644
--- a/editors/diff.c
+++ b/editors/diff.c
@@ -794,7 +794,9 @@ static int FAST_FUNC skip_dir(const char *filename,
794 free(othername); 794 free(othername);
795 if (r != 0 || !S_ISDIR(osb.st_mode)) { 795 if (r != 0 || !S_ISDIR(osb.st_mode)) {
796 /* other dir doesn't have similarly named 796 /* other dir doesn't have similarly named
797 * directory, don't recurse */ 797 * directory, don't recurse; return 1 upon
798 * exit, just like diffutils' diff */
799 exit_status |= 1;
798 return SKIP; 800 return SKIP;
799 } 801 }
800 } 802 }
@@ -846,9 +848,10 @@ static void diffdir(char *p[2], const char *s_start)
846 break; 848 break;
847 pos = !dp[0] ? 1 : (!dp[1] ? -1 : strcmp(dp[0], dp[1])); 849 pos = !dp[0] ? 1 : (!dp[1] ? -1 : strcmp(dp[0], dp[1]));
848 k = pos > 0; 850 k = pos > 0;
849 if (pos && !(option_mask32 & FLAG(N))) 851 if (pos && !(option_mask32 & FLAG(N))) {
850 printf("Only in %s: %s\n", p[k], dp[k]); 852 printf("Only in %s: %s\n", p[k], dp[k]);
851 else { 853 exit_status |= 1;
854 } else {
852 char *fullpath[2], *path[2]; /* if -N */ 855 char *fullpath[2], *path[2]; /* if -N */
853 856
854 for (i = 0; i < 2; i++) { 857 for (i = 0; i < 2; i++) {
diff --git a/editors/ed.c b/editors/ed.c
index 859668406..b1b6a8d27 100644
--- a/editors/ed.c
+++ b/editors/ed.c
@@ -129,7 +129,7 @@ static void doCommands(void)
129 * 0 on ctrl-C, 129 * 0 on ctrl-C,
130 * >0 length of input string, including terminating '\n' 130 * >0 length of input string, including terminating '\n'
131 */ 131 */
132 len = read_line_input(": ", buf, sizeof(buf), NULL); 132 len = read_line_input(NULL, ": ", buf, sizeof(buf), /*timeout*/ -1);
133 if (len <= 0) 133 if (len <= 0)
134 return; 134 return;
135 endbuf = &buf[len - 1]; 135 endbuf = &buf[len - 1];
@@ -227,7 +227,7 @@ static void doCommands(void)
227 } 227 }
228 if (!dirty) 228 if (!dirty)
229 return; 229 return;
230 len = read_line_input("Really quit? ", buf, 16, NULL); 230 len = read_line_input(NULL, "Really quit? ", buf, 16, /*timeout*/ -1);
231 /* read error/EOF - no way to continue */ 231 /* read error/EOF - no way to continue */
232 if (len < 0) 232 if (len < 0)
233 return; 233 return;
@@ -541,7 +541,7 @@ static void addLines(int num)
541 * 0 on ctrl-C, 541 * 0 on ctrl-C,
542 * >0 length of input string, including terminating '\n' 542 * >0 length of input string, including terminating '\n'
543 */ 543 */
544 len = read_line_input("", buf, sizeof(buf), NULL); 544 len = read_line_input(NULL, "", buf, sizeof(buf), /*timeout*/ -1);
545 if (len <= 0) { 545 if (len <= 0) {
546 /* Previously, ctrl-C was exiting to shell. 546 /* Previously, ctrl-C was exiting to shell.
547 * Now we exit to ed prompt. Is in important? */ 547 * Now we exit to ed prompt. Is in important? */
diff --git a/editors/sed.c b/editors/sed.c
index b91acfb7f..d3555243f 100644
--- a/editors/sed.c
+++ b/editors/sed.c
@@ -124,7 +124,7 @@ struct globals {
124} FIX_ALIASING; 124} FIX_ALIASING;
125#define G (*(struct globals*)&bb_common_bufsiz1) 125#define G (*(struct globals*)&bb_common_bufsiz1)
126struct BUG_G_too_big { 126struct BUG_G_too_big {
127 char BUG_G_too_big[sizeof(G) <= COMMON_BUFSIZE ? 1 : -1]; 127 char BUG_G_too_big[sizeof(G) <= COMMON_BUFSIZE ? 1 : -1];
128}; 128};
129#define INIT_G() do { \ 129#define INIT_G() do { \
130 G.sed_cmd_tail = &G.sed_cmd_head; \ 130 G.sed_cmd_tail = &G.sed_cmd_head; \