r312: *** empty log message ***
[ctsim.git] / libctgraphics / ezset.cpp
index ed396aad6efd9f460712a166798482d9be6f6f69..1b8741d5e2c62f1d2a89949901ef4fc47bfa4d71 100644 (file)
@@ -6,7 +6,7 @@
 **  This is part of the CTSim program
 **  Copyright (C) 1983-2000 Kevin Rosenberg
 **
-**  $Id: ezset.cpp,v 1.10 2000/12/20 14:39:09 kevin Exp $
+**  $Id: ezset.cpp,v 1.11 2000/12/23 18:12:35 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
@@ -386,15 +386,13 @@ EZPlot::bad_option (char *opt)
        sys_error (ERR_WARNING, "INVALID option: %s", opt);
 }
 
-/*----------------------------------------------------------------------*/
-/*                     LEXIGRAPHICAL CODES                             */
-/*----------------------------------------------------------------------*/
 
-static struct key {
-       char *keyword;
-       int code;
-} keytab[] = {
-    {"solid",  S_SOLID},
+//----------------------------------------------------------------------
+//                     KEYWORDS / CODES TABLE
+//----------------------------------------------------------------------
+const struct KeywordCodeTable EZPlot::m_sKeywords[] =\r
+{\r
+  {"solid",    S_SOLID},
        {"dash", S_DASH},
        {"noline",      S_NOLINE},
        {"black",       S_BLACK},
@@ -471,13 +469,13 @@ static struct key {
        
        {"textsize",    S_TEXTSIZE},
 };
-
-static const unsigned int NKEYS=(sizeof(keytab) / sizeof(struct key));
+\r
+const int EZPlot::NKEYS = (sizeof(EZPlot::m_sKeywords) / sizeof (struct KeywordCodeTable));
 
 void 
 EZPlot::initkw(void)
 {
        for (unsigned int i = 0; i < NKEYS; i++)
-               if (! pol_install(keytab[i].keyword, keytab[i].code))
-                       sys_error(ERR_SEVERE, "error installing ezset keywords [initkw]");
+               if (! pol_install (m_sKeywords[i].keyword, m_sKeywords [i].code))
+                       sys_error(ERR_SEVERE, "error installing ezset keywords [EZPlot::initkw]");
 }