Diff for /np2/common/profile.h between versions 1.8 and 1.9

version 1.8, 2004/05/06 20:37:36 version 1.9, 2005/03/20 06:09:16
Line 1 Line 1
   
   #if !defined(NP2_PROFILE_H__)
   #define NP2_PROFILE_H__
   
 #ifdef __cplusplus  #ifdef __cplusplus
 extern "C" {  extern "C" {
 #endif  #endif
   
 BOOL profile_enum(const char *filename, void *arg,  BOOL profile_enum(const OEMCHAR *filename, void *arg,
                                                         BOOL (*proc)(void *arg, const char *para,                                                          BOOL (*proc)(void *arg, const OEMCHAR *para,
                                                                         const char *key, const char *data));                                                                  const OEMCHAR *key, const OEMCHAR *data));
 const char *profile_getarg(const char *str, char *buf, UINT leng);  const OEMCHAR *profile_getarg(const OEMCHAR *str, OEMCHAR *buf, UINT leng);
   
   
   
Line 19  enum { Line 22  enum {
 };  };
   
 typedef struct {  typedef struct {
         char    *buffer;          OEMCHAR *buffer;
         UINT    buffers;          UINT    buffers;
         UINT    size;          UINT    size;
           UINT8   hdr[4];
           UINT    hdrsize;
         UINT    flag;          UINT    flag;
         char    path[MAX_PATH];          OEMCHAR path[MAX_PATH];
 } _PFILEH, *PFILEH;  } _PFILEH, *PFILEH;
   
 PFILEH profile_open(const char *filename, UINT flag);  PFILEH profile_open(const OEMCHAR *filename, UINT flag);
 void profile_close(PFILEH hdl);  void profile_close(PFILEH hdl);
 BOOL profile_read(const char *app, const char *key, const char *def,  BRESULT profile_read(const OEMCHAR *app, const OEMCHAR *key,
                                                                                 char *ret, UINT size, PFILEH hdl);                                          const OEMCHAR *def, OEMCHAR *ret, UINT size, PFILEH hdl);
 BOOL profile_write(const char *app, const char *key,  BRESULT profile_write(const OEMCHAR *app, const OEMCHAR *key,
                                                                                         const char *data, PFILEH hdl);                                                                                          const OEMCHAR *data, PFILEH hdl);
   
   
 enum {  enum {
Line 48  enum { Line 53  enum {
         PFTYPE_HEX8,          PFTYPE_HEX8,
         PFTYPE_HEX16,          PFTYPE_HEX16,
         PFTYPE_HEX32,          PFTYPE_HEX32,
         PFTYPE_BYTE3,  
         PFTYPE_USER,          PFTYPE_USER,
         PFITYPE_MASK            = 0xff,          PFTYPE_MASK                     = 0xff,
   
         PFFLAG_RO                       = 0x0100,          PFFLAG_RO                       = 0x0100,
         PFFLAG_MAX                      = 0x0200,          PFFLAG_MAX                      = 0x0200,
Line 58  enum { Line 62  enum {
 };  };
   
 typedef struct {  typedef struct {
         char    item[10];          OEMCHAR item[12];
         UINT16  itemtype;          UINT    itemtype;
         void    *value;          void    *value;
         UINT32  arg;          UINT32  arg;
 } PFTBL;  } PFTBL;
   
 typedef void (*PFREAD)(const PFTBL *item, const char *string);  #define PFSTR(k, f, a)          {OEMTEXT(k), f, a, NELEMENTS(a)}
 typedef char *(*PFWRITE)(const PFTBL *item, char *string, UINT size);  #define PFVAL(k, f, a)          {OEMTEXT(k), f, a, 0}
   #define PFMAX(k, f, a, v)       {OEMTEXT(k), f | PFFLAG_MAX, a, v}
   #define PFAND(k, f, a, v)       {OEMTEXT(k), f | PFFLAG_AND, a, v}
   #define PFEXT(k, f, a, v)       {OEMTEXT(k), f, a, v}
   
   typedef void (*PFREAD)(const PFTBL *item, const OEMCHAR *string);
   typedef OEMCHAR *(*PFWRITE)(const PFTBL *item, OEMCHAR *string, UINT size);
   
 void profile_iniread(const char *path, const char *app,  void profile_iniread(const OEMCHAR *path, const OEMCHAR *app,
                                                                 const PFTBL *tbl, UINT count, PFREAD cb);                                                                  const PFTBL *tbl, UINT count, PFREAD cb);
 void profile_iniwrite(const char *path, const char *app,  void profile_iniwrite(const OEMCHAR *path, const OEMCHAR *app,
                                                                 const PFTBL *tbl, UINT count, PFWRITE cb);                                                                  const PFTBL *tbl, UINT count, PFWRITE cb);
   
 #ifdef __cplusplus  #ifdef __cplusplus
 }  }
 #endif  #endif
   
   #endif  // defined(NP2_PROFILE_H__)
   

Removed from v.1.8  
changed lines
  Added in v.1.9


RetroPC.NET-CVS <cvs@retropc.net>