aboutsummaryrefslogtreecommitdiff
path: root/text-regex.h
diff options
context:
space:
mode:
authorRandy Palamar <randy@rnpnr.xyz>2025-12-05 12:05:32 -0700
committerRandy Palamar <randy@rnpnr.xyz>2025-12-16 11:28:44 -0700
commit1d1d19ed30309b39fc5e43c830cabb4cdd004d07 (patch)
tree56bb7c09d3b07118e39e7fc6174403b0235d56a7 /text-regex.h
parent65dd46e0bba74948c824370a06e509cba462cd72 (diff)
downloadvis-1d1d19ed30309b39fc5e43c830cabb4cdd004d07.tar.gz
vis-1d1d19ed30309b39fc5e43c830cabb4cdd004d07.tar.xz
mark all functions in headers with VIS_EXPORT or VIS_INTERNAL
if vis actually wants to be a library exported symbols may need mark up depending on the platform (eg. __declspec(dllexport)). This needs to be hidden behind a macro because the way you export is not the same on every platform. I did this based on the assumption that vis.h was supposed to be the only interface to the "vis" library. Since nobody actually uses vis as a library I have no idea if this is actually correct. Anyway marking up all prototypes like this allows for one to convert all functions to static if a single translation unit is used by inserting at the start: #define VIS_INTERNAL static #define VIS_EXPORT static
Diffstat (limited to 'text-regex.h')
-rw-r--r--text-regex.h14
1 files changed, 7 insertions, 7 deletions
diff --git a/text-regex.h b/text-regex.h
index dd87c1c..4b64218 100644
--- a/text-regex.h
+++ b/text-regex.h
@@ -14,12 +14,12 @@
typedef struct Regex Regex;
typedef Filerange RegexMatch;
-Regex *text_regex_new(void);
-int text_regex_compile(Regex*, const char *pattern, int cflags);
-size_t text_regex_nsub(Regex*);
-void text_regex_free(Regex*);
-int text_regex_match(Regex*, const char *data, int eflags);
-int text_search_range_forward(Text*, size_t pos, size_t len, Regex *r, size_t nmatch, RegexMatch pmatch[], int eflags);
-int text_search_range_backward(Text*, size_t pos, size_t len, Regex *r, size_t nmatch, RegexMatch pmatch[], int eflags);
+VIS_INTERNAL Regex *text_regex_new(void);
+VIS_INTERNAL int text_regex_compile(Regex*, const char *pattern, int cflags);
+VIS_INTERNAL size_t text_regex_nsub(Regex*);
+VIS_INTERNAL void text_regex_free(Regex*);
+VIS_INTERNAL int text_regex_match(Regex*, const char *data, int eflags);
+VIS_INTERNAL int text_search_range_forward(Text*, size_t pos, size_t len, Regex *r, size_t nmatch, RegexMatch pmatch[], int eflags);
+VIS_INTERNAL int text_search_range_backward(Text*, size_t pos, size_t len, Regex *r, size_t nmatch, RegexMatch pmatch[], int eflags);
#endif