summaryrefslogtreecommitdiff
path: root/Build/source/libs/libpaper/TLpatches/patch-04-unsigned
blob: 9898556074bc304ca948345d2eca9f8a108b89c0 (plain)
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
diff -ur libpaper-1.1.29/lib/dimen.c libpaper-src/lib/dimen.c
--- libpaper-1.1.29/lib/dimen.c	2002-11-11 09:56:08.000000000 +0900
+++ libpaper-src/lib/dimen.c	2024-01-07 11:42:10.000000000 +0900
@@ -53,9 +53,9 @@
 
     if (*(unit = what) == '-') ++unit;
 
-    for (; isdigit(*unit) || (*unit == '.' && !dot++); ++unit);
+    for (; isdigit((unsigned char)*unit) || (*unit == '.' && !dot++); ++unit);
 
-    if (*unit && !isalpha(*unit)) {
+    if (*unit && !isalpha((unsigned char)*unit)) {
 	return -1;
     } else {
 	double base = atof(what);
diff -ur libpaper-1.1.29/src/paperconf.c libpaper-src/src/paperconf.c
--- libpaper-1.1.29/src/paperconf.c	2012-05-04 04:05:12.000000000 +0900
+++ libpaper-src/src/paperconf.c	2024-01-07 11:42:10.000000000 +0900
@@ -53,8 +53,8 @@
 	printf("%s", papername(paper));
 	pr = 1;
     } else if (options & OPT_UPPERNAME) {
-	if (islower(*papername(paper))) {
-	    printf("%c%s", toupper(*papername(paper)), papername(paper) + 1);
+	if (islower((unsigned char)*papername(paper))) {
+	    printf("%c%s", toupper((unsigned char)*papername(paper)), papername(paper) + 1);
 	} else {
 	    printf("%s", papername(paper));
 	}