Initial import of the CDE 2.1.30 sources from the Open Group.
This commit is contained in:
74
cde/osf/uil/Imakefile
Normal file
74
cde/osf/uil/Imakefile
Normal file
@@ -0,0 +1,74 @@
|
||||
XCOMM
|
||||
XCOMM @OSF_COPYRIGHT@
|
||||
XCOMM COPYRIGHT NOTICE
|
||||
XCOMM Copyright (c) 1990, 1991, 1992, 1993 Open Software Foundation, Inc.
|
||||
XCOMM ALL RIGHTS RESERVED (MOTIF). See the file named COPYRIGHT.MOTIF for
|
||||
XCOMM the full copyright text.
|
||||
XCOMM
|
||||
XCOMM
|
||||
XCOMM HISTORY
|
||||
XCOMM
|
||||
XCOMM $TOG: Imakefile /main/23 1997/07/03 12:32:45 samborn $
|
||||
|
||||
#define DoNormalLib NormalLibUil
|
||||
#define DoSharedLib SharedLibUil
|
||||
#define DoDebugLib DebugLibUil
|
||||
#define DoProfileLib ProfileLibUil
|
||||
#define LibName Uil
|
||||
#define SoRev SOUILREV
|
||||
#define HasSharedData NO
|
||||
#define IncSubdir uil
|
||||
|
||||
#ifdef SharedUilReqs
|
||||
REQUIREDLIBS = SharedUilReqs
|
||||
#endif
|
||||
|
||||
INCLUDES = -I. -I$(INCLUDESRC) -I$(MINCLUDESRC) -I$(MLIBSRC) -I$(MTOP)/include
|
||||
DEPLIBS2 = MrmClientDepLibs
|
||||
LOCAL_LIBRARIES = MrmClientLibs
|
||||
LINTLIBS = $(LINTMRESOURCE) $(LINTXMLIB) $(LINTXMTOOL) $(LINTXLIB)
|
||||
|
||||
COMMON_SRC = UilCmd.c UilDiags.c UilKeyTab.c UilLexAna.c \
|
||||
UilLexPars.c UilLstLst.c UilP2Out.c UilP2Reslv.c \
|
||||
UilSarComp.c UilSarExp.c UilSarInc.c UilSarMod.c \
|
||||
UilSarObj.c UilSarProc.c UilSarVal.c UilSrcSrc.c \
|
||||
UilSymNam.c UilSymStor.c UilData.c \
|
||||
UilLstMac.c UilSemVal.c UilSemCSet.c UilDB.c
|
||||
|
||||
SRCS = $(COMMON_SRC) UilParser.c
|
||||
SRCS2 = $(COMMON_SRC) UilMain.c
|
||||
|
||||
COMMON_OBJ = UilCmd.o UilDiags.o UilKeyTab.o UilLexAna.o \
|
||||
UilLexPars.o UilLstLst.o UilP2Out.o UilP2Reslv.o \
|
||||
UilSarComp.o UilSarExp.o UilSarInc.o UilSarMod.o \
|
||||
UilSarObj.o UilSarProc.o UilSarVal.o UilSrcSrc.o \
|
||||
UilSymNam.o UilSymStor.o UilData.o \
|
||||
UilLstMac.o UilSemVal.o UilSemCSet.o UilDB.o
|
||||
|
||||
OBJS = $(COMMON_OBJ) UilParser.o
|
||||
OBJS2 = $(COMMON_OBJ) UilMain.o
|
||||
|
||||
HEADERS = Uil.h UilSymGl.h UilDBDef.h UilSymDef.h \
|
||||
UilDef.h XmAppl.uil
|
||||
|
||||
#include <Library.tmpl>
|
||||
|
||||
PROGRAMS = uil
|
||||
|
||||
AllTarget($(PROGRAMS))
|
||||
|
||||
MComplexProgramTarget_2(uil,$(LOCAL_LIBRARIES),NullParameter)
|
||||
|
||||
SpecialLibObjectRule(UilDB.o,NullParameter,-DLIBDIR='"'$(XPROJECTROOT)/lib/X11'"' -DINCDIR='"'$(XPROJECTROOT)/include/X11'"')
|
||||
|
||||
LinkFile(UilParser.c,UilMain.c)
|
||||
SpecialLibObjectRule(UilParser.o,NullParameter,-DCALLABLE)
|
||||
|
||||
|
||||
DependTarget3($(COMMON_SRC),UilMain.c,UilParser.c)
|
||||
|
||||
#ifdef UseVista
|
||||
VistaMapRule(uil.M,libUil.a)
|
||||
#endif
|
||||
|
||||
MessageCatalogRule(Uil)
|
||||
157
cde/osf/uil/Uil.h
Normal file
157
cde/osf/uil/Uil.h
Normal file
@@ -0,0 +1,157 @@
|
||||
/*
|
||||
* @OSF_COPYRIGHT@
|
||||
* COPYRIGHT NOTICE
|
||||
* Copyright (c) 1990, 1991, 1992, 1993 Open Software Foundation, Inc.
|
||||
* ALL RIGHTS RESERVED (MOTIF). See the file named COPYRIGHT.MOTIF for
|
||||
* the full copyright text.
|
||||
*/
|
||||
/*
|
||||
* HISTORY
|
||||
*/
|
||||
/* $XConsortium: Uil.h /main/11 1995/07/14 09:32:19 drk $ */
|
||||
|
||||
/*
|
||||
* (c) Copyright 1989, 1990, DIGITAL EQUIPMENT CORPORATION, MAYNARD, MASS. */
|
||||
|
||||
/*
|
||||
**++
|
||||
** FACILITY:
|
||||
**
|
||||
** User Interface Language Compiler (UIL)
|
||||
**
|
||||
** ABSTRACT:
|
||||
**
|
||||
** This include file defines the set of definitions for use with
|
||||
** UIL compiler callable interface.
|
||||
**
|
||||
**--
|
||||
**/
|
||||
|
||||
#ifndef Uil_h
|
||||
#define Uil_h
|
||||
|
||||
/*
|
||||
**
|
||||
** INCLUDE FILES
|
||||
**
|
||||
**/
|
||||
|
||||
|
||||
|
||||
/*
|
||||
**
|
||||
** Definition of Compiler Severity Statuses
|
||||
**
|
||||
*/
|
||||
|
||||
typedef unsigned int Uil_status_type;
|
||||
#define Uil_k_min_status 0
|
||||
#define Uil_k_success_status 0
|
||||
#define Uil_k_info_status 1
|
||||
#define Uil_k_warning_status 2
|
||||
#define Uil_k_error_status 3
|
||||
#define Uil_k_severe_status 4
|
||||
#define Uil_k_max_status 4
|
||||
|
||||
/*
|
||||
**
|
||||
*/
|
||||
|
||||
typedef char (*string_array)[];
|
||||
#define CEIL(a,b) ((a) < (b) ? (a) : (b))
|
||||
|
||||
|
||||
/*
|
||||
** Uil_command_type -- Input which describes how/what to compile.
|
||||
*/
|
||||
|
||||
typedef struct _Uil_command_type
|
||||
{
|
||||
char *source_file; /* single source to compile */
|
||||
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 */
|
||||
/* includes 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 issue_summary: 1; /* issue diagnostics summary */
|
||||
|
||||
unsigned int status_update_delay; /* Number of times a status */
|
||||
/* point is passed before */
|
||||
/* calling statusCB routine */
|
||||
/* 0 means called every time */
|
||||
char *database; /* name of database file */
|
||||
unsigned database_flag: 1; /* read a new database file */
|
||||
unsigned use_setlocale_flag: 1; /* Enable calls to setlocale */
|
||||
} Uil_command_type;
|
||||
|
||||
|
||||
|
||||
/*
|
||||
** Uil_compile_desc_type -- Output information about the compilation including
|
||||
** the compiler_version, data_structure_version, parse tree, and error counts.
|
||||
*/
|
||||
|
||||
typedef struct _Uil_comp_desc
|
||||
{
|
||||
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 */
|
||||
} Uil_compile_desc_type;
|
||||
|
||||
|
||||
|
||||
|
||||
/*
|
||||
** Uil_continue_type -- A value returned from a Uil callback routine which
|
||||
** allows the application to specify whether to terminate or continue the
|
||||
** compilation.
|
||||
*/
|
||||
|
||||
typedef unsigned int Uil_continue_type;
|
||||
#define Uil_k_terminate 0
|
||||
#define Uil_k_continue 1
|
||||
|
||||
|
||||
|
||||
/*
|
||||
**
|
||||
** Entry Points
|
||||
**
|
||||
*/
|
||||
|
||||
#ifndef _ARGUMENTS
|
||||
#define _ARGUMENTS(arglist) arglist
|
||||
#endif
|
||||
|
||||
#if defined(__cplusplus) || defined(c_plusplus)
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
extern Uil_status_type Uil
|
||||
_ARGUMENTS((
|
||||
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 ));
|
||||
|
||||
|
||||
#if defined(__cplusplus) || defined(c_plusplus)
|
||||
}
|
||||
#endif
|
||||
|
||||
#undef _ARGUMENTS
|
||||
|
||||
|
||||
#endif /* Uil_h */
|
||||
/* DON'T ADD STUFF AFTER THIS #endif */
|
||||
97
cde/osf/uil/Uil.msg
Normal file
97
cde/osf/uil/Uil.msg
Normal file
@@ -0,0 +1,97 @@
|
||||
$ $XConsortium: Uil.msg /main/4 1996/08/19 11:53:43 pascale $
|
||||
$set UIL_SET1
|
||||
|
||||
UIL_0 duplicate option \"%s\" was ignored
|
||||
UIL_1 unknown option \"%s\" was ignored
|
||||
UIL_2 additional UIL source file: %s was ignored
|
||||
UIL_3 error opening source file: %s
|
||||
UIL_4 error reading next line of source file: %s
|
||||
UIL_5 Internal error: %s
|
||||
UIL_6 line truncated at %d characters
|
||||
UIL_7 value of %s is out of range %s
|
||||
UIL_8 %s not terminated %s
|
||||
UIL_9 unprintable character \\%d\\ ignored
|
||||
UIL_10 unknown sequence \"%s\" ignored
|
||||
UIL_11 unknown escape sequence \"\\%c\" - \\ ignored
|
||||
UIL_12 name exceeds %d characters - truncated to: %s
|
||||
UIL_13 compiler ran out of virtual memory
|
||||
UIL_14 unexpected %s token found - parsing resumes after \"%c\"
|
||||
UIL_15 %s %s must be defined before this reference
|
||||
UIL_16 context requires a %s - %s was specified
|
||||
UIL_17 %s is not implemented yet
|
||||
UIL_18 found %s value when expecting %s value
|
||||
UIL_19 the %s %s is not supported for the %s object
|
||||
UIL_20 this %s %s supersedes a previous definition in this %s %s
|
||||
UIL_21 name %s previously defined as %s
|
||||
UIL_22 value used in this context must be private
|
||||
UIL_23 procedure %s was previously declared with %d arguments
|
||||
UIL_24 found %s value - procedure %s argument must be %s value
|
||||
UIL_25 found %s %s when expecting %s %s
|
||||
UIL_26 %s %s was never defined
|
||||
UIL_27 %s %s already specified for this %s %s
|
||||
UIL_28 %s item not allowed in %s %s
|
||||
UIL_29 compilation terminated - please fix previous errors
|
||||
UIL_30 internal error - please submit defect report
|
||||
UIL_31
|
||||
UIL_32 %s missing following \"%s\" option
|
||||
UIL_33 error opening listing file: %s
|
||||
UIL_34 error writing to listing file: %s
|
||||
UIL_35 invalid module structure - check UIL module syntax
|
||||
UIL_36 too many source files open: %s
|
||||
UIL_37 source line contains a null character
|
||||
UIL_38 errors: %d warnings: %d informationals: %d
|
||||
UIL_39 error opening UID file: %s
|
||||
UIL_40 no UID file was produced
|
||||
UIL_41 creation procedure is not supported by the %s widget
|
||||
UIL_42 creation procedure is not allowed in a %s widget reference
|
||||
UIL_43 creation procedure is required in a %s widget declaration
|
||||
UIL_44 a NULL character in a string is not supported
|
||||
UIL_45 widget %s is part of a circular definition
|
||||
UIL_46 no source file specified
|
||||
UIL_47 %s %s supports only a single %s %s
|
||||
UIL_48 %s widget supports only a single control
|
||||
UIL_49 unknown character set
|
||||
UIL_50 place names clause before other module clauses
|
||||
UIL_51 color letter string must be a single character
|
||||
UIL_52 color letter used for prior color in this table
|
||||
UIL_53 row %d must have same width as row 1
|
||||
UIL_54 row %d, column %d: letter \"%c\" not in color table
|
||||
UIL_55 too many %ss in %s, limit is %d
|
||||
UIL_56 Subqualifier not allowed with negated qualifier
|
||||
UIL_57 %s gadget is not supported - %s widget will be used instead
|
||||
UIL_58 %s type is not valid for %s
|
||||
UIL_59 support for this character set may be removed in a future release
|
||||
UIL_60 the %s constraint is not supported for the %s %s
|
||||
UIL_61 too many \"%s\" options, limit is %d
|
||||
UIL_62 error closing source file: %s
|
||||
UIL_63 the %s value is circularly defined
|
||||
UIL_64 overriding built-in name %s
|
||||
UIL_65 the %s argument does not support enumerated values
|
||||
UIL_66 the %s argument does not support the %s enumerated value
|
||||
UIL_67 $LANG contains an unknown character set
|
||||
UIL_68 the %s object's controls hierarchy contains a reference to itself
|
||||
UIL_69 value %s is too large for context buffer
|
||||
UIL_70 forward referencing is not allowed for %s
|
||||
UIL_71 cannot convert %s type to %s type
|
||||
UIL_72 %s is invalid
|
||||
UIL_V2_73 error reading binary database
|
||||
UIL_V2_74 binary database compiled with a future version
|
||||
UIL_V2_75 error opening database file: %s
|
||||
UIL_V2_76 error writing UID file: %s
|
||||
UIL_V2_77 '%s' is an unknown Toolkit class record name
|
||||
UIL_78 invalid include file name
|
||||
UIL_V2_79 incompatible unit types for arithmetic operation
|
||||
UIL_V2_80 %s used as charset name; %s used as charset component
|
||||
|
||||
$set UIL_VALUES
|
||||
UIL_VAL_0 ** error **
|
||||
UIL_VAL_1 ** unknown **
|
||||
|
||||
$set UIL_SET_MISC
|
||||
|
||||
UIL_INF Info:
|
||||
UIL_WAR Warning:
|
||||
UIL_ERR Error:
|
||||
UIL_SEV Severe:
|
||||
UIL_MISC_0 \t\t line: %d file: %s
|
||||
UIL_MISC_1 \t\t line: %d position: %d file: %s
|
||||
310
cde/osf/uil/UilCmd.c
Normal file
310
cde/osf/uil/UilCmd.c
Normal file
@@ -0,0 +1,310 @@
|
||||
/*
|
||||
* @OSF_COPYRIGHT@
|
||||
* COPYRIGHT NOTICE
|
||||
* Copyright (c) 1990, 1991, 1992, 1993 Open Software Foundation, Inc.
|
||||
* ALL RIGHTS RESERVED (MOTIF). See the file named COPYRIGHT.MOTIF for
|
||||
* the full copyright text.
|
||||
*/
|
||||
/*
|
||||
* HISTORY
|
||||
*/
|
||||
#ifdef REV_INFO
|
||||
#ifndef lint
|
||||
static char rcsid[] = "$XConsortium: UilCmd.c /main/11 1995/07/14 09:32:29 drk $"
|
||||
#endif
|
||||
#endif
|
||||
|
||||
/*
|
||||
* (c) Copyright 1989, 1990, DIGITAL EQUIPMENT CORPORATION, MAYNARD, MASS. */
|
||||
|
||||
/*
|
||||
**++
|
||||
** FACILITY:
|
||||
**
|
||||
** User Interface Language Compiler (UIL)
|
||||
**
|
||||
** ABSTRACT:
|
||||
**
|
||||
** Command line interpreter for the
|
||||
**
|
||||
**--
|
||||
**/
|
||||
|
||||
/*
|
||||
**
|
||||
** INCLUDE FILES
|
||||
**
|
||||
**/
|
||||
|
||||
|
||||
#include "UilDefI.h"
|
||||
#include "UilCmdDef.h"
|
||||
|
||||
|
||||
/*
|
||||
**
|
||||
** GLOBAL DECLARATIONS
|
||||
**
|
||||
**/
|
||||
|
||||
externaldef(uil_comp_glbl) cmd_command_line_type Uil_cmd_z_command;
|
||||
|
||||
|
||||
|
||||
/*
|
||||
**++
|
||||
** FUNCTIONAL DESCRIPTION:
|
||||
**
|
||||
** This procedure parses the command line and places the
|
||||
** results of the parse in the global structure "Uil_cmd_z_command".
|
||||
**
|
||||
** FORMAL PARAMETERS:
|
||||
**
|
||||
** l_arg_count: number of command arguments
|
||||
** rac_arg_value: array of pointers to null terminated character strings
|
||||
** each of which is one of the command line arguments
|
||||
**
|
||||
** IMPLICIT INPUTS:
|
||||
**
|
||||
** none
|
||||
**
|
||||
** IMPLICIT OUTPUTS:
|
||||
**
|
||||
** Uil_cmd_z_command: respository for command line info
|
||||
**
|
||||
** FUNCTION VALUE:
|
||||
**
|
||||
** void
|
||||
**
|
||||
** SIDE EFFECTS:
|
||||
**
|
||||
** Uil_cmd_z_command is set
|
||||
**
|
||||
**--
|
||||
**/
|
||||
void cmd_decode_command_line( l_arg_count, rac_arg_value )
|
||||
int l_arg_count;
|
||||
char *rac_arg_value[ ];
|
||||
|
||||
{
|
||||
static char *include_list [Uil_k_max_include_dir_count];
|
||||
int i;
|
||||
|
||||
Uil_cmd_z_command.ac_source_file = NULL;
|
||||
Uil_cmd_z_command.ac_resource_file = NULL;
|
||||
Uil_cmd_z_command.ac_listing_file = NULL;
|
||||
Uil_cmd_z_command.include_dir_count = 0;
|
||||
Uil_cmd_z_command.ac_include_dir = (char **)include_list;
|
||||
Uil_cmd_z_command.v_resource_file = TRUE;
|
||||
Uil_cmd_z_command.v_listing_file = FALSE;
|
||||
Uil_cmd_z_command.v_show_machine_code = FALSE;
|
||||
Uil_cmd_z_command.v_report_info_msg = TRUE;
|
||||
Uil_cmd_z_command.v_report_warn_msg = TRUE;
|
||||
Uil_cmd_z_command.v_parse_tree = FALSE;
|
||||
Uil_cmd_z_command.v_use_setlocale = FALSE;
|
||||
Uil_cmd_z_command.status_update_delay = 0;
|
||||
Uil_cmd_z_command.message_cb = (Uil_continue_type(*)())NULL;
|
||||
Uil_cmd_z_command.status_cb = (Uil_continue_type(*)())NULL;
|
||||
Uil_cmd_z_command.ac_database = NULL;
|
||||
Uil_cmd_z_command.v_database = FALSE;
|
||||
|
||||
#if debug_version
|
||||
uil_v_dump_tokens = FALSE;
|
||||
uil_v_dump_symbols = FALSE;
|
||||
#endif
|
||||
|
||||
/* traverse the options on the command line */
|
||||
|
||||
for (i = 1; i < l_arg_count; i++)
|
||||
{
|
||||
/* check for an output file */
|
||||
|
||||
if ( strcmp("-o", rac_arg_value[ i ]) == 0 )
|
||||
{
|
||||
/* the next argument is the output file name */
|
||||
|
||||
/* check next field is not an option */
|
||||
|
||||
if (((i+1) >= l_arg_count) ||
|
||||
( '-' == rac_arg_value[ i+1 ][ 0 ] ))
|
||||
{
|
||||
diag_issue_diagnostic
|
||||
( d_miss_opt_arg,
|
||||
diag_k_no_source, diag_k_no_column,
|
||||
rac_arg_value[ i ],
|
||||
"output file"
|
||||
);
|
||||
continue;
|
||||
}
|
||||
|
||||
if (Uil_cmd_z_command.ac_resource_file == NULL)
|
||||
Uil_cmd_z_command.ac_resource_file = rac_arg_value[ i+1 ];
|
||||
else
|
||||
diag_issue_diagnostic
|
||||
( d_dupl_opt,
|
||||
diag_k_no_source, diag_k_no_column,
|
||||
rac_arg_value[ i ]
|
||||
);
|
||||
i = i + 1;
|
||||
}
|
||||
|
||||
/* check for a binary database file */
|
||||
|
||||
else if ( strcmp("-wmd", rac_arg_value[ i ]) == 0 )
|
||||
{
|
||||
/* the next argument is the binary database file name */
|
||||
|
||||
/* check next field is not an option */
|
||||
|
||||
if (((i+1) >= l_arg_count) ||
|
||||
( '-' == rac_arg_value[ i+1 ][ 0 ] ))
|
||||
{
|
||||
diag_issue_diagnostic
|
||||
( d_miss_opt_arg,
|
||||
diag_k_no_source, diag_k_no_column,
|
||||
rac_arg_value[ i ],
|
||||
"binary database file"
|
||||
);
|
||||
continue;
|
||||
}
|
||||
|
||||
if (!Uil_cmd_z_command.v_database)
|
||||
{
|
||||
Uil_cmd_z_command.v_database = TRUE;
|
||||
Uil_cmd_z_command.ac_database = rac_arg_value[ i+1 ];
|
||||
}
|
||||
else
|
||||
diag_issue_diagnostic
|
||||
( d_dupl_opt,
|
||||
diag_k_no_source, diag_k_no_column,
|
||||
rac_arg_value[ i ]
|
||||
);
|
||||
i = i + 1;
|
||||
}
|
||||
|
||||
/* check for an listing file */
|
||||
|
||||
else if ( strcmp("-v", rac_arg_value[ i ]) == 0 )
|
||||
{
|
||||
/* the next argument is the listing file name */
|
||||
|
||||
/* check next field is not an option */
|
||||
|
||||
if (((i+1) >= l_arg_count) ||
|
||||
( '-' == rac_arg_value[ i+1 ][ 0 ] ))
|
||||
{
|
||||
diag_issue_diagnostic
|
||||
( d_miss_opt_arg,
|
||||
diag_k_no_source, diag_k_no_column,
|
||||
rac_arg_value[ i ],
|
||||
"listing file"
|
||||
);
|
||||
continue;
|
||||
}
|
||||
|
||||
if (!Uil_cmd_z_command.v_listing_file)
|
||||
{
|
||||
Uil_cmd_z_command.v_listing_file = TRUE;
|
||||
Uil_cmd_z_command.ac_listing_file = rac_arg_value[ i+1 ];
|
||||
}
|
||||
else
|
||||
diag_issue_diagnostic
|
||||
( d_dupl_opt,
|
||||
diag_k_no_source, diag_k_no_column,
|
||||
rac_arg_value[ i ]
|
||||
);
|
||||
i = i + 1;
|
||||
}
|
||||
|
||||
/* check for the machine code option */
|
||||
|
||||
else if ( strcmp("-m", rac_arg_value[ i ]) == 0 )
|
||||
{
|
||||
Uil_cmd_z_command.v_show_machine_code = TRUE;
|
||||
}
|
||||
|
||||
/* check if warnings are to be supressed */
|
||||
|
||||
else if ( strcmp("-w", rac_arg_value[ i ]) == 0 )
|
||||
{
|
||||
Uil_cmd_z_command.v_report_info_msg = FALSE;
|
||||
Uil_cmd_z_command.v_report_warn_msg = FALSE;
|
||||
}
|
||||
|
||||
/* check if setlocale is to be enabled */
|
||||
|
||||
else if ( strcmp("-s", rac_arg_value[ i ]) == 0 )
|
||||
{
|
||||
Uil_cmd_z_command.v_use_setlocale = TRUE;
|
||||
}
|
||||
|
||||
/* check for an unexpected option */
|
||||
|
||||
else if ( '-' == rac_arg_value[ i ][ 0 ] )
|
||||
{
|
||||
|
||||
/* check for an include directory */
|
||||
|
||||
if ( 'I' == rac_arg_value[ i ][ 1 ] )
|
||||
{
|
||||
if (Uil_cmd_z_command.include_dir_count < Uil_k_max_include_dir_count)
|
||||
|
||||
include_list[Uil_cmd_z_command.include_dir_count++] =
|
||||
& rac_arg_value[i] [2];
|
||||
else
|
||||
diag_issue_diagnostic
|
||||
( d_too_many_dirs,
|
||||
diag_k_no_source, diag_k_no_column,
|
||||
rac_arg_value[ i ], Uil_k_max_include_dir_count
|
||||
);
|
||||
} else
|
||||
{
|
||||
diag_issue_diagnostic
|
||||
( d_unknown_opt,
|
||||
diag_k_no_source, diag_k_no_column,
|
||||
rac_arg_value[ i ]
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
/* assume it is a UIL source file specification
|
||||
* validation of the file spec is done when file is opened */
|
||||
|
||||
else
|
||||
{
|
||||
if (Uil_cmd_z_command.ac_source_file == NULL)
|
||||
Uil_cmd_z_command.ac_source_file = rac_arg_value[ i ];
|
||||
else
|
||||
diag_issue_diagnostic
|
||||
( d_add_source,
|
||||
diag_k_no_source, diag_k_no_column,
|
||||
rac_arg_value[ i ]
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
** Check for a source file - otherwise issue a diagnostic.
|
||||
*/
|
||||
|
||||
if (Uil_cmd_z_command.ac_source_file == NULL)
|
||||
diag_issue_diagnostic
|
||||
( d_no_source, diag_k_no_source, diag_k_no_column );
|
||||
|
||||
if (Uil_cmd_z_command.ac_resource_file == NULL)
|
||||
{
|
||||
Uil_cmd_z_command.ac_resource_file = XtMalloc (strlen ("a.uid") + 1);
|
||||
strcpy (Uil_cmd_z_command.ac_resource_file,"a.uid");
|
||||
}
|
||||
|
||||
/*
|
||||
** Machine code listing only makes sense if listing is set.
|
||||
*/
|
||||
|
||||
Uil_cmd_z_command.v_show_machine_code =
|
||||
( Uil_cmd_z_command.v_listing_file &
|
||||
Uil_cmd_z_command.v_show_machine_code);
|
||||
}
|
||||
|
||||
|
||||
|
||||
72
cde/osf/uil/UilCmdDef.h
Normal file
72
cde/osf/uil/UilCmdDef.h
Normal file
@@ -0,0 +1,72 @@
|
||||
/*
|
||||
* @OSF_COPYRIGHT@
|
||||
* COPYRIGHT NOTICE
|
||||
* Copyright (c) 1990, 1991, 1992, 1993 Open Software Foundation, Inc.
|
||||
* ALL RIGHTS RESERVED (MOTIF). See the file named COPYRIGHT.MOTIF for
|
||||
* the full copyright text.
|
||||
*/
|
||||
/*
|
||||
* HISTORY
|
||||
*/
|
||||
/* $XConsortium: UilCmdDef.h /main/10 1995/07/14 09:32:45 drk $ */
|
||||
|
||||
/*
|
||||
* (c) Copyright 1989, 1990, DIGITAL EQUIPMENT CORPORATION, MAYNARD, MASS. */
|
||||
|
||||
/*
|
||||
**++
|
||||
** FACILITY:
|
||||
**
|
||||
** User Interface Language Compiler (UIL)
|
||||
**
|
||||
** ABSTRACT:
|
||||
**
|
||||
** This include file defines the interface to the UIL command line
|
||||
** processing.
|
||||
**
|
||||
**--
|
||||
**/
|
||||
|
||||
#ifndef UilCmdDef_h
|
||||
#define UilCmdDef_h
|
||||
|
||||
/*
|
||||
**
|
||||
** INCLUDE FILES
|
||||
**
|
||||
**/
|
||||
|
||||
|
||||
typedef struct
|
||||
{
|
||||
char *ac_source_file;
|
||||
char *ac_resource_file;
|
||||
char *ac_listing_file;
|
||||
unsigned int include_dir_count; /* number of directories in */
|
||||
/* ac_include_dir array */
|
||||
char **ac_include_dir; /* pointer to array of */
|
||||
/* directories to search for */
|
||||
/* includes in */
|
||||
unsigned v_listing_file: 1;
|
||||
unsigned v_resource_file: 1;
|
||||
unsigned v_show_machine_code: 1;
|
||||
unsigned v_report_info_msg: 1;
|
||||
unsigned v_report_warn_msg: 1;
|
||||
unsigned v_parse_tree: 1; /* generate parse tree */
|
||||
unsigned v_issue_summary: 1;
|
||||
|
||||
unsigned int status_update_delay; /* Number of times a status */
|
||||
/* point is passed before */
|
||||
/* calling statusCB routine */
|
||||
/* 0 means called every time */
|
||||
Uil_continue_type (*message_cb)();
|
||||
char *message_data;
|
||||
Uil_continue_type (*status_cb)();
|
||||
char *status_data;
|
||||
unsigned v_use_setlocale: 1; /* Allow localized strings */
|
||||
char *ac_database;
|
||||
unsigned v_database: 1;
|
||||
} cmd_command_line_type;
|
||||
|
||||
#endif /* UilCmdDef_h */
|
||||
/* DON'T ADD STUFF AFTER THIS #endif */
|
||||
125
cde/osf/uil/UilCompGl.h
Normal file
125
cde/osf/uil/UilCompGl.h
Normal file
@@ -0,0 +1,125 @@
|
||||
/*
|
||||
* @OSF_COPYRIGHT@
|
||||
* COPYRIGHT NOTICE
|
||||
* Copyright (c) 1990, 1991, 1992, 1993 Open Software Foundation, Inc.
|
||||
* ALL RIGHTS RESERVED (MOTIF). See the file named COPYRIGHT.MOTIF for
|
||||
* the full copyright text.
|
||||
*/
|
||||
/*
|
||||
* HISTORY
|
||||
*/
|
||||
/* $XConsortium: UilCompGl.h /main/10 1995/07/14 09:32:57 drk $ */
|
||||
|
||||
/*
|
||||
* (c) Copyright 1989, 1990, DIGITAL EQUIPMENT CORPORATION, MAYNARD, MASS. */
|
||||
|
||||
/*
|
||||
**++
|
||||
** FACILITY:
|
||||
**
|
||||
** User Interface Language Compiler (UIL)
|
||||
**
|
||||
** ABSTRACT:
|
||||
**
|
||||
** This include file contains external declarations of all Uil
|
||||
** compiler globals excluding those which define the recognized
|
||||
** language which are declared in UilSymGl.h
|
||||
**
|
||||
**--
|
||||
**/
|
||||
|
||||
#ifndef UilCompGl_h
|
||||
#define UilCompGl_h
|
||||
|
||||
#include <setjmp.h>
|
||||
|
||||
/*
|
||||
* Defined in UilCmd.c
|
||||
*/
|
||||
externalref cmd_command_line_type Uil_cmd_z_command;
|
||||
|
||||
/*
|
||||
* Defined in UilData
|
||||
*/
|
||||
externalref boolean uil_v_case_sensitive;
|
||||
externalref jmp_buf uil_az_error_env_block;
|
||||
externalref boolean uil_az_error_env_valid;
|
||||
#if debug_version
|
||||
externalref boolean uil_v_dump_tokens;
|
||||
externalref boolean uil_v_dump_symbols;
|
||||
#endif
|
||||
externalref status uil_l_compile_status;
|
||||
externalref Uil_compile_desc_type *Uil_compile_desc_ptr;
|
||||
externalref int Uil_percent_complete;
|
||||
externalref int Uil_lines_processed;
|
||||
externalref char *Uil_current_file;
|
||||
|
||||
/*
|
||||
* Defined in UilDiags
|
||||
*/
|
||||
externalref int Uil_message_count[];
|
||||
|
||||
/*
|
||||
* Defined in UilLexAna
|
||||
*/
|
||||
externalref int Uil_lex_l_user_default_charset;
|
||||
externalref sym_value_entry_type *Uil_lex_az_charset_entry;
|
||||
externalref int Uil_lex_l_charset_specified;
|
||||
externalref int Uil_lex_l_localized;
|
||||
externalref int Uil_lex_l_literal_charset;
|
||||
externalref sym_value_entry_type *Uil_lex_az_literal_charset;
|
||||
externalref char *comment_text;
|
||||
externalref int comment_size;
|
||||
/* % Complete */
|
||||
externalref int Uil_characters_read;
|
||||
|
||||
/*
|
||||
* Defined in UilLstLst
|
||||
*/
|
||||
externalref char Uil_lst_c_title2[];
|
||||
|
||||
/*
|
||||
* Defined in UilP2Out
|
||||
*/
|
||||
externalref IDBFile out_az_idbfile_id;
|
||||
|
||||
/*
|
||||
* Defined in UilSarMod
|
||||
*/
|
||||
externalref src_source_record_type *src_az_module_source_record;
|
||||
externalref unsigned short int *uil_urm_variant;
|
||||
externalref unsigned short int *uil_arg_compr;
|
||||
externalref unsigned short int *uil_reas_compr;
|
||||
externalref unsigned short int *uil_widget_compr;
|
||||
externalref unsigned short int *uil_child_compr;
|
||||
|
||||
/*
|
||||
* Defined in UilSrcSrc
|
||||
*/
|
||||
externalref src_source_buffer_type *src_az_current_source_buffer;
|
||||
externalref src_source_buffer_type *src_az_avail_source_buffer;
|
||||
externalref src_message_item_type *src_az_orphan_messages;
|
||||
externalref src_source_record_type *src_az_current_source_record;
|
||||
externalref src_source_record_type *src_az_first_source_record;
|
||||
externalref uil_fcb_type *src_az_source_file_table[];
|
||||
externalref int src_l_last_source_file_number;
|
||||
/* %COMPLETE */
|
||||
externalref long Uil_file_size;
|
||||
|
||||
/*
|
||||
* Defined in UilSymStor
|
||||
*/
|
||||
externalref sym_name_entry_type *sym_az_hash_table[];
|
||||
externalref sym_value_entry_type *sym_az_error_value_entry;
|
||||
externalref sym_external_def_entry_type *sym_az_external_def_chain;
|
||||
externalref sym_forward_ref_entry_type *sym_az_forward_ref_chain;
|
||||
externalref sym_val_forward_ref_entry_type *sym_az_val_forward_ref_chain;
|
||||
externalref sym_module_entry_type *sym_az_module_entry;
|
||||
externalref sym_root_entry_type *sym_az_root_entry;
|
||||
externalref sym_section_entry_type *sym_az_current_section_entry;
|
||||
externalref sym_entry_type *sym_az_entry_list_header;
|
||||
externalref URMPointerListPtr sym_az_allocated_nodes;
|
||||
externalref URMPointerListPtr sym_az_freed_nodes;
|
||||
|
||||
#endif /* UilCompGl_h */
|
||||
/* DON'T ADD STUFF AFTER THIS #endif */
|
||||
995
cde/osf/uil/UilDB.c
Normal file
995
cde/osf/uil/UilDB.c
Normal file
@@ -0,0 +1,995 @@
|
||||
/*
|
||||
* @OSF_COPYRIGHT@
|
||||
* COPYRIGHT NOTICE
|
||||
* Copyright (c) 1990, 1991, 1992, 1993 Open Software Foundation, Inc.
|
||||
* ALL RIGHTS RESERVED (MOTIF). See the file named COPYRIGHT.MOTIF for
|
||||
* the full copyright text.
|
||||
*/
|
||||
/*
|
||||
* HISTORY
|
||||
*/
|
||||
#ifdef REV_INFO
|
||||
#ifndef lint
|
||||
static char rcsid[] = "$XConsortium: UilDB.c /main/11 1996/11/21 20:03:11 drk $"
|
||||
#endif
|
||||
#endif
|
||||
|
||||
/*
|
||||
* (c) Copyright 1989, 1990, DIGITAL EQUIPMENT CORPORATION, MAYNARD, MASS. */
|
||||
|
||||
|
||||
/*
|
||||
*++
|
||||
* FACILITY:
|
||||
*
|
||||
* UIL Bindary Database :
|
||||
*
|
||||
* ABSTRACT:
|
||||
*
|
||||
*--
|
||||
*/
|
||||
|
||||
/*
|
||||
* This file contains routines which change the internal tables of UIL based on
|
||||
* a binary data base parameter in the command line
|
||||
*/
|
||||
|
||||
|
||||
/*
|
||||
*
|
||||
* INCLUDE FILES
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef X_NOT_STDC_ENV
|
||||
#include <stdlib.h>
|
||||
#include <unistd.h>
|
||||
#endif
|
||||
|
||||
#include <Mrm/MrmAppl.h>
|
||||
#include <Mrm/Mrm.h>
|
||||
|
||||
#include "UilDefI.h"
|
||||
|
||||
#define X_INCLUDE_PWD_H
|
||||
#define XOS_USE_XT_LOCKING
|
||||
#include <X11/Xos_r.h>
|
||||
#include <stdio.h>
|
||||
|
||||
/*
|
||||
*
|
||||
* TABLE OF CONTENTS
|
||||
*
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
/*
|
||||
*
|
||||
* DEFINE and MACRO DEFINITIONS
|
||||
*
|
||||
*/
|
||||
#define _check_read( __number_returned ) \
|
||||
if (( (__number_returned) != 1) || (feof(dbfile)) || (ferror(dbfile)) ) \
|
||||
{ diag_issue_diagnostic( d_bad_database, diag_k_no_source, diag_k_no_column ); }
|
||||
|
||||
|
||||
|
||||
|
||||
/*
|
||||
*
|
||||
* EXTERNAL VARIABLE DECLARATIONS
|
||||
*
|
||||
*/
|
||||
|
||||
/*
|
||||
*
|
||||
* GLOBAL VARIABLE DECLARATIONS
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
/*
|
||||
*
|
||||
* OWN VARIABLE DECLARATIONS
|
||||
*
|
||||
*/
|
||||
static FILE *dbfile;
|
||||
static int num_bits;
|
||||
|
||||
void db_incorporate()
|
||||
|
||||
/*
|
||||
*++
|
||||
*
|
||||
* PROCEDURE DESCRIPTION:
|
||||
*
|
||||
* This routine incorporate the binary database passed in the command line.
|
||||
*
|
||||
*
|
||||
* FORMAL PARAMETERS:
|
||||
*
|
||||
* IMPLICIT INPUTS:
|
||||
*
|
||||
* IMPLICIT OUTPUTS:
|
||||
*
|
||||
* FUNCTION VALUE:
|
||||
*
|
||||
* SIDE EFFECTS:
|
||||
*
|
||||
*--
|
||||
*/
|
||||
|
||||
/*
|
||||
* External Functions
|
||||
*/
|
||||
|
||||
/*
|
||||
* Local variables
|
||||
*/
|
||||
{
|
||||
int return_num_items;
|
||||
_db_header header;
|
||||
_db_globals globals;
|
||||
|
||||
db_open_file();
|
||||
|
||||
return_num_items = fread (&globals, sizeof(_db_globals), 1, dbfile);
|
||||
_check_read (return_num_items);
|
||||
|
||||
/*
|
||||
* Some heuristics to see if this is a reasonable database.
|
||||
* The magic numbers are about 10 times as big as the DXm database
|
||||
* for DECWindows V3. The diagnostic does a fatal exit.
|
||||
*/
|
||||
if ( globals.uil_max_arg>5000 ||
|
||||
globals.uil_max_charset>200 ||
|
||||
globals.charset_lang_table_max>1000 ||
|
||||
globals.uil_max_object>500 ||
|
||||
globals.uil_max_reason>1000 ||
|
||||
globals.uil_max_enumval>3000 ||
|
||||
globals.uil_max_enumset>1000 ||
|
||||
globals.key_k_keyword_count>10000 ||
|
||||
globals.key_k_keyword_max_length>200 ||
|
||||
globals.uil_max_child>250)
|
||||
diag_issue_diagnostic (d_bad_database,
|
||||
diag_k_no_source,
|
||||
diag_k_no_column);
|
||||
|
||||
uil_max_arg = globals.uil_max_arg ;
|
||||
uil_max_charset = globals.uil_max_charset ;
|
||||
charset_lang_table_max = globals.charset_lang_table_max ;
|
||||
uil_max_object = globals.uil_max_object ;
|
||||
uil_max_reason = globals.uil_max_reason ;
|
||||
uil_max_enumval = globals.uil_max_enumval ;
|
||||
uil_max_enumset = globals.uil_max_enumset ;
|
||||
key_k_keyword_count = globals.key_k_keyword_count ;
|
||||
key_k_keyword_max_length = globals.key_k_keyword_max_length ;
|
||||
uil_max_child = globals.uil_max_child;
|
||||
num_bits = (uil_max_object +7) / 8;
|
||||
|
||||
if (globals.version > DB_Compiled_Version)
|
||||
diag_issue_diagnostic( d_future_version, diag_k_no_source, diag_k_no_column );
|
||||
|
||||
for (;;)
|
||||
{
|
||||
return_num_items = fread (&header, sizeof(_db_header), 1, dbfile);
|
||||
if (feof(dbfile)) break;
|
||||
_check_read (return_num_items);
|
||||
switch (header.table_id)
|
||||
{
|
||||
case Constraint_Tab:
|
||||
constraint_tab = (unsigned char *) XtMalloc (header.table_size);
|
||||
return_num_items = fread (constraint_tab,
|
||||
sizeof(unsigned char) * header.num_items,
|
||||
1, dbfile);
|
||||
_check_read (return_num_items);
|
||||
break;
|
||||
case Argument_Type_Table_Value:
|
||||
/*
|
||||
* NOTE: The first entry is not used but we copy it anyway
|
||||
*/
|
||||
argument_type_table = (unsigned char *) XtMalloc (header.table_size);
|
||||
return_num_items = fread (argument_type_table,
|
||||
sizeof(unsigned char) * header.num_items,
|
||||
1, dbfile);
|
||||
_check_read (return_num_items);
|
||||
break;
|
||||
case Child_Class_Table:
|
||||
/*
|
||||
* NOTE: The first entry is not used but we copy it anyway
|
||||
*/
|
||||
child_class_table =
|
||||
(unsigned char *) XtMalloc (header.table_size);
|
||||
return_num_items =
|
||||
fread (child_class_table,
|
||||
sizeof(unsigned char) * header.num_items, 1, dbfile);
|
||||
_check_read (return_num_items);
|
||||
break;
|
||||
case Charset_Wrdirection_Table:
|
||||
charset_writing_direction_table = (unsigned char *) XtMalloc (header.table_size);
|
||||
return_num_items = fread (charset_writing_direction_table,
|
||||
sizeof(unsigned char) * header.num_items,
|
||||
1, dbfile);
|
||||
_check_read (return_num_items);
|
||||
break;
|
||||
case Charset_Parsdirection_Table:
|
||||
charset_parsing_direction_table = (unsigned char *) XtMalloc (header.table_size);
|
||||
return_num_items = fread (charset_parsing_direction_table,
|
||||
sizeof(unsigned char) * header.num_items,
|
||||
1, dbfile);
|
||||
_check_read (return_num_items);
|
||||
break;
|
||||
case Charset_Charsize_Table:
|
||||
charset_character_size_table = (unsigned char *) XtMalloc (header.table_size);
|
||||
return_num_items = fread (charset_character_size_table,
|
||||
sizeof(unsigned char) * header.num_items,
|
||||
1, dbfile);
|
||||
_check_read (return_num_items);
|
||||
break;
|
||||
case Key_Table:
|
||||
case Key_Table_Case_Ins:
|
||||
db_read_ints_and_string (&header);
|
||||
break;
|
||||
case Allowed_Argument_Table:
|
||||
case Allowed_Child_Table:
|
||||
case Allowed_Control_Table:
|
||||
case Allowed_Reason_Table:
|
||||
db_read_char_table (&header);
|
||||
break;
|
||||
case Charset_Xmstring_Names_Table:
|
||||
case Charset_Lang_Names_Table:
|
||||
case Uil_Widget_Names:
|
||||
case Uil_Children_Names:
|
||||
case Uil_Argument_Names:
|
||||
case Uil_Reason_Names:
|
||||
case Uil_Enumval_names:
|
||||
case Uil_Charset_Names:
|
||||
case Uil_Widget_Funcs:
|
||||
case Uil_Argument_Toolkit_Names:
|
||||
case Uil_Reason_Toolkit_Names:
|
||||
db_read_length_and_string (&header);
|
||||
break;
|
||||
case Charset_Lang_Codes_Table:
|
||||
charset_lang_codes_table = (unsigned short int *) XtMalloc (header.table_size);
|
||||
return_num_items = fread (charset_lang_codes_table,
|
||||
header.table_size,
|
||||
1, dbfile);
|
||||
_check_read (return_num_items);
|
||||
break;
|
||||
case Argument_Enum_Set_Table:
|
||||
argument_enumset_table = (unsigned short int *) XtMalloc (header.table_size);
|
||||
return_num_items = fread (argument_enumset_table,
|
||||
header.table_size,
|
||||
1, dbfile);
|
||||
_check_read (return_num_items);
|
||||
break;
|
||||
case Related_Argument_Table:
|
||||
related_argument_table = (unsigned short int *) XtMalloc (header.table_size);
|
||||
return_num_items = fread (related_argument_table,
|
||||
header.table_size,
|
||||
1, dbfile);
|
||||
_check_read (return_num_items);
|
||||
break;
|
||||
case Uil_Gadget_Funcs:
|
||||
uil_gadget_variants = (unsigned short int *) XtMalloc (header.table_size);
|
||||
return_num_items = fread (uil_gadget_variants,
|
||||
header.table_size,
|
||||
1, dbfile);
|
||||
_check_read (return_num_items);
|
||||
break;
|
||||
case Uil_Urm_Nondialog_Class:
|
||||
uil_urm_nondialog_class = (unsigned short int *) XtMalloc (header.table_size);
|
||||
return_num_items = fread (uil_urm_nondialog_class,
|
||||
header.table_size,
|
||||
1, dbfile);
|
||||
_check_read (return_num_items);
|
||||
break;
|
||||
case Uil_Urm_Subtree_Resource:
|
||||
uil_urm_subtree_resource = (unsigned short int *) XtMalloc (header.table_size);
|
||||
return_num_items = fread (uil_urm_subtree_resource,
|
||||
header.table_size,
|
||||
1, dbfile);
|
||||
_check_read (return_num_items);
|
||||
break;
|
||||
case Enum_Set_Table:
|
||||
db_read_int_and_shorts(&header);
|
||||
break;
|
||||
case Enumval_Values_Table:
|
||||
enumval_values_table = (int *) XtMalloc (header.table_size);
|
||||
return_num_items = fread (enumval_values_table,
|
||||
header.table_size,
|
||||
1, dbfile);
|
||||
_check_read (return_num_items);
|
||||
break;
|
||||
default:
|
||||
diag_issue_diagnostic( d_bad_database, diag_k_no_source, diag_k_no_column );
|
||||
} /* end switch */
|
||||
} /* end for */
|
||||
fclose (dbfile);
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
|
||||
void db_read_ints_and_string(header)
|
||||
_db_header_ptr header;
|
||||
|
||||
/*
|
||||
*++
|
||||
*
|
||||
* PROCEDURE DESCRIPTION:
|
||||
*
|
||||
* This routine reads in tables of integers and one string unsigned chars and places them into
|
||||
* memory. It will Malloc new space for the table. The tables supported
|
||||
* this routine are:
|
||||
*
|
||||
* Key_Table:
|
||||
* Key_Table_Case_Ins:
|
||||
*
|
||||
*
|
||||
* FORMAL PARAMETERS:
|
||||
*
|
||||
* IMPLICIT INPUTS:
|
||||
*
|
||||
* IMPLICIT OUTPUTS:
|
||||
*
|
||||
* FUNCTION VALUE:
|
||||
*
|
||||
* SIDE EFFECTS:
|
||||
*
|
||||
*--
|
||||
*/
|
||||
|
||||
{
|
||||
|
||||
/*
|
||||
* External Functions
|
||||
*/
|
||||
|
||||
/*
|
||||
* Local variables
|
||||
*/
|
||||
int return_num_items, i, string_size=0;
|
||||
key_keytable_entry_type *table;
|
||||
char *string_table;
|
||||
|
||||
switch (header->table_id)
|
||||
{
|
||||
/*
|
||||
* NOTE: Calloc is used here to protect against bad
|
||||
* pointers.
|
||||
*/
|
||||
case Key_Table:
|
||||
key_table = (key_keytable_entry_type *) XtCalloc (1, header->table_size);
|
||||
table = key_table;
|
||||
break;
|
||||
case Key_Table_Case_Ins:
|
||||
key_table_case_ins = (key_keytable_entry_type *) XtCalloc (1, header->table_size);
|
||||
table = key_table_case_ins;
|
||||
break;
|
||||
default:
|
||||
diag_issue_internal_error ("Bad table_id in db_read_ints_and_string");
|
||||
}
|
||||
|
||||
/*
|
||||
* Get the entire table with one read.
|
||||
* Then loop through the table and up the length of the strings.
|
||||
* Get all the strings with one read.
|
||||
* Reassign the addresses
|
||||
*/
|
||||
return_num_items = fread(table, header->table_size, 1, dbfile);
|
||||
_check_read (return_num_items);
|
||||
|
||||
for ( i=0 ; i<header->num_items; i++)
|
||||
{
|
||||
/*
|
||||
* Add one for the null character on the string
|
||||
*/
|
||||
string_size += table[i].b_length + 1;
|
||||
};
|
||||
|
||||
string_table = XtMalloc (sizeof (char) * string_size);
|
||||
return_num_items = fread(string_table,
|
||||
sizeof(unsigned char) * string_size,
|
||||
1, dbfile);
|
||||
_check_read (return_num_items);
|
||||
|
||||
for ( i=0 ; i<header->num_items; i++)
|
||||
{
|
||||
table[i].at_name = string_table;
|
||||
string_table += table[i].b_length + 1;
|
||||
};
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
|
||||
void db_read_char_table(header)
|
||||
_db_header_ptr header;
|
||||
|
||||
/*
|
||||
*++
|
||||
*
|
||||
* PROCEDURE DESCRIPTION:
|
||||
*
|
||||
* This routine reads in tables of unsigned chars and places them into
|
||||
* memory. It will Malloc new space for the table. The tables supported
|
||||
* this routine are:
|
||||
*
|
||||
* Allowed_Argument_Table:
|
||||
* Allowed_Child_Table:
|
||||
* Allowed_Control_Table:
|
||||
* Allowed_Reason_Table:
|
||||
*
|
||||
*
|
||||
* FORMAL PARAMETERS:
|
||||
*
|
||||
* IMPLICIT INPUTS:
|
||||
*
|
||||
* IMPLICIT OUTPUTS:
|
||||
*
|
||||
* FUNCTION VALUE:
|
||||
*
|
||||
* SIDE EFFECTS:
|
||||
*
|
||||
*--
|
||||
*/
|
||||
|
||||
{
|
||||
|
||||
/*
|
||||
* External Functions
|
||||
*/
|
||||
|
||||
/*
|
||||
* Local variables
|
||||
*/
|
||||
unsigned char **ptr;
|
||||
int return_num_items, i;
|
||||
unsigned char *table;
|
||||
|
||||
switch (header->table_id)
|
||||
{
|
||||
/*
|
||||
* NOTE: Calloc is used here to protect against bad
|
||||
* pointers.
|
||||
*/
|
||||
case Allowed_Argument_Table:
|
||||
allowed_argument_table = (unsigned char **) XtCalloc (1, header->table_size);
|
||||
ptr = allowed_argument_table;
|
||||
break;
|
||||
case Allowed_Child_Table:
|
||||
allowed_child_table =
|
||||
(unsigned char **) XtCalloc (1, header->table_size);
|
||||
ptr = allowed_child_table;
|
||||
break;
|
||||
case Allowed_Control_Table:
|
||||
allowed_control_table = (unsigned char **) XtCalloc (1, header->table_size);
|
||||
ptr = allowed_control_table;
|
||||
break;
|
||||
case Allowed_Reason_Table:
|
||||
allowed_reason_table = (unsigned char **) XtCalloc (1, header->table_size);
|
||||
ptr = allowed_reason_table;
|
||||
break;
|
||||
default:
|
||||
diag_issue_internal_error ("Bad table_id in db_read_char_table");
|
||||
}
|
||||
|
||||
/*
|
||||
* Read in the entire table contents in one whack.
|
||||
* Then go through the table and set the addresses
|
||||
*/
|
||||
table = (unsigned char *) XtMalloc (sizeof (unsigned char) * header->num_items * num_bits);
|
||||
return_num_items = fread(table,
|
||||
sizeof(char) * num_bits * header->num_items,
|
||||
1, dbfile);
|
||||
_check_read (return_num_items);
|
||||
for ( i=1 ; i<=header->num_items; i++ )
|
||||
{
|
||||
ptr[i] = table;
|
||||
table += num_bits;
|
||||
};
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
|
||||
void db_read_length_and_string(header)
|
||||
_db_header_ptr header;
|
||||
|
||||
/*
|
||||
*++
|
||||
*
|
||||
* PROCEDURE DESCRIPTION:
|
||||
*
|
||||
* This routine reads in length and strings of unsigned chars and places them into
|
||||
* memory. It will Malloc new space for the table. The tables supported
|
||||
* this routine are:
|
||||
*
|
||||
* Charset_Xmstring_Names_Table:
|
||||
* Charset_Lang_Names_Table:
|
||||
* Uil_Widget_Names:
|
||||
* Uil_Children_Names:
|
||||
* Uil_Argument_Names:
|
||||
* Uil_Reason_Names:
|
||||
* Uil_Enumval_names:
|
||||
* Uil_Charset_Names:
|
||||
* Uil_Widget_Funcs:
|
||||
* Uil_Argument_Toolkit_Names:
|
||||
* Uil_Reason_Toolkit_Names:
|
||||
*
|
||||
*
|
||||
* FORMAL PARAMETERS:
|
||||
*
|
||||
* IMPLICIT INPUTS:
|
||||
*
|
||||
* IMPLICIT OUTPUTS:
|
||||
*
|
||||
* FUNCTION VALUE:
|
||||
*
|
||||
* SIDE EFFECTS:
|
||||
*
|
||||
*--
|
||||
*/
|
||||
|
||||
{
|
||||
|
||||
/*
|
||||
* External Functions
|
||||
*/
|
||||
|
||||
/*
|
||||
* Local variables
|
||||
*/
|
||||
int return_num_items, i, string_size=0;
|
||||
int *lengths;
|
||||
char *string_table;
|
||||
char **table;
|
||||
|
||||
switch (header->table_id)
|
||||
{
|
||||
/*
|
||||
* NOTE: Calloc is used here because it might be possible to
|
||||
* have a string of zero length, particularly for the
|
||||
* first record. Ergo we Calloc to protect against bad
|
||||
* pointers.
|
||||
*/
|
||||
case Charset_Xmstring_Names_Table:
|
||||
charset_xmstring_names_table = (char **) XtCalloc (1, header->table_size);
|
||||
table = charset_xmstring_names_table;
|
||||
break;
|
||||
case Charset_Lang_Names_Table:
|
||||
charset_lang_names_table = (char **) XtCalloc (1, header->table_size);
|
||||
table = charset_lang_names_table;
|
||||
break;
|
||||
case Uil_Widget_Names:
|
||||
uil_widget_names = (char **) XtCalloc (1, header->table_size);
|
||||
table = uil_widget_names ;
|
||||
break;
|
||||
case Uil_Children_Names:
|
||||
uil_child_names = (char **) XtCalloc (1, header->table_size);
|
||||
table = uil_child_names ;
|
||||
break;
|
||||
case Uil_Argument_Names:
|
||||
uil_argument_names = (char **) XtCalloc (1, header->table_size);
|
||||
table = uil_argument_names;
|
||||
break;
|
||||
case Uil_Reason_Names:
|
||||
uil_reason_names = (char **) XtCalloc (1, header->table_size);
|
||||
table = uil_reason_names;
|
||||
break;
|
||||
case Uil_Enumval_names:
|
||||
uil_enumval_names = (char **) XtCalloc (1, header->table_size);
|
||||
table = uil_enumval_names;
|
||||
break;
|
||||
case Uil_Charset_Names:
|
||||
uil_charset_names = (char **) XtCalloc (1, header->table_size);
|
||||
table = uil_charset_names;
|
||||
break;
|
||||
case Uil_Widget_Funcs:
|
||||
uil_widget_funcs = (char **) XtCalloc (1, header->table_size);
|
||||
table = uil_widget_funcs;
|
||||
break;
|
||||
case Uil_Argument_Toolkit_Names:
|
||||
uil_argument_toolkit_names = (char **) XtCalloc (1, header->table_size);
|
||||
table = uil_argument_toolkit_names;
|
||||
break;
|
||||
case Uil_Reason_Toolkit_Names:
|
||||
uil_reason_toolkit_names = (char **) XtCalloc (1, header->table_size);
|
||||
table = uil_reason_toolkit_names;
|
||||
break;
|
||||
default:
|
||||
diag_issue_internal_error ("Bad table_id in db_read_length_and_string");
|
||||
}
|
||||
|
||||
/*
|
||||
* Get the lengths of all the strings with one read.
|
||||
* Then loop through the table and up the length of the strings.
|
||||
* Get all the strings with one read.
|
||||
* Reassign the addresses using the length table and string table.
|
||||
* Cleanup by Freeing length table.
|
||||
*
|
||||
* NOTE: In some tables the counting starts at 1 not 0 so you
|
||||
* have to be carefull.
|
||||
*/
|
||||
|
||||
lengths = (int *) XtMalloc (sizeof (int) * (header->num_items + 1));
|
||||
return_num_items = fread(lengths,
|
||||
sizeof(int) * (header->num_items + 1),
|
||||
1, dbfile);
|
||||
_check_read (return_num_items);
|
||||
for ( i=0 ; i<=header->num_items; i++)
|
||||
{
|
||||
/*
|
||||
* Add one for the null terminator
|
||||
*/
|
||||
if (lengths[i])
|
||||
{
|
||||
string_size += lengths[i] + 1;
|
||||
}
|
||||
}
|
||||
|
||||
string_table = XtMalloc (sizeof (unsigned char) * string_size);
|
||||
return_num_items = fread(string_table,
|
||||
sizeof(unsigned char) * string_size,
|
||||
1, dbfile);
|
||||
_check_read (return_num_items);
|
||||
for ( i=0 ; i<=header->num_items; i++)
|
||||
{
|
||||
if (lengths[i])
|
||||
{
|
||||
table[i] = string_table;
|
||||
/* BEGIN HaL Fix CR 5618 */
|
||||
if ((header->table_id == Uil_Widget_Names) &&
|
||||
(strcmp(table[i], "user_defined") == 0))
|
||||
uil_sym_user_defined_object = i;
|
||||
/* END HaL Fix CR 5618 */
|
||||
string_table += lengths[i] + 1;
|
||||
}
|
||||
}
|
||||
|
||||
XtFree ((char *)lengths);
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
|
||||
void db_read_int_and_shorts(header)
|
||||
_db_header_ptr header;
|
||||
|
||||
/*
|
||||
*++
|
||||
*
|
||||
* PROCEDURE DESCRIPTION:
|
||||
*
|
||||
* This routine reads in a structure consisting of one integer and a
|
||||
* pointer to a table of integer and places them into
|
||||
* memory. It will Malloc new space for the table. The tables supported
|
||||
* this routine are:
|
||||
*
|
||||
* Enum_Set_Table:
|
||||
*
|
||||
*
|
||||
* FORMAL PARAMETERS:
|
||||
*
|
||||
* IMPLICIT INPUTS:
|
||||
*
|
||||
* IMPLICIT OUTPUTS:
|
||||
*
|
||||
* FUNCTION VALUE:
|
||||
*
|
||||
* SIDE EFFECTS:
|
||||
*
|
||||
*--
|
||||
*/
|
||||
|
||||
{
|
||||
|
||||
/*
|
||||
* External Functions
|
||||
*/
|
||||
|
||||
/*
|
||||
* Local variables
|
||||
*/
|
||||
int return_num_items, i, int_table_size=0;
|
||||
UilEnumSetDescDef *table;
|
||||
unsigned short int *int_table;
|
||||
|
||||
switch (header->table_id)
|
||||
{
|
||||
case Enum_Set_Table:
|
||||
enum_set_table = (UilEnumSetDescDef *) XtCalloc (1, header->table_size);
|
||||
table = enum_set_table;
|
||||
break;
|
||||
default:
|
||||
diag_issue_internal_error ("Bad table_id in db_read_int_shorts");
|
||||
}
|
||||
|
||||
/*
|
||||
* Get the entire table with one read.
|
||||
* Then loop through the table and add up the number of ints in each int table.
|
||||
* Get all the integer tables with one read.
|
||||
* Reassign the addresses of the tables.
|
||||
*/
|
||||
return_num_items = fread(table, header->table_size, 1, dbfile);
|
||||
_check_read (return_num_items);
|
||||
for ( i=0 ; i<=header->num_items; i++)
|
||||
{
|
||||
int_table_size += table[i].values_cnt;
|
||||
}
|
||||
|
||||
int_table = (unsigned short int *) XtCalloc (1, sizeof (short) * int_table_size);
|
||||
return_num_items = fread(int_table,
|
||||
sizeof(short) * int_table_size,
|
||||
1, dbfile);
|
||||
_check_read (return_num_items);
|
||||
for ( i=0 ; i<=header->num_items; i++)
|
||||
{
|
||||
if (table[i].values_cnt)
|
||||
{
|
||||
table[i].values = int_table;
|
||||
int_table += table[i].values_cnt;
|
||||
}
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
|
||||
void db_open_file ()
|
||||
|
||||
/*
|
||||
*++
|
||||
*
|
||||
* PROCEDURE DESCRIPTION:
|
||||
*
|
||||
* This routine opens the binary database file in a platform-dependent way,
|
||||
* performing i18n language switching in order to do so.
|
||||
*
|
||||
* Per the latest agreement on semantics, this routine does:
|
||||
* - first, try to open in the local directory (that is, with
|
||||
* no switching).
|
||||
* - second, try language switching and open
|
||||
*
|
||||
* FORMAL PARAMETERS:
|
||||
*
|
||||
* name A system-dependent string specifying the IDB file
|
||||
* to be opened.
|
||||
*
|
||||
* IMPLICIT INPUTS:
|
||||
*
|
||||
* IMPLICIT OUTPUTS:
|
||||
*
|
||||
* FUNCTION VALUE:
|
||||
*
|
||||
* SIDE EFFECTS:
|
||||
*
|
||||
*--
|
||||
*/
|
||||
|
||||
{
|
||||
|
||||
/*
|
||||
* External Functions
|
||||
*/
|
||||
|
||||
/*
|
||||
* Local variables
|
||||
*/
|
||||
char *resolvedname; /* current resolved name */
|
||||
SubstitutionRec subs[3];
|
||||
char *wmdPath;
|
||||
|
||||
/*
|
||||
* Use XtFindFile instead of XtResolvePathName. XtResolvePathName requires a
|
||||
* display which UIL doesn't have. At the current time there is no support for
|
||||
* $LANG in the path string. If such support was deamed necessary, the %L, %l,
|
||||
* %t, %c values would be set up as subs here using globals from the fetch of
|
||||
* LANG variable used to determine the default codeset (or vice versa depending
|
||||
* on which is called first)
|
||||
*
|
||||
* If the last 4 characters of the file name are not .bdb
|
||||
* then pass in the suffix of .bdb. If a file isn't found with the suffix passed
|
||||
* in then try without the suffix.
|
||||
*/
|
||||
|
||||
/*
|
||||
* Make sure 'S' is the last one so we can remove the suffix for the first pass.
|
||||
*/
|
||||
subs[0].match = 'N';
|
||||
subs[0].substitution = Uil_cmd_z_command.ac_database;
|
||||
subs[1].match = 'T';
|
||||
subs[1].substitution = "wmd";
|
||||
subs[2].match = 'S';
|
||||
subs[2].substitution = ".wmd";
|
||||
|
||||
wmdPath = init_wmd_path(Uil_cmd_z_command.ac_database);
|
||||
|
||||
resolvedname = 0;
|
||||
|
||||
/*
|
||||
* Check and see if the .wmd suffix is already on the file. If not then try to
|
||||
* resolve the pathname with .wmd suffix first. If that fails or the suffix is
|
||||
* already on the file then just try to resolve the pathname.
|
||||
*/
|
||||
if ( strcmp (&Uil_cmd_z_command.ac_database[strlen(Uil_cmd_z_command.ac_database)-4],".wmd") != 0 )
|
||||
resolvedname = XtFindFile(wmdPath,
|
||||
subs,
|
||||
XtNumber(subs),
|
||||
(XtFilePredicate)NULL);
|
||||
|
||||
/*
|
||||
* No .wmd suffix or a failure to resolve the pathname with the .wmd suffix
|
||||
* Try without the suffix.
|
||||
*/
|
||||
subs[2].substitution = "";
|
||||
if (resolvedname == 0)
|
||||
resolvedname = XtFindFile(wmdPath,
|
||||
subs,
|
||||
XtNumber(subs),
|
||||
(XtFilePredicate)NULL);
|
||||
|
||||
if (resolvedname == 0)
|
||||
{
|
||||
diag_issue_diagnostic( d_wmd_open,
|
||||
diag_k_no_source, diag_k_no_column,
|
||||
Uil_cmd_z_command.ac_database);
|
||||
}
|
||||
|
||||
dbfile = fopen (resolvedname, "r");
|
||||
|
||||
/* If the file is not found, a fatal error is generated. */
|
||||
if (dbfile == NULL)
|
||||
{
|
||||
diag_issue_diagnostic( d_src_open,
|
||||
diag_k_no_source, diag_k_no_column,
|
||||
resolvedname);
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
String get_root_dir_name()
|
||||
{
|
||||
int uid;
|
||||
_Xgetpwparams pwd_buf;
|
||||
struct passwd *pwd_value;
|
||||
static char *ptr = NULL;
|
||||
char *outptr;
|
||||
|
||||
if (ptr == NULL)
|
||||
{
|
||||
if((ptr = (char *)getenv("HOME")) == NULL)
|
||||
{
|
||||
if((ptr = (char *)getenv(USER_VAR)) != NULL)
|
||||
{
|
||||
pwd_value = _XGetpwnam(ptr, pwd_buf);
|
||||
}
|
||||
else
|
||||
{
|
||||
uid = getuid();
|
||||
pwd_value = _XGetpwuid(uid, pwd_buf);
|
||||
}
|
||||
if (pwd_value != NULL)
|
||||
{
|
||||
ptr = pwd_value->pw_dir;
|
||||
}
|
||||
else
|
||||
{
|
||||
ptr = "";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
outptr = XtMalloc (strlen(ptr) + 2);
|
||||
strcpy (outptr, ptr);
|
||||
strcat (outptr, "/");
|
||||
return outptr;
|
||||
}
|
||||
|
||||
/*
|
||||
* XAPPLRES_DEFAULT and UIDPATH_DEFAULT are intentionally split to support
|
||||
* SCCS. DO NOT reformat the lines else %-N-%-S could be converted by SCCS into
|
||||
* something totally bizarre causing MrmOpenHierarchy failures.
|
||||
*/
|
||||
|
||||
/* The following are usually defined in the Makefile */
|
||||
|
||||
#ifndef LIBDIR
|
||||
#define LIBDIR "/usr/lib/X11"
|
||||
#endif
|
||||
#ifndef INCDIR
|
||||
#define INCDIR "/usr/include/X11"
|
||||
#endif
|
||||
|
||||
static char libdir[] = LIBDIR;
|
||||
static char incdir[] = INCDIR;
|
||||
|
||||
static char XAPPLRES_DEFAULT[] = "\
|
||||
%%N\
|
||||
%%S:\
|
||||
%s/%%T/%%N\
|
||||
%%S:\
|
||||
%s%%T/%%N\
|
||||
%%S:\
|
||||
%s%%N\
|
||||
%%S:\
|
||||
%s/%%T/%%N\
|
||||
%%S:\
|
||||
%s/%%T/%%N\
|
||||
%%S";
|
||||
|
||||
static char WMDPATH_DEFAULT[] = "\
|
||||
%%N\
|
||||
%%S:\
|
||||
%s%%T/%%N\
|
||||
%%S:\
|
||||
%s%%N\
|
||||
%%S:\
|
||||
%s/%%L/%%T/%%N\
|
||||
%%S:\
|
||||
%s/%%T/%%N\
|
||||
%%S";
|
||||
|
||||
static char ABSOLUTE_PATH[] = "\
|
||||
%N\
|
||||
%S";
|
||||
|
||||
String init_wmd_path(filename)
|
||||
String filename ;
|
||||
{
|
||||
String path;
|
||||
String old_path;
|
||||
String homedir;
|
||||
String wmd_path;
|
||||
|
||||
|
||||
if (filename[0] == '/')
|
||||
{
|
||||
wmd_path = XtMalloc(strlen(ABSOLUTE_PATH));
|
||||
strcpy (wmd_path, ABSOLUTE_PATH);
|
||||
}
|
||||
else
|
||||
{
|
||||
path = (char *)getenv ("WMDPATH");
|
||||
if (path == NULL)
|
||||
{
|
||||
homedir = get_root_dir_name();
|
||||
old_path = (char *)getenv ("XAPPLRESDIR");
|
||||
if (old_path == NULL)
|
||||
{
|
||||
wmd_path = XtCalloc(1, 2*strlen(homedir) +
|
||||
strlen(libdir) + strlen(incdir) +
|
||||
strlen(WMDPATH_DEFAULT));
|
||||
sprintf( wmd_path, WMDPATH_DEFAULT,
|
||||
homedir, homedir, libdir, incdir);
|
||||
}
|
||||
else
|
||||
{
|
||||
wmd_path = XtCalloc(1, 1*strlen(old_path) + 2*strlen(homedir) +
|
||||
strlen(libdir) + strlen(incdir) +
|
||||
strlen(XAPPLRES_DEFAULT));
|
||||
sprintf(wmd_path, XAPPLRES_DEFAULT,
|
||||
old_path,
|
||||
homedir, homedir, libdir, incdir);
|
||||
}
|
||||
XtFree (homedir);
|
||||
}
|
||||
else
|
||||
{
|
||||
wmd_path = XtMalloc(strlen(path) + 1);
|
||||
strcpy (wmd_path, path);
|
||||
free (path);
|
||||
}
|
||||
}
|
||||
return (wmd_path);
|
||||
}
|
||||
188
cde/osf/uil/UilData.c
Normal file
188
cde/osf/uil/UilData.c
Normal file
@@ -0,0 +1,188 @@
|
||||
/*
|
||||
* @OSF_COPYRIGHT@
|
||||
* COPYRIGHT NOTICE
|
||||
* Copyright (c) 1990, 1991, 1992, 1993 Open Software Foundation, Inc.
|
||||
* ALL RIGHTS RESERVED (MOTIF). See the file named COPYRIGHT.MOTIF for
|
||||
* the full copyright text.
|
||||
*/
|
||||
/*
|
||||
* HISTORY
|
||||
*/
|
||||
#ifdef REV_INFO
|
||||
#ifndef lint
|
||||
static char rcsid[] = "$TOG: UilData.c /main/14 1999/04/16 10:41:44 mgreess $"
|
||||
#endif
|
||||
#endif
|
||||
|
||||
/*
|
||||
* (c) Copyright 1989, 1990, DIGITAL EQUIPMENT CORPORATION, MAYNARD, MASS. */
|
||||
|
||||
/*
|
||||
**++
|
||||
** FACILITY:
|
||||
**
|
||||
** User Interface Language Compiler (UIL)
|
||||
**
|
||||
** ABSTRACT:
|
||||
**
|
||||
** Global data definitions
|
||||
**
|
||||
**--
|
||||
**/
|
||||
|
||||
|
||||
/*
|
||||
**
|
||||
** INCLUDE FILES
|
||||
**
|
||||
**/
|
||||
|
||||
#include <setjmp.h>
|
||||
|
||||
#include <Dt/Editor.h>
|
||||
#include <Dt/Help.h>
|
||||
#include <Dt/HelpDialog.h>
|
||||
#include <Dt/HelpQuickD.h>
|
||||
#include <Dt/MenuButton.h>
|
||||
#include <Dt/Print.h>
|
||||
#include <Dt/TermPrim.h>
|
||||
#include <Dt/Term.h>
|
||||
|
||||
#include <Mrm/MrmAppl.h>
|
||||
#include <Mrm/Mrm.h>
|
||||
#include <Xm/MwmUtil.h> /* For MWM_*_* defines. */
|
||||
|
||||
#include "UilDefI.h"
|
||||
#include "UilSymGen.h"
|
||||
|
||||
/*
|
||||
**
|
||||
** DEFINE and MACRO DEFINITIONS
|
||||
**
|
||||
**/
|
||||
|
||||
|
||||
|
||||
/*
|
||||
**
|
||||
** EXTERNAL VARIABLE DECLARATIONS
|
||||
**
|
||||
**/
|
||||
|
||||
|
||||
|
||||
/*
|
||||
**
|
||||
** GLOBAL VARIABLE DECLARATIONS
|
||||
**
|
||||
**/
|
||||
|
||||
/* Case sensitivity switch; TRUE if case sensitive. */
|
||||
|
||||
|
||||
|
||||
externaldef(uil_comp_glbl) boolean uil_v_case_sensitive = TRUE;
|
||||
|
||||
/* Location to store error type. */
|
||||
|
||||
externaldef(uil_comp_glbl) jmp_buf uil_az_error_env_block;
|
||||
externaldef(uil_comp_glbl) boolean uil_az_error_env_valid = FALSE;
|
||||
|
||||
/* Debugging switches. */
|
||||
|
||||
#if debug_version
|
||||
externaldef(uil_comp_glbl) boolean uil_v_dump_tokens = FALSE;
|
||||
externaldef(uil_comp_glbl) boolean uil_v_dump_symbols = FALSE;
|
||||
#endif
|
||||
|
||||
externaldef(uil_comp_glbl) status uil_l_compile_status = uil_k_success_status;
|
||||
externaldef(uil_comp_glbl) Uil_compile_desc_type *Uil_compile_desc_ptr = NULL;
|
||||
externaldef(uil_comp_glbl) int Uil_percent_complete = 0;
|
||||
externaldef(uil_comp_glbl) int Uil_lines_processed = 0;
|
||||
externaldef(uil_comp_glbl) char *Uil_current_file = "";
|
||||
|
||||
|
||||
/* Define the user-defined object and default character set */
|
||||
externaldef(uil_sym_glbl) unsigned short int uil_sym_user_defined_object =
|
||||
sym_k_user_defined_object;
|
||||
externaldef(uil_sym_glbl) unsigned short int uil_sym_default_charset =
|
||||
sym_k_iso_latin1_charset;
|
||||
externaldef(uil_sym_glbl) unsigned short int uil_sym_isolatin1_charset =
|
||||
sym_k_iso_latin1_charset;
|
||||
|
||||
/* argument types, allowed tables, constraints, related arguments */
|
||||
#include "UilSymArTy.h"
|
||||
#include "UilSymRArg.h"
|
||||
#include "UilSymArTa.h"
|
||||
#include "UilSymReas.h"
|
||||
#include "UilSymCtl.h"
|
||||
#include "UilConst.h"
|
||||
|
||||
/* Allowed children and child classes */
|
||||
#include "UilSymChCl.h"
|
||||
#include "UilSymChTa.h"
|
||||
|
||||
/* sym_k... to name vectors. */
|
||||
#include "UilSymNam.h"
|
||||
|
||||
/* Define mapping of sym_k_..._value to data type names. */
|
||||
externaldef(uil_comp_glbl) int uil_max_value = sym_k_max_value;
|
||||
externaldef(uil_comp_glbl) char *uil_datatype_names [] = {
|
||||
"", /* NOT USED */
|
||||
"any",
|
||||
"boolean",
|
||||
"string", /* char 8 */
|
||||
"compound_string",
|
||||
"float",
|
||||
"integer",
|
||||
"single_float",
|
||||
"localized_string",
|
||||
"wchar_string",
|
||||
"horizontal_dimension_integer",
|
||||
"vertical_dimension_integer",
|
||||
"horizontal_dimension_float",
|
||||
"vertical_dimension_float",
|
||||
"argument",
|
||||
"asciz_table",
|
||||
"class_rec_name",
|
||||
"color",
|
||||
"color_table",
|
||||
"font",
|
||||
"font_table",
|
||||
"icon",
|
||||
"identifier",
|
||||
"integer_table",
|
||||
"keysym",
|
||||
"pixmap",
|
||||
"reason",
|
||||
"rgb",
|
||||
"string_table",
|
||||
"translation_table",
|
||||
"widget_ref",
|
||||
"xbitmapfile",
|
||||
"fontset",
|
||||
"child",
|
||||
};
|
||||
|
||||
/* Enumeration Set/Value tables */
|
||||
#include "UilSymEnum.h"
|
||||
|
||||
/* Character set attribute tables */
|
||||
#include "UilSymCSet.h"
|
||||
|
||||
/* Mrm encoding information */
|
||||
#include "UilUrmClas.h"
|
||||
|
||||
/* Names of tokens in grammar */
|
||||
#include "UilTokName.h"
|
||||
|
||||
/* The keyword tables */
|
||||
#include "UilKeyTab.h"
|
||||
|
||||
|
||||
/*
|
||||
**
|
||||
** OWN VARIABLE DECLARATIONS
|
||||
**
|
||||
**/
|
||||
|
||||
83
cde/osf/uil/UilDef.h
Normal file
83
cde/osf/uil/UilDef.h
Normal file
@@ -0,0 +1,83 @@
|
||||
/*
|
||||
* @OSF_COPYRIGHT@
|
||||
* COPYRIGHT NOTICE
|
||||
* Copyright (c) 1990, 1991, 1992, 1993 Open Software Foundation, Inc.
|
||||
* ALL RIGHTS RESERVED (MOTIF). See the file named COPYRIGHT.MOTIF for
|
||||
* the full copyright text.
|
||||
*/
|
||||
/*
|
||||
* HISTORY
|
||||
*/
|
||||
/* $XConsortium: UilDef.h /main/13 1995/07/14 09:33:37 drk $ */
|
||||
|
||||
/*
|
||||
* (c) Copyright 1989, 1990, DIGITAL EQUIPMENT CORPORATION, MAYNARD, MASS. */
|
||||
|
||||
/*
|
||||
**++
|
||||
** FACILITY:
|
||||
**
|
||||
** User Interface Language Compiler (UIL)
|
||||
**
|
||||
** ABSTRACT:
|
||||
**
|
||||
** This include file defines the set of definitions used by the public
|
||||
** access routines Uil and UilDumpSymbolTable.
|
||||
**
|
||||
**--
|
||||
**/
|
||||
|
||||
#ifndef UilDef_h
|
||||
#define UilDef_h
|
||||
|
||||
#if !defined(__STDC__) && !defined(__cplusplus) && !defined(c_plusplus) \
|
||||
&& !defined(FUNCPROTO) && !defined(XTFUNCPROTO) && !defined(XMFUNCPROTO)
|
||||
#define _NO_PROTO
|
||||
#endif /* __STDC__ */
|
||||
|
||||
|
||||
/*
|
||||
**
|
||||
** INCLUDE FILES
|
||||
**
|
||||
**/
|
||||
|
||||
/*
|
||||
** Includes needed by other include files.
|
||||
*/
|
||||
#include <X11/Intrinsic.h>
|
||||
|
||||
/*
|
||||
**
|
||||
** Common includes needed by public functions.
|
||||
**
|
||||
*/
|
||||
#include <uil/Uil.h>
|
||||
#include <uil/UilDBDef.h> /* This has to be loaded first. */
|
||||
#include <uil/UilSymGl.h>
|
||||
#include <uil/UilSymDef.h>
|
||||
|
||||
/*
|
||||
** Function declarations not defined elsewhere
|
||||
*/
|
||||
#define _ARGUMENTS(arglist) arglist
|
||||
|
||||
#if defined(__cplusplus) || defined(c_plusplus)
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/* uilmain.c */
|
||||
extern Uil_status_type Uil _ARGUMENTS((Uil_command_type
|
||||
*comand_desc,Uil_compile_desc_type *compile_desc,Uil_continue_type
|
||||
(*message_cb)(), char *message_data, Uil_continue_type (*status_cb)(),
|
||||
char *status_data));
|
||||
|
||||
/* uilsymstor.c */
|
||||
extern void UilDumpSymbolTable _ARGUMENTS(( sym_entry_type *node_entry ));
|
||||
|
||||
#if defined(__cplusplus) || defined(c_plusplus)
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* UilDef_h */
|
||||
/* DON'T ADD STUFF AFTER THIS #endif */
|
||||
598
cde/osf/uil/UilDefI.h
Normal file
598
cde/osf/uil/UilDefI.h
Normal file
@@ -0,0 +1,598 @@
|
||||
/*
|
||||
* @OSF_COPYRIGHT@
|
||||
* COPYRIGHT NOTICE
|
||||
* Copyright (c) 1990, 1991, 1992, 1993 Open Software Foundation, Inc.
|
||||
* ALL RIGHTS RESERVED (MOTIF). See the file named COPYRIGHT.MOTIF for
|
||||
* the full copyright text.
|
||||
*/
|
||||
/*
|
||||
* HISTORY
|
||||
*/
|
||||
/* $TOG: UilDefI.h /main/13 1999/07/07 10:24:15 vipin $ */
|
||||
|
||||
/*
|
||||
* (c) Copyright 1989, 1990, DIGITAL EQUIPMENT CORPORATION, MAYNARD, MASS. */
|
||||
|
||||
/*
|
||||
**++
|
||||
** FACILITY:
|
||||
**
|
||||
** User Interface Language Compiler (UIL)
|
||||
**
|
||||
** ABSTRACT:
|
||||
**
|
||||
** This include file defines the set of definitions used by all of
|
||||
** modules of the UIL compiler.
|
||||
**
|
||||
**--
|
||||
**/
|
||||
|
||||
#ifndef UilDefI_h
|
||||
#define UilDefI_h
|
||||
|
||||
|
||||
/*
|
||||
**
|
||||
** INCLUDE FILES
|
||||
**
|
||||
**/
|
||||
|
||||
#define X_INCLUDE_TIME_H
|
||||
#define XOS_USE_XT_LOCKING
|
||||
#include <X11/Xos_r.h> /* for _Xctimeparams */
|
||||
|
||||
#include <Mrm/MrmAppl.h>
|
||||
#include <Mrm/Mrm.h>
|
||||
|
||||
/*
|
||||
**
|
||||
** Universal Definitions
|
||||
**
|
||||
*/
|
||||
|
||||
#define _compiler_version "V2.0-000"
|
||||
#define _compiler_version_int 2
|
||||
#define _data_version 2
|
||||
#define _host_compiler "Motif Uil Compiler"
|
||||
|
||||
#ifdef TRUE
|
||||
#undef TRUE
|
||||
#endif
|
||||
#define TRUE 1
|
||||
|
||||
#ifdef FALSE
|
||||
#undef FALSE
|
||||
#endif
|
||||
#define FALSE 0
|
||||
|
||||
#ifndef debug_version
|
||||
#define debug_version FALSE
|
||||
#endif
|
||||
|
||||
#define NOSTRING_DIRECTION 2
|
||||
|
||||
#define k_normal 1
|
||||
#define k_error 0
|
||||
|
||||
typedef int status;
|
||||
typedef int boolean;
|
||||
|
||||
/*
|
||||
** Copy const handling from XmP.h.
|
||||
*/
|
||||
|
||||
#ifndef XmConst
|
||||
#if defined(__STDC__) || !defined( NO_CONST )
|
||||
#define XmConst const
|
||||
#else
|
||||
#define XmConst
|
||||
#endif /* __STDC__ */
|
||||
#endif /* XmConst */
|
||||
|
||||
/* Uil will automatically strip this prefix when saving name of automatically
|
||||
* created child. This is used to prevent name conflicts in existing uil
|
||||
* files. Children names without this prefix will be saved as is.
|
||||
*/
|
||||
#define AUTO_CHILD_PREFIX "Xm_"
|
||||
|
||||
/*
|
||||
**
|
||||
** Constants controlling limits in the compiler
|
||||
**
|
||||
*/
|
||||
|
||||
#define src_k_max_source_files 101
|
||||
#define src_k_max_source_line_length 132
|
||||
#define lex_k_unprint_sub '?'
|
||||
#define sym_k_max_list_count 1000
|
||||
#define sym_k_max_color_count 256
|
||||
#define Uil_k_max_include_dir_count 32
|
||||
|
||||
/*
|
||||
**
|
||||
** Definition of Compiler Termination Statuses
|
||||
**
|
||||
*/
|
||||
|
||||
#define uil_k_min_status Uil_k_min_status
|
||||
#define uil_k_success_status Uil_k_success_status
|
||||
#define uil_k_info_status Uil_k_info_status
|
||||
#define uil_k_warning_status Uil_k_warning_status
|
||||
#define uil_k_error_status Uil_k_error_status
|
||||
#define uil_k_severe_status Uil_k_severe_status
|
||||
#define uil_k_max_status Uil_k_max_status
|
||||
|
||||
|
||||
/*
|
||||
**
|
||||
** Macros to access bit vectors
|
||||
**
|
||||
*/
|
||||
|
||||
/* MOVED TO DBDef.h */
|
||||
|
||||
|
||||
/*
|
||||
**
|
||||
** Upper and Lower Case Translation Macros
|
||||
**
|
||||
*/
|
||||
|
||||
#define _upper(c) ((c) >= 'a' && (c) <= 'z' ? (c) & 0x5F:(c))
|
||||
#define _lower(c) ((c) >= 'A' && (c) <= 'Z' ? (c) | 0x20:(c))
|
||||
|
||||
|
||||
/*
|
||||
**
|
||||
** Assert Macro
|
||||
**
|
||||
*/
|
||||
|
||||
#if debug_version
|
||||
#define _assert( __condition, __text ) \
|
||||
if (!(__condition)) \
|
||||
{ diag_issue_internal_error( (__text)); }
|
||||
#else
|
||||
#define _assert( __condition, __text ) \
|
||||
if (!(__condition)) \
|
||||
{ diag_issue_internal_error( NULL ); }
|
||||
#endif
|
||||
|
||||
/*
|
||||
**
|
||||
** _error and _okay macro
|
||||
**
|
||||
*/
|
||||
|
||||
#define _error( __status ) \
|
||||
((__status & 1)==0)
|
||||
|
||||
#define _success( __status ) \
|
||||
((__status & 1)==1)
|
||||
|
||||
|
||||
/*
|
||||
**
|
||||
** Memory allocation definitions
|
||||
**
|
||||
*/
|
||||
|
||||
#define _get_memory XtMalloc
|
||||
|
||||
#define _free_memory XtFree
|
||||
|
||||
/*
|
||||
**
|
||||
** Move macro
|
||||
**
|
||||
*/
|
||||
|
||||
#ifdef NO_MEMMOVE
|
||||
/* For fixing the bug CR 4581 */
|
||||
extern char* uil_mmove(char*, char*, int);
|
||||
|
||||
#define _move uil_mmove
|
||||
#else
|
||||
#define _move memmove
|
||||
#endif /* NO_MEMMOVE */
|
||||
|
||||
/*
|
||||
**
|
||||
** Compare macro
|
||||
**
|
||||
*/
|
||||
|
||||
#define _compare strcmp
|
||||
|
||||
/*
|
||||
**
|
||||
** Fill macro
|
||||
**
|
||||
*/
|
||||
|
||||
#define _fill( __string, __char, __len ) \
|
||||
{ \
|
||||
register int i = __len; \
|
||||
while (--i >= 0) \
|
||||
(__string)[i] = __char; \
|
||||
}
|
||||
|
||||
/*
|
||||
**
|
||||
** Index macro
|
||||
**
|
||||
*/
|
||||
|
||||
#define _index( __char, __string, __len ) \
|
||||
((int)((char *)memchr( __string, __char, __len ) - (char *)__string ))
|
||||
|
||||
/*
|
||||
**
|
||||
** Debug output macro
|
||||
**
|
||||
*/
|
||||
#if debug_version
|
||||
#define _debug_output lst_debug_output
|
||||
#else
|
||||
#define _debug_output printf
|
||||
#endif
|
||||
|
||||
|
||||
/*
|
||||
**
|
||||
** Common includes needed by most modules
|
||||
**
|
||||
*/
|
||||
#include "Uil.h"
|
||||
#include "UilDBDef.h" /* for binary database */
|
||||
#include "UilMess.h"
|
||||
#include "UilSymDef.h" /* must come before UilKeyDef.h */
|
||||
#include "UilSrcDef.h" /* must come before UilIODef.h */
|
||||
#include "UilIODef.h"
|
||||
#include "UilDiagDef.h"
|
||||
#include "UilSarDef.h"
|
||||
#if defined(linux)
|
||||
#define YYSTYPE yystype
|
||||
#endif
|
||||
#include "UilLexPars.h"
|
||||
#include "UilCmdDef.h"
|
||||
#include "UilLexDef.h"
|
||||
|
||||
/*
|
||||
** Global declarations
|
||||
*/
|
||||
#include "UilSymGl.h"
|
||||
#include "UilCompGl.h"
|
||||
|
||||
/* Needed for following macro. */
|
||||
#include "UilSymGen.h"
|
||||
|
||||
#define DEFAULT_TAG uil_charset_names[sym_k_XmFONTLIST_DEFAULT_TAG_charset]
|
||||
|
||||
/*
|
||||
** Function declarations not defined elsewhere
|
||||
*/
|
||||
#define _ARGUMENTS(arglist) arglist
|
||||
|
||||
/* uilcmd.c */
|
||||
|
||||
#if defined(__cplusplus) || defined(c_plusplus)
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
extern void diag_issue_diagnostic
|
||||
_ARGUMENTS(( int d_message_number ,
|
||||
src_source_record_type *az_src_rec ,
|
||||
int l_start_column, ... ));
|
||||
extern void lst_debug_output _ARGUMENTS(( char *format, ... ));
|
||||
|
||||
|
||||
void cmd_decode_command_line _ARGUMENTS(( int l_arg_count , char *rac_arg_value []));
|
||||
|
||||
/* uildb.c */
|
||||
extern void db_incorporate _ARGUMENTS(( void ));
|
||||
extern void db_read_ints_and_string _ARGUMENTS((_db_header_ptr header));
|
||||
extern void db_read_char_table _ARGUMENTS((_db_header_ptr header));
|
||||
extern void db_read_length_and_string _ARGUMENTS((_db_header_ptr header));
|
||||
extern void db_read_int_and_shorts _ARGUMENTS((_db_header_ptr header));
|
||||
extern void db_open_file _ARGUMENTS(( void ));
|
||||
extern String get_root_dir_name _ARGUMENTS(( void ));
|
||||
extern String init_wmd_path _ARGUMENTS((String filename));
|
||||
|
||||
/* uildiags.c */
|
||||
extern void diag_issue_summary _ARGUMENTS(( void ));
|
||||
extern char *diag_tag_text _ARGUMENTS(( int XmConst b_tag ));
|
||||
extern char *diag_object_text _ARGUMENTS(( int XmConst b_type ));
|
||||
extern char *diag_value_text _ARGUMENTS(( int XmConst b_type ));
|
||||
extern char *diag_charset_text _ARGUMENTS(( int XmConst b_type ));
|
||||
extern void diag_initialize_diagnostics _ARGUMENTS(( void ));
|
||||
extern void diag_restore_diagnostics _ARGUMENTS(( void ));
|
||||
extern void diag_reset_overflow_handler _ARGUMENTS(( void ));
|
||||
extern void diag_handler _ARGUMENTS(( int l_error ));
|
||||
extern void diag_issue_internal_error _ARGUMENTS(( char *error_text ));
|
||||
extern void write_msg_to_standard_error _ARGUMENTS(( XmConst int message_number , XmConst char *src_buffer , XmConst char *ptr_buffer , XmConst char *msg_buffer , XmConst char *loc_buffer ));
|
||||
extern char XmConst *diag_get_message_abbrev _ARGUMENTS(( int d_message_number ));
|
||||
extern void diag_report_status _ARGUMENTS(( void ));
|
||||
|
||||
/* uilkeytab.c */
|
||||
extern key_keytable_entry_type *key_find_keyword _ARGUMENTS(( unsigned int symbol_length , char *symbol_ptr ));
|
||||
extern void key_initialize _ARGUMENTS(( void ));
|
||||
|
||||
/* uillexana.c */
|
||||
extern int yylex _ARGUMENTS(( void ));
|
||||
extern void lex_initialize_analyzer _ARGUMENTS(( void ));
|
||||
extern void Uil_lex_cleanup_analyzer _ARGUMENTS(( void ));
|
||||
extern void lex_issue_error _ARGUMENTS(( int restart_token ));
|
||||
extern void issue_control_char_diagnostic _ARGUMENTS(( unsigned char c_char ));
|
||||
extern void lex_filter_unprintable_chars _ARGUMENTS(( unsigned char *buffer , int length , unsigned long flags ));
|
||||
extern long cvt_ascii_to_long _ARGUMENTS(( unsigned char XmConst *c_text ));
|
||||
extern sym_value_entry_type *create_str_entry _ARGUMENTS(( int l_size , int l_charset , sym_value_entry_type *az_charset_entry ));
|
||||
|
||||
/* uillstlst.c */
|
||||
extern void lst_open_listing _ARGUMENTS(( void ));
|
||||
extern void Uil_lst_cleanup_listing _ARGUMENTS(( void ));
|
||||
extern status create_listing_file _ARGUMENTS(( uil_fcb_type *az_fcb ));
|
||||
extern void lst_output_line _ARGUMENTS(( char *ac_line , boolean v_new_page ));
|
||||
extern char *current_time _ARGUMENTS(( _Xctimeparams *ctime_buf ));
|
||||
extern void lst_output_listing _ARGUMENTS(( void ));
|
||||
extern void lst_output_messages _ARGUMENTS(( src_message_item_type *az_message_item ));
|
||||
extern void lst_output_machine_code _ARGUMENTS(( src_source_record_type *az_src_rec ));
|
||||
extern void lst_output_message_ptr_line _ARGUMENTS(( src_source_record_type *az_src_rec , char *src_buffer ));
|
||||
|
||||
/* uillstmac.c */
|
||||
extern void save_widget_machine_code _ARGUMENTS(( sym_widget_entry_type *widget_entry , URMResourceContext *az_context ));
|
||||
extern void unload_stack _ARGUMENTS(( char *rec , int rec_size , src_source_record_type *az_src_rec ));
|
||||
extern void save_value_machine_code _ARGUMENTS(( sym_value_entry_type *value_entry , URMResourceContext *az_context ));
|
||||
extern void save_module_machine_code _ARGUMENTS(( src_source_record_type *az_src_rec , URMResourceContext *az_context ));
|
||||
extern void off_put _ARGUMENTS(( unsigned short off_type , unsigned short off_offset ));
|
||||
extern void off_get _ARGUMENTS(( unsigned short *off_type , unsigned short *off_offset ));
|
||||
extern char *type_from_code _ARGUMENTS(( MrmType type_code ));
|
||||
extern char *access_from_code _ARGUMENTS(( MrmFlag access_code ));
|
||||
extern char *group_from_code _ARGUMENTS(( MrmGroup group_code ));
|
||||
extern void format_arg_value _ARGUMENTS(( RGMArgValuePtr argval_ptr , char *buffer ));
|
||||
extern char *class_name_from_code _ARGUMENTS(( MrmCode mrm_class ));
|
||||
extern char *resource_name_from_code _ARGUMENTS(( MrmCode resource ));
|
||||
|
||||
/* uilmain.c */
|
||||
extern void uil_exit _ARGUMENTS(( int severity ));
|
||||
extern Uil_status_type Uil _ARGUMENTS((Uil_command_type
|
||||
*comand_desc,Uil_compile_desc_type *compile_desc,Uil_continue_type
|
||||
(*message_cb)(), char *message_data, Uil_continue_type (*status_cb)(),
|
||||
char *status_data));
|
||||
|
||||
|
||||
/* uilp2out.c */
|
||||
extern void sem_output_uid_file _ARGUMENTS(( void ));
|
||||
extern void push _ARGUMENTS(( sym_entry_type *sym_entry ));
|
||||
extern sym_entry_type *pop _ARGUMENTS(( void ));
|
||||
extern void out_emit_widget _ARGUMENTS(( sym_widget_entry_type *widget_entry ));
|
||||
extern void extract_subtree_control _ARGUMENTS(( sym_list_entry_type *list_entry , sym_control_entry_type **menu_entry , int *count ));
|
||||
extern void extract_create_callback _ARGUMENTS(( sym_list_entry_type *list_entry , sym_callback_entry_type **create_entry ));
|
||||
extern void process_all_callbacks _ARGUMENTS(( sym_list_entry_type *list_entry , int *arglist_index ));
|
||||
extern void process_all_arguments _ARGUMENTS(( sym_list_entry_type *list_entry , int *arglist_index , int *related_count ));
|
||||
extern void process_all_controls _ARGUMENTS(( sym_list_entry_type *list_entry , int *widget_index ));
|
||||
extern void out_emit_value _ARGUMENTS(( sym_value_entry_type *value_entry ));
|
||||
extern void emit_callback _ARGUMENTS(( sym_callback_entry_type *callback_entry , int *arglist_index , boolean emit_create ));
|
||||
extern void emit_callback_procedures _ARGUMENTS(( sym_proc_ref_entry_type *proc_ref_entry_next, int *proc_ref_index, MrmOffset callback_offset ));
|
||||
extern int count_proc _ARGUMENTS(( sym_list_entry_type *proc_list, int count));
|
||||
extern void emit_argument _ARGUMENTS(( sym_argument_entry_type *argument_entry , int arglist_index , int *related_arg_count ));
|
||||
extern void emit_control _ARGUMENTS(( sym_control_entry_type *control_entry , int control_offset ));
|
||||
extern MrmCode ref_value _ARGUMENTS(( sym_value_entry_type *value_entry , MrmCode *arg_type , long *arg_value , MrmCode *arg_access , char **arg_index , MrmResource_id *arg_id , MrmCode *arg_group ));
|
||||
extern MrmCode ref_control _ARGUMENTS(( sym_control_entry_type *control_entry , MrmCode *access , char **index , MrmResource_id *id ));
|
||||
extern void issue_urm_error _ARGUMENTS(( char *problem ));
|
||||
extern MrmCode Urm_code_from_uil_type _ARGUMENTS(( int uil_type ));
|
||||
extern int compute_color_table_size _ARGUMENTS(( sym_value_entry_type *table_entry ));
|
||||
extern void create_color_table _ARGUMENTS(( sym_value_entry_type *table_entry , char *buffer ));
|
||||
extern int compute_icon_size _ARGUMENTS(( sym_value_entry_type *icon_entry ));
|
||||
extern void create_icon _ARGUMENTS(( sym_value_entry_type *icon_entry , char *buffer ));
|
||||
extern int compute_list_size _ARGUMENTS(( sym_list_entry_type *list_entry , int type ));
|
||||
extern void create_int_compression_codes _ARGUMENTS(( void ));
|
||||
extern void create_ext_compression_codes _ARGUMENTS(( void ));
|
||||
|
||||
/* uilp2reslv.c */
|
||||
extern void sem_resolve_forward_refs _ARGUMENTS(( void ));
|
||||
|
||||
/* uilsarcomp.c */
|
||||
extern sym_value_entry_type *sem_create_cstr _ARGUMENTS(( void ));
|
||||
extern sym_value_entry_type *sem_create_wchar_str _ARGUMENTS(( void ));
|
||||
extern void sem_append_str_to_cstr _ARGUMENTS(( sym_value_entry_type *az_cstr_entry , sym_value_entry_type *az_str_entry , boolean op2_temporary ));
|
||||
extern void sem_append_cstr_to_cstr _ARGUMENTS(( sym_value_entry_type *az_cstr1_entry , sym_value_entry_type *az_cstr2_entry , boolean op2_temporary ));
|
||||
extern sym_value_entry_type *sem_cat_str_to_str _ARGUMENTS(( sym_value_entry_type *az_str1_entry , boolean op1_temporary , sym_value_entry_type *az_str2_entry , boolean op2_temporary ));
|
||||
extern int sem_map_subclass_to_charset _ARGUMENTS(( int charset_as_subclass ));
|
||||
extern void sar_charset_verify _ARGUMENTS(( yystype *charset_frame ));
|
||||
extern void sar_make_fallback_charset _ARGUMENTS((yystype *name_frame));
|
||||
extern void sar_chk_charset_attr _ARGUMENTS(( yystype *target_frame , yystype *value_frame , yystype *prior_value_frame ));
|
||||
extern void sar_make_charset _ARGUMENTS(( yystype *target_frame , yystype *value_frame , yystype *attr_frame , yystype *keyword_frame ));
|
||||
|
||||
/* uilsarexp.c */
|
||||
extern void sar_binary_op _ARGUMENTS(( yystype *operator_frame , yystype *op1_frame , yystype *op2_frame ));
|
||||
extern void sar_unary_op _ARGUMENTS(( yystype *operator_frame , yystype *op1_frame ));
|
||||
|
||||
/* uilsarinc.c */
|
||||
extern void sar_include_file _ARGUMENTS(( yystype *file_frame , yystype *include_frame , yystype *semi_frame ));
|
||||
|
||||
/* uilsarmod.c */
|
||||
extern void sar_initialize _ARGUMENTS(( void ));
|
||||
extern void sar_create_root _ARGUMENTS(( yystype *root_frame ));
|
||||
extern void sar_create_module _ARGUMENTS(( yystype *target_frame , yystype *id_frame , yystype *module_frame ));
|
||||
extern void sar_process_module_version _ARGUMENTS(( yystype *value_frame , yystype *start_frame ));
|
||||
extern void sar_process_module_sensitivity _ARGUMENTS(( yystype *token_frame , yystype *start_frame ));
|
||||
extern void sar_process_module_charset _ARGUMENTS(( yystype *token_frame , yystype *start_frame ));
|
||||
extern void sar_save_module_source _ARGUMENTS(( void ));
|
||||
extern void sar_make_def_obj _ARGUMENTS(( yystype *object_frame ));
|
||||
extern void sar_process_module_variant _ARGUMENTS(( yystype *obj_type_frame , yystype *variant_frame ));
|
||||
extern void sar_save_section_source _ARGUMENTS(( yystype *header_frame , int section_type ));
|
||||
|
||||
/* uilsarobj.c */
|
||||
extern void sar_assoc_comment _ARGUMENTS(( sym_obj_entry_type *object ));
|
||||
extern void sar_create_object _ARGUMENTS(( yystype *object_frame , unsigned char object_type ));
|
||||
extern void sar_create_child _ARGUMENTS(( yystype *object_frame ));
|
||||
extern void sar_link_section _ARGUMENTS(( yystype *id_frame ));
|
||||
extern void sar_save_src_semicolon_pos _ARGUMENTS(( yystype *semi_frame ));
|
||||
extern void sar_save_list_end _ARGUMENTS(( yystype *close_frame ));
|
||||
extern void sar_save_src_entry_end _ARGUMENTS(( yystype *close_frame , yystype *entry_frame ));
|
||||
extern void sar_set_object_flags _ARGUMENTS(( yystype *current_frame , unsigned char mask ));
|
||||
extern void sar_unset_object_flags _ARGUMENTS(( yystype *current_frame , unsigned char mask ));
|
||||
extern void sar_set_list_type _ARGUMENTS(( yystype *current_frame ));
|
||||
extern void sar_set_object_class _ARGUMENTS(( yystype *current_frame ));
|
||||
extern void sar_set_object_variant _ARGUMENTS(( yystype *current_frame ));
|
||||
extern yystype *sem_find_object _ARGUMENTS(( yystype *current_frame ));
|
||||
extern void sar_object_reference _ARGUMENTS(( yystype *ref_frame ));
|
||||
extern void sar_update_parent_list _ARGUMENTS(( yystype *control_list_frame ));
|
||||
extern void parent_list_traverse _ARGUMENTS(( sym_widget_entry_type *widget_entry , sym_list_entry_type *control_list_entry ));
|
||||
extern void sar_save_feature _ARGUMENTS(( yystype *feature_frame ));
|
||||
extern void sar_save_argument_pair _ARGUMENTS(( yystype *argument_frame , yystype *value_frame , yystype *equals_frame ));
|
||||
extern void sar_save_reason_binding _ARGUMENTS(( yystype *reason_frame , yystype *proc_ref_frame , yystype *equals_frame ));
|
||||
extern void sar_save_control_item _ARGUMENTS(( yystype *managed_frame , yystype *item_frame ));
|
||||
extern void sar_save_control_widget _ARGUMENTS(( yystype *control_frame , yystype *item_frame ));
|
||||
extern void sar_save_user_proc_ref_src _ARGUMENTS(( yystype *procedure_frame , yystype *proc_id_frame , yystype *proc_arg_frame ));
|
||||
extern void sar_process_proc_ref _ARGUMENTS(( yystype *proc_id_frame , yystype *proc_arg_frame , int context ));
|
||||
extern void sar_add_list_entry _ARGUMENTS(( yystype *entry_frame ));
|
||||
extern void sar_add_forward_list_entry _ARGUMENTS(( yystype *entry_frame ));
|
||||
extern void sar_verify_object _ARGUMENTS(( yystype *current_frame ));
|
||||
extern sym_entry_type *sem_allocate_node _ARGUMENTS(( unsigned char node_tag , unsigned short node_size ));
|
||||
extern void sem_free_node _ARGUMENTS(( sym_entry_type *node_ptr ));
|
||||
|
||||
/* uilsarproc.c */
|
||||
extern void sar_create_procedure _ARGUMENTS(( XmConst yystype *id_frame , XmConst yystype *param_frame , XmConst yystype *class_frame , XmConst yystype *semi_frame ));
|
||||
extern sym_proc_ref_entry_type *sem_reference_procedure _ARGUMENTS(( yystype *id_frame , XmConst yystype *value_frame , XmConst int context ));
|
||||
extern sym_entry_type *sem_ref_name _ARGUMENTS(( yystype *id_frame , XmConst int tag ));
|
||||
|
||||
/* uilsarval.c */
|
||||
extern void sar_map_keyword_to_name _ARGUMENTS(( yystype *target_frame , yystype *keyword_frame ));
|
||||
extern void sar_process_id _ARGUMENTS(( yystype *target_frame , yystype *id_frame ));
|
||||
extern void sar_process_id_ref _ARGUMENTS(( yystype *id_frame ));
|
||||
extern void sar_make_private_value _ARGUMENTS(( yystype *value_frame , yystype *token_frame , int value_type , yystype *keyword_frame , int arg_type ));
|
||||
extern void sar_make_rgb_private_value _ARGUMENTS(( yystype *value_frame , yystype *token_frame , int value_type , yystype *keyword_frame , int arg_type ));
|
||||
extern void sar_append_table_value _ARGUMENTS(( yystype *value_frame , yystype *table_frame , int table_type , yystype *comma_frame ));
|
||||
extern void sar_value_not_implemented _ARGUMENTS(( yystype *value_frame , yystype *token_frame , char *error_text ));
|
||||
extern void sar_cat_value _ARGUMENTS(( yystype *operator_frame , yystype *op1_frame , yystype *op2_frame ));
|
||||
extern void sar_chk_comp_str_attr _ARGUMENTS(( yystype *target_frame , yystype *value_frame , yystype *prior_value_frame ));
|
||||
extern void sar_make_comp_str _ARGUMENTS(( yystype *target_frame , yystype *value_frame , yystype *attr_frame , yystype *keyword_frame ));
|
||||
extern void sar_make_comp_str_comp _ARGUMENTS((yystype *target_frame, yystype *type_frame, yystype *value_frame, yystype *keyword_frame));
|
||||
extern void sar_make_wchar_str _ARGUMENTS(( yystype *target_frame , yystype *value_frame , yystype *attr_frame , yystype *keyword_frame ));
|
||||
extern void sar_value_type_error _ARGUMENTS(( yystype *value_frame , int expected_type ));
|
||||
extern void sar_private_error _ARGUMENTS(( yystype *value_frame ));
|
||||
extern void sar_import_value_entry _ARGUMENTS(( yystype *target_frame , yystype *token_frame ));
|
||||
extern void sar_bind_value_name _ARGUMENTS(( yystype *id_frame , yystype *value_frame , yystype *semi_frame ));
|
||||
extern sym_name_entry_type *sem_dcl_name _ARGUMENTS(( XmConst yystype *id_frame ));
|
||||
extern sym_value_entry_type *sem_create_value_entry _ARGUMENTS(( char *value , int length , int value_type ));
|
||||
extern void sar_create_identifier _ARGUMENTS(( XmConst yystype *id_frame , XmConst yystype *semi_frame ));
|
||||
extern void sar_make_font_table _ARGUMENTS(( yystype *target_frame , yystype *font_frame , yystype *prior_target_frame , yystype *keyword_frame ));
|
||||
extern void sar_make_font_item _ARGUMENTS(( yystype *target_frame , yystype *charset_frame , yystype *font_frame ));
|
||||
extern void sar_make_font _ARGUMENTS(( yystype *target_frame , yystype *charset_frame , yystype *value_frame , yystype *keyword_frame ));
|
||||
extern void sar_make_fontset _ARGUMENTS(( yystype *target_frame , yystype *charset_frame , yystype *value_frame , yystype *keyword_frame ));
|
||||
extern void sar_make_color_item _ARGUMENTS(( yystype *target_frame , yystype *color_frame , yystype *letter_frame ));
|
||||
extern void sar_append_color_item _ARGUMENTS(( yystype *target_frame , yystype *item_frame , yystype *prior_target_frame ));
|
||||
extern void sar_make_color_table _ARGUMENTS(( yystype *target_frame , yystype *list_frame , yystype *keyword_frame ));
|
||||
extern void sar_make_color _ARGUMENTS(( yystype *target_frame , yystype *color_frame , yystype *mono_frame , yystype *keyword_frame ));
|
||||
extern void sar_make_icon _ARGUMENTS(( yystype *target_frame , yystype *list_frame , yystype *table_frame , yystype *keyword_frame ));
|
||||
|
||||
/* uilsemcset.c */
|
||||
extern char *sem_charset_name _ARGUMENTS(( int l_charset , sym_value_entry_type *az_charset_entry ));
|
||||
extern void sem_charset_info _ARGUMENTS(( int l_charset , sym_value_entry_type *az_charset_entry , int *write_direction , int *parse_direction , int *sixteen_bit ));
|
||||
extern int sem_charset_lang_name _ARGUMENTS(( char *lang_charset ));
|
||||
|
||||
/* uilsemval.c */
|
||||
typedef union {
|
||||
boolean boolean_value;
|
||||
int integer_value;
|
||||
double real_value;
|
||||
char character_value; /* character data type RAP */
|
||||
float single_float_value; /* single float data type RAP */
|
||||
} data_value_type;
|
||||
|
||||
extern void sem_validation _ARGUMENTS(( void ));
|
||||
extern void sem_validate_node _ARGUMENTS(( sym_entry_type *node ));
|
||||
extern sym_value_entry_type *sem_validate_value_node _ARGUMENTS(( sym_value_entry_type *value_node ));
|
||||
extern void sem_validate_widget_node _ARGUMENTS(( sym_widget_entry_type *widget_node ));
|
||||
extern void sem_validate_argument_list _ARGUMENTS(( sym_widget_entry_type *widget_node , unsigned int widget_type , sym_list_entry_type *list_entry , sym_argument_entry_type **seen ));
|
||||
extern void sem_validate_argument_entry _ARGUMENTS(( sym_widget_entry_type *widget_node , unsigned int widget_type , sym_list_entry_type *list_entry , sym_argument_entry_type *argument_entry , sym_argument_entry_type **seen ));
|
||||
extern void sem_validate_argument_enumset _ARGUMENTS(( sym_argument_entry_type *argument_entry , int arg_code , sym_value_entry_type *arg_value_entry ));
|
||||
extern void sem_validate_constraint_entry _ARGUMENTS(( sym_widget_entry_type *widget_node , sym_argument_entry_type *argument_entry, unsigned int widget_type ));
|
||||
extern void sem_validate_callback_list _ARGUMENTS(( sym_widget_entry_type *widget_node , unsigned int widget_type , sym_list_entry_type *list_entry , sym_callback_entry_type **seen ));
|
||||
extern void sem_validate_callback_entry _ARGUMENTS(( sym_widget_entry_type *widget_node , unsigned int widget_type , sym_list_entry_type *list_entry , sym_callback_entry_type *callback_entry , sym_callback_entry_type **seen ));
|
||||
extern void sem_validate_control_list _ARGUMENTS(( sym_widget_entry_type *widget_node , unsigned int widget_type , sym_list_entry_type *list_entry , int *count ));
|
||||
extern void sem_validate_control_entry _ARGUMENTS(( sym_widget_entry_type *widget_node , unsigned int widget_type , sym_list_entry_type *list_entry , sym_control_entry_type *control_entry , int *gadget_count ));
|
||||
extern void sem_validate_widget_cycle _ARGUMENTS(( sym_list_entry_type *list_entry , sym_name_entry_type *cycle_name ));
|
||||
extern boolean sem_validate_widget_cycle_aux _ARGUMENTS(( sym_list_entry_type *list_entry , sym_name_entry_type *cycle_name ));
|
||||
extern boolean sem_validate_verify_cycle _ARGUMENTS(( sym_widget_entry_type *cycle_obj , sym_list_entry_type *list_entry ));
|
||||
extern void sem_validate_procref_list _ARGUMENTS(( sym_list_entry_type *list_entry ));
|
||||
extern void sem_validate_procref_entry _ARGUMENTS(( sym_proc_ref_entry_type *procref_entry ));
|
||||
extern boolean sem_argument_allowed _ARGUMENTS(( unsigned int arg_code , unsigned int class_code ));
|
||||
extern boolean sem_reason_allowed _ARGUMENTS(( unsigned int rsn_code , unsigned int class_code ));
|
||||
extern boolean sem_control_allowed _ARGUMENTS(( unsigned int ctl_code , unsigned int class_code ));
|
||||
extern boolean sem_child_allowed _ARGUMENTS(( unsigned int ctl_code , unsigned int class_code ));
|
||||
extern sym_value_entry_type *sem_evaluate_value _ARGUMENTS(( sym_value_entry_type *val_entry ));
|
||||
extern sym_value_entry_type *sem_evaluate_value_cs _ARGUMENTS(( sym_value_entry_type *csval_entry ));
|
||||
/* BEGIN OSF Fix CR 4859 */
|
||||
/* END OSF Fix CR 4859 */
|
||||
extern sym_value_entry_type *sem_evaluate_value_expr _ARGUMENTS(( sym_value_entry_type *value_entry ));
|
||||
extern int validate_arg _ARGUMENTS(( sym_value_entry_type *operand_entry , int v_operator ));
|
||||
extern int sem_convert_to_float _ARGUMENTS(( sym_value_entry_type *operand_entry , data_value_type *data_value ));
|
||||
extern int sem_convert_to_integer _ARGUMENTS(( sym_value_entry_type *operand_entry , data_value_type *data_value ));
|
||||
extern int sem_convert_to_single_float _ARGUMENTS(( sym_value_entry_type *operand_entry , data_value_type *data_value ));
|
||||
extern int sem_convert_to_error _ARGUMENTS(( sym_value_entry_type *operand_entry , data_value_type *data_value ));
|
||||
extern void sar_cat_value_entry _ARGUMENTS(( sym_value_entry_type **target_entry , sym_value_entry_type *op1_entry , sym_value_entry_type *op2_entry ));
|
||||
|
||||
/* uilsrcsrc.c */
|
||||
extern void src_initialize_source _ARGUMENTS(( void ));
|
||||
extern void Uil_src_cleanup_source _ARGUMENTS(( void ));
|
||||
extern void src_open_file _ARGUMENTS(( XmConst char *c_file_name , char *full_file_name ));
|
||||
extern status src_get_source_line _ARGUMENTS(( void ));
|
||||
extern status open_source_file _ARGUMENTS(( XmConst char *c_file_name , uil_fcb_type *az_fcb , src_source_buffer_type *az_source_buffer ));
|
||||
extern status close_source_file _ARGUMENTS(( uil_fcb_type *az_fcb ));
|
||||
extern status get_line _ARGUMENTS(( uil_fcb_type *az_fcb ));
|
||||
extern boolean reget_line _ARGUMENTS(( uil_fcb_type *az_fcb , char *c_buffer , XmConst z_key *z_access_key ));
|
||||
extern char *src_get_file_name _ARGUMENTS(( XmConst src_source_record_type *az_src_rec ));
|
||||
extern boolean src_retrieve_source _ARGUMENTS(( XmConst src_source_record_type *az_src_rec , char *c_buffer ));
|
||||
extern void src_append_diag_info _ARGUMENTS(( XmConst src_source_record_type *az_src_rec , XmConst int l_src_pos , XmConst char *c_msg_text , XmConst int l_msg_number ));
|
||||
extern void src_append_machine_code _ARGUMENTS(( src_source_record_type *az_src_rec , XmConst int l_offset , XmConst int l_code_len , XmConst char *c_code , XmConst char *c_text_arg ));
|
||||
|
||||
/* uilsymnam.c */
|
||||
extern sym_name_entry_type *sym_find_name _ARGUMENTS(( int l_length , char *c_text ));
|
||||
extern sym_name_entry_type *sym_insert_name _ARGUMENTS(( int l_length , char *c_text ));
|
||||
extern int hash_function _ARGUMENTS(( int l_length , char *c_value ));
|
||||
#if debug_version
|
||||
extern void sym_dump_hash_table _ARGUMENTS(( void ));
|
||||
#endif
|
||||
|
||||
/* uilsymstor.c */
|
||||
extern void sym_initialize_storage _ARGUMENTS(( void ));
|
||||
extern void Uil_sym_cleanup_storage _ARGUMENTS(( boolean freealloc ));
|
||||
extern void sym_make_external_def _ARGUMENTS(( XmConst sym_name_entry_type *az_name ));
|
||||
extern void sym_make_forward_ref _ARGUMENTS(( XmConst yystype *az_id_frame , XmConst int l_widget_type , XmConst char *a_location ));
|
||||
extern void sym_make_value_forward_ref _ARGUMENTS(( XmConst yystype *az_value_frame , XmConst char *a_location , XmConst unsigned char fwd_ref_flags ));
|
||||
extern void UilDumpSymbolTable _ARGUMENTS(( sym_entry_type *node_entry ));
|
||||
extern void sym_dump_symbols _ARGUMENTS(( void ));
|
||||
extern void sym_dump_symbol _ARGUMENTS(( sym_entry_type *az_symbol_entry ));
|
||||
extern void sym_dump_widget _ARGUMENTS(( XmConst sym_widget_entry_type *az_widget_entry ));
|
||||
extern void sym_dump_argument _ARGUMENTS(( XmConst sym_argument_entry_type *az_argument_entry ));
|
||||
extern void sym_dump_control _ARGUMENTS(( XmConst sym_control_entry_type *az_control_entry ));
|
||||
extern void sym_dump_callback _ARGUMENTS(( XmConst sym_callback_entry_type *az_callback_entry ));
|
||||
extern void sym_dump_list _ARGUMENTS(( XmConst sym_list_entry_type *az_list_entry ));
|
||||
extern void sym_dump_name _ARGUMENTS(( XmConst sym_name_entry_type *az_name_entry ));
|
||||
extern void sym_dump_module _ARGUMENTS(( XmConst sym_module_entry_type *az_module_entry ));
|
||||
extern void sym_dump_color_item _ARGUMENTS(( XmConst sym_color_item_entry_type *az_color_item_entry ));
|
||||
extern void sym_dump_parent_list_item _ARGUMENTS(( XmConst sym_parent_list_type *az_parent_list_item ));
|
||||
extern void sym_dump_external_def _ARGUMENTS(( XmConst sym_external_def_entry_type *az_external_def_entry ));
|
||||
extern void sym_dump_proc_def _ARGUMENTS(( XmConst sym_proc_def_entry_type *az_proc_def_entry ));
|
||||
extern void sym_dump_proc_ref _ARGUMENTS(( XmConst sym_proc_ref_entry_type *az_proc_ref_entry ));
|
||||
extern void sym_dump_forward_ref _ARGUMENTS(( XmConst sym_forward_ref_entry_type *az_forward_ref_entry ));
|
||||
extern void sym_dump_value _ARGUMENTS(( XmConst sym_value_entry_type *az_value_entry ));
|
||||
extern void output_text _ARGUMENTS(( XmConst int length , XmConst char *text ));
|
||||
extern void sym_dump_source_info _ARGUMENTS(( sym_entry_header_type *hdr ));
|
||||
extern void sym_dump_obj_header _ARGUMENTS(( XmConst sym_obj_entry_type *az_obj_entry ));
|
||||
extern void sym_dump_include_file _ARGUMENTS(( sym_include_file_entry_type *az_symbol_entry ));
|
||||
extern void sym_dump_section _ARGUMENTS(( sym_section_entry_type *az_symbol_entry ));
|
||||
extern void sym_dump_object_variant _ARGUMENTS(( sym_def_obj_entry_type *az_symbol_entry ));
|
||||
extern void sym_dump_root_entry _ARGUMENTS(( sym_root_entry_type *az_symbol_entry ));
|
||||
extern char *sym_section_text _ARGUMENTS(( int b_type ));
|
||||
extern void dump_free_list _ARGUMENTS(( void ));
|
||||
|
||||
#if defined(__cplusplus) || defined(c_plusplus)
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* UilDefI_h */
|
||||
/* DON'T ADD STUFF AFTER THIS #endif */
|
||||
39
cde/osf/uil/UilDiagDef.h
Normal file
39
cde/osf/uil/UilDiagDef.h
Normal file
@@ -0,0 +1,39 @@
|
||||
/*
|
||||
* @OSF_COPYRIGHT@
|
||||
* COPYRIGHT NOTICE
|
||||
* Copyright (c) 1990, 1991, 1992, 1993 Open Software Foundation, Inc.
|
||||
* ALL RIGHTS RESERVED (MOTIF). See the file named COPYRIGHT.MOTIF for
|
||||
* the full copyright text.
|
||||
*/
|
||||
/*
|
||||
* HISTORY
|
||||
*/
|
||||
/* $XConsortium: UilDiagDef.h /main/10 1995/07/14 09:34:00 drk $ */
|
||||
|
||||
/*
|
||||
* (c) Copyright 1989, 1990, DIGITAL EQUIPMENT CORPORATION, MAYNARD, MASS. */
|
||||
|
||||
/*
|
||||
**++
|
||||
** FACILITY:
|
||||
**
|
||||
** User Interface Language Compiler (UIL)
|
||||
**
|
||||
** ABSTRACT:
|
||||
**
|
||||
** This include file defines the interface to the UIL diagnostic
|
||||
** issuing procedures in the UIL compiler.
|
||||
**
|
||||
**--
|
||||
**/
|
||||
|
||||
#ifndef UilDiagDef_h
|
||||
#define UilDiagDef_h
|
||||
|
||||
|
||||
#define diag_k_no_source NULL
|
||||
#define diag_k_no_column 255
|
||||
|
||||
|
||||
#endif /* UilDiagDef_h */
|
||||
/* DON'T ADD STUFF AFTER THIS #endif */
|
||||
1269
cde/osf/uil/UilDiags.c
Normal file
1269
cde/osf/uil/UilDiags.c
Normal file
File diff suppressed because it is too large
Load Diff
54
cde/osf/uil/UilIODef.h
Normal file
54
cde/osf/uil/UilIODef.h
Normal file
@@ -0,0 +1,54 @@
|
||||
/*
|
||||
* @OSF_COPYRIGHT@
|
||||
* COPYRIGHT NOTICE
|
||||
* Copyright (c) 1990, 1991, 1992, 1993 Open Software Foundation, Inc.
|
||||
* ALL RIGHTS RESERVED (MOTIF). See the file named COPYRIGHT.MOTIF for
|
||||
* the full copyright text.
|
||||
*/
|
||||
/*
|
||||
* HISTORY
|
||||
*/
|
||||
/* $XConsortium: UilIODef.h /main/10 1995/07/14 09:34:21 drk $ */
|
||||
|
||||
/*
|
||||
* (c) Copyright 1989, 1990, DIGITAL EQUIPMENT CORPORATION, MAYNARD, MASS. */
|
||||
|
||||
/*
|
||||
**++
|
||||
** FACILITY:
|
||||
**
|
||||
** User Interface Language Compiler (UIL)
|
||||
**
|
||||
** ABSTRACT:
|
||||
**
|
||||
** This include file defines the interface to the operating system
|
||||
** io facilities.
|
||||
**
|
||||
**--
|
||||
**/
|
||||
|
||||
#ifndef UilIODef_h
|
||||
#define UilIODef_h
|
||||
|
||||
|
||||
/*
|
||||
** Define a UIL File Control Block or FCB.
|
||||
*/
|
||||
|
||||
|
||||
#include <stdio.h>
|
||||
#ifndef NULL
|
||||
#define NULL 0L
|
||||
#endif
|
||||
|
||||
typedef struct
|
||||
{
|
||||
FILE *az_file_ptr;
|
||||
char *c_buffer;
|
||||
boolean v_position_before_get;
|
||||
z_key last_key;
|
||||
char expanded_name[ 256 ];
|
||||
} uil_fcb_type;
|
||||
|
||||
#endif /* UilIODef_h */
|
||||
/* DON'T ADD STUFF AFTER THIS #endif */
|
||||
216
cde/osf/uil/UilKeyTab.c
Normal file
216
cde/osf/uil/UilKeyTab.c
Normal file
@@ -0,0 +1,216 @@
|
||||
/*
|
||||
* @OSF_COPYRIGHT@
|
||||
* COPYRIGHT NOTICE
|
||||
* Copyright (c) 1990, 1991, 1992, 1993 Open Software Foundation, Inc.
|
||||
* ALL RIGHTS RESERVED (MOTIF). See the file named COPYRIGHT.MOTIF for
|
||||
* the full copyright text.
|
||||
*/
|
||||
/*
|
||||
* HISTORY
|
||||
*/
|
||||
#ifdef REV_INFO
|
||||
#ifndef lint
|
||||
static char rcsid[] = "$XConsortium: UilKeyTab.c /main/11 1995/07/14 09:34:29 drk $"
|
||||
#endif
|
||||
#endif
|
||||
|
||||
/*
|
||||
* (c) Copyright 1989, 1990, DIGITAL EQUIPMENT CORPORATION, MAYNARD, MASS. */
|
||||
|
||||
/*
|
||||
**++
|
||||
** FACILITY:
|
||||
**
|
||||
** User Interface Language Compiler (UIL)
|
||||
**
|
||||
** ABSTRACT:
|
||||
**
|
||||
** This module contains the keyword table used by the lexical analyzer
|
||||
** to look up the keywords in the UIL.
|
||||
**
|
||||
**--
|
||||
**/
|
||||
|
||||
|
||||
/*
|
||||
**
|
||||
** INCLUDE FILES
|
||||
**
|
||||
**/
|
||||
|
||||
#include "UilDefI.h"
|
||||
|
||||
|
||||
/*
|
||||
**
|
||||
** DEFINE and MACRO DEFINITIONS
|
||||
**
|
||||
**/
|
||||
|
||||
|
||||
/*
|
||||
**
|
||||
** EXTERNAL VARIABLE DECLARATIONS
|
||||
**
|
||||
**/
|
||||
|
||||
|
||||
/*
|
||||
**
|
||||
** GLOBAL VARIABLE DECLARATIONS
|
||||
**
|
||||
**/
|
||||
|
||||
|
||||
/*
|
||||
**
|
||||
** OWN VARIABLE DECLARATIONS
|
||||
**
|
||||
**/
|
||||
|
||||
/* Keyword table pointer. */
|
||||
|
||||
static key_keytable_entry_type * key_keytable_ptr;
|
||||
|
||||
|
||||
/*
|
||||
**++
|
||||
** FUNCTIONAL DESCRIPTION:
|
||||
**
|
||||
** This routine searches for a symbol in the compiler's keyword table.
|
||||
** There are two arguments to the routine, the length of the symbol and
|
||||
** the address of the start of the symbol. The routine returns the
|
||||
** address of the keyword entry found, or a NULL pointer if the
|
||||
** symbol is not found in the table.
|
||||
**
|
||||
** The search for the symbol is case sensitive depending upon the
|
||||
** keytable binding that was established by the key_initialize routine.
|
||||
**
|
||||
** The require file UilKeyTab.h defines and initializes the keyword
|
||||
** tables. It is built automatically from other files, thus it should
|
||||
** not be hand editted.
|
||||
**
|
||||
** FORMAL PARAMETERS:
|
||||
**
|
||||
** symbol_length.rl.v : length of symbol to look up
|
||||
** symbol_ptr.ra.v : address of symbol to look up
|
||||
**
|
||||
** IMPLICIT INPUTS:
|
||||
**
|
||||
** key_keytable_ptr : current keyword table
|
||||
**
|
||||
** IMPLICIT OUTPUTS:
|
||||
**
|
||||
** none
|
||||
**
|
||||
** FUNCTION VALUE:
|
||||
**
|
||||
** NULL : if the symbol is not in the keyword table
|
||||
** otherwise : the address of the keyword table entry for
|
||||
** the specified symbol.
|
||||
**
|
||||
** SIDE EFFECTS:
|
||||
**
|
||||
** none
|
||||
**
|
||||
**--
|
||||
**/
|
||||
key_keytable_entry_type *
|
||||
key_find_keyword (symbol_length, symbol_ptr)
|
||||
|
||||
unsigned int symbol_length;
|
||||
char * symbol_ptr;
|
||||
|
||||
{
|
||||
|
||||
int
|
||||
lower_limit,
|
||||
upper_limit;
|
||||
|
||||
/* Check the arguments. */
|
||||
|
||||
if (symbol_length > key_k_keyword_max_length)
|
||||
return NULL;
|
||||
|
||||
/* Initialize region to search. */
|
||||
|
||||
lower_limit = 0;
|
||||
upper_limit = key_k_keyword_count-1;
|
||||
|
||||
/* Perform binary search on keyword index. */
|
||||
|
||||
do {
|
||||
int mid_point, result;
|
||||
|
||||
key_keytable_entry_type * keyword_entry_ptr;
|
||||
|
||||
mid_point = (lower_limit + upper_limit) >> 1; /* divide by 2 */
|
||||
|
||||
keyword_entry_ptr = & key_keytable_ptr [mid_point];
|
||||
|
||||
result = strcmp (symbol_ptr, keyword_entry_ptr -> at_name);
|
||||
|
||||
if (result == 0) {
|
||||
return keyword_entry_ptr; /* Found keyword. */
|
||||
} else if (result < 0) {
|
||||
upper_limit = mid_point - 1; /* Search lower half. */
|
||||
} else {
|
||||
lower_limit = mid_point + 1; /* Search upper half. */
|
||||
}
|
||||
|
||||
} while (lower_limit <= upper_limit);
|
||||
|
||||
/* If we fall out of the bottom of the loop, symbol was not found. */
|
||||
|
||||
return NULL;
|
||||
|
||||
}
|
||||
|
||||
/*
|
||||
**++
|
||||
** FUNCTIONAL DESCRIPTION:
|
||||
**
|
||||
** This routine initializes the keyword lookup facility. It can be
|
||||
** called multiple times during a single compilation. It must be called
|
||||
** at least once before the keyword table is accessed.
|
||||
**
|
||||
** FORMAL PARAMETERS:
|
||||
**
|
||||
** none
|
||||
**
|
||||
** IMPLICIT INPUTS:
|
||||
**
|
||||
** uil_v_case_sensitive : case sensitive switch, determines which
|
||||
** : keyword table to use.
|
||||
**
|
||||
** IMPLICIT OUTPUTS:
|
||||
**
|
||||
** key_keytable_ptr : pointer to the keyword table to
|
||||
** use for keyword lookups.
|
||||
**
|
||||
** FUNCTION VALUE:
|
||||
**
|
||||
** none
|
||||
**
|
||||
** SIDE EFFECTS:
|
||||
**
|
||||
** none
|
||||
**
|
||||
**--
|
||||
**/
|
||||
void
|
||||
key_initialize ()
|
||||
|
||||
{
|
||||
|
||||
/* Use the correct keyword table based on the global case
|
||||
sensitivity. */
|
||||
|
||||
if (uil_v_case_sensitive) {
|
||||
key_keytable_ptr = key_table;
|
||||
} else {
|
||||
key_keytable_ptr = key_table_case_ins;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
2522
cde/osf/uil/UilLexAna.c
Normal file
2522
cde/osf/uil/UilLexAna.c
Normal file
File diff suppressed because it is too large
Load Diff
62
cde/osf/uil/UilLexDef.h
Normal file
62
cde/osf/uil/UilLexDef.h
Normal file
@@ -0,0 +1,62 @@
|
||||
/*
|
||||
* @OSF_COPYRIGHT@
|
||||
* COPYRIGHT NOTICE
|
||||
* Copyright (c) 1990, 1991, 1992, 1993 Open Software Foundation, Inc.
|
||||
* ALL RIGHTS RESERVED (MOTIF). See the file named COPYRIGHT.MOTIF for
|
||||
* the full copyright text.
|
||||
*/
|
||||
/*
|
||||
* HISTORY
|
||||
*/
|
||||
/* $XConsortium: UilLexDef.h /main/11 1995/07/14 09:34:58 drk $ */
|
||||
|
||||
/*
|
||||
* (c) Copyright 1989, 1990, DIGITAL EQUIPMENT CORPORATION, MAYNARD, MASS. */
|
||||
|
||||
/*
|
||||
**++
|
||||
** FACILITY:
|
||||
**
|
||||
** User Interface Language Compiler (UIL)
|
||||
**
|
||||
** ABSTRACT:
|
||||
**
|
||||
** This include file defines the interface to the UIL lexical
|
||||
** analyzer.
|
||||
**
|
||||
**--
|
||||
**/
|
||||
|
||||
#ifndef UilLexDef_h
|
||||
#define UilLexDef_h
|
||||
|
||||
|
||||
/*
|
||||
** Define flags to indicate whether certain characters are to be
|
||||
** filtered in text output.
|
||||
*/
|
||||
|
||||
#define lex_m_filter_tab (1 << 0)
|
||||
|
||||
/*
|
||||
** Define the default character set. In Motif, the default character set is
|
||||
** not isolatin1, but simply the null string, thus we must be able to
|
||||
** distinguish the two.
|
||||
*/
|
||||
|
||||
|
||||
#define lex_k_default_charset -1
|
||||
#define lex_k_userdefined_charset -2
|
||||
#define lex_k_fontlist_default_tag -3
|
||||
|
||||
/*
|
||||
** Since key_k_keyword_max_length assumes the length of the longest
|
||||
** WML generated keyword, we need a new constant to define the
|
||||
** longest allowable identifier. This length should not exceed
|
||||
** URMMaxIndexLen. (CR 5566)
|
||||
*/
|
||||
|
||||
#define lex_k_identifier_max_length 31
|
||||
|
||||
#endif /* UilLexDef_h */
|
||||
/* DON'T ADD STUFF AFTER THIS #endif */
|
||||
1010
cde/osf/uil/UilLstLst.c
Normal file
1010
cde/osf/uil/UilLstLst.c
Normal file
File diff suppressed because it is too large
Load Diff
1731
cde/osf/uil/UilLstMac.c
Normal file
1731
cde/osf/uil/UilLstMac.c
Normal file
File diff suppressed because it is too large
Load Diff
653
cde/osf/uil/UilMain.c
Normal file
653
cde/osf/uil/UilMain.c
Normal file
@@ -0,0 +1,653 @@
|
||||
/*
|
||||
* @OSF_COPYRIGHT@
|
||||
* COPYRIGHT NOTICE
|
||||
* Copyright (c) 1990, 1991, 1992, 1993 Open Software Foundation, Inc.
|
||||
* ALL RIGHTS RESERVED (MOTIF). See the file named COPYRIGHT.MOTIF for
|
||||
* the full copyright text.
|
||||
*/
|
||||
/*
|
||||
* HISTORY
|
||||
*/
|
||||
#ifdef REV_INFO
|
||||
#ifndef lint
|
||||
static char rcsid[] = "$XConsortium: UilMain.c /main/14 1996/06/03 15:49:20 pascale $"
|
||||
#endif
|
||||
#endif
|
||||
|
||||
/*
|
||||
* (c) Copyright 1989, 1990, DIGITAL EQUIPMENT CORPORATION, MAYNARD, MASS. */
|
||||
|
||||
/*
|
||||
**++
|
||||
** FACILITY:
|
||||
**
|
||||
** User Interface Language Compiler (UIL)
|
||||
**
|
||||
** ABSTRACT:
|
||||
**
|
||||
** This module is the main procedure of the UIL Compiler.
|
||||
**
|
||||
**--
|
||||
**/
|
||||
|
||||
/*
|
||||
**
|
||||
** INCLUDE FILES
|
||||
**
|
||||
*/
|
||||
|
||||
#include <X11/Xlocale.h>
|
||||
/* Sun's locale.h defines ON && OFF, which is also defined in UilLexPars.h */
|
||||
#ifdef ON
|
||||
#undef ON
|
||||
#endif
|
||||
#ifdef OFF
|
||||
#undef OFF
|
||||
#endif
|
||||
#ifndef X_NOT_STDC_ENV
|
||||
#include <stdlib.h>
|
||||
#endif
|
||||
#include "UilDefI.h"
|
||||
#include <setjmp.h>
|
||||
|
||||
/*
|
||||
**
|
||||
** TABLE OF CONTENTS
|
||||
**
|
||||
*/
|
||||
|
||||
/*
|
||||
** FORWARD DECLARATIONS
|
||||
*/
|
||||
|
||||
|
||||
extern int main _ARGUMENTS(( int l_argc , char *rac_argv []));
|
||||
|
||||
static void common_main _ARGUMENTS(( void ));
|
||||
static void common_cleanup _ARGUMENTS(( void ));
|
||||
|
||||
#ifdef CALLABLE
|
||||
static void UilWrapup _ARGUMENTS((Uil_compile_desc_type *compile_desc));
|
||||
#endif /* CALLABLE */
|
||||
|
||||
/*
|
||||
**
|
||||
** EXTERNAL Definitions
|
||||
**
|
||||
*/
|
||||
|
||||
|
||||
#ifndef NO_MESSAGE_CATALOG
|
||||
#include <nl_types.h>
|
||||
#if !defined(NL_CAT_LOCALE)
|
||||
#define NL_CAT_LOCALE 0
|
||||
#endif
|
||||
|
||||
externaldef(uilmsg) nl_catd uil_catd = NULL;
|
||||
|
||||
#endif
|
||||
|
||||
/*
|
||||
**
|
||||
** MODULE Definitions
|
||||
**
|
||||
*/
|
||||
|
||||
static status return_status = 0;
|
||||
static jmp_buf environment;
|
||||
static unsigned module_flags = 0;
|
||||
static unsigned doing_exit = 0;
|
||||
|
||||
/* Bit definitions for module_flags */
|
||||
|
||||
#define compiler_called (1 << 0)
|
||||
|
||||
|
||||
/*
|
||||
**++
|
||||
** FUNCTIONAL DESCRIPTION:
|
||||
**
|
||||
** This is the common part of the main routine.
|
||||
**
|
||||
** FORMAL PARAMETERS:
|
||||
**
|
||||
** none
|
||||
**
|
||||
** IMPLICIT INPUTS:
|
||||
**
|
||||
** none
|
||||
**
|
||||
** IMPLICIT OUTPUTS:
|
||||
**
|
||||
** none
|
||||
**
|
||||
** FUNCTION VALUE:
|
||||
**
|
||||
** void
|
||||
**
|
||||
** SIDE EFFECTS:
|
||||
**
|
||||
** compilation occurs
|
||||
**
|
||||
**--
|
||||
**/
|
||||
|
||||
static void common_main()
|
||||
{
|
||||
#ifndef NO_MESSAGE_CATALOG
|
||||
if (uil_catd == NULL)
|
||||
uil_catd = catopen("Uil", NL_CAT_LOCALE);
|
||||
#endif
|
||||
|
||||
/* Initialize the X toolkit. */
|
||||
XtToolkitInitialize();
|
||||
|
||||
/* use the user supplied data base instead */
|
||||
if (Uil_cmd_z_command.v_database)
|
||||
db_incorporate();
|
||||
|
||||
/* initialize the diagnostic system */
|
||||
diag_initialize_diagnostics();
|
||||
|
||||
/* initialize the symbol table */
|
||||
sym_initialize_storage();
|
||||
|
||||
/* initialize the source */
|
||||
src_initialize_source();
|
||||
|
||||
/* open listing file if requested */
|
||||
if (Uil_cmd_z_command.v_listing_file)
|
||||
lst_open_listing();
|
||||
|
||||
/* initialize the lexical analyzer */
|
||||
lex_initialize_analyzer();
|
||||
|
||||
/* initialize the keyword table */
|
||||
key_initialize();
|
||||
|
||||
/* initialize the sar data structures */
|
||||
sar_initialize();
|
||||
|
||||
/* call YACC to parse the source file */
|
||||
/* return 0 for success, 1 for failure */
|
||||
/* Make sure the root entry sections pointer is filled in */
|
||||
if (yyparse() != 0)
|
||||
diag_issue_diagnostic
|
||||
(d_inv_module, diag_k_no_source, diag_k_no_column);
|
||||
sym_az_root_entry->sections = sym_az_current_section_entry;
|
||||
|
||||
/* call forward reference resolver */
|
||||
sem_resolve_forward_refs();
|
||||
|
||||
/* call semantic validation */
|
||||
sem_validation ();
|
||||
|
||||
/* call the output phase if requested */
|
||||
if (Uil_cmd_z_command.v_resource_file)
|
||||
sem_output_uid_file();
|
||||
|
||||
/* call symbol table dumper - if requested */
|
||||
#if debug_version
|
||||
if (uil_v_dump_symbols == TRUE)
|
||||
sym_dump_symbols();
|
||||
#endif
|
||||
|
||||
|
||||
/* write compilation summary */
|
||||
diag_issue_summary();
|
||||
|
||||
|
||||
/* write listing file if requested */
|
||||
if (Uil_cmd_z_command.v_listing_file)
|
||||
lst_output_listing();
|
||||
|
||||
/* Storage is not cleaned up, since we will exit */
|
||||
uil_exit( uil_l_compile_status );
|
||||
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
**++
|
||||
** FUNCTIONAL DESCRIPTION:
|
||||
**
|
||||
** This is the image termination procedure for the UIL compiler.
|
||||
**
|
||||
** FORMAL PARAMETERS:
|
||||
**
|
||||
** severity status of compilation on exit
|
||||
**
|
||||
** IMPLICIT INPUTS:
|
||||
**
|
||||
** none
|
||||
**
|
||||
** IMPLICIT OUTPUTS:
|
||||
**
|
||||
** none
|
||||
**
|
||||
** FUNCTION VALUE:
|
||||
**
|
||||
** void
|
||||
**
|
||||
** SIDE EFFECTS:
|
||||
**
|
||||
** never return from this procedure
|
||||
**
|
||||
**--
|
||||
**/
|
||||
|
||||
void uil_exit(severity)
|
||||
|
||||
int severity;
|
||||
|
||||
{
|
||||
|
||||
|
||||
|
||||
|
||||
/* Prevent multiple looping through this routine */
|
||||
if ( doing_exit ) return;
|
||||
doing_exit = 1;
|
||||
|
||||
return_status = (severity >= uil_k_error_status);
|
||||
|
||||
/* Close and remove the uid file if it's still open. */
|
||||
/* It will only be open if a severe error occurred during the output */
|
||||
/* of the uid file. */
|
||||
|
||||
if (out_az_idbfile_id != NULL)
|
||||
UrmIdbCloseFile (out_az_idbfile_id, FALSE);
|
||||
|
||||
/* If compiler called, return to calling program rather than */
|
||||
/* exiting process */
|
||||
|
||||
if (module_flags & compiler_called)
|
||||
longjmp (environment, 1);
|
||||
|
||||
/* RAP FIX for listing files */
|
||||
common_cleanup();
|
||||
|
||||
|
||||
exit(return_status);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#ifndef CALLABLE
|
||||
/*
|
||||
**++
|
||||
** FUNCTIONAL DESCRIPTION:
|
||||
**
|
||||
** This is the main routine
|
||||
**
|
||||
** FORMAL PARAMETERS:
|
||||
**
|
||||
** l_argc: the number of command line arguments
|
||||
** rac_argv: an array of pointers to character array arguments
|
||||
**
|
||||
** IMPLICIT INPUTS:
|
||||
**
|
||||
** none
|
||||
**
|
||||
** IMPLICIT OUTPUTS:
|
||||
**
|
||||
** none
|
||||
**
|
||||
** COMPLETION CODES:
|
||||
**
|
||||
** 1 if errors; 0 otherwise
|
||||
**
|
||||
** SIDE EFFECTS:
|
||||
**
|
||||
** produce possibly a resource file and a listing file
|
||||
**--
|
||||
**/
|
||||
|
||||
int main( l_argc, rac_argv )
|
||||
int l_argc;
|
||||
char *rac_argv[ ];
|
||||
{
|
||||
|
||||
setlocale(LC_ALL, "");
|
||||
|
||||
/* call routine to parse the command line */
|
||||
|
||||
cmd_decode_command_line( l_argc, rac_argv );
|
||||
|
||||
/* call common main routine */
|
||||
|
||||
common_main();
|
||||
|
||||
}
|
||||
#endif /* !CALLABLE */
|
||||
|
||||
|
||||
|
||||
/*
|
||||
**++
|
||||
** FUNCTIONAL DESCRIPTION:
|
||||
**
|
||||
** This is the dynamic memory cleanup routine. It calls all facility
|
||||
** provided cleanup routines so that dynamic structures can be released.
|
||||
**
|
||||
** FORMAL PARAMETERS:
|
||||
**
|
||||
** none
|
||||
**
|
||||
** IMPLICIT INPUTS:
|
||||
**
|
||||
** none
|
||||
**
|
||||
** IMPLICIT OUTPUTS:
|
||||
**
|
||||
** none
|
||||
**
|
||||
** FUNCTION VALUE:
|
||||
**
|
||||
** void
|
||||
**
|
||||
** SIDE EFFECTS:
|
||||
**
|
||||
** all dynamic memory is freed
|
||||
**
|
||||
**--
|
||||
**/
|
||||
|
||||
static void common_cleanup()
|
||||
{
|
||||
|
||||
/* cleanup the source file information */
|
||||
|
||||
Uil_src_cleanup_source();
|
||||
|
||||
|
||||
/* cleanup listing facility */
|
||||
|
||||
Uil_lst_cleanup_listing();
|
||||
|
||||
|
||||
/* cleanup the lexical analyzer */
|
||||
|
||||
Uil_lex_cleanup_analyzer();
|
||||
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
#ifdef CALLABLE
|
||||
/*
|
||||
**++
|
||||
** FUNCTIONAL DESCRIPTION:
|
||||
**
|
||||
** This is the callable entry point for the UIL Compiler.
|
||||
**
|
||||
** FORMAL PARAMETERS:
|
||||
**
|
||||
** command_desc pointer to data structure defining UIL command line
|
||||
**
|
||||
** compile_desc pointer to data structure describing the results of
|
||||
** the compilation.
|
||||
**
|
||||
** message_cb callback routine to process messages
|
||||
**
|
||||
** message_data user-data passed to the message_cb
|
||||
**
|
||||
** status_cb callback routine to process messages
|
||||
**
|
||||
** status_data user-data passed to the status_cb
|
||||
**
|
||||
**
|
||||
** IMPLICIT INPUTS:
|
||||
**
|
||||
** none
|
||||
**
|
||||
** IMPLICIT OUTPUTS:
|
||||
**
|
||||
** none
|
||||
**
|
||||
** COMPLETION CODES:
|
||||
**
|
||||
** uil$_normal if no errors; uil$_no_output otherwise
|
||||
**
|
||||
** SIDE EFFECTS:
|
||||
**
|
||||
** none
|
||||
**--
|
||||
**/
|
||||
|
||||
|
||||
Uil_status_type Uil
|
||||
|
||||
(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)
|
||||
|
||||
|
||||
{
|
||||
|
||||
/* Indicate compiler called rather than being started via command line */
|
||||
|
||||
module_flags = module_flags | compiler_called;
|
||||
doing_exit = 0;
|
||||
|
||||
|
||||
/* Initialize command line data structure */
|
||||
|
||||
Uil_cmd_z_command.ac_database = command_desc -> database;
|
||||
Uil_cmd_z_command.v_database = command_desc -> database_flag;
|
||||
Uil_cmd_z_command.ac_source_file = command_desc -> source_file;
|
||||
Uil_cmd_z_command.ac_resource_file = command_desc -> resource_file;
|
||||
Uil_cmd_z_command.ac_listing_file = command_desc -> listing_file;
|
||||
Uil_cmd_z_command.include_dir_count = command_desc -> include_dir_count;
|
||||
Uil_cmd_z_command.ac_include_dir = command_desc -> include_dir;
|
||||
Uil_cmd_z_command.v_listing_file = command_desc -> listing_file_flag;
|
||||
Uil_cmd_z_command.v_resource_file = command_desc -> resource_file_flag;
|
||||
Uil_cmd_z_command.v_show_machine_code = command_desc -> machine_code_flag;
|
||||
Uil_cmd_z_command.v_report_info_msg = command_desc -> report_info_msg_flag;
|
||||
Uil_cmd_z_command.v_report_warn_msg = command_desc -> report_warn_msg_flag;
|
||||
Uil_cmd_z_command.v_parse_tree = command_desc -> parse_tree_flag;
|
||||
Uil_cmd_z_command.v_use_setlocale = command_desc -> use_setlocale_flag;
|
||||
Uil_cmd_z_command.v_issue_summary = command_desc -> issue_summary;
|
||||
Uil_cmd_z_command.status_update_delay = command_desc -> status_update_delay;
|
||||
Uil_cmd_z_command.message_cb = message_cb;
|
||||
Uil_cmd_z_command.message_data = message_data;
|
||||
Uil_cmd_z_command.status_cb = status_cb;
|
||||
Uil_cmd_z_command.status_data = status_data;
|
||||
|
||||
/* The setjmp function allows us to unwind from a fatal error setjmp is */
|
||||
/* nonzero if we are returning from a fatal error */
|
||||
|
||||
if (setjmp(environment) == 0) {
|
||||
|
||||
/* use the user supplied data base instead. If no source file
|
||||
is given (this call is only to change the database), return at
|
||||
this point with a success. */
|
||||
if ( Uil_cmd_z_command.v_database )
|
||||
{
|
||||
db_incorporate ();
|
||||
if ( Uil_cmd_z_command.ac_source_file == NULL )
|
||||
uil_exit (uil_k_success_status);
|
||||
}
|
||||
|
||||
/* initialize the diagnostic system */
|
||||
uil_l_compile_status = uil_k_success_status;
|
||||
diag_initialize_diagnostics();
|
||||
|
||||
/* initialize the symbol table */
|
||||
sym_initialize_storage();
|
||||
|
||||
/* initialize the source */
|
||||
src_initialize_source();
|
||||
|
||||
/* open listing file if requested */
|
||||
if (Uil_cmd_z_command.v_listing_file)
|
||||
lst_open_listing();
|
||||
|
||||
/* initialize the lexical analyzer */
|
||||
lex_initialize_analyzer();
|
||||
|
||||
/* initialize the keyword table */
|
||||
key_initialize();
|
||||
|
||||
/* initialize the sar data structures */
|
||||
sar_initialize();
|
||||
|
||||
/* call YACC to parse the source file */
|
||||
/* return 0 for success, 1 for failure */
|
||||
/* Make sure the root entry sections pointer is filled in */
|
||||
if (yyparse() != 0)
|
||||
diag_issue_diagnostic
|
||||
(d_inv_module, diag_k_no_source, diag_k_no_column);
|
||||
sym_az_root_entry->sections = sym_az_current_section_entry;
|
||||
|
||||
/* call forward reference resolver */
|
||||
sem_resolve_forward_refs();
|
||||
|
||||
/* call semantic validation */
|
||||
sem_validation ();
|
||||
|
||||
/* call the output phase if requested */
|
||||
if (Uil_cmd_z_command.v_resource_file)
|
||||
sem_output_uid_file();
|
||||
|
||||
/* call symbol table dumper - if requested */
|
||||
#if debug_version
|
||||
if (uil_v_dump_symbols == TRUE)
|
||||
sym_dump_symbols();
|
||||
#endif
|
||||
|
||||
/* Perform standard wrapup processing */
|
||||
UilWrapup (compile_desc);
|
||||
|
||||
/*
|
||||
* Fix for CR 5534 - call the routine to restore the old signal handlers
|
||||
*/
|
||||
diag_restore_diagnostics();
|
||||
/*
|
||||
* End Fix for CR 5534
|
||||
*/
|
||||
|
||||
/* exit with the compile status */
|
||||
return uil_l_compile_status;
|
||||
|
||||
}
|
||||
|
||||
/*
|
||||
** longjmp return from setjmp. This is the case of a return via
|
||||
** uil_exit the value return_status is set by uil_exit.
|
||||
*/
|
||||
else
|
||||
{
|
||||
/* Do standard compiler wrapup */
|
||||
UilWrapup (compile_desc);
|
||||
|
||||
/* return the status set by uil_exit */
|
||||
return uil_l_compile_status;
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/*
|
||||
* Local function to provide compiler wrapup processing. It is called both
|
||||
* from the longjmp and sequential paths in the callable compiler above.
|
||||
*/
|
||||
static void UilWrapup (compile_desc)
|
||||
Uil_compile_desc_type *compile_desc;
|
||||
|
||||
{
|
||||
|
||||
int i; /* loop index for copying message counts */
|
||||
|
||||
/* write compilation summary if requested */
|
||||
if ( Uil_cmd_z_command.v_issue_summary )
|
||||
diag_issue_summary();
|
||||
|
||||
/* write listing file if requested */
|
||||
if (Uil_cmd_z_command.v_listing_file)
|
||||
lst_output_listing();
|
||||
|
||||
/*
|
||||
** fill in the "parse tree root" in the compile descriptor,
|
||||
** and set the version for the compiler and the symbol table
|
||||
** structure.
|
||||
*/
|
||||
compile_desc->parse_tree_root = (char *)sym_az_root_entry;
|
||||
compile_desc->data_version = _data_version;
|
||||
compile_desc->compiler_version = _compiler_version_int;
|
||||
|
||||
/* Fill in the message_summary array in the compile_desc */
|
||||
for (i = uil_k_min_status; i <= uil_k_max_status; i++)
|
||||
compile_desc->message_count[i] = Uil_message_count[i];
|
||||
|
||||
/* If there are any error/severe messages, then don't return */
|
||||
/* a symbol table for the callable compiler - clean up here */
|
||||
if ( Uil_message_count[Uil_k_error_status]>0 ||
|
||||
Uil_message_count[Uil_k_severe_status]>0 )
|
||||
{
|
||||
Uil_cmd_z_command.v_parse_tree = FALSE;
|
||||
compile_desc->parse_tree_root = NULL;
|
||||
}
|
||||
|
||||
/* Call the cleanup routine to free dynamic memory */
|
||||
common_cleanup();
|
||||
|
||||
/* Cleanup storage; what is cleaned up depends on whether compiler */
|
||||
/* was called or not */
|
||||
Uil_sym_cleanup_storage (Uil_cmd_z_command.v_parse_tree!=1);
|
||||
|
||||
}
|
||||
|
||||
#endif /* CALLABLE */
|
||||
|
||||
#ifdef NO_MEMMOVE
|
||||
|
||||
/*
|
||||
**++
|
||||
** FUNCTIONAL DESCRIPTION:
|
||||
**
|
||||
** This is a memmove function that explicitly handles
|
||||
** overlapping memory areas. Written in response to
|
||||
** CR 4851.
|
||||
**
|
||||
** FORMAL PARAMETERS:
|
||||
**
|
||||
** same as memcpy
|
||||
**
|
||||
** COMPLETION CODES:
|
||||
**
|
||||
** same as memcpy
|
||||
**
|
||||
** SIDE EFFECTS:
|
||||
**
|
||||
**--
|
||||
**/
|
||||
|
||||
char *uil_mmove(s1, s2, n)
|
||||
char *s1, *s2;
|
||||
int n;
|
||||
{
|
||||
char *temp;
|
||||
|
||||
if(s2 == s1)
|
||||
return(s2);
|
||||
if(s2 < s1 && s1 <= s2 + n){
|
||||
if(temp = (char *)malloc(n)){
|
||||
memcpy(temp, s2, n);
|
||||
memcpy(s1, temp, n);
|
||||
free(temp);
|
||||
return(s1);
|
||||
}
|
||||
printf("uil_mmove: Memory allocation failed!\n");
|
||||
exit(-1);
|
||||
}
|
||||
return((char *)memcpy(s1, s2, n));
|
||||
}
|
||||
#endif /* NO_MEMMOVE */
|
||||
95
cde/osf/uil/UilMess.h
Normal file
95
cde/osf/uil/UilMess.h
Normal file
@@ -0,0 +1,95 @@
|
||||
/*
|
||||
* @OSF_COPYRIGHT@
|
||||
* COPYRIGHT NOTICE
|
||||
* Copyright (c) 1990, 1991, 1992, 1993 Open Software Foundation, Inc.
|
||||
* ALL RIGHTS RESERVED (MOTIF). See the file named COPYRIGHT.MOTIF for
|
||||
* the full copyright text.
|
||||
*/
|
||||
/*
|
||||
* HISTORY
|
||||
*/
|
||||
/* $XConsortium: UilMess.h /main/10 1995/07/14 09:35:51 drk $ */
|
||||
|
||||
/*
|
||||
* (c) Copyright 1989, 1990, DIGITAL EQUIPMENT CORPORATION, MAYNARD, MASS. */
|
||||
#define d_add_source 2
|
||||
#define d_arg_count 23
|
||||
#define d_arg_type 24
|
||||
#define d_backslash_ignored 11
|
||||
#define d_bad_argument 72
|
||||
#define d_bad_database 73
|
||||
#define d_bad_lang_value 67
|
||||
#define d_bug_check 5
|
||||
#define d_cannot_convert 71
|
||||
#define d_circular_def 45
|
||||
#define d_circular_ref 63
|
||||
#define d_control_char 9
|
||||
#define d_create_proc 41
|
||||
#define d_create_proc_inv 42
|
||||
#define d_create_proc_req 43
|
||||
#define d_ctx_req 16
|
||||
#define d_default_charset 80
|
||||
#define d_different_units 79
|
||||
#define d_dup_letter 52
|
||||
#define d_dup_list 27
|
||||
#define d_dupl_opt 0
|
||||
#define d_future_version 74
|
||||
#define d_gadget_not_sup 57
|
||||
#define d_icon_letter 54
|
||||
#define d_icon_width 53
|
||||
#define d_illegal_forward_ref 70
|
||||
#define d_include_file 78
|
||||
#define d_info 31
|
||||
#define d_inv_module 35
|
||||
#define d_invalid_enumval 66
|
||||
#define d_list_item 28
|
||||
#define d_listing_open 33
|
||||
#define d_listing_write 34
|
||||
#define d_miss_opt_arg 32
|
||||
#define d_name_too_long 12
|
||||
#define d_names 50
|
||||
#define d_never_def 26
|
||||
#define d_no_enumset 65
|
||||
#define d_no_source 46
|
||||
#define d_no_uid 40
|
||||
#define d_nonpvt 22
|
||||
#define d_not_impl 17
|
||||
#define d_null 44
|
||||
#define d_obj_type 25
|
||||
#define d_operand_type 58
|
||||
#define d_out_of_memory 13
|
||||
#define d_out_range 7
|
||||
#define d_override_builtin 64
|
||||
#define d_prev_error 29
|
||||
#define d_previous_def 21
|
||||
#define d_single_control 48
|
||||
#define d_single_letter 51
|
||||
#define d_single_occur 47
|
||||
#define d_src_close 62
|
||||
#define d_src_limit 36
|
||||
#define d_src_null_char 37
|
||||
#define d_src_open 3
|
||||
#define d_src_read 4
|
||||
#define d_src_truncate 6
|
||||
#define d_submit_spr 30
|
||||
#define d_subnotall 56
|
||||
#define d_summary 38
|
||||
#define d_supersede 20
|
||||
#define d_syntax 14
|
||||
#define d_too_many 55
|
||||
#define d_too_many_dirs 61
|
||||
#define d_uid_open 39
|
||||
#define d_uid_write 76
|
||||
#define d_undefined 15
|
||||
#define d_unknown_charset 49
|
||||
#define d_unknown_classrecnam 77
|
||||
#define d_unknown_opt 1
|
||||
#define d_unknown_seq 10
|
||||
#define d_unsupp_charset 59
|
||||
#define d_unsupp_const 60
|
||||
#define d_unsupported 19
|
||||
#define d_unterm_seq 8
|
||||
#define d_value_too_large 69
|
||||
#define d_widget_cycle 68
|
||||
#define d_wmd_open 75
|
||||
#define d_wrong_type 18
|
||||
223
cde/osf/uil/UilMessTab.h
Normal file
223
cde/osf/uil/UilMessTab.h
Normal file
@@ -0,0 +1,223 @@
|
||||
/*
|
||||
* @OSF_COPYRIGHT@
|
||||
* COPYRIGHT NOTICE
|
||||
* Copyright (c) 1990, 1991, 1992, 1993 Open Software Foundation, Inc.
|
||||
* ALL RIGHTS RESERVED (MOTIF). See the file named COPYRIGHT.MOTIF for
|
||||
* the full copyright text.
|
||||
*/
|
||||
/*
|
||||
* HISTORY
|
||||
*/
|
||||
/* $XConsortium: UilMessTab.h /main/11 1995/07/14 09:36:09 drk $ */
|
||||
|
||||
/*
|
||||
* (c) Copyright 1989, 1990, DIGITAL EQUIPMENT CORPORATION, MAYNARD, MASS. */
|
||||
|
||||
/*
|
||||
**++
|
||||
** FACILITY:
|
||||
**
|
||||
** DECwindows Toolkit User Interface Language Compiler (UIL)
|
||||
**--
|
||||
**/
|
||||
|
||||
|
||||
char XmConst msg0[36] = "duplicate option \"%s\" was ignored";
|
||||
char XmConst msg1[34] = "unknown option \"%s\" was ignored";
|
||||
char XmConst msg2[43] = "additional UIL source file: %s was ignored";
|
||||
char XmConst msg3[30] = "error opening source file: %s";
|
||||
char XmConst msg4[43] = "error reading next line of source file: %s";
|
||||
char XmConst msg5[19] = "Internal error: %s";
|
||||
char XmConst msg6[32] = "line truncated at %d characters";
|
||||
char XmConst msg7[31] = "value of %s is out of range %s";
|
||||
char XmConst msg8[21] = "%s not terminated %s";
|
||||
char XmConst msg9[37] = "unprintable character \\%d\\ ignored";
|
||||
char XmConst msg10[32] = "unknown sequence \"%s\" ignored";
|
||||
char XmConst msg11[46] = "unknown escape sequence \"\\%c\" - \\ ignored";
|
||||
char XmConst msg12[46] = "name exceeds %d characters - truncated to: %s";
|
||||
char XmConst msg13[35] = "compiler ran out of virtual memory";
|
||||
char XmConst msg14[56] = "unexpected %s token seen - parsing resumes after \"%c\"";
|
||||
char XmConst msg15[44] = "%s %s must be defined before this reference";
|
||||
char XmConst msg16[41] = "context requires a %s - %s was specified";
|
||||
char XmConst msg17[26] = "%s is not implemented yet";
|
||||
char XmConst msg18[39] = "found %s value when expecting %s value";
|
||||
char XmConst msg19[45] = "the %s %s is not supported for the %s object";
|
||||
char XmConst msg20[62] = "this %s %s is superseded by the last definition in this %s %s";
|
||||
char XmConst msg21[33] = "name %s previously defined as %s";
|
||||
char XmConst msg22[43] = "value used in this context must be private";
|
||||
char XmConst msg23[55] = "procedure %s was previously declared with %d arguments";
|
||||
char XmConst msg24[56] = "found %s value - procedure %s argument must be %s value";
|
||||
char XmConst msg25[33] = "found %s %s when expecting %s %s";
|
||||
char XmConst msg26[24] = "%s %s was never defined";
|
||||
char XmConst msg27[39] = "%s %s already specified for this %s %s";
|
||||
char XmConst msg28[29] = "%s item not allowed in %s %s";
|
||||
char XmConst msg29[45] = "compilation terminated - fix previous errors";
|
||||
char XmConst msg30[38] = "internal error - submit defect report";
|
||||
char XmConst msg31[2] = " ";
|
||||
char XmConst msg32[35] = "%s missing following \"%s\" option";
|
||||
char XmConst msg33[31] = "error opening listing file: %s";
|
||||
char XmConst msg34[34] = "error writing to listing file: %s";
|
||||
char XmConst msg35[51] = "invalid module structure - check UIL module syntax";
|
||||
char XmConst msg36[31] = "too many source files open: %s";
|
||||
char XmConst msg37[38] = "source line contains a null character";
|
||||
char XmConst msg38[45] = "errors: %d warnings: %d informationals: %d";
|
||||
char XmConst msg39[27] = "error opening UID file: %s";
|
||||
char XmConst msg40[25] = "no UID file was produced";
|
||||
char XmConst msg41[53] = "creation procedure is not supported by the %s widget";
|
||||
char XmConst msg42[59] = "creation procedure is not allowed in a %s widget reference";
|
||||
char XmConst msg43[58] = "creation procedure is required in a %s widget declaration";
|
||||
char XmConst msg44[46] = "a NULL character in a string is not supported";
|
||||
char XmConst msg45[43] = "widget %s is part of a circular definition";
|
||||
char XmConst msg46[25] = "no source file specified";
|
||||
char XmConst msg47[35] = "%s %s supports only a single %s %s";
|
||||
char XmConst msg48[41] = "%s widget supports only a single control";
|
||||
char XmConst msg49[22] = "unknown character set";
|
||||
char XmConst msg50[47] = "place names clause before other module clauses";
|
||||
char XmConst msg51[47] = "color letter string must be a single character";
|
||||
char XmConst msg52[48] = "color letter used for prior color in this table";
|
||||
char XmConst msg53[37] = "row %d must have same width as row 1";
|
||||
char XmConst msg54[52] = "row %d, column %d: letter \"%c\" not in color table";
|
||||
char XmConst msg55[32] = "too many %ss in %s, limit is %d";
|
||||
char XmConst msg56[48] = "Subqualifier not allowed with negated qualifier";
|
||||
char XmConst msg57[60] = "%s gadget is not supported - %s widget will be used instead";
|
||||
char XmConst msg58[28] = "%s type is not valid for %s";
|
||||
char XmConst msg59[66] = "support for this character set may be removed in a future release";
|
||||
char XmConst msg60[49] = "the %s constraint is not supported for the %s %s";
|
||||
char XmConst msg61[37] = "too many \"%s\" options, limit is %d";
|
||||
char XmConst msg62[30] = "error closing source file: %s";
|
||||
char XmConst msg63[35] = "the %s value is circularly defined";
|
||||
char XmConst msg64[28] = "overriding built-in name %s";
|
||||
char XmConst msg65[51] = "the %s argument does not support enumerated values";
|
||||
char XmConst msg66[57] = "the %s argument does not support the %s enumerated value";
|
||||
char XmConst msg67[40] = "$LANG contains an unknown character set";
|
||||
char XmConst msg68[66] = "the %s object's controls hierarchy contains a reference to itself";
|
||||
char XmConst msg69[41] = "value %s is too large for context buffer";
|
||||
char XmConst msg70[42] = "forward referencing is not allowed for %s";
|
||||
char XmConst msg71[34] = "cannot convert %s type to %s type";
|
||||
char XmConst msg72[14] = "%s is invalid";
|
||||
char XmConst msg73[30] = "error reading binary database";
|
||||
char XmConst msg74[47] = "binary database compiled with a future version";
|
||||
char XmConst msg75[32] = "error opening database file: %s";
|
||||
char XmConst msg76[27] = "error writing UID file: %s";
|
||||
char XmConst msg77[45] = "'%s' is an unknown Toolkit class record name";
|
||||
char XmConst msg78[26] = "invalid include file name";
|
||||
char XmConst msg79[49] = "incompatible unit types for arithmetic operation";
|
||||
char XmConst msg80[54] = "%s used as charset name; %s used as charset component";
|
||||
|
||||
typedef struct
|
||||
{
|
||||
XmConst int l_severity;
|
||||
char XmConst *ac_text;
|
||||
} diag_rz_msg_entry;
|
||||
|
||||
XmConst diag_rz_msg_entry diag_rz_msg_table[81] =
|
||||
{
|
||||
{ 2, msg0 },
|
||||
{ 2, msg1 },
|
||||
{ 3, msg2 },
|
||||
{ 4, msg3 },
|
||||
{ 4, msg4 },
|
||||
{ 4, msg5 },
|
||||
{ 3, msg6 },
|
||||
{ 3, msg7 },
|
||||
{ 3, msg8 },
|
||||
{ 3, msg9 },
|
||||
{ 3, msg10 },
|
||||
{ 3, msg11 },
|
||||
{ 3, msg12 },
|
||||
{ 4, msg13 },
|
||||
{ 3, msg14 },
|
||||
{ 3, msg15 },
|
||||
{ 3, msg16 },
|
||||
{ 3, msg17 },
|
||||
{ 3, msg18 },
|
||||
{ 2, msg19 },
|
||||
{ 1, msg20 },
|
||||
{ 3, msg21 },
|
||||
{ 3, msg22 },
|
||||
{ 3, msg23 },
|
||||
{ 3, msg24 },
|
||||
{ 3, msg25 },
|
||||
{ 3, msg26 },
|
||||
{ 3, msg27 },
|
||||
{ 3, msg28 },
|
||||
{ 4, msg29 },
|
||||
{ 4, msg30 },
|
||||
{ 1, msg31 },
|
||||
{ 3, msg32 },
|
||||
{ 4, msg33 },
|
||||
{ 4, msg34 },
|
||||
{ 3, msg35 },
|
||||
{ 4, msg36 },
|
||||
{ 3, msg37 },
|
||||
{ 1, msg38 },
|
||||
{ 4, msg39 },
|
||||
{ 1, msg40 },
|
||||
{ 3, msg41 },
|
||||
{ 3, msg42 },
|
||||
{ 3, msg43 },
|
||||
{ 2, msg44 },
|
||||
{ 3, msg45 },
|
||||
{ 4, msg46 },
|
||||
{ 2, msg47 },
|
||||
{ 2, msg48 },
|
||||
{ 3, msg49 },
|
||||
{ 3, msg50 },
|
||||
{ 3, msg51 },
|
||||
{ 3, msg52 },
|
||||
{ 3, msg53 },
|
||||
{ 3, msg54 },
|
||||
{ 3, msg55 },
|
||||
{ 4, msg56 },
|
||||
{ 2, msg57 },
|
||||
{ 3, msg58 },
|
||||
{ 2, msg59 },
|
||||
{ 2, msg60 },
|
||||
{ 2, msg61 },
|
||||
{ 2, msg62 },
|
||||
{ 3, msg63 },
|
||||
{ 2, msg64 },
|
||||
{ 2, msg65 },
|
||||
{ 2, msg66 },
|
||||
{ 3, msg67 },
|
||||
{ 3, msg68 },
|
||||
{ 4, msg69 },
|
||||
{ 4, msg70 },
|
||||
{ 3, msg71 },
|
||||
{ 3, msg72 },
|
||||
{ 4, msg73 },
|
||||
{ 4, msg74 },
|
||||
{ 4, msg75 },
|
||||
{ 4, msg76 },
|
||||
{ 2, msg77 },
|
||||
{ 4, msg78 },
|
||||
{ 4, msg79 },
|
||||
{ 1, msg80 },
|
||||
};
|
||||
|
||||
#ifndef NO_MESSAGE_CATALOG
|
||||
#include <nl_types.h>
|
||||
#include "UilMsgCatI.h"
|
||||
externalref nl_catd uil_catd;
|
||||
|
||||
XmConst int msg_cat_table[81] = {
|
||||
UIL_0, UIL_1, UIL_2, UIL_3, UIL_4,
|
||||
UIL_5, UIL_6, UIL_7, UIL_8, UIL_9,
|
||||
UIL_10, UIL_11, UIL_12, UIL_13, UIL_14,
|
||||
UIL_15, UIL_16, UIL_17, UIL_18, UIL_19,
|
||||
UIL_20, UIL_21, UIL_22, UIL_23, UIL_24,
|
||||
UIL_25, UIL_26, UIL_27, UIL_28, UIL_29,
|
||||
UIL_30, UIL_31, UIL_32, UIL_33, UIL_34,
|
||||
UIL_35, UIL_36, UIL_37, UIL_38, UIL_39,
|
||||
UIL_40, UIL_41, UIL_42, UIL_43, UIL_44,
|
||||
UIL_45, UIL_46, UIL_47, UIL_48, UIL_49,
|
||||
UIL_50, UIL_51, UIL_52, UIL_53, UIL_54,
|
||||
UIL_55, UIL_56, UIL_57, UIL_58, UIL_59,
|
||||
UIL_60, UIL_61, UIL_62, UIL_63, UIL_64,
|
||||
UIL_65, UIL_66, UIL_67, UIL_68, UIL_69,
|
||||
UIL_70, UIL_71, UIL_72,
|
||||
UIL_V2_73, UIL_V2_74, UIL_V2_75, UIL_V2_76,
|
||||
UIL_V2_77, UIL_78, UIL_V2_79, UIL_V2_80,
|
||||
};
|
||||
|
||||
#endif
|
||||
4030
cde/osf/uil/UilP2Out.c
Normal file
4030
cde/osf/uil/UilP2Out.c
Normal file
File diff suppressed because it is too large
Load Diff
293
cde/osf/uil/UilP2Reslv.c
Normal file
293
cde/osf/uil/UilP2Reslv.c
Normal file
@@ -0,0 +1,293 @@
|
||||
/*
|
||||
* @OSF_COPYRIGHT@
|
||||
* COPYRIGHT NOTICE
|
||||
* Copyright (c) 1990, 1991, 1992, 1993 Open Software Foundation, Inc.
|
||||
* ALL RIGHTS RESERVED (MOTIF). See the file named COPYRIGHT.MOTIF for
|
||||
* the full copyright text.
|
||||
*/
|
||||
/*
|
||||
* HISTORY
|
||||
*/
|
||||
#ifdef REV_INFO
|
||||
#ifndef lint
|
||||
static char rcsid[] = "$XConsortium: UilP2Reslv.c /main/11 1995/07/14 09:36:35 drk $"
|
||||
#endif
|
||||
#endif
|
||||
|
||||
/*
|
||||
* (c) Copyright 1989, 1990, DIGITAL EQUIPMENT CORPORATION, MAYNARD, MASS. */
|
||||
|
||||
/*
|
||||
**++
|
||||
** FACILITY:
|
||||
**
|
||||
** User Interface Language Compiler (UIL)
|
||||
**
|
||||
** ABSTRACT:
|
||||
**
|
||||
** This module contain the second pass routines for resolving forward
|
||||
** references.
|
||||
**
|
||||
**--
|
||||
**/
|
||||
|
||||
|
||||
/*
|
||||
**
|
||||
** INCLUDE FILES
|
||||
**
|
||||
**/
|
||||
|
||||
#include "UilDefI.h"
|
||||
|
||||
|
||||
/*
|
||||
**
|
||||
** DEFINE and MACRO DEFINITIONS
|
||||
**
|
||||
**/
|
||||
|
||||
|
||||
|
||||
/*
|
||||
**
|
||||
** EXTERNAL VARIABLE DECLARATIONS
|
||||
**
|
||||
**/
|
||||
|
||||
|
||||
/*
|
||||
**
|
||||
** GLOBAL VARIABLE DECLARATIONS
|
||||
**
|
||||
**/
|
||||
|
||||
|
||||
|
||||
/*
|
||||
**
|
||||
** OWN VARIABLE DECLARATIONS
|
||||
**
|
||||
**/
|
||||
|
||||
|
||||
/*
|
||||
**++
|
||||
** FUNCTIONAL DESCRIPTION:
|
||||
**
|
||||
** This function processes forward references from the first pass.
|
||||
**
|
||||
** FORMAL PARAMETERS:
|
||||
**
|
||||
** none
|
||||
**
|
||||
** IMPLICIT INPUTS:
|
||||
**
|
||||
** sym_az_forward_ref_chain
|
||||
** sym_az_val_forward_ref_chain
|
||||
**
|
||||
** IMPLICIT OUTPUTS:
|
||||
**
|
||||
** none
|
||||
**
|
||||
** FUNCTION VALUE:
|
||||
**
|
||||
** void
|
||||
**
|
||||
** SIDE EFFECTS:
|
||||
**
|
||||
** error messages may be issued for objects that are still undefined
|
||||
** or of the wrong type
|
||||
**
|
||||
**--
|
||||
**/
|
||||
|
||||
void sem_resolve_forward_refs()
|
||||
|
||||
{
|
||||
sym_forward_ref_entry_type * fwd_entry;
|
||||
sym_forward_ref_entry_type * next_fwd_entry;
|
||||
sym_val_forward_ref_entry_type * fwd_val_entry;
|
||||
sym_val_forward_ref_entry_type * next_fwd_val_entry;
|
||||
sym_widget_entry_type ** target_obj_entry;
|
||||
sym_value_entry_type ** target_val_entry;
|
||||
sym_parent_list_type * parent_node;
|
||||
sym_parent_list_type * parent_ptr;
|
||||
int found;
|
||||
|
||||
/*
|
||||
** Forward references are placed on a chain by the first pass of
|
||||
** the compiler. This routine walks the chain checking that
|
||||
** 1) name is now defined
|
||||
** 2) name points to the correct type of object
|
||||
*/
|
||||
|
||||
for (fwd_entry = sym_az_forward_ref_chain;
|
||||
fwd_entry != NULL;
|
||||
fwd_entry = next_fwd_entry)
|
||||
{
|
||||
sym_name_entry_type * name_entry;
|
||||
sym_widget_entry_type * object_entry;
|
||||
unsigned short int object_type;
|
||||
|
||||
|
||||
/*
|
||||
** Save the pointer to the next forward entry so we can free the current
|
||||
** entry after it is processed.
|
||||
*/
|
||||
next_fwd_entry = fwd_entry->az_next_ref;
|
||||
|
||||
|
||||
/*
|
||||
** Call the Status callback routine to report our progress.
|
||||
*/
|
||||
/* %COMPLETE */
|
||||
Uil_percent_complete = 60;
|
||||
if (Uil_cmd_z_command.status_cb != (Uil_continue_type(*)())NULL)
|
||||
diag_report_status();
|
||||
|
||||
|
||||
object_type = fwd_entry->header.b_type;
|
||||
name_entry = fwd_entry->az_name;
|
||||
object_entry = (sym_widget_entry_type *) name_entry->az_object;
|
||||
|
||||
if (object_entry == NULL)
|
||||
{
|
||||
diag_issue_diagnostic
|
||||
( d_never_def,
|
||||
_sar_source_pos2 (fwd_entry),
|
||||
diag_object_text( object_type ),
|
||||
name_entry->c_text );
|
||||
continue;
|
||||
}
|
||||
|
||||
/*
|
||||
** Make sure object references are to correct type of object.
|
||||
** A forward reference naming a widget class may be correctly
|
||||
** resolved by the corresponding gadget class, and vice versa.
|
||||
*/
|
||||
if ((object_entry->header.b_type!=object_type) &&
|
||||
(uil_gadget_variants[object_entry->header.b_type]!=object_type) &&
|
||||
(uil_gadget_variants[object_type]!=object_entry->header.b_type))
|
||||
{
|
||||
diag_issue_diagnostic
|
||||
(d_ctx_req,
|
||||
_sar_source_pos2(fwd_entry),
|
||||
diag_object_text(object_type),
|
||||
diag_object_text(object_entry->header.b_type));
|
||||
continue;
|
||||
}
|
||||
|
||||
target_obj_entry =
|
||||
(sym_widget_entry_type * *) fwd_entry->a_update_location;
|
||||
*target_obj_entry = object_entry;
|
||||
|
||||
/*
|
||||
** Update objects on forward refernce chain so that their parent_lists point
|
||||
** to the objects which reference them
|
||||
*/
|
||||
if (fwd_entry -> parent != NULL)
|
||||
{
|
||||
found = FALSE;
|
||||
for (parent_ptr = object_entry -> parent_list;
|
||||
((parent_ptr != NULL) && (found == FALSE));
|
||||
parent_ptr = parent_ptr -> next)
|
||||
{
|
||||
if (parent_ptr -> parent == fwd_entry -> parent)
|
||||
found = TRUE;
|
||||
}
|
||||
if (found == FALSE)
|
||||
{
|
||||
parent_node = (sym_parent_list_type *)
|
||||
sem_allocate_node (sym_k_parent_list_entry,
|
||||
sym_k_parent_list_size);
|
||||
parent_node -> next = object_entry -> parent_list;
|
||||
object_entry -> parent_list = parent_node;
|
||||
parent_node -> parent = fwd_entry -> parent;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
** Free the Forward reference entry now that it is no longer needed
|
||||
*/
|
||||
sem_free_node(( sym_entry_type *)fwd_entry);
|
||||
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
** Now resolve the forward references to values
|
||||
**/
|
||||
|
||||
/*
|
||||
** Forward references are placed on a chain by the first pass of
|
||||
** the compiler. This routine walks the chain checking that
|
||||
** 1) name is now defined
|
||||
** 2) name points to the correct type of value
|
||||
*/
|
||||
|
||||
for (fwd_val_entry = sym_az_val_forward_ref_chain;
|
||||
fwd_val_entry != NULL;
|
||||
fwd_val_entry = next_fwd_val_entry)
|
||||
{
|
||||
sym_name_entry_type * name_entry;
|
||||
sym_value_entry_type * value_entry;
|
||||
sym_obj_entry_type * obj_entry;
|
||||
|
||||
|
||||
/*
|
||||
** Save the pointer to the next forward entry so we can free the current
|
||||
** entry after it is processed.
|
||||
*/
|
||||
next_fwd_val_entry = fwd_val_entry->az_next_ref;
|
||||
|
||||
|
||||
/*
|
||||
** Call the Status callback routine to report our progress.
|
||||
*/
|
||||
/* %COMPLETE */
|
||||
Uil_percent_complete = 60;
|
||||
if (Uil_cmd_z_command.status_cb != (Uil_continue_type(*)())NULL)
|
||||
diag_report_status();
|
||||
|
||||
name_entry = fwd_val_entry->az_name;
|
||||
value_entry = (sym_value_entry_type *) name_entry->az_object;
|
||||
obj_entry = (sym_obj_entry_type *) name_entry->az_object;
|
||||
|
||||
if (value_entry == NULL)
|
||||
{
|
||||
diag_issue_diagnostic
|
||||
( d_never_def,
|
||||
_sar_source_pos2 (fwd_val_entry),
|
||||
"value",
|
||||
name_entry->c_text );
|
||||
continue;
|
||||
}
|
||||
|
||||
switch (fwd_val_entry->fwd_ref_flags)
|
||||
{
|
||||
case (sym_k_patch_add):
|
||||
case (sym_k_patch_list_add):
|
||||
{
|
||||
target_val_entry =
|
||||
(sym_value_entry_type * *) fwd_val_entry->a_update_location;
|
||||
*target_val_entry = value_entry;
|
||||
break;
|
||||
}
|
||||
default:
|
||||
_assert(FALSE, "Illegal forward reference");
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
** Free the Forward reference entry now that it is no longer needed
|
||||
*/
|
||||
sem_free_node(( sym_entry_type *)fwd_val_entry);
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
962
cde/osf/uil/UilSarComp.c
Normal file
962
cde/osf/uil/UilSarComp.c
Normal file
@@ -0,0 +1,962 @@
|
||||
/*
|
||||
* @OSF_COPYRIGHT@
|
||||
* COPYRIGHT NOTICE
|
||||
* Copyright (c) 1990, 1991, 1992, 1993 Open Software Foundation, Inc.
|
||||
* ALL RIGHTS RESERVED (MOTIF). See the file named COPYRIGHT.MOTIF for
|
||||
* the full copyright text.
|
||||
*/
|
||||
/*
|
||||
* HISTORY
|
||||
*/
|
||||
#ifdef REV_INFO
|
||||
#ifndef lint
|
||||
static char rcsid[] = "$XConsortium: UilSarComp.c /main/11 1995/07/14 09:36:46 drk $"
|
||||
#endif
|
||||
#endif
|
||||
|
||||
/*
|
||||
* (c) Copyright 1989, 1990, DIGITAL EQUIPMENT CORPORATION, MAYNARD, MASS. */
|
||||
|
||||
/*
|
||||
**++
|
||||
** FACILITY:
|
||||
**
|
||||
** User Interface Language Compiler (UIL)
|
||||
**
|
||||
** ABSTRACT:
|
||||
**
|
||||
** This module supports compound strings in UIL. It includes
|
||||
** the basic operations for creating, copying, and concatenating
|
||||
** strings.
|
||||
**
|
||||
**--
|
||||
**/
|
||||
|
||||
|
||||
/*
|
||||
**
|
||||
** INCLUDE FILES
|
||||
**
|
||||
**/
|
||||
|
||||
|
||||
|
||||
#include <Mrm/MrmAppl.h>
|
||||
|
||||
|
||||
|
||||
#ifdef DXM_V11
|
||||
#include <DXm/DXmHelpB.h>
|
||||
#endif
|
||||
|
||||
#include "UilDefI.h"
|
||||
|
||||
/*
|
||||
**
|
||||
** TABLE OF CONTENTS
|
||||
**
|
||||
**/
|
||||
|
||||
|
||||
/*
|
||||
**
|
||||
** DEFINE and MACRO DEFINITIONS
|
||||
**
|
||||
**/
|
||||
|
||||
#define clear_class_mask (~(sym_m_private | sym_m_imported | sym_m_exported))
|
||||
|
||||
/*
|
||||
**
|
||||
** EXTERNAL VARIABLE DECLARATIONS
|
||||
**
|
||||
**/
|
||||
|
||||
extern yystype yylval;
|
||||
|
||||
|
||||
/*
|
||||
**
|
||||
** GLOBAL VARIABLE DECLARATIONS
|
||||
**
|
||||
**/
|
||||
|
||||
|
||||
|
||||
/*
|
||||
**
|
||||
** OWN VARIABLE DECLARATIONS
|
||||
**
|
||||
**/
|
||||
|
||||
|
||||
|
||||
/*
|
||||
**++
|
||||
** FUNCTIONAL DESCRIPTION:
|
||||
**
|
||||
** This function creates a null compound string.
|
||||
**
|
||||
** FORMAL PARAMETERS:
|
||||
**
|
||||
** none
|
||||
**
|
||||
** IMPLICIT INPUTS:
|
||||
**
|
||||
** none
|
||||
**
|
||||
** IMPLICIT OUTPUTS:
|
||||
**
|
||||
** none
|
||||
**
|
||||
** FUNCTION VALUE:
|
||||
**
|
||||
** none
|
||||
**
|
||||
** SIDE EFFECTS:
|
||||
**
|
||||
** a copy of the primitive string may be made
|
||||
**
|
||||
**--
|
||||
**/
|
||||
|
||||
sym_value_entry_type *sem_create_cstr()
|
||||
|
||||
{
|
||||
sym_value_entry_type *az_cstr_entry;
|
||||
|
||||
az_cstr_entry = (sym_value_entry_type *)
|
||||
sem_allocate_node
|
||||
( sym_k_value_entry,
|
||||
sym_k_value_entry_size + sizeof( char * ) );
|
||||
|
||||
az_cstr_entry->obj_header.b_flags = sym_m_builtin | sym_m_private;
|
||||
az_cstr_entry->b_type = sym_k_compound_string_value;
|
||||
az_cstr_entry->w_length = sizeof (char *);
|
||||
az_cstr_entry->b_direction = NOSTRING_DIRECTION;
|
||||
|
||||
/* Fix for CN 16149 (DTS 10023) part 1 -- initialize charset info */
|
||||
az_cstr_entry->b_charset = sym_k_error_charset;
|
||||
az_cstr_entry->az_charset_value = NULL;
|
||||
|
||||
_sar_save_source_pos (&az_cstr_entry->header, &yylval);
|
||||
|
||||
return az_cstr_entry;
|
||||
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
**++
|
||||
** FUNCTIONAL DESCRIPTION:
|
||||
**
|
||||
** This function creates a null wide_character string.
|
||||
**
|
||||
** FORMAL PARAMETERS:
|
||||
**
|
||||
** none
|
||||
**
|
||||
** IMPLICIT INPUTS:
|
||||
**
|
||||
** none
|
||||
**
|
||||
** IMPLICIT OUTPUTS:
|
||||
**
|
||||
** none
|
||||
**
|
||||
** FUNCTION VALUE:
|
||||
**
|
||||
** none
|
||||
**
|
||||
** SIDE EFFECTS:
|
||||
**
|
||||
** a copy of the primitive string may be made
|
||||
**
|
||||
**--
|
||||
**/
|
||||
|
||||
sym_value_entry_type *sem_create_wchar_str()
|
||||
|
||||
{
|
||||
sym_value_entry_type *az_wchar_str_entry;
|
||||
|
||||
az_wchar_str_entry = (sym_value_entry_type *)
|
||||
sem_allocate_node
|
||||
( sym_k_value_entry,
|
||||
sym_k_value_entry_size + sizeof( char * ) );
|
||||
|
||||
az_wchar_str_entry->obj_header.b_flags = sym_m_builtin | sym_m_private;
|
||||
az_wchar_str_entry->b_type = sym_k_wchar_string_value;
|
||||
az_wchar_str_entry->w_length = sizeof (char *);
|
||||
az_wchar_str_entry->b_direction = NOSTRING_DIRECTION;
|
||||
|
||||
_sar_save_source_pos (&az_wchar_str_entry->header, &yylval);
|
||||
|
||||
return az_wchar_str_entry;
|
||||
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
**++
|
||||
** FUNCTIONAL DESCRIPTION:
|
||||
**
|
||||
** This function appends a primitive or a localized string to a
|
||||
** compound string.
|
||||
**
|
||||
** FORMAL PARAMETERS:
|
||||
**
|
||||
** az_cstr_entry compound string
|
||||
** az_str_entry primitive string or localized string
|
||||
** op2_temporary true if op2 is not needed after operation
|
||||
**
|
||||
** IMPLICIT INPUTS:
|
||||
**
|
||||
** none
|
||||
**
|
||||
** IMPLICIT OUTPUTS:
|
||||
**
|
||||
** none
|
||||
**
|
||||
** FUNCTION VALUE:
|
||||
**
|
||||
** none
|
||||
**
|
||||
** SIDE EFFECTS:
|
||||
**
|
||||
** a copy of the primitive string may be made
|
||||
**
|
||||
**--
|
||||
**/
|
||||
|
||||
void sem_append_str_to_cstr(az_cstr_entry, az_str_entry, op2_temporary)
|
||||
|
||||
sym_value_entry_type *az_cstr_entry;
|
||||
sym_value_entry_type *az_str_entry;
|
||||
boolean op2_temporary;
|
||||
|
||||
{
|
||||
sym_value_entry_type *last_str_entry;
|
||||
sym_value_entry_type **ptr;
|
||||
sym_value_entry_type *new_str_entry;
|
||||
boolean merge;
|
||||
|
||||
/*
|
||||
** A couple of points:
|
||||
** 1) if op2_temporary = FALSE - we must make a copy
|
||||
** of it
|
||||
** 2) if the last string of the compound string has the same attributes
|
||||
** as the string being appended, the strings are merged into 1
|
||||
*/
|
||||
|
||||
/* find the last string of the compound string */
|
||||
|
||||
ptr = &(az_cstr_entry->az_first_table_value);
|
||||
last_str_entry = *ptr;
|
||||
merge = FALSE;
|
||||
|
||||
if (last_str_entry != NULL)
|
||||
{
|
||||
for ( ;
|
||||
last_str_entry->az_next_table_value != NULL;
|
||||
|
||||
ptr = (sym_value_entry_type * *)
|
||||
&(last_str_entry->az_next_table_value),
|
||||
last_str_entry = *ptr);
|
||||
|
||||
if ((last_str_entry->b_charset == az_str_entry->b_charset)
|
||||
&&
|
||||
((last_str_entry->b_direction)== (az_str_entry->b_direction))
|
||||
&&
|
||||
((last_str_entry->b_aux_flags & sym_m_separate) == 0 ))
|
||||
merge = TRUE;
|
||||
else
|
||||
ptr = (sym_value_entry_type * *)
|
||||
&(last_str_entry->az_next_table_value);
|
||||
}
|
||||
|
||||
if (merge)
|
||||
{
|
||||
new_str_entry =
|
||||
sem_cat_str_to_str( last_str_entry, TRUE,
|
||||
az_str_entry, op2_temporary );
|
||||
}
|
||||
else
|
||||
{
|
||||
/*
|
||||
** Append a new segment to the compound string
|
||||
*/
|
||||
|
||||
if( op2_temporary == FALSE )
|
||||
{
|
||||
unsigned short old_size;
|
||||
|
||||
/* must make a copy since user has access to string via name */
|
||||
|
||||
new_str_entry = (sym_value_entry_type *)
|
||||
sem_allocate_node( sym_k_value_entry,
|
||||
az_str_entry->header.w_node_size<<2 );
|
||||
|
||||
old_size = new_str_entry->header.w_node_size;
|
||||
|
||||
_sym_copy_entry( new_str_entry,
|
||||
az_str_entry,
|
||||
az_str_entry->header.w_node_size );
|
||||
|
||||
new_str_entry->header.w_node_size = old_size;
|
||||
|
||||
}
|
||||
else
|
||||
new_str_entry = az_str_entry;
|
||||
|
||||
}
|
||||
|
||||
/* link to the end of the compound string */
|
||||
|
||||
new_str_entry->b_aux_flags |= sym_m_table_entry;
|
||||
new_str_entry->obj_header.b_flags = sym_m_private | sym_m_builtin;
|
||||
new_str_entry->obj_header.az_name = NULL;
|
||||
new_str_entry->az_next_table_value = NULL;
|
||||
*ptr = new_str_entry;
|
||||
}
|
||||
|
||||
/*
|
||||
**++
|
||||
** FUNCTIONAL DESCRIPTION:
|
||||
**
|
||||
** This function appends a compound string to a compound string.
|
||||
**
|
||||
** FORMAL PARAMETERS:
|
||||
**
|
||||
** az_cstr1_entry compound string
|
||||
** az_cstr2_entry compound string
|
||||
** op2_temporary true if op2 is not needed after operation
|
||||
**
|
||||
** IMPLICIT INPUTS:
|
||||
**
|
||||
** none
|
||||
**
|
||||
** IMPLICIT OUTPUTS:
|
||||
**
|
||||
** none
|
||||
**
|
||||
** FUNCTION VALUE:
|
||||
**
|
||||
** none
|
||||
**
|
||||
** SIDE EFFECTS:
|
||||
**
|
||||
** none
|
||||
**
|
||||
**--
|
||||
**/
|
||||
|
||||
void sem_append_cstr_to_cstr(az_cstr1_entry, az_cstr2_entry, op2_temporary)
|
||||
|
||||
sym_value_entry_type *az_cstr1_entry;
|
||||
sym_value_entry_type *az_cstr2_entry;
|
||||
boolean op2_temporary;
|
||||
|
||||
{
|
||||
sym_value_entry_type *last_str_entry;
|
||||
sym_value_entry_type **ptr;
|
||||
sym_value_entry_type *next_str_entry;
|
||||
|
||||
/*
|
||||
** A couple of points:
|
||||
** 1) if op2_temporary = FALSE - we must make a copy of 2nd compound
|
||||
** string
|
||||
** 2) if the last string of 1st compound string has the same attributes
|
||||
** as the 1st string of the 2nd compound string being appended,
|
||||
** the strings are merged into 1
|
||||
*/
|
||||
|
||||
/* find the last string of the 1st compound string */
|
||||
|
||||
ptr = &(az_cstr1_entry->az_first_table_value);
|
||||
last_str_entry = *ptr;
|
||||
|
||||
next_str_entry = az_cstr2_entry->az_first_table_value;
|
||||
|
||||
if (op2_temporary)
|
||||
sem_free_node(( sym_entry_type *) az_cstr2_entry );
|
||||
|
||||
if (next_str_entry == NULL)
|
||||
return;
|
||||
|
||||
if (last_str_entry != NULL)
|
||||
{
|
||||
for ( ;
|
||||
last_str_entry->az_next_table_value != NULL;
|
||||
|
||||
ptr = (sym_value_entry_type * *)
|
||||
&(last_str_entry->az_next_table_value),
|
||||
last_str_entry = *ptr);
|
||||
|
||||
if ((last_str_entry->b_charset == next_str_entry->b_charset)
|
||||
&&
|
||||
((last_str_entry->b_direction)== (next_str_entry->b_direction))
|
||||
&&
|
||||
((last_str_entry->b_aux_flags & sym_m_separate) == 0 ))
|
||||
{
|
||||
last_str_entry =
|
||||
sem_cat_str_to_str( last_str_entry, TRUE,
|
||||
next_str_entry, op2_temporary );
|
||||
last_str_entry->b_aux_flags |= sym_m_table_entry;
|
||||
*ptr = last_str_entry;
|
||||
next_str_entry =
|
||||
(sym_value_entry_type *) next_str_entry->az_next_table_value;
|
||||
}
|
||||
|
||||
ptr = (sym_value_entry_type * *)
|
||||
&(last_str_entry->az_next_table_value);
|
||||
}
|
||||
|
||||
if (op2_temporary)
|
||||
{
|
||||
*ptr = next_str_entry;
|
||||
return;
|
||||
}
|
||||
|
||||
for ( ;
|
||||
next_str_entry != NULL;
|
||||
next_str_entry = (sym_value_entry_type *)
|
||||
next_str_entry->az_next_table_value )
|
||||
{
|
||||
sym_value_entry_type *new_str_entry;
|
||||
unsigned short old_size;
|
||||
|
||||
new_str_entry = (sym_value_entry_type *)
|
||||
sem_allocate_node( sym_k_value_entry,
|
||||
next_str_entry->header.w_node_size<<2 );
|
||||
|
||||
old_size = new_str_entry->header.w_node_size;
|
||||
|
||||
_sym_copy_entry( new_str_entry,
|
||||
next_str_entry,
|
||||
next_str_entry->header.w_node_size );
|
||||
|
||||
new_str_entry->header.w_node_size = old_size;
|
||||
new_str_entry->obj_header.b_flags = sym_m_private | sym_m_builtin;
|
||||
new_str_entry->obj_header.az_name = NULL;
|
||||
new_str_entry->b_aux_flags |= sym_m_table_entry;
|
||||
|
||||
/* link to the end of the compound string */
|
||||
|
||||
*ptr = new_str_entry;
|
||||
ptr = (sym_value_entry_type * *)
|
||||
&(new_str_entry->az_next_table_value);
|
||||
}
|
||||
|
||||
*ptr = NULL;
|
||||
|
||||
}
|
||||
|
||||
/*
|
||||
**++
|
||||
** FUNCTIONAL DESCRIPTION:
|
||||
**
|
||||
** This function concatenates 2 primitive strings.
|
||||
**
|
||||
** FORMAL PARAMETERS:
|
||||
**
|
||||
** az_str1_entry primitive string
|
||||
** op1_temporary op1 is a temporary string
|
||||
** az_str2_entry primitive string
|
||||
** op2_temporary op2 is a temporary string
|
||||
**
|
||||
** IMPLICIT INPUTS:
|
||||
**
|
||||
** none
|
||||
**
|
||||
** IMPLICIT OUTPUTS:
|
||||
**
|
||||
** none
|
||||
**
|
||||
** FUNCTION VALUE:
|
||||
**
|
||||
** ptr to the result string
|
||||
**
|
||||
** SIDE EFFECTS:
|
||||
**
|
||||
** none
|
||||
**
|
||||
**--
|
||||
**/
|
||||
|
||||
sym_value_entry_type
|
||||
*sem_cat_str_to_str
|
||||
(az_str1_entry, op1_temporary, az_str2_entry, op2_temporary)
|
||||
|
||||
sym_value_entry_type *az_str1_entry;
|
||||
boolean op1_temporary;
|
||||
sym_value_entry_type *az_str2_entry;
|
||||
boolean op2_temporary;
|
||||
|
||||
{
|
||||
sym_value_entry_type *new_str_entry;
|
||||
int l1, l2;
|
||||
|
||||
/*
|
||||
** Can only append two simple strings if they have the same direction and
|
||||
** the first does not have the separate attribute.
|
||||
*/
|
||||
_assert(((az_str1_entry->b_charset == az_str2_entry->b_charset)
|
||||
&&
|
||||
((az_str1_entry->b_direction) == (az_str2_entry->b_direction))
|
||||
),
|
||||
"strings with different attrs concatenated" );
|
||||
|
||||
l1 = az_str1_entry->w_length;
|
||||
l2 = az_str2_entry->w_length;
|
||||
|
||||
/* extra 1 is for terminating null */
|
||||
|
||||
new_str_entry = (sym_value_entry_type *)
|
||||
sem_allocate_node( sym_k_value_entry,
|
||||
sym_k_value_entry_size );
|
||||
new_str_entry->value.c_value = XtCalloc(1, l1 + l2 + 1);
|
||||
|
||||
|
||||
new_str_entry->obj_header.b_flags = sym_m_builtin | sym_m_private;
|
||||
|
||||
_sar_move_source_info_2 (&new_str_entry->header, &az_str1_entry->header);
|
||||
new_str_entry->b_charset = az_str1_entry->b_charset;
|
||||
new_str_entry->b_direction = az_str1_entry->b_direction;
|
||||
new_str_entry->b_aux_flags =
|
||||
(az_str1_entry->b_aux_flags & sym_m_separate);
|
||||
new_str_entry->b_type = sym_k_char_8_value;
|
||||
new_str_entry->w_length = l1 + l2;
|
||||
|
||||
_move( new_str_entry->value.c_value,
|
||||
az_str1_entry->value.c_value, l1 );
|
||||
|
||||
_move( &new_str_entry->value.c_value[ l1 ],
|
||||
az_str2_entry->value.c_value,
|
||||
l2+1 );
|
||||
|
||||
/*
|
||||
** if either of the operands is unnamed - free the node
|
||||
*/
|
||||
|
||||
if (op1_temporary)
|
||||
{
|
||||
_free_memory( az_str1_entry->value.c_value );
|
||||
sem_free_node(( sym_entry_type *) az_str1_entry );
|
||||
}
|
||||
|
||||
if (op2_temporary)
|
||||
{
|
||||
_free_memory( az_str2_entry->value.c_value );
|
||||
sem_free_node(( sym_entry_type *) az_str2_entry );
|
||||
}
|
||||
|
||||
return new_str_entry;
|
||||
|
||||
}
|
||||
|
||||
/*
|
||||
**++
|
||||
** FUNCTIONAL DESCRIPTION:
|
||||
**
|
||||
** This function takes the charset sets understood by the parser
|
||||
** and maps them to charsets understood by the symbol table and
|
||||
** toolkit.
|
||||
**
|
||||
** FORMAL PARAMETERS:
|
||||
**
|
||||
** charset_as_subclass sym_k_..._charset literal naming charset
|
||||
**
|
||||
** IMPLICIT INPUTS:
|
||||
**
|
||||
** none
|
||||
**
|
||||
** IMPLICIT OUTPUTS:
|
||||
**
|
||||
** none
|
||||
**
|
||||
** FUNCTION VALUE:
|
||||
**
|
||||
** sym_k...charset name for charset
|
||||
**
|
||||
** SIDE EFFECTS:
|
||||
**
|
||||
** none
|
||||
**
|
||||
**--
|
||||
**/
|
||||
|
||||
int sem_map_subclass_to_charset(charset_as_subclass)
|
||||
|
||||
int charset_as_subclass;
|
||||
|
||||
{
|
||||
switch (charset_as_subclass)
|
||||
{
|
||||
|
||||
case lex_k_fontlist_default_tag:
|
||||
case sym_k_fontlist_default_tag:
|
||||
return sym_k_fontlist_default_tag;
|
||||
case lex_k_default_charset:
|
||||
return uil_sym_default_charset;
|
||||
case lex_k_userdefined_charset:
|
||||
return sym_k_userdefined_charset;
|
||||
default:
|
||||
_assert (charset_as_subclass!=0, "charset code==0");
|
||||
_assert (charset_as_subclass<=uil_max_charset, "unknown charset");
|
||||
return charset_as_subclass;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
**++
|
||||
** FUNCTIONAL DESCRIPTION:
|
||||
**
|
||||
** This function verifies the character set indicated by the user.
|
||||
**
|
||||
** FORMAL PARAMETERS:
|
||||
**
|
||||
** current_frame current stack frame
|
||||
** charset_frame stack frame of CHARSET token
|
||||
**
|
||||
** IMPLICIT INPUTS:
|
||||
**
|
||||
** none
|
||||
**
|
||||
** IMPLICIT OUTPUTS:
|
||||
**
|
||||
** none
|
||||
**
|
||||
** FUNCTION VALUE:
|
||||
**
|
||||
** none
|
||||
**
|
||||
** SIDE EFFECTS:
|
||||
**
|
||||
** none
|
||||
**
|
||||
**--
|
||||
**/
|
||||
|
||||
void sar_charset_verify ( charset_frame )
|
||||
|
||||
yystype *charset_frame;
|
||||
|
||||
{
|
||||
key_keytable_entry_type *az_keyword_entry;
|
||||
|
||||
_assert(((charset_frame->b_tag == sar_k_token_frame) ||
|
||||
(charset_frame->b_tag == sar_k_value_frame)),
|
||||
"token or value frame missing" );
|
||||
|
||||
az_keyword_entry = charset_frame->value.az_keyword_entry;
|
||||
|
||||
|
||||
|
||||
/*
|
||||
** Store the current charset so it can be used by LEX to processes a
|
||||
** string literal (if the CHARSET_NAME is used to prefix a string literal)
|
||||
*/
|
||||
Uil_lex_l_literal_charset = az_keyword_entry->b_subclass;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
**++
|
||||
** FUNCTIONAL DESCRIPTION:
|
||||
**
|
||||
** This function converts a random NAME into a CHARSET_NAME
|
||||
** with the default charset.
|
||||
**
|
||||
** FORMAL PARAMETERS:
|
||||
**
|
||||
** name_frame current stack frame containing NAME
|
||||
**
|
||||
** IMPLICIT INPUTS:
|
||||
**
|
||||
** none
|
||||
**
|
||||
** IMPLICIT OUTPUTS:
|
||||
**
|
||||
** modified name_frame
|
||||
**
|
||||
** FUNCTION VALUE:
|
||||
**
|
||||
** none
|
||||
**
|
||||
** SIDE EFFECTS:
|
||||
**
|
||||
** name_frame converted from NAME to CHARSET_NAME
|
||||
**
|
||||
**--
|
||||
**/
|
||||
|
||||
void sar_make_fallback_charset(name_frame)
|
||||
yystype *name_frame;
|
||||
{
|
||||
sym_name_entry_type *symbol_entry;
|
||||
static key_keytable_entry_type *az_keyword_entry = NULL;
|
||||
|
||||
_assert(((name_frame->b_tag == sar_k_token_frame) ||
|
||||
(name_frame->b_tag == sar_k_value_frame)),
|
||||
"token or value frame missing" );
|
||||
|
||||
/* Get symbol and check if already used as charset. */
|
||||
symbol_entry = (sym_name_entry_type *)name_frame->value.az_symbol_entry;
|
||||
|
||||
if ((symbol_entry->b_flags & sym_m_charset) == 0)
|
||||
{
|
||||
symbol_entry->b_flags |= sym_m_charset;
|
||||
diag_issue_diagnostic(d_default_charset,
|
||||
_sar_source_pos2(symbol_entry),
|
||||
symbol_entry->c_text,
|
||||
DEFAULT_TAG);
|
||||
}
|
||||
|
||||
/* Get the default charset keyword entry. */
|
||||
if (az_keyword_entry == NULL)
|
||||
az_keyword_entry = key_find_keyword(strlen(DEFAULT_TAG), DEFAULT_TAG);
|
||||
|
||||
_assert((az_keyword_entry !=NULL), "default charset keyword missing");
|
||||
|
||||
/* Change NAME to CHARSET_NAME */
|
||||
name_frame->value.az_keyword_entry = az_keyword_entry;
|
||||
name_frame ->b_type = az_keyword_entry->b_token;
|
||||
|
||||
/*
|
||||
** Store the current charset so it can be used by LEX to processes a
|
||||
** string literal (if the NAME is used to prefix a string literal)
|
||||
*/
|
||||
Uil_lex_l_literal_charset = az_keyword_entry->b_subclass;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
**++
|
||||
** FUNCTIONAL DESCRIPTION:
|
||||
**
|
||||
** This function checks the attributes of CHARACTER_SET function.
|
||||
**
|
||||
** FORMAL PARAMETERS:
|
||||
**
|
||||
** target_frame pointer to resultant token stack frame
|
||||
** value_frame pointer to frame holding keyword and value
|
||||
** prior_value_frame pointer to previous properties
|
||||
**
|
||||
** IMPLICIT INPUTS:
|
||||
**
|
||||
** none
|
||||
**
|
||||
** IMPLICIT OUTPUTS:
|
||||
**
|
||||
** none
|
||||
**
|
||||
** FUNCTION VALUE:
|
||||
**
|
||||
** void
|
||||
**
|
||||
** SIDE EFFECTS:
|
||||
**
|
||||
** attribute information is stuffed in target frame
|
||||
**
|
||||
**--
|
||||
**/
|
||||
|
||||
void sar_chk_charset_attr( target_frame, value_frame, prior_value_frame )
|
||||
|
||||
yystype *target_frame;
|
||||
yystype *value_frame;
|
||||
yystype *prior_value_frame;
|
||||
{
|
||||
|
||||
/*
|
||||
** Set up not specified values in the target frame.
|
||||
** b_type will hold the sixteen_bit property
|
||||
*/
|
||||
|
||||
switch (prior_value_frame->b_tag)
|
||||
{
|
||||
case sar_k_null_frame:
|
||||
/*
|
||||
** no prior values
|
||||
*/
|
||||
|
||||
target_frame->b_tag = sar_k_token_frame;
|
||||
target_frame->b_direction = NOSTRING_DIRECTION;
|
||||
target_frame->b_charset = uil_sym_default_charset;
|
||||
target_frame->b_type = 0;
|
||||
break;
|
||||
|
||||
case sar_k_token_frame:
|
||||
case sar_k_value_frame:
|
||||
/*
|
||||
** prior values - transfer them
|
||||
*/
|
||||
|
||||
target_frame->b_tag = sar_k_token_frame;
|
||||
target_frame->b_direction = prior_value_frame->b_direction;
|
||||
target_frame->b_charset = prior_value_frame->b_charset;
|
||||
target_frame->b_type = prior_value_frame->b_type;
|
||||
break;
|
||||
default:
|
||||
_assert( FALSE, "prior value frame missing from stack" );
|
||||
}
|
||||
|
||||
/*
|
||||
** Case on the keyword for the attribute given
|
||||
*/
|
||||
|
||||
switch (value_frame->b_type)
|
||||
{
|
||||
case RIGHT_TO_LEFT:
|
||||
{
|
||||
sym_value_entry_type *value_entry;
|
||||
|
||||
value_entry =
|
||||
(sym_value_entry_type *) value_frame->value.az_symbol_entry;
|
||||
|
||||
/*
|
||||
** If the value is a boolean, then just set the corresponding mask
|
||||
** accordingly.
|
||||
*/
|
||||
if (value_entry->b_type == sym_k_bool_value)
|
||||
if (value_entry->value.l_integer == TRUE)
|
||||
target_frame->b_direction = XmSTRING_DIRECTION_R_TO_L;
|
||||
else
|
||||
target_frame->b_direction = XmSTRING_DIRECTION_L_TO_R;
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
case SIXTEEN_BIT:
|
||||
{
|
||||
sym_value_entry_type *value_entry;
|
||||
|
||||
value_entry =
|
||||
(sym_value_entry_type *) value_frame->value.az_symbol_entry;
|
||||
|
||||
/*
|
||||
** If the value is a boolean, then just set the corresponding mask
|
||||
** accordingly.
|
||||
*/
|
||||
if (value_entry->b_type == sym_k_bool_value)
|
||||
if (value_entry->value.l_integer == TRUE)
|
||||
target_frame->b_type |= sym_m_sixteen_bit;
|
||||
else
|
||||
target_frame->b_type &= ~sym_m_sixteen_bit;
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
default:
|
||||
_assert( FALSE, "keyword missing from stack" );
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
**++
|
||||
** FUNCTIONAL DESCRIPTION:
|
||||
**
|
||||
** This function makes a CHARACTER_SET and sets the properties
|
||||
** of the string.
|
||||
**
|
||||
** FORMAL PARAMETERS:
|
||||
**
|
||||
** target_frame pointer to resultant token stack frame
|
||||
** value_frame pointer to string value
|
||||
** attr_frame pointer to strings attributes
|
||||
** keyword_frame frame to use as locator for result
|
||||
**
|
||||
** IMPLICIT INPUTS:
|
||||
**
|
||||
** none
|
||||
**
|
||||
** IMPLICIT OUTPUTS:
|
||||
**
|
||||
** none
|
||||
**
|
||||
** FUNCTION VALUE:
|
||||
**
|
||||
** void
|
||||
**
|
||||
** SIDE EFFECTS:
|
||||
**
|
||||
** none
|
||||
**
|
||||
**--
|
||||
**/
|
||||
|
||||
void sar_make_charset (target_frame, value_frame, attr_frame, keyword_frame)
|
||||
|
||||
yystype *target_frame;
|
||||
yystype *value_frame;
|
||||
yystype *attr_frame;
|
||||
yystype *keyword_frame;
|
||||
{
|
||||
sym_value_entry_type *value_entry;
|
||||
|
||||
_assert( value_frame->b_tag == sar_k_value_frame,
|
||||
"value frame missing from stack" );
|
||||
|
||||
|
||||
/*
|
||||
** Set the character set information into the symbol table
|
||||
** entry for the char_8 string that indentifies the name of this
|
||||
** userdefined character set.
|
||||
*/
|
||||
value_entry =
|
||||
(sym_value_entry_type *) value_frame->value.az_symbol_entry;
|
||||
value_entry->b_charset = sym_k_userdefined_charset;
|
||||
|
||||
/* BEGIN HaL fix CR 5547 */
|
||||
sem_evaluate_value (value_entry);
|
||||
if (value_entry->b_type != sym_k_char_8_value)
|
||||
diag_issue_diagnostic
|
||||
(d_wrong_type,
|
||||
_sar_source_pos2( value_entry ),
|
||||
diag_value_text( value_entry->b_type ),
|
||||
"null-terminated string");
|
||||
/* END HaL fix CR 5547 */
|
||||
|
||||
|
||||
/*
|
||||
** If the attr_frame is not null, it must be a value frame with contains
|
||||
** a pointer to the attributes frame for this userdefined charset.
|
||||
*/
|
||||
if (attr_frame->b_tag == sar_k_token_frame)
|
||||
{
|
||||
/*
|
||||
** Set the attributes of the string, as specified by the options
|
||||
** to the CHARACTER_SET function, without disturbing any
|
||||
** existing bits.
|
||||
*/
|
||||
value_entry->b_direction = attr_frame->b_direction;
|
||||
value_entry->b_aux_flags = (attr_frame->b_type & sym_m_sixteen_bit);
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
** initialize the target frame
|
||||
*/
|
||||
|
||||
_sar_move_source_info( target_frame, keyword_frame );
|
||||
|
||||
target_frame->b_tag = sar_k_value_frame;
|
||||
target_frame->b_type = sym_k_char_8_value;
|
||||
target_frame->b_flags = sym_m_private;
|
||||
target_frame->value.az_symbol_entry = value_frame->value.az_symbol_entry;
|
||||
|
||||
|
||||
/*
|
||||
** Store the current charset so it can be used by LEX to processes a
|
||||
** string literal (if the CHARACTER_SET function is used to prefix a
|
||||
** string literal)
|
||||
*/
|
||||
Uil_lex_l_literal_charset = lex_k_userdefined_charset;
|
||||
Uil_lex_az_literal_charset = value_entry;
|
||||
}
|
||||
|
||||
|
||||
135
cde/osf/uil/UilSarDef.h
Normal file
135
cde/osf/uil/UilSarDef.h
Normal file
@@ -0,0 +1,135 @@
|
||||
/*
|
||||
* @OSF_COPYRIGHT@
|
||||
* COPYRIGHT NOTICE
|
||||
* Copyright (c) 1990, 1991, 1992, 1993 Open Software Foundation, Inc.
|
||||
* ALL RIGHTS RESERVED (MOTIF). See the file named COPYRIGHT.MOTIF for
|
||||
* the full copyright text.
|
||||
*/
|
||||
/*
|
||||
* HISTORY
|
||||
*/
|
||||
/* $XConsortium: UilSarDef.h /main/10 1995/07/14 09:36:55 drk $ */
|
||||
|
||||
/*
|
||||
* (c) Copyright 1989, 1990, DIGITAL EQUIPMENT CORPORATION, MAYNARD, MASS. */
|
||||
|
||||
/*
|
||||
**++
|
||||
** FACILITY:
|
||||
**
|
||||
** User Interface Language Compiler (UIL)
|
||||
**
|
||||
** ABSTRACT:
|
||||
**
|
||||
** This include file defines the interface to the UIL parser.
|
||||
** UIL uses YACC as its parsing tool.
|
||||
**
|
||||
**--
|
||||
**/
|
||||
|
||||
#ifndef UilSarDef_h
|
||||
#define UilSarDef_h
|
||||
|
||||
|
||||
|
||||
/*
|
||||
** Format of a value on YACC value stack. This is also the form of a
|
||||
** token created by the lexical analyzer.
|
||||
*/
|
||||
|
||||
#define sar_k_null_frame 0 /* tag for an epsilon production */
|
||||
#define sar_k_token_frame 1 /* tag for a token frame */
|
||||
#define sar_k_value_frame 2 /* tag for a value frame */
|
||||
#define sar_k_module_frame 3 /* tag for module frame */
|
||||
#define sar_k_object_frame 4 /* tag for object frame */
|
||||
#define sar_k_root_frame 5 /* tag for root frame */
|
||||
|
||||
typedef struct
|
||||
{
|
||||
src_source_record_type *az_source_record; /* actual record where token exists */
|
||||
unsigned char b_source_pos; /* the character in az_source_record
|
||||
where this token begins */
|
||||
unsigned char b_source_end; /* the character in az_source_record
|
||||
where this token ends */
|
||||
unsigned char b_tag; /* tag of stack frame */
|
||||
unsigned char b_type; /* for tokens - token number
|
||||
for value - the data type */
|
||||
unsigned short b_flags; /* used by value */
|
||||
unsigned char b_direction; /* used by value */
|
||||
unsigned char b_charset; /* used by value */
|
||||
union
|
||||
{
|
||||
/* must be capable of holding a pointer */
|
||||
long l_integer; /* integer value*/
|
||||
sym_entry_type *az_symbol_entry; /* symbol entry */
|
||||
key_keytable_entry_type
|
||||
*az_keyword_entry; /* keyword entry */
|
||||
} value;
|
||||
} yystype;
|
||||
|
||||
|
||||
/*
|
||||
** Macros for moving source information to and from parse stack frames
|
||||
*/
|
||||
|
||||
#define _sar_move_source_info( _target, _source ) \
|
||||
{ \
|
||||
yystype *__target; \
|
||||
yystype *__source; \
|
||||
\
|
||||
__target = (_target); __source = (_source); \
|
||||
__target->az_source_record = __source->az_source_record;\
|
||||
__target->b_source_pos = __source->b_source_pos; \
|
||||
__target->b_source_end = __source->b_source_end; \
|
||||
}
|
||||
|
||||
#define _sar_move_source_info_2( _target, _source ) \
|
||||
{ \
|
||||
sym_entry_header_type *__target; \
|
||||
sym_entry_header_type *__source; \
|
||||
\
|
||||
__target = (_target); __source = (_source); \
|
||||
\
|
||||
__target->az_src_rec = __source->az_src_rec; \
|
||||
__target->b_src_pos = __source->b_src_pos; \
|
||||
__target->b_end_pos = __source->b_end_pos; \
|
||||
}
|
||||
|
||||
|
||||
#define _sar_save_source_info( _target, _src_beg, _src_end ) \
|
||||
{ \
|
||||
sym_entry_header_type *__target; \
|
||||
XmConst yystype *__src_end; \
|
||||
\
|
||||
__target = (_target); \
|
||||
__src_end = (_src_end); \
|
||||
\
|
||||
__target->az_src_rec = __src_end->az_source_record; \
|
||||
__target->b_src_pos = __src_end->b_source_pos; \
|
||||
__target->b_end_pos = __src_end->b_source_end; \
|
||||
}
|
||||
|
||||
#define _sar_save_source_pos( _target, _src ) \
|
||||
{ \
|
||||
sym_entry_header_type *__target; \
|
||||
XmConst yystype *__src; \
|
||||
\
|
||||
__target = (_target); __src = (_src); \
|
||||
\
|
||||
__target->az_src_rec = __src->az_source_record; \
|
||||
__target->b_src_pos = __src->b_source_pos; \
|
||||
__target->b_end_pos = __src->b_source_end; \
|
||||
}
|
||||
|
||||
#define _sar_source_position( _source ) \
|
||||
_source->az_source_record, \
|
||||
_source->b_source_pos
|
||||
|
||||
#define _sar_source_pos2( _source ) \
|
||||
_source->header.az_src_rec, \
|
||||
_source->header.b_src_pos
|
||||
|
||||
|
||||
|
||||
#endif /* UilSarDef_h */
|
||||
/* DON'T ADD STUFF AFTER THIS #endif */
|
||||
315
cde/osf/uil/UilSarExp.c
Normal file
315
cde/osf/uil/UilSarExp.c
Normal file
@@ -0,0 +1,315 @@
|
||||
/*
|
||||
* @OSF_COPYRIGHT@
|
||||
* COPYRIGHT NOTICE
|
||||
* Copyright (c) 1990, 1991, 1992, 1993 Open Software Foundation, Inc.
|
||||
* ALL RIGHTS RESERVED (MOTIF). See the file named COPYRIGHT.MOTIF for
|
||||
* the full copyright text.
|
||||
*/
|
||||
/*
|
||||
* HISTORY
|
||||
*/
|
||||
#ifdef REV_INFO
|
||||
#ifndef lint
|
||||
static char rcsid[] = "$XConsortium: UilSarExp.c /main/11 1995/07/14 09:37:03 drk $"
|
||||
#endif
|
||||
#endif
|
||||
|
||||
/*
|
||||
* (c) Copyright 1989, 1990, DIGITAL EQUIPMENT CORPORATION, MAYNARD, MASS. */
|
||||
|
||||
/*
|
||||
**++
|
||||
** FACILITY:
|
||||
**
|
||||
** User Interface Language Compiler (UIL)
|
||||
**
|
||||
** ABSTRACT:
|
||||
**
|
||||
** This module supports value expressions in UIL.
|
||||
**
|
||||
**--
|
||||
**/
|
||||
|
||||
|
||||
/*
|
||||
**
|
||||
** INCLUDE FILES
|
||||
**
|
||||
**/
|
||||
|
||||
#include "UilDefI.h"
|
||||
|
||||
|
||||
/*
|
||||
**
|
||||
** DEFINE and MACRO DEFINITIONS
|
||||
**
|
||||
**/
|
||||
|
||||
|
||||
/*
|
||||
**
|
||||
** EXTERNAL VARIABLE DECLARATIONS
|
||||
**
|
||||
**/
|
||||
|
||||
|
||||
/*
|
||||
**
|
||||
** GLOBAL VARIABLE DECLARATIONS
|
||||
**
|
||||
**/
|
||||
|
||||
|
||||
/*
|
||||
**
|
||||
** OWN VARIABLE DECLARATIONS
|
||||
**
|
||||
**/
|
||||
|
||||
|
||||
|
||||
/*
|
||||
**++
|
||||
** FUNCTIONAL DESCRIPTION:
|
||||
**
|
||||
** This function processes a binary arithmetic operator in an expression
|
||||
**
|
||||
** FORMAL PARAMETERS:
|
||||
**
|
||||
** operator_frame: [in-out] frame holding the operator and the
|
||||
** target frame
|
||||
** op1_frame: [in] frame holding operand 1
|
||||
** op2_frame: [in] frame holding operand 2
|
||||
**
|
||||
** IMPLICIT INPUTS:
|
||||
**
|
||||
** none
|
||||
**
|
||||
** IMPLICIT OUTPUTS:
|
||||
**
|
||||
** none
|
||||
**
|
||||
** FUNCTION VALUE:
|
||||
**
|
||||
** void
|
||||
**
|
||||
** SIDE EFFECTS:
|
||||
**
|
||||
** op1 or op2 symbol entry may be freed
|
||||
**
|
||||
**--
|
||||
**/
|
||||
void sar_binary_op(operator_frame, op1_frame, op2_frame)
|
||||
|
||||
yystype *operator_frame;
|
||||
yystype *op1_frame;
|
||||
yystype *op2_frame;
|
||||
|
||||
{
|
||||
sym_value_entry_type *res_entry;
|
||||
int operator;
|
||||
|
||||
_assert( operator_frame->b_tag == sar_k_token_frame,
|
||||
"operator missing" );
|
||||
|
||||
res_entry = (sym_value_entry_type *)
|
||||
sem_allocate_node( sym_k_value_entry,
|
||||
sym_k_value_entry_size );
|
||||
|
||||
res_entry->obj_header.b_flags = sym_m_builtin | sym_m_private;
|
||||
res_entry->b_type = sym_k_any_value;
|
||||
|
||||
/* res_entry->az_source_rec = op1_frame->az_source_record; */
|
||||
|
||||
_sar_save_source_pos (&res_entry->header, op1_frame);
|
||||
|
||||
/*
|
||||
** Determine the operator from the operator frame
|
||||
*/
|
||||
|
||||
switch (operator_frame->b_type)
|
||||
{
|
||||
case AND:
|
||||
operator = sym_k_and_op;
|
||||
break;
|
||||
|
||||
case PLUS:
|
||||
operator = sym_k_add_op;
|
||||
break;
|
||||
|
||||
case MINUS:
|
||||
operator = sym_k_subtract_op;
|
||||
break;
|
||||
|
||||
case MULTIPLY:
|
||||
operator = sym_k_multiply_op;
|
||||
break;
|
||||
|
||||
case DIVIDE:
|
||||
operator = sym_k_divide_op;
|
||||
break;
|
||||
|
||||
case LEFT_SHIFT:
|
||||
operator = sym_k_left_shift_op;
|
||||
break;
|
||||
|
||||
case RIGHT_SHIFT:
|
||||
operator = sym_k_right_shift_op;
|
||||
break;
|
||||
|
||||
case OR:
|
||||
operator = sym_k_or_op;
|
||||
break;
|
||||
|
||||
case XOR:
|
||||
operator = sym_k_or_op;
|
||||
break;
|
||||
|
||||
default:
|
||||
_assert( FALSE, "unknown binary operator" );
|
||||
}
|
||||
|
||||
res_entry->b_expr_opr = operator;
|
||||
|
||||
/*
|
||||
** If the value is a forward reference, we'll patch in the
|
||||
** address of the the referenced value between passes. Otherwise,
|
||||
** just point to the referenced value node.
|
||||
*/
|
||||
if ((op1_frame->b_flags & sym_m_forward_ref) != 0)
|
||||
sym_make_value_forward_ref (op1_frame,
|
||||
(char*)&(res_entry->az_exp_op1), sym_k_patch_add);
|
||||
else
|
||||
res_entry->az_exp_op1 =
|
||||
(sym_value_entry_type *) op1_frame->value.az_symbol_entry;
|
||||
|
||||
if ((op2_frame->b_flags & sym_m_forward_ref) != 0)
|
||||
sym_make_value_forward_ref (op2_frame,
|
||||
(char*)&(res_entry->az_exp_op2), sym_k_patch_add);
|
||||
else
|
||||
res_entry->az_exp_op2 =
|
||||
(sym_value_entry_type *) op2_frame->value.az_symbol_entry;
|
||||
|
||||
operator_frame->b_tag = sar_k_value_frame;
|
||||
operator_frame->b_type = res_entry->b_type;
|
||||
operator_frame->b_flags = res_entry->obj_header.b_flags;
|
||||
operator_frame->value.az_symbol_entry =
|
||||
(sym_entry_type *) res_entry;
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
**++
|
||||
** FUNCTIONAL DESCRIPTION:
|
||||
**
|
||||
** This function processes a unary arithmetic operator in an expression
|
||||
**
|
||||
** FORMAL PARAMETERS:
|
||||
**
|
||||
** operator_frame: [in-out] frame holding the operator and the
|
||||
** target frame
|
||||
** op1_frame: [in] frame holding operand 1
|
||||
**
|
||||
** IMPLICIT INPUTS:
|
||||
**
|
||||
** none
|
||||
**
|
||||
** IMPLICIT OUTPUTS:
|
||||
**
|
||||
** none
|
||||
**
|
||||
** FUNCTION VALUE:
|
||||
**
|
||||
** void
|
||||
**
|
||||
** SIDE EFFECTS:
|
||||
**
|
||||
** op1 symbol entry may be freed
|
||||
**
|
||||
**--
|
||||
**/
|
||||
void sar_unary_op(operator_frame, op1_frame)
|
||||
|
||||
yystype *operator_frame;
|
||||
yystype *op1_frame;
|
||||
|
||||
{
|
||||
sym_value_entry_type *res_entry;
|
||||
int operator;
|
||||
int res_type;
|
||||
|
||||
|
||||
_assert( operator_frame->b_tag == sar_k_token_frame,
|
||||
"operator missing" );
|
||||
|
||||
/*
|
||||
** Determine the operator from the operator frame
|
||||
*/
|
||||
|
||||
switch (operator_frame->b_type)
|
||||
{
|
||||
case PLUS:
|
||||
operator = sym_k_unary_plus_op;
|
||||
break;
|
||||
|
||||
case MINUS:
|
||||
operator = sym_k_unary_minus_op;
|
||||
break;
|
||||
|
||||
case NOT:
|
||||
operator = sym_k_not_op;
|
||||
break;
|
||||
|
||||
case INTEGER:
|
||||
res_type = sym_k_integer_value;
|
||||
operator = sym_k_coerce_op;
|
||||
break;
|
||||
case FLOAT:
|
||||
res_type = sym_k_float_value;
|
||||
operator = sym_k_coerce_op;
|
||||
break;
|
||||
case SINGLE_FLOAT:
|
||||
res_type = sym_k_single_float_value;
|
||||
operator = sym_k_coerce_op;
|
||||
break;
|
||||
case KEYSYM:
|
||||
res_type = sym_k_keysym_value;
|
||||
operator = sym_k_coerce_op;
|
||||
break;
|
||||
|
||||
|
||||
default:
|
||||
_assert( FALSE, "unknown unary operator" );
|
||||
}
|
||||
|
||||
/*
|
||||
** Create the result
|
||||
*/
|
||||
|
||||
res_entry = (sym_value_entry_type *)
|
||||
sem_allocate_node (sym_k_value_entry, sym_k_value_entry_size);
|
||||
|
||||
res_entry->b_expr_opr = operator;
|
||||
/* Begin fixing OSF CR 5691 */
|
||||
res_entry->b_type = operator;
|
||||
/* End fixing OSF CR 5691 */
|
||||
res_entry->az_exp_op1 =
|
||||
(sym_value_entry_type *) op1_frame->value.az_symbol_entry;
|
||||
res_entry->obj_header.b_flags = sym_m_builtin | sym_m_private;
|
||||
if (operator == sym_k_coerce_op)
|
||||
res_entry->b_type = res_type;
|
||||
|
||||
_sar_save_source_pos (&res_entry->header, op1_frame );
|
||||
|
||||
operator_frame->b_tag = sar_k_value_frame;
|
||||
operator_frame->b_type = res_entry->b_type;
|
||||
operator_frame->b_flags = res_entry->obj_header.b_flags;
|
||||
operator_frame->value.az_symbol_entry = (sym_entry_type *) res_entry;
|
||||
|
||||
return;
|
||||
|
||||
}
|
||||
|
||||
225
cde/osf/uil/UilSarInc.c
Normal file
225
cde/osf/uil/UilSarInc.c
Normal file
@@ -0,0 +1,225 @@
|
||||
/*
|
||||
* @OSF_COPYRIGHT@
|
||||
* COPYRIGHT NOTICE
|
||||
* Copyright (c) 1990, 1991, 1992, 1993 Open Software Foundation, Inc.
|
||||
* ALL RIGHTS RESERVED (MOTIF). See the file named COPYRIGHT.MOTIF for
|
||||
* the full copyright text.
|
||||
*/
|
||||
/*
|
||||
* HISTORY
|
||||
*/
|
||||
#ifdef REV_INFO
|
||||
#ifndef lint
|
||||
static char rcsid[] = "$TOG: UilSarInc.c /main/12 1997/03/12 15:21:31 dbl $"
|
||||
#endif
|
||||
#endif
|
||||
|
||||
/*
|
||||
* (c) Copyright 1989, 1990, DIGITAL EQUIPMENT CORPORATION, MAYNARD, MASS. */
|
||||
|
||||
/*
|
||||
**++
|
||||
** FACILITY:
|
||||
**
|
||||
** User Interface Language Compiler (UIL)
|
||||
**
|
||||
** ABSTRACT:
|
||||
**
|
||||
** This module contain the routines for processing the INCLUDE construct.
|
||||
**
|
||||
**--
|
||||
**/
|
||||
|
||||
|
||||
/*
|
||||
**
|
||||
** INCLUDE FILES
|
||||
**
|
||||
**/
|
||||
|
||||
#include <Xm/Xm.h>
|
||||
#include "UilDefI.h"
|
||||
|
||||
|
||||
/*
|
||||
**
|
||||
** DEFINE and MACRO DEFINITIONS
|
||||
**
|
||||
**/
|
||||
|
||||
|
||||
/*
|
||||
**
|
||||
** EXTERNAL VARIABLE DECLARATIONS
|
||||
**
|
||||
**/
|
||||
|
||||
|
||||
|
||||
/*
|
||||
**
|
||||
** GLOBAL VARIABLE DECLARATIONS
|
||||
**
|
||||
**/
|
||||
|
||||
|
||||
|
||||
/*
|
||||
**
|
||||
** OWN VARIABLE DECLARATIONS
|
||||
**
|
||||
**/
|
||||
|
||||
|
||||
/*
|
||||
**++
|
||||
** FUNCTIONAL DESCRIPTION:
|
||||
**
|
||||
** This routine handles the include directive.
|
||||
**
|
||||
** FORMAL PARAMETERS:
|
||||
**
|
||||
** file_frame parser stack frame that contains the name of the
|
||||
** file to be included.
|
||||
**
|
||||
** IMPLICIT INPUTS:
|
||||
**
|
||||
** none
|
||||
**
|
||||
** IMPLICIT OUTPUTS:
|
||||
**
|
||||
** none
|
||||
**
|
||||
** FUNCTION VALUE:
|
||||
**
|
||||
** void
|
||||
**
|
||||
** SIDE EFFECTS:
|
||||
**
|
||||
** none
|
||||
**
|
||||
**--
|
||||
**/
|
||||
|
||||
void sar_include_file ( file_frame, include_frame, semi_frame )
|
||||
|
||||
yystype * file_frame;
|
||||
yystype * include_frame;
|
||||
yystype * semi_frame;
|
||||
|
||||
{
|
||||
sym_value_entry_type * value_entry;
|
||||
sym_include_file_entry_type * include_entry;
|
||||
sym_section_entry_type * section_entry;
|
||||
sym_section_entry_type * section_tail_entry;
|
||||
char * buffer;
|
||||
unsigned char tmp1;
|
||||
int i,j;
|
||||
|
||||
value_entry =
|
||||
(sym_value_entry_type *) file_frame -> value . az_symbol_entry;
|
||||
|
||||
/*
|
||||
* Fix for CR 5465 - If the value_entry is not of type char_8, print an
|
||||
* error message and abort the compilation
|
||||
*/
|
||||
if ((value_entry->b_type != sym_k_char_8_value) &&
|
||||
(value_entry->b_type != sym_k_localized_string_value))
|
||||
diag_issue_diagnostic (
|
||||
d_include_file,
|
||||
_sar_source_pos2(value_entry));
|
||||
/*
|
||||
* End Fix for CR 5465
|
||||
*/
|
||||
/*
|
||||
* If the direction is RtoL then reverse the include file.
|
||||
*/
|
||||
if (value_entry->b_direction == XmSTRING_DIRECTION_R_TO_L)
|
||||
{
|
||||
/*
|
||||
** Just reverse the bytes from the first to last
|
||||
*/
|
||||
for (i=0, j=value_entry->w_length-1;
|
||||
i < (int)((int)value_entry->w_length>>1);
|
||||
i++,j--)
|
||||
{
|
||||
tmp1 = value_entry->value.c_value[ i ];
|
||||
value_entry->value.c_value[ i ] =
|
||||
value_entry->value.c_value[ j ];
|
||||
value_entry->value.c_value[ j ] = tmp1;
|
||||
}
|
||||
}
|
||||
|
||||
_assert (value_entry -> header . b_tag == sym_k_value_entry,
|
||||
"missing value entry for include");
|
||||
|
||||
/*
|
||||
** Allocate an INCLUDE entry
|
||||
*/
|
||||
|
||||
include_entry = (sym_include_file_entry_type *) sem_allocate_node
|
||||
( sym_k_include_file_entry, sym_k_include_file_entry_size );
|
||||
|
||||
/*
|
||||
** Open the include file. Set up a null-terminated name string.
|
||||
*/
|
||||
|
||||
buffer = (char *) _get_memory (value_entry -> w_length + 1);
|
||||
_move (buffer, value_entry -> value . c_value,
|
||||
value_entry -> w_length);
|
||||
buffer [value_entry -> w_length] = 0 ;
|
||||
|
||||
src_open_file (buffer, include_entry->full_file_name);
|
||||
|
||||
/*
|
||||
** Allocate a section entry for this include "section".
|
||||
** Store the source info in it
|
||||
*/
|
||||
|
||||
section_entry = (sym_section_entry_type *) sem_allocate_node
|
||||
( sym_k_section_entry, sym_k_section_entry_size );
|
||||
|
||||
section_entry->header.b_type = sym_k_include_section;
|
||||
|
||||
_sar_save_source_info ( §ion_entry->header , include_frame , semi_frame );
|
||||
|
||||
/*
|
||||
** Link this section into the current section list.
|
||||
*/
|
||||
|
||||
section_entry->next = (sym_entry_type *) sym_az_current_section_entry;
|
||||
section_entry->prev_section = sym_az_current_section_entry->prev_section;
|
||||
sym_az_current_section_entry = section_entry;
|
||||
|
||||
/*
|
||||
** Link the include intry we created earlier onto the section list
|
||||
*/
|
||||
|
||||
section_entry->entries = (sym_entry_type *)include_entry;
|
||||
|
||||
/*
|
||||
** Save the file name
|
||||
*/
|
||||
|
||||
_move (include_entry->file_name, buffer, value_entry->w_length);
|
||||
include_entry->file_name [value_entry->w_length] = 0;
|
||||
|
||||
/*
|
||||
** Since this is an INCLUDE we want included sections to hang off
|
||||
** of it so we create a new place holder entry (tail) and change the
|
||||
** "current" section list to it.
|
||||
*/
|
||||
|
||||
section_tail_entry = (sym_section_entry_type *) sem_allocate_node
|
||||
( sym_k_section_entry, sym_k_section_entry_size );
|
||||
|
||||
section_tail_entry->header.b_type = sym_k_section_tail;
|
||||
|
||||
include_entry->sections = section_tail_entry;
|
||||
|
||||
section_tail_entry->prev_section = sym_az_current_section_entry;
|
||||
sym_az_current_section_entry = section_tail_entry;
|
||||
|
||||
_free_memory (buffer);
|
||||
|
||||
}
|
||||
865
cde/osf/uil/UilSarMod.c
Normal file
865
cde/osf/uil/UilSarMod.c
Normal file
@@ -0,0 +1,865 @@
|
||||
/*
|
||||
* @OSF_COPYRIGHT@
|
||||
* COPYRIGHT NOTICE
|
||||
* Copyright (c) 1990, 1991, 1992, 1993 Open Software Foundation, Inc.
|
||||
* ALL RIGHTS RESERVED (MOTIF). See the file named COPYRIGHT.MOTIF for
|
||||
* the full copyright text.
|
||||
*/
|
||||
/*
|
||||
* HISTORY
|
||||
*/
|
||||
#ifdef REV_INFO
|
||||
#ifndef lint
|
||||
static char rcsid[] = "$TOG: UilSarMod.c /main/13 1997/03/12 15:21:36 dbl $"
|
||||
#endif
|
||||
#endif
|
||||
|
||||
/*
|
||||
* (c) Copyright 1989, 1990, DIGITAL EQUIPMENT CORPORATION, MAYNARD, MASS. */
|
||||
|
||||
/*
|
||||
**++
|
||||
** FACILITY:
|
||||
**
|
||||
** User Interface Language Compiler (UIL)
|
||||
**
|
||||
** ABSTRACT:
|
||||
**
|
||||
** This module contain the routines for processing the module construct.
|
||||
**
|
||||
**--
|
||||
**/
|
||||
|
||||
|
||||
/*
|
||||
**
|
||||
** INCLUDE FILES
|
||||
**
|
||||
**/
|
||||
|
||||
#include "UilDefI.h"
|
||||
|
||||
/*
|
||||
**
|
||||
** TABLE OF CONTENTS
|
||||
**
|
||||
*/
|
||||
|
||||
/*
|
||||
**
|
||||
** DEFINE and MACRO DEFINITIONS
|
||||
**
|
||||
**/
|
||||
|
||||
|
||||
|
||||
/*
|
||||
**
|
||||
** EXTERNAL VARIABLE DECLARATIONS
|
||||
**
|
||||
**/
|
||||
|
||||
extern yystype yylval;
|
||||
|
||||
|
||||
/*
|
||||
**
|
||||
** GLOBAL VARIABLE DECLARATIONS
|
||||
**
|
||||
**/
|
||||
|
||||
externaldef(uil_comp_glbl) src_source_record_type
|
||||
*src_az_module_source_record;
|
||||
externaldef(uil_comp_glbl) unsigned short int
|
||||
*uil_urm_variant = NULL;
|
||||
externaldef(uil_comp_glbl) unsigned short int
|
||||
*uil_arg_compr = NULL;
|
||||
externaldef(uil_comp_glbl) unsigned short int
|
||||
*uil_reas_compr = NULL;
|
||||
externaldef(uil_comp_glbl) unsigned short int
|
||||
*uil_widget_compr = NULL;
|
||||
externaldef(uil_comp_glbl) unsigned short int
|
||||
*uil_child_compr = NULL;
|
||||
|
||||
/*
|
||||
**
|
||||
** OWN VARIABLE DECLARATIONS
|
||||
**
|
||||
**/
|
||||
|
||||
unsigned int module_clauses;
|
||||
|
||||
#define m_version_clause (1<<0)
|
||||
#define m_names_clause (1<<1)
|
||||
#define m_charset_clause (1<<2)
|
||||
#define m_objects_clause (1<<3)
|
||||
|
||||
#define m_after_names (m_charset_clause)
|
||||
|
||||
|
||||
/*
|
||||
**++
|
||||
** FUNCTIONAL DESCRIPTION:
|
||||
**
|
||||
** This function initializes all static data structure for the semantic
|
||||
** action routines.
|
||||
**
|
||||
** FORMAL PARAMETERS:
|
||||
**
|
||||
** none
|
||||
**
|
||||
** IMPLICIT INPUTS:
|
||||
**
|
||||
** none
|
||||
**
|
||||
** IMPLICIT OUTPUTS:
|
||||
**
|
||||
** uil_urm_variant
|
||||
**
|
||||
** FUNCTION VALUE:
|
||||
**
|
||||
** void
|
||||
**
|
||||
** SIDE EFFECTS:
|
||||
**
|
||||
** global variables are initialized
|
||||
**
|
||||
**--
|
||||
**/
|
||||
|
||||
void sar_initialize ()
|
||||
|
||||
{
|
||||
int i; /* loop index */
|
||||
|
||||
/* BEGIN OSF Fix CR 5443 */
|
||||
/* Initialize uil_sym_default_charset based on XmFALLBACK_CHARSET */
|
||||
if (strcmp(XmFALLBACK_CHARSET, "ISO8859-1") != 0) /* Most common case. */
|
||||
for (i = 0; i < (int)charset_lang_table_max; i++)
|
||||
if (strcmp(XmFALLBACK_CHARSET, charset_lang_names_table[i]) == 0)
|
||||
{
|
||||
uil_sym_default_charset = charset_lang_codes_table[i];
|
||||
break;
|
||||
}
|
||||
/* END OSF Fix CR 5443 */
|
||||
|
||||
/*
|
||||
* Allocate vectors for the variant and usage vectors if they are NULL,
|
||||
*/
|
||||
if ( uil_urm_variant == NULL )
|
||||
uil_urm_variant = (unsigned short int *)
|
||||
XtMalloc(sizeof(unsigned short int)*(uil_max_object+1));
|
||||
if ( uil_arg_compr == NULL )
|
||||
uil_arg_compr = (unsigned short int *)
|
||||
XtMalloc(sizeof(unsigned short int)*(uil_max_arg+1));
|
||||
if ( uil_reas_compr == NULL )
|
||||
uil_reas_compr = (unsigned short int *)
|
||||
XtMalloc(sizeof(unsigned short int)*(uil_max_reason+1));
|
||||
if ( uil_widget_compr == NULL )
|
||||
uil_widget_compr = (unsigned short int *)
|
||||
XtMalloc(sizeof(unsigned short int)*(uil_max_object+1));
|
||||
if ( uil_child_compr == NULL )
|
||||
uil_child_compr = (unsigned short int *)
|
||||
XtMalloc(sizeof(unsigned short int)*(uil_max_child+1));
|
||||
/*
|
||||
** Loop throught the array of object variants and set them all to NULL.
|
||||
*/
|
||||
for (i = 0; i<uil_max_object+1; i++)
|
||||
uil_urm_variant[i] = 0;
|
||||
|
||||
/*
|
||||
** Initialize all compression vectors
|
||||
*/
|
||||
for ( i=0 ; i<uil_max_arg+1 ; i++ )
|
||||
uil_arg_compr[i] = 0;
|
||||
for ( i=0 ; i<uil_max_reason+1 ; i++ )
|
||||
uil_reas_compr[i] = 0;
|
||||
for ( i=0 ; i<uil_max_object+1 ; i++ )
|
||||
uil_widget_compr[i] = 0;
|
||||
for ( i=0 ; i<uil_max_child+1 ; i++ )
|
||||
uil_child_compr[i] = 0;
|
||||
|
||||
}
|
||||
|
||||
/*
|
||||
**++
|
||||
** FUNCTIONAL DESCRIPTION:
|
||||
**
|
||||
** This function creates the root entry node for the compilation.
|
||||
** The "root" entry is the root node of the symbol tree and is
|
||||
** what's passed back to the caller of the compiler.
|
||||
**
|
||||
** FORMAL PARAMETERS:
|
||||
**
|
||||
** root_frame ptr to root frame that will remain on the stack
|
||||
** throughout the compilation
|
||||
**
|
||||
** IMPLICIT INPUTS:
|
||||
**
|
||||
** none
|
||||
**
|
||||
** IMPLICIT OUTPUTS:
|
||||
**
|
||||
** sym_az_root_entry global pointer used thoughout the compilation
|
||||
** sym_az_curent_section_entry global pointer used thoughout the compilation
|
||||
** src_az_first_source_record global pointer to the source record list
|
||||
**
|
||||
** FUNCTION VALUE:
|
||||
**
|
||||
** void
|
||||
**
|
||||
** SIDE EFFECTS:
|
||||
**
|
||||
** none
|
||||
**
|
||||
**--
|
||||
**/
|
||||
|
||||
void sar_create_root (root_frame)
|
||||
|
||||
yystype *root_frame;
|
||||
|
||||
{
|
||||
/*
|
||||
** Allocate the symbol nodes
|
||||
*/
|
||||
|
||||
sym_az_root_entry = (sym_root_entry_type *)
|
||||
sem_allocate_node (sym_k_root_entry, sym_k_root_entry_size);
|
||||
|
||||
/*
|
||||
** Create a place holder entry (tail) and change the "current" section list to it.
|
||||
*/
|
||||
|
||||
sym_az_current_section_entry = (sym_section_entry_type *) sem_allocate_node
|
||||
( sym_k_section_entry, sym_k_section_entry_size );
|
||||
|
||||
sym_az_current_section_entry->header.b_type = sym_k_section_tail;
|
||||
|
||||
sym_az_root_entry->sections = sym_az_current_section_entry;
|
||||
sym_az_root_entry->src_record_list = src_az_first_source_record;
|
||||
|
||||
/*
|
||||
** Save the file name and the expanded version of it.
|
||||
*/
|
||||
|
||||
strcpy (sym_az_root_entry->file_name, Uil_cmd_z_command.ac_source_file);
|
||||
strcpy (sym_az_root_entry->full_file_name, src_az_source_file_table[0]->expanded_name);
|
||||
|
||||
/*
|
||||
** Save the symbol node in the root frame.
|
||||
*/
|
||||
|
||||
root_frame->b_tag = sar_k_root_frame;
|
||||
root_frame->b_type = sym_k_root_entry;
|
||||
root_frame->value.az_symbol_entry = (sym_entry_type *)sym_az_root_entry;
|
||||
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
**++
|
||||
** FUNCTIONAL DESCRIPTION:
|
||||
**
|
||||
** This function create the module entry symbol node for the compilation.
|
||||
**
|
||||
** FORMAL PARAMETERS:
|
||||
**
|
||||
** target_frame ptr to module frame that will remain on the stack
|
||||
** throughout the compilation
|
||||
** id_frame ptr to token frame for the module name
|
||||
**
|
||||
** IMPLICIT INPUTS:
|
||||
**
|
||||
** sym_az_root_entry global that points to the root entry
|
||||
**
|
||||
** IMPLICIT OUTPUTS:
|
||||
**
|
||||
** sym_az_module_entry global that points to module entry
|
||||
**
|
||||
** FUNCTION VALUE:
|
||||
**
|
||||
** void
|
||||
**
|
||||
** SIDE EFFECTS:
|
||||
**
|
||||
** set second line of the listing title
|
||||
**
|
||||
**--
|
||||
**/
|
||||
|
||||
void sar_create_module(target_frame, id_frame, module_frame)
|
||||
|
||||
yystype *target_frame;
|
||||
yystype *id_frame;
|
||||
yystype *module_frame;
|
||||
|
||||
{
|
||||
sym_name_entry_type *name_entry;
|
||||
|
||||
/*
|
||||
** Call standard routine to check name entry for id_frame.
|
||||
** This routine handles font name, color names, etc used as ids
|
||||
*/
|
||||
|
||||
name_entry = (sym_name_entry_type *) sem_dcl_name( id_frame );
|
||||
|
||||
/*
|
||||
** Allocate the module entry and fill it in
|
||||
*/
|
||||
|
||||
sym_az_module_entry = (sym_module_entry_type *)
|
||||
sem_allocate_node (sym_k_module_entry, sym_k_module_entry_size);
|
||||
sym_az_module_entry->obj_header.az_name = name_entry;
|
||||
_sar_save_source_pos (&sym_az_module_entry->header, module_frame);
|
||||
|
||||
/* preserve module header comments */
|
||||
sar_assoc_comment ((sym_obj_entry_type *)sym_az_module_entry);
|
||||
|
||||
/*
|
||||
** Hang the module entry off the root entry
|
||||
*/
|
||||
|
||||
sym_az_root_entry->module_hdr = sym_az_module_entry;
|
||||
|
||||
/*
|
||||
** Have name entry point to the module entry too. This stops the
|
||||
** name from being reused to name another construct.
|
||||
*/
|
||||
|
||||
name_entry->az_object = (sym_entry_type *) sym_az_module_entry;
|
||||
|
||||
/*
|
||||
** Save the source information about module name identifier
|
||||
*/
|
||||
|
||||
_sar_save_source_info ( &name_entry->header , module_frame , id_frame );
|
||||
|
||||
/*
|
||||
** Set up target frame
|
||||
*/
|
||||
|
||||
target_frame->b_tag = sar_k_module_frame;
|
||||
|
||||
/*
|
||||
** Set up listing title
|
||||
*/
|
||||
|
||||
if (Uil_cmd_z_command.v_listing_file)
|
||||
sprintf(Uil_lst_c_title2,
|
||||
"Module: %s",
|
||||
name_entry->c_text );
|
||||
|
||||
/*
|
||||
** Set mask to no clauses seen
|
||||
*/
|
||||
|
||||
module_clauses = 0;
|
||||
}
|
||||
|
||||
/*
|
||||
**++
|
||||
** FUNCTIONAL DESCRIPTION:
|
||||
**
|
||||
** This function sets a version string for the module.
|
||||
**
|
||||
** FORMAL PARAMETERS:
|
||||
**
|
||||
** value_frame ptr to value frame for version string
|
||||
**
|
||||
** IMPLICIT INPUTS:
|
||||
**
|
||||
** none
|
||||
**
|
||||
** IMPLICIT OUTPUTS:
|
||||
**
|
||||
** sym_az_module_entry global that point to module entry
|
||||
**
|
||||
** FUNCTION VALUE:
|
||||
**
|
||||
** void
|
||||
**
|
||||
** SIDE EFFECTS:
|
||||
**
|
||||
** set up second line of the listing title
|
||||
**
|
||||
**--
|
||||
**/
|
||||
|
||||
void sar_process_module_version (value_frame, start_frame)
|
||||
|
||||
yystype *value_frame;
|
||||
yystype *start_frame;
|
||||
|
||||
{
|
||||
sym_value_entry_type *value_entry;
|
||||
|
||||
_assert( value_frame->b_tag == sar_k_value_frame, "value frame missing" );
|
||||
|
||||
if ((module_clauses & m_version_clause) != 0)
|
||||
diag_issue_diagnostic
|
||||
( d_single_occur,
|
||||
_sar_source_position( value_frame ),
|
||||
"UIL", "module", "version", "clause"
|
||||
);
|
||||
|
||||
/*
|
||||
** FORWARD REFERENCING OF VERSION NO LONGER ALLOWED
|
||||
** If it's not a forward reference, verify its length and stick a pointer
|
||||
** to the value node of the version in the module entry.
|
||||
*/
|
||||
|
||||
if ((value_frame->b_flags & sym_m_forward_ref) != 0)
|
||||
diag_issue_diagnostic(d_illegal_forward_ref,
|
||||
_sar_source_position(value_frame),
|
||||
"Module Version"
|
||||
);
|
||||
|
||||
else
|
||||
{
|
||||
value_entry = (sym_value_entry_type *)
|
||||
value_frame->value.az_symbol_entry;
|
||||
|
||||
if (value_entry->w_length > 31)
|
||||
{
|
||||
diag_issue_diagnostic
|
||||
( d_out_range,
|
||||
_sar_source_position( value_frame ),
|
||||
"version string",
|
||||
"0..31 characters"
|
||||
);
|
||||
|
||||
value_entry->w_length = 31;
|
||||
}
|
||||
|
||||
sym_az_module_entry->az_version = value_entry;
|
||||
}
|
||||
|
||||
/*
|
||||
** Save source info
|
||||
*/
|
||||
|
||||
_sar_save_source_info ( &sym_az_module_entry->az_version->header , start_frame , value_frame);
|
||||
|
||||
/*
|
||||
** Set up listing title
|
||||
*/
|
||||
|
||||
if (Uil_cmd_z_command.v_listing_file)
|
||||
sprintf(Uil_lst_c_title2,
|
||||
"Module: %s \t Version: %s",
|
||||
sym_az_module_entry->obj_header.az_name->c_text,
|
||||
value_entry->value.c_value );
|
||||
|
||||
module_clauses |= m_version_clause;
|
||||
}
|
||||
|
||||
/*
|
||||
**++
|
||||
** FUNCTIONAL DESCRIPTION:
|
||||
**
|
||||
** This function sets the case sensitivity of names for the module.
|
||||
**
|
||||
** FORMAL PARAMETERS:
|
||||
**
|
||||
** token_frame ptr to token frame for keyword sensitive or insensitive
|
||||
**
|
||||
** IMPLICIT INPUTS:
|
||||
**
|
||||
** sym_az_module_entry global which points to module entry
|
||||
**
|
||||
** IMPLICIT OUTPUTS:
|
||||
**
|
||||
** uil_v_case_sensitive global which control case sensitivity of names
|
||||
**
|
||||
** FUNCTION VALUE:
|
||||
**
|
||||
** void
|
||||
**
|
||||
** SIDE EFFECTS:
|
||||
**
|
||||
** none
|
||||
**
|
||||
**--
|
||||
**/
|
||||
|
||||
void sar_process_module_sensitivity (token_frame, start_frame)
|
||||
|
||||
yystype *token_frame;
|
||||
yystype *start_frame;
|
||||
|
||||
{
|
||||
_assert( token_frame->b_tag == sar_k_token_frame, "token frame missing" );
|
||||
|
||||
if ((module_clauses & m_names_clause) != 0)
|
||||
diag_issue_diagnostic
|
||||
( d_single_occur,
|
||||
_sar_source_position( token_frame ),
|
||||
"UIL", "module", "names", "clause"
|
||||
);
|
||||
|
||||
if ((module_clauses & m_after_names) != 0)
|
||||
diag_issue_diagnostic
|
||||
( d_names,
|
||||
_sar_source_position( token_frame )
|
||||
);
|
||||
|
||||
uil_v_case_sensitive = (token_frame->b_type == CASE_SENSITIVE);
|
||||
|
||||
sym_az_module_entry->az_case_sense = (sym_value_entry_type *)
|
||||
sem_allocate_node (sym_k_value_entry, sym_k_value_entry_size);
|
||||
|
||||
sym_az_module_entry->az_case_sense->header.b_type = uil_v_case_sensitive;
|
||||
|
||||
/*
|
||||
** Save source info
|
||||
*/
|
||||
|
||||
_sar_save_source_info ( &sym_az_module_entry->az_case_sense->header , start_frame , token_frame);
|
||||
|
||||
/* let the keyword table know of the sensitivity change */
|
||||
|
||||
key_initialize();
|
||||
|
||||
|
||||
/*
|
||||
** The default for name sensitivity is SENSITIVE.
|
||||
** At the point that this semantic routine is called, the only valid
|
||||
** name seen so far is the module name.
|
||||
*/
|
||||
|
||||
module_clauses |= m_names_clause;
|
||||
}
|
||||
|
||||
/*
|
||||
**++
|
||||
** FUNCTIONAL DESCRIPTION:
|
||||
**
|
||||
** This function sets the default charset for the module.
|
||||
**
|
||||
** FORMAL PARAMETERS:
|
||||
**
|
||||
** token_frame ptr to token frame for charset
|
||||
**
|
||||
** IMPLICIT INPUTS:
|
||||
**
|
||||
** sym_az_module_entry global pointer to the module entry
|
||||
**
|
||||
** IMPLICIT OUTPUTS:
|
||||
**
|
||||
** Uil_lex_l_user_default_charset
|
||||
** Uil_lex_az_charset_entry
|
||||
**
|
||||
** FUNCTION VALUE:
|
||||
**
|
||||
** void
|
||||
**
|
||||
** SIDE EFFECTS:
|
||||
**
|
||||
** none
|
||||
**
|
||||
**--
|
||||
**/
|
||||
|
||||
void sar_process_module_charset(token_frame , start_frame)
|
||||
|
||||
yystype *token_frame;
|
||||
yystype *start_frame;
|
||||
|
||||
{
|
||||
sym_value_entry_type *value_entry;
|
||||
|
||||
_assert( (token_frame->b_tag == sar_k_token_frame) ||
|
||||
(token_frame->b_tag == sar_k_value_frame), "token or value frame missing" );
|
||||
|
||||
if ((module_clauses & m_charset_clause) != 0)
|
||||
diag_issue_diagnostic
|
||||
( d_single_occur,
|
||||
_sar_source_position( token_frame ),
|
||||
"UIL", "module", "character_set", "clause"
|
||||
);
|
||||
|
||||
/*
|
||||
** There are two different ways that the charset info may be specified.
|
||||
** If the charset_frame is a token frame, then we can just grab the
|
||||
** token class and map it into a charset value. If it is a value frame
|
||||
** the it is the result of the CHARACTER_SET function and is a string
|
||||
** value representing the character set.
|
||||
*/
|
||||
switch (token_frame->b_tag)
|
||||
{
|
||||
case sar_k_token_frame:
|
||||
{
|
||||
key_keytable_entry_type *az_keyword_entry;
|
||||
az_keyword_entry = token_frame->value.az_keyword_entry;
|
||||
|
||||
Uil_lex_l_user_default_charset = az_keyword_entry->b_subclass;
|
||||
|
||||
value_entry = sem_create_value_entry (
|
||||
token_frame->value.az_keyword_entry->at_name,
|
||||
token_frame->value.az_keyword_entry->b_length, sym_k_char_8_value );
|
||||
break;
|
||||
}
|
||||
|
||||
case sar_k_value_frame:
|
||||
{
|
||||
Uil_lex_l_user_default_charset = lex_k_userdefined_charset;
|
||||
Uil_lex_az_charset_entry = (sym_value_entry_type *)token_frame->value.az_symbol_entry;
|
||||
value_entry = (sym_value_entry_type *)token_frame->value.az_symbol_entry;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
/* If charset specified for module, then localized strings not allowed */
|
||||
Uil_lex_l_localized = FALSE;
|
||||
|
||||
module_clauses |= m_charset_clause;
|
||||
sym_az_module_entry->az_character_set = value_entry;
|
||||
|
||||
/*
|
||||
** Save source info
|
||||
*/
|
||||
|
||||
_sar_save_source_info ( &value_entry->header , start_frame , token_frame);
|
||||
|
||||
}
|
||||
|
||||
/*
|
||||
**++
|
||||
** FUNCTIONAL DESCRIPTION:
|
||||
**
|
||||
** This function saves the source record for the module header
|
||||
** for possible later use in the machine code listing.
|
||||
**
|
||||
** FORMAL PARAMETERS:
|
||||
**
|
||||
** none
|
||||
**
|
||||
** IMPLICIT INPUTS:
|
||||
**
|
||||
** yylval Current token information from the lexical analyzer
|
||||
**
|
||||
** IMPLICIT OUTPUTS:
|
||||
**
|
||||
** src_az_module_source_record source record for the module header
|
||||
**
|
||||
** FUNCTION VALUE:
|
||||
**
|
||||
** void
|
||||
**
|
||||
** SIDE EFFECTS:
|
||||
**
|
||||
** none
|
||||
**
|
||||
**--
|
||||
**/
|
||||
|
||||
void sar_save_module_source ()
|
||||
|
||||
{
|
||||
|
||||
src_az_module_source_record = yylval.az_source_record;
|
||||
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
**++
|
||||
** FUNCTIONAL DESCRIPTION:
|
||||
**
|
||||
** This routine creates and saves a default object specification
|
||||
** for the module entry itself.
|
||||
**
|
||||
** FORMAL PARAMETERS:
|
||||
**
|
||||
** object_frame ptr to token frame for "OBJECT"
|
||||
**
|
||||
** IMPLICIT INPUTS:
|
||||
**
|
||||
** none
|
||||
**
|
||||
** IMPLICIT OUTPUTS:
|
||||
**
|
||||
** sym_az_module_entry global pointer to the module entry
|
||||
**
|
||||
** FUNCTION VALUE:
|
||||
**
|
||||
** void
|
||||
**
|
||||
** SIDE EFFECTS:
|
||||
**
|
||||
** none
|
||||
**
|
||||
**--
|
||||
**/
|
||||
|
||||
void sar_make_def_obj (object_frame)
|
||||
|
||||
yystype *object_frame;
|
||||
|
||||
{
|
||||
sym_def_obj_entry_type *def_obj_entry;
|
||||
|
||||
/*
|
||||
* Make def_obj entry and link into the chain headed in the module
|
||||
*/
|
||||
def_obj_entry = (sym_def_obj_entry_type *) sem_allocate_node
|
||||
(sym_k_def_obj_entry, sym_k_def_obj_entry_size);
|
||||
_sar_save_source_pos (&def_obj_entry->header, object_frame);
|
||||
def_obj_entry->next = sym_az_module_entry->az_def_obj;
|
||||
sym_az_module_entry->az_def_obj = def_obj_entry;
|
||||
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
**++
|
||||
** FUNCTIONAL DESCRIPTION:
|
||||
**
|
||||
** This function sets the default variants for objects which
|
||||
** are defined in the module.
|
||||
**
|
||||
** FORMAL PARAMETERS:
|
||||
**
|
||||
** type_frame ptr to token frame for object type
|
||||
** variant_frame ptr to token frame for variant
|
||||
**
|
||||
** IMPLICIT INPUTS:
|
||||
**
|
||||
** uil_gadget_variants table to see if the gadget variant is supported
|
||||
** uil_urm_variant table to see if the object type has been
|
||||
** specified previously
|
||||
** sym_az_module_entry global pointing to the module entry
|
||||
**
|
||||
** IMPLICIT OUTPUTS:
|
||||
**
|
||||
** uil_urm_variant table to contain the default variant for this
|
||||
** object type.
|
||||
**
|
||||
** FUNCTION VALUE:
|
||||
**
|
||||
** void
|
||||
**
|
||||
** SIDE EFFECTS:
|
||||
**
|
||||
** none
|
||||
**
|
||||
**--
|
||||
**/
|
||||
|
||||
void sar_process_module_variant (obj_type_frame, variant_frame)
|
||||
|
||||
yystype *obj_type_frame;
|
||||
yystype *variant_frame;
|
||||
|
||||
{
|
||||
|
||||
unsigned int obj_type, obj_variant;
|
||||
yystype *source_frame;
|
||||
sym_def_obj_entry_type *def_obj_entry;
|
||||
|
||||
source_frame = & yylval;
|
||||
|
||||
obj_type = obj_type_frame->value.az_keyword_entry->b_subclass;
|
||||
obj_variant = variant_frame->b_type;
|
||||
|
||||
/* See if this object type has been specified before. */
|
||||
|
||||
if ( uil_urm_variant[obj_type] != 0 )
|
||||
{
|
||||
diag_issue_diagnostic
|
||||
(d_supersede,
|
||||
_sar_source_position ( source_frame ),
|
||||
diag_object_text (obj_type),
|
||||
diag_tag_text (obj_variant),
|
||||
diag_tag_text (sym_k_module_entry),
|
||||
"" );
|
||||
}
|
||||
|
||||
/* See if this object type supports gadgets. */
|
||||
|
||||
if ( obj_variant == sym_k_gadget_entry )
|
||||
{
|
||||
if ( uil_gadget_variants[obj_type] == 0 )
|
||||
{
|
||||
diag_issue_diagnostic
|
||||
(d_gadget_not_sup,
|
||||
_sar_source_position ( source_frame ),
|
||||
diag_object_text (obj_type),
|
||||
diag_object_text (obj_type) );
|
||||
obj_variant = sym_k_widget_entry;
|
||||
}
|
||||
}
|
||||
|
||||
/* Save the default variant information */
|
||||
uil_urm_variant[obj_type] = obj_variant;
|
||||
|
||||
/*
|
||||
** get the latest def_obj entry and fill in
|
||||
*/
|
||||
def_obj_entry = sym_az_module_entry->az_def_obj->next;
|
||||
def_obj_entry->b_object_info = obj_type;
|
||||
def_obj_entry->b_variant_info = obj_variant;
|
||||
|
||||
}
|
||||
|
||||
/*
|
||||
**++
|
||||
** FUNCTIONAL DESCRIPTION:
|
||||
**
|
||||
** This procedure saves source info for the various sections declaration
|
||||
** lists in the Uil file (i.e. value, identifier, procedure, object, and
|
||||
** list).
|
||||
**
|
||||
** FORMAL PARAMETERS:
|
||||
**
|
||||
** header_frame ptr to token frame for the section declaration
|
||||
** section_type integer describing what section this is
|
||||
**
|
||||
** IMPLICIT INPUTS:
|
||||
**
|
||||
** none
|
||||
**
|
||||
** IMPLICIT OUTPUTS:
|
||||
**
|
||||
** sym_az_root_entry global pointer to the root entry
|
||||
**
|
||||
** FUNCTION VALUE:
|
||||
**
|
||||
** void
|
||||
**
|
||||
** SIDE EFFECTS:
|
||||
**
|
||||
** none
|
||||
**
|
||||
**--
|
||||
*/
|
||||
|
||||
void sar_save_section_source (header_frame, section_type)
|
||||
|
||||
yystype *header_frame;
|
||||
int section_type;
|
||||
|
||||
{
|
||||
sym_section_entry_type *section_entry;
|
||||
|
||||
section_entry = (sym_section_entry_type *) sem_allocate_node
|
||||
( sym_k_section_entry, sym_k_section_entry_size );
|
||||
|
||||
section_entry->header.b_type = section_type;
|
||||
|
||||
/*
|
||||
** Save source info
|
||||
*/
|
||||
|
||||
_sar_save_source_info ( §ion_entry->header , header_frame, header_frame);
|
||||
|
||||
/*
|
||||
** Link this section into the current section list.
|
||||
*/
|
||||
|
||||
section_entry->next = (sym_entry_type *) sym_az_current_section_entry;
|
||||
section_entry->prev_section = sym_az_current_section_entry->prev_section;
|
||||
sym_az_current_section_entry = section_entry;
|
||||
|
||||
}
|
||||
2401
cde/osf/uil/UilSarObj.c
Normal file
2401
cde/osf/uil/UilSarObj.c
Normal file
File diff suppressed because it is too large
Load Diff
442
cde/osf/uil/UilSarProc.c
Normal file
442
cde/osf/uil/UilSarProc.c
Normal file
@@ -0,0 +1,442 @@
|
||||
/*
|
||||
* @OSF_COPYRIGHT@
|
||||
* COPYRIGHT NOTICE
|
||||
* Copyright (c) 1990, 1991, 1992, 1993 Open Software Foundation, Inc.
|
||||
* ALL RIGHTS RESERVED (MOTIF). See the file named COPYRIGHT.MOTIF for
|
||||
* the full copyright text.
|
||||
*/
|
||||
/*
|
||||
* HISTORY
|
||||
*/
|
||||
#ifdef REV_INFO
|
||||
#ifndef lint
|
||||
static char rcsid[] = "$XConsortium: UilSarProc.c /main/12 1995/07/14 09:37:43 drk $"
|
||||
#endif
|
||||
#endif
|
||||
|
||||
/*
|
||||
* (c) Copyright 1989, 1990, DIGITAL EQUIPMENT CORPORATION, MAYNARD, MASS. */
|
||||
|
||||
/*
|
||||
**++
|
||||
** FACILITY:
|
||||
**
|
||||
** User Interface Language Compiler (UIL)
|
||||
**
|
||||
** ABSTRACT:
|
||||
**
|
||||
** This module contain the routines for processing procedures.
|
||||
**
|
||||
**--
|
||||
**/
|
||||
|
||||
|
||||
/*
|
||||
**
|
||||
** INCLUDE FILES
|
||||
**
|
||||
**/
|
||||
|
||||
#include "UilDefI.h"
|
||||
|
||||
|
||||
/*
|
||||
**
|
||||
** DEFINE and MACRO DEFINITIONS
|
||||
**
|
||||
**/
|
||||
|
||||
|
||||
|
||||
/*
|
||||
**
|
||||
** EXTERNAL VARIABLE DECLARATIONS
|
||||
**
|
||||
**/
|
||||
|
||||
|
||||
/*
|
||||
**
|
||||
** GLOBAL VARIABLE DECLARATIONS
|
||||
**
|
||||
**/
|
||||
|
||||
|
||||
/*
|
||||
**
|
||||
** OWN VARIABLE DECLARATIONS
|
||||
**
|
||||
**/
|
||||
|
||||
|
||||
/*
|
||||
**++
|
||||
** FUNCTIONAL DESCRIPTION:
|
||||
**
|
||||
** This function create the procedure definition entry symbol
|
||||
** node a procedure declaration.
|
||||
**
|
||||
** FORMAL PARAMETERS:
|
||||
**
|
||||
** id_frame ptr to token frame for the procedure name
|
||||
** param_frame ptr to token frame or null frame holding the
|
||||
** type of the argument
|
||||
** class_frame ptr to frame whose b_flags holds private, etc. info
|
||||
**
|
||||
** IMPLICIT INPUTS:
|
||||
**
|
||||
** sym_az_current_section_entry the "current" section list
|
||||
**
|
||||
** IMPLICIT OUTPUTS:
|
||||
**
|
||||
** none
|
||||
**
|
||||
** FUNCTION VALUE:
|
||||
**
|
||||
** void
|
||||
**
|
||||
** SIDE EFFECTS:
|
||||
**
|
||||
** errors may be issued for previously defined name
|
||||
**
|
||||
**--
|
||||
**/
|
||||
|
||||
void
|
||||
sar_create_procedure(XmConst yystype *id_frame,
|
||||
XmConst yystype *param_frame,
|
||||
XmConst yystype *class_frame,
|
||||
XmConst yystype *semi_frame)
|
||||
{
|
||||
sym_name_entry_type *name_entry;
|
||||
sym_proc_def_entry_type *proc_def_entry;
|
||||
sym_section_entry_type *section_entry;
|
||||
sym_obj_entry_type *obj_entry;
|
||||
|
||||
/*
|
||||
** Call standard routine to check name entry for id_frame.
|
||||
** This routine handles font name, color names, etc used as ids
|
||||
*/
|
||||
|
||||
name_entry = (sym_name_entry_type *) sem_dcl_name( id_frame );
|
||||
|
||||
if (name_entry == NULL)
|
||||
return;
|
||||
|
||||
/*
|
||||
** Allocate the procedure definition entry and fill it in
|
||||
*/
|
||||
|
||||
proc_def_entry = (sym_proc_def_entry_type *)
|
||||
sem_allocate_node (sym_k_proc_def_entry, sym_k_proc_def_entry_size);
|
||||
|
||||
proc_def_entry->b_widget_type = uil_max_object + 1;
|
||||
proc_def_entry->obj_header.az_name = (sym_name_entry_type *) name_entry;
|
||||
name_entry->az_object = (sym_entry_type *) proc_def_entry;
|
||||
|
||||
/*
|
||||
** Parameter frame has 4 cases:
|
||||
** 1) no argument checking desired
|
||||
** syntax: PROCEDURE id
|
||||
** 2) argument checking desired - no argument
|
||||
** syntax: PROCEDURE id( )
|
||||
** 3) argument checking desired - single argument
|
||||
** syntax: PROCEDURE id( type )
|
||||
** 4) argument checking desired - single typed widget argument
|
||||
** syntax: PROCEDURE id( CLASS_NAME )
|
||||
** These cases are distinguished as follows:
|
||||
** 1) tag = null type = 0
|
||||
** 2) tag = null type = sar_k_no_value
|
||||
** 3) tag = token type = argument type
|
||||
** 4) tag = object type = widget type
|
||||
*/
|
||||
|
||||
proc_def_entry->v_arg_checking = TRUE;
|
||||
|
||||
switch (param_frame->b_tag)
|
||||
{
|
||||
case sar_k_null_frame:
|
||||
if (param_frame->b_type == sym_k_no_value )
|
||||
{
|
||||
proc_def_entry->b_arg_count = 0;
|
||||
proc_def_entry->b_arg_type = sym_k_no_value;
|
||||
}
|
||||
else
|
||||
proc_def_entry->v_arg_checking = FALSE;
|
||||
|
||||
break;
|
||||
|
||||
case sar_k_token_frame:
|
||||
proc_def_entry->b_arg_type = param_frame->b_type;
|
||||
proc_def_entry->b_arg_count = 1;
|
||||
break;
|
||||
|
||||
case sar_k_object_frame:
|
||||
_assert((param_frame->b_type == sym_k_widget_entry),
|
||||
"object frame not widget entry");
|
||||
|
||||
obj_entry =
|
||||
(sym_obj_entry_type *)param_frame->value.az_symbol_entry;
|
||||
|
||||
proc_def_entry->b_arg_type = sym_k_widget_ref_value;
|
||||
proc_def_entry->b_arg_count = 1;
|
||||
proc_def_entry->b_widget_type = obj_entry->header.b_type;
|
||||
break;
|
||||
|
||||
default:
|
||||
_assert( FALSE, "param frame in error" );
|
||||
|
||||
}
|
||||
|
||||
/*
|
||||
** Process the class clause
|
||||
*/
|
||||
|
||||
switch (class_frame->b_flags)
|
||||
{
|
||||
case sym_m_exported:
|
||||
sym_make_external_def( name_entry );
|
||||
|
||||
case sym_m_private:
|
||||
case sym_m_imported:
|
||||
break;
|
||||
|
||||
default:
|
||||
_assert( FALSE, "class frame in error" );
|
||||
|
||||
}
|
||||
|
||||
proc_def_entry->obj_header.b_flags = class_frame->b_flags;
|
||||
|
||||
/*
|
||||
** save the source file info for this procedure entry
|
||||
*/
|
||||
_sar_save_source_info (&proc_def_entry->header, id_frame, semi_frame );
|
||||
sar_assoc_comment((sym_obj_entry_type *)proc_def_entry); /* preserve comments */
|
||||
|
||||
/*
|
||||
** allocate a section entry to link the proc_def entry into the structure
|
||||
*/
|
||||
section_entry = (sym_section_entry_type *) sem_allocate_node
|
||||
(sym_k_section_entry, sym_k_section_entry_size);
|
||||
|
||||
/*
|
||||
** Link this entry off of the current section list
|
||||
*/
|
||||
section_entry->next = (sym_entry_type *) sym_az_current_section_entry->entries;
|
||||
sym_az_current_section_entry->entries = (sym_entry_type *) section_entry;
|
||||
|
||||
section_entry->entries = (sym_entry_type *) proc_def_entry;
|
||||
|
||||
}
|
||||
|
||||
/*
|
||||
**++
|
||||
** FUNCTIONAL DESCRIPTION:
|
||||
**
|
||||
** This function processes a reference to a procedure.
|
||||
**
|
||||
** FORMAL PARAMETERS:
|
||||
**
|
||||
** id_frame ptr to token frame for the procedure name
|
||||
** value_frame ptr to token frame or null frame holding the
|
||||
** value of the argument to the procedure
|
||||
** context value indicating how the procedure is being used
|
||||
**
|
||||
** IMPLICIT INPUTS:
|
||||
**
|
||||
** none
|
||||
**
|
||||
** IMPLICIT OUTPUTS:
|
||||
**
|
||||
** none
|
||||
**
|
||||
** FUNCTION VALUE:
|
||||
**
|
||||
** a procedure reference entry / NULL in case of an illegal reference
|
||||
**
|
||||
** SIDE EFFECTS:
|
||||
**
|
||||
** errors may be issued
|
||||
**
|
||||
**--
|
||||
**/
|
||||
|
||||
sym_proc_ref_entry_type
|
||||
*sem_reference_procedure( yystype *id_frame,
|
||||
XmConst yystype *value_frame,
|
||||
XmConst int context )
|
||||
{
|
||||
sym_value_entry_type *value_entry;
|
||||
sym_proc_def_entry_type *proc_def_entry;
|
||||
sym_proc_ref_entry_type *proc_ref_entry;
|
||||
|
||||
/*
|
||||
** Call standard routine to check name entry for id_frame.
|
||||
** This routine handles font name, color names, etc used as ids
|
||||
*/
|
||||
|
||||
proc_def_entry =
|
||||
(sym_proc_def_entry_type *)
|
||||
sem_ref_name( id_frame, sym_k_proc_def_entry );
|
||||
|
||||
switch (value_frame->b_tag)
|
||||
{
|
||||
case sar_k_null_frame:
|
||||
value_entry = NULL;
|
||||
break;
|
||||
|
||||
case sar_k_value_frame:
|
||||
if ((value_frame->b_flags & sym_m_forward_ref) != 0)
|
||||
value_entry = NULL;
|
||||
else
|
||||
value_entry = (sym_value_entry_type *)
|
||||
value_frame->value.az_symbol_entry;
|
||||
break;
|
||||
|
||||
case sar_k_object_frame:
|
||||
value_entry =
|
||||
(sym_value_entry_type *) value_frame->value.az_symbol_entry;
|
||||
break;
|
||||
|
||||
default:
|
||||
_assert( FALSE, "actual arg in error" );
|
||||
}
|
||||
|
||||
/*
|
||||
** Allocate the procedure reference entry and fill it in
|
||||
*/
|
||||
|
||||
proc_ref_entry = (sym_proc_ref_entry_type *)
|
||||
sem_allocate_node (sym_k_proc_ref_entry, sym_k_proc_ref_entry_size);
|
||||
|
||||
if ((id_frame->b_flags & sym_m_forward_ref) != 0)
|
||||
sym_make_value_forward_ref (id_frame,
|
||||
(char*)&(proc_ref_entry->az_proc_def), sym_k_patch_list_add);
|
||||
else
|
||||
proc_ref_entry->az_proc_def = proc_def_entry;
|
||||
|
||||
if ((value_frame->b_flags & sym_m_forward_ref) != 0)
|
||||
sym_make_value_forward_ref (value_frame,
|
||||
(char*)&(proc_ref_entry->az_arg_value), sym_k_patch_add);
|
||||
else
|
||||
proc_ref_entry->az_arg_value = value_entry;
|
||||
|
||||
/*
|
||||
** Apply context constraints
|
||||
**
|
||||
** If this is a procedure being used as a user object,
|
||||
** it should not have any arguments. The arguments to such
|
||||
** a procedure are always a parent widget id and an argument list.
|
||||
** This constraint is currently inforced by the grammar.
|
||||
**
|
||||
** At this time the compiler permits all types of values for callback
|
||||
** arguments. This may be limited shortly when we see if it is
|
||||
** reasonable to pass fonts, colors, reasons, etc.
|
||||
*/
|
||||
|
||||
return proc_ref_entry;
|
||||
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
**++
|
||||
** FUNCTIONAL DESCRIPTION:
|
||||
**
|
||||
** This function checks to see if a object is defined with the name
|
||||
** corresponding to the id given in the first parameter.
|
||||
**
|
||||
** FORMAL PARAMETERS:
|
||||
**
|
||||
** id_frame ptr to a token frame on the parse stack holding the name
|
||||
** tag the type of construct needed
|
||||
**
|
||||
** IMPLICIT INPUTS:
|
||||
**
|
||||
** none
|
||||
**
|
||||
** IMPLICIT OUTPUTS:
|
||||
**
|
||||
** none
|
||||
**
|
||||
** FUNCTION VALUE:
|
||||
**
|
||||
** ptr to a symbol entry for construct or NULL
|
||||
**
|
||||
** SIDE EFFECTS:
|
||||
**
|
||||
** error message if the name is undefined or for a different construct
|
||||
** forward_ref bit may be turned on in id_frame
|
||||
**--
|
||||
**/
|
||||
|
||||
sym_entry_type
|
||||
*sem_ref_name(yystype *id_frame,
|
||||
XmConst int tag)
|
||||
{
|
||||
sym_name_entry_type *name_entry;
|
||||
sym_entry_type *symbol_entry;
|
||||
|
||||
_assert( id_frame->b_tag == sar_k_token_frame, "arg1 not id frame" );
|
||||
|
||||
/*
|
||||
** The id frame may hold a name or the keyword for a font name, color
|
||||
** name, reason name etc. If it is one of these special name, then
|
||||
** we must see if the symbol table holds a name for the special type.
|
||||
*/
|
||||
|
||||
if (id_frame->b_type != NAME)
|
||||
{
|
||||
name_entry =
|
||||
sym_find_name
|
||||
( id_frame->value.az_keyword_entry->b_length,
|
||||
id_frame->value.az_keyword_entry->at_name );
|
||||
|
||||
if (name_entry == NULL)
|
||||
{
|
||||
diag_issue_diagnostic
|
||||
( d_undefined,
|
||||
_sar_source_position( id_frame ),
|
||||
diag_tag_text( sym_k_proc_def_entry ),
|
||||
id_frame->value.az_keyword_entry->at_name );
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
}
|
||||
else
|
||||
name_entry =
|
||||
(sym_name_entry_type *) id_frame->value.az_symbol_entry;
|
||||
|
||||
/*
|
||||
** If the name entry already has no object linked from it, we are
|
||||
** referencing an undefined object.
|
||||
*/
|
||||
|
||||
symbol_entry = name_entry->az_object;
|
||||
|
||||
if (symbol_entry == NULL )
|
||||
{
|
||||
id_frame->b_flags |= sym_m_forward_ref;
|
||||
return NULL;
|
||||
}
|
||||
/*
|
||||
** If the name entry has the wrong type of object, this is also
|
||||
** an error.
|
||||
*/
|
||||
|
||||
if (symbol_entry->header.b_tag != tag )
|
||||
{
|
||||
diag_issue_diagnostic
|
||||
( d_ctx_req,
|
||||
_sar_source_position( id_frame ),
|
||||
diag_tag_text( tag ),
|
||||
diag_tag_text( symbol_entry->header.b_tag ) );
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
return symbol_entry;
|
||||
|
||||
}
|
||||
3848
cde/osf/uil/UilSarVal.c
Normal file
3848
cde/osf/uil/UilSarVal.c
Normal file
File diff suppressed because it is too large
Load Diff
275
cde/osf/uil/UilSemCSet.c
Normal file
275
cde/osf/uil/UilSemCSet.c
Normal file
@@ -0,0 +1,275 @@
|
||||
/*
|
||||
* @OSF_COPYRIGHT@
|
||||
* COPYRIGHT NOTICE
|
||||
* Copyright (c) 1990, 1991, 1992, 1993 Open Software Foundation, Inc.
|
||||
* ALL RIGHTS RESERVED (MOTIF). See the file named COPYRIGHT.MOTIF for
|
||||
* the full copyright text.
|
||||
*/
|
||||
/*
|
||||
* HISTORY
|
||||
*/
|
||||
#ifdef REV_INFO
|
||||
#ifndef lint
|
||||
static char rcsid[] = "$TOG: UilSemCSet.c /main/10 1997/03/12 15:21:53 dbl $"
|
||||
#endif
|
||||
#endif
|
||||
|
||||
/*
|
||||
* (c) Copyright 1989, 1990, DIGITAL EQUIPMENT CORPORATION, MAYNARD, MASS. */
|
||||
|
||||
/*
|
||||
**++
|
||||
** FACILITY:
|
||||
**
|
||||
** User Interface Language Compiler (UIL)
|
||||
**
|
||||
** ABSTRACT:
|
||||
**
|
||||
** This file contains and routines related to the semantics of
|
||||
** character sets.
|
||||
** semantic validation.
|
||||
**
|
||||
**--
|
||||
**/
|
||||
|
||||
|
||||
/*
|
||||
**
|
||||
** INCLUDE FILES
|
||||
**
|
||||
**/
|
||||
|
||||
#include <Xm/Xm.h>
|
||||
|
||||
#include "UilDefI.h"
|
||||
|
||||
/*
|
||||
**
|
||||
** DEFINE and MACRO DEFINITIONS
|
||||
**
|
||||
**/
|
||||
|
||||
|
||||
|
||||
/*
|
||||
**
|
||||
** EXTERNAL VARIABLE DECLARATIONS
|
||||
**
|
||||
**/
|
||||
|
||||
|
||||
/*
|
||||
**
|
||||
** GLOBAL VARIABLE DECLARATIONS
|
||||
**
|
||||
**/
|
||||
|
||||
|
||||
|
||||
/*
|
||||
**
|
||||
** OWN VARIABLE DECLARATIONS
|
||||
**
|
||||
**/
|
||||
|
||||
|
||||
|
||||
/*
|
||||
**++
|
||||
** FUNCTIONAL DESCRIPTION:
|
||||
**
|
||||
** This function returns a pointer to a character set name given
|
||||
** its sym_k_..._charset code and possibly a userdefined charset
|
||||
** value entry.
|
||||
**
|
||||
** FORMAL PARAMETERS:
|
||||
**
|
||||
** l_charset charset of the string (token value)
|
||||
** az_charset_entry charset of the string (symbol table value entry)
|
||||
**
|
||||
** IMPLICIT INPUTS:
|
||||
**
|
||||
** charset data tables
|
||||
**
|
||||
** IMPLICIT OUTPUTS:
|
||||
**
|
||||
** none
|
||||
**
|
||||
** FUNCTION VALUE:
|
||||
**
|
||||
** pointer to name (must NOT be freed)
|
||||
**
|
||||
** SIDE EFFECTS:
|
||||
**
|
||||
** error messages may be issued for objects that are still undefined
|
||||
** or of the wrong type
|
||||
**
|
||||
**--
|
||||
**/
|
||||
|
||||
char *sem_charset_name (l_charset, az_charset_entry)
|
||||
int l_charset;
|
||||
sym_value_entry_type *az_charset_entry;
|
||||
|
||||
{
|
||||
|
||||
int charset; /* mapped character set */
|
||||
|
||||
charset = sem_map_subclass_to_charset (l_charset);
|
||||
switch ( charset )
|
||||
{
|
||||
case sym_k_fontlist_default_tag:
|
||||
return XmFONTLIST_DEFAULT_TAG;
|
||||
case sym_k_userdefined_charset:
|
||||
/*
|
||||
** If the charset is user-defined, then fetch info from the symbol
|
||||
** table entry for it.
|
||||
*/
|
||||
_assert (az_charset_entry!=NULL, "null userdefined charset entry");
|
||||
return az_charset_entry->value.c_value;
|
||||
default:
|
||||
return charset_xmstring_names_table[charset];
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
/*
|
||||
**++
|
||||
** FUNCTIONAL DESCRIPTION:
|
||||
**
|
||||
** This function returns information about the character set specified
|
||||
** (writing direction and sixteen_bit properties).
|
||||
**
|
||||
** FORMAL PARAMETERS:
|
||||
**
|
||||
** l_charset charset of the string (token value)
|
||||
** az_charset_entry charset of the string (symbol table value entry)
|
||||
** direction string writing direction
|
||||
** sixteen_bit Boolean return value
|
||||
**
|
||||
** IMPLICIT INPUTS:
|
||||
**
|
||||
** none
|
||||
**
|
||||
** IMPLICIT OUTPUTS:
|
||||
**
|
||||
** none
|
||||
**
|
||||
** FUNCTION VALUE:
|
||||
**
|
||||
** none
|
||||
**
|
||||
** SIDE EFFECTS:
|
||||
**
|
||||
** none
|
||||
**
|
||||
**--
|
||||
**/
|
||||
|
||||
void sem_charset_info
|
||||
(l_charset, az_charset_entry, write_direction, parse_direction, sixteen_bit)
|
||||
|
||||
int l_charset;
|
||||
sym_value_entry_type *az_charset_entry;
|
||||
int *write_direction;
|
||||
int *parse_direction;
|
||||
int *sixteen_bit;
|
||||
|
||||
{
|
||||
|
||||
int charset; /* mapped character set */
|
||||
|
||||
charset = sem_map_subclass_to_charset (l_charset);
|
||||
switch (charset)
|
||||
{
|
||||
/*
|
||||
** If the charset is user-defined, then fetch info from the symbol
|
||||
** table entry for it.
|
||||
*/
|
||||
case sym_k_userdefined_charset:
|
||||
{
|
||||
*write_direction = az_charset_entry->b_direction;
|
||||
*parse_direction = az_charset_entry->b_direction;
|
||||
*sixteen_bit = (az_charset_entry->b_aux_flags &
|
||||
sym_m_sixteen_bit) != 0;
|
||||
break;
|
||||
}
|
||||
default:
|
||||
{
|
||||
*write_direction = charset_writing_direction_table[charset];
|
||||
*parse_direction = charset_parsing_direction_table[charset];
|
||||
if ( charset_character_size_table[charset] != sym_k_onebyte_charsize )
|
||||
*sixteen_bit = TRUE;
|
||||
else
|
||||
*sixteen_bit = FALSE;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
/*
|
||||
**++
|
||||
** FUNCTIONAL DESCRIPTION:
|
||||
**
|
||||
** This function returns the charset id corresponding to the
|
||||
** charset specified in a $LANG variable. User-defined character
|
||||
** sets are not recognized - it must be one available in the
|
||||
** the compiler tables.
|
||||
**
|
||||
** The name match is case-insensitive.
|
||||
**
|
||||
** FORMAL PARAMETERS:
|
||||
**
|
||||
** lang_charset string naming a character set
|
||||
**
|
||||
** IMPLICIT INPUTS:
|
||||
**
|
||||
** none
|
||||
**
|
||||
** IMPLICIT OUTPUTS:
|
||||
**
|
||||
** none
|
||||
**
|
||||
** FUNCTION VALUE:
|
||||
**
|
||||
** 0 no match - character set not found
|
||||
** >0 character set code from sym_k_..._charset.
|
||||
** sym_k_userdefined_charset is never returned.
|
||||
**
|
||||
**
|
||||
** SIDE EFFECTS:
|
||||
**
|
||||
** none
|
||||
**
|
||||
**--
|
||||
**/
|
||||
|
||||
int sem_charset_lang_name (lang_charset)
|
||||
char *lang_charset;
|
||||
|
||||
{
|
||||
|
||||
char uname[200]; /* upper-case character set name */
|
||||
int ndx; /* loop index */
|
||||
|
||||
|
||||
/*
|
||||
* Convert name to upper case, then search table (which is already in
|
||||
* upper case).
|
||||
*/
|
||||
strcpy (uname, lang_charset);
|
||||
for ( ndx=0 ; ndx<(int)strlen(uname) ; ndx++ )
|
||||
uname[ndx] = _upper (uname[ndx]);
|
||||
|
||||
for ( ndx=0 ; ndx<(int)charset_lang_table_max ; ndx++ )
|
||||
if ( strcmp(uname,charset_lang_names_table[ndx]) == 0 )
|
||||
return (int)charset_lang_codes_table[ndx];
|
||||
return 0;
|
||||
|
||||
}
|
||||
|
||||
|
||||
4728
cde/osf/uil/UilSemVal.c
Normal file
4728
cde/osf/uil/UilSemVal.c
Normal file
File diff suppressed because it is too large
Load Diff
142
cde/osf/uil/UilSrcDef.h
Normal file
142
cde/osf/uil/UilSrcDef.h
Normal file
@@ -0,0 +1,142 @@
|
||||
/*
|
||||
* @OSF_COPYRIGHT@
|
||||
* COPYRIGHT NOTICE
|
||||
* Copyright (c) 1990, 1991, 1992, 1993 Open Software Foundation, Inc.
|
||||
* ALL RIGHTS RESERVED (MOTIF). See the file named COPYRIGHT.MOTIF for
|
||||
* the full copyright text.
|
||||
*/
|
||||
/*
|
||||
* HISTORY
|
||||
*/
|
||||
/* $XConsortium: UilSrcDef.h /main/10 1995/07/14 09:38:34 drk $ */
|
||||
|
||||
/*
|
||||
* (c) Copyright 1989, 1990, DIGITAL EQUIPMENT CORPORATION, MAYNARD, MASS. */
|
||||
|
||||
/*
|
||||
**++
|
||||
** FACILITY:
|
||||
**
|
||||
** User Interface Language Compiler (UIL)
|
||||
**
|
||||
** ABSTRACT:
|
||||
**
|
||||
** This include file defines the interface to the UIL source
|
||||
** management procedures in the UIL compiler.
|
||||
**
|
||||
**--
|
||||
**/
|
||||
|
||||
#ifndef UilSrcDef_h
|
||||
#define UilSrcDef_h
|
||||
|
||||
|
||||
/*
|
||||
** Interface to src_open_source
|
||||
*/
|
||||
|
||||
#define src_k_open_normal 1 /* open succeeded */
|
||||
#define src_k_open_error 0 /* open was unsuccessful */
|
||||
|
||||
/*
|
||||
** Close return statuses
|
||||
*/
|
||||
|
||||
#define src_k_close_normal 1 /* close succeeded */
|
||||
#define src_k_close_error 0 /* close was unsuccessful */
|
||||
|
||||
/*
|
||||
** Interface to src_get_source_line
|
||||
*/
|
||||
|
||||
#define src_k_read_truncated 3 /* record truncated */
|
||||
#define src_k_read_error 2 /* error during read */
|
||||
#define src_k_read_normal 1 /* record read normally */
|
||||
#define src_k_end_source 0 /* end of source */
|
||||
|
||||
/*
|
||||
** Source records describe the lines of the source program. The are
|
||||
** used to retrieve the source file for the listing and diagnostics.
|
||||
** Diagnostics randomly access these data structures by maintaining
|
||||
** the address of the corresponding source record in tokens, the parse
|
||||
** stack and symbol table entries. The listing file walks the source
|
||||
** records via the linked list provide by ar_next_source_record.
|
||||
*/
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#define _src_null_access_key( _key ) (_key.l_key == EOF)
|
||||
#define src_k_key_length 4
|
||||
|
||||
typedef struct
|
||||
{
|
||||
unsigned long l_key;
|
||||
} z_key;
|
||||
|
||||
typedef struct _src_message_item_type
|
||||
{
|
||||
struct _src_message_item_type *az_next_message;
|
||||
status l_message_number;
|
||||
unsigned char b_source_pos;
|
||||
char c_text[ 1 ];
|
||||
} src_message_item_type;
|
||||
|
||||
#define src_message_item_type_size \
|
||||
(sizeof(src_message_item_type) -\
|
||||
sizeof( struct _src_message_item_type.c_text))
|
||||
|
||||
typedef struct _src_machine_code_type
|
||||
{
|
||||
struct _src_machine_code_type *az_next_machine_code;
|
||||
unsigned short int w_offset;
|
||||
unsigned short int w_code_len;
|
||||
union {
|
||||
long q_longdata[1]; /* longword alias for data*/
|
||||
char c_data[ 1 ]; /* byte alias for data */
|
||||
} data;
|
||||
} src_machine_code_type;
|
||||
|
||||
#define src_machine_code_type_size \
|
||||
(sizeof(src_machine_code_type) -\
|
||||
sizeof( struct _src_machine_code_type.c_text))
|
||||
|
||||
/*
|
||||
** Mask for bits in b_flags of the source record
|
||||
*/
|
||||
|
||||
#define src_m_form_feed (1<<0)
|
||||
#define src_m_unprintable_chars (1<<1)
|
||||
|
||||
typedef struct _src_source_record_type
|
||||
{
|
||||
struct _src_source_record_type *az_next_source_record;
|
||||
src_message_item_type *az_message_list;
|
||||
unsigned short w_line_number;
|
||||
unsigned char b_file_number;
|
||||
unsigned char b_flags;
|
||||
z_key z_access_key;
|
||||
src_machine_code_type *az_machine_code_list;
|
||||
unsigned short w_machine_code_cnt;
|
||||
} src_source_record_type;
|
||||
|
||||
/*
|
||||
** Source buffers describe the lines of the source program that are
|
||||
** currently being SCAN. Include files and macros a can cause a program
|
||||
** to have more than 1 source buffer. These buffers are managed as a
|
||||
** stack, implemented via a linked list.
|
||||
*/
|
||||
|
||||
typedef struct _src_source_buffer_type
|
||||
{
|
||||
struct _src_source_buffer_type *az_prior_source_buffer;
|
||||
unsigned short w_current_line_number;
|
||||
unsigned short w_current_position;
|
||||
char b_file_number;
|
||||
char c_text[ src_k_max_source_line_length+1];
|
||||
} src_source_buffer_type;
|
||||
|
||||
#endif /* UilSrcDef_h */
|
||||
/* DON'T ADD STUFF AFTER THIS #endif */
|
||||
1246
cde/osf/uil/UilSrcSrc.c
Normal file
1246
cde/osf/uil/UilSrcSrc.c
Normal file
File diff suppressed because it is too large
Load Diff
916
cde/osf/uil/UilSymDef.h
Normal file
916
cde/osf/uil/UilSymDef.h
Normal file
@@ -0,0 +1,916 @@
|
||||
/*
|
||||
* @OSF_COPYRIGHT@
|
||||
* COPYRIGHT NOTICE
|
||||
* Copyright (c) 1990, 1991, 1992, 1993 Open Software Foundation, Inc.
|
||||
* ALL RIGHTS RESERVED (MOTIF). See the file named COPYRIGHT.MOTIF for
|
||||
* the full copyright text.
|
||||
*/
|
||||
/*
|
||||
* HISTORY
|
||||
*/
|
||||
/* $XConsortium: UilSymDef.h /main/12 1995/07/14 09:38:52 drk $ */
|
||||
|
||||
/*
|
||||
* (c) Copyright 1989, 1990, DIGITAL EQUIPMENT CORPORATION, MAYNARD, MASS. */
|
||||
|
||||
/*
|
||||
**++
|
||||
** FACILITY:
|
||||
**
|
||||
** User Interface Language Compiler (UIL)
|
||||
**
|
||||
** ABSTRACT:
|
||||
**
|
||||
** This include file defines the interface to the UIL symbol table.
|
||||
**
|
||||
**--
|
||||
**/
|
||||
|
||||
#ifndef UilSymDef_h
|
||||
#define UilSymDef_h
|
||||
|
||||
/*
|
||||
**
|
||||
** INCLUDE FILES
|
||||
**
|
||||
**/
|
||||
|
||||
#include <Mrm/MrmPublic.h>
|
||||
#include <Xm/Xm.h>
|
||||
|
||||
/*
|
||||
** constraint check access macro
|
||||
*/
|
||||
#define _constraint_check(arg) \
|
||||
(constraint_tab[((arg)-1)/8] & (1 << ((arg)-1)%8))
|
||||
|
||||
/*
|
||||
** Hash table size
|
||||
*/
|
||||
|
||||
/* MOVED TO DBDef.h */
|
||||
|
||||
/*
|
||||
** Symbol tags. These values are used in the tag field of every object header
|
||||
** to identify the type of the entry.
|
||||
*/
|
||||
|
||||
/* MOVED TO DBDef.h */
|
||||
|
||||
|
||||
/*
|
||||
** Common attribute masks -- These values are used in the b_flags field of
|
||||
** the object_header.
|
||||
*/
|
||||
|
||||
/* MOVED TO DBDef.h */
|
||||
|
||||
|
||||
/*
|
||||
** Output states - order is important
|
||||
*/
|
||||
|
||||
/* MOVED TO DBDef.h */
|
||||
|
||||
|
||||
|
||||
/*
|
||||
** Constants to define compiler-recognized data types. It is
|
||||
** important that the names used in .wml language descriptions
|
||||
** match these names. These values were once automatically generated
|
||||
** by WML. They are now maintained by hand to reduce compiler
|
||||
** dependence on WML artifacts.
|
||||
*/
|
||||
/* MOVED TO DBDef.h */
|
||||
|
||||
|
||||
|
||||
/*
|
||||
** Header for each symbol entry
|
||||
*/
|
||||
|
||||
typedef struct
|
||||
{
|
||||
char b_tag;
|
||||
/* type of entry The values of this field ia a sym_k_XXX_entry as */
|
||||
/* defined above. */
|
||||
char b_type;
|
||||
/* generic subtype field usage depends on value of b_tag field */
|
||||
/* above (sym_k_value_entry -> b_type is a sym_k_XXX_value as */
|
||||
/* defined in UilSymGen.h, sym_k_list_entry -> b_type is a */
|
||||
/* sym_k_XXX_list as defined below, sym_k_widget_entry -> b_type */
|
||||
/* is a sym_k_XXX_object as defined in UilSymGen.h, */
|
||||
/* sym_k_child_entry -> b_type is a sym_k_XXX_child as defined in */
|
||||
/* UilSymGen.h, sym_k_section_entry -> b_type is a */
|
||||
/* sym_k_XXX_section as defined below). */
|
||||
/* */
|
||||
unsigned short w_node_size;
|
||||
/* size of the node in longwords */
|
||||
int user_data;
|
||||
/* not used directly by the compiler. It is for use by */
|
||||
/* applications making use of callable UIL only. */
|
||||
|
||||
/*
|
||||
** Fields to save source information about the symbol: We currently save
|
||||
** five things. The source record where the symbol "begins" (begins is in
|
||||
** quotes because this may point to just white space before the actual
|
||||
** symbol), the position (character) within that record where the symbol
|
||||
** begins, the source record where the symbol ends, the position within
|
||||
** that record that symbol really begins (i.e. no white space or anything),
|
||||
** and the position where the symbol definition ends.
|
||||
*/
|
||||
|
||||
struct _src_source_record_type *az_src_rec;
|
||||
/* Source record where symbol defined */
|
||||
unsigned char b_src_pos;
|
||||
/* Starting position within the source record */
|
||||
unsigned char b_end_pos;
|
||||
/* Ending position within the source record */
|
||||
|
||||
} sym_entry_header_type;
|
||||
|
||||
|
||||
|
||||
/*
|
||||
** Common view of a symbol entry
|
||||
*/
|
||||
|
||||
typedef struct
|
||||
{
|
||||
sym_entry_header_type header;
|
||||
/* common part of all symbol entries. */
|
||||
char b_value[ 1 ];
|
||||
/* information specific to each different entry type. */
|
||||
} sym_entry_type;
|
||||
|
||||
|
||||
|
||||
/*
|
||||
** Name entry
|
||||
*/
|
||||
|
||||
/* Flags for name entries */
|
||||
|
||||
#define sym_m_referenced (1 << 0)
|
||||
/* Used in the b_flags field of a name entry. Set if this name is */
|
||||
/* reference elsewhere in this UIL source module. */
|
||||
#define sym_m_cycle_checked (1 << 1)
|
||||
/* set if the widget entry for this name has been checked for */
|
||||
/* cyclic references. */
|
||||
#define sym_m_has_cycle (2 << 1)
|
||||
/* set if a cycle was detected for a widget entry */
|
||||
#define sym_m_charset (1 << 3)
|
||||
/* set if symbol being used as charset name. */
|
||||
|
||||
typedef struct _sym_name_entry_type
|
||||
{
|
||||
sym_entry_header_type header;
|
||||
/* common header */
|
||||
sym_entry_type *az_object;
|
||||
/* pointer to the object entry with this name */
|
||||
struct _sym_name_entry_type *az_next_name_entry;
|
||||
/* next name on hash chain */
|
||||
struct _sym_name_entry_type *az_prev_name_entry;
|
||||
/* prev name on hash chain */
|
||||
int az_cycle_id;
|
||||
/* unique id for each cycle check */
|
||||
unsigned char b_flags;
|
||||
/* flags (possible value is sym_m_referenced as declared above) */
|
||||
char c_text[ 1 ];
|
||||
/* text of the name */
|
||||
} sym_name_entry_type;
|
||||
|
||||
/*
|
||||
** Size of the fixed part of a name entry
|
||||
*/
|
||||
|
||||
#define sym_k_name_entry_size (sizeof( sym_name_entry_type)- \
|
||||
sizeof( char[ 1 ]) )
|
||||
|
||||
|
||||
/*
|
||||
** Value entry
|
||||
*/
|
||||
|
||||
/*
|
||||
** Types of values are included in UilSymDef.h
|
||||
*/
|
||||
|
||||
/*
|
||||
** Charsets supported by UIL are defined via WML in UilSymGen.h
|
||||
*/
|
||||
|
||||
|
||||
|
||||
/*
|
||||
** Common header for each "object" entry. This header is shared by all
|
||||
** widget, gadget, list, argument, callback, and control node types. It
|
||||
** always appears immediately following the standard entry header field. Also
|
||||
** defined here is a prototype node for these types of "object" entries.
|
||||
*/
|
||||
|
||||
typedef struct
|
||||
{
|
||||
sym_name_entry_type * az_name;
|
||||
/* pointer to the name entry that holds the object name. */
|
||||
sym_entry_type * az_reference;
|
||||
/* pointer to the entry that references this object. */
|
||||
sym_entry_type * az_next;
|
||||
/* pointer to next entry in a list, if this entry is linked under */
|
||||
/* a list entry. */
|
||||
char * az_comment;
|
||||
/* pointer to comment entry associated with this object. */
|
||||
unsigned int b_flags;
|
||||
/* object flags. */
|
||||
} sym_obj_header_type;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
sym_entry_header_type header;
|
||||
/* common entry header */
|
||||
sym_obj_header_type obj_header;
|
||||
/* common object header */
|
||||
} sym_obj_entry_type;
|
||||
|
||||
|
||||
|
||||
/*
|
||||
** This structure defines an element in a color table. A color table contains
|
||||
** an array of such elements.
|
||||
*/
|
||||
|
||||
typedef struct
|
||||
{
|
||||
unsigned char b_letter;
|
||||
/* letter for this color */
|
||||
unsigned char b_index;
|
||||
/* index for this color */
|
||||
unsigned short w_desc_offset;
|
||||
/* descriptor offset at in context */
|
||||
struct _sym_value_entry_type *az_color;
|
||||
/* pointer to the value entry for this color */
|
||||
|
||||
} sym_color_element;
|
||||
|
||||
|
||||
/*
|
||||
** This structure defines the data for an icon.
|
||||
*/
|
||||
|
||||
typedef struct
|
||||
{
|
||||
unsigned short w_height;
|
||||
/* height in pixels of the icon */
|
||||
unsigned short w_width;
|
||||
/* width in pixels of the icon */
|
||||
struct _sym_value_entry_type *az_color_table;
|
||||
/* pointer to the value entry for the color table */
|
||||
struct _sym_value_entry_type *az_rows;
|
||||
/* pointer to the list of icon rows */
|
||||
|
||||
} sym_icon_element;
|
||||
|
||||
/*
|
||||
** This structure define an enumeration set entry
|
||||
*/
|
||||
|
||||
/* MOVED TO DBDef.h */
|
||||
|
||||
|
||||
/*
|
||||
** Auxiliary sym_k_flags for values stored in b_aux_flags field
|
||||
*/
|
||||
|
||||
#define sym_m_table_entry (1 << 0)
|
||||
/* This item is a component of table */
|
||||
#define sym_m_separate (1 << 2)
|
||||
/* add CDA separator to end of string */
|
||||
#define sym_m_sixteen_bit sym_m_separate
|
||||
/* character set is 16-bit */
|
||||
#define sym_m_exp_eval (1 << 3)
|
||||
/* if set, indicates that expression has already been evaluated */
|
||||
|
||||
/*
|
||||
** Types of colors - stored in b_arg_type
|
||||
*/
|
||||
|
||||
#define sym_k_unspecified_color 0
|
||||
#define sym_k_background_color 1
|
||||
/* This color should displayed in the background on a monochrome */
|
||||
/* display. */
|
||||
#define sym_k_foreground_color 2
|
||||
/* This color should displayed in the foreground on a monochrome */
|
||||
/* display. */
|
||||
|
||||
/*
|
||||
** value sets defining expression operators
|
||||
*/
|
||||
|
||||
/* MOVED TO DBDef.h */
|
||||
|
||||
typedef struct _sym_value_entry_type
|
||||
{
|
||||
sym_entry_header_type header;
|
||||
/* common header */
|
||||
sym_obj_header_type obj_header;
|
||||
/* common header for objects */
|
||||
unsigned char b_type;
|
||||
/* b_type distinguishes usage. Possible values are sym_k_XXX_value */
|
||||
/* as defined in UilSymGen.h */
|
||||
unsigned short w_length;
|
||||
/* length for variable length types */
|
||||
char output_state;
|
||||
/* output_state (only byte is needed) */
|
||||
unsigned char b_table_count;
|
||||
/* number of strings in table, colors in a color table, or fonts in */
|
||||
/* a font table. */
|
||||
unsigned char b_aux_flags;
|
||||
/* auxiliary flags */
|
||||
unsigned char b_arg_type;
|
||||
/* type of argument value or monochrome treatment of a color */
|
||||
unsigned char b_data_offset;
|
||||
/* offset of bits in context for an icon */
|
||||
unsigned char b_pixel_type;
|
||||
/* pixel size encoding of an icon */
|
||||
unsigned char b_charset;
|
||||
/* character set of a string */
|
||||
unsigned char b_direction;
|
||||
/* writing direction of a string, from XmSTRING_DIRECTION_... */
|
||||
unsigned char b_max_index;
|
||||
/* max index in a color table */
|
||||
unsigned char b_expr_opr;
|
||||
/* operator for an expression value node */
|
||||
unsigned int l_circular_ref_chk;
|
||||
/* field to mark when checking for circular references */
|
||||
unsigned short int b_enumeration_value_code;
|
||||
/* if non-0, the node takes its value from the value of the */
|
||||
/* sym_k_..._enumval code in this field (currently integer) */
|
||||
MrmResource_id resource_id;
|
||||
/*
|
||||
resource id for private values. */
|
||||
|
||||
/* Structure for different kinds of nodes pointing to other value nodes */
|
||||
struct _sym_value_entry_type * az_charset_value;
|
||||
/* pointer to value entry describing a userdefined charset. */
|
||||
/* Valid only when b_charset == sym_k_userdefined_charset */
|
||||
struct _sym_value_entry_type * az_next_table_value;
|
||||
/* next element for tables. */
|
||||
struct _sym_value_entry_type *az_first_table_value;
|
||||
/* pointer to first table entry (font, string, etc.) if */
|
||||
/* value is a table. */
|
||||
struct _sym_value_entry_type * az_exp_op1;
|
||||
struct _sym_value_entry_type * az_exp_op2;
|
||||
/* pointer to the one or two value operands of an */
|
||||
/* expression value node. Special operands have an */
|
||||
/* explicitly state semantic. */
|
||||
|
||||
/* Union for the actual value of a value node */
|
||||
union _sym_value_entry_value_union
|
||||
{
|
||||
/* must be capable of holding a pointer, chs */
|
||||
long l_integer;
|
||||
/* value if an integer. */
|
||||
double d_real;
|
||||
/* value if a double float. */
|
||||
char *c_value;
|
||||
/* value of ASCIZ string */
|
||||
XmString xms_value;
|
||||
/* value of XmString */
|
||||
float single_float;
|
||||
/* value if a single float */
|
||||
sym_color_element *z_color;
|
||||
/* value if color table. */
|
||||
sym_icon_element *z_icon;
|
||||
/* value if icon */
|
||||
char *az_data;
|
||||
/* pointer to any other kind of allocated data */
|
||||
} value;
|
||||
} sym_value_entry_type;
|
||||
|
||||
|
||||
/*
|
||||
** Define the fixed size of the value entry structure
|
||||
*/
|
||||
|
||||
#define sym_k_value_entry_size (sizeof(sym_value_entry_type))
|
||||
|
||||
|
||||
/*
|
||||
** List entry
|
||||
*/
|
||||
|
||||
/*
|
||||
** The types of lists, values for the header.b_type field of a list entry.
|
||||
*/
|
||||
|
||||
#define sym_k_error_list sym_k_error_entry
|
||||
#define sym_k_callback_list sym_k_callback_entry
|
||||
#define sym_k_argument_list sym_k_argument_entry
|
||||
#define sym_k_control_list sym_k_control_entry
|
||||
#define sym_k_proc_ref_list sym_k_proc_ref_entry
|
||||
|
||||
typedef struct _sym_list_entry_type
|
||||
{
|
||||
sym_entry_header_type header;
|
||||
/* common header */
|
||||
sym_obj_header_type obj_header;
|
||||
/* common header for objects */
|
||||
unsigned short w_count;
|
||||
/* number of elements in the list. */
|
||||
unsigned short w_gadget_count;
|
||||
/* number of gadgets in the list. */
|
||||
} sym_list_entry_type;
|
||||
|
||||
/*
|
||||
** Define the size of the list structure
|
||||
*/
|
||||
|
||||
#define sym_k_list_entry_size (sizeof(sym_list_entry_type))
|
||||
|
||||
|
||||
|
||||
/*
|
||||
** Nested List entry
|
||||
*/
|
||||
|
||||
/*
|
||||
** A nested list entry appears in a list as the entry specifying a reference
|
||||
** to another list (a nested list reference). It has its b_type field set
|
||||
** to the list type (necessarily the same type as the list it is contained
|
||||
** in, and the list it points to). The az_next field locates the next list
|
||||
** element, as usual. The az_list field points to the list entry for the
|
||||
** list which is referenced.
|
||||
*/
|
||||
|
||||
typedef struct _sym_nested_list_entry_type
|
||||
{
|
||||
sym_entry_header_type header;
|
||||
/* common header */
|
||||
sym_obj_header_type obj_header;
|
||||
/* common header for objects */
|
||||
sym_list_entry_type *az_list;
|
||||
/* pointer to the referenced list */
|
||||
} sym_nested_list_entry_type;
|
||||
|
||||
/*
|
||||
** Define the size of the nested_list structure
|
||||
*/
|
||||
|
||||
#define sym_k_nested_list_entry_size (sizeof(sym_nested_list_entry_type))
|
||||
|
||||
|
||||
|
||||
/*
|
||||
** Argument entry
|
||||
*/
|
||||
|
||||
typedef struct _sym_argument_entry_type
|
||||
{
|
||||
sym_entry_header_type header;
|
||||
/* common entry header */
|
||||
sym_obj_header_type obj_header;
|
||||
/* common object header */
|
||||
sym_value_entry_type * az_arg_name;
|
||||
/* pointer to the value entry containing the argument name. */
|
||||
sym_value_entry_type * az_arg_value;
|
||||
/* pointer to the value entry containing the argument value. */
|
||||
} sym_argument_entry_type;
|
||||
|
||||
#define sym_k_argument_entry_size (sizeof(sym_argument_entry_type))
|
||||
|
||||
|
||||
/*
|
||||
** Procedure Definition Entry
|
||||
*/
|
||||
|
||||
typedef struct
|
||||
{
|
||||
sym_entry_header_type header;
|
||||
/* common header. */
|
||||
sym_obj_header_type obj_header;
|
||||
/* common header for objects */
|
||||
unsigned char v_arg_checking;
|
||||
/* should argument type be checked. */
|
||||
unsigned char b_arg_count;
|
||||
/* number of arguments. */
|
||||
unsigned char b_arg_type;
|
||||
/* The type of single argument (tag) for this procedure. It should */
|
||||
/* be a sym_k_XXX_value as defined in UilDBDef.h. */
|
||||
unsigned char b_widget_type;
|
||||
/* If b_arg_type is sym_k_widget_ref_value, then this field should */
|
||||
/* be a sym_k_XXX_object as defined in UilSymGen.h or */
|
||||
/* (uil_max_object + 1) if the type is unspecified. */
|
||||
} sym_proc_def_entry_type;
|
||||
|
||||
#define sym_k_proc_def_entry_size (sizeof( sym_proc_def_entry_type))
|
||||
|
||||
|
||||
/*
|
||||
** Procedure Reference Entry
|
||||
*/
|
||||
|
||||
typedef struct
|
||||
{
|
||||
sym_entry_header_type header;
|
||||
/* common header. */
|
||||
sym_obj_header_type obj_header;
|
||||
/* common object header. */
|
||||
sym_proc_def_entry_type *az_proc_def;
|
||||
/* pointer to the procedure definition entry for the procedure to */
|
||||
/* be called. */
|
||||
sym_value_entry_type *az_arg_value;
|
||||
/* pointer to the value entry for the argument to be passed as the */
|
||||
/* callback tag to the procedure. */
|
||||
} sym_proc_ref_entry_type;
|
||||
|
||||
#define sym_k_proc_ref_entry_size (sizeof( sym_proc_ref_entry_type))
|
||||
|
||||
|
||||
/*
|
||||
** These values are passed from the grammar to the semantic action routines
|
||||
** (SAR) to identify how the procedure is used.
|
||||
*/
|
||||
#define sym_k_callback_proc 1
|
||||
/* The procedure was used as a callback routine. */
|
||||
#define sym_k_object_proc 2
|
||||
/* The procedure was used as a creation routine for a user defined */
|
||||
/* widget */
|
||||
|
||||
|
||||
/*
|
||||
** Callback entry
|
||||
*/
|
||||
|
||||
typedef struct _sym_callback_entry_type
|
||||
{
|
||||
sym_entry_header_type header;
|
||||
/* common entry header. */
|
||||
sym_obj_header_type obj_header;
|
||||
/* common object header. */
|
||||
sym_value_entry_type * az_call_reason_name;
|
||||
/* pointer to the value entry containing the reason (callback) name */
|
||||
sym_proc_ref_entry_type * az_call_proc_ref;
|
||||
/* pointer to the procedure reference to be invoked for this */
|
||||
/* callback reason. */
|
||||
sym_list_entry_type * az_call_proc_ref_list;
|
||||
/* list entry of procedure references when multiple callbacks are */
|
||||
/* used for the callback. */
|
||||
} sym_callback_entry_type;
|
||||
|
||||
#define sym_k_callback_entry_size (sizeof(sym_callback_entry_type))
|
||||
|
||||
|
||||
/*
|
||||
** Parent list for widgets and gadgets
|
||||
**
|
||||
** This list contains pointers to each of the widgets and gadgets that
|
||||
** reference the current widget in their control list. This information is
|
||||
** required in order to check constraint arguments.
|
||||
*/
|
||||
|
||||
typedef struct _sym_parent_list_type
|
||||
{
|
||||
sym_entry_header_type header;
|
||||
/* common entry header */
|
||||
struct _sym_widget_entry_type * parent;
|
||||
/* pointer to a widget entry that references the originating widget */
|
||||
/* in its controls list. */
|
||||
struct _sym_parent_list_type * next;
|
||||
/* pointer to next parent list entry. */
|
||||
} sym_parent_list_type;
|
||||
|
||||
#define sym_k_parent_list_size (sizeof(sym_parent_list_type))
|
||||
|
||||
|
||||
|
||||
/*
|
||||
** Widget entry and Gadget entry
|
||||
**
|
||||
** Gadgets have the same form as a widget. They are distinguished
|
||||
** simply by the setting of sym_m_obj_is_gadget in obj_header.b_flags .
|
||||
*/
|
||||
|
||||
|
||||
|
||||
/* widget and gadget node structure. */
|
||||
|
||||
typedef struct _sym_widget_entry_type
|
||||
{
|
||||
sym_entry_header_type header;
|
||||
/* common entry header */
|
||||
sym_obj_header_type obj_header;
|
||||
/* common object header */
|
||||
sym_list_entry_type * az_callbacks;
|
||||
/* pointer to a list entry of type sym_k_callback_list which */
|
||||
/* contains the callbacks for this widget. */
|
||||
sym_list_entry_type * az_arguments;
|
||||
/* pointer to a list entry of type sym_k_argument_list which */
|
||||
/* contains the arguments for this widget. */
|
||||
sym_list_entry_type * az_controls;
|
||||
/* pointer to a list entry of type sym_k_controls_list which */
|
||||
/* contains the widgets that are children (are controlled by) this */
|
||||
/* widget. */
|
||||
sym_proc_ref_entry_type * az_create_proc;
|
||||
/* for user_defined widgets this points to the procedure reference */
|
||||
/* entry that specifies the creation routine for the widget. */
|
||||
sym_parent_list_type * parent_list;
|
||||
/* pointer to a parent list entry that links all objects which */
|
||||
/* reference this object in there controls lists. It is used to */
|
||||
/* traverse through the parents to verify that all contraint */
|
||||
/* arguments specified on this widget are really inherited from one */
|
||||
/* of its parents. */
|
||||
int output_state;
|
||||
/* Used when generating the UID file. Possible values: */
|
||||
/* sym_k_queued, sym_k_emitted, sym_k_not_processed. (only a byte */
|
||||
/* is needed). */
|
||||
MrmResource_id resource_id;
|
||||
/* The resource id if the object is private. This is used when */
|
||||
/* generating the UID file. */
|
||||
} sym_widget_entry_type;
|
||||
|
||||
#define sym_k_widget_entry_size (sizeof(sym_widget_entry_type))
|
||||
|
||||
|
||||
|
||||
/*
|
||||
** Control entry
|
||||
*/
|
||||
|
||||
/*
|
||||
** Control flags -- These are additional values that may occur in the b_flags
|
||||
** field for control entries. NOTE: Must not overlap common flags defined
|
||||
** above.
|
||||
*/
|
||||
|
||||
#define sym_m_def_in_progress (1 << 6)
|
||||
/* used in all lists. */
|
||||
#define sym_m_managed (1 << 7)
|
||||
/* This bit is set when the controlled object is to be managed. */
|
||||
#define sym_m_obj_is_reference (1 << 8)
|
||||
#define sym_m_forward_ref (1 << 9)
|
||||
/* This bit is set if the item is a forward reference not yet resolved*/
|
||||
#define sym_m_validated (1 << 10)
|
||||
/* Used for widgets to indicate if it has been validated */
|
||||
|
||||
|
||||
/* Control node structure. */
|
||||
|
||||
typedef struct _sym_control_entry_type
|
||||
{
|
||||
sym_entry_header_type header;
|
||||
/* common entry header */
|
||||
sym_obj_header_type obj_header;
|
||||
/* common object header */
|
||||
sym_widget_entry_type * az_con_obj;
|
||||
/* pointer to the widget entry that is controlled by this widget. */
|
||||
} sym_control_entry_type;
|
||||
|
||||
#define sym_k_control_entry_size (sizeof(sym_control_entry_type))
|
||||
|
||||
|
||||
|
||||
/*
|
||||
** External Definition Entry
|
||||
*/
|
||||
|
||||
typedef struct _sym_external_def_entry_type
|
||||
{
|
||||
sym_entry_header_type header;
|
||||
/* common header */
|
||||
struct _sym_external_def_entry_type *az_next_object;
|
||||
/* pointer next external definition entry. */
|
||||
sym_name_entry_type *az_name;
|
||||
/* pointer to the name entry for the external object. */
|
||||
} sym_external_def_entry_type;
|
||||
|
||||
#define sym_k_external_def_entry_size (sizeof( sym_external_def_entry_type))
|
||||
|
||||
|
||||
/*
|
||||
** Forward Reference Entry
|
||||
*/
|
||||
|
||||
typedef struct _sym_forward_ref_entry_type
|
||||
{
|
||||
sym_entry_header_type header;
|
||||
/* common header. The b_type field holds the object type. */
|
||||
struct _sym_forward_ref_entry_type *az_next_ref;
|
||||
/* pointer to the next forward reference entry. */
|
||||
char *a_update_location;
|
||||
/* address of the longword field in the referencing entry that */
|
||||
/* needs to be updated with the address of the widget entry that */
|
||||
/* this forward reference entry was created for. When this forward */
|
||||
/* reference entry is processed in UilP2Reslv.c, then the widget */
|
||||
/* named in the az_name field will be defined and it can be */
|
||||
/* assigned directly into the a_update_location. */
|
||||
sym_name_entry_type *az_name;
|
||||
/* pointer to the name entry for the widget being referenced before */
|
||||
/* it has been defined. */
|
||||
sym_widget_entry_type *parent;
|
||||
/* pointer to the widget entry of the parent of the forward */
|
||||
/* referenced object. */
|
||||
} sym_forward_ref_entry_type;
|
||||
|
||||
#define sym_k_forward_ref_entry_size (sizeof( sym_forward_ref_entry_type))
|
||||
|
||||
|
||||
/*
|
||||
** Forward Reference Entry
|
||||
*/
|
||||
|
||||
#define sym_k_patch_add 1
|
||||
#define sym_k_bind_value_name 2
|
||||
#define sym_k_patch_list_add 3
|
||||
|
||||
typedef struct _sym_val_forward_ref_entry_type
|
||||
{
|
||||
sym_entry_header_type header;
|
||||
/* common header. The b_type field holds the expected value type. */
|
||||
struct _sym_val_forward_ref_entry_type *az_next_ref;
|
||||
/* pointer to the next forward reference entry. */
|
||||
char *a_update_location;
|
||||
/* address of the longword field in the referencing entry that */
|
||||
/* needs to be updated with the address of the value entry that */
|
||||
/* this forward reference entry was created for. When this forward */
|
||||
/* reference entry is processed in UilP2Reslv.c, then the value */
|
||||
/* named in the az_name field will be defined and it can be */
|
||||
/* assigned directly into the a_update_location. */
|
||||
sym_name_entry_type *az_name;
|
||||
/* pointer to the name entry for the value being referenced before */
|
||||
/* it has been defined. */
|
||||
unsigned char fwd_ref_flags;
|
||||
/* flags used to indicate how to process entry on forward reference */
|
||||
/* chain. */
|
||||
} sym_val_forward_ref_entry_type;
|
||||
|
||||
#define sym_k_val_forward_ref_entry_size (sizeof( sym_val_forward_ref_entry_type))
|
||||
|
||||
|
||||
/*
|
||||
** Default object entry. Pointed to from the module entry. The first one in
|
||||
** the list contains source information for the "OBJECTS = " text. The 'next'
|
||||
** field is a pointer to a list which contains the data on the actual clauses.
|
||||
*/
|
||||
|
||||
typedef struct _sym_def_obj_entry_type
|
||||
{
|
||||
sym_entry_header_type header;
|
||||
/* common header */
|
||||
struct _sym_def_obj_entry_type *next;
|
||||
/* pointer to next default object entry in the list. */
|
||||
char b_object_info;
|
||||
char b_variant_info;
|
||||
} sym_def_obj_entry_type;
|
||||
|
||||
#define sym_k_def_obj_entry_size (sizeof( sym_def_obj_entry_type))
|
||||
|
||||
|
||||
|
||||
/*
|
||||
** Module entry (only 1 per compilation)
|
||||
*/
|
||||
|
||||
typedef struct _sym_module_entry_type
|
||||
{
|
||||
sym_entry_header_type header;
|
||||
/* common header */
|
||||
sym_obj_header_type obj_header;
|
||||
/* common header for objects */
|
||||
sym_value_entry_type *az_version;
|
||||
/* pointer to the value entry containing version string for the */
|
||||
/* module (version clause). */
|
||||
sym_value_entry_type *az_character_set;
|
||||
/* pointer to the value entry containing the default character set */
|
||||
/* information for the module (character set clause). */
|
||||
sym_value_entry_type *az_case_sense;
|
||||
/* pointer to the value entry containing the value of the module */
|
||||
/* case sensitivity clause. */
|
||||
sym_def_obj_entry_type *az_def_obj;
|
||||
/* pointer to the default object type specified in the module */
|
||||
/* default object variant clause. */
|
||||
} sym_module_entry_type;
|
||||
|
||||
#define sym_k_module_entry_size (sizeof( sym_module_entry_type))
|
||||
|
||||
|
||||
/*
|
||||
** Section entry
|
||||
*/
|
||||
|
||||
/*
|
||||
** Posiblilities for header.b_type when header.b_tag is sym_k_section_entry.
|
||||
*/
|
||||
|
||||
#define sym_k_list_section 1
|
||||
/* list section */
|
||||
#define sym_k_procedure_section 2
|
||||
/* procedure section */
|
||||
#define sym_k_value_section 3
|
||||
/* value section */
|
||||
#define sym_k_identifier_section 4
|
||||
/* identifier section */
|
||||
#define sym_k_object_section 5
|
||||
/* widget/gadget section */
|
||||
#define sym_k_include_section 6
|
||||
/* include directive */
|
||||
#define sym_k_section_tail 7
|
||||
/* This section has no corresponding UIL construct and exists only */
|
||||
/* to aid in saving source information */
|
||||
|
||||
|
||||
|
||||
typedef struct _sym_section_entry_type
|
||||
{
|
||||
sym_entry_header_type header;
|
||||
/* common header */
|
||||
struct _sym_section_entry_type *prev_section;
|
||||
/* previous section "LIST". */
|
||||
sym_entry_type *next;
|
||||
/* pointer to the entry for the next section _OR_ next child. */
|
||||
sym_entry_type *entries;
|
||||
/* points to entries in the section _OR_ the entry in the symbol */
|
||||
/* table for this child. */
|
||||
} sym_section_entry_type;
|
||||
|
||||
#define sym_k_section_entry_size (sizeof (sym_section_entry_type))
|
||||
|
||||
|
||||
/*
|
||||
** Include file entry
|
||||
*/
|
||||
|
||||
typedef struct _sym_include_file_entry_type
|
||||
{
|
||||
sym_entry_header_type header;
|
||||
/* common header */
|
||||
sym_section_entry_type *sections;
|
||||
/* pointer to a section list; this list is all of the sections that */
|
||||
/* exist in this include file. */
|
||||
char file_name[255];
|
||||
/* the file name as specified in the include statement in the UIL */
|
||||
/* source. */
|
||||
char full_file_name[255];
|
||||
/* the expanded name for the include file actually opened. */
|
||||
} sym_include_file_entry_type;
|
||||
|
||||
#define sym_k_include_file_entry_size (sizeof( sym_include_file_entry_type))
|
||||
|
||||
|
||||
/*
|
||||
** Symbol table root entry (root of symbol table tree)
|
||||
*/
|
||||
|
||||
typedef struct _sym_root_entry_type
|
||||
{
|
||||
sym_entry_header_type header;
|
||||
/* common header */
|
||||
struct _src_source_record_type *src_record_list;
|
||||
/* pointer to a list of source records. */
|
||||
char file_name[255];
|
||||
/* the main UIL file name as specified on the command line. */
|
||||
char full_file_name[255];
|
||||
/* the expanded name for the main UIL file that was actually */
|
||||
/* opened. */
|
||||
sym_section_entry_type *sections;
|
||||
/* pointer to section list entry. */
|
||||
sym_module_entry_type *module_hdr;
|
||||
/* pointer to module header entry. */
|
||||
|
||||
} sym_root_entry_type;
|
||||
|
||||
#define sym_k_root_entry_size (sizeof( sym_root_entry_type))
|
||||
|
||||
|
||||
/*
|
||||
** Color Item Entry
|
||||
*/
|
||||
|
||||
typedef struct _sym_color_item_entry_type
|
||||
{
|
||||
sym_entry_header_type header;
|
||||
/* common header */
|
||||
struct _sym_color_item_entry_type *az_next;
|
||||
/* next item */
|
||||
unsigned char b_letter;
|
||||
/* letter used for color */
|
||||
unsigned char b_index;
|
||||
/* color table index */
|
||||
unsigned char b_spare1;
|
||||
sym_value_entry_type *az_color;
|
||||
/* name or value entry for the color. */
|
||||
|
||||
} sym_color_item_entry_type;
|
||||
|
||||
#define sym_k_color_item_entry_size (sizeof( sym_color_item_entry_type))
|
||||
|
||||
|
||||
|
||||
/*
|
||||
** This macro copies the contents of one entry to another without disturbing
|
||||
** the the linked list of entries used to connect all symbol table entries.
|
||||
*/
|
||||
#define _sym_copy_entry(__dest, __src, __size) _move (__dest, __src, __size)
|
||||
|
||||
|
||||
#endif /* UilSymDef_h */
|
||||
/* DON'T ADD STUFF AFTER THIS #endif */
|
||||
91
cde/osf/uil/UilSymGl.h
Normal file
91
cde/osf/uil/UilSymGl.h
Normal file
@@ -0,0 +1,91 @@
|
||||
/*
|
||||
* @OSF_COPYRIGHT@
|
||||
* COPYRIGHT NOTICE
|
||||
* Copyright (c) 1990, 1991, 1992, 1993 Open Software Foundation, Inc.
|
||||
* ALL RIGHTS RESERVED (MOTIF). See the file named COPYRIGHT.MOTIF for
|
||||
* the full copyright text.
|
||||
*/
|
||||
/*
|
||||
* HISTORY
|
||||
*/
|
||||
/* $XConsortium: UilSymGl.h /main/9 1995/07/14 09:39:03 drk $ */
|
||||
|
||||
/*
|
||||
* (c) Copyright 1989, 1990, DIGITAL EQUIPMENT CORPORATION, MAYNARD, MASS. */
|
||||
|
||||
/*
|
||||
**++
|
||||
** FACILITY:
|
||||
**
|
||||
** User Interface Language Compiler (UIL)
|
||||
**
|
||||
** ABSTRACT:
|
||||
**
|
||||
** This include file contains external declarations of all
|
||||
** global data defining the language accepted by the Uil compiler.
|
||||
** This is exactly the global data generated by WML, plus any
|
||||
** invariant matching definitions.
|
||||
**
|
||||
**--
|
||||
**/
|
||||
|
||||
#ifndef UilSymGl_h
|
||||
#define UilSymGl_h
|
||||
|
||||
/*
|
||||
* Defined in files included in UilData.c
|
||||
*/
|
||||
externalref unsigned char *constraint_tab;
|
||||
externalref key_keytable_entry_type *key_table;
|
||||
externalref int key_k_keyword_max_length;
|
||||
externalref int key_k_keyword_count;
|
||||
externalref key_keytable_entry_type *key_table_case_ins;
|
||||
externalref unsigned char **allowed_argument_table;
|
||||
externalref unsigned char *argument_type_table;
|
||||
externalref unsigned char **allowed_child_table;
|
||||
externalref unsigned char *child_class_table;
|
||||
externalref char **charset_xmstring_names_table;
|
||||
externalref unsigned char *charset_writing_direction_table;
|
||||
externalref unsigned char *charset_parsing_direction_table;
|
||||
externalref unsigned char *charset_character_size_table;
|
||||
externalref char **charset_lang_names_table;
|
||||
externalref unsigned short int *charset_lang_codes_table;
|
||||
externalref unsigned short int charset_lang_table_max;
|
||||
externalref unsigned char **allowed_control_table;
|
||||
externalref UilEnumSetDescDef *enum_set_table;
|
||||
externalref unsigned short int *argument_enumset_table;
|
||||
externalref int *enumval_values_table;
|
||||
externalref int uil_max_object;
|
||||
externalref char **uil_widget_names;
|
||||
externalref int uil_max_arg;
|
||||
externalref char **uil_argument_names;
|
||||
externalref int uil_max_child;
|
||||
externalref char **uil_child_names;
|
||||
externalref int uil_max_reason;
|
||||
externalref char **uil_reason_names;
|
||||
externalref int uil_max_enumset;
|
||||
externalref int uil_max_enumval;
|
||||
externalref char **uil_enumval_names;
|
||||
externalref int uil_max_charset;
|
||||
externalref char **uil_charset_names;
|
||||
externalref unsigned short int *related_argument_table;
|
||||
externalref unsigned char **allowed_reason_table;
|
||||
externalref char **tok_token_name_table;
|
||||
externalref int tok_num_tokens;
|
||||
externalref char **uil_widget_funcs;
|
||||
externalref unsigned short int *uil_gadget_variants;
|
||||
externalref unsigned short int *uil_urm_nondialog_class;
|
||||
externalref unsigned short int *uil_urm_subtree_resource;
|
||||
externalref char **uil_argument_toolkit_names;
|
||||
externalref char **uil_reason_toolkit_names;
|
||||
|
||||
externalref unsigned short int uil_sym_user_defined_object;
|
||||
externalref unsigned short int uil_sym_default_charset;
|
||||
externalref unsigned short int uil_sym_isolatin1_charset;
|
||||
|
||||
externalref int uil_max_value;
|
||||
externalref char *uil_datatype_names[];
|
||||
|
||||
|
||||
#endif /* UilSymGl_h */
|
||||
/* DON'T ADD STUFF AFTER THIS #endif */
|
||||
452
cde/osf/uil/UilSymNam.c
Normal file
452
cde/osf/uil/UilSymNam.c
Normal file
@@ -0,0 +1,452 @@
|
||||
/*
|
||||
* @OSF_COPYRIGHT@
|
||||
* COPYRIGHT NOTICE
|
||||
* Copyright (c) 1990, 1991, 1992, 1993 Open Software Foundation, Inc.
|
||||
* ALL RIGHTS RESERVED (MOTIF). See the file named COPYRIGHT.MOTIF for
|
||||
* the full copyright text.
|
||||
*/
|
||||
/*
|
||||
* HISTORY
|
||||
*/
|
||||
#ifdef REV_INFO
|
||||
#ifndef lint
|
||||
static char rcsid[] = "$TOG: UilSymNam.c /main/13 1997/09/08 11:12:50 cshi $"
|
||||
#endif
|
||||
#endif
|
||||
|
||||
/*
|
||||
* (c) Copyright 1989, 1990, DIGITAL EQUIPMENT CORPORATION, MAYNARD, MASS. */
|
||||
|
||||
/*
|
||||
**++
|
||||
** FACILITY:
|
||||
**
|
||||
** User Interface Language Compiler (UIL)
|
||||
**
|
||||
** ABSTRACT:
|
||||
**
|
||||
** This module inserts names into the name table.
|
||||
**
|
||||
**--
|
||||
**/
|
||||
|
||||
|
||||
/*
|
||||
**
|
||||
** INCLUDE FILES
|
||||
**
|
||||
**/
|
||||
|
||||
#include "UilDefI.h"
|
||||
|
||||
/*
|
||||
**
|
||||
** DEFINE and MACRO DEFINITIONS
|
||||
**
|
||||
**/
|
||||
|
||||
|
||||
/*
|
||||
**
|
||||
** EXTERNAL VARIABLE DECLARATIONS
|
||||
**
|
||||
**/
|
||||
|
||||
|
||||
|
||||
/*
|
||||
**
|
||||
** GLOBAL VARIABLE DECLARATIONS
|
||||
**
|
||||
**/
|
||||
|
||||
|
||||
|
||||
/*
|
||||
**
|
||||
** OWN VARIABLE DECLARATIONS
|
||||
**
|
||||
**/
|
||||
|
||||
|
||||
|
||||
/*
|
||||
**++
|
||||
** FUNCTIONAL DESCRIPTION:
|
||||
**
|
||||
** This routine searches for a name entry of the same name as its parameters.
|
||||
** If the entry is found, a pointer to that name node is
|
||||
** returned as the value of the function. If no entry is found, a NULL
|
||||
** pointer is returned.
|
||||
**
|
||||
** See sym_insert_name for a description of the name lookup alorithm.
|
||||
**
|
||||
** FORMAL PARAMETERS:
|
||||
**
|
||||
** l_length length of the name not including the null
|
||||
** c_text pointer to a null terminated string for name
|
||||
**
|
||||
** IMPLICIT INPUTS:
|
||||
**
|
||||
** sym_az_hash_table the hash table
|
||||
**
|
||||
** IMPLICIT OUTPUTS:
|
||||
**
|
||||
** sym_az_hash_table may be updated with an additional name
|
||||
**
|
||||
** FUNCTION VALUE:
|
||||
**
|
||||
** a pointer to a name entry
|
||||
**
|
||||
** SIDE EFFECTS:
|
||||
**
|
||||
** none
|
||||
**
|
||||
**--
|
||||
**/
|
||||
|
||||
sym_name_entry_type
|
||||
*sym_find_name(l_length, c_text)
|
||||
|
||||
int l_length; /* length of name to find */
|
||||
char *c_text; /* text of the name */
|
||||
|
||||
{
|
||||
sym_name_entry_type *az_current_name;
|
||||
int l_hash_code;
|
||||
int l_compare_result;
|
||||
|
||||
/* obtain the hash code of for the name */
|
||||
|
||||
l_hash_code = hash_function( l_length, c_text );
|
||||
|
||||
/*
|
||||
** chain along hash chain looking for symbol - exit loop under 3 condition
|
||||
** 1) come to the end of the chain: name not found
|
||||
** 2) find symbol: return this symbol
|
||||
** 3) find node > symbol: name not found
|
||||
*/
|
||||
|
||||
for (az_current_name = sym_az_hash_table[ l_hash_code ];
|
||||
az_current_name != NULL;
|
||||
az_current_name = az_current_name->az_next_name_entry)
|
||||
{
|
||||
l_compare_result = _compare(c_text, az_current_name->c_text);
|
||||
|
||||
if (l_compare_result == 0) /* c_text = current name */
|
||||
{
|
||||
/* found the name we are looking for */
|
||||
|
||||
return az_current_name;
|
||||
}
|
||||
|
||||
if (l_compare_result > 0) /* c_text > current name */
|
||||
{
|
||||
/* return NULL - name should be before this spot in list */
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/* came to end of the list without finding the name */
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
**++
|
||||
** FUNCTIONAL DESCRIPTION:
|
||||
**
|
||||
** This routine searches for a name entry of the same name as its parameters.
|
||||
** If the entry is found, a pointer to that name node is
|
||||
** returned as the value of the function. If no entry is found, one is
|
||||
** inserted. In this case the value of the function is a pointer to
|
||||
** the name entry created.
|
||||
**
|
||||
** Name entries are linked off of a hash table. Those
|
||||
** entries that have the same hash code, are sorted according to the
|
||||
** collating sequence. Thus the algorithm involves hashing the symbol and
|
||||
** then following the chain for that hash code until one of the following
|
||||
** conditions is met. 1) the identifier is found, then return a pointer
|
||||
** to that name entry. 2) come to the end of the chain or a name
|
||||
** entry that comes later in the collating sequence than the symbol being
|
||||
** searched for. In this case the name is inserted just prior to this
|
||||
** point in the chain.
|
||||
**
|
||||
** FORMAL PARAMETERS:
|
||||
**
|
||||
** l_length length of the name not including the null
|
||||
** c_text pointer to a null terminated string for name
|
||||
**
|
||||
** IMPLICIT INPUTS:
|
||||
**
|
||||
** sym_az_hash_table the hash table
|
||||
**
|
||||
** IMPLICIT OUTPUTS:
|
||||
**
|
||||
** sym_az_hash_table may be updated with an additional name
|
||||
**
|
||||
** FUNCTION VALUE:
|
||||
**
|
||||
** a pointer to a name entry
|
||||
**
|
||||
** SIDE EFFECTS:
|
||||
**
|
||||
** may create a name entry and update the hash table
|
||||
**
|
||||
**--
|
||||
**/
|
||||
|
||||
sym_name_entry_type *sym_insert_name(l_length, c_text)
|
||||
|
||||
int l_length; /* length of name to insert */
|
||||
char *c_text; /* text of the name */
|
||||
|
||||
{
|
||||
sym_name_entry_type *az_previous_name;
|
||||
sym_name_entry_type *az_current_name;
|
||||
sym_name_entry_type *az_new_name;
|
||||
int l_hash_code;
|
||||
int l_compare_result;
|
||||
|
||||
/*
|
||||
** algorithm keeps 2 pointers, one for the previous name and one
|
||||
** for the current name. This permits easy insertion of a new name
|
||||
*/
|
||||
|
||||
|
||||
/* obtain the hash code of for the name */
|
||||
|
||||
l_hash_code = hash_function( l_length, c_text );
|
||||
|
||||
/*
|
||||
** chain along hash chain looking for symbol - exit loop under 3 condition
|
||||
** 1) come to the end of the chain: insert new node on end
|
||||
** 2) find symbol: return this symbol
|
||||
** 3) find node > symbol: insert new node prior to current node
|
||||
*/
|
||||
|
||||
for (az_current_name = sym_az_hash_table[ l_hash_code ],
|
||||
az_previous_name = NULL;
|
||||
|
||||
az_current_name != NULL;
|
||||
|
||||
az_previous_name = az_current_name,
|
||||
az_current_name = az_current_name->az_next_name_entry)
|
||||
{
|
||||
l_compare_result = _compare(c_text, az_current_name->c_text);
|
||||
|
||||
if (l_compare_result == 0) /* c_text = current name */
|
||||
{
|
||||
/* found the name we are looking for */
|
||||
|
||||
return az_current_name;
|
||||
}
|
||||
|
||||
if (l_compare_result > 0) /* c_text > current name */
|
||||
{
|
||||
/* exit the loop to insert just prior to current name */
|
||||
|
||||
goto insert_name;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
insert_name:
|
||||
|
||||
/*
|
||||
** name is not in the table so it must be inserted between the
|
||||
** az_previous_name and az_current_name entries.
|
||||
*/
|
||||
|
||||
/* allocate and initialize the name entry */
|
||||
|
||||
az_new_name = (sym_name_entry_type *)
|
||||
sem_allocate_node (sym_k_name_entry,
|
||||
sym_k_name_entry_size + l_length + 1);
|
||||
|
||||
az_new_name->header.b_type = l_length; /* b_type holds length */
|
||||
az_new_name->az_object = NULL;
|
||||
az_new_name->az_cycle_id = 0;
|
||||
|
||||
_move( az_new_name->c_text, c_text, l_length+1 );
|
||||
|
||||
/*
|
||||
** link the name entry into the hash table
|
||||
*/
|
||||
|
||||
az_new_name->az_next_name_entry = az_current_name;
|
||||
|
||||
if (az_previous_name == NULL)
|
||||
sym_az_hash_table[ l_hash_code ] = az_new_name;
|
||||
else
|
||||
az_previous_name->az_next_name_entry =
|
||||
(sym_name_entry_type *) az_new_name;
|
||||
|
||||
return az_new_name;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
**++
|
||||
** FUNCTIONAL DESCRIPTION:
|
||||
**
|
||||
** This procedure is a hashing function. It takes a length and a
|
||||
** pointer to a value. Using this value as a string, the function
|
||||
** returns an integer in the range of 0 to sym_k_hash_table_limit-1.
|
||||
**
|
||||
** FORMAL PARAMETERS:
|
||||
**
|
||||
** l_length length of the value in bytes not including null
|
||||
** c_value a null terminated string
|
||||
**
|
||||
** IMPLICIT INPUTS:
|
||||
**
|
||||
** sym_k_hash_table_limit
|
||||
**
|
||||
** IMPLICIT OUTPUTS:
|
||||
**
|
||||
** none
|
||||
**
|
||||
** FUNCTION VALUE:
|
||||
**
|
||||
** integer (the hash code) in range 0 to sym_k_hash_table_limit-1
|
||||
**
|
||||
** SIDE EFFECTS:
|
||||
**
|
||||
** none
|
||||
**
|
||||
**--
|
||||
**/
|
||||
|
||||
int hash_function(l_length, c_value)
|
||||
|
||||
int l_length;
|
||||
char *c_value;
|
||||
{
|
||||
#ifdef WORD64
|
||||
#define _shift 3
|
||||
static unsigned int XmConst mask[ 8 ] =
|
||||
{ 0x00000000000000FF, 0x000000000000FFFF,
|
||||
0x0000000000FFFFFF, 0x00000000FFFFFFFF,
|
||||
0x00000000FFFFFFFF, 0x0000FFFFFFFFFFFF,
|
||||
0x00FFFFFFFFFFFFFF, 0xFFFFFFFFFFFFFFFF, };
|
||||
#elif defined (LONG64)
|
||||
#define _shift 3
|
||||
static long XmConst mask[ 8 ] =
|
||||
{ 0x00000000000000FF, 0x000000000000FFFF,
|
||||
0x0000000000FFFFFF, 0x00000000FFFFFFFF,
|
||||
0x00000000FFFFFFFF, 0x0000FFFFFFFFFFFF,
|
||||
0x00FFFFFFFFFFFFFF, 0xFFFFFFFFFFFFFFFF, };
|
||||
#else
|
||||
#define _shift 2
|
||||
static unsigned int XmConst mask[ 4 ] =
|
||||
{ 0x000000FF, 0x0000FFFF, 0x00FFFFFF, 0xFFFFFFFF };
|
||||
#endif
|
||||
|
||||
#ifdef LONG64
|
||||
long l_hash_code;
|
||||
long al_value[20];
|
||||
#else
|
||||
int l_hash_code;
|
||||
int al_value[20];
|
||||
#endif
|
||||
int l_limit;
|
||||
int l_extra;
|
||||
int i;
|
||||
|
||||
l_limit = (l_length-1) >> _shift; /* divide by wordsize */
|
||||
l_extra = (l_length-1) & _slm; /* remainder from divide by wordsize */
|
||||
|
||||
#ifdef LONG64
|
||||
bzero((char *)al_value, sizeof(long) * 20);
|
||||
#else
|
||||
bzero((char *)al_value, sizeof(int) * 20);
|
||||
#endif
|
||||
strncpy((char *)al_value, c_value, l_length);
|
||||
l_hash_code = 0;
|
||||
|
||||
for (i = 0; i < l_limit; i++)
|
||||
{
|
||||
l_hash_code = l_hash_code ^ al_value[ i ];
|
||||
}
|
||||
|
||||
l_hash_code = l_hash_code ^ (al_value[ i ] & mask[ l_extra ]);
|
||||
|
||||
return (int)(l_hash_code % sym_k_hash_table_limit);
|
||||
}
|
||||
|
||||
|
||||
#if debug_version
|
||||
|
||||
/*
|
||||
**++
|
||||
** FUNCTIONAL DESCRIPTION:
|
||||
**
|
||||
** This debugging routine will dump out the name entries linked
|
||||
** from the hash table.
|
||||
**
|
||||
** FORMAL PARAMETERS:
|
||||
**
|
||||
** none
|
||||
**
|
||||
** IMPLICIT INPUTS:
|
||||
**
|
||||
** sym_az_hash_table
|
||||
**
|
||||
** IMPLICIT OUTPUTS:
|
||||
**
|
||||
** none
|
||||
**
|
||||
** FUNCTION VALUE:
|
||||
**
|
||||
** void
|
||||
**
|
||||
** SIDE EFFECTS:
|
||||
**
|
||||
** prints out the hash table
|
||||
**
|
||||
**--
|
||||
**/
|
||||
|
||||
void sym_dump_hash_table()
|
||||
{
|
||||
int i;
|
||||
int total_count;
|
||||
int max_length;
|
||||
int empty_count;
|
||||
|
||||
total_count = 0;
|
||||
empty_count = 0;
|
||||
max_length = 0;
|
||||
|
||||
for (i=0; i<sym_k_hash_table_limit; i++)
|
||||
{
|
||||
int bucket_count;
|
||||
sym_name_entry_type *az_name;
|
||||
|
||||
bucket_count = 0;
|
||||
|
||||
for (az_name = sym_az_hash_table[ i ];
|
||||
az_name != NULL;
|
||||
az_name = az_name->az_next_name_entry)
|
||||
{
|
||||
bucket_count++;
|
||||
|
||||
_debug_output("\t %s \n", az_name->c_text);
|
||||
}
|
||||
|
||||
total_count += bucket_count;
|
||||
if (bucket_count == 0)
|
||||
empty_count++;
|
||||
max_length = ( max_length > bucket_count )? max_length : bucket_count;
|
||||
|
||||
_debug_output("bucket: %d length: %d\n", i, bucket_count);
|
||||
}
|
||||
|
||||
_debug_output("name count: %d \n empty count: %d \n max length: %d",
|
||||
total_count, empty_count, max_length );
|
||||
}
|
||||
#endif
|
||||
1890
cde/osf/uil/UilSymStor.c
Normal file
1890
cde/osf/uil/UilSymStor.c
Normal file
File diff suppressed because it is too large
Load Diff
88
cde/osf/uil/XmAppl.uil
Normal file
88
cde/osf/uil/XmAppl.uil
Normal file
@@ -0,0 +1,88 @@
|
||||
!
|
||||
! @OSF_COPYRIGHT@
|
||||
! COPYRIGHT NOTICE
|
||||
! Copyright (c) 1990, 1991, 1992, 1993 Open Software Foundation, Inc.
|
||||
! ALL RIGHTS RESERVED (MOTIF). See the file named COPYRIGHT.MOTIF for
|
||||
! the full copyright text.
|
||||
!
|
||||
!
|
||||
! HISTORY
|
||||
!
|
||||
! $XConsortium: XmAppl.uil /main/11 1995/07/14 09:39:39 drk $
|
||||
! (c) Copyright 1989, DIGITAL EQUIPMENT CORPORATION, MAYNARD, MASS.
|
||||
!******************************************************************************
|
||||
!++
|
||||
! FACILITY:
|
||||
!
|
||||
! UIL -- Include file for Xm constant definitions.
|
||||
!
|
||||
! ABSTRACT:
|
||||
!
|
||||
! This include file contains UIL value definintions corresponding
|
||||
! to those defined in Xm.h
|
||||
!
|
||||
!--
|
||||
|
||||
/* Version information */
|
||||
value XmVERSION : 2;
|
||||
value XmREVISION : 0;
|
||||
value XmVersion : (XmVERSION * 1000 + XmREVISION);
|
||||
|
||||
|
||||
/* XmString definitions */
|
||||
|
||||
value XmSTRING_DIRECTION_REVERT : 2;
|
||||
value XmSTRING_COMPONENT_UNKNOWN : 0;
|
||||
value XmSTRING_COMPONENT_CHARSET : 1;
|
||||
value XmSTRING_COMPONENT_TEXT : 2;
|
||||
value XmSTRING_COMPONENT_DIRECTION : 3;
|
||||
value XmSTRING_COMPONENT_SEPARATOR : 4; /* 5-125 reserved */
|
||||
|
||||
value XmSTRING_COMPONENT_END : 126; /* no more comp in string */
|
||||
|
||||
value XmSTRING_COMPOUND_STRING : 127; /* tag for whole TCS */
|
||||
|
||||
value XmSTRING_COMPONENT_USER_BEGIN : 128; /* 128-255 are user tags */
|
||||
value XmSTRING_COMPONENT_USER_END : 255;
|
||||
|
||||
|
||||
/* Callback reasons */
|
||||
|
||||
value XmCR_NONE : 0;
|
||||
value XmCR_HELP : 1;
|
||||
value XmCR_VALUE_CHANGED : 2;
|
||||
value XmCR_INCREMENT : 3;
|
||||
value XmCR_DECREMENT : 4;
|
||||
value XmCR_PAGE_INCREMENT : 5;
|
||||
value XmCR_PAGE_DECREMENT : 6;
|
||||
value XmCR_TO_TOP : 7;
|
||||
value XmCR_TO_BOTTOM : 8;
|
||||
value XmCR_DRAG : 9;
|
||||
value XmCR_ACTIVATE : 10;
|
||||
value XmCR_ARM : 11;
|
||||
value XmCR_DISARM : 12;
|
||||
value XmCR_MAP : 16;
|
||||
value XmCR_UNMAP : 17;
|
||||
value XmCR_FOCUS : 18;
|
||||
value XmCR_LOSING_FOCUS : 19;
|
||||
value XmCR_MODIFYING_TEXT_VALUE : 20;
|
||||
value XmCR_MOVING_INSERT_CURSOR : 21;
|
||||
value XmCR_EXECUTE : 22;
|
||||
value XmCR_SINGLE_SELECT : 23;
|
||||
value XmCR_MULTIPLE_SELECT : 24;
|
||||
value XmCR_EXTENDED_SELECT : 25;
|
||||
value XmCR_BROWSE_SELECT : 26;
|
||||
value XmCR_DEFAULT_ACTION : 27;
|
||||
value XmCR_CLIPBOARD_DATA_REQUEST : 28;
|
||||
value XmCR_CLIPBOARD_DATA_DELETE : 29;
|
||||
value XmCR_CASCADING : 30;
|
||||
value XmCR_OK : 31;
|
||||
value XmCR_ENTER : 31;
|
||||
value XmCR_CANCEL : 32;
|
||||
value XmCR_APPLY : 34;
|
||||
value XmCR_NO_MATCH : 35;
|
||||
value XmCR_COMMAND_ENTERED : 36;
|
||||
value XmCR_COMMAND_CHANGED : 37;
|
||||
value XmCR_EXPOSE : 38;
|
||||
value XmCR_RESIZE : 39;
|
||||
value XmCR_INPUT : 40;
|
||||
507
cde/osf/uil/libUil.elist
Normal file
507
cde/osf/uil/libUil.elist
Normal file
@@ -0,0 +1,507 @@
|
||||
/* $TOG: libUil.elist /main/4 1999/10/15 12:00:56 mgreess $ */
|
||||
|
||||
/*************************************************************************
|
||||
* Export list for libUil
|
||||
* This list *must* be updated whenever a change is made to the libUil API.
|
||||
*
|
||||
* The syntax for the symbol declarations in this list is as follows:
|
||||
* public sym => Public C symbol, i.e., publicized API
|
||||
* private sym => Private C symbol, i.e., unpublicized API
|
||||
* internal sym => Internal C symbol, i.e., not part of API
|
||||
*
|
||||
**************************************************************************/
|
||||
|
||||
|
||||
/**************************************************************************
|
||||
* libUil public symbols -- available to developers
|
||||
**************************************************************************/
|
||||
|
||||
public Uil
|
||||
public UilDumpSymbolTable
|
||||
|
||||
public allowed_argument_table
|
||||
public allowed_child_table
|
||||
public allowed_control_table
|
||||
public allowed_reason_table
|
||||
public argument_enumset_table
|
||||
public argument_type_table
|
||||
public charset_character_size_table
|
||||
public charset_lang_codes_table
|
||||
public charset_lang_names_table
|
||||
public charset_lang_table_max
|
||||
public charset_parsing_direction_table
|
||||
public charset_writing_direction_table
|
||||
public charset_xmstring_names_table
|
||||
public child_class_table
|
||||
public constraint_tab
|
||||
public enum_set_table
|
||||
public enumval_values_table
|
||||
public key_k_keyword_count
|
||||
public key_k_keyword_max_length
|
||||
public key_table
|
||||
public key_table_case_ins
|
||||
public related_argument_table
|
||||
public tok_num_tokens
|
||||
public tok_token_name_table
|
||||
public uil_argument_names
|
||||
public uil_argument_toolkit_names
|
||||
public uil_charset_names
|
||||
public uil_child_names
|
||||
public uil_datatype_names
|
||||
public uil_enumval_names
|
||||
public uil_gadget_variants
|
||||
public uil_max_arg
|
||||
public uil_max_charset
|
||||
public uil_max_child
|
||||
public uil_max_enumset
|
||||
public uil_max_enumval
|
||||
public uil_max_object
|
||||
public uil_max_reason
|
||||
public uil_max_value
|
||||
public uil_reason_names
|
||||
public uil_reason_toolkit_names
|
||||
public uil_sym_default_charset
|
||||
public uil_sym_isolatin1_charset
|
||||
public uil_sym_user_defined_object
|
||||
public uil_urm_nondialog_class
|
||||
public uil_urm_subtree_resource
|
||||
public uil_widget_funcs
|
||||
public uil_widget_names
|
||||
|
||||
|
||||
/********************************************************************
|
||||
* libUil private symbols -- Undocumented APIs that are exported
|
||||
* for backward compatibilty.
|
||||
********************************************************************/
|
||||
|
||||
|
||||
/********************************************************************
|
||||
* libUil internal symbols -- not to be used outside the library.
|
||||
********************************************************************/
|
||||
|
||||
internal Uil_characters_read
|
||||
internal Uil_cmd_z_command
|
||||
internal Uil_compile_desc_ptr
|
||||
internal Uil_current_file
|
||||
#if !defined(__hpux)
|
||||
internal Uil_file_size
|
||||
#endif
|
||||
internal Uil_lex_az_charset_entry
|
||||
internal Uil_lex_az_literal_charset
|
||||
internal Uil_lex_cleanup_analyzer
|
||||
internal Uil_lex_l_charset_specified
|
||||
internal Uil_lex_l_literal_charset
|
||||
internal Uil_lex_l_localized
|
||||
internal Uil_lex_l_user_default_charset
|
||||
internal Uil_lines_processed
|
||||
internal Uil_lst_c_title2
|
||||
internal Uil_lst_cleanup_listing
|
||||
internal Uil_message_count
|
||||
internal Uil_percent_complete
|
||||
internal Uil_src_cleanup_source
|
||||
internal Uil_sym_cleanup_storage
|
||||
internal Urm_code_from_uil_type
|
||||
internal access_from_code
|
||||
internal class_name_from_code
|
||||
internal close_source_file
|
||||
internal cmd_decode_command_line
|
||||
internal comment_size
|
||||
internal comment_text
|
||||
internal compute_color_table_size
|
||||
internal compute_icon_size
|
||||
internal compute_list_size
|
||||
internal count_proc
|
||||
internal create_color_table
|
||||
internal create_ext_compression_codes
|
||||
internal create_icon
|
||||
internal create_int_compression_codes
|
||||
internal create_listing_file
|
||||
internal create_str_entry
|
||||
internal current_time
|
||||
internal cvt_ascii_to_long
|
||||
internal db_incorporate
|
||||
internal db_open_file
|
||||
internal db_read_char_table
|
||||
internal db_read_int_and_shorts
|
||||
internal db_read_ints_and_string
|
||||
internal db_read_length_and_string
|
||||
internal diag_charset_text
|
||||
internal diag_get_message_abbrev
|
||||
internal diag_handler
|
||||
internal diag_initialize_diagnostics
|
||||
internal diag_issue_diagnostic
|
||||
internal diag_issue_internal_error
|
||||
internal diag_issue_summary
|
||||
internal diag_object_text
|
||||
internal diag_report_status
|
||||
internal diag_reset_overflow_handler
|
||||
internal diag_restore_diagnostics
|
||||
internal diag_rz_msg_table
|
||||
internal diag_store_handlers
|
||||
internal diag_tag_text
|
||||
internal diag_value_text
|
||||
internal emit_argument
|
||||
internal emit_callback
|
||||
internal emit_callback_procedures
|
||||
internal emit_control
|
||||
internal extract_create_callback
|
||||
internal extract_subtree_control
|
||||
internal format_arg_value
|
||||
internal get_line
|
||||
internal get_root_dir_name
|
||||
internal group_from_code
|
||||
internal gz_yynullval
|
||||
internal hash_function
|
||||
internal init_wmd_path
|
||||
internal issue_control_char_diagnostic
|
||||
internal issue_urm_error
|
||||
internal key_find_keyword
|
||||
internal key_initialize
|
||||
internal lex_filter_unprintable_chars
|
||||
internal lex_initialize_analyzer
|
||||
internal lex_issue_error
|
||||
internal lst_debug_output
|
||||
internal lst_open_listing
|
||||
internal lst_output_line
|
||||
internal lst_output_listing
|
||||
internal lst_output_machine_code
|
||||
internal lst_output_message_ptr_line
|
||||
internal lst_output_messages
|
||||
internal module_clauses
|
||||
internal msg0
|
||||
internal msg1
|
||||
internal msg10
|
||||
internal msg11
|
||||
internal msg12
|
||||
internal msg13
|
||||
internal msg14
|
||||
internal msg15
|
||||
internal msg16
|
||||
internal msg17
|
||||
internal msg18
|
||||
internal msg19
|
||||
internal msg2
|
||||
internal msg20
|
||||
internal msg21
|
||||
internal msg22
|
||||
internal msg23
|
||||
internal msg24
|
||||
internal msg25
|
||||
internal msg26
|
||||
internal msg27
|
||||
internal msg28
|
||||
internal msg29
|
||||
internal msg3
|
||||
internal msg30
|
||||
internal msg31
|
||||
internal msg32
|
||||
internal msg33
|
||||
internal msg34
|
||||
internal msg35
|
||||
internal msg36
|
||||
internal msg37
|
||||
internal msg38
|
||||
internal msg39
|
||||
internal msg4
|
||||
internal msg40
|
||||
internal msg41
|
||||
internal msg42
|
||||
internal msg43
|
||||
internal msg44
|
||||
internal msg45
|
||||
internal msg46
|
||||
internal msg47
|
||||
internal msg48
|
||||
internal msg49
|
||||
internal msg5
|
||||
internal msg50
|
||||
internal msg51
|
||||
internal msg52
|
||||
internal msg53
|
||||
internal msg54
|
||||
internal msg55
|
||||
internal msg56
|
||||
internal msg57
|
||||
internal msg58
|
||||
internal msg59
|
||||
internal msg6
|
||||
internal msg60
|
||||
internal msg61
|
||||
internal msg62
|
||||
internal msg63
|
||||
internal msg64
|
||||
internal msg65
|
||||
internal msg66
|
||||
internal msg67
|
||||
internal msg68
|
||||
internal msg69
|
||||
internal msg7
|
||||
internal msg70
|
||||
internal msg71
|
||||
internal msg72
|
||||
internal msg73
|
||||
internal msg74
|
||||
internal msg75
|
||||
internal msg76
|
||||
internal msg77
|
||||
internal msg78
|
||||
internal msg79
|
||||
internal msg8
|
||||
internal msg80
|
||||
internal msg9
|
||||
internal msg_cat_table
|
||||
internal off_get
|
||||
internal off_put
|
||||
internal open_source_file
|
||||
internal out_az_idbfile_id
|
||||
internal out_emit_value
|
||||
internal out_emit_widget
|
||||
internal output_text
|
||||
internal parent_list_traverse
|
||||
internal pop
|
||||
#if !defined(__hpux)
|
||||
internal prev_yylval
|
||||
#endif
|
||||
internal process_all_arguments
|
||||
internal process_all_callbacks
|
||||
internal process_all_controls
|
||||
internal push
|
||||
internal ref_control
|
||||
internal ref_value
|
||||
internal reget_line
|
||||
internal resource_name_from_code
|
||||
internal sar_add_forward_list_entry
|
||||
internal sar_add_list_entry
|
||||
internal sar_append_color_item
|
||||
internal sar_append_table_value
|
||||
internal sar_assoc_comment
|
||||
internal sar_binary_op
|
||||
internal sar_bind_value_name
|
||||
internal sar_cat_value
|
||||
internal sar_cat_value_entry
|
||||
internal sar_charset_verify
|
||||
internal sar_chk_charset_attr
|
||||
internal sar_chk_comp_str_attr
|
||||
internal sar_create_child
|
||||
internal sar_create_identifier
|
||||
internal sar_create_module
|
||||
internal sar_create_object
|
||||
internal sar_create_procedure
|
||||
internal sar_create_root
|
||||
internal sar_get_units_type
|
||||
internal sar_import_value_entry
|
||||
internal sar_include_file
|
||||
internal sar_initialize
|
||||
internal sar_link_section
|
||||
internal sar_make_charset
|
||||
internal sar_make_color
|
||||
internal sar_make_color_item
|
||||
internal sar_make_color_table
|
||||
internal sar_make_comp_str
|
||||
internal sar_make_comp_str_comp
|
||||
internal sar_make_def_obj
|
||||
internal sar_make_fallback_charset
|
||||
internal sar_make_font
|
||||
internal sar_make_font_item
|
||||
internal sar_make_font_table
|
||||
internal sar_make_fontset
|
||||
internal sar_make_icon
|
||||
internal sar_make_private_value
|
||||
internal sar_make_rgb_private_value
|
||||
internal sar_make_wchar_str
|
||||
internal sar_map_keyword_to_name
|
||||
internal sar_object_reference
|
||||
internal sar_private_error
|
||||
internal sar_process_id
|
||||
internal sar_process_id_ref
|
||||
internal sar_process_module_charset
|
||||
internal sar_process_module_sensitivity
|
||||
internal sar_process_module_variant
|
||||
internal sar_process_module_version
|
||||
internal sar_process_proc_ref
|
||||
internal sar_save_argument_pair
|
||||
internal sar_save_control_item
|
||||
internal sar_save_control_widget
|
||||
internal sar_save_feature
|
||||
internal sar_save_list_end
|
||||
internal sar_save_module_source
|
||||
internal sar_save_reason_binding
|
||||
internal sar_save_section_source
|
||||
internal sar_save_src_entry_end
|
||||
internal sar_save_src_semicolon_pos
|
||||
internal sar_save_user_proc_ref_src
|
||||
internal sar_set_list_type
|
||||
internal sar_set_object_class
|
||||
internal sar_set_object_flags
|
||||
internal sar_set_object_variant
|
||||
internal sar_unary_op
|
||||
internal sar_unset_object_flags
|
||||
internal sar_update_parent_list
|
||||
internal sar_value_not_implemented
|
||||
internal sar_value_type_error
|
||||
internal sar_verify_object
|
||||
internal save_module_machine_code
|
||||
internal save_value_machine_code
|
||||
internal save_widget_machine_code
|
||||
internal sem_allocate_node
|
||||
internal sem_append_cstr_to_cstr
|
||||
internal sem_append_str_to_cstr
|
||||
internal sem_argument_allowed
|
||||
internal sem_cat_str_to_str
|
||||
internal sem_charset_info
|
||||
internal sem_charset_lang_name
|
||||
internal sem_charset_name
|
||||
internal sem_child_allowed
|
||||
internal sem_control_allowed
|
||||
internal sem_convert_to_error
|
||||
internal sem_convert_to_float
|
||||
internal sem_convert_to_integer
|
||||
internal sem_convert_to_single_float
|
||||
internal sem_create_cstr
|
||||
internal sem_create_value_entry
|
||||
internal sem_create_wchar_str
|
||||
internal sem_dcl_name
|
||||
internal sem_evaluate_value
|
||||
internal sem_evaluate_value_cs
|
||||
internal sem_evaluate_value_expr
|
||||
internal sem_find_object
|
||||
internal sem_free_node
|
||||
internal sem_map_subclass_to_charset
|
||||
internal sem_output_uid_file
|
||||
internal sem_reason_allowed
|
||||
internal sem_ref_name
|
||||
internal sem_reference_procedure
|
||||
internal sem_resolve_forward_refs
|
||||
internal sem_validate_argument_entry
|
||||
internal sem_validate_argument_enumset
|
||||
internal sem_validate_argument_list
|
||||
internal sem_validate_callback_entry
|
||||
internal sem_validate_callback_list
|
||||
internal sem_validate_constraint_entry
|
||||
internal sem_validate_control_entry
|
||||
internal sem_validate_control_list
|
||||
internal sem_validate_node
|
||||
internal sem_validate_procref_entry
|
||||
internal sem_validate_procref_list
|
||||
internal sem_validate_value_node
|
||||
internal sem_validate_verify_cycle
|
||||
internal sem_validate_widget_cycle
|
||||
internal sem_validate_widget_cycle_aux
|
||||
internal sem_validate_widget_node
|
||||
internal sem_validation
|
||||
internal src_append_diag_info
|
||||
internal src_append_machine_code
|
||||
#if !defined(__hpux)
|
||||
internal src_az_avail_source_buffer
|
||||
internal src_az_current_source_buffer
|
||||
internal src_az_current_source_record
|
||||
internal src_az_first_source_record
|
||||
internal src_az_module_source_record
|
||||
internal src_az_orphan_messages
|
||||
internal src_az_source_file_table
|
||||
#endif
|
||||
internal src_get_file_name
|
||||
internal src_get_source_line
|
||||
internal src_initialize_source
|
||||
#if !defined(__hpux)
|
||||
internal src_l_last_source_file_number
|
||||
#endif
|
||||
internal src_open_file
|
||||
internal src_retrieve_source
|
||||
internal stbuf
|
||||
#if !defined(__hpux)
|
||||
internal sym_az_allocated_nodes
|
||||
internal sym_az_current_section_entry
|
||||
#endif
|
||||
internal sym_az_entry_list_header
|
||||
internal sym_az_error_value_entry
|
||||
#if !defined(__hpux)
|
||||
internal sym_az_external_def_chain
|
||||
internal sym_az_forward_ref_chain
|
||||
internal sym_az_freed_nodes
|
||||
internal sym_az_hash_table
|
||||
internal sym_az_module_entry
|
||||
internal sym_az_root_entry
|
||||
internal sym_az_val_forward_ref_chain
|
||||
#endif
|
||||
internal sym_dump_argument
|
||||
internal sym_dump_callback
|
||||
internal sym_dump_color_item
|
||||
internal sym_dump_control
|
||||
internal sym_dump_external_def
|
||||
internal sym_dump_forward_ref
|
||||
internal sym_dump_include_file
|
||||
internal sym_dump_list
|
||||
internal sym_dump_module
|
||||
internal sym_dump_name
|
||||
internal sym_dump_obj_header
|
||||
internal sym_dump_object_variant
|
||||
internal sym_dump_parent_list_item
|
||||
internal sym_dump_proc_def
|
||||
internal sym_dump_proc_ref
|
||||
internal sym_dump_root_entry
|
||||
internal sym_dump_section
|
||||
internal sym_dump_source_info
|
||||
internal sym_dump_symbol
|
||||
internal sym_dump_symbols
|
||||
internal sym_dump_value
|
||||
internal sym_dump_widget
|
||||
internal sym_find_name
|
||||
internal sym_initialize_storage
|
||||
internal sym_insert_name
|
||||
internal sym_make_external_def
|
||||
internal sym_make_forward_ref
|
||||
internal sym_make_value_forward_ref
|
||||
internal sym_section_text
|
||||
internal type_from_code
|
||||
internal uil_arg_compr
|
||||
#if !defined(__hpux)
|
||||
internal uil_az_error_env_block
|
||||
#endif
|
||||
internal uil_az_error_env_valid
|
||||
internal uil_catd
|
||||
internal uil_child_compr
|
||||
internal uil_exit
|
||||
internal uil_l_compile_status
|
||||
internal uil_reas_compr
|
||||
internal uil_urm_variant
|
||||
internal uil_v_case_sensitive
|
||||
internal uil_widget_compr
|
||||
internal unload_stack
|
||||
internal validate_arg
|
||||
internal write_msg_to_standard_error
|
||||
|
||||
internal yydebug
|
||||
internal yyerror
|
||||
internal yylex
|
||||
internal yynerrs
|
||||
internal yyparse
|
||||
|
||||
#if defined(hpux)
|
||||
internal yymaxdepth
|
||||
#endif
|
||||
|
||||
#if defined(sun)
|
||||
internal yy_yys
|
||||
internal yy_yyv
|
||||
internal yyact
|
||||
internal yychar
|
||||
internal yychk
|
||||
internal yydef
|
||||
internal yyerrflag
|
||||
internal yyexca
|
||||
internal yylval
|
||||
internal yypact
|
||||
internal yypgo
|
||||
internal yyps
|
||||
internal yypv
|
||||
internal yyr1
|
||||
internal yyr2
|
||||
internal yyreds
|
||||
internal yys
|
||||
internal yystate
|
||||
internal yytmp
|
||||
internal yytoks
|
||||
internal yyv
|
||||
internal yyval
|
||||
#endif
|
||||
Reference in New Issue
Block a user