Museum

Home

Lab Overview

Retrotechnology Articles

⇒ Online Manual

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

UilDumpSymbolTable(3Xm)

uil(1X)

Uil(3Xm)  —  UNIX Programmer’s Manual

NAME

Uil - invokes the uil compiler from within an application. 

SYNOPSIS

#include <uil/UilDef.h>
Uil_status_type Uil(command_desc, compile_desc, message_cb, message_data,

status_cb, status_data)

Uil_command_type ∗command_desc;
Uil_compile_desc_type ∗compile_desc;
Uil_continue_type (∗message_cb) ();
char ∗message_data;
Uil_continue_type (∗status_cb) ();
char ∗status_data;

DESCRIPTION

The Uil function provides a callable entry point for the uil compiler. The Uil callable interface can be used to process a uil source file and to generate uid files, as well as return a detailed description of the uil source module in the form of a symbol table (parse tree). 

command_descSpecifies the uil command line. 

compile_descReturns the results of the compilation. 

message_cbSpecifies a callback function that is called when the compiler encounters errors in the uil source. 

message_dataSpecifies user data that is passed to the message callback function (message_cb). Note that this argument is not interpreted by uil, and is used exclusively by the calling application. 

status_cbSpecifies a callback function that is called to allow X applications to service X events such as updating the screen.  This function is called at various check points, which have been hard coded into the uil compiler.  The status_update_delay argument in command_desc specifies the number of check points to be passed before the status_cb function is invoked. 

status_dataSpecifies user data that is passed to the status callback function (status_cb). Note that this argument is not interpreted by the uil compiler, and is used exclusively by the calling application. 

The data structures Uil_command_type and Uil_compile_desc_type are detailed below. 

typedef struct Uil_command_type {

char ∗source_file; /∗ single source
char ∗resource_file; /∗ name of output file ∗/
char ∗listing_file; /∗ name of listing file ∗/
unsigned int ∗include_dir_count; /∗ number of directories in ∗/

/∗ include_dir array ∗/

char ∗((∗include_dir) []); /∗ directory to search for ∗/

/∗ include files ∗/

unsigned listing_file_flag: 1; /∗ produce a listing ∗/
unsigned resource_file_flag: 1; /∗ generate UID output ∗/
unsigned machine_code_flag: 1; /∗ generate machine code ∗/
unsigned report_info_msg_flag: 1; /∗ report info messages ∗/
unsigned report_warn_msg_flag: 1; /∗ report warnings ∗/
unsigned parse_tree_flag: 1; /∗ generate parse tree ∗/
unsigned int status_update_delay; /∗ number of times a status ∗/

/∗ point is passed before ∗/
/∗ calling status_cb function ∗/
/∗ 0 means called every time ∗/

};

typedef struct Uil_compile_desc_type {

unsigned int compiler_version; /∗ version number of compiler ∗/
unsigned int data_version; /∗ version number of structures ∗/
char ∗parse_tree_root; /∗ parse tree output ∗/
unsigned int message_count [Uil_k_max_status+1]; /∗ array of severity counts /∗
};

RETURN VALUE

This function returns one of these status return constants:

Uil_k_success_statusThe operation succeeded. 

Uil_k_info_statusThe operation succeeded, and an informational message is returned. 

Uil_k_warning_statusThe operation succeeded, and a warning message is returned. 

Uil_k_error_statusThe operation failed due to an error. 

Uil_k_severe_statusThe operation failed due to an error. 

RELATED INFORMATION

UilDumpSymbolTable(3Xm), uil(1X)

7th Edition

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026