From 9a4f47c0818807491bfdaa6c7ad7802a8b534caa Mon Sep 17 00:00:00 2001 From: tg Date: Sat, 12 Apr 2003 14:32:14 +0000 Subject: [PATCH] increase max line size from 1024 to 4096, hopefully --- LEGAL | 4 ++++ history.c | 3 ++- sh.h | 7 ++++--- vi.c | 3 ++- 4 files changed, 12 insertions(+), 5 deletions(-) diff --git a/LEGAL b/LEGAL index d8325a3..43c4a9c 100644 --- a/LEGAL +++ b/LEGAL @@ -1,8 +1,12 @@ +$MirBSD: LEGAL,v 1.2 2003/04/12 14:32:14 tg Exp $ $OpenBSD: LEGAL,v 1.1.1.1 1996/08/14 06:19:10 downsj Exp $ pdksh is provided AS IS, with NO WARRANTY, either expressed or implied. The vast majority of the code that makes pdksh is in the public domain. + +The exceptions are not included in the MirBSD source tree. + The exceptions are: sigact.c and sigact.h These are covered by copyrighten by Simon J. Gerraty; diff --git a/history.c b/history.c index 7bbb967..d40b9df 100644 --- a/history.c +++ b/history.c @@ -1,3 +1,4 @@ +/* $MirBSD: history.c,v 1.4 2003/04/12 14:32:14 tg Exp $ */ /* $OpenBSD: history.c,v 1.18 2003/04/06 23:39:17 deraadt Exp $ */ /* @@ -934,7 +935,7 @@ hist_shrink(oldbase, oldbytes) int oldbytes; { int fd; - char nfile[1024]; + char nfile[4096]; struct stat statb; unsigned char *nbase = oldbase; int nbytes = oldbytes; diff --git a/sh.h b/sh.h index 4e8c4ac..03d8d8e 100644 --- a/sh.h +++ b/sh.h @@ -1,3 +1,4 @@ +/* $MirBSD: sh.h,v 1.2 2003/04/12 14:32:14 tg Exp $ */ /* $OpenBSD: sh.h,v 1.12 2002/10/07 23:09:32 vincent Exp $ */ /* @@ -366,9 +367,9 @@ typedef INT32 Tflag; #define ISMAGIC(c) ((unsigned char)(c) == MAGIC) #define NOT '!' /* might use ^ (ie, [!...] vs [^..]) */ -#define LINE 1024 /* input line size */ -#define PATH 1024 /* pathname size (todo: PATH_MAX/pathconf()) */ -#define ARRAYMAX 1023 /* max array index */ +#define LINE 4096 /* input line size */ +#define PATH 4096 /* pathname size (todo: PATH_MAX/pathconf()) */ +#define ARRAYMAX 4095 /* max array index */ EXTERN const char *kshname; /* $0 */ EXTERN pid_t kshpid; /* $$, shell pid */ diff --git a/vi.c b/vi.c index 82392a2..f4cf894 100644 --- a/vi.c +++ b/vi.c @@ -1,3 +1,4 @@ +/* $MirBSD: vi.c,v 1.2 2003/04/12 14:32:14 tg Exp $ */ /* $OpenBSD: vi.c,v 1.11 2003/03/13 09:03:07 deraadt Exp $ */ /* @@ -14,7 +15,7 @@ #include "ksh_stat.h" /* completion */ #include "edit.h" -#define CMDLEN 1024 +#define CMDLEN 4096 #define Ctrl(c) (c&0x1f) #define is_wordch(c) (letnum(c))