============================================= Creating a package from C Function Prototypes ============================================= There are two tools for creating Package definitions, one for the VMS CLI and one for the Portable Grammar. The pack_headers_cli.tpu file contains routines that allow C function prototypes to be converted to LSE package, routine, and parameter definitions, in the VMS CLI (the file pack_headers_port.tpu is for the Portable Grammar). The function prototypes must be in ANSI C format; i.e., {function name} ({data type} {variable name},...) The specific syntax that is parsed by the tool may be found in the source files. The tools were primarily used for creating packages for the VMS POSIX callable interface and the standard C library, given their header files. Though the tools have been used extensively, there still remain a few major bugs (a list of these bugs may be found below). For the most part, the tools are successful in parsing the function prototypes. In order to create files containing function prototypes, the user must pre-process header files with the correct macros pre-defined. The result may be stored in any number of files. =========================== Using the Package Generator =========================== The tools may be used by calling the TPU routine package_header_files using either one of the source files. This may be done by either invoking LSE with the appropriate TPU command file (or its section file) or invoking EVE/TPU with the command file (or section file). Then, after calling the routine PACKAGE_HEADER_FILES, the user must respond to a series of prompts requesting information about the package being created. The following is a list of information to be given: Package Name : {name of the package/library being created} Help Library : {absolute file spec. of .help file associated with the package} Output File : {absolute file spec. of resulting definitions -- must be a .lse file} Library File : {Absolute file spec. of input file containing function prototypes, in order to stop entering library files, press carriage return} The result will be the specified file containing a package definition, along with routine and parameter definitions, in the LSE portable grammar. The file may be used to create a LSE environment file, which then may allow one to use the routines and parameters with the C language. ==================================== Bug Reports And Current List Of Bugs ==================================== All bug reports may be sent to the location of all other LSE bugs. The current list of bugs for the LSE Package Generator (both source files) includes the following: * Cannot parse parameters that contain multiple array indices; e.g, foo[][]... * Dummy variable name must be given in proto-type. * Does not identify "char{more than one white space}*" as a reference parameter.