Skip to content
Snippets Groups Projects
Commit 16118c9c authored by slevy's avatar slevy
Browse files

Cast kira_HRplot to avoid complaints.

Hack for gcc 3.0's stdio (#ifdef NEWSTDIO).
parent 598af55e
No related branches found
No related tags found
No related merge requests found
#ifdef USE_KIRA #ifdef USE_KIRA
#ifdef NEWSTDIO
#include <ostream.h> #include <ostream.h>
#include <istream.h> #include <istream.h>
#endif /*NEWSTDIO*/
#include "worldline.h" #include "worldline.h"
// #define CAVE 1 // NewN: use potentially-shared-memory malloc // #define CAVE 1 // NewN: use potentially-shared-memory malloc
...@@ -183,7 +186,9 @@ double kira_get( struct dyndata *dd, struct stuff *st, int what ) ...@@ -183,7 +186,9 @@ double kira_get( struct dyndata *dd, struct stuff *st, int what )
} }
int hasdata( ifstream *s, double maxwait ) { int hasdata( ifstream *s, double maxwait ) {
#ifdef OLDSTDIO #ifdef NEWSTDIO
return 1;
#else /*old stdio, where filebuf::fd() still existed*/
struct timeval tv; struct timeval tv;
fd_set fds; fd_set fds;
if(s == NULL) return 0; if(s == NULL) return 0;
...@@ -194,8 +199,6 @@ int hasdata( ifstream *s, double maxwait ) { ...@@ -194,8 +199,6 @@ int hasdata( ifstream *s, double maxwait ) {
FD_ZERO(&fds); FD_ZERO(&fds);
FD_SET(s->rdbuf()->fd(), &fds); FD_SET(s->rdbuf()->fd(), &fds);
return(select(s->rdbuf()->fd() + 1, &fds, NULL, NULL, &tv) > 0); return(select(s->rdbuf()->fd() + 1, &fds, NULL, NULL, &tv) > 0);
#else
return 1;
#endif #endif
} }
...@@ -315,7 +318,7 @@ int kira_open( struct dyndata *dd, struct stuff *st, char *filename, int readfla ...@@ -315,7 +318,7 @@ int kira_open( struct dyndata *dd, struct stuff *st, char *filename, int readfla
static char ytitle[] = "log L"; static char ytitle[] = "log L";
Fl_Plot *plot; Fl_Plot *plot;
plot = parti_register_plot( st, kira_HRplot, dd ); plot = parti_register_plot( st, (void (*)(Fl_Plot*,void*,void*))kira_HRplot, dd );
if(plot) { if(plot) {
if(plot->x0() == plot->x1()) if(plot->x0() == plot->x1())
plot->xrange( xrange[0], xrange[1] ); plot->xrange( xrange[0], xrange[1] );
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment