2 Copyright (c) 1993 Richard V. Nash.
3 Copyright (c) 2000 Dan Papasian
4 Copyright (C) Andrew Tridgell 2002
6 This program is free software; you can redistribute it and/or modify
7 it under the terms of the GNU General Public License as published by
8 the Free Software Foundation; either version 2 of the License, or
9 (at your option) any later version.
11 This program 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
14 GNU General Public License for more details.
16 You should have received a copy of the GNU General Public License
17 along with this program; if not, write to the Free Software
18 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
24 #define MAX_WORD_SIZE 1024
26 /* Maximum length of an output line */
27 #define MAX_LINE_SIZE 1024
29 /* Maximum size of a filename */
31 # define MAX_FILENAME_SIZE FILENAME_MAX
33 # define MAX_FILENAME_SIZE 1024
36 #define FlagON(VAR, FLAG) (VAR |= (FLAG))
37 #define FlagOFF(VAR, FLAG) (VAR &= ~(FLAG))
38 #define CheckFlag(VAR, FLAG) ((VAR) & (FLAG))
39 #define BoolCheckFlag(VAR, FLAG) (CheckFlag(VAR, FLAG) ? 1 : 0)
40 #define ToggleFlag(VAR, FLAG) (VAR ^= (FLAG))
41 #define SetFlag(VAR, FLAG, VALUE) ((VALUE) ? FlagON(VAR, FLAG) : FlagOFF(VAR, FLAG))
43 #define PFlagON(WHO, FLAG) FlagON(player_globals.parray[WHO].Flags, FLAG)
44 #define PFlagOFF(WHO, FLAG) FlagOFF(player_globals.parray[WHO].Flags, FLAG)
45 #define CheckPFlag(WHO, FLAG) CheckFlag(player_globals.parray[WHO].Flags, FLAG)
46 #define BoolCheckPFlag(WHO, FLAG) BoolCheckFlag(player_globals.parray[WHO].Flags, FLAG)
47 #define TogglePFlag(WHO, FLAG) ToggleFlag(player_globals.parray[WHO].Flags, FLAG)
48 #define SetPFlag(WHO, FLAG, VALUE) ((VALUE) ? PFlagON(WHO, FLAG) : PFlagOFF(WHO, FLAG))