summaryrefslogtreecommitdiff
path: root/sds.h
diff options
context:
space:
mode:
Diffstat (limited to 'sds.h')
-rw-r--r--sds.h10
1 files changed, 7 insertions, 3 deletions
diff --git a/sds.h b/sds.h
index 76d69a8..2c3fb52 100644
--- a/sds.h
+++ b/sds.h
@@ -32,12 +32,13 @@
#define __SDS_H
#include <sys/types.h>
+#include <stdarg.h>
typedef char *sds;
struct sdshdr {
- long len;
- long free;
+ int len;
+ int free;
char buf[];
};
@@ -53,6 +54,7 @@ sds sdscat(sds s, const char *t);
sds sdscpylen(sds s, char *t, size_t len);
sds sdscpy(sds s, char *t);
+sds sdscatvprintf(sds s, const char *fmt, va_list ap);
#ifdef __GNUC__
sds sdscatprintf(sds s, const char *fmt, ...)
__attribute__((format(printf, 2, 3)));
@@ -61,7 +63,7 @@ sds sdscatprintf(sds s, const char *fmt, ...);
#endif
sds sdstrim(sds s, const char *cset);
-sds sdsrange(sds s, long start, long end);
+sds sdsrange(sds s, int start, int end);
void sdsupdatelen(sds s);
int sdscmp(sds s1, sds s2);
sds *sdssplitlen(char *s, int len, char *sep, int seplen, int *count);
@@ -69,5 +71,7 @@ void sdsfreesplitres(sds *tokens, int count);
void sdstolower(sds s);
void sdstoupper(sds s);
sds sdsfromlonglong(long long value);
+sds sdscatrepr(sds s, char *p, size_t len);
+sds *sdssplitargs(char *line, int *argc);
#endif