source: trunk/daemon/getopts.h @ 6294

Last change on this file since 6294 was 6294, checked in by charles, 14 years ago

(daemon) allow wildcards to be used when adding torrents again, such as "transmission-remote -a ~/Desktop/*torrent"

File size: 2.2 KB
Line 
1/*
2 * Copyright (c) 2001-2004 Steve Mertz <steve@dragon-ware.com>
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are met:
7 *
8 * Redistributions of source code must retain the above copyright notice, this
9 * list of conditions and the following disclaimer.
10 *
11 * Redistributions in binary form must reproduce the above copyright notice,
12 * this list of conditions and the following disclaimer in the documentation
13 * and/or other materials provided with the distribution.
14 *
15 * Neither the name of Dragon Ware nor the names of its contributors may be
16 * used to endorse or promote products derived from this software without
17 * specific prior written permission.
18 *
19 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
20 * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
21 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
22 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS
23 * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
24 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
25 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
26 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
27 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
28 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
29 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
30 *
31*/
32#ifndef __GET_OPT_H__
33#define __GET_OPT_H__
34
35#ifdef __cplusplus
36extern "C"
37{
38#endif
39
40extern int option_index;
41
42struct options
43{
44  int number;           /* Number, which is returned from getopt() */
45  char *name;           /* Long name */
46  char *description;    /* Description */
47  char *shortName;      /* Short name */
48  int args;             /* Does the option take an argument? */
49  char *argName;        /* Argument name, for the `help' option */
50};
51
52int getopts(const char * summary, int argc, char **argv, struct options opts[], char **args);
53int getopts_usage(const char *progName, const char * summary, struct options opts[]);
54
55#ifdef __cplusplus
56}
57#endif
58
59#endif          /* __GET_OPT_H__ */
Note: See TracBrowser for help on using the repository browser.