static void do_printing (outf_channel, SCHEME_OBJECT, bool);
static bool print_primitive_name (outf_channel, SCHEME_OBJECT);
-static void print_expression (outf_channel, SCHEME_OBJECT, char *);
+static void print_expression (outf_channel, SCHEME_OBJECT, const char *);
\f
/* Compiled Code Debugging */
#ifdef CC_SUPPORT_P
-char *
+const char *
compiled_entry_filename (SCHEME_OBJECT entry)
{
SCHEME_OBJECT result = (compiled_entry_debug_filename (entry));
}
\f
static void
-print_expression (outf_channel stream, SCHEME_OBJECT expression, char * string)
+print_expression (outf_channel stream, SCHEME_OBJECT expression, const char * string)
{
if ((string [0]) != 0)
outf (stream, "%s: ", string);
}
void
-Print_Expression (SCHEME_OBJECT expression, char * string)
+Print_Expression (SCHEME_OBJECT expression, const char * string)
{
print_expression (ERROR_OUTPUT, expression, string);
}
extern SCHEME_OBJECT ephemeron_array;
extern unsigned long ephemeron_count;
-extern char * CONT_PRINT_RETURN_MESSAGE;
-extern char * CONT_PRINT_EXPR_MESSAGE;
-extern char * RESTORE_CONT_RETURN_MESSAGE;
-extern char * RESTORE_CONT_EXPR_MESSAGE;
+extern const char * CONT_PRINT_RETURN_MESSAGE;
+extern const char * CONT_PRINT_EXPR_MESSAGE;
+extern const char * RESTORE_CONT_RETURN_MESSAGE;
+extern const char * RESTORE_CONT_EXPR_MESSAGE;
extern unsigned long MAX_RETURN;
extern void initialize_primitives (void);
extern SCHEME_OBJECT make_primitive (const char *, int);
-extern SCHEME_OBJECT find_primitive_cname (char *, bool, bool, int);
+extern SCHEME_OBJECT find_primitive_cname (const char *, bool, bool, int);
extern SCHEME_OBJECT find_primitive (SCHEME_OBJECT, bool, bool, int);
\f
/* Interpreter utilities */
extern void Debug_Print (SCHEME_OBJECT, bool);
extern void Show_Env (SCHEME_OBJECT);
extern void Print_Return (char *);
-extern void Print_Expression (SCHEME_OBJECT, char *);
+extern void Print_Expression (SCHEME_OBJECT, const char *);
extern void Print_Primitive (SCHEME_OBJECT);
#endif /* not SCM_EXTERN_H */
FILE * input;
FILE * output;
-char * name;
-char * file_name;
+const char * name;
+const char * file_name;
struct descriptor
{
- char * c_name; /* The C name of the function */
- char * arity; /* Number of arguments */
- char * scheme_name; /* Scheme name of the primitive */
- char * documentation; /* Documentation string */
- char * file_name; /* File where found. */
+ const char * c_name; /* The C name of the function */
+ const char * arity; /* Number of arguments */
+ const char * scheme_name; /* Scheme name of the primitive */
+ const char * documentation; /* Documentation string */
+ const char * file_name; /* File where found. */
};
int buffer_index;
TOKEN_PROCESSOR scan (void);
bool whitespace (int c);
int compare_descriptors (struct descriptor * d1, struct descriptor * d2);
-int read_index (char * arg, char * identification);
-int strcmp_ci (char * s1, char * s2);
+int read_index (const char * arg, const char * identification);
+int strcmp_ci (const char * s1, const char * s2);
pseudo_void create_alternate_entry (void);
pseudo_void create_builtin_entry (void);
pseudo_void create_normal_entry (void);
void print_entry (FILE * output, int index,
struct descriptor * primitive_descriptor);
void process (void);
-void process_argument (char * fn);
+void process_argument (const char * fn);
void scan_to_token_start (void);
void skip_token (void);
void sort (void);
}
\f
void
-process_argument (char * fn)
+process_argument (const char * fn)
{
file_name = fn;
if ((strcmp ("-", file_name)) == 0)
print_primitives (FILE * output, int limit)
{
int count;
- char * table_entry;
+ const char * table_entry;
/* Print the procedure table. */
fprintf
};
void
-copy_token (char ** target, int * size, enum tokentype token_type)
+copy_token (const char ** target, int * size, enum tokentype token_type)
{
int c;
TOKEN_BUFFER_DECLS ();
struct descriptor desc;
int length;
int index;
- char * index_buffer;
+ const char * index_buffer;
COPY_C_NAME (desc);
COPY_ARITY (desc);
}
int
-read_index (char * arg, char * identification)
+read_index (const char * arg, const char * identification)
{
int result = 0;
if (((arg [0]) == '0') && ((arg [1]) == 'x'))
}
int
-strcmp_ci (char * s1, char * s2)
+strcmp_ci (const char * s1, const char * s2)
{
int length1 = (strlen (s1));
int length2 = (strlen (s2));
#ifdef COMPILE_AS_MODULE
-char *
+const char *
dload_initialize_file (void)
{
declare_primitive
struct primitive_alias_s
{
- char * alias;
- char * name;
+ const char * alias;
+ const char * name;
};
static struct primitive_alias_s primitive_aliases [] =
}
\f
static void
-initialization_error (char * reason, char * item)
+initialization_error (const char * reason, const char * item)
{
outf_fatal ("initialize_primitives: Error %s %s.\n", reason, item);
termination_init_error ();
}
SCHEME_OBJECT
-find_primitive_cname (char * name, bool intern_p, bool allow_p, int arity)
+find_primitive_cname (const char * name, bool intern_p, bool allow_p, int arity)
{
tree_node prim = (tree_lookup (prim_procedure_tree, name));
if (prim != 0)
#ifdef COMPILE_AS_MODULE
-char *
+const char *
dload_initialize_file (void)
{
declare_primitive
}
/* Must match definition of `enum channel_type' in "osio.h". */
-static char * channel_type_names [] =
+static const char * channel_type_names [] =
{
"unknown",
"file",
extern void dload_initialize_x11graph (void);
extern void dload_initialize_x11term (void);
-char *
+const char *
dload_initialize_file (void)
{
unsigned int local_circle [100];
#endif
-char * CONT_PRINT_RETURN_MESSAGE = "SAVE_CONT, return code";
-char * CONT_PRINT_EXPR_MESSAGE = "SAVE_CONT, expression";
-char * RESTORE_CONT_RETURN_MESSAGE = "RESTORE_CONT, return code";
-char * RESTORE_CONT_EXPR_MESSAGE = "RESTORE_CONT, expression";
+const char * CONT_PRINT_RETURN_MESSAGE = "SAVE_CONT, return code";
+const char * CONT_PRINT_EXPR_MESSAGE = "SAVE_CONT, expression";
+const char * RESTORE_CONT_RETURN_MESSAGE = "RESTORE_CONT, return code";
+const char * RESTORE_CONT_EXPR_MESSAGE = "RESTORE_CONT, expression";
/* Interpreter code name and message tables */
unsigned long prev_restore_history_offset;
static SCHEME_OBJECT copy_history (SCHEME_OBJECT);
-static void error_death (long, char *) NORETURN;
+static void error_death (long, const char *) NORETURN;
\f
/* Helper procedures for setup_interrupt, which follows. */
long death_blow;
static void
-error_death (long code, char * message)
+error_death (long code, const char * message)
{
death_blow = code;
outf_fatal ("\nMicrocode Error: %s.\n", message);
extern void * x_malloc (unsigned int size);
extern void * x_realloc (void * ptr, unsigned int size);
-extern char * x_get_default
+extern const char * x_get_default
(Display * display,
const char * resource_name,
const char * resource_class,
const char * property_name,
const char * property_class,
- char * sdefault);
+ const char * sdefault);
extern void x_default_attributes
(Display * display,
static int
x_decode_color (Display * display,
Colormap color_map,
- char * color_name,
+ const char * color_name,
unsigned long * color_return)
{
XColor cdef;
XRecolorCursor (display, mouse_cursor, (&mouse_color), (&background_color));
}
-char *
+const char *
x_get_default (Display * display,
const char * resource_name,
const char * resource_class,
const char * property_name,
const char * property_class,
- char * sdefault)
+ const char * sdefault)
{
- char * result = (XGetDefault (display, resource_name, property_name));
+ const char * result = (XGetDefault (display, resource_name, property_name));
if (result != 0)
return (result);
result = (XGetDefault (display, resource_class, property_name));
const char * property_class,
unsigned long default_color)
{
- char * color_name
+ const char * color_name
= (x_get_default (display, resource_name, resource_class,
property_name, property_class, 0));
unsigned long result;
if ((attributes->font) == 0)
error_external_return ();
{
- char * s
+ const char * s
= (x_get_default (display,
resource_name, resource_class,
"borderWidth", "BorderWidth",
(attributes->border_width) = ((s == 0) ? 0 : (atoi (s)));
}
{
- char * s
+ const char * s
= (x_get_default (display,
resource_name, resource_class,
"internalBorder", "BorderWidth",
{
if (x_debug > 0)
{
- char * type_name;
+ const char * type_name;
fprintf (stderr, "\nX event on 0x%lx: ", ((event->xany) . window));
switch (event->type)
{