64-bit fixes.
[jmk] --rw-rw-r-- M 1146153 glenda sys 6076 Dec 30 00:45 sys/src/cmd/lex/lmain.c
/n/sourcesdump/2005/1230/plan9/sys/src/cmd/lex/lmain.c:137,143 -
/n/sourcesdump/2005/1231/plan9/sys/src/cmd/lex/lmain.c:137,143
gch();
/* may be gotten: def, subs, sname, stchar, ccl, dchar */
get1core();
- /* may be gotten: name, left, right, nullstr, parent */
+ /* may be gotten: name, left, right, nullstr, parent, ptr */
strcpy((char*)sp, "INITIAL");
sname[0] = sp;
sp += strlen("INITIAL") + 1;
/n/sourcesdump/2005/1230/plan9/sys/src/cmd/lex/lmain.c:246,251 -
/n/sourcesdump/2005/1231/plan9/sys/src/cmd/lex/lmain.c:246,252
free(right);
free(parent);
free(nullstr);
+ free(ptr);
free(state);
free(sname);
free(stchar);
[jmk] --rw-rw-r-- M 1146153 glenda sys 10121 Dec 30 00:45 sys/src/cmd/lex/sub1.c
/n/sourcesdump/2005/1230/plan9/sys/src/cmd/lex/sub1.c:345,351 -
/n/sourcesdump/2005/1231/plan9/sys/src/cmd/lex/sub1.c:345,351
if(strlen(p) == 0) nullstr[tptr] = TRUE;
break;
default:
- warning("bad switch mnp %d %P", a, p);
+ error("bad switch mnp %d %P", a, p);
break;
}
if(tptr > treesize)
/n/sourcesdump/2005/1230/plan9/sys/src/cmd/lex/sub1.c:440,446 -
/n/sourcesdump/2005/1231/plan9/sys/src/cmd/lex/sub1.c:440,448
switch(i){
case RNULLS:
return(mn0(i));
- case RCCL: case RNCCL: case FINAL: case S1FINAL: case S2FINAL:
+ case RCCL: case RNCCL:
+ return(mnp(i,ptr[n]));
+ case FINAL: case S1FINAL: case S2FINAL:
return(mn1(i,left[n]));
case STAR: case QUEST: case PLUS: case CARAT:
return(mn1(i,dupl(left[n])));
/n/sourcesdump/2005/1230/plan9/sys/src/cmd/lex/sub1.c:550,560 -
/n/sourcesdump/2005/1231/plan9/sys/src/cmd/lex/sub1.c:552,562
break;
case RCCL:
print("ccl ");
- allprint(left[t]);
+ allprint(ptr[t]);
break;
case RNCCL:
print("nccl ");
- allprint(left[t]);
+ allprint(ptr[t]);
break;
case DIV:
print("/ %d %d",left[t],right[t]);
[jmk] --rw-rw-r-- M 1146153 glenda sys 17089 Dec 30 00:45 sys/src/cmd/lex/sub2.c
/n/sourcesdump/2005/1230/plan9/sys/src/cmd/lex/sub2.c:238,244 -
/n/sourcesdump/2005/1231/plan9/sys/src/cmd/lex/sub2.c:238,244
else switch(name[curpos]){
case RCCL:
tryit = TRUE;
- q = (uchar *)left[curpos];
+ q = ptr[curpos];
while(*q){
for(j=1;j<NCH;j++)
if(cindex[j] == *q)
/n/sourcesdump/2005/1230/plan9/sys/src/cmd/lex/sub2.c:323,329 -
/n/sourcesdump/2005/1231/plan9/sys/src/cmd/lex/sub2.c:323,329
j = name[curpos];
if(j < NCH && j == c
|| j == RSTR && c == right[curpos]
- || j == RCCL && member(c, (uchar *)left[curpos])){
+ || j == RCCL && member(c, ptr[curpos])){
f = foll[curpos];
number = *f;
newpos = f+1;
Silence warning.
[rsc] --rw-rw-r-- M 1146153 rsc sys 5247 Dec 30 11:01 sys/src/cmd/tcs/html.c
/n/sourcesdump/2005/1230/plan9/sys/src/cmd/tcs/html.c:314,319 -
/n/sourcesdump/2005/1231/plan9/sys/src/cmd/tcs/html.c:314,320
Biobuf b;
Rune *er;
+ USED(x);
html_init();
Binit(&b, 1, OWRITE);
er = r+n;
Fix mode.
[rsc] --rw-rw-r-- M 1146153 rsc drawterm 14118 Dec 29 18:55 sys/src/cmd/unix/drawterm/cpu-bl.c
Update to compile again.
[rsc] --rw-rw-r-- M 1146153 glenda sys 10915 Dec 30 11:34 acme/bin/source/adict/adict.c
/n/sourcesdump/2005/1230/plan9/acme/bin/source/adict/adict.c:5,10 -
/n/sourcesdump/2005/1231/plan9/acme/bin/source/adict/adict.c:5,15
#include "win.h"
#include "adict.h"
+ enum
+ {
+ STACK = 8192,
+ };
+
char *prog = "adict";
char *lprog = "/bin/adict";
char *xprog = "/bin/dict";
/n/sourcesdump/2005/1230/plan9/acme/bin/source/adict/adict.c:22,31 -
/n/sourcesdump/2005/1231/plan9/acme/bin/source/adict/adict.c:27,38
void
usage(void)
{
- threadprint(2, "usage: %s [-d dictname] [pattern]\n", argv0);
+ fprint(2, "usage: %s [-d dictname] [pattern]\n", argv0);
threadexitsall(nil);
}
+ int mainstacksize = STACK;
+
void
threadmain(int argc, char** argv)
{
/n/sourcesdump/2005/1230/plan9/acme/bin/source/adict/adict.c:46,52 -
/n/sourcesdump/2005/1231/plan9/acme/bin/source/adict/adict.c:53,59
pattern = pbuffer;
strcpy(pattern,argv[0]);
if(dict == nil)
- dict = "oed";
+ dict = "pgw";
break;
case 0:
break;
/n/sourcesdump/2005/1230/plan9/acme/bin/source/adict/adict.c:89,95 -
/n/sourcesdump/2005/1231/plan9/acme/bin/source/adict/adict.c:96,102
rexarg[2] = fpipe;
rexarg[3] = c;
- proccreate(rexec, rexarg, 8192);
+ proccreate(rexec, rexarg, STACK);
recvul(c);
chanfree(c);
close(fpipe[1]);
/n/sourcesdump/2005/1230/plan9/acme/bin/source/adict/adict.c:130,136 -
/n/sourcesdump/2005/1231/plan9/acme/bin/source/adict/adict.c:137,143
}
curaddr[i] = nil;
if (i == MAXMATCH)
- threadprint(2, "Too many matches!\n");
+ fprint(2, "Too many matches!\n");
Bterm(&inbuf);
close(fd);
/n/sourcesdump/2005/1230/plan9/acme/bin/source/adict/adict.c:149,155 -
/n/sourcesdump/2005/1231/plan9/acme/bin/source/adict/adict.c:156,162
sprint(buffer,"%sh", addr);
fd = procrexec(xprog, "-d", dict, "-c", buffer, nil);
if (read(fd, pbuffer, 80) > 80)
- threadprint(2, "Error in getting addres from dict.\n");
+ fprint(2, "Error in getting addres from dict.\n");
else {
t = pbuffer;
/* remove trailing whitespace, newline */
/n/sourcesdump/2005/1230/plan9/acme/bin/source/adict/adict.c:182,188 -
/n/sourcesdump/2005/1231/plan9/acme/bin/source/adict/adict.c:189,195
sprint(buffer,"%s+a", curone);
fd = procrexec(xprog, "-d", dict, "-c", buffer, nil);
if (read(fd, abuffer, 80) > 80)
- threadprint(2, "Error in getting addres from dict.\n");
+ fprint(2, "Error in getting addres from dict.\n");
else {
res = abuffer;
while (*res != '#') res++;
/n/sourcesdump/2005/1230/plan9/acme/bin/source/adict/adict.c:352,358 -
/n/sourcesdump/2005/1231/plan9/acme/bin/source/adict/adict.c:359,365
arg[2] = twin;
arg[3] = (void*)wintype;
arg[4] = c;
- proccreate(vopenwin, arg, 8192);
+ proccreate(vopenwin, arg, STACK);
recvul(c);
chanfree(c);
}
/n/sourcesdump/2005/1230/plan9/acme/bin/source/adict/adict.c:377,383 -
/n/sourcesdump/2005/1231/plan9/acme/bin/source/adict/adict.c:384,390
close(fd[1]);
close(fd[0]);
procexec(c, prog, args);
- threadprint(2, "Remote pipe execution failed: %s %r\n", prog);
+ fprint(2, "Remote pipe execution failed: %s %r\n", prog);
abort();
threadexits(nil);
}
/n/sourcesdump/2005/1230/plan9/acme/bin/source/adict/adict.c:396,402 -
/n/sourcesdump/2005/1231/plan9/acme/bin/source/adict/adict.c:403,409
c = arg[2];
procexec(c, prog, args);
- threadprint(2, "Remote execution failed: %s %r\n", prog);
+ fprint(2, "Remote execution failed: %s %r\n", prog);
abort();
threadexits(nil);
}
/n/sourcesdump/2005/1230/plan9/acme/bin/source/adict/adict.c:412,418 -
/n/sourcesdump/2005/1231/plan9/acme/bin/source/adict/adict.c:419,425
rexarg[1] = args;
rexarg[2] = c;
- proccreate(pexec, rexarg, 8192);
+ proccreate(pexec, rexarg, STACK);
recvul(c);
chanfree(c);
}
/n/sourcesdump/2005/1230/plan9/acme/bin/source/adict/adict.c:503,521 -
/n/sourcesdump/2005/1231/plan9/acme/bin/source/adict/adict.c:510,528
wevent(w, &e);
switch(e.c2){
default:
- /* threadprint(2,"unknown message %c%c\n", e.c1, e.c2); */
+ /* fprint(2,"unknown message %c%c\n", e.c1, e.c2); */
break;
case 'i':
- /* threadprint(2,"'%s' inserted in tag at %d\n", e.b, e.q0);*/
+ /* fprint(2,"'%s' inserted in tag at %d\n", e.b, e.q0);*/
break;
case 'I':
- /* threadprint(2,"'%s' inserted in body at %d\n", e.b, e.q0);*/
+ /* fprint(2,"'%s' inserted in body at %d\n", e.b, e.q0);*/
break;
case 'd':
- /* threadprint(2, "'%s' deleted in tag at %d\n", e.b, e.q0);*/
+ /* fprint(2, "'%s' deleted in tag at %d\n", e.b, e.q0);*/
break;
case 'D':
- /* threadprint(2, "'%s' deleted in body at %d\n", e.b, e.q0);*/
+ /* fprint(2, "'%s' deleted in body at %d\n", e.b, e.q0);*/
break;
case 'x':
case 'X': /* Execute command. */
Make compile again.
[rsc] --rw-rw-r-- M 1146153 glenda sys 4800 Dec 30 11:34 acme/bin/source/adict/win.c
/n/sourcesdump/2005/1230/plan9/acme/bin/source/adict/win.c:9,15 -
/n/sourcesdump/2005/1231/plan9/acme/bin/source/adict/win.c:9,15
{
p = realloc(p, n);
if(p == nil)
- threadprint(2, "realloc failed: %r");
+ fprint(2, "realloc failed: %r");
return p;
}
/n/sourcesdump/2005/1230/plan9/acme/bin/source/adict/win.c:20,26 -
/n/sourcesdump/2005/1231/plan9/acme/bin/source/adict/win.c:20,26
w->ctl = open("/mnt/acme/new/ctl", ORDWR);
if(w->ctl<0 || read(w->ctl, buf, 12)!=12)
- threadprint (2, "can't open window ctl file: %r");
+ fprint (2, "can't open window ctl file: %r");
ctlwrite(w, "noscroll\n");
w->winid = atoi(buf);
w->event = openfile(w, "event");
/n/sourcesdump/2005/1230/plan9/acme/bin/source/adict/win.c:38,44 -
/n/sourcesdump/2005/1231/plan9/acme/bin/source/adict/win.c:38,44
sprint(buf, "/mnt/acme/%d/%s", w->winid, f);
fd = open(buf, ORDWR|OCEXEC);
if(fd < 0)
- threadprint (2,"can't open window %s file: %r", f);
+ fprint (2,"can't open window %s file: %r", f);
return fd;
}
/n/sourcesdump/2005/1230/plan9/acme/bin/source/adict/win.c:50,56 -
/n/sourcesdump/2005/1231/plan9/acme/bin/source/adict/win.c:50,56
sprint(buf, "/mnt/acme/%d/body", w->winid);
w->body = Bopen(buf, mode|OCEXEC);
if(w->body == nil)
- threadprint(2,"can't open window body file: %r");
+ fprint(2,"can't open window body file: %r");
}
void
/n/sourcesdump/2005/1230/plan9/acme/bin/source/adict/win.c:59,65 -
/n/sourcesdump/2005/1231/plan9/acme/bin/source/adict/win.c:59,65
if(w->body == nil)
openbody(w, OWRITE);
if(Bwrite(w->body, s, n) != n)
- threadprint(2,"write error to window: %r");
+ fprint(2,"write error to window: %r");
Bflush(w->body);
}
/n/sourcesdump/2005/1230/plan9/acme/bin/source/adict/win.c:71,81 -
/n/sourcesdump/2005/1231/plan9/acme/bin/source/adict/win.c:71,81
if(w->data < 0)
w->data = openfile(w, "data");
if(write(w->addr, addr, strlen(addr)) < 0){
- threadprint(2, "mail: warning: badd address %s:%r\n", addr);
+ fprint(2, "mail: warning: badd address %s:%r\n", addr);
return;
}
if(write(w->data, repl, nrepl) != nrepl)
- threadprint(2, "writing data: %r");
+ fprint(2, "writing data: %r");
}
static int
/n/sourcesdump/2005/1230/plan9/acme/bin/source/adict/win.c:104,113 -
/n/sourcesdump/2005/1231/plan9/acme/bin/source/adict/win.c:104,113
while(m < q1){
n = sprint(buf, "#%d", m);
if(write(w->addr, buf, n) != n)
- threadprint(2,"writing addr: %r");
+ fprint(2,"writing addr: %r");
n = read(w->data, buf, sizeof buf);
if(n <= 0)
- threadprint(2,"reading data: %r");
+ fprint(2,"reading data: %r");
nr = nrunes(buf, n);
while(m+nr >q1){
do; while(n>0 && (buf[--n]&0xC0)==0x80);
/n/sourcesdump/2005/1230/plan9/acme/bin/source/adict/win.c:128,134 -
/n/sourcesdump/2005/1231/plan9/acme/bin/source/adict/win.c:128,134
if(w->addr < 0)
w->addr = openfile(w, "addr");
if(write(w->addr, addr, strlen(addr)) < 0)
- threadprint(2,"writing addr");
+ fprint(2,"writing addr");
ctlwrite(w, "dot=addr\n");
}
/n/sourcesdump/2005/1230/plan9/acme/bin/source/adict/win.c:139,145 -
/n/sourcesdump/2005/1231/plan9/acme/bin/source/adict/win.c:139,145
fd = openfile(w, "tag");
if(write(fd, s, n) != n)
- threadprint(2,"tag write: %r");
+ fprint(2,"tag write: %r");
close(fd);
}
/n/sourcesdump/2005/1230/plan9/acme/bin/source/adict/win.c:150,156 -
/n/sourcesdump/2005/1231/plan9/acme/bin/source/adict/win.c:150,156
n = strlen(s);
if(write(w->ctl, s, n) != n)
- threadprint(2,"write error to ctl file: %r");
+ fprint(2,"write error to ctl file: %r");
}
int
/n/sourcesdump/2005/1230/plan9/acme/bin/source/adict/win.c:206,212 -
/n/sourcesdump/2005/1231/plan9/acme/bin/source/adict/win.c:206,212
if(w->nbuf == 0){
w->nbuf = read(w->event, w->buf, sizeof w->buf);
if(w->nbuf <= 0)
- threadprint(2,"event read error: %r");
+ fprint(2,"event read error: %r");
w->bufp = w->buf;
}
w->nbuf--;
/n/sourcesdump/2005/1230/plan9/acme/bin/source/adict/win.c:222,228 -
/n/sourcesdump/2005/1231/plan9/acme/bin/source/adict/win.c:222,228
while('0'<=(c=getec(w)) && c<='9')
n = n*10+(c-'0');
if(c != ' ')
- threadprint(2, "event number syntax");
+ fprint(2, "event number syntax");
return n;
}
/n/sourcesdump/2005/1230/plan9/acme/bin/source/adict/win.c:258,264 -
/n/sourcesdump/2005/1231/plan9/acme/bin/source/adict/win.c:258,264
e->flag = geten(w);
e->nr = geten(w);
if(e->nr > EVENTSIZE)
- threadprint(2, "wevent: event string too long");
+ fprint(2, "wevent: event string too long");
e->nb = 0;
for(i=0; i<e->nr; i++){
e->r[i] = geter(w, e->b+e->nb, &nb);
/n/sourcesdump/2005/1230/plan9/acme/bin/source/adict/win.c:267,273 -
/n/sourcesdump/2005/1231/plan9/acme/bin/source/adict/win.c:267,273
e->r[e->nr] = 0;
e->b[e->nb] = 0;
if(getec(w) != '\n')
- threadprint(2, "wevent: event syntax 2");
+ fprint(2, "wevent: event syntax 2");
}
void
/n/sourcesdump/2005/1230/plan9/acme/bin/source/adict/win.c:282,288 -
/n/sourcesdump/2005/1231/plan9/acme/bin/source/adict/win.c:282,288
void
wwriteevent(Win *w, Event *e)
{
- threadprint(w->event, "%c%c%d %d\n", e->c1, e->c2, e->q0, e->q1);
+ fprint(w->event, "%c%c%d %d\n", e->c1, e->c2, e->q0, e->q1);
}
int
Never undo the last mount. Make /.. work better.
[rsc] --rw-rw-r-- M 1146153 glenda sys 33663 Dec 30 15:30 sys/src/9/port/chan.c
/n/sourcesdump/2005/1230/plan9/sys/src/9/port/chan.c:412,418 -
/n/sourcesdump/2005/1231/plan9/sys/src/9/port/chan.c:412,418
if(isdotdot(s)){
fixdotdotname(p);
DBG("addelem %s .. => rm %p\n", p->s, p->mtpt[p->mlen-1]);
- if(p->mlen>0 && (c = p->mtpt[--p->mlen])){
+ if(p->mlen>1 && (c = p->mtpt[--p->mlen])){
p->mtpt[p->mlen] = nil;
cclose(c);
}
|