diff options
| author | Richard Brooksby | 2013-05-08 23:09:35 +0100 |
|---|---|---|
| committer | Richard Brooksby | 2013-05-08 23:09:35 +0100 |
| commit | 13095f52bf3600de800fd7b380e2ec4b35a11a77 (patch) | |
| tree | 9992ba04a9a9a61075bbf36bf0a2de27ea330e79 /mps/code | |
| parent | d512863efb817f0d46468f0449ecceb4d9554adf (diff) | |
| download | emacs-13095f52bf3600de800fd7b380e2ec4b35a11a77.tar.gz emacs-13095f52bf3600de800fd7b380e2ec4b35a11a77.zip | |
Moving keyword argument declarations to their own header, since they're largely separable from the mps.
Copied from Perforce
Change: 181646
ServerID: perforce.ravenbrook.com
Diffstat (limited to 'mps/code')
| -rw-r--r-- | mps/code/arg.h | 65 | ||||
| -rw-r--r-- | mps/code/mpm.h | 13 | ||||
| -rw-r--r-- | mps/code/mps.xcodeproj/project.pbxproj | 2 |
3 files changed, 68 insertions, 12 deletions
diff --git a/mps/code/arg.h b/mps/code/arg.h new file mode 100644 index 00000000000..ec1bcb77edf --- /dev/null +++ b/mps/code/arg.h | |||
| @@ -0,0 +1,65 @@ | |||
| 1 | /* arg.h: Keyword argument lists | ||
| 2 | * | ||
| 3 | * $Id$ | ||
| 4 | * Copyright (c) 2013 Ravenbrook Limited. See end of file for license. | ||
| 5 | * | ||
| 6 | * .source: FIXME: Write up design from email discussion. | ||
| 7 | */ | ||
| 8 | |||
| 9 | #ifndef arg_h | ||
| 10 | #define arg_h | ||
| 11 | |||
| 12 | #include "mpmtypes.h" | ||
| 13 | |||
| 14 | #define argsNone mps_args_none | ||
| 15 | extern Bool KeyCheck(Key key); | ||
| 16 | extern Bool ArgCheck(Arg arg); | ||
| 17 | extern Bool ArgListCheck(ArgList args); | ||
| 18 | extern Bool ArgPick(ArgStruct *argOut, ArgList args, Key key); | ||
| 19 | extern Bool ArgCheckCant(Arg arg); | ||
| 20 | extern Bool ArgCheckFormat(Arg arg); | ||
| 21 | extern Bool ArgCheckChain(Arg arg); | ||
| 22 | |||
| 23 | #endif /* arg_h */ | ||
| 24 | |||
| 25 | |||
| 26 | /* C. COPYRIGHT AND LICENSE | ||
| 27 | * | ||
| 28 | * Copyright (C) 2001-2002 Ravenbrook Limited <http://www.ravenbrook.com/>. | ||
| 29 | * All rights reserved. This is an open source license. Contact | ||
| 30 | * Ravenbrook for commercial licensing options. | ||
| 31 | * | ||
| 32 | * Redistribution and use in source and binary forms, with or without | ||
| 33 | * modification, are permitted provided that the following conditions are | ||
| 34 | * met: | ||
| 35 | * | ||
| 36 | * 1. Redistributions of source code must retain the above copyright | ||
| 37 | * notice, this list of conditions and the following disclaimer. | ||
| 38 | * | ||
| 39 | * 2. Redistributions in binary form must reproduce the above copyright | ||
| 40 | * notice, this list of conditions and the following disclaimer in the | ||
| 41 | * documentation and/or other materials provided with the distribution. | ||
| 42 | * | ||
| 43 | * 3. Redistributions in any form must be accompanied by information on how | ||
| 44 | * to obtain complete source code for this software and any accompanying | ||
| 45 | * software that uses this software. The source code must either be | ||
| 46 | * included in the distribution or be available for no more than the cost | ||
| 47 | * of distribution plus a nominal fee, and must be freely redistributable | ||
| 48 | * under reasonable conditions. For an executable file, complete source | ||
| 49 | * code means the source code for all modules it contains. It does not | ||
| 50 | * include source code for modules or files that typically accompany the | ||
| 51 | * major components of the operating system on which the executable file | ||
| 52 | * runs. | ||
| 53 | * | ||
| 54 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS | ||
| 55 | * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED | ||
| 56 | * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR | ||
| 57 | * PURPOSE, OR NON-INFRINGEMENT, ARE DISCLAIMED. IN NO EVENT SHALL THE | ||
| 58 | * COPYRIGHT HOLDERS AND CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, | ||
| 59 | * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT | ||
| 60 | * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF | ||
| 61 | * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON | ||
| 62 | * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | ||
| 63 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF | ||
| 64 | * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||
| 65 | */ | ||
diff --git a/mps/code/mpm.h b/mps/code/mpm.h index 5346078c214..580dd255e9c 100644 --- a/mps/code/mpm.h +++ b/mps/code/mpm.h | |||
| @@ -22,6 +22,7 @@ | |||
| 22 | #include "mpslib.h" | 22 | #include "mpslib.h" |
| 23 | #include "ring.h" | 23 | #include "ring.h" |
| 24 | #include "tract.h" /* only for certain Seg macros */ | 24 | #include "tract.h" /* only for certain Seg macros */ |
| 25 | #include "arg.h" | ||
| 25 | #include "mpmtypes.h" | 26 | #include "mpmtypes.h" |
| 26 | #include "mpmst.h" | 27 | #include "mpmst.h" |
| 27 | 28 | ||
| @@ -130,18 +131,6 @@ extern int (AddrComp)(Addr a, Addr b, Size size); | |||
| 130 | extern Bool ResIsAllocFailure(Res res); | 131 | extern Bool ResIsAllocFailure(Res res); |
| 131 | 132 | ||
| 132 | 133 | ||
| 133 | /* Argument Lists */ | ||
| 134 | |||
| 135 | #define argsNone mps_args_none | ||
| 136 | extern Bool KeyCheck(Key key); | ||
| 137 | extern Bool ArgCheck(Arg arg); | ||
| 138 | extern Bool ArgListCheck(ArgList args); | ||
| 139 | extern Bool ArgPick(ArgStruct *argOut, ArgList args, Key key); | ||
| 140 | extern Bool ArgCheckCant(Arg arg); | ||
| 141 | extern Bool ArgCheckFormat(Arg arg); | ||
| 142 | extern Bool ArgCheckChain(Arg arg); | ||
| 143 | |||
| 144 | |||
| 145 | /* Logs and Powers | 134 | /* Logs and Powers |
| 146 | * | 135 | * |
| 147 | * SizeIsP2 returns TRUE if and only if size is a non-negative integer | 136 | * SizeIsP2 returns TRUE if and only if size is a non-negative integer |
diff --git a/mps/code/mps.xcodeproj/project.pbxproj b/mps/code/mps.xcodeproj/project.pbxproj index 8a47451f8a7..d7afec6d192 100644 --- a/mps/code/mps.xcodeproj/project.pbxproj +++ b/mps/code/mps.xcodeproj/project.pbxproj | |||
| @@ -1007,6 +1007,7 @@ | |||
| 1007 | 3104B022156D39D4000A585A /* amssshe */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = amssshe; sourceTree = BUILT_PRODUCTS_DIR; }; | 1007 | 3104B022156D39D4000A585A /* amssshe */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = amssshe; sourceTree = BUILT_PRODUCTS_DIR; }; |
| 1008 | 3104B02F156D39F2000A585A /* amssshe.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = amssshe.c; sourceTree = "<group>"; }; | 1008 | 3104B02F156D39F2000A585A /* amssshe.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = amssshe.c; sourceTree = "<group>"; }; |
| 1009 | 3104B03D156D3AD7000A585A /* segsmss */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = segsmss; sourceTree = BUILT_PRODUCTS_DIR; }; | 1009 | 3104B03D156D3AD7000A585A /* segsmss */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = segsmss; sourceTree = BUILT_PRODUCTS_DIR; }; |
| 1010 | 3107DC4E173B03D100F705C8 /* arg.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = arg.h; sourceTree = "<group>"; }; | ||
| 1010 | 3114A590156E913C001E0AA3 /* locv */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = locv; sourceTree = BUILT_PRODUCTS_DIR; }; | 1011 | 3114A590156E913C001E0AA3 /* locv */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = locv; sourceTree = BUILT_PRODUCTS_DIR; }; |
| 1011 | 3114A5A1156E9168001E0AA3 /* locv.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = locv.c; sourceTree = "<group>"; }; | 1012 | 3114A5A1156E9168001E0AA3 /* locv.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = locv.c; sourceTree = "<group>"; }; |
| 1012 | 3114A5A7156E92C0001E0AA3 /* qs */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = qs; sourceTree = BUILT_PRODUCTS_DIR; }; | 1013 | 3114A5A7156E92C0001E0AA3 /* qs */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = qs; sourceTree = BUILT_PRODUCTS_DIR; }; |
| @@ -1704,6 +1705,7 @@ | |||
| 1704 | 311F2F7A17398B8E00C15B6A /* tract.h */, | 1705 | 311F2F7A17398B8E00C15B6A /* tract.h */, |
| 1705 | 31EEAC44156AB32500714D05 /* version.c */, | 1706 | 31EEAC44156AB32500714D05 /* version.c */, |
| 1706 | 31EEAC0E156AB27B00714D05 /* walk.c */, | 1707 | 31EEAC0E156AB27B00714D05 /* walk.c */, |
| 1708 | 3107DC4E173B03D100F705C8 /* arg.h */, | ||
| 1707 | ); | 1709 | ); |
| 1708 | name = "MPM Core"; | 1710 | name = "MPM Core"; |
| 1709 | sourceTree = "<group>"; | 1711 | sourceTree = "<group>"; |