Function: addpgdrv Purpose: specify a loadable device driver for PGPLOT Category: PLOTTING File: pgdriv.src Author: J.P. Terlouw Use: #include "addpgdrv.h" int addpgdrv(driver, name, hardcopy, width, height, hoff, voff); driver : pointer to the driver function. void(*)() name : PGPLOT 'device' name. char * hardcopy: command to print hardcopy (if hardcopy device) or name of physical device. char * width : width of device in milli-inches. int * height : height of device in milli-inches. int * hoff : horizontal offset in milli-inches. int * voff : vertical offset in milli-inches. int * This function can only be called from C. Arguments hardcopy, width, height, hoffset and voffset are optional, i.e. they can be specified as NULL pointers. The return value is currently always zero. Description: addpgdrv allows a program to extend PGPLOT's set of drivers with one or more drivers local to the calling program. The driver to be added must follow the calling convention as defined in grexec.dc3. Adding drivers must be done before any other PGPLOT routine is called. Example: void mydriver( fint *idev , /* cpl device id */ fint *ifunc , /* function */ float *rbuf , /* float buffer */ fint *nbuf , /* # of floats */ fchar chr , /* character buffer */ fint *lchr ) /* number of characters */ { . . /* actual driver code */ . } status = addpgdrv(mydriver, "MYOWN", NULL, NULL, NULL, NULL, NULL); . . status = pgbeg_c(&unit, tofchar("MYOWN"), &nxsub, &nysub); . . Related documents: grexec.dc3, grdevices.doc, pgbeg.dc2. Updates: Jan 28, 1997: JPT Document created.