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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [or1ksim/] [argtable2/] [arg_rem.c] - Blame information for rev 855

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 19 jeremybenn
/*********************************************************************
2
This file is part of the argtable2 library.
3
Copyright (C) 1998-2001,2003-2008 Stewart Heitmann
4
sheitmann@users.sourceforge.net
5
 
6
The argtable2 library is free software; you can redistribute it and/or
7
modify it under the terms of the GNU Library General Public License as
8
published by the Free Software Foundation; either version 2 of the
9
License, or (at your option) any later version.
10
 
11
This software is distributed in the hope that it will be useful,
12
but WITHOUT ANY WARRANTY; without even the implied warranty of
13
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
14
Library General Public License for more details.
15
 
16
You should have received a copy of the GNU Library General Public
17
License along with this library; if not, write to the Free Software
18
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
19
USA.
20
**********************************************************************/
21
 
22
/* config.h must be included before anything else */
23
#ifdef HAVE_CONFIG_H
24
#include "config.h"
25
#endif
26
 
27
/*#ifdef HAVE_STDLIB_H*/
28
#include <stdlib.h>
29
/*#endif*/
30
 
31
#include "argtable2.h"
32
 
33
struct arg_rem* arg_rem(const char *datatype,
34
                        const char *glossary)
35
    {
36
    struct arg_rem *result = (struct arg_rem*)malloc(sizeof(struct arg_rem));
37
    if (result)
38
        {
39
        /* init the arg_hdr struct */
40
        result->hdr.flag      = 0;
41
        result->hdr.shortopts = NULL;
42
        result->hdr.longopts  = NULL;
43
        result->hdr.datatype  = datatype;
44
        result->hdr.glossary  = glossary;
45
        result->hdr.mincount  = 1;
46
        result->hdr.maxcount  = 1;
47
        result->hdr.parent    = result;
48
        result->hdr.resetfn   = NULL;
49
        result->hdr.scanfn    = NULL;
50
        result->hdr.checkfn   = NULL;
51
        result->hdr.errorfn   = NULL;
52
        }
53
    /*printf("arg_rem() returns %p\n",result);*/
54
    return result;
55
    }

powered by: WebSVN 2.1.0

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