/*$Id: globals.cc,v 26.138 2013/04/24 03:03:11 al Exp $ -*- C++ -*- * Copyright (C) 2001 Albert Davis * Author: Albert Davis * * This file is part of "Gnucap", the Gnu Circuit Analysis Package * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3, or (at your option) * any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA * 02110-1301, USA. *------------------------------------------------------------------ * static objects -- construct first, destruct last */ #include "globals.h" #include "u_prblst.h" #include "e_cardlist.h" #include "u_status.h" #include "patchlev.h" /*--------------------------------------------------------------------------*/ // here to make sure they get constructed and destructed in proper order // first construct, last destruct const char* lib_version() { return PATCHLEVEL; } // dispatchers must be constructed before any static objects they contain // and destructed after. RUN_MODE ENV::run_mode = rPRE_MAIN; DISPATCHER command_dispatcher; DISPATCHER bm_dispatcher; DISPATCHER model_dispatcher; DISPATCHER device_dispatcher; DISPATCHER language_dispatcher; DISPATCHER function_dispatcher; DISPATCHER measure_dispatcher; DISPATCHER status_dispatcher; DISPATCHER help_dispatcher; DISPATCHER probe_dispatcher; // for the rest, order should not matter, but it is convenient here CARD_LIST CARD_LIST::card_list; // root circuit // the rest of this should not be here, is residue of old stuff STATUS status; std::string head; /*--------------------------------------------------------------------------*/ /* sweep command. This will go away with a rewrite of looping */ const int swp_nest_max = 1; /* no loop, "future" expansion */ int swp_count[swp_nest_max]; /* sweep counter */ int swp_steps[swp_nest_max]; /* sweep number of steps */ int swp_type[swp_nest_max]; /* type of sweep (log or linear) */ int swp_nest; /* sweep nesting (recursion) level */ /*--------------------------------------------------------------------------*/ /*--------------------------------------------------------------------------*/