initial version
[pspp-builds.git] / src / libpspp / str.h
index 77d918e28ce8881cf7f6fa5ca8765c4952ef566e..cd7cdb05ad754f7d2cc9697e8c0dcad322519b8d 100644 (file)
@@ -61,6 +61,8 @@ void str_copy_trunc (char *, size_t, const char *);
 void str_copy_buf_trunc (char *, size_t, const char *, size_t);
 void str_uppercase (char *);
 void str_lowercase (char *);
+
+char *spprintf (char *dst, const char *format, ...);
 \f
 /* Fixed-length strings. */
 struct fixed_string 
@@ -117,7 +119,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 *);
@@ -173,6 +175,7 @@ void ds_concat (struct string *, const char *, size_t);
 void ds_vprintf (struct string *st, const char *, va_list);
 void ds_printf (struct string *, const char *, ...)
      PRINTF_FORMAT (2, 3);
+char *ds_append_uninit (struct string *st, size_t incr);
 
 #if __GNUC__ > 1
 extern inline void
@@ -202,25 +205,4 @@ ds_end (const struct string *st)
 }
 #endif
 
-#define nsprintf sprintf
-#define nvsprintf vsprintf
-
-/* Formats FORMAT into DST, as with sprintf(), and returns the
-   address of the terminating null written to DST. */
-static inline char *
-spprintf (char *dst, const char *format, ...) 
-{
-  va_list args;
-  int count;
-
-  va_start (args, format);
-  count = nvsprintf (dst, format, args);
-  va_end (args);
-
-  return dst + count;
-}
-
-
-
-
 #endif /* str_h */