Changeset 907
- Timestamp:
- Jan 6, 2008, 8:26:17 AM (18 years ago)
- Location:
- trunk
- Files:
-
- 12 added
- 107 edited
- 2 moved
Legend:
- Unmodified
- Added
- Removed
-
trunk/HISTORY
r905 r907 18 18 o Update includes to allow standalone usage (Steven) 19 19 o Switch to wrc.exe default; support USE_RC from environment (Steven) 20 o Avoid out of memory traps in Compare Directories (Steven) 20 21 21 22 3.08 -
trunk/av2.c
r873 r907 14 14 ***********************************************************************/ 15 15 16 #include <stdarg.h>17 #include <stdio.h>18 16 #include <stdlib.h> 19 17 #include <string.h> 20 #include <ctype.h>21 18 22 19 #define INCL_DOS 23 20 #define INCL_WIN 24 #include <os2.h> 25 26 #include "dll\fm3dll.h" 21 #define INCL_LONGLONG 22 27 23 #include "dll\version.h" 28 24 #include "dll\fm3str.h" 25 #include "dll\arccnrs.h" 26 #include "dll\fm3dll.h" 29 27 30 28 HMTX av2Sem; -
trunk/databar.c
r551 r907 16 16 ***********************************************************************/ 17 17 18 #include <string.h> 19 18 20 #define INCL_DOS 19 21 #define INCL_WIN 20 # include <os2.h>22 #define INCL_LONGLONG 21 23 22 #include <stdarg.h>23 #include <stdio.h>24 #include <stdlib.h>25 #include <string.h>26 #include <ctype.h>27 28 #include "dll\fm3dll.h"29 24 #include "dll\datamin.h" 30 25 #include "dll\fm3dlg.h" 26 #include "dll\fm3dll.h" 31 27 32 #ifdef NEVER 28 #ifdef NEVER // 05 Jan 08 SHL fixme to be gone? 33 29 34 30 VOID APIENTRY deinit(ULONG why) 35 31 { 36 37 32 if (fmprof) 38 33 PrfCloseProfile(fmprof); … … 48 43 int main(int argc, char *argv[]) 49 44 { 50 51 45 HAB hab; 52 46 HMQ hmq; -
trunk/dirsize.c
r552 r907 9 9 Copyright (c) 2004 Steven H.Levine 10 10 11 Revisions 11 Jun 02 SHL -Baseline12 06 Jan 04 SHL -Total drives >4GB better11 11 Jun 02 SHL Baseline 12 06 Jan 04 SHL Total drives >4GB better 13 13 14 14 ***********************************************************************/ 15 16 #include <string.h> 17 #include <ctype.h> 15 18 16 19 #define INCL_DOS 17 20 #define INCL_WIN 18 21 19 #include <os2.h>20 #include <stdarg.h>21 #include <stdio.h>22 #include <stdlib.h>23 #include <string.h>24 #include <ctype.h>25 26 #include "dll\fm3dll.h"27 22 #include "dll\fm3dlg.h" 28 23 #include "dirsize.h" 24 #include "dll\fm3dll.h" 29 25 30 26 MRESULT EXPENTRY DirMainProc(HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2) … … 101 97 else if (type & DRIVE_REMOTE) 102 98 WinSetDlgItemText(hwnd, DIRSIZE_LOCAL, "Remote drive"); 103 104 105 99 else if (type & DRIVE_VIRTUAL) 100 WinSetDlgItemText(hwnd, DIRSIZE_LOCAL, "Virtual drive"); 101 else if (type & DRIVE_RAMDISK) 106 102 WinSetDlgItemText(hwnd, DIRSIZE_LOCAL, "Ramdisk"); 107 103 else { … … 205 201 } 206 202 207 #ifdef NEVER 203 #ifdef NEVER // 05 Jan 08 SHL fixme to be gone? 208 204 209 205 VOID APIENTRY deinit(ULONG why) -
trunk/dll/arccnrs.c
r906 r907 7 7 8 8 Copyright (c) 1993-98 M. Kimes 9 Copyright (c) 2001, 200 7Steven H. Levine9 Copyright (c) 2001, 2008 Steven H. Levine 10 10 11 11 11 Jun 02 SHL Ensure archive name not garbage … … 52 52 ***********************************************************************/ 53 53 54 #include <stdlib.h> // free.. 55 #include <string.h> 56 #include <ctype.h> 57 #include <direct.h> // rmdir 58 #include <share.h> // SH_DENYWR 59 #include <limits.h> // ULONG_MAX 60 #include <process.h> // _beginthread 61 62 #if 0 63 #include <malloc.h> // _heapchk 64 #endif 65 54 66 #define INCL_DOS 55 67 #define INCL_DOSERRORS 56 68 #define INCL_WIN 57 #define INCL_GPI58 69 #define INCL_LONGLONG 59 #include <os2.h> 60 61 #include <stdarg.h> 62 #include <stdio.h> 63 #include <stdlib.h> 64 #include <string.h> 65 #include <ctype.h> 66 #include <time.h> 67 #include <direct.h> 68 #include <share.h> 69 #include <limits.h> 70 #include <process.h> // _beginthread 71 72 #if 0 73 #include <malloc.h> // _heapchk 74 #endif 75 76 #include "fm3dll.h" 70 71 #include "arccnrs.h" // StartArcCnr 77 72 #include "fm3dlg.h" 78 73 #include "fm3str.h" 79 74 #include "mle.h" 75 #include "pathutil.h" // BldFullPathName 76 #include "filldir.h" // EmptyCnr... 77 #include "errutil.h" // Dos_Error... 78 #include "strutil.h" // GetPString 79 #include "fm3dll.h" 80 80 81 81 #pragma data_seg(DATA1) … … 83 83 static INT DefArcSortFlags; 84 84 static PSZ pszSrcFile = __FILE__; 85 86 /**87 * Build quoted full path name in callers buffer given88 * directory name and filename89 * @param pszPathName points to drive/directory if not NULL90 * @returns pointer to quoted path name in caller's buffer91 */92 93 PSZ BldQuotedFullPathName(PSZ pszFullPathName, PSZ pszPathName, PSZ pszFileName)94 {95 UINT c = pszPathName ? strlen(pszPathName) : 0;96 BOOL q = needs_quoting(pszPathName) ||97 needs_quoting(pszFileName);98 PSZ psz = pszFullPathName;99 100 if (q)101 *psz++ = '"';102 if (c > 0) {103 memcpy(psz, pszPathName, c);104 psz += c;105 if (*(psz - 1) != '\\')106 *psz++ = '\\';107 }108 strcpy(psz, pszFileName);109 if (q) {110 psz += strlen(psz);111 *psz++ = '"';112 *psz = 0;113 }114 return pszFullPathName;115 }116 117 /**118 * Build quoted full path name in callers buffer given a filename119 * @returns pointer to quoted file name in caller's buffer120 */121 122 PSZ BldQuotedFileName(PSZ pszQuotedFileName, PSZ pszFileName)123 {124 BOOL q = needs_quoting(pszFileName);125 PSZ psz = pszQuotedFileName;126 127 if (q)128 *psz++ = '"';129 strcpy(psz, pszFileName);130 if (q) {131 psz += strlen(psz);132 *psz++ = '"';133 *psz = 0;134 }135 return pszQuotedFileName;136 }137 85 138 86 static MRESULT EXPENTRY ArcErrProc(HWND hwnd, ULONG msg, MPARAM mp1, … … 202 150 if (*viewer) { 203 151 ExecOnList((HWND) 0, viewer, WINDOWED | SEPARATE | 204 205 152 (fViewChild ? CHILD : 0), 153 NULL, list, NULL, pszSrcFile, __LINE__); 206 154 } 207 155 else … … 271 219 case SORT_LWDATE: 272 220 ret = TestCDates(&pai1->date, &pai1->time, 273 274 221 &pai2->date, &pai2->time); 222 /*(pai1->date.year < pai2->date.year) ? 1 : 275 223 (pai1->date.year > pai2->date.year) ? -1 : 276 224 (pai1->date.month < pai2->date.month) ? 1 : … … 1518 1466 free(s); 1519 1467 if (IsFile(filename) == 1) { 1468 #if 1 // 06 Oct 07 SHL fixme to be gone - set to 0 for ticket #58 testing 1520 1469 if (fViewChild && fArcStuffVisible) 1521 1470 DosSleep(100); // Allow unzip session to finish closing 14 Mar 07 SHL 1471 #endif 1522 1472 WinSendMsg(dcd->hwndCnr, UM_ENTER, MPFROMP(filename), MPVOID); 1523 1473 } … … 1578 1528 1579 1529 if (IsFile(li->list[x])) 1580 1530 BldQuotedFileName(szBuffer + strlen(szBuffer), li->list[x]); 1581 1531 else 1582 1532 BldQuotedFullPathName(szBuffer + strlen(szBuffer), li->list[x], "*"); 1583 1533 1584 1534 x++; … … 1586 1536 strlen(li->list[x]) + 5 > 1024) { 1587 1537 runemf2(SEPARATE | WINDOWED | 1588 1589 1590 1538 (fArcStuffVisible ? 0 : BACKGROUND | MINIMIZED) | 1539 WAIT, hwnd, pszSrcFile, __LINE__, 1540 NULL, NULL, "%s", szBuffer); 1591 1541 *p = 0; 1592 1542 } … … 1696 1646 CHAR fullname[CCHMAXPATH * 2]; 1697 1647 CHAR **exfiles = NULL; 1698 INT numfiles = 0, numalloc = 0;1648 UINT numfiles = 0, numalloc = 0; 1699 1649 1700 1650 for (x = 0; li->list[x]; x++) { … … 1767 1717 runemf2(SEPARATE | WINDOWED | 1768 1718 (fArcStuffVisible ? 0 : BACKGROUND | MINIMIZED) | 1769 1770 1719 WAIT, hwnd, pszSrcFile, __LINE__, 1720 li->targetpath, NULL, "%s", cl); 1771 1721 *endofit = 0; 1772 1722 } while (li->list[x]); … … 1826 1776 WINDOWED | SEPARATEKEEP | PROMPT, 1827 1777 li->targetpath, 1828 1829 1778 NULL, GetPString(IDS_EXECARCFILETITLETEXT), 1779 pszSrcFile, __LINE__); 1830 1780 else if (li->type == IDM_VIRUSSCAN) 1831 1781 ExecOnList(hwnd, virus, PROMPT | WINDOWED | SEPARATEKEEP, 1832 1782 li->targetpath, NULL, 1833 1834 1783 GetPString(IDS_VIRUSSCANARCHIVETITLETEXT), 1784 pszSrcFile, __LINE__); 1835 1785 else if (li->type == IDM_VIEW || li->type == IDM_VIEWTEXT || 1836 1786 li->type == IDM_VIEWBINARY || li->type == IDM_EDIT || … … 1966 1916 case IDM_FIND: 1967 1917 { 1968 INT numfiles = 0, numalloced = 0;1918 UINT numfiles = 0, numalloced = 0; 1969 1919 CHAR **list2 = NULL, fullname[CCHMAXPATH * 2], *p; 1970 1920 … … 2831 2781 runemf2(SEPARATE | WINDOWED | 2832 2782 (fArcStuffVisible ? 0 : BACKGROUND | MINIMIZED), 2833 2834 2783 hwnd, pszSrcFile, __LINE__, 2784 dcd->directory, NULL, "%s %s", dcd->info->extract, 2835 2785 BldQuotedFileName(szQuotedArcName, dcd->arcname)); 2836 2786 if (SHORT1FROMMP(mp1) == IDM_ARCEXTRACTEXIT) … … 2843 2793 runemf2(SEPARATE | WINDOWED | 2844 2794 (fArcStuffVisible ? 0 : BACKGROUND | MINIMIZED), 2845 2846 2795 hwnd, pszSrcFile, __LINE__, 2796 dcd->directory, NULL, "%s %s", 2847 2797 dcd->info->exwdirs, 2848 2798 BldQuotedFileName(szQuotedArcName, dcd->arcname)); -
trunk/dll/archive.c
r888 r907 17 17 ***********************************************************************/ 18 18 19 #include <string.h> 20 19 21 #define INCL_WIN 20 22 #define INCL_DOS 21 #include <os2.h> 22 23 #include <stdlib.h> 24 #include <stdio.h> 25 #include <share.h> 26 #include <string.h> 27 #include <time.h> 28 #include <ctype.h> 29 30 #include "fm3dll.h" 23 #define INCL_LONGLONG // dircnrs.h 24 31 25 #include "fm3dlg.h" 32 26 #include "fm3str.h" 27 #include "strutil.h" // GetPString 28 #include "errutil.h" // Runtime_Error 29 #include "fm3dll.h" 33 30 34 31 static PSZ pszSrcFile = __FILE__; -
trunk/dll/assoc.c
r888 r907 5 5 6 6 Copyright (c) 1993-98 M. Kimes 7 Copyright (c) 2004, 200 7Steven H.Levine7 Copyright (c) 2004, 2008 Steven H.Levine 8 8 9 9 01 Aug 04 SHL Rework lstrip/rstrip usage … … 18 18 **************************************************************************************/ 19 19 20 #include <stdlib.h> 21 #include <string.h> 22 #include <share.h> 23 20 24 #define INCL_DOS 21 25 #define INCL_WIN 22 26 #define INCL_PM 23 27 #define INCL_WINHOOKS 24 25 #include <os2.h> 26 #include <stdio.h> 27 #include <stdlib.h> 28 #include <string.h> 29 #include <ctype.h> 30 #include <share.h> 31 #include "fm3dll.h" 28 #define INCL_LONGLONG // dircnrs.h 29 32 30 #include "fm3dlg.h" 33 31 #include "fm3str.h" 32 #include "pathutil.h" // BldQuotedFileName 33 #include "errutil.h" // Dos_Error... 34 #include "strutil.h" // GetPString 35 #include "fm3dll.h" 34 36 35 37 #pragma data_seg(DATA1) -
trunk/dll/attribs.c
r847 r907 15 15 ***********************************************************************/ 16 16 17 #include <ctype.h> 18 17 19 #define INCL_DOS 18 20 #define INCL_WIN 19 #define INCL_LONGLONG 20 #include <os2.h> 21 22 #include <stdarg.h> 23 #include <stdio.h> 24 #include <stdlib.h> 25 #include <string.h> 26 #include <ctype.h> 27 #include <time.h> 28 29 #include "fm3dll.h" 21 30 22 #include "fm3dlg.h" 31 23 #include "fm3str.h" 24 #include "makelist.h" // LISTINFO 25 #include "errutil.h" // Runtime_Error 26 #include "strutil.h" // GetPString 27 #include "fm3dll.h" 32 28 33 29 static PSZ pszSrcFile = __FILE__; … … 293 289 { 294 290 CHAR szBuffer[CCHMAXPATH + 1]; 295 INT numfiles = 0, numalloc = 0, error; 291 UINT numfiles = 0, numalloc = 0; 292 INT error; 296 293 297 294 if (li->list) -
trunk/dll/autoview.c
r897 r907 7 7 8 8 Copyright (c) 1993-98 M. Kimes 9 Copyright (c) 2001, 200 6Steven H.Levine9 Copyright (c) 2001, 2008 Steven H.Levine 10 10 11 11 12 Sep 02 SHL AutoObjProc: catch buff2 overflows … … 26 26 ***********************************************************************/ 27 27 28 #include <stdlib.h> 29 #include <string.h> 30 #include <ctype.h> 31 #include <process.h> // _beginthread 32 28 33 #define INCL_DOS 29 34 #define INCL_WIN 30 35 #define INCL_GPI 31 36 #define INCL_LONGLONG 32 #include <os2.h> 33 34 #include <stdlib.h> 35 #include <stdio.h> 36 #include <string.h> 37 #include <ctype.h> 38 #include <process.h> // _beginthread 39 40 #include "fm3dll.h" 37 41 38 #include "fm3dlg.h" 42 39 #include "fm3str.h" 43 40 #include "mle.h" 41 #include "pathutil.h" // BldFullPathName 42 #include "errutil.h" // Dos_Error... 43 #include "strutil.h" // GetPString 44 #include "fm3dll.h" 44 45 45 46 #pragma data_seg(DATA1) -
trunk/dll/avl.c
r850 r907 7 7 8 8 Copyright (c) 1993, 1998 M. Kimes 9 Copyright (c) 2004, 200 7Steven H.Levine9 Copyright (c) 2004, 2008 Steven H.Levine 10 10 11 11 01 Aug 04 SHL Rework lstrip/rstrip usage … … 33 33 ***********************************************************************/ 34 34 35 #include <stdlib.h> 36 #include <string.h> 37 #include <ctype.h> 38 #include <share.h> 39 40 #define INCL_DOS 35 41 #define INCL_WIN 36 42 #define INCL_WINSTDDRAG 37 #define INCL_DOS38 43 #define INCL_LONGLONG 39 #include <os2.h> 40 41 #include <stdlib.h> 42 #include <stdio.h> 43 #include <string.h> 44 #include <share.h> 45 #include <ctype.h> 46 47 #include "fm3dll.h" 44 48 45 #include "fm3dlg.h" 49 46 #include "fm3str.h" 47 #include "avl.h" 48 #include "strutil.h" // GetPString 49 #include "errutil.h" // Runtime_Error 50 #include "fm3dll.h" 50 51 51 52 static PSZ pszSrcFile = __FILE__; -
trunk/dll/avv.c
r906 r907 26 26 ***********************************************************************/ 27 27 28 #include <stdlib.h> 29 #include <string.h> 30 28 31 #define INCL_DOS 29 32 #define INCL_WIN 30 #include <os2.h> 31 32 #include <stdlib.h> 33 #include <stdio.h> 34 #include <stdarg.h> 35 #include <string.h> 36 #include <ctype.h> 37 #include <time.h> 38 39 #include "fm3dll.h" 33 #define INCL_LONGLONG // dircnrs.h 34 40 35 #include "fm3dlg.h" 41 36 #include "version.h" 42 37 #include "fm3str.h" 38 #include "strutil.h" // GetPString 39 #include "errutil.h" // Runtime_Error 40 #include "fm3dll.h" 43 41 44 42 #pragma data_seg(DATA1) -
trunk/dll/chklist.c
r847 r907 7 7 8 8 Copyright (c) 1993-98 M. Kimes 9 Copyright (c) 2005, 200 6Steven H.Levine9 Copyright (c) 2005, 2008 Steven H.Levine 10 10 11 11 10 Jan 05 SHL Allow DND_TARGET to hold CCHMAXPATH … … 16 16 ***********************************************************************/ 17 17 18 #include <string.h> 19 #include <ctype.h> 20 18 21 #define INCL_DOS 19 22 #define INCL_WIN 20 23 #define INCL_GPI 21 24 #define INCL_LONGLONG 22 #include <os2.h> 23 24 #include <stdio.h> 25 #include <stdlib.h> 26 #include <string.h> 27 #include <ctype.h> 28 29 #include "fm3dll.h" 25 30 26 #include "fm3dlg.h" 31 27 #include "fm3str.h" 28 #include "makelist.h" // AddToList 29 #include "errutil.h" // Dos_Error... 30 #include "strutil.h" // GetPString 31 #include "fm3dll.h" 32 32 33 33 #pragma data_seg(DATA1) … … 193 193 194 194 CHAR szBuffer[CCHMAXPATH + 1]; 195 INT numfiles = 0, numalloc = 0, error; 195 UINT numfiles = 0, numalloc = 0; 196 INT error; 196 197 SHORT x; 197 198 … … 508 509 SHORT x; 509 510 CHAR szBuffer[CCHMAXPATH + 1]; 510 INT numfiles = 0, numalloc = 0, error; 511 UINT numfiles = 0, numalloc = 0; 512 INT error; 511 513 USHORT cmd; 512 514 -
trunk/dll/cmdline.c
r793 r907 19 19 ***********************************************************************/ 20 20 21 #include <stdlib.h> 22 #include <string.h> 23 #include <share.h> 24 #include <io.h> // unlink 25 21 26 #define INCL_DOS 22 27 #define INCL_WIN 23 #include <os2.h> 24 25 #include <stdio.h> 26 #include <stdlib.h> 27 #include <string.h> 28 #include <ctype.h> 29 #include <share.h> 30 #include <io.h> // unlink 31 32 #include "fm3dll.h" 28 #define INCL_LONGLONG // dircnrs.h 29 33 30 #include "fm3dlg.h" 34 31 #include "fm3str.h" 35 32 #include "mle.h" 33 #include "errutil.h" // Dos_Error... 34 #include "strutil.h" // GetPString 35 #include "fm3dll.h" 36 36 37 37 static PSZ pszSrcFile = __FILE__; -
trunk/dll/codepage.c
r793 r907 14 14 ***********************************************************************/ 15 15 16 #include <stdlib.h> 17 #include <string.h> 18 16 19 #define INCL_DOS 17 20 #define INCL_WIN 18 #include <os2.h> 19 20 #include <stdlib.h> 21 #include <stdio.h> 22 #include <string.h> 23 #include <time.h> 24 25 #include "fm3dll.h" 21 #define INCL_LONGLONG // dircnrs.h 22 26 23 #include "fm3dlg.h" 27 24 #include "fm3str.h" 25 #include "strutil.h" // GetPString 26 #include "errutil.h" // Runtime_Error 27 #include "fm3dll.h" 28 28 29 29 #pragma data_seg(DATA1) -
trunk/dll/collect.c
r906 r907 7 7 8 8 Copyright (c) 1993-98 M. Kimes 9 Copyright (c) 2003, 200 7Steven H. Levine9 Copyright (c) 2003, 2008 Steven H. Levine 10 10 11 11 15 Oct 02 MK Baseline … … 45 45 ***********************************************************************/ 46 46 47 #define INCL_DOS48 #define INCL_WIN49 #define INCL_GPI50 #define INCL_DOSERRORS51 #define INCL_LONGLONG52 #include <os2.h>53 54 #include <stdarg.h>55 #include <stdio.h>56 47 #include <stdlib.h> 57 48 #include <string.h> 58 49 #include <ctype.h> 59 #include <time.h>60 50 #include <share.h> 61 51 #include <limits.h> 62 52 #include <process.h> // _beginthread 63 53 64 #include "fm3dll.h" 54 #define INCL_DOS // QSV_MS_COUNT 55 #define INCL_WIN 56 #define INCL_DOSERRORS 57 #define INCL_LONGLONG 58 65 59 #include "fm3dlg.h" 66 60 #include "fm3str.h" 67 61 #include "mle.h" 68 62 #include "grep.h" 63 #include "comp.h" 64 #include "arccnrs.h" // StartArcCnr 65 #include "filldir.h" // EmptyCnr... 66 #include "strutil.h" // GetPString 67 #include "errutil.h" // Runtime_Error 68 #include "fm3dll.h" 69 69 70 70 #pragma data_seg(DATA1) … … 127 127 if (dcd) { 128 128 SetViewMenu(hwndButtonPopup, dcd->flWindowAttr); 129 130 129 SetDetailsSwitches(hwndButtonPopup, dcd); 130 CopyPresParams(hwndButtonPopup, hwnd); 131 131 } 132 132 … … 572 572 else { 573 573 pciFirst = pci; 574 // 04 Jan 08 SHL fixme like comp.c if CM_ALLOCRECORD returns unexpected record count 574 575 for (x = 0; li->list[x]; x++) { 575 576 nm = 1; … … 587 588 TRUE) && 588 589 !xDosFindFirst(fullname, 589 590 591 592 593 590 &hdir, 591 FILE_NORMAL | FILE_DIRECTORY | 592 FILE_ARCHIVED | FILE_SYSTEM | 593 FILE_HIDDEN | FILE_READONLY, 594 &fb4, sizeof(fb4), &nm, FIL_QUERYEASIZEL)) { 594 595 DosFindClose(hdir); 595 596 priority_normal(); … … 1359 1360 SetViewMenu((HWND) mp2, dcd->flWindowAttr); 1360 1361 WinEnableMenuItem((HWND) mp2, IDM_RESELECT, 1361 1362 1362 (dcd->lastselection != NULL)); 1363 CopyPresParams((HWND) mp2, hwnd); 1363 1364 break; 1364 1365 … … 2092 2093 if (dcd->hwndLastMenu == CollectorCnrMenu) { 2093 2094 SetViewMenu(dcd->hwndLastMenu, dcd->flWindowAttr); 2094 2095 2095 SetDetailsSwitches(dcd->hwndLastMenu, dcd); 2096 CopyPresParams(dcd->hwndLastMenu, hwnd); 2096 2097 if (dcd->flWindowAttr & CV_MINI) 2097 2098 WinCheckMenuItem(dcd->hwndLastMenu, IDM_MINIICONS, TRUE); … … 2300 2301 strcat(li->targetpath, " %a"); 2301 2302 ExecOnList(dcd->hwndParent, li->targetpath, 2302 2303 2303 PROMPT | WINDOWED, NULL, li->list, NULL, 2304 pszSrcFile, __LINE__); 2304 2305 FreeList(li->list); 2305 2306 li->list = NULL; … … 2523 2524 DosError(FERR_DISABLEHARDERR); 2524 2525 status = DosFindFirst(pci->pszFileName, &hDir, 2525 2526 FILE_NORMAL | FILE_DIRECTORY | 2526 2527 FILE_ARCHIVED | FILE_READONLY | 2527 2528 FILE_HIDDEN | FILE_SYSTEM, -
trunk/dll/colors.c
r793 r907 15 15 ***********************************************************************/ 16 16 17 #include <string.h> 18 17 19 #define INCL_DOS 18 20 #define INCL_WIN 19 21 #define INCL_GPI 20 # include <os2.h>22 #define INCL_LONGLONG // dircnrs.h 21 23 22 #include <stdlib.h> 23 #include <stdio.h> 24 #include <string.h> 25 #include <ctype.h> 26 24 #include "fm3dlg.h" 25 #include "strutil.h" // GetPString 26 #include "errutil.h" // Runtime_Error 27 27 #include "fm3dll.h" 28 #include "fm3dlg.h"29 28 30 29 #pragma data_seg(DATA2) -
trunk/dll/commafmt.c
r860 r907 29 29 */ 30 30 31 #define INCL_WIN 32 #define INCL_LONGLONG 33 #include <os2.h> 31 #include <string.h> 34 32 35 #include <stdlib.h>36 #include <stdio.h>37 #include <string.h>38 33 #include "fm3dll.h" 39 34 -
trunk/dll/command.c
r888 r907 7 7 8 8 Copyright (c) 1993-98 M. Kimes 9 Copyright (c) 2004, 200 7Steven H. Levine9 Copyright (c) 2004, 2008 Steven H. Levine 10 10 11 11 01 Aug 04 SHL Rework lstrip/rstrip usage … … 24 24 ***********************************************************************/ 25 25 26 #include <stdlib.h> 27 #include <string.h> 28 #include <share.h> 29 26 30 #define INCL_DOS 27 31 #define INCL_WIN 28 #include <os2.h> 29 30 #include <stdio.h> 31 #include <stdlib.h> 32 #include <string.h> 33 #include <ctype.h> 34 #include <share.h> 35 36 #include "fm3dll.h" 32 #define INCL_LONGLONG // dircnrs.h 33 37 34 #include "fm3dlg.h" 38 35 #include "fm3str.h" 39 36 #include "tools.h" 37 #include "arccnrs.h" // BldQuotedFileName 38 #include "errutil.h" // Dos_Error... 39 #include "strutil.h" // GetPString 40 #include "fm3dll.h" 41 40 42 41 43 typedef struct -
trunk/dll/common.c
r888 r907 7 7 8 8 Copyright (c) 1993, 1998 M. Kimes 9 Copyright (c) 2001, 200 7Steven H. Levine9 Copyright (c) 2001, 2008 Steven H. Levine 10 10 11 11 13 Aug 05 SHL Renames … … 23 23 ***********************************************************************/ 24 24 25 #include <stdlib.h> 26 #include <string.h> 27 #include <ctype.h> 28 25 29 #define INCL_DOS 26 30 #define INCL_DOSERRORS 27 31 #define INCL_WIN 28 32 #define INCL_GPI 29 #define INCL_LONGLONG 30 #include <os2.h> 31 32 #include <stdarg.h> 33 #include <stdio.h> 34 #include <stdlib.h> 35 #include <string.h> 36 #include <ctype.h> 37 #include <time.h> 38 #include <direct.h> 39 #include <share.h> 40 #include <limits.h> 41 42 #include "fm3dll.h" 33 #define INCL_LONGLONG // dircnrs.h 34 43 35 #include "fm3dlg.h" 44 36 #include "fm3str.h" 45 37 #include "mle.h" 38 #include "filldir.h" // RemoveCnrItems 39 #include "errutil.h" // Dos_Error... 40 #include "strutil.h" // GetPString 41 #include "fm3dll.h" 46 42 47 43 #pragma data_seg(DATA1) … … 244 240 case IDM_CHKDSK: 245 241 runemf2(SEPARATE | WINDOWED, 246 247 242 hwnd, pszSrcFile, __LINE__, NULL, NULL, 243 "PMCHKDSK.EXE %c:", toupper(*dv)); 248 244 break; 249 245 case IDM_OPTIMIZE: … … 265 261 case IDM_FORMAT: 266 262 runemf2(SEPARATE | WINDOWED, 267 268 263 hwnd, pszSrcFile, __LINE__, NULL, NULL, 264 "PMFORMAT.EXE %c:", toupper(*dv)); 269 265 break; 270 266 -
trunk/dll/comp.c
r897 r907 7 7 8 8 Copyright (c) 1993-02 M. Kimes 9 Copyright (c) 2003, 200 7Steven H. Levine9 Copyright (c) 2003, 2008 Steven H. Levine 10 10 11 11 16 Oct 02 MK Baseline … … 40 40 27 Sep 07 SHL Correct ULONGLONG size formatting 41 41 30 Dec 07 GKY Use TestCDates for compare by file date/time 42 04 Jan 08 SHL Avoid traps if CM_ALLOCRECORD returns less that requested 43 05 Jan 08 SHL Use WM_TIMER for progress messaging 44 05 Jan 08 SHL Use ITIMER_DESC for hogging control 42 45 43 46 ***********************************************************************/ 47 48 #include <stdlib.h> 49 #include <string.h> 50 #include <share.h> 51 #include <io.h> 52 #include <process.h> // _beginthread 44 53 45 54 #define INCL_DOS … … 48 57 #define INCL_GPI 49 58 #define INCL_LONGLONG 50 #include <os2.h> 51 52 #include <stdio.h> 53 #include <stdlib.h> 54 #include <string.h> 55 #include <ctype.h> 56 #include <share.h> 57 #include <io.h> 58 #include <process.h> // _beginthread 59 60 #include "fm3dll.h" 59 61 60 #include "fm3dlg.h" 62 61 #include "fm3str.h" 62 #include "pathutil.h" // BldFullPathName 63 #include "filldir.h" // EmptyCnr... 64 #include "makelist.h" // AddToFileList... 65 #include "errutil.h" // Dos_Error... 66 #include "strutil.h" // GetPString 67 #include "tmrsvcs.h" // IsITimerExpired 68 #include "comp.h" 69 #include "fm3dll.h" 63 70 64 71 typedef struct … … 71 78 72 79 static PSZ pszSrcFile = __FILE__; 73 74 /**75 * Build full path name in callers buffer given directory76 * name and filename77 * @param pszPathName points to drive/directory if not NULL78 * @returns pointer to full path name in caller's buffer79 * @note OK for pszFullPathName and pszPathName to point to same buffer80 *81 */82 83 PSZ BldFullPathName(PSZ pszFullPathName, PSZ pszPathName, PSZ pszFileName)84 {85 UINT c = pszPathName ? strlen(pszPathName) : 0;86 if (c > 0) {87 memcpy(pszFullPathName, pszPathName, c);88 if (pszFullPathName[c - 1] != '\\')89 pszFullPathName[c++] = '\\';90 }91 strcpy(pszFullPathName + c, pszFileName);92 return pszFullPathName;93 }94 80 95 81 //=== SnapShot() Write directory tree to file and recurse if requested === … … 116 102 // 13 Aug 07 SHL fixme to report errors 117 103 if (!xDosFindFirst(mask, 118 104 &hdir, 119 105 FILE_NORMAL | FILE_DIRECTORY | 120 106 FILE_ARCHIVED | FILE_READONLY | FILE_HIDDEN | … … 450 436 MPFROM2SHORT(CMA_FIRST, CMA_ITEMORDER)); 451 437 438 WinStartTimer(hab, cmp->hwnd, ID_TIMER, 2000); 439 452 440 while (pci && (INT)pci != -1 && pciD && (INT)pciD != -1) { 453 441 … … 675 663 } // while 676 664 Abort: 665 WinStopTimer(hab, cmp->hwnd, ID_TIMER); 677 666 WinDestroyMsgQueue(hmq); 678 667 } 668 PostMsg(cmp->hwnd, UM_CONTAINER_FILLED, MPFROMLONG(1L), MPVOID); 669 PostMsg(cmp->hwnd, WM_COMMAND, MPFROM2SHORT(IDM_DESELECTALL, 0), MPVOID); 679 670 DecrThreadUsage(); 680 671 WinTerminate(hab); 681 672 } 682 PostMsg(cmp->hwnd, UM_CONTAINER_FILLED, MPFROMLONG(1L), MPVOID);683 PostMsg(cmp->hwnd, WM_COMMAND, MPFROM2SHORT(IDM_DESELECTALL, 0), MPVOID);684 673 free(cmp); 685 674 } … … 707 696 IncrThreadUsage(); 708 697 priority_normal(); 698 WinStartTimer(hab, cmp->hwnd, ID_TIMER, 2000); 709 699 switch (cmp->action) { 710 700 case IDM_INVERT: … … 724 714 break; 725 715 } 716 WinStopTimer(hab, cmp->hwnd, ID_TIMER); 726 717 if (!PostMsg(cmp->hwnd, UM_CONTAINER_FILLED, MPFROMLONG(1L), MPVOID)) 727 718 WinSendMsg(cmp->hwnd, UM_CONTAINER_FILLED, MPFROMLONG(1L), MPVOID); … … 738 729 */ 739 730 740 static VOID FillDirList(CHAR *str, INT skiplen, BOOL recurse,741 FILELIST ***list, INT *numfiles, INT *numalloc)731 static VOID FillDirList(CHAR *str, UINT skiplen, BOOL recurse, 732 FILELIST ***list, UINT *pnumfiles, UINT *pnumalloc) 742 733 { 743 734 CHAR *enddir; … … 780 771 ulFindCnt = FilesToGet; 781 772 rc = xDosFindFirst(maskstr, &hDir, 782 773 FILE_NORMAL | FILE_READONLY | FILE_ARCHIVED | 783 774 FILE_SYSTEM | FILE_HIDDEN | 784 775 (recurse ? FILE_DIRECTORY : 0), … … 799 790 strlwr(pffbFile->achName); 800 791 memcpy(enddir, pffbFile->achName, pffbFile->cchName + 1); 801 FillDirList(maskstr, skiplen, recurse, list, numfiles,numalloc);792 FillDirList(maskstr, skiplen, recurse, list, pnumfiles, pnumalloc); 802 793 } 803 794 } … … 809 800 memcpy(enddir, pffbFile->achName, pffbFile->cchName + 1); 810 801 if (AddToFileList(maskstr + skiplen, 811 pffbFile, list, numfiles,numalloc)) {802 pffbFile, list, pnumfiles, pnumalloc)) { 812 803 goto Abort; 813 804 } … … 847 838 } 848 839 849 // 20 Aug 07 SHL experimental fixme850 851 typedef struct {852 // Caller must init853 UINT sleepTime; // How long to sleep854 UINT interval; // How often to sleep855 // Owned by SleepIfNeeded856 UINT modulo; // How often to call GetMSecTimer857 UINT cntr; // Call counter858 ULONG lastMSec; // Last time DosSleep invoked859 } SLEEP_DESC;860 861 VOID SleepIfNeeded(BOOL id, UINT interval, UINT sleepTime)862 {863 static ULONG lastMSec[10];864 static UINT cntr;865 static UINT modulo = 32;866 BOOL yes = ++cntr >= modulo;867 868 if (yes) {869 ULONG newMSec = GetMSecTimer();870 // 1st time will have large difference, but don't care871 ULONG diff = newMSec - lastMSec[id];872 cntr = 0;873 yes = diff >= interval;874 // Try to tune modulo counter to approx 12% error875 if (yes) {876 lastMSec[id] = newMSec;877 if (diff >= interval + (interval / 8) && modulo > 0)878 modulo--;879 }880 else {881 if (diff < interval - (interval / 8))882 modulo++;883 }884 DosSleep(sleepTime);885 }886 }887 888 840 //=== FillCnrsThread() Fill left and right containers === 889 841 … … 894 846 HMQ hmq; 895 847 BOOL notified = FALSE; 896 897 #if 0 898 ULONG lastMSec = GetMSecTimer(); 899 ULONG ul; 900 #endif 848 ITIMER_DESC itdSleep = { 0 }; 901 849 902 850 HWND hwndLeft, hwndRight; … … 912 860 913 861 DosError(FERR_DISABLEHARDERR); 862 863 InitITimer(&itdSleep, 500); // Sleep every 500 mSec 914 864 915 865 hab = WinInitialize(0); … … 923 873 else { 924 874 INT x; 925 INT l;926 INT r;875 UINT l; 876 UINT r; 927 877 UINT cntr; 928 878 FILELIST **filesl = NULL; 929 879 FILELIST **filesr = NULL; 930 INT numfilesl = 0;931 INT numfilesr = 0;932 INT numallocl = 0;933 INT numallocr = 0;880 UINT numfilesl = 0; 881 UINT numfilesr = 0; 882 UINT numallocl = 0; 883 UINT numallocr = 0; 934 884 INT ret = 0; 935 885 UINT lenl; // Directory prefix length 936 886 UINT lenr; 937 887 UINT recsNeeded; 888 UINT recsGotten; 889 UINT filesSeenL; 890 UINT filesSeenR; 938 891 PCNRITEM pcilFirst; 939 892 PCNRITEM pcirFirst; 893 PCNRITEM pcilLast; 894 PCNRITEM pcirLast; 940 895 PCNRITEM pcil; 941 896 PCNRITEM pcir; … … 945 900 WinCancelShutdown(hmq, TRUE); 946 901 IncrThreadUsage(); 902 WinStartTimer(hab, cmp->hwnd, ID_TIMER, 2000); 903 947 904 hwndLeft = WinWindowFromID(cmp->hwnd, COMP_LEFTDIR); 948 905 hwndRight = WinWindowFromID(cmp->hwnd, COMP_RIGHTDIR); … … 965 922 strupr(cmp->leftdir); 966 923 FillDirList(cmp->leftdir, lenl, cmp->includesubdirs, 967 &filesl, &numfilesl, &numallocl); 924 &filesl, &cmp->cmp->totalleft, &numallocl); 925 numfilesl = cmp->cmp->totalleft; 968 926 969 927 if (filesl) … … 979 937 strupr(cmp->rightdir); 980 938 FillDirList(cmp->rightdir, lenr, cmp->includesubdirs, 981 &filesr, &numfilesr, &numallocr); 939 &filesr, &cmp->cmp->totalright, &numallocr); 940 numfilesr = cmp->cmp->totalright; 982 941 } 983 942 else { … … 1144 1103 } // while 1145 1104 1105 // Say building list - fixme to post? 1146 1106 WinSendMsg(cmp->hwnd, UM_CONTAINERHWND, MPVOID, MPVOID); 1147 1107 … … 1178 1138 pcil = pcilFirst; 1179 1139 pcir = pcirFirst; 1140 pcilLast = 0; 1141 pcirLast = 0; 1142 1143 recsGotten = 0; 1144 filesSeenL = 0; 1145 filesSeenR = 0; 1146 1180 1147 while ((filesl && filesl[l]) || (filesr && filesr[r])) { 1148 1149 // 03 Jan 08 SHL fixme to have user friendly message 1150 if (!pcil) { 1151 Runtime_Error(pszSrcFile, __LINE__, "pcil short %u/%u", 1152 recsGotten, recsNeeded); 1153 break; 1154 } 1155 1156 // 03 Jan 08 SHL fixme to have user friendly message 1157 if (!pcir) { 1158 Runtime_Error(pszSrcFile, __LINE__, "pcir short %u/%u", 1159 recsGotten, recsNeeded); 1160 break; 1161 } 1162 recsGotten++; 1181 1163 pcir->hwndCnr = hwndRight; 1182 1164 pcir->rc.hptrIcon = (HPOINTER) 0; … … 1195 1177 if (x <= 0) { 1196 1178 // File appears on left side 1179 filesSeenL++; 1197 1180 BldFullPathName(szBuf, cmp->leftdir, filesl[l]->fname); 1198 1181 //sprintf(szBuf, "%s%s%s", cmp->leftdir, … … 1233 1216 if (x >= 0) { 1234 1217 // File appears on right side 1218 filesSeenR++; 1235 1219 BldFullPathName(szBuf, cmp->rightdir, filesr[r]->fname); 1236 1220 //sprintf(szBuf, "%s%s%s", cmp->rightdir, … … 1291 1275 strcpy(pch, GetPString(IDS_SMALLERTEXT)); 1292 1276 pch += 7; 1293 1294 1295 1296 1297 1277 } 1278 ret = TestCDates(&pcir->date, &pcir->time, 1279 &pcil->date, &pcil->time); 1280 if (ret == 1) 1281 /*((pcil->date.year > pcir->date.year) ? TRUE : 1298 1282 (pcil->date.year < pcir->date.year) ? FALSE : 1299 1283 (pcil->date.month > pcir->date.month) ? TRUE : … … 1316 1300 pch += 5; 1317 1301 } 1318 1319 1302 else if (ret == -1) 1303 /*((pcil->date.year < pcir->date.year) ? TRUE : 1320 1304 (pcil->date.year > pcir->date.year) ? FALSE : 1321 1305 (pcil->date.month < pcir->date.month) ? TRUE : … … 1382 1366 pcir->pszDispAttr = NullStr; 1383 1367 1384 #if 0 // 20 Aug 07 SHL fixme to be gone 1385 if (!(cntr % 500)) 1386 DosSleep(1); 1387 else if (!(cntr % 50)) 1388 DosSleep(0); 1389 cntr++; 1390 #endif 1391 #if 0 // 20 Aug 07 SHL 1392 if (cntr++ % 256 == 0) { 1393 ul = GetMSecTimer(); 1394 if (ul - lastMSec >= 200) { 1395 lastMSec = ul; 1396 DosSleep(1); 1397 } 1398 } 1399 #endif 1400 #if 1 // 20 Aug 07 SHL 1401 SleepIfNeeded(0, 500, 1); 1402 #endif 1403 1368 // Avoid hogging systems 1369 SleepIfNeeded(&itdSleep, 0); 1370 1371 pcilLast = pcil; 1372 pcirLast = pcir; 1404 1373 pcil = (PCNRITEM) pcil->rc.preccNextRecord; 1405 1374 pcir = (PCNRITEM) pcir->rc.preccNextRecord; 1406 1375 1376 // Show running totals every 2 seconds 1377 cmp->cmp->totalleft = filesSeenL; 1378 cmp->cmp->totalright = filesSeenR; 1379 1407 1380 } // while filling left or right 1381 1382 // If stopped early CM_ALLOCATERECORD partially failed 1383 // Free up container records we did not use on other side 1384 // Free up filesl/filer entries we skipped 1385 if (recsGotten < recsNeeded) { 1386 if (pcil) { 1387 pcilLast->rc.preccNextRecord = NULL; 1388 FreeCnrItemList(hwndLeft, pcil); 1389 } 1390 if (filesl) { 1391 while (filesl[l]) { 1392 free(filesl[l]); 1393 l++; 1394 } 1395 } 1396 if (pcir) { 1397 pcirLast->rc.preccNextRecord = NULL; 1398 FreeCnrItemList(hwndRight, pcir); 1399 } 1400 if (filesr) { 1401 while (filesr[r]) { 1402 free(filesr[r]); 1403 r++; 1404 } 1405 } 1406 // Reduce counts to match what is in container 1407 if (numfilesl > filesSeenL) 1408 numfilesl = filesSeenL; 1409 if (numfilesr > filesSeenR) 1410 numfilesr = filesSeenR; 1411 recsNeeded = recsGotten; 1412 } // if insufficient resources 1413 1408 1414 1409 1415 if (filesl) … … 1413 1419 free(filesr); 1414 1420 filesr = NULL; 1415 // Insert 'em 1421 1422 // Say inserting 1416 1423 WinSendMsg(cmp->hwnd, UM_CONTAINERDIR, MPVOID, MPVOID); 1417 1424 1425 // Insert left side 1418 1426 memset(&ri, 0, sizeof(RECORDINSERT)); 1419 1427 ri.cb = sizeof(RECORDINSERT); … … 1430 1438 } 1431 1439 1440 // Insert right side 1432 1441 memset(&ri, 0, sizeof(RECORDINSERT)); 1433 1442 ri.cb = sizeof(RECORDINSERT); … … 1453 1462 } // if recsNeeded 1454 1463 1464 WinStopTimer(hab, cmp->hwnd, ID_TIMER); 1465 1455 1466 Deselect(hwndLeft); 1456 1467 Deselect(hwndRight); … … 1458 1469 // DbgMsg(pszSrcFile, __LINE__, "FillCnrsThread deselected"); 1459 1470 1471 // Request window update 1460 1472 if (!PostMsg(cmp->hwnd, UM_CONTAINER_FILLED, MPVOID, MPVOID)) 1461 1473 WinSendMsg(cmp->hwnd, UM_CONTAINER_FILLED, MPVOID, MPVOID); … … 1470 1482 1471 1483 WinDestroyMsgQueue(hmq); 1472 } 1484 } // if have queue 1485 if (!notified) 1486 PostMsg(cmp->hwnd, UM_CONTAINER_FILLED, MPVOID, MPVOID); 1473 1487 DecrThreadUsage(); 1474 1488 WinTerminate(hab); 1475 1489 } 1476 if (!notified)1477 PostMsg(cmp->hwnd, UM_CONTAINER_FILLED, MPVOID, MPVOID);1478 1490 free(cmp); 1479 1491 DosPostEventSem(CompactSem); … … 1485 1497 #define hwndLeft (WinWindowFromID(hwnd,COMP_LEFTDIR)) 1486 1498 #define hwndRight (WinWindowFromID(hwnd,COMP_RIGHTDIR)) 1487 1488 // 20 Aug 07 SHL fixme experimental1489 1490 BOOL NeedGUIUpdate(BOOL id)1491 {1492 static ULONG lastMSec[10];1493 static UINT cntr;1494 static UINT modulo = 32;1495 BOOL yes = ++cntr >= modulo;1496 1497 if (yes) {1498 ULONG newMSec = GetMSecTimer();1499 // 1st time will have large difference, but don't care1500 ULONG diff = newMSec - lastMSec[id];1501 cntr = 0;1502 yes = diff >= 500;1503 // Try to tune modulo counter to 10% error1504 if (yes) {1505 lastMSec[id] = newMSec;1506 if (diff >= 550 && modulo > 0)1507 modulo--;1508 }1509 else {1510 if (diff < 450)1511 modulo++;1512 }1513 }1514 return yes;1515 }1516 1499 1517 1500 //=== CompareDlgProc() Compare directories dialog procedure === … … 1521 1504 COMPARE *cmp; 1522 1505 BOOL temp; 1506 CHAR s[81]; 1523 1507 1524 1508 static HPOINTER hptr; … … 1710 1694 1711 1695 case UM_CONTAINERHWND: 1696 // Building list 1712 1697 WinSetDlgItemText(hwnd, COMP_NOTE, GetPString(IDS_COMPHOLDBLDLISTTEXT)); 1713 1698 return 0; 1714 1699 1715 1700 case UM_CONTAINERDIR: 1701 // Filling container 1716 1702 WinSetDlgItemText(hwnd, COMP_NOTE, GetPString(IDS_COMPHOLDFILLCNRTEXT)); 1717 1703 return 0; 1704 1705 case WM_TIMER: 1706 // Show current totals 1707 cmp = INSTDATA(hwnd); 1708 if (!cmp) { 1709 Runtime_Error(pszSrcFile, __LINE__, "pCompare NULL"); 1710 WinDismissDlg(hwnd, 0); 1711 } 1712 else { 1713 // 05 Jan 08 SHL fixme to use timer id to optimize output 1714 sprintf(s, " %d", cmp->totalleft); 1715 WinSetDlgItemText(hwnd, COMP_TOTALLEFT, s); 1716 sprintf(s, " %d", cmp->totalright); 1717 WinSetDlgItemText(hwnd, COMP_TOTALRIGHT, s); 1718 sprintf(s, " %d", cmp->selleft); 1719 WinSetDlgItemText(hwnd, COMP_SELLEFT, s); 1720 sprintf(s, " %d", cmp->selright); 1721 WinSetDlgItemText(hwnd, COMP_SELRIGHT, s); 1722 } 1723 break; 1718 1724 1719 1725 case UM_CONTAINER_FILLED: … … 1724 1730 } 1725 1731 else { 1726 CHAR s[81];1727 1732 1728 1733 // DbgMsg(pszSrcFile, __LINE__, "CompareDlgProc UM_CONTAINER_FILLED enter"); … … 1938 1943 else { 1939 1944 1940 CHAR s[81];1941 1942 1945 cmp = INSTDATA(hwnd); 1943 1946 if (pci->rc.flRecordAttr & CRA_SELECTED) { … … 1955 1958 if (cmp->selright) 1956 1959 cmp->selright--; 1957 }1958 }1959 if (SHORT1FROMMP(mp1) == COMP_LEFTDIR) {1960 // if (WinIsWindowEnabled(hwndLeft) || !(cmp->selleft % 50)) {1961 if (WinIsWindowEnabled(hwndLeft) || NeedGUIUpdate(0)) {1962 sprintf(s, " %d", cmp->selleft);1963 WinSetDlgItemText(hwnd, COMP_SELLEFT, s);1964 }1965 }1966 else {1967 // if (WinIsWindowEnabled(hwndRight) || !(cmp->selright % 50)) {1968 if (WinIsWindowEnabled(hwndRight) || NeedGUIUpdate(1)) {1969 sprintf(s, " %d", cmp->selright);1970 WinSetDlgItemText(hwnd, COMP_SELRIGHT, s);1971 1960 } 1972 1961 } … … 2180 2169 fakelist[2] = NULL; 2181 2170 ExecOnList(hwnd, compare, 2182 2183 2171 WINDOWED | SEPARATEKEEP, NULL, fakelist, NULL, 2172 pszSrcFile, __LINE__); 2184 2173 } 2185 2174 else { -
trunk/dll/copyf.c
r847 r907 21 21 ***********************************************************************/ 22 22 23 #include <stdlib.h> 24 #include <string.h> 25 #include <stdarg.h> 26 #include <ctype.h> 27 23 28 #define INCL_DOS 24 29 #define INCL_DOSERRORS 25 30 #define INCL_WIN 26 31 #define INCL_LONGLONG 27 #include <os2.h> 28 29 #include <io.h> 30 #include <string.h> 31 #include <stdlib.h> 32 #include <stdio.h> 33 #include <stdarg.h> 34 #include <ctype.h> 35 #include <time.h> 36 32 33 #include "fm3str.h" 34 #include "errutil.h" // Dos_Error... 35 #include "strutil.h" // GetPString 37 36 #include "fm3dll.h" 38 #include "fm3str.h"39 37 40 38 static PSZ pszSrcFile = __FILE__; -
trunk/dll/datamin.c
r888 r907 24 24 ***********************************************************************/ 25 25 26 #include <string.h> 27 #include <ctype.h> 28 #include <limits.h> 29 #include <process.h> // _beginthread 30 26 31 #define INCL_DOS 27 32 #define INCL_DOSERRORS … … 29 34 #define INCL_GPI 30 35 #define INCL_LONGLONG 31 #include <os2.h> 32 33 #include <stdio.h> 34 #include <stdlib.h> 35 #include <string.h> 36 #include <ctype.h> 37 #include <limits.h> 38 #include <process.h> // _beginthread 39 40 #include "fm3dll.h" 36 41 37 #include "fm3dlg.h" 42 38 #include "fm3str.h" 43 39 #include "procstat.h" 44 40 #include "datamin.h" 41 #include "errutil.h" // Dos_Error... 42 #include "strutil.h" // GetPString 43 #include "fm3dll.h" 45 44 46 45 #pragma data_seg(DATA2) -
trunk/dll/defview.c
r901 r907 5 5 6 6 Copyright (c) 1993-98 M. Kimes 7 Copyright (c) 2003, 200 7Steven H.Levine7 Copyright (c) 2003, 2008 Steven H.Levine 8 8 9 9 Default file viewer … … 20 20 ***********************************************************************/ 21 21 22 #include <string.h> 23 #include <ctype.h> 24 22 25 #define INCL_DOS 23 26 #define INCL_WIN 24 27 #define INCL_GPI 25 28 #define INCL_MMIOOS2 29 #define INCL_LONGLONG // dircnrs.h 26 30 #include <os2.h> 27 31 #include <os2me.h> 28 32 29 #include <stdio.h> 30 #include <stdlib.h> 31 #include <string.h> 32 #include <ctype.h> 33 33 #include "fm3dlg.h" 34 #include "arccnrs.h" // StartArcCnr 35 #include "errutil.h" // Dos_Error... 34 36 #include "fm3dll.h" 35 #include "fm3dlg.h"36 37 37 38 static PSZ pszSrcFile = __FILE__; -
trunk/dll/dircnrs.c
r888 r907 7 7 8 8 Copyright (c) 1993-98 M. Kimes 9 Copyright (c) 2001, 200 7Steven H. Levine9 Copyright (c) 2001, 2008 Steven H. Levine 10 10 11 11 16 Oct 02 SHL Handle large partitions … … 35 35 ***********************************************************************/ 36 36 37 #define INCL_DOS38 #define INCL_WIN39 #define INCL_GPI40 #define INCL_DOSERRORS41 #define INCL_LONGLONG42 43 #include <os2.h>44 #include <stdarg.h>45 #include <stdio.h>46 37 #include <stdlib.h> 47 38 #include <string.h> 48 39 #include <ctype.h> 49 40 #include <limits.h> 50 #include "fm3dll.h" 41 #include <process.h> // _beginthread 42 43 #define INCL_DOS 44 #define INCL_WIN 45 #define INCL_DOSERRORS 46 #define INCL_LONGLONG 47 51 48 #include "fm3dlg.h" 52 49 #include "fm3str.h" 53 50 #include "mle.h" 54 #include <process.h> // _beginthread 51 #include "arccnrs.h" // StartArcCnr 52 #include "comp.h" // COMPARE 53 #include "filldir.h" // EmptyCnr... 54 #include "errutil.h" // Dos_Error... 55 #include "strutil.h" // GetPString 56 #include "fm3dll.h" 55 57 56 58 #pragma data_seg(DATA1) … … 132 134 } 133 135 } 134 135 136 hwndButtonPopup = WinLoadMenu(HWND_DESKTOP, FM3ModHandle, id); 137 CopyPresParams(hwndButtonPopup, hwnd); 136 138 if (hwndButtonPopup) { 137 139 WinSetWindowUShort(hwndButtonPopup, QWS_ID, id); … … 596 598 li = 597 599 DoFileDrop(dcd->hwndCnr, dcd->directory, FALSE, MPVOID, 598 600 MPFROMP(&cni)); 599 601 CheckPmDrgLimit(cni.pDragInfo); 600 602 if (li) { … … 800 802 !strnicmp(dcd->directory, dcd->previous, 801 803 strlen(dcd->directory))) 802 804 { 803 805 PCNRITEM pci = FindCnrRecord(dcd->hwndCnr, 804 806 dcd->previous, 805 807 NULL, TRUE, FALSE, TRUE); 806 808 if (pci && (INT) pci != -1) { … … 1554 1556 switch (SHORT1FROMMP(mp1)) { 1555 1557 case IDM_FILESMENU: 1556 1557 1558 CopyPresParams((HWND) mp2, hwndMainMenu); 1559 if (isalpha(*dcd->directory)) { 1558 1560 if (driveflags[toupper(*dcd->directory) - 'A'] & DRIVE_NOTWRITEABLE) { 1559 1561 WinEnableMenuItem((HWND) mp2, IDM_MOVEMENU, FALSE); … … 1578 1580 WinEnableMenuItem((HWND) mp2, IDM_EDITTEXT, TRUE); 1579 1581 WinEnableMenuItem((HWND) mp2, IDM_EDITBINARY, TRUE); 1580 1582 WinEnableMenuItem((HWND) mp2, IDM_ATTRS, TRUE); 1581 1583 } 1582 1584 } … … 1584 1586 1585 1587 case IDM_VIEWSMENU: 1586 1588 SetViewMenu((HWND) mp2, dcd->flWindowAttr); 1587 1589 CopyPresParams((HWND) mp2, hwndMainMenu); 1588 1589 1590 1590 WinEnableMenuItem((HWND) mp2, IDM_RESELECT, 1591 (dcd->lastselection != NULL)); 1592 if (isalpha(*dcd->directory)) { 1591 1593 if (driveflags[toupper(*dcd->directory) - 'A'] & DRIVE_NOTWRITEABLE) 1592 1594 WinEnableMenuItem((HWND) mp2, IDM_MKDIR, FALSE); … … 1727 1729 dummy[1] = NULL; 1728 1730 ExecOnList(hwnd, 1729 1730 1731 editor, WINDOWED | SEPARATE, NULL, dummy, NULL, 1732 pszSrcFile, __LINE__); 1731 1733 } 1732 1734 else … … 2234 2236 case IDM_MKDIR: 2235 2237 { 2236 // PCNRITEM pci; 2237 2238 // pci = (PCNRITEM) CurrentRecord(hwnd); 2238 PCNRITEM pci; 2239 BOOL saved; 2240 2241 saved = fSelectedAlways; 2242 fSelectedAlways = FALSE; 2243 pci = (PCNRITEM)CurrentRecord(hwnd); 2244 // 01 Oct 07 SHL Make below selected directory or in current directory 2239 2245 PMMkDir(dcd->hwndParent, 2240 (dcd->directory), FALSE); 2246 pci && (INT)pci != -1 ? pci->pszFileName : dcd->directory, 2247 FALSE); 2248 fSelectedAlways = saved; 2241 2249 } 2242 2250 break; … … 2594 2602 memset(&volser, 0, sizeof(volser)); 2595 2603 DosError(FERR_DISABLEHARDERR); 2596 // fixme 2604 // fixme? 2597 2605 rc = DosQueryFSInfo(toupper(*pci->pszFileName) - '@', 2598 2606 FSIL_VOLSER, &volser, sizeof(volser)); … … 2609 2617 if (SHORT2FROMMP(mp1) == CN_COLLAPSETREE && 2610 2618 !volser.serial || 2611 2619 driveserial[toupper(*pci->pszFileName) - 'A'] != 2612 2620 volser.serial) 2613 2621 UnFlesh(hwnd, pci); … … 2647 2655 CM_SETRECORDEMPHASIS, 2648 2656 MPFROMP(pci), MPFROM2SHORT(TRUE, CRA_CURSORED)); 2649 2650 2657 MarkAll(hwnd, FALSE, FALSE, TRUE); 2658 if (pci->attrFile & FILE_DIRECTORY) 2651 2659 dcd->hwndLastMenu = CheckMenu(hwndMainMenu, &DirMenu, DIR_POPUP); 2652 2660 else … … 2732 2740 pci = (PCNRITEM) ((PCNRDRAGINFO) mp2)->pRecord; 2733 2741 pDInfo = ((PCNRDRAGINFO) mp2)->pDragInfo; 2734 2735 2736 2742 if (!DrgAccessDraginfo(pDInfo)) { 2743 Win_Error(HWND_DESKTOP, HWND_DESKTOP, pszSrcFile, __LINE__, 2744 "DrgAccessDraginfo"); 2737 2745 return (MRFROM2SHORT(DOR_NEVERDROP, 0)); 2738 2739 2746 } 2747 if (*dcd->directory && 2740 2748 (driveflags[toupper(*dcd->directory) - 'A'] & 2741 2749 DRIVE_NOTWRITEABLE)) { … … 2852 2860 ULONG action = UM_ACTION; 2853 2861 2854 2855 2856 2862 // DbgMsg(pszSrcFile, __LINE__, "calling DoFileDrop"); 2863 li = DoFileDrop(hwnd, dcd->directory, TRUE, mp1, mp2); 2864 CheckPmDrgLimit(((PCNRDRAGINFO)mp2)->pDragInfo); 2857 2865 if (li) { 2858 2866 if (li->list && li->list[0] && IsRoot(li->list[0])) … … 2888 2896 strcat(li->targetpath, " %a"); 2889 2897 ExecOnList(dcd->hwndParent, li->targetpath, 2890 2891 2898 PROMPT | WINDOWED, NULL, li->list, NULL, 2899 pszSrcFile, __LINE__); 2892 2900 FreeList(li->list); 2893 2901 li->list = NULL; … … 3263 3271 3264 3272 HWND ret = StartMLEEditor(dcd->hwndParent, 3265 3273 (INT)mp1, (CHAR *)mp2, dcd->hwndFrame); 3266 3274 if (mp2) 3267 3275 free((CHAR *)mp2); -
trunk/dll/dirs.c
r843 r907 13 13 ***********************************************************************/ 14 14 15 #define INCL_WIN16 #define INCL_WINERRORS17 #define INCL_DOS18 #define INCL_DOSERRORS19 #define INCL_LONGLONG20 21 #include <os2.h>22 15 #include <stdlib.h> 23 #include <stdio.h>24 #include <stdarg.h>25 16 #include <string.h> 26 17 #include <ctype.h> 18 19 #define INCL_LONGLONG // dircnrs.h 20 27 21 #include "fm3dll.h" 28 22 29 23 APIRET save_dir2(CHAR * curdir) 30 24 { 31 32 25 CHAR *env = getenv("FM3INI"); 33 26 -
trunk/dll/dirsize.c
r850 r907 34 34 ***********************************************************************/ 35 35 36 #define INCL_DOS37 #define INCL_WIN38 #define INCL_GPI39 #define INCL_LONGLONG40 #define INCL_DOSERRORS41 #include <os2.h>42 43 #include <stdio.h>44 36 #include <stdlib.h> 45 37 #include <string.h> … … 47 39 #include <process.h> // _beginthread 48 40 49 #include "fm3dll.h" 41 #define INCL_DOS 42 #define INCL_DOSERRORS 43 #define INCL_WIN 44 #define INCL_GPI 45 #define INCL_LONGLONG 46 50 47 #include "fm3dlg.h" 51 48 #include "fm3str.h" 49 #include "dircnrs.h" 50 #include "errutil.h" // Dos_Error... 51 #include "strutil.h" // GetPString 52 #include "fm3dll.h" 52 53 53 54 typedef struct … … 223 224 while (!rc) { 224 225 225 #if 0 // 13 Aug 07 SHL fixme to be gone226 {227 static ULONG ulMaxCnt = 1;228 if (ulFindCnt > ulMaxCnt) {229 ulMaxCnt = ulFindCnt;230 DbgMsg(pszSrcFile, __LINE__, "ulMaxCnt %u/%u", ulMaxCnt, FilesToGet);231 }232 }233 #endif234 235 226 priority_normal(); 236 227 pffbFile = pffbArray; … … 258 249 break; 259 250 pffbFile = (PFILEFINDBUF4L)((PBYTE)pffbFile + pffbFile->oNextEntryOffset); 260 261 #if 0 // 13 Aug 07 SHL fixme to be gone262 {263 static ULONG ulMaxBytes = 65535;264 ULONG ul = (PBYTE)pffbFile - (PBYTE)pffbArray;265 if (ul > ulMaxBytes) {266 ulMaxBytes = ul;267 DbgMsg(pszSrcFile, __LINE__, "ulFindCnt %u/%u ulMaxBytes %u/%u",268 ulFindCnt, FilesToGet, ulMaxBytes, ulBufBytes);269 }270 }271 #endif272 251 273 252 } // for matches -
trunk/dll/draglist.c
r847 r907 24 24 ***********************************************************************/ 25 25 26 #include <stdlib.h> 27 #include <string.h> 28 #include <ctype.h> 29 26 30 #define INCL_DOS 27 31 #define INCL_WIN 28 32 #define INCL_SHLERRORS 29 33 #define INCL_LONGLONG 30 #include <os2.h> 31 32 #include <stdio.h> 33 #include <stdlib.h> 34 #include <string.h> 35 #include <ctype.h> 36 34 35 #include "errutil.h" // Dos_Error... 37 36 #include "fm3dll.h" 38 37 -
trunk/dll/droplist.c
r847 r907 24 24 ***********************************************************************/ 25 25 26 #include <string.h> 27 26 28 #define INCL_DOS 27 29 #define INCL_WIN 28 30 #define INCL_LONGLONG 29 #include <os2.h> 30 31 #include <stdio.h> 32 #include <stdlib.h> 33 #include <string.h> 34 #include <ctype.h> 35 31 32 #include "fm3str.h" 33 #include "errutil.h" // Dos_Error... 34 #include "strutil.h" // GetPString 36 35 #include "fm3dll.h" 37 #include "fm3str.h"38 36 39 37 static PSZ pszSrcFile = __FILE__; … … 501 499 FreeDragInfoData(hwndCnr, pDInfo); 502 500 503 // 02 Aug 07 SHL fixme to be gone someday or use Runtime_Error i sreally an error501 // 02 Aug 07 SHL fixme to be gone someday or use Runtime_Error if really an error 504 502 if (numfail || numok == 0) 505 503 DbgMsg(pszSrcFile, __LINE__, "calling FreeDragInfoData with %u ok, %u failed", numok, numfail); -
trunk/dll/eas.c
r880 r907 24 24 ***********************************************************************/ 25 25 26 #include <stdlib.h> 27 #include <stdio.h> 28 #include <string.h> 29 #include <ctype.h> 30 26 31 #define INCL_WIN 27 32 #define INCL_DOS 28 33 #define INCL_DOSERRORS 29 34 #define INCL_LONGLONG 30 #include <os2.h> 31 32 #include <stdlib.h> 33 #include <stdio.h> 34 #include <string.h> 35 #include <ctype.h> 36 37 #include "fm3dll.h" 35 38 36 #include "fm3dlg.h" 39 37 #include "fm3str.h" 40 38 #include "mle.h" 39 #include "errutil.h" // Dos_Error... 40 #include "strutil.h" // GetPString 41 #include "fm3dll.h" 41 42 42 43 #pragma data_seg(DATA1) -
trunk/dll/errutil.c
r904 r907 7 7 8 8 Copyright (c) 1993-98 M. Kimes 9 Copyright (c) 2004, 200 7Steven H. Levine9 Copyright (c) 2004, 2008 Steven H. Levine 10 10 11 11 12 Aug 04 SHL Comments … … 27 27 14 Aug 07 SHL Add GetMSecTimer 28 28 14 Aug 07 SHL Use GetMSecTimer in DbgMsg 29 05 Jan 08 SHL Renamed from error.c to match errutil.h 29 30 30 31 ***********************************************************************/ 32 33 #include <stdio.h> 34 #include <string.h> 35 #include <stdarg.h> 31 36 32 37 #define INCL_DOS … … 34 39 #define INCL_WIN 35 40 36 #include <os2.h> 37 #include <stdlib.h> 38 #include <stdio.h> 39 #include <string.h> 40 #include <stdarg.h> 41 42 #include "fm3dll.h" 41 #include "errutil.h" 42 #include "strutil.h" // GetPString 43 43 #include "fm3str.h" 44 45 #pragma data_seg(GLOBAL2) 46 PSZ DEBUG_STRING; 44 47 45 48 #pragma data_seg(DATA1) … … 219 222 pErrInfoBlk = WinGetErrorInfo(hab); 220 223 if (!pErrInfoBlk) { 221 ERRORID id = WinGetLastError(hab); // 03 Jan 08 SHL fixme debug224 ERRORID id = WinGetLastError(hab); 222 225 psz = pszBuf + strlen(pszBuf); 223 226 sprintf(psz, " WinGetErrorInfo failed (%u)", id); -
trunk/dll/extract.c
r888 r907 17 17 ***********************************************************************/ 18 18 19 #include <string.h> 20 #include <ctype.h> 21 19 22 #define INCL_WIN 20 23 #define INCL_DOS 21 #include <os2.h> 22 23 #include <stdlib.h> 24 #include <stdio.h> 25 #include <string.h> 26 #include <time.h> 27 #include <ctype.h> 28 29 #include "fm3dll.h" 24 #define INCL_LONGLONG // dircnrs.h 25 30 26 #include "fm3dlg.h" 31 27 #include "fm3str.h" 28 #include "errutil.h" // Dos_Error... 29 #include "strutil.h" // GetPString 30 #include "fm3dll.h" 32 31 33 32 #pragma data_seg(DATA1) -
trunk/dll/filldir.c
r859 r907 7 7 8 8 Copyright (c) 1993-98 M. Kimes 9 Copyright (c) 2001, 200 7Steven H. Levine9 Copyright (c) 2001, 2008 Steven H. Levine 10 10 11 11 10 Jan 04 SHL ProcessDirectory: avoid most large drive failures … … 43 43 ***********************************************************************/ 44 44 45 #include <stdlib.h> 46 #include <string.h> 47 #include <ctype.h> 48 49 #if 0 // fixme to disable or to be configurable 50 #include <malloc.h> // _heapchk 51 #endif 52 45 53 #define INCL_DOS 46 54 #define INCL_WIN 47 55 #define INCL_DOSERRORS 48 56 #define INCL_LONGLONG 49 #include <os2.h> 50 51 #include <stdarg.h> 52 #include <stdio.h> 53 #include <stdlib.h> 54 #include <string.h> 55 #include <ctype.h> 56 #include <time.h> 57 #include <time.h> 58 59 #if 0 // fixme to disable or to be configurable 60 #include <malloc.h> // _heapchk 61 #endif 62 57 58 #include "fm3str.h" 59 #include "filldir.h" 60 #include "errutil.h" // Dos_Error... 61 #include "strutil.h" // GetPString 63 62 #include "fm3dll.h" 64 #include "fm3str.h"65 63 66 64 static PSZ pszSrcFile = __FILE__; … … 486 484 487 485 ULONGLONG FillInRecordFromFSA(HWND hwndCnr, PCNRITEM pci, 488 489 490 486 const PSZ pszFileName, 487 const PFILESTATUS4L pfsa4, 488 const BOOL partial, DIRCNRDATA * dcd) // Optional 491 489 { 492 490 HPOINTER hptr; … … 792 790 * network file systems exhibit such a problem). 793 791 */ 794 #if 0 // 13 Aug 07 SHL fixme to be gone795 {796 static ULONG ulMaxCnt = 1;797 if (ulFindCnt > ulMaxCnt) {798 ulMaxCnt = ulFindCnt;799 DbgMsg(pszSrcFile, __LINE__, "ulMaxCnt %u/%u", ulMaxCnt, ulFindMax);800 }801 }802 #endif // fixme to be gone803 792 804 793 if (stopflag && *stopflag) … … 838 827 } 839 828 else { 829 // 04 Jan 08 SHL fixme like comp.c to handle less than ulSelCnt records 840 830 pci = pciFirst; 841 831 ullTotalBytes = 0; … … 937 927 } 938 928 else { 929 // 04 Jan 08 SHL fixme like comp.c to handle less than ulSelCnt records 939 930 pci = pciFirst; 940 931 ullTotalBytes = 0; … … 1105 1096 if (!pciFirst) { 1106 1097 Win_Error2(hwndCnr, HWND_DESKTOP, pszSrcFile, __LINE__, IDS_CMALLOCRECERRTEXT); 1098 // 04 Jan 08 SHL fixme not just up and die 1107 1099 exit(0); 1108 1100 } 1109 1101 1102 // 04 Jan 08 SHL fixme like comp.c to handle less than ulSelCnt records 1110 1103 pci = pciFirst; 1111 1104 for (x = 0; x < 26; x++) { … … 1680 1673 while (pci) { 1681 1674 // 12 Sep 07 SHL dwg drivebar crash testing - ticket# ??? 1682 1683 1684 1675 static PCNRITEM pciLast; // 12 Sep 07 SHL 1676 ULONG ulSize = sizeof(*pci); 1677 ULONG ulAttr; 1685 1678 APIRET apiret = DosQueryMem((PVOID)pci, &ulSize, &ulAttr); 1686 1679 if (apiret) 1687 1680 Dos_Error(MB_ENTER, apiret, HWND_DESKTOP, pszSrcFile, __LINE__, 1688 1681 "DosQueryMem failed pci %p pciLast %p", pci, pciLast); 1689 1682 FreeCnrItemData(pci); -
trunk/dll/filter.c
r888 r907 3 3 4 4 $Id$ 5 6 Filter mask select dialog 5 7 6 8 Copyright (c) 1993-98 M. Kimes … … 15 17 ***********************************************************************/ 16 18 17 #define INCL_WIN18 #define INCL_DOS19 #include <os2.h>20 21 #include <stdio.h>22 19 #include <stdlib.h> 23 20 #include <string.h> 24 21 #include <share.h> 25 22 26 #include "fm3dll.h" 23 #define INCL_WIN 24 #define INCL_DOS 25 #define INCL_LONGLONG // dircnrs.h 26 27 27 #include "fm3dlg.h" 28 28 #include "fm3str.h" 29 #include "errutil.h" // Dos_Error... 30 #include "strutil.h" // GetPString 31 #include "fm3dll.h" 29 32 30 33 #pragma data_seg(FILTER_DATA) -
trunk/dll/findrec.c
r793 r907 13 13 ***********************************************************************/ 14 14 15 # define INCL_WIN15 #include <string.h> 16 16 17 #include <os2.h> 18 #include <stdarg.h> 19 #include <stdio.h> 20 #include <stdlib.h> 21 #include <string.h> 17 #define INCL_LONGLONG // dircnrs.h 18 22 19 #include "fm3dll.h" 23 20 … … 25 22 BOOL partial, BOOL partmatch, BOOL noenv) 26 23 { 27 28 24 SEARCHSTRING srch; 29 25 PCNRITEM pci; -
trunk/dll/flesh.c
r847 r907 7 7 8 8 Copyright (c) 1993-98 M. Kimes 9 Copyright (c) 2005, 200 7Steven H. Levine9 Copyright (c) 2005, 2008 Steven H. Levine 10 10 11 11 24 May 05 SHL Rework Win_Error usage … … 20 20 20 Aug 07 GKY Move #pragma alloc_text to end for OpenWatcom compat 21 21 22 23 22 ***********************************************************************/ 23 24 #include <stdlib.h> 25 #include <string.h> 26 #include <ctype.h> 24 27 25 28 #define INCL_DOS 26 29 #define INCL_DOSERRORS 27 30 #define INCL_WIN 28 #define INCL_LONGLONG 29 #include <os2.h> 30 31 #include <stdarg.h> 32 #include <stdio.h> 33 #include <stdlib.h> 34 #include <string.h> 35 #include <ctype.h> 36 31 #define INCL_LONGLONG // dircnrs.h 32 33 #include "fm3str.h" 34 #include "filldir.h" // FileAttrToString... 35 #include "errutil.h" // Dos_Error... 36 #include "strutil.h" // GetPString 37 37 #include "fm3dll.h" 38 #include "fm3str.h"39 38 40 39 #pragma data_seg(DATA1) -
trunk/dll/fm2cmd.c
r793 r907 13 13 ***********************************************************************/ 14 14 15 #include <string.h> 16 15 17 #define INCL_DOS 16 18 #define INCL_WIN 19 #define INCL_LONGLONG // dircnrs.h 17 20 18 #include <os2.h>19 #include <stdio.h>20 #include <stdlib.h>21 #include <string.h>22 #include <ctype.h>23 #include <share.h>24 #include "fm3dll.h"25 21 #include "fm3dlg.h" 26 22 #include "fm3str.h" 23 #include "errutil.h" // Dos_Error... 24 #include "strutil.h" // GetPString 25 #include "fm3dll.h" 27 26 28 27 #pragma data_seg(DATA2) -
trunk/dll/fm3dll.h
r906 r907 70 70 30 Dec 07 GKY Add TestCDates to compare CNRITEMs by CDATE/CTIME data 71 71 04 Jan 08 SHL Allow standalone usage 72 05 Jan 08 SHL Move comp.c definitions to comp.h 73 05 Jan 08 SHL Move dircnr.c definitions to dircnr.h 74 05 Jan 08 SHL Move makelist.c definitions to makelist.h 75 05 Jan 08 SHL Move error.c definitions to errutil.h 76 05 Jan 08 SHL Move string.c definitions to strutil.h 72 77 73 78 ***********************************************************************/ … … 85 90 #define INCL_WINPROGRAMLIST 86 91 #define INCL_WINHELP 92 #define INCL_LONGLONG // 05 Jan 08 SHL fixme to be gone eventually 87 93 #include <os2.h> 88 94 #else … … 99 105 #error INCL_WINHELP required 100 106 #endif 107 #if !defined(INCL_LONGLONG) 108 #error INCL_LONGLONG required 109 #endif 101 110 #endif // OS2_INCLUDED 102 111 … … 109 118 #endif 110 119 #endif 120 121 #include "dircnrs.h" // 05 Jan 08 SHL fixme to be gone when DIRCNRDATA refs gone 122 #include "makelist.h" // 05 Jan 08 SHL fixme to be gone when LISTINFO refs gone 111 123 112 124 #ifdef DEFINE_GLOBALS … … 326 338 typedef struct 327 339 { 328 CHAR szMask[CCHMAXPATH];329 CHAR szMaskCopy[CCHMAXPATH];330 CHAR *pszMasks[26];331 ULONG attrFile;332 ULONG antiattr;333 BOOL fNoAttribs;334 BOOL fShowDirs;335 BOOL fNoDirs;336 BOOL fIsTree;337 BOOL fIsSeeAll;338 BOOL fFilesIncluded;339 BOOL fText;340 CHAR szText[256];341 CHAR prompt[80];342 }343 MASK;344 345 typedef struct346 {347 340 CHAR *title; /* title of dialog */ 348 341 CHAR *prompt; /* prompt to user */ … … 380 373 typedef struct 381 374 { 382 HWND hwnd;383 HWND hwndS;384 USHORT type;385 USHORT id;386 INT flags;387 struct __arc_type__ *info;388 CHAR **list;389 ULONG *ulitemID;390 ULONGLONG *cbFile;391 CHAR targetpath[CCHMAXPATH + 6];392 CHAR arcname[CCHMAXPATH];393 CHAR runfile[CCHMAXPATH];394 }395 LISTINFO;396 397 typedef struct398 {399 375 USHORT size; 400 376 USHORT dummy; … … 447 423 #define ARCFLAGS_REALDIR 0x00000001 448 424 #define ARCFLAGS_PSEUDODIR 0x00000002 449 450 #define CBLIST_TO_EASIZE(cb) ((cb) > 4 ? (cb) / 2 : 0) // FILEFINDBUF4L.cbList to logical EA size451 452 typedef struct _CNRITEM453 { /* CONTAINER RECORD STRUCTURE */454 MINIRECORDCORE rc; /* Base information */455 HWND hwndCnr; /* The container holding this record */456 PSZ pszFileName; // Points to buffer holding full pathname or NullStr457 PSZ pszDisplayName; // Points to displayable part of path name - used by CFA_STRING458 CHAR *pszSubject; // Points subject buffer or Nullstr - used by fm/2 and by CFA_STRING459 CHAR *pszDispAttr; // Points to szDispAttr - required by CFA_STRING460 CDATE date; /* Last write date of file */461 CTIME time; /* Last write time of file */462 CDATE ladate; /* Last access date of file */463 CTIME latime; /* Last access time of file */464 CDATE crdate; /* Creation date of file */465 CTIME crtime; /* Creation time of file */466 CHAR *pszLongName; // Points to long name buffer - used by code and by CFA_STRING467 CHAR *pszFmtFileSize; // Comma formatted file size for large file support468 ULONGLONG cbFile; /* File size */469 ULONGLONG easize; // Size of EAs - dirsize uses this - hack cough470 ULONG attrFile; /* Attributes of this file */471 ULONG flags;472 }473 CNRITEM, *PCNRITEM;474 425 475 426 typedef struct _ARCITEM … … 493 444 typedef struct 494 445 { 495 ULONG attrFile;496 ULONGLONG cbFile;497 ULONGLONG easize;498 FDATE date;499 FTIME time;500 FDATE ladate;501 FTIME latime;502 FDATE crdate;503 FTIME crtime;504 CHAR fname[1];505 }506 FILELIST;507 508 typedef struct __arc_type__509 {510 CHAR *id; // User id511 CHAR *ext; // Extension (without leading dot)512 LONG file_offset; // Offset to signature (0..n)513 CHAR *list; // List command514 CHAR *extract; // Extract command515 CHAR *exwdirs; // Extract with directories command516 CHAR *test; // Test command517 CHAR *create; // Create without directories518 CHAR *move; // Move into archive without directories519 CHAR *createrecurse; // Create with recurse and directories520 CHAR *createwdirs; // Create with directories521 CHAR *movewdirs; // Move into archive with directories522 CHAR *delete; // Delete from archive523 CHAR *signature; // Archiver signature524 CHAR *startlist; // Listing start marker (blank means no start marker)525 CHAR *endlist; // Listing end marker (blank means next blank line or EOF)526 INT siglen; // Signature length in bytes527 INT osizepos; // Original file size position (0..n) or -1528 INT nsizepos; // Compressed file size position or -1529 INT fdpos; // File date position or -1530 INT fdflds; // File date element count (typically 3) or -1531 INT fnpos; // File name position or -1 if last532 INT datetype; // Date field format533 UINT comment_line_num; // Comment start in old sig file (1..n), 0 if none534 UINT defn_line_num; // Definition start in old sig file (1..n), 0 if none535 BOOL nameislast; // Name is last item on line536 BOOL nameisnext; // File name is on next line537 BOOL nameisfirst; // File name is first item on line538 struct __arc_type__ *next;539 struct __arc_type__ *prev;540 }541 ARC_TYPE;542 543 typedef struct544 {545 446 USHORT size; 546 447 ARC_TYPE *info; … … 553 454 EXTRDATA; 554 455 555 typedef struct556 {557 ARC_TYPE *info;558 CHAR listname[CCHMAXPATH];559 CHAR arcname[CCHMAXPATH];560 CHAR *errmsg;561 }562 ARCDUMP;563 564 typedef struct DIRCNRDATA565 {566 USHORT size;567 USHORT id;568 INT type;569 ULONG flWindowAttr;570 HWND hwndParent;571 HWND hwndCnr;572 HWND hwndObject;573 HWND hwndFrame;574 HWND hwndClient;575 HWND hwndLastMenu;576 HWND hwndExtract;577 HWND hwndLastDirCnr;578 HWND hwndRestore;579 CHAR directory[CCHMAXPATH];580 CHAR previous[CCHMAXPATH];581 ULONG fg, bg, hifg, hibg, border;582 PFNWP oldproc;583 CHAR font[CCHMAXPATH];584 MASK mask;585 ULONGLONG ullTotalBytes;586 ULONGLONG selectedbytes;587 ULONG selectedfiles;588 ULONG totalfiles;589 BOOL cnremphasized;590 BOOL dontclose;591 ARC_TYPE *info;592 CHAR arcname[CCHMAXPATH];593 CHAR command[257];594 CHAR stopflag;595 CHAR workdir[CCHMAXPATH];596 CHAR lastfilename[CCHMAXPATH];597 BOOL namecanchange;598 BOOL fmoving;599 BOOL amextracted;600 INT lasthelp;601 INT sortFlags;602 BOOL detailsladate, detailslatime, detailscrdate, detailscrtime,603 detailslongname, detailsea, detailssize, detailssubject,604 detailslwdate, detailslwtime, detailsattr, detailsicon;605 CHAR **lastselection;606 USHORT shiftstate;607 USHORT suspendview;608 CHAR szCommonName[CCHMAXPATH];609 ULONG lasttime;610 BOOL arcfilled;611 HMTX filling;612 BOOL firsttree;613 ULONG lastattr;614 ULONG ulItemsToUnHilite;615 }616 DIRCNRDATA;617 618 typedef struct619 {620 USHORT size;621 HWND hwndCnr;622 CHAR directory[CCHMAXPATH];623 BOOL collapsefirst;624 DIRCNRDATA *dcd;625 }626 SHOWREC;627 628 typedef struct629 {630 USHORT size;631 USHORT dummy;632 CHAR file1[CCHMAXPATH];633 CHAR file2[CCHMAXPATH];634 HWND hwndParent;635 HWND hwndList;636 HWND hwndReport;637 HWND hwndHelp;638 }639 FCOMPARE;640 641 typedef struct COMPARE642 {643 USHORT size;644 HWND hwnd;645 HWND hwndParent;646 CHAR leftdir[CCHMAXPATH + 2];647 CHAR rightdir[CCHMAXPATH + 2];648 BOOL forcescroll;649 BOOL filling;650 BOOL includesubdirs;651 INT action;652 INT selleft;653 INT selright;654 INT totalleft;655 INT totalright;656 CHAR rightlist[CCHMAXPATH]; // Snapshot file name657 BOOL reset;658 HWND hwndCalling;659 struct COMPARE *cmp; // callers compare defintion660 struct DIRCNRDATA dcd;661 }662 COMPARE;663 664 456 /* init.c */ 665 457 VOID FindSwapperDat(VOID); 666 458 BOOL InitFM3DLL(HAB hab, int argc, char **argv); 667 459 HWND StartFM3(HAB hab, INT argc, CHAR ** argv); 668 669 /* filldir.c */670 VOID EmptyCnr(HWND hwnd);671 const PSZ FileAttrToString(ULONG fileAttr);672 VOID FillDirCnr(HWND hwndCnr, CHAR *pszDirectory, DIRCNRDATA *pdcd,673 PULONGLONG pullBytes);674 VOID FillTreeCnr(HWND hwndCnr, HWND hwndParent);675 VOID ProcessDirectory(const HWND hwndCnr, const PCNRITEM pciParent,676 const CHAR *szDirBase, const BOOL filestoo,677 const BOOL recurse, const BOOL partial,678 CHAR *stopflag, DIRCNRDATA *pdcd,679 PULONG pullTotalFiles, PULONGLONG pullTotalBytes);680 ULONGLONG FillInRecordFromFFB(HWND hwndCnr, PCNRITEM pci,681 const PSZ pszDirectory,682 const PFILEFINDBUF4L pffb, const BOOL partial,683 DIRCNRDATA *pdcd);684 ULONGLONG FillInRecordFromFSA(HWND hwndCnr, PCNRITEM pci,685 const PSZ pszFileName, const PFILESTATUS4L pfsa4,686 const BOOL partial, DIRCNRDATA *pdcd);687 VOID FreeCnrItem(HWND hwnd, PCNRITEM pci);688 VOID FreeCnrItemList(HWND hwnd, PCNRITEM pciFirst);689 VOID FreeCnrItemData(PCNRITEM pci);690 INT RemoveCnrItems(HWND hwnd, PCNRITEM pci, USHORT usCnt, USHORT usFlags);691 460 692 461 /* flesh.c */ … … 695 464 BOOL FleshEnv(HWND hwndCnr, PCNRITEM pciParent); 696 465 BOOL UnFlesh(HWND hwndCnr, PCNRITEM pciParent); 697 698 /* error.c */699 VOID DbgMsg(PCSZ pszSrcFile, UINT uSrcLineNo, PCSZ pszFmt, ...);700 INT Dos_Error(ULONG mb_type, ULONG ulRC, HWND hwndOwner,701 PCSZ pszSrcFile, UINT uSrcLineNo, PCSZ pszFmt, ...);702 INT Dos_Error2(ULONG mb_type, ULONG ulRC, HWND hwndOwner, PCSZ pszSrcFile,703 UINT uSrcLineNo, UINT idMsg);704 ULONG GetMSecTimer(void);705 VOID Runtime_Error(PCSZ pszSrcFile, UINT uSrcLineNo, PCSZ pszFmt, ...);706 VOID Runtime_Error2(PCSZ pszSrcFile, UINT uSrcLineNo, UINT idMsg);707 APIRET saymsg(ULONG mb_type, HWND hwnd, PCSZ pszTitle, PCSZ pszFmt, ...);708 VOID Win_Error(HWND hwndErr, HWND hwndOwner,709 PCSZ pszSrcFile, UINT uSrcLineNo, PCSZ pszFmt, ...);710 VOID Win_Error2(HWND hwndErr, HWND hwndOwner, PCSZ pszSrcFile,711 UINT uSrcLineNo, UINT idMsg);712 VOID Win_Error_NoMsgBox(HWND hwndErr, HWND hwndOwner,713 PCSZ pszSrcFile, UINT uSrcLineNo, PCSZ pszFmt, ...);714 466 715 467 /* valid.c */ … … 835 587 MRESULT EXPENTRY OpenButtonProc(HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2); 836 588 837 /* dircnrs.c */838 MRESULT EXPENTRY DirClientWndProc(HWND hwnd, ULONG msg, MPARAM mp1,839 MPARAM mp2);840 HWND StartDirCnr(HWND hwndParent, CHAR * directory, HWND hwndRestore,841 ULONG flags);842 MRESULT EXPENTRY DirTextProc(HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2);843 MRESULT EXPENTRY DirFolderProc(HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2);844 MRESULT EXPENTRY DirMaxProc(HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2);845 MRESULT EXPENTRY DirObjWndProc(HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2);846 847 589 /* presparm.c */ 848 590 VOID StoreWndPresParams(HWND hwnd, CHAR * tagname, HINI prof); … … 924 666 CHAR *findstring(CHAR * findthis, ULONG lenthis, CHAR * findin, 925 667 ULONG lenin, BOOL insensitive); 926 927 /* avl.c */928 ARC_TYPE *quick_find_type(CHAR * filespec, ARC_TYPE * topsig);929 ARC_TYPE *find_type(CHAR * filespec, ARC_TYPE * topsig);930 INT load_archivers(VOID);931 BOOL ArcDateTime(CHAR * dt, INT type, CDATE * cdate, CTIME * ctime);932 668 933 669 /* avv.c */ … … 973 709 MPARAM mp2); 974 710 975 /* makelist.c */976 INT AddToList(CHAR * string, CHAR *** list, INT * numfiles, INT * numalloced);977 INT AddToFileList(CHAR * string, FILEFINDBUF4L * ffb4, FILELIST *** list,978 INT * numfiles, INT * numalloced);979 CHAR **BuildList(HWND hwndCnr);980 VOID FreeListInfo(LISTINFO * li);981 VOID FreeList(CHAR ** list);982 VOID SortList(LISTINFO * li);983 CHAR **BuildArcList(HWND hwndCnr);984 CHAR **RemoveFromList(CHAR ** list, CHAR * item);985 CHAR **CombineLists(CHAR ** prime, CHAR ** add);986 987 711 /* chklist.c */ 988 712 VOID PosOverOkay(HWND hwnd); … … 1104 828 MPARAM mp2); 1105 829 1106 /* arccnrs.c */1107 MRESULT EXPENTRY ArcClientWndProc(HWND hwnd, ULONG msg, MPARAM mp1,1108 MPARAM mp2);1109 HWND StartArcCnr(HWND hwndParent, HWND hwndCaller, CHAR * arcname, INT flags,1110 ARC_TYPE * sinfo);1111 MRESULT EXPENTRY ArcTextProc(HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2);1112 MRESULT EXPENTRY ArcFolderProc(HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2);1113 MRESULT EXPENTRY ArcObjWndProc(HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2);1114 PSZ BldQuotedFullPathName(PSZ pszFullPathName, PSZ pszPathName, PSZ pszFileName);1115 PSZ BldQuotedFileName(PSZ pszQuotedFileName, PSZ pszFileName);1116 1117 830 /* assoc.c */ 1118 831 INT ExecAssociation(HWND hwnd, CHAR * datafile); … … 1165 878 /* rename.c */ 1166 879 MRESULT EXPENTRY RenameProc(HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2); 1167 1168 /* comp.c */1169 PSZ BldFullPathName(PSZ pszFullPathName, PSZ pszPathName, PSZ pszFileName);1170 MRESULT EXPENTRY CFileDlgProc(HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2);1171 MRESULT EXPENTRY CompareDlgProc(HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2);1172 880 1173 881 /* findrec.c */ … … 1355 1063 VOID DecrThreadUsage(VOID); 1356 1064 1357 /* string.c */1358 BOOL LoadStrings(char *filename);1359 char *GetPString(ULONG id);1360 BOOL StringsLoaded(void);1361 1362 1065 /* wrappers.c */ 1363 1066 APIRET xDosFindFirst(PSZ pszFileSpec, 1364 1365 1366 1367 1368 1369 1067 PHDIR phdir, 1068 ULONG flAttribute, 1069 PVOID pfindbuf, 1070 ULONG cbBuf, 1071 PULONG pcFileNames, 1072 ULONG ulInfoLevel); 1370 1073 APIRET xDosFindNext(HDIR hDir, 1371 1372 1373 1074 PVOID pfindbuf, 1075 ULONG cbfindbuf, 1076 PULONG pcFilenames, 1374 1077 ULONG ulInfoLevel); // 06 Oct 07 SHL Added 1375 1078 APIRET xDosSetPathInfo(PSZ pszPathName, 1376 1377 1378 1379 1079 ULONG ulInfoLevel, 1080 PVOID pInfoBuf, 1081 ULONG cbInfoBuf, 1082 ULONG flOptions); 1380 1083 PSZ xfgets(PSZ pszBuf, size_t cMaxBytes, FILE * fp, PCSZ pszSrcFile, 1381 1084 UINT uiLineNumber); … … 1465 1168 #pragma data_seg(GLOBAL2) 1466 1169 #endif 1467 DATADEF CHAR *DEBUG_STRING, *FM3Str, *FM2Str, *NullStr, *Default, *Settings, 1170 1171 DATADEF CHAR *FM3Str, *FM2Str, *NullStr, *Default, *Settings, 1468 1172 *DRM_OS2FILE, *DRM_FM2ARCMEMBER, *DRF_FM2ARCHIVE, 1469 1173 *DRMDRFLIST, *DRMDRFOS2FILE, *DRMDRFFM2ARC, -
trunk/dll/fonts.c
r793 r907 1 /* handles setting fonts */ 1 2 /*********************************************************************** 3 4 $Id$ 5 6 Font support 7 8 Copyright (c) 1993-98 M. Kimes 9 Copyright (c) 2008 Steven H. Levine 10 11 05 Jan 08 SHL Sync 12 13 ***********************************************************************/ 14 15 #include <string.h> 2 16 3 17 #define INCL_DOS 4 18 #define INCL_WIN 5 19 #define INCL_GPI 6 7 #include <os2.h> 8 #include <stdlib.h>9 #include <stdio.h>10 #include <string.h>20 #define INCL_LONGLONG // dircnrs.h 21 22 #include "fm3str.h" 23 #include "errutil.h" // Dos_Error... 24 #include "strutil.h" // GetPString 11 25 #include "fm3dll.h" 12 #include "fm3str.h"13 26 14 27 #pragma data_seg(DATA1) -
trunk/dll/fsopen.c
r844 r907 16 16 #if defined(__IBMC__) 17 17 18 #define INCL_WIN19 #define INCL_DOS20 #define INCL_LONGLONG21 22 #include <os2.h>23 18 #include <stdlib.h> 24 19 #include <stdio.h> … … 27 22 #include <fcntl.h> 28 23 #include <share.h> 24 25 #define INCL_WIN 26 #define INCL_DOS 27 #define INCL_LONGLONG 28 29 29 #include "fm3dll.h" 30 30 -
trunk/dll/getnames.c
r847 r907 13 13 14 14 ***********************************************************************/ 15 16 #include <string.h> 17 #include <ctype.h> 15 18 16 19 #define INCL_DOS 17 20 #define INCL_WIN 18 21 #define INCL_LONGLONG 19 #include <os2.h> 20 21 #include <stdlib.h> 22 #include <stdio.h> 23 #include <string.h> 24 #include <time.h> 25 26 #include <ctype.h> 27 #include "fm3dll.h" 22 28 23 #include "fm3dlg.h" 29 24 #include "fm3str.h" 25 #include "errutil.h" // Dos_Error... 26 #include "strutil.h" // GetPString 27 #include "fm3dll.h" 30 28 31 29 #pragma data_seg(DATA1) -
trunk/dll/grep.c
r850 r907 7 7 8 8 Copyright (c) 1993-98 M. Kimes 9 Copyright (c) 2001, 200 7Steven H. Levine9 Copyright (c) 2001, 2008 Steven H. Levine 10 10 11 11 12 Feb 03 SHL insert_grepfile: standardize EA math … … 30 30 ***********************************************************************/ 31 31 32 #define INCL_DOS33 #define INCL_WIN34 #define INCL_DOSERRORS35 #define INCL_LONGLONG36 #include <os2.h>37 38 32 #include <stdlib.h> 39 33 #include <string.h> 40 34 #include <ctype.h> 41 #include <stdio.h>42 35 #include <share.h> 43 36 44 #include "fm3dll.h" 37 #define INCL_DOS 38 #define INCL_DOSERRORS 39 #define INCL_WIN 40 #define INCL_LONGLONG 41 45 42 #include "fm3str.h" 46 43 #include "grep.h" 44 #include "pathutil.h" // BldFullPathName 45 #include "filldir.h" // FillInRecordFromFFB 46 #include "makelist.h" // AddToList 47 #include "errutil.h" // Dos_Error... 48 #include "strutil.h" // GetPString 49 #include "fm3dll.h" 47 50 48 51 #pragma data_seg(DATA2) … … 588 591 MPFROMLONG(EXTRA_RECORD_BYTES), 589 592 MPFROMLONG(grep->toinsert)); 593 // 04 Jan 08 SHL fixme to complain if CM_ALLOCRECORD fails 590 594 if (pci) { 595 // 04 Jan 08 SHL fixme like comp.c to handle less than ulSelCnt records 591 596 if (grep->sayfiles) 592 597 WinSetWindowText(grep->hwndCurFile, GetPString(IDS_GREPINSERTINGTEXT)); … … 1125 1130 register CHAR *pc, *pi; 1126 1131 CHAR **list = NULL; 1127 INT numfiles = 0, numalloced = 0, error; 1132 UINT numfiles = 0, numalloced = 0; 1133 INT error; 1128 1134 register ULONG x = 0, y = 0; 1129 1135 ULONG cntr = 1000; -
trunk/dll/grep.h
r902 r907 19 19 20 20 #if !defined(OS2_INCLUDED) 21 #define INCL_LONGLONG 21 22 #include <os2.h> 23 #else 24 #if !defined(INCL_LONGLONG) 25 #error INCL_LONGLONG required by grep.h 26 #endif 22 27 #endif 23 28 -
trunk/dll/grep2.c
r793 r907 21 21 20 Aug 07 GKY Move #pragma alloc_text to end for OpenWatcom compat 22 22 23 24 23 fixme for more excess locals to be gone 25 24 26 25 ***********************************************************************/ 27 26 28 #define INCL_DOS29 #define INCL_WIN30 #define INCL_GPI31 #define INCL_DOSERRORS32 #include <os2.h>33 34 #include <stdarg.h>35 #include <stdio.h>36 27 #include <stdlib.h> 37 28 #include <string.h> 38 29 #include <ctype.h> 39 #include <time.h>40 30 #include <share.h> 41 #include <limits.h>42 31 #include <process.h> // _beginthread 43 32 44 #include "fm3dll.h" 33 #define INCL_DOS 34 #define INCL_WIN 35 #define INCL_LONGLONG // dircnrs.h 36 #define INCL_WINSTDCNR // makelist.h 37 45 38 #include "fm3dlg.h" 46 39 #include "fm3str.h" 47 40 #include "mle.h" 48 41 #include "grep.h" 42 #include "errutil.h" // Dos_Error... 43 #include "strutil.h" // GetPString 44 #include "fm3dll.h" 49 45 50 46 #pragma data_seg(DATA1) -
trunk/dll/info.c
r897 r907 7 7 8 8 Copyright (c) 1993-98 M. Kimes 9 Copyright (c) 2001, 200 6Steven H. Levine9 Copyright (c) 2001, 2008 Steven H. Levine 10 10 11 11 16 Oct 02 SHL Handle large partitions … … 27 27 ***********************************************************************/ 28 28 29 #include <stdlib.h> 30 #include <string.h> 31 #include <ctype.h> 32 #include <share.h> 33 29 34 #define INCL_DOS 30 35 #define INCL_WIN 31 36 #define INCL_GPI 32 37 #define INCL_LONGLONG 33 #include <os2.h> 34 35 #include <stdio.h> 36 #include <stdlib.h> 37 #include <string.h> 38 #include <ctype.h> 39 #include <share.h> 40 41 #include "fm3dll.h" 38 42 39 #include "fm3dlg.h" 43 40 #include "fm3str.h" 41 #include "makelist.h" // AddToList 42 #include "errutil.h" // Dos_Error... 43 #include "strutil.h" // GetPString 44 #include "fm3dll.h" 44 45 45 46 #pragma data_seg(DATA1) … … 541 542 542 543 LISTINFO li; 543 INT numfiles = 0, numalloc = 0;544 UINT numfiles = 0, numalloc = 0; 544 545 545 546 memset(&li, 0, sizeof(LISTINFO)); -
trunk/dll/inis.c
r900 r907 24 24 ***********************************************************************/ 25 25 26 #define INCL_WIN27 #define INCL_GPI28 #define INCL_DOS29 #define INCL_DOSERRORS30 #include <os2.h>31 32 26 #include <stdlib.h> 33 #include <stdio.h>34 27 #include <string.h> 35 28 #include <ctype.h> … … 37 30 #include <process.h> // _beginthread 38 31 39 #include "fm3dll.h" 32 #define INCL_DOS 33 #define INCL_DOSERRORS 34 #define INCL_WIN 35 #define INCL_GPI 36 #define INCL_LONGLONG // dircnrs.h 37 40 38 #include "fm3dlg.h" 41 39 #include "fm3str.h" 42 40 #include "mle.h" 41 #include "errutil.h" // Dos_Error... 42 #include "strutil.h" // GetPString 43 #include "fm3dll.h" 43 44 44 45 #pragma data_seg(DATA2) -
trunk/dll/init.c
r898 r907 7 7 8 8 Copyright (c) 1993-98 M. Kimes 9 Copyright (c) 2001, 200 7Steven H. Levine9 Copyright (c) 2001, 2008 Steven H. Levine 10 10 11 11 11 Jun 02 SHL Add CheckVersion … … 43 43 44 44 #include <stdlib.h> 45 #include <stdio.h>46 45 #include <string.h> 47 #include <ctype.h>48 46 #include <share.h> 49 #include <time.h>50 47 #include <process.h> 51 48 … … 62 59 #define DEFINE_GLOBALS 1 63 60 64 #include "fm3dll.h"65 61 #include "fm3dlg.h" 66 62 #include "datamin.h" … … 68 64 #include "fm3str.h" 69 65 #include "version.h" 66 #include "pathutil.h" // BldFullPathName 67 #include "arccnrs.h" // ArcClientWndProc 68 #include "errutil.h" // Dos_Error... 69 #include "strutil.h" // GetPString 70 #include "fm3dll.h" 70 71 71 72 #ifdef __IBMC__ -
trunk/dll/input.c
r793 r907 16 16 ***********************************************************************/ 17 17 18 #include <string.h> 19 18 20 #define INCL_DOS 19 21 #define INCL_WIN 20 # include <os2.h>22 #define INCL_LONGLONG // dircnrs.h 21 23 22 #include <stdlib.h>23 #include <stdio.h>24 #include <string.h>25 26 #include "fm3dll.h"27 24 #include "fm3dlg.h" 28 25 #include "fm3str.h" 26 #include "errutil.h" // Dos_Error... 27 #include "strutil.h" // GetPString 28 #include "fm3dll.h" 29 29 30 30 static PSZ pszSrcFile = __FILE__; -
trunk/dll/instant.c
r888 r907 16 16 ***********************************************************************/ 17 17 18 #define INCL_DOS19 #define INCL_WIN20 #include <os2.h>21 22 #include <stdlib.h>23 #include <stdio.h>24 18 #include <string.h> 25 19 #include <ctype.h> 26 20 27 #include "fm3dll.h" 21 #define INCL_DOS 22 #define INCL_WIN 23 #define INCL_LONGLONG // dircnrs.h 24 28 25 #include "fm3dlg.h" 29 26 #include "fm3str.h" 30 27 #include "mle.h" 28 #include "errutil.h" // Dos_Error... 29 #include "strutil.h" // GetPString 30 #include "fm3dll.h" 31 31 32 32 #pragma data_seg(DATA1) -
trunk/dll/key.c
r814 r907 17 17 ***********************************************************************/ 18 18 19 #include <string.h> 20 19 21 #define INCL_DOS 20 22 #define INCL_WIN 21 22 #include <os2.h> 23 24 #include <stdlib.h> 25 #include <stdio.h> 26 #include <string.h> 27 #include <time.h> 28 #include <ctype.h> 29 30 #include "fm3dll.h" 23 #define INCL_LONGLONG // dircnrs.h 24 31 25 #include "fm3dlg.h" 32 26 #include "fm3str.h" 33 27 #include "version.h" 28 #include "errutil.h" // Dos_Error... 29 #include "strutil.h" // GetPString 30 #include "fm3dll.h" 34 31 35 32 #pragma data_seg(DATA1) -
trunk/dll/killproc.c
r888 r907 21 21 ***********************************************************************/ 22 22 23 #define INCL_DOSERRORS24 #define INCL_DOS25 #define INCL_WIN26 #include <os2.h>27 28 23 #include <stdlib.h> 29 #include <stdio.h>30 24 #include <string.h> 31 #include <time.h>32 25 #include <ctype.h> 33 26 #include <process.h> 34 27 #include <limits.h> 35 28 36 #include "fm3dll.h" 29 #define INCL_DOS 30 #define INCL_DOSERRORS 31 #define INCL_WIN 32 #define INCL_LONGLONG // dircnrs.h 33 37 34 #include "fm3dlg.h" 38 35 #include "fm3str.h" 39 36 #include "procstat.h" 37 #include "errutil.h" // Dos_Error... 38 #include "strutil.h" // GetPString 39 #include "fm3dll.h" 40 40 41 41 #pragma data_seg(DATA2) -
trunk/dll/literal.c
r871 r907 20 20 ***********************************************************************/ 21 21 22 #include <stdlib.h> 23 #include <string.h> 24 #include <ctype.h> 25 22 26 #define INCL_OS2 23 27 #define INCL_WIN 24 #include <os2.h> 25 26 #include <ctype.h> 27 #include <stdlib.h> 28 #include <stdio.h> 29 #include <string.h> 30 28 #define INCL_LONGLONG // dircnrs.h 29 30 #include "errutil.h" // Dos_Error... 31 31 #include "fm3dll.h" 32 32 -
trunk/dll/loadbmp.c
r793 r907 17 17 ***********************************************************************/ 18 18 19 #define INCL_DOS20 #define INCL_WIN21 #define INCL_GPI22 #include <os2.h>23 24 19 #include <stdlib.h> 25 20 #include <stdio.h> … … 27 22 #include <share.h> 28 23 24 #define INCL_DOS 25 #define INCL_WIN 26 #define INCL_GPI 27 #define INCL_LONGLONG // dircnrs.h 28 29 #include "errutil.h" // Dos_Error... 29 30 #include "fm3dll.h" 30 31 -
trunk/dll/mainwnd.c
r888 r907 7 7 8 8 Copyright (c) 1993-98 M. Kimes 9 Copyright (c) 2001, 200 7Steven H. Levine9 Copyright (c) 2001, 2008 Steven H. Levine 10 10 11 11 11 Jun 02 SHL Drop obsolete xor code … … 46 46 ***********************************************************************/ 47 47 48 #include <stdlib.h> 49 #include <string.h> 50 #include <ctype.h> 51 #include <process.h> // _beginthread 52 48 53 #define INCL_DOS 49 54 #define INCL_WIN 50 // #define INCL_WINERRORS51 55 #define INCL_SHLERRORS // PMERR_NOT_IN_IDX 52 56 #define INCL_WINHELP 53 57 #define INCL_GPI 54 58 #define INCL_LONGLONG 55 #include <os2.h> 56 57 #include <stdarg.h> 58 #include <stdio.h> 59 #include <stdlib.h> 60 #include <string.h> 61 #include <ctype.h> 62 #include <share.h> 63 #include <process.h> // _beginthread 64 65 #include "fm3dll.h" 59 66 60 #include "fm3dlg.h" 67 61 #include "fm3str.h" 68 62 #include "tools.h" 63 #include "comp.h" 69 64 #include "datamin.h" 65 #include "arccnrs.h" // BldQuotedFileName 66 #include "errutil.h" // Dos_Error... 67 #include "strutil.h" // GetPString 68 #include "fm3dll.h" 70 69 71 70 #pragma data_seg(DATA1) -
trunk/dll/mainwnd2.c
r888 r907 7 7 8 8 Copyright (c) 1993-98 M. Kimes 9 Copyright (c) 2005, 200 7Steven H. Levine9 Copyright (c) 2005, 2008 Steven H. Levine 10 10 11 11 23 May 05 SHL Use datamin.h … … 23 23 ***********************************************************************/ 24 24 25 #include <stdlib.h> 26 #include <string.h> 27 #include <share.h> 28 #include <process.h> // _beginthread 29 25 30 #define INCL_DOS 26 31 #define INCL_WIN 27 32 #define INCL_GPI 28 33 #define INCL_LONGLONG 29 #include <os2.h> 30 31 #include <stdlib.h> 32 #include <stdio.h> 33 #include <string.h> 34 #include <ctype.h> 35 #include <share.h> 36 #include <process.h> // _beginthread 37 38 #include "fm3dll.h" 34 39 35 #include "fm3dlg.h" 40 36 #include "fm3str.h" 41 37 #include "tools.h" 42 38 #include "datamin.h" 39 #include "comp.h" // COMPARE 40 #include "arccnrs.h" // BldQuotedFileName 41 #include "errutil.h" // Dos_Error... 42 #include "strutil.h" // GetPString 43 #include "fm3dll.h" 43 44 44 45 typedef struct -
trunk/dll/makefile
r903 r907 35 35 # 03 Jan 08 SHL Prepare for final, implending switch to wrc.exe 36 36 # 03 Jan 08 SHL Switch to wrc.exe default; support USE_RC from environment 37 # 05 Jan 08 SHL Sync with .c renames 37 38 38 39 # Environment: … … 92 93 # -wcd14 no reference to symbol 93 94 # -wcd726 no reference to formal parameter 95 # -we treat warnings as errors 94 96 # -wx max warnings 95 97 # -zfp disable fs use … … 99 101 100 102 !ifdef DEBUG 101 CFLAGS = -bt=os2 -mf -bd -bm -hd -d2 -olirs -s -sg -j -w x -zfp -zgp -zp4 -zq102 CFLAGS = -bt=os2 -mf -bd -bm -hd -d2 -s -sg -j -w x -zfp -zgp -zp4 -zq103 !else 104 CFLAGS = -bt=os2 -mf -bd -bm -hd -d1 -olirs -s -sg -j -w x -zfp -zgp -zp4 -zq103 CFLAGS = -bt=os2 -mf -bd -bm -hd -d2 -olirs -s -sg -j -we -wx -zfp -zgp -zp4 -zq 104 CFLAGS = -bt=os2 -mf -bd -bm -hd -d2 -s -sg -j -we -wx -zfp -zgp -zp4 -zq 105 !else 106 CFLAGS = -bt=os2 -mf -bd -bm -hd -d1 -olirs -s -sg -j -we -wx -zfp -zgp -zp4 -zq 105 107 !endif 106 108 107 109 # for fm3res only 108 CFLAGSR = -bt=os2 -mf -bd -bm -olirs -s -j -w x -zfp -zgp -zp4 -zq110 CFLAGSR = -bt=os2 -mf -bd -bm -olirs -s -j -we -wx -zfp -zgp -zp4 -zq 109 111 110 112 !ifdef DEBUG … … 138 140 collect.obj colors.obj commafmt.obj command.obj common.obj & 139 141 comp.obj copyf.obj datamin.obj defview.obj delims.obj dircnrs.obj & 140 dirs.obj dirsize.obj draglist.obj droplist.obj eas.obj err or.obj &142 dirs.obj dirsize.obj draglist.obj droplist.obj eas.obj errutil.obj & 141 143 extract.obj filldir.obj filter.obj findrec.obj flesh.obj fm2cmd.obj & 142 144 fonts.obj fsopen.obj getnames.obj grep.obj grep2.obj info.obj inis.obj & … … 144 146 loadbmp.obj mainwnd.obj mainwnd2.obj makelist.obj menu.obj misc.obj & 145 147 mkdir.obj mle.obj newview.obj notebook.obj notify.obj objcnr.obj & 146 objwin.obj presparm.obj printer.obj remap.obj rename.obj saveclip.obj & 148 objwin.obj & 149 pathutil.obj & 150 presparm.obj printer.obj remap.obj rename.obj saveclip.obj & 147 151 seeall.obj select.obj seticon.obj shadow.obj sortcnr.obj srchpath.obj & 148 string.obj strips.obj stristr.obj subj.obj sysinfo.obj systemf.obj & 149 timer.obj tools.obj treecnr.obj undel.obj update.obj uudecode.obj & 152 strutil.obj strips.obj stristr.obj subj.obj sysinfo.obj systemf.obj & 153 timer.obj tmrsvcs.obj tools.obj treecnr.obj & 154 undel.obj update.obj uudecode.obj & 150 155 valid.obj viewer.obj viewinf.obj walkem.obj winlist.obj worker.obj & 151 156 wrappers.obj -
trunk/dll/makelist.c
r841 r907 7 7 8 8 Copyright (c) 1993-98 M. Kimes 9 Copyright (c) 2003, 200 7Steven H.Levine9 Copyright (c) 2003, 2008 Steven H.Levine 10 10 11 11 12 Feb 03 SHL AddToFileList: standardize EA math … … 17 17 ***********************************************************************/ 18 18 19 #include <stdlib.h> 20 #include <string.h> 21 19 22 #define INCL_DOS 20 23 #define INCL_WIN 21 24 #define INCL_LONGLONG 22 #include <os2.h> 23 24 #include <stdio.h> 25 #include <stdlib.h> 26 #include <string.h> 27 #include <ctype.h> 28 29 #include "fm3dll.h" 25 30 26 #include "fm3str.h" 27 #include "makelist.h" 28 #include "errutil.h" // Dos_Error... 29 #include "strutil.h" // GetPString 30 #include "dircnrs.h" 31 #include "fm3dll.h" // 05 Jan 08 SHL fixme to be gone 31 32 32 33 static PSZ pszSrcFile = __FILE__; 33 34 34 VOID SortList(LISTINFO * 35 VOID SortList(LISTINFO *li) 35 36 { 36 37 /* bubble-sort entries by size, descending */ 37 38 38 INT x;39 UINT x; 39 40 CHAR *s; 40 41 ULONG l; … … 64 65 } 65 66 66 VOID FreeListInfo(LISTINFO * 67 VOID FreeListInfo(LISTINFO *li) 67 68 { 68 69 if (li) { … … 77 78 } 78 79 79 VOID FreeList(CHAR ** 80 { 81 registerINT x;80 VOID FreeList(CHAR **list) 81 { 82 UINT x; 82 83 83 84 if (list) { … … 96 97 } 97 98 98 INT AddToFileList(CHAR * string, FILEFINDBUF4L * ffb4, FILELIST ***list,99 INT * numfiles, INT *numalloced)99 INT AddToFileList(CHAR *string, FILEFINDBUF4L *ffb4, FILELIST ***list, 100 UINT *pnumfiles, UINT *pnumalloced) 100 101 { 101 102 FILELIST *pfl; … … 103 104 if (string && ffb4) { 104 105 // Ensure room for NULL entry 105 if (((* numfiles) + 3) > *numalloced) {106 if (((*pnumfiles) + 3) > *pnumalloced) { 106 107 FILELIST **pflArray; 107 108 108 109 // Use plain realloc for speed 109 110 // 06 Aug 07 SHL fixme to know why + 6 110 pflArray = realloc(*list, (* numalloced + 6) * sizeof(FILELIST *));111 pflArray = realloc(*list, (*pnumalloced + 6) * sizeof(FILELIST *)); 111 112 if (!pflArray) { 112 113 Runtime_Error(pszSrcFile, __LINE__, GetPString(IDS_OUTOFMEMORY)); 113 114 return 1; 114 115 } 115 (* numalloced) += 6;116 (*pnumalloced) += 6; 116 117 *list = pflArray; 117 118 } … … 132 133 pfl->easize = CBLIST_TO_EASIZE(ffb4->cbList); 133 134 strcpy(pfl->fname, string); 134 (*list)[* numfiles] = pfl;135 (* numfiles)++;135 (*list)[*pnumfiles] = pfl; 136 (*pnumfiles)++; 136 137 // Ensure list always ends with two NULL entries 137 138 // 06 Aug 07 SHL fixme to know why 138 (*list)[* numfiles] = NULL;139 (*list)[(* numfiles) + 1] = NULL;139 (*list)[*pnumfiles] = NULL; 140 (*list)[(*pnumfiles) + 1] = NULL; 140 141 #ifdef __DEBUG_ALLOC__ 141 142 _heap_check(); … … 151 152 */ 152 153 153 INT AddToList(CHAR * string, CHAR *** list, INT * numfiles, INT *numalloced)154 INT AddToList(CHAR *string, CHAR ***list, UINT *pnumfiles, UINT *pnumalloced) 154 155 { 155 156 CHAR **ppsz; … … 157 158 158 159 if (string) { 159 if (((* numfiles) + 3) > *numalloced) {160 if (((*pnumfiles) + 3) > *pnumalloced) { 160 161 // Use plain realloc for speed 161 ppsz = realloc(*list, (* numalloced + 6) * sizeof(CHAR *));162 ppsz = realloc(*list, (*pnumalloced + 6) * sizeof(CHAR *)); 162 163 if (!ppsz) { 163 164 Runtime_Error(pszSrcFile, __LINE__, "realloc"); 164 165 return 1; 165 166 } 166 (* numalloced) += 6;167 (*pnumalloced) += 6; 167 168 *list = ppsz; 168 169 } … … 173 174 return 2; 174 175 } 175 (*list)[* numfiles] = psz;176 strcpy((*list)[* numfiles], string); // Add entry177 (* numfiles)++;178 (*list)[* numfiles] = NULL; // Add end marker179 (*list)[(* numfiles) + 1] = NULL; // Add 2nd end marker - fixme to know why?176 (*list)[*pnumfiles] = psz; 177 strcpy((*list)[*pnumfiles], string); // Add entry 178 (*pnumfiles)++; 179 (*list)[*pnumfiles] = NULL; // Add end marker 180 (*list)[(*pnumfiles) + 1] = NULL; // Add 2nd end marker - fixme to know why? 180 181 #ifdef __DEBUG_ALLOC__ 181 182 _heap_check(); … … 189 190 PCNRITEM pci; 190 191 CHAR **list = NULL, **test; 191 INT numfiles = 0, numalloc = 0, error = 0, attribute = CRA_CURSORED; 192 UINT numfiles = 0, numalloc = 0; 193 INT error = 0, attribute = CRA_CURSORED; 192 194 193 195 pci = (PCNRITEM) CurrentRecord(hwndCnr); … … 220 222 PARCITEM pai; 221 223 CHAR **list = NULL; 222 INT numfiles = 0, numalloc = 0, error = 0, attribute = CRA_CURSORED; 224 UINT numfiles = 0, numalloc = 0; 225 INT error = 0, attribute = CRA_CURSORED; 223 226 224 227 pai = (PARCITEM) CurrentRecord(hwndCnr); … … 239 242 } 240 243 241 CHAR **RemoveFromList(CHAR ** list, CHAR *item)242 { 243 registerINT x, y;244 CHAR **RemoveFromList(CHAR **list, CHAR *item) 245 { 246 UINT x, y; 244 247 245 248 if (list && list[0] && item) { … … 264 267 } 265 268 266 CHAR **CombineLists(CHAR ** prime, CHAR **add)267 { 268 registerINT x;269 INT numalloc, numfiles = 0;269 CHAR **CombineLists(CHAR **prime, CHAR **add) 270 { 271 UINT x; 272 UINT numalloc, numfiles = 0; 270 273 271 274 if (add && add[0]) { -
trunk/dll/menu.c
r793 r907 16 16 ***********************************************************************/ 17 17 18 #define INCL_DOS19 #define INCL_WIN20 #include <os2.h>21 22 #include <stdio.h>23 18 #include <stdlib.h> 24 19 #include <string.h> 25 20 #include <share.h> 26 21 22 #define INCL_WIN 23 #define INCL_LONGLONG // dircnrs.h 24 25 #include "menu.h" 26 #include "errutil.h" // Dos_Error... 27 27 #include "fm3dll.h" 28 #include "menu.h"29 28 30 29 #pragma data_seg(DATA2) -
trunk/dll/misc.c
r891 r907 7 7 8 8 Copyright (c) 1993-98 M. Kimes 9 Copyright (c) 2003, 200 7Steven H. Levine9 Copyright (c) 2003, 2008 Steven H. Levine 10 10 11 11 11 Jun 03 SHL Add JFS and FAT32 support … … 39 39 ***********************************************************************/ 40 40 41 #include <stdlib.h> 42 #include <string.h> 43 #include <ctype.h> 44 #include <share.h> 45 #include <malloc.h> // _heapmin 46 41 47 #define INCL_DOS 42 48 #define INCL_WIN 43 49 #define INCL_GPI 44 50 #define INCL_LONGLONG 45 #include <os2.h> 46 47 #include <stdarg.h> 48 #include <stdio.h> 49 #include <stdlib.h> 50 #include <string.h> 51 #include <ctype.h> 52 #include <share.h> 53 #include <malloc.h> // headmin 54 55 #include "fm3dll.h" 51 56 52 #include "fm3dlg.h" 57 53 #include "fm3str.h" 54 #include "pathutil.h" // BldQuotedFileName 55 #include "errutil.h" // Dos_Error... 56 #include "strutil.h" // GetPString 57 #include "fm3dll.h" 58 58 59 59 #pragma data_seg(DATA1) -
trunk/dll/mkdir.c
r551 r907 1 #define INCL_DOS 1 2 /*********************************************************************** 3 4 $Id$ 5 6 Make directory dialog 7 8 Copyright (c) 1993-97 M. Kimes 9 Copyright (c) 2004, 2007 Steven H.Levine 10 11 01 Aug 04 SHL Baseline 12 13 ***********************************************************************/ 14 15 #include <string.h> 16 #include <ctype.h> 17 2 18 #define INCL_DOSERRORS 3 19 #define INCL_WIN 4 5 #include <os2.h> 6 #include <stdarg.h> 7 #include <stdio.h> 8 #include <stdlib.h> 9 #include <string.h> 10 #include <ctype.h> 11 #include "fm3dll.h" 20 #define INCL_LONGLONG // dircnrs.h 21 12 22 #include "fm3dlg.h" 13 23 #include "fm3str.h" 24 #include "errutil.h" // Dos_Error... 25 #include "strutil.h" // GetPString 26 #include "fm3dll.h" 14 27 15 28 #pragma alloc_text(MKDIR,MassMkdir,SetDir,PMMkDir,SetTargetDir) … … 17 30 APIRET MassMkdir(HWND hwndClient, CHAR * dir) 18 31 { 19 20 32 APIRET last, was = 0; 21 33 CHAR *p; -
trunk/dll/mle.c
r892 r907 21 21 ***********************************************************************/ 22 22 23 #define INCL_DOS24 #define INCL_WIN25 #define INCL_LONGLONG26 #include <os2.h>27 28 23 #include <stdlib.h> 29 #include <stdio.h>30 24 #include <string.h> 31 25 #include <ctype.h> … … 33 27 #include <process.h> // _beginthread 34 28 35 #include "fm3dll.h" 29 #define INCL_DOS 30 #define INCL_WIN 31 #define INCL_LONGLONG 32 36 33 #include "fm3dlg.h" 37 34 #include "mle.h" 38 35 #include "fm3str.h" 36 #include "errutil.h" // Dos_Error... 37 #include "strutil.h" // GetPString 38 #include "fm3dll.h" 39 39 40 40 static PSZ pszSrcFile = __FILE__; -
trunk/dll/newview.c
r906 r907 7 7 8 8 Copyright (c) 1993-98 M. Kimes 9 Copyright (c) 2001, 200 7Steven H. Levine9 Copyright (c) 2001, 2008 Steven H. Levine 10 10 11 11 01 Dec 03 SHL Comments … … 32 32 ***********************************************************************/ 33 33 34 #include <stdlib.h> 35 #include <string.h> 36 #include <process.h> 37 #include <limits.h> 38 #include <share.h> 39 34 40 #define INCL_DOS 35 41 #define INCL_WIN 36 42 #define INCL_GPI 37 43 #define INCL_LONGLONG 38 #include <os2.h> 39 40 #include <stdlib.h> 41 #include <stdio.h> 42 #include <string.h> 43 #include <ctype.h> 44 #include <process.h> 45 #include <limits.h> 46 #include <share.h> 47 48 #include "fm3dll.h" 44 49 45 #include "fm3dlg.h" 50 46 #include "fm3str.h" 51 47 #include "mle.h" 48 #include "makelist.h" // AddToList 49 #include "errutil.h" // Dos_Error... 50 #include "strutil.h" // GetPString 51 #include "fm3dll.h" 52 52 53 53 #pragma data_seg(DATA2) … … 357 357 CHAR **list = NULL, s[SEARCHSTRINGLEN], a; 358 358 register CHAR *p, *e; 359 INT numlines = 0, numalloc = 0;359 UINT numlines = 0, numalloc = 0; 360 360 361 361 if (ad && ad->selected) { … … 396 396 while (*e != '\r' && *e != '\n' && e < ad->text + ad->textsize) 397 397 e++; 398 /* 399 if((*e == '\r' || *e == '\n') && e > p)400 e--;401 */398 /* fixme to be gone? 399 if((*e == '\r' || *e == '\n') && e > p) 400 e--; 401 */ 402 402 width = e - p; 403 403 } … … 434 434 CHAR **list = NULL, s[SEARCHSTRINGLEN]; 435 435 SHORT x, z; 436 INT numlines = 0, numalloc = 0;436 UINT numlines = 0, numalloc = 0; 437 437 438 438 if (ad) { -
trunk/dll/notebook.c
r906 r907 7 7 8 8 Copyright (c) 1993-98 M. Kimes 9 Copyright (c) 2004, 200 7Steven H. Levine9 Copyright (c) 2004, 2008 Steven H. Levine 10 10 11 11 01 Aug 04 SHL Rework lstrip/rstrip usage … … 24 24 ***********************************************************************/ 25 25 26 #define INCL_DOS27 #define INCL_WIN28 #include <os2.h>29 30 26 #include <stdio.h> 31 27 #include <stdlib.h> 32 28 #include <string.h> 33 29 34 #include "fm3dll.h" 30 #define INCL_DOS 31 #define INCL_WIN 32 #define INCL_LONGLONG // dircnrs.h 33 35 34 #include "fm3dlg.h" 36 35 #include "fm3str.h" 36 #include "pathutil.h" // BldQuotedFileName 37 #include "errutil.h" // Dos_Error... 38 #include "strutil.h" // GetPString 39 #include "fm3dll.h" 37 40 38 41 #pragma data_seg(DATA2) -
trunk/dll/notify.c
r793 r907 18 18 ***********************************************************************/ 19 19 20 #include <stdlib.h> 21 #include <string.h> 22 #include <ctype.h> 23 #include <stddef.h> // _threadid 24 #include <process.h> // _beginthread 25 20 26 #define INCL_DOS 21 27 #define INCL_WIN 22 28 #define INCL_GPI 23 #include <os2.h> 24 25 #include <stdarg.h> 26 #include <stdio.h> 27 #include <stdlib.h> 28 #include <string.h> 29 #include <ctype.h> 30 #include <time.h> 31 #include <stddef.h> 32 #include <process.h> // _beginthread 33 34 #include "fm3dll.h" 29 #define INCL_LONGLONG // dircnrs.h 30 35 31 #include "fm3dlg.h" 36 32 #include "fm3str.h" 33 #include "errutil.h" // Dos_Error... 34 #include "strutil.h" // GetPString 35 #include "fm3dll.h" 37 36 38 37 #pragma data_seg(DATA1) -
trunk/dll/objcnr.c
r850 r907 24 24 ***********************************************************************/ 25 25 26 #include <stdlib.h> 27 #include <string.h> 28 #include <ctype.h> 29 #include <process.h> // _beginthread 30 26 31 #define INCL_DOS 27 32 #define INCL_WIN 28 33 #define INCL_DOSERRORS 29 34 #define INCL_LONGLONG 30 #include <os2.h> 31 32 #include <stdio.h> 33 #include <stdlib.h> 34 #include <string.h> 35 #include <ctype.h> 36 #include <process.h> // _beginthread 37 38 #include "fm3dll.h" 35 39 36 #include "fm3dlg.h" 40 37 #include "fm3str.h" 38 #include "errutil.h" // Dos_Error... 39 #include "strutil.h" // GetPString 40 #include "fm3dll.h" 41 41 42 42 typedef struct -
trunk/dll/objwin.c
r793 r907 18 18 #define INCL_DOS 19 19 #define INCL_WIN 20 #define INCL_GPI 21 #include <os2.h> 20 #define INCL_LONGLONG // dircnrs.h 22 21 23 #include <stdarg.h>24 #include <stdio.h>25 #include <stdlib.h>26 #include <string.h>27 #include <ctype.h>28 #include <stddef.h>29 30 #include "fm3dll.h"31 22 #include "fm3dlg.h" 32 23 #include "fm3str.h" 24 #include "arccnrs.h" // ArcObjWndProc 25 #include "errutil.h" // Win_Error 26 #include "fm3dll.h" 33 27 34 28 static PSZ pszSrcFile = __FILE__; -
trunk/dll/presparm.c
r882 r907 16 16 ***********************************************************************/ 17 17 18 #define INCL_DOS 18 #include <string.h> 19 19 20 #define INCL_WIN 20 #define INCL_GPI 21 #include <os2.h> 22 23 #include <stdarg.h> 24 #include <stdio.h> 25 #include <stdlib.h> 26 #include <string.h> 27 #include <ctype.h> 21 #define INCL_LONGLONG // dircnrs.h 28 22 29 23 #include "fm3dll.h" -
trunk/dll/printer.c
r843 r907 7 7 8 8 Copyright (c) 1993-98 M. Kimes 9 Copyright (c) 2004, 200 6Steven H.Levine9 Copyright (c) 2004, 2008 Steven H.Levine 10 10 11 11 01 Aug 04 SHL Rework lstrip/rstrip usage … … 21 21 #include <string.h> 22 22 #include <ctype.h> 23 #include <stdio.h>24 #include <io.h>25 23 #include <share.h> 26 #include <string.h>27 24 28 25 #define INCL_DOS 29 26 #define INCL_WIN 30 #include <os2.h> 31 32 #include "fm3dll.h" 27 #define INCL_LONGLONG // dircnrs.h 28 33 29 #include "fm3dlg.h" 34 30 #include "fm3str.h" 31 #include "makelist.h" // AddToList 32 #include "errutil.h" // Dos_Error... 33 #include "strutil.h" // GetPString 34 #include "fm3dll.h" 35 35 36 36 #pragma data_seg(DATA1) … … 547 547 { 548 548 CHAR szBuffer[CCHMAXPATH + 1]; 549 INT numfiles = 0, numalloc = 0, error; 549 UINT numfiles = 0, numalloc = 0; 550 INT error; 550 551 SHORT x; 551 552 -
trunk/dll/remap.c
r888 r907 16 16 ***********************************************************************/ 17 17 18 #define INCL_WIN19 #define INCL_DOS20 #include <os2.h>21 22 18 #include <stdlib.h> 23 #include <stdio.h>24 19 #include <string.h> 25 #include <ctype.h>26 #include <time.h>27 20 #include <share.h> 28 21 #include <io.h> // unlink 29 22 30 #include "fm3dll.h" 23 #define INCL_DOS 24 #define INCL_WIN 25 #define INCL_LONGLONG // dircnrs.h 26 31 27 #include "fm3dlg.h" 32 28 #include "fm3str.h" 29 #include "errutil.h" // Dos_Error... 30 #include "strutil.h" // GetPString 31 #include "fm3dll.h" 33 32 34 33 #pragma data_seg(DATA1) -
trunk/dll/rename.c
r897 r907 16 16 ***********************************************************************/ 17 17 18 #define INCL_DOS 18 #include <string.h> 19 19 20 #define INCL_WIN 20 21 #define INCL_LONGLONG 21 22 22 #include <os2.h>23 #include <stdarg.h>24 #include <stdio.h>25 #include <stdlib.h>26 #include <string.h>27 #include <ctype.h>28 #include "fm3dll.h"29 23 #include "fm3dlg.h" 30 24 #include "fm3str.h" 25 #include "errutil.h" // Dos_Error... 26 #include "strutil.h" // GetPString 27 #include "fm3dll.h" 31 28 32 29 MRESULT EXPENTRY RenameProc(HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2) -
trunk/dll/saveclip.c
r897 r907 7 7 8 8 Copyright (c) 1993-98 M. Kimes 9 Copyright (c) 2005, 200 7Steven H. Levine9 Copyright (c) 2005, 2008 Steven H. Levine 10 10 11 11 12 Feb 03 SHL SaveListDlgProc: standardize EA math … … 24 24 ***********************************************************************/ 25 25 26 #define INCL_DOS27 #define INCL_WIN28 #define INCL_LONGLONG29 #include <os2.h>30 31 #include <stdarg.h>32 #include <stdio.h>33 26 #include <stdlib.h> 34 27 #include <string.h> 35 28 #include <share.h> 36 29 37 #include "fm3dll.h" 30 #define INCL_WIN 31 #define INCL_LONGLONG 32 38 33 #include "fm3dlg.h" 39 34 #include "fm3str.h" 35 #include "makelist.h" // AddToList 36 #include "errutil.h" // Dos_Error... 37 #include "strutil.h" // GetPString 38 #include "fm3dll.h" 40 39 41 40 static PSZ pszSrcFile = __FILE__; … … 158 157 { 159 158 CHAR *p, *pp, *text = NULL, **list = NULL; 160 INT numfiles = 0, numalloced = 0;159 UINT numfiles = 0, numalloced = 0; 161 160 162 161 if (WinOpenClipbrd(hab)) { -
trunk/dll/seeall.c
r897 r907 7 7 8 8 Copyright (c) 1993-98 M. Kimes 9 Copyright (c) 2001, 200 7Steven H. Levine9 Copyright (c) 2001, 2008 Steven H. Levine 10 10 11 11 16 Oct 02 SHL Handle large partitions … … 36 36 ***********************************************************************/ 37 37 38 #include <stdlib.h> 39 #include <string.h> 40 #include <ctype.h> 41 #include <process.h> 42 38 43 #define INCL_DOS 39 44 #define INCL_DOSERRORS … … 41 46 #define INCL_GPI 42 47 #define INCL_LONGLONG 43 #include <os2.h> 44 45 #include <stdlib.h> 46 #include <stdio.h> 47 #include <string.h> 48 #include <ctype.h> 49 #include <process.h> 50 51 #include "fm3dll.h" 48 52 49 #include "fm3dlg.h" 53 50 #include "fm3str.h" 51 #include "pathutil.h" // BldQuotedFullPathName... 52 #include "makelist.h" // AddToList 53 #include "errutil.h" // Dos_Error... 54 #include "strutil.h" // GetPString 55 #include "fm3dll.h" 54 56 55 57 #pragma data_seg(DATA2) … … 262 264 { 263 265 CHAR **files = NULL, **list = (CHAR **) mp2, path[CCHMAXPATH]; 264 INT numfiles = 0, numalloc = 0, plen = 0; 266 UINT numfiles = 0, numalloc = 0; 267 INT plen = 0; 265 268 HWND hwndFrame = WinQueryWindowULong(hwnd, QWL_USER); 266 269 CHAR message[CCHMAXPATH * 2], wildname[CCHMAXPATH]; … … 1317 1320 ULONG z = 0; 1318 1321 CHAR **list = NULL; 1319 INT numfiles = 0;1320 INT numalloc = 0;1322 UINT numfiles = 0; 1323 UINT numalloc = 0; 1321 1324 INT error; 1322 1325 … … 1924 1927 if (!rc) { 1925 1928 do { 1926 #if 0 // 13 Aug 07 SHL fixme to be gone1927 {1928 static ULONG ulMaxCnt = 1;1929 if (ulFindCnt > ulMaxCnt) {1930 ulMaxCnt = ulFindCnt;1931 DbgMsg(pszSrcFile, __LINE__, "ulMaxCnt %u/%u", ulMaxCnt, ulFindMax);1932 }1933 }1934 #endif // fixme to be gone1935 1929 priority_normal(); 1936 1930 pffbFile = pffbArray; -
trunk/dll/select.c
r897 r907 7 7 8 8 Copyright (c) 1993-98 M. Kimes 9 Copyright (c) 2004, 200 7Steven H. Levine9 Copyright (c) 2004, 2008 Steven H. Levine 10 10 11 11 01 Aug 04 SHL Rework lstrip/rstrip usage … … 31 31 ***********************************************************************/ 32 32 33 #define INCL_DOS34 #define INCL_WIN35 #define INCL_LONGLONG36 #include <os2.h>37 38 #include <stdio.h>39 33 #include <stdlib.h> 40 34 #include <string.h> … … 42 36 #include <io.h> 43 37 38 #define INCL_DOS 39 #define INCL_WIN 40 #define INCL_LONGLONG 41 42 #include "fm3str.h" 43 #include "filldir.h" // RemoveCnrItems 44 #include "makelist.h" // AddToList 45 #include "errutil.h" // Dos_Error... 46 #include "strutil.h" // GetPString 44 47 #include "fm3dll.h" 45 #include "fm3str.h"46 48 47 49 static PSZ pszSrcFile = __FILE__; … … 50 52 { 51 53 PCNRITEM pci; 52 INT numfiles = 0, numalloc = 0, x = 0; 54 UINT numfiles = 0, numalloc = 0; 55 UINT x = 0; 53 56 INT attribute = CRA_CURSORED; 54 57 -
trunk/dll/seticon.c
r793 r907 15 15 ***********************************************************************/ 16 16 17 #define INCL_DOS18 #define INCL_WIN19 #include <os2.h>20 21 #include <stdio.h>22 17 #include <stdlib.h> 23 18 #include <string.h> 24 #include <ctype.h>25 19 #include <share.h> 26 20 21 #define INCL_WIN 22 #define INCL_LONGLONG // dircnrs.h 23 24 #include "fm3dlg.h" 25 #include "errutil.h" // Dos_Error... 27 26 #include "fm3dll.h" 28 #include "fm3dlg.h"29 27 30 28 #pragma data_seg(DATA2) -
trunk/dll/shadow.c
r847 r907 7 7 8 8 Copyright (c) 1993-97 M. Kimes 9 Copyright (c) 2006, 200 7Steven H. Levine9 Copyright (c) 2006, 2008 Steven H. Levine 10 10 11 11 22 Jul 06 SHL Check more run time errors … … 16 16 ***********************************************************************/ 17 17 18 #include <stdlib.h> 19 #include <string.h> 20 18 21 #define INCL_DOS 19 22 #define INCL_WIN 20 23 #define INCL_LONGLONG 21 #include <os2.h> 22 23 #include <stdlib.h> 24 #include <stdio.h> 25 #include <string.h> 26 27 #include "fm3dll.h" 24 28 25 #include "fm3dlg.h" 29 26 #include "fm3str.h" 27 #include "pathutil.h" // BldFullPathName 28 #include "errutil.h" // Dos_Error... 29 #include "strutil.h" // GetPString 30 #include "fm3dll.h" 30 31 31 32 #pragma data_seg(DATA1) … … 136 137 BldFullPathName(temp, path, objtitle); 137 138 // sprintf(temp, 138 // 139 // "%s%s%s", (path) ? path : "", (path) ? "\\" : "", objtitle); 139 140 p = strrchr(temp, '.'); 140 141 if (p) { -
trunk/dll/sortcnr.c
r897 r907 16 16 ***********************************************************************/ 17 17 18 #include <string.h> 19 18 20 #define INCL_WIN 19 #define INCL_LONGLONG20 #include <os2.h>21 22 #include <stdio.h>23 #include <stdlib.h>24 #include <string.h>25 21 26 22 #include "fm3dll.h" -
trunk/dll/srchpath.c
r891 r907 7 7 8 8 Copyright (c) 1993-98 M. Kimes 9 Copyright (c) 2003, 200 7Steven H. Levine9 Copyright (c) 2003, 2008 Steven H. Levine 10 10 11 11 22 Apr 07 GKY Add RunFM2Util to find and run apps from the FM2Utilities … … 14 14 15 15 ***********************************************************************/ 16 17 #include <string.h> 18 16 19 #define INCL_WIN 17 #define INCL_WINERRORS18 20 #define INCL_DOS 19 #define INCL_DOSERRORS 20 #define INCL_LONGLONG 21 #define INCL_LONGLONG // dircnrs.h 21 22 22 #include <os2.h>23 #include <stdlib.h>24 #include <stdio.h>25 #include <string.h>26 #include <stdarg.h>27 28 #include "fm3dll.h"29 23 #include "fm3dlg.h" 30 24 #include "fm3str.h" 25 #include "pathutil.h" // BldQuotedFileName 26 #include "errutil.h" // Dos_Error... 27 #include "fm3dll.h" 31 28 32 29 static PSZ pszSrcFile = __FILE__; -
trunk/dll/strips.c
r906 r907 16 16 ***********************************************************************/ 17 17 18 #include <string.h> 19 18 20 #include <os2.h> 19 #include <stdlib.h>20 #include <string.h>21 #include <ctype.h>22 21 23 22 VOID chop_at_crnl(PSZ pszSrc) -
trunk/dll/stristr.c
r793 r907 13 13 ***********************************************************************/ 14 14 15 #define INCL_DOS16 17 #include <os2.h>18 #include <stdlib.h>19 #include <stdio.h>20 15 #include <string.h> 21 16 #include <ctype.h> 22 17 18 #include <os2.h> 19 23 20 CHAR *stristr(register CHAR * t, CHAR * s) 24 21 { 25 26 22 /* case-insensitive strstr() */ 27 23 … … 48 44 CHAR *strnistr(register CHAR * t, CHAR * s, LONG len) 49 45 { 50 51 46 /* case-insensitive strnstr() */ 52 47 … … 74 69 CHAR *strnstr(register CHAR * t, CHAR * s, LONG len) 75 70 { 76 77 71 /* strnstr() */ 78 72 … … 101 95 ULONG lenin, BOOL sensitive) 102 96 { 103 104 97 register CHAR *this, *in; 105 98 register ULONG lenthis2, lenin2; -
trunk/dll/strutil.c
r901 r907 7 7 8 8 Copyright (c) 1993-98 M. Kimes 9 Copyright (c) 2006 Steven H. Levine9 Copyright (c) 2006, 2008 Steven H. Levine 10 10 11 11 22 Jul 06 SHL Comments 12 12 20 Aug 07 GKY Move #pragma alloc_text to end for OpenWatcom compat 13 05 Jan 08 SHL Rename from string.c to avoid string.h conflict 13 14 14 15 ***********************************************************************/ 15 16 16 #define INCL_DOS 17 #define INCL_WIN 18 #include <os2.h> 17 #include <stdio.h> 18 #include <share.h> 19 19 20 #include <stdlib.h> 21 #include <stdio.h> 22 #include <string.h> 23 #include <share.h> 24 #include <io.h> 25 26 #include "fm3dll.h" 20 #include "strutil.h" 27 21 #include "fm3str.h" 28 22 #include "version.h" 23 24 extern PSZ NullStr; // 05 Jan 08 SHL fixme to be in some .h 29 25 30 26 static char **strs, *str; -
trunk/dll/subj.c
r841 r907 17 17 ***********************************************************************/ 18 18 19 #include <stdlib.h> 20 #include <string.h> 21 #include <ctype.h> 22 19 23 #define INCL_WIN 20 24 #define INCL_DOS 21 25 #define INCL_DOSERRORS 22 26 #define INCL_LONGLONG 23 #include <os2.h>24 27 25 #include <stdlib.h>26 #include <stdio.h>27 #include <string.h>28 #include <ctype.h>29 30 #include "fm3dll.h"31 28 #include "fm3dlg.h" 32 29 #include "fm3str.h" 30 #include "errutil.h" // Dos_Error... 31 #include "strutil.h" // GetPString 32 #include "fm3dll.h" 33 33 34 34 static PSZ pszSrcFile = __FILE__; -
trunk/dll/sysinfo.c
r888 r907 18 18 ***********************************************************************/ 19 19 20 #include <string.h> 21 20 22 #define INCL_DOS 21 23 #define INCL_WIN 22 #include <os2.h> 23 24 #include <stdlib.h> 25 #include <stdio.h> 26 #include <string.h> 27 24 #define INCL_LONGLONG 25 26 #include "fm3dlg.h" 28 27 #include "fm3dll.h" 29 #include "fm3dlg.h"30 28 31 29 #pragma data_seg(DATA1) -
trunk/dll/systemf.c
r906 r907 21 21 20 Aug 07 GKY Move #pragma alloc_text to end for OpenWatcom compat 22 22 23 24 23 ***********************************************************************/ 25 24 26 #define INCL_WIN27 #define INCL_WINERRORS28 #define INCL_DOS29 #define INCL_DOSERRORS30 #include <os2.h>31 32 25 #include <stdlib.h> 33 #include <stdio.h>34 26 #include <stdarg.h> 35 27 #include <string.h> 36 28 #include <ctype.h> 37 #include <time.h> 38 39 #include "fm3dll.h" 29 30 #define INCL_DOS 31 #define INCL_DOSERRORS 32 #define INCL_WIN 33 #define INCL_LONGLONG // dircnrs.h 34 40 35 #include "fm3dlg.h" 41 36 #include "fm3str.h" 37 #include "errutil.h" // Dos_Error... 38 #include "strutil.h" // GetPString 39 #include "pathutil.h" 40 #include "fm3dll.h" 42 41 43 42 static PSZ pszSrcFile = __FILE__; -
trunk/dll/timer.c
r793 r907 14 14 ***********************************************************************/ 15 15 16 #include <process.h> // _beginthread 17 16 18 #define INCL_DOS 17 19 #define INCL_DOSERRORS 18 20 #define INCL_WIN 19 # include <os2.h>21 #define INCL_LONGLONG // dircnrs.h 20 22 21 #include <stdarg.h> 22 #include <stdio.h> 23 #include <stdlib.h> 24 #include <string.h> 25 #include <process.h> // _beginthread 26 23 #include "fm3str.h" 24 #include "errutil.h" // Dos_Error... 25 #include "strutil.h" // GetPString 27 26 #include "fm3dll.h" 28 #include "fm3str.h"29 27 30 28 static PSZ pszSrcFile = __FILE__; -
trunk/dll/tools.c
r888 r907 20 20 ***********************************************************************/ 21 21 22 #include <stdlib.h> 23 #include <string.h> 24 #include <share.h> 25 22 26 #define INCL_DOS 23 27 #define INCL_WIN 24 28 #define INCL_LONGLONG 25 #include <os2.h> 26 27 #include <stdio.h> 28 #include <stdlib.h> 29 #include <string.h> 30 #include <share.h> 31 32 #include "fm3dll.h" 29 33 30 #include "fm3dlg.h" 34 31 #include "tools.h" 35 32 #include "fm3str.h" 33 #include "errutil.h" // Dos_Error... 34 #include "strutil.h" // GetPString 35 #include "fm3dll.h" 36 36 37 37 #pragma data_seg(DATA1) -
trunk/dll/treecnr.c
r906 r907 1 1 2 /*********************************************************************** 2 3 … … 6 7 7 8 Copyright (c) 1993-98 M. Kimes 8 Copyright (c) 2001, 200 7Steven H. Levine9 Copyright (c) 2001, 2008 Steven H. Levine 9 10 10 11 16 Oct 02 SHL Handle large partitions … … 45 46 ***********************************************************************/ 46 47 47 #define INCL_DOS48 #define INCL_WIN49 #define INCL_GPI50 #define INCL_DOSERRORS51 #define INCL_LONGLONG52 #include <os2.h>53 54 #include <stdarg.h>55 #include <stdio.h>56 48 #include <stdlib.h> 57 49 #include <string.h> … … 59 51 #include <process.h> // _beginthread 60 52 61 #include "fm3dll.h" 53 #define INCL_DOS 54 #define INCL_WIN 55 #define INCL_LONGLONG 56 62 57 #include "fm3dlg.h" 63 58 #include "fm3str.h" 64 59 #include "mle.h" 60 #include "comp.h" // COMPARE 61 #include "filldir.h" // RemoveCnrItems... 62 #include "errutil.h" // Dos_Error... 63 #include "strutil.h" // GetPString 64 #include "fm3dll.h" 65 65 66 66 #pragma data_seg(DATA1) … … 202 202 if (~pci->rc.flRecordAttr & CRA_CURSORED) { 203 203 if (collapsefirst) { 204 204 // DbgMsg(pszSrcFile, __LINE__, "collapsing"); // 14 Aug 07 SHL fixme 205 205 pciP = WinSendMsg(hwndCnr, 206 206 CM_QUERYRECORD, 207 207 MPVOID, MPFROM2SHORT(CMA_FIRST, CMA_ITEMORDER)); 208 208 while (pciP && (INT) pciP != -1) { 209 #if 1 209 #if 1 // // 05 Jan 08 SHL fixme to be sure this is correct code 210 210 if (pciP->rc.flRecordAttr & CRA_EXPANDED) { 211 211 // collapse top level of all branches … … 256 256 } 257 257 if (fSwitchTreeExpand && ~pciToSelect->rc.flRecordAttr & CRA_EXPANDED) { 258 258 // DbgMsg(pszSrcFile, __LINE__, "expanding current"); // 14 Aug 07 SHL fixme 259 259 WinSendMsg(hwndCnr, CM_EXPANDTREE, MPFROMP(pciToSelect), MPVOID); 260 260 // DbgMsg(pszSrcFile, __LINE__, "expanded"); // 14 Aug 07 SHL fixme 261 261 } 262 262 if (!quickbail) { 263 263 WinSendMsg(hwndCnr, 264 264 CM_SETRECORDEMPHASIS, 265 265 MPFROMP(pciToSelect), … … 2054 2054 2055 2055 CopyPresParams((HWND) mp2, hwndMainMenu); 2056 2056 WinEnableMenuItem((HWND) mp2, IDM_INFO, rdy); 2057 2057 2058 2058 WinEnableMenuItem((HWND) mp2, IDM_ATTRS, writeable); … … 2092 2092 WinEnableMenuItem((HWND) mp2, IDM_MOVEMENU, !underenv 2093 2093 && writeable); 2094 2094 WinEnableMenuItem((HWND) mp2, IDM_RENAME, !underenv && writeable); 2095 2095 2096 2096 } … … 2101 2101 WinCheckMenuItem((HWND) mp2, 2102 2102 IDM_MINIICONS, ((dcd->flWindowAttr & CV_MINI) != 0)); 2103 2103 CopyPresParams((HWND) mp2, hwndMainMenu); 2104 2104 WinEnableMenuItem((HWND) mp2, IDM_RESELECT, FALSE); 2105 2105 break; 2106 2106 2107 2107 case IDM_COMMANDSMENU: 2108 2109 2108 SetupCommandMenu((HWND) mp2, hwnd); 2109 CopyPresParams((HWND) mp2, hwndMainMenu); 2110 2110 break; 2111 2111 2112 2112 case IDM_SORTSUBMENU: 2113 2113 SetSortChecks((HWND) mp2, TreesortFlags); 2114 2115 2114 CopyPresParams((HWND) mp2, hwndMainMenu); 2115 break; 2116 2116 2117 2117 case IDM_WINDOWSMENU: 2118 2118 SetupWinList((HWND) mp2, 2119 2120 2119 (hwndMain) ? hwndMain : (HWND) 0, dcd->hwndFrame); 2120 CopyPresParams((HWND) mp2, hwndMainMenu); 2121 2121 break; 2122 2122 } … … 2411 2411 2412 2412 case IDM_PARTITION: 2413 2414 2413 runemf2(SEPARATE | WINDOWED, HWND_DESKTOP, pszSrcFile, __LINE__, 2414 NULL, NULL, 2415 2415 "%s", "MINILVM.EXE"); 2416 2416 break; 2417 2417 2418 2418 case IDM_PARTITIONDF: 2419 2420 2419 runemf2(SEPARATE | WINDOWED, HWND_DESKTOP, pszSrcFile, __LINE__, 2420 NULL, NULL, 2421 2421 "%s", "DFSOS2.EXE"); 2422 2422 break; 2423 2423 2424 2424 case IDM_PARTITIONLVMG: 2425 2426 2425 runemf2(SEPARATE | WINDOWED, HWND_DESKTOP, pszSrcFile, __LINE__, 2426 NULL, NULL, 2427 2427 "%s", "LVMGUI.CMD"); 2428 2428 break; 2429 2429 2430 2430 case IDM_PARTITIONFD: 2431 2432 2431 runemf2(SEPARATE | WINDOWED, HWND_DESKTOP, pszSrcFile, __LINE__, 2432 NULL, NULL, 2433 2433 "%s", "FDISKPM.EXE"); 2434 2434 break; -
trunk/dll/undel.c
r888 r907 17 17 ***********************************************************************/ 18 18 19 #define INCL_DOSERRORS 19 #include <stdlib.h> 20 #include <string.h> 21 #include <ctype.h> 22 #include <process.h> // _beginthread 23 20 24 #define INCL_DOS 21 25 #define INCL_WIN 22 26 #define INCL_LONGLONG 23 #include <os2.h> 24 25 #include <stdlib.h> 26 #include <stdio.h> 27 #include <string.h> 28 #include <time.h> 29 #include <ctype.h> 30 #include <process.h> // _beginthread 31 32 #include "fm3dll.h" 27 33 28 #include "fm3dlg.h" 34 29 #include "fm3str.h" 30 #include "errutil.h" // Dos_Error... 31 #include "strutil.h" // GetPString 32 #include "fm3dll.h" 35 33 36 34 #pragma data_seg(DATA2) -
trunk/dll/update.c
r841 r907 7 7 8 8 Copyright (c) 1993-98 M. Kimes 9 Copyright (c) 2003, 200 7Steven H. Levine9 Copyright (c) 2003, 2008 Steven H. Levine 10 10 11 11 12 Feb 03 SHL Standardize EA math … … 22 22 ***********************************************************************/ 23 23 24 #include <stdlib.h> 25 #include <string.h> 26 #include <ctype.h> 27 24 28 #define INCL_DOS 25 29 #define INCL_WIN 26 30 #define INCL_LONGLONG 27 #include <os2.h> 28 29 #include <stdarg.h> 30 #include <stdio.h> 31 #include <stdlib.h> 32 #include <string.h> 33 #include <ctype.h> 34 31 32 #include "fm3str.h" 33 #include "errutil.h" // Dos_Error... 34 #include "filldir.h" // FillInRecordFromFFB 35 #include "dircnrs.h" 35 36 #include "fm3dll.h" 36 #include "fm3str.h"37 37 38 38 static PSZ pszSrcFile = __FILE__; -
trunk/dll/uudecode.c
r793 r907 7 7 8 8 Copyright (c) 1993-98 M. Kimes 9 Copyright (c) 2005, 200 7Steven H. Levine9 Copyright (c) 2005, 2008 Steven H. Levine 10 10 11 11 06 Jun 05 SHL Indent -i2 … … 19 19 ***********************************************************************/ 20 20 21 #include <stdlib.h> 22 #include <string.h> 23 #include <share.h> 24 21 25 #define INCL_DOS 22 26 #define INCL_WIN 23 #include <os2.h> 24 25 #include <stdlib.h> 26 #include <stdio.h> 27 #include <string.h> 28 #include <share.h> 29 30 #include "fm3dll.h" 27 #define INCL_LONGLONG // dircnrs.h 28 31 29 #include "fm3dlg.h" 32 30 #include "fm3str.h" 31 #include "makelist.h" // AddToList 32 #include "errutil.h" // Dos_Error... 33 #include "strutil.h" // GetPString 34 #include "fm3dll.h" 33 35 34 36 static PSZ pszSrcFile = __FILE__; … … 325 327 BOOL append, binary; 326 328 CHAR **list = NULL, **test, szBuffer[CCHMAXPATH]; 327 INT numfiles = 0, numalloc = 0, error; 329 UINT numfiles = 0, numalloc = 0; 330 INT error; 328 331 SHORT x, y; 329 332 -
trunk/dll/valid.c
r897 r907 29 29 ***********************************************************************/ 30 30 31 #include <string.h> 32 #include <ctype.h> 33 31 34 #define INCL_DOS 32 35 #define INCL_WIN 33 #define INCL_DOSDEVICES // DosDevIOCtl34 36 #define INCL_DOSDEVIOCTL // DosDevIOCtl 35 37 #define INCL_LONGLONG 36 #include <os2.h> 37 38 #include <stdlib.h> 39 #include <stdio.h> 40 #include <string.h> 41 #include <ctype.h> 42 38 39 #include "fm3str.h" 40 #include "errutil.h" // Dos_Error... 41 #include "strutil.h" // GetPString 43 42 #include "fm3dll.h" 44 #include "fm3str.h"45 43 46 44 static PSZ pszSrcFile = __FILE__; -
trunk/dll/version.h
r870 r907 7 7 8 8 Copyright (c) 1993-98 M. Kimes 9 Copyright (c) 2001, 200 7Steven H. Levine9 Copyright (c) 2001, 2008 Steven H. Levine 10 10 11 11 11 Jun 02 SHL Add CheckVersion VERREALMINOR … … 46 46 31 Aug 07 GKY v3.07: Release modified ini structure 47 47 11 Nov 07 GKY v3.08 Release large file support 48 12 Nov 07 SHL v3.09pre (shl) 48 49 49 50 ***********************************************************************/ 50 51 51 52 #define VERMAJOR 3 52 #define VERMINOR 853 #define VERMINOR 9 53 54 // Ensure VERREALMINOR nul for non-beta releases 54 55 // #define VERREALMINOR "" 55 #define VERREALMINOR " "__DATE__56 //#define VERREALMINOR "beta01" __DATE__ " " __TIME__56 // #define VERREALMINOR " "__DATE__ 57 #define VERREALMINOR "pre (shl) " __DATE__ " " __TIME__ 57 58 58 59 #define APPNAME "FM2" -
trunk/dll/viewer.c
r892 r907 19 19 ***********************************************************************/ 20 20 21 #include <stdlib.h> 22 #include <string.h> 23 #include <io.h> 24 21 25 #define INCL_DOS 22 26 #define INCL_WIN 23 27 #define INCL_LONGLONG 24 #include <os2.h> 25 26 #include <stdlib.h> 27 #include <stdio.h> 28 #include <string.h> 29 #include <time.h> 30 #include <io.h> 31 32 #include "fm3dll.h" 28 33 29 #include "fm3dlg.h" 34 30 #include "fm3str.h" 35 31 #include "mle.h" 32 #include "errutil.h" // Dos_Error... 33 #include "strutil.h" // GetPString 34 #include "fm3dll.h" 36 35 37 36 #pragma data_seg(DATA1) -
trunk/dll/viewinf.c
r888 r907 19 19 /* offset 107: title of INF file */ 20 20 21 #include <stdlib.h> 22 #include <string.h> 23 #include <share.h> 24 #include <process.h> // _beginthread 25 21 26 #define INCL_DOS 22 27 #define INCL_WIN 23 28 #define INCL_LONGLONG 24 #include <os2.h> 25 26 #include <stdio.h> 27 #include <stdlib.h> 28 #include <string.h> 29 #include <ctype.h> 30 #include <share.h> 31 #include <process.h> // _beginthread 32 33 #include "fm3dll.h" 29 34 30 #include "fm3dlg.h" 35 31 #include "fm3str.h" 32 #include "errutil.h" // Dos_Error... 33 #include "strutil.h" // GetPString 34 #include "fm3dll.h" 36 35 37 36 #pragma data_seg(DATA1) -
trunk/dll/walkem.c
r865 r907 26 26 ***********************************************************************/ 27 27 28 #include <stdlib.h> 29 #include <string.h> 30 #include <ctype.h> 31 #include <share.h> 32 28 33 #define INCL_WIN 29 34 #define INCL_DOS … … 31 36 #define INCL_SHLERRORS // PMERR_NOT_IN_IDX 32 37 #define INCL_LONGLONG 33 #include <os2.h> 34 35 #include <stdlib.h> 36 #include <stdio.h> 37 #include <string.h> 38 #include <ctype.h> 39 #include <time.h> 40 #include <share.h> 41 42 #include "fm3dll.h" 38 43 39 #include "fm3dlg.h" 44 40 #include "fm3str.h" 41 #include "errutil.h" // Dos_Error... 42 #include "strutil.h" // GetPString 43 #include "fm3dll.h" 45 44 46 45 #pragma data_seg(DATA1) … … 69 68 static LINKDIRS *pFirstSetup; 70 69 static const PSZ pszLastSetups = "LastSetups"; 71 // //18 Aug 07 SHL fixme to stop supporting old style 1 year from now?70 // 18 Aug 07 SHL fixme to stop supporting old style 1 year from now? 72 71 static const ULONG ulOldSetupsBytes = 100 * 13; // Prior to 3.0.7 73 72 -
trunk/dll/winlist.c
r794 r907 15 15 ***********************************************************************/ 16 16 17 #include <stdlib.h> 18 #include <string.h> 19 17 20 #define INCL_DOS 18 21 #define INCL_WIN 19 #include <os2.h> 20 21 #include <stdarg.h> 22 #include <stdio.h> 23 #include <stdlib.h> 24 #include <string.h> 25 #include <ctype.h> 26 22 23 #include "fm3dlg.h" 27 24 #include "fm3dll.h" 28 #include "fm3dlg.h"29 25 30 26 #pragma data_seg(DATA1) -
trunk/dll/worker.c
r888 r907 7 7 8 8 Copyright (c) 1993-98 M. Kimes 9 Copyright (c) 2001, 200 7Steven H. Levine9 Copyright (c) 2001, 2008 Steven H. Levine 10 10 11 11 16 Oct 02 SHL Comments … … 27 27 ***********************************************************************/ 28 28 29 #define INCL_DOS30 #define INCL_WIN31 #define INCL_DOSERRORS32 #define INCL_WPCLASS // WinQueryObjectPath33 #define INCL_LONGLONG34 #include <os2.h>35 36 #include <stdarg.h>37 #include <stdio.h>38 29 #include <stdlib.h> 39 30 #include <string.h> 40 31 #include <ctype.h> 41 #include <stddef.h>42 32 #include <share.h> 43 #include <time.h>44 33 #include <process.h> // _beginthread 45 34 46 #include "fm3dll.h" 35 #define INCL_DOS 36 #define INCL_DOSERRORS 37 #define INCL_WINPROGRAMLIST 38 #define INCL_WINHELP 39 #define INCL_LONGLONG 40 #define INCL_WINPOINTERS 41 47 42 #include "fm3dlg.h" 48 43 #include "fm3str.h" 44 #include "comp.h" // FCOMPARE 45 #include "pathutil.h" // BldQuotedFileName 46 #include "makelist.h" // AddToList 47 #include "errutil.h" // Dos_Error... 48 #include "strutil.h" // GetPString 49 #include "fm3dll.h" 49 50 50 51 #pragma data_seg(DATA2) 51 52 52 53 static PSZ pszSrcFile = __FILE__; 53 54 54 55 55 #ifdef UNDO … … 116 116 HMQ hmq2; 117 117 CHAR **files = NULL; 118 INT numfiles = 0, numalloc = 0, plen = 0; 118 UINT numfiles = 0, numalloc = 0; 119 INT plen = 0; 119 120 CHAR *p, *pp; 120 121 CHAR szQuotedDirName[CCHMAXPATH]; … … 462 463 FM3ModHandle, FLE_FRAME, (PVOID) list)) { 463 464 goto Abort; 464 465 } 465 466 } 466 467 else { … … 857 858 else { 858 859 runemf2(SEPARATE, 859 860 860 HWND_DESKTOP, pszSrcFile, __LINE__, 861 NULL, NULL, 861 862 "%s %s %s", 862 863 dircompare, … … 873 874 ExecOnList(wk->hwndFrame, 874 875 compare, 875 876 876 WINDOWED | SEPARATEKEEP, NULL, fakelist, NULL, 877 pszSrcFile, __LINE__); 877 878 } 878 879 else { … … 972 973 CHAR **files = NULL; 973 974 register CHAR *p, *pp; 974 INT numfiles = 0, numalloc = 0;975 UINT numfiles = 0, numalloc = 0; 975 976 976 977 if (wk) { … … 1019 1020 "%a", 1020 1021 WINDOWED | SEPARATE | PROMPT, 1021 1022 1022 NULL, wk->li->list, GetPString(IDS_DOITYOURSELFTEXT), 1023 pszSrcFile, __LINE__); 1023 1024 break; 1024 1025 … … 1026 1027 { 1027 1028 register INT x; 1028 1029 1030 1031 1032 1033 1034 1035 1036 1029 register ULONG total; 1030 CHAR fbuf[CCHMAXPATH]; 1031 1032 if (DosSearchPath(SEARCH_IGNORENETERRS | SEARCH_ENVIRONMENT | 1033 SEARCH_CUR_DIRECTORY, 1034 "PATH", "FM2PLAY.EXE", fbuf, CCHMAXPATH - 1)) 1035 total += strlen("..\\FM2UTILS\\FM2PLAY.EXE "); 1036 else 1037 total = strlen(fbuf); 1037 1038 for (x = 0; wk->li->list[x]; x++) 1038 1039 total += (strlen(wk->li->list[x]) + 1 + … … 1048 1049 fprintf(fp, "%s\n", wk->li->list[x]); 1049 1050 fprintf(fp, ";end\n"); 1050 1051 1051 fclose(fp); 1052 RunFM2Util("FM2PLAY.EXE", "/#$FM2PLAY.$$$"); 1052 1053 break; 1053 1054 } … … 1061 1062 wk->li->info->extract && *wk->li->targetpath)) { 1062 1063 1063 1064 1064 CHAR szBuffer[1025]; 1065 CHAR fbuf[CCHMAXPATH]; 1065 1066 register INT x; 1066 1067 … … 1074 1075 } 1075 1076 else { 1076 1077 1078 1077 if (DosSearchPath(SEARCH_IGNORENETERRS | SEARCH_ENVIRONMENT | 1078 SEARCH_CUR_DIRECTORY, 1079 "PATH", "FM2PLAY.EXE", fbuf, CCHMAXPATH - 1)) 1079 1080 strcpy(szBuffer, "UTILS\\FM2PLAY.EXE"); 1080 1081 else … … 1268 1269 ExecOnList((HWND) 0, 1269 1270 binview, 1270 1271 1271 WINDOWED | SEPARATE, NULL, wk->li->list, NULL, 1272 pszSrcFile, __LINE__); 1272 1273 break; 1273 1274 } … … 1279 1280 WINDOWED | SEPARATE | 1280 1281 ((fViewChild) ? CHILD : 0), 1281 1282 1282 NULL, wk->li->list, NULL, 1283 pszSrcFile, __LINE__); 1283 1284 else { 1284 1285 … … 1314 1315 ExecOnList((HWND) 0, 1315 1316 bined, 1316 1317 1317 WINDOWED | SEPARATE, NULL, wk->li->list, NULL, 1318 pszSrcFile, __LINE__); 1318 1319 break; 1319 1320 } … … 1324 1325 ExecOnList((HWND) 0, 1325 1326 editor, 1326 1327 1327 WINDOWED | SEPARATE, NULL, wk->li->list, NULL, 1328 pszSrcFile, __LINE__); 1328 1329 else { 1329 1330 -
trunk/dll/wrappers.c
r850 r907 17 17 ***********************************************************************/ 18 18 19 #include <stdio.h> 20 #include <stdlib.h> 21 #include <string.h> 22 19 23 #define INCL_WIN 20 24 #define INCL_DOS … … 23 27 #include <os2.h> 24 28 25 #include <stdio.h>26 #include <stdlib.h>27 #include <string.h>28 29 29 #include "fm3dll.h" 30 30 #include "fm3str.h" 31 #include "errutil.h" // Dos_Error... 32 #include "strutil.h" // GetPString 31 33 32 34 static PSZ pszSrcFile = __FILE__; -
trunk/eas.c
r754 r907 16 16 ***********************************************************************/ 17 17 18 #include <stdarg.h>19 #include <stdio.h>20 18 #include <stdlib.h> 21 19 #include <string.h> 22 #include <ctype.h>23 20 24 21 #define INCL_DOS 25 22 #define INCL_WIN 26 #include <os2.h>27 23 24 #include "dll\fm3dlg.h" 25 #include "dll\makelist.h" 28 26 #include "dll\fm3dll.h" 29 #include "dll\fm3dlg.h"30 27 31 28 int main (int argc,char *argv[]) … … 35 32 CHAR fullname[CCHMAXPATH]; 36 33 CHAR **list = NULL; 37 INT x,numfiles = 0,numalloc = 0;34 UINT x,numfiles = 0,numalloc = 0; 38 35 39 36 DosError(FERR_DISABLEHARDERR); -
trunk/fm3.c
r551 r907 1 2 /*********************************************************************** 3 4 $Id$ 5 6 fm/2 starter 7 8 Copyright (c) 1993-98 M. Kimes 9 Copyright (c) 2008 Steven H.Levine 10 11 05 Jan 08 SHL Sync 12 13 ***********************************************************************/ 14 15 #include <string.h> 16 1 17 #define INCL_DOS 2 18 #define INCL_WIN 19 #define INCL_LONGLONG 3 20 4 #include <os2.h>5 #include <stdarg.h>6 #include <stdio.h>7 #include <stdlib.h>8 #include <string.h>9 #include <ctype.h>10 #include <direct.h>11 #include "dll\fm3dll.h"12 21 #include "dll\tools.h" 13 22 #include "dll\version.h" 23 #include "dll\fm3dll.h" 14 24 15 25 int main(int argc, char *argv[]) 16 26 { 17 18 27 HAB hab; 19 28 HMQ hmq; -
trunk/fm4.c
r551 r907 1 2 /*********************************************************************** 3 4 $Id$ 5 6 fm/2 lite applet 7 8 Copyright (c) 1993-98 M. Kimes 9 Copyright (c) 2008 Steven H.Levine 10 11 05 Jan 08 SHL Sync 12 13 ***********************************************************************/ 14 15 #include <string.h> 16 1 17 #define INCL_DOS 2 18 #define INCL_WIN 19 #define INCL_LONGLONG 3 20 4 #include <os2.h>5 #include <stdarg.h>6 #include <stdio.h>7 #include <stdlib.h>8 #include <string.h>9 #include <ctype.h>10 #include <direct.h>11 #include "dll\fm3dll.h"12 21 #include "dll\tools.h" 13 22 #include "dll\version.h" 23 #include "dll\fm3dll.h" 14 24 15 25 int main(int argc, char *argv[]) 16 26 { 17 18 27 HAB hab; 19 28 HMQ hmq; -
trunk/global.c
r551 r907 1 2 /*********************************************************************** 3 4 $Id$ 5 6 See all files applet 7 8 Copyright (c) 1993-98 M. Kimes 9 Copyright (c) 2008 Steven H.Levine 10 11 05 Jan 08 SHL Sync 12 13 ***********************************************************************/ 14 15 #include <string.h> 16 1 17 #define INCL_DOS 2 18 #define INCL_WIN 3 19 4 #include <os2.h>5 #include <stdarg.h>6 #include <stdio.h>7 #include <stdlib.h>8 #include <string.h>9 #include <ctype.h>10 20 #include "dll\fm3dll.h" 11 21 #include "dll\fm3str.h" … … 13 23 int main(int argc, char *argv[]) 14 24 { 15 16 25 HAB hab; 17 26 HMQ hmq; -
trunk/ini.c
r551 r907 1 2 /*********************************************************************** 3 4 $Id$ 5 6 Ini view/edit applet 7 8 Copyright (c) 1993-98 M. Kimes 9 Copyright (c) 2008 Steven H.Levine 10 11 05 Jan 08 SHL Sync 12 13 ***********************************************************************/ 14 1 15 #define INCL_DOS 2 16 #define INCL_WIN 3 17 4 #include <os2.h>5 #include <stdarg.h>6 #include <stdio.h>7 #include <stdlib.h>8 #include <string.h>9 #include <ctype.h>10 18 #include "dll\fm3dll.h" 11 19 12 20 int main(int argc, char *argv[]) 13 21 { 14 15 22 HAB hab; 16 23 HMQ hmq; -
trunk/killproc.c
r551 r907 1 2 /*********************************************************************** 3 4 $Id$ 5 6 Process killer applet 7 8 Copyright (c) 1993-98 M. Kimes 9 Copyright (c) 2008 Steven H.Levine 10 11 05 Jan 08 SHL Sync 12 13 ***********************************************************************/ 14 1 15 #define INCL_DOS 2 16 #define INCL_WIN 3 17 4 #include <os2.h> 5 #include <stdarg.h> 6 #include <stdio.h> 7 #include <stdlib.h> 8 #include <string.h> 9 #include <ctype.h> 18 #include "dll\fm3dlg.h" 10 19 #include "dll\fm3dll.h" 11 #include "dll\fm3dlg.h"12 20 13 21 int main(int argc, char *argv[]) 14 22 { 15 16 23 HAB hab; 17 24 HMQ hmq; -
trunk/makefile_pre.mk
r903 r907 56 56 # -wcd14 no reference to symbol 57 57 # -wcd726 no reference to formal parameter 58 # -we treat warnings as errors 58 59 # -wx max warnings 59 60 # -zfp disable fs use … … 63 64 64 65 # We always compile with debug info to avoid needed a full rebuild just to debug 65 CFLAGS = -bt=os2 -mf -bm -d2 -olirs -s -j -w x -zfp -zgp -zp4 -zq -hd66 CFLAGS = -bt=os2 -mf -bm -d2 -olirs -s -j -we -wx -zfp -zgp -zp4 -zq -hd 66 67 67 68 LFLAGS = sys os2v2_pm op quiet op verbose op cache op caseexact op map -
trunk/sysinfo.c
r551 r907 1 2 /*********************************************************************** 3 4 $Id$ 5 6 System information applet 7 8 Copyright (c) 1993-98 M. Kimes 9 Copyright (c) 2008 Steven H.Levine 10 11 05 Jan 08 SHL Sync 12 13 ***********************************************************************/ 14 1 15 #define INCL_DOS 2 16 #define INCL_WIN 3 17 4 #include <os2.h> 5 #include <stdarg.h> 6 #include <stdio.h> 7 #include <stdlib.h> 8 #include <string.h> 9 #include <ctype.h> 18 #include "dll\fm3dlg.h" 10 19 #include "dll\fm3dll.h" 11 #include "dll\fm3dlg.h"12 20 13 21 int main(int argc, char *argv[]) 14 22 { 15 16 23 HAB hab; 17 24 HMQ hmq; -
trunk/undel.c
r862 r907 14 14 ***********************************************************************/ 15 15 16 #include <stdarg.h>17 #include <stdio.h>18 #include <stdlib.h>19 16 #include <string.h> 20 #include <ctype.h>21 17 22 18 #define INCL_DOS 23 #define INCL_WIN24 #include <os2.h>25 19 20 #include "dll\fm3dlg.h" 26 21 #include "dll\fm3dll.h" 27 #include "dll\fm3dlg.h"28 22 29 23 int main(int argc, char *argv[]) -
trunk/vcollect.c
r551 r907 1 2 /*********************************************************************** 3 4 $Id$ 5 6 Collector applet 7 8 Copyright (c) 1993-98 M. Kimes 9 Copyright (c) 2007, 2008 Steven H.Levine 10 11 05 Jan 08 SHL Sync 12 13 ***********************************************************************/ 14 15 #include <string.h> 16 1 17 #define INCL_DOS 2 18 #define INCL_WIN 3 19 4 #include <os2.h> 5 #include <stdarg.h> 6 #include <stdio.h> 7 #include <stdlib.h> 8 #include <string.h> 9 #include <ctype.h> 20 #include "dll\fm3str.h" 10 21 #include "dll\fm3dll.h" 11 #include "dll\fm3str.h"12 22 13 23 int main(int argc, char *argv[]) 14 24 { 15 16 25 HAB hab; 17 26 HMQ hmq; -
trunk/vdir.c
r551 r907 1 2 /*********************************************************************** 3 4 $Id$ 5 6 INF directory viewer applet 7 8 Copyright (c) 1993-98 M. Kimes 9 Copyright (c) 2007, 2008 Steven H.Levine 10 11 05 Jan 08 SHL Sync 12 13 ***********************************************************************/ 14 15 #include <string.h> 16 1 17 #define INCL_DOS 2 18 #define INCL_WIN 3 19 4 #include <os2.h>5 #include <stdarg.h>6 #include <stdio.h>7 #include <stdlib.h>8 #include <string.h>9 #include <ctype.h>10 20 #include "dll\fm3dll.h" 11 21 12 22 int main(int argc, char *argv[]) 13 23 { 14 15 24 HAB hab; 16 25 HMQ hmq; -
trunk/viewinfs.c
r753 r907 13 13 ***********************************************************************/ 14 14 15 #include <stdarg.h>16 #include <stdio.h>17 #include <stdlib.h>18 #include <string.h>19 #include <ctype.h>20 21 15 #define INCL_DOS // DosSleep 22 16 #define INCL_WIN 23 #include <os2.h>24 17 18 #include "dll\fm3dlg.h" 25 19 #include "dll\fm3dll.h" 26 #include "dll\fm3dlg.h"27 20 28 21 int main(int argc, char *argv[]) -
trunk/vtree.c
r766 r907 1 2 /*********************************************************************** 3 4 $Id$ 5 6 Tree viewer applet 7 8 Copyright (c) 1993-98 M. Kimes 9 Copyright (c) 2008 Steven H.Levine 10 11 05 Jan 08 SHL Sync 12 13 ***********************************************************************/ 14 15 #include <stdlib.h> 16 #include <string.h> 17 1 18 #define INCL_DOS 2 19 #define INCL_WIN 3 20 4 #include <os2.h>5 #include <stdarg.h>6 #include <stdio.h>7 #include <stdlib.h>8 #include <string.h>9 #include <ctype.h>10 21 #include "dll\fm3dll.h" 11 22 12 23 int main(int argc, char *argv[]) 13 24 { 14 15 25 HAB hab; 16 26 HMQ hmq;
Note:
See TracChangeset
for help on using the changeset viewer.