|
|
| version 1.5, 2003/10/28 16:44:44 | version 1.6, 2003/11/03 10:19:43 |
|---|---|
| Line 7 | Line 7 |
| #include "fddfile.h" | #include "fddfile.h" |
| #include "diskdrv.h" | #include "diskdrv.h" |
| static bool getLongFileName(char* dst, const char* path); | |
| UINT sys_updates; | UINT sys_updates; |
| Line 108 void sysmng_updatecaption(BYTE flag) { | Line 106 void sysmng_updatecaption(BYTE flag) { |
| SetWTitle(hWndMain, str); | SetWTitle(hWndMain, str); |
| #endif | #endif |
| } | } |
| static bool getLongFileName(char* dst, const char* path) { | |
| FSSpec fss; | |
| Str255 fname; | |
| FSRef fref; | |
| char buffer[1024]; | |
| char *ret, *val; | |
| if (*path == '\0') { | |
| return(false); | |
| } | |
| mkstr255(fname, path); | |
| if (FSMakeFSSpec(0, 0, fname, &fss) != noErr) { | |
| return(false); | |
| } | |
| if (FSpMakeFSRef(&fss, &fref) != noErr) { | |
| return(false); | |
| } | |
| if (FSRefMakePath(&fref, (UInt8*)buffer, 1024) != noErr) { | |
| return(false); | |
| } | |
| val = buffer; | |
| ret = val; | |
| while(*val != '\0') { | |
| if (*val++ == '/') { | |
| ret = val; | |
| } | |
| } | |
| strcpy(dst, ret); | |
| return(true); | |
| } | |