|
From: <cre...@us...> - 2006-06-26 21:28:53
|
Revision: 1427 Author: creecode Date: 2006-06-26 14:28:48 -0700 (Mon, 26 Jun 2006) ViewCVS: http://svn.sourceforge.net/frontierkernel/?rev=1427&view=rev Log Message: ----------- removed include filesystem7.h in filelaunchanythingverb function replace System7Open with LSOpenFSRef Modified Paths: -------------- Frontier/branches/FSRef_Migration/Common/source/fileverbs.c Modified: Frontier/branches/FSRef_Migration/Common/source/fileverbs.c =================================================================== --- Frontier/branches/FSRef_Migration/Common/source/fileverbs.c 2006-06-26 21:19:26 UTC (rev 1426) +++ Frontier/branches/FSRef_Migration/Common/source/fileverbs.c 2006-06-26 21:28:48 UTC (rev 1427) @@ -40,7 +40,6 @@ #include "process.h" #include "kernelverbs.h" #include "file.h" -#include "filesystem7.h" #include "filealias.h" #include "tablestructure.h" #include "kernelverbdefs.h" @@ -2865,27 +2864,35 @@ } // followaliasverb - boolean filelaunchanythingverb (hdltreenode hparam1, tyvaluerecord *vreturned) { + boolean filelaunchanythingverb ( hdltreenode hparam1, tyvaluerecord *vreturned ) { - /* - 6/1/92 dmb: generate oserror if System7Open fails - */ + // + // 2006-06-26 creedon: replace System7Open with LSOpenFSRef + // + // 1992-06-01 dmb: generate oserror if System7Open fails + // + OSStatus status; tyfilespec fs; flnextparamislast = true; - if (!getpathvalue (hparam1, 1, &fs)) // fs holds the file's path - return (false); + if ( ! getpathvalue ( hparam1, 1, &fs ) ) // fs holds the file's path + return ( false ); setfserrorparam ( &fs ); - if ( oserror ( System7Open ( &fs ) ) ) + ( void ) extendfilespec ( &fs, &fs ); + + status = LSOpenFSRef ( &fs.fsref, NULL ); + + if ( oserror ( status ) ) return ( false ); - return (setbooleanvalue (true, vreturned)); - } /*filelaunchanythingverb*/ + return ( setbooleanvalue ( true, vreturned ) ); + } // filelaunchanythingverb + #endif static boolean filefunctionvalue (short token, hdltreenode hparam1, tyvaluerecord *vreturned, bigstring bserror) { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |