From: John Darrington Date: Sat, 7 Jan 2006 07:29:38 +0000 (+0000) Subject: Fixed bug in getl separation. X-Git-Tag: v0.6.0~1097 X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e238e7fc030ebb64a7f70176c2218783b5b205e3;p=pspp-builds.git Fixed bug in getl separation. --- diff --git a/src/ChangeLog b/src/ChangeLog index 9b73c477..40946b25 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,10 @@ +Sat Jan 7 13:30:54 WST 2006 John Darrington + + * command.c data-in.c main.c: Fixed bug which crept in when + separating getl from readline. + + * vars-atr.c value-labels.h: Fixed constness of val_labs_count. + Fri Dec 23 20:59:01 WST 2005 John Darrington * getl.c error.c: Separated file_loc functionality from error.c diff --git a/src/command.c b/src/command.c index c6d7659d..a471f38e 100644 --- a/src/command.c +++ b/src/command.c @@ -618,7 +618,7 @@ error: int cmd_exit (void) { - if (getl_reading_script) + if (getl_reading_script()) { msg (SE, _("This command is not accepted in a syntax file. " "Instead, use FINISH to terminate a syntax file.")); diff --git a/src/data-in.c b/src/data-in.c index 0c21a380..ae798062 100644 --- a/src/data-in.c +++ b/src/data-in.c @@ -57,7 +57,7 @@ vdls_error (const struct data_in *i, const char *format, va_list args) return; ds_init (&title, 64); - if (!getl_reading_script) + if (!getl_reading_script()) ds_puts (&title, _("data-file error: ")); if (i->f1 == i->f2) ds_printf (&title, _("(column %d"), i->f1); diff --git a/src/main.c b/src/main.c index 0441d74a..be22605b 100644 --- a/src/main.c +++ b/src/main.c @@ -217,7 +217,7 @@ handle_error (int code) assert (0); } - if (getl_reading_script) + if (getl_reading_script()) { err_break (); while (token != T_STOP && token != '.') diff --git a/src/value-labels.c b/src/value-labels.c index cff267f0..03eda933 100644 --- a/src/value-labels.c +++ b/src/value-labels.c @@ -111,7 +111,7 @@ val_labs_clear (struct val_labs *vls) /* Returns the number of value labels in VLS. */ size_t -val_labs_count (struct val_labs *vls) +val_labs_count (const struct val_labs *vls) { assert (vls != NULL); diff --git a/src/value-labels.h b/src/value-labels.h index 11a97b7e..cb27fdfc 100644 --- a/src/value-labels.h +++ b/src/value-labels.h @@ -36,7 +36,7 @@ struct val_labs *val_labs_copy (const struct val_labs *); void val_labs_set_width (struct val_labs *, int new_width); void val_labs_destroy (struct val_labs *); void val_labs_clear (struct val_labs *); -size_t val_labs_count (struct val_labs *); +size_t val_labs_count (const struct val_labs *); int val_labs_add (struct val_labs *, union value, const char *); int val_labs_replace (struct val_labs *, union value, const char *); diff --git a/src/vars-atr.c b/src/vars-atr.c index 160894b4..970ce567 100644 --- a/src/vars-atr.c +++ b/src/vars-atr.c @@ -171,7 +171,7 @@ var_is_valid_name (const char *name, bool issue_error) if (lex_id_to_token (name, strlen (name)) != T_ID) { if (issue_error) - msg (SE, _("%s may not be used as a variable name because it " + msg (SE, _("`%s' may not be used as a variable name because it " "is a reserved word."), name); return false; }