From: Rolf K. <lab...@us...> - 2006-03-01 10:17:15
|
Update of /cvsroot/opengtoolkit/lvzip/c_source In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11227/c_source Modified Files: macbin.c Log Message: Some theoretical improvment, not yet tested. Index: macbin.c =================================================================== RCS file: /cvsroot/opengtoolkit/lvzip/c_source/macbin.c,v retrieving revision 1.20 retrieving revision 1.21 diff -C2 -d -r1.20 -r1.21 *** macbin.c 1 Mar 2006 09:55:33 -0000 1.20 --- macbin.c 1 Mar 2006 10:17:00 -0000 1.21 *************** *** 138,142 **** extern void ZEXPORT DLLVersion(uChar* version) { ! sprintf(version, "lvzlib date: %s, time: %s",__DATE__,__TIME__); } --- 138,142 ---- extern void ZEXPORT DLLVersion(uChar* version) { ! sprintf(version, "lvzlib date: %s, time: %s",__DATE__,__TIME__); } *************** *** 459,470 **** if (posixRef) { - int32 l = CFStringGetLength(posixRef); - err = noErr; ! if (posixPath && *len > l) ! if (!CFStringGetCString(posixRef, posixPath, *len, enc)) err = mgArgErr; ! else ! *len = l; CFRelease(posixRef); } --- 459,469 ---- if (posixRef) { err = noErr; ! if (posixPath && (*len > CFStringGetLength(posixRef))) ! { ! if (!CFStringGetCString(posixRef, posixPath, *len, enc)) err = mgArgErr; ! } ! *len = CFStringGetLength(posixRef); CFRelease(posixRef); } *************** *** 485,496 **** if (!err) { ! if (str && *len > pathLen) { ! lstr = (LStrPtr)DSNewPClr(pathLen + 1 + sizeof(int32)); ! if (!lstr) ! return mFullErr; ! lstr->cnt = pathLen; ! err = FPathToText(path, lstr); ! if (!err) #if MacOSX err = ConvertToPosixPath(lstr->str, str, len); --- 484,500 ---- if (!err) { ! lstr = (LStrPtr)DSNewPClr(sizeof(int32) + pathLen + 1); ! if (!lstr) ! return mFullErr; ! lstr->cnt = pathLen; ! err = FPathToText(path, lstr); ! #if MacOSX ! if (!err) ! err = ConvertToPosixPath(lstr->str, NULL, &pathLen); ! #endif ! if (!err) { ! if (str && (*len > pathLen)) ! { #if MacOSX err = ConvertToPosixPath(lstr->str, str, len); *************** *** 498,509 **** StrNCpy(str, lstr->str, *len); #endif ! DSDisposePtr((UPtr)lstr); } ! #if MacOSX ! else ! err = ConvertToPosixPath(lstr->str, NULL, len); ! #else ! *len = pathLen; ! #endif } return err; --- 502,509 ---- StrNCpy(str, lstr->str, *len); #endif ! } } ! DSDisposePtr((UPtr)lstr); ! *len = pathLen + 1; } return err; |