/* -*-C-*-
-$Id: bchmmg.c,v 9.106 2007/01/05 21:19:25 cph Exp $
+$Id: bchmmg.c,v 9.107 2007/01/12 03:45:55 cph Exp $
Copyright (C) 1986, 1987, 1988, 1989, 1990, 1991, 1992, 1993, 1994,
1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
for (cntr = 0, ptr = &all_gc_statistics[0], scan = (VECTOR_LOC (vector, 0));
cntr < len;
cntr++, ptr++)
- *scan++ = (char_pointer_to_string ((unsigned char *) ptr->name));
+ *scan++ = (char_pointer_to_string (ptr->name));
return (vector);
}
VECTOR_SET (vector, 2, (long_to_integer ((long) read_overlap)));
VECTOR_SET (vector, 3, (long_to_integer ((long) write_overlap)));
VECTOR_SET (vector, 4, (long_to_integer ((long) (GET_SLEEP_DELTA ()))));
- VECTOR_SET (vector, 5, (char_pointer_to_string
- ((unsigned char *) drone_file_name)));
+ VECTOR_SET (vector, 5, (char_pointer_to_string (drone_file_name)));
PRIMITIVE_RETURN (vector);
}
/* -*-C-*-
-$Id: boot.c,v 9.121 2007/01/05 21:19:25 cph Exp $
+$Id: boot.c,v 9.122 2007/01/12 03:45:55 cph Exp $
Copyright (C) 1986, 1987, 1988, 1989, 1990, 1991, 1992, 1993, 1994,
1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
unsigned int i;
for (i = 0; (i < length); i += 1)
{
- VECTOR_SET (v, i, (char_pointer_to_symbol (names [i])));
+ VECTOR_SET (v, i, (char_pointer_to_symbol ((char *) (names [i]))));
}
return (v);
}
switch (Start_Prim)
{
case BOOT_FASLOAD: /* (SCODE-EVAL (BINARY-FASLOAD <file>) GLOBAL-ENV) */
- FName = (char_pointer_to_string ((unsigned char *) File_Name));
+ FName = (char_pointer_to_string (File_Name));
prim = (make_primitive ("BINARY-FASLOAD", 1));
inner_arg = Free;
*Free++ = prim;
break;
case BOOT_LOAD_BAND: /* (LOAD-BAND <file>) */
- FName = (char_pointer_to_string ((unsigned char *) File_Name));
+ FName = (char_pointer_to_string (File_Name));
prim = (make_primitive ("LOAD-BAND", 1));
inner_arg = Free;
*Free++ = prim;
case BOOT_EXECUTE:
/* (SCODE-EVAL (INITIALIZE-C-COMPILED-BLOCK <file>) GLOBAL-ENV) */
- FName = (char_pointer_to_string ((unsigned char *) File_Name));
+ FName = (char_pointer_to_string (File_Name));
prim = (make_primitive ("INITIALIZE-C-COMPILED-BLOCK", 1));
inner_arg = Free;
*Free++ = prim;
Result = (make_vector (IDENTITY_LENGTH, SHARP_F, true));
FAST_VECTOR_SET (Result, ID_RELEASE, SHARP_F);
FAST_VECTOR_SET
- (Result, ID_MICRO_VERSION,
- (char_pointer_to_string ((unsigned char *) PACKAGE_VERSION)));
+ (Result, ID_MICRO_VERSION, (char_pointer_to_string (PACKAGE_VERSION)));
FAST_VECTOR_SET (Result, ID_MICRO_MOD, SHARP_F);
FAST_VECTOR_SET
(Result, ID_PRINTER_WIDTH, (LONG_TO_UNSIGNED_FIXNUM (OS_tty_x_size ())));
FAST_VECTOR_SET
(Result, ID_FLONUM_EPSILON, (double_to_flonum ((double) DBL_EPSILON)));
FAST_VECTOR_SET
- (Result, ID_OS_NAME, (char_pointer_to_string ((unsigned char *) OS_Name)));
+ (Result, ID_OS_NAME, (char_pointer_to_string (OS_Name)));
FAST_VECTOR_SET (Result, ID_OS_VARIANT,
- (char_pointer_to_string ((unsigned char *) OS_Variant)));
+ (char_pointer_to_string (OS_Variant)));
FAST_VECTOR_SET (Result, ID_STACK_TYPE,
- (char_pointer_to_string
- ((unsigned char *) STACK_TYPE_STRING)));
+ (char_pointer_to_string (STACK_TYPE_STRING)));
FAST_VECTOR_SET (Result, ID_MACHINE_TYPE,
- (char_pointer_to_string
- ((unsigned char *) MACHINE_TYPE)));
+ (char_pointer_to_string (MACHINE_TYPE)));
PRIMITIVE_RETURN (Result);
}
DEFINE_PRIMITIVE ("MICROCODE-TABLES-FILENAME", Prim_microcode_tables_filename, 0, 0, 0)
{
PRIMITIVE_HEADER (0);
- PRIMITIVE_RETURN
- (char_pointer_to_string ((unsigned char *) option_utabmd_file));
+ PRIMITIVE_RETURN (char_pointer_to_string (option_utabmd_file));
}
DEFINE_PRIMITIVE ("MICROCODE-LIBRARY-PATH", Prim_microcode_library_path, 0, 0, 0)
(allocate_marked_vector (TC_VECTOR, (end - scan), 1));
SCHEME_OBJECT * scan_result = (VECTOR_LOC (result, 0));
while (scan < end)
- (*scan_result++) =
- (char_pointer_to_string ((unsigned char *) *scan++));
+ (*scan_result++) = (char_pointer_to_string (*scan++));
PRIMITIVE_RETURN (result);
}
}
CONST char ** end = (scan + argc);
SCHEME_OBJECT * scan_result = (VECTOR_LOC (result, 0));
while (scan < end)
- (*scan_result++) = (char_pointer_to_string ((unsigned char *) *scan++));
+ (*scan_result++) = (char_pointer_to_string (*scan++));
return (result);
}
/* -*-C-*-
-$Id: comutl.c,v 1.36 2007/01/05 21:19:25 cph Exp $
+$Id: comutl.c,v 1.37 2007/01/12 03:45:55 cph Exp $
Copyright (C) 1986, 1987, 1988, 1989, 1990, 1991, 1992, 1993, 1994,
1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
if (result == ((char *) NULL))
PRIMITIVE_RETURN (SHARP_F);
else
- PRIMITIVE_RETURN (char_pointer_to_string ((unsigned char *) result));
+ PRIMITIVE_RETURN (char_pointer_to_string (result));
}
DEFINE_PRIMITIVE ("BUILTIN-INDEX->NAME", Prim_builtin_index_to_name, 1, 1,
if (result == ((char *) NULL))
PRIMITIVE_RETURN (SHARP_F);
else
- PRIMITIVE_RETURN (char_pointer_to_string ((unsigned char *) result));
+ PRIMITIVE_RETURN (char_pointer_to_string (result));
}
/* This is only meaningful for the C back end. */
/* -*-C-*-
-$Id: extern.c,v 9.42 2007/01/05 21:19:25 cph Exp $
+$Id: extern.c,v 9.43 2007/01/12 03:45:55 cph Exp $
Copyright (C) 1986, 1987, 1988, 1989, 1990, 1991, 1992, 1993, 1994,
1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
PRIMITIVE_RETURN
((answer == 0)
? SHARP_F
- : (char_pointer_to_string ((unsigned char *) answer)));
+ : (char_pointer_to_string (answer)));
}
}
}
fast long number = (PRIMITIVE_NUMBER (primitive));
if ((number < 0) || (number > (NUMBER_OF_PRIMITIVES ())))
error_bad_range_arg (1);
- PRIMITIVE_RETURN
- (char_pointer_to_string ((unsigned char *)
- (PRIMITIVE_NAME (primitive))));
+ PRIMITIVE_RETURN (char_pointer_to_string (PRIMITIVE_NAME (primitive)));
}
}
}
/* -*-C-*-
-$Id: extern.h,v 9.67 2007/01/05 21:19:25 cph Exp $
+$Id: extern.h,v 9.68 2007/01/12 03:45:55 cph Exp $
Copyright (C) 1986, 1987, 1988, 1989, 1990, 1991, 1992, 1993, 1994,
1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
extern SCHEME_OBJECT EXFUN (make_vector, (long, SCHEME_OBJECT, Boolean));
extern SCHEME_OBJECT EXFUN (allocate_string, (unsigned long));
extern SCHEME_OBJECT EXFUN (allocate_string_no_gc, (unsigned long));
+extern SCHEME_OBJECT EXFUN (memory_to_string, (unsigned long, CONST void *));
extern SCHEME_OBJECT EXFUN
- (memory_to_string, (unsigned long, CONST unsigned char *));
-extern SCHEME_OBJECT EXFUN
- (memory_to_string_no_gc, (unsigned long, CONST unsigned char *));
-extern SCHEME_OBJECT EXFUN (char_pointer_to_string, (CONST unsigned char *));
-extern SCHEME_OBJECT EXFUN
- (char_pointer_to_string_no_gc, (CONST unsigned char *));
+ (memory_to_string_no_gc, (unsigned long, CONST void *));
+extern SCHEME_OBJECT EXFUN (char_pointer_to_string, (CONST char *));
+extern SCHEME_OBJECT EXFUN (char_pointer_to_string_no_gc, (CONST char *));
extern CONST char * EXFUN (arg_symbol, (int));
extern CONST char * EXFUN (arg_interned_symbol, (int));
extern SCHEME_OBJECT EXFUN (string_to_symbol, (SCHEME_OBJECT));
/* -*-C-*-
-$Id: fasload.c,v 9.98 2007/01/05 21:19:25 cph Exp $
+$Id: fasload.c,v 9.99 2007/01/12 03:45:55 cph Exp $
Copyright (C) 1986, 1987, 1988, 1989, 1990, 1991, 1992, 1993, 1994,
1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
PRIMITIVE_HEADER (0);
PRIMITIVE_RETURN
((reload_band_name != 0)
- ? (char_pointer_to_string ((unsigned char *) reload_band_name))
+ ? (char_pointer_to_string (reload_band_name))
: (option_band_file != 0)
- ? (char_pointer_to_string ((unsigned char *) option_band_file))
+ ? (char_pointer_to_string (option_band_file))
: SHARP_F);
}
/* -*-C-*-
-$Id: foreign.c,v 1.8 2007/01/05 21:19:25 cph Exp $
+$Id: foreign.c,v 1.9 2007/01/12 03:45:55 cph Exp $
Copyright (C) 1986, 1987, 1988, 1989, 1990, 1991, 1992, 1993, 1994,
1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
case FOREIGN_STRING:
temp_ptr = ALIGN_FOREIGN_POINTER (*ptr_to_ptr, FOREIGN_STRING);
*ptr_to_ptr = (((unsigned char *) temp_ptr) + 1);
- return (char_pointer_to_string ((unsigned char *) temp_ptr;
+ return (char_pointer_to_string (temp_ptr));
case FOREIGN_PTR:
temp_ptr = ALIGN_FOREIGN_POINTER (*ptr_to_ptr, FOREIGN_PTR);
*ptr_to_ptr = (((PTR) temp_ptr) + 1);
/* -*-C-*-
-$Id: intern.c,v 9.65 2007/01/05 21:19:25 cph Exp $
+$Id: intern.c,v 9.66 2007/01/12 03:45:55 cph Exp $
Copyright (C) 1986, 1987, 1988, 1989, 1990, 1991, 1992, 1993, 1994,
1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
unsigned long length AND
CONST char * string)
{
- CONST unsigned char * scan = string;
+ CONST unsigned char * scan = ((unsigned char *) string);
CONST unsigned char * end = (scan + length);
unsigned int result = 0x811c9dc5;
while (scan < end)
DEFUN (arg_symbol, (n), int n)
{
CHECK_ARG (n, SYMBOL_P);
- return (STRING_LOC ((FAST_MEMORY_REF ((ARG_REF (n)), SYMBOL_NAME)), 0));
+ return (STRING_POINTER (FAST_MEMORY_REF ((ARG_REF (n)), SYMBOL_NAME)));
}
CONST char *
DEFUN (arg_interned_symbol, (n), int n)
{
CHECK_ARG (n, SYMBOL_P);
- return (STRING_LOC ((FAST_MEMORY_REF ((ARG_REF (n)), SYMBOL_NAME)), 0));
+ return (STRING_POINTER (FAST_MEMORY_REF ((ARG_REF (n)), SYMBOL_NAME)));
}
SCHEME_OBJECT
{
SCHEME_OBJECT * cell
= (find_symbol_internal ((STRING_LENGTH (string)),
- (STRING_LOC (string, 0))));
+ (STRING_POINTER (string))));
return ((EMPTY_LIST_P (*cell)) ? (make_symbol (string, cell)) : (*cell));
}
{
SCHEME_OBJECT name = (FAST_MEMORY_REF (symbol, SYMBOL_NAME));
SCHEME_OBJECT * cell
- = (find_symbol_internal ((STRING_LENGTH (name)), (STRING_LOC (name, 0))));
+ = (find_symbol_internal ((STRING_LENGTH (name)), (STRING_POINTER (name))));
if (!EMPTY_LIST_P (*cell))
return (*cell);
else
{
SCHEME_OBJECT string = (ARG_REF (1));
PRIMITIVE_RETURN
- (find_symbol ((STRING_LENGTH (string)), (STRING_LOC (string, 0))));
+ (find_symbol ((STRING_LENGTH (string)), (STRING_POINTER (string))));
}
}
SCHEME_OBJECT string = (ARG_REF (1));
PRIMITIVE_RETURN
(LONG_TO_UNSIGNED_FIXNUM (string_hash ((STRING_LENGTH (string)),
- (STRING_LOC (string, 0)))));
+ (STRING_POINTER (string)))));
}
}
PRIMITIVE_RETURN
(LONG_TO_UNSIGNED_FIXNUM
((string_hash ((STRING_LENGTH (string)),
- (STRING_LOC (string, 0))))
+ (STRING_POINTER (string))))
% (arg_ulong_integer (2))));
}
}
/* -*-C-*-
-$Id: nttterm.c,v 1.8 2007/01/05 21:19:25 cph Exp $
+$Id: nttterm.c,v 1.9 2007/01/12 03:45:55 cph Exp $
Copyright (C) 1986, 1987, 1988, 1989, 1990, 1991, 1992, 1993, 1994,
1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
(arg_nonnegative_integer (3)),
(arg_nonnegative_integer (4)),
(arg_nonnegative_integer (5))));
- SCHEME_OBJECT result = (char_pointer_to_string ((unsigned char *) s));
+ SCHEME_OBJECT result = (char_pointer_to_string (s));
free (s);
PRIMITIVE_RETURN (result);
}
UP = (((ARG_REF (5)) == SHARP_F) ? 0 : (STRING_ARG (5)));
PRIMITIVE_RETURN
(char_pointer_to_string
- ((unsigned char *)
- (tgoto ((STRING_ARG (1)),
- (arg_nonnegative_integer (2)),
- (arg_nonnegative_integer (3))))));
+ (tgoto ((STRING_ARG (1)),
+ (arg_nonnegative_integer (2)),
+ (arg_nonnegative_integer (3)))));
}
}
/* -*-C-*-
-$Id: object.h,v 9.63 2007/01/05 21:19:25 cph Exp $
+$Id: object.h,v 9.64 2007/01/12 03:45:55 cph Exp $
Copyright (C) 1986, 1987, 1988, 1989, 1990, 1991, 1992, 1993, 1994,
1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
#define STRING_LOC(string, index) \
(((unsigned char *) (MEMORY_LOC (string, STRING_CHARS))) + (index))
+#define STRING_POINTER(s) ((char *) (MEMORY_LOC (s, STRING_CHARS)))
+
#define STRING_REF(string, index) \
((int) (* (STRING_LOC ((string), (index)))))
/* -*-C-*-
-$Id: os2xcpt.c,v 1.17 2007/01/05 21:19:25 cph Exp $
+$Id: os2xcpt.c,v 1.18 2007/01/12 03:45:55 cph Exp $
Copyright (C) 1986, 1987, 1988, 1989, 1990, 1991, 1992, 1993, 1994,
1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
}
{
const char * name = (find_exception_name (report -> ExceptionNum));
- trap_name
- = ((name == 0) ? SHARP_F : (char_pointer_to_string ((char *) name)));
+ trap_name = ((name == 0) ? SHARP_F : (char_pointer_to_string (name)));
}
/* Push the hardware-trap stack frame. The continuation parser will
find this and use it to present meaningful debugging information
/* -*-C-*-
-$Id: prgdbm.c,v 1.8 2007/01/05 21:19:25 cph Exp $
+$Id: prgdbm.c,v 1.9 2007/01/12 03:45:55 cph Exp $
Copyright (C) 1986, 1987, 1988, 1989, 1990, 1991, 1992, 1993, 1994,
1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
((GDBM_FILE) (allocation_item_arg ((arg), (&dbf_table))))
#define GDBM_ERROR_VAL() \
- (char_pointer_to_string ((unsigned char *) (gdbm_strerror (gdbm_errno))))
+ (char_pointer_to_string (gdbm_strerror (gdbm_errno)))
#define VOID_GDBM_CALL(expression) \
(((expression) == 0) ? SHARP_F : (GDBM_ERROR_VAL ()))
DEFINE_PRIMITIVE ("GDBM-VERSION", Prim_gdbm_version, 0, 0, 0)
{
PRIMITIVE_HEADER (0);
- PRIMITIVE_RETURN (char_pointer_to_string ((unsigned char *) gdbm_version));
+ PRIMITIVE_RETURN (char_pointer_to_string (gdbm_version));
}
DEFINE_PRIMITIVE ("GDBM-SETOPT", Prim_gdbm_setopt, 3, 3, 0)
/* -*-C-*-
-$Id: prims.h,v 9.54 2007/01/05 21:19:25 cph Exp $
+$Id: prims.h,v 9.55 2007/01/12 03:45:55 cph Exp $
Copyright (C) 1986, 1987, 1988, 1989, 1990, 1991, 1992, 1993, 1994,
1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
#define STRING_ARG(arg) \
((STRING_P (ARG_REF (arg))) \
- ? ((char *) (STRING_LOC ((ARG_REF (arg)), 0))) \
+ ? (STRING_POINTER (ARG_REF (arg))) \
: ((error_wrong_type_arg (arg)), ((char *) 0)))
extern PTR EXFUN (arg_extended_string, (unsigned int, unsigned long *));
/* -*-C-*-
-$Id: prntenv.c,v 1.14 2007/01/05 21:19:25 cph Exp $
+$Id: prntenv.c,v 1.15 2007/01/12 03:45:55 cph Exp $
Copyright (C) 1986, 1987, 1988, 1989, 1990, 1991, 1992, 1993, 1994,
1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
if (time_string == 0)
PRIMITIVE_RETURN (SHARP_F);
(time_string[24]) = '\0';
- PRIMITIVE_RETURN (char_pointer_to_string ((unsigned char *) time_string));
+ PRIMITIVE_RETURN (char_pointer_to_string (time_string));
}
}
PRIMITIVE_RETURN
((variable_value == 0)
? SHARP_F
- : (char_pointer_to_string ((unsigned char *) variable_value)));
+ : (char_pointer_to_string (variable_value)));
}
}
/* -*-C-*-
-$Id: pros2pm.c,v 1.25 2007/01/05 21:19:25 cph Exp $
+$Id: pros2pm.c,v 1.26 2007/01/12 03:45:55 cph Exp $
Copyright (C) 1986, 1987, 1988, 1989, 1990, 1991, 1992, 1993, 1994,
1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
result = SHARP_F;
else
{
- result = (char_pointer_to_string ((unsigned char *) text));
+ result = (char_pointer_to_string (text));
OS_free ((void *) text);
}
PRIMITIVE_RETURN (result);
: (STRING_ARG (2)))));
if (spec == 0)
PRIMITIVE_RETURN (SHARP_F);
- result = (char_pointer_to_string ((char *) spec));
+ result = (char_pointer_to_string (spec));
OS_free ((void *) spec);
PRIMITIVE_RETURN (result);
}
/* -*-C-*-
-$Id: prosenv.c,v 1.21 2007/01/05 21:19:25 cph Exp $
+$Id: prosenv.c,v 1.22 2007/01/12 03:45:55 cph Exp $
Copyright (C) 1986, 1987, 1988, 1989, 1990, 1991, 1992, 1993, 1994,
1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
"Return the current working directory as a string.")
{
PRIMITIVE_HEADER (0);
- PRIMITIVE_RETURN (char_pointer_to_string
- ((unsigned char *) OS_working_dir_pathname ()));
+ PRIMITIVE_RETURN (char_pointer_to_string (OS_working_dir_pathname ()));
}
DEFINE_PRIMITIVE ("SET-WORKING-DIRECTORY-PATHNAME!", Prim_set_working_dir_pathname, 1, 1,
CONST char * message =
(OS_error_code_to_message (arg_nonnegative_integer (1)));
PRIMITIVE_RETURN
- ((message == 0) ? SHARP_F
- : (char_pointer_to_string ((unsigned char *) message)));
+ ((message == 0) ? SHARP_F : (char_pointer_to_string (message)));
}
}
/* -*-C-*-
-$Id: prosfs.c,v 1.21 2007/01/05 21:19:25 cph Exp $
+$Id: prosfs.c,v 1.22 2007/01/12 03:45:55 cph Exp $
Copyright (C) 1986, 1987, 1988, 1989, 1990, 1991, 1992, 1993, 1994,
1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
PRIMITIVE_RETURN \
((result == 0) \
? SHARP_F \
- : (char_pointer_to_string ((unsigned char *) result))); \
+ : (char_pointer_to_string (result))); \
}
\f
DEFINE_PRIMITIVE ("FILE-EXISTS?", Prim_file_exists_p, 1, 1,
/* -*-C-*-
-$Id: prosio.c,v 1.26 2007/01/05 21:19:25 cph Exp $
+$Id: prosio.c,v 1.27 2007/01/12 03:45:55 cph Exp $
Copyright (C) 1986, 1987, 1988, 1989, 1990, 1991, 1992, 1993, 1994,
1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
index = ((unsigned int) type);
if (index >= ((sizeof (channel_type_names)) / (sizeof (char *))))
PRIMITIVE_RETURN (SHARP_F);
- PRIMITIVE_RETURN
- (char_pointer_to_string ((unsigned char *) (channel_type_names [index])));
+ PRIMITIVE_RETURN (char_pointer_to_string (channel_type_names [index]));
}
\f
DEFINE_PRIMITIVE ("CHANNEL-READ", Prim_channel_read, 4, 4,
/* -*-C-*-
-$Id: prosproc.c,v 1.23 2007/01/05 21:19:25 cph Exp $
+$Id: prosproc.c,v 1.24 2007/01/12 03:45:55 cph Exp $
Copyright (C) 1986, 1987, 1988, 1989, 1990, 1991, 1992, 1993, 1994,
1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
(allocate_marked_vector (TC_VECTOR, (end_environ - environ), 1));
SCHEME_OBJECT * scan_result = (VECTOR_LOC (result, 0));
while (scan_environ < end_environ)
- (*scan_result++) =
- (char_pointer_to_string ((unsigned char *) (*scan_environ++)));
+ (*scan_result++) = (char_pointer_to_string (*scan_environ++));
PRIMITIVE_RETURN (result);
}
}
/* -*-C-*-
-$Id: prospty.c,v 1.8 2007/01/05 21:19:25 cph Exp $
+$Id: prospty.c,v 1.9 2007/01/12 03:45:55 cph Exp $
Copyright (C) 1986, 1987, 1988, 1989, 1990, 1991, 1992, 1993, 1994,
1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
{
SCHEME_OBJECT vector = (allocate_marked_vector (TC_VECTOR, 3, 1));
VECTOR_SET (vector, 0, (long_to_integer (channel)));
- VECTOR_SET (vector, 1,
- (char_pointer_to_string ((unsigned char *) master_name)));
- VECTOR_SET (vector, 2,
- (char_pointer_to_string ((unsigned char *) slave_name)));
+ VECTOR_SET (vector, 1, (char_pointer_to_string (master_name)));
+ VECTOR_SET (vector, 2, (char_pointer_to_string (slave_name)));
transaction_commit ();
PRIMITIVE_RETURN (vector);
}
/* -*-C-*-
-$Id: prostty.c,v 1.11 2007/01/05 21:19:25 cph Exp $
+$Id: prostty.c,v 1.12 2007/01/12 03:45:55 cph Exp $
Copyright (C) 1986, 1987, 1988, 1989, 1990, 1991, 1992, 1993, 1994,
1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
"Return a string that, when written to the display, will make it beep.")
{
PRIMITIVE_HEADER (0);
- PRIMITIVE_RETURN
- (char_pointer_to_string ((unsigned char *) (OS_tty_command_beep ())));
+ PRIMITIVE_RETURN (char_pointer_to_string (OS_tty_command_beep ()));
}
DEFINE_PRIMITIVE ("TTY-COMMAND-CLEAR", Prim_tty_command_clear, 0, 0,
"Return a string that, when written to the display, will clear it.")
{
PRIMITIVE_HEADER (0);
- PRIMITIVE_RETURN
- (char_pointer_to_string ((unsigned char *) (OS_tty_command_clear ())));
+ PRIMITIVE_RETURN (char_pointer_to_string (OS_tty_command_clear ()));
}
DEFINE_PRIMITIVE ("TTY-NEXT-INTERRUPT-CHAR", Prim_tty_next_interrupt_char, 0, 0,
/* -*-C-*-
-$Id: prpgsql.c,v 1.11 2007/01/05 21:19:25 cph Exp $
+$Id: prpgsql.c,v 1.12 2007/01/12 03:45:55 cph Exp $
Copyright (C) 1986, 1987, 1988, 1989, 1990, 1991, 1992, 1993, 1994,
1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
CHECK_ARG (2, STRING_P);
PRIMITIVE_RETURN
(long_to_integer (PQgetline ((ARG_CONN (1)),
- (STRING_LOC ((ARG_REF (2)), 0)),
+ (STRING_POINTER (ARG_REF (2))),
(STRING_LENGTH (ARG_REF (2))))));
}
CHECK_ARG (2, STRING_P);
PRIMITIVE_RETURN
(long_to_integer (PQputnbytes ((ARG_CONN (1)),
- (STRING_LOC ((ARG_REF (2)), 0)),
+ (STRING_POINTER (ARG_REF (2))),
(STRING_LENGTH (ARG_REF (2))))));
}
CHECK_ARG (1, STRING_P);
PRIMITIVE_RETURN
(ulong_to_integer (PQescapeString ((STRING_ARG (2)),
- (STRING_LOC ((ARG_REF (1)), 0)),
+ (STRING_POINTER (ARG_REF (1))),
(STRING_LENGTH (ARG_REF (1))))));
}
size_t escaped_length;
unsigned char * escaped
= (PQescapeBytea ((STRING_LOC ((ARG_REF (1)), 0)),
- (STRING_LENGTH (ARG_REF (1))),
- (&escaped_length)));
- SCHEME_OBJECT s = (char_pointer_to_string (escaped));
+ (STRING_LENGTH (ARG_REF (1))),
+ (&escaped_length)));
+ SCHEME_OBJECT s = (char_pointer_to_string ((char *) escaped));
PQfreemem (escaped);
PRIMITIVE_RETURN (s);
}
{
size_t unescaped_length;
unsigned char * unescaped
- = (PQunescapeBytea ((STRING_ARG (1)), (&unescaped_length)));
+ = (PQunescapeBytea (((unsigned char *) (STRING_ARG (1))),
+ (&unescaped_length)));
if (unescaped == 0)
error_bad_range_arg (1);
{
/* -*-C-*-
-$Id: pruxdld.c,v 1.21 2007/01/05 21:19:25 cph Exp $
+$Id: pruxdld.c,v 1.22 2007/01/12 03:45:55 cph Exp $
Copyright (C) 1986, 1987, 1988, 1989, 1990, 1991, 1992, 1993, 1994,
1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
contents.")
{
PRIMITIVE_HEADER (1);
- PRIMITIVE_RETURN
- (char_pointer_to_string ((unsigned char *) (arg_ulong_integer (1))));
+ PRIMITIVE_RETURN (char_pointer_to_string ((char *) (arg_ulong_integer (1))));
}
/* -*-C-*-
-$Id: pruxenv.c,v 1.24 2007/01/05 21:19:25 cph Exp $
+$Id: pruxenv.c,v 1.25 2007/01/12 03:45:55 cph Exp $
Copyright (C) 1986, 1987, 1988, 1989, 1990, 1991, 1992, 1993, 1994,
1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
time_t clock = (arg_integer (1));
char * time_string = (UX_ctime (&clock));
(time_string[24]) = '\0';
- PRIMITIVE_RETURN (char_pointer_to_string ((unsigned char *) time_string));
+ PRIMITIVE_RETURN (char_pointer_to_string (time_string));
}
}
{
struct passwd * entry = (UX_getpwnam (STRING_ARG (1)));
PRIMITIVE_RETURN
- ((entry == 0) ? SHARP_F
- : (char_pointer_to_string ((unsigned char *) (entry -> pw_dir))));
+ ((entry == 0) ? SHARP_F : (char_pointer_to_string (entry -> pw_dir)));
}
}
{
struct passwd * entry = (UX_getpwuid (arg_nonnegative_integer (1)));
PRIMITIVE_RETURN
- ((entry == 0) ? SHARP_F
- : (char_pointer_to_string ((unsigned char *) (entry -> pw_name))));
+ ((entry == 0) ? SHARP_F : (char_pointer_to_string (entry -> pw_name)));
}
}
{
struct group * entry = (UX_getgrgid (arg_nonnegative_integer (1)));
PRIMITIVE_RETURN
- ((entry == 0) ? SHARP_F
- : (char_pointer_to_string ((unsigned char *) (entry -> gr_name))));
+ ((entry == 0) ? SHARP_F : (char_pointer_to_string (entry -> gr_name)));
}
}
\f
{
extern CONST char * EXFUN (OS_current_user_name, (void));
PRIMITIVE_HEADER (0);
- PRIMITIVE_RETURN (char_pointer_to_string
- ((unsigned char *) OS_current_user_name ()));
+ PRIMITIVE_RETURN (char_pointer_to_string (OS_current_user_name ()));
}
DEFINE_PRIMITIVE ("CURRENT-USER-HOME-DIRECTORY", Prim_current_user_home_directory, 0, 0,
extern CONST char * EXFUN (OS_current_user_home_directory, (void));
PRIMITIVE_HEADER (0);
PRIMITIVE_RETURN
- (char_pointer_to_string ((unsigned char *)
- OS_current_user_home_directory ()));
+ (char_pointer_to_string (OS_current_user_home_directory ()));
}
DEFINE_PRIMITIVE ("SYSTEM", Prim_system, 1, 1,
PRIMITIVE_RETURN
((variable_value == 0)
? SHARP_F
- : (char_pointer_to_string ((unsigned char *) variable_value)));
+ : (char_pointer_to_string (variable_value)));
}
}
\f
PRIMITIVE_RETURN
((this_host_entry == 0)
? SHARP_F
- : (char_pointer_to_string
- ((unsigned char *) (this_host_entry -> h_name))));
+ : (char_pointer_to_string (this_host_entry -> h_name)));
#else
- PRIMITIVE_RETURN
- (char_pointer_to_string ((unsigned char *) this_host_name));
+ PRIMITIVE_RETURN (char_pointer_to_string (this_host_name));
#endif
}
}
#ifdef HAVE_SOCKETS
STD_VOID_SYSTEM_CALL (syscall_gethostname,
UX_gethostname (this_host_name, HOSTNAMESIZE));
- PRIMITIVE_RETURN
- (char_pointer_to_string ((unsigned char *) this_host_name));
+ PRIMITIVE_RETURN (char_pointer_to_string (this_host_name));
#else
strcpy (this_host_name, "unknown-host");
#endif
/* -*-C-*-
-$Id: pruxfs.c,v 9.60 2007/01/05 21:19:25 cph Exp $
+$Id: pruxfs.c,v 9.61 2007/01/12 03:45:55 cph Exp $
Copyright (C) 1986, 1987, 1988, 1989, 1990, 1991, 1992, 1993, 1994,
1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
case S_IFLNK:
VECTOR_SET (result, 0,
(char_pointer_to_string
- ((unsigned char *)
- (OS_file_soft_link_p
- ((CONST char *) (STRING_LOC ((ARG_REF (1)), 0)))))));
+ (OS_file_soft_link_p
+ ((CONST char *) (STRING_LOC ((ARG_REF (1)), 0))))));
break;
#endif
default:
{
CONST char * result = (UX_file_system_type (STRING_ARG (1)));
PRIMITIVE_RETURN
- (char_pointer_to_string
- ((unsigned char *) ((result == 0) ? "unknown" : result)));
+ (char_pointer_to_string ((result == 0) ? "unknown" : result));
}
}
/* -*-C-*-
-$Id: pruxsock.c,v 1.25 2007/01/05 21:19:25 cph Exp $
+$Id: pruxsock.c,v 1.26 2007/01/12 03:45:55 cph Exp $
Copyright (C) 1986, 1987, 1988, 1989, 1990, 1991, 1992, 1993, 1994,
1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
if (host_name == 0)
PRIMITIVE_RETURN (SHARP_F);
{
- SCHEME_OBJECT result
- = (char_pointer_to_string ((unsigned char *) host_name));
+ SCHEME_OBJECT result = (char_pointer_to_string (host_name));
OS_free ((PTR) host_name);
PRIMITIVE_RETURN (result);
}
if (host_name == 0)
PRIMITIVE_RETURN (SHARP_F);
{
- SCHEME_OBJECT result
- = (char_pointer_to_string ((unsigned char *) host_name));
+ SCHEME_OBJECT result = (char_pointer_to_string (host_name));
OS_free ((PTR) host_name);
PRIMITIVE_RETURN (result);
}
if (host_name == 0)
PRIMITIVE_RETURN (SHARP_F);
{
- SCHEME_OBJECT result
- = (char_pointer_to_string ((unsigned char *) host_name));
+ SCHEME_OBJECT result = (char_pointer_to_string (host_name));
OS_free ((PTR) host_name);
PRIMITIVE_RETURN (result);
}
/* -*-C-*-
-$Id: string.c,v 9.51 2007/01/05 21:19:25 cph Exp $
+$Id: string.c,v 9.52 2007/01/12 03:45:55 cph Exp $
Copyright (C) 1986, 1987, 1988, 1989, 1990, 1991, 1992, 1993, 1994,
1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
SCHEME_OBJECT
DEFUN (memory_to_string, (nbytes, data),
unsigned long nbytes AND
- CONST unsigned char * data)
+ CONST void * data)
{
SCHEME_OBJECT result = (allocate_string (nbytes));
unsigned char * scan_result = (STRING_LOC (result, 0));
unsigned char * end_result = (scan_result + nbytes);
+ CONST unsigned char * scan_data = data;
while (scan_result < end_result)
- (*scan_result++) = (*data++);
+ (*scan_result++) = (*scan_data++);
return (result);
}
SCHEME_OBJECT
DEFUN (memory_to_string_no_gc, (nbytes, data),
unsigned long nbytes AND
- CONST unsigned char * data)
+ CONST void * data)
{
SCHEME_OBJECT result = (allocate_string_no_gc (nbytes));
unsigned char * scan_result = (STRING_LOC (result, 0));
unsigned char * end_result = (scan_result + nbytes);
+ CONST unsigned char * scan_data = data;
while (scan_result < end_result)
- (*scan_result++) = (*data++);
+ (*scan_result++) = (*scan_data++);
return (result);
}
SCHEME_OBJECT
DEFUN (char_pointer_to_string, (char_pointer),
- CONST unsigned char * char_pointer)
+ CONST char * char_pointer)
{
- CONST unsigned char * scan = char_pointer;
+ CONST char * scan = char_pointer;
if (scan == 0)
scan += 1;
else
SCHEME_OBJECT
DEFUN (char_pointer_to_string_no_gc, (char_pointer),
- CONST unsigned char * char_pointer)
+ CONST char * char_pointer)
{
- CONST unsigned char * scan = char_pointer;
+ CONST char * scan = char_pointer;
if (scan == 0)
scan += 1;
else
/* -*-C-*-
-$Id: sysprim.c,v 9.53 2007/01/05 21:19:25 cph Exp $
+$Id: sysprim.c,v 9.54 2007/01/12 03:45:55 cph Exp $
Copyright (C) 1986, 1987, 1988, 1989, 1990, 1991, 1992, 1993, 1994,
1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
DEFINE_PRIMITIVE ("SCHEME-PROGRAM-NAME", Prim_scheme_program_name, 0, 0, 0)
{
PRIMITIVE_HEADER (0);
- PRIMITIVE_RETURN (char_pointer_to_string ((char *) (scheme_program_name)));
+ PRIMITIVE_RETURN (char_pointer_to_string (scheme_program_name));
}
\f
DEFINE_PRIMITIVE ("READ-BYTE-FROM-MEMORY", Prim_read_byte_from_memory, 1, 1,
/* -*-C-*-
-$Id: tterm.c,v 1.19 2007/01/05 21:19:25 cph Exp $
+$Id: tterm.c,v 1.20 2007/01/12 03:45:55 cph Exp $
Copyright (C) 1986, 1987, 1988, 1989, 1990, 1991, 1992, 1993, 1994,
1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
{
char * result = (tgetstr ((STRING_ARG (1)), (&tgetstr_pointer)));
PRIMITIVE_RETURN
- ((result == 0) ? SHARP_F
- : (char_pointer_to_string ((unsigned char *) result)));
+ ((result == 0) ? SHARP_F : (char_pointer_to_string (result)));
}
}
{
char s [4096];
#if defined(__netbsd__)
- PRIMITIVE_RETURN (char_pointer_to_string ((unsigned char *) NULL));
+ PRIMITIVE_RETURN (char_pointer_to_string (0));
#else
(void) tparam
((STRING_ARG (1)), s, (sizeof (s)),
(arg_nonnegative_integer (3)),
(arg_nonnegative_integer (4)),
(arg_nonnegative_integer (5)));
- PRIMITIVE_RETURN (char_pointer_to_string ((unsigned char *) s));
+ PRIMITIVE_RETURN (char_pointer_to_string (s));
#endif
}
}
UP = (((ARG_REF (5)) == SHARP_F) ? 0 : (STRING_ARG (5)));
PRIMITIVE_RETURN
(char_pointer_to_string
- ((unsigned char *)
- (tgoto ((STRING_ARG (1)),
- (arg_nonnegative_integer (2)),
- (arg_nonnegative_integer (3))))));
+ (tgoto ((STRING_ARG (1)),
+ (arg_nonnegative_integer (2)),
+ (arg_nonnegative_integer (3)))));
}
}
/* -*-C-*-
-$Id: uxsock.c,v 1.34 2007/01/05 21:19:25 cph Exp $
+$Id: uxsock.c,v 1.35 2007/01/12 03:45:55 cph Exp $
Copyright (C) 1986, 1987, 1988, 1989, 1990, 1991, 1992, 1993, 1994,
1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
unsigned int * peer_port)
{
static struct sockaddr_in address;
- int address_length = (sizeof (struct sockaddr_in));
+ socklen_t address_length = (sizeof (struct sockaddr_in));
int s;
while (1)
{
/* -*-C-*-
-$Id: uxtop.c,v 1.33 2007/01/05 21:19:25 cph Exp $
+$Id: uxtop.c,v 1.34 2007/01/12 03:45:55 cph Exp $
Copyright (C) 1986, 1987, 1988, 1989, 1990, 1991, 1992, 1993, 1994,
1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
};
void
-OS_syscall_names (unsigned int * length, unsigned char *** names)
+OS_syscall_names (unsigned int * length, char *** names)
{
(*length) = ((sizeof (syscall_names_table)) / (sizeof (char *)));
- (*names) = ((unsigned char **) syscall_names_table);
+ (*names) = syscall_names_table;
}
\f
static char * syserr_names_table [] =
};
void
-OS_syserr_names (unsigned int * length, unsigned char *** names)
+OS_syserr_names (unsigned int * length, char *** names)
{
(*length) = ((sizeof (syserr_names_table)) / (sizeof (char *)));
- (*names) = ((unsigned char **) syserr_names_table);
+ (*names) = syserr_names_table;
}
/* -*-C-*-
-$Id: uxtrap.c,v 1.44 2007/01/05 21:19:25 cph Exp $
+$Id: uxtrap.c,v 1.45 2007/01/12 03:45:55 cph Exp $
Copyright (C) 1986, 1987, 1988, 1989, 1990, 1991, 1992, 1993, 1994,
1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
DEFUN (find_ccblock, (pc), unsigned long pc)
{
SCHEME_OBJECT * block_addr;
- int index;
+ unsigned int index;
block_addr = 0;
classify_pc (pc, (&block_addr), (&index));
unsigned long pc = (SIGCONTEXT_PC (scp));
SCHEME_OBJECT primitive = (Registers[REGBLOCK_PRIMITIVE]);
SCHEME_OBJECT * block_addr;
- int index;
+ unsigned int index;
SCHEME_OBJECT * new_sp = 0;
struct trap_recovery_info recovery_info;
new_sp = sp_register;
SET_RECOVERY_INFO
(STATE_UTILITY,
- (LONG_TO_UNSIGNED_FIXNUM (index)),
+ (ULONG_TO_FIXNUM (index)),
UNSPECIFIC);
break;
Free = ((SCHEME_OBJECT *) (SIGCONTEXT_RFREE (scp)));
SET_RECOVERY_INFO
(STATE_BUILTIN,
- (LONG_TO_UNSIGNED_FIXNUM (index)),
+ (ULONG_TO_FIXNUM (index)),
UNSPECIFIC);
break;
signal_name =
((signo != 0)
- ? (char_pointer_to_string ((unsigned char *) (find_signal_name (signo))))
+ ? (char_pointer_to_string (find_signal_name (signo)))
: SHARP_F);
if (Free > MemTop)
}
return
(cons ((ulong_to_integer (code)),
- ((name == 0)
- ? SHARP_F
- : (char_pointer_to_string ((unsigned char *) name)))));
+ ((name == 0) ? SHARP_F : (char_pointer_to_string (name)))));
}
\f
static enum pc_location
/* -*-C-*-
-$Id: x11base.c,v 1.90 2007/01/05 21:19:25 cph Exp $
+$Id: x11base.c,v 1.91 2007/01/12 03:45:55 cph Exp $
Copyright (C) 1986, 1987, 1988, 1989, 1990, 1991, 1992, 1993, 1994,
1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
(XGetDefault
((XD_DISPLAY (x_display_arg (1))), (STRING_ARG (2)), (STRING_ARG (3))));
PRIMITIVE_RETURN
- ((result == 0) ? SHARP_F
- : (char_pointer_to_string ((unsigned char *) result)));
+ ((result == 0) ? SHARP_F : (char_pointer_to_string (result)));
}
}
(allocate_marked_vector (TC_VECTOR, actual_count, false));
unsigned int i;
for (i = 0; (i < actual_count); i += 1)
- VECTOR_SET (result, i,
- (char_pointer_to_string ((unsigned char *) (names[i]))));
+ VECTOR_SET (result, i, (char_pointer_to_string (names[i])));
XFreeFontNames (names);
PRIMITIVE_RETURN (result);
}
unsigned char error_code = (x_error_code (display));
SCHEME_OBJECT result
= ((error_code == 0)
- ? (char_pointer_to_string ((unsigned char *) name))
+ ? (char_pointer_to_string (name))
: (ulong_to_integer (error_code)));
if (name != 0)
XFree (name);