Diff for /np2/embed/menu/filesel.c between versions 1.1 and 1.3

version 1.1, 2003/11/28 08:01:32 version 1.3, 2004/01/22 01:10:04
Line 129  static FLIST getflist(int pos) { Line 129  static FLIST getflist(int pos) {
         return(ret);          return(ret);
 }  }
   
 static BOOL fappend(LISTARRAY flist, FILEFINDT *fft) {  static BOOL fappend(LISTARRAY flist, FLINFO *fli) {
   
         FLIST   fl;          FLIST   fl;
         FLIST   *st;          FLIST   *st;
Line 139  static BOOL fappend(LISTARRAY flist, FIL Line 139  static BOOL fappend(LISTARRAY flist, FIL
         if (fl == NULL) {          if (fl == NULL) {
                 return(FAILURE);                  return(FAILURE);
         }          }
         fl->isdir = (fft->attr & 0x10)?1:0;          fl->isdir = (fli->attr & 0x10)?1:0;
         file_cpyname(fl->name, fft->path, sizeof(fl->name));          file_cpyname(fl->name, fli->path, sizeof(fl->name));
         st = &filesel.fbase;          st = &filesel.fbase;
         while(1) {          while(1) {
                 cur = *st;                  cur = *st;
Line 181  const char *p; Line 181  const char *p;
 static void dlgsetlist(void) {  static void dlgsetlist(void) {
   
         LISTARRAY       flist;          LISTARRAY       flist;
         FILEFINDH       ffh;          FLISTH          flh;
         FILEFINDT       fft;          FLINFO          fli;
         BOOL            append;          BOOL            append;
         FLIST           fl;          FLIST           fl;
         ITEMEXPRM       prm;          ITEMEXPRM       prm;
Line 203  static void dlgsetlist(void) { Line 203  static void dlgsetlist(void) {
         flist = listarray_new(sizeof(_FLIST), 64);          flist = listarray_new(sizeof(_FLIST), 64);
         filesel.flist = flist;          filesel.flist = flist;
         filesel.fbase = NULL;          filesel.fbase = NULL;
         ffh = file_find1st(filesel.path, &fft);          flh = file_list1st(filesel.path, &fli);
         if (ffh != FILEFINDH_INVALID) {          if (flh != FLISTH_INVALID) {
                 do {                  do {
                         append = FALSE;                          append = FALSE;
                         if (fft.attr & 0x10) {                          if (fli.attr & 0x10) {
 #if defined(WIN32) && !defined(_WIN32_WCE)  #if defined(WIN32) && !defined(_WIN32_WCE)
                                 if ((file_cmpname(fft.path, ".")) &&                                  if ((file_cmpname(fli.path, ".")) &&
                                         (file_cmpname(fft.path, ".."))) {                                          (file_cmpname(fli.path, ".."))) {
                                         append = TRUE;                                          append = TRUE;
                                 }                                  }
 #else  #else
                                 append = TRUE;                                  append = TRUE;
 #endif  #endif
                         }                          }
                         else if (!(fft.attr & 0x08)) {                          else if (!(fli.attr & 0x08)) {
                                 append = checkext(fft.path, filesel.ext);                                  append = checkext(fli.path, filesel.ext);
                         }                          }
                         if (append) {                          if (append) {
                                 if (fappend(flist, &fft) != SUCCESS) {                                  if (fappend(flist, &fli) != SUCCESS) {
                                         break;                                          break;
                                 }                                  }
                         }                          }
                 } while(file_findnext(ffh, &fft) == SUCCESS);                  } while(file_listnext(flh, &fli) == SUCCESS);
                 file_findclose(ffh);                  file_listclose(flh);
         }          }
         prm.pos = 0;          prm.pos = 0;
         fl = filesel.fbase;          fl = filesel.fbase;
Line 411  void filesel_sasi(BYTE drv) { Line 411  void filesel_sasi(BYTE drv) {
         char    path[MAX_PATH];          char    path[MAX_PATH];
   
         if (drv < 2) {          if (drv < 2) {
                 if (selectfile(&hddprm, path, sizeof(path), np2cfg.hddfile[drv])) {                  if (selectfile(&hddprm, path, sizeof(path), np2cfg.sasihdd[drv])) {
                         diskdrv_sethdd(drv, path);                          diskdrv_sethdd(drv, path);
                 }                  }
         }          }

Removed from v.1.1  
changed lines
  Added in v.1.3


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