langinternal.h

Go to the documentation of this file.
00001 
00002 /*  $Id: langinternal.h 1254 2006-04-12 20:27:14Z sethdill $    */
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 langinternalinclude
00029 #define langinternalinclude
00030 
00031 
00032 #ifndef langinclude
00033     #include "lang.h"
00034 #endif
00035 
00036 #ifndef processinclude
00037     #include "process.h"
00038 #endif
00039 
00040 
00041 #define langerrorlist 257
00042 
00043 #define undefinederror 1
00044 #define ostypecoerceerror 2 /*maxstringlengtherror*/
00045 #define badentrypointnameerror 3 /*nilparametererror*/
00046 #define stringcharerror 4
00047 #define stringlongerror 5
00048 #define unknownidentifiererror 6
00049 #define notenoughparameterserror 7
00050 #define unexpectedopcodeerror 8 /*used to be builtinrequiresstringerror*/
00051 #define unknownfunctionerror 9
00052 #define cantdeleteerror 10
00053 #define charoutofrangeerror 11
00054 #define inttoolargeerror 12
00055 #define inttoosmallerror 13
00056 #define stringnotterminatederror 14
00057 #define badcharconsterror 15
00058 #define illegaltokenerror 16
00059 #define stringnotbooleanerror 17
00060 #define dividebyzeroerror 18
00061 #define parsererror 19
00062 #define tmpstackoverflowerror 20
00063 #define notvarparamerror 21
00064 #define multiplesymbolerror 22
00065 #define intcoerceerror 23
00066 #define charcoerceerror 24
00067 #define longcoerceerror 25
00068 #define datecoerceerror 26
00069 #define stringcoerceerror 27
00070 #define booleancoerceerror 28
00071 #define notfunctionerror 29
00072 #define toomanyparameterserror 30
00073 #define badreplacecontexterror 31 /*nohfswindowerror*/
00074 #define badaddresserror 32 /*undeclaredapperror*/
00075 #define ipcerror 33
00076 #define appnotloadederror 34
00077 #define badexternalassignmenterror 35 /*texttoolongerror*/
00078 #define cantcoercetobinaryerror 36
00079 #define coercionnotpossibleerror 37
00080 #define unaryminusnotpossibleerror 38
00081 #define unarynotnotpossibleerror 39
00082 #define foragentsonlyerror 40 /*nowindowopenerror*/
00083 #define invaliddirectionerror 41
00084 #define badipclistvalerror 42 /*notarrayerror*/
00085 #define badipclistposerror 43 /*arrayreferror*/
00086 #define numbertoolargeerror 44 /*cantcoercetostringerror*/
00087 #define ipcappleerror 45 /*badostypeerror*/
00088 #define nosuchtableerror 46
00089 #define notefperror 47
00090 #define arraynottableerror 48
00091 #define arrayindexerror 49
00092 #define arraystringindexerror 50
00093 #define cantsizeerror 51
00094 #define tabletoosmallerror 52
00095 #define numbernotpositiveerror 53 /*badindexname*/
00096 #define cantpackerror 54
00097 #define cantunpackerror 55
00098 #define unpackformaterror 56
00099 #define cantpackthisexternalerror 57
00100 #define cantunpackthisexternalerror 58
00101 #define iacaddresserror 59 /*verbnotacceptederror*/
00102 #define addresscoerceerror 60 /*onedotperexternalmessageerror*/
00103 #define iactoolkitnotintializederror 61
00104 #define badwithstatementerror 62 /*stringtoolongerror*/
00105 #define nopatherror 63
00106 #define externalreturnerror 64 /*addressrequirederror*/
00107 #define externalgetvalueerror 65
00108 #define externalassignerror 66
00109 #define trapnotrunningerror 67
00110 #define dialognotrunningerror 68
00111 #define cantloaddialogerror 69
00112 #define dialogitemnumerror 70
00113 #define cantnestdialogserror 71
00114 #define badexternaloperationerror 72
00115 #define additionnotpossibleerror 73
00116 #define subtractionnotpossibleerror 74
00117 #define multiplicationnotpossibleerror 75
00118 #define divisionnotpossibleerror 76
00119 #define modulusnotpossibleerror 77
00120 #define comparisonnotpossibleerror 78
00121 #define toomanywithtableserror 79
00122 #define stackoverflowerror 80
00123 #define badoutgoingipctypeerror 81
00124 #define cantruncarderror 82 /*badincomingipctypeerror*/
00125 #define binarycoerceerror 83
00126 #define pointcoerceerror 84
00127 #define rectcoerceerror 85
00128 #define rgbcoerceerror 86
00129 #define patterncoerceerror 87
00130 #define filespeccoerceerror 88
00131 #define aliascoerceerror 89
00132 #define badrandomboundserror 90 /*objspeccoerceerror*/
00133 #define cantusealiaseserror 91
00134 #define cantuseobjspecserror 92
00135 #define badkeyformerror 93
00136 #define binaryrequirederror 94
00137 #define floatcoerceerror 95
00138 #define notxcmderror 96
00139 #define notucmderror 97
00140 #define notcarderror 98
00141 #define badrangeoperationerror 99
00142 #define badobjectspecificationerror 100
00143 #define cantopencomponenterror 101
00144 #define cantbackgroundclipboard 102
00145 #define listcoerceerror 103
00146 #define badfieldoperationerror 104
00147 #define unknownparametererror 105
00148 #define duplicateparametererror 106
00149 #define binarytypecoerceerror 107
00150 #define nocomponentmanagererror 108
00151 #define bitindexerror 109
00152 #define badnetworkvolumespecificationerror 110
00153 #define nofileopenerror 111
00154 #define floattolongerror 112
00155 #define semaphoretimeouterror 113
00156 #define badthreadiderror 114
00157 #define dbnotopenederror 115
00158 #define dbopenedreadonlyerror 116
00159 #define unimplementedverberror 117
00160 #define needopendberror 118
00161 #define externalvaluerequirederror 119
00162 #define niladdresserror 120
00163 #define tableloadingerror 121
00164 #define filenotopenederror 122
00165 #define cantconnecttodllerror 123
00166 #define cantfindprocinfoerror 124
00167 #define cantfinddllfunctionerror 125
00168 #define cantfindprocinfofunctionerror 126
00169 #define noattributestableerror 127
00170 #define cantfindattributeerror 128
00171 #define cantgetxmladdresserror 129
00172 #define badxmltexterror 130
00173 #define missingxmlattributeserror 131
00174 #define cantdecompilerror 132
00175 #define frontierxmldatatypeerror 133
00176 #define hashpackerror 134
00177 #define hashunpackerror 135
00178 #define evaldirectiveerror 136
00179 #define emptydefinedirective 137
00180 #define illegalnameerror 138
00181 #define tablesavingerror 139
00182 #define badrenameerror 140
00183 #define cantencodeaddress 141
00184 #define cantdecodeaddress 142
00185 #define badwindowerror 143
00186 #define parseaddresserror 144
00187 #define urlspliterror 145
00188 #define cloudspecerror 146
00189 #define cloudelementerror 147
00190 #define bitshiftdisterror 148
00191 #define cantfindprocinfoloaderror 149
00192 #define regexpcompileerror 150
00193 #define regexpinvaliderror 151
00194 #define regexpinternalerror 152
00195 #define regexpbadgroupnameerror 153
00196 #define regexpnonexistantgroupnumbererror 154
00197 #define regexpnonexistantgroupnameerror 155
00198 #define regexpnonexistantgrouperror 156
00199 #define frinternalerror 157
00200 #define frbadgroupnameerror 158
00201 #define frnonexistantgroupnumbererror 159
00202 #define frnonexistantgroupnameerror 160
00203 #define replaceitemerror 161 /* 2005-09-26 creedon */
00204 #define cmdshellnotfounderror 162 /* 2006-03-10 aradke */
00205 
00206 #define langstacklist 137
00207 
00208 typedef enum tystackid { /*stack names*/
00209     
00210     idtablestack = 1,
00211     
00212     iderrorcallbackstack,
00213     
00214     idsourcestack,
00215     
00216     idlocalsstack,
00217     
00218     idprogramstack
00219     } tystackid;
00220 
00221 
00222 #define machinePPC  BIGSTRING ("\x07" "PowerPC")
00223 #define machine68K  BIGSTRING ("\x03" "68K")
00224 #define machinex86  BIGSTRING ("\x03" "x86")
00225 
00226 #define osMacOS     BIGSTRING ("\x05" "MacOS")
00227 #define osWin95     BIGSTRING ("\x05" "Win95")
00228 #define osWinNT     BIGSTRING ("\x05" "WinNT")
00229 //Code change by Timothy Paustian Tuesday, July 11, 2000 9:42:50 PM
00230 //Add a const to return for the carbon OS
00231 #define osCarbon    BIGSTRING ("\x05" "MacCn")
00232 
00233 typedef boolean (*langtreevisitcallback) (hdltreenode, ptrvoid);
00234 
00235 
00236 #define idusertalkstring 128
00237 #define idusertalkdescriptionstring 129
00238 
00239 
00240 #define langinterfacelist 138
00241 
00242 enum { /*lang interface strings*/
00243     
00244     useparenthesisstring = 1,
00245     
00246     unresolvedaliasstring,
00247     
00248     unavailablestring,
00249     
00250     appwhoseidstring,
00251     
00252     appinfotablestring,
00253     
00254     appidfieldstring,
00255     
00256     appnamefieldstring,
00257     
00258     onthisnetstring,
00259     
00260     onthismacstring,
00261     
00262     nomaintorunstring,
00263     
00264     needmodulecallstring,
00265     
00266     useaddressoperatorstring,
00267     
00268     usertalkcomponentstring,
00269         
00270     anomynousthreadstring,
00271 
00272     appleeventthreadstring
00273     };
00274 
00275 
00276 #define langmiscstringlist 158
00277 
00278 enum { /*lang misc display strings*/
00279 
00280     unknownstring = 1,
00281     
00282     errorstring,
00283     
00284     
00285     #if !flruntime
00286     
00287     ondiskstring,
00288     
00289     treesizestring,
00290     
00291     treesizestring2,
00292     
00293     tokennumberstring,
00294     
00295     breakpointstring,
00296     
00297     levelstring,
00298     
00299     enumstring,
00300     
00301     #endif
00302     
00303     
00304     numberstring,
00305     
00306     nonestring,
00307     
00308     nilstring,
00309     
00310     justnilstring
00311     };
00312 
00313 
00314 extern boolean fllangerror; /*if true, the langerror dialog has already appeared*/
00315 
00316 extern unsigned short langerrordisable; /*6.1.1b2 AR: if > 0, don't execute langerrors*/
00317 
00318 extern Handle tryerror; /*non-nil after try error, until else is evaluated*/
00319 
00320 extern Handle tryerrorstack; /*non-nil after try error, until else is evaluated*/
00321 
00322 extern boolean flparamerrorenabled; /*if true, no error dialog from getparam*/
00323 
00324 extern boolean flbreak; /*for break op*/
00325 
00326 extern boolean flcontinue; /*for continue op*/
00327 
00328 extern boolean flreturn; /*for return op*/
00329 
00330 extern hdlhashtable hmagictable; /*for communication with evaluatelist*/
00331 
00332 extern DialogPtr langmodaldialog;
00333 
00334 extern bigstring bsfunctionname;
00335 
00336 extern boolean flstackoverflow; /*langops.c*/
00337 
00338 extern boolean flfindanyspecialsymbol;
00339 
00340 extern bigstring bscontainername; /*langtree.c*/
00341 
00342 extern boolean flcoerceexternaltostring; /*langvalue.c*/
00343 
00344 extern boolean flinhibitnilcoercion; /*langvalue.c*/
00345 
00346 //extern short flextendedsymbolsearch;
00347 
00348 
00349 /*prototypes*/
00350 
00351 extern boolean langpushlocalchain (hdlhashtable *); /*langcallbacks.c*/
00352 
00353 extern boolean langpoplocalchain (hdlhashtable);
00354 
00355 extern boolean languserescaped (boolean);
00356 
00357 //extern langprogramkilled (void);
00358 
00359 extern boolean langdebuggercall (hdltreenode);
00360 
00361 extern boolean langsaveglobals (void);
00362 
00363 extern boolean langrestoreglobals (void);
00364 
00365 extern boolean langpushsourcecode (hdlhashtable, hdlhashnode, bigstring);
00366 
00367 extern boolean langpopsourcecode (void);
00368 
00369 extern boolean langgetsourcecodeaddress (hdlhashtable *htable, bigstring bsname);
00370 
00371 extern boolean langerrormessage (bigstring);
00372 
00373 
00374 #ifdef flnewfeatures
00375 
00376 extern boolean langruncard (hdltreenode hparam1, boolean flmodal, tyvaluerecord *vreturned); /*langcard.c*/
00377 
00378 extern boolean langismodalcard (hdltreenode, tyvaluerecord *);
00379 
00380 extern boolean langsetmodalcardtimeout (hdltreenode, tyvaluerecord *);
00381 
00382 extern boolean langcardstart (void);
00383 
00384 #endif
00385 
00386 
00387 extern boolean langdialogrunning (void); /*langdialog.c*/
00388 
00389 extern boolean langgetdialogvalue (hdltreenode, tyvaluerecord *);
00390 
00391 extern boolean langsetdialogvalue (hdltreenode, tyvaluerecord *);
00392 
00393 extern boolean langsetdialogitemenable (hdltreenode, tyvaluerecord *);
00394 
00395 extern boolean langsetdialogitemvis (hdltreenode, boolean, tyvaluerecord *);
00396 
00397 extern boolean langrundialog (hdltreenode, tyvaluerecord *);
00398 
00399 
00400 extern boolean langdialogstart (void); /*langdialog.c*/
00401 
00402 
00403 extern void parseerror (bigstring); /*langerror.c*/
00404 
00405 
00406 extern hdlerrorstack langerrorgetstack (void); /*langerrorwindow.c*/
00407 
00408 extern boolean langerrorstart (void);
00409 
00410 
00411 extern void langseterrorline (hdltreenode); /*langevaluate.c*/
00412 
00413 extern boolean langrunscript (bigstring, tyvaluerecord *, hdlhashtable, tyvaluerecord *);
00414 
00415 extern boolean evaluatetree (hdltreenode, tyvaluerecord *);
00416 
00417 extern boolean evaluatelist (hdltreenode, tyvaluerecord *);
00418 
00419 
00420 extern boolean hashflushcache (long *); /*langhash.h*/
00421 
00422 extern short hashfunction (const bigstring);
00423 
00424 extern boolean hashresolvevalue (hdlhashtable, hdlhashnode);
00425 
00426 
00427 extern boolean langrunmodeless (hdltreenode, tyvaluerecord *); /*langmodeless.c*/
00428 
00429 
00430 extern boolean langheaptype (tyvaluetype); /*langops.c*/
00431 
00432 extern boolean langheapallocated (tyvaluerecord *, Handle *);
00433 
00434 extern void langgetwithvaluename (short, bigstring);
00435 
00436 extern boolean langgetvalsize (tyvaluerecord, long *);
00437 
00438 extern boolean langgetstringlist (short, bigstring);
00439 
00440 extern boolean langgetmiscstring (short, bigstring);
00441 
00442 extern boolean langcheckstacklimit (tystackid, short, short);
00443 
00444 extern void langbadexternaloperror (short, tyvaluerecord);
00445 
00446 extern void langarrayreferror (short, bigstring, const tyvaluerecord *, tyvaluerecord *);
00447 
00448 extern boolean langfindexternalwindow (const bigstring, Handle *);
00449 
00450 extern boolean langgetuserflag (short, boolean);
00451 
00452 extern boolean langsetuserflag (short, boolean);
00453 
00454 extern boolean langgetthisaddress (hdlhashtable *, bigstring);
00455 
00456 extern boolean langsetthisvalue (hdlhashtable, hdlhashtable, bigstring);
00457 
00458 extern boolean langfastaddresstotable (hdlhashtable, bigstring, hdlhashtable *);
00459 
00460 extern boolean langvaltocode (tyvaluerecord *vcode, hdltreenode *hcode); //02/04/02 dmb
00461 
00462 extern boolean langfollowifaddressvalue (tyvaluerecord *v);
00463 
00464 
00465 extern boolean isfirstidentifierchar (byte ch); /*langscan.c*/
00466 
00467 extern boolean isidentifierchar (byte ch);
00468 
00469 extern boolean langisidentifier (bigstring);
00470 
00471 extern boolean langdeparsestring (bigstring, byte);
00472 
00473 extern boolean langstriptextsyntax (Handle);
00474 
00475 extern boolean langaddapplescriptsyntax (Handle);
00476 
00477 
00478 extern void langstarttrace (void); /*langtrace.c*/
00479 
00480 extern void langendtrace (void);
00481 
00482 extern void langtrace (bigstring);
00483 
00484 extern void langsyntaxtrace (boolean);
00485 
00486 
00487 extern boolean langvisitcodetree (hdltreenode, langtreevisitcallback, ptrvoid); /*langtree.c*/
00488 
00489 extern short langcounttreenodes (hdltreenode);
00490 
00491 extern boolean newconstnode (tyvaluerecord, hdltreenode *);
00492 
00493 extern boolean newidnode (tyvaluerecord, hdltreenode *);
00494 
00495 extern boolean pushquadruplet (tytreetype, hdltreenode, hdltreenode, hdltreenode, hdltreenode, hdltreenode *);
00496 
00497 extern boolean pushtriplet (tytreetype, hdltreenode, hdltreenode, hdltreenode, hdltreenode *);
00498 
00499 extern boolean pushbinaryoperation (tytreetype, hdltreenode, hdltreenode, hdltreenode *);
00500 
00501 extern boolean pushunaryoperation (tytreetype, hdltreenode, hdltreenode *);
00502 
00503 extern boolean pushoperation (tytreetype, hdltreenode *);
00504 
00505 extern boolean pushloop (hdltreenode, hdltreenode, hdltreenode, hdltreenode *);
00506 
00507 extern boolean pushloopbody (hdltreenode, hdltreenode);
00508 
00509 extern boolean pushunarystatementlist (hdltreenode, hdltreenode);
00510 
00511 extern boolean pushtripletstatementlists (hdltreenode, hdltreenode, hdltreenode);
00512 
00513 extern boolean pushfunctioncall (hdltreenode, hdltreenode, hdltreenode *);
00514 
00515 extern boolean pushkernelcall (hdltreenode, hdltreenode *);
00516 
00517 extern boolean pushfunctionreference (tyvaluerecord, hdltreenode *);
00518 
00519 extern boolean pushlastlink (hdltreenode, hdltreenode);
00520 
00521 extern boolean pushlastoptionallink (hdltreenode, hdltreenode, hdltreenode *);
00522 
00523 extern boolean langpacktree (hdltreenode, Handle *);
00524 
00525 extern boolean langunpacktree (Handle, hdltreenode *);
00526 
00527 extern boolean langcopytree (hdltreenode, hdltreenode *);
00528 
00529 
00530 extern boolean stringtoaddress (tyvaluerecord *); /*langvalue.c*/
00531 
00532 extern boolean stringisboolean (bigstring bs, boolean *flboolean);
00533 
00534 extern void pullstringvalue (const tyvaluerecord *, bigstring);
00535 
00536 extern boolean setaddressencoding (tyvaluerecord *, boolean);
00537 
00538 extern boolean coercebinaryval (tyvaluerecord *, tyvaluetype, long, tyvaluetype);
00539 
00540 extern boolean getobjspecparam (hdltreenode, short, tyvaluerecord *);
00541 
00542 extern boolean newheapvalue (ptrvoid, long, tyvaluetype, tyvaluerecord *);
00543 
00544 extern boolean langcoerceerror (tyvaluerecord *, tyvaluetype);
00545 
00546 extern boolean langgetdottedsymbolval (hdltreenode, hdlhashtable *, bigstring, tyvaluerecord *, hdlhashnode *);
00547 
00548 extern boolean idvalue (hdltreenode, tyvaluerecord *);
00549 
00550 extern boolean dotvalue (hdltreenode, tyvaluerecord *);
00551 
00552 extern boolean addressofvalue (hdltreenode, tyvaluerecord *);
00553 
00554 extern boolean dereferencevalue (hdltreenode, tyvaluerecord *);
00555 
00556 extern boolean assignvalue (hdltreenode, tyvaluerecord);
00557 
00558 extern boolean deletevalue (hdltreenode, tyvaluerecord *);
00559 
00560 extern boolean modifyassignvalue (hdltreenode, tyvaluerecord, tytreetype, tyvaluerecord *, boolean);
00561 
00562 extern boolean arrayvalue (hdltreenode, tyvaluerecord *);
00563 
00564 extern boolean incrementvalue (boolean, boolean, hdltreenode, tyvaluerecord *);
00565 
00566 extern boolean langgetnodecode (hdlhashtable, bigstring, hdlhashnode, hdltreenode *);
00567 
00568 extern boolean evaluatereadonlyparam (hdltreenode hparam, tyvaluerecord *vparam);
00569 
00570 
00571 extern boolean langinitbuiltins (void); /*langverbs.h*/
00572 
00573 extern boolean langreleasesemaphores (hdlprocessrecord);
00574 
00575 
00576 // langxml.c
00577 
00578 extern boolean langisremotefunction (hdltreenode htree);
00579 
00580 extern boolean langremotefunctioncall (hdltreenode htree, hdltreenode hparam1, tyvaluerecord *vreturned);
00581 
00582 // lang.c
00583 
00584 extern boolean langrunscriptcode (hdlhashtable htable, bigstring bsverb, hdltreenode hcode, tyvaluerecord *vparams, hdlhashtable hcontext, tyvaluerecord *vreturned);
00585 
00586 
00587 #endif /*langinternalinclude*/

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