|
From: <cre...@us...> - 2007-02-23 21:45:06
|
Revision: 1624
http://svn.sourceforge.net/frontierkernel/?rev=1624&view=rev
Author: creecode
Date: 2007-02-23 13:45:04 -0800 (Fri, 23 Feb 2007)
Log Message:
-----------
support for long odb item names and file paths
formatting tweaks
Modified Paths:
--------------
Frontier/branches/Frontier_Long_File_Paths/Common/IowaRuntime/Source/iowaruntime.c
Frontier/branches/Frontier_Long_File_Paths/Common/UserLandIACToolkit/landsystem7.c
Frontier/branches/Frontier_Long_File_Paths/Common/headers/lang.h
Frontier/branches/Frontier_Long_File_Paths/Common/source/lang.c
Frontier/branches/Frontier_Long_File_Paths/Common/source/langcallbacks.c
Frontier/branches/Frontier_Long_File_Paths/Common/source/langcard.c
Frontier/branches/Frontier_Long_File_Paths/Common/source/langdate.c
Modified: Frontier/branches/Frontier_Long_File_Paths/Common/IowaRuntime/Source/iowaruntime.c
===================================================================
--- Frontier/branches/Frontier_Long_File_Paths/Common/IowaRuntime/Source/iowaruntime.c 2007-02-23 20:59:35 UTC (rev 1623)
+++ Frontier/branches/Frontier_Long_File_Paths/Common/IowaRuntime/Source/iowaruntime.c 2007-02-23 21:45:04 UTC (rev 1624)
@@ -653,6 +653,7 @@
(*lCallback) (ev);
popmacport ();
+
} /*filterevent*/
@@ -669,6 +670,7 @@
ev.message = (long) iowadata;
(*lcallback) (&ev);
+
} /*sendinitmessage*/
@@ -2308,6 +2310,7 @@
boolean runModalCard (Handle hpackedcard, boolean flscriptedcard, short top, short pLeft, tycardeventcallback pCallback) {
+
// 2006-04-03 - kw --- renamed params left -pLeft, callback -> pCallback
/*
dmb 1.0b24: changed flcallback logic. we no longer call back on activate
@@ -2338,6 +2341,7 @@
flreturn = false;
goto exit;
+
}
(**runtimedata).callback = pCallback;
@@ -2351,8 +2355,10 @@
flreturn = false;
goto exit;
+
}
}
+
//Code change by Timothy Paustian Wednesday, August 23, 2000 9:21:06 PM
//
{
@@ -2363,6 +2369,7 @@
#endif
SetPort (thePort);
+
}
sendinitmessage ();
@@ -2439,6 +2446,7 @@
if (flexitcardloop) /*can be set by closeCardWindow*/
break;
+
} /*while*/
exit:
@@ -2452,9 +2460,11 @@
runtimedata = oldruntimedata;
SetPort (oldport);
+
}
return (flreturn);
+
} /*runModalCard*/
@@ -2732,22 +2742,19 @@
}
return (flreturn);
+
} /*runHostedCard*/
boolean initIowaRuntime (void) {
+
+ //
+ // 2007-02-23 creedon: removed A5 related code, not needed on Mac OS X
+ //
+ // 4.1b14 dmb: remember A5 for AE handler
+ //
- /*
- 4.1b14 dmb: remember A5 for AE handler
- */
- //Code change by Timothy Paustian Monday, June 26, 2000 3:16:32 PM
- //
- #if !TARGET_API_MAC_CARBON
- RememberA5 ();
- #endif
-
return (true);
- } /*initIowaRuntime*/
-
-
+ } /*initIowaRuntime*/
+
Modified: Frontier/branches/Frontier_Long_File_Paths/Common/UserLandIACToolkit/landsystem7.c
===================================================================
--- Frontier/branches/Frontier_Long_File_Paths/Common/UserLandIACToolkit/landsystem7.c 2007-02-23 20:59:35 UTC (rev 1623)
+++ Frontier/branches/Frontier_Long_File_Paths/Common/UserLandIACToolkit/landsystem7.c 2007-02-23 21:45:04 UTC (rev 1624)
@@ -227,7 +227,7 @@
pascal boolean landbrowsenetworkapps (ConstStr255Param bsprompt, tynetworkaddress *adr, tyapplicationid id) {
-# pragma unused (bsprompt, adr, id)
+ #pragma unused (bsprompt, adr, id)
/*
7/15/91 DW: return false on system 6.
@@ -478,24 +478,27 @@
static pascal void *eventthreadmain (void *hverb) {
+
+ //
+ // 2007-02-23 creedon: support for long odb item names and file paths
+ //
+ // 4.1b3 dmb: name for initprocessthread is more informative now
+ //
+ // 4.0.1b1 dmb: pass name of thread to initprocessthread; call exitprocessthread
+ //
+ // 2.1a7 dmb: geteventrecords before handling the verb (which disposes it)
+ //
- /*
- 2.1a7 dmb: geteventrecords before handling the verb (which disposes it)
+ register hdlverbrecord hv = (hdlverbrecord) hverb;
- 4.0.1b1 dmb: pass name of thread to initprocessthread; call exitprocessthread
-
- 4.1b3 dmb: name for initprocessthread is more informative now
- */
-
- register hdlverbrecord hv = (hdlverbrecord) hverb;
AppleEvent event, reply;
FSSpec fs;
+ Handle h;
OSType signature;
ProcessSerialNumber psn;
- byte class [6];
- byte token [6];
bigstring bs;
-
+ byte class [ 6 ], token [ 6 ];
+
landsystem7geteventrecords (hv, &event, &reply);
ostypetostring ((**hv).verbclass, class);
@@ -505,12 +508,16 @@
if (landsystem7getsenderinfo (&event, &psn, &fs, &signature) != noErr)
ostypetostring ((**hv).idsender, fs.name);
- langgetstringlist (appleeventthreadstring, bs); // "\papple event ['^0', '^1'] from \xD2^2\xD3"
+ langgetstringlist (appleeventthreadstring, bs ); // "\papple event ['^0', '^1'] from \xD2^2\xD3"
parsedialogstring (bs, class, token, fs.name, nil, bs);
- initprocessthread (bs); /*must call this*/
+ newtexthandle ( bs, &h );
+ initprocessthread ( h ); // must call this
+
+ disposehandle ( h );
+
(void) landhandleverb (hv);
AEResumeTheCurrentEvent (&event, &reply, (AEEventHandlerUPP) kAENoDispatch, 0);
@@ -518,7 +525,8 @@
exitprocessthread ();
return (nil);
- } /*eventthreadmain*/
+
+ } // eventthreadmain
static pascal OSErr landsystem7handleevent (AppleEvent *message, AppleEvent *reply, long refcon) {
@@ -587,23 +595,21 @@
errcode = memFullErr;
goto exit;
+
}
hv = hverb; /*copy into register*/
- /*
- (**hv).flsystemverb = flsystemevent;
- */
+ if (refcon == typeWildCard) {
- if (refcon == typeWildCard) {
+ if (!(*(**hg).findhandlerroutine) (hv)) {
- if (!(*(**hg).findhandlerroutine) (hv)) {
-
landdisposeverb (hv);
errcode = errAEEventNotHandled;
goto exit;
+
}
}
@@ -617,6 +623,7 @@
--fldisableyield;
goto exit;
+
}
if (newprocessthread (&eventthreadmain, (tythreadmainparams) hv, &hthread))
@@ -641,10 +648,13 @@
RestoreA5 (curA5);
#endif
+
}
return (errcode);
+
}
+
} /*landsystem7handleevent*/
@@ -666,6 +676,7 @@
hdlsys7transportinfo ht = (hdlsys7transportinfo) htinfo;
return ((**ht).replyid == (short) id);
+
} /*replyidvisit*/
@@ -694,6 +705,7 @@
return (ec);
*signature = info.processSignature;
+
}
else { /*not a local program*/
@@ -714,6 +726,7 @@
return (noErr);
+
} /*targettoprocessinfo*/
@@ -782,6 +795,7 @@
register hdllandglobals hg = landgetglobals ();
return ((*(**hg).macopenapproutine) ());
+
} /*landsystem7openapproutine*/
@@ -845,7 +859,9 @@
static pascal OSErr landsystem7opendocsroutine (AppleEvent *message, AppleEvent *reply, long refcon) {
-#pragma unused (reply, refcon)
+
+ #pragma unused (reply, refcon)
+
/*
this is the dispatch routine for the open documents (required) core event.
*/
@@ -853,6 +869,7 @@
register hdllandglobals hg = landgetglobals ();
return (landsystem7visitdoclist (message, (**hg).macopendocroutine));
+
} /*landsystem7opendocsroutine*/
@@ -872,7 +889,9 @@
static pascal OSErr landsystem7quitapproutine (AppleEvent *message, AppleEvent *reply, long refcon) {
-#pragma unused (message, reply, refcon)
+
+ #pragma unused (message, reply, refcon)
+
/*
this is the dispatch routine for the quit application (required) core event.
@@ -884,6 +903,7 @@
register hdllandglobals hg = landgetglobals ();
return ((*(**hg).macquitapproutine) ());
+
} /*landsystem7quitapproutine*/
@@ -1123,6 +1143,7 @@
(*cb) (hv);
errcode = landgeterror ();
+
}
else { /*send the message & wait for reply*/
@@ -1151,6 +1172,7 @@
#ifdef flcomponent
{
+
register tyeventsendcallback cb = (**hg).eventsendcallback;
errcode = (*(AESendCallback) cb) (
@@ -1177,6 +1199,7 @@
#endif
landsystem7getlongattr (&message, keyReturnIDAttr, typeLongInteger, &id); /*before disposal*/
+
}
AEDisposeDesc (&message);
@@ -1188,6 +1211,7 @@
landseterror (errcode);
return (false);
+
}
if (mode == kAEQueueReply) {
@@ -1219,6 +1243,7 @@
landseterror (usercancellederror); /*silent error*/
return (false);
+
}
/*we're back! grab reply from transport info*/
@@ -1235,9 +1260,11 @@
landseterror (errAEWaitCanceled);
return (false);
+
}
reply = (**ht).sys7reply;
+
}
/*we got our answer, process it and return*/
@@ -1248,7 +1275,8 @@
/*failed to create verb handle to hold returned values*/
- return (false);
+ return (false);
+
}
hv = *hvalues; /*copy into register*/
@@ -1262,6 +1290,7 @@
(**ht).flownmessage = true;
return (fl);
+
} /*landsystem7send*/
@@ -1745,15 +1774,6 @@
register hdllandglobals hg = landgetglobals ();
-
- #ifdef flcomponent
-
- #if !TARGET_API_MAC_CARBON
- RememberA5 ();
- #endif /*for event handlers, browser hook*/
-
- #endif
-
(**hg).macnetglobals.flhavebrowsed = false;
(**hg).eventsettings.timeoutticks = kNoTimeOut;
@@ -1789,6 +1809,7 @@
#endif
return (true);
+
} /*landsystem7init*/
Modified: Frontier/branches/Frontier_Long_File_Paths/Common/headers/lang.h
===================================================================
--- Frontier/branches/Frontier_Long_File_Paths/Common/headers/lang.h 2007-02-23 20:59:35 UTC (rev 1623)
+++ Frontier/branches/Frontier_Long_File_Paths/Common/headers/lang.h 2007-02-23 21:45:04 UTC (rev 1624)
@@ -181,6 +181,7 @@
dividevalueop = 61,
cttreetypes
+
} tytreetype;
@@ -309,12 +310,17 @@
unsigned long datevalue;
-#ifdef MACVERSION
- tydirection dirvalue;
-#endif
-#ifdef WIN95VERSION
- byte dirvalue;
-#endif
+ #ifdef MACVERSION
+
+ tydirection dirvalue;
+
+ #endif
+
+ #ifdef WIN95VERSION
+
+ byte dirvalue;
+
+ #endif
OSType ostypevalue;
@@ -356,17 +362,20 @@
OSType enumvalue;
-#ifdef oplanglists
- struct tylistrecord **listvalue;
+ #ifdef oplanglists
+
+ struct tylistrecord **listvalue;
- struct tylistrecord **recordvalue;
-#else
- Handle listvalue;
+ struct tylistrecord **recordvalue;
+ #else
+ Handle listvalue;
+
+ Handle recordvalue;
+
+ #endif
+
+ dbaddress diskvalue; // 4.0.2b1 dmb
- Handle recordvalue;
-#endif
-
- dbaddress diskvalue; /*4.0.2b1 dmb*/
} tyvaluedata;
@@ -385,6 +394,7 @@
byte fldiskval: 1; /*set when value data points to disk block of actual value*/
tyvaluedata data;
+
} tyvaluerecord;
@@ -416,10 +426,10 @@
#ifdef fltracklocaladdresses
- struct tyhashnode **refnodelink; /*next guy in linked list of refnodes list of a hashtable*/
-
- struct tyhashtable **reftable; /*table referenced by an address value*/
-
+ struct tyhashnode **refnodelink; /*next guy in linked list of refnodes list of a hashtable*/
+
+ struct tyhashtable **reftable; /*table referenced by an address value*/
+
#endif
tyvaluerecord val; /*the value of the identifier*/
@@ -443,9 +453,7 @@
} tyhashnode, *ptrhashnode, **hdlhashnode;
-#define HNoNode ((hdlhashnode) -1)
-#define gethashkey(h,bs) copystring ((**h).hashkey, bs);
-
+#define HNoNode ((hdlhashnode) -1)
#define ctbuckets 11 /*should be a prime number?*/
@@ -525,25 +533,28 @@
short cttmpstack;
tyvaluerecord tmpstack []; /*temps generated during expression evaluation*/
+
} tyhashtable, *ptrhashtable, **hdlhashtable;
-typedef boolean (*langerrorcallback) (long, long, short, hdlhashtable *, bigstring);
+typedef boolean ( *langerrorcallback ) ( long, long, short, hdlhashtable *, Handle * );
typedef struct tymodulerecord {
-
+
hdltreenode parsetree; /*the code tree generated by the parser*/
boolean flhandler; /*is the generated code a handler (true) or standalone (false)*/
+
} tymodulerecord;
typedef struct tyaddress { // 5.0.2 dmb (finally)
-
+
hdlhashtable ht;
- bigstring bs;
+ Handle h;
+
} tyaddress, *ptraddress;
@@ -568,6 +579,7 @@
#endif
long errorrefcon;
+
} tyerrorrecord;
@@ -587,13 +599,13 @@
typedef boolean (*langtreenodescallback) (hdltreenode, hdltreenode);
-typedef boolean (*langaddresscallback) (hdlhashtable, const bigstring);
+typedef boolean ( *langaddresscallback ) ( hdlhashtable, const Handle );
-typedef boolean (*langsymbolinsertedcallback) (hdlhashtable, const bigstring, hdlhashnode);
+typedef boolean ( *langsymbolinsertedcallback ) ( hdlhashtable, const Handle, hdlhashnode );
typedef boolean (*langtablenodecallback) (hdlhashtable, hdlhashnode);
-typedef boolean (*langsymbolchangedcallback) (hdlhashtable, const bigstring, hdlhashnode, boolean);
+typedef boolean ( *langsymbolchangedcallback ) ( hdlhashtable, const Handle, hdlhashnode, boolean );
typedef short (*langcomparenodescallback)(hdlhashtable, hdlhashnode, hdlhashnode);
@@ -603,7 +615,7 @@
typedef boolean (*langtablecallback)(hdlhashtable);
-typedef boolean (*langsourcecodecallback)(hdlhashtable, hdlhashnode, bigstring);
+typedef boolean ( *langsourcecodecallback ) ( hdlhashtable, hdlhashnode, const Handle );
typedef boolean (*langerrormessagecallback)(bigstring, ptrvoid);
@@ -615,9 +627,9 @@
typedef boolean (*langtablevisitcallback) (hdlhashnode, ptrvoid);
-typedef boolean (*langinversesearchcallback) (bigstring, hdlhashnode, tyvaluerecord, ptrvoid);
+typedef boolean ( *langinversesearchcallback ) ( Handle *, hdlhashnode, tyvaluerecord, ptrvoid );
-typedef boolean (*langsortedinversesearchcallback) (bigstring, hdlhashnode, tyvaluerecord, ptrvoid);
+typedef boolean ( *langsortedinversesearchcallback ) ( const Handle, hdlhashnode, tyvaluerecord, ptrvoid );
typedef struct tylangcallbacks {
@@ -760,7 +772,7 @@
extern boolean langdefaultpushtable (hdlhashtable *);
-extern boolean langdefaultpoptable (hdlhashtable);
+extern boolean langdefaultpoptable ( void );
extern boolean langnoop (void);
@@ -798,7 +810,7 @@
extern boolean langruncode (hdltreenode, hdlhashtable, tyvaluerecord *);
-extern boolean langaddkeyword (bigstring, short);
+extern boolean langaddkeyword ( const Handle, short );
extern boolean langaddkeywordlist (hdlhashtable, byte *[], short);
@@ -807,31 +819,35 @@
extern boolean initlang (void);
-extern boolean langcompilescript (hdlhashnode, hdltreenode *); /*langcallbacks.c*/
+#pragma mark === langcallbacks.c ===
+extern boolean langcompilescript (hdlhashnode, hdltreenode *);
+
extern boolean langerrorclear (void);
-extern void langsymbolchanged (hdlhashtable, const bigstring, hdlhashnode, boolean);
+extern void langsymbolchanged (hdlhashtable, const Handle, hdlhashnode, boolean);
-extern void langsymbolinserted (hdlhashtable, const bigstring, hdlhashnode);
+extern void langSymbolChangedBigstring ( hdlhashtable, const bigstring, hdlhashnode, boolean );
+extern void langsymbolinserted ( hdlhashtable, const Handle, hdlhashnode );
+
extern void langsymbolunlinking (hdlhashtable, hdlhashnode);
-extern void langsymboldeleted (hdlhashtable, const bigstring);
+extern void langsymboldeleted ( hdlhashtable, const Handle );
extern boolean langbackgroundtask (boolean);
#ifdef flnewfeatures
-extern boolean langpartialeventloop (short);
+ extern boolean langpartialeventloop (short);
#endif
#ifdef flcomponent
-extern callback langpresystemdialog (void);
+ extern callback langpresystemdialog (void);
-extern void langpostsystemdialog (void);
+ extern void langpostsystemdialog (void);
#endif
@@ -845,41 +861,53 @@
extern boolean dateversionlessthan (bigstring bsv1, bigstring bsv2, tyvaluerecord *v);
-extern void disablelangerror (void); /*langerror.c*/
+#pragma mark === langerror.c ===
+extern void disablelangerror (void);
+
extern void enablelangerror (void);
extern boolean langerrorenabled (void);
extern void langerror (short);
-extern void lang3paramerror (short, const bigstring, const bigstring, const bigstring);
+extern void lang3paramerror ( short, const Handle, const Handle, const Handle );
-extern void langparamerror (short, const bigstring);
+extern void lang3ParamErrBs ( short, const bigstring, const bigstring, const bigstring );
-extern void lang2paramerror (short, const bigstring, const bigstring);
+extern void langparamerror ( short, const Handle );
+extern void langParamErrBs ( short, const bigstring );
+
+extern void lang2paramerror ( short, const Handle, const Handle );
+
+extern void lang2ParamErrBs ( short, const bigstring, const bigstring );
+
extern void langlongparamerror (short, long);
extern void langostypeparamerror (short, OSType);
-extern boolean langerrordialog (bigstring, ptrvoid); /*langerrorwindow.c*/
+#pragma mark === langerrorwindow.c ===
+extern boolean langerrordialog (bigstring, ptrvoid);
+
extern boolean langerrorflush (void);
extern boolean clearlangerrordialog (void);
+#pragma mark === langhash.c ===
+
#ifdef fltracklocaladdresses
-extern void hashregisteraddressnode (hdlhashtable, hdlhashnode); /*langhash.c*/
+ extern void hashregisteraddressnode (hdlhashtable, hdlhashnode);
-extern void hashunregisteraddressnode (hdlhashnode);
-
+ extern void hashunregisteraddressnode (hdlhashnode);
+
#endif
-extern boolean newhashtable (hdlhashtable *); /*langhash.c*/
+extern boolean newhashtable (hdlhashtable *);
extern void dirtyhashtable (hdlhashtable);
@@ -909,45 +937,55 @@
extern boolean hashunlinknode (hdlhashtable, hdlhashnode);
-extern boolean hashsetnodekey (hdlhashtable, hdlhashnode, const bigstring);
+extern boolean hashsetnodekey ( hdlhashtable, hdlhashnode, const Handle );
-extern boolean hashinsert (const bigstring, tyvaluerecord);
+extern boolean hashinsert ( const Handle, tyvaluerecord );
//extern hashmerge (hdlhashtable, hdlhashtable);
-extern boolean hashlocate (const bigstring, hdlhashnode *, hdlhashnode *);
+extern boolean hashlocate ( const Handle, hdlhashnode *, hdlhashnode * );
-extern boolean hashunlink (const bigstring, hdlhashnode *);
+extern boolean hashunlink ( const Handle, hdlhashnode * );
-extern boolean hashdelete (const bigstring, boolean, boolean);
+extern boolean hashdelete ( const Handle, boolean, boolean);
-extern boolean hashtabledelete (hdlhashtable, bigstring);
+extern boolean hashtabledelete ( hdlhashtable, const Handle );
-extern boolean hashsymbolexists (const bigstring);
+extern boolean hashTableDeleteBigstring ( hdlhashtable, const bigstring );
-extern boolean hashtablesymbolexists (hdlhashtable, const bigstring);
+extern boolean hashsymbolexists ( Handle );
-extern void hashsetlocality (tyvaluerecord *, boolean); /*6.2b16 AR: needed to set locality in langaddlocals [langevaluate.c]*/
+extern boolean hashtablesymbolexists ( hdlhashtable, const Handle );
-extern boolean hashassign (const bigstring, tyvaluerecord);
+extern boolean hashTableSymbolExistsBigstring ( hdlhashtable, const bigstring );
-extern boolean hashtableassign (hdlhashtable, const bigstring, tyvaluerecord);
+extern void hashsetlocality (tyvaluerecord *, boolean); // 6.2b16 AR: needed to set locality in langaddlocals [langevaluate.c]
-extern boolean hashlookup (const bigstring, tyvaluerecord *, hdlhashnode *);
+extern boolean hashassign ( const Handle, tyvaluerecord );
-extern boolean hashtablelookup (hdlhashtable, const bigstring, tyvaluerecord *, hdlhashnode *);
+extern boolean hashtableassign ( hdlhashtable, const Handle, tyvaluerecord );
-extern boolean hashlookupnode (const bigstring, hdlhashnode *);
+extern boolean hashtableassignstring ( hdlhashtable, const bigstring, tyvaluerecord );
-extern boolean hashtablelookupnode (hdlhashtable, const bigstring, hdlhashnode *);
+extern boolean hashlookup ( const Handle, tyvaluerecord *, hdlhashnode * );
+extern boolean hashtablelookup ( hdlhashtable, const Handle, tyvaluerecord *, hdlhashnode * );
+
+extern boolean hashTableLookupBigstring ( hdlhashtable, const bigstring, tyvaluerecord *, hdlhashnode * );
+
+extern boolean hashlookupnode ( Handle, hdlhashnode * );
+
+extern boolean hashtablelookupnode (hdlhashtable, const Handle, hdlhashnode *);
+
+extern boolean hashTableLookupNodeBigstring ( hdlhashtable, const bigstring, hdlhashnode * );
+
extern boolean hashtablevisit (hdlhashtable, langtablevisitcallback, ptrvoid);
extern boolean hashresort (hdlhashtable, hdlhashnode);
-extern boolean hashinversesearch (hdlhashtable, langinversesearchcallback, ptrvoid, bigstring);
+extern boolean hashinversesearch ( hdlhashtable, langinversesearchcallback, ptrvoid, Handle * );
-extern boolean hashsortedinversesearch (hdlhashtable, langsortedinversesearchcallback, ptrvoid);
+extern boolean hashsortedinversesearch ( hdlhashtable, langsortedinversesearchcallback, ptrvoid );
extern boolean hashnodeintable (hdlhashnode, hdlhashtable);
@@ -963,7 +1001,7 @@
extern boolean hashgetsortedindex (hdlhashtable, hdlhashnode, long *);
-extern boolean hashgetiteminfo (hdlhashtable, long, bigstring, tyvaluerecord *);
+extern boolean hashgetiteminfo ( hdlhashtable, long, Handle *, tyvaluerecord * );
extern boolean hashgetvaluestring (tyvaluerecord, bigstring);
@@ -973,11 +1011,21 @@
extern boolean hashvaltostrings (tyvaluerecord, bigstring, bigstring, bigstring);
+extern boolean gethashkey ( hdlhashnode, Handle * );
-extern boolean langgettypestring (tyvaluetype, bigstring); /*langops.c*/
+extern void setHashKey ( const Handle, ptrbyte );
-extern tyvaluetype langgettype (tyvaluerecord val); /*6.2b5 AR*/
+extern short getHashKeyLength ( ptrbyte );
+
+#pragma mark === langops.c ===
+
+extern boolean langSetStringValueFromBigstring ( const Handle, const bigstring );
+
+extern boolean langgettypestring (tyvaluetype, bigstring);
+
+extern tyvaluetype langgettype (tyvaluerecord val); // 6.2b5 AR
+
extern boolean langscalartype (tyvaluetype);
extern OSType langgettypeid (tyvaluetype);
@@ -986,39 +1034,49 @@
extern boolean langgoodbinarytype (tyvaluetype);
-extern boolean langfindsymbol (const bigstring, hdlhashtable *, hdlhashnode *);
+extern boolean langfindsymbol ( const Handle, hdlhashtable *, hdlhashnode * );
-extern boolean langgetsymbolval (const bigstring, tyvaluerecord *, hdlhashnode *);
+extern boolean langgetsymbolval ( const Handle, tyvaluerecord *, hdlhashnode * );
-extern boolean langsetsymbolval (const bigstring, tyvaluerecord);
+extern boolean langsetsymbolval ( const Handle, tyvaluerecord );
-extern boolean langsetsymboltableval (hdlhashtable, const bigstring, tyvaluerecord);
+extern boolean langsetsymboltableval ( hdlhashtable, const Handle, tyvaluerecord );
-extern boolean langsetstringval (const bigstring, const bigstring);
+extern boolean langsetstringval ( const Handle, const Handle );
-extern boolean langsetbinaryval (hdlhashtable, const bigstring, Handle);
+extern boolean langsetbinaryval ( hdlhashtable, const Handle, Handle );
-extern boolean langassignstringvalue (hdlhashtable, const bigstring, const bigstring);
+extern boolean langassignstringvalue ( hdlhashtable, const Handle, const bigstring, const Handle, const bigstring );
+
+extern boolean langassignbooleanvalue (hdlhashtable, const Handle, boolean);
-extern boolean langassignbooleanvalue (hdlhashtable, const bigstring, boolean);
+extern boolean langAssignBooleanValueBigstring ( hdlhashtable, const bigstring, boolean );
extern boolean langassigncharvalue (hdlhashtable, const bigstring, unsigned char);
extern boolean langassignlongvalue (hdlhashtable, const bigstring, long);
-extern boolean langassignaddressvalue (hdlhashtable, const bigstring, const tyaddress *);
+extern boolean langassignaddressvalue ( hdlhashtable, const Handle, const tyaddress * );
-extern boolean langassignnewtablevalue (hdlhashtable, const bigstring, hdlhashtable *);
+extern boolean langAssignAddressValueBigstring ( hdlhashtable, const bigstring, const tyaddress * );
-extern boolean langsuretablevalue (hdlhashtable, const bigstring, hdlhashtable *);
+extern boolean langassignnewtablevalue ( hdlhashtable, const Handle, hdlhashtable * );
+extern boolean langAssignNewTableValueBigstring ( hdlhashtable, const bigstring, hdlhashtable * );
+
+extern boolean langsuretablevalue ( hdlhashtable, const Handle, hdlhashtable * );
+
+extern boolean langSureTableValueBigstring ( hdlhashtable, const bigstring, hdlhashtable * );
+
extern boolean langcheckstackspace (void);
extern boolean langbuildnamelist (hdltreenode htree, struct tylistrecord **hlist);
-extern boolean langpackvalue (tyvaluerecord, Handle *, hdlhashnode); /*langpack.c*/
+#pragma mark === langpack.c ===
+extern boolean langpackvalue (tyvaluerecord, Handle *, hdlhashnode);
+
extern boolean langpackverb (hdltreenode, tyvaluerecord *);
extern boolean langpackwindowverb (hdltreenode, tyvaluerecord *);
@@ -1032,13 +1090,17 @@
extern boolean langvaluetotextscrap (tyvaluerecord, Handle);
-extern boolean langcanusealiases (void); /*langsystem7.c*/
+#pragma mark === langsystem7.c ===
+extern boolean langcanusealiases (void);
+
extern boolean langcanuseappleevents (void);
-extern void cleartmpstack (void); /*langtmpstack.c*/
+#pragma mark === langtmpstack.c ===
+extern void cleartmpstack (void);
+
extern boolean pushtmpstackvalue (tyvaluerecord *);
extern boolean pushtmpstack (Handle);
@@ -1052,204 +1114,226 @@
extern boolean exemptfromtmpstack (tyvaluerecord *);
-extern boolean langdisposetree (hdltreenode); /*langtree.c*/
+#pragma mark === langtree.c ===
+extern boolean langdisposetree (hdltreenode);
-extern boolean langsymbolreference (hdlhashtable, bigstring, tyvaluerecord *, hdlhashnode *); /*langvalue.c*/
-extern void initvalue (tyvaluerecord *, tyvaluetype);
+#pragma mark === langvalue.c ===
-extern boolean setnilvalue (tyvaluerecord *);
+extern OSType getbinarytypeid (Handle);
-extern boolean setbooleanvalue (boolean, tyvaluerecord *);
+extern boolean coerceToTextHandle ( tyvaluerecord * );
-extern boolean setcharvalue (byte, tyvaluerecord *);
+extern boolean coercetoaddress (tyvaluerecord *);
-extern boolean setintvalue (short, tyvaluerecord *);
+extern boolean coercetobinary (tyvaluerecord *);
-extern boolean setlongvalue (long, tyvaluerecord *);
+extern boolean coercetoboolean (tyvaluerecord *);
-extern boolean setdatevalue (unsigned long, tyvaluerecord *);
+extern boolean coercetofilespec (tyvaluerecord *);
-extern boolean setdirectionvalue (tydirection, tyvaluerecord *);
+extern boolean coercetoint (tyvaluerecord *);
-extern boolean setostypevalue (OSType, tyvaluerecord *);
+extern boolean coercetolong (tyvaluerecord *);
-extern boolean setpointvalue (Point, tyvaluerecord *);
+extern boolean coercetoostype (tyvaluerecord *);
-extern boolean setfixedvalue (Fixed, tyvaluerecord *);
+extern boolean coercetorgb (tyvaluerecord *);
-extern boolean setsinglevalue (float, tyvaluerecord *);
+extern boolean coercetostring (tyvaluerecord *);
-extern boolean newheapvalue (ptrvoid, long, tyvaluetype, tyvaluerecord *);
+extern boolean coercetypes (tyvaluerecord *, tyvaluerecord *);
-extern boolean setstringvalue (bigstring, tyvaluerecord *);
+extern boolean coercevalue (tyvaluerecord *, tyvaluetype);
-extern boolean setaddressvalue (hdlhashtable, const bigstring, tyvaluerecord *);
+extern boolean copyvaluedata (tyvaluerecord *);
-extern boolean setexemptaddressvalue (hdlhashtable htable, const bigstring bs, tyvaluerecord *val);
+extern boolean copyvaluerecord (tyvaluerecord, tyvaluerecord *);
-extern boolean getaddressvalue (tyvaluerecord, hdlhashtable *, bigstring);
+extern boolean getaddressparam (hdltreenode, short, tyvaluerecord *);
-/*
-extern boolean setpasswordvalue (bigstring, tyvaluerecord *);
-*/
+extern boolean getaddresspath ( tyvaluerecord, Handle * );
-extern boolean setheapvalue (Handle, tyvaluetype, tyvaluerecord *);
+extern boolean getaddressvalue ( tyvaluerecord, hdlhashtable *, Handle * );
-extern boolean setbinaryvalue (Handle, OSType, tyvaluerecord *);
+extern boolean getaliasparam (hdltreenode, short, tyvaluerecord *);
-extern boolean setbinarytypeid (Handle, OSType);
+extern boolean getbinaryparam (hdltreenode, short, tyvaluerecord *);
-extern OSType getbinarytypeid (Handle);
+extern boolean getbooleanparam (hdltreenode, short, tyvaluerecord *);
-extern boolean stripbinarytypeid (Handle);
+extern boolean getcharparam (hdltreenode, short, tyvaluerecord *);
-extern boolean setdoublevalue (double, tyvaluerecord *);
+extern boolean getdateparam (hdltreenode, short, tyvaluerecord *);
-extern boolean setfilespecvalue (ptrfilespec, tyvaluerecord *);
+extern boolean getdirectionparam (hdltreenode, short, tyvaluerecord *);
-extern boolean setexternalvalue (Handle, tyvaluerecord *);
+extern boolean getdoubleparam (hdltreenode, short, tyvaluerecord *);
-extern boolean langhashtablelookup (hdlhashtable htable, const bigstring bs, tyvaluerecord *vreturned, hdlhashnode *); /*6.1d4 AR*/
+extern boolean getfilespecparam (hdltreenode, short, tyvaluerecord *);
-extern boolean langassigntextvalue (hdlhashtable ht, bigstring bs, Handle h); /*6.1d4 AR*/
+extern boolean getfixedparam (hdltreenode, short, tyvaluerecord *);
-extern boolean langlookupstringvalue (hdlhashtable ht, bigstring bs, bigstring bsval); /*6.1d3 AR*/
+extern boolean getintparam (hdltreenode, short, tyvaluerecord *);
-extern boolean langlookupaddressvalue (hdlhashtable ht, bigstring bs, tyaddress *addressval); /*6.1d3 AR*/
+extern boolean getlongparam (hdltreenode, short, tyvaluerecord *);
-extern boolean langlookuplongvalue (hdlhashtable ht, bigstring bs, long *x); /*6.1d4 AR*/
+extern boolean getobjspecparam (hdltreenode, short, tyvaluerecord *);
-extern boolean langlookupbooleanvalue (hdlhashtable ht, bigstring bs, boolean *fl); /*6.1d3 AR*/
+extern boolean getoptionaladdressparam ( hdltreenode , short *, short *, bigstring , hdlhashtable *, Handle * ); // 2006-03-10 aradke
-extern boolean langtablecopyvalue (hdlhashtable hsource, hdlhashtable hdest, bigstring bs); /*6.1d4 AR*/
+extern boolean getoptionalparam (hdltreenode, short *, short *, bigstring, hdltreenode *);
+extern boolean getoptionalparamvalue (hdltreenode, short *, short *, bigstring, tyvaluerecord *);
-extern boolean setwinvalue (WindowPtr pwindow, tyvaluerecord *val); /*shellwindowverbs.c*/
+extern boolean getoptionaltableparam (hdltreenode , short *, short *, bigstring, hdlhashtable *); /*2006-03-10 aradke*/
-extern boolean copyvaluedata (tyvaluerecord *);
+extern boolean getostypeparam (hdltreenode, short, tyvaluerecord *);
-extern boolean copyvaluerecord (tyvaluerecord, tyvaluerecord *);
+extern boolean getparamvalue (hdltreenode, short, tyvaluerecord *);
-#ifdef DATABASE_DEBUG
- extern void debug_disposevaluerecord (tyvaluerecord, boolean, long, char*);
- #define disposevaluerecord(val, fldisk) \
- debug_disposevaluerecord (val, fldisk, __LINE__, __FILE__)
-#else
- extern void disposevaluerecord (tyvaluerecord, boolean);
-#endif
+extern boolean getpatternparam (hdltreenode, short, tyvaluerecord *);
-extern boolean langgetspecialtable (bigstring, hdlhashtable *);
+extern boolean getpointparam (hdltreenode, short, tyvaluerecord *);
-extern boolean getaddresspath (tyvaluerecord, bigstring);
+extern boolean getreadonlyparamvalue (hdltreenode, short, tyvaluerecord *); /* 2003-04-28 AR: needed in langregexp.c */
-//extern boolean truevalue (tyvaluerecord); //6.2b15 AR: removed
+extern boolean getrectparam (hdltreenode, short, tyvaluerecord *);
-extern boolean coercetolong (tyvaluerecord *);
+extern boolean getrgbparam (hdltreenode, short, tyvaluerecord *);
-extern boolean coercetoint (tyvaluerecord *);
+extern boolean getsingleparam (hdltreenode, short, tyvaluerecord *);
-extern boolean coercetorgb (tyvaluerecord *);
+extern boolean getstringparam (hdltreenode, short, tyvaluerecord *);
-extern boolean coercetoostype (tyvaluerecord *);
+extern boolean getstringvalue (hdltreenode, short, bigstring);
-extern boolean coercetostring (tyvaluerecord *);
+extern boolean gettextvalue (hdltreenode, short, Handle *);
-extern boolean coercetoaddress (tyvaluerecord *);
+extern boolean getvarparam ( hdltreenode, short, hdlhashtable *, Handle * );
-extern boolean coercetoboolean (tyvaluerecord *);
+extern boolean getvarvalue ( hdltreenode, short, hdlhashtable *, Handle *, tyvaluerecord *, hdlhashnode * );
-extern boolean coercetofilespec (tyvaluerecord *);
+extern boolean idstringvalue ( hdlhashtable, const Handle, bigstring );
-extern boolean coercetobinary (tyvaluerecord *);
+extern boolean langassigntextvalue (hdlhashtable ht, bigstring bs, Handle h); /*6.1d4 AR*/
-extern boolean coercevalue (tyvaluerecord *, tyvaluetype);
+extern boolean langcheckparamcount (hdltreenode, short);
-extern boolean coercetypes (tyvaluerecord *, tyvaluerecord *);
+extern boolean langexpandtodotparams ( const Handle, hdlhashtable *, Handle * );
-extern void disposevalues (tyvaluerecord *, tyvaluerecord *);
+extern boolean langgetdotparams ( hdltreenode, hdlhashtable *, Handle * );
-extern boolean langgetidentifier (hdltreenode, bigstring);
+extern boolean langgetidentifier ( hdltreenode, Handle * );
-extern boolean langtablelookup (hdlhashtable, bigstring, hdlhashtable *);
+extern boolean langgetspecialtable ( const Handle, hdlhashtable * );
-extern boolean langsearchpathlookup (bigstring, hdlhashtable *);
+extern boolean langhashtablelookup ( hdlhashtable, const Handle, tyvaluerecord *, hdlhashnode * ); // 6.1d4 AR
-extern boolean langexpandtodotparams (bigstring, hdlhashtable *, bigstring);
+extern boolean langHashTableLookupBigstring ( hdlhashtable, const bigstring, tyvaluerecord *, hdlhashnode * );
-extern boolean langgetdotparams (hdltreenode, hdlhashtable *, bigstring);
+extern boolean langlookupaddressvalue ( hdlhashtable, const Handle, tyaddress * ); // 6.1d3 AR
-extern boolean idstringvalue (hdlhashtable, bigstring, bigstring);
+extern boolean langLookupAddressValueBigstring ( hdlhashtable, const bigstring, tyaddress * );
-extern boolean langcheckparamcount (hdltreenode, short);
+extern boolean langlookupbooleanvalue ( hdlhashtable, const Handle, boolean * ); // 6.1d3 AR
-extern short langgetparamcount (hdltreenode);
+extern boolean langLookupBooleanValueBigstring ( hdlhashtable, const bigstring, boolean * );
-extern boolean getparamvalue (hdltreenode, short, tyvaluerecord *);
+extern boolean langlookuplongvalue ( hdlhashtable, const Handle, long * ); // 6.1d4 AR
-extern boolean getreadonlyparamvalue (hdltreenode, short, tyvaluerecord *); /* 2003-04-28 AR: needed in langregexp.c */
+extern boolean langLookupLongValueBigstring ( hdlhashtable, const bigstring, long * );
-extern boolean getoptionalparam (hdltreenode, short *, short *, bigstring, hdltreenode *);
+extern boolean langlookupstringvalue ( hdlhashtable, const Handle, bigstring ); // 6.1d3 AR
-extern boolean getoptionalparamvalue (hdltreenode, short *, short *, bigstring, tyvaluerecord *);
+extern boolean langLookupStringValueBigstring ( hdlhashtable, const bigstring, bigstring );
-extern boolean getoptionaladdressparam (hdltreenode , short *, short *, bigstring , hdlhashtable *, bigstring); /*2006-03-10 aradke*/
+extern boolean langsearchpathlookup ( const Handle, hdlhashtable * );
-extern boolean getoptionaltableparam (hdltreenode , short *, short *, bigstring, hdlhashtable *); /*2006-03-10 aradke*/
+extern boolean langsymbolreference ( hdlhashtable, const Handle, tyvaluerecord *, hdlhashnode * );
-extern boolean getaddressparam (hdltreenode, short, tyvaluerecord *);
+extern boolean langtablecopyvalue ( hdlhashtable, hdlhashtable, const bigstring ); // 6.1d4 AR
-extern boolean getvarparam (hdltreenode, short, hdlhashtable *, bigstring);
+extern boolean langtablelookup ( hdlhashtable, const Handle, hdlhashtable * );
-extern boolean getcharparam (hdltreenode, short, tyvaluerecord *);
+extern boolean newheapvalue (ptrvoid, long, tyvaluetype, tyvaluerecord *);
-extern boolean getlongparam (hdltreenode, short, tyvaluerecord *);
+extern boolean setStringValueFromHandle ( const Handle, tyvaluerecord * );
-extern boolean getdateparam (hdltreenode, short, tyvaluerecord *);
+extern boolean setaddressvalue ( hdlhashtable, const Handle, tyvaluerecord * );
-extern boolean getintparam (hdltreenode, short, tyvaluerecord *);
+extern boolean setbinarytypeid (Handle, OSType);
-extern boolean getbooleanparam (hdltreenode, short, tyvaluerecord *);
+extern boolean setbinaryvalue (Handle, OSType, tyvaluerecord *);
-extern boolean getstringparam (hdltreenode, short, tyvaluerecord *);
+extern boolean setbooleanvalue (boolean, tyvaluerecord *);
-extern boolean getdirectionparam (hdltreenode, short, tyvaluerecord *);
+extern boolean setcharvalue (byte, tyvaluerecord *);
-extern boolean getostypeparam (hdltreenode, short, tyvaluerecord *);
+extern boolean setdatevalue (unsigned long, tyvaluerecord *);
-extern boolean getpointparam (hdltreenode, short, tyvaluerecord *);
+extern boolean setdirectionvalue (tydirection, tyvaluerecord *);
-extern boolean getrectparam (hdltreenode, short, tyvaluerecord *);
+extern boolean setdoublevalue (double, tyvaluerecord *);
-extern boolean getrgbparam (hdltreenode, short, tyvaluerecord *);
-
-extern boolean getpatternparam (hdltreenode, short, tyvaluerecord *);
+extern boolean setexemptaddressvalue ( hdlhashtable, const Handle, tyvaluerecord * );
-extern boolean getfixedparam (hdltreenode, short, tyvaluerecord *);
+extern boolean setexternalvalue (Handle, tyvaluerecord *);
-extern boolean getsingleparam (hdltreenode, short, tyvaluerecord *);
+extern boolean setfilespecvalue (ptrfilespec, tyvaluerecord *);
-extern boolean getdoubleparam (hdltreenode, short, tyvaluerecord *);
+extern boolean setfixedvalue (Fixed, tyvaluerecord *);
-extern boolean getfilespecparam (hdltreenode, short, tyvaluerecord *);
+extern boolean setheapvalue (Handle, tyvaluetype, tyvaluerecord *);
-extern boolean getaliasparam (hdltreenode, short, tyvaluerecord *);
+extern boolean setintvalue (short, tyvaluerecord *);
-extern boolean getobjspecparam (hdltreenode, short, tyvaluerecord *);
+extern boolean setlongvalue (long, tyvaluerecord *);
-extern boolean getbinaryparam (hdltreenode, short, tyvaluerecord *);
+extern boolean setnilvalue (tyvaluerecord *);
-#ifdef shellinclude
-extern boolean getwinparam (hdltreenode, short, hdlwindowinfo *); // shellwindowverbs.c
+extern boolean setostypevalue (OSType, tyvaluerecord *);
+
+extern boolean setpointvalue (Point, tyvaluerecord *);
+
+extern boolean setsinglevalue (float, tyvaluerecord *);
+
+extern boolean setstringvalue ( bigstring, tyvaluerecord * );
+
+extern boolean stripbinarytypeid (Handle);
+
+extern short langgetparamcount (hdltreenode);
+
+extern void disposevalues (tyvaluerecord *, tyvaluerecord *);
+
+extern void initvalue (tyvaluerecord *, tyvaluetype);
+
+#ifdef DATABASE_DEBUG
+
+ extern void debug_disposevaluerecord (tyvaluerecord, boolean, long, char*);
+
+ #define disposevaluerecord(val, fldisk) \
+ debug_disposevaluerecord (val, fldisk, __LINE__, __FILE__)
+#else
+ extern void disposevaluerecord (tyvaluerecord, boolean);
#endif
-extern boolean getvarvalue (hdltreenode, short, hdlhashtable *, bigstring, tyvaluerecord *, hdlhashnode *);
+// extern boolean setpasswordvalue (bigstring, tyvaluerecord *);
-extern boolean getstringvalue (hdltreenode, short, bigstring);
+// extern boolean truevalue (tyvaluerecord); //6.2b15 AR: removed
-extern boolean gettextvalue (hdltreenode, short, Handle *);
+#pragma mark === shellwindowverbs.c ===
+
+extern boolean setwinvalue (WindowPtr pwindow, tyvaluerecord *val);
+
+#ifdef shellinclude
+
+ extern boolean getwinparam (hdltreenode, short, hdlwindowinfo *);
+
+#endif
+
extern boolean getexempttextvalue (hdltreenode, short, Handle *);
extern boolean getreadonlytextvalue (hdltreenode, short, Handle *);
@@ -1322,20 +1406,22 @@
extern boolean notvalue (tyvaluerecord, tyvaluerecord *);
-extern boolean kernelfunctionvalue (hdlhashtable, bigstring, hdltreenode, tyvaluerecord *);
+extern boolean kernelfunctionvalue ( hdlhashtable, const Handle, hdltreenode, tyvaluerecord * );
extern boolean langhandlercall (hdltreenode, hdltreenode, tyvaluerecord *);
-extern boolean langfunctioncall (hdltreenode, hdlhashtable, hdlhashnode, bigstring, hdltreenode, hdltreenode, tyvaluerecord *);
+extern boolean langfunctioncall ( hdltreenode, hdlhashtable, hdlhashnode, const Handle, hdltreenode, hdltreenode, tyvaluerecord * );
extern boolean functionvalue (hdltreenode, hdltreenode, tyvaluerecord *);
-extern boolean langzoomvalwindow (hdlhashtable, bigstring, tyvaluerecord, boolean); /*langverbs.c*/
+#pragma mark === langverbs.c ===
+extern boolean langzoomvalwindow ( hdlhashtable, Handle *, tyvaluerecord, boolean );
+
extern boolean langfindtargetwindow (short, WindowPtr *);
-extern boolean setstatusbarstring (bigstring bs, long partNumber); /*7.0b20 PBS: new statusbar verbs from Bob*/
+extern boolean setstatusbarstring (bigstring bs, long partNumber); // 7.0b20 PBS: new statusbar verbs from Bob
extern boolean getstatusbarstring (bigstring bs, long partNumber);
@@ -1345,9 +1431,7 @@
extern boolean langcleartarget (tyvaluerecord *prevtarget);
-extern boolean langsettarget (hdlhashtable htable, bigstring bsname, tyvaluerecord *prevtarget);
+extern boolean langsettarget ( hdlhashtable, const Handle, tyvaluerecord * );
#endif
-
-
Modified: Frontier/branches/Frontier_Long_File_Paths/Common/source/lang.c
===================================================================
--- Frontier/branches/Frontier_Long_File_Paths/Common/source/lang.c 2007-02-23 20:59:35 UTC (rev 1623)
+++ Frontier/branches/Frontier_Long_File_Paths/Common/source/lang.c 2007-02-23 21:45:04 UTC (rev 1624)
@@ -92,14 +92,18 @@
static boolean langtracktimeslice (tyerrorrecord *slice) {
+
+ //
+ // 2007-02-23 creedon: support for long odb item names and file paths
+ //
+ Handle handleName, handlePath;
+ bigstring bspath;
hdlerrorstack hs = langcallbacks.scripterrorstack;
+ hdlhashnode hnode;
+ hdlhashtable hprofiledata, htable;
hdlprocessrecord hp = currentprocess;
- hdlhashtable hprofiledata;
tyerrorrecord *pe = slice;
- hdlhashtable htable;
- bigstring bsname, bspath;
- hdlhashnode hnode;
tyvaluerecord val;
if (hp == nil)
@@ -113,30 +117,41 @@
if (hprofiledata == nil)
return (false);
- if ((*pe).errorcallback == nil
- || !(*(*pe).errorcallback) ((*pe).errorrefcon, 0, 0, &htable, bsname)) {
+ if ( ( *pe ).errorcallback == nil || ! ( *( *pe ).errorcallback ) ( ( *pe ).errorrefcon, 0, 0, &htable, &handleName ) ) {
- langgetstringlist (anomynousthreadstring, bspath);
- }
+ langgetstringlist ( anomynousthreadstring, bspath );
+
+ if ( ! newtexthandle ( bspath, &handlePath ) ) {
+
+ disposehandle ( handleName );
+
+ return ( false );
+
+ } // if
+
+ } // if
else {
if (htable == nil)
- copystring (bsname, bspath);
+ copyhandle( handleName, &handlePath );
else
- langexternalgetfullpath (htable, bsname, bspath, nil);
+ langexternalgetfullpath (htable, handleName, &handlePath, nil);
}
- if (hashtablelookupnode (hprofiledata, bspath, &hnode)) {
-
+ if ( hashtablelookupnode ( hprofiledata, handlePath, &hnode ) )
(**hnode).val.data.longvalue += (*pe).profiletotal;
- }
else {
setlongvalue ((*pe).profiletotal, &val);
- hashtableassign (hprofiledata, bspath, val);
+ hashtableassign (hprofiledata, handlePath, val);
+
}
- return (true);
- } /*langtracktimeslice*/
+ disposehandle ( handleName );
+ disposehandle ( handlePath );
+
+ return ( true );
+
+ } // langtracktimeslice
boolean langstartprofiling (void) {
@@ -215,10 +230,11 @@
} /*langstopprofiling*/
-boolean langpusherrorcallback (langerrorcallback errorroutine, long errorrefcon) {
+boolean langpusherrorcallback ( langerrorcallback errorroutine, long errorrefcon ) {
register hdlerrorstack hs = langcallbacks.scripterrorstack;
register hdlprocessrecord hp = currentprocess;
+
tyerrorrecord *pe;
tyerrorrecord item;
@@ -252,6 +268,7 @@
pe = &(**hs).stack [(**hs).toperror - 1];
(*pe).profiletotal += item.profilebase - (*pe).profilebase;
+
}
}
@@ -260,6 +277,7 @@
(**hs).stack [(**hs).toperror++] = item;
return (true);
+
} /*langpusherrorcallback*/
@@ -442,9 +460,11 @@
cnumerror = ctscanchars;
refconerror = refcon;
+
}
return (true);
+
} /*langcompileerror*/
@@ -501,6 +521,7 @@
langdisposetree (h); /*dispose whatever was built...*/
langdisposetree (yylval); /*...including this piece*/
+
}
if (!isemptystring (bsparsererror)) {
@@ -510,9 +531,11 @@
ctscanchars = cnumerror;
(*savecallback) (bsparsererror, refconerror);
+
}
return (false);
+
}
if (h == nil) /*syntax error, or system error*/
@@ -521,6 +544,7 @@
*hcode = h;
return (true);
+
} /*langcompiletext*/
@@ -533,6 +557,7 @@
langprescript (); /*initialize lang globals, about to compile a script*/
return (langcompiletext (htext, fllinebased, hcode)); /*disposes htext*/
+
} /*langbuildtree*/
@@ -550,11 +575,11 @@
chainhashtable (ht); /*link it into the runtime stack*/
return (true);
+
} /*langdefaultpushtable*/
-boolean langdefaultpoptable (hdlhashtable htable) {
-#pragma unused (htable)
+boolean langdefaultpoptable ( void ) {
register hdlhashtable ht = currenthashtable;
@@ -563,6 +588,7 @@
disposehashtable (ht, false);
return (true);
+
} /*langdefaultpoptable*/
@@ -571,6 +597,7 @@
langerrormessage (bs);
return (false); /*consume the error*/
+
} /*langerrorhook*/
@@ -581,12 +608,14 @@
*/
shellpusherrorhook (&langerrorhook);
+
} /*langhookerrors*/
void langunhookerrors (void) {
shellpoperrorhook ();
+
} /*langunhookerrors*/
@@ -600,6 +629,7 @@
copystring (bsmsg, perrorstring);
return (true);
+
} /*langtraperrormessage*/
@@ -618,6 +648,7 @@
langcallbacks.errormessagerefcon = bserror;
langcallbacks.errormessagecallback = (langerrormessagecallback) &langtraperrormessage;
+
} /*langtraperrors*/
@@ -764,19 +795,18 @@
a parameter everywhere. Running card scripts needs it.
*/
- register boolean fl;
- hdltreenode hcode;
- /*tylangcallbacks savecallbacks;*/
+ register boolean fl, flscriptalreadyrunning = flscriptrunning, fltablealreadypushed = false;
+
boolean fltmpval;
- register boolean flscriptalreadyrunning = flscriptrunning;
- register boolean fltablealreadypushed = false;
- unsigned short savelines = ctscanlines;
- unsigned short savechars = ctscanchars;
+ hdltreenode hcode;
+ unsigned short savechars = ctscanchars, savelines = ctscanlines;
-#ifdef WIN95VERSION
-checkthreadglobals ();
-#endif
-
+ #ifdef WIN95VERSION
+
+ checkthreadglobals ();
+
+ #endif
+
setbooleanvalue (false, val);
flscriptrunning = true;
@@ -800,8 +830,8 @@
ctscanchars = savechars;
langvisitcodetree (hcode, &renumberlinesvisit, nil);
+
}
-
else {
fltablealreadypushed = currenthashtable != nil;
@@ -813,6 +843,7 @@
langerrorclear ();
langhookerrors ();
+
}
fl = evaluatelist ((**hcode).param1, val);
@@ -838,14 +869,15 @@
exit:
- /*
- if (flscriptalreadyrunning)
- */
- langpoperrorcallback ();
-
- flscriptrunning = flscriptalreadyrunning;
-
- return (fl);
+ /*
+ if (flscriptalreadyrunning)
+ */
+ langpoperrorcallback ();
+
+ flscriptrunning = flscriptalreadyrunning;
+
+ return (fl);
+
} /*langrun*/
@@ -885,6 +917,7 @@
pushhashtable (roottable); /*need temp stack services*/
pushvalueontmpstack (&val);
+
}
if (coercetostring (&val)) {
@@ -892,6 +925,7 @@
texthandletostring (val.data.stringvalue, bsresult);
fl = true; /*it worked, we'll return true*/
+
}
cleartmpstack ();
@@ -900,6 +934,7 @@
pophashtable ();
return (fl);
+
} /*langrunhandle*/
@@ -916,6 +951,7 @@
copystring (bsmsg, perrorstring);
return (true);
+
} /*langtraperror*/
@@ -1044,29 +1080,30 @@
// 3/5/97 dmb: disablelangerror ();
- saveerrormessage = langcallbacks.errormessagecallback;
-
- saveerrorclear = langcallbacks.clearerrorcallback;
-
- langcallbacks.errormessagecallback = (langerrormessagecallback) &truenoop;
-
- langcallbacks.clearerrorcallback = &truenoop;
-
- ++fldisableyield;
-
+ saveerrormessage = langcallbacks.errormessagecallback;
+
+ saveerrorclear = langcallbacks.clearerrorcallback;
+
+ langcallbacks.errormessagecallback = (langerrormessagecallback) &truenoop;
+
+ langcallbacks.clearerrorcallback = &truenoop;
+
+ ++fldisableyield;
+
fl = langrunstring (bsprogram, bsresult);
// 3/5/97 dmb: enablelangerror ();
- --fldisableyield;
-
- langcallbacks.errormessagecallback = saveerrormessage;
-
- langcallbacks.clearerrorcallback = saveerrorclear;
-
- fllangerror = false;
+ --fldisableyield;
+ langcallbacks.errormessagecallback = saveerrormessage;
+
+ langcallbacks.clearerrorcallback = saveerrorclear;
+
+ fllangerror = false;
+
return (fl);
+
} /*langrunstringnoerror*/
@@ -1126,10 +1163,8 @@
overriding its current chain. (our own scope chain becomes superflous.)
*/
- register boolean flscriptwasrunning = flscriptrunning;
+ register boolean boolean fl, flchained = false, flscriptwasrunning = flscriptrunning;
register hdlhashtable ht = hcontext;
- register boolean fl;
- register boolean flchained = false;
if (htree == nil) /*defensive driving*/
return (false);
@@ -1173,6 +1208,7 @@
langpostscript ();
return (fl);
+
} /*langruncode*/
@@ -1394,14 +1430,19 @@
} /*langbuildparamlist*/
-boolean langrunscriptcode (hdlhashtable htable, bigstring bsverb, hdltreenode hcode, tyvaluerecord *vparams, hdlhashtable hcontext, tyvaluerecord *vreturned) {
-
- /*
- 02/04/02 dmb: the guts of langrunscript
+boolean langrunscriptcode ( hdlhashtable htable, const Handle handleVerb,
+ hdltreenode hcode, tyvaluerecord *vparams, hdlhashtable hcontext,
+ tyvaluerecord *vreturned ) {
- 2004-11-03 aradke: Accept nil for vparams, meaning the function
- doesn't take any parameters, so we simply bypass langbuildparamlist.
- */
+ //
+ // 2007-02-23 creedon: support for long odb item names and file paths
+ //
+ // 2004-11-03 aradke: Accept nil for vparams, meaning the function doesn't
+ // take any parameters, so we simply bypass
+ // langbuildparamlist.
+ //
+ // 1902-02-04 dmb: the guts of langrunscript
+ //
boolean fl = false;
boolean flchained;
@@ -1410,15 +1451,12 @@
hdltreenode hparamlist = nil;
boolean fltmpval;
- if (!setaddressvalue (htable, bsverb, &val))
+ if (!setaddressvalue (htable, handleVerb, &val))
goto exit;
if (!pushfunctionreference (val, &hfunctioncall))
goto exit;
-/* if (hcontext != nil)
- pushhashtable (hcontext);
-*/
flchained = (hcontext != nil) && (**hcontext).flchained;
if (vparams != nil) {
@@ -1446,6 +1484,7 @@
langdisposetree (hfunctioncall);
goto exit;
+
}
}
@@ -1480,154 +1519,112 @@
exit:
return (fl);
+
} /*langrunscriptcode*/
-boolean langrunscript (bigstring bsscriptname, tyvaluerecord *vparams, hdlhashtable hcontext, tyvaluerecord *vreturned) {
-
- /*
- 5.0.2b6 rab/dmb: new verb
-
- 5.0.2b7 dmb: preserve errormessagecallback through the call
-
- 6.0a9 dmb: was langipcrunscript, moved here and don't create new process
+boolean langrunscript ( const Handle handleScriptName, tyvaluerecord *vparams, hdlhashtable hcontext, tyvaluerecord *vreturned ) {
- 6.0a14 dmb: fixed potential memory leak in error case.
-
- 7.0b41 pbs: if passed a record instead of a list, call the script with named parameters.
-
- 8.0.4 dmb: handle running code values
- */
+ //
+ // 2007-02-23 creedon: support for long odb item names and file paths
+ //
+ // 8.0.4 dmb: handle running code values
+ //
+ // 7.0b41 pbs: if passed a record instead of a list, call the script with
+ // named parameters.
+ //
+ // 6.0a14 dmb: fixed potential memory leak in error case.
+ //
+ // 6.0a9 dmb: was langipcrunscript, moved here and don't create new process
+ //
+ // 5.0.2b7 dmb: preserve errormessagecallback through the call
+ //
+ // 5.0.2b6 rab/dmb: new verb
+ //
- bigstring bsverb;
- boolean fl = false;
- hdltreenode hcode;
+ Handle handleVerb = NULL;
+ boolean fl = false, flReturn = false;
+ hdlhashnode handlernode;
hdlhashtable htable;
+ hdltreenode hcode;
tyvaluerecord vhandler;
- hdlhashnode handlernode;
pushhashtable (roottable);
- fl = langexpandtodotparams (bsscriptname, &htable, bsverb);
+ fl = langexpandtodotparams ( handleScriptName, &htable, &handleVerb );
- if (fl) {
-
+ if (fl)
if (htable == nil)
- langsearchpathlookup (bsverb, &htable);
- }
-
+ langsearchpathlookup (handleVerb, &htable);
+
pophashtable();
if (!fl)
return (false);
+
+ if (!hashtablelookupnode (htable, handleVerb, &handlernode)) {
- if (!hashtablelookupnode (htable, bsverb, &handlernode)) {
+ langparamerror ( unknownfunctionerror, handleVerb );
- langparamerror (unknownfunctionerror, bsverb);
+ goto exit;
- return (false);
}
-
+
vhandler = (**handlernode).val;
/*build a code tree and call the handler, with our error hook in place*/
hcode = nil;
- if (vhandler.valuetype == codevaluetype) {
-
+ if (vhandler.valuetype == codevaluetype)
+
hcode = vhandler.data.codevalue;
- }
+
else if ((**htable).valueroutine == nil) { /*not a kernel table*/
if (!langexternalvaltocode (vhandler, &hcode)) {
- langparamerror (notfunctionerror, bsverb);
+ langparamerror ( notfunctionerror, handleVerb );
- return (false);
+ goto exit;
+
}
-
- if (hcode == nil) { /*needs compilation*/
+ if (hcode == nil) // needs compilation
+
if (!langcompilescript (handlernode, &hcode))
- return (false);
- }
+
+ goto exit;
}
-
- return (langrunscriptcode (htable, bsverb, hcode, vparams, hcontext, vreturned));
- } /*langrunscript*/
-
-/*
- boolean flchained;
- tyvaluerecord val;
- hdltreenode hfunctioncall;
- hdltreenode hparamlist;
- boolean fltmpval;
-
- if (!setaddressvalue (htable, bsverb, &val))
- goto exit;
-
- if (!pushfunctionreference (val, &hfunctioncall))
- goto exit;
-
- if (hcontext != nil) {
- flchained = (**hcontext).flchained;
-
- if (flchained)
- pushhashtable (hcontext);
- else
- chainhashtable (hcontext); //establishes outer local context
- }
+ flReturn = langrunscriptcode ( htable, handleVerb, hcode, vparams, hcontext, vreturned );
- fl = langbuildparamlist (vparams, &hparamlist);
+ exit:
- if (hcontext != nil) {
+ disposehandle ( handleVerb );
- if (flchained)
- pophashtable ();
- else
- unchainhashtable ();
- }
-
- if (!fl) {
+ return ( flReturn );
- langdisposetree (hfunctioncall);
-
- goto exit;
- }
-
- if (!pushfunctioncall (hfunctioncall, hparamlist, &hcode)) //consumes input parameters
- goto exit;
-
- if (hcontext != nil) {
+ } /*langrunscript*/
- if (flchained)
- pushhashtable (hcontext);
- else
- chainhashtable (hcontext); //establishes outer local context
- }
+
+boolean langRunScriptBigstring ( const bigstring scriptName, tyvaluerecord *vparams, hdlhashtable hcontext, tyvaluerecord *vreturned ) {
+
+ //
+ // 2007-02-07 creedon: created
+ //
- fl = evaluatelist (hcode, vreturned);
+ Handle handleScriptName;
+ boolean fl;
- fltmpval = exemptfromtmpstack (vreturned); //must survive disposing of local scope chain
+ if ( ! newtexthandle ( scriptName, &handleScriptName ) )
+ return ( false );
+
+ fl = langrunscript ( handleScriptName, vparams, hcontext, vreturned );
- if (hcontext != nil) {
-
- if (flchained)
- pophashtable ();
- else
- unchainhashtable ();
- }
+ disposehandle ( handleScriptName );
- if (fltmpval) //insert into the next-most-global tmpstack, if one exists
- pushvalueontmpstack (vreturned);
-
- langdisposetree (hcode);
-
- exit:
+ return ( fl );
- return (fl);
- } /%langrunscript%/
-*/
+ } // langRunScriptBigstring
Modified: Frontier/branches/Frontier_Long_File_Paths/Common/source/langcallbacks.c
===================================================================
--- Frontier/branches/Frontier_Long_File_Paths/Common/source/langcallbacks.c 2007-02-23 20:59:35 UTC (rev 1623)
+++ Frontier/branches/Frontier_Long_File_Paths/Common/source/langcallbacks.c 2007-02-23 21:45:04 UTC (rev 1624)
@@ -63,9 +63,11 @@
disposehashtable (hmagictable, false);
hmagictable = nil;
+
}
return (fl);
+
} /*langpushlocalchain*/
@@ -81,6 +83,7 @@
/*stacktracer (hashgetstackdepth ());*/ /*debugging code*/
return (fl);
+
} /*langpoplocalchain*/
@@ -161,6 +164,7 @@
assert (flcontinue == flsavedcontinue); /****should be able to nuke this stuff*/
return (fl);
+
} /*langdebuggercall*/
@@ -176,10 +180,15 @@
} /*langrestoreglobals*/
-boolean langpushsourcecode (hdlhashtable htable, hdlhashnode hnode, bigstring bs) {
+boolean langpushsourcecode ( hdlhashtable htable, hdlhashnode hnode, const Handle h ) {
- return ((*langcallbacks.pushsourcecodecallback) (htable, hnode, bs));
- } /*langpushsourcecode*/
+ //
+ // 2007-02-23 creedon: support for long odb item names and file paths
+ //
+
+ return ( ( *langcallbacks.pushsourcecodecallback ) ( htable, hnode, h ) );
+
+ } // langpushsourcecode
boolean langpopsourcecode (void) {
@@ -230,6 +239,7 @@
return (false);
return ((*langcallbacks.errormessagecallback) (bs, langcallbacks.errormessagerefcon));
+
} /*langerrormessage*/
@@ -238,6 +248,7 @@
fllangerror = false;
return ((*langcallbacks.clearerrorcallback) ());
+
} /*langerrorclear*/
@@ -247,52 +258,68 @@
} /*langcompilescript*/
-void langsymbolchanged (hdlhashtable htable, const bigstring bs, hdlhashnode hnode, boolean flvalue) {
+void langsymbolchanged (hdlhashtable htable, const Handle handleName, hdlhashnode hnode, boolean flvalue) {
+
+ //
+ // 2007-02-23 creedon: support for long odb item names and file paths
+ //
+ // 5.1.5b15 dmb: call callback first, so it can tell if table was already dirty
+ //
- /*
- 5.1.5b15 dmb: call callback first, so it can tell if table was already dirty
- */
-
-#ifdef fltracklocaladdresses
-
- if (flvalue) {
-
- hdlhashnode hn = hnode;
+ #ifdef fltracklocaladdresses
+
+ if (flvalue) {
- if ((hn != nil && hn != HNoNode) || hashtablelookupnode (htable, bs, &hn)) {
-
- hashunregisteraddressnode (hn);
-
- hashregisteraddressnode (htable, hn);
+ hdlhashnode hn = hnode;
+
+ if ((hn != nil && hn != HNoNode) || hashtablelookupnode (htable, handleName, &hn)) {
+
+ hashunregisteraddressnode (hn);
+
+ hashregisteraddressnode (htable, hn);
+
+ }
}
- }
-
-#endif
-
- (*langcallbacks.symbolchangedcallback) (htable, bs, hnode, flvalue);
+ #endif
+ (*langcallbacks.symbolchangedcallback) (htable, handleName, hnode, flvalue);
+
dirtyhashtable (htable);
- } /*langsymbolchanged*/
+
+ } // langsymbolchanged
-/*
-void langsymbolprechange (hdlhashtable htable, const bigstring bs, hdlhashnode hnode, boolean flvalue) {
+
+void langSymbolChangedBigstring ( hdlhashtable htable, const bigstring bsName, hdlhashnode hnode, boolean flvalue ) {
+
+ //
+ // 2007-02-23 creedon: created
+ //
- (*langcallbacks.symbolprechangecallback) (htable, bs, hnode, flvalue);
+ Handle h;
+
+ if ( ! newtexthandle ( bsName, &h ) )
+ ;
+
+ langsymbolchanged ( htable, h, hnode, flvalue );
+
+ disposehandle ( h );
+
+ } // langSymbolChangedBigstring
- }*/ /*langsymbolprechange*/
+void langsymbolinserted ( hdlhashtable htable, const Handle handleName, hdlhashnode hnode ) {
-void langsymbolinserted (hdlhashtable htable, const bigstring bsname, hdlhashnode hnode) {
+ #ifdef fltracklocaladdresses
+
+ hashregisteraddressnode ( htable, hnode );
+
+ #endif
-#ifdef fltracklocaladdresses
- hashregisteraddressnode (htable, hnode);
-#endif
+ ( *langcallbacks.symbolinsertedcallback ) ( htable, handleName, hnode );
- (*langcallbacks.symbolinsertedcallback) (htable, bsname, hnode);
+ } // langsymbolinserted
- } /*langsymbolinserted*/
-
void langsymbolunlinking (hdlhashtable htable, hdlhashnode hnode) {
(*langcallbacks.symbolunlinkingcallback) (htable, hnode);
@@ -300,18 +327,20 @@
} /*langsymbolunlinking*/
-void langsymboldeleted (hdlhashtable h...
[truncated message content] |