patch-1.3.79 linux/scripts/lxdialog/util.c
Next file: linux/scripts/patch-kernel
Previous file: linux/scripts/lxdialog/menubox.c
Back to the patch index
Back to the overall index
- Lines: 21
- Date:
Tue Mar 26 17:49:18 1996
- Orig file:
v1.3.78/linux/scripts/lxdialog/util.c
- Orig date:
Wed Mar 13 08:38:53 1996
diff -u --recursive --new-file v1.3.78/linux/scripts/lxdialog/util.c linux/scripts/lxdialog/util.c
@@ -342,13 +342,16 @@
int
first_alpha(const char *string)
{
- int i, in_paren=0;
+ int i, in_paren=0, c;
for (i = 0; i < strlen(string); i++) {
- if (string[i] == '(') ++in_paren;
- if (string[i] == ')') --in_paren;
+ c = tolower(string[i]);
- if ((! in_paren) && isalpha(string[i]))
+ if (c == '(') ++in_paren;
+ if (c == ')') --in_paren;
+
+ if ((! in_paren) && isalpha(c) &&
+ strchr("nNyYmM", c) == 0)
return i;
}
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov
with Sam's (original) version of this