langstartup.c File Reference

#include "frontier.h"
#include "standard.h"
#include "memory.h"
#include "file.h"
#include "ops.h"
#include "strings.h"
#include "shellhooks.h"
#include "langexternal.h"
#include "langinternal.h"
#include "langtokens.h"
#include "tableinternal.h"
#include "tableverbs.h"
#include "tablestructure.h"
#include "resources.h"
#include "WinSockNetEvents.h"
#include "sysshellcall.h"
#include "byteorder.h"

Include dependency graph for langstartup.c:

Go to the source code of this file.

Defines

#define str_isPike   BIGSTRING ("\x06" "isPike")
#define str_isOpmlEditor   BIGSTRING ("\x0c" "isOpmlEditor")
#define str_isFrontier   BIGSTRING ("\x0a" "isFrontier")
#define str_isRadio   BIGSTRING ("\x07" "isRadio")
#define str_isMac   BIGSTRING ("\x05" "isMac")
#define str_isMacOsClassic   BIGSTRING ("\x0e" "isMacOsClassic")
#define str_isServer   BIGSTRING ("\x08" "isServer")
#define str_isWindows   BIGSTRING ("\x09" "isWindows")
#define str_osFlavor   BIGSTRING ("\x08" "osFlavor")
#define str_osMajorVersion   BIGSTRING ("\x0e" "osMajorVersion")
#define str_osMinorVersion   BIGSTRING ("\x0e" "osMinorVersion")
#define str_osPointVersion   BIGSTRING ("\x0e" "osPointVersion")
#define str_osBuildNumber   BIGSTRING ("\x0d" "osBuildNumber")
#define str_osVersionString   BIGSTRING ("\x0f" "osVersionString")
#define str_osFullNameForDisplay   BIGSTRING ("\x14" "osFullNameForDisplay")
#define str_winServicePackNumber   BIGSTRING ("\x14" "winServicePackNumber")
#define str_isCarbon   BIGSTRING ("\x08" "isCarbon")
#define str_maxTcpConnections   BIGSTRING ("\x11" "maxTcpConnections")
#define add(x, y)   if (!langaddcstringkeyword ((ptrstring) x, y)) return (false)
#define addnil(x)   if (!langaddnilconst ((ptrstring) x)) return (false)
#define addlong(x, y)   if (!langaddlongconst ((ptrstring) x, y)) return (false)
#define addint(x, y)   if (!langaddintconst ((ptrstring) x, y)) return (false)
#define adddirection(x, y)   if (!langadddirectionconst ((ptrstring) x, y)) return (false)
#define addboolean(x, y)   if (!langaddbooleanconst ((ptrstring) x, y)) return (false)
#define addtype(x, y)   if (!langaddtypeconst ((ptrstring) x, y)) return (false)
#define addstring(x, y)   if (!langaddstringconst ((ptrstring) x, y)) return (false)

Functions

void initsegment (void)
static boolean newfunctionprocessor (bigstring bsname, langvaluecallback valuecallback, boolean flwindow, hdlhashtable *htable)
static boolean hashinsertcstring (bigstring bs, const tyvaluerecord *v)
static boolean langaddcstringkeyword (bigstring bs, short tokennumber)
boolean langaddkeyword (bigstring bs, short tokennumber)
boolean loadfunctionprocessor (short id, langvaluecallback valuecallback)
static boolean initenvironment (hdlhashtable ht)
static boolean initCharsetsTable (hdlhashtable cSetsTable)
boolean inittablestructure (void)
static boolean langaddnilconst (bigstring bs)
static boolean langaddlongconst (bigstring bs, long x)
static boolean langaddstringconst (bigstring bs, bigstring x)
static boolean langadddirectionconst (bigstring bs, tydirection x)
static boolean langaddbooleanconst (bigstring bs, boolean x)
static boolean langaddtypeconst (bigstring bs, tyvaluetype x)
static boolean langinitconsttable (void)
static boolean langinitbuiltintable (void)
static boolean langinitkeywordtable (void)
static boolean langinstallresources (void)
boolean langinitverbs (void)
boolean initlang (void)


Define Documentation

#define add x,
 )     if (!langaddcstringkeyword ((ptrstring) x, y)) return (false)
 

Definition at line 695 of file langstartup.c.

Referenced by langinitbuiltintable(), and langinitkeywordtable().

#define addboolean x,
 )     if (!langaddbooleanconst ((ptrstring) x, y)) return (false)
 

Definition at line 705 of file langstartup.c.

Referenced by langinitconsttable().

#define adddirection x,
 )     if (!langadddirectionconst ((ptrstring) x, y)) return (false)
 

Definition at line 703 of file langstartup.c.

Referenced by langinitconsttable().

#define addint x,
 )     if (!langaddintconst ((ptrstring) x, y)) return (false)
 

Definition at line 701 of file langstartup.c.

#define addlong x,
 )     if (!langaddlongconst ((ptrstring) x, y)) return (false)
 

Definition at line 699 of file langstartup.c.

Referenced by langinitconsttable().

#define addnil  )     if (!langaddnilconst ((ptrstring) x)) return (false)
 

Definition at line 697 of file langstartup.c.

Referenced by langinitconsttable().

#define addstring x,
 )     if (!langaddstringconst ((ptrstring) x, y)) return (false)
 

Definition at line 709 of file langstartup.c.

#define addtype x,
 )     if (!langaddtypeconst ((ptrstring) x, y)) return (false)
 

Definition at line 707 of file langstartup.c.

Referenced by langinitconsttable().

#define str_isCarbon   BIGSTRING ("\x08" "isCarbon")
 

Definition at line 64 of file langstartup.c.

Referenced by initenvironment().

#define str_isFrontier   BIGSTRING ("\x0a" "isFrontier")
 

Definition at line 50 of file langstartup.c.

Referenced by initenvironment().

#define str_isMac   BIGSTRING ("\x05" "isMac")
 

Definition at line 52 of file langstartup.c.

Referenced by initenvironment().

#define str_isMacOsClassic   BIGSTRING ("\x0e" "isMacOsClassic")
 

Definition at line 53 of file langstartup.c.

Referenced by initenvironment().

#define str_isOpmlEditor   BIGSTRING ("\x0c" "isOpmlEditor")
 

Definition at line 49 of file langstartup.c.

Referenced by initenvironment().

#define str_isPike   BIGSTRING ("\x06" "isPike")
 

Definition at line 48 of file langstartup.c.

Referenced by initenvironment().

#define str_isRadio   BIGSTRING ("\x07" "isRadio")
 

Definition at line 51 of file langstartup.c.

Referenced by initenvironment().

#define str_isServer   BIGSTRING ("\x08" "isServer")
 

Definition at line 54 of file langstartup.c.

Referenced by initenvironment().

#define str_isWindows   BIGSTRING ("\x09" "isWindows")
 

Definition at line 55 of file langstartup.c.

Referenced by initenvironment().

#define str_maxTcpConnections   BIGSTRING ("\x11" "maxTcpConnections")
 

Definition at line 65 of file langstartup.c.

Referenced by initenvironment().

#define str_osBuildNumber   BIGSTRING ("\x0d" "osBuildNumber")
 

Definition at line 60 of file langstartup.c.

Referenced by initenvironment().

#define str_osFlavor   BIGSTRING ("\x08" "osFlavor")
 

Definition at line 56 of file langstartup.c.

Referenced by initenvironment().

#define str_osFullNameForDisplay   BIGSTRING ("\x14" "osFullNameForDisplay")
 

Definition at line 62 of file langstartup.c.

Referenced by initenvironment().

#define str_osMajorVersion   BIGSTRING ("\x0e" "osMajorVersion")
 

Definition at line 57 of file langstartup.c.

Referenced by initenvironment().

#define str_osMinorVersion   BIGSTRING ("\x0e" "osMinorVersion")
 

Definition at line 58 of file langstartup.c.

Referenced by initenvironment().

#define str_osPointVersion   BIGSTRING ("\x0e" "osPointVersion")
 

Definition at line 59 of file langstartup.c.

Referenced by initenvironment().

#define str_osVersionString   BIGSTRING ("\x0f" "osVersionString")
 

Definition at line 61 of file langstartup.c.

Referenced by initenvironment().

#define str_winServicePackNumber   BIGSTRING ("\x14" "winServicePackNumber")
 

Definition at line 63 of file langstartup.c.

Referenced by initenvironment().


Function Documentation

static boolean hashinsertcstring bigstring  bs,
const tyvaluerecord v
[static]
 

Definition at line 103 of file langstartup.c.

References convertcstring(), hashinsert(), and v.

Referenced by langaddcstringkeyword(), langadddirectionconst(), langaddlongconst(), langaddnilconst(), and langaddstringconst().

Here is the call graph for this function:

static boolean initCharsetsTable hdlhashtable  cSetsTable  )  [static]
 

Definition at line 427 of file langstartup.c.

References bigstring, ct, i, langassignstringvalue(), and noErr.

Referenced by inittablestructure().

Here is the call graph for this function:

static boolean initenvironment hdlhashtable  ht  )  [static]
 

PIKE

PIKE

Definition at line 229 of file langstartup.c.

References bcdtolong(), BIGSTRING, bigstring, copystring(), disposehandle(), equalstrings(), gestalt(), getsystemversionstring(), langassignbooleanvalue(), langassignlongvalue(), langassignstringvalue(), maxconnections, newemptyhandle(), newtexthandle(), nil, noErr, pushstring(), sethandlecontents(), sethandlesize(), setstringlength, str_isCarbon, str_isFrontier, str_isMac, str_isMacOsClassic, str_isOpmlEditor, str_isPike, str_isRadio, str_isServer, str_isWindows, str_maxTcpConnections, str_osBuildNumber, str_osFlavor, str_osFullNameForDisplay, str_osMajorVersion, str_osMinorVersion, str_osPointVersion, str_osVersionString, str_winServicePackNumber, stringlength, and texthandletostring().

Referenced by inittablestructure().

Here is the call graph for this function:

boolean initlang void   ) 
 

Definition at line 959 of file langstartup.c.

References tylangcallbacks::backgroundtaskcallback, tylangcallbacks::clearerrorcallback, tylangcallbacks::codereplacedcallback, tylangcallbacks::comparenodescallback, tylangcallbacks::debuggercallback, tylangcallbacks::errormessagecallback, tylangcallbacks::errormessagerefcon, falsenoop(), hashflushcache(), hashtablestack, tylangcallbacks::idvaluecallback, langcallbacks, langdefaultpoptable(), langdefaultpushtable(), longsizeof, tylangcallbacks::msgverbcallback, newclearhandle(), nil, tylangcallbacks::partialeventloopcallback, tylangcallbacks::popsourcecodecallback, tylangcallbacks::poptablecallback, tylangcallbacks::processeventcallback, tylangcallbacks::pushsourcecodecallback, tylangcallbacks::pushtablecallback, tylangcallbacks::restoreglobalscallback, tylangcallbacks::saveglobalscallback, tylangcallbacks::scriptcompilecallback, tylangcallbacks::scripterrorstack, tylangcallbacks::scriptkilledcallback, shellpushmemoryhook(), tylangcallbacks::symbolchangedcallback, tylangcallbacks::symboldeletedcallback, tylangcallbacks::symbolinsertedcallback, tylangcallbacks::symbolunlinkingcallback, and truenoop().

Here is the call graph for this function:

void initsegment void   ) 
 

Definition at line 68 of file langstartup.c.

Referenced by shellmaineventloop().

boolean inittablestructure void   ) 
 

Definition at line 541 of file langstartup.c.

References charsetstable, disposehashtable(), efptable, environmenttable, error, filewindowtable, initCharsetsTable(), initenvironment(), internaltable, langtable, namecharsetstable, nameefptable, nameenvironmenttable, namefilewindowtable, nameinternaltable, namelangtable, namesemaphoretable, namestacktable, namethreadtable, newhashtable(), nil, pophashtable(), pushhashtable(), runtimestacktable, semaphoretable, tablenewsystemtable(), and threadtable.

Referenced by shellinit().

Here is the call graph for this function:

static boolean langaddbooleanconst bigstring  bs,
boolean  x
[static]
 

Definition at line 675 of file langstartup.c.

References hashinsert(), and setbooleanvalue().

Here is the call graph for this function:

static boolean langaddcstringkeyword bigstring  bs,
short  tokennumber
[static]
 

Definition at line 111 of file langstartup.c.

References tyvaluerecord::data, hashinsertcstring(), initvalue(), short, tyvaluedata::tokenvalue, and tokenvaluetype.

Here is the call graph for this function:

static boolean langadddirectionconst bigstring  bs,
tydirection  x
[static]
 

Definition at line 665 of file langstartup.c.

References hashinsertcstring(), and setdirectionvalue().

Here is the call graph for this function:

boolean langaddkeyword bigstring  bs,
short  tokennumber
 

Definition at line 123 of file langstartup.c.

References tyvaluerecord::data, hashinsert(), initvalue(), short, tyvaluedata::tokenvalue, and tokenvaluetype.

Referenced by loadfunctionprocessor().

Here is the call graph for this function:

static boolean langaddlongconst bigstring  bs,
long  x
[static]
 

Definition at line 626 of file langstartup.c.

References hashinsertcstring(), and setlongvalue().

Here is the call graph for this function:

static boolean langaddnilconst bigstring  bs  )  [static]
 

Definition at line 616 of file langstartup.c.

References hashinsertcstring(), initvalue(), and novaluetype.

Here is the call graph for this function:

static boolean langaddstringconst bigstring  bs,
bigstring  x
[static]
 

Definition at line 636 of file langstartup.c.

References exemptfromtmpstack(), hashinsertcstring(), and setstringvalue().

Here is the call graph for this function:

static boolean langaddtypeconst bigstring  bs,
tyvaluetype  x
[static]
 

Definition at line 685 of file langstartup.c.

References hashinsert(), langgettypeid(), and setostypevalue().

Here is the call graph for this function:

static boolean langinitbuiltintable void   )  [static]
 

Definition at line 808 of file langstartup.c.

References add, appleeventfunc, complexeventfunc, definedfunc, findereventfunc, gestaltfunc, hbuiltinfunctions, indexoffunc, langtable, myMooffunc, nameoffunc, objspecfunc, packfunc, parentoffunc, pophashtable(), pushhashtable(), setobjspecfunc, sizeoffunc, syscrashfunc, tableeventfunc, tablenewsystemtable(), typeoffunc, and unpackfunc.

Referenced by langinstallresources().

Here is the call graph for this function:

static boolean langinitconsttable void   )  [static]
 

Definition at line 712 of file langstartup.c.

References addboolean, adddirection, addlong, addnil, addtype, bigstring, bsfalse, bstrue, chspace, ctvaluetypes, down, externalvaluetype, flatdown, flatup, hconsttable, headvaluetype, langgettypestring(), langtable, lastword(), left, longinfinity, nodirection, novaluetype, olddoublevaluetype, oldstringvaluetype, pagedown, pageleft, pageright, pageup, passwordvaluetype, pushhashtable(), pushstring(), right, tablenewsystemtable(), unused2valuetype, and up.

Referenced by langinstallresources().

Here is the call graph for this function:

static boolean langinitkeywordtable void   )  [static]
 

Definition at line 859 of file langstartup.c.

References add, andfunc, beginswithfunc, breakfunc, bundlefunc, casefunc, containsfunc, continuefunc, downtofunc, elsefunc, endswithfunc, equalsfunc, fileloopfunc, forfunc, greaterthanfunc, hkeywordtable, iffunc, infunc, kernelfunc, langtable, lessthanfunc, localfunc, loopfunc, notequalsfunc, notfunc, onfunc, orfunc, pophashtable(), pushhashtable(), returnfunc, tablenewsystemtable(), thenfunc, tofunc, tryfunc, whilefunc, and withfunc.

Referenced by langinstallresources().

Here is the call graph for this function:

boolean langinitverbs void   ) 
 

Definition at line 951 of file langstartup.c.

References langinitbuiltins(), and langinstallresources().

Referenced by shellinit().

Here is the call graph for this function:

static boolean langinstallresources void   )  [static]
 

Definition at line 936 of file langstartup.c.

References langinitbuiltintable(), langinitconsttable(), and langinitkeywordtable().

Referenced by langinitverbs().

Here is the call graph for this function:

boolean loadfunctionprocessor short  id,
langvaluecallback  valuecallback
 

Definition at line 151 of file langstartup.c.

References assert, BIGSTRING, bigstring, fl, getresourcehandle(), langaddkeyword(), loadfromhandle(), newfunctionprocessor(), nil, pophashtable(), pushhashtable(), releaseresourcehandle(), and reztomemshort.

Referenced by ccinitverbs(), cryptinitverbs(), dbinitverbs(), fileinitverbs(), htmlinitverbs(), langinitbuiltins(), mathinitverbs(), menuinitverbs(), opinitverbs(), pictinitverbs(), shellinitbuiltins(), stringinitverbs(), sysinitverbs(), tableinitverbs(), windowinitverbs(), wpinitverbs(), and xmlinitverbs().

Here is the call graph for this function:

static boolean newfunctionprocessor bigstring  bsname,
langvaluecallback  valuecallback,
boolean  flwindow,
hdlhashtable htable
[static]
 

Definition at line 73 of file langstartup.c.

References efptable, tyhashtable::flverbsrequirewindow, and tablenewsystemtable().

Referenced by loadfunctionprocessor().

Here is the call graph for this function:


Generated on Sun Jun 4 18:27:08 2006 for frontierkernel 10.1.10a by  doxygen 1.4.6