]> git.pld-linux.org Git - packages/screen.git/blame - screen-inputline-size.patch
- add xterm-color
[packages/screen.git] / screen-inputline-size.patch
CommitLineData
b81ee7b6
ER
1--- screen-4.1/input.c~ 2010-02-24 14:51:55.000000000 +0200
2+++ screen-4.1/input.c 2010-02-24 14:53:38.919505608 +0200
83189996 3@@ -38,7 +38,7 @@
7d5cce83 4
7d5cce83
ER
5 struct inpline
6 {
7- char buf[101]; /* text buffer */
8+ char buf[MAX_INPUTLINE]; /* text buffer */
9 int len; /* length of the editible string */
10 int pos; /* cursor position in editable string */
11 };
83189996 12@@ -49,7 +49,7 @@
7d5cce83
ER
13 struct inpdata
14 {
15 struct inpline inp;
16- int inpmaxlen; /* 100, or less, if caller has shorter buffer */
17+ int inpmaxlen; /* MAX_INPUTLINE-1, or less, if caller has shorter buffer */
18 char *inpstring; /* the prompt */
19 int inpstringlen; /* length of the prompt */
20 int inpmode; /* INP_NOECHO, INP_RAW, INP_EVERY */
b81ee7b6
ER
21@@ -133,8 +133,8 @@
22 if (!flayer)
23 return;
24
7d5cce83
ER
25- if (len > 100)
26- len = 100;
27+ if (len > MAX_INPUTLINE - 1)
83189996 28+ len = MAX_INPUTLINE - 1;
7d5cce83
ER
29 if (!(mode & INP_NOECHO))
30 {
31 maxlen = flayer->l_width - 1 - strlen(istr);
b81ee7b6
ER
32--- screen-4.1/process.c~ 2010-02-24 15:30:55.000000000 +0200
33+++ screen-4.1/process.c 2010-02-24 15:32:17.993069465 +0200
34@@ -1777,7 +1777,7 @@
35 s = *args;
36 if (!args[0])
37 {
38- Input("Stuff:", 100, INP_COOKED, StuffFin, NULL, 0);
39+ Input("Stuff:", MAX_INPUTLINE - 1, INP_COOKED, StuffFin, NULL, 0);
40 break;
41 }
42 n = *argl;
43@@ -2063,7 +2063,7 @@
7d5cce83
ER
44 ChangeAKA(fore, *args, strlen(*args));
45 break;
46 case RC_COLON:
b81ee7b6
ER
47- Input(":", 100, INP_EVERY, Colonfin, NULL, 0);
48+ Input(":", MAX_INPUTLINE - 1, INP_EVERY, Colonfin, NULL, 0);
7d5cce83
ER
49 if (*args && **args)
50 {
51 s = *args;
b81ee7b6 52@@ -3236,7 +3236,7 @@
7d5cce83
ER
53 Msg(0, "%s: password: window required", rc_name);
54 break;
55 }
b81ee7b6
ER
56- Input("New screen password:", 100, INP_NOECHO, pass1, display ? (char *)D_user : (char *)users, 0);
57+ Input("New screen password:", MAX_INPUTLINE - 1, INP_NOECHO, pass1, display ? (char *)D_user : (char *)users, 0);
7d5cce83
ER
58 }
59 break;
60 #endif /* PASSWORD */
b81ee7b6
ER
61@@ -6258,7 +6258,7 @@
62 free((char *)u->u_password);
63 u->u_password = SaveStr(buf);
64 bzero(buf, strlen(buf));
65- Input("Retype new password:", 100, INP_NOECHO, pass2, data, 0);
66+ Input("Retype new password:", MAX_INPUTLINE - 1, INP_NOECHO, pass2, data, 0);
67 }
68
69 static void
83189996
ER
70--- screen-4.0.2/screen.h~ 2006-02-23 00:27:51.000000000 +0200
71+++ screen-4.0.2/screen.h 2006-02-23 00:31:32.000000000 +0200
72@@ -270,6 +270,7 @@
73 #define INP_RAW 2
74 #define INP_EVERY 4
75
76+#define MAX_INPUTLINE 512
77
78 #ifdef MULTIUSER
79 struct acl
This page took 0.054181 seconds and 4 git commands to generate.