|
From: <cre...@us...> - 2006-07-15 22:16:40
|
Revision: 1461 Author: creecode Date: 2006-07-15 15:16:37 -0700 (Sat, 15 Jul 2006) ViewCVS: http://svn.sourceforge.net/frontierkernel/?rev=1461&view=rev Log Message: ----------- tweaks to get Windows working minor formatting tweaks Modified Paths: -------------- Frontier/branches/FSRef_Migration/Common/headers/file.h Frontier/branches/FSRef_Migration/Common/source/file.c Frontier/branches/FSRef_Migration/Common/source/fileloop.c Modified: Frontier/branches/FSRef_Migration/Common/headers/file.h =================================================================== --- Frontier/branches/FSRef_Migration/Common/headers/file.h 2006-07-15 22:16:16 UTC (rev 1460) +++ Frontier/branches/FSRef_Migration/Common/headers/file.h 2006-07-15 22:16:37 UTC (rev 1461) @@ -209,18 +209,10 @@ extern boolean filegetinfo (const ptrfilespec, tyfileinfo *info); // 1/28/97 dmb for clay -extern void filegetinfofrompb ( FSRefParam *, tyfileinfo * ); - -extern void filegetinfofrompbcipbr ( CInfoPBRec *, tyfileinfo * ); - extern boolean filegetvolumeinfo (short vnum, tyfileinfo *info); extern boolean filegetvolumename (short vnum, bigstring volname); -extern boolean getmacfileinfo ( const ptrfilespec, FSRefParamPtr, FSCatalogInfoPtr ); - -extern boolean getmacfileinfocipbr ( const FSSpecPtr, CInfoPBRec * ); - extern boolean filemakespec (short vnum, long dirid, bigstring fname, ptrfilespec pfs); extern boolean getfsfile (const ptrfilespec pfs, bigstring name); // 1/28/97 dmb end for clay @@ -421,7 +413,7 @@ #pragma mark === file.c === -extern boolean equalfilespecs (const ptrfilespec , const ptrfilespec ); +extern boolean equalfilespecs ( const ptrfilespec, const ptrfilespec ); extern boolean filegetposition (hdlfilenum, long *); @@ -441,6 +433,14 @@ extern boolean bigstringToHFSUniStr255 ( const bigstring, HFSUniStr255 * ); // 2006-06-07 creedon + extern void filegetinfofrompb ( FSRefParam *, tyfileinfo * ); + + extern void filegetinfofrompbcipbr ( CInfoPBRec *, tyfileinfo * ); + + extern boolean getmacfileinfo ( const ptrfilespec, FSRefParamPtr, FSCatalogInfoPtr ); + + extern boolean getmacfileinfocipbr ( const FSSpecPtr, CInfoPBRec * ); + #endif @@ -476,10 +476,6 @@ #pragma mark === fileops.c === -extern OSStatus GetApplicationIconRef (const ProcessSerialNumber* , const FSSpec* , IconRef* ); // 2006-06-04 creedon - -extern OSStatus LSIsApplication( const FSRef *, Boolean *, Boolean * ); // 2006-05-25 - extern boolean extendfilespec ( const ptrfilespec, ptrfilespec ); // 2006-06-23 creedon extern boolean getfilespecparent ( ptrfilespec ); // 2006-06-17 creedon @@ -488,7 +484,15 @@ extern short getfilelabelindex (const ptrfilespec , short *); // 2006-04-23 creedon */ +#ifdef MACVERSION + extern OSStatus GetApplicationIconRef ( const ProcessSerialNumber * , const FSSpec* , IconRef * ); // 2006-06-04 creedon + + extern OSStatus LSIsApplication( const FSRef *, Boolean *, Boolean * ); // 2006-05-25 + +#endif // MACVERSION + + #pragma mark === filepath.c === extern boolean directorytopath ( const ptrfilespec, bigstring); Modified: Frontier/branches/FSRef_Migration/Common/source/file.c =================================================================== --- Frontier/branches/FSRef_Migration/Common/source/file.c 2006-07-15 22:16:16 UTC (rev 1460) +++ Frontier/branches/FSRef_Migration/Common/source/file.c 2006-07-15 22:16:37 UTC (rev 1461) @@ -52,7 +52,7 @@ #include "langinternal.h" /*for langbackgroundtask*/ -boolean equalfilespecs (const ptrfilespec fs1, const ptrfilespec fs2) { +boolean equalfilespecs ( const ptrfilespec fs1, const ptrfilespec fs2 ) { // // 2006-06-18 creedon: for Mac, FSRef-ized @@ -81,11 +81,11 @@ #endif #ifdef WIN95VERSION - + // if ((*fs1).volumeID != (*fs2).volumeID) // return (false); - return (lstrcmp(fsname (fs1), fsname (fs2)) == 0); + return ( comparestrings ( fsname ( fs1 ), fsname ( fs2 ) ) == 0 ); #endif Modified: Frontier/branches/FSRef_Migration/Common/source/fileloop.c =================================================================== --- Frontier/branches/FSRef_Migration/Common/source/fileloop.c 2006-07-15 22:16:16 UTC (rev 1460) +++ Frontier/branches/FSRef_Migration/Common/source/fileloop.c 2006-07-15 22:16:37 UTC (rev 1461) @@ -452,7 +452,7 @@ if (fi == NULL) return (false); - (**fi).fs = *pfs; + (**fi).fs = *fst; (**fi).findhandle = NULL; (**fi).ffilter = filefilter; (**fi).doingDrives = false; @@ -490,12 +490,13 @@ findloopinfo ** fi; fi = (findloopinfo **) hfileloop; - if (fi != NULL) - { + if (fi != NULL) { if ((**fi).findhandle != NULL) FindClose ((**fi).findhandle); disposehandle ((Handle) fi); + + } #endif // WIN95VERSION @@ -592,7 +593,6 @@ tyfileinfo info; int errCode; - copystring (fsname (pfs), fn); cleanendoffilename (fn); @@ -768,8 +768,8 @@ if (hfileloop == NULL) return (false); - if (fsfile == NULL) - return (false); + if ( fsfilet == NULL ) + return ( false ); fi = (findloopinfo **) hfileloop; @@ -788,8 +788,8 @@ if ((drivemap & drivemask) == drivemask) { /* we found one */ /*convert drivenum to filespec */ - wsprintf (stringbaseaddress(fsname(fsfile)), "%c:\\", drivenum + 'A'); - setstringlength (fsname(fsfile), strlen(stringbaseaddress(fsname(fsfile)))); + wsprintf ( stringbaseaddress ( fsname ( fsfilet ) ), "%c:\\", drivenum + 'A' ); + setstringlength ( fsname ( fsfilet ), strlen( stringbaseaddress ( fsname ( fsfilet ) ) ) ); *flfolder = true; return (true); } @@ -819,7 +819,7 @@ setstringlength(pathname, strlen(stringbaseaddress(pathname))); copystring (pathname, fsname (&(**fi).fs)); - buildfilename (fsname (&(**fi).fs), 0, fileinfo.cFileName, 1, fsname (fsfile)); + buildfilename ( fsname ( &( **fi ).fs ), 0, fileinfo.cFileName, 1, fsname ( fsfilet ) ); if (flfolder != NULL) *flfolder = (fileinfo.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY)?true:false; @@ -833,8 +833,8 @@ goto SkippingDotandDotDot; if (fileinfo.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY) { - cleanendoffilename (fsname(fsfile)); - appendcstring (fsname(fsfile), "\\"); + cleanendoffilename ( fsname ( fsfilet ) ); + appendcstring ( fsname ( fsfilet ), "\\" ); } return (true); @@ -844,7 +844,7 @@ SkippingDotandDotDot: if (FindNextFile ((**fi).findhandle, &fileinfo)) { - buildfilename (fsname (&(**fi).fs), 0, fileinfo.cFileName, 1, fsname (fsfile)); + buildfilename ( fsname ( &( **fi ).fs ), 0, fileinfo.cFileName, 1, fsname ( fsfilet ) ); if (flfolder != NULL) *flfolder = (fileinfo.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY)?true:false; @@ -856,8 +856,8 @@ goto SkippingDotandDotDot; if (fileinfo.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY) { - cleanendoffilename (fsname(fsfile)); - appendcstring (fsname(fsfile), "\\"); + cleanendoffilename ( fsname ( fsfilet ) ); + appendcstring ( fsname ( fsfilet ), "\\" ); } return (true); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |