comparison src/c/urweb.c @ 1147:92f37d58828b

Trying to get urweb.c working for someone in NetBSD
author Adam Chlipala <adamc@hcoop.net>
date Sat, 06 Feb 2010 13:09:51 -0500
parents bafb6a5a52a9
children 15767031950c
comparison
equal deleted inserted replaced
1146:7fdea74b1dd9 1147:92f37d58828b
1 #define _XOPEN_SOURCE 600 1 #define _XOPEN_SOURCE 1000
2 2
3 #include <stdlib.h> 3 #include <stdlib.h>
4 #include <stdio.h> 4 #include <stdio.h>
5 #include <string.h> 5 #include <string.h>
6 #include <strings.h> 6 #include <strings.h>
1348 case '\\': 1348 case '\\':
1349 strcpy(s2, "\\\\"); 1349 strcpy(s2, "\\\\");
1350 s2 += 2; 1350 s2 += 2;
1351 break; 1351 break;
1352 default: 1352 default:
1353 if (isprint(c)) 1353 if (isprint((int)c))
1354 *s2++ = c; 1354 *s2++ = c;
1355 else { 1355 else {
1356 sprintf(s2, "\\%3o", c); 1356 sprintf(s2, "\\%3o", c);
1357 s2 += 4; 1357 s2 += 4;
1358 } 1358 }
1384 case '\\': 1384 case '\\':
1385 strcpy(s2, "\\\\"); 1385 strcpy(s2, "\\\\");
1386 s2 += 2; 1386 s2 += 2;
1387 break; 1387 break;
1388 default: 1388 default:
1389 if (isprint(c)) 1389 if (isprint((int)c))
1390 *s2++ = c; 1390 *s2++ = c;
1391 else { 1391 else {
1392 sprintf(s2, "\\%3o", c); 1392 sprintf(s2, "\\%3o", c);
1393 s2 += 4; 1393 s2 += 4;
1394 } 1394 }
1418 case '\\': 1418 case '\\':
1419 strcpy(s2, "\\\\"); 1419 strcpy(s2, "\\\\");
1420 s2 += 2; 1420 s2 += 2;
1421 break; 1421 break;
1422 default: 1422 default:
1423 if (isprint(c)) 1423 if (isprint((int)c))
1424 *s2++ = c; 1424 *s2++ = c;
1425 else { 1425 else {
1426 sprintf(s2, "\\%3o", c); 1426 sprintf(s2, "\\%3o", c);
1427 s2 += 4; 1427 s2 += 4;
1428 } 1428 }