struct member devdep, use void* instead of char*
This commit is contained in:
parent
b2aae741a0
commit
d6353fb9ee
18
ChangeLog
18
ChangeLog
|
|
@ -1,3 +1,21 @@
|
|||
2010-10-24 Robert Larice
|
||||
* src/frontend/hpgl.c ,
|
||||
* src/frontend/plotting/plot5.c ,
|
||||
* src/frontend/plotting/x11.c ,
|
||||
* src/frontend/postsc.c ,
|
||||
* src/frontend/wdisp/windisp.c ,
|
||||
* src/frontend/wdisp/winprint.c ,
|
||||
* src/include/graph.h ,
|
||||
* src/tclspice.c :
|
||||
struct member devdep, use void* instead of char*
|
||||
|
||||
2010-10-24 Robert Larice
|
||||
* src/frontend/help/readhelp.c ,
|
||||
* src/ngmultidec.c ,
|
||||
* src/tclspice.c :
|
||||
tmalloc usage, drop explicit (unsigned) cast
|
||||
later to be reinstated in a tmalloc wrapper macro
|
||||
|
||||
2010-10-24 Robert Larice
|
||||
* src/frontend/com_display.c ,
|
||||
* src/frontend/device.c ,
|
||||
|
|
|
|||
|
|
@ -118,9 +118,9 @@ GRAPH *graph)
|
|||
|
||||
hcopygraphid = graph->graphid;
|
||||
|
||||
if (!(plotfile = fopen(graph->devdep, "w"))) {
|
||||
perror(graph->devdep);
|
||||
graph->devdep = (char *) NULL;
|
||||
if (!(plotfile = fopen((char*) graph->devdep, "w"))) {
|
||||
perror((char*) graph->devdep);
|
||||
graph->devdep = NULL;
|
||||
return(1);
|
||||
}
|
||||
|
||||
|
|
@ -154,7 +154,7 @@ GRAPH *graph)
|
|||
if (!screenflag)
|
||||
#endif
|
||||
|
||||
graph->devdep = (char*) tmalloc(sizeof(GLdevdep));
|
||||
graph->devdep = (GLdevdep*) tmalloc(sizeof(GLdevdep));
|
||||
DEVDEP(graph).lastlinestyle = -1;
|
||||
DEVDEP(graph).lastx = -1;
|
||||
DEVDEP(graph).lasty = -1;
|
||||
|
|
|
|||
|
|
@ -40,9 +40,9 @@ int
|
|||
Plt5_NewViewport(GRAPH *graph)
|
||||
{
|
||||
|
||||
if (!(plotfile = fopen(graph->devdep, "w"))) {
|
||||
graph->devdep = (char *) NULL;
|
||||
perror(graph->devdep);
|
||||
if (!(plotfile = fopen((char*) graph->devdep, "w"))) {
|
||||
graph->devdep = NULL;
|
||||
perror((char*) graph->devdep);
|
||||
return(1);
|
||||
}
|
||||
|
||||
|
|
@ -77,7 +77,7 @@ Plt5_NewViewport(GRAPH *graph)
|
|||
}
|
||||
|
||||
/* set to NULL so graphdb doesn't incorrectly de-allocate it */
|
||||
graph->devdep = (char *) NULL;
|
||||
graph->devdep = NULL;
|
||||
|
||||
return(0);
|
||||
|
||||
|
|
|
|||
|
|
@ -366,7 +366,7 @@ X11_NewViewport(GRAPH *graph)
|
|||
};
|
||||
int trys;
|
||||
|
||||
graph->devdep = (char*) tmalloc(sizeof(X11devdep));
|
||||
graph->devdep = (X11devdep*) tmalloc(sizeof(X11devdep));
|
||||
|
||||
/* set up new shell */
|
||||
DEVDEP(graph).shell = XtCreateApplicationShell("shell",
|
||||
|
|
|
|||
|
|
@ -168,9 +168,9 @@ PS_NewViewport(GRAPH *graph)
|
|||
int x1,x2,y1,y2;
|
||||
hcopygraphid = graph->graphid;
|
||||
/* devdep initially contains name of output file */
|
||||
if (!(plotfile = fopen(graph->devdep, "w"))) {
|
||||
perror(graph->devdep);
|
||||
graph->devdep = (char *) NULL;
|
||||
if (!(plotfile = fopen((char*)graph->devdep, "w"))) {
|
||||
perror((char*)graph->devdep);
|
||||
graph->devdep = NULL;
|
||||
return(1);
|
||||
}
|
||||
|
||||
|
|
@ -218,7 +218,7 @@ PS_NewViewport(GRAPH *graph)
|
|||
fprintf(plotfile, "/%s findfont %d scalefont setfont\n\n",
|
||||
psfont, (int) (fontsize * scale));
|
||||
|
||||
graph->devdep = (char*) tmalloc(sizeof(PSdevdep));
|
||||
graph->devdep = (PSdevdep*) tmalloc(sizeof(PSdevdep));
|
||||
DEVDEP(graph).lastlinestyle = -1;
|
||||
DEVDEP(graph).lastcolor = -1;
|
||||
DEVDEP(graph).lastx = -1;
|
||||
|
|
|
|||
|
|
@ -587,7 +587,7 @@ int WIN_NewViewport( GRAPH * graph)
|
|||
/* allocate device dependency info */
|
||||
wd = calloc(1, sizeof(tWindowData));
|
||||
if (!wd) return 1;
|
||||
graph->devdep = (char *)wd;
|
||||
graph->devdep = wd;
|
||||
|
||||
/* Create the window */
|
||||
i = GetSystemMetrics( SM_CYSCREEN) / 3;
|
||||
|
|
|
|||
|
|
@ -242,7 +242,7 @@ int WPRINT_NewViewport( GRAPH * graph)
|
|||
/* Device dep. Info allocieren */
|
||||
pd = calloc(1, sizeof(tPrintData));
|
||||
if (!pd) return 1;
|
||||
graph->devdep = (char *)pd;
|
||||
graph->devdep = pd;
|
||||
|
||||
/* Setze den Color-Index */
|
||||
pd->ColorIndex = 0;
|
||||
|
|
|
|||
|
|
@ -126,7 +126,7 @@ struct graph {
|
|||
/* Space here is allocated by NewViewport
|
||||
and de-allocated by DestroyGraph.
|
||||
*/
|
||||
char *devdep;
|
||||
void *devdep;
|
||||
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -1343,7 +1343,7 @@ int sp_Tk_Init(void) {
|
|||
int sp_Tk_NewViewport(GRAPH *graph) {
|
||||
const char *result;
|
||||
int width, height, fontwidth, fontheight;
|
||||
graph->devdep = (char *) NULL;
|
||||
graph->devdep = NULL;
|
||||
|
||||
if(Tcl_GlobalEval(spice_interp,"spice_gr_NewViewport") != TCL_OK) {
|
||||
Tcl_ResetResult(spice_interp);
|
||||
|
|
|
|||
Loading…
Reference in New Issue