Compare commits

...

57 Commits

Author SHA1 Message Date
Luis Ibanez 8462346f3a Fixed mupip link issue in 64bits 2012-04-07 20:46:33 -04:00
Luis Ibanez 95feac5f52 ENH: Resolving more missing symbols.
Adding libraries to the platform specific ones of 32 bits.
2012-04-07 20:41:51 -04:00
Luis Ibanez 804eaea59c ENH: solved more symbols for dse. 2012-04-07 20:10:13 -04:00
Luis Ibanez 2c04344862 ENH: Adding missing symbols for dse. 2012-04-07 19:40:48 -04:00
Luis Ibanez b02d1b5944 ENH: Moved more .c files. 2012-03-25 22:38:10 -04:00
Luis Ibanez 11d8078554 ENH: Added pro/obj to the list of path headers. 2012-03-25 22:20:05 -04:00
Luis Ibanez 1feb8d4352 ENH: Moving more .c files to both 32 and 64 bits. 2012-03-25 22:17:46 -04:00
Luis Ibanez 822567f3c4 Reorganized include_directories.
Remove the defaults from the top CMakeLists.txt file,
and selectively added them to the subdirectories.
2012-03-25 21:20:19 -04:00
Luis Ibanez 7c395c9a26 ENH: Fixed premature include of sr_unix.
Now added a dedicated directory to build the executables.
In this way we don't need to impose in all the project,
their requirements of include_directories.
2012-03-25 18:50:21 -04:00
Luis Ibanez 3ef63f8c72 Fixed most op_ routines in 32 bits. 2012-03-25 17:50:22 -04:00
Luis Ibanez 9ede0237ea Fixed in 32bits missing symbols from mumpsunix. 2012-03-25 17:41:03 -04:00
Luis Ibanez ec50fa49d3 The ftok executable is no longer build in V55. 2012-03-25 10:33:15 -04:00
Luis Ibanez 4a1e3ab0f2 Catching up on a build for 32 bits...
Not quite there yet, but making progress.
This commit is aimed at synching in both 32 and 64 bits.
2012-03-25 10:00:41 -04:00
Luis Ibanez 767d058bbe Removing files that no longer need to be confired. 2012-03-24 21:27:49 -04:00
Luis Ibanez 67d614ffaf Removing files that are not in 5.5. 2012-03-24 20:42:38 -04:00
Luis Ibanez e116f44fd4 Removing files that are not in 5.5. 2012-03-24 20:21:25 -04:00
Luis Ibanez 0f197db081 sr_unix/mu_file_size.c not found in version 5.5 2012-03-24 19:40:17 -04:00
Luis Ibanez bfca58d52c ENH: Update CMakeLists.txt to version 5.5
Version 5.5 added some files, and removed some others.
2012-03-24 17:22:00 -04:00
Luis Ibanez 6adcf3e89c Merge branch 'v55000' into cmakeifiedv55
* v55000:
  ENH: Version 5.5000 from sourceforge.
2012-03-24 14:10:43 -04:00
Luis Ibanez 21b12b1587 ENH: Set EXECUTABLE_OUTPUT_PATH. 2012-03-21 02:49:16 -04:00
Luis Ibanez 75be206101 Merge branch 'buildexecutables' into cmakeified
* buildexecutables:
  ENH: Enabling assembler. Building Executables.
  ENH: Made libraries SHARED, identify executables.
  ENH: First cut at adding executables.
2012-03-21 02:47:55 -04:00
Luis Ibanez 371f1707d6 ENH: Enabling assembler. Building Executables.
Making progress in completing the list of libraries needed to build
the mumps and dse executables.
2012-03-21 02:45:16 -04:00
Luis Ibanez 7a1f51a369 ENH: Made libraries SHARED, identify executables.
Made all libraries SHARED. This fits the Debian build practices,
and also helps with some circular dependencies that remain to be
cleaned up.

In this patch we also identified a set of .c file that have a main
function, and therefore must be taken out of the libraries and put
into executables.
2012-03-20 22:35:56 -04:00
Luis Ibanez 571508d9c2 ENH: First cut at adding executables. 2012-03-18 22:26:32 -04:00
Luis Ibanez ddd3d75deb ENH: Listed .c file for libstub. 2012-03-18 20:38:50 -04:00
Luis Ibanez 82cc4f4b1d ENH: Lists .c files for libdse. 2012-03-18 20:34:10 -04:00
Luis Ibanez 040d4e8920 ENH: Listed .o files for libcmisockettcp. 2012-03-18 20:24:21 -04:00
Luis Ibanez 90d9539ece ENH: list of .o for gnpclient library. 2012-03-18 19:34:07 -04:00
Luis Ibanez 9e8187c64f ENH: Completed .o list for libmupip. 2012-03-18 19:24:51 -04:00
Luis Ibanez 7d69a13ca2 ENH: Completed list of .o for libmumps.
Libmumps is build in multiple pieces. One is coming from sr_port,
another from sr_unix, and another from pro/obj.
2012-03-18 18:35:05 -04:00
Luis Ibanez da56a9b6fc ENH: more .o sorting in libmumps until "s". 2012-03-18 15:24:06 -04:00
Luis Ibanez 84159112c6 ENH: More sorting of .o in libmumps libmupip. 2012-03-18 14:40:11 -04:00
Luis Ibanez 0c54ba5500 ENH: Progress on .o for libmumps libmupip liblke
Continued sorting out the .o files that are to be archived in each
one of the libraries above, and organized their partition across
sr_port and sr_unix.
2012-03-18 13:42:21 -04:00
James Michael DuPont 6edabcda9c https://github.com/luisibanez/fis-gtm/issues/1 2012-03-15 08:41:19 +01:00
Luis Ibanez 2b72f61779 ENH: Organazing sources in libmumps and libmupip.
The sources of the first cut of port library are
now being split into the libraries libmump and
libmupip.
2012-03-11 21:12:24 -04:00
Luis Ibanez e46669ed4e ENH: Put appart .c files that are only for 64 bits.
Move them to their own section in the configuration file.
2012-03-11 18:55:38 -04:00
Luis Ibanez 59c35ee120 ENH: Better symbols for 64 vs 32 bits. 2012-03-11 18:39:32 -04:00
Luis Ibanez 3b6d1365df ENH: Split between 32 and 64 bits. 2012-03-11 17:12:34 -04:00
Luis Ibanez e82837e38e ENH: Move pre-gtm-configured files.
At configuration time, move to the binary directory the files
that were pre-generated by using gtm.
2012-03-11 16:21:46 -04:00
Luis Ibanez b4b1919ce3 ENH: Build in 64 bits.
Matched to the list of source files that are reported via a native
fis-gtm build in the same 64 bits platform. At these point there are
only three .c files that need to be included in the build process.
2012-03-11 12:18:19 -04:00
Luis Ibanez b07a769e9c ENH: xfer_desc.i generated in 64bits.
This file is generated by ./sr_unix/gen_xfer_desc.csh.
2012-02-19 13:18:39 -05:00
Luis Ibanez b822b5f8f9 COMP: shrink_trips.c now built only in 64 bits.
This file contains code that is only build if USHBIN_SUPPORTED is ON.
In Linux this flag is ON in 64 bits platforms and not in 32 bits ones.
2012-02-19 12:54:24 -05:00
Luis Ibanez 5660b981d6 COMP: Replaced quotes with brackets in rtnhdr.h include.
In this way, the include path with look first for headers in the sr_unix_nsb
directory, as instructed in the CMakeLists.txt file.
2012-02-19 12:45:11 -05:00
Luis Ibanez c90f8a969a ENH: Now include sr_unix_nsb headers before sr_unix ones. 2012-02-19 11:18:40 -05:00
Luis Ibanez bbbd7ce7ca Merge branch 'cmakeified' of github.com:luisibanez/fis-gtm into cmakeified
* 'cmakeified' of github.com:luisibanez/fis-gtm:
  ENH: Configured dashboard submission.
2012-02-19 11:16:59 -05:00
Luis Ibanez 9f0b6edcdd ENH: Configured dashboard submission.
Setup to submit build to the Dashboard at:
http://my.cdash.org/index.php?project=fis-gtm
2012-02-19 11:16:08 -05:00
Luis Ibanez b345cc6b3d ENH: Configured dashboard submission. 2012-02-19 11:13:48 -05:00
Luis Ibanez 45896c02f9 ENH: Isolated sr_port files that are 64 bits specific.
A couple of files in the sr_port directory are not intended to
be used in 32 bits platforms.
2012-02-19 10:43:42 -05:00
Luis Ibanez f445b8d0c5 ENH: Added CMakeLists.txt file for sr_x86_64.
These are the 64 bits specific files.
2012-02-19 10:24:41 -05:00
Luis Ibanez 2ba5c37ea8 ENH: Add CMake selection of 64 vs 32 bits.
Use the CMake C detection of sizeof(void*) to determine whether
we are in a 32 or 64 bits architecture, and then select some
directories accordingly.
2012-02-19 10:19:50 -05:00
Luis Ibanez 6d692f476f ENH: Added sr_port and sr_port_cm.
Still have issues with several .c files.
2012-02-18 22:32:55 -05:00
Luis Ibanez a1d52f96be ENH: Configured sr_unix_gnp directory. 2012-02-18 21:59:23 -05:00
Luis Ibanez 24a1fd6e5c ENH: Configuring sr_unix_cm and sr_unix_nsb directories. 2012-02-18 21:11:03 -05:00
Luis Ibanez 1a76384a2b ENH: Improved CMakeLists.txt files in first directories.
Including sr_unix, sr_port, sr_i386.

Introduced a gtmconfig.h.in file to manage configuration time options such
as the selection of the cryptograpy library (gcrypt vs openssl).
2012-02-18 20:38:50 -05:00
Luis Ibanez be53d3bbdd crafting CMakeLists.txt file in sr_i386 2012-02-16 22:40:59 -05:00
Luis Ibanez 3a68b816ef ENH: First cut at a top level CMakeLists.txt file. 2012-02-16 22:21:43 -05:00
Luis Ibanez e3240e1001 ENH: Adding the extra files generated by mumps.
These files were generated by using mumps during an
initial bootstrapping stage. They are added here in
an attempt to have a pure-C code base that can be
built in a system that doesn't have a mumps compiler.
2012-02-16 22:19:49 -05:00
72 changed files with 12896 additions and 688 deletions

152
CMakeLists.txt Normal file
View File

@ -0,0 +1,152 @@
cmake_minimum_required(VERSION 2.8)
project(fis-gtm)
set(LIBRARY_OUTPUT_PATH ${fis-gtm_BINARY_DIR}/lib)
set(EXECUTABLE_OUTPUT_PATH ${fis-gtm_BINARY_DIR}/bin)
option(USE_GCRYPT "Use the gcrypt library for encryption" ON)
option(USE_OPENSSL "Use the openssl library for encryption" OFF)
set(LIBRARY_TYPE "SHARED")
find_package(Curses REQUIRED)
configure_file(
${fis-gtm_SOURCE_DIR}/gtmconfig.h.in
${fis-gtm_BINARY_DIR}/gtmconfig.h
)
include_directories(
${fis-gtm_BINARY_DIR}
)
include(CTest)
#
# Look at the type of architecture.
#
if(CMAKE_C_SIZEOF_DATA_PTR EQUAL 8)
set(ARCHITECTURE_IS_64_BITS ON)
endif()
if(CMAKE_C_SIZEOF_DATA_PTR EQUAL 4)
set(ARCHITECTURE_IS_32_BITS ON)
endif()
#
# Relocate files that were pre-configured with GTM
#
set(FIS_GTM_PRECONFIGURED_SRC_DIR ${fis-gtm_SOURCE_DIR}/fis-gtm-src-extras)
set(FIS_GTM_PRECONFIGURED_DST_DIR ${fis-gtm_BINARY_DIR})
macro(install_gtm_preconfigured subdir filename)
configure_file(
${FIS_GTM_PRECONFIGURED_SRC_DIR}/${subdir}/${filename}
${FIS_GTM_PRECONFIGURED_DST_DIR}/${subdir}/${filename}
)
endmacro()
install_gtm_preconfigured("pro" "gtm_limits.h")
install_gtm_preconfigured("pro" "gtm_stdio.h")
install_gtm_preconfigured("pro" "gtm_stdlib.h")
install_gtm_preconfigured("pro" "gtm_string.h")
install_gtm_preconfigured("pro" "gtm_strings.h")
install_gtm_preconfigured("pro" "gtmxc_types.h")
install_gtm_preconfigured("pro" "main_pragma.h")
install_gtm_preconfigured("pro/obj" "ttt.c")
install_gtm_preconfigured("pro/obj" "xfer_desc.i")
install_gtm_preconfigured("pro/obj" "cmierrors_ctl.c")
install_gtm_preconfigured("pro/obj" "cmerrors_ctl.c")
install_gtm_preconfigured("pro/obj" "merrors_ctl.c")
install_gtm_preconfigured("pro/obj" "gdeerrors_ctl.c")
install_gtm_preconfigured("pro/obj" "omi_sx_play.c")
install_gtm_preconfigured("pro/obj" "merrors_ansi.h")
install_gtm_preconfigured("pro/obj" "gtm_threadgbl_deftypes.h")
install_gtm_preconfigured("pro/utf8" "gtmxc_types.h")
install_gtm_preconfigured("pro/utf8" "main_pragma.h")
install_gtm_preconfigured("pro/utf8" "gtm_stdlib.h")
install_gtm_preconfigured("pro/utf8" "gtm_strings.h")
install_gtm_preconfigured("pro/utf8" "gtm_string.h")
install_gtm_preconfigured("pro/utf8" "gtm_stdio.h")
install_gtm_preconfigured("pro/utf8" "gtm_limits.h")
install_gtm_preconfigured("pro/plugin/gtmcrypt" "gtmcrypt_dbk_ref.c")
install_gtm_preconfigured("pro/plugin/gtmcrypt" "gtmcrypt_dbk_ref.h")
install_gtm_preconfigured("pro/plugin/gtmcrypt" "gtmcrypt_interface.h")
install_gtm_preconfigured("pro/plugin/gtmcrypt" "gtmcrypt_pk_ref.c")
install_gtm_preconfigured("pro/plugin/gtmcrypt" "gtmcrypt_pk_ref.h")
install_gtm_preconfigured("pro/plugin/gtmcrypt" "gtmcrypt_ref.c")
install_gtm_preconfigured("pro/plugin/gtmcrypt" "gtmcrypt_ref.h")
install_gtm_preconfigured("pro/plugin/gtmcrypt" "gtmcrypt_sym_ref.h")
install_gtm_preconfigured("pro/plugin/gtmcrypt" "gtmxc_types.h")
install_gtm_preconfigured("pro/plugin/gtmcrypt" "main_pragma.h")
install_gtm_preconfigured("pro/plugin/gtmcrypt" "maskpass.c")
#
# Configure to build assembly files
#
set(can_use_assembler FALSE)
# test wether it is a x86 machine and as/gas is available
if("${CMAKE_SYSTEM_PROCESSOR}" MATCHES ".86")
enable_language(ASM-ATT)
if(CMAKE_ASM-ATT_COMPILER_WORKS)
set(can_use_assembler TRUE)
endif(CMAKE_ASM-ATT_COMPILER_WORKS)
endif("${CMAKE_SYSTEM_PROCESSOR}" MATCHES ".86")
if(ARCHITECTURE_IS_32_BITS)
include_directories(
${fis-gtm_SOURCE_DIR}/sr_i386
${fis-gtm_SOURCE_DIR}/sr_unix_nsb
)
endif()
if(ARCHITECTURE_IS_64_BITS)
include_directories(
${fis-gtm_SOURCE_DIR}/sr_x86_64
)
endif()
#
# Visit subdirectories
#
add_subdirectory(sr_linux)
add_subdirectory(sr_unix_cm)
add_subdirectory(sr_unix_gnp)
add_subdirectory(sr_unix)
add_subdirectory(sr_port_cm)
add_subdirectory(sr_port)
add_subdirectory(pro)
#
# Select architecture dependent directories
#
if(ARCHITECTURE_IS_32_BITS)
add_subdirectory(sr_i386)
add_subdirectory(sr_unix_nsb)
endif()
if(ARCHITECTURE_IS_64_BITS)
add_subdirectory(sr_x86_64)
endif()
add_subdirectory(executables)

13
CTestConfig.cmake Normal file
View File

@ -0,0 +1,13 @@
## This file should be placed in the root directory of your project.
## Then modify the CMakeLists.txt file in the root directory of your
## project to incorporate the testing dashboard.
## # The following are required to uses Dart and the Cdash dashboard
## ENABLE_TESTING()
## INCLUDE(CTest)
set(CTEST_PROJECT_NAME "fis-gtm")
set(CTEST_NIGHTLY_START_TIME "23:00:00 EST")
set(CTEST_DROP_METHOD "http")
set(CTEST_DROP_SITE "my.cdash.org")
set(CTEST_DROP_LOCATION "/submit.php?project=fis-gtm")
set(CTEST_DROP_SITE_CDASH TRUE)

268
executables/CMakeLists.txt Normal file
View File

@ -0,0 +1,268 @@
if(ARCHITECTURE_IS_32_BITS)
include_directories(
${fis-gtm_SOURCE_DIR}/sr_i386
${fis-gtm_SOURCE_DIR}/sr_unix_nsb
${fis-gtm_BINARY_DIR}/pro/obj
${fis-gtm_SOURCE_DIR}/sr_unix
${fis-gtm_SOURCE_DIR}/sr_port
)
endif()
if(ARCHITECTURE_IS_64_BITS)
include_directories(
${fis-gtm_SOURCE_DIR}/sr_x86_64
${fis-gtm_BINARY_DIR}/pro/obj
${fis-gtm_SOURCE_DIR}/sr_unix
${fis-gtm_SOURCE_DIR}/sr_port
)
endif()
#
# List of architecture dependent libraries
#
if(ARCHITECTURE_IS_32_BITS)
set(ARCHITECTURE_DEPENDENT_LIBRARIES
${ARCHITECTURE_DEPENDENT_LIBRARIES}
fisgtmi386
stubunix
gtmunixcm
cmisockettcp
frameport
gtm_unix_nsb
gtmportcm
cmisockettcpportcm
)
endif()
if(ARCHITECTURE_IS_64_BITS)
set(ARCHITECTURE_DEPENDENT_LIBRARIES
${ARCHITECTURE_DEPENDENT_LIBRARIES}
fisgtmx64
gnpclientportcm
gnpclientport
cmisockettcpportcm
cmisockettcp
gtmportcm
gtmunixcm
ftokunix
frameport
)
endif()
add_executable(mumps
../sr_unix/gtm_main.c
)
target_link_libraries(mumps
lkeport
lkeunix
fisgtmproobj
mumpsport
mumpsunix
mupipport
mupipunix
gtmlinux2
fisgtmproobj
${ARCHITECTURE_DEPENDENT_LIBRARIES}
${CURSES_LIBRARIES}
elf
dl
pthread
m
)
add_executable(dse
../sr_unix/dse.c
../sr_unix/lke_cmd.c
../sr_unix/lke_ctrlc_handler.c
)
target_link_libraries(dse
lkeport
lkeunix
mumpsport
mumpsunix
mupipport
mupipunix
dseport
dseunix
gtmlinux2
gnpclientportcm
gnpclientport
fisgtmproobj
${ARCHITECTURE_DEPENDENT_LIBRARIES}
${CURSES_LIBRARIES}
elf
dl
pthread
m
)
add_executable(mupip
../sr_unix/mupip.c
)
target_link_libraries(mupip
mupipport
mupipunix
lkeport
lkeunix
mumpsport
mumpsunix
mumpsport
mumpsunix
gtmlinux2
fisgtmproobj
${ARCHITECTURE_DEPENDENT_LIBRARIES}
${CURSES_LIBRARIES}
elf
dl
pthread
m
)
add_executable(lke
../sr_unix/lke.c
../sr_unix/lke_cmd.c
../sr_unix/lke_ctrlc_handler.c
)
target_link_libraries(lke
lkeport
lkeunix
mumpsport
mumpsunix
mupipport
mupipunix
${ARCHITECTURE_DEPENDENT_LIBRARIES}
fisgtmproobj
gtmlinux2
${CURSES_LIBRARIES}
elf
dl
pthread
m
)
add_executable(gtm
../sr_unix/gtm.c
)
target_link_libraries(gtm
dl
m
)
add_executable(semstat2
../sr_unix/semstat2.c
)
target_link_libraries(semstat2
elf
dl
)
add_executable(gtmsecshr
../sr_unix/gtmsecshr.c
)
target_link_libraries(gtmsecshr
mumpsport
mumpsunix
fisgtmproobj
${ARCHITECTURE_DEPENDENT_LIBRARIES}
lkeport
lkeunix
gtmlinux2
mupipport
mupipunix
${CURSES_LIBRARIES}
pthread
elf
dl
m
)
add_executable(gtcm_pkdisp
../sr_unix_cm/gtcm_pkdisp.c
)
target_link_libraries(gtcm_pkdisp
mumpsport
mumpsunix
fisgtmproobj
${ARCHITECTURE_DEPENDENT_LIBRARIES}
lkeport
lkeunix
gtmlinux2
mupipport
mupipunix
${CURSES_LIBRARIES}
pthread
elf
dl
m
)
add_executable(gtcm_play
../sr_unix_cm/gtcm_play.c
)
target_link_libraries(gtcm_play
mumpsport
mumpsunix
mupipport
mupipunix
stubunix
gtmlinux2
lkeport
lkeunix
fisgtmproobj
${ARCHITECTURE_DEPENDENT_LIBRARIES}
${CURSES_LIBRARIES}
pthread
elf
dl
m
)
add_executable(gtcm_shmclean
../sr_unix_cm/gtcm_shmclean.c
)
target_link_libraries(gtcm_shmclean
mumpsport
mumpsunix
mupipport
mupipunix
gtmlinux2
stubunix
lkeport
lkeunix
fisgtmproobj
${ARCHITECTURE_DEPENDENT_LIBRARIES}
${CURSES_LIBRARIES}
pthread
elf
dl
m
)

View File

@ -0,0 +1,2 @@
#!/bin/bash
echo "FAKE MUMPS",$*

View File

@ -0,0 +1,64 @@
/****************************************************************
* *
* Copyright 2002, 2011 Fidelity Information Services, Inc *
* *
* This source code contains the intellectual property *
* of its copyright holder(s), and is made available *
* under a license. If you do not know the terms of *
* the license, please stop and do not read further. *
* *
****************************************************************/
/* Interlude to <limits.h> */
#ifndef GTM_LIMITSH
#define GTM_LIMITSH
#include <limits.h>
#ifdef __hpux
#include <inttypes.h>
#endif
/* The value 1023 for PATH_MAX is derived using pathconf("path", _PC_PATH_MAX) on z/OS.
* Since we cant afford calling a function on each use of PATH_MAX/GTM_PATH_MAX,
* this value is hardcoded here.
*/
#if defined (__MVS__)
#ifndef PATH_MAX
#define PATH_MAX 1023
#endif
#define GTM_PATH_MAX PATH_MAX + 1
#else
#define GTM_PATH_MAX 1024 /* includes terminating NULL */
#endif
#if defined(LLONG_MAX) /* C99 and others */
#define GTM_INT64_MIN LLONG_MIN
#define GTM_INT64_MAX LLONG_MAX
#define GTM_UINT64_MAX ULLONG_MAX
#elif defined(LONG_LONG_MAX)
#define GTM_INT64_MIN LONG_LONG_MIN
#define GTM_INT64_MAX LONG_LONG_MAX
#define GTM_UINT64_MAX ULONG_LONG_MAX
#elif defined(LONGLONG_MAX)
#define GTM_INT64_MIN LONGLONG_MIN
#define GTM_INT64_MAX LONGLONG_MAX
#define GTM_UINT64_MAX ULONGLONG_MAX
#elif defined(__INT64_MAX) /* OpenVMS Alpha */
#define GTM_INT64_MIN __INT64_MIN
#define GTM_INT64_MAX __INT64_MAX
#define GTM_UINT64_MAX __UINT64_MAX
#elif defined(INTMAX_MAX) /* HP-UX */
#define GTM_INT64_MIN INTMAX_MIN
#define GTM_INT64_MAX INTMAX_MAX
#define GTM_UINT64_MAX UINTMAX_MAX
#elif LONG_MAX != INT_MAX /* Tru64 */
#define GTM_INT64_MIN LONG_MIN
#define GTM_INT64_MAX LONG_MAX
#define GTM_UINT64_MAX ULONG_MAX
#else
#error Unable to determine 64 bit MAX in gtm_limits.h
#endif
#endif

View File

@ -0,0 +1,137 @@
/****************************************************************
* *
* Copyright 2010 Fidelity Information Services, Inc *
* *
* This source code contains the intellectual property *
* of its copyright holder(s), and is made available *
* under a license. If you do not know the terms of *
* the license, please stop and do not read further. *
* *
****************************************************************/
/* gtm_stdio.h - gtm interface to stdio.h */
#ifndef GTM_STDIOH
#define GTM_STDIOH
/* This header is split between sr_unix and sr_vvms because there are several test system and standalone modules
* that do not #define UNIX or VMS for us to know which defines to proceed with. So now this split makes
* that determination unnecessary. Note we still use the definition of UNIX or not in THIS header to indicate the
* compilation of a GTM source file or a standalone file not needing (or able to get to) libgtmshr wrappers.
*/
#include <stdio.h>
#define FDOPEN fdopen
#define FGETS(strg, n, strm, fgets_res) (fgets_res = fgets(strg,n,strm))
#define Fopen fopen
#define GETS(buffer, gets_res) syntax error
#define PERROR perror
#define POPEN popen
#define TEMPNAM tempnam
#ifndef P_tmpdir
#define P_tmpdir "/tmp"
#endif
#define DEFAULT_GTM_TMP P_tmpdir
#define RENAME rename
#define SETVBUF setvbuf
#ifdef UNIX
/* We are compiling a GTM source module if UNIX is defined */
# define FPRINTF gtm_fprintf
# define PRINTF gtm_printf
# define SPRINTF gtm_sprintf
# define SNPRINTF gtm_snprintf
int gtm_printf(const char *format, ...);
int gtm_fprintf(FILE *stream, const char *format, ...);
int gtm_sprintf(char *str, const char *format, ...);
int gtm_snprintf(char *str, size_t size, const char *format, ...);
#else
/* We are compiling a standalone or test system module so no override (This is NOT VMS) */
# define FPRINTF fprintf
# define PRINTF printf
# define SPRINTF sprintf
# define SNPRINTF snprintf
#endif
/* Similar to above for *scanf invocations. Note however that TRU64 does NOT have
* the v*scanf functions used by the wrappers so always use the non-wrapper versions.
*/
#if defined(UNIX) && !defined(__osf__)
# define SCANF gtm_scanf
# define SSCANF gtm_sscanf
# define FSCANF gtm_fscanf
int gtm_scanf(const char *format, ...);
int gtm_fscanf(FILE *stream, const char *format, ...);
int gtm_sscanf(char *str, const char *format, ...);
#else
# define SCANF scanf
# define SSCANF sscanf
# define FSCANF fscanf
#endif
#define VPRINTF(FORMAT, VALUE, RC) \
{ \
do \
{ \
RC = vprintf(FORMAT, VALUE); \
} while(-1 == RC && EINTR == errno); \
}
#define VFPRINTF(STREAM, FORMAT, VALUE, RC) \
{ \
do \
{ \
RC = vfprintf(STREAM, FORMAT, VALUE); \
} while(-1 == RC && EINTR == errno); \
}
#define VSPRINTF(STRING, FORMAT, VALUE, RC) \
{ \
do \
{ \
RC = vsprintf(STRING, FORMAT, VALUE); \
} while(-1 == RC && EINTR == errno); \
}
#define VSNPRINTF(STRING, SIZE, FORMAT, VALUE, RC) \
{ \
do \
{ \
RC = vsnprintf(STRING, SIZE, FORMAT, VALUE); \
} while(-1 == RC && EINTR == errno); \
}
/* Note TRU64 does not have these v*scanf() functions so they will generate errors if used */
#define VSCANF(FORMAT, POINTER, RC) \
{ \
do \
{ \
RC = vscanf(FORMAT, POINTER); \
} while(-1 == RC && EINTR == errno); \
}
#define VSSCANF(STRING, FORMAT, POINTER, RC) \
{ \
do \
{ \
RC = vsscanf(STRING, FORMAT, POINTER); \
} while(-1 == RC && EINTR == errno); \
}
#define VFSCANF(STREAM, FORMAT, POINTER, RC) \
{ \
do \
{ \
RC = vfscanf(STREAM, FORMAT, POINTER); \
} while(-1 == RC && EINTR == errno); \
}
#define SPRINTF_ENV_NUM(BUFF, ENV_VAR, ENV_VAL, ENV_IND) \
{ \
assert(NULL == strchr(ENV_VAR, '=')); /* strchr() done in ojstartchild() relies on this */ \
SPRINTF(BUFF, "%s=%d", ENV_VAR, ENV_VAL); *ENV_IND++ = BUFF; \
}
#define SPRINTF_ENV_STR(BUFF, ENV_VAR, ENV_VAL, ENV_IND) \
{ \
assert(NULL == strchr(ENV_VAR, '=')); /* strchr() done in ojstartchild() relies on this */ \
SPRINTF(BUFF, "%s=%s", ENV_VAR, ENV_VAL); *ENV_IND++ = BUFF; \
}
#endif

View File

@ -0,0 +1,50 @@
/****************************************************************
* *
* Copyright 2001, 2007 Fidelity Information Services, Inc *
* *
* This source code contains the intellectual property *
* of its copyright holder(s), and is made available *
* under a license. If you do not know the terms of *
* the license, please stop and do not read further. *
* *
****************************************************************/
/* gtm_stdlib.h - interlude to <stdlib.h> system header file. */
#ifndef GTM_STDLIBH
#define GTM_STDLIBH
#include <stdlib.h>
#ifndef __CYGWIN__
#define GETENV getenv
#else
char *gtm_getenv(char *varname);
#define GETENV gtm_getenv
#endif
#define ATOI atoi
#define ATOL atol
#define ATOF atof
#define PUTENV putenv
#define STRTOL strtol
#define STRTOLL strtoll
#define STRTOUL strtoul
#if INT_MAX < LONG_MAX /* like Tru64 */
#define STRTO64L strtol
#define STRTOU64L strtoul
#elif defined(__hpux)
#include <inttypes.h>
#define STRTO64L strtoimax
#define STRTOU64L strtoumax
#else
#define STRTO64L strtoll
#define STRTOU64L strtoull
#endif
#define MKSTEMP(template,mkstemp_res) (mkstemp_res = mkstemp(template))
#ifndef __CYGWIN__
#define SYSTEM system
#else
#define SYSTEM gtm_system
int gtm_system(const char *line);
#endif
#endif

View File

@ -0,0 +1,32 @@
/****************************************************************
* *
* Copyright 2001, 2011 Fidelity Information Services, Inc *
* *
* This source code contains the intellectual property *
* of its copyright holder(s), and is made available *
* under a license. If you do not know the terms of *
* the license, please stop and do not read further. *
* *
****************************************************************/
/* If this is not the vax, define string.h. This is because the Vax
has its own built-in instructions for string manipulation.
*/
#ifndef GTM_STRINGH
#define GTM_STRINGH
#ifndef __vax
# include <string.h>
#endif
#define STRERROR strerror
#define STRCPY(SOURCE, DEST) strcpy((char *)(SOURCE), (char *)(DEST))
#define STRNCPY_LIT(SOURCE, LITERAL) strncpy((char *)(SOURCE), (char *)(LITERAL), SIZEOF(LITERAL) - 1) /* BYPASSOK */
#define STRNCPY_STR(SOURCE, STRING, LEN) strncpy((char *)(SOURCE), (char *)(STRING), LEN)
#define STRCMP(SOURCE, DEST) strcmp((char *)(SOURCE), (char *)(DEST))
#define STRNCMP_LIT(SOURCE, LITERAL) strncmp(SOURCE, LITERAL, SIZEOF(LITERAL) - 1) /* BYPASSOK */
#define STRNCMP_STR(SOURCE, STRING, LEN) strncmp(SOURCE, STRING, LEN)
#endif

View File

@ -1,6 +1,6 @@
/****************************************************************
* *
* Copyright 2001 Sanchez Computer Associates, Inc. *
* Copyright 2009 Fidelity Information Services, Inc *
* *
* This source code contains the intellectual property *
* of its copyright holder(s), and is made available *
@ -9,9 +9,12 @@
* *
****************************************************************/
#ifndef MU_FILE_SIZE_INCLUDED
#define MU_FILE_SIZE_INCLUDED
#ifndef GTM_STRINGSH
#define GTM_STRINGSH
unsigned int mu_file_size(file_control *fc);
#include <strings.h>
#endif /* MU_FILE_SIZE_INCLUDED */
#define STRCASECMP strcasecmp
#define STRNCASECMP strncasecmp
#endif

View File

@ -0,0 +1,87 @@
/****************************************************************
* *
* Copyright 2001, 2011 Fidelity Information Services, Inc *
* *
* This source code contains the intellectual property *
* of its copyright holder(s), and is made available *
* under a license. If you do not know the terms of *
* the license, please stop and do not read further. *
* *
****************************************************************/
/* gtmxc_types.h - GT.M, Unix Edition External Call type definitions. */
#ifndef GTMXC_TYPES_H
#define GTMXC_TYPES_H
#ifdef __osf__
/* Ensure 32-bit pointers for compatibility with GT.M internal representations. */
#pragma pointer_size (save)
#pragma pointer_size (short)
#endif
typedef int xc_status_t;
typedef int xc_int_t;
typedef unsigned int xc_uint_t;
#if defined(__osf__)
typedef int xc_long_t;
typedef unsigned int xc_ulong_t;
#else
typedef long xc_long_t;
typedef unsigned long xc_ulong_t;
#endif
typedef float xc_float_t;
typedef double xc_double_t;
typedef char xc_char_t;
typedef int (*xc_pointertofunc_t)();
typedef struct
{
xc_long_t length;
xc_char_t *address;
} xc_string_t;
#ifdef __osf__
#pragma pointer_size (restore)
#endif
/* new types for external/call-in user - xc_* types still valid for backward compatibility */
typedef xc_status_t gtm_status_t;
typedef xc_int_t gtm_int_t;
typedef xc_uint_t gtm_uint_t;
typedef xc_long_t gtm_long_t;
typedef xc_ulong_t gtm_ulong_t;
typedef xc_float_t gtm_float_t;
typedef xc_double_t gtm_double_t;
typedef xc_char_t gtm_char_t;
typedef xc_string_t gtm_string_t;
typedef xc_pointertofunc_t gtm_pointertofunc_t;
typedef struct
{
gtm_string_t rtn_name;
void* handle;
} ci_name_descriptor;
/* call-in interface */
xc_status_t gtm_ci(const char *c_rtn_name, ...);
xc_status_t gtm_cip(ci_name_descriptor *ci_info, ...);
xc_status_t gtm_init(void);
xc_status_t gtm_exit(void);
void gtm_zstatus(char* msg, int len);
typedef int gtmcrypt_key_t;
typedef void *xc_fileid_ptr_t;
xc_status_t gtm_filename_to_id(xc_string_t *filename, xc_fileid_ptr_t *fileid);
xc_status_t gtm_is_file_identical(xc_fileid_ptr_t fileid1, xc_fileid_ptr_t fileid2);
void gtm_xcfileid_free(xc_fileid_ptr_t fileid);
void *gtm_malloc(size_t);
void gtm_free(void *);
#endif /* GTMXC_TYPES_H */

View File

@ -0,0 +1,21 @@
/****************************************************************
* *
* Copyright 2009 Fidelity Information Services, Inc *
* *
* This source code contains the intellectual property *
* of its copyright holder(s), and is made available *
* under a license. If you do not know the terms of *
* the license, please stop and do not read further. *
* *
****************************************************************/
#ifndef MAIN_PRAGMA_included
#define MAIN_PRAGMA_included
#ifdef __MVS__
#pragma runopts(ENVAR(_BPXK_AUTOCVT=ON))
#pragma runopts(FILETAG(AUTOCVT,AUTOTAG))
#endif
#endif /* MAIN_PRAGMA_included */

View File

@ -0,0 +1,35 @@
/****************************************************************
* *
* Copyright 2001,2012 Fidelity Information Services, Inc *
* *
* This source code contains the intellectual property *
* of its copyright holder(s), and is made available *
* under a license. If you do not know the terms of *
* the license, please stop and do not read further. *
* *
****************************************************************/
#include "mdef.h"
#include "error.h"
LITDEF err_msg cmerrors[] = {
"INVPROT", "Invalid protocol specified by remote partner", 0,
"REGNTFND", "Region referenced not initialized", 0,
"CMINTQUE", "Interlock failure accessing GT.CM server queue", 0,
"INVINTMSG", "Invalid interrupt message received.", 0,
"CMEXCDASTLM", "Exceeded AST limit. Cannot open database.", 0,
"CMSYSSRV", "Error doing system service, status:", 0,
};
LITDEF int CMERR_INVPROT = 150568970;
LITDEF int CMERR_REGNTFND = 150568978;
LITDEF int CMERR_CMINTQUE = 150568988;
LITDEF int CMERR_INVINTMSG = 150568994;
LITDEF int CMERR_CMEXCDASTLM = 150569002;
LITDEF int CMERR_CMSYSSRV = 150569010;
GBLDEF err_ctl cmerrors_ctl = {
249,
"GTCM",
&cmerrors[0],
6};

View File

@ -0,0 +1,73 @@
/****************************************************************
* *
* Copyright 2001,2012 Fidelity Information Services, Inc *
* *
* This source code contains the intellectual property *
* of its copyright holder(s), and is made available *
* under a license. If you do not know the terms of *
* the license, please stop and do not read further. *
* *
****************************************************************/
#include "mdef.h"
#include "error.h"
LITDEF err_msg cmierrors[] = {
"DCNINPROG", "Attempt to initiate operation while disconnect was in progress", 0,
"LNKNOTIDLE", "Attempt to initiate operation before previous operation completed", 0,
"ASSERT", "Assert failed !AD line !UL", 3,
"CMICHECK", "Internal CMI error. Report to your GT.M Support Channel.", 0,
"NETFAIL", "Failure of Net operation", 0,
"BADPORT", "Environment variable GTCM_TCP_PORT is not an integer", 0,
"NOTND", "tnd argument to cmi_init is NULL", 0,
"OVERRUN", "mbf argument in CLB is not large enough for packet", 0,
"NOSERVENT", "Sevices data lookup failure", 0,
"BADIPADDRPORT", "Bad specification of [ip address:port] in tnd", 0,
"REASON_CONNECT", "Incoming connection", 0,
"REASON_INTMSG", "Incoming urgent data", 0,
"REASON_DISCON", "Disconnect encountered", 0,
"REASON_ABORT", "Link aborted", 0,
"REASON_EXIT", "Exit", 0,
"REASON_PATHLOST", "Network path lost", 0,
"REASON_PROTOCOL", "Protocol error", 0,
"REASON_THIRDPARTY", "Thirdparty error", 0,
"REASON_TIMEOUT", "Network timeout", 0,
"REASON_NETSHUT", "Shutdown received", 0,
"REASON_REJECT", "Connection rejected", 0,
"REASON_IODONE", "I/O done", 0,
"REASON_OVERRUN", "Input overran buffer", 0,
"REASON_STATUS", "Status", 0,
"REASON_CONFIRM", "Confirm", 0,
};
LITDEF int CMI_DCNINPROG = 150634508;
LITDEF int CMI_LNKNOTIDLE = 150634516;
LITDEF int CMI_ASSERT = 150634522;
LITDEF int CMI_CMICHECK = 150634532;
LITDEF int CMI_NETFAIL = 150634538;
LITDEF int CMI_BADPORT = 150634546;
LITDEF int CMI_NOTND = 150634556;
LITDEF int CMI_OVERRUN = 150634562;
LITDEF int CMI_NOSERVENT = 150634570;
LITDEF int CMI_BADIPADDRPORT = 150634578;
LITDEF int CMI_REASON_CONNECT = 150634586;
LITDEF int CMI_REASON_INTMSG = 150634594;
LITDEF int CMI_REASON_DISCON = 150634602;
LITDEF int CMI_REASON_ABORT = 150634610;
LITDEF int CMI_REASON_EXIT = 150634618;
LITDEF int CMI_REASON_PATHLOST = 150634626;
LITDEF int CMI_REASON_PROTOCOL = 150634634;
LITDEF int CMI_REASON_THIRDPARTY = 150634642;
LITDEF int CMI_REASON_TIMEOUT = 150634650;
LITDEF int CMI_REASON_NETSHUT = 150634658;
LITDEF int CMI_REASON_REJECT = 150634666;
LITDEF int CMI_REASON_IODONE = 150634674;
LITDEF int CMI_REASON_OVERRUN = 150634682;
LITDEF int CMI_REASON_STATUS = 150634690;
LITDEF int CMI_REASON_CONFIRM = 150634698;
GBLDEF err_ctl cmierrors_ctl = {
250,
"CMI",
&cmierrors[0],
25};

View File

@ -0,0 +1,135 @@
/****************************************************************
* *
* Copyright 2001,2012 Fidelity Information Services, Inc *
* *
* This source code contains the intellectual property *
* of its copyright holder(s), and is made available *
* under a license. If you do not know the terms of *
* the license, please stop and do not read further. *
* *
****************************************************************/
#include "mdef.h"
#include "error.h"
LITDEF err_msg gdeerrors[] = {
"BLKSIZ512", "Block size !AD rounds to !AD", 4,
"EXECOM", "Executing command file !AD", 2,
"FNF", "File not found: !AD", 2,
"GDCREATE", "Creating Global Directory file !/ !AD", 2,
"GDECHECK", "Internal GDE consistency check", 0,
"GDUNKNFMT", "!AD !/ is not formatted as a Global Directory", 2,
"GDUPDATE", "Updating Global Directory file !/ !AD", 2,
"GDUSEDEFS", "Using defaults for Global Directory !/ !AD", 2,
"ILLCHAR", "!AD is not a legal character in this context", 2,
"INPINTEG", "Input integrity error -- aborting load", 0,
"KEYTOOBIG", "But record size !AD can only support key size !AD", 4,
"KEYSIZIS", "Key size is !AD", 2,
"KEYWRDAMB", "!AD is ambiguous for !AD", 4,
"KEYWRDBAD", "!AD is not a valid !AD", 4,
"LOADGD", "Loading Global Directory file !/ !AD", 2,
"LOGOFF", "No longer logging to file !AD", 2,
"LOGON", "Logging to file !AD", 2,
"LVSTARALON", "The * name cannot be deleted or renamed", 0,
"MAPBAD", "!AD !AD for !AD !AD does not exist", 8,
"MAPDUP", "!AD !AD and !AD both map to !AD !AD", 10,
"NAMSTARTBAD", "!AD must start with '%' or an alphabetic character", 2,
"NOACTION", "Not updating Global Directory !AD", 2,
"RPAREN", "List must end with right parenthesis or continue with comma", 0,
"NOEXIT", "Cannot exit because of verification failure", 0,
"NOLOG", "Logging is currently disabled!/ Log file is !AD.", 2,
"NOVALUE", "Qualifier !AD does not take a value", 2,
"NONEGATE", "Qualifier !AD cannot be negated", 2,
"OBJDUP", "!AD !AD already exists", 4,
"OBJNOTADD", "Not adding !AD !AD", 4,
"OBJNOTCHG", "Not changing !AD !AD", 4,
"OBJNOTFND", "!AD !AD does not exist", 4,
"OBJREQD", "!AD required", 2,
"PREFIXBAD", "!AD must start with an alphabetic character to be a !AD", 4,
"QUALBAD", "!AD is not a valid qualifier", 2,
"QUALDUP", "!AD qualifier appears more than once in the list", 2,
"QUALREQD", "!AD required", 2,
"RECTOOBIG", "Block size !AD and !AD reserved bytes limit record size to !AD", 6,
"RECSIZIS", "Record size is !AD", 2,
"REGIS", "in region !AD", 2,
"SEGIS", "in !AD segment !AD", 4,
"VALTOOBIG", "!AD is larger than the maximum of !AD for a !AD", 6,
"VALTOOLONG", "!AD exceeds the maximum length of !AD for a !AD", 6,
"VALTOOSMALL", "!AD is less than the minimum of !AD for a !AD", 6,
"VALUEBAD", "!AD is not a valid !AD", 4,
"VALUEREQD", "Qualifier !AD requires a value", 2,
"VERIFY", "Verification !AD", 2,
"BUFSIZIS", "Journal Buffer size is !AD", 2,
"BUFTOOSMALL", "But block size !AD requires buffer size !AD", 4,
"MMNOBEFORIMG", "MM segments do not support before image jounaling", 0,
"NOJNL", "!AD segments do not support journaling", 2,
"GDREADERR", "Error reading Global Directory: !AD", 2,
"GDNOTSET", "Global Directory not changed because the current GD cannot be written", 0,
"INVGBLDIR", "Invalid Global Directory spec: !AD.!/Continuing with !AD", 4,
"WRITEERROR", "Cannot exit because of write failure. Reason for failure: !AD", 2,
"NONASCII", "!AD is illegal for a !AD as it contains non-ASCII characters", 4,
"ENCNOMM", "!AD No encryption support for MM access method", 2,
};
LITDEF int GDE_BLKSIZ512 = 150503435;
LITDEF int GDE_EXECOM = 150503443;
LITDEF int GDE_FNF = 150503451;
LITDEF int GDE_GDCREATE = 150503459;
LITDEF int GDE_GDECHECK = 150503467;
LITDEF int GDE_GDUNKNFMT = 150503475;
LITDEF int GDE_GDUPDATE = 150503483;
LITDEF int GDE_GDUSEDEFS = 150503491;
LITDEF int GDE_ILLCHAR = 150503498;
LITDEF int GDE_INPINTEG = 150503508;
LITDEF int GDE_KEYTOOBIG = 150503515;
LITDEF int GDE_KEYSIZIS = 150503523;
LITDEF int GDE_KEYWRDAMB = 150503530;
LITDEF int GDE_KEYWRDBAD = 150503538;
LITDEF int GDE_LOADGD = 150503547;
LITDEF int GDE_LOGOFF = 150503555;
LITDEF int GDE_LOGON = 150503563;
LITDEF int GDE_LVSTARALON = 150503570;
LITDEF int GDE_MAPBAD = 150503579;
LITDEF int GDE_MAPDUP = 150503587;
LITDEF int GDE_NAMSTARTBAD = 150503594;
LITDEF int GDE_NOACTION = 150503603;
LITDEF int GDE_RPAREN = 150503610;
LITDEF int GDE_NOEXIT = 150503619;
LITDEF int GDE_NOLOG = 150503627;
LITDEF int GDE_NOVALUE = 150503634;
LITDEF int GDE_NONEGATE = 150503642;
LITDEF int GDE_OBJDUP = 150503650;
LITDEF int GDE_OBJNOTADD = 150503658;
LITDEF int GDE_OBJNOTCHG = 150503666;
LITDEF int GDE_OBJNOTFND = 150503674;
LITDEF int GDE_OBJREQD = 150503682;
LITDEF int GDE_PREFIXBAD = 150503690;
LITDEF int GDE_QUALBAD = 150503698;
LITDEF int GDE_QUALDUP = 150503706;
LITDEF int GDE_QUALREQD = 150503714;
LITDEF int GDE_RECTOOBIG = 150503723;
LITDEF int GDE_RECSIZIS = 150503731;
LITDEF int GDE_REGIS = 150503739;
LITDEF int GDE_SEGIS = 150503747;
LITDEF int GDE_VALTOOBIG = 150503755;
LITDEF int GDE_VALTOOLONG = 150503762;
LITDEF int GDE_VALTOOSMALL = 150503771;
LITDEF int GDE_VALUEBAD = 150503778;
LITDEF int GDE_VALUEREQD = 150503786;
LITDEF int GDE_VERIFY = 150503795;
LITDEF int GDE_BUFSIZIS = 150503803;
LITDEF int GDE_BUFTOOSMALL = 150503811;
LITDEF int GDE_MMNOBEFORIMG = 150503819;
LITDEF int GDE_NOJNL = 150503827;
LITDEF int GDE_GDREADERR = 150503835;
LITDEF int GDE_GDNOTSET = 150503843;
LITDEF int GDE_INVGBLDIR = 150503851;
LITDEF int GDE_WRITEERROR = 150503859;
LITDEF int GDE_NONASCII = 150503866;
LITDEF int GDE_ENCNOMM = 150503874;
GBLDEF err_ctl gdeerrors_ctl = {
248,
"GDE",
&gdeerrors[0],
56};

View File

@ -0,0 +1,608 @@
/****************************************************************
* *
* Copyright 2010, 2012 Fidelity Information Services, Inc *
* *
* This source code contains the intellectual property *
* of its copyright holder(s), and is made available *
* under a license. If you do not know the terms of *
* the license, please stop and do not read further. *
* *
****************************************************************/
/* Generated by /tmp/fisgtm/sr_linux/gen_gtm_threadgbl_deftypes.csh */
#ifndef GTM_THREADGBL_DEFTYPES_INCLUDED
#define GTM_THREADGBL_DEFTYPES_INCLUDED
/* Output selection criteria for PRO build */
#if !defined(DEBUG) || defined(PRO_BUILD)
# define ggo_grabbing_crit 0
# define ggt_grabbing_crit gd_region *
# define ggo_boolchain 8
# define ggt_boolchain triple
# define ggo_boolchain_ptr 144
# define ggt_boolchain_ptr triple *
# define ggo_code_generated 152
# define ggt_code_generated boolean_t
# define ggo_codegen_padlen 156
# define ggt_codegen_padlen int4
# define ggo_compile_time 160
# define ggt_compile_time boolean_t
# define ggo_curtchain 168
# define ggt_curtchain triple *
# define ggo_director_ident 176
# define ggt_director_ident mstr
# define ggo_director_mval 192
# define ggt_director_mval mval
# define ggo_director_token 224
# define ggt_director_token char
# define ggo_dollar_zcstatus 228
# define ggt_dollar_zcstatus int4
# define ggo_expr_depth 232
# define ggt_expr_depth unsigned int
# define ggo_expr_start 240
# define ggt_expr_start triple *
# define ggo_expr_start_orig 248
# define ggt_expr_start_orig triple *
# define ggo_for_nest_level 256
# define ggt_for_nest_level uint4
# define ggo_for_stack_ptr 264
# define ggt_for_stack_ptr oprtype **
# define ggo_gtm_fullbool 272
# define ggt_gtm_fullbool unsigned int
# define ggo_ind_result_array 280
# define ggt_ind_result_array mval **
# define ggo_ind_result_sp 288
# define ggt_ind_result_sp mval **
# define ggo_ind_result_top 296
# define ggt_ind_result_top mval **
# define ggo_ind_source_array 304
# define ggt_ind_source_array mval **
# define ggo_ind_source_sp 312
# define ggt_ind_source_sp mval **
# define ggo_ind_source_top 320
# define ggt_ind_source_top mval **
# define ggo_last_source_column 328
# define ggt_last_source_column short int
# define ggo_pos_in_chain 336
# define ggt_pos_in_chain triple
# define ggo_s2n_intlit 472
# define ggt_s2n_intlit boolean_t
# define ggo_saw_side_effect 476
# define ggt_saw_side_effect boolean_t
# define ggo_shift_side_effects 480
# define ggt_shift_side_effects int
# define ggo_source_error_found 484
# define ggt_source_error_found int4
# define ggo_temp_subs 488
# define ggt_temp_subs boolean_t
# define ggo_trigger_compile 492
# define ggt_trigger_compile boolean_t
# define ggo_window_ident 496
# define ggt_window_ident mstr
# define ggo_window_mval 512
# define ggt_window_mval mval
# define ggo_window_token 544
# define ggt_window_token char
# define ggo_dbinit_max_hrtbt_delta 548
# define ggt_dbinit_max_hrtbt_delta uint4
# define ggo_donot_commit 552
# define ggt_donot_commit boolean_t
# define ggo_donot_write_inctn_in_wcs_recover 556
# define ggt_donot_write_inctn_in_wcs_recover boolean_t
# define ggo_gd_targ_addr 560
# define ggt_gd_targ_addr gd_addr *
# define ggo_gtm_gvundef_fatal 568
# define ggt_gtm_gvundef_fatal boolean_t
# define ggo_gv_extname_size 572
# define ggt_gv_extname_size int4
# define ggo_gv_last_subsc_null 576
# define ggt_gv_last_subsc_null boolean_t
# define ggo_gv_mergekey2 584
# define ggt_gv_mergekey2 gv_key *
# define ggo_gv_reorgkey 592
# define ggt_gv_reorgkey gv_key *
# define ggo_gv_some_subsc_null 600
# define ggt_gv_some_subsc_null boolean_t
# define ggo_gv_sparekey 608
# define ggt_gv_sparekey gv_key *
# define ggo_gv_sparekey_mval 616
# define ggt_gv_sparekey_mval mval
# define ggo_gv_sparekey_size 648
# define ggt_gv_sparekey_size int4
# define ggo_gv_tporigkey_ptr 656
# define ggt_gv_tporigkey_ptr gv_orig_key_array *
# define ggo_in_gvcst_redo_root_search 664
# define ggt_in_gvcst_redo_root_search boolean_t
# define ggo_in_op_gvget 668
# define ggt_in_op_gvget boolean_t
# define ggo_issue_DBROLLEDBACK_anyways 672
# define ggt_issue_DBROLLEDBACK_anyways boolean_t
# define ggo_last_fnquery_return_subcnt 676
# define ggt_last_fnquery_return_subcnt int
# define ggo_last_fnquery_return_varname 680
# define ggt_last_fnquery_return_varname mval
# define ggo_new_dbinit_ipc 712
# define ggt_new_dbinit_ipc int4
# define ggo_ok_to_call_wcs_recover 716
# define ggt_ok_to_call_wcs_recover boolean_t
# define ggo_only_reset_clues_if_onln_rlbk 720
# define ggt_only_reset_clues_if_onln_rlbk boolean_t
# define ggo_prev_gv_target 728
# define ggt_prev_gv_target gv_namehead *
# define ggo_ready2signal_gvundef 736
# define ggt_ready2signal_gvundef boolean_t
# define ggo_semwait2long 740
# define ggt_semwait2long volatile boolean_t
# define ggo_tp_restart_count 744
# define ggt_tp_restart_count uint4
# define ggo_tp_restart_dont_counts 748
# define ggt_tp_restart_dont_counts uint4
# define ggo_tp_restart_entryref 752
# define ggt_tp_restart_entryref mval
# define ggo_tp_restart_failhist_indx 784
# define ggt_tp_restart_failhist_indx int4
# define ggo_tp_restart_needlock_cnt 788
# define ggt_tp_restart_needlock_cnt uint4
# define ggo_tp_restart_needlock_tn 792
# define ggt_tp_restart_needlock_tn trans_num
# define ggo_tprestart_syslog_delta 800
# define ggt_tprestart_syslog_delta int4
# define ggo_tprestart_syslog_limit 804
# define ggt_tprestart_syslog_limit int4
# define ggo_transform 808
# define ggt_transform boolean_t
# define ggo_wcs_recover_done 812
# define ggt_wcs_recover_done boolean_t
# define ggo_in_op_fnnext 816
# define ggt_in_op_fnnext boolean_t
# define ggo_local_collseq 824
# define ggt_local_collseq collseq *
# define ggo_local_collseq_stdnull 832
# define ggt_local_collseq_stdnull boolean_t
# define ggo_lv_null_subs 836
# define ggt_lv_null_subs int
# define ggo_max_lcl_coll_xform_bufsiz 840
# define ggt_max_lcl_coll_xform_bufsiz int
# define ggo_replgbl 848
# define ggt_replgbl replgbl_t
# define ggo_collseq_list 872
# define ggt_collseq_list collseq *
# define ggo_create_fatal_error_zshow_dmp_fptr 880
# define ggt_create_fatal_error_zshow_dmp_fptr void
# define gga_create_fatal_error_zshow_dmp_fptr (void)
typedef void (*ggf_create_fatal_error_zshow_dmp_fptr)(void);
# define ggo_disable_sigcont 888
# define ggt_disable_sigcont boolean_t
# define ggo_dollar_zcompile 896
# define ggt_dollar_zcompile mstr
# define ggo_dollar_zmode 912
# define ggt_dollar_zmode mval
# define ggo_dollar_zonlnrlbk 944
# define ggt_dollar_zonlnrlbk int
# define ggo_dollar_zroutines 952
# define ggt_dollar_zroutines mstr
# define ggo_error_on_jnl_file_lost 968
# define ggt_error_on_jnl_file_lost unsigned int
# define ggo_fnzsearch_lv_vars 976
# define ggt_fnzsearch_lv_vars lv_val *
# define ggo_fnzsearch_sub_mval 984
# define ggt_fnzsearch_sub_mval mval
# define ggo_fnzsearch_nullsubs_sav 1016
# define ggt_fnzsearch_nullsubs_sav int
# define ggo_gtm_env_init_done 1020
# define ggt_gtm_env_init_done boolean_t
# define ggo_gtm_env_xlate_entry 1024
# define ggt_gtm_env_xlate_entry int
# define gga_gtm_env_xlate_entry ()
typedef int (*ggf_gtm_env_xlate_entry)();
# define ggo_gtm_environment_init 1032
# define ggt_gtm_environment_init boolean_t
# define ggo_gtm_sigusr1_handler 1040
# define ggt_gtm_sigusr1_handler void
# define gga_gtm_sigusr1_handler (void)
typedef void (*ggf_gtm_sigusr1_handler)(void);
# define ggo_gtm_trctbl_cur 1048
# define ggt_gtm_trctbl_cur trctbl_entry *
# define ggo_gtm_trctbl_end 1056
# define ggt_gtm_trctbl_end trctbl_entry *
# define ggo_gtm_trctbl_groups 1064
# define ggt_gtm_trctbl_groups unsigned int
# define ggo_gtm_trctbl_start 1072
# define ggt_gtm_trctbl_start trctbl_entry *
# define ggo_gtm_waitstuck_script 1080
# define ggt_gtm_waitstuck_script mstr
# define ggo_gtmprompt 1096
# define ggt_gtmprompt mstr
# define ggo_in_zwrite 1112
# define ggt_in_zwrite boolean_t
# define ggo_lab_proxy 1120
# define ggt_lab_proxy lab_tabent_proxy
# define ggo_mprof_alloc_reclaim 1136
# define ggt_mprof_alloc_reclaim boolean_t
# define ggo_mprof_chunk_avail_size 1140
# define ggt_mprof_chunk_avail_size int
# define ggo_mprof_env_gbl_name 1144
# define ggt_mprof_env_gbl_name mval
# define ggo_mprof_ptr 1176
# define ggt_mprof_ptr mprof_wrapper *
# define ggo_mprof_reclaim_addr 1184
# define ggt_mprof_reclaim_addr char *
# define ggo_mprof_reclaim_cnt 1192
# define ggt_mprof_reclaim_cnt int
# define ggo_mprof_stack_curr_frame 1200
# define ggt_mprof_stack_curr_frame mprof_stack_frame *
# define ggo_mprof_stack_next_frame 1208
# define ggt_mprof_stack_next_frame mprof_stack_frame *
# define ggo_open_shlib_root 1216
# define ggt_open_shlib_root open_shlib *
# define ggo_parm_pool_ptr 1224
# define ggt_parm_pool_ptr parm_pool *
# define ggo_parms_cnt 1232
# define ggt_parms_cnt unsigned int
# define ggo_pipefifo_interrupt 1236
# define ggt_pipefifo_interrupt int
# define ggo_prof_fp 1240
# define ggt_prof_fp mprof_stack_frame *
# define ggo_trans_code_pop 1248
# define ggt_trans_code_pop mval *
# define ggo_view_ydirt_str 1256
# define ggt_view_ydirt_str char *
# define ggo_view_ydirt_str_len 1264
# define ggt_view_ydirt_str_len int4
# define ggo_zdate_form 1268
# define ggt_zdate_form int4
# define ggo_zintcmd_active 1272
# define ggt_zintcmd_active zintcmd_active_info
# define ggl_zintcmd_active 72
# define ggo_zro_root 1344
# define ggt_zro_root zro_ent *
# define ggo_zsearch_var 1352
# define ggt_zsearch_var lv_val *
# define ggo_zsearch_dir1 1360
# define ggt_zsearch_dir1 lv_val *
# define ggo_zsearch_dir2 1368
# define ggt_zsearch_dir2 lv_val *
# define ggo_fnpca 1376
# define ggt_fnpca fnpc_area
# define ggo_for_stack 19792
# define ggt_for_stack oprtype *
# define ggl_for_stack 256
# define ggo_for_temps 20048
# define ggt_for_temps boolean_t
# define ggl_for_temps 128
# define ggo_last_fnquery_return_sub 20176
# define ggt_last_fnquery_return_sub mval
# define ggl_last_fnquery_return_sub 1024
# define ggo_lcl_coll_xform_buff 21200
# define ggt_lcl_coll_xform_buff char *
# define ggo_parm_ary 21208
# define ggt_parm_ary char *
# define ggl_parm_ary 40
# define ggo_parm_ary_len 21248
# define ggt_parm_ary_len int
# define ggl_parm_ary_len 20
# define ggo_parm_str_len 21268
# define ggt_parm_str_len int
# define ggl_parm_str_len 20
# define ggo_prombuf 21288
# define ggt_prombuf char
# define ggl_prombuf 32
# define ggo_rt_name_tbl 21320
# define ggt_rt_name_tbl hash_table_mname
# define ggo_tp_restart_failhist_arry 21392
# define ggt_tp_restart_failhist_arry char
# define ggl_tp_restart_failhist_arry 32
# define ggo_director_string 21424
# define ggt_director_string char
# define ggl_director_string 32
# define ggo_window_string 21456
# define ggt_window_string char
# define ggl_window_string 32
# define ggo_callin_hashtab 21488
# define ggt_callin_hashtab hash_table_str *
# define ggo_ci_table 21496
# define ggt_ci_table callin_entry_list *
# define ggo_extcall_package_root 21504
# define ggt_extcall_package_root struct extcall_package_list *
# define ggo_gtmci_nested_level 21512
# define ggt_gtmci_nested_level unsigned int
# define ggo_want_empty_gvts 21516
# define ggt_want_empty_gvts boolean_t
# define size_gtm_threadgbl_struct 21520
#else
# define ggo_grabbing_crit 0
# define ggt_grabbing_crit gd_region *
# define ggo_boolchain 8
# define ggt_boolchain triple
# define ggo_boolchain_ptr 144
# define ggt_boolchain_ptr triple *
# define ggo_code_generated 152
# define ggt_code_generated boolean_t
# define ggo_codegen_padlen 156
# define ggt_codegen_padlen int4
# define ggo_compile_time 160
# define ggt_compile_time boolean_t
# define ggo_curtchain 168
# define ggt_curtchain triple *
# define ggo_director_ident 176
# define ggt_director_ident mstr
# define ggo_director_mval 192
# define ggt_director_mval mval
# define ggo_director_token 224
# define ggt_director_token char
# define ggo_dollar_zcstatus 228
# define ggt_dollar_zcstatus int4
# define ggo_expr_depth 232
# define ggt_expr_depth unsigned int
# define ggo_expr_start 240
# define ggt_expr_start triple *
# define ggo_expr_start_orig 248
# define ggt_expr_start_orig triple *
# define ggo_for_nest_level 256
# define ggt_for_nest_level uint4
# define ggo_for_stack_ptr 264
# define ggt_for_stack_ptr oprtype **
# define ggo_gtm_fullbool 272
# define ggt_gtm_fullbool unsigned int
# define ggo_ind_result_array 280
# define ggt_ind_result_array mval **
# define ggo_ind_result_sp 288
# define ggt_ind_result_sp mval **
# define ggo_ind_result_top 296
# define ggt_ind_result_top mval **
# define ggo_ind_source_array 304
# define ggt_ind_source_array mval **
# define ggo_ind_source_sp 312
# define ggt_ind_source_sp mval **
# define ggo_ind_source_top 320
# define ggt_ind_source_top mval **
# define ggo_last_source_column 328
# define ggt_last_source_column short int
# define ggo_pos_in_chain 336
# define ggt_pos_in_chain triple
# define ggo_s2n_intlit 472
# define ggt_s2n_intlit boolean_t
# define ggo_saw_side_effect 476
# define ggt_saw_side_effect boolean_t
# define ggo_shift_side_effects 480
# define ggt_shift_side_effects int
# define ggo_source_error_found 484
# define ggt_source_error_found int4
# define ggo_temp_subs 488
# define ggt_temp_subs boolean_t
# define ggo_trigger_compile 492
# define ggt_trigger_compile boolean_t
# define ggo_window_ident 496
# define ggt_window_ident mstr
# define ggo_window_mval 512
# define ggt_window_mval mval
# define ggo_window_token 544
# define ggt_window_token char
# define ggo_dbinit_max_hrtbt_delta 548
# define ggt_dbinit_max_hrtbt_delta uint4
# define ggo_donot_commit 552
# define ggt_donot_commit boolean_t
# define ggo_donot_write_inctn_in_wcs_recover 556
# define ggt_donot_write_inctn_in_wcs_recover boolean_t
# define ggo_gd_targ_addr 560
# define ggt_gd_targ_addr gd_addr *
# define ggo_gtm_gvundef_fatal 568
# define ggt_gtm_gvundef_fatal boolean_t
# define ggo_gv_extname_size 572
# define ggt_gv_extname_size int4
# define ggo_gv_last_subsc_null 576
# define ggt_gv_last_subsc_null boolean_t
# define ggo_gv_mergekey2 584
# define ggt_gv_mergekey2 gv_key *
# define ggo_gv_reorgkey 592
# define ggt_gv_reorgkey gv_key *
# define ggo_gv_some_subsc_null 600
# define ggt_gv_some_subsc_null boolean_t
# define ggo_gv_sparekey 608
# define ggt_gv_sparekey gv_key *
# define ggo_gv_sparekey_mval 616
# define ggt_gv_sparekey_mval mval
# define ggo_gv_sparekey_size 648
# define ggt_gv_sparekey_size int4
# define ggo_gv_tporigkey_ptr 656
# define ggt_gv_tporigkey_ptr gv_orig_key_array *
# define ggo_in_gvcst_redo_root_search 664
# define ggt_in_gvcst_redo_root_search boolean_t
# define ggo_in_op_gvget 668
# define ggt_in_op_gvget boolean_t
# define ggo_issue_DBROLLEDBACK_anyways 672
# define ggt_issue_DBROLLEDBACK_anyways boolean_t
# define ggo_last_fnquery_return_subcnt 676
# define ggt_last_fnquery_return_subcnt int
# define ggo_last_fnquery_return_varname 680
# define ggt_last_fnquery_return_varname mval
# define ggo_new_dbinit_ipc 712
# define ggt_new_dbinit_ipc int4
# define ggo_ok_to_call_wcs_recover 716
# define ggt_ok_to_call_wcs_recover boolean_t
# define ggo_only_reset_clues_if_onln_rlbk 720
# define ggt_only_reset_clues_if_onln_rlbk boolean_t
# define ggo_prev_gv_target 728
# define ggt_prev_gv_target gv_namehead *
# define ggo_ready2signal_gvundef 736
# define ggt_ready2signal_gvundef boolean_t
# define ggo_semwait2long 740
# define ggt_semwait2long volatile boolean_t
# define ggo_tp_restart_count 744
# define ggt_tp_restart_count uint4
# define ggo_tp_restart_dont_counts 748
# define ggt_tp_restart_dont_counts uint4
# define ggo_tp_restart_entryref 752
# define ggt_tp_restart_entryref mval
# define ggo_tp_restart_failhist_indx 784
# define ggt_tp_restart_failhist_indx int4
# define ggo_tp_restart_needlock_cnt 788
# define ggt_tp_restart_needlock_cnt uint4
# define ggo_tp_restart_needlock_tn 792
# define ggt_tp_restart_needlock_tn trans_num
# define ggo_tprestart_syslog_delta 800
# define ggt_tprestart_syslog_delta int4
# define ggo_tprestart_syslog_limit 804
# define ggt_tprestart_syslog_limit int4
# define ggo_transform 808
# define ggt_transform boolean_t
# define ggo_wcs_recover_done 812
# define ggt_wcs_recover_done boolean_t
# define ggo_in_op_fnnext 816
# define ggt_in_op_fnnext boolean_t
# define ggo_local_collseq 824
# define ggt_local_collseq collseq *
# define ggo_local_collseq_stdnull 832
# define ggt_local_collseq_stdnull boolean_t
# define ggo_lv_null_subs 836
# define ggt_lv_null_subs int
# define ggo_max_lcl_coll_xform_bufsiz 840
# define ggt_max_lcl_coll_xform_bufsiz int
# define ggo_replgbl 848
# define ggt_replgbl replgbl_t
# define ggo_collseq_list 872
# define ggt_collseq_list collseq *
# define ggo_create_fatal_error_zshow_dmp_fptr 880
# define ggt_create_fatal_error_zshow_dmp_fptr void
# define gga_create_fatal_error_zshow_dmp_fptr (void)
typedef void (*ggf_create_fatal_error_zshow_dmp_fptr)(void);
# define ggo_disable_sigcont 888
# define ggt_disable_sigcont boolean_t
# define ggo_dollar_zcompile 896
# define ggt_dollar_zcompile mstr
# define ggo_dollar_zmode 912
# define ggt_dollar_zmode mval
# define ggo_dollar_zonlnrlbk 944
# define ggt_dollar_zonlnrlbk int
# define ggo_dollar_zroutines 952
# define ggt_dollar_zroutines mstr
# define ggo_error_on_jnl_file_lost 968
# define ggt_error_on_jnl_file_lost unsigned int
# define ggo_fnzsearch_lv_vars 976
# define ggt_fnzsearch_lv_vars lv_val *
# define ggo_fnzsearch_sub_mval 984
# define ggt_fnzsearch_sub_mval mval
# define ggo_fnzsearch_nullsubs_sav 1016
# define ggt_fnzsearch_nullsubs_sav int
# define ggo_gtm_env_init_done 1020
# define ggt_gtm_env_init_done boolean_t
# define ggo_gtm_env_xlate_entry 1024
# define ggt_gtm_env_xlate_entry int
# define gga_gtm_env_xlate_entry ()
typedef int (*ggf_gtm_env_xlate_entry)();
# define ggo_gtm_environment_init 1032
# define ggt_gtm_environment_init boolean_t
# define ggo_gtm_sigusr1_handler 1040
# define ggt_gtm_sigusr1_handler void
# define gga_gtm_sigusr1_handler (void)
typedef void (*ggf_gtm_sigusr1_handler)(void);
# define ggo_gtm_trctbl_cur 1048
# define ggt_gtm_trctbl_cur trctbl_entry *
# define ggo_gtm_trctbl_end 1056
# define ggt_gtm_trctbl_end trctbl_entry *
# define ggo_gtm_trctbl_groups 1064
# define ggt_gtm_trctbl_groups unsigned int
# define ggo_gtm_trctbl_start 1072
# define ggt_gtm_trctbl_start trctbl_entry *
# define ggo_gtm_waitstuck_script 1080
# define ggt_gtm_waitstuck_script mstr
# define ggo_gtmprompt 1096
# define ggt_gtmprompt mstr
# define ggo_in_zwrite 1112
# define ggt_in_zwrite boolean_t
# define ggo_lab_proxy 1120
# define ggt_lab_proxy lab_tabent_proxy
# define ggo_mprof_alloc_reclaim 1136
# define ggt_mprof_alloc_reclaim boolean_t
# define ggo_mprof_chunk_avail_size 1140
# define ggt_mprof_chunk_avail_size int
# define ggo_mprof_env_gbl_name 1144
# define ggt_mprof_env_gbl_name mval
# define ggo_mprof_ptr 1176
# define ggt_mprof_ptr mprof_wrapper *
# define ggo_mprof_reclaim_addr 1184
# define ggt_mprof_reclaim_addr char *
# define ggo_mprof_reclaim_cnt 1192
# define ggt_mprof_reclaim_cnt int
# define ggo_mprof_stack_curr_frame 1200
# define ggt_mprof_stack_curr_frame mprof_stack_frame *
# define ggo_mprof_stack_next_frame 1208
# define ggt_mprof_stack_next_frame mprof_stack_frame *
# define ggo_open_shlib_root 1216
# define ggt_open_shlib_root open_shlib *
# define ggo_parm_pool_ptr 1224
# define ggt_parm_pool_ptr parm_pool *
# define ggo_parms_cnt 1232
# define ggt_parms_cnt unsigned int
# define ggo_pipefifo_interrupt 1236
# define ggt_pipefifo_interrupt int
# define ggo_prof_fp 1240
# define ggt_prof_fp mprof_stack_frame *
# define ggo_trans_code_pop 1248
# define ggt_trans_code_pop mval *
# define ggo_view_ydirt_str 1256
# define ggt_view_ydirt_str char *
# define ggo_view_ydirt_str_len 1264
# define ggt_view_ydirt_str_len int4
# define ggo_zdate_form 1268
# define ggt_zdate_form int4
# define ggo_zintcmd_active 1272
# define ggt_zintcmd_active zintcmd_active_info
# define ggl_zintcmd_active 72
# define ggo_zro_root 1344
# define ggt_zro_root zro_ent *
# define ggo_zsearch_var 1352
# define ggt_zsearch_var lv_val *
# define ggo_zsearch_dir1 1360
# define ggt_zsearch_dir1 lv_val *
# define ggo_zsearch_dir2 1368
# define ggt_zsearch_dir2 lv_val *
# define ggo_fnpca 1376
# define ggt_fnpca fnpc_area
# define ggo_for_stack 19792
# define ggt_for_stack oprtype *
# define ggl_for_stack 256
# define ggo_for_temps 20048
# define ggt_for_temps boolean_t
# define ggl_for_temps 128
# define ggo_last_fnquery_return_sub 20176
# define ggt_last_fnquery_return_sub mval
# define ggl_last_fnquery_return_sub 1024
# define ggo_lcl_coll_xform_buff 21200
# define ggt_lcl_coll_xform_buff char *
# define ggo_parm_ary 21208
# define ggt_parm_ary char *
# define ggl_parm_ary 40
# define ggo_parm_ary_len 21248
# define ggt_parm_ary_len int
# define ggl_parm_ary_len 20
# define ggo_parm_str_len 21268
# define ggt_parm_str_len int
# define ggl_parm_str_len 20
# define ggo_prombuf 21288
# define ggt_prombuf char
# define ggl_prombuf 32
# define ggo_rt_name_tbl 21320
# define ggt_rt_name_tbl hash_table_mname
# define ggo_tp_restart_failhist_arry 21392
# define ggt_tp_restart_failhist_arry char
# define ggl_tp_restart_failhist_arry 32
# define ggo_director_string 21424
# define ggt_director_string char
# define ggl_director_string 32
# define ggo_window_string 21456
# define ggt_window_string char
# define ggl_window_string 32
# define ggo_callin_hashtab 21488
# define ggt_callin_hashtab hash_table_str *
# define ggo_ci_table 21496
# define ggt_ci_table callin_entry_list *
# define ggo_extcall_package_root 21504
# define ggt_extcall_package_root struct extcall_package_list *
# define ggo_gtmci_nested_level 21512
# define ggt_gtmci_nested_level unsigned int
# define ggo_want_empty_gvts 21516
# define ggt_want_empty_gvts boolean_t
# define size_gtm_threadgbl_struct 21520
#endif
#endif

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,490 @@
/****************************************************************
* *
* Copyright 2001, 2012 Fidelity Information Services, Inc *
* *
* This source code contains the intellectual property *
* of its copyright holder(s), and is made available *
* under a license. If you do not know the terms of *
* the license, please stop and do not read further. *
* *
****************************************************************/
/*
* omi_srvc_xct.c ---
*
* Process a client's transaction.
*
*/
#include "mdef.h"
#include <errno.h>
#include "gtm_stdio.h"
#include "gtm_unistd.h"
#include "gtm_string.h"
#include "gtm_time.h" /* for time() */
#include "gtmio.h"
#include "have_crit.h"
#include "omi.h"
#include "gtcm.h"
#include "error.h"
#ifndef lint
static char rcsid[] = "$Header:$";
#endif
GBLREF int4 omi_errno;
GBLREF char *omi_pklog;
GBLREF char *omi_oprlist[];
GBLREF char *omi_errlist[];
GBLREF char *omi_pklog_addr;
GBLREF int history;
GBLREF boolean_t servtime_expired;
static omi_op omi_dispatch_table[OMI_OP_MAX] =
{
0,
omi_prc_conn,
omi_prc_stat,
omi_prc_disc,
0, 0, 0, 0, 0, 0,
omi_prc_set,
/* omi_prc_setp*/0,
/* omi_prc_sete*/0,
omi_prc_kill,
/* omi_prc_incr*/0,
0, 0, 0, 0, 0,
omi_prc_get,
omi_prc_def,
omi_prc_ordr,
omi_prc_next,
omi_prc_qry,
omi_prc_rord,
/* omi_prc_rqry*/0,
0, 0, 0,
omi_prc_lock,
omi_prc_unlk,
omi_prc_unlc,
omi_prc_unla
};
int omi_srvc_xact (omi_conn *cptr)
{
extern int4 omi_nxact, omi_nerrs, omi_brecv, omi_bsent, gtcm_stime;
extern int4 gtcm_ltime, omi_nxact2;
omi_vi mlen, xlen;
omi_li nxact;
omi_si hlen;
omi_req_hdr rh;
omi_err_hdr eh;
int4 rv, blen;
int bunches, xblk, i, fatal;
char buff[OMI_BUFSIZ], *bptr, *xend, *bend;
#ifdef BSD_TCP
int cc, save_errno;
/* If true, an error occurred */
cc =(int)(&cptr->buff[cptr->bsiz] - &cptr->bptr[cptr->blen]);
while (!servtime_expired && (cc = (int)(read(cptr->fd, &cptr->bptr[cptr->blen], cc))) < 0 && errno == EINTR)
;
save_errno = errno;
if (servtime_expired)
return -1;
if (cc < 0)
{
if (errno == ETIMEDOUT)
{
OMI_DBG((omi_debug, "%s: connection %d to %s timed out.\n",
SRVR_NAME, cptr->stats.id, gtcm_hname(&cptr->stats.sin)));
}
else if (errno == ECONNRESET)
{
OMI_DBG((omi_debug, "%s: connection %d to %s closed by remote client.\n",
SRVR_NAME, cptr->stats.id, gtcm_hname(&cptr->stats.sin)));
}
else
{
char msg[256];
SPRINTF(msg, "Attempted read from connection %d to %s failed",
cptr->stats.id, gtcm_hname(&cptr->stats.sin));
gtcm_rep_err(msg, save_errno);
}
return -1;
}
/* If true, the connection has closed */
else if (cc == 0)
{
return -1;
}
/* Buffer in use between &cptr->bptr[0] and &cptr->buff[cptr->bsiz] */
cptr->blen += cc;
cptr->stats.bytes_recv += cc;
omi_brecv += cc;
#else /* defined(BSD_TCP) */
#ifdef FILE_TCP
int cc;
cc = (int)(&cptr->buff[cptr->bsiz] - &cptr->bptr[cptr->blen]);
/* If true, an error occurred */
if ((cc = (int)read(cptr->fd, &cptr->bptr[cptr->blen], 4)) <= 0)
{
return -1;
}
cptr->blen += 4;
cptr->xptr = cptr->bptr;
OMI_VI_READ(&mlen, cptr->xptr);
if ((cc = (int)read(cptr->fd, &cptr->bptr[cptr->blen], mlen.value)) <= 0)
{
return -1;
}
cptr->blen += cc;
cptr->stats.bytes_recv += cc + 4;
omi_brecv += cc + 4;
#else /* defined(FILE_TCP) */
return -1;
#endif /* !defined(FILE_TCP) */
#endif /* !defined(BSD_TCP) */
/* If true, we don't have all of the transaction length yet */
if (cptr->blen < OMI_VI_SIZ)
{
/* If true, push the piece we have to the beginning of the buffer */
if (cptr->bptr != cptr->buff)
{
memmove(cptr->buff, cptr->bptr, cptr->blen);
cptr->bptr = cptr->buff;
}
return 0;
}
/* Place the transaction pointer so we can move through the data */
cptr->xptr = cptr->bptr;
OMI_VI_READ(&mlen, cptr->xptr);
if (mlen.value + 4 > OMI_BUFSIZ)
{
char msg[256];
SPRINTF(msg, "OMI packet length (%d) larger than max (%d)", mlen.value+4, OMI_BUFSIZ);
gtcm_cpktdmp((char *)cptr->bptr, cptr->blen, msg);
return -1;
}
/* If true, we don't have the full transaction yet */
if (cptr->blen < mlen.value + 4)
{
/* If true, push the piece we have to the beginning of the buffer */
if (cptr->bptr != cptr->buff)
{
memmove(cptr->buff, cptr->bptr, cptr->blen);
cptr->bptr = cptr->buff;
}
return 0;
}
/* We have the whole transaction in the buffer, decompose it. */
if (history)
{
init_omi_hist(cptr->stats.id);
save_omi_req(cptr->bptr, cptr->blen);
}
#ifdef DEBUG
/*
* if (omi_pklog && !INV_FD_P(cptr->pklog))
* if (!omi_pklog_addr || (!strcmp(omi_pklog_addr, strchr(cptr->stats.addr, '@')+1)))
* omi_dump_pkt(cptr);
*/
#endif /* defined(DEBUG) */
/* This is set to indicate a fatal error in a bunch */
fatal = 0;
/* This is set to indicate we processed an xblk */
xblk = 0;
/* If true, we need to worry about bunches */
if ((bunches = (cptr->exts & OMI_XTF_BUNCH)))
{
OMI_LI_READ(&nxact, cptr->xptr);
bptr = buff + OMI_VI_SIZ + OMI_LI_SIZ;
if (nxact.value * (OMI_RH_SIZ + 1) > mlen.value) /* || nxact.value < 0 */ /* is commented as it is always FALSE */
{
char msg[256];
SPRINTF(msg, "invalid OMI packet (invalid nxact)");
gtcm_cpktdmp((char *)cptr->bptr, cptr->blen, msg);
return -1;
}
}
else
{
nxact.value = 1;
bptr = buff;
xlen = mlen;
}
/* This is the end of the response buffer (for the *_prc_*() routines) */
bend = ARRAYTOP(buff);
/* Loop through the transaction(s) */
for (i = nxact.value; i > 0; i--)
{
if (bunches)
OMI_VI_READ(&xlen, cptr->xptr);
/* This pointer marks the end of this transaction */
xend = cptr->xptr + xlen.value;
/* Check the size of the operation-independent header */
OMI_SI_READ(&hlen, cptr->xptr);
/* Operation class and type */
OMI_LI_READ(&rh.op_class, cptr->xptr);
OMI_SI_READ(&rh.op_type, cptr->xptr);
/* User and Group */
OMI_LI_READ(&rh.user, cptr->xptr);
OMI_LI_READ(&rh.group, cptr->xptr);
/* Sequence number */
OMI_LI_READ(&rh.seq, cptr->xptr);
/* Reference ID */
OMI_LI_READ(&rh.ref, cptr->xptr);
/* Initialize in case of an error */
eh.type = 0;
/* Sanity check the transaction */
if (xlen.value > mlen.value || hlen.value != OMI_RH_SIZ)
{
eh.type = OMI_ER_PR_INVMSGFMT;
fatal = -1;
}
else if (cptr->state == OMI_ST_DISC && rh.op_type.value != OMI_CONNECT)
{
char msg[256];
SPRINTF(msg, "Request (%x) sent before session was established",
rh.op_type.value);
eh.type = OMI_ER_SE_NOSESS;
}
else if (cptr->state == OMI_ST_CONN && rh.op_type.value == OMI_CONNECT)
{
eh.type = OMI_ER_SE_CONNREQ;
fatal = 1;
}
else if (rh.op_class.value != 1)
{
if (!(cptr->exts & OMI_XTF_RC && rh.op_class.value == 2))
{
eh.type = OMI_ER_PR_INVMSGFMT;
fatal = -1;
}
}
else if (rh.op_type.value >= OMI_OP_MAX)
{
cptr->stats.xact[0]++;
eh.type = OMI_ER_PR_INVOPTYPE;
}
else if (!omi_dispatch_table[rh.op_type.value])
{
cptr->stats.xact[rh.op_type.value]++;
eh.type = OMI_ER_PR_INVOPTYPE;
}
/* Report any errors */
if (eh.type != OMI_ER_NO_ERROR || fatal)
{
if (eh.type == OMI_ER_NO_ERROR)
eh.type = OMI_ER_PR_INVMSGFMT;
eh.class = 1;
eh.modifier = 0;
omi_buff_rsp(&rh, &eh, 0, bptr, 0);
bptr += OMI_HDR_SIZ;
cptr->xptr = xend;
cptr->stats.errs[eh.type]++;
omi_nerrs++;
OMI_DBG((omi_debug, "gtcm_server: %6d: Error (PD): %s\n",
cptr->stats.id, omi_errlist[eh.type]));
if (fatal < 0)
break;
continue;
}
/* start counting server up time with the first transaction */
if (!omi_nxact)
gtcm_stime = (int4)time(0);
/* If true, this is an RC request; service it in the RC code */
if (cptr->exts & OMI_XTF_RC && rh.op_class.value == 2)
{
#ifdef GTCM_RC
omi_nxact++;
omi_nxact2++;
if ((rv = rc_srvc_xact(cptr, xend)) >= 0)
{
xblk = 1;
blen = rv + OMI_HDR_SIZ;
bptr = cptr->bptr;
bend = &cptr->buff[cptr->bsiz];
}
#else /* defined(RC) */
fatal = 1;
rv = -OMI_ER_PR_INVMSGFMT;
#endif /* !defined(GTCM_RC) */
}
/* Otherwise, deal with the OMI/EMI request */
else
{
/* Update the stats, do the operation */
cptr->stats.xact[rh.op_type.value]++;
omi_nxact++;
omi_nxact2++;
/* OMI_DBG((omi_debug, "gtcm_server: %6d: %s\n", cptr->stats.id,
* omi_oprlist[rh.op_type.value]));*/
omi_errno = OMI_ER_NO_ERROR;
/* Service the transaction(s) */
rv = (*omi_dispatch_table[rh.op_type.value])(cptr, xend, bptr + OMI_HDR_SIZ, bend);
/* If true (or true if) an exception is raised */
if (omi_errno != OMI_ER_NO_ERROR)
rv = -omi_errno;
}
/* If true, an error occurred servicing this transaction */
if (rv < 0)
{
eh.class = 1;
eh.type = -rv;
eh.modifier = 0;
omi_buff_rsp(&rh, &eh, 0, bptr, 0);
bptr += OMI_HDR_SIZ;
cptr->xptr = xend;
cptr->stats.errs[eh.type]++;
omi_nerrs++;
OMI_DBG((omi_debug, "gtcm_server: %6d: Error (AD): %s\n",
cptr->stats.id, omi_errlist[eh.type]));
omi_dump_pkt(cptr);
}
else
{
if (cptr->xptr != xend)
{
/* Only report this if we're not doing RC */
if (!(cptr->exts & OMI_XTF_RC && rh.op_class.value == 2))
NON_IA64_ONLY(OMI_DBG((omi_debug, "gtcm_server: xptr != xend (%d)\n", xend - cptr->xptr)));
IA64_ONLY(OMI_DBG((omi_debug, "gtcm_server: xptr != xend (%ld)\n", xend - cptr->xptr)));
cptr->xptr = xend;
}
omi_buff_rsp(&rh, (omi_err_hdr *)0, 0, bptr, rv);
bptr += OMI_HDR_SIZ + rv;
}
if (bptr >= bend)
{
gtcm_rep_err("Buffer overrun error", -1);
return -1;
}
}
/* If true, this was not an RC XBLK, so we need to calculate the
* size of the response */
if (!xblk)
{
blen = (int)(bptr - buff);
bptr = buff;
if (bunches)
{
OMI_VI_WRIT(blen - OMI_VI_SIZ, bptr);
OMI_LI_WRIT(nxact.value, bptr);
bptr = buff;
}
}
else
bptr = cptr->bptr;
/* Send the response(s) back to the client */
if (history)
save_omi_rsp(bptr, blen);
#ifdef BSD_TCP
/* Write out the response (in pieces if necessary) */
while (blen > 0)
{
while(!servtime_expired && (cc = (int)(write(cptr->fd, bptr, blen))) < 0)
;
save_errno = errno;
if (cc < 0)
{
if (errno == ETIMEDOUT)
{
OMI_DBG((omi_debug, "%s: connection %d to %s timed out.\n",
SRVR_NAME, cptr->stats.id, gtcm_hname(&cptr->stats.sin)));
}
else if (errno == ECONNRESET)
{
OMI_DBG((omi_debug, "%s: connection %d to %s closed by remote client.\n",
SRVR_NAME, cptr->stats.id, gtcm_hname(&cptr->stats.sin)));
}
else if (errno == EPIPE)
{
OMI_DBG((omi_debug, "%s: remote client no longer attached to connection %d, %s.\n",
SRVR_NAME, cptr->stats.id, gtcm_hname(&cptr->stats.sin)));
}
else if (errno == EINTR)
continue;
else
{
char msg[256];
SPRINTF(msg, "Write attempt to connection %d failed", cptr->stats.id);
gtcm_rep_err(msg, save_errno);
}
return -1;
}
bptr += cc;
blen -= cc;
cptr->stats.bytes_send += cc;
omi_bsent += cc;
}
#else /* defined(BSD_TCP) */
#ifdef FILE_TCP
bptr += blen;
cptr->stats.bytes_send += blen;
omi_bsent += blen;
blen -= blen;
#endif /* defined(FILE_TCP) */
#endif /* !defined(BSD_TCP) */
/* If true, a fatal error occurred with the last transaction */
/* also exitt if we received a disconnect request */
if (fatal || rh.op_type.value == OMI_DISCONNECT)
{
return -1;
}
/* Get ready for the next transaction */
cptr->bptr += mlen.value + 4;
cptr->blen -= mlen.value + 4;
if (cptr->xptr > cptr->bptr)
{
gtcm_rep_err("buffer size error", errno);
return -1;
}
/* If true, move the partial buffer to the beginning of the buffer */
if (cptr->blen > 0 && cptr->bptr != cptr->buff)
memmove(cptr->buff, cptr->bptr, cptr->blen);
/* Reset to the beginning of the buffer */
cptr->bptr = cptr->buff;
return 0;
}

View File

@ -0,0 +1,674 @@
/****************************************************************
* *
* Copyright 2001, 2012 Fidelity Information Services, Inc *
* *
* This source code contains the intellectual property *
* of its copyright holder(s), and is made available *
* under a license. If you do not know the terms of *
* the license, please stop and do not read further. *
* *
****************************************************************/
#include "mdef.h"
#include "vxi.h"
#include "vxt.h"
#include "xfer_enum.h"
LITDEF short ttt[4087] = {
/* 0 */ 0,0,0,0,307,3537,3010,549,
/* 8 */ 2329,2995,3025,2010,403,3487,2131,3111,
/* 16 */ 2208,2199,3720,3757,2172,2181,2247,2193,
/* 24 */ 2238,2217,2154,755,770,782,794,836,
/* 32 */ 854,869,898,934,949,964,982,1141,
/* 40 */ 1054,1087,1120,1198,1249,1579,1612,1627,
/* 48 */ 1657,1723,1753,1777,1840,1861,1876,3552,
/* 56 */ 3574,0,0,0,0,564,0,505,
/* 64 */ 0,1996,0,3097,0,0,0,0,
/* 72 */ 0,0,339,415,2307,2313,2743,2770,
/* 80 */ 2788,2891,2829,2820,2906,3626,3710,3046,
/* 88 */ 0,3076,3177,3140,3125,3155,3501,3353,
/* 96 */ 3632,3644,3659,3683,3692,3677,3668,3386,
/* 104 */ 3753,3766,3788,3825,3837,3858,3882,3948,
/* 112 */ 0,0,2939,2289,3229,4036,643,4039,
/* 120 */ 697,2800,3195,519,525,4042,2405,2497,
/* 128 */ 2379,472,2428,2517,2163,2460,2527,4045,
/* 136 */ 2274,2265,4049,1267,4050,335,331,3377,
/* 144 */ 427,4054,4057,4060,3062,4063,4066,4069,
/* 152 */ 4072,4075,4078,3523,0,2915,2583,2564,
/* 160 */ 1540,2555,2325,2145,2866,2031,722,2856,
/* 168 */ 0,0,2344,3701,3729,1471,3653,2440,
/* 176 */ 2024,534,3849,1825,2256,1183,322,3181,
/* 184 */ 606,675,587,653,3813,1102,3781,3039,
/* 192 */ 2283,2930,3053,625,994,2870,4081,2507,
/* 200 */ 3900,3918,3933,496,2885,3173,1957,3975,
/* 208 */ 3960,1285,3515,578,1642,1711,2472,4084,
/* 216 */ 3586,2543,731,812,3212,3741,3610,3596,
/* 224 */ 3603,3592,707,883,2392,2415,1036,2366,
/* 232 */ 1024,2226,1009,1069,2484,1441,1384,1369,
/* 240 */ 1423,1339,1351,1396,1324,1408,1456,0,
/* 248 */ 3473,0,910,919,3332,1852,3311,2353,
/* 256 */ 2450,2965,2971,2983,2951,1222,1234,1156,
/* 264 */ 1168,1210,3564,1687,1888,0,1297,1483,
/* 272 */ 1561,3407,1594,1672,1699,1810,1789,3449,
/* 280 */ 1735,3428,1921,1495,1510,1984,1903,3239,
/* 288 */ 3251,3263,3275,2779,2794,1528,436,1312,
/* 296 */ 1939,634,3287,3299,3969,3981,3990,4007,
/* 304 */ 4021,4027,3804,VXI_PUSHAB,VXT_VAL,0,VXI_PUSHAB,VXT_VAL,
/* 312 */ 2,VXI_PUSHAB,VXT_VAL,1,VXI_CALLS,VXT_LIT,3,VXT_XFER,
/* 320 */ SIZEOF(char *) * (short int)xf_add,VXT_END,
/* 322 */ VXT_IREPL,VXT_VAL,2,VXI_CALLS,VXT_VAL,1,VXT_XFER,SIZEOF(char *) * (short int)xf_bindparm,
/* 330 */ VXT_END,
/* 331 */ VXI_INCL,VXT_VAL,1,VXT_END,
/* 335 */ VXI_CLRL,VXT_VAL,0,VXT_END,
/* 339 */ VXI_JSB,VXT_XFER,SIZEOF(char *) * (short int)xf_break,VXT_END,
/* 343 */ VXI_PUSHL,VXT_VAL,2,VXI_JSB,VXT_XFER,SIZEOF(char *) * (short int)xf_callb,VXI_BRB,VXT_JMP,
/* 351 */ 1,VXT_END,
/* 353 */ VXI_PUSHL,VXT_VAL,2,VXI_JSB,VXT_XFER,SIZEOF(char *) * (short int)xf_calll,VXI_JMP,VXT_JMP,
/* 361 */ 1,VXT_END,
/* 363 */ VXI_PUSHL,VXT_VAL,2,VXI_JSB,VXT_XFER,SIZEOF(char *) * (short int)xf_callw,VXI_BRW,VXT_JMP,
/* 371 */ 1,VXT_END,
/* 373 */ VXI_PUSHL,VXT_VAL,2,VXI_JSB,VXT_XFER,SIZEOF(char *) * (short int)xf_callspb,VXI_BRB,VXT_JMP,
/* 381 */ 1,VXT_END,
/* 383 */ VXI_PUSHL,VXT_VAL,2,VXI_JSB,VXT_XFER,SIZEOF(char *) * (short int)xf_callspl,VXI_JMP,VXT_JMP,
/* 391 */ 1,VXT_END,
/* 393 */ VXI_PUSHL,VXT_VAL,2,VXI_JSB,VXT_XFER,SIZEOF(char *) * (short int)xf_callspw,VXI_BRW,VXT_JMP,
/* 401 */ 1,VXT_END,
/* 403 */ VXT_IREPAB,VXT_VAL,2,VXI_PUSHAB,VXT_VAL,0,VXI_CALLS,VXT_VAL,
/* 411 */ 1,VXT_XFER,SIZEOF(char *) * (short int)xf_cat,VXT_END,
/* 415 */ VXI_PUSHAB,VXT_VAL,2,VXI_PUSHAB,VXT_VAL,1,VXI_CALLS,VXT_LIT,
/* 423 */ 2,VXT_XFER,SIZEOF(char *) * (short int)xf_close,VXT_END,
/* 427 */ VXI_BICB2,VXT_LIT,1,VXT_REG,0x5A,VXI_JSB,VXT_XFER,SIZEOF(char *) * (short int)xf_dt_false,
/* 435 */ VXT_END,
/* 436 */ VXI_PUSHAB,VXT_VAL,1,VXI_CALLS,VXT_LIT,1,VXT_XFER,SIZEOF(char *) * (short int)xf_clralsvars,
/* 444 */ VXT_END,
/* 445 */ VXI_TSTL,VXT_VAL,1,VXT_END,
/* 449 */ VXI_MOVAB,VXT_VAL,1,VXT_REG,0x51,VXI_JSB,VXT_XFER,SIZEOF(char *) * (short int)xf_mval2bool,
/* 457 */ VXT_END,
/* 458 */ VXI_MOVAB,VXT_VAL,1,VXT_REG,0x51,VXI_JSB,VXT_XFER,SIZEOF(char *) * (short int)xf_mval2mint,
/* 466 */ VXI_MOVL,VXT_REG,0x50,VXT_VAL,0,VXT_END,
/* 472 */ VXI_PUSHL,VXT_VAL,2,VXI_PUSHAB,VXT_VAL,1,VXI_JSB,VXT_XFER,
/* 480 */ SIZEOF(char *) * (short int)xf_commarg,VXT_END,
/* 482 */ VXI_MOVAB,VXT_VAL,0,VXT_REG,0x50,VXI_MOVL,VXT_VAL,1,
/* 490 */ VXT_REG,0x51,VXI_JSB,VXT_XFER,SIZEOF(char *) * (short int)xf_mint2mval,VXT_END,
/* 496 */ VXI_MOVAB,VXT_VAL,1,VXT_REG,0x51,VXI_JSB,VXT_XFER,SIZEOF(char *) * (short int)xf_mval2num,
/* 504 */ VXT_END,
/* 505 */ VXI_MOVAB,VXT_VAL,1,VXT_REG,0x50,VXI_MOVAB,VXT_VAL,2,
/* 513 */ VXT_REG,0x51,VXI_JSB,VXT_XFER,SIZEOF(char *) * (short int)xf_contain,VXT_END,
/* 519 */ VXI_MOVL,VXT_REG,0x6C,VXT_ADDR,0,VXT_END,
/* 525 */ VXI_MOVAB,VXT_VAL,0,VXT_REG,0x51,VXI_JSB,VXT_XFER,SIZEOF(char *) * (short int)xf_currtn,
/* 533 */ VXT_END,
/* 534 */ VXI_PUSHAB,VXT_VAL,0,VXI_PUSHAB,VXT_VAL,2,VXI_PUSHL,VXT_VAL,
/* 542 */ 1,VXI_CALLS,VXT_LIT,3,VXT_XFER,SIZEOF(char *) * (short int)xf_cvtparm,VXT_END,
/* 549 */ VXI_PUSHAB,VXT_VAL,0,VXI_PUSHAB,VXT_VAL,2,VXI_PUSHAB,VXT_VAL,
/* 557 */ 1,VXI_CALLS,VXT_LIT,3,VXT_XFER,SIZEOF(char *) * (short int)xf_div,VXT_END,
/* 564 */ VXI_MOVAB,VXT_VAL,2,VXT_REG,0x51,VXI_MOVAB,VXT_VAL,1,
/* 572 */ VXT_REG,0x50,VXI_JSB,VXT_XFER,SIZEOF(char *) * (short int)xf_equ,VXT_END,
/* 578 */ VXI_MOVAB,VXT_VAL,1,VXT_REG,0x50,VXI_JSB,VXT_XFER,SIZEOF(char *) * (short int)xf_equnul,
/* 586 */ VXT_END,
/* 587 */ VXT_IREPAB,VXT_VAL,5,VXI_PUSHL,VXT_VAL,4,VXI_PUSHL,VXT_VAL,
/* 595 */ 3,VXI_PUSHL,VXT_VAL,2,VXI_PUSHL,VXT_LIT,0,VXI_JSB,
/* 603 */ VXT_XFER,SIZEOF(char *) * (short int)xf_exfun,VXT_END,
/* 606 */ VXT_IREPAB,VXT_VAL,5,VXI_PUSHL,VXT_VAL,4,VXI_PUSHL,VXT_VAL,
/* 614 */ 3,VXI_PUSHL,VXT_VAL,2,VXI_PUSHAB,VXT_VAL,0,VXI_JSB,
/* 622 */ VXT_XFER,SIZEOF(char *) * (short int)xf_exfun,VXT_END,
/* 625 */ VXI_PUSHAB,VXT_VAL,1,VXI_CALLS,VXT_LIT,1,VXT_XFER,SIZEOF(char *) * (short int)xf_exfunret,
/* 633 */ VXT_END,
/* 634 */ VXI_PUSHAB,VXT_VAL,1,VXI_CALLS,VXT_LIT,1,VXT_XFER,SIZEOF(char *) * (short int)xf_exfunretals,
/* 642 */ VXT_END,
/* 643 */ VXI_PUSHAB,VXT_VAL,2,VXI_PUSHAB,VXT_VAL,1,VXI_JSB,VXT_XFER,
/* 651 */ SIZEOF(char *) * (short int)xf_extcall,VXT_END,
/* 653 */ VXT_IREPAB,VXT_VAL,5,VXI_PUSHL,VXT_VAL,4,VXI_PUSHL,VXT_VAL,
/* 661 */ 3,VXI_PUSHL,VXT_LIT,0,VXI_PUSHAB,VXT_VAL,2,VXI_PUSHAB,
/* 669 */ VXT_VAL,1,VXI_JSB,VXT_XFER,SIZEOF(char *) * (short int)xf_extexfun,VXT_END,
/* 675 */ VXT_IREPAB,VXT_VAL,5,VXI_PUSHL,VXT_VAL,4,VXI_PUSHL,VXT_VAL,
/* 683 */ 3,VXI_PUSHAB,VXT_VAL,0,VXI_PUSHAB,VXT_VAL,2,VXI_PUSHAB,
/* 691 */ VXT_VAL,1,VXI_JSB,VXT_XFER,SIZEOF(char *) * (short int)xf_extexfun,VXT_END,
/* 697 */ VXI_PUSHAB,VXT_VAL,2,VXI_PUSHAB,VXT_VAL,1,VXI_JSB,VXT_XFER,
/* 705 */ SIZEOF(char *) * (short int)xf_extjmp,VXT_END,
/* 707 */ VXI_PUSHAB,VXT_VAL,0,VXI_PUSHAB,VXT_VAL,2,VXI_PUSHAB,VXT_VAL,
/* 715 */ 1,VXI_CALLS,VXT_LIT,3,VXT_XFER,SIZEOF(char *) * (short int)xf_exp,VXT_END,
/* 722 */ VXT_IREPL,VXT_VAL,2,VXI_CALLS,VXT_VAL,1,VXT_XFER,SIZEOF(char *) * (short int)xf_fetch,
/* 730 */ VXT_END,
/* 731 */ VXT_IREPAB,VXT_VAL,6,VXI_PUSHL,VXT_VAL,5,VXI_PUSHL,VXT_VAL,
/* 739 */ 4,VXI_PUSHAB,VXT_VAL,3,VXI_PUSHAB,VXT_VAL,2,VXI_PUSHL,
/* 747 */ VXT_LIT,0,VXI_CALLS,VXT_VAL,1,VXT_XFER,SIZEOF(char *) * (short int)xf_fnfgncal,VXT_END,
/* 755 */ VXI_PUSHAB,VXT_VAL,0,VXI_PUSHAB,VXT_VAL,1,VXI_PUSHL,VXT_VAL,
/* 763 */ 2,VXI_CALLS,VXT_LIT,3,VXT_XFER,SIZEOF(char *) * (short int)xf_fnascii,VXT_END,
/* 770 */ VXT_IREPL,VXT_VAL,2,VXI_PUSHAB,VXT_VAL,0,VXI_CALLS,VXT_VAL,
/* 778 */ 1,VXT_XFER,SIZEOF(char *) * (short int)xf_fnchar,VXT_END,
/* 782 */ VXI_PUSHAB,VXT_VAL,0,VXI_PUSHAB,VXT_VAL,1,VXI_CALLS,VXT_LIT,
/* 790 */ 2,VXT_XFER,SIZEOF(char *) * (short int)xf_fndata,VXT_END,
/* 794 */ VXI_PUSHAB,VXT_VAL,0,VXI_PUSHAB,VXT_VAL,1,VXI_PUSHL,VXT_VAL,
/* 802 */ 2,VXI_PUSHL,VXT_VAL,3,VXI_CALLS,VXT_LIT,4,VXT_XFER,
/* 810 */ SIZEOF(char *) * (short int)xf_fnextract,VXT_END,
/* 812 */ VXT_IREPAB,VXT_VAL,6,VXI_PUSHL,VXT_VAL,5,VXI_PUSHL,VXT_VAL,
/* 820 */ 4,VXI_PUSHAB,VXT_VAL,3,VXI_PUSHAB,VXT_VAL,2,VXI_PUSHAB,
/* 828 */ VXT_VAL,0,VXI_CALLS,VXT_VAL,1,VXT_XFER,SIZEOF(char *) * (short int)xf_fnfgncal,VXT_END,
/* 836 */ VXI_PUSHAB,VXT_VAL,0,VXI_PUSHL,VXT_VAL,3,VXI_PUSHAB,VXT_VAL,
/* 844 */ 2,VXI_PUSHAB,VXT_VAL,1,VXI_CALLS,VXT_LIT,4,VXT_XFER,
/* 852 */ SIZEOF(char *) * (short int)xf_fnfind,VXT_END,
/* 854 */ VXI_PUSHAB,VXT_VAL,0,VXI_PUSHAB,VXT_VAL,2,VXI_PUSHAB,VXT_VAL,
/* 862 */ 1,VXI_CALLS,VXT_LIT,3,VXT_XFER,SIZEOF(char *) * (short int)xf_fnfnumber,VXT_END,
/* 869 */ VXI_MOVAB,VXT_VAL,1,VXT_REG,0x51,VXI_MOVAB,VXT_VAL,0,
/* 877 */ VXT_REG,0x50,VXI_JSB,VXT_XFER,SIZEOF(char *) * (short int)xf_fnget,VXT_END,
/* 883 */ VXI_PUSHAB,VXT_VAL,2,VXI_PUSHAB,VXT_VAL,1,VXI_PUSHAB,VXT_VAL,
/* 891 */ 0,VXI_CALLS,VXT_LIT,3,VXT_XFER,SIZEOF(char *) * (short int)xf_fnget2,VXT_END,
/* 898 */ VXI_PUSHAB,VXT_VAL,1,VXI_PUSHAB,VXT_VAL,0,VXI_CALLS,VXT_LIT,
/* 906 */ 2,VXT_XFER,SIZEOF(char *) * (short int)xf_fngvget,VXT_END,
/* 910 */ VXI_PUSHAB,VXT_VAL,0,VXI_CALLS,VXT_LIT,1,VXT_XFER,SIZEOF(char *) * (short int)xf_fngvget1,
/* 918 */ VXT_END,
/* 919 */ VXI_PUSHAB,VXT_VAL,2,VXI_PUSHAB,VXT_VAL,1,VXI_PUSHAB,VXT_VAL,
/* 927 */ 0,VXI_CALLS,VXT_LIT,3,VXT_XFER,SIZEOF(char *) * (short int)xf_fngvget2,VXT_END,
/* 934 */ VXI_PUSHAB,VXT_VAL,0,VXI_PUSHAB,VXT_VAL,2,VXI_PUSHAB,VXT_VAL,
/* 942 */ 1,VXI_CALLS,VXT_LIT,3,VXT_XFER,SIZEOF(char *) * (short int)xf_fnincr,VXT_END,
/* 949 */ VXI_PUSHAB,VXT_VAL,0,VXI_PUSHL,VXT_VAL,2,VXI_PUSHAB,VXT_VAL,
/* 957 */ 1,VXI_CALLS,VXT_LIT,3,VXT_XFER,SIZEOF(char *) * (short int)xf_fnj2,VXT_END,
/* 964 */ VXI_PUSHAB,VXT_VAL,0,VXI_PUSHL,VXT_VAL,3,VXI_PUSHL,VXT_VAL,
/* 972 */ 2,VXI_PUSHAB,VXT_VAL,1,VXI_CALLS,VXT_LIT,4,VXT_XFER,
/* 980 */ SIZEOF(char *) * (short int)xf_fnj3,VXT_END,
/* 982 */ VXI_PUSHAB,VXT_VAL,0,VXI_PUSHAB,VXT_VAL,1,VXI_CALLS,VXT_LIT,
/* 990 */ 2,VXT_XFER,SIZEOF(char *) * (short int)xf_fnlength,VXT_END,
/* 994 */ VXI_PUSHAB,VXT_VAL,0,VXI_PUSHL,VXT_VAL,2,VXI_PUSHAB,VXT_VAL,
/* 1002 */ 1,VXI_CALLS,VXT_LIT,3,VXT_XFER,SIZEOF(char *) * (short int)xf_fnlvname,VXT_END,
/* 1009 */ VXI_PUSHAB,VXT_VAL,2,VXI_PUSHAB,VXT_VAL,0,VXI_PUSHAB,VXT_VAL,
/* 1017 */ 1,VXI_CALLS,VXT_LIT,3,VXT_XFER,SIZEOF(char *) * (short int)xf_fnlvnameo2,VXT_END,
/* 1024 */ VXI_PUSHAB,VXT_VAL,0,VXI_PUSHAB,VXT_VAL,1,VXI_CALLS,VXT_LIT,
/* 1032 */ 2,VXT_XFER,SIZEOF(char *) * (short int)xf_fnlvprvname,VXT_END,
/* 1036 */ VXT_IREPAB,VXT_VAL,4,VXI_PUSHAB,VXT_VAL,1,VXI_PUSHL,VXT_VAL,
/* 1044 */ 3,VXI_PUSHAB,VXT_VAL,0,VXI_CALLS,VXT_VAL,2,VXT_XFER,
/* 1052 */ SIZEOF(char *) * (short int)xf_fnname,VXT_END,
/* 1054 */ VXI_PUSHAB,VXT_VAL,0,VXI_PUSHAB,VXT_VAL,2,VXI_PUSHAB,VXT_VAL,
/* 1062 */ 1,VXI_CALLS,VXT_LIT,3,VXT_XFER,SIZEOF(char *) * (short int)xf_fnnext,VXT_END,
/* 1069 */ VXI_PUSHAB,VXT_VAL,3,VXI_PUSHAB,VXT_VAL,0,VXI_PUSHAB,VXT_VAL,
/* 1077 */ 2,VXI_PUSHAB,VXT_VAL,1,VXI_CALLS,VXT_LIT,4,VXT_XFER,
/* 1085 */ SIZEOF(char *) * (short int)xf_fno2,VXT_END,
/* 1087 */ VXI_PUSHAB,VXT_VAL,0,VXI_PUSHAB,VXT_VAL,2,VXI_PUSHAB,VXT_VAL,
/* 1095 */ 1,VXI_CALLS,VXT_LIT,3,VXT_XFER,SIZEOF(char *) * (short int)xf_fnorder,VXT_END,
/* 1102 */ VXI_PUSHAB,VXT_VAL,0,VXI_PUSHL,VXT_VAL,3,VXI_PUSHL,VXT_VAL,
/* 1110 */ 2,VXI_PUSHAB,VXT_VAL,1,VXI_CALLS,VXT_LIT,4,VXT_XFER,
/* 1118 */ SIZEOF(char *) * (short int)xf_fnp1,VXT_END,
/* 1120 */ VXI_PUSHAB,VXT_VAL,0,VXI_PUSHL,VXT_VAL,4,VXI_PUSHL,VXT_VAL,
/* 1128 */ 3,VXI_PUSHAB,VXT_VAL,2,VXI_PUSHAB,VXT_VAL,1,VXI_CALLS,
/* 1136 */ VXT_LIT,5,VXT_XFER,SIZEOF(char *) * (short int)xf_fnpiece,VXT_END,
/* 1141 */ VXI_PUSHAB,VXT_VAL,0,VXI_PUSHAB,VXT_VAL,2,VXI_PUSHAB,VXT_VAL,
/* 1149 */ 1,VXI_CALLS,VXT_LIT,3,VXT_XFER,SIZEOF(char *) * (short int)xf_fnpopulation,VXT_END,
/* 1156 */ VXI_PUSHAB,VXT_VAL,0,VXI_PUSHAB,VXT_VAL,1,VXI_CALLS,VXT_LIT,
/* 1164 */ 2,VXT_XFER,SIZEOF(char *) * (short int)xf_fnqlength,VXT_END,
/* 1168 */ VXI_PUSHAB,VXT_VAL,0,VXI_PUSHL,VXT_VAL,2,VXI_PUSHAB,VXT_VAL,
/* 1176 */ 1,VXI_CALLS,VXT_LIT,3,VXT_XFER,SIZEOF(char *) * (short int)xf_fnqsubscript,VXT_END,
/* 1183 */ VXT_IREPAB,VXT_VAL,3,VXI_PUSHAB,VXT_VAL,2,VXI_PUSHAB,VXT_VAL,
/* 1191 */ 0,VXI_CALLS,VXT_VAL,1,VXT_XFER,SIZEOF(char *) * (short int)xf_fnquery,VXT_END,
/* 1198 */ VXI_PUSHAB,VXT_VAL,0,VXI_PUSHL,VXT_VAL,1,VXI_CALLS,VXT_LIT,
/* 1206 */ 2,VXT_XFER,SIZEOF(char *) * (short int)xf_fnrandom,VXT_END,
/* 1210 */ VXI_PUSHAB,VXT_VAL,0,VXI_PUSHAB,VXT_VAL,1,VXI_CALLS,VXT_LIT,
/* 1218 */ 2,VXT_XFER,SIZEOF(char *) * (short int)xf_fnreverse,VXT_END,
/* 1222 */ VXI_PUSHAB,VXT_VAL,0,VXI_PUSHL,VXT_VAL,1,VXI_CALLS,VXT_LIT,
/* 1230 */ 2,VXT_XFER,SIZEOF(char *) * (short int)xf_fnstack1,VXT_END,
/* 1234 */ VXI_PUSHAB,VXT_VAL,0,VXI_PUSHAB,VXT_VAL,2,VXI_PUSHL,VXT_VAL,
/* 1242 */ 1,VXI_CALLS,VXT_LIT,3,VXT_XFER,SIZEOF(char *) * (short int)xf_fnstack2,VXT_END,
/* 1249 */ VXI_PUSHAB,VXT_VAL,0,VXI_PUSHAB,VXT_VAL,3,VXI_PUSHL,VXT_VAL,
/* 1257 */ 2,VXI_PUSHAB,VXT_VAL,1,VXI_CALLS,VXT_LIT,4,VXT_XFER,
/* 1265 */ SIZEOF(char *) * (short int)xf_fntext,VXT_END,
/* 1267 */ VXI_PUSHAB,VXT_VAL,0,VXI_PUSHAB,VXT_VAL,3,VXI_PUSHAB,VXT_VAL,
/* 1275 */ 2,VXI_PUSHAB,VXT_VAL,1,VXI_CALLS,VXT_LIT,4,VXT_XFER,
/* 1283 */ SIZEOF(char *) * (short int)xf_fntranslate,VXT_END,
/* 1285 */ VXT_IREPAB,VXT_VAL,2,VXI_PUSHAB,VXT_VAL,0,VXI_CALLS,VXT_VAL,
/* 1293 */ 1,VXT_XFER,SIZEOF(char *) * (short int)xf_fnview,VXT_END,
/* 1297 */ VXI_PUSHAB,VXT_VAL,0,VXI_PUSHAB,VXT_VAL,1,VXI_PUSHL,VXT_VAL,
/* 1305 */ 2,VXI_CALLS,VXT_LIT,3,VXT_XFER,SIZEOF(char *) * (short int)xf_fnzascii,VXT_END,
/* 1312 */ VXI_PUSHAB,VXT_VAL,0,VXI_PUSHAB,VXT_VAL,1,VXI_CALLS,VXT_LIT,
/* 1320 */ 2,VXT_XFER,SIZEOF(char *) * (short int)xf_fnzahandle,VXT_END,
/* 1324 */ VXI_PUSHAB,VXT_VAL,2,VXI_PUSHAB,VXT_VAL,1,VXI_PUSHAB,VXT_VAL,
/* 1332 */ 0,VXI_CALLS,VXT_LIT,3,VXT_XFER,SIZEOF(char *) * (short int)xf_fnzbitand,VXT_END,
/* 1339 */ VXI_PUSHAB,VXT_VAL,1,VXI_PUSHAB,VXT_VAL,0,VXI_CALLS,VXT_LIT,
/* 1347 */ 2,VXT_XFER,SIZEOF(char *) * (short int)xf_fnzbitcoun,VXT_END,
/* 1351 */ VXI_PUSHL,VXT_VAL,3,VXI_PUSHL,VXT_VAL,2,VXI_PUSHAB,VXT_VAL,
/* 1359 */ 1,VXI_PUSHAB,VXT_VAL,0,VXI_CALLS,VXT_LIT,4,VXT_XFER,
/* 1367 */ SIZEOF(char *) * (short int)xf_fnzbitfind,VXT_END,
/* 1369 */ VXI_PUSHL,VXT_VAL,2,VXI_PUSHAB,VXT_VAL,1,VXI_PUSHAB,VXT_VAL,
/* 1377 */ 0,VXI_CALLS,VXT_LIT,3,VXT_XFER,SIZEOF(char *) * (short int)xf_fnzbitget,VXT_END,
/* 1384 */ VXI_PUSHAB,VXT_VAL,1,VXI_PUSHAB,VXT_VAL,0,VXI_CALLS,VXT_LIT,
/* 1392 */ 2,VXT_XFER,SIZEOF(char *) * (short int)xf_fnzbitlen,VXT_END,
/* 1396 */ VXI_PUSHAB,VXT_VAL,1,VXI_PUSHAB,VXT_VAL,0,VXI_CALLS,VXT_LIT,
/* 1404 */ 2,VXT_XFER,SIZEOF(char *) * (short int)xf_fnzbitnot,VXT_END,
/* 1408 */ VXI_PUSHAB,VXT_VAL,2,VXI_PUSHAB,VXT_VAL,1,VXI_PUSHAB,VXT_VAL,
/* 1416 */ 0,VXI_CALLS,VXT_LIT,3,VXT_XFER,SIZEOF(char *) * (short int)xf_fnzbitor,VXT_END,
/* 1423 */ VXI_PUSHL,VXT_VAL,3,VXI_PUSHL,VXT_VAL,2,VXI_PUSHAB,VXT_VAL,
/* 1431 */ 1,VXI_PUSHAB,VXT_VAL,0,VXI_CALLS,VXT_LIT,4,VXT_XFER,
/* 1439 */ SIZEOF(char *) * (short int)xf_fnzbitset,VXT_END,
/* 1441 */ VXI_PUSHL,VXT_VAL,2,VXI_PUSHL,VXT_VAL,1,VXI_PUSHAB,VXT_VAL,
/* 1449 */ 0,VXI_CALLS,VXT_LIT,3,VXT_XFER,SIZEOF(char *) * (short int)xf_fnzbitstr,VXT_END,
/* 1456 */ VXI_PUSHAB,VXT_VAL,2,VXI_PUSHAB,VXT_VAL,1,VXI_PUSHAB,VXT_VAL,
/* 1464 */ 0,VXI_CALLS,VXT_LIT,3,VXT_XFER,SIZEOF(char *) * (short int)xf_fnzbitxor,VXT_END,
/* 1471 */ VXT_IREPAB,VXT_VAL,2,VXI_PUSHAB,VXT_VAL,0,VXI_CALLS,VXT_VAL,
/* 1479 */ 1,VXT_XFER,SIZEOF(char *) * (short int)xf_fnzcall,VXT_END,
/* 1483 */ VXT_IREPL,VXT_VAL,2,VXI_PUSHAB,VXT_VAL,0,VXI_CALLS,VXT_VAL,
/* 1491 */ 1,VXT_XFER,SIZEOF(char *) * (short int)xf_fnzchar,VXT_END,
/* 1495 */ VXI_PUSHAB,VXT_VAL,0,VXI_PUSHAB,VXT_VAL,2,VXI_PUSHAB,VXT_VAL,
/* 1503 */ 1,VXI_CALLS,VXT_LIT,3,VXT_XFER,SIZEOF(char *) * (short int)xf_fnzconvert2,VXT_END,
/* 1510 */ VXI_PUSHAB,VXT_VAL,0,VXI_PUSHAB,VXT_VAL,3,VXI_PUSHAB,VXT_VAL,
/* 1518 */ 2,VXI_PUSHAB,VXT_VAL,1,VXI_CALLS,VXT_LIT,4,VXT_XFER,
/* 1526 */ SIZEOF(char *) * (short int)xf_fnzconvert3,VXT_END,
/* 1528 */ VXI_PUSHAB,VXT_VAL,0,VXI_PUSHAB,VXT_VAL,1,VXI_CALLS,VXT_LIT,
/* 1536 */ 2,VXT_XFER,SIZEOF(char *) * (short int)xf_fnzdata,VXT_END,
/* 1540 */ VXI_PUSHAB,VXT_VAL,0,VXI_PUSHAB,VXT_VAL,4,VXI_PUSHAB,VXT_VAL,
/* 1548 */ 3,VXI_PUSHAB,VXT_VAL,2,VXI_PUSHAB,VXT_VAL,1,VXI_CALLS,
/* 1556 */ VXT_LIT,5,VXT_XFER,SIZEOF(char *) * (short int)xf_fnzdate,VXT_END,
/* 1561 */ VXI_PUSHAB,VXT_VAL,0,VXI_PUSHAB,VXT_VAL,1,VXI_PUSHL,VXT_VAL,
/* 1569 */ 2,VXI_PUSHL,VXT_VAL,3,VXI_CALLS,VXT_LIT,4,VXT_XFER,
/* 1577 */ SIZEOF(char *) * (short int)xf_fnzextract,VXT_END,
/* 1579 */ VXI_PUSHAB,VXT_VAL,0,VXI_PUSHAB,VXT_VAL,2,VXI_PUSHAB,VXT_VAL,
/* 1587 */ 1,VXI_CALLS,VXT_LIT,3,VXT_XFER,SIZEOF(char *) * (short int)xf_fnzfile,VXT_END,
/* 1594 */ VXI_PUSHAB,VXT_VAL,0,VXI_PUSHL,VXT_VAL,3,VXI_PUSHAB,VXT_VAL,
/* 1602 */ 2,VXI_PUSHAB,VXT_VAL,1,VXI_CALLS,VXT_LIT,4,VXT_XFER,
/* 1610 */ SIZEOF(char *) * (short int)xf_fnzfind,VXT_END,
/* 1612 */ VXI_PUSHAB,VXT_VAL,0,VXI_PUSHAB,VXT_VAL,2,VXI_PUSHAB,VXT_VAL,
/* 1620 */ 1,VXI_CALLS,VXT_LIT,3,VXT_XFER,SIZEOF(char *) * (short int)xf_fngetdvi,VXT_END,
/* 1627 */ VXI_PUSHAB,VXT_VAL,0,VXI_PUSHAB,VXT_VAL,2,VXI_PUSHL,VXT_VAL,
/* 1635 */ 1,VXI_CALLS,VXT_LIT,3,VXT_XFER,SIZEOF(char *) * (short int)xf_fngetjpi,VXT_END,
/* 1642 */ VXI_PUSHAB,VXT_VAL,0,VXI_PUSHAB,VXT_VAL,2,VXI_PUSHL,VXT_VAL,
/* 1650 */ 1,VXI_CALLS,VXT_LIT,3,VXT_XFER,SIZEOF(char *) * (short int)xf_fngetlki,VXT_END,
/* 1657 */ VXI_PUSHAB,VXT_VAL,0,VXI_PUSHAB,VXT_VAL,2,VXI_PUSHAB,VXT_VAL,
/* 1665 */ 1,VXI_CALLS,VXT_LIT,3,VXT_XFER,SIZEOF(char *) * (short int)xf_fngetsyi,VXT_END,
/* 1672 */ VXI_PUSHAB,VXT_VAL,0,VXI_PUSHL,VXT_VAL,2,VXI_PUSHAB,VXT_VAL,
/* 1680 */ 1,VXI_CALLS,VXT_LIT,3,VXT_XFER,SIZEOF(char *) * (short int)xf_fnzj2,VXT_END,
/* 1687 */ VXI_PUSHAB,VXT_VAL,0,VXI_PUSHAB,VXT_VAL,1,VXI_CALLS,VXT_LIT,
/* 1695 */ 2,VXT_XFER,SIZEOF(char *) * (short int)xf_fnzjobexam,VXT_END,
/* 1699 */ VXI_PUSHAB,VXT_VAL,0,VXI_PUSHAB,VXT_VAL,1,VXI_CALLS,VXT_LIT,
/* 1707 */ 2,VXT_XFER,SIZEOF(char *) * (short int)xf_fnzlength,VXT_END,
/* 1711 */ VXI_PUSHAB,VXT_VAL,0,VXI_PUSHL,VXT_VAL,1,VXI_CALLS,VXT_LIT,
/* 1719 */ 2,VXT_XFER,SIZEOF(char *) * (short int)xf_fnzlkid,VXT_END,
/* 1723 */ VXI_PUSHAB,VXT_VAL,0,VXI_PUSHL,VXT_VAL,1,VXI_CALLS,VXT_LIT,
/* 1731 */ 2,VXT_XFER,SIZEOF(char *) * (short int)xf_fnzm,VXT_END,
/* 1735 */ VXI_PUSHAB,VXT_VAL,0,VXI_PUSHL,VXT_VAL,3,VXI_PUSHL,VXT_VAL,
/* 1743 */ 2,VXI_PUSHAB,VXT_VAL,1,VXI_CALLS,VXT_LIT,4,VXT_XFER,
/* 1751 */ SIZEOF(char *) * (short int)xf_fnzp1,VXT_END,
/* 1753 */ VXI_PUSHAB,VXT_VAL,0,VXI_PUSHAB,VXT_VAL,5,VXI_PUSHAB,VXT_VAL,
/* 1761 */ 4,VXI_PUSHAB,VXT_VAL,3,VXI_PUSHAB,VXT_VAL,2,VXI_PUSHAB,
/* 1769 */ VXT_VAL,1,VXI_CALLS,VXT_LIT,6,VXT_XFER,SIZEOF(char *) * (short int)xf_fnzparse,VXT_END,
/* 1777 */ VXI_PUSHAB,VXT_VAL,0,VXI_PUSHL,VXT_VAL,1,VXI_CALLS,VXT_LIT,
/* 1785 */ 2,VXT_XFER,SIZEOF(char *) * (short int)xf_fnzpid,VXT_END,
/* 1789 */ VXI_PUSHAB,VXT_VAL,0,VXI_PUSHL,VXT_VAL,4,VXI_PUSHL,VXT_VAL,
/* 1797 */ 3,VXI_PUSHAB,VXT_VAL,2,VXI_PUSHAB,VXT_VAL,1,VXI_CALLS,
/* 1805 */ VXT_LIT,5,VXT_XFER,SIZEOF(char *) * (short int)xf_fnzpiece,VXT_END,
/* 1810 */ VXI_PUSHAB,VXT_VAL,0,VXI_PUSHAB,VXT_VAL,2,VXI_PUSHAB,VXT_VAL,
/* 1818 */ 1,VXI_CALLS,VXT_LIT,3,VXT_XFER,SIZEOF(char *) * (short int)xf_fnzpopulation,VXT_END,
/* 1825 */ VXI_PUSHAB,VXT_VAL,0,VXI_PUSHAB,VXT_VAL,2,VXI_PUSHAB,VXT_VAL,
/* 1833 */ 1,VXI_CALLS,VXT_LIT,3,VXT_XFER,SIZEOF(char *) * (short int)xf_fnzprevious,VXT_END,
/* 1840 */ VXI_PUSHAB,VXT_VAL,0,VXI_PUSHAB,VXT_VAL,1,VXI_CALLS,VXT_LIT,
/* 1848 */ 2,VXT_XFER,SIZEOF(char *) * (short int)xf_fnzpriv,VXT_END,
/* 1852 */ VXI_PUSHAB,VXT_VAL,0,VXI_CALLS,VXT_LIT,1,VXT_XFER,SIZEOF(char *) * (short int)xf_fnzqgblmod,
/* 1860 */ VXT_END,
/* 1861 */ VXI_PUSHAB,VXT_VAL,0,VXI_PUSHL,VXT_VAL,2,VXI_PUSHAB,VXT_VAL,
/* 1869 */ 1,VXI_CALLS,VXT_LIT,3,VXT_XFER,SIZEOF(char *) * (short int)xf_fnzsearch,VXT_END,
/* 1876 */ VXI_PUSHAB,VXT_VAL,0,VXI_PUSHAB,VXT_VAL,1,VXI_CALLS,VXT_LIT,
/* 1884 */ 2,VXT_XFER,SIZEOF(char *) * (short int)xf_fnzsetprv,VXT_END,
/* 1888 */ VXI_PUSHAB,VXT_VAL,0,VXI_PUSHL,VXT_VAL,2,VXI_PUSHL,VXT_VAL,
/* 1896 */ 1,VXI_CALLS,VXT_LIT,3,VXT_XFER,SIZEOF(char *) * (short int)xf_fnzsigproc,VXT_END,
/* 1903 */ VXI_PUSHAB,VXT_VAL,0,VXI_PUSHL,VXT_VAL,3,VXI_PUSHL,VXT_VAL,
/* 1911 */ 2,VXI_PUSHAB,VXT_VAL,1,VXI_CALLS,VXT_LIT,4,VXT_XFER,
/* 1919 */ SIZEOF(char *) * (short int)xf_fnzsubstr,VXT_END,
/* 1921 */ VXI_PUSHAB,VXT_VAL,0,VXI_PUSHAB,VXT_VAL,3,VXI_PUSHAB,VXT_VAL,
/* 1929 */ 2,VXI_PUSHAB,VXT_VAL,1,VXI_CALLS,VXT_LIT,4,VXT_XFER,
/* 1937 */ SIZEOF(char *) * (short int)xf_fnztranslate,VXT_END,
/* 1939 */ VXI_PUSHAB,VXT_VAL,0,VXI_PUSHAB,VXT_VAL,3,VXI_PUSHAB,VXT_VAL,
/* 1947 */ 2,VXI_PUSHAB,VXT_VAL,1,VXI_CALLS,VXT_LIT,4,VXT_XFER,
/* 1955 */ SIZEOF(char *) * (short int)xf_fnztrigger,VXT_END,
/* 1957 */ VXI_PUSHAB,VXT_VAL,0,VXI_PUSHAB,VXT_VAL,6,VXI_PUSHAB,VXT_VAL,
/* 1965 */ 5,VXI_PUSHAB,VXT_VAL,4,VXI_PUSHL,VXT_VAL,3,VXI_PUSHAB,
/* 1973 */ VXT_VAL,2,VXI_PUSHAB,VXT_VAL,1,VXI_CALLS,VXT_LIT,7,
/* 1981 */ VXT_XFER,SIZEOF(char *) * (short int)xf_fnztrnlnm,VXT_END,
/* 1984 */ VXI_PUSHAB,VXT_VAL,0,VXI_PUSHAB,VXT_VAL,1,VXI_CALLS,VXT_LIT,
/* 1992 */ 2,VXT_XFER,SIZEOF(char *) * (short int)xf_fnzwidth,VXT_END,
/* 1996 */ VXI_MOVAB,VXT_VAL,1,VXT_REG,0x50,VXI_MOVAB,VXT_VAL,2,
/* 2004 */ VXT_REG,0x51,VXI_JSB,VXT_XFER,SIZEOF(char *) * (short int)xf_follow,VXT_END,
/* 2010 */ VXI_MOVAB,VXT_VAL,0,VXT_REG,0x50,VXI_MOVAB,VXT_VAL,1,
/* 2018 */ VXT_REG,0x51,VXI_JSB,VXT_XFER,SIZEOF(char *) * (short int)xf_forcenum,VXT_END,
/* 2024 */ VXI_JSB,VXT_XFER,SIZEOF(char *) * (short int)xf_restartpc,VXI_JSB,VXT_XFER,SIZEOF(char *) * (short int)xf_forchk1,VXT_END,
/* 2031 */ VXI_PUSHAB,VXT_VAL,3,VXI_PUSHAB,VXT_VAL,2,VXI_PUSHAB,VXT_VAL,
/* 2039 */ 1,VXI_JSB,VXT_XFER,SIZEOF(char *) * (short int)xf_forinit,VXT_END,
/* 2044 */ VXI_PUSHL,VXT_VAL,2,VXI_JSB,VXT_XFER,SIZEOF(char *) * (short int)xf_forlcldob,VXI_BRB,VXT_JMP,
/* 2052 */ 1,VXT_END,
/* 2054 */ VXI_PUSHL,VXT_VAL,2,VXI_JSB,VXT_XFER,SIZEOF(char *) * (short int)xf_forlcldol,VXI_JMP,VXT_JMP,
/* 2062 */ 1,VXT_END,
/* 2064 */ VXI_PUSHL,VXT_VAL,2,VXI_JSB,VXT_XFER,SIZEOF(char *) * (short int)xf_forlcldow,VXI_BRW,VXT_JMP,
/* 2072 */ 1,VXT_END,
/* 2074 */ VXI_JSB,VXT_XFER,SIZEOF(char *) * (short int)xf_restartpc,VXI_PUSHAB,VXT_JMP,1,VXI_PUSHAB,VXT_VAL,
/* 2082 */ 4,VXI_PUSHAB,VXT_VAL,3,VXI_PUSHAB,VXT_VAL,2,VXI_JSB,
/* 2090 */ VXT_XFER,SIZEOF(char *) * (short int)xf_forloop,VXT_END,
/* 2093 */ VXI_JSB,VXT_XFER,SIZEOF(char *) * (short int)xf_restartpc,VXI_PUSHAB,VXT_JMP,1,VXI_PUSHAB,VXT_VAL,
/* 2101 */ 4,VXI_PUSHAB,VXT_VAL,3,VXI_PUSHAB,VXT_VAL,2,VXI_JSB,
/* 2109 */ VXT_XFER,SIZEOF(char *) * (short int)xf_forloop,VXT_END,
/* 2112 */ VXI_JSB,VXT_XFER,SIZEOF(char *) * (short int)xf_restartpc,VXI_PUSHAB,VXT_JMP,1,VXI_PUSHAB,VXT_VAL,
/* 2120 */ 4,VXI_PUSHAB,VXT_VAL,3,VXI_PUSHAB,VXT_VAL,2,VXI_JSB,
/* 2128 */ VXT_XFER,SIZEOF(char *) * (short int)xf_forloop,VXT_END,
/* 2131 */ VXT_IREPAB,VXT_VAL,2,VXI_CALLS,VXT_VAL,1,VXT_XFER,SIZEOF(char *) * (short int)xf_getindx,
/* 2139 */ VXI_MOVL,VXT_REG,0x50,VXT_ADDR,0,VXT_END,
/* 2145 */ VXI_MOVAB,VXT_VAL,0,VXT_REG,0x51,VXI_JSB,VXT_XFER,SIZEOF(char *) * (short int)xf_gettruth,
/* 2153 */ VXT_END,
/* 2154 */ VXI_PUSHAB,VXT_VAL,0,VXI_CALLS,VXT_LIT,1,VXT_XFER,SIZEOF(char *) * (short int)xf_gvdata,
/* 2162 */ VXT_END,
/* 2163 */ VXT_IREPAB,VXT_VAL,2,VXI_CALLS,VXT_VAL,1,VXT_XFER,SIZEOF(char *) * (short int)xf_gvextnam,
/* 2171 */ VXT_END,
/* 2172 */ VXI_PUSHAB,VXT_VAL,0,VXI_CALLS,VXT_LIT,1,VXT_XFER,SIZEOF(char *) * (short int)xf_gvget,
/* 2180 */ VXT_END,
/* 2181 */ VXI_PUSHAB,VXT_VAL,0,VXI_PUSHAB,VXT_VAL,2,VXI_CALLS,VXT_LIT,
/* 2189 */ 2,VXT_XFER,SIZEOF(char *) * (short int)xf_gvincr,VXT_END,
/* 2193 */ VXI_CALLS,VXT_LIT,0,VXT_XFER,SIZEOF(char *) * (short int)xf_gvkill,VXT_END,
/* 2199 */ VXT_IREPAB,VXT_VAL,2,VXI_CALLS,VXT_VAL,1,VXT_XFER,SIZEOF(char *) * (short int)xf_gvnaked,
/* 2207 */ VXT_END,
/* 2208 */ VXT_IREPAB,VXT_VAL,2,VXI_CALLS,VXT_VAL,1,VXT_XFER,SIZEOF(char *) * (short int)xf_gvname,
/* 2216 */ VXT_END,
/* 2217 */ VXI_PUSHAB,VXT_VAL,0,VXI_CALLS,VXT_LIT,1,VXT_XFER,SIZEOF(char *) * (short int)xf_gvnext,
/* 2225 */ VXT_END,
/* 2226 */ VXI_PUSHAB,VXT_VAL,1,VXI_PUSHAB,VXT_VAL,0,VXI_CALLS,VXT_LIT,
/* 2234 */ 2,VXT_XFER,SIZEOF(char *) * (short int)xf_gvo2,VXT_END,
/* 2238 */ VXI_PUSHAB,VXT_VAL,0,VXI_CALLS,VXT_LIT,1,VXT_XFER,SIZEOF(char *) * (short int)xf_gvorder,
/* 2246 */ VXT_END,
/* 2247 */ VXI_PUSHAB,VXT_VAL,1,VXI_CALLS,VXT_LIT,1,VXT_XFER,SIZEOF(char *) * (short int)xf_gvput,
/* 2255 */ VXT_END,
/* 2256 */ VXI_PUSHAB,VXT_VAL,0,VXI_CALLS,VXT_LIT,1,VXT_XFER,SIZEOF(char *) * (short int)xf_gvquery,
/* 2264 */ VXT_END,
/* 2265 */ VXI_PUSHAB,VXT_VAL,1,VXI_CALLS,VXT_LIT,1,VXT_XFER,SIZEOF(char *) * (short int)xf_gvrectarg,
/* 2273 */ VXT_END,
/* 2274 */ VXI_PUSHAB,VXT_VAL,0,VXI_CALLS,VXT_LIT,1,VXT_XFER,SIZEOF(char *) * (short int)xf_gvsavtarg,
/* 2282 */ VXT_END,
/* 2283 */ VXI_CALLS,VXT_LIT,0,VXT_XFER,SIZEOF(char *) * (short int)xf_gvzwithdraw,VXT_END,
/* 2289 */ VXI_JSB,VXT_XFER,SIZEOF(char *) * (short int)xf_restartpc,VXT_IREPAB,VXT_VAL,4,VXI_PUSHL,VXT_VAL,
/* 2297 */ 3,VXI_PUSHL,VXT_VAL,2,VXI_CALLS,VXT_VAL,1,VXT_XFER,
/* 2305 */ SIZEOF(char *) * (short int)xf_gvzwrite,VXT_END,
/* 2307 */ VXI_CALLS,VXT_LIT,0,VXT_XFER,SIZEOF(char *) * (short int)xf_halt,VXT_END,
/* 2313 */ VXI_JSB,VXT_XFER,SIZEOF(char *) * (short int)xf_restartpc,VXI_PUSHAB,VXT_VAL,1,VXI_CALLS,VXT_LIT,
/* 2321 */ 1,VXT_XFER,SIZEOF(char *) * (short int)xf_hang,VXT_END,
/* 2325 */ VXI_JSB,VXT_XFER,SIZEOF(char *) * (short int)xf_hardret,VXT_END,
/* 2329 */ VXI_PUSHAB,VXT_VAL,0,VXI_PUSHAB,VXT_VAL,2,VXI_PUSHAB,VXT_VAL,
/* 2337 */ 1,VXI_CALLS,VXT_LIT,3,VXT_XFER,SIZEOF(char *) * (short int)xf_idiv,VXT_END,
/* 2344 */ VXI_PUSHAB,VXT_VAL,0,VXI_CALLS,VXT_LIT,1,VXT_XFER,SIZEOF(char *) * (short int)xf_igetsrc,
/* 2352 */ VXT_END,
/* 2353 */ VXI_PUSHAB,VXT_VAL,0,VXI_PUSHL,VXT_VAL,2,VXI_PUSHAB,VXT_VAL,
/* 2361 */ 1,VXI_JSB,VXT_XFER,SIZEOF(char *) * (short int)xf_inddevparms,VXT_END,
/* 2366 */ VXI_PUSHAB,VXT_VAL,2,VXI_PUSHAB,VXT_VAL,1,VXI_PUSHAB,VXT_VAL,
/* 2374 */ 0,VXI_JSB,VXT_XFER,SIZEOF(char *) * (short int)xf_indfnname,VXT_END,
/* 2379 */ VXI_PUSHAB,VXT_VAL,0,VXI_PUSHL,VXT_VAL,2,VXI_PUSHAB,VXT_VAL,
/* 2387 */ 1,VXI_JSB,VXT_XFER,SIZEOF(char *) * (short int)xf_indfun,VXT_END,
/* 2392 */ VXI_PUSHAB,VXT_VAL,2,VXI_PUSHAB,VXT_VAL,1,VXI_PUSHAB,VXT_VAL,
/* 2400 */ 0,VXI_JSB,VXT_XFER,SIZEOF(char *) * (short int)xf_indget,VXT_END,
/* 2405 */ VXI_PUSHAB,VXT_VAL,0,VXI_PUSHAB,VXT_VAL,1,VXI_JSB,VXT_XFER,
/* 2413 */ SIZEOF(char *) * (short int)xf_indglvn,VXT_END,
/* 2415 */ VXI_PUSHAB,VXT_VAL,1,VXI_PUSHAB,VXT_VAL,2,VXI_PUSHAB,VXT_VAL,
/* 2423 */ 0,VXI_JSB,VXT_XFER,SIZEOF(char *) * (short int)xf_indincr,VXT_END,
/* 2428 */ VXI_PUSHAB,VXT_VAL,1,VXI_JSB,VXT_XFER,SIZEOF(char *) * (short int)xf_indlvadr,VXI_MOVL,VXT_REG,
/* 2436 */ 0x50,VXT_ADDR,0,VXT_END,
/* 2440 */ VXI_PUSHAB,VXT_VAL,0,VXI_PUSHAB,VXT_VAL,1,VXI_JSB,VXT_XFER,
/* 2448 */ SIZEOF(char *) * (short int)xf_indlvarg,VXT_END,
/* 2450 */ VXI_PUSHAB,VXT_VAL,1,VXI_PUSHAB,VXT_VAL,2,VXI_JSB,VXT_XFER,
/* 2458 */ SIZEOF(char *) * (short int)xf_indmerge,VXT_END,
/* 2460 */ VXT_IREPAB,VXT_VAL,2,VXI_PUSHAB,VXT_VAL,0,VXI_CALLS,VXT_VAL,
/* 2468 */ 1,VXT_XFER,SIZEOF(char *) * (short int)xf_indname,VXT_END,
/* 2472 */ VXI_PUSHAB,VXT_VAL,1,VXI_JSB,VXT_XFER,SIZEOF(char *) * (short int)xf_indlvnamadr,VXI_MOVL,VXT_REG,
/* 2480 */ 0x50,VXT_ADDR,0,VXT_END,
/* 2484 */ VXI_PUSHAB,VXT_VAL,2,VXI_PUSHAB,VXT_VAL,1,VXI_PUSHAB,VXT_VAL,
/* 2492 */ 0,VXI_JSB,VXT_XFER,SIZEOF(char *) * (short int)xf_indo2,VXT_END,
/* 2497 */ VXI_PUSHAB,VXT_VAL,0,VXI_PUSHAB,VXT_VAL,1,VXI_JSB,VXT_XFER,
/* 2505 */ SIZEOF(char *) * (short int)xf_indpat,VXT_END,
/* 2507 */ VXI_PUSHAB,VXT_VAL,2,VXI_PUSHAB,VXT_VAL,1,VXI_JSB,VXT_XFER,
/* 2515 */ SIZEOF(char *) * (short int)xf_indrzshow,VXT_END,
/* 2517 */ VXI_PUSHAB,VXT_VAL,2,VXI_PUSHAB,VXT_VAL,1,VXI_JSB,VXT_XFER,
/* 2525 */ SIZEOF(char *) * (short int)xf_indset,VXT_END,
/* 2527 */ VXI_PUSHAB,VXT_VAL,0,VXI_PUSHAB,VXT_VAL,3,VXI_PUSHL,VXT_VAL,
/* 2535 */ 2,VXI_PUSHAB,VXT_VAL,1,VXI_JSB,VXT_XFER,SIZEOF(char *) * (short int)xf_indtext,VXT_END,
/* 2543 */ VXI_JSB,VXT_XFER,SIZEOF(char *) * (short int)xf_restartpc,VXT_IREPAB,VXT_VAL,2,VXI_CALLS,VXT_VAL,
/* 2551 */ 1,VXT_XFER,SIZEOF(char *) * (short int)xf_iocontrol,VXT_END,
/* 2555 */ VXI_MOVAB,VXT_VAL,1,VXT_REG,0x51,VXI_JSB,VXT_XFER,SIZEOF(char *) * (short int)xf_iretmvad,
/* 2563 */ VXT_END,
/* 2564 */ VXI_PUSHAB,VXT_VAL,1,VXI_JSB,VXT_XFER,SIZEOF(char *) * (short int)xf_iretmval,VXT_END,
/* 2571 */ VXI_BRB,VXT_JMP,1,VXT_END,
/* 2575 */ VXI_JMP,VXT_JMP,1,VXT_END,
/* 2579 */ VXI_BRW,VXT_JMP,1,VXT_END,
/* 2583 */ VXI_JMP,VXT_VAL,1,VXT_END,
/* 2587 */ VXI_BEQL,VXT_JMP,1,VXT_END,
/* 2591 */ VXI_BNEQ,VXT_LIT,6,VXI_JMP,VXT_JMP,1,VXT_END,
/* 2598 */ VXI_BNEQ,VXT_LIT,3,VXI_BRW,VXT_JMP,1,VXT_END,
/* 2605 */ VXI_BGEQ,VXT_JMP,1,VXT_END,
/* 2609 */ VXI_BLSS,VXT_LIT,6,VXI_JMP,VXT_JMP,1,VXT_END,
/* 2616 */ VXI_BLSS,VXT_LIT,3,VXI_BRW,VXT_JMP,1,VXT_END,
/* 2623 */ VXI_BGTR,VXT_JMP,1,VXT_END,
/* 2627 */ VXI_BLEQ,VXT_LIT,6,VXI_JMP,VXT_JMP,1,VXT_END,
/* 2634 */ VXI_BLEQ,VXT_LIT,3,VXI_BRW,VXT_JMP,1,VXT_END,
/* 2641 */ VXI_BLEQ,VXT_JMP,1,VXT_END,
/* 2645 */ VXI_BGTR,VXT_LIT,6,VXI_JMP,VXT_JMP,1,VXT_END,
/* 2652 */ VXI_BGTR,VXT_LIT,3,VXI_BRW,VXT_JMP,1,VXT_END,
/* 2659 */ VXI_BLSS,VXT_JMP,1,VXT_END,
/* 2663 */ VXI_BGEQ,VXT_LIT,6,VXI_JMP,VXT_JMP,1,VXT_END,
/* 2670 */ VXI_BGEQ,VXT_LIT,3,VXI_BRW,VXT_JMP,1,VXT_END,
/* 2677 */ VXI_BNEQ,VXT_JMP,1,VXT_END,
/* 2681 */ VXI_BNEQ,VXT_LIT,6,VXI_JMP,VXT_JMP,1,VXT_END,
/* 2688 */ VXI_BEQL,VXT_LIT,3,VXI_BRW,VXT_JMP,1,VXT_END,
/* 2695 */ VXI_BLBC,VXT_REG,0x5A,VXT_JMP,1,VXT_END,
/* 2701 */ VXI_BLBS,VXT_REG,0x5A,VXT_LIT,6,VXI_JMP,VXT_JMP,1,
/* 2709 */ VXT_END,
/* 2710 */ VXI_BLBS,VXT_REG,0x5A,VXT_LIT,3,VXI_BRW,VXT_JMP,1,
/* 2718 */ VXT_END,
/* 2719 */ VXI_BLBS,VXT_REG,0x5A,VXT_JMP,1,VXT_END,
/* 2725 */ VXI_BLBC,VXT_REG,0x5A,VXT_LIT,6,VXI_JMP,VXT_JMP,1,
/* 2733 */ VXT_END,
/* 2734 */ VXI_BLBC,VXT_REG,0x5A,VXT_LIT,3,VXI_BRW,VXT_JMP,1,
/* 2742 */ VXT_END,
/* 2743 */ VXI_JSB,VXT_XFER,SIZEOF(char *) * (short int)xf_restartpc,VXT_IREPAB,VXT_VAL,7,VXI_PUSHL,VXT_VAL,
/* 2751 */ 6,VXI_PUSHAB,VXT_VAL,5,VXI_PUSHAB,VXT_VAL,4,VXI_PUSHL,
/* 2759 */ VXT_VAL,3,VXI_PUSHAB,VXT_VAL,2,VXI_CALLS,VXT_VAL,1,
/* 2767 */ VXT_XFER,SIZEOF(char *) * (short int)xf_job,VXT_END,
/* 2770 */ VXI_PUSHAB,VXT_VAL,1,VXI_CALLS,VXT_LIT,1,VXT_XFER,SIZEOF(char *) * (short int)xf_kill,
/* 2778 */ VXT_END,
/* 2779 */ VXI_PUSHL,VXT_VAL,1,VXI_CALLS,VXT_LIT,1,VXT_XFER,SIZEOF(char *) * (short int)xf_killalias,
/* 2787 */ VXT_END,
/* 2788 */ VXI_CALLS,VXT_LIT,0,VXT_XFER,SIZEOF(char *) * (short int)xf_killall,VXT_END,
/* 2794 */ VXI_CALLS,VXT_LIT,0,VXT_XFER,SIZEOF(char *) * (short int)xf_killaliasall,VXT_END,
/* 2800 */ VXI_PUSHL,VXT_VAL,2,VXI_PUSHAB,VXT_VAL,1,VXI_PUSHAB,VXT_VAL,
/* 2808 */ 3,VXI_CALLS,VXT_LIT,3,VXT_XFER,SIZEOF(char *) * (short int)xf_labaddr,VXI_MOVL,VXT_REG,
/* 2816 */ 0x50,VXT_ADDR,0,VXT_END,
/* 2820 */ VXI_PUSHL,VXT_VAL,1,VXI_CALLS,VXT_LIT,1,VXT_XFER,SIZEOF(char *) * (short int)xf_lckdecr,
/* 2828 */ VXT_END,
/* 2829 */ VXI_PUSHL,VXT_VAL,1,VXI_CALLS,VXT_LIT,1,VXT_XFER,SIZEOF(char *) * (short int)xf_lckincr,
/* 2837 */ VXT_END,
/* 2838 */ VXI_MOVAB,VXT_JMP,1,VXT_ADDR,0,VXT_END,
/* 2844 */ VXI_MOVAB,VXT_JMP,1,VXT_ADDR,0,VXT_END,
/* 2850 */ VXI_MOVAB,VXT_JMP,1,VXT_ADDR,0,VXT_END,
/* 2856 */ VXT_IREPL,VXT_VAL,2,VXI_PUSHL,VXT_VAL,1,VXI_JSB,VXT_XFER,
/* 2864 */ SIZEOF(char *) * (short int)xf_linefetch,VXT_END,
/* 2866 */ VXI_JSB,VXT_XFER,SIZEOF(char *) * (short int)xf_linestart,VXT_END,
/* 2870 */ VXT_IREPAB,VXT_VAL,4,VXI_PUSHAB,VXT_VAL,3,VXI_PUSHAB,VXT_VAL,
/* 2878 */ 2,VXI_CALLS,VXT_VAL,1,VXT_XFER,SIZEOF(char *) * (short int)xf_lkname,VXT_END,
/* 2885 */ VXI_CALLS,VXT_LIT,0,VXT_XFER,SIZEOF(char *) * (short int)xf_lkinit,VXT_END,
/* 2891 */ VXT_IREPAB,VXT_VAL,4,VXI_PUSHAB,VXT_VAL,3,VXI_PUSHL,VXT_VAL,
/* 2899 */ 2,VXI_CALLS,VXT_VAL,1,VXT_XFER,SIZEOF(char *) * (short int)xf_lkname,VXT_END,
/* 2906 */ VXI_PUSHL,VXT_VAL,1,VXI_CALLS,VXT_LIT,1,VXT_XFER,SIZEOF(char *) * (short int)xf_lock,
/* 2914 */ VXT_END,
/* 2915 */ VXI_JSB,VXT_XFER,SIZEOF(char *) * (short int)xf_restartpc,VXT_IREPAB,VXT_VAL,3,VXI_PUSHL,VXT_VAL,
/* 2923 */ 2,VXI_CALLS,VXT_VAL,1,VXT_XFER,SIZEOF(char *) * (short int)xf_lvpatwrite,VXT_END,
/* 2930 */ VXI_PUSHAB,VXT_VAL,1,VXI_CALLS,VXT_LIT,1,VXT_XFER,SIZEOF(char *) * (short int)xf_lvzwithdraw,
/* 2938 */ VXT_END,
/* 2939 */ VXI_JSB,VXT_XFER,SIZEOF(char *) * (short int)xf_restartpc,VXT_IREPAB,VXT_VAL,2,VXI_CALLS,VXT_VAL,
/* 2947 */ 1,VXT_XFER,SIZEOF(char *) * (short int)xf_lvzwrite,VXT_END,
/* 2951 */ VXT_IREPAB,VXT_VAL,2,VXI_CALLS,VXT_VAL,1,VXT_XFER,SIZEOF(char *) * (short int)xf_m_srchindx,
/* 2959 */ VXI_MOVL,VXT_REG,0x50,VXT_ADDR,0,VXT_END,
/* 2965 */ VXI_CALLS,VXT_LIT,0,VXT_XFER,SIZEOF(char *) * (short int)xf_merge,VXT_END,
/* 2971 */ VXI_PUSHL,VXT_LIT,0,VXI_PUSHL,VXT_VAL,1,VXI_CALLS,VXT_LIT,
/* 2979 */ 2,VXT_XFER,SIZEOF(char *) * (short int)xf_merge_arg,VXT_END,
/* 2983 */ VXI_PUSHAB,VXT_VAL,2,VXI_PUSHL,VXT_VAL,1,VXI_CALLS,VXT_LIT,
/* 2991 */ 2,VXT_XFER,SIZEOF(char *) * (short int)xf_merge_arg,VXT_END,
/* 2995 */ VXI_PUSHAB,VXT_VAL,0,VXI_PUSHAB,VXT_VAL,2,VXI_PUSHAB,VXT_VAL,
/* 3003 */ 1,VXI_CALLS,VXT_LIT,3,VXT_XFER,SIZEOF(char *) * (short int)xf_flt_mod,VXT_END,
/* 3010 */ VXI_PUSHAB,VXT_VAL,0,VXI_PUSHAB,VXT_VAL,2,VXI_PUSHAB,VXT_VAL,
/* 3018 */ 1,VXI_CALLS,VXT_LIT,3,VXT_XFER,SIZEOF(char *) * (short int)xf_mul,VXT_END,
/* 3025 */ VXI_MOVAB,VXT_VAL,0,VXT_REG,0x50,VXI_MOVAB,VXT_VAL,1,
/* 3033 */ VXT_REG,0x51,VXI_JSB,VXT_XFER,SIZEOF(char *) * (short int)xf_neg,VXT_END,
/* 3039 */ VXI_PUSHL,VXT_VAL,1,VXI_JSB,VXT_XFER,SIZEOF(char *) * (short int)xf_newintrinsic,VXT_END,
/* 3046 */ VXI_PUSHL,VXT_VAL,1,VXI_JSB,VXT_XFER,SIZEOF(char *) * (short int)xf_newvar,VXT_END,
/* 3053 */ VXI_PUSHAB,VXT_VAL,0,VXI_CALLS,VXT_LIT,1,VXT_XFER,SIZEOF(char *) * (short int)xf_nullexp,
/* 3061 */ VXT_END,
/* 3062 */ VXI_MOVAB,VXT_VAL,1,VXT_REG,0x50,VXI_MOVAB,VXT_VAL,2,
/* 3070 */ VXT_REG,0x51,VXI_JSB,VXT_XFER,SIZEOF(char *) * (short int)xf_numcmp,VXT_END,
/* 3076 */ VXI_JSB,VXT_XFER,SIZEOF(char *) * (short int)xf_restartpc,VXI_PUSHAB,VXT_VAL,4,VXI_PUSHL,VXT_VAL,
/* 3084 */ 3,VXI_PUSHAB,VXT_VAL,2,VXI_PUSHAB,VXT_VAL,1,VXI_CALLS,
/* 3092 */ VXT_LIT,4,VXT_XFER,SIZEOF(char *) * (short int)xf_open,VXT_END,
/* 3097 */ VXI_MOVAB,VXT_VAL,1,VXT_REG,0x50,VXI_MOVAB,VXT_VAL,2,
/* 3105 */ VXT_REG,0x51,VXI_JSB,VXT_XFER,SIZEOF(char *) * (short int)xf_pattern,VXT_END,
/* 3111 */ VXT_IREPAB,VXT_VAL,2,VXI_CALLS,VXT_VAL,1,VXT_XFER,SIZEOF(char *) * (short int)xf_putindx,
/* 3119 */ VXI_MOVL,VXT_REG,0x50,VXT_ADDR,0,VXT_END,
/* 3125 */ VXI_JSB,VXT_XFER,SIZEOF(char *) * (short int)xf_restartpc,VXI_PUSHL,VXT_VAL,1,VXI_PUSHAB,VXT_VAL,
/* 3133 */ 0,VXI_CALLS,VXT_LIT,2,VXT_XFER,SIZEOF(char *) * (short int)xf_rdone,VXT_END,
/* 3140 */ VXI_JSB,VXT_XFER,SIZEOF(char *) * (short int)xf_restartpc,VXI_PUSHL,VXT_VAL,1,VXI_PUSHAB,VXT_VAL,
/* 3148 */ 0,VXI_CALLS,VXT_LIT,2,VXT_XFER,SIZEOF(char *) * (short int)xf_read,VXT_END,
/* 3155 */ VXI_JSB,VXT_XFER,SIZEOF(char *) * (short int)xf_restartpc,VXI_PUSHL,VXT_VAL,2,VXI_PUSHL,VXT_VAL,
/* 3163 */ 1,VXI_PUSHAB,VXT_VAL,0,VXI_CALLS,VXT_LIT,3,VXT_XFER,
/* 3171 */ SIZEOF(char *) * (short int)xf_readfl,VXT_END,
/* 3173 */ VXI_JSB,VXT_XFER,SIZEOF(char *) * (short int)xf_restartpc,VXT_END,
/* 3177 */ VXI_JSB,VXT_XFER,SIZEOF(char *) * (short int)xf_ret,VXT_END,
/* 3181 */ VXI_MOVAB,VXT_VAL,1,VXT_REG,0x50,VXI_MOVL,VXT_VAL,2,
/* 3189 */ VXT_REG,0x51,VXI_JSB,VXT_XFER,SIZEOF(char *) * (short int)xf_retarg,VXT_END,
/* 3195 */ VXI_PUSHAB,VXT_VAL,2,VXI_PUSHAB,VXT_VAL,1,VXI_CALLS,VXT_LIT,
/* 3203 */ 2,VXT_XFER,SIZEOF(char *) * (short int)xf_rhdaddr,VXI_MOVL,VXT_REG,0x50,VXT_ADDR,0,
/* 3211 */ VXT_END,
/* 3212 */ VXI_PUSHL,VXT_LIT,0,VXI_PUSHAB,VXT_VAL,1,VXI_CALLS,VXT_LIT,
/* 3220 */ 2,VXT_XFER,SIZEOF(char *) * (short int)xf_rhdaddr,VXI_MOVL,VXT_REG,0x50,VXT_ADDR,0,
/* 3228 */ VXT_END,
/* 3229 */ VXI_PUSHL,VXT_VAL,2,VXI_PUSHL,VXT_VAL,1,VXI_JSB,VXT_XFER,
/* 3237 */ SIZEOF(char *) * (short int)xf_rterror,VXT_END,
/* 3239 */ VXI_PUSHL,VXT_VAL,1,VXI_PUSHAB,VXT_VAL,2,VXI_CALLS,VXT_LIT,
/* 3247 */ 2,VXT_XFER,SIZEOF(char *) * (short int)xf_setals2als,VXT_END,
/* 3251 */ VXI_PUSHAB,VXT_VAL,1,VXI_PUSHAB,VXT_VAL,2,VXI_CALLS,VXT_LIT,
/* 3259 */ 2,VXT_XFER,SIZEOF(char *) * (short int)xf_setalsin2alsct,VXT_END,
/* 3263 */ VXI_PUSHL,VXT_VAL,1,VXI_PUSHAB,VXT_VAL,2,VXI_CALLS,VXT_LIT,
/* 3271 */ 2,VXT_XFER,SIZEOF(char *) * (short int)xf_setalsctin2als,VXT_END,
/* 3275 */ VXI_PUSHAB,VXT_VAL,1,VXI_PUSHAB,VXT_VAL,2,VXI_CALLS,VXT_LIT,
/* 3283 */ 2,VXT_XFER,SIZEOF(char *) * (short int)xf_setalsct2alsct,VXT_END,
/* 3287 */ VXI_PUSHL,VXT_VAL,1,VXI_PUSHAB,VXT_VAL,2,VXI_CALLS,VXT_LIT,
/* 3295 */ 2,VXT_XFER,SIZEOF(char *) * (short int)xf_setfnretin2als,VXT_END,
/* 3299 */ VXI_PUSHAB,VXT_VAL,1,VXI_PUSHAB,VXT_VAL,2,VXI_CALLS,VXT_LIT,
/* 3307 */ 2,VXT_XFER,SIZEOF(char *) * (short int)xf_setfnretin2alsct,VXT_END,
/* 3311 */ VXI_PUSHAB,VXT_VAL,0,VXI_PUSHL,VXT_VAL,3,VXI_PUSHL,VXT_VAL,
/* 3319 */ 2,VXI_PUSHAB,VXT_VAL,4,VXI_PUSHAB,VXT_VAL,1,VXI_CALLS,
/* 3327 */ VXT_LIT,5,VXT_XFER,SIZEOF(char *) * (short int)xf_setextract,VXT_END,
/* 3332 */ VXI_PUSHAB,VXT_VAL,0,VXI_PUSHL,VXT_VAL,3,VXI_PUSHAB,VXT_VAL,
/* 3340 */ 4,VXI_PUSHL,VXT_VAL,2,VXI_PUSHAB,VXT_VAL,1,VXI_CALLS,
/* 3348 */ VXT_LIT,5,VXT_XFER,SIZEOF(char *) * (short int)xf_setp1,VXT_END,
/* 3353 */ VXI_PUSHAB,VXT_VAL,0,VXI_PUSHL,VXT_VAL,4,VXI_PUSHL,VXT_VAL,
/* 3361 */ 3,VXI_PUSHAB,VXT_VAL,5,VXI_PUSHAB,VXT_VAL,2,VXI_PUSHAB,
/* 3369 */ VXT_VAL,1,VXI_CALLS,VXT_LIT,6,VXT_XFER,SIZEOF(char *) * (short int)xf_setpiece,VXT_END,
/* 3377 */ VXI_BISB2,VXT_LIT,1,VXT_REG,0x5A,VXI_JSB,VXT_XFER,SIZEOF(char *) * (short int)xf_dt_true,
/* 3385 */ VXT_END,
/* 3386 */ VXI_PUSHL,VXT_VAL,5,VXI_PUSHAB,VXT_VAL,4,VXI_PUSHL,VXT_VAL,
/* 3394 */ 2,VXI_PUSHAB,VXT_VAL,1,VXI_PUSHAB,VXT_VAL,3,VXI_CALLS,
/* 3402 */ VXT_LIT,5,VXT_XFER,SIZEOF(char *) * (short int)xf_setzbrk,VXT_END,
/* 3407 */ VXI_PUSHAB,VXT_VAL,0,VXI_PUSHL,VXT_VAL,3,VXI_PUSHL,VXT_VAL,
/* 3415 */ 2,VXI_PUSHAB,VXT_VAL,4,VXI_PUSHAB,VXT_VAL,1,VXI_CALLS,
/* 3423 */ VXT_LIT,5,VXT_XFER,SIZEOF(char *) * (short int)xf_setzextract,VXT_END,
/* 3428 */ VXI_PUSHAB,VXT_VAL,0,VXI_PUSHL,VXT_VAL,3,VXI_PUSHAB,VXT_VAL,
/* 3436 */ 4,VXI_PUSHL,VXT_VAL,2,VXI_PUSHAB,VXT_VAL,1,VXI_CALLS,
/* 3444 */ VXT_LIT,5,VXT_XFER,SIZEOF(char *) * (short int)xf_setzp1,VXT_END,
/* 3449 */ VXI_PUSHAB,VXT_VAL,0,VXI_PUSHL,VXT_VAL,4,VXI_PUSHL,VXT_VAL,
/* 3457 */ 3,VXI_PUSHAB,VXT_VAL,5,VXI_PUSHAB,VXT_VAL,2,VXI_PUSHAB,
/* 3465 */ VXT_VAL,1,VXI_CALLS,VXT_LIT,6,VXT_XFER,SIZEOF(char *) * (short int)xf_setzpiece,VXT_END,
/* 3473 */ VXI_MOVAB,VXT_VAL,1,VXT_REG,0x50,VXI_MOVAB,VXT_VAL,2,
/* 3481 */ VXT_REG,0x51,VXI_JSB,VXT_XFER,SIZEOF(char *) * (short int)xf_sorts_after,VXT_END,
/* 3487 */ VXT_IREPAB,VXT_VAL,2,VXI_CALLS,VXT_VAL,1,VXT_XFER,SIZEOF(char *) * (short int)xf_srchindx,
/* 3495 */ VXI_MOVL,VXT_REG,0x50,VXT_ADDR,0,VXT_END,
/* 3501 */ VXI_MOVAB,VXT_VAL,2,VXT_REG,0x51,VXI_MOVAB,VXT_VAL,1,
/* 3509 */ VXT_REG,0x50,VXI_JSB,VXT_XFER,SIZEOF(char *) * (short int)xf_sto,VXT_END,
/* 3515 */ VXI_MOVC3,VXT_LIT,16,VXT_VAL,2,VXT_VAL,1,VXT_END,
/* 3523 */ VXI_MOVAB,VXT_VAL,1,VXT_REG,0x51,VXI_MOVAB,VXT_VAL,0,
/* 3531 */ VXT_REG,0x50,VXI_JSB,VXT_XFER,SIZEOF(char *) * (short int)xf_sto,VXT_END,
/* 3537 */ VXI_PUSHAB,VXT_VAL,0,VXI_PUSHAB,VXT_VAL,2,VXI_PUSHAB,VXT_VAL,
/* 3545 */ 1,VXI_CALLS,VXT_LIT,3,VXT_XFER,SIZEOF(char *) * (short int)xf_sub,VXT_END,
/* 3552 */ VXI_PUSHAB,VXT_VAL,0,VXI_PUSHL,VXT_VAL,1,VXI_CALLS,VXT_LIT,
/* 3560 */ 2,VXT_XFER,SIZEOF(char *) * (short int)xf_svget,VXT_END,
/* 3564 */ VXI_PUSHAB,VXT_VAL,2,VXI_PUSHL,VXT_VAL,1,VXI_JSB,VXT_XFER,
/* 3572 */ SIZEOF(char *) * (short int)xf_psvput,VXT_END,
/* 3574 */ VXI_PUSHAB,VXT_VAL,2,VXI_PUSHL,VXT_VAL,1,VXI_CALLS,VXT_LIT,
/* 3582 */ 2,VXT_XFER,SIZEOF(char *) * (short int)xf_svput,VXT_END,
/* 3586 */ VXI_MOVL,VXT_REG,0x50,VXT_REG,0x5A,VXT_END,
/* 3592 */ VXI_JSB,VXT_XFER,SIZEOF(char *) * (short int)xf_tcommit,VXT_END,
/* 3596 */ VXI_PUSHL,VXT_VAL,1,VXI_JSB,VXT_XFER,SIZEOF(char *) * (short int)xf_trollback,VXT_END,
/* 3603 */ VXI_PUSHL,VXT_VAL,1,VXI_JSB,VXT_XFER,SIZEOF(char *) * (short int)xf_trestart,VXT_END,
/* 3610 */ VXT_IREPAB,VXT_VAL,4,VXI_PUSHL,VXT_VAL,3,VXI_PUSHAB,VXT_VAL,
/* 3618 */ 2,VXI_PUSHL,VXT_VAL,1,VXI_JSB,VXT_XFER,SIZEOF(char *) * (short int)xf_tstart,VXT_END,
/* 3626 */ VXI_CALLS,VXT_LIT,0,VXT_XFER,SIZEOF(char *) * (short int)xf_unlock,VXT_END,
/* 3632 */ VXI_PUSHAB,VXT_VAL,2,VXI_PUSHAB,VXT_VAL,1,VXI_CALLS,VXT_LIT,
/* 3640 */ 2,VXT_XFER,SIZEOF(char *) * (short int)xf_use,VXT_END,
/* 3644 */ VXT_IREPAB,VXT_VAL,2,VXI_CALLS,VXT_VAL,1,VXT_XFER,SIZEOF(char *) * (short int)xf_view,
/* 3652 */ VXT_END,
/* 3653 */ VXI_CMPL,VXT_VAL,1,VXT_VAL,2,VXT_END,
/* 3659 */ VXI_PUSHAB,VXT_VAL,1,VXI_CALLS,VXT_LIT,1,VXT_XFER,SIZEOF(char *) * (short int)xf_write,
/* 3667 */ VXT_END,
/* 3668 */ VXI_PUSHL,VXT_VAL,1,VXI_CALLS,VXT_LIT,1,VXT_XFER,SIZEOF(char *) * (short int)xf_wteol,
/* 3676 */ VXT_END,
/* 3677 */ VXI_CALLS,VXT_LIT,0,VXT_XFER,SIZEOF(char *) * (short int)xf_wtff,VXT_END,
/* 3683 */ VXI_PUSHL,VXT_VAL,1,VXI_CALLS,VXT_LIT,1,VXT_XFER,SIZEOF(char *) * (short int)xf_wtone,
/* 3691 */ VXT_END,
/* 3692 */ VXI_PUSHL,VXT_VAL,1,VXI_CALLS,VXT_LIT,1,VXT_XFER,SIZEOF(char *) * (short int)xf_wttab,
/* 3700 */ VXT_END,
/* 3701 */ VXT_IREPAB,VXT_VAL,2,VXI_CALLS,VXT_VAL,1,VXT_XFER,SIZEOF(char *) * (short int)xf_xkill,
/* 3709 */ VXT_END,
/* 3710 */ VXT_IREPAB,VXT_VAL,2,VXI_PUSHL,VXT_VAL,1,VXI_JSB,VXT_XFER,
/* 3718 */ SIZEOF(char *) * (short int)xf_xnew,VXT_END,
/* 3720 */ VXI_PUSHL,VXT_VAL,1,VXI_CALLS,VXT_LIT,1,VXT_XFER,SIZEOF(char *) * (short int)xf_zallocate,
/* 3728 */ VXT_END,
/* 3729 */ VXI_JSB,VXT_XFER,SIZEOF(char *) * (short int)xf_restartpc,VXI_PUSHAB,VXT_VAL,1,VXI_CALLS,VXT_LIT,
/* 3737 */ 1,VXT_XFER,SIZEOF(char *) * (short int)xf_zattach,VXT_END,
/* 3741 */ VXI_PUSHL,VXT_VAL,2,VXI_PUSHAB,VXT_VAL,1,VXI_CALLS,VXT_LIT,
/* 3749 */ 2,VXT_XFER,SIZEOF(char *) * (short int)xf_zcompile,VXT_END,
/* 3753 */ VXI_JSB,VXT_XFER,SIZEOF(char *) * (short int)xf_zcont,VXT_END,
/* 3757 */ VXI_PUSHL,VXT_VAL,1,VXI_CALLS,VXT_LIT,1,VXT_XFER,SIZEOF(char *) * (short int)xf_zdeallocate,
/* 3765 */ VXT_END,
/* 3766 */ VXI_JSB,VXT_XFER,SIZEOF(char *) * (short int)xf_restartpc,VXI_PUSHAB,VXT_VAL,2,VXI_PUSHAB,VXT_VAL,
/* 3774 */ 1,VXI_CALLS,VXT_LIT,2,VXT_XFER,SIZEOF(char *) * (short int)xf_zedit,VXT_END,
/* 3781 */ VXI_PUSHL,VXT_VAL,1,VXI_JSB,VXT_XFER,SIZEOF(char *) * (short int)xf_zg1,VXT_END,
/* 3788 */ VXI_PUSHL,VXT_VAL,1,VXI_PUSHL,VXT_VAL,4,VXI_PUSHAB,VXT_VAL,
/* 3796 */ 3,VXI_PUSHAB,VXT_VAL,2,VXI_JSB,VXT_XFER,SIZEOF(char *) * (short int)xf_zgoto,VXT_END,
/* 3804 */ VXI_PUSHAB,VXT_VAL,1,VXI_CALLS,VXT_LIT,1,VXT_XFER,SIZEOF(char *) * (short int)xf_zhalt,
/* 3812 */ VXT_END,
/* 3813 */ VXI_PUSHAB,VXT_VAL,2,VXI_PUSHAB,VXT_VAL,1,VXI_CALLS,VXT_LIT,
/* 3821 */ 2,VXT_XFER,SIZEOF(char *) * (short int)xf_zhelp,VXT_END,
/* 3825 */ VXI_PUSHAB,VXT_VAL,2,VXI_PUSHAB,VXT_VAL,1,VXI_CALLS,VXT_LIT,
/* 3833 */ 2,VXT_XFER,SIZEOF(char *) * (short int)xf_zlink,VXT_END,
/* 3837 */ VXT_IREPAB,VXT_VAL,3,VXI_PUSHL,VXT_VAL,2,VXI_CALLS,VXT_VAL,
/* 3845 */ 1,VXT_XFER,SIZEOF(char *) * (short int)xf_zmess,VXT_END,
/* 3849 */ VXI_PUSHAB,VXT_VAL,0,VXI_CALLS,VXT_LIT,1,VXT_XFER,SIZEOF(char *) * (short int)xf_zprevious,
/* 3857 */ VXT_END,
/* 3858 */ VXI_JSB,VXT_XFER,SIZEOF(char *) * (short int)xf_restartpc,VXI_PUSHL,VXT_VAL,5,VXI_PUSHAB,VXT_VAL,
/* 3866 */ 4,VXI_PUSHL,VXT_VAL,3,VXI_PUSHAB,VXT_VAL,2,VXI_PUSHAB,
/* 3874 */ VXT_VAL,1,VXI_CALLS,VXT_LIT,5,VXT_XFER,SIZEOF(char *) * (short int)xf_zprint,VXT_END,
/* 3882 */ VXI_JSB,VXT_XFER,SIZEOF(char *) * (short int)xf_restartpc,VXI_PUSHL,VXT_LIT,0,VXI_PUSHL,VXT_VAL,
/* 3890 */ 2,VXI_PUSHAB,VXT_VAL,1,VXI_CALLS,VXT_LIT,3,VXT_XFER,
/* 3898 */ SIZEOF(char *) * (short int)xf_zshow,VXT_END,
/* 3900 */ VXI_JSB,VXT_XFER,SIZEOF(char *) * (short int)xf_restartpc,VXI_PUSHAB,VXT_VAL,3,VXI_PUSHL,VXT_VAL,
/* 3908 */ 2,VXI_PUSHAB,VXT_VAL,1,VXI_CALLS,VXT_LIT,3,VXT_XFER,
/* 3916 */ SIZEOF(char *) * (short int)xf_zshow,VXT_END,
/* 3918 */ VXI_PUSHL,VXT_LIT,0,VXI_PUSHL,VXT_VAL,1,VXI_CALLS,VXT_LIT,
/* 3926 */ 2,VXT_XFER,SIZEOF(char *) * (short int)xf_zstep,VXI_JSB,VXT_XFER,SIZEOF(char *) * (short int)xf_zcont,VXT_END,
/* 3933 */ VXI_PUSHAB,VXT_VAL,2,VXI_PUSHL,VXT_VAL,1,VXI_CALLS,VXT_LIT,
/* 3941 */ 2,VXT_XFER,SIZEOF(char *) * (short int)xf_zstep,VXI_JSB,VXT_XFER,SIZEOF(char *) * (short int)xf_zcont,VXT_END,
/* 3948 */ VXI_JSB,VXT_XFER,SIZEOF(char *) * (short int)xf_restartpc,VXI_PUSHAB,VXT_VAL,1,VXI_CALLS,VXT_LIT,
/* 3956 */ 1,VXT_XFER,SIZEOF(char *) * (short int)xf_zsystem,VXT_END,
/* 3960 */ VXI_PUSHL,VXT_VAL,1,VXI_CALLS,VXT_LIT,1,VXT_XFER,SIZEOF(char *) * (short int)xf_ztcommit,
/* 3968 */ VXT_END,
/* 3969 */ VXI_CALLS,VXT_LIT,0,VXT_XFER,SIZEOF(char *) * (short int)xf_ztrigger,VXT_END,
/* 3975 */ VXI_CALLS,VXT_LIT,0,VXT_XFER,SIZEOF(char *) * (short int)xf_ztstart,VXT_END,
/* 3981 */ VXI_PUSHL,VXT_VAL,1,VXI_CALLS,VXT_LIT,1,VXT_XFER,SIZEOF(char *) * (short int)xf_zwritesvn,
/* 3989 */ VXT_END,
/* 3990 */ VXI_PUSHL,VXT_VAL,2,VXI_PUSHL,VXT_VAL,1,VXI_CALLS,VXT_LIT,
/* 3998 */ 2,VXT_XFER,SIZEOF(char *) * (short int)xf_rfrshindx,VXI_MOVL,VXT_REG,0x50,VXT_ADDR,0,
/* 4006 */ VXT_END,
/* 4007 */ VXT_IREPAB,VXT_VAL,2,VXI_CALLS,VXT_VAL,1,VXT_XFER,SIZEOF(char *) * (short int)xf_savputindx,
/* 4015 */ VXI_MOVL,VXT_REG,0x50,VXT_ADDR,0,VXT_END,
/* 4021 */ VXI_CALLS,VXT_LIT,0,VXT_XFER,SIZEOF(char *) * (short int)xf_forfreeindx,VXT_END,
/* 4027 */ VXI_PUSHL,VXT_VAL,1,VXI_CALLS,VXT_LIT,1,VXT_XFER,SIZEOF(char *) * (short int)xf_fornestlvl,
/* 4035 */ VXT_END,
/* 4036 */ 343,363,353,2571,2579,2575,2838,2850,
/* 4044 */ 2844,0,0,0,482,458,449,0,
/* 4052 */ 0,445,2074,2112,2093,2719,2734,2725,
/* 4060 */ 2695,2710,2701,2587,2598,2591,2677,2688,
/* 4068 */ 2681,2623,2634,2627,2641,2652,2645,2659,
/* 4076 */ 2670,2663,2605,2616,2609,2044,2064,2054,
/* 4084 */ 373,393,383};

View File

@ -0,0 +1,276 @@
/* Generated by gen_xfer_desc.csh */
#define GTM_C_RTN 1
#define GTM_ASM_RTN 2
#define GTM_C_VAR_ARGS_RTN 3
#define DEFINE_XFER_TABLE_DESC char xfer_table_desc[] = \
{ \
GTM_ASM_RTN, /* op_sto */ \
GTM_C_VAR_ARGS_RTN, /* op_cat */ \
GTM_ASM_RTN, /* op_linefetch */ \
GTM_ASM_RTN, /* op_linestart */ \
GTM_ASM_RTN, /* mval2bool */ \
GTM_C_VAR_ARGS_RTN, /* op_zbfetch */ \
GTM_C_VAR_ARGS_RTN, /* op_zbstart */ \
GTM_C_RTN, /* op_fnpiece */ \
GTM_ASM_RTN, /* op_equ */ \
GTM_C_RTN, /* op_write */ \
GTM_C_RTN, /* op_kill */ \
GTM_C_RTN, /* op_add */ \
GTM_C_VAR_ARGS_RTN, /* op_getindx */ \
GTM_C_VAR_ARGS_RTN, /* op_putindx */ \
GTM_C_VAR_ARGS_RTN, /* op_gvnaked */ \
GTM_ASM_RTN, /* opp_ret */ \
GTM_ASM_RTN, /* op_numcmp */ \
GTM_C_RTN, /* op_fnextract */ \
GTM_C_VAR_ARGS_RTN, /* op_gvname */ \
GTM_ASM_RTN, /* mval2mint */ \
GTM_ASM_RTN, /* op_contain */ \
GTM_C_RTN, /* op_wteol */ \
GTM_C_RTN, /* op_gvget */ \
GTM_C_VAR_ARGS_RTN, /* op_sub */ \
GTM_C_RTN, /* op_fndata */ \
GTM_C_VAR_ARGS_RTN, /* op_callw */ \
GTM_ASM_RTN, /* op_extcall */ \
GTM_ASM_RTN, /* op_forcenum */ \
GTM_C_VAR_ARGS_RTN, /* op_srchindx */ \
GTM_ASM_RTN, /* opp_newvar */ \
GTM_ASM_RTN, /* op_extjmp */ \
GTM_C_RTN, /* op_gvput */ \
GTM_C_RTN, /* op_gvdata */ \
GTM_C_RTN, /* op_fnlength */ \
GTM_C_RTN, /* op_svget */ \
GTM_ASM_RTN, /* opp_rterror */ \
GTM_ASM_RTN, /* opp_commarg */ \
GTM_C_RTN, /* op_gvnext */ \
GTM_C_RTN, /* op_wttab */ \
GTM_C_RTN, /* op_gvkill */ \
GTM_C_RTN, /* op_read */ \
GTM_ASM_RTN, /* op_neg */ \
GTM_ASM_RTN, /* op_follow */ \
GTM_C_RTN, /* op_wtone */ \
GTM_C_VAR_ARGS_RTN, /* op_callb */ \
GTM_ASM_RTN, /* mint2mval */ \
GTM_ASM_RTN, /* op_forinit */ \
GTM_ASM_RTN, /* op_forloop */ \
GTM_C_RTN, /* flt_mod */ \
GTM_C_RTN, /* op_fntext */ \
GTM_C_RTN, /* op_fnnext */ \
GTM_C_RTN, /* op_idiv */ \
GTM_C_RTN, /* op_fnj2 */ \
GTM_C_VAR_ARGS_RTN, /* op_fnchar */ \
GTM_C_RTN, /* op_fnfind */ \
GTM_ASM_RTN, /* opp_indset */ \
GTM_C_RTN, /* op_fnascii */ \
GTM_C_RTN, /* op_halt */ \
GTM_C_RTN, /* op_mul */ \
GTM_ASM_RTN, /* opp_indtext */ \
GTM_ASM_RTN, /* opp_indglvn */ \
GTM_C_RTN, /* op_killall */ \
GTM_C_RTN, /* op_use */ \
GTM_C_RTN, /* op_div */ \
GTM_C_RTN, /* op_fnj3 */ \
GTM_C_VAR_ARGS_RTN, /* op_forlcldol */ \
GTM_C_VAR_ARGS_RTN, /* op_forlcldow */ \
GTM_C_RTN, /* op_unlock */ \
GTM_C_RTN, /* op_wtff */ \
GTM_ASM_RTN, /* opp_break */ \
GTM_C_VAR_ARGS_RTN, /* op_calll */ \
GTM_C_RTN, /* op_close */ \
GTM_ASM_RTN, /* op_currtn */ \
GTM_C_RTN, /* op_lock */ \
GTM_C_VAR_ARGS_RTN, /* gtm_fetch */ \
GTM_C_RTN, /* op_fnfnumber */ \
GTM_ASM_RTN, /* op_fnget */ \
GTM_C_RTN, /* op_fngetdvi */ \
GTM_C_RTN, /* op_fngetjpi */ \
GTM_C_RTN, /* op_fngetsyi */ \
GTM_C_RTN, /* op_fngvget */ \
GTM_C_RTN, /* op_fnorder */ \
GTM_C_RTN, /* op_fnrandom */ \
GTM_C_RTN, /* op_fnzfile */ \
GTM_C_RTN, /* op_fnzm */ \
GTM_C_RTN, /* op_fnzparse */ \
GTM_C_RTN, /* op_fnzpid */ \
GTM_C_RTN, /* op_fnzpriv */ \
GTM_C_RTN, /* op_fnzsearch */ \
GTM_C_RTN, /* op_fnzsetprv */ \
GTM_ASM_RTN, /* op_gettruth */ \
GTM_C_RTN, /* op_zallocate */ \
GTM_C_RTN, /* op_gvorder */ \
GTM_C_RTN, /* op_hang */ \
GTM_ASM_RTN, /* opp_hardret */ \
GTM_ASM_RTN, /* opp_indfun */ \
GTM_ASM_RTN, /* opp_indlvadr */ \
GTM_C_VAR_ARGS_RTN, /* op_indname */ \
GTM_ASM_RTN, /* opp_indpat */ \
GTM_ASM_RTN, /* op_iretmvad */ \
GTM_ASM_RTN, /* opp_iretmval */ \
GTM_C_VAR_ARGS_RTN, /* op_job */ \
GTM_C_RTN, /* op_labaddr */ \
GTM_C_RTN, /* op_incrlock */ \
GTM_C_RTN, /* op_decrlock */ \
GTM_C_VAR_ARGS_RTN, /* op_lvpatwrite */ \
GTM_C_VAR_ARGS_RTN, /* op_lvzwrite */ \
GTM_C_RTN, /* op_open */ \
GTM_C_RTN, /* op_fnpopulation */ \
GTM_C_RTN, /* op_rdone */ \
GTM_C_RTN, /* op_readfl */ \
GTM_C_RTN, /* op_rhdaddr */ \
GTM_C_RTN, /* op_setpiece */ \
GTM_C_RTN, /* op_setzbrk */ \
GTM_C_RTN, /* op_svput */ \
GTM_C_VAR_ARGS_RTN, /* op_view */ \
GTM_ASM_RTN, /* opp_xnew */ \
GTM_ASM_RTN, /* opp_zcont */ \
GTM_ASM_RTN, /* opp_zgoto */ \
GTM_C_RTN, /* op_zlink */ \
GTM_C_VAR_ARGS_RTN, /* op_zmess */ \
GTM_C_RTN, /* op_zprint */ \
GTM_C_RTN, /* op_zshow */ \
GTM_C_RTN, /* op_zsystem */ \
GTM_C_RTN, /* op_gvsavtarg */ \
GTM_C_RTN, /* op_gvrectarg */ \
GTM_C_RTN, /* op_igetsrc */ \
GTM_C_RTN, /* op_fnzdate */ \
GTM_C_RTN, /* op_fntranslate */ \
GTM_C_VAR_ARGS_RTN, /* op_xkill */ \
GTM_C_RTN, /* op_lkinit */ \
GTM_C_RTN, /* op_zattach */ \
GTM_C_RTN, /* op_zedit */ \
GTM_ASM_RTN, /* op_restartpc */ \
GTM_C_VAR_ARGS_RTN, /* op_gvextnam */ \
GTM_C_RTN, /* op_fnzcall */ \
GTM_C_VAR_ARGS_RTN, /* op_fnview */ \
GTM_C_RTN, /* op_zdeallocate */ \
GTM_ASM_RTN, /* opp_indlvarg */ \
GTM_ASM_RTN, /* op_forchk1 */ \
GTM_C_RTN, /* op_cvtparm */ \
GTM_C_RTN, /* op_zprevious */ \
GTM_C_RTN, /* op_fnzprevious */ \
GTM_C_RTN, /* op_gvquery */ \
GTM_C_VAR_ARGS_RTN, /* op_fnquery */ \
GTM_ASM_RTN, /* op_isformal */ \
GTM_C_VAR_ARGS_RTN, /* op_bindparm */ \
GTM_ASM_RTN, /* op_retarg */ \
GTM_ASM_RTN, /* op_exfun */ \
GTM_ASM_RTN, /* op_extexfun */ \
GTM_ASM_RTN, /* op_zhelp */ \
GTM_C_RTN, /* op_fnp1 */ \
GTM_ASM_RTN, /* opp_zg1 */ \
GTM_ASM_RTN, /* opp_newintrinsic */ \
GTM_C_RTN, /* op_gvzwithdraw */ \
GTM_C_RTN, /* op_lvzwithdraw */ \
GTM_ASM_RTN, /* op_pattern */ \
GTM_C_RTN, /* op_nullexp */ \
GTM_C_RTN, /* op_exfunret */ \
GTM_C_RTN, /* op_fnlvname */ \
GTM_C_VAR_ARGS_RTN, /* op_forlcldob */ \
GTM_ASM_RTN, /* opp_indrzshow */ \
GTM_C_VAR_ARGS_RTN, /* op_gvzwrite */ \
GTM_C_RTN, /* op_zstep */ \
GTM_ASM_RTN, /* mval2num */ \
GTM_C_VAR_ARGS_RTN, /* op_lkname */ \
GTM_C_RTN, /* op_fnztrnlnm */ \
GTM_C_RTN, /* op_ztcommit */ \
GTM_C_RTN, /* op_ztstart */ \
GTM_ASM_RTN, /* op_equnul */ \
GTM_C_RTN, /* op_fngetlki */ \
GTM_C_RTN, /* op_fnzlkid */ \
GTM_ASM_RTN, /* opp_indlvnamadr */ \
GTM_C_VAR_ARGS_RTN, /* op_callspb */ \
GTM_C_VAR_ARGS_RTN, /* op_callspw */ \
GTM_C_VAR_ARGS_RTN, /* op_callspl */ \
GTM_C_VAR_ARGS_RTN, /* op_iocontrol */ \
GTM_C_VAR_ARGS_RTN, /* op_fnfgncal */ \
GTM_C_RTN, /* op_zcompile */ \
GTM_ASM_RTN, /* opp_tcommit */ \
GTM_ASM_RTN, /* opp_trollback */ \
GTM_ASM_RTN, /* opp_trestart */ \
GTM_ASM_RTN, /* opp_tstart */ \
GTM_C_RTN, /* op_exp */ \
GTM_C_RTN, /* op_fnget2 */ \
GTM_ASM_RTN, /* opp_indget */ \
GTM_C_VAR_ARGS_RTN, /* op_fnname */ \
GTM_ASM_RTN, /* opp_indfnname */ \
GTM_C_RTN, /* op_fnlvprvname */ \
GTM_C_RTN, /* op_gvo2 */ \
GTM_C_RTN, /* op_fnlvnameo2 */ \
GTM_C_RTN, /* op_fno2 */ \
GTM_ASM_RTN, /* opp_indo2 */ \
GTM_C_RTN, /* op_get_msf */ \
GTM_C_RTN, /* op_dt_get */ \
GTM_C_RTN, /* op_dt_store */ \
GTM_C_RTN, /* op_dt_false */ \
GTM_C_RTN, /* op_dt_true */ \
GTM_C_RTN, /* op_fnzbitstr */ \
GTM_C_RTN, /* op_fnzbitlen */ \
GTM_C_RTN, /* op_fnzbitget */ \
GTM_C_RTN, /* op_fnzbitset */ \
GTM_C_RTN, /* op_fnzbitcoun */ \
GTM_C_RTN, /* op_fnzbitfind */ \
GTM_C_RTN, /* op_fnzbitnot */ \
GTM_C_RTN, /* op_fnzbitand */ \
GTM_C_RTN, /* op_fnzbitor */ \
GTM_C_RTN, /* op_fnzbitxor */ \
GTM_C_RTN, /* op_fgnlookup */ \
GTM_ASM_RTN, /* op_sorts_after */ \
GTM_C_RTN, /* op_fnzqgblmod */ \
GTM_C_RTN, /* op_fngvget1 */ \
GTM_C_RTN, /* op_fngvget2 */ \
GTM_C_RTN, /* op_setp1 */ \
GTM_C_RTN, /* op_setextract */ \
GTM_ASM_RTN, /* opp_inddevparms */ \
GTM_C_RTN, /* op_merge */ \
GTM_C_RTN, /* op_merge_arg */ \
GTM_ASM_RTN, /* opp_indmerge */ \
GTM_C_VAR_ARGS_RTN, /* op_m_srchindx */ \
GTM_C_RTN, /* op_fnstack1 */ \
GTM_C_RTN, /* op_fnstack2 */ \
GTM_C_RTN, /* op_fnqlength */ \
GTM_C_RTN, /* op_fnqsubscript */ \
GTM_C_RTN, /* op_fnreverse */ \
GTM_ASM_RTN, /* opp_svput */ \
GTM_C_RTN, /* op_fnzjobexam */ \
GTM_C_RTN, /* op_fnzsigproc */ \
GTM_C_RTN, /* op_fnincr */ \
GTM_C_RTN, /* op_gvincr */ \
GTM_ASM_RTN, /* opp_indincr */ \
GTM_C_RTN, /* op_setzextract */ \
GTM_C_RTN, /* op_setzp1 */ \
GTM_C_RTN, /* op_setzpiece */ \
GTM_C_VAR_ARGS_RTN, /* op_fnzascii */ \
GTM_C_VAR_ARGS_RTN, /* op_fnzchar */ \
GTM_ASM_RTN, /* op_fnzextract */ \
GTM_C_VAR_ARGS_RTN, /* op_fnzfind */ \
GTM_C_VAR_ARGS_RTN, /* op_fnzj2 */ \
GTM_C_VAR_ARGS_RTN, /* op_fnzlength */ \
GTM_C_RTN, /* op_fnzpopulation */ \
GTM_C_RTN, /* op_fnzpiece */ \
GTM_C_RTN, /* op_fnzp1 */ \
GTM_C_VAR_ARGS_RTN, /* op_fnztranslate */ \
GTM_C_VAR_ARGS_RTN, /* op_fnzconvert2 */ \
GTM_C_VAR_ARGS_RTN, /* op_fnzconvert3 */ \
GTM_C_RTN, /* op_fnzwidth */ \
GTM_C_RTN, /* op_fnzsubstr */ \
GTM_C_RTN, /* op_setals2als */ \
GTM_C_RTN, /* op_setalsin2alsct */ \
GTM_C_RTN, /* op_setalsctin2als */ \
GTM_C_RTN, /* op_setalsct2alsct */ \
GTM_C_RTN, /* op_killalias */ \
GTM_C_RTN, /* op_killaliasall */ \
GTM_C_RTN, /* op_fnzdata */ \
GTM_C_RTN, /* op_clralsvars */ \
GTM_C_RTN, /* op_fnzahandle */ \
GTM_C_RTN, /* op_fnztrigger */ \
GTM_C_RTN, /* op_exfunretals */ \
GTM_C_RTN, /* op_setfnretin2als */ \
GTM_C_RTN, /* op_setfnretin2alsct */ \
GTM_C_RTN, /* op_zwritesvn */ \
GTM_C_RTN, /* op_ztrigger */ \
GTM_C_VAR_ARGS_RTN, /* op_rfrshindx */ \
GTM_C_VAR_ARGS_RTN, /* op_savputindx */ \
GTM_C_RTN, /* op_forfreeindx */ \
GTM_C_RTN, /* op_fornestlvl */ \
GTM_C_RTN, /* op_zhalt */ \
0}

View File

@ -0,0 +1,419 @@
/****************************************************************
* *
* Copyright 2009 Fidelity Information Services, Inc *
* *
* This source code contains the intellectual property *
* of its copyright holder(s), and is made available *
* under a license. If you do not know the terms of *
* the license, please stop and do not read further. *
* *
****************************************************************/
#define _FILE_OFFSET_BITS 64 /* Needed to compile gpgme client progs also with large file support */
#include <stdio.h>
#include <string.h>
#include <unistd.h>
#include <stdlib.h>
#include <assert.h>
#include <sys/stat.h>
#include <errno.h>
#include <gpgme.h> /* gpgme functions */
#include <gpg-error.h> /* gcry*_err_t */
#include "gtmxc_types.h" /* xc_string, xc_status_t and other callin interfaces xc_fileid */
#include "gtmcrypt_interface.h" /* Function prototypes for gtmcrypt*.* functions */
#include "gtmcrypt_ref.h"
#include "gtmcrypt_dbk_ref.h"
#include "gtmcrypt_pk_ref.h"
#include "gtmcrypt_sym_ref.h"
int num_entries;
db_key_map *db_map_root;
db_key_map **fast_lookup_entry;
extern char err_string[ERR_STRLEN];
extern int can_prompt_passwd;
/* Cleanup the db key entries and also remove the plain text passwd stored there */
void gc_dbk_scrub_entries()
{
db_key_map *temp, *temp1;
temp = GC_DBK_GET_FIRST_ENTRY();
/* Walk through the linked list and free each member of the structure.*/
while (NULL != temp)
{
# ifdef USE_GCRYPT
if (temp->encr_key_handle)
gcry_cipher_close(temp->encr_key_handle);
if (temp->decr_key_handle)
gcry_cipher_close(temp->decr_key_handle);
# endif
temp1 = GC_DBK_GET_NEXT_ENTRY(temp);
GC_FREE_DB_KEY_MAP(temp); /* Note, this will memset the key_string to 0 before free'ing */
temp = temp1;
}
if (NULL != fast_lookup_entry)
GC_FREE(fast_lookup_entry);
}
/* Find out whether the db key file is modified since last time */
xc_status_t gc_dbk_is_db_key_file_modified()
{
struct stat stat_info;
char *gtm_dbkeys;
int status;
static time_t last_modified = 0;
GC_GETENV(gtm_dbkeys, GTM_DBKEYS, status);
if (GC_FAILURE == status)
{
GC_ENV_UNSET_ERROR(GTM_DBKEYS);
return GC_FAILURE;
}
if (0 != stat(gtm_dbkeys, &stat_info) || (last_modified != stat_info.st_mtime))
{
last_modified = stat_info.st_mtime;
return TRUE;
}
return FALSE;
}
/* Given a xc_fileid, containing a unique description of the dat file, the function searches for it's
* entry in the linked list. On unsuccessful search, returns NULL.
*/
db_key_map* gc_dbk_get_entry_by_fileid(xc_fileid_ptr_t fileid)
{
db_key_map *cur = db_map_root;
while (NULL != cur)
{
if (!cur->fileid_dirty && (!cur->sym_key_dirty) && (gtm_is_file_identical_fptr(fileid, (cur->fileid))))
break;
cur = (db_key_map *)cur->next;
}
return cur;
}
/* Given a hash of the symmetric key, the function searches for the entry in the linked list that matches with the
* given hash
*/
db_key_map* gc_dbk_get_entry_by_hash(xc_string_t *hash)
{
db_key_map *cur = db_map_root;
assert(hash);
assert(hash->length);
while (NULL != cur)
{
if (hash->length == cur->hash.length && (0 == memcmp(hash->address, cur->hash.address, hash->length)))
break;
cur = (db_key_map *)cur->next;
}
return cur;
}
dbkeyfile_line_type gc_dbk_get_line_info (char *buf, char *data)
{
dbkeyfile_line_type line_type = ERROR_LINE_INFO;
if (!memcmp(buf, DAT_LINE_INDICATOR, DAT_LINE_INDICATOR_SIZE))
{
strcpy(data, &buf[DAT_LINE_INDICATOR_SIZE]); /* The rest of the line is a file name */
if ('\n' == data[strlen(data) - 1]) data[strlen(data) - 1] = '\0';
line_type = DAT_LINE_INFO;
} else if (!memcmp(buf, KEY_LINE_INDICATOR, KEY_LINE_INDICATOR_SIZE))
{
strcpy(data, &buf[KEY_LINE_INDICATOR_SIZE]); /* The rest of the line is a file name */
if ('\n' == data[strlen(data) - 1]) data[strlen(data) - 1] = '\0';
line_type = KEY_LINE_INFO;
}
return line_type;
}
xc_status_t gc_dbk_load_gtm_dbkeys(FILE **gtm_dbkeys)
{
char *ptr, dbkeys_filename[GTM_PATH_MAX];
int status;
FILE *dbkeys_fp;
struct stat stat_buf;
GC_GETENV(ptr, GTM_DBKEYS, status);
if (GC_SUCCESS == status)
{
if (0 == strlen(ptr))
{
snprintf(err_string, ERR_STRLEN, "%s", "Environment variable gtm_dbkeys set to empty string");
return GC_FAILURE;
}
if (0 == stat(ptr, &stat_buf)) /* See if the environment variable points to a proper path */
{
if (S_ISDIR(stat_buf.st_mode)) /* if directory */
snprintf(dbkeys_filename, GTM_PATH_MAX, "%s/%s", ptr, DOT_GTM_DBKEYS);
else if (S_ISREG(stat_buf.st_mode)) /* if file */
snprintf(dbkeys_filename, GTM_PATH_MAX, "%s", ptr);
else
{
snprintf(err_string, ERR_STRLEN, "Unknown file type : %s", ptr);
return GC_FAILURE;
}
} else /* error if env variable present but couldn't stat */
{
snprintf(err_string, ERR_STRLEN, "Cannot find DB keys file - %s", ptr);
return GC_FAILURE;
}
} else /* if env variable is undefined, then look for $HOME/.gtm_dbkeys */
{
GC_GETENV(ptr, "HOME", status);
snprintf(dbkeys_filename, GTM_PATH_MAX, "%s/%s", ptr, DOT_GTM_DBKEYS);
if (0 != stat(dbkeys_filename, &stat_buf))
{
snprintf(err_string,
ERR_STRLEN,
"Environment variable gtm_dbkeys undefined. Cannot find %s/.gtm_dbkeys",
ptr);
return GC_FAILURE;
}
}
/* At this point we would have at least one form of the gtm_dbkeys in dbkeys_filename */
status = GC_SUCCESS;
if (NULL != (dbkeys_fp = fopen(dbkeys_filename, "r")))
*gtm_dbkeys = dbkeys_fp;
else
{
snprintf(err_string, ERR_STRLEN, "Cannot open DB keys file - %s", dbkeys_filename);
status = GC_FAILURE;
}
return status;
}
/* Initialize the linked list with minimal things. For each pair of entries in the db key file, load the
* file names into the linked list and validate the format of the entries. Returns error if the format is
* not the one that's expected. This is a fatal error and program will not continue on encountering this
* error. Another fatal error is the 'gtm_dbkeys' env variable not set
*/
xc_status_t gc_dbk_load_entries_from_file()
{
FILE *dbkeys_fp = NULL;
db_key_map *node = NULL;
int current_state;
int start = TRUE, count = 0, status, all_done = FALSE;
int looking_for_dat_entry = 1, looking_for_key_entry = 2;
int line_no = 0;
char *prefix = "Error parsing database key file";
char buf[GTM_PATH_MAX], data[GTM_PATH_MAX];
dbkeyfile_line_type line_type;
/* Check for $gtm_dbkeys */
if (0 != gc_dbk_load_gtm_dbkeys(&dbkeys_fp))
return GC_FAILURE;
/* Read the file and parse the contents and fill a mapping table */
/* Note the format of this dbkeys will be like this -
dat <db file1 path>
key <key file1 name>
dat <db file2 path>
key <key file2 name>
*/
/* To start with we are looking for a dat entry */
current_state = looking_for_dat_entry;
GC_DBK_SET_FIRST_ENTRY(NULL);
while (!feof(dbkeys_fp))
{
memset(buf, 0, GTM_PATH_MAX);
memset(data, 0, GTM_PATH_MAX);
/* Skip past empty lines */
while (1)
{
if (!fgets(buf, GTM_PATH_MAX, dbkeys_fp))
{
/* If EOF is reached but the line_no din't move beyond 0, it means we have no entries
* in the db key file. */
if (0 == line_no)
{
fclose(dbkeys_fp);
snprintf(err_string,
ERR_STRLEN,
"%s. %s",
prefix,
"No entries found in DB keys file.");
return GC_FAILURE;
}
/* At the end if we are looking for a key entry, then the last dat entry is unmatched*/
if (current_state == looking_for_key_entry)
{
fclose(dbkeys_fp);
snprintf(err_string,
ERR_STRLEN,
"%s. No matching KEY entry found for DAT entry at line: %d",
prefix,
line_no);
return GC_FAILURE;
}
all_done = TRUE;
break;
}
if (buf[0] != '\0' && (buf[0] != '\n')) /* Non-Empty line */
{
buf[strlen(buf) - 1] = '\0';
break;
}
else
line_no++;
}
if (all_done) break;
/* Figure out what kind of line are we going to deal with. */
line_type = gc_dbk_get_line_info(buf, data);
switch(line_type)
{
case DAT_LINE_INFO:
line_no++;
/* We should have seen a key before seeing the next dat file */
if (current_state == looking_for_key_entry && (FALSE == start))
{
fclose(dbkeys_fp);
snprintf(err_string,
ERR_STRLEN,
"%s. At line %d: No matching KEY entry found for %s",
prefix,
line_no,
buf);
return GC_FAILURE;
}
/* Now that we have seen a dat file, we will now be looking for a key entry */
current_state = looking_for_key_entry;
start = FALSE;
GC_NEW_DB_KEYMAP(node);
GC_COPY_TO_XC_STRING(&node->db_name, data, strlen(data));
node->next = (struct db_key_map*) db_map_root;
GC_DBK_SET_FIRST_ENTRY(node);
break;
case KEY_LINE_INFO:
line_no++;
/* We should have seen a dat file before seeing a key file */
if (!node && (current_state == looking_for_dat_entry))
{
fclose(dbkeys_fp);
snprintf(err_string,
ERR_STRLEN,
"%s. At line %d: No matching DAT entry found for %s",
prefix,
line_no,
buf);
return GC_FAILURE;
}
/* Now that we have seen a key file, we will now be looking for a dat entry */
current_state = looking_for_dat_entry;
num_entries++;
GC_COPY_TO_XC_STRING(&node->key_filename, data, strlen(data));
break;
default:
line_no++;
fclose(dbkeys_fp);
snprintf(err_string,
ERR_STRLEN,
"%s. At line %d: %s does not start with 'dat '/'key '",
prefix,
line_no,
buf);
return GC_FAILURE;
}
}
GC_MALLOC(fast_lookup_entry, (SIZEOF(fast_lookup_entry) * num_entries), db_key_map*);
node = GC_DBK_GET_FIRST_ENTRY();
while (NULL != node)
{
node->index = count;
fast_lookup_entry[count] = node;
count++;
node = GC_DBK_GET_NEXT_ENTRY(node);
}
assert(count == num_entries);
fclose(dbkeys_fp);
return GC_SUCCESS;
}
xc_status_t gc_dbk_fill_sym_key_and_hash(xc_fileid_ptr_t req_fileid, char *req_hash)
{
db_key_map *cur;
int status, concerns_current_file;
xc_fileid_ptr_t db_fileid;
cur = GC_DBK_GET_FIRST_ENTRY();
while (NULL != cur)
{
db_fileid = NULL;
if (TRUE == cur->fileid_dirty)
{
if (TRUE == gtm_filename_to_id_fptr(&(cur->db_name), &db_fileid))
{
cur->fileid_dirty = FALSE;
cur->fileid = db_fileid;
}
}
if (TRUE == cur->sym_key_dirty) /* Need to fill sym key value */
{
/* Before decrypting the key, let's see if the gtm_passwd in the environment has changed since
* the last time we read from the environment. This way if the user had originally entered a wrong
* password and if he is in MUMPS and changes the password through a external call then we should
* be using the new password rather than the old one which might still be hanging in the environment. */
gc_pk_crypt_prompt_passwd_if_needed(can_prompt_passwd);
GC_PK_GET_DECRYPTED_KEY(cur->key_string, status);
/* If we failed because of a gtm_passwd being wrong we wouldn't want to continue any further although it
* might not concern for the current file. */
if (GPG_ERR_BAD_PASSPHRASE == status)
return GC_FAILURE;
concerns_current_file = (NULL != req_fileid && (gtm_is_file_identical_fptr(cur->fileid, req_fileid)));
/* Eventhough we may have an encountered error in the above decryption, we report only when it is concerned
* with the current dat file being used. For other files, we silently ignore the error, with a hope that by
* the time the database file is accessed, db key file would have been updated appropriately by the user.
*/
if (0 != status && concerns_current_file)
return GC_FAILURE;
/* It could be possible that the decryption din't return any error but plain_text_length happens to
* be zero. So, we verify it and return error in case the length is zero. Again we make sure that we return
* the error only when it concerned with the current dat file.
*/
if (0 == cur->key_string.length && concerns_current_file)
{
snprintf(err_string, ERR_STRLEN, "Symmetric key %s found to be empty", cur->key_filename.address);
return GC_FAILURE;
}
/* If we fall through here, it means that we have encountered an error for a database which is not of
* concern at this moment. So, we continue with the next database. */
if (0 != status)
{
cur = GC_DBK_GET_NEXT_ENTRY(cur);
continue;
}
/* If everything is fine, compute the hash for the key */
GC_PK_COMPUTE_HASH(cur->hash, cur->key_string);
GC_SYM_CREATE_HANDLES(cur);
cur->sym_key_dirty = FALSE;
/* If we have found a matching entry for the hash/fileid that we requested for, return immediately with
* GC_SUCCESS */
if (concerns_current_file
|| (NULL != req_hash && (0 == memcmp(cur->hash.address, req_hash, GTMCRYPT_HASH_LEN))))
return GC_SUCCESS;
}
cur = GC_DBK_GET_NEXT_ENTRY(cur);
}
return GC_SUCCESS;
}
void gc_dbk_get_hash(db_key_map *entry, xc_string_t *hash)
{
/*Make sure the reference block that is being passed is already allocated */
assert(hash->address);
assert(NULL != entry);
memcpy(hash->address, entry->hash.address, GTMCRYPT_HASH_LEN);
hash->length = GTMCRYPT_HASH_LEN;
}

View File

@ -0,0 +1,117 @@
/****************************************************************
* *
* Copyright 2009, 2010 Fidelity Information Services, Inc *
* *
* This source code contains the intellectual property *
* of its copyright holder(s), and is made available *
* under a license. If you do not know the terms of *
* the license, please stop and do not read further. *
* *
****************************************************************/
#ifndef GTMCRYPT_DBK_REF_H
#define GTMCRYPT_DBK_REF_H
typedef struct
{
xc_string_t db_name, key_filename; /* name of the database and corresponding key found in the db key file */
xc_string_t key_string, hash; /* plain text key and it's hash */
xc_fileid_ptr_t fileid; /* if valid, unique file id representation of the database path */
int fileid_dirty, sym_key_dirty; /* indicates if the db and the key file are valid accessible path */
int index; /* A positive integer (initialized to -1) indicating the ith entry in the db key
* file. This value is returned to the caller and subsequently passed to the
* plugin to get the key for the corresponding database. */
struct db_key_map *next; /* Pointer to the next entry in the linked list */
crypt_key_t encr_key_handle, decr_key_handle; /* Pointer to the actual key handles typedef'ed to the underlying
* encryption library. */
}db_key_map;
void gc_dbk_scrub_entries(void);
xc_status_t gc_dbk_is_db_key_file_modified(void);
db_key_map* gc_dbk_get_entry_by_fileid(xc_fileid_ptr_t fileid);
db_key_map* gc_dbk_get_entry_by_hash(xc_string_t *hash);
dbkeyfile_line_type gc_dbk_get_line_info (char *buf, char *data);
xc_status_t gc_dbk_load_gtm_dbkeys(FILE **gtm_dbkeys);
xc_status_t gc_dbk_load_entries_from_file(void);
xc_status_t gc_dbk_fill_sym_key_and_hash(xc_fileid_ptr_t req_fileid, char *req_hash);
void gc_dbk_get_hash(db_key_map *entry, xc_string_t *hash);
#define GC_FREE_DB_KEY_MAP(X) \
{ \
GC_FREE((X)->db_name.address); \
GC_FREE((X)->key_filename.address); \
memset((X)->key_string.address, 0, GTM_KEY_MAX);\
GC_FREE((X)->key_string.address); \
GC_FREE((X)->hash.address); \
gtm_xcfileid_free_fptr((X)->fileid); \
GC_FREE(X); \
}
#define GC_NEW_DB_KEYMAP(X) \
{ \
GC_MALLOC(X, SIZEOF(db_key_map), db_key_map); \
memset(X, 0, SIZEOF(db_key_map)); \
GC_MALLOC(X->db_name.address, GTM_PATH_MAX, char); \
memset((X)->db_name.address, 0, GTM_PATH_MAX); \
GC_MALLOC(X->key_filename.address, GTM_PATH_MAX, char); \
memset((X)->key_filename.address, 0, GTM_PATH_MAX); \
GC_MALLOC(X->key_string.address, GTM_PATH_MAX, char); \
memset((X)->key_string.address, 0, GTM_KEY_MAX); \
GC_MALLOC(X->hash.address, GTMCRYPT_HASH_LEN, char); \
memset((X)->hash.address, 0, GTMCRYPT_HASH_LEN); \
(X)->fileid_dirty = TRUE; \
(X)->sym_key_dirty = TRUE; \
(X)->fileid = NULL; \
(X)->index = 0; \
}
#define GC_DBK_LOAD_KEY_FILE \
{ \
if (0 != gc_dbk_load_entries_from_file()) \
return GC_FAILURE; \
}
/* After the preliminary search, if we haven't found our entry in the in-memory linked list for the
* given hash/fileid, we try reloading the db key file(if it has been changed since last time) and then
* we re-organize our in-memory linked list and try to search again.
*/
#define GC_DBK_RELOAD_IF_NEEDED(entry, RC, fileid, req_hash) \
{ \
if (NULL == entry) \
{ \
if (TRUE == gc_dbk_is_db_key_file_modified()) \
GC_DBK_LOAD_KEY_FILE; \
RC = gc_dbk_fill_sym_key_and_hash(fileid, req_hash); \
} \
}
#define GC_DBK_GET_ENTRY_FROM_HANDLE(handle, entry, ret) \
{ \
int idx; \
\
idx = (int)handle; \
if (idx < 0 || (idx > num_entries)) \
{ \
snprintf(err_string, ERR_STRLEN, "%s", "Encryption handle corrupted."); \
entry = NULL; \
return ret; \
} else \
entry = (db_key_map *)fast_lookup_entry[idx]; \
}
#define GC_DBK_FILENAME_TO_ID(filename, fileid) \
{ \
if (TRUE != gtm_filename_to_id_fptr(filename, &fileid)) \
{ \
snprintf(err_string, ERR_STRLEN, "database file %s not found", filename->address); \
return GC_FAILURE; \
} \
}
#define GC_DBK_SET_FIRST_ENTRY(cur) db_map_root = (db_key_map *)cur
#define GC_DBK_GET_FIRST_ENTRY() db_map_root
#define GC_DBK_GET_NEXT_ENTRY(cur) (db_key_map *) cur->next
#endif /* GTMCRYPT_DBK_REF_H */

View File

@ -0,0 +1,24 @@
/****************************************************************
* *
* Copyright 2009 Fidelity Information Services, Inc *
* *
* This source code contains the intellectual property *
* of its copyright holder(s), and is made available *
* under a license If you do not know the terms of *
* the license, please stop and do not read further *
* *
y***************************************************************/
#ifndef GTMCRYPT_INTERFACE_H
#define GTMCRYPT_INTERFACE_H
xc_status_t gtmcrypt_init(int);
xc_status_t gtmcrypt_close(void);
xc_status_t gtmcrypt_hash_gen(gtmcrypt_key_t, xc_string_t *);
xc_status_t gtmcrypt_encode(gtmcrypt_key_t, xc_string_t *, xc_string_t *);
xc_status_t gtmcrypt_decode(gtmcrypt_key_t, xc_string_t *, xc_string_t *);
xc_status_t gtmcrypt_getkey_by_hash(xc_string_t *, gtmcrypt_key_t *);
xc_status_t gtmcrypt_getkey_by_name(xc_string_t *, gtmcrypt_key_t *);
char *gtmcrypt_strerror(void);
#endif /* GTMCRYPT_INTERFACE_H */

View File

@ -0,0 +1,382 @@
/****************************************************************
* *
* Copyright 2009, 2010 Fidelity Information Services, Inc *
* *
* This source code contains the intellectual property *
* of its copyright holder(s), and is made available *
* under a license. If you do not know the terms of *
* the license, please stop and do not read further. *
* *
****************************************************************/
#define _FILE_OFFSET_BITS 64 /* Needed to compile gpgme client progs also with large file support */
#include <stdio.h>
#include <string.h>
#include <unistd.h>
#include <stdlib.h>
#include <assert.h>
#include <sys/stat.h>
#include <sys/types.h>
#include <fcntl.h>
#include <errno.h>
#include <gpgme.h> /* gpgme functions */
#include <gpg-error.h> /* gcry*_err_t */
#include <dlfcn.h>
#include "gtmxc_types.h" /* xc_string, xc_status_t and other callin interfaces xc_fileid */
#include "gtmcrypt_interface.h" /* Function prototypes for gtmcrypt*.* functions */
#include "gtmcrypt_ref.h"
#include "gtmcrypt_pk_ref.h"
static char *gtm_passwd;
static char *gtm_passwd_env;
int can_prompt_passwd;
gpgme_ctx_t pk_crypt_ctx;
extern char err_string[ERR_STRLEN];
/* Take a masked/unmasked passwd and convert it to the other form by doing an XOR operation.
* MASKING:
* The original gtm_passwd value is XOR'ed with the inode number of mumps executable and the
* the value of the env variable $USER (which contains the username of the current user logged in).
* This information is then converted to the hex form for easy viewing and set into the environment
* UNMASKING:
* The gtm_passwd set in the environment is un hexed (after masking, the passwd is set in the hex
* form). This gtm_passwd value is then XOR'ed with the inode number of the executable and the
* env variable $USER (which contains the username of the current user). This information is then
* stored in the gtm_passwd variable for future access. Note the environment variable ($gtm_passwd) still
* contains only the masked password and hence safety of the passwd is still guarenteed.
Note that always, if the username and(or) the inode number is lesser than the length of the un hexed gtm_passwd,
the position of their values are left and right justified with respect to the gtm_passwd value. A typical example
is shown below.
* G T M P A S S W D */
/* ^ ^ ^ ^ ^ ^ ^ ^ ^ */
/* U S E R 0 0 0 0 0 */
/* ^ ^ ^ ^ ^ ^ ^ ^ ^ */
/* 0 0 0 0 I N O D E */
/* ----------------- */
int gc_pk_mask_unmask_passwd(char *in, char *out, int len)
{
char *ptr;
char tmp[GTM_PASSPHRASE_MAX], inode[GTM_PASSPHRASE_MAX], user[GTM_PASSPHRASE_MAX], mumps_ex[GTM_PATH_MAX];
int passwd_len, ilen, status, i;
struct stat stat_info;
passwd_len = len < GTM_PASSPHRASE_MAX ? len : GTM_PASSPHRASE_MAX;
memset(inode, 0, passwd_len);
memset(user, 0, passwd_len);
memset(mumps_ex, 0, GTM_PATH_MAX);
GC_GETENV(ptr, "USER", status);
if (GC_SUCCESS == status)
{
strncpy(user, ptr, passwd_len);
GC_GETENV(ptr, "gtm_dist", status);
if (GC_SUCCESS == status)
{
sprintf(mumps_ex, "%s/%s", ptr, "mumps");
if (0 == stat(mumps_ex, &stat_info))
{
sprintf(tmp, "%ld", (long) stat_info.st_ino);
ilen = (int)strlen(tmp);
if (ilen < passwd_len)
strncpy(inode + (passwd_len - ilen), tmp, ilen);
else
strncpy(inode, tmp, passwd_len);
} else
{
sprintf(err_string, "Cannot find MUMPS executable in %s", ptr);
return GC_FAILURE;
}
for (i = 0; i < passwd_len; i++)
out[i] = in[i] ^ inode[i] ^ user[i];
return GC_SUCCESS;
} else
GC_ENV_UNSET_ERROR("gtm_dist");
}
GC_ENV_UNSET_ERROR("USER");
return GC_FAILURE;
}
int gc_pk_mask_unmask_passwd_interlude(int nparm, gtm_string_t *in, gtm_string_t *out, int len)
{
out->length=len;
return gc_pk_mask_unmask_passwd(in->address, out->address, len);
}
void gc_pk_scrub_passwd()
{
/* Nullify the key strings, so that any generated cores will not contain the unencrypted keys */
memset(gtm_passwd, 0, strlen(gtm_passwd));
/* Free gtm_passwd and gtm_passwd_env variables */
if (NULL != gtm_passwd)
GC_FREE(gtm_passwd);
if (NULL != gtm_passwd_env)
GC_FREE(gtm_passwd_env);
/* Finally release the gpgme context */
if (NULL != pk_crypt_ctx)
gpgme_release(pk_crypt_ctx);
}
/* Loads the GTMCI variable with the path of the gtmcrypt.tab which will be placed in gtm_dist folder at build time.
* Here we assume that the tab file be in $gtm_dist/plugin/gtmcrypt
*/
void gc_pk_crypt_load_gtmci_env()
{
const char *gtm_dist_value;
const char *gtmcrypt_tab_file = "gtmcrypt.tab"; /* Name of the tab file */
static char gtmcrypt_tab_path[TAB_NAME_MAX]; /* Needs to be in scope always */
gtm_dist_value = getenv("gtm_dist");
assert(NULL != gtm_dist_value);
assert(0 != strlen(gtm_dist_value));
sprintf(gtmcrypt_tab_path, "%s/%s/%s", gtm_dist_value, "plugin/gtmcrypt", gtmcrypt_tab_file);
setenv(GTMCI, gtmcrypt_tab_path, TRUE);
}
/* The following function checks if gtm_passwd is already set. If gtm_passwd is not set in the env, it's a serious
* error condition. We return back immediately. If it's set to empty string, we prompt for passwd immediately. The
* current implementation of password prompting is done via a mumps call-in to %GETPASS.
*/
xc_status_t gc_pk_crypt_prompt_passwd_if_needed(int prompt_passwd)
{
/* Name of the mumps password routine that will be called. */
const char *password_routine = "getpass";
/* Points to the value that was held in GTMCI prior to modification. */
char *save_gtmci, tgtm_passwd[GTM_PASSPHRASE_MAX];
char *lgtm_passwd;
int status, len;
gtm_int_t pass_len = GTM_PASSPHRASE_MAX;
can_prompt_passwd = prompt_passwd;
GC_GETENV(lgtm_passwd, GTM_PASSWD, status);
/* This is an error condition. We have hit a encrypted database but the env doesn't have gtm_passwd set. */
if (0 != status)
{
GC_ENV_UNSET_ERROR(GTM_PASSWD);
return GC_FAILURE;
}
/* If the masked password in the environment is same as we have in memory then it means that the password
* has not been changed and so the actual value in the gtm_passwd is still good to use. */
if (NULL != gtm_passwd_env && (0 == strcmp(gtm_passwd_env, lgtm_passwd)))
return GC_SUCCESS;
/* If the password is set to an appropriate value, then we know for sure it's in it's masked form. So, we unmask it
* and set it in the global variable and return to the caller. */
if (0 < (len = (int)strlen(lgtm_passwd)))
{
if (gtm_passwd)
GC_FREE(gtm_passwd);
GC_MALLOC(gtm_passwd, len / 2 + 1, char);
memset(gtm_passwd, 0, len / 2 + 1);
GC_UNHEX(lgtm_passwd, gtm_passwd, len);
status = gc_pk_mask_unmask_passwd(gtm_passwd, gtm_passwd, len / 2);
if (GC_SUCCESS == status)
{
/* Now that we have unmasked the gtm_passwd in the environment
* store the masked version in gtm_passwd_env so that future
* calls to this function can make use of this and return early
* if we find no change between the one in the environment and
* the one in the memory */
if (NULL != gtm_passwd_env)
GC_FREE(gtm_passwd_env);
GC_MALLOC(gtm_passwd_env, strlen(lgtm_passwd) + 1, char);
strcpy(gtm_passwd_env, lgtm_passwd);
}
return status;
} else if (!prompt_passwd)
{
/* If we are here, it means that the caller of the plugin library was not MUMPS (may be MUPIP, DSE and LKE).
* For the utility programs, we expect the password to be set in the environment to an appropriate masked
* form. If not, it's an error and we return the appropriate error message. */
strcpy(err_string, PASSWD_EMPTY);
return GC_FAILURE;
}
/* Only if the gtm_passwd is set to empty string, we prompt the user for password */
GC_MALLOC(gtm_passwd, GTM_PASSPHRASE_MAX, char);
memset(gtm_passwd, 0, GTM_PASSPHRASE_MAX);
save_gtmci = getenv(GTMCI);
gc_pk_crypt_load_gtmci_env();
status = gtm_ci_fptr(password_routine, gtm_passwd, pass_len);
if (0 != status)
{
gtm_zstatus_fptr(err_string, ERR_STRLEN);
return GC_FAILURE;
}
/* Restore the GTMCI variable */
if (NULL != save_gtmci) /* To make sure we don't set an environment variable as NULL */
setenv(GTMCI, save_gtmci, 1);
/* After applying a minimal encryption, we set it to the environment variable */
GC_MALLOC(lgtm_passwd, strlen(gtm_passwd) * 2 + 1, char);
gc_pk_mask_unmask_passwd(gtm_passwd, tgtm_passwd, (int)strlen(gtm_passwd));
GC_HEX(tgtm_passwd, lgtm_passwd, strlen(gtm_passwd) * 2);
setenv("gtm_passwd", lgtm_passwd, TRUE); /* Note that we currently do not free 'gtm_passwd', even if it was
* allocated above, as it needs to be in the env buffer
*/
return GC_SUCCESS;
}
/* This function is called whenever gpg needs the passphrase with which the secret key is encrypted. In this case, the passphrase
* is obtained from the ENVIRONMENT VARIABLE - $gtm_passwd or by invoking the mumps engine during the "gtmcrypt_init()".
* In either ways, it's guaranteed that when this function is called, the passphrase is already set in the global variable.
* In either ways, it's guaranteed that when this function is called, the passphrase is already set in the global variable.
*/
int gc_pk_crypt_passphrase_callback(void *opaque, const char *uid_hint,
const char *passphrase_info, int last_was_bad,
int fd)
{
assert(0 != fd);
assert(NULL != gtm_passwd);
/* This is just being cautious. We would have thrown the appropriate error message
* if gtm_passwd have been zero length'ed one.
*/
assert(0 != strlen(gtm_passwd));
write(fd, gtm_passwd, strlen(gtm_passwd));
write(fd, "\n", 1);
return 0;
}
/* Given the structure that holds the plain data, this function reads through the structure and retrieves the plain text. We
* also return the number of bytes actually read from the structure.
*/
int gc_pk_crypt_retrieve_plain_text(gpgme_data_t plain_data, char *plain_text)
{
int ret;
assert(NULL != plain_text);
/* Clear the temporary buffer */
memset(plain_text, 0, GTM_KEY_MAX);
gpgme_data_seek(plain_data, 0, SEEK_SET);
ret = (int)gpgme_data_read(plain_data, plain_text, GTM_KEY_MAX);
return ret;
}
/* This is currently necessary to work around what seems to be a gpgme issue in not clearing the plaintext keys
* from the C stack (shows up in a core dump otherwise). When gpgme is fixed, this code can be removed.
* The size of lclarray (8K) is determined purely from experimentation on all platforms.
*/
int gc_pk_scrub_plaintext_keys_from_c_stack()
{
char lclarray[8192];
memset(lclarray, 0, SIZEOF(lclarray));
return 0;
}
/* This function tries to decrypt the cipher file (the file containing the symmetric key with which the database is encrypted).
* It's assumed that the context is initialized and is set with the appropriate passphrase callback. The cipher_file
* should contain the fully qualified path of the encrypted database key file. Also, plain text is supposed to be allocated with
* sufficient space to hold the decrypted text.
*/
gpgme_error_t gc_pk_get_decrypted_key(const char *cipher_file, char *plain_text, int *plain_text_length)
{
gpgme_error_t err;
gpgme_data_t cipher_data = NULL, plain_data = NULL;
xc_status_t ret_status;
gpg_err_code_t ecode;
char null_buffer[GTM_KEY_MAX];
assert(NULL != cipher_file);
assert(NULL != plain_text);
assert(NULL != pk_crypt_ctx);
assert(0 != strlen(cipher_file));
/* Convert the cipher content in the cipher file into
* in-memory content. This in-memory content is stored
* in gpgme_data_t structure. */
err = gpgme_data_new_from_file(&cipher_data, cipher_file, 1);
if (!err)
{
err = gpgme_data_new(&plain_data);
if (!err)
{ /* Try decrypting the cipher content with the context.
* The decrypted content will also be stored in gpgme_data_t structure.
*/
err = gpgme_op_decrypt(pk_crypt_ctx, cipher_data, plain_data);
if (!err) /* Once decrypted, the plain text has to be obtained from the plain_data structure. */
*plain_text_length = gc_pk_crypt_retrieve_plain_text(plain_data, plain_text);
gc_pk_scrub_plaintext_keys_from_c_stack();
}
}
ecode = gpgme_err_code(err);
if (0 != ecode)
{
switch(ecode)
{
case GPG_ERR_BAD_PASSPHRASE:
snprintf(err_string, ERR_STRLEN, "%s", "Incorrect password");
break;
case GPG_ERR_ENOENT:
snprintf(err_string, ERR_STRLEN, "encryption key file %s not found", cipher_file);
break;
default:
snprintf(err_string, ERR_STRLEN, "%s", gpgme_strerror(err));
break;
}
}
if (NULL != plain_data)
{ /* scrub plaintext data before releasing it */
assert(GTM_KEY_MAX == SIZEOF(null_buffer));
memset(null_buffer, 0, GTM_KEY_MAX);
gpgme_data_write(plain_data, null_buffer, GTM_KEY_MAX);
gpgme_data_release(plain_data);
}
if (NULL != cipher_data)
gpgme_data_release(cipher_data);
return ecode;
}
int gc_pk_gpghome_has_permissions()
{
char filename[GTM_PATH_MAX], *tmp_ptr = NULL;
int gnupghome_set, status, fd;
/* See if GNUPGHOME is set in the environment */
GC_GETENV(tmp_ptr, GNUPGHOME, status);
if (GC_SUCCESS != status)
{
gnupghome_set = FALSE;
GC_GETENV(tmp_ptr, "HOME", status);
if (GC_SUCCESS != status)
{
GC_ENV_UNSET_ERROR("HOME");
return GC_FAILURE;
}
/* If GNUPGHOME is not set, we choose the filename as $HOME/.gnupg */
snprintf(filename, GTM_PATH_MAX, "%s/%s", tmp_ptr, DOT_GNUPG);
} else
{
gnupghome_set = TRUE;
/* If GNUPGHOME is set, then we choose the path pointed by GNUPGHOME as the
* directory containing the public keys and private keys whose permissions we are
* interested in. */
strcpy(filename, tmp_ptr);
}
/* At this point, we are sure that the filename is pointing to the appropriate directory containing the public/private
* keys. If not, then we had encountered an error and would have returned back to the caller. */
if (-1 != (fd = open(filename, O_RDONLY)))
{
close(fd);
return GC_SUCCESS;
}
/* If we don't have appropriate read permissions then we report the error accordingly. */
if (EACCES == errno)
{
if (gnupghome_set)
snprintf(err_string, ERR_STRLEN, "%s", "No read permissions on $GNUPGHOME");
else
snprintf(err_string, ERR_STRLEN, "%s", "No read permissions on $HOME/.gnupg");
}
close(fd);
return GC_FAILURE;
}

View File

@ -0,0 +1,115 @@
/****************************************************************
* *
* Copyright 2009, 2010 Fidelity Information Services, Inc *
* *
* This source code contains the intellectual property *
* of its copyright holder(s), and is made available *
* under a license. If you do not know the terms of *
* the license, please stop and do not read further. *
* *
****************************************************************/
#ifndef GTMCRYPT_PK_REF_H
#define GTMCRYPT_PK_REF_H
int gc_pk_mask_unmask_passwd(char *in, char *out, int len);
int gc_pk_mask_unmask_passwd_interlude(int nparm, gtm_string_t *in, gtm_string_t *out, int len);
void gc_pk_scrub_passwd();
void gc_pk_crypt_load_gtmci_env();
xc_status_t gc_pk_crypt_prompt_passwd_if_needed(int prompt_passwd);
int gc_pk_crypt_passphrase_callback(void *opaque,
const char *uid_hint,
const char *passphrase_info,
int last_was_bad,
int fd);
int gc_pk_crypt_retrieve_plain_text(gpgme_data_t plain_data, char *plain_text);
gpgme_error_t gc_pk_get_decrypted_key(const char *cipher_file, char *plain_text, int *plain_text_length);
int gc_pk_mask_unmask_passwd(char *in, char *out, int len);
void gc_pk_scrub_passwd(void);
void gc_pk_crypt_load_gtmci_env(void);
int gc_pk_scrub_plaintext_keys_from_c_stack(void);
int gc_pk_gpghome_has_permissions(void);
/* Public key cryptography related macros */
#define GC_PK_INIT \
{ \
gpgme_error_t err; \
\
gpgme_check_version(NULL); /* This initializes the gpgme engine. */ \
err = gpgme_new(&pk_crypt_ctx); \
if (!err) \
{ \
err = gpgme_set_protocol(pk_crypt_ctx, GPGME_PROTOCOL_OpenPGP); \
if (!err) \
{ \
gpgme_set_passphrase_cb(pk_crypt_ctx, \
(gpgme_passphrase_cb_t) gc_pk_crypt_passphrase_callback, \
NULL); \
memset(err_string, 0, ERR_STRLEN); \
} \
} \
if (err) \
{ \
pk_crypt_ctx = NULL; \
snprintf(err_string, \
ERR_STRLEN, \
"Error initializing GpgME: %s/%s", \
gpgme_strsource(err), \
gpgme_strerror(err)); \
return GC_FAILURE; \
} \
}
#define GC_PK_PROMPT_PASSWD(prompt_passwd) \
{ \
if (0 != gc_pk_crypt_prompt_passwd_if_needed(prompt_passwd)) \
return GC_FAILURE; \
}
#define GC_PK_GET_DECRYPTED_KEY(key_string, status) \
{ \
int plain_text_length; \
char decrypted_key[GTM_KEY_MAX]; \
\
memset(decrypted_key, 0, GTM_KEY_MAX); \
status = gc_pk_get_decrypted_key(cur->key_filename.address, decrypted_key, &plain_text_length); \
\
if (0 == status) \
{ \
memcpy(key_string.address, decrypted_key, plain_text_length); \
key_string.length = plain_text_length; \
memset(decrypted_key, 0, GTM_KEY_MAX); \
} \
}
#define GC_PK_APPEND_UNIQ_STRING(in_buff, key_string) \
{ \
memcpy(in_buff, (key_string).address, (key_string).length); \
memcpy(in_buff + (key_string).length, UNIQ_ENC_PARAM_STRING, UNIQ_ENC_PARAM_LEN); \
}
#ifdef USE_OPENSSL
#define GC_PK_COMPUTE_HASH(hash, key_string) \
{ \
char in_buff[HASH_INPUT_BUFF_LEN]; \
\
GC_PK_APPEND_UNIQ_STRING(in_buff, key_string); \
EVP_Digest(in_buff, HASH_INPUT_BUFF_LEN, (unsigned char *)((hash).address), NULL, \
EVP_sha512(), NULL); \
(hash).length = GTMCRYPT_HASH_LEN; \
memset(in_buff, 0, HASH_INPUT_BUFF_LEN); \
}
#else
#define GC_PK_COMPUTE_HASH(hash, key_string) \
{ \
char in_buff[HASH_INPUT_BUFF_LEN]; \
\
GC_PK_APPEND_UNIQ_STRING(in_buff, key_string); \
GC_SYM_INIT; \
gcry_md_hash_buffer(GCRY_MD_SHA512, (hash).address, in_buff, HASH_INPUT_BUFF_LEN); \
(hash).length = GTMCRYPT_HASH_LEN; \
memset(in_buff, 0, HASH_INPUT_BUFF_LEN); \
}
#endif
#endif /* GTMCRYPT_PK_REF_H */

View File

@ -0,0 +1,251 @@
/****************************************************************
* *
* Copyright 2009 Fidelity Information Services, Inc *
* *
* This source code contains the intellectual property *
* of its copyright holder(s), and is made available *
* under a license. If you do not know the terms of *
* the license, please stop and do not read further. *
* *
****************************************************************/
#define _FILE_OFFSET_BITS 64 /* Needed to compile gpgme client progs also with large file support */
#include <stdio.h>
#include <string.h>
#include <unistd.h>
#include <stdlib.h>
#include <dlfcn.h>
#include <assert.h>
#include <sys/stat.h>
#include <errno.h>
#include <gpgme.h> /* gpgme functions */
#include <gpg-error.h> /* gcry*_err_t */
#include "gtmxc_types.h" /* xc_string, xc_status_t and other callin interfaces xc_fileid */
#include "gtmcrypt_interface.h" /* Function prototypes for gtmcrypt*.* functions */
#include "gtmcrypt_ref.h"
#include "gtmcrypt_dbk_ref.h"
#include "gtmcrypt_pk_ref.h"
#include "gtmcrypt_sym_ref.h"
#ifdef __MVS__
#define GTM_DIST "gtm_dist"
#define GTMSHR_IMAGENAME "libgtmshr.dll"
#endif
char err_string[ERR_STRLEN];
int gtmcrypt_inited = FALSE, num_entries;
db_key_map *db_map_root;
db_key_map **fast_lookup_entry = NULL;
extern gpgme_ctx_t pk_crypt_ctx;
/* ==================================================================================== */
/* Plugin API implementations */
/* ==================================================================================== */
char* gtmcrypt_strerror()
{
return err_string;
}
/* Initialize the encryption environment. Note: If any of the following macros fail, the error return happens within the macro. */
xc_status_t gc_init_interface(int prompt_passwd)
{
/*
* zOS is special when it comes to dynamic linking.
* (1). Building DLL with UNRESOLVED symbols
* =========================================
* Unlike other Unix platforms, on zOS DLL cannot be built having unresolved symbols and expecting them to get resolved
* by the loader.
* In this particular scenario we have symbols gtm_malloc, gtm_is_file_identical, gtm_free, gtm_filename_to_id and
* gtm_xcfileid_free that are part of mupip executable.
* As an workaround we are using function pointers to call into the interface functions so that we don't have an link-time
* errors.
* At runtime we do an dlopen with NULL which returns handle to global space and dlsym sets the function pointers to point to
* the correct functions at runtime.
*
* (2). DLSYM on symbols that are already resolved from another DLL
* ================================================================
* When mumps calls into libgtmcrypt it has above mentioned symbols already resolved from libgtmshr.dll.
* On zOS, when we try to DLSYM using the handle returned by DLOPEN(NULL,..), DLSYM crashes while trying to find symbols
* that are already loaded from another DLL(libgtmshr.dll).
* As an work around we dlopen libgtmshr.dll when called from MUMPS.
*/
#ifdef __MVS__
void *handle = NULL;
const char *gtm_dist;
char gtmshr_file[GTM_PATH_MAX];
gtm_dist = getenv(GTM_DIST);
snprintf(gtmshr_file, GTM_PATH_MAX, "%s/%s", gtm_dist, GTMSHR_IMAGENAME);
/*
* prompt_passwd = TRUE implies plugin is invoked from MUMPS. We need to dlopen libgtmshr when invoked from MUMPS.
* Please refer comment 2) above.
*/
if (prompt_passwd)
handle = dlopen(gtmshr_file, GC_FLAGS);
else
handle = dlopen(NULL, GC_FLAGS);
if (NULL == handle)
{
snprintf(err_string, ERR_STRLEN, "%s", "Unable to resolve GT.M interface functions");
return GC_FAILURE;
}
DLSYM_ERR_AND_EXIT(gtm_is_file_identical_fptr_t, gtm_is_file_identical_fptr, GTM_IS_FILE_IDENTICAL_FUNC);
DLSYM_ERR_AND_EXIT(gtm_malloc_fptr_t, gtm_malloc_fptr, GTM_MALLOC_FUNC);
DLSYM_ERR_AND_EXIT(gtm_free_fptr_t, gtm_free_fptr, GTM_FREE_FUNC);
DLSYM_ERR_AND_EXIT(gtm_filename_to_id_fptr_t, gtm_filename_to_id_fptr, GTM_FILENAME_TO_ID_FUNC);
DLSYM_ERR_AND_EXIT(gtm_ci_fptr_t, gtm_ci_fptr, GTM_CI_FUNC);
DLSYM_ERR_AND_EXIT(gtm_zstatus_fptr_t, gtm_zstatus_fptr, GTM_ZSTATUS_FUNC);
DLSYM_ERR_AND_EXIT(gtm_xcfileid_free_fptr_t, gtm_xcfileid_free_fptr, GTM_XCFILEID_FREE_FUNC);
#else
gtm_is_file_identical_fptr = &gtm_is_file_identical;
gtm_malloc_fptr = &gtm_malloc;
gtm_free_fptr = &gtm_free;
gtm_filename_to_id_fptr = &gtm_filename_to_id;
gtm_ci_fptr = &gtm_ci;
gtm_zstatus_fptr = &gtm_zstatus;
gtm_xcfileid_free_fptr = &gtm_xcfileid_free;
#endif
return GC_SUCCESS;
}
xc_status_t gtmcrypt_init(int prompt_passwd)
{
if (GC_SUCCESS != gc_init_interface(prompt_passwd))
return GC_FAILURE;
GC_IF_INITED_RETURN;
GC_PK_INIT;
GC_PK_PROMPT_PASSWD(prompt_passwd)
GC_SET_INITED;
return GC_SUCCESS;
}
/* Note: If any of the following macros fail, the error return happens within the macro. */
xc_status_t gtmcrypt_getkey_by_name(xc_string_t *filename, gtmcrypt_key_t *handle)
{
xc_fileid_ptr_t fileid = NULL;
db_key_map *entry;
xc_status_t status = GC_SUCCESS;
GC_VERIFY_INITED;
*handle = INVALID_HANDLE;
GC_DBK_FILENAME_TO_ID(filename, fileid);
entry = gc_dbk_get_entry_by_fileid(fileid);
/* If the load below failed, don't continue */
GC_DBK_RELOAD_IF_NEEDED(entry, status, fileid, NULL);
if (0 == status)
{
entry = gc_dbk_get_entry_by_fileid(fileid);
if (NULL == entry)
{
snprintf(err_string,
ERR_STRLEN,
"database file %s missing in DB keys file or does not exist",
filename->address);
return GC_FAILURE;
}
*handle = entry->index;
}
return status;
}
/* Note: If any of the following macros fail, the error return happens within the macro. */
xc_status_t gtmcrypt_getkey_by_hash(xc_string_t *hash, gtmcrypt_key_t *handle)
{
db_key_map *entry;
xc_status_t status = GC_SUCCESS;
int i, err_caused_by_gpg;
char save_err[ERR_STRLEN], hex_buff[GTMCRYPT_HASH_HEX_LEN + 1];
char *gpg_msg = "Verify encrypted key file and your GNUPGHOME settings";
char *correct_key_msg = "Verify encryption key in DB keys file";
char *alert_msg;
*handle = INVALID_HANDLE;
GC_VERIFY_INITED;
entry = gc_dbk_get_entry_by_hash(hash);
/* If the load below failed, don't continue */
GC_DBK_RELOAD_IF_NEEDED(entry, status, NULL, hash->address);
if (0 == status)
{
entry = gc_dbk_get_entry_by_hash(hash);
if (NULL == entry)
{
/* If the lookup still failed, then verify if we have right permissions on
* GNUPGHOME or $HOME/.gnupg (if GNUPGHOME is unset). If not, then the below
* function will store the appropriate error message in err_string and
* so we can return GC_FAILURE.*/
if (GC_SUCCESS != gc_pk_gpghome_has_permissions())
return GC_FAILURE;
err_caused_by_gpg = ('\0' != err_string[0]);
alert_msg = (err_caused_by_gpg ? gpg_msg : correct_key_msg);
/* Save the previous error message if any */
strcpy(save_err, err_string);
for (i = 0; i < GTMCRYPT_HASH_HEX_LEN; i+=2)
sprintf(hex_buff + i, "%02X", (unsigned char)(hash->address[i/2]));
if (err_caused_by_gpg)
snprintf(err_string, ERR_STRLEN, "Expected hash - %s - %s. %s", hex_buff, save_err, alert_msg);
else
snprintf(err_string, ERR_STRLEN, "Expected hash - %s. %s", hex_buff, alert_msg);
return GC_FAILURE;
}
*handle = entry->index;
}
return status;
}
/* Note: If any of the following macros fail, the error return happens within the macro. */
xc_status_t gtmcrypt_hash_gen(gtmcrypt_key_t handle, xc_string_t *hash)
{
db_key_map *entry;
GC_VERIFY_INITED;
assert(INVALID_HANDLE != handle);
GC_DBK_GET_ENTRY_FROM_HANDLE(handle, entry, GC_FAILURE);
gc_dbk_get_hash(entry, hash);
return GC_SUCCESS;
}
/* Note: If any of the following macros fail, the error return happens within the macro. */
xc_status_t gtmcrypt_encode(gtmcrypt_key_t handle, xc_string_t *unencrypted_block, xc_string_t *encrypted_block)
{
crypt_key_t key_handle;
db_key_map *entry;
GC_VERIFY_INITED;
assert(INVALID_HANDLE != handle);
GC_DBK_GET_ENTRY_FROM_HANDLE(handle, entry, GC_FAILURE);
key_handle = entry->encr_key_handle;
GC_SYM_ENCODE(key_handle, unencrypted_block, encrypted_block);
return GC_SUCCESS;
}
/* Note: If any of the following macros fail, the error return happens within the macro. */
xc_status_t gtmcrypt_decode(gtmcrypt_key_t handle, xc_string_t *encrypted_block, xc_string_t *unencrypted_block)
{
crypt_key_t key_handle;
db_key_map *entry;
GC_VERIFY_INITED;
assert(INVALID_HANDLE != handle);
GC_DBK_GET_ENTRY_FROM_HANDLE(handle, entry, GC_FAILURE);
key_handle = entry->decr_key_handle;
GC_SYM_DECODE(key_handle, encrypted_block, unencrypted_block);
return GC_SUCCESS;
}
/* Note: If any of the following macros fail, the error return happens within the macro. */
xc_status_t gtmcrypt_close()
{
GC_VERIFY_INITED;
gc_pk_scrub_passwd();
gc_dbk_scrub_entries();
GC_CLEAR_INITED;
return GC_SUCCESS;
}

View File

@ -0,0 +1,245 @@
/****************************************************************
* *
* Copyright 2009, 2011 Fidelity Information Services, Inc *
* *
* This source code contains the intellectual property *
* of its copyright holder(s), and is made available *
* under a license. If you do not know the terms of *
* the license, please stop and do not read further. *
* *
****************************************************************/
#ifndef GTMCRYPT_REF_H
#define GTMCRYPT_REF_H
#ifdef USE_OPENSSL
# include <openssl/blowfish.h>
# include <openssl/sha.h>
# include <openssl/evp.h>
#elif defined USE_GCRYPT
# include <gcrypt.h>
#else
# error "Unsupported encryption library. Reference implementation currently supports openssl and gcrypt"
#endif
#ifndef DEBUG
#undef assert
#define assert(x)
#endif
/* Any change done to the below macro should be reflected in mdef.h and vice versa */
/* Note: sizeof returns a "unsigned long" type by default. In expressions involving 32-bit quantities,
* using sizeof causes a compiler warning for every 64->32 bit auto cast (zOS compiler for now).
* Hence typecasting the return to "int" on zOS (to avoid warning) in most common sizeof usages.
* Whenever SIZEOF needs to be used in expressions involving 64-bit pointer quantities, use ((INTPTR_T)SIZEOF(...)).
* Whenever SIZEOF needs to be used in expressions involving 64-bit integer quantities, use ((long)SIZEOF(...)).
*/
#if defined(__MVS__)
# define SIZEOF(X) ((int)(sizeof(X)))
#else
# define SIZEOF(X) ((long)sizeof(X))
#endif
typedef enum
{
ERROR_LINE_INFO = -1,
DAT_LINE_INFO,
KEY_LINE_INFO
} dbkeyfile_line_type;
typedef enum
{
LOOKING_FOR_DAT_ENTRY = 1,
LOOKING_FOR_KEY_ENTRY,
NUM_STATES
} dbkeyfile_states;
#ifdef USE_OPENSSL
typedef EVP_CIPHER_CTX crypt_key_t;
#else
typedef gcry_cipher_hd_t crypt_key_t;
#endif
#define TAB_NAME_MAX 512
#define GTM_PASSPHRASE_MAX 512
#define GC_ENCRYPT 1
#define GC_DECRYPT 0
#define GC_FAILURE 1
#define GC_SUCCESS 0
#define TRUE 1
#define FALSE 0
#define GNUPGHOME "GNUPGHOME"
#define DOT_GNUPG ".gnupg"
#define GTM_PASSWD "gtm_passwd"
#define GTM_DBKEYS "gtm_dbkeys"
#define DOT_GTM_DBKEYS "."GTM_DBKEYS
#define PASSWD_EMPTY "Environment variable gtm_passwd set to empty string. Password prompting not allowed for utilites"
#define GTM_PATH_MAX 1024
#define GTM_KEY_MAX 32
#define GTMCRYPT_HASH_LEN 64
#define GTMCRYPT_HASH_HEX_LEN GTMCRYPT_HASH_LEN * 2
#define DAT_LINE_INDICATOR "dat "
#define KEY_LINE_INDICATOR "key "
#define DAT_LINE_INDICATOR_SIZE (SIZEOF(DAT_LINE_INDICATOR) - 1)
#define KEY_LINE_INDICATOR_SIZE (SIZEOF(KEY_LINE_INDICATOR) - 1)
#define INVALID_HANDLE -1
#define GTMCI "GTMCI"
#define ERR_STRLEN 2048
#ifdef USE_GCRYPT
#define IV_LEN 16
#define ALGO GCRY_CIPHER_AES256
#define MODE GCRY_CIPHER_MODE_CFB
/* This string uniquely identifies the encryption algorithm and its parameters.
* It will be appended to the encryption key and the combination will be hashed (with SHA512).
* This hash will be used verify that the same algorithm (including parameters) and key are used to
* open the database file as were used to create the database file. */
#define UNIQ_ENC_PARAM_STRING "AES256CFB"
#define FLAGS 0
static char iv[IV_LEN];
static int gcry_already_inited = FALSE;
#else
#define ALGO EVP_bf_cfb64()
#define UNIQ_ENC_PARAM_STRING "BLOWFISHCFB"
#endif
#define UNIQ_ENC_PARAM_LEN SIZEOF(UNIQ_ENC_PARAM_STRING) - 1
#define HASH_INPUT_BUFF_LEN UNIQ_ENC_PARAM_LEN + GTM_KEY_MAX
/* ==================================================================================== */
/* Legend to namespaces used -
* gc_XXXXX - All functions start with the gc_ namespace
* gc_dbk_XXX - All functions related to db key mapping and internal book keeping
* gc_sym_XXX - All functions related to usages of symmetric enc/dec activities, primarily using libgcrypt or libcrypto
* gc_pk_XXX - All functions related to usages of public/private key enc/dec activities, primarily using libgpgme
*/
/* ==================================================================================== */
/* ==================================================================================== */
/* Generic macros and functions related to this plugin */
/* ==================================================================================== */
#define GC_MIN_STATIC_BLOCK_SIZE 4096 /* Have a good size block, so that we dont keep reallocating */
#define GC_ROUNDUP(x, y) ((x / y) * y) + ((x % y) ? y : 0)
#define GC_FLAGS (RTLD_NOW | RTLD_GLOBAL)
#define GTM_MALLOC_FUNC "gtm_malloc"
#define GTM_FREE_FUNC "gtm_free"
#define GTM_FILENAME_TO_ID_FUNC "gtm_filename_to_id"
#define GTM_CI_FUNC "gtm_ci"
#define GTM_ZSTATUS_FUNC "gtm_zstatus"
#define GTM_IS_FILE_IDENTICAL_FUNC "gtm_is_file_identical"
#define GTM_XCFILEID_FREE_FUNC "gtm_xcfileid_free"
xc_status_t gc_init_interface(int prompt_passwd);
typedef void * (*gtm_malloc_fptr_t)(size_t);
typedef void (*gtm_free_fptr_t)(void *);
typedef xc_status_t (*gtm_filename_to_id_fptr_t)(xc_string_t *, xc_fileid_ptr_t *);
typedef xc_status_t (*gtm_ci_fptr_t)(const char *c_rtn_name, ...);
typedef void (*gtm_zstatus_fptr_t)(char *msg, int len);
typedef xc_status_t (*gtm_is_file_identical_fptr_t)(xc_fileid_ptr_t, xc_fileid_ptr_t);
typedef void (*gtm_xcfileid_free_fptr_t)(xc_fileid_ptr_t);
gtm_malloc_fptr_t gtm_malloc_fptr;
gtm_free_fptr_t gtm_free_fptr;
gtm_filename_to_id_fptr_t gtm_filename_to_id_fptr;
gtm_ci_fptr_t gtm_ci_fptr;
gtm_zstatus_fptr_t gtm_zstatus_fptr;
gtm_is_file_identical_fptr_t gtm_is_file_identical_fptr;
gtm_xcfileid_free_fptr_t gtm_xcfileid_free_fptr;
#define DLSYM_ERR_AND_EXIT(fptr_type, fptr, func_name) \
{ \
fptr = (fptr_type)dlsym(handle, func_name); \
if (NULL == fptr) \
{ \
snprintf(err_string, ERR_STRLEN, "Enable to resolve %s ", func_name); \
return GC_FAILURE; \
} \
}
#define GC_MALLOC(blk, len, type) \
{ \
blk = (type *)gtm_malloc_fptr(len); \
assert (blk); \
}
#define GC_FREE(blk) gtm_free_fptr(blk)
#define GC_COPY_TO_XC_STRING(X, STR, N) \
{ \
memcpy((X)->address, STR, N); \
(X)->length = N; \
}
/* Following makes sure that at no point we are in the encryption library without gtmcrypt_init getting called
* prior to the current call
*/
#define GC_VERIFY_INITED \
{ \
if (!gtmcrypt_inited) \
{ \
snprintf(err_string, ERR_STRLEN, "%s", "Encryption library has not been initialized"); \
return GC_FAILURE; \
} \
}
#define GC_IF_INITED_RETURN \
{ \
/* Check if init has happened already */ \
if (gtmcrypt_inited) \
return GC_SUCCESS; \
}
#define GC_SET_INITED gtmcrypt_inited = TRUE;
#define GC_CLEAR_INITED gtmcrypt_inited = FALSE;
#define GC_INT(H) ((H >= 'A' && H <= 'F') ? ((H - 'A') + 10) : (H - '0'))
#define GC_UNHEX(a, b, len) \
{ \
int i; \
for (i = 0; i < len; i+=2) \
b[i/2] = (unsigned char)(GC_INT(a[i]) * 16 + GC_INT(a[i + 1])); \
}
#define GC_HEX(a, b, len) \
{ \
int i; \
for (i = 0; i < len; i+=2) \
sprintf(b + i, "%02X", (unsigned char)a[i/2]); \
}
#define GC_GETENV(ptr, key, RC) \
{ \
RC = GC_SUCCESS; \
if (NULL == (ptr = (char *)getenv(key))) \
RC = GC_FAILURE; \
}
#define GC_ENV_UNSET_ERROR(key) \
{ \
snprintf(err_string, ERR_STRLEN, "Environment variable %s not set", key); \
}
/* Allocate a single block, and try reusing the same everytime this macro is called */
#ifdef USE_OPENSSL
#define GC_GET_STATIC_BLOCK(out, block_len) \
{ \
static char *blk = (char *)NULL; \
static int allocated_len = GC_MIN_STATIC_BLOCK_SIZE; \
if (blk == NULL || (block_len > allocated_len)) \
{ \
if (blk) \
GC_FREE(blk); \
allocated_len = (block_len > allocated_len) ? \
GC_ROUNDUP(block_len, GC_MIN_STATIC_BLOCK_SIZE) : \
allocated_len; \
GC_MALLOC(blk, allocated_len, char); \
} \
out = blk; \
}
#endif
#endif /* GTMCRYPT_REF_H */

View File

@ -0,0 +1,174 @@
/****************************************************************
* *
* Copyright 2009, 2010 Fidelity Information Services, Inc *
* *
* This source code contains the intellectual property *
* of its copyright holder(s), and is made available *
* under a license. If you do not know the terms of *
* the license, please stop and do not read further. *
* *
****************************************************************/
#ifndef GTMCRYPT_SYM_REF_H
#define GTMCRYPT_SYM_REF_H
/* ==================================================================================== */
/* Macros and functions for symmetric encryption tasks */
/* ==================================================================================== */
#ifdef USE_OPENSSL
#define GC_SYM_CREATE_HANDLES(cur_entry) \
{ \
int ecode; \
unsigned char *key = (unsigned char *)(cur_entry->key_string.address); \
\
EVP_CIPHER_CTX_init(&(cur_entry->encr_key_handle)); \
ecode = EVP_CipherInit(&(cur_entry->encr_key_handle), ALGO, key, NULL, GC_ENCRYPT); \
GC_SYM_ERROR(ecode, GC_FAILURE); \
\
EVP_CIPHER_CTX_init(&(cur_entry->decr_key_handle)); \
ecode = EVP_CipherInit(&(cur_entry->decr_key_handle), ALGO, key, NULL, GC_DECRYPT); \
GC_SYM_ERROR(ecode, GC_FAILURE); \
}
#define GC_SYM_ERROR(err, return_value) \
{ \
if (!err) \
{ \
ERR_error_string_n(err, err_string, ERR_STRLEN); \
return return_value; \
} \
}
#else
#define GC_SYM_CREATE_HANDLES(cur_entry) \
{ \
gcry_error_t err; \
char *key = cur_entry->key_string.address; \
size_t keylen = cur_entry->key_string.length; \
\
GC_SYM_INIT; \
err = gcry_cipher_open(&(cur_entry->encr_key_handle), ALGO, MODE, FLAGS); \
if (!err) \
err = gcry_cipher_setkey(cur_entry->encr_key_handle, key, keylen); \
GC_SYM_ERROR(err, GC_FAILURE); \
err = gcry_cipher_open(&(cur_entry->decr_key_handle), ALGO, MODE, FLAGS); \
if (!err) \
err = gcry_cipher_setkey(cur_entry->decr_key_handle, key, keylen); \
GC_SYM_ERROR(err, GC_FAILURE); \
}
#define GC_SYM_ERROR(err, return_value) \
{ \
if (GPG_ERR_NO_ERROR != err) \
{ \
snprintf(err_string, ERR_STRLEN, "%s", gcry_strerror(err)); \
return return_value; \
} \
}
#endif
#ifdef USE_GCRYPT
/* Initialization and error handling functions defined only for libgcrypt.
* OpenSSL doesn't neeed them. */
#define GC_SYM_INIT \
{ \
gcry_error_t err; \
char *ver; \
\
if (!gcry_already_inited) \
{ \
memset(iv, 0, IV_LEN); \
if (!gcry_check_version(GCRYPT_VERSION)) \
{ \
snprintf(err_string, \
ERR_STRLEN, \
"libgcrypt version mismatch. %s or higher is required", \
GCRYPT_VERSION); \
return GC_FAILURE; \
} \
if (!(err = gcry_control(GCRYCTL_DISABLE_SECMEM, 0))) \
if (!(err = gcry_control(GCRYCTL_INITIALIZATION_FINISHED, 0))) \
gcry_already_inited = TRUE; \
GC_SYM_ERROR(err, GC_FAILURE); \
} \
}
#endif
#ifdef USE_OPENSSL
#define GC_SYM_COMMON(key_handle, in_block, out_block, flag) \
{ \
int block_len, is_inplace, ecode, tmp_len; \
int out_len; \
char *static_out_blk; \
unsigned char *in = NULL, *out = NULL; \
\
assert(in_block->address); \
assert(0 != in_block->length); \
in = (unsigned char *)in_block->address; \
block_len = in_block->length; \
out = (unsigned char *)out_block->address; \
if (NULL == out_block->address) \
{ \
GC_GET_STATIC_BLOCK(static_out_blk, block_len); \
out = (unsigned char *)static_out_blk; \
is_inplace = TRUE; \
} else \
is_inplace = FALSE; \
ecode = EVP_CipherUpdate(&key_handle, out, &out_len, in, block_len); \
if (ecode) \
ecode = EVP_CipherFinal(&key_handle, out + out_len, &tmp_len); \
GC_SYM_ERROR(ecode, GC_FAILURE); \
if (is_inplace) \
memcpy(in, out, block_len); \
}
#else /* USE_GCRYPT */
#define GC_SYM_COMMON(key_handle, in_block, out_block, flag) \
{ \
int is_inplace = 0; \
size_t blen; \
gcry_error_t err; \
\
assert(in_block->address); \
assert(0 != in_block->length); \
blen = in_block->length; \
if (NULL == out_block->address) \
is_inplace = TRUE; \
\
GC_SYM_INIT; \
gcry_cipher_setiv(key_handle, iv, IV_LEN); \
if (is_inplace) \
{ \
if (flag == GC_ENCRYPT) \
{ \
err = gcry_cipher_encrypt(key_handle, in_block->address, blen, NULL, 0);\
GC_SYM_ERROR(err, GC_FAILURE); \
} else \
{ \
err = gcry_cipher_decrypt(key_handle, in_block->address, blen, NULL, 0);\
GC_SYM_ERROR(err, GC_FAILURE); \
} \
} else \
{ \
if (flag == GC_ENCRYPT) \
{ \
err = gcry_cipher_encrypt(key_handle, \
out_block->address, \
blen, \
in_block->address, \
blen); \
GC_SYM_ERROR(err, GC_FAILURE); \
} else \
{ \
err = gcry_cipher_decrypt(key_handle, \
out_block->address, \
blen, \
in_block->address, \
blen); \
GC_SYM_ERROR(err, GC_FAILURE); \
} \
} \
}
#endif
#define GC_SYM_DECODE(key_handle, encrypted_block, unencrypted_block) \
GC_SYM_COMMON(key_handle, encrypted_block, unencrypted_block, GC_DECRYPT)
#define GC_SYM_ENCODE(key_handle, unencrypted_block, encrypted_block) \
GC_SYM_COMMON(key_handle, unencrypted_block, encrypted_block, GC_ENCRYPT)
#endif /* GTMCRYPT_SYM_REF_H */

View File

@ -0,0 +1,87 @@
/****************************************************************
* *
* Copyright 2001, 2011 Fidelity Information Services, Inc *
* *
* This source code contains the intellectual property *
* of its copyright holder(s), and is made available *
* under a license. If you do not know the terms of *
* the license, please stop and do not read further. *
* *
****************************************************************/
/* gtmxc_types.h - GT.M, Unix Edition External Call type definitions. */
#ifndef GTMXC_TYPES_H
#define GTMXC_TYPES_H
#ifdef __osf__
/* Ensure 32-bit pointers for compatibility with GT.M internal representations. */
#pragma pointer_size (save)
#pragma pointer_size (short)
#endif
typedef int xc_status_t;
typedef int xc_int_t;
typedef unsigned int xc_uint_t;
#if defined(__osf__)
typedef int xc_long_t;
typedef unsigned int xc_ulong_t;
#else
typedef long xc_long_t;
typedef unsigned long xc_ulong_t;
#endif
typedef float xc_float_t;
typedef double xc_double_t;
typedef char xc_char_t;
typedef int (*xc_pointertofunc_t)();
typedef struct
{
xc_long_t length;
xc_char_t *address;
} xc_string_t;
#ifdef __osf__
#pragma pointer_size (restore)
#endif
/* new types for external/call-in user - xc_* types still valid for backward compatibility */
typedef xc_status_t gtm_status_t;
typedef xc_int_t gtm_int_t;
typedef xc_uint_t gtm_uint_t;
typedef xc_long_t gtm_long_t;
typedef xc_ulong_t gtm_ulong_t;
typedef xc_float_t gtm_float_t;
typedef xc_double_t gtm_double_t;
typedef xc_char_t gtm_char_t;
typedef xc_string_t gtm_string_t;
typedef xc_pointertofunc_t gtm_pointertofunc_t;
typedef struct
{
gtm_string_t rtn_name;
void* handle;
} ci_name_descriptor;
/* call-in interface */
xc_status_t gtm_ci(const char *c_rtn_name, ...);
xc_status_t gtm_cip(ci_name_descriptor *ci_info, ...);
xc_status_t gtm_init(void);
xc_status_t gtm_exit(void);
void gtm_zstatus(char* msg, int len);
typedef int gtmcrypt_key_t;
typedef void *xc_fileid_ptr_t;
xc_status_t gtm_filename_to_id(xc_string_t *filename, xc_fileid_ptr_t *fileid);
xc_status_t gtm_is_file_identical(xc_fileid_ptr_t fileid1, xc_fileid_ptr_t fileid2);
void gtm_xcfileid_free(xc_fileid_ptr_t fileid);
void *gtm_malloc(size_t);
void gtm_free(void *);
#endif /* GTMXC_TYPES_H */

View File

@ -0,0 +1,21 @@
/****************************************************************
* *
* Copyright 2009 Fidelity Information Services, Inc *
* *
* This source code contains the intellectual property *
* of its copyright holder(s), and is made available *
* under a license. If you do not know the terms of *
* the license, please stop and do not read further. *
* *
****************************************************************/
#ifndef MAIN_PRAGMA_included
#define MAIN_PRAGMA_included
#ifdef __MVS__
#pragma runopts(ENVAR(_BPXK_AUTOCVT=ON))
#pragma runopts(FILETAG(AUTOCVT,AUTOTAG))
#endif
#endif /* MAIN_PRAGMA_included */

View File

@ -0,0 +1,123 @@
/****************************************************************
* *
* Copyright 2009, 2011 Fidelity Information Services, Inc *
* *
* This source code contains the intellectual property *
* of its copyright holder(s), and is made available *
* under a license. If you do not know the terms of *
* the license, please stop and do not read further. *
* *
****************************************************************/
#include "main_pragma.h"
#include <stdio.h>
#include <string.h>
#include <sys/stat.h>
#include <stdlib.h>
#include <termios.h>
#define MAX_LEN 512
#define FSTR_LEN 7 /* %2048s */
#define GTM_PATH_MAX 1024
#define GTM_DIST "gtm_dist"
struct termios old_tty, no_echo_tty;
#define MIN(a, b) ((a) < (b) ? (a) : (b))
#define HEX(a, b, len) \
{ \
int i; \
for (i = 0; i < len; i+=2) \
sprintf(b + i, "%02X", (unsigned char)a[i/2]); \
}
static void maskpass(char passwd[], char inode[], char user[], size_t max)
{
size_t i;
for (i = 0; i < max; i++)
passwd[i] = passwd[i] ^ inode[i] ^ user[i];
}
static int echo_off()
{
int fd, status;
fd = fileno(stdin);
/* Save current TTY settings */
status = tcgetattr(fd, &old_tty);
if (0 != status)
return 1;
no_echo_tty = old_tty;
no_echo_tty.c_lflag &= ~ECHO; /* Turn off echo */
status = tcsetattr(fd, TCSAFLUSH, &no_echo_tty);
return status;
}
static int echo_on()
{
int fd, status;
fd = fileno(stdin);
status = tcsetattr(fd, TCSAFLUSH, &old_tty);
return status;
}
static void prompt_passwd(char passwd[])
{
char fstr[FSTR_LEN];
int echo_off_status;
sprintf(fstr, "%%%ds", MAX_LEN); /* Create the format string "%2048s" */
printf("Enter Password: ");
echo_off_status = echo_off();
scanf(fstr, passwd);
/* Since echo_on depends on whether echo_off succeeded or not, do echo_on only if echo_off went fine */
if (0 == echo_off_status)
echo_on();
}
int main()
{
char tmp[MAX_LEN], passwd[MAX_LEN], inode[MAX_LEN], user[MAX_LEN], out[MAX_LEN * 2];
char mumps_ex[GTM_PATH_MAX], save_user_env[MAX_LEN], *user_ptr, *dist_ptr;
int i;
size_t passwd_len, ilen;
struct stat stat_info;
memset(passwd, 0, MAX_LEN);
memset(inode, 0, MAX_LEN);
memset(user, 0, MAX_LEN);
memset(out, 0, MAX_LEN * 2);
memset(mumps_ex, 0, GTM_PATH_MAX);
/* We need $USER and $gtm_dist to be defined to do the proper masking */
if (NULL == (user_ptr = (char *)getenv("USER")))
{
printf("Environment variable USER not defined.\n");
exit(1);
}
strcpy(save_user_env, user_ptr);
if (NULL == (dist_ptr = (char *)getenv(GTM_DIST)))
{
printf("Enivronment variable gtm_dist not defined.\n");
exit(1);
}
snprintf(mumps_ex, GTM_PATH_MAX, "%s/%s", dist_ptr, "mumps");
if (0 != stat(mumps_ex, &stat_info))
{
printf("Cannot stat %s\n", mumps_ex);
exit(1);
}
prompt_passwd(passwd);
passwd_len = strlen(passwd);
strncpy(user, save_user_env, MIN(passwd_len, MAX_LEN));
snprintf(tmp, MAX_LEN, "%ld", stat_info.st_ino);
ilen = strlen(tmp);
if (ilen < passwd_len)
strncpy(inode + (passwd_len - ilen), tmp, ilen);
else
strncpy(inode, tmp, passwd_len);
maskpass(passwd, inode, user, passwd_len);
HEX(passwd, out, passwd_len * 2);
printf("%s\n", out);
return 0;
}

View File

@ -0,0 +1,64 @@
/****************************************************************
* *
* Copyright 2002, 2011 Fidelity Information Services, Inc *
* *
* This source code contains the intellectual property *
* of its copyright holder(s), and is made available *
* under a license. If you do not know the terms of *
* the license, please stop and do not read further. *
* *
****************************************************************/
/* Interlude to <limits.h> */
#ifndef GTM_LIMITSH
#define GTM_LIMITSH
#include <limits.h>
#ifdef __hpux
#include <inttypes.h>
#endif
/* The value 1023 for PATH_MAX is derived using pathconf("path", _PC_PATH_MAX) on z/OS.
* Since we cant afford calling a function on each use of PATH_MAX/GTM_PATH_MAX,
* this value is hardcoded here.
*/
#if defined (__MVS__)
#ifndef PATH_MAX
#define PATH_MAX 1023
#endif
#define GTM_PATH_MAX PATH_MAX + 1
#else
#define GTM_PATH_MAX 1024 /* includes terminating NULL */
#endif
#if defined(LLONG_MAX) /* C99 and others */
#define GTM_INT64_MIN LLONG_MIN
#define GTM_INT64_MAX LLONG_MAX
#define GTM_UINT64_MAX ULLONG_MAX
#elif defined(LONG_LONG_MAX)
#define GTM_INT64_MIN LONG_LONG_MIN
#define GTM_INT64_MAX LONG_LONG_MAX
#define GTM_UINT64_MAX ULONG_LONG_MAX
#elif defined(LONGLONG_MAX)
#define GTM_INT64_MIN LONGLONG_MIN
#define GTM_INT64_MAX LONGLONG_MAX
#define GTM_UINT64_MAX ULONGLONG_MAX
#elif defined(__INT64_MAX) /* OpenVMS Alpha */
#define GTM_INT64_MIN __INT64_MIN
#define GTM_INT64_MAX __INT64_MAX
#define GTM_UINT64_MAX __UINT64_MAX
#elif defined(INTMAX_MAX) /* HP-UX */
#define GTM_INT64_MIN INTMAX_MIN
#define GTM_INT64_MAX INTMAX_MAX
#define GTM_UINT64_MAX UINTMAX_MAX
#elif LONG_MAX != INT_MAX /* Tru64 */
#define GTM_INT64_MIN LONG_MIN
#define GTM_INT64_MAX LONG_MAX
#define GTM_UINT64_MAX ULONG_MAX
#else
#error Unable to determine 64 bit MAX in gtm_limits.h
#endif
#endif

View File

@ -0,0 +1,137 @@
/****************************************************************
* *
* Copyright 2010 Fidelity Information Services, Inc *
* *
* This source code contains the intellectual property *
* of its copyright holder(s), and is made available *
* under a license. If you do not know the terms of *
* the license, please stop and do not read further. *
* *
****************************************************************/
/* gtm_stdio.h - gtm interface to stdio.h */
#ifndef GTM_STDIOH
#define GTM_STDIOH
/* This header is split between sr_unix and sr_vvms because there are several test system and standalone modules
* that do not #define UNIX or VMS for us to know which defines to proceed with. So now this split makes
* that determination unnecessary. Note we still use the definition of UNIX or not in THIS header to indicate the
* compilation of a GTM source file or a standalone file not needing (or able to get to) libgtmshr wrappers.
*/
#include <stdio.h>
#define FDOPEN fdopen
#define FGETS(strg, n, strm, fgets_res) (fgets_res = fgets(strg,n,strm))
#define Fopen fopen
#define GETS(buffer, gets_res) syntax error
#define PERROR perror
#define POPEN popen
#define TEMPNAM tempnam
#ifndef P_tmpdir
#define P_tmpdir "/tmp"
#endif
#define DEFAULT_GTM_TMP P_tmpdir
#define RENAME rename
#define SETVBUF setvbuf
#ifdef UNIX
/* We are compiling a GTM source module if UNIX is defined */
# define FPRINTF gtm_fprintf
# define PRINTF gtm_printf
# define SPRINTF gtm_sprintf
# define SNPRINTF gtm_snprintf
int gtm_printf(const char *format, ...);
int gtm_fprintf(FILE *stream, const char *format, ...);
int gtm_sprintf(char *str, const char *format, ...);
int gtm_snprintf(char *str, size_t size, const char *format, ...);
#else
/* We are compiling a standalone or test system module so no override (This is NOT VMS) */
# define FPRINTF fprintf
# define PRINTF printf
# define SPRINTF sprintf
# define SNPRINTF snprintf
#endif
/* Similar to above for *scanf invocations. Note however that TRU64 does NOT have
* the v*scanf functions used by the wrappers so always use the non-wrapper versions.
*/
#if defined(UNIX) && !defined(__osf__)
# define SCANF gtm_scanf
# define SSCANF gtm_sscanf
# define FSCANF gtm_fscanf
int gtm_scanf(const char *format, ...);
int gtm_fscanf(FILE *stream, const char *format, ...);
int gtm_sscanf(char *str, const char *format, ...);
#else
# define SCANF scanf
# define SSCANF sscanf
# define FSCANF fscanf
#endif
#define VPRINTF(FORMAT, VALUE, RC) \
{ \
do \
{ \
RC = vprintf(FORMAT, VALUE); \
} while(-1 == RC && EINTR == errno); \
}
#define VFPRINTF(STREAM, FORMAT, VALUE, RC) \
{ \
do \
{ \
RC = vfprintf(STREAM, FORMAT, VALUE); \
} while(-1 == RC && EINTR == errno); \
}
#define VSPRINTF(STRING, FORMAT, VALUE, RC) \
{ \
do \
{ \
RC = vsprintf(STRING, FORMAT, VALUE); \
} while(-1 == RC && EINTR == errno); \
}
#define VSNPRINTF(STRING, SIZE, FORMAT, VALUE, RC) \
{ \
do \
{ \
RC = vsnprintf(STRING, SIZE, FORMAT, VALUE); \
} while(-1 == RC && EINTR == errno); \
}
/* Note TRU64 does not have these v*scanf() functions so they will generate errors if used */
#define VSCANF(FORMAT, POINTER, RC) \
{ \
do \
{ \
RC = vscanf(FORMAT, POINTER); \
} while(-1 == RC && EINTR == errno); \
}
#define VSSCANF(STRING, FORMAT, POINTER, RC) \
{ \
do \
{ \
RC = vsscanf(STRING, FORMAT, POINTER); \
} while(-1 == RC && EINTR == errno); \
}
#define VFSCANF(STREAM, FORMAT, POINTER, RC) \
{ \
do \
{ \
RC = vfscanf(STREAM, FORMAT, POINTER); \
} while(-1 == RC && EINTR == errno); \
}
#define SPRINTF_ENV_NUM(BUFF, ENV_VAR, ENV_VAL, ENV_IND) \
{ \
assert(NULL == strchr(ENV_VAR, '=')); /* strchr() done in ojstartchild() relies on this */ \
SPRINTF(BUFF, "%s=%d", ENV_VAR, ENV_VAL); *ENV_IND++ = BUFF; \
}
#define SPRINTF_ENV_STR(BUFF, ENV_VAR, ENV_VAL, ENV_IND) \
{ \
assert(NULL == strchr(ENV_VAR, '=')); /* strchr() done in ojstartchild() relies on this */ \
SPRINTF(BUFF, "%s=%s", ENV_VAR, ENV_VAL); *ENV_IND++ = BUFF; \
}
#endif

View File

@ -0,0 +1,50 @@
/****************************************************************
* *
* Copyright 2001, 2007 Fidelity Information Services, Inc *
* *
* This source code contains the intellectual property *
* of its copyright holder(s), and is made available *
* under a license. If you do not know the terms of *
* the license, please stop and do not read further. *
* *
****************************************************************/
/* gtm_stdlib.h - interlude to <stdlib.h> system header file. */
#ifndef GTM_STDLIBH
#define GTM_STDLIBH
#include <stdlib.h>
#ifndef __CYGWIN__
#define GETENV getenv
#else
char *gtm_getenv(char *varname);
#define GETENV gtm_getenv
#endif
#define ATOI atoi
#define ATOL atol
#define ATOF atof
#define PUTENV putenv
#define STRTOL strtol
#define STRTOLL strtoll
#define STRTOUL strtoul
#if INT_MAX < LONG_MAX /* like Tru64 */
#define STRTO64L strtol
#define STRTOU64L strtoul
#elif defined(__hpux)
#include <inttypes.h>
#define STRTO64L strtoimax
#define STRTOU64L strtoumax
#else
#define STRTO64L strtoll
#define STRTOU64L strtoull
#endif
#define MKSTEMP(template,mkstemp_res) (mkstemp_res = mkstemp(template))
#ifndef __CYGWIN__
#define SYSTEM system
#else
#define SYSTEM gtm_system
int gtm_system(const char *line);
#endif
#endif

View File

@ -0,0 +1,32 @@
/****************************************************************
* *
* Copyright 2001, 2011 Fidelity Information Services, Inc *
* *
* This source code contains the intellectual property *
* of its copyright holder(s), and is made available *
* under a license. If you do not know the terms of *
* the license, please stop and do not read further. *
* *
****************************************************************/
/* If this is not the vax, define string.h. This is because the Vax
has its own built-in instructions for string manipulation.
*/
#ifndef GTM_STRINGH
#define GTM_STRINGH
#ifndef __vax
# include <string.h>
#endif
#define STRERROR strerror
#define STRCPY(SOURCE, DEST) strcpy((char *)(SOURCE), (char *)(DEST))
#define STRNCPY_LIT(SOURCE, LITERAL) strncpy((char *)(SOURCE), (char *)(LITERAL), SIZEOF(LITERAL) - 1) /* BYPASSOK */
#define STRNCPY_STR(SOURCE, STRING, LEN) strncpy((char *)(SOURCE), (char *)(STRING), LEN)
#define STRCMP(SOURCE, DEST) strcmp((char *)(SOURCE), (char *)(DEST))
#define STRNCMP_LIT(SOURCE, LITERAL) strncmp(SOURCE, LITERAL, SIZEOF(LITERAL) - 1) /* BYPASSOK */
#define STRNCMP_STR(SOURCE, STRING, LEN) strncmp(SOURCE, STRING, LEN)
#endif

View File

@ -1,6 +1,6 @@
/****************************************************************
* *
* Copyright 2001 Sanchez Computer Associates, Inc. *
* Copyright 2009 Fidelity Information Services, Inc *
* *
* This source code contains the intellectual property *
* of its copyright holder(s), and is made available *
@ -9,16 +9,12 @@
* *
****************************************************************/
#include "mdef.h"
#include "gdsroot.h"
#include "gtm_facility.h"
#include "fileinfo.h"
#include "gdsbt.h"
#include "gdsfhead.h"
#include "get_root.h"
#ifndef GTM_STRINGSH
#define GTM_STRINGSH
GBLREF gv_namehead *gv_target;
#include <strings.h>
int get_root(void)
{ return(gv_target->root);
}
#define STRCASECMP strcasecmp
#define STRNCASECMP strncasecmp
#endif

View File

@ -0,0 +1,87 @@
/****************************************************************
* *
* Copyright 2001, 2011 Fidelity Information Services, Inc *
* *
* This source code contains the intellectual property *
* of its copyright holder(s), and is made available *
* under a license. If you do not know the terms of *
* the license, please stop and do not read further. *
* *
****************************************************************/
/* gtmxc_types.h - GT.M, Unix Edition External Call type definitions. */
#ifndef GTMXC_TYPES_H
#define GTMXC_TYPES_H
#ifdef __osf__
/* Ensure 32-bit pointers for compatibility with GT.M internal representations. */
#pragma pointer_size (save)
#pragma pointer_size (short)
#endif
typedef int xc_status_t;
typedef int xc_int_t;
typedef unsigned int xc_uint_t;
#if defined(__osf__)
typedef int xc_long_t;
typedef unsigned int xc_ulong_t;
#else
typedef long xc_long_t;
typedef unsigned long xc_ulong_t;
#endif
typedef float xc_float_t;
typedef double xc_double_t;
typedef char xc_char_t;
typedef int (*xc_pointertofunc_t)();
typedef struct
{
xc_long_t length;
xc_char_t *address;
} xc_string_t;
#ifdef __osf__
#pragma pointer_size (restore)
#endif
/* new types for external/call-in user - xc_* types still valid for backward compatibility */
typedef xc_status_t gtm_status_t;
typedef xc_int_t gtm_int_t;
typedef xc_uint_t gtm_uint_t;
typedef xc_long_t gtm_long_t;
typedef xc_ulong_t gtm_ulong_t;
typedef xc_float_t gtm_float_t;
typedef xc_double_t gtm_double_t;
typedef xc_char_t gtm_char_t;
typedef xc_string_t gtm_string_t;
typedef xc_pointertofunc_t gtm_pointertofunc_t;
typedef struct
{
gtm_string_t rtn_name;
void* handle;
} ci_name_descriptor;
/* call-in interface */
xc_status_t gtm_ci(const char *c_rtn_name, ...);
xc_status_t gtm_cip(ci_name_descriptor *ci_info, ...);
xc_status_t gtm_init(void);
xc_status_t gtm_exit(void);
void gtm_zstatus(char* msg, int len);
typedef int gtmcrypt_key_t;
typedef void *xc_fileid_ptr_t;
xc_status_t gtm_filename_to_id(xc_string_t *filename, xc_fileid_ptr_t *fileid);
xc_status_t gtm_is_file_identical(xc_fileid_ptr_t fileid1, xc_fileid_ptr_t fileid2);
void gtm_xcfileid_free(xc_fileid_ptr_t fileid);
void *gtm_malloc(size_t);
void gtm_free(void *);
#endif /* GTMXC_TYPES_H */

View File

@ -0,0 +1,21 @@
/****************************************************************
* *
* Copyright 2009 Fidelity Information Services, Inc *
* *
* This source code contains the intellectual property *
* of its copyright holder(s), and is made available *
* under a license. If you do not know the terms of *
* the license, please stop and do not read further. *
* *
****************************************************************/
#ifndef MAIN_PRAGMA_included
#define MAIN_PRAGMA_included
#ifdef __MVS__
#pragma runopts(ENVAR(_BPXK_AUTOCVT=ON))
#pragma runopts(FILETAG(AUTOCVT,AUTOTAG))
#endif
#endif /* MAIN_PRAGMA_included */

16
fis-gtm-src-extras/setupenv.sh Executable file
View File

@ -0,0 +1,16 @@
#!/usr/bin/tcsh
setenv gtm_curpro $PWD/fake-binary-surrogates
setenv gtm_exe $gtm_curpro
setenv HOSTOS `uname -s`
setenv gtm_tools $PWD/sr_linux
setenv gtm_inc $PWD/sr_linux
setenv distro ubuntu
setenv gtm_icu_version 4.4
setenv gtm_version_change 1
source sr_unix/gtm_env.csh
echo "----- Start the build -----"
make -f sr_unix/comlist.mk -I./sr_unix -I./sr_linux buildtypes=pro gtm_ver=$PWD $*
echo "------ End of build -------"

View File

@ -0,0 +1,608 @@
/****************************************************************
* *
* Copyright 2010, 2012 Fidelity Information Services, Inc *
* *
* This source code contains the intellectual property *
* of its copyright holder(s), and is made available *
* under a license. If you do not know the terms of *
* the license, please stop and do not read further. *
* *
****************************************************************/
/* Generated by /tmp/fisgtm/sr_linux/gen_gtm_threadgbl_deftypes.csh */
#ifndef GTM_THREADGBL_DEFTYPES_INCLUDED
#define GTM_THREADGBL_DEFTYPES_INCLUDED
/* Output selection criteria for PRO build */
#if !defined(DEBUG) || defined(PRO_BUILD)
# define ggo_grabbing_crit 0
# define ggt_grabbing_crit gd_region *
# define ggo_boolchain 8
# define ggt_boolchain triple
# define ggo_boolchain_ptr 144
# define ggt_boolchain_ptr triple *
# define ggo_code_generated 152
# define ggt_code_generated boolean_t
# define ggo_codegen_padlen 156
# define ggt_codegen_padlen int4
# define ggo_compile_time 160
# define ggt_compile_time boolean_t
# define ggo_curtchain 168
# define ggt_curtchain triple *
# define ggo_director_ident 176
# define ggt_director_ident mstr
# define ggo_director_mval 192
# define ggt_director_mval mval
# define ggo_director_token 224
# define ggt_director_token char
# define ggo_dollar_zcstatus 228
# define ggt_dollar_zcstatus int4
# define ggo_expr_depth 232
# define ggt_expr_depth unsigned int
# define ggo_expr_start 240
# define ggt_expr_start triple *
# define ggo_expr_start_orig 248
# define ggt_expr_start_orig triple *
# define ggo_for_nest_level 256
# define ggt_for_nest_level uint4
# define ggo_for_stack_ptr 264
# define ggt_for_stack_ptr oprtype **
# define ggo_gtm_fullbool 272
# define ggt_gtm_fullbool unsigned int
# define ggo_ind_result_array 280
# define ggt_ind_result_array mval **
# define ggo_ind_result_sp 288
# define ggt_ind_result_sp mval **
# define ggo_ind_result_top 296
# define ggt_ind_result_top mval **
# define ggo_ind_source_array 304
# define ggt_ind_source_array mval **
# define ggo_ind_source_sp 312
# define ggt_ind_source_sp mval **
# define ggo_ind_source_top 320
# define ggt_ind_source_top mval **
# define ggo_last_source_column 328
# define ggt_last_source_column short int
# define ggo_pos_in_chain 336
# define ggt_pos_in_chain triple
# define ggo_s2n_intlit 472
# define ggt_s2n_intlit boolean_t
# define ggo_saw_side_effect 476
# define ggt_saw_side_effect boolean_t
# define ggo_shift_side_effects 480
# define ggt_shift_side_effects int
# define ggo_source_error_found 484
# define ggt_source_error_found int4
# define ggo_temp_subs 488
# define ggt_temp_subs boolean_t
# define ggo_trigger_compile 492
# define ggt_trigger_compile boolean_t
# define ggo_window_ident 496
# define ggt_window_ident mstr
# define ggo_window_mval 512
# define ggt_window_mval mval
# define ggo_window_token 544
# define ggt_window_token char
# define ggo_dbinit_max_hrtbt_delta 548
# define ggt_dbinit_max_hrtbt_delta uint4
# define ggo_donot_commit 552
# define ggt_donot_commit boolean_t
# define ggo_donot_write_inctn_in_wcs_recover 556
# define ggt_donot_write_inctn_in_wcs_recover boolean_t
# define ggo_gd_targ_addr 560
# define ggt_gd_targ_addr gd_addr *
# define ggo_gtm_gvundef_fatal 568
# define ggt_gtm_gvundef_fatal boolean_t
# define ggo_gv_extname_size 572
# define ggt_gv_extname_size int4
# define ggo_gv_last_subsc_null 576
# define ggt_gv_last_subsc_null boolean_t
# define ggo_gv_mergekey2 584
# define ggt_gv_mergekey2 gv_key *
# define ggo_gv_reorgkey 592
# define ggt_gv_reorgkey gv_key *
# define ggo_gv_some_subsc_null 600
# define ggt_gv_some_subsc_null boolean_t
# define ggo_gv_sparekey 608
# define ggt_gv_sparekey gv_key *
# define ggo_gv_sparekey_mval 616
# define ggt_gv_sparekey_mval mval
# define ggo_gv_sparekey_size 648
# define ggt_gv_sparekey_size int4
# define ggo_gv_tporigkey_ptr 656
# define ggt_gv_tporigkey_ptr gv_orig_key_array *
# define ggo_in_gvcst_redo_root_search 664
# define ggt_in_gvcst_redo_root_search boolean_t
# define ggo_in_op_gvget 668
# define ggt_in_op_gvget boolean_t
# define ggo_issue_DBROLLEDBACK_anyways 672
# define ggt_issue_DBROLLEDBACK_anyways boolean_t
# define ggo_last_fnquery_return_subcnt 676
# define ggt_last_fnquery_return_subcnt int
# define ggo_last_fnquery_return_varname 680
# define ggt_last_fnquery_return_varname mval
# define ggo_new_dbinit_ipc 712
# define ggt_new_dbinit_ipc int4
# define ggo_ok_to_call_wcs_recover 716
# define ggt_ok_to_call_wcs_recover boolean_t
# define ggo_only_reset_clues_if_onln_rlbk 720
# define ggt_only_reset_clues_if_onln_rlbk boolean_t
# define ggo_prev_gv_target 728
# define ggt_prev_gv_target gv_namehead *
# define ggo_ready2signal_gvundef 736
# define ggt_ready2signal_gvundef boolean_t
# define ggo_semwait2long 740
# define ggt_semwait2long volatile boolean_t
# define ggo_tp_restart_count 744
# define ggt_tp_restart_count uint4
# define ggo_tp_restart_dont_counts 748
# define ggt_tp_restart_dont_counts uint4
# define ggo_tp_restart_entryref 752
# define ggt_tp_restart_entryref mval
# define ggo_tp_restart_failhist_indx 784
# define ggt_tp_restart_failhist_indx int4
# define ggo_tp_restart_needlock_cnt 788
# define ggt_tp_restart_needlock_cnt uint4
# define ggo_tp_restart_needlock_tn 792
# define ggt_tp_restart_needlock_tn trans_num
# define ggo_tprestart_syslog_delta 800
# define ggt_tprestart_syslog_delta int4
# define ggo_tprestart_syslog_limit 804
# define ggt_tprestart_syslog_limit int4
# define ggo_transform 808
# define ggt_transform boolean_t
# define ggo_wcs_recover_done 812
# define ggt_wcs_recover_done boolean_t
# define ggo_in_op_fnnext 816
# define ggt_in_op_fnnext boolean_t
# define ggo_local_collseq 824
# define ggt_local_collseq collseq *
# define ggo_local_collseq_stdnull 832
# define ggt_local_collseq_stdnull boolean_t
# define ggo_lv_null_subs 836
# define ggt_lv_null_subs int
# define ggo_max_lcl_coll_xform_bufsiz 840
# define ggt_max_lcl_coll_xform_bufsiz int
# define ggo_replgbl 848
# define ggt_replgbl replgbl_t
# define ggo_collseq_list 872
# define ggt_collseq_list collseq *
# define ggo_create_fatal_error_zshow_dmp_fptr 880
# define ggt_create_fatal_error_zshow_dmp_fptr void
# define gga_create_fatal_error_zshow_dmp_fptr (void)
typedef void (*ggf_create_fatal_error_zshow_dmp_fptr)(void);
# define ggo_disable_sigcont 888
# define ggt_disable_sigcont boolean_t
# define ggo_dollar_zcompile 896
# define ggt_dollar_zcompile mstr
# define ggo_dollar_zmode 912
# define ggt_dollar_zmode mval
# define ggo_dollar_zonlnrlbk 944
# define ggt_dollar_zonlnrlbk int
# define ggo_dollar_zroutines 952
# define ggt_dollar_zroutines mstr
# define ggo_error_on_jnl_file_lost 968
# define ggt_error_on_jnl_file_lost unsigned int
# define ggo_fnzsearch_lv_vars 976
# define ggt_fnzsearch_lv_vars lv_val *
# define ggo_fnzsearch_sub_mval 984
# define ggt_fnzsearch_sub_mval mval
# define ggo_fnzsearch_nullsubs_sav 1016
# define ggt_fnzsearch_nullsubs_sav int
# define ggo_gtm_env_init_done 1020
# define ggt_gtm_env_init_done boolean_t
# define ggo_gtm_env_xlate_entry 1024
# define ggt_gtm_env_xlate_entry int
# define gga_gtm_env_xlate_entry ()
typedef int (*ggf_gtm_env_xlate_entry)();
# define ggo_gtm_environment_init 1032
# define ggt_gtm_environment_init boolean_t
# define ggo_gtm_sigusr1_handler 1040
# define ggt_gtm_sigusr1_handler void
# define gga_gtm_sigusr1_handler (void)
typedef void (*ggf_gtm_sigusr1_handler)(void);
# define ggo_gtm_trctbl_cur 1048
# define ggt_gtm_trctbl_cur trctbl_entry *
# define ggo_gtm_trctbl_end 1056
# define ggt_gtm_trctbl_end trctbl_entry *
# define ggo_gtm_trctbl_groups 1064
# define ggt_gtm_trctbl_groups unsigned int
# define ggo_gtm_trctbl_start 1072
# define ggt_gtm_trctbl_start trctbl_entry *
# define ggo_gtm_waitstuck_script 1080
# define ggt_gtm_waitstuck_script mstr
# define ggo_gtmprompt 1096
# define ggt_gtmprompt mstr
# define ggo_in_zwrite 1112
# define ggt_in_zwrite boolean_t
# define ggo_lab_proxy 1120
# define ggt_lab_proxy lab_tabent_proxy
# define ggo_mprof_alloc_reclaim 1136
# define ggt_mprof_alloc_reclaim boolean_t
# define ggo_mprof_chunk_avail_size 1140
# define ggt_mprof_chunk_avail_size int
# define ggo_mprof_env_gbl_name 1144
# define ggt_mprof_env_gbl_name mval
# define ggo_mprof_ptr 1176
# define ggt_mprof_ptr mprof_wrapper *
# define ggo_mprof_reclaim_addr 1184
# define ggt_mprof_reclaim_addr char *
# define ggo_mprof_reclaim_cnt 1192
# define ggt_mprof_reclaim_cnt int
# define ggo_mprof_stack_curr_frame 1200
# define ggt_mprof_stack_curr_frame mprof_stack_frame *
# define ggo_mprof_stack_next_frame 1208
# define ggt_mprof_stack_next_frame mprof_stack_frame *
# define ggo_open_shlib_root 1216
# define ggt_open_shlib_root open_shlib *
# define ggo_parm_pool_ptr 1224
# define ggt_parm_pool_ptr parm_pool *
# define ggo_parms_cnt 1232
# define ggt_parms_cnt unsigned int
# define ggo_pipefifo_interrupt 1236
# define ggt_pipefifo_interrupt int
# define ggo_prof_fp 1240
# define ggt_prof_fp mprof_stack_frame *
# define ggo_trans_code_pop 1248
# define ggt_trans_code_pop mval *
# define ggo_view_ydirt_str 1256
# define ggt_view_ydirt_str char *
# define ggo_view_ydirt_str_len 1264
# define ggt_view_ydirt_str_len int4
# define ggo_zdate_form 1268
# define ggt_zdate_form int4
# define ggo_zintcmd_active 1272
# define ggt_zintcmd_active zintcmd_active_info
# define ggl_zintcmd_active 72
# define ggo_zro_root 1344
# define ggt_zro_root zro_ent *
# define ggo_zsearch_var 1352
# define ggt_zsearch_var lv_val *
# define ggo_zsearch_dir1 1360
# define ggt_zsearch_dir1 lv_val *
# define ggo_zsearch_dir2 1368
# define ggt_zsearch_dir2 lv_val *
# define ggo_fnpca 1376
# define ggt_fnpca fnpc_area
# define ggo_for_stack 19792
# define ggt_for_stack oprtype *
# define ggl_for_stack 256
# define ggo_for_temps 20048
# define ggt_for_temps boolean_t
# define ggl_for_temps 128
# define ggo_last_fnquery_return_sub 20176
# define ggt_last_fnquery_return_sub mval
# define ggl_last_fnquery_return_sub 1024
# define ggo_lcl_coll_xform_buff 21200
# define ggt_lcl_coll_xform_buff char *
# define ggo_parm_ary 21208
# define ggt_parm_ary char *
# define ggl_parm_ary 40
# define ggo_parm_ary_len 21248
# define ggt_parm_ary_len int
# define ggl_parm_ary_len 20
# define ggo_parm_str_len 21268
# define ggt_parm_str_len int
# define ggl_parm_str_len 20
# define ggo_prombuf 21288
# define ggt_prombuf char
# define ggl_prombuf 32
# define ggo_rt_name_tbl 21320
# define ggt_rt_name_tbl hash_table_mname
# define ggo_tp_restart_failhist_arry 21392
# define ggt_tp_restart_failhist_arry char
# define ggl_tp_restart_failhist_arry 32
# define ggo_director_string 21424
# define ggt_director_string char
# define ggl_director_string 32
# define ggo_window_string 21456
# define ggt_window_string char
# define ggl_window_string 32
# define ggo_callin_hashtab 21488
# define ggt_callin_hashtab hash_table_str *
# define ggo_ci_table 21496
# define ggt_ci_table callin_entry_list *
# define ggo_extcall_package_root 21504
# define ggt_extcall_package_root struct extcall_package_list *
# define ggo_gtmci_nested_level 21512
# define ggt_gtmci_nested_level unsigned int
# define ggo_want_empty_gvts 21516
# define ggt_want_empty_gvts boolean_t
# define size_gtm_threadgbl_struct 21520
#else
# define ggo_grabbing_crit 0
# define ggt_grabbing_crit gd_region *
# define ggo_boolchain 8
# define ggt_boolchain triple
# define ggo_boolchain_ptr 144
# define ggt_boolchain_ptr triple *
# define ggo_code_generated 152
# define ggt_code_generated boolean_t
# define ggo_codegen_padlen 156
# define ggt_codegen_padlen int4
# define ggo_compile_time 160
# define ggt_compile_time boolean_t
# define ggo_curtchain 168
# define ggt_curtchain triple *
# define ggo_director_ident 176
# define ggt_director_ident mstr
# define ggo_director_mval 192
# define ggt_director_mval mval
# define ggo_director_token 224
# define ggt_director_token char
# define ggo_dollar_zcstatus 228
# define ggt_dollar_zcstatus int4
# define ggo_expr_depth 232
# define ggt_expr_depth unsigned int
# define ggo_expr_start 240
# define ggt_expr_start triple *
# define ggo_expr_start_orig 248
# define ggt_expr_start_orig triple *
# define ggo_for_nest_level 256
# define ggt_for_nest_level uint4
# define ggo_for_stack_ptr 264
# define ggt_for_stack_ptr oprtype **
# define ggo_gtm_fullbool 272
# define ggt_gtm_fullbool unsigned int
# define ggo_ind_result_array 280
# define ggt_ind_result_array mval **
# define ggo_ind_result_sp 288
# define ggt_ind_result_sp mval **
# define ggo_ind_result_top 296
# define ggt_ind_result_top mval **
# define ggo_ind_source_array 304
# define ggt_ind_source_array mval **
# define ggo_ind_source_sp 312
# define ggt_ind_source_sp mval **
# define ggo_ind_source_top 320
# define ggt_ind_source_top mval **
# define ggo_last_source_column 328
# define ggt_last_source_column short int
# define ggo_pos_in_chain 336
# define ggt_pos_in_chain triple
# define ggo_s2n_intlit 472
# define ggt_s2n_intlit boolean_t
# define ggo_saw_side_effect 476
# define ggt_saw_side_effect boolean_t
# define ggo_shift_side_effects 480
# define ggt_shift_side_effects int
# define ggo_source_error_found 484
# define ggt_source_error_found int4
# define ggo_temp_subs 488
# define ggt_temp_subs boolean_t
# define ggo_trigger_compile 492
# define ggt_trigger_compile boolean_t
# define ggo_window_ident 496
# define ggt_window_ident mstr
# define ggo_window_mval 512
# define ggt_window_mval mval
# define ggo_window_token 544
# define ggt_window_token char
# define ggo_dbinit_max_hrtbt_delta 548
# define ggt_dbinit_max_hrtbt_delta uint4
# define ggo_donot_commit 552
# define ggt_donot_commit boolean_t
# define ggo_donot_write_inctn_in_wcs_recover 556
# define ggt_donot_write_inctn_in_wcs_recover boolean_t
# define ggo_gd_targ_addr 560
# define ggt_gd_targ_addr gd_addr *
# define ggo_gtm_gvundef_fatal 568
# define ggt_gtm_gvundef_fatal boolean_t
# define ggo_gv_extname_size 572
# define ggt_gv_extname_size int4
# define ggo_gv_last_subsc_null 576
# define ggt_gv_last_subsc_null boolean_t
# define ggo_gv_mergekey2 584
# define ggt_gv_mergekey2 gv_key *
# define ggo_gv_reorgkey 592
# define ggt_gv_reorgkey gv_key *
# define ggo_gv_some_subsc_null 600
# define ggt_gv_some_subsc_null boolean_t
# define ggo_gv_sparekey 608
# define ggt_gv_sparekey gv_key *
# define ggo_gv_sparekey_mval 616
# define ggt_gv_sparekey_mval mval
# define ggo_gv_sparekey_size 648
# define ggt_gv_sparekey_size int4
# define ggo_gv_tporigkey_ptr 656
# define ggt_gv_tporigkey_ptr gv_orig_key_array *
# define ggo_in_gvcst_redo_root_search 664
# define ggt_in_gvcst_redo_root_search boolean_t
# define ggo_in_op_gvget 668
# define ggt_in_op_gvget boolean_t
# define ggo_issue_DBROLLEDBACK_anyways 672
# define ggt_issue_DBROLLEDBACK_anyways boolean_t
# define ggo_last_fnquery_return_subcnt 676
# define ggt_last_fnquery_return_subcnt int
# define ggo_last_fnquery_return_varname 680
# define ggt_last_fnquery_return_varname mval
# define ggo_new_dbinit_ipc 712
# define ggt_new_dbinit_ipc int4
# define ggo_ok_to_call_wcs_recover 716
# define ggt_ok_to_call_wcs_recover boolean_t
# define ggo_only_reset_clues_if_onln_rlbk 720
# define ggt_only_reset_clues_if_onln_rlbk boolean_t
# define ggo_prev_gv_target 728
# define ggt_prev_gv_target gv_namehead *
# define ggo_ready2signal_gvundef 736
# define ggt_ready2signal_gvundef boolean_t
# define ggo_semwait2long 740
# define ggt_semwait2long volatile boolean_t
# define ggo_tp_restart_count 744
# define ggt_tp_restart_count uint4
# define ggo_tp_restart_dont_counts 748
# define ggt_tp_restart_dont_counts uint4
# define ggo_tp_restart_entryref 752
# define ggt_tp_restart_entryref mval
# define ggo_tp_restart_failhist_indx 784
# define ggt_tp_restart_failhist_indx int4
# define ggo_tp_restart_needlock_cnt 788
# define ggt_tp_restart_needlock_cnt uint4
# define ggo_tp_restart_needlock_tn 792
# define ggt_tp_restart_needlock_tn trans_num
# define ggo_tprestart_syslog_delta 800
# define ggt_tprestart_syslog_delta int4
# define ggo_tprestart_syslog_limit 804
# define ggt_tprestart_syslog_limit int4
# define ggo_transform 808
# define ggt_transform boolean_t
# define ggo_wcs_recover_done 812
# define ggt_wcs_recover_done boolean_t
# define ggo_in_op_fnnext 816
# define ggt_in_op_fnnext boolean_t
# define ggo_local_collseq 824
# define ggt_local_collseq collseq *
# define ggo_local_collseq_stdnull 832
# define ggt_local_collseq_stdnull boolean_t
# define ggo_lv_null_subs 836
# define ggt_lv_null_subs int
# define ggo_max_lcl_coll_xform_bufsiz 840
# define ggt_max_lcl_coll_xform_bufsiz int
# define ggo_replgbl 848
# define ggt_replgbl replgbl_t
# define ggo_collseq_list 872
# define ggt_collseq_list collseq *
# define ggo_create_fatal_error_zshow_dmp_fptr 880
# define ggt_create_fatal_error_zshow_dmp_fptr void
# define gga_create_fatal_error_zshow_dmp_fptr (void)
typedef void (*ggf_create_fatal_error_zshow_dmp_fptr)(void);
# define ggo_disable_sigcont 888
# define ggt_disable_sigcont boolean_t
# define ggo_dollar_zcompile 896
# define ggt_dollar_zcompile mstr
# define ggo_dollar_zmode 912
# define ggt_dollar_zmode mval
# define ggo_dollar_zonlnrlbk 944
# define ggt_dollar_zonlnrlbk int
# define ggo_dollar_zroutines 952
# define ggt_dollar_zroutines mstr
# define ggo_error_on_jnl_file_lost 968
# define ggt_error_on_jnl_file_lost unsigned int
# define ggo_fnzsearch_lv_vars 976
# define ggt_fnzsearch_lv_vars lv_val *
# define ggo_fnzsearch_sub_mval 984
# define ggt_fnzsearch_sub_mval mval
# define ggo_fnzsearch_nullsubs_sav 1016
# define ggt_fnzsearch_nullsubs_sav int
# define ggo_gtm_env_init_done 1020
# define ggt_gtm_env_init_done boolean_t
# define ggo_gtm_env_xlate_entry 1024
# define ggt_gtm_env_xlate_entry int
# define gga_gtm_env_xlate_entry ()
typedef int (*ggf_gtm_env_xlate_entry)();
# define ggo_gtm_environment_init 1032
# define ggt_gtm_environment_init boolean_t
# define ggo_gtm_sigusr1_handler 1040
# define ggt_gtm_sigusr1_handler void
# define gga_gtm_sigusr1_handler (void)
typedef void (*ggf_gtm_sigusr1_handler)(void);
# define ggo_gtm_trctbl_cur 1048
# define ggt_gtm_trctbl_cur trctbl_entry *
# define ggo_gtm_trctbl_end 1056
# define ggt_gtm_trctbl_end trctbl_entry *
# define ggo_gtm_trctbl_groups 1064
# define ggt_gtm_trctbl_groups unsigned int
# define ggo_gtm_trctbl_start 1072
# define ggt_gtm_trctbl_start trctbl_entry *
# define ggo_gtm_waitstuck_script 1080
# define ggt_gtm_waitstuck_script mstr
# define ggo_gtmprompt 1096
# define ggt_gtmprompt mstr
# define ggo_in_zwrite 1112
# define ggt_in_zwrite boolean_t
# define ggo_lab_proxy 1120
# define ggt_lab_proxy lab_tabent_proxy
# define ggo_mprof_alloc_reclaim 1136
# define ggt_mprof_alloc_reclaim boolean_t
# define ggo_mprof_chunk_avail_size 1140
# define ggt_mprof_chunk_avail_size int
# define ggo_mprof_env_gbl_name 1144
# define ggt_mprof_env_gbl_name mval
# define ggo_mprof_ptr 1176
# define ggt_mprof_ptr mprof_wrapper *
# define ggo_mprof_reclaim_addr 1184
# define ggt_mprof_reclaim_addr char *
# define ggo_mprof_reclaim_cnt 1192
# define ggt_mprof_reclaim_cnt int
# define ggo_mprof_stack_curr_frame 1200
# define ggt_mprof_stack_curr_frame mprof_stack_frame *
# define ggo_mprof_stack_next_frame 1208
# define ggt_mprof_stack_next_frame mprof_stack_frame *
# define ggo_open_shlib_root 1216
# define ggt_open_shlib_root open_shlib *
# define ggo_parm_pool_ptr 1224
# define ggt_parm_pool_ptr parm_pool *
# define ggo_parms_cnt 1232
# define ggt_parms_cnt unsigned int
# define ggo_pipefifo_interrupt 1236
# define ggt_pipefifo_interrupt int
# define ggo_prof_fp 1240
# define ggt_prof_fp mprof_stack_frame *
# define ggo_trans_code_pop 1248
# define ggt_trans_code_pop mval *
# define ggo_view_ydirt_str 1256
# define ggt_view_ydirt_str char *
# define ggo_view_ydirt_str_len 1264
# define ggt_view_ydirt_str_len int4
# define ggo_zdate_form 1268
# define ggt_zdate_form int4
# define ggo_zintcmd_active 1272
# define ggt_zintcmd_active zintcmd_active_info
# define ggl_zintcmd_active 72
# define ggo_zro_root 1344
# define ggt_zro_root zro_ent *
# define ggo_zsearch_var 1352
# define ggt_zsearch_var lv_val *
# define ggo_zsearch_dir1 1360
# define ggt_zsearch_dir1 lv_val *
# define ggo_zsearch_dir2 1368
# define ggt_zsearch_dir2 lv_val *
# define ggo_fnpca 1376
# define ggt_fnpca fnpc_area
# define ggo_for_stack 19792
# define ggt_for_stack oprtype *
# define ggl_for_stack 256
# define ggo_for_temps 20048
# define ggt_for_temps boolean_t
# define ggl_for_temps 128
# define ggo_last_fnquery_return_sub 20176
# define ggt_last_fnquery_return_sub mval
# define ggl_last_fnquery_return_sub 1024
# define ggo_lcl_coll_xform_buff 21200
# define ggt_lcl_coll_xform_buff char *
# define ggo_parm_ary 21208
# define ggt_parm_ary char *
# define ggl_parm_ary 40
# define ggo_parm_ary_len 21248
# define ggt_parm_ary_len int
# define ggl_parm_ary_len 20
# define ggo_parm_str_len 21268
# define ggt_parm_str_len int
# define ggl_parm_str_len 20
# define ggo_prombuf 21288
# define ggt_prombuf char
# define ggl_prombuf 32
# define ggo_rt_name_tbl 21320
# define ggt_rt_name_tbl hash_table_mname
# define ggo_tp_restart_failhist_arry 21392
# define ggt_tp_restart_failhist_arry char
# define ggl_tp_restart_failhist_arry 32
# define ggo_director_string 21424
# define ggt_director_string char
# define ggl_director_string 32
# define ggo_window_string 21456
# define ggt_window_string char
# define ggl_window_string 32
# define ggo_callin_hashtab 21488
# define ggt_callin_hashtab hash_table_str *
# define ggo_ci_table 21496
# define ggt_ci_table callin_entry_list *
# define ggo_extcall_package_root 21504
# define ggt_extcall_package_root struct extcall_package_list *
# define ggo_gtmci_nested_level 21512
# define ggt_gtmci_nested_level unsigned int
# define ggo_want_empty_gvts 21516
# define ggt_want_empty_gvts boolean_t
# define size_gtm_threadgbl_struct 21520
#endif
#endif

26
gtmconfig.h.in Normal file
View File

@ -0,0 +1,26 @@
/****************************************************************
* *
* Copyright 2001, 2010 Fidelity Information Services, Inc *
* *
* This source code contains the intellectual property *
* of its copyright holder(s), and is made available *
* under a license. If you do not know the terms of *
* the license, please stop and do not read further. *
* *
****************************************************************/
#ifndef __GTM_CONFIG__
#define __GTM_CONFIG__
#ifndef __USE_GNU
#define __USE_GNU
#endif
#ifndef _GNU_SOURCE
#define _GNU_SOURCE
#endif
#cmakedefine USE_GCRYPT
#cmakedefine USE_OPENSSL
#endif

1
pro/CMakeLists.txt Normal file
View File

@ -0,0 +1 @@
add_subdirectory(obj)

45
pro/obj/CMakeLists.txt Normal file
View File

@ -0,0 +1,45 @@
if(ARCHITECTURE_IS_32_BITS)
include_directories(
${fis-gtm_SOURCE_DIR}/sr_i386
${fis-gtm_SOURCE_DIR}/sr_unix_nsb
${fis-gtm_BINARY_DIR}/pro/obj
)
endif()
if(ARCHITECTURE_IS_64_BITS)
include_directories(
${fis-gtm_SOURCE_DIR}/sr_x86_64
${fis-gtm_BINARY_DIR}/pro/obj
)
endif()
include_directories(
${fis-gtm_SOURCE_DIR}/sr_x86_regs
${fis-gtm_SOURCE_DIR}/sr_port
${fis-gtm_SOURCE_DIR}/sr_unix
${fis-gtm_SOURCE_DIR}/sr_unix_cm
${fis-gtm_SOURCE_DIR}/sr_linux
)
set(GTM_MUMPS_PRO_SRC_C
ttt.c
)
add_library(mumpspro ${LIBRARY_TYPE}
${GTM_MUMPS_PRO_SRC_C}
)
set(SRC_C
cmerrors_ctl.c
cmierrors_ctl.c
gdeerrors_ctl.c
merrors_ctl.c
omi_sx_play.c
ttt.c
)
add_library(fisgtmproobj ${LIBRARY_TYPE}
${SRC_C}
)

142
sr_i386/CMakeLists.txt Normal file
View File

@ -0,0 +1,142 @@
if(ARCHITECTURE_IS_32_BITS)
include_directories(
${fis-gtm_SOURCE_DIR}/sr_i386
${fis-gtm_SOURCE_DIR}/sr_unix_nsb
${fis-gtm_BINARY_DIR}/pro/obj
)
endif()
if(ARCHITECTURE_IS_64_BITS)
include_directories(
${fis-gtm_SOURCE_DIR}/sr_x86_64
${fis-gtm_BINARY_DIR}/pro/obj
)
endif()
include_directories(
${fis-gtm_SOURCE_DIR}/sr_x86_regs
${fis-gtm_SOURCE_DIR}/sr_port
${fis-gtm_SOURCE_DIR}/sr_unix
${fis-gtm_SOURCE_DIR}/sr_linux
)
set(SRC_C
auto_zlink.c
find_line_call.c
obj_file.c
)
if(ARCHITECTURE_IS_64_BITS)
set(SRC_C ${SRC_C}
emit_code.c
incr_link.c
make_cimode.c
make_dmode.c
)
endif()
set(SRC_S
aswp.s
call_dm.s
caller_id.s
callg.s
ci_restart.s
compswap.s
dm_start.s
follow.s
mint2mval.s
mum_tstart.s
mval2bool.s
mval2mint.s
mval2num.s
op_bkpt.s
op_call.s
op_callsp.s
op_contain.s
op_currtn.s
op_equnul.s
op_equ.s
op_exfun.s
op_extcall.s
op_extexfun.s
op_extjmp.s
op_fetchintrrpt.s
op_fnget.s
op_fnzextract.s
op_follow.s
op_forcenum.s
op_forchk1.s
op_forinit.s
op_forintrrpt.s
op_forlcldo.s
op_forloop.s
op_gettruth.s
op_iretmvad.s
# op_isformal.s not in version 5.5
op_linefetch.s
op_linestart.s
op_mprofcall.s
op_mprofcallsp.s
op_mprofexfun.s
op_mprofextcall.s
op_mprofextexfun.s
op_mprofforchk1.s
op_mprofforlcldo.s
op_mproflinefetch.s
op_mproflinestart.s
op_neg.s
op_numcmp.s
op_pattern.s
opp_break.s
opp_commarg.s
opp_dmode.s
opp_hardret.s
opp_inddevparms.s
opp_indfnname.s
opp_indfun.s
opp_indget.s
opp_indglvn.s
opp_indincr.s
opp_indlvadr.s
opp_indlvarg.s
opp_indlvnamadr.s
opp_indmerge.s
opp_indo2.s
opp_indpat.s
opp_indrzshow.s
opp_indset.s
opp_indtext.s
opp_iretmval.s
opp_newintrinsic.s
opp_newvar.s
opp_ret.s
opp_rterror.s
opp_svput.s
opp_tcommit.s
opp_trestart.s
opp_trollback.s
opp_tstart.s
opp_xnew.s
opp_zcont.s
opp_zg1.s
opp_zgoto.s
op_restartpc.s
op_retarg.s
op_sorts_after.s
op_startintrrpt.s
op_sto.s
op_zhelp.s
pseudo_ret.s
# zl_lab_err.s not in version 5.5
)
add_library(fisgtmi386 ${LIBRARY_TYPE}
${SRC_C}
${SRC_S}
)

View File

@ -1,47 +0,0 @@
#################################################################
# #
# Copyright 2001, 2002 Sanchez Computer Associates, Inc. #
# #
# This source code contains the intellectual property #
# of its copyright holder(s), and is made available #
# under a license. If you do not know the terms of #
# the license, please stop and do not read further. #
# #
#################################################################
# PAGE ,132
.title op_isformal.s
# .386
# .MODEL FLAT, C
.include "linkage.si"
.INCLUDE "g_msf.si"
.sbttl op_isformal
# PAGE +
.DATA
.extern ERR_ACTLSTEXP
.extern frame_pointer
.text
.extern rts_error
# PUBLIC op_isformal
ENTRY op_isformal
movl frame_pointer,%edx
movw msf_typ_off(%edx),%ax
andw $~SFT_EXTFUN,msf_typ_off(%edx)
andw $SFT_EXTFUN,%ax
je l1
ret
l1: putframe
pushl ERR_ACTLSTEXP
pushl $1
call rts_error
addl $8,%esp
ret
# op_isformal ENDP
# END

View File

@ -1,40 +0,0 @@
#################################################################
# #
# Copyright 2001 Sanchez Computer Associates, Inc. #
# #
# This source code contains the intellectual property #
# of its copyright holder(s), and is made available #
# under a license. If you do not know the terms of #
# the license, please stop and do not read further. #
# #
#################################################################
# PAGE ,132
.title zl_lab_err.s
# .386
# .MODEL FLAT, C
.include "linkage.si"
.INCLUDE "g_msf.si"
.sbttl zl_lab_err
# PAGE +
.DATA
.extern ERR_LABELUNKNOWN
.extern frame_pointer
.text
.extern op_rterror
# PUBLIC zl_lab_err
ENTRY zl_lab_err
pushl $0
pushl ERR_LABELUNKNOWN
call op_rterror
addl $8,%esp
getframe
ret
# zl_lab_err ENDP
# END

16
sr_linux/CMakeLists.txt Normal file
View File

@ -0,0 +1,16 @@
include_directories(
${fis-gtm_SOURCE_DIR}/sr_port
${fis-gtm_SOURCE_DIR}/sr_unix
${fis-gtm_SOURCE_DIR}/sr_linux
${fis-gtm_BINARY_DIR}/pro/obj
)
add_library(gtmlinux ${LIBRARY_TYPE}
gtm_getenv.c
gtm_system.c
)
add_library(gtmlinux2 ${LIBRARY_TYPE}
caller_id.c
inst_flush.c
)

1680
sr_port/CMakeLists.txt Normal file

File diff suppressed because it is too large Load Diff

View File

@ -1,42 +0,0 @@
/****************************************************************
* *
* Copyright 2001, 2010 Fidelity Information Services, Inc *
* *
* This source code contains the intellectual property *
* of its copyright holder(s), and is made available *
* under a license. If you do not know the terms of *
* the license, please stop and do not read further. *
* *
****************************************************************/
#include "mdef.h"
#include "compiler.h"
#include "opcode.h"
int intexpr(oprtype *a)
{
triple *triptr;
int4 rval;
DCL_THREADGBL_ACCESS;
SETUP_THREADGBL_ACCESS;
if (!(TREF(expr_depth))++)
TREF(expr_start) = TREF(expr_start_orig) = NULL;
if (!(rval = eval_expr(a)))
{
TREF(expr_depth) = 0;
return FALSE;
}
coerce(a,OCT_MINT);
ex_tail(a);
if (!(--(TREF(expr_depth))))
TREF(shift_side_effects) = FALSE;
if (TREF(expr_start) != TREF(expr_start_orig))
{
triptr = newtriple(OC_GVRECTARG);
triptr->operand[0] = put_tref(TREF(expr_start));
}
return rval;
}

View File

@ -1,57 +0,0 @@
/****************************************************************
* *
* Copyright 2007, 2009 Fidelity Information Services, Inc *
* *
* This source code contains the intellectual property *
* of its copyright holder(s), and is made available *
* under a license. If you do not know the terms of *
* the license, please stop and do not read further. *
* *
****************************************************************/
#include "mdef.h"
#include "gt_timer.h"
#include "io.h"
#include "iotimer.h"
#include "iotcpdef.h"
#include "iosocketdef.h"
#include "rtnhdr.h"
#include "mv_stent.h"
#include "stack_frame.h"
GBLREF mv_stent *mv_chain;
GBLREF stack_frame *frame_pointer;
GBLREF unsigned char *stackbase, *stacktop, *msp, *stackwarn;
/* Find and optionally clear the mv_stent keeping interrupted device information for us */
mv_stent *io_find_mvstent(io_desc *io_ptr, boolean_t clear_mvstent)
{
mv_stent *mvc, *mv_zintdev;
assert(msp <= stackbase && msp > stacktop);
assert(mv_chain <= (mv_stent *)stackbase && mv_chain > (mv_stent *)stacktop);
assert(frame_pointer <= (stack_frame *)stackbase && frame_pointer > (stack_frame *)stacktop);
mv_zintdev = NULL;
for (mvc = mv_chain; mvc < (mv_stent *)frame_pointer ; mvc = (mv_stent *)(mvc->mv_st_next + (char *)mvc))
{
if (MVST_ZINTDEV == mvc->mv_st_type && io_ptr == mvc->mv_st_cont.mvs_zintdev.io_ptr)
{
mv_zintdev = mvc;
break;
}
if (!mvc->mv_st_next)
GTMASSERT;
}
if (mv_zintdev && clear_mvstent)
{
if (mv_chain == mv_zintdev)
POP_MV_STENT(); /* just pop if top of stack */
else
{
mv_zintdev->mv_st_cont.mvs_zintdev.io_ptr = NULL;
mv_zintdev->mv_st_cont.mvs_zintdev.buffer_valid = FALSE;
}
}
return mv_zintdev;
}

View File

@ -1,38 +0,0 @@
/****************************************************************
* *
* Copyright 2001, 2009 Fidelity Information Services, Inc *
* *
* This source code contains the intellectual property *
* of its copyright holder(s), and is made available *
* under a license. If you do not know the terms of *
* the license, please stop and do not read further. *
* *
****************************************************************/
#include "mdef.h"
#include "gdsroot.h"
#include "gdsblk.h"
#include "gtm_facility.h"
#include "fileinfo.h"
#include "gdsbt.h"
#include "gdsfhead.h"
#include "filestruct.h"
#include "jnl.h"
GBLREF unsigned char jnl_ver;
void jnl_setver(void)
{
char *jnl_label = JNL_LABEL_TEXT;
unsigned char jnl_ver_lower, jnl_ver_higher;
jnl_ver_lower = jnl_label[SIZEOF(JNL_LABEL_TEXT) - 2] - '0';
assert('\012' > jnl_ver_lower); /* assert(10 > jnl_ver_lower); */
jnl_ver_higher = jnl_label[SIZEOF(JNL_LABEL_TEXT) - 3] - '0';
assert('\012' > jnl_ver_higher); /* assert(10 > jnl_ver_higher); */
jnl_ver = jnl_ver_higher * 10 + jnl_ver_lower;
assert(JNL_VER_THIS == jnl_ver);
assert(JNL_VER_EARLIEST_REPL <= jnl_ver);
return;
}

View File

@ -1,42 +0,0 @@
/****************************************************************
* *
* Copyright 2001, 2010 Fidelity Information Services, Inc *
* *
* This source code contains the intellectual property *
* of its copyright holder(s), and is made available *
* under a license. If you do not know the terms of *
* the license, please stop and do not read further. *
* *
****************************************************************/
#include "mdef.h"
#include "compiler.h"
#include "opcode.h"
int numexpr(oprtype *a)
{
triple *triptr;
int4 rval;
DCL_THREADGBL_ACCESS;
SETUP_THREADGBL_ACCESS;
if (!(TREF(expr_depth))++)
TREF(expr_start) = TREF(expr_start_orig) = NULL;
if (!(rval = eval_expr(a)))
{
TREF(expr_depth) = 0;
return FALSE;
}
coerce(a,OCT_MVAL);
ex_tail(a);
if (!(--(TREF(expr_depth))))
TREF(shift_side_effects) = FALSE;
if (TREF(expr_start) != TREF(expr_start_orig))
{
triptr = newtriple(OC_GVRECTARG);
triptr->operand[0] = put_tref(TREF(expr_start));
}
return rval;
}

View File

@ -1,89 +0,0 @@
/****************************************************************
* *
* Copyright 2001, 2011 Fidelity Information Services, Inc *
* *
* This source code contains the intellectual property *
* of its copyright holder(s), and is made available *
* under a license. If you do not know the terms of *
* the license, please stop and do not read further. *
* *
****************************************************************/
#include "mdef.h"
#include <stdarg.h>
#include "gtm_stdio.h"
#include "lv_val.h"
#include "rtnhdr.h"
#include "mv_stent.h"
#include "compiler.h"
#include "gdsroot.h"
#include "gtm_facility.h"
#include "fileinfo.h"
#include "gdsbt.h"
#include "gdsfhead.h"
#include "alias.h"
GBLREF mv_stent *mv_chain;
GBLREF unsigned char *msp, *stackbase, *stackwarn, *stacktop;
GBLREF symval *curr_symval;
/* Create lv_val on stack to hold copy of parameter. Address of created lv_val will be used by op_bindparm() */
void push_parm(UNIX_ONLY_COMMA(unsigned int totalcnt) int truth_value, ...)
{
va_list var;
mval *ret_value;
int mask;
VMS_ONLY(unsigned totalcnt;)
unsigned actualcnt;
parm_blk *parm;
mv_stent *mvp_blk;
int i;
lv_val *actp;
mval *actpmv;
error_def (ERR_STACKOFLOW);
error_def (ERR_STACKCRIT);
VAR_START(var, truth_value);
VMS_ONLY(va_count(totalcnt));
assert(4 <= totalcnt);
ret_value = va_arg(var, mval *);
mask = va_arg(var, int);
actualcnt = va_arg(var, unsigned int);
assert(4 + actualcnt == totalcnt);
assert(MAX_ACTUALS >= actualcnt);
PUSH_MV_STENT(MVST_PARM);
parm = (parm_blk *)malloc(SIZEOF(parm_blk) - SIZEOF(lv_val *) + actualcnt * SIZEOF(lv_val *));
parm->actualcnt = actualcnt;
parm->mask = mask;
mvp_blk = mv_chain;
mvp_blk->mv_st_cont.mvs_parm.save_truth = truth_value;
mvp_blk->mv_st_cont.mvs_parm.ret_value = (mval *)NULL;
mvp_blk->mv_st_cont.mvs_parm.mvs_parmlist = parm;
for (i = 0; i < actualcnt; i++)
{
actp = va_arg(var, lv_val *);
if (!(mask & 1 << i))
{ /* Not a dotted pass-by-reference parm */
actpmv = &actp->v;
if ((!MV_DEFINED(actpmv)) && (actpmv->str.addr != (char *)&actp->v))
actpmv = underr(actpmv);
PUSH_MV_STENT(MVST_PVAL);
mv_chain->mv_st_cont.mvs_pval.mvs_val = lv_getslot(curr_symval);
LVVAL_INIT(mv_chain->mv_st_cont.mvs_pval.mvs_val, curr_symval);
mv_chain->mv_st_cont.mvs_pval.mvs_val->v = *actpmv; /* Copy mval input */
mv_chain->mv_st_cont.mvs_pval.mvs_ptab.save_value = NULL; /* Filled in by op_bindparm */
mv_chain->mv_st_cont.mvs_pval.mvs_ptab.hte_addr = NULL;
DEBUG_ONLY(mv_chain->mv_st_cont.mvs_pval.mvs_ptab.nam_addr = NULL);
parm->actuallist[i] = (lv_val *)&mv_chain->mv_st_cont.mvs_pval;
} else
/* Dotted pass-by-reference parm. No save of previous value, just pass lvval */
parm->actuallist[i] = actp;
}
va_end(var);
mvp_blk->mv_st_cont.mvs_parm.ret_value = ret_value;
return;
}

View File

@ -1,42 +0,0 @@
/****************************************************************
* *
* Copyright 2001, 2010 Fidelity Information Services, Inc *
* *
* This source code contains the intellectual property *
* of its copyright holder(s), and is made available *
* under a license. If you do not know the terms of *
* the license, please stop and do not read further. *
* *
****************************************************************/
#include "mdef.h"
#include "compiler.h"
#include "opcode.h"
int strexpr(oprtype *a)
{
triple *triptr;
int4 rval;
DCL_THREADGBL_ACCESS;
SETUP_THREADGBL_ACCESS;
if (!(TREF(expr_depth))++)
TREF(expr_start) = TREF(expr_start_orig) = NULL;
if (!(rval = eval_expr(a)))
{
TREF(expr_depth) = 0;
return FALSE;
}
coerce(a,OCT_MVAL);
ex_tail(a);
if (!(--(TREF(expr_depth))))
TREF(shift_side_effects) = FALSE;
if (TREF(expr_start) != TREF(expr_start_orig))
{
triptr = newtriple(OC_GVRECTARG);
triptr->operand[0] = put_tref(TREF(expr_start));
}
return rval;
}

150
sr_port_cm/CMakeLists.txt Normal file
View File

@ -0,0 +1,150 @@
if(ARCHITECTURE_IS_32_BITS)
include_directories(
${fis-gtm_SOURCE_DIR}/sr_i386
${fis-gtm_SOURCE_DIR}/sr_unix_nsb
${fis-gtm_BINARY_DIR}/pro/obj
)
endif()
if(ARCHITECTURE_IS_64_BITS)
include_directories(
${fis-gtm_SOURCE_DIR}/sr_x86_64
${fis-gtm_BINARY_DIR}/pro/obj
)
endif()
include_directories(
${fis-gtm_SOURCE_DIR}/sr_unix
${fis-gtm_SOURCE_DIR}/pro
${fis-gtm_SOURCE_DIR}/pro/obj
${fis-gtm_SOURCE_DIR}/sr_port_cm
${fis-gtm_SOURCE_DIR}/sr_port
)
set(GTM_PORT_CM_SRC_C
gtcm_action_pending.c
gtcm_add_region.c
gtcm_bind_name.c
gtcm_exi_handler.c
gtcm_find_proc.c
gtcm_find_reghead.c
gtcm_find_region.c
gtcm_init_ast.c
gtcm_int_unpack.c
gtcm_jnl_switched.c
gtcm_link_accept.c
gtcm_neterr.c
gtcm_read_ast.c
gtcm_remove_from_action_queue.c
gtcm_shutdown_ast.c
gtcm_write_ast.c
gtcmd_cst_init.c
gtcmd_rundown.c
gtcml_blklck.c
gtcml_chklck.c
gtcml_chkprc.c
gtcml_chkreg.c
gtcml_decrlock.c
gtcml_dolock.c
gtcml_incrlock.c
gtcml_lckclr.c
gtcml_lcktime.c
gtcml_lkbckout.c
gtcml_lkcancel.c
gtcml_lkhold.c
gtcml_lklist.c
gtcml_lkrundown.c
gtcml_lkstarve.c
gtcml_lock.c
gtcml_lock_internal.c
gtcml_unlock.c
gtcml_zallocate.c
gtcml_zdeallocate.c
gtcmtr_bufflush.c
gtcmtr_data.c
gtcmtr_get.c
gtcmtr_increment.c
gtcmtr_initproc.c
gtcmtr_initreg.c
gtcmtr_kill.c
gtcmtr_lkacquire.c
gtcmtr_lkcanall.c
gtcmtr_lkcancel.c
gtcmtr_lkdelete.c
gtcmtr_lke_clearrep.c
gtcmtr_lke_showrep.c
gtcmtr_lkreqimmed.c
gtcmtr_lkreqnode.c
gtcmtr_lkrequest.c
gtcmtr_lkresume.c
gtcmtr_lksuspend.c
gtcmtr_order.c
gtcmtr_put.c
gtcmtr_query.c
gtcmtr_terminate.c
gtcmtr_terminate_free.c
gtcmtr_zprevious.c
gtcmtr_zwithdraw.c
)
add_library(gtmportcm ${LIBRARY_TYPE}
${GTM_PORT_CM_SRC_C}
)
set(GTM_GNPCLIENT_PORT_CM_SRC_C
gtcmtr_lke_clearreq.c
gtcmtr_lke_showreq.c
gvcmx_canremlk.c
gvcmx_data.c
gvcmx_get.c
gvcmx_increment.c
gvcmx_kill.c
gvcmx_order.c
gvcmx_put.c
gvcmx_query.c
gvcmx_reqremlk.c
gvcmx_resremlk.c
gvcmx_susremlk.c
gvcmx_unlock.c
gvcmx_zprevious.c
gvcmy_close.c
gvcmy_open.c
gvcmy_open_ch.c
gvcmy_remlkmgr.c
gvcmy_rundown.c
gvcmz_bunch.c
gvcmz_clrlkreq.c
gvcmz_doop.c
gvcmz_error.c
gvcmz_int_lkcancel.c
gvcmz_lkacquire_ast.c
gvcmz_lkcancel_ast.c
gvcmz_lkread_ast.c
gvcmz_lksublist.c
gvcmz_lksuspend_ast.c
gvcmz_neterr.c
gvcmz_neterr_set.c
gvcmz_netopen.c
gvcmz_sndlkremove.c
gvcmz_zdef_ast.c
gvcmz_zflush.c
lock_cmtimeout.c
)
add_library(gnpclientportcm ${LIBRARY_TYPE}
${GTM_GNPCLIENT_PORT_CM_SRC_C}
)
set(GTM_CMI_SOCKET_TCP_PORT_CM_SRC_C
gtcm_err_compat.c
gtcm_is_query_queryget.c
gtcm_protocol.c
gtcm_release_name.c
)
add_library(cmisockettcpportcm ${LIBRARY_TYPE}
${GTM_CMI_SOCKET_TCP_PORT_CM_SRC_C}
)

562
sr_unix/CMakeLists.txt Normal file
View File

@ -0,0 +1,562 @@
include_directories(
${fis-gtm_SOURCE_DIR}/sr_port_cm
${fis-gtm_SOURCE_DIR}/sr_port
${fis-gtm_SOURCE_DIR}/sr_unix
${fis-gtm_SOURCE_DIR}/sr_linux
${fis-gtm_SOURCE_DIR}/sr_x86_regs
${fis-gtm_SOURCE_DIR}/sr_x86_64
${fis-gtm_BINARY_DIR}/pro/obj
)
set(GTM_MUMPS2_SRC_C
add_inter.c
append_time_stamp.c
backup_buffer_flush.c
callintogtmxfer.c
ccp_cluster_lock_wake.c
ccp_fid_msg.c
ccp_sendmsg.c
ccp_userwait.c
ce_init.c
ce_substitute.c
cenable.c
ch_cond_core.c
ch_overrun.c
change_fhead_timer.c
ci_ret_code.c
cli.c
cli_disallow.c
cli_lex.c
cli_parse.c
continue_handler.c
continue_proc.c
crit_wake.c
ctrap_set.c
ctrlc_handler.c
ctrlc_set.c
ctrly_set.c
cvtprot.c
cvttime.c
dbfilop.c
dbinit_ch.c
dbopen_ch.c
dec_err.c
deferred_signal_handler.c
disk_block_available.c
dm_read.c
do_semop.c
do_shmat.c
do_verify.c
do_write.c
do_xform.c
dollarh.c
dpgbldir_sysops.c
dsk_read.c
dsk_write.c
dsk_write_nocache.c
dskspace_msg_timer.c
err_init.c
error_return.c
extract_signal_info.c
wcs_write_in_progress_wait.c
gtm_utf8.c
generic_signal_handler.c
set_num_additional_processors.c
gtmsecshr_sock_cleanup.c
op_fnextract.c
wcs_wtstart.c
gtm_event_log.c
iopi_iocontrol.c
list_file.c
secshr_client.c
random.c
stop_image.c
stop_image_ch.c
iorm_close.c
gtm_icu.c
op_setpiece.c
is_file_identical.c
get_command_line.c
gt_timers.c
suspsigs_handler.c
gtm_exit_handler.c
jnl_file_open.c
file_head_write.c
util_exit_handler.c
get_page_size.c
std_dev_outbndset.c
sig_init.c
util_output.c
getjobnum.c
gtm_startup_chk.c
gtm_stdio.c
gtm_putmsg.c
rts_error.c
lke_cmd_disallow.c
util_spawn.c
op_fngetjpi.c
op_fnrandom.c
m_ztrigger.c
op_zedit.c
iorm_read.c
zro_search.c
parse_file.c
getcaps.c
geteditor.c
fgn_getinfo.c
gtm_conv.c
iorm_use.c
gtm_c_stack_trace_semop.c
wcs_clean_dbsync_timer.c
wcs_clean_dbsync.c
gtmsecshr_sock_init.c
iorm_readfl.c
gtm_ftok.c
gtm_putmsg_list.c
get_full_path.c
gtm_tputs.c
iorm_get.c
setterm.c
gtm_fd_trace.c
repl_instance.c
repl_sem.c
suspend.c
zcall_package.c
gtm_permissions.c
gtmci_isv.c
gtm_getpwuid.c
gtm_isanlp.c
ipcrmid.c
mutex.c
# mutex_deadlock_check.c in sr_port
mutex_sock_init.c
mutex_wake_proc.c
term_setup.c
mmrhash.c
outc.c
op_zmess.c
op_fngetdvi.c
op_fnzlkid.c
op_fngetlki.c
op_zlink.c
op_fnfgncal.c
op_fngetsyi.c
op_fnp1.c
op_fnpiece.c
op_fnpopulation.c
op_fnzcall.c
op_fnzconvert.c
op_fnzfile.c
op_fnzparse.c
op_fnzpid.c
op_fnzpriv.c
op_fnzsearch.c
op_fnzsetprv.c
op_fnztrnlnm.c
op_fgnlookup.c
op_horolog.c
op_job.c
op_setextract.c
op_setp1.c
op_zattach.c
op_zhelp_xfr.c
op_ztrigger.c
source_file.c
getzprocess.c
trigger_source_read_andor_verify.c
ss_context_mgr.c
mumps_clitab.c
sgtm_putmsg.c
io_init_name.c
io_is_rm.c
io_is_sn.c
io_is_tt.c
gtm_getmsg.c
util_output_cm.c
jobexam_signal_handler.c
exttab_parse.c
zshow_zcalls.c
jnl_output_sp.c
gv_trigger.c
trigger_fill_xecute_buffer.c
gtm_fork_n_core.c
gtm_trigger.c
rc_cpt_ops.c
jnlpool_init.c
trigger_trgfile.c
trigger_gbl_fill_xecute_buffer.c
trigger_cmd.c
trigger_compare.c
trigger_delete.c
trigger_incr_cycle.c
trigger_parse.c
trigger_read_name_entry.c
trigger_scan_string.c
trigger_select.c
trigger_tpwrap_ch.c
trigger_update.c
trigger_user_name.c
wcs_get_space.c
ss_shdw_mgr.c
gtm_env_init_sp.c
jnl_file_extend.c
file_input.c
set_jnl_file_close.c
gtm_dump_core.c
gtm_env_translate.c
gtm_dbjnl_dupfd_check.c
rel_crit.c
rel_quant.c
rel_lock.c
gvusr.c
gtm_rename.c
gtm_zlib.c
gdsfilext_nojnl.c
f_char.c
f_piece.c
grab_crit.c
grab_lock.c
gtm_bintim.c
gtm_compile.c
gtm_dump.c
gtm_file_remove.c
gtm_file_stat.c
gtm_init_env.c
gtm_pipe.c
gtm_semutils.c
gtm_startup.c
gtm_text_alloc.c
gtm_unique_file_util.c
gtm_utf8_stx.c
gtm_wake.c
iob_close.c
iob_flush.c
iob_open_rd.c
iob_open_wt.c
iob_read.c
iob_write.c
iomt_ch.c
iomt_closesp.c
iomt_info.c
iomt_open.c
iomt_opensp.c
iomt_qio.c
iomt_rdlblk.c
iomt_reopen.c
iomt_sense.c
iomt_tm.c
iomt_wtlblk.c
iott_edit.c
iott_use.c
iott_readfl.c
iott_close.c
iott_flush.c
iott_open.c
iott_rdone.c
iott_read.c
iott_write.c
iorm_flush.c
iorm_open.c
iorm_rdone.c
iorm_write.c
iorm_wteol.c
ss_lock_facility.c
ss_release.c
ss_write_block.c
urx_remove.c
remove_rms.c
gtm_tparm.c
same_device_check.c
set_zstatus.c
is_proc_alive.c
is_raw_dev.c
getstorage.c
pipeint_stats.c
zshow_devices.c
recover_truncate.c
get_src_line.c
trans_log_name.c
jobchild_init.c
mubexpfilnam.c
ojchildioset.c
zl_cmd_qlf.c
heartbeat_timer.c
getmaxfds.c
io_open_try.c
ojchildparms.c
gtmcrypt_entry.c
clear_cache_array.c
ious_iocontrol.c
send_msg.c
file_head_read.c
reg_cmcheck.c
ious_write.c
ojstartchild.c
gdsfilext.c
jnl_prc_vector.c
ojchildioclean.c
mubfilcpy.c
t_recycled2free.c
make_dmode.c
ious_open.c
ious_rdone.c
ious_read.c
ious_readfl.c
ious_wtone.c
util_input.c
zro_load.c
str_match.c
ojparams.c
lref_parse.c
io_get_fgn_driver.c
mup_bak_sys.c
iopi_open.c
zro_gettok.c
goq_load.c
genpat.c
ojchkfs.c
getzmode.c
sleep.c
zro_shlibs.c
fix_pages.c
make_mode.c
mem_access.c
make_cimode.c
map_sym.c
wcs_flu.c
gds_rundown.c
ioff_open.c
gvcst_init_sysops.c
golevel.c
exttime.c
jnl_fsync.c
tp_grab_crit.c
resetterm.c
)
if(ARCHITECTURE_IS_64_BITS)
set(GTM_MUMPS2_SRC_C
${GTM_MUMPS2_SRC_C}
auto_zlink.c
callg.c
comp_lits.c
incr_link.c
gtm_unlink_all.c
gtmci.c
gtmci_ch.c
gtmci_signals.c
# gtmsecshr.c contains a main, make it executable
gtmsecshr_wrapper.c
init_gtm.c
io_type.c
iomt_ch.c
iomt_closesp.c
iomt_info.c
iomt_open.c
iomt_opensp.c
iomt_qio.c
iomt_rdlblk.c
iomt_reopen.c
iomt_sense.c
iomt_tm.c
iomt_wtlblk.c
# mupip.c it has a main -> executable
mupip_cmd.c
mupip_crypt.c
mu_decrypt.c
obj_code.c
obj_file.c
ojgetch_env.c
probe.c
# semstat2.c contains a main, make it an executable
util_in_open.c
zlmov_lnames.c
)
endif()
if(ARCHITECTURE_IS_32_BITS)
set(GTM_MUMPS2_SRC_C
${GTM_MUMPS2_SRC_C}
daemon_ch.c
daemon_crit.c
# sr_unix_nsb/comp_lits.c
mutex_sock_cleanup.c
)
endif()
if(NEED_TO_ADD_SOURCES)
set(GTM_MUMPS2_SRC_C
${GTM_MUMPS2_SRC_C}
)
endif(NEED_TO_ADD_SOURCES)
set(GTM_LKE_UNIX_SRC_C
lke_fileio.c
lke_getansw.c
lke_help.c
lke_setgdr.c
)
set(GTM_MUPIP_SRC_C
bin_load.c
db_ipcs_reset.c
go_load.c
gds_file_size.c
gtmrecv.c
gtmrecv_end.c
gtmrecv_fetchresync.c
gtmrecv_poll_actions.c
gtmrecv_process.c
gtmrecv_shutdown.c
gtmsource.c
gtmsource_changelog.c
gtmsource_checkhealth.c
gtmsource_end.c
gtmsource_flush_fh.c
gtmsource_get_opt.c
gtmsource_heartbeat.c
gtmsource_jnl_release_timer.c
gtmsource_jnlpool.c
gtmsource_losttncomplete.c
gtmsource_mode_change.c
gtmsource_needrestart.c
gtmsource_onln_rlbk_clnup.c
gtmsource_process.c
gtmsource_process_ops.c
gtmsource_readfiles.c
gtmsource_readpool.c
gtmsource_rootprimary_init.c
gtmsource_seqno_init.c
gtmsource_showbacklog.c
gtmsource_shutdown.c
gtmsource_srv_latch.c
gtmsource_statslog.c
gtmsource_stopfilter.c
jnlext_write.c
mu_all_version_standalone.c
mu_cre_file.c
mu_cre_structs.c
mu_extract.c
mu_getlst.c
mu_gvis.c
mu_int_ch.c
mu_op_open.c
mu_outofband_setup.c
mu_replpool_grab_sem.c
mu_replpool_remove_sem.c
mu_rndwn_all.c
mu_rndwn_file.c
mu_rndwn_repl_instance.c
mu_rndwn_replpool.c
mu_signal_process.c
mu_term_setup.c
mu_trig_trgfile.c
mu_truncate.c
mubgetfil.c
mubinccpy.c
mucblkini.c
mupip_cmd_disallow.c
mupip_ctrl.c
mupip_cvtgbl.c
mupip_cvtpgm.c
mupip_endiancvt.c
mupip_exit.c
mupip_exit_handler.c
mupip_ftok.c
mupip_help.c
mupip_quit.c
mupip_restore.c
mupip_rundown.c
mupip_set_file.c
mupip_set_jnlfile.c
mupip_trigger.c
mupip_upgrade_standalone.c
mur_cre_file_extfmt.c
mur_read_file_sp.c
murgetlst.c
recvpool_init.c
repl_inst_create.c
repl_inst_dump.c
repl_inst_edit.c
repl_ipc_cleanup.c
repl_log.c
repl_log_init.c
ss_anal_shdw_file.c
ss_get_block.c
ss_initiate.c
ss_read_block.c
upd_log_init.c
)
set(GTM_DSE_UNIX_SRC_C
dse_cmd.c
dse_cmd_disallow.c
dse_ctrlc_handler.c
dse_help.c
dse_open.c
dse_puttime.c
dse_remove.c
)
set(GTM_STUB_UNIX_SRC_C
gtcmstub.c
cmistub.c
gtcmtrstub.c
gvcmx_canremlk_stub.c
gvcmx_reqremlk_stub.c
gvcmx_resremlk_stub.c
gvcmx_susremlk_stub.c
gvcmz_bunch_stub.c
gvcmz_error_stub.c
gvcmz_neterr_stub.c
gvcmz_zflush_stub.c
)
set(GTM_FTOK_SRC_C
ftok_sems.c
)
add_library(ftokunix ${LIBRARY_TYPE}
${GTM_FTOK_SRC_C}
)
add_library(lkeunix ${LIBRARY_TYPE}
${GTM_LKE_UNIX_SRC_C}
)
add_library(mupipunix ${LIBRARY_TYPE}
${GTM_MUPIP_SRC_C}
)
add_library(mumpsunix ${LIBRARY_TYPE}
${GTM_MUMPS2_SRC_C}
)
target_link_libraries(mumpsunix
ftokunix
)
add_library(dseunix ${LIBRARY_TYPE}
${GTM_DSE_UNIX_SRC_C}
)
add_library(stubunix ${LIBRARY_TYPE}
${GTM_STUB_UNIX_SRC_C}
)
#
# Complimentary pieces are in sr_port
#
add_library(dbcertifyunix ${LIBRARY_TYPE}
dbcertify_cmd.c
dbcertify_dbfilop.c
dbcertify_deferred_signal_handler.c
dbcertify_parse_and_dispatch.c
dbcertify_signal_handler.c
)

View File

@ -11,6 +11,16 @@
/* For the various Unix/Posix flavors, extract and fill in the appropriate information */
/*
See issue :
See also :
http://stackoverflow.com/questions/5679267/how-to-resolve-reg-eip-undeclared-first-use-in-this-function-error-on-linux-3
*/
#define _GNU_SOURCE
#include "mdef.h"
#include "gtm_string.h"
@ -31,6 +41,7 @@
#include <signal.h>
#include "gtmconfig.h"
#include "gtmsiginfo.h"
/* OS/390 (R7) does not define SI_USER but for code expansions purposes, define the value it uses
@ -117,6 +128,9 @@ void extract_signal_info(int sig, siginfo_t *info, gtm_sigcontext_t *context, gt
gtmsi->int_iadr = (caddr_t)context->uc_mcontext.sc_ip;
# elif defined(__i386)
# ifndef REG_EIP
# ifndef EIP
# error "EIP not defined"
# endif
# define REG_EIP EIP
# endif
gtmsi->int_iadr = (caddr_t)context->uc_mcontext.gregs[REG_EIP];

View File

@ -13,7 +13,7 @@
#define GTMCRYPT_H
#include <signal.h>
#include "rtnhdr.h"
#include <rtnhdr.h>
#include "stack_frame.h"
#include "gtmxc_types.h"
#include "gtmcrypt_interface.h"

View File

@ -11,6 +11,8 @@
#ifndef GTMCRYPT_REF_H
#define GTMCRYPT_REF_H
# include <gtmconfig.h>
#ifdef USE_OPENSSL
# include <openssl/blowfish.h>
# include <openssl/sha.h>

View File

@ -9,6 +9,7 @@
* *
****************************************************************/
#include "gtmconfig.h"
#include "mdef.h"
#include "gtm_statvfs.h"

View File

@ -1,32 +0,0 @@
#!/bin/csh
#################################################################
# #
# Copyright 2001 Sanchez Computer Associates, Inc. #
# #
# This source code contains the intellectual property #
# of its copyright holder(s), and is made available #
# under a license. If you do not know the terms of #
# the license, please stop and do not read further. #
# #
#################################################################
set lowerc_ext = ".m"
foreach lowerc_i ($*)
set lowerc_base = `basename $lowerc_i $lowerc_ext`
if ( "lowerc_i" != "$lowerc_base" ) then
# If they _don't_ match, then basename found $lowerc_ext and stripped it off.
set lowerc_newbase = `echo $lowerc_base | tr '[A-Z]' '[a-z]'`
if ( "$lowerc_base" != "$lowerc_newbase" ) then
# If _not_ overwriting an existing file.
set lowerc_dirname = `dirname $lowerc_i`
echo "mv $lowerc_dirname/$lowerc_i ---> $lowerc_dirname/$lowerc_newbase$lowerc_ext"
mv $lowerc_dirname/$lowerc_i $lowerc_dirname/$lowerc_newbase$lowerc_ext
endif
endif
end
unset lowerc_base
unset lowerc_dirname
unset lowerc_ext
unset lowerc_i
unset lowerc_newbase

View File

@ -1,29 +0,0 @@
#################################################################
# #
# Copyright 2001 Sanchez Computer Associates, Inc. #
# #
# This source code contains the intellectual property #
# of its copyright holder(s), and is made available #
# under a license. If you do not know the terms of #
# the license, please stop and do not read further. #
# #
#################################################################
SHELL=/bin/sh
export SHELL
ext=.m
for i in $*
do
base=`basename $i $ext`
if test $i != $base
then {
newf=`echo $base | tr '[A-Z]' '[a-z]'`
if test $base != $newf
then {
dir=`dirname $i`
echo $dir/$i "---> " $dir/$newf$ext
mv $i $dir/$newf$ext
}
fi
}
fi
done

View File

@ -1,32 +0,0 @@
#!/bin/csh
#################################################################
# #
# Copyright 2001 Sanchez Computer Associates, Inc. #
# #
# This source code contains the intellectual property #
# of its copyright holder(s), and is made available #
# under a license. If you do not know the terms of #
# the license, please stop and do not read further. #
# #
#################################################################
set lowerc_cp_ext = ".m"
foreach lowerc_cp_i ($*)
set lowerc_cp_base = `basename $lowerc_cp_i $lowerc_cp_ext`
if ( "lowerc_cp_i" != "$lowerc_cp_base" ) then
# If they _don't_ match, then basename found $lowerc_cp_ext and stripped it off.
set lowerc_cp_newbase = `echo $lowerc_cp_base | tr '[A-Z]' '[a-z]'`
if ( "$lowerc_cp_base" != "$lowerc_cp_newbase" ) then
# If _not_ overwriting an existing file.
set lowerc_cp_dirname = `dirname $lowerc_cp_i`
echo "cp $lowerc_cp_dirname/$lowerc_cp_i ---> $lowerc_cp_dirname/$lowerc_cp_newbase$lowerc_cp_ext"
cp $lowerc_cp_dirname/$lowerc_cp_i $lowerc_cp_dirname/$lowerc_cp_newbase$lowerc_cp_ext
endif
endif
end
unset lowerc_cp_base
unset lowerc_cp_dirname
unset lowerc_cp_ext
unset lowerc_cp_i
unset lowerc_cp_newbase

View File

@ -1,43 +0,0 @@
/****************************************************************
* *
* Copyright 2001, 2007 Fidelity Information Services, Inc *
* *
* This source code contains the intellectual property *
* of its copyright holder(s), and is made available *
* under a license. If you do not know the terms of *
* the license, please stop and do not read further. *
* *
****************************************************************/
#include "mdef.h"
#include "gtm_string.h"
#include "gtm_fcntl.h"
#include "gtm_unistd.h"
#include <errno.h>
#include "gdsroot.h"
#include "gtm_facility.h"
#include "fileinfo.h"
#include "gdsbt.h"
#include "gdsfhead.h"
#include "filestruct.h"
#include "gtm_stat.h"
#include "eintr_wrappers.h"
#include "mu_file_size.h"
unsigned int mu_file_size(file_control *fc)
{
unix_db_info *udi;
int fstat_res;
struct stat stat_buf;
error_def(ERR_DBFILOPERR);
udi = (unix_db_info *)fc->file_info;
FSTAT_FILE(udi->fd, &stat_buf, fstat_res);
if (-1 == fstat_res)
rts_error(VARLSTCNT(5) ERR_DBFILOPERR, 2, LEN_AND_STR(udi->fn), errno);
assert(0 == stat_buf.st_size % DISK_BLOCK_SIZE);
return (unsigned int)(stat_buf.st_size / DISK_BLOCK_SIZE);
}

View File

@ -1,29 +0,0 @@
#!/bin/sh
#################################################################
# #
# Copyright 2001 Sanchez Computer Associates, Inc. #
# #
# This source code contains the intellectual property #
# of its copyright holder(s), and is made available #
# under a license. If you do not know the terms of #
# the license, please stop and do not read further. #
# #
#################################################################
ext=.m
for i in $*
do
base=`basename $i $ext`
if test $i != $base
then {
newf=`echo $base | tr '[a-z]' '[A-Z]'`
if test $base != $newf
then {
dir=`dirname $i`
echo $dir/$i "---> " $dir/$newf$ext
mv $i $dir/$newf$ext
}
fi
}
fi
done

View File

@ -1,32 +0,0 @@
#!/bin/csh
#################################################################
# #
# Copyright 2001 Sanchez Computer Associates, Inc. #
# #
# This source code contains the intellectual property #
# of its copyright holder(s), and is made available #
# under a license. If you do not know the terms of #
# the license, please stop and do not read further. #
# #
#################################################################
set upperc_cp_ext = ".m"
foreach upperc_cp_i ($*)
set upperc_cp_base = `basename $upperc_cp_i $upperc_cp_ext`
if ( "$upperc_cp_i" != "$upperc_cp_base" ) then
# If they _don't_ match, then basename found $upperc_cp_ext and stripped it off.
set upperc_cp_newbase = `echo $upperc_cp_base | tr '[a-z]' '[A-Z]'`
if ( "$upperc_cp_base" != "$upperc_cp_newbase" ) then
# If _not_ overwriting an existing file.
set upperc_cp_dirname = `dirname $upperc_cp_i`
echo "cp $upperc_cp_dirname/$upperc_cp_i ---> $upperc_cp_dirname/$upperc_cp_newbase$upperc_cp_ext"
cp $upperc_cp_dirname/$upperc_cp_i $upperc_cp_dirname/$upperc_cp_newbase$upperc_cp_ext
endif
endif
end
unset upperc_cp_base
unset upperc_cp_dirname
unset upperc_cp_ext
unset upperc_cp_i
unset upperc_cp_newbase

View File

@ -1,29 +0,0 @@
#!/bin/sh
#################################################################
# #
# Copyright 2001 Sanchez Computer Associates, Inc. #
# #
# This source code contains the intellectual property #
# of its copyright holder(s), and is made available #
# under a license. If you do not know the terms of #
# the license, please stop and do not read further. #
# #
#################################################################
ext=.m
for i in $*
do
base=`basename $i $ext`
if test $i != $base
then {
newf=`echo $base | tr '[a-z]' '[A-Z]'`
if test $base != $newf
then {
dir=`dirname $i`
echo $dir/$i "---> " $dir/$newf$ext
cp $i $dir/$newf$ext
}
fi
}
fi
done

95
sr_unix_cm/CMakeLists.txt Normal file
View File

@ -0,0 +1,95 @@
if(ARCHITECTURE_IS_32_BITS)
include_directories(
${fis-gtm_SOURCE_DIR}/sr_i386
${fis-gtm_SOURCE_DIR}/sr_unix_nsb
${fis-gtm_BINARY_DIR}/pro/obj
)
endif()
if(ARCHITECTURE_IS_64_BITS)
include_directories(
${fis-gtm_SOURCE_DIR}/sr_x86_64
${fis-gtm_BINARY_DIR}/pro/obj
)
endif()
include_directories(
${fis-gtm_SOURCE_DIR}/sr_port_cm
${fis-gtm_SOURCE_DIR}/sr_port
${fis-gtm_SOURCE_DIR}/pro/obj
${fis-gtm_SOURCE_DIR}/sr_unix
${fis-gtm_SOURCE_DIR}/sr_linux
)
set(GTM_UNIX_CM_SRC
gtcm_bgn_net.c
gtcm_cn_acpt.c
gtcm_cn_disc.c
gtcm_dmpstat.c
gtcm_end_net.c
gtcm_exit.c
gtcm_exit_ch.c
gtcm_hist.c
gtcm_init.c
gtcm_loop.c
gtcm_main.c
gtcm_ping.c
# gtcm_pkdisp.c has a main, make it executable.
gtcm_pktdmp.c
# gtcm_play.c has a main, make it executable.
gtcm_prsopt.c
gtcm_rep_err.c
# gtcm_shmclean.c has a main, make it executable.
gtcm_term.c
omi_buff_rsp.c
omi_dbms_ch.c
omi_dmp_pkt.c
omi_extstr.c
omi_gvextnam.c
omi_lkextnam.c
omi_prc_conn.c
omi_prc_def.c
omi_prc_disc.c
omi_prc_get.c
omi_prc_incr.c
omi_prc_kill.c
omi_prc_lock.c
omi_prc_next.c
omi_prc_ordr.c
omi_prc_qry.c
omi_prc_rord.c
omi_prc_set.c
omi_prc_sete.c
omi_prc_setp.c
omi_prc_stat.c
omi_prc_unla.c
omi_prc_unlc.c
omi_prc_unlk.c
omi_srvc_xct.c
rc_dbms_ch.c
rc_fnd_file.c
rc_frmt_lck.c
rc_gbl_ord.c
rc_iscan.c
rc_mval2subsc.c
rc_oflow.c
rc_prc_clsd.c
rc_prc_getp.c
rc_prc_getr.c
rc_prc_kill.c
rc_prc_lock.c
rc_prc_logn.c
rc_prc_opnd.c
rc_prc_set.c
rc_prc_setf.c
rc_rundown.c
rc_srvc_xct.c
)
add_library(gtmunixcm ${LIBRARY_TYPE}
${GTM_UNIX_CM_SRC}
)

View File

@ -0,0 +1,76 @@
if(ARCHITECTURE_IS_32_BITS)
include_directories(
${fis-gtm_SOURCE_DIR}/sr_i386
${fis-gtm_SOURCE_DIR}/sr_unix_nsb
${fis-gtm_BINARY_DIR}/pro/obj
)
endif()
if(ARCHITECTURE_IS_64_BITS)
include_directories(
${fis-gtm_SOURCE_DIR}/sr_x86_64
${fis-gtm_BINARY_DIR}/pro/obj
)
endif()
include_directories(
${fis-gtm_SOURCE_DIR}/sr_i386
${fis-gtm_SOURCE_DIR}/sr_port_cm
${fis-gtm_SOURCE_DIR}/sr_port
${fis-gtm_SOURCE_DIR}/pro/obj
${fis-gtm_SOURCE_DIR}/sr_unix
${fis-gtm_SOURCE_DIR}/sr_linux
)
set(GTM_CMI_SOCKET_TCP_UNIX_SRC_C
cmi_alloc.c
cmi_close.c
cmi_debug.c
cmi_idle.c
cmi_init.c
cmi_open.c
cmi_peer_info.c
cmi_read.c
cmi_write.c
cmi_write_urg.c
cmj_async.c
cmj_clb_async.c
cmj_err.c
cmj_exception.c
cmj_fini.c
cmj_firstone.c
cmj_get_port.c
cmj_getsockaddr.c
cmj_getdeferred.c
cmj_handler.c
cmj_housekeeping.c
cmj_incoming_call.c
cmj_init_clb.c
cmj_netinit.c
cmj_postevent.c
cmj_read.c
cmj_resolve_nod_tnd.c
cmj_select.c
cmj_setupfd.c
cmj_unit2clb.c
cmj_write.c
cmu_getclb.c
cmu_ntdroot.c
gvcmz_errmsg.c
gtcm_ch.c
gtcmd_ini_reg.c
gtcm_exi_ch.c
gtcm_gnp_clitab.c
gtcm_gnp_pktdmp.c
gtcm_gnp_server.c
gtcm_open_cmerrlog.c
gtcm_urgread_ast.c
)
add_library(cmisockettcp ${LIBRARY_TYPE}
${GTM_CMI_SOCKET_TCP_UNIX_SRC_C}
)

View File

@ -0,0 +1,39 @@
if(ARCHITECTURE_IS_32_BITS)
include_directories(
${fis-gtm_SOURCE_DIR}/sr_i386
${fis-gtm_SOURCE_DIR}/sr_unix_nsb
${fis-gtm_SOURCE_DIR}/sr_x86_64
${fis-gtm_SOURCE_DIR}/sr_x86_regs
${fis-gtm_BINARY_DIR}/pro/obj
)
endif()
if(ARCHITECTURE_IS_64_BITS)
include_directories(
${fis-gtm_SOURCE_DIR}/sr_x86_64
${fis-gtm_BINARY_DIR}/pro/obj
)
endif()
include_directories(
${fis-gtm_SOURCE_DIR}/sr_port_cm
${fis-gtm_SOURCE_DIR}/sr_port
${fis-gtm_SOURCE_DIR}/pro/obj
${fis-gtm_SOURCE_DIR}/sr_unix
${fis-gtm_SOURCE_DIR}/sr_linux
)
set(GTM_UNIX_NSB_SRC
comp_lits.c
m_do.c
obj_code.c
resolve_ref.c
shrink_jmps.c
)
add_library(gtm_unix_nsb ${LIBRARY_TYPE}
${GTM_UNIX_NSB_SRC}
)

127
sr_x86_64/CMakeLists.txt Normal file
View File

@ -0,0 +1,127 @@
if(ARCHITECTURE_IS_32_BITS)
include_directories(
${fis-gtm_SOURCE_DIR}/sr_i386
${fis-gtm_SOURCE_DIR}/sr_unix_nsb
)
endif()
if(ARCHITECTURE_IS_64_BITS)
include_directories(
${fis-gtm_SOURCE_DIR}/sr_x86_64
)
endif()
include_directories(
${fis-gtm_SOURCE_DIR}/sr_x86_regs
${fis-gtm_SOURCE_DIR}/sr_port
${fis-gtm_SOURCE_DIR}/sr_unix
${fis-gtm_SOURCE_DIR}/sr_linux
${fis-gtm_BINARY_DIR}/pro/obj
)
set(SRC_C
auto_zlink_sp.c
emit_code_sp.c
find_line_call.c
obj_filesp.c
)
set(SRC_S
aswp.s
call_dm.s
ci_restart.s
compswap.s
dm_start.s
follow.s
mint2mval.s
mum_tstart.s
mval2bool.s
mval2mint.s
mval2num.s
op_bkpt.s
op_call.s
op_callsp.s
op_contain.s
op_currtn.s
op_equnul.s
op_equ.s
op_exfun.s
op_extcall.s
op_extexfun.s
op_extjmp.s
op_fetchintrrpt.s
op_fnget.s
op_fnzextract.s
op_follow.s
op_forcenum.s
op_forchk1.s
op_forinit.s
op_forintrrpt.s
op_forlcldo.s
op_forloop.s
op_gettruth.s
op_iretmvad.s
# op_isformal.s not in version 5.5
op_linefetch.s
op_linestart.s
op_mprofcall.s
op_mprofcallsp.s
op_mprofexfun.s
op_mprofextcall.s
op_mprofextexfun.s
op_mprofforchk1.s
op_mprofforlcldo.s
op_mproflinefetch.s
op_mproflinestart.s
op_neg.s
op_numcmp.s
op_pattern.s
opp_break.s
opp_commarg.s
opp_dmode.s
opp_hardret.s
opp_inddevparms.s
opp_indfnname.s
opp_indfun.s
opp_indget.s
opp_indglvn.s
opp_indincr.s
opp_indlvadr.s
opp_indlvarg.s
opp_indlvnamadr.s
opp_indmerge.s
opp_indo2.s
opp_indpat.s
opp_indrzshow.s
opp_indset.s
opp_indtext.s
opp_iretmval.s
opp_newintrinsic.s
opp_newvar.s
opp_ret.s
opp_rterror.s
opp_svput.s
opp_tcommit.s
opp_trestart.s
opp_trollback.s
opp_tstart.s
opp_xnew.s
opp_zcont.s
opp_zg1.s
opp_zgoto.s
op_restartpc.s
op_retarg.s
op_sorts_after.s
op_startintrrpt.s
op_sto.s
op_zhelp.s
pseudo_ret.s
)
add_library(fisgtmx64 # ${LIBRARY_TYPE}
${SRC_C}
${SRC_S}
)

View File

@ -1,47 +0,0 @@
#################################################################
# #
# Copyright 2007 Fidelity Information Services, Inc #
# #
# This source code contains the intellectual property #
# of its copyright holder(s), and is made available #
# under a license. If you do not know the terms of #
# the license, please stop and do not read further. #
# #
#################################################################
# PAGE ,132
.title op_isformal.s
# .386
# .MODEL FLAT, C
.include "linkage.si"
.INCLUDE "g_msf.si"
.sbttl op_isformal
# PAGE +
.DATA
.extern ERR_ACTLSTEXP
.extern frame_pointer
.text
.extern rts_error
# PUBLIC op_isformal
ENTRY op_isformal
movq frame_pointer(REG_IP),REG64_ARG2
movw msf_typ_off(REG64_ARG2),REG16_ACCUM
andw $~SFT_EXTFUN,msf_typ_off(REG64_ARG2)
andw $SFT_EXTFUN,REG16_ACCUM
je l1
ret
l1: putframe
movl ERR_ACTLSTEXP(REG_IP),REG32_ARG1
movl $1,REG32_ARG0
movb $0,REG8_ACCUM # variable length argument
call rts_error
ret
# op_isformal ENDP
# END