These are used in `libtcc.c` now and cannot remain in `tccpe.c`
Unified · Split
| @@ -69,6 +69,4 @@ tiny_libmaker · 68 unmodified lines | |||
| 69 | *~ | 69 | *~ |
| 70 | \#* | 70 | \#* |
| 71 | .#* | 71 | .#* |
| 72 | win32/include/* | 72 | win32/* |
| 73 | win32/lib/* | ||
| 74 | win32/vs2015/* | ||
| @@ -1263,6 +1263,8 @@ ST_FUNC void preprocess_delete(void); · 1262 unmodified lines | |||
| 1263 | ST_FUNC int tcc_preprocess(TCCState *s1); | 1263 | ST_FUNC int tcc_preprocess(TCCState *s1); |
| 1264 | ST_FUNC void skip(int c); | 1264 | ST_FUNC void skip(int c); |
| 1265 | ST_FUNC NORETURN void expect(const char *msg); | 1265 | ST_FUNC NORETURN void expect(const char *msg); |
| 1266 | ST_FUNC char *trimfront(char *p); | ||
| 1267 | ST_FUNC char *trimback(char *a, char *e); | ||
| 1266 | 1268 | ||
| 1267 | /* ------------ tccgen.c ------------ */ | 1269 | /* ------------ tccgen.c ------------ */ |
| 1268 | 1270 | ||
| @@ -1563,22 +1563,6 @@ quit: · 1562 unmodified lines | |||
| 1563 | return ret; | 1563 | return ret; |
| 1564 | } | 1564 | } |
| 1565 | 1565 | ||
| 1566 | /* ------------------------------------------------------------- */ | ||
| 1567 | static char *trimfront(char *p) | ||
| 1568 | { | ||
| 1569 | while (*p && (unsigned char)*p <= ' ') | ||
| 1570 | ++p; | ||
| 1571 | return p; | ||
| 1572 | } | ||
| 1573 | |||
| 1574 | static char *trimback(char *a, char *e) | ||
| 1575 | { | ||
| 1576 | while (e > a && (unsigned char)e[-1] <= ' ') | ||
| 1577 | --e; | ||
| 1578 | *e = 0;; | ||
| 1579 | return a; | ||
| 1580 | } | ||
| 1581 | |||
| 1582 | /* ------------------------------------------------------------- */ | 1566 | /* ------------------------------------------------------------- */ |
| 1583 | static int pe_load_def(TCCState *s1, int fd) | 1567 | static int pe_load_def(TCCState *s1, int fd) |
| 1584 | { | 1568 | { |
| @@ -3490,3 +3490,18 @@ ST_FUNC int tcc_preprocess(TCCState *s1) · 3489 unmodified lines | |||
| 3490 | 3490 | ||
| 3491 | return 0; | 3491 | return 0; |
| 3492 | } | 3492 | } |
| 3493 | |||
| 3494 | ST_FUNC char *trimfront(char *p) | ||
| 3495 | { | ||
| 3496 | while (*p && (unsigned char)*p <= ' ') | ||
| 3497 | ++p; | ||
| 3498 | return p; | ||
| 3499 | } | ||
| 3500 | |||
| 3501 | ST_FUNC char *trimback(char *a, char *e) | ||
| 3502 | { | ||
| 3503 | while (e > a && (unsigned char)e[-1] <= ' ') | ||
| 3504 | --e; | ||
| 3505 | *e = 0;; | ||
| 3506 | return a; | ||
| 3507 | } | ||