lang.h

Go to the documentation of this file.
00001 
00002 /*  $Id: lang.h 614 2006-03-10 13:42:02Z 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 #ifndef langinclude
00029 #define langinclude /*so other includes can tell if we've been loaded*/
00030 
00031 
00032 #ifndef shelltypesinclude
00033 
00034     #include "shelltypes.h"
00035 
00036 #endif
00037 
00038 #ifndef dbinclude
00039 
00040     #include "db.h"
00041 
00042 #endif
00043 
00044 #if __powerc
00045     #define flfindbug 0
00046 #endif
00047 
00048 
00049 #define idconsthashresource 128
00050 #define idbuiltinhashresource 129
00051 #define idkeywordhashresource 130
00052 #define idshellhashresource 131
00053 #define idfilehashresource 132
00054 #define idstringhashresource 133
00055 
00056 
00057 typedef enum tytreetype { /*assign values so we can trace with debugger*/
00058     
00059     noop = 0,
00060     
00061     addop = 1,
00062     
00063     subtractop = 2,
00064     
00065     multiplyop = 3,
00066     
00067     divideop = 4,
00068     
00069     modop = 5,
00070     
00071     identifierop = 6,
00072     
00073     constop = 7,
00074     
00075     unaryop = 8,
00076     
00077     notop = 9,
00078     
00079     assignop = 10,
00080     
00081     functionop = 11,
00082     
00083     EQop = 12,
00084     
00085     NEop = 13,
00086     
00087     GTop = 14,
00088     
00089     LTop = 15,
00090     
00091     GEop = 16,
00092     
00093     LEop = 17,
00094     
00095     ororop = 18,
00096     
00097     andandop = 19,
00098     
00099     incrpreop = 20, /* ++x */
00100     
00101     incrpostop = 21, /* x++ */
00102     
00103     decrpreop = 22, /* --x */
00104     
00105     decrpostop = 23, /* x-- */
00106     
00107     loopop = 24,
00108     
00109     fileloopop = 25,
00110     
00111     forloopop = 26,
00112     
00113     breakop = 27,
00114     
00115     returnop = 28,
00116     
00117     bundleop = 29,
00118     
00119     ifop = 30,
00120     
00121     procop = 31,
00122     
00123     localop = 32,
00124     
00125     moduleop = 33,
00126     
00127     dotop = 34,
00128     
00129     arrayop = 35,
00130     
00131     addressofop = 36,
00132     
00133     dereferenceop = 37,
00134     
00135     assignlocalop = 38,
00136     
00137     bracketop = 39,
00138     
00139     caseop = 40,
00140     
00141     caseitemop = 41, 
00142     
00143     casebodyop = 42,
00144     
00145     kernelop = 43,
00146     
00147     continueop = 44,
00148     
00149     withop = 45,
00150     
00151     fordownloopop = 46,
00152     
00153     tryop = 47,
00154     
00155     beginswithop = 48,
00156     
00157     endswithop = 49,
00158     
00159     containsop = 50,
00160     
00161     rangeop = 51,
00162     
00163     listop = 52,
00164     
00165     fieldop = 53,
00166     
00167     recordop = 54,
00168     
00169     forinloopop = 55,
00170     
00171     globalop = 56,
00172     
00173     osascriptop = 57,
00174     
00175     addvalueop = 58,
00176     
00177     subtractvalueop = 59,
00178     
00179     multiplyvalueop = 60,
00180     
00181     dividevalueop = 61,
00182 
00183     cttreetypes
00184     } tytreetype;
00185 
00186 
00187 typedef boolean (*ptrcfunction) (int);
00188 
00189 
00190 typedef enum tyvaluetype { /*use care -- these are saved on disk inside symbol tables*/
00191 
00192     uninitializedvaluetype = -1,
00193     
00194     novaluetype = 0,
00195     
00196     charvaluetype = 1,
00197     
00198     intvaluetype = 2,
00199     
00200     longvaluetype = 3,
00201     
00202     oldstringvaluetype = 4,
00203     
00204     binaryvaluetype = 5,
00205     
00206     booleanvaluetype = 6,
00207     
00208     tokenvaluetype = 7,
00209     
00210     datevaluetype = 8,
00211     
00212     addressvaluetype = 9, 
00213     
00214     codevaluetype = 10,
00215     
00216     doublevaluetype = 11,
00217     
00218     stringvaluetype = 12,
00219     
00220     externalvaluetype = 13,
00221     
00222     directionvaluetype = 14,
00223     
00224     passwordvaluetype = 15,
00225     
00226     ostypevaluetype = 16,
00227     
00228     unused2valuetype = 17,
00229     
00230     pointvaluetype = 18,
00231     
00232     rectvaluetype = 19,
00233     
00234     patternvaluetype = 20,
00235     
00236     rgbvaluetype = 21,
00237     
00238     fixedvaluetype = 22,
00239     
00240     singlevaluetype = 23,
00241     
00242     olddoublevaluetype = 24,
00243     
00244     objspecvaluetype = 25,
00245     
00246     filespecvaluetype = 26,
00247     
00248     aliasvaluetype = 27,
00249     
00250     #ifdef flnewfeatures
00251     
00252     enumvaluetype = 28,
00253     
00254     listvaluetype = 29,
00255     
00256     recordvaluetype = 30,
00257     
00258     #endif
00259     
00260     /*
00261     the following value types, outline - pictvaluetype, are never used directly.
00262     the value would actually be externalvaluetype; these are for flattening 
00263     external types into a typevaluetype
00264     */
00265     
00266     outlinevaluetype,
00267     
00268     wordvaluetype,
00269     
00270     headvaluetype,
00271     
00272     tablevaluetype,
00273     
00274     scriptvaluetype,
00275     
00276     menuvaluetype,
00277     
00278     pictvaluetype,
00279     
00280     #ifdef xmlfeatures
00281         xmlvaluetype,
00282     #endif
00283 
00284     /*new types must be added at end of list, these get saved on disk*/
00285     
00286     ctvaluetypes
00287     
00288     } tyvaluetype;
00289 
00290 
00291 typedef struct tydiskvalue {    /*4.0.2b1 dmb*/
00292 
00293     dbaddress adr;
00294     
00295     Handle hvalue;
00296     
00297     } tydiskvalue, *ptrdiskvalue, **hdldiskvalue;
00298 
00299 
00300 typedef union tyvaluedata {
00301     
00302     boolean flvalue;
00303     
00304     byte chvalue;
00305     
00306     short intvalue;
00307     
00308     long longvalue;
00309     
00310     unsigned long datevalue;
00311     
00312 #ifdef MACVERSION
00313     tydirection dirvalue;
00314 #endif
00315 #ifdef WIN95VERSION
00316     byte dirvalue;
00317 #endif
00318 
00319     OSType ostypevalue;
00320     
00321     Handle stringvalue;
00322     
00323     /*
00324     Handle passwordvalue;
00325     */
00326     
00327     hdlstring addressvalue;
00328     
00329     Handle binaryvalue;
00330     
00331     short tokenvalue; /*can be coerced to a tyfunctype, see note in langtokens.h*/
00332     
00333     struct tytreenode **codevalue; /*implemented in UserLang*/
00334     
00335     Handle externalvalue; /*structure is defined in langexternal.h*/
00336     
00337     Point pointvalue;
00338     
00339     Rect **rectvalue;
00340     
00341     Pattern **patternvalue;
00342     
00343     RGBColor **rgbvalue;
00344     
00345     Fixed fixedvalue;
00346     
00347     float singlevalue;
00348     
00349     double **doublevalue;
00350     
00351     Handle objspecvalue;
00352     
00353     hdlfilespec filespecvalue;
00354     
00355     Handle aliasvalue; /*AliasHandle*/
00356     
00357     OSType enumvalue;
00358     
00359 #ifdef oplanglists
00360     struct tylistrecord **listvalue;
00361 
00362     struct tylistrecord **recordvalue;
00363 #else
00364     Handle listvalue;
00365     
00366     Handle recordvalue;
00367 #endif
00368     
00369     dbaddress diskvalue;    /*4.0.2b1 dmb*/
00370     } tyvaluedata;
00371 
00372 
00373 typedef struct tyvaluerecord {
00374     
00375     tyvaluetype valuetype;
00376     
00377     /*flags are never set in the database; used at runtime only*/
00378 
00379     byte fltmpdata: 1; /*set when value data is handle to original, and needs duplication*/
00380     
00381     byte fltmpstack: 1; /*set when value data is in the temp stack, and is volatile*/
00382     
00383     byte flformalval: 1; /*set when value is set as default by function header*/
00384     
00385     byte fldiskval: 1; /*set when value data points to disk block of actual value*/
00386     
00387     tyvaluedata data;
00388     } tyvaluerecord;
00389 
00390 
00391 typedef struct tytreenode {
00392 
00393     tytreetype nodetype; /*add, subtract, if, etc.*/
00394     
00395     tyvaluerecord nodeval; /*the value stored at this level of the tree*/
00396     
00397     struct tytreenode **link; /*links parameter lists, statement lists*/
00398     
00399     unsigned long lnum; /*which line number in the source was this node generated from?*/
00400     
00401     byte charnum; /*at what character offset? max is 255*/
00402     
00403     byte ctparams; /*number of params actually allocated, max is 4*/
00404     
00405     /*param1 - param4 must be at the end of the record - see newtreenode*/
00406     
00407     struct tytreenode **param1, **param2, **param3, **param4;
00408     } tytreenode, *ptrtreenode, **hdltreenode;
00409 
00410 
00411 typedef struct tyhashnode {
00412     
00413     struct tyhashnode **hashlink; /*next guy in the same hash bucket*/
00414     
00415     struct tyhashnode **sortedlink; /*next guy in alphabetic order*/
00416     
00417     #ifdef fltracklocaladdresses
00418     
00419     struct tyhashnode **refnodelink; /*next guy in linked list of refnodes list of a hashtable*/
00420     
00421     struct tyhashtable **reftable; /*table referenced by an address value*/
00422     
00423     #endif
00424     
00425     tyvaluerecord val; /*the value of the identifier*/
00426     
00427     byte fldontsave: 1; /*this node doesn't get packed*/
00428     
00429     byte fllocked: 1; /*are changes allowed for this value? ***unimplemented */
00430     
00431     byte flprotected: 1; /*should the value be displayed as "(protected)"?*/
00432     
00433     byte flunresolvedaddress: 1; /*does val contain an unresolved address?*/
00434     
00435     byte fldisposewhenunlocked: 1; /*node must be disposed when lock count reaches zero*/
00436     
00437     byte flunused: 3; /*round to byte boundry*/
00438     
00439     byte ctlocks: 8;
00440     
00441     byte hashkey []; /*the identifier of this table element, lives in extension of record*/
00442     
00443     } tyhashnode, *ptrhashnode, **hdlhashnode;
00444 
00445     
00446 #define HNoNode ((hdlhashnode) -1)
00447 #define gethashkey(h,bs)    copystring ((**h).hashkey, bs);
00448     
00449 
00450 #define ctbuckets 11 /*should be a prime number?*/
00451 
00452 
00453 typedef boolean (*langvaluecallback) (short, hdltreenode, tyvaluerecord *, bigstring);
00454 
00455 
00456 typedef struct tyhashtable {
00457     
00458     hdlhashnode hashbucket [ctbuckets];
00459     
00460     hdlhashnode hfirstsort; /*the alphabetically-first hash node*/
00461     
00462     struct tyhashtable **prevhashtable; /*allow tables to be linked*/
00463     
00464     #if !flruntime
00465     
00466     struct tyhashtable **parenthashtable; /*allow tables to be linked, but not lexically*/
00467     
00468     #endif
00469 
00470     /* The following is added 12/29/99 by RAB so that we do not have to scan all the buckets of 
00471     this tables parent to get the hashnode for this table and therefore it's value record and it's name. */
00472 
00473     hdlhashnode thistableshashnode; /*this tables hashnode referenced in it's parents hashbuckets 12/29/99 RAB*/
00474     
00475     #ifdef fltracklocaladdresses
00476     
00477     hdlhashnode refnodes; /*linked list of hash nodes containing addresses that reference an object in this table*/
00478     
00479     #endif
00480     
00481     boolean fldirty: 1; /*indicates whether anything has changed*/
00482     
00483     boolean fllocked: 1; /*are changes allowed to be made?*/
00484     
00485     boolean flwindowopen: 1; /*is this table being displayed in a window?*/
00486     
00487     boolean flnopurge: 1; /*can table be purged from memory?*/
00488     
00489     boolean fllocaltable: 1; /*does this table contain local variables?*/
00490     
00491     boolean flchained: 1; /*is this table in the chain of local hashtables?*/
00492     
00493     boolean fldisposewhenunchained: 1; /*table must be disposed when removed from stack chain*/
00494     
00495     boolean ctwithvalues: 3; /*how many with statement values does this (local) table contain?*/
00496     
00497     boolean flverbsrequirewindow: 1; /*for EPP's, do verbs require a window context?*/
00498     
00499     boolean flneedsort: 1; /*for table editing, set if a node is not sorted*/
00500     
00501     boolean flmayaffectdisplay: 1; /*has this table ever been displayed in any table window?*/
00502     
00503     #ifdef xmlfeatures
00504         boolean flxml: 1;
00505     #endif
00506     
00507     boolean flsubsdirty: 1; /*has this table got dirty subs -- set in tablepreflightsubsdirtyflag before saving*/
00508 
00509     long hashtablerefcon; /*for use by application*/
00510     
00511     long lexicalrefcon;
00512     
00513     #if odbengine || !flruntime
00514     
00515     struct tytableformats **hashtableformats; /*place to link in a display formats record*/
00516     
00517     #endif
00518     
00519     short sortorder; /*up to the application to understand what this means*/
00520     
00521     unsigned long timecreated, timelastsave; /*number of seconds since 1/1/04*/
00522     
00523     langvaluecallback valueroutine; /*for EFP's -- C routine that evaluates verbs*/
00524     
00525     short cttmpstack;
00526     
00527     tyvaluerecord tmpstack []; /*temps generated during expression evaluation*/
00528     } tyhashtable, *ptrhashtable, **hdlhashtable;
00529     
00530 
00531 typedef boolean (*langerrorcallback) (long, long, short, hdlhashtable *, bigstring);
00532 
00533 
00534 typedef struct tymodulerecord {
00535     
00536     hdltreenode parsetree; /*the code tree generated by the parser*/
00537     
00538     boolean flhandler; /*is the generated code a handler (true) or standalone (false)*/
00539     } tymodulerecord;
00540 
00541 
00542 typedef struct tyaddress { // 5.0.2 dmb (finally)
00543     
00544     hdlhashtable ht;
00545     
00546     bigstring bs;
00547     } tyaddress, *ptraddress;
00548 
00549 
00550 //#define cterrorcallbacks 50 /*we can remember nested error callbacks up to 50 levels deep*/
00551 
00552 #define cterrorcallbacks 200 /*6.1d19 AR*/
00553 
00554 typedef struct tyerrorrecord {
00555     
00556     langerrorcallback errorcallback;
00557     
00558     unsigned long errorline;
00559     
00560     unsigned short errorchar;
00561     
00562     #ifdef flnewfeatures
00563     
00564     unsigned long profilebase;
00565     
00566     unsigned long profiletotal;
00567     
00568     #endif
00569     
00570     long errorrefcon;
00571     } tyerrorrecord;
00572 
00573 
00574 typedef struct tyerrorstack {
00575     
00576     short toperror;
00577     
00578     tyerrorrecord stack [cterrorcallbacks];
00579     } tyerrorstack, *ptrerrorstack, **hdlerrorstack;
00580 
00581 
00582 typedef boolean (*langvoidcallback) (void);
00583 
00584 typedef boolean (*langbooleancallback) (boolean);
00585 
00586 typedef boolean (*langtreenodecallback) (hdltreenode);
00587 
00588 typedef boolean (*langtreenodescallback) (hdltreenode, hdltreenode);
00589 
00590 typedef boolean (*langaddresscallback) (hdlhashtable, const bigstring);
00591 
00592 typedef boolean (*langsymbolinsertedcallback) (hdlhashtable, const bigstring, hdlhashnode);
00593 
00594 typedef boolean (*langtablenodecallback) (hdlhashtable, hdlhashnode);
00595 
00596 typedef boolean (*langsymbolchangedcallback) (hdlhashtable, const bigstring, hdlhashnode, boolean);
00597 
00598 typedef short (*langcomparenodescallback)(hdlhashtable, hdlhashnode, hdlhashnode);
00599 
00600 typedef boolean (*langhashnodetreenodecallback)(hdlhashnode, hdltreenode *);
00601 
00602 typedef boolean (*langtablerefcallback)(hdlhashtable *);
00603 
00604 typedef boolean (*langtablecallback)(hdlhashtable);
00605 
00606 typedef boolean (*langsourcecodecallback)(hdlhashtable, hdlhashnode, bigstring);
00607 
00608 typedef boolean (*langerrormessagecallback)(bigstring, ptrvoid);
00609 
00610 typedef boolean (*langverbcallback) (hdltreenode, tyvaluerecord *);
00611 
00612 typedef boolean (*langshortcallback) (short);
00613 
00614 typedef boolean (*langeventcallback) (EventRecord *);
00615 
00616 typedef boolean (*langtablevisitcallback) (hdlhashnode, ptrvoid);
00617 
00618 typedef boolean (*langinversesearchcallback) (bigstring, hdlhashnode, tyvaluerecord, ptrvoid);
00619 
00620 typedef boolean (*langsortedinversesearchcallback) (bigstring, hdlhashnode, tyvaluerecord, ptrvoid);
00621 
00622 
00623 typedef struct tylangcallbacks {
00624     
00625     langsymbolchangedcallback symbolchangedcallback;
00626     
00627     langtablenodecallback symbolunlinkingcallback;
00628     
00629     langaddresscallback symboldeletedcallback;
00630     
00631     langsymbolinsertedcallback symbolinsertedcallback;
00632     
00633     langcomparenodescallback comparenodescallback;
00634     
00635     langtreenodecallback debuggercallback;
00636     
00637     langbooleancallback scriptkilledcallback;
00638     
00639     langhashnodetreenodecallback scriptcompilecallback;
00640     
00641     langbooleancallback backgroundtaskcallback;
00642     
00643     langtablerefcallback pushtablecallback;
00644     
00645     langtablecallback poptablecallback;
00646     
00647     langsourcecodecallback pushsourcecodecallback;
00648     
00649     langvoidcallback popsourcecodecallback;
00650     
00651     langvoidcallback saveglobalscallback;
00652     
00653     langvoidcallback restoreglobalscallback;
00654     
00655     langerrormessagecallback errormessagecallback;
00656     
00657     ptrvoid errormessagerefcon;
00658     
00659     langvoidcallback clearerrorcallback;
00660     
00661     langverbcallback msgverbcallback;
00662     
00663     langtreenodescallback codereplacedcallback;
00664     
00665     langverbcallback idvaluecallback;
00666     
00667     hdlerrorstack scripterrorstack;
00668     
00669     langshortcallback partialeventloopcallback;
00670     
00671     langeventcallback processeventcallback;
00672     
00673     #ifdef flnewfeatures
00674     
00675     langerrormessagecallback debugerrormessagecallback;
00676     
00677     #endif
00678     
00679     #ifdef flcomponent
00680     
00681     callback presystemdialogcallback;
00682     
00683     callback postsystemdialogcallback;
00684     
00685     #endif
00686     
00687     } tylangcallbacks;
00688 
00689 
00690 //#define cthashtables 20 /*we can remember nested hash tables pushed up to 20 levels deep*/
00691 
00692 #define cthashtables 80 /*6.1d19 AR*/
00693 
00694 typedef struct tablestack {
00695     
00696     short toptables;
00697     
00698     hdlhashtable stack [cthashtables];
00699     } tytablestack, *ptrtablestack, **hdltablestack;
00700 
00701 
00702 /*globals*/ 
00703 
00704 extern boolean flscriptrunning; /*if true, a script is currently executing in this thread*/
00705 
00706 extern boolean flscriptresting; /*if true, a script doesn't want to tie up the processor*/
00707 
00708 extern hdltreenode herrornode; /*for the debugger, node where error occurred*/
00709 
00710 
00711 extern byte bstrue [];
00712 
00713 extern byte bsfalse [];
00714 
00715 extern hdlhashtable currenthashtable; /*langhash.c*/
00716 
00717 extern hdltablestack hashtablestack;
00718 
00719 extern boolean fllanghashassignprotect;
00720 
00721 extern boolean fllangexternalvalueprotect;
00722 
00723 
00724 extern hdlhashtable hkeywordtable; /*holds the language's keywords*/
00725 
00726 extern hdlhashtable hconsttable; /*holds the names of built-in constants, like true and up*/
00727 
00728 extern hdlhashtable hbuiltinfunctions; /*holds the names of the built-in functions*/
00729 
00730 extern unsigned long ctscanlines; /*number of lines that have been scanned, for error reporting*/
00731 
00732 extern unsigned short ctscanchars; /*number of chars passed over on current line, for error reporting*/
00733 
00734 extern tylangcallbacks langcallbacks; /*routines that wire the language into environment*/
00735 
00736 extern boolean flnextparamislast;
00737 
00738 
00739 /*prototypes*/
00740 
00741 extern boolean langpusherrorcallback (langerrorcallback, long); /*lang.c*/
00742 
00743 extern boolean langpoperrorcallback (void);
00744 
00745 extern boolean langseterrorcallbackline (void);
00746 
00747 extern boolean langstartprofiling (void);
00748 
00749 extern boolean langstopprofiling (void);
00750 
00751 extern unsigned long langgetsourceoffset (unsigned long, unsigned short);
00752 
00753 extern void langsetsourceoffset (unsigned long);
00754 
00755 extern boolean langfinderrorrefcon (long, langerrorcallback *);
00756 
00757 extern boolean langcompiletext (Handle, boolean, hdltreenode *);
00758 
00759 extern boolean langbuildtree (Handle, boolean, hdltreenode *);
00760 
00761 extern boolean langdefaultpushtable (hdlhashtable *);
00762 
00763 extern boolean langdefaultpoptable (hdlhashtable);
00764 
00765 extern boolean langnoop (void);
00766 
00767 extern void langhookerrors (void);
00768 
00769 extern void langunhookerrors (void);
00770 
00771 extern void langtraperrors (bigstring, langerrormessagecallback *, ptrvoid *);
00772 
00773 extern void languntraperrors (langerrormessagecallback, ptrvoid, boolean);
00774 
00775 extern void langpushscopechain (void);
00776 
00777 extern void langpopscopechain (void);
00778 
00779 extern boolean langopruncallbackscripts (short);
00780 
00781 extern boolean langzoomobject (const bigstring);
00782 
00783 extern boolean langbuildparamlist (tyvaluerecord *, hdltreenode *); //6.1b7 AR
00784 
00785 extern boolean langrun (Handle, tyvaluerecord *);
00786 
00787 extern boolean langruntraperror (Handle, tyvaluerecord *, bigstring);
00788 
00789 extern boolean langrunhandle (Handle, bigstring);
00790 
00791 extern boolean langrunhandletraperror (Handle, bigstring, bigstring);
00792 
00793 extern boolean langrunstring (const bigstring, bigstring);
00794 
00795 extern boolean langrunstringnoerror (const bigstring, bigstring);
00796 
00797 extern boolean langreduceformula (bigstring);
00798 
00799 extern boolean langruncode (hdltreenode, hdlhashtable, tyvaluerecord *);
00800 
00801 extern boolean langaddkeyword (bigstring, short);
00802 
00803 extern boolean langaddkeywordlist (hdlhashtable, byte *[], short);
00804 
00805 extern boolean langinitverbs (void);
00806 
00807 extern boolean initlang (void);
00808 
00809 
00810 extern boolean langcompilescript (hdlhashnode, hdltreenode *); /*langcallbacks.c*/
00811 
00812 extern boolean langerrorclear (void);
00813 
00814 extern void langsymbolchanged (hdlhashtable, const bigstring, hdlhashnode, boolean);
00815 
00816 extern void langsymbolinserted (hdlhashtable, const bigstring, hdlhashnode);
00817 
00818 extern void langsymbolunlinking (hdlhashtable, hdlhashnode);
00819 
00820 extern void langsymboldeleted (hdlhashtable, const bigstring);
00821 
00822 extern boolean langbackgroundtask (boolean);
00823 
00824 #ifdef flnewfeatures
00825 
00826 extern boolean langpartialeventloop (short);
00827 
00828 #endif
00829 
00830 #ifdef flcomponent
00831 
00832 extern callback langpresystemdialog (void);
00833 
00834 extern void langpostsystemdialog (void);
00835 
00836 #endif
00837 
00838 
00839 extern boolean datenetstandardstring (long localdate, tyvaluerecord *vreturn); /*langdate.c*/
00840 
00841 extern boolean datemonthtostring (long ix, tyvaluerecord *vreturn);
00842 
00843 extern boolean datedayofweektostring (long ix, tyvaluerecord *vreturn);
00844 
00845 extern boolean dateversionlessthan (bigstring bsv1, bigstring bsv2, tyvaluerecord *v);
00846 
00847 
00848 extern void disablelangerror (void); /*langerror.c*/
00849 
00850 extern void enablelangerror (void);
00851 
00852 extern boolean langerrorenabled (void);
00853 
00854 extern void langerror (short);
00855 
00856 extern void lang3paramerror (short, const bigstring, const bigstring, const bigstring);
00857 
00858 extern void langparamerror (short, const bigstring);
00859 
00860 extern void lang2paramerror (short, const bigstring, const bigstring);
00861 
00862 extern void langlongparamerror (short, long);
00863 
00864 extern void langostypeparamerror (short, OSType);
00865 
00866 
00867 extern boolean langerrordialog (bigstring, ptrvoid); /*langerrorwindow.c*/
00868 
00869 extern boolean langerrorflush (void);
00870 
00871 extern boolean clearlangerrordialog (void);
00872 
00873 
00874 #ifdef fltracklocaladdresses
00875 
00876 extern void hashregisteraddressnode (hdlhashtable, hdlhashnode); /*langhash.c*/
00877 
00878 extern void hashunregisteraddressnode (hdlhashnode);
00879 
00880 #endif
00881 
00882 extern boolean newhashtable (hdlhashtable *); /*langhash.c*/
00883 
00884 extern void dirtyhashtable (hdlhashtable);
00885 
00886 extern short hashgetstackdepth (void);
00887 
00888 extern void chainhashtable (hdlhashtable);
00889 
00890 extern void unchainhashtable (void);
00891 
00892 extern boolean indexhashtable (short, hdlhashtable *);
00893 
00894 extern hdlhashtable sethashtable (hdlhashtable);
00895 
00896 extern boolean pushhashtable (hdlhashtable);
00897 
00898 extern boolean pophashtable (void);
00899 
00900 extern boolean pushouterlocaltable (void);
00901 
00902 extern boolean disposehashnode (hdlhashtable, hdlhashnode, boolean, boolean);
00903 
00904 extern short emptyhashtable (hdlhashtable, boolean);
00905 
00906 extern boolean disposehashtable (hdlhashtable, boolean);
00907 
00908 extern boolean hashinsertnode (hdlhashnode, hdlhashtable);
00909 
00910 extern boolean hashunlinknode (hdlhashtable, hdlhashnode);
00911 
00912 extern boolean hashsetnodekey (hdlhashtable, hdlhashnode, const bigstring);
00913 
00914 extern boolean hashinsert (const bigstring, tyvaluerecord);
00915 
00916 //extern hashmerge (hdlhashtable, hdlhashtable);
00917 
00918 extern boolean hashlocate (const bigstring, hdlhashnode *, hdlhashnode *);
00919 
00920 extern boolean hashunlink (const bigstring, hdlhashnode *);
00921 
00922 extern boolean hashdelete (const bigstring, boolean, boolean);
00923 
00924 extern boolean hashtabledelete (hdlhashtable, bigstring);
00925 
00926 extern boolean hashsymbolexists (const bigstring);
00927 
00928 extern boolean hashtablesymbolexists (hdlhashtable, const bigstring);
00929 
00930 extern void hashsetlocality (tyvaluerecord *, boolean); /*6.2b16 AR: needed to set locality in langaddlocals [langevaluate.c]*/
00931 
00932 extern boolean hashassign (const bigstring, tyvaluerecord);
00933 
00934 extern boolean hashtableassign (hdlhashtable, const bigstring, tyvaluerecord);
00935 
00936 extern boolean hashlookup (const bigstring, tyvaluerecord *, hdlhashnode *);
00937 
00938 extern boolean hashtablelookup (hdlhashtable, const bigstring, tyvaluerecord *, hdlhashnode *);
00939 
00940 extern boolean hashlookupnode (const bigstring, hdlhashnode *);
00941 
00942 extern boolean hashtablelookupnode (hdlhashtable, const bigstring, hdlhashnode *);
00943 
00944 extern boolean hashtablevisit (hdlhashtable, langtablevisitcallback, ptrvoid);
00945 
00946 extern boolean hashresort (hdlhashtable, hdlhashnode);
00947 
00948 extern boolean hashinversesearch (hdlhashtable, langinversesearchcallback, ptrvoid, bigstring);
00949 
00950 extern boolean hashsortedinversesearch (hdlhashtable, langsortedinversesearchcallback, ptrvoid);
00951 
00952 extern boolean hashnodeintable (hdlhashnode, hdlhashtable);
00953 
00954 extern boolean hashpacktable (hdlhashtable, boolean, Handle *, boolean *);
00955 
00956 extern boolean hashunpacktable (Handle, boolean, hdlhashtable);
00957 
00958 extern boolean hashcountitems (hdlhashtable, long *);
00959 
00960 extern boolean hashsortedsearch (hdlhashtable, const bigstring, long *);
00961 
00962 extern boolean hashgetnthnode (hdlhashtable, long, hdlhashnode *);
00963 
00964 extern boolean hashgetsortedindex (hdlhashtable, hdlhashnode, long *);
00965 
00966 extern boolean hashgetiteminfo (hdlhashtable, long, bigstring, tyvaluerecord *);
00967 
00968 extern boolean hashgetvaluestring (tyvaluerecord, bigstring);
00969 
00970 extern boolean hashgettypestring (tyvaluerecord, bigstring);
00971 
00972 extern boolean hashgetsizestring (const tyvaluerecord *, bigstring);
00973 
00974 extern boolean hashvaltostrings (tyvaluerecord, bigstring, bigstring, bigstring);
00975 
00976 
00977 extern boolean langgettypestring (tyvaluetype, bigstring); /*langops.c*/
00978 
00979 extern tyvaluetype langgettype (tyvaluerecord val); /*6.2b5 AR*/
00980 
00981 extern boolean langscalartype (tyvaluetype);
00982 
00983 extern OSType langgettypeid (tyvaluetype);
00984 
00985 extern tyvaluetype langgetvaluetype (OSType);
00986 
00987 extern boolean langgoodbinarytype (tyvaluetype);
00988 
00989 extern boolean langfindsymbol (const bigstring, hdlhashtable *, hdlhashnode *);
00990 
00991 extern boolean langgetsymbolval (const bigstring, tyvaluerecord *, hdlhashnode *);
00992 
00993 extern boolean langsetsymbolval (const bigstring, tyvaluerecord);
00994 
00995 extern boolean langsetsymboltableval (hdlhashtable, const bigstring, tyvaluerecord);
00996 
00997 extern boolean langsetstringval (const bigstring, const bigstring);
00998 
00999 extern boolean langsetbinaryval (hdlhashtable, const bigstring, Handle);
01000 
01001 extern boolean langassignstringvalue (hdlhashtable, const bigstring, const bigstring);
01002 
01003 extern boolean langassignbooleanvalue (hdlhashtable, const bigstring, boolean);
01004 
01005 extern boolean langassigncharvalue (hdlhashtable, const bigstring, unsigned char);
01006 
01007 extern boolean langassignlongvalue (hdlhashtable, const bigstring, long);
01008 
01009 extern boolean langassignaddressvalue (hdlhashtable, const bigstring, const tyaddress *);
01010 
01011 extern boolean langassignnewtablevalue (hdlhashtable, const bigstring, hdlhashtable *);
01012 
01013 extern boolean langsuretablevalue (hdlhashtable, const bigstring, hdlhashtable *);
01014 
01015 extern boolean langcheckstackspace (void);
01016 
01017 extern boolean langbuildnamelist (hdltreenode htree, struct tylistrecord **hlist);
01018 
01019 
01020 extern boolean langpackvalue (tyvaluerecord, Handle *, hdlhashnode); /*langpack.c*/
01021 
01022 extern boolean langpackverb (hdltreenode, tyvaluerecord *);
01023 
01024 extern boolean langpackwindowverb (hdltreenode, tyvaluerecord *);
01025 
01026 extern boolean langunpackvalue (Handle, tyvaluerecord *);
01027 
01028 extern boolean langunpackverb (hdltreenode, tyvaluerecord *);
01029 
01030 extern boolean langunpackwindowverb (hdltreenode, tyvaluerecord *);
01031 
01032 extern boolean langvaluetotextscrap (tyvaluerecord, Handle);
01033 
01034 
01035 extern boolean langcanusealiases (void);  /*langsystem7.c*/
01036 
01037 extern boolean langcanuseappleevents (void);
01038 
01039 
01040 extern void cleartmpstack (void); /*langtmpstack.c*/
01041 
01042 extern boolean pushtmpstackvalue (tyvaluerecord *);
01043 
01044 extern boolean pushtmpstack (Handle);
01045 
01046 extern void releaseheaptmp (Handle);
01047 
01048 extern boolean pushvalueontmpstack (tyvaluerecord *);
01049 
01050 extern boolean disposetmpvalue (tyvaluerecord *);
01051 
01052 extern boolean exemptfromtmpstack (tyvaluerecord *);
01053 
01054 
01055 extern boolean langdisposetree (hdltreenode); /*langtree.c*/
01056 
01057 
01058 extern boolean langsymbolreference (hdlhashtable, bigstring, tyvaluerecord *, hdlhashnode *); /*langvalue.c*/
01059 
01060 extern void initvalue (tyvaluerecord *, tyvaluetype);
01061 
01062 extern boolean setnilvalue (tyvaluerecord *);
01063 
01064 extern boolean setbooleanvalue (boolean, tyvaluerecord *);
01065 
01066 extern boolean setcharvalue (byte, tyvaluerecord *);
01067 
01068 extern boolean setintvalue (short, tyvaluerecord *);
01069 
01070 extern boolean setlongvalue (long, tyvaluerecord *);
01071 
01072 extern boolean setdatevalue (unsigned long, tyvaluerecord *);
01073 
01074 extern boolean setdirectionvalue (tydirection, tyvaluerecord *);
01075 
01076 extern boolean setostypevalue (OSType, tyvaluerecord *);
01077 
01078 extern boolean setpointvalue (Point, tyvaluerecord *);
01079 
01080 extern boolean setfixedvalue (Fixed, tyvaluerecord *);
01081 
01082 extern boolean setsinglevalue (float, tyvaluerecord *);
01083 
01084 extern boolean newheapvalue (ptrvoid, long, tyvaluetype, tyvaluerecord *);
01085 
01086 extern boolean setstringvalue (bigstring, tyvaluerecord *);
01087 
01088 extern boolean setaddressvalue (hdlhashtable, const bigstring, tyvaluerecord *);
01089 
01090 extern boolean setexemptaddressvalue (hdlhashtable htable, const bigstring bs, tyvaluerecord *val);
01091 
01092 extern boolean getaddressvalue (tyvaluerecord, hdlhashtable *, bigstring);
01093 
01094 /*
01095 extern boolean setpasswordvalue (bigstring, tyvaluerecord *);
01096 */
01097 
01098 extern boolean setheapvalue (Handle, tyvaluetype, tyvaluerecord *);
01099 
01100 extern boolean setbinaryvalue (Handle, OSType, tyvaluerecord *);
01101 
01102 extern boolean setbinarytypeid (Handle, OSType);
01103 
01104 extern OSType getbinarytypeid (Handle);
01105 
01106 extern boolean stripbinarytypeid (Handle);
01107 
01108 extern boolean setdoublevalue (double, tyvaluerecord *);
01109 
01110 extern boolean setfilespecvalue (tyfilespec *, tyvaluerecord *);
01111 
01112 extern boolean setexternalvalue (Handle, tyvaluerecord *);
01113 
01114 extern boolean langhashtablelookup (hdlhashtable htable, const bigstring bs, tyvaluerecord *vreturned, hdlhashnode *); /*6.1d4 AR*/
01115 
01116 extern boolean langassigntextvalue (hdlhashtable ht, bigstring bs, Handle h); /*6.1d4 AR*/
01117 
01118 extern boolean langlookupstringvalue (hdlhashtable ht, bigstring bs, bigstring bsval); /*6.1d3 AR*/
01119 
01120 extern boolean langlookupaddressvalue (hdlhashtable ht, bigstring bs, tyaddress *addressval); /*6.1d3 AR*/
01121 
01122 extern boolean langlookuplongvalue (hdlhashtable ht, bigstring bs, long *x); /*6.1d4 AR*/
01123 
01124 extern boolean langlookupbooleanvalue (hdlhashtable ht, bigstring bs, boolean *fl); /*6.1d3 AR*/
01125 
01126 extern boolean langtablecopyvalue (hdlhashtable hsource, hdlhashtable hdest, bigstring bs); /*6.1d4 AR*/
01127 
01128 
01129 extern boolean setwinvalue (WindowPtr pwindow, tyvaluerecord *val); /*shellwindowverbs.c*/
01130 
01131 extern boolean copyvaluedata (tyvaluerecord *);
01132 
01133 extern boolean copyvaluerecord (tyvaluerecord, tyvaluerecord *);
01134 
01135 #ifdef DATABASE_DEBUG
01136     extern void debug_disposevaluerecord (tyvaluerecord, boolean, long, char*);
01137     #define disposevaluerecord(val, fldisk) \
01138         debug_disposevaluerecord (val, fldisk, __LINE__, __FILE__)
01139 #else
01140     extern void disposevaluerecord (tyvaluerecord, boolean);
01141 #endif
01142 
01143 extern boolean langgetspecialtable (bigstring, hdlhashtable *);
01144 
01145 extern boolean getaddresspath (tyvaluerecord, bigstring);
01146 
01147 //extern boolean truevalue (tyvaluerecord); //6.2b15 AR: removed
01148 
01149 extern boolean coercetolong (tyvaluerecord *);
01150 
01151 extern boolean coercetoint (tyvaluerecord *);
01152 
01153 extern boolean coercetorgb (tyvaluerecord *);
01154 
01155 extern boolean coercetoostype (tyvaluerecord *);
01156 
01157 extern boolean coercetostring (tyvaluerecord *);
01158 
01159 extern boolean coercetoaddress (tyvaluerecord *);
01160 
01161 extern boolean coercetoboolean (tyvaluerecord *);
01162 
01163 extern boolean coercetofilespec (tyvaluerecord *);
01164 
01165 extern boolean coercetobinary (tyvaluerecord *);
01166 
01167 extern boolean coercevalue (tyvaluerecord *, tyvaluetype);
01168 
01169 extern boolean coercetypes (tyvaluerecord *, tyvaluerecord *);
01170 
01171 extern void disposevalues (tyvaluerecord *, tyvaluerecord *);
01172 
01173 extern boolean langgetidentifier (hdltreenode, bigstring);
01174 
01175 extern boolean langtablelookup (hdlhashtable, bigstring, hdlhashtable *);
01176 
01177 extern boolean langsearchpathlookup (bigstring, hdlhashtable *);
01178 
01179 extern boolean langexpandtodotparams (bigstring, hdlhashtable *, bigstring);
01180 
01181 extern boolean langgetdotparams (hdltreenode, hdlhashtable *, bigstring);
01182 
01183 extern boolean idstringvalue (hdlhashtable, bigstring, bigstring);
01184 
01185 extern boolean langcheckparamcount (hdltreenode, short);
01186 
01187 extern short langgetparamcount (hdltreenode);
01188 
01189 extern boolean getparamvalue (hdltreenode, short, tyvaluerecord *);
01190 
01191 extern boolean getreadonlyparamvalue (hdltreenode, short, tyvaluerecord *); /* 2003-04-28 AR: needed in langregexp.c */
01192 
01193 extern boolean getoptionalparam (hdltreenode, short *, short *, bigstring, hdltreenode *);
01194 
01195 extern boolean getoptionalparamvalue (hdltreenode, short *, short *, bigstring, tyvaluerecord *);
01196 
01197 extern boolean getoptionaladdressparam (hdltreenode , short *, short *, bigstring , hdlhashtable *, bigstring); /*2006-03-10 aradke*/
01198 
01199 extern boolean getoptionaltableparam (hdltreenode , short *, short *, bigstring, hdlhashtable *); /*2006-03-10 aradke*/
01200 
01201 extern boolean getaddressparam (hdltreenode, short, tyvaluerecord *);
01202 
01203 extern boolean getvarparam (hdltreenode, short, hdlhashtable *, bigstring);
01204 
01205 extern boolean getcharparam (hdltreenode, short, tyvaluerecord *);
01206 
01207 extern boolean getlongparam (hdltreenode, short, tyvaluerecord *);
01208 
01209 extern boolean getdateparam (hdltreenode, short, tyvaluerecord *);
01210 
01211 extern boolean getintparam (hdltreenode, short, tyvaluerecord *);
01212 
01213 extern boolean getbooleanparam (hdltreenode, short, tyvaluerecord *);
01214 
01215 extern boolean getstringparam (hdltreenode, short, tyvaluerecord *);
01216 
01217 extern boolean getdirectionparam (hdltreenode, short, tyvaluerecord *);
01218 
01219 extern boolean getostypeparam (hdltreenode, short, tyvaluerecord *);
01220 
01221 extern boolean getpointparam (hdltreenode, short, tyvaluerecord *);
01222 
01223 extern boolean getrectparam (hdltreenode, short, tyvaluerecord *);
01224 
01225 extern boolean getrgbparam (hdltreenode, short, tyvaluerecord *);
01226     
01227 extern boolean getpatternparam (hdltreenode, short, tyvaluerecord *);
01228 
01229 extern boolean getfixedparam (hdltreenode, short, tyvaluerecord *);
01230 
01231 extern boolean getsingleparam (hdltreenode, short, tyvaluerecord *);
01232 
01233 extern boolean getdoubleparam (hdltreenode, short, tyvaluerecord *);
01234 
01235 extern boolean getfilespecparam (hdltreenode, short, tyvaluerecord *);
01236 
01237 extern boolean getaliasparam (hdltreenode, short, tyvaluerecord *);
01238 
01239 extern boolean getobjspecparam (hdltreenode, short, tyvaluerecord *);
01240 
01241 extern boolean getbinaryparam (hdltreenode, short, tyvaluerecord *);
01242 
01243 #ifdef shellinclude
01244 extern boolean getwinparam (hdltreenode, short, hdlwindowinfo *); // shellwindowverbs.c
01245 #endif
01246 
01247 extern boolean getvarvalue (hdltreenode, short, hdlhashtable *, bigstring, tyvaluerecord *, hdlhashnode *);
01248 
01249 extern boolean getstringvalue (hdltreenode, short, bigstring);
01250 
01251 extern boolean gettextvalue (hdltreenode, short, Handle *);
01252 
01253 extern boolean getexempttextvalue (hdltreenode, short, Handle *);
01254 
01255 extern boolean getreadonlytextvalue (hdltreenode, short, Handle *);
01256 
01257 extern boolean getintvalue (hdltreenode, short, short *);
01258 
01259 extern boolean getbooleanvalue (hdltreenode, short, boolean *);
01260 
01261 extern boolean getcharvalue (hdltreenode, short, char *);
01262 
01263 extern boolean getlongvalue (hdltreenode, short, long *);
01264 
01265 extern boolean getdirectionvalue (hdltreenode, short, tydirection *);
01266 
01267 extern boolean getdatevalue (hdltreenode, short, unsigned long *);
01268 
01269 extern boolean getostypevalue (hdltreenode, short, OSType *);
01270 
01271 extern boolean getfilespecvalue (hdltreenode, short, tyfilespec *);
01272 
01273 extern boolean getpointvalue (hdltreenode, short, Point *);
01274 
01275 extern boolean getrectvalue (hdltreenode, short, Rect *);
01276 
01277 extern boolean getrgbvalue (hdltreenode, short, RGBColor *);
01278 
01279 extern boolean getbinaryvalue (hdltreenode, short, boolean, Handle *);
01280 
01281 extern boolean langsetbooleanvarparam (hdltreenode , short, boolean); /* 08/14/2000 AR */
01282 
01283 extern boolean langsetlongvarparam (hdltreenode, short, long);
01284 
01285 extern boolean langsetstringvarparam (hdltreenode, short, bigstring);   /* 2004-10-31 aradke */
01286 
01287 extern boolean setintvarparam (hdltreenode, short, short);
01288 
01289 extern boolean addvalue (tyvaluerecord, tyvaluerecord, tyvaluerecord *);
01290 
01291 extern boolean subtractvalue (tyvaluerecord, tyvaluerecord, tyvaluerecord *);
01292 
01293 extern boolean multiplyvalue (tyvaluerecord, tyvaluerecord, tyvaluerecord *);
01294 
01295 extern boolean dividevalue (tyvaluerecord, tyvaluerecord, tyvaluerecord *);
01296 
01297 extern boolean modvalue (tyvaluerecord, tyvaluerecord, tyvaluerecord *);
01298 
01299 extern boolean EQvalue (tyvaluerecord, tyvaluerecord, tyvaluerecord *);
01300 
01301 extern boolean NEvalue (tyvaluerecord, tyvaluerecord, tyvaluerecord *);
01302 
01303 extern boolean GTvalue (tyvaluerecord, tyvaluerecord, tyvaluerecord *);
01304 
01305 extern boolean LEvalue (tyvaluerecord, tyvaluerecord, tyvaluerecord *);
01306 
01307 extern boolean LTvalue (tyvaluerecord, tyvaluerecord, tyvaluerecord *);
01308 
01309 extern boolean GEvalue (tyvaluerecord, tyvaluerecord, tyvaluerecord *);
01310 
01311 extern boolean beginswithvalue (tyvaluerecord, tyvaluerecord, tyvaluerecord *);
01312 
01313 extern boolean endswithvalue (tyvaluerecord, tyvaluerecord, tyvaluerecord *);
01314 
01315 extern boolean containsvalue (tyvaluerecord, tyvaluerecord, tyvaluerecord *);
01316 
01317 extern boolean andandvalue (tyvaluerecord, hdltreenode, tyvaluerecord *);
01318 
01319 extern boolean ororvalue (tyvaluerecord, hdltreenode, tyvaluerecord *);
01320 
01321 extern boolean unaryminusvalue (tyvaluerecord, tyvaluerecord *);
01322 
01323 extern boolean notvalue (tyvaluerecord, tyvaluerecord *);
01324 
01325 extern boolean kernelfunctionvalue (hdlhashtable, bigstring, hdltreenode, tyvaluerecord *);
01326 
01327 extern boolean langhandlercall (hdltreenode, hdltreenode, tyvaluerecord *);
01328 
01329 extern boolean langfunctioncall (hdltreenode, hdlhashtable, hdlhashnode, bigstring, hdltreenode, hdltreenode, tyvaluerecord *);
01330 
01331 extern boolean functionvalue (hdltreenode, hdltreenode, tyvaluerecord *);
01332 
01333 
01334 extern boolean langzoomvalwindow (hdlhashtable, bigstring, tyvaluerecord, boolean); /*langverbs.c*/
01335 
01336 extern boolean langfindtargetwindow (short, WindowPtr *);
01337 
01338 extern boolean setstatusbarstring (bigstring bs, long partNumber); /*7.0b20 PBS: new statusbar verbs from Bob*/
01339 
01340 extern boolean getstatusbarstring (bigstring bs, long partNumber);
01341 
01342 extern boolean setstatusbarparts (long count, long * partArray);
01343 
01344 extern long getstatusbarparts (long * array);
01345 
01346 extern boolean langcleartarget (tyvaluerecord *prevtarget);
01347 
01348 extern boolean langsettarget (hdlhashtable htable, bigstring bsname, tyvaluerecord *prevtarget);
01349 
01350 #endif
01351 
01352 
01353 

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