1 /* FCE Ultra - NES/Famicom Emulator
3 * Copyright notice for this file:
4 * Copyright (C) 2002 Ben Parnell
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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
27 void SaveFCEUConfig(char *filename, CFGSTRUCT *cfgst);
28 void LoadFCEUConfig(char *filename, CFGSTRUCT *cfgst);
30 /* Macros for building CFGSTRUCT structures. */
32 /* CFGSTRUCT structures must always end with ENDCFGSTRUCT */
33 #define ENDCFGSTRUCT { 0,0,0 }
35 /* When this macro is used, the config loading/saving code will parse
36 the new config structure until the end of it is detected, then it
37 will continue parsing the original config structure.
39 #define ADDCFGSTRUCT(x) { 0,&x,0 }
41 /* Oops. The NAC* macros shouldn't have the # in front of the w, but
42 fixing this would break configuration files of previous versions and it
43 isn't really hurting much.
46 /* Single piece of data(integer). */
47 #define AC(x) { #x,&x,sizeof(x)}
48 #define NAC(w,x) { #w,&x,sizeof(x)}
51 #define ACA(x) {#x,x,sizeof(x)}
52 #define NACA(w,x) {#w,x,sizeof(x)}
54 /* String(pointer) with automatic memory allocation. */
55 #define ACS(x) {#x,&x,0}
56 #define NACS(w,x) {#w,&x,0}