1 // Emacs style mode select   -*- C++ -*-
2 //-----------------------------------------------------------------------------
3 //
4 // $Id: m_argv.h 1368 2017-11-01 01:17:48Z wesleyjohnson $
5 //
6 // Copyright (C) 1993-1996 by id Software, Inc.
7 // Portions Copyright (C) 1998-2000 by DooM Legacy Team.
8 //
9 // This program is free software; you can redistribute it and/or
10 // modify it under the terms of the GNU General Public License
11 // as published by the Free Software Foundation; either version 2
12 // of the License, or (at your option) any later version.
13 //
14 // This program is distributed in the hope that it will be useful,
15 // but WITHOUT ANY WARRANTY; without even the implied warranty of
16 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
17 // GNU General Public License for more details.
18 //
19 //
20 // $Log: m_argv.h,v $
21 // Revision 1.3  2000/03/29 19:39:48  bpereira
22 //
23 // Revision 1.2  2000/02/27 00:42:10  hurdler
24 // Revision 1.1.1.1  2000/02/22 20:32:32  hurdler
25 // Initial import into CVS (v1.29 pr3)
26 //
27 //
28 // DESCRIPTION:
29 //    Multiple parameters
30 //
31 //-----------------------------------------------------------------------------
32 
33 #ifndef M_ARGV_H
34 #define M_ARGV_H
35 
36 #include "doomtype.h"
37 
38 //
39 // MISC
40 //
41 extern  int     myargc;
42 extern  char**  myargv;
43 
44 // Returns the position of the given parameter
45 // in the arg list (0 if not found).
46 int  M_CheckParm (const char* check);
47 
48 
49 // push all parameters bigining by a +, ex : +map map01
50 void M_PushSpecialParameters( void );
51 
52 // return true if there is available parameters
53 // use it before M_GetNext
54 boolean M_IsNextParm(void);
55 
56 // return the next parameter after a M_CheckParm
57 // NULL if not found, use M_IsNextParm to find if there is a parameter
58 char *M_GetNextParm(void);
59 
60 // Find a Response File
61 void M_FindResponseFile (void);
62 
63 #ifdef LAUNCHER
64 void M_Remove_Param( int i );
65 void M_Remove_matching_Param( const char * p1, const char * p2 );
66 // add a param from Launcher, p2 is optional
67 void M_Add_Param( const char * p1, const char * p2 );
68 // add two param from Launcher, or remove them if p2==NULL or empty string
69 void M_Change_2Param( const char * p1, const char * p2 );
70 // Clear all param from Add_Param
71 void M_Clear_Add_Param( void );
72 #endif
73 
74 #endif //M_ARGV_H
75