1. clach04
  2. sdl_filemanager

Wiki

Clone wiki

sdl_filemanager / Home

SDL Filemanager

This is an experimental fork of Ray Mizuki's dfiler from http://homepage1.nifty.com/ray-mizuki/software/

Screenshot Dingoo Native

Screen shot is using DejaVuSans.ttf font from http://dejavu-fonts.org

Features

  • SDL based (also needs SDL_ttf)
  • file coping
  • recursive directory copying
  • Cross platform (new to this fork)
    • Dingux
    • Dingoo Native
    • Linux x86 (Windows should work too)
  • Improved file copy speed (new to this fork)

TODO

Images are added via http://confluence.atlassian.com/display/BITBUCKET/Adding+Images+to+a+Bitbucket+Wiki+Page

static const int _ytab[2][12] = 
{
  {31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31},
  {31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31}
};

#define YEAR0                   1900
#define EPOCH_YR                1970
#define SECS_DAY                (24L * 60L * 60L) /* 86400 secs */
#define LEAPYEAR(year)          (!((year) % 4) && (((year) % 100) || !((year) % 400)))
#define YEARSIZE(year)          (LEAPYEAR(year) ? 366 : 365)

struct tm *gmtime_r(const time_t *timer, struct tm *tmbuf)
{
  time_t time = *timer;
  unsigned long dayclock, dayno;
  int year = EPOCH_YR;

  dayclock = (unsigned long) time % SECS_DAY;
  dayno = (unsigned long) time / SECS_DAY;

  tmbuf->tm_sec = dayclock % 60;
  tmbuf->tm_min = (dayclock % 3600) / 60;
  tmbuf->tm_hour = dayclock / 3600;
  tmbuf->tm_wday = (dayno + 4) % 7; // Day 0 was a thursday
  while (dayno >= (unsigned long) YEARSIZE(year)) 
  {
    dayno -= YEARSIZE(year);
    year++;
  }
  tmbuf->tm_year = year - YEAR0;
  tmbuf->tm_yday = dayno;
  tmbuf->tm_mon = 0;
  while (dayno >= (unsigned long) _ytab[LEAPYEAR(year)][tmbuf->tm_mon]) 
  {
    dayno -= _ytab[LEAPYEAR(year)][tmbuf->tm_mon];
    tmbuf->tm_mon++;
  }
  tmbuf->tm_mday = dayno + 1;
  tmbuf->tm_isdst = 0;

  return tmbuf;
}

Updated