QQ Plot module library v4.0
Grafic output from Fortran- or C-programs.

To call module library from C-programs:

To interface with fortran modules the Fortran environment has to be initialized.

Call the initilization this way:

void g95_runtime_start(int argc, char *argv[]);

The arguments are argc=0 and argv=NULL.

At program termination the runtime environment must be closed this way:

void g95_runtime_stop();

To call the modules from C-programs add a leading underscore to the module names.

You will find further informations in the G95 description, if necessary.

Sample program:

extern "C" void qqopen_(float*,float*,char*,float*,float*);
extern "C" void qqpoint_(float*,float*);
extern "C" void qqline_(float*,float*);
extern "C" void qqclose_();
extern "C" void g95_runtime_start(int argc, char *argv[]);
extern "C" void g95_runtime_stop();
int main()
{
float ix, iy, scalex, scaley;
char outfile[14], *openarg;
int i;

i=0;
openarg=0;
g95_runtime_start(i, &openarg);
ix=1201.; iy=1001.;
scalex=1.; scaley=1.;
qqopen_(&ix,&iy,".\\qqtest.bmp\0",&scalex,&scaley);
ix=10.;iy=10.;
qqpoint_(&ix,&iy);
ix=1190.; iy=990.;
qqline_(&ix,&iy);
qqclose_();
g95_runtime_stop();
return 0;
}

Link libraries:

/path/qqmodlib.a
/F/G95/lib/gcc-lib/i686-pc-mingw32/4.0.3/libf95.a
/C/Dev-Cpp/lib/libws2_32.a

Description of the different modules
Please note that the module name has to be followed by an underscore

All output to stdout leads in one customizable module:

#include <stdio.h>
extern "C" void qqprint_ (char cformat[])
{
printf("%s\n",cformat);
return;
}

If necessary ou will find more information in the G95 description.