*: hopefully all setup_common_bufsiz() are in place

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
This commit is contained in:
Denys Vlasenko
2016-04-21 18:38:51 +02:00
parent 47cfbf32fd
commit 9de2e5a222
29 changed files with 83 additions and 55 deletions

View File

@@ -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;

View File

@@ -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)