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
76
77
|
$NetBSD: patch-ag,v 1.2 2006/04/21 02:07:54 wulf Exp $
--- tools.c.orig 2000-04-27 22:18:55.000000000 +0930
+++ tools.c 2006-04-14 11:57:42.000000000 +0930
@@ -72,12 +72,14 @@
void conv_string_from_local(char *s)
{
- while (*s) *s++ = conv_umlaut_from_local(*s);
+ for (; *s; ++s)
+ *s = conv_umlaut_from_local(*s);
}
void conv_string_to_local(char *s)
{
- while (*s) *s++ = conv_umlaut_to_local(*s);
+ for (; *s; ++s)
+ *s = conv_umlaut_to_local(*s);
}
boolean conv_file_umlaut(boolean to_local, char *fname)
@@ -168,7 +170,7 @@
#ifdef __macos__
return (status);
#endif
-#if defined(__linux__) || defined(__NetBSD__)
+#if defined(__linux__) || defined(__NetBSD__) || defined(__DragonFly__)
return (statusconvert(status));
#endif
}
@@ -1221,11 +1223,11 @@
static short iscalpha(char c)
{
- if (isupper(c))
+ if (isupper((u_char) c))
return 1;
- else if (isdigit(c))
+ else if (isdigit((u_char) c))
return 0;
- else if (islower(c))
+ else if (islower((u_char) c))
return 1;
else
return -1;
@@ -2202,11 +2204,11 @@
if (only_numbers) {
do {
c = dp_randomize(48, 57);
- } while (!isdigit(c));
+ } while (!isdigit((u_char) c));
} else {
do {
c = dp_randomize(48, 122);
- } while (!isalnum(c));
+ } while (!isalnum((u_char) c));
}
sprintf(MDprompt + strlen(MDprompt), "%c", c);
}
@@ -2349,7 +2351,7 @@
upper(hs);
p = hs;
while (*p) {
- if (!isupper(*p) && !isdigit(*p)) *p = '\0';
+ if (!isupper((u_char) *p) && !isdigit((u_char) *p)) *p = '\0';
p++;
}
s = hs;
@@ -2840,7 +2842,7 @@
for (TmpPtr = ConvStr; *OriginStr; TmpPtr++, OriginStr++)
{
- *TmpPtr = tolower(*OriginStr);
+ *TmpPtr = tolower((u_char) *OriginStr);
if (*OriginStr < '0') /* Satzzeichen neutralisieren */
*TmpPtr = ' ';
else
|