/* Copyright 1997 Acorn Computers Ltd * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ /************************************************************************/ /* Copyright 1997 Acorn Computers Ltd */ /* */ /* This material is the confidential trade secret and proprietary */ /* information of Acorn Computers. It may not be reproduced, used */ /* sold, or transferred to any third party without the prior written */ /* consent of Acorn Computers. All rights reserved. */ /* */ /************************************************************************/ #ifndef __constants_h #define __constants_h #include "VersionNum" #define APP_VERSION Module_MajorVersion " (" Module_Date ") " Module_MinorVersion #define APP_DIR "" #define FILENAME_MESSAGES APP_DIR ".Messages" #define FILE_DEBUG APP_DIR ".debug" #define BUILD_FILE APP_DIR ".!build" #define CHOICES_DIR ".Builder" #define DEFAULTS_FILE CHOICES_DIR ".Defaults" #define BUILDS_FILE CHOICES_DIR ".Builds" #define ENV_DIR "Env" #define COMPONENTS_DIR "Components" #define BUILDSYS_DIR ".BuildSys" #define BUILD_ENV "Build" #define MODULEDB "ModuleDB" #define STRINGSET_LIMIT 128 /* Toolbox hard limit */ #ifdef DEBUG #define debugging 1 #else #define debugging 0 #endif #define debug if (debugging) #include "db.h" #ifndef TRUE #define TRUE 1 #endif #ifndef FALSE #define FALSE 0 #endif typedef struct build_list_s { char *name; struct build_list_s *next; } build_list_t; #define BUILD_NAME_SIZE 80 #define BUFFER_SIZE 2048 /* general purpose buffer */ #define ERR_RETURN(err,stmt) {err = (stmt); if (err != NULL) return err;} #define ERR_GOTO(err,stmt) {err = (stmt); if (err != NULL) \ goto exit_gracefully;} #define ERR_CHECK(err,stmt) {err = (stmt); if (err != NULL) \ wimp_report_error(err,0,0);} #define ERR_CHECK_RETURN(err,stmt) {err = (stmt); if (err != NULL){ \ wimp_report_error(err,0,0);return 0;}} #define ERR_CHECK_GOTO(err,stmt) {err = (stmt); if (err != NULL){ \ wimp_report_error(err,0,0);goto exit_gracefully;}} #define ERR_CHECK_ABORT(err,stmt) {err = (stmt); if (err != NULL){ \ wimp_report_error(err,0,0);exit(0);}} #define CHK_STR(x) (x==NULL?"(null)":x) #endif