landverbarray.c

Go to the documentation of this file.
00001 
00002 /*  $Id: landverbarray.c 355 2005-01-11 22:48:55Z andreradke $    */
00003 
00004 /******************************************************************************
00005 
00006     UserLand Frontier(tm) -- High performance Web content management,
00007     object database, system-level and Internet scripting environment,
00008     including source code editing and debugging.
00009 
00010     Copyright (C) 1992-2004 UserLand Software, Inc.
00011 
00012     This program is free software; you can redistribute it and/or modify
00013     it under the terms of the GNU General Public License as published by
00014     the Free Software Foundation; either version 2 of the License, or
00015     (at your option) any later version.
00016 
00017     This program is distributed in the hope that it will be useful,
00018     but WITHOUT ANY WARRANTY; without even the implied warranty of
00019     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00020     GNU General Public License for more details.
00021 
00022     You should have received a copy of the GNU General Public License
00023     along with this program; if not, write to the Free Software
00024     Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00025 
00026 ******************************************************************************/
00027 
00028 #include "frontier.h"
00029 #include "standard.h"
00030 
00031 #include "landinternal.h"
00032 
00033 
00034 
00035 pascal boolean landaddclass (tyverbclass class) {
00036     
00037     register hdllandglobals hg = landgetglobals (); 
00038     register boolean fl = true;
00039     
00040     (**hg).currentclass = class;
00041     
00042     if ((**hg).transport == macsystem7) {
00043         
00044         /*
00045         if (!landverbsupported (class, (tyverbtoken) 0))
00046         */
00047             fl = landsystem7addclass (class);
00048         }
00049     
00050     return (fl);
00051     } /*landaddclass*/
00052 
00053 
00054 static pascal boolean landaddverbtoken (tyverbtoken token, boolean flfasthandler) {
00055     
00056     /*
00057     push the token on the verbarray list.
00058     */
00059     
00060     register hdllandglobals hg = landgetglobals (); 
00061     register hdlverbarray hverbs = (**hg).verbarray;
00062     tyverbarrayelement item;
00063 
00064     if (hverbs == nil) {
00065         
00066         hdlverbarray hnewarray;
00067         
00068         if (!landnewemptyhandle ((Handle *) &hnewarray))
00069             return (false);
00070 
00071         hverbs = hnewarray; /*copy into register*/
00072         
00073         (**hg).verbarray = hverbs;
00074         }
00075         
00076     item.class = (**hg).currentclass;
00077         
00078     item.token = token;
00079     
00080     item.flfasthandler = flfasthandler;
00081     
00082     if (!landenlargehandle ((Handle) hverbs, longsizeof (item), &item))
00083         return (false);
00084     
00085     if (!flfasthandler)
00086         return (true);
00087     
00088     return (landsystem7addfastverb (item.class, item.token));
00089     } /*landaddverbtoken*/
00090 
00091 
00092 pascal boolean landaddverb (tyverbtoken token) {
00093     
00094     /*
00095     push the verb's token on the verbarray list.
00096     */
00097     
00098     return (landaddverbtoken (token, false));
00099     } /*landaddverb*/
00100 
00101 
00102 pascal boolean landaddfastverb (tyverbtoken token) {
00103     
00104     /*
00105     push the verb's token on the verbarray list and set it up to be invoked 
00106     as a fast handler
00107     */
00108     
00109     return (landaddverbtoken (token, true));
00110     } /*landaddfastverb*/   
00111 
00112 
00113 
00114 

Generated on Wed May 31 18:19:50 2006 for frontierkernel 10.1.10a by  doxygen 1.4.6