summaryrefslogtreecommitdiff
path: root/appl/charon
diff options
context:
space:
mode:
Diffstat (limited to 'appl/charon')
-rw-r--r--appl/charon/build.b2
-rw-r--r--appl/charon/chutils.b13
-rw-r--r--appl/charon/chutils.m1
-rw-r--r--appl/charon/date.b2
-rw-r--r--appl/charon/gui.b6
-rw-r--r--appl/charon/img.b6
-rw-r--r--appl/charon/jscript.b2
-rw-r--r--appl/charon/layout.b14
8 files changed, 20 insertions, 26 deletions
diff --git a/appl/charon/build.b b/appl/charon/build.b
index c9b4ab01..b0eef1de 100644
--- a/appl/charon/build.b
+++ b/appl/charon/build.b
@@ -1620,7 +1620,7 @@ lexstring(s: string) : array of ref Token
lastps(psl: list of ref Pstate) : ref Pstate
{
if(psl == nil)
- CU->raisex("EXInternal: empty pstate stack");
+ raise "EXInternal: empty pstate stack";
while(tl psl != nil)
psl = tl psl;
return hd psl;
diff --git a/appl/charon/chutils.b b/appl/charon/chutils.b
index 40da2f5f..8d8bdf33 100644
--- a/appl/charon/chutils.b
+++ b/appl/charon/chutils.b
@@ -1227,14 +1227,14 @@ ResourceState.cur() : ResourceState
if(mfd == nil)
mfd = sys->open("/dev/memory", sys->OREAD);
if (mfd == nil)
- raisex(sys->sprint("can't open /dev/memory: %r"));
+ raise sys->sprint("can't open /dev/memory: %r");
sys->seek(mfd, big 0, Sys->SEEKSTART);
buf := array[400] of byte;
n := sys->read(mfd, buf, len buf);
if (n <= 0)
- raisex(sys->sprint("can't read /dev/memory: %r"));
+ raise sys->sprint("can't read /dev/memory: %r");
(nil, l) := sys->tokenize(string buf[0:n], "\n");
# p->cursize, p->maxsize, p->hw, p->nalloc, p->nfree, p->nbrk, poolmax(p), p->name)
@@ -1763,7 +1763,7 @@ makestrinttab(a: array of string) : array of T->StringInt
ans[i].key = a[i];
ans[i].val = i;
if(i > 0 && a[i] < a[i-1])
- raisex("EXInternal: table out of alphabetical order");
+ raise "EXInternal: table out of alphabetical order";
}
return ans;
}
@@ -1866,15 +1866,10 @@ min(a,b: int) : int
return b;
}
-raisex(e: string)
-{
- raise e;
-}
-
assert(i: int)
{
if(!i) {
- raisex("EXInternal: assertion failed");
+ raise "EXInternal: assertion failed";
# sys->print("assertion failed\n");
# s := hmeth[-1];
}
diff --git a/appl/charon/chutils.m b/appl/charon/chutils.m
index 8d7d3a8c..15c3308f 100644
--- a/appl/charon/chutils.m
+++ b/appl/charon/chutils.m
@@ -360,7 +360,6 @@ CharonUtils: module
color: fn(s: string, dflt: int) : int;
max: fn(a, b : int) : int;
min: fn(a, b : int) : int;
- raisex: fn(e: string);
assert: fn(i: int);
stripscript: fn(s: string) : string; # strip HTML comments from Script
getconv: fn(chset : string) : Btos;
diff --git a/appl/charon/date.b b/appl/charon/date.b
index b247d578..c801772e 100644
--- a/appl/charon/date.b
+++ b/appl/charon/date.b
@@ -23,7 +23,7 @@ init(cu: CharonUtils)
CU = cu;
daytime = load Daytime Daytime->PATH;
if (daytime==nil)
- CU->raisex(sys->sprint("EXInternal: can't load Daytime: %r"));
+ raise sys->sprint("EXInternal: can't load Daytime: %r");
}
# print dates in the format
diff --git a/appl/charon/gui.b b/appl/charon/gui.b
index d433bf82..0b4b7f1c 100644
--- a/appl/charon/gui.b
+++ b/appl/charon/gui.b
@@ -98,7 +98,7 @@ init(ctxt: ref Draw->Context, cu: CharonUtils): ref Draw->Context
tk = load Tk Tk->PATH;
tkclient = load Tkclient Tkclient->PATH;
if(tkclient == nil)
- CU->raisex(sys->sprint("EXInternal: can't load module Tkclient: %r"));
+ raise sys->sprint("EXInternal: can't load module Tkclient: %r");
tkclient->init();
wmctl: chan of string;
@@ -386,11 +386,11 @@ makewins()
realwin = screen.newwindow(r, D->Refnone, D->White);
realwin.origin(ZP, r.min);
if(realwin == nil)
- CU->raisex(sys->sprint("EXFatal: can't initialize windows: %r"));
+ raise sys->sprint("EXFatal: can't initialize windows: %r");
mainwin = display.newimage(realwin.r, realwin.chans, 0, D->White);
if(mainwin == nil)
- CU->raisex(sys->sprint("EXFatal: can't initialize windows: %r"));
+ raise sys->sprint("EXFatal: can't initialize windows: %r");
}
hidewins()
diff --git a/appl/charon/img.b b/appl/charon/img.b
index fd8b625d..299ddeeb 100644
--- a/appl/charon/img.b
+++ b/appl/charon/img.b
@@ -161,7 +161,7 @@ imgerror(is: ref ImageSource, msg: string)
is.err = msg;
if(dbg)
sys->print("Image error: %s\n", msg);
- CU->raisex("exImageerror:");
+ raise "exImageerror:";
}
# Get next char or raise exception if cannot
@@ -179,7 +179,7 @@ getc(is: ref ImageSource) : int
ungetc(is: ref ImageSource)
{
if(is.i == 0)
- CU->raisex("EXInternal: ungetc past beginning of buffer");
+ raise "EXInternal: ungetc past beginning of buffer";
is.i--;
}
@@ -190,7 +190,7 @@ ungetc2(is: ref ImageSource, nil: byte)
{
if(is.i < 2) {
if(is.i != 1)
- CU->raisex("EXInternal: ungetc2 past beginning of buffer");
+ raise "EXInternal: ungetc2 past beginning of buffer";
is.i = 0;
}
else
diff --git a/appl/charon/jscript.b b/appl/charon/jscript.b
index 0742da31..315baf78 100644
--- a/appl/charon/jscript.b
+++ b/appl/charon/jscript.b
@@ -2107,7 +2107,7 @@ specindex(class: string) : int
if(objspecs[i].name == class)
break;
if(i == len objspecs)
- CU->raisex("EXInternal: couldn't find host object class " + class);
+ raise "EXInternal: couldn't find host object class " + class;
return i;
}
diff --git a/appl/charon/layout.b b/appl/charon/layout.b
index ee5c9064..a4ad1c8f 100644
--- a/appl/charon/layout.b
+++ b/appl/charon/layout.b
@@ -516,7 +516,7 @@ createvscroll(f: ref Frame)
f.vscr.r = f.vscr.r.addpt(Point(f.cr.max.x-breadth, f.cr.min.y));
f.cr.max.x -= breadth;
if(f.cr.dx() <= 2*f.marginw)
- CU->raisex("EXInternal: frame too small for layout");
+ raise "EXInternal: frame too small for layout";
f.vscr.draw(1);
}
@@ -531,7 +531,7 @@ createhscroll(f: ref Frame)
f.hscr.r = f.hscr.r.addpt(Point(x,f.cr.max.y-breadth));
f.cr.max.y -= breadth;
if(f.cr.dy() <= 2*f.marginh)
- CU->raisex("EXInternal: frame too small for layout");
+ raise "EXInternal: frame too small for layout";
f.hscr.draw(1);
}
@@ -985,7 +985,7 @@ fixlinegeom(f: ref Frame, lay: ref Lay, l: ref Line)
# line is complete, next line will start with it (or it is nil)
rest := it;
if(lastit == nil)
- CU->raisex("EXInternal: no items on line");
+ raise "EXInternal: no items on line";
lastit.next = nil;
l.width = w;
@@ -1087,7 +1087,7 @@ getfont(num: int) : ref Font
f = Font.open(display, fonts[num].name);
if(f == nil) {
if(num == DefFnt)
- CU->raisex(sys->sprint("exLayout: can't open default font %s: %r", fonts[num].name));
+ raise sys->sprint("exLayout: can't open default font %s: %r", fonts[num].name);
else {
if(int (CU->config).dbg['w'])
sys->print("warning: substituting default for font %s\n",
@@ -2389,7 +2389,7 @@ markchanges(loc: ref Loc)
}
LEtablecell =>
if(lastf == nil)
- CU->raisex("EXInternal: markchanges no lastf");
+ raise "EXInternal: markchanges no lastf";
c := loc.le[i].tcell;
clay := lastf.sublays[c.layid];
if(clay != nil)
@@ -2424,7 +2424,7 @@ colorimage(rgb: int) : ref Image
# im := display.color(pix);
im := display.rgb((rgb>>16)&255, (rgb>>8)&255, rgb&255);
if(im == nil)
- CU->raisex(sys->sprint("exLayout: can't allocate color #%8.8ux: %r", rgb));
+ raise sys->sprint("exLayout: can't allocate color #%8.8ux: %r", rgb);
x = ref Colornode(rgb, im, xhd);
colorhashtab[hv] = x;
}
@@ -3309,7 +3309,7 @@ Control.scrollset(c: self ref Control, v1, v2, vmax, nsteps, draw: int)
if(l <= 0)
l = 1;
if(l < 0)
- CU->raisex("EXInternal: negative scrollbar trough");
+ raise "EXInternal: negative scrollbar trough";
sc.top = l*v1/vmax;
sc.bot = l*(vmax-v2)/vmax;
if (nsteps == 0)