patches R. Larice

This commit is contained in:
h_vogt 2010-02-13 14:47:45 +00:00
parent 31203ce2ab
commit 07f90563dc
10 changed files with 26 additions and 30 deletions

View File

@ -1,3 +1,7 @@
2010-02-13 Holger Vogt
* icm/dllmain.c, evtload.c, ngspice.h, terminal.c, evaluate.c, twomesh.c,
tclspice.c, conf.h, conf.c: patches by R. Larice 100213
2010-02-11 Holger Vogt
* terminal.h, cpextern.h: use format (__printf__, 1, 2)
* pzan.c, nipzmeth.c, cktpzstr.c, macros.h: remove conflicting macro definition

View File

@ -101,34 +101,34 @@ TWObuildMesh(TWOdevice *pDevice, TWOdomain *pDomain,
interiorNode = TRUE;
if (xIndex > 1) {
pNode1 = nodeArray[xIndex - 1][yIndex];
if (pNode1->nodeType != NULL
if (pNode1->nodeType != 0
&& pNode1->nodeType != CONTACT) {
interiorNode = FALSE;
}
}
if (interiorNode && xIndex < numXNodes) {
pNode1 = nodeArray[xIndex + 1][yIndex];
if (pNode1->nodeType != NULL
if (pNode1->nodeType != 0
&& pNode1->nodeType != CONTACT) {
interiorNode = FALSE;
}
}
if (interiorNode && yIndex > 1) {
pNode1 = nodeArray[xIndex][yIndex - 1];
if (pNode1->nodeType != NULL
if (pNode1->nodeType != 0
&& pNode1->nodeType != CONTACT) {
interiorNode = FALSE;
}
}
if (interiorNode && yIndex < numYNodes) {
pNode1 = nodeArray[xIndex][yIndex + 1];
if (pNode1->nodeType != NULL
if (pNode1->nodeType != 0
&& pNode1->nodeType != CONTACT) {
interiorNode = FALSE;
}
}
if (interiorNode) {
pNode->nodeType = NULL;
pNode->nodeType = 0;
}
}
}
@ -139,7 +139,7 @@ TWObuildMesh(TWOdevice *pDevice, TWOdomain *pDomain,
for (yIndex = 1; yIndex <= numYNodes; yIndex++) {
for (xIndex = 1; xIndex <= numXNodes; xIndex++) {
pNode = nodeArray[xIndex][yIndex];
if (pNode->nodeType == NULL) {
if (pNode->nodeType == 0) {
/* This node doesn't belong to a domain so delete it. */
nodeArray[xIndex][yIndex] = NIL(TWOnode);
FREE(pNode);

View File

@ -11,12 +11,12 @@
#define BUG_ADDRESS "ngspice-bugs@lists.sourceforge.net"
#endif
char Spice_Version[] = PACKAGE_VERSION;
char Spice_Notice[] = "Please submit bug-reports to: " BUG_ADDRESS;
char *Spice_Version = PACKAGE_VERSION;
char *Spice_Notice = "Please submit bug-reports to: " BUG_ADDRESS;
#ifndef _MSC_VER
char Spice_Build_Date[] = NGSPICEBUILDDATE;
char *Spice_Build_Date = NGSPICEBUILDDATE;
#else
char Spice_Build_Date[] = __DATE__" "__TIME__;
char *Spice_Build_Date = __DATE__" "__TIME__;
#endif
char *Spice_Exec_Dir = NGSPICEBINDIR;

View File

@ -1,9 +1,9 @@
#ifndef __CONF_H
#define __CONF_H
extern char Spice_Version[];
extern char Spice_Notice[];
extern char Spice_Build_Date[];
extern char *Spice_Version;
extern char *Spice_Notice;
extern char *Spice_Build_Date;
extern char *Spice_Exec_Dir;
extern char *Spice_Lib_Dir;
extern char *Def_Editor;

View File

@ -7,10 +7,11 @@ Author: 1985 Wayne A. Christopher, U. C. Berkeley CAD Group
* Convert a parse tree to a list of data vectors.
*/
#include <ngspice.h>
#include <setjmp.h>
#include <signal.h>
#include <ngspice.h>
#include <ftedefs.h>
#include <dvec.h>

View File

@ -41,7 +41,6 @@ $Id$
#include <ncurses/termcap.h>
#endif
#include "ngspice.h"
#include <cpdefs.h>
#include "variable.h"

View File

@ -13,7 +13,9 @@
* This file will eventually replace spice.h and lots of other
* files in src/include
*/
#define _GNU_SOURCE
#ifndef _GNU_SOURCE
# define _GNU_SOURCE
#endif
#include "config.h"
#include <stddef.h>

View File

@ -86,8 +86,6 @@ typedef pthread_t threadId_t;
#include <unistd.h> /* usleep */
#endif /* __MINGW32__ */
#define _GNU_SOURCE
#include <iferrmsg.h>
#include <ftedefs.h>
#include <devdefs.h>

View File

@ -325,7 +325,6 @@ static void EVTcreate_state(
CKTcircuit *ckt, /* The circuit structure */
int inst_index) /* The instance to create state for */
{
int i;
int total_size;
Evt_State_Data_t *state_data;
@ -333,10 +332,6 @@ static void EVTcreate_state(
Evt_State_t *new_state;
Evt_State_t *prev_state;
char *from;
char *to;
/* Get variables for fast access */
state_data = ckt->evt->data.state;
@ -369,10 +364,7 @@ static void EVTcreate_state(
state_data->tail[inst_index] = &(prev_state->next);
/* Copy the old state to the new state and set the step */
from = prev_state->block;
to = new_state->block;
for(i = 0; i < total_size; i++)
to[i] = from[i];
memcpy(new_state->block, prev_state->block, total_size);
new_state->step = g_mif_info.circuit.evt_step;
/* Mark that the state data on the instance has been modified */

View File

@ -369,14 +369,14 @@ void free_pj(void *ptr) {
(coreitf->dllitf_free_pj)(ptr);
}
char * tmalloc(int s) {
void * tmalloc(size_t s) {
return (coreitf->dllitf_tmalloc)(s);
}
char * trealloc(char *ptr, int s) {
void * trealloc(void *ptr, size_t s) {
return (coreitf->dllitf_trealloc)(ptr,s);
}
void txfree(char *ptr) {
void txfree(void *ptr) {
(coreitf->dllitf_txfree)(ptr);
}