aboutsummaryrefslogtreecommitdiff
path: root/editors
diff options
context:
space:
mode:
Diffstat (limited to 'editors')
-rw-r--r--editors/diff.c1
-rw-r--r--editors/ed.c8
2 files changed, 5 insertions, 4 deletions
diff --git a/editors/diff.c b/editors/diff.c
index 3c8e9074a..ff269360f 100644
--- a/editors/diff.c
+++ b/editors/diff.c
@@ -749,6 +749,7 @@ static int diffreg(char *file[2])
fp[i] = fdopen(fd, "r");
}
+ setup_common_bufsiz();
while (1) {
const size_t sz = COMMON_BUFSIZE / 2;
char *const buf0 = bb_common_bufsiz1;
diff --git a/editors/ed.c b/editors/ed.c
index 8da7b1dd5..c028b78cb 100644
--- a/editors/ed.c
+++ b/editors/ed.c
@@ -33,12 +33,11 @@ typedef struct LINE {
} LINE;
-#define searchString bb_common_bufsiz1
-#define sizeof_searchString COMMON_BUFSIZE
+#define searchString bb_common_bufsiz1
enum {
- USERSIZE = sizeof_searchString > 1024 ? 1024
- : sizeof_searchString - 1, /* max line length typed in by user */
+ USERSIZE = COMMON_BUFSIZE > 1024 ? 1024
+ : COMMON_BUFSIZE - 1, /* max line length typed in by user */
INITBUF_SIZE = 1024, /* initial buffer size */
};
@@ -68,6 +67,7 @@ struct globals {
#define lines (G.lines )
#define marks (G.marks )
#define INIT_G() do { \
+ setup_common_bufsiz(); \
SET_PTR_TO_GLOBALS(xzalloc(sizeof(G))); \
} while (0)