Mercurial > emacs
comparison src/callint.c @ 109358:a9586dc942d5
Merge from mainline.
author | Katsumi Yamaoka <katsumi@flagship2> |
---|---|
date | Mon, 12 Jul 2010 13:21:11 +0000 |
parents | 8f3464b85afb |
children | 228a5fa4eda0 |
comparison
equal
deleted
inserted
replaced
109240:6f0915b37828 | 109358:a9586dc942d5 |
---|---|
26 #include "buffer.h" | 26 #include "buffer.h" |
27 #include "commands.h" | 27 #include "commands.h" |
28 #include "keyboard.h" | 28 #include "keyboard.h" |
29 #include "window.h" | 29 #include "window.h" |
30 #include "keymap.h" | 30 #include "keymap.h" |
31 | |
32 #ifdef HAVE_INDEX | |
33 extern char *index (const char *, int); | |
34 #endif | |
35 | 31 |
36 extern Lisp_Object Qcursor_in_echo_area; | 32 extern Lisp_Object Qcursor_in_echo_area; |
37 extern Lisp_Object Qfile_directory_p; | 33 extern Lisp_Object Qfile_directory_p; |
38 extern Lisp_Object Qonly; | 34 extern Lisp_Object Qonly; |
39 | 35 |
467 produce *two* arguments. */ | 463 produce *two* arguments. */ |
468 if (*tem == 'r') | 464 if (*tem == 'r') |
469 j += 2; | 465 j += 2; |
470 else | 466 else |
471 j++; | 467 j++; |
472 tem = (unsigned char *) index (tem, '\n'); | 468 tem = (unsigned char *) strchr (tem, '\n'); |
473 if (tem) | 469 if (tem) |
474 ++tem; | 470 ++tem; |
475 else | 471 else |
476 break; | 472 break; |
477 } | 473 } |
498 tem = string; | 494 tem = string; |
499 for (i = 1; *tem; i++) | 495 for (i = 1; *tem; i++) |
500 { | 496 { |
501 strncpy (prompt1, tem + 1, sizeof prompt1 - 1); | 497 strncpy (prompt1, tem + 1, sizeof prompt1 - 1); |
502 prompt1[sizeof prompt1 - 1] = 0; | 498 prompt1[sizeof prompt1 - 1] = 0; |
503 tem1 = (char *) index (prompt1, '\n'); | 499 tem1 = strchr (prompt1, '\n'); |
504 if (tem1) *tem1 = 0; | 500 if (tem1) *tem1 = 0; |
505 | 501 |
506 visargs[0] = build_string (prompt1); | 502 visargs[0] = build_string (prompt1); |
507 if (index (prompt1, '%')) | 503 if (strchr (prompt1, '%')) |
508 callint_message = Fformat (i, visargs); | 504 callint_message = Fformat (i, visargs); |
509 else | 505 else |
510 callint_message = visargs[0]; | 506 callint_message = visargs[0]; |
511 | 507 |
512 switch (*tem) | 508 switch (*tem) |
807 arg_from_tty = 1; | 803 arg_from_tty = 1; |
808 | 804 |
809 if (NILP (visargs[i]) && STRINGP (args[i])) | 805 if (NILP (visargs[i]) && STRINGP (args[i])) |
810 visargs[i] = args[i]; | 806 visargs[i] = args[i]; |
811 | 807 |
812 tem = (unsigned char *) index (tem, '\n'); | 808 tem = (unsigned char *) strchr (tem, '\n'); |
813 if (tem) tem++; | 809 if (tem) tem++; |
814 else tem = (unsigned char *) ""; | 810 else tem = (unsigned char *) ""; |
815 } | 811 } |
816 unbind_to (speccount, Qnil); | 812 unbind_to (speccount, Qnil); |
817 | 813 |