Unified · Split
| @@ -132,7 +132,7 @@ BOOL WINAPI DllMain (HINSTANCE hDll, DWORD dwReason, LPVOID lpReserved) · 131 unmodified lines | |||
| 132 | 132 | ||
| 133 | /********************************************************/ | 133 | /********************************************************/ |
| 134 | /* copy a string and truncate it. */ | 134 | /* copy a string and truncate it. */ |
| 135 | ST_FUNC char *pstrcpy(char *buf, int buf_size, const char *s) | 135 | ST_FUNC char *pstrcpy(char *buf, size_t buf_size, const char *s) |
| 136 | { | 136 | { |
| 137 | char *q, *q_end; | 137 | char *q, *q_end; |
| 138 | int c; | 138 | int c; |
| @@ -152,9 +152,9 @@ ST_FUNC char *pstrcpy(char *buf, int buf_size, const char *s) · 13 unmodified lines | |||
| 152 | } | 152 | } |
| 153 | 153 | ||
| 154 | /* strcat and truncate. */ | 154 | /* strcat and truncate. */ |
| 155 | ST_FUNC char *pstrcat(char *buf, int buf_size, const char *s) | 155 | ST_FUNC char *pstrcat(char *buf, size_t buf_size, const char *s) |
| 156 | { | 156 | { |
| 157 | int len; | 157 | size_t len; |
| 158 | len = strlen(buf); | 158 | len = strlen(buf); |
| 159 | if (len < buf_size) | 159 | if (len < buf_size) |
| 160 | pstrcpy(buf + len, buf_size - len, s); | 160 | pstrcpy(buf + len, buf_size - len, s); |
| @@ -1120,8 +1120,8 @@ ST_DATA int tcc_ext; · 1119 unmodified lines | |||
| 1120 | ST_DATA struct TCCState *tcc_state; | 1120 | ST_DATA struct TCCState *tcc_state; |
| 1121 | 1121 | ||
| 1122 | /* public functions currently used by the tcc main function */ | 1122 | /* public functions currently used by the tcc main function */ |
| 1123 | ST_FUNC char *pstrcpy(char *buf, int buf_size, const char *s); | 1123 | ST_FUNC char *pstrcpy(char *buf, size_t buf_size, const char *s); |
| 1124 | ST_FUNC char *pstrcat(char *buf, int buf_size, const char *s); | 1124 | ST_FUNC char *pstrcat(char *buf, size_t buf_size, const char *s); |
| 1125 | ST_FUNC char *pstrncpy(char *out, const char *in, size_t num); | 1125 | ST_FUNC char *pstrncpy(char *out, const char *in, size_t num); |
| 1126 | PUB_FUNC char *tcc_basename(const char *name); | 1126 | PUB_FUNC char *tcc_basename(const char *name); |
| 1127 | PUB_FUNC char *tcc_fileextension (const char *name); | 1127 | PUB_FUNC char *tcc_fileextension (const char *name); |