librep r2912 - trunk/src



Author: chrisb
Date: Tue Aug  5 18:54:59 2008
New Revision: 2912
URL: http://svn.gnome.org/viewvc/librep?rev=2912&view=rev

Log:
revert last commit. commit code-cleanup when it's finished


Modified:
   trunk/src/continuations.c
   trunk/src/find.c
   trunk/src/lispcmds.c
   trunk/src/lispmach.h
   trunk/src/macros.c
   trunk/src/md5.h
   trunk/src/message.c
   trunk/src/misc.c
   trunk/src/numbers.c
   trunk/src/rep-remote.c
   trunk/src/rep_lisp.h
   trunk/src/rep_subrs.h
   trunk/src/repint.h
   trunk/src/repint_subrs.h
   trunk/src/sockets.c
   trunk/src/streams.c
   trunk/src/structures.c
   trunk/src/symbols.c
   trunk/src/timers.c
   trunk/src/unix_files.c
   trunk/src/unix_main.c
   trunk/src/values.c

Modified: trunk/src/continuations.c
==============================================================================
--- trunk/src/continuations.c	(original)
+++ trunk/src/continuations.c	Tue Aug  5 18:54:59 2008
@@ -192,8 +192,8 @@
     rep_thread *head, *tail;
     rep_thread *susp_head, *susp_tail;
     short depth;
-    unsigned int closed : 1;
-    unsigned int targeted : 1;		/* may contain continuations */
+    u_int closed : 1;
+    u_int targeted : 1;		/* may contain continuations */
 };
 
 /* List of all currently active barriers (on the current stack) */
@@ -737,7 +737,7 @@
 	save_stack (c);
 
 	DB (("call/cc: saved %p; real_size=%lu (%u)\n",
-	     c, (unsigned long) c->real_size, rep_stack_bottom - c->stack_top));
+	     c, (u_long) c->real_size, rep_stack_bottom - c->stack_top));
 
 	ret = callback (c, data);
 
@@ -1113,7 +1113,7 @@
 }
 
 static void
-thread_suspend (rep_thread *t, unsigned long msecs,
+thread_suspend (rep_thread *t, u_long msecs,
 		rep_bool (*poll)(rep_thread *t, void *arg), void *poll_arg)
 {
     rep_barrier *root = t->cont->root;
@@ -1148,7 +1148,7 @@
 	thread_invoke ();
 }
 
-unsigned long
+u_long
 rep_max_sleep_for (void)
 {
     rep_barrier *root = root_barrier;
@@ -1404,7 +1404,7 @@
     return rep_signal_arg_error (cont, 1);
 }
 
-unsigned long
+u_long
 rep_max_sleep_for (void)
 {
     return UINT_MAX;

Modified: trunk/src/find.c
==============================================================================
--- trunk/src/find.c	(original)
+++ trunk/src/find.c	Tue Aug  5 18:54:59 2008
@@ -132,7 +132,7 @@
 static void
 mark_cached_regexps(void)
 {
-    unsigned long total = 0;
+    u_long total = 0;
     struct cached_regexp *x = cached_regexps, *xp = 0;
     while(x != 0 && total < regexp_cache_limit)
     {

Modified: trunk/src/lispcmds.c
==============================================================================
--- trunk/src/lispcmds.c	(original)
+++ trunk/src/lispcmds.c	Tue Aug  5 18:54:59 2008
@@ -875,7 +875,7 @@
 	if(rep_INT(index) < rep_STRING_LEN(array))
 	{
 	    rep_DECLARE3(new, rep_INTP);
-	    ((unsigned char *)rep_STR(array))[rep_INT(index)] = (unsigned char)rep_INT(new);
+	    ((u_char *)rep_STR(array))[rep_INT(index)] = (u_char)rep_INT(new);
 	    rep_string_modified (array);
 	    return(new);
 	}
@@ -909,7 +909,7 @@
     if(rep_STRINGP(array))
     {
 	if(rep_INT(index) < rep_STRING_LEN(array))
-	    return(rep_MAKE_INT(((unsigned char *)rep_STR(array))[rep_INT(index)]));
+	    return(rep_MAKE_INT(((u_char *)rep_STR(array))[rep_INT(index)]));
     }
     else if(rep_VECTORP(array) || rep_COMPILEDP(array))
     {
@@ -976,7 +976,7 @@
 a character or a list or vector of characters.
 ::end:: */
 {
-    unsigned int length;
+    u_int length;
     repv elt, string;
     char *ptr;
     int i;

Modified: trunk/src/lispmach.h
==============================================================================
--- trunk/src/lispmach.h	(original)
+++ trunk/src/lispmach.h	Tue Aug  5 18:54:59 2008
@@ -572,7 +572,7 @@
     
     /* Jump to this label when tail-calling */
 again: {
-    register unsigned char *pc PC_REG;
+    register u_char *pc PC_REG;
     register repv *stackp SP_REG;
     register repv *bindp BP_REG;
     register repv *slotp SLOTS_REG;
@@ -593,7 +593,7 @@
     bindp = bindstack;
     slotp = slots;
     impurity = 0;
-    pc = (unsigned char *) rep_STR(code);
+    pc = (u_char *) rep_STR(code);
 
     /* Start of the VM fetch-execute sequence. */
     {
@@ -601,7 +601,7 @@
 	static void *cfa__[256] = { JUMP_TABLE };
 	register void **cfa CFA_REG = cfa__;
 #endif
-	unsigned int arg;
+	u_int arg;
 	repv tmp, tmp2;
 
 	BEGIN_DISPATCH
@@ -2178,7 +2178,7 @@
 
 	BEGIN_INSN (OP_JMP)
 	do_jmp:
-	    pc = (unsigned char *) rep_STR(code) + ((pc[0] << ARG_SHIFT) | pc[1]);
+	    pc = (u_char *) rep_STR(code) + ((pc[0] << ARG_SHIFT) | pc[1]);
 
 	    /* Test if an interrupt occurred... */
 	    rep_TEST_INT;
@@ -2247,7 +2247,7 @@
 		    RELOAD;
 		    PUSH(rep_throw_value);
 		    rep_throw_value = rep_NULL;
-		    pc = (unsigned char *) rep_STR(code) + rep_INT(rep_CAR(item));
+		    pc = (u_char *) rep_STR(code) + rep_INT(rep_CAR(item));
 		    impurity--;
 		    SAFE_NEXT;
 		}

Modified: trunk/src/macros.c
==============================================================================
--- trunk/src/macros.c	(original)
+++ trunk/src/macros.c	Tue Aug  5 18:54:59 2008
@@ -179,7 +179,7 @@
     if (form != rep_NULL)
     {
 	/* Cache for future use */
-	unsigned int hash = HIST_HASH_FN(input);
+	u_int hash = HIST_HASH_FN(input);
 	history[hash] = Fcons (Fcons (input, form), history[hash]);
     }
 

Modified: trunk/src/md5.h
==============================================================================
--- trunk/src/md5.h	(original)
+++ trunk/src/md5.h	Tue Aug  5 18:54:59 2008
@@ -36,7 +36,7 @@
 
 #ifdef _LIBC
 # include <sys/types.h>
-typedef unsigned int32_t md5_uint32;
+typedef u_int32_t md5_uint32;
 #else
 # if defined __STDC__ && __STDC__
 #  define UINT_MAX_32_BITS 4294967295U

Modified: trunk/src/message.c
==============================================================================
--- trunk/src/message.c	(original)
+++ trunk/src/message.c	Tue Aug  5 18:54:59 2008
@@ -36,7 +36,7 @@
     {
 	int len;
 	char *msg;
-	unsigned long *old_lenp;
+	u_long *old_lenp;
 	char **old_msgp;
 
     case rep_messagen:
@@ -60,7 +60,7 @@
 
     case rep_save_message:
 	old_msgp = (char **)va_arg(args, char **);
-	old_lenp = (unsigned long *)va_arg(args, unsigned long *);
+	old_lenp = (u_long *)va_arg(args, u_long *);
 	*old_msgp = ""; *old_lenp = 0;
 	break;
 
@@ -72,7 +72,7 @@
 	break;
 
     case rep_reset_message: 		/* (void) */
-    case rep_restore_message:		/* (char *msg, unsigned long len) */
+    case rep_restore_message:		/* (char *msg, u_long len) */
     case rep_redisplay_message:		/* (void) */
 	break;
     }

Modified: trunk/src/misc.c
==============================================================================
--- trunk/src/misc.c	(original)
+++ trunk/src/misc.c	Tue Aug  5 18:54:59 2008
@@ -223,7 +223,7 @@
 number of seconds since the start of the day (universal time).
 ::end:: */
 {
-    unsigned long time = rep_time();
+    u_long time = rep_time();
     return rep_MAKE_TIME(time);
 }
 
@@ -246,7 +246,7 @@
 TIMESTAMP is altered. Returns TIMESTAMP.
 ::end:: */
 {
-    unsigned long timestamp;
+    u_long timestamp;
     rep_DECLARE1(time, rep_TIMEP);
     timestamp = rep_GET_TIME(time);
     rep_CAR(time) = rep_MAKE_INT(timestamp / 86400);
@@ -298,7 +298,7 @@
 Returns t when TIME-STAMP1 refers to a later time than TIME-STAMP2.
 ::end:: */
 {
-    unsigned long time1, time2;
+    u_long time1, time2;
     rep_DECLARE1(t1, rep_TIMEP);
     rep_DECLARE2(t2, rep_TIMEP);
     time1 = rep_GET_TIME(t1);
@@ -422,18 +422,18 @@
 ::end:: */
 {
     int tablen, slen;
-    register unsigned char *str;
+    register u_char *str;
     rep_DECLARE1(string, rep_STRINGP);
     rep_DECLARE2(table, rep_STRINGP);
     tablen = rep_STRING_LEN(table);
     if(!rep_STRING_WRITABLE_P(string))
 	return(rep_signal_arg_error(string, 1));
-    str = (unsigned char *)rep_STR(string);
+    str = (u_char *)rep_STR(string);
     slen = rep_STRING_LEN(string);
     while(slen-- > 0)
     {
-	register unsigned char c = *str;
-	*str++ = (c < tablen) ? ((unsigned char *)rep_STR(table))[c] : c;
+	register u_char c = *str;
+	*str++ = (c < tablen) ? ((u_char *)rep_STR(table))[c] : c;
     }
     rep_string_modified (string);
     return(string);
@@ -648,8 +648,8 @@
 
 	for(i = 0; i < 256; i++)
 	{
-	    ((unsigned char *)rep_STR(up))[i] = toupper(i);
-	    ((unsigned char *)rep_STR(down))[i] = tolower(i);
+	    ((u_char *)rep_STR(up))[i] = toupper(i);
+	    ((u_char *)rep_STR(down))[i] = tolower(i);
 	}
 	rep_STR(up)[256] = 0;
 	rep_STR(down)[256] = 0;
@@ -664,7 +664,7 @@
 	repv flatten = rep_make_string (12);
 
 	for(i = 0; i < 10; i++)
-	    ((unsigned char *)rep_STR(flatten))[i] = i;
+	    ((u_char *)rep_STR(flatten))[i] = i;
 	rep_STR(flatten)[10] = ' ';
 	rep_STR(flatten)[11] = 0;
 

Modified: trunk/src/numbers.c
==============================================================================
--- trunk/src/numbers.c	(original)
+++ trunk/src/numbers.c	Tue Aug  5 18:54:59 2008
@@ -528,7 +528,7 @@
 }
 
 repv
-rep_make_long_uint (unsigned long in)
+rep_make_long_uint (u_long in)
 {
     if (in < rep_LISP_MAX_INT)
 	return rep_MAKE_INT (in);
@@ -561,7 +561,7 @@
     }
 }
 
-unsigned long
+u_long
 rep_get_long_uint (repv in)
 {
     if (rep_INTP (in))
@@ -579,11 +579,11 @@
 
 #ifdef HAVE_GMP
 	case rep_NUMBER_RATIONAL:
-	    return (unsigned long) mpq_get_d (rep_NUMBER(in,q));
+	    return (u_long) mpq_get_d (rep_NUMBER(in,q));
 #endif
 
 	case rep_NUMBER_FLOAT:
-	    return (unsigned long) rep_NUMBER(in,f);
+	    return (u_long) rep_NUMBER(in,f);
 	}
     }
     else if (rep_CONSP (in)
@@ -639,8 +639,8 @@
 #ifdef HAVE_GMP
 	int sign = (in < 0) ? -1 : 1;
 	unsigned rep_long_long uin = (sign < 0) ? -in : in;
-	unsigned long bottom = (unsigned long) uin;
-	unsigned long top = (unsigned long) (uin >> (CHAR_BIT * sizeof (long)));
+	u_long bottom = (u_long) uin;
+	u_long top = (u_long) (uin >> (CHAR_BIT * sizeof (long)));
 	rep_number_z *z = make_number (rep_NUMBER_BIGNUM);
 	mpz_init_set_ui (z->z, bottom);
 	if (top != 0)
@@ -861,7 +861,7 @@
 
 #ifndef HAVE_GMP
 static rep_bool
-parse_integer_to_float (char *buf, unsigned int len, unsigned int radix,
+parse_integer_to_float (char *buf, u_int len, u_int radix,
 			int sign, double *output)
 {
     double value = 0.0;
@@ -901,7 +901,7 @@
     } while (0)
 
 repv
-rep_parse_number (char *buf, unsigned int len, unsigned int radix, int sign, unsigned int type)
+rep_parse_number (char *buf, u_int len, u_int radix, int sign, u_int type)
 {
     if (len == 0)
 	goto error;
@@ -915,7 +915,7 @@
 	rep_number_f *f;
 	char *tem, *copy, *old_locale;
 	double d;
-	unsigned int bits;
+	u_int bits;
 
     case 0:
 	switch (radix)
@@ -1529,7 +1529,7 @@
 	else
 	{
 #ifdef HAVE_GMP
-	    unsigned long uy = (rep_INT (y) < 0 ? - rep_INT (y) : rep_INT (y));
+	    u_long uy = (rep_INT (y) < 0 ? - rep_INT (y) : rep_INT (y));
 	    rep_number_q *q = make_number (rep_NUMBER_RATIONAL);
 	    mpq_init (q->q);
 	    mpq_set_si (q->q, rep_INT (x), uy);
@@ -2932,7 +2932,7 @@
 }
 
 static void
-random_seed (unsigned long seed)
+random_seed (u_long seed)
 {
     ensure_random_state ();
     gmp_randseed_ui (random_state, seed);
@@ -2969,7 +2969,7 @@
 #endif
 
 static void
-random_seed (unsigned long seed)
+random_seed (u_long seed)
 {
     srand (seed);
 }
@@ -3023,7 +3023,7 @@
 
     if (arg == Qt)
     {
-	unsigned long seed = time (0);
+	u_long seed = time (0);
 	seed = (seed << 8) | (rep_getpid () & 0xff);
 	random_seed (seed);
 	return Qt;

Modified: trunk/src/rep-remote.c
==============================================================================
--- trunk/src/rep-remote.c	(original)
+++ trunk/src/rep-remote.c	Tue Aug  5 18:54:59 2008
@@ -205,7 +205,7 @@
 }
 
 static char *
-output_mode_string (char *out, unsigned long perms)
+output_mode_string (char *out, u_long perms)
 {
     int i;
     char c = '-';
@@ -219,7 +219,7 @@
     out[0] = c;
     for(i = 0; i < 3; i++)
     {
-	unsigned long xperms = perms >> ((2 - i) * 3);
+	u_long xperms = perms >> ((2 - i) * 3);
 	if(xperms & 4)
 	    out[1+i*3] = 'r';
 	if(xperms & 2)
@@ -251,7 +251,7 @@
 	FILE *fh = fopen (argv[0], "r");
 	if (fh != 0)
 	{
-	    unsigned long size = st.st_size;
+	    u_long size = st.st_size;
 	    send_success ();
 	    send_long (size);
 	    while (size > 0)

Modified: trunk/src/rep_lisp.h
==============================================================================
--- trunk/src/rep_lisp.h	(original)
+++ trunk/src/rep_lisp.h	Tue Aug  5 18:54:59 2008
@@ -238,7 +238,7 @@
 typedef struct rep_type_struct {
     struct rep_type_struct *next;
     char *name;
-    unsigned int code;
+    u_int code;
 
     /* Compares two values, rc is similar to strcmp() */
     int (*compare)(repv val1, repv val2);

Modified: trunk/src/rep_subrs.h
==============================================================================
--- trunk/src/rep_subrs.h	(original)
+++ trunk/src/rep_subrs.h	Tue Aug  5 18:54:59 2008
@@ -47,7 +47,7 @@
 extern repv Fthread_forbid (void);
 extern repv Fthread_permit (void);
 extern repv Fthread_name (repv th);
-extern unsigned long rep_max_sleep_for (void);
+extern u_long rep_max_sleep_for (void);
 
 /* from datums.c */
 extern repv Fmake_datum (repv, repv);
@@ -347,9 +347,9 @@
 extern repv Fchar_downcase(repv);
 
 /* from numbers.c */
-extern repv rep_make_long_uint (unsigned long in);
+extern repv rep_make_long_uint (u_long in);
 extern repv rep_make_long_int (long in);
-extern unsigned long rep_get_long_uint (repv in);
+extern u_long rep_get_long_uint (repv in);
 extern long rep_get_long_int (repv in);
 extern repv rep_make_longlong_int (rep_long_long in);
 extern rep_long_long rep_get_longlong_int (repv in);
@@ -510,7 +510,7 @@
 extern int rep_guardian_type;
 extern repv rep_box_pointer (void *p);
 void *rep_unbox_pointer (repv v);
-extern void rep_register_type(unsigned int code, char *name,
+extern void rep_register_type(u_int code, char *name,
 			      int (*compare)(repv, repv),
 			      void (*princ)(repv, repv),
 			      void (*print)(repv, repv),
@@ -521,7 +521,7 @@
 			      int (*putc)(repv, int),
 			      int (*puts)(repv, void *, int, rep_bool),
 			      repv (*bind)(repv), void (*unbind)(repv));
-extern unsigned int rep_register_new_type(char *name,
+extern u_int rep_register_new_type(char *name,
 				   int (*compare)(repv, repv),
 				   void (*princ)(repv, repv),
 				   void (*print)(repv, repv),
@@ -534,7 +534,7 @@
 				   int (*puts)(repv, void *, int, rep_bool),
 				   repv (*bind)(repv),
 				   void (*unbind)(repv));
-extern rep_type *rep_get_data_type(unsigned int code);
+extern rep_type *rep_get_data_type(u_int code);
 extern int rep_value_cmp(repv, repv);
 extern void rep_princ_val(repv, repv);
 extern void rep_print_val(repv, repv);
@@ -575,12 +575,12 @@
 
 /* from unix_files.c */
 extern repv rep_lookup_errno(void);
-extern unsigned long rep_file_length(repv file);
+extern u_long rep_file_length(repv file);
 
 /* from unix_main.c */
-extern unsigned long rep_time(void);
+extern u_long rep_time(void);
 extern rep_long_long rep_utime (void);
-extern unsigned long rep_getpid (void);
+extern u_long rep_getpid (void);
 extern void (*rep_register_input_fd_fun)(int fd, void (*callback)(int fd));
 extern void (*rep_deregister_input_fd_fun)(int fd);
 extern void rep_add_event_loop_callback (rep_bool (*callback)(void));
@@ -594,18 +594,18 @@
 extern void rep_unix_set_fd_cloexec(int fd);
 extern void rep_sig_restart(int sig, rep_bool flag);
 extern repv rep_event_loop(void);
-extern repv rep_sit_for(unsigned long timeout_msecs);
-extern repv rep_accept_input_for_callbacks (unsigned long timeout_msecs,
+extern repv rep_sit_for(u_long timeout_msecs);
+extern repv rep_accept_input_for_callbacks (u_long timeout_msecs,
 					    int ncallbacks,
 					    void (**callbacks)(int));
-extern repv rep_accept_input_for_fds (unsigned long timeout_msecs,
+extern repv rep_accept_input_for_fds (u_long timeout_msecs,
 				      int nfds, int *fds);
-extern repv rep_accept_input(unsigned long timeout_msecs, void (*callback)(int));
+extern repv rep_accept_input(u_long timeout_msecs, void (*callback)(int));
 extern rep_bool rep_poll_input(int fd);
 
 #ifdef DEBUG_SYS_ALLOC
-extern void *rep_alloc(unsigned int length);
-extern void *rep_realloc(void *ptr, unsigned int length);
+extern void *rep_alloc(u_int length);
+extern void *rep_realloc(void *ptr, u_int length);
 extern void rep_free(void *ptr);
 extern void rep_print_allocations(void);
 #else
@@ -616,7 +616,7 @@
 #endif
 
 extern void (*rep_redisplay_fun)(void);
-extern int (*rep_wait_for_input_fun)(unsigned long timeout_msecs);
+extern int (*rep_wait_for_input_fun)(fd_set *inputs, u_long timeout_msecs);
 extern int rep_input_timeout_secs;
 extern repv Funix_print_allocations(void);
 

Modified: trunk/src/repint.h
==============================================================================
--- trunk/src/repint.h	(original)
+++ trunk/src/repint.h	Tue Aug  5 18:54:59 2008
@@ -104,8 +104,8 @@
     rep_struct_node *next;
     repv symbol;
     repv binding;
-    unsigned int is_constant : 1;
-    unsigned int is_exported : 1;
+    u_int is_constant : 1;
+    u_int is_exported : 1;
 };
 
 /* structure encapsulating a single namespace */

Modified: trunk/src/repint_subrs.h
==============================================================================
--- trunk/src/repint_subrs.h	(original)
+++ trunk/src/repint_subrs.h	Tue Aug  5 18:54:59 2008
@@ -97,8 +97,8 @@
 extern void rep_misc_init(void);
 
 /* from numbers.c */
-extern repv rep_parse_number (char *buf, unsigned int len, unsigned int radix,
-			      int sign, unsigned int type);
+extern repv rep_parse_number (char *buf, u_int len, u_int radix,
+			      int sign, u_int type);
 extern void rep_numbers_init (void);
 extern repv Fplus(int, repv *);
 extern repv Fminus(int, repv *);

Modified: trunk/src/sockets.c
==============================================================================
--- trunk/src/sockets.c	(original)
+++ trunk/src/sockets.c	Tue Aug  5 18:54:59 2008
@@ -654,10 +654,10 @@
 }
 
 /* Returns the number of bytes actually written. */
-static unsigned int
-blocking_write (rep_socket *s, char *data, unsigned int bytes)
+static u_int
+blocking_write (rep_socket *s, char *data, u_int bytes)
 {
-    unsigned int done = 0;
+    u_int done = 0;
 
     if (!SOCKET_IS_ACTIVE (s))
     {

Modified: trunk/src/streams.c
==============================================================================
--- trunk/src/streams.c	(original)
+++ trunk/src/streams.c	Tue Aug  5 18:54:59 2008
@@ -92,7 +92,7 @@
 	{
 	    if (rep_INT(res) < rep_STRING_LEN(rep_CDR(stream)))
 	    {
-		c = (int) ((unsigned char *)rep_STR(rep_CDR(stream)))[rep_INT(res)];
+		c = (int) ((u_char *)rep_STR(rep_CDR(stream)))[rep_INT(res)];
 		rep_CAR(stream) = rep_MAKE_INT(rep_INT(res) + 1);
 	    }
 	    else
@@ -244,7 +244,7 @@
 		rep_CDR(stream) = rep_MAKE_INT (newlen);
 		args = new;
 	    }
-	    ((unsigned char *)rep_STR (args))[len] = (unsigned char) c;
+	    ((u_char *)rep_STR (args))[len] = (u_char) c;
 	    rep_STR (args)[len+1] = 0;
 	    rep_set_string_len (args, len + 1);
 	    rc = 1;

Modified: trunk/src/structures.c
==============================================================================
--- trunk/src/structures.c	(original)
+++ trunk/src/structures.c	Tue Aug  5 18:54:59 2008
@@ -186,7 +186,7 @@
 static inline void
 enter_cache (rep_struct *s, rep_struct_node *binding)
 {
-    unsigned int hash = CACHE_HASH (binding->symbol);
+    u_int hash = CACHE_HASH (binding->symbol);
     if (ref_cache[hash].s != 0)
     {
 #ifdef DEBUG
@@ -203,7 +203,7 @@
 static inline rep_struct_node *
 lookup_cache (rep_struct *s, repv var)
 {
-    unsigned int hash = CACHE_HASH (var);
+    u_int hash = CACHE_HASH (var);
     if (ref_cache[hash].s == s && ref_cache[hash].n->symbol == var)
     {
 #ifdef DEBUG
@@ -223,7 +223,7 @@
 static inline void
 cache_invalidate_symbol (repv symbol)
 {
-    unsigned int hash = CACHE_HASH (symbol);
+    u_int hash = CACHE_HASH (symbol);
     if (ref_cache[hash].s != 0 && ref_cache[hash].n->symbol == symbol)
 	ref_cache[hash].s = 0;
 }
@@ -268,7 +268,7 @@
 static inline void
 enter_cache (rep_struct *s, rep_struct_node *binding)
 {
-    unsigned int hash = CACHE_HASH (binding->symbol);
+    u_int hash = CACHE_HASH (binding->symbol);
     int i, oldest_i, oldest_age = INT_MAX;
     for (i = 0; i < CACHE_ASSOC; i++)
     {
@@ -301,7 +301,7 @@
 static inline rep_struct_node *
 lookup_cache (rep_struct *s, repv var)
 {
-    unsigned int hash = CACHE_HASH (var);
+    u_int hash = CACHE_HASH (var);
     int i;
     for (i = 0; i < CACHE_ASSOC; i++)
     {
@@ -323,7 +323,7 @@
 static inline void
 cache_invalidate_symbol (repv symbol)
 {
-    unsigned int hash = CACHE_HASH (symbol);
+    u_int hash = CACHE_HASH (symbol);
     int i;
     for (i = 0; i < CACHE_ASSOC; i++)
     {

Modified: trunk/src/symbols.c
==============================================================================
--- trunk/src/symbols.c	(original)
+++ trunk/src/symbols.c	Tue Aug  5 18:54:59 2008
@@ -226,10 +226,10 @@
 	abort();
 }
 
-static inline unsigned long
+static inline u_long
 hash(char *str)
 {
-    register unsigned long value = 0;
+    register u_long value = 0;
     while(*str)
 	value = (value * 33) + *str++;
     return(value);

Modified: trunk/src/timers.c
==============================================================================
--- trunk/src/timers.c	(original)
+++ trunk/src/timers.c	Tue Aug  5 18:54:59 2008
@@ -63,8 +63,8 @@
     repv function;
     long secs, msecs;
     long rel_secs, rel_msecs;
-    unsigned int fired : 1;
-    unsigned int deleted : 1;
+    u_int fired : 1;
+    u_int deleted : 1;
 } Lisp_Timer;
 
 /* List of all allocated timer objects, linked through next_alloc field */

Modified: trunk/src/unix_files.c
==============================================================================
--- trunk/src/unix_files.c	(original)
+++ trunk/src/unix_files.c	Tue Aug  5 18:54:59 2008
@@ -85,7 +85,7 @@
 	return 0;
 }
 
-unsigned long
+u_long
 rep_file_length(repv file)
 {
     struct stat *st = stat_file(file);
@@ -466,7 +466,7 @@
     repv string = Fmake_string(rep_MAKE_INT(10), rep_MAKE_INT('-'));
     if(st != 0 && string && rep_STRINGP(string))
     {
-	unsigned long perms = st->st_mode;
+	u_long perms = st->st_mode;
 	int i;
 	char c = '-';
 	if(S_ISDIR(perms))	    c = 'd';
@@ -478,7 +478,7 @@
 	rep_STR(string)[0] = c;
 	for(i = 0; i < 3; i++)
 	{
-	    unsigned long xperms = perms >> ((2 - i) * 3);
+	    u_long xperms = perms >> ((2 - i) * 3);
 	    if(xperms & 4)
 		rep_STR(string)[1+i*3] = 'r';
 	    if(xperms & 2)

Modified: trunk/src/unix_main.c
==============================================================================
--- trunk/src/unix_main.c	(original)
+++ trunk/src/unix_main.c	Tue Aug  5 18:54:59 2008
@@ -60,7 +60,7 @@
 #endif
 
 void (*rep_redisplay_fun)(void);
-int (*rep_wait_for_input_fun)(fd_set *inputs, unsigned long timeout_msecs);
+int (*rep_wait_for_input_fun)(fd_set *inputs, u_long timeout_msecs);
 int rep_input_timeout_secs = 1;
 
 
@@ -82,13 +82,13 @@
 #endif
 }
 
-unsigned long
+u_long
 rep_getpid (void)
 {
     return getpid ();
 }
 
-unsigned long
+u_long
 rep_time(void)
 {
     return time(0);
@@ -400,7 +400,7 @@
    actual fds defined by the fdset INPUTS. Return zero if the timeout
    was reached. */
 static int
-wait_for_input(fd_set *inputs, unsigned long timeout_msecs)
+wait_for_input(fd_set *inputs, u_long timeout_msecs)
 {
     fd_set copy;
     int ready = -1;
@@ -440,10 +440,10 @@
        interrupt between each call to select. */
     do {
 	struct timeval timeout;
-	unsigned long max_sleep = rep_max_sleep_for ();
-	unsigned long this_timeout_msecs = MIN (timeout_msecs,
+	u_long max_sleep = rep_max_sleep_for ();
+	u_long this_timeout_msecs = MIN (timeout_msecs,
 					 rep_input_timeout_secs * 1000);
-	unsigned long actual_timeout_msecs = MIN (this_timeout_msecs, max_sleep);
+	u_long actual_timeout_msecs = MIN (this_timeout_msecs, max_sleep);
 
 	timeout.tv_sec = actual_timeout_msecs / 1000;
 	timeout.tv_usec = (actual_timeout_msecs % 1000) * 1000;
@@ -571,7 +571,7 @@
 }
 
 repv
-rep_sit_for(unsigned long timeout_msecs)
+rep_sit_for(u_long timeout_msecs)
 {
     fd_set copy;
     int ready;
@@ -589,7 +589,7 @@
    invoke any callback function except CALLBACKS. Return Qnil if any
    input was serviced, Qt if the timeout expired, rep_NULL for an error. */
 repv
-rep_accept_input_for_callbacks (unsigned long timeout_msecs, int ncallbacks,
+rep_accept_input_for_callbacks (u_long timeout_msecs, int ncallbacks,
 				void (**callbacks)(int))
 {
     fd_set copy;
@@ -623,7 +623,7 @@
    Return Qnil if any input was serviced, Qt if the timeout expired, rep_NULL
    for an error. */
 repv
-rep_accept_input_for_fds (unsigned long timeout_msecs, int nfds, int *fds)
+rep_accept_input_for_fds (u_long timeout_msecs, int nfds, int *fds)
 {
     fd_set copy;
     int ready, i;
@@ -644,7 +644,7 @@
 
 /* obsolete, for compatibility only */
 repv
-rep_accept_input(unsigned long timeout_msecs, void (*callback)(int))
+rep_accept_input(u_long timeout_msecs, void (*callback)(int))
 {
     return rep_accept_input_for_callbacks (timeout_msecs, 1, &callback);
 }
@@ -674,7 +674,7 @@
 static struct alloc_data *allocations;
 
 void *
-rep_alloc(unsigned int length)
+rep_alloc(u_int length)
 {
     void *mem;
     length += SIZEOF_ALLOC_DATA;
@@ -696,7 +696,7 @@
 }
 
 void *
-rep_realloc(void *ptr, unsigned int length)
+rep_realloc(void *ptr, u_int length)
 {
     void *mem;
     length += SIZEOF_ALLOC_DATA;

Modified: trunk/src/values.c
==============================================================================
--- trunk/src/values.c	(original)
+++ trunk/src/values.c	Tue Aug  5 18:54:59 2008
@@ -77,11 +77,11 @@
 #define TYPE_HASH_SIZE 32
 #define TYPE_HASH(type) (((type) >> 1) & (TYPE_HASH_SIZE-1))
 
-static unsigned int next_free_type = 0;
+static u_int next_free_type = 0;
 static rep_type *data_types[TYPE_HASH_SIZE];
 
 void
-rep_register_type(unsigned int code, char *name,
+rep_register_type(u_int code, char *name,
 		  int (*compare)(repv, repv),
 		  void (*princ)(repv, repv),
 		  void (*print)(repv, repv),
@@ -119,7 +119,7 @@
     data_types[TYPE_HASH(code)] = t;
 }
 
-unsigned int
+u_int
 rep_register_new_type(char *name,
 		      int (*compare)(repv, repv),
 		      void (*princ)(repv, repv),
@@ -134,7 +134,7 @@
 		      repv (*bind)(repv),
 		      void (*unbind)(repv))
 {
-    unsigned int code;
+    u_int code;
     assert(next_free_type != 256);
     code = (next_free_type++ << rep_CELL16_TYPE_SHIFT) | rep_CELL_IS_8 | rep_CELL_IS_16;
     rep_register_type(code, name, compare, princ, print,
@@ -144,7 +144,7 @@
 }
 
 rep_type *
-rep_get_data_type(unsigned int code)
+rep_get_data_type(u_int code)
 {
     rep_type *t = data_types[TYPE_HASH(code)];
     while (t != 0 && t->code != code)



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]