25 t = s + strlen(s) - 1;
26 while(isspace(*t) && t > s)
38 bp = seprint(buf, buf+1024, "Assembly error: %s:%d: ", filename, line);
40 bp = vseprint(bp, buf+1024, s, a);
43 write(2, buf, bp - buf);
53 bp = seprint(buf, buf+1024, "VM error at %d: ", curpc);
55 bp = vseprint(bp, buf+1024, s, a);
58 write(2, buf, bp - buf);
69 bp = vseprint(buf, buf+1024, s, a);
72 write(2, buf, bp - buf);
83 error("Error allocating %lud: %r\n", s);
84 setmalloctag(v, getcallerpc(&s));
95 error("Error allocating %lud: %r", s);
101 erealloc(void *p, ulong s)
107 error("Error re-allocating %lud: %r", s);
108 setrealloctag(v, getcallerpc(&s));
119 error("Error duplicating string %s: %r", s);
120 setmalloctag(n, getcallerpc(&s));
125 bsearch(void *k, void *a, long n, int w, int (*cmp)(void*, void*))
131 e = (char*)a + w*(n/2);