summaryrefslogtreecommitdiff
path: root/graphics/svgalib/files/patch-aj
blob: dbc29722c3c4e58b29db9c1ac4a85ae162f638f7 (plain) (blame)
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
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
diff -druN svgalib-1.4.2.orig/src/mach32.c src/mach32.c
--- svgalib-1.4.2.orig/src/mach32.c	Fri Aug 25 04:39:39 2000
+++ src/mach32.c	Fri Aug 25 04:39:57 2000
@@ -2415,7 +2415,7 @@
     return ptr;
 }
 
-static int isnumber(char *str)
+static int is_number(char *str)
 {
     if (str == NULL)
 	return 0;
@@ -2607,11 +2607,11 @@
 	    goto ex_inv_mod;
 	}
 	if (*ptr == ':') {	/*No. of clock given */
-	    if (!isnumber(ptr + 1))
+	    if (!is_number(ptr + 1))
 		goto inv_clk;
 	    i = atoi(ptr + 1);
 	} else {		/* search clock in table */
-	    if (!isnumber(ptr))
+	    if (!is_number(ptr))
 		goto inv_clk;
 	    flag = atoi(ptr);
 	    for (i = 0; i < 32; i++)
@@ -2627,45 +2627,45 @@
 	mptr->disp_cntl = 0x23;	/* Assume non interlaced */
 	/* The rest is straight forward: */
 	ptr = strtok(NULL, " ");
-	if (!isnumber(ptr)) {
+	if (!is_number(ptr)) {
 	  inv_time:
 	    puts("mach32-config: Invalid define command, timing is invalid");
 	    goto ex_inv_mod;
 	}
 	mptr->h_disp = (atoi(ptr) >> 3) - 1;
 	ptr = strtok(NULL, " ");
-	if (!isnumber(ptr))
+	if (!is_number(ptr))
 	    goto inv_time;
 	i = atoi(ptr);
 	mptr->h_sync_strt = (i >> 3) - 1;
 	ptr = strtok(NULL, " ");
-	if (!isnumber(ptr))
+	if (!is_number(ptr))
 	    goto inv_time;
 	mptr->h_sync_wid = ((atoi(ptr) - i) >> 3);
 	if (mptr->h_sync_wid > 0x1f)
 	    mptr->h_sync_wid = 0x1f;
 	ptr = strtok(NULL, " ");
-	if (!isnumber(ptr))
+	if (!is_number(ptr))
 	    goto inv_time;
 	mptr->h_total = (atoi(ptr) >> 3) - 1;
 
 	ptr = strtok(NULL, " ");
-	if (!isnumber(ptr))
+	if (!is_number(ptr))
 	    goto inv_time;
 	mptr->v_disp = mach32_skip2(atoi(ptr) - 1);
 	ptr = strtok(NULL, " ");
-	if (!isnumber(ptr))
+	if (!is_number(ptr))
 	    goto inv_time;
 	i = atoi(ptr);
 	mptr->v_sync_strt = mach32_skip2(i - 1);
 	ptr = strtok(NULL, " ");
-	if (!isnumber(ptr))
+	if (!is_number(ptr))
 	    goto inv_time;
 	mptr->v_sync_wid = atoi(ptr) - i;
 	if (mptr->v_sync_wid > 0x1f)
 	    mptr->v_sync_wid = 0x1f;
 	ptr = strtok(NULL, " ");
-	if (!isnumber(ptr))
+	if (!is_number(ptr))
 	    goto inv_time;
 	mptr->v_total = mach32_skip2(atoi(ptr) - 1);
 	for (;;) {		/* Parse for additional goodies */
@@ -2701,7 +2701,7 @@
 	return ptr;
     case 3:
 	ptr = strtok(NULL, " ");
-	if (!isnumber(ptr)) {
+	if (!is_number(ptr)) {
 	    puts("mach32-config: illegal setlinelength command.\n"
 		 "Usage: setlinelength integer modes...");
 	    return ptr;
@@ -2719,7 +2719,7 @@
 	    puts("Don't use the maxclock's commands out of the environment variable.");
 	    return ptr;
 	}
-	if (!isnumber(ptr)) {
+	if (!is_number(ptr)) {
 	  ilmaxclk:
 	    puts("mach32-config: illegal maxclock16 or maxclock24 command.\n"
 		 "Usage: maxclock16 integer or maxclock24 integer");
@@ -2731,7 +2731,7 @@
 	ptr = strtok(NULL, " ");
 	if (!mode)
 	    goto maxclk_deny;
-	if (!isnumber(ptr))
+	if (!is_number(ptr))
 	    goto ilmaxclk;
 	mach32_maxclk24 = atoi(ptr);
 	break;
@@ -2741,7 +2741,7 @@
 	for (i = 0; i < 16; i++) {
 	    ptr = strtok(NULL, " ");
 	    clocks_set = 1;
-	    if (!isnumber(ptr)) {
+	    if (!is_number(ptr)) {
 		puts("mach32-config: illegal clocks command.\n"
 		     "Usage: clocks integer integer ...\n"
 		     "16 clocks have to be specified.\n"
@@ -2776,7 +2776,7 @@
 	ptr = strtok(NULL, " ");
 	if (!mode)
 	    goto maxclk_deny;
-	if (!isnumber(ptr))
+	if (!is_number(ptr))
 	    goto ilmaxclk;
 	mach32_maxclk8 = atoi(ptr);
 	break;
@@ -2784,7 +2784,7 @@
 	ptr = strtok(NULL, " ");
 	if (!mode)
 	    goto maxclk_deny;
-	if (!isnumber(ptr))
+	if (!is_number(ptr))
 	    goto ilmaxclk;
 	mach32_maxclk32 = atoi(ptr);
 	break;
@@ -2803,7 +2803,7 @@
 	    puts("The vfifo, latch, blank commands are not allowed out of the environment.");
 	    return ptr;
 	}
-	if (!isnumber(ptr)) {
+	if (!is_number(ptr)) {
 	  ilvfi:
 	    puts("Illegal vfifo command");
 	    return ptr;
@@ -2814,7 +2814,7 @@
 	ptr = strtok(NULL, " ");
 	if (!mode)
 	    goto tweak_deny;
-	if (!isnumber(ptr)) {
+	if (!is_number(ptr)) {
 	    puts("Illegal latch command");
 	    return ptr;
 	}
@@ -2824,7 +2824,7 @@
 	ptr = strtok(NULL, " ");
 	if (!mode)
 	    goto tweak_deny;
-	if (!isnumber(ptr)) {
+	if (!is_number(ptr)) {
 	    puts("Illegal blank command");
 	    return ptr;
 	}
@@ -2834,7 +2834,7 @@
 	ptr = strtok(NULL, " ");
 	if (!mode)
 	    goto tweak_deny;
-	if (!isnumber(ptr))
+	if (!is_number(ptr))
 	    goto ilvfi;
 	vfifo16 = atoi(ptr) & 0xf;
 	break;
@@ -2842,7 +2842,7 @@
 	ptr = strtok(NULL, " ");
 	if (!mode)
 	    goto tweak_deny;
-	if (!isnumber(ptr))
+	if (!is_number(ptr))
 	    goto ilvfi;
 	vfifo24 = atoi(ptr) & 0xf;
 	break;
@@ -2850,13 +2850,13 @@
 	ptr = strtok(NULL, " ");
 	if (!mode)
 	    goto tweak_deny;
-	if (!isnumber(ptr))
+	if (!is_number(ptr))
 	    goto ilvfi;
 	vfifo32 = atoi(ptr) & 0xf;
 	break;
     case 20:
 	ptr = strtok(NULL, " ");
-	if (!isnumber(ptr)) {
+	if (!is_number(ptr)) {
 	  ilsetupli:
 	    puts("Illegal setuplinear command.\n"
 		 "usage: setuplinear address size\n"
@@ -2998,7 +2998,7 @@
 	else if (!strcasecmp(ptr, "keep"))
 	    svga_clock = (-1);
 	else {
-	    if (!isnumber(ptr))
+	    if (!is_number(ptr))
 		goto invpar;
 	    i = atoi(ptr);
 	    if ((i < 0) || (i > 0x1f))