|
|
| version 1.1.1.1, 2003/10/16 17:59:36 | version 1.3, 2003/11/14 10:32:36 |
|---|---|
| Line 20 UINT32 macos_gettick(void) { | Line 20 UINT32 macos_gettick(void) { |
| UnsignedWide current; | UnsignedWide current; |
| Microseconds(¤t); | Microseconds(¤t); |
| return((UINT32)(current.lo / 1000)); | return((UINT32)((current.hi * 4294967) + (current.lo / 1000))); |
| } | } |
| Line 152 void file_listclose(void *hdl) { | Line 152 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 | #else |
| typedef struct { | typedef struct { |
| Line 246 void file_listclose(void *hdl) { | Line 277 void file_listclose(void *hdl) { |
| } | } |
| } | } |
| bool getLongFileName(char* dst, const char* path) { | |
| return(false); | |
| } | |
| #endif | #endif |