fix various type glitches
This commit is contained in:
parent
2744462d01
commit
59d4e5d961
|
|
@ -1,3 +1,11 @@
|
||||||
|
2010-07-04 Robert Larice
|
||||||
|
* src/frontend/evaluate.c : use void* instead of char* for anonymous data
|
||||||
|
* src/frontend/outitf.c : use a rescasted parameter
|
||||||
|
* src/frontend/outitf.h : make use of the existing enum GRIDTYPE
|
||||||
|
* src/frontend/variable.c : add missing casts
|
||||||
|
* src/spicelib/analysis/ckti2nod.c : drop an useless cast
|
||||||
|
* src/include/hlpdefs.h : use the struct name instead of the typedef name
|
||||||
|
|
||||||
2010-07-04 Robert Larice
|
2010-07-04 Robert Larice
|
||||||
* src/maths/sparse/spdefs.h :
|
* src/maths/sparse/spdefs.h :
|
||||||
fix the type of an ancient anonymous pointer from char* to void*
|
fix the type of an ancient anonymous pointer from char* to void*
|
||||||
|
|
|
||||||
|
|
@ -803,7 +803,8 @@ apply_func(struct func *func, struct pnode *arg)
|
||||||
struct dvec *v, *t, *newv = NULL, *end = NULL;
|
struct dvec *v, *t, *newv = NULL, *end = NULL;
|
||||||
int len, i;
|
int len, i;
|
||||||
short type;
|
short type;
|
||||||
char *data, buf[BSIZE_SP];
|
void *data;
|
||||||
|
char buf[BSIZE_SP];
|
||||||
|
|
||||||
/* Special case. This is not good -- happens when vm(), etc are used
|
/* Special case. This is not good -- happens when vm(), etc are used
|
||||||
* and it gets caught as a user-definable function. Usually v()
|
* and it gets caught as a user-definable function. Usually v()
|
||||||
|
|
|
||||||
|
|
@ -460,7 +460,7 @@ OUTpData(void *plotPtr, IFvalue *refValue, IFvalue *valuePtr)
|
||||||
|
|
||||||
if (run->writeOut) {
|
if (run->writeOut) {
|
||||||
if (run->pointCount == 1)
|
if (run->pointCount == 1)
|
||||||
fileInit_pass2(plotPtr);
|
fileInit_pass2(run);
|
||||||
fileStartPoint(run->fp, run->binary, run->pointCount);
|
fileStartPoint(run->fp, run->binary, run->pointCount);
|
||||||
|
|
||||||
if (run->refIndex != -1) {
|
if (run->refIndex != -1) {
|
||||||
|
|
@ -689,7 +689,7 @@ OUTattributes(void *plotPtr, IFuid varName, int param, IFvalue *value)
|
||||||
{
|
{
|
||||||
runDesc *run = (runDesc *) plotPtr;
|
runDesc *run = (runDesc *) plotPtr;
|
||||||
struct dvec *d;
|
struct dvec *d;
|
||||||
int type;
|
GRIDTYPE type;
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
if (param == OUT_SCALE_LIN)
|
if (param == OUT_SCALE_LIN)
|
||||||
|
|
|
||||||
|
|
@ -8,7 +8,7 @@
|
||||||
typedef struct dataDesc {
|
typedef struct dataDesc {
|
||||||
char *name; /* The name of the vector. */
|
char *name; /* The name of the vector. */
|
||||||
int type; /* The type. */
|
int type; /* The type. */
|
||||||
int gtype; /* default plot scale */
|
GRIDTYPE gtype; /* default plot scale */
|
||||||
bool regular; /* Is this given to us? */
|
bool regular; /* Is this given to us? */
|
||||||
int outIndex; /* If regular then the index. */
|
int outIndex; /* If regular then the index. */
|
||||||
char *specName; /* The device name if special. */
|
char *specName; /* The device name if special. */
|
||||||
|
|
|
||||||
|
|
@ -583,7 +583,7 @@ cp_getvar(char *name, int type, void *retval)
|
||||||
char *s;
|
char *s;
|
||||||
s = cp_unquote(v->va_string);
|
s = cp_unquote(v->va_string);
|
||||||
cp_wstrip(s);
|
cp_wstrip(s);
|
||||||
(void) strcpy(retval, s);
|
(void) strcpy((char*) retval, s);
|
||||||
tfree(s);/*DG*/
|
tfree(s);/*DG*/
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
@ -617,11 +617,11 @@ cp_getvar(char *name, int type, void *retval)
|
||||||
free_struct_variable(uv1);
|
free_struct_variable(uv1);
|
||||||
return (TRUE);
|
return (TRUE);
|
||||||
} else if ((type == VT_STRING) && (v->va_type == VT_NUM)) {
|
} else if ((type == VT_STRING) && (v->va_type == VT_NUM)) {
|
||||||
(void) sprintf(retval, "%d", v->va_num);
|
(void) sprintf((char*) retval, "%d", v->va_num);
|
||||||
free_struct_variable(uv1);
|
free_struct_variable(uv1);
|
||||||
return (TRUE);
|
return (TRUE);
|
||||||
} else if ((type == VT_STRING) && (v->va_type == VT_REAL)) {
|
} else if ((type == VT_STRING) && (v->va_type == VT_REAL)) {
|
||||||
(void) sprintf(retval, "%f", v->va_real);
|
(void) sprintf((char*) retval, "%f", v->va_real);
|
||||||
free_struct_variable(uv1);
|
free_struct_variable(uv1);
|
||||||
return (TRUE);
|
return (TRUE);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -39,7 +39,7 @@ typedef struct toplink {
|
||||||
char *description; /* really the subject */
|
char *description; /* really the subject */
|
||||||
fplace *place;
|
fplace *place;
|
||||||
struct toplink *next;
|
struct toplink *next;
|
||||||
button button;
|
struct button button;
|
||||||
} toplink;
|
} toplink;
|
||||||
|
|
||||||
typedef struct topic {
|
typedef struct topic {
|
||||||
|
|
|
||||||
|
|
@ -59,7 +59,7 @@ CKTinst2Node(void *ckt, void *instPtr, int terminal, CKTnode **node, IFuid *node
|
||||||
for(here = ((CKTcircuit*)ckt)->CKTnodes;here;here = here->next) {
|
for(here = ((CKTcircuit*)ckt)->CKTnodes;here;here = here->next) {
|
||||||
if(here->number == nodenum) {
|
if(here->number == nodenum) {
|
||||||
/* found it */
|
/* found it */
|
||||||
*node = (void*) here;
|
*node = here;
|
||||||
*nodeName = here->name;
|
*nodeName = here->name;
|
||||||
return(OK);
|
return(OK);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue