aboutsummaryrefslogtreecommitdiffhomepage
path: root/builtin.cpp
diff options
context:
space:
mode:
authorGravatar ridiculousfish <corydoras@ridiculousfish.com>2013-04-13 01:32:07 -0700
committerGravatar ridiculousfish <corydoras@ridiculousfish.com>2013-04-13 02:00:31 -0700
commitc37c7cee0544a801f1031d725bdd1b743f341a57 (patch)
tree50d83d9bef4d3a3aaab211e2bad81e45f738c028 /builtin.cpp
parent46579f3799f2e99e01b82e13af21f9251cc58a60 (diff)
Reduce compiled code size a bit
Diffstat (limited to 'builtin.cpp')
-rw-r--r--builtin.cpp57
1 files changed, 12 insertions, 45 deletions
diff --git a/builtin.cpp b/builtin.cpp
index c7088045..6b0fb321 100644
--- a/builtin.cpp
+++ b/builtin.cpp
@@ -1743,7 +1743,6 @@ static int builtin_function(parser_t &parser, wchar_t **argv)
int res=STATUS_BUILTIN_OK;
wchar_t *desc=0;
std::vector<event_t> events;
-
std::auto_ptr<wcstring_list_t> named_arguments(NULL);
wchar_t *name = 0;
@@ -1754,50 +1753,19 @@ static int builtin_function(parser_t &parser, wchar_t **argv)
function_def_block_t * const fdb = new function_def_block_t();
parser.push_block(fdb);
- static const struct woption
- long_options[] =
+ const struct woption long_options[] =
{
- {
- L"description", required_argument, 0, 'd'
- }
- ,
- {
- L"on-signal", required_argument, 0, 's'
- }
- ,
- {
- L"on-job-exit", required_argument, 0, 'j'
- }
- ,
- {
- L"on-process-exit", required_argument, 0, 'p'
- }
- ,
- {
- L"on-variable", required_argument, 0, 'v'
- }
- ,
- {
- L"on-event", required_argument, 0, 'e'
- }
- ,
- {
- L"help", no_argument, 0, 'h'
- }
- ,
- {
- L"argument-names", no_argument, 0, 'a'
- }
- ,
- {
- L"no-scope-shadowing", no_argument, 0, 'S'
- }
- ,
- {
- 0, 0, 0, 0
- }
- }
- ;
+ { L"description", required_argument, 0, 'd' },
+ { L"on-signal", required_argument, 0, 's' },
+ { L"on-job-exit", required_argument, 0, 'j' },
+ { L"on-process-exit", required_argument, 0, 'p' },
+ { L"on-variable", required_argument, 0, 'v' },
+ { L"on-event", required_argument, 0, 'e' },
+ { L"help", no_argument, 0, 'h' },
+ { L"argument-names", no_argument, 0, 'a' },
+ { L"no-scope-shadowing", no_argument, 0, 'S' },
+ { 0, 0, 0, 0 }
+ };
while (1 && (!res))
{
@@ -2081,7 +2049,6 @@ static int builtin_function(parser_t &parser, wchar_t **argv)
parser.current_block->skip = 1;
return STATUS_BUILTIN_OK;
-
}
/**