|
From: creedon <icr...@us...> - 2005-09-16 01:55:57
|
Update of /cvsroot/frontierkernel/Frontier/Common/source In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv13137 Modified Files: shellfile.c fileverbs.c shellwindow.c Log Message: use resourcefork (which = 1) enum instead of 1 literal to access resource fork of file, easier maintainability Index: shellfile.c =================================================================== RCS file: /cvsroot/frontierkernel/Frontier/Common/source/shellfile.c,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** shellfile.c 7 Sep 2005 17:45:53 -0000 1.5 --- shellfile.c 16 Sep 2005 01:55:50 -0000 1.6 *************** *** 205,209 **** #ifdef MACVERSION if (config.flopenresfile) ! if (!openresourcefile (fspec, &rnum, 1)) /* 2005-09-02 creedon - added support for fork parameter, see resources.c: openresourcefile and pushresourcefile */ goto error; #endif --- 205,209 ---- #ifdef MACVERSION if (config.flopenresfile) ! if (!openresourcefile (fspec, &rnum, resourcefork)) /* 2005-09-02 creedon - added support for fork parameter, see resources.c: openresourcefile and pushresourcefile */ goto error; #endif *************** *** 428,432 **** #ifdef MACVERSION if (config.flopenresfile) ! if (!openresourcefile (fspec, &rnum, 1)) { /* 2005-09-02 creedon - added support for fork parameter, see resources.c: openresourcefile and pushresourcefile */ closefile (fnum); --- 428,432 ---- #ifdef MACVERSION if (config.flopenresfile) ! if (!openresourcefile (fspec, &rnum, resourcefork)) { /* 2005-09-02 creedon - added support for fork parameter, see resources.c: openresourcefile and pushresourcefile */ closefile (fnum); *************** *** 543,547 **** if (config.flopenresfile) { ! if (!openresourcefile (fspec, &rnum, 1)) { /* 2005-09-02 creedon - added support for fork parameter, see resources.c: openresourcefile and pushresourcefile */ closefile (fnum); --- 543,547 ---- if (config.flopenresfile) { ! if (!openresourcefile (fspec, &rnum, resourcefork)) { /* 2005-09-02 creedon - added support for fork parameter, see resources.c: openresourcefile and pushresourcefile */ closefile (fnum); *************** *** 688,692 **** #ifdef MACVERSION if (config.flopenresfile) ! if (!openresourcefile (fspec, &rnum, 1)) /* 2005-09-02 creedon - added support for fork parameter, see resources.c: openresourcefile and pushresourcefile */ goto error; #endif --- 688,692 ---- #ifdef MACVERSION if (config.flopenresfile) ! if (!openresourcefile (fspec, &rnum, resourcefork)) /* 2005-09-02 creedon - added support for fork parameter, see resources.c: openresourcefile and pushresourcefile */ goto error; #endif Index: fileverbs.c =================================================================== RCS file: /cvsroot/frontierkernel/Frontier/Common/source/fileverbs.c,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** fileverbs.c 7 Sep 2005 17:45:53 -0000 1.5 --- fileverbs.c 16 Sep 2005 01:55:50 -0000 1.6 *************** *** 867,871 **** flnextparamislast = true; ! setintvalue (1, &val); /* defaults to 1 */ if (!getoptionalparamvalue (hparam1, &ctconsumed, &ctpositional, "\x04""fork", &val)) --- 867,871 ---- flnextparamislast = true; ! setintvalue (resourcefork, &val); /* defaults to 1 */ if (!getoptionalparamvalue (hparam1, &ctconsumed, &ctpositional, "\x04""fork", &val)) *************** *** 928,932 **** flnextparamislast = true; ! setintvalue (1, &val); /* defaults to 1 */ if (!getoptionalparamvalue (hparam1, &ctconsumed, &ctpositional, "\x04""fork", &val)) --- 928,932 ---- flnextparamislast = true; ! setintvalue (resourcefork, &val); /* defaults to 1 */ if (!getoptionalparamvalue (hparam1, &ctconsumed, &ctpositional, "\x04""fork", &val)) *************** *** 958,962 **** flnextparamislast = true; ! setintvalue (1, &val); /* defaults to 1 */ if (!getoptionalparamvalue (hparam1, &ctconsumed, &ctpositional, "\x04""fork", &val)) --- 958,962 ---- flnextparamislast = true; ! setintvalue (resourcefork, &val); /* defaults to 1 */ if (!getoptionalparamvalue (hparam1, &ctconsumed, &ctpositional, "\x04""fork", &val)) *************** *** 1001,1005 **** flnextparamislast = true; ! setintvalue (1, &val); /* defaults to 1 */ if (!getoptionalparamvalue (hparam1, &ctconsumed, &ctpositional, "\x04""fork", &val)) --- 1001,1005 ---- flnextparamislast = true; ! setintvalue (resourcefork, &val); /* defaults to 1 */ if (!getoptionalparamvalue (hparam1, &ctconsumed, &ctpositional, "\x04""fork", &val)) *************** *** 1046,1050 **** flnextparamislast = true; ! setintvalue (1, &val); /* defaults to 1 */ if (!getoptionalparamvalue (hparam1, &ctconsumed, &ctpositional, "\x04""fork", &val)) --- 1046,1050 ---- flnextparamislast = true; ! setintvalue (resourcefork, &val); /* defaults to 1 */ if (!getoptionalparamvalue (hparam1, &ctconsumed, &ctpositional, "\x04""fork", &val)) *************** *** 1096,1100 **** flnextparamislast = true; ! setintvalue (1, &val); /* defaults to 1 */ if (!getoptionalparamvalue (hparam1, &ctconsumed, &ctpositional, "\x04""fork", &val)) --- 1096,1100 ---- flnextparamislast = true; ! setintvalue (resourcefork, &val); /* defaults to 1 */ if (!getoptionalparamvalue (hparam1, &ctconsumed, &ctpositional, "\x04""fork", &val)) *************** *** 1165,1169 **** return (false); ! setintvalue (1, &val); /* defaults to 1 */ if (!getoptionalparamvalue (hparam1, &ctconsumed, &ctpositional, "\x04""fork", &val)) --- 1165,1169 ---- return (false); ! setintvalue (resourcefork, &val); /* defaults to 1 */ if (!getoptionalparamvalue (hparam1, &ctconsumed, &ctpositional, "\x04""fork", &val)) *************** *** 1225,1229 **** flnextparamislast = true; ! setintvalue (1, &val); /* defaults to 1 */ if (!getoptionalparamvalue (hparam1, &ctconsumed, &ctpositional, "\x04""fork", &val)) --- 1225,1229 ---- flnextparamislast = true; ! setintvalue (resourcefork, &val); /* defaults to 1 */ if (!getoptionalparamvalue (hparam1, &ctconsumed, &ctpositional, "\x04""fork", &val)) *************** *** 1242,1245 **** --- 1242,1246 ---- /* 2005-09-02 creedon: added support for fork parameter, see resources.c: openresourcefile and pushresourcefile + 2.1b4 dmb: new verb */ *************** *** 1264,1268 **** flnextparamislast = true; ! setintvalue (1, &val); /* defaults to 1 */ if (!getoptionalparamvalue (hparam1, &ctconsumed, &ctpositional, "\x04""fork", &val)) --- 1265,1269 ---- flnextparamislast = true; ! setintvalue (resourcefork, &val); /* defaults to 1 */ if (!getoptionalparamvalue (hparam1, &ctconsumed, &ctpositional, "\x04""fork", &val)) *************** *** 1282,1285 **** --- 1283,1287 ---- /* 2005-09-02 creedon: added support for fork parameter, see resources.c: openresourcefile and pushresourcefile + 2.1b4 dmb: new verb */ *************** *** 1307,1311 **** flnextparamislast = true; ! setintvalue (1, &val); /* defaults to 1 */ if (!getoptionalparamvalue (hparam1, &ctconsumed, &ctpositional, "\x04""fork", &val)) --- 1309,1313 ---- flnextparamislast = true; ! setintvalue (resourcefork, &val); /* defaults to 1 */ if (!getoptionalparamvalue (hparam1, &ctconsumed, &ctpositional, "\x04""fork", &val)) *************** *** 1348,1352 **** flnextparamislast = true; ! setintvalue (1, &val); /* defaults to 1 */ if (!getoptionalparamvalue (hparam1, &ctconsumed, &ctpositional, "\x04""fork", &val)) --- 1350,1354 ---- flnextparamislast = true; ! setintvalue (resourcefork, &val); /* defaults to 1 */ if (!getoptionalparamvalue (hparam1, &ctconsumed, &ctpositional, "\x04""fork", &val)) *************** *** 1644,1648 **** flnextparamislast = true; ! setintvalue (1, &val); /* defaults to 1 */ if (!getoptionalparamvalue (hparam1, &ctconsumed, &ctpositional, "\x04""fork", &val)) --- 1646,1650 ---- flnextparamislast = true; ! setintvalue (resourcefork, &val); /* defaults to 1 */ if (!getoptionalparamvalue (hparam1, &ctconsumed, &ctpositional, "\x04""fork", &val)) *************** *** 1704,1708 **** flnextparamislast = true; ! setintvalue (1, &val); /* defaults to 1 */ if (!getoptionalparamvalue (hparam1, &ctconsumed, &ctpositional, "\x04""fork", &val)) --- 1706,1710 ---- flnextparamislast = true; ! setintvalue (resourcefork, &val); /* defaults to 1 */ if (!getoptionalparamvalue (hparam1, &ctconsumed, &ctpositional, "\x04""fork", &val)) *************** *** 1750,1754 **** flnextparamislast = true; ! setintvalue (1, &val); /* defaults to 1 */ if (!getoptionalparamvalue (hparam1, &ctconsumed, &ctpositional, "\x04""fork", &val)) --- 1752,1756 ---- flnextparamislast = true; ! setintvalue (resourcefork, &val); /* defaults to 1 */ if (!getoptionalparamvalue (hparam1, &ctconsumed, &ctpositional, "\x04""fork", &val)) *************** *** 1800,1804 **** flnextparamislast = true; ! setintvalue (1, &val); /* defaults to 1 */ if (!getoptionalparamvalue (hparam1, &ctconsumed, &ctpositional, "\x04""fork", &val)) --- 1802,1806 ---- flnextparamislast = true; ! setintvalue (resourcefork, &val); /* defaults to 1 */ if (!getoptionalparamvalue (hparam1, &ctconsumed, &ctpositional, "\x04""fork", &val)) Index: shellwindow.c =================================================================== RCS file: /cvsroot/frontierkernel/Frontier/Common/source/shellwindow.c,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** shellwindow.c 7 Sep 2005 17:45:53 -0000 1.6 --- shellwindow.c 16 Sep 2005 01:55:50 -0000 1.7 *************** *** 623,627 **** boolean loadwindowposition (ptrfilespec fspec, short rnum, tywindowposition *wpos) { ! return (loadresource (fspec, rnum, 'wpos', 128, nil, sizeof (tywindowposition), wpos, 1)); /* 2005-09-02 creedon - added support for fork parameter, see resources.c: openresourcefile and pushresourcefile */ } /*loadwindowposition*/ --- 623,627 ---- boolean loadwindowposition (ptrfilespec fspec, short rnum, tywindowposition *wpos) { ! return (loadresource (fspec, rnum, 'wpos', 128, nil, sizeof (tywindowposition), wpos, resourcefork)); /* 2005-09-02 creedon - added support for fork parameter, see resources.c: openresourcefile and pushresourcefile */ } /*loadwindowposition*/ *************** *** 652,656 **** //This may be a spotlight bug though. resourceSize = sizeof (savedfont); ! if (!loadresource (&fspec, (short) (**h).rnum, 'styl', 128, nil, resourceSize, &savedfont, 1)) { /* 2005-09-02 creedon - added support for fork parameter, see resources.c: openresourcefile and pushresourcefile */ (**h).defaultfont = config.defaultfont; --- 652,656 ---- //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; |