Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
emacs
emacs
Commits
7d0393cf
Commit
7d0393cf
authored
Oct 18, 2002
by
Juanma Barranquero
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix typo in comment.
parent
d49e7392
Changes
10
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
970 additions
and
970 deletions
+970
-970
src/coding.c
src/coding.c
+2
-2
src/emacs.c
src/emacs.c
+1
-1
src/intervals.c
src/intervals.c
+28
-28
src/mac.c
src/mac.c
+143
-143
src/macfns.c
src/macfns.c
+6
-6
src/syntax.c
src/syntax.c
+34
-34
src/w32fns.c
src/w32fns.c
+322
-322
src/xdisp.c
src/xdisp.c
+12
-12
src/xsmfns.c
src/xsmfns.c
+29
-29
src/xterm.c
src/xterm.c
+393
-393
No files found.
src/coding.c
View file @
7d0393cf
...
...
@@ -6313,7 +6313,7 @@ highest priority. */)
the detecting source. Then code detectors can handle the tailing
byte sequence more accurately.
Fix me: This is not a
n
perfect solution. It is better that we
Fix me: This is not a perfect solution. It is better that we
add one more argument, say LAST_BLOCK, to all detect_coding_XXX.
*/
if (to == Z || (to == GPT && GAP_SIZE > 0))
...
...
@@ -6538,7 +6538,7 @@ unencodable_char_position (safe_chars, pos, p, pend, n)
{
int len;
int c = STRING_CHAR_AND_LENGTH (p, MAX_MULTIBYTE_LENGTH, len);
if (c >= 128
&& (CHAR_TABLE_P (safe_chars)
? NILP (CHAR_TABLE_REF (safe_chars, c))
...
...
src/emacs.c
View file @
7d0393cf
...
...
@@ -158,7 +158,7 @@ Lisp_Object Vprevious_system_messages_locale;
Lisp_Object
Vsystem_time_locale
;
Lisp_Object
Vprevious_system_time_locale
;
/* If non-zero, emacs should not attempt to use a
n
window-specific code,
/* If non-zero, emacs should not attempt to use a window-specific code,
but instead should use the virtual terminal under which it was started. */
int
inhibit_window_system
;
...
...
src/intervals.c
View file @
7d0393cf
...
...
@@ -347,10 +347,10 @@ rotate_right (interval)
/* Assuming that a right child exists, perform the following operation:
A B
/ \ / \
A B
/ \ / \
B => A
/ \ / \
/ \ / \
c c
*/
...
...
@@ -524,7 +524,7 @@ split_interval_right (interval, offset)
new
->
total_length
=
new_length
+
new
->
right
->
total_length
;
balance_an_interval
(
new
);
}
balance_possible_root_interval
(
interval
);
return
new
;
...
...
@@ -569,7 +569,7 @@ split_interval_left (interval, offset)
new
->
total_length
=
new_length
+
new
->
left
->
total_length
;
balance_an_interval
(
new
);
}
balance_possible_root_interval
(
interval
);
return
new
;
...
...
@@ -754,39 +754,39 @@ update_interval (i, pos)
if
(
NULL_INTERVAL_P
(
i
))
return
NULL_INTERVAL
;
while
(
1
)
while
(
1
)
{
if
(
pos
<
i
->
position
)
if
(
pos
<
i
->
position
)
{
/* Move left. */
if
(
pos
>=
i
->
position
-
TOTAL_LENGTH
(
i
->
left
))
if
(
pos
>=
i
->
position
-
TOTAL_LENGTH
(
i
->
left
))
{
i
->
left
->
position
=
i
->
position
-
TOTAL_LENGTH
(
i
->
left
)
+
LEFT_TOTAL_LENGTH
(
i
->
left
);
i
=
i
->
left
;
/* Move to the left child */
}
else
if
(
NULL_PARENT
(
i
))
else
if
(
NULL_PARENT
(
i
))
error
(
"Point before start of properties"
);
else
else
i
=
INTERVAL_PARENT
(
i
);
continue
;
}
else
if
(
pos
>=
INTERVAL_LAST_POS
(
i
))
{
/* Move right. */
if
(
pos
<
INTERVAL_LAST_POS
(
i
)
+
TOTAL_LENGTH
(
i
->
right
))
if
(
pos
<
INTERVAL_LAST_POS
(
i
)
+
TOTAL_LENGTH
(
i
->
right
))
{
i
->
right
->
position
=
INTERVAL_LAST_POS
(
i
)
+
LEFT_TOTAL_LENGTH
(
i
->
right
);
i
=
i
->
right
;
/* Move to the right child */
}
else
if
(
NULL_PARENT
(
i
))
else
if
(
NULL_PARENT
(
i
))
error
(
"Point after end of properties"
);
else
else
i
=
INTERVAL_PARENT
(
i
);
continue
;
}
else
else
return
i
;
}
}
...
...
@@ -874,7 +874,7 @@ adjust_intervals_for_insertion (tree, position, length)
int
eobp
=
0
;
Lisp_Object
parent
;
int
offset
;
if
(
TOTAL_LENGTH
(
tree
)
==
0
)
/* Paranoia */
abort
();
...
...
@@ -989,7 +989,7 @@ adjust_intervals_for_insertion (tree, position, length)
temp
->
total_length
+=
length
;
temp
=
balance_possible_root_interval
(
temp
);
}
/* If at least one interval has sticky properties,
we check the stickiness property by property.
...
...
@@ -1046,7 +1046,7 @@ adjust_intervals_for_insertion (tree, position, length)
temp
=
balance_possible_root_interval
(
temp
);
}
}
return
tree
;
}
...
...
@@ -1212,7 +1212,7 @@ merge_properties_sticky (pleft, pright)
cat
=
textget
(
props
,
Qcategory
);
if
(
!
NILP
(
front
)
&&
&&
/* If we have inherited a front-stick category property that is t,
we don't need to set up a detailed one. */
!
(
!
NILP
(
cat
)
&&
SYMBOLP
(
cat
)
...
...
@@ -1222,7 +1222,7 @@ merge_properties_sticky (pleft, pright)
}
/* Delete a
n
node I from its interval tree by merging its subtrees
/* Delete a node I from its interval tree by merging its subtrees
into one subtree which is then returned. Caller is responsible for
storing the resulting subtree into its parent. */
...
...
@@ -1351,7 +1351,7 @@ interval_deletion_adjustment (tree, from, amount)
else
{
/* How much can we delete from this interval? */
int
my_amount
=
((
tree
->
total_length
int
my_amount
=
((
tree
->
total_length
-
RIGHT_TOTAL_LENGTH
(
tree
))
-
relative_position
);
...
...
@@ -1361,7 +1361,7 @@ interval_deletion_adjustment (tree, from, amount)
tree
->
total_length
-=
amount
;
if
(
LENGTH
(
tree
)
==
0
)
delete_interval
(
tree
);
return
amount
;
}
...
...
@@ -1780,7 +1780,7 @@ graft_intervals_into_buffer (source, position, length, buffer, inherit)
The properties of under are the result of
adjust_intervals_for_insertion, so stickiness has
already been taken care of. */
while
(
!
NULL_INTERVAL_P
(
over
))
{
if
(
LENGTH
(
over
)
<
LENGTH
(
under
))
...
...
@@ -1805,7 +1805,7 @@ graft_intervals_into_buffer (source, position, length, buffer, inherit)
/* Get the value of property PROP from PLIST,
which is the plist of an interval.
We check for direct properties, for categories with property PROP,
We check for direct properties, for categories with property PROP,
and for PROP appearing on the default-text-properties list. */
Lisp_Object
...
...
@@ -1887,7 +1887,7 @@ temp_set_point_both (buffer, charpos, bytepos)
BUF_PT
(
buffer
)
=
charpos
;
}
/* Set point in BUFFER to CHARPOS. If the target position is
/* Set point in BUFFER to CHARPOS. If the target position is
before an intangible character, move to an ok place. */
void
...
...
@@ -1907,7 +1907,7 @@ set_point (buffer, charpos)
TEST_OFFS should be either 0 or -1, and ADJ should be either 1 or -1.
Note that `stickiness' is determined by overlay marker insertion types,
if the invisible property comes from an overlay. */
if the invisible property comes from an overlay. */
static
int
adjust_for_invis_intang
(
pos
,
test_offs
,
adj
,
test_intang
)
...
...
@@ -1945,7 +1945,7 @@ adjust_for_invis_intang (pos, test_offs, adj, test_intang)
}
/* Set point in BUFFER to CHARPOS, which corresponds to byte
position BYTEPOS. If the target position is
position BYTEPOS. If the target position is
before an intangible character, move to an ok place. */
void
...
...
@@ -2218,7 +2218,7 @@ move_if_not_intangible (position)
}
/* If the whole stretch between PT and POSITION isn't intangible,
/* If the whole stretch between PT and POSITION isn't intangible,
try moving to POSITION (which means we actually move farther
if POSITION is inside of intangible text). */
...
...
@@ -2265,7 +2265,7 @@ get_property_and_range (pos, prop, val, start, end, object)
*
start
=
i
->
position
;
next
=
next_interval
(
i
);
while
(
!
NULL_INTERVAL_P
(
next
)
while
(
!
NULL_INTERVAL_P
(
next
)
&&
EQ
(
*
val
,
textget
(
next
->
plist
,
prop
)))
i
=
next
,
next
=
next_interval
(
next
);
*
end
=
i
->
position
+
LENGTH
(
i
);
...
...
src/mac.c
View file @
7d0393cf
...
...
@@ -91,7 +91,7 @@ string_cat_and_replace (char *s1, const char *s2, int n, char a, char b)
int
l2
=
strlen
(
s2
);
char
*
p
=
s1
+
l1
;
int
i
;
strncat
(
s1
,
s2
,
n
);
for
(
i
=
0
;
i
<
l2
;
i
++
)
{
...
...
@@ -104,27 +104,27 @@ string_cat_and_replace (char *s1, const char *s2, int n, char a, char b)
/* Convert a Mac pathname to Posix form. A Mac full pathname is one
that does not begin with a ':' and contains at least one ':'. A Mac
full pathname causes a
n
'/' to be prepended to the Posix pathname.
full pathname causes a '/' to be prepended to the Posix pathname.
The algorithm for the rest of the pathname is as follows:
For each segment between two ':',
if it is non-null, copy as is and then add a '/' at the end,
otherwise, insert a "../" into the Posix pathname.
Returns 1 if successful; 0 if fails. */
int
mac_to_posix_pathname
(
const
char
*
mfn
,
char
*
ufn
,
int
ufnbuflen
)
{
const
char
*
p
,
*
q
,
*
pe
;
strcpy
(
ufn
,
""
);
if
(
*
mfn
==
'\0'
)
return
1
;
p
=
strchr
(
mfn
,
':'
);
if
(
p
!=
0
&&
p
!=
mfn
)
/* full pathname */
strcat
(
ufn
,
"/"
);
p
=
mfn
;
if
(
*
p
==
':'
)
p
++
;
...
...
@@ -159,7 +159,7 @@ mac_to_posix_pathname (const char *mfn, char *ufn, int ufnbuflen)
p
=
pe
;
}
}
return
1
;
}
...
...
@@ -169,20 +169,20 @@ extern char *get_temp_dir_name ();
/* Convert a Posix pathname to Mac form. Approximately reverse of the
above in algorithm. */
int
posix_to_mac_pathname
(
const
char
*
ufn
,
char
*
mfn
,
int
mfnbuflen
)
{
const
char
*
p
,
*
q
,
*
pe
;
char
expanded_pathname
[
MAXPATHLEN
+
1
];
strcpy
(
mfn
,
""
);
if
(
*
ufn
==
'\0'
)
return
1
;
p
=
ufn
;
/* Check for and handle volume names. Last comparison: strangely
somewhere "/.emacs" is passed. A temporary fix for now. */
if
(
*
p
==
'/'
&&
strchr
(
p
+
1
,
'/'
)
==
NULL
&&
strcmp
(
p
,
"/.emacs"
)
!=
0
)
...
...
@@ -216,10 +216,10 @@ posix_to_mac_pathname (const char *ufn, char *mfn, int mfnbuflen)
strcat
(
expanded_pathname
,
p
);
p
=
expanded_pathname
;
/* now p points to the pathname with emacs dir prefix */
}
}
else
if
(
*
p
!=
'/'
)
/* relative pathname */
strcat
(
mfn
,
":"
);
if
(
*
p
==
'/'
)
p
++
;
...
...
@@ -252,7 +252,7 @@ posix_to_mac_pathname (const char *ufn, char *mfn, int mfnbuflen)
p
=
pe
;
}
}
return
1
;
}
...
...
@@ -311,7 +311,7 @@ stat_noalias (const char *path, struct stat *buf)
cipb
.
hFileInfo
.
ioDirID
=
0
;
cipb
.
hFileInfo
.
ioFDirIndex
=
0
;
/* set to 0 to get information about specific dir or file */
errno
=
PBGetCatInfo
(
&
cipb
,
false
);
if
(
errno
==
-
43
)
/* -43: fnfErr defined in Errors.h */
errno
=
ENOENT
;
...
...
@@ -321,7 +321,7 @@ stat_noalias (const char *path, struct stat *buf)
if
(
cipb
.
hFileInfo
.
ioFlAttrib
&
0x10
)
/* bit 4 = 1 for directories */
{
buf
->
st_mode
=
S_IFDIR
|
S_IREAD
|
S_IEXEC
;
if
(
!
(
cipb
.
hFileInfo
.
ioFlAttrib
&
0x1
))
buf
->
st_mode
|=
S_IWRITE
;
/* bit 1 = 1 for locked files/directories */
buf
->
st_ino
=
cipb
.
dirInfo
.
ioDrDirID
;
...
...
@@ -377,7 +377,7 @@ lstat (const char *path, struct stat *buf)
if
(
find_true_pathname
(
path
,
true_pathname
,
MAXPATHLEN
+
1
)
==
-
1
)
return
-
1
;
return
stat_noalias
(
true_pathname
,
buf
);
}
...
...
@@ -386,16 +386,16 @@ int
stat
(
const
char
*
path
,
struct
stat
*
sb
)
{
int
result
;
char
true_pathname
[
MAXPATHLEN
+
1
],
fully_resolved_name
[
MAXPATHLEN
+
1
];
char
true_pathname
[
MAXPATHLEN
+
1
],
fully_resolved_name
[
MAXPATHLEN
+
1
];
int
len
;
if
((
result
=
stat_noalias
(
path
,
sb
))
>=
0
&&
!
(
sb
->
st_mode
&
S_IFLNK
))
return
result
;
if
(
find_true_pathname
(
path
,
true_pathname
,
MAXPATHLEN
+
1
)
==
-
1
)
return
-
1
;
len
=
readlink
(
true_pathname
,
fully_resolved_name
,
MAXPATHLEN
);
if
(
len
>
-
1
)
{
...
...
@@ -437,10 +437,10 @@ mkdir (const char *dirname, int mode)
HFileParam
hfpb
;
char
true_pathname
[
MAXPATHLEN
+
1
],
mac_pathname
[
MAXPATHLEN
+
1
];
if
(
find_true_pathname
(
dirname
,
true_pathname
,
MAXPATHLEN
+
1
)
==
-
1
)
return
-
1
;
if
(
posix_to_mac_pathname
(
true_pathname
,
mac_pathname
,
MAXPATHLEN
+
1
)
==
0
)
return
-
1
;
...
...
@@ -448,7 +448,7 @@ mkdir (const char *dirname, int mode)
hfpb
.
ioNamePtr
=
mac_pathname
;
hfpb
.
ioVRefNum
=
0
;
/* ignored unless name is invalid */
hfpb
.
ioDirID
=
0
;
/* parent is the root */
errno
=
PBDirCreate
((
HParmBlkPtr
)
&
hfpb
,
false
);
/* just return the Mac OSErr code for now */
return
errno
==
noErr
?
0
:
-
1
;
...
...
@@ -460,7 +460,7 @@ sys_rmdir (const char *dirname)
{
HFileParam
hfpb
;
char
mac_pathname
[
MAXPATHLEN
+
1
];
if
(
posix_to_mac_pathname
(
dirname
,
mac_pathname
,
MAXPATHLEN
+
1
)
==
0
)
return
-
1
;
...
...
@@ -468,7 +468,7 @@ sys_rmdir (const char *dirname)
hfpb
.
ioNamePtr
=
mac_pathname
;
hfpb
.
ioVRefNum
=
0
;
/* ignored unless name is invalid */
hfpb
.
ioDirID
=
0
;
/* parent is the root */
errno
=
PBHDelete
((
HParmBlkPtr
)
&
hfpb
,
false
);
return
errno
==
noErr
?
0
:
-
1
;
}
...
...
@@ -487,14 +487,14 @@ execvp (const char *path, ...)
int
utime
(
const
char
*
path
,
const
struct
utimbuf
*
times
)
{
char
true_pathname
[
MAXPATHLEN
+
1
],
fully_resolved_name
[
MAXPATHLEN
+
1
];
char
true_pathname
[
MAXPATHLEN
+
1
],
fully_resolved_name
[
MAXPATHLEN
+
1
];
int
len
;
char
mac_pathname
[
MAXPATHLEN
+
1
];
CInfoPBRec
cipb
;
if
(
find_true_pathname
(
path
,
true_pathname
,
MAXPATHLEN
+
1
)
==
-
1
)
return
-
1
;
len
=
readlink
(
true_pathname
,
fully_resolved_name
,
MAXPATHLEN
);
if
(
len
>
-
1
)
fully_resolved_name
[
len
]
=
'\0'
;
...
...
@@ -508,9 +508,9 @@ utime (const char *path, const struct utimbuf *times)
cipb
.
hFileInfo
.
ioNamePtr
=
mac_pathname
;
cipb
.
hFileInfo
.
ioVRefNum
=
0
;
cipb
.
hFileInfo
.
ioDirID
=
0
;
cipb
.
hFileInfo
.
ioFDirIndex
=
0
;
cipb
.
hFileInfo
.
ioFDirIndex
=
0
;
/* set to 0 to get information about specific dir or file */
errno
=
PBGetCatInfo
(
&
cipb
,
false
);
if
(
errno
!=
noErr
)
return
-
1
;
...
...
@@ -549,14 +549,14 @@ utime (const char *path, const struct utimbuf *times)
int
access
(
const
char
*
path
,
int
mode
)
{
char
true_pathname
[
MAXPATHLEN
+
1
],
fully_resolved_name
[
MAXPATHLEN
+
1
];
char
true_pathname
[
MAXPATHLEN
+
1
],
fully_resolved_name
[
MAXPATHLEN
+
1
];
int
len
;
char
mac_pathname
[
MAXPATHLEN
+
1
];
CInfoPBRec
cipb
;
if
(
find_true_pathname
(
path
,
true_pathname
,
MAXPATHLEN
+
1
)
==
-
1
)
return
-
1
;
len
=
readlink
(
true_pathname
,
fully_resolved_name
,
MAXPATHLEN
);
if
(
len
>
-
1
)
fully_resolved_name
[
len
]
=
'\0'
;
...
...
@@ -572,7 +572,7 @@ access (const char *path, int mode)
cipb
.
hFileInfo
.
ioDirID
=
0
;
cipb
.
hFileInfo
.
ioFDirIndex
=
0
;
/* set to 0 to get information about specific dir or file */
errno
=
PBGetCatInfo
(
&
cipb
,
false
);
if
(
errno
!=
noErr
)
return
-
1
;
...
...
@@ -605,16 +605,16 @@ access (const char *path, int mode)
int
sys_open
(
const
char
*
path
,
int
oflag
)
{
char
true_pathname
[
MAXPATHLEN
+
1
],
fully_resolved_name
[
MAXPATHLEN
+
1
];
char
true_pathname
[
MAXPATHLEN
+
1
],
fully_resolved_name
[
MAXPATHLEN
+
1
];
int
len
;
char
mac_pathname
[
MAXPATHLEN
+
1
];
if
(
strcmp
(
path
,
"/dev/null"
)
==
0
)
return
DEV_NULL_FD
;
/* some bogus fd to be ignored in write */
if
(
find_true_pathname
(
path
,
true_pathname
,
MAXPATHLEN
+
1
)
==
-
1
)
return
-
1
;
len
=
readlink
(
true_pathname
,
fully_resolved_name
,
MAXPATHLEN
);
if
(
len
>
-
1
)
fully_resolved_name
[
len
]
=
'\0'
;
...
...
@@ -642,10 +642,10 @@ sys_open (const char *path, int oflag)
int
sys_creat
(
const
char
*
path
,
mode_t
mode
)
{
char
true_pathname
[
MAXPATHLEN
+
1
];
char
true_pathname
[
MAXPATHLEN
+
1
];
int
len
;
char
mac_pathname
[
MAXPATHLEN
+
1
];
if
(
find_true_pathname
(
path
,
true_pathname
,
MAXPATHLEN
+
1
)
==
-
1
)
return
-
1
;
...
...
@@ -668,13 +668,13 @@ sys_creat (const char *path, mode_t mode)
int
sys_unlink
(
const
char
*
path
)
{
char
true_pathname
[
MAXPATHLEN
+
1
],
fully_resolved_name
[
MAXPATHLEN
+
1
];
char
true_pathname
[
MAXPATHLEN
+
1
],
fully_resolved_name
[
MAXPATHLEN
+
1
];
int
len
;
char
mac_pathname
[
MAXPATHLEN
+
1
];
if
(
find_true_pathname
(
path
,
true_pathname
,
MAXPATHLEN
+
1
)
==
-
1
)
return
-
1
;
len
=
readlink
(
true_pathname
,
fully_resolved_name
,
MAXPATHLEN
);
if
(
len
>
-
1
)
fully_resolved_name
[
len
]
=
'\0'
;
...
...
@@ -723,13 +723,13 @@ int
sys_rename
(
const
char
*
old_name
,
const
char
*
new_name
)
{
char
true_old_pathname
[
MAXPATHLEN
+
1
],
true_new_pathname
[
MAXPATHLEN
+
1
];
char
fully_resolved_old_name
[
MAXPATHLEN
+
1
];
char
fully_resolved_old_name
[
MAXPATHLEN
+
1
];
int
len
;
char
mac_old_name
[
MAXPATHLEN
+
1
],
mac_new_name
[
MAXPATHLEN
+
1
];
if
(
find_true_pathname
(
old_name
,
true_old_pathname
,
MAXPATHLEN
+
1
)
==
-
1
)
return
-
1
;
len
=
readlink
(
true_old_pathname
,
fully_resolved_old_name
,
MAXPATHLEN
);
if
(
len
>
-
1
)
fully_resolved_old_name
[
len
]
=
'\0'
;
...
...
@@ -738,7 +738,7 @@ sys_rename (const char * old_name, const char * new_name)
if
(
find_true_pathname
(
new_name
,
true_new_pathname
,
MAXPATHLEN
+
1
)
==
-
1
)
return
-
1
;
if
(
strcmp
(
fully_resolved_old_name
,
true_new_pathname
)
==
0
)
return
0
;
...
...
@@ -746,7 +746,7 @@ sys_rename (const char * old_name, const char * new_name)
mac_old_name
,
MAXPATHLEN
+
1
))
return
-
1
;
if
(
!
posix_to_mac_pathname
(
true_new_pathname
,
mac_new_name
,
MAXPATHLEN
+
1
))
return
-
1
;
...
...
@@ -754,7 +754,7 @@ sys_rename (const char * old_name, const char * new_name)
file in Unix. CW version fails in these situation. So we add a
call to unlink here. */
(
void
)
unlink
(
mac_new_name
);
return
rename
(
mac_old_name
,
mac_new_name
);
}
...
...
@@ -764,13 +764,13 @@ extern FILE *fopen (const char *name, const char *mode);
FILE
*
sys_fopen
(
const
char
*
name
,
const
char
*
mode
)
{
char
true_pathname
[
MAXPATHLEN
+
1
],
fully_resolved_name
[
MAXPATHLEN
+
1
];
char
true_pathname
[
MAXPATHLEN
+
1
],
fully_resolved_name
[
MAXPATHLEN
+
1
];
int
len
;
char
mac_pathname
[
MAXPATHLEN
+
1
];
if
(
find_true_pathname
(
name
,
true_pathname
,
MAXPATHLEN
+
1
)
==
-
1
)
return
0
;
len
=
readlink
(
true_pathname
,
fully_resolved_name
,
MAXPATHLEN
);
if
(
len
>
-
1
)
fully_resolved_name
[
len
]
=
'\0'
;
...
...
@@ -843,7 +843,7 @@ select (n, rfds, wfds, efds, timeout)
EMACS_GET_TIME
(
end_time
);
EMACS_ADD_TIME
(
end_time
,
end_time
,
*
timeout
);
do
{
/* Also return true if an event other than a keyDown has
...
...
@@ -858,7 +858,7 @@ select (n, rfds, wfds, efds, timeout)
{
Point
mouse_pos
;
static
Point
old_mouse_pos
=
{
-
1
,
-
1
};
GetMouse
(
&
mouse_pos
);
if
(
!
EqualPt
(
mouse_pos
,
old_mouse_pos
))
{
...
...
@@ -866,10 +866,10 @@ select (n, rfds, wfds, efds, timeout)
return
1
;
}
}
WaitNextEvent
(
0
,
&
e
,
1UL
,
NULL
);
/* Accept no event; wait 1
tic. by T.I. */
EMACS_GET_TIME
(
now
);
EMACS_SUB_TIME
(
now
,
end_time
,
now
);
}
...
...
@@ -887,18 +887,18 @@ pause ()
{
EventRecord
e
;
unsigned
long
tick
;
if
(
!
target_ticks
)
/* no alarm pending */
return
-
1
;
if
((
tick
=
TickCount
())
<
target_ticks
)
WaitNextEvent
(
0
,
&
e
,
target_ticks
-
tick
,
NULL
);
/* Accept no event;
just wait. by T.I. */
target_ticks
=
0
;
if
(
alarm_signal_func
)
(
*
alarm_signal_func
)(
SIGALRM
);
return
0
;
}
...
...
@@ -907,9 +907,9 @@ int
alarm
(
int
seconds
)
{
long
remaining
=
target_ticks
?
(
TickCount
()
-
target_ticks
)
/
60
:
0
;
target_ticks
=
seconds
?
TickCount
()
+
60
*
seconds
:
0
;
return
(
remaining
<
0
)
?
0
:
(
unsigned
int
)
remaining
;
}
...
...
@@ -932,9 +932,9 @@ sys_signal (int signal_num, __signal_func_ptr signal_func)
else
{
#ifdef __MRC__
__sigfun
old_signal_func
;
__sigfun
old_signal_func
;
#elif __MWERKS__
__signal_func_ptr
old_signal_func
;
__signal_func_ptr
old_signal_func
;
#else
You
lose
!!!
#endif
...
...
@@ -979,7 +979,7 @@ gettimeofday (tp)
/* Get time since boot */
Microseconds
(
&
uw_microseconds
);
/* Convert to time since midnight*/
w_microseconds
.
hi
=
uw_microseconds
.
hi
;
w_microseconds
.
lo
=
uw_microseconds
.
lo
;
...
...
@@ -1019,7 +1019,7 @@ struct tm *
sys_gmtime
(
const
time_t
*
timer
)
{