[inferno-npe] 5 new revisions pushed by mechiel@ueber.net on 2010-07-22 22:18 GMT

0 views
Skip to first unread message

infer...@googlecode.com

unread,
Jul 22, 2010, 6:18:39 PM7/22/10
to inferno-n...@googlegroups.com
5 new revisions:

Revision: d063da244d
Author: for...@vitanuova.com
Date: Thu Jul 15 09:13:02 2010
Log: 20100715-1712
http://code.google.com/p/inferno-npe/source/detail?r=d063da244d

Revision: 7a5b9a6bc4
Author: for...@vitanuova.com
Date: Sun Jul 18 07:46:16 2010
Log: 20100718-1546
http://code.google.com/p/inferno-npe/source/detail?r=7a5b9a6bc4

Revision: 5c74d54648
Author: for...@vitanuova.com
Date: Mon Jul 19 14:57:51 2010
Log: 20100719-2257
http://code.google.com/p/inferno-npe/source/detail?r=5c74d54648

Revision: c295bd5918
Author: for...@vitanuova.com
Date: Thu Jul 22 03:56:14 2010
Log: 20100722
http://code.google.com/p/inferno-npe/source/detail?r=c295bd5918

Revision: 62dfecbad9
Author: Mechiel Lukkien <mec...@ueber.net>
Date: Thu Jul 22 15:14:40 2010
Log: Merge with inferno-os 20100722.
http://code.google.com/p/inferno-npe/source/detail?r=62dfecbad9

==============================================================================
Revision: d063da244d
Author: for...@vitanuova.com
Date: Thu Jul 15 09:13:02 2010
Log: 20100715-1712
http://code.google.com/p/inferno-npe/source/detail?r=d063da244d

Modified:
/CHANGES
/appl/wm/toolbar.b
/dis/wm/toolbar.dis
/emu/port/devsnarf.c
/include/version.h
/man/1/toolbar
/utils/8a/a.y
/utils/8c/list.c
/utils/8c/peep.c
/utils/8c/reg.c
/utils/8l/l.h
/utils/8l/span.c
/utils/NOTICE
/utils/cc/macbody
/utils/kc/cgen.c
/utils/kl/asm.c

=======================================
--- /CHANGES Tue May 4 01:57:12 2010
+++ /CHANGES Thu Jul 15 09:13:02 2010
@@ -1,3 +1,9 @@
+20100715
+ appl/wm/toolbar.b changed not to create new /chan/snarf if one exists,
unless -p (private) option given [toolbar(1)]
+ utils/cc/macbody - add overlooked change to implement __VA_ARGS__
+ other minor updates to the compilers to resync
+20100714
+ correctly initialise types in utils/cc/sub.c
20100504
change lib9/strtoull.c for MS
20100503
=======================================
--- /appl/wm/toolbar.b Fri Dec 22 09:07:39 2006
+++ /appl/wm/toolbar.b Thu Jul 15 09:13:02 2010
@@ -82,12 +82,16 @@
sys->bind("#s", "/chan", sys->MBEFORE);

arg->init(argv);
- arg->setusage("toolbar [-s]");
+ arg->setusage("toolbar [-s] [-p]");
startmenu := 1;
+# ownsnarf := (sys->open("/chan/snarf", Sys->ORDWR) == nil);
+ ownsnarf := sys->stat("/chan/snarf").t0 < 0;
while((c := arg->opt()) != 0){
case c {
's' =>
startmenu = 0;
+ 'p' =>
+ ownsnarf = 1;
* =>
arg->usage();
}
@@ -110,9 +114,13 @@
shctxt := Context.new(ctxt);
shctxt.addmodule("wm", myselfbuiltin);

- snarfIO := sys->file2chan("/chan", "snarf");
- if(snarfIO == nil)
- fatal(sys->sprint("cannot make /chan/snarf: %r"));
+ snarfIO: ref Sys->FileIO;
+ if(ownsnarf){
+ snarfIO = sys->file2chan("/chan", "snarf");
+ if(snarfIO == nil)
+ fatal(sys->sprint("cannot make /chan/snarf: %r"));
+ }else
+ snarfIO = ref Sys->FileIO(chan of (int, int, int, Sys->Rread), chan of
(int, array of byte, int, Sys->Rwrite));
sync := chan of string;
spawn consoleproc(ctxt, sync);
if ((err := <-sync) != nil)
@@ -125,8 +133,8 @@
snarf: array of byte;
# write("/prog/"+string sys->pctl(0, nil)+"/ctl", "restricted"); # for
testing
for(;;) alt{
- s := <-tbtop.ctxt.kbd =>
- tk->keyboard(tbtop, c);
+ k := <-tbtop.ctxt.kbd =>
+ tk->keyboard(tbtop, k);
m := <-tbtop.ctxt.ptr =>
tk->pointer(tbtop, *m);
s := <-tbtop.ctxt.ctl or
@@ -137,11 +145,13 @@
if (donesetup){
{
shctxt.run(ref Listnode(nil, s) :: nil, 0);
- } exception e {"fail:*" =>;}
+ } exception {
+ "fail:*" => ;
+ }
}
detask := <-task =>
deiconify(detask);
- (off, data, fid, wc) := <-snarfIO.write =>
+ (off, data, nil, wc) := <-snarfIO.write =>
if(wc == nil)
break;
if (off == 0) # write at zero truncates
@@ -519,23 +529,15 @@
tk->keyboard(top, c);
p := <-top.ctxt.ptr =>
tk->pointer(top, *p);
- (off, nbytes, fid, rc) := <-iostdout.read =>
- if(rc == nil)
- break;
- alt{
- rc <-= (nil, "inappropriate use of file") =>;
- * =>;
- }
- (off, nbytes, fid, rc) := <-iostderr.read =>
- if(rc == nil)
- break;
- alt{
- rc <-= (nil, "inappropriate use of file") =>;
- * =>;
- }
- (off, data, fid, wc) := <-iostdout.write =>
+ (nil, nil, nil, rc) := <-iostdout.read =>
+ if(rc != nil)
+ rc <-= (nil, "inappropriate use of file");
+ (nil, nil, nil, rc) := <-iostderr.read =>
+ if(rc != nil)
+ rc <-= (nil, "inappropriate use of file");
+ (nil, data, nil, wc) := <-iostdout.write =>
conout(top, data, wc);
- (off, data, fid, wc) := <-iostderr.write =>
+ (nil, data, nil, wc) := <-iostderr.write =>
conout(top, data, wc);
if(wc != nil)
tkclient->wmctl(top, "untask");
=======================================
--- /dis/wm/toolbar.dis Fri Dec 22 12:52:35 2006
+++ /dis/wm/toolbar.dis Thu Jul 15 09:13:02 2010
Binary file, no diff available.
=======================================
--- /emu/port/devsnarf.c Fri Dec 22 09:07:39 2006
+++ /emu/port/devsnarf.c Thu Jul 15 09:13:02 2010
@@ -63,7 +63,8 @@
/* this must be the last reference: no need to lock */
if(c->mode == ORDWR || c->mode == OWRITE){
if(!waserror()){
- clipwrite(c->aux);
+ if(c->aux != nil)
+ clipwrite(c->aux);
poperror();
}
}
=======================================
--- /include/version.h Wed May 5 05:18:06 2010
+++ /include/version.h Thu Jul 15 09:13:02 2010
@@ -1,1 +1,1 @@
-#define VERSION "Fourth Edition (20100505)"
+#define VERSION "Fourth Edition (20100715)"
=======================================
--- /man/1/toolbar Fri Dec 22 12:52:35 2006
+++ /man/1/toolbar Thu Jul 15 09:13:02 2010
@@ -5,6 +5,8 @@
.B wm/toolbar
[
.B -s
+] [
+.B -p
]
.SH DESCRIPTION
.I Toolbar
@@ -55,6 +57,34 @@
script executes the script
.BI /usr/ username /lib/wmsetup ,
enabling each user to have their own window manager configuration.
+.PP
+Normally
+.I toolbar
+packs a menu button referring to the start menu at the left hand side of
the tool bar.
+The
+.B -s
+option suppresses that.
+.PP
+.I Toolbar
+serves the shared
+.I "snarf buffer"
+used by cut and paste in
+.IR wm (1)
+applications,
+except in hosted Inferno where the host's standard clipboard system is
used instead,
+via
+.IR snarf (3).
+If
+.I toolbar
+cannot find
+.B /chan/snarf
+or the
+.B -p
+option is given,
+.I toolbar
+will create its own snarf buffer, private to the set of
+applications running under the current instance of
+.IR wm (1).
.SH FILES
.TP
.B /lib/wmsetup
=======================================
--- /utils/8a/a.y Fri Dec 22 13:39:35 2006
+++ /utils/8a/a.y Thu Jul 15 09:13:02 2010
@@ -236,6 +236,7 @@
}
| reg
| omem
+| imm

rim:
rem
@@ -386,6 +387,12 @@
$$ = nullgen;
$$.type = D_INDIR+D_SP;
}
+| con '(' LSREG ')'
+ {
+ $$ = nullgen;
+ $$.type = D_INDIR+$3;
+ $$.offset = $1;
+ }
| '(' LLREG '*' con ')'
{
$$ = nullgen;
=======================================
--- /utils/8c/list.c Fri Dec 22 13:39:35 2006
+++ /utils/8c/list.c Thu Jul 15 09:13:02 2010
@@ -70,7 +70,7 @@
int
Dconv(Fmt *fp)
{
- char str[40], s[20];
+ char str[STRINGSZ], s[STRINGSZ];
Adr *a;
int i;

@@ -224,7 +224,7 @@
int
Rconv(Fmt *fp)
{
- char str[20];
+ char str[STRINGSZ];
int r;

r = va_arg(fp->args, int);
@@ -240,7 +240,7 @@
Sconv(Fmt *fp)
{
int i, c;
- char str[30], *p, *a;
+ char str[STRINGSZ], *p, *a;

a = va_arg(fp->args, char*);
p = str;
=======================================
--- /utils/8c/peep.c Tue Apr 27 13:15:13 2010
+++ /utils/8c/peep.c Thu Jul 15 09:13:02 2010
@@ -639,10 +639,14 @@
return 2;
goto caseread;

- case AMOVSL:
case AREP:
case AREPN:
- if(v->type == D_CX || v->type == D_DI || v->type == D_SI)
+ if(v->type == D_CX)
+ return 2;
+ goto caseread;
+
+ case AMOVSL:
+ if(v->type == D_DI || v->type == D_SI)
return 2;
goto caseread;

=======================================
--- /utils/8c/reg.c Fri Dec 22 13:39:35 2006
+++ /utils/8c/reg.c Thu Jul 15 09:13:02 2010
@@ -224,7 +224,9 @@
*/
case AFMOVDP:
case AFMOVFP:
+ case AFMOVLP:
case AFMOVVP:
+ case AFMOVWP:
case ACALL:
for(z=0; z<BITS; z++)
addrs.b[z] |= bit.b[z];
=======================================
--- /utils/8l/l.h Tue Apr 27 13:15:13 2010
+++ /utils/8l/l.h Thu Jul 15 09:13:02 2010
@@ -346,3 +346,4 @@
#pragma varargck type "P" Prog*
#pragma varargck type "R" int
#pragma varargck type "A" int
+#pragma varargck argpos diag 1
=======================================
--- /utils/8l/span.c Tue Apr 27 13:15:13 2010
+++ /utils/8l/span.c Thu Jul 15 09:13:02 2010
@@ -334,6 +334,8 @@
return Yax;

case D_CL:
+ return Ycl;
+
case D_DL:
case D_BL:
case D_AH:
=======================================
--- /utils/NOTICE Fri Feb 2 15:50:37 2007
+++ /utils/NOTICE Thu Jul 15 09:13:02 2010
@@ -9,10 +9,11 @@
Copyright © 1994-1999 Lucent Technologies Inc. All rights reserved.
Portions Copyright © 1995-1997 C H Forsyth (for...@terzarima.net)
Portions Copyright © 1997-1999 Vita Nuova Limited
- Portions Copyright © 2000-2007 Vita Nuova Holdings Limited
(www.vitanuova.com)
+ Portions Copyright © 2000-2008 Vita Nuova Holdings Limited
(www.vitanuova.com)
Portions Copyright © 2004,2006 Bruce Ellis
Portions Copyright © 2005-2007 C H Forsyth (for...@terzarima.net)
- Revisions Copyright © 2000-2007 Lucent Technologies Inc. and others
+ Revisions Copyright © 2000-2008 Lucent Technologies Inc. and others
+ Portions Copyright © 2009 The Go Authors. All rights reserved.

Permission is hereby granted, free of charge, to any person obtaining a
copy
of this software and associated documentation files (the "Software"), to
deal
=======================================
--- /utils/cc/macbody Fri Dec 22 13:39:35 2006
+++ /utils/cc/macbody Thu Jul 15 09:13:02 2010
@@ -1,3 +1,4 @@
+#define VARMAC 0x80

long
getnsn(void)
@@ -42,6 +43,27 @@
yyerror("symbol too large: %s", symb);
return lookup();
}
+
+Sym*
+getsymdots(int *dots)
+{
+ int c;
+ Sym *s;
+
+ s = getsym();
+ if(s != S)
+ return s;
+
+ c = getnsc();
+ if(c != '.'){
+ unget(c);
+ return S;
+ }
+ if(getc() != '.' || getc() != '.')
+ yyerror("bad dots in macro");
+ *dots = 1;
+ return slookup("__VA_ARGS__");
+}

int
getcom(void)
@@ -172,7 +194,7 @@
{
Sym *s, *a;
char *args[NARG], *np, *base;
- int n, i, c, len;
+ int n, i, c, len, dots;
int ischr;

s = getsym();
@@ -182,13 +204,14 @@
yyerror("macro redefined: %s", s->name);
c = getc();
n = -1;
+ dots = 0;
if(c == '(') {
n++;
c = getnsc();
if(c != ')') {
unget(c);
for(;;) {
- a = getsym();
+ a = getsymdots(&dots);
if(a == S)
goto bad;
if(n >= NARG) {
@@ -199,7 +222,7 @@
c = getnsc();
if(c == ')')
break;
- if(c != ',')
+ if(c != ',' || dots)
goto bad;
}
}
@@ -325,6 +348,8 @@
} while(len & 3);

*base = n+1;
+ if(dots)
+ *base |= VARMAC;
s->macro = base;
if(debug['m'])
print("#define %s %s\n", s->name, s->macro+1);
@@ -343,16 +368,19 @@
{
char buf[2000];
int n, l, c, nargs;
- char *arg[NARG], *cp, *ob, *ecp;
+ char *arg[NARG], *cp, *ob, *ecp, dots;

ob = b;
- nargs = *s->macro - 1;
- if(nargs < 0) {
+ if(*s->macro == 0) {
strcpy(b, s->macro+1);
if(debug['m'])
print("#expand %s %s\n", s->name, ob);
return;
}
+
+ nargs = (char)(*s->macro & ~VARMAC) - 1;
+ dots = *s->macro & VARMAC;
+
c = getnsc();
if(c != '(')
goto bad;
@@ -425,6 +453,10 @@
}
if(l == 0) {
if(c == ',') {
+ if(n == nargs && dots) {
+ *cp++ = ',';
+ continue;
+ }
*cp++ = 0;
arg[n++] = cp;
if(n > nargs)
@@ -452,6 +484,8 @@
cp = s->macro+1;
for(;;) {
c = *cp++;
+ if(c == '\n')
+ c = ' ';
if(c != '#') {
*b++ = c;
if(c == 0)
=======================================
--- /utils/kc/cgen.c Fri Dec 22 13:39:35 2006
+++ /utils/kc/cgen.c Thu Jul 15 09:13:02 2010
@@ -493,6 +493,8 @@
} else
gopcode(OADD, nodconst(v), Z, &nod);
gopcode(OAS, &nod, Z, &nod2);
+ if(nn && l->op == ONAME) /* in x=++i, emit USED(i) */
+ gins(ANOP, l, Z);

regfree(&nod);
if(l->addable < INDEXED)
=======================================
--- /utils/kl/asm.c Fri Dec 22 13:39:35 2006
+++ /utils/kl/asm.c Thu Jul 15 09:13:02 2010
@@ -1001,6 +1001,11 @@
}
}
break;
+
+ case 57: /* op r1,r2 with reserved rs1 */
+ r = 0;
+ o1 = OP_RRR(opcode(p->as), p->from.reg, r, p->to.reg);
+ break;
}
if(aflag)
return o1;

==============================================================================
Revision: 7a5b9a6bc4
Author: for...@vitanuova.com
Date: Sun Jul 18 07:46:16 2010
Log: 20100718-1546
http://code.google.com/p/inferno-npe/source/detail?r=7a5b9a6bc4

Modified:
/include/version.h
/libmemdraw/draw.c

=======================================
--- /include/version.h Thu Jul 15 09:13:02 2010
+++ /include/version.h Sun Jul 18 07:46:16 2010
@@ -1,1 +1,1 @@
-#define VERSION "Fourth Edition (20100715)"
+#define VERSION "Fourth Edition (20100718)"
=======================================
--- /libmemdraw/draw.c Sat Mar 13 07:04:35 2010
+++ /libmemdraw/draw.c Sun Jul 18 07:46:16 2010
@@ -2465,7 +2465,7 @@
bpp = src->depth;
uc <<= (src->r.min.x&(7/src->depth))*src->depth;
uc &= ~(0xFF>>bpp);
- /* pixel value is now in high part of byte. repeat throughout byte
+ // pixel value is now in high part of byte. repeat throughout byte
val = uc;
for(i=bpp; i<8; i<<=1)
val |= val>>i;

==============================================================================
Revision: 5c74d54648
Author: for...@vitanuova.com
Date: Mon Jul 19 14:57:51 2010
Log: 20100719-2257
http://code.google.com/p/inferno-npe/source/detail?r=5c74d54648

Modified:
/CHANGES
/appl/cmd/disk/mkfs.b
/dis/disk/mkfs.dis
/include/version.h
/libnandfs/NOTICE

=======================================
--- /CHANGES Thu Jul 15 09:13:02 2010
+++ /CHANGES Mon Jul 19 14:57:51 2010
@@ -1,3 +1,5 @@
+20100719
+ appl/cmd/disk/mkfs.b change getname/getpath to cope with missing newline
[issue 236]
20100715
appl/wm/toolbar.b changed not to create new /chan/snarf if one exists,
unless -p (private) option given [toolbar(1)]
utils/cc/macbody - add overlooked change to implement __VA_ARGS__
=======================================
--- /appl/cmd/disk/mkfs.b Sun Aug 9 12:15:09 2009
+++ /appl/cmd/disk/mkfs.b Mon Jul 19 14:57:51 2010
@@ -556,35 +556,35 @@

getpath(p: string): string
{
- for(; (c := p[0]) == ' ' || c == '\t'; p = p[1:])
- ;
- for(n := 0; (c = p[n]) != '\n' && c != ' ' && c != '\t'; n++)
- ;
- return p[0:n];
+ for(i := 0; i < len p && (p[i] == ' ' || p[i] == '\t'); i++)
+ ;
+ for(n := i; n < len p && (c := p[n]) != '\n' && c != ' ' && c != '\t';
n++)
+ ;
+ return p[i:n];
}

getname(p: string): (string, string)
{
- for(; (c := p[0]) == ' ' || c == '\t'; p = p[1:])
- ;
- i := 0;
+ for(i := 0; i < len p && (p[0] == ' ' || p[0] == '\t'); i++)
+ ;
s := "";
quoted := 0;
- for(; (c = p[0]) != '\n' && (c != ' ' && c != '\t' || quoted); p = p[1:]){
- if(quoted && c == '\'' && p[1] == '\'')
- p = p[1:];
- else if(c == '\''){
+ for(; i < len p && (c := p[i]) != '\n' && (c != ' ' && c != '\t' ||
quoted); i++){
+ if(c == '\''){
+ if(i+1 >= len p || p[i+1] != '\''){
quoted = !quoted;
continue;
}
- s[i++] = c;
+ i++;
+ }
+ s[len s] = c;
}
if(len s > 0 && s[0] == '$'){
s = getenv(s[1:]);
if(s == nil)
error(sys->sprint("can't read environment variable %q", s));
}
- return (s, p);
+ return (s, p[i:]);
}

getenv(s: string): string
=======================================
--- /dis/disk/mkfs.dis Sun Aug 9 12:15:09 2009
+++ /dis/disk/mkfs.dis Mon Jul 19 14:57:51 2010
Binary file, no diff available.
=======================================
--- /include/version.h Sun Jul 18 07:46:16 2010
+++ /include/version.h Mon Jul 19 14:57:51 2010
@@ -1,1 +1,1 @@
-#define VERSION "Fourth Edition (20100718)"
+#define VERSION "Fourth Edition (20100719)"
=======================================
--- /libnandfs/NOTICE Fri Dec 22 09:07:39 2006
+++ /libnandfs/NOTICE Mon Jul 19 14:57:51 2010
@@ -1,5 +1,23 @@
-Developed 2002, 2003 by Vita Nuova Holdings Limited.
+This copyright NOTICE applies to all files in this directory and
+subdirectories, unless another copyright notice appears in a given
+file or subdirectory. If you take substantial code from this software to
use in
+other programs, you must somehow include with it an appropriate
+copyright notice that includes the copyright notice and the other
+notices below. It is fine (and often tidier) to do that in a separate
+file such as NOTICE, LICENCE or COPYING.
+
Copyright © 2002, 2003 Vita Nuova Holdings Limited.

-The source and binary code for libnandfs may be used only as part of
Inferno,
-unless otherwise agreed with Vita Nuova.
+This program is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.

==============================================================================
Revision: c295bd5918
Author: for...@vitanuova.com
Date: Thu Jul 22 03:56:14 2010
Log: 20100722
http://code.google.com/p/inferno-npe/source/detail?r=c295bd5918

Modified:
/CHANGES
/include/bio.h
/include/version.h
/limbo/asm.c
/limbo/sbl.c
/os/cerf250/cerf
/os/cerf405/cerf
/services/webget/inferno.gif
/utils/0l/obj.c
/utils/0l/sched.c
/utils/acid/builtin.c
/utils/acid/print.c
/utils/kprof/kprof.c
/utils/ms2/ms2.c
/utils/nm/nm.c

=======================================
--- /CHANGES Mon Jul 19 14:57:51 2010
+++ /CHANGES Thu Jul 22 03:56:14 2010
@@ -1,3 +1,5 @@
+20100722
+ include/bio.h add varargck and repair resulting diagnostics in utils and
limbo/ [issue 237, mechiel]
20100719
appl/cmd/disk/mkfs.b change getname/getpath to cope with missing newline
[issue 236]
20100715
=======================================
--- /include/bio.h Fri Dec 22 09:07:39 2006
+++ /include/bio.h Thu Jul 22 03:56:14 2010
@@ -71,3 +71,5 @@
int Bungetc(Biobuf*);
int Bungetrune(Biobuf*);
long Bwrite(Biobuf*, void*, long);
+
+#pragma varargck argpos Bprint 2
=======================================
--- /include/version.h Mon Jul 19 14:57:51 2010
+++ /include/version.h Thu Jul 22 03:56:14 2010
@@ -1,1 +1,1 @@
-#define VERSION "Fourth Edition (20100719)"
+#define VERSION "Fourth Edition (20100722)"
=======================================
--- /limbo/asm.c Fri Dec 22 09:07:39 2006
+++ /limbo/asm.c Thu Jul 22 03:56:14 2010
@@ -144,7 +144,7 @@
Bprint(bout, "\tword\t@mp+%ld,%ld\n", offset, lab->inst->pc);
offset += IBY2WD;
}
- Bprint(bout, "\tword\t@mp+%ld,%d\n", offset, c->iwild ? c->iwild->pc :
-1);
+ Bprint(bout, "\tword\t@mp+%ld,%ld\n", offset, c->iwild ? c->iwild->pc :
-1);
break;
case Tgoto:
c = n->ty->cse;
@@ -188,16 +188,16 @@
break;
case Tiface:
if(LDT)
- Bprint(bout, "\tword\t@ldt+%d,%d\n", offset, (long)n->val);
+ Bprint(bout, "\tword\t@ldt+%ld,%ld\n", offset, (long)n->val);
else
- Bprint(bout, "\tword\t@mp+%d,%d\n", offset, (long)n->val);
+ Bprint(bout, "\tword\t@mp+%ld,%ld\n", offset, (long)n->val);
offset += IBY2WD;
for(id = n->decl->ty->ids; id != nil; id = id->next){
offset = align(offset, IBY2WD);
if(LDT)
- Bprint(bout, "\text\t@ldt+%d,0x%lux,\"", offset, sign(id));
+ Bprint(bout, "\text\t@ldt+%ld,0x%lux,\"", offset, sign(id));
else
- Bprint(bout, "\text\t@mp+%d,0x%lux,\"", offset, sign(id));
+ Bprint(bout, "\text\t@mp+%ld,0x%lux,\"", offset, sign(id));
dotlen = 0;
idlen = id->sym->len + 1;
if(id->dot->ty->kind == Tadt){
@@ -236,18 +236,18 @@
id = e->desc->id;
else
id = -1;
- Bprint(bout, "\texception\t%d, %d, %d, %d, %d, %d\n", getpc(e->p1),
getpc(e->p2), o, id, c->nlab, e->ne);
+ Bprint(bout, "\texception\t%ld, %ld, %d, %d, %d, %d\n", getpc(e->p1),
getpc(e->p2), o, id, c->nlab, e->ne);
for(i = 0; i < c->nlab; i++){
lab = &c->labs[i];
d = lab->start->decl;
if(lab->start->ty->kind == Texception)
d = d->init->decl;
- Bprint(bout, "\texctab\t\"%s\", %d\n", d->sym->name, lab->inst->pc);
+ Bprint(bout, "\texctab\t\"%s\", %ld\n", d->sym->name, lab->inst->pc);
}
if(c->iwild == nil)
Bprint(bout, "\texctab\t*, %d\n", -1);
else
- Bprint(bout, "\texctab\t*, %d\n", c->iwild->pc);
+ Bprint(bout, "\texctab\t*, %ld\n", c->iwild->pc);
}
}

@@ -283,7 +283,7 @@
if(in->op == INOOP)
continue;
if(in->pc % 10 == 0)
- Bprint(bout, "#%d\n", in->pc);
+ Bprint(bout, "#%ld\n", in->pc);
Bprint(bout, "%I\n", in);
}
}
=======================================
--- /limbo/sbl.c Fri Dec 22 16:30:12 2006
+++ /limbo/sbl.c Thu Jul 22 03:56:14 2010
@@ -317,7 +317,7 @@
break;
case Ttuple:
case Texception:
- Bprint(bsym, "%c%d.", sbltname[t->kind], t->size);
+ Bprint(bsym, "%c%ld.", sbltname[t->kind], t->size);
sbldecl(t->ids, Dfield);
break;
case Tadt:
@@ -327,7 +327,7 @@
Bputc(bsym, sbltname[t->kind]);
if(d->dot != nil && !isimpmod(d->dot->sym))
Bprint(bsym, "%s->", d->dot->sym->name);
- Bprint(bsym, "%s %s%d\n", d->sym->name, sblsrcconv(buf, buf+sizeof(buf),
&d->src), d->ty->size);
+ Bprint(bsym, "%s %s%ld\n", d->sym->name, sblsrcconv(buf,
buf+sizeof(buf), &d->src), d->ty->size);
sbldecl(t->ids, Dfield);
if(t->tags != nil){
Bprint(bsym, "%d\n", t->decl->tag);
@@ -337,7 +337,7 @@
if(lastt == tg->ty){
Bputc(bsym, '\n');
}else{
- Bprint(bsym, "%d\n", tg->ty->size);
+ Bprint(bsym, "%ld\n", tg->ty->size);
sbldecl(tg->ty->ids, Dfield);
}
lastt = tg->ty;
=======================================
--- /os/cerf250/cerf Fri Dec 22 13:39:35 2006
+++ /os/cerf250/cerf Thu Jul 22 03:56:14 2010
@@ -11,7 +11,7 @@
dup
ssl
cap
- sign
+# sign

# draw screen
# pointer
=======================================
--- /os/cerf405/cerf Fri Dec 22 13:39:35 2006
+++ /os/cerf405/cerf Thu Jul 22 03:56:14 2010
@@ -11,7 +11,7 @@
dup
ssl
cap
- sign
+# sign

ip ip ipv6 ipaux iproute arp netlog ptclbsum iprouter plan9 nullmedium
pktmedium netaux
ether netif netaux
=======================================
--- /services/webget/inferno.gif Fri Dec 22 12:52:35 2006
+++ /services/webget/inferno.gif Thu Jul 22 03:56:14 2010
Binary file, no diff available.
=======================================
--- /utils/0l/obj.c Fri Dec 22 13:39:35 2006
+++ /utils/0l/obj.c Thu Jul 22 03:56:14 2010
@@ -165,7 +165,7 @@
print("warning: -D0x%lux is ignored because of -R0x%lux\n",
INITDAT, INITRND);
if(debug['v'])
- Bprint(&bso, "HEADER = -H0x%ld -T0x%lux -D0x%lux -R0x%lux\n",
+ Bprint(&bso, "HEADER = -H0x%x -T0x%lux -D0x%lux -R0x%lux\n",
HEADTYPE, INITTEXT, INITDAT, INITRND);
Bflush(&bso);
zprg.as = AGOK;
=======================================
--- /utils/0l/sched.c Fri Dec 22 13:39:35 2006
+++ /utils/0l/sched.c Thu Jul 22 03:56:14 2010
@@ -53,7 +53,7 @@
s->p = *p;
markregused(s, p);
if(debug['X']) {
- Bprint(&bso, "%P%|set", &s->p, 40);
+ Bprint(&bso, "%P\t\tset", &s->p);
dumpbits(s, &s->set);
Bprint(&bso, "; used");
dumpbits(s, &s->used);
=======================================
--- /utils/acid/builtin.c Tue Apr 27 04:51:13 2010
+++ /utils/acid/builtin.c Thu Jul 22 03:56:14 2010
@@ -915,10 +915,10 @@
Bprint(bout, "%3d", (int)res->u0.sival&0xff);
break;
case 'X':
- Bprint(bout, "%.8lux", (int)res->u0.sival);
+ Bprint(bout, "%.8ux", (int)res->u0.sival);
break;
case 'x':
- Bprint(bout, "%.4lux", (int)res->u0.sival&0xffff);
+ Bprint(bout, "%.4ux", (int)res->u0.sival&0xffff);
break;
case 'Y':
Bprint(bout, "%.16llux", res->u0.sival);
@@ -933,7 +933,7 @@
Bprint(bout, "%ud", (int)res->u0.sival&0xffff);
break;
case 'U':
- Bprint(bout, "%ud", (ulong)res->u0.sival);
+ Bprint(bout, "%lud", (ulong)res->u0.sival);
break;
case 'Z':
Bprint(bout, "%llud", res->u0.sival);
@@ -972,7 +972,7 @@
if(type != TSTRING)
Bprint(bout, "*%c<%s>*", res->fmt, typenames[type]);
else
- Bprint(bout, "%S", res->u0.sstring->string);
+ Bprint(bout, "%S", (Rune*)res->u0.sstring->string);
break;
case 'a':
case 'A':
=======================================
--- /utils/acid/print.c Fri Dec 22 13:39:35 2006
+++ /utils/acid/print.c Thu Jul 22 03:56:14 2010
@@ -201,10 +201,10 @@
Bprint(bout, "%.*sif ", d, tabs);
pexpr(l);
d++;
- Bprint(bout, " then\n", d, tabs);
+ Bprint(bout, "%.*sthen\n", d, tabs);
if(r && r->op == OELSE) {
slist(r->left, d);
- Bprint(bout, "%.*selse\n", d-1, tabs, d, tabs);
+ Bprint(bout, "%.*selse\n", d-1, tabs);
slist(r->right, d);
}
else
@@ -214,7 +214,7 @@
Bprint(bout, "%.*swhile ", d, tabs);
pexpr(l);
d++;
- Bprint(bout, " do\n", d, tabs);
+ Bprint(bout, "%.*sdo\n", d, tabs);
slist(r, d);
break;
case ORET:
@@ -387,7 +387,7 @@
pexpr(l);
break;
case OWHAT:
- Bprint(bout, "whatis", n->sym->name);
+ Bprint(bout, "whatis");
if(n->sym)
Bprint(bout, " %s", n->sym->name);
break;
=======================================
--- /utils/kprof/kprof.c Fri Dec 22 13:39:35 2006
+++ /utils/kprof/kprof.c Thu Jul 22 03:56:14 2010
@@ -146,7 +146,7 @@
Binit(&outbuf, 1, OWRITE);
Bprint(&outbuf, "ms %% sym\n");
while(--k>=0)
- Bprint(&outbuf, "%lud\t%3lud.%d\t%s\n",
+ Bprint(&outbuf, "%lud\t%3lud.%ld\t%s\n",
tickstoms(cp[k].time),
100*cp[k].time/delta,
(1000*cp[k].time/delta)%10,
=======================================
--- /utils/ms2/ms2.c Fri Dec 22 13:39:35 2006
+++ /utils/ms2/ms2.c Thu Jul 22 03:56:14 2010
@@ -136,11 +136,11 @@
ulong cksum;

if(addr & (0xFF<<24)){
- Bprint(&bout, "S3%.2X%.8X", l+5, addr);
+ Bprint(&bout, "S3%.2X%.8lX", l+5, addr);
cksum = l+5;
cksum += (addr>>24)&0xff;
}else{
- Bprint(&bout, "S2%.2X%.6X", l+4, addr);
+ Bprint(&bout, "S2%.2X%.6lX", l+4, addr);
cksum = l+4;
}
cksum += addr&0xff;
@@ -151,7 +151,7 @@
cksum += *s;
Bprint(&bout, "%.2X", *s++);
}
- Bprint(&bout, "%.2X\n", (~cksum)&0xff);
+ Bprint(&bout, "%.2lX\n", (~cksum)&0xff);
addr += l;
}

@@ -168,14 +168,14 @@

cksum = 0;
if(a & (0xFF<<24)){
- Bprint(&bout, "S7%.8X", a);
+ Bprint(&bout, "S7%.8lX", a);
cksum += (a>>24)&0xff;
}else
- Bprint(&bout, "S9%.6X", a);
+ Bprint(&bout, "S9%.6lX", a);
cksum += a&0xff;
cksum += (a>>8)&0xff;
cksum += (a>>16)&0xff;
- Bprint(&bout, "%.2X\n", (~cksum)&0xff);
+ Bprint(&bout, "%.2lX\n", (~cksum)&0xff);
}

void
=======================================
--- /utils/nm/nm.c Fri Dec 22 13:39:35 2006
+++ /utils/nm/nm.c Thu Jul 22 03:56:14 2010
@@ -20,6 +20,7 @@
int nflag;
int sflag;
int uflag;
+int Tflag;

Sym **fnames; /* file path translation table */
Sym **symptr;
@@ -34,6 +35,13 @@
void doar(Biobuf*);
void dofile(Biobuf*);
void zenter(Sym*);
+
+void
+usage(void)
+{
+ fprint(2, "usage: nm [-aghnsTu] file ...\n");
+ exits("usage");
+}

void
main(int argc, char *argv[])
@@ -44,13 +52,17 @@
Binit(&bout, 1, OWRITE);
argv0 = argv[0];
ARGBEGIN {
+ default: usage();
case 'a': aflag = 1; break;
case 'g': gflag = 1; break;
case 'h': hflag = 1; break;
case 'n': nflag = 1; break;
case 's': sflag = 1; break;
case 'u': uflag = 1; break;
+ case 'T': Tflag = 1; break;
} ARGEND
+ if (argc == 0)
+ usage();
if (argc > 1)
multifile++;
for(i=0; i<argc; i++){
@@ -78,14 +90,15 @@
void
doar(Biobuf *bp)
{
- int offset, size, obj;
+ vlong offset;
+ int size, obj;
char membername[SARNAME];

multifile = 1;
for (offset = Boffset(bp);;offset += size) {
size = nextar(bp, offset, membername);
if (size < 0) {
- error("phase error on ar header %ld", offset);
+ error("phase error on ar header %lld", offset);
return;
}
if (size == 0)
@@ -141,10 +154,10 @@
s = (Sym**)vs;
t = (Sym**)vt;
if(nflag)
- if((ulong)(*s)->value < (ulong)(*t)->value)
+ if((*s)->value < (*t)->value)
return -1;
else
- return (ulong)(*s)->value > (ulong)(*t)->value;
+ return (*s)->value > (*t)->value;
return strcmp((*s)->name, (*t)->name);
}
/*
@@ -155,7 +168,7 @@
{
static int maxf = 0;

- if (s->value > maxf) {
+ if (s->value >= maxf) {
maxf = (s->value+CHUNK-1) &~ (CHUNK-1);
fnames = realloc(fnames, maxf*sizeof(*fnames));
if(fnames == 0) {
@@ -263,8 +276,10 @@
cp = path;
} else
cp = s->name;
+ if (Tflag)
+ Bprint(&bout, "%8ux ", s->sig);
if (s->value || s->type == 'a' || s->type == 'p')
- Bprint(&bout, "%8lux %c %s\n", s->value, s->type, cp);
+ Bprint(&bout, "%8llux %c %s\n", s->value, s->type, cp);
else
Bprint(&bout, " %c %s\n", s->type, cp);
}

==============================================================================
Revision: 62dfecbad9
Author: Mechiel Lukkien <mec...@ueber.net>
Date: Thu Jul 22 15:14:40 2010
Log: Merge with inferno-os 20100722.
http://code.google.com/p/inferno-npe/source/detail?r=62dfecbad9

Modified:
/CHANGES
/include/version.h

=======================================
--- /CHANGES Mon May 10 15:14:08 2010
+++ /CHANGES Thu Jul 22 15:14:40 2010
@@ -1,3 +1,13 @@
+20100722
+ include/bio.h add varargck and repair resulting diagnostics in utils and
limbo/ [issue 237, mechiel]
+20100719
+ appl/cmd/disk/mkfs.b change getname/getpath to cope with missing newline
[issue 236]
+20100715
+ appl/wm/toolbar.b changed not to create new /chan/snarf if one exists,
unless -p (private) option given [toolbar(1)]
+ utils/cc/macbody - add overlooked change to implement __VA_ARGS__
+ other minor updates to the compilers to resync
+20100714
+ correctly initialise types in utils/cc/sub.c
20100504
change lib9/strtoull.c for MS
20100503
=======================================
--- /include/version.h Mon May 10 15:14:08 2010
+++ /include/version.h Thu Jul 22 15:14:40 2010
@@ -1,1 +1,1 @@
-#define VERSION "Fourth Edition (20100505)"
+#define VERSION "Fourth Edition (20100722)"
Reply all
Reply to author
Forward
0 new messages