projects
/
pspp
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
PCOMPUTE works
[pspp]
/
src
/
libpspp
/
argv-parser.c
diff --git
a/src/libpspp/argv-parser.c
b/src/libpspp/argv-parser.c
index dfa86fad5b70d201671f6f5dcbf8192e12e6a722..48c89cd6d44e93f6bb69f99a41bd6a98024c54af 100644
(file)
--- a/
src/libpspp/argv-parser.c
+++ b/
src/libpspp/argv-parser.c
@@
-1,5
+1,5
@@
/* PSPP - a program for statistical analysis.
/* PSPP - a program for statistical analysis.
- Copyright (C) 2009, 2010 Free Software Foundation, Inc.
+ Copyright (C) 2009, 2010
, 2011
Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@
-16,14
+16,14
@@
#include <config.h>
#include <config.h>
-#include
<libpspp/argv-parser.h>
+#include
"libpspp/argv-parser.h"
#include <limits.h>
#include <limits.h>
-#include
<libpspp/assertion.h>
-#include
<libpspp/str.h>
+#include
"libpspp/assertion.h"
+#include
"libpspp/str.h"
-#include "xalloc.h"
+#include "
gl/
xalloc.h"
struct argv_option_plus
{
struct argv_option_plus
{
@@
-43,7
+43,7
@@
struct argv_parser
struct argv_parser *
argv_parser_create (void)
{
struct argv_parser *
argv_parser_create (void)
{
- struct argv_parser *ap =
xzalloc (sizeof *ap
);
+ struct argv_parser *ap =
XZALLOC (struct argv_parser
);
return ap;
}
return ap;
}
@@
-162,7
+162,7
@@
argv_parser_run (struct argv_parser *ap, int argc, char **argv)
retval = false;
break;
}
retval = false;
break;
}
- else if (c >= LONGOPT_VAL_BASE && c < LONGOPT_VAL_BASE + n_longopts)
+ else if (c >= LONGOPT_VAL_BASE && c < LONGOPT_VAL_BASE + n_longopts
+ 1
)
{
struct argv_option_plus *aop = &ap->options[c - LONGOPT_VAL_BASE];
aop->cb (aop->base.id, aop->aux);
{
struct argv_option_plus *aop = &ap->options[c - LONGOPT_VAL_BASE];
aop->cb (aop->base.id, aop->aux);