/*****************************************************************************
+** FILE IDENTIFICATION
+**
+** EZSET - Parameter control for EZPLOT
+**
** This is part of the CTSim program
** Copyright (C) 1983-2000 Kevin Rosenberg
**
-** $Id: ezset.cpp,v 1.1 2000/06/19 18:05:03 kevin Exp $
+** $Id: ezset.cpp,v 1.4 2000/07/13 07:03:21 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
** Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
******************************************************************************/
/*----------------------------------------------------------------------*/
-/* EZSET - Parameter control for EZPLOT */
/* */
/*----------------------------------------------------------------------*/
+#include "ctsupport.h"
#include "ezplot.h"
#include "pol.h"
-#include "cio.h"
static int ezcmd (char *comm);
static int do_cmd(int lx);
static int modeinteract = FALSE;
static int curveinteract = -1;
static int ezset_firstcall = TRUE;
-static int eztrace = TRUE;
int
ezset (char *command)
break;
case S_REPLOT:
ez.i_plotimmediate = TRUE;
- ezplot (NULL, NULL, 0);
+ ezplot (static_cast<double*>(NULL), static_cast<double*>(NULL), 0);
#if 0
if (modeinteract == TRUE)
WAITKEY();
ez.o_unknowncurves = FALSE;
ez.o_reqcurves = ez.i_numcurves;
ez.i_plotimmediate = TRUE;
- ezplot (NULL, NULL, 0);
+ ezplot (static_cast<double*>(NULL), static_cast<double*>(NULL), 0);
ez.i_plotimmediate = FALSE;
}
}
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,
+ {"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,
+ {"curves", S_CURVES},
+ {"curve", S_CURVES},
/* "unknown", S_UNKNOWN, */
/* "end", S_END, */
- "legend", S_LEGEND,
- "xlegend", S_XLEGEND,
- "ylegend", S_YLEGEND,
-
- "xlin", S_XLIN,
- "ylin", S_YLIN,
- "xlog", S_XLOG,
- "ylog", S_YLOG,
- "xlabel", S_XLABEL,
- "ylabel", S_YLABEL,
- "xlength", S_XLENGTH,
- "ylength", S_YLENGTH,
-
- "xticks", S_XTICKS,
- "yticks", S_YTICKS,
- "above", S_ABOVE,
- "label", S_LABEL,
- "below", S_BELOW,
- "nolabel", S_NOLABEL,
- "right", S_RIGHT,
- "left", S_LEFT,
-
- "xautoscale", S_XAUTOSCALE,
- "yautoscale", S_YAUTOSCALE,
- "xmin", S_XMIN,
- "ymin", S_YMIN,
- "xmax", S_XMAX,
- "ymax", S_YMAX,
- "lxfrac", S_LXFRAC,
- "lyfrac", S_LYFRAC,
- "xcross", S_XCROSS,
- "ycross", S_YCROSS,
- "noxaxis", S_NOXAXIS,
- "noyaxis", S_NOYAXIS,
- "xporigin", S_XPORIGIN,
- "yporigin", S_YPORIGIN,
- "title", S_TITLE,
- "xtitle", S_XTITLE,
- "ytitle", S_YTITLE,
-
- "replot", S_REPLOT,
- "clear", S_CLEAR,
- "store", S_STORE,
- "restore", S_RESTORE,
- "ustart", S_USTART,
- "ufinish", S_UFINISH,
- "amark", S_AMARK,
- "interactive", S_INTERACTIVE,
- "units", S_UNITS,
- "inches", S_INCHES,
- "user", S_USER,
-
- "data", S_DATA,
- "help", S_HELP,
- "exit", S_EXIT,
-
- "box", S_BOX,
- "nobox", S_NOBOX,
- "grid", S_GRID,
- "nogrid", S_NOGRID,
- "major", S_MAJOR,
- "minor", S_MINOR,
- "color", S_COLOR,
- "legendbox", S_LEGENDBOX,
-
- "epson", S_EPSON,
- "crt", S_CRT,
- "no", S_NO,
-
- "textsize", S_TEXTSIZE,
- "xbuf", S_XBUF,
- "ybuf", S_YBUF,
- "prtmode", S_PRTMODE,
+ {"legend", S_LEGEND},
+ {"xlegend", S_XLEGEND},
+ {"ylegend", S_YLEGEND},
+
+ {"xlin", S_XLIN},
+ {"ylin", S_YLIN},
+ {"xlog", S_XLOG},
+ {"ylog", S_YLOG},
+ {"xlabel", S_XLABEL},
+ {"ylabel", S_YLABEL},
+ {"xlength", S_XLENGTH},
+ {"ylength", S_YLENGTH},
+
+ {"xticks", S_XTICKS},
+ {"yticks", S_YTICKS},
+ {"above", S_ABOVE},
+ {"label", S_LABEL},
+ {"below", S_BELOW},
+ {"nolabel", S_NOLABEL},
+ {"right", S_RIGHT},
+ {"left", S_LEFT},
+
+ {"xautoscale", S_XAUTOSCALE},
+ {"yautoscale", S_YAUTOSCALE},
+ {"xmin", S_XMIN},
+ {"ymin", S_YMIN},
+ {"xmax", S_XMAX},
+ {"ymax", S_YMAX},
+ {"lxfrac", S_LXFRAC},
+ {"lyfrac", S_LYFRAC},
+ {"xcross", S_XCROSS},
+ {"ycross", S_YCROSS},
+ {"noxaxis", S_NOXAXIS},
+ {"noyaxis", S_NOYAXIS},
+ {"xporigin", S_XPORIGIN},
+ {"yporigin", S_YPORIGIN},
+ {"title", S_TITLE},
+ {"xtitle", S_XTITLE},
+ {"ytitle", S_YTITLE},
+
+ {"replot", S_REPLOT},
+ {"clear", S_CLEAR},
+ {"store", S_STORE},
+ {"restore", S_RESTORE},
+ {"ustart", S_USTART},
+ {"ufinish", S_UFINISH},
+ {"amark", S_AMARK},
+ {"interactive", S_INTERACTIVE},
+ {"units", S_UNITS},
+ {"inches", S_INCHES},
+ {"user", S_USER},
+
+ {"data", S_DATA},
+ {"help", S_HELP},
+ {"exit", S_EXIT},
+
+ {"box", S_BOX},
+ {"nobox", S_NOBOX},
+ {"grid", S_GRID},
+ {"nogrid", S_NOGRID},
+ {"major", S_MAJOR},
+ {"minor", S_MINOR},
+ {"color", S_COLOR},
+ {"legendbox", S_LEGENDBOX},
+
+ {"epson", S_EPSON},
+ {"crt", S_CRT},
+ {"no", S_NO},
+
+ {"textsize", S_TEXTSIZE},
+ {"xbuf", S_XBUF},
+ {"ybuf", S_YBUF},
+ // {"prtmode", S_PRTMOD},
};
-#define NKEYS (sizeof(keytab) / sizeof(struct key))
+static const unsigned int NKEYS=(sizeof(keytab) / sizeof(struct key));
static void initkw(void)
{
- int i;
-
- for (i = 0; i < NKEYS; i++)
- if (pol_install(keytab[i].keyword, keytab[i].code) == FALSE)
- sys_error(ERR_SEVERE, "error installing ezset keywords [initkw]");
+ for (unsigned int i = 0; i < NKEYS; i++)
+ if (pol_install(keytab[i].keyword, keytab[i].code) == FALSE)
+ sys_error(ERR_SEVERE, "error installing ezset keywords [initkw]");
}