Mercurial > hg > octave-lyh
changeset 1416:8b976f7c0aa8
[project @ 1995-09-15 10:17:34 by jwe]
author | jwe |
---|---|
date | Fri, 15 Sep 1995 10:22:34 +0000 |
parents | f18474c64e72 |
children | 0bfe95ddc0af |
files | src/gripes.cc src/gripes.h src/user-prefs.cc |
diffstat | 3 files changed, 26 insertions(+), 15 deletions(-) [+] |
line wrap: on
line diff
--- a/src/gripes.cc +++ b/src/gripes.cc @@ -88,6 +88,12 @@ } void +gripe_invalid_value_specified (const char *name) +{ + warning ("invalid value specified for `%s'", name); +} + +void gripe_2_or_3_dim_plot (void) { error ("plot: can only plot in 2 or 3 dimensions");
--- a/src/gripes.h +++ b/src/gripes.h @@ -35,6 +35,7 @@ extern void gripe_user_supplied_eval (const char *name); extern void gripe_user_returned_invalid (const char *name); extern void gripe_invalid_conversion (const char *from, const char *to); +extern void gripe_invalid_value_specified (const char *name); extern void gripe_2_or_3_dim_plot (void); extern void gripe_unrecognized_float_fmt (void); extern void gripe_unrecognized_data_fmt (const char *warn_for);
--- a/src/user-prefs.cc +++ b/src/user-prefs.cc @@ -28,6 +28,7 @@ #include <cstring> #include "error.h" +#include "gripes.h" #include "mappers.h" #include "user-prefs.h" #include "utils.h" @@ -93,6 +94,9 @@ // return of 0 => never ok. // return of -1 => ok, but give me warning (default). +// XXX FIXME XXX -- should also allow zero to mean "false" and nonzero +// to mean "true". + static int check_str_pref (char *var) { @@ -393,7 +397,7 @@ kludge++; else { - warning ("invalid value specified for struct_levels_to_print"); + gripe_invalid_value_specified ("struct_levels_to_print"); status = -1; } @@ -565,7 +569,7 @@ kludge++; else { - warning ("invalid value specified for output_max_field_width"); + gripe_invalid_value_specified ("output_max_field_width"); status = -1; } @@ -595,7 +599,7 @@ kludge++; else { - warning ("invalid value specified for output_precision"); + gripe_invalid_value_specified ("output_precision"); status = -1; } @@ -625,7 +629,7 @@ kludge++; else { - warning ("invalid value specified for save_precision"); + gripe_invalid_value_specified ("save_precision"); status = -1; } @@ -645,7 +649,7 @@ } else { - warning ("invalid value specified for EDITOR"); + gripe_invalid_value_specified ("EDITOR"); status = -1; } @@ -665,7 +669,7 @@ } else { - warning ("invalid value specified for default_save_format"); + gripe_invalid_value_specified ("default_save_format"); status = -1; } @@ -685,7 +689,7 @@ } else { - warning ("invalid value specified for gnuplot_binary"); + gripe_invalid_value_specified ("gnuplot_binary"); status = -1; } @@ -705,7 +709,7 @@ } else { - warning ("invalid value specified for IMAGEPATH"); + gripe_invalid_value_specified ("IMAGEPATH"); status = -1; } @@ -725,7 +729,7 @@ } else { - warning ("invalid value specified for INFO_FILE"); + gripe_invalid_value_specified ("INFO_FILE"); status = -1; } @@ -745,7 +749,7 @@ } else { - warning ("invalid value specified for LOADPATH"); + gripe_invalid_value_specified ("LOADPATH"); status = -1; } @@ -765,7 +769,7 @@ } else { - warning ("invalid value specified for PAGER"); + gripe_invalid_value_specified ("PAGER"); status = -1; } @@ -785,7 +789,7 @@ } else { - warning ("invalid value specified for PS1"); + gripe_invalid_value_specified ("PS1"); status = -1; } @@ -805,7 +809,7 @@ } else { - warning ("invalid value specified for PS2"); + gripe_invalid_value_specified ("PS2"); status = -1; } @@ -825,7 +829,7 @@ } else { - warning ("invalid value specified for PS4"); + gripe_invalid_value_specified ("PS4"); status = -1; } @@ -845,7 +849,7 @@ } else { - warning ("invalid value specified for PWD"); + gripe_invalid_value_specified ("PWD"); status = -1; }