Mercurial > emacs
comparison src/callint.c @ 46370:40db0673e6f0
Most uses of XSTRING combined with STRING_BYTES or indirection changed to
SCHARS, SBYTES, STRING_INTERVALS, SREF, SDATA; explicit size_byte references
left unchanged for now.
author | Ken Raeburn <raeburn@raeburn.org> |
---|---|
date | Mon, 15 Jul 2002 00:00:41 +0000 |
parents | 1fb8f75062c6 |
children | 2b5f7e1254d1 |
comparison
equal
deleted
inserted
replaced
46369:dd1d3b1d0053 | 46370:40db0673e6f0 |
---|---|
286 /* If either specs or string is set to a string, use it. */ | 286 /* If either specs or string is set to a string, use it. */ |
287 if (STRINGP (specs)) | 287 if (STRINGP (specs)) |
288 { | 288 { |
289 /* Make a copy of string so that if a GC relocates specs, | 289 /* Make a copy of string so that if a GC relocates specs, |
290 `string' will still be valid. */ | 290 `string' will still be valid. */ |
291 string = (unsigned char *) alloca (STRING_BYTES (XSTRING (specs)) + 1); | 291 string = (unsigned char *) alloca (SBYTES (specs) + 1); |
292 bcopy (XSTRING (specs)->data, string, | 292 bcopy (SDATA (specs), string, |
293 STRING_BYTES (XSTRING (specs)) + 1); | 293 SBYTES (specs) + 1); |
294 } | 294 } |
295 else if (string == 0) | 295 else if (string == 0) |
296 { | 296 { |
297 Lisp_Object input; | 297 Lisp_Object input; |
298 i = num_input_events; | 298 i = num_input_events; |
451 corresponding to the Lisp strings in visargs. */ | 451 corresponding to the Lisp strings in visargs. */ |
452 for (j = 1; j < i; j++) | 452 for (j = 1; j < i; j++) |
453 argstrings[j] | 453 argstrings[j] |
454 = (EQ (visargs[j], Qnil) | 454 = (EQ (visargs[j], Qnil) |
455 ? (unsigned char *) "" | 455 ? (unsigned char *) "" |
456 : XSTRING (visargs[j])->data); | 456 : SDATA (visargs[j])); |
457 | 457 |
458 /* Process the format-string in prompt1, putting the output | 458 /* Process the format-string in prompt1, putting the output |
459 into callint_message. Make callint_message bigger if necessary. | 459 into callint_message. Make callint_message bigger if necessary. |
460 We don't use a buffer on the stack, because the contents | 460 We don't use a buffer on the stack, because the contents |
461 need to stay stable for a while. */ | 461 need to stay stable for a while. */ |
597 | 597 |
598 case 'e': /* The invoking event. */ | 598 case 'e': /* The invoking event. */ |
599 if (next_event >= key_count) | 599 if (next_event >= key_count) |
600 error ("%s must be bound to an event with parameters", | 600 error ("%s must be bound to an event with parameters", |
601 (SYMBOLP (function) | 601 (SYMBOLP (function) |
602 ? (char *) XSTRING (SYMBOL_NAME (function))->data | 602 ? (char *) SDATA (SYMBOL_NAME (function)) |
603 : "command")); | 603 : "command")); |
604 args[i] = XVECTOR (keys)->contents[next_event++]; | 604 args[i] = XVECTOR (keys)->contents[next_event++]; |
605 varies[i] = -1; | 605 varies[i] = -1; |
606 | 606 |
607 /* Find the next parameterized event. */ | 607 /* Find the next parameterized event. */ |
642 first = 0; | 642 first = 0; |
643 | 643 |
644 tem = Fread_from_minibuffer (build_string (callint_message), | 644 tem = Fread_from_minibuffer (build_string (callint_message), |
645 Qnil, Qnil, Qnil, Qnil, Qnil, | 645 Qnil, Qnil, Qnil, Qnil, Qnil, |
646 Qnil); | 646 Qnil); |
647 if (! STRINGP (tem) || XSTRING (tem)->size == 0) | 647 if (! STRINGP (tem) || SCHARS (tem) == 0) |
648 args[i] = Qnil; | 648 args[i] = Qnil; |
649 else | 649 else |
650 args[i] = Fread (tem); | 650 args[i] = Fread (tem); |
651 } | 651 } |
652 while (! NUMBERP (args[i])); | 652 while (! NUMBERP (args[i])); |