source: abuse/branches/pd/imlib/port/dos4gw/profile.h @ 528

Last change on this file since 528 was 49, checked in by Sam Hocevar, 15 years ago
  • Imported original public domain release, for future reference.
  • Property svn:keywords set to Id
File size: 4.1 KB
Line 
1/****************************************************************************
2*
3*  File              : profile.h
4*  Date Created      : 11/24/94
5*  Description       : header file for .ini file management
6*
7*  Programmer(s)     : Nick Skrepetos
8*  Last Modification : 11/25/94 - 11:14:58 PM
9*  Additional Notes  :
10*
11*****************************************************************************
12*            Copyright (c) 1993-95,  HMI, Inc.  All Rights Reserved            *
13****************************************************************************/
14
15#ifndef  _HMI_INI_MANAGER
16#define  _HMI_INI_MANAGER
17
18// profile structure
19typedef  struct   _tagINIInstance
20         {
21
22            W32  wFlags;           // misc. flags
23            BYTE  szName[ 128 ];    // name of .ini file
24
25            PSTR  pData;            // pointer to .ini file in memory
26            W32  wSize;            // size, in bytes, of file
27            W32  wMaxSize;         // maximum size in bytes of the .ini
28
29            PSTR  pCurrent;         // current location in file
30            W32  wCurrent;         // current location in file
31
32            PSTR  pSection;         // pointer to section start
33
34            PSTR  pItemPtr;         // pointer to the start of line w/item
35            PSTR  pItem;            // pointer to last item
36            PSTR  pList;            // pointer to last item location, for list
37                                    // management.
38            PSTR  pListPtr;         // pointer for raw string list
39
40         } _INI_INSTANCE;
41
42// equates
43#define  _INI_SECTION_START   '['
44#define  _INI_SECTION_END     ']'
45#define  _INI_EQUATE          '='
46#define  _INI_SPACE           ' '
47#define  _INI_TAB             0x9
48#define  _INI_STRING_START    '"'
49#define  _INI_STRING_END      '"'
50#define  _INI_EOL             0x0d
51#define  _INI_CR              0x0d
52#define  _INI_LF              0x0a
53#define  _INI_HEX_INDICATOR   'x'
54#define  _INI_LIST_SEPERATOR  ','
55
56// amount of bytes to allocate in addition to file size so that the
57// .ini file may be modified by the application.
58#define  _INI_EXTRA_MEMORY    1024
59
60// various flags for .ini structure
61#define  _INI_MODIFIED        0x8000
62
63#endif
64
65// function prototypes
66BOOL    cdecl hmiINIOpen              ( _INI_INSTANCE * sInstance, char *szName );
67BOOL    cdecl hmiINIClose             ( _INI_INSTANCE * sInstance );
68BOOL  cdecl hmiINILocateSection     ( _INI_INSTANCE * sInstance, PSTR szName );
69BOOL    cdecl hmiINILocateItem        ( _INI_INSTANCE * sInstance, PSTR szItem );
70BOOL    cdecl hmiINIGetDecimal        ( _INI_INSTANCE * sInstance, W32 * wValue );
71BOOL    cdecl hmiINIGetString         ( _INI_INSTANCE * sInstance, PSTR pString, W32 wMaxLength );
72BOOL    cdecl hmiINIGetQuery          ( _INI_INSTANCE * sInstance, PSTR szItem );
73BOOL    cdecl hmiINIWriteDecimal      ( _INI_INSTANCE * sInstance, W32 wValue );
74BOOL    cdecl hmiINIWriteString       ( _INI_INSTANCE * sInstance, PSTR szString );
75BOOL    cdecl hmiINIWriteQuery        ( _INI_INSTANCE * sInstance, PSTR szItem, BOOL    wState );
76BOOL    cdecl hmiINIDeleteItem        ( _INI_INSTANCE * sInstance, PSTR szItem );
77BOOL    cdecl hmiINIDeleteSection     ( _INI_INSTANCE * sInstance, PSTR szSection );
78BOOL    cdecl hmiINIGetRawString      ( _INI_INSTANCE * sInstance, PSTR pString, W32 wMaxLength );
79BOOL    cdecl hmiINIAddSection        ( _INI_INSTANCE * sInstance, PSTR szSection );
80BOOL    cdecl   hmiINIAddItemString     ( _INI_INSTANCE * sInstance, PSTR szItem, PSTR szString, W32 wJustify );
81BOOL    cdecl hmiINIGetItemDecimal    ( _INI_INSTANCE * sInstance, PSTR szItem, W32 * wValue );
82BOOL    cdecl   hmiINIGetItemString     ( _INI_INSTANCE * sInstance,
83                                       PSTR  szItem,
84                                       PSTR  pString,
85                                       W32  wMaxSize );
86BOOL    cdecl   hmiINIAddItemDecimal    (   _INI_INSTANCE * sInstance,
87                                        PSTR  szItem,
88                                        W32  wValue,
89                                        W32  wJustify,
90                                        W32  wRadix );
91
Note: See TracBrowser for help on using the repository browser.