You can subscribe to this list here.
| 2004 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(447) |
Nov
(163) |
Dec
(57) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2005 |
Jan
(172) |
Feb
|
Mar
(123) |
Apr
(64) |
May
(1) |
Jun
(278) |
Jul
(89) |
Aug
(97) |
Sep
(62) |
Oct
(53) |
Nov
(119) |
Dec
(60) |
| 2006 |
Jan
(76) |
Feb
(1094) |
Mar
(363) |
Apr
(163) |
May
(57) |
Jun
(43) |
Jul
(39) |
Aug
(15) |
Sep
(33) |
Oct
(62) |
Nov
(8) |
Dec
|
| 2007 |
Jan
(9) |
Feb
(34) |
Mar
(2) |
Apr
(14) |
May
(8) |
Jun
(40) |
Jul
(21) |
Aug
(1) |
Sep
(20) |
Oct
(15) |
Nov
(26) |
Dec
|
| 2008 |
Jan
(1) |
Feb
(1) |
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
(3) |
Oct
|
Nov
|
Dec
(1) |
| 2009 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(32) |
Jun
|
Jul
|
Aug
(3) |
Sep
(3) |
Oct
|
Nov
|
Dec
|
| 2010 |
Jan
(1) |
Feb
|
Mar
|
Apr
|
May
|
Jun
(1) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
| 2011 |
Jan
|
Feb
|
Mar
(2) |
Apr
|
May
|
Jun
(1) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
(7) |
Dec
|
| 2012 |
Jan
|
Feb
|
Mar
|
Apr
(1) |
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
|
From: Andre R. <and...@us...> - 2004-11-11 16:54:10
|
Update of /cvsroot/frontierkernel/Frontier/Common/source In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20622 Modified Files: Tag: New_Tables_Experiment-branch langhash.c Log Message: Switched to Paul Hsieh's SuperFastHash algorithm for hashing, although because we need to lower-case the string on the fly, it may not be superfast anymore. Index: langhash.c =================================================================== RCS file: /cvsroot/frontierkernel/Frontier/Common/source/langhash.c,v retrieving revision 1.4.2.3 retrieving revision 1.4.2.4 diff -C2 -d -r1.4.2.3 -r1.4.2.4 *** langhash.c 11 Nov 2004 14:52:59 -0000 1.4.2.3 --- langhash.c 11 Nov 2004 16:54:01 -0000 1.4.2.4 *************** *** 1114,1144 **** #ifdef flv10tables ! unsigned long hashfunction (const bigstring bs) { ! /* ! 2004-11-10 aradke: New hash function with wider spread, inspired by K&R "Programming in C". ! ! We loop from the end to the beginning of the string so that the multiplication ! will magnify the difference between two strings that differ only in the last ! position, e.g. consecutively numbered items. ! ! The return value is unsigned long because we expect to switch to a variable number ! of buckets on a per-table basis soon. When we get there, we will switch to returning ! hashval un-mod-ed, so it can be saved with the hashkey in the node and be re-used ! for when we need to re-bucket all items. */ ! register unsigned long hashval = 0; ! register ptrstring pend; ! register ptrstring p; ! ! pend = (ptrstring) bs; ! p = pend + stringlength (bs); ! while (p > pend) ! hashval = 31 * hashval + (unsigned long) getlower (*p--); ! return (hashval); } /*hashfunction*/ --- 1114,1192 ---- #ifdef flv10tables ! #undef getshort ! ! #ifdef MACVERSION ! #define getshort(d) (((getlower ((d)[0])) << 8UL) + (getlower ((d)[1]))) ! #endif ! ! #ifdef WIN95VERSION ! #define getshort(d) (((getlower ((d)[1])) << 8UL) + (getlower ((d)[0]))) ! #endif ! ! ! unsigned long hashfunction (const bigstring bskey) { ! /* ! 2004-11-11 aradke: adaptation of Paul Hsieh's "SuperFastHash" algorithm, ! see http://www.azillionmonkeys.com/qed/hash.html for details. ! the main difference is that we need to lower-case the key on the fly. */ ! unsigned long hash; ! int i, rem; ! const unsigned char *pkey = stringbaseaddress (bskey); ! int len = stringlength (bskey); ! ! if (len == 0) ! return (0); ! ! hash = (unsigned long) len; /*avoid 0 -> 0 trap*/ ! rem = len & 3; ! len >>= 2; ! ! for (i=0; i < len; i++) { /*main loop*/ ! ! hash += getshort (pkey); ! ! pkey += 2 * sizeof (char); ! ! hash ^= hash << 16; ! ! hash ^= getshort (pkey) << 11; ! ! pkey += 2 * sizeof (char); ! ! hash += hash >> 11; ! } /*for*/ ! ! switch (rem) { /*handle end cases*/ ! case 3: hash += getshort (pkey); ! hash ^= hash << 16; ! hash ^= pkey[2 * sizeof (char)] << 18; ! hash += hash >> 11; ! break; ! ! case 2: hash += getshort (pkey); ! hash ^= hash << 11; ! hash += hash >> 17; ! break; ! ! case 1: hash += *pkey; ! hash ^= hash << 10; ! hash += hash >> 1; ! ! } /*switch*/ ! ! /* Force "avalanching" of final 127 bits */ ! hash ^= hash << 3; ! hash += hash >> 5; ! hash ^= hash << 2; ! hash += hash >> 15; ! hash ^= hash << 10; ! ! return (hash); } /*hashfunction*/ |
|
From: Andre R. <and...@us...> - 2004-11-11 14:53:14
|
Update of /cvsroot/frontierkernel/Frontier/Common/source In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv26460 Modified Files: Tag: New_Tables_Experiment-branch langhash.c Log Message: When inserting a node into a hash table and the number of nodes is larger than the number of hash buckets, grow the size of the bucket array by a factor of two. Index: langhash.c =================================================================== RCS file: /cvsroot/frontierkernel/Frontier/Common/source/langhash.c,v retrieving revision 1.4.2.2 retrieving revision 1.4.2.3 diff -C2 -d -r1.4.2.2 -r1.4.2.3 *** langhash.c 11 Nov 2004 13:12:39 -0000 1.4.2.2 --- langhash.c 11 Nov 2004 14:52:59 -0000 1.4.2.3 *************** *** 458,461 **** --- 458,463 ---- #ifdef flv10tables + /*** FIXME: shrink buckets array to ctinitiallogsize while it's still empty? ***/ + clearhandle ((Handle) hbuckets); *************** *** 497,500 **** --- 499,569 ---- return (true); } /*newhashtable*/ + + + #ifdef flv10tables + + static unsigned long ctresizedhashtables = 0; + + static boolean resizehashtable (hdlhashtable htable, unsigned long newlogsize) { + + /* + 2004-11-11 aradke: adjust the size of the hash bucket array of the table. + allocate a new handle for the array, walk the old array, and re-bucket + all nodes. Finally, dispose of the old array. + + the array can be grown or shrinked. return false only if we run out of memory. + */ + + hdlhashbucketarray hnewbuckets, holdbuckets; + unsigned long ctoldbuckets, oldlogsize; + unsigned long ctnewbuckets; + register unsigned long ix, ixnew, newmask; + register hdlhashnode nomad, nextnomad; + + if (newlogsize < ctinitiallogsize) + newlogsize = ctinitiallogsize; + + if (newlogsize == oldlogsize) + return (true); + + ctresizedhashtables++; + + ctnewbuckets = (1 << newlogsize); + newmask = ctnewbuckets - 1; + + if (!newclearhandle (ctnewbuckets * sizeof(hdlhashnode), (Handle *) &hnewbuckets)) + return (false); + + holdbuckets = (**htable).hbuckets; + oldlogsize = (**htable).logsize; + ctoldbuckets = 1 << oldlogsize; + + assert (gethandlesize ((Handle) holdbuckets) == ctoldbuckets * sizeof(hdlhashnode)); + + for (ix = 0; ix < ctoldbuckets; ix++) { + + for (nomad = (*holdbuckets) [ix]; nomad != nil; nomad = nextnomad) { + + ixnew = (**nomad).hashval & newmask; + + nextnomad = (**nomad).hashlink; + + (**nomad).hashlink = (*hnewbuckets) [ixnew]; + + (*hnewbuckets) [ixnew] = nomad; + } /*for*/ + + } /*for*/ + + disposehandle ((Handle) holdbuckets); + + (**htable).hbuckets = hnewbuckets; + (**htable).logsize = newlogsize; + (**htable).bucketmask = newmask; + + return (true); + } /*resizehashtable*/ + + #endif /*flv10tables*/ *************** *** 1199,1202 **** --- 1268,1274 ---- #ifdef flv10tables + + if ((**htable).ctnodes > (1 << (**htable).logsize)) /*getting full*/ + (void) resizehashtable (htable, (**htable).logsize + 1); /*ignore return value, our callers don't check for it*/ assert ((**hn).hashval == hashfunction ((**hn).hashkey)); |
|
From: Andre R. <and...@us...> - 2004-11-11 13:12:52
|
Update of /cvsroot/frontierkernel/Frontier/Common/source In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1178/source Modified Files: Tag: New_Tables_Experiment-branch langhash.c tablevalidate.c Log Message: Further preparations for moving to dynamic allocation of hash bucket arrays: The size of a hash bucket array is now always a power of two. Computing an index into the bucket array is just a matter of masking the hash value rather than taking the rest of the division by a prime number. Hash tables now also keep track of the number of nodes they contain, so we will eventually be able to determine when to grow the hash bucket array. Index: tablevalidate.c =================================================================== RCS file: /cvsroot/frontierkernel/Frontier/Common/source/tablevalidate.c,v retrieving revision 1.3.2.1 retrieving revision 1.3.2.2 diff -C2 -d -r1.3.2.1 -r1.3.2.2 *** tablevalidate.c 10 Nov 2004 16:19:07 -0000 1.3.2.1 --- tablevalidate.c 11 Nov 2004 13:12:40 -0000 1.3.2.2 *************** *** 126,130 **** } ! if (((**x).hashval % (**ht).ctbuckets) != i) { if (flalert) --- 126,130 ---- } ! if (hashtobucketindex (ht, (**x).hashval) != i) { if (flalert) Index: langhash.c =================================================================== RCS file: /cvsroot/frontierkernel/Frontier/Common/source/langhash.c,v retrieving revision 1.4.2.1 retrieving revision 1.4.2.2 diff -C2 -d -r1.4.2.1 -r1.4.2.2 *** langhash.c 10 Nov 2004 16:19:05 -0000 1.4.2.1 --- langhash.c 11 Nov 2004 13:12:39 -0000 1.4.2.2 *************** *** 414,417 **** --- 414,418 ---- hdlhashbucketarray hbuckets; + unsigned long logsize; #endif *************** *** 437,452 **** short ct; ! #ifdef flv10tables ! unsigned long ctbuckets = (**ht).ctbuckets; hbuckets = (**ht).hbuckets; ! assert (gethandlesize ((Handle) hbuckets) / sizeof (hdlhashnode) == ctbuckets); #endif - hfirstfreetable = (**hfirstfreetable).prevhashtable; - ct = (**ht).cttmpstack; --- 438,453 ---- short ct; ! hfirstfreetable = (**ht).prevhashtable; /*unlink*/ ! #ifdef flv10tables hbuckets = (**ht).hbuckets; ! logsize = (**ht).logsize; ! ! assert (gethandlesize ((Handle) hbuckets) / sizeof (hdlhashnode) == (1 << logsize)); #endif ct = (**ht).cttmpstack; *************** *** 461,465 **** (**ht).hbuckets = hbuckets; ! (**ht).ctbuckets = ctbuckets; #endif --- 462,468 ---- (**ht).hbuckets = hbuckets; ! (**ht).logsize = logsize; ! ! (**ht).bucketmask = (1 << logsize) - 1; #endif *************** *** 477,481 **** #ifdef flv10tables ! if (!newclearhandle (ctinitialbuckets * sizeof (hdlhashnode), (Handle *) &hbuckets)) { disposehandle (*(Handle *) htable); return (false); --- 480,486 ---- #ifdef flv10tables ! logsize = ctinitiallogsize; ! ! if (!newclearhandle ((1 << logsize) * sizeof (hdlhashnode), (Handle *) &hbuckets)) { disposehandle (*(Handle *) htable); return (false); *************** *** 484,488 **** (***htable).hbuckets = hbuckets; ! (***htable).ctbuckets = ctinitialbuckets; #endif --- 489,495 ---- (***htable).hbuckets = hbuckets; ! (***htable).logsize = logsize; ! ! (***htable).bucketmask = (1 << logsize) - 1; #endif *************** *** 923,927 **** register hdlhashnode nomad, nextnomad; register short i; ! short ctdisposed = 0; bigstring bs; --- 930,934 ---- register hdlhashnode nomad, nextnomad; register short i; ! unsigned long ctdisposed = 0; bigstring bs; *************** *** 959,962 **** --- 966,973 ---- dirtyhashtable (ht); + + #ifdef flv10tables + (**ht).ctnodes -= ctdisposed; + #endif return (ctdisposed); *************** *** 1015,1041 **** smashhashtable (ht, fldisk, false); - /* - for (i = 0; i < ctbuckets; i++) { - - nomad = (**ht).hashbucket [i]; - - (**ht).hashbucket [i] = nil; /%disconnect list so table is valid during disposal%/ - - while (nomad != nil) { - - /% - boolean fldisposevalue; - - fldisposevalue = (!(**ht).fllocaltable) || ((**nomad).val.valuetype != codevaluetype); - %/ - - nextnomad = (**nomad).hashlink; - - disposehashnode (nomad, true /%fldisposevalue%/, fldisk); - - nomad = nextnomad; - } - } - */ #ifdef fltracklocaladdresses --- 1026,1029 ---- *************** *** 1214,1218 **** assert ((**hn).hashval == hashfunction ((**hn).hashkey)); ! ixbucket = (**hn).hashval % (**ht).ctbuckets; #else --- 1202,1206 ---- assert ((**hn).hashval == hashfunction ((**hn).hashkey)); ! ixbucket = hashtobucketindex (ht, (**hn).hashval); #else *************** *** 1228,1231 **** --- 1216,1225 ---- (**hn).hashlink = hnext; + #ifdef flv10tables + + (**htable).ctnodes++; + + #endif + return (true); } /*hashlinknode*/ *************** *** 1297,1300 **** --- 1291,1300 ---- else (**prev).hashlink = (**nomad).hashlink; + + #ifdef flv10tables + + (**htable).ctnodes--; + + #endif return (true); *************** *** 1474,1478 **** #ifdef flv10tables ! ixbucket = hashfunction (bs) % (**currenthashtable).ctbuckets; #else ixbucket = hashfunction (bs); --- 1474,1478 ---- #ifdef flv10tables ! ixbucket = hashtobucketindex (currenthashtable, hashfunction (bs)); #else ixbucket = hashfunction (bs); *************** *** 1507,1512 **** ! boolean hashunlink (const bigstring bs, hdlhashnode *hnode) { hdlhashnode hprev; register hdlhashnode hn; --- 1507,1520 ---- ! static boolean hashdeletenode (const bigstring bs, hdlhashnode *hnode) { ! ! /* ! 2004-11-11 aradke: hashunlink and hashdelete had a lot of common code, ! so we created this static function for them. + The caller is responsible for setting the tables dirty flag, invoking + the appropriate callbacks, and disposing of or re-using the node. + */ + hdlhashnode hprev; register hdlhashnode hn; *************** *** 1529,1533 **** assert ((**hn).hashval == hashfunction (bs)); ! nthhashbucket (currenthashtable, (**hn).hashval % (**currenthashtable).ctbuckets) = (**hn).hashlink; #else --- 1537,1541 ---- assert ((**hn).hashval == hashfunction (bs)); ! nthhashbucket (currenthashtable, hashtobucketindex (currenthashtable, (**hn).hashval)) = (**hn).hashlink; #else *************** *** 1540,1545 **** --- 1548,1571 ---- (**hprev).hashlink = (**hn).hashlink; + #ifdef flv10tables + (**currenthashtable).ctnodes--; + #endif + hashsorteddelete (hn); + + return (true); + } /*hashdeletenode*/ + + boolean hashunlink (const bigstring bs, hdlhashnode *hnode) { + + /* + 2004-11-11 aradke: this is similar enough to hashdelete to warrant + moving the shared code into a separate static function, hashdeletenode. + */ + + if (!hashdeletenode (bs, hnode)) + return (false); + dirtyhashtable (currenthashtable); *************** *** 1549,1603 **** } /*hashunlink*/ - /* - boolean hashdeletenode (hdlhashnode *hnode) { - - hdlhashnode hprev; - register hdlhashnode hn; - - hashunlinknode (currenthashtable, hnode); - - hashsorteddelete (hnode); - - dirtyhashtable (currenthashtable); - - return (true); - } /%hashdeletenode%/ - */ - boolean hashdelete (const bigstring bs, boolean fldisposevalue, boolean fldisk) { ! hdlhashnode hnode, hprev; ! register hdlhashnode hn; ! if (!hashlocate (bs, &hnode, &hprev)) { ! langparamerror (cantdeleteerror, bs); ! return (false); - } - - hn = hnode; /*copy into register*/ - - langsymbolunlinking (currenthashtable, hn); - - if (hprev == nil) { - - #ifdef flv10tables - - assert ((**hn).hashval == hashfunction (bs)); - - nthhashbucket (currenthashtable, (**hn).hashval % (**currenthashtable).ctbuckets) = (**hn).hashlink; - - #else - - nthhashbucket (currenthashtable, hashfunction (bs)) = (**hn).hashlink; - - #endif - } - else - (**hprev).hashlink = (**hn).hashlink; - - hashsorteddelete (hn); disposehashnode (currenthashtable, hn, fldisposevalue, fldisk); --- 1575,1590 ---- } /*hashunlink*/ boolean hashdelete (const bigstring bs, boolean fldisposevalue, boolean fldisk) { ! /* ! 2004-11-11 aradke: this is similar enough to hashunlink to warrant ! moving the shared code into a separate static function, hashdeletenode. ! */ ! hdlhashnode hn; ! if (!hashdeletenode (bs, &hn)) return (false); disposehashnode (currenthashtable, hn, fldisposevalue, fldisk); *************** *** 3557,3560 **** --- 3544,3553 ---- *ctitems = ct; + + #ifdef flv10tables + + assert (ct == (**htable).ctnodes); + + #endif return (true); |
|
From: Andre R. <and...@us...> - 2004-11-11 13:12:52
|
Update of /cvsroot/frontierkernel/Frontier/Common/headers In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1178/headers Modified Files: Tag: New_Tables_Experiment-branch lang.h Log Message: Further preparations for moving to dynamic allocation of hash bucket arrays: The size of a hash bucket array is now always a power of two. Computing an index into the bucket array is just a matter of masking the hash value rather than taking the rest of the division by a prime number. Hash tables now also keep track of the number of nodes they contain, so we will eventually be able to determine when to grow the hash bucket array. Index: lang.h =================================================================== RCS file: /cvsroot/frontierkernel/Frontier/Common/headers/lang.h,v retrieving revision 1.4.2.1 retrieving revision 1.4.2.2 diff -C2 -d -r1.4.2.1 -r1.4.2.2 *** lang.h 10 Nov 2004 17:21:43 -0000 1.4.2.1 --- lang.h 11 Nov 2004 13:12:38 -0000 1.4.2.2 *************** *** 453,464 **** #ifdef flv10tables - - #define ctinitialbuckets 11 typedef hdlhashnode **hdlhashbucketarray; #define nthhashbucket(ht,i) ((*((**(ht)).hbuckets))[i]) ! #define gethashbucketcount(ht) ((**(ht)).ctbuckets) #else --- 453,468 ---- #ifdef flv10tables typedef hdlhashnode **hdlhashbucketarray; + typedef unsigned long tyhashval; + + #define ctinitiallogsize 4 /*(2 ** 4) = 16 buckets*/ + #define nthhashbucket(ht,i) ((*((**(ht)).hbuckets))[i]) ! #define gethashbucketcount(ht) (1 << (**(ht)).logsize) ! ! #define hashtobucketindex(ht,hash) ((hash) & ((**ht).bucketmask)) #else *************** *** 469,472 **** --- 473,478 ---- #define gethashbucketcount(ht) ctbuckets + + #define hashtobucketindex(ht,hash) hash /*already handled in hash function*/ #endif *************** *** 479,486 **** #ifdef flv10tables ! unsigned long ctbuckets; ! hdlhashbucketarray hbuckets; #else --- 485,496 ---- #ifdef flv10tables + + hdlhashbucketarray hbuckets; /*handle to an array of hash node handles*/ ! unsigned long logsize; /*number of buckets = 1 << logsize*/ ! ! tyhashval bucketmask; /*mask hashval with this to obtain index into bucket array*/ ! unsigned long ctnodes; /*number of nodes in the table*/ #else |
|
From: Terry T. <ter...@us...> - 2004-11-11 09:31:48
|
Update of /cvsroot/frontierkernel/Frontier/Common/headers In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20049/Frontier/Common/headers Modified Files: versions.h Log Message: Bump version to v10.0a3, since v10.0a2 has already been tagged. Index: versions.h =================================================================== RCS file: /cvsroot/frontierkernel/Frontier/Common/headers/versions.h,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** versions.h 3 Nov 2004 21:45:22 -0000 1.2 --- versions.h 11 Nov 2004 09:31:39 -0000 1.3 *************** *** 55,62 **** #define frontier_stage_code 0x40 /* dev = 0x20, alpha = 0x40, beta = 0x60, final = 0x80 */ ! #define frontier_revision_level 2 /* for non-final releases only */ ! #define frontier_build_number 2 /* increment by one for every release, final or not */ ! #define frontier_version_string "10.0a2" --- 55,62 ---- #define frontier_stage_code 0x40 /* dev = 0x20, alpha = 0x40, beta = 0x60, final = 0x80 */ ! #define frontier_revision_level 3 /* for non-final releases only */ ! #define frontier_build_number 3 /* increment by one for every release, final or not */ ! #define frontier_version_string "10.0a3" |
|
From: Terry T. <ter...@us...> - 2004-11-11 09:29:47
|
Update of /cvsroot/frontierkernel/Frontier/build_XCode/Frontier.xcode In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19467/Frontier/build_XCode/Frontier.xcode Modified Files: project.pbxproj Log Message: Updated to make application bundle (product) name consistent with existing build environments; add "Frontier.icns"; correct handling of "Info.plist"; add shell script phase to substitute values of parameterized product name/version/copyright strings in "Info.plist", based on "version.h". Index: project.pbxproj =================================================================== RCS file: /cvsroot/frontierkernel/Frontier/build_XCode/Frontier.xcode/project.pbxproj,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** project.pbxproj 10 Nov 2004 18:43:25 -0000 1.14 --- project.pbxproj 11 Nov 2004 09:29:37 -0000 1.15 *************** *** 72,76 **** 6515255F072BFC6500411831, ); ! hasScannedForEncodings = 0; isa = PBXProject; mainGroup = 6515255C072BFC6500411831; --- 72,76 ---- 6515255F072BFC6500411831, ); ! hasScannedForEncodings = 1; isa = PBXProject; [...3878 lines suppressed...] ! isa = PBXShellScriptBuildPhase; ! outputPaths = ( ! "${BUILT_PRODUCTS_DIR}/${CONTENTS_FOLDER_PATH}/Info.plist", ! ); ! runOnlyForDeploymentPostprocessing = 0; ! shellPath = /bin/sh; ! shellScript = "# debug\n#set -x\n#printenv\n\n# Build Frontier.icns file\n# There seems to be some bugs here, so just use\n# pre-created Frontier.icns file.\n# Also add \"icns.r\" path to Input files and\n# \"Frontier.icns\" path to Output files below.\n\n#/Developer/Tools/Rez \"${SRCROOT}/../resources/Frontier/icns.r\" -d TARGET_API_MAC_CARBON=1 -d FRONTIER_FRAMEWORK_INCLUDES=1 -i \"${SRCROOT}/../Common/headers\" -useDF -o \"${BUILT_PRODUCTS_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/Frontier.icns\"\n\n# Strip trademark character to prevent problems wuth shell quoting\n#product_str=`echo ${PRODUCT_NAME} | awk -F '\\342' '{print $1};'`\n\nproduct_str=${PRODUCT_NAME}\n\n# Parse the \"versions.h\" file for useful variables\n\nversion_str=`grep \"frontier_version_string\" \"${SRCROOT}/../Common/headers/versions.h\" | awk -F \\\" '{print $2};'`\ncopyright_year_str=`grep \"copyright_year_string\" \"${SRCROOT}/../Common/headers/versions.h\" | awk -F \\\" '{print $2};'`\n\n# Update the Info.plist\n# Could append \"(dbg)\" to product name for Development build style\n\n#defaults write \"${BUILT_PRODUCTS_DIR}/${CONTENTS_FOLDER_PATH}/Info\" CFBundleVersion ${version_str}\n\n# or use sed\n\nsed -e \"s/\\${PRODUCT_NAME_STR}/${product_str}/g\" -e \"s/\\${PRODUCT_VERSION_STR}/${version_str}/g\" -e \"s/\\${COPYRIGHT_YEAR_STR}/${copyright_year_str}/g\" \"${SRCROOT}/Info.Plist\" > \"${BUILT_PRODUCTS_DIR}/${CONTENTS_FOLDER_PATH}/Info.plist\""; ! }; ! DEA58AB307435A9500BAB271 = { ! isa = PBXFileReference; ! lastKnownFileType = image.icns; ! name = Frontier.icns; ! path = ../resources/Frontier/Frontier.icns; ! refType = 2; ! sourceTree = SOURCE_ROOT; ! }; ! DEA58AB407435A9500BAB271 = { ! fileRef = DEA58AB307435A9500BAB271; isa = PBXBuildFile; settings = { |
|
From: Terry T. <ter...@us...> - 2004-11-11 09:23:48
|
Update of /cvsroot/frontierkernel/Frontier/build_XCode In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18318/Frontier/build_XCode Modified Files: Info.plist Log Message: Updated to add supported file types; add additional required Info.plist keys; parameterize product name/version/copyright strings based on "version.h". Index: Info.plist =================================================================== RCS file: /cvsroot/frontierkernel/Frontier/build_XCode/Info.plist,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** Info.plist 28 Oct 2004 00:21:03 -0000 1.1 --- Info.plist 11 Nov 2004 09:23:39 -0000 1.2 *************** *** 10,31 **** <key>CFBundleTypeExtensions</key> <array> <string>.root</string> </array> <key>CFBundleTypeName</key> <string>Frontier Root</string> </dict> </array> <key>CFBundleExecutable</key> ! <string>${PRODUCT_NAME}</string> <key>CFBundleIdentifier</key> <string>com.scripting.Frontier</string> <key>CFBundleInfoDictionaryVersion</key> <string>6.0</string> <key>CFBundlePackageType</key> <string>APPL</string> <key>CFBundleSignature</key> ! <string>????</string> <key>CFBundleVersion</key> ! <string>${DYLIB_CURRENT_VERSION}</string> </dict> </plist> --- 10,175 ---- <key>CFBundleTypeExtensions</key> <array> + <string>*</string> + </array> + <key>CFBundleTypeName</key> + <string>Any file</string> + <key>CFBundleTypeOSTypes</key> + <array> + <string>****</string> + </array> + </dict> + <dict> + <key>CFBundleTypeExtensions</key> + <array> <string>.root</string> </array> + <key>CFBundleTypeOSTypes</key> + <array> + <string>TABL</string> + </array> <key>CFBundleTypeName</key> <string>Frontier Root</string> </dict> + <dict> + <key>CFBundleTypeExtensions</key> + <array> + <string>.2clk</string> + </array> + <key>CFBundleTypeOSTypes</key> + <array> + <string>2CLK</string> + </array> + <key>CFBundleTypeName</key> + <string>Frontier Desktop Script</string> + </dict> + <dict> + <key>CFBundleTypeExtensions</key> + <array> + <string>.card</string> + </array> + <key>CFBundleTypeOSTypes</key> + <array> + <string>CARD</string> + </array> + <key>CFBundleTypeName</key> + <string>Frontier Iowa Card</string> + </dict> + <dict> + <key>CFBundleTypeExtensions</key> + <array> + <string>.fatp</string> + </array> + <key>CFBundleTypeOSTypes</key> + <array> + <string>FATP</string> + </array> + <key>CFBundleTypeName</key> + <string>Frontier Fat Page</string> + </dict> + <dict> + <key>CFBundleTypeExtensions</key> + <array> + <string>.ftop</string> + </array> + <key>CFBundleTypeOSTypes</key> + <array> + <string>FTop</string> + </array> + <key>CFBundleTypeName</key> + <string>Frontier Outline</string> + </dict> + <dict> + <key>CFBundleTypeExtensions</key> + <array> + <string>.ftsc</string> + </array> + <key>CFBundleTypeOSTypes</key> + <array> + <string>FTsc</string> + </array> + <key>CFBundleTypeName</key> + <string>Frontier Script</string> + </dict> + <dict> + <key>CFBundleTypeExtensions</key> + <array> + <string>.ftwp</string> + </array> + <key>CFBundleTypeOSTypes</key> + <array> + <string>FTwp</string> + </array> + <key>CFBundleTypeName</key> + <string>Frontier WP Text</string> + </dict> + <dict> + <key>CFBundleTypeExtensions</key> + <array> + <string>.ftmb</string> + </array> + <key>CFBundleTypeOSTypes</key> + <array> + <string>FTmb</string> + </array> + <key>CFBundleTypeName</key> + <string>Frontier Menu Bar</string> + </dict> + <dict> + <key>CFBundleTypeExtensions</key> + <array> + <string>.fttb</string> + </array> + <key>CFBundleTypeOSTypes</key> + <array> + <string>FTtb</string> + </array> + <key>CFBundleTypeName</key> + <string>Frontier Table</string> + </dict> + <dict> + <key>CFBundleTypeExtensions</key> + <array> + <string>.ftpc</string> + </array> + <key>CFBundleTypeOSTypes</key> + <array> + <string>FTpc</string> + </array> + <key>CFBundleTypeName</key> + <string>Frontier Picture</string> + </dict> + <dict> + <key>CFBundleTypeExtensions</key> + <array> + <string>.ftds</string> + </array> + <key>CFBundleTypeOSTypes</key> + <array> + <string>FTds</string> + </array> + <key>CFBundleTypeName</key> + <string>Frontier Desktop Script</string> + </dict> </array> <key>CFBundleExecutable</key> ! <string>${PRODUCT_NAME_STR}</string> ! <key>CFBundleGetInfoString</key> ! <string>${PRODUCT_VERSION_STR}; © 1992-${COPYRIGHT_YEAR_STR} Userland Software, Inc.</string> ! <key>CFBundleIconFile</key> ! <string>Frontier.icns</string> <key>CFBundleIdentifier</key> <string>com.scripting.Frontier</string> <key>CFBundleInfoDictionaryVersion</key> <string>6.0</string> + <key>CFBundleName</key> + <string>${PRODUCT_NAME_STR}</string> <key>CFBundlePackageType</key> <string>APPL</string> + <key>CFBundleShortVersionString</key> + <string>${PRODUCT_VERSION_STR}</string> <key>CFBundleSignature</key> ! <string>LAND</string> <key>CFBundleVersion</key> ! <string>${PRODUCT_VERSION_STR}</string> </dict> </plist> |
|
From: Terry T. <ter...@us...> - 2004-11-11 09:20:26
|
Update of /cvsroot/frontierkernel/Frontier/resources/Frontier In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv17559/Frontier/resources/Frontier Added Files: Frontier.icns Log Message: Initial checkin. Used by Mach-O application bundle (Xcode project). Derived from "icns.r". --- NEW FILE: Frontier.icns --- (This appears to be a binary file; contents omitted.) |
|
From: Andre R. <and...@us...> - 2004-11-10 19:06:29
|
Update of /cvsroot/frontierkernel/Frontier/build_XCode/Frontier.xcode In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv889 Modified Files: Tag: New_Tables_Experiment-branch project.pbxproj Log Message: Switched paths in Include Files and Yacc Files groups from absolute back to relative. Index: project.pbxproj =================================================================== RCS file: /cvsroot/frontierkernel/Frontier/build_XCode/Frontier.xcode/project.pbxproj,v retrieving revision 1.13 retrieving revision 1.13.2.1 diff -C2 -d -r1.13 -r1.13.2.1 *** project.pbxproj 9 Nov 2004 20:36:09 -0000 1.13 --- project.pbxproj 10 Nov 2004 19:06:16 -0000 1.13.2.1 *************** *** 4977,4983 **** lastKnownFileType = sourcecode.c.h; name = frontier.h; ! path = /Volumes/Data/Development/frontierkernel/Frontier/Common/headers/frontier.h; ! refType = 0; ! sourceTree = "<absolute>"; }; 651527B2072BFE0100411831 = { --- 4977,4983 ---- lastKnownFileType = sourcecode.c.h; name = frontier.h; [...3453 lines suppressed...] ! sourceTree = SOURCE_ROOT; }; 65BBB662072E563B008E2F34 = { *************** *** 8111,8117 **** lastKnownFileType = sourcecode.c.h; name = frontierdefs.h; ! path = /Volumes/Data/Development/frontierkernel/Frontier/Common/headers/frontierdefs.h; ! refType = 0; ! sourceTree = "<absolute>"; }; 65BBB664072E5643008E2F34 = { --- 8111,8117 ---- lastKnownFileType = sourcecode.c.h; name = frontierdefs.h; ! path = ../Common/headers/frontierdefs.h; ! refType = 2; ! sourceTree = SOURCE_ROOT; }; 65BBB664072E5643008E2F34 = { |
|
From: Andre R. <and...@us...> - 2004-11-10 18:43:38
|
Update of /cvsroot/frontierkernel/Frontier/build_XCode/Frontier.xcode In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv28289 Modified Files: project.pbxproj Log Message: Switch paths of files in Include Files and Yacc Files group from absolute back to relative. Index: project.pbxproj =================================================================== RCS file: /cvsroot/frontierkernel/Frontier/build_XCode/Frontier.xcode/project.pbxproj,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** project.pbxproj 9 Nov 2004 20:36:09 -0000 1.13 --- project.pbxproj 10 Nov 2004 18:43:25 -0000 1.14 *************** *** 4977,4983 **** lastKnownFileType = sourcecode.c.h; name = frontier.h; ! path = /Volumes/Data/Development/frontierkernel/Frontier/Common/headers/frontier.h; ! refType = 0; ! sourceTree = "<absolute>"; }; 651527B2072BFE0100411831 = { --- 4977,4983 ---- lastKnownFileType = sourcecode.c.h; name = frontier.h; [...3453 lines suppressed...] ! sourceTree = SOURCE_ROOT; }; 65BBB662072E563B008E2F34 = { *************** *** 8111,8117 **** lastKnownFileType = sourcecode.c.h; name = frontierdefs.h; ! path = /Volumes/Data/Development/frontierkernel/Frontier/Common/headers/frontierdefs.h; ! refType = 0; ! sourceTree = "<absolute>"; }; 65BBB664072E5643008E2F34 = { --- 8111,8117 ---- lastKnownFileType = sourcecode.c.h; name = frontierdefs.h; ! path = ../Common/headers/frontierdefs.h; ! refType = 2; ! sourceTree = SOURCE_ROOT; }; 65BBB664072E5643008E2F34 = { |
|
From: Andre R. <and...@us...> - 2004-11-10 18:18:34
|
Update of /cvsroot/frontierkernel/Frontier/Common/headers In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv22241 Modified Files: frontierdefs.h lang.h langinternal.h Log Message: Rollback previous revision which was supposed to go into the New_Tables_Experiment-branch only. Index: lang.h =================================================================== RCS file: /cvsroot/frontierkernel/Frontier/Common/headers/lang.h,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** lang.h 10 Nov 2004 16:18:29 -0000 1.5 --- lang.h 10 Nov 2004 18:18:24 -0000 1.6 *************** *** 437,446 **** byte ctlocks: 8; - #ifdef flv10tables - - unsigned long hashval; /*2004-11-10 aradke: cache of hashfunction(hashkey)*/ - - #endif - byte hashkey []; /*the identifier of this table element, lives in extension of record*/ --- 437,440 ---- *************** *** 450,474 **** #define HNoNode ((hdlhashnode) -1) #define gethashkey(h,bs) copystring ((**h).hashkey, bs); - - - #ifdef flv10tables - - #define ctinitialbuckets 11 - - typedef hdlhashnode **hdlhashbucketarray; - - #define nthhashbucket(ht,i) ((*((**(ht)).hbuckets))[i]) - - #define gethashbucketcount(ht) ((**(ht)).ctbuckets) - - #else - - #define ctbuckets 11 /*should be a prime number?*/ - #define nthhashbucket(ht,i) ((**(ht)).hashbucket[i]) - - #define gethashbucketcount(ht) ctbuckets ! #endif --- 444,450 ---- #define HNoNode ((hdlhashnode) -1) #define gethashkey(h,bs) copystring ((**h).hashkey, bs); ! #define ctbuckets 11 /*should be a prime number?*/ *************** *** 478,493 **** typedef struct tyhashtable { - #ifdef flv10tables - - unsigned long ctbuckets; - - hdlhashbucketarray hbuckets; - - #else - hdlhashnode hashbucket [ctbuckets]; ! ! #endif ! hdlhashnode hfirstsort; /*the alphabetically-first hash node*/ --- 454,459 ---- typedef struct tyhashtable { hdlhashnode hashbucket [ctbuckets]; ! hdlhashnode hfirstsort; /*the alphabetically-first hash node*/ Index: frontierdefs.h =================================================================== RCS file: /cvsroot/frontierkernel/Frontier/Common/headers/frontierdefs.h,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** frontierdefs.h 10 Nov 2004 16:21:21 -0000 1.3 --- frontierdefs.h 10 Nov 2004 18:18:23 -0000 1.4 *************** *** 76,81 **** #undef lazythis_optimization #undef langexternalfind_optimization - #define flv10tables 1 /* 2004-11-10 aradke: for new hash table implementation [EXPERIMENTAL] */ - #define PASCALSTRINGVERSION 1 #define SPEED 1 --- 76,79 ---- Index: langinternal.h =================================================================== RCS file: /cvsroot/frontierkernel/Frontier/Common/headers/langinternal.h,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** langinternal.h 10 Nov 2004 16:18:30 -0000 1.4 --- langinternal.h 10 Nov 2004 18:18:24 -0000 1.5 *************** *** 416,424 **** extern boolean hashflushcache (long *); /*langhash.h*/ ! #ifdef flv10tables ! extern unsigned long hashfunction (const bigstring); /* 2004-11-10 aradke */ ! #else ! extern short hashfunction (const bigstring); ! #endif extern boolean hashresolvevalue (hdlhashtable, hdlhashnode); --- 416,420 ---- extern boolean hashflushcache (long *); /*langhash.h*/ ! extern short hashfunction (const bigstring); extern boolean hashresolvevalue (hdlhashtable, hdlhashnode); |
|
From: Andre R. <and...@us...> - 2004-11-10 17:21:59
|
Update of /cvsroot/frontierkernel/Frontier/Common/headers In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8410 Modified Files: Tag: New_Tables_Experiment-branch frontierdefs.h lang.h langinternal.h Log Message: First step towards an overhaul of the hashtable type: Switched to a hash function with a wider spread. Prepare for allocating and resizing the hash bucket array dynamically by caching the hash function result in each hash node and moving the hash bucket array out of the hash node handle and into its own handle. All significant changes ifdef'd for flv10tables, to be defined in frontierdefs.h. Index: lang.h =================================================================== RCS file: /cvsroot/frontierkernel/Frontier/Common/headers/lang.h,v retrieving revision 1.4 retrieving revision 1.4.2.1 diff -C2 -d -r1.4 -r1.4.2.1 *** lang.h 31 Oct 2004 21:42:48 -0000 1.4 --- lang.h 10 Nov 2004 17:21:43 -0000 1.4.2.1 *************** *** 437,440 **** --- 437,446 ---- byte ctlocks: 8; + #ifdef flv10tables + + unsigned long hashval; /*2004-11-10 aradke: cache of hashfunction(hashkey)*/ + + #endif + byte hashkey []; /*the identifier of this table element, lives in extension of record*/ *************** *** 444,450 **** #define HNoNode ((hdlhashnode) -1) #define gethashkey(h,bs) copystring ((**h).hashkey, bs); ! #define ctbuckets 11 /*should be a prime number?*/ --- 450,474 ---- #define HNoNode ((hdlhashnode) -1) #define gethashkey(h,bs) copystring ((**h).hashkey, bs); + + #ifdef flv10tables ! #define ctinitialbuckets 11 ! ! typedef hdlhashnode **hdlhashbucketarray; ! ! #define nthhashbucket(ht,i) ((*((**(ht)).hbuckets))[i]) ! ! #define gethashbucketcount(ht) ((**(ht)).ctbuckets) ! ! #else ! ! #define ctbuckets 11 /*should be a prime number?*/ ! ! #define nthhashbucket(ht,i) ((**(ht)).hashbucket[i]) ! ! #define gethashbucketcount(ht) ctbuckets ! ! #endif *************** *** 454,459 **** typedef struct tyhashtable { ! hdlhashnode hashbucket [ctbuckets]; hdlhashnode hfirstsort; /*the alphabetically-first hash node*/ --- 478,493 ---- typedef struct tyhashtable { ! #ifdef flv10tables + unsigned long ctbuckets; + + hdlhashbucketarray hbuckets; + + #else + + hdlhashnode hashbucket [ctbuckets]; + + #endif + hdlhashnode hfirstsort; /*the alphabetically-first hash node*/ Index: frontierdefs.h =================================================================== RCS file: /cvsroot/frontierkernel/Frontier/Common/headers/frontierdefs.h,v retrieving revision 1.2 retrieving revision 1.2.2.1 diff -C2 -d -r1.2 -r1.2.2.1 *** frontierdefs.h 1 Nov 2004 13:54:29 -0000 1.2 --- frontierdefs.h 10 Nov 2004 17:21:42 -0000 1.2.2.1 *************** *** 76,79 **** --- 76,81 ---- #undef lazythis_optimization #undef langexternalfind_optimization + #define flv10tables 1 /* 2004-11-10 aradke: for new hash table implementation [EXPERIMENTAL] */ + #define PASCALSTRINGVERSION 1 #define SPEED 1 Index: langinternal.h =================================================================== RCS file: /cvsroot/frontierkernel/Frontier/Common/headers/langinternal.h,v retrieving revision 1.3 retrieving revision 1.3.2.1 diff -C2 -d -r1.3 -r1.3.2.1 *** langinternal.h 28 Oct 2004 23:07:31 -0000 1.3 --- langinternal.h 10 Nov 2004 17:21:46 -0000 1.3.2.1 *************** *** 416,420 **** extern boolean hashflushcache (long *); /*langhash.h*/ ! extern short hashfunction (const bigstring); extern boolean hashresolvevalue (hdlhashtable, hdlhashnode); --- 416,424 ---- extern boolean hashflushcache (long *); /*langhash.h*/ ! #ifdef flv10tables ! extern unsigned long hashfunction (const bigstring); /* 2004-11-10 aradke */ ! #else ! extern short hashfunction (const bigstring); ! #endif extern boolean hashresolvevalue (hdlhashtable, hdlhashnode); |
|
From: Andre R. <and...@us...> - 2004-11-10 16:21:31
|
Update of /cvsroot/frontierkernel/Frontier/Common/headers In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv26613 Modified Files: frontierdefs.h Log Message: First step towards an overhaul of the hashtable type: Switched to a hash function with a wider spread. Prepare for allocating and resizing the hash bucket array dynamically by caching the hash function result in each hash node and moving the hash bucket array out of the hash node handle and into its own handle. All significant changes ifdef'd for flv10tables, to be defined in frontierdefs.h. Index: frontierdefs.h =================================================================== RCS file: /cvsroot/frontierkernel/Frontier/Common/headers/frontierdefs.h,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** frontierdefs.h 1 Nov 2004 13:54:29 -0000 1.2 --- frontierdefs.h 10 Nov 2004 16:21:21 -0000 1.3 *************** *** 76,79 **** --- 76,81 ---- #undef lazythis_optimization #undef langexternalfind_optimization + #define flv10tables 1 /* 2004-11-10 aradke: for new hash table implementation [EXPERIMENTAL] */ + #define PASCALSTRINGVERSION 1 #define SPEED 1 |
|
From: Andre R. <and...@us...> - 2004-11-10 16:19:19
|
Update of /cvsroot/frontierkernel/Frontier/Common/source In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv25872 Modified Files: Tag: New_Tables_Experiment-branch tableops.c langexternal.c langhash.c langvalue.c tablevalidate.c Log Message: First step towards an overhaul of the hashtable type: Switched to a hash function with a wider spread. Prepare for allocating and resizing the hash bucket array dynamically by caching the hash function result in each hash node and moving the hash bucket array out of the hash node handle and into its own handle. All significant changes ifdef'd for flv10tables, to be defined in frontierdefs.h. Index: tablevalidate.c =================================================================== RCS file: /cvsroot/frontierkernel/Frontier/Common/source/tablevalidate.c,v retrieving revision 1.3 retrieving revision 1.3.2.1 diff -C2 -d -r1.3 -r1.3.2.1 *** tablevalidate.c 31 Oct 2004 20:41:10 -0000 1.3 --- tablevalidate.c 10 Nov 2004 16:19:07 -0000 1.3.2.1 *************** *** 96,102 **** } ! for (i = 0; i < ctbuckets; i++) { ! x = (**ht).hashbucket [i]; while (x != nil) { /*chain through the hash list*/ --- 96,102 ---- } ! for (i = 0; i < gethashbucketcount (ht); i++) { ! x = nthhashbucket (ht, i); while (x != nil) { /*chain through the hash list*/ *************** *** 116,120 **** return (false); } ! if (hashfunction (bs) != i) { --- 116,137 ---- return (false); } ! ! #ifdef flv10tables ! if (hashfunction (bs) != (**x).hashval) { ! ! if (flalert) ! shellinternalerror (idbadbucketliststring, "\x1b" "bad hashval in hash node"); ! ! return (false); ! } ! ! if (((**x).hashval % (**ht).ctbuckets) != i) { ! ! if (flalert) ! shellinternalerror (idbadbucketliststring, "\x1b" "bad hashval in bucket list"); ! ! return (false); ! } ! #else if (hashfunction (bs) != i) { *************** *** 124,127 **** --- 141,145 ---- return (false); } + #endif if (!gettablevariable ((**x).val, &hvariable, &errcode)) Index: langvalue.c =================================================================== RCS file: /cvsroot/frontierkernel/Frontier/Common/source/langvalue.c,v retrieving revision 1.5 retrieving revision 1.5.2.1 diff -C2 -d -r1.5 -r1.5.2.1 *** langvalue.c 31 Oct 2004 21:43:38 -0000 1.5 --- langvalue.c 10 Nov 2004 16:19:06 -0000 1.5.2.1 *************** *** 7609,7615 **** register hdlexternalvariable hv; ! for (i = 0; i < ctbuckets; i++) { ! x = (**ht).hashbucket [i]; while (x != nil) { /*chain through the hash list*/ --- 7609,7615 ---- register hdlexternalvariable hv; ! for (i = 0; i < gethashbucketcount (ht); i++) { ! x = nthhashbucket (ht, i); while (x != nil) { /*chain through the hash list*/ Index: langexternal.c =================================================================== RCS file: /cvsroot/frontierkernel/Frontier/Common/source/langexternal.c,v retrieving revision 1.3 retrieving revision 1.3.2.1 diff -C2 -d -r1.3 -r1.3.2.1 *** langexternal.c 31 Oct 2004 21:43:38 -0000 1.3 --- langexternal.c 10 Nov 2004 16:19:05 -0000 1.3.2.1 *************** *** 1516,1522 **** return (true); ! for (i = 0; i < ctbuckets; i++) { ! x = (**ht).hashbucket [i]; bucketCount = 0; --- 1516,1522 ---- return (true); ! for (i = 0; i < gethashbucketcount (ht); i++) { ! x = nthhashbucket (ht, i); bucketCount = 0; Index: tableops.c =================================================================== RCS file: /cvsroot/frontierkernel/Frontier/Common/source/tableops.c,v retrieving revision 1.3 retrieving revision 1.3.2.1 diff -C2 -d -r1.3 -r1.3.2.1 *** tableops.c 31 Oct 2004 20:41:10 -0000 1.3 --- tableops.c 10 Nov 2004 16:19:05 -0000 1.3.2.1 *************** *** 429,435 **** register hdlexternalvariable hv = nil; ! for (i = 0; i < ctbuckets; i++) { ! x = (**ht).hashbucket [i]; while (x != nil) { /*chain through the hash list*/ --- 429,435 ---- register hdlexternalvariable hv = nil; ! for (i = 0; i < gethashbucketcount (ht); i++) { ! x = nthhashbucket (ht, i); while (x != nil) { /*chain through the hash list*/ *************** *** 715,721 **** } ! for (i = 0; i < ctbuckets; i++) { ! x = (**ht).hashbucket [i]; while (x != nil) { /*chain through the hash list*/ --- 715,721 ---- } ! for (i = 0; i < gethashbucketcount (ht); i++) { ! x = nthhashbucket (ht, i); while (x != nil) { /*chain through the hash list*/ Index: langhash.c =================================================================== RCS file: /cvsroot/frontierkernel/Frontier/Common/source/langhash.c,v retrieving revision 1.4 retrieving revision 1.4.2.1 diff -C2 -d -r1.4 -r1.4.2.1 *** langhash.c 1 Nov 2004 11:50:17 -0000 1.4 --- langhash.c 10 Nov 2004 16:19:05 -0000 1.4.2.1 *************** *** 411,414 **** --- 411,420 ---- */ + #ifdef flv10tables + + hdlhashbucketarray hbuckets; + + #endif + if (hmagictable != nil) { *************** *** 431,434 **** --- 437,450 ---- short ct; + #ifdef flv10tables + + unsigned long ctbuckets = (**ht).ctbuckets; + + hbuckets = (**ht).hbuckets; + + assert (gethandlesize ((Handle) hbuckets) / sizeof (hdlhashnode) == ctbuckets); + + #endif + hfirstfreetable = (**hfirstfreetable).prevhashtable; *************** *** 439,442 **** --- 455,468 ---- (**ht).cttmpstack = ct; + #ifdef flv10tables + + clearhandle ((Handle) hbuckets); + + (**ht).hbuckets = hbuckets; + + (**ht).ctbuckets = ctbuckets; + + #endif + *htable = ht; *************** *** 448,452 **** --- 474,491 ---- (***htable).timecreated = timenow (); + + #ifdef flv10tables + + if (!newclearhandle (ctinitialbuckets * sizeof (hdlhashnode), (Handle *) &hbuckets)) { + disposehandle (*(Handle *) htable); + return (false); + } + (***htable).hbuckets = hbuckets; + + (***htable).ctbuckets = ctinitialbuckets; + + #endif + return (true); } /*newhashtable*/ *************** *** 892,900 **** (**ht).hfirstsort = nil; /*disconnect now so table is valid during disposal*/ ! for (i = 0; i < ctbuckets; i++) { ! nomad = (**ht).hashbucket [i]; ! (**ht).hashbucket [i] = nil; /*disconnect list so table is valid during disposal*/ while (nomad != nil) { --- 931,939 ---- (**ht).hfirstsort = nil; /*disconnect now so table is valid during disposal*/ ! for (i = 0; i < gethashbucketcount (ht); i++) { ! nomad = nthhashbucket (ht, i); ! nthhashbucket (ht, i) = nil; /*disconnect list so table is valid during disposal*/ while (nomad != nil) { *************** *** 1016,1045 **** ! short hashfunction (const bigstring bs) { ! ! /* ! 3.0.4b8 dmb: need to make locals unsigned to protect against ctype's int's ! */ ! // register unsigned short c; ! register unsigned short len; ! // register ptrstring p = (ptrstring) bs; ! register unsigned short val; ! len = stringlength (bs); ! ! if (len == 0) ! return (0); ! ! // c = p [1]; ! ! val = getlower(getstringcharacter(bs,0)); ! ! // c = p [len]; ! ! val += getlower(getstringcharacter(bs,len-1)); ! ! return (val % ctbuckets); ! } /*hashfunction*/ --- 1055,1119 ---- ! #ifdef flv10tables ! unsigned long hashfunction (const bigstring bs) { ! ! /* ! 2004-11-10 aradke: New hash function with wider spread, inspired by K&R "Programming in C". ! ! We loop from the end to the beginning of the string so that the multiplication ! will magnify the difference between two strings that differ only in the last ! position, e.g. consecutively numbered items. ! ! The return value is unsigned long because we expect to switch to a variable number ! of buckets on a per-table basis soon. When we get there, we will switch to returning ! hashval un-mod-ed, so it can be saved with the hashkey in the node and be re-used ! for when we need to re-bucket all items. ! */ ! register unsigned long hashval = 0; ! register ptrstring pend; ! register ptrstring p; ! ! pend = (ptrstring) bs; ! ! p = pend + stringlength (bs); ! ! while (p > pend) ! hashval = 31 * hashval + (unsigned long) getlower (*p--); ! ! return (hashval); ! } /*hashfunction*/ ! ! #else ! ! short hashfunction (const bigstring bs) { ! ! /* ! 3.0.4b8 dmb: need to make locals unsigned to protect against ctype's int's ! */ ! ! // register unsigned short c; ! register unsigned short len; ! // register ptrstring p = (ptrstring) bs; ! register unsigned short val; ! ! len = stringlength (bs); ! ! if (len == 0) ! return (0); ! ! // c = p [1]; ! ! val = getlower(getstringcharacter(bs,0)); ! ! // c = p [len]; ! ! val += getlower(getstringcharacter(bs,len-1)); ! ! return (val % ctbuckets); ! } /*hashfunction*/ ! ! #endif /*flv10tables*/ *************** *** 1135,1144 **** register short ixbucket; register hdlhashnode hnext; ixbucket = hashfunction ((**hn).hashkey); ! hnext = (**ht).hashbucket [ixbucket]; ! (**ht).hashbucket [ixbucket] = hnode; /*link new guy at head of list*/ (**hn).hashlink = hnext; --- 1209,1228 ---- register short ixbucket; register hdlhashnode hnext; + + #ifdef flv10tables + + assert ((**hn).hashval == hashfunction ((**hn).hashkey)); + ixbucket = (**hn).hashval % (**ht).ctbuckets; + + #else + ixbucket = hashfunction ((**hn).hashkey); + + #endif ! hnext = nthhashbucket (ht, ixbucket); ! nthhashbucket (ht, ixbucket) = hnode; /*link new guy at head of list*/ (**hn).hashlink = hnext; *************** *** 1188,1194 **** register hdlhashnode nomad, prev; ! for (i = 0; i < ctbuckets; i++) { ! nomad = (**htable).hashbucket [i]; prev = nil; --- 1272,1278 ---- register hdlhashnode nomad, prev; ! for (i = 0; i < gethashbucketcount (htable); i++) { ! nomad = nthhashbucket (htable, i); prev = nil; *************** *** 1210,1214 **** if (prev == nil) ! (**htable).hashbucket [i] = (**nomad).hashlink; else (**prev).hashlink = (**nomad).hashlink; --- 1294,1298 ---- if (prev == nil) ! nthhashbucket (htable, i) = (**nomad).hashlink; else (**prev).hashlink = (**nomad).hashlink; *************** *** 1225,1230 **** hashunlinknode (htable, hnode); ! copystring (bs, (**hnode).hashkey); hashlinknode (htable, hnode); --- 1309,1318 ---- hashunlinknode (htable, hnode); ! #ifdef flv10tables ! (**hnode).hashval = hashfunction (bs); /*keep in sync with hashkey*/ ! #endif + copystring (bs, (**hnode).hashkey); + hashlinknode (htable, hnode); *************** *** 1242,1245 **** --- 1330,1337 ---- return (false); + #ifdef flv10tables + (***hnode).hashval = hashfunction (bskey); + #endif + copystring (bskey, (***hnode).hashkey); *************** *** 1381,1385 **** --- 1473,1481 ---- */ + #ifdef flv10tables + ixbucket = hashfunction (bs) % (**currenthashtable).ctbuckets; + #else ixbucket = hashfunction (bs); + #endif //assert (currenthashtable != nil); *************** *** 1387,1391 **** //assert (validhandle ((Handle) currenthashtable)); ! nomad = (**currenthashtable).hashbucket [ixbucket]; nomadprev = nil; --- 1483,1487 ---- //assert (validhandle ((Handle) currenthashtable)); ! nomad = nthhashbucket (currenthashtable, ixbucket); nomadprev = nil; *************** *** 1427,1432 **** langsymbolunlinking (currenthashtable, hn); ! if (hprev == nil) ! (**currenthashtable).hashbucket [hashfunction (bs)] = (**hn).hashlink; else (**hprev).hashlink = (**hn).hashlink; --- 1523,1540 ---- langsymbolunlinking (currenthashtable, hn); ! if (hprev == nil) { ! ! #ifdef flv10tables ! ! assert ((**hn).hashval == hashfunction (bs)); ! ! nthhashbucket (currenthashtable, (**hn).hashval % (**currenthashtable).ctbuckets) = (**hn).hashlink; ! ! #else ! ! nthhashbucket (currenthashtable, hashfunction (bs)) = (**hn).hashlink; ! ! #endif ! } else (**hprev).hashlink = (**hn).hashlink; *************** *** 1474,1479 **** langsymbolunlinking (currenthashtable, hn); ! if (hprev == nil) ! (**currenthashtable).hashbucket [hashfunction (bs)] = (**hn).hashlink; else (**hprev).hashlink = (**hn).hashlink; --- 1582,1599 ---- langsymbolunlinking (currenthashtable, hn); ! if (hprev == nil) { ! ! #ifdef flv10tables ! ! assert ((**hn).hashval == hashfunction (bs)); ! ! nthhashbucket (currenthashtable, (**hn).hashval % (**currenthashtable).ctbuckets) = (**hn).hashlink; ! ! #else ! ! nthhashbucket (currenthashtable, hashfunction (bs)) = (**hn).hashlink; ! ! #endif ! } else (**hprev).hashlink = (**hn).hashlink; *************** *** 1981,1987 **** register short i; ! for (i = 0; i < ctbuckets; i++) { ! x = (**htable).hashbucket [i]; while (x != nil) { --- 2101,2107 ---- register short i; ! for (i = 0; i < gethashbucketcount (htable); i++) { ! x = nthhashbucket (htable, i); while (x != nil) { *************** *** 2129,2135 **** register short i; ! for (i = 0; i < ctbuckets; i++) { ! nomad = (**htable).hashbucket [i]; while (nomad != nil) { --- 2249,2255 ---- register short i; ! for (i = 0; i < gethashbucketcount (htable); i++) { ! nomad = nthhashbucket (htable, i); while (nomad != nil) { |
|
From: Andre R. <and...@us...> - 2004-11-10 16:18:41
|
Update of /cvsroot/frontierkernel/Frontier/Common/headers In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv25793 Modified Files: lang.h langinternal.h Log Message: First step towards an overhaul of the hashtable type: Switched to a hash function with a wider spread. Prepare for allocating and resizing the hash bucket array dynamically by caching the hash function result in each hash node and moving the hash bucket array out of the hash node handle and into its own handle. All significant changes ifdef'd for flv10tables, to be defined in frontierdefs.h. Index: lang.h =================================================================== RCS file: /cvsroot/frontierkernel/Frontier/Common/headers/lang.h,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** lang.h 31 Oct 2004 21:42:48 -0000 1.4 --- lang.h 10 Nov 2004 16:18:29 -0000 1.5 *************** *** 437,440 **** --- 437,446 ---- byte ctlocks: 8; + #ifdef flv10tables + + unsigned long hashval; /*2004-11-10 aradke: cache of hashfunction(hashkey)*/ + + #endif + byte hashkey []; /*the identifier of this table element, lives in extension of record*/ *************** *** 444,450 **** #define HNoNode ((hdlhashnode) -1) #define gethashkey(h,bs) copystring ((**h).hashkey, bs); ! #define ctbuckets 11 /*should be a prime number?*/ --- 450,474 ---- #define HNoNode ((hdlhashnode) -1) #define gethashkey(h,bs) copystring ((**h).hashkey, bs); + + #ifdef flv10tables ! #define ctinitialbuckets 11 ! ! typedef hdlhashnode **hdlhashbucketarray; ! ! #define nthhashbucket(ht,i) ((*((**(ht)).hbuckets))[i]) ! ! #define gethashbucketcount(ht) ((**(ht)).ctbuckets) ! ! #else ! ! #define ctbuckets 11 /*should be a prime number?*/ ! ! #define nthhashbucket(ht,i) ((**(ht)).hashbucket[i]) ! ! #define gethashbucketcount(ht) ctbuckets ! ! #endif *************** *** 454,459 **** typedef struct tyhashtable { ! hdlhashnode hashbucket [ctbuckets]; hdlhashnode hfirstsort; /*the alphabetically-first hash node*/ --- 478,493 ---- typedef struct tyhashtable { ! #ifdef flv10tables + unsigned long ctbuckets; + + hdlhashbucketarray hbuckets; + + #else + + hdlhashnode hashbucket [ctbuckets]; + + #endif + hdlhashnode hfirstsort; /*the alphabetically-first hash node*/ Index: langinternal.h =================================================================== RCS file: /cvsroot/frontierkernel/Frontier/Common/headers/langinternal.h,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** langinternal.h 28 Oct 2004 23:07:31 -0000 1.3 --- langinternal.h 10 Nov 2004 16:18:30 -0000 1.4 *************** *** 416,420 **** extern boolean hashflushcache (long *); /*langhash.h*/ ! extern short hashfunction (const bigstring); extern boolean hashresolvevalue (hdlhashtable, hdlhashnode); --- 416,424 ---- extern boolean hashflushcache (long *); /*langhash.h*/ ! #ifdef flv10tables ! extern unsigned long hashfunction (const bigstring); /* 2004-11-10 aradke */ ! #else ! extern short hashfunction (const bigstring); ! #endif extern boolean hashresolvevalue (hdlhashtable, hdlhashnode); |
|
From: Andre R. <and...@us...> - 2004-11-09 21:10:56
|
Update of /cvsroot/frontierkernel/Frontier/Common/source In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv5182 Modified Files: assert.c Log Message: Removed mention of UserLand bug report email address from assertion failure messages. Index: assert.c =================================================================== RCS file: /cvsroot/frontierkernel/Frontier/Common/source/assert.c,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** assert.c 1 Nov 2004 11:50:16 -0000 1.5 --- assert.c 9 Nov 2004 21:10:47 -0000 1.6 *************** *** 145,149 **** parsedialogstring ( ! "\p\r^0: Assertion failed in file ^1, at line ^2. Probably no big deal, but please tell fro...@us.... Thanks!\r", bslogstamp, bsfile, bsline, nil, bsmessage); --- 145,149 ---- parsedialogstring ( ! "\p\r^0: Assertion failed in file ^1, at line ^2.\r", bslogstamp, bsfile, bsline, nil, bsmessage); *************** *** 179,183 **** parsedialogstring ( ! "\pAssertion failed in file ^0, at line ^1. Probably no big deal, but please tell fro...@us.... Thanks!", bsfile, bsline, nil, nil, bsmessage); --- 179,183 ---- parsedialogstring ( ! "\pAssertion failed in file ^0, at line ^1.", bsfile, bsline, nil, nil, bsmessage); *************** *** 246,250 **** flnorentry = true; ! sprintf(buf,"Assertion failed in %s, at line %d.\n\nExpression: %s\n\nProbably no big deal, but please tell fro...@us.... Thanks!\n", file, line, expr); //releasethreadglobals (); /* 2002-11-10 AR: other threads should not continue running if we hit an assertion failure */ --- 246,250 ---- flnorentry = true; ! sprintf(buf,"Assertion failed in %s, at line %d.\n\nExpression: %s\n\n", file, line, expr); //releasethreadglobals (); /* 2002-11-10 AR: other threads should not continue running if we hit an assertion failure */ |
|
From: Andre R. <and...@us...> - 2004-11-09 20:36:19
|
Update of /cvsroot/frontierkernel/Frontier/build_XCode/Frontier.xcode In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29113 Modified Files: project.pbxproj Log Message: Minor reorganization of file groups in project: Removed Imported Files group. Added Include Files (now sorted) and Yacc Files groups. Index: project.pbxproj =================================================================== RCS file: /cvsroot/frontierkernel/Frontier/build_XCode/Frontier.xcode/project.pbxproj,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** project.pbxproj 1 Nov 2004 13:16:18 -0000 1.12 --- project.pbxproj 9 Nov 2004 20:36:09 -0000 1.13 *************** *** 8,12 **** 6515255C072BFC6500411831 = { children = ( - BB3B83610730603C0049D0C1, 6515256C072BFC6700411831, 65152571072BFC6700411831, --- 8,11 ---- *************** *** 32,38 **** 65152686072BFC6800411831, 65152696072BFC6800411831, [...3985 lines suppressed...] ! sourceTree = "<absolute>"; }; 65BBB662072E563B008E2F34 = { *************** *** 8134,8140 **** lastKnownFileType = sourcecode.c.h; name = frontierdefs.h; ! path = ../Common/headers/frontierdefs.h; ! refType = 2; ! sourceTree = SOURCE_ROOT; }; 65BBB664072E5643008E2F34 = { --- 8111,8117 ---- lastKnownFileType = sourcecode.c.h; name = frontierdefs.h; ! path = /Volumes/Data/Development/frontierkernel/Frontier/Common/headers/frontierdefs.h; ! refType = 0; ! sourceTree = "<absolute>"; }; 65BBB664072E5643008E2F34 = { |
|
From: Andre R. <and...@us...> - 2004-11-09 20:33:16
|
Update of /cvsroot/frontierkernel/Frontier/Common/source In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv28441 Modified Files: langverbs.c Log Message: Calling any of the DLL verbs currently crashes the Mach-O build of the Carbon version, so disable them and report an error instead. Index: langverbs.c =================================================================== RCS file: /cvsroot/frontierkernel/Frontier/Common/source/langverbs.c,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** langverbs.c 31 Oct 2004 18:48:51 -0000 1.4 --- langverbs.c 9 Nov 2004 20:33:06 -0000 1.5 *************** *** 3142,3145 **** --- 3142,3151 ---- return (callscriptverb (hparam1, v)); + #if defined(WIN95VERSION) || (defined(MACVERSION) && !TARGET_RT_MAC_MACHO) + /* + 2004-11-09 aradke: calling DLLs through the Code Fragment Manager (CFM) + doesn't work yet on Carbon/Mach-O. throw an error instead of crashing. + */ + case dllcallfunc: case calldllfunc: /* this is remaining for historical usage per Dave. rab: 5.0b4 1/6/98 */ *************** *** 3154,3158 **** case dllisloadedfunc: return (dllisloadedverb (hparam1, v)); ! case packwindowfunc: return (langpackwindowverb (hparam1, v)); --- 3160,3165 ---- case dllisloadedfunc: return (dllisloadedverb (hparam1, v)); ! #endif ! case packwindowfunc: return (langpackwindowverb (hparam1, v)); |
|
From: Andre R. <and...@us...> - 2004-11-09 08:56:04
|
Update of /cvsroot/frontierkernel/Frontier/Common/source In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv14161 Modified Files: tablecompare.c Log Message: In tablecomparenames, call compareidentifiers which does an in-place case-insensitive compare. This is much faster than copying both key strings, converting both copies completely to lowercase, and running a case-sensitive compare on the resulting lowercase strings. Index: tablecompare.c =================================================================== RCS file: /cvsroot/frontierkernel/Frontier/Common/source/tablecompare.c,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** tablecompare.c 31 Oct 2004 20:41:10 -0000 1.3 --- tablecompare.c 9 Nov 2004 08:55:55 -0000 1.4 *************** *** 37,41 **** --- 37,51 ---- static short tablecomparenames (hdlhashnode hnode1, hdlhashnode hnode2) { + + /* + 2004-11-09 aradke: optimized by calling compareidentifiers which does + an in-place case-insensitive compare instead of copying both key strings, + converting both copies completely to lowercase, and running a case-sensitive + compare on the resulting lowercase strings. + */ + return (compareidentifiers ((**hnode1).hashkey, (**hnode2).hashkey)); + + /* bigstring bs1, bs2; *************** *** 44,52 **** gethashkey (hnode2, bs2); ! alllower (bs1); /*comparison is unicase*/ alllower (bs2); return (comparestrings (bs1, bs2)); } /*tablecomparenames*/ --- 54,63 ---- gethashkey (hnode2, bs2); ! alllower (bs1); /%comparison is unicase%/ alllower (bs2); return (comparestrings (bs1, bs2)); + */ } /*tablecomparenames*/ |
|
From: Andre R. <and...@us...> - 2004-11-09 08:54:23
|
Update of /cvsroot/frontierkernel/Frontier/Common/headers In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv13992 Modified Files: strings.h Log Message: Added compareidentifiers which compares the input strings case-insensitively and returns -1, 0, or +1 as the result. Useful for maintaining the sort order of tables. Index: strings.h =================================================================== RCS file: /cvsroot/frontierkernel/Frontier/Common/headers/strings.h,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** strings.h 28 Oct 2004 22:32:16 -0000 1.4 --- strings.h 9 Nov 2004 08:54:14 -0000 1.5 *************** *** 59,62 **** --- 59,64 ---- extern short comparestrings (bigstring, bigstring); + extern short compareidentifiers (bigstring, bigstring); + extern boolean stringlessthan (bigstring, bigstring); |
|
From: Andre R. <and...@us...> - 2004-11-09 08:54:09
|
Update of /cvsroot/frontierkernel/Frontier/Common/source In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv13913 Modified Files: strings.c Log Message: Added compareidentifiers which compares the input strings case-insensitively and returns -1, 0, or +1 as the result. Useful for maintaining the sort order of tables. Index: strings.c =================================================================== RCS file: /cvsroot/frontierkernel/Frontier/Common/source/strings.c,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** strings.c 28 Oct 2004 17:22:04 -0000 1.4 --- strings.c 9 Nov 2004 08:54:00 -0000 1.5 *************** *** 204,207 **** --- 204,231 ---- #endif + + short compareidentifiers (bigstring bs1, bigstring bs2) { + + /* + 2004-11-09 aradke: cross between comparestrings and equalidentifiers, + useful for sorting identifiers. + + return zero if the two strings (pascal type, with length-byte) are + equal. return -1 if bs1 is less than bs2, or +1 if bs1 is greater than + bs2. the comparison is not case-sensitive. + */ + + register short n = min (stringlength (bs1), stringlength (bs2)) + 1; + register ptrbyte p1 = (ptrbyte) stringbaseaddress (bs1); + register ptrbyte p2 = (ptrbyte) stringbaseaddress (bs2); + + while (--n) + if (getlower (*p1++) != getlower (*p2++)) + return ((getlower (*--p1) < getlower (*--p2)) ? -1 : +1); /*rewind*/ + + return (sgn (stringlength (bs1) - stringlength (bs2))); + } /*compareidentifiers*/ + + boolean stringlessthan (register bigstring bs1, register bigstring bs2) { |
|
From: Andre R. <and...@us...> - 2004-11-04 21:57:04
|
Update of /cvsroot/frontierkernel/Frontier/Common/source In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv22310 Modified Files: lang.c opverbs.c Log Message: Minor optimization in langrunscriptcode: If the UserTalk script to be called doesn't take any parameters, it's okay to pass in nil for the parameter list. opvisitallverb takes advantage of this optimization. Index: opverbs.c =================================================================== RCS file: /cvsroot/frontierkernel/Frontier/Common/source/opverbs.c,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** opverbs.c 31 Oct 2004 21:43:38 -0000 1.3 --- opverbs.c 4 Nov 2004 21:56:39 -0000 1.4 *************** *** 2775,2793 **** static boolean opvisitallvisit (hdlheadrecord hnode, ptrvoid bsscriptname) { ! //static boolean opvisitallvisit (hdlheadrecord hnode, tyvaluerecord val) { /* 7.0b17 PBS: visit every headline in an outline, calling a callback script for each. It's a wrapper for opvisiteverything. */ ! tyvaluerecord vreturned, vparams; ! hdllistrecord hlist; ! if (!opnewlist (&hlist, false)) /*create a list*/ return (false); if (!setheapvalue ((Handle) hlist, listvaluetype, &vparams)) return (false); oppushoutline (outlinedata); --- 2775,2801 ---- static boolean opvisitallvisit (hdlheadrecord hnode, ptrvoid bsscriptname) { ! /* 7.0b17 PBS: visit every headline in an outline, calling a callback script for each. It's a wrapper for opvisiteverything. + + 2004-11-03 aradke: Take advantage of langrunscript now accepting + a nil pointer if the script doesn't take any parameters. + We don't need to create an empty list anymore. */ ! tyvaluerecord vreturned; ! /* ! tyvaluerecord vparams; ! hdllistrecord hlist; ! ! if (!opnewlist (&hlist, false)) /%create a list%/ return (false); if (!setheapvalue ((Handle) hlist, listvaluetype, &vparams)) return (false); + */ oppushoutline (outlinedata); *************** *** 2797,2801 **** (**outlinedata).flwindowopen = true; ! langrunscript (bsscriptname, &vparams, nil, &vreturned); oppopoutline (); --- 2805,2809 ---- (**outlinedata).flwindowopen = true; ! langrunscript (bsscriptname, nil, nil, &vreturned); oppopoutline (); Index: lang.c =================================================================== RCS file: /cvsroot/frontierkernel/Frontier/Common/source/lang.c,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** lang.c 1 Nov 2004 11:50:17 -0000 1.3 --- lang.c 4 Nov 2004 21:56:39 -0000 1.4 *************** *** 1335,1339 **** boolean flpushedroot; register boolean fl = false; ! if ((*listval).valuetype == recordvaluetype) /*7.0b41 PBS: build named param list if a record*/ return (langbuildnamedparamlist (listval, hparams)); --- 1335,1339 ---- boolean flpushedroot; register boolean fl = false; ! if ((*listval).valuetype == recordvaluetype) /*7.0b41 PBS: build named param list if a record*/ return (langbuildnamedparamlist (listval, hparams)); *************** *** 1383,1386 **** --- 1383,1389 ---- /* 02/04/02 dmb: the guts of langrunscript + + 2004-11-03 aradke: Accept nil for vparams, meaning the function + doesn't take any parameters, so we simply bypass langbuildparamlist. */ *************** *** 1389,1393 **** tyvaluerecord val; hdltreenode hfunctioncall; ! hdltreenode hparamlist; boolean fltmpval; --- 1392,1396 ---- tyvaluerecord val; hdltreenode hfunctioncall; ! hdltreenode hparamlist = nil; boolean fltmpval; *************** *** 1401,1429 **** pushhashtable (hcontext); */ ! if (hcontext != nil) { ! ! flchained = (**hcontext).flchained; ! ! if (flchained) ! pushhashtable (hcontext); ! else ! chainhashtable (hcontext); /*establishes outer local context*/ ! } ! ! fl = langbuildparamlist (vparams, &hparamlist); ! ! if (hcontext != nil) { ! if (flchained) ! pophashtable (); ! else ! unchainhashtable (); ! } ! ! if (!fl) { ! langdisposetree (hfunctioncall); ! goto exit; } --- 1404,1435 ---- pushhashtable (hcontext); */ ! flchained = (hcontext != nil) && (**hcontext).flchained; ! ! if (vparams != nil) { ! ! if (hcontext != nil) { ! ! if (flchained) ! pushhashtable (hcontext); ! else ! chainhashtable (hcontext); /*establishes outer local context*/ ! } ! fl = langbuildparamlist (vparams, &hparamlist); ! if (hcontext != nil) { ! ! if (flchained) ! pophashtable (); ! else ! unchainhashtable (); ! } ! if (!fl) { ! ! langdisposetree (hfunctioncall); ! ! goto exit; ! } } |
|
From: Andre R. <and...@us...> - 2004-11-04 21:13:02
|
Update of /cvsroot/frontierkernel/Frontier/Common/source In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11877/Common/source Modified Files: fileloop.c langlist.c oplist.c shellbuttons.c Log Message: Moved definition of tylistrecord from oplist.h to oplist.c to make it opaque to all users. Added opgetisrecord, opsetisrecord, opsetreleaseitemcallback, and oplistvisit functions. Adapted users to use new accessor functions instead of accessing a list record directly. All this is in preparation for eventually replacing the implementations of the list and record data types. (Still to be discussed.) Index: oplist.c =================================================================== RCS file: /cvsroot/frontierkernel/Frontier/Common/source/oplist.c,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** oplist.c 1 Nov 2004 11:50:16 -0000 1.4 --- oplist.c 4 Nov 2004 21:12:51 -0000 1.5 *************** *** 68,71 **** --- 68,83 ---- + typedef struct tylistrecord { + + struct tyoutlinerecord ** houtline; /*the list is stored in an outline*/ + + long ctitems; /*number of items in the list, can be gotten without traversal*/ + + boolean isrecord; /*do items have names?*/ + + oplistreleaseitemcallback releaseitemcallback; /*routine that releases one of **your** handles*/ + } tylistrecord; + + typedef struct tydisklistrecord { *************** *** 490,493 **** --- 502,539 ---- + boolean opgetisrecord (hdllistrecord hlist) { + + /* + 2004-11-04 aradke: accessor function. + */ + + return ((**hlist).isrecord); + } /*oplistisrecord*/ + + + void opsetisrecord (hdllistrecord hlist, boolean flisrecord) { + + /* + 2004-11-04 aradke: accessor function. + */ + + (**hlist).isrecord = flisrecord; + } /*oplistisrecord*/ + + + oplistreleaseitemcallback opsetreleaseitemcallback (hdllistrecord hlist, oplistreleaseitemcallback cb) { + + /* + 2004-11-04 aradke: accessor function. set the callback and return previous callback. + */ + + oplistreleaseitemcallback oldcb = (**hlist).releaseitemcallback; + + (**hlist).releaseitemcallback = cb; + + return (oldcb); + } /*opsetreleaseitemcallback*/ + + static boolean opdeletelistnode (hdloutlinerecord ho, hdlheadrecord hdelete) { *************** *** 795,797 **** --- 841,875 ---- + boolean opvisitlist (hdllistrecord hlist, opvisitlistcallback visit, ptrvoid refcon) { + + /* + 2004-11-04 aradke: Visit all items in a list without recursion. + The callback should return false to break out of the loop. + */ + + hdloutlinerecord ho; + register hdlheadrecord nomad, nextnomad; + bigstring bskey; + + ho = (hdloutlinerecord) (**hlist).houtline; + + nomad = (**ho).hsummit; + + while (true) { + + nextnomad = (**nomad).headlinkdown; + + opgetheadstring (nomad, bskey); + + if (!(*visit) ((**nomad).hrefcon, bskey, refcon)) + return (false); + + if (nextnomad == nomad) + break; + + nomad = nextnomad; + } /*while*/ + + return (true); + } /*opvisitlist*/ Index: shellbuttons.c =================================================================== RCS file: /cvsroot/frontierkernel/Frontier/Common/source/shellbuttons.c,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** shellbuttons.c 1 Nov 2004 11:50:16 -0000 1.4 --- shellbuttons.c 4 Nov 2004 21:12:51 -0000 1.5 *************** *** 89,93 **** return (0L); ! return ((**buttonlist).ctitems); } /*shellgetbuttonlistcount*/ --- 89,93 ---- return (0L); ! return (opcountlistitems (buttonlist)); } /*shellgetbuttonlistcount*/ *************** *** 513,516 **** --- 513,517 ---- Rect r; short i; + short ctbuttons; //buttonlist = (hdllistrecord) shellglobals.buttonlist; *************** *** 549,553 **** #endif ! for (i = 1; i <= (**buttonlist).ctitems; i++) shelldrawbutton (i, false); --- 550,556 ---- #endif ! ctbuttons = opcountlistitems (buttonlist); ! ! for (i = 1; i <= ctbuttons; i++) shelldrawbutton (i, false); Index: fileloop.c =================================================================== RCS file: /cvsroot/frontierkernel/Frontier/Common/source/fileloop.c,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** fileloop.c 23 Oct 2004 22:18:13 -0000 1.2 --- fileloop.c 4 Nov 2004 21:12:51 -0000 1.3 *************** *** 98,102 **** (**h).hfilelist = hlist; ! (**hlist).releaseitemcallback = &fileloopreleaseitem; ix = 1; /*start with file index 1*/ --- 98,102 ---- (**h).hfilelist = hlist; ! opsetreleaseitemcallback (hlist, &fileloopreleaseitem); ix = 1; /*start with file index 1*/ *************** *** 243,247 **** (**h).hfilelist = hlist; ! (**hlist).releaseitemcallback = &fileloopreleaseitem; ix = 1; /*start with file index 1*/ --- 243,247 ---- (**h).hfilelist = hlist; ! opsetreleaseitemcallback (hlist, &fileloopreleaseitem); ix = 1; /*start with file index 1*/ Index: langlist.c =================================================================== RCS file: /cvsroot/frontierkernel/Frontier/Common/source/langlist.c,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** langlist.c 1 Nov 2004 11:50:17 -0000 1.5 --- langlist.c 4 Nov 2004 21:12:51 -0000 1.6 *************** *** 297,300 **** --- 297,301 ---- bigstring bs; Handle hstring; + boolean flisrecord = opgetisrecord (hlist); n = opcountlistitems (hlist); *************** *** 308,312 **** goto error; ! if ((**hlist).isrecord) { langdeparsestring (key, chdoublequote); /*add needed escape sequences*/ --- 309,313 ---- goto error; ! if (flisrecord) { langdeparsestring (key, chdoublequote); /*add needed escape sequences*/ *************** *** 737,741 **** case listvaluetype: ! (**hlist).isrecord = false; return (true); --- 738,742 ---- case listvaluetype: ! opsetisrecord (hlist, false); return (true); *************** *** 907,911 **** n = opcountlistitems ((*v2).data.listvalue); ! if ( (m > n) || (**(*v2).data.listvalue).isrecord ) { /* Either the first list is longer than the second: append to the first, or we are adding records so we want to --- 908,912 ---- n = opcountlistitems ((*v2).data.listvalue); ! if ( (m > n) || opgetisrecord ((*v2).data.listvalue) ) { /* Either the first list is longer than the second: append to the first, or we are adding records so we want to *************** *** 926,930 **** return (false); ! if ((**list3).isrecord) { /* discard duplicate keys */ if (opgetlisthandle (list3, -1, key, &hignore)) --- 927,931 ---- return (false); ! if (opgetisrecord (list3)) { /* discard duplicate keys */ if (opgetlisthandle (list3, -1, key, &hignore)) *************** *** 991,995 **** n2 = opcountlistitems (list2); ! if ((**list3).isrecord) { for (ix1 = 1; ix1 <= n2; ++ix1) { /*delete values that appear in second record*/ --- 992,996 ---- n2 = opcountlistitems (list2); ! if (opgetisrecord (list3)) { for (ix1 = 1; ix1 <= n2; ++ix1) { /*delete values that appear in second record*/ *************** *** 1052,1056 **** goto exit; ! flbykey = (**list1).isrecord; switch (comparisonop) { --- 1053,1057 ---- goto exit; ! flbykey = opgetisrecord (list1); switch (comparisonop) { *************** *** 1237,1277 **** ! boolean langvisitlistvalues (tyvaluerecord *vlist, langvisitlistvaluescallback visit, ptrvoid refcon) { /* ! 2003-04-28 AR: Visit all items in a list without recursion. */ - - hdllistrecord hlist = (hdllistrecord) (*vlist).data.binaryvalue; - hdloutlinerecord ho; - register hdlheadrecord nomad, nextnomad; - tyvaluerecord v; - boolean fl; ! ho = (hdloutlinerecord) (**hlist).houtline; ! ! nomad = (**ho).hsummit; ! while (true) { ! nextnomad = (**nomad).headlinkdown; ! if (!langunpackvalue ((**nomad).hrefcon, &v)) ! return (false); ! ! fl = visit (&v, refcon); ! ! disposevaluerecord (v, true); ! ! if (!fl) ! return (false); ! ! if (nextnomad == nomad) ! break; ! ! nomad = nextnomad; ! } /*while*/ ! return (true); } /*langvisitlistvalues*/ --- 1238,1281 ---- ! typedef struct tylangvisitlistinfo { ! ptrvoid refcon; ! langvisitlistvaluescallback visit; ! } tylangvisitlistinfo; ! ! ! static boolean langvisitlistvaluesvisit (Handle hdata, ptrstring bskey, ptrvoid refcon) { /* ! 2004-11-04 aradke: helper for langvisitlistvalues, called from opvisitlist. */ ! tylangvisitlistinfo *info = (tylangvisitlistinfo *) refcon; ! tyvaluerecord val; ! boolean fl; ! if (!langunpackvalue (hdata, &val)) ! return (false); ! fl = (*info).visit (&val, (*info).refcon); ! disposevaluerecord (val, true); ! return (fl); ! } /*langvisitlistvaluesvisit*/ ! ! ! boolean langvisitlistvalues (tyvaluerecord *vlist, langvisitlistvaluescallback visit, ptrvoid refcon) { ! ! /* ! 2004-11-04 aradke: rewritten to use opvisitlist, called from langregexp.c. ! */ ! ! hdllistrecord hlist = (hdllistrecord) (*vlist).data.binaryvalue; ! tylangvisitlistinfo info; ! ! info.refcon = refcon; ! info.visit = visit; ! ! return (opvisitlist (hlist, &langvisitlistvaluesvisit, &info)); } /*langvisitlistvalues*/ |
|
From: Andre R. <and...@us...> - 2004-11-04 21:13:01
|
Update of /cvsroot/frontierkernel/Frontier/Common/headers In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11877/Common/headers Modified Files: oplist.h Log Message: Moved definition of tylistrecord from oplist.h to oplist.c to make it opaque to all users. Added opgetisrecord, opsetisrecord, opsetreleaseitemcallback, and oplistvisit functions. Adapted users to use new accessor functions instead of accessing a list record directly. All this is in preparation for eventually replacing the implementations of the list and record data types. (Still to be discussed.) Index: oplist.h =================================================================== RCS file: /cvsroot/frontierkernel/Frontier/Common/headers/oplist.h,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** oplist.h 29 Oct 2004 09:02:16 -0000 1.2 --- oplist.h 4 Nov 2004 21:12:51 -0000 1.3 *************** *** 34,48 **** ! typedef struct tylistrecord { ! ! struct tyoutlinerecord ** houtline; /*the list is stored in an outline*/ ! ! long ctitems; /*number of items in the list, can be gotten without traversal*/ ! boolean isrecord; /*do items have names?*/ ! ! boolean (*releaseitemcallback) (Handle); /*routine that releases one of **your** handles*/ ! } tylistrecord, *ptrlistrecord, **hdllistrecord; --- 34,44 ---- + /*types*/ ! typedef struct tylistrecord **hdllistrecord; /* 2004-11-04 aradke: now opaque */ ! typedef boolean (*oplistreleaseitemcallback) (Handle); /* 2004-11-04 aradke: part of tylistrecord */ ! ! typedef boolean (*opvisitlistcallback) (Handle, ptrstring, ptrvoid); /* 2004-11-04 aradke */ *************** *** 73,76 **** --- 69,78 ---- extern long opcountlistitems (hdllistrecord); + extern boolean opgetisrecord (hdllistrecord); /* 2004-11-04 aradke */ + + extern void opsetisrecord (hdllistrecord hlist, boolean flisrecord); /* 2004-11-04 aradke */ + + extern oplistreleaseitemcallback opsetreleaseitemcallback (hdllistrecord, oplistreleaseitemcallback); /* 2004-11-04 aradke */ + extern boolean opdeletelistitem (hdllistrecord, long, ptrstring); *************** *** 83,87 **** extern boolean oploadstringlist (short, hdllistrecord *); ! ! --- 85,88 ---- extern boolean oploadstringlist (short, hdllistrecord *); ! extern boolean opvisitlist (hdllistrecord, opvisitlistcallback, ptrvoid); /* 2004-11-04 aradke */ |
|
From: Andre R. <and...@us...> - 2004-11-03 21:45:34
|
Update of /cvsroot/frontierkernel/Frontier/Common/headers In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv17058 Modified Files: versions.h Log Message: Bump version number to 10.0a2. Index: versions.h =================================================================== RCS file: /cvsroot/frontierkernel/Frontier/Common/headers/versions.h,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** versions.h 9 Oct 2004 21:11:57 -0000 1.1 --- versions.h 3 Nov 2004 21:45:22 -0000 1.2 *************** *** 55,62 **** #define frontier_stage_code 0x40 /* dev = 0x20, alpha = 0x40, beta = 0x60, final = 0x80 */ ! #define frontier_revision_level 1 /* for non-final releases only */ ! #define frontier_build_number 1 /* increment by one for every release, final or not */ ! #define frontier_version_string "10.0a1" --- 55,62 ---- #define frontier_stage_code 0x40 /* dev = 0x20, alpha = 0x40, beta = 0x60, final = 0x80 */ ! #define frontier_revision_level 2 /* for non-final releases only */ ! #define frontier_build_number 2 /* increment by one for every release, final or not */ ! #define frontier_version_string "10.0a2" |