(ds_read_line): Add argument to limit the length of the line to be
[pspp-builds.git] / src / libpspp / str.h
index 23966dfd0f4c90b37abd9ff5127b697554cffb16..0d48bd9bf02229a15b920e2c33280ffa326f62b8 100644 (file)
@@ -25,6 +25,7 @@
 
 #include "compiler.h"
 #include "memcasecmp.h"
+#include "xstrndup.h"
 #include "xvasprintf.h"
 \f
 /* Miscellaneous. */
@@ -45,6 +46,8 @@ void str_copy_buf_trunc (char *, size_t, const char *, size_t);
 void str_uppercase (char *);
 void str_lowercase (char *);
 
+bool str_format_26adic (unsigned long int number, char buffer[], size_t);
+
 char *spprintf (char *dst, const char *format, ...);
 
 void *mempset (void *, int, size_t);
@@ -199,9 +202,9 @@ size_t ds_capacity (const struct string *);
 char *ds_cstr (const struct string *);
 
 /* File input. */
-bool ds_read_line (struct string *, FILE *);
+bool ds_read_line (struct string *, FILE *, size_t max_length);
 bool ds_read_config_line (struct string *, int *line_number, FILE *);
-size_t ds_read_stream (struct string *, size_t size, size_t cnt, FILE *stream);
+bool ds_read_stream (struct string *, size_t size, size_t cnt, FILE *stream);
 
 /* Append. */
 void ds_put_char (struct string *, int ch);