aboutsummaryrefslogtreecommitdiff
path: root/tccpp.c
diff options
context:
space:
mode:
Diffstat (limited to 'tccpp.c')
-rw-r--r--tccpp.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/tccpp.c b/tccpp.c
index 58eb5f6..4164c7e 100644
--- a/tccpp.c
+++ b/tccpp.c
@@ -3490,3 +3490,18 @@ ST_FUNC int tcc_preprocess(TCCState *s1)
return 0;
}
+
+ST_FUNC char *trimfront(char *p)
+{
+ while (*p && (unsigned char)*p <= ' ')
+ ++p;
+ return p;
+}
+
+ST_FUNC char *trimback(char *a, char *e)
+{
+ while (e > a && (unsigned char)e[-1] <= ' ')
+ --e;
+ *e = 0;;
+ return a;
+}