1 /******************************************************************************
2   Copyright (c) 1992, 1995, 1996 Xerox Corporation.  All rights reserved.
3   Portions of this code were written by Stephen White, aka ghond.
4   Use and copying of this software and preparation of derivative works based
5   upon this software are permitted.  Any distribution of this software or
6   derivative works must comply with all applicable United States export
7   control laws.  This software is made available AS IS, and Xerox Corporation
8   makes no warranty about the software, its performance or its conformity to
9   any specification.  Any person obtaining a copy of this software is requested
10   to send their name and post office or electronic mail address to:
11     Pavel Curtis
12     Xerox PARC
13     3333 Coyote Hill Rd.
14     Palo Alto, CA 94304
15     Pavel@Xerox.Com
16  *****************************************************************************/
17 
18 #ifndef Version_H
19 #define Version_H 1
20 
21 #include "config.h"
22 
23 extern const char *server_version;
24 
25 /* The following list must never be reordered, only appended to.  There is one
26  * element per version of the database format (including incompatible changes
27  * to the language, such as the addition of new keywords).  The integer value
28  * of each element is used in the DB header on disk to identify the format
29  * version in use in that file.
30  */
31 typedef enum {
32     DBV_Prehistory,		/* Before format versions */
33     DBV_Exceptions,		/* Addition of the `try', `except', `finally',
34 				 * and `endtry' keywords.
35 				 */
36     DBV_BreakCont,		/* Addition of the `break' and `continue'
37 				 * keywords.
38 				 */
39     DBV_Float,			/* Addition of `FLOAT' and `INT' variables and
40 				 * the `E_FLOAT' keyword, along with version
41 				 * numbers on each frame of a suspended task.
42 				 */
43     DBV_BFBugFixed,		/* Bug in built-in function overrides fixed by
44 				 * making it use tail-calling.  This DB_Version
45 				 * change exists solely to turn off special
46 				 * bug handling in read_bi_func_data().
47 				 */
48     Num_DB_Versions		/* Special: the current version is this - 1. */
49 } DB_Version;
50 
51 #define current_version	((DB_Version) (Num_DB_Versions - 1))
52 
53 extern int check_version(DB_Version);
54 				/* Returns true iff given version is within the
55 				 * known range.
56 				 */
57 
58 #endif				/* !Version_H */
59 
60 /*
61  * $Log: version.h,v $
62  * Revision 1.3  1998/12/14 13:19:19  nop
63  * Merge UNSAFE_OPTS (ref fixups); fix Log tag placement to fit CVS whims
64  *
65  * Revision 1.2  1997/03/03 04:19:39  nop
66  * GNU Indent normalization
67  *
68  * Revision 1.1.1.1  1997/03/03 03:45:04  nop
69  * LambdaMOO 1.8.0p5
70  *
71  * Revision 2.3  1996/04/19  01:25:21  pavel
72  * Added somewhat bogus DBV_BFBugFixed version.  Release 1.8.0p4.
73  *
74  * Revision 2.2  1996/02/08  06:07:10  pavel
75  * Added DBV_BreakCont and DBV_Float versions, check_version().  Moved
76  * db_in_version to db_io.h and renamed db_out_version to current_version.
77  * Updated copyright notice for 1996.  Release 1.8.0beta1.
78  *
79  * Revision 2.1  1995/12/28  00:48:42  pavel
80  * Fixed list of new keywords in comment to remove transient `raise' keyword.
81  * Release 1.8.0alpha3.
82  *
83  * Revision 2.0  1995/11/30  04:56:42  pavel
84  * New baseline version, corresponding to release 1.8.0alpha1.
85  *
86  * Revision 1.3  1992/10/23  23:03:47  pavel
87  * Added copyright notice.
88  *
89  * Revision 1.2  1992/10/21  03:02:35  pavel
90  * Converted to use new automatic configuration system.
91  *
92  * Revision 1.1  1992/07/20  23:23:12  pavel
93  * Initial RCS-controlled version.
94  */
95