You can subscribe to this list here.
| 2004 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(447) |
Nov
(163) |
Dec
(57) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2005 |
Jan
(172) |
Feb
|
Mar
(123) |
Apr
(64) |
May
(1) |
Jun
(278) |
Jul
(89) |
Aug
(97) |
Sep
(62) |
Oct
(53) |
Nov
(119) |
Dec
(60) |
| 2006 |
Jan
(76) |
Feb
(1094) |
Mar
(363) |
Apr
(163) |
May
(57) |
Jun
(43) |
Jul
(39) |
Aug
(15) |
Sep
(33) |
Oct
(62) |
Nov
(8) |
Dec
|
| 2007 |
Jan
(9) |
Feb
(34) |
Mar
(2) |
Apr
(14) |
May
(8) |
Jun
(40) |
Jul
(21) |
Aug
(1) |
Sep
(20) |
Oct
(15) |
Nov
(26) |
Dec
|
| 2008 |
Jan
(1) |
Feb
(1) |
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
(3) |
Oct
|
Nov
|
Dec
(1) |
| 2009 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(32) |
Jun
|
Jul
|
Aug
(3) |
Sep
(3) |
Oct
|
Nov
|
Dec
|
| 2010 |
Jan
(1) |
Feb
|
Mar
|
Apr
|
May
|
Jun
(1) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
| 2011 |
Jan
|
Feb
|
Mar
(2) |
Apr
|
May
|
Jun
(1) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
(7) |
Dec
|
| 2012 |
Jan
|
Feb
|
Mar
|
Apr
(1) |
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
|
From: <cre...@us...> - 2006-07-26 17:41:51
|
Revision: 1465 Author: creecode Date: 2006-07-26 10:24:31 -0700 (Wed, 26 Jul 2006) ViewCVS: http://svn.sourceforge.net/frontierkernel/?rev=1465&view=rev Log Message: ----------- handle multiple domains Modified Paths: -------------- ODBs/trunk/frontierRoot/system/verbs/builtins/betty/rpc/server.fvc Modified: ODBs/trunk/frontierRoot/system/verbs/builtins/betty/rpc/server.fvc =================================================================== --- ODBs/trunk/frontierRoot/system/verbs/builtins/betty/rpc/server.fvc 2006-07-26 17:18:57 UTC (rev 1464) +++ ODBs/trunk/frontierRoot/system/verbs/builtins/betty/rpc/server.fvc 2006-07-26 17:24:31 UTC (rev 1465) @@ -1,31 +1,45 @@ -FrontierVcsFile:1:scpt:system.verbs.builtins.betty.rpc.server +FrontierVcsFile:3:scpt:system.verbs.builtins.betty.rpc.server on server (xmlText, adrParamTable) { //called from the RPC2 responder on an incoming request - \xC7Change notes: - \xC701/31/02; 2:13:15 PM by JES - \xC7Factored the security check by IP address to betty.rpc.checkClient, so the check can be used for both XML-RPC and SOAP. - \xC704/27/01; 7:58:15 PM by JES - \xC7If a request doesn't have a <params> element, don't fault. Instead treat it as a call with no input parameters. - \xC7Thu, 02 Dec 1999 at 5:17:37 PM by AR - \xC7Disabled fldebug flag again. - \xC7Wed, 04 Nov 1999 at 10:33:45 PM by AR - \xC7If user.betty.prefs.flAllowByIpOnly is true, block XML-RPC requests from anyone except those IP addresses listed in user.betty.prefs.allowedIpAddresses - \xC7Mon, 25 Oct 1999 at 11:07:19 PM by AR - \xC7If user.betty.prefs.flKeepServerLog is true, we log all incoming requests to the rpcServer section of the daily log GDB. - \xC7Mon, 14 Jun 1999 15:46:57 GMT by AR - \xC7When walking the XML structure to extract the parameters, we now handle the case correctly when a parameter is a table and the next parameter is a scalar. - \xC7If an RPC fault occurs, left angle brackets and ampersands in the error string are now properly encoded to ensure that the XML-RPC response is well-formed. - \xC7Friday, July 17, 1998 at 12:57:38 PM by PBS - \xC7XML header is now lowercase to conform to the XML spec. - \xC7Turned off debugging; use a local table rather than a global table so the server is thread-safe. + «Changes + «5/24/06; 8:15:45 AM by DW + «Handle multiple domains as described here < http://geeks.opml.org/2006/05/24#a865 >. + «01/31/02; 2:13:15 PM by JES + «Factored the security check by IP address to betty.rpc.checkClient, so the check can be used for both XML-RPC and SOAP. + «04/27/01; 7:58:15 PM by JES + «If a request doesn't have a <params> element, don't fault. Instead treat it as a call with no input parameters. + «Thu, 02 Dec 1999 at 5:17:37 PM by AR + «Disabled fldebug flag again. + «Wed, 04 Nov 1999 at 10:33:45 PM by AR + «If user.betty.prefs.flAllowByIpOnly is true, block XML-RPC requests from anyone except those IP addresses listed in user.betty.prefs.allowedIpAddresses + «Mon, 25 Oct 1999 at 11:07:19 PM by AR + «If user.betty.prefs.flKeepServerLog is true, we log all incoming requests to the rpcServer section of the daily log GDB. + «Mon, 14 Jun 1999 15:46:57 GMT by AR + «When walking the XML structure to extract the parameters, we now handle the case correctly when a parameter is a table and the next parameter is a scalar. + «If an RPC fault occurs, left angle brackets and ampersands in the error string are now properly encoded to ensure that the XML-RPC response is well-formed. + «Friday, July 17, 1998 at 12:57:38 PM by PBS + «XML header is now lowercase to conform to the XML spec. + «Turned off debugging; use a local table rather than a global table so the server is thread-safe. local (fldebug = false, flFault = false, securitylist = {}); betty.init (); + local (adrhandlerstable = @user.betty.rpcHandlers); + + if user.betty.prefs.flServerDomains { + if defined (user.betty.domains) { + if defined (adrparamtable^.host) { + local (host = adrparamtable^.host); + if host contains ":" { //remove the port designator + host = string.nthfield (host, ":", 1)}; + local (adrtable = @user.betty.domains.[host]); + if defined (adrtable^) { + adrhandlerstable = adrtable}}}}; + local (flLog = user.betty.prefs.flKeepServerLog); + local (xmlResponse = "", indentlevel = 1); - local (xmlResponse = "", indentlevel = 1); on add (s) { xmlResponse = xmlResponse + string.filledString ("\t", indentlevel) + s + "\r\n"}; @@ -44,6 +58,7 @@ if defined (adrParamTable^.requestHeaders.["User-Agent"]) { adrHitTable^.agent = adrParamTable^.requestHeaders.["User-Agent"]}; adrHitTable^.ticks = clock.ticks () - adrParamTable^.stats.requestProcessingStarted}; + on rpcFault (errorstring, errornum) { flFault = true; add ("<fault>"); indentlevel++; @@ -80,29 +95,29 @@ bundle { //AR 11/04/1999: check for rpc request blocking if not betty.rpc.checkClient (adrParamTable) { //1/31/02 JES: factored for use for both XML-RPC and SOAP - rpcFault ("Access not allowed from " + adrParamTable^.client + ".", betty.rpc.errorCodes.securityFault)}; - \xC7if defined (user.betty.prefs.flAllowByIpOnly) - \xC7if user.betty.prefs.flAllowByIpOnly - \xC7local (flBlocked = true) - \xC7local (okIpList = user.betty.prefs.allowedIpAddresses) - \xC7if typeOf (okIpList) == stringType - \xC7It's a comma-delimited string: create a local list from that string. - \xC7local (s = okIpList) - \xC7okIpList = {} - \xC7local (i) - \xC7for i = 1 to string.countFields (s, ',') - \xC7local (oneIpAddress = string.nthField (s, ',', i)) - \xC7oneIpAddress = string.trimWhiteSpace (oneIpAddress) - \xC7if oneIpAddress != "" - \xC7okIpList = okIpList + oneIpAddress - \xC7local (oneIp) - \xC7for oneIp in okIpList - \xC7if string.trimWhiteSpace (oneIp) != "" - \xC7if adrParamTable^.client == oneIp - \xC7flblocked = false - \xC7break - \xC7if flblocked - \xC7rpcFault ("Access not allowed from " + adrParamTable^.client + ".", betty.rpc.errorCodes.securityFault)}; + rpcFault ("Access not allowed from " + adrParamTable^.client + ".", betty.rpc.errorCodes.securityFault)}}; + «if defined (user.betty.prefs.flAllowByIpOnly) + «if user.betty.prefs.flAllowByIpOnly + «local (flBlocked = true) + «local (okIpList = user.betty.prefs.allowedIpAddresses) + «if typeOf (okIpList) == stringType + «It's a comma-delimited string: create a local list from that string. + «local (s = okIpList) + «okIpList = {} + «local (i) + «for i = 1 to string.countFields (s, ',') + «local (oneIpAddress = string.nthField (s, ',', i)) + «oneIpAddress = string.trimWhiteSpace (oneIpAddress) + «if oneIpAddress != "" + «okIpList = okIpList + oneIpAddress + «local (oneIp) + «for oneIp in okIpList + «if string.trimWhiteSpace (oneIp) != "" + «if adrParamTable^.client == oneIp + «flblocked = false + «break + «if flblocked + «rpcFault ("Access not allowed from " + adrParamTable^.client + ".", betty.rpc.errorCodes.securityFault) if (not flFault) { //get the procedure name and the paramlist on parseXML () { @@ -208,4 +223,6 @@ try { addToRpcLog ()}}; - return (xmlResponse)} \ No newline at end of file + return (xmlResponse)} + + This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
|
From: <cre...@us...> - 2006-07-26 17:27:13
|
Revision: 1466 Author: creecode Date: 2006-07-26 10:27:05 -0700 (Wed, 26 Jul 2006) ViewCVS: http://svn.sourceforge.net/frontierkernel/?rev=1466&view=rev Log Message: ----------- minor formatting tweaks Modified Paths: -------------- ODBs/trunk/frontierRoot/system/verbs/builtins/export/card/run.fvc Modified: ODBs/trunk/frontierRoot/system/verbs/builtins/export/card/run.fvc =================================================================== --- ODBs/trunk/frontierRoot/system/verbs/builtins/export/card/run.fvc 2006-07-26 17:24:31 UTC (rev 1465) +++ ODBs/trunk/frontierRoot/system/verbs/builtins/export/card/run.fvc 2006-07-26 17:27:05 UTC (rev 1466) @@ -1,16 +1,28 @@ -FrontierVcsFile:1:scpt:system.verbs.builtins.export.card.run +FrontierVcsFile:3:scpt:system.verbs.builtins.export.card.run +«Changes + «5/14/06; 6:36:42 PM by TAC + «minor formatting tweaks + export.init (); -try { \xC7set user.export.lastaddress + +try { // set user.export.lastAddress local (adr = address (window.frontmost ())); - if typeOf (adr^) == tabletype { - adr = table.getcursor ()}; - user.export.lastaddress = adr}; + + if typeOf (adr^) == tableType { + adr = table.getCursor ()}; + + user.export.lastAddress = adr}; + user.export.ok = false; + if kb.shiftKey () { user.export.ok = true} else { card.run (@export.card.theCard)}; + if user.export.ok { with user.export { - export.card.doExport (lastaddress, lastkind, lastlocation, lastcompression)}} \ No newline at end of file + export.card.doExport (lastAddress, lastKind, lastLocation, lastCompression)}} + + This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
|
From: <cre...@us...> - 2006-07-15 22:17:43
|
Revision: 1463 Author: creecode Date: 2006-07-15 15:17:37 -0700 (Sat, 15 Jul 2006) ViewCVS: http://svn.sourceforge.net/frontierkernel/?rev=1463&view=rev Log Message: ----------- tweaks to get Windows working minor formatting tweaks Modified Paths: -------------- Frontier/branches/FSRef_Migration/Common/source/FrontierWinMain.c Frontier/branches/FSRef_Migration/Common/source/fileops.c Frontier/branches/FSRef_Migration/Common/source/filepath.c Frontier/branches/FSRef_Migration/Common/source/fileverbs.c Frontier/branches/FSRef_Migration/Common/source/langdll.c Frontier/branches/FSRef_Migration/Common/source/langevaluate.c Modified: Frontier/branches/FSRef_Migration/Common/source/FrontierWinMain.c =================================================================== --- Frontier/branches/FSRef_Migration/Common/source/FrontierWinMain.c 2006-07-15 22:17:05 UTC (rev 1462) +++ Frontier/branches/FSRef_Migration/Common/source/FrontierWinMain.c 2006-07-15 22:17:37 UTC (rev 1463) @@ -3108,7 +3108,7 @@ //#endif - #if (FRONTIERCOM == 1) +#if (FRONTIERCOM == 1) gcomServerInfo.hInstance = hInstance; gcomServerInfo.hPrevInstance = hPrevInstance; gcomServerInfo.lpCmdLine = lpCmdLine; @@ -3174,7 +3174,7 @@ hInst = hInstance; shellinstance = hInstance; - /* If this is the first instance of the app. register window classes */ + /* If this is the first instance of the app. register window classes */ if (!hPrevInstance) { if (!InitializeApplication ()) return 0; Modified: Frontier/branches/FSRef_Migration/Common/source/fileops.c =================================================================== --- Frontier/branches/FSRef_Migration/Common/source/fileops.c 2006-07-15 22:17:05 UTC (rev 1462) +++ Frontier/branches/FSRef_Migration/Common/source/fileops.c 2006-07-15 22:17:37 UTC (rev 1463) @@ -716,6 +716,15 @@ static boolean filegetfsvolumeinfo (const ptrfilespec fs, tyfileinfo *info) { + #ifdef WIN95VERSION + + DWORD sectorsPerCluster, bytesPerSector, numberOfFreeClusters, totalNumberOfClusters; + UINT drivetype; + bigstring volname; + bigstring errmsg; + + #endif // WIN95VERSION + clearbytes (info, sizeof (tyfileinfo)); // init all fields to zero #ifdef MACVERSION @@ -729,15 +738,10 @@ return ( true ); - #endif + #endif // MACVERSION #ifdef WIN95VERSION - DWORD sectorsPerCluster, bytesPerSector, numberOfFreeClusters, totalNumberOfClusters; - UINT drivetype; - bigstring volname; - bigstring errmsg; - if (fileisvolume (fs)) { info->flvolume = true; info->flbusy = true; @@ -2237,6 +2241,12 @@ // 6.1b16 AR: Return number of free bytes and total number of bytes for the volume. // + #ifdef WIN95VERSION + + bigstring volname; + + #endif // WIN95VERSION + *totalbytes = 0.0; *freebytes = 0.0; @@ -2266,13 +2276,10 @@ *totalbytes = (double) volinfo.totalBytes; *freebytes = (double) volinfo.freeBytes; - #endif + #endif // MACVERSION - #ifdef WIN95VERSION - bigstring volname; - getfsfile ( fs, volname); cleanendoffilename (volname); @@ -2891,43 +2898,26 @@ convertpstring ( bsvolname ); - errstatus = FSPathMakeRef ( bsvolname, &fs -> fsref, NULL ); + errstatus = FSPathMakeRef ( bsvolname, &( *fs ).fsref, NULL ); #endif #ifdef WIN95VERSION - bigstring bsvolname, bs; short ix = 0; - fs.volumeID = 0; + if ( isemptystring ( bspath ) ) + return ( false ); - copystring (bspath, bs); /*work on a copy*/ + if ( ! scanstring ( ':', bspath, &ix ) ) // no colon, No volume? + return ( false ); + else + midstring ( bspath, 1, ix, ( *fs ).fullSpecifier ); // pick off the vol name and the colon - if (isemptystring (bs)) - return (false); - - if (!scanstring (':', bs, &ix)) { /*no colon, No volume?*/ - return (false); - } - else { - midstring (bs, 1, ix, bsvolname); /*pick off the vol name and the colon*/ - - deletestring (bs, 1, ix); - } - - if (bsvol != nil) - { - copystring (bsvolname, bsvol); - - nullterminate (bsvol); - } - - copystring (bsvol, fs.fullSpecifier) - #endif - return (true); + return ( true ); + } // fileparsevolname @@ -3174,12 +3164,11 @@ // boolean flfolder; + bigstring bs; if (fileexists (fs, &flfolder)) return (true); - bigstring bs; - getfsfile ( fs, bs ); filenotfounderror ( bs ); Modified: Frontier/branches/FSRef_Migration/Common/source/filepath.c =================================================================== --- Frontier/branches/FSRef_Migration/Common/source/filepath.c 2006-07-15 22:17:05 UTC (rev 1462) +++ Frontier/branches/FSRef_Migration/Common/source/filepath.c 2006-07-15 22:17:37 UTC (rev 1463) @@ -271,6 +271,12 @@ // non-existant files, we don't give up right away. // + #ifdef WIN95VERSION + + bigstring bsfolder; + + #endif // WIN95VERSION + clearbytes ( fs, sizeof ( *fs ) ); if ( isemptystring ( bspath ) ) @@ -401,8 +407,6 @@ #ifdef WIN95VERSION - bigstring bsfolder; - copystring (bspath, fsname (fs)); folderfrompath (bspath, bsfolder); @@ -417,6 +421,7 @@ nullterminate (fsname (fs)); return (true); + #endif } // pathtofilespec @@ -508,10 +513,10 @@ } // getfsfile -boolean getfsvolume (const ptrfilespec fs, long *vnum) { +boolean getfsvolume ( const ptrfilespec fs, long *vnum ) { // - // 2006-06-25 creedon: for Mac, FSRef-ized + // 2006-07-12 creedon: for Mac, FSRef-ized // // 5.1.5b11 dmb: get the volume that is actually specified in the fspec. // @@ -521,7 +526,7 @@ #ifdef MACVERSION FSCatalogInfo catalogInfo; - OSErr err = FSGetCatalogInfo ( &fs->fsref, kFSCatInfoVolume, &catalogInfo, NULL, NULL, NULL ); + OSErr err = FSGetCatalogInfo ( &( *fs ).fsref, kFSCatInfoVolume, &catalogInfo, NULL, NULL, NULL ); if ( catalogInfo.volume == 0 ) return ( false ); @@ -533,12 +538,14 @@ #endif #ifdef WIN95VERSION + + *vnum = 0; - return (fileparsevolname ((ptrstring) fsname (fs), vnum, nil)); + return ( true ); #endif - } /* getfsvolume */ + } // getfsvolume void initfsdefault (void) { Modified: Frontier/branches/FSRef_Migration/Common/source/fileverbs.c =================================================================== --- Frontier/branches/FSRef_Migration/Common/source/fileverbs.c 2006-07-15 22:17:05 UTC (rev 1462) +++ Frontier/branches/FSRef_Migration/Common/source/fileverbs.c 2006-07-15 22:17:37 UTC (rev 1463) @@ -2703,17 +2703,17 @@ // created, factored from filefunctionvalue function // - tyfilespec fs, fst; + tyfilespec fs; flnextparamislast = true; if ( ! getfilespecvalue ( hp1, 1, &fs ) ) return ( false ); - if ( ! extendfilespec ( &fs, &fst ) ) + if ( ! extendfilespec ( &fs, &fs ) ) return ( false ); - if ( ! deletefile ( &fst ) ) + if ( ! deletefile ( &fs ) ) return ( false ); return ( setbooleanvalue ( true, vreturned ) ); @@ -3387,11 +3387,17 @@ case newfunc: { tyfilespec fs; + + #ifdef WIN95VERSION + boolean flfolder; + + #endif // WIN95VERSION + flnextparamislast = true; if ( ! getfilespecvalue ( hp1, 1, &fs ) ) - break; + break; #ifdef MACVERSION @@ -3405,8 +3411,6 @@ #ifdef WIN95VERSION - boolean flfolder; - if (fileexists (&fs, &flfolder)) { // 8/25/92 dmb if (!deletefile (&fs)) @@ -3888,7 +3892,7 @@ byte bsvol [258]; // 2 byte bsfolder [258]; // 6 - tyfilespec fs = { { { 0 } }, 0 }; + tyfilespec fs; if (!langcheckparamcount (hp1, 0)) /*no parameters expected*/ break; @@ -3901,7 +3905,9 @@ #else - setemptystring (bsvol); + setemptystring (bsvol); + + clearbytes ( &fs, sizeof ( fs ) ); #ifdef MACVERSION @@ -3926,7 +3932,7 @@ case getspecialpathfunc: { bigstring bsvol, bsfolder; - tyfilespec fs = { { { 0 } }, 0 }; + tyfilespec fs; boolean flcreate; if (!getstringvalue (hp1, 1, bsvol)) @@ -3940,6 +3946,8 @@ if (!getbooleanvalue (hp1, 3, &flcreate)) break; + clearbytes ( &fs, sizeof ( fs ) ); + if (!getspecialfolderpath (bsvol, bsfolder, flcreate, &fs)) break; @@ -3949,11 +3957,13 @@ case getmp3infofunc: { long seconds, bitrate, frequency, offset; - tyfilespec fs = { { { 0 } }, 0 }; + tyfilespec fs; boolean fl, flvariablebitrate; if (!langcheckparamcount (hparam1, 6)) /*preflight before changing values*/ return (false); + + clearbytes ( &fs, sizeof ( fs ) ); if (!getpathvalue (hp1, 1, &fs)) return (false); @@ -4151,3 +4161,4 @@ return (true); }/*filestart*/ + Modified: Frontier/branches/FSRef_Migration/Common/source/langdll.c =================================================================== --- Frontier/branches/FSRef_Migration/Common/source/langdll.c 2006-07-15 22:17:05 UTC (rev 1462) +++ Frontier/branches/FSRef_Migration/Common/source/langdll.c 2006-07-15 22:17:37 UTC (rev 1463) @@ -1009,6 +1009,7 @@ // 2006-06-25 creedon: for Mac, FSRef-ized // + bigstring bs; typrocinfohandle hnomad; tyfilespec fs = (**hdll).fs; long ixhashbucket; @@ -1031,8 +1032,6 @@ hnomad = (**hnomad).hashlink; } // while - bigstring bs; - getfsfile ( &fs, bs ); lang2paramerror (cantfindprocinfofunctionerror, bsprocname, bs ); @@ -2851,3 +2850,4 @@ fillcalltable (dllcallbacks); } } /*initdllverbs*/ + Modified: Frontier/branches/FSRef_Migration/Common/source/langevaluate.c =================================================================== --- Frontier/branches/FSRef_Migration/Common/source/langevaluate.c 2006-07-15 22:17:05 UTC (rev 1462) +++ Frontier/branches/FSRef_Migration/Common/source/langevaluate.c 2006-07-15 22:17:37 UTC (rev 1463) @@ -544,11 +544,12 @@ register hdltreenode h = htree; register boolean fl; tyvaluerecord val; - tyfilespec fs = { { { 0 } }, 0 }; + tyfilespec fs; boolean flfolder; Handle hfileloop; + + clearbytes ( &fs, sizeof ( fs ) ); - #ifdef MACVERSION FSSpec fst; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
|
From: <cre...@us...> - 2006-07-15 22:17:09
|
Revision: 1462 Author: creecode Date: 2006-07-15 15:17:05 -0700 (Sat, 15 Jul 2006) ViewCVS: http://svn.sourceforge.net/frontierkernel/?rev=1462&view=rev Log Message: ----------- tweaks to get Windows working minor formatting tweaks Modified Paths: -------------- Frontier/branches/FSRef_Migration/Common/headers/shell.h Frontier/branches/FSRef_Migration/Common/headers/shelltypes.h Frontier/branches/FSRef_Migration/Common/source/shellwindow.c Modified: Frontier/branches/FSRef_Migration/Common/headers/shell.h =================================================================== --- Frontier/branches/FSRef_Migration/Common/headers/shell.h 2006-07-15 22:16:37 UTC (rev 1461) +++ Frontier/branches/FSRef_Migration/Common/headers/shell.h 2006-07-15 22:17:05 UTC (rev 1462) @@ -772,9 +772,9 @@ extern short windowgetvnum (WindowPtr); -extern boolean windowsetfspec (WindowPtr, ptrfilespec ); +extern boolean windowsetfspec ( WindowPtr, ptrfilespec ); -extern boolean windowgetfspec (WindowPtr, ptrfilespec ); +extern boolean windowgetfspec ( WindowPtr, ptrfilespec ); extern boolean windowgetpath (WindowPtr, bigstring); Modified: Frontier/branches/FSRef_Migration/Common/headers/shelltypes.h =================================================================== --- Frontier/branches/FSRef_Migration/Common/headers/shelltypes.h 2006-07-15 22:16:37 UTC (rev 1461) +++ Frontier/branches/FSRef_Migration/Common/headers/shelltypes.h 2006-07-15 22:17:05 UTC (rev 1462) @@ -179,12 +179,11 @@ typedef struct tyfilespec { - long volumeID; char fullSpecifier [258]; } tyfilespec, *ptrfilespec, **hdlfilespec; - #define fsname ( fs ) ( fs ) -> fullSpecifier + #define fsname( fs ) ( fs ) -> fullSpecifier #endif // WIN95VERSION Modified: Frontier/branches/FSRef_Migration/Common/source/shellwindow.c =================================================================== --- Frontier/branches/FSRef_Migration/Common/source/shellwindow.c 2006-07-15 22:16:37 UTC (rev 1461) +++ Frontier/branches/FSRef_Migration/Common/source/shellwindow.c 2006-07-15 22:17:05 UTC (rev 1462) @@ -504,7 +504,7 @@ } /*windowsetfspec*/ -boolean windowgetfspec (WindowPtr w, ptrfilespec fspec) { +boolean windowgetfspec ( WindowPtr w, ptrfilespec fspec ) { /* 6.18.97 dmb: return boolean value indicating whether or not the @@ -653,6 +653,7 @@ tysavedfont savedfont; short fontnum; long resourceSize; + if (!getwindowinfo (w, &hinfo)) /*defensive driving*/ return (false); @@ -669,7 +670,9 @@ //I think a more insidious problem was that the sizeof() was returning //a short that was not being picked up right when run under spotlight. //This may be a spotlight bug though. + resourceSize = sizeof (savedfont); + if (!loadresource (&fspec, (short) (**h).rnum, 'styl', 128, nil, resourceSize, &savedfont, resourcefork)) { /* 2005-09-02 creedon - added support for fork parameter, see resources.c: openresourcefile and pushresourcefile */ (**h).defaultfont = config.defaultfont; @@ -1980,11 +1983,15 @@ //Must pass a CGrafPtr to pushport on OS X to avoid a crash { CGrafPtr thePort; + #if TARGET_API_MAC_CARBON == 1 thePort = GetWindowPort(w); + #else + thePort = (CGrafPtr)w; + #endif pushport (thePort); } - + setfontsizestyle (config.defaultfont, config.defaultsize, config.defaultstyle); popport (); @@ -2017,8 +2024,18 @@ // do we need to do this? - (**hinfo).fspec.path = CFStringCreateWithPascalString (kCFAllocatorDefault, bstitle, kCFStringEncodingMacRoman ); - + #ifdef MACVERSION + + (**hinfo).fspec.path = CFStringCreateWithPascalString (kCFAllocatorDefault, bstitle, kCFStringEncodingMacRoman ); + + #endif // MACVERSION + + #ifdef WIN95VERSION + + copystring ( bstitle, fsname ( &( **hinfo ).fspec ) ); + + #endif // WIN95VERSION + } fl = true; @@ -3157,6 +3174,3 @@ return (fl); } /*shellgetdatabase*/ - - - This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
|
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. |
|
From: <cre...@us...> - 2006-07-15 22:16:19
|
Revision: 1460 Author: creecode Date: 2006-07-15 15:16:16 -0700 (Sat, 15 Jul 2006) ViewCVS: http://svn.sourceforge.net/frontierkernel/?rev=1460&view=rev Log Message: ----------- tweaks to get Windows working minor formatting tweaks Modified Paths: -------------- Frontier/branches/FSRef_Migration/Common/source/dbverbs.c Modified: Frontier/branches/FSRef_Migration/Common/source/dbverbs.c =================================================================== --- Frontier/branches/FSRef_Migration/Common/source/dbverbs.c 2006-07-15 22:15:02 UTC (rev 1459) +++ Frontier/branches/FSRef_Migration/Common/source/dbverbs.c 2006-07-15 22:16:16 UTC (rev 1460) @@ -468,6 +468,7 @@ // 2006-06-23 creedon: for Mac, FSRef-zed // + bigstring bs; hdlodbrecord hodb; tyfilespec fs; ptrfilespec ptrfs; @@ -489,8 +490,6 @@ } } - bigstring bs; - getfsfile ( ptrfs, bs ); lang2paramerror (dbnotopenederror, bsfunctionname, bs ); @@ -1030,6 +1029,3 @@ return (true); } /*dbinitverbs*/ - - - This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
|
From: <cre...@us...> - 2006-07-15 22:15:07
|
Revision: 1459 Author: creecode Date: 2006-07-15 15:15:02 -0700 (Sat, 15 Jul 2006) ViewCVS: http://svn.sourceforge.net/frontierkernel/?rev=1459&view=rev Log Message: ----------- tweaks to get Windows working minor formatting tweaks Modified Paths: -------------- Frontier/branches/FSRef_Migration/Common/source/about.c Modified: Frontier/branches/FSRef_Migration/Common/source/about.c =================================================================== --- Frontier/branches/FSRef_Migration/Common/source/about.c 2006-07-11 21:58:51 UTC (rev 1458) +++ Frontier/branches/FSRef_Migration/Common/source/about.c 2006-07-15 22:15:02 UTC (rev 1459) @@ -269,12 +269,14 @@ static void ccdrawfrontiericon (Rect rcicn, boolean flpressed) { - // - // 2006-06-18 creedon: FSRef-ized - // - // 7.0b53 PBS: draw an OS X style icon - // - + // + // 2006-07-12 creedon: FSRef-ized + // + // 7.0b53 PBS: draw an OS X style icon + // + + #ifdef MACVERSION + IconRef iconref; tyfilespec programfspec; short label; @@ -297,7 +299,11 @@ if (err == noErr) return; } // if + + #endif // MACVERSION + ploticonresource ( &rcicn, kAlignAbsoluteCenter, flpressed ? kTransformSelected : 0, idfrontiericon ); + } // ccdrawfrontiericon This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
|
From: <cre...@us...> - 2006-07-11 21:58:53
|
Revision: 1458 Author: creecode Date: 2006-07-11 14:58:51 -0700 (Tue, 11 Jul 2006) ViewCVS: http://svn.sourceforge.net/frontierkernel/?rev=1458&view=rev Log Message: ----------- remove erroneous // Modified Paths: -------------- Frontier/branches/FSRef_Migration/Common/source/langpack.c Modified: Frontier/branches/FSRef_Migration/Common/source/langpack.c =================================================================== --- Frontier/branches/FSRef_Migration/Common/source/langpack.c 2006-07-11 21:56:52 UTC (rev 1457) +++ Frontier/branches/FSRef_Migration/Common/source/langpack.c 2006-07-11 21:58:51 UTC (rev 1458) @@ -862,7 +862,7 @@ #endif // MACVERSION - #ifdef // WIN95VERSION + #ifdef WIN95VERSION if ( isemptystring ( fsname ( fs ) ) ) fs = nil; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
|
From: <cre...@us...> - 2006-07-11 21:56:55
|
Revision: 1457 Author: creecode Date: 2006-07-11 14:56:52 -0700 (Tue, 11 Jul 2006) ViewCVS: http://svn.sourceforge.net/frontierkernel/?rev=1457&view=rev Log Message: ----------- don't call FSRefValid on Windows Modified Paths: -------------- Frontier/branches/FSRef_Migration/Common/source/langpack.c Modified: Frontier/branches/FSRef_Migration/Common/source/langpack.c =================================================================== --- Frontier/branches/FSRef_Migration/Common/source/langpack.c 2006-07-11 21:47:41 UTC (rev 1456) +++ Frontier/branches/FSRef_Migration/Common/source/langpack.c 2006-07-11 21:56:52 UTC (rev 1457) @@ -823,7 +823,7 @@ boolean langunpackwindowverb (hdltreenode hparam1, tyvaluerecord *vreturned) { // - // 2006-06-24 creedon: FSRef-ized + // 2006-07-11 creedon: FSRef-ized // tyvaluerecord val; @@ -853,11 +853,24 @@ fs = &fspec; - if ( FSRefValid ( &( *fs ).fsref ) ) - langexternalsetdirty ((hdlexternalhandle) val.data.externalvalue, false); - else - fs = nil; + #ifdef MACVERSION + if ( FSRefValid ( &( *fs ).fsref ) ) + langexternalsetdirty ((hdlexternalhandle) val.data.externalvalue, false); + else + fs = nil; + + #endif // MACVERSION + + #ifdef // WIN95VERSION + + if ( isemptystring ( fsname ( fs ) ) ) + fs = nil; + else + langexternalsetdirty ( ( hdlexternalhandle ) val.data.externalvalue, false ); + + #endif // WIN95VERSION + if (!langexternalzoomfilewindow (&val, fs, true)) { disposevaluerecord (val, false); @@ -868,8 +881,10 @@ (*vreturned).data.flvalue = true; return (true); - } /*langunpackwindowverb*/ + + } // langunpackwindowverb + #if !flruntime boolean langvaluetotextscrap (tyvaluerecord val, Handle htext) { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
|
From: <cre...@us...> - 2006-07-11 21:47:45
|
Revision: 1456 Author: creecode Date: 2006-07-11 14:47:41 -0700 (Tue, 11 Jul 2006) ViewCVS: http://svn.sourceforge.net/frontierkernel/?rev=1456&view=rev Log Message: ----------- include MoreFilesX.h only for Mac Modified Paths: -------------- Frontier/branches/FSRef_Migration/Common/source/filepath.c Modified: Frontier/branches/FSRef_Migration/Common/source/filepath.c =================================================================== --- Frontier/branches/FSRef_Migration/Common/source/filepath.c 2006-07-08 01:12:12 UTC (rev 1455) +++ Frontier/branches/FSRef_Migration/Common/source/filepath.c 2006-07-11 21:47:41 UTC (rev 1456) @@ -34,9 +34,14 @@ #include "ops.h" #include "file.h" #include "launch.h" // 2005-07-18 creedon -#include "MoreFilesX.h" // 2006-05-31 creedon +#ifdef MACVERSION + #include "MoreFilesX.h" // 2006-05-31 creedon + +#endif // MACVERSION + + #define flaux false /*if true, we're running under the A/UX operating system*/ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
|
From: <cre...@us...> - 2006-07-08 01:12:14
|
Revision: 1455 Author: creecode Date: 2006-07-07 18:12:12 -0700 (Fri, 07 Jul 2006) ViewCVS: http://svn.sourceforge.net/frontierkernel/?rev=1455&view=rev Log Message: ----------- minor code formatting tweaks Modified Paths: -------------- Frontier/branches/FSRef_Migration/Common/headers/shelltypes.h Modified: Frontier/branches/FSRef_Migration/Common/headers/shelltypes.h =================================================================== --- Frontier/branches/FSRef_Migration/Common/headers/shelltypes.h 2006-07-08 01:11:00 UTC (rev 1454) +++ Frontier/branches/FSRef_Migration/Common/headers/shelltypes.h 2006-07-08 01:12:12 UTC (rev 1455) @@ -177,43 +177,16 @@ #ifdef WIN95VERSION -typedef struct tyfilespec { + typedef struct tyfilespec { - long volumeID; - char fullSpecifier [258]; - - } tyfilespec, *ptrfilespec, **hdlfilespec; + long volumeID; + char fullSpecifier [258]; + + } tyfilespec, *ptrfilespec, **hdlfilespec; #define fsname ( fs ) ( fs ) -> fullSpecifier #endif // WIN95VERSION - -/* #ifdef NEWFILESPECTYPE - typedef struct newtyfilespec { - - short fileTypeID; - - short lengthOfFileSpecifier; - - long volumeID; - - char fullSpecifier[258]; - - Handle fileSpecifier; - - long macSpecifier; - } tyfilespec, *ptrfilespec, **hdlfilespec; - - #define fsname(fs) (fs)->fullSpecifier - -#else - typedef FSSpec tyfilespec, *ptrfilespec, **hdlfilespec; - - #define fsname(fs) (fs)->name #endif -*/ - -#endif - This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
|
From: <cre...@us...> - 2006-07-08 01:11:04
|
Revision: 1454 Author: creecode Date: 2006-07-07 18:11:00 -0700 (Fri, 07 Jul 2006) ViewCVS: http://svn.sourceforge.net/frontierkernel/?rev=1454&view=rev Log Message: ----------- call clearbytes once at top of coercetofilespec function Modified Paths: -------------- Frontier/branches/FSRef_Migration/Common/source/langvalue.c Modified: Frontier/branches/FSRef_Migration/Common/source/langvalue.c =================================================================== --- Frontier/branches/FSRef_Migration/Common/source/langvalue.c 2006-07-08 01:08:04 UTC (rev 1453) +++ Frontier/branches/FSRef_Migration/Common/source/langvalue.c 2006-07-08 01:11:00 UTC (rev 1454) @@ -3035,14 +3035,10 @@ if (flinhibitnilcoercion) return (false); - clearbytes (&fs, sizeof (fs)); - break; case longvaluetype: - if ((*v).data.longvalue == 0) - clearbytes (&fs, sizeof (fs)); - else + if ( (*v).data.longvalue != 0) langcoerceerror (v, filespecvaluetype); break; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
|
From: <cre...@us...> - 2006-07-08 01:08:08
|
Revision: 1453 Author: creecode Date: 2006-07-07 18:08:04 -0700 (Fri, 07 Jul 2006) ViewCVS: http://svn.sourceforge.net/frontierkernel/?rev=1453&view=rev Log Message: ----------- minor code formatting tweaks Modified Paths: -------------- Frontier/branches/FSRef_Migration/Common/source/langsystypes.c Modified: Frontier/branches/FSRef_Migration/Common/source/langsystypes.c =================================================================== --- Frontier/branches/FSRef_Migration/Common/source/langsystypes.c 2006-07-08 01:07:17 UTC (rev 1452) +++ Frontier/branches/FSRef_Migration/Common/source/langsystypes.c 2006-07-08 01:08:04 UTC (rev 1453) @@ -564,7 +564,7 @@ #ifdef MACVERSION - boolean flcreatefrompath = FALSE; + boolean flcreatefrompath = false; // bigstring bs; OSErr err; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
|
From: <cre...@us...> - 2006-07-08 01:07:19
|
Revision: 1452 Author: creecode Date: 2006-07-07 18:07:17 -0700 (Fri, 07 Jul 2006) ViewCVS: http://svn.sourceforge.net/frontierkernel/?rev=1452&view=rev Log Message: ----------- minor code formatting tweaks in fileloopguts function added extendfilespec call Modified Paths: -------------- Frontier/branches/FSRef_Migration/Common/source/langevaluate.c Modified: Frontier/branches/FSRef_Migration/Common/source/langevaluate.c =================================================================== --- Frontier/branches/FSRef_Migration/Common/source/langevaluate.c 2006-07-08 01:03:35 UTC (rev 1451) +++ Frontier/branches/FSRef_Migration/Common/source/langevaluate.c 2006-07-08 01:07:17 UTC (rev 1452) @@ -37,12 +37,16 @@ #include "langsystem7.h" #include "oplist.h" #include "ops.h" + #ifdef flcomponent + #include "osacomponent.h" + #endif #ifdef MACVERSION + #include <sys/param.h> #include "MoreFilesX.h" #endif @@ -547,12 +551,15 @@ #ifdef MACVERSION - FSSpec fsfoldert; + FSSpec fst; + tyfilespec fsfoldert; + + ( void ) extendfilespec ( fsfolder, &fsfoldert ); - FSRefMakeFSSpec ( &( *fsfolder ).fsref, &fsfoldert ); + FSRefMakeFSSpec ( &fsfoldert.fsref, &fst ); - if ( isemptystring ( fsfoldert.name ) ) /*loop over mounted volumes*/ - fl = diskinitloop (nil, &hfileloop); + if ( isemptystring ( fst.name ) ) // loop over mounted volumes + fl = diskinitloop ( nil, &hfileloop ); else #endif @@ -562,8 +569,8 @@ if (!fl) return (false); - while (filenextloop (hfileloop, &fs, &flfolder)) { /*get the next file in the directory*/ - + while (filenextloop (hfileloop, &fs, &flfolder)) { // get the next file in the directory + if ((ctlevels != -1) && flfolder) { if (ctlevels > 0) { @@ -2149,5 +2156,3 @@ return (true); /*fell through the bottom of the list*/ } /*evaluatelist*/ - - This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
|
From: <cre...@us...> - 2006-07-08 01:03:37
|
Revision: 1451 Author: creecode Date: 2006-07-07 18:03:35 -0700 (Fri, 07 Jul 2006) ViewCVS: http://svn.sourceforge.net/frontierkernel/?rev=1451&view=rev Log Message: ----------- minor code formatting tweaks added extendfilespec to more cases of filefunctionvalue where needed 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-07-08 00:59:15 UTC (rev 1450) +++ Frontier/branches/FSRef_Migration/Common/source/fileverbs.c 2006-07-08 01:03:35 UTC (rev 1451) @@ -450,17 +450,6 @@ return (false); } - /* - - is this needed any more, FSRef migration? - - #ifdef MACVERSION - - (*fsvol).parID = fsRtParID; - - #endif - */ - break; default: @@ -557,7 +546,7 @@ if ( fs.path == NULL ) FSRefGetNameStr255 ( &fs.fsref, bs ); else - CFStringToStr255 ( fs.path, bs ); + CFStringRefToStr255 ( fs.path, bs ); #endif @@ -2719,15 +2708,15 @@ flnextparamislast = true; if ( ! getfilespecvalue ( hp1, 1, &fs ) ) - return ( FALSE ); + return ( false ); if ( ! extendfilespec ( &fs, &fst ) ) - return ( FALSE ); + return ( false ); if ( ! deletefile ( &fst ) ) - return ( FALSE ); + return ( false ); - return ( setbooleanvalue ( TRUE, vreturned ) ); + return ( setbooleanvalue ( true, vreturned ) ); } // filedeleteverb @@ -2742,7 +2731,7 @@ // 1992-06-02 dmb: make sure that destination path doesn't end in a colon; otherwise pathtofilespec will fail // - boolean fl = FALSE; + boolean fl = false; tyfilespec fs, fsalias; if (!langcanusealiases ()) @@ -2780,7 +2769,7 @@ fsaliast.vRefNum = catinfo.volume; fsaliast.parID = catinfo.nodeID; - CFStringToStr255 ( fsalias.path, fsaliast.name ); + CFStringRefToStr255 ( fsalias.path, fsaliast.name ); fl = MakeAliasFile ( &fst, &fsaliast ); @@ -2895,6 +2884,7 @@ #endif + static boolean filefunctionvalue (short token, hdltreenode hparam1, tyvaluerecord *vreturned, bigstring bserror) { // @@ -3041,6 +3031,8 @@ if (!getdatevalue (hp1, 2, &when)) break; + ( void ) extendfilespec ( &fs, &fs ); + if (!setfilecreated (&fs, when)) break; @@ -3061,6 +3053,8 @@ if (!getdatevalue (hp1, 2, &when)) break; + ( void ) extendfilespec ( &fs, &fs ); + if (!setfilemodified (&fs, when)) break; @@ -3132,6 +3126,8 @@ if (!getpathvalue (hp1, 1, &fs)) break; + ( void ) extendfilespec ( &fs, &fs ); + if (!fileisbusy (&fs, &(*v).data.flvalue)) break; @@ -3139,17 +3135,21 @@ } case filehasbundlefunc: { + tyfilespec fs; flnextparamislast = true; - if (!getpathvalue (hp1, 1, &fs)) + if ( ! getpathvalue ( hp1, 1, &fs ) ) break; - if (!filehasbundle (&fs, &(*v).data.flvalue)) + ( void ) extendfilespec ( &fs, &fs ); + + if ( ! filehasbundle ( &fs, &( *v ).data.flvalue ) ) break; - return (true); + return ( true ); + } case filesetbundlefunc: { @@ -3170,6 +3170,8 @@ if (!flfolder) { + ( void ) extendfilespec ( &fs, &fs ); + if (!filesetbundle (&fs, flbundle)) break; @@ -3420,8 +3422,6 @@ return (true); - // return ( filenewverb ( hp1, v ) ); - } case newfolderfunc: { @@ -3458,6 +3458,8 @@ else */ + ( void ) extendfilespec ( &fs, &fs ); + if (!renamefile (&fs, bs)) break; @@ -3477,6 +3479,8 @@ if (!getpathvalue (hp1, 2, &fs2)) /*bs2 holds the new name*/ break; + ( void ) extendfilespec ( &fs1, &fs1 ); + if (!movefile (&fs1, &fs2)) break; @@ -3540,6 +3544,8 @@ if (!getvolumevalue (hp1, 1, &fs)) break; + ( void ) extendfilespec ( &fs, &fs ); + if (!getfreespace (&fs, &ctbytes)) break; @@ -3556,6 +3562,8 @@ if (!getvolumevalue (hp1, 1, &fs)) break; + ( void ) extendfilespec ( &fs, &fs ); + if (!getvolumesize (&fs, &ctbytes)) break; @@ -3572,6 +3580,8 @@ if (!getvolumevalue (hp1, 1, &fs)) break; + ( void ) extendfilespec ( &fs, &fs ); + if (!langgetextendedvolumeinfo (&fs, &totalbytes, &freebytes)) break; @@ -3588,6 +3598,8 @@ if (!getvolumevalue (hp1, 1, &fs)) break; + ( void ) extendfilespec ( &fs, &fs ); + if (!langgetextendedvolumeinfo (&fs, &totalbytes, &freebytes)) break; @@ -3604,6 +3616,8 @@ if (!getvolumevalue (hp1, 1, &fs)) break; + ( void ) extendfilespec ( &fs, &fs ); + if (!getvolumeblocksize (&fs, &ctbytes)) break; @@ -3619,6 +3633,8 @@ if (!getvolumevalue (hp1, 1, &fs)) break; + ( void ) extendfilespec ( &fs, &fs ); + if (!filesonvolume (&fs, &ctfiles)) break; @@ -3634,6 +3650,8 @@ if (!getvolumevalue (hp1, 1, &fs)) break; + ( void ) extendfilespec ( &fs, &fs ); + if (!foldersonvolume (&fs, &ctfolders)) break; @@ -3757,6 +3775,8 @@ if (!getvolumevalue (hp1, 1, &fs)) break; + ( void ) extendfilespec ( &fs, &fs ); + if (!unmountvolume (&fs)) break; @@ -3941,6 +3961,8 @@ if (!fifopenfile (&fs, (long) currentprocess)) return (false); + ( void ) extendfilespec ( &fs, &fs ); + fl = getmp3info (&fs, &seconds, &bitrate, &frequency, &offset, &flvariablebitrate); if (!fifclosefile (&fs)) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
|
From: <cre...@us...> - 2006-07-08 00:59:20
|
Revision: 1450 Author: creecode Date: 2006-07-07 17:59:15 -0700 (Fri, 07 Jul 2006) ViewCVS: http://svn.sourceforge.net/frontierkernel/?rev=1450&view=rev Log Message: ----------- renamed CFStringToStr255 function to CFStringRefToStr255 Modified Paths: -------------- Frontier/branches/FSRef_Migration/Common/source/filepath.c Modified: Frontier/branches/FSRef_Migration/Common/source/filepath.c =================================================================== --- Frontier/branches/FSRef_Migration/Common/source/filepath.c 2006-07-08 00:57:27 UTC (rev 1449) +++ Frontier/branches/FSRef_Migration/Common/source/filepath.c 2006-07-08 00:59:15 UTC (rev 1450) @@ -210,7 +210,7 @@ pushchar ( ':', bspath ); - CFStringToStr255 ( fst.path, bs ); + CFStringRefToStr255 ( fst.path, bs ); pushstring ( bs, bspath ); @@ -475,7 +475,7 @@ if ( ( *fs ).path != NULL ) { - if ( CFStringToStr255 ( ( *fs ).path, bsfile ) ) + if ( CFStringRefToStr255 ( ( *fs ).path, bsfile ) ) return ( true ); } else { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
|
From: <cre...@us...> - 2006-07-08 00:57:30
|
Revision: 1449 Author: creecode Date: 2006-07-07 17:57:27 -0700 (Fri, 07 Jul 2006) ViewCVS: http://svn.sourceforge.net/frontierkernel/?rev=1449&view=rev Log Message: ----------- minor code formatting tweaks in setfserrorparam function on Mac check that FSRef is valid before trying to set bs on Mac in filegetinfo function remove extraneous call to setfserrorparam, also check that FSRef is valid before getting info Modified Paths: -------------- Frontier/branches/FSRef_Migration/Common/source/fileops.c Modified: Frontier/branches/FSRef_Migration/Common/source/fileops.c =================================================================== --- Frontier/branches/FSRef_Migration/Common/source/fileops.c 2006-07-08 00:48:38 UTC (rev 1448) +++ Frontier/branches/FSRef_Migration/Common/source/fileops.c 2006-07-08 00:57:27 UTC (rev 1449) @@ -132,7 +132,7 @@ void setfserrorparam ( const tyfilespec *fs ) { // - // 2006-06-25 creedon; for Mac, FSRef-ized + // 2006-07-05 creedon; for Mac, FSRef-ized // #ifdef MACVERSION @@ -140,9 +140,10 @@ bigstring bs; if ( ( *fs ).path != NULL ) - CFStringToStr255 ( ( *fs ).path, bs ); + CFStringRefToStr255 ( ( *fs ).path, bs ); else - FSRefGetNameStr255 ( &( *fs ).fsref, bs ); + if ( FSRefValid ( &( *fs ).fsref ) ) + FSRefGetNameStr255 ( &( *fs ).fsref, bs ); setoserrorparam ( bs ); @@ -154,7 +155,7 @@ #endif - } /* setfserrorparam */ + } // setfserrorparam boolean endswithpathsep (bigstring bs) { @@ -253,11 +254,9 @@ 4/26/96 dmb: use mask, not BitTst (a toolbox call) */ - /* - return (BitTst (&pb->dirInfo.ioFlAttrib, 3)); - */ - return ((pb->dirInfo.ioFlAttrib & ioDirMask) != 0); - } /*foldertest*/ + return ( ( pb -> dirInfo.ioFlAttrib & kioFlAttribDirMask ) != 0 ); + + } // foldertest /* @@ -520,8 +519,8 @@ ( *info ).vnum = ( *( *pb ).catInfo ).volume; - if ( ( *info ).dirid == fsRtParID) - filegetvolumeinfo (( *info ).vnum, info); + if ( ( *info ).dirid == fsRtParID ) + filegetvolumeinfo ( ( *info ).vnum, info ); else ( *info ).flvolume = false; @@ -854,7 +853,7 @@ #endif -boolean filegetinfo (const ptrfilespec fs, tyfileinfo *info) { +boolean filegetinfo ( const ptrfilespec fs, tyfileinfo *info ) { // // 2006-06-25 creedon: for Mac, FSRef-ized @@ -864,26 +863,22 @@ #ifdef MACVERSION - setfserrorparam ( fs ); + setfserrorparam ( fs ); // in case error message takes a filename parameter if ( ( *fs ).path != NULL ) return ( ! oserror ( fnfErr ) ); + if ( ! FSRefValid ( &( *fs ).fsref ) ) + return ( false ); + FSCatalogInfo catinfo; FSRefParam pb; OSErr err; clearbytes ( &pb, sizeof ( pb ) ); - setfserrorparam ( fs ); // in case error message takes a filename parameter - pb.catInfo = &catinfo; - /* - pb.outName = NULL; - pb.parentRef = NULL; - */ - pb.ref = &( *fs ).fsref; - // pb.spec = NULL; + pb.ref = &( *fs ).fsref; pb.whichInfo = kFSCatInfoGettableInfo; err = PBGetCatalogInfoSync ( &pb ); @@ -891,22 +886,10 @@ if ( oserror ( err ) ) return ( false ); - /* - if (isvolumefilespec (pfs)) { - - return (filegetfsvolumeinfo (pfs, info)); - } - */ + filegetinfofrompb ( &pb, info ); - /* - if (!getmacfileinfo (fs, &pb)) - return (false); - */ + #endif // MACVERSION - filegetinfofrompb (&pb, info); - - #endif - #ifdef WIN95VERSION HANDLE findHandle; @@ -914,7 +897,7 @@ WIN32_FIND_DATA fileinfo; char fn[300]; - clearbytes (info, sizeof (tyfileinfo)); /*init all fields to zero*/ + clearbytes (info, sizeof (tyfileinfo)); // init all fields to zero info->filecreator = ' '; info->filetype = ' '; @@ -924,7 +907,7 @@ copystring (fsname (fs), fn); - /*if ends with \ get ride of it... and handle the root*/ + // if ends with \ get ride of it... and handle the root cleanendoffilename (fn); @@ -944,7 +927,8 @@ FindClose(findHandle); - //Set the file busy flag (this should be in winsetfileinfo, but we do not have the filename there) + // Set the file busy flag (this should be in winsetfileinfo, but we do not have the filename there) + if (info->flfolder) { strcat (stringbaseaddress (fn), "\\*"); @@ -953,15 +937,15 @@ findHandle = FindFirstFile (stringbaseaddress(fn), &fileinfo); if (findHandle != INVALID_HANDLE_VALUE) { - info->flbusy = true; //Found something + info->flbusy = true; // Found something while ((strcmp (fileinfo.cFileName, ".") == 0) || (strcmp (fileinfo.cFileName, "..") == 0)) { info->flbusy = false; // Just . or .. if (FindNextFile (findHandle, &fileinfo)) - info->flbusy = true; //Found something else... + info->flbusy = true; // Found something else... else - break; //exit while loop if FindNext fails (this is normal) + break; // exit while loop if FindNext fails (this is normal) } FindClose (findHandle); @@ -980,9 +964,10 @@ } } - #endif + #endif // WIN95VERSION return (true); + } // filegetinfo @@ -1844,7 +1829,7 @@ return ( false ); if ( oserror ( FSCopyObject ( &( *fsource ).fsref, &( *fdest ).fsref, 0, kFSCatInfoNone, kDupeActionReplace, &name, - FALSE, FALSE, NULL, NULL, NULL, NULL ) ) ) + false, false, NULL, NULL, NULL, NULL ) ) ) return ( false ); return ( true ); // the file copy was successful @@ -2958,7 +2943,7 @@ setfserrorparam ( fs ); - return ( ! oserror ( FSResolveAliasFile ( &( *fs ).fsref, TRUE, &flfolder, &flalias ) ) ); + return ( ! oserror ( FSResolveAliasFile ( &( *fs ).fsref, true, &flfolder, &flalias ) ) ); } // fileresolvealias @@ -3654,8 +3639,6 @@ *fsout = fst; - // ( *fsin ).path = NULL; - #endif // MACVERSION return ( true ); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
|
From: <cre...@us...> - 2006-07-08 00:48:40
|
Revision: 1448 Author: creecode Date: 2006-07-07 17:48:38 -0700 (Fri, 07 Jul 2006) ViewCVS: http://svn.sourceforge.net/frontierkernel/?rev=1448&view=rev Log Message: ----------- minor code formatting tweaks Modified Paths: -------------- Frontier/branches/FSRef_Migration/Common/headers/fileloop.h Modified: Frontier/branches/FSRef_Migration/Common/headers/fileloop.h =================================================================== --- Frontier/branches/FSRef_Migration/Common/headers/fileloop.h 2006-07-08 00:47:26 UTC (rev 1447) +++ Frontier/branches/FSRef_Migration/Common/headers/fileloop.h 2006-07-08 00:48:38 UTC (rev 1448) @@ -41,7 +41,7 @@ extern boolean diskinitloop (tyfileloopcallback, Handle *); -extern boolean fileinitloop (const ptrfilespec, tyfileloopcallback, Handle *); +extern boolean fileinitloop ( const ptrfilespec, tyfileloopcallback, Handle * ); extern void fileendloop (Handle); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
|
From: <cre...@us...> - 2006-07-08 00:47:28
|
Revision: 1447 Author: creecode Date: 2006-07-07 17:47:26 -0700 (Fri, 07 Jul 2006) ViewCVS: http://svn.sourceforge.net/frontierkernel/?rev=1447&view=rev Log Message: ----------- on Mac in fileloop skip .vol and Spotlight directories minor code formatting tweaks Modified Paths: -------------- Frontier/branches/FSRef_Migration/Common/source/fileloop.c Modified: Frontier/branches/FSRef_Migration/Common/source/fileloop.c =================================================================== --- Frontier/branches/FSRef_Migration/Common/source/fileloop.c 2006-07-08 00:43:24 UTC (rev 1446) +++ Frontier/branches/FSRef_Migration/Common/source/fileloop.c 2006-07-08 00:47:26 UTC (rev 1447) @@ -401,20 +401,27 @@ if (oserror (errcode)) // errcode != noErr goto error; - // if it's a folder, insert a colon at the end of the file name + if ( fs.parID == fsRtParID ) { - if (foldertestcipbr (&pb)) - if (!pushchar (':', bsfile)) - goto error; - - /* - if (filefilter != nil) { - - if (!(*filefilter) (bspath, bsfile)) + if ( equalstrings ( bsfile, "\x0F" ".Spotlight-V100" ) ) // skip Spotlight continue; + + if ( equalstrings ( bsfile, "\x04" ".vol" ) ) // skip .vol ( volfs ) + continue; } - */ + if ( foldertestcipbr ( &pb ) ) + if ( ! pushchar ( ':', bsfile ) ) // if it's a folder, insert a colon at the end of the file name + goto error; + + // + // if (filefilter != nil) { + // + // if (!(*filefilter) (bspath, bsfile)) + // continue; + // } + // + if (!newtexthandle (bsfile, &hstring)) goto error; @@ -672,7 +679,6 @@ OSErr err; FSSpec fsfile; - if (!opgetlisthandle ((**h).hfilelist, (**h).ixdirectory++, nil, &hdata)) return (false); @@ -718,11 +724,11 @@ if ((err == noErr) || (err == fnfErr)) { // 3.0.4b1 dmb - FSpMakeFSRef ( &fsfile, &( *fsfilet ).fsref ); + err = FSpMakeFSRef ( &fsfile, &( *fsfilet ).fsref ); getfilespecparent ( &( *fsfilet ) ); - return (true); + return ( true ); } @@ -741,7 +747,7 @@ getfilespecparent ( &( *fsfilet ) ); - return (true); + return ( true ); } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
|
From: <cre...@us...> - 2006-07-08 00:43:27
|
Revision: 1446 Author: creecode Date: 2006-07-07 17:43:24 -0700 (Fri, 07 Jul 2006) ViewCVS: http://svn.sourceforge.net/frontierkernel/?rev=1446&view=rev Log Message: ----------- minor code formatting tweaks renamed CFStringToStr255 function to CFStringRefToStr255 Modified Paths: -------------- Frontier/branches/FSRef_Migration/Common/headers/file.h Modified: Frontier/branches/FSRef_Migration/Common/headers/file.h =================================================================== --- Frontier/branches/FSRef_Migration/Common/headers/file.h 2006-07-08 00:41:55 UTC (rev 1445) +++ Frontier/branches/FSRef_Migration/Common/headers/file.h 2006-07-08 00:43:24 UTC (rev 1446) @@ -433,7 +433,7 @@ extern boolean CFStringRefToHFSUniStr255 ( CFStringRef, HFSUniStr255 * ); // 2006-06-07 creedon - extern boolean CFStringToStr255 ( CFStringRef , StringPtr ); // 2006-06-07 creedon + extern boolean CFStringRefToStr255 ( CFStringRef, StringPtr ); // 2006-06-07 creedon extern boolean FSRefGetNameStr255 ( const FSRef *, Str255 ); // 2006-06-07 creedon This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
|
From: <cre...@us...> - 2006-07-08 00:41:58
|
Revision: 1445 Author: creecode Date: 2006-07-07 17:41:55 -0700 (Fri, 07 Jul 2006) ViewCVS: http://svn.sourceforge.net/frontierkernel/?rev=1445&view=rev Log Message: ----------- minor code formatting tweaks removed include SetUpA5.h renamed CFStringToStr255 function to CFStringRefToStr255 fix problems with conversions of CFStringRef to other formats by using MIN macro from sys/params.h Modified Paths: -------------- Frontier/branches/FSRef_Migration/Common/source/file.c Modified: Frontier/branches/FSRef_Migration/Common/source/file.c =================================================================== --- Frontier/branches/FSRef_Migration/Common/source/file.c 2006-07-04 07:45:48 UTC (rev 1444) +++ Frontier/branches/FSRef_Migration/Common/source/file.c 2006-07-08 00:41:55 UTC (rev 1445) @@ -31,6 +31,7 @@ #ifdef MACVERSION #include "MoreFilesX.h" + #include <sys/param.h> #endif @@ -51,16 +52,6 @@ #include "langinternal.h" /*for langbackgroundtask*/ -#ifdef MACVERSION -#ifdef flcomponent - - #include "SetUpA5.h" - -#endif -#endif - - - boolean equalfilespecs (const ptrfilespec fs1, const ptrfilespec fs2) { // @@ -916,42 +907,47 @@ // // the caller must dispose of the CFString // + // 2006-07-06 creedon: created + // HFSUniStr255 hname; OSErr err = FSGetCatalogInfo ( fsRef, kFSCatInfoNone, NULL, &hname, NULL, NULL ); *name = CFStringCreateWithCharacters ( kCFAllocatorDefault, hname.unicode, hname.length ); - // CFRelease ( name ); - return ( err ); } // FSRefGetName - boolean CFStringToStr255 ( CFStringRef input, StringPtr output ) { + boolean CFStringRefToStr255 ( CFStringRef input, StringPtr output ) { - output [ 0 ] = CFStringGetBytes ( input, CFRangeMake ( 0, ( ( CFStringGetLength ( input ) >= 255 ) ? - 255 : CFStringGetLength ( input ) ) ), kTextEncodingMacRoman, '^', false, - &( output [1] ), 255, NULL ); + // + // 2006-07-06 creedon: created, cribbed from < http://developer.apple.com/carbon/tipsandtricks.html#CFStringFromUnicode > + // + + output [ 0 ] = CFStringGetBytes ( input, CFRangeMake ( 0, MIN ( CFStringGetLength ( input ), 255 ) ), + kTextEncodingMacRoman, '^', false, &( output [ 1 ] ), 255, NULL ); - // MIN ( CFStringGetLength ( input ), 255 ) - if ( output [ 0 ] == 0 ) return ( false ); return ( true ); - } // CFStringToStr255 + } // CFStringRefToStr255 boolean HFSUniStr255ToStr255 ( ConstHFSUniStr255Param input, StringPtr output ) { + // + // 2006-07-06 creedon; created + // + CFStringRef csr; csr = CFStringCreateWithCharacters ( kCFAllocatorDefault, input -> unicode, input -> length ); - CFStringToStr255 ( csr, output ); + CFStringRefToStr255 ( csr, output ); CFRelease ( csr ); @@ -962,6 +958,10 @@ boolean FSRefGetNameStr255 ( const FSRef *fsRef, Str255 bsname ) { + // + // 2006-07-06 creedon; created + // + CFStringRef csr; OSErr err = FSRefGetName ( fsRef, &csr ); @@ -983,33 +983,18 @@ boolean bigstringToHFSUniStr255 ( const bigstring bs, HFSUniStr255 *output ) { - CFStringRef temp = CFStringCreateWithPascalString (kCFAllocatorDefault, bs, kCFStringEncodingMacRoman ); + // + // 2006-07-06 creedon; created + // + + CFStringRef csr = CFStringCreateWithPascalString (kCFAllocatorDefault, bs, kCFStringEncodingMacRoman ); - output -> length = CFStringGetLength(temp); + ( *output ).length = CFStringGetLength ( csr ); - CFStringGetCharacters(temp, CFRangeMake(0, output -> length), output -> unicode); + CFStringGetCharacters ( csr, CFRangeMake ( 0, ( *output ).length ), ( *output ).unicode ); - CFRelease ( temp ); - - /* - HFSUniStr255 name; - unsigned long len; - OSStatus status; - // TextEncoding encoding = ; - TextToUnicodeInfo info; - - if ( CreateTextToUnicodeInfoByEncoding ( CreateTextEncoding ( kTextEncodingMacRoman, - kTextEncodingDefaultVariant, kTextEncodingDefaultFormat ), &info ) != noErr ) - return ( false ); - - status = ConvertFromPStringToUnicode ( info, bs, sizeof ( name.unicode ), ( name -> length ), name.unicode ); + CFRelease ( csr ); - DisposeTextToUnicodeInfo ( &info ); - - if ( status != noErr ) - return ( false ); - */ - return ( true ); } // bigstringToHFSUniStr255 @@ -1017,34 +1002,19 @@ boolean CFStringRefToHFSUniStr255 ( CFStringRef input, HFSUniStr255 *output ) { - output -> length = CFStringGetBytes ( input, CFRangeMake ( 0, ( ( CFStringGetLength ( input ) >= 255 ) ? - CFStringGetLength ( input ) : 255 ) ), - kCFStringEncodingUnicode, 0, false, ( UInt8 * ) ( output -> unicode ), 255, - NULL ); + // + // 2006-07-06 creedon: created, cribbed from < http://developer.apple.com/carbon/tipsandtricks.html#CFStringFromUnicode > + // + + ( *output ).length = CFStringGetBytes ( input, CFRangeMake (0, MIN ( CFStringGetLength ( input ), 255 ) ), + kCFStringEncodingUnicode, 0, false, ( UInt8 * ) ( *output).unicode, 255, NULL ); - if ( output -> length == 0 ) + if ( ( *output ).length == 0 ) return ( false ); return ( true ); } // CFStringRefToHFSUniStr255 - - /* bigstring fsname ( const ptrfilespec fs ) { - - bigstring bsname; - - CFStringRef cname; - - FSRefGetName ( ( *fs ).ref, &cname ); - - CFStringToStr255 ( cname, &bsname ); - - CFRelease ( cname ); - - return ( bsname ); - - } */ - #endif This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
|
From: <cre...@us...> - 2006-07-04 07:45:51
|
Revision: 1444 Author: creecode Date: 2006-07-04 00:45:48 -0700 (Tue, 04 Jul 2006) ViewCVS: http://svn.sourceforge.net/frontierkernel/?rev=1444&view=rev Log Message: ----------- FSRef-ized Modified Paths: -------------- Frontier/branches/FSRef_Migration/Common/source/dbverbs.c Modified: Frontier/branches/FSRef_Migration/Common/source/dbverbs.c =================================================================== --- Frontier/branches/FSRef_Migration/Common/source/dbverbs.c 2006-07-04 07:43:44 UTC (rev 1443) +++ Frontier/branches/FSRef_Migration/Common/source/dbverbs.c 2006-07-04 07:45:48 UTC (rev 1444) @@ -477,6 +477,8 @@ if (!getfilespecvalue (hparam1, pnum, ptrfs)) return (false); + ( void ) extendfilespec ( ptrfs, ptrfs ); + for (hodb = hodblist; hodb != nil; hodb = (**hodb).hnext) { if ( equalfilespecs ( &( **hodb ).fs, ptrfs ) ) { @@ -523,7 +525,8 @@ } return (true); - } /*getodbvalue*/ + + } // getodbvalue static boolean dbclosefile (hdlodbrecord hodb) { @@ -672,10 +675,11 @@ return (false); } - + listlink ((hdllinkedlist) hodblist, (hdllinkedlist) hodb); return (setbooleanvalue (true, vreturned)); + } // dbopenverb This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
|
From: <cre...@us...> - 2006-07-04 07:43:47
|
Revision: 1443 Author: creecode Date: 2006-07-04 00:43:44 -0700 (Tue, 04 Jul 2006) ViewCVS: http://svn.sourceforge.net/frontierkernel/?rev=1443&view=rev Log Message: ----------- fixed getmachinename function to work on Mac OS X Modified Paths: -------------- Frontier/branches/FSRef_Migration/Common/source/fileops.c Modified: Frontier/branches/FSRef_Migration/Common/source/fileops.c =================================================================== --- Frontier/branches/FSRef_Migration/Common/source/fileops.c 2006-07-04 07:42:05 UTC (rev 1442) +++ Frontier/branches/FSRef_Migration/Common/source/fileops.c 2006-07-04 07:43:44 UTC (rev 1443) @@ -192,14 +192,28 @@ boolean getmachinename (bigstring bsname) { + // + // 2006-05-15 creedon: fix to work on Mac OS X + // + boolean fl; + #ifdef MACVERSION + + fl = CFStringGetPascalString (CSCopyMachineName (), bsname, sizeof (bigstring), kCFStringEncodingMacRoman); + + if (!fl) + setemptystring (bsname); + + #endif + #ifdef WIN95VERSION + DWORD len; - len = sizeof(bigstring) - 2; + len = sizeof (bigstring) - 2; - fl = GetComputerName (stringbaseaddress(bsname), &len); + fl = GetComputerName (stringbaseaddress (bsname), &len); if (fl) setstringlength (bsname, len); @@ -207,19 +221,9 @@ setemptystring (bsname); #endif - #ifdef MACVERSION - StringHandle hstring = GetString (-16413); - - fl = hstring != nil; - - if (fl) - texthandletostring ((Handle) hstring, bsname); - else - setemptystring (bsname); - #endif - return (fl); - } /*getmachinename*/ + + } // getmachinename #ifdef MACVERSION This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
|
From: <cre...@us...> - 2006-07-04 07:42:10
|
Revision: 1442 Author: creecode Date: 2006-07-04 00:42:05 -0700 (Tue, 04 Jul 2006) ViewCVS: http://svn.sourceforge.net/frontierkernel/?rev=1442&view=rev Log Message: ----------- minor formatting tweaks Modified Paths: -------------- Frontier/branches/FSRef_Migration/Common/source/langpack.c Modified: Frontier/branches/FSRef_Migration/Common/source/langpack.c =================================================================== --- Frontier/branches/FSRef_Migration/Common/source/langpack.c 2006-07-04 07:41:12 UTC (rev 1441) +++ Frontier/branches/FSRef_Migration/Common/source/langpack.c 2006-07-04 07:42:05 UTC (rev 1442) @@ -219,7 +219,7 @@ break; } - case rgbvaluetype: { /* 2006-04-20 sethdill & aradke */ + case rgbvaluetype: { // 2006-04-20 sethdill & aradke diskrgb rgbdiskk; rgbtodiskrgb (*val.data.rgbvalue, &rgbdiskk); @@ -284,6 +284,7 @@ #endif #ifdef version5orgreater + case filespecvaluetype: case aliasvaluetype: fl = langpackfileval (&val, &hdata); @@ -342,7 +343,8 @@ disposehandle ((Handle) hpackedvalue); return (fl); - } /*langpackvalue*/ + + } // langpackvalue boolean langpackverb (hdltreenode hparam1, tyvaluerecord *vreturned) { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
|
From: <cre...@us...> - 2006-07-04 07:41:16
|
Revision: 1441 Author: creecode Date: 2006-07-04 00:41:12 -0700 (Tue, 04 Jul 2006) ViewCVS: http://svn.sourceforge.net/frontierkernel/?rev=1441&view=rev Log Message: ----------- minor formatting tweaks Modified Paths: -------------- Frontier/branches/FSRef_Migration/Common/source/langsystypes.c Modified: Frontier/branches/FSRef_Migration/Common/source/langsystypes.c =================================================================== --- Frontier/branches/FSRef_Migration/Common/source/langsystypes.c 2006-07-03 20:06:44 UTC (rev 1440) +++ Frontier/branches/FSRef_Migration/Common/source/langsystypes.c 2006-07-04 07:41:12 UTC (rev 1441) @@ -555,6 +555,7 @@ #endif + boolean filespectoalias (const ptrfilespec fs, boolean flminimal, AliasHandle *halias) { // @@ -613,123 +614,128 @@ #ifdef MACVERSION -static boolean filespecvaltoalias (tyvaluerecord *val) { + static boolean filespecvaltoalias (tyvaluerecord *val) { - // - // 2006-06-24 creedon: FSRef-ized - // - - register hdlfilespec hfs; - tyfilespec fs; - AliasHandle halias; - - if (!langcanusealiases ()) - return (false); - - hfs = (hdlfilespec) (*val).data.filespecvalue; - - fs = **hfs; - - if (!filespectoalias (&fs, false, &halias)) - return (false); - - if (!setheapvalue ((Handle) halias, aliasvaluetype, val)) - return (false); - - releaseheaptmp ((Handle) hfs); - - return (true); - } /*filespecvaltoalias*/ + // + // 2006-06-24 creedon: FSRef-ized + // + + register hdlfilespec hfs; + tyfilespec fs; + AliasHandle halias; + + if (!langcanusealiases ()) + return (false); + + hfs = (hdlfilespec) (*val).data.filespecvalue; + + fs = **hfs; + + if (!filespectoalias (&fs, false, &halias)) + return (false); + + if (!setheapvalue ((Handle) halias, aliasvaluetype, val)) + return (false); + + releaseheaptmp ((Handle) hfs); + + return (true); + + } // filespecvaltoalias #endif boolean aliastostring (Handle halias, bigstring bs) { -#ifdef MACVERSION - - // - // 2006-06-24 creedon: FSRef-ized - // - // 1996-04-26 dmb: restored FollowFinderAlias code; must use if we get fnfErr. - // - // 2.1b9 dmb: use FollowFinderAlias to avoid mounting volumes during alias resolution - // - // 1993-04-12 dmb: accept fnfErr result from ResolveAlias - // - // 1991-10-04 dmb: if alias can't be resolved, just say what volume it's on. - // - - register AliasHandle h = (AliasHandle) halias; - short flchanged; - tyfilespec fs; - bigstring bsinfo; - AliasInfoType ix = asiAliasName; - OSErr err; - - if (!langcanusealiases ()) - return (false); - - err = FSFollowFinderAlias (nil, h, false, &fs.fsref, (Boolean *) &flchanged); - - if ((err == noErr) /*|| (err == fnfErr)*/ ) { + #ifdef MACVERSION - if (flchanged) - FSUpdateAlias (nil, &fs.fsref, h, (Boolean *) &flchanged); + // + // 2006-06-24 creedon: FSRef-ized + // + // 1996-04-26 dmb: restored FollowFinderAlias code; must use if we get fnfErr. + // + // 2.1b9 dmb: use FollowFinderAlias to avoid mounting volumes during alias resolution + // + // 1993-04-12 dmb: accept fnfErr result from ResolveAlias + // + // 1991-10-04 dmb: if alias can't be resolved, just say what volume it's on. + // - return (filespectopath (&fs, bs)); - } - - langgettypestring (aliasvaluetype, bs); - - /* - if (GetAliasInfo (h, asiVolumeName, bsinfo) == noErr) { //add the volume name + register AliasHandle h = (AliasHandle) halias; + short flchanged; + tyfilespec fs; + bigstring bsinfo; + AliasInfoType ix = asiAliasName; + OSErr err; - bigstring bsaliasondisk; + if (!langcanusealiases ()) + return (false); - langgetstringlist (unresolvedaliasstring, bsaliasondisk); + err = FSFollowFinderAlias (nil, h, false, &fs.fsref, (Boolean *) &flchanged); - parsedialogstring (bsaliasondisk, bs, bsinfo, nil, nil, bsaliasondisk); + if ((err == noErr) /* || (err == fnfErr) */ ) { + + if (flchanged) + FSUpdateAlias (nil, &fs.fsref, h, (Boolean *) &flchanged); + + return (filespectopath (&fs, bs)); + } - copystring (bsaliasondisk, bs); - } - */ - - setemptystring (bs); - - // get each path element out of the alias - while (GetAliasInfo (h, ix, bsinfo) == noErr) { + langgettypestring (aliasvaluetype, bs); - if (isemptystring (bsinfo)) // reached top of path hierarchy - break; + /* + if (GetAliasInfo (h, asiVolumeName, bsinfo) == noErr) { //add the volume name + + bigstring bsaliasondisk; + + langgetstringlist (unresolvedaliasstring, bsaliasondisk); + + parsedialogstring (bsaliasondisk, bs, bsinfo, nil, nil, bsaliasondisk); + + copystring (bsaliasondisk, bs); + } + */ - if (ix > asiAliasName) - pushchar (':', bsinfo); + setemptystring (bs); - if (!insertstring (bsinfo, bs)) - break; + // get each path element out of the alias + while (GetAliasInfo (h, ix, bsinfo) == noErr) { + + if (isemptystring (bsinfo)) // reached top of path hierarchy + break; + + if (ix > asiAliasName) + pushchar (':', bsinfo); + + if (!insertstring (bsinfo, bs)) + break; + + ++ix; + } - ++ix; - } + // add the volume name + GetAliasInfo (h, asiVolumeName, bsinfo); + + pushchar (':', bsinfo); + + insertstring (bsinfo, bs); + + return (true); + + #endif + + #ifdef WIN95VERSION - // add the volume name - GetAliasInfo (h, asiVolumeName, bsinfo); + langparamerror (unimplementedverberror, bsfunctionname); + + return (false); + + #endif - pushchar (':', bsinfo); - - insertstring (bsinfo, bs); - - return (true); -#endif + } // aliastostring -#ifdef WIN95VERSION - langparamerror (unimplementedverberror, bsfunctionname); - return (false); -#endif - } /*aliastostring*/ - - boolean aliastofilespec ( AliasHandle halias, ptrfilespec fs ) { // @@ -1047,7 +1053,7 @@ disablelangerror (); - if (!filespectoalias (&fs, true, (AliasHandle *) &halias)) + if ( ! filespectoalias ( &fs, true, ( AliasHandle * ) &halias ) ) halias = nil; enablelangerror (); @@ -1100,13 +1106,14 @@ opdisposelist (hlist); return (fl); + } // langpackfileval boolean langunpackfileval (Handle hpacked, tyvaluerecord *vfile) { // - // 2006-06-24 creedon: for Mac, FSRef-zed + // 2006-07-01 creedon: clearbytes of fs first thing // // 5.0fc2 dmb: unpacking an alias on the pc, go straight for the path string // @@ -1117,7 +1124,7 @@ tyfilespec fs; boolean fl = false; - clearbytes ( &fs, sizeof ( tyfilespec ) ); + clearbytes ( &fs, sizeof ( fs ) ); if (!opunpacklist (hpacked, &hlist)) return (false); @@ -1167,30 +1174,40 @@ fl = opgetliststring (hlist, -1, filerecordpath, bspath); if (fl) { + // here we should check to see if the file path is from the correct platform??? + if (opgetliststring (hlist, -1, filerecordplatform, bsplat)) { + #ifdef MACVERSION + if (equalidentifiers (bsplat, bsplatformwin)) { - /* ERROR or Conversion HERE! */ + // ERROR or Conversion HERE! } + #endif #ifdef WIN95VERSION + if (equalidentifiers (bsplat, bsplatformmac)) { - /* ERROR or Conversion HERE! */ + // ERROR or Conversion HERE! } + #endif } fl = pathtofilespec (bspath, &fs); + } } if (fl) fl = newfilledhandle (&fs, filespecsize (fs), (Handle *) &(*vfile).data.filespecvalue); else { + // *** once we make tyfilespec the new record on both platforms, this will be ok // *** but for now, we need to make a string value + (*vfile).valuetype = stringvaluetype; fl = newtexthandle (bspath, &(*vfile).data.stringvalue); @@ -1199,14 +1216,17 @@ break; default: + assert (false); + break; } opdisposelist (hlist); return (fl); - } /*langunpackfileval*/ + + } // langunpackfileval #ifdef WIN95VERSION This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |