/* cmd.c */
extern TREPTR makefork(int flgs, TREPTR i);
extern TREPTR cmd(int sym, int flg);
+/* error.c */
+extern void exitset(void);
+extern void sigchk(void);
+extern void failed(const STRING s1, const STRING s2);
+extern void error(const STRING s);
+extern void exitsh(int xno);
+extern void done(void);
+extern void rmtemp(IOPTR base);
/* ======== error handling ======== */
-exitset()
+void exitset(void)
{
assnum(&exitadr, exitval);
}
-sigchk()
+void sigchk(void)
{
/* Find out if it is time to go away.
* `trapnote' is set to SIGSET when fault is seen and
* no trap has been set.
*/
- if (trapnote & SIGSET) {
+ if (trapnote & SIGSET)
exitsh(SIGFAIL);
- ;
- }
}
-failed(s1, s2)
-STRING s1, s2;
+void failed(const STRING s1, const STRING s2)
{
prp();
prs(s1);
exitsh(ERROR);
}
-error(s)
-STRING s;
+void error(const STRING s)
{
failed(s, NIL);
}
-exitsh(xno)
-int xno;
+void exitsh(int xno)
{
/* Arrive here from `FATAL' errors
* a) exit command,
}
}
-done()
+void done(void)
{
register STRING t;
if (t = trapcom[0]
exit(exitval);
}
-rmtemp(base)
-IOPTR base;
+void rmtemp(IOPTR base)
{
while (iotemp > base) {
unlink(iotemp->ioname);
iotemp = iotemp->iolst;
- ;
}
}