diff options
author | Denys Vlasenko | 2016-04-21 18:38:51 +0200 |
---|---|---|
committer | Denys Vlasenko | 2016-04-21 18:38:51 +0200 |
commit | 9de2e5a22213842da5b116723392de88de9ed419 (patch) | |
tree | dff999a566382174e084d377dc3b4c03de1d4c62 /editors | |
parent | 47cfbf32fd66563f8c4e09ad6cced6abfbe2fad5 (diff) | |
download | busybox-9de2e5a22213842da5b116723392de88de9ed419.zip busybox-9de2e5a22213842da5b116723392de88de9ed419.tar.gz |
*: hopefully all setup_common_bufsiz() are in place
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'editors')
-rw-r--r-- | editors/diff.c | 1 | ||||
-rw-r--r-- | editors/ed.c | 8 |
2 files changed, 5 insertions, 4 deletions
diff --git a/editors/diff.c b/editors/diff.c index 3c8e907..ff26936 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 8da7b1d..c028b78 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) |