|
From: creedon <icr...@us...> - 2006-01-31 19:13:24
|
Update of /cvsroot/frontierkernel/Frontier/Common/source In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1540 Modified Files: resources.c Log Message: on mac os 9, error out when trying to use rez verbs to access data fork resources Index: resources.c =================================================================== RCS file: /cvsroot/frontierkernel/Frontier/Common/source/resources.c,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** resources.c 20 Dec 2005 22:31:51 -0000 1.6 --- resources.c 31 Jan 2006 19:13:16 -0000 1.7 *************** *** 35,38 **** --- 35,39 ---- #include "file.h" #include "resources.h" + #include "langinternal.h" /* 2006-01-30 creedon */ *************** *** 142,145 **** --- 143,148 ---- #ifdef MACVERSION /* + 2006-01-30 creedon: added check for non-carbon OS and trying to access the data fork of a file, error message + 2005-09-02 creedon: added support for fork parameter, see resources.c: openresourcefile and pushresourcefile */ *************** *** 149,154 **** HFSUniStr255 fork; FSRef myRef; #endif ! SetResLoad (false); --- 152,162 ---- HFSUniStr255 fork; FSRef myRef; + #else + if (forktype == datafork) { // if we're not on carbon then trying to use the data fork for resources is an error + langerrormessage ("\x4A" "Can't open the data fork for use with resources on this version of the OS."); + return (false); + } #endif ! SetResLoad (false); *************** *** 606,609 **** --- 614,619 ---- /* + 2006-01-30 creedon: added check for non-carbon OS and trying to access the data fork of a file, error message + 2005-09-02 creedon: added support for fork parameter, allows access to resources in data forks *************** *** 615,618 **** --- 625,633 ---- #if TARGET_API_MAC_CARBON == 1 FSRef myRef; + #else + if (forktype == datafork) { // if we're not on carbon then trying to use the data fork for resources is an error + langerrormessage ("\x4A" "Can't open the data fork for use with resources on this version of the OS."); + return (false); + } #endif |