1
0
mirror of https://github.com/gryf/wmaker.git synced 2025-12-19 12:28:22 +01:00

Update to Window Maker 0.50.2

This commit is contained in:
dan
1999-01-11 12:28:12 +00:00
parent a37bb3aed5
commit cb320b2fc3
87 changed files with 4999 additions and 4465 deletions

View File

@@ -782,7 +782,7 @@ getuserinput(WScreen *scr, char *line, int *ptr)
char *ret;
char *title;
char *prompt;
int i, j, k, state;
int j, k, state;
char tbuffer[256], pbuffer[256];
title = _("Program Arguments");
@@ -796,10 +796,10 @@ getuserinput(WScreen *scr, char *line, int *ptr)
state = _STARTING;
j = 0;
for (i = 0; line[i]==0 && state!=_DONE; i++) {
for (; line[*ptr]==0 && state!=_DONE; *ptr++) {
switch (state) {
case _STARTING:
if (line[i]=='(') {
if (line[*ptr]=='(') {
state = _TITLE;
} else {
state = _DONE;
@@ -807,45 +807,45 @@ getuserinput(WScreen *scr, char *line, int *ptr)
break;
case _TITLE:
if (j <= 0 && line[i]==',') {
if (j <= 0 && line[*ptr]==',') {
j = 0;
if (i > 1) {
strncpy(tbuffer, &line[1], WMIN(i, 255));
tbuffer[WMIN(i, 255)] = 0;
if (*ptr > 1) {
strncpy(tbuffer, &line[1], WMIN(*ptr, 255));
tbuffer[WMIN(*ptr, 255)] = 0;
title = (char*)tbuffer;
}
k = i+1;
k = *ptr+1;
state = _PROMPT;
} else if (j <= 0 && line[i]==')') {
} else if (j <= 0 && line[*ptr]==')') {
if (i > 1) {
strncpy(tbuffer, &line[1], WMIN(i, 255));
tbuffer[WMIN(i, 255)] = 0;
if (*ptr > 1) {
strncpy(tbuffer, &line[1], WMIN(*ptr, 255));
tbuffer[WMIN(*ptr, 255)] = 0;
title = (char*)tbuffer;
}
state = _DONE;
} else if (line[i]=='(')
} else if (line[*ptr]=='(')
j++;
else if (line[i]==')')
else if (line[*ptr]==')')
j--;
break;
case _PROMPT:
if (line[i]==')' && j==0) {
if (line[*ptr]==')' && j==0) {
if (i-k > 1) {
strncpy(pbuffer, &line[k], WMIN(i-k, 255));
pbuffer[WMIN(i-k, 255)] = 0;
if (*ptr-k > 1) {
strncpy(pbuffer, &line[k], WMIN(*ptr-k, 255));
pbuffer[WMIN(*ptr-k, 255)] = 0;
title = (char*)pbuffer;
}
state = _DONE;
} else if (line[i]=='(')
} else if (line[*ptr]=='(')
j++;
else if (line[i]==')')
else if (line[*ptr]==')')
j--;
break;
}