/* Declare all this genplot stuff.... */ #define _POSIX_SOURCE #define i586 #include /* Include Standard Libraries for i/o and such */ #include #include #include #include /* Include GENPLOT stuff */ #include #include #include /* Declare Functions..... */ /* UserExit() This function is called by GENPLOT when your user function is terminated (either by loading another function or exiting GENPLOT). It is responsible for saving the parameters (P and C array) to the macro file. It reads the P & C arrays from GENPLOT and also uses the value assigned to the string MacroName to decide which macro to save the parameter data to. */ int UserExit(void); /* float *GetGPArray(char *name) This function can be used to get an array of floats from GENPLOT. "name" should be the name of the GENPLOT array you wish to retrieve. GetGPArray returns and array of floats. */ float *GetGPArray(char *name); /* char *GetGPString(char *name) Returns the value of the string stored in "name". The returned string is in the form of a null terminated character array. */ char *GetGPString(char *name); /* void SetNumParams(int x) This should be called in you UserInit() function to make GPEXTEND aware of how many parameters (stored in the GENPLOT "P" array) your function uses. The value of "x" is used by UserExit() to determine how many parameters should be stored. */ void SetNumParams(int x); /* void SetNumConstants(int x) This should be called in your UserInit() function to make GPEXTEND aware of how many constants (stored in the GENPLOT "C" array) your function uses. The value of "x" is used by UserExit() to determine how many parameters should be stored. */ void SetNumConstants(int x); /* The following functions are used internally by GPEXTEND and should not be called inside of your user function. NOTE: CopyFile(char *source, char *dest) is not a general copy command! It only works with ASCII files that have no lines longer than 500 characters. */ int SaveGPParams(float *p, float *c, char *fname); void CopyFile(char *source, char *dest); void DeleteFile(char *fname);