]> git.pld-linux.org Git - packages/screen.git/blob - screen-inputline-size.patch
- rel 18
[packages/screen.git] / screen-inputline-size.patch
1 diff -u screen-4.0.2/input.c screen-4.0.2/input.c
2 --- screen-4.0.2/input.c        2006-02-22 23:38:20.000000000 +0200
3 +++ screen-4.0.2/input.c        2006-02-23 00:31:34.000000000 +0200
4 @@ -38,7 +38,7 @@
5  
6  struct inpline
7  {
8 -  char  buf[101];      /* text buffer */
9 +  char  buf[MAX_INPUTLINE];    /* text buffer */
10    int  len;            /* length of the editible string */
11    int  pos;            /* cursor position in editable string */
12  };
13 @@ -49,7 +49,7 @@
14  struct inpdata
15  {
16    struct inpline inp;
17 -  int  inpmaxlen;      /* 100, or less, if caller has shorter buffer */
18 +  int  inpmaxlen;      /* MAX_INPUTLINE-1, or less, if caller has shorter buffer */
19    char *inpstring;     /* the prompt */
20    int  inpstringlen;   /* length of the prompt */
21    int  inpmode;                /* INP_NOECHO, INP_RAW, INP_EVERY */
22 @@ -116,8 +116,8 @@
23    int maxlen;
24    struct inpdata *inpdata;
25    
26 -  if (len > 100)
27 -    len = 100;
28 +  if (len > MAX_INPUTLINE - 1)
29 +    len = MAX_INPUTLINE - 1;
30    if (!(mode & INP_NOECHO))
31      {
32        maxlen = flayer->l_width - 1 - strlen(istr);
33 diff -u screen-4.0.2/process.c screen-4.0.2/process.c
34 --- screen-4.0.2/process.c      2006-02-23 00:27:01.000000000 +0200
35 +++ screen-4.0.2/process.c      2006-02-23 00:32:27.000000000 +0200
36 @@ -1891,7 +1891,7 @@
37         ChangeAKA(fore, *args, strlen(*args));
38        break;
39      case RC_COLON:
40 -      Input(":", 100, INP_COOKED, Colonfin, NULL);
41 +      Input(":", MAX_INPUTLINE - 1, INP_COOKED, Colonfin, NULL);
42        if (*args && **args)
43         {
44           s = *args;
45 @@ -3004,7 +3004,7 @@
46               Msg(0, "%s: password: window required", rc_name);
47               break;
48             }
49 -         Input("New screen password:", 100, INP_NOECHO, pass1, display ? (char *)D_user : (char *)users);
50 +         Input("New screen password:", MAX_INPUTLINE - 1, INP_NOECHO, pass1, display ? (char *)D_user : (char *)users);
51         }
52        break;
53  #endif                         /* PASSWORD */
54 only in patch2:
55 unchanged:
56 --- screen-4.0.2/screen.h~      2006-02-23 00:27:51.000000000 +0200
57 +++ screen-4.0.2/screen.h       2006-02-23 00:31:32.000000000 +0200
58 @@ -270,6 +270,7 @@
59  #define INP_RAW                2
60  #define INP_EVERY      4
61  
62 +#define MAX_INPUTLINE 512
63  
64  #ifdef MULTIUSER
65  struct acl
This page took 0.034433 seconds and 3 git commands to generate.