Mercurial > hg > xemacs-beta
comparison src/event-stream.c @ 14:9ee227acff29 r19-15b90
Import from CVS: tag r19-15b90
author | cvs |
---|---|
date | Mon, 13 Aug 2007 08:48:42 +0200 |
parents | 4b173ad71786 |
children | 0293115a14e9 |
comparison
equal
deleted
inserted
replaced
13:13c6d0aaafe5 | 14:9ee227acff29 |
---|---|
821 } | 821 } |
822 | 822 |
823 command_builder->echo_buf_index = buf_index; | 823 command_builder->echo_buf_index = buf_index; |
824 if (buf_index > 0) | 824 if (buf_index > 0) |
825 memcpy (command_builder->echo_buf, | 825 memcpy (command_builder->echo_buf, |
826 string_data (XSTRING (echo)), buf_index + 1); /* terminating 0 */ | 826 XSTRING_DATA (echo), buf_index + 1); /* terminating 0 */ |
827 UNGCPRO; | 827 UNGCPRO; |
828 } | 828 } |
829 | 829 |
830 | 830 |
831 /**********************************************************************/ | 831 /**********************************************************************/ |
1992 if (!NILP (prompt)) | 1992 if (!NILP (prompt)) |
1993 { | 1993 { |
1994 Bytecount len; | 1994 Bytecount len; |
1995 CHECK_STRING (prompt); | 1995 CHECK_STRING (prompt); |
1996 | 1996 |
1997 len = string_length (XSTRING (prompt)); | 1997 len = XSTRING_LENGTH (prompt); |
1998 if (command_builder->echo_buf_length < len) | 1998 if (command_builder->echo_buf_length < len) |
1999 len = command_builder->echo_buf_length - 1; | 1999 len = command_builder->echo_buf_length - 1; |
2000 memcpy (command_builder->echo_buf, string_data (XSTRING (prompt)), len); | 2000 memcpy (command_builder->echo_buf, XSTRING_DATA (prompt), len); |
2001 command_builder->echo_buf[len] = 0; | 2001 command_builder->echo_buf[len] = 0; |
2002 command_builder->echo_buf_index = len; | 2002 command_builder->echo_buf_index = len; |
2003 echo_area_message (XFRAME (CONSOLE_SELECTED_FRAME (con)), | 2003 echo_area_message (XFRAME (CONSOLE_SELECTED_FRAME (con)), |
2004 command_builder->echo_buf, | 2004 command_builder->echo_buf, |
2005 Qnil, 0, | 2005 Qnil, 0, |
3389 Lisp_Object prompt = Fkeymap_prompt (leaf, Qt); | 3389 Lisp_Object prompt = Fkeymap_prompt (leaf, Qt); |
3390 if (STRINGP (prompt)) | 3390 if (STRINGP (prompt)) |
3391 { | 3391 { |
3392 /* Append keymap prompt to key echo buffer */ | 3392 /* Append keymap prompt to key echo buffer */ |
3393 int buf_index = command_builder->echo_buf_index; | 3393 int buf_index = command_builder->echo_buf_index; |
3394 Bytecount len = string_length (XSTRING (prompt)); | 3394 Bytecount len = XSTRING_LENGTH (prompt); |
3395 | 3395 |
3396 if (len + buf_index + 1 <= command_builder->echo_buf_length) | 3396 if (len + buf_index + 1 <= command_builder->echo_buf_length) |
3397 { | 3397 { |
3398 Bufbyte *echo = command_builder->echo_buf + buf_index; | 3398 Bufbyte *echo = command_builder->echo_buf + buf_index; |
3399 memcpy (echo, string_data (XSTRING (prompt)), len); | 3399 memcpy (echo, XSTRING_DATA (prompt), len); |
3400 echo[len] = 0; | 3400 echo[len] = 0; |
3401 } | 3401 } |
3402 maybe_echo_keys (command_builder, 1); | 3402 maybe_echo_keys (command_builder, 1); |
3403 } | 3403 } |
3404 else | 3404 else |
4034 if (!NILP (file)) | 4034 if (!NILP (file)) |
4035 { | 4035 { |
4036 int fd; | 4036 int fd; |
4037 | 4037 |
4038 file = Fexpand_file_name (file, Qnil); | 4038 file = Fexpand_file_name (file, Qnil); |
4039 fd = creat ((char *) string_data (XSTRING (file)), 0666); | 4039 fd = creat ((char *) XSTRING_DATA (file), 0666); |
4040 if (fd < 0) | 4040 if (fd < 0) |
4041 error ("Unable to create dribble file"); | 4041 error ("Unable to create dribble file"); |
4042 Vdribble_file = make_filedesc_output_stream (fd, 0, 0, LSTR_CLOSING); | 4042 Vdribble_file = make_filedesc_output_stream (fd, 0, 0, LSTR_CLOSING); |
4043 } | 4043 } |
4044 return Qnil; | 4044 return Qnil; |