comparison src/user-prefs.cc @ 1198:1352ecca2d91

[project @ 1995-03-31 22:13:32 by jwe]
author jwe
date Fri, 31 Mar 1995 22:13:32 +0000
parents b6360f2d4fa6
children 97c541091d3b
comparison
equal deleted inserted replaced
1197:ed01dfb2338d 1198:1352ecca2d91
62 user_pref.resize_on_range_error = 0; 62 user_pref.resize_on_range_error = 0;
63 user_pref.return_last_computed_value = 0; 63 user_pref.return_last_computed_value = 0;
64 user_pref.save_precision = 0; 64 user_pref.save_precision = 0;
65 user_pref.silent_functions = 0; 65 user_pref.silent_functions = 0;
66 user_pref.split_long_rows = 0; 66 user_pref.split_long_rows = 0;
67 user_pref.struct_levels_to_print = 0;
67 user_pref.suppress_verbose_help_message = 0; 68 user_pref.suppress_verbose_help_message = 0;
68 user_pref.treat_neg_dim_as_zero = 0; 69 user_pref.treat_neg_dim_as_zero = 0;
69 user_pref.warn_assign_as_truth_value = 0; 70 user_pref.warn_assign_as_truth_value = 0;
70 user_pref.warn_comma_in_global_decl = 0; 71 user_pref.warn_comma_in_global_decl = 0;
71 user_pref.warn_divide_by_zero = 0; 72 user_pref.warn_divide_by_zero = 0;
108 pref = 0; 109 pref = 0;
109 } 110 }
110 return pref; 111 return pref;
111 } 112 }
112 113
114 // XXX FIXME XXX -- some of these should do their own checking to be
115 // able to provide more meaningful warning or error messages.
116
113 // Should a replot command be generated automatically each time a plot 117 // Should a replot command be generated automatically each time a plot
114 // changes in some way? 118 // changes in some way?
115 119
116 int 120 int
117 automatic_replot (void) 121 automatic_replot (void)
359 split_long_rows (void) 363 split_long_rows (void)
360 { 364 {
361 user_pref.split_long_rows = check_str_pref ("split_long_rows"); 365 user_pref.split_long_rows = check_str_pref ("split_long_rows");
362 366
363 return 0; 367 return 0;
368 }
369
370
371 // How many levels of structure elements should we print?
372
373 int
374 struct_levels_to_print (void)
375 {
376 int status = 0;
377
378 static int kludge = 0;
379
380 double val;
381 if (builtin_real_scalar_variable ("struct_levels_to_print", val) == 0
382 && ! xisnan (val))
383 {
384 int ival = NINT (val);
385 if (ival > 0 && (double) ival == val)
386 {
387 user_pref.struct_levels_to_print = ival;
388 return status;
389 }
390 }
391
392 if (kludge == 0)
393 kludge++;
394 else
395 {
396 warning ("invalid value specified for struct_levels_to_print");
397 status = -1;
398 }
399
400 return status;
364 } 401 }
365 402
366 403
367 // Suppress printing of additional help message in help and usage 404 // Suppress printing of additional help message in help and usage
368 // functions? 405 // functions?
517 && ! xisnan (val)) 554 && ! xisnan (val))
518 { 555 {
519 int ival = NINT (val); 556 int ival = NINT (val);
520 if (ival > 0 && (double) ival == val) 557 if (ival > 0 && (double) ival == val)
521 { 558 {
522 user_pref.output_max_field_width= ival; 559 user_pref.output_max_field_width = ival;
523 return status; 560 return status;
524 } 561 }
525 } 562 }
526 563
527 if (kludge == 0) 564 if (kludge == 0)