OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [tags/] [or1ksim/] [or1ksim-0.4.0/] [argtable2/] [arg_rem.c] - Diff between revs 19 and 135

Go to most recent revision | Only display areas with differences | Details | Blame | View Log

Rev 19 Rev 135
/*********************************************************************
/*********************************************************************
This file is part of the argtable2 library.
This file is part of the argtable2 library.
Copyright (C) 1998-2001,2003-2008 Stewart Heitmann
Copyright (C) 1998-2001,2003-2008 Stewart Heitmann
sheitmann@users.sourceforge.net
sheitmann@users.sourceforge.net
 
 
The argtable2 library is free software; you can redistribute it and/or
The argtable2 library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public License as
modify it under the terms of the GNU Library General Public License as
published by the Free Software Foundation; either version 2 of the
published by the Free Software Foundation; either version 2 of the
License, or (at your option) any later version.
License, or (at your option) any later version.
 
 
This software is distributed in the hope that it will be useful,
This software is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
Library General Public License for more details.
Library General Public License for more details.
 
 
You should have received a copy of the GNU Library General Public
You should have received a copy of the GNU Library General Public
License along with this library; if not, write to the Free Software
License along with this library; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
USA.
USA.
**********************************************************************/
**********************************************************************/
 
 
/* config.h must be included before anything else */
/* config.h must be included before anything else */
#ifdef HAVE_CONFIG_H
#ifdef HAVE_CONFIG_H
#include "config.h"
#include "config.h"
#endif
#endif
 
 
/*#ifdef HAVE_STDLIB_H*/
/*#ifdef HAVE_STDLIB_H*/
#include <stdlib.h>
#include <stdlib.h>
/*#endif*/
/*#endif*/
 
 
#include "argtable2.h"
#include "argtable2.h"
 
 
struct arg_rem* arg_rem(const char *datatype,
struct arg_rem* arg_rem(const char *datatype,
                        const char *glossary)
                        const char *glossary)
    {
    {
    struct arg_rem *result = (struct arg_rem*)malloc(sizeof(struct arg_rem));
    struct arg_rem *result = (struct arg_rem*)malloc(sizeof(struct arg_rem));
    if (result)
    if (result)
        {
        {
        /* init the arg_hdr struct */
        /* init the arg_hdr struct */
        result->hdr.flag      = 0;
        result->hdr.flag      = 0;
        result->hdr.shortopts = NULL;
        result->hdr.shortopts = NULL;
        result->hdr.longopts  = NULL;
        result->hdr.longopts  = NULL;
        result->hdr.datatype  = datatype;
        result->hdr.datatype  = datatype;
        result->hdr.glossary  = glossary;
        result->hdr.glossary  = glossary;
        result->hdr.mincount  = 1;
        result->hdr.mincount  = 1;
        result->hdr.maxcount  = 1;
        result->hdr.maxcount  = 1;
        result->hdr.parent    = result;
        result->hdr.parent    = result;
        result->hdr.resetfn   = NULL;
        result->hdr.resetfn   = NULL;
        result->hdr.scanfn    = NULL;
        result->hdr.scanfn    = NULL;
        result->hdr.checkfn   = NULL;
        result->hdr.checkfn   = NULL;
        result->hdr.errorfn   = NULL;
        result->hdr.errorfn   = NULL;
        }
        }
    /*printf("arg_rem() returns %p\n",result);*/
    /*printf("arg_rem() returns %p\n",result);*/
    return result;
    return result;
    }
    }
 
 

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.