comparison src/editfns.c @ 20311:2841215c1cb4

(Fchar_to_string): Declare `workbuf' as unsigned char. (general_insert_function): Likewise. Protoize parameters. Define as returning nothing.
author Andreas Schwab <schwab@suse.de>
date Fri, 21 Nov 1997 14:52:16 +0000
parents 328506fc1aa2
children d55ca55974a0
comparison
equal deleted inserted replaced
20310:b6fd8353113b 20311:2841215c1cb4
124 "Convert arg CHAR to a string containing multi-byte form of that character.") 124 "Convert arg CHAR to a string containing multi-byte form of that character.")
125 (character) 125 (character)
126 Lisp_Object character; 126 Lisp_Object character;
127 { 127 {
128 int len; 128 int len;
129 char workbuf[4], *str; 129 unsigned char workbuf[4], *str;
130 130
131 CHECK_NUMBER (character, 0); 131 CHECK_NUMBER (character, 0);
132 132
133 len = CHAR_STRING (XFASTINT (character), workbuf, str); 133 len = CHAR_STRING (XFASTINT (character), workbuf, str);
134 return make_string (str, len); 134 return make_string (str, len);
1282 /* Insert NARGS Lisp objects in the array ARGS by calling INSERT_FUNC 1282 /* Insert NARGS Lisp objects in the array ARGS by calling INSERT_FUNC
1283 (if a type of object is Lisp_Int) or INSERT_FROM_STRING_FUNC (if a 1283 (if a type of object is Lisp_Int) or INSERT_FROM_STRING_FUNC (if a
1284 type of object is Lisp_String). INHERIT is passed to 1284 type of object is Lisp_String). INHERIT is passed to
1285 INSERT_FROM_STRING_FUNC as the last argument. */ 1285 INSERT_FROM_STRING_FUNC as the last argument. */
1286 1286
1287 void
1287 general_insert_function (insert_func, insert_from_string_func, 1288 general_insert_function (insert_func, insert_from_string_func,
1288 inherit, nargs, args) 1289 inherit, nargs, args)
1289 int (*insert_func)(), (*insert_from_string_func)(); 1290 void (*insert_func) P_ ((unsigned char *, int));
1291 void (*insert_from_string_func) P_ ((Lisp_Object, int, int, int));
1290 int inherit, nargs; 1292 int inherit, nargs;
1291 register Lisp_Object *args; 1293 register Lisp_Object *args;
1292 { 1294 {
1293 register int argnum; 1295 register int argnum;
1294 register Lisp_Object val; 1296 register Lisp_Object val;
1297 { 1299 {
1298 val = args[argnum]; 1300 val = args[argnum];
1299 retry: 1301 retry:
1300 if (INTEGERP (val)) 1302 if (INTEGERP (val))
1301 { 1303 {
1302 char workbuf[4], *str; 1304 unsigned char workbuf[4], *str;
1303 int len; 1305 int len;
1304 1306
1305 if (!NILP (current_buffer->enable_multibyte_characters)) 1307 if (!NILP (current_buffer->enable_multibyte_characters))
1306 len = CHAR_STRING (XFASTINT (val), workbuf, str); 1308 len = CHAR_STRING (XFASTINT (val), workbuf, str);
1307 else 1309 else