Update NEWS with the latest changes
[geany-mirror.git] / ctags / main / args.h
blob8c56ceabfe2e6e2fd0c75e2e99a74e510a3df4d0
1 /*
2 * Copyright (c) 1999-2002, Darren Hiebert
4 * This source code is released for free distribution under the terms of the
5 * GNU General Public License version 2 or (at your option) any later version.
7 * Defines external interface to command line argument reading.
8 */
9 #ifndef CTAGS_MAIN_ARGS_H
10 #define CTAGS_MAIN_ARGS_H
13 * INCLUDE FILES
15 #include "general.h" /* must always come first */
17 #include <stdio.h>
20 * DATA DECLARATIONS
23 typedef struct sArgs {
24 enum { ARG_NONE, ARG_STRING, ARG_ARGV, ARG_FILE } type;
25 union {
26 struct sStringArgs {
27 const char* string;
28 const char* next;
29 const char* item;
30 } stringArgs;
31 struct sArgvArgs {
32 char* const* argv;
33 char* const* item;
34 } argvArgs;
35 struct sFileArgs {
36 FILE* fp;
37 } fileArgs;
38 } u;
39 char* item;
40 bool lineMode;
41 } Arguments;
44 * FUNCTION PROTOTYPES
46 extern Arguments* argNewFromString (const char* const string);
47 extern Arguments* argNewFromArgv (char* const* const argv);
48 extern Arguments* argNewFromFile (FILE* const fp);
49 extern Arguments* argNewFromLineFile (FILE* const fp);
50 extern char *argItem (const Arguments* const current);
51 extern bool argOff (const Arguments* const current);
52 extern void argSetWordMode (Arguments* const current);
53 extern void argSetLineMode (Arguments* const current);
54 extern void argForth (Arguments* const current);
55 extern void argDelete (Arguments* const current);
57 #endif /* CTAGS_MAIN_ARGS_H */