diff --git a/CMakeLists.txt b/CMakeLists.txt index e08b252f..ff1243bb 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -32,23 +32,23 @@ # SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. # ******************************************************************* -# *** SCL's CMakeLists.txt *** +# *** SC's CMakeLists.txt *** # ******************************************************************* # This file contains the top level CMakeLists.txt logic for the -# SCL software package. +# SC software package. -PROJECT(SCL) +PROJECT(SC) -# SCL version -SET(SCL_VERSION_MAJOR 0) -SET(SCL_VERSION_MINOR 5-dev) -SET(SCL_VERSION ${SCL_VERSION_MAJOR}.${SCL_VERSION_MINOR}) +# SC version +SET(SC_VERSION_MAJOR 0) +SET(SC_VERSION_MINOR 5-dev) +SET(SC_VERSION ${SC_VERSION_MAJOR}.${SC_VERSION_MINOR}) -# SCL ABI version. SCL_ABI_SOVERSION should be incremented +# SC ABI version. SC_ABI_SOVERSION should be incremented # for each release introducing API incompatibilities -SET(SCL_ABI_SOVERSION 2) -SET(SCL_ABI_VERSION ${SCL_ABI_SOVERSION}.0.0) +SET(SC_ABI_SOVERSION 2) +SET(SC_ABI_VERSION ${SC_ABI_SOVERSION}.0.0) # Minimum required version of CMake CMAKE_MINIMUM_REQUIRED(VERSION 2.8.7) @@ -56,14 +56,14 @@ IF(COMMAND CMAKE_POLICY) CMAKE_POLICY(SET CMP0003 NEW) ENDIF(COMMAND CMAKE_POLICY) -IF( NOT DEFINED SCL_BUILD_TYPE ) - SET( SCL_BUILD_TYPE "Debug" CACHE STRING "Build type" ) # By default set debug build -ENDIF( NOT DEFINED SCL_BUILD_TYPE ) -IF(NOT SCL_IS_SUBBUILD) - SET(CMAKE_BUILD_TYPE ${SCL_BUILD_TYPE} CACHE INTERNAL "Build type, immutable" FORCE ) -ELSE(NOT SCL_IS_SUBBUILD) - SET(CMAKE_BUILD_TYPE ${SCL_BUILD_TYPE} ) -ENDIF(NOT SCL_IS_SUBBUILD) +IF( NOT DEFINED SC_BUILD_TYPE ) + SET( SC_BUILD_TYPE "Debug" CACHE STRING "Build type" ) # By default set debug build +ENDIF( NOT DEFINED SC_BUILD_TYPE ) +IF(NOT SC_IS_SUBBUILD) + SET(CMAKE_BUILD_TYPE ${SC_BUILD_TYPE} CACHE INTERNAL "Build type, immutable" FORCE ) +ELSE(NOT SC_IS_SUBBUILD) + SET(CMAKE_BUILD_TYPE ${SC_BUILD_TYPE} ) +ENDIF(NOT SC_IS_SUBBUILD) # Define helper macro OPTION_WITH_DEFAULT MACRO( OPTION_WITH_DEFAULT OPTION_NAME OPTION_STRING OPTION_DEFAULT ) @@ -74,36 +74,36 @@ MACRO( OPTION_WITH_DEFAULT OPTION_NAME OPTION_STRING OPTION_DEFAULT ) ENDMACRO( OPTION_WITH_DEFAULT OPTION_NAME OPTION_STRING OPTION_DEFAULT ) # build shared libs by default -OPTION_WITH_DEFAULT(SCL_BUILD_SHARED_LIBS "Build shared libs" ON ) +OPTION_WITH_DEFAULT(SC_BUILD_SHARED_LIBS "Build shared libs" ON ) # don't build static libs by default -OPTION_WITH_DEFAULT(SCL_BUILD_STATIC_LIBS "Build static libs" OFF) +OPTION_WITH_DEFAULT(SC_BUILD_STATIC_LIBS "Build static libs" OFF) -OPTION_WITH_DEFAULT(SCL_PYTHON_GENERATOR "Compile fedex_python" ON) -OPTION_WITH_DEFAULT(SCL_CPP_GENERATOR "Compile fedex_plus" ON) +OPTION_WITH_DEFAULT(SC_PYTHON_GENERATOR "Compile fedex_python" ON) +OPTION_WITH_DEFAULT(SC_CPP_GENERATOR "Compile fedex_plus" ON) -OPTION_WITH_DEFAULT(SCL_MEMMGR_ENABLE_CHECKS "Enable scl_memmgr's memory leak detection" OFF) -OPTION_WITH_DEFAULT(SCL_TRACE_FPRINTF "Enable extra comments in generated code so the code's source in fedex_plus may be located" OFF) +OPTION_WITH_DEFAULT(SC_MEMMGR_ENABLE_CHECKS "Enable sc_memmgr's memory leak detection" OFF) +OPTION_WITH_DEFAULT(SC_TRACE_FPRINTF "Enable extra comments in generated code so the code's source in fedex_plus may be located" OFF) if(NOT DEFINED SC_SDAI_ADDITIONAL_EXES_SRCS ) set( SC_SDAI_ADDITIONAL_EXES_SRCS "" CACHE STRING "Source files for additional executables to be linked with SDAI libs" ) endif(NOT DEFINED SC_SDAI_ADDITIONAL_EXES_SRCS ) -#this makes SCL_BUILD_SCHEMAS show up in cmake-gui -if( NOT DEFINED SCL_BUILD_SCHEMAS ) - SET(SCL_BUILD_SCHEMAS "ALL" CACHE string "Semicolon-separated list of paths to EXPRESS schemas to be built" ) -endif( NOT DEFINED SCL_BUILD_SCHEMAS ) +#this makes SC_BUILD_SCHEMAS show up in cmake-gui +if( NOT DEFINED SC_BUILD_SCHEMAS ) + SET(SC_BUILD_SCHEMAS "ALL" CACHE string "Semicolon-separated list of paths to EXPRESS schemas to be built" ) +endif( NOT DEFINED SC_BUILD_SCHEMAS ) # CMake derives much of its functionality from modules, typically # stored in one directory - let CMake know where to find them. -SET(SCL_CMAKE_DIR "${SCL_SOURCE_DIR}/cmake") +SET(SC_CMAKE_DIR "${SC_SOURCE_DIR}/cmake") if(NOT IS_SUBBUILD) - SET(CMAKE_MODULE_PATH "${SCL_CMAKE_DIR};${CMAKE_MODULE_PATH}") + SET(CMAKE_MODULE_PATH "${SC_CMAKE_DIR};${CMAKE_MODULE_PATH}") else(NOT IS_SUBBUILD) - SET(CMAKE_MODULE_PATH "${CMAKE_MODULE_PATH};${SCL_CMAKE_DIR}") + SET(CMAKE_MODULE_PATH "${CMAKE_MODULE_PATH};${SC_CMAKE_DIR}") endif(NOT IS_SUBBUILD) -INCLUDE(${SCL_CMAKE_DIR}/SCL_Utils.cmake) +INCLUDE(${SC_CMAKE_DIR}/SC_Utils.cmake) # Save the current LC_ALL, LC_MESSAGES, and LANG environment variables and set them # to "C" so things like date output are as expected @@ -123,29 +123,29 @@ ENDIF(_orig_lang) #--------------------------------------------------------------------- # Coverage option -OPTION_WITH_DEFAULT( SCL_ENABLE_COVERAGE "Enable code coverage test" OFF ) -IF(SCL_ENABLE_COVERAGE) - SET(SCL_ENABLE_TESTING ON CACHE BOOL "Testing enabled by coverage option" FORCE) +OPTION_WITH_DEFAULT( SC_ENABLE_COVERAGE "Enable code coverage test" OFF ) +IF(SC_ENABLE_COVERAGE) + SET(SC_ENABLE_TESTING ON CACHE BOOL "Testing enabled by coverage option" FORCE) # build static libs, better coverage report - SET(SCL_BUILD_SHARED_LIBS OFF CACHE BOOL "Build shared libs" FORCE ) - SET(SCL_BUILD_STATIC_LIBS ON CACHE BOOL "Build static libs" FORCE ) + SET(SC_BUILD_SHARED_LIBS OFF CACHE BOOL "Build shared libs" FORCE ) + SET(SC_BUILD_STATIC_LIBS ON CACHE BOOL "Build static libs" FORCE ) SET(CMAKE_CXX_FLAGS_DEBUG "-O0 -g -fprofile-arcs -ftest-coverage" CACHE STRING "Extra compile flags required by code coverage" FORCE) SET(CMAKE_C_FLAGS_DEBUG "-O0 -g -fprofile-arcs -ftest-coverage" CACHE STRING "Extra compile flags required by code coverage" FORCE) SET(CMAKE_MODULE_LINKER_FLAGS_DEBUG "-fprofile-arcs -ftest-coverage" CACHE STRING "Extra linker flags required by code coverage" FORCE) - SET(SCL_BUILD_TYPE "Debug" CACHE STRING "Build type required by testing framework" FORCE) - SET( SCL_PYTHON_GENERATOR OFF ) #won't build with static libs -ENDIF(SCL_ENABLE_COVERAGE) + SET(SC_BUILD_TYPE "Debug" CACHE STRING "Build type required by testing framework" FORCE) + SET( SC_PYTHON_GENERATOR OFF ) #won't build with static libs +ENDIF(SC_ENABLE_COVERAGE) #--------------------------------------------------------------------- # Testing option -OPTION_WITH_DEFAULT( SCL_ENABLE_TESTING "Enable unittesting framework" OFF ) -IF(SCL_ENABLE_TESTING) - if( NOT DEFINED SCL_BUILD_SCHEMAS ) - set( SCL_BUILD_SCHEMAS "ALL" ) #test all schemas, unless otherwise specified +OPTION_WITH_DEFAULT( SC_ENABLE_TESTING "Enable unittesting framework" OFF ) +IF(SC_ENABLE_TESTING) + if( NOT DEFINED SC_BUILD_SCHEMAS ) + set( SC_BUILD_SCHEMAS "ALL" ) #test all schemas, unless otherwise specified endif() INCLUDE(CTest) ENABLE_TESTING() -ENDIF(SCL_ENABLE_TESTING) +ENDIF(SC_ENABLE_TESTING) #--------------------------------------------------------------------- # The following logic is what allows binaries to run successfully in @@ -176,25 +176,25 @@ set(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE) #----------------------------------------------------------------------------- # Output directories. IF(NOT DEFINED CMAKE_LIBRARY_OUTPUT_DIRECTORY) - SET(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${SCL_BINARY_DIR}/lib CACHE INTERNAL "Single output directory for building all libraries.") + SET(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${SC_BINARY_DIR}/lib CACHE INTERNAL "Single output directory for building all libraries.") ENDIF(NOT DEFINED CMAKE_LIBRARY_OUTPUT_DIRECTORY) IF(NOT DEFINED CMAKE_ARCHIVE_OUTPUT_DIRECTORY) - SET(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${SCL_BINARY_DIR}/lib CACHE INTERNAL "Single output directory for building all archives.") + SET(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${SC_BINARY_DIR}/lib CACHE INTERNAL "Single output directory for building all archives.") ENDIF(NOT DEFINED CMAKE_ARCHIVE_OUTPUT_DIRECTORY) IF(NOT DEFINED CMAKE_RUNTIME_OUTPUT_DIRECTORY) - SET(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${SCL_BINARY_DIR}/bin CACHE INTERNAL "Single output directory for building all executables.") + SET(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${SC_BINARY_DIR}/bin CACHE INTERNAL "Single output directory for building all executables.") ENDIF(NOT DEFINED CMAKE_RUNTIME_OUTPUT_DIRECTORY) FOREACH(CFG_TYPE ${CMAKE_CONFIGURATION_TYPES}) STRING(TOUPPER "${CFG_TYPE}" CFG_TYPE) IF(NOT "CMAKE_LIBRARY_OUTPUT_DIRECTORY_${CFG_TYPE}") - SET("CMAKE_LIBRARY_OUTPUT_DIRECTORY_${CFG_TYPE}" ${SCL_BINARY_DIR}/lib CACHE INTERNAL "Single output directory for building all libraries.") + SET("CMAKE_LIBRARY_OUTPUT_DIRECTORY_${CFG_TYPE}" ${SC_BINARY_DIR}/lib CACHE INTERNAL "Single output directory for building all libraries.") ENDIF(NOT "CMAKE_LIBRARY_OUTPUT_DIRECTORY_${CFG_TYPE}") IF(NOT "CMAKE_ARCHIVE_OUTPUT_DIRECTORY_${CFG_TYPE}") - SET("CMAKE_ARCHIVE_OUTPUT_DIRECTORY_${CFG_TYPE}" ${SCL_BINARY_DIR}/lib CACHE INTERNAL "Single output directory for building all archives.") + SET("CMAKE_ARCHIVE_OUTPUT_DIRECTORY_${CFG_TYPE}" ${SC_BINARY_DIR}/lib CACHE INTERNAL "Single output directory for building all archives.") ENDIF(NOT "CMAKE_ARCHIVE_OUTPUT_DIRECTORY_${CFG_TYPE}") IF(NOT "CMAKE_RUNTIME_OUTPUT_DIRECTORY_${CFG_TYPE}") - SET("CMAKE_RUNTIME_OUTPUT_DIRECTORY_${CFG_TYPE}" ${SCL_BINARY_DIR}/bin CACHE INTERNAL "Single output directory for building all executables.") + SET("CMAKE_RUNTIME_OUTPUT_DIRECTORY_${CFG_TYPE}" ${SC_BINARY_DIR}/bin CACHE INTERNAL "Single output directory for building all executables.") ENDIF(NOT "CMAKE_RUNTIME_OUTPUT_DIRECTORY_${CFG_TYPE}") ENDFOREACH() @@ -202,32 +202,32 @@ ENDFOREACH() #----------------------------------------------------------------------------- # Configure install locations. -# The location in which to install SCL. Need a good Debug location +# The location in which to install SC. Need a good Debug location # for Windows. Only do this if CMAKE_INSTALL_PREFIX hasn't been set # already, to try and allow parent builds (if any) some control. -if(NOT SCL_IS_SUBBUILD) +if(NOT SC_IS_SUBBUILD) IF(NOT WIN32) IF (${CMAKE_BUILD_TYPE} MATCHES "Debug") - SET(SCL_INSTALL_PREFIX "${SCL_SOURCE_DIR}/../scl-install") + SET(SC_INSTALL_PREFIX "${SC_SOURCE_DIR}/../sc-install") ELSE() - SET(SCL_INSTALL_PREFIX "/usr/local") + SET(SC_INSTALL_PREFIX "/usr/local") ENDIF() ENDIF(NOT WIN32) - SET( SCL_INSTALL_PREFIX ${SCL_INSTALL_PREFIX} CACHE + SET( SC_INSTALL_PREFIX ${SC_INSTALL_PREFIX} CACHE PATH "Install prefix prepended to target to create install location" ) - SET( CMAKE_INSTALL_PREFIX ${SCL_INSTALL_PREFIX} CACHE INTERNAL "Prefix prepended to install directories if target destination is not absolute, immutable" FORCE ) -endif(NOT SCL_IS_SUBBUILD) + SET( CMAKE_INSTALL_PREFIX ${SC_INSTALL_PREFIX} CACHE INTERNAL "Prefix prepended to install directories if target destination is not absolute, immutable" FORCE ) +endif(NOT SC_IS_SUBBUILD) -OPTION(SCL_BUILD_EXPRESS_ONLY "Only build express parser." OFF) -MARK_AS_ADVANCED(SCL_BUILD_EXPRESS_ONLY) +OPTION(SC_BUILD_EXPRESS_ONLY "Only build express parser." OFF) +MARK_AS_ADVANCED(SC_BUILD_EXPRESS_ONLY) -# Take the scl config file template as the starting point for -# scl_cf.h.in - scripts may need to append to the template, so +# Take the sc config file template as the starting point for +# sc_cf.h.in - scripts may need to append to the template, so # it is read into memory initially. -SET(CONFIG_H_FILE ${SCL_BINARY_DIR}/include/scl_cf.h.in) +SET(CONFIG_H_FILE ${SC_BINARY_DIR}/include/sc_cf.h.in) set_source_files_properties(${CONFIG_H_FILE} PROPERTIES GENERATED TRUE) -set(CMAKE_CURRENT_PROJECT SCL) -define_property(GLOBAL PROPERTY SCL_CONFIG_H_CONTENTS BRIEF_DOCS "config.h.in contents" FULL_DOCS "config.h.in contents for SCL project") +set(CMAKE_CURRENT_PROJECT SC) +define_property(GLOBAL PROPERTY SC_CONFIG_H_CONTENTS BRIEF_DOCS "config.h.in contents" FULL_DOCS "config.h.in contents for SC project") if(NOT COMMAND CONFIG_H_APPEND) macro(CONFIG_H_APPEND PROJECT_NAME NEW_CONTENTS) if(PROJECT_NAME) @@ -237,35 +237,35 @@ if(NOT COMMAND CONFIG_H_APPEND) endif(PROJECT_NAME) endmacro(CONFIG_H_APPEND NEW_CONTENTS) endif(NOT COMMAND CONFIG_H_APPEND) -file(READ ${SCL_SOURCE_DIR}/include/scl_cf_cmake.h.in CONFIG_H_FILE_CONTENTS) -CONFIG_H_APPEND(SCL "${CONFIG_H_FILE_CONTENTS}") +file(READ ${SC_SOURCE_DIR}/include/sc_cf_cmake.h.in CONFIG_H_FILE_CONTENTS) +CONFIG_H_APPEND(SC "${CONFIG_H_FILE_CONTENTS}") # The Express parser uses the tools Perplex, RE2C and Lemon to generate code # from higher level inputs. Depending on available tools and options, the -# SCL build can either re-generate code as part of the build, or use cached +# SC build can either re-generate code as part of the build, or use cached # files that are ready for compilation. # -# SCL_GENERATE_LEXER_PARSER is the "high level" control a user sets to determine -# how the SCL build will interact (or not) with these tools. AUTO (the +# SC_GENERATE_LEXER_PARSER is the "high level" control a user sets to determine +# how the SC build will interact (or not) with these tools. AUTO (the # default) means it will search for the necessary tools, and use them only if # everything is found. If not, it will fall back to the cached versions. If # this option is set to ON and the necessary tools are not found, the -# configure step will fail. If it is set to OFF, SCL will not even try to use +# configure step will fail. If it is set to OFF, SC will not even try to use # the generators and will instead use the cached sources. -if(NOT SCL_GENERATE_LEXER_PARSER) - set(SCL_GENERATE_LEXER_PARSER "AUTO" CACHE STRING "Use Perplex, RE2C and Lemon to generate C source code.") -else(NOT SCL_GENERATE_LEXER_PARSER) - string(TOUPPER "${SCL_GENERATE_LEXER_PARSER}" SCL_GENERATE_LEXER_PARSER) -endif(NOT SCL_GENERATE_LEXER_PARSER) -set_property(CACHE SCL_GENERATE_LEXER_PARSER PROPERTY STRINGS AUTO ON OFF) -if (NOT "${SCL_GENERATE_LEXER_PARSER}" STREQUAL "AUTO" AND NOT "${SCL_GENERATE_LEXER_PARSER}" STREQUAL "ON" AND NOT "${SCL_GENERATE_LEXER_PARSER}" STREQUAL "OFF") - message(WARNING "Unknown value ${SCL_GENERATE_LEXER_PARSER} supplied for BRLCAD_WORD_SIZE - defaulting to AUTO") +if(NOT SC_GENERATE_LEXER_PARSER) + set(SC_GENERATE_LEXER_PARSER "AUTO" CACHE STRING "Use Perplex, RE2C and Lemon to generate C source code.") +else(NOT SC_GENERATE_LEXER_PARSER) + string(TOUPPER "${SC_GENERATE_LEXER_PARSER}" SC_GENERATE_LEXER_PARSER) +endif(NOT SC_GENERATE_LEXER_PARSER) +set_property(CACHE SC_GENERATE_LEXER_PARSER PROPERTY STRINGS AUTO ON OFF) +if (NOT "${SC_GENERATE_LEXER_PARSER}" STREQUAL "AUTO" AND NOT "${SC_GENERATE_LEXER_PARSER}" STREQUAL "ON" AND NOT "${SC_GENERATE_LEXER_PARSER}" STREQUAL "OFF") + message(WARNING "Unknown value ${SC_GENERATE_LEXER_PARSER} supplied for BRLCAD_WORD_SIZE - defaulting to AUTO") message(WARNING "Valid options are AUTO, ON and OFF") - set(SCL_GENERATE_LEXER_PARSER "AUTO" CACHE STRING "Use Perplex, RE2C and Lemon to generate C source code.") -endif (NOT "${SCL_GENERATE_LEXER_PARSER}" STREQUAL "AUTO" AND NOT "${SCL_GENERATE_LEXER_PARSER}" STREQUAL "ON" AND NOT "${SCL_GENERATE_LEXER_PARSER}" STREQUAL "OFF") + set(SC_GENERATE_LEXER_PARSER "AUTO" CACHE STRING "Use Perplex, RE2C and Lemon to generate C source code.") +endif (NOT "${SC_GENERATE_LEXER_PARSER}" STREQUAL "AUTO" AND NOT "${SC_GENERATE_LEXER_PARSER}" STREQUAL "ON" AND NOT "${SC_GENERATE_LEXER_PARSER}" STREQUAL "OFF") # If the generators have not been turned off, we need to check for them -if(NOT "${SCL_GENERATE_LEXER_PARSER}" STREQUAL "OFF") +if(NOT "${SC_GENERATE_LEXER_PARSER}" STREQUAL "OFF") find_package(LEMON) find_package(RE2C) find_package(PERPLEX) @@ -282,22 +282,22 @@ if(NOT "${SCL_GENERATE_LEXER_PARSER}" STREQUAL "OFF") endif(NOT "${perplex_template_fpath}" STREQUAL "${PERPLEX_TEMPLATE}") if(NOT COMMAND LEMON_TARGET) - include(${SCL_CMAKE_DIR}/LEMON_Util.cmake) + include(${SC_CMAKE_DIR}/LEMON_Util.cmake) endif(NOT COMMAND LEMON_TARGET) if(NOT COMMAND PERPLEX_TARGET) - include(${SCL_CMAKE_DIR}/PERPLEX_Util.cmake) + include(${SC_CMAKE_DIR}/PERPLEX_Util.cmake) endif(NOT COMMAND PERPLEX_TARGET) - set(SCL_GENERATE_LP_SOURCES 1) + set(SC_GENERATE_LP_SOURCES 1) else(LEMON_EXECUTABLE AND LEMON_TEMPLATE AND PERPLEX_EXECUTABLE AND PERPLEX_TEMPLATE AND RE2C_EXECUTABLE) - if("${SCL_GENERATE_LEXER_PARSER}" STREQUAL "ON") - message(FATAL_ERROR "\nSCL_GENERATE_LEXER_PARSER set to ON, but one or more components of the Perplex/RE2C/Lemon toolchain were not found.\n") - else("${SCL_GENERATE_LEXER_PARSER}" STREQUAL "ON") - set(SCL_GENERATE_LP_SOURCES 0) - endif("${SCL_GENERATE_LEXER_PARSER}" STREQUAL "ON") + if("${SC_GENERATE_LEXER_PARSER}" STREQUAL "ON") + message(FATAL_ERROR "\nSC_GENERATE_LEXER_PARSER set to ON, but one or more components of the Perplex/RE2C/Lemon toolchain were not found.\n") + else("${SC_GENERATE_LEXER_PARSER}" STREQUAL "ON") + set(SC_GENERATE_LP_SOURCES 0) + endif("${SC_GENERATE_LEXER_PARSER}" STREQUAL "ON") endif(LEMON_EXECUTABLE AND LEMON_TEMPLATE AND PERPLEX_EXECUTABLE AND PERPLEX_TEMPLATE AND RE2C_EXECUTABLE) -else(NOT "${SCL_GENERATE_LEXER_PARSER}" STREQUAL "OFF") - set(SCL_GENERATE_LP_SOURCES 0) -endif(NOT "${SCL_GENERATE_LEXER_PARSER}" STREQUAL "OFF") +else(NOT "${SC_GENERATE_LEXER_PARSER}" STREQUAL "OFF") + set(SC_GENERATE_LP_SOURCES 0) +endif(NOT "${SC_GENERATE_LEXER_PARSER}" STREQUAL "OFF") INCLUDE(CheckLibraryExists) INCLUDE(CheckIncludeFile) @@ -344,24 +344,24 @@ cmake_push_check_state() CHECK_CXX_SOURCE_RUNS( "${TEST_STD_THREAD}" HAVE_STD_THREAD ) #quotes are *required*! cmake_pop_check_state() -# Now that all the tests are done, configure the scl_cf.h file: -get_property(CONFIG_H_FILE_CONTENTS GLOBAL PROPERTY SCL_CONFIG_H_CONTENTS) +# Now that all the tests are done, configure the sc_cf.h file: +get_property(CONFIG_H_FILE_CONTENTS GLOBAL PROPERTY SC_CONFIG_H_CONTENTS) file(WRITE ${CONFIG_H_FILE} "${CONFIG_H_FILE_CONTENTS}") -configure_file(${CONFIG_H_FILE} ${SCL_BINARY_DIR}/include/scl_cf.h) +configure_file(${CONFIG_H_FILE} ${SC_BINARY_DIR}/include/sc_cf.h) -################ create scl_version_string.h, http://stackoverflow.com/questions/3780667 -# Using 'ver_string' instead of 'scl_version_string.h' is a trick to force the +################ create sc_version_string.h, http://stackoverflow.com/questions/3780667 +# Using 'ver_string' instead of 'sc_version_string.h' is a trick to force the # command to always execute when the custom target is built. It works because # a file by that name never exists. -configure_file(${SCL_CMAKE_DIR}/scl_version_string.cmake ${SCL_BINARY_DIR}/scl_version_string.cmake @ONLY) +configure_file(${SC_CMAKE_DIR}/sc_version_string.cmake ${SC_BINARY_DIR}/sc_version_string.cmake @ONLY) add_custom_target(version_string ALL DEPENDS ver_string ) -# creates scl_version_string.h using cmake script -add_custom_command(OUTPUT ver_string ${CMAKE_CURRENT_BINARY_DIR}/include/scl_version_string.h - COMMAND ${CMAKE_COMMAND} -DSOURCE_DIR=${SCL_SOURCE_DIR} - -DBINARY_DIR=${SCL_BINARY_DIR} - -P ${SCL_BINARY_DIR}/scl_version_string.cmake) -# scl_version_string.h is a generated file -set_source_files_properties(${CMAKE_CURRENT_BINARY_DIR}/include/scl_version_string.h +# creates sc_version_string.h using cmake script +add_custom_command(OUTPUT ver_string ${CMAKE_CURRENT_BINARY_DIR}/include/sc_version_string.h + COMMAND ${CMAKE_COMMAND} -DSOURCE_DIR=${SC_SOURCE_DIR} + -DBINARY_DIR=${SC_BINARY_DIR} + -P ${SC_BINARY_DIR}/sc_version_string.cmake) +# sc_version_string.h is a generated file +set_source_files_properties(${CMAKE_CURRENT_BINARY_DIR}/include/sc_version_string.h PROPERTIES GENERATED TRUE HEADER_FILE_ONLY TRUE ) ################ @@ -378,8 +378,8 @@ else() endif() include_directories( - ${SCL_SOURCE_DIR}/include - ${SCL_BINARY_DIR}/include + ${SC_SOURCE_DIR}/include + ${SC_BINARY_DIR}/include ) ADD_SUBDIRECTORY(src/base) @@ -396,29 +396,29 @@ if(NOT WIN32) endif(NOT WIN32) ADD_SUBDIRECTORY(include) ADD_SUBDIRECTORY(data) -IF(SCL_ENABLE_TESTING) +IF(SC_ENABLE_TESTING) ADD_SUBDIRECTORY( test ) -ENDIF(SCL_ENABLE_TESTING) +ENDIF(SC_ENABLE_TESTING) ADD_SUBDIRECTORY(doc) # this is for testing - 'make core' builds everything that isn't generated add_custom_target( core ) add_dependencies( core stepdai check-express stepeditor fedex_plus ) -if(NOT SCL_IS_SUBBUILD) +if(NOT SC_IS_SUBBUILD) ############################################################################### - # SCL Packaging # + # SC Packaging # # $make package # ############################################################################### SET(CPACK_PACKAGE_DESCRIPTION_SUMMARY "STEPcode") SET(CPACK_SET_DESTDIR "ON") - SET(CPACK_PACKAGE_VERSION_MAJOR ${SCL_VERSION_MAJOR}) - SET(CPACK_PACKAGE_VERSION_MINOR ${SCL_VERSION_MINOR}) - SET(CPACK_PACKAGE_NAME SCL ) + SET(CPACK_PACKAGE_VERSION_MAJOR ${SC_VERSION_MAJOR}) + SET(CPACK_PACKAGE_VERSION_MINOR ${SC_VERSION_MINOR}) + SET(CPACK_PACKAGE_NAME SC ) - SET(CPACK_PACKAGE_CONTACT "SCL Developers ") + SET(CPACK_PACKAGE_CONTACT "SC Developers ") INCLUDE(CPack) ######################################################################################## @@ -433,4 +433,4 @@ if(NOT SCL_IS_SUBBUILD) add_custom_target(uninstall COMMAND ${CMAKE_COMMAND} -P ${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake) -endif(NOT SCL_IS_SUBBUILD) +endif(NOT SC_IS_SUBBUILD) diff --git a/SCL_VERSION.txt b/SC_VERSION.txt similarity index 100% rename from SCL_VERSION.txt rename to SC_VERSION.txt diff --git a/cmake/SCL_Utils.cmake b/cmake/SC_Utils.cmake similarity index 81% rename from cmake/SCL_Utils.cmake rename to cmake/SC_Utils.cmake index 70202dfa..402116c1 100644 --- a/cmake/SCL_Utils.cmake +++ b/cmake/SC_Utils.cmake @@ -3,12 +3,12 @@ MACRO(DEFINE_DLL_EXPORTS libname) IF( MSVC OR BORLAND ) if( ${libname} MATCHES "sdai_.*" ) - set( export "SCL_SCHEMA_DLL_EXPORTS" ) + set( export "SC_SCHEMA_DLL_EXPORTS" ) else() STRING(REGEX REPLACE "lib" "" shortname "${libname}") STRING(REGEX REPLACE "step" "" LOWERCORE "${shortname}") STRING(TOUPPER ${LOWERCORE} UPPER_CORE) - set( export "SCL_${UPPER_CORE}_DLL_EXPORTS" ) + set( export "SC_${UPPER_CORE}_DLL_EXPORTS" ) endif() get_target_property(defs ${libname} COMPILE_DEFINITIONS ) if( defs ) #if no properties, ${defs} will be defs-NOTFOUND which CMake interprets as false @@ -31,7 +31,7 @@ MACRO( DEFINE_DLL_IMPORTS tgt libs ) STRING(REGEX REPLACE "lib" "" shortname "${lib}") STRING(REGEX REPLACE "step" "" LOWERCORE "${shortname}") STRING(TOUPPER ${LOWERCORE} UPPER_CORE) - list( APPEND defs "SCL_${UPPER_CORE}_DLL_IMPORTS" ) + list( APPEND defs "SC_${UPPER_CORE}_DLL_IMPORTS" ) endforeach( lib ${libs} ) if( DEFINED defs ) if( defs ) @@ -47,18 +47,18 @@ ENDMACRO( DEFINE_DLL_IMPORTS tgt libs ) # EXCLUDE_FROM_ALL cannot be set on targets that are to be installed, # so either test the target or install it - but not both MACRO(EXCLUDE_OR_INSTALL target dest arg_3 ) - if( NOT ( ( SCL_ENABLE_TESTING ) AND ( "${arg_3}" STREQUAL "TESTABLE" ) ) ) + if( NOT ( ( SC_ENABLE_TESTING ) AND ( "${arg_3}" STREQUAL "TESTABLE" ) ) ) INSTALL(TARGETS ${target} DESTINATION ${dest}) - else( NOT ( ( SCL_ENABLE_TESTING ) AND ( "${arg_3}" STREQUAL "TESTABLE" ) ) ) + else( NOT ( ( SC_ENABLE_TESTING ) AND ( "${arg_3}" STREQUAL "TESTABLE" ) ) ) set_target_properties( ${target} PROPERTIES EXCLUDE_FROM_ALL ON ) - endif( NOT ( ( SCL_ENABLE_TESTING ) AND ( "${arg_3}" STREQUAL "TESTABLE" ) ) ) + endif( NOT ( ( SC_ENABLE_TESTING ) AND ( "${arg_3}" STREQUAL "TESTABLE" ) ) ) ENDMACRO(EXCLUDE_OR_INSTALL target dest arg_3 ) -#SCL_ADDEXEC( execname "source files" "linked libs" ["TESTABLE"] ["MSVC flag" ...]) +#SC_ADDEXEC( execname "source files" "linked libs" ["TESTABLE"] ["MSVC flag" ...]) # optional 4th argument of "TESTABLE", passed to EXCLUDE_OR_INSTALL macro # optional args can also be used by MSVC-specific code, but it looks like these two uses # will not conflict because the MSVC args must contain "STRICT" -MACRO(SCL_ADDEXEC execname srcslist libslist) +MACRO(SC_ADDEXEC execname srcslist libslist) add_executable(${execname} ${srcslist}) target_link_libraries(${execname} ${libslist}) DEFINE_DLL_IMPORTS(${execname} "${libslist}") #add import definitions for all libs that the executable is linked to @@ -66,35 +66,35 @@ MACRO(SCL_ADDEXEC execname srcslist libslist) # Enable extra compiler flags if local executables and/or global options dictate SET(LOCAL_COMPILE_FLAGS "") FOREACH(extraarg ${ARGN}) - IF(${extraarg} MATCHES "STRICT" AND SCL-ENABLE_STRICT) + IF(${extraarg} MATCHES "STRICT" AND SC-ENABLE_STRICT) SET(LOCAL_COMPILE_FLAGS "${LOCAL_COMPILE_FLAGS} ${STRICT_FLAGS}") - ENDIF(${extraarg} MATCHES "STRICT" AND SCL-ENABLE_STRICT) + ENDIF(${extraarg} MATCHES "STRICT" AND SC-ENABLE_STRICT) ENDFOREACH(extraarg ${ARGN}) IF(LOCAL_COMPILE_FLAGS) SET_TARGET_PROPERTIES(${execname} PROPERTIES COMPILE_FLAGS ${LOCAL_COMPILE_FLAGS}) ENDIF(LOCAL_COMPILE_FLAGS) -ENDMACRO(SCL_ADDEXEC execname srcslist libslist) +ENDMACRO(SC_ADDEXEC execname srcslist libslist) -#SCL_ADDLIB( libname "source files" "linked libs" ["TESTABLE"] ["MSVC flag" ...]) +#SC_ADDLIB( libname "source files" "linked libs" ["TESTABLE"] ["MSVC flag" ...]) # optional 4th argument of "TESTABLE", passed to EXCLUDE_OR_INSTALL macro # optional args can also be used by MSVC-specific code, but it looks like these two uses # will not conflict because the MSVC args must contain "STRICT" -MACRO(SCL_ADDLIB libname srcslist libslist) +MACRO(SC_ADDLIB libname srcslist libslist) STRING(REGEX REPLACE "-framework;" "-framework " libslist "${libslist1}") - IF(SCL_BUILD_SHARED_LIBS) + IF(SC_BUILD_SHARED_LIBS) add_library(${libname} SHARED ${srcslist}) DEFINE_DLL_EXPORTS(${libname}) if(NOT "${libs}" MATCHES "NONE") target_link_libraries(${libname} ${libslist}) DEFINE_DLL_IMPORTS(${libname} "${libslist}" ) endif(NOT "${libs}" MATCHES "NONE") - SET_TARGET_PROPERTIES(${libname} PROPERTIES VERSION ${SCL_ABI_VERSION} SOVERSION ${SCL_ABI_SOVERSION} ) + SET_TARGET_PROPERTIES(${libname} PROPERTIES VERSION ${SC_ABI_VERSION} SOVERSION ${SC_ABI_SOVERSION} ) EXCLUDE_OR_INSTALL( ${libname} "lib" "${ARGV3}" ) if(APPLE) set_target_properties(${libname} PROPERTIES LINK_FLAGS "-flat_namespace -undefined suppress") endif(APPLE) - ENDIF(SCL_BUILD_SHARED_LIBS) - IF(SCL_BUILD_STATIC_LIBS AND NOT MSVC) + ENDIF(SC_BUILD_SHARED_LIBS) + IF(SC_BUILD_STATIC_LIBS AND NOT MSVC) add_library(${libname}-static STATIC ${srcslist}) DEFINE_DLL_EXPORTS(${libname}-static) if(NOT ${libs} MATCHES "NONE") @@ -114,13 +114,13 @@ MACRO(SCL_ADDLIB libname srcslist libslist) if(APPLE) set_target_properties(${libname}-static PROPERTIES LINK_FLAGS "-flat_namespace -undefined suppress") endif(APPLE) - ENDIF(SCL_BUILD_STATIC_LIBS AND NOT MSVC) + ENDIF(SC_BUILD_STATIC_LIBS AND NOT MSVC) # Enable extra compiler flags if local libraries and/or global options dictate SET(LOCAL_COMPILE_FLAGS "") FOREACH(extraarg ${ARGN}) - IF(${extraarg} MATCHES "STRICT" AND SCL-ENABLE_STRICT) + IF(${extraarg} MATCHES "STRICT" AND SC-ENABLE_STRICT) SET(LOCAL_COMPILE_FLAGS "${LOCAL_COMPILE_FLAGS} ${STRICT_FLAGS}") - ENDIF(${extraarg} MATCHES "STRICT" AND SCL-ENABLE_STRICT) + ENDIF(${extraarg} MATCHES "STRICT" AND SC-ENABLE_STRICT) ENDFOREACH(extraarg ${ARGN}) IF(LOCAL_COMPILE_FLAGS) IF(BUILD_SHARED_LIBS) @@ -130,4 +130,4 @@ MACRO(SCL_ADDLIB libname srcslist libslist) SET_TARGET_PROPERTIES(${libname}-static PROPERTIES COMPILE_FLAGS ${LOCAL_COMPILE_FLAGS}) ENDIF(BUILD_STATIC_LIBS AND NOT MSVC) ENDIF(LOCAL_COMPILE_FLAGS) -ENDMACRO(SCL_ADDLIB libname srcslist libslist) +ENDMACRO(SC_ADDLIB libname srcslist libslist) diff --git a/cmake/scl_version_string.cmake b/cmake/sc_version_string.cmake similarity index 68% rename from cmake/scl_version_string.cmake rename to cmake/sc_version_string.cmake index 847e751b..f2687dd4 100644 --- a/cmake/scl_version_string.cmake +++ b/cmake/sc_version_string.cmake @@ -5,54 +5,54 @@ # http://stackoverflow.com/questions/3780667 # http://www.cmake.org/pipermail/cmake/2009-February/027014.html -#scl_version_string.h defines scl_version() which returns a pretty commit description and a build timestamp. +#sc_version_string.h defines sc_version() which returns a pretty commit description and a build timestamp. -set(SCL_IS_SUBBUILD "@SCL_IS_SUBBUILD@") +set(SC_IS_SUBBUILD "@SC_IS_SUBBUILD@") -set(VERS_FILE ${SOURCE_DIR}/SCL_VERSION.txt ) +set(VERS_FILE ${SOURCE_DIR}/SC_VERSION.txt ) if( EXISTS ${SOURCE_DIR}/.git ) find_package(Git QUIET) if(GIT_FOUND) execute_process(COMMAND ${GIT_EXECUTABLE} describe --tags RESULT_VARIABLE res_var OUTPUT_VARIABLE GIT_COMMIT_ID ) if( NOT ${res_var} EQUAL 0 ) file( READ ${VERS_FILE} GIT_COMMIT_ID LIMIT 255 ) - if(NOT SCL_IS_SUBBUILD) + if(NOT SC_IS_SUBBUILD) message( WARNING "Git failed (probably no tags in repo). Build will contain revision info from ${VERS_FILE}." ) - endif(NOT SCL_IS_SUBBUILD) + endif(NOT SC_IS_SUBBUILD) endif() else(GIT_FOUND) file( READ ${VERS_FILE} GIT_COMMIT_ID LIMIT 255 ) - if(NOT SCL_IS_SUBBUILD) + if(NOT SC_IS_SUBBUILD) message( WARNING "Git not found. Build will contain revision info from ${VERS_FILE}." ) - endif(NOT SCL_IS_SUBBUILD) + endif(NOT SC_IS_SUBBUILD) endif(GIT_FOUND) else() file( READ ${VERS_FILE} GIT_COMMIT_ID LIMIT 255 ) - if(NOT SCL_IS_SUBBUILD) + if(NOT SC_IS_SUBBUILD) message( WARNING "Git failed ('.git' not found). Build will contain revision info from ${VERS_FILE}." ) - endif(NOT SCL_IS_SUBBUILD) + endif(NOT SC_IS_SUBBUILD) endif() string( REPLACE "\n" "" GIT_COMMIT_ID ${GIT_COMMIT_ID} ) -set( vstring "//scl_version_string.h - written by cmake. Changes will be lost!\n" - "#ifndef SCL_VERSION_STRING\n" - "#define SCL_VERSION_STRING\n\n" +set( vstring "//sc_version_string.h - written by cmake. Changes will be lost!\n" + "#ifndef SC_VERSION_STRING\n" + "#define SC_VERSION_STRING\n\n" "/*\n** Returns a string like \"test-1-g5e1fb47, built at TIME on DATE\", where test is the\n" "** name of the last tagged git revision, 1 is the number of commits since that tag,\n" "** 'g' is unknown, 5e1fb47 is the first 7 chars of the git sha1 commit id, and TIME\n" "** and DATE are substituted by the compiler.\n*/\n\n" - "const char* scl_version() {\n" + "const char* sc_version() {\n" " return \"git commit id ${GIT_COMMIT_ID}, built at \" __TIME__ \" on \" __DATE__ \;\n" "}\n\n" "#endif\n" ) -file(WRITE scl_version_string.h.txt ${vstring} ) +file(WRITE sc_version_string.h.txt ${vstring} ) # copy the file to the final header only if the version changes # reduces needless rebuilds execute_process(COMMAND ${CMAKE_COMMAND} -E copy_if_different - scl_version_string.h.txt ${BINARY_DIR}/include/scl_version_string.h) -if(NOT SCL_IS_SUBBUILD) - message("-- scl_version_string.h is up-to-date.") -endif(NOT SCL_IS_SUBBUILD) + sc_version_string.h.txt ${BINARY_DIR}/include/sc_version_string.h) +if(NOT SC_IS_SUBBUILD) + message("-- sc_version_string.h is up-to-date.") +endif(NOT SC_IS_SUBBUILD) diff --git a/ctest_matrix.cmake b/ctest_matrix.cmake index 5c90d2cf..8cd27e7c 100644 --- a/ctest_matrix.cmake +++ b/ctest_matrix.cmake @@ -8,14 +8,14 @@ set( CTEST_MEMORYCHECK_COMMAND /usr/bin/valgrind ) set( CTEST_INITIAL_CACHE " SITE:STRING=${CTEST_SITE} BUILDNAME:STRING=${CTEST_BUILD_NAME} -SCL_ENABLE_TESTING:BOOL=ON -SCL_BUILD_TYPE:STRING=Debug +SC_ENABLE_TESTING:BOOL=ON +SC_BUILD_TYPE:STRING=Debug ") ctest_start(matrix) ctest_empty_binary_directory(${CTEST_BINARY_DIRECTORY}) -ctest_configure( BUILD "${CTEST_BINARY_DIRECTORY}" OPTIONS -DSCL_ENABLE_TESTING=ON ) +ctest_configure( BUILD "${CTEST_BINARY_DIRECTORY}" OPTIONS -DSC_ENABLE_TESTING=ON ) ctest_build( BUILD "${CTEST_BINARY_DIRECTORY}" ) message("running tests") ctest_test( BUILD "${CTEST_BINARY_DIRECTORY}" INCLUDE_LABEL "cpp_schema_....*" ) diff --git a/data/CMakeLists.txt b/data/CMakeLists.txt index 030c7f89..d8a869fd 100644 --- a/data/CMakeLists.txt +++ b/data/CMakeLists.txt @@ -1,5 +1,5 @@ # To build one or more schemas, configure with -# 'cmake -DSCL_BUILD_SCHEMAS="path/to/schema.exp;path/to/schema2.exp" +# 'cmake -DSC_BUILD_SCHEMAS="path/to/schema.exp;path/to/schema2.exp" # This function runs fedex on one express file. The generated source goes in a dir # in the build dir, and it is compiled into a library. A p21read executable is @@ -7,10 +7,10 @@ FUNCTION(BUILD_A_SCHEMA SCHEMA_FILE) if( EXISTS "${CMAKE_BINARY_DIR}/${SCHEMA_FILE}" ) #is it a path relative to build dir? set( SCHEMA_FILE "${CMAKE_BINARY_DIR}/${SCHEMA_FILE}" ) - elseif( EXISTS "${SCL_SOURCE_DIR}/data/${SCHEMA_FILE}" ) # path relative to STEPcode/data? - set( SCHEMA_FILE "${SCL_SOURCE_DIR}/data/${SCHEMA_FILE}" ) + elseif( EXISTS "${SC_SOURCE_DIR}/data/${SCHEMA_FILE}" ) # path relative to STEPcode/data? + set( SCHEMA_FILE "${SC_SOURCE_DIR}/data/${SCHEMA_FILE}" ) elseif( NOT EXISTS ${SCHEMA_FILE} ) # absolute path - message( FATAL_ERROR "Cannot find ${CMAKE_BINARY_DIR}/${SCHEMA_FILE} or ${SCL_SOURCE_DIR}/data/${SCHEMA_FILE} or ${SCHEMA_FILE}" ) + message( FATAL_ERROR "Cannot find ${CMAKE_BINARY_DIR}/${SCHEMA_FILE} or ${SC_SOURCE_DIR}/data/${SCHEMA_FILE} or ${SCHEMA_FILE}" ) endif() if( IS_DIRECTORY ${SCHEMA_FILE} ) #if it is a dir, look for one .exp file inside @@ -42,7 +42,7 @@ FUNCTION(BUILD_A_SCHEMA SCHEMA_FILE) # multiple schemas, each one will use the include dirs from all previous schemas. Since # one header (schema.h) is always named the same, this will not work. only workaround # seems to be set_target_properties( PROPERTIES COMPILE_FLAGS ) - set( ${PROJECT_NAME}_COMPILE_FLAGS "-I${CMAKE_CURRENT_SOURCE_DIR} -I${SCL_SOURCE_DIR}/src/cldai -I${SCL_SOURCE_DIR}/src/cleditor -I${SCL_SOURCE_DIR}/src/clutils -I${SCHEMA_OUTPUT_DIR} -I${SCL_SOURCE_DIR}/src/clstepcore -I${SCL_SOURCE_DIR}/src/base" ) + set( ${PROJECT_NAME}_COMPILE_FLAGS "-I${CMAKE_CURRENT_SOURCE_DIR} -I${SC_SOURCE_DIR}/src/cldai -I${SC_SOURCE_DIR}/src/cleditor -I${SC_SOURCE_DIR}/src/clutils -I${SCHEMA_OUTPUT_DIR} -I${SC_SOURCE_DIR}/src/clstepcore -I${SC_SOURCE_DIR}/src/base" ) add_custom_target( generate_cpp_${SCHEMA_SHORT_NAME} SOURCES ${FEDEX_OUT} ) add_custom_command( OUTPUT ${SCHEMA_OUTPUT_DIR} @@ -55,22 +55,22 @@ FUNCTION(BUILD_A_SCHEMA SCHEMA_FILE) COMMENT "Running fedex_plus for ${SCHEMA_SHORT_NAME}..." VERBATIM ) - if( SCL_ENABLE_COVERAGE AND NOT SC_COVER_SCHEMAS ) + if( SC_ENABLE_COVERAGE AND NOT SC_COVER_SCHEMAS ) # Coverage will always be sparse on schema libs. Compiling the libs with the -fprofile-arcs and # -ftest-coverage is extremely slow. We can avoid that by temporarily changing build type to release. set( PREV_BUILD_TYPE ${CMAKE_BUILD_TYPE} ) set( CMAKE_BUILD_TYPE "Release" ) - endif( SCL_ENABLE_COVERAGE AND NOT SC_COVER_SCHEMAS ) + endif( SC_ENABLE_COVERAGE AND NOT SC_COVER_SCHEMAS ) # if testing is enabled, "TESTABLE" sets property EXCLUDE_FROM_ALL and prevents installation - SCL_ADDLIB( ${PROJECT_NAME} "${FEDEX_OUT}" "stepdai;stepcore;express;stepeditor;steputils;base" "TESTABLE" ) + SC_ADDLIB( ${PROJECT_NAME} "${FEDEX_OUT}" "stepdai;stepcore;express;stepeditor;steputils;base" "TESTABLE" ) add_dependencies( ${PROJECT_NAME} generate_cpp_${SCHEMA_SHORT_NAME} ) set_target_properties( ${PROJECT_NAME} PROPERTIES COMPILE_FLAGS ${${PROJECT_NAME}_COMPILE_FLAGS} ) - if( SCL_ENABLE_COVERAGE AND NOT SC_COVER_SCHEMAS ) + if( SC_ENABLE_COVERAGE AND NOT SC_COVER_SCHEMAS ) set( CMAKE_BUILD_TYPE ${PREV_BUILD_TYPE} ) - endif( SCL_ENABLE_COVERAGE AND NOT SC_COVER_SCHEMAS ) + endif( SC_ENABLE_COVERAGE AND NOT SC_COVER_SCHEMAS ) add_test( NAME generate_cpp_${SCHEMA_SHORT_NAME} WORKING_DIRECTORY ${CMAKE_BINARY_DIR} @@ -96,10 +96,10 @@ FUNCTION(BUILD_A_SCHEMA SCHEMA_FILE) set_tests_properties( build_lazy_cpp_${PROJECT_NAME} build_cpp_${PROJECT_NAME} PROPERTIES DEPENDS generate_cpp_${SCHEMA_SHORT_NAME} LABELS cpp_schema_build ) endif(NOT WIN32) - SCL_ADDEXEC( p21read_${PROJECT_NAME} "${SCL_SOURCE_DIR}/src/test/p21read/p21read.cc" "${PROJECT_NAME};base" "TESTABLE" ) - if(NOT WIN32) - SCL_ADDEXEC( lazy_${PROJECT_NAME} "${SCL_SOURCE_DIR}/src/cllazyfile/lazy_test.cc" "${PROJECT_NAME};steplazyfile;stepeditor" "TESTABLE" ) - endif(NOT WIN32) + SC_ADDEXEC( p21read_${PROJECT_NAME} "${SC_SOURCE_DIR}/src/test/p21read/p21read.cc" "${PROJECT_NAME};base" "TESTABLE" ) + if(NOT WIN32) + SC_ADDEXEC( lazy_${PROJECT_NAME} "${SC_SOURCE_DIR}/src/cllazyfile/lazy_test.cc" "${PROJECT_NAME};steplazyfile;stepeditor" "TESTABLE" ) + endif(NOT WIN32) add_dependencies( p21read_${PROJECT_NAME} version_string ) if(NOT WIN32) add_dependencies( lazy_${PROJECT_NAME} version_string ) @@ -107,7 +107,7 @@ FUNCTION(BUILD_A_SCHEMA SCHEMA_FILE) set_target_properties( p21read_${PROJECT_NAME} PROPERTIES COMPILE_FLAGS ${${PROJECT_NAME}_COMPILE_FLAGS} ) if(NOT WIN32) - set_target_properties( lazy_${PROJECT_NAME} PROPERTIES COMPILE_FLAGS "${${PROJECT_NAME}_COMPILE_FLAGS} -I${SCL_SOURCE_DIR}/src/base/judy/src" ) + set_target_properties( lazy_${PROJECT_NAME} PROPERTIES COMPILE_FLAGS "${${PROJECT_NAME}_COMPILE_FLAGS} -I${SC_SOURCE_DIR}/src/base/judy/src" ) endif(NOT WIN32) @@ -115,7 +115,7 @@ FUNCTION(BUILD_A_SCHEMA SCHEMA_FILE) foreach( src ${SC_SDAI_ADDITIONAL_EXES_SRCS} ) get_filename_component( name ${src} NAME_WE ) get_filename_component( path ${src} ABSOLUTE ) - SCL_ADDEXEC( ${name}_${PROJECT_NAME} "${src}" "${PROJECT_NAME};base" "TESTABLE" ) + SC_ADDEXEC( ${name}_${PROJECT_NAME} "${src}" "${PROJECT_NAME};base" "TESTABLE" ) add_dependencies( ${name}_${PROJECT_NAME} version_string ) set_target_properties( ${name}_${PROJECT_NAME} PROPERTIES COMPILE_FLAGS "${${PROJECT_NAME}_COMPILE_FLAGS} -I${path}" ) @@ -142,16 +142,16 @@ ENDFUNCTION(BUILD_A_SCHEMA) #---------------------------------------------------------------------------------------------------- -if( DEFINED SCL_BUILD_SCHEMAS ) +if( DEFINED SC_BUILD_SCHEMAS ) foreach( src ${SC_SDAI_ADDITIONAL_EXES_SRCS} ) get_filename_component( name ${src} NAME_WE ) message( STATUS "Additional SDAI executable: ${name}" ) endforeach( src ${SC_SDAI_ADDITIONAL_EXES_SRCS} ) - if( SCL_BUILD_SCHEMAS STREQUAL "ALL" ) - file( GLOB_RECURSE SCL_BUILD_SCHEMAS ${SCL_SOURCE_DIR}/data/*.exp ) + if( SC_BUILD_SCHEMAS STREQUAL "ALL" ) + file( GLOB_RECURSE SC_BUILD_SCHEMAS ${SC_SOURCE_DIR}/data/*.exp ) endif() - foreach( ap ${SCL_BUILD_SCHEMAS} ) + foreach( ap ${SC_BUILD_SCHEMAS} ) BUILD_A_SCHEMA( ${ap} ) endforeach() endif() diff --git a/doc/CMakeLists.txt b/doc/CMakeLists.txt index b8148b1d..c69eaf91 100644 --- a/doc/CMakeLists.txt +++ b/doc/CMakeLists.txt @@ -1,4 +1,4 @@ -SET(scl_MANS +SET(sc_MANS man/man1/dataprobe.1 man/man1/fedex.1 man/man1/fedex_plus.1 @@ -10,5 +10,5 @@ if(NOT DEFINED MAN_DIR) endif(NOT DEFINED MAN_DIR) IF(NOT WIN32) - INSTALL(FILES ${scl_MANS} DESTINATION ${MAN_DIR}/man1) + INSTALL(FILES ${sc_MANS} DESTINATION ${MAN_DIR}/man1) ENDIF(NOT WIN32) diff --git a/include/exppp/exppp.h b/include/exppp/exppp.h index bf627d5d..cabd7fdd 100644 --- a/include/exppp/exppp.h +++ b/include/exppp/exppp.h @@ -1,66 +1,66 @@ #ifndef EXPPP_H #define EXPPP_H -#include +#include -extern SCL_EXPPP_EXPORT int exppp_nesting_indent; /* default nesting indent */ -extern SCL_EXPPP_EXPORT int exppp_continuation_indent; /* default nesting indent for */ +extern SC_EXPPP_EXPORT int exppp_nesting_indent; /* default nesting indent */ +extern SC_EXPPP_EXPORT int exppp_continuation_indent; /* default nesting indent for */ /* continuation lines */ -extern SCL_EXPPP_EXPORT int exppp_linelength; /* leave some slop for closing */ +extern SC_EXPPP_EXPORT int exppp_linelength; /* leave some slop for closing */ /* parens. \n is not included in */ /* this count either */ -extern SCL_EXPPP_EXPORT bool exppp_rmpp; /* if true, create rmpp */ -extern SCL_EXPPP_EXPORT bool exppp_alphabetize; /* if true, alphabetize */ -extern SCL_EXPPP_EXPORT bool exppp_terse; /* don't describe action to stdout */ -extern SCL_EXPPP_EXPORT bool exppp_reference_info; /* if true, add commentary */ +extern SC_EXPPP_EXPORT bool exppp_rmpp; /* if true, create rmpp */ +extern SC_EXPPP_EXPORT bool exppp_alphabetize; /* if true, alphabetize */ +extern SC_EXPPP_EXPORT bool exppp_terse; /* don't describe action to stdout */ +extern SC_EXPPP_EXPORT bool exppp_reference_info; /* if true, add commentary */ /* about where things came from */ -extern SCL_EXPPP_EXPORT bool exppp_preserve_comments; /* if true, preserve comments where */ +extern SC_EXPPP_EXPORT bool exppp_preserve_comments; /* if true, preserve comments where */ /* possible */ -extern SCL_EXPPP_EXPORT char * exppp_output_filename; /* force output filename */ -extern SCL_EXPPP_EXPORT bool exppp_output_filename_reset; /* if true, force output filename */ +extern SC_EXPPP_EXPORT char * exppp_output_filename; /* force output filename */ +extern SC_EXPPP_EXPORT bool exppp_output_filename_reset; /* if true, force output filename */ -SCL_EXPPP_EXPORT void EXPRESSout( Express e ); +SC_EXPPP_EXPORT void EXPRESSout( Express e ); -SCL_EXPPP_EXPORT void ENTITYout( Entity e ); -SCL_EXPPP_EXPORT void EXPRout( Expression expr ); -SCL_EXPPP_EXPORT void FUNCout( Function f ); -SCL_EXPPP_EXPORT void PROCout( Procedure p ); -SCL_EXPPP_EXPORT void RULEout( Rule r ); -SCL_EXPPP_EXPORT char * SCHEMAout( Schema s ); -SCL_EXPPP_EXPORT void SCHEMAref_out( Schema s ); -SCL_EXPPP_EXPORT void STMTout( Statement s ); -SCL_EXPPP_EXPORT void TYPEout( Type t ); -SCL_EXPPP_EXPORT void TYPEhead_out( Type t ); -SCL_EXPPP_EXPORT void TYPEbody_out( Type t ); -SCL_EXPPP_EXPORT void WHEREout( Linked_List w ); +SC_EXPPP_EXPORT void ENTITYout( Entity e ); +SC_EXPPP_EXPORT void EXPRout( Expression expr ); +SC_EXPPP_EXPORT void FUNCout( Function f ); +SC_EXPPP_EXPORT void PROCout( Procedure p ); +SC_EXPPP_EXPORT void RULEout( Rule r ); +SC_EXPPP_EXPORT char * SCHEMAout( Schema s ); +SC_EXPPP_EXPORT void SCHEMAref_out( Schema s ); +SC_EXPPP_EXPORT void STMTout( Statement s ); +SC_EXPPP_EXPORT void TYPEout( Type t ); +SC_EXPPP_EXPORT void TYPEhead_out( Type t ); +SC_EXPPP_EXPORT void TYPEbody_out( Type t ); +SC_EXPPP_EXPORT void WHEREout( Linked_List w ); -SCL_EXPPP_EXPORT char * REFto_string( Dictionary refdict, Linked_List reflist, char * type, int level ); -SCL_EXPPP_EXPORT char * ENTITYto_string( Entity e ); -SCL_EXPPP_EXPORT char * SUBTYPEto_string( Expression e ); -SCL_EXPPP_EXPORT char * EXPRto_string( Expression expr ); -SCL_EXPPP_EXPORT char * FUNCto_string( Function f ); -SCL_EXPPP_EXPORT char * PROCto_string( Procedure p ); -SCL_EXPPP_EXPORT char * RULEto_string( Rule r ); -SCL_EXPPP_EXPORT char * SCHEMAref_to_string( Schema s ); -SCL_EXPPP_EXPORT char * STMTto_string( Statement s ); -SCL_EXPPP_EXPORT char * TYPEto_string( Type t ); -SCL_EXPPP_EXPORT char * TYPEhead_to_string( Type t ); -SCL_EXPPP_EXPORT char * TYPEbody_to_string( Type t ); -SCL_EXPPP_EXPORT char * WHEREto_string( Linked_List w ); +SC_EXPPP_EXPORT char * REFto_string( Dictionary refdict, Linked_List reflist, char * type, int level ); +SC_EXPPP_EXPORT char * ENTITYto_string( Entity e ); +SC_EXPPP_EXPORT char * SUBTYPEto_string( Expression e ); +SC_EXPPP_EXPORT char * EXPRto_string( Expression expr ); +SC_EXPPP_EXPORT char * FUNCto_string( Function f ); +SC_EXPPP_EXPORT char * PROCto_string( Procedure p ); +SC_EXPPP_EXPORT char * RULEto_string( Rule r ); +SC_EXPPP_EXPORT char * SCHEMAref_to_string( Schema s ); +SC_EXPPP_EXPORT char * STMTto_string( Statement s ); +SC_EXPPP_EXPORT char * TYPEto_string( Type t ); +SC_EXPPP_EXPORT char * TYPEhead_to_string( Type t ); +SC_EXPPP_EXPORT char * TYPEbody_to_string( Type t ); +SC_EXPPP_EXPORT char * WHEREto_string( Linked_List w ); -SCL_EXPPP_EXPORT int REFto_buffer( Dictionary refdict, Linked_List reflist, char * type, int level, char * buffer, int length ); -SCL_EXPPP_EXPORT int ENTITYto_buffer( Entity e, char * buffer, int length ); -SCL_EXPPP_EXPORT int EXPRto_buffer( Expression e, char * buffer, int length ); -SCL_EXPPP_EXPORT int FUNCto_buffer( Function e, char * buffer, int length ); -SCL_EXPPP_EXPORT int PROCto_buffer( Procedure e, char * buffer, int length ); -SCL_EXPPP_EXPORT int RULEto_buffer( Rule e, char * buffer, int length ); -SCL_EXPPP_EXPORT int SCHEMAref_to_buffer( Schema s, char * buffer, int length ); -SCL_EXPPP_EXPORT int STMTto_buffer( Statement s, char * buffer, int length ); -SCL_EXPPP_EXPORT int TYPEto_buffer( Type t, char * buffer, int length ); -SCL_EXPPP_EXPORT int TYPEhead_to_buffer( Type t, char * buffer, int length ); -SCL_EXPPP_EXPORT int TYPEbody_to_buffer( Type t, char * buffer, int length ); -SCL_EXPPP_EXPORT int WHEREto_buffer( Linked_List w, char * buffer, int length ); +SC_EXPPP_EXPORT int REFto_buffer( Dictionary refdict, Linked_List reflist, char * type, int level, char * buffer, int length ); +SC_EXPPP_EXPORT int ENTITYto_buffer( Entity e, char * buffer, int length ); +SC_EXPPP_EXPORT int EXPRto_buffer( Expression e, char * buffer, int length ); +SC_EXPPP_EXPORT int FUNCto_buffer( Function e, char * buffer, int length ); +SC_EXPPP_EXPORT int PROCto_buffer( Procedure e, char * buffer, int length ); +SC_EXPPP_EXPORT int RULEto_buffer( Rule e, char * buffer, int length ); +SC_EXPPP_EXPORT int SCHEMAref_to_buffer( Schema s, char * buffer, int length ); +SC_EXPPP_EXPORT int STMTto_buffer( Statement s, char * buffer, int length ); +SC_EXPPP_EXPORT int TYPEto_buffer( Type t, char * buffer, int length ); +SC_EXPPP_EXPORT int TYPEhead_to_buffer( Type t, char * buffer, int length ); +SC_EXPPP_EXPORT int TYPEbody_to_buffer( Type t, char * buffer, int length ); +SC_EXPPP_EXPORT int WHEREto_buffer( Linked_List w, char * buffer, int length ); -SCL_EXPPP_EXPORT int EXPRlength( Expression e ); -SCL_EXPPP_EXPORT int count_newlines( char * s ); +SC_EXPPP_EXPORT int EXPRlength( Expression e ); +SC_EXPPP_EXPORT int count_newlines( char * s ); #endif diff --git a/include/express/alg.h b/include/express/alg.h index a7342a81..3ca3a38a 100644 --- a/include/express/alg.h +++ b/include/express/alg.h @@ -109,11 +109,11 @@ struct Where_ { /* global variables */ /********************/ -extern SCL_EXPRESS_EXPORT struct freelist_head ALG_fl; -extern SCL_EXPRESS_EXPORT struct freelist_head FUNC_fl; -extern SCL_EXPRESS_EXPORT struct freelist_head RULE_fl; -extern SCL_EXPRESS_EXPORT struct freelist_head PROC_fl; -extern SCL_EXPRESS_EXPORT struct freelist_head WHERE_fl; +extern SC_EXPRESS_EXPORT struct freelist_head ALG_fl; +extern SC_EXPRESS_EXPORT struct freelist_head FUNC_fl; +extern SC_EXPRESS_EXPORT struct freelist_head RULE_fl; +extern SC_EXPRESS_EXPORT struct freelist_head PROC_fl; +extern SC_EXPRESS_EXPORT struct freelist_head WHERE_fl; /******************************/ /* macro function definitions */ @@ -161,8 +161,8 @@ extern SCL_EXPRESS_EXPORT struct freelist_head WHERE_fl; /* function prototypes */ /***********************/ -extern SCL_EXPRESS_EXPORT Scope ALGcreate PROTO( ( char ) ); -extern SCL_EXPRESS_EXPORT void ALGinitialize PROTO( ( void ) ); -extern SCL_EXPRESS_EXPORT void ALGput_full_text PROTO( ( Scope, int, int ) ); +extern SC_EXPRESS_EXPORT Scope ALGcreate PROTO( ( char ) ); +extern SC_EXPRESS_EXPORT void ALGinitialize PROTO( ( void ) ); +extern SC_EXPRESS_EXPORT void ALGput_full_text PROTO( ( Scope, int, int ) ); #endif /* ALGORITHM_H */ diff --git a/include/express/basic.h b/include/express/basic.h index c6229df7..349e653b 100644 --- a/include/express/basic.h +++ b/include/express/basic.h @@ -71,8 +71,8 @@ * */ -#include -#include +#include +#include #include /******************************/ @@ -82,7 +82,7 @@ #ifdef HAVE_STDBOOL_H # include #else -# include +# include #endif /************************/ diff --git a/include/express/caseitem.h b/include/express/caseitem.h index 2d9e8538..d3b8fb46 100644 --- a/include/express/caseitem.h +++ b/include/express/caseitem.h @@ -70,7 +70,7 @@ struct Case_Item_ { /* global variables */ /********************/ -extern SCL_EXPRESS_EXPORT struct freelist_head CASE_IT_fl; +extern SC_EXPRESS_EXPORT struct freelist_head CASE_IT_fl; /******************************/ /* macro function definitions */ @@ -86,7 +86,7 @@ extern SCL_EXPRESS_EXPORT struct freelist_head CASE_IT_fl; #define CASE_IT_new() (struct Case_Item_ *)MEM_new(&CASE_IT_fl) #define CASE_IT_destroy(x) MEM_destroy(&CASE_IT_fl,(Freelist *)(Generic)x) -extern SCL_EXPRESS_EXPORT Case_Item CASE_ITcreate PROTO( ( Linked_List, struct Statement_ * ) ); -extern SCL_EXPRESS_EXPORT void CASE_ITinitialize PROTO( ( void ) ); +extern SC_EXPRESS_EXPORT Case_Item CASE_ITcreate PROTO( ( Linked_List, struct Statement_ * ) ); +extern SC_EXPRESS_EXPORT void CASE_ITinitialize PROTO( ( void ) ); #endif /*CASE_ITEM_H*/ diff --git a/include/express/dict.h b/include/express/dict.h index 46425ec6..b4670945 100644 --- a/include/express/dict.h +++ b/include/express/dict.h @@ -72,7 +72,7 @@ typedef HashEntry DictionaryEntry; /* global variables */ /********************/ -extern SCL_EXPRESS_EXPORT char DICT_type; /**< set as a side-effect of DICT lookup routines to type of object found */ +extern SC_EXPRESS_EXPORT char DICT_type; /**< set as a side-effect of DICT lookup routines to type of object found */ /*******************************/ /* macro function definitions */ @@ -97,14 +97,14 @@ extern SCL_EXPRESS_EXPORT char DICT_type; /**< set as a side-effect of DICT loo /* function prototypes */ /***********************/ -extern SCL_EXPRESS_EXPORT void DICTinitialize PROTO( ( void ) ); -extern SCL_EXPRESS_EXPORT void DICTcleanup PROTO( ( void ) ); -extern SCL_EXPRESS_EXPORT int DICTdefine PROTO( ( Dictionary, char *, Generic, Symbol *, char ) ); -extern SCL_EXPRESS_EXPORT int DICT_define PROTO( ( Dictionary, char *, Generic, Symbol *, char ) ); -extern SCL_EXPRESS_EXPORT void DICTundefine PROTO( ( Dictionary, char * ) ); -extern SCL_EXPRESS_EXPORT Generic DICTlookup PROTO( ( Dictionary, char * ) ); -extern SCL_EXPRESS_EXPORT Generic DICTlookup_symbol PROTO( ( Dictionary, char *, Symbol ** ) ); -extern SCL_EXPRESS_EXPORT Generic DICTdo PROTO( ( DictionaryEntry * ) ); -extern SCL_EXPRESS_EXPORT void DICTprint PROTO( ( Dictionary ) ); +extern SC_EXPRESS_EXPORT void DICTinitialize PROTO( ( void ) ); +extern SC_EXPRESS_EXPORT void DICTcleanup PROTO( ( void ) ); +extern SC_EXPRESS_EXPORT int DICTdefine PROTO( ( Dictionary, char *, Generic, Symbol *, char ) ); +extern SC_EXPRESS_EXPORT int DICT_define PROTO( ( Dictionary, char *, Generic, Symbol *, char ) ); +extern SC_EXPRESS_EXPORT void DICTundefine PROTO( ( Dictionary, char * ) ); +extern SC_EXPRESS_EXPORT Generic DICTlookup PROTO( ( Dictionary, char * ) ); +extern SC_EXPRESS_EXPORT Generic DICTlookup_symbol PROTO( ( Dictionary, char *, Symbol ** ) ); +extern SC_EXPRESS_EXPORT Generic DICTdo PROTO( ( DictionaryEntry * ) ); +extern SC_EXPRESS_EXPORT void DICTprint PROTO( ( Dictionary ) ); #endif /*DICTIONARY_H*/ diff --git a/include/express/entity.h b/include/express/entity.h index 949be551..8a0ab891 100644 --- a/include/express/entity.h +++ b/include/express/entity.h @@ -60,7 +60,7 @@ /* packages used */ /*****************/ -#include +#include #include "expbasic.h" /* get basic definitions */ #include "symbol.h" #include "scope.h" @@ -102,8 +102,8 @@ struct Entity_ { /* global variables */ /********************/ -extern SCL_EXPRESS_EXPORT struct freelist_head ENTITY_fl; -extern SCL_EXPRESS_EXPORT int ENTITY_MARK; +extern SC_EXPRESS_EXPORT struct freelist_head ENTITY_fl; +extern SC_EXPRESS_EXPORT int ENTITY_MARK; /******************************/ /* macro function definitions */ @@ -140,19 +140,19 @@ extern SCL_EXPRESS_EXPORT int ENTITY_MARK; /* function prototypes */ /***********************/ -extern SCL_EXPRESS_EXPORT struct Scope_ * ENTITYcreate PROTO( ( struct Symbol_ * ) ); -extern SCL_EXPRESS_EXPORT void ENTITYinitialize PROTO( ( void ) ); -extern SCL_EXPRESS_EXPORT void ENTITYadd_attribute PROTO( ( struct Scope_ *, struct Variable_ * ) ); -extern SCL_EXPRESS_EXPORT struct Scope_ * ENTITYcopy PROTO( ( struct Scope_ * ) ); -extern SCL_EXPRESS_EXPORT Entity ENTITYfind_inherited_entity PROTO( ( struct Scope_ *, char *, int ) ); -extern SCL_EXPRESS_EXPORT Variable ENTITYfind_inherited_attribute PROTO( ( struct Scope_ *, char *, struct Symbol_ ** ) ); -extern SCL_EXPRESS_EXPORT Variable ENTITYresolve_attr_ref PROTO( ( Entity, Symbol *, Symbol * ) ); -extern SCL_EXPRESS_EXPORT bool ENTITYhas_immediate_supertype PROTO( ( Entity, Entity ) ); -extern SCL_EXPRESS_EXPORT Variable ENTITYget_named_attribute PROTO( ( Entity, char * ) ); -extern SCL_EXPRESS_EXPORT Linked_List ENTITYget_all_attributes PROTO( ( Entity ) ); -extern SCL_EXPRESS_EXPORT bool ENTITYhas_supertype PROTO( ( Entity, Entity ) ); -extern SCL_EXPRESS_EXPORT void ENTITYadd_instance PROTO( ( Entity, Generic ) ); -extern SCL_EXPRESS_EXPORT int ENTITYget_initial_offset PROTO( ( Entity ) ); -extern SCL_EXPRESS_EXPORT int ENTITYdeclares_variable PROTO( ( Entity, struct Variable_ * ) ); +extern SC_EXPRESS_EXPORT struct Scope_ * ENTITYcreate PROTO( ( struct Symbol_ * ) ); +extern SC_EXPRESS_EXPORT void ENTITYinitialize PROTO( ( void ) ); +extern SC_EXPRESS_EXPORT void ENTITYadd_attribute PROTO( ( struct Scope_ *, struct Variable_ * ) ); +extern SC_EXPRESS_EXPORT struct Scope_ * ENTITYcopy PROTO( ( struct Scope_ * ) ); +extern SC_EXPRESS_EXPORT Entity ENTITYfind_inherited_entity PROTO( ( struct Scope_ *, char *, int ) ); +extern SC_EXPRESS_EXPORT Variable ENTITYfind_inherited_attribute PROTO( ( struct Scope_ *, char *, struct Symbol_ ** ) ); +extern SC_EXPRESS_EXPORT Variable ENTITYresolve_attr_ref PROTO( ( Entity, Symbol *, Symbol * ) ); +extern SC_EXPRESS_EXPORT bool ENTITYhas_immediate_supertype PROTO( ( Entity, Entity ) ); +extern SC_EXPRESS_EXPORT Variable ENTITYget_named_attribute PROTO( ( Entity, char * ) ); +extern SC_EXPRESS_EXPORT Linked_List ENTITYget_all_attributes PROTO( ( Entity ) ); +extern SC_EXPRESS_EXPORT bool ENTITYhas_supertype PROTO( ( Entity, Entity ) ); +extern SC_EXPRESS_EXPORT void ENTITYadd_instance PROTO( ( Entity, Generic ) ); +extern SC_EXPRESS_EXPORT int ENTITYget_initial_offset PROTO( ( Entity ) ); +extern SC_EXPRESS_EXPORT int ENTITYdeclares_variable PROTO( ( Entity, struct Variable_ * ) ); #endif /* ENTITY_H */ diff --git a/include/express/error.h b/include/express/error.h index 1282c599..36c0699a 100644 --- a/include/express/error.h +++ b/include/express/error.h @@ -28,7 +28,7 @@ * prettied up interface to print_objects_when_running */ -#include +#include #include "basic.h" /* get basic definitions */ #include @@ -81,29 +81,29 @@ typedef struct Error_Warning_ { /* global variables */ /********************/ -extern SCL_EXPRESS_EXPORT bool __ERROR_buffer_errors; -extern SCL_EXPRESS_EXPORT char * current_filename; +extern SC_EXPRESS_EXPORT bool __ERROR_buffer_errors; +extern SC_EXPRESS_EXPORT char * current_filename; /* flag to remember whether non-warning errors have occurred */ -extern SCL_EXPRESS_EXPORT bool ERRORoccurred; +extern SC_EXPRESS_EXPORT bool ERRORoccurred; -extern SCL_EXPRESS_EXPORT Error experrc; -extern SCL_EXPRESS_EXPORT Error ERROR_subordinate_failed; -extern SCL_EXPRESS_EXPORT Error ERROR_syntax_expecting; +extern SC_EXPRESS_EXPORT Error experrc; +extern SC_EXPRESS_EXPORT Error ERROR_subordinate_failed; +extern SC_EXPRESS_EXPORT Error ERROR_syntax_expecting; /* all of these are 1 if true, 0 if false switches */ /* for debugging fedex */ -extern SCL_EXPRESS_EXPORT int ERRORdebugging; +extern SC_EXPRESS_EXPORT int ERRORdebugging; /* for debugging malloc during resolution */ -extern SCL_EXPRESS_EXPORT int malloc_debug_resolve; +extern SC_EXPRESS_EXPORT int malloc_debug_resolve; /* for debugging yacc/lex */ -extern SCL_EXPRESS_EXPORT int debug; +extern SC_EXPRESS_EXPORT int debug; -extern SCL_EXPRESS_EXPORT struct Linked_List_ * ERRORwarnings; -extern SCL_EXPRESS_EXPORT struct freelist_head ERROR_OPT_fl; +extern SC_EXPRESS_EXPORT struct Linked_List_ * ERRORwarnings; +extern SC_EXPRESS_EXPORT struct freelist_head ERROR_OPT_fl; -extern SCL_EXPRESS_EXPORT void ( *ERRORusage_function )( void ); +extern SC_EXPRESS_EXPORT void ( *ERRORusage_function )( void ); /******************************/ /* macro function definitions */ @@ -117,8 +117,8 @@ extern SCL_EXPRESS_EXPORT void ( *ERRORusage_function )( void ); /***********************/ #if defined(__MSVC__) || defined(__BORLAND__) -extern SCL_EXPRESS_EXPORT void ERROR_start_message_buffer PROTO( ( void ) ); -extern SCL_EXPRESS_EXPORT void ERROR_flush_message_buffer PROTO( ( void ) ); +extern SC_EXPRESS_EXPORT void ERROR_start_message_buffer PROTO( ( void ) ); +extern SC_EXPRESS_EXPORT void ERROR_flush_message_buffer PROTO( ( void ) ); #endif /********************/ @@ -170,28 +170,28 @@ static_inline void ERRORflush_messages( void ) { /* function prototypes */ /***********************/ -extern SCL_EXPRESS_EXPORT void ERRORinitialize PROTO( ( void ) ); -extern SCL_EXPRESS_EXPORT void ERRORinitialize_after_LIST PROTO( ( void ) ); -extern SCL_EXPRESS_EXPORT void ERRORcleanup PROTO( ( void ) ); -extern SCL_EXPRESS_EXPORT void ERRORnospace PROTO( ( void ) ); -extern SCL_EXPRESS_EXPORT void ERRORabort PROTO( ( int ) ); -extern SCL_EXPRESS_EXPORT Error ERRORcreate PROTO( ( char *, Severity ) ); -extern SCL_EXPRESS_EXPORT void ERRORreport PROTO( ( Error, ... ) ); -extern SCL_EXPRESS_EXPORT void ERRORdestroy PROTO( ( Error ) ); +extern SC_EXPRESS_EXPORT void ERRORinitialize PROTO( ( void ) ); +extern SC_EXPRESS_EXPORT void ERRORinitialize_after_LIST PROTO( ( void ) ); +extern SC_EXPRESS_EXPORT void ERRORcleanup PROTO( ( void ) ); +extern SC_EXPRESS_EXPORT void ERRORnospace PROTO( ( void ) ); +extern SC_EXPRESS_EXPORT void ERRORabort PROTO( ( int ) ); +extern SC_EXPRESS_EXPORT Error ERRORcreate PROTO( ( char *, Severity ) ); +extern SC_EXPRESS_EXPORT void ERRORreport PROTO( ( Error, ... ) ); +extern SC_EXPRESS_EXPORT void ERRORdestroy PROTO( ( Error ) ); struct Symbol_; /* mention Symbol to avoid warning on following line */ -extern SCL_EXPRESS_EXPORT void ERRORreport_with_symbol PROTO( ( Error, struct Symbol_ *, ... ) ); -extern SCL_EXPRESS_EXPORT void ERRORreport_with_line PROTO( ( Error, int, ... ) ); +extern SC_EXPRESS_EXPORT void ERRORreport_with_symbol PROTO( ( Error, struct Symbol_ *, ... ) ); +extern SC_EXPRESS_EXPORT void ERRORreport_with_line PROTO( ( Error, int, ... ) ); #if !defined(__MSVC__) && !defined(__BORLAND__) -extern SCL_EXPRESS_EXPORT void ERROR_start_message_buffer PROTO( ( void ) ); -extern SCL_EXPRESS_EXPORT void ERROR_flush_message_buffer PROTO( ( void ) ); +extern SC_EXPRESS_EXPORT void ERROR_start_message_buffer PROTO( ( void ) ); +extern SC_EXPRESS_EXPORT void ERROR_flush_message_buffer PROTO( ( void ) ); #endif -extern SCL_EXPRESS_EXPORT void ERRORcreate_warning PROTO( ( char *, Error ) ); -extern SCL_EXPRESS_EXPORT void ERRORset_warning PROTO( ( char *, int ) ); -extern SCL_EXPRESS_EXPORT void ERRORset_all_warnings PROTO( ( int ) ); -extern SCL_EXPRESS_EXPORT void ERRORsafe PROTO( ( jmp_buf env ) ); -extern SCL_EXPRESS_EXPORT void ERRORunsafe PROTO( ( void ) ); +extern SC_EXPRESS_EXPORT void ERRORcreate_warning PROTO( ( char *, Error ) ); +extern SC_EXPRESS_EXPORT void ERRORset_warning PROTO( ( char *, int ) ); +extern SC_EXPRESS_EXPORT void ERRORset_all_warnings PROTO( ( int ) ); +extern SC_EXPRESS_EXPORT void ERRORsafe PROTO( ( jmp_buf env ) ); +extern SC_EXPRESS_EXPORT void ERRORunsafe PROTO( ( void ) ); #endif /* ERROR_H */ diff --git a/include/express/expr.h b/include/express/expr.h index f47a44d0..ac7a54da 100644 --- a/include/express/expr.h +++ b/include/express/expr.h @@ -60,7 +60,7 @@ /* packages used */ /*****************/ -#include +#include #include #include "expbasic.h" /* get basic definitions */ @@ -185,23 +185,23 @@ struct EXPop_entry { /* global variables */ /********************/ -extern SCL_EXPRESS_EXPORT struct EXPop_entry EXPop_table[OP_LAST]; +extern SC_EXPRESS_EXPORT struct EXPop_entry EXPop_table[OP_LAST]; -extern SCL_EXPRESS_EXPORT Expression LITERAL_E; -extern SCL_EXPRESS_EXPORT Expression LITERAL_INFINITY; -extern SCL_EXPRESS_EXPORT Expression LITERAL_PI; -extern SCL_EXPRESS_EXPORT Expression LITERAL_ZERO; -extern SCL_EXPRESS_EXPORT Expression LITERAL_ONE; +extern SC_EXPRESS_EXPORT Expression LITERAL_E; +extern SC_EXPRESS_EXPORT Expression LITERAL_INFINITY; +extern SC_EXPRESS_EXPORT Expression LITERAL_PI; +extern SC_EXPRESS_EXPORT Expression LITERAL_ZERO; +extern SC_EXPRESS_EXPORT Expression LITERAL_ONE; -extern SCL_EXPRESS_EXPORT Error ERROR_bad_qualification; -extern SCL_EXPRESS_EXPORT Error ERROR_integer_expression_expected; -extern SCL_EXPRESS_EXPORT Error ERROR_implicit_downcast; -extern SCL_EXPRESS_EXPORT Error ERROR_ambig_implicit_downcast; +extern SC_EXPRESS_EXPORT Error ERROR_bad_qualification; +extern SC_EXPRESS_EXPORT Error ERROR_integer_expression_expected; +extern SC_EXPRESS_EXPORT Error ERROR_implicit_downcast; +extern SC_EXPRESS_EXPORT Error ERROR_ambig_implicit_downcast; -extern SCL_EXPRESS_EXPORT struct freelist_head EXP_fl; -extern SCL_EXPRESS_EXPORT struct freelist_head OP_fl; -extern SCL_EXPRESS_EXPORT struct freelist_head QUERY_fl; -extern SCL_EXPRESS_EXPORT struct freelist_head QUAL_ATTR_fl; +extern SC_EXPRESS_EXPORT struct freelist_head EXP_fl; +extern SC_EXPRESS_EXPORT struct freelist_head OP_fl; +extern SC_EXPRESS_EXPORT struct freelist_head QUERY_fl; +extern SC_EXPRESS_EXPORT struct freelist_head QUAL_ATTR_fl; /******************************/ /* macro function definitions */ @@ -254,16 +254,16 @@ extern SCL_EXPRESS_EXPORT struct freelist_head QUAL_ATTR_fl; /* function prototypes */ /***********************/ -extern SCL_EXPRESS_EXPORT Expression EXPcreate PROTO( ( Type ) ); -extern SCL_EXPRESS_EXPORT Expression EXPcreate_simple PROTO( ( Type ) ); -extern SCL_EXPRESS_EXPORT Expression EXPcreate_from_symbol PROTO( ( Type, Symbol * ) ); -extern SCL_EXPRESS_EXPORT Expression UN_EXPcreate PROTO( ( Op_Code, Expression ) ); -extern SCL_EXPRESS_EXPORT Expression BIN_EXPcreate PROTO( ( Op_Code, Expression, Expression ) ); -extern SCL_EXPRESS_EXPORT Expression TERN_EXPcreate PROTO( ( Op_Code, Expression, Expression, Expression ) ); -extern SCL_EXPRESS_EXPORT Expression QUERYcreate PROTO( ( Symbol *, Expression ) ); -extern SCL_EXPRESS_EXPORT void EXPinitialize PROTO( ( void ) ); -extern SCL_EXPRESS_EXPORT void EXPcleanup PROTO( ( void ) ); -extern SCL_EXPRESS_EXPORT Type EXPtype PROTO( ( Expression, struct Scope_ * ) ); -extern SCL_EXPRESS_EXPORT int EXPget_integer_value PROTO( ( Expression ) ); +extern SC_EXPRESS_EXPORT Expression EXPcreate PROTO( ( Type ) ); +extern SC_EXPRESS_EXPORT Expression EXPcreate_simple PROTO( ( Type ) ); +extern SC_EXPRESS_EXPORT Expression EXPcreate_from_symbol PROTO( ( Type, Symbol * ) ); +extern SC_EXPRESS_EXPORT Expression UN_EXPcreate PROTO( ( Op_Code, Expression ) ); +extern SC_EXPRESS_EXPORT Expression BIN_EXPcreate PROTO( ( Op_Code, Expression, Expression ) ); +extern SC_EXPRESS_EXPORT Expression TERN_EXPcreate PROTO( ( Op_Code, Expression, Expression, Expression ) ); +extern SC_EXPRESS_EXPORT Expression QUERYcreate PROTO( ( Symbol *, Expression ) ); +extern SC_EXPRESS_EXPORT void EXPinitialize PROTO( ( void ) ); +extern SC_EXPRESS_EXPORT void EXPcleanup PROTO( ( void ) ); +extern SC_EXPRESS_EXPORT Type EXPtype PROTO( ( Expression, struct Scope_ * ) ); +extern SC_EXPRESS_EXPORT int EXPget_integer_value PROTO( ( Expression ) ); #endif /*EXPRESSION_H*/ diff --git a/include/express/express.h b/include/express/express.h index a674b7c2..430f32dd 100644 --- a/include/express/express.h +++ b/include/express/express.h @@ -88,151 +88,151 @@ struct Express_ { /* global variables */ /********************/ -extern SCL_EXPRESS_EXPORT Linked_List EXPRESS_path; -extern SCL_EXPRESS_EXPORT int EXPRESSpass; +extern SC_EXPRESS_EXPORT Linked_List EXPRESS_path; +extern SC_EXPRESS_EXPORT int EXPRESSpass; -extern SCL_EXPRESS_EXPORT void ( *EXPRESSinit_args ) PROTO( ( int, char ** ) ); -extern SCL_EXPRESS_EXPORT void ( *EXPRESSinit_parse ) PROTO( ( void ) ); -extern SCL_EXPRESS_EXPORT int ( *EXPRESSfail ) PROTO( ( Express ) ); -extern SCL_EXPRESS_EXPORT int ( *EXPRESSsucceed ) PROTO( ( Express ) ); -extern SCL_EXPRESS_EXPORT void ( *EXPRESSbackend ) PROTO( ( Express ) ); -extern SCL_EXPRESS_EXPORT char * EXPRESSprogram_name; +extern SC_EXPRESS_EXPORT void ( *EXPRESSinit_args ) PROTO( ( int, char ** ) ); +extern SC_EXPRESS_EXPORT void ( *EXPRESSinit_parse ) PROTO( ( void ) ); +extern SC_EXPRESS_EXPORT int ( *EXPRESSfail ) PROTO( ( Express ) ); +extern SC_EXPRESS_EXPORT int ( *EXPRESSsucceed ) PROTO( ( Express ) ); +extern SC_EXPRESS_EXPORT void ( *EXPRESSbackend ) PROTO( ( Express ) ); +extern SC_EXPRESS_EXPORT char * EXPRESSprogram_name; extern char EXPRESSgetopt_options[]; /* initialized elsewhere */ -extern SCL_EXPRESS_EXPORT int ( *EXPRESSgetopt ) PROTO( ( int, char * ) ); -extern SCL_EXPRESS_EXPORT bool EXPRESSignore_duplicate_schemas; +extern SC_EXPRESS_EXPORT int ( *EXPRESSgetopt ) PROTO( ( int, char * ) ); +extern SC_EXPRESS_EXPORT bool EXPRESSignore_duplicate_schemas; -extern SCL_EXPRESS_EXPORT Dictionary EXPRESSbuiltins; /* procedures/functions */ +extern SC_EXPRESS_EXPORT Dictionary EXPRESSbuiltins; /* procedures/functions */ -extern SCL_EXPRESS_EXPORT Error ERROR_bail_out; -extern SCL_EXPRESS_EXPORT Error ERROR_syntax; -extern SCL_EXPRESS_EXPORT Error ERROR_unlabelled_param_type; -extern SCL_EXPRESS_EXPORT Error ERROR_file_unreadable; -extern SCL_EXPRESS_EXPORT Error ERROR_file_unwriteable; -extern SCL_EXPRESS_EXPORT Error ERROR_warn_unsupported_lang_feat; +extern SC_EXPRESS_EXPORT Error ERROR_bail_out; +extern SC_EXPRESS_EXPORT Error ERROR_syntax; +extern SC_EXPRESS_EXPORT Error ERROR_unlabelled_param_type; +extern SC_EXPRESS_EXPORT Error ERROR_file_unreadable; +extern SC_EXPRESS_EXPORT Error ERROR_file_unwriteable; +extern SC_EXPRESS_EXPORT Error ERROR_warn_unsupported_lang_feat; -extern SCL_EXPRESS_EXPORT struct Scope_ * FUNC_NVL; -extern SCL_EXPRESS_EXPORT struct Scope_ * FUNC_USEDIN; +extern SC_EXPRESS_EXPORT struct Scope_ * FUNC_NVL; +extern SC_EXPRESS_EXPORT struct Scope_ * FUNC_USEDIN; -extern SCL_EXPRESS_EXPORT char * KW_ABS; -extern SCL_EXPRESS_EXPORT char * KW_ABSTRACT; -extern SCL_EXPRESS_EXPORT char * KW_ACOS; -extern SCL_EXPRESS_EXPORT char * KW_AGGREGATE; -extern SCL_EXPRESS_EXPORT char * KW_ALIAS; -extern SCL_EXPRESS_EXPORT char * KW_AND; -extern SCL_EXPRESS_EXPORT char * KW_ANDOR; -extern SCL_EXPRESS_EXPORT char * KW_ARRAY; -extern SCL_EXPRESS_EXPORT char * KW_AS; -extern SCL_EXPRESS_EXPORT char * KW_ASIN; -extern SCL_EXPRESS_EXPORT char * KW_ATAN; -extern SCL_EXPRESS_EXPORT char * KW_BAG; -extern SCL_EXPRESS_EXPORT char * KW_BEGIN; -extern SCL_EXPRESS_EXPORT char * KW_BINARY; -extern SCL_EXPRESS_EXPORT char * KW_BLENGTH; -extern SCL_EXPRESS_EXPORT char * KW_BOOLEAN; -extern SCL_EXPRESS_EXPORT char * KW_BY; -extern SCL_EXPRESS_EXPORT char * KW_CASE; -extern SCL_EXPRESS_EXPORT char * KW_CONST_E; -extern SCL_EXPRESS_EXPORT char * KW_CONSTANT; -extern SCL_EXPRESS_EXPORT char * KW_CONTEXT; -extern SCL_EXPRESS_EXPORT char * KW_COS; -extern SCL_EXPRESS_EXPORT char * KW_DERIVE; -extern SCL_EXPRESS_EXPORT char * KW_DIV; -extern SCL_EXPRESS_EXPORT char * KW_ELSE; -extern SCL_EXPRESS_EXPORT char * KW_END; -extern SCL_EXPRESS_EXPORT char * KW_END_ALIAS; -extern SCL_EXPRESS_EXPORT char * KW_END_CASE; -extern SCL_EXPRESS_EXPORT char * KW_END_CONSTANT; -extern SCL_EXPRESS_EXPORT char * KW_END_CONTEXT; -extern SCL_EXPRESS_EXPORT char * KW_END_ENTITY; -extern SCL_EXPRESS_EXPORT char * KW_END_FUNCTION; -extern SCL_EXPRESS_EXPORT char * KW_END_IF; -extern SCL_EXPRESS_EXPORT char * KW_END_LOCAL; -extern SCL_EXPRESS_EXPORT char * KW_END_MODEL; -extern SCL_EXPRESS_EXPORT char * KW_END_PROCEDURE; -extern SCL_EXPRESS_EXPORT char * KW_END_REPEAT; -extern SCL_EXPRESS_EXPORT char * KW_END_RULE; -extern SCL_EXPRESS_EXPORT char * KW_END_SCHEMA; -extern SCL_EXPRESS_EXPORT char * KW_END_TYPE; -extern SCL_EXPRESS_EXPORT char * KW_ENTITY; -extern SCL_EXPRESS_EXPORT char * KW_ENUMERATION; -extern SCL_EXPRESS_EXPORT char * KW_ESCAPE; -extern SCL_EXPRESS_EXPORT char * KW_EXISTS; -extern SCL_EXPRESS_EXPORT char * KW_EXP; -extern SCL_EXPRESS_EXPORT char * KW_FALSE; -extern SCL_EXPRESS_EXPORT char * KW_FIXED; -extern SCL_EXPRESS_EXPORT char * KW_FOR; -extern SCL_EXPRESS_EXPORT char * KW_FORMAT; -extern SCL_EXPRESS_EXPORT char * KW_FROM; -extern SCL_EXPRESS_EXPORT char * KW_FUNCTION; -extern SCL_EXPRESS_EXPORT char * KW_GENERIC; -extern SCL_EXPRESS_EXPORT char * KW_HIBOUND; -extern SCL_EXPRESS_EXPORT char * KW_HIINDEX; -extern SCL_EXPRESS_EXPORT char * KW_IF; -extern SCL_EXPRESS_EXPORT char * KW_IN; -extern SCL_EXPRESS_EXPORT char * KW_INCLUDE; -extern SCL_EXPRESS_EXPORT char * KW_INSERT; -extern SCL_EXPRESS_EXPORT char * KW_INTEGER; -extern SCL_EXPRESS_EXPORT char * KW_INVERSE; -extern SCL_EXPRESS_EXPORT char * KW_LENGTH; -extern SCL_EXPRESS_EXPORT char * KW_LIKE; -extern SCL_EXPRESS_EXPORT char * KW_LIST; -extern SCL_EXPRESS_EXPORT char * KW_LOBOUND; -extern SCL_EXPRESS_EXPORT char * KW_LOCAL; -extern SCL_EXPRESS_EXPORT char * KW_LOG; -extern SCL_EXPRESS_EXPORT char * KW_LOG10; -extern SCL_EXPRESS_EXPORT char * KW_LOG2; -extern SCL_EXPRESS_EXPORT char * KW_LOGICAL; -extern SCL_EXPRESS_EXPORT char * KW_LOINDEX; -extern SCL_EXPRESS_EXPORT char * KW_MOD; -extern SCL_EXPRESS_EXPORT char * KW_MODEL; -extern SCL_EXPRESS_EXPORT char * KW_NOT; -extern SCL_EXPRESS_EXPORT char * KW_NUMBER; -extern SCL_EXPRESS_EXPORT char * KW_NVL; -extern SCL_EXPRESS_EXPORT char * KW_ODD; -extern SCL_EXPRESS_EXPORT char * KW_OF; -extern SCL_EXPRESS_EXPORT char * KW_ONEOF; -extern SCL_EXPRESS_EXPORT char * KW_OPTIONAL; -extern SCL_EXPRESS_EXPORT char * KW_OR; -extern SCL_EXPRESS_EXPORT char * KW_OTHERWISE; -extern SCL_EXPRESS_EXPORT char * KW_PI; -extern SCL_EXPRESS_EXPORT char * KW_PROCEDURE; -extern SCL_EXPRESS_EXPORT char * KW_QUERY; -extern SCL_EXPRESS_EXPORT char * KW_REAL; -extern SCL_EXPRESS_EXPORT char * KW_REFERENCE; -extern SCL_EXPRESS_EXPORT char * KW_REMOVE; -extern SCL_EXPRESS_EXPORT char * KW_REPEAT; -extern SCL_EXPRESS_EXPORT char * KW_RETURN; -extern SCL_EXPRESS_EXPORT char * KW_ROLESOF; -extern SCL_EXPRESS_EXPORT char * KW_RULE; -extern SCL_EXPRESS_EXPORT char * KW_SCHEMA; -extern SCL_EXPRESS_EXPORT char * KW_SELECT; -extern SCL_EXPRESS_EXPORT char * KW_SELF; -extern SCL_EXPRESS_EXPORT char * KW_SET; -extern SCL_EXPRESS_EXPORT char * KW_SIN; -extern SCL_EXPRESS_EXPORT char * KW_SIZEOF; -extern SCL_EXPRESS_EXPORT char * KW_SKIP; -extern SCL_EXPRESS_EXPORT char * KW_SQRT; -extern SCL_EXPRESS_EXPORT char * KW_STRING; -extern SCL_EXPRESS_EXPORT char * KW_SUBTYPE; -extern SCL_EXPRESS_EXPORT char * KW_SUPERTYPE; -extern SCL_EXPRESS_EXPORT char * KW_TAN; -extern SCL_EXPRESS_EXPORT char * KW_THEN; -extern SCL_EXPRESS_EXPORT char * KW_TO; -extern SCL_EXPRESS_EXPORT char * KW_TRUE; -extern SCL_EXPRESS_EXPORT char * KW_TYPE; -extern SCL_EXPRESS_EXPORT char * KW_TYPEOF; -extern SCL_EXPRESS_EXPORT char * KW_UNIQUE; -extern SCL_EXPRESS_EXPORT char * KW_UNKNOWN; -extern SCL_EXPRESS_EXPORT char * KW_UNTIL; -extern SCL_EXPRESS_EXPORT char * KW_USE; -extern SCL_EXPRESS_EXPORT char * KW_USEDIN; -extern SCL_EXPRESS_EXPORT char * KW_VALUE; -extern SCL_EXPRESS_EXPORT char * KW_VALUE_IN; -extern SCL_EXPRESS_EXPORT char * KW_VALUE_UNIQUE; -extern SCL_EXPRESS_EXPORT char * KW_VAR; -extern SCL_EXPRESS_EXPORT char * KW_WHERE; -extern SCL_EXPRESS_EXPORT char * KW_WHILE; -extern SCL_EXPRESS_EXPORT char * KW_XOR; +extern SC_EXPRESS_EXPORT char * KW_ABS; +extern SC_EXPRESS_EXPORT char * KW_ABSTRACT; +extern SC_EXPRESS_EXPORT char * KW_ACOS; +extern SC_EXPRESS_EXPORT char * KW_AGGREGATE; +extern SC_EXPRESS_EXPORT char * KW_ALIAS; +extern SC_EXPRESS_EXPORT char * KW_AND; +extern SC_EXPRESS_EXPORT char * KW_ANDOR; +extern SC_EXPRESS_EXPORT char * KW_ARRAY; +extern SC_EXPRESS_EXPORT char * KW_AS; +extern SC_EXPRESS_EXPORT char * KW_ASIN; +extern SC_EXPRESS_EXPORT char * KW_ATAN; +extern SC_EXPRESS_EXPORT char * KW_BAG; +extern SC_EXPRESS_EXPORT char * KW_BEGIN; +extern SC_EXPRESS_EXPORT char * KW_BINARY; +extern SC_EXPRESS_EXPORT char * KW_BLENGTH; +extern SC_EXPRESS_EXPORT char * KW_BOOLEAN; +extern SC_EXPRESS_EXPORT char * KW_BY; +extern SC_EXPRESS_EXPORT char * KW_CASE; +extern SC_EXPRESS_EXPORT char * KW_CONST_E; +extern SC_EXPRESS_EXPORT char * KW_CONSTANT; +extern SC_EXPRESS_EXPORT char * KW_CONTEXT; +extern SC_EXPRESS_EXPORT char * KW_COS; +extern SC_EXPRESS_EXPORT char * KW_DERIVE; +extern SC_EXPRESS_EXPORT char * KW_DIV; +extern SC_EXPRESS_EXPORT char * KW_ELSE; +extern SC_EXPRESS_EXPORT char * KW_END; +extern SC_EXPRESS_EXPORT char * KW_END_ALIAS; +extern SC_EXPRESS_EXPORT char * KW_END_CASE; +extern SC_EXPRESS_EXPORT char * KW_END_CONSTANT; +extern SC_EXPRESS_EXPORT char * KW_END_CONTEXT; +extern SC_EXPRESS_EXPORT char * KW_END_ENTITY; +extern SC_EXPRESS_EXPORT char * KW_END_FUNCTION; +extern SC_EXPRESS_EXPORT char * KW_END_IF; +extern SC_EXPRESS_EXPORT char * KW_END_LOCAL; +extern SC_EXPRESS_EXPORT char * KW_END_MODEL; +extern SC_EXPRESS_EXPORT char * KW_END_PROCEDURE; +extern SC_EXPRESS_EXPORT char * KW_END_REPEAT; +extern SC_EXPRESS_EXPORT char * KW_END_RULE; +extern SC_EXPRESS_EXPORT char * KW_END_SCHEMA; +extern SC_EXPRESS_EXPORT char * KW_END_TYPE; +extern SC_EXPRESS_EXPORT char * KW_ENTITY; +extern SC_EXPRESS_EXPORT char * KW_ENUMERATION; +extern SC_EXPRESS_EXPORT char * KW_ESCAPE; +extern SC_EXPRESS_EXPORT char * KW_EXISTS; +extern SC_EXPRESS_EXPORT char * KW_EXP; +extern SC_EXPRESS_EXPORT char * KW_FALSE; +extern SC_EXPRESS_EXPORT char * KW_FIXED; +extern SC_EXPRESS_EXPORT char * KW_FOR; +extern SC_EXPRESS_EXPORT char * KW_FORMAT; +extern SC_EXPRESS_EXPORT char * KW_FROM; +extern SC_EXPRESS_EXPORT char * KW_FUNCTION; +extern SC_EXPRESS_EXPORT char * KW_GENERIC; +extern SC_EXPRESS_EXPORT char * KW_HIBOUND; +extern SC_EXPRESS_EXPORT char * KW_HIINDEX; +extern SC_EXPRESS_EXPORT char * KW_IF; +extern SC_EXPRESS_EXPORT char * KW_IN; +extern SC_EXPRESS_EXPORT char * KW_INCLUDE; +extern SC_EXPRESS_EXPORT char * KW_INSERT; +extern SC_EXPRESS_EXPORT char * KW_INTEGER; +extern SC_EXPRESS_EXPORT char * KW_INVERSE; +extern SC_EXPRESS_EXPORT char * KW_LENGTH; +extern SC_EXPRESS_EXPORT char * KW_LIKE; +extern SC_EXPRESS_EXPORT char * KW_LIST; +extern SC_EXPRESS_EXPORT char * KW_LOBOUND; +extern SC_EXPRESS_EXPORT char * KW_LOCAL; +extern SC_EXPRESS_EXPORT char * KW_LOG; +extern SC_EXPRESS_EXPORT char * KW_LOG10; +extern SC_EXPRESS_EXPORT char * KW_LOG2; +extern SC_EXPRESS_EXPORT char * KW_LOGICAL; +extern SC_EXPRESS_EXPORT char * KW_LOINDEX; +extern SC_EXPRESS_EXPORT char * KW_MOD; +extern SC_EXPRESS_EXPORT char * KW_MODEL; +extern SC_EXPRESS_EXPORT char * KW_NOT; +extern SC_EXPRESS_EXPORT char * KW_NUMBER; +extern SC_EXPRESS_EXPORT char * KW_NVL; +extern SC_EXPRESS_EXPORT char * KW_ODD; +extern SC_EXPRESS_EXPORT char * KW_OF; +extern SC_EXPRESS_EXPORT char * KW_ONEOF; +extern SC_EXPRESS_EXPORT char * KW_OPTIONAL; +extern SC_EXPRESS_EXPORT char * KW_OR; +extern SC_EXPRESS_EXPORT char * KW_OTHERWISE; +extern SC_EXPRESS_EXPORT char * KW_PI; +extern SC_EXPRESS_EXPORT char * KW_PROCEDURE; +extern SC_EXPRESS_EXPORT char * KW_QUERY; +extern SC_EXPRESS_EXPORT char * KW_REAL; +extern SC_EXPRESS_EXPORT char * KW_REFERENCE; +extern SC_EXPRESS_EXPORT char * KW_REMOVE; +extern SC_EXPRESS_EXPORT char * KW_REPEAT; +extern SC_EXPRESS_EXPORT char * KW_RETURN; +extern SC_EXPRESS_EXPORT char * KW_ROLESOF; +extern SC_EXPRESS_EXPORT char * KW_RULE; +extern SC_EXPRESS_EXPORT char * KW_SCHEMA; +extern SC_EXPRESS_EXPORT char * KW_SELECT; +extern SC_EXPRESS_EXPORT char * KW_SELF; +extern SC_EXPRESS_EXPORT char * KW_SET; +extern SC_EXPRESS_EXPORT char * KW_SIN; +extern SC_EXPRESS_EXPORT char * KW_SIZEOF; +extern SC_EXPRESS_EXPORT char * KW_SKIP; +extern SC_EXPRESS_EXPORT char * KW_SQRT; +extern SC_EXPRESS_EXPORT char * KW_STRING; +extern SC_EXPRESS_EXPORT char * KW_SUBTYPE; +extern SC_EXPRESS_EXPORT char * KW_SUPERTYPE; +extern SC_EXPRESS_EXPORT char * KW_TAN; +extern SC_EXPRESS_EXPORT char * KW_THEN; +extern SC_EXPRESS_EXPORT char * KW_TO; +extern SC_EXPRESS_EXPORT char * KW_TRUE; +extern SC_EXPRESS_EXPORT char * KW_TYPE; +extern SC_EXPRESS_EXPORT char * KW_TYPEOF; +extern SC_EXPRESS_EXPORT char * KW_UNIQUE; +extern SC_EXPRESS_EXPORT char * KW_UNKNOWN; +extern SC_EXPRESS_EXPORT char * KW_UNTIL; +extern SC_EXPRESS_EXPORT char * KW_USE; +extern SC_EXPRESS_EXPORT char * KW_USEDIN; +extern SC_EXPRESS_EXPORT char * KW_VALUE; +extern SC_EXPRESS_EXPORT char * KW_VALUE_IN; +extern SC_EXPRESS_EXPORT char * KW_VALUE_UNIQUE; +extern SC_EXPRESS_EXPORT char * KW_VAR; +extern SC_EXPRESS_EXPORT char * KW_WHERE; +extern SC_EXPRESS_EXPORT char * KW_WHILE; +extern SC_EXPRESS_EXPORT char * KW_XOR; /******************************/ /* macro function definitions */ @@ -247,16 +247,16 @@ extern SCL_EXPRESS_EXPORT char * KW_XOR; /* function prototypes */ /***********************/ -extern SCL_EXPRESS_EXPORT Express EXPRESScreate PROTO( ( void ) ); -extern SCL_EXPRESS_EXPORT void EXPRESSdestroy PROTO( ( Express ) ); -extern SCL_EXPRESS_EXPORT void EXPRESSparse PROTO( ( Express, FILE *, char * ) ); -extern SCL_EXPRESS_EXPORT void EXPRESSinitialize PROTO( ( void ) ); -extern SCL_EXPRESS_EXPORT void EXPRESScleanup PROTO( ( void ) ); -extern SCL_EXPRESS_EXPORT void EXPRESSresolve PROTO( ( Express ) ); -extern SCL_EXPRESS_EXPORT char * EXPRESSversion PROTO( ( void ) ); -extern SCL_EXPRESS_EXPORT int EXPRESS_fail PROTO( ( Express ) ); -extern SCL_EXPRESS_EXPORT int EXPRESS_succeed PROTO( ( Express ) ); +extern SC_EXPRESS_EXPORT Express EXPRESScreate PROTO( ( void ) ); +extern SC_EXPRESS_EXPORT void EXPRESSdestroy PROTO( ( Express ) ); +extern SC_EXPRESS_EXPORT void EXPRESSparse PROTO( ( Express, FILE *, char * ) ); +extern SC_EXPRESS_EXPORT void EXPRESSinitialize PROTO( ( void ) ); +extern SC_EXPRESS_EXPORT void EXPRESScleanup PROTO( ( void ) ); +extern SC_EXPRESS_EXPORT void EXPRESSresolve PROTO( ( Express ) ); +extern SC_EXPRESS_EXPORT char * EXPRESSversion PROTO( ( void ) ); +extern SC_EXPRESS_EXPORT int EXPRESS_fail PROTO( ( Express ) ); +extern SC_EXPRESS_EXPORT int EXPRESS_succeed PROTO( ( Express ) ); extern void EXPRESSinit_init PROTO( ( void ) ); -extern SCL_EXPRESS_EXPORT void build_complex( Express ); +extern SC_EXPRESS_EXPORT void build_complex( Express ); #endif /*EXPRESS_H*/ diff --git a/include/express/hash.h b/include/express/hash.h index c4107a15..c9e7782c 100644 --- a/include/express/hash.h +++ b/include/express/hash.h @@ -100,7 +100,7 @@ /* packages used */ /*****************/ -#include +#include #include "memory.h" /************/ @@ -156,8 +156,8 @@ typedef struct { /* global variables */ /********************/ -extern SCL_EXPRESS_EXPORT struct freelist_head HASH_Table_fl; -extern SCL_EXPRESS_EXPORT struct freelist_head HASH_Element_fl; +extern SC_EXPRESS_EXPORT struct freelist_head HASH_Table_fl; +extern SC_EXPRESS_EXPORT struct freelist_head HASH_Element_fl; /******************************/ /* macro function definitions */ @@ -193,13 +193,13 @@ This change only seems to have affected hash.h and hash.c /* function prototypes */ /***********************/ -extern SCL_EXPRESS_EXPORT void HASHinitialize PROTO( ( void ) ); -extern SCL_EXPRESS_EXPORT Hash_Table HASHcreate PROTO( ( unsigned ) ); -extern SCL_EXPRESS_EXPORT Hash_Table HASHcopy PROTO( ( Hash_Table ) ); -extern SCL_EXPRESS_EXPORT void HASHdestroy PROTO( ( Hash_Table ) ); -extern SCL_EXPRESS_EXPORT Element HASHsearch PROTO( ( Hash_Table, Element, Action ) ); -extern SCL_EXPRESS_EXPORT void HASHlistinit PROTO( ( Hash_Table, HashEntry * ) ); -extern SCL_EXPRESS_EXPORT void HASHlistinit_by_type PROTO( ( Hash_Table, HashEntry *, char ) ); -extern SCL_EXPRESS_EXPORT Element HASHlist PROTO( ( HashEntry * ) ); +extern SC_EXPRESS_EXPORT void HASHinitialize PROTO( ( void ) ); +extern SC_EXPRESS_EXPORT Hash_Table HASHcreate PROTO( ( unsigned ) ); +extern SC_EXPRESS_EXPORT Hash_Table HASHcopy PROTO( ( Hash_Table ) ); +extern SC_EXPRESS_EXPORT void HASHdestroy PROTO( ( Hash_Table ) ); +extern SC_EXPRESS_EXPORT Element HASHsearch PROTO( ( Hash_Table, Element, Action ) ); +extern SC_EXPRESS_EXPORT void HASHlistinit PROTO( ( Hash_Table, HashEntry * ) ); +extern SC_EXPRESS_EXPORT void HASHlistinit_by_type PROTO( ( Hash_Table, HashEntry *, char ) ); +extern SC_EXPRESS_EXPORT Element HASHlist PROTO( ( HashEntry * ) ); #endif /*HASH_H*/ diff --git a/include/express/lexact.h b/include/express/lexact.h index 77e11cc7..370ddcd9 100644 --- a/include/express/lexact.h +++ b/include/express/lexact.h @@ -38,7 +38,7 @@ /* packages used */ /*****************/ -#include +#include #include #include "basic.h" #include "error.h" @@ -68,19 +68,19 @@ typedef struct Scan_Buffer { /* global variables */ /********************/ -extern SCL_EXPRESS_EXPORT Scan_Buffer SCAN_buffers[SCAN_NESTING_DEPTH]; -extern SCL_EXPRESS_EXPORT int SCAN_current_buffer; -extern SCL_EXPRESS_EXPORT char * SCANcurrent; +extern SC_EXPRESS_EXPORT Scan_Buffer SCAN_buffers[SCAN_NESTING_DEPTH]; +extern SC_EXPRESS_EXPORT int SCAN_current_buffer; +extern SC_EXPRESS_EXPORT char * SCANcurrent; -extern SCL_EXPRESS_EXPORT Error ERROR_include_file; -extern SCL_EXPRESS_EXPORT Error ERROR_unmatched_close_comment; -extern SCL_EXPRESS_EXPORT Error ERROR_unmatched_open_comment; -extern SCL_EXPRESS_EXPORT Error ERROR_unterminated_string; -extern SCL_EXPRESS_EXPORT Error ERROR_encoded_string_bad_digit; -extern SCL_EXPRESS_EXPORT Error ERROR_encoded_string_bad_count; -extern SCL_EXPRESS_EXPORT Error ERROR_bad_identifier; -extern SCL_EXPRESS_EXPORT Error ERROR_unexpected_character; -extern SCL_EXPRESS_EXPORT Error ERROR_nonascii_char; +extern SC_EXPRESS_EXPORT Error ERROR_include_file; +extern SC_EXPRESS_EXPORT Error ERROR_unmatched_close_comment; +extern SC_EXPRESS_EXPORT Error ERROR_unmatched_open_comment; +extern SC_EXPRESS_EXPORT Error ERROR_unterminated_string; +extern SC_EXPRESS_EXPORT Error ERROR_encoded_string_bad_digit; +extern SC_EXPRESS_EXPORT Error ERROR_encoded_string_bad_count; +extern SC_EXPRESS_EXPORT Error ERROR_bad_identifier; +extern SC_EXPRESS_EXPORT Error ERROR_unexpected_character; +extern SC_EXPRESS_EXPORT Error ERROR_nonascii_char; /******************************/ /* macro function definitions */ @@ -99,24 +99,24 @@ extern SCL_EXPRESS_EXPORT Error ERROR_nonascii_char; /* function prototypes */ /***********************/ -extern SCL_EXPRESS_EXPORT void SCANinitialize PROTO( ( void ) ); -extern SCL_EXPRESS_EXPORT int SCANprocess_real_literal PROTO( ( const char * ) ); -extern SCL_EXPRESS_EXPORT int SCANprocess_integer_literal PROTO( ( const char * ) ); -extern SCL_EXPRESS_EXPORT int SCANprocess_binary_literal PROTO( ( const char * ) ); -extern SCL_EXPRESS_EXPORT int SCANprocess_logical_literal PROTO( ( char * ) ); -extern SCL_EXPRESS_EXPORT int SCANprocess_identifier_or_keyword PROTO( ( const char * ) ); -extern SCL_EXPRESS_EXPORT int SCANprocess_string PROTO( ( const char * ) ); -extern SCL_EXPRESS_EXPORT int SCANprocess_encoded_string PROTO( ( const char * ) ); -extern SCL_EXPRESS_EXPORT int SCANprocess_semicolon PROTO( ( const char *, int ) ); -extern SCL_EXPRESS_EXPORT void SCANsave_comment PROTO( ( const char * ) ); -extern SCL_EXPRESS_EXPORT bool SCANread PROTO( ( void ) ); +extern SC_EXPRESS_EXPORT void SCANinitialize PROTO( ( void ) ); +extern SC_EXPRESS_EXPORT int SCANprocess_real_literal PROTO( ( const char * ) ); +extern SC_EXPRESS_EXPORT int SCANprocess_integer_literal PROTO( ( const char * ) ); +extern SC_EXPRESS_EXPORT int SCANprocess_binary_literal PROTO( ( const char * ) ); +extern SC_EXPRESS_EXPORT int SCANprocess_logical_literal PROTO( ( char * ) ); +extern SC_EXPRESS_EXPORT int SCANprocess_identifier_or_keyword PROTO( ( const char * ) ); +extern SC_EXPRESS_EXPORT int SCANprocess_string PROTO( ( const char * ) ); +extern SC_EXPRESS_EXPORT int SCANprocess_encoded_string PROTO( ( const char * ) ); +extern SC_EXPRESS_EXPORT int SCANprocess_semicolon PROTO( ( const char *, int ) ); +extern SC_EXPRESS_EXPORT void SCANsave_comment PROTO( ( const char * ) ); +extern SC_EXPRESS_EXPORT bool SCANread PROTO( ( void ) ); #if macros_bit_the_dust -extern SCL_EXPRESS_EXPORT void SCANdefine_macro PROTO( ( char *, char * ) ); +extern SC_EXPRESS_EXPORT void SCANdefine_macro PROTO( ( char *, char * ) ); #endif -extern SCL_EXPRESS_EXPORT void SCANinclude_file PROTO( ( char * ) ); -SCL_EXPRESS_EXPORT void SCANlowerize PROTO( ( char * ) ); -SCL_EXPRESS_EXPORT void SCANupperize PROTO( ( char * ) ); -extern SCL_EXPRESS_EXPORT char * SCANstrdup PROTO( ( char * ) ); -extern SCL_EXPRESS_EXPORT long SCANtell PROTO( ( void ) ); +extern SC_EXPRESS_EXPORT void SCANinclude_file PROTO( ( char * ) ); +SC_EXPRESS_EXPORT void SCANlowerize PROTO( ( char * ) ); +SC_EXPRESS_EXPORT void SCANupperize PROTO( ( char * ) ); +extern SC_EXPRESS_EXPORT char * SCANstrdup PROTO( ( char * ) ); +extern SC_EXPRESS_EXPORT long SCANtell PROTO( ( void ) ); #endif /* LEX_ACTIONS_H */ diff --git a/include/express/linklist.h b/include/express/linklist.h index 9b712cf3..5c975f4a 100644 --- a/include/express/linklist.h +++ b/include/express/linklist.h @@ -36,7 +36,7 @@ /* packages used */ /*****************/ -#include +#include #include "basic.h" #include "memory.h" @@ -70,10 +70,10 @@ struct Linked_List_ { /* global variables */ /********************/ -extern SCL_EXPRESS_EXPORT Error ERROR_empty_list; -extern SCL_EXPRESS_EXPORT struct freelist_head LINK_fl; -extern SCL_EXPRESS_EXPORT struct freelist_head LIST_fl; -extern SCL_EXPRESS_EXPORT Linked_List LINK__l; /* for LISTcreate_with macro - ugh */ +extern SC_EXPRESS_EXPORT Error ERROR_empty_list; +extern SC_EXPRESS_EXPORT struct freelist_head LINK_fl; +extern SC_EXPRESS_EXPORT struct freelist_head LIST_fl; +extern SC_EXPRESS_EXPORT Linked_List LINK__l; /* for LISTcreate_with macro - ugh */ /******************************/ /* macro function definitions */ @@ -126,21 +126,21 @@ extern SCL_EXPRESS_EXPORT Linked_List LINK__l; /* for LISTcreate_with macro - u /* function prototypes */ /***********************/ -extern SCL_EXPRESS_EXPORT void LISTinitialize PROTO( ( void ) ); -extern SCL_EXPRESS_EXPORT void LISTcleanup PROTO( ( void ) ); -extern SCL_EXPRESS_EXPORT Linked_List LISTcreate PROTO( ( void ) ); -extern SCL_EXPRESS_EXPORT Linked_List LISTcopy PROTO( ( Linked_List ) ); -extern SCL_EXPRESS_EXPORT Generic LISTadd_first PROTO( ( Linked_List, Generic ) ); -extern SCL_EXPRESS_EXPORT Generic LISTadd_last PROTO( ( Linked_List, Generic ) ); -extern SCL_EXPRESS_EXPORT Generic LISTadd_after PROTO( ( Linked_List, Link, Generic ) ); -extern SCL_EXPRESS_EXPORT Generic LISTadd_before PROTO( ( Linked_List, Link, Generic ) ); -extern SCL_EXPRESS_EXPORT Generic LISTremove_first PROTO( ( Linked_List ) ); -extern SCL_EXPRESS_EXPORT Generic LISTremove PROTO( ( Linked_List, Link ) ); -extern SCL_EXPRESS_EXPORT Generic LISTget_first PROTO( ( Linked_List ) ); -extern SCL_EXPRESS_EXPORT Generic LISTget_second PROTO( ( Linked_List ) ); -extern SCL_EXPRESS_EXPORT Generic LISTget_nth PROTO( ( Linked_List, int ) ); -extern SCL_EXPRESS_EXPORT void LISTfree PROTO( ( Linked_List ) ); -extern SCL_EXPRESS_EXPORT int LISTget_length PROTO( ( Linked_List ) ); -extern SCL_EXPRESS_EXPORT bool LISTempty( Linked_List list ); +extern SC_EXPRESS_EXPORT void LISTinitialize PROTO( ( void ) ); +extern SC_EXPRESS_EXPORT void LISTcleanup PROTO( ( void ) ); +extern SC_EXPRESS_EXPORT Linked_List LISTcreate PROTO( ( void ) ); +extern SC_EXPRESS_EXPORT Linked_List LISTcopy PROTO( ( Linked_List ) ); +extern SC_EXPRESS_EXPORT Generic LISTadd_first PROTO( ( Linked_List, Generic ) ); +extern SC_EXPRESS_EXPORT Generic LISTadd_last PROTO( ( Linked_List, Generic ) ); +extern SC_EXPRESS_EXPORT Generic LISTadd_after PROTO( ( Linked_List, Link, Generic ) ); +extern SC_EXPRESS_EXPORT Generic LISTadd_before PROTO( ( Linked_List, Link, Generic ) ); +extern SC_EXPRESS_EXPORT Generic LISTremove_first PROTO( ( Linked_List ) ); +extern SC_EXPRESS_EXPORT Generic LISTremove PROTO( ( Linked_List, Link ) ); +extern SC_EXPRESS_EXPORT Generic LISTget_first PROTO( ( Linked_List ) ); +extern SC_EXPRESS_EXPORT Generic LISTget_second PROTO( ( Linked_List ) ); +extern SC_EXPRESS_EXPORT Generic LISTget_nth PROTO( ( Linked_List, int ) ); +extern SC_EXPRESS_EXPORT void LISTfree PROTO( ( Linked_List ) ); +extern SC_EXPRESS_EXPORT int LISTget_length PROTO( ( Linked_List ) ); +extern SC_EXPRESS_EXPORT bool LISTempty( Linked_List list ); #endif /*LINKED_LIST_H*/ diff --git a/include/express/memory.h b/include/express/memory.h index 94346ebe..78a1a79e 100644 --- a/include/express/memory.h +++ b/include/express/memory.h @@ -28,7 +28,7 @@ /* packages used */ /*****************/ -#include +#include /** \file memory.h - defs for fixed size block memory allocator */ @@ -66,7 +66,7 @@ char * nnew(); /* space allocation macros with error package: */ /***********************************************/ -extern SCL_EXPRESS_EXPORT int yylineno; +extern SC_EXPRESS_EXPORT int yylineno; /** CALLOC grabs and initializes to all 0s space for the indicated * number of instances of the indicated type */ @@ -75,10 +75,10 @@ extern SCL_EXPRESS_EXPORT int yylineno; fprintf(stderr,"fedex: out of space");\ } else {} -SCL_EXPRESS_EXPORT void _MEMinitialize PROTO( ( void ) ); -SCL_EXPRESS_EXPORT void MEMinitialize PROTO( ( struct freelist_head *, int, int, int ) ); -SCL_EXPRESS_EXPORT void MEM_destroy PROTO( ( struct freelist_head *, Freelist * ) ); -SCL_EXPRESS_EXPORT Generic MEM_new PROTO( ( struct freelist_head * ) ); +SC_EXPRESS_EXPORT void _MEMinitialize PROTO( ( void ) ); +SC_EXPRESS_EXPORT void MEMinitialize PROTO( ( struct freelist_head *, int, int, int ) ); +SC_EXPRESS_EXPORT void MEM_destroy PROTO( ( struct freelist_head *, Freelist * ) ); +SC_EXPRESS_EXPORT Generic MEM_new PROTO( ( struct freelist_head * ) ); #endif /* MEMORY_H */ diff --git a/include/express/object.h b/include/express/object.h index 13228653..d0f5052b 100644 --- a/include/express/object.h +++ b/include/express/object.h @@ -55,7 +55,7 @@ /* packages used */ /*****************/ -#include +#include #include "basic.h" /* get basic definitions */ #include "symbol.h" @@ -81,7 +81,7 @@ struct Object { /* global variables */ /********************/ -extern SCL_EXPRESS_EXPORT struct Object * OBJ; +extern SC_EXPRESS_EXPORT struct Object * OBJ; /******************************/ /* macro function definitions */ @@ -97,9 +97,9 @@ extern SCL_EXPRESS_EXPORT struct Object * OBJ; /* function prototypes */ /***********************/ -extern SCL_EXPRESS_EXPORT void OBJinitialize PROTO( ( void ) ); -extern SCL_EXPRESS_EXPORT void OBJcleanup PROTO( ( void ) ); -extern SCL_EXPRESS_EXPORT void OBJcreate PROTO( ( char, struct Symbol_ * ( * )( Generic ), char *, int ) ); -extern SCL_EXPRESS_EXPORT Symbol * UNK_get_symbol PROTO( ( Generic x ) ); +extern SC_EXPRESS_EXPORT void OBJinitialize PROTO( ( void ) ); +extern SC_EXPRESS_EXPORT void OBJcleanup PROTO( ( void ) ); +extern SC_EXPRESS_EXPORT void OBJcreate PROTO( ( char, struct Symbol_ * ( * )( Generic ), char *, int ) ); +extern SC_EXPRESS_EXPORT Symbol * UNK_get_symbol PROTO( ( Generic x ) ); #endif /*OBJECT_H*/ diff --git a/include/express/resolve.h b/include/express/resolve.h index de5bc913..f9649941 100644 --- a/include/express/resolve.h +++ b/include/express/resolve.h @@ -28,7 +28,7 @@ * Initial revision */ -#include +#include #include "expbasic.h" /* get basic definitions */ #include "type.h" #include "variable.h" @@ -45,20 +45,20 @@ /* global variables */ /********************/ -extern SCL_EXPRESS_EXPORT int print_objects_while_running; +extern SC_EXPRESS_EXPORT int print_objects_while_running; -extern SCL_EXPRESS_EXPORT Error ERROR_undefined_attribute; -extern SCL_EXPRESS_EXPORT Error ERROR_undefined_type; -extern SCL_EXPRESS_EXPORT Error ERROR_undefined_schema; -extern SCL_EXPRESS_EXPORT Error ERROR_unknown_attr_in_entity; -extern SCL_EXPRESS_EXPORT Error ERROR_unknown_subtype; -extern SCL_EXPRESS_EXPORT Error ERROR_unknown_supertype; -extern SCL_EXPRESS_EXPORT Error ERROR_circular_reference; -extern SCL_EXPRESS_EXPORT Error ERROR_ambiguous_attribute; -extern SCL_EXPRESS_EXPORT Error ERROR_ambiguous_group; +extern SC_EXPRESS_EXPORT Error ERROR_undefined_attribute; +extern SC_EXPRESS_EXPORT Error ERROR_undefined_type; +extern SC_EXPRESS_EXPORT Error ERROR_undefined_schema; +extern SC_EXPRESS_EXPORT Error ERROR_unknown_attr_in_entity; +extern SC_EXPRESS_EXPORT Error ERROR_unknown_subtype; +extern SC_EXPRESS_EXPORT Error ERROR_unknown_supertype; +extern SC_EXPRESS_EXPORT Error ERROR_circular_reference; +extern SC_EXPRESS_EXPORT Error ERROR_ambiguous_attribute; +extern SC_EXPRESS_EXPORT Error ERROR_ambiguous_group; -extern SCL_EXPRESS_EXPORT Error WARNING_case_skip_label; -extern SCL_EXPRESS_EXPORT Error WARNING_fn_skip_branch; +extern SC_EXPRESS_EXPORT Error WARNING_case_skip_label; +extern SC_EXPRESS_EXPORT Error WARNING_fn_skip_branch; /* macros */ @@ -73,14 +73,14 @@ extern SCL_EXPRESS_EXPORT Error WARNING_fn_skip_branch; /* function prototypes */ /***********************/ -extern SCL_EXPRESS_EXPORT void RESOLVEinitialize PROTO( ( void ) ); -extern SCL_EXPRESS_EXPORT void RESOLVEcleanup PROTO( ( void ) ); -extern SCL_EXPRESS_EXPORT void SCOPEresolve_expressions_statements PROTO( ( Scope ) ); -extern SCL_EXPRESS_EXPORT void SCOPEresolve_subsupers PROTO( ( Scope ) ); -extern SCL_EXPRESS_EXPORT void SCOPEresolve_types PROTO( ( Scope ) ); -extern SCL_EXPRESS_EXPORT void TYPE_resolve PROTO( ( Type * ) ); -extern SCL_EXPRESS_EXPORT void EXP_resolve PROTO( ( Expression, Scope, Type ) ); -extern SCL_EXPRESS_EXPORT void ALGresolve PROTO( ( Scope ) ); -extern SCL_EXPRESS_EXPORT void SCHEMAresolve PROTO( ( Scope ) ); +extern SC_EXPRESS_EXPORT void RESOLVEinitialize PROTO( ( void ) ); +extern SC_EXPRESS_EXPORT void RESOLVEcleanup PROTO( ( void ) ); +extern SC_EXPRESS_EXPORT void SCOPEresolve_expressions_statements PROTO( ( Scope ) ); +extern SC_EXPRESS_EXPORT void SCOPEresolve_subsupers PROTO( ( Scope ) ); +extern SC_EXPRESS_EXPORT void SCOPEresolve_types PROTO( ( Scope ) ); +extern SC_EXPRESS_EXPORT void TYPE_resolve PROTO( ( Type * ) ); +extern SC_EXPRESS_EXPORT void EXP_resolve PROTO( ( Expression, Scope, Type ) ); +extern SC_EXPRESS_EXPORT void ALGresolve PROTO( ( Scope ) ); +extern SC_EXPRESS_EXPORT void SCHEMAresolve PROTO( ( Scope ) ); #endif /*RESOLVE_H*/ diff --git a/include/express/schema.h b/include/express/schema.h index 649cc3ad..309d75f6 100644 --- a/include/express/schema.h +++ b/include/express/schema.h @@ -50,7 +50,7 @@ /* packages used */ /*****************/ -#include +#include #include "expbasic.h" /* get basic definitions */ #include "symbol.h" #include "scope.h" @@ -104,11 +104,11 @@ struct Schema_ { /* global variables */ /********************/ -extern SCL_EXPRESS_EXPORT struct freelist_head REN_fl; -extern SCL_EXPRESS_EXPORT struct freelist_head SCOPE_fl; -extern SCL_EXPRESS_EXPORT struct freelist_head SCHEMA_fl; +extern SC_EXPRESS_EXPORT struct freelist_head REN_fl; +extern SC_EXPRESS_EXPORT struct freelist_head SCOPE_fl; +extern SC_EXPRESS_EXPORT struct freelist_head SCHEMA_fl; -extern SCL_EXPRESS_EXPORT int __SCOPE_search_id; +extern SC_EXPRESS_EXPORT int __SCOPE_search_id; /******************************/ /* macro function definitions */ @@ -133,20 +133,20 @@ extern SCL_EXPRESS_EXPORT int __SCOPE_search_id; /* function prototypes */ /***********************/ -extern SCL_EXPRESS_EXPORT Variable VARfind PROTO( ( Scope, char *, int ) ); -extern SCL_EXPRESS_EXPORT Schema SCHEMAcreate PROTO( ( void ) ); -extern SCL_EXPRESS_EXPORT void SCHEMAinitialize PROTO( ( void ) ); -extern SCL_EXPRESS_EXPORT void SCHEMAadd_use PROTO( ( Schema, Symbol *, Symbol *, Symbol * ) ); -extern SCL_EXPRESS_EXPORT void SCHEMAadd_reference PROTO( ( Schema, Symbol *, Symbol *, Symbol * ) ); -extern SCL_EXPRESS_EXPORT void SCHEMAdefine_use PROTO( ( Schema, Rename * ) ); -extern SCL_EXPRESS_EXPORT void SCHEMAdefine_reference PROTO( ( Schema, Rename * ) ); -extern SCL_EXPRESS_EXPORT Generic SCHEMAfind PROTO( ( Schema, char * name, int search_refs ) ); -extern SCL_EXPRESS_EXPORT Scope SCOPEcreate PROTO( ( char ) ); -extern SCL_EXPRESS_EXPORT Scope SCOPEcreate_tiny PROTO( ( char ) ); -extern SCL_EXPRESS_EXPORT Scope SCOPEcreate_nostab PROTO( ( char ) ); -extern SCL_EXPRESS_EXPORT void SCOPEdestroy PROTO( ( Scope ) ); -extern SCL_EXPRESS_EXPORT Linked_List SCHEMAget_entities_use PROTO( ( Scope ) ); -extern SCL_EXPRESS_EXPORT Linked_List SCHEMAget_entities_ref PROTO( ( Scope ) ); +extern SC_EXPRESS_EXPORT Variable VARfind PROTO( ( Scope, char *, int ) ); +extern SC_EXPRESS_EXPORT Schema SCHEMAcreate PROTO( ( void ) ); +extern SC_EXPRESS_EXPORT void SCHEMAinitialize PROTO( ( void ) ); +extern SC_EXPRESS_EXPORT void SCHEMAadd_use PROTO( ( Schema, Symbol *, Symbol *, Symbol * ) ); +extern SC_EXPRESS_EXPORT void SCHEMAadd_reference PROTO( ( Schema, Symbol *, Symbol *, Symbol * ) ); +extern SC_EXPRESS_EXPORT void SCHEMAdefine_use PROTO( ( Schema, Rename * ) ); +extern SC_EXPRESS_EXPORT void SCHEMAdefine_reference PROTO( ( Schema, Rename * ) ); +extern SC_EXPRESS_EXPORT Generic SCHEMAfind PROTO( ( Schema, char * name, int search_refs ) ); +extern SC_EXPRESS_EXPORT Scope SCOPEcreate PROTO( ( char ) ); +extern SC_EXPRESS_EXPORT Scope SCOPEcreate_tiny PROTO( ( char ) ); +extern SC_EXPRESS_EXPORT Scope SCOPEcreate_nostab PROTO( ( char ) ); +extern SC_EXPRESS_EXPORT void SCOPEdestroy PROTO( ( Scope ) ); +extern SC_EXPRESS_EXPORT Linked_List SCHEMAget_entities_use PROTO( ( Scope ) ); +extern SC_EXPRESS_EXPORT Linked_List SCHEMAget_entities_ref PROTO( ( Scope ) ); #endif /* SCHEMA_H */ diff --git a/include/express/scope.h b/include/express/scope.h index 334f9767..c087fc03 100644 --- a/include/express/scope.h +++ b/include/express/scope.h @@ -49,7 +49,7 @@ /* modules used */ /****************/ -#include +#include #include "type.h" #include "variable.h" #include "entity.h" @@ -134,14 +134,14 @@ struct Scope_ { /* function prototypes */ /***********************/ -extern SCL_EXPRESS_EXPORT struct Symbol_ * SCOPE_get_symbol PROTO( ( Generic ) ); -extern SCL_EXPRESS_EXPORT void SCOPE_get_entities PROTO( ( Scope, Linked_List ) ); -extern SCL_EXPRESS_EXPORT Linked_List SCOPEget_entities PROTO( ( Scope ) ); -extern SCL_EXPRESS_EXPORT Linked_List SCOPEget_entities_superclass_order PROTO( ( Scope ) ); -extern SCL_EXPRESS_EXPORT Generic SCOPEfind PROTO( ( Scope, char *, int ) ); -extern SCL_EXPRESS_EXPORT void SCOPE_get_functions PROTO( ( Scope, Linked_List ) ); -extern SCL_EXPRESS_EXPORT Linked_List SCOPEget_functions PROTO( ( Scope ) ); -extern SCL_EXPRESS_EXPORT void SCOPE_get_rules PROTO( ( Scope, Linked_List ) ); -extern SCL_EXPRESS_EXPORT Linked_List SCOPEget_rules PROTO( ( Scope ) ); +extern SC_EXPRESS_EXPORT struct Symbol_ * SCOPE_get_symbol PROTO( ( Generic ) ); +extern SC_EXPRESS_EXPORT void SCOPE_get_entities PROTO( ( Scope, Linked_List ) ); +extern SC_EXPRESS_EXPORT Linked_List SCOPEget_entities PROTO( ( Scope ) ); +extern SC_EXPRESS_EXPORT Linked_List SCOPEget_entities_superclass_order PROTO( ( Scope ) ); +extern SC_EXPRESS_EXPORT Generic SCOPEfind PROTO( ( Scope, char *, int ) ); +extern SC_EXPRESS_EXPORT void SCOPE_get_functions PROTO( ( Scope, Linked_List ) ); +extern SC_EXPRESS_EXPORT Linked_List SCOPEget_functions PROTO( ( Scope ) ); +extern SC_EXPRESS_EXPORT void SCOPE_get_rules PROTO( ( Scope, Linked_List ) ); +extern SC_EXPRESS_EXPORT Linked_List SCOPEget_rules PROTO( ( Scope ) ); #endif /* SCOPE_H */ diff --git a/include/express/stmt.h b/include/express/stmt.h index e79ad90c..2a2acd10 100644 --- a/include/express/stmt.h +++ b/include/express/stmt.h @@ -48,7 +48,7 @@ /* packages used */ /*****************/ -#include +#include #include "expbasic.h" /* get basic definitions */ #include "scope.h" @@ -164,20 +164,20 @@ struct Return_Statement_ { /* global variables */ /********************/ -extern SCL_EXPRESS_EXPORT struct freelist_head STMT_fl; +extern SC_EXPRESS_EXPORT struct freelist_head STMT_fl; -extern SCL_EXPRESS_EXPORT struct freelist_head ALIAS_fl; -extern SCL_EXPRESS_EXPORT struct freelist_head ASSIGN_fl; -extern SCL_EXPRESS_EXPORT struct freelist_head CASE_fl; -extern SCL_EXPRESS_EXPORT struct freelist_head COMP_STMT_fl; -extern SCL_EXPRESS_EXPORT struct freelist_head COND_fl; -extern SCL_EXPRESS_EXPORT struct freelist_head LOOP_fl; -extern SCL_EXPRESS_EXPORT struct freelist_head PCALL_fl; -extern SCL_EXPRESS_EXPORT struct freelist_head RET_fl; -extern SCL_EXPRESS_EXPORT struct freelist_head INCR_fl; +extern SC_EXPRESS_EXPORT struct freelist_head ALIAS_fl; +extern SC_EXPRESS_EXPORT struct freelist_head ASSIGN_fl; +extern SC_EXPRESS_EXPORT struct freelist_head CASE_fl; +extern SC_EXPRESS_EXPORT struct freelist_head COMP_STMT_fl; +extern SC_EXPRESS_EXPORT struct freelist_head COND_fl; +extern SC_EXPRESS_EXPORT struct freelist_head LOOP_fl; +extern SC_EXPRESS_EXPORT struct freelist_head PCALL_fl; +extern SC_EXPRESS_EXPORT struct freelist_head RET_fl; +extern SC_EXPRESS_EXPORT struct freelist_head INCR_fl; -extern SCL_EXPRESS_EXPORT Statement STATEMENT_ESCAPE; -extern SCL_EXPRESS_EXPORT Statement STATEMENT_SKIP; +extern SC_EXPRESS_EXPORT Statement STATEMENT_ESCAPE; +extern SC_EXPRESS_EXPORT Statement STATEMENT_SKIP; /******************************/ /* macro function definitions */ @@ -225,17 +225,17 @@ extern SCL_EXPRESS_EXPORT Statement STATEMENT_SKIP; /* function prototypes */ /***********************/ -extern SCL_EXPRESS_EXPORT Statement STMTcreate PROTO( ( int ) ); -extern SCL_EXPRESS_EXPORT Statement ALIAScreate PROTO( ( struct Scope_ *, Variable, Linked_List ) ); -extern SCL_EXPRESS_EXPORT Statement CASEcreate PROTO( ( Expression , Linked_List ) ); -extern SCL_EXPRESS_EXPORT Statement ASSIGNcreate PROTO( ( Expression , Expression ) ); -extern SCL_EXPRESS_EXPORT Statement COMP_STMTcreate PROTO( ( Linked_List ) ); -extern SCL_EXPRESS_EXPORT Statement CONDcreate PROTO( ( Expression, Linked_List, Linked_List ) ); -extern SCL_EXPRESS_EXPORT Statement LOOPcreate PROTO( ( struct Scope_ *, Expression, Expression, Linked_List ) ); -extern SCL_EXPRESS_EXPORT Statement PCALLcreate PROTO( ( Linked_List ) ); -extern SCL_EXPRESS_EXPORT Statement RETcreate PROTO( ( Expression ) ); -extern SCL_EXPRESS_EXPORT void STMTinitialize PROTO( ( void ) ); -extern SCL_EXPRESS_EXPORT struct Scope_ * INCR_CTLcreate PROTO( ( Symbol *, Expression start, +extern SC_EXPRESS_EXPORT Statement STMTcreate PROTO( ( int ) ); +extern SC_EXPRESS_EXPORT Statement ALIAScreate PROTO( ( struct Scope_ *, Variable, Linked_List ) ); +extern SC_EXPRESS_EXPORT Statement CASEcreate PROTO( ( Expression , Linked_List ) ); +extern SC_EXPRESS_EXPORT Statement ASSIGNcreate PROTO( ( Expression , Expression ) ); +extern SC_EXPRESS_EXPORT Statement COMP_STMTcreate PROTO( ( Linked_List ) ); +extern SC_EXPRESS_EXPORT Statement CONDcreate PROTO( ( Expression, Linked_List, Linked_List ) ); +extern SC_EXPRESS_EXPORT Statement LOOPcreate PROTO( ( struct Scope_ *, Expression, Expression, Linked_List ) ); +extern SC_EXPRESS_EXPORT Statement PCALLcreate PROTO( ( Linked_List ) ); +extern SC_EXPRESS_EXPORT Statement RETcreate PROTO( ( Expression ) ); +extern SC_EXPRESS_EXPORT void STMTinitialize PROTO( ( void ) ); +extern SC_EXPRESS_EXPORT struct Scope_ * INCR_CTLcreate PROTO( ( Symbol *, Expression start, Expression end, Expression increment ) ); #endif /*STATEMENT_H*/ diff --git a/include/express/symbol.h b/include/express/symbol.h index d486d8f5..d2f4511f 100644 --- a/include/express/symbol.h +++ b/include/express/symbol.h @@ -43,7 +43,7 @@ /* packages used */ /*****************/ -#include +#include #include "basic.h" /* get basic definitions */ #include "memory.h" @@ -72,7 +72,7 @@ struct Symbol_ { /* global variables */ /********************/ -extern SCL_EXPRESS_EXPORT struct freelist_head SYMBOL_fl; +extern SC_EXPRESS_EXPORT struct freelist_head SYMBOL_fl; /******************************/ /* macro function definitions */ @@ -88,7 +88,7 @@ extern SCL_EXPRESS_EXPORT struct freelist_head SYMBOL_fl; /* function prototypes */ /***********************/ -extern SCL_EXPRESS_EXPORT void SYMBOLinitialize PROTO( ( void ) ); -SCL_EXPRESS_EXPORT Symbol * SYMBOLcreate( char * name, int line, char * filename ); +extern SC_EXPRESS_EXPORT void SYMBOLinitialize PROTO( ( void ) ); +SC_EXPRESS_EXPORT Symbol * SYMBOLcreate( char * name, int line, char * filename ); #endif /* SYMBOL_H */ diff --git a/include/express/type.h b/include/express/type.h index 2cf79906..18dd8e4e 100644 --- a/include/express/type.h +++ b/include/express/type.h @@ -106,7 +106,7 @@ enum type_enum { /* packages used */ /*****************/ -#include +#include #include "expbasic.h" /* get basic definitions */ #include "symbol.h" #include "object.h" @@ -178,41 +178,41 @@ struct TypeBody_ { /* Very commonly-used read-only types */ /* non-constant versions probably aren't necessary? */ -extern SCL_EXPRESS_EXPORT Type Type_Bad; -extern SCL_EXPRESS_EXPORT Type Type_Unknown; -extern SCL_EXPRESS_EXPORT Type Type_Dont_Care; -extern SCL_EXPRESS_EXPORT Type Type_Runtime; /**< indicates that this object can't be +extern SC_EXPRESS_EXPORT Type Type_Bad; +extern SC_EXPRESS_EXPORT Type Type_Unknown; +extern SC_EXPRESS_EXPORT Type Type_Dont_Care; +extern SC_EXPRESS_EXPORT Type Type_Runtime; /**< indicates that this object can't be calculated now but must be deferred until (the mythical) runtime */ -extern SCL_EXPRESS_EXPORT Type Type_Binary; -extern SCL_EXPRESS_EXPORT Type Type_Boolean; -extern SCL_EXPRESS_EXPORT Type Type_Enumeration; -extern SCL_EXPRESS_EXPORT Type Type_Expression; -extern SCL_EXPRESS_EXPORT Type Type_Aggregate; -extern SCL_EXPRESS_EXPORT Type Type_Integer; -extern SCL_EXPRESS_EXPORT Type Type_Integer; -extern SCL_EXPRESS_EXPORT Type Type_Number; -extern SCL_EXPRESS_EXPORT Type Type_Real; -extern SCL_EXPRESS_EXPORT Type Type_String; -extern SCL_EXPRESS_EXPORT Type Type_String_Encoded; -extern SCL_EXPRESS_EXPORT Type Type_Logical; -extern SCL_EXPRESS_EXPORT Type Type_Set; -extern SCL_EXPRESS_EXPORT Type Type_Attribute; -extern SCL_EXPRESS_EXPORT Type Type_Entity; -extern SCL_EXPRESS_EXPORT Type Type_Funcall; -extern SCL_EXPRESS_EXPORT Type Type_Generic; -extern SCL_EXPRESS_EXPORT Type Type_Identifier; -extern SCL_EXPRESS_EXPORT Type Type_Oneof; -extern SCL_EXPRESS_EXPORT Type Type_Query; -extern SCL_EXPRESS_EXPORT Type Type_Self; -extern SCL_EXPRESS_EXPORT Type Type_Set_Of_String; -extern SCL_EXPRESS_EXPORT Type Type_Set_Of_Generic; -extern SCL_EXPRESS_EXPORT Type Type_Bag_Of_Generic; +extern SC_EXPRESS_EXPORT Type Type_Binary; +extern SC_EXPRESS_EXPORT Type Type_Boolean; +extern SC_EXPRESS_EXPORT Type Type_Enumeration; +extern SC_EXPRESS_EXPORT Type Type_Expression; +extern SC_EXPRESS_EXPORT Type Type_Aggregate; +extern SC_EXPRESS_EXPORT Type Type_Integer; +extern SC_EXPRESS_EXPORT Type Type_Integer; +extern SC_EXPRESS_EXPORT Type Type_Number; +extern SC_EXPRESS_EXPORT Type Type_Real; +extern SC_EXPRESS_EXPORT Type Type_String; +extern SC_EXPRESS_EXPORT Type Type_String_Encoded; +extern SC_EXPRESS_EXPORT Type Type_Logical; +extern SC_EXPRESS_EXPORT Type Type_Set; +extern SC_EXPRESS_EXPORT Type Type_Attribute; +extern SC_EXPRESS_EXPORT Type Type_Entity; +extern SC_EXPRESS_EXPORT Type Type_Funcall; +extern SC_EXPRESS_EXPORT Type Type_Generic; +extern SC_EXPRESS_EXPORT Type Type_Identifier; +extern SC_EXPRESS_EXPORT Type Type_Oneof; +extern SC_EXPRESS_EXPORT Type Type_Query; +extern SC_EXPRESS_EXPORT Type Type_Self; +extern SC_EXPRESS_EXPORT Type Type_Set_Of_String; +extern SC_EXPRESS_EXPORT Type Type_Set_Of_Generic; +extern SC_EXPRESS_EXPORT Type Type_Bag_Of_Generic; -extern SCL_EXPRESS_EXPORT struct freelist_head TYPEHEAD_fl; -extern SCL_EXPRESS_EXPORT struct freelist_head TYPEBODY_fl; +extern SC_EXPRESS_EXPORT struct freelist_head TYPEHEAD_fl; +extern SC_EXPRESS_EXPORT struct freelist_head TYPEBODY_fl; -extern SCL_EXPRESS_EXPORT Error ERROR_corrupted_type; +extern SC_EXPRESS_EXPORT Error ERROR_corrupted_type; /******************************/ /* macro function definitions */ @@ -288,20 +288,20 @@ extern SCL_EXPRESS_EXPORT Error ERROR_corrupted_type; /* function prototypes */ /***********************/ -extern SCL_EXPRESS_EXPORT Type TYPEcreate_partial PROTO( ( struct Symbol_ *, Scope ) ); +extern SC_EXPRESS_EXPORT Type TYPEcreate_partial PROTO( ( struct Symbol_ *, Scope ) ); -extern SCL_EXPRESS_EXPORT Type TYPEcreate PROTO( ( enum type_enum ) ); -extern SCL_EXPRESS_EXPORT Type TYPEcreate_from_body_anonymously PROTO( ( TypeBody ) ); -extern SCL_EXPRESS_EXPORT Type TYPEcreate_name PROTO( ( struct Symbol_ * ) ); -extern SCL_EXPRESS_EXPORT Type TYPEcreate_nostab PROTO( ( struct Symbol_ *, Scope, char ) ); -extern SCL_EXPRESS_EXPORT TypeBody TYPEBODYcreate PROTO( ( enum type_enum ) ); -extern SCL_EXPRESS_EXPORT void TYPEinitialize PROTO( ( void ) ); -extern SCL_EXPRESS_EXPORT void TYPEcleanup PROTO( ( void ) ); +extern SC_EXPRESS_EXPORT Type TYPEcreate PROTO( ( enum type_enum ) ); +extern SC_EXPRESS_EXPORT Type TYPEcreate_from_body_anonymously PROTO( ( TypeBody ) ); +extern SC_EXPRESS_EXPORT Type TYPEcreate_name PROTO( ( struct Symbol_ * ) ); +extern SC_EXPRESS_EXPORT Type TYPEcreate_nostab PROTO( ( struct Symbol_ *, Scope, char ) ); +extern SC_EXPRESS_EXPORT TypeBody TYPEBODYcreate PROTO( ( enum type_enum ) ); +extern SC_EXPRESS_EXPORT void TYPEinitialize PROTO( ( void ) ); +extern SC_EXPRESS_EXPORT void TYPEcleanup PROTO( ( void ) ); -extern SCL_EXPRESS_EXPORT bool TYPEinherits_from PROTO( ( Type, enum type_enum ) ); -extern SCL_EXPRESS_EXPORT Type TYPEget_nonaggregate_base_type PROTO( ( Type ) ); +extern SC_EXPRESS_EXPORT bool TYPEinherits_from PROTO( ( Type, enum type_enum ) ); +extern SC_EXPRESS_EXPORT Type TYPEget_nonaggregate_base_type PROTO( ( Type ) ); -extern SCL_EXPRESS_EXPORT Type TYPEcreate_user_defined_type PROTO( ( Type, Scope, struct Symbol_ * ) ); -extern SCL_EXPRESS_EXPORT Type TYPEcreate_user_defined_tag PROTO( ( Type, Scope, struct Symbol_ * ) ); +extern SC_EXPRESS_EXPORT Type TYPEcreate_user_defined_type PROTO( ( Type, Scope, struct Symbol_ * ) ); +extern SC_EXPRESS_EXPORT Type TYPEcreate_user_defined_tag PROTO( ( Type, Scope, struct Symbol_ * ) ); #endif /* TYPE_H */ diff --git a/include/express/variable.h b/include/express/variable.h index e629b9af..f1b56578 100644 --- a/include/express/variable.h +++ b/include/express/variable.h @@ -99,7 +99,7 @@ struct Variable_ { /* global variables */ /********************/ -extern SCL_EXPRESS_EXPORT struct freelist_head VAR_fl; +extern SC_EXPRESS_EXPORT struct freelist_head VAR_fl; /******************************/ /* macro function definitions */ @@ -125,8 +125,8 @@ extern SCL_EXPRESS_EXPORT struct freelist_head VAR_fl; /* function prototypes */ /***********************/ -extern SCL_EXPRESS_EXPORT Variable VARcreate PROTO( ( Expression, Type ) ); -extern SCL_EXPRESS_EXPORT void VARinitialize PROTO( ( void ) ); -extern SCL_EXPRESS_EXPORT char * VARget_simple_name PROTO( ( Variable ) ); +extern SC_EXPRESS_EXPORT Variable VARcreate PROTO( ( Expression, Type ) ); +extern SC_EXPRESS_EXPORT void VARinitialize PROTO( ( void ) ); +extern SC_EXPRESS_EXPORT char * VARget_simple_name PROTO( ( Variable ) ); #endif /* VARIABLE_H */ diff --git a/include/scl_cf_cmake.h.in b/include/sc_cf_cmake.h.in similarity index 100% rename from include/scl_cf_cmake.h.in rename to include/sc_cf_cmake.h.in diff --git a/include/sc_export.h b/include/sc_export.h new file mode 100644 index 00000000..e128c490 --- /dev/null +++ b/include/sc_export.h @@ -0,0 +1,108 @@ +#ifndef SC_EXPORT_H +#define SC_EXPORT_H + +/* Import/Export flags for base. */ +#ifndef SC_BASE_EXPORT +# if defined(SC_BASE_DLL_EXPORTS) && defined(SC_BASE_DLL_IMPORTS) +# error "Only SC_BASE_DLL_EXPORTS or SC_BASE_DLL_IMPORTS can be defined, not both." +# elif defined(SC_BASE_DLL_EXPORTS) +# define SC_BASE_EXPORT __declspec(dllexport) +# elif defined(SC_BASE_DLL_IMPORTS) +# define SC_BASE_EXPORT __declspec(dllimport) +# else +# define SC_BASE_EXPORT +# endif +#endif + +/* Import/Export flags for express. */ +#ifndef SC_EXPRESS_EXPORT +# if defined(SC_EXPRESS_DLL_EXPORTS) && defined(SC_EXPRESS_DLL_IMPORTS) +# error "Only SC_EXPRESS_DLL_EXPORTS or SC_EXPRESS_DLL_IMPORTS can be defined, not both." +# elif defined(SC_EXPRESS_DLL_EXPORTS) +# define SC_EXPRESS_EXPORT __declspec(dllexport) +# elif defined(SC_EXPRESS_DLL_IMPORTS) +# define SC_EXPRESS_EXPORT __declspec(dllimport) +# else +# define SC_EXPRESS_EXPORT +# endif +#endif + +/* Import/Export flags for exppp. */ +#ifndef SC_EXPPP_EXPORT +# if defined(SC_EXPPP_DLL_EXPORTS) && defined(SC_EXPPP_DLL_IMPORTS) +# error "Only SC_EXPPP_DLL_EXPORTS or SC_EXPPP_DLL_IMPORTS can be defined, not both." +# elif defined(SC_EXPPP_DLL_EXPORTS) +# define SC_EXPPP_EXPORT __declspec(dllexport) +# elif defined(SC_EXPPP_DLL_IMPORTS) +# define SC_EXPPP_EXPORT __declspec(dllimport) +# else +# define SC_EXPPP_EXPORT +# endif +#endif + +/* Import/Export flags for utils. */ +#ifndef SC_UTILS_EXPORT +# if defined(SC_UTILS_DLL_EXPORTS) && defined(SC_UTILS_DLL_IMPORTS) +# error "Only SC_UTILS_DLL_EXPORTS or SC_UTILS_DLL_IMPORTS can be defined, not both." +# elif defined(SC_UTILS_DLL_EXPORTS) +# define SC_UTILS_EXPORT __declspec(dllexport) +# elif defined(SC_UTILS_DLL_IMPORTS) +# define SC_UTILS_EXPORT __declspec(dllimport) +# else +# define SC_UTILS_EXPORT +# endif +#endif + +/* Import/Export flags for dai. */ +#ifndef SC_DAI_EXPORT +# if defined(SC_DAI_DLL_EXPORTS) && defined(SC_DAI_DLL_IMPORTS) +# error "Only SC_DAI_DLL_EXPORTS or SC_DAI_DLL_IMPORTS can be defined, not both." +# elif defined(SC_DAI_DLL_EXPORTS) +# define SC_DAI_EXPORT __declspec(dllexport) +# elif defined(SC_DAI_DLL_IMPORTS) +# define SC_DAI_EXPORT __declspec(dllimport) +# else +# define SC_DAI_EXPORT +# endif +#endif + +/* Import/Export flags for core. */ +#ifndef SC_CORE_EXPORT +# if defined(SC_CORE_DLL_EXPORTS) && defined(SC_CORE_DLL_IMPORTS) +# error "Only SC_CORE_DLL_EXPORTS or SC_CORE_DLL_IMPORTS can be defined, not both." +# elif defined(SC_CORE_DLL_EXPORTS) +# define SC_CORE_EXPORT __declspec(dllexport) +# elif defined(SC_CORE_DLL_IMPORTS) +# define SC_CORE_EXPORT __declspec(dllimport) +# else +# define SC_CORE_EXPORT +# endif +#endif + +/* Import/Export flags for editor. */ +#ifndef SC_EDITOR_EXPORT +# if defined(SC_EDITOR_DLL_EXPORTS) && defined(SC_EDITOR_DLL_IMPORTS) +# error "Only SC_EDITOR_DLL_EXPORTS or SC_EDITOR_DLL_IMPORTS can be defined, not both." +# elif defined(SC_EDITOR_DLL_EXPORTS) +# define SC_EDITOR_EXPORT __declspec(dllexport) +# elif defined(SC_EDITOR_DLL_IMPORTS) +# define SC_EDITOR_EXPORT __declspec(dllimport) +# else +# define SC_EDITOR_EXPORT +# endif +#endif + +/* Import/Export flags for lazyfile. */ +#ifndef SC_LAZYFILE_EXPORT +# if defined(SC_LAZYFILE_DLL_EXPORTS) && defined(SC_LAZYFILE_DLL_IMPORTS) +# error "Only SC_LAZYFILE_DLL_EXPORTS or SC_LAZYFILE_DLL_IMPORTS can be defined, not both." +# elif defined(SC_LAZYFILE_DLL_EXPORTS) +# define SC_LAZYFILE_EXPORT __declspec(dllexport) +# elif defined(SC_LAZYFILE_DLL_IMPORTS) +# define SC_LAZYFILE_EXPORT __declspec(dllimport) +# else +# define SC_LAZYFILE_EXPORT +# endif +#endif + +#endif /* SC_EXPORT_H */ diff --git a/include/scl_stdbool.h b/include/sc_stdbool.h similarity index 100% rename from include/scl_stdbool.h rename to include/sc_stdbool.h diff --git a/include/scl_export.h b/include/scl_export.h deleted file mode 100644 index 85f341db..00000000 --- a/include/scl_export.h +++ /dev/null @@ -1,108 +0,0 @@ -#ifndef SCL_EXPORT_H -#define SCL_EXPORT_H - -/* Import/Export flags for base. */ -#ifndef SCL_BASE_EXPORT -# if defined(SCL_BASE_DLL_EXPORTS) && defined(SCL_BASE_DLL_IMPORTS) -# error "Only SCL_BASE_DLL_EXPORTS or SCL_BASE_DLL_IMPORTS can be defined, not both." -# elif defined(SCL_BASE_DLL_EXPORTS) -# define SCL_BASE_EXPORT __declspec(dllexport) -# elif defined(SCL_BASE_DLL_IMPORTS) -# define SCL_BASE_EXPORT __declspec(dllimport) -# else -# define SCL_BASE_EXPORT -# endif -#endif - -/* Import/Export flags for express. */ -#ifndef SCL_EXPRESS_EXPORT -# if defined(SCL_EXPRESS_DLL_EXPORTS) && defined(SCL_EXPRESS_DLL_IMPORTS) -# error "Only SCL_EXPRESS_DLL_EXPORTS or SCL_EXPRESS_DLL_IMPORTS can be defined, not both." -# elif defined(SCL_EXPRESS_DLL_EXPORTS) -# define SCL_EXPRESS_EXPORT __declspec(dllexport) -# elif defined(SCL_EXPRESS_DLL_IMPORTS) -# define SCL_EXPRESS_EXPORT __declspec(dllimport) -# else -# define SCL_EXPRESS_EXPORT -# endif -#endif - -/* Import/Export flags for exppp. */ -#ifndef SCL_EXPPP_EXPORT -# if defined(SCL_EXPPP_DLL_EXPORTS) && defined(SCL_EXPPP_DLL_IMPORTS) -# error "Only SCL_EXPPP_DLL_EXPORTS or SCL_EXPPP_DLL_IMPORTS can be defined, not both." -# elif defined(SCL_EXPPP_DLL_EXPORTS) -# define SCL_EXPPP_EXPORT __declspec(dllexport) -# elif defined(SCL_EXPPP_DLL_IMPORTS) -# define SCL_EXPPP_EXPORT __declspec(dllimport) -# else -# define SCL_EXPPP_EXPORT -# endif -#endif - -/* Import/Export flags for utils. */ -#ifndef SCL_UTILS_EXPORT -# if defined(SCL_UTILS_DLL_EXPORTS) && defined(SCL_UTILS_DLL_IMPORTS) -# error "Only SCL_UTILS_DLL_EXPORTS or SCL_UTILS_DLL_IMPORTS can be defined, not both." -# elif defined(SCL_UTILS_DLL_EXPORTS) -# define SCL_UTILS_EXPORT __declspec(dllexport) -# elif defined(SCL_UTILS_DLL_IMPORTS) -# define SCL_UTILS_EXPORT __declspec(dllimport) -# else -# define SCL_UTILS_EXPORT -# endif -#endif - -/* Import/Export flags for dai. */ -#ifndef SCL_DAI_EXPORT -# if defined(SCL_DAI_DLL_EXPORTS) && defined(SCL_DAI_DLL_IMPORTS) -# error "Only SCL_DAI_DLL_EXPORTS or SCL_DAI_DLL_IMPORTS can be defined, not both." -# elif defined(SCL_DAI_DLL_EXPORTS) -# define SCL_DAI_EXPORT __declspec(dllexport) -# elif defined(SCL_DAI_DLL_IMPORTS) -# define SCL_DAI_EXPORT __declspec(dllimport) -# else -# define SCL_DAI_EXPORT -# endif -#endif - -/* Import/Export flags for core. */ -#ifndef SCL_CORE_EXPORT -# if defined(SCL_CORE_DLL_EXPORTS) && defined(SCL_CORE_DLL_IMPORTS) -# error "Only SCL_CORE_DLL_EXPORTS or SCL_CORE_DLL_IMPORTS can be defined, not both." -# elif defined(SCL_CORE_DLL_EXPORTS) -# define SCL_CORE_EXPORT __declspec(dllexport) -# elif defined(SCL_CORE_DLL_IMPORTS) -# define SCL_CORE_EXPORT __declspec(dllimport) -# else -# define SCL_CORE_EXPORT -# endif -#endif - -/* Import/Export flags for editor. */ -#ifndef SCL_EDITOR_EXPORT -# if defined(SCL_EDITOR_DLL_EXPORTS) && defined(SCL_EDITOR_DLL_IMPORTS) -# error "Only SCL_EDITOR_DLL_EXPORTS or SCL_EDITOR_DLL_IMPORTS can be defined, not both." -# elif defined(SCL_EDITOR_DLL_EXPORTS) -# define SCL_EDITOR_EXPORT __declspec(dllexport) -# elif defined(SCL_EDITOR_DLL_IMPORTS) -# define SCL_EDITOR_EXPORT __declspec(dllimport) -# else -# define SCL_EDITOR_EXPORT -# endif -#endif - -/* Import/Export flags for lazyfile. */ -#ifndef SCL_LAZYFILE_EXPORT -# if defined(SCL_LAZYFILE_DLL_EXPORTS) && defined(SCL_LAZYFILE_DLL_IMPORTS) -# error "Only SCL_LAZYFILE_DLL_EXPORTS or SCL_LAZYFILE_DLL_IMPORTS can be defined, not both." -# elif defined(SCL_LAZYFILE_DLL_EXPORTS) -# define SCL_LAZYFILE_EXPORT __declspec(dllexport) -# elif defined(SCL_LAZYFILE_DLL_IMPORTS) -# define SCL_LAZYFILE_EXPORT __declspec(dllimport) -# else -# define SCL_LAZYFILE_EXPORT -# endif -#endif - -#endif /* SCL_EXPORT_H */ diff --git a/lcov.cmake b/lcov.cmake index 0cafbf81..e5f3661c 100644 --- a/lcov.cmake +++ b/lcov.cmake @@ -12,10 +12,10 @@ set( CTEST_MEMORYCHECK_COMMAND /usr/bin/valgrind ) set( CTEST_INITIAL_CACHE " SITE:STRING=${CTEST_SITE} BUILDNAME:STRING=${CTEST_BUILD_NAME} -SCL_ENABLE_TESTING:BOOL=ON -SCL_ENABLE_COVERAGE:BOOL=ON -SCL_BUILD_SCHEMAS:STRING=ALL -SCL_BUILD_TYPE:STRING=Debug +SC_ENABLE_TESTING:BOOL=ON +SC_ENABLE_COVERAGE:BOOL=ON +SC_BUILD_SCHEMAS:STRING=ALL +SC_BUILD_TYPE:STRING=Debug ") set( LCOV_OUT "${CTEST_BINARY_DIRECTORY}/lcov_html" ) @@ -23,7 +23,7 @@ set( LCOV_OUT "${CTEST_BINARY_DIRECTORY}/lcov_html" ) ctest_start(lcov) ctest_empty_binary_directory(${CTEST_BINARY_DIRECTORY}) message("configuring...") -ctest_configure( BUILD "${CTEST_BINARY_DIRECTORY}" OPTIONS "-DSCL_BUILD_SCHEMAS=ALL;-DSCL_ENABLE_COVERAGE=ON;-SCL_PYTHON_GENERATOR=OFF" ) +ctest_configure( BUILD "${CTEST_BINARY_DIRECTORY}" OPTIONS "-DSC_BUILD_SCHEMAS=ALL;-DSC_ENABLE_COVERAGE=ON;-SC_PYTHON_GENERATOR=OFF" ) message("lcov: resetting counters...") execute_process( COMMAND lcov -z -d . WORKING_DIRECTORY ${CTEST_BINARY_DIRECTORY} OUTPUT_QUIET ) diff --git a/run_ctest.cmake b/run_ctest.cmake index a3d88d0b..aff3ef7b 100644 --- a/run_ctest.cmake +++ b/run_ctest.cmake @@ -8,23 +8,23 @@ set( CTEST_MEMORYCHECK_COMMAND /usr/bin/valgrind ) set( CTEST_INITIAL_CACHE " SITE:STRING=${CTEST_SITE} BUILDNAME:STRING=${CTEST_BUILD_NAME} -SCL_ENABLE_TESTING:BOOL=ON -SCL_BUILD_TYPE:STRING=Debug +SC_ENABLE_TESTING:BOOL=ON +SC_BUILD_TYPE:STRING=Debug ") -if( EXISTS "../.SCL_CTEST_PREFS.cmake" ) - include( "../.SCL_CTEST_PREFS.cmake" ) +if( EXISTS "../.SC_CTEST_PREFS.cmake" ) + include( "../.SC_CTEST_PREFS.cmake" ) else() - message( WARNING "Did not find ../.SCL_CTEST_PREFS.cmake, containing config variables - result submission disabled" ) + message( WARNING "Did not find ../.SC_CTEST_PREFS.cmake, containing config variables - result submission disabled" ) set( SKIP_SUBMISSION TRUE ) endif() ###################################################### ###################################################### # use config variables such as these in -# ../.SCL_CTEST_PREFS.cmake +# ../.SC_CTEST_PREFS.cmake # #set( CTEST_SITE "username") #set( CTEST_BUILD_NAME "build type, os, arch") @@ -66,7 +66,7 @@ file(WRITE "${CTEST_BINARY_DIRECTORY}/CTestCustom.cmake" " set( CTEST_CUSTOM_ERROR_EXCEPTION \"{standard input}:[0-9][0-9]*: WARNING: \") ") -ctest_configure( BUILD "${CTEST_BINARY_DIRECTORY}" APPEND OPTIONS -DSCL_ENABLE_TESTING=ON ) +ctest_configure( BUILD "${CTEST_BINARY_DIRECTORY}" APPEND OPTIONS -DSC_ENABLE_TESTING=ON ) SUBMIT_TEST( Configure ) ctest_build( BUILD "${CTEST_BINARY_DIRECTORY}" APPEND ) SUBMIT_TEST( Build ) diff --git a/src/base/CMakeLists.txt b/src/base/CMakeLists.txt index 9d0db8a6..55d5ce9d 100644 --- a/src/base/CMakeLists.txt +++ b/src/base/CMakeLists.txt @@ -1,20 +1,20 @@ -set(SCL_BASE_SOURCES - scl_memmgr.cc - scl_trace_fprintf.c +set(SC_BASE_SOURCES + sc_memmgr.cc + sc_trace_fprintf.c sc_getopt.cc sc_benchmark.cc ) if(MINGW OR MSVC OR BORLAND) -add_definitions( -DSCL_BASE_DLL_EXPORTS ) +add_definitions( -DSC_BASE_DLL_EXPORTS ) endif() -if (${SCL_MEMMGR_ENABLE_CHECKS}) - add_definitions( -DSCL_MEMMGR_ENABLE_CHECKS ) +if (${SC_MEMMGR_ENABLE_CHECKS}) + add_definitions( -DSC_MEMMGR_ENABLE_CHECKS ) endif() -SCL_ADDLIB(base "${SCL_BASE_SOURCES}" "") +SC_ADDLIB(base "${SC_BASE_SOURCES}" "") if(MINGW OR MSVC OR BORLAND) target_link_libraries(base psapi.lib) diff --git a/src/base/judy/src/judy.h b/src/base/judy/src/judy.h index 12655c06..8721fc29 100644 --- a/src/base/judy/src/judy.h +++ b/src/base/judy/src/judy.h @@ -33,15 +33,15 @@ // judy_del: delete the key and cell for the current stack entry. /* Import/Export flags for base. */ -#ifndef SCL_BASE_EXPORT -# if defined(SCL_BASE_DLL_EXPORTS) && defined(SCL_BASE_DLL_IMPORTS) -# error "Only SCL_BASE_DLL_EXPORTS or SCL_BASE_DLL_IMPORTS can be defined, not both." -# elif defined(SCL_BASE_DLL_EXPORTS) -# define SCL_BASE_EXPORT __declspec(dllexport) -# elif defined(SCL_BASE_DLL_IMPORTS) -# define SCL_BASE_EXPORT __declspec(dllimport) +#ifndef SC_BASE_EXPORT +# if defined(SC_BASE_DLL_EXPORTS) && defined(SC_BASE_DLL_IMPORTS) +# error "Only SC_BASE_DLL_EXPORTS or SC_BASE_DLL_IMPORTS can be defined, not both." +# elif defined(SC_BASE_DLL_EXPORTS) +# define SC_BASE_EXPORT __declspec(dllexport) +# elif defined(SC_BASE_DLL_IMPORTS) +# define SC_BASE_EXPORT __declspec(dllimport) # else -# define SCL_BASE_EXPORT +# define SC_BASE_EXPORT # endif #endif @@ -145,40 +145,40 @@ extern "C" { #endif /// open a new judy array returning a judy object. - SCL_BASE_EXPORT Judy * judy_open( unsigned int max, unsigned int depth ); + SC_BASE_EXPORT Judy * judy_open( unsigned int max, unsigned int depth ); /// close an open judy array, freeing all memory. - SCL_BASE_EXPORT void judy_close( Judy * judy ); + SC_BASE_EXPORT void judy_close( Judy * judy ); /// clone an open judy array, duplicating the stack. - SCL_BASE_EXPORT Judy * judy_clone( Judy * judy ); + SC_BASE_EXPORT Judy * judy_clone( Judy * judy ); /// allocate data memory within judy array for external use. - SCL_BASE_EXPORT void * judy_data( Judy * judy, unsigned int amt ); + SC_BASE_EXPORT void * judy_data( Judy * judy, unsigned int amt ); /// insert a key into the judy array, return cell pointer. - SCL_BASE_EXPORT JudySlot * judy_cell( Judy * judy, const unsigned char * buff, unsigned int max ); + SC_BASE_EXPORT JudySlot * judy_cell( Judy * judy, const unsigned char * buff, unsigned int max ); /// retrieve the cell pointer greater than or equal to given key - SCL_BASE_EXPORT JudySlot * judy_strt( Judy * judy, const unsigned char * buff, unsigned int max ); + SC_BASE_EXPORT JudySlot * judy_strt( Judy * judy, const unsigned char * buff, unsigned int max ); /// retrieve the cell pointer, or return NULL for a given key. - SCL_BASE_EXPORT JudySlot * judy_slot( Judy * judy, const unsigned char * buff, unsigned int max ); + SC_BASE_EXPORT JudySlot * judy_slot( Judy * judy, const unsigned char * buff, unsigned int max ); /// retrieve the string value for the most recent judy query. - SCL_BASE_EXPORT unsigned int judy_key( Judy * judy, unsigned char * buff, unsigned int max ); + SC_BASE_EXPORT unsigned int judy_key( Judy * judy, unsigned char * buff, unsigned int max ); /// retrieve the cell pointer for the last string in the array. - SCL_BASE_EXPORT JudySlot * judy_end( Judy * judy ); + SC_BASE_EXPORT JudySlot * judy_end( Judy * judy ); /// retrieve the cell pointer for the next string in the array. - SCL_BASE_EXPORT JudySlot * judy_nxt( Judy * judy ); + SC_BASE_EXPORT JudySlot * judy_nxt( Judy * judy ); /// retrieve the cell pointer for the prev string in the array. - SCL_BASE_EXPORT JudySlot * judy_prv( Judy * judy ); + SC_BASE_EXPORT JudySlot * judy_prv( Judy * judy ); /// delete the key and cell for the current stack entry. - SCL_BASE_EXPORT JudySlot * judy_del( Judy * judy ); + SC_BASE_EXPORT JudySlot * judy_del( Judy * judy ); #ifdef __cplusplus } diff --git a/src/base/sc_benchmark.cc b/src/base/sc_benchmark.cc index b3af6198..abd6d21e 100644 --- a/src/base/sc_benchmark.cc +++ b/src/base/sc_benchmark.cc @@ -1,7 +1,7 @@ /// \file sc_benchmark.cc memory info, timers, etc for benchmarking #include "sc_benchmark.h" -#include "scl_memmgr.h" +#include "sc_memmgr.h" #ifdef __WIN32__ #include diff --git a/src/base/sc_benchmark.h b/src/base/sc_benchmark.h index 15558a33..e886f12b 100644 --- a/src/base/sc_benchmark.h +++ b/src/base/sc_benchmark.h @@ -2,13 +2,13 @@ #define SC_BENCHMARK_H /// \file sc_benchmark.h memory info, timers, etc for benchmarking -#include "scl_export.h" +#include "sc_export.h" #ifdef __cplusplus #include #include -#include "scl_memmgr.h" +#include "sc_memmgr.h" extern "C" { #endif @@ -22,7 +22,7 @@ extern "C" { * * not yet implemented for OSX or Windows. */ - SCL_BASE_EXPORT benchVals getMemAndTime( ); + SC_BASE_EXPORT benchVals getMemAndTime( ); #ifdef __cplusplus } @@ -37,7 +37,7 @@ extern "C" { * * depends on getMemAndTime() above - may not work on all platforms. */ -class SCL_BASE_EXPORT benchmark { +class SC_BASE_EXPORT benchmark { protected: benchVals initialVals, laterVals; std::ostream & ostr; diff --git a/src/base/sc_getopt.h b/src/base/sc_getopt.h index 590a4bdc..50e41a08 100644 --- a/src/base/sc_getopt.h +++ b/src/base/sc_getopt.h @@ -15,16 +15,16 @@ #ifndef XGETOPT_H #define XGETOPT_H -#include "scl_export.h" +#include "sc_export.h" #ifdef __cplusplus extern "C" { #endif - extern SCL_BASE_EXPORT int optind, opterr; - extern SCL_BASE_EXPORT char * optarg; + extern SC_BASE_EXPORT int optind, opterr; + extern SC_BASE_EXPORT char * optarg; - int SCL_BASE_EXPORT sc_getopt( int argc, char * argv[], char * optstring ); + int SC_BASE_EXPORT sc_getopt( int argc, char * argv[], char * optstring ); #ifdef __cplusplus } diff --git a/src/base/scl_memmgr.cc b/src/base/sc_memmgr.cc similarity index 56% rename from src/base/scl_memmgr.cc rename to src/base/sc_memmgr.cc index af276c41..d1a3600a 100644 --- a/src/base/scl_memmgr.cc +++ b/src/base/sc_memmgr.cc @@ -1,8 +1,8 @@ -#define SCL_MEMMGR_CC +#define SC_MEMMGR_CC -#include -#include "scl_memmgr.h" +#include +#include "sc_memmgr.h" #if __APPLE__ # include @@ -14,47 +14,47 @@ #include #include -#ifdef SCL_MEMMGR_ENABLE_CHECKS +#ifdef SC_MEMMGR_ENABLE_CHECKS /** - scl_memmgr_error definition + sc_memmgr_error definition */ -class scl_memmgr_error { +class sc_memmgr_error { private: std::string _srcfile; unsigned int _srcline; unsigned int _occurences; public: - scl_memmgr_error( const std::string & file, const unsigned int line ); - scl_memmgr_error( const scl_memmgr_error & rhs ); - ~scl_memmgr_error( void ); + sc_memmgr_error( const std::string & file, const unsigned int line ); + sc_memmgr_error( const sc_memmgr_error & rhs ); + ~sc_memmgr_error( void ); - bool operator<( const scl_memmgr_error & rhs ) const; + bool operator<( const sc_memmgr_error & rhs ) const; std::string getsrcfile( void ) const; unsigned int getsrcline( void ) const; unsigned int getoccurences( void ) const; }; -typedef std::set scl_memmgr_errors; -typedef std::set::iterator scl_memmgr_error_iterator; +typedef std::set sc_memmgr_errors; +typedef std::set::iterator sc_memmgr_error_iterator; /** - scl_memmgr_record definition + sc_memmgr_record definition */ -class scl_memmgr_record { +class sc_memmgr_record { private: void * _addr; size_t _size; std::string _srcfile; unsigned int _srcline; public: - scl_memmgr_record( void * addr, size_t size, const char * file, const unsigned int line ); - scl_memmgr_record( void * addr ); - scl_memmgr_record( const scl_memmgr_record & rhs ); - ~scl_memmgr_record( void ); + sc_memmgr_record( void * addr, size_t size, const char * file, const unsigned int line ); + sc_memmgr_record( void * addr ); + sc_memmgr_record( const sc_memmgr_record & rhs ); + ~sc_memmgr_record( void ); - bool operator<( const scl_memmgr_record & rhs ) const; + bool operator<( const sc_memmgr_record & rhs ) const; void * getaddr( void ) const; size_t getsize( void ) const; @@ -62,31 +62,31 @@ class scl_memmgr_record { unsigned int getsrcline( void ) const; }; -typedef std::set scl_memmgr_records; -typedef std::set::iterator scl_memmgr_record_iterator; +typedef std::set sc_memmgr_records; +typedef std::set::iterator sc_memmgr_record_iterator; -#endif /* SCL_MEMMGR_ENABLE_CHECKS */ +#endif /* SC_MEMMGR_ENABLE_CHECKS */ /** - scl_memmgr definition + sc_memmgr definition */ -class scl_memmgr { +class sc_memmgr { private: -#ifdef SCL_MEMMGR_ENABLE_CHECKS +#ifdef SC_MEMMGR_ENABLE_CHECKS bool _record_insert_busy, _record_erase_busy; // memory allocation/reallocation records, inserted at allocation, erased at deallocation. - scl_memmgr_records _records; + sc_memmgr_records _records; // memory stats unsigned int _allocated; // amount of memory allocated simultaniously unsigned int _maximum_allocated; // maximum amount of memory allocated simultaniously unsigned int _allocated_total; // total amount of memory allocated in bytes unsigned int _reallocated_total; // total amount of memory reallocated in bytes unsigned int _deallocated_total; // total amount of memory deallocated in bytes -#endif /* SCL_MEMMGR_ENABLE_CHECKS */ +#endif /* SC_MEMMGR_ENABLE_CHECKS */ protected: public: - scl_memmgr( void ); - ~scl_memmgr( void ); + sc_memmgr( void ); + ~sc_memmgr( void ); void * allocate( size_t size, const char * file, const int line ); void * reallocate( void * addr, size_t size, const char * file, const int line ); @@ -94,31 +94,31 @@ class scl_memmgr { }; /** - scl_memmgr instance. + sc_memmgr instance. There should be one static instance of memmgr. This instance is automatically destroyed when application exits, so this allows us to add memory leak detection in it's destructor. */ -scl_memmgr memmgr; +sc_memmgr memmgr; /** c memory functions implementation */ extern "C" { - void * scl_malloc_fn( unsigned int size, const char * file, const int line ) { + void * sc_malloc_fn( unsigned int size, const char * file, const int line ) { return memmgr.allocate( size, file, line ); } - void * scl_calloc_fn( unsigned int count, unsigned int size, const char * file, const int line ) { + void * sc_calloc_fn( unsigned int count, unsigned int size, const char * file, const int line ) { return memmgr.allocate( count * size, file, line ); } - void * scl_realloc_fn( void * addr, unsigned int size, const char * file, const int line ) { + void * sc_realloc_fn( void * addr, unsigned int size, const char * file, const int line ) { return memmgr.reallocate( addr, size, file, line ); } - void scl_free_fn( void * addr ) { + void sc_free_fn( void * addr ) { memmgr.deallocate( addr, "", 0 ); } @@ -127,23 +127,23 @@ extern "C" { /** c++ memory operators implementation */ -void * scl_operator_new( size_t size, const char * file, const int line ) { +void * sc_operator_new( size_t size, const char * file, const int line ) { return memmgr.allocate( size, file, line ); } -void scl_operator_delete( void * addr, const char * file, const int line ) { +void sc_operator_delete( void * addr, const char * file, const int line ) { memmgr.deallocate( addr, file, line ); } -void scl_operator_delete( void * addr ) { +void sc_operator_delete( void * addr ) { memmgr.deallocate( addr, "", 0 ); } /** - scl_memmgr implementation + sc_memmgr implementation */ -scl_memmgr::scl_memmgr( void ) { -#ifdef SCL_MEMMGR_ENABLE_CHECKS +sc_memmgr::sc_memmgr( void ) { +#ifdef SC_MEMMGR_ENABLE_CHECKS _record_insert_busy = false; _record_erase_busy = false; @@ -152,27 +152,27 @@ scl_memmgr::scl_memmgr( void ) { _allocated_total = 0; _reallocated_total = 0; _deallocated_total = 0; -#endif /* SCL_MEMMGR_ENABLE_CHECKS */ +#endif /* SC_MEMMGR_ENABLE_CHECKS */ } /** Destructor: - scl_memmgr::~scl_memmgr(void) + sc_memmgr::~sc_memmgr(void) Description: - The scl_memmgr destructor is used to check for memory leaks when enabled. - All records still present when scl_memmgr instance is destroyed can be considered as + The sc_memmgr destructor is used to check for memory leaks when enabled. + All records still present when sc_memmgr instance is destroyed can be considered as memory leaks. */ -scl_memmgr::~scl_memmgr( void ) { -#ifdef SCL_MEMMGR_ENABLE_CHECKS - scl_memmgr_record_iterator irecord; - scl_memmgr_errors errors; - scl_memmgr_error_iterator ierror; +sc_memmgr::~sc_memmgr( void ) { +#ifdef SC_MEMMGR_ENABLE_CHECKS + sc_memmgr_record_iterator irecord; + sc_memmgr_errors errors; + sc_memmgr_error_iterator ierror; // Check if total allocated equals total deallocated if( _allocated_total != _deallocated_total ) { // todo: generate warning for possible memory leaks, enable full memory leak checking - printf( "scl_memmgr warning: Possible memory leaks detected (%d of %d bytes)\n", _allocated_total - _deallocated_total, _allocated_total ); + printf( "sc_memmgr warning: Possible memory leaks detected (%d of %d bytes)\n", _allocated_total - _deallocated_total, _allocated_total ); } // Compact leaks into an error list to prevent same leak being reported multiple times. @@ -181,7 +181,7 @@ scl_memmgr::~scl_memmgr( void ) { for( irecord = _records.begin(); irecord != _records.end(); irecord ++ ) { - scl_memmgr_error error( irecord->getsrcfile(), irecord->getsrcline() ); + sc_memmgr_error error( irecord->getsrcfile(), irecord->getsrcline() ); ierror = errors.find( error ); if( ierror == errors.end() ) { errors.insert( error ); @@ -197,7 +197,7 @@ scl_memmgr::~scl_memmgr( void ) { ierror != errors.end(); ierror ++ ) { // todo: generate error for memory leak - printf( "scl_memmgr warning: Possible memory leak in %s line %d\n", ierror->getsrcfile().c_str(), ierror->getsrcline() ); + printf( "sc_memmgr warning: Possible memory leak in %s line %d\n", ierror->getsrcfile().c_str(), ierror->getsrcline() ); } // Clear remaining records @@ -205,28 +205,28 @@ scl_memmgr::~scl_memmgr( void ) { _records.clear(); errors.clear(); _record_erase_busy = false; -#endif /* SCL_MEMMGR_ENABLE_CHECKS */ +#endif /* SC_MEMMGR_ENABLE_CHECKS */ } -void * scl_memmgr::allocate( size_t size, const char * file, const int line ) { +void * sc_memmgr::allocate( size_t size, const char * file, const int line ) { void * addr; // Allocate addr = malloc( size ); if( addr == NULL ) { // todo: error allocation failed - printf( "scl_memmgr error: Memory allocation failed in %s line %d\n", file, line ); + printf( "sc_memmgr error: Memory allocation failed in %s line %d\n", file, line ); } // Some stl implementations (for example debian gcc) use the new operator to construct - // new elements when inserting scl_memmgr_record. When this our new operator gets used + // new elements when inserting sc_memmgr_record. When this our new operator gets used // for this operation, this would result in an infinite loop. This is fixed by the // _record_insert_busy flag. -#ifdef SCL_MEMMGR_ENABLE_CHECKS +#ifdef SC_MEMMGR_ENABLE_CHECKS if( !_record_insert_busy ) { // Store record for this allocation _record_insert_busy = true; - _records.insert( scl_memmgr_record( addr, size, file, line ) ); + _records.insert( sc_memmgr_record( addr, size, file, line ) ); _record_insert_busy = false; // Update stats @@ -236,21 +236,21 @@ void * scl_memmgr::allocate( size_t size, const char * file, const int line ) { } _allocated_total += size; } -#endif /* SCL_MEMMGR_ENABLE_CHECKS */ +#endif /* SC_MEMMGR_ENABLE_CHECKS */ return addr; } -void * scl_memmgr::reallocate( void * addr, size_t size, const char * file, const int line ) { -#ifdef SCL_MEMMGR_ENABLE_CHECKS - scl_memmgr_record_iterator record; +void * sc_memmgr::reallocate( void * addr, size_t size, const char * file, const int line ) { +#ifdef SC_MEMMGR_ENABLE_CHECKS + sc_memmgr_record_iterator record; if( !_record_insert_busy ) { // Find record of previous allocation/reallocation - record = _records.find( scl_memmgr_record( addr ) ); + record = _records.find( sc_memmgr_record( addr ) ); if( record == _records.end() ) { // todo: error reallocating memory not allocated? - printf( "scl_memmgr warning: Reallocation of not allocated memory at %s line %d\n", file, line ); + printf( "sc_memmgr warning: Reallocation of not allocated memory at %s line %d\n", file, line ); } else { // Update stats _allocated -= record->getsize(); @@ -262,20 +262,20 @@ void * scl_memmgr::reallocate( void * addr, size_t size, const char * file, cons _record_erase_busy = false; } } -#endif /* SCL_MEMMGR_ENABLE_CHECKS */ +#endif /* SC_MEMMGR_ENABLE_CHECKS */ // Reallocate addr = realloc( addr, size ); if( addr == NULL ) { // todo: error reallocation failed - printf( "scl_memmgr error: Reallocation failed at %s line %d\n", file, line ); + printf( "sc_memmgr error: Reallocation failed at %s line %d\n", file, line ); } -#ifdef SCL_MEMMGR_ENABLE_CHECKS +#ifdef SC_MEMMGR_ENABLE_CHECKS if( !_record_insert_busy ) { // Store record for this reallocation _record_insert_busy = true; - _records.insert( scl_memmgr_record( addr, size, file, line ) ); + _records.insert( sc_memmgr_record( addr, size, file, line ) ); _record_insert_busy = false; // Update stats @@ -286,21 +286,21 @@ void * scl_memmgr::reallocate( void * addr, size_t size, const char * file, cons _allocated_total += size; _reallocated_total += size; } -#endif /* SCL_MEMMGR_ENABLE_CHECKS */ +#endif /* SC_MEMMGR_ENABLE_CHECKS */ return addr; } -void scl_memmgr::deallocate( void * addr, const char * file, const int line ) { -#ifdef SCL_MEMMGR_ENABLE_CHECKS - scl_memmgr_record_iterator record; +void sc_memmgr::deallocate( void * addr, const char * file, const int line ) { +#ifdef SC_MEMMGR_ENABLE_CHECKS + sc_memmgr_record_iterator record; if( !_record_erase_busy ) { // Find record of previous allocation/reallocation - record = _records.find( scl_memmgr_record( addr ) ); + record = _records.find( sc_memmgr_record( addr ) ); if( record == _records.end() ) { // todo: error free called for not allocated memory? - printf( "scl_memmgr warning: Deallocate of not allocated memory at %s line %d\n", file, line ); + printf( "sc_memmgr warning: Deallocate of not allocated memory at %s line %d\n", file, line ); } else { // Update stats _allocated -= record->getsize(); @@ -312,95 +312,95 @@ void scl_memmgr::deallocate( void * addr, const char * file, const int line ) { _record_erase_busy = false; } } -#endif /* SCL_MEMMGR_ENABLE_CHECKS */ +#endif /* SC_MEMMGR_ENABLE_CHECKS */ // Deallocate free( addr ); } -#ifdef SCL_MEMMGR_ENABLE_CHECKS +#ifdef SC_MEMMGR_ENABLE_CHECKS /** - scl_memmgr_error implementation + sc_memmgr_error implementation */ -scl_memmgr_error::scl_memmgr_error( const std::string & file, const unsigned int line ) { +sc_memmgr_error::sc_memmgr_error( const std::string & file, const unsigned int line ) { _srcfile = file; _srcline = line; _occurences = 1; } -scl_memmgr_error::scl_memmgr_error( const scl_memmgr_error & rhs ) { +sc_memmgr_error::sc_memmgr_error( const sc_memmgr_error & rhs ) { _srcfile = rhs._srcfile; _srcline = rhs._srcline; _occurences = rhs._occurences; } -scl_memmgr_error::~scl_memmgr_error( void ) { +sc_memmgr_error::~sc_memmgr_error( void ) { } -bool scl_memmgr_error::operator<( const scl_memmgr_error & rhs ) const { +bool sc_memmgr_error::operator<( const sc_memmgr_error & rhs ) const { if( _srcfile == rhs._srcfile ) { return _srcline < rhs._srcline; } return _srcfile < rhs._srcfile; } -std::string scl_memmgr_error::getsrcfile( void ) const { +std::string sc_memmgr_error::getsrcfile( void ) const { return _srcfile; } -unsigned int scl_memmgr_error::getsrcline( void ) const { +unsigned int sc_memmgr_error::getsrcline( void ) const { return _srcline; } -unsigned int scl_memmgr_error::getoccurences( void ) const { +unsigned int sc_memmgr_error::getoccurences( void ) const { return _occurences; } /** - scl_memmgr_record implementation + sc_memmgr_record implementation */ -scl_memmgr_record::scl_memmgr_record( void * addr, size_t size, const char * file, const unsigned int line ) { +sc_memmgr_record::sc_memmgr_record( void * addr, size_t size, const char * file, const unsigned int line ) { _addr = addr; _size = size; _srcfile = file; _srcline = line; } -scl_memmgr_record::scl_memmgr_record( void * addr ) { +sc_memmgr_record::sc_memmgr_record( void * addr ) { _addr = addr; _size = 0; _srcfile = ""; _srcline = -1; } -scl_memmgr_record::scl_memmgr_record( const scl_memmgr_record & rhs ) { +sc_memmgr_record::sc_memmgr_record( const sc_memmgr_record & rhs ) { _addr = rhs._addr; _size = rhs._size; _srcfile = rhs._srcfile; _srcline = rhs._srcline; } -scl_memmgr_record::~scl_memmgr_record( void ) { +sc_memmgr_record::~sc_memmgr_record( void ) { } -bool scl_memmgr_record::operator<( const scl_memmgr_record & rhs ) const { +bool sc_memmgr_record::operator<( const sc_memmgr_record & rhs ) const { return _addr < rhs._addr; } -void * scl_memmgr_record::getaddr( void ) const { +void * sc_memmgr_record::getaddr( void ) const { return _addr; } -size_t scl_memmgr_record::getsize( void ) const { +size_t sc_memmgr_record::getsize( void ) const { return _size; } -std::string scl_memmgr_record::getsrcfile( void ) const { +std::string sc_memmgr_record::getsrcfile( void ) const { return _srcfile; } -unsigned int scl_memmgr_record::getsrcline( void ) const { +unsigned int sc_memmgr_record::getsrcline( void ) const { return _srcline; } -#endif /* SCL_MEMMGR_ENABLE_CHECKS */ +#endif /* SC_MEMMGR_ENABLE_CHECKS */ diff --git a/src/base/sc_memmgr.h b/src/base/sc_memmgr.h new file mode 100644 index 00000000..e9ecddcb --- /dev/null +++ b/src/base/sc_memmgr.h @@ -0,0 +1,90 @@ +#ifndef SC_MEMMGR_H +#define SC_MEMMGR_H + +#include +#include + +#if defined(SC_MEMMGR_ENABLE_CHECKS) + +/** + Platform specific defines +*/ +#if defined(__MSVC__) || defined(__BORLAND__) +#define THROW_STD_BAD_ALLOC +#define THROW_EMPTY +#else +#define THROW_STD_BAD_ALLOC throw (std::bad_alloc) +#define THROW_EMPTY throw () +#endif + +#ifdef __cplusplus +#include +extern "C" { +#endif /* __cplusplus */ + + SC_BASE_EXPORT void * sc_malloc_fn( unsigned int size, const char * file, const int line ); + SC_BASE_EXPORT void * sc_calloc_fn( unsigned int count, unsigned int size, const char * file, const int line ); + SC_BASE_EXPORT void * sc_realloc_fn( void * addr, unsigned int size, const char * file, const int line ); + SC_BASE_EXPORT void sc_free_fn( void * addr ); + +#ifdef __cplusplus +} +#endif /* __cplusplus */ + +#ifdef __cplusplus + +SC_BASE_EXPORT void * sc_operator_new( size_t size, const char * file, const int line ); +SC_BASE_EXPORT void sc_operator_delete( void * addr, const char * file, const int line ); +SC_BASE_EXPORT void sc_operator_delete( void * addr ); + +#endif /* __cplusplus */ + +#ifndef SC_MEMMGR_CC + +#define sc_malloc(size) sc_malloc_fn(size, __FILE__, __LINE__) +#define sc_calloc(count, size) sc_calloc_fn(count, size, __FILE__, __LINE__) +#define sc_realloc(addr, size) sc_realloc_fn(addr, size, __FILE__, __LINE__) +#define sc_free(addr) sc_free_fn(addr) + +#ifdef __cplusplus + +#include + +inline void * operator new( size_t size, const char * file, const int line ) THROW_STD_BAD_ALLOC { + return sc_operator_new( size, file, line ); +} + +inline void * operator new[]( size_t size, const char * file, const int line ) THROW_STD_BAD_ALLOC { + return sc_operator_new( size, file, line ); +} + +inline void operator delete( void * addr, const char * file, const int line ) THROW_STD_BAD_ALLOC { + sc_operator_delete( addr, file, line ); +} + +inline void operator delete[]( void * addr, const char * file, const int line ) THROW_STD_BAD_ALLOC { + sc_operator_delete( addr, file, line ); +} + +inline void operator delete( void * addr ) THROW_EMPTY { + sc_operator_delete( addr ); +} + +inline void operator delete[]( void * addr ) THROW_EMPTY { + sc_operator_delete( addr ); +} + +#define new new(__FILE__, __LINE__) + +#endif /* __cplusplus */ + +#endif /* SC_MEMMGR_CC */ + +#else +#define sc_malloc(size) malloc(size) +#define sc_calloc(count, size) calloc(count, size) +#define sc_realloc(addr, size) realloc(addr, size) +#define sc_free(addr) free(addr) +#endif /* SC_MEMMGR_ENABLE_CHECKS */ + +#endif /* SC_MEMMGR_H */ diff --git a/src/base/scl_trace_fprintf.c b/src/base/sc_trace_fprintf.c similarity index 92% rename from src/base/scl_trace_fprintf.c rename to src/base/sc_trace_fprintf.c index cb1abbb2..b79cd5dc 100644 --- a/src/base/scl_trace_fprintf.c +++ b/src/base/sc_trace_fprintf.c @@ -2,7 +2,7 @@ #include #include -#include "scl_trace_fprintf.h" +#include "sc_trace_fprintf.h" void trace_fprintf (char const *sourcefile, int line, FILE* file, const char *format, ...) { va_list args; diff --git a/src/base/scl_trace_fprintf.h b/src/base/sc_trace_fprintf.h similarity index 56% rename from src/base/scl_trace_fprintf.h rename to src/base/sc_trace_fprintf.h index 1ae2ade1..dae83d4a 100644 --- a/src/base/scl_trace_fprintf.h +++ b/src/base/sc_trace_fprintf.h @@ -1,32 +1,32 @@ -#ifndef SCL_TRACE_FPRINTF_H -#define SCL_TRACE_FPRINTF_H +#ifndef SC_TRACE_FPRINTF_H +#define SC_TRACE_FPRINTF_H -/** \file scl_trace_fprintf.h +/** \file sc_trace_fprintf.h * Used to track the source file and line where generated code is printed from * When enabled, comments are printed into the generated files for every 'fprintf': * / * source: scl/src/fedex_plus/selects.c:1375 * / - * To enable, configure with 'cmake .. -DSCL_TRACE_FPRINTF=ON' + * To enable, configure with 'cmake .. -DSC_TRACE_FPRINTF=ON' * * This header must be included *after* all other headers, otherwise the compiler will * report errors in system headers. * \sa trace_fprintf **/ -#include "scl_export.h" +#include "sc_export.h" /** used to find where generated c++ originates from in fedex_plus - * To enable, configure with 'cmake .. -DSCL_TRACE_FPRINTF=ON' + * To enable, configure with 'cmake .. -DSC_TRACE_FPRINTF=ON' */ #ifdef __cplusplus extern "C" { #endif - SCL_BASE_EXPORT void trace_fprintf( char const * sourcefile, int line, FILE * file, const char * format, ... ); + SC_BASE_EXPORT void trace_fprintf( char const * sourcefile, int line, FILE * file, const char * format, ... ); #ifdef __cplusplus } #endif -#ifdef SCL_TRACE_FPRINTF +#ifdef SC_TRACE_FPRINTF # define fprintf(...) trace_fprintf(__FILE__, __LINE__, __VA_ARGS__) -#endif /* SCL_TRACE_FPRINTF */ +#endif /* SC_TRACE_FPRINTF */ -#endif /* SCL_TRACE_FPRINTF_H */ +#endif /* SC_TRACE_FPRINTF_H */ diff --git a/src/base/scl_memmgr.h b/src/base/scl_memmgr.h deleted file mode 100644 index ae00c471..00000000 --- a/src/base/scl_memmgr.h +++ /dev/null @@ -1,90 +0,0 @@ -#ifndef SCL_MEMMGR_H -#define SCL_MEMMGR_H - -#include -#include - -#if defined(SCL_MEMMGR_ENABLE_CHECKS) - -/** - Platform specific defines -*/ -#if defined(__MSVC__) || defined(__BORLAND__) -#define THROW_STD_BAD_ALLOC -#define THROW_EMPTY -#else -#define THROW_STD_BAD_ALLOC throw (std::bad_alloc) -#define THROW_EMPTY throw () -#endif - -#ifdef __cplusplus -#include -extern "C" { -#endif /* __cplusplus */ - - SCL_BASE_EXPORT void * scl_malloc_fn( unsigned int size, const char * file, const int line ); - SCL_BASE_EXPORT void * scl_calloc_fn( unsigned int count, unsigned int size, const char * file, const int line ); - SCL_BASE_EXPORT void * scl_realloc_fn( void * addr, unsigned int size, const char * file, const int line ); - SCL_BASE_EXPORT void scl_free_fn( void * addr ); - -#ifdef __cplusplus -} -#endif /* __cplusplus */ - -#ifdef __cplusplus - -SCL_BASE_EXPORT void * scl_operator_new( size_t size, const char * file, const int line ); -SCL_BASE_EXPORT void scl_operator_delete( void * addr, const char * file, const int line ); -SCL_BASE_EXPORT void scl_operator_delete( void * addr ); - -#endif /* __cplusplus */ - -#ifndef SCL_MEMMGR_CC - -#define scl_malloc(size) scl_malloc_fn(size, __FILE__, __LINE__) -#define scl_calloc(count, size) scl_calloc_fn(count, size, __FILE__, __LINE__) -#define scl_realloc(addr, size) scl_realloc_fn(addr, size, __FILE__, __LINE__) -#define scl_free(addr) scl_free_fn(addr) - -#ifdef __cplusplus - -#include - -inline void * operator new( size_t size, const char * file, const int line ) THROW_STD_BAD_ALLOC { - return scl_operator_new( size, file, line ); -} - -inline void * operator new[]( size_t size, const char * file, const int line ) THROW_STD_BAD_ALLOC { - return scl_operator_new( size, file, line ); -} - -inline void operator delete( void * addr, const char * file, const int line ) THROW_STD_BAD_ALLOC { - scl_operator_delete( addr, file, line ); -} - -inline void operator delete[]( void * addr, const char * file, const int line ) THROW_STD_BAD_ALLOC { - scl_operator_delete( addr, file, line ); -} - -inline void operator delete( void * addr ) THROW_EMPTY { - scl_operator_delete( addr ); -} - -inline void operator delete[]( void * addr ) THROW_EMPTY { - scl_operator_delete( addr ); -} - -#define new new(__FILE__, __LINE__) - -#endif /* __cplusplus */ - -#endif /* SCL_MEMMGR_CC */ - -#else -#define scl_malloc(size) malloc(size) -#define scl_calloc(count, size) calloc(count, size) -#define scl_realloc(addr, size) realloc(addr, size) -#define scl_free(addr) free(addr) -#endif /* SCL_MEMMGR_ENABLE_CHECKS */ - -#endif /* SCL_MEMMGR_H */ diff --git a/src/cldai/CMakeLists.txt b/src/cldai/CMakeLists.txt index 351a047e..805f6fe0 100644 --- a/src/cldai/CMakeLists.txt +++ b/src/cldai/CMakeLists.txt @@ -30,9 +30,9 @@ SET(LIBSTEPDAI_PRIVATE_HDRS include_directories( ${CMAKE_CURRENT_SOURCE_DIR} - ${SCL_SOURCE_DIR}/src/base - ${SCL_SOURCE_DIR}/src/clstepcore - ${SCL_SOURCE_DIR}/src/clutils + ${SC_SOURCE_DIR}/src/base + ${SC_SOURCE_DIR}/src/clstepcore + ${SC_SOURCE_DIR}/src/clutils ) -SCL_ADDLIB(stepdai "${LIBSTEPDAI_SRCS}" "steputils;base") +SC_ADDLIB(stepdai "${LIBSTEPDAI_SRCS}" "steputils;base") diff --git a/src/cldai/sdaiApplication_instance_set.cc b/src/cldai/sdaiApplication_instance_set.cc index cf021ed0..c50fdc0e 100644 --- a/src/cldai/sdaiApplication_instance_set.cc +++ b/src/cldai/sdaiApplication_instance_set.cc @@ -29,7 +29,7 @@ #include #include -#include "scl_memmgr.h" +#include "sc_memmgr.h" // to help ObjectCenter #ifndef HAVE_MEMMOVE diff --git a/src/cldai/sdaiApplication_instance_set.h b/src/cldai/sdaiApplication_instance_set.h index 1b97fbd5..f893b635 100644 --- a/src/cldai/sdaiApplication_instance_set.h +++ b/src/cldai/sdaiApplication_instance_set.h @@ -30,14 +30,14 @@ #ifndef SDAI_APPLICATION_INSTANCE_SET_h #define SDAI_APPLICATION_INSTANCE_SET_h -#include +#include class SDAI_Application_instance; class SDAI_Application_instance__set; typedef SDAI_Application_instance__set * SDAI_Application_instance__set_ptr; typedef SDAI_Application_instance__set_ptr SDAI_Application_instance__set_var; -class SCL_DAI_EXPORT SDAI_Application_instance__set { +class SC_DAI_EXPORT SDAI_Application_instance__set { public: SDAI_Application_instance__set( int = 16 ); ~SDAI_Application_instance__set(); diff --git a/src/cldai/sdaiBinary.cc b/src/cldai/sdaiBinary.cc index 9aecae70..ac1787a6 100644 --- a/src/cldai/sdaiBinary.cc +++ b/src/cldai/sdaiBinary.cc @@ -11,7 +11,7 @@ #include #include -#include "scl_memmgr.h" +#include "sc_memmgr.h" SDAI_Binary::SDAI_Binary( const char * str, int max ) { content = std::string( str, max ); diff --git a/src/cldai/sdaiBinary.h b/src/cldai/sdaiBinary.h index 34794947..151863ea 100644 --- a/src/cldai/sdaiBinary.h +++ b/src/cldai/sdaiBinary.h @@ -13,7 +13,7 @@ * and is not subject to copyright. */ -class SCL_DAI_EXPORT SDAI_Binary { +class SC_DAI_EXPORT SDAI_Binary { private: std::string content; public: diff --git a/src/cldai/sdaiDaObject.cc b/src/cldai/sdaiDaObject.cc index 6c1c236a..2f43ab28 100644 --- a/src/cldai/sdaiDaObject.cc +++ b/src/cldai/sdaiDaObject.cc @@ -3,7 +3,7 @@ #include #include -#include "scl_memmgr.h" +#include "sc_memmgr.h" // to help ObjectCenter #ifndef HAVE_MEMMOVE diff --git a/src/cldai/sdaiDaObject.h b/src/cldai/sdaiDaObject.h index c5e7f0eb..097222f0 100644 --- a/src/cldai/sdaiDaObject.h +++ b/src/cldai/sdaiDaObject.h @@ -5,7 +5,7 @@ #include #include -#include +#include typedef char * SDAI_DAObjectID; @@ -30,7 +30,7 @@ typedef char * SDAI_DAObjectID; SDAI_DAObjectID as follows: */ -class SCL_DAI_EXPORT SDAI_PID : public SDAI_sdaiObject { +class SC_DAI_EXPORT SDAI_PID : public SDAI_sdaiObject { public: // These are in the IDL generated code for Part 26. I will have to think about @@ -89,7 +89,7 @@ typedef SDAI_PID_ptr SDAI_PID_var; // interface. // -class SCL_DAI_EXPORT SDAI_PID_DA: public SDAI_PID { +class SC_DAI_EXPORT SDAI_PID_DA: public SDAI_PID { public: SDAI_String _oid; @@ -125,7 +125,7 @@ typedef SDAI_PID_DA_ptr SDAI_PID_DA_var; // The PID_SDAI class maintains the persistent object identifier for // a Model_contents object. // -class SCL_DAI_EXPORT SDAI_PID_SDAI : public SDAI_PID { +class SC_DAI_EXPORT SDAI_PID_SDAI : public SDAI_PID { public: SDAI_String _modelid; @@ -166,7 +166,7 @@ class SDAI_DAObject; typedef SDAI_DAObject * SDAI_DAObject_ptr; typedef SDAI_DAObject_ptr SDAI_DAObject_var; -class SCL_DAI_EXPORT SDAI_DAObject : public SDAI_sdaiObject { +class SC_DAI_EXPORT SDAI_DAObject : public SDAI_sdaiObject { public: SDAI_String _dado_oid; @@ -265,7 +265,7 @@ class SCL_DAI_EXPORT SDAI_DAObject : public SDAI_sdaiObject { 5.3.10.1 DAObject_SDAI */ -class SCL_DAI_EXPORT SDAI_DAObject_SDAI : public SDAI_DAObject { +class SC_DAI_EXPORT SDAI_DAObject_SDAI : public SDAI_DAObject { public: SDAI_DAObject_SDAI(); @@ -488,7 +488,7 @@ class SCL_DAI_EXPORT SDAI_DAObject_SDAI : public SDAI_DAObject { typedef SDAI_DAObject_SDAI * SDAI_DAObject_SDAI_ptr; typedef SDAI_DAObject_SDAI_ptr SDAI_DAObject_SDAI_var; -class SCL_DAI_EXPORT SDAI_DAObject__set { +class SC_DAI_EXPORT SDAI_DAObject__set { public: SDAI_DAObject__set( int = 16 ); ~SDAI_DAObject__set(); diff --git a/src/cldai/sdaiEntity_extent.cc b/src/cldai/sdaiEntity_extent.cc index f297682d..4f767f99 100644 --- a/src/cldai/sdaiEntity_extent.cc +++ b/src/cldai/sdaiEntity_extent.cc @@ -3,7 +3,7 @@ //#include #include -#include "scl_memmgr.h" +#include "sc_memmgr.h" SDAI_Entity_extent::SDAI_Entity_extent( ) : _definition( 0 ), _definition_name( 0 ), _owned_by( 0 ) { diff --git a/src/cldai/sdaiEntity_extent.h b/src/cldai/sdaiEntity_extent.h index 52297639..a50a6e89 100644 --- a/src/cldai/sdaiEntity_extent.h +++ b/src/cldai/sdaiEntity_extent.h @@ -1,7 +1,7 @@ #ifndef ENTITYEXTENT_H #define ENTITYEXTENT_H 1 -#include +#include /* //#include @@ -18,7 +18,7 @@ class SDAI_Entity_extent; typedef SDAI_Entity_extent * SDAI_Entity_extent_ptr; typedef SDAI_Entity_extent_ptr SDAI_Entity_extent_var; -class SCL_DAI_EXPORT SDAI_Entity_extent : public SDAI_Session_instance { +class SC_DAI_EXPORT SDAI_Entity_extent : public SDAI_Session_instance { friend class SDAI_Model_contents; /* diff --git a/src/cldai/sdaiEntity_extent_set.cc b/src/cldai/sdaiEntity_extent_set.cc index 67b24003..af365822 100644 --- a/src/cldai/sdaiEntity_extent_set.cc +++ b/src/cldai/sdaiEntity_extent_set.cc @@ -27,7 +27,7 @@ #include #include -#include "scl_memmgr.h" +#include "sc_memmgr.h" /* #include diff --git a/src/cldai/sdaiEntity_extent_set.h b/src/cldai/sdaiEntity_extent_set.h index 051b3d98..b6b89307 100644 --- a/src/cldai/sdaiEntity_extent_set.h +++ b/src/cldai/sdaiEntity_extent_set.h @@ -27,7 +27,7 @@ * UArray - dynamic array object. */ -#include +#include #ifndef SDAIENTITY_EXTENT_SET_h #define SDAIENTITY_EXTENT_SET_h @@ -37,7 +37,7 @@ //#include */ -class SCL_DAI_EXPORT SDAI_Entity_extent__set { +class SC_DAI_EXPORT SDAI_Entity_extent__set { public: SDAI_Entity_extent__set( int = 16 ); diff --git a/src/cldai/sdaiEnum.cc b/src/cldai/sdaiEnum.cc index d7c37921..1b20d40e 100644 --- a/src/cldai/sdaiEnum.cc +++ b/src/cldai/sdaiEnum.cc @@ -1,6 +1,6 @@ #include -#include "scl_memmgr.h" +#include "sc_memmgr.h" /* * NIST STEP Core Class Library diff --git a/src/cldai/sdaiEnum.h b/src/cldai/sdaiEnum.h index 101b9b1c..0305427d 100644 --- a/src/cldai/sdaiEnum.h +++ b/src/cldai/sdaiEnum.h @@ -12,9 +12,9 @@ * and is not subject to copyright. */ -#include +#include -class SCL_DAI_EXPORT SDAI_Enum { +class SC_DAI_EXPORT SDAI_Enum { friend ostream & operator<< ( ostream &, const SDAI_Enum & ); protected: int v; // integer value of enumeration instance @@ -86,7 +86,7 @@ class SDAI_BOOLEAN; enum Boolean { BFalse, BTrue, BUnset }; enum Logical { LFalse, LTrue, LUnset, LUnknown }; -class SCL_DAI_EXPORT SDAI_LOGICAL : +class SC_DAI_EXPORT SDAI_LOGICAL : public SDAI_Enum { public: const char * Name() const; @@ -118,7 +118,7 @@ class SCL_DAI_EXPORT SDAI_LOGICAL : }; -class SCL_DAI_EXPORT SDAI_BOOLEAN : +class SC_DAI_EXPORT SDAI_BOOLEAN : public SDAI_Enum { public: const char * Name() const; diff --git a/src/cldai/sdaiModel_contents.cc b/src/cldai/sdaiModel_contents.cc index c59860d8..ae063393 100644 --- a/src/cldai/sdaiModel_contents.cc +++ b/src/cldai/sdaiModel_contents.cc @@ -1,6 +1,6 @@ #include -#include "scl_memmgr.h" +#include "sc_memmgr.h" ///////// SDAI_Model_contents_instances diff --git a/src/cldai/sdaiModel_contents.h b/src/cldai/sdaiModel_contents.h index ac18b6b9..c77f54b9 100644 --- a/src/cldai/sdaiModel_contents.h +++ b/src/cldai/sdaiModel_contents.h @@ -1,7 +1,7 @@ #ifndef SDAIMODEL_CONTENTS_H #define SDAIMODEL_CONTENTS_H 1 -#include +#include //SDAI_Model_contents /* @@ -26,7 +26,7 @@ // The class SDAI_Model_contents_instances shall implement convenience functions by // SDAI_Model_contents in this part of ISO 10303 -class SCL_DAI_EXPORT SDAI_Model_contents_instances : public SDAI_DAObject { +class SC_DAI_EXPORT SDAI_Model_contents_instances : public SDAI_DAObject { public: SDAI_DAObject__set _instances; @@ -52,7 +52,7 @@ SDAI_Model_contents_instances_var; // Model_contents_ptr def pushed ahead of #include for Entity_extent -class SCL_DAI_EXPORT SDAI_Model_contents : public SDAI_Session_instance { +class SC_DAI_EXPORT SDAI_Model_contents : public SDAI_Session_instance { //friend class SDAI_Model; diff --git a/src/cldai/sdaiModel_contents_list.cc b/src/cldai/sdaiModel_contents_list.cc index ad5cba6d..8f6440e8 100644 --- a/src/cldai/sdaiModel_contents_list.cc +++ b/src/cldai/sdaiModel_contents_list.cc @@ -24,7 +24,7 @@ * UArray implementation. */ #include -#include "scl_memmgr.h" +#include "sc_memmgr.h" // to help ObjectCenter #ifndef HAVE_MEMMOVE diff --git a/src/cldai/sdaiModel_contents_list.h b/src/cldai/sdaiModel_contents_list.h index 36c37894..47e98a07 100644 --- a/src/cldai/sdaiModel_contents_list.h +++ b/src/cldai/sdaiModel_contents_list.h @@ -1,9 +1,9 @@ #ifndef SDAIMODEL_CONTENTS_LIST_H #define SDAIMODEL_CONTENTS_LIST_H 1 -#include +#include -class SCL_DAI_EXPORT SDAI_Model_contents__list { +class SC_DAI_EXPORT SDAI_Model_contents__list { public: SDAI_Model_contents__list( int = 16 ); ~SDAI_Model_contents__list(); diff --git a/src/cldai/sdaiObject.cc b/src/cldai/sdaiObject.cc index 05158dee..14cf6c26 100644 --- a/src/cldai/sdaiObject.cc +++ b/src/cldai/sdaiObject.cc @@ -1,5 +1,5 @@ #include -#include "scl_memmgr.h" +#include "sc_memmgr.h" SDAI_sdaiObject::SDAI_sdaiObject() { } diff --git a/src/cldai/sdaiObject.h b/src/cldai/sdaiObject.h index 024533e3..99936f17 100644 --- a/src/cldai/sdaiObject.h +++ b/src/cldai/sdaiObject.h @@ -2,7 +2,7 @@ #ifndef SDAIOBJECT_H #define SDAIOBJECT_H 1 -#include +#include /* @@ -13,7 +13,7 @@ The class Entity_instance shall be a subtype of the C++ class Object: */ -class SCL_DAI_EXPORT SDAI_sdaiObject { +class SC_DAI_EXPORT SDAI_sdaiObject { public: SDAI_sdaiObject(); virtual ~SDAI_sdaiObject(); diff --git a/src/cldai/sdaiSession_instance.cc b/src/cldai/sdaiSession_instance.cc index b7fed037..6f48be44 100644 --- a/src/cldai/sdaiSession_instance.cc +++ b/src/cldai/sdaiSession_instance.cc @@ -1,5 +1,5 @@ #include -#include "scl_memmgr.h" +#include "sc_memmgr.h" SDAI_Session_instance::SDAI_Session_instance() { } diff --git a/src/cldai/sdaiSession_instance.h b/src/cldai/sdaiSession_instance.h index a5b98c51..fcc8fad1 100644 --- a/src/cldai/sdaiSession_instance.h +++ b/src/cldai/sdaiSession_instance.h @@ -2,10 +2,10 @@ #ifndef SESSION_INSTANCE_H #define SESSION_INSTANCE_H 1 -#include +#include //#include -class SCL_DAI_EXPORT SDAI_Session_instance : public SDAI_sdaiObject { +class SC_DAI_EXPORT SDAI_Session_instance : public SDAI_sdaiObject { public: int x; diff --git a/src/cldai/sdaiString.cc b/src/cldai/sdaiString.cc index 77265949..664a3935 100644 --- a/src/cldai/sdaiString.cc +++ b/src/cldai/sdaiString.cc @@ -11,7 +11,7 @@ #include #include -#include "scl_memmgr.h" +#include "sc_memmgr.h" SDAI_String::SDAI_String( const char * str, size_t max ) { if( !str ) { diff --git a/src/cldai/sdaiString.h b/src/cldai/sdaiString.h index 97374370..e365e575 100644 --- a/src/cldai/sdaiString.h +++ b/src/cldai/sdaiString.h @@ -11,11 +11,11 @@ * and is not subject to copyright. */ -#include +#include #include -class SCL_DAI_EXPORT SDAI_String { +class SC_DAI_EXPORT SDAI_String { private: std::string content; public: diff --git a/src/cleditor/CMakeLists.txt b/src/cleditor/CMakeLists.txt index 75c58cc1..c5e6bec4 100644 --- a/src/cleditor/CMakeLists.txt +++ b/src/cleditor/CMakeLists.txt @@ -21,10 +21,10 @@ SET(LIBSTEPEDITOR_PRIVATE_HDRS include_directories( ${CMAKE_CURRENT_SOURCE_DIR} - ${SCL_SOURCE_DIR}/src/base - ${SCL_SOURCE_DIR}/src/cldai - ${SCL_SOURCE_DIR}/src/clstepcore - ${SCL_SOURCE_DIR}/src/clutils + ${SC_SOURCE_DIR}/src/base + ${SC_SOURCE_DIR}/src/cldai + ${SC_SOURCE_DIR}/src/clstepcore + ${SC_SOURCE_DIR}/src/clutils ) -SCL_ADDLIB(stepeditor "${LIBSTEPEDITOR_SRCS}" "stepcore;stepdai;steputils;base") +SC_ADDLIB(stepeditor "${LIBSTEPEDITOR_SRCS}" "stepcore;stepdai;steputils;base") diff --git a/src/cleditor/STEPfile.cc b/src/cleditor/STEPfile.cc index cba4f3db..5574cf79 100644 --- a/src/cleditor/STEPfile.cc +++ b/src/cleditor/STEPfile.cc @@ -34,7 +34,7 @@ // void PushPastString (istream& in, std::string &s, ErrorDescriptor *err) #include -#include "scl_memmgr.h" +#include "sc_memmgr.h" /** * \returns The new file name for the class. diff --git a/src/cleditor/STEPfile.h b/src/cleditor/STEPfile.h index d70c01f3..12479553 100644 --- a/src/cleditor/STEPfile.h +++ b/src/cleditor/STEPfile.h @@ -13,7 +13,7 @@ * and is not subject to copyright. */ -#include +#include #include #include #include @@ -35,7 +35,7 @@ enum FileTypeCode { WORKING_SESSION = 2 }; -class SCL_EDITOR_EXPORT STEPfile { +class SC_EDITOR_EXPORT STEPfile { protected: //data members diff --git a/src/cleditor/STEPfile.inline.cc b/src/cleditor/STEPfile.inline.cc index d340e184..a5391bc7 100644 --- a/src/cleditor/STEPfile.inline.cc +++ b/src/cleditor/STEPfile.inline.cc @@ -17,7 +17,7 @@ #include #include -#include "scl_memmgr.h" +#include "sc_memmgr.h" extern void HeaderSchemaInit( Registry & reg ); diff --git a/src/cleditor/SdaiHeaderSchema.cc b/src/cleditor/SdaiHeaderSchema.cc index afbd9bd4..0e53d059 100644 --- a/src/cleditor/SdaiHeaderSchema.cc +++ b/src/cleditor/SdaiHeaderSchema.cc @@ -4,7 +4,7 @@ // it since your modifications will be lost if fedex_plus is used to // regenerate it. -#ifdef SCL_LOGGING +#ifdef SC_LOGGING #include extern ofstream * logStream; #define SCLLOGFILE "scl.log" @@ -13,7 +13,7 @@ extern ofstream * logStream; #include #include #include -#include "scl_memmgr.h" +#include "sc_memmgr.h" Schema * s_header_section_schema = 0; diff --git a/src/cleditor/SdaiHeaderSchema.h b/src/cleditor/SdaiHeaderSchema.h index 18ff010b..e50d2a5f 100644 --- a/src/cleditor/SdaiHeaderSchema.h +++ b/src/cleditor/SdaiHeaderSchema.h @@ -4,7 +4,7 @@ // it since your modifications will be lost if fedex_plus is used to // regenerate it. -#include +#include #include #include #include @@ -13,10 +13,10 @@ ///////// ENTITY section_language -extern SCL_EDITOR_EXPORT AttrDescriptor * a_0section; -extern SCL_EDITOR_EXPORT AttrDescriptor * a_1default_language; +extern SC_EDITOR_EXPORT AttrDescriptor * a_0section; +extern SC_EDITOR_EXPORT AttrDescriptor * a_1default_language; -class SCL_EDITOR_EXPORT SdaiSection_language : public SDAI_Application_instance { +class SC_EDITOR_EXPORT SdaiSection_language : public SDAI_Application_instance { protected: SDAI_String _section ; // OPTIONAL SDAI_String _default_language ; @@ -48,11 +48,11 @@ create_SdaiSection_language() { ///////// ENTITY file_population -extern SCL_EDITOR_EXPORT AttrDescriptor * a_2governing_schema; -extern SCL_EDITOR_EXPORT AttrDescriptor * a_3determination_method; -extern SCL_EDITOR_EXPORT AttrDescriptor * a_4governed_sections; +extern SC_EDITOR_EXPORT AttrDescriptor * a_2governing_schema; +extern SC_EDITOR_EXPORT AttrDescriptor * a_3determination_method; +extern SC_EDITOR_EXPORT AttrDescriptor * a_4governed_sections; -class SCL_EDITOR_EXPORT SdaiFile_population : public SDAI_Application_instance { +class SC_EDITOR_EXPORT SdaiFile_population : public SDAI_Application_instance { protected: SDAI_String _governing_schema ; SDAI_String _determination_method ; @@ -97,7 +97,7 @@ extern AttrDescriptor * a_9preprocessor_version; extern AttrDescriptor * a_10originating_system; extern AttrDescriptor * a_11authorization; -class SCL_EDITOR_EXPORT SdaiFile_name : public SDAI_Application_instance { +class SC_EDITOR_EXPORT SdaiFile_name : public SDAI_Application_instance { protected: SDAI_String _name ; SDAI_String _time_stamp ; @@ -149,10 +149,10 @@ create_SdaiFile_name() { ///////// ENTITY section_context -extern SCL_EDITOR_EXPORT AttrDescriptor * a_12section; -extern SCL_EDITOR_EXPORT AttrDescriptor * a_13context_identifiers; +extern SC_EDITOR_EXPORT AttrDescriptor * a_12section; +extern SC_EDITOR_EXPORT AttrDescriptor * a_13context_identifiers; -class SCL_EDITOR_EXPORT SdaiSection_context : public SDAI_Application_instance { +class SC_EDITOR_EXPORT SdaiSection_context : public SDAI_Application_instance { protected: SDAI_String _section ; // OPTIONAL StringAggregate _context_identifiers ; // of context_name @@ -185,10 +185,10 @@ create_SdaiSection_context() { ///////// ENTITY file_description -extern SCL_EDITOR_EXPORT AttrDescriptor * a_14description; -extern SCL_EDITOR_EXPORT AttrDescriptor * a_15implementation_level; +extern SC_EDITOR_EXPORT AttrDescriptor * a_14description; +extern SC_EDITOR_EXPORT AttrDescriptor * a_15implementation_level; -class SCL_EDITOR_EXPORT SdaiFile_description : public SDAI_Application_instance { +class SC_EDITOR_EXPORT SdaiFile_description : public SDAI_Application_instance { protected: StringAggregate _description ; SDAI_String _implementation_level ; @@ -220,9 +220,9 @@ create_SdaiFile_description() { ///////// ENTITY file_schema -extern SCL_EDITOR_EXPORT AttrDescriptor * a_16schema_identifiers; +extern SC_EDITOR_EXPORT AttrDescriptor * a_16schema_identifiers; -class SCL_EDITOR_EXPORT SdaiFile_schema : public SDAI_Application_instance { +class SC_EDITOR_EXPORT SdaiFile_schema : public SDAI_Application_instance { protected: StringAggregate _schema_identifiers ; // of schema_name @@ -251,7 +251,7 @@ create_SdaiFile_schema() { // ***** generate Model related pieces -class SCL_EDITOR_EXPORT SdaiModel_contents_header_section_schema : public SDAI_Model_contents { +class SC_EDITOR_EXPORT SdaiModel_contents_header_section_schema : public SDAI_Model_contents { public: SdaiModel_contents_header_section_schema(); @@ -273,5 +273,5 @@ class SCL_EDITOR_EXPORT SdaiModel_contents_header_section_schema : public SDAI_M typedef SdaiModel_contents_header_section_schema * SdaiModel_contents_header_section_schema_ptr; typedef SdaiModel_contents_header_section_schema_ptr SdaiModel_contents_header_section_schema_var; -SCL_EDITOR_EXPORT SDAI_Model_contents_ptr create_SdaiModel_contents_header_section_schema(); +SC_EDITOR_EXPORT SDAI_Model_contents_ptr create_SdaiModel_contents_header_section_schema(); #endif diff --git a/src/cleditor/SdaiHeaderSchemaAll.cc b/src/cleditor/SdaiHeaderSchemaAll.cc index d13ce318..74e88acf 100644 --- a/src/cleditor/SdaiHeaderSchemaAll.cc +++ b/src/cleditor/SdaiHeaderSchemaAll.cc @@ -5,7 +5,7 @@ // regenerate it. #include -#include "scl_memmgr.h" +#include "sc_memmgr.h" void HeaderInitSchemasAndEnts( Registry & reg ) { Uniqueness_rule_ptr ur; diff --git a/src/cleditor/SdaiHeaderSchemaClasses.h b/src/cleditor/SdaiHeaderSchemaClasses.h index 925f799d..7eb92367 100644 --- a/src/cleditor/SdaiHeaderSchemaClasses.h +++ b/src/cleditor/SdaiHeaderSchemaClasses.h @@ -4,24 +4,24 @@ // it since your modifications will be lost if fedex_plus is used to // regenerate it. -#include +#include // Schema: SdaiHEADER_SECTION_SCHEMA extern Schema * s_header_section_schema; // Types: typedef SDAI_String SdaiTime_stamp_text; -extern SCL_EDITOR_EXPORT TypeDescriptor * header_section_schemat_time_stamp_text; +extern SC_EDITOR_EXPORT TypeDescriptor * header_section_schemat_time_stamp_text; typedef SDAI_String SdaiSection_name; -extern SCL_EDITOR_EXPORT TypeDescriptor * header_section_schemat_section_name; +extern SC_EDITOR_EXPORT TypeDescriptor * header_section_schemat_section_name; typedef SDAI_String SdaiContext_name; -extern SCL_EDITOR_EXPORT TypeDescriptor * header_section_schemat_context_name; +extern SC_EDITOR_EXPORT TypeDescriptor * header_section_schemat_context_name; typedef SDAI_String SdaiSchema_name; -extern SCL_EDITOR_EXPORT TypeDescriptor * header_section_schemat_schema_name; +extern SC_EDITOR_EXPORT TypeDescriptor * header_section_schemat_schema_name; typedef SDAI_String SdaiLanguage_name; -extern SCL_EDITOR_EXPORT TypeDescriptor * header_section_schemat_language_name; +extern SC_EDITOR_EXPORT TypeDescriptor * header_section_schemat_language_name; typedef SDAI_String SdaiExchange_structure_identifier; -extern SCL_EDITOR_EXPORT TypeDescriptor * header_section_schemat_exchange_structure_identifier; +extern SC_EDITOR_EXPORT TypeDescriptor * header_section_schemat_exchange_structure_identifier; // Entities: class SdaiSection_language; @@ -32,7 +32,7 @@ typedef const SdaiSection_language * const_SdaiSection_languageH; typedef const SdaiSection_language * const_SdaiSection_language_ptr; #define SdaiSection_language__set SDAI_DAObject__set #define SdaiSection_language__set_var SDAI_DAObject__set_var -extern SCL_EDITOR_EXPORT EntityDescriptor * header_section_schemae_section_language; +extern SC_EDITOR_EXPORT EntityDescriptor * header_section_schemae_section_language; class SdaiFile_population; typedef SdaiFile_population * SdaiFile_populationH; @@ -42,7 +42,7 @@ typedef const SdaiFile_population * const_SdaiFile_populationH; typedef const SdaiFile_population * const_SdaiFile_population_ptr; #define SdaiFile_population__set SDAI_DAObject__set #define SdaiFile_population__set_var SDAI_DAObject__set_var -extern SCL_EDITOR_EXPORT EntityDescriptor * header_section_schemae_file_population; +extern SC_EDITOR_EXPORT EntityDescriptor * header_section_schemae_file_population; class SdaiFile_name; typedef SdaiFile_name * SdaiFile_nameH; @@ -52,7 +52,7 @@ typedef const SdaiFile_name * const_SdaiFile_nameH; typedef const SdaiFile_name * const_SdaiFile_name_ptr; #define SdaiFile_name__set SDAI_DAObject__set #define SdaiFile_name__set_var SDAI_DAObject__set_var -extern SCL_EDITOR_EXPORT EntityDescriptor * header_section_schemae_file_name; +extern SC_EDITOR_EXPORT EntityDescriptor * header_section_schemae_file_name; class SdaiSection_context; typedef SdaiSection_context * SdaiSection_contextH; @@ -62,7 +62,7 @@ typedef const SdaiSection_context * const_SdaiSection_contextH; typedef const SdaiSection_context * const_SdaiSection_context_ptr; #define SdaiSection_context__set SDAI_DAObject__set #define SdaiSection_context__set_var SDAI_DAObject__set_var -extern SCL_EDITOR_EXPORT EntityDescriptor * header_section_schemae_section_context; +extern SC_EDITOR_EXPORT EntityDescriptor * header_section_schemae_section_context; class SdaiFile_description; typedef SdaiFile_description * SdaiFile_descriptionH; @@ -72,7 +72,7 @@ typedef const SdaiFile_description * const_SdaiFile_descriptionH; typedef const SdaiFile_description * const_SdaiFile_description_ptr; #define SdaiFile_description__set SDAI_DAObject__set #define SdaiFile_description__set_var SDAI_DAObject__set_var -extern SCL_EDITOR_EXPORT EntityDescriptor * header_section_schemae_file_description; +extern SC_EDITOR_EXPORT EntityDescriptor * header_section_schemae_file_description; class SdaiFile_schema; typedef SdaiFile_schema * SdaiFile_schemaH; @@ -82,6 +82,6 @@ typedef const SdaiFile_schema * const_SdaiFile_schemaH; typedef const SdaiFile_schema * const_SdaiFile_schema_ptr; #define SdaiFile_schema__set SDAI_DAObject__set #define SdaiFile_schema__set_var SDAI_DAObject__set_var -extern SCL_EDITOR_EXPORT EntityDescriptor * header_section_schemae_file_schema; +extern SC_EDITOR_EXPORT EntityDescriptor * header_section_schemae_file_schema; #endif diff --git a/src/cleditor/SdaiHeaderSchemaInit.cc b/src/cleditor/SdaiHeaderSchemaInit.cc index 23e17108..4e4daf30 100644 --- a/src/cleditor/SdaiHeaderSchemaInit.cc +++ b/src/cleditor/SdaiHeaderSchemaInit.cc @@ -8,7 +8,7 @@ #include #include #include -#include "scl_memmgr.h" +#include "sc_memmgr.h" void SdaiHEADER_SECTION_SCHEMAInit( Registry & reg ) { header_section_schemat_time_stamp_text->ReferentType( t_sdaiSTRING ); diff --git a/src/cleditor/SdaiSchemaInit.cc b/src/cleditor/SdaiSchemaInit.cc index 77febe1a..379eddf3 100644 --- a/src/cleditor/SdaiSchemaInit.cc +++ b/src/cleditor/SdaiSchemaInit.cc @@ -5,7 +5,7 @@ // regenerate it. #include -#include "scl_memmgr.h" +#include "sc_memmgr.h" void HeaderSchemaInit( Registry & reg ) { HeaderInitSchemasAndEnts( reg ); diff --git a/src/cleditor/SdaiSchemaInit.h b/src/cleditor/SdaiSchemaInit.h index 4e785b12..1c4316d0 100644 --- a/src/cleditor/SdaiSchemaInit.h +++ b/src/cleditor/SdaiSchemaInit.h @@ -4,11 +4,11 @@ // it since your modifications will be lost if fedex_plus is used to // regenerate it. -#ifdef SCL_LOGGING +#ifdef SC_LOGGING #include #endif -#include +#include #include #include #include @@ -20,8 +20,8 @@ #include #include -SCL_EDITOR_EXPORT void HeaderSchemaInit( Registry & ); -SCL_EDITOR_EXPORT void HeaderInitSchemasAndEnts( Registry & ); -SCL_EDITOR_EXPORT void SdaiHEADER_SECTION_SCHEMAInit( Registry & r ); +SC_EDITOR_EXPORT void HeaderSchemaInit( Registry & ); +SC_EDITOR_EXPORT void HeaderInitSchemasAndEnts( Registry & ); +SC_EDITOR_EXPORT void SdaiHEADER_SECTION_SCHEMAInit( Registry & r ); #endif diff --git a/src/cleditor/cmdmgr.cc b/src/cleditor/cmdmgr.cc index 2834b1ae..7c015ce4 100644 --- a/src/cleditor/cmdmgr.cc +++ b/src/cleditor/cmdmgr.cc @@ -11,7 +11,7 @@ */ #include -#include "scl_memmgr.h" +#include "sc_memmgr.h" ReplicateLinkNode * ReplicateList::FindNode( MgrNode * mn ) { ReplicateLinkNode * rln = ( ReplicateLinkNode * )GetHead(); diff --git a/src/cleditor/cmdmgr.h b/src/cleditor/cmdmgr.h index 4f5105d9..7ef2f00b 100644 --- a/src/cleditor/cmdmgr.h +++ b/src/cleditor/cmdmgr.h @@ -12,7 +12,7 @@ * and is not subject to copyright. */ -#include +#include #include #include #include @@ -77,7 +77,7 @@ /////////////////////////////////////////////////////////////////////////////// -class SCL_EDITOR_EXPORT ReplicateLinkNode : public SingleLinkNode { +class SC_EDITOR_EXPORT ReplicateLinkNode : public SingleLinkNode { private: protected: MgrNode * _repNode; @@ -99,7 +99,7 @@ class SCL_EDITOR_EXPORT ReplicateLinkNode : public SingleLinkNode { } }; -class SCL_EDITOR_EXPORT ReplicateList : public SingleLinkList { +class SC_EDITOR_EXPORT ReplicateList : public SingleLinkList { private: protected: public: @@ -130,7 +130,7 @@ class SCL_EDITOR_EXPORT ReplicateList : public SingleLinkList { /////////////////////////////////////////////////////////////////////////////// -class SCL_EDITOR_EXPORT CmdMgr { +class SC_EDITOR_EXPORT CmdMgr { protected: MgrNodeList * completeList; MgrNodeList * incompleteList; diff --git a/src/cleditor/seeinfodefault.h b/src/cleditor/seeinfodefault.h index 37984bbb..51198eac 100644 --- a/src/cleditor/seeinfodefault.h +++ b/src/cleditor/seeinfodefault.h @@ -15,7 +15,7 @@ // this is a default seeinfo that does nothing... thus it is not // dependent on a user interface toolkit -#include +#include class MgrNode; class DisplayNode; @@ -25,7 +25,7 @@ class DisplayNodelist; #include -class SCL_EDITOR_EXPORT seeInfo : public DisplayNode { +class SC_EDITOR_EXPORT seeInfo : public DisplayNode { public: seeInfo( MgrNode * node, SDAI_Application_instance * se, diff --git a/src/cllazyfile/CMakeLists.txt b/src/cllazyfile/CMakeLists.txt index 40376514..b62ff98b 100644 --- a/src/cllazyfile/CMakeLists.txt +++ b/src/cllazyfile/CMakeLists.txt @@ -6,14 +6,14 @@ lazyDataSectionReader.h lazyInstMgr.h lazyTypes.h sectionReader.h ) include_directories( ${CMAKE_CURRENT_SOURCE_DIR} - ${SCL_SOURCE_DIR}/src/cleditor - ${SCL_SOURCE_DIR}/src/cldai - ${SCL_SOURCE_DIR}/src/clstepcore - ${SCL_SOURCE_DIR}/src/clutils - ${SCL_SOURCE_DIR}/src/base - ${SCL_SOURCE_DIR}/src/base/judy/src + ${SC_SOURCE_DIR}/src/cleditor + ${SC_SOURCE_DIR}/src/cldai + ${SC_SOURCE_DIR}/src/clstepcore + ${SC_SOURCE_DIR}/src/clutils + ${SC_SOURCE_DIR}/src/base + ${SC_SOURCE_DIR}/src/base/judy/src ) -SCL_ADDLIB(steplazyfile "${clLazyFile_SRCS};${clLazyFile_HDRS}" "stepcore;stepdai;steputils;base") -SCL_ADDEXEC(lazy_test "lazy_test.cc" "steplazyfile;stepeditor" ) +SC_ADDLIB(steplazyfile "${clLazyFile_SRCS};${clLazyFile_HDRS}" "stepcore;stepdai;steputils;base") +SC_ADDEXEC(lazy_test "lazy_test.cc" "steplazyfile;stepeditor" ) set_target_properties(lazy_test PROPERTIES COMPILE_FLAGS "-DNO_REGISTRY" ) diff --git a/src/cllazyfile/current_function.hpp b/src/cllazyfile/current_function.hpp index 20230123..691cf696 100644 --- a/src/cllazyfile/current_function.hpp +++ b/src/cllazyfile/current_function.hpp @@ -9,7 +9,7 @@ // Local copy of Boost's BOOST_CURRENT_FUNCTION wrapper // -// current_function.hpp - SCL_CURRENT_FUNCTION +// current_function.hpp - SC_CURRENT_FUNCTION // // Copyright (c) 2002 Peter Dimov and Multi Media Ltd. // @@ -22,31 +22,31 @@ #if defined(__GNUC__) || (defined(__MWERKS__) && (__MWERKS__ >= 0x3000)) || (defined(__ICC) && (__ICC >= 600)) || defined(__ghs__) -# define SCL_CURRENT_FUNCTION __PRETTY_FUNCTION__ +# define SC_CURRENT_FUNCTION __PRETTY_FUNCTION__ #elif defined(__DMC__) && (__DMC__ >= 0x810) -# define SCL_CURRENT_FUNCTION __PRETTY_FUNCTION__ +# define SC_CURRENT_FUNCTION __PRETTY_FUNCTION__ #elif defined(__FUNCSIG__) -# define SCL_CURRENT_FUNCTION __FUNCSIG__ +# define SC_CURRENT_FUNCTION __FUNCSIG__ #elif (defined(__INTEL_COMPILER) && (__INTEL_COMPILER >= 600)) || (defined(__IBMCPP__) && (__IBMCPP__ >= 500)) -# define SCL_CURRENT_FUNCTION __FUNCTION__ +# define SC_CURRENT_FUNCTION __FUNCTION__ #elif defined(__BORLANDC__) && (__BORLANDC__ >= 0x550) -# define SCL_CURRENT_FUNCTION __FUNC__ +# define SC_CURRENT_FUNCTION __FUNC__ #elif defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 199901) -# define SCL_CURRENT_FUNCTION __func__ +# define SC_CURRENT_FUNCTION __func__ #else -# define SCL_CURRENT_FUNCTION "(unknown)" +# define SC_CURRENT_FUNCTION "(unknown)" #endif diff --git a/src/cllazyfile/headerSectionReader.h b/src/cllazyfile/headerSectionReader.h index b970ff65..2fbb9d3e 100644 --- a/src/cllazyfile/headerSectionReader.h +++ b/src/cllazyfile/headerSectionReader.h @@ -8,12 +8,12 @@ #include "lazyFileReader.h" #include "sectionReader.h" #include "lazyTypes.h" -#include "scl_memmgr.h" +#include "sc_memmgr.h" -#include "scl_export.h" +#include "sc_export.h" ///differs from the lazyDataSectionReader in that all instances are always loaded -class SCL_LAZYFILE_EXPORT headerSectionReader: public sectionReader { +class SC_LAZYFILE_EXPORT headerSectionReader: public sectionReader { protected: instancesLoaded_t * _headerInstances; diff --git a/src/cllazyfile/lazyDataSectionReader.h b/src/cllazyfile/lazyDataSectionReader.h index cb7b5b06..e3bf5754 100644 --- a/src/cllazyfile/lazyDataSectionReader.h +++ b/src/cllazyfile/lazyDataSectionReader.h @@ -5,9 +5,9 @@ #include #include "sectionReader.h" #include "lazyTypes.h" -#include "scl_memmgr.h" +#include "sc_memmgr.h" -#include "scl_export.h" +#include "sc_export.h" /** base class for data section readers * \sa lazyP21DataSectionReader diff --git a/src/cllazyfile/lazyFileReader.h b/src/cllazyfile/lazyFileReader.h index df102959..44def9fb 100644 --- a/src/cllazyfile/lazyFileReader.h +++ b/src/cllazyfile/lazyFileReader.h @@ -5,7 +5,7 @@ #include #include -#include "scl_export.h" +#include "sc_export.h" // PART 21 #include "lazyP21DataSectionReader.h" @@ -16,7 +16,7 @@ * #include "lazyP28DataSectionReader.h" * #include "p28HeaderSectionReader.h" */ -#include "scl_memmgr.h" +#include "sc_memmgr.h" class lazyInstMgr; class Registry; @@ -24,7 +24,7 @@ class headerSectionReader; ///read an exchange file of any supported type (currently only p21) ///for use only from within lazyInstMgr -class SCL_LAZYFILE_EXPORT lazyFileReader { +class SC_LAZYFILE_EXPORT lazyFileReader { protected: std::string _fileName; lazyInstMgr * _parent; diff --git a/src/cllazyfile/lazyInstMgr.h b/src/cllazyfile/lazyInstMgr.h index 6681583c..7538ad49 100644 --- a/src/cllazyfile/lazyInstMgr.h +++ b/src/cllazyfile/lazyInstMgr.h @@ -10,7 +10,7 @@ #include "lazyTypes.h" #include "Registry.h" -#include "scl_memmgr.h" +#include "sc_memmgr.h" #include "judyLArray.h" #include "judySArray.h" diff --git a/src/cllazyfile/lazyP21DataSectionReader.h b/src/cllazyfile/lazyP21DataSectionReader.h index 96c2bd3d..55549d85 100644 --- a/src/cllazyfile/lazyP21DataSectionReader.h +++ b/src/cllazyfile/lazyP21DataSectionReader.h @@ -3,10 +3,10 @@ #include "lazyDataSectionReader.h" #include "lazyFileReader.h" -#include "scl_memmgr.h" -#include "scl_export.h" +#include "sc_memmgr.h" +#include "sc_export.h" -class SCL_LAZYFILE_EXPORT lazyP21DataSectionReader: public lazyDataSectionReader { +class SC_LAZYFILE_EXPORT lazyP21DataSectionReader: public lazyDataSectionReader { protected: public: lazyP21DataSectionReader( lazyFileReader * parent, std::ifstream & file, std::streampos start, sectionID sid ); diff --git a/src/cllazyfile/lazy_test.cc b/src/cllazyfile/lazy_test.cc index 1cd16f7d..d58f6c7d 100644 --- a/src/cllazyfile/lazy_test.cc +++ b/src/cllazyfile/lazy_test.cc @@ -1,8 +1,8 @@ #include "lazyInstMgr.h" #include #include "SdaiSchemaInit.h" -#include "scl_memmgr.h" -#include +#include "sc_memmgr.h" +#include #ifndef NO_REGISTRY # include "schema.h" diff --git a/src/cllazyfile/p21HeaderSectionReader.h b/src/cllazyfile/p21HeaderSectionReader.h index 48ef352d..6c8fc6af 100644 --- a/src/cllazyfile/p21HeaderSectionReader.h +++ b/src/cllazyfile/p21HeaderSectionReader.h @@ -2,10 +2,10 @@ #define P21HEADERSECTIONREADER_H #include "headerSectionReader.h" -#include "scl_memmgr.h" -#include "scl_export.h" +#include "sc_memmgr.h" +#include "sc_export.h" -class SCL_LAZYFILE_EXPORT p21HeaderSectionReader: public headerSectionReader { +class SC_LAZYFILE_EXPORT p21HeaderSectionReader: public headerSectionReader { public: p21HeaderSectionReader( lazyFileReader * parent, std::ifstream & file, std::streampos start, sectionID sid ); void findSectionStart(); diff --git a/src/cllazyfile/sectionReader.cc b/src/cllazyfile/sectionReader.cc index 6f048dde..f8103250 100644 --- a/src/cllazyfile/sectionReader.cc +++ b/src/cllazyfile/sectionReader.cc @@ -1,5 +1,5 @@ -#define SCL_CORE_EXPORT -#define SCL_DAI_EXPORT +#define SC_CORE_EXPORT +#define SC_DAI_EXPORT #include #include @@ -101,7 +101,7 @@ const char * sectionReader::getDelimitedKeyword( const char * delimiters ) { } c = _file.peek(); if( !strchr( delimiters, c ) ) { - std::cerr << SCL_CURRENT_FUNCTION << ": missing delimiter. Found " << c << ", expected one of " << delimiters << " at end of keyword " << str << ". File offset: " << _file.tellg() << std::endl; + std::cerr << SC_CURRENT_FUNCTION << ": missing delimiter. Found " << c << ", expected one of " << delimiters << " at end of keyword " << str << ". File offset: " << _file.tellg() << std::endl; abort(); } return str.c_str(); diff --git a/src/cllazyfile/sectionReader.h b/src/cllazyfile/sectionReader.h index d343c588..84e053cd 100644 --- a/src/cllazyfile/sectionReader.h +++ b/src/cllazyfile/sectionReader.h @@ -4,15 +4,15 @@ #include #include #include "lazyTypes.h" -#include "scl_memmgr.h" -#include "scl_export.h" +#include "sc_memmgr.h" +#include "sc_export.h" class SDAI_Application_instance; class lazyFileReader; class ErrorDescriptor; class Registry; -class SCL_LAZYFILE_EXPORT sectionReader { +class SC_LAZYFILE_EXPORT sectionReader { protected: //protected data members lazyFileReader * _lazyFile; diff --git a/src/clstepcore/CMakeLists.txt b/src/clstepcore/CMakeLists.txt index 33c2151b..50437b06 100644 --- a/src/clstepcore/CMakeLists.txt +++ b/src/clstepcore/CMakeLists.txt @@ -61,10 +61,10 @@ SET(LIBSTEPCORE_PRIVATE_HDRS include_directories( ${CMAKE_CURRENT_SOURCE_DIR} - ${SCL_SOURCE_DIR}/src/base - ${SCL_SOURCE_DIR}/src/cldai - ${SCL_SOURCE_DIR}/src/cleditor - ${SCL_SOURCE_DIR}/src/clutils + ${SC_SOURCE_DIR}/src/base + ${SC_SOURCE_DIR}/src/cldai + ${SC_SOURCE_DIR}/src/cleditor + ${SC_SOURCE_DIR}/src/clutils ) -SCL_ADDLIB(stepcore "${LIBSTEPCORE_SRCS}" "express;steputils;stepdai;base") +SC_ADDLIB(stepcore "${LIBSTEPCORE_SRCS}" "express;steputils;stepdai;base") diff --git a/src/clstepcore/ExpDict.cc b/src/clstepcore/ExpDict.cc index 34886803..da5bd331 100644 --- a/src/clstepcore/ExpDict.cc +++ b/src/clstepcore/ExpDict.cc @@ -10,7 +10,7 @@ * and is not subject to copyright. */ -#include +#include #include #include @@ -18,7 +18,7 @@ #include #include -#include "scl_memmgr.h" +#include "sc_memmgr.h" Explicit_item_id__set::Explicit_item_id__set( int defaultSize ) { diff --git a/src/clstepcore/ExpDict.h b/src/clstepcore/ExpDict.h index 0d4fd440..4f1bb939 100644 --- a/src/clstepcore/ExpDict.h +++ b/src/clstepcore/ExpDict.h @@ -12,7 +12,7 @@ * and is not subject to copyright. */ -#include +#include #include #include @@ -42,19 +42,19 @@ enum AggrBoundTypeEnum { #include // defined and created in Registry.inline.cc -extern SCL_CORE_EXPORT const TypeDescriptor * t_sdaiINTEGER; -extern SCL_CORE_EXPORT const TypeDescriptor * t_sdaiREAL; -extern SCL_CORE_EXPORT const TypeDescriptor * t_sdaiNUMBER; -extern SCL_CORE_EXPORT const TypeDescriptor * t_sdaiSTRING; -extern SCL_CORE_EXPORT const TypeDescriptor * t_sdaiBINARY; -extern SCL_CORE_EXPORT const TypeDescriptor * t_sdaiBOOLEAN; -extern SCL_CORE_EXPORT const TypeDescriptor * t_sdaiLOGICAL; +extern SC_CORE_EXPORT const TypeDescriptor * t_sdaiINTEGER; +extern SC_CORE_EXPORT const TypeDescriptor * t_sdaiREAL; +extern SC_CORE_EXPORT const TypeDescriptor * t_sdaiNUMBER; +extern SC_CORE_EXPORT const TypeDescriptor * t_sdaiSTRING; +extern SC_CORE_EXPORT const TypeDescriptor * t_sdaiBINARY; +extern SC_CORE_EXPORT const TypeDescriptor * t_sdaiBOOLEAN; +extern SC_CORE_EXPORT const TypeDescriptor * t_sdaiLOGICAL; /////////////////////////////////////////////////////////////////////////////// // Dictionary_instance /////////////////////////////////////////////////////////////////////////////// -class SCL_CORE_EXPORT Dictionary_instance { +class SC_CORE_EXPORT Dictionary_instance { protected: Dictionary_instance() {} @@ -65,7 +65,7 @@ class SCL_CORE_EXPORT Dictionary_instance { /////////////////////////////////////////////////////////////////////////////// -class SCL_CORE_EXPORT TypeDescLinkNode : public SingleLinkNode { +class SC_CORE_EXPORT TypeDescLinkNode : public SingleLinkNode { private: protected: TypeDescriptor * _typeDesc; @@ -81,7 +81,7 @@ class SCL_CORE_EXPORT TypeDescLinkNode : public SingleLinkNode { } }; -class SCL_CORE_EXPORT TypeDescriptorList : public SingleLinkList { +class SC_CORE_EXPORT TypeDescriptorList : public SingleLinkList { private: protected: public: @@ -100,7 +100,7 @@ class SCL_CORE_EXPORT TypeDescriptorList : public SingleLinkList { } }; -class SCL_CORE_EXPORT TypeDescItr { +class SC_CORE_EXPORT TypeDescItr { protected: const TypeDescriptorList & tdl; const TypeDescLinkNode * cur; @@ -118,7 +118,7 @@ class SCL_CORE_EXPORT TypeDescItr { /////////////////////////////////////////////////////////////////////////////// -class SCL_CORE_EXPORT EntityDescLinkNode : public SingleLinkNode { +class SC_CORE_EXPORT EntityDescLinkNode : public SingleLinkNode { private: protected: @@ -136,7 +136,7 @@ class SCL_CORE_EXPORT EntityDescLinkNode : public SingleLinkNode { } }; -class SCL_CORE_EXPORT EntityDescriptorList : public SingleLinkList { +class SC_CORE_EXPORT EntityDescriptorList : public SingleLinkList { private: protected: @@ -159,7 +159,7 @@ class SCL_CORE_EXPORT EntityDescriptorList : public SingleLinkList { typedef EntityDescriptorList * Entity__set_ptr; typedef Entity__set_ptr Entity__set_var; -class SCL_CORE_EXPORT EntityDescItr { +class SC_CORE_EXPORT EntityDescItr { protected: const EntityDescriptorList & edl; const EntityDescLinkNode * cur; @@ -183,7 +183,7 @@ class SCL_CORE_EXPORT EntityDescItr { // Interfaced_item /////////////////////////////////////////////////////////////////////////////// -class SCL_CORE_EXPORT Interfaced_item : public Dictionary_instance { +class SC_CORE_EXPORT Interfaced_item : public Dictionary_instance { protected: Interfaced_item(); Interfaced_item( const Interfaced_item & ); @@ -201,7 +201,7 @@ class SCL_CORE_EXPORT Interfaced_item : public Dictionary_instance { // Explicit_item_id /////////////////////////////////////////////////////////////////////////////// -class SCL_CORE_EXPORT Explicit_item_id : public Interfaced_item { +class SC_CORE_EXPORT Explicit_item_id : public Interfaced_item { protected: Explicit_item_id(); Explicit_item_id( const Explicit_item_id & ); @@ -256,7 +256,7 @@ class SCL_CORE_EXPORT Explicit_item_id : public Interfaced_item { typedef Explicit_item_id * Explicit_item_id_ptr; -class SCL_CORE_EXPORT Used_item : public Explicit_item_id { +class SC_CORE_EXPORT Used_item : public Explicit_item_id { public: Used_item() {} Used_item( const char * foreign_schema, TypeDescriptor * ld, @@ -271,7 +271,7 @@ class SCL_CORE_EXPORT Used_item : public Explicit_item_id { typedef Used_item * Used_item_ptr; -class SCL_CORE_EXPORT Referenced_item : public Explicit_item_id { +class SC_CORE_EXPORT Referenced_item : public Explicit_item_id { public: Referenced_item() {} Referenced_item( const char * foreign_schema, TypeDescriptor * ld, @@ -286,7 +286,7 @@ class SCL_CORE_EXPORT Referenced_item : public Explicit_item_id { typedef Referenced_item * Referenced_item_ptr; -class SCL_CORE_EXPORT Explicit_item_id__set { +class SC_CORE_EXPORT Explicit_item_id__set { public: Explicit_item_id__set( int = 16 ); ~Explicit_item_id__set(); @@ -314,7 +314,7 @@ typedef Explicit_item_id__set_ptr Explicit_item_id__set_var; // Implicit_item_id /////////////////////////////////////////////////////////////////////////////// -class SCL_CORE_EXPORT Implicit_item_id : public Interfaced_item { +class SC_CORE_EXPORT Implicit_item_id : public Interfaced_item { protected: Implicit_item_id(); Implicit_item_id( Implicit_item_id & ); @@ -338,7 +338,7 @@ typedef Implicit_item_id * Implicit_item_id_ptr; // Implicit_item_id__set /////////////////////////////////////////////////////////////////////////////// -class SCL_CORE_EXPORT Implicit_item_id__set { +class SC_CORE_EXPORT Implicit_item_id__set { public: Implicit_item_id__set( int = 16 ); ~Implicit_item_id__set(); @@ -366,7 +366,7 @@ typedef Implicit_item_id__set_ptr Implicit_item_id__set_var; // Interface_spec /////////////////////////////////////////////////////////////////////////////// -class SCL_CORE_EXPORT Interface_spec : public Dictionary_instance { +class SC_CORE_EXPORT Interface_spec : public Dictionary_instance { public: Express_id _current_schema_id; // schema containing the USE/REF stmt // set of objects from USE/REFERENCE stmt(s) @@ -423,7 +423,7 @@ class SCL_CORE_EXPORT Interface_spec : public Dictionary_instance { typedef Interface_spec * Interface_spec_ptr; -class SCL_CORE_EXPORT Interface_spec__set { +class SC_CORE_EXPORT Interface_spec__set { public: Interface_spec__set( int = 16 ); ~Interface_spec__set(); @@ -448,7 +448,7 @@ typedef Interface_spec__set * Interface_spec__set_ptr; typedef Interface_spec__set_ptr Interface_spec__set_var; -class SCL_CORE_EXPORT Type_or_rule : public Dictionary_instance { +class SC_CORE_EXPORT Type_or_rule : public Dictionary_instance { public: Type_or_rule(); Type_or_rule( const Type_or_rule & ); @@ -458,7 +458,7 @@ class SCL_CORE_EXPORT Type_or_rule : public Dictionary_instance { typedef Type_or_rule * Type_or_rule_ptr; typedef Type_or_rule_ptr Type_or_rule_var; -class SCL_CORE_EXPORT Where_rule : public Dictionary_instance { +class SC_CORE_EXPORT Where_rule : public Dictionary_instance { public: Express_id _label; Type_or_rule_var _type_or_rule; @@ -497,7 +497,7 @@ class SCL_CORE_EXPORT Where_rule : public Dictionary_instance { typedef Where_rule * Where_rule_ptr; -class SCL_CORE_EXPORT Where_rule__list { +class SC_CORE_EXPORT Where_rule__list { public: Where_rule__list( int = 16 ); ~Where_rule__list(); @@ -521,7 +521,7 @@ class SCL_CORE_EXPORT Where_rule__list { typedef Where_rule__list * Where_rule__list_ptr; typedef Where_rule__list_ptr Where_rule__list_var; -class SCL_CORE_EXPORT Global_rule : public Dictionary_instance { +class SC_CORE_EXPORT Global_rule : public Dictionary_instance { public: Express_id _name; Entity__set_var _entities; // not implemented @@ -566,7 +566,7 @@ class SCL_CORE_EXPORT Global_rule : public Dictionary_instance { typedef Global_rule * Global_rule_ptr; -class SCL_CORE_EXPORT Global_rule__set { +class SC_CORE_EXPORT Global_rule__set { public: Global_rule__set( int = 16 ); ~Global_rule__set(); @@ -590,7 +590,7 @@ class SCL_CORE_EXPORT Global_rule__set { typedef Global_rule__set * Global_rule__set_ptr; typedef Global_rule__set_ptr Global_rule__set_var; -class SCL_CORE_EXPORT Uniqueness_rule : public Dictionary_instance { +class SC_CORE_EXPORT Uniqueness_rule : public Dictionary_instance { public: Express_id _label; const EntityDescriptor * _parent_entity; @@ -630,7 +630,7 @@ class SCL_CORE_EXPORT Uniqueness_rule : public Dictionary_instance { typedef Uniqueness_rule * Uniqueness_rule_ptr; -class SCL_CORE_EXPORT Uniqueness_rule__set { +class SC_CORE_EXPORT Uniqueness_rule__set { public: Uniqueness_rule__set( int = 16 ); ~Uniqueness_rule__set(); @@ -659,7 +659,7 @@ typedef SDAI_Model_contents_ptr( * ModelContentsCreator )(); /** * \class Schema (was SchemaDescriptor) - a class of this type is generated and contains schema info. */ -class SCL_CORE_EXPORT Schema : public Dictionary_instance { +class SC_CORE_EXPORT Schema : public Dictionary_instance { protected: const char * _name; @@ -755,7 +755,7 @@ typedef Schema SchemaDescriptor; /////////////////////////////////////////////////////////////////////////////// -class SCL_CORE_EXPORT AttrDescLinkNode : public SingleLinkNode { +class SC_CORE_EXPORT AttrDescLinkNode : public SingleLinkNode { private: protected: AttrDescriptor * _attrDesc; @@ -771,7 +771,7 @@ class SCL_CORE_EXPORT AttrDescLinkNode : public SingleLinkNode { } }; -class SCL_CORE_EXPORT AttrDescriptorList : public SingleLinkList { +class SC_CORE_EXPORT AttrDescriptorList : public SingleLinkList { private: protected: public: @@ -785,7 +785,7 @@ class SCL_CORE_EXPORT AttrDescriptorList : public SingleLinkList { AttrDescLinkNode * AddNode( AttrDescriptor * ad ); }; -class SCL_CORE_EXPORT AttrDescItr { +class SC_CORE_EXPORT AttrDescItr { protected: const AttrDescriptorList & adl; const AttrDescLinkNode * cur; @@ -803,7 +803,7 @@ class SCL_CORE_EXPORT AttrDescItr { /////////////////////////////////////////////////////////////////////////////// -class SCL_CORE_EXPORT Inverse_attributeLinkNode : public SingleLinkNode { +class SC_CORE_EXPORT Inverse_attributeLinkNode : public SingleLinkNode { private: protected: Inverse_attribute * _invAttr; @@ -819,7 +819,7 @@ class SCL_CORE_EXPORT Inverse_attributeLinkNode : public SingleLinkNode { } }; -class SCL_CORE_EXPORT Inverse_attributeList : public SingleLinkList { +class SC_CORE_EXPORT Inverse_attributeList : public SingleLinkList { private: protected: public: @@ -832,7 +832,7 @@ class SCL_CORE_EXPORT Inverse_attributeList : public SingleLinkList { Inverse_attributeLinkNode * AddNode( Inverse_attribute * ia ); }; -class SCL_CORE_EXPORT InverseAItr { +class SC_CORE_EXPORT InverseAItr { protected: const Inverse_attributeList & ial; const Inverse_attributeLinkNode * cur; @@ -853,7 +853,7 @@ class SCL_CORE_EXPORT InverseAItr { * An instance of this class will be generated for each attribute for * an Entity. They will be pointed to by the EntityTypeDescriptors. */ -class SCL_CORE_EXPORT AttrDescriptor { +class SC_CORE_EXPORT AttrDescriptor { protected: const char * _name; // the attributes name @@ -1029,7 +1029,7 @@ class SCL_CORE_EXPORT AttrDescriptor { // Derived_attribute /////////////////////////////////////////////////////////////////////////////// -class SCL_CORE_EXPORT Derived_attribute : public AttrDescriptor { +class SC_CORE_EXPORT Derived_attribute : public AttrDescriptor { public: const char * _initializer; @@ -1057,7 +1057,7 @@ class SCL_CORE_EXPORT Derived_attribute : public AttrDescriptor { // Inverse_attribute /////////////////////////////////////////////////////////////////////////////// -class SCL_CORE_EXPORT Inverse_attribute : public AttrDescriptor { +class SC_CORE_EXPORT Inverse_attribute : public AttrDescriptor { public: const char * _inverted_attr_id; @@ -1127,7 +1127,7 @@ class SCL_CORE_EXPORT Inverse_attribute : public AttrDescriptor { * schema is determined by the file schema section of the header section of a * part21 file (the _headerInstances of STEPfile). */ -class SCL_CORE_EXPORT SchRename { +class SC_CORE_EXPORT SchRename { public: SchRename( const char * sch = "\0", const char * newnm = "\0" ) : next( 0 ) { strcpy( schName, sch ); @@ -1239,7 +1239,7 @@ class SCL_CORE_EXPORT SchRename { * It is the same as _name for EXPRESS base types TypeDescriptors (with * the possible exception of upper or lower case differences). */ -class SCL_CORE_EXPORT TypeDescriptor { +class SC_CORE_EXPORT TypeDescriptor { protected: @@ -1433,7 +1433,7 @@ class SCL_CORE_EXPORT TypeDescriptor { typedef SDAI_Enum * ( * EnumCreator )(); -class SCL_CORE_EXPORT EnumTypeDescriptor : public TypeDescriptor { +class SC_CORE_EXPORT EnumTypeDescriptor : public TypeDescriptor { public: EnumCreator CreateNewEnum; @@ -1464,7 +1464,7 @@ class SCL_CORE_EXPORT EnumTypeDescriptor : public TypeDescriptor { * will be building the same thing but using the new schema info. * nodes (i.e. EntityDesc nodes) for each entity. */ -class SCL_CORE_EXPORT EntityDescriptor : public TypeDescriptor { +class SC_CORE_EXPORT EntityDescriptor : public TypeDescriptor { protected: SDAI_LOGICAL _abstractEntity; @@ -1591,7 +1591,7 @@ class SCL_CORE_EXPORT EntityDescriptor : public TypeDescriptor { * FIXME not implemented */ #ifdef NOT_YET -class SCL_CORE_EXPORT EnumerationTypeDescriptor : public TypeDescriptor { +class SC_CORE_EXPORT EnumerationTypeDescriptor : public TypeDescriptor { protected: StringAggregate * _elements; // of (null) @@ -1628,21 +1628,21 @@ typedef BinaryAggregate * ( * BinaryAggregateCreator )(); typedef RealAggregate * ( * RealAggregateCreator )(); typedef IntAggregate * ( * IntAggregateCreator )(); -SCL_CORE_EXPORT EnumAggregate * create_EnumAggregate(); +SC_CORE_EXPORT EnumAggregate * create_EnumAggregate(); -SCL_CORE_EXPORT GenericAggregate * create_GenericAggregate(); +SC_CORE_EXPORT GenericAggregate * create_GenericAggregate(); -SCL_CORE_EXPORT EntityAggregate * create_EntityAggregate(); +SC_CORE_EXPORT EntityAggregate * create_EntityAggregate(); -SCL_CORE_EXPORT SelectAggregate * create_SelectAggregate(); +SC_CORE_EXPORT SelectAggregate * create_SelectAggregate(); -SCL_CORE_EXPORT StringAggregate * create_StringAggregate(); +SC_CORE_EXPORT StringAggregate * create_StringAggregate(); -SCL_CORE_EXPORT BinaryAggregate * create_BinaryAggregate(); +SC_CORE_EXPORT BinaryAggregate * create_BinaryAggregate(); -SCL_CORE_EXPORT RealAggregate * create_RealAggregate(); +SC_CORE_EXPORT RealAggregate * create_RealAggregate(); -SCL_CORE_EXPORT IntAggregate * create_IntAggregate(); +SC_CORE_EXPORT IntAggregate * create_IntAggregate(); typedef SDAI_Integer( *boundCallbackFn )( SDAI_Application_instance * ); @@ -1657,7 +1657,7 @@ typedef SDAI_Integer( *boundCallbackFn )( SDAI_Application_instance * ); * together by the _aggrDomainType variables. If you can make this * work then go for it. */ -class SCL_CORE_EXPORT AggrTypeDescriptor : public TypeDescriptor { +class SC_CORE_EXPORT AggrTypeDescriptor : public TypeDescriptor { protected: @@ -1779,7 +1779,7 @@ class SCL_CORE_EXPORT AggrTypeDescriptor : public TypeDescriptor { /////////////////////////////////////////////////////////////////////////////// // ArrayTypeDescriptor /////////////////////////////////////////////////////////////////////////////// -class SCL_CORE_EXPORT ArrayTypeDescriptor : public AggrTypeDescriptor { +class SC_CORE_EXPORT ArrayTypeDescriptor : public AggrTypeDescriptor { protected: SDAI_LOGICAL _optionalElements; @@ -1812,7 +1812,7 @@ class SCL_CORE_EXPORT ArrayTypeDescriptor : public AggrTypeDescriptor { } }; -class SCL_CORE_EXPORT ListTypeDescriptor : public AggrTypeDescriptor { +class SC_CORE_EXPORT ListTypeDescriptor : public AggrTypeDescriptor { protected: public: @@ -1825,7 +1825,7 @@ class SCL_CORE_EXPORT ListTypeDescriptor : public AggrTypeDescriptor { }; -class SCL_CORE_EXPORT SetTypeDescriptor : public AggrTypeDescriptor { +class SC_CORE_EXPORT SetTypeDescriptor : public AggrTypeDescriptor { protected: public: @@ -1839,7 +1839,7 @@ class SCL_CORE_EXPORT SetTypeDescriptor : public AggrTypeDescriptor { }; -class SCL_CORE_EXPORT BagTypeDescriptor : public AggrTypeDescriptor { +class SC_CORE_EXPORT BagTypeDescriptor : public AggrTypeDescriptor { protected: public: @@ -1855,7 +1855,7 @@ class SCL_CORE_EXPORT BagTypeDescriptor : public AggrTypeDescriptor { typedef SDAI_Select * ( * SelectCreator )(); -class SCL_CORE_EXPORT SelectTypeDescriptor : public TypeDescriptor { +class SC_CORE_EXPORT SelectTypeDescriptor : public TypeDescriptor { protected: TypeDescriptorList _elements; // of TYPE_DESCRIPTOR @@ -1898,7 +1898,7 @@ class SCL_CORE_EXPORT SelectTypeDescriptor : public TypeDescriptor { const; }; -class SCL_CORE_EXPORT StringTypeDescriptor : public TypeDescriptor { +class SC_CORE_EXPORT StringTypeDescriptor : public TypeDescriptor { protected: SDAI_Integer _width; // OPTIONAL @@ -1929,7 +1929,7 @@ class SCL_CORE_EXPORT StringTypeDescriptor : public TypeDescriptor { } }; -class SCL_CORE_EXPORT RealTypeDescriptor : public TypeDescriptor { +class SC_CORE_EXPORT RealTypeDescriptor : public TypeDescriptor { protected: SDAI_Integer _precisionSpec; // OPTIONAL diff --git a/src/clstepcore/ExpDict.inline.cc b/src/clstepcore/ExpDict.inline.cc index e51a52b3..442769ac 100644 --- a/src/clstepcore/ExpDict.inline.cc +++ b/src/clstepcore/ExpDict.inline.cc @@ -11,7 +11,7 @@ */ #include -#include "scl_memmgr.h" +#include "sc_memmgr.h" Dictionary_instance::~Dictionary_instance() { } diff --git a/src/clstepcore/Registry.h b/src/clstepcore/Registry.h index 444f6b85..3ad82efc 100644 --- a/src/clstepcore/Registry.h +++ b/src/clstepcore/Registry.h @@ -12,10 +12,10 @@ * and is not subject to copyright. */ -#include +#include #include #include -#include +#include #include #include @@ -24,7 +24,7 @@ typedef struct Hash_Table * HashTable; class Registry; typedef void ( * CF_init )( Registry & ); // pointer to creation initialization -class SCL_CORE_EXPORT Registry { +class SC_CORE_EXPORT Registry { protected: HashTable primordialSwamp; // dictionary of EntityDescriptors HashTable active_schemas; // dictionary of Schemas diff --git a/src/clstepcore/Registry.inline.cc b/src/clstepcore/Registry.inline.cc index d2df008a..92948a86 100644 --- a/src/clstepcore/Registry.inline.cc +++ b/src/clstepcore/Registry.inline.cc @@ -11,7 +11,7 @@ #include #include -#include "scl_memmgr.h" +#include "sc_memmgr.h" const TypeDescriptor * t_sdaiINTEGER = NULL; const TypeDescriptor * t_sdaiREAL = NULL; @@ -26,9 +26,9 @@ static int uniqueNames( const char *, const SchRename * ); Registry::Registry( CF_init initFunct ) : col( 0 ), entity_cnt( 0 ), all_ents_cnt( 0 ) { - primordialSwamp = SCL_HASHcreate( 1000 ); - active_schemas = SCL_HASHcreate( 10 ); - active_types = SCL_HASHcreate( 100 ); + primordialSwamp = SC_HASHcreate( 1000 ); + active_schemas = SC_HASHcreate( 10 ); + active_types = SC_HASHcreate( 100 ); if( !t_sdaiINTEGER ) { t_sdaiINTEGER = new TypeDescriptor( "INTEGER", // Name @@ -68,17 +68,17 @@ Registry::Registry( CF_init initFunct ) } initFunct( *this ); - SCL_HASHlistinit( active_types, &cur_type ); - SCL_HASHlistinit( primordialSwamp, &cur_entity ); // initialize cur's - SCL_HASHlistinit( active_schemas, &cur_schema ); + SC_HASHlistinit( active_types, &cur_type ); + SC_HASHlistinit( primordialSwamp, &cur_entity ); // initialize cur's + SC_HASHlistinit( active_schemas, &cur_schema ); } Registry::~Registry() { DeleteContents(); - SCL_HASHdestroy( primordialSwamp ); - SCL_HASHdestroy( active_schemas ); - SCL_HASHdestroy( active_types ); + SC_HASHdestroy( primordialSwamp ); + SC_HASHdestroy( active_schemas ); + SC_HASHdestroy( active_types ); delete col; if( t_sdaiINTEGER ) { @@ -113,20 +113,20 @@ Registry::~Registry() { void Registry::DeleteContents() { // entities first - SCL_HASHlistinit( primordialSwamp, &cur_entity ); - while( SCL_HASHlist( &cur_entity ) ) { + SC_HASHlistinit( primordialSwamp, &cur_entity ); + while( SC_HASHlist( &cur_entity ) ) { delete( EntityDescriptor * ) cur_entity.e->data; } // schemas - SCL_HASHlistinit( active_schemas, &cur_schema ); - while( SCL_HASHlist( &cur_schema ) ) { + SC_HASHlistinit( active_schemas, &cur_schema ); + while( SC_HASHlist( &cur_schema ) ) { delete( Schema * ) cur_schema.e->data; } // types - SCL_HASHlistinit( active_types, &cur_type ); - while( SCL_HASHlist( &cur_type ) ) { + SC_HASHlistinit( active_types, &cur_type ); + while( SC_HASHlist( &cur_type ) ) { delete( TypeDescriptor * ) cur_type.e->data; } } @@ -146,9 +146,9 @@ const EntityDescriptor * Registry::FindEntity( const char * e, const char * schN char schformat[BUFSIZ], altName[BUFSIZ]; if( check_case ) { - entd = ( EntityDescriptor * )SCL_HASHfind( primordialSwamp, ( char * )e ); + entd = ( EntityDescriptor * )SC_HASHfind( primordialSwamp, ( char * )e ); } else { - entd = ( EntityDescriptor * )SCL_HASHfind( primordialSwamp, + entd = ( EntityDescriptor * )SC_HASHfind( primordialSwamp, ( char * )PrettyTmpName( e ) ); } if( entd && schNm ) { @@ -182,34 +182,34 @@ const EntityDescriptor * Registry::FindEntity( const char * e, const char * schN const Schema * Registry::FindSchema( const char * n, int check_case ) const { if( check_case ) { - return ( const Schema * ) SCL_HASHfind( active_schemas, ( char * ) n ); + return ( const Schema * ) SC_HASHfind( active_schemas, ( char * ) n ); } - return ( const Schema * ) SCL_HASHfind( active_schemas, + return ( const Schema * ) SC_HASHfind( active_schemas, ( char * )PrettyTmpName( n ) ); } const TypeDescriptor * Registry::FindType( const char * n, int check_case ) const { if( check_case ) { - return ( const TypeDescriptor * ) SCL_HASHfind( active_types, ( char * ) n ); + return ( const TypeDescriptor * ) SC_HASHfind( active_types, ( char * ) n ); } - return ( const TypeDescriptor * ) SCL_HASHfind( active_types, + return ( const TypeDescriptor * ) SC_HASHfind( active_types, ( char * )PrettyTmpName( n ) ); } void Registry::ResetTypes() { - SCL_HASHlistinit( active_types, &cur_type ); + SC_HASHlistinit( active_types, &cur_type ); } const TypeDescriptor * Registry::NextType() { - if( 0 == SCL_HASHlist( &cur_type ) ) { + if( 0 == SC_HASHlist( &cur_type ) ) { return 0; } return ( const TypeDescriptor * ) cur_type.e->data; } void Registry::AddEntity( const EntityDescriptor & e ) { - SCL_HASHinsert( primordialSwamp, ( char * ) e.Name(), ( EntityDescriptor * ) &e ); + SC_HASHinsert( primordialSwamp, ( char * ) e.Name(), ( EntityDescriptor * ) &e ); ++entity_cnt; ++all_ents_cnt; AddClones( e ); @@ -217,11 +217,11 @@ void Registry::AddEntity( const EntityDescriptor & e ) { void Registry::AddSchema( const Schema & d ) { - SCL_HASHinsert( active_schemas, ( char * ) d.Name(), ( Schema * ) &d ); + SC_HASHinsert( active_schemas, ( char * ) d.Name(), ( Schema * ) &d ); } void Registry::AddType( const TypeDescriptor & d ) { - SCL_HASHinsert( active_types, ( char * ) d.Name(), ( TypeDescriptor * ) &d ); + SC_HASHinsert( active_types, ( char * ) d.Name(), ( TypeDescriptor * ) &d ); } /** @@ -235,7 +235,7 @@ void Registry::AddClones( const EntityDescriptor & e ) { const SchRename * alts = e.AltNameList(); while( alts ) { - SCL_HASHinsert( primordialSwamp, ( char * )alts->objName(), + SC_HASHinsert( primordialSwamp, ( char * )alts->objName(), ( EntityDescriptor * )&e ); alts = alts->next; } @@ -278,20 +278,20 @@ void Registry::RemoveEntity( const char * n ) { RemoveClones( *e ); } tmp.key = ( char * ) n; - SCL_HASHsearch( primordialSwamp, &tmp, HASH_DELETE ) ? --entity_cnt : 0; + SC_HASHsearch( primordialSwamp, &tmp, HASH_DELETE ) ? --entity_cnt : 0; } void Registry::RemoveSchema( const char * n ) { struct Element tmp; tmp.key = ( char * ) n; - SCL_HASHsearch( active_schemas, &tmp, HASH_DELETE ); + SC_HASHsearch( active_schemas, &tmp, HASH_DELETE ); } void Registry::RemoveType( const char * n ) { struct Element tmp; tmp.key = ( char * ) n; - SCL_HASHsearch( active_types, &tmp, HASH_DELETE ); + SC_HASHsearch( active_types, &tmp, HASH_DELETE ); } /** @@ -304,7 +304,7 @@ void Registry::RemoveClones( const EntityDescriptor & e ) { while( alts ) { tmp = new Element; tmp->key = ( char * ) alts->objName(); - SCL_HASHsearch( primordialSwamp, tmp, HASH_DELETE ); + SC_HASHsearch( primordialSwamp, tmp, HASH_DELETE ); alts = alts->next; } } @@ -336,23 +336,23 @@ int Registry::GetEntityCnt() { } void Registry::ResetEntities() { - SCL_HASHlistinit( primordialSwamp, &cur_entity ); + SC_HASHlistinit( primordialSwamp, &cur_entity ); } const EntityDescriptor * Registry::NextEntity() { - if( 0 == SCL_HASHlist( &cur_entity ) ) { + if( 0 == SC_HASHlist( &cur_entity ) ) { return 0; } return ( const EntityDescriptor * ) cur_entity.e->data; } void Registry::ResetSchemas() { - SCL_HASHlistinit( active_schemas, &cur_schema ); + SC_HASHlistinit( active_schemas, &cur_schema ); } const Schema * Registry::NextSchema() { - if( 0 == SCL_HASHlist( &cur_schema ) ) { + if( 0 == SC_HASHlist( &cur_schema ) ) { return 0; } return ( const Schema * ) cur_schema.e->data; diff --git a/src/clstepcore/STEPaggregate.cc b/src/clstepcore/STEPaggregate.cc index ee823e14..08a4e3f4 100644 --- a/src/clstepcore/STEPaggregate.cc +++ b/src/clstepcore/STEPaggregate.cc @@ -17,7 +17,7 @@ #include #include #include -#include "scl_memmgr.h" +#include "sc_memmgr.h" const int Real_Num_Precision = REAL_NUM_PRECISION; // from STEPattribute.h diff --git a/src/clstepcore/STEPaggregate.h b/src/clstepcore/STEPaggregate.h index 2bc68c6b..072a725e 100644 --- a/src/clstepcore/STEPaggregate.h +++ b/src/clstepcore/STEPaggregate.h @@ -16,7 +16,7 @@ class InstMgr; class STEPaggregate; class TypeDescriptor; -#include +#include #include #include #include @@ -34,7 +34,7 @@ typedef STEPaggregate * STEPaggregateH; typedef STEPaggregate * STEPaggregate_ptr; typedef STEPaggregate_ptr STEPaggregate_var; -class SCL_CORE_EXPORT STEPaggregate : public SingleLinkList { +class SC_CORE_EXPORT STEPaggregate : public SingleLinkList { protected: int _null; @@ -89,7 +89,7 @@ class SCL_CORE_EXPORT STEPaggregate : public SingleLinkList { ** This class supports LIST OF: ** SELECT_TYPE, BINARY_TYPE, GENERIC_TYPE, ENUM_TYPE, UNKNOWN_TYPE type ******************************************************************/ -class SCL_CORE_EXPORT GenericAggregate : public STEPaggregate { +class SC_CORE_EXPORT GenericAggregate : public STEPaggregate { public: virtual SingleLinkNode * NewNode(); virtual STEPaggregate & ShallowCopy( const STEPaggregate & ); @@ -105,7 +105,7 @@ typedef GenericAggregate_ptr GenericAggregate_var; ** *****************************************************************************/ -class SCL_CORE_EXPORT EntityAggregate : public STEPaggregate { +class SC_CORE_EXPORT EntityAggregate : public STEPaggregate { public: virtual Severity ReadValue( istream & in, ErrorDescriptor * err, const TypeDescriptor * elem_type, @@ -127,7 +127,7 @@ typedef EntityAggregate_ptr EntityAggregate_var; ** \class SelectAggregate ** This is a minimal represention for a collection of SDAI_Select ******************************************************************/ -class SCL_CORE_EXPORT SelectAggregate : public STEPaggregate { +class SC_CORE_EXPORT SelectAggregate : public STEPaggregate { public: virtual Severity ReadValue( istream & in, ErrorDescriptor * err, const TypeDescriptor * elem_type, @@ -149,7 +149,7 @@ typedef SelectAggregate_ptr SelectAggregate_var; ** \class StringAggregate ** This class supports LIST OF STRING type ******************************************************************/ -class SCL_CORE_EXPORT StringAggregate : public STEPaggregate { +class SC_CORE_EXPORT StringAggregate : public STEPaggregate { public: virtual SingleLinkNode * NewNode(); virtual STEPaggregate & ShallowCopy( const STEPaggregate & ); @@ -166,7 +166,7 @@ typedef StringAggregate_ptr StringAggregate_var; ** \class BinaryAggregate ** This class supports LIST OF BINARY type ******************************************************************/ -class SCL_CORE_EXPORT BinaryAggregate : public STEPaggregate { +class SC_CORE_EXPORT BinaryAggregate : public STEPaggregate { public: virtual SingleLinkNode * NewNode(); virtual STEPaggregate & ShallowCopy( const STEPaggregate & ); @@ -182,7 +182,7 @@ typedef BinaryAggregate_ptr BinaryAggregate_var; ** \class EnumAggregate ** This is a minimal representions for a collection ofSDAI_Enum ******************************************************************/ -class SCL_CORE_EXPORT EnumAggregate : public STEPaggregate { +class SC_CORE_EXPORT EnumAggregate : public STEPaggregate { public: virtual SingleLinkNode * NewNode(); virtual STEPaggregate & ShallowCopy( const STEPaggregate & ); @@ -194,7 +194,7 @@ typedef EnumAggregate * EnumAggregateH; typedef EnumAggregate * EnumAggregate_ptr; typedef EnumAggregate_ptr EnumAggregate_var; -class SCL_CORE_EXPORT LOGICALS : public EnumAggregate { +class SC_CORE_EXPORT LOGICALS : public EnumAggregate { public: virtual SingleLinkNode * NewNode(); @@ -204,10 +204,10 @@ class SCL_CORE_EXPORT LOGICALS : public EnumAggregate { typedef LOGICALS * LogicalsH; typedef LOGICALS * LOGICALS_ptr; typedef LOGICALS_ptr LOGICALS_var; -SCL_CORE_EXPORT LOGICALS * create_LOGICALS(); +SC_CORE_EXPORT LOGICALS * create_LOGICALS(); -class SCL_CORE_EXPORT BOOLEANS : public EnumAggregate { +class SC_CORE_EXPORT BOOLEANS : public EnumAggregate { public: virtual SingleLinkNode * NewNode(); @@ -218,9 +218,9 @@ class SCL_CORE_EXPORT BOOLEANS : public EnumAggregate { typedef BOOLEANS * BOOLEANS_ptr; typedef BOOLEANS_ptr BOOLEANS_var; -SCL_CORE_EXPORT BOOLEANS * create_BOOLEANS(); +SC_CORE_EXPORT BOOLEANS * create_BOOLEANS(); -class SCL_CORE_EXPORT RealAggregate : public STEPaggregate { +class SC_CORE_EXPORT RealAggregate : public STEPaggregate { public: virtual SingleLinkNode * NewNode(); @@ -233,7 +233,7 @@ typedef RealAggregate * RealAggregateH; typedef RealAggregate * RealAggregate_ptr; typedef RealAggregate_ptr RealAggregate_var; -class SCL_CORE_EXPORT IntAggregate : public STEPaggregate { +class SC_CORE_EXPORT IntAggregate : public STEPaggregate { public: virtual SingleLinkNode * NewNode(); @@ -248,7 +248,7 @@ typedef IntAggregate_ptr IntAggregate_var; /////////////////////////////////////////////////////////////////////////////// -class SCL_CORE_EXPORT STEPnode : public SingleLinkNode { +class SC_CORE_EXPORT STEPnode : public SingleLinkNode { protected: int _null; @@ -278,7 +278,7 @@ class SCL_CORE_EXPORT STEPnode : public SingleLinkNode { ** This class is for the Nodes of GenericAggregates ******************************************************************/ typedef STEPnode * STEPnodeH; -class SCL_CORE_EXPORT GenericAggrNode : public STEPnode { +class SC_CORE_EXPORT GenericAggrNode : public STEPnode { public: SCLundefined value; // INPUT @@ -304,7 +304,7 @@ class SCL_CORE_EXPORT GenericAggrNode : public STEPnode { ///////////////////////////////////////////////////////////////////////////// -class SCL_CORE_EXPORT EntityNode : public STEPnode { +class SC_CORE_EXPORT EntityNode : public STEPnode { public: SDAI_Application_instance * node; @@ -364,7 +364,7 @@ class SCL_CORE_EXPORT EntityNode : public STEPnode { ** \class SelectNode ** This is a minimal representions for node in lists of SDAI_Select ******************************************************************/ -class SCL_CORE_EXPORT SelectNode : public STEPnode { +class SC_CORE_EXPORT SelectNode : public STEPnode { public: SDAI_Select * node; // INPUT @@ -423,7 +423,7 @@ class SCL_CORE_EXPORT SelectNode : public STEPnode { ** \class StringNode ** This class is for the Nodes of StringAggregates ******************************************************************/ -class SCL_CORE_EXPORT StringNode : public STEPnode { +class SC_CORE_EXPORT StringNode : public STEPnode { public: SDAI_String value; // INPUT @@ -453,7 +453,7 @@ class SCL_CORE_EXPORT StringNode : public STEPnode { ** \class BinaryNode ** This class is for the Nodes of BinaryAggregates ******************************************************************/ -class SCL_CORE_EXPORT BinaryNode : public STEPnode { +class SC_CORE_EXPORT BinaryNode : public STEPnode { public: SDAI_Binary value; // INPUT @@ -481,7 +481,7 @@ class SCL_CORE_EXPORT BinaryNode : public STEPnode { ** \class EnumNode ** This is a minimal representions for node in lists of SDAI_Enum ******************************************************************/ -class SCL_CORE_EXPORT EnumNode : public STEPnode { +class SC_CORE_EXPORT EnumNode : public STEPnode { public: SDAI_Enum * node; // INPUT @@ -504,7 +504,7 @@ class SCL_CORE_EXPORT EnumNode : public STEPnode { virtual SingleLinkNode * NewNode(); }; -class SCL_CORE_EXPORT RealNode : public STEPnode { +class SC_CORE_EXPORT RealNode : public STEPnode { public: SDAI_Real value; // double // INPUT @@ -526,7 +526,7 @@ class SCL_CORE_EXPORT RealNode : public STEPnode { virtual SingleLinkNode * NewNode(); }; -class SCL_CORE_EXPORT IntNode : public STEPnode { +class SC_CORE_EXPORT IntNode : public STEPnode { public: SDAI_Integer value; // long int // INPUT diff --git a/src/clstepcore/STEPattribute.cc b/src/clstepcore/STEPattribute.cc index d4041067..c1c277dc 100644 --- a/src/clstepcore/STEPattribute.cc +++ b/src/clstepcore/STEPattribute.cc @@ -20,7 +20,7 @@ #include #include #include -#include "scl_memmgr.h" +#include "sc_memmgr.h" // REAL_NUM_PRECISION is defined in STEPattribute.h, and is also used // in aggregate real handling (STEPaggregate.cc) -- IMS 6 Jun 95 diff --git a/src/clstepcore/STEPattribute.h b/src/clstepcore/STEPattribute.h index 4cabb854..3bf33405 100644 --- a/src/clstepcore/STEPattribute.h +++ b/src/clstepcore/STEPattribute.h @@ -13,7 +13,7 @@ */ -#include +#include #include #include #include @@ -39,19 +39,19 @@ class EntityDescriptor; #include -extern SCL_CORE_EXPORT int SetErrOnNull( const char * attrValue, ErrorDescriptor * error ); +extern SC_CORE_EXPORT int SetErrOnNull( const char * attrValue, ErrorDescriptor * error ); -extern SCL_CORE_EXPORT SDAI_Application_instance * ReadEntityRef( istream & in, ErrorDescriptor * err, const char * tokenList, +extern SC_CORE_EXPORT SDAI_Application_instance * ReadEntityRef( istream & in, ErrorDescriptor * err, const char * tokenList, InstMgr * instances, int addFileId ); -extern SCL_CORE_EXPORT SDAI_Application_instance * ReadEntityRef( const char * s, ErrorDescriptor * err, const char * tokenList, +extern SC_CORE_EXPORT SDAI_Application_instance * ReadEntityRef( const char * s, ErrorDescriptor * err, const char * tokenList, InstMgr * instances, int addFileId ); -extern SCL_CORE_EXPORT Severity EntityValidLevel( SDAI_Application_instance * se, +extern SC_CORE_EXPORT Severity EntityValidLevel( SDAI_Application_instance * se, const TypeDescriptor * ed, ///< entity type that entity se needs to match. (this must be an EntityDescriptor) ErrorDescriptor * err ); -extern SCL_CORE_EXPORT Severity EntityValidLevel( const char * attrValue, ///< string containing entity ref +extern SC_CORE_EXPORT Severity EntityValidLevel( const char * attrValue, ///< string containing entity ref const TypeDescriptor * ed, /**< entity type that entity in attrValue (if it exists) needs * to match. (this must be an EntityDescriptor) */ @@ -60,21 +60,21 @@ extern SCL_CORE_EXPORT Severity EntityValidLevel( const char * attrValue, ///< s //////////////////// //////////////////// -extern SCL_CORE_EXPORT SDAI_Application_instance * STEPread_reference( const char * s, ErrorDescriptor * err, +extern SC_CORE_EXPORT SDAI_Application_instance * STEPread_reference( const char * s, ErrorDescriptor * err, InstMgr * instances, int addFileId ); //////////////////// -extern SCL_CORE_EXPORT int QuoteInString( istream & in ); +extern SC_CORE_EXPORT int QuoteInString( istream & in ); -extern SCL_CORE_EXPORT void AppendChar( char c, int & index, char *& s, int & sSize ); +extern SC_CORE_EXPORT void AppendChar( char c, int & index, char *& s, int & sSize ); -extern SCL_CORE_EXPORT void PushPastString( istream & in, std::string & s, ErrorDescriptor * err ); +extern SC_CORE_EXPORT void PushPastString( istream & in, std::string & s, ErrorDescriptor * err ); -extern SCL_CORE_EXPORT void PushPastImbedAggr( istream & in, std::string & s, ErrorDescriptor * err ); +extern SC_CORE_EXPORT void PushPastImbedAggr( istream & in, std::string & s, ErrorDescriptor * err ); -extern SCL_CORE_EXPORT void PushPastAggr1Dim( istream & in, std::string & s, ErrorDescriptor * err ); +extern SC_CORE_EXPORT void PushPastAggr1Dim( istream & in, std::string & s, ErrorDescriptor * err ); -class SCL_CORE_EXPORT STEPattribute { +class SC_CORE_EXPORT STEPattribute { friend ostream & operator<< ( ostream &, STEPattribute & ); friend class SDAI_Application_instance; public: diff --git a/src/clstepcore/STEPattribute.inline.cc b/src/clstepcore/STEPattribute.inline.cc index 74237cdf..74be85cf 100644 --- a/src/clstepcore/STEPattribute.inline.cc +++ b/src/clstepcore/STEPattribute.inline.cc @@ -14,7 +14,7 @@ #include #include #include -#include "scl_memmgr.h" +#include "sc_memmgr.h" /// This is needed so that STEPattribute's can be passed as references to inline functions STEPattribute::STEPattribute( const STEPattribute & a ) diff --git a/src/clstepcore/STEPattributeList.cc b/src/clstepcore/STEPattributeList.cc index f01eee65..b2664d32 100644 --- a/src/clstepcore/STEPattributeList.cc +++ b/src/clstepcore/STEPattributeList.cc @@ -12,7 +12,7 @@ #include #include -#include "scl_memmgr.h" +#include "sc_memmgr.h" AttrListNode::AttrListNode( STEPattribute * a ) { attr = a; diff --git a/src/clstepcore/STEPattributeList.h b/src/clstepcore/STEPattributeList.h index 62ade65b..9159f466 100644 --- a/src/clstepcore/STEPattributeList.h +++ b/src/clstepcore/STEPattributeList.h @@ -15,12 +15,12 @@ class STEPattribute; -#include +#include #include class STEPattributeList; -class SCL_CORE_EXPORT AttrListNode : public SingleLinkNode { +class SC_CORE_EXPORT AttrListNode : public SingleLinkNode { friend class STEPattributeList; protected: @@ -32,7 +32,7 @@ class SCL_CORE_EXPORT AttrListNode : public SingleLinkNode { }; -class SCL_CORE_EXPORT STEPattributeList : public SingleLinkList { +class SC_CORE_EXPORT STEPattributeList : public SingleLinkList { public: STEPattributeList(); virtual ~STEPattributeList(); diff --git a/src/clstepcore/STEPcomplex.cc b/src/clstepcore/STEPcomplex.cc index 2ba29664..1abad88c 100644 --- a/src/clstepcore/STEPcomplex.cc +++ b/src/clstepcore/STEPcomplex.cc @@ -5,7 +5,7 @@ #include #include #include -#include "scl_memmgr.h" +#include "sc_memmgr.h" extern const char * ReadStdKeyword( istream & in, std::string & buf, int skipInitWS ); diff --git a/src/clstepcore/STEPcomplex.h b/src/clstepcore/STEPcomplex.h index ead3ed07..ffa85550 100644 --- a/src/clstepcore/STEPcomplex.h +++ b/src/clstepcore/STEPcomplex.h @@ -1,7 +1,7 @@ #ifndef STEPCOMPLEX_H #define STEPCOMPLEX_H -#include +#include #include #include #include @@ -13,7 +13,7 @@ typedef std::list STEPcomplex_attr_data_list; typedef std::list::iterator STEPcomplex_attr_data; -class SCL_CORE_EXPORT STEPcomplex : public SDAI_Application_instance { +class SC_CORE_EXPORT STEPcomplex : public SDAI_Application_instance { public: STEPcomplex * sc; STEPcomplex * head; diff --git a/src/clstepcore/STEPundefined.cc b/src/clstepcore/STEPundefined.cc index d32ae647..cfbd3a37 100644 --- a/src/clstepcore/STEPundefined.cc +++ b/src/clstepcore/STEPundefined.cc @@ -13,7 +13,7 @@ #include // to get the BUFSIZ #define #include #include -#include "scl_memmgr.h" +#include "sc_memmgr.h" /** \class SCLundefined ** helper functions for reading unknown types diff --git a/src/clstepcore/STEPundefined.h b/src/clstepcore/STEPundefined.h index 8d9c4f98..b9e1b939 100644 --- a/src/clstepcore/STEPundefined.h +++ b/src/clstepcore/STEPundefined.h @@ -12,12 +12,12 @@ * and is not subject to copyright. */ -#include +#include #include #include #include -class SCL_CORE_EXPORT SCLundefined { +class SC_CORE_EXPORT SCLundefined { protected: std::string val; diff --git a/src/clstepcore/SingleLinkList.cc b/src/clstepcore/SingleLinkList.cc index b5ead346..79796509 100644 --- a/src/clstepcore/SingleLinkList.cc +++ b/src/clstepcore/SingleLinkList.cc @@ -11,7 +11,7 @@ */ #include -#include "scl_memmgr.h" +#include "sc_memmgr.h" void SingleLinkList::DeleteFollowingNodes( SingleLinkNode * item ) { if( head ) { diff --git a/src/clstepcore/SingleLinkList.h b/src/clstepcore/SingleLinkList.h index 1026fe77..33386dd9 100644 --- a/src/clstepcore/SingleLinkList.h +++ b/src/clstepcore/SingleLinkList.h @@ -12,9 +12,9 @@ * and is not subject to copyright. */ -#include +#include -class SCL_CORE_EXPORT SingleLinkList { +class SC_CORE_EXPORT SingleLinkList { // node which represents the value is contained in the subclass // since it may have different types for different lists @@ -43,7 +43,7 @@ class SCL_CORE_EXPORT SingleLinkList { ; -class SCL_CORE_EXPORT SingleLinkNode { +class SC_CORE_EXPORT SingleLinkNode { friend class SingleLinkList; protected: diff --git a/src/clstepcore/SingleLinkList.inline.cc b/src/clstepcore/SingleLinkList.inline.cc index 1cc5fb23..3a5c4815 100644 --- a/src/clstepcore/SingleLinkList.inline.cc +++ b/src/clstepcore/SingleLinkList.inline.cc @@ -12,7 +12,7 @@ #include #include -#include "scl_memmgr.h" +#include "sc_memmgr.h" SingleLinkNode * SingleLinkNode::NextNode() const { diff --git a/src/clstepcore/collect.cc b/src/clstepcore/collect.cc index 52356e8b..08f2131b 100644 --- a/src/clstepcore/collect.cc +++ b/src/clstepcore/collect.cc @@ -12,7 +12,7 @@ *****************************************************************************/ #include "complexSupport.h" -#include "scl_memmgr.h" +#include "sc_memmgr.h" /** * Inserts a new ComplexList to our list. The ComplexLists are ordered by diff --git a/src/clstepcore/complexSupport.h b/src/clstepcore/complexSupport.h index 5fd16f56..0976d987 100644 --- a/src/clstepcore/complexSupport.h +++ b/src/clstepcore/complexSupport.h @@ -14,7 +14,7 @@ * Date: 5/9/97 * *****************************************************************************/ -#include +#include #include #include using namespace std; @@ -72,7 +72,7 @@ class OrList; class ComplexList; class ComplexCollect; -class SCL_CORE_EXPORT EntNode { +class SC_CORE_EXPORT EntNode { friend class SimpleList; friend class AndOrList; friend class AndList; @@ -137,7 +137,7 @@ class SCL_CORE_EXPORT EntNode { EntNode * lastSmaller( EntNode * ); ///< used by ::sort() }; -class SCL_CORE_EXPORT EntList { +class SC_CORE_EXPORT EntList { friend class MultList; friend class JoinList; friend class OrList; @@ -206,7 +206,7 @@ class SCL_CORE_EXPORT EntList { int level; ///< How many levels deep are we (main use for printing). }; -class SCL_CORE_EXPORT SimpleList : public EntList { +class SC_CORE_EXPORT SimpleList : public EntList { friend class ComplexList; friend ostream & operator<< ( ostream &, SimpleList & ); @@ -245,7 +245,7 @@ class SCL_CORE_EXPORT SimpleList : public EntList { * Supports concepts and functionality common to all the compound list * types, especially AND and ANDOR. */ -class SCL_CORE_EXPORT MultList : public EntList { +class SC_CORE_EXPORT MultList : public EntList { friend class ComplexList; friend class ComplexCollect; @@ -291,7 +291,7 @@ class SCL_CORE_EXPORT MultList : public EntList { * A specialized MultList, super for subtypes AndOrList and AndList, or * ones which join their multiple children. */ -class SCL_CORE_EXPORT JoinList : public MultList { +class SC_CORE_EXPORT JoinList : public MultList { public: JoinList( JoinType j ) : MultList( j ) {} ~JoinList() {} @@ -299,7 +299,7 @@ class SCL_CORE_EXPORT JoinList : public MultList { bool acceptChoice( EntNode * ); }; -class SCL_CORE_EXPORT AndOrList : public JoinList { +class SC_CORE_EXPORT AndOrList : public JoinList { friend class ComplexList; public: @@ -309,7 +309,7 @@ class SCL_CORE_EXPORT AndOrList : public JoinList { MatchType matchORs( EntNode * ); }; -class SCL_CORE_EXPORT AndList : public JoinList { +class SC_CORE_EXPORT AndList : public JoinList { friend class ComplexList; friend ostream & operator<< ( ostream &, ComplexList & ); @@ -320,7 +320,7 @@ class SCL_CORE_EXPORT AndList : public JoinList { MatchType matchORs( EntNode * ); }; -class SCL_CORE_EXPORT OrList : public MultList { +class SC_CORE_EXPORT OrList : public MultList { public: OrList() : MultList( OR ), choice( -1 ), choice1( -1 ), choiceCount( 0 ) {} ~OrList() {} @@ -350,7 +350,7 @@ class SCL_CORE_EXPORT OrList : public MultList { * Contains the entire list of EntLists which describe the set of * instantiable complex entities defined by an EXPRESS expression. */ -class SCL_CORE_EXPORT ComplexList { +class SC_CORE_EXPORT ComplexList { friend class ultList; friend class ComplexCollect; friend ostream & operator<< ( ostream &, ComplexList & ); @@ -401,7 +401,7 @@ class SCL_CORE_EXPORT ComplexList { }; /// The collection of all the ComplexLists defined by the current schema. -class SCL_CORE_EXPORT ComplexCollect { +class SC_CORE_EXPORT ComplexCollect { public: ComplexCollect( ComplexList * c = NULL ) : clists( c ) { count = ( c ? 1 : 0 ); diff --git a/src/clstepcore/complexlist.cc b/src/clstepcore/complexlist.cc index d6b8f819..aa5a60d2 100644 --- a/src/clstepcore/complexlist.cc +++ b/src/clstepcore/complexlist.cc @@ -11,7 +11,7 @@ *****************************************************************************/ #include "complexSupport.h" -#include "scl_memmgr.h" +#include "sc_memmgr.h" /** * Destructor for ComplexList. diff --git a/src/clstepcore/dispnode.cc b/src/clstepcore/dispnode.cc index 40c3ca32..2590e034 100644 --- a/src/clstepcore/dispnode.cc +++ b/src/clstepcore/dispnode.cc @@ -18,7 +18,7 @@ #include #include -#include "scl_memmgr.h" +#include "sc_memmgr.h" // define this to be the name of the display object class StepEntityEditor; diff --git a/src/clstepcore/dispnode.h b/src/clstepcore/dispnode.h index b20f6f42..c29c9f98 100644 --- a/src/clstepcore/dispnode.h +++ b/src/clstepcore/dispnode.h @@ -15,7 +15,7 @@ /* $Id: dispnode.h,v 3.0.1.2 1997/11/05 22:11:39 sauderd DP3.1 $ */ -#include +#include /*#include */ /*#include */ @@ -32,7 +32,7 @@ class MgrNode; // class DisplayNode ////////////////////////////////////////////////////////////////////////////// -class SCL_CORE_EXPORT DisplayNode : public GenericNode { +class SC_CORE_EXPORT DisplayNode : public GenericNode { protected: friend class GenNodeList; friend class DisplayNodeList; diff --git a/src/clstepcore/dispnodelist.cc b/src/clstepcore/dispnodelist.cc index f98dec32..f4d00a6a 100644 --- a/src/clstepcore/dispnodelist.cc +++ b/src/clstepcore/dispnodelist.cc @@ -19,7 +19,7 @@ #include #include #include -#include "scl_memmgr.h" +#include "sc_memmgr.h" void DisplayNodeList::Remove( GenericNode * node ) { GenNodeList::Remove( node ); diff --git a/src/clstepcore/dispnodelist.h b/src/clstepcore/dispnodelist.h index b4cc644c..c4fe4dde 100644 --- a/src/clstepcore/dispnodelist.h +++ b/src/clstepcore/dispnodelist.h @@ -15,7 +15,7 @@ /* $Id: dispnodelist.h,v 3.0.1.2 1997/11/05 22:11:40 sauderd DP3.1 $ */ -#include +#include #include //#include @@ -29,7 +29,7 @@ // This will be used to represent the display state lists. ////////////////////////////////////////////////////////////////////////////// -class SCL_CORE_EXPORT DisplayNodeList : public GenNodeList { +class SC_CORE_EXPORT DisplayNodeList : public GenNodeList { public: DisplayNodeList( displayStateEnum type ); ~DisplayNodeList() { } diff --git a/src/clstepcore/entlist.cc b/src/clstepcore/entlist.cc index 2fc591c5..0dd35803 100644 --- a/src/clstepcore/entlist.cc +++ b/src/clstepcore/entlist.cc @@ -14,7 +14,7 @@ *****************************************************************************/ #include "complexSupport.h" -#include "scl_memmgr.h" +#include "sc_memmgr.h" /** * Returns the number of EntLists in this's list (EntList->next, next->next diff --git a/src/clstepcore/entnode.cc b/src/clstepcore/entnode.cc index a8ad1ca1..792489e4 100644 --- a/src/clstepcore/entnode.cc +++ b/src/clstepcore/entnode.cc @@ -12,7 +12,7 @@ *****************************************************************************/ #include "complexSupport.h" -#include "scl_memmgr.h" +#include "sc_memmgr.h" /** * Given a list of entity names, creates a sorted linked list of EntNodes diff --git a/src/clstepcore/instmgr.cc b/src/clstepcore/instmgr.cc index 14486bf0..e0d822b0 100644 --- a/src/clstepcore/instmgr.cc +++ b/src/clstepcore/instmgr.cc @@ -18,7 +18,7 @@ #include #include -#include "scl_memmgr.h" +#include "sc_memmgr.h" /////////////////////////////////////////////////////////////////////////////// // debug_level >= 2 => tells when a command is chosen diff --git a/src/clstepcore/instmgr.h b/src/clstepcore/instmgr.h index 3659943b..8c7a482e 100644 --- a/src/clstepcore/instmgr.h +++ b/src/clstepcore/instmgr.h @@ -20,7 +20,7 @@ // start a new undo list and delete the old undo list. ///////////////////// -#include +#include // IT IS VERY IMPORTANT THAT THE ORDER OF THE FOLLOWING INCLUDE FILES // BE PRESERVED @@ -37,7 +37,7 @@ #include -class SCL_CORE_EXPORT InstMgr { +class SC_CORE_EXPORT InstMgr { protected: int maxFileId; int _ownsInstances; // if true will delete instances inside destructor diff --git a/src/clstepcore/match-ors.cc b/src/clstepcore/match-ors.cc index 0f823ea6..2c724b54 100644 --- a/src/clstepcore/match-ors.cc +++ b/src/clstepcore/match-ors.cc @@ -14,7 +14,7 @@ *****************************************************************************/ #include "complexSupport.h" -#include "scl_memmgr.h" +#include "sc_memmgr.h" /** * Loops through descendants of this, invoking their matchOR functions. diff --git a/src/clstepcore/mgrnode.cc b/src/clstepcore/mgrnode.cc index cacd5235..8e44443e 100644 --- a/src/clstepcore/mgrnode.cc +++ b/src/clstepcore/mgrnode.cc @@ -22,7 +22,7 @@ #include #include -#include "scl_memmgr.h" +#include "sc_memmgr.h" void * MgrNode::SEE() { return ( di ? di->SEE() : 0 ); diff --git a/src/clstepcore/mgrnode.h b/src/clstepcore/mgrnode.h index af6dec65..010e35bd 100644 --- a/src/clstepcore/mgrnode.h +++ b/src/clstepcore/mgrnode.h @@ -14,7 +14,7 @@ /* $Id: mgrnode.h,v 3.0.1.4 1997/11/05 22:11:37 sauderd DP3.1 $ */ -#include +#include class GenericNode; class DisplayNode; @@ -35,7 +35,7 @@ class InstMgr; // the DisplayNode, and removes itself from any list it is in. ////////////////////////////////////////////////////////////////////////////// -class SCL_CORE_EXPORT MgrNode : public GenericNode { +class SC_CORE_EXPORT MgrNode : public GenericNode { friend class GenNodeList; friend class MgrNodeList; friend class InstMgr; diff --git a/src/clstepcore/mgrnodearray.cc b/src/clstepcore/mgrnodearray.cc index e693c7d3..23069f02 100644 --- a/src/clstepcore/mgrnodearray.cc +++ b/src/clstepcore/mgrnodearray.cc @@ -37,7 +37,7 @@ static int PrintFunctionTrace = 2; #include #include // to get bcopy() - ANSI -#include "scl_memmgr.h" +#include "sc_memmgr.h" ////////////////////////////////////////////////////////////////////////////// // class MgrNodeArray member functions diff --git a/src/clstepcore/mgrnodearray.h b/src/clstepcore/mgrnodearray.h index 829b0e23..22019d07 100644 --- a/src/clstepcore/mgrnodearray.h +++ b/src/clstepcore/mgrnodearray.h @@ -15,7 +15,7 @@ /* $Id: mgrnodearray.h,v 3.0.1.3 1997/11/05 22:11:38 sauderd DP3.1 $ */ -#include +#include #include @@ -38,7 +38,7 @@ // If you delete this object it deletes all of the entries it points to. ////////////////////////////////////////////////////////////////////////////// -class SCL_CORE_EXPORT MgrNodeArray : public GenNodeArray { +class SC_CORE_EXPORT MgrNodeArray : public GenNodeArray { public: MgrNodeArray( int defaultSize = ARRAY_DEFAULT_SIZE ); ~MgrNodeArray(); @@ -70,7 +70,7 @@ class SCL_CORE_EXPORT MgrNodeArray : public GenNodeArray { // If you delete this object it won't delete the entries it points to. ////////////////////////////////////////////////////////////////////////////// -class SCL_CORE_EXPORT MgrNodeArraySorted : public GenNodeArray { +class SC_CORE_EXPORT MgrNodeArraySorted : public GenNodeArray { public: MgrNodeArraySorted( int defaultSize = ARRAY_DEFAULT_SIZE ); ~MgrNodeArraySorted() { } diff --git a/src/clstepcore/mgrnodelist.cc b/src/clstepcore/mgrnodelist.cc index 73a66262..9bff8e25 100644 --- a/src/clstepcore/mgrnodelist.cc +++ b/src/clstepcore/mgrnodelist.cc @@ -16,7 +16,7 @@ #include #include #include -#include "scl_memmgr.h" +#include "sc_memmgr.h" MgrNodeList::MgrNodeList( stateEnum type ) : GenNodeList( new MgrNode() ) { // if(debug_level >= PrintFunctionTrace) diff --git a/src/clstepcore/mgrnodelist.h b/src/clstepcore/mgrnodelist.h index df684d96..be822c79 100644 --- a/src/clstepcore/mgrnodelist.h +++ b/src/clstepcore/mgrnodelist.h @@ -15,7 +15,7 @@ /* $Id: mgrnodelist.h,v 3.0.1.2 1997/11/05 22:11:38 sauderd DP3.1 $ */ -#include +#include #include //#include @@ -29,7 +29,7 @@ class MgrNode; -class SCL_CORE_EXPORT MgrNodeList : public GenNodeList { +class SC_CORE_EXPORT MgrNodeList : public GenNodeList { public: MgrNodeList( stateEnum type ); virtual ~MgrNodeList() { } diff --git a/src/clstepcore/multlist.cc b/src/clstepcore/multlist.cc index 40e288ac..b1c566ef 100644 --- a/src/clstepcore/multlist.cc +++ b/src/clstepcore/multlist.cc @@ -14,7 +14,7 @@ *****************************************************************************/ #include "complexSupport.h" -#include "scl_memmgr.h" +#include "sc_memmgr.h" /** * Deletes the childList of this, before this is deleted. diff --git a/src/clstepcore/needFunc.cc b/src/clstepcore/needFunc.cc index 59011649..eea46ddb 100644 --- a/src/clstepcore/needFunc.cc +++ b/src/clstepcore/needFunc.cc @@ -1,5 +1,5 @@ #include -#include "scl_memmgr.h" +#include "sc_memmgr.h" /////////////////////////////////////////////////////////////////////////////// // Function defined as a stub (necessary to use the scl) diff --git a/src/clstepcore/needFunc.h b/src/clstepcore/needFunc.h index e4f17f25..74148bcc 100644 --- a/src/clstepcore/needFunc.h +++ b/src/clstepcore/needFunc.h @@ -1,9 +1,9 @@ -#include +#include // define this to be the name of the display window object for // STEP entity instance editing or define your own. -class SCL_CORE_EXPORT StepEntityEditor { +class SC_CORE_EXPORT StepEntityEditor { public: StepEntityEditor() {}; ~StepEntityEditor() {}; diff --git a/src/clstepcore/non-ors.cc b/src/clstepcore/non-ors.cc index b957a1ff..14607f60 100644 --- a/src/clstepcore/non-ors.cc +++ b/src/clstepcore/non-ors.cc @@ -11,7 +11,7 @@ *****************************************************************************/ #include "complexSupport.h" -#include "scl_memmgr.h" +#include "sc_memmgr.h" /** * Checks if we match the nodes of ents. If only one unmarked is left diff --git a/src/clstepcore/orlist.cc b/src/clstepcore/orlist.cc index b9543f40..b820bea5 100644 --- a/src/clstepcore/orlist.cc +++ b/src/clstepcore/orlist.cc @@ -11,7 +11,7 @@ *****************************************************************************/ #include "complexSupport.h" -#include "scl_memmgr.h" +#include "sc_memmgr.h" /** * Check if we matched nm. We have two possibilities here: If we have a diff --git a/src/clstepcore/print.cc b/src/clstepcore/print.cc index cd71b0a8..2139d1f6 100644 --- a/src/clstepcore/print.cc +++ b/src/clstepcore/print.cc @@ -8,7 +8,7 @@ *****************************************************************************/ #include "complexSupport.h" -#include "scl_memmgr.h" +#include "sc_memmgr.h" // Local function prototypes: static char * joinText( JoinType, char * ); diff --git a/src/clstepcore/read_func.cc b/src/clstepcore/read_func.cc index 23383ef3..3f3c4b1d 100644 --- a/src/clstepcore/read_func.cc +++ b/src/clstepcore/read_func.cc @@ -5,7 +5,7 @@ #include #include #include "Str.h" -#include "scl_memmgr.h" +#include "sc_memmgr.h" const int RealNumPrecision = REAL_NUM_PRECISION; diff --git a/src/clstepcore/read_func.h b/src/clstepcore/read_func.h index 8ac768c9..7fe8a85a 100644 --- a/src/clstepcore/read_func.h +++ b/src/clstepcore/read_func.h @@ -1,82 +1,82 @@ #ifndef READ_FUNC_H #define READ_FUNC_H -#include +#include #include /// This was 512. According to 10303-21:2002 section 5.6: comment length is unlimited. FIXME need to check the code for potential problems before eliminating this limit completely. #define MAX_COMMENT_LENGTH 8192 // print Error information for debugging purposes -extern SCL_CORE_EXPORT void PrintErrorState( ErrorDescriptor & err ); +extern SC_CORE_EXPORT void PrintErrorState( ErrorDescriptor & err ); // print istream error information for debugging purposes -extern SCL_CORE_EXPORT void IStreamState( istream & in ); +extern SC_CORE_EXPORT void IStreamState( istream & in ); -extern SCL_CORE_EXPORT int ReadInteger( SDAI_Integer & val, istream & in, ErrorDescriptor * err, +extern SC_CORE_EXPORT int ReadInteger( SDAI_Integer & val, istream & in, ErrorDescriptor * err, const char * tokenList ); -extern SCL_CORE_EXPORT int ReadInteger( SDAI_Integer & val, const char * s, ErrorDescriptor * err, +extern SC_CORE_EXPORT int ReadInteger( SDAI_Integer & val, const char * s, ErrorDescriptor * err, const char * tokenList ); -extern SCL_CORE_EXPORT Severity IntValidLevel( const char * attrValue, ErrorDescriptor * err, +extern SC_CORE_EXPORT Severity IntValidLevel( const char * attrValue, ErrorDescriptor * err, int clearError, int optional, const char * tokenList ); -extern SCL_CORE_EXPORT std::string WriteReal( SDAI_Real val ); +extern SC_CORE_EXPORT std::string WriteReal( SDAI_Real val ); -extern SCL_CORE_EXPORT void WriteReal( SDAI_Real val, ostream & out ); +extern SC_CORE_EXPORT void WriteReal( SDAI_Real val, ostream & out ); -extern SCL_CORE_EXPORT int ReadReal( SDAI_Real & val, istream & in, ErrorDescriptor * err, +extern SC_CORE_EXPORT int ReadReal( SDAI_Real & val, istream & in, ErrorDescriptor * err, const char * tokenList ); -extern SCL_CORE_EXPORT int ReadReal( SDAI_Real & val, const char * s, ErrorDescriptor * err, +extern SC_CORE_EXPORT int ReadReal( SDAI_Real & val, const char * s, ErrorDescriptor * err, const char * tokenList ); -extern SCL_CORE_EXPORT Severity RealValidLevel( const char * attrValue, ErrorDescriptor * err, +extern SC_CORE_EXPORT Severity RealValidLevel( const char * attrValue, ErrorDescriptor * err, int clearError, int optional, const char * tokenList ); -extern SCL_CORE_EXPORT int ReadNumber( SDAI_Real & val, istream & in, ErrorDescriptor * err, +extern SC_CORE_EXPORT int ReadNumber( SDAI_Real & val, istream & in, ErrorDescriptor * err, const char * tokenList ); -extern SCL_CORE_EXPORT int ReadNumber( SDAI_Real & val, const char * s, ErrorDescriptor * err, +extern SC_CORE_EXPORT int ReadNumber( SDAI_Real & val, const char * s, ErrorDescriptor * err, const char * tokenList ); -extern SCL_CORE_EXPORT Severity NumberValidLevel( const char * attrValue, ErrorDescriptor * err, +extern SC_CORE_EXPORT Severity NumberValidLevel( const char * attrValue, ErrorDescriptor * err, int clearError, int optional, const char * tokenList ); //////////////////// -extern SCL_CORE_EXPORT int QuoteInString( istream & in ); +extern SC_CORE_EXPORT int QuoteInString( istream & in ); -extern SCL_CORE_EXPORT void PushPastString( istream & in, std::string & s, ErrorDescriptor * err ); +extern SC_CORE_EXPORT void PushPastString( istream & in, std::string & s, ErrorDescriptor * err ); -extern SCL_CORE_EXPORT void PushPastImbedAggr( istream & in, std::string & s, ErrorDescriptor * err ); +extern SC_CORE_EXPORT void PushPastImbedAggr( istream & in, std::string & s, ErrorDescriptor * err ); -extern SCL_CORE_EXPORT void PushPastAggr1Dim( istream & in, std::string & s, ErrorDescriptor * err ); +extern SC_CORE_EXPORT void PushPastAggr1Dim( istream & in, std::string & s, ErrorDescriptor * err ); //////////////////// -extern SCL_CORE_EXPORT Severity FindStartOfInstance( istream & in, std::string & inst ); +extern SC_CORE_EXPORT Severity FindStartOfInstance( istream & in, std::string & inst ); /// used for instances that aren\'t valid - reads to next \';\' -extern SCL_CORE_EXPORT Severity SkipInstance( istream & in, std::string & inst ); +extern SC_CORE_EXPORT Severity SkipInstance( istream & in, std::string & inst ); -extern SCL_CORE_EXPORT const char * SkipSimpleRecord( istream & in, std::string & buf, ErrorDescriptor * err ); +extern SC_CORE_EXPORT const char * SkipSimpleRecord( istream & in, std::string & buf, ErrorDescriptor * err ); /// this includes entity names -extern SCL_CORE_EXPORT const char * ReadStdKeyword( istream & in, std::string & buf, int skipInitWS = 1 ); +extern SC_CORE_EXPORT const char * ReadStdKeyword( istream & in, std::string & buf, int skipInitWS = 1 ); -extern SCL_CORE_EXPORT const char * GetKeyword( istream & in, const char * delims, ErrorDescriptor & err ); +extern SC_CORE_EXPORT const char * GetKeyword( istream & in, const char * delims, ErrorDescriptor & err ); -extern SCL_CORE_EXPORT int FoundEndSecKywd( istream & in, ErrorDescriptor & err ); +extern SC_CORE_EXPORT int FoundEndSecKywd( istream & in, ErrorDescriptor & err ); -extern SCL_CORE_EXPORT const char * ReadComment( std::string & ss, const char * s ); +extern SC_CORE_EXPORT const char * ReadComment( std::string & ss, const char * s ); -extern SCL_CORE_EXPORT const char * ReadComment( istream & in, std::string & s ); +extern SC_CORE_EXPORT const char * ReadComment( istream & in, std::string & s ); -extern SCL_CORE_EXPORT Severity ReadPcd( istream & in ); //print control directive +extern SC_CORE_EXPORT Severity ReadPcd( istream & in ); //print control directive -extern SCL_CORE_EXPORT void ReadTokenSeparator( istream & in, std::string * comments = 0 ); +extern SC_CORE_EXPORT void ReadTokenSeparator( istream & in, std::string * comments = 0 ); #endif diff --git a/src/clstepcore/sdai.cc b/src/clstepcore/sdai.cc index a7b5baf8..731a381f 100644 --- a/src/clstepcore/sdai.cc +++ b/src/clstepcore/sdai.cc @@ -2,7 +2,7 @@ #include #include -#include "scl_memmgr.h" +#include "sc_memmgr.h" const char * SCLversion = "STEPcode, github.com/stepcode/stepcode"; diff --git a/src/clstepcore/sdai.h b/src/clstepcore/sdai.h index f035f85f..c47a8ad5 100644 --- a/src/clstepcore/sdai.h +++ b/src/clstepcore/sdai.h @@ -18,8 +18,8 @@ * values for the EXPRESS base types. */ -#include "scl_cf.h" -#include +#include "sc_cf.h" +#include extern const char * SCLversion; @@ -60,10 +60,10 @@ typedef unsigned long SDAI_ULong; typedef double SDAI_Real; // C++ from values.h DAS PORT -extern SCL_CORE_EXPORT const SDAI_Integer SDAI_INT_NULL; -extern SCL_CORE_EXPORT const SDAI_Real SDAI_REAL_NULL; +extern SC_CORE_EXPORT const SDAI_Integer SDAI_INT_NULL; +extern SC_CORE_EXPORT const SDAI_Real SDAI_REAL_NULL; // arbitrary choice by me for number DAS -extern SCL_CORE_EXPORT const SDAI_Real SDAI_NUMBER_NULL; +extern SC_CORE_EXPORT const SDAI_Real SDAI_NUMBER_NULL; enum SDAI_Access_type { @@ -211,7 +211,7 @@ typedef SDAI_Model_contents_ptr SDAI_Model_contents_var; #include // ENTITY -extern SCL_CORE_EXPORT SDAI_Application_instance NilSTEPentity; +extern SC_CORE_EXPORT SDAI_Application_instance NilSTEPentity; #define ENTITY_NULL &NilSTEPentity #define NULL_ENTITY &NilSTEPentity #define S_ENTITY_NULL &NilSTEPentity @@ -224,7 +224,7 @@ typedef STEPentity_ptr STEPentity_var; typedef SDAI_Application_instance * STEPentityPtr; typedef SDAI_Application_instance * STEPentityH; -extern SCL_CORE_EXPORT SDAI_Application_instance * +extern SC_CORE_EXPORT SDAI_Application_instance * ReadEntityRef( istream & in, ErrorDescriptor * err, const char * tokenList, InstMgr * instances, int addFileId ); diff --git a/src/clstepcore/sdaiApplication_instance.h b/src/clstepcore/sdaiApplication_instance.h index 2753dd5d..6d64518b 100644 --- a/src/clstepcore/sdaiApplication_instance.h +++ b/src/clstepcore/sdaiApplication_instance.h @@ -12,12 +12,12 @@ * and is not subject to copyright. */ -#include +#include /////////////////////////////////////////////////////////////////////////////// // SDAI_Application_instance used to be STEPentity -class SCL_CORE_EXPORT SDAI_Application_instance : public SDAI_DAObject_SDAI { +class SC_CORE_EXPORT SDAI_Application_instance : public SDAI_DAObject_SDAI { private: int _cur; // provides a built-in way of accessing attributes in order. diff --git a/src/clstepcore/sdaiSelect.cc b/src/clstepcore/sdaiSelect.cc index 9dee30fe..3b774be4 100644 --- a/src/clstepcore/sdaiSelect.cc +++ b/src/clstepcore/sdaiSelect.cc @@ -17,7 +17,7 @@ #include #include -#ifdef SCL_LOGGING +#ifdef SC_LOGGING #include extern ofstream * logStream; #endif @@ -28,7 +28,7 @@ extern ofstream * logStream; SDAI_Select::SDAI_Select( const SelectTypeDescriptor * s, const TypeDescriptor * td ) : _type( s ), underlying_type( td ) { -#ifdef SCL_LOGGING +#ifdef SC_LOGGING *logStream << "Exiting SDAI_Select constructor." << endl; #endif } @@ -213,7 +213,7 @@ Severity SDAI_Select::STEPread( istream & in, ErrorDescriptor * err, char c = '\0'; std::string tmp; -#ifdef SCL_LOGGING +#ifdef SC_LOGGING // *logStream << "DAVE ERR Entering SDAI_Select::STEPread." << endl; #endif // find out what case we have @@ -324,19 +324,19 @@ Severity SDAI_Select::STEPread( istream & in, ErrorDescriptor * err, "Bad data or missing closing ')' for SELECT type.\n" ); err->GreaterSeverity( SEVERITY_WARNING ); in.putback( c ); -#ifdef SCL_LOGGING +#ifdef SC_LOGGING // *logStream << "DAVE ERR Exiting SDAI_Select::STEPread for " << _type->Name() << endl; #endif return SEVERITY_WARNING; } -#ifdef SCL_LOGGING +#ifdef SC_LOGGING // *logStream << "DAVE ERR Exiting SDAI_Select::STEPread for " << _type->Name() << endl; #endif return err->severity(); } else { // ERROR -- the type wasn't one of the choices if( !in.good() ) { err->GreaterSeverity( SEVERITY_INPUT_ERROR ); -#ifdef SCL_LOGGING +#ifdef SC_LOGGING // *logStream << "DAVE ERR Exiting SDAI_Select::STEPread for " << _type->Name() << endl; #endif return SEVERITY_INPUT_ERROR; @@ -344,7 +344,7 @@ Severity SDAI_Select::STEPread( istream & in, ErrorDescriptor * err, err->AppendToDetailMsg( "The type name for the SELECT type is not valid.\n" ); err->GreaterSeverity( SEVERITY_WARNING ); -#ifdef SCL_LOGGING +#ifdef SC_LOGGING // *logStream << "DAVE ERR Exiting SDAI_Select::STEPread for " << _type->Name() << endl; #endif return SEVERITY_WARNING; @@ -364,7 +364,7 @@ Severity SDAI_Select::STEPread( istream & in, ErrorDescriptor * err, case '$': nullify(); err->GreaterSeverity( SEVERITY_INCOMPLETE ); -#ifdef SCL_LOGGING +#ifdef SC_LOGGING // *logStream << "DAVE ERR Exiting SDAI_Select::STEPread for " << _type->Name() << endl; #endif return SEVERITY_INCOMPLETE; @@ -375,7 +375,7 @@ Severity SDAI_Select::STEPread( istream & in, ErrorDescriptor * err, in.putback( c ); err->AppendToDetailMsg( "No value found for SELECT type.\n" ); err->GreaterSeverity( SEVERITY_WARNING ); -#ifdef SCL_LOGGING +#ifdef SC_LOGGING // *logStream << "DAVE ERR Exiting SDAI_Select::STEPread for " << _type->Name() << endl; #endif return SEVERITY_WARNING; @@ -454,7 +454,7 @@ Severity SDAI_Select::STEPread( istream & in, ErrorDescriptor * err, nullify(); in.putback( c ); err->GreaterSeverity( SEVERITY_WARNING ); -#ifdef SCL_LOGGING +#ifdef SC_LOGGING // *logStream << "DAVE ERR Exiting SDAI_Select::STEPread for " << _type->Name() << endl; #endif return SEVERITY_WARNING; @@ -476,7 +476,7 @@ Severity SDAI_Select::STEPread( istream & in, ErrorDescriptor * err, STEPentity * tmp = ReadEntityRef( in, err, ",)", instances, addFileId ); if( tmp && ( tmp != ENTITY_NULL ) && AssignEntity( tmp ) ) { -#ifdef SCL_LOGGING +#ifdef SC_LOGGING // *logStream << "DAVE ERR Exiting SDAI_Select::STEPread for " << _type->Name() << endl; #endif return SEVERITY_NULL; @@ -485,7 +485,7 @@ Severity SDAI_Select::STEPread( istream & in, ErrorDescriptor * err, "Reference to entity that is not a valid type for SELECT.\n" ); nullify(); err->GreaterSeverity( SEVERITY_WARNING ); -#ifdef SCL_LOGGING +#ifdef SC_LOGGING // *logStream << "DAVE ERR Exiting SDAI_Select::STEPread for " << _type->Name() << endl; #endif return SEVERITY_WARNING; @@ -498,14 +498,14 @@ Severity SDAI_Select::STEPread( istream & in, ErrorDescriptor * err, err->AppendToDetailMsg( "The type of the SELECT type is not valid.\n" ); err->GreaterSeverity( SEVERITY_WARNING ); -#ifdef SCL_LOGGING +#ifdef SC_LOGGING // *logStream << "DAVE ERR Exiting SDAI_Select::STEPread for " << _type->Name() << endl; #endif return SEVERITY_WARNING; } } // if (!in.good()) severity (SEVERITY_INPUT_ERROR); -#ifdef SCL_LOGGING +#ifdef SC_LOGGING // *logStream << "DAVE ERR Exiting SDAI_Select::STEPread for " << _type->Name() << endl; #endif return err->severity(); diff --git a/src/clstepcore/sdaiSelect.h b/src/clstepcore/sdaiSelect.h index d7c4678e..780c7766 100644 --- a/src/clstepcore/sdaiSelect.h +++ b/src/clstepcore/sdaiSelect.h @@ -12,12 +12,12 @@ * and is not subject to copyright. */ -#include +#include /** ** \file sdaiSelect.h class definition for the select superclass SDAI_Select. **/ -class SCL_CORE_EXPORT SDAI_Select { +class SC_CORE_EXPORT SDAI_Select { protected: const SelectTypeDescriptor * _type; const TypeDescriptor * underlying_type; diff --git a/src/clstepcore/trynext.cc b/src/clstepcore/trynext.cc index dd567daf..d2de63d8 100644 --- a/src/clstepcore/trynext.cc +++ b/src/clstepcore/trynext.cc @@ -12,7 +12,7 @@ *****************************************************************************/ #include "complexSupport.h" -#include "scl_memmgr.h" +#include "sc_memmgr.h" // Local function prototypes: static EntList * firstCandidate( EntList * ); diff --git a/src/clutils/CMakeLists.txt b/src/clutils/CMakeLists.txt index 522ce454..13293861 100644 --- a/src/clutils/CMakeLists.txt +++ b/src/clutils/CMakeLists.txt @@ -5,7 +5,7 @@ set(LIBSTEPUTILS_SRCS gennode.cc gennodelist.cc gennodearray.cc - scl_hash.cc + sc_hash.cc errordesc.cc ) @@ -15,17 +15,17 @@ SET(LIBSTEPUTILS_PRIVATE_HDRS gennodearray.h gennode.h gennodelist.h - scl_hash.h + sc_hash.h Str.h ) include_directories( - ${SCL_SOURCE_DIR}/src/base - ${SCL_BINARY_DIR}/include + ${SC_SOURCE_DIR}/src/base + ${SC_BINARY_DIR}/include ${CMAKE_CURRENT_SOURCE_DIR} ) -SCL_ADDLIB(steputils "${LIBSTEPUTILS_SRCS}" "base") +SC_ADDLIB(steputils "${LIBSTEPUTILS_SRCS}" "base") IF(MINGW OR MSVC OR BORLAND) TARGET_LINK_LIBRARIES(steputils shlwapi.lib) diff --git a/src/clutils/Str.h b/src/clutils/Str.h index 146d6ec4..40c24894 100644 --- a/src/clutils/Str.h +++ b/src/clutils/Str.h @@ -13,7 +13,7 @@ * and is not subject to copyright. */ -#include +#include #include #include @@ -25,21 +25,21 @@ #define STRING_DELIM '\'' #endif -SCL_UTILS_EXPORT char ToLower( const char c ); -SCL_UTILS_EXPORT char ToUpper( const char c ); -SCL_UTILS_EXPORT char * StrToLower( const char *, char * ); -SCL_UTILS_EXPORT const char * StrToLower( const char * word, std::string & s ); -SCL_UTILS_EXPORT const char * StrToUpper( const char * word, std::string & s ); -SCL_UTILS_EXPORT const char * StrToConstant( const char * word, std::string & s ); -SCL_UTILS_EXPORT int StrCmpIns( const char * str1, const char * str2 ); -SCL_UTILS_EXPORT const char * PrettyTmpName( const char * oldname ); -SCL_UTILS_EXPORT char * PrettyNewName( const char * oldname ); -SCL_UTILS_EXPORT char * EntityClassName( char * oldname ); +SC_UTILS_EXPORT char ToLower( const char c ); +SC_UTILS_EXPORT char ToUpper( const char c ); +SC_UTILS_EXPORT char * StrToLower( const char *, char * ); +SC_UTILS_EXPORT const char * StrToLower( const char * word, std::string & s ); +SC_UTILS_EXPORT const char * StrToUpper( const char * word, std::string & s ); +SC_UTILS_EXPORT const char * StrToConstant( const char * word, std::string & s ); +SC_UTILS_EXPORT int StrCmpIns( const char * str1, const char * str2 ); +SC_UTILS_EXPORT const char * PrettyTmpName( const char * oldname ); +SC_UTILS_EXPORT char * PrettyNewName( const char * oldname ); +SC_UTILS_EXPORT char * EntityClassName( char * oldname ); -SCL_UTILS_EXPORT bool StrEndsWith( const std::string & s, const char * suffix ); -SCL_UTILS_EXPORT std::string GetLiteralStr( istream & in, ErrorDescriptor * err ); +SC_UTILS_EXPORT bool StrEndsWith( const std::string & s, const char * suffix ); +SC_UTILS_EXPORT std::string GetLiteralStr( istream & in, ErrorDescriptor * err ); -extern SCL_UTILS_EXPORT Severity CheckRemainingInput +extern SC_UTILS_EXPORT Severity CheckRemainingInput ( istream & in, ErrorDescriptor * err, const char * typeName, // used in error message const char * tokenList ); // e.g. ",)" diff --git a/src/clutils/dirobj.cc b/src/clutils/dirobj.cc index fa280318..1e741dfb 100644 --- a/src/clutils/dirobj.cc +++ b/src/clutils/dirobj.cc @@ -39,7 +39,7 @@ * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ -#include +#include #include #ifdef HAVE_DIRENT_H # include @@ -57,7 +57,7 @@ #include #endif -#include +#include /////////////////////////////////////////////////////////////////////////////// // diff --git a/src/clutils/dirobj.h b/src/clutils/dirobj.h index 6d1761f4..f12c0ba3 100644 --- a/src/clutils/dirobj.h +++ b/src/clutils/dirobj.h @@ -33,8 +33,8 @@ // /////////////////////////////////////////////////////////////////////////////// -#include -#include +#include +#include #include #include @@ -47,7 +47,7 @@ /*****************************************************************************/ -class SCL_UTILS_EXPORT DirObj { +class SC_UTILS_EXPORT DirObj { public: DirObj( const char * dirName ); virtual ~DirObj(); diff --git a/src/clutils/errordesc.cc b/src/clutils/errordesc.cc index a1682bb4..061b9a4e 100644 --- a/src/clutils/errordesc.cc +++ b/src/clutils/errordesc.cc @@ -12,7 +12,7 @@ #include #include -#include +#include DebugLevel ErrorDescriptor::_debug_level = DEBUG_OFF; ostream * ErrorDescriptor::_out = 0; diff --git a/src/clutils/errordesc.h b/src/clutils/errordesc.h index 1d091873..e4c00199 100644 --- a/src/clutils/errordesc.h +++ b/src/clutils/errordesc.h @@ -13,7 +13,7 @@ * and is not subject to copyright. */ -#include +#include #include #include using namespace std; @@ -55,7 +55,7 @@ enum DebugLevel { ** Status: ******************************************************************/ -class SCL_UTILS_EXPORT ErrorDescriptor { +class SC_UTILS_EXPORT ErrorDescriptor { private: std::string _userMsg, _detailMsg; protected: diff --git a/src/clutils/gennode.cc b/src/clutils/gennode.cc index 6bd31573..3036ab19 100644 --- a/src/clutils/gennode.cc +++ b/src/clutils/gennode.cc @@ -14,7 +14,7 @@ #include #include -#include +#include ////////////////////////////////////////////////////////////////////////////// // class GenericNode inline functions that depend on other classes diff --git a/src/clutils/gennode.h b/src/clutils/gennode.h index dbafbdef..c4c63024 100644 --- a/src/clutils/gennode.h +++ b/src/clutils/gennode.h @@ -15,7 +15,7 @@ /* $Id: gennode.h,v 3.0.1.3 1997/11/05 22:33:47 sauderd DP3.1 $ */ -#include +#include #include class GenNodeList; @@ -27,7 +27,7 @@ class DisplayNodeList; // If you delete this object it first removes itself from any list it is in. ////////////////////////////////////////////////////////////////////////////// -class SCL_UTILS_EXPORT GenericNode { +class SC_UTILS_EXPORT GenericNode { friend class GenNodeList; friend class MgrNodeList; friend class DisplayNodeList; diff --git a/src/clutils/gennodearray.cc b/src/clutils/gennodearray.cc index 3d495f90..f78acbd1 100644 --- a/src/clutils/gennodearray.cc +++ b/src/clutils/gennodearray.cc @@ -11,12 +11,12 @@ */ -#include +#include #include #include #include -#include +#include #ifndef HAVE_MEMMOVE extern "C" { diff --git a/src/clutils/gennodearray.h b/src/clutils/gennodearray.h index b276eec3..bca5d5a5 100644 --- a/src/clutils/gennodearray.h +++ b/src/clutils/gennodearray.h @@ -21,7 +21,7 @@ * Copyright (c) 1990 Stanford University */ -#include +#include #include #include #include // to get bcopy for CenterLine @@ -38,7 +38,7 @@ // DeleteEntries(). ////////////////////////////////////////////////////////////////////////////// -class SCL_UTILS_EXPORT GenNodeArray { +class SC_UTILS_EXPORT GenNodeArray { public: GenNodeArray( int defaultSize = ARRAY_DEFAULT_SIZE ); diff --git a/src/clutils/gennodelist.cc b/src/clutils/gennodelist.cc index 4a17b3ba..9560a72b 100644 --- a/src/clutils/gennodelist.cc +++ b/src/clutils/gennodelist.cc @@ -16,7 +16,7 @@ #include //#include #include -#include +#include // inserts after existNode void GenNodeList::InsertAfter( GenericNode * newNode, diff --git a/src/clutils/gennodelist.h b/src/clutils/gennodelist.h index 8921b7be..4751f604 100644 --- a/src/clutils/gennodelist.h +++ b/src/clutils/gennodelist.h @@ -15,7 +15,7 @@ /* $Id: gennodelist.h,v 3.0.1.2 1997/11/05 22:33:48 sauderd DP3.1 $ */ -#include +#include #include ////////////////////////////////////////////////////////////////////////////// @@ -26,7 +26,7 @@ // as its head, you need to call DeleteEntries(). ////////////////////////////////////////////////////////////////////////////// -class SCL_UTILS_EXPORT GenNodeList { +class SC_UTILS_EXPORT GenNodeList { public: GenNodeList( GenericNode * headNode ); virtual ~GenNodeList() { diff --git a/src/clutils/scl_hash.cc b/src/clutils/sc_hash.cc similarity index 86% rename from src/clutils/scl_hash.cc rename to src/clutils/sc_hash.cc index 107072a7..cea502ce 100644 --- a/src/clutils/scl_hash.cc +++ b/src/clutils/sc_hash.cc @@ -1,4 +1,4 @@ -/* "$Id: scl_hash.cc,v 3.0.1.2 1997/11/05 22:33:50 sauderd DP3.1 $"; */ +/* "$Id: sc_hash.cc,v 3.0.1.2 1997/11/05 22:33:50 sauderd DP3.1 $"; */ /* * Dynamic hashing, after CACM April 1988 pp 446-457, by Per-Ake Larson. @@ -7,11 +7,11 @@ * also, hcreate/hdestroy routines added to simulate hsearch(3). */ -#include +#include #include #include #include -#include +#include /*************/ /* constants */ @@ -43,10 +43,10 @@ typedef unsigned long Address; #define DIV(x,y) ((x) >> (y##_SHIFT)) #define MOD(x,y) ((x) & ((y)-1)) -#define SCL_HASH_Table_new() new Hash_Table -#define SCL_HASH_Table_destroy(x) delete x -#define SCL_HASH_Element_new() new Element -#define SCL_HASH_Element_destroy(x) delete x +#define SC_HASH_Table_new() new Hash_Table +#define SC_HASH_Table_destroy(x) delete x +#define SC_HASH_Element_new() new Element +#define SC_HASH_Element_destroy(x) delete x typedef struct Element * ElementP; typedef struct Hash_Table * Hash_TableP; @@ -55,39 +55,39 @@ typedef struct Hash_Table * Hash_TableP; ** Internal routines */ -Address SCL_HASHhash( char *, Hash_TableP ); -static void SCL_HASHexpand_table( Hash_TableP ); +Address SC_HASHhash( char *, Hash_TableP ); +static void SC_HASHexpand_table( Hash_TableP ); # if HASH_STATISTICS static long HashAccesses, HashCollisions; # endif void * -SCL_HASHfind( Hash_TableP t, char * s ) { +SC_HASHfind( Hash_TableP t, char * s ) { struct Element e; struct Element * ep; e.key = s; e.symbol = 0; /* initialize to 0 - 25-Apr-1994 - kcm */ - ep = SCL_HASHsearch( t, &e, HASH_FIND ); + ep = SC_HASHsearch( t, &e, HASH_FIND ); return( ep ? ep->data : 0 ); } void -SCL_HASHinsert( Hash_TableP t, char * s, void * data ) { +SC_HASHinsert( Hash_TableP t, char * s, void * data ) { struct Element e, *e2; e.key = s; e.data = data; e.symbol = 0; - e2 = SCL_HASHsearch( t, &e, HASH_INSERT ); + e2 = SC_HASHsearch( t, &e, HASH_INSERT ); if( e2 ) { printf( "Redeclaration of %s\n", s ); } } Hash_TableP -SCL_HASHcreate( unsigned count ) { +SC_HASHcreate( unsigned count ) { unsigned int i; Hash_TableP table; @@ -101,7 +101,7 @@ SCL_HASHcreate( unsigned count ) { } count = DIV( i, SEGMENT_SIZE ); - table = ( Hash_TableP ) SCL_HASH_Table_new(); + table = ( Hash_TableP ) SC_HASH_Table_new(); table->SegmentCount = table->p = table->KeyCount = 0; /* ** First initialize directory to 0\'s @@ -141,7 +141,7 @@ SCL_HASHcreate( unsigned count ) { /* initialize pointer to beginning of hash table so we can step through it */ /* on repeated calls to HASHlist - DEL */ void -SCL_HASHlistinit( Hash_TableP table, HashEntry * he ) { +SC_HASHlistinit( Hash_TableP table, HashEntry * he ) { he->i = he->j = 0; he->p = 0; he->table = table; @@ -150,7 +150,7 @@ SCL_HASHlistinit( Hash_TableP table, HashEntry * he ) { } void -SCL_HASHlistinit_by_type( Hash_TableP table, HashEntry * he, char type ) { +SC_HASHlistinit_by_type( Hash_TableP table, HashEntry * he, char type ) { he->i = he->j = 0; he->p = 0; he->table = table; @@ -160,7 +160,7 @@ SCL_HASHlistinit_by_type( Hash_TableP table, HashEntry * he, char type ) { /* provide a way to step through the hash */ struct Element * -SCL_HASHlist( HashEntry * he ) { +SC_HASHlist( HashEntry * he ) { int i2 = he->i; int j2 = he->j; struct Element ** s; @@ -203,7 +203,7 @@ SCL_HASHlist( HashEntry * he ) { } void -SCL_HASHdestroy( Hash_TableP table ) { +SC_HASHdestroy( Hash_TableP table ) { unsigned int i, j; struct Element ** s; struct Element * p, *q; @@ -216,7 +216,7 @@ SCL_HASHdestroy( Hash_TableP table ) { p = s[j]; while( p != NULL ) { q = p->next; - SCL_HASH_Element_destroy( p ); + SC_HASH_Element_destroy( p ); p = q; } } @@ -224,7 +224,7 @@ SCL_HASHdestroy( Hash_TableP table ) { delete [] table->Directory[i]; } } - SCL_HASH_Table_destroy( table ); + SC_HASH_Table_destroy( table ); # if HASH_STATISTICS && DEBUG fprintf( stderr, "[hdestroy] Accesses %ld Collisions %ld\n", @@ -235,7 +235,7 @@ SCL_HASHdestroy( Hash_TableP table ) { } struct Element * -SCL_HASHsearch( Hash_TableP table, const struct Element * item, Action action ) { +SC_HASHsearch( Hash_TableP table, const struct Element * item, Action action ) { Address h; struct Element ** CurrentSegment; int SegmentIndex; @@ -247,7 +247,7 @@ SCL_HASHsearch( Hash_TableP table, const struct Element * item, Action action ) # if HASH_STATISTICS HashAccesses++; # endif - h = SCL_HASHhash( item->key, table ); + h = SC_HASHhash( item->key, table ); SegmentDir = ( int ) DIV( h, SEGMENT_SIZE ); SegmentIndex = ( int ) MOD( h, SEGMENT_SIZE ); /* @@ -281,7 +281,7 @@ SCL_HASHsearch( Hash_TableP table, const struct Element * item, Action action ) deleteme = q; *p = q->next; /*STRINGfree(deleteme->key);*/ - SCL_HASH_Element_destroy( deleteme ); + SC_HASH_Element_destroy( deleteme ); --table->KeyCount; return( deleteme ); /* of course, user shouldn't deref this! */ case HASH_INSERT: @@ -291,7 +291,7 @@ SCL_HASHsearch( Hash_TableP table, const struct Element * item, Action action ) } /* at this point, element does not exist and action == INSERT */ - q = ( ElementP ) SCL_HASH_Element_new(); + q = ( ElementP ) SC_HASH_Element_new(); *p = q; /* link into chain */ /* ** Initialize new element @@ -307,7 +307,7 @@ SCL_HASHsearch( Hash_TableP table, const struct Element * item, Action action ) ** table over-full? */ if( ++table->KeyCount / MUL( table->SegmentCount, SEGMENT_SIZE ) > table->MaxLoadFactor ) { - SCL_HASHexpand_table( table ); /* doesn't affect q */ + SC_HASHexpand_table( table ); /* doesn't affect q */ } } return( ( struct Element * )0 ); /* was return (Element)q */ @@ -318,7 +318,7 @@ SCL_HASHsearch( Hash_TableP table, const struct Element * item, Action action ) */ Address -SCL_HASHhash( char * Key, Hash_TableP table ) { +SC_HASHhash( char * Key, Hash_TableP table ) { Address h, address; register unsigned char * k = ( unsigned char * )Key; @@ -339,7 +339,7 @@ SCL_HASHhash( char * Key, Hash_TableP table ) { static void -SCL_HASHexpand_table( Hash_TableP table ) { +SC_HASHexpand_table( Hash_TableP table ) { Address NewAddress; int OldSegmentIndex, NewSegmentIndex; int OldSegmentDir, NewSegmentDir; @@ -384,7 +384,7 @@ SCL_HASHexpand_table( Hash_TableP table ) { LastOfNew = &NewSegment[NewSegmentIndex]; *LastOfNew = NULL; while( Current != NULL ) { - if( SCL_HASHhash( Current->key, table ) == NewAddress ) { + if( SC_HASHhash( Current->key, table ) == NewAddress ) { /* ** Attach it to the end of the new chain */ @@ -421,13 +421,13 @@ main() { e3.key = "herschel"; e3.data = ( char * )3; - t = SCL_HASHcreate( 100 ); - e = SCL_HASHsearch( t, &e1, HASH_INSERT ); - e = SCL_HASHsearch( t, &e2, HASH_INSERT ); - e = SCL_HASHsearch( t, &e3, HASH_INSERT ); - SCL_HASHlistinit( t, &he ); + t = SC_HASHcreate( 100 ); + e = SC_HASHsearch( t, &e1, HASH_INSERT ); + e = SC_HASHsearch( t, &e2, HASH_INSERT ); + e = SC_HASHsearch( t, &e3, HASH_INSERT ); + SC_HASHlistinit( t, &he ); for( ;; ) { - e = SCL_HASHlist( &he ); + e = SC_HASHlist( &he ); if( !e ) { exit( 0 ); } diff --git a/src/clutils/scl_hash.h b/src/clutils/sc_hash.h similarity index 80% rename from src/clutils/scl_hash.h rename to src/clutils/sc_hash.h index 204a8b53..f6a230ba 100644 --- a/src/clutils/scl_hash.h +++ b/src/clutils/sc_hash.h @@ -1,9 +1,9 @@ -#ifndef SCL_HASH_H -#define SCL_HASH_H +#ifndef SC_HASH_H +#define SC_HASH_H /* * NIST Utils Class Library -* clutils/scl_hash.h +* clutils/sc_hash.h * April 1997 * David Sauder * K. C. Morris @@ -27,7 +27,7 @@ * This work was supported by the United States Government, and is * not subject to copyright. * - * $Log: scl_hash.h,v $ + * $Log: sc_hash.h,v $ * Revision 3.0.1.2 1997/11/05 22:33:49 sauderd * Adding a new state DP3.1 and associated revision * @@ -91,7 +91,7 @@ * */ -#include +#include typedef enum { HASH_FIND, HASH_INSERT, HASH_DELETE } Action; @@ -132,18 +132,18 @@ typedef struct { extern "C" { #endif - SCL_UTILS_EXPORT struct Hash_Table * SCL_HASHcreate( unsigned ); - SCL_UTILS_EXPORT void SCL_HASHinitialize( void ); - SCL_UTILS_EXPORT void * SCL_HASHfind( struct Hash_Table *, char * ); - SCL_UTILS_EXPORT void SCL_HASHinsert( struct Hash_Table *, char *, void * ); - SCL_UTILS_EXPORT void SCL_HASHdestroy( struct Hash_Table * ); - SCL_UTILS_EXPORT struct Element * SCL_HASHsearch( struct Hash_Table *, const struct Element *, Action ); - SCL_UTILS_EXPORT void SCL_HASHlistinit( struct Hash_Table *, HashEntry * ); - SCL_UTILS_EXPORT void SCL_HASHlistinit_by_type( struct Hash_Table *, HashEntry *, char ); - SCL_UTILS_EXPORT struct Element * SCL_HASHlist( HashEntry * ); + SC_UTILS_EXPORT struct Hash_Table * SC_HASHcreate( unsigned ); + SC_UTILS_EXPORT void SC_HASHinitialize( void ); + SC_UTILS_EXPORT void * SC_HASHfind( struct Hash_Table *, char * ); + SC_UTILS_EXPORT void SC_HASHinsert( struct Hash_Table *, char *, void * ); + SC_UTILS_EXPORT void SC_HASHdestroy( struct Hash_Table * ); + SC_UTILS_EXPORT struct Element * SC_HASHsearch( struct Hash_Table *, const struct Element *, Action ); + SC_UTILS_EXPORT void SC_HASHlistinit( struct Hash_Table *, HashEntry * ); + SC_UTILS_EXPORT void SC_HASHlistinit_by_type( struct Hash_Table *, HashEntry *, char ); + SC_UTILS_EXPORT struct Element * SC_HASHlist( HashEntry * ); #ifdef __cplusplus } #endif -#endif /* SCL_HASH_H */ +#endif /* SC_HASH_H */ diff --git a/src/exppp/CMakeLists.txt b/src/exppp/CMakeLists.txt index 7f5c5cb5..2a8ce6af 100644 --- a/src/exppp/CMakeLists.txt +++ b/src/exppp/CMakeLists.txt @@ -8,16 +8,16 @@ SET(EXPPP_SOURCES ) include_directories( - ${SCL_SOURCE_DIR}/include - ${SCL_SOURCE_DIR}/include/exppp - ${SCL_SOURCE_DIR}/src/base + ${SC_SOURCE_DIR}/include + ${SC_SOURCE_DIR}/include/exppp + ${SC_SOURCE_DIR}/src/base ) if(BORLAND) add_definitions( -D__STDC__ ) endif() -SCL_ADDLIB(libexppp "${LIBEXPPP_SOURCES}" "express;base") +SC_ADDLIB(libexppp "${LIBEXPPP_SOURCES}" "express;base") set_target_properties(libexppp PROPERTIES PREFIX "") -SCL_ADDEXEC(exppp "${EXPPP_SOURCES}" "libexppp;express;base") +SC_ADDEXEC(exppp "${EXPPP_SOURCES}" "libexppp;express;base") diff --git a/src/exppp/exppp.c b/src/exppp/exppp.c index 78b19776..9f20923b 100644 --- a/src/exppp/exppp.c +++ b/src/exppp/exppp.c @@ -1,4 +1,4 @@ -#include +#include #include #include #include @@ -1461,7 +1461,7 @@ TYPE_body_out( Type t, int level ) { while( 0 != ( expr = ( Expression )DICTdo( &de ) ) ) { count++; } - names = ( char ** )scl_malloc( count * sizeof( char * ) ); + names = ( char ** )sc_malloc( count * sizeof( char * ) ); DICTdo_type_init( t->symbol_table, &de, OBJ_EXPRESSION ); while( 0 != ( expr = ( Expression )DICTdo( &de ) ) ) { names[expr->u.integer - 1] = expr->symbol.name; @@ -1485,7 +1485,7 @@ TYPE_body_out( Type t, int level ) { raw( names[i] ); } raw( ")" ); - scl_free( ( char * )names ); + sc_free( ( char * )names ); } #else wrap( " ENUMERATION OF\n" ); @@ -1985,7 +1985,7 @@ prep_string() { } string_func_in_use = true; - exppp_buf = exppp_bufp = ( char * )scl_malloc( BIGBUFSIZ ); + exppp_buf = exppp_bufp = ( char * )sc_malloc( BIGBUFSIZ ); if( !exppp_buf ) { fprintf( stderr, "failed to allocate exppp buffer\n" ); return 1; @@ -2004,7 +2004,7 @@ prep_string() { static char * finish_string() { - char * b = ( char * )scl_realloc( exppp_buf, 1 + exppp_maxbuflen - exppp_buflen ); + char * b = ( char * )sc_realloc( exppp_buf, 1 + exppp_maxbuflen - exppp_buflen ); if( b == 0 ) { fprintf( stderr, "failed to reallocate exppp buffer\n" ); diff --git a/src/express/CMakeLists.txt b/src/express/CMakeLists.txt index d8b411cc..8906a575 100644 --- a/src/express/CMakeLists.txt +++ b/src/express/CMakeLists.txt @@ -1,13 +1,13 @@ include_directories( ${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_CURRENT_SOURCE_DIR} - ${SCL_SOURCE_DIR}/src/base + ${SC_SOURCE_DIR}/src/base ) # Set up the information we need to feed the generated source management # scripts set(BASELINE_INFORMATION_FILE "${CMAKE_CURRENT_SOURCE_DIR}/generated/verification_info.cmake") -set(PROJECT_CMAKE_DIR "${SCL_SOURCE_DIR}/cmake") +set(PROJECT_CMAKE_DIR "${SC_SOURCE_DIR}/cmake") set(INPUT_FILELIST expscan.l expparse.y) set(TEMPLATE_FILELIST ${LEMON_TEMPLATE} ${PERPLEX_TEMPLATE}) set(BUILD_OUTPUT_FILELIST @@ -23,7 +23,7 @@ set(SYNC_TARGET_NAME "express_sync_generated_files") # Depending on whether we're using pre-generated sources or building them on # the fly, set up targets and source lists. -if(SCL_GENERATE_LP_SOURCES) +if(SC_GENERATE_LP_SOURCES) LEMON_TARGET(ExpParser expparse.y expparse.c expparse.h) PERPLEX_TARGET(ExpScanner expscan.l ${CMAKE_CURRENT_BINARY_DIR}/expscan.c ${CMAKE_CURRENT_BINARY_DIR}/expscan.h) ADD_PERPLEX_LEMON_DEPENDENCY(ExpScanner ExpParser) @@ -31,7 +31,7 @@ if(SCL_GENERATE_LP_SOURCES) ${LEMON_ExpParser_OUTPUT_SOURCE} ${PERPLEX_ExpScanner_OUTPUTS} ) - configure_file(${SCL_SOURCE_DIR}/cmake/manage_generated.cmake.in + configure_file(${SC_SOURCE_DIR}/cmake/manage_generated.cmake.in ${CMAKE_CURRENT_BINARY_DIR}/express_manage_generated.cmake @ONLY) add_custom_command( OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/express_manage_generated.sentinel @@ -41,7 +41,7 @@ if(SCL_GENERATE_LP_SOURCES) ) add_custom_target(express_verify DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/express_manage_generated.sentinel) - configure_file(${SCL_SOURCE_DIR}/cmake/sync_generated.cmake.in + configure_file(${SC_SOURCE_DIR}/cmake/sync_generated.cmake.in ${CMAKE_CURRENT_BINARY_DIR}/express_sync_generated.cmake @ONLY) add_custom_command( OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/express_sync_generated.sentinel @@ -51,14 +51,14 @@ if(SCL_GENERATE_LP_SOURCES) ) add_custom_target(express_sync_generated_files DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/express_sync_generated.sentinel) -else(SCL_GENERATE_LP_SOURCES) +else(SC_GENERATE_LP_SOURCES) set(EXPRESS_GENERATED_SRCS generated/expparse.c generated/expscan.c ) include_directories(${CMAKE_CURRENT_SOURCE_DIR}/generated) - configure_file(${SCL_SOURCE_DIR}/cmake/verify_generated.cmake.in + configure_file(${SC_SOURCE_DIR}/cmake/verify_generated.cmake.in ${CMAKE_CURRENT_BINARY_DIR}/express_verify_generated.cmake @ONLY) add_custom_command( OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/express_verify_generated.sentinel @@ -68,7 +68,7 @@ else(SCL_GENERATE_LP_SOURCES) ) add_custom_target(express_verify DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/express_verify_generated.sentinel) -endif(SCL_GENERATE_LP_SOURCES) +endif(SC_GENERATE_LP_SOURCES) set(EXPRESS_SOURCES ${EXPRESS_GENERATED_SRCS} @@ -112,10 +112,10 @@ SET(EXPRESS_PRIVATE_HDRS stack.h ) -SCL_ADDLIB(express "${EXPRESS_SOURCES}" "base") +SC_ADDLIB(express "${EXPRESS_SOURCES}" "base") add_dependencies(express express_verify) add_dependencies(express version_string) -SCL_ADDEXEC("check-express" "${CHECK_EXPRESS_SOURCES}" "express;base" ) +SC_ADDEXEC("check-express" "${CHECK_EXPRESS_SOURCES}" "express;base" ) # Local Variables: # tab-width: 8 diff --git a/src/express/alg.c b/src/express/alg.c index f6c4024d..4d010f50 100644 --- a/src/express/alg.c +++ b/src/express/alg.c @@ -38,7 +38,7 @@ * prettied up interface to print_objects_when_running */ -#include +#include #include "express/alg.h" #include "express/object.h" #include "express/schema.h" diff --git a/src/express/caseitem.c b/src/express/caseitem.c index b2f12541..6082cc75 100644 --- a/src/express/caseitem.c +++ b/src/express/caseitem.c @@ -29,7 +29,7 @@ * prettied up interface to print_objects_when_running */ -#include +#include #include "express/caseitem.h" struct freelist_head CASE_IT_fl; diff --git a/src/express/dict.c b/src/express/dict.c index c537ec00..c77b4b40 100644 --- a/src/express/dict.c +++ b/src/express/dict.c @@ -33,7 +33,7 @@ * Initial revision */ -#include +#include #include "express/dict.h" #include "express/object.h" #include "express/expbasic.h" diff --git a/src/express/entity.c b/src/express/entity.c index fee7a539..6b18e426 100644 --- a/src/express/entity.c +++ b/src/express/entity.c @@ -111,7 +111,7 @@ * */ -#include +#include #include "express/entity.h" #include "express/express.h" #include "express/object.h" diff --git a/src/express/error.c b/src/express/error.c index 0f84e9e8..0d97fc53 100644 --- a/src/express/error.c +++ b/src/express/error.c @@ -24,7 +24,7 @@ * Revision 1.11 1997/10/22 16:10:26 sauderd * This would #include stdarg.h if __STDC__ was defined otherwise it would * #include vararg.h. I changed it to check the configure generated config file - * named scl_cf.h (if HAVE_CONFIG_H is defined - it's also defined by + * named sc_cf.h (if HAVE_CONFIG_H is defined - it's also defined by * configure) to see if HAVE_STDARG_H is defined. If it is it #includes stdarg.h * otherwise it #includes vararg.h. If HAVE_CONFIG_H isn't defined then it works * like it used to. @@ -51,7 +51,7 @@ * prettied up interface to print_objects_when_running */ -#include +#include #include #include @@ -124,7 +124,7 @@ void ERRORinitialize( void ) { ERROR_syntax_expecting = ERRORcreate( "%s, expecting %s in %s %s", SEVERITY_EXIT ); - ERROR_string_base = ( char * )scl_malloc( ERROR_MAX_SPACE ); + ERROR_string_base = ( char * )sc_malloc( ERROR_MAX_SPACE ); ERROR_start_message_buffer(); @@ -147,7 +147,7 @@ void ERRORcleanup( void ) { ERRORdestroy( ERROR_subordinate_failed ); ERRORdestroy( ERROR_syntax_expecting ); - scl_free( ERROR_string_base ); + sc_free( ERROR_string_base ); } /** Need the LIST routines to complete ERROR initialization */ @@ -437,7 +437,7 @@ void ERRORnospace() { Error ERRORcreate( char * message, Severity severity ) { Error n; - n = ( struct Error_ * )scl_malloc( sizeof( struct Error_ ) ); + n = ( struct Error_ * )sc_malloc( sizeof( struct Error_ ) ); n->message = message; n->severity = severity; n->enabled = true; @@ -445,7 +445,7 @@ Error ERRORcreate( char * message, Severity severity ) { } void ERRORdestroy( Error error ) { - scl_free( error ); + sc_free( error ); } /** \fn ERRORbuffer_messages diff --git a/src/express/expr.c b/src/express/expr.c index 25b6fb30..a17bc77c 100644 --- a/src/express/expr.c +++ b/src/express/expr.c @@ -70,7 +70,7 @@ * */ -#include +#include #include "express/expr.h" #include "express/resolve.h" diff --git a/src/express/express.c b/src/express/express.c index 52a115c3..c5213a27 100644 --- a/src/express/express.c +++ b/src/express/express.c @@ -68,7 +68,7 @@ * */ -#include "scl_memmgr.h" +#include "sc_memmgr.h" #include "express/basic.h" #include #include @@ -275,16 +275,16 @@ Symbol * EXPRESS_get_symbol( Generic e ) { Express EXPRESScreate() { Express model = SCOPEcreate( OBJ_EXPRESS ); - model->u.express = ( struct Express_ * )scl_calloc( 1, sizeof( struct Express_ ) ); + model->u.express = ( struct Express_ * )sc_calloc( 1, sizeof( struct Express_ ) ); return model; } void EXPRESSdestroy( Express model ) { if ( model->u.express->basename ) - scl_free( model->u.express->basename ); + sc_free( model->u.express->basename ); if ( model->u.express->filename ) - scl_free( model->u.express->filename ); - scl_free( model->u.express ); + sc_free( model->u.express->filename ); + sc_free( model->u.express ); SCOPEdestroy( model ); } @@ -303,7 +303,7 @@ static void EXPRESS_PATHinit() { p = getenv( "EXPRESS_PATH" ); if( !p ) { /* if no EXPRESS_PATH, search current directory anyway */ - dir = ( Dir * )scl_malloc( sizeof( Dir ) ); + dir = ( Dir * )sc_malloc( sizeof( Dir ) ); dir->leaf = dir->full; LISTadd( EXPRESS_path, ( Generic )dir ); } else { @@ -335,7 +335,7 @@ static void EXPRESS_PATHinit() { } p++; /* leave p after terminating null */ - dir = ( Dir * )scl_malloc( sizeof( Dir ) ); + dir = ( Dir * )sc_malloc( sizeof( Dir ) ); /* if it's just ".", make it as if it was */ /* just "" to make error messages cleaner */ @@ -367,7 +367,7 @@ static void EXPRESS_PATHinit() { static void EXPRESS_PATHfree( void ) { LISTdo( EXPRESS_path, dir, Dir * ) - scl_free( dir ); + sc_free( dir ); LISTod LISTfree( EXPRESS_path ); } @@ -564,7 +564,7 @@ void EXPRESSparse( Express model, FILE * fp, char * filename ) { length -= 4; } - model->u.express->basename = ( char * )scl_malloc( length + 1 ); + model->u.express->basename = ( char * )sc_malloc( length + 1 ); memcpy( model->u.express->basename, filename, length ); model->u.express->basename[length] = '\0'; diff --git a/src/express/fedex.c b/src/express/fedex.c index a75ad357..b2606590 100644 --- a/src/express/fedex.c +++ b/src/express/fedex.c @@ -71,10 +71,10 @@ * */ -#include -#include -#include -#include "scl_version_string.h" +#include +#include +#include +#include "sc_version_string.h" #include #include #include "sc_getopt.h" @@ -90,7 +90,7 @@ char EXPRESSgetopt_options[256] = "Bbd:e:i:w:p:rvz"; static int no_need_to_work = 0; /* TRUE if we can exit gracefully without doing any work */ void print_fedex_version( void ) { - fprintf( stderr, "Build info for %s: %s\nhttp://github.com/stepcode/stepcode\n", EXPRESSprogram_name, scl_version() ); + fprintf( stderr, "Build info for %s: %s\nhttp://github.com/stepcode/stepcode\n", EXPRESSprogram_name, sc_version() ); no_need_to_work = 1; } diff --git a/src/express/hash.c b/src/express/hash.c index 8114ff61..5fe60b31 100644 --- a/src/express/hash.c +++ b/src/express/hash.c @@ -105,7 +105,7 @@ * */ -#include +#include #include #include #include @@ -301,7 +301,7 @@ HASHdestroy( Hash_Table table ) { p = q; } } - scl_free( table->Directory[i] ); + sc_free( table->Directory[i] ); } } HASH_Table_destroy( table ); diff --git a/src/express/lexact.c b/src/express/lexact.c index 38e2c925..d62d03ac 100644 --- a/src/express/lexact.c +++ b/src/express/lexact.c @@ -51,7 +51,7 @@ * prettied up interface to print_objects_when_running */ -#include +#include #include #include #include "express/lexact.h" @@ -328,7 +328,7 @@ SCANprocess_logical_literal( char * string ) { break; /* default will actually be triggered by 'UNKNOWN' keyword */ } - scl_free( string ); + sc_free( string ); return TOK_LOGICAL_LITERAL; } @@ -342,7 +342,7 @@ SCANprocess_identifier_or_keyword( const char * yytext ) { /* make uppercase copy */ len = strlen( yytext ); - dest = test_string = ( char * )scl_malloc( len + 1 ); + dest = test_string = ( char * )sc_malloc( len + 1 ); for( src = yytext; *src; src++, dest++ ) { *dest = ( islower( *src ) ? toupper( *src ) : *src ); } @@ -358,7 +358,7 @@ SCANprocess_identifier_or_keyword( const char * yytext ) { case TOK_LOGICAL_LITERAL: return SCANprocess_logical_literal( test_string ); default: - scl_free( test_string ); + sc_free( test_string ); return k->token; } } @@ -556,7 +556,7 @@ SCANupperize( char * s ) { char * SCANstrdup( char * s ) { - char * s2 = ( char * )scl_malloc( strlen( s ) + 1 ); + char * s2 = ( char * )sc_malloc( strlen( s ) + 1 ); if( !s2 ) { return 0; } diff --git a/src/express/linklist.c b/src/express/linklist.c index 944a8f33..e7c2f9f9 100644 --- a/src/express/linklist.c +++ b/src/express/linklist.c @@ -21,7 +21,7 @@ * prettied up interface to print_objects_when_running */ -#include +#include #include "express/linklist.h" Error ERROR_empty_list = ERROR_none; diff --git a/src/express/memory.c b/src/express/memory.c index 4efb9c90..6592bfde 100644 --- a/src/express/memory.c +++ b/src/express/memory.c @@ -34,7 +34,7 @@ Now you can say things like: foo_destroy(foo1); */ -#include +#include #include #include #include "express/memory.h" diff --git a/src/express/object.c b/src/express/object.c index 51af6b94..b705cfa1 100644 --- a/src/express/object.c +++ b/src/express/object.c @@ -21,7 +21,7 @@ * prettied up interface to print_objects_when_running */ -#include +#include #include #include "express/object.h" @@ -37,7 +37,7 @@ Symbol * UNK_get_symbol( Generic x ) { void OBJinitialize() { int i; - OBJ = ( struct Object * )scl_malloc( MAX_OBJECT_TYPES * sizeof( struct Object ) ); + OBJ = ( struct Object * )sc_malloc( MAX_OBJECT_TYPES * sizeof( struct Object ) ); for( i = 0; i < MAX_OBJECT_TYPES; i++ ) { OBJ[i].get_symbol = UNK_get_symbol; OBJ[i].type = "of unknown_type"; @@ -47,7 +47,7 @@ void OBJinitialize() { /** Clean up the Object module */ void OBJcleanup() { - scl_free( OBJ ); + sc_free( OBJ ); } void OBJcreate( char type, struct Symbol_ * ( *get_symbol )( Generic ), char * printable_type, int bits ) { diff --git a/src/express/resolve.c b/src/express/resolve.c index 49878738..9164a5b4 100644 --- a/src/express/resolve.c +++ b/src/express/resolve.c @@ -55,7 +55,7 @@ * */ -#include +#include #include #include "express/resolve.h" #include "stack.h" diff --git a/src/express/schema.c b/src/express/schema.c index e012b554..9504e9fa 100644 --- a/src/express/schema.c +++ b/src/express/schema.c @@ -45,7 +45,7 @@ * prettied up interface to print_objects_when_running */ -#include +#include #include "express/expbasic.h" #include "express/schema.h" #include "express/object.h" diff --git a/src/express/scope.c b/src/express/scope.c index 29ff2185..b3ba35a1 100644 --- a/src/express/scope.c +++ b/src/express/scope.c @@ -38,7 +38,7 @@ * prettied up interface to print_objects_when_running */ -#include +#include #define SCOPE_C #include "express/scope.h" #include "express/resolve.h" diff --git a/src/express/stmt.c b/src/express/stmt.c index e24c85ca..06fbe093 100644 --- a/src/express/stmt.c +++ b/src/express/stmt.c @@ -40,7 +40,7 @@ * */ -#include +#include #include "express/stmt.h" struct freelist_head STMT_fl; diff --git a/src/express/symbol.c b/src/express/symbol.c index 054e4d08..7b904731 100644 --- a/src/express/symbol.c +++ b/src/express/symbol.c @@ -32,7 +32,7 @@ * Initial revision */ -#include +#include #include "express/symbol.h" struct freelist_head SYMBOL_fl; diff --git a/src/express/type.c b/src/express/type.c index 4bb94e4f..02e15011 100644 --- a/src/express/type.c +++ b/src/express/type.c @@ -122,7 +122,7 @@ This module implements the type abstraction. It is * */ -#include +#include #include "express/type.h" /* Very commonly-used read-only types */ diff --git a/src/express/variable.c b/src/express/variable.c index fe3eccda..07c32535 100644 --- a/src/express/variable.c +++ b/src/express/variable.c @@ -83,7 +83,7 @@ * */ -#include +#include #include #include "express/variable.h" #include "express/object.h" diff --git a/src/fedex_plus/CMakeLists.txt b/src/fedex_plus/CMakeLists.txt index e114ae6c..139c90fe 100644 --- a/src/fedex_plus/CMakeLists.txt +++ b/src/fedex_plus/CMakeLists.txt @@ -25,12 +25,12 @@ set(fedex_plus_SOURCES ) include_directories( - ${SCL_SOURCE_DIR}/include - ${SCL_SOURCE_DIR}/include/exppp - ${SCL_SOURCE_DIR}/include/express - ${SCL_SOURCE_DIR}/src/base + ${SC_SOURCE_DIR}/include + ${SC_SOURCE_DIR}/include/exppp + ${SC_SOURCE_DIR}/include/express + ${SC_SOURCE_DIR}/src/base ) -SCL_ADDEXEC(fedex_plus "${fedex_plus_SOURCES}" "libexppp;express;base") +SC_ADDEXEC(fedex_plus "${fedex_plus_SOURCES}" "libexppp;express;base") add_dependencies( fedex_plus version_string ) \ No newline at end of file diff --git a/src/fedex_plus/classes.c b/src/fedex_plus/classes.c index ae0b385e..b1890e1d 100644 --- a/src/fedex_plus/classes.c +++ b/src/fedex_plus/classes.c @@ -25,12 +25,12 @@ N350 ( August 31, 1993 ) of ISO 10303 TC184/SC4/WG7. /* this is used to add new dictionary calls */ /* #define NEWDICT */ -#include +#include #include #include #include "classes.h" -#include +#include int isAggregateType( const Type t ); int isAggregate( Variable a ); @@ -123,7 +123,7 @@ void format_for_std_stringout( FILE * f, const char * orig_buf ) { optr++; } fprintf( f, s_end ); - scl_free( orig_buf ); + sc_free( orig_buf ); } void USEREFout( Schema schema, Dictionary refdict, Linked_List reflist, char * type, FILE * file ) { @@ -442,7 +442,7 @@ char * generate_attribute_name( Variable a, char * out ) { } } *q = '\0'; - scl_free( temp ); + sc_free( temp ); return out; } @@ -500,7 +500,7 @@ char * generate_dict_attr_name( Variable a, char * out ) { } *q = '\0'; - scl_free( temp ); + sc_free( temp ); return out; } @@ -593,7 +593,7 @@ char * TYPEget_express_type( const Type t ) { /* this will declare extra memory when aggregate is > 1D */ - permval = ( char * )scl_malloc( strlen( retval ) * sizeof( char ) + 1 ); + permval = ( char * )sc_malloc( strlen( retval ) * sizeof( char ) + 1 ); strcpy( permval, retval ); return permval; @@ -751,7 +751,7 @@ void ATTRprint_access_methods( CONST char * entnm, Variable a, FILE * file ) { fprintf( file, "{\n" ); if( print_logging ) { - fprintf( file, "#ifdef SCL_LOGGING\n" ); + fprintf( file, "#ifdef SC_LOGGING\n" ); fprintf( file, " if(*logStream)\n {\n" ); fprintf( file, " logStream->open(SCLLOGFILE,ios::app);\n" ); fprintf( file, " if(! (_%s == S_ENTITY_NULL) )\n {\n", attrnm ); @@ -775,7 +775,7 @@ void ATTRprint_access_methods( CONST char * entnm, Variable a, FILE * file ) { fprintf( file, "{\n" ); if( print_logging ) { fprintf( file, "\n" ); - fprintf( file, "#ifdef SCL_LOGGING\n" ); + fprintf( file, "#ifdef SC_LOGGING\n" ); fprintf( file, " if(*logStream)\n {\n" ); fprintf( file, " logStream->open(SCLLOGFILE,ios::app);\n" ); @@ -806,7 +806,7 @@ void ATTRprint_access_methods( CONST char * entnm, Variable a, FILE * file ) { fprintf( file, "{\n" ); if( print_logging ) { - fprintf( file, "#ifdef SCL_LOGGING\n" ); + fprintf( file, "#ifdef SC_LOGGING\n" ); fprintf( file, " if(*logStream)\n {\n" ); fprintf( file, " logStream->open(SCLLOGFILE,ios::app);\n" ); fprintf( file, " if(!_%s.is_null())\n {\n", attrnm ); @@ -829,7 +829,7 @@ void ATTRprint_access_methods( CONST char * entnm, Variable a, FILE * file ) { ATTRprint_access_methods_put_head( entnm, a, file ); fprintf( file, "{\n" ); if( print_logging ) { - fprintf( file, "#ifdef SCL_LOGGING\n" ); + fprintf( file, "#ifdef SC_LOGGING\n" ); fprintf( file, " if(*logStream)\n {\n" ); fprintf( file, " *logStream << time(NULL) << \" SDAI %s::%s() assigned: \";\n", entnm, funcnm ); @@ -845,7 +845,7 @@ void ATTRprint_access_methods( CONST char * entnm, Variable a, FILE * file ) { if( class == enumeration_ ) { fprintf( file, "{\n" ); if( print_logging ) { - fprintf( file, "#ifdef SCL_LOGGING\n" ); + fprintf( file, "#ifdef SC_LOGGING\n" ); fprintf( file, " if(*logStream)\n {\n" ); fprintf( file, " if(!_%s.is_null())\n {\n", attrnm ); fprintf( file, " *logStream << time(NULL) << \" SDAI %s::%s() returned: \";\n", @@ -866,7 +866,7 @@ void ATTRprint_access_methods( CONST char * entnm, Variable a, FILE * file ) { ATTRprint_access_methods_put_head( entnm, a, file ); fprintf( file, "{\n" ); if( print_logging ) { - fprintf( file, "#ifdef SCL_LOGGING\n" ); + fprintf( file, "#ifdef SC_LOGGING\n" ); fprintf( file, " if(*logStream)\n {\n" ); fprintf( file, " *logStream << time(NULL) << \" SDAI %s::%s() assigned: \";\n", entnm, funcnm ); @@ -894,7 +894,7 @@ void ATTRprint_access_methods( CONST char * entnm, Variable a, FILE * file ) { if( ( class == string_ ) || ( class == binary_ ) ) { fprintf( file, "{\n" ); if( print_logging ) { - fprintf( file, "#ifdef SCL_LOGGING\n" ); + fprintf( file, "#ifdef SC_LOGGING\n" ); fprintf( file, " if(*logStream)\n {\n" ); fprintf( file, " if(!_%s.is_null())\n {\n", attrnm ); fprintf( file, " *logStream << time(NULL) << \" SDAI %s::%s() returned: \";\n", @@ -913,7 +913,7 @@ void ATTRprint_access_methods( CONST char * entnm, Variable a, FILE * file ) { ATTRprint_access_methods_put_head( entnm, a, file ); fprintf( file, "{\n" ); if( print_logging ) { - fprintf( file, "#ifdef SCL_LOGGING\n" ); + fprintf( file, "#ifdef SC_LOGGING\n" ); fprintf( file, " if(*logStream)\n {\n" ); fprintf( file, " if(!x)\n {\n" ); fprintf( file, " *logStream << time(NULL) << \" SDAI %s::%s() returned: \";\n", @@ -934,7 +934,7 @@ void ATTRprint_access_methods( CONST char * entnm, Variable a, FILE * file ) { if( class == integer_ ) { fprintf( file, "{\n" ); if( print_logging ) { - fprintf( file, "#ifdef SCL_LOGGING\n" ); + fprintf( file, "#ifdef SC_LOGGING\n" ); fprintf( file, " if(*logStream)\n {\n" ); fprintf( file, " if(!(_%s == S_INT_NULL) )\n {\n", attrnm ); fprintf( file, " *logStream << time(NULL) << \" SDAI %s::%s() returned: \";\n", @@ -954,7 +954,7 @@ void ATTRprint_access_methods( CONST char * entnm, Variable a, FILE * file ) { ATTRprint_access_methods_put_head( entnm, a, file ); fprintf( file, "{\n" ); if( print_logging ) { - fprintf( file, "#ifdef SCL_LOGGING\n" ); + fprintf( file, "#ifdef SC_LOGGING\n" ); fprintf( file, " if(*logStream)\n {\n" ); fprintf( file, " if(!(x == S_INT_NULL) )\n {\n" ); fprintf( file, " *logStream << time(NULL) << \" SDAI %s::%s() returned: \";\n", @@ -978,7 +978,7 @@ void ATTRprint_access_methods( CONST char * entnm, Variable a, FILE * file ) { if( ( class == number_ ) || ( class == real_ ) ) { fprintf( file, "{\n" ); if( print_logging ) { - fprintf( file, "#ifdef SCL_LOGGING\n" ); + fprintf( file, "#ifdef SC_LOGGING\n" ); fprintf( file, " if(*logStream)\n {\n" ); fprintf( file, " if(!(_%s == S_REAL_NULL) )\n {\n", attrnm ); fprintf( file, " *logStream << time(NULL) << \" SDAI %s::%s() returned: \";\n", @@ -996,7 +996,7 @@ void ATTRprint_access_methods( CONST char * entnm, Variable a, FILE * file ) { ATTRprint_access_methods_put_head( entnm, a, file ); fprintf( file, "{\n" ); if( print_logging ) { - fprintf( file, "#ifdef SCL_LOGGING\n" ); + fprintf( file, "#ifdef SC_LOGGING\n" ); fprintf( file, " if(*logStream)\n {\n" ); fprintf( file, " if(!(_%s == S_REAL_NULL) )\n {\n", attrnm ); fprintf( file, " *logStream << time(NULL) << \" SDAI %s::%s() returned: \";\n", @@ -2260,15 +2260,15 @@ void ENTITYincode_print( Entity entity, FILES * files, Schema schema ) { if( VARis_derived( v ) && v->initializer ) { tmp = EXPRto_string( v->initializer ); - tmp2 = ( char * )scl_malloc( sizeof( char ) * ( strlen( tmp ) + BUFSIZ ) ); + tmp2 = ( char * )sc_malloc( sizeof( char ) * ( strlen( tmp ) + BUFSIZ ) ); fprintf( files->init, " %s::%s%d%s%s->initializer_(\"%s\");\n", schema_name, ATTR_PREFIX, attr_count, ( VARis_derived( v ) ? "D" : ( VARis_type_shifter( v ) ? "R" : ( VARget_inverse( v ) ? "I" : "" ) ) ), attrnm, format_for_stringout( tmp, tmp2 ) ); - scl_free( tmp ); - scl_free( tmp2 ); + sc_free( tmp ); + sc_free( tmp2 ); } if( VARget_inverse( v ) ) { fprintf( files->init, " %s::%s%d%s%s->inverted_attr_id_(\"%s\");\n", @@ -2466,11 +2466,11 @@ void ENTITYprint_new( Entity entity, FILES * files, Schema schema, int externMap if( whereRule_formatted_size == 0 ) { whereRule_formatted_size = 3 * BUFSIZ; - whereRule_formatted = ( char * )scl_malloc( sizeof( char ) * whereRule_formatted_size ); + whereRule_formatted = ( char * )sc_malloc( sizeof( char ) * whereRule_formatted_size ); } else if( ( strlen( whereRule ) + 300 ) > whereRule_formatted_size ) { - scl_free( whereRule_formatted ); + sc_free( whereRule_formatted ); whereRule_formatted_size = strlen( whereRule ) + BUFSIZ; - whereRule_formatted = ( char * )scl_malloc( sizeof( char ) * whereRule_formatted_size ); + whereRule_formatted = ( char * )sc_malloc( sizeof( char ) * whereRule_formatted_size ); } whereRule_formatted[0] = '\0'; if( w->label ) { @@ -2544,7 +2544,7 @@ void ENTITYprint_new( Entity entity, FILES * files, Schema schema, int externMap fprintf( files->create, " %s::%s%s->_where_rules->Append(wr);\n", SCHEMAget_name( schema ), ENT_PREFIX, ENTITYget_name( entity ) ); - scl_free( whereRule ); + sc_free( whereRule ); ptr2 = whereRule = 0; LISTod } @@ -2557,7 +2557,7 @@ void ENTITYprint_new( Entity entity, FILES * files, Schema schema, int externMap SCHEMAget_name( schema ), ENT_PREFIX, ENTITYget_name( entity ) ); if( whereRule_formatted_size == 0 ) { - uniqRule_formatted = ( char * )scl_malloc( sizeof( char ) * 2 * BUFSIZ ); + uniqRule_formatted = ( char * )sc_malloc( sizeof( char ) * 2 * BUFSIZ ); whereRule_formatted = uniqRule_formatted; } else { uniqRule_formatted = whereRule_formatted; @@ -2585,7 +2585,7 @@ void ENTITYprint_new( Entity entity, FILES * files, Schema schema, int externMap } uniqRule = EXPRto_string( v->name ); fprintf( files->create, "%s", uniqRule ); - scl_free( uniqRule ); + sc_free( uniqRule ); } LISTod fprintf( files->create, ";\\n\");\n" ); @@ -2595,7 +2595,7 @@ void ENTITYprint_new( Entity entity, FILES * files, Schema schema, int externMap } if( whereRule_formatted_size > 0 ) { - scl_free( whereRule_formatted ); + sc_free( whereRule_formatted ); } n = ENTITYget_classname( entity ); @@ -3407,7 +3407,7 @@ void TYPEprint_new( const Type type, FILE * create, Schema schema ) { " %s = new SelectTypeDescriptor (\n ~%s, //unique elements,\n", TYPEtd_name( type ), temp ); - scl_free( temp ); + sc_free( temp ); TYPEprint_nm_ft_desc( schema, type, create, "," ); fprintf( create, @@ -3509,11 +3509,11 @@ void TYPEprint_new( const Type type, FILE * create, Schema schema ) { if( whereRule_formatted_size == 0 ) { whereRule_formatted_size = 3 * BUFSIZ; - whereRule_formatted = ( char * )scl_malloc( sizeof( char ) * whereRule_formatted_size ); + whereRule_formatted = ( char * )sc_malloc( sizeof( char ) * whereRule_formatted_size ); } else if( ( strlen( whereRule ) + 300 ) > whereRule_formatted_size ) { - scl_free( whereRule_formatted ); + sc_free( whereRule_formatted ); whereRule_formatted_size = strlen( whereRule ) + BUFSIZ; - whereRule_formatted = ( char * )scl_malloc( sizeof( char ) * whereRule_formatted_size ); + whereRule_formatted = ( char * )sc_malloc( sizeof( char ) * whereRule_formatted_size ); } whereRule_formatted[0] = '\0'; if( w->label ) { @@ -3571,10 +3571,10 @@ void TYPEprint_new( const Type type, FILE * create, Schema schema ) { fprintf( create, " %s->_where_rules->Append(wr);\n", TYPEtd_name( type ) ); - scl_free( whereRule ); + sc_free( whereRule ); ptr2 = whereRule = 0; LISTod - scl_free( whereRule_formatted ); + sc_free( whereRule_formatted ); } } diff --git a/src/fedex_plus/classes_misc.c b/src/fedex_plus/classes_misc.c index 9ce5b3c9..e925e8df 100644 --- a/src/fedex_plus/classes_misc.c +++ b/src/fedex_plus/classes_misc.c @@ -1,9 +1,9 @@ #define CLASSES_MISC_C -#include +#include #include #include "classes.h" -#include +#include /******************************************************************* ** FedEx parser output module for generating C++ class definitions @@ -22,7 +22,7 @@ for the STEP Standard Data Access Interface as defined in document N350 ( August 31, 1993 ) of ISO 10303 TC184/SC4/WG7. *******************************************************************/ -extern char * scl_version(); +extern char * sc_version(); extern int multiple_inheritance; /*extern int corba_binding; */ @@ -132,7 +132,7 @@ FILE * FILEcreate( const char * filename ) { fprintf( file, "#ifndef %s\n", fn = StrToConstant( filename ) ); fprintf( file, "#define %s\n\n", fn ); - fprintf( file, "// This file was generated by fedex_plus,\n// %s.\n", scl_version() ); + fprintf( file, "// This file was generated by fedex_plus,\n// %s.\n", sc_version() ); fprintf( file, "// You probably don't want to edit it since your modifications\n" ); fprintf( file, "// will be lost if fedex_plus is used to regenerate it.\n" ); return ( file ); @@ -679,7 +679,7 @@ ENTITYput_superclass( Entity entity ) { LISTod; } - tag = ( EntityTag ) scl_malloc( sizeof( struct EntityTag_ ) ); + tag = ( EntityTag ) sc_malloc( sizeof( struct EntityTag_ ) ); tag -> superclass = super; TYPEput_clientData( ENTITYget_type( entity ), ( ClientData ) tag ); return super; @@ -747,10 +747,10 @@ VARis_type_shifter( Variable a ) { temp = EXPRto_string( VARget_name( a ) ); if( ! strncmp( StrToLower( temp ), "self\\", 5 ) ) { /* a is a type shifter */ - scl_free( temp ); + sc_free( temp ); return a; } - scl_free( temp ); + sc_free( temp ); return 0; } diff --git a/src/fedex_plus/classes_wrapper.cc b/src/fedex_plus/classes_wrapper.cc index 75852c24..7fcd00a3 100644 --- a/src/fedex_plus/classes_wrapper.cc +++ b/src/fedex_plus/classes_wrapper.cc @@ -3,9 +3,9 @@ #include #include "complexSupport.h" -#include +#include -#include +#include /******************************************************************* ** FedEx parser output module for generating C++ class definitions @@ -33,7 +33,7 @@ N350 ( August 31, 1993 ) of ISO 10303 TC184/SC4/WG7. void use_ref( Schema, Express, FILES * ); void create_builtin_type_decl( FILES * files, char * name ) { - fprintf( files->incall, "extern SCL_%s_EXPORT TypeDescriptor *%s%s_TYPE;\n", + fprintf( files->incall, "extern SC_%s_EXPORT TypeDescriptor *%s%s_TYPE;\n", "SCHEMA", TD_PREFIX, name ); } @@ -61,19 +61,19 @@ void print_file_header( Express express, FILES * files ) { files -> incall = FILEcreate( "schema.h" ); fprintf( files->incall, "\n// in the fedex_plus source code, this file is generally referred to as files->incall or schemafile\n" ); - fprintf( files->incall, "\n#ifndef SCL_%s_EXPORT\n", "SCHEMA" ); - fprintf( files->incall, "# if defined(SCL_%s_DLL_EXPORTS) && defined(SCL_%s_DLL_IMPORTS)\n", "SCHEMA", "SCHEMA" ); - fprintf( files->incall, "# error \"SCL_%s_DLL_EXPORTS or SCL_%s_DLL_IMPORTS can be defined, not both.\"\n", "SCHEMA", "SCHEMA" ); - fprintf( files->incall, "# elif defined(SCL_%s_DLL_EXPORTS)\n", "SCHEMA" ); - fprintf( files->incall, "# define SCL_%s_EXPORT __declspec(dllexport)\n", "SCHEMA" ); - fprintf( files->incall, "# elif defined(SCL_%s_DLL_IMPORTS)\n", "SCHEMA" ); - fprintf( files->incall, "# define SCL_%s_EXPORT __declspec(dllimport)\n", "SCHEMA" ); + fprintf( files->incall, "\n#ifndef SC_%s_EXPORT\n", "SCHEMA" ); + fprintf( files->incall, "# if defined(SC_%s_DLL_EXPORTS) && defined(SC_%s_DLL_IMPORTS)\n", "SCHEMA", "SCHEMA" ); + fprintf( files->incall, "# error \"SC_%s_DLL_EXPORTS or SC_%s_DLL_IMPORTS can be defined, not both.\"\n", "SCHEMA", "SCHEMA" ); + fprintf( files->incall, "# elif defined(SC_%s_DLL_EXPORTS)\n", "SCHEMA" ); + fprintf( files->incall, "# define SC_%s_EXPORT __declspec(dllexport)\n", "SCHEMA" ); + fprintf( files->incall, "# elif defined(SC_%s_DLL_IMPORTS)\n", "SCHEMA" ); + fprintf( files->incall, "# define SC_%s_EXPORT __declspec(dllimport)\n", "SCHEMA" ); fprintf( files->incall, "# else\n" ); - fprintf( files->incall, "# define SCL_%s_EXPORT\n", "SCHEMA" ); + fprintf( files->incall, "# define SC_%s_EXPORT\n", "SCHEMA" ); fprintf( files->incall, "# endif\n" ); fprintf( files->incall, "#endif\n\n" ); - fprintf( files->incall, "#ifdef SCL_LOGGING\n" ); + fprintf( files->incall, "#ifdef SC_LOGGING\n" ); fprintf( files->incall, "#include \n" ); fprintf( files->incall, "#endif\n" ); @@ -86,13 +86,13 @@ void print_file_header( Express express, FILES * files ) { fprintf( files->incall, "\n#include \n" ); - fprintf( files->incall, "extern SCL_%s_EXPORT void SchemaInit (Registry &);\n", "SCHEMA" ); - fprintf( files->incall, "extern SCL_%s_EXPORT void InitSchemasAndEnts (Registry &);\n", "SCHEMA" ); + fprintf( files->incall, "extern SC_%s_EXPORT void SchemaInit (Registry &);\n", "SCHEMA" ); + fprintf( files->incall, "extern SC_%s_EXPORT void InitSchemasAndEnts (Registry &);\n", "SCHEMA" ); files -> initall = FILEcreate( "schema.cc" ); fprintf( files->initall, "\n// in the fedex_plus source code, this file is generally referred to as files->initall or schemainit\n" ); fprintf( files->initall, "#include \"schema.h\"\n" ); - fprintf( files->initall, "#include \"scl_memmgr.h\"\n" ); + fprintf( files->initall, "#include \"sc_memmgr.h\"\n" ); fprintf( files->initall, "class Registry;\n" ); fprintf( files->initall, "\nvoid SchemaInit (Registry & reg) {\n" ); @@ -106,7 +106,7 @@ void print_file_header( Express express, FILES * files ) { files -> create = FILEcreate( "SdaiAll.cc" ); fprintf( files->create, "\n// in the fedex_plus source code, this file is generally referred to as files->create or createall\n" ); fprintf( files->create, "#include \"schema.h\"\n" ); - fprintf( files->create, "#include \"scl_memmgr.h\"\n" ); + fprintf( files->create, "#include \"sc_memmgr.h\"\n" ); fprintf( files->create, "\nvoid InitSchemasAndEnts (Registry & reg) {\n" ); // This file declares all entity classes as incomplete types. This will @@ -389,7 +389,7 @@ void SCHEMAprint( Schema schema, FILES * files, Express model, void * complexCol fprintf( files->inc, "\n// in the fedex_plus source code, this file is generally referred to as files->inc or incfile\n" ); fprintf( incfile, "#include \"schema.h\"\n" ); - fprintf( incfile, "#include \"scl_memmgr.h\"\n" ); + fprintf( incfile, "#include \"sc_memmgr.h\"\n" ); np = fnm + strlen( fnm ) - 1; /* point to end of constant part of string */ @@ -408,10 +408,10 @@ void SCHEMAprint( Schema schema, FILES * files, Express model, void * complexCol #else fprintf( libfile, "#include \"schema.h\"\n" ); #endif - fprintf( libfile, "#include \"scl_memmgr.h\"\n" ); + fprintf( libfile, "#include \"sc_memmgr.h\"\n" ); fprintf( libfile, - "\n#ifdef SCL_LOGGING \n" + "\n#ifdef SC_LOGGING \n" "#include \n" " extern ofstream *logStream;\n" "#define SCLLOGFILE \"scl.log\"\n" @@ -455,7 +455,7 @@ void SCHEMAprint( Schema schema, FILES * files, Express model, void * complexCol "#endif\n" ); #endif fprintf( initfile, "#include \n#include \n" ); - fprintf( initfile, "#include \n" ); + fprintf( initfile, "#include \n" ); fprintf( files->init, "\n#include \"%sHelpers.h\"\n", schnm ); fprintf( initfile, "\nvoid %sInit (Registry& reg) {\n std::string str;\n", schnm ); diff --git a/src/fedex_plus/collect.cc b/src/fedex_plus/collect.cc index c9f5aca4..2d3c352f 100644 --- a/src/fedex_plus/collect.cc +++ b/src/fedex_plus/collect.cc @@ -12,7 +12,7 @@ *****************************************************************************/ #include "complexSupport.h" -#include +#include void ComplexCollect::insert( ComplexList * c ) /* diff --git a/src/fedex_plus/complexlist.cc b/src/fedex_plus/complexlist.cc index b811fcff..1e98168e 100644 --- a/src/fedex_plus/complexlist.cc +++ b/src/fedex_plus/complexlist.cc @@ -11,7 +11,7 @@ *****************************************************************************/ #include "complexSupport.h" -#include +#include ComplexList::~ComplexList() /* diff --git a/src/fedex_plus/entlist.cc b/src/fedex_plus/entlist.cc index 9c917bd1..e2711429 100644 --- a/src/fedex_plus/entlist.cc +++ b/src/fedex_plus/entlist.cc @@ -14,7 +14,7 @@ *****************************************************************************/ #include "complexSupport.h" -#include +#include int EntList::siblings() /* diff --git a/src/fedex_plus/entnode.cc b/src/fedex_plus/entnode.cc index f10fd63e..50f3a865 100644 --- a/src/fedex_plus/entnode.cc +++ b/src/fedex_plus/entnode.cc @@ -12,7 +12,7 @@ *****************************************************************************/ #include "complexSupport.h" -#include +#include EntNode::EntNode( char * namelist[] ) /* diff --git a/src/fedex_plus/expressbuild.cc b/src/fedex_plus/expressbuild.cc index 109b1945..b1baa1c8 100644 --- a/src/fedex_plus/expressbuild.cc +++ b/src/fedex_plus/expressbuild.cc @@ -12,7 +12,7 @@ *****************************************************************************/ #include "complexSupport.h" -#include +#include // Local function prototypes: static void initEnts( Express ); diff --git a/src/fedex_plus/fedex_main.c b/src/fedex_plus/fedex_main.c index 59e40f18..05077221 100644 --- a/src/fedex_plus/fedex_main.c +++ b/src/fedex_plus/fedex_main.c @@ -72,13 +72,13 @@ * Added * to typedefs. Replaced warning kludges with ERRORoption. */ -#include +#include #include #include #include "../express/express.h" #include "../express/resolve.h" -#include +#include extern void print_fedex_version( void ); diff --git a/src/fedex_plus/match-ors.cc b/src/fedex_plus/match-ors.cc index c22daadc..282fe0bf 100644 --- a/src/fedex_plus/match-ors.cc +++ b/src/fedex_plus/match-ors.cc @@ -14,7 +14,7 @@ *****************************************************************************/ #include "complexSupport.h" -#include +#include MatchType AndOrList::matchORs( EntNode * ents ) /* diff --git a/src/fedex_plus/multlist.cc b/src/fedex_plus/multlist.cc index 500a559a..4b14f68a 100644 --- a/src/fedex_plus/multlist.cc +++ b/src/fedex_plus/multlist.cc @@ -13,7 +13,7 @@ *****************************************************************************/ #include "complexSupport.h" -#include +#include MultList::~MultList() /* diff --git a/src/fedex_plus/multpass.c b/src/fedex_plus/multpass.c index db316dee..d350f601 100644 --- a/src/fedex_plus/multpass.c +++ b/src/fedex_plus/multpass.c @@ -31,11 +31,11 @@ * Date: 04/09/97 * *****************************************************************************/ -#include +#include #include #include "classes.h" -#include +#include #define FALSE 0 #define TRUE 1 @@ -188,7 +188,7 @@ static void initializeMarks( Express express ) DICTdo_type_init( express->symbol_table, &de_sch, OBJ_SCHEMA ); while( ( schema = ( Scope )DICTdo( &de_sch ) ) != 0 ) { schema->search_id = UNPROCESSED; - schema->clientData = ( int * )scl_malloc( sizeof( int ) ); + schema->clientData = ( int * )sc_malloc( sizeof( int ) ); *( int * )schema->clientData = 0; SCOPEdo_entities( schema, ent, de_ent ) ent->search_id = NOTKNOWN; @@ -206,7 +206,7 @@ static void cleanupMarks( Express express ) { DICTdo_type_init( express->symbol_table, &de_sch, OBJ_SCHEMA ); while( ( schema = ( Scope )DICTdo( &de_sch ) ) != 0 ) { if ( schema->clientData ) { - scl_free( schema->clientData ); + sc_free( schema->clientData ); schema->clientData = NULL; } } diff --git a/src/fedex_plus/non-ors.cc b/src/fedex_plus/non-ors.cc index 61553778..2ef5dd80 100644 --- a/src/fedex_plus/non-ors.cc +++ b/src/fedex_plus/non-ors.cc @@ -11,7 +11,7 @@ *****************************************************************************/ #include "complexSupport.h" -#include +#include MatchType SimpleList::matchNonORs( EntNode * ents ) /* diff --git a/src/fedex_plus/orlist.cc b/src/fedex_plus/orlist.cc index 85ff29eb..dd0c9db8 100644 --- a/src/fedex_plus/orlist.cc +++ b/src/fedex_plus/orlist.cc @@ -11,7 +11,7 @@ *****************************************************************************/ #include "complexSupport.h" -#include +#include int OrList::hit( const char * nm ) /* diff --git a/src/fedex_plus/print.cc b/src/fedex_plus/print.cc index 4a4ad085..0b1398a6 100644 --- a/src/fedex_plus/print.cc +++ b/src/fedex_plus/print.cc @@ -8,7 +8,7 @@ *****************************************************************************/ #include "complexSupport.h" -#include +#include // Local function prototypes: static char * joinText( JoinType, char * ); diff --git a/src/fedex_plus/selects.c b/src/fedex_plus/selects.c index 9a28e973..f41e0d77 100644 --- a/src/fedex_plus/selects.c +++ b/src/fedex_plus/selects.c @@ -22,11 +22,11 @@ extern int multiple_inheritance; ******** The functions in this file generate C++ code for representing ******** EXPRESS SELECT types. **************************************************************************/ -#include +#include #include #include "classes.h" -#include +#include int isAggregateType( const Type t ); char * generate_attribute_name( Variable a, char * out ); @@ -470,7 +470,7 @@ non_unique_types_string( const Type type ) { non_unique_types_vector( type, tvec ); /* build type string from vector */ - typestr = ( char * )scl_malloc( BUFSIZ ); + typestr = ( char * )sc_malloc( BUFSIZ ); typestr[0] = '\0'; strcat( typestr, ( char * )"(" ); for( i = 0; i <= tnumber; i++ ) { @@ -811,7 +811,7 @@ TYPEselect_lib_print_part_one( const Type type, FILE * f, Schema schema, /* Initialize the select members with their correct typedescriptors: */ initSelItems( type, f ); fprintf( f, "\n{\n" ); - fprintf( f, "#ifdef SCL_LOGGING\n if( *logStream )\n {\n" ); + fprintf( f, "#ifdef SC_LOGGING\n if( *logStream )\n {\n" ); fprintf( f, " *logStream << \"DAVE ERR entering %s constructor.\" << std::endl;\n", n ); fprintf( f, " }\n#endif\n" ); @@ -822,7 +822,7 @@ TYPEselect_lib_print_part_one( const Type type, FILE * f, Schema schema, } } LISTod; fprintf( f, " nullify();\n" ); - fprintf( f, "#ifdef SCL_LOGGING\n if( *logStream )\n {\n" ); + fprintf( f, "#ifdef SC_LOGGING\n if( *logStream )\n {\n" ); fprintf( f, "// *logStream << \"DAVE ERR exiting %s constructor.\" << std::endl;\n", n ); fprintf( f, " }\n#endif\n" ); fprintf( f, "}\n" ); @@ -850,7 +850,7 @@ TYPEselect_lib_print_part_one( const Type type, FILE * f, Schema schema, TYPEtd_name( t ) ); initSelItems( type, f ); fprintf( f, "\n{\n" ); - fprintf( f, "#ifdef SCL_LOGGING\n if( *logStream )\n {\n" ); + fprintf( f, "#ifdef SC_LOGGING\n if( *logStream )\n {\n" ); fprintf( f, " *logStream << \"DAVE ERR entering %s constructor.\"" " << std::endl;\n", n ); @@ -865,7 +865,7 @@ TYPEselect_lib_print_part_one( const Type type, FILE * f, Schema schema, } else { fprintf( f, " _%s = o;\n", SEL_ITEMget_dmname( t ) ); } - fprintf( f, "#ifdef SCL_LOGGING\n if( *logStream )\n {\n" ); + fprintf( f, "#ifdef SC_LOGGING\n if( *logStream )\n {\n" ); fprintf( f, "// *logStream << \"DAVE ERR exiting %s constructor.\"" " << std::endl;\n", n ); @@ -889,7 +889,7 @@ TYPEselect_lib_print_part_one( const Type type, FILE * f, Schema schema, TYPEtd_name( t ) ); initSelItems( type, f ); fprintf( f, "\n{\n" ); - fprintf( f, "#ifdef SCL_LOGGING\n if( *logStream )\n {\n" ); + fprintf( f, "#ifdef SC_LOGGING\n if( *logStream )\n {\n" ); fprintf( f, " *logStream << \"DAVE ERR entering %s constructor.\"" " << std::endl;\n", n ); @@ -913,7 +913,7 @@ TYPEselect_lib_print_part_one( const Type type, FILE * f, Schema schema, fprintf( f, "// NOTE: Underlying type defaults to %s instead of NULL\n", TYPEtd_name( t ) ); - fprintf( f, "#ifdef SCL_LOGGING\n if( *logStream )\n {\n" ); + fprintf( f, "#ifdef SC_LOGGING\n if( *logStream )\n {\n" ); fprintf( f, "// *logStream << \"DAVE ERR exiting %s constructor.\"" " << std::endl;\n", n ); @@ -1982,7 +1982,7 @@ TYPEselect_print( Type t, FILES * files, Schema schema ) { } /* mark the type as being processed */ - tag = ( SelectTag ) scl_malloc( sizeof( struct SelectTag_ ) ); + tag = ( SelectTag ) sc_malloc( sizeof( struct SelectTag_ ) ); tag -> started = 1; tag -> complete = 0; TYPEput_clientData( t, ( ClientData ) tag ); @@ -2061,7 +2061,7 @@ TYPEselect_print( Type t, FILES * files, Schema schema ) { DAR - moved to TYPEprint_init() - to keep init info together. */ tag -> complete = 1; - scl_free( tag ); + sc_free( tag ); } #undef BASE_SELECT diff --git a/src/fedex_plus/trynext.cc b/src/fedex_plus/trynext.cc index d77f8c4d..93833b6f 100644 --- a/src/fedex_plus/trynext.cc +++ b/src/fedex_plus/trynext.cc @@ -12,7 +12,7 @@ *****************************************************************************/ #include "complexSupport.h" -#include +#include // Local function prototypes: static EntList * firstCandidate( EntList * ); diff --git a/src/fedex_plus/write.cc b/src/fedex_plus/write.cc index 21cab3dc..c3a3eb52 100644 --- a/src/fedex_plus/write.cc +++ b/src/fedex_plus/write.cc @@ -11,7 +11,7 @@ *****************************************************************************/ #include "complexSupport.h" -#include +#include // Local function prototypes: static void writeheader( ostream &, int ); @@ -117,7 +117,7 @@ static void writeheader( ostream & os, int noLists ) << " * file, however, there are no complex entities, so this\n" << " * function is a stub.\n" << " */" << endl << endl; - os << "#include \"complexSupport.h\"\n#include \"scl_memmgr.h\"\n\n"; + os << "#include \"complexSupport.h\"\n#include \"sc_memmgr.h\"\n\n"; os << "ComplexCollect *gencomplex()" << endl; os << "{" << endl; return; @@ -129,7 +129,7 @@ static void writeheader( ostream & os, int noLists ) << " * support structures. The structures will be used in the SCL to\n" << " * validate user requests to instantiate complex entities.\n" << " */" << endl << endl; - os << "#include \"complexSupport.h\"\n#include \"scl_memmgr.h\"\n\n"; + os << "#include \"complexSupport.h\"\n#include \"sc_memmgr.h\"\n\n"; os << "ComplexCollect *gencomplex()" << endl; os << " /*" << endl << " * This function contains instantiation statments for all the\n" diff --git a/src/fedex_python/CMakeLists.txt b/src/fedex_python/CMakeLists.txt index 3401b085..ad23fc63 100644 --- a/src/fedex_python/CMakeLists.txt +++ b/src/fedex_python/CMakeLists.txt @@ -1,11 +1,11 @@ -if(SCL_PYTHON_GENERATOR) +if(SC_PYTHON_GENERATOR) include_directories( - ${SCL_SOURCE_DIR}/include - ${SCL_SOURCE_DIR}/include/exppp - ${SCL_SOURCE_DIR}/include/express - ${SCL_SOURCE_DIR}/src/base - ${SCL_SOURCE_DIR}/src/fedex_plus + ${SC_SOURCE_DIR}/include + ${SC_SOURCE_DIR}/include/exppp + ${SC_SOURCE_DIR}/include/express + ${SC_SOURCE_DIR}/src/base + ${SC_SOURCE_DIR}/src/fedex_plus ) add_definitions( -DHAVE_CONFIG_H ) @@ -31,7 +31,7 @@ set(fedex_python_SOURCES ../fedex_plus/write.cc ../fedex_plus/print.cc ) -SCL_ADDEXEC(fedex_python "${fedex_python_SOURCES}" "libexppp;express;base") +SC_ADDEXEC(fedex_python "${fedex_python_SOURCES}" "libexppp;express;base") add_dependencies( fedex_python version_string ) -endif(SCL_PYTHON_GENERATOR) +endif(SC_PYTHON_GENERATOR) diff --git a/src/test/p21read/p21read.cc b/src/test/p21read/p21read.cc index 9668bf67..c7a82d3d 100644 --- a/src/test/p21read/p21read.cc +++ b/src/test/p21read/p21read.cc @@ -13,7 +13,7 @@ */ extern void SchemaInit( class Registry & ); -#include "scl_version_string.h" +#include "sc_version_string.h" #include #include #include @@ -91,7 +91,7 @@ void checkSchemaName( Registry & reg, STEPfile & sf, bool ignoreErr ) { } void printVersion( const char * exe ) { - std::cout << exe << " build info: " << scl_version() << std::endl; + std::cout << exe << " build info: " << sc_version() << std::endl; } void printUse( const char * exe ) { diff --git a/test/cpp/schema_specific/CMakeLists.txt b/test/cpp/schema_specific/CMakeLists.txt index 38a3f704..e7fb21f5 100644 --- a/test/cpp/schema_specific/CMakeLists.txt +++ b/test/cpp/schema_specific/CMakeLists.txt @@ -1,8 +1,8 @@ CMAKE_MINIMUM_REQUIRED(VERSION 2.8) #c++ tests that depend on a particular schema -INCLUDE_DIRECTORIES( ${SCL_SOURCE_DIR}/src/cldai ${SCL_SOURCE_DIR}/src/cleditor ${SCL_SOURCE_DIR}/src/clutils - ${SCL_SOURCE_DIR}/src/clstepcore ${SCL_SOURCE_DIR}/src/base ) +INCLUDE_DIRECTORIES( ${SC_SOURCE_DIR}/src/cldai ${SC_SOURCE_DIR}/src/cleditor ${SC_SOURCE_DIR}/src/clutils + ${SC_SOURCE_DIR}/src/clstepcore ${SC_SOURCE_DIR}/src/base ) # ${name} is used for the C++ file name (${name}.cc), and as the suffix for the target and test names # ${sdai_lib} is the name of the schema lib that is used @@ -31,31 +31,31 @@ FUNCTION( add_schema_dependent_test name sdai_lib exe_args ) LABELS cpp_schema_specific ) ENDFUNCTION( add_schema_dependent_test name sdai_lib exe_args ) -#if you need a schema that won't be built automatically (i.e. not in scl/data), put it in here +#if you need a schema that won't be built automatically (i.e. not in sc/data), put it in here #temporarily disabling testing ensures that the schema will be built before these tests run -SET(SCL_ENABLE_TESTING OFF) - BUILD_A_SCHEMA( ${SCL_SOURCE_DIR}/test/unitary_schemas/array_bounds_expr.exp ) - BUILD_A_SCHEMA( ${SCL_SOURCE_DIR}/test/unitary_schemas/inverse_attr.exp ) -SET(SCL_ENABLE_TESTING ON) +SET(SC_ENABLE_TESTING OFF) + BUILD_A_SCHEMA( ${SC_SOURCE_DIR}/test/unitary_schemas/array_bounds_expr.exp ) + BUILD_A_SCHEMA( ${SC_SOURCE_DIR}/test/unitary_schemas/inverse_attr.exp ) +SET(SC_ENABLE_TESTING ON) add_schema_dependent_test( "aggregate_bound_runtime" "array_bounds_expr" - "${SCL_SOURCE_DIR}/test/p21/test_array_bounds.p21" ) + "${SC_SOURCE_DIR}/test/p21/test_array_bounds.p21" ) #can't use the macro for this one because it depends on the test above and needs WILL_FAIL add_test( NAME test_aggregate_bound_runtime_FAIL1 WORKING_DIRECTORY ${CMAKE_BINARY_DIR} - COMMAND $ "${SCL_SOURCE_DIR}/test/p21/test_array_bounds_FAIL1.p21" ) + COMMAND $ "${SC_SOURCE_DIR}/test/p21/test_array_bounds_FAIL1.p21" ) set_tests_properties( test_aggregate_bound_runtime_FAIL1 PROPERTIES DEPENDS test_aggregate_bound_runtime WILL_FAIL true LABELS cpp_schema_specific ) -add_schema_dependent_test( "inverse_attr1" "inverse_attr" "${SCL_SOURCE_DIR}/test/p21/test_inverse_attr.p21" ) -add_schema_dependent_test( "inverse_attr2" "inverse_attr" "${SCL_SOURCE_DIR}/test/p21/test_inverse_attr.p21" ) -add_schema_dependent_test( "inverse_attr3" "inverse_attr" "${SCL_SOURCE_DIR}/test/p21/test_inverse_attr.p21" ) -add_schema_dependent_test( "attribute" "inverse_attr" "${SCL_SOURCE_DIR}/test/p21/test_inverse_attr.p21" ) +add_schema_dependent_test( "inverse_attr1" "inverse_attr" "${SC_SOURCE_DIR}/test/p21/test_inverse_attr.p21" ) +add_schema_dependent_test( "inverse_attr2" "inverse_attr" "${SC_SOURCE_DIR}/test/p21/test_inverse_attr.p21" ) +add_schema_dependent_test( "inverse_attr3" "inverse_attr" "${SC_SOURCE_DIR}/test/p21/test_inverse_attr.p21" ) +add_schema_dependent_test( "attribute" "inverse_attr" "${SC_SOURCE_DIR}/test/p21/test_inverse_attr.p21" ) if(HAVE_STD_THREAD) -# for best results, use a large file. as1-oc-214.stp is currently the largest file in the repo that scl works with. +# for best results, use a large file. as1-oc-214.stp is currently the largest file in the repo that sc works with. add_schema_dependent_test( "stepfile_rw_progress" "AP214E3_2010" - "${SCL_SOURCE_DIR}/data/ap214e3/as1-oc-214.stp" "-pthread -std=c++0x" "pthread" ) + "${SC_SOURCE_DIR}/data/ap214e3/as1-oc-214.stp" "-pthread -std=c++0x" "pthread" ) endif(HAVE_STD_THREAD) diff --git a/test/cpp/schema_specific/aggregate_bound_runtime.cc b/test/cpp/schema_specific/aggregate_bound_runtime.cc index 14a54583..4b759a49 100644 --- a/test/cpp/schema_specific/aggregate_bound_runtime.cc +++ b/test/cpp/schema_specific/aggregate_bound_runtime.cc @@ -1,5 +1,5 @@ -#include "scl_version_string.h" +#include "sc_version_string.h" #include #include #include diff --git a/test/cpp/schema_specific/attribute.cc b/test/cpp/schema_specific/attribute.cc index 66f5087b..04cd1f4d 100644 --- a/test/cpp/schema_specific/attribute.cc +++ b/test/cpp/schema_specific/attribute.cc @@ -3,9 +3,9 @@ ** Test inverse attributes; uses a tiny schema similar to a subset of IFC2x3 ** */ -#include +#include extern void SchemaInit( class Registry & ); -#include "scl_version_string.h" +#include "sc_version_string.h" #include #include #include diff --git a/test/cpp/schema_specific/inverse_attr1.cc b/test/cpp/schema_specific/inverse_attr1.cc index 6ab9490c..a2b25402 100644 --- a/test/cpp/schema_specific/inverse_attr1.cc +++ b/test/cpp/schema_specific/inverse_attr1.cc @@ -3,9 +3,9 @@ ** Test inverse attributes; uses a tiny schema similar to a subset of IFC2x3 ** */ -#include +#include extern void SchemaInit( class Registry & ); -#include "scl_version_string.h" +#include "sc_version_string.h" #include "SubSuperIterators.h" #include #include diff --git a/test/cpp/schema_specific/inverse_attr2.cc b/test/cpp/schema_specific/inverse_attr2.cc index b68a5525..dee10f3b 100644 --- a/test/cpp/schema_specific/inverse_attr2.cc +++ b/test/cpp/schema_specific/inverse_attr2.cc @@ -3,9 +3,9 @@ ** Test inverse attributes; uses a tiny schema similar to a subset of IFC2x3 ** */ -#include +#include extern void SchemaInit( class Registry & ); -#include "scl_version_string.h" +#include "sc_version_string.h" #include #include #include diff --git a/test/cpp/schema_specific/inverse_attr3.cc b/test/cpp/schema_specific/inverse_attr3.cc index 8a46311c..6d155db7 100644 --- a/test/cpp/schema_specific/inverse_attr3.cc +++ b/test/cpp/schema_specific/inverse_attr3.cc @@ -3,9 +3,9 @@ ** Test inverse attributes; uses a tiny schema similar to a subset of IFC2x3 ** */ -#include +#include extern void SchemaInit( class Registry & ); -#include "scl_version_string.h" +#include "sc_version_string.h" #include #include #include diff --git a/test/cpp/schema_specific/stepfile_rw_progress.cc b/test/cpp/schema_specific/stepfile_rw_progress.cc index 95c0daa5..03d5949d 100644 --- a/test/cpp/schema_specific/stepfile_rw_progress.cc +++ b/test/cpp/schema_specific/stepfile_rw_progress.cc @@ -1,5 +1,5 @@ -#include "scl_version_string.h" +#include "sc_version_string.h" #include #include #include diff --git a/test/cpp/stepcore/CMakeLists.txt b/test/cpp/stepcore/CMakeLists.txt index a5fba10b..ff8e8769 100644 --- a/test/cpp/stepcore/CMakeLists.txt +++ b/test/cpp/stepcore/CMakeLists.txt @@ -1,11 +1,11 @@ CMAKE_MINIMUM_REQUIRED(VERSION 2.8) #c++ tests for clstepcore -INCLUDE_DIRECTORIES( ${SCL_SOURCE_DIR}/src/cldai ${SCL_SOURCE_DIR}/src/cleditor ${SCL_SOURCE_DIR}/src/clutils - ${SCL_SOURCE_DIR}/src/clstepcore ${SCL_SOURCE_DIR}/src/base ) +INCLUDE_DIRECTORIES( ${SC_SOURCE_DIR}/src/cldai ${SC_SOURCE_DIR}/src/cleditor ${SC_SOURCE_DIR}/src/clutils + ${SC_SOURCE_DIR}/src/clstepcore ${SC_SOURCE_DIR}/src/base ) function(add_stepcore_test name libs) - SCL_ADDEXEC( tst_${name} test_${name}.cc "${libs}" "TESTABLE" ) + SC_ADDEXEC( tst_${name} test_${name}.cc "${libs}" "TESTABLE" ) add_test( NAME build_cpp_${name} WORKING_DIRECTORY ${CMAKE_BINARY_DIR} COMMAND ${CMAKE_COMMAND} --build . diff --git a/test/p21/CMakeLists.txt b/test/p21/CMakeLists.txt index 20953e9b..e2e1b939 100644 --- a/test/p21/CMakeLists.txt +++ b/test/p21/CMakeLists.txt @@ -5,7 +5,7 @@ CMAKE_MINIMUM_REQUIRED(VERSION 2.8) set( schema_name_tests_head " ISO-10303-21; HEADER; -FILE_DESCRIPTION(('SCL test file'),'2;1'); +FILE_DESCRIPTION(('SC test file'),'2;1'); FILE_NAME('test.stp','2011-11-29T',('mp'),(''),'0','1','2'); ") set( schema_name_tests_tail " @@ -54,7 +54,7 @@ set_tests_properties( test_mismatch_schema_name test_missing_and_required_strict #check for a segmentation fault with selects. the files are a subset of the 210e3 schema and of SurfaceMountFlasher.stp, respectively #p21read will report errors with the file, but they don't matter as long as there isn't a segfault. -BUILD_A_SCHEMA(${SCL_SOURCE_DIR}/test/misc/select_segfault_210e3.exp) +BUILD_A_SCHEMA(${SC_SOURCE_DIR}/test/misc/select_segfault_210e3.exp) add_test( test_select_segfault ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/p21read_sdai_select_segfault_210e3 ${CMAKE_CURRENT_SOURCE_DIR}/select_segfault_210e3.stp ) set_tests_properties( test_select_segfault PROPERTIES DEPENDS build_cpp_sdai_select_segfault_210e3 LABELS exchange_file WILL_FAIL TRUE )