Making "inline" behave like an attribute. Fixes #1
[arduino-ctags.git] / args.h
blob985a06cc4df4999872a381d6d43160338a4842e8
1 /*
2 * $Id: args.h 443 2006-05-30 04:37:13Z darren $
4 * Copyright (c) 1999-2002, Darren Hiebert
6 * This source code is released for free distribution under the terms of the
7 * GNU General Public License.
9 * Defines external interface to command line argument reading.
11 #ifndef _ARGS_H
12 #define _ARGS_H
15 * INCLUDE FILES
17 #include "general.h" /* must always come first */
19 #include <stdio.h>
22 * DATA DECLARATIONS
25 typedef enum { ARG_NONE, ARG_STRING, ARG_ARGV, ARG_FILE } argType;
27 typedef struct sArgs {
28 argType type;
29 union {
30 struct sStringArgs {
31 const char* string;
32 const char* next;
33 const char* item;
34 } stringArgs;
35 struct sArgvArgs {
36 char* const* argv;
37 char* const* item;
38 } argvArgs;
39 struct sFileArgs {
40 FILE* fp;
41 } fileArgs;
42 } u;
43 char* item;
44 boolean lineMode;
45 } Arguments;
48 * FUNCTION PROTOTYPES
50 extern Arguments* argNewFromString (const char* const string);
51 extern Arguments* argNewFromArgv (char* const* const argv);
52 extern Arguments* argNewFromFile (FILE* const fp);
53 extern Arguments* argNewFromLineFile (FILE* const fp);
54 extern char *argItem (const Arguments* const current);
55 extern boolean argOff (const Arguments* const current);
56 extern void argSetWordMode (Arguments* const current);
57 extern void argSetLineMode (Arguments* const current);
58 extern void argForth (Arguments* const current);
59 extern void argDelete (Arguments* const current);
61 #endif /* _ARGS_H */
63 /* vi:set tabstop=4 shiftwidth=4: */