History

Removed some debugging prints. Fixed problem where cursor would occasionally be drawn in the upper left (origin) by mistake.

John Floren committed 15 years ago

Commit 2b75c6d1 parent 9fedd644 files · +68 −14Browse files

Unified · Split

4 files
  1. emu/Linux/errstr.h +65 −0
  2. emu/Linux/screen.c +0 −12
  3. emu/port/devpointer.c +1 −1
  4. mkfiles/mkfile-Linux-arm +2 −1
emu/Linux/errstr.h+65−0
@@ -0,0 +1,65 @@
1char Enoerror[] = "no error";
2char Emount[] = "inconsistent mount";
3char Eunmount[] = "not mounted";
4char Eunion[] = "not in union";
5char Emountrpc[] = "mount rpc error";
6char Eshutdown[] = "mounted device shut down";
7char Eowner[] = "not owner";
8char Eunknown[] = "unknown user or group id";
9char Enocreate[] = "mounted directory forbids creation";
10char Enonexist[] = "file does not exist";
11char Eexist[] = "file already exists";
12char Ebadsharp[] = "unknown device in # filename";
13char Enotdir[] = "not a directory";
14char Eisdir[] = "file is a directory";
15char Ebadchar[] = "bad character in file name";
16char Efilename[] = "file name syntax";
17char Eperm[] = "permission denied";
18char Ebadusefd[] = "inappropriate use of fd";
19char Ebadarg[] = "bad arg in system call";
20char Einuse[] = "device or object already in use";
21char Eio[] = "i/o error";
22char Etoobig[] = "read or write too large";
23char Etoosmall[] = "read or write too small";
24char Enetaddr[] = "bad network address";
25char Emsgsize[] = "message is too big for protocol";
26char Enetbusy[] = "network device is busy or allocated";
27char Enoproto[] = "network protocol not supported";
28char Enoport[] = "network port not available";
29char Enoifc[] = "bad interface or no free interface slots";
30char Enolisten[] = "not announced";
31char Ehungup[] = "i/o on hungup channel";
32char Ebadctl[] = "bad process or channel control request";
33char Enodev[] = "no free devices";
34char Enoenv[] = "no free environment resources";
35char Ethread[] = "thread exited";
36char Enochild[] = "no living children";
37char Eioload[] = "i/o error in demand load";
38char Enovmem[] = "out of memory: virtual memory";
39char Ebadld[] = "illegal line discipline";
40char Ebadfd[] = "fd out of range or not open";
41char Eisstream[] = "seek on a stream";
42char Ebadexec[] = "exec header invalid";
43char Etimedout[] = "connection timed out";
44char Econrefused[] = "connection refused";
45char Econinuse[] = "connection in use";
46char Enetunreach[] = "network unreachable";
47char Eintr[] = "interrupted";
48char Enomem[] = "out of memory: kernel";
49char Esfnotcached[] = "subfont not cached";
50char Esoverlap[] = "segments overlap";
51char Emouseset[] = "mouse type already set";
52char Eshort[] = "i/o count too small";
53char Enobitstore[] = "out of screen memory";
54char Egreg[] = "jim'll fix it";
55char Ebadspec[] = "bad attach specifier";
56char Estopped[] = "thread must be stopped";
57char Enoattach[] = "mount/attach disallowed";
58char Eshortstat[] = "stat buffer too small";
59char Enegoff[] = "negative i/o offset";
60char Ebadstat[] = "malformed stat buffer";
61char Ecmdargs[] = "wrong #args in control message";
62char Enofd[] = "no free file descriptors";
63char Enoctl[] = "unknown control request";
64
65void error(char*);
emu/Linux/screen.c+0−12
@@ -75,15 +75,11 @@ touchscreen(struct input_event* ev, int count) · 74 unmodified lines
75 }75 }
76 break;76 break;
77 case EV_SYN:77 case EV_SYN:
78 print("touch = %d, b = %d, lastb = %d\n", touch, b, lastb);
79 if (i == 2) {78 if (i == 2) {
80 print("just moving\n");
81 mousetrack(b, x, y, 0);79 mousetrack(b, x, y, 0);
82 } else if (i > 2 && touch) {80 } else if (i > 2 && touch) {
83 print("clicky\n");
84 mousetrack(b, x, y, 0);81 mousetrack(b, x, y, 0);
85 } else if (!touch && lastb) {82 } else if (!touch && lastb) {
86 print("unclicky\n");
87 mousetrack(b, x, y, 0);83 mousetrack(b, x, y, 0);
88 }84 }
89// if (i==2 && p>0) // motion85// if (i==2 && p>0) // motion
@@ -108,15 +104,7 @@ while (1){ · 18 unmodified lines
108 if ((rd = read (eventfd, ev, sizeof(ev))) < size)104 if ((rd = read (eventfd, ev, sizeof(ev))) < size)
109 //perror_exit ("read()"); 105 //perror_exit ("read()");
110 print("gaaack\n");106 print("gaaack\n");
111
112 //value = ev[0].value;
113
114
115 for (i = 0; i < rd / size; i++) {
116 107
117 print("Type = %d, Code = %d, Value = %d\n", ev[i].type, (ev[i].code), ev[i].value);
118 }
119 print("read rd/size = %d\n", rd / size);
120 touchscreen(ev, (rd / size));108 touchscreen(ev, (rd / size));
121 }109 }
122}110}
emu/port/devpointer.c+1−1
@@ -275,7 +275,7 @@ pointerwrite(Chan* c, void* va, long n, vlong off) · 274 unmodified lines
275 if(n == 0){275 if(n == 0){
276 cur.data = nil;276 cur.data = nil;
277 //drawcursor(&cur);277 //drawcursor(&cur);
278 drawPointer(cur.hotx, cur.hoty);278 //drawPointer(cur.hotx, cur.hoty);
279 break;279 break;
280 }280 }
281 if(n < 8)281 if(n < 8)
mkfiles/mkfile-Linux-arm+2−1
@@ -15,7 +15,8 @@ CC= agcc -c · 14 unmodified lines
15CFLAGS= -O\15CFLAGS= -O\
16 -I$ROOT/Linux/arm/include\16 -I$ROOT/Linux/arm/include\
17 -I$ROOT/include\17 -I$ROOT/include\
18 -DLINUX_ARM18 -DLINUX_ARM\
19 -DINFERNO
19 20
20ANSICPP=21ANSICPP=
21LD= agcc 22LD= agcc