From: <lab...@us...> - 2015-05-06 16:08:18
|
Revision: 1523 http://sourceforge.net/p/opengtoolkit/svn/1523 Author: labviewer Date: 2015-05-06 16:08:15 +0000 (Wed, 06 May 2015) Log Message: ----------- Make code compile on Mac Modified Paths: -------------- trunk/lvzip/c_source/lvutil.c trunk/lvzip/c_source/lvutil.h Modified: trunk/lvzip/c_source/lvutil.c =================================================================== --- trunk/lvzip/c_source/lvutil.c 2015-05-03 19:14:24 UTC (rev 1522) +++ trunk/lvzip/c_source/lvutil.c 2015-05-06 16:08:15 UTC (rev 1523) @@ -178,15 +178,15 @@ if (!hfsPath) return mgArgErr; - if (*hsfPath) - LStrLen(**hsfPath) = 0; + if (*hfsPath) + LStrLen(**hfsPath) = 0; - urlRef = CFURLCreateFromFileSystemRepresentation(NULL, posixPath, len, false); + urlRef = CFURLCreateFromFileSystemRepresentation(NULL, posixPath, len, isDir); if (!urlRef) { return mFullErr; } - hsfRef = CFURLCopyFileSystemPath(urlRef, kCFURLHFSPathStyle); + hfsRef = CFURLCopyFileSystemPath(urlRef, kCFURLHFSPathStyle); CFRelease(urlRef); if (hfsRef) { @@ -199,7 +199,7 @@ err = NumericArrayResize(uB, 1, (UHandle*)hfsPath, len + 1); if (!err) { - if (CFStringGetBytes(hsfRef, range, encoding, 0, false, LStrBuf(**hfsPath), len, &len) > 0) + if (CFStringGetBytes(hfsRef, range, encoding, 0, false, LStrBuf(**hfsPath), len, &len) > 0) { LStrBuf(**hfsPath)[len] = 0; LStrLen(**hfsPath) = len; @@ -970,12 +970,12 @@ { MgErr err = mgNoErr; #if usesHFSPath - LStrHandle hsfPath = NULL; + LStrHandle hfsPath = NULL; /* Convert the posix path to an HFS path */ err = ConvertFromPosixPath(str, len, &hfsPath, isDir); if (!err) { - err = FTextToPath(LStrBuf(*hfsPath), LStrLen(*hsfPath), path); + err = FTextToPath(LStrBuf(*hfsPath), LStrLen(*hfsPath), path); } #else Unused(isDir); Modified: trunk/lvzip/c_source/lvutil.h =================================================================== --- trunk/lvzip/c_source/lvutil.h 2015-05-03 19:14:24 UTC (rev 1522) +++ trunk/lvzip/c_source/lvutil.h 2015-05-06 16:08:15 UTC (rev 1523) @@ -616,6 +616,7 @@ /* Convert the path into a string representation for the current platform */ LibAPI(MgErr) LVPath_ToText(Path path, LStrHandle *str); +LibAPI(MgErr) LVPath_FromText(CStr str, int32 len, Path *path, LVBoolean isDir); /* Check if the file path points to has a resource fork */ LibAPI(MgErr) LVPath_HasResourceFork(Path path, LVBoolean *hasResFork, uInt32 *sizeLow, uInt32 *sizeHigh); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |