- Timestamp:
- Feb 8, 2009, 2:48:16 AM (17 years ago)
- Location:
- trunk/dll
- Files:
-
- 47 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/dll/arccnrs.c
r1394 r1395 70 70 menu option is selected. 71 71 10 Dec 08 SHL Integrate exception handler support 72 07 Feb 09 GKY Eliminate Win_Error2 by moving function names to PCSZs used in Win_Error 73 07 Feb 09 GKY Allow user to turn off alert and/or error beeps in settings notebook. 72 74 73 75 ***********************************************************************/ … … 525 527 remaining = (INT)WinSendMsg(hwnd, CM_REMOVERECORD, MPFROMP(&paiFirst), MPFROM2SHORT(usCnt, usFlags)); 526 528 if (remaining == -1) { 527 // Win_Error2(hwnd, HWND_DESKTOP, pszSrcFile, __LINE__,IDS_CMREMOVEERRTEXT);528 Win_Error(hwnd, HWND_DESKTOP, pszSrcFile, __LINE__,"CM_REMOVERECORD hwnd %x pai %p cnt %u",hwnd, paiFirst, usCnt);529 Win_Error(hwnd, HWND_DESKTOP, pszSrcFile, __LINE__,"CM_REMOVERECORD hwnd %x pai %p cnt %u", 530 hwnd, paiFirst, usCnt); 529 531 } 530 532 } … … 891 893 goto ReTry; 892 894 } 893 } while (tinfo); 894 DosBeep(750, 50); // wake up user 895 } while (tinfo); 896 if (!fAlertBeepOff) 897 DosBeep(750, 50); // wake up user 895 898 sprintf(errstr, GetPString(IDS_ARCERRORINFOTEXT), 896 899 arcname, … … 3371 3374 LISTINFO *li; 3372 3375 3373 DosBeep(500, 100); // fixme to know why beep?3376 //DosBeep(500, 100); // fixme to know why beep? 3374 3377 li = DoFileDrop(hwnd, dcd->arcname, FALSE, mp1, mp2); 3375 DosBeep(50, 100); // fixme to know why beep?3378 //DosBeep(50, 100); // fixme to know why beep? 3376 3379 CheckPmDrgLimit(((PCNRDRAGINFO)mp2)->pDragInfo); 3377 3380 if (li) { … … 3817 3820 HWND_TOP, (ULONG) ARC_CNR, NULL, NULL); 3818 3821 if (!dcd->hwndCnr) { 3819 Win_Error 2(hwndClient, hwndClient, pszSrcFile, __LINE__,3820 IDS_WINCREATEWINDOW);3822 Win_Error(hwndClient, hwndClient, pszSrcFile, __LINE__, 3823 PCSZ_WINCREATEWINDOW); 3821 3824 PostMsg(hwndClient, WM_CLOSE, MPVOID, MPVOID); 3822 3825 free(dcd); -
trunk/dll/archive.c
r1346 r1395 14 14 22 Mar 07 GKY Use QWL_USER 15 15 20 Aug 07 GKY Move #pragma alloc_text to end for OpenWatcom compat 16 07 Feb 09 GKY Allow user to turn off alert and/or error beeps in settings notebook. 16 17 17 18 ***********************************************************************/ … … 223 224 } 224 225 } 225 DosBeep(50, 100); 226 if (!fAlertBeepOff) 227 DosBeep(50, 100); 226 228 break; 227 229 … … 272 274 pszSrcFile, __LINE__); 273 275 } 274 else 276 else if (!fErrorBeepOff) 275 277 DosBeep(50, 100); 276 278 } -
trunk/dll/autoview.c
r1391 r1395 26 26 10 Dec 08 SHL Integrate exception handler support 27 27 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 28 30 29 31 ***********************************************************************/ … … 452 454 453 455 static FILEFINDBUF4L ffb[130]; 454 CHAR fullname[CCHMAXPATH + 4], szCmmaFmtFileSize[81] ;456 CHAR fullname[CCHMAXPATH + 4], szCmmaFmtFileSize[81], szDate[11]; 455 457 HDIR hdir = HDIR_CREATE; 456 458 ULONG x, nm, ml, mc, bufflen; … … 462 464 463 465 BldFullPathName(fullname, currfile, "*"); 464 //sprintf(fullname,465 // "%s%s*",466 // currfile,467 // (currfile[strlen(currfile) - 1] == '\\') ? "" : "\\");468 466 DosError(FERR_DISABLEHARDERR); 469 467 nm = sizeof(ffb) / sizeof(FILEFINDBUF4L); … … 507 505 sizeof(szCmmaFmtFileSize), 508 506 pffbFile->cbFile + CBLIST_TO_EASIZE(pffbFile->cbList), 509 ' '); 507 ' '); 508 FDateFormat(szDate, pffbFile->fdateLastWrite); 510 509 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", 513 512 pffbFile->attrFile & FILE_DIRECTORY ? "\\" : " ", 514 513 ml, … … 520 519 pffbFile->attrFile & FILE_HIDDEN ? "H" : "-", 521 520 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, 527 524 pffbFile->ftimeLastWrite.twosecs * 2); 528 525 p += strlen(p); … … 683 680 0L, 0L, HWND_TOP, OBJ_FRAME, NULL, NULL); 684 681 if (!hwndAutoObj) { 685 Win_Error 2(HWND_OBJECT, HWND_DESKTOP, pszSrcFile, __LINE__,686 IDS_WINCREATEWINDOW);682 Win_Error(HWND_OBJECT, HWND_DESKTOP, pszSrcFile, __LINE__, 683 PCSZ_WINCREATEWINDOW); 687 684 if (!PostMsg(hwndParent, UM_CLOSE, MPVOID, MPVOID)) 688 685 WinSendMsg(hwndParent, UM_CLOSE, MPVOID, MPVOID); -
trunk/dll/avv.c
r1394 r1395 267 267 t = time(NULL); 268 268 tm = localtime(&t); 269 269 //fixme to use DateFmt from locale 270 270 fprintf(fpNew, 271 271 ";\n; %s file written by FM/2 v%d.%02d on %u/%u/%u %u:%02u:%02u\n;\n", -
trunk/dll/collect.c
r1394 r1395 59 59 26 Dec 08 GKY Fixed DROPHELP to check for copy as default is action is DO_DEFAULT 60 60 01 Jan 09 GKY Add Seek and Scan to drives & directory context menus pass drive/dir as search root 61 07 Feb 09 GKY Eliminate Win_Error2 by moving function names to PCSZs used in Win_Error 62 07 Feb 09 GKY Allow user to turn off alert and/or error beeps in settings notebook. 63 07 Feb 09 GKY Add *DateFormat functions to format dates based on locale 64 07 Feb 09 GKY Move repeated strings to PCSZs. 61 65 62 66 ***********************************************************************/ … … 877 881 CHAR filename[CCHMAXPATH], *p, *pp; 878 882 879 strcpy(filename, "*.LST");883 strcpy(filename, PCSZ_STARDOTLST); 880 884 size = CCHMAXPATH; 881 885 PrfQueryProfileData(fmprof, appname, "SaveToListName", filename, … … 1264 1268 if (dcd) { 1265 1269 CNRINFO cnri; 1266 CHAR s[CCHMAXPATH + 69], tb[81], tf[81], *p;1270 CHAR s[CCHMAXPATH + 69], tb[81], tf[81], szDate[11], *p; 1267 1271 PCNRITEM pci = NULL; 1268 1272 … … 1332 1336 } 1333 1337 CommaFmtULL(tb, sizeof(tb), pci->cbFile + pci->easize, ' '); 1334 1335 sprintf(s, " %s %04u/%02u/%02u %02u:%02u:%02u [%s] %s", 1336 tb, pci->date.year, pci->date.month,1337 pci->date.day, pci->time.hours, pci->time.minutes,1338 pci->time.seconds, pci->pszDispAttr, p);1338 if (!fMoreButtons) { 1339 DateFormat(szDate, pci->date); 1340 sprintf(s, " %s %s %02u%s%02u%s%02u [%s] %s", 1341 tb, szDate, pci->time.hours, TimeSeparator, pci->time.minutes, 1342 TimeSeparator, pci->time.seconds, pci->pszDispAttr, p); 1339 1343 } 1340 1344 else { … … 1350 1354 } 1351 1355 if (fMoreButtons) { 1352 1353 sprintf(s, "%04u/%02u/%02u %02u:%02u:%02u", 1354 pci->date.year, pci->date.month,1355 pci->date.day, pci->time.hours, pci->time.minutes,1356 pci->time.seconds);1356 WinSetWindowText(hwndName, pci->pszFileName); 1357 DateFormat(szDate, pci->date); 1358 sprintf(s, "%s %02u%s%02u%s%02u", 1359 szDate, pci->time.hours, TimeSeparator, pci->time.minutes, 1360 TimeSeparator, pci->time.seconds); 1357 1361 WinSetWindowText(hwndDate, s); 1358 1362 WinSetWindowText(hwndAttr, pci->pszDispAttr); … … 1379 1383 1380 1384 case UM_CONTAINER_FILLED: 1381 DosBeep(1000, 50); // Wake up user? 1385 if (!fAlertBeepOff) 1386 DosBeep(1000, 50); // Wake up user? 1382 1387 WinSendMsg(hwnd, 1383 1388 CM_INVALIDATERECORD, … … 1686 1691 CHAR filename[CCHMAXPATH], *p, *pp; 1687 1692 1688 strcpy(filename, "*.LST");1693 strcpy(filename, PCSZ_STARDOTLST); 1689 1694 size = CCHMAXPATH; 1690 1695 PrfQueryProfileData(fmprof, appname, "SaveToListName", … … 2670 2675 PNOTIFYRECORDEMPHASIS pre = mp2; 2671 2676 PCNRITEM pci; 2672 CHAR s[CCHMAXPATH + 91], tb[81], tf[81], *p;2677 CHAR s[CCHMAXPATH + 91], tb[81], tf[81], szDate[11], *p; 2673 2678 2674 2679 pci = (PCNRITEM) ((pre) ? pre->pRecord : NULL); … … 2720 2725 } 2721 2726 CommaFmtULL(tb, sizeof(tb), pci->cbFile + pci->easize, ' '); 2722 if (!fMoreButtons) 2723 sprintf(s, " %s %04u/%02u/%02u %02u:%02u:%02u [%s] %s", 2724 tb, pci->date.year, 2725 pci->date.month, pci->date.day, pci->time.hours, 2726 pci->time.minutes, pci->time.seconds, 2727 pci->pszDispAttr, p); 2727 if (!fMoreButtons) { 2728 DateFormat(szDate, pci->date); 2729 sprintf(s, " %s %s %02u%s%02u%s%02u [%s] %s", 2730 tb, szDate, pci->time.hours, TimeSeparator, 2731 pci->time.minutes, TimeSeparator, pci->time.seconds, 2732 pci->pszDispAttr, p); 2733 } 2728 2734 else { 2729 2735 if (pci->cbFile + pci->easize > 1024) … … 2739 2745 } 2740 2746 if (fMoreButtons) { 2741 2742 sprintf(s, "%04u/%02u/%02u %02u:%02u:%02u", 2743 pci->date.year, pci->date.month,2744 pci->date.day, pci->time.hours, pci->time.minutes,2745 pci->time.seconds);2747 WinSetWindowText(hwndName, pci->pszFileName); 2748 DateFormat(szDate, pci->date); 2749 sprintf(s, "%s %02u%s%02u%s%02u", 2750 szDate, pci->time.hours, TimeSeparator, pci->time.minutes, 2751 TimeSeparator, pci->time.seconds); 2746 2752 WinSetWindowText(hwndDate, s); 2747 2753 WinSetWindowText(hwndAttr, pci->pszDispAttr); … … 3023 3029 (ULONG) COLLECTOR_CNR, NULL, NULL); 3024 3030 if (!dcd->hwndCnr) { 3025 Win_Error 2(hwndClient, hwndClient, pszSrcFile, __LINE__,3026 IDS_WINCREATEWINDOW);3031 Win_Error(hwndClient, hwndClient, pszSrcFile, __LINE__, 3032 PCSZ_WINCREATEWINDOW); 3027 3033 PostMsg(hwndClient, WM_CLOSE, MPVOID, MPVOID); 3028 3034 free(dcd); -
trunk/dll/colors.c
r1346 r1395 12 12 22 Mar 07 GKY Use QWL_USER 13 13 20 Aug 07 GKY Move #pragma alloc_text to end for OpenWatcom compat 14 07 Feb 09 GKY Allow user to turn off alert and/or error beeps in settings notebook. 14 15 15 16 ***********************************************************************/ … … 151 152 co->colors[co->currentcolor] = (LONG) (SHORT1FROMMP(mp1) - 152 153 COLOR_FIRST); 153 DosBeep(1000, 1); // fixme to be gone?154 //DosBeep(1000, 1); // fixme to be gone? 154 155 } 155 156 break; -
trunk/dll/commafmt.c
r1205 r1395 15 15 05 Nov 07 GKY Use commafmtULL to display file sizes for large file support 16 16 10 Nov 07 GKY Get thousands separator from country info for file sizes. 17 07 Feb 09 GKY Add *DateFormat functions to format dates based on locale 17 18 18 19 ***********************************************************************/ … … 172 173 } 173 174 174 #pragma alloc_text(MISC8,commafmt,CommaFmtU64) 175 VOID DateFormat(PSZ pszBuf, CDATE Date) 176 { 177 switch(ulDateFmt) { 178 179 case 3: 180 181 sprintf(pszBuf, "%04u%s%02u%s%02u", Date.year, DateSeparator, 182 Date.day, DateSeparator, Date.month); 183 break; 184 185 case 2: 186 187 sprintf(pszBuf, "%04u%s%02u%s%02u", Date.year, DateSeparator, 188 Date.month, DateSeparator, Date.day); 189 break; 190 191 case 1: 192 193 sprintf(pszBuf, "%02u%s%02u%s%04u", Date.day, DateSeparator, 194 Date.month, DateSeparator, Date.year); 195 break; 196 197 case 0: 198 default: 199 200 sprintf(pszBuf, "%02u%s%02u%s%04u", Date.month, DateSeparator, 201 Date.day, DateSeparator, Date.year); 202 break; 203 } 204 } 205 206 VOID FDateFormat(PSZ pszBuf, FDATE Date) 207 { 208 switch(ulDateFmt) { 209 210 case 3: 211 212 sprintf(pszBuf, "%04u%s%02u%s%02u", Date.year + 1980, DateSeparator, 213 Date.day, DateSeparator, Date.month); 214 break; 215 216 case 2: 217 218 sprintf(pszBuf, "%04u%s%02u%s%02u", Date.year + 1980, DateSeparator, 219 Date.month, DateSeparator, Date.day); 220 break; 221 222 case 1: 223 224 sprintf(pszBuf, "%02u%s%02u%s%04u", Date.day, DateSeparator, 225 Date.month, DateSeparator, Date.year + 1980); 226 break; 227 228 case 0: 229 default: 230 231 sprintf(pszBuf, "%02u%s%02u%s%04u", Date.month, DateSeparator, 232 Date.day, DateSeparator, Date.year + 1980); 233 break; 234 } 235 } 236 237 VOID DTDateFormat(PSZ pszBuf, DATETIME Date) 238 { 239 switch(ulDateFmt) { 240 241 case 3: 242 243 sprintf(pszBuf, "%04u%s%02u%s%02u", Date.year, DateSeparator, 244 Date.day, DateSeparator, Date.month); 245 break; 246 247 case 2: 248 249 sprintf(pszBuf, "%04u%s%02u%s%02u", Date.year, DateSeparator, 250 Date.month, DateSeparator, Date.day); 251 break; 252 253 case 1: 254 255 sprintf(pszBuf, "%02u%s%02u%s%04u", Date.day, DateSeparator, 256 Date.month, DateSeparator, Date.year); 257 break; 258 259 case 0: 260 default: 261 262 sprintf(pszBuf, "%02u%s%02u%s%04u", Date.month, DateSeparator, 263 Date.day, DateSeparator, Date.year); 264 break; 265 } 266 } 267 268 #pragma alloc_text(MISC8,commafmt,CommaFmtUL,CommaFmtULL) -
trunk/dll/commafmt.h
r1195 r1395 10 10 11 11 Change log 12 07 Feb 09 GKY Add *DateFormat functions to format dates bassed on locale 12 13 13 14 ***********************************************************************/ … … 22 23 size_t commafmt(PSZ pszBuf, UINT cBufSize, LONG lNumber); 23 24 25 VOID DateFormat(PSZ pszBuf, CDATE Date); 26 27 VOID FDateFormat(PSZ pszBuf, FDATE Date); 28 29 VOID DTDateFormat(PSZ pszBuf, DATETIME Date); 30 24 31 #endif // COMMAFMT_H -
trunk/dll/common.c
r1391 r1395 24 24 01 Jan 09 GKY Add option to rescan tree container on eject of removable media 25 25 11 Jan 09 GKY Replace font names in the string file with global set at compile in init.c 26 07 Feb 09 GKY Eliminate Win_Error2 by moving function names to PCSZs used in Win_Error 26 27 27 28 ***********************************************************************/ … … 230 231 HWND_TOP, ids[x], NULL, NULL); 231 232 if (!hwndTmp) 232 Win_Error2(hwnd, hwnd, pszSrcFile, __LINE__, IDS_WINCREATEWINDOW); 233 Win_Error(hwnd, hwnd, pszSrcFile, __LINE__, 234 PCSZ_WINCREATEWINDOW); 233 235 } // for 234 236 } … … 407 409 hwndFrame, HWND_TOP, MAIN_STATUS, NULL, NULL); 408 410 if (!hwndStatus) 409 Win_Error2(hwndFrame, hwnd, pszSrcFile, __LINE__, IDS_WINCREATEWINDOW); 411 Win_Error(hwndFrame, hwnd, pszSrcFile, __LINE__, 412 PCSZ_WINCREATEWINDOW); 410 413 411 414 // Right status window … … 428 431 HWND_TOP, MAIN_STATUS2, NULL, NULL); 429 432 if (!hwndStatus2) 430 Win_Error2(hwndFrame, hwnd, pszSrcFile, __LINE__, IDS_WINCREATEWINDOW); 433 Win_Error(hwndFrame, hwnd, pszSrcFile, __LINE__, 434 PCSZ_WINCREATEWINDOW); 431 435 432 436 hwndAttr = WinCreateWindow(hwndFrame, … … 446 450 20, hwndFrame, HWND_TOP, IDM_ATTRS, NULL, NULL); 447 451 if (!hwndAttr) 448 Win_Error2(hwndFrame, hwnd, pszSrcFile, __LINE__, IDS_WINCREATEWINDOW); 452 Win_Error(hwndFrame, hwnd, pszSrcFile, __LINE__, 453 PCSZ_WINCREATEWINDOW); 449 454 450 455 hwndDate = WinCreateWindow(hwndFrame, … … 464 469 20, hwndFrame, HWND_TOP, IDM_INFO, NULL, NULL); 465 470 if (!hwndDate) 466 Win_Error2(hwndFrame, hwnd, pszSrcFile, __LINE__, IDS_WINCREATEWINDOW); 471 Win_Error(hwndFrame, hwnd, pszSrcFile, __LINE__, 472 PCSZ_WINCREATEWINDOW); 467 473 468 474 hwndName = WinCreateWindow(hwndFrame, … … 482 488 20, hwndFrame, HWND_TOP, IDM_RENAME, NULL, NULL); 483 489 if (!hwndName) 484 Win_Error2(hwndFrame, hwnd, pszSrcFile, __LINE__, IDS_WINCREATEWINDOW); 490 Win_Error(hwndFrame, hwnd, pszSrcFile, __LINE__, 491 PCSZ_WINCREATEWINDOW); 485 492 486 493 hwndTmp = WinCreateWindow(hwndFrame, … … 499 506 30, hwndFrame, HWND_TOP, MAIN_TOOLS, NULL, NULL); 500 507 if (!hwndTmp) 501 Win_Error2(hwndFrame, hwnd, pszSrcFile, __LINE__, IDS_WINCREATEWINDOW); 508 Win_Error(hwndFrame, hwnd, pszSrcFile, __LINE__, 509 PCSZ_WINCREATEWINDOW); 502 510 503 511 hwndBack = WinCreateWindow(hwndFrame, … … 518 526 519 527 if (!hwndBack) 520 Win_Error2(hwndFrame, hwnd, pszSrcFile, __LINE__, IDS_WINCREATEWINDOW); 528 Win_Error(hwndFrame, hwnd, pszSrcFile, __LINE__, 529 PCSZ_WINCREATEWINDOW); 521 530 522 531 hwndLED = WinCreateWindow(hwndFrame, … … 529 538 12, hwndFrame, HWND_TOP, MAIN_LED, NULL, NULL); 530 539 if (!hwndLED) 531 Win_Error2(hwndFrame, hwnd, pszSrcFile, __LINE__, IDS_WINCREATEWINDOW); 540 Win_Error(hwndFrame, hwnd, pszSrcFile, __LINE__, 541 PCSZ_WINCREATEWINDOW); 532 542 533 543 hwndLEDHdr = WinCreateWindow(hwndFrame, … … 542 552 hwndFrame, HWND_TOP, MAIN_LEDHDR, NULL, NULL); 543 553 if (!hwndLEDHdr) 544 Win_Error2(hwndFrame, hwnd, pszSrcFile, __LINE__, IDS_WINCREATEWINDOW); 554 Win_Error(hwndFrame, hwnd, pszSrcFile, __LINE__, 555 PCSZ_WINCREATEWINDOW); 545 556 546 557 hwndAutoview = WinCreateWindow(hwndFrame, … … 562 573 HWND_TOP, MAIN_AUTOVIEW, NULL, NULL); 563 574 if (!hwndAutoview) 564 Win_Error2(hwndFrame, hwnd, pszSrcFile, __LINE__, IDS_WINCREATEWINDOW); 575 Win_Error(hwndFrame, hwnd, pszSrcFile, __LINE__, 576 PCSZ_WINCREATEWINDOW); 565 577 566 578 hwndAutoMLE = WinCreateWindow(hwndFrame, … … 583 595 HWND_TOP, MAIN_AUTOVIEWMLE, NULL, NULL); 584 596 if (!hwndAutoMLE) 585 Win_Error2(hwndFrame, hwnd, pszSrcFile, __LINE__, IDS_WINCREATEWINDOW); 597 Win_Error(hwndFrame, hwnd, pszSrcFile, __LINE__, 598 PCSZ_WINCREATEWINDOW); 586 599 587 600 oldproc = WinSubclassWindow(hwndAutoMLE, AutoViewProc); -
trunk/dll/comp.c
r1394 r1395 61 61 25 Dec 08 GKY Add code to allow write verify to be turned off on a per drive basis. 62 62 11 Jan 09 GKY Replace font names in the string file with global set at compile in init.c 63 07 Feb 09 GKY Add *DateFormat functions to format dates based on locale 63 64 64 65 ***********************************************************************/ … … 142 143 HDIR hdir = HDIR_CREATE; 143 144 ULONG ulFindCnt; 145 CHAR szCmmaFmtFileSize[81], szDate[11]; 144 146 145 147 // 13 Aug 07 SHL fimxe to use FileToGet … … 161 163 do { 162 164 strcpy(enddir, pffb->achName); 163 if (!(pffb->attrFile & FILE_DIRECTORY)) 164 // 27 Sep 07 SHL fixme to use CommaFmtULL 165 if (!(pffb->attrFile & FILE_DIRECTORY)) { 166 CommaFmtULL(szCmmaFmtFileSize, 167 sizeof(szCmmaFmtFileSize), pffb->cbFile, ' '); 168 FDateFormat(szDate, pffb->fdateLastWrite); 165 169 fprintf(fp, 166 "\"%s\",%u,% llu,%04u/%02u/%02u,%02u:%02u:%02u,%lu,%lu,N\n",170 "\"%s\",%u,%s,%s,%02u%s%02u%s%02u,%lu,%lu,N\n", 167 171 mask, 168 172 enddir - mask, 169 pffb->cbFile,170 (pffb->fdateLastWrite.year + 1980),171 pffb->fdateLastWrite.month,172 pffb->fdateLastWrite.day,173 pffb->ftimeLastWrite.hours,174 pffb->ftimeLastWrite.minutes,173 szCmmaFmtFileSize, 174 szDate, 175 pffb->ftimeLastWrite.hours, 176 TimeSeparator, 177 pffb->ftimeLastWrite.minutes, 178 TimeSeparator, 175 179 pffb->ftimeLastWrite.twosecs, 176 180 pffb->attrFile, 177 pffb->cbList > 4 ? pffb->cbList / 2 : 0); 181 pffb->cbList > 4 ? pffb->cbList / 2 : 0); 182 } 178 183 // Skip . and .. 179 184 else if (recurse && -
trunk/dll/datamin.c
r1391 r1395 25 25 Dos/Win programs from being inserted into the execute dialog with message why. 26 26 11 Jan 09 GKY Replace font names in the string file with global set at compile in init.c 27 07 Feb 09 GKY Eliminate Win_Error2 by moving function names to PCSZs used in Win_Error 28 07 Feb 09 GKY Add *DateFormat functions to format dates based on locale 27 29 28 30 ***********************************************************************/ … … 260 262 MINI_X, 261 263 MINI_Y, hwnd, HWND_TOP, ids[c], NULL, NULL)) { 262 Win_Error2(hwnd, hwnd, pszSrcFile, __LINE__, IDS_WINCREATEWINDOW); 264 Win_Error(hwnd, hwnd, pszSrcFile, __LINE__, 265 PCSZ_WINCREATEWINDOW); 263 266 } 264 267 x += (MINI_X + 4); … … 318 321 WS_VISIBLE, x, y, MINI_X, MINI_Y, hwnd, 319 322 HWND_TOP, MINI_DRIVEA + c, NULL, NULL)) { 320 Win_Error 2(hwnd, hwnd, pszSrcFile, __LINE__,321 IDS_WINCREATEWINDOW);323 Win_Error(hwnd, hwnd, pszSrcFile, __LINE__, 324 PCSZ_WINCREATEWINDOW); 322 325 } 323 326 numdrives++; … … 747 750 case UM_TIMER: 748 751 { 749 CHAR s[134] ;752 CHAR s[134], szDate[11]; 750 753 DATETIME dt; 751 754 … … 754 757 HWND_TOP, 0, 0, 0, 0, SWP_ZORDER); 755 758 if (counter && (counter % 19) && (counter % 20)) { 756 if (!DosGetDateTime(&dt)) { 759 if (!DosGetDateTime(&dt)) { 760 DTDateFormat(szDate, dt); 757 761 sprintf(s, 758 " %02hu :%02hu:%02hu %s %04u/%02u/%02u",759 dt.hours, 760 dt.minutes, 762 " %02hu%s%02hu%s%02hu %s %s", 763 dt.hours, TimeSeparator, 764 dt.minutes, TimeSeparator, 761 765 dt.seconds, 762 766 GetPString(IDS_SUNDAY + dt.weekday), 763 dt.year, dt.month, dt.day);767 szDate); 764 768 WinSetDlgItemText(hwnd, MINI_TIME, s); 765 769 } … … 944 948 numdays, GetPString(IDS_DAYTEXT), &"s"[numdays == 1L]); 945 949 nummins = val % (60L * 24L); 946 sprintf(s + strlen(s), " %lu :%02lu", nummins / 60, nummins % 60);950 sprintf(s + strlen(s), " %lu%s%02lu", nummins / 60, TimeSeparator, nummins % 60); 947 951 WinSetDlgItemText(hwnd, MINI_TIME, s); 948 952 } -
trunk/dll/dircnrs.c
r1394 r1395 54 54 26 Dec 08 GKY Fixed DROPHELP to check for copy as default is action is DO_DEFAULT 55 55 01 Jan 09 GKY Add Seek and Scan to drives & directory context menus pass drive/dir as search root 56 07 Feb 09 GKY Eliminate Win_Error2 by moving function names to PCSZs used in Win_Error 57 07 Feb 09 GKY Move repeated strings to PCSZs. 58 07 Feb 09 GKY Allow user to turn off alert and/or error beeps in settings notebook. 59 07 Feb 09 GKY Add *DateFormat functions to format dates based on locale 56 60 57 61 ***********************************************************************/ … … 987 991 ULONG size; 988 992 989 strcpy(filename, "*.LST");993 strcpy(filename, PCSZ_STARDOTLST); 990 994 size = CCHMAXPATH; 991 995 PrfQueryProfileData(fmprof, appname, "SaveToListName", … … 1470 1474 1471 1475 CNRINFO cnri; 1472 CHAR s[CCHMAXPATH * 2], tf[81], tb[81] ;1476 CHAR s[CCHMAXPATH * 2], tf[81], tb[81], szDate[11]; 1473 1477 PCNRITEM pci; 1474 1478 … … 1500 1504 if (fSplitStatus && hwndStatus2) { 1501 1505 CommaFmtULL(tb, sizeof(tb), pci->cbFile + pci->easize, ' '); 1502 if (!fMoreButtons) 1503 sprintf(s, 1504 " %s %04u/%02u/%02u %02u:%02u:%02u [%s] %s",1506 if (!fMoreButtons) { 1507 DateFormat(szDate, pci->date); 1508 sprintf(s, " %s %s %02u%s%02u%s%02u [%s] %s", 1505 1509 tb, 1506 pci->date.year,1507 pci->date.month,1508 pci->date.day,1509 pci->time.hours,1510 pci->time.minutes,1510 szDate, 1511 pci->time.hours, 1512 TimeSeparator, 1513 pci->time.minutes, 1514 TimeSeparator, 1511 1515 pci->time.seconds, 1512 pci->pszDispAttr, pci->pszFileName); 1516 pci->pszDispAttr, pci->pszFileName); 1517 } 1513 1518 else { 1514 1519 *tf = 0; … … 1525 1530 WinSetWindowText(hwndStatus2, NullStr); 1526 1531 if (fMoreButtons) { 1527 1528 sprintf(s, 1529 "%04u/%02u/%02u %02u:%02u:%02u",1530 pci->date.year,1531 pci->date.month,1532 pci->date.day,1533 pci->time.hours, pci->time.minutes,pci->time.seconds);1532 WinSetWindowText(hwndName, pci->pszFileName); 1533 DateFormat(szDate, pci->date); 1534 sprintf(s, "%s %02u%s%02u%s%02u", 1535 szDate, 1536 pci->time.hours, TimeSeparator, 1537 pci->time.minutes, TimeSeparator, 1538 pci->time.seconds); 1534 1539 WinSetWindowText(hwndDate, s); 1535 1540 WinSetWindowText(hwndAttr, pci->pszDispAttr); … … 2827 2832 Dos_Error(MB_ENTER, rc, HWND_DESKTOP, pszSrcFile, __LINE__, 2828 2833 GetPString(IDS_CANTFINDDIRTEXT), 2829 pci->pszFileName); 2830 DosBeep(250,100); 2834 pci->pszFileName); 2835 if (!fErrorBeepOff) 2836 DosBeep(250,100); 2831 2837 driveserial[toupper(*pci->pszFileName) - 'A'] = -1; 2832 2838 UnFlesh(hwnd, pci); … … 3322 3328 if (fSplitStatus && hwndStatus2) { 3323 3329 CommaFmtULL(tb, sizeof(tb), pci->cbFile + pci->easize, ' '); 3324 if (!fMoreButtons) { 3325 sprintf(s, " %s %04u/%02u/%02u %02u:%02u:%02u [%s] %s", 3326 tb, pci->date.year, 3327 pci->date.month, pci->date.day, pci->time.hours, 3328 pci->time.minutes, pci->time.seconds, 3330 if (!fMoreButtons) { 3331 CHAR date[11]; 3332 3333 DateFormat(date, pci->date); 3334 sprintf(s, " %s %s %02u%s%02u%s%02u [%s] %s", 3335 tb, date, pci->time.hours, TimeSeparator, 3336 pci->time.minutes, TimeSeparator, pci->time.seconds, 3329 3337 pci->pszDispAttr, pci->pszFileName); 3330 3338 } … … 3341 3349 WinSetWindowText(hwndStatus2, s); 3342 3350 } 3343 if (fMoreButtons) { 3344 WinSetWindowText(hwndName, pci->pszFileName); 3345 sprintf(s, "%04u/%02u/%02u %02u:%02u:%02u", 3346 pci->date.year, pci->date.month, 3347 pci->date.day, pci->time.hours, pci->time.minutes, 3348 pci->time.seconds); 3351 if (fMoreButtons) { 3352 CHAR szDate[11]; 3353 3354 WinSetWindowText(hwndName, pci->pszFileName); 3355 DateFormat(szDate, pci->date); 3356 sprintf(s, "%s %02u%s%02u%s%02u", 3357 szDate, pci->time.hours, TimeSeparator, pci->time.minutes, 3358 TimeSeparator, pci->time.seconds); 3349 3359 WinSetWindowText(hwndDate, s); 3350 3360 WinSetWindowText(hwndAttr, pci->pszDispAttr); … … 3677 3687 HWND_TOP, (ULONG) DIR_CNR, NULL, NULL); 3678 3688 if (!dcd->hwndCnr) { 3679 Win_Error 2(hwndClient, hwndClient, pszSrcFile, __LINE__,3680 IDS_WINCREATEWINDOW);3689 Win_Error(hwndClient, hwndClient, pszSrcFile, __LINE__, 3690 PCSZ_WINCREATEWINDOW); 3681 3691 PostMsg(hwndClient, WM_CLOSE, MPVOID, MPVOID); 3682 3692 free(dcd); -
trunk/dll/dirsize.c
r1394 r1395 42 42 23 Aug 08 GKY Fix memory leak (failure to free cnritems) 43 43 10 Dec 08 SHL Integrate exception handler support 44 07 Feb 09 GKY Allow user to turn off alert and/or error beeps in settings notebook. 44 45 45 46 ***********************************************************************/ … … 631 632 WinSendDlgItemMsg(hwnd, DSZ_CNR, CM_SORTRECORD, MPFROMP(SortSizeCnr), 632 633 MPVOID); 633 DosBeep(500, 25); // Wake up user 634 if (!fAlertBeepOff) 635 DosBeep(500, 25); // Wake up user 634 636 return 0; 635 637 … … 1016 1018 pState->dying = TRUE; 1017 1019 pState->chStopFlag = (CHAR)0xff; 1018 DosBeep(1000, 100); // Complain? 1020 if (!fAlertBeepOff) 1021 DosBeep(1000, 100); // Complain? 1019 1022 } 1020 1023 else -
trunk/dll/eas.c
r1347 r1395 22 22 01 Sep 07 GKY Use xDosSetPathInfo to fix case where FS3 buffer crosses 64k boundry 23 23 29 Feb 08 GKY Use xfree where appropriate 24 07 Feb 09 GKY Allow user to turn off alert and/or error beeps in settings notebook. 24 25 25 26 ***********************************************************************/ … … 157 158 else { 158 159 if (CheckEA(head, s)) { 159 DosBeep(50, 100); 160 if (!fAlertBeepOff) 161 DosBeep(50, 100); 160 162 WinSetDlgItemText(hwnd, EAC_TEXT, 161 163 GetPString(IDS_EANAMEEXISTSTEXT)); … … 164 166 for (x = 0; *forbidden[x]; x++) { 165 167 if (!strcmp(forbidden[x], s)) { 166 DosBeep(50, 100); 168 if (!fAlertBeepOff) 169 DosBeep(50, 100); 167 170 WinSetDlgItemText(hwnd, EAC_TEXT, 168 171 GetPString(IDS_EANAMERESERVEDTEXT)); … … 177 180 if (!strcmp(restypes[x].name, s)) { 178 181 if (type != restypes[x].type) { 179 DosBeep(50, 100); 182 if (!fAlertBeepOff) 183 DosBeep(50, 100); 180 184 WinSetDlgItemText(hwnd, EAC_TEXT, 181 185 GetPString(IDS_EAWRONGTYPETEXT)); -
trunk/dll/errutil.c
r1373 r1395 29 29 05 Jan 08 SHL Renamed from error.c to match errutil.h 30 30 18 Dec 08 SHL Show thread id in DbgMsg 31 07 Feb 09 GKY Allow user to turn off alert and/or error beeps in settings notebook. 32 07 Feb 09 GKY Eliminate Win_Error2 by moving function names to PCSZs used in Win_Error 33 07 Feb 09 GKY Allow user to turn off alert and/or error beeps in settings notebook. 31 34 32 35 ***********************************************************************/ … … 40 43 #define INCL_DOSERRORS 41 44 #define INCL_DOSPROCESS // PPIB PTIB 45 #define INCL_LONGLONG 42 46 43 47 #include "errutil.h" 44 48 #include "strutil.h" // GetPString 45 49 #include "fm3str.h" 50 #include "notebook.h" // fErrorBeepOff 46 51 47 52 #pragma data_seg(GLOBAL2) … … 135 140 } 136 141 137 if (strchr(szMsg, ' ') == NULL) 138 strcat(szMsg, " failed"); // Assume simple function name 142 if (strchr(szMsg, ' ') == NULL) { 143 strcat(szMsg, " "); 144 strcat(szMsg, GetPString(IDS_FAILEDTEXT)); // Assume simple function name 145 } 139 146 140 147 DosErrClass(ulRC, &Class, &action, &Locus); … … 185 192 } // Dos_Error 186 193 187 / /== Dos_Error2: report Dos...() error using passed message id ===194 /*== Dos_Error2: report Dos...() error using passed message id === 188 195 189 196 INT Dos_Error2(ULONG mb_type, ULONG ulRC, HWND hwndOwner, … … 192 199 return Dos_Error(mb_type, ulRC, hwndOwner, pszSrcFile, uSrcLineNo, 193 200 GetPString(idMsg)); 194 } // Dos_Error2 201 } // Dos_Error2 */ 195 202 196 203 /** … … 224 231 } 225 232 226 if (strchr(pszBuf, ' ') == NULL) 227 strcat(pszBuf, " failed"); // Assume simple function name 233 if (strchr(pszBuf, ' ') == NULL) { 234 strcat(pszBuf, " "); 235 strcat(pszBuf, GetPString(IDS_FAILEDTEXT)); // Assume simple function name 236 } 228 237 229 238 // Append file name and line number and trailing space … … 303 312 } 304 313 305 if (strchr(szMsg, ' ') == NULL) 306 strcat(szMsg, " failed"); // Assume simple function name 314 if (strchr(szMsg, ' ') == NULL) { 315 strcat(szMsg, " "); 316 strcat(szMsg, GetPString(IDS_FAILEDTEXT)); // Assume simple function name 317 } 307 318 308 319 sprintf(szMsg + strlen(szMsg), 309 320 GetPString(IDS_GENERR1TEXT), pszSrcFile, uSrcLineNo); 310 321 311 showMsg(MB_ICONEXCLAMATION, HWND_DESKTOP, DEBUG_STRING, szMsg, TRUE);322 showMsg(MB_ICONEXCLAMATION, HWND_DESKTOP, GetPString(IDS_DEBUG_STRING), szMsg, TRUE); 312 323 313 324 } // Runtime_Error … … 358 369 if (!hwndOwner) 359 370 hwndOwner = HWND_DESKTOP; 360 361 DosBeep(250, 100);371 if (!fErrorBeepOff) 372 DosBeep(250, 100); 362 373 363 374 return WinMessageBox(HWND_DESKTOP, // Parent … … 386 397 } // Win_Error 387 398 388 / /== Win_Error2: report Win...() error using passed message id ===399 /*== Win_Error2: report Win...() error using passed message id === 389 400 390 401 VOID Win_Error2(HWND hwndErr, HWND hwndOwner, … … 393 404 Win_Error(hwndErr, hwndOwner, pszSrcFile, uSrcLineNo, GetPString(idMsg)); 394 405 395 } // Win_Error2 406 } // Win_Error2 */ 396 407 397 408 /** … … 417 428 fputc('\n', stderr); 418 429 fflush(stderr); 419 420 DosBeep(250, 100);430 if (!fErrorBeepOff) 431 DosBeep(250, 100); 421 432 422 433 } // Win_Error_NoMsgBox -
trunk/dll/errutil.h
r1196 r1395 10 10 11 11 05 Jan 08 SHL Move from fm3dll.h to here 12 07 Feb 09 GKY Eliminate Win_Error2 by moving function names to PCSZs used in Win_Error 12 13 13 14 ***********************************************************************/ … … 23 24 INT Dos_Error(ULONG mb_type, ULONG ulRC, HWND hwndOwner, 24 25 PCSZ pszSrcFile, UINT uSrcLineNo, PCSZ pszFmt, ...); 25 INT Dos_Error2(ULONG mb_type, ULONG ulRC, HWND hwndOwner, PCSZ pszSrcFile,26 UINT uSrcLineNo, UINT idMsg);26 //INT Dos_Error2(ULONG mb_type, ULONG ulRC, HWND hwndOwner, PCSZ pszSrcFile, 27 // UINT uSrcLineNo, UINT idMsg); 27 28 ULONG GetMSecTimer(void); 28 29 VOID Runtime_Error(PCSZ pszSrcFile, UINT uSrcLineNo, PCSZ pszFmt, ...); … … 31 32 VOID Win_Error(HWND hwndErr, HWND hwndOwner, 32 33 PCSZ pszSrcFile, UINT uSrcLineNo, PCSZ pszFmt, ...); 33 VOID Win_Error2(HWND hwndErr, HWND hwndOwner, PCSZ pszSrcFile,34 UINT uSrcLineNo, UINT idMsg);34 //VOID Win_Error2(HWND hwndErr, HWND hwndOwner, PCSZ pszSrcFile, 35 // UINT uSrcLineNo, UINT idMsg); 35 36 VOID Win_Error_NoMsgBox(HWND hwndErr, HWND hwndOwner, 36 37 PCSZ pszSrcFile, UINT uSrcLineNo, PCSZ pszFmt, ...); -
trunk/dll/extract.c
r1349 r1395 17 17 29 Nov 08 GKY Add the option of creating a subdirectory from the arcname 18 18 for the extract path. 19 07 Feb 09 GKY Allow user to turn off alert and/or error beeps in settings notebook. 19 20 20 21 ***********************************************************************/ … … 452 453 } 453 454 } 454 DosBeep(50, 100); // Complain a refuse to quit 455 if (!fErrorBeepOff) 456 DosBeep(50, 100); // Complain a refuse to quit 455 457 break; 456 458 -
trunk/dll/filldir.c
r1358 r1395 64 64 25 Dec 08 GKY Add code to allow write verify to be turned off on a per drive basis 65 65 25 Dec 08 GKY Add ProcessDirectoryThread to allow optional recursive drive scan at startup. 66 07 Feb 09 GKY Eliminate Win_Error2 by moving function names to PCSZs used in Win_Error 66 67 67 68 ***********************************************************************/ … … 1056 1057 MPFROMLONG(ulSelCnt)); 1057 1058 if (!pciFirst) { 1058 Win_Error 2(hwndCnr, HWND_DESKTOP, pszSrcFile, __LINE__,1059 IDS_CMALLOCRECERRTEXT);1059 Win_Error(hwndCnr, HWND_DESKTOP, pszSrcFile, __LINE__, 1060 GetPString(IDS_CMALLOCRECERRTEXT)); 1060 1061 ok = FALSE; 1061 1062 ullTotalBytes = 0; … … 1089 1090 CM_INSERTRECORD, 1090 1091 MPFROMP(pciFirst), MPFROMP(&ri))) { 1091 Win_Error 2(hwndCnr, HWND_DESKTOP, pszSrcFile, __LINE__,1092 IDS_CMINSERTERRTEXT);1092 Win_Error(hwndCnr, HWND_DESKTOP, pszSrcFile, __LINE__, 1093 GetPString(IDS_CMINSERTERRTEXT)); 1093 1094 ok = FALSE; 1094 1095 ullTotalBytes = 0; … … 1148 1149 MPFROMLONG(EXTRA_RECORD_BYTES), MPFROMLONG(ulTotal)); 1149 1150 if (!pciFirst) { 1150 Win_Error 2(hwndCnr, HWND_DESKTOP, pszSrcFile, __LINE__,1151 IDS_CMALLOCRECERRTEXT);1151 Win_Error(hwndCnr, HWND_DESKTOP, pszSrcFile, __LINE__, 1152 GetPString(IDS_CMALLOCRECERRTEXT)); 1152 1153 ok = FALSE; 1153 1154 ullTotalBytes = 0; … … 1181 1182 if (!WinSendMsg(hwndCnr, CM_INSERTRECORD, 1182 1183 MPFROMP(pciFirst), MPFROMP(&ri))) { 1183 Win_Error 2(hwndCnr, HWND_DESKTOP, pszSrcFile, __LINE__,1184 IDS_CMINSERTERRTEXT);1184 Win_Error(hwndCnr, HWND_DESKTOP, pszSrcFile, __LINE__, 1185 GetPString(IDS_CMINSERTERRTEXT)); 1185 1186 ok = FALSE; 1186 1187 ullTotalBytes = 0; … … 1326 1327 rc, 1327 1328 HWND_DESKTOP, 1328 pszSrcFile, __LINE__, GetPString(IDS_FILLDIRQCURERRTEXT));1329 pszSrcFile, __LINE__, PCSZ_FILLDIRQCURERRTEXT); 1329 1330 exit(0); 1330 1331 } … … 1344 1345 1345 1346 if (!pciFirst) { 1346 Win_Error 2(hwndCnr, HWND_DESKTOP, pszSrcFile, __LINE__, IDS_CMALLOCRECERRTEXT);1347 Win_Error(hwndCnr, HWND_DESKTOP, pszSrcFile, __LINE__, GetPString(IDS_CMALLOCRECERRTEXT)); 1347 1348 // 04 Jan 08 SHL fixme not just up and die 1348 1349 exit(0); … … 1537 1538 CM_INSERTRECORD, MPFROMP(pciFirst), MPFROMP(&ri))) 1538 1539 { 1539 Win_Error 2(hwndCnr, HWND_DESKTOP, pszSrcFile, __LINE__,1540 IDS_CMINSERTERRTEXT);1540 Win_Error(hwndCnr, HWND_DESKTOP, pszSrcFile, __LINE__, 1541 GetPString(IDS_CMINSERTERRTEXT)); 1541 1542 } 1542 1543 } … … 1628 1629 CM_INSERTRECORD, 1629 1630 MPFROMP(pci), MPFROMP(&ri))) { 1630 Win_Error 2(hwndCnr, HWND_DESKTOP, pszSrcFile, __LINE__,1631 IDS_CMINSERTERRTEXT);1631 Win_Error(hwndCnr, HWND_DESKTOP, pszSrcFile, __LINE__, 1632 GetPString(IDS_CMINSERTERRTEXT)); 1632 1633 FreeCnrItem(hwndCnr, pci); 1633 1634 } … … 1908 1909 1909 1910 if (!WinSendMsg(hwnd, CM_FREERECORD, MPFROMP(&pci), MPFROMSHORT(1))) { 1910 // Win_Error2(hwnd, HWND_DESKTOP, pszSrcFile, __LINE__,IDS_CMFREEERRTEXT);1911 1911 Win_Error(hwnd, HWND_DESKTOP, pszSrcFile, __LINE__, 1912 1912 "CM_FREERECORD hwnd %x pci %p file %s", … … 1934 1934 if (usCount) { 1935 1935 if (!WinSendMsg(hwnd, CM_FREERECORD, MPFROMP(&pci), MPFROMSHORT(usCount))) { 1936 // Win_Error2(hwnd, HWND_DESKTOP, pszSrcFile, __LINE__,IDS_CMFREEERRTEXT);1937 1936 Win_Error(hwnd, HWND_DESKTOP, pszSrcFile, __LINE__,"CM_FREERECORD hwnd %x pci %p cnt %u", hwnd, pci, usCount); 1938 1937 } … … 1993 1992 remaining = (INT)WinSendMsg(hwnd, CM_REMOVERECORD, MPFROMP(&pciFirst), MPFROM2SHORT(usCnt, usFlags)); 1994 1993 if (remaining == -1) { 1995 // Win_Error2(hwnd, HWND_DESKTOP, pszSrcFile, __LINE__,IDS_CMREMOVEERRTEXT);1996 1994 Win_Error(hwnd, HWND_DESKTOP, pszSrcFile, __LINE__,"CM_REMOVERECORD hwnd %x pci %p cnt %u", hwnd, pciFirst, usCnt); 1997 1995 } -
trunk/dll/filter.c
r1347 r1395 17 17 19 Jul 08 GKY Replace save_dir2(dir) with pFM2SaveDirectory and use BldFullPathName 18 18 24 Aug 08 GKY Warn full drive on save of .DAT file; prevent loss of existing file 19 07 Feb 09 GKY Eliminate Win_Error2 by moving function names to PCSZs used in Win_Error 20 07 Feb 09 GKY Allow user to turn off alert and/or error beeps in settings notebook. 19 21 20 22 ***********************************************************************/ … … 406 408 50, 407 409 swpE.cy, hwnd, HWND_TOP, 65535, NULL, NULL)) { 408 Win_Error2(hwnd, hwnd, pszSrcFile, __LINE__, IDS_WINCREATEWINDOW); 410 Win_Error(hwnd, hwnd, pszSrcFile, __LINE__, 411 PCSZ_WINCREATEWINDOW); 409 412 } 410 413 if (!WinCreateWindow(hwnd, … … 417 420 swpL.cx - 54, 418 421 swpE.cy, hwnd, HWND_TOP, MSK_TEXT, NULL, NULL)) { 419 Win_Error2(hwnd, hwnd, pszSrcFile, __LINE__, IDS_WINCREATEWINDOW); 422 Win_Error(hwnd, hwnd, pszSrcFile, __LINE__, 423 PCSZ_WINCREATEWINDOW); 420 424 } 421 425 WinSendDlgItemMsg(hwnd, … … 652 656 WinDismissDlg(hwnd, 1); 653 657 } 654 else 658 else if (!fAlertBeepOff) 655 659 DosBeep(50, 100); // MSK_DELETE 656 660 } -
trunk/dll/fm3dlg.h
r1375 r1395 30 30 25 Dec 08 GKY Add code to allow write verify to be turned off on a per drive basis 31 31 01 Jan 09 GKY Add option to rescan tree container on eject of removable media 32 07 Feb 09 GKY Allow user to turn off alert and/or error beeps in settings notebook. 32 33 33 34 ***********************************************************************/ … … 650 651 #define CFGG_CMDLNLNGTH 25216 651 652 #define CFGG_TRASHCAN 25217 653 #define CFGG_ALERTBEEPOFF 25218 654 #define CFGG_ERRORBEEPOFF 25219 652 655 653 656 #define CFGB_FRAME 25250 -
trunk/dll/fm3res.dlg
r1377 r1395 43 43 25 Dec 08 GKY Add ProcessDirectoryThread to allow optional recursive drive scan at startup 44 44 01 Jan 09 GKY Add option to rescan tree container on eject of removable media 45 07 Feb 09 GKY Allow user to turn off alert and/or error beeps in settings notebook. 45 46 46 47 ***********************************************************************/ … … 712 713 CHECKBOX "System", FLE_SYSTEM, 243, 96, 50, 10, 713 714 BS_NOPOINTERFOCUS | NOT WS_TABSTOP 714 CHECKBOX "Readable", FLE_READABLE, 4, 80, 58, 10,715 BS_NOPOINTERFOCUS | NOT WS_TABSTOP 716 CHECKBOX "Writeable", FLE_WRITEABLE, 67, 80, 58, 10,717 BS_NOPOINTERFOCUS | NOT WS_TABSTOP 718 CHECKBOX "Open", FLE_OPEN, 1 31, 80, 40, 10, BS_NOPOINTERFOCUS |715 CHECKBOX "Readable", FLE_READABLE, 4, 80, 38, 10, 716 BS_NOPOINTERFOCUS | NOT WS_TABSTOP 717 CHECKBOX "Writeable", FLE_WRITEABLE, 55, 80, 38, 10, 718 BS_NOPOINTERFOCUS | NOT WS_TABSTOP 719 CHECKBOX "Open", FLE_OPEN, 101, 80, 30, 10, BS_NOPOINTERFOCUS | 719 720 NOT WS_TABSTOP 720 CONTROL "Is Archive", FLE_ISARCHIVE, 17 6, 80, 58, 10,721 CONTROL "Is Archive", FLE_ISARCHIVE, 177, 80, 35, 10, 721 722 WC_BUTTON, BS_3STATE | BS_NOPOINTERFOCUS | 722 723 WS_VISIBLE 723 CONTROL "Is Binary", FLE_BINARY, 276, 80, 54, 10, WC_BUTTON,724 CONTROL "Is Binary", FLE_BINARY, 135, 80, 35, 10, WC_BUTTON, 724 725 BS_3STATE | BS_NOPOINTERFOCUS | WS_VISIBLE 725 LTEXT "", FLE_ARCNAME, 234, 81, 38, 8726 CTEXT "", FLE_ARCNAME, 213, 78, 93, 8 726 727 // PRESPARAMS PP_FONTNAMESIZE, "8.Helvetica" 727 728 CHECKBOX "OS/2 Full screen", FLE_OS2FS, 9, 57, 90, 10, … … 2782 2783 AUTOCHECKBOX "Con~firm target", CFGG_CONFIRMTARGET, 4, 56, 106, 2783 2784 10 2785 AUTOCHECKBOX "Alert beep off", CFGG_ALERTBEEPOFF, 4, 44, 106, 2786 10 2784 2787 LTEXT "Target directory:", -1, 4, 34, 102, 8 2785 2788 ENTRYFIELD "", CFGG_TARGETDIR, 6, 22, 246, 8, ES_MARGIN … … 2797 2800 AUTOCHECKBOX "Delete = move to ~trashcan", CFGG_TRASHCAN, 122, 56, 126, 2798 2801 10 2799 LTEXT "Command line length:", -1, 122, 44, 60, 10, NOT WS_GROUP 2800 CONTROL "", CFGG_CMDLNLNGTH, 184, 46, 44, 10, WC_SPINBUTTON, 2802 AUTOCHECKBOX "No beep on error", CFGG_ERRORBEEPOFF, 122, 44, 126, 2803 10 2804 LTEXT "Command line length:", -1, 122, 4, 60, 10, NOT WS_GROUP 2805 CONTROL "", CFGG_CMDLNLNGTH, 184, 6, 44, 10, WC_SPINBUTTON, 2801 2806 SPBS_NUMERICONLY | SPBS_MASTER | SPBS_SERVANT | 2802 2807 SPBS_JUSTCENTER | WS_TABSTOP | SPBS_FASTSPIN | -
trunk/dll/fm3res.rc
r1394 r1395 45 45 11 Jan 08 GKY Move strings that will need translating to stringtable from sting file cut to 46 46 255 where necessary 47 07 Feb 09 GKY Eliminate Win_Error2 by moving function names to PCSZs used in Win_Error 47 48 48 49 ***********************************************************************/ … … 2406 2407 IDS_EDITTEXT "Edit" 2407 2408 IDS_NOTPROTECTONLYEXE "The file %s is a Dos or Windows executible, however Dos and WinOS2 are not currently activated on this system." 2409 IDS_INIFAILURETEXT "Check INI header failed will attempt to replace with backup if backup fails or not found will open with new ini" 2408 2410 IDS_SHUTDOWNSTATE "FM2Shutdown" 2409 2411 IDS_HELPCMDTEXT "/HELP" … … 2450 2452 IDS_NOKEEPCMDTEXT "/NOKEEP" 2451 2453 IDS_FILTERCMDTEXT "/FILTER" 2452 IDS_FM2CMDHELPHDRTEXT " 2454 IDS_FM2CMDHELPHDRTEXT "FM/2 mini-command line help" 2453 2455 IDS_MISSINGTEXT "Some text is missing" 2454 2456 IDS_TOOLHELPTEXTBLANK "You need to provide both button text & help." … … 2660 2662 IDS_NOFILESFOUNDTEXT "No files found." 2661 2663 IDS_VIEWHELPFILESTEXT "FM/2: View HELP files" 2664 IDS_DEBUG_STRING "Debug -- please report to author" 2662 2665 IDS_GENERR1TEXT "\nModule: %s Line number: %u" 2663 IDS_GENERR2TEXT " 2666 IDS_GENERR2TEXT "Error Message Information" 2664 2667 IDS_DOSERR1TEXT "\nModule: %s Line number: %u\nOS/2 error: %d\nClass: %s\nAction: %s\nLocation: %s" 2665 IDS_DOSERR2TEXT " 2668 IDS_DOSERR2TEXT "OS/2 Error Message Information" 2666 2669 IDS_ERRCLASS1TEXT "Out of resource" 2667 2670 IDS_ERRCLASS2TEXT "Temporary situation" … … 2915 2918 IDS_INIPRFRESETFAILEDTEXT "PrfReset failed." 2916 2919 IDS_INISWAPOS2INISTITLETEXT "FM/2: Swap OS/2 INIs " 2917 IDS_INIQUERYPRFFAILEDTEXT "PrfQueryProfile failed."2918 2920 IDS_SUCCESSTEXT "Success!" 2919 2921 IDS_INIEDITINITITLETEXT "FM/2: Edit INI entry" … … 3136 3138 IDS_CANTLOADHELPTEXT "Can't load help.%s" 3137 3139 IDS_NOHELPACCEPTTEXT " I'll continue, but you should find FM3.HLP and place it into FM/2's working directory." 3138 IDS_MISMATCHTITLETEXT " 3140 IDS_MISMATCHTITLETEXT "EXE/DLL Mismatch warning!" 3139 3141 IDS_MISMATCHTEXT "The EXE file you're running is from a newer version than the DLL. Please reinstall _all_ the files from the warpin archive so that FM/2 can run properly (overwrite existing files, and be sure that no parts of FM/2 are running while you reinstall)." 3140 3142 IDS_CHECKSYSTEMCLOCKTEXT "Check your system clock." … … 3229 3231 IDS_TREESTATUSSTARTTEXT " [%c: \"%s\" SN: %08lx%s]" 3230 3232 IDS_GREPFILETEXT "; FM/2 seek and scan mask file, one mask set per line\n" 3231 IDS_WINCREATEWINDOW "WinCreateWindow"3232 3233 IDS_CMINSERTERRTEXT "Record insert failed" 3233 3234 IDS_CMALLOCRECERRTEXT "Record allocation failed" 3234 IDS_PRFQUERYPROFILESIZE "PrfQueryProfileSize"3235 IDS_PRFQUERYPROFILEDATA "PrfQueryProfileData"3236 IDS_FILLDIRQCURERRTEXT "DosQCurDisk failed"3237 3235 IDS_NOWINDOWTEXT "No window" 3238 3236 IDS_MAKEARCTITLETEXT "FM/2: Makearc\32\32\32\32\32\32\32\32\32\32\32\32\32\32\32\32\32\32\32\32\32\32" … … 3250 3248 IDS_CLEARTARGETTEXT "Do you want to clear the Target directory (in other words, have no preset Target directory)?" 3251 3249 IDS_TARGETDIRTITLETEXT "Target:\32" 3252 IDS_SUGGESTTITLETEXT " 3250 IDS_SUGGESTTITLETEXT "FM/2 startup suggestion:\32\32\32\32\32\32\32\32\32\32\32\32\32\32\32\32\32\32\32\32" 3253 3251 IDS_SUGGEST2TEXT " -- this includes one or more drives you had excluded, by the way" 3254 3252 IDS_NOTEBUBBLE1TEXT "~Bubbles" -
trunk/dll/fm3str.h
r1394 r1395 28 28 255 where necessary 29 29 04 Feb 09 SHL Switch to STRINGTABLE 30 07 Feb 09 GKY Eliminate Win_Error2 by moving function names to PCSZs used in Win_Error 30 31 31 32 ***********************************************************************/ … … 87 88 #define IDS_10SYSPROTEXT 49 88 89 #define IDS_NOTPROTECTONLYEXE 50 90 #define IDS_INIFAILURETEXT 51 89 91 #define IDS_8HELVTEXT 52 90 92 #define IDS_6HELVTEXT 53 … … 593 595 #define IDS_INSTANTHELPTITLETEXT 563 594 596 #define IDS_INSTANTHELPTEXT 564 595 //Moved codepages to a character array in codepage.c 11 Jan 09 GKY 597 //Moved codepages to a character array in codepage.c 11 Jan 09 GKY 565-588 598 #define IDS_DEBUG_STRING 565 596 599 #define IDS_DOSSTARTSESSIONFAILEDTEXT 589 597 600 #define IDS_DOSEXECPGMFAILEDTEXT 590 … … 622 625 #define IDS_INIPRFRESETFAILEDTEXT 627 623 626 #define IDS_INISWAPOS2INISTITLETEXT 628 624 #define IDS_INIQUERYPRFFAILEDTEXT 629625 627 #define IDS_SUCCESSTEXT 630 626 628 #define IDS_INIEDITINITITLETEXT 631 … … 952 954 #define IDS_TREESTATUSSTARTTEXT 960 953 955 #define IDS_GREPFILETEXT 961 954 #define IDS_WINCREATEWINDOW 962955 956 #define IDS_CMINSERTERRTEXT 963 956 957 #define IDS_CMALLOCRECERRTEXT 964 957 #define IDS_PRFQUERYPROFILESIZE 965958 #define IDS_PRFQUERYPROFILEDATA 966959 #define IDS_FILLDIRQCURERRTEXT 967960 958 #define IDS_NOWINDOWTEXT 968 961 959 #define IDS_2SYSTEMVIOTEXT 969 -
trunk/dll/grep.c
r1303 r1395 30 30 29 Feb 08 GKY Use xfree where appropriate 31 31 29 Nov 08 GKY Remove or replace with a mutex semaphore DosEnterCriSec where appropriate. 32 07 Feb 09 GKY Allow user to turn off alert and/or error beeps in settings notebook. 32 33 33 34 ***********************************************************************/ … … 1519 1520 else { 1520 1521 // Insufficient memory - fall back to slow method - fixme to saymsg? 1521 DosBeep(50, 100); 1522 if (!fErrorBeepOff) 1523 DosBeep(50, 100); 1522 1524 if (!hwndStatus) 1523 1525 WinSetWindowText(grep->hwndCurFile, GetPString(IDS_GREPDUPECOMPARINGTEXT)); -
trunk/dll/grep2.c
r1394 r1395 24 24 10 Dec 08 SHL Integrate exception handler support 25 25 01 Jan 09 GKY Add Seek and Scan to drives & directory context menus pass drive/dir as search root 26 07 Feb 09 GKY Allow user to turn off alert and/or error beeps in settings notebook. 26 27 27 28 fixme for more excess locals to be gone … … 157 158 bstrip(p); 158 159 if (!*p) { 159 DosBeep(50, 100); 160 if (!fAlertBeepOff) 161 DosBeep(50, 100); 160 162 WinSetFocus(HWND_DESKTOP, WinWindowFromID(hwnd, ENV_NAME)); 161 163 } … … 851 853 bstrip(p); 852 854 if (!*p) { 853 DosBeep(50, 100); 855 if (!fAlertBeepOff) 856 DosBeep(50, 100); 854 857 WinSetFocus(HWND_DESKTOP, WinWindowFromID(hwnd, GREP_MASK)); 855 858 free(p); -
trunk/dll/info.c
r1391 r1395 29 29 to prevent duplicate directory names in tree following a copy before initial scan. 30 30 11 Jan 08 GKY Add Write verify off and recures scan to drive info display when appropriate. 31 07 Feb 09 GKY Allow user to turn off alert and/or error beeps in settings notebook. 32 07 Feb 09 GKY Add *DateFormat functions to format dates based on locale 31 33 32 34 ***********************************************************************/ … … 657 659 CHAR s[97]; 658 660 CHAR szCmmaFmtFileSize[81], szCmmaFmtEASize[81]; 659 CHAR szCmmaFmtFileEASize[81], szCmmaFmtFileEASizeK[81] ;661 CHAR szCmmaFmtFileEASize[81], szCmmaFmtFileEASizeK[81], szDate[11]; 660 662 FILEFINDBUF4L fs; 661 663 HDIR hdir = HDIR_CREATE; … … 675 677 SHORT sSelect, numitems; 676 678 677 DosBeep(250, 100); // Wake up user 679 if (!fAlertBeepOff) 680 DosBeep(250, 100); // Wake up user 678 681 sSelect = (SHORT) WinSendDlgItemMsg(hwnd, 679 682 FLE_NAME, … … 696 699 } 697 700 else { 698 DosFindClose(hdir); 699 sprintf(s, 700 "%04u/%02u/%02u %02u:%02u:%02u", 701 1980 + fs.fdateLastWrite.year, 702 fs.fdateLastWrite.month, 703 fs.fdateLastWrite.day, 704 fs.ftimeLastWrite.hours, 705 fs.ftimeLastWrite.minutes, fs.ftimeLastWrite.twosecs * 2); 701 DosFindClose(hdir); 702 FDateFormat(szDate, fs.fdateLastWrite); 703 sprintf(s, "%s %02u%s%02u%s%02u", 704 szDate, 705 fs.ftimeLastWrite.hours, TimeSeparator, 706 fs.ftimeLastWrite.minutes, TimeSeparator, fs.ftimeLastWrite.twosecs * 2); 706 707 WinSetDlgItemText(hwnd, FLE_LASTWRITE, s); 707 708 if (fs.fdateCreation.year && 708 fs.fdateCreation.month && fs.fdateCreation.day) { 709 sprintf(s, 710 "%04u/%02u/%02u %02u:%02u:%02u", 711 1980 + fs.fdateCreation.year, 712 fs.fdateCreation.month, 713 fs.fdateCreation.day, 714 fs.ftimeCreation.hours, 715 fs.ftimeCreation.minutes, fs.ftimeCreation.twosecs * 2); 709 fs.fdateCreation.month && fs.fdateCreation.day) { 710 FDateFormat(szDate, fs.fdateCreation); 711 sprintf(s, "%s %02u%s%02u%s%02u", 712 szDate, 713 fs.ftimeCreation.hours, TimeSeparator, 714 fs.ftimeCreation.minutes, TimeSeparator, fs.ftimeCreation.twosecs * 2); 716 715 WinSetDlgItemText(hwnd, FLE_CREATE, s); 717 716 } 718 717 if (fs.fdateLastAccess.year && 719 fs.fdateLastAccess.month && fs.fdateLastAccess.day) { 720 sprintf(s, 721 "%04u/%02u/%02u %02u:%02u:%02u", 722 1980 + fs.fdateLastAccess.year, 723 fs.fdateLastAccess.month, 724 fs.fdateLastAccess.day, 725 fs.ftimeLastAccess.hours, 726 fs.ftimeLastAccess.minutes, fs.ftimeLastAccess.twosecs * 2); 718 fs.fdateLastAccess.month && fs.fdateLastAccess.day) { 719 FDateFormat(szDate, fs.fdateLastAccess); 720 sprintf(s, "%s %02u%s%02u%s%02u", 721 szDate, 722 fs.ftimeLastAccess.hours, TimeSeparator, 723 fs.ftimeLastAccess.minutes, TimeSeparator, fs.ftimeLastAccess.twosecs * 2); 727 724 WinSetDlgItemText(hwnd, FLE_LASTACCESS, s); 728 725 } -
trunk/dll/inis.c
r1391 r1395 29 29 10 Dec 08 SHL Integrate exception handler support 30 30 11 Jan 09 GKY Replace font names in the string file with global set at compile in init.c 31 07 Feb 09 GKY Move repeated strings to PCSZs. 32 07 Feb 09 GKY Allow user to turn off alert and/or error beeps in settings notebook. 33 07 Feb 09 GKY Eliminate Win_Error2 by moving function names to PCSZs used in Win_Error 31 34 32 35 ***********************************************************************/ … … 701 704 WinQueryWindowText(hwndMLE, 8192, s); 702 705 if (!*s) { 703 DosBeep(250, 100); 706 if (!fAlertBeepOff) 707 DosBeep(250, 100); 704 708 break; 705 709 } … … 722 726 LM_QUERYITEMCOUNT, MPVOID, MPVOID); 723 727 if (!numitems) { 724 DosBeep(250, 100); 728 if (!fAlertBeepOff) 729 DosBeep(250, 100); 725 730 break; 726 731 } … … 930 935 bstrip(inirec->app2); 931 936 if (!*inirec->app2) { 932 DosBeep(50, 100); 937 if (!fAlertBeepOff) 938 DosBeep(50, 100); 933 939 break; 934 940 } … … 937 943 bstrip(inirec->key2); 938 944 if (!*inirec->key2) { 939 DosBeep(50, 100); 945 if (!fAlertBeepOff) 946 DosBeep(50, 100); 940 947 break; 941 948 } … … 1005 1012 else 1006 1013 *filename = 0; 1007 strcat(filename, "*.INI");1014 strcat(filename, PCSZ_STARDOTINI); 1008 1015 if (insert_filename(hwnd, filename, TRUE, FALSE) && *filename) 1009 1016 WinSetDlgItemText(hwnd, id, filename); … … 1114 1121 else 1115 1122 *filename = 0; 1116 strcat(filename, "*.INI");1123 strcat(filename, PCSZ_STARDOTINI); 1117 1124 if (insert_filename(hwnd, filename, TRUE, FALSE) && *filename) 1118 1125 WinSetDlgItemText(hwnd, id, filename); … … 1145 1152 prfp.pszSysName = (PSZ) oldsysini; 1146 1153 if (!PrfQueryProfile(WinQueryAnchorBlock(hwnd), &prfp)) { 1147 1148 GetPString(IDS_INIQUERYPRFFAILEDTEXT));1154 Win_Error(hwnd, hwnd, __FILE__, __LINE__, 1155 PCSZ_INIQUERYPRFTEXT); 1149 1156 break; 1150 1157 } … … 1641 1648 if (!inidata || !*inidata->ininame || !*inidata->applname || 1642 1649 !inidata->keyname) { 1643 DosBeep(50, 100); 1650 if (!fAlertBeepOff) 1651 DosBeep(50, 100); 1644 1652 break; 1645 1653 } … … 1835 1843 WS_VISIBLE | LS_HORZSCROLL | LS_NOADJUSTPOS, 0, 0, 0, 0, hwnd, 1836 1844 HWND_TOP, INI_APPLIST, NULL, NULL)) { 1837 Win_Error2(hwnd, hwnd, pszSrcFile, __LINE__, IDS_WINCREATEWINDOW); 1845 Win_Error(hwnd, hwnd, pszSrcFile, __LINE__, 1846 PCSZ_WINCREATEWINDOW); 1838 1847 } 1839 1848 if (!WinCreateWindow … … 1841 1850 WS_VISIBLE | LS_HORZSCROLL | LS_NOADJUSTPOS, 0, 0, 0, 0, hwnd, 1842 1851 HWND_TOP, INI_KEYLIST, NULL, NULL)) { 1843 Win_Error2(hwnd, hwnd, pszSrcFile, __LINE__, IDS_WINCREATEWINDOW); 1852 Win_Error(hwnd, hwnd, pszSrcFile, __LINE__, 1853 PCSZ_WINCREATEWINDOW); 1844 1854 } 1845 1855 if (!WinCreateWindow … … 1847 1857 WS_VISIBLE | LS_HORZSCROLL | LS_NOADJUSTPOS, 0, 0, 0, 0, hwnd, 1848 1858 HWND_TOP, INI_DATALIST, NULL, NULL)) { 1849 Win_Error2(hwnd, hwnd, pszSrcFile, __LINE__, IDS_WINCREATEWINDOW); 1859 Win_Error(hwnd, hwnd, pszSrcFile, __LINE__, 1860 PCSZ_WINCREATEWINDOW); 1850 1861 } 1851 1862 if (!WinCreateWindow(hwnd, WC_STATIC, (PSZ) NULL, WS_VISIBLE | SS_TEXT | 1852 1863 DT_CENTER | DT_VCENTER, 0, 0, 0, 0, hwnd, HWND_TOP, 1853 1864 INI_NUMAPPS, NULL, NULL)) { 1854 Win_Error2(hwnd, hwnd, pszSrcFile, __LINE__, IDS_WINCREATEWINDOW); 1865 Win_Error(hwnd, hwnd, pszSrcFile, __LINE__, 1866 PCSZ_WINCREATEWINDOW); 1855 1867 } 1856 1868 if (!WinCreateWindow(hwnd, WC_STATIC, (PSZ) NULL, WS_VISIBLE | SS_TEXT | 1857 1869 DT_CENTER | DT_VCENTER, 0, 0, 0, 0, hwnd, HWND_TOP, 1858 1870 INI_NUMKEYS, NULL, NULL)) { 1859 Win_Error2(hwnd, hwnd, pszSrcFile, __LINE__, IDS_WINCREATEWINDOW); 1871 Win_Error(hwnd, hwnd, pszSrcFile, __LINE__, 1872 PCSZ_WINCREATEWINDOW); 1860 1873 } 1861 1874 if (!WinCreateWindow(hwnd, WC_STATIC, (PSZ) NULL, WS_VISIBLE | SS_TEXT | 1862 1875 DT_CENTER | DT_VCENTER, 0, 0, 0, 0, hwnd, HWND_TOP, 1863 1876 INI_NUMDATA, NULL, NULL)) { 1864 Win_Error2(hwnd, hwnd, pszSrcFile, __LINE__, IDS_WINCREATEWINDOW); 1877 Win_Error(hwnd, hwnd, pszSrcFile, __LINE__, 1878 PCSZ_WINCREATEWINDOW); 1865 1879 } 1866 1880 if (!WinCreateWindow(hwnd, … … 1871 1885 0, 1872 1886 0, 0, 0, hwnd, HWND_TOP, INI_APPHDR, NULL, NULL)) { 1873 Win_Error2(hwnd, hwnd, pszSrcFile, __LINE__, IDS_WINCREATEWINDOW); 1887 Win_Error(hwnd, hwnd, pszSrcFile, __LINE__, 1888 PCSZ_WINCREATEWINDOW); 1874 1889 } 1875 1890 if (!WinCreateWindow(hwnd, … … 1880 1895 0, 1881 1896 0, 0, 0, hwnd, HWND_TOP, INI_KEYHDR, NULL, NULL)) { 1882 Win_Error2(hwnd, hwnd, pszSrcFile, __LINE__, IDS_WINCREATEWINDOW); 1897 Win_Error(hwnd, hwnd, pszSrcFile, __LINE__, 1898 PCSZ_WINCREATEWINDOW); 1883 1899 } 1884 1900 if (!WinCreateWindow(hwnd, … … 1889 1905 0, 1890 1906 0, 0, 0, hwnd, HWND_TOP, INI_DATAHDR, NULL, NULL)) { 1891 Win_Error2(hwnd, hwnd, pszSrcFile, __LINE__, IDS_WINCREATEWINDOW); 1907 Win_Error(hwnd, hwnd, pszSrcFile, __LINE__, 1908 PCSZ_WINCREATEWINDOW); 1892 1909 } 1893 1910 … … 2272 2289 } 2273 2290 } 2274 else 2275 WinSetWindowText(WinQueryWindow(hwnd, QW_PARENT), 2276 GetPString(IDS_INIQUERYPRFFAILEDTEXT)); 2291 else { 2292 CHAR s[100]; 2293 2294 sprintf(s, PCSZ_INIQUERYPRFTEXT, GetPString(IDS_FAILEDTEXT)); 2295 WinSetWindowText(WinQueryWindow(hwnd, QW_PARENT), s); 2296 } 2277 2297 return 0; 2278 2298 } … … 2327 2347 rstrip(tofind); 2328 2348 if (!*tofind) { 2329 DosBeep(50, 100); 2349 if (!fAlertBeepOff) 2350 DosBeep(50, 100); 2330 2351 break; 2331 2352 } … … 2352 2373 MPFROM2SHORT(x, 0), MPFROM2SHORT(TRUE, 0)); 2353 2374 } 2354 else 2375 else if (!fAlertBeepOff) 2355 2376 DosBeep(250, 100); 2356 2377 } … … 2370 2391 hwnd, 2371 2392 FilterIniProc, FM3ModHandle, IAF_FRAME, (PVOID) inidata); 2372 else 2393 else if (!fAlertBeepOff) 2373 2394 DosBeep(50, 100); 2374 2395 } … … 2493 2514 else 2494 2515 *filename = 0; 2495 strcat(filename, "*.INI");2516 strcat(filename, PCSZ_STARDOTINI); 2496 2517 if (export_filename(hwnd, filename, TRUE)) { 2497 2518 … … 2634 2655 else 2635 2656 *filename = 0; 2636 strcat(filename, "*.INI");2657 strcat(filename, PCSZ_STARDOTINI); 2637 2658 if (insert_filename(hwnd, 2638 2659 filename, -
trunk/dll/init.c
r1394 r1395 71 71 11 Jan 09 GKY Move strings that shouldn't be translated (font names etc) compile time variables 72 72 03 Feb 09 SHL Switch to STRINGTABLE 73 07 Feb 09 GKY Move repeated strings to PCSZs. 74 07 Feb 09 GKY Add *DateFormat functions to format dates based on locale 75 07 Feb 09 GKY Eliminate Win_Error2 by moving function names to PCSZs used in Win_Error 73 76 74 77 ***********************************************************************/ … … 179 182 PFNWP PFNWPMLE; 180 183 CHAR ThousandsSeparator[2]; 184 CHAR DateSeparator[2]; 185 CHAR TimeSeparator[2]; 186 ULONG ulTimeFmt; 187 ULONG ulDateFmt; 181 188 BOOL fInitialDriveScan; 182 189 BOOL fAmAV2; … … 229 236 CHAR *LONGNAME; 230 237 CHAR *NullStr; 238 PCSZ PCSZ_WINCREATEWINDOW; 239 PCSZ PCSZ_INIQUERYPRFTEXT; 240 PCSZ PCSZ_FILLDIRQCURERRTEXT; 241 PCSZ PCSZ_STARDOTEXE; 242 PCSZ PCSZ_STARDOTINI; 243 PCSZ PCSZ_STARDOTLST; 231 244 CHAR *Settings; 232 245 CHAR SwapperDat[CCHMAXPATH]; … … 433 446 FNT_10SYSTEMVIO = "10.System VIO"; 434 447 FNT_8TIMESNEWROMAN = "8.Times New Roman"; 448 PCSZ_WINCREATEWINDOW = "WinCreateWindow"; 449 PCSZ_INIQUERYPRFTEXT = "PrfQueryProfile"; 450 PCSZ_FILLDIRQCURERRTEXT = "DosQCurDisk"; 451 PCSZ_STARDOTEXE = "*.EXE"; 452 PCSZ_STARDOTINI = "*.INI"; 453 PCSZ_STARDOTLST = "*.LST"; 435 454 WC_OBJECTWINDOW = "WC_OBJECTWINDOW"; 436 455 WC_BUBBLE = "WC_BUBBLE"; … … 534 553 FNT_10SYSTEMVIO = "10.System VIO"; 535 554 FNT_8TIMESNEWROMAN = "8.Times New Roman"; 555 PCSZ_WINCREATEWINDOW = "WinCreateWindow"; 556 PCSZ_INIQUERYPRFTEXT = "PrfQueryProfile"; 557 PCSZ_FILLDIRQCURERRTEXT = "DosQCurDisk"; 558 PCSZ_STARDOTEXE = "*.EXE"; 559 PCSZ_STARDOTINI = "*.INI"; 560 PCSZ_STARDOTLST = "*.LST"; 536 561 WC_OBJECTWINDOW = "WC_OBJECTWINDOW"; 537 562 WC_BUBBLE = "WC_BUBBLE"; … … 935 960 strcpy(inipath, profile); 936 961 DosError(FERR_DISABLEHARDERR); 937 962 // fixme to check for backup if ini not found GKY 1-30-09 938 963 rc = DosQueryPathInfo(inipath, FIL_STANDARD, &fs3, sizeof(fs3)); 939 964 if (rc) { … … 941 966 fWantFirstTimeInit = TRUE; 942 967 } 943 else { 968 else { //Check the ini file header and restore from backup if corupted 944 969 if (!CheckFileHeader(inipath, "\xff\xff\xff\xff\x14\x00\x00\x00", 0L)) { 945 saymsg(MB_ENTER,HWND_DESKTOP,DEBUG_STRING, 946 "Check INI header failed will attempt to replace with backup \\ 947 if backup fails or not found will open with new ini"); 970 saymsg(MB_ENTER,HWND_DESKTOP, GetPString(IDS_DEBUG_STRING), 971 GetPString(IDS_INIFAILURETEXT)); 948 972 DosCopy("FM3.INI", "FM3INI.BAD", DCPY_EXISTING); 949 973 DosCopy("FM3INI.BAK", "FM3.INI", DCPY_EXISTING); … … 1227 1251 COUNTRYINFO CtryInfo = {0}; 1228 1252 1229 DosQueryCtryInfo(sizeof(CtryInfo), &Country, 1230 &CtryInfo, &ulInfoLen); 1231 *ThousandsSeparator = CtryInfo.szThousandsSeparator[0]; 1253 if (!DosQueryCtryInfo(sizeof(CtryInfo), &Country, &CtryInfo, &ulInfoLen)) { 1254 *ThousandsSeparator = CtryInfo.szThousandsSeparator[0]; 1255 strcpy(DateSeparator, CtryInfo.szDateSeparator); 1256 strcpy(TimeSeparator, CtryInfo.szTimeSeparator); 1257 ulDateFmt = CtryInfo.fsDateFmt; 1258 ulTimeFmt = CtryInfo.fsTimeFmt; 1259 //DbgMsg(pszSrcFile, __LINE__, "Date Fmt %x", ulDateFmt); 1260 } 1261 else { 1262 strcpy(ThousandsSeparator, ","); 1263 strcpy(DateSeparator, "/"); 1264 strcpy(TimeSeparator, ":"); 1265 ulDateFmt = 0; 1266 ulTimeFmt = 0; 1267 } 1232 1268 } 1233 1269 { // Check for the existance of various partitioning tools to set up menu items … … 1365 1401 PrfQueryProfileData(fmprof, FM3Str, "NoFinger", &fNoFinger, &size); 1366 1402 size = sizeof(BOOL); 1403 PrfQueryProfileData(fmprof, FM3Str, "AlertBeepOff", &fAlertBeepOff, &size); 1404 size = sizeof(BOOL); 1405 PrfQueryProfileData(fmprof, FM3Str, "ErrorBeepOff", &fErrorBeepOff, &size); 1406 size = sizeof(BOOL); 1367 1407 PrfQueryProfileData(fmprof, appname, "SwitchTree", &fSwitchTree, &size); 1368 1408 size = sizeof(BOOL); -
trunk/dll/init.h
r1391 r1395 14 14 Dos/Win programs from being inserted into the execute dialog with message why. 15 15 11 Jan 09 GKY Move strings that shouldn't be translated (font names etc) compile time variables 16 07 Feb 09 GKY Eliminate Win_Error2 by moving function names to PCSZs used in Win_Error 17 07 Feb 09 GKY Move repeated strings to PCSZs. 18 07 Feb 09 GKY Add *DateFormat functions to format dates based on locale 16 19 17 20 ***********************************************************************/ … … 42 45 extern CHAR SwapperDat[CCHMAXPATH]; 43 46 extern CHAR ThousandsSeparator[2]; 47 extern CHAR DateSeparator[2]; 48 extern CHAR TimeSeparator[2]; 49 extern ULONG ulTimeFmt; 50 extern ULONG ulDateFmt; 44 51 extern CHAR *FNT_6HELVETICA; 45 52 extern CHAR *FNT_8HELVETICA; … … 51 58 extern CHAR *FNT_10SYSTEMVIO; 52 59 extern CHAR *FNT_8TIMESNEWROMAN; 60 extern PCSZ PCSZ_WINCREATEWINDOW; 61 extern PCSZ PCSZ_INIQUERYPRFTEXT; 62 extern PCSZ PCSZ_FILLDIRQCURERRTEXT; 63 extern PCSZ PCSZ_STARDOTEXE; 64 extern PCSZ PCSZ_STARDOTINI; 65 extern PCSZ PCSZ_STARDOTLST; 53 66 extern CHAR *WC_ARCCONTAINER; 54 67 extern CHAR *WC_ARCSTATUS; -
trunk/dll/mainwnd.c
r1394 r1395 79 79 Dos/Win programs from being inserted into the execute dialog with message why. 80 80 11 Jan 09 GKY Replace font names in the string file with global set at compile in init.c 81 07 Feb 09 GKY Eliminate Win_Error2 by moving function names to PCSZs used in Win_Error 81 82 82 83 ***********************************************************************/ … … 360 361 0L, HWND_TOP, OBJ_FRAME, NULL, NULL); 361 362 if (!MainObjectHwnd) 362 Win_Error 2(HWND_OBJECT, HWND_DESKTOP, pszSrcFile, __LINE__,363 IDS_WINCREATEWINDOW);363 Win_Error(HWND_OBJECT, HWND_DESKTOP, pszSrcFile, __LINE__, 364 PCSZ_WINCREATEWINDOW); 364 365 else { 365 366 WinSetWindowPtr(MainObjectHwnd, QWL_USER, args); … … 991 992 HWND_DESKTOP, HWND_TOP, MAIN_HELP, NULL, NULL); 992 993 if (!hwndBubble) 993 Win_Error 2(HWND_DESKTOP, HWND_DESKTOP, pszSrcFile, __LINE__,994 IDS_WINCREATEWINDOW);994 Win_Error(HWND_DESKTOP, HWND_DESKTOP, pszSrcFile, __LINE__, 995 PCSZ_WINCREATEWINDOW); 995 996 else { 996 997 HPS hps; … … 1599 1600 NULL); 1600 1601 if (!hwndTool) 1601 Win_Error 2(hwndT, HWND_DESKTOP, pszSrcFile, __LINE__,1602 IDS_WINCREATEWINDOW);1602 Win_Error(hwndT, HWND_DESKTOP, pszSrcFile, __LINE__, 1603 PCSZ_WINCREATEWINDOW); 1603 1604 tool->flags |= T_TEXT; 1604 1605 } … … 1615 1616 HWND_TOP, tool->id + 25000, NULL, NULL); 1616 1617 if (!hwndTool) 1617 Win_Error 2(hwndT, HWND_DESKTOP, pszSrcFile, __LINE__,1618 IDS_WINCREATEWINDOW);1618 Win_Error(hwndT, HWND_DESKTOP, pszSrcFile, __LINE__, 1619 PCSZ_WINCREATEWINDOW); 1619 1620 else { 1620 1621 SetPresParams(hwndTool, … … 1640 1641 13, hwndT, HWND_TOP, IDM_TOOLLEFT, NULL, NULL); 1641 1642 if (!hwndTool) 1642 Win_Error 2(hwndT, HWND_DESKTOP, pszSrcFile, __LINE__,1643 IDS_WINCREATEWINDOW);1643 Win_Error(hwndT, HWND_DESKTOP, pszSrcFile, __LINE__, 1644 PCSZ_WINCREATEWINDOW); 1644 1645 hwndTool = 1645 1646 WinCreateWindow(hwndT, WC_BUTTON, "#6011", … … 1647 1648 13, hwndT, HWND_TOP, IDM_TOOLRIGHT, NULL, NULL); 1648 1649 if (!hwndTool) 1649 Win_Error 2(hwndT, HWND_DESKTOP, pszSrcFile, __LINE__,1650 IDS_WINCREATEWINDOW);1650 Win_Error(hwndT, HWND_DESKTOP, pszSrcFile, __LINE__, 1651 PCSZ_WINCREATEWINDOW); 1651 1652 if (resize) 1652 1653 ResizeTools(hwndT); … … 2258 2259 hwndT, HWND_TOP, y + IDM_DRIVEA, NULL, NULL); 2259 2260 if (!hwndB) 2260 Win_Error 2(hwndT, HWND_DESKTOP, pszSrcFile, __LINE__,2261 IDS_WINCREATEWINDOW);2261 Win_Error(hwndT, HWND_DESKTOP, pszSrcFile, __LINE__, 2262 PCSZ_WINCREATEWINDOW); 2262 2263 else { 2263 2264 WinSetWindowPos(hwndB, HWND_BOTTOM, 0, 0, 0, 0, SWP_ZORDER); … … 2274 2275 HWND_TOP, y + IDM_DRIVEATEXT, NULL, NULL); 2275 2276 if (!hwndB) 2276 Win_Error 2(hwndT, HWND_DESKTOP, pszSrcFile, __LINE__,2277 IDS_WINCREATEWINDOW);2277 Win_Error(hwndT, HWND_DESKTOP, pszSrcFile, __LINE__, 2278 PCSZ_WINCREATEWINDOW); 2278 2279 else { 2279 2280 //fixme to allow user to change presparams 1-10-09 GKY … … 2529 2530 hwnd, HWND_TOP, COMMAND_BUTTON, NULL, NULL); 2530 2531 if (!hwndB) 2531 Win_Error2(hwnd, hwnd, pszSrcFile, __LINE__, IDS_WINCREATEWINDOW); 2532 Win_Error(hwnd, hwnd, pszSrcFile, __LINE__, 2533 PCSZ_WINCREATEWINDOW); 2532 2534 hwndE = WinCreateWindow(hwnd, 2533 2535 WC_ENTRYFIELD, … … 2540 2542 hwnd, HWND_TOP, COMMAND_LINE, NULL, NULL); 2541 2543 if (!hwndE) 2542 Win_Error2(hwnd, hwnd, pszSrcFile, __LINE__, IDS_WINCREATEWINDOW); 2544 Win_Error(hwnd, hwnd, pszSrcFile, __LINE__, 2545 PCSZ_WINCREATEWINDOW); 2543 2546 if (!hwndE || !hwndB) { 2544 2547 PostMsg(hwnd, UM_RESCAN, MPVOID, MPVOID); … … 5622 5625 SV_CYMINMAXBUTTON), 5623 5626 hwnd, HWND_TOP, IDM_IDEALSIZE, NULL, NULL)) { 5624 Win_Error2(hwnd, hwnd, pszSrcFile, __LINE__, IDS_WINCREATEWINDOW); 5627 Win_Error(hwnd, hwnd, pszSrcFile, __LINE__, 5628 PCSZ_WINCREATEWINDOW); 5625 5629 } 5626 5630 else { … … 5643 5647 22, hwnd, HWND_TOP, IDM_OPENWALK, NULL, NULL); 5644 5648 if (!hwndTmp) 5645 Win_Error2(hwnd, hwnd, pszSrcFile, __LINE__, IDS_WINCREATEWINDOW); 5649 Win_Error(hwnd, hwnd, pszSrcFile, __LINE__, 5650 PCSZ_WINCREATEWINDOW); 5646 5651 5647 5652 hwndTmp = WinCreateWindow(hwndFrame, … … 5655 5660 22, hwnd, HWND_TOP, IDM_USERLIST, NULL, NULL); 5656 5661 if (!hwndTmp) 5657 Win_Error2(hwnd, hwnd, pszSrcFile, __LINE__, IDS_WINCREATEWINDOW); 5662 Win_Error(hwnd, hwnd, pszSrcFile, __LINE__, 5663 PCSZ_WINCREATEWINDOW); 5658 5664 5659 5665 hwndUserlist = WinCreateWindow(hwndFrame, … … 5674 5680 MAIN_USERLIST, NULL, NULL); 5675 5681 if (!hwndUserlist) 5676 Win_Error2(hwnd, hwnd, pszSrcFile, __LINE__, IDS_WINCREATEWINDOW); 5682 Win_Error(hwnd, hwnd, pszSrcFile, __LINE__, 5683 PCSZ_WINCREATEWINDOW); 5677 5684 hwndCmdlist = WinCreateWindow(hwndFrame, 5678 5685 WC_COMBOBOX, … … 5692 5699 MAIN_CMDLIST, NULL, NULL); 5693 5700 if (!hwndCmdlist) 5694 Win_Error2(hwnd, hwnd, pszSrcFile, __LINE__, IDS_WINCREATEWINDOW); 5701 Win_Error(hwnd, hwnd, pszSrcFile, __LINE__, 5702 PCSZ_WINCREATEWINDOW); 5695 5703 WinSetWindowText(hwndCmdlist, GetPString(IDS_COMMANDSTEXT)); 5696 5704 hwndStatelist = WinCreateWindow(hwndFrame, … … 5711 5719 MAIN_SETUPLIST, NULL, NULL); 5712 5720 if (!hwndStatelist) 5713 Win_Error2(hwnd, hwnd, pszSrcFile, __LINE__, IDS_WINCREATEWINDOW); 5721 Win_Error(hwnd, hwnd, pszSrcFile, __LINE__, 5722 PCSZ_WINCREATEWINDOW); 5714 5723 5715 5724 hwndDrivelist = WinCreateWindow(hwndFrame, … … 5729 5738 HWND_TOP, MAIN_DRIVELIST, NULL, NULL); 5730 5739 if (!hwndDrivelist) 5731 Win_Error2(hwnd, hwnd, pszSrcFile, __LINE__, IDS_WINCREATEWINDOW); 5740 Win_Error(hwnd, hwnd, pszSrcFile, __LINE__, 5741 PCSZ_WINCREATEWINDOW); 5732 5742 //fixme to allow user to change presparams 1-10-09 GKY 5733 5743 SetPresParams(hwndDrivelist, 5734 NULL, NULL, NULL, "10.System Monospaced");5744 NULL, NULL, NULL, FNT_10SYSTEMMONOTEXT); 5735 5745 hwndButtonlist = WinCreateWindow(hwndFrame, 5736 5746 WC_COMBOBOX, … … 5748 5758 MAIN_BUTTONLIST, NULL, NULL); 5749 5759 if (!hwndButtonlist) 5750 Win_Error2(hwnd, hwnd, pszSrcFile, __LINE__, IDS_WINCREATEWINDOW); 5760 Win_Error(hwnd, hwnd, pszSrcFile, __LINE__, 5761 PCSZ_WINCREATEWINDOW); 5751 5762 WinSendMsg(WinWindowFromID(hwndUserlist, CBID_EDIT), 5752 5763 EM_SETTEXTLIMIT, MPFROM2SHORT(CCHMAXPATH, 0), MPVOID); … … 6442 6453 } 6443 6454 else { 6444 Win_Error 2(hwnd, hwnd, __FILE__, __LINE__,6445 IDS_PRFQUERYPROFILEDATA);6455 Win_Error(hwnd, hwnd, __FILE__, __LINE__, 6456 PCSZ_INIQUERYPRFTEXT); 6446 6457 } 6447 6458 } -
trunk/dll/menu.c
r1348 r1395 76 76 } 77 77 78 // fixme why do I exist since the only call passes no filename and FM3MENU.DAT doesn't exist. GKY 1-30-09 78 79 BOOL AddToMenu(CHAR * filename, HWND hwndMenu) 79 80 { … … 134 135 else { 135 136 // fixme to complain? 136 // saymsg(MB_ENTER, HWND_DESKTOP,DEBUG_STRING,"Tokenization failed");137 // saymsg(MB_ENTER, HWND_DESKTOP, GetPString(IDS_DEBUG_STRING), "Tokenization failed"); 137 138 } 138 139 } -
trunk/dll/misc.c
r1394 r1395 53 53 25 Dec 08 GKY Add code to allow write verify to be turned off on a per drive basis 54 54 28 Dec 08 GKY Check for LVM.EXE and remove Refresh removable media menu item as appropriate 55 07 Feb 09 GKY Allow user to turn off alert and/or error beeps in settings notebook. 55 56 56 57 ***********************************************************************/ … … 925 926 WinSetWindowText(hwndMLE, szData); 926 927 if (strcmp(szData, testname)) { 927 if (stricmp(szData, testname) && IsFile(testname) != -1) { 928 DosBeep(50, 100); /* exists; disallow */ 928 if (stricmp(szData, testname) && IsFile(testname) != -1) { 929 if (!fAlertBeepOff) 930 DosBeep(50, 100); /* exists; disallow */ 929 931 return (MRESULT) FALSE; 930 932 } -
trunk/dll/newview.c
r1394 r1395 34 34 10 Dec 08 SHL Integrate exception handler support 35 35 11 Jan 09 GKY Replace font names in the string file with global set at compile in init.c 36 07 Feb 09 GKY Allow user to turn off alert and/or error beeps in settings notebook. 37 07 Feb 09 GKY Eliminate Win_Error2 by moving function names to PCSZs used in Win_Error 36 38 37 39 ***********************************************************************/ … … 1095 1097 DosReleaseMutexSem(ad->ScanSem); 1096 1098 if (!ad->stopflag && firstline == ULONG_MAX) { 1097 DosBeep(50, 50); 1099 if (!fAlertBeepOff) 1100 DosBeep(50, 50); 1098 1101 WinSetWindowText(WinWindowFromID(ad->hwndFrame, 1099 1102 NEWVIEW_STATUS1), … … 1205 1208 DosReleaseMutexSem(ad->ScanSem); 1206 1209 released = TRUE; 1207 DosBeep(50, 100); 1210 if (!fAlertBeepOff) 1211 DosBeep(50, 100); 1208 1212 WinSetWindowText(WinWindowFromID(ad->hwndFrame, 1209 1213 NEWVIEW_STATUS1), … … 1749 1753 s[SEARCHSTRINGLEN - 1] = 0; 1750 1754 if (!*s) { 1751 DosBeep(250, 100); // Complain 1755 if (!fAlertBeepOff) 1756 DosBeep(250, 100); // Complain 1752 1757 break; 1753 1758 } … … 1811 1816 HWND_TOP, IDM_PREVBLANKLINE, NULL, NULL); 1812 1817 if (!temphwnd) 1813 Win_Error 2(hwndFrame, hwnd, pszSrcFile, __LINE__,1814 IDS_WINCREATEWINDOW);1818 Win_Error(hwndFrame, hwnd, pszSrcFile, __LINE__, 1819 PCSZ_WINCREATEWINDOW); 1815 1820 else { 1816 1821 //fixme to allow user to change presparams 1-10-09 GKY … … 1832 1837 HWND_TOP, IDM_NEXTBLANKLINE, NULL, NULL); 1833 1838 if (!temphwnd) 1834 Win_Error 2(hwndFrame, hwnd, pszSrcFile, __LINE__,1835 IDS_WINCREATEWINDOW);1839 Win_Error(hwndFrame, hwnd, pszSrcFile, __LINE__, 1840 PCSZ_WINCREATEWINDOW); 1836 1841 else { 1837 1842 //fixme to allow user to change presparams 1-10-09 GKY … … 1896 1901 NEWVIEW_STATUS1, NULL, NULL); 1897 1902 if (!ad->hwndStatus1) 1898 Win_Error 2(hwndFrame, hwnd, pszSrcFile, __LINE__,1899 IDS_WINCREATEWINDOW);1903 Win_Error(hwndFrame, hwnd, pszSrcFile, __LINE__, 1904 PCSZ_WINCREATEWINDOW); 1900 1905 1901 1906 ad->hwndStatus2 = WinCreateWindow(hwndFrame, … … 1912 1917 NEWVIEW_STATUS2, NULL, NULL); 1913 1918 if (!ad->hwndStatus2) 1914 Win_Error 2(hwndFrame, hwnd, pszSrcFile, __LINE__,1915 IDS_WINCREATEWINDOW);1919 Win_Error(hwndFrame, hwnd, pszSrcFile, __LINE__, 1920 PCSZ_WINCREATEWINDOW); 1916 1921 1917 1922 ad->hwndStatus3 = WinCreateWindow(hwndFrame, … … 1928 1933 NEWVIEW_STATUS3, NULL, NULL); 1929 1934 if (!ad->hwndStatus3) 1930 Win_Error 2(hwndFrame, hwnd, pszSrcFile, __LINE__,1931 IDS_WINCREATEWINDOW);1935 Win_Error(hwndFrame, hwnd, pszSrcFile, __LINE__, 1936 PCSZ_WINCREATEWINDOW); 1932 1937 1933 1938 ad->hwndListbox = WinCreateWindow(hwndFrame, … … 1943 1948 NEWVIEW_LISTBOX, NULL, NULL); 1944 1949 if (!ad->hwndListbox) 1945 Win_Error 2(hwndFrame, hwnd, pszSrcFile, __LINE__,1946 IDS_WINCREATEWINDOW);1950 Win_Error(hwndFrame, hwnd, pszSrcFile, __LINE__, 1951 PCSZ_WINCREATEWINDOW); 1947 1952 1948 1953 ad->hwndDrag = WinCreateWindow(hwndFrame, … … 1957 1962 HWND_TOP, NEWVIEW_DRAG, NULL, NULL); 1958 1963 if (!ad->hwndDrag) 1959 Win_Error 2(hwndFrame, hwnd, pszSrcFile, __LINE__,1960 IDS_WINCREATEWINDOW);1964 Win_Error(hwndFrame, hwnd, pszSrcFile, __LINE__, 1965 PCSZ_WINCREATEWINDOW); 1961 1966 1962 1967 oldproc = WinSubclassWindow(hwndFrame, ViewFrameWndProc); … … 3621 3626 } 3622 3627 WinSetPointer(HWND_DESKTOP, hptrArrow); 3623 if (x >= ad->numlines )3628 if (x >= ad->numlines && !fAlertBeepOff) 3624 3629 DosBeep(50, 100); 3625 3630 } … … 3692 3697 break; 3693 3698 if (ad->numlines <= numlines) { 3694 DosBeep(500, 100); 3699 if (!fAlertBeepOff) 3700 DosBeep(500, 100); 3695 3701 break; 3696 3702 } -
trunk/dll/notebook.c
r1394 r1395 45 45 01 Jan 09 GKY Add option to rescan tree container on eject of removable media 46 46 11 Jan 09 GKY Replace font names in the string file with global set at compile in init.c 47 07 Feb 09 GKY Allow user to turn off alert and/or error beeps in settings notebook. 48 07 Feb 09 GKY Move repeated strings to PCSZs. 47 49 48 50 ***********************************************************************/ … … 94 96 HWND Collector; 95 97 DETAILS_SETTINGS dsDirCnrDefault; 98 BOOL fAlertBeepOff; 96 99 BOOL fAutoAddAllDirs; 97 100 BOOL fAutoAddDirs; … … 111 114 BOOL fEjectFlpyScan; 112 115 BOOL fEjectRemovableScan; 116 BOOL fErrorBeepOff; 113 117 BOOL fExternalArcboxes; 114 118 BOOL fExternalCollector; … … 268 272 SBoxDlgProc, FM3ModHandle, ASEL_FRAME, 269 273 (PVOID) & pat) || !pat || !pat->id || !*pat->id) { 274 if (!fAlertBeepOff) 270 275 DosBeep(250, 100); // Complain 271 276 WinCheckButton(hwnd, CFGA_DEFARC, FALSE); … … 310 315 HWND hwndFocus; 311 316 312 strcpy(filename, "*.EXE");317 strcpy(filename, PCSZ_STARDOTEXE); 313 318 hwndFocus = WinQueryFocus(HWND_DESKTOP); 314 319 if (hwndFocus) { … … 701 706 HWND hwndFocus; 702 707 703 strcpy(filename, "*.EXE");708 strcpy(filename, PCSZ_STARDOTEXE); 704 709 hwndFocus = WinQueryFocus(HWND_DESKTOP); 705 710 if (hwndFocus) { … … 909 914 HWND hwndFocus; 910 915 911 strcpy(filename, "*.EXE");916 strcpy(filename, PCSZ_STARDOTEXE); 912 917 hwndFocus = WinQueryFocus(HWND_DESKTOP); 913 918 if (hwndFocus) { … … 1511 1516 WinCheckButton(hwnd, CFGG_DNDDLG, fDragndropDlg); 1512 1517 WinCheckButton(hwnd, CFGG_DEFAULTDELETEPERM, fDefaultDeletePerm); 1518 WinCheckButton(hwnd, CFGG_ERRORBEEPOFF, fErrorBeepOff); 1519 WinCheckButton(hwnd, CFGG_ALERTBEEPOFF, fAlertBeepOff); 1513 1520 { 1514 1521 long th = fNoFinger ? 2 : (fNoDead ? 1 : 0); … … 1629 1636 fConfirmTarget = WinQueryButtonCheckstate(hwnd, CFGG_CONFIRMTARGET); 1630 1637 PrfWriteProfileData(fmprof, appname, "ConfirmTarget", 1631 &fConfirmTarget, sizeof(BOOL)); 1638 &fConfirmTarget, sizeof(BOOL)); 1639 fAlertBeepOff = WinQueryButtonCheckstate(hwnd, CFGG_ALERTBEEPOFF); 1640 PrfWriteProfileData(fmprof, appname, "AlertBeepOff", 1641 &fAlertBeepOff, sizeof(BOOL)); 1642 fErrorBeepOff = WinQueryButtonCheckstate(hwnd, CFGG_ERRORBEEPOFF); 1643 PrfWriteProfileData(fmprof, appname, "ErrorBeepOff", 1644 &fErrorBeepOff, sizeof(BOOL)); 1632 1645 { 1633 1646 WinSendDlgItemMsg(hwnd, CFGG_CMDLNLNGTH, SPBM_QUERYVALUE, … … 1728 1741 HWND hwndFocus; 1729 1742 1730 strcpy(filename, "*.EXE");1743 strcpy(filename, PCSZ_STARDOTEXE); 1731 1744 hwndFocus = WinQueryFocus(HWND_DESKTOP); 1732 1745 if (hwndFocus) { -
trunk/dll/notebook.h
r1375 r1395 14 14 25 Dec 08 GKY Add ProcessDirectoryThread to allow optional recursive drive scan at startup. 15 15 01 Jan 09 GKY Add option to rescan tree container on eject of removable media 16 07 Feb 09 GKY Allow user to turn off alert and/or error beeps in settings notebook. 16 17 17 18 ***********************************************************************/ … … 32 33 extern DETAILS_SETTINGS dsDirCnrDefault; 33 34 extern CHAR extractpath[CCHMAXPATH]; 35 extern BOOL fAlertBeepOff; 34 36 extern BOOL fAutoAddAllDirs; 35 37 extern BOOL fAutoAddDirs; … … 49 51 extern BOOL fEjectFlpyScan; 50 52 extern BOOL fEjectRemovableScan; 53 extern BOOL fErrorBeepOff; 51 54 extern BOOL fExternalArcboxes; 52 55 extern BOOL fExternalCollector; -
trunk/dll/notify.c
r1394 r1395 16 16 10 Dec 08 SHL Integrate exception handler support 17 17 11 Jan 09 GKY Replace font names in the string file with global set at compile in init.c 18 07 Feb 09 GKY Allow user to turn off alert and/or error beeps in settings notebook. 19 07 Feb 09 GKY Eliminate Win_Error2 by moving function names to PCSZs used in Win_Error 18 20 19 21 ***********************************************************************/ … … 212 214 x, y, cx, cy, hwndP, HWND_TOP, id++, NULL, NULL); 213 215 if (!hwndP) 214 Win_Error2(hwndP, hwndP, pszSrcFile, __LINE__, IDS_WINCREATEWINDOW); 216 Win_Error(hwndP, hwndP, pszSrcFile, __LINE__, 217 PCSZ_WINCREATEWINDOW); 215 218 216 219 if (p != str) … … 268 271 strcat(errortext, GetPString(IDS_DISKLOCKEDTEXT)); 269 272 } 270 DosBeep(250, 10); 271 DosBeep(500, 10); 272 DosBeep(250, 10); 273 DosBeep(500, 10); 273 if (!fErrorBeepOff) { 274 DosBeep(250, 10); 275 DosBeep(500, 10); 276 DosBeep(250, 10); 277 DosBeep(500, 10); 278 } 274 279 Notify(errortext); 275 280 } -
trunk/dll/objwin.c
r1226 r1395 14 14 20 Aug 07 GKY Move #pragma alloc_text to end for OpenWatcom compat 15 15 08 Jul 08 SHL Correct Fortify_LeaveScope usage and avoid spurious reports 16 07 Feb 09 GKY Eliminate Win_Error2 by moving function names to PCSZs used in Win_Error 16 17 17 18 ***********************************************************************/ … … 33 34 #include "objwin.h" 34 35 #include "treecnr.h" // TreeObjWndProc 35 36 #include "strutil.h" // GetPString 36 37 37 38 static PSZ pszSrcFile = __FILE__; … … 83 84 0L, 0L, HWND_TOP, OBJ_FRAME, NULL, NULL); 84 85 if (!ObjectHwnd) 85 Win_Error 2(HWND_OBJECT, HWND_DESKTOP, pszSrcFile, __LINE__,86 IDS_WINCREATEWINDOW);86 Win_Error(HWND_OBJECT, HWND_DESKTOP, pszSrcFile, __LINE__, 87 PCSZ_WINCREATEWINDOW); 87 88 else { 88 89 # ifdef FORTIFY -
trunk/dll/printer.c
r1226 r1395 14 14 22 Mar 07 GKY Use QWL_USER 15 15 20 Aug 07 GKY Move #pragma alloc_text to end for OpenWatcom compat 16 07 Feb 09 GKY Allow user to turn off alert and/or error beeps in settings notebook. 16 17 17 18 ***********************************************************************/ … … 498 499 if (atol(s) < 24 || atol(s) > 4096) { 499 500 WinSetFocus(HWND_DESKTOP, WinWindowFromID(hwnd, PRN_WIDTH)); 500 DosBeep(50, 100); 501 if (!fAlertBeepOff) 502 DosBeep(50, 100); 501 503 break; 502 504 } … … 508 510 if (atol(s) < 24 || atol(s) > 4096) { 509 511 WinSetFocus(HWND_DESKTOP, WinWindowFromID(hwnd, PRN_LENGTH)); 510 DosBeep(50, 100); 512 if (!fAlertBeepOff) 513 DosBeep(50, 100); 511 514 break; 512 515 } … … 518 521 if (atol(s) < 0 || atol(s) > prnwidth - 1) { 519 522 WinSetFocus(HWND_DESKTOP, WinWindowFromID(hwnd, PRN_LMARGIN)); 520 DosBeep(50, 100); 523 if (!fAlertBeepOff) 524 DosBeep(50, 100); 521 525 break; 522 526 } … … 528 532 if (atol(s) < 0 || atol(s) > (prnwidth - prnlmargin) - 1) { 529 533 WinSetFocus(HWND_DESKTOP, WinWindowFromID(hwnd, PRN_RMARGIN)); 530 DosBeep(50, 100); 534 if (!fAlertBeepOff) 535 DosBeep(50, 100); 531 536 break; 532 537 } … … 539 544 atol(s) > prnwidth - ((prnlmargin + prnrmargin) - 1)) { 540 545 WinSetFocus(HWND_DESKTOP, WinWindowFromID(hwnd, PRN_TABSPACES)); 541 DosBeep(50, 100); 546 if (!fAlertBeepOff) 547 DosBeep(50, 100); 542 548 break; 543 549 } … … 549 555 if (atol(s) < 0 || atol(s) > prnlength - 1) { 550 556 WinSetFocus(HWND_DESKTOP, WinWindowFromID(hwnd, PRN_TMARGIN)); 551 DosBeep(50, 100); 557 if (!fAlertBeepOff) 558 DosBeep(50, 100); 552 559 break; 553 560 } … … 559 566 if (atol(s) < 0 || atol(s) > (prnlength - prntmargin) - 1) { 560 567 WinSetFocus(HWND_DESKTOP, WinWindowFromID(hwnd, PRN_BMARGIN)); 561 DosBeep(50, 100); 568 if (!fAlertBeepOff) 569 DosBeep(50, 100); 562 570 break; 563 571 } … … 570 578 atol(s) > ((prnlength - prntmargin) - prnbmargin) - 1) { 571 579 WinSetFocus(HWND_DESKTOP, WinWindowFromID(hwnd, PRN_SPACING)); 572 DosBeep(50, 100); 580 if (!fAlertBeepOff) 581 DosBeep(50, 100); 573 582 break; 574 583 } -
trunk/dll/rename.c
r1358 r1395 14 14 30 Dec 07 GKY Use TestFDates for comparing dates 15 15 25 Dec 08 GKY Add code to allow write verify to be turned off on a per drive basis 16 07 Feb 09 GKY Allow user to turn off alert and/or error beeps in settings notebook. 17 07 Feb 09 GKY Add *DateFormat functions to format dates based on locale 16 18 17 19 ***********************************************************************/ … … 86 88 87 89 FILESTATUS3L fs1, fs2; 88 CHAR s[CCHMAXPATH * 2], *p, chkname[CCHMAXPATH], szCmmaFmtFileSize[81] ;90 CHAR s[CCHMAXPATH * 2], *p, chkname[CCHMAXPATH], szCmmaFmtFileSize[81], szDate[11]; 89 91 INT sourceexists = 0, targetexists = 0, 90 92 sourcenewer = 0, sourcesmaller = 0; … … 103 105 CommaFmtULL(szCmmaFmtFileSize, 104 106 sizeof(szCmmaFmtFileSize), fs1.cbFile, ' '); 105 sprintf(s, 106 " %s%s %ss %04u/%02u/%02u %02u:%02u:%02u",107 FDateFormat(szDate, fs1.fdateLastWrite); 108 sprintf(s, " %s%s %ss %s %02u%s%02u%s%02u", 107 109 fs1.attrFile & FILE_DIRECTORY ? 108 110 GetPString(IDS_DIRBRKTTEXT) : NullStr, 109 111 szCmmaFmtFileSize, 110 112 GetPString(IDS_BYTETEXT), 111 fs1.fdateLastWrite.year + 1980, 112 fs1.fdateLastWrite.month, 113 fs1.fdateLastWrite.day, 114 fs1.ftimeLastWrite.hours, 115 fs1.ftimeLastWrite.minutes, fs1.ftimeLastWrite.twosecs * 2); 113 szDate, 114 fs1.ftimeLastWrite.hours, TimeSeparator, 115 fs1.ftimeLastWrite.minutes, TimeSeparator, fs1.ftimeLastWrite.twosecs * 2); 116 116 WinSetDlgItemText(hwnd, REN_SOURCEINFO, s); 117 117 sourceexists = 1; … … 131 131 CommaFmtULL(szCmmaFmtFileSize, 132 132 sizeof(szCmmaFmtFileSize), fs2.cbFile, ' '); 133 sprintf(s, 134 " %s%s %ss %04u/%02u/%02u %02u:%02u:%02u",133 FDateFormat(szDate, fs2.fdateLastWrite); 134 sprintf(s, " %s%s %ss %s %02u%s%02u%s%02u", 135 135 fs2.attrFile & FILE_DIRECTORY ? 136 136 GetPString(IDS_DIRBRKTTEXT) : NullStr, 137 137 szCmmaFmtFileSize, 138 138 GetPString(IDS_BYTETEXT), 139 fs2.fdateLastWrite.year + 1980, 140 fs2.fdateLastWrite.month, 141 fs2.fdateLastWrite.day, 142 fs2.ftimeLastWrite.hours, 143 fs2.ftimeLastWrite.minutes, fs2.ftimeLastWrite.twosecs * 2); 139 szDate, 140 fs2.ftimeLastWrite.hours, TimeSeparator, 141 fs2.ftimeLastWrite.minutes, TimeSeparator, fs2.ftimeLastWrite.twosecs * 2); 144 142 WinSetDlgItemText(hwnd, REN_TARGETINFO, s); 145 143 targetexists = 1; … … 327 325 if (SetDir(WinQueryWindow(WinQueryWindow(hwnd, QW_PARENT), 328 326 QW_OWNER), hwnd, path, 0)) { 329 DosBeep(250, 100); 327 if (!fAlertBeepOff) 328 DosBeep(250, 100); 330 329 WinSetFocus(HWND_DESKTOP, WinWindowFromID(hwnd, REN_TARGET)); 331 330 break; … … 335 334 } 336 335 else { 337 DosBeep(250, 100); 336 if (!fAlertBeepOff) 337 DosBeep(250, 100); 338 338 WinSetFocus(HWND_DESKTOP, WinWindowFromID(hwnd, REN_TARGET)); 339 339 } -
trunk/dll/saveclip.c
r1226 r1395 25 25 20 Jul 08 GKY Modify ListtoClipHab to provide either fullpath name or filename for save to clipboard 26 26 24 Aug 08 GKY Warn full drive on save of .DAT file; prevent loss of existing file 27 07 Feb 09 GKY Add *DateFormat functions to format dates based on locale 28 07 Feb 09 GKY Allow user to turn off alert and/or error beeps in settings notebook. 29 07 Feb 09 GKY Move repeated strings to PCSZs. 27 30 28 31 ***********************************************************************/ … … 376 379 WinQueryDlgItemText(hwnd, SAV_FILENAME, CCHMAXPATH, savename); 377 380 if (!*savename) 378 strcpy(savename, "*.LST");381 strcpy(savename, PCSZ_STARDOTLST); 379 382 if (export_filename(hwnd, savename, 1) && *savename) { 380 383 if (!strchr(savename, '.')) … … 401 404 if (!*pattern) { 402 405 WinEnableWindow(hwnd, TRUE); 403 DosBeep(150, 100); 406 if (!fAlertBeepOff) 407 DosBeep(150, 100); 404 408 break; 405 409 } … … 437 441 if (!*pattern) { 438 442 WinEnableWindow(hwnd, TRUE); 439 DosBeep(250, 100); 443 if (!fAlertBeepOff) 444 DosBeep(250, 100); 440 445 break; 441 446 } … … 446 451 if (!*savename) { 447 452 WinEnableWindow(hwnd, TRUE); 448 DosBeep(100, 100); 453 if (!fAlertBeepOff) 454 DosBeep(100, 100); 449 455 break; 450 456 } … … 506 512 break; 507 513 case 'd': 508 case 'D': 509 fprintf(fp, 510 "%04u/%02u/%02u", 511 pci->date.year, pci->date.month, pci->date.day); 512 break; 514 case 'D': 515 { 516 CHAR szDate[11]; 517 518 DateFormat(szDate, pci->date); 519 fprintf(fp,"%s", szDate); 520 break; 521 } 513 522 case 't': 514 523 case 'T': 515 524 fprintf(fp, 516 "%02u :%02u:%02u",517 pci->time.hours, 518 pci->time.minutes, pci->time.seconds);525 "%02u%s%02u%s%02u", 526 pci->time.hours, TimeSeparator, 527 pci->time.minutes, TimeSeparator, pci->time.seconds); 519 528 break; 520 529 case 'l': … … 731 740 WinQueryDlgItemText(hwnd, SAV_FILENAME, CCHMAXPATH, savename); 732 741 if (!*savename) 733 strcpy(savename, "*.LST");742 strcpy(savename, PCSZ_STARDOTLST); 734 743 if (export_filename(hwnd, savename, 1) && *savename) { 735 744 if (!strchr(savename, '.')) … … 758 767 if (!*pattern) { 759 768 WinEnableWindow(hwnd, TRUE); 760 DosBeep(150, 100); 769 if (!fAlertBeepOff) 770 DosBeep(150, 100); 761 771 break; 762 772 } … … 794 804 if (!*pattern) { 795 805 WinEnableWindow(hwnd, TRUE); 796 DosBeep(250, 100); 806 if (!fAlertBeepOff) 807 DosBeep(250, 100); 797 808 break; 798 809 } … … 803 814 if (!*savename) { 804 815 WinEnableWindow(hwnd, TRUE); 805 DosBeep(100, 100); 816 if (!fAlertBeepOff) 817 DosBeep(100, 100); 806 818 break; 807 819 } … … 945 957 break; 946 958 case 'd': 947 case 'D': 948 fprintf(fp, 949 "%04u/%02u/%02u", 950 ffb4.fdateLastWrite.year + 1980, 951 ffb4.fdateLastWrite.month, 952 ffb4.fdateLastWrite.day); 953 break; 959 case 'D': 960 { 961 CHAR szDate[11]; 962 963 FDateFormat(szDate, ffb4.fdateLastWrite); 964 fprintf(fp,"%s", szDate); 965 break; 966 } 954 967 case 't': 955 968 case 'T': 956 969 fprintf(fp, 957 "%02u:%02u:%02u", 958 ffb4.ftimeLastWrite.hours, 959 ffb4.ftimeLastWrite.minutes, 970 "%02u%s%02u%s%02u", 971 ffb4.ftimeLastWrite.hours, 972 TimeSeparator, 973 ffb4.ftimeLastWrite.minutes, 974 TimeSeparator, 960 975 ffb4.ftimeLastWrite.twosecs * 2); 961 976 break; -
trunk/dll/seeall.c
r1394 r1395 42 42 11 Jan 09 GKY Replace font names in the string file with global set at compile in init.c 43 43 11 Jan 08 GKY Change flag on GetMLEFont to 3 from 11 to give a larger selection of mono spaced fonts 44 07 Feb 09 GKY Allow user to turn off alert and/or error beeps in settings notebook. 45 07 Feb 09 GKY Add *DateFormat functions to format dates based on locale 46 07 Feb 09 GKY Eliminate Win_Error2 by moving function names to PCSZs used in Win_Error 44 47 45 48 ***********************************************************************/ … … 1028 1031 (hs > 1) ? 1029 1032 GetPString(IDS_ARETEXT) : GetPString(IDS_ISTEXT)); 1030 if ( ro || hs || sysdir)1033 if ((ro || hs || sysdir) && !fAlertBeepOff) 1031 1034 DosBeep(300, 100); 1032 1035 strcat(prompt, GetPString(IDS_DELPROMPT6TEXT)); … … 1150 1153 x != 1 ? GetPString(IDS_ARETEXT) : GetPString(IDS_ISTEXT)); 1151 1154 WinSetWindowText(WinWindowFromID(hwndFrame, SEEALL_STATUS), message); 1152 if (toupper(*path) < 'C' )1155 if (toupper(*path) < 'C' && !fAlertBeepOff) 1153 1156 DosBeep(1000, 25); 1154 1157 DosSleep(16); // 05 Aug 07 GKY 33 … … 1210 1213 0, 0, HWND_TOP, SEEALL_OBJ, NULL, NULL); 1211 1214 if (!hwndObj) { 1212 Win_Error 2(HWND_OBJECT, HWND_DESKTOP, pszSrcFile, __LINE__,1213 IDS_WINCREATEWINDOW);1215 Win_Error(HWND_OBJECT, HWND_DESKTOP, pszSrcFile, __LINE__, 1216 PCSZ_WINCREATEWINDOW); 1214 1217 if (!PostMsg(ad->hwndClient, WM_CLOSE, MPVOID, MPVOID)) 1215 1218 WinSendMsg(ad->hwndClient, WM_CLOSE, MPVOID, MPVOID); … … 1652 1655 &d2->date, &d2->time, 1653 1656 &d1->date, &d1->time); 1654 /*(d1->date.year > d2->date.year) ? 1 :1655 (d1->date.year < d2->date.year) ? -1 :1656 (d1->date.month > d2->date.month) ? 1 :1657 (d1->date.month < d2->date.month) ? -1 :1658 (d1->date.day > d2->date.day) ? 1 :1659 (d1->date.day < d2->date.day) ? -1 :1660 (d1->time.hours > d2->time.hours) ? 1 :1661 (d1->time.hours < d2->time.hours) ? -1 :1662 (d1->time.minutes > d2->time.minutes) ? 1 :1663 (d1->time.minutes < d2->time.minutes) ? -1 :1664 (d1->time.twosecs > d2->time.twosecs) ? 1 :1665 (d1->time.twosecs < d2->time.twosecs) ? -1 : 0;*/1666 1657 1667 1658 if (!ret) … … 2336 2327 ALLDATA *ad = WinQueryWindowPtr(hwnd, QWL_USER); 2337 2328 POINTL ptl; 2338 CHAR szBuff[CCHMAXPATH + 80], szCmmaFmtFileSize[81] ;2329 CHAR szBuff[CCHMAXPATH + 80], szCmmaFmtFileSize[81], szDate[11]; 2339 2330 ULONG len, y; 2340 2331 … … 2371 2362 } 2372 2363 CommaFmtULL(szCmmaFmtFileSize, 2373 sizeof(szCmmaFmtFileSize), ad->afindex[y]->cbFile, ' '); 2364 sizeof(szCmmaFmtFileSize), ad->afindex[y]->cbFile, ' '); 2365 FDateFormat(szDate, ad->afindex[y]->date); 2374 2366 len = sprintf(szBuff, 2375 "%c%-*.*s %-12s %c%c%c%c%c % 04u/%02u/%02u %02u:%02u:%02u ",2367 "%c%-*.*s %-12s %c%c%c%c%c %s %02u%s%02u%s%02u ", 2376 2368 whichfile == ad->cursored - 1 ? '>' : ' ', 2377 2369 ad->fullnames ? ad->longestw : ad->longest, … … 2385 2377 "-S"[((ad->afindex[y]->attrFile & FILE_SYSTEM) != 0)], 2386 2378 "-D"[((ad->afindex[y]->attrFile & FILE_DIRECTORY) != 0)], 2387 ad->afindex[y]->date.year + 1980, 2388 ad->afindex[y]->date.month, 2389 ad->afindex[y]->date.day, 2390 ad->afindex[y]->time.hours, 2391 ad->afindex[y]->time.minutes, 2379 szDate, 2380 ad->afindex[y]->time.hours, TimeSeparator, 2381 ad->afindex[y]->time.minutes, TimeSeparator, 2392 2382 ad->afindex[y]->time.twosecs * 2); 2393 2383 GpiCharStringAt(hps, &ptl, len, szBuff); … … 2653 2643 SEEALL_STATUS, NULL, NULL); 2654 2644 if (!pAD->hwndStatus) 2655 Win_Error 2(hwndFrame, hwnd, pszSrcFile, __LINE__,2656 IDS_WINCREATEWINDOW);2645 Win_Error(hwndFrame, hwnd, pszSrcFile, __LINE__, 2646 PCSZ_WINCREATEWINDOW); 2657 2647 else { 2658 2648 PFNWP oldproc; … … 3440 3430 pAD->multiplier = 1; 3441 3431 if (!pAD->afindexcnt) { 3442 DosBeep(250, 50); 3432 if (!fAlertBeepOff) 3433 DosBeep(250, 50); 3443 3434 PostMsg(hwnd, UM_RESCAN, MPVOID, MPVOID); 3444 3435 } 3445 3436 else { 3446 DosBeep(1000, 25); 3437 if (!fAlertBeepOff) 3438 DosBeep(1000, 25); 3447 3439 WinInvalidateRect(hwnd, NULL, FALSE); 3448 3440 PostMsg(hwnd, UM_SETUP3, MPVOID, MPVOID); … … 3467 3459 register ULONG x; 3468 3460 ULONG y, len, numlines; 3469 CHAR szBuff[CCHMAXPATH + 80], szCmmaFmtFileSize[81] ;3461 CHAR szBuff[CCHMAXPATH + 80], szCmmaFmtFileSize[81], szDate[11]; 3470 3462 BOOL inverted, hidsys, reado, wascursored; 3471 3463 … … 3555 3547 [COLORS_CURSOREDNORMALBACK]]); 3556 3548 CommaFmtULL(szCmmaFmtFileSize, 3557 sizeof(szCmmaFmtFileSize), pAD->afindex[y]->cbFile, ' '); 3549 sizeof(szCmmaFmtFileSize), pAD->afindex[y]->cbFile, ' '); 3550 FDateFormat(szDate, pAD->afindex[y]->date); 3558 3551 len = 3559 3552 sprintf(szBuff, 3560 "%c%-*.*s %-12s %c%c%c%c%c % 04u/%02u/%02u %02u:%02u:%02u ",3553 "%c%-*.*s %-12s %c%c%c%c%c %s %02u%s%02u%s%02u ", 3561 3554 wascursored ? '>' : ' ', 3562 3555 pAD->fullnames ? pAD->longestw : pAD->longest, … … 3570 3563 "-H"[((pAD->afindex[y]->attrFile & FILE_HIDDEN) != 0)], 3571 3564 "-S"[((pAD->afindex[y]->attrFile & FILE_SYSTEM) != 0)], 3572 "-D"[((pAD->afindex[y]->attrFile & FILE_DIRECTORY) != 3573 0)], pAD->afindex[y]->date.year + 1980, 3574 pAD->afindex[y]->date.month, pAD->afindex[y]->date.day, 3575 pAD->afindex[y]->time.hours, 3576 pAD->afindex[y]->time.minutes, 3565 "-D"[((pAD->afindex[y]->attrFile & FILE_DIRECTORY) != 0)], 3566 szDate, 3567 pAD->afindex[y]->time.hours, TimeSeparator, 3568 pAD->afindex[y]->time.minutes, TimeSeparator, 3577 3569 pAD->afindex[y]->time.twosecs * 2); 3578 3570 GpiCharStringAt(hpsp, &ptl, len, szBuff); -
trunk/dll/tools.c
r1348 r1395 22 22 26 Aug 08 GKY Require unique ID plus text and help strings for all tools save toolbar on button delete 23 23 01 Sep 08 GKY Save toolbars immediately on change. 24 07 Feb 09 GKY Allow user to turn off alert and/or error beeps in settings notebook. 24 25 25 26 ***********************************************************************/ … … 784 785 WinQueryDlgItemText(hwnd, ADDBTN_ID, 6, idstr); 785 786 if (!(USHORT) atoi(idstr)) { 786 DosBeep(250, 100); 787 if (!fAlertBeepOff) 788 DosBeep(250, 100); 787 789 break; 788 790 } … … 832 834 WinQueryDlgItemText(hwnd, ADDBTN_ID, 6, idstr); 833 835 if (!(USHORT) atoi(idstr)) { 834 DosBeep(250, 100); 836 if (!fAlertBeepOff) 837 DosBeep(250, 100); 835 838 break; 836 839 } -
trunk/dll/treecnr.c
r1394 r1395 59 59 01 Jan 09 GKY Add Seek and Scan to drives & directory context menus pass drive/dir as search root 60 60 11 Jan 09 GKY Replace font names in the string file with global set at compile in init.c 61 07 Feb 09 GKY Allow user to turn off alert and/or error beeps in settings notebook. 62 07 Feb 09 GKY Add *DateFormat functions to format dates based on locale 63 07 Feb 09 GKY Eliminate Win_Error2 by moving function names to PCSZs used in Win_Error 61 64 62 65 ***********************************************************************/ … … 1220 1223 WinSetWindowText(WinWindowFromID(dcd->hwndFrame, 1221 1224 MAIN_STATUS), pci->pszFileName); 1222 if (fMoreButtons && hwndName) { 1225 if (fMoreButtons && hwndName) { 1226 CHAR szDate[11]; 1227 1228 DateFormat(szDate, pci->date); 1223 1229 WinSetWindowText(hwndName, pci->pszFileName); 1224 sprintf(str, 1225 "%04u/%02u/%02u %02u:%02u:%02u", 1226 pci->date.year, 1227 pci->date.month, 1228 pci->date.day, 1229 pci->time.hours, pci->time.minutes, pci->time.seconds); 1230 sprintf(str, "%s %02u%s%02u%s%02u", szDate, 1231 pci->time.hours, TimeSeparator, 1232 pci->time.minutes, TimeSeparator, pci->time.seconds); 1230 1233 WinSetWindowText(hwndDate, str); 1231 1234 WinSetWindowText(hwndAttr, pci->pszDispAttr); … … 1837 1840 UnFlesh(hwnd, pci); 1838 1841 PostMsg(hwnd, UM_RESCAN, MPVOID, MPVOID); 1839 DosBeep(250, 100); 1842 if (!fAlertBeepOff) 1843 DosBeep(250, 100); 1840 1844 } 1841 1845 } … … 1905 1909 !(pci->flags & RECFLAGS_ENV) && IsFullName(pci->pszFileName)) { 1906 1910 if (driveflags[toupper(*pci->pszFileName) - 'A'] & DRIVE_INVALID) { 1907 DosBeep(50, 100); 1911 if (!fAlertBeepOff) 1912 DosBeep(50, 100); 1908 1913 if (hwndStatus) 1909 1914 WinSetWindowText(hwndStatus, GetPString(IDS_RESCANSUGTEXT)); … … 3208 3213 SV_CYMINMAXBUTTON), hwndFrame, 3209 3214 HWND_TOP, IDM_OPENWINDOW, NULL, NULL)) { 3210 Win_Error 2(hwndFrame, hwndParent, pszSrcFile, __LINE__,3211 IDS_WINCREATEWINDOW);3215 Win_Error(hwndFrame, hwndParent, pszSrcFile, __LINE__, 3216 PCSZ_WINCREATEWINDOW); 3212 3217 } 3213 3218 } … … 3225 3230 * 2), 22, hwndFrame, HWND_TOP, 3226 3231 MAIN_STATUS, NULL, NULL)) { 3227 Win_Error 2(hwndFrame, hwndParent, pszSrcFile, __LINE__,3228 IDS_WINCREATEWINDOW);3232 Win_Error(hwndFrame, hwndParent, pszSrcFile, __LINE__, 3233 PCSZ_WINCREATEWINDOW); 3229 3234 } 3230 3235 } … … 3258 3263 HWND_TOP, (ULONG) TREE_CNR, NULL, NULL); 3259 3264 if (!dcd->hwndCnr) { 3260 Win_Error 2(hwndClient, hwndClient, pszSrcFile, __LINE__,3261 IDS_WINCREATEWINDOW);3265 Win_Error(hwndClient, hwndClient, pszSrcFile, __LINE__, 3266 PCSZ_WINCREATEWINDOW); 3262 3267 PostMsg(hwndClient, WM_CLOSE, MPVOID, MPVOID); 3263 3268 free(dcd); -
trunk/dll/uudecode.c
r1228 r1395 16 16 22 Mar 07 GKY Use QWL_USER 17 17 20 Aug 07 GKY Move #pragma alloc_text to end for OpenWatcom compat 18 07 Feb 09 GKY Allow user to turn off alert and/or error beeps in settings notebook. 18 19 19 20 ***********************************************************************/ … … 343 344 WinQueryDlgItemText(hwnd, MRG_TARGETNAME, CCHMAXPATH, szBuffer); 344 345 if (!*szBuffer) { 345 DosBeep(50, 100); 346 if (!fAlertBeepOff) 347 DosBeep(50, 100); 346 348 WinSetFocus(HWND_DESKTOP, WinWindowFromID(hwnd, MRG_TARGETNAME)); 347 349 break; … … 350 352 FIL_QUERYFULLNAME, 351 353 wk->li->targetpath, CCHMAXPATH)) { 352 DosBeep(50, 100); 354 if (!fAlertBeepOff) 355 DosBeep(50, 100); 353 356 WinSetFocus(HWND_DESKTOP, WinWindowFromID(hwnd, MRG_TARGETNAME)); 354 357 break; -
trunk/dll/viewer.c
r1394 r1395 17 17 26 Nov 07 GKY Add "Save as" menu option to editor 18 18 29 Feb 08 GKY Refactor global command line variables to notebook.h 19 07 Feb 09 GKY Allow user to turn off alert and/or error beeps in settings notebook. 20 07 Feb 09 GKY Eliminate Win_Error2 by moving function names to PCSZs used in Win_Error 19 21 20 22 ***********************************************************************/ … … 362 364 0, 363 365 0, 0, hwnd, HWND_TOP, MLE_MLE, MPVOID, MPVOID)) { 364 Win_Error2(hwnd, hwnd, pszSrcFile, __LINE__, IDS_WINCREATEWINDOW); 366 Win_Error(hwnd, hwnd, pszSrcFile, __LINE__, 367 PCSZ_WINCREATEWINDOW); 365 368 } 366 369 else { … … 701 704 case WM_COMMAND: 702 705 if (vw->busy && SHORT1FROMMP(mp1) != MLE_QUIT) { 703 DosBeep(50, 100); 706 if (!fAlertBeepOff) 707 DosBeep(50, 100); 704 708 return 0; 705 709 } … … 807 811 case MLE_TOGGLEREADONLY: 808 812 if (vw->busy || vw->hex == 1) { 809 DosBeep(50, 100); 813 if (!fAlertBeepOff) 814 DosBeep(50, 100); 810 815 } 811 816 else { … … 1088 1093 sip.title = GetPString(IDS_NVLINEJUMPTITLETEXT); 1089 1094 numlines = MLEnumlines(hwndMLE); 1090 if (!numlines) 1091 DosBeep(50, 100); 1095 if (!numlines) 1096 if (!fAlertBeepOff) 1097 DosBeep(50, 100); 1092 1098 else { 1093 1099 sprintf(ss, -
trunk/dll/viewinf.c
r1391 r1395 17 17 10 Dec 08 SHL Integrate exception handler support 18 18 11 Jan 09 GKY Replace font names in the string file with global set at compile in init.c 19 07 Feb 09 GKY Eliminate Win_Error2 by moving function names to PCSZs used in Win_Error 20 07 Feb 09 GKY Allow user to turn off alert and/or error beeps in settings notebook. 19 21 20 22 ***********************************************************************/ … … 250 252 swp.cy, 251 253 hwnd, HWND_TOP, VINF_LISTBOX, NULL, NULL)) { 252 Win_Error2(hwnd, hwnd, pszSrcFile, __LINE__, IDS_WINCREATEWINDOW); 254 Win_Error(hwnd, hwnd, pszSrcFile, __LINE__, 255 PCSZ_WINCREATEWINDOW); 253 256 } 254 257 else { … … 438 441 MPVOID); 439 442 if (sSelect == LIT_NONE) { 440 DosBeep(50, 100); 443 if (!fAlertBeepOff) 444 DosBeep(50, 100); 441 445 break; 442 446 } … … 538 542 MPVOID); 539 543 if (sSelect < 0) { 540 DosBeep(50, 100); 544 if (!fAlertBeepOff) 545 DosBeep(50, 100); 541 546 } 542 547 else { … … 550 555 p = strchr(text, '>'); 551 556 if (!p) { 552 DosBeep(50, 100); 557 if (!fAlertBeepOff) 558 DosBeep(50, 100); 553 559 break; 554 560 } … … 556 562 bstrip(p); 557 563 if (!*p) 558 DosBeep(50, 100); 564 if (!fAlertBeepOff) 565 DosBeep(50, 100); 559 566 else 560 567 ViewHelp(p); -
trunk/dll/worker.c
r1394 r1395 38 38 25 Dec 08 GKY Add DRIVE_RSCANNED flag to monitor for the first recursive drive scan per session 39 39 to prevent duplicate directory names in tree following a copy before initial scan. 40 07 Feb 09 GKY Allow user to turn off alert and/or error beeps in settings notebook. 40 41 41 42 ***********************************************************************/ … … 1019 1020 GetPString(IDS_ARETEXT) : GetPString(IDS_ISTEXT)); 1020 1021 Notify(message); 1021 if (toupper(*wk->li->targetpath) < 'C' )1022 if (toupper(*wk->li->targetpath) < 'C' && !fAlertBeepOff) 1022 1023 DosBeep(1000, 25); // Wake up user 1023 1024 DosSleep(16);//05 Aug 07 GKY 33 … … 1613 1614 (hs > 1) ? 1614 1615 GetPString(IDS_ARETEXT) : GetPString(IDS_ISTEXT)); 1615 if ( ro || hs || sysdir)1616 if ((ro || hs || sysdir) && !fAlertBeepOff) 1616 1617 DosBeep(300, 100); // Wake up user 1617 1618 strcat(prompt, GetPString(IDS_DELPROMPT6TEXT));
Note:
See TracChangeset
for help on using the changeset viewer.