|
16 | 16 | * License for the specific language governing permissions and limitations |
17 | 17 | * under the License. |
18 | 18 | * |
19 | | - * Version: $Id: libpawnc.c 6131 2020-04-29 19:47:15Z thiadmer $ |
| 19 | + * Version: $Id: libpawnc.c 7152 2024-03-23 20:47:23Z thiadmer $ |
20 | 20 | */ |
21 | 21 | #include <assert.h> |
22 | 22 | #include <stdio.h> |
@@ -124,12 +124,10 @@ int pc_printf(const char *message,...) |
124 | 124 | */ |
125 | 125 | int pc_error(int number,const char *message,const char *filename,int firstline,int lastline,va_list argptr) |
126 | 126 | { |
127 | | -static char *prefix[3]={ "error", "fatal error", "warning" }; |
| 127 | +static const char *prefix[3]={ "error", "fatal error", "warning" }; |
128 | 128 |
|
129 | 129 | if (number!=0) { |
130 | | - char *pre; |
131 | | - |
132 | | - pre=prefix[number/100]; |
| 130 | + const char *pre=prefix[number/100]; |
133 | 131 | if (firstline>=0) |
134 | 132 | fprintf(stderr,"%s(%d -- %d) : %s %03d: ",filename,firstline,lastline,pre,number); |
135 | 133 | else |
@@ -252,7 +250,7 @@ int pc_eofsrc(void *handle) |
252 | 250 | /* should return a pointer, which is used as a "magic cookie" to all I/O |
253 | 251 | * functions; return NULL for failure |
254 | 252 | */ |
255 | | -void *pc_openasm(char *filename) |
| 253 | +void *pc_openasm(const char *filename) |
256 | 254 | { |
257 | 255 | #if defined __MSDOS__ || defined PAWN_LIGHT |
258 | 256 | return fopen(filename,"w+t"); |
@@ -309,7 +307,7 @@ char *pc_readasm(void *handle, char *string, int maxchars) |
309 | 307 | /* Should return a pointer, which is used as a "magic cookie" to all I/O |
310 | 308 | * functions; return NULL for failure. |
311 | 309 | */ |
312 | | -void *pc_openbin(char *filename) |
| 310 | +void *pc_openbin(const char *filename) |
313 | 311 | { |
314 | 312 | return fopen(filename,"wb"); |
315 | 313 | } |
|
0 commit comments