Mercurial > hg > xemacs-beta
diff src/process.c @ 5581:56144c8593a8
Mechanically change INT to FIXNUM in our sources.
src/ChangeLog addition:
2011-10-09 Aidan Kehoe <kehoea@parhasard.net>
[...]
Mechanically change INT (where it refers to non-bignum Lisp
integers) to FIXNUM in our sources. Done for the following
functions, enums, and macros: Lisp_Type_Int_Even,
Lisp_Type_Int_Odd, INT_GCBITS, INT_VALBITS, make_int(), INTP(),
XINT(), CHECK_INT(), XREALINT(), INT_PLUS(), INT_MINUS(),
EMACS_INT_MAX (to MOST_POSITIVE_FIXNUM), EMACS_INT_MIN (to
MOST_NEGATIVE_FIXNUM), NUMBER_FITS_IN_AN_EMACS_INT() to
NUMBER_FITS_IN_A_FIXNUM(), XFLOATINT, XCHAR_OR_INT, INT_OR_FLOAT.
The EMACS_INT typedef was not changed, it does not describe
non-bignum Lisp integers.
Script that did the change available in
http://mid.gmane.org/20067.17650.181273.12014@parhasard.net .
modules/ChangeLog addition:
2011-10-09 Aidan Kehoe <kehoea@parhasard.net>
[...]
Mechanically change INT to FIXNUM, where the usage describes non-bignum
Lisp integers. See the src/ChangeLog entry for more details.
man/ChangeLog addition:
2011-10-09 Aidan Kehoe <kehoea@parhasard.net>
* internals/internals.texi (How Lisp Objects Are Represented in C):
* internals/internals.texi (Integers and Characters):
Mechanically change INT to FIXNUM, where the usage describes non-bignum
Lisp integers.
author | Aidan Kehoe <kehoea@parhasard.net> |
---|---|
date | Sun, 09 Oct 2011 09:51:57 +0100 |
parents | 8d29f1c4bb98 |
children | 2dbefd79b3d3 |
line wrap: on
line diff
--- a/src/process.c Sat Oct 08 12:26:09 2011 +0100 +++ b/src/process.c Sun Oct 09 09:51:57 2011 +0100 @@ -630,7 +630,7 @@ pid = PROCMETH (create_process, (p, argv, nargv, program, cur_dir, separate_err)); - p->pid = make_int (pid); + p->pid = make_fixnum (pid); if (PROCESS_READABLE_P (p)) event_stream_select_process (p, 1, 1); } @@ -797,10 +797,10 @@ /* Make the process marker point into the process buffer (if any). */ if (!NILP (buffer)) Fset_marker (XPROCESS (process)->mark, - make_int (BUF_ZV (XBUFFER (buffer))), buffer); + make_fixnum (BUF_ZV (XBUFFER (buffer))), buffer); if (!NILP (stderr_buffer)) Fset_marker (XPROCESS (process)->stderr_mark, - make_int (BUF_ZV (XBUFFER (stderr_buffer))), stderr_buffer); + make_fixnum (BUF_ZV (XBUFFER (stderr_buffer))), stderr_buffer); /* If an error occurs and we can't start the process, we want to remove it from the process list. This means that each error @@ -975,11 +975,11 @@ (process, height, width)) { CHECK_PROCESS (process); - check_integer_range (height, Qzero, make_integer (EMACS_INT_MAX)); - check_integer_range (width, Qzero, make_integer (EMACS_INT_MAX)); + check_integer_range (height, Qzero, make_integer (MOST_POSITIVE_FIXNUM)); + check_integer_range (width, Qzero, make_integer (MOST_POSITIVE_FIXNUM)); return MAYBE_INT_PROCMETH (set_window_size, - (XPROCESS (process), XINT (height), XINT (width))) <= 0 + (XPROCESS (process), XFIXNUM (height), XFIXNUM (width))) <= 0 ? Qnil : Qt; } @@ -1081,8 +1081,8 @@ asynchronously (i.e. from within QUIT). */ /* Don't catch errors here; we're not in any critical code. */ filter_result = call2 (filter, process, Qnil); - CHECK_INT (filter_result); - return XINT (filter_result); + CHECK_FIXNUM (filter_result); + return XFIXNUM (filter_result); } nbytes = Lstream_read (read_stderr ? XLSTREAM (DATA_ERRSTREAM (p)) : @@ -1130,7 +1130,7 @@ buffer_insert_raw_string (buf, chars, nbytes); #endif - Fset_marker (mark, make_int (BUF_PT (buf)), buffer); + Fset_marker (mark, make_fixnum (BUF_PT (buf)), buffer); MARK_MODELINE_CHANGED; unbind_to (spec); @@ -1612,7 +1612,7 @@ { if (code == 0) return build_msg_string ("finished\n"); - string = Fnumber_to_string (make_int (code)); + string = Fnumber_to_string (make_fixnum (code)); if (coredump) string2 = build_msg_string (" (core dumped)\n"); else @@ -1680,7 +1680,7 @@ /* #### extra check for terminated processes, in case a SIGCHLD got missed (this seems to happen sometimes, I'm not sure why). */ - if (INTP (p->pid)) + if (FIXNUMP (p->pid)) MAYBE_PROCMETH (update_status_if_terminated, (p)); this_process_tick = p->tick; @@ -1729,7 +1729,7 @@ Finsert (1, &p->name); buffer_insert_ascstring (current_buffer, " "); Finsert (1, &msg); - Fset_marker (p->mark, make_int (BUF_PT (current_buffer)), + Fset_marker (p->mark, make_fixnum (BUF_PT (current_buffer)), p->buffer); unbind_to (spec); @@ -1792,7 +1792,7 @@ (process)) { CHECK_PROCESS (process); - return make_int (XPROCESS (process)->exit_code); + return make_fixnum (XPROCESS (process)->exit_code); } @@ -1800,8 +1800,8 @@ static int decode_signal (Lisp_Object signal_) { - if (INTP (signal_)) - return XINT (signal_); + if (FIXNUMP (signal_)) + return XFIXNUM (signal_); else { Ibyte *name; @@ -2088,10 +2088,10 @@ */ (pid, signal_)) { - CHECK_INT (pid); - - return make_int (PROCMETH_OR_GIVEN (kill_process_by_pid, - (XINT (pid), decode_signal (signal_)), + CHECK_FIXNUM (pid); + + return make_fixnum (PROCMETH_OR_GIVEN (kill_process_by_pid, + (XFIXNUM (pid), decode_signal (signal_)), -1)); }