Changeset 1395 for trunk/dll/autoview.c


Ignore:
Timestamp:
Feb 8, 2009, 2:48:16 AM (17 years ago)
Author:
Gregg Young
Message:

Allow user to turn off alert and/or error beeps in settings notebook. Ticket 341 Move repeated strings to PCSZs. Ticket 6 Add *DateFormat functions to format dates based on locale Ticket 28 Eliminate Win_Error2 by moving function names to PCSZs used in Win_Error Ticket 6

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/dll/autoview.c

    r1391 r1395  
    2626  10 Dec 08 SHL Integrate exception handler support
    2727  11 Jan 09 GKY Replace font names in the string file with global set at compile in init.c
     28  07 Feb 09 GKY Add *DateFormat functions to format dates bassed on locale
     29  07 Feb 09 GKY Eliminate Win_Error2 by moving function names to PCSZs used in Win_Error
    2830
    2931***********************************************************************/
     
    452454
    453455            static FILEFINDBUF4L ffb[130];
    454             CHAR fullname[CCHMAXPATH + 4], szCmmaFmtFileSize[81];
     456            CHAR fullname[CCHMAXPATH + 4], szCmmaFmtFileSize[81], szDate[11];
    455457            HDIR hdir = HDIR_CREATE;
    456458            ULONG x, nm, ml, mc, bufflen;
     
    462464
    463465            BldFullPathName(fullname, currfile, "*");
    464             //sprintf(fullname,
    465             //        "%s%s*",
    466             //        currfile,
    467             //        (currfile[strlen(currfile) - 1] == '\\') ? "" : "\\");
    468466            DosError(FERR_DISABLEHARDERR);
    469467            nm = sizeof(ffb) / sizeof(FILEFINDBUF4L);
     
    507505                                sizeof(szCmmaFmtFileSize),
    508506                                pffbFile->cbFile + CBLIST_TO_EASIZE(pffbFile->cbList),
    509                                 ' ');
     507                                ' ');
     508                    FDateFormat(szDate, pffbFile->fdateLastWrite);
    510509                    sprintf(p,
    511                             "%s%-*.*s  %-8s  [%s%s%s%s]  %04lu/%02lu/%02lu "
    512                               "%02lu:%02lu:%02lu\r",
     510                            "%s%-*.*s  %-8s  [%s%s%s%s]  %s "
     511                              "%02lu%s%02lu%s%02lu\r",
    513512                            pffbFile->attrFile & FILE_DIRECTORY ? "\\" : " ",
    514513                            ml,
     
    520519                            pffbFile->attrFile & FILE_HIDDEN ? "H" : "-",
    521520                            pffbFile->attrFile & FILE_SYSTEM ? "S" : "-",
    522                             pffbFile->fdateLastWrite.year + 1980,
    523                             pffbFile->fdateLastWrite.month,
    524                             pffbFile->fdateLastWrite.day,
    525                             pffbFile->ftimeLastWrite.hours,
    526                             pffbFile->ftimeLastWrite.minutes,
     521                            szDate,
     522                            pffbFile->ftimeLastWrite.hours, TimeSeparator,
     523                            pffbFile->ftimeLastWrite.minutes, TimeSeparator,
    527524                            pffbFile->ftimeLastWrite.twosecs * 2);
    528525                    p += strlen(p);
     
    683680                                    0L, 0L, HWND_TOP, OBJ_FRAME, NULL, NULL);
    684681      if (!hwndAutoObj) {
    685         Win_Error2(HWND_OBJECT, HWND_DESKTOP, pszSrcFile, __LINE__,
    686                    IDS_WINCREATEWINDOW);
     682        Win_Error(HWND_OBJECT, HWND_DESKTOP, pszSrcFile, __LINE__,
     683                  PCSZ_WINCREATEWINDOW);
    687684        if (!PostMsg(hwndParent, UM_CLOSE, MPVOID, MPVOID))
    688685          WinSendMsg(hwndParent, UM_CLOSE, MPVOID, MPVOID);
Note: See TracChangeset for help on using the changeset viewer.