--- np2/macosx/macossub.cpp 2003/10/16 17:59:36 1.1 +++ np2/macosx/macossub.cpp 2003/11/03 10:19:43 1.2 @@ -152,6 +152,37 @@ void file_listclose(void *hdl) { } } +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); +} + #else typedef struct { @@ -246,5 +277,9 @@ void file_listclose(void *hdl) { } } +bool getLongFileName(char* dst, const char* path) { + return(false); +} #endif +