summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorPaul Eggert <eggert@cs.ucla.edu>2011-04-09 11:42:31 -0700
committerPaul Eggert <eggert@cs.ucla.edu>2011-04-09 11:42:31 -0700
commit762f8d96719ba3e8a0e79d8bb99fe8e119fafb3a (patch)
tree7b2fe40a89bf327ea8b9ad8265a6b6f27cacd2a7 /src
parenteb3f1cc8dfe6a96505f1c5f9174b2712998cb52f (diff)
parent8546720e6f25eb988e8215de6678798053031440 (diff)
downloademacs-762f8d96719ba3e8a0e79d8bb99fe8e119fafb3a.tar.gz
Merge from mainline.
Diffstat (limited to 'src')
-rw-r--r--src/ChangeLog85
-rw-r--r--src/ccl.c2
-rw-r--r--src/coding.c95
-rw-r--r--src/coding.h2
-rw-r--r--src/editfns.c2
-rw-r--r--src/fileio.c2
-rw-r--r--src/ftfont.c4
-rw-r--r--src/keyboard.c223
-rw-r--r--src/lisp.h8
-rw-r--r--src/print.c23
-rw-r--r--src/process.c245
-rw-r--r--src/search.c28
-rw-r--r--src/term.c3
-rw-r--r--src/window.c3
-rw-r--r--src/xdisp.c22
-rw-r--r--src/xmenu.c34
-rw-r--r--src/xml.c2
-rw-r--r--src/xselect.c76
-rw-r--r--src/xterm.c7
19 files changed, 302 insertions, 564 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index 68f3dbdedcb..cd1b74b75f1 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,4 +1,4 @@
-2011-04-08 Paul Eggert <eggert@cs.ucla.edu>
+2011-04-09 Paul Eggert <eggert@cs.ucla.edu>
* eval.c: Port to Windows vsnprintf (Bug#8435).
Include <limits.h>.
@@ -9,8 +9,6 @@
Also, simplify the allocation scheme, by avoiding the need for
calling realloc, and removing the ALLOCATED variable.
-2011-04-07 Paul Eggert <eggert@cs.ucla.edu>
-
* eval.c (verror): Initial buffer size is 4000 (not 200) bytes.
Remove the doprnt implementation, as Emacs now uses vsnprintf.
@@ -45,8 +43,6 @@
* keyboard.c (access_keymap_keyremap): Print func name, not garbage.
-2011-04-06 Paul Eggert <eggert@cs.ucla.edu>
-
* coding.c (Fdecode_sjis_char): Don't assume CODE fits in int.
* xterm.c (x_catch_errors): Remove duplicate declaration.
@@ -55,6 +51,85 @@
* xdisp.c, lisp.h (message_nolog): Remove; unused.
+2011-04-09 Chong Yidong <cyd@stupidchicken.com>
+
+ * ftfont.c (get_adstyle_property, ftfont_pattern_entity): Use
+ unsigned char, to match FcChar8 type definition.
+
+ * xterm.c (handle_one_xevent):
+ * xmenu.c (create_and_show_popup_menu):
+ * xselect.c (x_decline_selection_request)
+ (x_reply_selection_request): Avoid type-punned deref of X events.
+
+2011-04-09 Eli Zaretskii <eliz@emacstest.gnu.org>
+
+ Fix some uses of `int' instead of EMACS_INT.
+ * search.c (string_match_1, fast_string_match)
+ (fast_c_string_match_ignore_case, fast_string_match_ignore_case)
+ (scan_buffer, find_next_newline_no_quit)
+ (find_before_next_newline, search_command, Freplace_match)
+ (Fmatch_data): Make some `int' variables be EMACS_INT.
+
+ * xdisp.c (display_count_lines): 3rd argument and return value now
+ EMACS_INT. All callers changed.
+ (pint2hrstr): Last argument is now EMACS_INT.
+
+ * coding.c (detect_coding_utf_8, detect_coding_emacs_mule)
+ (detect_coding_iso_2022, detect_coding_sjis, detect_coding_big5)
+ (detect_coding_ccl, detect_coding_charset, decode_coding_utf_8)
+ (decode_coding_utf_16, decode_coding_emacs_mule)
+ (decode_coding_iso_2022, decode_coding_sjis, decode_coding_big5)
+ (decode_coding_ccl, decode_coding_charset)
+ <consumed_chars, consumed_chars_base>: Declare EMACS_INT.
+ (decode_coding_iso_2022, decode_coding_emacs_mule)
+ (decode_coding_sjis, decode_coding_big5, decode_coding_charset)
+ <char_offset, last_offset>: Declare EMACS_INT.
+ (encode_coding_utf_8, encode_coding_utf_16)
+ (encode_coding_emacs_mule, encode_invocation_designation)
+ (encode_designation_at_bol, encode_coding_iso_2022)
+ (encode_coding_sjis, encode_coding_big5, encode_coding_ccl)
+ (encode_coding_raw_text, encode_coding_charset) <produced_chars>:
+ Declare EMACS_INT.
+ (ASSURE_DESTINATION): Declare more_bytes EMACS_INT.
+ (encode_invocation_designation): Last argument P_NCHARS is now
+ EMACS_INT.
+ (decode_eol): Declare pos_byte, pos, and pos_end EMACS_INT.
+ (produce_chars): from_nchars and to_nchars are now EMACS_INT.
+
+ * coding.h (struct coding_system) <head_ascii>: Declare EMACS_INT.
+ All users changed.
+
+ * ccl.c (Fccl_execute_on_string): Declare some variables
+ EMACS_INT.
+
+2011-04-08 Samuel Thibault <sthibault@debian.org> (tiny change)
+
+ * term.c (init_tty): Fix incorrect ifdef placement (Bug#8450).
+
+2011-03-19 Christoph Scholtes <cschol2112@googlemail.com>
+
+ * process.c (Fformat_network_address): Doc fix.
+
+2011-04-08 T.V. Raman <tv.raman.tv@gmail.com> (tiny change)
+
+ * xml.c (parse_region): Avoid creating spurious whiespace nodes.
+
+2011-04-08 Chong Yidong <cyd@stupidchicken.com>
+
+ * keyboard.c (read_char): Call Lisp function help-form-show,
+ instead of using internal_with_output_to_temp_buffer.
+ (Qhelp_form_show): New var.
+ (syms_of_keyboard): Use DEFSYM macro.
+
+ * print.c (internal_with_output_to_temp_buffer): Function deleted.
+
+ * lisp.h (internal_with_output_to_temp_buffer): Remove prototype.
+
+2011-04-06 Chong Yidong <cyd@stupidchicken.com>
+
+ * process.c (Flist_processes): Removed to Lisp.
+ (list_processes_1): Deleted.
+
2011-04-06 Eli Zaretskii <eliz@gnu.org>
* msdos.c (careadlinkat, careadlinkatcwd): MS-DOS replacements.
diff --git a/src/ccl.c b/src/ccl.c
index 5428e94c69a..39b9bc32f09 100644
--- a/src/ccl.c
+++ b/src/ccl.c
@@ -2049,7 +2049,7 @@ usage: (ccl-execute-on-string CCL-PROGRAM STATUS STRING &optional CONTINUE UNIBY
Lisp_Object val;
struct ccl_program ccl;
int i;
- int outbufsize;
+ EMACS_INT outbufsize;
unsigned char *outbuf, *outp;
EMACS_INT str_chars, str_bytes;
#define CCL_EXECUTE_BUF_SIZE 1024
diff --git a/src/coding.c b/src/coding.c
index f099605c774..711ada59c85 100644
--- a/src/coding.c
+++ b/src/coding.c
@@ -159,7 +159,7 @@ detect_coding_XXX (struct coding_system *coding,
const unsigned char *src = coding->source;
const unsigned char *src_end = coding->source + coding->src_bytes;
int multibytep = coding->src_multibyte;
- int consumed_chars = 0;
+ EMACS_INT consumed_chars = 0;
int found = 0;
...;
@@ -266,7 +266,7 @@ encode_coding_XXX (struct coding_system *coding)
unsigned char *dst = coding->destination + coding->produced;
unsigned char *dst_end = coding->destination + coding->dst_bytes;
unsigned char *adjusted_dst_end = dst_end - _MAX_BYTES_PRODUCED_IN_LOOP_;
- int produced_chars = 0;
+ EMACS_INT produced_chars = 0;
for (; charbuf < charbuf_end && dst < adjusted_dst_end; charbuf++)
{
@@ -943,7 +943,7 @@ record_conversion_result (struct coding_system *coding,
do { \
if (dst + (bytes) >= dst_end) \
{ \
- int more_bytes = charbuf_end - charbuf + (bytes); \
+ EMACS_INT more_bytes = charbuf_end - charbuf + (bytes); \
\
dst = alloc_destination (coding, more_bytes, dst); \
dst_end = coding->destination + coding->dst_bytes; \
@@ -1208,7 +1208,7 @@ detect_coding_utf_8 (struct coding_system *coding,
const unsigned char *src = coding->source, *src_base;
const unsigned char *src_end = coding->source + coding->src_bytes;
int multibytep = coding->src_multibyte;
- int consumed_chars = 0;
+ EMACS_INT consumed_chars = 0;
int bom_found = 0;
int found = 0;
@@ -1293,7 +1293,7 @@ decode_coding_utf_8 (struct coding_system *coding)
const unsigned char *src_base;
int *charbuf = coding->charbuf + coding->charbuf_used;
int *charbuf_end = coding->charbuf + coding->charbuf_size;
- int consumed_chars = 0, consumed_chars_base = 0;
+ EMACS_INT consumed_chars = 0, consumed_chars_base = 0;
int multibytep = coding->src_multibyte;
enum utf_bom_type bom = CODING_UTF_8_BOM (coding);
int eol_dos =
@@ -1444,7 +1444,7 @@ encode_coding_utf_8 (struct coding_system *coding)
int *charbuf_end = charbuf + coding->charbuf_used;
unsigned char *dst = coding->destination + coding->produced;
unsigned char *dst_end = coding->destination + coding->dst_bytes;
- int produced_chars = 0;
+ EMACS_INT produced_chars = 0;
int c;
if (CODING_UTF_8_BOM (coding) == utf_with_bom)
@@ -1602,7 +1602,7 @@ decode_coding_utf_16 (struct coding_system *coding)
int *charbuf = coding->charbuf + coding->charbuf_used;
/* We may produces at most 3 chars in one loop. */
int *charbuf_end = coding->charbuf + coding->charbuf_size - 2;
- int consumed_chars = 0, consumed_chars_base = 0;
+ EMACS_INT consumed_chars = 0, consumed_chars_base = 0;
int multibytep = coding->src_multibyte;
enum utf_bom_type bom = CODING_UTF_16_BOM (coding);
enum utf_16_endian_type endian = CODING_UTF_16_ENDIAN (coding);
@@ -1729,7 +1729,7 @@ encode_coding_utf_16 (struct coding_system *coding)
int safe_room = 8;
enum utf_bom_type bom = CODING_UTF_16_BOM (coding);
int big_endian = CODING_UTF_16_ENDIAN (coding) == utf_16_big_endian;
- int produced_chars = 0;
+ EMACS_INT produced_chars = 0;
int c;
if (bom != utf_without_bom)
@@ -1863,7 +1863,7 @@ detect_coding_emacs_mule (struct coding_system *coding,
const unsigned char *src = coding->source, *src_base;
const unsigned char *src_end = coding->source + coding->src_bytes;
int multibytep = coding->src_multibyte;
- int consumed_chars = 0;
+ EMACS_INT consumed_chars = 0;
int c;
int found = 0;
@@ -2331,10 +2331,10 @@ decode_coding_emacs_mule (struct coding_system *coding)
loop and one more charset annotation at the end. */
int *charbuf_end
= coding->charbuf + coding->charbuf_size - (MAX_ANNOTATION_LENGTH * 3);
- int consumed_chars = 0, consumed_chars_base;
+ EMACS_INT consumed_chars = 0, consumed_chars_base;
int multibytep = coding->src_multibyte;
- int char_offset = coding->produced_char;
- int last_offset = char_offset;
+ EMACS_INT char_offset = coding->produced_char;
+ EMACS_INT last_offset = char_offset;
int last_id = charset_ascii;
int eol_dos =
!inhibit_eol_conversion && EQ (CODING_ID_EOL_TYPE (coding->id), Qdos);
@@ -2585,7 +2585,7 @@ encode_coding_emacs_mule (struct coding_system *coding)
unsigned char *dst = coding->destination + coding->produced;
unsigned char *dst_end = coding->destination + coding->dst_bytes;
int safe_room = 8;
- int produced_chars = 0;
+ EMACS_INT produced_chars = 0;
Lisp_Object attrs, charset_list;
int c;
int preferred_charset_id = -1;
@@ -2943,7 +2943,7 @@ detect_coding_iso_2022 (struct coding_system *coding,
int single_shifting = 0;
int id;
int c, c1;
- int consumed_chars = 0;
+ EMACS_INT consumed_chars = 0;
int i;
int rejected = 0;
int found = 0;
@@ -3453,7 +3453,7 @@ decode_coding_iso_2022 (struct coding_system *coding)
loop and one more charset annotation at the end. */
int *charbuf_end
= coding->charbuf + coding->charbuf_size - (MAX_ANNOTATION_LENGTH * 3);
- int consumed_chars = 0, consumed_chars_base;
+ EMACS_INT consumed_chars = 0, consumed_chars_base;
int multibytep = coding->src_multibyte;
/* Charsets invoked to graphic plane 0 and 1 respectively. */
int charset_id_0 = CODING_ISO_INVOKED_CHARSET (coding, 0);
@@ -3463,8 +3463,8 @@ decode_coding_iso_2022 (struct coding_system *coding)
int c;
struct composition_status *cmp_status = CODING_ISO_CMP_STATUS (coding);
Lisp_Object attrs = CODING_ID_ATTRS (coding->id);
- int char_offset = coding->produced_char;
- int last_offset = char_offset;
+ EMACS_INT char_offset = coding->produced_char;
+ EMACS_INT last_offset = char_offset;
int last_id = charset_ascii;
int eol_dos =
!inhibit_eol_conversion && EQ (CODING_ID_EOL_TYPE (coding->id), Qdos);
@@ -4190,10 +4190,10 @@ decode_coding_iso_2022 (struct coding_system *coding)
static unsigned char *
encode_invocation_designation (struct charset *charset,
struct coding_system *coding,
- unsigned char *dst, int *p_nchars)
+ unsigned char *dst, EMACS_INT *p_nchars)
{
int multibytep = coding->dst_multibyte;
- int produced_chars = *p_nchars;
+ EMACS_INT produced_chars = *p_nchars;
int reg; /* graphic register number */
int id = CHARSET_ID (charset);
@@ -4285,7 +4285,7 @@ encode_designation_at_bol (struct coding_system *coding, int *charbuf,
/* Table of charsets to be designated to each graphic register. */
int r[4];
int c, found = 0, reg;
- int produced_chars = 0;
+ EMACS_INT produced_chars = 0;
int multibytep = coding->dst_multibyte;
Lisp_Object attrs;
Lisp_Object charset_list;
@@ -4340,7 +4340,7 @@ encode_coding_iso_2022 (struct coding_system *coding)
int bol_designation
= (CODING_ISO_FLAGS (coding) & CODING_ISO_FLAG_DESIGNATE_AT_BOL
&& CODING_ISO_BOL (coding));
- int produced_chars = 0;
+ EMACS_INT produced_chars = 0;
Lisp_Object attrs, eol_type, charset_list;
int ascii_compatible;
int c;
@@ -4528,7 +4528,7 @@ detect_coding_sjis (struct coding_system *coding,
const unsigned char *src = coding->source, *src_base;
const unsigned char *src_end = coding->source + coding->src_bytes;
int multibytep = coding->src_multibyte;
- int consumed_chars = 0;
+ EMACS_INT consumed_chars = 0;
int found = 0;
int c;
Lisp_Object attrs, charset_list;
@@ -4585,7 +4585,7 @@ detect_coding_big5 (struct coding_system *coding,
const unsigned char *src = coding->source, *src_base;
const unsigned char *src_end = coding->source + coding->src_bytes;
int multibytep = coding->src_multibyte;
- int consumed_chars = 0;
+ EMACS_INT consumed_chars = 0;
int found = 0;
int c;
@@ -4636,13 +4636,13 @@ decode_coding_sjis (struct coding_system *coding)
the end. */
int *charbuf_end
= coding->charbuf + coding->charbuf_size - (MAX_ANNOTATION_LENGTH * 2);
- int consumed_chars = 0, consumed_chars_base;
+ EMACS_INT consumed_chars = 0, consumed_chars_base;
int multibytep = coding->src_multibyte;
struct charset *charset_roman, *charset_kanji, *charset_kana;
struct charset *charset_kanji2;
Lisp_Object attrs, charset_list, val;
- int char_offset = coding->produced_char;
- int last_offset = char_offset;
+ EMACS_INT char_offset = coding->produced_char;
+ EMACS_INT last_offset = char_offset;
int last_id = charset_ascii;
int eol_dos =
!inhibit_eol_conversion && EQ (CODING_ID_EOL_TYPE (coding->id), Qdos);
@@ -4754,12 +4754,12 @@ decode_coding_big5 (struct coding_system *coding)
the end. */
int *charbuf_end
= coding->charbuf + coding->charbuf_size - (MAX_ANNOTATION_LENGTH * 2);
- int consumed_chars = 0, consumed_chars_base;
+ EMACS_INT consumed_chars = 0, consumed_chars_base;
int multibytep = coding->src_multibyte;
struct charset *charset_roman, *charset_big5;
Lisp_Object attrs, charset_list, val;
- int char_offset = coding->produced_char;
- int last_offset = char_offset;
+ EMACS_INT char_offset = coding->produced_char;
+ EMACS_INT last_offset = char_offset;
int last_id = charset_ascii;
int eol_dos =
!inhibit_eol_conversion && EQ (CODING_ID_EOL_TYPE (coding->id), Qdos);
@@ -4856,7 +4856,7 @@ encode_coding_sjis (struct coding_system *coding)
unsigned char *dst = coding->destination + coding->produced;
unsigned char *dst_end = coding->destination + coding->dst_bytes;
int safe_room = 4;
- int produced_chars = 0;
+ EMACS_INT produced_chars = 0;
Lisp_Object attrs, charset_list, val;
int ascii_compatible;
struct charset *charset_kanji, *charset_kana;
@@ -4947,7 +4947,7 @@ encode_coding_big5 (struct coding_system *coding)
unsigned char *dst = coding->destination + coding->produced;
unsigned char *dst_end = coding->destination + coding->dst_bytes;
int safe_room = 4;
- int produced_chars = 0;
+ EMACS_INT produced_chars = 0;
Lisp_Object attrs, charset_list, val;
int ascii_compatible;
struct charset *charset_big5;
@@ -5022,10 +5022,10 @@ detect_coding_ccl (struct coding_system *coding,
const unsigned char *src = coding->source, *src_base;
const unsigned char *src_end = coding->source + coding->src_bytes;
int multibytep = coding->src_multibyte;
- int consumed_chars = 0;
+ EMACS_INT consumed_chars = 0;
int found = 0;
unsigned char *valids;
- int head_ascii = coding->head_ascii;
+ EMACS_INT head_ascii = coding->head_ascii;
Lisp_Object attrs;
detect_info->checked |= CATEGORY_MASK_CCL;
@@ -5062,7 +5062,7 @@ decode_coding_ccl (struct coding_system *coding)
const unsigned char *src_end = coding->source + coding->src_bytes;
int *charbuf = coding->charbuf + coding->charbuf_used;
int *charbuf_end = coding->charbuf + coding->charbuf_size;
- int consumed_chars = 0;
+ EMACS_INT consumed_chars = 0;
int multibytep = coding->src_multibyte;
struct ccl_program *ccl = &coding->spec.ccl->ccl;
int source_charbuf[1024];
@@ -5134,7 +5134,8 @@ encode_coding_ccl (struct coding_system *coding)
unsigned char *dst = coding->destination + coding->produced;
unsigned char *dst_end = coding->destination + coding->dst_bytes;
int destination_charbuf[1024];
- int i, produced_chars = 0;
+ EMACS_INT produced_chars = 0;
+ int i;
Lisp_Object attrs, charset_list;
CODING_GET_INFO (coding, attrs, charset_list);
@@ -5220,7 +5221,7 @@ encode_coding_raw_text (struct coding_system *coding)
int *charbuf_end = coding->charbuf + coding->charbuf_used;
unsigned char *dst = coding->destination + coding->produced;
unsigned char *dst_end = coding->destination + coding->dst_bytes;
- int produced_chars = 0;
+ EMACS_INT produced_chars = 0;
int c;
if (multibytep)
@@ -5303,10 +5304,10 @@ detect_coding_charset (struct coding_system *coding,
const unsigned char *src = coding->source, *src_base;
const unsigned char *src_end = coding->source + coding->src_bytes;
int multibytep = coding->src_multibyte;
- int consumed_chars = 0;
+ EMACS_INT consumed_chars = 0;
Lisp_Object attrs, valids, name;
int found = 0;
- int head_ascii = coding->head_ascii;
+ EMACS_INT head_ascii = coding->head_ascii;
int check_latin_extra = 0;
detect_info->checked |= CATEGORY_MASK_CHARSET;
@@ -5410,12 +5411,12 @@ decode_coding_charset (struct coding_system *coding)
the end. */
int *charbuf_end
= coding->charbuf + coding->charbuf_size - (MAX_ANNOTATION_LENGTH * 2);
- int consumed_chars = 0, consumed_chars_base;
+ EMACS_INT consumed_chars = 0, consumed_chars_base;
int multibytep = coding->src_multibyte;
Lisp_Object attrs = CODING_ID_ATTRS (coding->id);
Lisp_Object valids;
- int char_offset = coding->produced_char;
- int last_offset = char_offset;
+ EMACS_INT char_offset = coding->produced_char;
+ EMACS_INT last_offset = char_offset;
int last_id = charset_ascii;
int eol_dos =
!inhibit_eol_conversion && EQ (CODING_ID_EOL_TYPE (coding->id), Qdos);
@@ -5536,7 +5537,7 @@ encode_coding_charset (struct coding_system *coding)
unsigned char *dst = coding->destination + coding->produced;
unsigned char *dst_end = coding->destination + coding->dst_bytes;
int safe_room = MAX_MULTIBYTE_LENGTH;
- int produced_chars = 0;
+ EMACS_INT produced_chars = 0;
Lisp_Object attrs, charset_list;
int ascii_compatible;
int c;
@@ -6444,7 +6445,7 @@ decode_eol (struct coding_system *coding)
}
else if (EQ (eol_type, Qdos))
{
- int n = 0;
+ EMACS_INT n = 0;
if (NILP (coding->dst_object))
{
@@ -6459,9 +6460,9 @@ decode_eol (struct coding_system *coding)
}
else
{
- int pos_byte = coding->dst_pos_byte;
- int pos = coding->dst_pos;
- int pos_end = pos + coding->produced_char - 1;
+ EMACS_INT pos_byte = coding->dst_pos_byte;
+ EMACS_INT pos = coding->dst_pos;
+ EMACS_INT pos_end = pos + coding->produced_char - 1;
while (pos < pos_end)
{
@@ -6646,7 +6647,7 @@ produce_chars (struct coding_system *coding, Lisp_Object translation_table,
if (c >= 0)
{
- int from_nchars = 1, to_nchars = 1;
+ EMACS_INT from_nchars = 1, to_nchars = 1;
Lisp_Object trans = Qnil;
LOOKUP_TRANSLATION_TABLE (translation_table, c, trans);
diff --git a/src/coding.h b/src/coding.h
index 6238a708e76..8414a2fe133 100644
--- a/src/coding.h
+++ b/src/coding.h
@@ -449,7 +449,7 @@ struct coding_system
-1 in setup_coding_system, and updated by detect_coding. So,
when this is equal to the byte length of the text being
converted, we can skip the actual conversion process. */
- int head_ascii;
+ EMACS_INT head_ascii;
/* The following members are set by encoding/decoding routine. */
EMACS_INT produced, produced_char, consumed, consumed_char;
diff --git a/src/editfns.c b/src/editfns.c
index d0f1df694d5..cd424f277bf 100644
--- a/src/editfns.c
+++ b/src/editfns.c
@@ -750,7 +750,7 @@ Field boundaries are not noticed if `inhibit-field-text-motion' is non-nil. */)
/* It is possible that NEW_POS is not within the same field as
OLD_POS; try to move NEW_POS so that it is. */
{
- int shortage;
+ EMACS_INT shortage;
Lisp_Object field_bound;
if (fwd)
diff --git a/src/fileio.c b/src/fileio.c
index dec53968947..f9923c420a3 100644
--- a/src/fileio.c
+++ b/src/fileio.c
@@ -271,7 +271,7 @@ use the standard functions without calling themselves recursively. */)
if (CONSP (elt))
{
Lisp_Object string = XCAR (elt);
- int match_pos;
+ EMACS_INT match_pos;
Lisp_Object handler = XCDR (elt);
Lisp_Object operations = Qnil;
diff --git a/src/ftfont.c b/src/ftfont.c
index ad01149106e..06ba6d7fe25 100644
--- a/src/ftfont.c
+++ b/src/ftfont.c
@@ -160,7 +160,7 @@ static struct
static Lisp_Object
get_adstyle_property (FcPattern *p)
{
- char *str, *end;
+ unsigned char *str, *end;
Lisp_Object adstyle;
if (FcPatternGetString (p, FC_STYLE, 0, (FcChar8 **) &str) != FcResultMatch)
@@ -189,7 +189,7 @@ static Lisp_Object
ftfont_pattern_entity (FcPattern *p, Lisp_Object extra)
{
Lisp_Object key, cache, entity;
- char *file, *str;
+ unsigned char *file, *str;
int idx;
int numeric;
double dbl;
diff --git a/src/keyboard.c b/src/keyboard.c
index 7a8451d8375..e9992ceb365 100644
--- a/src/keyboard.c
+++ b/src/keyboard.c
@@ -260,6 +260,8 @@ Lisp_Object Qdeferred_action_function;
Lisp_Object Qinput_method_exit_on_first_char;
Lisp_Object Qinput_method_use_echo_area;
+Lisp_Object Qhelp_form_show;
+
/* File in which we write all commands we read. */
FILE *dribble;
@@ -3095,10 +3097,7 @@ read_char (int commandflag, int nmaps, Lisp_Object *maps, Lisp_Object prev_event
= Fcons (Fcurrent_window_configuration (Qnil),
help_form_saved_window_configs);
record_unwind_protect (read_char_help_form_unwind, Qnil);
-
- tem0 = Feval (Vhelp_form, Qnil);
- if (STRINGP (tem0))
- internal_with_output_to_temp_buffer ("*Help*", print_help, tem0);
+ call0 (Qhelp_form_show);
cancel_echoing ();
do
@@ -11441,14 +11440,9 @@ syms_of_keyboard (void)
staticpro (&Vlispy_mouse_stem);
/* Tool-bars. */
- QCimage = intern_c_string (":image");
- staticpro (&QCimage);
-
- staticpro (&Qhelp_echo);
- Qhelp_echo = intern_c_string ("help-echo");
-
- staticpro (&Qrtl);
- Qrtl = intern_c_string (":rtl");
+ DEFSYM (QCimage, ":image");
+ DEFSYM (Qhelp_echo, "help-echo");
+ DEFSYM (Qrtl, ":rtl");
staticpro (&item_properties);
item_properties = Qnil;
@@ -11461,147 +11455,81 @@ syms_of_keyboard (void)
staticpro (&real_this_command);
real_this_command = Qnil;
- Qtimer_event_handler = intern_c_string ("timer-event-handler");
- staticpro (&Qtimer_event_handler);
+ DEFSYM (Qtimer_event_handler, "timer-event-handler");
+ DEFSYM (Qdisabled_command_function, "disabled-command-function");
+ DEFSYM (Qself_insert_command, "self-insert-command");
+ DEFSYM (Qforward_char, "forward-char");
+ DEFSYM (Qbackward_char, "backward-char");
+ DEFSYM (Qdisabled, "disabled");
+ DEFSYM (Qundefined, "undefined");
+ DEFSYM (Qpre_command_hook, "pre-command-hook");
+ DEFSYM (Qpost_command_hook, "post-command-hook");
+ DEFSYM (Qdeferred_action_function, "deferred-action-function");
+ DEFSYM (Qfunction_key, "function-key");
+ DEFSYM (Qmouse_click, "mouse-click");
+ DEFSYM (Qdrag_n_drop, "drag-n-drop");
+ DEFSYM (Qsave_session, "save-session");
+ DEFSYM (Qconfig_changed_event, "config-changed-event");
+ DEFSYM (Qmenu_enable, "menu-enable");
- Qdisabled_command_function = intern_c_string ("disabled-command-function");
- staticpro (&Qdisabled_command_function);
-
- Qself_insert_command = intern_c_string ("self-insert-command");
- staticpro (&Qself_insert_command);
-
- Qforward_char = intern_c_string ("forward-char");
- staticpro (&Qforward_char);
-
- Qbackward_char = intern_c_string ("backward-char");
- staticpro (&Qbackward_char);
+#if defined (WINDOWSNT)
+ DEFSYM (Qlanguage_change, "language-change");
+#endif
- Qdisabled = intern_c_string ("disabled");
- staticpro (&Qdisabled);
+#ifdef HAVE_DBUS
+ DEFSYM (Qdbus_event, "dbus-event");
+#endif
+
+ DEFSYM (QCenable, ":enable");
+ DEFSYM (QCvisible, ":visible");
+ DEFSYM (QChelp, ":help");
+ DEFSYM (QCfilter, ":filter");
+ DEFSYM (QCbutton, ":button");
+ DEFSYM (QCkeys, ":keys");
+ DEFSYM (QCkey_sequence, ":key-sequence");
+ DEFSYM (QCtoggle, ":toggle");
+ DEFSYM (QCradio, ":radio");
+ DEFSYM (QClabel, ":label");
+ DEFSYM (QCvert_only, ":vert-only");
+
+ DEFSYM (Qmode_line, "mode-line");
+ DEFSYM (Qvertical_line, "vertical-line");
+ DEFSYM (Qvertical_scroll_bar, "vertical-scroll-bar");
+ DEFSYM (Qmenu_bar, "menu-bar");
- Qundefined = intern_c_string ("undefined");
- staticpro (&Qundefined);
+#if defined (HAVE_MOUSE) || defined (HAVE_GPM)
+ DEFSYM (Qmouse_fixup_help_message, "mouse-fixup-help-message");
+#endif
- Qpre_command_hook = intern_c_string ("pre-command-hook");
- staticpro (&Qpre_command_hook);
+ DEFSYM (Qabove_handle, "above-handle");
+ DEFSYM (Qhandle, "handle");
+ DEFSYM (Qbelow_handle, "below-handle");
+ DEFSYM (Qup, "up");
+ DEFSYM (Qdown, "down");
+ DEFSYM (Qtop, "top");
+ DEFSYM (Qbottom, "bottom");
+ DEFSYM (Qend_scroll, "end-scroll");
+ DEFSYM (Qratio, "ratio");
- Qpost_command_hook = intern_c_string ("post-command-hook");
- staticpro (&Qpost_command_hook);
+ DEFSYM (Qevent_kind, "event-kind");
+ DEFSYM (Qevent_symbol_elements, "event-symbol-elements");
+ DEFSYM (Qevent_symbol_element_mask, "event-symbol-element-mask");
+ DEFSYM (Qmodifier_cache, "modifier-cache");
- Qdeferred_action_function = intern_c_string ("deferred-action-function");
- staticpro (&Qdeferred_action_function);
+ DEFSYM (Qrecompute_lucid_menubar, "recompute-lucid-menubar");
+ DEFSYM (Qactivate_menubar_hook, "activate-menubar-hook");
- Qfunction_key = intern_c_string ("function-key");
- staticpro (&Qfunction_key);
- Qmouse_click = intern_c_string ("mouse-click");
- staticpro (&Qmouse_click);
-#if defined (WINDOWSNT)
- Qlanguage_change = intern_c_string ("language-change");
- staticpro (&Qlanguage_change);
-#endif
- Qdrag_n_drop = intern_c_string ("drag-n-drop");
- staticpro (&Qdrag_n_drop);
+ DEFSYM (Qpolling_period, "polling-period");
- Qsave_session = intern_c_string ("save-session");
- staticpro (&Qsave_session);
+ DEFSYM (Qx_set_selection, "x-set-selection");
+ DEFSYM (QPRIMARY, "PRIMARY");
+ DEFSYM (Qhandle_switch_frame, "handle-switch-frame");
-#ifdef HAVE_DBUS
- Qdbus_event = intern_c_string ("dbus-event");
- staticpro (&Qdbus_event);
-#endif
-
- Qconfig_changed_event = intern_c_string ("config-changed-event");
- staticpro (&Qconfig_changed_event);
-
- Qmenu_enable = intern_c_string ("menu-enable");
- staticpro (&Qmenu_enable);
- QCenable = intern_c_string (":enable");
- staticpro (&QCenable);
- QCvisible = intern_c_string (":visible");
- staticpro (&QCvisible);
- QChelp = intern_c_string (":help");
- staticpro (&QChelp);
- QCfilter = intern_c_string (":filter");
- staticpro (&QCfilter);
- QCbutton = intern_c_string (":button");
- staticpro (&QCbutton);
- QCkeys = intern_c_string (":keys");
- staticpro (&QCkeys);
- QCkey_sequence = intern_c_string (":key-sequence");
- staticpro (&QCkey_sequence);
- QCtoggle = intern_c_string (":toggle");
- staticpro (&QCtoggle);
- QCradio = intern_c_string (":radio");
- staticpro (&QCradio);
- QClabel = intern_c_string (":label");
- staticpro (&QClabel);
- QCvert_only = intern_c_string (":vert-only");
- staticpro (&QCvert_only);
-
- Qmode_line = intern_c_string ("mode-line");
- staticpro (&Qmode_line);
- Qvertical_line = intern_c_string ("vertical-line");
- staticpro (&Qvertical_line);
- Qvertical_scroll_bar = intern_c_string ("vertical-scroll-bar");
- staticpro (&Qvertical_scroll_bar);
- Qmenu_bar = intern_c_string ("menu-bar");
- staticpro (&Qmenu_bar);
+ DEFSYM (Qinput_method_function, "input-method-function");
+ DEFSYM (Qinput_method_exit_on_first_char, "input-method-exit-on-first-char");
+ DEFSYM (Qinput_method_use_echo_area, "input-method-use-echo-area");
-#if defined (HAVE_MOUSE) || defined (HAVE_GPM)
- Qmouse_fixup_help_message = intern_c_string ("mouse-fixup-help-message");
- staticpro (&Qmouse_fixup_help_message);
-#endif
-
- Qabove_handle = intern_c_string ("above-handle");
- staticpro (&Qabove_handle);
- Qhandle = intern_c_string ("handle");
- staticpro (&Qhandle);
- Qbelow_handle = intern_c_string ("below-handle");
- staticpro (&Qbelow_handle);
- Qup = intern_c_string ("up");
- staticpro (&Qup);
- Qdown = intern_c_string ("down");
- staticpro (&Qdown);
- Qtop = intern_c_string ("top");
- staticpro (&Qtop);
- Qbottom = intern_c_string ("bottom");
- staticpro (&Qbottom);
- Qend_scroll = intern_c_string ("end-scroll");
- staticpro (&Qend_scroll);
- Qratio = intern_c_string ("ratio");
- staticpro (&Qratio);
-
- Qevent_kind = intern_c_string ("event-kind");
- staticpro (&Qevent_kind);
- Qevent_symbol_elements = intern_c_string ("event-symbol-elements");
- staticpro (&Qevent_symbol_elements);
- Qevent_symbol_element_mask = intern_c_string ("event-symbol-element-mask");
- staticpro (&Qevent_symbol_element_mask);
- Qmodifier_cache = intern_c_string ("modifier-cache");
- staticpro (&Qmodifier_cache);
-
- Qrecompute_lucid_menubar = intern_c_string ("recompute-lucid-menubar");
- staticpro (&Qrecompute_lucid_menubar);
- Qactivate_menubar_hook = intern_c_string ("activate-menubar-hook");
- staticpro (&Qactivate_menubar_hook);
-
- Qpolling_period = intern_c_string ("polling-period");
- staticpro (&Qpolling_period);
-
- Qinput_method_function = intern_c_string ("input-method-function");
- staticpro (&Qinput_method_function);
-
- Qx_set_selection = intern_c_string ("x-set-selection");
- staticpro (&Qx_set_selection);
- QPRIMARY = intern_c_string ("PRIMARY");
- staticpro (&QPRIMARY);
- Qhandle_switch_frame = intern_c_string ("handle-switch-frame");
- staticpro (&Qhandle_switch_frame);
-
- Qinput_method_exit_on_first_char = intern_c_string ("input-method-exit-on-first-char");
- staticpro (&Qinput_method_exit_on_first_char);
- Qinput_method_use_echo_area = intern_c_string ("input-method-use-echo-area");
- staticpro (&Qinput_method_use_echo_area);
+ DEFSYM (Qhelp_form_show, "help-form-show");
Fset (Qinput_method_exit_on_first_char, Qnil);
Fset (Qinput_method_use_echo_area, Qnil);
@@ -11652,9 +11580,8 @@ syms_of_keyboard (void)
raw_keybuf = Fmake_vector (make_number (30), Qnil);
staticpro (&raw_keybuf);
- Qextended_command_history = intern_c_string ("extended-command-history");
+ DEFSYM (Qextended_command_history, "extended-command-history");
Fset (Qextended_command_history, Qnil);
- staticpro (&Qextended_command_history);
accent_key_syms = Qnil;
staticpro (&accent_key_syms);
@@ -11955,8 +11882,7 @@ The command loop sets this to nil before each command,
and tests the value when the command returns.
Buffer modification stores t in this variable. */);
Vdeactivate_mark = Qnil;
- Qdeactivate_mark = intern_c_string ("deactivate-mark");
- staticpro (&Qdeactivate_mark);
+ DEFSYM (Qdeactivate_mark, "deactivate-mark");
DEFVAR_LISP ("pre-command-hook", Vpre_command_hook,
doc: /* Normal hook run before each command is executed.
@@ -11976,8 +11902,7 @@ otherwise the error might happen repeatedly and make Emacs nonfunctional. */);
DEFVAR_LISP ("echo-area-clear-hook", ...,
doc: /* Normal hook run when clearing the echo area. */);
#endif
- Qecho_area_clear_hook = intern_c_string ("echo-area-clear-hook");
- staticpro (&Qecho_area_clear_hook);
+ DEFSYM (Qecho_area_clear_hook, "echo-area-clear-hook");
Fset (Qecho_area_clear_hook, Qnil);
DEFVAR_LISP ("lucid-menu-bar-dirty-flag", Vlucid_menu_bar_dirty_flag,
diff --git a/src/lisp.h b/src/lisp.h
index a6933e70288..4859862c88f 100644
--- a/src/lisp.h
+++ b/src/lisp.h
@@ -3046,13 +3046,13 @@ struct re_registers;
extern struct re_pattern_buffer *compile_pattern (Lisp_Object,
struct re_registers *,
Lisp_Object, int, int);
-extern int fast_string_match (Lisp_Object, Lisp_Object);
-extern int fast_c_string_match_ignore_case (Lisp_Object, const char *);
-extern int fast_string_match_ignore_case (Lisp_Object, Lisp_Object);
+extern EMACS_INT fast_string_match (Lisp_Object, Lisp_Object);
+extern EMACS_INT fast_c_string_match_ignore_case (Lisp_Object, const char *);
+extern EMACS_INT fast_string_match_ignore_case (Lisp_Object, Lisp_Object);
extern EMACS_INT fast_looking_at (Lisp_Object, EMACS_INT, EMACS_INT,
EMACS_INT, EMACS_INT, Lisp_Object);
extern EMACS_INT scan_buffer (int, EMACS_INT, EMACS_INT, EMACS_INT,
- int *, int);
+ EMACS_INT *, int);
extern EMACS_INT scan_newline (EMACS_INT, EMACS_INT, EMACS_INT, EMACS_INT,
EMACS_INT, int);
extern EMACS_INT find_next_newline (EMACS_INT, int);
diff --git a/src/print.c b/src/print.c
index c076e1ec973..f68f04ac5fa 100644
--- a/src/print.c
+++ b/src/print.c
@@ -520,29 +520,6 @@ temp_output_buffer_setup (const char *bufname)
specbind (Qstandard_output, buf);
}
-
-/* FIXME: Use Lisp's with-output-to-temp-buffer instead! */
-Lisp_Object
-internal_with_output_to_temp_buffer (const char *bufname, Lisp_Object (*function) (Lisp_Object), Lisp_Object args)
-{
- int count = SPECPDL_INDEX ();
- Lisp_Object buf, val;
- struct gcpro gcpro1;
-
- GCPRO1 (args);
- record_unwind_protect (Fset_buffer, Fcurrent_buffer ());
- temp_output_buffer_setup (bufname);
- buf = Vstandard_output;
- UNGCPRO;
-
- val = (*function) (args);
-
- GCPRO1 (val);
- temp_output_buffer_show (buf);
- UNGCPRO;
-
- return unbind_to (count, val);
-}
static void print (Lisp_Object obj, register Lisp_Object printcharfun, int escapeflag);
static void print_preprocess (Lisp_Object obj);
diff --git a/src/process.c b/src/process.c
index a9a8eb79ede..6cddbf6d1a9 100644
--- a/src/process.c
+++ b/src/process.c
@@ -1239,244 +1239,6 @@ Returns nil if format of ADDRESS is invalid. */)
return Qnil;
}
-
-static Lisp_Object
-list_processes_1 (Lisp_Object query_only)
-{
- register Lisp_Object tail;
- Lisp_Object proc, minspace;
- register struct Lisp_Process *p;
- char tembuf[300];
- int w_proc, w_buffer, w_tty;
- int exited = 0;
- Lisp_Object i_status, i_buffer, i_tty, i_command;
-
- w_proc = 4; /* Proc */
- w_buffer = 6; /* Buffer */
- w_tty = 0; /* Omit if no ttys */
-
- for (tail = Vprocess_alist; CONSP (tail); tail = XCDR (tail))
- {
- int i;
-
- proc = Fcdr (XCAR (tail));
- p = XPROCESS (proc);
- if (NILP (p->type))
- continue;
- if (!NILP (query_only) && p->kill_without_query)
- continue;
- if (STRINGP (p->name)
- && ( i = SCHARS (p->name), (i > w_proc)))
- w_proc = i;
- if (!NILP (p->buffer))
- {
- if (NILP (BVAR (XBUFFER (p->buffer), name)))
- {
- if (w_buffer < 8)
- w_buffer = 8; /* (Killed) */
- }
- else if ((i = SCHARS (BVAR (XBUFFER (p->buffer), name)), (i > w_buffer)))
- w_buffer = i;
- }
- if (STRINGP (p->tty_name)
- && (i = SCHARS (p->tty_name), (i > w_tty)))
- w_tty = i;
- }
-
- XSETFASTINT (i_status, w_proc + 1);
- XSETFASTINT (i_buffer, XFASTINT (i_status) + 9);
- if (w_tty)
- {
- XSETFASTINT (i_tty, XFASTINT (i_buffer) + w_buffer + 1);
- XSETFASTINT (i_command, XFASTINT (i_tty) + w_tty + 1);
- }
- else
- {
- i_tty = Qnil;
- XSETFASTINT (i_command, XFASTINT (i_buffer) + w_buffer + 1);
- }
-
- XSETFASTINT (minspace, 1);
-
- set_buffer_internal (XBUFFER (Vstandard_output));
- BVAR (current_buffer, undo_list) = Qt;
-
- BVAR (current_buffer, truncate_lines) = Qt;
-
- write_string ("Proc", -1);
- Findent_to (i_status, minspace); write_string ("Status", -1);
- Findent_to (i_buffer, minspace); write_string ("Buffer", -1);
- if (!NILP (i_tty))
- {
- Findent_to (i_tty, minspace); write_string ("Tty", -1);
- }
- Findent_to (i_command, minspace); write_string ("Command", -1);
- write_string ("\n", -1);
-
- write_string ("----", -1);
- Findent_to (i_status, minspace); write_string ("------", -1);
- Findent_to (i_buffer, minspace); write_string ("------", -1);
- if (!NILP (i_tty))
- {
- Findent_to (i_tty, minspace); write_string ("---", -1);
- }
- Findent_to (i_command, minspace); write_string ("-------", -1);
- write_string ("\n", -1);
-
- for (tail = Vprocess_alist; CONSP (tail); tail = XCDR (tail))
- {
- Lisp_Object symbol;
-
- proc = Fcdr (XCAR (tail));
- p = XPROCESS (proc);
- if (NILP (p->type))
- continue;
- if (!NILP (query_only) && p->kill_without_query)
- continue;
-
- Finsert (1, &p->name);
- Findent_to (i_status, minspace);
-
- if (p->raw_status_new)
- update_status (p);
- symbol = p->status;
- if (CONSP (p->status))
- symbol = XCAR (p->status);
-
- if (EQ (symbol, Qsignal))
- Fprinc (symbol, Qnil);
- else if (NETCONN1_P (p) || SERIALCONN1_P (p))
- {
- if (EQ (symbol, Qexit))
- write_string ("closed", -1);
- else if (EQ (p->command, Qt))
- write_string ("stopped", -1);
- else if (EQ (symbol, Qrun))
- write_string ("open", -1);
- else
- Fprinc (symbol, Qnil);
- }
- else if (SERIALCONN1_P (p))
- {
- write_string ("running", -1);
- }
- else
- Fprinc (symbol, Qnil);
-
- if (EQ (symbol, Qexit))
- {
- Lisp_Object tem;
- tem = Fcar (Fcdr (p->status));
- if (XFASTINT (tem))
- {
- sprintf (tembuf, " %d", (int) XFASTINT (tem));
- write_string (tembuf, -1);
- }
- }
-
- if (EQ (symbol, Qsignal) || EQ (symbol, Qexit) || EQ (symbol, Qclosed))
- exited++;
-
- Findent_to (i_buffer, minspace);
- if (NILP (p->buffer))
- insert_string ("(none)");
- else if (NILP (BVAR (XBUFFER (p->buffer), name)))
- insert_string ("(Killed)");
- else
- Finsert (1, &BVAR (XBUFFER (p->buffer), name));
-
- if (!NILP (i_tty))
- {
- Findent_to (i_tty, minspace);
- if (STRINGP (p->tty_name))
- Finsert (1, &p->tty_name);
- }
-
- Findent_to (i_command, minspace);
-
- if (EQ (p->status, Qlisten))
- {
- Lisp_Object port = Fplist_get (p->childp, QCservice);
- if (INTEGERP (port))
- port = Fnumber_to_string (port);
- if (NILP (port))
- port = Fformat_network_address (Fplist_get (p->childp, QClocal), Qnil);
- sprintf (tembuf, "(network %s server on %s)\n",
- (DATAGRAM_CHAN_P (p->infd) ? "datagram" : "stream"),
- (STRINGP (port) ? SSDATA (port) : "?"));
- insert_string (tembuf);
- }
- else if (NETCONN1_P (p))
- {
- /* For a local socket, there is no host name,
- so display service instead. */
- Lisp_Object host = Fplist_get (p->childp, QChost);
- if (!STRINGP (host))
- {
- host = Fplist_get (p->childp, QCservice);
- if (INTEGERP (host))
- host = Fnumber_to_string (host);
- }
- if (NILP (host))
- host = Fformat_network_address (Fplist_get (p->childp, QCremote), Qnil);
- sprintf (tembuf, "(network %s connection to %s)\n",
- (DATAGRAM_CHAN_P (p->infd) ? "datagram" : "stream"),
- (STRINGP (host) ? SSDATA (host) : "?"));
- insert_string (tembuf);
- }
- else if (SERIALCONN1_P (p))
- {
- Lisp_Object port = Fplist_get (p->childp, QCport);
- Lisp_Object speed = Fplist_get (p->childp, QCspeed);
- insert_string ("(serial port ");
- if (STRINGP (port))
- insert_string (SSDATA (port));
- else
- insert_string ("?");
- if (INTEGERP (speed))
- {
- sprintf (tembuf, " at %ld b/s", (long) XINT (speed));
- insert_string (tembuf);
- }
- insert_string (")\n");
- }
- else
- {
- Lisp_Object tem = p->command;
- while (1)
- {
- Lisp_Object tem1 = Fcar (tem);
- if (NILP (tem1))
- break;
- Finsert (1, &tem1);
- tem = Fcdr (tem);
- if (NILP (tem))
- break;
- insert_string (" ");
- }
- insert_string ("\n");
- }
- }
- if (exited)
- {
- status_notify (NULL);
- redisplay_preserve_echo_area (13);
- }
- return Qnil;
-}
-
-DEFUN ("list-processes", Flist_processes, Slist_processes, 0, 1, "P",
- doc: /* Display a list of all processes.
-If optional argument QUERY-ONLY is non-nil, only processes with
-the query-on-exit flag set will be listed.
-Any process listed as exited or signaled is actually eliminated
-after the listing is made. */)
- (Lisp_Object query_only)
-{
- internal_with_output_to_temp_buffer ("*Process List*",
- list_processes_1, query_only);
- return Qnil;
-}
DEFUN ("process-list", Fprocess_list, Sprocess_list, 0, 0, 0,
doc: /* Return a list of all processes. */)
@@ -1499,9 +1261,9 @@ at end of BUFFER, unless you specify an output stream or filter
function to handle the output. BUFFER may also be nil, meaning that
this process is not associated with any buffer.
-PROGRAM is the program file name. It is searched for in PATH. If
-nil, just associate a pty with the buffer. Remaining arguments are
-strings to give program as arguments.
+PROGRAM is the program file name. It is searched for in `exec-path'
+(which see). If nil, just associate a pty with the buffer. Remaining
+arguments are strings to give program as arguments.
If you want to separate standard output from standard error, invoke
the command through a shell and redirect one of them using the shell
@@ -7668,7 +7430,6 @@ The variable takes effect when `start-process' is called. */);
defsubr (&Sprocess_contact);
defsubr (&Sprocess_plist);
defsubr (&Sset_process_plist);
- defsubr (&Slist_processes);
defsubr (&Sprocess_list);
defsubr (&Sstart_process);
defsubr (&Sserial_process_configure);
diff --git a/src/search.c b/src/search.c
index fa44e1300d7..d9be8ca0105 100644
--- a/src/search.c
+++ b/src/search.c
@@ -368,7 +368,7 @@ data if you want to preserve them. */)
static Lisp_Object
string_match_1 (Lisp_Object regexp, Lisp_Object string, Lisp_Object start, int posix)
{
- int val;
+ EMACS_INT val;
struct re_pattern_buffer *bufp;
EMACS_INT pos, pos_byte;
int i;
@@ -468,10 +468,10 @@ matched by parenthesis constructs in the pattern. */)
and return the index of the match, or negative on failure.
This does not clobber the match data. */
-int
+EMACS_INT
fast_string_match (Lisp_Object regexp, Lisp_Object string)
{
- int val;
+ EMACS_INT val;
struct re_pattern_buffer *bufp;
bufp = compile_pattern (regexp, 0, Qnil,
@@ -491,10 +491,10 @@ fast_string_match (Lisp_Object regexp, Lisp_Object string)
This does not clobber the match data.
We assume that STRING contains single-byte characters. */
-int
+EMACS_INT
fast_c_string_match_ignore_case (Lisp_Object regexp, const char *string)
{
- int val;
+ EMACS_INT val;
struct re_pattern_buffer *bufp;
size_t len = strlen (string);
@@ -511,10 +511,10 @@ fast_c_string_match_ignore_case (Lisp_Object regexp, const char *string)
/* Like fast_string_match but ignore case. */
-int
+EMACS_INT
fast_string_match_ignore_case (Lisp_Object regexp, Lisp_Object string)
{
- int val;
+ EMACS_INT val;
struct re_pattern_buffer *bufp;
bufp = compile_pattern (regexp, 0, Vascii_canon_table,
@@ -643,7 +643,7 @@ newline_cache_on_off (struct buffer *buf)
EMACS_INT
scan_buffer (register int target, EMACS_INT start, EMACS_INT end,
- EMACS_INT count, int *shortage, int allow_quit)
+ EMACS_INT count, EMACS_INT *shortage, int allow_quit)
{
struct region_cache *newline_cache;
int direction;
@@ -933,7 +933,7 @@ scan_newline (EMACS_INT start, EMACS_INT start_byte,
EMACS_INT
find_next_newline_no_quit (EMACS_INT from, EMACS_INT cnt)
{
- return scan_buffer ('\n', from, 0, cnt, (int *) 0, 0);
+ return scan_buffer ('\n', from, 0, cnt, (EMACS_INT *) 0, 0);
}
/* Like find_next_newline, but returns position before the newline,
@@ -943,7 +943,7 @@ find_next_newline_no_quit (EMACS_INT from, EMACS_INT cnt)
EMACS_INT
find_before_next_newline (EMACS_INT from, EMACS_INT to, EMACS_INT cnt)
{
- int shortage;
+ EMACS_INT shortage;
EMACS_INT pos = scan_buffer ('\n', from, to, cnt, &shortage, 1);
if (shortage == 0)
@@ -958,9 +958,9 @@ static Lisp_Object
search_command (Lisp_Object string, Lisp_Object bound, Lisp_Object noerror,
Lisp_Object count, int direction, int RE, int posix)
{
- register int np;
+ register EMACS_INT np;
EMACS_INT lim, lim_byte;
- int n = direction;
+ EMACS_INT n = direction;
if (!NILP (count))
{
@@ -2524,7 +2524,7 @@ since only regular expressions have distinguished subexpressions. */)
/* We build up the substituted string in ACCUM. */
Lisp_Object accum;
Lisp_Object middle;
- int length = SBYTES (newtext);
+ EMACS_INT length = SBYTES (newtext);
accum = Qnil;
@@ -2880,7 +2880,7 @@ Return value is undefined if the last search failed. */)
len = 0;
for (i = 0; i < search_regs.num_regs; i++)
{
- int start = search_regs.start[i];
+ EMACS_INT start = search_regs.start[i];
if (start >= 0)
{
if (EQ (last_thing_searched, Qt)
diff --git a/src/term.c b/src/term.c
index d4e5faf01c8..ea856543a7d 100644
--- a/src/term.c
+++ b/src/term.c
@@ -3155,13 +3155,12 @@ init_tty (const char *name, const char *terminal_type, int must_succeed)
if we don't have one at the moment. */
fd = emacs_open (name, O_RDWR | O_IGNORE_CTTY | O_NOCTTY, 0);
else
-#else
+#endif /* O_IGNORE_CTTY */
/* Alas, O_IGNORE_CTTY is a GNU extension that seems to be only
defined on Hurd. On other systems, we need to explicitly
dissociate ourselves from the controlling tty when we want to
open a frame on the same terminal. */
fd = emacs_open (name, O_RDWR | O_NOCTTY, 0);
-#endif /* O_IGNORE_CTTY */
tty->name = xstrdup (name);
terminal->name = xstrdup (name);
diff --git a/src/window.c b/src/window.c
index ebfd1b0f778..a8a6fceaaee 100644
--- a/src/window.c
+++ b/src/window.c
@@ -3664,9 +3664,6 @@ temp_output_buffer_show (register Lisp_Object buf)
BEGV = BEG;
ZV = Z;
SET_PT (BEG);
-#if 0 /* rms: there should be no reason for this. */
- XBUFFER (buf)->prevent_redisplay_optimizations_p = 1;
-#endif
set_buffer_internal (old);
if (!NILP (Vtemp_buffer_show_function))
diff --git a/src/xdisp.c b/src/xdisp.c
index a296fb33a9f..b1209b998e2 100644
--- a/src/xdisp.c
+++ b/src/xdisp.c
@@ -763,7 +763,7 @@ static Lisp_Object get_it_property (struct it *it, Lisp_Object prop);
static void handle_line_prefix (struct it *);
static void pint2str (char *, int, EMACS_INT);
-static void pint2hrstr (char *, int, int);
+static void pint2hrstr (char *, int, EMACS_INT);
static struct text_pos run_window_scroll_functions (Lisp_Object,
struct text_pos);
static void reconsider_clip_changes (struct window *, struct buffer *);
@@ -825,7 +825,8 @@ static int display_mode_element (struct it *, int, int, int, Lisp_Object, Lisp_O
static int store_mode_line_string (const char *, Lisp_Object, int, int, int, Lisp_Object);
static const char *decode_mode_spec (struct window *, int, int, Lisp_Object *);
static void display_menu_bar (struct window *);
-static int display_count_lines (EMACS_INT, EMACS_INT, int, EMACS_INT *);
+static EMACS_INT display_count_lines (EMACS_INT, EMACS_INT, EMACS_INT,
+ EMACS_INT *);
static int display_string (const char *, Lisp_Object, Lisp_Object,
EMACS_INT, EMACS_INT, struct it *, int, int, int, int);
static void compute_line_metrics (struct it *);
@@ -19099,11 +19100,11 @@ static const char power_letter[] =
};
static void
-pint2hrstr (char *buf, int width, int d)
+pint2hrstr (char *buf, int width, EMACS_INT d)
{
/* We aim to represent the nonnegative integer D as
QUOTIENT.TENTHS * 10 ^ (3 * EXPONENT). */
- int quotient = d;
+ EMACS_INT quotient = d;
int remainder = 0;
/* -1 means: do not use TENTHS. */
int tenths = -1;
@@ -19429,7 +19430,7 @@ decode_mode_spec (struct window *w, register int c, int field_width,
case 'l':
{
EMACS_INT startpos, startpos_byte, line, linepos, linepos_byte;
- int topline, nlines, height;
+ EMACS_INT topline, nlines, height;
EMACS_INT junk;
/* %c and %l are ignored in `frame-title-format'. */
@@ -19494,7 +19495,8 @@ decode_mode_spec (struct window *w, register int c, int field_width,
EMACS_INT limit = BUF_BEGV (b);
EMACS_INT limit_byte = BUF_BEGV_BYTE (b);
EMACS_INT position;
- int distance = (height * 2 + 30) * line_number_display_limit_width;
+ EMACS_INT distance =
+ (height * 2 + 30) * line_number_display_limit_width;
if (startpos - distance > limit)
{
@@ -19697,17 +19699,17 @@ decode_mode_spec (struct window *w, register int c, int field_width,
Set *BYTE_POS_PTR to 1 if we found COUNT lines, 0 if we hit LIMIT. */
-static int
+static EMACS_INT
display_count_lines (EMACS_INT start_byte,
- EMACS_INT limit_byte, int count,
+ EMACS_INT limit_byte, EMACS_INT count,
EMACS_INT *byte_pos_ptr)
{
register unsigned char *cursor;
unsigned char *base;
- register int ceiling;
+ register EMACS_INT ceiling;
register unsigned char *ceiling_addr;
- int orig_count = count;
+ EMACS_INT orig_count = count;
/* If we are not in selective display mode,
check only for newlines. */
diff --git a/src/xmenu.c b/src/xmenu.c
index 6e175e69039..dbf8145f737 100644
--- a/src/xmenu.c
+++ b/src/xmenu.c
@@ -1529,7 +1529,8 @@ create_and_show_popup_menu (FRAME_PTR f, widget_value *first_wv,
int i;
Arg av[2];
int ac = 0;
- XButtonPressedEvent dummy;
+ XEvent dummy;
+ XButtonPressedEvent *event = &(dummy.xbutton);
LWLIB_ID menu_id;
Widget menu;
@@ -1547,36 +1548,35 @@ create_and_show_popup_menu (FRAME_PTR f, widget_value *first_wv,
popup_deactivate_callback,
menu_highlight_callback);
- dummy.type = ButtonPress;
- dummy.serial = 0;
- dummy.send_event = 0;
- dummy.display = FRAME_X_DISPLAY (f);
- dummy.time = CurrentTime;
- dummy.root = FRAME_X_DISPLAY_INFO (f)->root_window;
- dummy.window = dummy.root;
- dummy.subwindow = dummy.root;
- dummy.x = x;
- dummy.y = y;
+ event->type = ButtonPress;
+ event->serial = 0;
+ event->send_event = 0;
+ event->display = FRAME_X_DISPLAY (f);
+ event->time = CurrentTime;
+ event->root = FRAME_X_DISPLAY_INFO (f)->root_window;
+ event->window = event->subwindow = event->root;
+ event->x = x;
+ event->y = y;
/* Adjust coordinates to be root-window-relative. */
x += f->left_pos + FRAME_OUTER_TO_INNER_DIFF_X (f);
y += f->top_pos + FRAME_OUTER_TO_INNER_DIFF_Y (f);
- dummy.x_root = x;
- dummy.y_root = y;
+ event->x_root = x;
+ event->y_root = y;
- dummy.state = 0;
- dummy.button = 0;
+ event->state = 0;
+ event->button = 0;
for (i = 0; i < 5; i++)
if (FRAME_X_DISPLAY_INFO (f)->grabbed & (1 << i))
- dummy.button = i;
+ event->button = i;
/* Don't allow any geometry request from the user. */
XtSetArg (av[ac], XtNgeometry, 0); ac++;
XtSetValues (menu, av, ac);
/* Display the menu. */
- lw_popup_menu (menu, (XEvent *) &dummy);
+ lw_popup_menu (menu, &dummy);
popup_activated_flag = 1;
x_activate_timeout_atimer ();
diff --git a/src/xml.c b/src/xml.c
index d8e6f8c3faa..63041c96b24 100644
--- a/src/xml.c
+++ b/src/xml.c
@@ -113,7 +113,7 @@ parse_region (Lisp_Object start, Lisp_Object end, Lisp_Object base_url, int html
doc = xmlReadMemory ((char *) BYTE_POS_ADDR (CHAR_TO_BYTE (istart)),
bytes, burl, "utf-8",
XML_PARSE_NONET|XML_PARSE_NOWARNING|
- XML_PARSE_NOERROR);
+ XML_PARSE_NOBLANKS |XML_PARSE_NOERROR);
if (doc != NULL)
{
diff --git a/src/xselect.c b/src/xselect.c
index 430b7232659..4f1a452023a 100644
--- a/src/xselect.c
+++ b/src/xselect.c
@@ -499,22 +499,23 @@ x_get_local_selection (Lisp_Object selection_symbol, Lisp_Object target_type, in
static void
x_decline_selection_request (struct input_event *event)
{
- XSelectionEvent reply;
+ XEvent reply_base;
+ XSelectionEvent *reply = &(reply_base.xselection);
- reply.type = SelectionNotify;
- reply.display = SELECTION_EVENT_DISPLAY (event);
- reply.requestor = SELECTION_EVENT_REQUESTOR (event);
- reply.selection = SELECTION_EVENT_SELECTION (event);
- reply.time = SELECTION_EVENT_TIME (event);
- reply.target = SELECTION_EVENT_TARGET (event);
- reply.property = None;
+ reply->type = SelectionNotify;
+ reply->display = SELECTION_EVENT_DISPLAY (event);
+ reply->requestor = SELECTION_EVENT_REQUESTOR (event);
+ reply->selection = SELECTION_EVENT_SELECTION (event);
+ reply->time = SELECTION_EVENT_TIME (event);
+ reply->target = SELECTION_EVENT_TARGET (event);
+ reply->property = None;
/* The reason for the error may be that the receiver has
died in the meantime. Handle that case. */
BLOCK_INPUT;
- x_catch_errors (reply.display);
- XSendEvent (reply.display, reply.requestor, False, 0L, (XEvent *) &reply);
- XFlush (reply.display);
+ x_catch_errors (reply->display);
+ XSendEvent (reply->display, reply->requestor, False, 0L, &reply_base);
+ XFlush (reply->display);
x_uncatch_errors ();
UNBLOCK_INPUT;
}
@@ -617,7 +618,8 @@ static int x_reply_selection_request_cnt;
static void
x_reply_selection_request (struct input_event *event, int format, unsigned char *data, int size, Atom type)
{
- XSelectionEvent reply;
+ XEvent reply_base;
+ XSelectionEvent *reply = &(reply_base.xselection);
Display *display = SELECTION_EVENT_DISPLAY (event);
Window window = SELECTION_EVENT_REQUESTOR (event);
int bytes_remaining;
@@ -629,15 +631,15 @@ x_reply_selection_request (struct input_event *event, int format, unsigned char
if (max_bytes > MAX_SELECTION_QUANTUM)
max_bytes = MAX_SELECTION_QUANTUM;
- reply.type = SelectionNotify;
- reply.display = display;
- reply.requestor = window;
- reply.selection = SELECTION_EVENT_SELECTION (event);
- reply.time = SELECTION_EVENT_TIME (event);
- reply.target = SELECTION_EVENT_TARGET (event);
- reply.property = SELECTION_EVENT_PROPERTY (event);
- if (reply.property == None)
- reply.property = reply.target;
+ reply->type = SelectionNotify;
+ reply->display = display;
+ reply->requestor = window;
+ reply->selection = SELECTION_EVENT_SELECTION (event);
+ reply->time = SELECTION_EVENT_TIME (event);
+ reply->target = SELECTION_EVENT_TARGET (event);
+ reply->property = SELECTION_EVENT_PROPERTY (event);
+ if (reply->property == None)
+ reply->property = reply->target;
BLOCK_INPUT;
/* The protected block contains wait_for_property_change, which can
@@ -648,8 +650,8 @@ x_reply_selection_request (struct input_event *event, int format, unsigned char
#ifdef TRACE_SELECTION
{
- char *sel = XGetAtomName (display, reply.selection);
- char *tgt = XGetAtomName (display, reply.target);
+ char *sel = XGetAtomName (display, reply->selection);
+ char *tgt = XGetAtomName (display, reply->target);
TRACE3 ("%s, target %s (%d)", sel, tgt, ++x_reply_selection_request_cnt);
if (sel) XFree (sel);
if (tgt) XFree (tgt);
@@ -664,10 +666,10 @@ x_reply_selection_request (struct input_event *event, int format, unsigned char
{
/* Send all the data at once, with minimal handshaking. */
TRACE1 ("Sending all %d bytes", bytes_remaining);
- XChangeProperty (display, window, reply.property, type, format,
+ XChangeProperty (display, window, reply->property, type, format,
PropModeReplace, data, size);
/* At this point, the selection was successfully stored; ack it. */
- XSendEvent (display, window, False, 0L, (XEvent *) &reply);
+ XSendEvent (display, window, False, 0L, &reply_base);
}
else
{
@@ -693,19 +695,19 @@ x_reply_selection_request (struct input_event *event, int format, unsigned char
error ("Attempt to transfer an INCR to ourself!");
TRACE2 ("Start sending %d bytes incrementally (%s)",
- bytes_remaining, XGetAtomName (display, reply.property));
- wait_object = expect_property_change (display, window, reply.property,
+ bytes_remaining, XGetAtomName (display, reply->property));
+ wait_object = expect_property_change (display, window, reply->property,
PropertyDelete);
TRACE1 ("Set %s to number of bytes to send",
- XGetAtomName (display, reply.property));
+ XGetAtomName (display, reply->property));
{
/* XChangeProperty expects an array of long even if long is more than
32 bits. */
long value[1];
value[0] = bytes_remaining;
- XChangeProperty (display, window, reply.property, dpyinfo->Xatom_INCR,
+ XChangeProperty (display, window, reply->property, dpyinfo->Xatom_INCR,
32, PropModeReplace,
(unsigned char *) value, 1);
}
@@ -714,7 +716,7 @@ x_reply_selection_request (struct input_event *event, int format, unsigned char
/* Tell 'em the INCR data is there... */
TRACE0 ("Send SelectionNotify event");
- XSendEvent (display, window, False, 0L, (XEvent *) &reply);
+ XSendEvent (display, window, False, 0L, &reply_base);
XFlush (display);
had_errors = x_had_errors_p (display);
@@ -725,7 +727,7 @@ x_reply_selection_request (struct input_event *event, int format, unsigned char
if (! had_errors)
{
TRACE1 ("Waiting for ACK (deletion of %s)",
- XGetAtomName (display, reply.property));
+ XGetAtomName (display, reply->property));
wait_for_property_change (wait_object);
}
else
@@ -741,15 +743,15 @@ x_reply_selection_request (struct input_event *event, int format, unsigned char
BLOCK_INPUT;
wait_object
- = expect_property_change (display, window, reply.property,
+ = expect_property_change (display, window, reply->property,
PropertyDelete);
TRACE1 ("Sending increment of %d elements", i);
TRACE1 ("Set %s to increment data",
- XGetAtomName (display, reply.property));
+ XGetAtomName (display, reply->property));
/* Append the next chunk of data to the property. */
- XChangeProperty (display, window, reply.property, type, format,
+ XChangeProperty (display, window, reply->property, type, format,
PropModeAppend, data, i);
bytes_remaining -= i * format_bytes;
if (format == 32)
@@ -766,7 +768,7 @@ x_reply_selection_request (struct input_event *event, int format, unsigned char
/* Now wait for the requester to ack this chunk by deleting the
property. This can run random lisp code or signal. */
TRACE1 ("Waiting for increment ACK (deletion of %s)",
- XGetAtomName (display, reply.property));
+ XGetAtomName (display, reply->property));
wait_for_property_change (wait_object);
}
@@ -777,8 +779,8 @@ x_reply_selection_request (struct input_event *event, int format, unsigned char
XSelectInput (display, window, 0L);
TRACE1 ("Set %s to a 0-length chunk to indicate EOF",
- XGetAtomName (display, reply.property));
- XChangeProperty (display, window, reply.property, type, format,
+ XGetAtomName (display, reply->property));
+ XChangeProperty (display, window, reply->property, type, format,
PropModeReplace, data, 0);
TRACE0 ("Done sending incrementally");
}
diff --git a/src/xterm.c b/src/xterm.c
index 3fc431c1350..b3e33b7c0bb 100644
--- a/src/xterm.c
+++ b/src/xterm.c
@@ -4045,7 +4045,7 @@ x_window_to_scroll_bar (Display *display, Window window_id)
return XSCROLL_BAR (bar);
}
- return 0;
+ return NULL;
}
@@ -6008,7 +6008,7 @@ handle_one_xevent (struct x_display_info *dpyinfo, XEvent *eventptr,
goto OTHER;
#endif /* USE_X_TOOLKIT */
{
- XSelectionClearEvent *eventp = (XSelectionClearEvent *) &event;
+ XSelectionClearEvent *eventp = &(event.xselectionclear);
inev.ie.kind = SELECTION_CLEAR_EVENT;
SELECTION_EVENT_DISPLAY (&inev.sie) = eventp->display;
@@ -6025,8 +6025,7 @@ handle_one_xevent (struct x_display_info *dpyinfo, XEvent *eventptr,
goto OTHER;
#endif /* USE_X_TOOLKIT */
{
- XSelectionRequestEvent *eventp
- = (XSelectionRequestEvent *) &event;
+ XSelectionRequestEvent *eventp = &(event.xselectionrequest);
inev.ie.kind = SELECTION_REQUEST_EVENT;
SELECTION_EVENT_DISPLAY (&inev.sie) = eventp->display;