summaryrefslogtreecommitdiffstats
path: root/src/utils.h
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2021-10-09 10:23:35 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2021-10-09 10:23:35 +0000
commit29fcdabc71b54182909fd9341dc002784945e1cd (patch)
tree31aae388cab95a9452acda7a987cc232a47b6707 /src/utils.h
parentAdding upstream version 1.6.3. (diff)
downloadttyd-29fcdabc71b54182909fd9341dc002784945e1cd.tar.xz
ttyd-29fcdabc71b54182909fd9341dc002784945e1cd.zip
Adding upstream version 1.6.3+20210924.upstream/1.6.3+20210924
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'src/utils.h')
-rw-r--r--src/utils.h16
1 files changed, 9 insertions, 7 deletions
diff --git a/src/utils.h b/src/utils.h
index 2060ac9..826bb94 100644
--- a/src/utils.h
+++ b/src/utils.h
@@ -14,7 +14,10 @@ void *xmalloc(size_t size);
void *xrealloc(void *p, size_t size);
// Convert a string to upper case
-char *uppercase(char *str);
+char *uppercase(char *s);
+
+// Convert a string to lower case
+char *lowercase(char *s);
// Check whether str ends with suffix
bool endswith(const char *str, const char *suffix);
@@ -25,13 +28,12 @@ int get_sig_name(int sig, char *buf, size_t len);
// Get signal code from string like SIGHUP
int get_sig(const char *sig_name);
-// Set the given file descriptor close-on-exec
-bool fd_set_cloexec(const int fd);
-
// Open uri with the default application of system
int open_uri(char *uri);
-// Encode text to base64, the caller should free the returned string
-char *base64_encode(const unsigned char *buffer, size_t length);
-
+#ifdef _WIN32
+char *strsep(char **sp, char *sep);
+const char *quote_arg(const char *arg);
+void print_error(char *func);
+#endif
#endif // TTYD_UTIL_H