acl_h

/*
**	Copyright 1998-2016, Fermi Research Alliance, LLC.  All rights reserved.
*/
/******************************************************************************/
/* acl.h
**
**	This file contains public definitions for ACL
**	(Accelerator Command Language).
**
**	V0.0	B S Hendricks				07-Apr-11
**	Created
**
*/
/******************************************************************************/

#ifndef ACL_DEFINED
#define	ACL_DEFINED

#include <stdio.h>
#include "cnsparam.h"
#include "cns_data_structs.h"
#include "clib.h"
#include "cbslib.h"
#include "diolib.h"

/******************************************************************************/
/* 
**	defined constants for argument values
*/
/******************************************************************************/

    #define	ACL_DB_DIR_TABLE	"appdb.hendricks.acl_file_dir"
    #define	ACL_DB_TABLE		"appdb.hendricks.acl_files"

/*
**  script source types ...
*/
    #define	ACL_SOURCE_CODE		0		/* ACL source code */
    #define	ACL_FLAT_FILE		1		/* ASCII text file */
    #define	ACL_DB_FILE		2		/* database table name from ACL_DB_TABLE */
    #define	ACL_COMPILED_CODE	3		/* compiled code */

/*
**  ACL data types ...
*/
    #define	ACL_DEFAULT_TYPE	-1		/* return data in the same format in which it is stored */
    #define	ACL_UNKNOWN_VALUE_TYPE	0		/* unknown value type */
    #define	ACL_FLOAT_VALUE		1		/* single precision floating point value */
    #define	ACL_INTEGER_VALUE	2		/* integer value */
    #define	ACL_STRING_VALUE	3		/* null terminated string value */
    #define	ACL_DOUBLE_VALUE	4		/* double precision floating point value */
    #define	ACL_DATE_VALUE		5		/* date value */
    #define	ACL_LOGICAL_VALUE	6		/* logical value */
    #define	ACL_ERROR_VALUE		7		/* ACNET error value */
    #define	ACL_DEVICE_INDEX_VALUE	8		/* device index value */
    #define	ACL_DEVICE_NAME_VALUE	9		/* device name value */
    #define	ACL_UNSIGNED_INT_VALUE	10		/* unsigned integer value */
    #define	ACL_OUTPUT_POSITION_VALUE	11	/* output position value */
    #define	ACL_INPUT_VALUE		12		/* user input value */
    #define	ACL_SHORT_INT_VALUE	13		/* short integer value */
    #define	ACL_NODE_VALUE		14		/* ACNET node value */
    #define	ACL_UNSIGNED_SHORT_VALUE	15	/* unsigned short value */
    #define	ACL_BYTE_VALUE		16		/* byte integer value */
    #define	ACL_UNSIGNED_BYTE_VALUE	17		/* unsigned byte value */
    #define	ACL_RTL_ERROR_VALUE	18		/* RTL error value */
    #define	ACL_SYSTEM_ERROR_VALUE	19		/* system error value */
    #define	ACL_COMPOUND_STRING_VALUE	20	/* compound string value */
    #define	ACL_DEVICE_VALUE	21		/* device reading value */
    #define	ACL_ACKNOWLEDGE_VALUE	22		/* user acknowledge value */
    #define	ACL_EVENT_VALUE		23		/* clock event value */
    #define	ACL_DEVICE_TEXT_VALUE	24		/* device text value */
    #define	ACL_DEVICE_UNITS_VALUE	25		/* device units text value */
    #define	ACL_LONG_LONG_VALUE	26		/* long long integer value */
    #define	ACL_ULONG_LONG_VALUE	27		/* unsigned long long integer value */
    #define	ACL_DEVICE_DATA_VALUE	28		/* device data value */
    #define	ACL_BINARY_VALUE	29		/* binary data value */

/*
**  length constants ...
*/
    #define	ACL_MAX_LINE_LENGTH		1008

    #define	ACL_MAX_STRING_VALUE_LEN	8192	/* maximum length of a string value */
    
    #define	ACL_ERROR_STRING_LEN		256	/* maximum length of an ACNET error string */
    #define	ACL_COMMAND_NAME_LEN		32	/* maximum length of an ACL command name string */
    #define	ACL_FUNCTION_NAME_LEN		32	/* maximum length of an ACL function name string */
    #define	ACL_VALUE_TYPE_NAME_LEN		32	/* maximum length of an ACL value type name string */

    #define	ACL_DB_FILE_NAME_LEN		32	/* maximum length of an ACL database file name */
    #define	ACL_DESCRIPTION_LEN		64	/* ACL file description length */
    #define	ACL_LONG_DESCRIPTION_LEN	252	/* ACL file long description length */

    #define	ACL_SYMBOL_NAME_LEN		32	/* maximum length of an ACL symbol name */

/*
**  standard symbols ...
*/
    #define	ACL_VALUE_SYMBOL	"_VALUE"	/* symbol which contains last assignment value */
    #define	ACL_STRING_SYMBOL	"_STRING"	/* symbol which contains last string assignment value */
    #define	ACL_STATUS_SYMBOL	"_STATUS"	/* symbol which contains status of last ACL command */
    #define	ACL_ERROR_STATUS_SYMBOL	"_ERROR_STATUS"	/* symbol which contains last status upon entering an error handler */
    #define	ACL_LAST_ERROR_STATUS_SYMBOL	"_LAST_ERROR_STATUS"	/* symbol which contains previous status upon entering an error handler */
    #define	ACL_ERROR_LINE_SYMBOL	"_ERROR_LINE"	/* symbol which contains line number where last error occurred */
    #define	ACL_ERROR_COMMAND_SYMBOL	"_ERROR_COMMAND"	/* symbol which contains the command type where last error occurred */
    #define	ACL_ERROR_STRING_SYMBOL	"_ERROR_STRING"	/* symbol which contains the current error string */
    #define	ACL_ERROR_DEVICE_SYMBOL	"_ERROR_DEVICE"	/* symbol which contains the last device index with a read/set error */
    #define	ACL_ERROR_COUNT_SYMBOL	"_ERROR_COUNT"	/* symbol which contains the current error count */
    #define	ACL_PENDING_COUNT_SYMBOL	"_PENDING_COUNT"	/* symbol which contains the current pending count */
    #define	ACL_GENERIC_ERROR_COUNT_SYMBOL	"_GENERIC_ERROR_COUNT"	/* symbol which contains the current generic error count */

/*
**  directory script types ...
*/
    #define	ACL_ALL_FILES		0		/* display all ACL files in menu */
    #define	ACL_PROTECTED_FILES	1		/* display only protected ACL files in menu */
    #define	ACL_NONSETTING_FILES	2		/* display only ACL files not containing settings in menu */

/*
**  output types ...
*/
    #define	ACL_OUTPUT_NONE		0		/* no output desired */
    #define	ACL_OUTPUT_DEFAULT	1		/* default output */
    #define	ACL_OUTPUT_VARIABLE	2		/* output to a variable */
    #define	ACL_OUTPUT_SYMBOL	3		/* output to a symbol */
    #define	ACL_OUTPUT_FILE		4		/* output to a text file */
    #define	ACL_OUTPUT_MAIL		5		/* output to a mail message */
    #define	ACL_OUTPUT_ERROR	6		/* output to standard error */
    #define	ACL_OUTPUT_BINARY_FILE	7		/* output to a binary file */
    #define	ACL_OUTPUT_SHARED_LOG	8		/* output to a shared log file */
    #define	ACL_OUTPUT_DATABASE	9		/* output to a database */
    #define	ACL_OUTPUT_FILE_APPEND	10		/* output to a text file (append mode) */
    #define	ACL_OUTPUT_BINARY_OVERWRITE	11	/* output to a binary file (overwrite mode) */
    #define	ACL_OUTPUT_PIPE		12		/* output to a pipe */
    #define	ACL_OUTPUT_STDOUT	13		/* force output to standard out */
    #define	ACL_OUTPUT_TEXT_DEVICE	14		/* output to a text device */
    #define	ACL_OUTPUT_PASTE_BUFFER	15		/* output to a console paste buffer */
    #define	ACL_OUTPUT_CONSOLE_LOG	16		/* output to a console log file */

/*
**  execution options ...
*/
    #define	ACL_OPT_NONE		0		/* no options selected */
    #define	ACL_OPT_PARSE_ONLY	1		/* parse, but do not execute code */
    #define	ACL_OPT_TIME_ORDER	2		/* arrange files in chronological order */
    #define	ACL_OPT_DELETE_SYMBOLS	4		/* delete all existing ACL symbols */
    #define	ACL_OPT_COMPILED_CODE	8		/* code has already been compiled */
    #define	ACL_OPT_INFO_PARSE	0x10		/* parse the code and generate information structures */
    #define	ACL_OPT_CANCEL_REQUESTS	0x20		/* cancel data requests */
    #define	ACL_OPT_FREE_MEMORY	0x40		/* free associated memory */
    #define	ACL_OPT_NO_STALE	0x80		/* suppress stale data errors */
    #define	ACL_OPT_DONT_CLOSE	0x100		/* don't close the ACL file */
    #define	ACL_OPT_SAVE_SOURCE	0x200		/* save source in compiled code */
    #define	ACL_OPT_CREATE_SYMBOL	0x400		/* create a new symbol if the requested one doesn't exist */
    #define	ACL_OPT_CLEAR_STATUS	0x800		/* clear global status symbols */
    #define	ACL_OPT_SUBST_ARRAY_DEVICES	0x1000	/* substitute device names can include array indices */
    #define	ACL_OPT_READ_VARIABLE	0x2000		/* read variables rather than symbols */
    #define	ACL_OPT_NO_SETS		0x4000		/* suppress settings */
    #define	ACL_OPT_VERBOSE_OUTPUT	0x8000		/* want verbose output */
    #define	ACL_OPT_DIAGNOSTIC_MODE	0x10000		/* enable diagnostic mode */
    #define	ACL_OPT_DB_DESCRIPTION	0x20000		/* want the database description */
    #define	ACL_OPT_SIMPLE_ERROR_STRINGS	0x40000	/* want simple error strings */
    #define	ACL_OPT_WANT_OUTPUT_STRINGS	0x80000	/* want output strings ($_output_strings) */
    #define	ACL_OPT_SUPPRESS_STDOUT	0x100000	/* suppress stdout */
    #define	ACL_OPT_SUPPRESS_NEWLINES	0x200000	/* suppress default new lines */
    #define	ACL_OPT_DEBUG_EXECUTION	0x400000	/* execute in debug mode */
    #define	ACL_OPT_DISABLE_SETTINGS	0x800000	/* disable settings */

/*
**  free options ...
*/
    #define	ACL_FREE_OPT_NONE		0	/* no options selected */
    #define	ACL_FREE_OPT_PRESERVE_INPUTS	1	/* preserve the current input information */
    #define	ACL_FREE_OPT_CANCEL_REQUESTS	0x20	/* cancel data requests */

/*
**  GUI options ...
*/
    #define	ACL_GUI_OPT_NONE		0	/* no options selected */
    #define	ACL_GUI_OPT_PERSISTENT_WINDOW	1	/* wait for user to dismiss window */

/*
**  output options ...
*/
    #define	ACL_OUTPUT_OPT_NONE		0	/* no options selected */
    #define	ACL_OUTPUT_OPT_NO_NEW_LINE	1	/* don't add a new line */

/*
**  execution modes ...
*/
    #define	ACL_MODE_IDLE		0
    #define	ACL_MODE_PARSE		1
    #define	ACL_MODE_EXECUTE	2
    #define	ACL_MODE_INFO_PARSE	3
    #define	ACL_MODE_PARSE_ONLY	4
    #define	ACL_MODE_DEBUG_EXECUTE	5
    #define	ACL_MODE_DEBUG_STEP	6

    #define	ACL_INTERRUPT_NOW	(-1)

/*
**  login info ...
*/
    #define	ACL_LOGIN_TYPE_UNKNOWN		0
    #define	ACL_LOGIN_TYPE_CONSOLE		1
    #define	ACL_LOGIN_TYPE_DATABASE		2

    #define	ACL_MAX_DB_USER_NAME_LEN	32
    #define	ACL_MAX_DB_PASSWORD_LEN		32

/*
**  command types ...
*/
#define	COMMAND_UNKNOWN			0
#define	COMMAND_DECLARE			1
#define	COMMAND_ASSIGNMENT		2
#define	COMMAND_READ_DEVICE		3
#define	COMMAND_SET_DEVICE		4
#define	COMMAND_INCREMENT_DEVICE	5
#define	COMMAND_DECREMENT_DEVICE	6
#define	COMMAND_LABEL			7
#define	COMMAND_GOTO			8
#define	COMMAND_GOSUB			9
#define	COMMAND_RETURN			10
#define	COMMAND_PRINT			11
#define	COMMAND_EXIT			12
#define	COMMAND_IF			13
#define	COMMAND_ELSEIF			14
#define	COMMAND_ELSE			15
#define	COMMAND_ENDIF			16
#define	COMMAND_LOOP			17
#define	COMMAND_ENDLOOP			18
#define	COMMAND_MAIL			19
#define	COMMAND_RUN			20
#define	COMMAND_SHOW_DEVICE		21
#define	COMMAND_WAIT			22
#define	COMMAND_LIST_DEVICE		23
#define	COMMAND_TIMEOUT			24
#define	COMMAND_SETTINGS		25
#define	COMMAND_LOCK			26
#define	COMMAND_UNLOCK			27
#define	COMMAND_WHILE			28
#define	COMMAND_ENDWHILE		29
#define	COMMAND_RESET_DEVICE		30
#define	COMMAND_TURN_DEVICE		31
#define	COMMAND_ENABLE			32
#define	COMMAND_DISABLE			33
#define	COMMAND_ACTIVATE		34
#define	COMMAND_DEACTIVATE		35
#define	COMMAND_ON_ERROR		36
#define	COMMAND_RETRY			37
#define	COMMAND_DATA_SOURCE		38
#define	COMMAND_CNSWIN			39
#define	COMMAND_URL_DISPLAY		40
#define	COMMAND_IMAGE_DRAW		41
#define	COMMAND_OUTPUT			42
#define	COMMAND_DATA_EVENT		43
#define	COMMAND_VERSION			44
#define	COMMAND_CH13_MESSAGE		45
#define	COMMAND_FILL_DEVICE		46
#define	COMMAND_RAMP_DEVICE		47
#define	COMMAND_TRIGGER			48
#define	COMMAND_TOGGLE_DEVICE		49
#define	COMMAND_RESTORE_DEVICE		50
#define	COMMAND_PROGRAM_LOG		51
#define	COMMAND_DOWNTIME_LOG		52
#define	COMMAND_ALARM_LOG		53
#define	COMMAND_DOWNLOAD		54
#define	COMMAND_DELETE_CACHE		55
#define	COMMAND_DEVICE_ARG_INFO		56
#define	COMMAND_STRING_ARG_INFO		57
#define	COMMAND_PROGRAM_INFO		58
#define	COMMAND_COMPARE_DEVICE		59
#define	COMMAND_COPY_DEVICE		60
#define	COMMAND_SYSTEM			61
#define	COMMAND_GPIB			62
#define	COMMAND_NODE_INFO		63
#define	COMMAND_NODE			64
#define	COMMAND_REBOOT			65
#define	COMMAND_SETTING_LOG		66
#define	COMMAND_ERROR_TEXT		67
#define	COMMAND_FIT			68
#define	COMMAND_USER_INFO		69
#define	COMMAND_CAMAC			70
#define	COMMAND_EXITLOOP		71
#define	COMMAND_CONTINUE		72
#define	COMMAND_SAVE_FILE		73
#define	COMMAND_BYPASS			74
#define	COMMAND_ALARM_LIMIT		75
#define	COMMAND_NOMINAL_MASK		76
#define	COMMAND_INPUT			77
#define	COMMAND_CONSOLE_INFO		78
#define	COMMAND_FFT			79
#define	COMMAND_FTP			80
#define	COMMAND_TIMER_EVENT		81
#define	COMMAND_STEP_MOTOR		82
#define	COMMAND_EVENT_INFO		83
#define	COMMAND_MDAT_INFO		84
#define	COMMAND_CALL_PROC		85
#define	COMMAND_SEARCH_DEVICE		86
#define	COMMAND_ON			87
#define	COMMAND_OFF			88
#define	COMMAND_POSITIVE		89
#define	COMMAND_NEGATIVE		90
#define	COMMAND_POLARITY		91
#define	COMMAND_DBSET			92
#define	COMMAND_LOG_DEVICE		93
#define	COMMAND_EVENT_LOG		94
#define	COMMAND_STATE_LOG		95
#define	COMMAND_DELTA_SET		96
#define	COMMAND_LOGGER_GET		97
#define	COMMAND_ACNET_REQUEST		98
#define	COMMAND_RESIZE			99
#define	COMMAND_FIND_PROGRAM		100
#define	COMMAND_SET_FIELD		101
#define	COMMAND_TIMER			102
#define	COMMAND_SHOT_LOG		103
#define	COMMAND_PATH			104
#define	COMMAND_DEVICE_LIST		105
#define	COMMAND_FTP_READ		106
#define	COMMAND_SNAP_READ		107
#define	COMMAND_WEB_LOG			108
#define	COMMAND_TCP_REQUEST		109
#define	COMMAND_DELETE			110
#define	COMMAND_READ_STRUCT		111
#define	COMMAND_READ_FIELD		112
#define	COMMAND_TABLE_DEVICE		113
#define	COMMAND_SDA_DIR			114
#define	COMMAND_SR_DIR			115
#define	COMMAND_STR_FORMAT		116
#define	COMMAND_STR_CAT			117
#define	COMMAND_STR_FIND		118
#define	COMMAND_STR_COMPARE		119
#define	COMMAND_SUBSTRING		120
#define	COMMAND_CLIB_INFO		121
#define	COMMAND_STR_CASE		122
#define	COMMAND_SDA_CONFIG		123
#define	COMMAND_UNESCAPE		124
#define	COMMAND_STR_TAIL		125
#define	COMMAND_STR_REPLACE		126
#define	COMMAND_STR_COPY		127
#define	COMMAND_STR_LENGTH		128
#define	COMMAND_STR_SPLIT		129
#define	COMMAND_SQL			130
#define	COMMAND_STR_CONVERT		131
#define	COMMAND_FSHARE_INFO		132
#define	COMMAND_STATS			133
#define	COMMAND_GAS			134
#define	COMMAND_CRATE			135
#define	COMMAND_SLOT			136
#define	COMMAND_MADC			137
#define	COMMAND_LIST_STRINGS		138
#define	COMMAND_FILE_INFO		139
#define	COMMAND_CPLD_LOG		140
#define	COMMAND_SET_LIST		141
#define	COMMAND_CHECK_STATUS		142
#define	COMMAND_SET_STRUCT		143
#define	COMMAND_DO_WHILE		144
#define	COMMAND_END_DO_WHILE		145
#define	COMMAND_RESET_LIST		146
#define	COMMAND_ON_LIST			147
#define	COMMAND_OFF_LIST		148
#define	COMMAND_CNS_MESSAGE		149
#define	COMMAND_STR_TRIM		150
#define	COMMAND_SR_SET			151
#define	COMMAND_BEAM_SWITCH		152
#define	COMMAND_CHANGE_DEVICE		153
#define	COMMAND_READ_FILE		154
#define	COMMAND_SORT			155
#define	COMMAND_READ_DIR		156
#define	COMMAND_COPY_VARIABLE		157
#define	COMMAND_TLG_INFO		158
#define	COMMAND_COMMENT_CHAR		159
#define	COMMAND_HOST_REQUEST		160
#define	COMMAND_SWITCH_INFO		161
#define	COMMAND_ALARM_MESSAGE		162
#define	COMMAND_DIGITAL_CONTROL		163
#define	COMMAND_PROGRAM_STATUS		164
#define	COMMAND_SWAP			165
#define	COMMAND_EXECUTE			166
#define	COMMAND_FLY_SPEC		167
#define	COMMAND_SR_GET			168
#define	COMMAND_SDA_GET			169
#define	COMMAND_SDA_SET			170
#define	COMMAND_CHECK			171
#define	COMMAND_ERROR_LOG		172
#define	COMMAND_SCAN			173
#define	COMMAND_READ_LIST		174
#define	COMMAND_BPM_DATA		175
#define	COMMAND_BLM_DATA		176
#define	COMMAND_STATUS_LIST		177
#define	COMMAND_BPM_FRAME_DATA		178
#define	COMMAND_BLM_FRAME_DATA		179
#define	COMMAND_AUDIT_LOG		180
#define	COMMAND_WRITE_FILE		181
#define	COMMAND_CONSOLE_LOG		182
#define	COMMAND_REQUEST_DEVICE		183
#define	COMMAND_CANCEL_REQUEST		184
#define	COMMAND_LOGGER_GET_ARRAY	185
#define	COMMAND_SAVE_SCREEN_IMAGE	186
#define	COMMAND_OUTPUT_VALUE		187
#define	COMMAND_LIBRARY_INFO		188
#define	COMMAND_NODE_AUDIT_LOG		189
#define	COMMAND_IMPORT			190
#define	COMMAND_ACL_OPTION		191
#define	COMMAND_FIND_IN_FILE		192
#define	COMMAND_ALARM_INFO		193
#define	COMMAND_DATABASE_INFO		194
#define	COMMAND_SETTING_HISTORY		195
#define	COMMAND_REDIMENSION		196
#define	COMMAND_PARSE_IF		197
#define	COMMAND_PARSE_ELSEIF		198
#define	COMMAND_PARSE_ELSE		199
#define	COMMAND_PARSE_ENDIF		200
#define	COMMAND_MULTIWIRE		201
#define	COMMAND_TLG_LOAD		202
#define	COMMAND_TLG_CONTROL		203
#define	COMMAND_PHONE_DIR		204
#define	COMMAND_ALARM_CLEAR		205
#define	COMMAND_LATTICE_DATA		206
#define	COMMAND_OUTPUT_DELIMITER	207
#define	COMMAND_MECCA_AUDIT_LOG		208
#define	COMMAND_PID_LOOP		209
#define	COMMAND_OAC_AUDIT_LOG		210
#define	COMMAND_ON_EVENT		211
#define	COMMAND_BPM_TBT_TRIGGER		212
#define	COMMAND_SCOPE			213
#define	COMMAND_SWITCH			214
#define	COMMAND_ENDSWITCH		215
#define	COMMAND_CASE			216
#define	COMMAND_ENDCASE			217
#define	COMMAND_FTP_PLOT		218
#define	COMMAND_SNAPSHOT_PLOT		219
#define	COMMAND_SHARED_LOG_WRITE	220
#define	COMMAND_ALARM_STATUS		221
#define	COMMAND_CACHE_DEVICE_DB_INFO	222
#define	COMMAND_PROCESS_FILE		223
#define	COMMAND_TIMER_070		224
#define	COMMAND_LOOPFOREACH		225
#define	COMMAND_MONITOR_SCRIPT		226
#define	COMMAND_EXEC_SEQ_FILE		227
#define	COMMAND_RESTART			228
#define	COMMAND_BYPASSED_ALARMS		229
#define	COMMAND_BEAM_PERMIT_LOG		230
#define	COMMAND_BOOSTER_TURNS		231
#define	COMMAND_LOGGER_INFO		232

#define	ACL_COMMAND_TYPE_DECLARE		(COMMAND_DECLARE)
#define	ACL_COMMAND_TYPE_ASSIGNMENT		(COMMAND_ASSIGNMENT)
#define	ACL_COMMAND_TYPE_READ_DEVICE		(COMMAND_READ_DEVICE)
#define	ACL_COMMAND_TYPE_SET_DEVICE		(COMMAND_SET_DEVICE)
#define	ACL_COMMAND_TYPE_INCREMENT_DEVICE	(COMMAND_INCREMENT_DEVICE)
#define	ACL_COMMAND_TYPE_DECREMENT_DEVICE	(COMMAND_DECREMENT_DEVICE)
#define	ACL_COMMAND_TYPE_LABEL			(COMMAND_LABEL)
#define	ACL_COMMAND_TYPE_GOTO			(COMMAND_GOTO)
#define	ACL_COMMAND_TYPE_GOSUB			(COMMAND_GOSUB)
#define	ACL_COMMAND_TYPE_RETURN			(COMMAND_RETURN)
#define	ACL_COMMAND_TYPE_PRINT			(COMMAND_PRINT)
#define	ACL_COMMAND_TYPE_EXIT			(COMMAND_EXIT)
#define	ACL_COMMAND_TYPE_IF			(COMMAND_IF)
#define	ACL_COMMAND_TYPE_ELSEIF			(COMMAND_ELSEIF)
#define	ACL_COMMAND_TYPE_ELSE			(COMMAND_ELSE)
#define	ACL_COMMAND_TYPE_ENDIF			(COMMAND_ENDIF)
#define	ACL_COMMAND_TYPE_LOOP			(COMMAND_LOOP)
#define	ACL_COMMAND_TYPE_ENDLOOP		(COMMAND_ENDLOOP)
#define	ACL_COMMAND_TYPE_MAIL			(COMMAND_MAIL)
#define	ACL_COMMAND_TYPE_RUN			(COMMAND_RUN)
#define	ACL_COMMAND_TYPE_SHOW_DEVICE		(COMMAND_SHOW_DEVICE)
#define	ACL_COMMAND_TYPE_WAIT			(COMMAND_WAIT)
#define	ACL_COMMAND_TYPE_LIST_DEVICE		(COMMAND_LIST_DEVICE)
#define	ACL_COMMAND_TYPE_TIMEOUT		(COMMAND_TIMEOUT)
#define	ACL_COMMAND_TYPE_SETTINGS		(COMMAND_SETTINGS)
#define	ACL_COMMAND_TYPE_LOCK			(COMMAND_LOCK)
#define	ACL_COMMAND_TYPE_UNLOCK			(COMMAND_UNLOCK)
#define	ACL_COMMAND_TYPE_WHILE			(COMMAND_WHILE)
#define	ACL_COMMAND_TYPE_ENDWHILE		(COMMAND_ENDWHILE)
#define	ACL_COMMAND_TYPE_RESET_DEVICE		(COMMAND_RESET_DEVICE)
#define	ACL_COMMAND_TYPE_TURN_DEVICE		(COMMAND_TURN_DEVICE)
#define	ACL_COMMAND_TYPE_ENABLE			(COMMAND_ENABLE)
#define	ACL_COMMAND_TYPE_DISABLE		(COMMAND_DISABLE)
#define	ACL_COMMAND_TYPE_ACTIVATE		(COMMAND_ACTIVATE)
#define	ACL_COMMAND_TYPE_DEACTIVATE		(COMMAND_DEACTIVATE)
#define	ACL_COMMAND_TYPE_ON_ERROR		(COMMAND_ON_ERROR)
#define	ACL_COMMAND_TYPE_RETRY			(COMMAND_RETRY)
#define	ACL_COMMAND_TYPE_DATA_SOURCE		(COMMAND_DATA_SOURCE)
#define	ACL_COMMAND_TYPE_CNSWIN			(COMMAND_CNSWIN)
#define	ACL_COMMAND_TYPE_URL_DISPLAY		(COMMAND_URL_DISPLAY)
#define	ACL_COMMAND_TYPE_IMAGE_DRAW		(COMMAND_IMAGE_DRAW)
#define	ACL_COMMAND_TYPE_OUTPUT			(COMMAND_OUTPUT)
#define	ACL_COMMAND_TYPE_DATA_EVENT		(COMMAND_DATA_EVENT)
#define	ACL_COMMAND_TYPE_VERSION		(COMMAND_VERSION)
#define	ACL_COMMAND_TYPE_CH13_MESSAGE		(COMMAND_CH13_MESSAGE)
#define	ACL_COMMAND_TYPE_FILL_DEVICE		(COMMAND_FILL_DEVICE)
#define	ACL_COMMAND_TYPE_RAMP_DEVICE		(COMMAND_RAMP_DEVICE)
#define	ACL_COMMAND_TYPE_TRIGGER		(COMMAND_TRIGGER)
#define	ACL_COMMAND_TYPE_TOGGLE_DEVICE		(COMMAND_TOGGLE_DEVICE)
#define	ACL_COMMAND_TYPE_RESTORE_DEVICE		(COMMAND_RESTORE_DEVICE)
#define	ACL_COMMAND_TYPE_PROGRAM_LOG		(COMMAND_PROGRAM_LOG)
#define	ACL_COMMAND_TYPE_DOWNTIME_LOG		(COMMAND_DOWNTIME_LOG)
#define	ACL_COMMAND_TYPE_ALARM_LOG		(COMMAND_ALARM_LOG)
#define	ACL_COMMAND_TYPE_DOWNLOAD		(COMMAND_DOWNLOAD)
#define	ACL_COMMAND_TYPE_DELETE_CACHE		(COMMAND_DELETE_CACHE)
#define	ACL_COMMAND_TYPE_DEVICE_ARG_INFO	(COMMAND_DEVICE_ARG_INFO)
#define	ACL_COMMAND_TYPE_STRING_ARG_INFO	(COMMAND_STRING_ARG_INFO)
#define	ACL_COMMAND_TYPE_PROGRAM_INFO		(COMMAND_PROGRAM_INFO)
#define	ACL_COMMAND_TYPE_COMPARE_DEVICE		(COMMAND_COMPARE_DEVICE)
#define	ACL_COMMAND_TYPE_COPY_DEVICE		(COMMAND_COPY_DEVICE)
#define	ACL_COMMAND_TYPE_SYSTEM			(COMMAND_SYSTEM)
#define	ACL_COMMAND_TYPE_GPIB			(COMMAND_GPIB)
#define	ACL_COMMAND_TYPE_NODE_INFO		(COMMAND_NODE_INFO)
#define	ACL_COMMAND_TYPE_NODE			(COMMAND_NODE)
#define	ACL_COMMAND_TYPE_REBOOT			(COMMAND_REBOOT)
#define	ACL_COMMAND_TYPE_SETTING_LOG		(COMMAND_SETTING_LOG)
#define	ACL_COMMAND_TYPE_ERROR_TEXT		(COMMAND_ERROR_TEXT)
#define	ACL_COMMAND_TYPE_FIT			(COMMAND_FIT)
#define	ACL_COMMAND_TYPE_USER_INFO		(COMMAND_USER_INFO)
#define	ACL_COMMAND_TYPE_CAMAC			(COMMAND_CAMAC)
#define	ACL_COMMAND_TYPE_EXITLOOP		(COMMAND_EXITLOOP)
#define	ACL_COMMAND_TYPE_CONTINUE		(COMMAND_CONTINUE)
#define	ACL_COMMAND_TYPE_SAVE_FILE		(COMMAND_SAVE_FILE)
#define	ACL_COMMAND_TYPE_BYPASS			(COMMAND_BYPASS)
#define	ACL_COMMAND_TYPE_ALARM_LIMIT		(COMMAND_ALARM_LIMIT)
#define	ACL_COMMAND_TYPE_NOMINAL_MASK		(COMMAND_NOMINAL_MASK)
#define	ACL_COMMAND_TYPE_INPUT			(COMMAND_INPUT)
#define	ACL_COMMAND_TYPE_CONSOLE_INFO		(COMMAND_CONSOLE_INFO)
#define	ACL_COMMAND_TYPE_FFT			(COMMAND_FFT)
#define	ACL_COMMAND_TYPE_FTP			(COMMAND_FTP)
#define	ACL_COMMAND_TYPE_TIMER_EVENT		(COMMAND_TIMER_EVENT)
#define	ACL_COMMAND_TYPE_STEP_MOTOR		(COMMAND_STEP_MOTOR)
#define	ACL_COMMAND_TYPE_EVENT_INFO		(COMMAND_EVENT_INFO)
#define	ACL_COMMAND_TYPE_MDAT_INFO		(COMMAND_MDAT_INFO)
#define	ACL_COMMAND_TYPE_CALL_PROC		(COMMAND_CALL_PROC)
#define	ACL_COMMAND_TYPE_SEARCH_DEVICE		(COMMAND_SEARCH_DEVICE)
#define	ACL_COMMAND_TYPE_ON			(COMMAND_ON)
#define	ACL_COMMAND_TYPE_OFF			(COMMAND_OFF)
#define	ACL_COMMAND_TYPE_POSITIVE		(COMMAND_POSITIVE)
#define	ACL_COMMAND_TYPE_NEGATIVE		(COMMAND_NEGATIVE)
#define	ACL_COMMAND_TYPE_POLARITY		(COMMAND_POLARITY)
#define	ACL_COMMAND_TYPE_DBSET			(COMMAND_DBSET)
#define	ACL_COMMAND_TYPE_LOG_DEVICE		(COMMAND_LOG_DEVICE)
#define	ACL_COMMAND_TYPE_EVENT_LOG		(COMMAND_EVENT_LOG)
#define	ACL_COMMAND_TYPE_STATE_LOG		(COMMAND_STATE_LOG)
#define	ACL_COMMAND_TYPE_DELTA_SET		(COMMAND_DELTA_SET)
#define	ACL_COMMAND_TYPE_LOGGER_GET		(COMMAND_LOGGER_GET)
#define	ACL_COMMAND_TYPE_ACNET_REQUEST		(COMMAND_ACNET_REQUEST)
#define	ACL_COMMAND_TYPE_RESIZE			(COMMAND_RESIZE)
#define	ACL_COMMAND_TYPE_FIND_PROGRAM		(COMMAND_FIND_PROGRAM)
#define	ACL_COMMAND_TYPE_SET_FIELD		(COMMAND_SET_FIELD)
#define	ACL_COMMAND_TYPE_TIMER			(COMMAND_TIMER)
#define	ACL_COMMAND_TYPE_SHOT_LOG		(COMMAND_SHOT_LOG)
#define	ACL_COMMAND_TYPE_PATH			(COMMAND_PATH)
#define	ACL_COMMAND_TYPE_DEVICE_LIST		(COMMAND_DEVICE_LIST)
#define	ACL_COMMAND_TYPE_FTP_READ		(COMMAND_FTP_READ)
#define	ACL_COMMAND_TYPE_SNAP_READ		(COMMAND_SNAP_READ)
#define	ACL_COMMAND_TYPE_WEB_LOG		(COMMAND_WEB_LOG)
#define	ACL_COMMAND_TYPE_TCP_REQUEST		(COMMAND_TCP_REQUEST)
#define	ACL_COMMAND_TYPE_DELETE			(COMMAND_DELETE)
#define	ACL_COMMAND_TYPE_READ_STRUCT		(COMMAND_READ_STRUCT)
#define	ACL_COMMAND_TYPE_READ_FIELD		(COMMAND_READ_FIELD)
#define	ACL_COMMAND_TYPE_TABLE_DEVICE		(COMMAND_TABLE_DEVICE)
#define	ACL_COMMAND_TYPE_SDA_DIR		(COMMAND_SDA_DIR)
#define	ACL_COMMAND_TYPE_SR_DIR			(COMMAND_SR_DIR)
#define	ACL_COMMAND_TYPE_STR_FORMAT		(COMMAND_STR_FORMAT)
#define	ACL_COMMAND_TYPE_STR_CAT		(COMMAND_STR_CAT)
#define	ACL_COMMAND_TYPE_STR_FIND		(COMMAND_STR_FIND)
#define	ACL_COMMAND_TYPE_STR_COMPARE		(COMMAND_STR_COMPARE)
#define	ACL_COMMAND_TYPE_SUBSTRING		(COMMAND_SUBSTRING)
#define	ACL_COMMAND_TYPE_CLIB_INFO		(COMMAND_CLIB_INFO)
#define	ACL_COMMAND_TYPE_STR_CASE		(COMMAND_STR_CASE)
#define	ACL_COMMAND_TYPE_SDA_CONFIG		(COMMAND_SDA_CONFIG)
#define	ACL_COMMAND_TYPE_UNESCAPE		(COMMAND_UNESCAPE)
#define	ACL_COMMAND_TYPE_STR_TAIL		(COMMAND_STR_TAIL)
#define	ACL_COMMAND_TYPE_STR_REPLACE		(COMMAND_STR_REPLACE)
#define	ACL_COMMAND_TYPE_STR_COPY		(COMMAND_STR_COPY)
#define	ACL_COMMAND_TYPE_STR_LENGTH		(COMMAND_STR_LENGTH)
#define	ACL_COMMAND_TYPE_STR_SPLIT		(COMMAND_STR_SPLIT)
#define	ACL_COMMAND_TYPE_SQL			(COMMAND_SQL)
#define	ACL_COMMAND_TYPE_STR_CONVERT		(COMMAND_STR_CONVERT)
#define	ACL_COMMAND_TYPE_FSHARE_INFO		(COMMAND_FSHARE_INFO)
#define	ACL_COMMAND_TYPE_STATS			(COMMAND_STATS)
#define	ACL_COMMAND_TYPE_GAS			(COMMAND_GAS)
#define	ACL_COMMAND_TYPE_CRATE			(COMMAND_CRATE)
#define	ACL_COMMAND_TYPE_SLOT			(COMMAND_SLOT)
#define	ACL_COMMAND_TYPE_MADC			(COMMAND_MADC)
#define	ACL_COMMAND_TYPE_LIST_STRINGS		(COMMAND_LIST_STRINGS)
#define	ACL_COMMAND_TYPE_FILE_INFO		(COMMAND_FILE_INFO)
#define	ACL_COMMAND_TYPE_CPLD_LOG		(COMMAND_CPLD_LOG)
#define	ACL_COMMAND_TYPE_SET_LIST		(COMMAND_SET_LIST)
#define	ACL_COMMAND_TYPE_CHECK_STATUS		(COMMAND_CHECK_STATUS)
#define	ACL_COMMAND_TYPE_SET_STRUCT		(COMMAND_SET_STRUCT)
#define	ACL_COMMAND_TYPE_DO_WHILE		(COMMAND_DO_WHILE)
#define	ACL_COMMAND_TYPE_END_DO_WHILE		(COMMAND_END_DO_WHILE)
#define	ACL_COMMAND_TYPE_RESET_LIST		(COMMAND_RESET_LIST)
#define	ACL_COMMAND_TYPE_ON_LIST		(COMMAND_ON_LIST)
#define	ACL_COMMAND_TYPE_OFF_LIST		(COMMAND_OFF_LIST)
#define	ACL_COMMAND_TYPE_CNS_MESSAGE		(COMMAND_CNS_MESSAGE)
#define	ACL_COMMAND_TYPE_STR_TRIM		(COMMAND_STR_TRIM)
#define	ACL_COMMAND_TYPE_SR_SET			(COMMAND_SR_SET)
#define	ACL_COMMAND_TYPE_BEAM_SWITCH		(COMMAND_BEAM_SWITCH)
#define	ACL_COMMAND_TYPE_CHANGE_DEVICE		(COMMAND_CHANGE_DEVICE)
#define	ACL_COMMAND_TYPE_READ_FILE		(COMMAND_READ_FILE)
#define	ACL_COMMAND_TYPE_SORT			(COMMAND_SORT)
#define	ACL_COMMAND_TYPE_READ_DIR		(COMMAND_READ_DIR)
#define	ACL_COMMAND_TYPE_COPY_VARIABLE		(COMMAND_COPY_VARIABLE)
#define	ACL_COMMAND_TYPE_TLG_INFO		(COMMAND_TLG_INFO)
#define	ACL_COMMAND_TYPE_COMMENT_CHAR		(COMMAND_COMMENT_CHAR)
#define	ACL_COMMAND_TYPE_HOST_REQUEST		(COMMAND_HOST_REQUEST)
#define	ACL_COMMAND_TYPE_SWITCH_INFO		(COMMAND_SWITCH_INFO)
#define	ACL_COMMAND_TYPE_ALARM_MESSAGE		(COMMAND_ALARM_MESSAGE)
#define	ACL_COMMAND_TYPE_DIGITAL_CONTROL	(COMMAND_DIGITAL_CONTROL)
#define	ACL_COMMAND_TYPE_PROGRAM_STATUS		(COMMAND_PROGRAM_STATUS)
#define	ACL_COMMAND_TYPE_SWAP			(COMMAND_SWAP)
#define	ACL_COMMAND_TYPE_EXECUTE		(COMMAND_EXECUTE)
#define	ACL_COMMAND_TYPE_FLY_SPEC		(COMMAND_FLY_SPEC)
#define	ACL_COMMAND_TYPE_SR_GET			(COMMAND_SR_GET)
#define	ACL_COMMAND_TYPE_SDA_GET		(COMMAND_SDA_GET)
#define	ACL_COMMAND_TYPE_SDA_SET		(COMMAND_SDA_SET)
#define	ACL_COMMAND_TYPE_CHECK			(COMMAND_CHECK)
#define	ACL_COMMAND_TYPE_ERROR_LOG		(COMMAND_ERROR_LOG)
#define	ACL_COMMAND_TYPE_SCAN			(COMMAND_SCAN)
#define	ACL_COMMAND_TYPE_READ_LIST		(COMMAND_READ_LIST)
#define	ACL_COMMAND_TYPE_BPM_DATA		(COMMAND_BPM_DATA)
#define	ACL_COMMAND_TYPE_BLM_DATA		(COMMAND_BLM_DATA)
#define	ACL_COMMAND_TYPE_STATUS_LIST		(COMMAND_STATUS_LIST)
#define	ACL_COMMAND_TYPE_BPM_FRAME_DATA		(COMMAND_BPM_FRAME_DATA)
#define	ACL_COMMAND_TYPE_BLM_FRAME_DATA		(COMMAND_BLM_FRAME_DATA)
#define	ACL_COMMAND_TYPE_AUDIT_LOG		(COMMAND_AUDIT_LOG)
#define	ACL_COMMAND_TYPE_WRITE_FILE		(COMMAND_WRITE_FILE)
#define	ACL_COMMAND_TYPE_CONSOLE_LOG		(COMMAND_CONSOLE_LOG)
#define	ACL_COMMAND_TYPE_REQUEST_DEVICE		(COMMAND_REQUEST_DEVICE)
#define	ACL_COMMAND_TYPE_CANCEL_REQUEST		(COMMAND_CANCEL_REQUEST)
#define	ACL_COMMAND_TYPE_LOGGER_GET_ARRAY	(COMMAND_LOGGER_GET_ARRAY)
#define	ACL_COMMAND_TYPE_SAVE_SCREEN_IMAGE	(COMMAND_SAVE_SCREEN_IMAGE)
#define	ACL_COMMAND_TYPE_OUTPUT_VALUE		(COMMAND_OUTPUT_VALUE)
#define	ACL_COMMAND_TYPE_LIBRARY_INFO		(COMMAND_LIBRARY_INFO)
#define	ACL_COMMAND_TYPE_NODE_AUDIT_LOG		(COMMAND_NODE_AUDIT_LOG)
#define	ACL_COMMAND_TYPE_IMPORT			(COMMAND_IMPORT)
#define	ACL_COMMAND_TYPE_ACL_OPTION		(COMMAND_ACL_OPTION)
#define	ACL_COMMAND_TYPE_FIND_IN_FILE		(COMMAND_FIND_IN_FILE)
#define	ACL_COMMAND_TYPE_ALARM_INFO		(COMMAND_ALARM_INFO)
#define	ACL_COMMAND_TYPE_DATABASE_INFO		(COMMAND_DATABASE_INFO)
#define	ACL_COMMAND_TYPE_SETTING_HISTORY	(COMMAND_SETTING_HISTORY)
#define	ACL_COMMAND_TYPE_REDIMENSION		(COMMAND_REDIMENSION)
#define	ACL_COMMAND_TYPE_PARSE_IF		(COMMAND_PARSE_IF)
#define	ACL_COMMAND_TYPE_PARSE_ELSEIF		(COMMAND_PARSE_ELSEIF)
#define	ACL_COMMAND_TYPE_PARSE_ELSE		(COMMAND_PARSE_ELSE)
#define	ACL_COMMAND_TYPE_PARSE_ENDIF		(COMMAND_PARSE_ENDIF)
#define	ACL_COMMAND_TYPE_MULTIWIRE		(COMMAND_MULTIWIRE)
#define	ACL_COMMAND_TYPE_TLG_LOAD		(COMMAND_TLG_LOAD)
#define	ACL_COMMAND_TYPE_TLG_CONTROL		(COMMAND_TLG_CONTROL)
#define	ACL_COMMAND_TYPE_PHONE_DIR		(COMMAND_PHONE_DIR)
#define	ACL_COMMAND_TYPE_ALARM_CLEAR		(COMMAND_ALARM_CLEAR)
#define	ACL_COMMAND_TYPE_LATTICE_DATA		(COMMAND_LATTICE_DATA)
#define	ACL_COMMAND_TYPE_OUTPUT_DELIMITER	(COMMAND_OUTPUT_DELIMITER)
#define	ACL_COMMAND_TYPE_MECCA_AUDIT_LOG	(COMMAND_MECCA_AUDIT_LOG)
#define	ACL_COMMAND_TYPE_PID_LOOP		(COMMAND_PID_LOOP)
#define	ACL_COMMAND_TYPE_OAC_AUDIT_LOG		(COMMAND_OAC_AUDIT_LOG)
#define	ACL_COMMAND_TYPE_ON_EVENT		(COMMAND_ON_EVENT)
#define	ACL_COMMAND_TYPE_BPM_TBT_TRIGGER	(COMMAND_BPM_TBT_TRIGGER)
#define	ACL_COMMAND_TYPE_SCOPE			(COMMAND_SCOPE)
#define	ACL_COMMAND_TYPE_SWITCH			(COMMAND_SWITCH)
#define	ACL_COMMAND_TYPE_ENDSWITCH		(COMMAND_ENDSWITCH)
#define	ACL_COMMAND_TYPE_CASE			(COMMAND_CASE)
#define	ACL_COMMAND_TYPE_ENDCASE		(COMMAND_ENDCASE)
#define	ACL_COMMAND_TYPE_FTP_PLOT		(COMMAND_FTP_PLOT)
#define	ACL_COMMAND_TYPE_SNAPSHOT_PLOT		(COMMAND_SNAPSHOT_PLOT)
#define	ACL_COMMAND_TYPE_SHARED_LOG_WRITE	(COMMAND_SHARED_LOG_WRITE)
#define	ACL_COMMAND_TYPE_ALARM_STATUS		(COMMAND_ALARM_STATUS)
#define	ACL_COMMAND_TYPE_CACHE_DEVICE_DB_INFO	(COMMAND_CACHE_DEVICE_DB_INFO)
#define	ACL_COMMAND_TYPE_PROCESS_FILE		(COMMAND_PROCESS_FILE)
#define	ACL_COMMAND_TYPE_TIMER_070		(COMMAND_TIMER_070)
#define	ACL_COMMAND_TYPE_LOOPFOREACH		(COMMAND_LOOPFOREACH)
#define	ACL_COMMAND_TYPE_MONITOR_SCRIPT		(COMMAND_MONITOR_SCRIPT)
#define	ACL_COMMAND_TYPE_EXEC_SEQ_FILE		(COMMAND_EXEC_SEQ_FILE)
#define	ACL_COMMAND_TYPE_RESTART		(COMMAND_RESTART)
#define	ACL_COMMAND_TYPE_BYPASSED_ALARMS	(COMMAND_BYPASSED_ALARMS)
#define	ACL_COMMAND_TYPE_BEAM_PERMIT_LOG	(COMMAND_BEAM_PERMIT_LOG)
#define	ACL_COMMAND_TYPE_BOOSTER_TURNS		(COMMAND_BOOSTER_TURNS)
#define	ACL_COMMAND_TYPE_LOGGER_INFO		(COMMAND_LOGGER_INFO)


/******************************************************************************/
/* 
**	data structure typedefs
*/
/******************************************************************************/

typedef struct ACL_COMMAND_ENTRY
    {
    int		line_number;
    int		command_type;		/* type of command */
    void	*command_data;
    int		use_command_error;
    int		loop_level;
    int		if_level;
    unsigned int	num_calls;	/* number of calls to this command */
    unsigned int	num_executions;	/* number of times this command has been successfully executed */
    unsigned int	last_time;	/* last time this command was executed */
    unsigned int	longest_time;	/* longest time spent processing this command */
    unsigned int	total_time;	/* total time spent processing this command */
    char	*source_line;
    int		break_set;		/* break when this command is about to be executed */
    } ACL_COMMAND_ENTRY;

#define	ACL_DEVICE_ARGUMENT	1
#define	ACL_STRING_ARGUMENT	2

typedef struct ACL_ARG_INFO
    {
    int		type;
    int		index;
    char	*description;
    int		description_length;
    char	*default_value;
    int		default_length;
    int		convert_type;
    } __attribute__((packed)) ACL_ARG_INFO;

typedef struct ACL_PRE_EXEC_DATA
    {
    int		line_number;
    int		line_index;
    int		command_type;
    char	*source_line;
    } __attribute__((packed)) ACL_PRE_EXEC_DATA;

typedef struct ACL_POST_EXEC_DATA
    {
    int		line_number;
    int		line_index;
    int		next_line_index;
    int		command_type;
    int		status;
    char	*source_line;
    } __attribute__((packed)) ACL_POST_EXEC_DATA;

#define	ACL_DEBUGGER_STATE_NONE		0	/* debugger is not enabled */
#define	ACL_DEBUGGER_STATE_INIT		1	/* initialization (before script execution) */
#define	ACL_DEBUGGER_STATE_EXECUTE	2	/* execute script */
#define	ACL_DEBUGGER_STATE_STEP		3	/* single step through the script */
#define	ACL_DEBUGGER_STATE_BREAK	4	/* execution halted due to a breakpoint */
#define	ACL_DEBUGGER_STATE_TERM		5	/* termination (after script execution) */

#define	ACL_DEBUGGER_MODE_NONE		0	/* debugger is not enabled */
#define	ACL_DEBUGGER_MODE_EXECUTE	2	/* execute script */
#define	ACL_DEBUGGER_MODE_STEP		3	/* single step through the script */

typedef struct ACL_DEBUGGER_DATA
    {
    int		debugger_state;
    int		line_number;
    char	*source_line;
    int		line_index;
    int		script_status;
    int		num_commands;
    ACL_COMMAND_ENTRY	*command_list;
    } __attribute__((packed)) ACL_DEBUGGER_DATA;

#define	ACL_PROC_NAME_LEN	31

typedef struct ACL_PROC_DATA
    {
    char	name[ACL_PROC_NAME_LEN+1];
    int_function_voidp	proc;
    void	*proc_data;
    } __attribute__((packed)) ACL_PROC_DATA;

typedef struct ACL_EXIT_DATA
    {
    int		current_mode;
    int		execution_level;
    char	*current_script;
    int		current_line_number;
    char	*current_source_line;
    } ACL_EXIT_DATA;

#define	ACL_MAX_SCRIPT_NAME_LEN	64

typedef struct ACL_EXECUTION_INFO
    {
    char	script_name[ACL_MAX_SCRIPT_NAME_LEN+2];
    unsigned int	script_start_time;
    unsigned int	script_end_time;
    unsigned int	suppressed_setting_count;
    int		execution_status;
    char	error_string[ACL_ERROR_STRING_LEN+2];
    int		current_mode;
    } ACL_EXECUTION_INFO;

typedef struct ACL_LAST_ERROR_INFO
    {
    char	script_name[ACL_MAX_SCRIPT_NAME_LEN+2];
    int		error_status;
    int		error_line_number;
    char	error_source_line[ACL_MAX_LINE_LENGTH+2];
    char	error_string[ACL_ERROR_STRING_LEN+2];
    } __attribute__((packed)) ACL_LAST_ERROR_INFO;

typedef struct ACL_RUN_COMMAND_INFO
    {
    char	calling_script_name[ACL_MAX_SCRIPT_NAME_LEN+2];
    int		calling_line_number;
    char	run_script_name[ACL_MAX_SCRIPT_NAME_LEN+2];
    unsigned int	run_script_start_time;
    unsigned int	run_script_end_time;
    int		run_command_status;
    char	run_error_string[ACL_ERROR_STRING_LEN+2];
    } __attribute__((packed)) ACL_RUN_COMMAND_INFO;

#define	ACL_INPUT_OPT_SPLIT_PROMPT_STRING	1	/* evenly split the prompt string by the number of values */

typedef struct ACL_INPUT_FUNC_DATA		/* extra data to pass to an ACL input function */
    {
    void	*minimum;
    void	*maximum;
    int		num_values;
    unsigned int	options;
    char	*title;
    } __attribute__((packed)) ACL_INPUT_FUNC_DATA;

typedef struct ACL_OUTPUT_FUNC_DATA		/* data to pass to an ACL output function */
    {
    char	*destination;
    unsigned int	output_options;
    int		array_index;
    } __attribute__((packed)) ACL_OUTPUT_FUNC_DATA;

typedef struct ACL_LOGIN_FUNC_DATA		/* data to pass to an ACL login function */
    {
    int		login_type;
    unsigned int	login_options;
    bool	need_user_name;
    char	*name_prompt_text;
    int		max_user_name_length;
    bool	need_password;
    char	*password_prompt_text;
    int		max_password_length;
    } __attribute__((packed)) ACL_LOGIN_FUNC_DATA;

#define	ACL_DB_FILE_NAME_LEN	32
#define	ACL_DB_LINE_TEXT_LEN	252

typedef struct ACL_DB_SEARCH_DATA
    {
    char	file_name[ACL_DB_FILE_NAME_LEN];
    int		line_number;
    char	line_text[ACL_DB_LINE_TEXT_LEN];
    } ACL_DB_SEARCH_DATA;

#define	ACL_REMOTE_TOKEN_LEN	16

typedef struct REMOTE_ACL_MESSAGE_VALUE
    {
    char	*descriptor;
    char	*value_string;
    } __attribute__((packed)) REMOTE_ACL_MESSAGE_VALUE;

typedef struct REMOTE_ACL_MESSAGE_DATA
    {
    char	process_name[PROCESS_NAME_LEN+2];
    int		node;
    char	token_string[ACL_REMOTE_TOKEN_LEN+2];
    int		message_type;
    int		status;
    unsigned int	num_suppressed_settings;
    unsigned int	execution_start;
    unsigned int	execution_end;
    int		num_values;
    REMOTE_ACL_MESSAGE_VALUE	*values;
    } __attribute__((packed)) REMOTE_ACL_MESSAGE_DATA;

typedef struct ACL_SYMBOL_DYNAMIC_DATA
    {
    int		is_initialized;
    unsigned int	num_accesses;
    unsigned int	num_readings;
    unsigned int	num_settings;
    } ACL_SYMBOL_DYNAMIC_DATA;

#define	ACL_PROGRAM_SCRIPT_TITLE_LENGTH		64
#define	ACL_PROGRAM_SCRIPT_SCRIPT_NAME_LENGTH	252
#define	ACL_PROGRAM_SCRIPT_ARGUMENTS_LENGTH	252
#define	ACL_PROGRAM_SCRIPT_DATA_EVENT_LENGTH	252
#define	ACL_PROGRAM_SCRIPT_LOG_FILE_LENGTH	252
#define	ACL_PROGRAM_SCRIPT_SHARED_LOG_LENGTH	8
#define	ACL_PROGRAM_SCRIPT_LOCK_NAME_LENGTH	64

typedef struct ACL_PROGRAM_SCRIPT_INFO
    {
    int		use_title;
    char	title[ACL_PROGRAM_SCRIPT_TITLE_LENGTH+2];
    char	script_name[ACL_PROGRAM_SCRIPT_SCRIPT_NAME_LENGTH+2];
    int		file_type;
    char	arguments[ACL_PROGRAM_SCRIPT_ARGUMENTS_LENGTH+2];
    char	default_data_event[ACL_PROGRAM_SCRIPT_DATA_EVENT_LENGTH+2];
    int		acl_options;
    char	log_file[ACL_PROGRAM_SCRIPT_LOG_FILE_LENGTH+2];
    char	shared_log_file[ACL_PROGRAM_SCRIPT_SHARED_LOG_LENGTH+2];
    int		spawn_it;
    int		spawn_options;
    char	lock_name[ACL_PROGRAM_SCRIPT_LOCK_NAME_LENGTH+2];
    int		disabled;
    } __attribute__((packed)) ACL_PROGRAM_SCRIPT_INFO;


/******************************************************************************/
/*
**	function prototype typedefs
*/
/******************************************************************************/

typedef int (*acl_abort_function)(void);		/* ACL abort function */

typedef int (*acl_debugger_function)(void *callback_data,
				     ACL_DEBUGGER_DATA *debugger_data);	/* debugger function */

typedef int (*acl_host_request_function)(char *request_text,
					 int once_only, int *num_values,
					 int *value_type, void **value);	/* ACL host request function */

typedef int (*acl_input_function)(char *prompt_text, int data_type,
				  int max_length, void *value,
				  int *data_length, void *callback_data,
				  char *environment, int suppress_eof,
				  ACL_INPUT_FUNC_DATA *func_data);	/* ACL input function */

typedef int (*acl_login_function)(ACL_LOGIN_FUNC_DATA *login_data,
				  void *callback_data, char *user_name,
				  char *password);	/* ACL login function */

typedef int (*acl_output_function)(void *callback_data, char const *output_string,
				   void const *value, int value_type,
				   int value_length, int output_type,
				   char *destination,
				   ACL_OUTPUT_FUNC_DATA *func_data);	/* ACL output function */

typedef int (*acl_post_exec_function)(void *callback_data,
				      ACL_POST_EXEC_DATA *command_data);	/* ACL post execution function */

typedef int (*acl_pre_exec_function)(void *callback_data,
				     ACL_PRE_EXEC_DATA *command_data);	/* ACL pre execution function */

typedef void (*acl_exit_handler_function)(ACL_EXIT_DATA *acl_data,
					  void *callback_data);	/* ACL user exit handler function */

typedef void (*remote_acl_message_handler)(void *handler_data,
					   REMOTE_ACL_MESSAGE_DATA *message_data);	/* remote ACL message callback function */

typedef int (*acl_terminal_size_function)(int *num_lines, int *num_columns,
					  int *y_pixel_size, int *x_pixel_size,
					  void *terminal_data,
					  void *callback_data);	/* terminal size function */


/******************************************************************************/
/*
**	shared ACL function prototypes
*/
/******************************************************************************/

#ifdef __cplusplus
extern "C" {
#endif

    int acl_add_program_script_menu_entry_c(int top_row, int left_column,
					    char const *program, int list,
					    unsigned int options=ACL_OPT_NONE);
    int acl_add_remote_message_callback(remote_acl_message_handler message_handler,
					void *handler_data);
    int acl_cancel_requests_c(void *compiled_code, unsigned int options,
                              char *error_string);
    int acl_clear_all_debugger_breaks(void);
    int acl_close(void);
    int acl_command_string_to_type(char *string, int *command_type);
    int acl_command_text(int *num_commands, char ***command_text,
                         char ***argument_text=(char ***) NULL,
			 char ***oneline_help=(char ***) NULL);
    int acl_command_type_to_string_c(int command_type, char *string);
    int acl_compile_c(char *command_text, int command_length,
                      char *subst_devices, int num_devices, short default_ftd,
                      unsigned int options, void **ret_compiled_code,
                      char *error_string, char **subst_strings=(char **) NULL,
                      int num_subst_str=0,
                      ACL_PROC_DATA *procs=(ACL_PROC_DATA *) NULL,
                      int num_procs=0);
    int acl_copy_arg_info_c(int num_args, ACL_ARG_INFO *src_arg_info,
			    ACL_ARG_INFO **dest_arg_info);
    int acl_db_file_exists_c(char *file_name,
 			     unsigned int options=ACL_OPT_NONE,
			     char *actual_name=(char *) NULL,
			     int max_return=0);
    int acl_default_data_source_c(int data_source, void *data_source_data);
    int acl_default_script_path_c(char *path, unsigned int options);
    int acl_delete_symbol(char *symbol_name);
    int acl_execute_c(char const *command_text, int command_length,
                      char *subst_devices, int num_devices, short default_ftd,
                      unsigned int options, acl_output_function output_func,
                      void *output_func_data, acl_pre_exec_function pre_exec_func,
                      void *pre_exec_data, acl_post_exec_function post_exec_func,
                      void *post_exec_data, char *error_string,
                      acl_abort_function abort_func=(acl_abort_function) NULL,
                      char **subst_strings=(char **) NULL,
                      int num_subst_str=0,
                      acl_input_function input_func=(acl_input_function) NULL,
                      void *input_func_data=(void *) NULL,
                      char *log_file=(char *) NULL,
                      ACL_PROC_DATA *procs=(ACL_PROC_DATA *) NULL,
                      int num_procs=0);
    int acl_execute_always_block_c(int script_status=CLIB_DEFAULT_ARG,
				   char *error_string=(char *) NULL,
				   unsigned int options=ACL_OPT_NONE);
    int acl_execute_file_in_window_c(char *title, int top_row,
				     int left_column, int num_rows,
				     int num_columns, char *file_name,
				     int file_type,
				     unsigned int gui_options=ACL_GUI_OPT_NONE,
				     char *subst_devices=(char *) NULL,
				     int num_devices=0,
				     short default_ftd=0,
				     char **subst_strings=(char **) NULL,
				     int num_subst_str=0,
				     unsigned int options=ACL_OPT_NONE,
				     char *error_string=(char *) NULL,
				     char *log_file=(char *) NULL,
				     acl_output_function output_func=(acl_output_function) NULL,
				     void *output_func_data=(void *) NULL,
				     acl_input_function input_func=(acl_input_function) NULL,
				     void *input_func_data=(void *) NULL,
				     acl_abort_function abort_func=(acl_abort_function) NULL,
				     acl_host_request_function hostreq_func=(acl_host_request_function) NULL,
				     acl_pre_exec_function pre_exec_func=(acl_pre_exec_function) NULL,
				     void *pre_exec_data=(void *) NULL,
				     acl_post_exec_function post_exec_func=(acl_post_exec_function) NULL,
				     void *post_exec_data=(void *) NULL,
				     ACL_PROC_DATA *procs=(ACL_PROC_DATA *) NULL,
				     int num_procs=0);
    int acl_execute_in_window_c(char *title, int top_row,
				int left_column, int num_rows,
				int num_columns, char *command_text,
				int command_length,
				unsigned int gui_options=ACL_GUI_OPT_NONE,
				char *subst_devices=(char *) NULL,
				int num_devices=0,
				short default_ftd=0,
				char **subst_strings=(char **) NULL,
				int num_subst_str=0,
				unsigned int options=ACL_OPT_NONE,
				char *error_string=(char *) NULL,
				char *log_file=(char *) NULL,
				acl_output_function output_func=(acl_output_function) NULL,
				void *output_func_data=(void *) NULL,
				acl_input_function input_func=(acl_input_function) NULL,
				void *input_func_data=(void *) NULL,
				acl_abort_function abort_func=(acl_abort_function) NULL,
				acl_host_request_function hostreq_func=(acl_host_request_function) NULL,
				acl_pre_exec_function pre_exec_func=(acl_pre_exec_function) NULL,
				void *pre_exec_data=(void *) NULL,
				acl_post_exec_function post_exec_func=(acl_post_exec_function) NULL,
				void *post_exec_data=(void *) NULL,
				ACL_PROC_DATA *procs=(ACL_PROC_DATA *) NULL,
				int num_procs=0);
    int acl_expand_file_name_c(char *file_name, int file_type,
			       unsigned int options, char *actual_name,
			       int max_return=0);
    int acl_file_execute_c(char *file_name, int file_type,
                           char *subst_devices, int num_devices,
                           short default_ftd, unsigned int options,
                           acl_output_function output_func,
                           void *output_func_data,
                           acl_pre_exec_function pre_exec_func, void *pre_exec_data,
                           acl_post_exec_function post_exec_func, void *post_exec_data,
                           char *error_string,
                           acl_abort_function abort_func=(acl_abort_function) NULL,
                           char **subst_strings=(char **) NULL,
                           int num_subst_str=0,
                           acl_input_function input_func=(acl_input_function) NULL,
                           void *input_func_data=(void *) NULL,
                           char *log_file=(char *) NULL,
                           ACL_PROC_DATA *procs=(ACL_PROC_DATA *) NULL,
                           int num_procs=0);
    int acl_file_exists_c(char *file_name, int file_type,
			  unsigned int options=ACL_OPT_NONE,
			  char *actual_name=(char *) NULL, int max_return=0);
    int acl_file_is_in_repository_c(char *file_name, int verify_file=FALSE,
				    unsigned int options=ACL_OPT_NONE);
    int acl_file_read_c(char const *file_name, int file_type,
                        char **ret_command_text, int *ret_command_length,
                        int *num_symbols, int *num_read_devices,
                        int *num_set_devices, unsigned int options=ACL_OPT_NONE);
    int acl_file_read_author_c(char const *file_name, int file_type,
			       char **author,
			       unsigned int options=ACL_OPT_NONE);
    int acl_file_read_description_c(char const *file_name, int file_type,
				    char **description,
				    int *description_length,
				    int *descr_num_lines=(int *) NULL,
				    unsigned int options=ACL_OPT_NONE,
				    char **long_description=(char **) NULL,
				    int *long_description_length=(int *) NULL);
    int acl_file_read_keeper_c(char const *file_name, int file_type,
			       char **keeper,
			       unsigned int options=ACL_OPT_NONE);
    int acl_file_read_title_c(char const *file_name, int file_type,
			      char **title, unsigned int options=ACL_OPT_NONE);
    int acl_file_read_version_c(char const *file_name, int file_type,
				char **version,
				unsigned int options=ACL_OPT_NONE);
    int acl_file_stats_c(char const *file_name, int file_type,
			 unsigned int *num_lines, unsigned int *total_chars,
			 int *longest_length, int *longest_line,
			 unsigned int options=ACL_OPT_NONE);
    int acl_file_write_c(char const *file_name, int file_type,
                         char *command_text, int command_length,
                         char *description, char *long_description,
                         unsigned int options=ACL_OPT_NONE,
                         char *error_string=(char *) NULL);
    int acl_free_c(void **compiled_code, unsigned int options,
                   char *error_string);
    int acl_free_arg_info_c(int num_args, ACL_ARG_INFO *arg_info);
    int acl_function_string_to_type(char const *string, int *type);
    int acl_function_text(int *num_functions, char ***function_names,
			  char ***argument_text=(char ***) NULL,
			  char ***oneline_help=(char ***) NULL);
    int acl_function_type_to_string_c(int function_type, char *string);
    int acl_get_devices_c(void *compiled_code, unsigned int options,
                          ARRAY_DEVICE_DATA **read_devices, int *num_reading,
                          ARRAY_DEVICE_DATA **set_devices, int *num_setting,
                          char *error_string);
    int acl_get_execution_line_number(int *line_number);
    int acl_get_program_script_info_c(char const *program, int list,
				      int *num_scripts,
				      ACL_PROGRAM_SCRIPT_INFO **program_scripts);
    int acl_get_user_db_edit_permission(char *user_name, int *permission);
    int acl_get_user_execution_privilege(char const *user_name, int *priv_class,
					 int *priv_level=(int *) NULL);
    int acl_get_window_id(void);
    char *acl_help_file_names(char **function_help=(char **) NULL,
			      char **command_line_help=(char **) NULL);
    int acl_info_c(char const *command_text, int command_length,
                   unsigned int options, char **symbol_names,
                   int *num_symbols, char **read_devices,
                   int *num_read_devices, char **set_devices,
                   int *num_set_devices, char *error_string,
                   char **subst_strings=(char **) NULL,
                   int *num_subst_str=(int *) NULL,
                   ACL_ARG_INFO **device_info=(ACL_ARG_INFO **) NULL,
                   int *num_device_info=(int *) NULL,
                   ACL_ARG_INFO **string_info=(ACL_ARG_INFO **) NULL,
                   int *num_string_info=(int *) NULL);
    int acl_input_script_arguments_c(char const *command_text,
				     int command_length,
				     int *num_device_args,
				     char **device_args,
				     int *num_string_args,
				     char ***string_args,
				     unsigned int options=ACL_OPT_NONE);
    int acl_interactive_c(char *title, int top_row, int left_column,
			  int num_rows, int num_columns);
    int acl_interrupt_execution_c(int line_number=ACL_INTERRUPT_NOW);
    int acl_launch_server_info(short *node, char *process_name);
    int acl_log_file_c(char *log_file, unsigned int options);
    FILE *acl_open_script_file(char *file_name, char *mode,
			       char *ret_file_name=(char *) NULL,
			       int max_return=0);
    int acl_parse_script_argument_string_c(char const *string, int length,
					   int *num_device_args,
					   char **device_arguments,
					   int *num_string_args,
					   char ***string_arguments,
					   unsigned int options=ACL_OPT_NONE);
    int acl_parse_symbol_name(char *string, char *symbol_name,
			      int *array_index, int *num_elements,
			      unsigned int options=ACL_OPT_NONE,
			      int *num_indices=(int *) NULL,
			      int **array_indices=(int **) NULL);
    int acl_program_script_menu_c(int top_row, int left_column,
				  char const *program, int list,
				  char const *title=(char *) NULL,
				  int execute_it=FALSE,
				  char *script_name=(char *) NULL,
				  unsigned int options=ACL_OPT_NONE);
    int acl_read_intrinsic_symbol_names(char **symbol_names, int *num_symbols,
					unsigned int options=ACL_OPT_NONE);
    int acl_read_last_error_info(ACL_LAST_ERROR_INFO *last_error_info);
    int acl_read_last_execution_info(ACL_EXECUTION_INFO *execution_info);
    int acl_read_last_run_command_info(ACL_RUN_COMMAND_INFO *run_command_info);
    int acl_read_symbol_c(char *symbol_name, void *value, int *value_type,
                          int *value_length, int desired_type,
                          int max_return, unsigned int options=ACL_OPT_NONE,
                          int array_index=0, int num_indices=1,
			  int *array_indices=(int *) NULL);
    int acl_read_symbol_as_string_c(char *symbol_name, char ***strings,
				    int *value_type,
				    int *num_returned=(int *) NULL,
				    int *return_index=(int *) NULL,
				    unsigned int options=ACL_OPT_NONE,
				    int array_index=CLIB_DEFAULT_ARG,
				    int num_elements=CLIB_DEFAULT_ARG);
    int acl_read_symbol_dynamic_info_c(char *symbol_name,
				       unsigned int options,
				       ACL_SYMBOL_DYNAMIC_DATA *dynamic_info);
    int acl_read_symbol_info_c(char *symbol_name, unsigned int options,
                               int *value_type, int *value_length,
                               int *num_elements,
			       int *num_dimensions=(int *) NULL,
			       int **dimension_sizes=(int **) NULL);
    int acl_read_symbol_names(char **symbol_names, int *num_symbols,
                              unsigned int options=ACL_OPT_NONE);
    int acl_register_debugger_func(acl_debugger_function debugger_func,
				   void *callback_data=(void *) NULL);
    int acl_register_host_request_func(acl_host_request_function request_func);
    int acl_register_login_func(acl_login_function login_func,
				void *callback_data=(void *) NULL);
    int acl_register_terminal_size_func(acl_terminal_size_function term_size_func,
					void *callback_data=(void *) NULL);
    int acl_register_user_exit_handler(acl_exit_handler_function func,
				       void *callback_data=(void *) NULL);
    int acl_reinit_symbol(char *symbol_name);
    int acl_remove_remote_message_callback(remote_acl_message_handler message_handler,
					   void *handler_data);
    int acl_resume_execution(void);
    int acl_script_argument_info_c(void *script, int script_type,
				   unsigned int options=ACL_OPT_NONE,
				   int *num_device_args=(int *) NULL,
				   int *num_string_args=(int *) NULL,
				   int *num_device_arg_info=(int *) NULL,
				   ACL_ARG_INFO **device_arg_info=(ACL_ARG_INFO **) NULL,
				   int *num_string_arg_info=(int *) NULL,
				   ACL_ARG_INFO **ret_string_arg_info=(ACL_ARG_INFO **) NULL,
				   char *error_string=(char *) NULL);
    int acl_script_has_setting_c(void *script, int script_type,
				 unsigned int options=ACL_OPT_NONE,
				 int *has_setting=(int *) NULL,
				 char *error_string=(char *) NULL);
    int acl_script_has_symbol_list_c(void *script, int script_type,
				     char *symbol_names, int num_symbols,
				     unsigned int options, int *has_symbol,
				     char *error_string=(char *) NULL);
    int acl_script_is_executing(void);
    int acl_search_db_files_c(char *search_string, unsigned int options,
			      int *num_matches,
			      ACL_DB_SEARCH_DATA **match_data=(ACL_DB_SEARCH_DATA **) NULL);
    int acl_set_debugger_break_by_command_c(int command_type, int set_it);
    int acl_set_debugger_break_by_line_c(int line_number, int set_it);
    int acl_set_debugger_mode_c(int mode);
    int acl_set_program_script_path(char const *path);
    int acl_set_symbol_c(char *symbol_name, void *value, int value_type,
                         int value_length, unsigned int options,
                         int array_index=0, int num_indices=1,
			 int *array_indices=(int *) NULL);
    int acl_translate_command_string(char *string, char *command_string);
    int acl_translate_function_string(char *string, char *function_string);
    int acl_unregister_debugger_func(void);
    int acl_unregister_host_request_func(void);
    int acl_unregister_login_func(void);
    int acl_unregister_terminal_size_func(void);
    int acl_unregister_user_exit_handler(acl_exit_handler_function func,
					 void *callback_data=(void *) NULL);
    int acl_value_type_to_string_c(int value_type, char *string);
    int current_ul_acl_installed(void);
    short get_acld_node(void);
    int running_current_ul_acl(void);
    int running_test_ul_acl(void);
    char *ul_acl_date(void);
    char *ul_acl_tag(void);
    int ul_acl_type(void);
    void ul_acl_version_strings(char *name=(char *) NULL,
    				char *build_date=(char *) NULL,
				char *build_host=(char *) NULL,
				char *build_dir=(char *) NULL,
				char *tag=(char *) NULL,
				char *tag_date=(char *) NULL);

#ifdef __cplusplus
}
#endif


/******************************************************************************/
/*
**	equivalent name definitions
*/
/******************************************************************************/

    #define	ACL_ADD_PROGRAM_SCRIPT_MENU_ENTRY_C	acl_add_program_script_menu_entry_c
    #define	ACL_ADD_REMOTE_MESSAGE_CALLBACK	acl_add_remote_message_callback
    #define	ACL_CANCEL_REQUESTS_C		acl_cancel_requests_c
    #define	ACL_CLEAR_ALL_DEBUGGER_BREAKS	acl_clear_all_debugger_breaks
    #define	ACL_CLOSE			acl_close
    #define	ACL_COMMAND_STRING_TO_TYPE	acl_command_string_to_type
    #define	ACL_COMMAND_TEXT		acl_command_text
    #define	ACL_COMMAND_TYPE_TO_STRING_C	acl_command_type_to_string_c
    #define	ACL_COMPILE_C			acl_compile_c
    #define	ACL_COPY_ARG_INFO_C		acl_copy_arg_info_c
    #define	ACL_DB_FILE_EXISTS_C		acl_db_file_exists_c
    #define	ACL_DEFAULT_DATA_SOURCE_C	acl_default_data_source_c
    #define	ACL_DEFAULT_SCRIPT_PATH_C	acl_default_script_path_c
    #define	ACL_DELETE_SYMBOL		acl_delete_symbol
    #define	ACL_EXECUTE_C			acl_execute_c
    #define	ACL_EXECUTE_ALWAYS_BLOCK_C	acl_execute_always_block_c
    #define	ACL_EXECUTE_FILE_IN_WINDOW_C	acl_execute_file_in_window_c
    #define	ACL_EXECUTE_IN_WINDOW_C		acl_execute_in_window_c
    #define	ACL_EXPAND_FILE_NAME_C		acl_expand_file_name_c
    #define	ACL_FILE_EXECUTE_C		acl_file_execute_c
    #define	ACL_FILE_EXISTS_C		acl_file_exists_c
    #define	ACL_FILE_IS_IN_REPOSITORY_C	acl_file_is_in_repository_c
    #define	ACL_FILE_READ_C			acl_file_read_c
    #define	ACL_FILE_READ_AUTHOR_C		acl_file_read_author_c
    #define	ACL_FILE_READ_DESCRIPTION_C	acl_file_read_descriptrion_c
    #define	ACL_FILE_READ_KEEPER_C		acl_file_read_keeper_c
    #define	ACL_FILE_READ_TITLE_C		acl_file_read_title_c
    #define	ACL_FILE_READ_VERSION_C		acl_file_read_version_c
    #define	ACL_FILE_STATS_C		acl_file_stats_c
    #define	ACL_FILE_WRITE_C		acl_file_write_c
    #define	ACL_FREE_C			acl_free_c
    #define	ACL_FREE_ARG_INFO_C		acl_free_arg_info_c
    #define	ACL_FUNCTION_STRING_TO_TYPE	acl_function_string_to_type
    #define	ACL_FUNCTION_TEXT		acl_function_text
    #define	ACL_FUNCTION_TYPE_TO_STRING_C	acl_function_type_to_string_c
    #define	ACL_GET_DEVICES_C		acl_get_devices_c
    #define	ACL_GET_EXECUTION_LINE_NUMBER	acl_get_execution_line_number
    #define	ACL_GET_PROGRAM_SCRIPT_INFO_C	acl_get_program_script_info_c
    #define	ACL_GET_USER_DB_EDIT_PERMISSION	acl_get_user_db_edit_permission
    #define	ACL_GET_USER_EXECUTION_PRIVILEGE	acl_get_user_execution_privilege
    #define	ACL_GET_WINDOW_ID		acl_get_window_id
    #define	ACL_HELP_FILE_NAMES		acl_help_file_names
    #define	ACL_INFO_C			acl_info_c
    #define	ACL_INPUT_SCRIPT_ARGUMENTS_C	acl_input_script_arguments_c
    #define	ACL_INTERACTIVE_C		acl_interactive_c
    #define	ACL_LAUNCH_SERVER_INFO		acl_launch_server_info
    #define	ACL_LOG_FILE_C			acl_log_file_c
    #define	ACL_OPEN_SCRIPT_FILE		acl_open_script_file
    #define	ACL_PARSE_SCRIPT_ARGUMENT_STRING_C	acl_parse_script_argument_string_c
    #define	ACL_PARSE_SYMBOL_NAME		acl_parse_symbol_name
    #define	ACL_PROGRAM_SCRIPT_MENU_C	acl_program_script_menu_c
    #define	ACL_READ_LAST_ERROR_INFO	acl_read_last_error_info
    #define	ACL_READ_LAST_EXECUTION_INFO	acl_read_last_execution_info
    #define	ACL_READ_LAST_RUN_COMMAND_INFO	acl_read_last_run_command_info
    #define	ACL_READ_SYMBOL_C		acl_read_symbol_c
    #define	ACL_READ_SYMBOL_AS_STRING_C	acl_read_symbol_as_string_c
    #define	ACL_READ_SYMBOL_DYNAMIC_INFO_C	acl_read_symbol_dynamic_info_c
    #define	ACL_READ_SYMBOL_INFO_C		acl_read_symbol_info_c
    #define	ACL_READ_SYMBOL_NAMES		acl_read_symbol_names
    #define	ACL_REGISTER_DEBUGGER_FUNC	acl_register_debugger_func
    #define	ACL_REGISTER_HOST_REQUEST_FUNC	acl_register_host_request_func
    #define	ACL_REGISTER_LOGIN_FUNC		acl_register_login_func
    #define	ACL_REGISTER_TERMINAL_SIZE_FUNC	acl_register_terminal_size_func
    #define	ACL_REGISTER_USER_EXIT_HANDLER	acl_register_user_exit_handler
    #define	ACL_REINIT_SYMBOL		acl_reinit_symbol
    #define	ACL_REMOVE_REMOTE_MESSAGE_CALLBACK	acl_remove_remote_message_callback
    #define	ACL_SCRIPT_ARGUMENT_INFO_C	acl_script_argument_info_c
    #define	ACL_SCRIPT_HAS_SETTING_C	acl_script_has_setting_c
    #define	ACL_SCRIPT_HAS_SYMBOL_LIST_C	acl_script_has_symbol_list_c
    #define	ACL_SCRIPT_IS_EXECUTING		acl_script_is_executing
    #define	ACL_SEARCH_DB_FILES_C		acl_search_db_files_c
    #define	ACL_SET_DEBUGGER_BREAK_BY_COMMAND_C	acl_set_debugger_break_by_command_c
    #define	ACL_SET_DEBUGGER_BREAK_BY_LINE_C	acl_set_debugger_break_by_line_c
    #define	ACL_SET_DEBUGGER_MODE_C		acl_set_debugger_mode_c
    #define	ACL_SET_PROGRAM_SCRIPT_PATH	acl_set_program_script_path
    #define	ACL_SET_SYMBOL_C		acl_set_symbol_c
    #define	ACL_TRANSLATE_COMMAND_STRING	acl_translate_command_string
    #define	ACL_TRANSLATE_FUNCTION_STRING	acl_translate_function_string
    #define	ACL_UNREGISTER_DEBUGGER_FUNC	acl_unregister_debugger_func
    #define	ACL_UNREGISTER_HOST_REQUEST_FUNC	acl_unregister_host_request_func
    #define	ACL_UNREGISTER_LOGIN_FUNC	acl_unregister_login_func
    #define	ACL_UNREGISTER_TERMINAL_SIZE_FUNC	acl_unregister_terminal_size_func
    #define	ACL_UNREGISTER_USER_EXIT_HANDLER	acl_unregister_user_exit_handler
    #define	ACL_VALUE_TYPE_TO_STRING_C	acl_value_type_to_string_c
    #define	CURRENT_UL_ACL_INSTALLED	current_ul_acl_installed
    #define	GET_ACLD_NODE			get_acld_node
    #define	RUNNING_CURRENT_UL_ACL		running_current_ul_acl
    #define	RUNNING_TEST_UL_ACL		running_test_ul_acl
    #define	UL_ACL_DATE			ul_acl_date
    #define	UL_ACL_TAG			ul_acl_tag
    #define	UL_ACL_TYPE			ul_acl_type
    #define	UL_ACL_VERSION_STRINGS		ul_acl_version_strings

#endif