[inferno-npe] 7 new revisions pushed by extrudedaluminiu on 2010-08-03 14:38 GMT

5 views
Skip to first unread message

infer...@googlecode.com

unread,
Aug 3, 2010, 10:39:18 AM8/3/10
to inferno-n...@googlegroups.com
7 new revisions:

Revision: 9849f370ac
Author: for...@vitanuova.com
Date: Mon Aug 2 12:38:23 2010
Log: close forse branch from 2008
http://code.google.com/p/inferno-npe/source/detail?r=9849f370ac

Revision: 2b11d7e746
Author: for...@vitanuova.com
Date: Mon Aug 2 12:29:59 2010
Log: close auth from 2008
http://code.google.com/p/inferno-npe/source/detail?r=2b11d7e746

Revision: b6a45e5a90
Author: for...@vitanuova.com
Date: Sun Aug 1 04:55:40 2010
Log: 20100801
http://code.google.com/p/inferno-npe/source/detail?r=b6a45e5a90

Revision: c8dab40360
Author: for...@vitanuova.com
Date: Mon Aug 2 06:49:50 2010
Log: 20100802-1449
http://code.google.com/p/inferno-npe/source/detail?r=c8dab40360

Revision: c280229351
Author: for...@vitanuova.com
Date: Mon Aug 2 12:41:25 2010
Log: 20100802-2041
http://code.google.com/p/inferno-npe/source/detail?r=c280229351

Revision: 049de5acd5
Author: Venkatesh Srinivas <m...@endeavour.zapto.org>
Date: Tue Aug 3 07:31:59 2010
Log: Merge inferno-os of 2010-08-02....
http://code.google.com/p/inferno-npe/source/detail?r=049de5acd5

Revision: 4a83003765
Author: Venkatesh Srinivas <m...@endeavour.zapto.org>
Date: Tue Aug 3 07:32:52 2010
Log: Close auth branch (merge with inferno-os).
http://code.google.com/p/inferno-npe/source/detail?r=4a83003765

==============================================================================
Revision: 9849f370ac
Author: for...@vitanuova.com
Date: Mon Aug 2 12:38:23 2010
Log: close forse branch from 2008
http://code.google.com/p/inferno-npe/source/detail?r=9849f370ac



==============================================================================
Revision: 2b11d7e746
Author: for...@vitanuova.com
Date: Mon Aug 2 12:29:59 2010
Log: close auth from 2008
http://code.google.com/p/inferno-npe/source/detail?r=2b11d7e746



==============================================================================
Revision: b6a45e5a90
Author: for...@vitanuova.com
Date: Sun Aug 1 04:55:40 2010
Log: 20100801
http://code.google.com/p/inferno-npe/source/detail?r=b6a45e5a90

Added:
/include/logfsos.h
Modified:
/CHANGES
/emu/Linux/os.c
/emu/MacOSX/os.c
/emu/port/devtk.c
/include/version.h
/libtk/coval.c

=======================================
--- /dev/null
+++ /include/logfsos.h Sun Aug 1 04:55:40 2010
@@ -0,0 +1,1 @@
+#include "lib9.h"
=======================================
--- /CHANGES Thu Jul 22 03:56:14 2010
+++ /CHANGES Sun Aug 1 04:55:40 2010
@@ -1,3 +1,7 @@
+20100801
+ libtk/coval.c - simplify vlong expression for some compilers [issue 216,
mechiel]
+20100727
+ on Linux and MacOSX, look at faulting address to decide if it's
dereference of nil
20100722
include/bio.h add varargck and repair resulting diagnostics in utils and
limbo/ [issue 237, mechiel]
20100719
=======================================
--- /emu/Linux/os.c Fri Feb 5 07:15:14 2010
+++ /emu/Linux/os.c Sun Aug 1 04:55:40 2010
@@ -8,11 +8,15 @@
#include <sys/wait.h>
#include <sys/time.h>

+#include <stdint.h>
+
#include "dat.h"
#include "fns.h"
#include "error.h"
#include <fpuctl.h>

+#include <raise.h>
+
/* glibc 2.3.3-NTPL messes up getpid() by trying to cache the result, so
we'll do it ourselves */
#include <sys/syscall.h>
#define getpid() syscall(SYS_getpid)
@@ -96,7 +100,7 @@

p = newproc();
if(0)
- print("start %s:%.8lx\n", name, p);
+ print("start %s:%#p\n", name, p);
if(p == nil) {
print("kproc(%s): no memory", name);
return;
@@ -151,50 +155,49 @@
return 0;
}

-/*
- * TO DO:
- * To get pc on trap, use sigaction instead of signal and
- * examine its siginfo structure
- */
-
-/*
static void
-diserr(char *s, int pc)
-{
- char buf[ERRMAX];
-
- snprint(buf, sizeof(buf), "%s: pc=0x%lux", s, pc);
+sysfault(char *what, void *addr)
+{
+ char buf[64];
+
+ snprint(buf, sizeof(buf), "sys: %s%#p", what, addr);
disfault(nil, buf);
}
-*/

static void
-trapILL(int signo)
+trapILL(int signo, siginfo_t *si, void *a)
{
USED(signo);
- disfault(nil, "Illegal instruction");
+ USED(a);
+ sysfault("illegal instruction pc=", si->si_addr);
}

-static void
-trapBUS(int signo)
-{
- USED(signo);
- disfault(nil, "Bus error");
+static int
+isnilref(siginfo_t *si)
+{
+ return si != 0 && (si->si_addr == (void*)~(uintptr_t)0 ||
(uintptr_t)si->si_addr < 512);
}

static void
-trapSEGV(int signo)
-{
- USED(signo);
- disfault(nil, "Segmentation violation");
+trapmemref(int signo, siginfo_t *si, void *a)
+{
+ USED(a); /* ucontext_t*, could fetch pc in machine-dependent way */
+ if(isnilref(si))
+ disfault(nil, exNilref);
+ else if(signo == SIGBUS)
+ sysfault("bad address addr=", si->si_addr); /* eg, misaligned */
+ else
+ sysfault("segmentation violation addr=", si->si_addr);
}

static void
-trapFPE(int signo)
+trapFPE(int signo, siginfo_t *si, void *a)
{
char buf[64];
+
USED(signo);
- snprint(buf, sizeof(buf), "sys: fp: exception status=%.4lux", getfsr());
+ USED(a);
+ snprint(buf, sizeof(buf), "sys: fp: exception status=%.4lux pc=%#p",
getfsr(), si->si_addr);
disfault(nil, buf);
}

@@ -348,14 +351,15 @@
signal(SIGINT, cleanexit);

if(sflag == 0) {
- act.sa_handler = trapBUS;
- sigaction(SIGBUS, &act, nil);
- act.sa_handler = trapILL;
+ act.sa_flags = SA_SIGINFO;
+ act.sa_sigaction = trapILL;
sigaction(SIGILL, &act, nil);
- act.sa_handler = trapSEGV;
- sigaction(SIGSEGV, &act, nil);
- act.sa_handler = trapFPE;
+ act.sa_sigaction = trapFPE;
sigaction(SIGFPE, &act, nil);
+ act.sa_sigaction = trapmemref;
+ sigaction(SIGBUS, &act, nil);
+ sigaction(SIGSEGV, &act, nil);
+ act.sa_flags &= ~SA_SIGINFO;
}

p = newproc();
=======================================
--- /emu/MacOSX/os.c Fri Dec 22 16:30:12 2006
+++ /emu/MacOSX/os.c Sun Aug 1 04:55:40 2010
@@ -9,6 +9,9 @@
#include "fns.h"
#include "error.h"

+#include <raise.h>
+#include <fpuctl.h>
+
#undef _POSIX_C_SOURCE
#undef getwd

@@ -48,55 +51,96 @@

extern int dflag;

-Proc *
-getup(void) {
- return (Proc *)pthread_getspecific(prdakey);
+Proc*
+getup(void)
+{
+ return pthread_getspecific(prdakey);
}

-/* Pthread version */
void
pexit(char *msg, int t)
{
- Osenv *e;
- Proc *p;
-
- USED(t);
- USED(msg);
-
- lock(&procs.l);
- p = up;
- if(p->prev)
- p->prev->next = p->next;
- else
- procs.head = p->next;
-
- if(p->next)
- p->next->prev = p->prev;
- else
- procs.tail = p->prev;
- unlock(&procs.l);
-
- if(0)
- print("pexit: %s: %s\n", p->text, msg);
-
- e = p->env;
- if(e != nil) {
- closefgrp(e->fgrp);
- closepgrp(e->pgrp);
- closeegrp(e->egrp);
- closesigs(e->sigs);
- }
- free(e->user);
- free(p->prog);
- free(p);
- pthread_exit(0);
+ Osenv * e;
+ Proc * p;
+
+ USED(t);
+ USED(msg);
+
+ lock(&procs.l);
+ p = up;
+ if(p->prev)
+ p->prev->next = p->next;
+ else
+ procs.head = p->next;
+
+ if(p->next)
+ p->next->prev = p->prev;
+ else
+ procs.tail = p->prev;
+ unlock(&procs.l);
+
+ if(0)
+ print("pexit: %s: %s\n", p->text, msg);
+
+ e = p->env;
+ if(e != nil) {
+ closefgrp(e->fgrp);
+ closepgrp(e->pgrp);
+ closeegrp(e->egrp);
+ closesigs(e->sigs);
+ }
+ free(e->user);
+ free(p->prog);
+ free(p);
+ pthread_exit(0);
}

-void
-trapBUS(int signo)
-{
- USED(signo);
- disfault(nil, "Bus error");
+
+
+static void
+sysfault(char *what, void *addr)
+{
+ char buf[64];
+
+ snprint(buf, sizeof(buf), "sys: %s%#p", what, addr);
+ disfault(nil, buf);
+}
+
+static void
+trapILL(int signo, siginfo_t *si, void *a)
+{
+ USED(signo);
+ USED(a);
+ sysfault("illegal instruction pc=", si->si_addr);
+}
+
+static int
+isnilref(siginfo_t *si)
+{
+ return si != 0 && (si->si_addr == (void*)~(uintptr_t)0 ||
(uintptr_t)si->si_addr < 512);
+}
+
+static void
+trapmemref(int signo, siginfo_t *si, void *a)
+{
+ USED(a); /* ucontext_t*, could fetch pc in machine-dependent way */
+ if(isnilref(si))
+ disfault(nil, exNilref);
+ else if(signo == SIGBUS)
+ sysfault("bad address addr=", si->si_addr); /* eg, misaligned */
+ else
+ sysfault("segmentation violation addr=", si->si_addr);
+}
+
+static void
+trapFPE(int signo, siginfo_t *si, void *a)
+{
+ char buf[64];
+
+ USED(signo);
+ USED(a);
+ snprint(buf, sizeof(buf), "sys: fp: exception status=%.4lux pc=%#p",
getfsr(), si->si_addr);
+ disfault(nil, buf);
}

void
@@ -111,212 +155,161 @@

up->intwait = 0; /* Clear it so the proc can continue */
}
-
-void
-trapILL(int signo)
-{
- USED(signo);
- disfault(nil, "Illegal instruction");
-}

/* from geoff collyer's port */
void
-printILL(int sig, siginfo_t *siginfo, void *v)
-{
- USED(sig);
- USED(v);
- panic("Illegal instruction with code=%d at address=%x, opcode=%x.\n"
- ,siginfo->si_code, siginfo->si_addr,*(char*)siginfo->si_addr);
-}
-
-void
-trapSEGV(int signo)
-{
- USED(signo);
- disfault(nil, "Segmentation violation");
-}
-
-void
-trapFPE(int signo)
-{
- USED(signo);
- disfault(nil, "Floating point exception");
+printILL(int sig, siginfo_t *si, void *v)
+{
+ USED(sig);
+ USED(v);
+ panic("illegal instruction with code=%d at address=%p, opcode=%#x\n",
+ si->si_code, si->si_addr, *(uchar*)si->si_addr);
}

static void
setsigs(void)
{
- struct sigaction act;
-
- memset(&act, 0 , sizeof(act));
-
- /*
- * For the correct functioning of devcmd in the
- * face of exiting slaves
- */
- signal(SIGPIPE, SIG_IGN);
- if(signal(SIGTERM, SIG_IGN) != SIG_IGN)
- signal(SIGTERM, cleanexit);
-
- act.sa_handler=trapUSR1;
- sigaction(SIGUSR1, &act, nil);
-
- if(sflag == 0) {
- act.sa_handler = trapBUS;
- sigaction(SIGBUS, &act, nil);
- act.sa_handler = trapILL;
- sigaction(SIGILL, &act, nil);
- act.sa_handler = trapSEGV;
- sigaction(SIGSEGV, &act, nil);
- act.sa_handler = trapFPE;
- sigaction(SIGFPE, &act, nil);
- if(signal(SIGINT, SIG_IGN) != SIG_IGN)
- signal(SIGINT, cleanexit);
- } else {
- act.sa_sigaction = printILL;
- act.sa_flags=SA_SIGINFO;
- sigaction(SIGILL, &act, nil);
- }
-}
+ struct sigaction act;
+
+ memset(&act, 0 , sizeof(act));
+
+ /*
+ * For the correct functioning of devcmd in the
+ * face of exiting slaves
+ */
+ signal(SIGPIPE, SIG_IGN);
+ if(signal(SIGTERM, SIG_IGN) != SIG_IGN)
+ signal(SIGTERM, cleanexit);
+
+ act.sa_handler = trapUSR1;
+ sigaction(SIGUSR1, &act, nil);
+
+ if(sflag == 0) {
+ act.sa_flags = SA_SIGINFO;
+ act.sa_sigaction = trapILL;
+ sigaction(SIGILL, &act, nil);
+ act.sa_sigaction = trapFPE;
+ sigaction(SIGFPE, &act, nil);
+ act.sa_sigaction = trapmemref;
+ sigaction(SIGBUS, &act, nil);
+ sigaction(SIGSEGV, &act, nil);
+ if(signal(SIGINT, SIG_IGN) != SIG_IGN)
+ signal(SIGINT, cleanexit);
+ } else {
+ act.sa_sigaction = printILL;
+ act.sa_flags = SA_SIGINFO;
+ sigaction(SIGILL, &act, nil);
+ }
+}
+
+


void *
tramp(void *arg)
{
- Proc *p = arg;
- p->sigid = (int)pthread_self();
- if(pthread_setspecific(prdakey, arg)) {
- print("set specific data failed in tramp\n");
- pthread_exit(0);
- }
- p->func(p->arg);
- pexit("{Tramp}", 0);
- return NULL;
+ Proc *p = arg;
+ p->sigid = (int)pthread_self();
+ if(pthread_setspecific(prdakey, arg)) {
+ print("set specific data failed in tramp\n");
+ pthread_exit(0);
+ }
+ p->func(p->arg);
+ pexit("{Tramp}", 0);
+ return NULL;
}

int
kproc(char *name, void (*func)(void*), void *arg, int flags)
{
- pthread_t thread;
- Proc *p;
- Pgrp *pg;
- Fgrp *fg;
- Egrp *eg;
-
- pthread_attr_t attr;
-
- p = newproc();
- if(p == nil)
- panic("kproc: no memory");
-
- if(flags & KPDUPPG) {
- pg = up->env->pgrp;
- incref(&pg->r);
- p->env->pgrp = pg;
- }
- if(flags & KPDUPFDG) {
- fg = up->env->fgrp;
- incref(&fg->r);
- p->env->fgrp = fg;
- }
- if(flags & KPDUPENVG) {
- eg = up->env->egrp;
- incref(&eg->r);
- p->env->egrp = eg;
- }
-
- p->env->uid = up->env->uid;
- p->env->gid = up->env->gid;
- kstrdup(&p->env->user, up->env->user);
-
- strcpy(p->text, name);
-
- p->func = func;
- p->arg = arg;
-
- lock(&procs.l);
- if(procs.tail != nil) {
- p->prev = procs.tail;
- procs.tail->next = p;
- } else {
- procs.head = p;
- p->prev = nil;
- }
- procs.tail = p;
- unlock(&procs.l);
-
- up->kid = p;
-
- if((pthread_attr_init(&attr))== -1)
- panic("pthread_attr_init failed");
-
- errno=0;
- pthread_attr_setschedpolicy(&attr,SCHED_OTHER);
- if(errno)
- panic("pthread_attr_setschedpolicy failed");
-
- pthread_attr_setinheritsched(&attr, PTHREAD_INHERIT_SCHED);
- pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
-
- if(pthread_create(&thread, &attr, tramp, p))
- panic("thr_create failed\n");
- pthread_attr_destroy(&attr);
-
- return (int)thread;
+ pthread_t thread;
+ Proc * p;
+ Pgrp * pg;
+ Fgrp * fg;
+ Egrp * eg;
+
+ pthread_attr_t attr;
+
+ p = newproc();
+ if(p == nil)
+ panic("kproc: no memory");
+
+ if(flags & KPDUPPG) {
+ pg = up->env->pgrp;
+ incref(&pg->r);
+ p->env->pgrp = pg;
+ }
+ if(flags & KPDUPFDG) {
+ fg = up->env->fgrp;
+ incref(&fg->r);
+ p->env->fgrp = fg;
+ }
+ if(flags & KPDUPENVG) {
+ eg = up->env->egrp;
+ incref(&eg->r);
+ p->env->egrp = eg;
+ }
+
+ p->env->uid = up->env->uid;
+ p->env->gid = up->env->gid;
+ kstrdup(&p->env->user, up->env->user);
+
+ strcpy(p->text, name);
+
+ p->func = func;
+ p->arg = arg;
+
+ lock(&procs.l);
+ if(procs.tail != nil) {
+ p->prev = procs.tail;
+ procs.tail->next = p;
+ } else {
+ procs.head = p;
+ p->prev = nil;
+ }
+ procs.tail = p;
+ unlock(&procs.l);
+
+ up->kid = p;
+
+ if(pthread_attr_init(&attr) == -1)
+ panic("pthread_attr_init failed");
+
+ errno = 0;
+ pthread_attr_setschedpolicy(&attr, SCHED_OTHER);
+ if(errno)
+ panic("pthread_attr_setschedpolicy failed");
+
+ pthread_attr_setinheritsched(&attr, PTHREAD_INHERIT_SCHED);
+ pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
+
+ if(pthread_create(&thread, &attr, tramp, p))
+ panic("thr_create failed\n");
+ pthread_attr_destroy(&attr);
+
+ return (int)thread;
}

int
segflush(void *va, ulong len)
{
- kern_return_t err;
- vm_machine_attribute_val_t value = MATTR_VAL_ICACHE_FLUSH;
-
- err = vm_machine_attribute( (vm_map_t)mach_task_self(),
- (vm_address_t)va,
- (vm_size_t)len,
- MATTR_CACHE,
- &value);
- if (err != KERN_SUCCESS) {
- print("segflush: failure (%d) address %lud\n", err, va);
- }
- return (int)err;
-}
-
-/* from geoff collyer's port
-invalidate instruction cache and write back data cache from a to a+n-1,
-at least.
-
-void
-segflush(void *a, ulong n)
-{
- ulong *p;
-
- // paranoia, flush the world
- __asm__("isync\n\t"
- "eieio\n\t"
- : // no output
- :
- );
- // cache blocks are often eight words (32 bytes) long, sometimes 16
bytes.
- // need to determine it dynamically?
- for (p = (ulong *)((ulong)a & ~3UL); (char *)p < (char *)a + n; p++)
- __asm__("dcbst 0,%0\n\t" // not dcbf, which writes back, then
invalidates
- "icbi 0,%0\n\t"
- : // no output
- : "ar" (p)
- );
- __asm__("isync\n\t"
- "eieio\n\t"
- : // no output
- :
- );
-}
-*/
+ kern_return_t err;
+ vm_machine_attribute_val_t value = MATTR_VAL_ICACHE_FLUSH;
+
+ err = vm_machine_attribute( (vm_map_t)mach_task_self(),
+ (vm_address_t)va,
+ (vm_size_t)len,
+ MATTR_CACHE,
+ &value);
+ if(err != KERN_SUCCESS)
+ print("segflush: failure (%d) address %lud\n", err, va);
+ return (int)err;
+}

void
oshostintr(Proc *p)
{
- pthread_kill((pthread_t)p->sigid, SIGUSR1);
+ pthread_kill((pthread_t)p->sigid, SIGUSR1);
}

static ulong erendezvous(void*, ulong);
@@ -324,20 +317,20 @@
void
osblock(void)
{
- erendezvous(up, 0);
+ erendezvous(up, 0);
}

void
osready(Proc *p)
{
- erendezvous(p, 0);
+ erendezvous(p, 0);
}

void
oslongjmp(void *regs, osjmpbuf env, int val)
{
- USED(regs);
- siglongjmp(env, val);
+ USED(regs);
+ siglongjmp(env, val);
}

struct termios tinit;
@@ -345,128 +338,135 @@
static void
termset(void)
{
- struct termios t;
-
- tcgetattr(0, &t);
- tinit = t;
- t.c_lflag &= ~(ICANON|ECHO|ISIG);
- t.c_cc[VMIN] = 1;
- t.c_cc[VTIME] = 0;
- tcsetattr(0, TCSANOW, &t);
-}
-
+ struct termios t;
+
+ tcgetattr(0, &t);
+ tinit = t;
+ t.c_lflag &= ~(ICANON | ECHO | ISIG);
+ t.c_cc[VMIN] = 1;
+ t.c_cc[VTIME] = 0;
+ tcsetattr(0, TCSANOW, &t);
+}
+
static void
termrestore(void)
{
- tcsetattr(0, TCSANOW, &tinit);
+ tcsetattr(0, TCSANOW, &tinit);
}


void
cleanexit(int x)
{
- USED(x);
-
- if(up->intwait) {
- up->intwait = 0;
- return;
- }
-
- if(dflag == 0)
- termrestore();
-
- exit(0);
-}
+ USED(x);
+
+ if(up->intwait) {
+ up->intwait = 0;
+ return;
+ }
+
+ if(dflag == 0)
+ termrestore();
+
+ exit(0);
+}
+
+

void
osreboot(char *file, char **argv)
{
- if(dflag == 0)
- termrestore();
- execvp(file, argv);
- panic("reboot failure");
-}
+ if(dflag == 0)
+ termrestore();
+ execvp(file, argv);
+ panic("reboot failure");
+}
+
+

int gidnobody= -1, uidnobody= -1;

void
getnobody()
{
- struct passwd *pwd;
-
- if((pwd = getpwnam("nobody"))) {
- uidnobody = pwd->pw_uid;
- gidnobody = pwd->pw_gid;
- }
+ struct passwd *pwd;
+
+ if((pwd = getpwnam("nobody"))) {
+ uidnobody = pwd->pw_uid;
+ gidnobody = pwd->pw_gid;
+ }
}

-/* Pthread version */
static pthread_mutex_t rendezvouslock;
static pthread_mutexattr_t *pthread_mutexattr_default = NULL;

void
libinit(char *imod)
{
- struct passwd *pw;
- Proc *p;
- char sys[64];
-
- setsid();
-
- // setup personality
- gethostname(sys, sizeof(sys));
- kstrdup(&ossysname, sys);
- getnobody();
-
- if(dflag == 0)
- termset();
-
- setsigs();
-
- if(pthread_mutex_init(&rendezvouslock, pthread_mutexattr_default))
- panic("pthread_mutex_init");
-
- if(pthread_key_create(&prdakey,NULL))
- print("key_create failed\n");
-
- p = newproc();
- if(pthread_setspecific(prdakey, p))
- panic("set specific thread data failed\n");
-
- pw = getpwuid(getuid());
- if(pw != nil)
- kstrdup(&eve, pw->pw_name);
- else
- print("cannot getpwuid\n");
-
- up->env->uid = getuid();
- up->env->gid = getgid();
-
- emuinit(imod);
-}
+ struct passwd *pw;
+ Proc * p;
+ char sys[64];
+
+ setsid();
+
+ // setup personality
+ gethostname(sys, sizeof(sys));
+ kstrdup(&ossysname, sys);
+ getnobody();
+
+ if(dflag == 0)
+ termset();
+
+ setsigs();
+
+ if(pthread_mutex_init(&rendezvouslock, pthread_mutexattr_default))
+ panic("pthread_mutex_init");
+
+ if(pthread_key_create(&prdakey, NULL))
+ print("key_create failed\n");
+
+ p = newproc();
+ if(pthread_setspecific(prdakey, p))
+ panic("set specific thread data failed\n");
+
+ pw = getpwuid(getuid());
+ if(pw != nil)
+ kstrdup(&eve, pw->pw_name);
+ else
+ print("cannot getpwuid\n");
+
+ up->env->uid = getuid();
+ up->env->gid = getgid();
+
+ emuinit(imod);
+}
+
+

int
readkbd(void)
{
- int n;
- char buf[1];
-
- n = read(0, buf, sizeof(buf));
- if(n < 0)
- print("keyboard close (n=%d, %s)\n", n, strerror(errno));
- if(n <= 0)
- pexit("keyboard thread", 0);
-
- switch(buf[0]) {
- case '\r':
- buf[0] = '\n';
- break;
- case DELETE:
- cleanexit(0);
- break;
- }
- return buf[0];
-}
+ int n;
+ char buf[1];
+
+ n = read(0, buf, sizeof(buf));
+ if(n < 0)
+ print("keyboard close (n=%d, %s)\n", n, strerror(errno));
+ if(n <= 0)
+ pexit("keyboard thread", 0);
+
+ switch(buf[0]) {
+ case '\r':
+ buf[0] = '\n';
+ break;
+ case DELETE:
+ cleanexit(0);
+ break;
+ }
+ return buf[0];
+}
+
+

enum
{
@@ -477,10 +477,10 @@
typedef struct Tag Tag;
struct Tag
{
- void* tag;
- ulong val;
- pthread_cond_t cv;
- Tag* next;
+ void* tag;
+ ulong val;
+ pthread_cond_t cv;
+ Tag* next;
};

static Tag* ht[NHASH];
@@ -490,66 +490,66 @@
static ulong
erendezvous(void *tag, ulong value)
{
- int h;
- ulong rval;
- Tag *t, **l, *f;
-
- h = (ulong)tag & (NHASH-1);
-
-// lock(&hlock);
- pthread_mutex_lock(&rendezvouslock);
- l = &ht[h];
- for(t = ht[h]; t; t = t->next) {
- if(t->tag == tag) {
- rval = t->val;
- t->val = value;
- t->tag = 0;
- pthread_mutex_unlock(&rendezvouslock);
-// unlock(&hlock);
- if(pthread_cond_signal(&(t->cv)))
- panic("pthread_cond_signal");
- return rval;
- }
- }
-
- t = ft;
- if(t == 0) {
- t = malloc(sizeof(Tag));
- if(t == nil)
- panic("rendezvous: no memory");
- if(pthread_cond_init(&(t->cv), NULL)) {
- print("pthread_cond_init (errno: %s) \n", strerror(errno));
- panic("pthread_cond_init");
- }
- } else
- ft = t->next;
-
- t->tag = tag;
- t->val = value;
- t->next = *l;
- *l = t;
-// pthread_mutex_unlock(&rendezvouslock);
-// unlock(&hlock);
-
- while(t->tag != nil)
- pthread_cond_wait(&(t->cv),&rendezvouslock);
-
-// pthread_mutex_lock(&rendezvouslock);
-// lock(&hlock);
- rval = t->val;
- for(f = *l; f; f = f->next){
- if(f == t) {
- *l = f->next;
- break;
- }
- l = &f->next;
- }
- t->next = ft;
- ft = t;
- pthread_mutex_unlock(&rendezvouslock);
-// unlock(&hlock);
-
- return rval;
+ int h;
+ ulong rval;
+ Tag * t, **l, *f;
+
+ h = (ulong)tag & (NHASH - 1);
+
+ // lock(&hlock);
+ pthread_mutex_lock(&rendezvouslock);
+ l = &ht[h];
+ for(t = ht[h]; t; t = t->next) {
+ if(t->tag == tag) {
+ rval = t->val;
+ t->val = value;
+ t->tag = 0;
+ pthread_mutex_unlock(&rendezvouslock);
+ // unlock(&hlock);
+ if(pthread_cond_signal(&(t->cv)))
+ panic("pthread_cond_signal");
+ return rval;
+ }
+ }
+
+ t = ft;
+ if(t == 0) {
+ t = malloc(sizeof(Tag));
+ if(t == nil)
+ panic("rendezvous: no memory");
+ if(pthread_cond_init(&(t->cv), NULL)) {
+ print("pthread_cond_init (errno: %s) \n", strerror(errno));
+ panic("pthread_cond_init");
+ }
+ } else
+ ft = t->next;
+
+ t->tag = tag;
+ t->val = value;
+ t->next = *l;
+ *l = t;
+ // pthread_mutex_unlock(&rendezvouslock);
+ // unlock(&hlock);
+
+ while(t->tag != nil)
+ pthread_cond_wait(&(t->cv), &rendezvouslock);
+
+ // pthread_mutex_lock(&rendezvouslock);
+ // lock(&hlock);
+ rval = t->val;
+ for(f = *l; f; f = f->next) {
+ if(f == t) {
+ *l = f->next;
+ break;
+ }
+ l = &f->next;
+ }
+ t->next = ft;
+ ft = t;
+ pthread_mutex_unlock(&rendezvouslock);
+ // unlock(&hlock);
+
+ return rval;
}

/*
@@ -558,17 +558,19 @@
long
osmillisec(void)
{
- static long sec0 = 0, usec0;
- struct timeval t;
-
- if(gettimeofday(&t, NULL)<0)
- return(0);
- if(sec0==0) {
- sec0 = t.tv_sec;
- usec0 = t.tv_usec;
- }
- return((t.tv_sec-sec0)*1000+(t.tv_usec-usec0+500)/1000);
-}
+ static long sec0 = 0, usec0;
+ struct timeval t;
+
+ if(gettimeofday(&t, NULL) < 0)
+ return(0);
+ if(sec0 == 0) {
+ sec0 = t.tv_sec;
+ usec0 = t.tv_usec;
+ }
+ return((t.tv_sec - sec0) * 1000 + (t.tv_usec - usec0 + 500) / 1000);
+}
+
+

/*
* Return the time since the epoch in nanoseconds and microseconds
@@ -586,62 +588,64 @@
vlong
osusectime(void)
{
- struct timeval t;
-
- gettimeofday(&t, nil);
- return (vlong)t.tv_sec * 1000000 + t.tv_usec;
-}
+ struct timeval t;
+
+ gettimeofday(&t, nil);
+ return (vlong)t.tv_sec * 1000000 + t.tv_usec;
+}
+
+


int
osmillisleep(ulong milsec)
{
- struct timespec time;
- time.tv_sec = milsec / 1000;
- time.tv_nsec = (milsec % 1000) * 1000000;
- nanosleep(&time, nil);
- return 0;
-}
+ struct timespec time;
+ time.tv_sec = milsec / 1000;
+ time.tv_nsec = (milsec % 1000) * 1000000;
+ nanosleep(&time, nil);
+ return 0;
+}
+
+

int
limbosleep(ulong milsec)
{
- return osmillisleep(milsec);
+ return osmillisleep(milsec);
}

void
osyield(void)
{
- pthread_yield_np();
- // sched_yield();
+ pthread_yield_np();
}

void
ospause(void)
{
- for(;;)
- pause();
+ for(;;)
+ pause();
}

void
oslopri(void)
{
-// pthread_setschedparam(pthread_t thread, int policy, const struct
sched_param *param);
- setpriority(PRIO_PROCESS, 0, getpriority(PRIO_PROCESS,0)+4);
+// pthread_setschedparam(pthread_t thread, int policy, const struct
sched_param *param);
+ setpriority(PRIO_PROCESS, 0, getpriority(PRIO_PROCESS,0)+4);
}

__typeof__(sbrk(0))
sbrk(int size)
{
- void *brk;
- kern_return_t err;
-
- err = vm_allocate( (vm_map_t) mach_task_self(),
+ void *brk;
+ kern_return_t err;
+
+ err = vm_allocate( (vm_map_t) mach_task_self(),
(vm_address_t *)&brk,
size,
VM_FLAGS_ANYWHERE);
- if (err != KERN_SUCCESS)
***The diff for this file has been truncated for email.***
=======================================
--- /emu/port/devtk.c Fri Dec 22 09:07:39 2006
+++ /emu/port/devtk.c Sun Aug 1 04:55:40 2010
@@ -4,8 +4,8 @@

#include <interp.h>

-#include "image.h"
-#include <memimage.h>
+#include "draw.h"
+#include <memdraw.h>
#include <memlayer.h>
#include <cursor.h>

@@ -15,7 +15,9 @@
};

static
-Dirtab tkdirtab[]={
+Dirtab tkdirtab[]=
+{
+ ".", {Qdir, 0, QTDIR}, 0, DMDIR|0555,
"tkevents", {Qtkevents, 0}, 0, 0600,
};

@@ -32,6 +34,9 @@
int n;
char *s, *e;

+//fprint(2, "wiretap %p %q %q\n", top, cmd, result);
+ if(tkevents.eq == nil)
+ return;
n = 12;
if(cmd != nil)
n += strlen(cmd)+2+1;
@@ -71,6 +76,9 @@
}
if(tkevents.eq != nil)
qbwrite(tkevents.eq, b);
+ else
+ freeb(b);
+ poperror();
qunlock(&tkevents.l);
acquire();
}
@@ -84,16 +92,16 @@
return devattach(L'τ', spec);
}

-static int
-tkwalk(Chan* c, char* name)
-{
- return devwalk(c, name, tkdirtab, nelem(tkdirtab), devgen);
+static Walkqid*
+tkwalk(Chan *c, Chan *nc, char **name, int nname)
+{
+ return devwalk(c, nc, name, nname, tkdirtab, nelem(tkdirtab), devgen);
}

-static void
-tkstat(Chan* c, char* db)
-{
- devstat(c, db, tkdirtab, nelem(tkdirtab), devgen);
+static int
+tkstat(Chan *c, uchar *db, int n)
+{
+ return devstat(c, db, n, tkdirtab, nelem(tkdirtab), devgen);
}

static Chan*
@@ -134,9 +142,10 @@
tkread(Chan* c, void* a, long n, vlong offset)
{
USED(offset);
- switch(c->qid.path & ~CHDIR){
- case Qdir:
+ if(c->qid.type & QTDIR)
return devdirread(c, a, n, tkdirtab, nelem(tkdirtab), devgen);
+
+ switch((ulong)c->qid.path){
case Qtkevents:
return qread(tkevents.eq, a, n);
default:
@@ -162,7 +171,6 @@
devinit,
tkattach,
// devdetach,
- devclone,
tkwalk,
tkstat,
tkopen,
=======================================
--- /include/version.h Thu Jul 22 03:56:14 2010
+++ /include/version.h Sun Aug 1 04:55:40 2010
@@ -1,1 +1,1 @@
-#define VERSION "Fourth Edition (20100722)"
+#define VERSION "Fourth Edition (20100801)"
=======================================
--- /libtk/coval.c Fri Dec 22 09:07:39 2006
+++ /libtk/coval.c Sun Aug 1 04:55:40 2010
@@ -228,6 +228,7 @@
TkCoval *o;
int w, dx, dy;
Rectangle d;
+ vlong v;

o = TKobj(TkCoval, i);
w = TKF2I(o->width)/2;
@@ -244,5 +245,7 @@
dy *= dy;

/* XXX can we do this nicely without overflow and without vlongs? */
- return (vlong)(p.x*p.x)*dy + (vlong)(p.y*p.y)*dx < (vlong)dx*dy;
-}
+ v = (vlong)(p.x*p.x)*dy;
+ v += (vlong)(p.y*p.y)*dx;
+ return v < (vlong)dx*dy;
+}

==============================================================================
Revision: c8dab40360
Author: for...@vitanuova.com
Date: Mon Aug 2 06:49:50 2010
Log: 20100802-1449
http://code.google.com/p/inferno-npe/source/detail?r=c8dab40360

Modified:
/CHANGES
/appl/NOTICE
/appl/acme/acme/bin/src/win.b
/appl/cmd/auth/countersigner.b
/appl/cmd/cat.b
/appl/cmd/crypt.b
/appl/cmd/fs/proto.b
/appl/cmd/sh/std.b
/appl/cmd/stackv.b
/appl/cmd/wmexport.b
/appl/lib/NOTICE
/appl/lib/names.b
/appl/wm/tetris.b
/dis/auth/countersigner.dis
/dis/cat.dis
/dis/crypt.dis
/dis/fs/proto.dis
/dis/lib/names.dis
/dis/stackv.dis
/dis/wm/tetris.dis
/include/version.h
/man/1/stack

=======================================
--- /CHANGES Sun Aug 1 04:55:40 2010
+++ /CHANGES Mon Aug 2 06:49:50 2010
@@ -1,3 +1,6 @@
+20100801
+ various changes held back by accident, notably stackv in stack(1), better
diagnostics by cat(1)
+20100802
20100801
libtk/coval.c - simplify vlong expression for some compilers [issue 216,
mechiel]
20100727
=======================================
--- /appl/NOTICE Fri Feb 2 15:50:37 2007
+++ /appl/NOTICE Mon Aug 2 06:49:50 2010
@@ -8,7 +8,7 @@

Copyright © 1995-1999 Lucent Technologies Inc.
Portions Copyright © 1997-2000 Vita Nuova Limited
-Portions Copyright © 2000-2007 Vita Nuova Holdings Limited
+Portions Copyright © 2000-2010 Vita Nuova Holdings Limited

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
=======================================
--- /appl/acme/acme/bin/src/win.b Fri Jun 8 06:03:54 2007
+++ /appl/acme/acme/bin/src/win.b Mon Aug 2 06:49:50 2010
@@ -625,25 +625,27 @@

sendtype(fd0 : ref FD, raw : int)
{
- i, n, nr : int;
-
while(ntypebreak){
brkc := 0;
- for(i=0; i<ntypeb; i++)
+ i := 0;
+ while(i<ntypeb){
if(typing[i]==byte '\n' || typing[i]==byte 16r04){
- n = i + (typing[i] == byte '\n');
+ n := i + (typing[i] == byte '\n');
i++;
if(write(fd0, typing, n) != n)
error("sending to program");
- nr = nrunes(typing, i);
+ nr := nrunes(typing, i);
if (!raw)
q.p += nr;
ntyper -= nr;
ntypeb -= i;
typing[0:] = typing[i:i+ntypeb];
+ i = 0;
ntypebreak--;
brkc = 1;
- }
+ }else
+ i++;
+ }
if (!brkc) {
fprint(stdout, "no breakchar\n");
ntypebreak = 0;
=======================================
--- /appl/cmd/auth/countersigner.b Fri Dec 22 09:07:39 2006
+++ /appl/cmd/auth/countersigner.b Mon Aug 2 06:49:50 2010
@@ -9,6 +9,9 @@
include "keyring.m";
kr: Keyring;

+include "msgio.m";
+ msgio: Msgio;
+
include "security.m";

Countersigner: module
@@ -22,6 +25,8 @@
{
sys = load Sys Sys->PATH;
kr = load Keyring Keyring->PATH;
+ msgio = load Msgio Msgio->PATH;
+ msgio->init();

stdin = sys->fildes(0);
stdout = sys->fildes(1);
@@ -34,7 +39,7 @@
}

# get boxid
- buf := kr->getmsg(stdin);
+ buf := msgio->getmsg(stdin);
if(buf == nil){
sys->fprint(stderr, "countersigner: client hung up\n");
raise "fail:hungup";
@@ -48,12 +53,12 @@
sys->fprint(stderr, "countersigner: can't open %s: %r\n", file);
raise "fail:bad boxid";
}
- blind := kr->getmsg(fd);
+ blind := msgio->getmsg(fd);
if(blind == nil){
sys->fprint(stderr, "countersigner: can't read %s\n", file);
raise "fail:no blind";
}

# answer client
- kr->sendmsg(stdout, blind, len blind);
-}
+ msgio->sendmsg(stdout, blind, len blind);
+}
=======================================
--- /appl/cmd/cat.b Fri Dec 22 09:07:39 2006
+++ /appl/cmd/cat.b Mon Aug 2 06:49:50 2010
@@ -1,6 +1,8 @@
implement Cat;

include "sys.m";
+ sys: Sys;
+
include "draw.m";

Cat: module
@@ -8,50 +10,39 @@
init: fn(ctxt: ref Draw->Context, argv: list of string);
};

-sys: Sys;
stdout: ref Sys->FD;

-init(nil: ref Draw->Context, argl: list of string)
+init(nil: ref Draw->Context, args: list of string)
{
sys = load Sys Sys->PATH;
-
stdout = sys->fildes(1);
-
- argl = tl argl;
- if(argl == nil)
- argl = "-" :: nil;
- while(argl != nil) {
- cat(hd argl);
- argl = tl argl;
+ args = tl args;
+ if(args == nil)
+ args = "-" :: nil;
+ for(; args != nil; args = tl args){
+ file := hd args;
+ if(file != "-"){
+ fd := sys->open(file, Sys->OREAD);
+ if(fd == nil){
+ sys->fprint(sys->fildes(2), "cat: cannot open %s: %r\n", file);
+ raise "fail:bad open";
+ }
+ cat(fd, file);
+ }else
+ cat(sys->fildes(0), "<stdin>");
}
}

-cat(file: string)
-{
- n: int;
- fd: ref Sys->FD;
- buf := array[8192] of byte;
-
- if(file == "-")
- fd = sys->fildes(0);
- else {
- fd = sys->open(file, sys->OREAD);
- if(fd == nil) {
- sys->fprint(sys->fildes(2), "cat: cannot open %s: %r\n", file);
- raise "fail:bad open";
- }
- }
- for(;;) {
- n = sys->read(fd, buf, len buf);
- if(n <= 0)
- break;
+cat(fd: ref Sys->FD, file: string)
+{
+ buf := array[Sys->ATOMICIO] of byte;
+ while((n := sys->read(fd, buf, len buf)) > 0)
if(sys->write(stdout, buf, n) < n) {
sys->fprint(sys->fildes(2), "cat: write error: %r\n");
raise "fail:write error";
}
- }
if(n < 0) {
- sys->fprint(sys->fildes(2), "cat: read error: %r\n");
+ sys->fprint(sys->fildes(2), "cat: error reading %s: %r\n", file);
raise "fail:read error";
}
}
=======================================
--- /appl/cmd/crypt.b Sat Jul 14 03:41:18 2007
+++ /appl/cmd/crypt.b Mon Aug 2 06:49:50 2010
@@ -10,6 +10,9 @@
keyring: Keyring;
include "security.m";
ssl: SSL;
+include "bufio.m";
+include "msgio.m";
+ msgio: Msgio;
include "arg.m";

Crypt: module {
@@ -47,6 +50,8 @@
keyring = load Keyring Keyring->PATH;
if (keyring == nil)
badmodule(SSL->PATH);
+ msgio = load Msgio Msgio->PATH;
+ msgio->init();

arg := load Arg Arg->PATH;
if (arg == nil)
@@ -84,16 +89,14 @@
argv = arg->argv();
if (argv != nil)
usage();
- if(secret == nil){
- sys->fprint(stderr, "crypt: no secret given\n");
- usage();
- }
+ if(secret == nil)
+ secret = array of byte readpassword();
sk := array[Keyring->SHA1dlen] of byte;
keyring->sha1(secret, len secret, sk, nil);
if (headers) {
# deal with header - the header encodes the algorithm along with the
data.
if (decrypt) {
- msg := keyring->getmsg(sys->fildes(0));
+ msg := msgio->getmsg(sys->fildes(0));
if (msg != nil)
alg = string msg;
if (msg == nil || len alg < len ALGSTR || alg[0:len ALGSTR] != ALGSTR)
@@ -101,7 +104,7 @@
alg = alg[len ALGSTR:];
} else {
msg := array of byte ("alg " + alg);
- e := keyring->sendmsg(sys->fildes(1), msg, len msg);
+ e := msgio->sendmsg(sys->fildes(1), msg, len msg);
if (e == -1)
error("couldn't write algorithm string");
}
@@ -204,6 +207,32 @@
sys->fprint(fd, "\n");
}
}
+
+readpassword(): string
+{
+ bufio := load Bufio Bufio->PATH;
+ Iobuf: import bufio;
+ stdin := bufio->open("/dev/cons", Sys->OREAD);
+
+ cfd := sys->open("/dev/consctl", Sys->OWRITE);
+ if (cfd == nil || sys->fprint(cfd, "rawon") <= 0)
+ sys->fprint(stderr, "crypt: warning: cannot hide typed password\n");
+ sys->fprint(stderr, "password: ");
+ s := "";
+ while ((c := stdin.getc()) >= 0 && c != '\n'){
+ case c {
+ '\b' =>
+ if (len s > 0)
+ s = s[0:len s - 1];
+ 8r25 => # ^U
+ s = nil;
+ * =>
+ s[len s] = c;
+ }
+ }
+ sys->fprint(stderr, "\n");
+ return s;
+}

stream(src, dst: ref Sys->FD, bufsize: int)
{
=======================================
--- /appl/cmd/fs/proto.b Fri Dec 22 09:07:39 2006
+++ /appl/cmd/fs/proto.b Mon Aug 2 06:49:50 2010
@@ -33,7 +33,7 @@
iob: ref Iobuf;
};

-Star, Plus: con 1<<iota;
+Star, Plus, Empty: con 1<<iota;

types(): string
{
@@ -103,29 +103,30 @@
Skip =>
return r;
}
- (a, n) := readdir->init(path, Readdir->NAME|Readdir->COMPACT);
- if(len a == 0){
- c <-= ((nil, nil), reply);
- if(<-reply == Quit)
- quit(errorc);
- return Next;
- }
- j := 0;
+ a: array of ref Sys->Dir;
+ n := 0;
+ if((flags&Empty)==0)
+ (a, n) = readdir->init(path, Readdir->NAME|Readdir->COMPACT);
+ i := j := 0;
prevsub: string;
- for(i := 0; i < n; i++){
+ while(i < n || j < len sub){
for(; j < len sub; j++){
s := sub[j].name;
if(s == prevsub){
report(errorc, sys->sprint("duplicate entry %s", pathconcat(path, s)));
continue; # eliminate duplicates in proto
}
- if(s >= a[i].name || sub[j].old != nil)
+ # if we're copying from an old file, and there's a matching
+ # entry in the directory, then skip it.
+ if(sub[j].old != nil && i < n && s == a[i].name)
+ i++;
+ if(sub[j].old != nil || i < n && s >= a[i].name)
break;
report(errorc, sys->sprint("%s not found", pathconcat(path, s)));
}
- foundsub := j < len sub && (sub[j].name == a[i].name || sub[j].old !=
nil);
- if(foundsub || flags&Plus ||
- (flags&Star && (a[i].mode & Sys->DMDIR)==0)){
+ foundsub := j < len sub && (sub[j].old != nil || sub[j].name ==
a[i].name);
+
+ if(foundsub || flags&(Plus|Star)){
f: ref File;
if(foundsub){
f = sub[j++];
@@ -143,7 +144,7 @@
d = ref xd;
}else{
p = pathconcat(path, a[i].name);
- d = a[i];
+ d = a[i++];
}

d = file2dir(f, d);
@@ -152,12 +153,16 @@
r = walkfile(c, p, d, errorc);
else if(flags & Plus)
r = protowalk1(c, Plus, p, d, nil, errorc);
+ else if((flags&Star) && !foundsub)
+ r = protowalk1(c, Empty, p, d, nil, errorc);
else
r = protowalk1(c, f.flags, p, d, f.sub, errorc);
if(r == Skip)
return Next;
- }
- }
+ }else
+ i++;
+ }
+
c <-= ((nil, nil), reply);
if(<-reply == Quit)
quit(errorc);
@@ -272,7 +277,7 @@
return nil;
}
proto.indent = spc;
- (n, toks) := sys->tokenize(s, " \t\n");
+ (nil, toks) := sys->tokenize(s, " \t\n");
f := ref File(nil, ~0, nil, nil, nil, 0, nil);
(f.name, toks) = (getname(hd toks, 0), tl toks);
if(toks == nil)
=======================================
--- /appl/cmd/sh/std.b Fri Dec 22 09:07:39 2006
+++ /appl/cmd/sh/std.b Mon Aug 2 06:49:50 2010
@@ -512,7 +512,7 @@
status := ctxt.run(handler, last);
ctxt.pop();
return status;
- } exception e2{
+ } exception {
"fail:*" =>
ctxt.pop();
raise e;
=======================================
--- /appl/cmd/stackv.b Wed Jan 16 05:39:58 2008
+++ /appl/cmd/stackv.b Mon Aug 2 06:49:50 2010
@@ -16,7 +16,8 @@

stderr: ref Sys->FD;
stdout: ref Iobuf;
-hasht := array[97] of list of string;
+
+hasht := array[97] of (int, array of int);

Stackv: module {
init: fn(ctxt: ref Draw->Context, argv: list of string);
@@ -33,7 +34,7 @@
currp: ref Prog;
showtypes := 1;
showsource := 0;
-sep := "\t";
+showmodule := 0;

init(nil: ref Draw->Context, argv: list of string)
{
@@ -52,7 +53,7 @@
stdout = bufio->fopen(sys->fildes(1), Sys->OWRITE);

arg->init(argv);
- arg->setusage("stackv [-Tl] [-i indent] [-r maxdepth] [-s dis sbl]...
[pid[.sym...] ...]");
+ arg->setusage("stackv [-Tlm] [-r maxdepth] [-s dis sbl]...
[pid[.sym]...] ...");
sblfile := "";
while((opt := arg->opt()) != 0){
case opt {
@@ -61,12 +62,12 @@
sblfile = arg->earg();
'l' =>
showsource = 1;
+ 'm' =>
+ showmodule = 1;
'r' =>
maxrecur = int arg->earg();
'T' =>
showtypes = 0;
- 'i' =>
- sep = arg->earg();
* =>
arg->usage();
}
@@ -137,7 +138,7 @@
exp := stackfindsym(stk, toks, depth);
if(exp == nil)
return;
- pname(exp, depth);
+ pname(exp, depth, nil);
stdout.putc('\n');
}
}
@@ -218,7 +219,7 @@
if((e := getname(exps, "args")) != nil){
args := e.expand();
for(i := 0; i < len args; i++){
- pname(args[i], depth+1);
+ pname(args[i], depth+1, nil);
if(i != len args - 1)
stdout.puts(", ");
}
@@ -230,10 +231,18 @@
locals := e.expand();
for(i := 0; i < len locals; i++){
indent(depth+1);
- pname(locals[i], depth+1);
+ pname(locals[i], depth+1, nil);
stdout.puts("\n");
}
}
+ if(showmodule && (e = getname(exps, "module")) != nil){
+ mvars := e.expand();
+ for(i := 0; i < len mvars; i++){
+ indent(depth+1);
+ pname(mvars[i], depth+1, "module.");
+ stdout.puts("\n");
+ }
+ }
indent(depth);
stdout.puts("}\n");
}
@@ -256,8 +265,9 @@
return v;
}

-pname(exp: ref Exp, depth: int)
-{
+pname(exp: ref Exp, depth: int, prefix: string)
+{
+ name := prefix+symname(exp);
(v, w) := exp.val();
if (!w && v == nil) {
stdout.puts(sys->sprint("%s: %s = novalue", symname(exp),
exp.typename()));
@@ -267,18 +277,18 @@
Tfn =>
pfn(exp, depth);
Tint =>
- stdout.puts(sys->sprint("%s := %s", symname(exp), v));
+ stdout.puts(sys->sprint("%s := %s", name, v));
Tstring =>
- stdout.puts(sys->sprint("%s := %s", symname(exp), strval(v)));
+ stdout.puts(sys->sprint("%s := %s", name, strval(v)));
Tbyte or
Tbig or
Treal =>
- stdout.puts(sys->sprint("%s := %s %s", symname(exp), exp.typename(), v));
+ stdout.puts(sys->sprint("%s := %s %s", name, exp.typename(), v));
* =>
if(showtypes)
- stdout.puts(sys->sprint("%s: %s = ", symname(exp), exp.typename()));
+ stdout.puts(sys->sprint("%s: %s = ", name, exp.typename()));
else
- stdout.puts(sys->sprint("%s := ", symname(exp)));
+ stdout.puts(sys->sprint("%s := ", name));
pval(exp, v, w, depth);
}
}
@@ -390,7 +400,7 @@
}else{
for (i := 0; i < len exps; i++){
indent(depth+1);
- pname(exps[i], depth+1);
+ pname(exps[i], depth+1, nil);
stdout.puts("\n");
}
}
@@ -412,36 +422,80 @@
indent(n: int)
{
while(n-- > 0)
- stdout.puts(sep);
+ stdout.putc('\t');
+}
+
+ref2int(v: string): int
+{
+ if(v == nil)
+ error("bad empty value for ref");
+ i := 0;
+ n := len v;
+ if(v[0] == '@')
+ i = 1;
+ else{
+ # skip array bounds
+ if(v[0] == '['){
+ for(; i < n && v[i] != ']'; i++)
+ ;
+ if(i >= n - 2 || v[i+1] != ' ' || v[i+2] != '@')
+ error("bad value for ref: "+v);
+ i += 3;
+ }
+ }
+ if(n - i > 8)
+ error("64-bit pointers?");
+ p := 0;
+ for(; i < n; i++){
+ c := v[i];
+ case c {
+ '0' to '9' =>
+ p = (p << 4) + (c - '0');
+ 'a' to 'f' =>
+ p = (p << 4) + (c - 'a' + 10);
+ * =>
+ error("bad value for ref: "+v);
+ }
+ }
+ return p;
}

pref(v: string): int
{
- if(addref(v) == 0){
+ if(v == "nil"){
+ stdout.puts("nil");
+ return 0;
+ }
+ if(addref(ref2int(v)) == 0){
stdout.puts(v);
- if(v != "nil")
- stdout.puts("(qv)");
+ stdout.puts("(qv)");
return 0;
}
return 1;
}

-addref(v: string): int
-{
- slot := hashfn(v, len hasht);
- for(l := hasht[slot]; l != nil; l = tl l)
- if((hd l) == v)
+# hash table implementation that tries to be reasonably
+# parsimonious on memory usage.
+addref(v: int): int
+{
+ slot := (v & 16r7fffffff) % len hasht;
+ (n, a) := hasht[slot];
+ for(i := 0; i < n; i++)
+ if(a[i] == v)
return 0;
- hasht[slot] = v :: hasht[slot];
+ if(n == len a){
+ if(n == 0)
+ n = 3;
+ t := array[n*3/2] of int;
+ t[0:] = a;
+ hasht[slot].t1 = t;
+ }
+ a[hasht[slot].t0++] = v;
return 1;
}

-hashfn(s: string, n: int): int
-{
- h := 0;
- m := len s;
- for(i:=0; i<m; i++){
- h = 65599*h+s[i];
- }
- return (h & 16r7fffffff) % n;
-}
+error(e: string)
+{
+ sys->fprint(sys->fildes(2), "stackv: error: %s\n", e);
+ raise "fail:error";
+}
=======================================
--- /appl/cmd/wmexport.b Fri Dec 22 09:07:39 2006
+++ /appl/cmd/wmexport.b Mon Aug 2 06:49:50 2010
@@ -18,7 +18,6 @@
styxservers: Styxservers;
Styxserver, Fid, Navigator, Navop: import styxservers;
Enotdir, Enotfound: import Styxservers;
- nametree: Nametree;

Wmexport: module {
init: fn(nil: ref Draw->Context, argv: list of string);
=======================================
--- /appl/lib/NOTICE Fri Feb 2 15:50:37 2007
+++ /appl/lib/NOTICE Mon Aug 2 06:49:50 2010
@@ -8,7 +8,7 @@

Copyright © 1995-1999 Lucent Technologies Inc.
Portions Copyright © 1997-2000 Vita Nuova Limited
-Portions Copyright © 2000-2007 Vita Nuova Holdings Limited
+Portions Copyright © 2000-2010 Vita Nuova Holdings Limited

This program is free software; you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License (`LGPL') as
published by
=======================================
--- /appl/lib/names.b Wed Mar 19 09:27:07 2008
+++ /appl/lib/names.b Mon Aug 2 06:49:50 2010
@@ -120,7 +120,7 @@
{
la := len a;
if(la == 0)
- return 0; # "" isnt' a pathname
+ return 0; # "" isn't a pathname
while(la > 1 && a[la-1] == '/')
a = a[0:--la];
lb := len b;
@@ -128,7 +128,7 @@
return 0;
if(la == lb)
return a == b;
- return a == b[0:la] && (b[la] == '/' || a == "/");
+ return a == b[0:la] && (a == "/" || b[la] == '/');
}

elements(name: string): list of string
=======================================
--- /appl/wm/tetris.b Fri Dec 22 09:07:39 2006
+++ /appl/wm/tetris.b Mon Aug 2 06:49:50 2010
@@ -438,10 +438,8 @@
npiece.rot = (npiece.rot + inc + nrots) % nrots;
if (canmove(g, npiece, g.pos)) {
c := coords[npiece.rot];
- for (i := 0; i < len c; i++) {
- np := g.pos.add(c[i]);
+ for (i := 0; i < len c; i++)
g.bd.moveblock(g.pieceids[i], g.pos.add(c[i]));
- }
g.curr = npiece;
g.bd.update();
}
@@ -525,7 +523,7 @@

newpiece(g: ref Game)
{
- piece := g.curr = g.next;
+ g.curr = g.next;
g.next = randompiece();
g.bd.setnextshape(shapes[g.next.shape].colour,
shapes[g.next.shape].coords[g.next.rot]);
shape := shapes[g.curr.shape];
@@ -582,7 +580,7 @@
cmd(top, "frame " + w);
cmd(top, "label " + w + ".title -text " + tk->quote(title));
cmd(top, "label " + w +
- ".val -bd 3 -relief sunken -width 5w -text 0 -anchor e");
+ ".val -bd 2 -relief sunken -width 5w -text 0 -anchor e");
cmd(top, "pack " + w + ".title -side left -anchor w");
cmd(top, "pack " + w + ".val -side right -anchor e");
}
@@ -619,7 +617,7 @@
rs := cmd(bd.win, bd.w + ".c coords " + b);
if (rs != nil && rs[0] == '!')
return;
- (n, toks) := sys->tokenize(rs, " ");
+ (nil, toks) := sys->tokenize(rs, " ");
if (len toks != 4) {
sys->fprint(stderr, "bad coords for block %s\n", b);
return;
=======================================
--- /dis/auth/countersigner.dis Fri Dec 22 12:52:35 2006
+++ /dis/auth/countersigner.dis Mon Aug 2 06:49:50 2010
Binary file, no diff available.
=======================================
--- /dis/cat.dis Fri Dec 22 12:52:35 2006
+++ /dis/cat.dis Mon Aug 2 06:49:50 2010
Binary file, no diff available.
=======================================
--- /dis/crypt.dis Sat Jul 14 03:41:18 2007
+++ /dis/crypt.dis Mon Aug 2 06:49:50 2010
@@ -1,155 +1,176 @@
-À €0€@„` 䀸 $) €è$ ) €ð$$'
- $ H $€ì ) €è ) €ˆ $'
-$ H ۓ
-$) ۏ$
-$ ‹ $) €”$
-$ â () €è( ) €´($)
+À €0€@„`‚
+ 4 $) $$ ) ,$$'
+ $ H $ ( ) $ ) €¸ $'
+$ H ( $) $$
+$ Œ $) €Ä$
+$‚ () $( ) €ä($)
(('
-$( H (€ì () € (
-( â @ €ì A €ì€d- €d ' €è€d H €d€ì @ €x€ä^€܀ä% €d) €x€d
-€d @ €Ô^€܀Ô* €d) €x€d
-€d A €t,^‚,€Ü/ €d) €x€d
+$( H ( ( () €À(
+(‚ @ ( A (€d- €d ' $€d H €d ( @ €¨ ^ % €d) €¨€d
+€d @ ^ * €d) €¨€d
+€d @ €¤ A €d H €d A €œ,^‚, 2 €d) €¨€d
€d - 0) €Ø( I ,€d)
$€d I €d, I ,€h'
€X€h I €h,- €X€d]J €d€l €X - 0
- 4 I ,€h'
+ 7 I ,€h'
€\€h I €h,) €\€ljʀ܀l€D) €Ü€l €h
€h 3 €\4) €Ü€\
- 4 I ,€h'
+ 7 I ,€h'
€T€h I €h,) €T€ljʀ܀l€O) €Ü€l €h
€h €h)
€T€h '
-4€h
-€h ¼) €Ü€T
- 4 I ,€h'
+0€h
+€h ô) €T
+ 7 I ,€h'
(€h I €h,) (€ljʀ܀l4) €Ü€l €h
€h
- 4 A €ì€d- €d '
+ 7 A (€d- €d '
€l€d H €d€ì
-€h)
-€l€h ) €Ü€l
-€h ‹ - €ô
- 4 €h
+€l€h ) €l
+€h Œ - 0
+ 7 €h
€h
- 4 I ,€h'
-$€h I €h,]‚$€Ü€r €h
+ 7 I ,€h'
+$€h I €h,]‚$ €u €h
€h ^‚4€Ü€z €d) €è€d ) €¸€d$'
-€h€d H €d€ì €h
-€h Q €L A €Ô€h)
-4€h U
-4€h$)
-€L€h() €Ü€h,'
-€l€h H €h€Ô) €Ü€l]’0 € A €ì€d- €d '
+€l€h
+€h ¶3 €l0) €l Q €L A €h)
+0€h U
+0€h$)
+€L€h() €h,'
+€l€h H €h ) €l]’4 €ž A (€d- €d '
€l€d H €d€ì A €Ô€h)
-€l€h ) €Ü€l'
+€l€h ) €l'
<€h H €h€Ô]‚<€Ü€ 4 <(]‚<€Ü€–T (€h_J €h€–) (€lqQ €liÊ€|
€l€™) €Ü€l €h) €¨€h
-€h ØT (€hq‘€h () €Ü<
- €°SÉ€|(€l3 €l€H) €Ü€l A €ì€d- €d '
+€h‚ T (€hq‘€h () <
+ €±SÉ€¬(€l3 €l€H) €l A (€d- €d '
€l€d H €d€ì A €Ô€h)
-€l€h ) €Ü€l)
+€l€h ) €l)
€H€h$U
€H€h('
-€P€h H €h€Ô^’€P €¯ €h) €¬€h
-€h Ø) €Ü€H €h-
-0€h )
+€P€h H €h ^’€P €° €h) €Ü€h
+€h‚ ) €H €h-
+4€h )
(€h$)
€L€h('
€D€h
-€h€ã]’0 €Ø Q À 8 A €ì€h- €h '
+€h€ä]’4 €Ù Q À 8 A (€h- €h '
€`€h H €h€ì A €ì€d)
€D€d )
8€d$U
8€d('
-€P€d H €d€ì- €P€h`J €h€Ë A €ì€d)
+€P€d H €d (- €P€h`J €h€Ì A (€d)
€`€d )
8€d$-
€P€d('
-€h€d H €d€ì
- €¼^’€P €Õ €h) €h '
-€@€h H €h€ìi‚€@€Ð€Ô €hSÍ€À€@€h
-€h Ø) €Ü€@) €Ü€`) €Ü8 A €ì€d- €d '
+€h€d H €d (
+ €½^’€P €Ö €h) €h '
+€@€h H €h (i‚€@ €Õ €hSÍ€ð€@€h
+€h‚ ) €@) €`) 8 A (€d- €d '
€l€d H €d€ì
€h)
€D€h )
-€l€h$) €Ü€l- À €h(
-€h µ ]Ò€ô €ö €@) €è€@ )
+€l€h$) €l- À €h(
+€h í ]Ò 0 €÷ €@) $€@ )
€@$ Q 4rŠ84 ) €Ä8 rŠ84 ) €¼8 ]’ €ï- 8
- €ð- 8r‰€D48)-€D €@()
+ €ñ- 8r‰€D48)-€D €@()
$€@,'
-<€@ H €@€ì) €Ü4 8-
+<€@ H €@ () 4
+8-
8 )
$8$)
(8('
€H8
-8 ) €H,) €L0) €Ü€H) €Ü€L) €Ü€P) €Ü€Ti‚,€Ü 8)
+8 ) €H,) €L0) €H) €L) €P) €Ti‚, 8)
,8
-8 Ø A €ì€D- €D '
+8‚ A (€D- €D '
4€D H €D€ì
8)
-48 ) €Ü4rŠ€D0 )-€D 8$- À 8(
-8 µrŠ80 )-8 Q 8 A €ì€@)
+48 ) 4rŠ€D0 )-€D 8$- À 8(
+8 írŠ80 )-8 Q 8 A (€@)
8€@ '
-<€@ H €@€ì^J < ) €à ) €Ü ) €Ü ) €Ü A €ä€@rŠ<8 )-< €@ '
+<€@ H €@ (^J < ) ) ) ) A €@rŠ<8 )-< €@ '
,€@ H €@€äi‚,€Ü *SÍ€ , ) €Ü ) €Ü ) €Ü rŠ€@8 ) €Ü€@ A €ä€@)
0€@ )
(€@$)
(€@('
-,€@ H €@€äi‚,€Ü 8SÍ€¤, ) €Ü ) €Ü ) €Ü i‚$€Ü I <)-0 < ) €€<$)
+,€@ H €@ i‚, 9SÍ€Ô, ) ) ) i‚$ J <)-0 < ) €°<$)
$<('
-€@< H <€ì^J €@ I €@) €Œ€@ )
+€@< H < (^J €@ J €@) €¼€@ )
$€@$'- €@ H €@€ì) €Ü ) €Ü ) €Ü Q 4]’
QrŠ€@4 rŠ<8 )-< €@ rŠ€@4 )-0 €@
- VrŠ€@4 )-0 €@ rŠ€@4 rŠ<8 )-< €@ ) €Ü )
-4 )-0 )-0 4- 4 ) €Ü4$ U €d4('
+ WrŠ€@4 )-0 €@ rŠ€@4 rŠ<8 )-< €@ ) )
+4 )-0 )-0
+4- 4 ) 4$ U €d4('
€T4
-4 ) €T() €`,) €Ü€T) €Ü€X) €Ü€\) €Ü€`i‚(€Ü k)
+4 ) €T() €`,) €T) €X) €\) €`i‚( l)
( ) €Ü U €„4 I 4$- U €„4`Š 4 ˆ‘ 4€„ +i 4 €D)
€H0) €Ü€D) €Ü€H <S ,€p€@S €@0< ) €Ü€@'
8<
-< ¼4 88 A €ì4)
-84 ) ۆ8) 4$'
-€L4 H 4€ìr‰<$ )
+< ô4 88 A (4)
+84 ) 8) 4$'
+€L4 H 4 (r‰<$ )
€P< ) €Ü€P) €Ü0:
- n) ۆ )
-$ 8'
+ o) )
+$ 8'
,8
-8 [i‚,€Ü ’ 8SÍ€˜,8
-8 Ø- $U 08`Š$8 ´‘ 8€„$+i 8 €@) €@4) €Ü€@) €Ü€D <)
+8 \i‚, “ 8SÍ€È,8
+8‚ - $U 08`Š$8 µ‘ 8€´$+i 8 €@) €@4) €@) €D <)
< ) <$)
4<('
-8< H <€ìr‰<0$))< (]‚(€Ü « 8)
+8< H < (r‰<0$))< (]‚( ¬ 8)
8 ) 8$"
(8('
-<8 H 8ۓ& ((
- ¢ 8)
+<8 H 8 (& ((
+ £ 8)
8 ) 8$'
-<8 H 8ۓ) ۆ() ۆ4: $
- “ A €ì0)
+<8 H 8 () () 4: $
+ ” A € ( I (4) €”4 - 4$'
+04 I 4( A (4) €˜4 - 4$'
+,4 H 4 (]‚, È 8)
+,8 )
+8$'
+48 H 8 (aJ 4 Í 4) $4 ) €è4$'
+84 H 4 ( 4) $4 ) 4$'
+84 H 4 () I (4)
+04 '
+$4 I 4(- $8_J 8 æ]’$
+ æ $€pT 8`J 8 ÓT 8= 8q‘8
+ Ó)
+ ÓT 8Q‰8$
+ Ó 4) $4 ) 4$'
+84 H 4 ()
+ A (0)
0 )
$0$-
(0('
-,0 H 0ۓ A ۓ0)
+,0 H 0 ( A (0)
0 - 0$'
-(0 H 0€ì^‚(€Ü Ë 8) €œ8 )
+(0 H 0 (^‚( ‚ 8) €Ì8 )
8$'
-48 H 8ۓ 0)
-40 ) ۆ4
-0 Ø Q À $ A €ì8)
+48 H 8 ( 0)
+40 ) 4
+0‚ Q À $ A (8)
(8 )
$8$U
$8('
-,8 H 8€ì_’, Õ) €Ü )
+,8 H 8 (_’, ‚
+) )
$ o•, () €è( ) €°($)
(('
-$( H (€ì () €È(
-( â SÉ€Ì $ž $ €ø ÿ ÿÿÿø € À ( ( € ( À 0 € 0 à 0 ð
+$( H ( ( () €ø(
+(‚ SÉ€ü $ž $ 4
+ÿ ÿÿÿÿð € À ( ( € ( À 0 € 0 à 0 ð
8 À €@ ä €H ~
-€H ¼À €X |< €h zï€ €p ÷õ 1
+€H ~ €H ¼À €X |< €h zï€ €p ûõ 1
1 3 %s8 $Keyring4 $Sys2 %r3 %s:0
%scrypting with alg %s
-
? @ ^ a b U d e : f g G k l < v w g i1€p/0 €t/dis/lib/arg.dis0 €x/dis/lib/ssl.dis4€|
alg
6€€alg %sQ€„ a€„ 5 crypt7 encalgs4 hash8 hashalgsq 0 €ˆavailable
algorithms:
-0 €Œbad algorithm %s: %r:€ bad module9€”bad usage0 €˜cannot get
algorithms: 0 €œcannot read %s: %r0 € could not connect ssl: 0 €¤could not
write secret: 0
-€¨couldn't get decrypt algorithm0 €¬couldn't write algorithm
string:€°crypt: %s
-0 €´crypt: cannot load %s: %r
-0 €¸crypt: no secret given
-2€¼de0 €Àdecryption failed: 2€Äen5€Èerror6€Ìfail: 0 €Ði/o on hungup
channel;€Ømd5/ideacbc;€àpipe failed0€B€ðusage: crypt [-?] [-d] [-k secret]
[-f secretfile] [-a alg[/alg]]
-!€ô Crypt BD³Tinit Nå–Zarg W÷ Oargv . Jinit aiwèopt ÙÞ ·getmsg |
þõWsendmsg ecwsha1 sIŽVconnect ƒ
+
+
? @ a a b X d e = f g J k l ? v w j l
Û á ã1€ /9€”/dev/cons<€˜/dev/consctl0 €œ/dis/lib/arg.dis0 € /dis/lib/bufio.dis0 €¤/dis/lib/msgio.dis0 €¨/dis/lib/ssl.dis4€¬alg
6€°alg %sQ€´ a€´ 5 crypt7 encalgs4 hash8 hashalgsq 0 €¸available
algorithms:
+0 €¼bad algorithm %s: %r:€Àbad module9€Äbad usage0 €Ècannot get
algorithms: 0 €Ìcannot read %s: %r0 €Ðcould not connect ssl: 0 €Ôcould not
write secret: 0
+ۯcouldn't get decrypt algorithm0 ۆcouldn't write algorithm
string:ۈcrypt: %s
+0 ۊcrypt: cannot load %s: %r
+0+ۏcrypt: warning: cannot hide typed password
+2€ìde0 €ðdecryption failed: 2€ôen5€øerror6€üfail: 0 i/o on hungup
channel; md5/ideacbc: password: ; pipe failed5
+rawon0€B ,usage: crypt [-?] [-d] [-k secret] [-f secretfile] [-a alg[/alg]]
+! 0 Crypt BD³Tinit Nå–Zarg W÷ Oargv . Jinit aiwèopt Ùè6[Iobuf.getc ¶ƒÔ=open ecwsha1 ÙÞ ·getmsg œ×
+^init |þõWsendmsg sIŽVconnect ƒ
secret xù“fildes ôd†Èfprint G ™open ,Rêpipe |
þõWread L $¶sprint ¹èùêstream W3 tokenize |þõWwrite /appl/cmd/crypt.b
=======================================
--- /dis/fs/proto.dis Fri Dec 22 12:52:35 2006
+++ /dis/fs/proto.dis Mon Aug 2 06:49:50 2010
Binary file, no diff available.
=======================================
--- /dis/lib/names.dis Wed Mar 19 09:27:07 2008
+++ /dis/lib/names.dis Mon Aug 2 06:49:50 2010
Binary file, no diff available.
=======================================
--- /dis/stackv.dis Wed Jan 16 05:39:58 2008
+++ /dis/stackv.dis Mon Aug 2 06:49:50 2010
@@ -1,450 +1,451 @@
-À €0€@ƒÀ„é ´ () ( ) ˆ($)
+À €0€@ƒÀ
+ ì () È( ) ¼($)
(('
-$( H ( œž < @ œ A œ8- 8 ' 8 H 8 œ @
- 8^Â X 8 8)
-8
+$( H ( Ôž h @ Ô A Ô8- 8 ' È8 H 8 Ô @ < d^ Œ d 8) <8
8 @ 0^Â X 0 8) 8
8 A (^‚( X 8) 8
8 A œ€@- €@ '
<€@ H €@ œ A 08)
-<8 ) X<- 8$' ”8 H 8 0 I (€@)
-$€@ I €@( I (€@) x€@ I €@() X4 I (8'
+<8 ) Œ<- 8$' Ì8 H 8 \ I (€@)
+$€@ I €@( I (€@) ¬€@ I €@() Œ4 I (8'
08 I 8(- 0€@]J €@€K 0€D I (€@'
-<€@ I €@() X< I (€@'
+<€@ I €@() Œ< I (€@'
4€@ I €@(
- ,- p
+ ,- ¤
+ ,-  
, I (€@'
-<€@ I €@(6 < P) X<
+<€@ I €@(6 < €) Œ<
,- t
- , I (€@' l€@ I €@(
, I (€@ I €@(
- , A 88'
-€@8 H 8 8 I (€@'
+ , A d8'
+€@8 H 8 d I (€@'
$€@ I €@(V $€@`J €@€U- ,
- €V- ,]’, €X: P]‚$ X€h A œ€D"
+ €T- ,]’, €V: €]‚$ Œ€f A Ô€D"
$€D ) <€D$'
-€H€D H €D œ) €L<) X€L 8)
-<8 ) X<-
+€H€D H €D Ô) €L<) Œ€L 8)
+<8 ) Œ<-
,8$'
€@8
-8€i& $$
- €X ^‚ X€q €H) €H ) €€H$'
-€D€H H €H œ- " €L6 €L0) X€L- 0€HaJ €H€~ €D) €D ) „€D$"
+8€g& $$
+ €V ^‚ Œ€o €H) È€H ) ´€H$'
+€D€H H €H Ô- " €L6 €L0) Œ€L- 0€HaJ €H€| €D) È€D ) ¸€D$"
€D('
-€H€D H €D œ- ] X 4€€]¢0 4 €š A 8€H-
+€H€D H €D Ô- ] Œ `€~]¢0 ` €˜ A d€H-
0€H '
-€P€H H €H 8) €P 4) €T() X€P) X€Ti‚( X€‘ €D) €D ) |€D$)
+€P€H H €H d) €P `) €T() Œ€P) Œ€Ti‚( Œ€ €D) È€D ) °€D$)
(€D('
-€H€D H €D œ- ^ X 4€š €D) €D ) Œ€D$-
+€H€D H €D Ô- ^ Œ `€˜ €D) È€D ) Ä€D$-
0€D('
-€H€D H €D œ- ) 4< A 8€H)
+€H€D H €D Ô- ) `< A d€H)
<€H '
-€P€H H €H 8) €P4) €T() X€P) X€Ti‚( X€¬ €D) €D ) |€D$)
+€P€H H €H d) €P4) €T() Œ€P) Œ€Ti‚( Œ€ª €D) È€D ) °€D$)
(€D('
-€H€D H €D œ- - ,U 4€H`Š,€H€½ A 8€Hr‰€D4,))€D €L)-€L €H ) X€L
H €H 8 A 8€Hr‰€D4,)-€D €H '
-€L€H H €H 8) X€L: ,
- €­- 8]’$ €Ë €@) h€@ -
+€H€D H €D Ô- - ,U 4€H`Š,€H€» A d€Hr‰€D4,))€D €L)-€L €H ) Œ€L
H €H d A d€Hr‰€D4,)-€D €H '
+€L€H H €H d) Œ€L: ,
+ €«- 8]’$ €É €@) œ€@ -
0€@$'
-€L€@ H €@ œ A 0€D) ”€D )
-€L€D$) X€L'
-€H€D H €D 0: 8
-€@)
+€L€@ H €@ Ô A \€D) Ì€D )
+€L€D$) Œ€L'
+€H€D H €D \: 8 €@)
4€@ &
€@$-
8€@(
-€@€Ü]’$ €Ö A 0€H) ”€H ) °€H$'
-€@€H H €H 0 A 0€H) ”€H '
+€@€Ú]’$ €Ô A \€H) Ì€H ) è€H$'
+€@€H H €H \ A \€H) Ì€H '
€@€H H €H 0- ^‚$ X€ç- ,U 4`Š,4€ù 4r‰8 ,)-8 4 -
(4$
-4 ¯: ,
- €Þ 8)
+4 ®: ,
+ ۆ 8)
8 )
$8$-
(8('
08
-8€ú^‚0 X€ï 8)
+8€ù^‚0 Œ€í 8)
08 -
-(8$
-8‚b A 04) ”4 -
+(8$) Œ8(
+8‚„ A \4) Ì4 -
4$'
-84 H 4 0) X0 " $0& $$- ,U €D`Š,€D
-r‰€D ,))€D €H))€H €@) X€HjŠ0€@ ) X€@
-
- €L)
+84 H 4 \) Œ0 " $0& $$- ,U
€D`Š,€D r‰€D ,))€D €H))€H €@) Œ€HjŠ0€@ ) Œ€@
+ €L)
€@€L '
€D€L
-€L ˆ]J €D ]‚$ X S 0<€H" $€PS €P€H) X€PjŠ€@€H ) X€H" $€PSÉ<€P€PS
€P0) X€P& $$) X€@
-
-) X€@: ,
- €ýU €L^Š,€L ( €L-
+€L ‡]J €D ]‚$ Œ S 0<€H" $€PS €P€H) Œ€PjŠ€@€H ) Œ€H" $€PSÉ<€P€PS
€P0) Œ€P& $$) Œ€@
+ ) Œ€@: ,
+ €üU €L^Š,€L ' €L-
(€L
-€L„¨ A 0€D) ”€D ) @€D$'
-€L€D H €D 0) X ^‚$ X ,r‰€L ,)-€L A 8€Lr‰€D ,)-€D €L '
+€L„„ A \€D) Ì€D ) p€D$'
+€L€D H €D \) Œ ^‚$ Œ +r‰€L ,)-€L A d€Lr‰€D ,)-€D €L '
€L H €L 8" $€PjÊ T€P X) X€P
€L)
- €L ) T€L$'
+ €L ) „€L$'
8€L
-€L‚F) 8€P^Ê X€P K) X€P €L-
+€L‚h) 8€P^Ê Œ€P J) Œ€P €L-
(€L
-€L„¨ €T) `€T )
+€L„„ €T) ”€T )
0€T$'
-€P€T H €T œ A 0€D) ”€D )
-€P€D$) X€P'
-€L€D H €D 0
- V €T)
+€P€T H €T Ô A \€D) Ì€D )
+€P€D$) Œ€P'
+€L€D H €D \
+ U €T)
8€T &
$€T$-
(€T('
8€T
-€T “) 8€P]Ê X€P V) X€P)
+€T ’) 8€P]Ê Œ€P U) Œ€P)
8 ) X ) X€P
- T€P
- ,€P
- L€P) €P4) X€P]‚4 X w
+ „€P
+ P€P
+ |€P) €P4) Œ€P]‚4 Œ v
€T)
€T "
4€T$'
<€T
-€T‚F) <€P^Ê X€P i) X€P) X<
- u €T)
+€T‚h) <€P^Ê Œ€P h) Œ€P) Œ<
+ t €T)
<€T )
$€T$-
(€T('
<€T
-€T “) <€P]Ê X€P t) X€P)
+€T ’) <€P]Ê Œ€P s) Œ€P)
< ) X<& 44
- ^ €T-
+ ] €T-
(€T
-€T„¨ €D) ˜€D "
+€T„„ €D) ЀD "
$€D$)
0€D('
-€P€D H €D œ A 0€L) ”€L )
-€P€L$) X€P'
-€T€L H €L 0) X - $T (`Š$( ‘R‰$ (^J.( - : $
- ‰- ^‚$ X –)
+€P€D H €D Ô A \€L) Ì€L )
+€P€L$) Œ€P'
+€T€L H €L \) Œ - $T (`Š$( R‰$ (^J.( Ž- : $
+ ˆ- ^‚$ Œ •)
A 84)
4 '
04 H 4 8- ,U 04`Š,4 ­" $8r‰40,))4 <jª8< «) X<) X8 4r‰€@0,)-€@ 4 &
$4$-
(4('- 4
-4 “ : ,
- ›) X A
- 8€D)
+4 ’ : ,
+ š) Œ A
+ d€H)
+ €H '
+€@€H H
+€H d]’€D ´j‚€@ Œ à €H-
+$€H
+€H„„ €T) ˜€T )- €T$'
+€P€T H €T Ô A \€L) Ì€L )
+€P€L$) Œ€P'
+€H€L H €L \ A d€T)
+ €T '
+4€T H €T d €T-
+$€T
+€T„„ A d€H)
+ €H '
+€P€H H €H dSÉ D€P€PS L€P A \€L) Ì€L )
+€P€L$) Œ€P'
+€T€L H €L \ €T-
+$€T
+€T„„^Ò ¤ Ü)) €P
+ ê A d€\)
+ €\ '
+€X€\ H €\ d €H)
+€X€H ) Œ€X'
+€P€H
+€Hƒ%)) €XS D€XS‰€X€P€P) Œ€XS H€PS (€P A \€L) Ì€L )
+€P€L$) Œ€P'
+€T€L H €L \
+€\)
+4€\ ) P€\$'
+(€\
+€\‚h) (€X]Ê Œ€X‚ ) Œ€X A d€\)
+(€\ '
+0€\ H €\ d- ,U 0€\`Š,€\‚ €\r‰€T0,)-€T €\ :•$ €\$) Œ€\(
+€\‚„U 0€\= €\]Š,€\‚ A \€T) Ì€T ) 8€T$'
+€\€T H €T \: ,
+ þ) Œ0 A \€T) Ì€T ) 0€T$'
+€\€T H €T \ €\-
+$€\
+€\„„ A \€T) Ì€T ) Ü€T$'
+€\€T H €T \
+€\)
+4€\ ) |€\$'
+(€\
+€\‚h) (€X]Ê Œ€X‚>) Œ€X A d€\)
+(€\ '
+8€\ H €\ d- ,U 8€\`Š,€\‚= €\:•$ €\
+€\„„ €\r‰€T8,)-€T €\ :•$ €\$) Œ€\(
+€\‚„ A \€T) Ì€T ) €T$'
+€\€T H €T \: ,
+ ‚+) Œ8]Ò   ‚_
+€\)
+4€\ ) „€\$'
+(€\
+€\‚h) (€X]Ê Œ€X‚_) Œ€X A d€\)
+(€\ '
+<€\ H €\ d- ,U <€\`Š,€\‚^ €\:•$ €\
+€\„„ €\r‰€T<,)-€T €\ :•$ €\$) ˆ€\(
+€\‚„ A \€T) Ì€T ) €T$'
+€\€T H €T \: ,
+ ‚L) Œ< €\-
+$€\
+€\„„ A \€T) Ì€T ) è€T$'
+€\€T H €T \ - (U ,`Š(,‚tr‰, ()), 0jª$0 ‚r) Œ0r‰, ()-, : (
+ ‚i) Œ - $T (`Š$(‚~R‰$ (^J"(‚|
+ ‚~: $
+ ‚wT (`Š$(‚‚T (q‰($ )
+ ^Ò ¤ ‚‡)) 8
+ ‚• A d€D)
€D '
-<€D H
-€D 8]’€@ µj‚< X Ä €D-
-$€D
-€D„¨ €P) d€P )- €P$'
-€L€P H €P œ A 0€H) ”€H )
-€L€H$) X€L'
-€D€H H €H 0 A 8€P)
- €P '
-4€P H €P 8 €P-
-$€P
-€P„¨ A 8€D)
+€@€D H €D d <)
+€@< ) Œ€@'
+8<
+<ƒ%)) €@S D€@S‰€@88) Œ€@S H8S‰(8,) Œ8 A
+ d€D)
€D '
-€L€D H €D 8SÉ €L€LS (€L A 0€H) ”€H )
-€L€H$) X€L'
-€P€H H €H 0 €P-
-$€P
-€P„¨^Ò p Ý)) €L
- ë A 8€X)
- €X '
-€T€X H €X 8 €D)
-€T€D ) X€T'
-€L€D
-€DƒJ)) €TS €TS‰€T€L€L) X€TS $€LS (€L A 0€H) ”€H )
-€L€H$) X€L'
-€P€H H €H 0
-€X)
-4€X ) ,€X$'
-0€X
-€X‚F) 0€T]Ê X€T‚ ) X€T A 8€X)
-0€X '
-,€X H €X 8- (U ,€X`Š(€X‚ €Xr‰€P,()-€P €X :•$ €X$
-€X‚bU ,€X= €X]Š(€X‚ A 0€P) ”€P ) 8€P$'
-€X€P H €P 0: (
- ÿ) X, A 0€P) ”€P ) 0€P$'
-€X€P H €P 0 €X-
-$€X
-€X„¨ A 0€P) ”€P ) ¤€P$'
-€X€P H €P 0
-€X)
-4€X ) L€X$'
-0€X
-€X‚F) 0€T]Ê X€T‚=) X€T A 8€X)
-0€X '
-8€X H €X 8- (U 8€X`Š(€X‚< €X:•$ €X
-€X„¨ €Xr‰€P8()-€P €X :•$ €X$
-€X‚b A 0€P) ”€P ) €P$'
-€X€P H €P 0: (
- ‚+) X8 €X-
-$€X
-€X„¨ A 0€P) ”€P ) °€P$'
-€X€P H €P 0 - (U ,`Š(,‚Rr‰, ()), 0jª$0 ‚P) X0r‰, ()-, : (
- ‚G) X - $T (`Š$(‚\R‰$ (^J"(‚Z
- ‚\: $
- ‚UT (`Š$(‚`T (q‰($ )
- A
- 80)
- 0 '
-(0 H
-0 8^’, ‚Œj‚( X‚Œ^Ò p ‚k)) €@
- ‚y A 8€L)
+0€D H
+€D d^’4 ‚Áj‚0 Œ‚Á^Ò ¤ ‚ )) 8
+ ‚® A d€T)
+ €T '
+€P€T H €T d €L)
+€P€L ) Œ€P'
+8€L
+€Lƒ%)) €PS D€PS‰€P88) Œ€PS H8 A d€T)
+ €T '
+€P€T H €T d €H) $€H )
+8€H$) Œ8)
+€P€H() Œ€P'
+€@€H H €H Ô A \<) Ì< )
+€@<$) Œ€@'
+€D< H < \ A d€L)
€L '
-€H€L H €L 8 €D)
-€H€D ) X€H'
+€T€L H €L d=‘€T €L_J €Lƒ aJ €Lƒ €L€ð €T)
+ €T -
+$€T$
+€T ® €H) €H )
+,€H$)
+0€H('
+€P€H H €H Ô A \€L) Ì€L )
+€P€L$) Œ€P'
+€T€L H €L \ €D)
+0€D '
€@€D
-€DƒJ)) €HS €HS‰€H€@€@) X€HS $€@ A 8€L)
- €L '
-€H€L H €L 8 <) $< )
-€@<$) X€@)
-€H<() X€H'
-8< H < œ A 04) ”4 )
-84$) X8'
-04 H 4 0 A 8€D)
+€D‚v €H) €H )
+,€H$)
+€@€H() Œ€@'
+€P€H H €H Ô A \€L) Ì€L )
+€P€L$) Œ€P'
+€T€L H €L \ A d€D)
€D '
-€L€D H €D 8=‘€L €D_J €Dƒ aJ €Dƒ €D€Ð €L)
- €L -
-$€L$
-€L ¯ ^Ò p ‚œ)) €@
- ‚ª A 80)
- 0 '
-80 H 0 8 4)
-84 ) X8'
-€@4
-4ƒJ)) 8S 8S‰8€@€@) X8S $€@ <) < )
-€@<$) X€@)
-(<('
-€H< H < œ A 0€D) ”€D )
-€H€D$) X€H'
-€L€D H €D 0 ^Ò p ‚»)) €@
- ‚É A 80)
- 0 '
-80 H 0 8 4)
-84 ) X8'
-€@4
-4ƒJ)) 8S 8S‰8€@€@) X8S $€@ 4)
-(4 '
-84
-4‚T <) < )
-€@<$) X€@)
-8<() X8'
-€H< H < œ A 0€D) ”€D )
-€H€D$) X€H'
-€L€D H €D 0 ^Ò p ‚ß)) €@
- ‚í A 80)
- 0 '
-80 H 0 8 4)
-84 ) X8'
-€@4
-4ƒJ)) 8S 8S‰8€@€@) X8S $€@ A 84)
- 4 '
-84 H 4 8 <)
-< )
-€@<$) X€@)
-8<() X8)
-(<,'
-€H< H < œ A 0€D) ”€D )
-€H€D$) X€H'
-€L€D H €D 0 ]Ò t ƒ&^Ò p ƒ )) €@
- ƒ A 80)
- 0 '
-80 H 0 8 4)
-84 ) X8'
-€@4
-4ƒJ)) 8S 8S‰8€@€@) X8S $€@ A 84)
- 4 '
-84 H 4 8 <) < )
-€@<$) X€@)
-8<() X8'
-€H< H < œ A 0€D) ”€D )
-€H€D$) X€H'
-€L€D H €D 0
- ƒC^Ò p ƒ))) €@
- ƒ7 A 80)
- 0 '
-80 H 0 8 4)
-84 ) X8'
-€@4
-4ƒJ)) 8S 8S‰8€@€@) X8S $€@ <) < )
-€@<$) X€@'
-€H< H < œ A 0€D) ”€D )
-€H€D$) X€H'
-€L€D H €D 0 €L)
- €L )
-(€L$-
-,€L(-
-$€L,
-€Lƒp ^‚ XƒM) X )) $iª$ ƒ[) X$
-() ( )- ($-- ((-- (,)- (0-- (4-- (8'- ( H ( œ -) (]ª( ƒg
() ( )- ($-- ((-- (,-- (0-- (4'- ( H ( œ () ( )- ($-- ((--
(,-- (0'- ( H ( œ a‚, Pƒw A 04) ”4 )
+€@€D H €D d €H)
+€H )
+,€H$)
+€@€H() Œ€@)
+0€H,'
+€P€H H €H Ô A \€L) Ì€L )
+€P€L$) Œ€P'
+€T€L H €L \ ]Ò ¨ ƒ A d€D)
+ €D '
+€@€D H €D d €H) €H )
+,€H$)
+€@€H() Œ€@'
+€P€H H €H Ô A \€L) Ì€L )
+€P€L$) Œ€P'
+€T€L H €L \
+ ƒ
+ €H) €H )
+,€H$'
+€P€H H €H Ô A \€L) Ì€L )
+€P€L$) Œ€P'
+€T€L H €L \ €T)
+ €T )
+0€T$-
+4€T(-
+$€T,
+€TƒK ^‚ Œƒ() Œ )) $iª$ ƒ6) Œ$ () ( )- ($-- ((-- (,)- (0--
(4-- (8'- ( H ( Ô -) (]ª( ƒB () ( )- ($-- ((-- (,-- (0--
(4'- ( H ( Ô () ( )- ($-- ((-- (,-- (0'- (
H ( Ô a‚, €ƒR A \4) Ì4 )
$4$'
-04 H 4 0 A 80)
+04 H 4 \ A d0)
0 '
-40 H 0 8 4€ˆ 0)
+40 H 0 d 4€ˆ
+0)
$0 '
40
-0„²]J 4ƒó:‘, 4_Ê P4ƒ‰ A 00) ”0 S
-$ ¨0$'
-40 H 0 0 A 00) ”0 S
-$ ¤0$'
-40 H 0 0 4:•, 4
-4„¨ 4)
+0„Å]J 4ƒÎ:‘, 4_Ê €4ƒd A \0) Ì0 S
+$ à0$'
+40 H 0 \ A \0) Ì0 S
+$ Ü0$'
+40 H 0 \ 4:•, 4
+4„„ 4)
4 :•, 4$
-4ƒô A 00) ”0 ) 0$'
-40 H 0 0 4-
+4ƒÏ A \0) Ì0 ) 0$'
+40 H 0 \ 4-
,4
-4„¨ A 00) ”0 ) ¬0$'
-40 H 0 0 j‚$ \ƒª A 00) ”0 ) \0$'
-40 H 0 0 :‘, 4_Ê P4ƒ² A 00) ”0 S
-$ ¨0$'
-40 H 0 0 A 00) ”0 ) ¤0$'
-40 H 0 0 4:•, 4
-4„¨ 4)
+4„„ A \0) Ì0 ) ä0$'
+40 H 0 \ j‚$ ƒ
+ A \0) Ì0 ) 0$'
+40 H 0 \ :‘, 4_Ê €4ƒ A \0) Ì0 S
+$ à0$'
+40 H 0 \ A \0) Ì0 ) Ü0$'
+40 H 0 \ 4:•, 4
+4„„ 4)
4 )
$4$-
(4(:•, 4,
-4„
- A 00) ”0 ) 0$'
-40 H 0 0 4-
+4ƒù A \0) Ì0 ) 0$'
+40 H 0 \ 4-
,4
-4„¨ A 00) ”0 ) ¬0$'
-40 H 0 0 4)
- 4 ) X4$-
+4„„ A \0) Ì0 ) ä0$'
+40 H 0 \ 4)
+ 4 ) Œ4$-
(4(-
,4,
-4„b 0)
+4„=
+0)
$0 '
40
-0„²]J 4ƒó 4)
+0„Å]J 4ƒÎ 4)
4 )
$4$-
(4(-
,4,
-4„b <)
+4„= <)
$< '
8<
-<‚T A 00) ”0 )
-80$) X8'
-40 H 0 0 <)
+<‚v A \0) Ì0 )
+80$) Œ8'
+40 H 0 \ <)
< )
$<$-
(<(-
,<,
-<„b A 8<)
+<„= A d<)
< '
0< H < 8- ,U 0<`Š,<„
-r‰<0,))< ( A
- 8<)
+ d<)
(< '
€D< H
-< 8) €D4- €H8) X€D A 8€@)
+< d) €D4- €H8) Œ€D A d€@)
(€@ '
-<€@ H €@ 8^J <„ €@)
+<€@ H €@ d^J <ƒé €@)
(€@ -
$€@$
-€@ƒô
- „ €@)
+€@ƒÏ
+ ƒô €@)
(€@ )
4€@$-
8€@(-
$€@,
-€@ƒp A 0<) ”< ) 8<$'
-€@< H < 0) X4) X(: ,
- ƒù ]’( „\i‚$ \„\ A 8€@)
+€@ƒK A \<) Ì< ) 8<$'
+€@< H < \) Œ4) Œ(: ,
+ ƒÔ ]’( „7i‚$ „7 A d€@)
€@ '
4€@ H €@ 8
€@)
-4€@ ) H€@$'
+4€@ ) x€@$'
0€@
-€@‚F^‚0 X„.) X8) X0) X4
- „\ A
- 8€@)
+€@‚h^‚0 Œ„ ) Œ8) Œ0) Œ4
+ „7 A
+ d€@)
0€@ '
€H€@ H
-€@ 8) €H8- €L<) X€H €D)
+€@ d) €H8- €L<) Œ€H
+€D)
$€D '
€@€D
-€D„²^J €@„; A 0€@) ”€@ S
+€D„Å^J €@„ A \€@) Ì€@ S
$(€@$'
-€D€@ H €@ 0 €D)
+€D€@ H €@ \ €D)
0€D )
8€D$-
<€D(-
,€D,
-€Dƒp A 0€@) ”€@ ) 4€@$'
-€D€@ H €@ 0) X0
+€DƒK A \€@) Ì€@ ) 4€@$'
+€D€@ H €@ \) Œ0
€D)
-4€D )  €D$'
+4€D ) Ø€D$'
€D
-€D‚F A
- 8€D)
+€D‚h A
+ d€D)
€D '
€H€D H
-€D 8) €H$- €L() X€H) X8) X0) X4
- „
- A 0€@) ”€@ ) \€@$'
-€D€@ H €@ 0 ]’( „¢ A 88)
+€D d) €H$- €L() Œ€H) Œ8) Œ0) Œ4
+ ƒù A \€@) Ì€@ ) €@$'
+€D€@ H €@ \ ]’( „~ A d8)
8 '
08 H 8 8U 08^J 8„o A 0<) ”< )
$<$'
-8< H < 0
- „  A 08) ”8 S
-$ ¤8$'
-<8 H 8 0U 0<`J <„˜a‚, P„† <-
+8< H < \
+ „| A \8) Ì8 S
+$ Ü8$'
+<8 H 8 \U 0<`J <„ta‚, €„a <-
,<
-<„¨ €D) €@€D U
+<„„ €D) €@€D U
0€D$'
-€@€D H €D œ A 08) ”8 )
-€@8$) X€@'
-<8 H 8 0
- „˜- 4U 0€D`Š4€D„˜ €D:•, €D
-€D„¨ €Dr‰<04)-< €D :•, €D$
-€D‚b A 0<) ”< ) <$'
-€D< H < 0: 4
- „‡ €D-
+€@€D H €D Ô A \8) Ì8 )
+€@8$) Œ€@'
+<8 H 8 \
+ „t- 4U 0€D`Š4€D„t €D:•, €D
+€D„„ €Dr‰<04)-< €D :•, €D$) Œ€D(
+€D‚„ A \<) Ì< ) <$'
+€D< H < \: 4
+ „b €D-
,€D
-€D„¨ A 0<) ”< ) ¬<$'
-€D< H < 0) X0 A 0<) ”< )
+€D„„ A \<) Ì< ) ä<$'
+€D< H < \) Œ0 A \<) Ì< )
$<$'
-€D< H < 0 - $= `J $„± A 0() ”( ) l($'
-$( H ( 0
- „¨
-()
- ( '
-$(
-(„Æ^J $„Ä A 0$) ”$ )
- $$'
-($ H $ 0i‚ \„Â A 0$) ”$ ) ,$$'
-($ H $ 0- - ,)
- , U D,$'
-(,
-,„Ýr , D()), $]‚$ X„Õ" $0jŠ 0„Ó) X0- & $$
- „Ír , D(r 4 D())4 0
- 0)
-0, ) X0- - (T 0- ,bŠ0,„æ@‘(À ?4R‰, 8:‰48(: ,
- „àH ( 8E 8$ ´ ÿÿ€ ÿ÷óÿø € ( € ( À 0 0 € 0 À 0 à 0 ð
8 À
+€D< H < \ - $= `J $„ A \() Ì( - ($'
+$( H ( \
+ „„ j‚ Œ„’ 4) T4
+4
+ - $T ,RI 4^J€@4„˜- $
+ „«RI 4^J€[4„«bŠ,$„ŸR‰$ 4]J€]4„Ÿ: $
+ „š=‘, 4`Š$4„§:‘$ 8R‰8 4^J 4„§:‘$ 4R‰4 8]J€@8„ª 8SÍ X 8
+8
+ : $=‰,$8`J 8„° 8) @8
+8
+ - (bŠ,$„ÃR‰$ 0 0€ÌN‘( 8=‘004:‰84(
+ „ÁN‘( 8=‘0€a4:
+4:‰84(
+ „Á 8SÍ X 8
+8
+
+ „Á: $
+ „±-
+( j‚ „Í A \() Ì( ) ($'
+$( H ( \- 0)
+ 0 '
+,0
+0„Ž $-
+,$ '
+($
+$„ä^J („â A \,) Ì, )
+ ,$'
+0, H , \ A \,) Ì, ) ,,$'
+0, H , \- - H 08U t<E‰8<0‘ < t0+i < $- ,bŠ$,„ñr‰<(,^ª
< „ï- : ,
+ „êU (<^Š$<„ü^’$ „õ- $@‘$ <C < I <4pI (4‘ < t0)
+4< ) Œ4‘ 8 t0-)8 <: 8 r‰<(<-
+ < - A Ô0- 0 '
+,0 H 0 Ô ()
+,( ) Œ,) À($)
+ (('
+$( H ( Ôž l ì ÿÿ€ ÿÿ ÿà @ ( € ( À 0 0 € 0 À 0 à 0 ð
8 È €@ € €@ Â
-€@ È €H Ë €H È€ €P ¢  €P ¬@ €P Î €P å €X ¥
- €X Ϩ €` Ÿ 1
+8 È €@ $ €@ € €@  €@ È €H Ë €H È€ €P ¬@ €P Î €P å €X ¥
+ €X ºˆ €X Ϩ €` ¯Š1
4 $Sys; %q:%d.%d,%d> %q:%d.%d,%d.%d0 %q:%d.%d,%q:%d.%d6 %s := 8 %s := %s;
%s := %s %s9 %s: %s = 0 $%s: %s = novalue1((4,(qv)20)
54) :: 28, 1<.8€@...[%d]
-
4€D T U B i j D l m : r s < s t 2 H Î |
£ Õ á ì Ü Ü Ü ” ™ ¸ ÿÿÿ0 /dis/lib/arg.dis0 /dis/lib/bufio.dis0
-/dis/lib/debug.dis1 [1 $]2 (]
-4 ,args? <fail:bad module0 @function not found
-Q D a2 Hhd6 Llocals! P ÿÿþ6 Tmodule3 \nil0& `no module declarations
in function %q
-0 dno value for fn %q
-: hprog %d {
-1 l " p 0€I xstackv [-Tl] [-i indent] [-r maxdepth] [-s dis sbl]...
[pid[.sym...] ...]; |stackv: %s
-0 €stackv: bad pid
-0 „stackv: bad pid %q
-0 ˆstackv: cannot load %q: %r
+
<€D T U D l m : m n < r s > s t 2 F © W ~ ° ¼ Ç 0 : ´ a g ¸ ½ í í í É Î Û ÿÿÿ0 4/dis/lib/arg.dis0 8/dis/lib/bufio.dis0 </dis/lib/debug.dis0 @64-bit
pointers?1 D[1 H]2 L]
+4 Pargs0 Tbad empty value for ref0 Xbad value for ref: ? hfail:bad
module: lfail:error0 pfunction not found
+Q t a2 xhd6 |locals! € ÿÿþ6 „module7 ˆmodule.3 nil0& ”no module
declarations in function %q
+0 ˜no value for fn %q
+: œprog %d {
+#   0> ¬stackv [-Tlm] [-r maxdepth] [-s dis sbl]...
[pid[.sym]...] ...; °stackv: %s
+0 ´stackv: bad pid
+0 ¸stackv: bad pid %q
+0 ¼stackv: cannot load %q: %r
+0 Àstackv: error: %s
0
- Œstackv: nil prog from pid %d
-0# ˜symbol %q not found in function %q
-2  tl2 ¤{
-5 ¨{...}1 ¬}2 °}
+ Ästackv: nil prog from pid %d
+0# Ðsymbol %q not found in function %q
+2 Øtl2 Ü{
+5 à{...}1 ä}2 è}
Stackv BD³Tinit W÷ Oargv Nå–Zearg . Jinit aiwèopt s jsetusage œ×
^usage Ùè6[Iobuf.flush ,8e fopen ‹'ÖkIobuf.putc 1ëIobuf.puts g
`IExp.expand š¬UÒExp.findsym aiwèinit dì Exp.kind Õpc
prog I¢KbExp.src š¬UÒExp.srcstr C–I)Prog.stack
«=oModule.stdsym š¬UÒExp.typename ÆÝ?•Exp.val xù“fildes ôd†Èfprint L $¶sprint W3
tokenize /appl/cmd/stackv.b
=======================================
--- /dis/wm/tetris.dis Fri Dec 22 12:52:35 2006
+++ /dis/wm/tetris.dis Mon Aug 2 06:49:50 2010
Binary file, no diff available.
=======================================
--- /include/version.h Sun Aug 1 04:55:40 2010
+++ /include/version.h Mon Aug 2 06:49:50 2010
@@ -1,1 +1,1 @@
-#define VERSION "Fourth Edition (20100801)"
+#define VERSION "Fourth Edition (20100802)"
=======================================
--- /man/1/stack Fri Dec 22 12:52:35 2006
+++ /man/1/stack Mon Aug 2 06:49:50 2010
@@ -1,6 +1,6 @@
.TH STACK 1
.SH NAME
-stack \- examine call stack
+stack, stackv \- examine call stack
.SH SYNOPSIS
.B "bind '#p' /prog"
.br
@@ -14,6 +14,15 @@
.I sblpath
]...
.I pid
+.br
+.B stackv
+[
+.B -Tlm
+] [
+.B -r
+.I maxdepth
+] [
+.I pid\fR[\f5.\fIsym\fR] ...] ...
.SH DESCRIPTION
.I Stack
writes to the standard output a stack trace for process
@@ -59,6 +68,43 @@
.B -p
options take precedence over
.BR $sblpath .
+.PP
+.I Stackv
+recursively traverses the symbols it finds, printing
+values as it goes. Repeated identical structure is not
+shown \- only the pointer value is printed, followed by
+.BR (qv) .
+Each argument gives a starting point
+for the traversal, rooted by a process id,
+.IR pid .
+If an unadorned process id is given, all values in all
+stack frames in the process will be printed; adding names
+specifies the starting point. For instance,
+.B 123.init.ctxt.display
+might specify the
+.B display
+field inside the
+.B ctxt
+adt inside the
+.B init
+function inside the process
+.BR 123 .
+.I Stackv
+understands the following options:
+.TP 10
+.B -l
+Show source line information with each item.
+.TP
+.B -m
+Show module variables accessible from each stack frame.
+.TP
+.B -T
+Do not show the Limbo types of value encountered.
+.TP
+.BI -r \ maxdepth
+Restrict the maximum traversal depth to
+.I maxdepth
+levels.
.SH EXAMPLE
Run
.I stack
@@ -111,6 +157,8 @@
.BI /prog/ pid /status
.SH SOURCE
.B /appl/cmd/stack.b
+.br
+.B /appl/cmd/stackv.b
.SH "SEE ALSO"
.IR deb (1),
.IR ps (1),

==============================================================================
Revision: c280229351
Author: for...@vitanuova.com
Date: Mon Aug 2 12:41:25 2010
Log: 20100802-2041
http://code.google.com/p/inferno-npe/source/detail?r=c280229351

Modified:
/CHANGES

=======================================
--- /CHANGES Mon Aug 2 06:49:50 2010
+++ /CHANGES Mon Aug 2 12:41:25 2010
@@ -1,6 +1,5 @@
-20100801
- various changes held back by accident, notably stackv in stack(1), better
diagnostics by cat(1)
20100802
+ various changes held back by accident, notably stackv in stack(1), better
diagnostics by cat(1)
20100801
libtk/coval.c - simplify vlong expression for some compilers [issue 216,
mechiel]
20100727

==============================================================================
Revision: 049de5acd5
Author: Venkatesh Srinivas <m...@endeavour.zapto.org>
Date: Tue Aug 3 07:31:59 2010
Log: Merge inferno-os of 2010-08-02.

Mac OS X build needs testing.
http://code.google.com/p/inferno-npe/source/detail?r=049de5acd5

Modified:
/CHANGES
/emu/Linux/os.c
/emu/MacOSX/os.c
/include/version.h

=======================================
--- /CHANGES Thu Jul 22 15:14:40 2010
+++ /CHANGES Tue Aug 3 07:31:59 2010
@@ -1,3 +1,9 @@
+20100802
+ various changes held back by accident, notably stackv in stack(1), better
diagnostics by cat(1)
+20100801
+ libtk/coval.c - simplify vlong expression for some compilers [issue 216,
mechiel]
+20100727
+ on Linux and MacOSX, look at faulting address to decide if it's
dereference of nil
20100722
include/bio.h add varargck and repair resulting diagnostics in utils and
limbo/ [issue 237, mechiel]
20100719
=======================================
--- /emu/Linux/os.c Tue Feb 9 23:24:33 2010
+++ /emu/Linux/os.c Tue Aug 3 07:31:59 2010
@@ -8,11 +8,15 @@
#include <sys/wait.h>
#include <sys/time.h>

+#include <stdint.h>
+
#include "dat.h"
#include "fns.h"
#include "error.h"
#include <fpuctl.h>

+#include <raise.h>
+
/* glibc 2.3.3-NTPL messes up getpid() by trying to cache the result, so
we'll do it ourselves */
#include <sys/syscall.h>
#define getpid() syscall(SYS_getpid)
@@ -100,7 +104,7 @@

p = newproc();
if(0)
- print("start %s:%.8lx\n", name, p);
+ print("start %s:%#p\n", name, p);
if(p == nil) {
print("kproc(%s): no memory", name);
return;
@@ -155,50 +159,49 @@
return 0;
}

-/*
- * TO DO:
- * To get pc on trap, use sigaction instead of signal and
- * examine its siginfo structure
- */
-
-/*
static void
-diserr(char *s, int pc)
-{
- char buf[ERRMAX];
-
- snprint(buf, sizeof(buf), "%s: pc=0x%lux", s, pc);
+sysfault(char *what, void *addr)
+{
+ char buf[64];
+
+ snprint(buf, sizeof(buf), "sys: %s%#p", what, addr);
disfault(nil, buf);
}
-*/

static void
-trapILL(int signo)
+trapILL(int signo, siginfo_t *si, void *a)
{
USED(signo);
- disfault(nil, "Illegal instruction");
+ USED(a);
+ sysfault("illegal instruction pc=", si->si_addr);
}

-static void
-trapBUS(int signo)
-{
- USED(signo);
- disfault(nil, "Bus error");
+static int
+isnilref(siginfo_t *si)
+{
+ return si != 0 && (si->si_addr == (void*)~(uintptr_t)0 ||
(uintptr_t)si->si_addr < 512);
}

static void
-trapSEGV(int signo)
-{
- USED(signo);
- disfault(nil, "Segmentation violation");
+trapmemref(int signo, siginfo_t *si, void *a)
+{
+ USED(a); /* ucontext_t*, could fetch pc in machine-dependent way */
+ if(isnilref(si))
+ disfault(nil, exNilref);
+ else if(signo == SIGBUS)
+ sysfault("bad address addr=", si->si_addr); /* eg, misaligned */
+ else
+ sysfault("segmentation violation addr=", si->si_addr);
}

static void
-trapFPE(int signo)
+trapFPE(int signo, siginfo_t *si, void *a)
{
char buf[64];
+
USED(signo);
- snprint(buf, sizeof(buf), "sys: fp: exception status=%.4lux", getfsr());
+ USED(a);
+ snprint(buf, sizeof(buf), "sys: fp: exception status=%.4lux pc=%#p",
getfsr(), si->si_addr);
disfault(nil, buf);
}

@@ -352,14 +355,15 @@
signal(SIGINT, cleanexit);

if(sflag == 0) {
- act.sa_handler = trapBUS;
- sigaction(SIGBUS, &act, nil);
- act.sa_handler = trapILL;
+ act.sa_flags = SA_SIGINFO;
+ act.sa_sigaction = trapILL;
sigaction(SIGILL, &act, nil);
- act.sa_handler = trapSEGV;
- sigaction(SIGSEGV, &act, nil);
- act.sa_handler = trapFPE;
+ act.sa_sigaction = trapFPE;
sigaction(SIGFPE, &act, nil);
+ act.sa_sigaction = trapmemref;
+ sigaction(SIGBUS, &act, nil);
+ sigaction(SIGSEGV, &act, nil);
+ act.sa_flags &= ~SA_SIGINFO;
}

p = newproc();
=======================================
--- /include/version.h Thu Jul 22 15:14:40 2010
+++ /include/version.h Tue Aug 3 07:31:59 2010
@@ -1,1 +1,1 @@
-#define VERSION "Fourth Edition (20100722)"
+#define VERSION "Fourth Edition (20100802)"

==============================================================================
Revision: 4a83003765
Author: Venkatesh Srinivas <m...@endeavour.zapto.org>
Date: Tue Aug 3 07:32:52 2010
Log: Close auth branch (merge with inferno-os).
http://code.google.com/p/inferno-npe/source/detail?r=4a83003765


Reply all
Reply to author
Forward
0 new messages