Rev 371 | Rev 441 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 371 | Rev 433 | ||
---|---|---|---|
Line 32... | Line 32... | ||
32 | #include "compat_string.h" |
32 | #include "compat_string.h" |
33 | 33 | ||
34 | 34 | ||
35 | Boolean fileHasExtension(StandardFileReply* sfr, const char* extension) { |
35 | Boolean fileHasExtension(StandardFileReply* sfr, const char* extension) { |
36 | char name[MAX_PATH + 1]; |
36 | char name[MAX_PATH + 1]; |
- | 37 | // TODO: strcasecmp not defined in OpenWatcom 2.0 ? |
|
37 | return sfr->nFileExtension && !strcasecmp(myp2cstrcpy(name, sfr->sfFile.name) + sfr->nFileExtension - 1, extension); |
38 | return sfr->nFileExtension && !strcasecmp(myp2cstrcpy(name, sfr->sfFile.name) + sfr->nFileExtension - 1, extension); |
38 | } |
39 | } |
39 | 40 | ||
40 | Boolean choosefiletypes(StringPtr prompt,StandardFileReply *sfr,NavReplyRecord *reply, |
41 | Boolean choosefiletypes(StringPtr prompt,StandardFileReply *sfr,NavReplyRecord *reply, |
41 | OSType types[],int ntypes,const char *lpstrFilter,HWND hwndOwner){ |
42 | OSType types[],int ntypes,const char *lpstrFilter,HWND hwndOwner){ |
- | 43 | UNREFERENCED_PARAMETER(ntypes); |
|
42 | return choosefile(prompt,sfr,reply,types[0],lpstrFilter,hwndOwner); |
44 | return choosefile(prompt,sfr,reply,types[0],lpstrFilter,hwndOwner); |
43 | } |
45 | } |
44 | 46 | ||
45 | Boolean choosefile(StringPtr prompt,StandardFileReply *sfr,NavReplyRecord *reply,OSType type,const char *lpstrFilter,HWND hwndOwner){ |
47 | Boolean choosefile(StringPtr prompt,StandardFileReply *sfr,NavReplyRecord *reply,OSType type,const char *lpstrFilter,HWND hwndOwner){ |
46 | OPENFILENAME ofn; |
48 | OPENFILENAME ofn; |
47 | char file[MAX_PATH]={0}; |
49 | char file[MAX_PATH]={0}; |
48 | char title[0x100]; |
50 | char title[0x100]; |
49 | 51 | ||
- | 52 | UNREFERENCED_PARAMETER(type); |
|
- | 53 | UNREFERENCED_PARAMETER(reply); |
|
- | 54 | ||
50 | ZeroMemory(&ofn, sizeof(ofn)); |
55 | ZeroMemory(&ofn, sizeof(ofn)); |
51 | 56 | ||
52 | ofn.lStructSize = sizeof(ofn); |
57 | ofn.lStructSize = sizeof(ofn); |
53 | ofn.hwndOwner = hwndOwner; |
58 | ofn.hwndOwner = hwndOwner; |
54 | ofn.lpstrFilter = lpstrFilter ; |
59 | ofn.lpstrFilter = lpstrFilter ; |
Line 80... | Line 85... | ||
80 | HWND hwndOwner){ |
85 | HWND hwndOwner){ |
81 | OPENFILENAME ofn; |
86 | OPENFILENAME ofn; |
82 | char file[MAX_PATH]; |
87 | char file[MAX_PATH]; |
83 | char title[0x100]; |
88 | char title[0x100]; |
84 | 89 | ||
- | 90 | UNREFERENCED_PARAMETER(fileCreator); |
|
- | 91 | UNREFERENCED_PARAMETER(reply); |
|
- | 92 | UNREFERENCED_PARAMETER(fileType); |
|
- | 93 | ||
85 | ZeroMemory(&ofn, sizeof(ofn)); |
94 | ZeroMemory(&ofn, sizeof(ofn)); |
86 | 95 | ||
87 | ofn.lStructSize = sizeof(ofn); |
96 | ofn.lStructSize = sizeof(ofn); |
88 | ofn.hwndOwner = hwndOwner; |
97 | ofn.hwndOwner = hwndOwner; |
89 | ofn.lpstrFilter = lpstrFilter; |
98 | ofn.lpstrFilter = lpstrFilter; |
Line 108... | Line 117... | ||
108 | 117 | ||
109 | return sfr->sfGood = false; |
118 | return sfr->sfGood = false; |
110 | } |
119 | } |
111 | 120 | ||
112 | OSErr completesave(NavReplyRecord *reply){ |
121 | OSErr completesave(NavReplyRecord *reply){ |
- | 122 | UNREFERENCED_PARAMETER(reply); |
|
113 | return noErr; |
123 | return noErr; |
114 | } |
124 | } |