constants 2.84 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27
/* 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

28 29
#include "VersionNum"

30
#define APP_VERSION Module_MajorVersion " (" Module_ApplicationDate ") " Module_MinorVersion
31

Richard Buckley's avatar
Richard Buckley committed
32 33 34 35 36 37 38 39
#define APP_DIR		 	"<Builder$Dir>"
#define FILENAME_MESSAGES 	APP_DIR ".Messages"
#define FILE_DEBUG        	APP_DIR ".debug"
#define BUILD_FILE		APP_DIR ".!build"
#define CHOICES_DIR		"<Choices$Write>.Builder"
#define DEFAULTS_FILE		CHOICES_DIR ".Defaults"
#define BUILDS_FILE		CHOICES_DIR ".Builds"
#define ENV_DIR			"Env"
40
#define COMPONENTS_DIR		"Components"
Richard Buckley's avatar
Richard Buckley committed
41 42 43 44 45 46
#define BUILDSYS_DIR		"<Build$Dir>.BuildSys"
#define BUILD_ENV		"Build"
#define MODULEDB		"ModuleDB"

#define STRINGSET_LIMIT		128	/* Toolbox hard limit */

47 48 49 50 51 52 53 54

#ifndef TRUE
  #define TRUE  1
#endif
#ifndef FALSE
  #define FALSE 0
#endif

Richard Buckley's avatar
Richard Buckley committed
55 56 57 58
typedef struct build_list_s {
  char *name;
  struct build_list_s *next;
} build_list_t;
59

Richard Buckley's avatar
Richard Buckley committed
60 61
#define BUILD_NAME_SIZE	80
#define BUFFER_SIZE	2048 /* general purpose buffer */
62 63 64 65 66 67 68 69 70 71
#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;}}

Richard Buckley's avatar
Richard Buckley committed
72 73 74
#define ERR_CHECK_GOTO(err,stmt) {err = (stmt); if (err != NULL){ \
		        wimp_report_error(err,0,0);goto exit_gracefully;}}

75 76 77
#define ERR_CHECK_ABORT(err,stmt)  {err = (stmt); if (err != NULL){ \
				wimp_report_error(err,0,0);exit(0);}}

Richard Buckley's avatar
Richard Buckley committed
78 79
#define CHK_STR(x) (x==NULL?"(null)":x)

80
#endif