Diff for /np2/x11/ini.c between versions 1.19 and 1.24

version 1.19, 2007/02/04 11:51:13 version 1.24, 2011/01/15 16:08:26
Line 1 Line 1
   /*      $Id$    */
   
 #include "compiler.h"  #include "compiler.h"
   
 #include "np2.h"  #include "np2.h"
Line 127  iniwrsetargh8(char *work, int size, cons Line 129  iniwrsetargh8(char *work, int size, cons
         ptr = (BYTE *)(ini->value);          ptr = (BYTE *)(ini->value);
         arg = ini->arg;          arg = ini->arg;
         if (arg > 0) {          if (arg > 0) {
                 SPRINTF(tmp, "%.2x ", ptr[0]);                  g_snprintf(tmp, sizeof(tmp), "%.2x ", ptr[0]);
                 milstr_ncpy(work, tmp, size);                  milstr_ncpy(work, tmp, size);
         }          }
         for (i = 1; i < arg; i++) {          for (i = 1; i < arg; i++) {
                 SPRINTF(tmp, "%.2x ", ptr[i]);                  g_snprintf(tmp, sizeof(tmp), "%.2x ", ptr[i]);
                 milstr_ncat(work, tmp, size);                  milstr_ncat(work, tmp, size);
         }          }
 }  }
Line 425  ini_write(const char *path, const char * Line 427  ini_write(const char *path, const char *
                                 break;                                  break;
   
                         case INITYPE_SINT8:                          case INITYPE_SINT8:
                                 SPRINTF(work, "%d", *((char *)p->value));                                  g_snprintf(work, sizeof(work), "%d", *((char *)p->value));
                                 break;                                  break;
   
                         case INITYPE_SINT16:                          case INITYPE_SINT16:
                                 SPRINTF(work, "%d", *((SINT16 *)p->value));                                  g_snprintf(work, sizeof(work), "%d", *((SINT16 *)p->value));
                                 break;                                  break;
   
                         case INITYPE_SINT32:                          case INITYPE_SINT32:
                                 SPRINTF(work, "%d", *((SINT32 *)p->value));                                  g_snprintf(work, sizeof(work), "%d", *((SINT32 *)p->value));
                                 break;                                  break;
   
                         case INITYPE_UINT8:                          case INITYPE_UINT8:
                                 SPRINTF(work, "%u", *((BYTE *)p->value));                                  g_snprintf(work, sizeof(work), "%u", *((BYTE *)p->value));
                                 break;                                  break;
   
                         case INITYPE_UINT16:                          case INITYPE_UINT16:
                                 SPRINTF(work, "%u", *((UINT16 *)p->value));                                  g_snprintf(work, sizeof(work), "%u", *((UINT16 *)p->value));
                                 break;                                  break;
   
                         case INITYPE_UINT32:                          case INITYPE_UINT32:
                                 SPRINTF(work, "%u", *((UINT32 *)p->value));                                  g_snprintf(work, sizeof(work), "%u", *((UINT32 *)p->value));
                                 break;                                  break;
   
                         case INITYPE_HEX8:                          case INITYPE_HEX8:
                                 SPRINTF(work, "%x", *((BYTE *)p->value));                                  g_snprintf(work, sizeof(work), "%x", *((BYTE *)p->value));
                                 break;                                  break;
   
                         case INITYPE_HEX16:                          case INITYPE_HEX16:
                                 SPRINTF(work, "%x", *((UINT16 *)p->value));                                  g_snprintf(work, sizeof(work), "%x", *((UINT16 *)p->value));
                                 break;                                  break;
   
                         case INITYPE_HEX32:                          case INITYPE_HEX32:
                                 SPRINTF(work, "%x", *((UINT32 *)p->value));                                  g_snprintf(work, sizeof(work), "%x", *((UINT32 *)p->value));
                                 break;                                  break;
   
                         case INITYPE_KB:                          case INITYPE_KB:
Line 468  ini_write(const char *path, const char * Line 470  ini_write(const char *path, const char *
                                 break;                                  break;
   
                         case INITYPE_SNDDRV:                          case INITYPE_SNDDRV:
                                 SPRINTF(work, "%s", snddrv_num2drv(*(UINT8 *)p->value));                                  g_snprintf(work, sizeof(work), "%s", snddrv_num2drv(*(UINT8 *)p->value));
                                 break;                                  break;
   
                         case INITYPE_INTERP:                          case INITYPE_INTERP:
                                 SPRINTF(work, "%s", iniwrinterp(*(UINT8 *)p->value));                                  g_snprintf(work, sizeof(work), "%s", iniwrinterp(*(UINT8 *)p->value));
                                 break;                                  break;
   
                         default:                          default:
Line 491  ini_write(const char *path, const char * Line 493  ini_write(const char *path, const char *
         file_close(fh);          file_close(fh);
 }  }
   
 extern char modulefile[];  static const char ini_title[] =
   #if !defined(CPUCORE_IA32)
 static const char ini_title[] = "NekoProjectII";          "NekoProjectII";
   #else
           "NekoProjectII_IA32";
   #endif
   
 enum {  enum {
         INIRO_STR       = INIFLAG_RO | INITYPE_STR,          INIRO_STR       = INIFLAG_RO | INITYPE_STR,
Line 518  static const INITBL iniitem[] = { Line 523  static const INITBL iniitem[] = {
         {"HDfolder", INITYPE_STR,       hddfolder,              MAX_PATH},          {"HDfolder", INITYPE_STR,       hddfolder,              MAX_PATH},
         {"bmap_Dir", INITYPE_STR,       bmpfilefolder,          MAX_PATH},          {"bmap_Dir", INITYPE_STR,       bmpfilefolder,          MAX_PATH},
         {"fontfile", INITYPE_STR,       np2cfg.fontfile,        MAX_PATH},          {"fontfile", INITYPE_STR,       np2cfg.fontfile,        MAX_PATH},
         {"biospath", INITYPE_STR,       np2cfg.biospath,        MAX_PATH},          {"biospath", INIRO_STR,         np2cfg.biospath,        MAX_PATH},
         {"hdrvroot", INIRO_STR,         np2cfg.hdrvroot,        MAX_PATH},          {"hdrvroot", INIRO_STR,         np2cfg.hdrvroot,        MAX_PATH},
         {"hdrv_acc", INIRO_UINT8,       &np2cfg.hdrvacc,        0},          {"hdrv_acc", INIRO_UINT8,       &np2cfg.hdrvacc,        0},
   
Line 628  static const INITBL iniitem[] = { Line 633  static const INITBL iniitem[] = {
         {"com3mmdl", INITYPE_STR,       np2oscfg.com[2].mdl,    64},          {"com3mmdl", INITYPE_STR,       np2oscfg.com[2].mdl,    64},
         {"com3mdef", INITYPE_STR,       np2oscfg.com[2].def,    MAX_PATH},          {"com3mdef", INITYPE_STR,       np2oscfg.com[2].def,    MAX_PATH},
   
   #if defined(SUPPORT_RESUME)
         {"e_resume", INITYPE_BOOL,      &np2oscfg.resume,       0},          {"e_resume", INITYPE_BOOL,      &np2oscfg.resume,       0},
   #endif
   #if defined(SUPPORT_STATSAVE)
         {"STATSAVE", INIRO_BOOL,        &np2oscfg.statsave,     0},          {"STATSAVE", INIRO_BOOL,        &np2oscfg.statsave,     0},
   #endif
 #if defined(GCC_CPU_ARCH_IA32)  #if defined(GCC_CPU_ARCH_IA32)
         {"nousemmx", INITYPE_BOOL,      &np2oscfg.disablemmx,   0},          {"nousemmx", INITYPE_BOOL,      &np2oscfg.disablemmx,   0},
 #endif  #endif
Line 646  static const INITBL iniitem[] = { Line 655  static const INITBL iniitem[] = {
         {"dinterp_", INITYPE_INTERP,    &np2oscfg.drawinterp,   0},          {"dinterp_", INITYPE_INTERP,    &np2oscfg.drawinterp,   0},
         {"fullscrn", INITYPE_UINT32,    &ignore_fullscreen_mode,0},          {"fullscrn", INITYPE_UINT32,    &ignore_fullscreen_mode,0},
         {"F11_KEY_", INITYPE_UINT8,     &np2oscfg.F11KEY,       0},          {"F11_KEY_", INITYPE_UINT8,     &np2oscfg.F11KEY,       0},
           {"READONLY", INIRO_BOOL,        &np2oscfg.cfgreadonly,  0},
   
         {"I286SAVE", INIRO_BOOL,        &np2oscfg.I286SAVE,     0},          {"I286SAVE", INIRO_BOOL,        &np2oscfg.I286SAVE,     0},
 };  };

Removed from v.1.19  
changed lines
  Added in v.1.24


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