aboutsummaryrefslogtreecommitdiff
path: root/include/str.h
diff options
context:
space:
mode:
authorJoseph Hunkeler <jhunkeler@gmail.com>2020-03-24 12:31:59 -0400
committerJoseph Hunkeler <jhunkeler@gmail.com>2020-03-24 12:31:59 -0400
commit239251d34af9137acf7e84c6969e118d3b0593c0 (patch)
tree5b576d374cc2d12bc5593c8b09adaa25c4453346 /include/str.h
parentad07c35f12ca10bd3dfea50aaf8a9db8dcc9f630 (diff)
downloadspmc-239251d34af9137acf7e84c6969e118d3b0593c0.tar.gz
Fix bugs uncovered by tests
Diffstat (limited to 'include/str.h')
-rw-r--r--include/str.h7
1 files changed, 6 insertions, 1 deletions
diff --git a/include/str.h b/include/str.h
index e313b84..5e6d30d 100644
--- a/include/str.h
+++ b/include/str.h
@@ -4,6 +4,11 @@
#ifndef SPM_STR_H
#define SPM_STR_H
+#define SPM_SORT_ALPHA 1 << 0
+#define SPM_SORT_NUMERIC 1 << 1
+#define SPM_SORT_LEN_ASCENDING 1 << 2
+#define SPM_SORT_LEN_DESCENDING 1 << 3
+
int num_chars(const char *sptr, int ch);
int startswith(const char *sptr, const char *pattern);
int endswith(const char *sptr, const char *pattern);
@@ -16,7 +21,7 @@ void split_free(char **ptr);
char *join(char **arr, const char *separator);
char *join_ex(char *separator, ...);
char *substring_between(char *sptr, const char *delims);
-void strsort(char **arr);
+void strsort(char **arr, unsigned int sort_mode);
int find_in_file(const char *filename, const char *pattern);
int isrelational(char ch);
void print_banner(const char *s, int len);