6 /* If memory allocation fails, bail out */
7 vm_char *safe_strdup(const vm_char *str)
9 vm_char *ptr = STRDUP(str);
10 if(!ptr) fatal_error("Out of memory in safe_strdup", 0);
14 /* We don't use printf directly, because format directives are not portable.
15 Instead we define the common cases here. */
21 void print_string(const char *str)
26 void print_cell(cell x)
28 printf(CELL_FORMAT,x);
31 void print_cell_hex(cell x)
33 printf(CELL_HEX_FORMAT,x);
36 void print_cell_hex_pad(cell x)
38 printf(CELL_HEX_PAD_FORMAT,x);
41 void print_fixnum(fixnum x)
43 printf(FIXNUM_FORMAT,x);
49 if(scanf(CELL_HEX_FORMAT,&cell) < 0) exit(1);