1 /***************************************************************************** 2 ** $Source: /cygdrive/d/Private/_SVNROOT/bluemsx/blueMSX/Src/Utils/VeryTinyXpath.h,v $ 3 ** 4 ** $Revision: 1.3 $ 5 ** 6 ** $Date: 2008-03-30 18:38:47 $ 7 ** 8 ** More info: http://www.bluemsx.com 9 ** 10 ** Copyright (C) 2003-2006 Daniel Vik 11 ** 12 ** This program is free software; you can redistribute it and/or modify 13 ** it under the terms of the GNU General Public License as published by 14 ** the Free Software Foundation; either version 2 of the License, or 15 ** (at your option) any later version. 16 ** 17 ** This program is distributed in the hope that it will be useful, 18 ** but WITHOUT ANY WARRANTY; without even the implied warranty of 19 ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 20 ** GNU General Public License for more details. 21 ** 22 ** You should have received a copy of the GNU General Public License 23 ** along with this program; if not, write to the Free Software 24 ** Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 25 ** 26 ****************************************************************************** 27 */ 28 #ifndef VERY_TINY_XPATH_H 29 #define VERY_TINY_XPATH_H 30 31 #ifdef __cplusplus 32 extern "C" { 33 #endif 34 35 typedef struct VtXpath VtXpath; 36 37 #define VTXPATH_INT_NOT_FOUND 0x789abcde 38 39 VtXpath* vtXpathOpenForRead(const char* fileName); 40 VtXpath* vtXpathOpenForWrite(const char* fileName); 41 void vtXpathClose(VtXpath* xpath); 42 43 int vtXpathGetInt(VtXpath* xpath, int numLevels, const char* first, ...); 44 const char* vtXpathGetString(VtXpath* xpath, int numLevels, const char* first, ...); 45 46 void vtXpathSetInt(VtXpath* xpath, int value, int numLevels, const char* first, ...); 47 void vtXpathSetString(VtXpath* xpath, const char* value, int numLevels, const char* first, ...); 48 49 #ifdef __cplusplus 50 } 51 #endif 52 53 #endif // VERY_TINY_XPATH_H