/* ------------------------------------------------------------------------- */
/* Header file for Inform: Z-machine ("Infocom" format) compiler */
/* */
-/* Copyright (c) Graham Nelson 1993 - 2020 */
+/* Inform 6.35 */
+/* */
+/* This header file and the others making up the Inform source code are */
+/* copyright (c) Graham Nelson 1993 - 2021 */
/* */
/* This file is part of Inform. */
/* */
/* You should have received a copy of the GNU General Public License */
/* along with Inform. If not, see https://gnu.org/licenses/ */
/* */
+/* For detailed documentation on how this program internally works, and */
+/* how to port it to a new environment, see the Technical Manual. */
+/* */
/* *** To compile this program in one of the existing ports, you must */
/* at least change the machine definition (on the next page). */
/* In most cases no other work will be needed. *** */
/* */
/* ------------------------------------------------------------------------- */
-#define RELEASE_NUMBER 1634
+/* For releases, set to the release date in the form "1st January 2000" */
+#define RELEASE_DATE "in development"
+#define RELEASE_NUMBER 1635
#define GLULX_RELEASE_NUMBER 38
#define MODULE_VERSION_NUMBER 1
#define VNUMBER RELEASE_NUMBER
#define Transcript_File "gametext"
#endif
#endif
+
#ifndef Debugging_File
#ifdef FILE_EXTENSIONS
#define Debugging_File "gameinfo.dbg"
#endif
#endif
+#ifndef Default_Language
+#define Default_Language "english"
+#endif
+
#ifdef FILE_EXTENSIONS
#ifndef Source_Extension
#define Source_Extension ".inf"
how far back from the label to go
to find the opmode byte to modify. */
+/* ------------------------------------------------------------------------- */
+/* "String contexts"; the purpose for a given string. This info gets */
+/* written to the transcript file (gametext.txt). */
+/* ------------------------------------------------------------------------- */
+
+#define STRCTX_INFO 0 /* comment; not stored in game file */
+#define STRCTX_GAME 1 /* strings area */
+#define STRCTX_GAMEOPC 2 /* inline text in opcode (Z-code only) */
+#define STRCTX_VENEER 3 /* strings area, from veneer code */
+#define STRCTX_VENEEROPC 4 /* inline text, veneer code (Z-code only) */
+#define STRCTX_LOWSTRING 5 /* lowmem (Z-code); also dynamic-str literals */
+#define STRCTX_ABBREV 6 /* abbreviation */
+#define STRCTX_DICT 7 /* dictionary word */
+#define STRCTX_OBJNAME 8 /* object "hardware name" */
+#define STRCTX_SYMBOL 9 /* prop/attr/etc names */
+#define STRCTX_INFIX 10 /* text printed in asterisk traces */
+
/* ========================================================================= */
/* Initialisation extern definitions */
/* */
extern void error_numbered(char *s1, int val);
extern void error_named_at(char *s1, char *s2, brief_location report_line);
extern void ebf_error(char *s1, char *s2);
+extern void ebf_symbol_error(char *s1, char *name, char *type, brief_location report_line);
extern void char_error(char *s, int ch);
extern void unicode_char_error(char *s, int32 uni);
extern void no_such_label(char *lname);
extern void remove_temp_files(void);
extern void open_transcript_file(char *what_of);
-extern void write_to_transcript_file(char *text);
+extern void write_to_transcript_file(char *text, int linetype);
extern void close_transcript_file(void);
extern void abort_transcript_file(void);
MAX_EXPRESSION_NODES, MAX_LABELS, MAX_LINESPACE,
MAX_LOW_STRINGS, MAX_CLASSES, MAX_VERBS,
MAX_VERBSPACE, MAX_ARRAYS, MAX_INCLUSION_DEPTH,
- MAX_SOURCE_FILES;
+ MAX_SOURCE_FILES, MAX_DYNAMIC_STRINGS;
extern int32 MAX_STATIC_STRINGS, MAX_ZCODE_SIZE, MAX_LINK_DATA_SIZE,
MAX_TRANSCRIPT_SIZE, MAX_INDIV_PROP_TABLE_SIZE,
extern int ZCODE_HEADER_EXT_WORDS, ZCODE_HEADER_FLAGS_3;
extern int NUM_ATTR_BYTES, GLULX_OBJECT_EXT_BYTES;
extern int WARN_UNUSED_ROUTINES, OMIT_UNUSED_ROUTINES;
+extern int TRANSCRIPT_FORMAT;
/* These macros define offsets that depend on the value of NUM_ATTR_BYTES.
(Meaningful only for Glulx.) */
extern void assign_marked_symbol(int index, int marker, int32 value, int type);
extern void assign_symbol(int index, int32 value, int type);
extern void issue_unused_warnings(void);
+extern void add_config_symbol_definition(char *symbol, int32 value);
extern void add_symbol_replacement_mapping(int original, int renamed);
extern int find_symbol_replacement(int *value);
extern void df_note_function_start(char *name, uint32 address,
extern int32 no_strings, no_dynamic_strings;
extern int no_unicode_chars;
-#define MAX_DYNAMIC_STRINGS (64)
-
typedef struct unicode_usage_s unicode_usage_t;
struct unicode_usage_s {
int32 ch;
/* end of the Glulx string compression stuff */
extern void ao_free_arrays(void);
-extern int32 compile_string(char *b, int in_low_memory, int is_abbrev);
-extern uchar *translate_text(uchar *p, uchar *p_limit, char *s_text);
+extern int32 compile_string(char *b, int strctx);
+extern uchar *translate_text(uchar *p, uchar *p_limit, char *s_text, int strctx);
extern void optimise_abbreviations(void);
extern void make_abbreviation(char *text);
extern void show_dictionary(void);