#undef vector
#define vector *****
-#ifdef NULL
-#undef NULL
-#endif
#include "lisp.h"
#include "commands.h"
return Farray_length (obj);
else if (CONSP (obj))
{
- for (i = 0, tail = obj; !NULL(tail); i++)
+ for (i = 0, tail = obj; !NILP(tail); i++)
{
QUIT;
tail = Fcdr (tail);
XFASTINT (val) = i;
return val;
}
- else if (NULL(obj))
+ else if (NILP(obj))
{
XFASTINT (val) = 0;
return val;
(arg)
Lisp_Object arg;
{
- if (NULL (arg)) return arg;
+ if (NILP (arg)) return arg;
if (!CONSP (arg) && XTYPE (arg) != Lisp_Vector && XTYPE (arg) != Lisp_String)
arg = wrong_type_argument (Qsequencep, arg);
return concat (1, &arg, CONSP (arg) ? Lisp_Cons : XTYPE (arg), 0);
for (argnum = 0; argnum < nargs; argnum++)
{
this = args[argnum];
- if (!(CONSP (this) || NULL (this)
+ if (!(CONSP (this) || NILP (this)
|| XTYPE (this) == Lisp_Vector || XTYPE (this) == Lisp_String
|| XTYPE (this) == Lisp_Compiled))
{
register Lisp_Object elt;
/* Fetch next element of `this' arg into `elt', or break if `this' is exhausted. */
- if (NULL (this)) break;
+ if (NILP (this)) break;
if (CONSP (this))
elt = Fcar (this), this = Fcdr (this);
else
}
}
}
- if (!NULL (prev))
+ if (!NILP (prev))
XCONS (prev)->cdr = last_tail;
return val;
register Lisp_Object tem;
CHECK_LIST (alist, 0);
- if (NULL (alist))
+ if (NILP (alist))
return alist;
alist = concat (1, &alist, Lisp_Cons, 0);
for (tem = alist; CONSP (tem); tem = XCONS (tem)->cdr)
{
CHECK_STRING (string, 0);
CHECK_NUMBER (from, 1);
- if (NULL (to))
+ if (NILP (to))
to = Flength (string);
else
CHECK_NUMBER (to, 2);
register int i, num;
CHECK_NUMBER (n, 0);
num = XINT (n);
- for (i = 0; i < num && !NULL (list); i++)
+ for (i = 0; i < num && !NILP (list); i++)
{
QUIT;
list = Fcdr (list);
CHECK_NUMBER (n, 0);
while (1)
{
- if (XTYPE (seq) == Lisp_Cons || NULL (seq))
+ if (XTYPE (seq) == Lisp_Cons || NILP (seq))
return Fcar (Fnthcdr (n, seq));
else if (XTYPE (seq) == Lisp_String
|| XTYPE (seq) == Lisp_Vector)
Lisp_Object list;
{
register Lisp_Object tail;
- for (tail = list; !NULL (tail); tail = Fcdr (tail))
+ for (tail = list; !NILP (tail); tail = Fcdr (tail))
{
register Lisp_Object tem;
tem = Fcar (tail);
- if (! NULL (Fequal (elt, tem)))
+ if (! NILP (Fequal (elt, tem)))
return tail;
QUIT;
}
Lisp_Object list;
{
register Lisp_Object tail;
- for (tail = list; !NULL (tail); tail = Fcdr (tail))
+ for (tail = list; !NILP (tail); tail = Fcdr (tail))
{
register Lisp_Object tem;
tem = Fcar (tail);
Lisp_Object list;
{
register Lisp_Object tail;
- for (tail = list; !NULL (tail); tail = Fcdr (tail))
+ for (tail = list; !NILP (tail); tail = Fcdr (tail))
{
register Lisp_Object elt, tem;
elt = Fcar (tail);
Lisp_Object list;
{
register Lisp_Object tail;
- for (tail = list; !NULL (tail); tail = Fcdr (tail))
+ for (tail = list; !NILP (tail); tail = Fcdr (tail))
{
register Lisp_Object elt, tem;
elt = Fcar (tail);
if (!CONSP (elt)) continue;
tem = Fequal (Fcar (elt), key);
- if (!NULL (tem)) return elt;
+ if (!NILP (tem)) return elt;
QUIT;
}
return Qnil;
Lisp_Object list;
{
register Lisp_Object tail;
- for (tail = list; !NULL (tail); tail = Fcdr (tail))
+ for (tail = list; !NILP (tail); tail = Fcdr (tail))
{
register Lisp_Object elt, tem;
elt = Fcar (tail);
tail = list;
prev = Qnil;
- while (!NULL (tail))
+ while (!NILP (tail))
{
tem = Fcar (tail);
if (EQ (elt, tem))
{
- if (NULL (prev))
+ if (NILP (prev))
list = Fcdr (tail);
else
Fsetcdr (prev, Fcdr (tail));
tail = list;
prev = Qnil;
- while (!NULL (tail))
+ while (!NILP (tail))
{
tem = Fcar (tail);
if (Fequal (elt, tem))
{
- if (NULL (prev))
+ if (NILP (prev))
list = Fcdr (tail);
else
Fsetcdr (prev, Fcdr (tail));
{
register Lisp_Object prev, tail, next;
- if (NULL (list)) return list;
+ if (NILP (list)) return list;
prev = Qnil;
tail = list;
- while (!NULL (tail))
+ while (!NILP (tail))
{
QUIT;
next = Fcdr (tail);
while (1)
{
- if (NULL (l1))
+ if (NILP (l1))
{
UNGCPRO;
- if (NULL (tail))
+ if (NILP (tail))
return l2;
Fsetcdr (tail, l2);
return value;
}
- if (NULL (l2))
+ if (NILP (l2))
{
UNGCPRO;
- if (NULL (tail))
+ if (NILP (tail))
return l1;
Fsetcdr (tail, l1);
return value;
}
tem = call2 (pred, Fcar (l2), Fcar (l1));
- if (NULL (tem))
+ if (NILP (tem))
{
tem = l1;
l1 = Fcdr (l1);
l2 = Fcdr (l2);
org_l2 = l2;
}
- if (NULL (tail))
+ if (NILP (tail))
value = tem;
else
Fsetcdr (tail, tem);
register Lisp_Object prop;
{
register Lisp_Object tail;
- for (tail = Fsymbol_plist (sym); !NULL (tail); tail = Fcdr (Fcdr (tail)))
+ for (tail = Fsymbol_plist (sym); !NILP (tail); tail = Fcdr (Fcdr (tail)))
{
register Lisp_Object tem;
tem = Fcar (tail);
register Lisp_Object tail, prev;
Lisp_Object newcell;
prev = Qnil;
- for (tail = Fsymbol_plist (sym); !NULL (tail); tail = Fcdr (Fcdr (tail)))
+ for (tail = Fsymbol_plist (sym); !NILP (tail); tail = Fcdr (Fcdr (tail)))
{
register Lisp_Object tem;
tem = Fcar (tail);
prev = tail;
}
newcell = Fcons (prop, Fcons (val, Qnil));
- if (NULL (prev))
+ if (NILP (prev))
Fsetplist (sym, newcell);
else
Fsetcdr (Fcdr (prev), newcell);
{
Lisp_Object v1;
v1 = Fequal (Fcar (o1), Fcar (o2), depth + 1);
- if (NULL (v1))
+ if (NILP (v1))
return v1;
o1 = Fcdr (o1), o2 = Fcdr (o2);
goto do_cdr;
v1 = XVECTOR (o1)->contents [index];
v2 = XVECTOR (o2)->contents [index];
v = Fequal (v1, v2, depth + 1);
- if (NULL (v)) return v;
+ if (NILP (v)) return v;
}
return Qt;
}
for (argnum = 0; argnum < nargs; argnum++)
{
tem = args[argnum];
- if (NULL (tem)) continue;
+ if (NILP (tem)) continue;
- if (NULL (val))
+ if (NILP (val))
val = tem;
if (argnum + 1 == nargs) break;
tem = args[argnum + 1];
Fsetcdr (tail, tem);
- if (NULL (tem))
+ if (NILP (tem))
args[argnum + 1] = tail;
}
register Lisp_Object tem;
CHECK_SYMBOL (feature, 0);
tem = Fmemq (feature, Vfeatures);
- return (NULL (tem)) ? Qnil : Qt;
+ return (NILP (tem)) ? Qnil : Qt;
}
DEFUN ("provide", Fprovide, Sprovide, 1, 1, 0,
{
register Lisp_Object tem;
CHECK_SYMBOL (feature, 0);
- if (!NULL (Vautoload_queue))
+ if (!NILP (Vautoload_queue))
Vautoload_queue = Fcons (Fcons (Vfeatures, Qnil), Vautoload_queue);
tem = Fmemq (feature, Vfeatures);
- if (NULL (tem))
+ if (NILP (tem))
Vfeatures = Fcons (feature, Vfeatures);
return feature;
}
register Lisp_Object tem;
CHECK_SYMBOL (feature, 0);
tem = Fmemq (feature, Vfeatures);
- if (NULL (tem))
+ if (NILP (tem))
{
int count = specpdl_ptr - specpdl;
record_unwind_protect (un_autoload, Vautoload_queue);
Vautoload_queue = Qt;
- Fload (NULL (file_name) ? Fsymbol_name (feature) : file_name,
+ Fload (NILP (file_name) ? Fsymbol_name (feature) : file_name,
Qnil, Qt, Qnil);
tem = Fmemq (feature, Vfeatures);
- if (NULL (tem))
+ if (NILP (tem))
error ("Required feature %s was not provided",
XSYMBOL (feature)->name->data );