-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathcola.diff
46 lines (44 loc) · 1.22 KB
/
cola.diff
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
Index: cola.c
===================================================================
--- cola.c (revision 114)
+++ cola.c (working copy)
@@ -2656,7 +2656,26 @@
char *ptr= get(string, String,bits);
while (*ptr) value= value << 8 | *ptr++;
return newLong(value);
+ } else if ('x' == peek(stream)) {
+ buffer_reset(&buffer);
+ for (;;) {
+ buffer_append(&buffer, c);
+ c= getc(stream);
+ switch (c) {
+ case '0' ... '9':
+ case 'a' ... 'f': case 'A' ... 'F': case 'x': continue;
+ default: goto donex;
+ }
+ }
+ donex:
+ *buffer_contents(&buffer)= '0';
+ ungetc(c, stream);
+ char *ep= 0;
+ long l= strtoul(buffer_contents(&buffer), &ep, 0);
+ if (!*ep) return newLong(s ? -l : l);
+ return intern(buffer_contents(&buffer));
}
+
/* fall through... */
}
symbol:
Index: Makefile
===================================================================
--- Makefile (revision 114)
+++ Makefile (working copy)
@@ -2,8 +2,8 @@
OFLAGS =
UNAME = $(shell uname)
-CFLAGS = -Wall -g $(OFLAGS)
-LDLIBS = -lffi
+CFLAGS = -m32 -Wall -g $(OFLAGS)
+LDLIBS = -m32 -lffi
ifeq ($(UNAME),Darwin)
CFLAGS += -gstabs -mdynamic-no-pic -I/usr/include/ffi -DMACOSX=1 -fno-stack-protector