summaryrefslogtreecommitdiff
path: root/editors
diff options
context:
space:
mode:
Diffstat (limited to 'editors')
-rw-r--r--editors/diff.c1
-rw-r--r--editors/ed.c8
-rw-r--r--editors/sed.c3
3 files changed, 8 insertions, 4 deletions
diff --git a/editors/diff.c b/editors/diff.c
index a892cfd..3c8e907 100644
--- a/editors/diff.c
+++ b/editors/diff.c
@@ -125,6 +125,7 @@
//usage: "\n -w Ignore all whitespace"
#include "libbb.h"
+#include "common_bufsiz.h"
#if 0
# define dbg_error_msg(...) bb_error_msg(__VA_ARGS__)
diff --git a/editors/ed.c b/editors/ed.c
index a4c4190..8da7b1d 100644
--- a/editors/ed.c
+++ b/editors/ed.c
@@ -23,6 +23,7 @@
//usage:#define ed_full_usage ""
#include "libbb.h"
+#include "common_bufsiz.h"
typedef struct LINE {
struct LINE *next;
@@ -32,11 +33,12 @@ typedef struct LINE {
} LINE;
-#define searchString bb_common_bufsiz1
+#define searchString bb_common_bufsiz1
+#define sizeof_searchString COMMON_BUFSIZE
enum {
- USERSIZE = sizeof(searchString) > 1024 ? 1024
- : sizeof(searchString) - 1, /* max line length typed in by user */
+ USERSIZE = sizeof_searchString > 1024 ? 1024
+ : sizeof_searchString - 1, /* max line length typed in by user */
INITBUF_SIZE = 1024, /* initial buffer size */
};
diff --git a/editors/sed.c b/editors/sed.c
index 9c4c8e1..330190e 100644
--- a/editors/sed.c
+++ b/editors/sed.c
@@ -86,6 +86,7 @@
//usage: "bar\n"
#include "libbb.h"
+#include "common_bufsiz.h"
#include "xregex.h"
#if 0
@@ -161,7 +162,7 @@ struct globals {
int len; /* Space allocated */
} pipeline;
} FIX_ALIASING;
-#define G (*(struct globals*)&bb_common_bufsiz1)
+#define G (*(struct globals*)bb_common_bufsiz1)
#define INIT_G() do { \
BUILD_BUG_ON(sizeof(G) > COMMON_BUFSIZE); \
G.sed_cmd_tail = &G.sed_cmd_head; \