/* -*-C-*-
-$Id: daemon.c,v 9.33 2003/02/14 18:28:18 cph Exp $
+$Id: daemon.c,v 9.34 2004/11/21 04:17:22 cph Exp $
Copyright (c) 1987-1999 Massachusetts Institute of Technology
SCHEME_OBJECT file_list = (ARG_REF (1));
SCHEME_OBJECT * smash = (PAIR_CDR_LOC (file_list));
SCHEME_OBJECT cell = (*smash);
- while (cell != EMPTY_LIST)
+ while (!EMPTY_LIST_P (cell))
{
SCHEME_OBJECT weak_cell = (FAST_PAIR_CAR (cell));
if ((FAST_PAIR_CAR (weak_cell)) == SHARP_F)
FAST_MEMORY_SET (hash_table,
hash_address,
(MAKE_POINTER_OBJECT (TC_LIST, new_pair)));
- return;
}
static void
{
fast SCHEME_OBJECT weak_pair;
- while (*bucket != EMPTY_LIST)
+ while (!EMPTY_LIST_P (*bucket))
{
weak_pair = (FAST_PAIR_CAR (*bucket));
if ((FAST_PAIR_CAR (weak_pair)) != SHARP_F)
}
bucket = (PAIR_CDR_LOC (*bucket));
}
- return;
}
static void
{
fast SCHEME_OBJECT weak_pair;
- while ((*bucket) != EMPTY_LIST)
+ while (!EMPTY_LIST_P (*bucket))
{
weak_pair = (FAST_PAIR_CAR (*bucket));
if ((FAST_PAIR_CAR (weak_pair)) != SHARP_F)
else
*bucket = (FAST_PAIR_CDR (*bucket));
}
- return;
}
\f
/* (REHASH unhash-table hash-table)
/* -*-C-*-
-$Id: debug.c,v 9.57 2003/02/14 18:28:18 cph Exp $
+$Id: debug.c,v 9.58 2004/11/21 04:17:29 cph Exp $
Copyright (c) 1987-2002 Massachusetts Institute of Technology
pair = (PAIR_CDR (pair));
count += 1;
}
- if (pair != EMPTY_LIST)
+ if (!EMPTY_LIST_P (pair))
{
if (count == MAX_LIST_PRINT)
outf (stream, " ...");
Temp_Address = (OBJECT_DATUM (Expr));
handled_p = false;
- if (Expr == EMPTY_LIST) { outf (stream, "()"); return; }
+ if (EMPTY_LIST_P (Expr)) { outf (stream, "()"); return; }
else if (Expr == SHARP_F) { outf (stream, "#F"); return; }
else if (Expr == SHARP_T) { outf (stream, "#T"); return; }
else if (Expr == UNSPECIFIC) { outf (stream, "[UNSPECIFIC]"); return; }
/* -*-C-*-
-$Id: foreign.c,v 1.5 2003/02/14 18:28:19 cph Exp $
+$Id: foreign.c,v 1.6 2004/11/21 04:17:37 cph Exp $
Copyright (c) 1992, 1999, 2000 Massachusetts Institute of Technology
PTR func_ptr;
LOAD_INFO * load_info;
- load_info = ((ARG_REF (2) == EMPTY_LIST) ?
+ load_info = ((EMPTY_LIST_P (ARG_REF (2))) ?
((LOAD_INFO *) NULL) :
((LOAD_INFO *) handle_to_foreign_pointer (arg_handle (2))));
/* -*-C-*-
-$Id: hooks.c,v 9.65 2003/02/14 18:28:19 cph Exp $
+$Id: hooks.c,v 9.66 2004/11/21 04:17:44 cph Exp $
Copyright (c) 1988-2002 Massachusetts Institute of Technology
number_of_args += 2;
}
}
- if (scan_list != EMPTY_LIST)
+ if (!EMPTY_LIST_P (scan_list))
error_wrong_type_arg (2);
}
\f
/* -*-C-*-
-$Id: image.c,v 9.36 2003/02/14 18:28:19 cph Exp $
+$Id: image.c,v 9.37 2004/11/21 04:17:59 cph Exp $
Copyright (c) 1987-1999 Massachusetts Institute of Technology
if (! (PAIR_P (rest))) goto loser;
third = (PAIR_CAR (rest));
if (! (ARRAY_P (third))) goto loser;
- if ((PAIR_CDR (rest)) != EMPTY_LIST) goto loser;
+ if (!EMPTY_LIST_P (PAIR_CDR (rest))) goto loser;
(*nrows) = (UNSIGNED_FIXNUM_TO_LONG (first));
(*ncols) = (UNSIGNED_FIXNUM_TO_LONG (second));
(*array) = (ARRAY_CONTENTS (third));
/* -*-C-*-
-$Id: intercom.c,v 9.35 2003/02/14 18:28:19 cph Exp $
+$Id: intercom.c,v 9.36 2004/11/21 04:18:06 cph Exp $
Copyright (c) 1987-1999, 2002 Massachusetts Institute of Technology
PRIMITIVE_HEADER (1);
{
SCHEME_OBJECT queue = (Get_Fixed_Obj_Slot (The_Work_Queue));
- if (queue == EMPTY_LIST)
+ if (EMPTY_LIST_P (queue))
{
queue = (cons (EMPTY_LIST, EMPTY_LIST));
Set_Fixed_Obj_Slot (The_Work_Queue, queue);
SCHEME_OBJECT queue_tail = (PAIR_CDR (queue));
SCHEME_OBJECT new_entry = (cons ((ARG_REF (1)), EMPTY_LIST));
SET_PAIR_CDR (queue, new_entry);
- if (queue_tail == EMPTY_LIST)
+ if (EMPTY_LIST_P (queue_tail))
SET_PAIR_CAR (queue, new_entry);
else
SET_PAIR_CDR (queue_tail, new_entry);
PRIMITIVE_HEADER (1);
{
SCHEME_OBJECT queue = (Get_Fixed_Obj_Slot (The_Work_Queue));
- if (queue == EMPTY_LIST)
+ if (EMPTY_LIST_P (queue))
{
queue = (cons (EMPTY_LIST, EMPTY_LIST));
Set_Fixed_Obj_Slot (The_Work_Queue, queue);
SCHEME_OBJECT queue_head = (PAIR_CAR (queue));
SCHEME_OBJECT new_entry = (cons ((ARG_REF (1)), queue_head));
SET_PAIR_CAR (queue, new_entry);
- if (queue_head == EMPTY_LIST)
+ if (EMPTY_LIST_P (queue_head))
SET_PAIR_CDR (queue, new_entry);
}
}
{
SCHEME_OBJECT queue = (Get_Fixed_Obj_Slot (The_Work_Queue));
Set_Fixed_Obj_Slot (The_Work_Queue, EMPTY_LIST);
- PRIMITIVE_RETURN ((queue != EMPTY_LIST) ? (PAIR_CAR (queue)) : EMPTY_LIST);
+ PRIMITIVE_RETURN ((!EMPTY_LIST_P (queue)) ? (PAIR_CAR (queue)) : EMPTY_LIST);
}
}
PRIMITIVE_HEADER (0);
{
fast SCHEME_OBJECT queue = (Get_Fixed_Obj_Slot (The_Work_Queue));
- if (queue == EMPTY_LIST)
+ if (EMPTY_LIST_P (queue))
PRIMITIVE_RETURN (EMPTY_LIST);
/* Reverse the queue and return it.
(Why is it being reversed? -- cph) */
{
fast SCHEME_OBJECT this_pair = (PAIR_CAR (queue));
fast SCHEME_OBJECT result = EMPTY_LIST;
- while (this_pair != EMPTY_LIST)
+ while (!EMPTY_LIST_P (this_pair))
{
result = (cons ((PAIR_CAR (this_pair)), result));
this_pair = (PAIR_CDR (this_pair));
SCHEME_OBJECT primitive = (Registers[REGBLOCK_PRIMITIVE]);
SCHEME_OBJECT queue = (Get_Fixed_Obj_Slot (The_Work_Queue));
SCHEME_OBJECT queue_head =
- ((queue == EMPTY_LIST) ? EMPTY_LIST : (PAIR_CAR (queue)));
- if (queue_head == EMPTY_LIST)
+ ((EMPTY_LIST_P (queue)) ? EMPTY_LIST : (PAIR_CAR (queue)));
+ if (EMPTY_LIST_P (queue_head))
{
if (thunk == SHARP_F)
{
SCHEME_OBJECT result = (PAIR_CAR (queue_head));
queue_head = (PAIR_CDR (queue_head));
SET_PAIR_CAR (queue, queue_head);
- if (queue_head == EMPTY_LIST)
+ if (EMPTY_LIST_P (queue_head))
SET_PAIR_CDR (queue, EMPTY_LIST);
PRIMITIVE_RETURN (result);
}
/* -*-C-*-
-$Id: intern.c,v 9.59 2003/02/14 18:28:19 cph Exp $
+$Id: intern.c,v 9.60 2004/11/21 04:18:14 cph Exp $
Copyright (c) 1987-2000 Massachusetts Institute of Technology
% (VECTOR_LENGTH (obarray)))
+ 1)));
}
- while ((*bucket) != EMPTY_LIST)
+ while (!EMPTY_LIST_P (*bucket))
{
fast SCHEME_OBJECT symbol = (PAIR_CAR (*bucket));
fast SCHEME_OBJECT name = (FAST_MEMORY_REF (symbol, SYMBOL_NAME));
DEFUN (find_symbol, (length, string), long length AND unsigned char * string)
{
SCHEME_OBJECT result = (* (find_symbol_internal (length, string)));
- return ((result == EMPTY_LIST) ? SHARP_F : result);
+ return ((EMPTY_LIST_P (result)) ? SHARP_F : result);
}
static SCHEME_OBJECT
{
SCHEME_OBJECT * cell = (find_symbol_internal (length, string));
return
- (((*cell) == EMPTY_LIST)
+ ((EMPTY_LIST_P (*cell))
? (make_symbol ((memory_to_string (length, string)), cell))
: (*cell));
}
SCHEME_OBJECT * cell =
(find_symbol_internal ((STRING_LENGTH (string)),
(STRING_LOC (string, 0))));
- return (((*cell) == EMPTY_LIST) ? (make_symbol (string, cell)) : (*cell));
+ return ((EMPTY_LIST_P (*cell)) ? (make_symbol (string, cell)) : (*cell));
}
SCHEME_OBJECT
SCHEME_OBJECT name = (FAST_MEMORY_REF (symbol, SYMBOL_NAME));
SCHEME_OBJECT * cell =
(find_symbol_internal ((STRING_LENGTH (name)), (STRING_LOC (name, 0))));
- return (((*cell) == EMPTY_LIST)
+ return ((EMPTY_LIST_P (*cell))
? (link_new_symbol (symbol, cell))
: (*cell));
}
/* -*-C-*-
-$Id: intprm.c,v 1.11 2003/02/14 18:28:19 cph Exp $
+$Id: intprm.c,v 1.12 2004/11/21 04:18:27 cph Exp $
Copyright (c) 1989-1999 Massachusetts Institute of Technology
error_bad_range_arg (1);
n_digits += 1;
scan = (PAIR_CDR (scan));
- if (scan == EMPTY_LIST)
+ if (EMPTY_LIST_P (scan))
break;
if (!PAIR_P (scan))
error_wrong_type_arg (1);
/* -*-C-*-
-$Id: list.c,v 9.34 2003/02/14 18:28:19 cph Exp $
+$Id: list.c,v 9.35 2004/11/21 04:18:35 cph Exp $
Copyright (c) 1987-1999 Massachusetts Institute of Technology
i += 1;
TOUCH_IN_PRIMITIVE ((PAIR_CDR (list)), list);
}
- if (list != EMPTY_LIST)
+ if (!EMPTY_LIST_P (list))
error_wrong_type_arg (1);
PRIMITIVE_RETURN (LONG_TO_UNSIGNED_FIXNUM (i));
}
PRIMITIVE_RETURN (list);
TOUCH_IN_PRIMITIVE ((PAIR_CDR (list)), list);
}
- if (list != EMPTY_LIST)
+ if (!EMPTY_LIST_P (list))
error_wrong_type_arg (2);
PRIMITIVE_RETURN (SHARP_F);
}
PRIMITIVE_RETURN (association);
TOUCH_IN_PRIMITIVE ((PAIR_CDR (alist)), alist);
}
- if (alist != EMPTY_LIST)
+ if (!EMPTY_LIST_P (alist))
error_wrong_type_arg (2);
PRIMITIVE_RETURN (SHARP_F);
}
/* -*-C-*-
-$Id: object.h,v 9.55 2003/11/26 05:01:25 cph Exp $
+$Id: object.h,v 9.56 2004/11/21 04:18:43 cph Exp $
Copyright 1986,1987,1988,1989,1990,1992 Massachusetts Institute of Technology
Copyright 1993,1995,1997,1998,2000,2001 Massachusetts Institute of Technology
#define PRIMITIVE_P(object) ((OBJECT_TYPE (object)) == TC_PRIMITIVE)
#define FUTURE_P(object) ((OBJECT_TYPE (object)) == TC_FUTURE)
#define PROMISE_P(object) ((OBJECT_TYPE (object)) == TC_DELAYED)
-#define APPARENT_LIST_P(object) (((object) == EMPTY_LIST) || (PAIR_P (object)))
+#define APPARENT_LIST_P(object) ((EMPTY_LIST_P (object)) || (PAIR_P (object)))
#define CONTROL_POINT_P(object) ((OBJECT_TYPE (object)) == TC_CONTROL_POINT)
#define BROKEN_HEART_P(object) ((OBJECT_TYPE (object)) == TC_BROKEN_HEART)
#define GC_NON_POINTER_P(object) ((GC_Type (object)) == GC_Non_Pointer)
/* -*-C-*-
-$Id: prim.c,v 9.42 2004/07/04 05:23:43 cph Exp $
+$Id: prim.c,v 9.43 2004/11/21 04:21:06 cph Exp $
Copyright 1986,1987,1988,1989,1992,1993 Massachusetts Institute of Technology
Copyright 1996,2004 Massachusetts Institute of Technology
fast SCHEME_OBJECT object;
PRIMITIVE_HEADER (1);
TOUCH_IN_PRIMITIVE ((ARG_REF (1)), object);
- PRIMITIVE_RETURN (BOOLEAN_TO_OBJECT (object == EMPTY_LIST));
+ PRIMITIVE_RETURN (BOOLEAN_TO_OBJECT (EMPTY_LIST_P (object)));
}
\f
/* Cells */
/* -*-C-*-
-$Id: sgraph_a.c,v 1.18 2003/02/14 18:28:23 cph Exp $
+$Id: sgraph_a.c,v 1.19 2004/11/21 04:18:52 cph Exp $
Copyright (c) 1987-1999 Massachusetts Institute of Technology
}
TOUCH_IN_PRIMITIVE ((PAIR_CDR (object)), object);
}
- if (object != EMPTY_LIST)
+ if (!EMPTY_LIST_P (object))
error_wrong_type_arg (arg_number);
return;
}
error_bad_range_arg (2);
TOUCH_IN_PRIMITIVE ((PAIR_CDR (object)), object);
}
- if (object != EMPTY_LIST)
+ if (!EMPTY_LIST_P (object))
error_wrong_type_arg (2);
(clist [count]) = (clist [0]);
/* -*-C-*-
-$Id: step.c,v 9.38 2003/02/14 18:28:23 cph Exp $
+$Id: step.c,v 9.39 2004/11/21 04:19:00 cph Exp $
Copyright (c) 1987-1999, 2002 Massachusetts Institute of Technology
number_of_args += 1;
TOUCH_IN_PRIMITIVE ((PAIR_CDR (scan_list)), scan_list);
}
- if (scan_list != EMPTY_LIST)
+ if (!EMPTY_LIST_P (scan_list))
error_wrong_type_arg (2);
}
POP_PRIMITIVE_FRAME (3);
/* -*-C-*-
-$Id: vector.c,v 9.41 2003/02/14 18:28:24 cph Exp $
+$Id: vector.c,v 9.42 2004/11/21 04:19:06 cph Exp $
Copyright (c) 1987-1999 Massachusetts Institute of Technology
(*Free++) = (PAIR_CAR (list));
TOUCH_IN_PRIMITIVE ((PAIR_CDR (list)), list);
}
- if (list != EMPTY_LIST)
+ if (!EMPTY_LIST_P (list))
error_wrong_type_arg (argument_number);
(*result) = (MAKE_OBJECT (TC_MANIFEST_VECTOR, count));
return (MAKE_POINTER_OBJECT (result_type, result));