comparison src/proto.h @ 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 1d2b5c016f17
children 98c35d312987
comparison
equal deleted inserted replaced
15469:bc9b5261ed01 15470:55ccc2d353bd
106 /* These prototypes cannot be produced automatically. */ 106 /* These prototypes cannot be produced automatically. */
107 int 107 int
108 # ifdef __BORLANDC__ 108 # ifdef __BORLANDC__
109 _RTLENTRYF 109 _RTLENTRYF
110 # endif 110 # endif
111 smsg(char_u *, ...); 111 smsg(const char *, ...);
112 112
113 int 113 int
114 # ifdef __BORLANDC__ 114 # ifdef __BORLANDC__
115 _RTLENTRYF 115 _RTLENTRYF
116 # endif 116 # endif
117 smsg_attr(int, char_u *, ...); 117 smsg_attr(int, const char *, ...);
118 118
119 int 119 int
120 # ifdef __BORLANDC__ 120 # ifdef __BORLANDC__
121 _RTLENTRYF 121 _RTLENTRYF
122 # endif 122 # endif
123 smsg_attr_keep(int, char_u *, ...); 123 smsg_attr_keep(int, const char *, ...);
124 124
125 int 125 int
126 # ifdef __BORLANDC__ 126 # ifdef __BORLANDC__
127 _RTLENTRYF 127 _RTLENTRYF
128 # endif 128 # endif
129 vim_snprintf_add(char *, size_t, char *, ...) 129 vim_snprintf_add(char *, size_t, const char *, ...)
130 #ifdef USE_PRINTF_FORMAT_ATTRIBUTE 130 #ifdef USE_PRINTF_FORMAT_ATTRIBUTE
131 __attribute__((format(printf, 3, 4))) 131 __attribute__((format(printf, 3, 4)))
132 #endif 132 #endif
133 ; 133 ;
134 134
135 int 135 int
136 # ifdef __BORLANDC__ 136 # ifdef __BORLANDC__
137 _RTLENTRYF 137 _RTLENTRYF
138 # endif 138 # endif
139 vim_snprintf(char *, size_t, char *, ...) 139 vim_snprintf(char *, size_t, const char *, ...)
140 #ifdef USE_PRINTF_FORMAT_ATTRIBUTE 140 #ifdef USE_PRINTF_FORMAT_ATTRIBUTE
141 __attribute__((format(printf, 3, 4))) 141 __attribute__((format(printf, 3, 4)))
142 #endif 142 #endif
143 ; 143 ;
144 144
145 int vim_vsnprintf(char *str, size_t str_m, char *fmt, va_list ap); 145 int vim_vsnprintf(char *str, size_t str_m, const char *fmt, va_list ap);
146 int vim_vsnprintf_typval(char *str, size_t str_m, char *fmt, va_list ap, typval_T *tvs); 146 int vim_vsnprintf_typval(char *str, size_t str_m, const char *fmt, va_list ap, typval_T *tvs);
147 147
148 # include "message.pro" 148 # include "message.pro"
149 # include "misc1.pro" 149 # include "misc1.pro"
150 # include "misc2.pro" 150 # include "misc2.pro"
151 #ifndef HAVE_STRPBRK /* not generated automatically from misc2.c */ 151 #ifndef HAVE_STRPBRK /* not generated automatically from misc2.c */