Mercurial > hg > xemacs-beta
changeset 4970:5c89ceb69819
fix compile problems
-------------------- ChangeLog entries follow: --------------------
src/ChangeLog addition:
2010-02-04 Ben Wing <ben@xemacs.org>
* bytecode.c (assert_failed_with_remembered_ops):
* bytecode.c (init_opcode_table_multi_op):
Declare some things const to shut up G++ v4 warnings.
* redisplay.c (add_ibyte_string_runes):
* redisplay.c (add_string_to_fstring_db_runes):
* redisplay.c (generate_fstring_runes):
* redisplay.c (window_line_number):
* redisplay.c (decode_mode_spec):
Use Ascbyte instead of char in various places.
author | Ben Wing <ben@xemacs.org> |
---|---|
date | Thu, 04 Feb 2010 05:39:00 -0600 |
parents | cbe181529c34 |
children | bcdf496e49d0 fe0d3106cc36 |
files | src/ChangeLog src/bytecode.c src/redisplay.c |
diffstat | 3 files changed, 26 insertions(+), 13 deletions(-) [+] |
line wrap: on
line diff
--- a/src/ChangeLog Wed Feb 03 21:46:21 2010 -0600 +++ b/src/ChangeLog Thu Feb 04 05:39:00 2010 -0600 @@ -1,3 +1,16 @@ +2010-02-04 Ben Wing <ben@xemacs.org> + + * bytecode.c (assert_failed_with_remembered_ops): + * bytecode.c (init_opcode_table_multi_op): + Declare some things const to shut up G++ v4 warnings. + + * redisplay.c (add_ibyte_string_runes): + * redisplay.c (add_string_to_fstring_db_runes): + * redisplay.c (generate_fstring_runes): + * redisplay.c (window_line_number): + * redisplay.c (decode_mode_spec): + Use Ascbyte instead of char in various places. + 2010-02-03 Ben Wing <ben@xemacs.org> * frame.c (Fmake_frame):
--- a/src/bytecode.c Wed Feb 03 21:46:21 2010 -0600 +++ b/src/bytecode.c Thu Feb 04 05:39:00 2010 -0600 @@ -155,7 +155,7 @@ static void assert_failed_with_remembered_ops (const Ascbyte *file, int line, - Ascbyte *msg_to_abort_with) + const Ascbyte *msg_to_abort_with) { Ascbyte *msg = alloca_array (Ascbyte, @@ -184,7 +184,7 @@ } else { - Ascbyte *opname = opcode_name_table[op]; + const Ascbyte *opname = opcode_name_table[op]; if (!opname) { stderr_out ("Internal error! NULL pointer in opcode_name_table, opcode %d\n", op); @@ -2817,7 +2817,7 @@ static void init_opcode_table_multi_op (Opcode op) { - Ascbyte *basename = opcode_name_table[op]; + const Ascbyte *basename = opcode_name_table[op]; Ascbyte temp[300]; int i;
--- a/src/redisplay.c Wed Feb 03 21:46:21 2010 -0600 +++ b/src/redisplay.c Thu Feb 04 05:39:00 2010 -0600 @@ -1276,7 +1276,7 @@ pb.type = PROP_STRING; pb.data.p_string.str = xnew_array (Ibyte, len); - strncpy ((char *) pb.data.p_string.str, (char *) pos, len); + qxestrncpy (pb.data.p_string.str, pos, len); pb.data.p_string.len = len; Dynarr_add (prop, pb); @@ -4019,7 +4019,7 @@ add_blank_rune (data, NULL, 0); end = (Dynarr_length (db->runes) + - bytecount_to_charcount (str, strlen ((const char *) str))); + bytecount_to_charcount (str, qxestrlen (str))); if (max_pos != -1) end = min (max_pos, end); @@ -4454,7 +4454,7 @@ { invalid: { - const char *str = GETTEXT ("*invalid*"); + const Ascbyte *str = GETTEXT ("*invalid*"); Charcount size = (Charcount) strlen (str); /* is this ok ?? -- dv */ if (size <= *offset) @@ -7230,7 +7230,7 @@ line-number-mode is on. The first line in the buffer is counted as 1. If narrowing is in effect, the lines are counted from the beginning of the visible portion of the buffer. */ -static char * +static Ascbyte * window_line_number (struct window *w, int type) { struct device *d = XDEVICE (XFRAME (w->frame)->device); @@ -7250,7 +7250,7 @@ line = buffer_line_number (b, pos, 1); { - static char window_line_number_buf[DECIMAL_PRINT_SIZE (long)]; + static Ascbyte window_line_number_buf[DECIMAL_PRINT_SIZE (long)]; long_to_string (window_line_number_buf, line + 1); @@ -7275,7 +7275,7 @@ decode_mode_spec (struct window *w, Ichar spec, int type) { Lisp_Object obj = Qnil; - const char *str = NULL; + const Ascbyte *str = NULL; struct buffer *b = XBUFFER (w->buffer); Dynarr_reset (mode_spec_ibyte_string); @@ -7299,7 +7299,7 @@ ? BUF_PT (b) : marker_position (w->pointm[type]); int col = column_at_point (b, pt, 1) + !!column_number_start_at_one; - char buf[DECIMAL_PRINT_SIZE (long)]; + Ascbyte buf[DECIMAL_PRINT_SIZE (long)]; long_to_string (buf, col); @@ -7340,7 +7340,7 @@ if (FRAME_TTY_P (f) && f->order_count > 1 && f->order_count <= 99999999) { /* Naughty, naughty */ - char * writable_str = alloca_array (char, 10); + Ascbyte *writable_str = alloca_array (Ascbyte, 10); sprintf (writable_str, "-%d", f->order_count); str = writable_str; } @@ -7422,7 +7422,7 @@ { /* This hard limit is ok since the string it will hold has a fixed maximum length of 3. But just to be safe... */ - char buf[10]; + Ascbyte buf[10]; Charcount chars = pos - BUF_BEGV (b); Charcount total = BUF_ZV (b) - BUF_BEGV (b); @@ -7469,7 +7469,7 @@ { /* This hard limit is ok since the string it will hold has a fixed maximum length of around 6. But just to be safe... */ - char buf[10]; + Ascbyte buf[10]; Charcount chars = botpos - BUF_BEGV (b); Charcount total = BUF_ZV (b) - BUF_BEGV (b);