Changeset 1545
- Timestamp:
- Oct 24, 2010, 12:00:47 AM (15 years ago)
- Location:
- trunk/dll
- Files:
-
- 10 edited
-
arccnrs.c (modified) (5 diffs)
-
chklist.c (modified) (3 diffs)
-
comp.c (modified) (3 diffs)
-
draglist.c (modified) (4 diffs)
-
getnames.c (modified) (3 diffs)
-
inis.c (modified) (5 diffs)
-
mkdir.c (modified) (2 diffs)
-
pathutil.c (modified) (2 diffs)
-
pathutil.h (modified) (2 diffs)
-
rename.c (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/dll/arccnrs.c
r1544 r1545 83 83 17 JAN 10 GKY Changes to get working with Watcom 1.9 Beta (1/16/10). Mostly cast CHAR CONSTANT * as CHAR *. 84 84 15 Apr 10 JBS Ticket 422: Stop hang when open archive gets deleted or moved 85 23 Oct 10 GKY Add ForwardslashToBackslash function to streamline code 85 86 86 87 ***********************************************************************/ … … 1624 1625 memmove(s, p + 1, strlen(p + 1)); 1625 1626 } 1626 sprintf(WaitChild->filename, "%s\\%s", dcd->workdir, s); 1627 p = WaitChild->filename; 1628 while (*p) { 1629 if (*p == '/') 1630 *p = '\\'; 1631 p++; 1632 } 1627 sprintf(WaitChild->filename, "%s\\%s", dcd->workdir, s); 1628 ForwardslashToBackslash(WaitChild->filename); 1633 1629 free(s); 1634 1630 WaitChild->RunFlags = SEPARATE | ASYNCHRONOUS | WAIT | … … 1923 1919 CHAR *temp, *p; 1924 1920 1925 temp = li->list[x]; 1926 p = temp; 1927 while (*p) { 1928 if (*p == '/') 1929 *p = '\\'; 1930 p++; 1931 } 1921 temp = li->list[x]; 1922 ForwardslashToBackslash(temp); 1932 1923 p = xmalloc(strlen(temp) + strlen(li->targetpath) + 2, 1933 1924 pszSrcFile, __LINE__); … … 2161 2152 CHAR **list2 = NULL, fullname[CCHMAXPATH * 2], *p; 2162 2153 2163 for (x = 0; li->list[x]; x++) { 2164 p = li->list[x]; 2165 while (*p) { 2166 if (*p == '/') 2167 *p = '\\'; 2168 p++; 2169 } 2154 for (x = 0; li->list[x]; x++) { 2155 ForwardslashToBackslash(li->list[x]); 2170 2156 BldFullPathName(fullname, dcd->directory, li->list[x]); 2171 2157 if (IsFile(fullname) != -1) … … 3622 3608 FIL_QUERYFULLNAME, fullname, sizeof(fullname))) 3623 3609 strcpy(fullname, arcname); 3624 p = fullname; 3625 while (*p) { 3626 if (*p == '/') 3627 *p = '\\'; 3628 p++; 3629 } 3610 ForwardslashToBackslash(fullname); 3630 3611 if (!info) 3631 3612 info = find_type(fullname, arcsighead); -
trunk/dll/chklist.c
r1498 r1545 15 15 29 Nov 08 GKY Add flag to tell CheckListProc file is in an archive so it won't try to open it. 16 16 17 JAN 10 GKY Changes to get working with Watcom 1.9 Beta (1/16/10). Mostly cast CHAR CONSTANT * as CHAR *. 17 23 Oct 10 GKY Add ForwardslashToBackslash function to streamline code 17 18 18 19 ***********************************************************************/ … … 42 43 #include "walkem.h" // WalkAllDlgProc 43 44 #include "misc.h" // PaintRecessedWindow 45 #include "pathutil.h" // ForwardslashToBackslash 44 46 45 47 #pragma data_seg(DATA1) … … 474 476 filename, sizeof(filename))) { 475 477 if (!DosQueryPathInfo(filename, 476 FIL_STANDARD, &fs3, sizeof(fs3))) { 477 p = filename; 478 while (*p) { 479 if (*p == '/') 480 *p = '\\'; 481 p++; 482 } 478 FIL_STANDARD, &fs3, sizeof(fs3))) { 479 ForwardslashToBackslash(filename); 483 480 strcpy(cl->prompt, filename); 484 481 PostMsg(hwnd, UM_UNDO, MPVOID, MPVOID); -
trunk/dll/comp.c
r1544 r1545 74 74 27 Sep 09 SHL Drop unused reset logic 75 75 17 JAN 10 GKY Changes to get working with Watcom 1.9 Beta (1/16/10). Mostly cast CHAR CONSTANT * as CHAR *. 76 23 Oct 10 GKY Add ForwardslashToBackslash function to streamline code 76 77 77 78 ***********************************************************************/ … … 220 221 SNAPSTUFF *sf = (SNAPSTUFF *)pargs; 221 222 FILE *fp; 222 CHAR *p;223 223 CHAR *modew = "w"; 224 224 … … 226 226 if (*sf->dirname && *sf->filename) { 227 227 priority_normal(); 228 p = sf->dirname; 229 while (*p) { 230 if (*p == '/') 231 *p = '\\'; 232 p++; 233 } 234 if (*(p - 1) != '\\') { 235 *p = '\\'; 236 p++; 237 } 228 ForwardslashToBackslash(sf->dirname); 229 AddBackslashToPath(sf->dirname); 238 230 fp = xfopen(sf->filename, modew, pszSrcFile, __LINE__, FALSE); 239 231 if (fp) { -
trunk/dll/draglist.c
r1533 r1545 26 26 items from a pmmail mail message (PMERR_INVALID_PARAMETER) 27 27 17 JAN 10 GKY Changes to get working with Watcom 1.9 Beta (1/16/10). Mostly cast CHAR CONSTANT * as CHAR *. 28 23 Oct 10 GKY Add ForwardslashToBackslash function to streamline code 28 29 29 30 ***********************************************************************/ … … 49 50 #include "wrappers.h" // xrealloc 50 51 #include "fortify.h" 52 #include "pathutil.h" // ForwardslashToBackslash 51 53 52 54 // Data definitions … … 158 160 !DosQueryPathInfo(filename, FIL_STANDARD, &fs3, sizeof(fs3))) { 159 161 strcpy(szDir, filename); 160 p = szDir; 161 while (*p) { 162 if (*p == '/') 163 *p = '\\'; 164 p++; 165 } 162 ForwardslashToBackslash(szDir); 166 163 p = strrchr(szDir, '\\'); 167 164 if (p) { … … 814 811 pdinfoCurrent = pdinfoOld = DrgAllocDraginfo(1); 815 812 if (pdinfoCurrent) { 816 strcpy(szDir, pci->pszFileName); 817 p = szDir; 818 while (*p) { 819 if (*p == '/') 820 *p = '\\'; 821 p++; 822 } 813 strcpy(szDir, pci->pszFileName); 814 ForwardslashToBackslash(szDir); 823 815 p = strrchr(szDir, '\\'); 824 816 if (p) { -
trunk/dll/getnames.c
r1498 r1545 14 14 28 Jun 09 GKY Added AddBackslashToPath() to remove repeatative code. 15 15 17 JAN 10 GKY Changes to get working with Watcom 1.9 Beta (1/16/10). Mostly cast CHAR CONSTANT * as CHAR *. 16 23 Oct 10 GKY Add ForwardslashToBackslash function to streamline code 16 17 17 18 ***********************************************************************/ … … 316 317 return FALSE; 317 318 } 318 p = filename; 319 while (*p) { 320 if (*p == '/') 321 *p = '\\'; 322 p++; 323 } 319 ForwardslashToBackslash(filename); 324 320 if (*filename) 325 321 strcpy(lastfilename, filename); … … 397 393 } 398 394 } 399 p = filename; 400 while (*p) { 401 if (*p == '/') 402 *p = '\\'; 403 p++; 404 } 395 ForwardslashToBackslash(filename); 405 396 if (*filename) 406 397 strcpy(lastfilename, filename); -
trunk/dll/inis.c
r1544 r1545 37 37 12 Sep 09 GKY Add FM3.INI User ini and system ini to submenu for view ini 38 38 17 JAN 10 GKY Changes to get working with Watcom 1.9 Beta (1/16/10). Mostly cast CHAR CONSTANT * as CHAR *. 39 23 Oct 10 GKY Add ForwardslashToBackslash function to streamline code 39 40 40 41 ***********************************************************************/ … … 1002 1003 ininame = INSTDATA(hwnd); 1003 1004 if (ininame && *ininame) { 1004 strcpy(filename, ininame); 1005 p = filename; 1006 while (*p) { 1007 if (*p == '/') 1008 *p = '\\'; 1009 p++; 1010 } 1005 strcpy(filename, ininame); 1006 ForwardslashToBackslash(filename); 1011 1007 p = strrchr(filename, '\\'); 1012 1008 if (p) { … … 1111 1107 ininame = INSTDATA(hwnd); 1112 1108 if (ininame && *ininame) { 1113 strcpy(filename, ininame); 1114 p = filename; 1115 while (*p) { 1116 if (*p == '/') 1117 *p = '\\'; 1118 p++; 1119 } 1109 strcpy(filename, ininame); 1110 ForwardslashToBackslash(filename); 1120 1111 p = strrchr(filename, '\\'); 1121 1112 if (p) { … … 2512 2503 // 09 Jan 08 SHL fixme to complain 2513 2504 CHAR filename[CCHMAXPATH], *p; 2514 2515 strcpy(filename, inidata->ininame); 2516 p = filename; 2517 while (*p) { 2518 if (*p == '/') 2519 *p = '\\'; 2520 p++; 2521 } 2505 strcpy(filename, inidata->ininame); 2506 ForwardslashToBackslash(filename); 2522 2507 p = strrchr(filename, '\\'); 2523 2508 if (p) { … … 2654 2639 HINI hINI; 2655 2640 2656 strcpy(filename, inidata->ininame); 2657 p = filename; 2658 while (*p) { 2659 if (*p == '/') 2660 *p = '\\'; 2661 p++; 2662 } 2641 strcpy(filename, inidata->ininame); 2642 ForwardslashToBackslash(filename); 2663 2643 p = strrchr(filename, '\\'); 2664 2644 if (p) { -
trunk/dll/mkdir.c
r1438 r1545 14 14 25 Dec 08 GKY Add code to allow write verify to be turned off on a per drive basis 15 15 28 Jun 09 GKY Added AddBackslashToPath() to remove repeatative code. 16 23 Oct 10 GKY Add ForwardslashToBackslash function to streamline code 16 17 17 18 ***********************************************************************/ … … 57 58 if (DosQueryPathInfo(dir, FIL_QUERYFULLNAME, s, sizeof(s))) 58 59 strcpy(s, dir); 59 p = s; 60 while (*p) { 61 if (*p == '/') 62 *p = '\\'; 63 p++; 64 } 60 ForwardslashToBackslash(s); 65 61 p = s; 66 62 do { -
trunk/dll/pathutil.c
r1480 r1545 17 17 28 Jun 09 GKY Added AddBackslashToPath() to remove repeatative code 18 18 12 Jul 09 GKY Add xDosQueryAppType and xDosAlloc... to allow FM/2 to load in high memory 19 23 Oct 10 GKY Add ForwardslashToBackslash function to streamline code 19 20 20 21 ***********************************************************************/ … … 42 43 43 44 static PSZ pszSrcFile = __FILE__; 45 46 PSZ ForwardslashToBackslash(PSZ pszPathName) 47 { 48 CHAR *p; 49 50 p = pszPathName; 51 while (*p) { 52 if (*p == '/') 53 *p = '\\'; 54 p++; 55 } 56 return pszPathName; 57 } 44 58 45 59 PSZ AddBackslashToPath(PSZ pszPathName) -
trunk/dll/pathutil.h
r1438 r1545 12 12 29 Feb 08 GKY Changes to enable user settable command line length 13 13 28 Jun 09 GKY Added AddBackslashToPath() to remove repeatative code. 14 23 Oct 10 GKY Add ForwardslashToBackslash function to streamline code 14 15 15 16 ***********************************************************************/ … … 23 24 #endif 24 25 26 PSZ ForwardslashToBackslash(PSZ pszPathName); 25 27 PSZ AddBackslashToPath(PSZ pszPathName); 26 28 PSZ BldFullPathName(PSZ pszFullPathName, PCSZ pszPathName, PCSZ pszFileName); -
trunk/dll/rename.c
r1544 r1545 19 19 08 Mar 09 GKY Removed variable aurguments from docopyf and unlinkf (not used) 20 20 17 JAN 10 GKY Changes to get working with Watcom 1.9 Beta (1/16/10). Mostly cast CHAR CONSTANT * as CHAR *. 21 23 Oct 10 GKY Add ForwardslashToBackslash function to streamline code 21 22 22 23 ***********************************************************************/ … … 45 46 #include "info.h" // driveflags 46 47 #include "wrappers.h" // xfopen 48 #include "pathutil.h" // ForwardslashToBackslash 47 49 48 50 static PSZ pszSrcFile = __FILE__; … … 97 99 INT sourceexists = 0, targetexists = 0, 98 100 sourcenewer = 0, sourcesmaller = 0; 99 100 p = mv->target; 101 while (*p) { 102 if (*p == '/') 103 *p = '\\'; 104 p++; 105 } 101 ForwardslashToBackslash(mv->target); 106 102 if (!MakeFullName(mv->target)) 107 103 WinSetDlgItemText(hwnd, REN_TARGET, mv->target);
Note:
See TracChangeset
for help on using the changeset viewer.
