Browse Source

patches R. Larice

pre-master-46
h_vogt 16 years ago
parent
commit
07f90563dc
  1. 4
      ChangeLog
  2. 12
      src/ciderlib/twod/twomesh.c
  3. 8
      src/conf.c
  4. 6
      src/conf.h
  5. 3
      src/frontend/evaluate.c
  6. 1
      src/frontend/terminal.c
  7. 4
      src/include/ngspice.h
  8. 2
      src/tclspice.c
  9. 10
      src/xspice/evt/evtload.c
  10. 6
      src/xspice/icm/dlmain.c

4
ChangeLog

@ -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

12
src/ciderlib/twod/twomesh.c

@ -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);

8
src/conf.c

@ -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;

6
src/conf.h

@ -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;

3
src/frontend/evaluate.c

@ -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>

1
src/frontend/terminal.c

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

4
src/include/ngspice.h

@ -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>

2
src/tclspice.c

@ -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>

10
src/xspice/evt/evtload.c

@ -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 */

6
src/xspice/icm/dlmain.c

@ -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);
}
Loading…
Cancel
Save