/*
* Copyright (c) 2011-2013 Michael Pippig
*
* This file is part of PFFT.
*
* PFFT is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* PFFT is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with PFFT. If not, see .
*
*/
#include /* strtol, strtof, ... */
#include /* ptrdiff_t */
#include
#include
#include
static int read_one_arg(
char **argv, int argNum, unsigned type,
void *parameter);
static int count_given_args(
char **argv);
static int enough_args_given(
char **argv, int neededArgs);
static int strings_match(
const char *str1, const char *str2);
void PX(get_args)(
int argc, char **argv, const char *name, int neededArgs, unsigned type,
void *parameter
)
{
int err=0;
for(int iter=0; iter= neededArgs;
}
static int strings_match(
const char *str1, const char *str2
)
{
return !strcmp(str1, str2);
}