Get rid of capacity argument to ds_init() and update all callers.
[pspp-builds.git] / src / libpspp / str.h
index 6f34c200d054d59c3da3f453db211d198fd798fe..379762fc858e5db6171ace675007055b12b009e1 100644 (file)
@@ -117,7 +117,7 @@ struct string
 #define DS_INITIALIZER {NULL, 0, 0}
 
 /* Constructors, destructors. */
-void ds_init (struct string *, size_t);
+void ds_init (struct string *);
 void ds_init_substring (struct string *,
                         const struct string *src, size_t start, size_t cnt);
 void ds_create (struct string *, const char *);
@@ -144,7 +144,9 @@ int ds_ltrim_spaces (struct string *);
 void ds_trim_spaces (struct string *);
 bool ds_chomp (struct string *, char);
 bool ds_separate (const struct string *src, struct string *token,
-                  const char *delimiters, int *save_idx);
+                  const char *delimiters, size_t *save_idx);
+bool ds_tokenize (const struct string *src, struct string *token,
+                  const char *delimiters, size_t *save_idx);
 
 /* Inspectors. */
 bool ds_is_empty (const struct string *);
@@ -219,6 +221,8 @@ spprintf (char *dst, const char *format, ...)
 }
 
 
+char * ds_append_uninit(struct string *st, size_t incr);
+
 
 
 #endif /* str_h */