diff options
| author | Richard Brooksby | 2013-05-09 13:01:16 +0100 |
|---|---|---|
| committer | Richard Brooksby | 2013-05-09 13:01:16 +0100 |
| commit | dfd71567402ff5dc6f85bbe1dc080ff55cb4dcc8 (patch) | |
| tree | e7bc31dafe26b12d86a1b4b37349dfdbccf25d8a /mps | |
| parent | 60ae2d01bef98a16fd249d63c9045ca311980524 (diff) | |
| download | emacs-dfd71567402ff5dc6f85bbe1dc080ff55cb4dcc8.tar.gz emacs-dfd71567402ff5dc6f85bbe1dc080ff55cb4dcc8.zip | |
Tidying up arg.c and arg.h.
Copied from Perforce
Change: 181665
ServerID: perforce.ravenbrook.com
Diffstat (limited to 'mps')
| -rw-r--r-- | mps/code/arg.c | 11 | ||||
| -rw-r--r-- | mps/code/arg.h | 11 |
2 files changed, 14 insertions, 8 deletions
diff --git a/mps/code/arg.c b/mps/code/arg.c index edb25ebd8c0..4d2447e5c00 100644 --- a/mps/code/arg.c +++ b/mps/code/arg.c | |||
| @@ -42,12 +42,12 @@ Bool ArgCheckChain(Arg arg) { | |||
| 42 | } | 42 | } |
| 43 | 43 | ||
| 44 | Bool ArgCheckSize(Arg arg) { | 44 | Bool ArgCheckSize(Arg arg) { |
| 45 | UNUSED(arg); | 45 | UNUSED(arg); /* TODO: Add and call SizeCheck */ |
| 46 | return TRUE; | 46 | return TRUE; |
| 47 | } | 47 | } |
| 48 | 48 | ||
| 49 | Bool ArgCheckAddr(Arg arg) { | 49 | Bool ArgCheckAddr(Arg arg) { |
| 50 | UNUSED(arg); | 50 | UNUSED(arg); /* TODO: Add and call AddrCheck */ |
| 51 | return TRUE; | 51 | return TRUE; |
| 52 | } | 52 | } |
| 53 | 53 | ||
| @@ -72,7 +72,7 @@ Bool ArgCheckBool(Arg arg) { | |||
| 72 | } | 72 | } |
| 73 | 73 | ||
| 74 | Bool ArgCheckCount(Arg arg) { | 74 | Bool ArgCheckCount(Arg arg) { |
| 75 | UNUSED(arg); | 75 | UNUSED(arg); /* TODO: Add and call CountCheck */ |
| 76 | return TRUE; | 76 | return TRUE; |
| 77 | } | 77 | } |
| 78 | 78 | ||
| @@ -116,6 +116,8 @@ Bool ArgListCheck(ArgList args) | |||
| 116 | } | 116 | } |
| 117 | 117 | ||
| 118 | 118 | ||
| 119 | /* ArgPick -- try to pick an argument out of the argument list by keyword */ | ||
| 120 | |||
| 119 | Bool ArgPick(ArgStruct *argOut, ArgList args, Key key) { | 121 | Bool ArgPick(ArgStruct *argOut, ArgList args, Key key) { |
| 120 | Index i; | 122 | Index i; |
| 121 | 123 | ||
| @@ -136,14 +138,13 @@ found: | |||
| 136 | break; | 138 | break; |
| 137 | ++i; | 139 | ++i; |
| 138 | } | 140 | } |
| 139 | |||
| 140 | return TRUE; | 141 | return TRUE; |
| 141 | } | 142 | } |
| 142 | 143 | ||
| 143 | 144 | ||
| 144 | /* C. COPYRIGHT AND LICENSE | 145 | /* C. COPYRIGHT AND LICENSE |
| 145 | * | 146 | * |
| 146 | * Copyright (C) 2001-2002 Ravenbrook Limited <http://www.ravenbrook.com/>. | 147 | * Copyright (C) 2001-2013 Ravenbrook Limited <http://www.ravenbrook.com/>. |
| 147 | * All rights reserved. This is an open source license. Contact | 148 | * All rights reserved. This is an open source license. Contact |
| 148 | * Ravenbrook for commercial licensing options. | 149 | * Ravenbrook for commercial licensing options. |
| 149 | * | 150 | * |
diff --git a/mps/code/arg.h b/mps/code/arg.h index 2a1385a8dfb..f50107b593f 100644 --- a/mps/code/arg.h +++ b/mps/code/arg.h | |||
| @@ -11,9 +11,14 @@ | |||
| 11 | 11 | ||
| 12 | #include "mpmtypes.h" | 12 | #include "mpmtypes.h" |
| 13 | 13 | ||
| 14 | /* KeyStruct -- keyword argument structure */ | ||
| 15 | 14 | ||
| 16 | /* FIXME: Whether to have a check field should be conditional on variety */ | 15 | /* KeyStruct -- keyword argument structure |
| 16 | * | ||
| 17 | * NOTE: Whether or not to have an argument checking field and functions | ||
| 18 | * could be conditional on build variety. Checking arguments isn't on | ||
| 19 | * the critical path, but this might save space if the MPS is being | ||
| 20 | * deployed in a tight memory situation. | ||
| 21 | */ | ||
| 17 | 22 | ||
| 18 | #define KeySig ((Sig)0x519CE111) /* SIGnature KEYyy */ | 23 | #define KeySig ((Sig)0x519CE111) /* SIGnature KEYyy */ |
| 19 | typedef struct mps_key_s { | 24 | typedef struct mps_key_s { |
| @@ -49,7 +54,7 @@ extern Bool ArgCheckCount(Arg arg); | |||
| 49 | 54 | ||
| 50 | /* C. COPYRIGHT AND LICENSE | 55 | /* C. COPYRIGHT AND LICENSE |
| 51 | * | 56 | * |
| 52 | * Copyright (C) 2001-2002 Ravenbrook Limited <http://www.ravenbrook.com/>. | 57 | * Copyright (C) 2001-2013 Ravenbrook Limited <http://www.ravenbrook.com/>. |
| 53 | * All rights reserved. This is an open source license. Contact | 58 | * All rights reserved. This is an open source license. Contact |
| 54 | * Ravenbrook for commercial licensing options. | 59 | * Ravenbrook for commercial licensing options. |
| 55 | * | 60 | * |