/trunk/.gitattributes |
---|
24,6 → 24,7 |
*.docx binary linguist-documentation |
*.exe binary |
*.exp text eol=crlf |
*.ffx binary |
*.h text eol=crlf linguist-language=C |
*.hpp text eol=crlf linguist-language=C++ |
*.html text eol=crlf linguist-language=HTML |
/trunk/ff.h |
---|
104,7 → 104,6 |
Boolean readfile_afs_pff(StandardFileReply* sfr, char** reason); |
Boolean readfile_ffx(StandardFileReply* sfr, char** reason); |
Boolean readPARM(Ptr h,PARM_T *parm,char **reasonstr,int fromwin); |
Boolean fileHasExtension(StandardFileReply* sfr, const char* extension); // TODO: find a new home for this method? Because it can be also used for saving |
// from save.c |
OSErr saveparams(Handle h); |
168,12 → 167,4 |
#define BIGDOC_WHOLE_SIZE(x) ((x)->bigDocumentData->wholeSize32) |
#define WHOLE_SIZE(x) ((x)->wholeSize) |
#ifdef _MSC_VER |
// Microsoft dumbassery |
#define strcasecmp _stricmp |
#define snprintf _snprintf |
#endif /* _MSC_VER */ |
#endif /* INCLUDED_FF_H */ |
/trunk/read.c |
---|
443,21 → 443,6 |
return NULL; |
} |
Boolean fileHasExtension(StandardFileReply *sfr, const char* extension) { |
#ifdef WIN_ENV |
char name[MAX_PATH+1]; |
return sfr->nFileExtension && !strcasecmp(myp2cstrcpy(name,sfr->sfFile.name) + sfr->nFileExtension - 1,extension); |
#else |
char name[1025]; // https://stackoverflow.com/questions/1295135/longest-pathname-string-in-mac-os-x-hfs |
char* s = myp2cstrcpy(name,sfr->sfFile.name); |
return strcmp(s + strlen(s) - strlen(extension), extension) == 0; |
#endif |
} |
Boolean readfile_afs_pff(StandardFileReply *sfr,char **reason){ |
FILEREF r; |
Handle h; |
/trunk/telegraphics_common/adobeplugin/world.h |
---|
111,4 → 111,10 |
#define ATTRIBUTE_PACKED |
#endif |
#ifdef _MSC_VER |
// Microsoft dumbassery |
#define strcasecmp _stricmp |
#define snprintf _snprintf |
#endif /* _MSC_VER */ |
#endif |
/trunk/telegraphics_common/tt/choosefile.h |
---|
44,6 → 44,8 |
} NavReplyRecord; |
#endif |
Boolean fileHasExtension(StandardFileReply* sfr, const char* extension); |
Boolean customchoosefile_nav(FSSpec *fss,ScriptCode *script, |
OSType tlist[], StringPtr extlist[],Boolean *premult); |
/trunk/telegraphics_common/tt/choosefile_mac.c |
---|
18,6 → 18,7 |
*/ |
#include "choosefile.h" |
#include "str.h" |
#include <codefragments.h> |
#include <navigation.h> |
28,6 → 29,12 |
#define HAS_NAVSERVICES (NavChooseFile != kUnresolvedCFragSymbolAddress) |
#endif |
Boolean fileHasExtension(StandardFileReply *sfr, const char* extension) { |
char name[1025]; // https://stackoverflow.com/questions/1295135/longest-pathname-string-in-mac-os-x-hfs |
char* s = myp2cstrcpy(name,sfr->sfFile.name); |
return strcmp(s + strlen(s) - strlen(extension), extension) == 0; |
} |
Boolean choosefile(StringPtr prompt,StandardFileReply *sfr,NavReplyRecord *reply, |
OSType type,const char *lpstrFilter){ |
return (HAS_NAVSERVICES ? choosefile_nav : choosefile_sf) |
/trunk/telegraphics_common/tt/choosefile_win.c |
---|
25,11 → 25,18 |
#include <windows.h> |
#include "world.h" |
#include "choosefile.h" |
#include "str.h" |
#include "dbg.h" |
#include "compat_string.h" |
Boolean fileHasExtension(StandardFileReply* sfr, const char* extension) { |
char name[MAX_PATH + 1]; |
return sfr->nFileExtension && !strcasecmp(myp2cstrcpy(name, sfr->sfFile.name) + sfr->nFileExtension - 1, extension); |
} |
Boolean choosefiletypes(StringPtr prompt,StandardFileReply *sfr,NavReplyRecord *reply, |
OSType types[],int ntypes,const char *lpstrFilter,HWND hwndOwner){ |
return choosefile(prompt,sfr,reply,types[0],lpstrFilter,hwndOwner); |
/trunk/visual_studio/FilterFoundry.vcxproj |
---|
260,6 → 260,8 |
<ClInclude Include="..\preview.h" /> |
<ClInclude Include="..\scripting.h" /> |
<ClInclude Include="..\symtab.h" /> |
<ClInclude Include="..\telegraphics_common\adobeplugin\entry.h" /> |
<ClInclude Include="..\telegraphics_common\adobeplugin\world.h" /> |
<ClInclude Include="..\telegraphics_common\tt\choosefile.h" /> |
<ClInclude Include="..\telegraphics_common\tt\compat_string.h" /> |
<ClInclude Include="..\telegraphics_common\tt\compat_win.h" /> |
/trunk/visual_studio/FilterFoundry.vcxproj.filters |
---|
81,6 → 81,12 |
<ClInclude Include="..\ff.h"> |
<Filter>Headerdateien</Filter> |
</ClInclude> |
<ClInclude Include="..\telegraphics_common\adobeplugin\entry.h"> |
<Filter>Headerdateien</Filter> |
</ClInclude> |
<ClInclude Include="..\telegraphics_common\adobeplugin\world.h"> |
<Filter>Headerdateien</Filter> |
</ClInclude> |
</ItemGroup> |
<ItemGroup> |
<ClCompile Include="..\telegraphics_common\adobeplugin\dllmain.c"> |