
#ifndef PPVINI_H
#define	PPVINI_H

/* preprocessor directives - file open attributes */
#define READONLY				"r"
#define APPEND					"a"

typedef char*				LPSTR;
typedef const char*			LPCSTR;

typedef int                 BOOL;

#ifdef WIN32
#define FALSE               0
#define TRUE                1
#endif

typedef unsigned char       BYTE;
typedef unsigned short      WORD;
typedef unsigned long       DWORD;
typedef unsigned int        UINT;

// following ifndef is temporary hack to get this building (kpw)
#ifndef _WIN32
int ScanFor
(
	LPCSTR	lpAppName,
	LPCSTR	lpKeyName,
	LPSTR	lpReturnedString,
	int		nSize,
	FILE	*pIniFile
);

int InsertSection
(
	LPCSTR	lpAppName,
	LPCSTR	lpKeyName,
	LPCSTR	lpValue,
	FILE	*pFile
);

int InsertKey
(
   LPCSTR	lpKeyName,
   LPCSTR	lpValue,
   FILE*	pFile
);

int ScanForCopyInsert
(
	LPCSTR	lpAppName,
	LPCSTR	lpKeyName,
	LPCSTR	lpValue,
	FILE*	pIniFile,
	FILE*	pIniFileCopy
);

UINT GetPrivateProfileInt
(
	LPCSTR	lpAppName,
	LPCSTR	lpKeyName,
	int		nDefault,
	LPCSTR	lpFileName
);

int GetPrivateProfileString
(
	LPCSTR	lpAppName,
	LPCSTR	lpKeyName,
	LPCSTR	lpDefault,
	LPSTR	lpReturnedString,
	int		nSize,
	LPCSTR	lpFileName
);

BOOL WritePrivateProfileString
(
	LPCSTR	lpAppName,
	LPCSTR	lpKeyName,
	LPCSTR	lpValue,
	LPCSTR	lpFileName
);
#endif

#endif

