aboutsummaryrefslogtreecommitdiff
path: root/editors/ed.c
diff options
context:
space:
mode:
Diffstat (limited to 'editors/ed.c')
-rw-r--r--editors/ed.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/editors/ed.c b/editors/ed.c
index a4c419099..c028b78cb 100644
--- a/editors/ed.c
+++ b/editors/ed.c
@@ -23,6 +23,7 @@
23//usage:#define ed_full_usage "" 23//usage:#define ed_full_usage ""
24 24
25#include "libbb.h" 25#include "libbb.h"
26#include "common_bufsiz.h"
26 27
27typedef struct LINE { 28typedef struct LINE {
28 struct LINE *next; 29 struct LINE *next;
@@ -35,8 +36,8 @@ typedef struct LINE {
35#define searchString bb_common_bufsiz1 36#define searchString bb_common_bufsiz1
36 37
37enum { 38enum {
38 USERSIZE = sizeof(searchString) > 1024 ? 1024 39 USERSIZE = COMMON_BUFSIZE > 1024 ? 1024
39 : sizeof(searchString) - 1, /* max line length typed in by user */ 40 : COMMON_BUFSIZE - 1, /* max line length typed in by user */
40 INITBUF_SIZE = 1024, /* initial buffer size */ 41 INITBUF_SIZE = 1024, /* initial buffer size */
41}; 42};
42 43
@@ -66,6 +67,7 @@ struct globals {
66#define lines (G.lines ) 67#define lines (G.lines )
67#define marks (G.marks ) 68#define marks (G.marks )
68#define INIT_G() do { \ 69#define INIT_G() do { \
70 setup_common_bufsiz(); \
69 SET_PTR_TO_GLOBALS(xzalloc(sizeof(G))); \ 71 SET_PTR_TO_GLOBALS(xzalloc(sizeof(G))); \
70} while (0) 72} while (0)
71 73