Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
emacs
emacs
Commits
c1d497be
Commit
c1d497be
authored
Sep 13, 1999
by
Ken Raeburn
Browse files
Use XCAR and XCDR instead of explicit member access.
parent
03699b14
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
44 additions
and
44 deletions
+44
-44
src/lread.c
src/lread.c
+13
-13
src/search.c
src/search.c
+4
-4
src/sunfns.c
src/sunfns.c
+2
-2
src/syntax.c
src/syntax.c
+2
-2
src/undo.c
src/undo.c
+21
-21
src/vmsproc.c
src/vmsproc.c
+2
-2
No files found.
src/lread.c
View file @
c1d497be
...
...
@@ -748,8 +748,8 @@ Return t if file exists.")
GCPRO1
(
file
);
lispstream
=
Fcons
(
Qnil
,
Qnil
);
XSETFASTINT
(
XC
ONS
(
lispstream
)
->
car
,
(
EMACS_UINT
)
stream
>>
16
);
XSETFASTINT
(
XC
ONS
(
lispstream
)
->
cdr
,
(
EMACS_UINT
)
stream
&
0xffff
);
XSETFASTINT
(
XC
AR
(
lispstream
),
(
EMACS_UINT
)
stream
>>
16
);
XSETFASTINT
(
XC
DR
(
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
(
XC
ONS
(
stream
)
->
car
)
<<
16
|
XFASTINT
(
XC
ONS
(
stream
)
->
cdr
)));
fclose
((
FILE
*
)
(
XFASTINT
(
XC
AR
(
stream
))
<<
16
|
XFASTINT
(
XC
DR
(
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
=
XC
ONS
(
tail
)
->
cdr
)
close
(
XFASTINT
(
XC
ONS
(
tail
)
->
car
));
for
(
tail
=
load_descriptor_list
;
!
NILP
(
tail
);
tail
=
XC
DR
(
tail
))
close
(
XFASTINT
(
XC
AR
(
tail
)));
#endif
}
...
...
@@ -2454,8 +2454,8 @@ read_vector (readcharfun, bytecodeflag)
error
(
"invalid byte code"
);
otem
=
XCONS
(
item
);
bytestr
=
XC
ONS
(
item
)
->
car
;
item
=
XC
ONS
(
item
)
->
cdr
;
bytestr
=
XC
AR
(
item
);
item
=
XC
DR
(
item
);
free_cons
(
otem
);
}
...
...
@@ -2547,7 +2547,7 @@ read_list (flag, readcharfun)
{
GCPRO2
(
val
,
tail
);
if
(
!
NILP
(
tail
))
XC
ONS
(
tail
)
->
cdr
=
read0
(
readcharfun
);
XC
DR
(
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
(
XC
ONS
(
val
)
->
cdr
);
int
pos
=
XINT
(
XC
DR
(
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
))
XC
ONS
(
tail
)
->
cdr
=
tem
;
XC
DR
(
tail
)
=
tem
;
else
val
=
tem
;
tail
=
tem
;
...
...
@@ -3265,7 +3265,7 @@ init_lread ()
for
(
path_tail
=
Vload_path
;
!
NILP
(
path_tail
);
path_tail
=
XC
ONS
(
path_tail
)
->
cdr
)
path_tail
=
XC
DR
(
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
"
,
XC
ONS
(
path_tail
)
->
car
);
XC
AR
(
path_tail
));
}
}
}
...
...
src/search.c
View file @
c1d497be
...
...
@@ -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
=
XC
ONS
(
tail
)
->
cdr
)
i
++
,
tail
=
XC
DR
(
tail
))
{
if
(
i
<
2
*
len
+
2
)
XC
ONS
(
tail
)
->
car
=
data
[
i
];
XC
AR
(
tail
)
=
data
[
i
];
else
XC
ONS
(
tail
)
->
car
=
Qnil
;
XC
AR
(
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
)
XC
ONS
(
prev
)
->
cdr
=
Flist
(
2
*
len
+
2
-
i
,
data
+
i
);
XC
DR
(
prev
)
=
Flist
(
2
*
len
+
2
-
i
,
data
+
i
);
return
reuse
;
}
...
...
src/sunfns.c
View file @
c1d497be
...
...
@@ -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
(
XC
ONS
(
Pair
)
->
cdr
);
ypos
+=
XINT
(
XC
ONS
(
Pair
)
->
car
);
xpos
+=
XINT
(
XC
DR
(
Pair
));
ypos
+=
XINT
(
XC
AR
(
Pair
));
}
#endif
...
...
src/syntax.c
View file @
c1d497be
...
...
@@ -979,8 +979,8 @@ describe_syntax (value)
return
;
}
first
=
XC
ONS
(
value
)
->
car
;
match_lisp
=
XC
ONS
(
value
)
->
cdr
;
first
=
XC
AR
(
value
);
match_lisp
=
XC
DR
(
value
);
if
(
!
INTEGERP
(
first
)
||
!
(
NILP
(
match_lisp
)
||
INTEGERP
(
match_lisp
)))
{
...
...
src/undo.c
View file @
c1d497be
...
...
@@ -66,13 +66,13 @@ record_insert (beg, length)
if
(
CONSP
(
current_buffer
->
undo_list
))
{
Lisp_Object
elt
;
elt
=
XC
ONS
(
current_buffer
->
undo_list
)
->
car
;
elt
=
XC
AR
(
current_buffer
->
undo_list
);
if
(
CONSP
(
elt
)
&&
INTEGERP
(
XC
ONS
(
elt
)
->
car
)
&&
INTEGERP
(
XC
ONS
(
elt
)
->
cdr
)
&&
XINT
(
XC
ONS
(
elt
)
->
cdr
)
==
beg
)
&&
INTEGERP
(
XC
AR
(
elt
))
&&
INTEGERP
(
XC
DR
(
elt
))
&&
XINT
(
XC
DR
(
elt
))
==
beg
)
{
XSETINT
(
XC
ONS
(
elt
)
->
cdr
,
beg
+
length
);
XSETINT
(
XC
DR
(
elt
),
beg
+
length
);
return
;
}
}
...
...
@@ -114,10 +114,10 @@ record_delete (beg, string)
while
(
1
)
{
elt
=
XC
ONS
(
tail
)
->
car
;
if
(
NILP
(
elt
)
||
!
(
CONSP
(
elt
)
&&
MARKERP
(
XC
ONS
(
elt
)
->
car
)))
elt
=
XC
AR
(
tail
);
if
(
NILP
(
elt
)
||
!
(
CONSP
(
elt
)
&&
MARKERP
(
XC
AR
(
elt
))))
break
;
tail
=
XC
ONS
(
tail
)
->
cdr
;
tail
=
XC
DR
(
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. */
XC
ONS
(
pending_boundary
)
->
cdr
=
current_buffer
->
undo_list
;
XC
DR
(
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
(
XC
ONS
(
next
)
->
car
))
if
(
CONSP
(
next
)
&&
NILP
(
XC
AR
(
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
=
XC
ONS
(
next
)
->
cdr
;
next
=
XC
DR
(
next
);
}
while
(
CONSP
(
next
)
&&
!
NILP
(
XC
ONS
(
next
)
->
car
))
while
(
CONSP
(
next
)
&&
!
NILP
(
XC
AR
(
next
)))
{
Lisp_Object
elt
;
elt
=
XC
ONS
(
next
)
->
car
;
elt
=
XC
AR
(
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
(
XC
ONS
(
elt
)
->
car
))
if
(
STRINGP
(
XC
AR
(
elt
)))
size_so_far
+=
(
sizeof
(
struct
Lisp_String
)
-
1
+
XSTRING
(
XC
ONS
(
elt
)
->
car
)
->
size
);
+
XSTRING
(
XC
AR
(
elt
))
->
size
);
}
/* Advance to next element. */
prev
=
next
;
next
=
XC
ONS
(
next
)
->
cdr
;
next
=
XC
DR
(
next
);
}
if
(
CONSP
(
next
))
last_boundary
=
prev
;
...
...
@@ -332,7 +332,7 @@ truncate_undo_list (list, minsize, maxsize)
while
(
CONSP
(
next
))
{
Lisp_Object
elt
;
elt
=
XC
ONS
(
next
)
->
car
;
elt
=
XC
AR
(
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
(
XC
ONS
(
elt
)
->
car
))
if
(
STRINGP
(
XC
AR
(
elt
)))
size_so_far
+=
(
sizeof
(
struct
Lisp_String
)
-
1
+
XSTRING
(
XC
ONS
(
elt
)
->
car
)
->
size
);
+
XSTRING
(
XC
AR
(
elt
))
->
size
);
}
/* Advance to next element. */
prev
=
next
;
next
=
XC
ONS
(
next
)
->
cdr
;
next
=
XC
DR
(
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
))
{
XC
ONS
(
last_boundary
)
->
cdr
=
Qnil
;
XC
DR
(
last_boundary
)
=
Qnil
;
return
list
;
}
else
...
...
src/vmsproc.c
View file @
c1d497be
...
...
@@ -758,9 +758,9 @@ child_sig (vs)
pid
=
vs
->
pid
;
sys
$
setef
(
vs
->
eventFlag
);
for
(
tail
=
Vprocess_alist
;
XSYMBOL
(
tail
)
!=
XSYMBOL
(
Qnil
);
tail
=
XC
ONS
(
tail
)
->
cdr
)
for
(
tail
=
Vprocess_alist
;
XSYMBOL
(
tail
)
!=
XSYMBOL
(
Qnil
);
tail
=
XC
DR
(
tail
))
{
proc
=
XC
ONS
(
XC
ONS
(
tail
)
->
car
)
->
cdr
;
proc
=
XC
DR
(
XC
AR
(
tail
)
)
;
p
=
XPROCESS
(
proc
);
if
(
EQ
(
p
->
childp
,
Qt
)
&&
XFASTINT
(
p
->
pid
)
==
pid
)
break
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment