make error message global var, so routine can be inline expanded
[unix-history] / usr / src / usr.bin / pascal / libpc / ASRT.c
index 02043a9..16322a1 100644 (file)
@@ -1,21 +1,14 @@
 /* Copyright (c) 1979 Regents of the University of California */
 
 /* Copyright (c) 1979 Regents of the University of California */
 
-static char sccsid[] = "@(#)ASRT.c 1.2 %G%";
+static char sccsid[] = "@(#)ASRT.c 1.3 %G%";
 
 
-#define NULL 0
-
-ASRT(cond, stmt)
+char EASRT[] = "Assertion failed\n";
 
 
+ASRT(cond)
        short   cond;
        short   cond;
-       char    *stmt;
 {
        if (cond)
                return;
 {
        if (cond)
                return;
-       if (stmt != NULL) {
-               ERROR("Assertion failed: %s\n", stmt);
-               return;
-       } else {
-               ERROR("Assertion failed\n", 0);
-               return;
-       }
+       ERROR(EASRT, 0);
+       return;
 }
 }