*** empty log message ***

This commit is contained in:
saintel 2008-11-22 10:31:46 +00:00
parent 3a053d09cc
commit 6fe0cebe58
33 changed files with 363 additions and 89 deletions

299
COPYING
View File

@ -1,31 +1,268 @@
(The original copyright for Spice3f5.)
Copyright (C) 1996 The Regents of the University of California.
All Rights Reserved.
Permission to use, copy, modify, and distribute this software and its
documentation for educational, research and non-profit purposes,
without fee, and without a written agreement is hereby granted,
provided that the above copyright notice, this paragraph and the
following three paragraphs appear in all copies.
This software program and documentation are copyrighted by The Regents
of the University of California. The software program and
documentation are supplied "as is", without any accompanying services
from The Regents. The Regents does not warrant that the operation of
the program will be uninterrupted or error-free. The end-user
understands that the program was developed for research purposes and
is advised not to rely exclusively on the program for any reason.
IN NO EVENT SHALL THE UNIVERSITY OF CALIFORNIA BE LIABLE TO ANY PARTY
FOR DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES,
INCLUDING LOST PROFITS, ARISING OUT OF THE USE OF THIS SOFTWARE AND
ITS DOCUMENTATION, EVEN IF THE UNIVERSITY OF CALIFORNIA HAS BEEN
ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. THE UNIVERSITY OF
CALIFORNIA SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING, BUT NOT
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS ON AN "AS IS"
BASIS, AND THE UNIVERSITY OF CALIFORNIA HAS NO OBLIGATIONS TO PROVIDE
MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
Ngspice rework-18
Copyright (c) 2008,
All rights reserved.
Forewords:
Spice's name was originally choosen at Berkeley's University. iAs it is the basis of almost all circuit simulator, the major part of the analogue and mixed signals simulation's code is designed to fit with it. *spices (generic name for its forks) are heterogenous in many points due to the work of researchers, electronic designers, software editors, etc Ngspice team tryies to collect work from the different sources and contribute new functionalities. Then, the material we manipulate is heterogenous in licenses. Keeping the licenses as is, or relicensing is a constant debate at ngspice.
Copyleft is a fundamental question in FOSS developpement. The choice of a copylefted contribution, or a non copylefted contribution is an important choice that should be respected. Ngspice team wants to encourage contributions to spice. For this reason, we let each developper choose its status regarding copyleft. Ngspice branch will not be covered by a specific license. Each piece of code will be kept under its original contributor's license. As for any project, modifications made in sources covered by a less restrictive license can be covered by GPL. We do not encourage it. We encourage restrictive licenses to be choosen for new functinonalities, writtent in distinct files, leading to distinct libraries that links depending on a specific configure flag. We encourage copyrightable modifications in BSD source files to be released under the same license. We encourage non proliferation of licenses, (eg choosing either GPL, LGPL or new BSD).
The reason for these guidelines it to mark respect to the original contributors, and to keep license status clear to ease collaboration between developpers and between projects. Try always to respect the license of the piece of code you are working on. When conveying versions of ngspice, try to determine the right license that applies to the package. Try not to commit license infrigements, especially to GPL and LGPL, which are quite restrictive
please notice than on 2007, July 17th spice 3f5 changed from its original license to the new bsd license.
Since 2008, December 1st, tclspice changes license from GPL to LGPL, in accordance with multigig Ltd.
---------------------------------- Cider -----------------------------------
RESEARCH SOFTWARE AGREEMENT
This file specifies the terms under which the software and
documentation provided with this distribution are provided.
Software is distributed as is, completely without warranty
or service support. The University of California and its employ-
ees are not liable for the condition or performance of the
software.
The University does not warrant that it owns the copyright
or other proprietary rights to all software and documentation
provided under this agreement, notwithstanding any copyright
notice, and shall not be liable for any infringement of copyright
or proprietary rights brought by third parties against the reci-
pient of the software and documentation provided under this
agreement.
THE UNIVERSITY OF CALIFORNIA HEREBY DISCLAIMS ALL IMPLIED
WARRANTIES, INCLUDING THE IMPLIED WARRANTIES OF MERCHANTABILITY
AND FITNESS FOR A PARTICULAR PURPOSE. THE UNIVERSITY IS NOT
LIABLE FOR ANY DAMAGES INCURRED BY THE RECIPIENT IN USE OF THE
SOFTWARE AND DOCUMENTATION, INCLUDING DIRECT, INDIRECT, SPECIAL,
INCIDENTAL, OR CONSEQUENTIAL DAMAGES.
The University of California grants the recipient the right
to modify, copy, and redistribute the software and documentation,
both within the recipient's organization and externally, subject
to the following restrictions:
(a) The recipient agrees not to charge for the University of
California code itself. The recipient may, however, charge
for additions, extensions, or support.
(b) In any product based on the software, the recipient agrees
to acknowledge the research group that developed the
software. This acknowledgement shall appear in the product
documentation.
(c) The recipient agrees to obey all U.S. Government restric-
tions governing redistribution or export of the software and
documentation.
---------------------------------- Spice3f5 --------------------------------
Copyright (c) 1985-1991 The Regents of the University of California.
All rights reserved.
Permission is hereby granted, without written agreement and without license
or royalty fees, to use, copy, modify, and distribute this software and its
documentation for any purpose, provided that the above copyright notice and
the following two paragraphs appear in all copies of this software.
IN NO EVENT SHALL THE UNIVERSITY OF CALIFORNIA BE LIABLE TO ANY PARTY FOR
DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES ARISING OUT
OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF THE UNIVERSITY OF
CALIFORNIA HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
THE UNIVERSITY OF CALIFORNIA SPECIFICALLY DISCLAIMS ANY WARRANTIES,
INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS ON AN
"AS IS" BASIS, AND THE UNIVERSITY OF CALIFORNIA HAS NO OBLIGATION TO PROVIDE
MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
-------------------------------- Tclspice --------------------------------
GNU LESSER GENERAL PUBLIC LICENSE
Version 3, 29 June 2007
Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
This version of the GNU Lesser General Public License incorporates
the terms and conditions of version 3 of the GNU General Public
License, supplemented by the additional permissions listed below.
0. Additional Definitions.
As used herein, "this License" refers to version 3 of the GNU Lesser
General Public License, and the "GNU GPL" refers to version 3 of the GNU
General Public License.
"The Library" refers to a covered work governed by this License,
other than an Application or a Combined Work as defined below.
An "Application" is any work that makes use of an interface provided
by the Library, but which is not otherwise based on the Library.
Defining a subclass of a class defined by the Library is deemed a mode
of using an interface provided by the Library.
A "Combined Work" is a work produced by combining or linking an
Application with the Library. The particular version of the Library
with which the Combined Work was made is also called the "Linked
Version".
The "Minimal Corresponding Source" for a Combined Work means the
Corresponding Source for the Combined Work, excluding any source code
for portions of the Combined Work that, considered in isolation, are
based on the Application, and not on the Linked Version.
The "Corresponding Application Code" for a Combined Work means the
object code and/or source code for the Application, including any data
and utility programs needed for reproducing the Combined Work from the
Application, but excluding the System Libraries of the Combined Work.
1. Exception to Section 3 of the GNU GPL.
You may convey a covered work under sections 3 and 4 of this License
without being bound by section 3 of the GNU GPL.
2. Conveying Modified Versions.
If you modify a copy of the Library, and, in your modifications, a
facility refers to a function or data to be supplied by an Application
that uses the facility (other than as an argument passed when the
facility is invoked), then you may convey a copy of the modified
version:
a) under this License, provided that you make a good faith effort to
ensure that, in the event an Application does not supply the
function or data, the facility still operates, and performs
whatever part of its purpose remains meaningful, or
b) under the GNU GPL, with none of the additional permissions of
this License applicable to that copy.
3. Object Code Incorporating Material from Library Header Files.
The object code form of an Application may incorporate material from
a header file that is part of the Library. You may convey such object
code under terms of your choice, provided that, if the incorporated
material is not limited to numerical parameters, data structure
layouts and accessors, or small macros, inline functions and templates
(ten or fewer lines in length), you do both of the following:
a) Give prominent notice with each copy of the object code that the
Library is used in it and that the Library and its use are
covered by this License.
b) Accompany the object code with a copy of the GNU GPL and this license
document.
4. Combined Works.
You may convey a Combined Work under terms of your choice that,
taken together, effectively do not restrict modification of the
portions of the Library contained in the Combined Work and reverse
engineering for debugging such modifications, if you also do each of
the following:
a) Give prominent notice with each copy of the Combined Work that
the Library is used in it and that the Library and its use are
covered by this License.
b) Accompany the Combined Work with a copy of the GNU GPL and this license
document.
c) For a Combined Work that displays copyright notices during
execution, include the copyright notice for the Library among
these notices, as well as a reference directing the user to the
copies of the GNU GPL and this license document.
d) Do one of the following:
0) Convey the Minimal Corresponding Source under the terms of this
License, and the Corresponding Application Code in a form
suitable for, and under terms that permit, the user to
recombine or relink the Application with a modified version of
the Linked Version to produce a modified Combined Work, in the
manner specified by section 6 of the GNU GPL for conveying
Corresponding Source.
1) Use a suitable shared library mechanism for linking with the
Library. A suitable mechanism is one that (a) uses at run time
a copy of the Library already present on the user's computer
system, and (b) will operate properly with a modified version
of the Library that is interface-compatible with the Linked
Version.
e) Provide Installation Information, but only if you would otherwise
be required to provide such information under section 6 of the
GNU GPL, and only to the extent that such information is
necessary to install and execute a modified version of the
Combined Work produced by recombining or relinking the
Application with a modified version of the Linked Version. (If
you use option 4d0, the Installation Information must accompany
the Minimal Corresponding Source and Corresponding Application
Code. If you use option 4d1, you must provide the Installation
Information in the manner specified by section 6 of the GNU GPL
for conveying Corresponding Source.)
5. Combined Libraries.
You may place library facilities that are a work based on the
Library side by side in a single library together with other library
facilities that are not Applications and are not covered by this
License, and convey such a combined library under terms of your
choice, if you do both of the following:
a) Accompany the combined library with a copy of the same work based
on the Library, uncombined with any other library facilities,
conveyed under the terms of this License.
b) Give prominent notice with the combined library that part of it
is a work based on the Library, and explaining where to find the
accompanying uncombined form of the same work.
6. Revised Versions of the GNU Lesser General Public License.
The Free Software Foundation may publish revised and/or new versions
of the GNU Lesser General Public License from time to time. Such new
versions will be similar in spirit to the present version, but may
differ in detail to address new problems or concerns.
Each version is given a distinguishing version number. If the
Library as you received it specifies that a certain numbered version
of the GNU Lesser General Public License "or any later version"
applies to it, you have the option of following the terms and
conditions either of that published version or of any later version
published by the Free Software Foundation. If the Library as you
received it does not specify a version number of the GNU Lesser
General Public License, you may choose any version of the GNU Lesser
General Public License ever published by the Free Software Foundation.
If the Library as you received it specifies that a proxy can decide
whether future versions of the GNU Lesser General Public License shall
apply, that proxy's public statement of acceptance of any version is
permanent authorization for you to choose that version for the
Library.
---------------------------------- Xspice --------------------------------
THE SOFTWARE PROGRAMS BELOW ARE IN THE PUBLIC DOMAIN AND ARE PROVIDED FREE OF
ANY CHARGE. THE GEORGIA TECH RESEARCH CORPORATION, THE GEORGIA INSTITUTE OF
TECHNOLOGY, AND/OR OTHER PARTIES PROVIDE THIS SOFTWARE "AS IS" WITHOUT WARRANTY
OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE
ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH THE USER.
SHOULD THE PROGRAM PROVE DEFECTIVE, THE USER ASSUMES THE ENTIRE COST OF ALL
NECESSARY SERVICING, REPAIR OR CORRECTION. IN NO EVENT WILL THE GEORGIA TECH
RESEARCH CORPORATION, THE GEORGIA INSTITUTE OF TECHNOLOGY, AND/OR OTHER PARTIES
PROVIDING THE PROGRAMS BELOW BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL,
SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY
TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED
INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM
TO OPERATE WITH ANY OTHER PROGRAMS).

View File

@ -1,3 +1,37 @@
2008-11-22 Lionel Sainte Cluque
* COPYING: license clarifications
* frontend/inpcom.c: minor changes (correct warning)
* frontend/misccoms.c: minor changes (correct warning)
* frontend/where.c: minor changes (correct warning)
* spicelib/parser/inpgmod.c: minor changes (correct warning)
* spicelib/parser/inppas3.c: minor changes (correct warning)
* spicelib/devices/numd/numdload.c: minor changes (correct warning)
* spicelib/devices/numd2/nud2load.c: minor changes (correct warning)
* xspice/mif/mifsetup.c: minor changes (correct warning)
* xspice/ipc/ipcsockets.c: minor changes (correct warning)
* ciderlib/input/mobset.c: minor changes (correct warning)
* include/spmatrix.h: minor changes (correct warning)
* tclspice.c: minor changes (correct warning)
* frontend/com_fft.c : changed some malloc into tmalloc
* frontend/com_measure2.c : changed some malloc into tmalloc
* spicelib/devices/bsim3/b3temp.c: changed some malloc into tmalloc
* spicelib/devices/bsim3soi/b4soitemp.c: changed some malloc into tmalloc
* spicelib/devices/bsim3v32/b3v32temp.c: changed some malloc into tmalloc
* spicelib/devices/bsim4/b4temp.c: changed some malloc into tmalloc
* spicelib/devices/bsim4v2/b4v2temp.c: changed some malloc into tmalloc
* spicelib/devices/bsim4v3/b4v3temp.c: changed some malloc into tmalloc
* spicelib/devices/bsim4v4/b4v4temp.c: changed some malloc into tmalloc
* spicelib/devices/bsim4v5/b4v5temp.c: changed some malloc into tmalloc
* spicelib/devices/cpl/cplload.c: changed some malloc into tmalloc
* spicelib/devices/ndev/ndevset.c: changed some malloc into tmalloc
* ciderlib/support/database.c : changed some malloc into tmalloc
* frontend/numparam/mystring.c : changed some malloc into tmalloc
* frontend/numparam/xpressn.c : changed some malloc into tmalloc
* spicelib/parser/inp2p.c : changed some malloc into tmalloc
* xspice/mif/mif_inp2.c: changed some malloc into tmalloc
* misc/util.c: changed some malloc into tmalloc
* spicelib/parser/inp2y.c: changed some malloc into tmalloc
2008-11-20 Paolo Nenzi
* src/frontend/diff.c: currents in rawfiles are written as i(xxx) and no more as xxx#branch. The diff
interactive command (used to compare plots) did not work anymore. This new version traslates back

View File

@ -12,6 +12,7 @@ Modified: 2001 Paolo Nenzi
#include "material.h"
#include "sperror.h"
#include "suffix.h"
#include <cidersupt.h>
extern int MOBcheck( MOBcard *, MaterialInfo * );
extern int MOBsetup( MOBcard *, MaterialInfo * );

View File

@ -38,7 +38,7 @@ int lengthWanted;
return(NULL);
}
data = (double *) malloc(sizeof (double) * v->v_length);
data = (double *) tmalloc(sizeof (double) * v->v_length);
if (isreal(v)) {
bcopy((char *) v->v_realdata, (char *) data, sizeof (double) * v->v_length);
} else {

View File

@ -211,8 +211,8 @@ com_fft(wordlist *wl)
sign = 1;
isreal = 1;
reald = (float*)malloc(size*sizeof(float));
imagd = (float*)malloc(size*sizeof(float));
reald = (float*)tmalloc(size*sizeof(float));
imagd = (float*)tmalloc(size*sizeof(float));
printf("CPU: Delta Freq %f Hz, input length %d, output length %d\n", 1./span*tlen/size, size, fpts);

View File

@ -1,5 +1,6 @@
#include <config.h>
#include <ngspice.h>
#include <memory.h>
#include <fteext.h>
#include <wordlist.h>
@ -424,7 +425,7 @@ int measure_parse_find (struct measure *meas, wordlist *wl, wordlist *wlBreak, c
p = wl->wl_word;
if (pCnt == 0 ) {
// meas->m_vec =(char *)malloc(strlen(wl->wl_word)+1);
// meas->m_vec =(char *)tmalloc(strlen(wl->wl_word)+1);
// strcpy(meas->m_vec, cp_unquote(wl->wl_word));
meas->m_vec= cp_unquote(wl->wl_word);
} else if (pCnt == 1) {
@ -531,7 +532,7 @@ int measure_parse_trigtarg (struct measure *meas, wordlist *words, wordlist *wlT
p = words->wl_word;
if (pcnt ==0) {
// meas->m_vec =(char *)malloc(strlen(words->wl_word)+1);
// meas->m_vec =(char *)tmalloc(strlen(words->wl_word)+1);
// strcpy(meas->m_vec, cp_unquote(words->wl_word));
meas->m_vec= cp_unquote(words->wl_word);
} else {
@ -695,8 +696,8 @@ get_measure2(wordlist *wl)
{
// trig parameters
measure *measTrig, *measTarg;
measTrig = (struct measure*)malloc(sizeof(struct measure));
measTarg = (struct measure*)malloc(sizeof(struct measure));
measTrig = (struct measure*)tmalloc(sizeof(struct measure));
measTarg = (struct measure*)tmalloc(sizeof(struct measure));
if (measure_parse_trigtarg(measTrig, words , wlTarg, "trig", errbuf)==0) {
measure_errMessage(mName, mFunction, "TRIG", errbuf);
@ -755,8 +756,8 @@ get_measure2(wordlist *wl)
case AT_FIND:
{
measure *meas, *measFind;
meas = (struct measure*)malloc(sizeof(struct measure));
measFind = (struct measure*)malloc(sizeof(struct measure));
meas = (struct measure*)tmalloc(sizeof(struct measure));
measFind = (struct measure*)tmalloc(sizeof(struct measure));
if (measure_parse_find(meas, words, wlWhen, errbuf) == 0) {
measure_errMessage(mName, mFunction, "FIND", errbuf);
@ -805,7 +806,7 @@ get_measure2(wordlist *wl)
case AT_WHEN:
{
measure *meas;
meas = (struct measure*)malloc(sizeof(struct measure));
meas = (struct measure*)tmalloc(sizeof(struct measure));
if (measure_parse_when(meas, words, errbuf) ==0) {
measure_errMessage(mName, mFunction, "WHEN", errbuf);
@ -834,7 +835,7 @@ get_measure2(wordlist *wl)
{
// trig parameters
measure *meas;
meas = (struct measure*)malloc(sizeof(struct measure));
meas = (struct measure*)tmalloc(sizeof(struct measure));
if (measure_parse_trigtarg(meas, words , NULL, "trig", errbuf)==0) {
measure_errMessage(mName, mFunction, "TRIG", errbuf);
@ -863,7 +864,7 @@ get_measure2(wordlist *wl)
{
// trig parameters
measure *measTrig;
measTrig = (struct measure*)malloc(sizeof(struct measure));
measTrig = (struct measure*)tmalloc(sizeof(struct measure));
if (measure_parse_trigtarg(measTrig, words , NULL, "trig", errbuf)==0) {
measure_errMessage(mName, mFunction, "TRIG", errbuf);
@ -892,7 +893,7 @@ get_measure2(wordlist *wl)
float minValue, maxValue;
measure *measTrig;
measTrig = (struct measure*)malloc(sizeof(struct measure));
measTrig = (struct measure*)tmalloc(sizeof(struct measure));
if (measure_parse_trigtarg(measTrig, words , NULL, "trig", errbuf)==0) {
measure_errMessage(mName, mFunction, "TRIG", errbuf);

View File

@ -1582,10 +1582,10 @@ inp_stripcomments_line(char * s)
if (*d==';') {
break;
} else if ((c=='$') && (*d==' ')) {
*d--; /* move d back to first comment character */
d--; /* move d back to first comment character */
break;
} else if( (*d==c) && ((c=='/') || (c=='-'))) {
*d--; /* move d back to first comment character */
d--; /* move d back to first comment character */
break;
}
}

View File

@ -149,9 +149,9 @@ com_version(wordlist *wl)
fprintf(cp_out, "** The U. C. Berkeley CAD Group\n");
fprintf(cp_out,
"** Copyright 1985-1994, Regents of the University of California.\n");
if (Spice_Notice && *Spice_Notice)
if (Spice_Notice != NULL && *Spice_Notice != 0)
fprintf(cp_out, "** %s\n", Spice_Notice);
if (Spice_Build_Date && *Spice_Build_Date)
if (Spice_Build_Date != NULL && *Spice_Build_Date != 0)
fprintf(cp_out, "** Creation Date: %s\n", Spice_Build_Date);
fprintf(cp_out, "******\n");
@ -161,9 +161,9 @@ com_version(wordlist *wl)
fprintf(cp_out, "******\n");
fprintf(cp_out, "** %s-%s\n", ft_sim->simulator,
ft_sim->version);
if (Spice_Notice && *Spice_Notice)
if (Spice_Notice != NULL && *Spice_Notice != 0)
fprintf(cp_out, "** %s\n", Spice_Notice);
if (Spice_Build_Date && *Spice_Build_Date)
if (Spice_Build_Date != NULL && *Spice_Build_Date != 0)
fprintf(cp_out, "** Creation Date: %s\n", Spice_Build_Date);
fprintf(cp_out, "******\n");
} else if (!strncmp(s, "-f", 2) || !strncmp(s, "-F", 2) ) {
@ -175,9 +175,9 @@ com_version(wordlist *wl)
fprintf(cp_out, "** The U. C. Berkeley CAD Group\n");
fprintf(cp_out,
"** Copyright 1985-1994, Regents of the University of California.\n");
if (Spice_Notice && *Spice_Notice)
if (Spice_Notice != NULL && *Spice_Notice != 0)
fprintf(cp_out, "** %s\n", Spice_Notice);
if (Spice_Build_Date && *Spice_Build_Date)
if (Spice_Build_Date != NULL && *Spice_Build_Date != 0)
fprintf(cp_out, "** Creation Date: %s\n", Spice_Build_Date);
fprintf(cp_out,"**\n");
#ifdef CIDER

View File

@ -9,6 +9,7 @@
#include <stdlib.h>
#include <ctype.h>
#include <string.h>
#include <memory.h>
#include "config.h"
#ifdef HAS_WINDOWS
@ -765,7 +766,7 @@ new (long sz)
return NULL;
else
{
p = malloc (sz);
p = tmalloc (sz);
if (p == NULL)
{ /* fatal error */
ws (" new() failure. Program halted.\n");

View File

@ -2075,7 +2075,7 @@ nupa_subcktcall (tdico * dico, char *s, char *x, unsigned char err)
ls = length (t);
buf = (char*) malloc(strlen(t) + 1);
buf = (char*) tmalloc(strlen(t) + 1);
strcpy(buf, t);
found = 0;

View File

@ -22,7 +22,7 @@ com_where(void)
if (!ft_curckt) {
fprintf(cp_err, "There is no current circuit\n");
return; }
else if (ft_curckt->ci_ckt != "") {
else if (*ft_curckt->ci_ckt != 0) {
fprintf(cp_err, "No unconverged node found.\n");
return;
}

View File

@ -264,6 +264,7 @@ extern int spFileMatrix( void *, char *, char *, int, int, int );
extern int spFileStats( void *, char *, char * );
extern int spFillinCount( void * );
extern int spGetAdmittance( void *, int, int, struct spTemplate* );
extern spREAL *spFindElement( void *eMatrix, int Row, int Col );
extern spREAL *spGetElement( void *, int, int );
extern char *spGetInitInfo( spREAL* );
extern int spGetOnes( void *, int, int, int, struct spTemplate* );

View File

@ -175,7 +175,7 @@ basename(const char *name)
len = strlen(name);
if (name[len - 1] == '/') {
// ditch the trailing '/'
p = tmp = malloc(len);
p = tmp = tmalloc(len);
strncpy(p, name, len - 1);
} else {
p = (char *) name;
@ -225,7 +225,7 @@ dirname(const char *name)
size = p - name;
if (size) {
ret = malloc(size + 1);
ret = tmalloc(size + 1);
memcpy(ret, name, size);
ret[size] = '\0';
} else if (*p == '/')
@ -270,7 +270,7 @@ dirname(const char *name)
size = p - name;
if (size) {
ret = malloc(size + 1);
ret = tmalloc(size + 1);
memcpy(ret, name, size);
ret[size] = '\0';
} else if (*p == '/')

View File

@ -163,7 +163,7 @@ int Size_Not_Found;
}
if (Size_Not_Found)
{ pParam = (struct bsim3SizeDependParam *)malloc(
{ pParam = (struct bsim3SizeDependParam *)tmalloc(
sizeof(struct bsim3SizeDependParam));
if (pLastKnot == NULL)
model->pSizeDependParamKnot = pParam;

View File

@ -119,7 +119,7 @@ double tmp3, T7;
}
if (Size_Not_Found)
{ pParam = (struct b4soiSizeDependParam *)malloc(
{ pParam = (struct b4soiSizeDependParam *)tmalloc(
sizeof(struct b4soiSizeDependParam));
if (pLastKnot == NULL)
model->pSizeDependParamKnot = pParam;

View File

@ -234,7 +234,7 @@ int Size_Not_Found;
}
if (Size_Not_Found)
{ pParam = (struct bsim3SizeDependParam *)malloc(
{ pParam = (struct bsim3SizeDependParam *)tmalloc(
sizeof(struct bsim3SizeDependParam));
if (pLastKnot == NULL)
model->pSizeDependParamKnot = pParam;

View File

@ -418,7 +418,7 @@ int Size_Not_Found, i;
Wdrn = here->BSIM4w / here->BSIM4nf;
if (Size_Not_Found)
{ pParam = (struct bsim4SizeDependParam *)malloc(
{ pParam = (struct bsim4SizeDependParam *)tmalloc(
sizeof(struct bsim4SizeDependParam));
if (pLastKnot == NULL)
model->pSizeDependParamKnot = pParam;

View File

@ -344,7 +344,7 @@ int Size_Not_Found;
}
if (Size_Not_Found)
{ pParam = (struct bsim4SizeDependParam *)malloc(
{ pParam = (struct bsim4SizeDependParam *)tmalloc(
sizeof(struct bsim4SizeDependParam));
if (pLastKnot == NULL)
model->pSizeDependParamKnot = pParam;

View File

@ -351,7 +351,7 @@ int Size_Not_Found, i;
Ldrn = here->BSIM4v3l;
if (Size_Not_Found)
{ pParam = (struct bsim4v3SizeDependParam *)malloc(
{ pParam = (struct bsim4v3SizeDependParam *)tmalloc(
sizeof(struct bsim4v3SizeDependParam));
if (pLastKnot == NULL)
model->pSizeDependParamKnot = pParam;

View File

@ -361,7 +361,7 @@ int Size_Not_Found, i;
Ldrn = here->BSIM4v4l;
if (Size_Not_Found)
{ pParam = (struct bsim4SizeDependParam *)malloc(
{ pParam = (struct bsim4SizeDependParam *)tmalloc(
sizeof(struct bsim4SizeDependParam));
if (pLastKnot == NULL)
model->pSizeDependParamKnot = pParam;

View File

@ -365,7 +365,7 @@ int Size_Not_Found, i;
Wdrn = here->BSIM4v5w / here->BSIM4v5nf;
if (Size_Not_Found)
{ pParam = (struct bsim4v5SizeDependParam *)malloc(
{ pParam = (struct bsim4v5SizeDependParam *)tmalloc(
sizeof(struct bsim4v5SizeDependParam));
if (pLastKnot == NULL)
model->pSizeDependParamKnot = pParam;

View File

@ -314,7 +314,7 @@ copy_cp(CPLine *new, CPLine *old)
for (j = 0; j < m; j++) {
if (new->h1t[i][j] == NULL)
new->h1t[i][j] = (TMS *) malloc(sizeof (TMS));
new->h1t[i][j] = (TMS *) tmalloc(sizeof (TMS));
new->h1t[i][j]->ifImg = old->h1t[i][j]->ifImg;
new->h1t[i][j]->aten = old->h1t[i][j]->aten;
new->h1C[i][j] = old->h1C[i][j];
@ -328,7 +328,7 @@ copy_cp(CPLine *new, CPLine *old)
}
for (l = 0; l < m; l++) {
if (new->h2t[i][j][l] == NULL)
new->h2t[i][j][l] = (TMS *) malloc(sizeof (TMS));
new->h2t[i][j][l] = (TMS *) tmalloc(sizeof (TMS));
new->h2t[i][j][l]->ifImg = old->h2t[i][j][l]->ifImg;
new->h2t[i][j][l]->aten = old->h2t[i][j][l]->aten;
new->h2C[i][j][l] = old->h2C[i][j][l];
@ -343,7 +343,7 @@ copy_cp(CPLine *new, CPLine *old)
}
if (new->h3t[i][j][l] == NULL)
new->h3t[i][j][l] = (TMS *) malloc(sizeof (TMS));
new->h3t[i][j][l] = (TMS *) tmalloc(sizeof (TMS));
new->h3t[i][j][l]->ifImg = old->h3t[i][j][l]->ifImg;
new->h3t[i][j][l]->aten = old->h3t[i][j][l]->aten;
for (k = 0; k < 3; k++) {
@ -597,7 +597,7 @@ static VI_list
q = pool_vi;
pool_vi = pool_vi->pool;
return(q);
} else return((VI_list *) malloc (sizeof (VI_list)));
} else return((VI_list *) tmalloc (sizeof (VI_list)));
}
static void

View File

@ -81,7 +81,7 @@ int NDEVmodelConnect(GENmodel *inModel)
the resolved address to
a readable format. */
struct sockaddr_in sa; /* Connection address. */
void * buf = malloc(128);
void * buf = tmalloc(128);
/* Look up the hostname with DNS. gethostbyname
(at least most UNIX versions of it) properly

View File

@ -281,8 +281,8 @@ NUMDload(inModel, ckt)
}
}
}
if ((ckt->CKTmode & (MODETRAN | MODEAC | MODEINITSMSIG)) ||
(ckt->CKTmode & MODETRANOP) && (ckt->CKTmode & MODEUIC)) {
if ( (ckt->CKTmode & (MODETRAN | MODEAC | MODEINITSMSIG)) ||
((ckt->CKTmode & MODETRANOP) && (ckt->CKTmode & MODEUIC))) {
/*
* store small-signal parameters
*/

View File

@ -297,8 +297,8 @@ NUMD2load(inModel, ckt)
}
}
}
if ((ckt->CKTmode & (MODETRAN | MODEAC | MODEINITSMSIG)) ||
(ckt->CKTmode & MODETRANOP) && (ckt->CKTmode & MODEUIC)) {
if ( (ckt->CKTmode & (MODETRAN | MODEAC | MODEINITSMSIG)) ||
((ckt->CKTmode & MODETRANOP) && (ckt->CKTmode & MODEUIC))) {
/*
* store small-signal parameters
*/

View File

@ -63,10 +63,10 @@ int num, i;
line = current->line;
INPgetTok(&line,&name,1);
nname1 = (char **) malloc(num * sizeof(char *));
nname2 = (char **) malloc(num * sizeof(char *));
node1 = (void **) malloc(num * sizeof(void *));
node2 = (void **) malloc(num * sizeof(void *));
nname1 = (char **) tmalloc(num * sizeof(char *));
nname2 = (char **) tmalloc(num * sizeof(char *));
node1 = (void **) tmalloc(num * sizeof(void *));
node2 = (void **) tmalloc(num * sizeof(void *));
for (i = 0; i < num; i++) {

View File

@ -123,7 +123,7 @@ int lenvalgiven = 0;
type = INPtypelook("Resistor");
/* resistor between node1 and internal1 */
internal1 = (char *) malloc (10);
internal1 = (char *) tmalloc (10);
strcpy(internal1, "txlnd1");
INPtermInsert(ckt, &internal1, tab, &inode1);
if(!tab->defRmod) {
@ -140,7 +140,7 @@ int lenvalgiven = 0;
GCA(INPpName,("resistance",&ptemp,ckt,type,fast))
/* resistor between internal1 and internal2 */
internal2 = (char *) malloc (10);
internal2 = (char *) tmalloc (10);
strcpy(internal2, "txlnd2");
INPtermInsert(ckt, &internal2, tab, &inode2);
strcpy(rname2, "txlres2");

View File

@ -396,7 +396,7 @@ INPparseNumMod( void* ckt, INPmodel *model, INPtables *tab, char **errMessage )
/* Strip leading carat from booleans */
if (*line == '^') {
invert = TRUE;
*line++; /* Skip the '^' */
line++; /* Skip the '^' */
} else {
invert = FALSE;
}

View File

@ -69,7 +69,7 @@ INPpas3(void *ckt, card *data, INPtables *tab, void *task,
INPgetTok(&line,&name,1);
/* check to see if in the form V(xxx) and grab the xxx */
if( *name == (char)NULL) break; /* end of line */
if( *name == 0) break; /* end of line */
length = strlen(name);
if( (*name == 'V' || *(name) == 'v') && (length == 1)){
/* looks like V - must be V(xx) - get xx now*/

View File

@ -2099,7 +2099,7 @@ static int tmeasure TCL_CMDPROCARGS(clientData,interp,argc,argv){
return TCL_ERROR;
}
wl =wl_build(argv);
wl =wl_build((char **)argv);
mvalue = get_measure2(wl);
@ -2185,7 +2185,6 @@ int Spice_Init(Tcl_Interp *interp) {
struct passwd *pw;
pw = getpwuid(getuid());
#define INITSTR "/.spiceinit"
#ifdef HAVE_ASPRINTF
asprintf(&s, "%s%s", pw->pw_dir,INITSTR);
#else /* ~ HAVE_ASPRINTF */

View File

@ -168,7 +168,7 @@ Ipc_Status_t ipc_transport_initialize_server (server_name, mode, protocol,
/* with version 1 (mailboxes) functions of the same names. */
{
struct sockaddr_in server; /* Server specifications for socket*/
int server_length; /* Size of server structure */
unsigned int server_length; /* Size of server structure */
unsigned int port_num; /* Port number converted from server_name */
Ipc_Status_t ipc_get_line ();
@ -497,7 +497,7 @@ Ipc_Status_t ipc_transport_get_line (str, len, wait)
if (sock_state == IPC_SOCK_INITIALIZED) {
/* We have an open socket but have not connected to a client. */
/* Accept a connection from a client. */
msg_stream = accept (sock_desc, (struct sockaddr *)0, (int *)0);
msg_stream = accept (sock_desc, (struct sockaddr *)0, (unsigned int *)0);
if (msg_stream == -1) {
fprintf (stderr, "ERROR: IPC: Server accepting request\n");

View File

@ -916,7 +916,7 @@ MIFget_port(
/* These are single ended types, so default other node to ground */
// This don't work dickhead, INPtermInsert tries to FREE(&node) K.A. Feb 27, 2000
// which was not allocted
node = (char*)malloc(2);// added by K.A. march 5th 2000
node = (char*)tmalloc(2);// added by K.A. march 5th 2000
*node = '0'; // added by K.A. March 5th 2000
node[1] ='\0'; // added by K.A. March 5th 2000

View File

@ -353,7 +353,7 @@ MIFsetup(
if(is_input && (type == MIF_VSOURCE_CURRENT)) {
smp_data_out->ibranch = CKTfndBranch(ckt,
here->conn[i]->port[j]->vsource_str);
if(smp_data_out->ibranch == (int)NULL) {
if(smp_data_out->ibranch == 0) {
IFuid names[2];
names[0] = here->MIFname;
names[1] = (IFuid) here->conn[i]->port[j]->vsource_str;