X-Git-Url: http://git.kpe.io/?a=blobdiff_plain;ds=sidebyside;f=libctgraphics%2Fezset.cpp;h=1b8741d5e2c62f1d2a89949901ef4fc47bfa4d71;hb=2a3686d3bd1f690d318b81766c261da785cf9b57;hp=ed396aad6efd9f460712a166798482d9be6f6f69;hpb=739e435359d44546dd812fff8c86b815a214d587;p=ctsim.git diff --git a/libctgraphics/ezset.cpp b/libctgraphics/ezset.cpp index ed396aa..1b8741d 100644 --- a/libctgraphics/ezset.cpp +++ b/libctgraphics/ezset.cpp @@ -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[] = +{ + {"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)); + +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]"); }