diff 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
line wrap: on
line diff
--- a/src/user-prefs.cc	Thu Jan 06 22:47:01 1994 +0000
+++ b/src/user-prefs.cc	Fri Jan 07 01:29:20 1994 +0000
@@ -1,7 +1,7 @@
 // user-prefs.cc                                              -*- C++ -*-
 /*
 
-Copyright (C) 1992, 1993 John W. Eaton
+Copyright (C) 1992, 1993, 1994 John W. Eaton
 
 This file is part of Octave.
 
@@ -401,6 +401,35 @@
 }
 
 int
+set_save_precision (void)
+{
+  int status = 0;
+
+  static int kludge = 0;
+
+  double val;
+  if (builtin_real_scalar_variable ("save_precision", val) == 0)
+    {
+      int ival = NINT (val);
+      if (ival >= 0 && (double) ival == val)
+	{
+	  user_pref.save_precision = ival;
+	  return status;
+	}
+    }
+
+  if (kludge == 0)
+    kludge++;
+  else
+    {
+      warning ("invalid value specified for save_precision");
+      status = -1;
+    }
+
+  return status;
+}
+
+int
 sv_loadpath (void)
 {
   int status = 0;