summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorKen Raeburn <raeburn@raeburn.org>1999-09-13 03:35:33 +0000
committerKen Raeburn <raeburn@raeburn.org>1999-09-13 03:35:33 +0000
commitc1d497be7013fb68603021cfbd77ec34a9938d0b (patch)
tree14b121ea82a13cb33c4cf35c1dd32f850b9f5458 /src
parent03699b140e13aee5b49fa4678e97dff5855e789c (diff)
downloademacs-c1d497be7013fb68603021cfbd77ec34a9938d0b.tar.gz
emacs-c1d497be7013fb68603021cfbd77ec34a9938d0b.tar.bz2
emacs-c1d497be7013fb68603021cfbd77ec34a9938d0b.zip
Use XCAR and XCDR instead of explicit member access.
Diffstat (limited to 'src')
-rw-r--r--src/lread.c26
-rw-r--r--src/search.c8
-rw-r--r--src/sunfns.c4
-rw-r--r--src/syntax.c4
-rw-r--r--src/undo.c42
-rw-r--r--src/vmsproc.c4
6 files changed, 44 insertions, 44 deletions
diff --git a/src/lread.c b/src/lread.c
index d4e556a0704..d02d2b31200 100644
--- a/src/lread.c
+++ b/src/lread.c
@@ -748,8 +748,8 @@ Return t if file exists.")
GCPRO1 (file);
lispstream = Fcons (Qnil, Qnil);
- XSETFASTINT (XCONS (lispstream)->car, (EMACS_UINT)stream >> 16);
- XSETFASTINT (XCONS (lispstream)->cdr, (EMACS_UINT)stream & 0xffff);
+ XSETFASTINT (XCAR (lispstream), (EMACS_UINT)stream >> 16);
+ XSETFASTINT (XCDR (lispstream), (EMACS_UINT)stream & 0xffff);
record_unwind_protect (load_unwind, lispstream);
record_unwind_protect (load_descriptor_unwind, load_descriptor_list);
specbind (Qload_file_name, found);
@@ -793,8 +793,8 @@ static Lisp_Object
load_unwind (stream) /* used as unwind-protect function in load */
Lisp_Object stream;
{
- fclose ((FILE *) (XFASTINT (XCONS (stream)->car) << 16
- | XFASTINT (XCONS (stream)->cdr)));
+ fclose ((FILE *) (XFASTINT (XCAR (stream)) << 16
+ | XFASTINT (XCDR (stream))));
if (--load_in_progress < 0) load_in_progress = 0;
return Qnil;
}
@@ -815,8 +815,8 @@ close_load_descs ()
{
#ifndef WINDOWSNT
Lisp_Object tail;
- for (tail = load_descriptor_list; !NILP (tail); tail = XCONS (tail)->cdr)
- close (XFASTINT (XCONS (tail)->car));
+ for (tail = load_descriptor_list; !NILP (tail); tail = XCDR (tail))
+ close (XFASTINT (XCAR (tail)));
#endif
}
@@ -2454,8 +2454,8 @@ read_vector (readcharfun, bytecodeflag)
error ("invalid byte code");
otem = XCONS (item);
- bytestr = XCONS (item)->car;
- item = XCONS (item)->cdr;
+ bytestr = XCAR (item);
+ item = XCDR (item);
free_cons (otem);
}
@@ -2547,7 +2547,7 @@ read_list (flag, readcharfun)
{
GCPRO2 (val, tail);
if (!NILP (tail))
- XCONS (tail)->cdr = read0 (readcharfun);
+ XCDR (tail) = read0 (readcharfun);
else
val = read0 (readcharfun);
read1 (readcharfun, &ch, 0);
@@ -2560,7 +2560,7 @@ read_list (flag, readcharfun)
{
/* Get a doc string from the file we are loading.
If it's in saved_doc_string, get it from there. */
- int pos = XINT (XCONS (val)->cdr);
+ int pos = XINT (XCDR (val));
/* Position is negative for user variables. */
if (pos < 0) pos = -pos;
if (pos >= saved_doc_string_position
@@ -2640,7 +2640,7 @@ read_list (flag, readcharfun)
? pure_cons (elt, Qnil)
: Fcons (elt, Qnil));
if (!NILP (tail))
- XCONS (tail)->cdr = tem;
+ XCDR (tail) = tem;
else
val = tem;
tail = tem;
@@ -3265,7 +3265,7 @@ init_lread ()
for (path_tail = Vload_path;
!NILP (path_tail);
- path_tail = XCONS (path_tail)->cdr)
+ path_tail = XCDR (path_tail))
{
Lisp_Object dirfile;
dirfile = Fcar (path_tail);
@@ -3274,7 +3274,7 @@ init_lread ()
dirfile = Fdirectory_file_name (dirfile);
if (access (XSTRING (dirfile)->data, 0) < 0)
dir_warning ("Warning: Lisp directory `%s' does not exist.\n",
- XCONS (path_tail)->car);
+ XCAR (path_tail));
}
}
}
diff --git a/src/search.c b/src/search.c
index da4f635582f..cbecadcdc00 100644
--- a/src/search.c
+++ b/src/search.c
@@ -2599,19 +2599,19 @@ to hold all the values, and if INTEGERS is non-nil, no consing is done.")
/* If REUSE is a list, store as many value elements as will fit
into the elements of REUSE. */
for (i = 0, tail = reuse; CONSP (tail);
- i++, tail = XCONS (tail)->cdr)
+ i++, tail = XCDR (tail))
{
if (i < 2 * len + 2)
- XCONS (tail)->car = data[i];
+ XCAR (tail) = data[i];
else
- XCONS (tail)->car = Qnil;
+ XCAR (tail) = Qnil;
prev = tail;
}
/* If we couldn't fit all value elements into REUSE,
cons up the rest of them and add them to the end of REUSE. */
if (i < 2 * len + 2)
- XCONS (prev)->cdr = Flist (2 * len + 2 - i, data + i);
+ XCDR (prev) = Flist (2 * len + 2 - i, data + i);
return reuse;
}
diff --git a/src/sunfns.c b/src/sunfns.c
index efc4e970119..504eed3d40e 100644
--- a/src/sunfns.c
+++ b/src/sunfns.c
@@ -459,8 +459,8 @@ as a menu label.")
{static Lisp_Object symbol[2];
symbol[0] = Fintern (sm_kludge_string, Qnil);
Pair = Ffuncall (1, symbol);
- xpos += XINT (XCONS (Pair)->cdr);
- ypos += XINT (XCONS (Pair)->car);
+ xpos += XINT (XCDR (Pair));
+ ypos += XINT (XCAR (Pair));
}
#endif
diff --git a/src/syntax.c b/src/syntax.c
index d1830462726..98829863d42 100644
--- a/src/syntax.c
+++ b/src/syntax.c
@@ -979,8 +979,8 @@ describe_syntax (value)
return;
}
- first = XCONS (value)->car;
- match_lisp = XCONS (value)->cdr;
+ first = XCAR (value);
+ match_lisp = XCDR (value);
if (!INTEGERP (first) || !(NILP (match_lisp) || INTEGERP (match_lisp)))
{
diff --git a/src/undo.c b/src/undo.c
index 86bcdc9977d..51eaa5a2d8d 100644
--- a/src/undo.c
+++ b/src/undo.c
@@ -66,13 +66,13 @@ record_insert (beg, length)
if (CONSP (current_buffer->undo_list))
{
Lisp_Object elt;
- elt = XCONS (current_buffer->undo_list)->car;
+ elt = XCAR (current_buffer->undo_list);
if (CONSP (elt)
- && INTEGERP (XCONS (elt)->car)
- && INTEGERP (XCONS (elt)->cdr)
- && XINT (XCONS (elt)->cdr) == beg)
+ && INTEGERP (XCAR (elt))
+ && INTEGERP (XCDR (elt))
+ && XINT (XCDR (elt)) == beg)
{
- XSETINT (XCONS (elt)->cdr, beg + length);
+ XSETINT (XCDR (elt), beg + length);
return;
}
}
@@ -114,10 +114,10 @@ record_delete (beg, string)
while (1)
{
- elt = XCONS (tail)->car;
- if (NILP (elt) || ! (CONSP (elt) && MARKERP (XCONS (elt)->car)))
+ elt = XCAR (tail);
+ if (NILP (elt) || ! (CONSP (elt) && MARKERP (XCAR (elt))))
break;
- tail = XCONS (tail)->cdr;
+ tail = XCDR (tail);
}
at_boundary = NILP (elt);
}
@@ -264,7 +264,7 @@ but another undo command will undo to the previous boundary.")
{
/* If we have preallocated the cons cell to use here,
use that one. */
- XCONS (pending_boundary)->cdr = current_buffer->undo_list;
+ XCDR (pending_boundary) = current_buffer->undo_list;
current_buffer->undo_list = pending_boundary;
pending_boundary = Qnil;
}
@@ -298,33 +298,33 @@ truncate_undo_list (list, minsize, maxsize)
Skip, skip, skip the undo, skip, skip, skip the undo,
Skip, skip, skip the undo, skip to the undo bound'ry.
(Get it? "Skip to my Loo?") */
- if (CONSP (next) && NILP (XCONS (next)->car))
+ if (CONSP (next) && NILP (XCAR (next)))
{
/* Add in the space occupied by this element and its chain link. */
size_so_far += sizeof (struct Lisp_Cons);
/* Advance to next element. */
prev = next;
- next = XCONS (next)->cdr;
+ next = XCDR (next);
}
- while (CONSP (next) && ! NILP (XCONS (next)->car))
+ while (CONSP (next) && ! NILP (XCAR (next)))
{
Lisp_Object elt;
- elt = XCONS (next)->car;
+ elt = XCAR (next);
/* Add in the space occupied by this element and its chain link. */
size_so_far += sizeof (struct Lisp_Cons);
if (CONSP (elt))
{
size_so_far += sizeof (struct Lisp_Cons);
- if (STRINGP (XCONS (elt)->car))
+ if (STRINGP (XCAR (elt)))
size_so_far += (sizeof (struct Lisp_String) - 1
- + XSTRING (XCONS (elt)->car)->size);
+ + XSTRING (XCAR (elt))->size);
}
/* Advance to next element. */
prev = next;
- next = XCONS (next)->cdr;
+ next = XCDR (next);
}
if (CONSP (next))
last_boundary = prev;
@@ -332,7 +332,7 @@ truncate_undo_list (list, minsize, maxsize)
while (CONSP (next))
{
Lisp_Object elt;
- elt = XCONS (next)->car;
+ elt = XCAR (next);
/* When we get to a boundary, decide whether to truncate
either before or after it. The lower threshold, MINSIZE,
@@ -352,14 +352,14 @@ truncate_undo_list (list, minsize, maxsize)
if (CONSP (elt))
{
size_so_far += sizeof (struct Lisp_Cons);
- if (STRINGP (XCONS (elt)->car))
+ if (STRINGP (XCAR (elt)))
size_so_far += (sizeof (struct Lisp_String) - 1
- + XSTRING (XCONS (elt)->car)->size);
+ + XSTRING (XCAR (elt))->size);
}
/* Advance to next element. */
prev = next;
- next = XCONS (next)->cdr;
+ next = XCDR (next);
}
/* If we scanned the whole list, it is short enough; don't change it. */
@@ -369,7 +369,7 @@ truncate_undo_list (list, minsize, maxsize)
/* Truncate at the boundary where we decided to truncate. */
if (!NILP (last_boundary))
{
- XCONS (last_boundary)->cdr = Qnil;
+ XCDR (last_boundary) = Qnil;
return list;
}
else
diff --git a/src/vmsproc.c b/src/vmsproc.c
index c229a914bd3..122cf08bd36 100644
--- a/src/vmsproc.c
+++ b/src/vmsproc.c
@@ -758,9 +758,9 @@ child_sig (vs)
pid = vs->pid;
sys$setef (vs->eventFlag);
- for (tail = Vprocess_alist; XSYMBOL (tail) != XSYMBOL (Qnil); tail = XCONS (tail)->cdr)
+ for (tail = Vprocess_alist; XSYMBOL (tail) != XSYMBOL (Qnil); tail = XCDR (tail))
{
- proc = XCONS (XCONS (tail)->car)->cdr;
+ proc = XCDR (XCAR (tail));
p = XPROCESS (proc);
if (EQ (p->childp, Qt) && XFASTINT (p->pid) == pid)
break;