r246: More modifications for MSVC
[ctsim.git] / libctgraphics / ezset.cpp
index c28c76180ac131390c8da4c2b9e875671e772d28..e4f6abfee43a4fd7586cffd5f086501ce4301c78 100644 (file)
@@ -6,7 +6,7 @@
  **  This is part of the CTSim program
  **  Copyright (C) 1983-2000 Kevin Rosenberg
  **
- **  $Id: ezset.cpp,v 1.6 2000/07/28 10:51:31 kevin Exp $
+ **  $Id: ezset.cpp,v 1.8 2000/12/06 01:46:43 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
@@ -62,7 +62,7 @@ EZPlot::ezcmd (char *comm)
   int code;
   bool retval = true;
   if (! pol_usertok (str, &code)) {
-    cerr << "Illegal EZSET command: " << str << endl;
+       sys_error(ERR_WARNING, "Illegal EZSET command: %s", str);
     pol_reader();
     retval = false;
   }
@@ -284,38 +284,12 @@ EZPlot::do_cmd (int lx)
          s_ylegend = FALSE;
       }
     break;
-  case S_CURVES:
-    if (pol_integer (&n, TT_REAL, FALSE, 0, 0) == TRUE) {
-      if (n < 1)
-       n = 1;
-      //      if (modeinteract == TRUE) {
-      //       curveinteract = n - 1;
-      //       if (o_unknowncurves == FALSE && o_reqcurves < n)
-      //         o_reqcurves = n;
-      //      } else {
-      // clearCurve ();
-      // o_reqcurves = n;
-      // }
-    } else {
-      //      if (pol_word ("unknown", 7) == TRUE)
-       //      o_unknowncurves = TRUE;
-      //      else if (pol_word ("end", 3) == TRUE) {
-       //      o_unknowncurves = FALSE;
-       //      o_reqcurves = i_numcurves;
-       //      i_plotimmediate = TRUE;
-       //      ezplot (static_cast<double*>(NULL), static_cast<double*>(NULL), 0);
-       //      i_plotimmediate = FALSE;
-      // }
-    }
-    break;
   case S_SYMBOL:
     if (pol_integer (&n, TT_REAL, FALSE, 0, 0) == TRUE) {
       if (n > 0 && n <= MAXSYMBOL)
        o_symbol = n;
       else
        o_symbol = 1;
-      //      if (modeinteract == TRUE && curveinteract >= 0)
-      //       curve[curveinteract].symbol = o_symbol;
     } else {
       if (pol_word("every",5) == TRUE) {
        if (pol_integer (&n, TT_REAL, FALSE, 0, 0) == TRUE) {
@@ -323,13 +297,9 @@ EZPlot::do_cmd (int lx)
            o_symfreq = n;
          else
            o_symfreq = 1;
-         //      if (modeinteract == TRUE && curveinteract >= 0)
-         //        curve[curveinteract].symfreq = o_symfreq;
        }
       } else if (pol_word ("none",4) == TRUE) {
        o_symbol = -1;
-       //      if (modeinteract == TRUE && curveinteract >= 0)
-       //        curve[curveinteract].symbol = o_symbol;
       }
     }
     break;
@@ -406,7 +376,7 @@ EZPlot::do_cmd (int lx)
 void 
 EZPlot::bad_option (char *opt)
 {
-  cerr << opt << " is an INVALID option\n";
+  sys_error (ERR_WARNING, "INVALID option: %s", opt);
 }
 
 /*----------------------------------------------------------------------*/
@@ -417,23 +387,17 @@ static struct key {
   char *keyword;
   int code;
 } keytab[] = {
-  {"solid",    S_SOLID},
-    {"dash",           S_DASH},
-      {"noline",       S_NOLINE},
-       {"black",       S_BLACK},
-         {"red",               S_RED},
-           {"blue",            S_BLUE},
-             {"green", S_GREEN},
-               {"pen",         S_PEN},
-                 {"symbol",    S_SYMBOL},
-                   /*  "every",        S_EVERY,        */
-                   /*  "none",         S_NONE,         */
-
-                   {"curves",  S_CURVES},
-                     {"curve", S_CURVES},
-                       /*      "unknown",      S_UNKNOWN,      */
-                       /*      "end",          S_END,          */
-
+    {"solid",  S_SOLID},
+       {"dash", S_DASH},
+           {"noline",  S_NOLINE},
+               {"black",       S_BLACK},
+                   {"red",             S_RED},
+                       {"blue",                S_BLUE},
+                           {"green",   S_GREEN},
+                               {"pen",         S_PEN},
+                                   {"symbol",  S_SYMBOL},
+                                       {"every",       S_EVERY},    
+                                           {"none",            S_NONE},  
                        {"legend",      S_LEGEND},
                          {"xlegend",   S_XLEGEND},
                            {"ylegend", S_YLEGEND},
@@ -479,7 +443,6 @@ static struct key {
                                                                                                    {"store",   S_STORE},
                                                                                                      {"restore",       S_RESTORE},
                                                                                                            {"amark",   S_AMARK},
-                                                                                                             {"interactive",   S_INTERACTIVE},
                                                                                                                {"units",       S_UNITS},
                                                                                                                  {"inches",    S_INCHES},
                                                                                                                    {"user",            S_USER},
@@ -508,6 +471,6 @@ void
 EZPlot::initkw(void)
 {
   for (unsigned int i = 0; i < NKEYS; i++)
-    if (pol_install(keytab[i].keyword, keytab[i].code) == FALSE)
+    if (! pol_install(keytab[i].keyword, keytab[i].code))
       sys_error(ERR_SEVERE, "error installing ezset keywords [initkw]");
 }