FLAMCLE/P-API
Command Line Executor/Parser Application Programming Interface
|
Function prototype definitions for call backs used by CLP. More...
Typedefs | |
typedef int() | TfF2S(void *pvGbl, void *pvHdl, const char *pcFil, char **ppBuf, int *piBuf, char *pcMsg, const int siMsg) |
Type definition for string to file call back function. More... | |
typedef int() | TfSaf(void *pvGbl, void *pvHdl, const char *pcVal) |
Type definition for resource access check. More... | |
typedef int() | TfClpPrintPage(void *pvHdl, const int siLev, const char *pcHdl, const char *pcPat, const char *pcFil, const char *pcOrg, const char *pcPge) |
Function 'prnHtmlDoc' of library 'libhtmldoc' called if built-in function HTMLDOC used. More... | |
Function prototype definitions for call backs used by CLP.
typedef int() TfF2S(void *pvGbl, void *pvHdl, const char *pcFil, char **ppBuf, int *piBuf, char *pcMsg, const int siMsg) |
Type definition for string to file call back function.
Read a file using the specified filename and reads the whole content into the supplied buffer. The buffer is reallocated and buffer size updated, if necessary.
[in] | pvGbl | Pointer to to the global handle as black box given with CleExecute |
[in] | pvHdl | Pointer to a handle given for this callback |
[in] | pcFil | File name to read |
[in,out] | ppBuf | Pointer to a buffer pointer for reallocation |
[in,out] | piBuf | Pointer to the buffer size (updated after reallocation) |
[out] | pcMsg | Pointer to a buffer for the error message |
[in] | siMsg | Size of the message buffer (should be 1024) |
typedef int() TfSaf(void *pvGbl, void *pvHdl, const char *pcVal) |
Type definition for resource access check.
The function is called with the complete path and the standard lexeme as value in front of each wrte of data to the CLP structure.
[in] | pvGbl | Pointer to to the global handle as black box given with CleExecute |
[in] | pvHdl | Pointer to a handle given for this callback |
[in] | pcVal | Path=Value as resource |
typedef int() TfClpPrintPage(void *pvHdl, const int siLev, const char *pcHdl, const char *pcPat, const char *pcFil, const char *pcOrg, const char *pcPge) |
Function 'prnHtmlDoc' of library 'libhtmldoc' called if built-in function HTMLDOC used.
The built-in function HTMLDOC use a service provider interface to create the documentation using a callback function for each page/chapter. This is this callback function. This interface is used with the function siClpPrintDocu() below. The function is called for each page/chapter and the pointer to the original manual page (pcOrg) can be used to determine if this page the first time printed or if the same page printed again. The HTML documentation can now use an link instead to print the same page again to reduce memory and redundancies in the document. The level can be used to insert Headlines to a dictionary, the path shows the real position and can be used to build files names. The path starts always with CLEP followed by COMMAND or OTHERCLP depending which tables are used. This prefix ensures uniqueness if it used for the file names. prepared page is in ASCIIDOC and must be converted to HTML. In this case the headline must be provided for the dictionary, the index terms for the index and other information can be used to build a very powerful HTML documentation.
[in,out] | pvHdl | Handle for the print callback function (e.G. from opnHtmlDoc) |
[in] | siLev | The hierarchical level for this page/chapter |
[in] | pcHdl | The headline of the current chapter |
[in] | pcPat | The path for the corresponding parameter (NULL if the page not inside a command or other CLP string) |
[in] | pcFil | Unique hierarchical string (can be used as file name (no extension)) |
[in] | pcOrg | The pointer to the original manual page (can be used to determine duplicates and produce links) |
[in] | pcPge | The prepared ASCIIDOC page for printing (must be converted to HTML) |