/**
* Return the absolute value of the specified integer.
*
- * @param val The integer of which we want to know the absolute value.
+ * @param j The integer of which we want to know the absolute value.
* @return The absolute value of the specified integer.
*/
int abs(int j)
('A' <= h && h <= 'F') ? (h - 'A' + 10) : \
('a' <= h && h <= 'f') ? (h - 'a' + 10) : 0);
}
+
+/**
+ * Enters HALT state, after printing msg
+ *
+ * @param msg message to print
+ */
+void fatal(const char *msg)
+{
+ fprintf(stderr, "%s",msg);
+ halt();
+}
+
+void exit(int status)
+{
+ printf("exited with status %d\n", status);
+ halt();
+}
+
+int errno;
+
+char *getenv(const char *name)
+{
+ return NULL;
+}
+