framework for the installation of the configuration files. Fixed compile warning message due to implicit casting
77 lines
1.9 KiB
Text
77 lines
1.9 KiB
Text
$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
|