X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Flanguage%2Fcontrol%2Frepeat.c;h=933c9134bfcb5c8c37bdbd8d651737b07d002655;hb=77e551d23575da6b89f866612ab39c2b0497c9be;hp=bba14c6c7bdb3c1bd6febb6a50a99498a0f9d152;hpb=dcf9b154cbcaa35c3d8459a201b77eec8bcb30bd;p=pspp-builds.git diff --git a/src/language/control/repeat.c b/src/language/control/repeat.c index bba14c6c..933c9134 100644 --- a/src/language/control/repeat.c +++ b/src/language/control/repeat.c @@ -19,27 +19,26 @@ #include #include "repeat.h" -#include "message.h" +#include #include #include #include -#include "alloc.h" -#include "command.h" -#include "dictionary.h" -#include "message.h" -#include "line-buffer.h" -#include "lexer.h" -#include "misc.h" -#include "pool.h" -#include "settings.h" -#include "str.h" -#include "variable.h" +#include +#include +#include +#include "intprops.h" +#include +#include +#include +#include +#include +#include +#include +#include #include "gettext.h" #define _(msgid) gettext (msgid) -#include "debug-print.h" - /* Defines a list of lines used by DO REPEAT. */ struct line_list { @@ -363,7 +362,7 @@ parse_ids (struct repeat_entry *e) static inline void store_numeric (char **repl, long value) { - *repl = xmalloc (INT_DIGITS + 1); + *repl = xmalloc (INT_STRLEN_BOUND (value) + 1); sprintf (*repl, "%ld", value); } @@ -561,7 +560,7 @@ do_repeat_read (struct string *output, char **file_name, int *line_number, } line = block->cur_line; - ds_replace (output, line->line); + ds_assign_c_str (output, line->line); *file_name = line->file_name; *line_number = -line->line_number; block->cur_line = line->next;