gpp4
1.3.1
|
Utilies to set and fetch program information. More...
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <time.h>
#include "ccp4_program.h"
#include "ccp4_parser.h"
#include "ccp4_utils.h"
#include "ccp4_general.h"
Functions | |
char * | ccp4_prog_vers (const char *progvers) |
char * | ccp4ProgramName (const char *progname) |
char * | ccp4RCSDate (const char *rcs_string) |
void | ccp4ProgramTime (int init) |
int | ccp4VerbosityLevel (int level) |
int | ccp4Callback (CCP4INTFUNCPTR mycallback, char *mode, int ierr, char *message) |
int | ccp4SetCallback (CCP4INTFUNCPTR mycallback) |
int | ccp4InvokeCallback (int ierr, char *message) |
int | ccp4NullCallback (int level, char *message) |
int | ccp4_licence_exists (const char *name) |
int | html_log_output (int ihtml_in) |
int | summary_output (int isumm_in) |
Utilies to set and fetch program information.
int ccp4_licence_exists | ( | const char * | name | ) |
Check existence of licence agreement
name | Name of licence, e.g. "CCP4". |
char* ccp4_prog_vers | ( | const char * | progvers | ) |
Register or query program version.
progvers | Program version string, or NULL to query existing value. |
References MAXLEN_PROGVERSION.
Referenced by ccp4_banner(), and ccp4fyp().
int ccp4Callback | ( | CCP4INTFUNCPTR | mycallback, |
char * | mode, | ||
int | ierr, | ||
char * | message | ||
) |
Set or invoke a user-defined callback function. Internal function: applications should use the API functions ccp4SetCallback and ccp4InvokeCallback
References ccp4NullCallback().
Referenced by ccp4InvokeCallback(), and ccp4SetCallback().
int ccp4InvokeCallback | ( | int | ierr, |
char * | message | ||
) |
Execute the user-defined callback function (previously set up using ccp4SetCallback) with the supplied arguments. This is a wrapper to ccp4Callback in "invoke" mode.
References ccp4Callback(), and ccp4NullCallback().
int ccp4NullCallback | ( | int | level, |
char * | message | ||
) |
Default null callback function Internal function: this is the default callback function used by ccp4Callback if no user-defined function has been specified.
Referenced by ccp4Callback(), and ccp4InvokeCallback().
char* ccp4ProgramName | ( | const char * | progname | ) |
Set or return program name.
progname | Program name, or NULL to query existing value. |
Always returns a pointer to the program name If progname is not NULL then set the program name to progname.
References MAXLEN_PROGNAME.
Referenced by ccp4_banner(), ccp4fyp(), and ccperror_noexit().
void ccp4ProgramTime | ( | int | init | ) |
Set or print program time information
init | The timer is started when this routine is called with a non-zero argument. When the routine is called with a 0 argument, timing information is printed to stdout. |
References ccp4_utils_etime().
Referenced by ccp4fyp(), ccperror_noexit(), and FORTRAN_SUBR().
char* ccp4RCSDate | ( | const char * | rcs_string | ) |
Set or return program RCS date
rcs_string | Date string, or NULL to query existing value. |
If the input string is not a NULL pointer then it is assumed to be an RCS string This is processed to extract a date string in the form "DD/MM/YY" (day/month/year), which is then stored.
ccp4RCSDate always returns the currently stored date string.
References MAXLEN_RCSDATE.
int ccp4SetCallback | ( | CCP4INTFUNCPTR | mycallback | ) |
Store a pointer to a user-defined callback function of the form "int func(int, char *)" This is a wrapper to ccp4Callback in "set" mode.
References ccp4Callback().
int ccp4VerbosityLevel | ( | int | level | ) |
Set or return the reference verbosity level
level | Verbosity level, or -1 to query existing value. |
Referenced by ccp4fyp(), and ccp4printf().
int html_log_output | ( | int | ihtml_in | ) |
Register or query html output level.
ihtml_in | 0 = turn off html output, 1 = turn on html output, -1 = query existing value |
Referenced by ccperror_noexit().
int summary_output | ( | int | isumm_in | ) |
Register or query summary output level.
isumm_in | 0 = turn off summary output, 1 = turn on summary output, -1 = query existing value |
Referenced by ccperror_noexit().