X-Git-Url: http://git.kpe.io/?a=blobdiff_plain;f=libctgraphics%2Fezset.cpp;h=8cde00af76f99493f7c008c55a584207d56a43e7;hb=0219ede69e1c3afc6e160b8f276bfd4617acbc08;hp=efef8c162d9c8e98a8c7475ee24e35ed9d0f29db;hpb=88fd1492afba7c103e2bedbaac0d69fb9bf3cf66;p=ctsim.git diff --git a/libctgraphics/ezset.cpp b/libctgraphics/ezset.cpp index efef8c1..8cde00a 100644 --- a/libctgraphics/ezset.cpp +++ b/libctgraphics/ezset.cpp @@ -4,9 +4,7 @@ ** EZSET - Parameter control for EZPLOT ** ** This is part of the CTSim program -** Copyright (c) 1983-2001 Kevin Rosenberg -** -** $Id$ +** Copyright (c) 1983-2009 Kevin Rosenberg ** ** 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 @@ -219,25 +217,33 @@ EZPlot::do_cmd (int lx) o_grid = FALSE; break; case S_XLENGTH: - if (m_pol.readFloat (&f, POL::TT_REAL, FALSE, 0.0, 0.0) == TRUE) - if (f > 0.0 && f <= 1.0) + if (m_pol.readFloat (&f, POL::TT_REAL, FALSE, 0.0, 0.0) == TRUE) { + if (f > 0.0 && f <= 1.0) { o_xlength = f; - break; + } + } + break; case S_YLENGTH: - if (m_pol.readFloat (&f, POL::TT_REAL, FALSE, 0.0, 0.0) == TRUE) - if (f > 0.0 && f <= 1.0) + if (m_pol.readFloat (&f, POL::TT_REAL, FALSE, 0.0, 0.0) == TRUE) { + if (f > 0.0 && f <= 1.0) { o_ylength = f; - break; + } + } + break; case S_XPORIGIN: - if (m_pol.readFloat (&f, POL::TT_REAL, FALSE, 0.0, 0.0) == TRUE) - if (f >= 0.0 && f < 1.0) + if (m_pol.readFloat (&f, POL::TT_REAL, FALSE, 0.0, 0.0) == TRUE) { + if (f >= 0.0 && f < 1.0) { o_xporigin = f; - break; + } + } + break; case S_YPORIGIN: - if (m_pol.readFloat (&f, POL::TT_REAL, FALSE, 0.0, 0.0) == TRUE) - if (f >= 0.0 && f < 1.0) + if (m_pol.readFloat (&f, POL::TT_REAL, FALSE, 0.0, 0.0) == TRUE) { + if (f >= 0.0 && f < 1.0) { o_yporigin = f; - break; + } + } + break; case S_TAG: if (m_pol.readWord("no", 2) == TRUE) o_tag = FALSE; @@ -329,10 +335,12 @@ EZPlot::do_cmd (int lx) if (n > 1 && n < 100) o_xmajortick = n; } else if (lx == S_MINOR) - if (m_pol.readInteger (&n, POL::TT_REAL, FALSE, 0, 0) == TRUE) - if (n >= 0 && n < 100) + if (m_pol.readInteger (&n, POL::TT_REAL, FALSE, 0, 0) == TRUE) { + if (n >= 0 && n < 100) { o_xminortick = n; - break; + } + } + break; case S_YTICKS: if (m_pol.readUserToken(str,&lx) == FALSE) break; @@ -345,14 +353,18 @@ EZPlot::do_cmd (int lx) else if (lx == S_LABEL) o_ytlabel = TRUE; else if (lx == S_MAJOR) { - if (m_pol.readInteger (&n, POL::TT_REAL, FALSE, 0, 0) == TRUE) - if (n > 1 && n < 100) + if (m_pol.readInteger (&n, POL::TT_REAL, FALSE, 0, 0) == TRUE) { + if (n > 1 && n < 100) { o_ymajortick = n; - } else if (lx == S_MINOR) - if (m_pol.readInteger (&n, POL::TT_REAL, FALSE, 0, 0) == TRUE) - if (n >= 0 && n < 100) + } + } + } else if (lx == S_MINOR) + if (m_pol.readInteger (&n, POL::TT_REAL, FALSE, 0, 0) == TRUE) { + if (n >= 0 && n < 100) { o_yminortick = n; - break; + } + } + break; case S_LXFRAC: if (m_pol.readInteger (&n, POL::TT_REAL, FALSE, 0, 0) == TRUE) { if (n >= 0) {