annotate src/proto/message.pro @ 15470:55ccc2d353bd v8.1.0743

patch 8.1.0743: giving error messages is not flexible commit https://github.com/vim/vim/commit/f9e3e09fdc93be9f0d47afbc6c7df1188c2a5a0d Author: Bram Moolenaar <Bram@vim.org> Date: Sun Jan 13 23:38:42 2019 +0100 patch 8.1.0743: giving error messages is not flexible Problem: Giving error messages is not flexible. Solution: Add semsg(). Change argument from "char_u *" to "char *", also for msg() and get rid of most MSG macros. (Ozaki Kiichi, closes #3302) Also make emsg() accept a "char *" argument. Get rid of an enormous number of type casts.
author Bram Moolenaar <Bram@vim.org>
date Sun, 13 Jan 2019 23:45:08 +0100
parents 7ad79766365a
children 98c35d312987
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
1 /* message.c */
7668
21b0a39d13ed commit https://github.com/vim/vim/commit/ef26954a35207c3f17d6ed35d9a40c918d974892
Christian Brabandt <cb@256bit.org>
parents: 3435
diff changeset
2 int msg(char_u *s);
21b0a39d13ed commit https://github.com/vim/vim/commit/ef26954a35207c3f17d6ed35d9a40c918d974892
Christian Brabandt <cb@256bit.org>
parents: 3435
diff changeset
3 int verb_msg(char_u *s);
21b0a39d13ed commit https://github.com/vim/vim/commit/ef26954a35207c3f17d6ed35d9a40c918d974892
Christian Brabandt <cb@256bit.org>
parents: 3435
diff changeset
4 int msg_attr(char_u *s, int attr);
21b0a39d13ed commit https://github.com/vim/vim/commit/ef26954a35207c3f17d6ed35d9a40c918d974892
Christian Brabandt <cb@256bit.org>
parents: 3435
diff changeset
5 int msg_attr_keep(char_u *s, int attr, int keep);
21b0a39d13ed commit https://github.com/vim/vim/commit/ef26954a35207c3f17d6ed35d9a40c918d974892
Christian Brabandt <cb@256bit.org>
parents: 3435
diff changeset
6 char_u *msg_strtrunc(char_u *s, int force);
9834
80ace3687eec commit https://github.com/vim/vim/commit/a6b7a08ae04a3cd4d9c45c906bb7a197e2135179
Christian Brabandt <cb@256bit.org>
parents: 9605
diff changeset
7 void trunc_string(char_u *s, char_u *buf, int room_in, int buflen);
7668
21b0a39d13ed commit https://github.com/vim/vim/commit/ef26954a35207c3f17d6ed35d9a40c918d974892
Christian Brabandt <cb@256bit.org>
parents: 3435
diff changeset
8 void reset_last_sourcing(void);
21b0a39d13ed commit https://github.com/vim/vim/commit/ef26954a35207c3f17d6ed35d9a40c918d974892
Christian Brabandt <cb@256bit.org>
parents: 3435
diff changeset
9 void msg_source(int attr);
21b0a39d13ed commit https://github.com/vim/vim/commit/ef26954a35207c3f17d6ed35d9a40c918d974892
Christian Brabandt <cb@256bit.org>
parents: 3435
diff changeset
10 int emsg_not_now(void);
11006
b3601a8eb679 patch 8.0.0392: GUI test fails with Athena and Motif
Christian Brabandt <cb@256bit.org>
parents: 10359
diff changeset
11 void ignore_error_for_testing(char_u *error);
9605
846d4bad2df7 commit https://github.com/vim/vim/commit/b869c0da31716ff14bbfd63346d140d0a1d68af7
Christian Brabandt <cb@256bit.org>
parents: 7668
diff changeset
12 void do_perror(char *msg);
15470
55ccc2d353bd patch 8.1.0743: giving error messages is not flexible
Bram Moolenaar <Bram@vim.org>
parents: 11561
diff changeset
13 int emsg(char *s);
55ccc2d353bd patch 8.1.0743: giving error messages is not flexible
Bram Moolenaar <Bram@vim.org>
parents: 11561
diff changeset
14 int semsg(const char *s, ...);
55ccc2d353bd patch 8.1.0743: giving error messages is not flexible
Bram Moolenaar <Bram@vim.org>
parents: 11561
diff changeset
15 void iemsg(char *s);
55ccc2d353bd patch 8.1.0743: giving error messages is not flexible
Bram Moolenaar <Bram@vim.org>
parents: 11561
diff changeset
16 void siemsg(const char *s, ...);
10359
66f1b5bf3fa6 commit https://github.com/vim/vim/commit/95f096030ed1a8afea028f2ea295d6f6a70f466f
Christian Brabandt <cb@256bit.org>
parents: 9941
diff changeset
17 void internal_error(char *where);
7668
21b0a39d13ed commit https://github.com/vim/vim/commit/ef26954a35207c3f17d6ed35d9a40c918d974892
Christian Brabandt <cb@256bit.org>
parents: 3435
diff changeset
18 void emsg_invreg(int name);
21b0a39d13ed commit https://github.com/vim/vim/commit/ef26954a35207c3f17d6ed35d9a40c918d974892
Christian Brabandt <cb@256bit.org>
parents: 3435
diff changeset
19 char_u *msg_trunc_attr(char_u *s, int force, int attr);
21b0a39d13ed commit https://github.com/vim/vim/commit/ef26954a35207c3f17d6ed35d9a40c918d974892
Christian Brabandt <cb@256bit.org>
parents: 3435
diff changeset
20 char_u *msg_may_trunc(int force, char_u *s);
21b0a39d13ed commit https://github.com/vim/vim/commit/ef26954a35207c3f17d6ed35d9a40c918d974892
Christian Brabandt <cb@256bit.org>
parents: 3435
diff changeset
21 int delete_first_msg(void);
21b0a39d13ed commit https://github.com/vim/vim/commit/ef26954a35207c3f17d6ed35d9a40c918d974892
Christian Brabandt <cb@256bit.org>
parents: 3435
diff changeset
22 void ex_messages(exarg_T *eap);
21b0a39d13ed commit https://github.com/vim/vim/commit/ef26954a35207c3f17d6ed35d9a40c918d974892
Christian Brabandt <cb@256bit.org>
parents: 3435
diff changeset
23 void msg_end_prompt(void);
21b0a39d13ed commit https://github.com/vim/vim/commit/ef26954a35207c3f17d6ed35d9a40c918d974892
Christian Brabandt <cb@256bit.org>
parents: 3435
diff changeset
24 void wait_return(int redraw);
21b0a39d13ed commit https://github.com/vim/vim/commit/ef26954a35207c3f17d6ed35d9a40c918d974892
Christian Brabandt <cb@256bit.org>
parents: 3435
diff changeset
25 void set_keep_msg(char_u *s, int attr);
21b0a39d13ed commit https://github.com/vim/vim/commit/ef26954a35207c3f17d6ed35d9a40c918d974892
Christian Brabandt <cb@256bit.org>
parents: 3435
diff changeset
26 void set_keep_msg_from_hist(void);
21b0a39d13ed commit https://github.com/vim/vim/commit/ef26954a35207c3f17d6ed35d9a40c918d974892
Christian Brabandt <cb@256bit.org>
parents: 3435
diff changeset
27 void msg_start(void);
21b0a39d13ed commit https://github.com/vim/vim/commit/ef26954a35207c3f17d6ed35d9a40c918d974892
Christian Brabandt <cb@256bit.org>
parents: 3435
diff changeset
28 void msg_starthere(void);
21b0a39d13ed commit https://github.com/vim/vim/commit/ef26954a35207c3f17d6ed35d9a40c918d974892
Christian Brabandt <cb@256bit.org>
parents: 3435
diff changeset
29 void msg_putchar(int c);
21b0a39d13ed commit https://github.com/vim/vim/commit/ef26954a35207c3f17d6ed35d9a40c918d974892
Christian Brabandt <cb@256bit.org>
parents: 3435
diff changeset
30 void msg_putchar_attr(int c, int attr);
21b0a39d13ed commit https://github.com/vim/vim/commit/ef26954a35207c3f17d6ed35d9a40c918d974892
Christian Brabandt <cb@256bit.org>
parents: 3435
diff changeset
31 void msg_outnum(long n);
21b0a39d13ed commit https://github.com/vim/vim/commit/ef26954a35207c3f17d6ed35d9a40c918d974892
Christian Brabandt <cb@256bit.org>
parents: 3435
diff changeset
32 void msg_home_replace(char_u *fname);
21b0a39d13ed commit https://github.com/vim/vim/commit/ef26954a35207c3f17d6ed35d9a40c918d974892
Christian Brabandt <cb@256bit.org>
parents: 3435
diff changeset
33 void msg_home_replace_hl(char_u *fname);
21b0a39d13ed commit https://github.com/vim/vim/commit/ef26954a35207c3f17d6ed35d9a40c918d974892
Christian Brabandt <cb@256bit.org>
parents: 3435
diff changeset
34 int msg_outtrans(char_u *str);
21b0a39d13ed commit https://github.com/vim/vim/commit/ef26954a35207c3f17d6ed35d9a40c918d974892
Christian Brabandt <cb@256bit.org>
parents: 3435
diff changeset
35 int msg_outtrans_attr(char_u *str, int attr);
21b0a39d13ed commit https://github.com/vim/vim/commit/ef26954a35207c3f17d6ed35d9a40c918d974892
Christian Brabandt <cb@256bit.org>
parents: 3435
diff changeset
36 int msg_outtrans_len(char_u *str, int len);
21b0a39d13ed commit https://github.com/vim/vim/commit/ef26954a35207c3f17d6ed35d9a40c918d974892
Christian Brabandt <cb@256bit.org>
parents: 3435
diff changeset
37 char_u *msg_outtrans_one(char_u *p, int attr);
21b0a39d13ed commit https://github.com/vim/vim/commit/ef26954a35207c3f17d6ed35d9a40c918d974892
Christian Brabandt <cb@256bit.org>
parents: 3435
diff changeset
38 int msg_outtrans_len_attr(char_u *msgstr, int len, int attr);
21b0a39d13ed commit https://github.com/vim/vim/commit/ef26954a35207c3f17d6ed35d9a40c918d974892
Christian Brabandt <cb@256bit.org>
parents: 3435
diff changeset
39 void msg_make(char_u *arg);
21b0a39d13ed commit https://github.com/vim/vim/commit/ef26954a35207c3f17d6ed35d9a40c918d974892
Christian Brabandt <cb@256bit.org>
parents: 3435
diff changeset
40 int msg_outtrans_special(char_u *strstart, int from);
21b0a39d13ed commit https://github.com/vim/vim/commit/ef26954a35207c3f17d6ed35d9a40c918d974892
Christian Brabandt <cb@256bit.org>
parents: 3435
diff changeset
41 char_u *str2special_save(char_u *str, int is_lhs);
21b0a39d13ed commit https://github.com/vim/vim/commit/ef26954a35207c3f17d6ed35d9a40c918d974892
Christian Brabandt <cb@256bit.org>
parents: 3435
diff changeset
42 char_u *str2special(char_u **sp, int from);
21b0a39d13ed commit https://github.com/vim/vim/commit/ef26954a35207c3f17d6ed35d9a40c918d974892
Christian Brabandt <cb@256bit.org>
parents: 3435
diff changeset
43 void str2specialbuf(char_u *sp, char_u *buf, int len);
21b0a39d13ed commit https://github.com/vim/vim/commit/ef26954a35207c3f17d6ed35d9a40c918d974892
Christian Brabandt <cb@256bit.org>
parents: 3435
diff changeset
44 void msg_prt_line(char_u *s, int list);
21b0a39d13ed commit https://github.com/vim/vim/commit/ef26954a35207c3f17d6ed35d9a40c918d974892
Christian Brabandt <cb@256bit.org>
parents: 3435
diff changeset
45 void msg_puts(char_u *s);
21b0a39d13ed commit https://github.com/vim/vim/commit/ef26954a35207c3f17d6ed35d9a40c918d974892
Christian Brabandt <cb@256bit.org>
parents: 3435
diff changeset
46 void msg_puts_title(char_u *s);
21b0a39d13ed commit https://github.com/vim/vim/commit/ef26954a35207c3f17d6ed35d9a40c918d974892
Christian Brabandt <cb@256bit.org>
parents: 3435
diff changeset
47 void msg_puts_long_attr(char_u *longstr, int attr);
21b0a39d13ed commit https://github.com/vim/vim/commit/ef26954a35207c3f17d6ed35d9a40c918d974892
Christian Brabandt <cb@256bit.org>
parents: 3435
diff changeset
48 void msg_puts_long_len_attr(char_u *longstr, int len, int attr);
21b0a39d13ed commit https://github.com/vim/vim/commit/ef26954a35207c3f17d6ed35d9a40c918d974892
Christian Brabandt <cb@256bit.org>
parents: 3435
diff changeset
49 void msg_puts_attr(char_u *s, int attr);
9941
e975914c17e9 commit https://github.com/vim/vim/commit/7b668e83d0635d082b7ec90d7d2aa30a9d7d8928
Christian Brabandt <cb@256bit.org>
parents: 9834
diff changeset
50 int message_filtered(char_u *msg);
7668
21b0a39d13ed commit https://github.com/vim/vim/commit/ef26954a35207c3f17d6ed35d9a40c918d974892
Christian Brabandt <cb@256bit.org>
parents: 3435
diff changeset
51 void may_clear_sb_text(void);
11163
f4d1fad4ac00 patch 8.0.0468: after aborting an Ex command g< does not work
Christian Brabandt <cb@256bit.org>
parents: 11006
diff changeset
52 void sb_text_start_cmdline(void);
f4d1fad4ac00 patch 8.0.0468: after aborting an Ex command g< does not work
Christian Brabandt <cb@256bit.org>
parents: 11006
diff changeset
53 void sb_text_end_cmdline(void);
f4d1fad4ac00 patch 8.0.0468: after aborting an Ex command g< does not work
Christian Brabandt <cb@256bit.org>
parents: 11006
diff changeset
54 void clear_sb_text(int all);
7668
21b0a39d13ed commit https://github.com/vim/vim/commit/ef26954a35207c3f17d6ed35d9a40c918d974892
Christian Brabandt <cb@256bit.org>
parents: 3435
diff changeset
55 void show_sb_text(void);
21b0a39d13ed commit https://github.com/vim/vim/commit/ef26954a35207c3f17d6ed35d9a40c918d974892
Christian Brabandt <cb@256bit.org>
parents: 3435
diff changeset
56 void msg_sb_eol(void);
21b0a39d13ed commit https://github.com/vim/vim/commit/ef26954a35207c3f17d6ed35d9a40c918d974892
Christian Brabandt <cb@256bit.org>
parents: 3435
diff changeset
57 int msg_use_printf(void);
21b0a39d13ed commit https://github.com/vim/vim/commit/ef26954a35207c3f17d6ed35d9a40c918d974892
Christian Brabandt <cb@256bit.org>
parents: 3435
diff changeset
58 void mch_errmsg(char *str);
21b0a39d13ed commit https://github.com/vim/vim/commit/ef26954a35207c3f17d6ed35d9a40c918d974892
Christian Brabandt <cb@256bit.org>
parents: 3435
diff changeset
59 void mch_msg(char *str);
21b0a39d13ed commit https://github.com/vim/vim/commit/ef26954a35207c3f17d6ed35d9a40c918d974892
Christian Brabandt <cb@256bit.org>
parents: 3435
diff changeset
60 void msg_moremsg(int full);
21b0a39d13ed commit https://github.com/vim/vim/commit/ef26954a35207c3f17d6ed35d9a40c918d974892
Christian Brabandt <cb@256bit.org>
parents: 3435
diff changeset
61 void repeat_message(void);
21b0a39d13ed commit https://github.com/vim/vim/commit/ef26954a35207c3f17d6ed35d9a40c918d974892
Christian Brabandt <cb@256bit.org>
parents: 3435
diff changeset
62 void msg_clr_eos(void);
21b0a39d13ed commit https://github.com/vim/vim/commit/ef26954a35207c3f17d6ed35d9a40c918d974892
Christian Brabandt <cb@256bit.org>
parents: 3435
diff changeset
63 void msg_clr_eos_force(void);
21b0a39d13ed commit https://github.com/vim/vim/commit/ef26954a35207c3f17d6ed35d9a40c918d974892
Christian Brabandt <cb@256bit.org>
parents: 3435
diff changeset
64 void msg_clr_cmdline(void);
21b0a39d13ed commit https://github.com/vim/vim/commit/ef26954a35207c3f17d6ed35d9a40c918d974892
Christian Brabandt <cb@256bit.org>
parents: 3435
diff changeset
65 int msg_end(void);
21b0a39d13ed commit https://github.com/vim/vim/commit/ef26954a35207c3f17d6ed35d9a40c918d974892
Christian Brabandt <cb@256bit.org>
parents: 3435
diff changeset
66 void msg_check(void);
21b0a39d13ed commit https://github.com/vim/vim/commit/ef26954a35207c3f17d6ed35d9a40c918d974892
Christian Brabandt <cb@256bit.org>
parents: 3435
diff changeset
67 int redirecting(void);
21b0a39d13ed commit https://github.com/vim/vim/commit/ef26954a35207c3f17d6ed35d9a40c918d974892
Christian Brabandt <cb@256bit.org>
parents: 3435
diff changeset
68 void verbose_enter(void);
21b0a39d13ed commit https://github.com/vim/vim/commit/ef26954a35207c3f17d6ed35d9a40c918d974892
Christian Brabandt <cb@256bit.org>
parents: 3435
diff changeset
69 void verbose_leave(void);
21b0a39d13ed commit https://github.com/vim/vim/commit/ef26954a35207c3f17d6ed35d9a40c918d974892
Christian Brabandt <cb@256bit.org>
parents: 3435
diff changeset
70 void verbose_enter_scroll(void);
21b0a39d13ed commit https://github.com/vim/vim/commit/ef26954a35207c3f17d6ed35d9a40c918d974892
Christian Brabandt <cb@256bit.org>
parents: 3435
diff changeset
71 void verbose_leave_scroll(void);
21b0a39d13ed commit https://github.com/vim/vim/commit/ef26954a35207c3f17d6ed35d9a40c918d974892
Christian Brabandt <cb@256bit.org>
parents: 3435
diff changeset
72 void verbose_stop(void);
21b0a39d13ed commit https://github.com/vim/vim/commit/ef26954a35207c3f17d6ed35d9a40c918d974892
Christian Brabandt <cb@256bit.org>
parents: 3435
diff changeset
73 int verbose_open(void);
21b0a39d13ed commit https://github.com/vim/vim/commit/ef26954a35207c3f17d6ed35d9a40c918d974892
Christian Brabandt <cb@256bit.org>
parents: 3435
diff changeset
74 void give_warning(char_u *message, int hl);
11561
7ad79766365a patch 8.0.0663: unexpected error message only when 'verbose' is set
Christian Brabandt <cb@256bit.org>
parents: 11163
diff changeset
75 void give_warning2(char_u *message, char_u *a1, int hl);
7668
21b0a39d13ed commit https://github.com/vim/vim/commit/ef26954a35207c3f17d6ed35d9a40c918d974892
Christian Brabandt <cb@256bit.org>
parents: 3435
diff changeset
76 void msg_advance(int col);
21b0a39d13ed commit https://github.com/vim/vim/commit/ef26954a35207c3f17d6ed35d9a40c918d974892
Christian Brabandt <cb@256bit.org>
parents: 3435
diff changeset
77 int do_dialog(int type, char_u *title, char_u *message, char_u *buttons, int dfltbutton, char_u *textfield, int ex_cmd);
21b0a39d13ed commit https://github.com/vim/vim/commit/ef26954a35207c3f17d6ed35d9a40c918d974892
Christian Brabandt <cb@256bit.org>
parents: 3435
diff changeset
78 void display_confirm_msg(void);
21b0a39d13ed commit https://github.com/vim/vim/commit/ef26954a35207c3f17d6ed35d9a40c918d974892
Christian Brabandt <cb@256bit.org>
parents: 3435
diff changeset
79 int vim_dialog_yesno(int type, char_u *title, char_u *message, int dflt);
21b0a39d13ed commit https://github.com/vim/vim/commit/ef26954a35207c3f17d6ed35d9a40c918d974892
Christian Brabandt <cb@256bit.org>
parents: 3435
diff changeset
80 int vim_dialog_yesnocancel(int type, char_u *title, char_u *message, int dflt);
21b0a39d13ed commit https://github.com/vim/vim/commit/ef26954a35207c3f17d6ed35d9a40c918d974892
Christian Brabandt <cb@256bit.org>
parents: 3435
diff changeset
81 int vim_dialog_yesnoallcancel(int type, char_u *title, char_u *message, int dflt);
21b0a39d13ed commit https://github.com/vim/vim/commit/ef26954a35207c3f17d6ed35d9a40c918d974892
Christian Brabandt <cb@256bit.org>
parents: 3435
diff changeset
82 char_u *do_browse(int flags, char_u *title, char_u *dflt, char_u *ext, char_u *initdir, char_u *filter, buf_T *buf);
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
83 /* vim: set ft=c : */