/* 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
#include <config.h>
-#include <libpspp/argv-parser.h>
+#include "libpspp/argv-parser.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_parser *
argv_parser_create (void)
{
- struct argv_parser *ap = xzalloc (sizeof *ap);
+ struct argv_parser *ap = XZALLOC (struct argv_parser);
return ap;
}
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);