Browse Source

remove redundant nested function declarations

pre-master-46
rlar 16 years ago
parent
commit
b58722b18b
  1. 12
      ChangeLog
  2. 1
      src/frontend/com_hardcopy.c
  3. 7
      src/maths/sparse/spbuild.c
  4. 16
      src/maths/sparse/spfactor.c
  5. 3
      src/maths/sparse/spoutput.c
  6. 2
      src/maths/sparse/spsolve.c
  7. 2
      src/maths/sparse/sputils.c
  8. 1
      src/spicelib/analysis/dcop.c
  9. 1
      src/spicelib/parser/inppas1.c
  10. 2
      src/xspice/ipc/ipcsockets.c

12
ChangeLog

@ -1,3 +1,15 @@
2010-06-25 Robert Larice
* src/frontend/com_hardcopy.c,
* src/maths/sparse/spbuild.c,
* src/maths/sparse/spfactor.c,
* src/maths/sparse/spoutput.c,
* src/maths/sparse/spsolve.c,
* src/maths/sparse/sputils.c,
* src/spicelib/analysis/dcop.c,
* src/spicelib/parser/inppas1.c,
* src/xspice/ipc/ipcsockets.c :
remove redundant nested function declarations
2010-06-25 Robert Larice 2010-06-25 Robert Larice
* src/frontend/hpgl.h, * src/frontend/hpgl.h,
* src/frontend/parser/glob.c, * src/frontend/parser/glob.c,

1
src/frontend/com_hardcopy.c

@ -27,7 +27,6 @@ void
com_hardcopy(wordlist *wl) com_hardcopy(wordlist *wl)
{ {
char *buf2; char *buf2;
wordlist *process(wordlist *wlist);
char *fname; char *fname;
char buf[BSIZE_SP], device[BSIZE_SP]; char buf[BSIZE_SP], device[BSIZE_SP];
bool tempf = FALSE; bool tempf = FALSE;

7
src/maths/sparse/spbuild.c

@ -185,8 +185,6 @@ spFindElement( void *eMatrix, int Row, int Col )
{ {
MatrixPtr Matrix = (MatrixPtr)eMatrix; MatrixPtr Matrix = (MatrixPtr)eMatrix;
RealNumber *pElement; RealNumber *pElement;
ElementPtr spcFindElementInCol();
void Translate();
/* Begin `spFindElement'. */ /* Begin `spFindElement'. */
assert( IS_SPARSE( Matrix ) AND Row >= 0 AND Col >= 0 ); assert( IS_SPARSE( Matrix ) AND Row >= 0 AND Col >= 0 );
@ -270,8 +268,6 @@ spGetElement(void *eMatrix, int Row, int Col)
{ {
MatrixPtr Matrix = (MatrixPtr)eMatrix; MatrixPtr Matrix = (MatrixPtr)eMatrix;
RealNumber *pElement; RealNumber *pElement;
ElementPtr spcFindElementInCol();
void Translate();
/* Begin `spGetElement'. */ /* Begin `spGetElement'. */
assert( IS_SPARSE( Matrix ) && Row >= 0 && Col >= 0 ); assert( IS_SPARSE( Matrix ) && Row >= 0 && Col >= 0 );
@ -371,7 +367,6 @@ spcFindElementInCol(MatrixPtr Matrix, ElementPtr *LastAddr,
int Row, int Col, int CreateIfMissing) int Row, int Col, int CreateIfMissing)
{ {
ElementPtr pElement; ElementPtr pElement;
ElementPtr spcCreateElement();
/* Begin `spcFindElementInCol'. */ /* Begin `spcFindElementInCol'. */
pElement = *LastAddr; pElement = *LastAddr;
@ -777,7 +772,7 @@ spcCreateElement(MatrixPtr Matrix, int Row, int Col,
ElementPtr *LastAddr, int Fillin) ElementPtr *LastAddr, int Fillin)
{ {
ElementPtr pElement, pLastElement; ElementPtr pElement, pLastElement;
ElementPtr pCreatedElement, spcGetElement(), spcGetFillin();
ElementPtr pCreatedElement;
/* Begin `spcCreateElement'. */ /* Begin `spcCreateElement'. */

16
src/maths/sparse/spfactor.c

@ -195,8 +195,7 @@ spOrderAndFactor(void *eMatrix, RealNumber RHS[], RealNumber RelThreshold,
MatrixPtr Matrix = (MatrixPtr)eMatrix; MatrixPtr Matrix = (MatrixPtr)eMatrix;
ElementPtr pPivot; ElementPtr pPivot;
int Step, Size, ReorderingRequired; int Step, Size, ReorderingRequired;
ElementPtr SearchForPivot();
RealNumber LargestInCol, FindLargestInCol();
RealNumber LargestInCol;
/* Begin `spOrderAndFactor'. */ /* Begin `spOrderAndFactor'. */
assert( IS_VALID(Matrix) && !Matrix->Factored); assert( IS_VALID(Matrix) && !Matrix->Factored);
@ -982,10 +981,6 @@ static ElementPtr
SearchForPivot( MatrixPtr Matrix, int Step, int DiagPivoting ) SearchForPivot( MatrixPtr Matrix, int Step, int DiagPivoting )
{ {
ElementPtr ChosenPivot; ElementPtr ChosenPivot;
ElementPtr SearchForSingleton();
ElementPtr QuicklySearchDiagonal();
ElementPtr SearchDiagonal();
ElementPtr SearchEntireMatrix();
/* Begin `SearchForPivot'. */ /* Begin `SearchForPivot'. */
@ -1087,7 +1082,7 @@ SearchForSingleton( MatrixPtr Matrix, int Step )
int I; int I;
long *pMarkowitzProduct; long *pMarkowitzProduct;
int Singletons; int Singletons;
RealNumber PivotMag, FindBiggestInColExclude();
RealNumber PivotMag;
/* Begin `SearchForSingleton'. */ /* Begin `SearchForSingleton'. */
/* Initialize pointer that is to scan through MarkowitzProduct vector. */ /* Initialize pointer that is to scan through MarkowitzProduct vector. */
@ -1521,7 +1516,6 @@ long MinMarkowitzProduct, *pMarkowitzProduct;
int I; int I;
ElementPtr ChosenPivot, pOtherInRow, pOtherInCol; ElementPtr ChosenPivot, pOtherInRow, pOtherInCol;
RealNumber Magnitude, LargestInCol, LargestOffDiagonal; RealNumber Magnitude, LargestInCol, LargestOffDiagonal;
RealNumber FindBiggestInColExclude();
/* Begin `QuicklySearchDiagonal'. */ /* Begin `QuicklySearchDiagonal'. */
ChosenPivot = NULL; ChosenPivot = NULL;
@ -1697,7 +1691,6 @@ SearchDiagonal( MatrixPtr Matrix, int Step )
RealNumber Magnitude, Ratio; RealNumber Magnitude, Ratio;
RealNumber RatioOfAccepted = 0; RealNumber RatioOfAccepted = 0;
RealNumber LargestInCol; RealNumber LargestInCol;
RealNumber FindBiggestInColExclude();
/* Begin `SearchDiagonal'. */ /* Begin `SearchDiagonal'. */
ChosenPivot = NULL; ChosenPivot = NULL;
@ -1827,7 +1820,6 @@ SearchEntireMatrix( MatrixPtr Matrix, int Step )
RealNumber Magnitude, LargestElementMag, Ratio; RealNumber Magnitude, LargestElementMag, Ratio;
RealNumber RatioOfAccepted = 0; RealNumber RatioOfAccepted = 0;
RealNumber LargestInCol; RealNumber LargestInCol;
RealNumber FindLargestInCol();
/* Begin `SearchEntireMatrix'. */ /* Begin `SearchEntireMatrix'. */
ChosenPivot = NULL; ChosenPivot = NULL;
@ -2089,7 +2081,6 @@ ExchangeRowsAndCols( MatrixPtr Matrix, ElementPtr pPivot, int Step )
{ {
int Row, Col; int Row, Col;
long OldMarkowitzProd_Step, OldMarkowitzProd_Row, OldMarkowitzProd_Col; long OldMarkowitzProd_Step, OldMarkowitzProd_Row, OldMarkowitzProd_Col;
ElementPtr spcFindElementInCol();
/* Begin `ExchangeRowsAndCols'. */ /* Begin `ExchangeRowsAndCols'. */
Row = pPivot->Row; Row = pPivot->Row;
@ -2717,7 +2708,6 @@ RealRowColElimination( MatrixPtr Matrix, ElementPtr pPivot )
ElementPtr pSub; ElementPtr pSub;
int Row; int Row;
ElementPtr pLower, pUpper; ElementPtr pLower, pUpper;
extern ElementPtr CreateFillin();
/* Begin `RealRowColElimination'. */ /* Begin `RealRowColElimination'. */
@ -2805,7 +2795,6 @@ ComplexRowColElimination( MatrixPtr Matrix, ElementPtr pPivot )
ElementPtr pSub; ElementPtr pSub;
int Row; int Row;
ElementPtr pLower, pUpper; ElementPtr pLower, pUpper;
ElementPtr CreateFillin();
/* Begin `ComplexRowColElimination'. */ /* Begin `ComplexRowColElimination'. */
@ -2976,7 +2965,6 @@ static ElementPtr
CreateFillin( MatrixPtr Matrix, int Row, int Col ) CreateFillin( MatrixPtr Matrix, int Row, int Col )
{ {
ElementPtr pElement, *ppElementAbove; ElementPtr pElement, *ppElementAbove;
ElementPtr spcCreateElement();
/* Begin `CreateFillin'. */ /* Begin `CreateFillin'. */

3
src/maths/sparse/spoutput.c

@ -599,7 +599,6 @@ spFileVector(void *eMatrix, char *File, RealVector RHS, RealVector iRHS)
MatrixPtr Matrix = (MatrixPtr)eMatrix; MatrixPtr Matrix = (MatrixPtr)eMatrix;
int I, Size, Err; int I, Size, Err;
FILE *pMatrixFile; FILE *pMatrixFile;
FILE *fopen();
/* Begin `spFileVector'. */ /* Begin `spFileVector'. */
assert( IS_SPARSE( Matrix ) && RHS != NULL); assert( IS_SPARSE( Matrix ) && RHS != NULL);
@ -688,7 +687,7 @@ spFileStats(void *eMatrix, char *File, char *Label)
ElementPtr pElement; ElementPtr pElement;
int NumberOfElements; int NumberOfElements;
RealNumber Data, LargestElement, SmallestElement; RealNumber Data, LargestElement, SmallestElement;
FILE *pStatsFile, *fopen();
FILE *pStatsFile;
/* Begin `spFileStats'. */ /* Begin `spFileStats'. */
assert( IS_SPARSE( Matrix ) ); assert( IS_SPARSE( Matrix ) );

2
src/maths/sparse/spsolve.c

@ -133,7 +133,6 @@ spSolve(void *eMatrix, RealVector RHS, RealVector Solution,
RealNumber Temp; RealNumber Temp;
int I, *pExtOrder, Size; int I, *pExtOrder, Size;
ElementPtr pPivot; ElementPtr pPivot;
void SolveComplexMatrix();
/* Begin `spSolve'. */ /* Begin `spSolve'. */
assert( IS_VALID(Matrix) && IS_FACTORED(Matrix) ); assert( IS_VALID(Matrix) && IS_FACTORED(Matrix) );
@ -410,7 +409,6 @@ spSolveTransposed(void *eMatrix, RealVector RHS, RealVector Solution,
int I, *pExtOrder, Size; int I, *pExtOrder, Size;
ElementPtr pPivot; ElementPtr pPivot;
RealNumber Temp; RealNumber Temp;
void SolveComplexTransposedMatrix();
/* Begin `spSolveTransposed'. */ /* Begin `spSolveTransposed'. */
assert( IS_VALID(Matrix) && IS_FACTORED(Matrix) ); assert( IS_VALID(Matrix) && IS_FACTORED(Matrix) );

2
src/maths/sparse/sputils.c

@ -582,7 +582,6 @@ spMultiply(void *eMatrix, RealVector RHS, RealVector Solution,
RealNumber Sum; RealNumber Sum;
int I, *pExtOrder; int I, *pExtOrder;
MatrixPtr Matrix = (MatrixPtr)eMatrix; MatrixPtr Matrix = (MatrixPtr)eMatrix;
extern void ComplexMatrixMultiply();
/* Begin `spMultiply'. */ /* Begin `spMultiply'. */
assert( IS_SPARSE( Matrix ) && !Matrix->Factored ); assert( IS_SPARSE( Matrix ) && !Matrix->Factored );
@ -729,7 +728,6 @@ spMultTransposed(void *eMatrix, RealVector RHS, RealVector Solution,
RealNumber Sum; RealNumber Sum;
int I, *pExtOrder; int I, *pExtOrder;
MatrixPtr Matrix = (MatrixPtr)eMatrix; MatrixPtr Matrix = (MatrixPtr)eMatrix;
extern void ComplexTransposedMatrixMultiply();
/* Begin `spMultTransposed'. */ /* Begin `spMultTransposed'. */
assert( IS_SPARSE( Matrix ) && !Matrix->Factored ); assert( IS_SPARSE( Matrix ) && !Matrix->Factored );

1
src/spicelib/analysis/dcop.c

@ -21,7 +21,6 @@ Modified: 2000 AlansFixes
int int
DCop(CKTcircuit *ckt, int notused) DCop(CKTcircuit *ckt, int notused)
{ {
int CKTload(CKTcircuit *ckt);
int converged; int converged;
int error; int error;
IFuid *nameList; /* va: tmalloc'ed list */ IFuid *nameList; /* va: tmalloc'ed list */

1
src/spicelib/parser/inppas1.c

@ -17,7 +17,6 @@ Author: 1985 Thomas L. Quarles
void INPpas1(void *ckt, card * deck, INPtables * tab) void INPpas1(void *ckt, card * deck, INPtables * tab)
{ {
card *current; card *current;
char *INPdomodel(void *ckt, card * image, INPtables * tab);
char *temp, *thisline; char *temp, *thisline;
for (current = deck; current != NULL; current = current->nextcard) { for (current = deck; current != NULL; current = current->nextcard) {

2
src/xspice/ipc/ipcsockets.c

@ -171,8 +171,6 @@ Ipc_Status_t ipc_transport_initialize_server (server_name, mode, protocol,
unsigned 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 */ unsigned int port_num; /* Port number converted from server_name */
Ipc_Status_t ipc_get_line ();
/* assert (protocol == IPC_PROTOCOL_V2); */ /* allow v1 protocol - wbk */ /* assert (protocol == IPC_PROTOCOL_V2); */ /* allow v1 protocol - wbk */
assert (sock_state == IPC_SOCK_UNINITIALIZED); assert (sock_state == IPC_SOCK_UNINITIALIZED);

Loading…
Cancel
Save