comparison src/user-prefs.cc @ 275:a419f80fc9a8

[project @ 1994-01-07 01:26:09 by jwe]
author jwe
date Fri, 07 Jan 1994 01:29:20 +0000
parents a99f28f5e351
children 82d30a23c979
comparison
equal deleted inserted replaced
274:ddf76073ce96 275:a419f80fc9a8
1 // user-prefs.cc -*- C++ -*- 1 // user-prefs.cc -*- C++ -*-
2 /* 2 /*
3 3
4 Copyright (C) 1992, 1993 John W. Eaton 4 Copyright (C) 1992, 1993, 1994 John W. Eaton
5 5
6 This file is part of Octave. 6 This file is part of Octave.
7 7
8 Octave is free software; you can redistribute it and/or modify it 8 Octave is free software; you can redistribute it and/or modify it
9 under the terms of the GNU General Public License as published by the 9 under the terms of the GNU General Public License as published by the
399 399
400 return status; 400 return status;
401 } 401 }
402 402
403 int 403 int
404 set_save_precision (void)
405 {
406 int status = 0;
407
408 static int kludge = 0;
409
410 double val;
411 if (builtin_real_scalar_variable ("save_precision", val) == 0)
412 {
413 int ival = NINT (val);
414 if (ival >= 0 && (double) ival == val)
415 {
416 user_pref.save_precision = ival;
417 return status;
418 }
419 }
420
421 if (kludge == 0)
422 kludge++;
423 else
424 {
425 warning ("invalid value specified for save_precision");
426 status = -1;
427 }
428
429 return status;
430 }
431
432 int
404 sv_loadpath (void) 433 sv_loadpath (void)
405 { 434 {
406 int status = 0; 435 int status = 0;
407 436
408 char *s = builtin_string_variable ("LOADPATH"); 437 char *s = builtin_string_variable ("LOADPATH");