c326feac8d
Submitted by: bento
52 lines
1.4 KiB
Plaintext
52 lines
1.4 KiB
Plaintext
--- ./src/lib/Unidraw/catalog.c.orig Sat Dec 12 13:27:55 1992
|
|
+++ ./src/lib/Unidraw/catalog.c Wed Jul 9 00:00:06 2003
|
|
@@ -57,7 +57,12 @@
|
|
#include <IV-2_6/_enter.h>
|
|
|
|
#include <ctype.h>
|
|
+#if __FreeBSD__ >= 2
|
|
+#include <osreldate.h>
|
|
+#if (__FreeBSD_cc_version < 400002 && __FreeBSD_version < 500000)
|
|
#include <osfcn.h>
|
|
+#endif
|
|
+#endif
|
|
#include <stdio.h>
|
|
#include <stdlib.h>
|
|
#include <string.h>
|
|
@@ -65,11 +70,13 @@
|
|
#include <strstream.h>
|
|
#ifdef SYSV
|
|
#include <OS/types.h>
|
|
+#endif
|
|
+#if defined(SYSV) || __FreeBSD_cc_version >= 400003
|
|
#include <unistd.h>
|
|
#endif
|
|
#include <sys/file.h>
|
|
|
|
-#ifdef __DECCXX
|
|
+#if (defined(__DECCXX) || (__FreeBSD_version > 500000))
|
|
extern "C" {
|
|
extern int access(char*, int);
|
|
extern int unlink(char*);
|
|
@@ -1502,7 +1509,8 @@
|
|
in >> graylevel;
|
|
|
|
} else if (graylevel == nograylevel) {
|
|
- for (int i = 0; in >> buf && i < patternHeight; i++) {
|
|
+ int i;
|
|
+ for (i = 0; in >> buf && i < patternHeight; i++) {
|
|
if (buf[0] == '>' || sscanf(buf, "%x", &data[i]) != 1) {
|
|
break;
|
|
}
|
|
@@ -1610,8 +1618,9 @@
|
|
} else {
|
|
istrstream in(definition, strlen(definition) + 1);
|
|
int data[patternHeight];
|
|
+ int i;
|
|
|
|
- for (int i = 0; in >> buf && i < patternHeight; i++) {
|
|
+ for (i = 0; in >> buf && i < patternHeight; i++) {
|
|
if (sscanf(buf, "%x", &data[i]) != 1) {
|
|
break;
|
|
}
|