aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorKen Raeburn1999-09-13 03:35:33 +0000
committerKen Raeburn1999-09-13 03:35:33 +0000
commitc1d497be7013fb68603021cfbd77ec34a9938d0b (patch)
tree14b121ea82a13cb33c4cf35c1dd32f850b9f5458 /src
parent03699b140e13aee5b49fa4678e97dff5855e789c (diff)
downloademacs-c1d497be7013fb68603021cfbd77ec34a9938d0b.tar.gz
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.")
748 748
749 GCPRO1 (file); 749 GCPRO1 (file);
750 lispstream = Fcons (Qnil, Qnil); 750 lispstream = Fcons (Qnil, Qnil);
751 XSETFASTINT (XCONS (lispstream)->car, (EMACS_UINT)stream >> 16); 751 XSETFASTINT (XCAR (lispstream), (EMACS_UINT)stream >> 16);
752 XSETFASTINT (XCONS (lispstream)->cdr, (EMACS_UINT)stream & 0xffff); 752 XSETFASTINT (XCDR (lispstream), (EMACS_UINT)stream & 0xffff);
753 record_unwind_protect (load_unwind, lispstream); 753 record_unwind_protect (load_unwind, lispstream);
754 record_unwind_protect (load_descriptor_unwind, load_descriptor_list); 754 record_unwind_protect (load_descriptor_unwind, load_descriptor_list);
755 specbind (Qload_file_name, found); 755 specbind (Qload_file_name, found);
@@ -793,8 +793,8 @@ static Lisp_Object
793load_unwind (stream) /* used as unwind-protect function in load */ 793load_unwind (stream) /* used as unwind-protect function in load */
794 Lisp_Object stream; 794 Lisp_Object stream;
795{ 795{
796 fclose ((FILE *) (XFASTINT (XCONS (stream)->car) << 16 796 fclose ((FILE *) (XFASTINT (XCAR (stream)) << 16
797 | XFASTINT (XCONS (stream)->cdr))); 797 | XFASTINT (XCDR (stream))));
798 if (--load_in_progress < 0) load_in_progress = 0; 798 if (--load_in_progress < 0) load_in_progress = 0;
799 return Qnil; 799 return Qnil;
800} 800}
@@ -815,8 +815,8 @@ close_load_descs ()
815{ 815{
816#ifndef WINDOWSNT 816#ifndef WINDOWSNT
817 Lisp_Object tail; 817 Lisp_Object tail;
818 for (tail = load_descriptor_list; !NILP (tail); tail = XCONS (tail)->cdr) 818 for (tail = load_descriptor_list; !NILP (tail); tail = XCDR (tail))
819 close (XFASTINT (XCONS (tail)->car)); 819 close (XFASTINT (XCAR (tail)));
820#endif 820#endif
821} 821}
822 822
@@ -2454,8 +2454,8 @@ read_vector (readcharfun, bytecodeflag)
2454 error ("invalid byte code"); 2454 error ("invalid byte code");
2455 2455
2456 otem = XCONS (item); 2456 otem = XCONS (item);
2457 bytestr = XCONS (item)->car; 2457 bytestr = XCAR (item);
2458 item = XCONS (item)->cdr; 2458 item = XCDR (item);
2459 free_cons (otem); 2459 free_cons (otem);
2460 } 2460 }
2461 2461
@@ -2547,7 +2547,7 @@ read_list (flag, readcharfun)
2547 { 2547 {
2548 GCPRO2 (val, tail); 2548 GCPRO2 (val, tail);
2549 if (!NILP (tail)) 2549 if (!NILP (tail))
2550 XCONS (tail)->cdr = read0 (readcharfun); 2550 XCDR (tail) = read0 (readcharfun);
2551 else 2551 else
2552 val = read0 (readcharfun); 2552 val = read0 (readcharfun);
2553 read1 (readcharfun, &ch, 0); 2553 read1 (readcharfun, &ch, 0);
@@ -2560,7 +2560,7 @@ read_list (flag, readcharfun)
2560 { 2560 {
2561 /* Get a doc string from the file we are loading. 2561 /* Get a doc string from the file we are loading.
2562 If it's in saved_doc_string, get it from there. */ 2562 If it's in saved_doc_string, get it from there. */
2563 int pos = XINT (XCONS (val)->cdr); 2563 int pos = XINT (XCDR (val));
2564 /* Position is negative for user variables. */ 2564 /* Position is negative for user variables. */
2565 if (pos < 0) pos = -pos; 2565 if (pos < 0) pos = -pos;
2566 if (pos >= saved_doc_string_position 2566 if (pos >= saved_doc_string_position
@@ -2640,7 +2640,7 @@ read_list (flag, readcharfun)
2640 ? pure_cons (elt, Qnil) 2640 ? pure_cons (elt, Qnil)
2641 : Fcons (elt, Qnil)); 2641 : Fcons (elt, Qnil));
2642 if (!NILP (tail)) 2642 if (!NILP (tail))
2643 XCONS (tail)->cdr = tem; 2643 XCDR (tail) = tem;
2644 else 2644 else
2645 val = tem; 2645 val = tem;
2646 tail = tem; 2646 tail = tem;
@@ -3265,7 +3265,7 @@ init_lread ()
3265 3265
3266 for (path_tail = Vload_path; 3266 for (path_tail = Vload_path;
3267 !NILP (path_tail); 3267 !NILP (path_tail);
3268 path_tail = XCONS (path_tail)->cdr) 3268 path_tail = XCDR (path_tail))
3269 { 3269 {
3270 Lisp_Object dirfile; 3270 Lisp_Object dirfile;
3271 dirfile = Fcar (path_tail); 3271 dirfile = Fcar (path_tail);
@@ -3274,7 +3274,7 @@ init_lread ()
3274 dirfile = Fdirectory_file_name (dirfile); 3274 dirfile = Fdirectory_file_name (dirfile);
3275 if (access (XSTRING (dirfile)->data, 0) < 0) 3275 if (access (XSTRING (dirfile)->data, 0) < 0)
3276 dir_warning ("Warning: Lisp directory `%s' does not exist.\n", 3276 dir_warning ("Warning: Lisp directory `%s' does not exist.\n",
3277 XCONS (path_tail)->car); 3277 XCAR (path_tail));
3278 } 3278 }
3279 } 3279 }
3280 } 3280 }
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.")
2599 /* If REUSE is a list, store as many value elements as will fit 2599 /* If REUSE is a list, store as many value elements as will fit
2600 into the elements of REUSE. */ 2600 into the elements of REUSE. */
2601 for (i = 0, tail = reuse; CONSP (tail); 2601 for (i = 0, tail = reuse; CONSP (tail);
2602 i++, tail = XCONS (tail)->cdr) 2602 i++, tail = XCDR (tail))
2603 { 2603 {
2604 if (i < 2 * len + 2) 2604 if (i < 2 * len + 2)
2605 XCONS (tail)->car = data[i]; 2605 XCAR (tail) = data[i];
2606 else 2606 else
2607 XCONS (tail)->car = Qnil; 2607 XCAR (tail) = Qnil;
2608 prev = tail; 2608 prev = tail;
2609 } 2609 }
2610 2610
2611 /* If we couldn't fit all value elements into REUSE, 2611 /* If we couldn't fit all value elements into REUSE,
2612 cons up the rest of them and add them to the end of REUSE. */ 2612 cons up the rest of them and add them to the end of REUSE. */
2613 if (i < 2 * len + 2) 2613 if (i < 2 * len + 2)
2614 XCONS (prev)->cdr = Flist (2 * len + 2 - i, data + i); 2614 XCDR (prev) = Flist (2 * len + 2 - i, data + i);
2615 2615
2616 return reuse; 2616 return reuse;
2617} 2617}
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.")
459 {static Lisp_Object symbol[2]; 459 {static Lisp_Object symbol[2];
460 symbol[0] = Fintern (sm_kludge_string, Qnil); 460 symbol[0] = Fintern (sm_kludge_string, Qnil);
461 Pair = Ffuncall (1, symbol); 461 Pair = Ffuncall (1, symbol);
462 xpos += XINT (XCONS (Pair)->cdr); 462 xpos += XINT (XCDR (Pair));
463 ypos += XINT (XCONS (Pair)->car); 463 ypos += XINT (XCAR (Pair));
464 } 464 }
465#endif 465#endif
466 466
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)
979 return; 979 return;
980 } 980 }
981 981
982 first = XCONS (value)->car; 982 first = XCAR (value);
983 match_lisp = XCONS (value)->cdr; 983 match_lisp = XCDR (value);
984 984
985 if (!INTEGERP (first) || !(NILP (match_lisp) || INTEGERP (match_lisp))) 985 if (!INTEGERP (first) || !(NILP (match_lisp) || INTEGERP (match_lisp)))
986 { 986 {
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)
66 if (CONSP (current_buffer->undo_list)) 66 if (CONSP (current_buffer->undo_list))
67 { 67 {
68 Lisp_Object elt; 68 Lisp_Object elt;
69 elt = XCONS (current_buffer->undo_list)->car; 69 elt = XCAR (current_buffer->undo_list);
70 if (CONSP (elt) 70 if (CONSP (elt)
71 && INTEGERP (XCONS (elt)->car) 71 && INTEGERP (XCAR (elt))
72 && INTEGERP (XCONS (elt)->cdr) 72 && INTEGERP (XCDR (elt))
73 && XINT (XCONS (elt)->cdr) == beg) 73 && XINT (XCDR (elt)) == beg)
74 { 74 {
75 XSETINT (XCONS (elt)->cdr, beg + length); 75 XSETINT (XCDR (elt), beg + length);
76 return; 76 return;
77 } 77 }
78 } 78 }
@@ -114,10 +114,10 @@ record_delete (beg, string)
114 114
115 while (1) 115 while (1)
116 { 116 {
117 elt = XCONS (tail)->car; 117 elt = XCAR (tail);
118 if (NILP (elt) || ! (CONSP (elt) && MARKERP (XCONS (elt)->car))) 118 if (NILP (elt) || ! (CONSP (elt) && MARKERP (XCAR (elt))))
119 break; 119 break;
120 tail = XCONS (tail)->cdr; 120 tail = XCDR (tail);
121 } 121 }
122 at_boundary = NILP (elt); 122 at_boundary = NILP (elt);
123 } 123 }
@@ -264,7 +264,7 @@ but another undo command will undo to the previous boundary.")
264 { 264 {
265 /* If we have preallocated the cons cell to use here, 265 /* If we have preallocated the cons cell to use here,
266 use that one. */ 266 use that one. */
267 XCONS (pending_boundary)->cdr = current_buffer->undo_list; 267 XCDR (pending_boundary) = current_buffer->undo_list;
268 current_buffer->undo_list = pending_boundary; 268 current_buffer->undo_list = pending_boundary;
269 pending_boundary = Qnil; 269 pending_boundary = Qnil;
270 } 270 }
@@ -298,33 +298,33 @@ truncate_undo_list (list, minsize, maxsize)
298 Skip, skip, skip the undo, skip, skip, skip the undo, 298 Skip, skip, skip the undo, skip, skip, skip the undo,
299 Skip, skip, skip the undo, skip to the undo bound'ry. 299 Skip, skip, skip the undo, skip to the undo bound'ry.
300 (Get it? "Skip to my Loo?") */ 300 (Get it? "Skip to my Loo?") */
301 if (CONSP (next) && NILP (XCONS (next)->car)) 301 if (CONSP (next) && NILP (XCAR (next)))
302 { 302 {
303 /* Add in the space occupied by this element and its chain link. */ 303 /* Add in the space occupied by this element and its chain link. */
304 size_so_far += sizeof (struct Lisp_Cons); 304 size_so_far += sizeof (struct Lisp_Cons);
305 305
306 /* Advance to next element. */ 306 /* Advance to next element. */
307 prev = next; 307 prev = next;
308 next = XCONS (next)->cdr; 308 next = XCDR (next);
309 } 309 }
310 while (CONSP (next) && ! NILP (XCONS (next)->car)) 310 while (CONSP (next) && ! NILP (XCAR (next)))
311 { 311 {
312 Lisp_Object elt; 312 Lisp_Object elt;
313 elt = XCONS (next)->car; 313 elt = XCAR (next);
314 314
315 /* Add in the space occupied by this element and its chain link. */ 315 /* Add in the space occupied by this element and its chain link. */
316 size_so_far += sizeof (struct Lisp_Cons); 316 size_so_far += sizeof (struct Lisp_Cons);
317 if (CONSP (elt)) 317 if (CONSP (elt))
318 { 318 {
319 size_so_far += sizeof (struct Lisp_Cons); 319 size_so_far += sizeof (struct Lisp_Cons);
320 if (STRINGP (XCONS (elt)->car)) 320 if (STRINGP (XCAR (elt)))
321 size_so_far += (sizeof (struct Lisp_String) - 1 321 size_so_far += (sizeof (struct Lisp_String) - 1
322 + XSTRING (XCONS (elt)->car)->size); 322 + XSTRING (XCAR (elt))->size);
323 } 323 }
324 324
325 /* Advance to next element. */ 325 /* Advance to next element. */
326 prev = next; 326 prev = next;
327 next = XCONS (next)->cdr; 327 next = XCDR (next);
328 } 328 }
329 if (CONSP (next)) 329 if (CONSP (next))
330 last_boundary = prev; 330 last_boundary = prev;
@@ -332,7 +332,7 @@ truncate_undo_list (list, minsize, maxsize)
332 while (CONSP (next)) 332 while (CONSP (next))
333 { 333 {
334 Lisp_Object elt; 334 Lisp_Object elt;
335 elt = XCONS (next)->car; 335 elt = XCAR (next);
336 336
337 /* When we get to a boundary, decide whether to truncate 337 /* When we get to a boundary, decide whether to truncate
338 either before or after it. The lower threshold, MINSIZE, 338 either before or after it. The lower threshold, MINSIZE,
@@ -352,14 +352,14 @@ truncate_undo_list (list, minsize, maxsize)
352 if (CONSP (elt)) 352 if (CONSP (elt))
353 { 353 {
354 size_so_far += sizeof (struct Lisp_Cons); 354 size_so_far += sizeof (struct Lisp_Cons);
355 if (STRINGP (XCONS (elt)->car)) 355 if (STRINGP (XCAR (elt)))
356 size_so_far += (sizeof (struct Lisp_String) - 1 356 size_so_far += (sizeof (struct Lisp_String) - 1
357 + XSTRING (XCONS (elt)->car)->size); 357 + XSTRING (XCAR (elt))->size);
358 } 358 }
359 359
360 /* Advance to next element. */ 360 /* Advance to next element. */
361 prev = next; 361 prev = next;
362 next = XCONS (next)->cdr; 362 next = XCDR (next);
363 } 363 }
364 364
365 /* If we scanned the whole list, it is short enough; don't change it. */ 365 /* If we scanned the whole list, it is short enough; don't change it. */
@@ -369,7 +369,7 @@ truncate_undo_list (list, minsize, maxsize)
369 /* Truncate at the boundary where we decided to truncate. */ 369 /* Truncate at the boundary where we decided to truncate. */
370 if (!NILP (last_boundary)) 370 if (!NILP (last_boundary))
371 { 371 {
372 XCONS (last_boundary)->cdr = Qnil; 372 XCDR (last_boundary) = Qnil;
373 return list; 373 return list;
374 } 374 }
375 else 375 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)
758 pid = vs->pid; 758 pid = vs->pid;
759 sys$setef (vs->eventFlag); 759 sys$setef (vs->eventFlag);
760 760
761 for (tail = Vprocess_alist; XSYMBOL (tail) != XSYMBOL (Qnil); tail = XCONS (tail)->cdr) 761 for (tail = Vprocess_alist; XSYMBOL (tail) != XSYMBOL (Qnil); tail = XCDR (tail))
762 { 762 {
763 proc = XCONS (XCONS (tail)->car)->cdr; 763 proc = XCDR (XCAR (tail));
764 p = XPROCESS (proc); 764 p = XPROCESS (proc);
765 if (EQ (p->childp, Qt) && XFASTINT (p->pid) == pid) 765 if (EQ (p->childp, Qt) && XFASTINT (p->pid) == pid)
766 break; 766 break;