1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
|
Author: <hesso@pool.math.tu-berlin.de>
Description: * Increase the MAXSTR macro to suit present-day needs.
* Increase the maximum length of the input line buffer likewise.
Index: screen/input.c
===================================================================
--- screen.orig/input.c 2014-04-17 14:19:10.747075706 +0200
+++ screen/input.c 2014-04-17 14:19:10.731076736 +0200
@@ -43,7 +43,7 @@
struct inpline
{
- char buf[101]; /* text buffer */
+ char buf[MAXSTR+1]; /* text buffer */
int len; /* length of the editible string */
int pos; /* cursor position in editable string */
struct inpline *next, *prev;
@@ -58,7 +58,7 @@
struct inpdata
{
struct inpline inp;
- int inpmaxlen; /* 100, or less, if caller has shorter buffer */
+ int inpmaxlen; /* MAXSTR, or less, if caller has shorter buffer */
char *inpstring; /* the prompt */
int inpstringlen; /* length of the prompt */
int inpmode; /* INP_NOECHO, INP_RAW, INP_EVERY */
@@ -134,8 +134,8 @@
if (!flayer)
return;
- if (len > 100)
- len = 100;
+ if (len > MAXSTR)
+ len = MAXSTR;
if (!(mode & INP_NOECHO))
{
maxlen = flayer->l_width - 1 - strlen(istr);
Index: screen/process.c
===================================================================
--- screen.orig/process.c 2014-04-17 14:19:10.747075706 +0200
+++ screen/process.c 2014-04-17 14:19:10.735076470 +0200
@@ -2097,7 +2097,7 @@
ChangeAKA(fore, *args, strlen(*args));
break;
case RC_COLON:
- Input(":", 100, INP_EVERY, Colonfin, NULL, 0);
+ Input(":", MAXSTR, INP_EVERY, Colonfin, NULL, 0);
if (*args && **args)
{
s = *args;
Index: screen/screen.h
===================================================================
--- screen.orig/screen.h 2014-04-17 14:19:10.747075706 +0200
+++ screen/screen.h 2014-04-17 14:19:10.739076209 +0200
@@ -91,7 +91,7 @@
#define Ctrl(c) ((c)&037)
-#define MAXSTR 512
+#define MAXSTR 768
#define MAXARGS 64
#define MSGWAIT 5
#define MSGMINWAIT 1
Index: screen/window.c
===================================================================
--- screen.orig/window.c 2014-04-17 14:19:10.747075706 +0200
+++ screen/window.c 2014-04-17 14:19:10.739076209 +0200
@@ -2237,7 +2237,7 @@
return;
}
flayer = &p->w_layer;
- Input(":", 100, INP_COOKED, zmodem_fin, NULL, 0);
+ Input(":", MAXSTR, INP_COOKED, zmodem_fin, NULL, 0);
s = send ? zmodem_sendcmd : zmodem_recvcmd;
n = strlen(s);
LayProcess(&s, &n);
|