HAS_WINDOWS --> HAS_WINGUI

allow compilation on MS Windows without GUI
This commit is contained in:
h_vogt 2013-03-23 09:54:44 +01:00 committed by rlar
parent 09273deb95
commit d7e291c53a
40 changed files with 89 additions and 89 deletions

View File

@ -467,7 +467,7 @@ AC_MSG_CHECKING([whether windows code is enabled])
AC_ARG_WITH([windows],
[AS_HELP_STRING([--with-windows], [MS WINDOWS executable])],
[if test "x$with_windows" = xyes; then
AC_DEFINE([HAS_WINDOWS], [1], [define to specify MS Windows executable])
AC_DEFINE([HAS_WINGUI], [1], [define to specify MS Windows executable])
fi],
[with_windows=no])
AC_MSG_RESULT([$with_windows])

View File

@ -73,7 +73,7 @@ com_ghelp(wordlist *wl)
hlp_main(path, wl);
return;
#endif /* X_DISPLAY_MISSING 1 */
#ifdef HAS_WINDOWS
#ifdef HAS_WINGUI
printf("Internal help is no longer avaialable!\n");
printf("Please check for the actual ngspice manual at\n");
printf("http://ngspice.sourceforge.net/docs/ngspice-manual.pdf\n");

View File

@ -59,7 +59,7 @@ com_hardcopy(wordlist *wl)
// PushGraphContext(currentgraph);
#ifdef HAS_WINDOWS
#ifdef HAS_WINGUI
if (!wl && hc_button) {
char *psfname;
GRAPH *tempgraph;

View File

@ -13,7 +13,7 @@
#include "com_commands.h"
/* We might compile for Windows, but only as a console application (e.g. tcl) */
#if defined(HAS_WINDOWS) || defined(__MINGW32__) || defined(_MSC_VER)
#if defined(HAS_WINGUI) || defined(__MINGW32__) || defined(_MSC_VER)
#define HAVE_WIN32
#endif

View File

@ -268,7 +268,7 @@ ft_cpinit(void)
found = TRUE;
break;
#if defined(HAS_WINDOWS) || defined(__MINGW32__) || defined(_MSC_VER)
#if defined(HAS_WINGUI) || defined(__MINGW32__) || defined(_MSC_VER)
/* search in local directory where ngspice.exe resides */
#if defined TCL_MODULE
} else if ((fp = fopen("./tclspinit", "r")) != NULL) {

View File

@ -28,7 +28,7 @@ static int nodev(void);
#include "plotting/x11.h"
#endif
#ifdef HAS_WINDOWS /* Graphic-IO under MS Windows */
#ifdef HAS_WINGUI /* Graphic-IO under MS Windows */
#include "wdisp/windisp.h"
//#include "wdisp/winprint.h"
#endif
@ -60,7 +60,7 @@ DISPDEVICE device[] = {
gen_DatatoScreen,},
#endif
#ifdef HAS_WINDOWS /* Graphic-IO under MS Windows */
#ifdef HAS_WINGUI /* Graphic-IO under MS Windows */
{ "Windows", 0, 0, 1000, 1000, 0, 0,
WIN_Init, WIN_NewViewport,
WIN_Close, WIN_Clear,
@ -174,7 +174,7 @@ DevInit(void)
#endif
#ifdef HAS_WINDOWS
#ifdef HAS_WINGUI
if (!dispdev)
dispdev = FindDev("Windows");
#endif
@ -187,7 +187,7 @@ DevInit(void)
if (!dispdev) {
#if !defined(HAS_WINDOWS) && !defined(TCL_MODULE) && (defined(_MSC_VER) || defined(__MINGW32__))
#if !defined(HAS_WINGUI) && !defined(TCL_MODULE) && (defined(_MSC_VER) || defined(__MINGW32__))
/* console application under MS Windows */
fprintf
(cp_err,

View File

@ -17,7 +17,7 @@ Author: 1985 Wayne A. Christopher, U. C. Berkeley CAD Group
char ErrorMessage[1024];
#ifdef HAS_WINDOWS
#ifdef HAS_WINGUI
void winmessage(char *new_msg);
#endif
@ -25,7 +25,7 @@ void winmessage(char *new_msg);
void
controlled_exit(int status)
{
#ifdef HAS_WINDOWS
#ifdef HAS_WINGUI
if (status)
winmessage("Fatal error in NGSPICE");
#else

View File

@ -54,7 +54,7 @@ static void cktislinear(CKTcircuit *ckt, struct line *deck);
void line_free_x(struct line *deck, bool recurse);
#ifdef HAS_WINDOWS
#ifdef HAS_WINGUI
void SetAnalyse(char *Analyse, int Percent);
#endif
@ -497,7 +497,7 @@ inp_spsource(FILE *fp, bool comfile, char *filename, bool intfile)
Go on if there is something left after the controls.*/
if (deck->li_next) {
fprintf(cp_out, "\nCircuit: %s\n\n", tt);
#ifdef HAS_WINDOWS
#ifdef HAS_WINGUI
SetAnalyse("Prepare Deck", 0);
#endif
/* Now expand subcircuit macros and substitute numparams.*/

View File

@ -897,7 +897,7 @@ inp_pathopen(char *name, char *mode)
char buf[BSIZE_SP];
struct variable *v;
#if defined(HAS_WINDOWS)
#if defined(HAS_WINGUI)
char buf2[BSIZE_SP];
/* search in the path where the source (input) file has been found,
but only if "name" is just a file name */

View File

@ -26,7 +26,7 @@ static wordlist *measure_parse_line(char *line);
extern bool ft_batchmode;
extern bool rflag;
#ifdef HAS_WINDOWS /* hvogt 10.03.99, nach W. Mues */
#ifdef HAS_WINGUI /* hvogt 10.03.99, nach W. Mues */
extern void SetAnalyse(char *Analyse, int Percent);
#endif
@ -225,7 +225,7 @@ do_measure(
wordlist *measure_word_list;
int precision = measure_get_precision();
#ifdef HAS_WINDOWS
#ifdef HAS_WINGUI
if (!chk_only)
SetAnalyse("meas", 0);
#endif

View File

@ -219,7 +219,7 @@ com_version(wordlist *wl)
#ifdef USE_OMP
fprintf(cp_out, "** OpenMP multithreading for BSIM3, BSIM4 enabled\n");
#endif
#if defined(X_DISPLAY_MISSING) && !defined(HAS_WINDOWS)
#if defined(X_DISPLAY_MISSING) && !defined(HAS_WINGUI)
fprintf(cp_out, "** X11 interface not compiled into ngspice\n");
#endif
#ifdef NOBYPASS

View File

@ -13,7 +13,7 @@
#include <stdarg.h>
#include "ngspice/config.h"
#ifdef HAS_WINDOWS
#ifdef HAS_WINGUI
#include "ngspice/wstdio.h"
#endif

View File

@ -458,7 +458,7 @@ OUTpData(runDesc *plotPtr, IFvalue *refValue, IFvalue *valuePtr)
/* While we're looking at the reference value, print it to the screen
every quarter of a second, to give some feedback without using
too much CPU time */
#ifndef HAS_WINDOWS
#ifndef HAS_WINGUI
currclock = clock();
if ((currclock-lastclock) > (0.25*CLOCKS_PER_SEC)) {
fprintf(stderr, " Reference value : % 12.5e\r",
@ -471,7 +471,7 @@ OUTpData(runDesc *plotPtr, IFvalue *refValue, IFvalue *valuePtr)
/* And the same for a non-complex value */
fileAddRealValue(run->fp, run->binary, refValue->rValue);
#ifndef HAS_WINDOWS
#ifndef HAS_WINGUI
currclock = clock();
if ((currclock-lastclock) > (0.25*CLOCKS_PER_SEC)) {
fprintf(stderr, " Reference value : % 12.5e\r",
@ -552,7 +552,7 @@ OUTpData(runDesc *plotPtr, IFvalue *refValue, IFvalue *valuePtr)
/* This is interactive mode. Update the screen with the reference
variable just the same */
#ifndef HAS_WINDOWS
#ifndef HAS_WINGUI
currclock = clock();
if ((currclock-lastclock) > (0.25*CLOCKS_PER_SEC)) {
if (run->isComplex) {

View File

@ -17,7 +17,7 @@ Author: 1988 Jeffrey M. Hsu
#ifdef _MSC_VER
#include "BaseTsd.h" /* for SSIZE_T */
#define ssize_t SSIZE_T
#ifndef HAS_WINDOWS
#ifndef HAS_WINGUI
#define read _read /* only for console */
#endif
#endif
@ -31,7 +31,7 @@ Author: 1988 Jeffrey M. Hsu
int
inchar(FILE *fp)
{
#ifndef HAS_WINDOWS
#ifndef HAS_WINGUI
char c;
ssize_t i;

View File

@ -906,7 +906,7 @@ static void
DelPlotWindows(struct plot *pl)
{
/* do this only if windows or X11 is defined */
#if defined(HAS_WINDOWS) || !defined(X_DISPLAY_MISSING)
#if defined(HAS_WINGUI) || !defined(X_DISPLAY_MISSING)
GRAPH *dgraph;
int n;
/* find and remove all graph structures derived from a given plot */

View File

@ -25,7 +25,7 @@ int raw_prec = -1; /* How many sigfigs to use, default 15 (max). */
#define DEFPREC 15
#ifdef HAS_WINDOWS
#ifdef HAS_WINGUI
#undef fscanf /* redo I/O from WINMAIN.C here
otherwise reading ASCII will not work */
#endif

View File

@ -33,7 +33,7 @@ Author: 1985 Wayne A. Christopher, U. C. Berkeley CAD Group
#endif
/* We might compile for Windows, but only as a console application (e.g. tcl) */
#if defined(HAS_WINDOWS) || defined(__MINGW32__) || defined(_MSC_VER)
#if defined(HAS_WINGUI) || defined(__MINGW32__) || defined(_MSC_VER)
#define HAVE_WIN32
#endif
@ -176,7 +176,7 @@ ft_ckspace(void)
return;
old_usage = usage;
#endif /* not HAS_WINDOWS */
#endif /* not HAS_WINGUI */
if ((double)usage > (double)limit * 0.9) {
fprintf(cp_err, "Warning - approaching max data size: ");
@ -362,7 +362,7 @@ printres(char *name)
fprintmem(cp_out, all_memory.dt * 1024);
fprintf(cp_out, ".\n"); */
#endif /* HAVE__PROC_MEMINFO */
#else /* HAS_WINDOWS or HAVE__PROC_MEMINFO */
#else /* HAS_WINGUI or HAVE__PROC_MEMINFO */
fprintf(cp_out, "Current dynamic memory usage = ");
fprintmem(cp_out, usage);
fprintf(cp_out, ",\n");
@ -495,7 +495,7 @@ fprintmem(FILE *stream, unsigned long long memory) {
static int get_procm(struct proc_mem *memall) {
#if defined(_MSC_VER) || defined(__MINGW32__)
#if (_WIN32_WINNT >= 0x0500) && defined(HAS_WINDOWS)
#if (_WIN32_WINNT >= 0x0500) && defined(HAS_WINGUI)
/* Use Windows API function to obtain size of memory - more accurate */
HANDLE hProcess;
PROCESS_MEMORY_COUNTERS pmc;
@ -525,7 +525,7 @@ static int get_procm(struct proc_mem *memall) {
memall->size = 0; /* sure, it is more */
memall->resident = 0;
memall->trs = 0;
#endif /* _WIN32_WINNT 0x0500 && HAS_WINDOWS */
#endif /* _WIN32_WINNT 0x0500 && HAS_WINGUI */
#else
/* Use Linux/UNIX /proc/<pid>/statm file information */
FILE *fp;

View File

@ -18,7 +18,7 @@ Author: 1985 Wayne A. Christopher, U. C. Berkeley CAD Group
#include "signal_handler.h"
#include "plotting/graf.h"
#ifdef HAS_WINDOWS
#ifdef HAS_WINGUI
void winmessage(char* new_msg);
#endif
@ -144,7 +144,7 @@ RETSIGTYPE
sigsegv(void)
{
fprintf(cp_err, "\ninternal error -- segmentation violation\n");
#ifdef HAS_WINDOWS
#ifdef HAS_WINGUI
winmessage("Fatal error in NGSPICE");
#endif
fatal();

View File

@ -264,7 +264,7 @@ com_spec(wordlist *wl)
fdvec[i][j].cx_imag += value*sina;
}
}
#ifdef HAS_WINDOWS
#ifdef HAS_WINGUI
SetAnalyse("spec", (int)(j * 1000./ fpts));
#endif
}

View File

@ -6,7 +6,7 @@
#ifndef ngspice_SPEC_H
#define ngspice_SPEC_H
#ifdef HAS_WINDOWS
#ifdef HAS_WINGUI
extern void SetAnalyse(char *Analyse, int Percent);
#endif

View File

@ -7,7 +7,7 @@
#include "ngspice/ngspice.h"
#ifdef HAS_WINDOWS
#ifdef HAS_WINGUI
#include "ngspice/graph.h"
#include "ngspice/ftedev.h"
@ -942,4 +942,4 @@ static void WIN_ScreentoData(GRAPH *graph, int x, int y, double *fx, double *fy)
}
#endif /* HAS_WINDOWS */
#endif /* HAS_WINGUI */

View File

@ -6,7 +6,7 @@
#include "ngspice/ngspice.h"
#ifdef HAS_WINDOWS
#ifdef HAS_WINGUI
#include "ngspice/graph.h"
#include "ngspice/ftedev.h"
@ -473,5 +473,5 @@ int WPRINT_DiagramReady(void)
return 0;
}
#endif /* HAS_WINDOWS */
#endif /* HAS_WINGUI */

View File

@ -137,7 +137,7 @@
#include <time.h>
#endif
#ifdef HAS_WINDOWS
#ifdef HAS_WINGUI
#include "ngspice/wstdio.h"
#endif

View File

@ -44,7 +44,7 @@
#include "misc/ivars.h"
#include "misc/misc_time.h"
#if defined(HAS_WINDOWS) || defined(_MSC_VER) || defined(__MINGW32__)
#if defined(HAS_WINGUI) || defined(_MSC_VER) || defined(__MINGW32__)
# include "misc/mktemp.h"
#endif
@ -95,7 +95,7 @@ bool ft_intrpt = FALSE; /* Set by the (void) signal handlers. TRUE = we've b
bool ft_setflag = FALSE; /* TRUE = Don't abort simulation after an interrupt. */
char *ft_rawfile = "rawspice.raw";
#ifdef HAS_WINDOWS
#ifdef HAS_WINGUI
extern void winmessage(char *new_msg); /* display a message box (defined in winmain.c)*/
extern void SetSource( char *Name); /* display the source file name in the source window */
extern int xmain(int argc, char **argv);
@ -490,7 +490,7 @@ static void
sp_shutdown(int exitval)
{
destroy_ivars();
#ifdef HAS_WINDOWS
#ifdef HAS_WINGUI
if (exitval == EXIT_BAD)
winmessage("Fatal error in SPICE");
else if (exitval == EXIT_INFO)
@ -784,7 +784,7 @@ print_news(void)
}
#ifdef HAS_WINDOWS
#ifdef HAS_WINGUI
#define main xmain
#endif
@ -837,7 +837,7 @@ main(int argc, char **argv)
circuit_file = stdin;
#if defined(HAVE_ISATTY) && !defined(HAS_WINDOWS)
#if defined(HAVE_ISATTY) && !defined(HAS_WINGUI)
istty = (bool) isatty(fileno(stdin));
#endif
@ -989,7 +989,7 @@ main(int argc, char **argv)
fprintf(stdout, "Comments and warnings go to log-file: %s\n\n", log_file);
/* Open the log file */
#ifdef HAS_WINDOWS
#ifdef HAS_WINGUI
/* flogp used by winmain's putc which writes to file 'log_file' */
flogp = fopen(log_file, "w");
if (!flogp) {
@ -1055,7 +1055,7 @@ main(int argc, char **argv)
#ifdef SIGBUS
signal(SIGBUS, (SIGNAL_FUNCTION) sigbus);
#endif
#if defined(SIGSEGV) && !defined(NGDEBUG) && defined(HAS_WINDOWS)
#if defined(SIGSEGV) && !defined(NGDEBUG) && defined(HAS_WINGUI)
/* Allow a comment and graceful shutdown after seg fault */
signal(SIGSEGV, (SIGNAL_FUNCTION) sigsegv);
#endif
@ -1152,7 +1152,7 @@ main(int argc, char **argv)
FILE *tempfile = tmpfile();
#if defined(HAS_WINDOWS) || defined(_MSC_VER) || defined(__MINGW32__)
#if defined(HAS_WINGUI) || defined(_MSC_VER) || defined(__MINGW32__)
char *dname = NULL; /* input file*/
char *tpf = NULL; /* temporary file */
@ -1201,12 +1201,12 @@ main(int argc, char **argv)
}
}
#if defined(HAS_WINDOWS) || defined(_MSC_VER) || defined(__MINGW32__)
#if defined(HAS_WINGUI) || defined(_MSC_VER) || defined(__MINGW32__)
/* Copy the input file name which otherwise will be lost due to the
temporary file */
dname = copy(arg);
#endif
#if defined(HAS_WINDOWS)
#if defined(HAS_WINGUI)
/* write source file name into source window */
SetSource(dname);
/* write source file name into a variable */
@ -1220,7 +1220,7 @@ main(int argc, char **argv)
fseek(tempfile, 0L, SEEK_SET);
if (tempfile && (!err || !ft_batchmode)) {
#if defined(HAS_WINDOWS) || defined(_MSC_VER) || defined(__MINGW32__)
#if defined(HAS_WINGUI) || defined(_MSC_VER) || defined(__MINGW32__)
/* Copy the input file name for adding another file search path */
inp_spsource(tempfile, FALSE, dname, FALSE);
tfree(dname);

View File

@ -24,7 +24,7 @@ Author: 1985 Wayne A. Christopher, U. C. Berkeley CAD Group
#include "cmath.h"
#include "cmath1.h"
#ifdef HAS_WINDOWS
#ifdef HAS_WINGUI
#define fp_r_i_n_t_f fprintf
#endif

View File

@ -56,7 +56,7 @@
int Printer_Width = PRINTER_WIDTH;
#include "ngspice/config.h"
#ifdef HAS_WINDOWS
#ifdef HAS_WINGUI
#include "ngspice/wstdio.h"
#endif

View File

@ -9,7 +9,7 @@ Copyright 1990 Regents of the University of California. All rights reserved.
/* We need this because some tests in cmaths and some executables other
than ngspice and ngnutmeg under LINUX don't know about controlled_exit */
#ifdef HAS_WINDOWS
#ifdef HAS_WINGUI
extern void controlled_exit(int status);
#endif
@ -48,7 +48,7 @@ tmalloc(size_t num)
#endif
if (!s){
fprintf(stderr,"malloc: Internal Error: can't allocate %ld bytes. \n",(long)num);
#ifdef HAS_WINDOWS
#ifdef HAS_WINGUI
controlled_exit(EXIT_FAILURE);
#else
exit(EXIT_FAILURE);
@ -88,7 +88,7 @@ trealloc(void *ptr, size_t num)
}
if (!s) {
fprintf(stderr,"realloc: Internal Error: can't allocate %ld bytes.\n", (long)num);
#ifdef HAS_WINDOWS
#ifdef HAS_WINGUI
controlled_exit(EXIT_FAILURE);
#else
exit(EXIT_FAILURE);

View File

@ -79,7 +79,7 @@ ivars(char *argv0)
mkvar(&Spice_Path, Spice_Exec_Dir, "ngspice", "SPICE_PATH");
/* may be used to store input files (*.lib, *.include, ...) */
/* get directory where ngspice resides */
#if defined (HAS_WINDOWS) || defined (__MINGW32__) || defined (_MSC_VER)
#if defined (HAS_WINGUI) || defined (__MINGW32__) || defined (_MSC_VER)
{
char *ngpath = ngdirname(argv0);
/* set path either to <ngspice-bin-directory>/input or,

View File

@ -188,7 +188,7 @@ basename(const char *name)
*/
#if defined(HAS_WINDOWS) || defined(_MSC_VER) || defined(__MINGW32__)
#if defined(HAS_WINGUI) || defined(_MSC_VER) || defined(__MINGW32__)
char *
ngdirname(const char *name)

View File

@ -28,16 +28,16 @@ char *hlp_filelist[] = { "ngspice", 0 };
extern void ivars(char*);
#ifdef HAS_WINDOWS
#ifdef HAS_WINGUI
FILE *flogp; /* hvogt 15.12.2001 */
#endif /* HAS_WINDOWS */
#endif /* HAS_WINGUI */
int
#ifdef HAS_WINDOWS
#ifdef HAS_WINGUI
xmain(int ac, char **av)
#else
main(int ac, char **av)
#endif /* HAS_WINDOWS */
#endif /* HAS_WINGUI */
{
wordlist *wl = NULL;
@ -83,11 +83,11 @@ out:
}
#endif /* X_DISPLAY_MISSING */
#ifdef HAS_WINDOWS
#ifdef HAS_WINGUI
/* Keep window open untill a key is pressed */
printf("Press a key to quit\n");
while( getchar() == EOF) {}
#endif /* HAS_WINDOWS */
#endif /* HAS_WINGUI */
return EXIT_NORMAL;
}

View File

@ -18,7 +18,7 @@ Modified 2001: AlansFixes
/* gtri - end - wbk */
#endif
#ifdef HAS_WINDOWS
#ifdef HAS_WINGUI
void SetAnalyse( char * Analyse, int Percent);
#endif
@ -345,7 +345,7 @@ ACan(CKTcircuit *ckt, int restart)
case OCTAVE:
/* inserted again 14.12.2001 */
#ifdef HAS_WINDOWS
#ifdef HAS_WINGUI
{
double endfreq = job->ACstopFreq;
double startfreq = job->ACstartFreq;
@ -364,7 +364,7 @@ ACan(CKTcircuit *ckt, int restart)
break;
case LINEAR:
#ifdef HAS_WINDOWS
#ifdef HAS_WINGUI
{
double endfreq = job->ACstopFreq;
double startfreq = job->ACstartFreq;

View File

@ -16,7 +16,7 @@ static int spice3_gmin (CKTcircuit *, long int, long int, int);
static int gillespie_src (CKTcircuit *, long int, long int, int);
static int spice3_src (CKTcircuit *, long int, long int, int);
#ifdef HAS_WINDOWS
#ifdef HAS_WINGUI
void SetAnalyse( char * Analyse, int Percent);
#endif
@ -25,7 +25,7 @@ CKTop (CKTcircuit * ckt, long int firstmode, long int continuemode,
int iterlim)
{
int converged;
#ifdef HAS_WINDOWS
#ifdef HAS_WINGUI
SetAnalyse("op", 0);
#endif
ckt->CKTmode = firstmode;

View File

@ -26,7 +26,7 @@ int nthreads;
return(E_NOMEM);\
}
#ifdef HAS_WINDOWS
#ifdef HAS_WINGUI
extern void SetAnalyse( char * Analyse, int Percent);
#endif
@ -72,7 +72,7 @@ CKTsetup(CKTcircuit *ckt)
#endif
for (i=0;i<DEVmaxnum;i++) {
#ifdef HAS_WINDOWS
#ifdef HAS_WINGUI
SetAnalyse( "Device Setup", 0 );
#endif
if ( DEVices[i] && DEVices[i]->DEVsetup && ckt->CKThead[i] ) {

View File

@ -27,7 +27,7 @@
#include "ngspice/cluster.h"
#endif
#ifdef HAS_WINDOWS /* hvogt 10.03.99, nach W. Mues */
#ifdef HAS_WINGUI /* hvogt 10.03.99, nach W. Mues */
void SetAnalyse(char * Analyse, int Percent);
#endif
@ -1151,7 +1151,7 @@ resume:
}
}
#endif
#ifdef HAS_WINDOWS
#ifdef HAS_WINGUI
if (ckt->CKTtime == 0.)
SetAnalyse( "tran init", 0);
else if ((pss_state != PSS) && (shooting_cycle_counter > 0))

View File

@ -34,7 +34,7 @@ extern struct dbcomm *dbs;
#include "ngspice/cluster.h"
#endif
#ifdef HAS_WINDOWS /* hvogt 10.03.99, nach W. Mues */
#ifdef HAS_WINGUI /* hvogt 10.03.99, nach W. Mues */
void SetAnalyse(char * Analyse, int Percent);
#endif
@ -508,7 +508,7 @@ resume:
}
}
#endif
#ifdef HAS_WINDOWS
#ifdef HAS_WINGUI
if (ckt->CKTtime == 0.)
SetAnalyse( "tran init", 0);
else

View File

@ -24,7 +24,7 @@ Modified: 1999 Paolo Nenzi
#include "ngspice/devdefs.h"
#ifdef HAS_WINDOWS
#ifdef HAS_WINGUI
void SetAnalyse( char * Analyse, int Percent);
static double actval, actdiff;
#endif
@ -167,7 +167,7 @@ DCtrCurv(CKTcircuit *ckt, int restart)
found:;
}
#ifdef HAS_WINDOWS
#ifdef HAS_WINGUI
actval = job->TRCVvStart[job->TRCVnestLevel];
actdiff = job->TRCVvStart[job->TRCVnestLevel] - job->TRCVvStop[job->TRCVnestLevel];
#endif
@ -519,7 +519,7 @@ nextstep:;
job->TRCVnestState = i;
return(E_PAUSE);
}
#ifdef HAS_WINDOWS
#ifdef HAS_WINGUI
if (i == job->TRCVnestLevel) {
actval += job->TRCVvStep[job->TRCVnestLevel];
SetAnalyse( "dc", abs((int)(actval * 1000. / actdiff)));

View File

@ -40,13 +40,13 @@
#ifdef XSPICE
/*saj headers for xspice*/
#include <string.h> /* for strcpy, strcat*/
#if (!defined HAS_WINDOWS) && (!defined __MINGW32__) && (!defined _MSC_VER)
#if (!defined HAS_WINGUI) && (!defined __MINGW32__) && (!defined _MSC_VER)
#include <dlfcn.h> /* to load libraries*/
typedef void * funptr_t;
#else /* ifdef HAS_WINDOWS */
#else /* ifdef HAS_WINGUI */
#undef BOOLEAN
#include <windows.h>
#ifdef HAS_WINDOWS
#ifdef HAS_WINGUI
#include "ngspice/wstdio.h"
#endif
typedef FARPROC funptr_t;
@ -58,7 +58,7 @@ char *dlerror (void);
#define RTLD_NOW 2 /* immediate function call binding */
#define RTLD_GLOBAL 4 /* symbols in this dlopen'ed obj are visible to other dlopen'ed objs */
static char errstr[128];
#endif /* ifndef HAS_WINDOWS */
#endif /* ifndef HAS_WINGUI */
#include "ngspice/dllitf.h" /* the coreInfo Structure*/
#include "ngspice/evtudn.h" /*Use defined nodes */
@ -486,7 +486,7 @@ int load_opus(char *name){
return 0;
}
#if defined(__MINGW32__) || defined(HAS_WINDOWS) || defined(_MSC_VER)
#if defined(__MINGW32__) || defined(HAS_WINGUI) || defined(_MSC_VER)
void *dlopen(const char *name,int type)
{

View File

@ -16,7 +16,7 @@ Author: 1985 Thomas L. Quarles
/* gtri - end - wbk - 11/9/90 */
#endif
#ifdef HAS_WINDOWS
#ifdef HAS_WINGUI
extern void SetAnalyse( char * Analyse, int Percent);
#endif
@ -35,7 +35,7 @@ void INPpas2(CKTcircuit *ckt, card * data, INPtables * tab, TSKtask *task)
char *gname;
CKTnode *gnode;
int error; /* used by the macros defined above */
#ifdef HAS_WINDOWS
#ifdef HAS_WINGUI
int linecount = 0, actcount = 0;
#endif
@ -71,7 +71,7 @@ void INPpas2(CKTcircuit *ckt, card * data, INPtables * tab, TSKtask *task)
#endif
#ifdef HAS_WINDOWS
#ifdef HAS_WINGUI
for (current = data; current != NULL; current = current->nextcard)
linecount++;
#endif
@ -83,7 +83,7 @@ void INPpas2(CKTcircuit *ckt, card * data, INPtables * tab, TSKtask *task)
printf("In INPpas2, examining card %s . . .\n", current->line);
#endif
#ifdef HAS_WINDOWS
#ifdef HAS_WINGUI
if (linecount > 0) {
SetAnalyse( "Circuit2", (int) (1000.*actcount/linecount));
actcount++;

View File

@ -5,7 +5,7 @@
Stand: 17.10.2009
*/
#include "ngspice/config.h"
#ifdef HAS_WINDOWS
#ifdef HAS_WINGUI
#define STRICT // strict type checking
#define WIN32_LEAN_AND_MEAN
@ -1415,5 +1415,5 @@ void winmessage(char* new_msg)
MessageBox(NULL, new_msg, "Ngspice Info", MB_OK|MB_ICONERROR);
}
#endif /* HAS_WINDOWS */
#endif /* HAS_WINGUI */

View File

@ -49,7 +49,7 @@
/* CONSOLE flag set in configurations console_debug and console_release */
#ifndef CONSOLE
/* define to specify MS Windows GUI executable */
#define HAS_WINDOWS 1
#define HAS_WINGUI 1
#endif
/* Define to 1 if you have the `access' function. */