r460: no message
[ctsim.git] / libctgraphics / ezset.cpp
index 718b2504ec77df2504035502c599ebcf9fea8d9f..f04178728a2dff94027a883f063e14490349071e 100644 (file)
@@ -4,9 +4,9 @@
 **      EZSET - Parameter control for EZPLOT           
 **
 **  This is part of the CTSim program
-**  Copyright (C) 1983-2000 Kevin Rosenberg
+**  Copyright (c) 1983-2001 Kevin Rosenberg
 **
-**  $Id: ezset.cpp,v 1.14 2000/12/27 20:09:19 kevin Exp $
+**  $Id: ezset.cpp,v 1.17 2001/01/28 19:10:18 kevin Exp $
 **
 **  This program is free software; you can redistribute it and/or modify
 **  it under the terms of the GNU General Public License (version 2) as
 #include "ezplot.h"
 #include "pol.h"
 
-\r
-bool\r
-EZPlot::ezset (const std::string& command)\r
-{\r
-  return ezset (command.c_str());\r
-}\r
+
+bool
+EZPlot::ezset (const std::string& command)
+{
+  return ezset (command.c_str());
+}
 
 bool 
 EZPlot::ezset (const char* const command)
 {
-\r
+
     return ezcmd (command);
 }
 
@@ -81,7 +81,7 @@ EZPlot::do_cmd (int lx)
     }
     break;
   case S_REPLOT:
-    plot ();
+    plot (m_pSGP);
     break;
   case S_CLEAR:
     clearCurves ();
@@ -91,8 +91,8 @@ EZPlot::do_cmd (int lx)
     c_title = strIn;
     break;
   case S_LEGEND:
-    m_pol.readText (strIn, sizeof(strIn));\r
-    if (m_iCurrentCurve >= 0)\r
+    m_pol.readText (strIn, sizeof(strIn));
+    if (m_iCurrentCurve >= 0)
       setLegend (m_iCurrentCurve, strIn);
     break;
   case S_XLABEL:
@@ -171,24 +171,24 @@ EZPlot::do_cmd (int lx)
     o_linestyle = SGP::LS_SOLID;
     break;
   case S_DASH:
-    int ls;\r
-    ls = SGP::LS_DASH1;\r
-    if (m_pol.readInteger (&n, POL::TT_REAL, FALSE, 0, 0) == TRUE) {\r
+    int ls;
+    ls = SGP::LS_DASH1;
+    if (m_pol.readInteger (&n, POL::TT_REAL, FALSE, 0, 0) == TRUE) {
       if (n == 1)
         ls = SGP::LS_DASH1;
       else if (n == 2)
         ls = SGP::LS_DASH2;
       else if (n == 3)
         ls = SGP::LS_DASH3;
-      else if (n == 4)\r
-        ls = SGP::LS_DASH4;\r
-      else if (n == 5)\r
-        ls = SGP::LS_DOTTED;\r
-    }\r
-    if (m_iCurrentCurve < 0)\r
-      o_linestyle = ls;\r
-    else \r
-      setLinestyle (m_iCurrentCurve, ls);\r
+      else if (n == 4)
+        ls = SGP::LS_DASH4;
+      else if (n == 5)
+        ls = SGP::LS_DOTTED;
+    }
+    if (m_iCurrentCurve < 0)
+      o_linestyle = ls;
+    else 
+      setLinestyle (m_iCurrentCurve, ls);
     break;
   case S_NOLINE:
     o_linestyle = SGP::LS_NOLINE;
@@ -197,11 +197,11 @@ EZPlot::do_cmd (int lx)
   case S_COLOR:
     if (m_pol.readInteger (&n, POL::TT_REAL, FALSE, 0, 0) == TRUE)
     {
-      if (n >= 0) {\r
+      if (n >= 0) {
         if (m_iCurrentCurve < 0)
-          o_color = n;\r
-        else \r
-          setColor (m_iCurrentCurve, n);\r
+          o_color = n;
+        else 
+          setColor (m_iCurrentCurve, n);
       } else
         bad_option("The color you picked");
     }
@@ -283,36 +283,36 @@ EZPlot::do_cmd (int lx)
   case S_SYMBOL:
     if (m_pol.readInteger (&n, POL::TT_REAL, FALSE, 0, 0) == TRUE) {
       if (n > 0 && n <= MAXSYMBOL) {
-        if (m_iCurrentCurve < 0)\r
-          o_symbol = n;\r
-        else\r
-          setSymbol (m_iCurrentCurve, n);\r
-      }\r
+        if (m_iCurrentCurve < 0)
+          o_symbol = n;
+        else
+          setSymbol (m_iCurrentCurve, n);
+      }
     } else {
       if (m_pol.readWord("every",5) == TRUE) {
-        if (m_pol.readInteger (&n, POL::TT_REAL, FALSE, 0, 0) == TRUE) {\r
+        if (m_pol.readInteger (&n, POL::TT_REAL, FALSE, 0, 0) == TRUE) {
           int sym = 1;
-          if (n > 0)\r
-            sym = n;\r
-          if (m_iCurrentCurve < 0)\r
-            o_symfreq = sym;\r
-          else \r
-            setSymbolFreq (m_iCurrentCurve, sym);\r
+          if (n > 0)
+            sym = n;
+          if (m_iCurrentCurve < 0)
+            o_symfreq = sym;
+          else 
+            setSymbolFreq (m_iCurrentCurve, sym);
         }
       } else if (m_pol.readWord ("none",4) == TRUE) {
         o_symbol = -1;
       }
     }
     break;
-  case S_CURVE:\r
-    if (m_pol.readInteger (&n, POL::TT_REAL, FALSE, 0, 0) == TRUE) {\r
-      if (n > 0)\r
-        m_iCurrentCurve = n - 1;\r
-    } else {\r
-      if (m_pol.readWord ("all",3) == TRUE) \r
-        m_iCurrentCurve = -1;\r
-    }\r
-    break;\r
+  case S_CURVE:
+    if (m_pol.readInteger (&n, POL::TT_REAL, FALSE, 0, 0) == TRUE) {
+      if (n > 0)
+        m_iCurrentCurve = n - 1;
+    } else {
+      if (m_pol.readWord ("all",3) == TRUE) 
+        m_iCurrentCurve = -1;
+    }
+    break;
   case S_XTICKS:
     if (m_pol.readUserToken(str,&lx) == FALSE)
       break;
@@ -382,21 +382,21 @@ EZPlot::do_cmd (int lx)
 }
 
 
-\r
+
 void 
 EZPlot::bad_option (char *opt)
 {
   sys_error (ERR_WARNING, "INVALID option: %s", opt);
 }
-\r
+
 
 //----------------------------------------------------------------------
 //                     KEYWORDS / CODES TABLE
 //----------------------------------------------------------------------
-const struct KeywordCodeTable EZPlot::m_sKeywords[] =\r
-{\r
+const struct KeywordCodeTable EZPlot::m_sKeywords[] =
+{
   {"solid",    S_SOLID},
-  {"dash", S_DASH},\r
+  {"dash", S_DASH},
   {"curve", S_CURVE},
   {"noline",   S_NOLINE},
   {"black",    S_BLACK},
@@ -473,7 +473,7 @@ const struct KeywordCodeTable EZPlot::m_sKeywords[] =
   
   {"textsize", S_TEXTSIZE},
 };
-\r
+
 const int EZPlot::NKEYS = (sizeof(EZPlot::m_sKeywords) / sizeof (struct KeywordCodeTable));
 
 void