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: creedon <icr...@us...> - 2006-01-31 20:18:22
|
Update of /cvsroot/frontierkernel/odbs/mainResponderRoot/mainResponder/data In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv28728 Modified Files: featureListRssUrl Log Message: new url Index: featureListRssUrl =================================================================== RCS file: /cvsroot/frontierkernel/odbs/mainResponderRoot/mainResponder/data/featureListRssUrl,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** featureListRssUrl 26 Mar 2005 21:45:32 -0000 1.1.1.1 --- featureListRssUrl 31 Jan 2006 20:18:11 -0000 1.2 *************** *** 1,3 **** FrontierVcsFile:1:TEXT:mainResponder.data.featureListRssUrl ! http://updates.userland.com/newsItems/departments/manila.xml \ No newline at end of file --- 1,3 ---- FrontierVcsFile:1:TEXT:mainResponder.data.featureListRssUrl ! http://www.frontierOpenSource.editHere.com/xml/rss.xml \ No newline at end of file |
|
From: creedon <icr...@us...> - 2006-01-31 20:14:33
|
Update of /cvsroot/frontierkernel/odbs/frontierRoot/system/verbs/builtins/rootUpdates In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv27093 Modified Files: getPendingUpdatesList Log Message: added categories parameter replaced referrer url with baseUrl and ip information Index: getPendingUpdatesList =================================================================== RCS file: /cvsroot/frontierkernel/odbs/frontierRoot/system/verbs/builtins/rootUpdates/getPendingUpdatesList,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** getPendingUpdatesList 26 Mar 2005 19:43:26 -0000 1.1.1.1 --- getPendingUpdatesList 31 Jan 2006 20:14:24 -0000 1.2 *************** *** 1,3 **** FrontierVcsFile:1:scpt:system.verbs.builtins.rootUpdates.getPendingUpdatesList ! on getPendingUpdatesList (adrUpdatesTable, rssUrl, databasesToUpdate) { ÇChanges Ç8/5/04; 11:09:35 PM by JES ÇChange initial whenLastUpdatesRead date to 8/4/04. Ç12/17/03; 1:34:37 AM by JES ÇCreated. Read the RSS fead that lists pending root updates. local (flRead = false); if not defined (adrUpdatesTable^) { new (tableType, adrUpdatesTable)}; if not defined (adrUpdatesTable^.pendingUpdates) { new (tableType, @adrUpdatesTable^.pendingUpdates)}; if not defined (adrUpdatesTable^.whenLastUpdatesRead) { adrUpdatesTable^.whenLastUpdatesRead = date.set (4, 8, 2004, 0, 0, 0)}; if adrUpdatesTable^.whenLastUpdatesRead < date.yesterday (clock.now ()) { //read up to once every 24 hours flRead = true}; if flRead { //read the feature list RSS feed, and populate the pendingUpdates table adrUpdatesTable^.whenLastUpdatesRead = clock.now (); bundle { //read the updates into the pendingUpdates table local (services); new (tableType, @services); //a spoofed temporary services table new (tableType, @services.[rssUrl]); on storyArrivedCallback (adrservice, adrstory) { adrUpdatesTable^.pendingUpdates.[nameOf (adrstory^)] = adrstory^}; new (tableType, @adrUpdatesTable^.pendingUpdates); bundle { //read the RSS feed using xml.rss.readService xml.rss.readService (rssUrl, @services, "http://frontier.userland.com/howToUpdate?hash=" + string.hashmd5 (user.prefs.serialNumber), @storyArrivedCallback, true)}}}; bundle { //delete any updates that we already have local (db, lastUpdate); for db in databasesToUpdate { //get lowest update date -- lowest common denominator try { local (adrprefs = @user.rootUpdates.servers.[db]); if typeOf (lastUpdate) == unknownType { lastUpdate = date (adrprefs^.lastUpdate)} else { if date (adrprefs^.lastUpdate) < lastUpdate { lastUpdate = date (adrprefs^.lastUpdate)}}}}; local (ctupdates = sizeOf (adrUpdatesTable^.pendingUpdates), i); for i = ctupdates downto 1 { //delete updates before lastUpdate local (adr = @adrUpdatesTable^.pendingUpdates[i]); if date (adr^.data.pubDate) < lastUpdate { delete (adr)}}}; return (sizeOf (adrUpdatesTable^.pendingUpdates))} \ No newline at end of file --- 1,3 ---- FrontierVcsFile:1:scpt:system.verbs.builtins.rootUpdates.getPendingUpdatesList ! on getPendingUpdatesList (adrUpdatesTable, rssUrl, databasesToUpdate, categories = nil) { ÇChanges Ç1/28/06; 7:21:26 PM by TAC Çadded categories parameter Çreplaced referrer url with baseUrl and ip information Ç8/5/04; 11:09:35 PM by JES ÇChange initial whenLastUpdatesRead date to 8/4/04. Ç12/17/03; 1:34:37 AM by JES ÇCreated. Read the RSS fead that lists pending root updates. local (flRead = false); if not defined (adrUpdatesTable^) { new (tableType, adrUpdatesTable)}; if not defined (adrUpdatesTable^.pendingUpdates) { new (tableType, @adrUpdatesTable^.pendingUpdates)}; if not defined (adrUpdatesTable^.whenLastUpdatesRead) { adrUpdatesTable^.whenLastUpdatesRead = date.set (4, 8, 2004, 0, 0, 0)}; if adrUpdatesTable^.whenLastUpdatesRead < date.yesterday (clock.now ()) { //read up to once every 24 hours flRead = true}; if flRead { //read the feature list RSS feed, and populate the pendingUpdates table adrUpdatesTable^.whenLastUpdatesRead = clock.now (); bundle { //read the updates into the pendingUpdates table local (services); new (tableType, @services); //a spoofed temporary services table new (tableType, @services.[rssUrl]); on storyArrivedCallback (adrservice, adrstory) { adrUpdatesTable^.pendingUpdates.[nameOf (adrstory^)] = adrstory^}; new (tableType, @adrUpdatesTable^.pendingUpdates); bundle { //read the RSS feed using xml.rss.readService xml.rss.readService (rssUrl, @services, config.mainresponder.prefs.baseUrl + "?ip=" + tcp.myDottedID (), @storyArrivedCallback, true)}}}; bundle { //delete any updates that we already have local (db, lastUpdate); for db in databasesToUpdate { //get lowest update date -- lowest common denominator try { local (adrprefs = @user.rootUpdates.servers.[db]); if typeOf (lastUpdate) == unknownType { lastUpdate = date (adrprefs^.lastUpdate)} else { if date (adrprefs^.lastUpdate) < lastUpdate { lastUpdate = date (adrprefs^.lastUpdate)}}}}; local (ctUpdates = sizeOf (adrUpdatesTable^.pendingUpdates), i); for i = ctUpdates downto 1 { //delete updates before lastUpdate or that don't match categories local (adr = @adrUpdatesTable^.pendingUpdates [i]); if date (adr^.data.pubDate) < lastUpdate { delete (adr)}; if typeOf (categories) == listType { local (fl = true, item); for item in categories { if adr^.catlist contains item { fl = false; break}}; if fl { delete (adr)}}}}; return (sizeOf (adrUpdatesTable^.pendingUpdates))} \ No newline at end of file |
|
From: creedon <icr...@us...> - 2006-01-31 20:12:34
|
Update of /cvsroot/frontierkernel/odbs/frontierRoot/system/callbacks In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv26303 Modified Files: cmd2Click Log Message: if name is "date" most certainly the user wants to see the system.verbs.builtins.date table, not system.verbs.globals.date Index: cmd2Click =================================================================== RCS file: /cvsroot/frontierkernel/odbs/frontierRoot/system/callbacks/cmd2Click,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** cmd2Click 17 Jan 2006 23:17:50 -0000 1.3 --- cmd2Click 31 Jan 2006 20:12:24 -0000 1.4 *************** *** 1,3 **** FrontierVcsFile:1:scpt:system.callbacks.cmd2Click ! on cmd2Click (name) { ÇChanges Ç1/17/06; 10:35:24 AM by TAC Çif name is string most certainly the user wants to see the system.verbs.builtins.string table, not system.verbs.globals.string Ç6/18/05; 1:34:38 PM by TAC Çuse Frontier.createUserCallbacksSubtable to initialize tables Ç4/20/01; 4:05:40 PM by JES ÇAllow callbacks to be addresses or addresses of addresses... ÇTue, Oct 7, 1997 at 11:37:49 AM by PBS ÇNew callbacks for cmd2click. Callback script returns true if it handled the click, then this script immediately returns true. Otherwise, this script handles the click. ÇWed, Dec 11, 1996 at 11:16:00 PM by DW Ç4.2, handles macros in web pages Ç8/15/96 by dmb Ç integrated ssl's "enhanced2click" functionality Ç3/19/96 by ssl Çmoved checkWith etc. to enhanced2click table to simplify distribution Ç6/17/95 by ssl Çadded support for local scripts (via checkScript) Çssl change notes Çenhanced to walk up the script/outline hierarchy and check every "with" path in an outline window, assume it's a oneLiner Çadded support for reserved constants, keywords & builtins Çchanges are Pioneerware by Scott S. Lawton ÇInternet: ss...@pr..., http://www.tiac.net/prefab/ Çcalled when you cmd-double-click on an identifier ÇIt enhances the default, built-in behavior of jumping to the named object. ÇIt checks for the option key, and closes the front window if it's pressed. ÇIf the name is a file rather than a db object, it will reveal it in the Finder on checkWith (name, callbackAction) { Çwalk up the script/outline hierarchy checking in "with" for a match: "table.[name]" Çcalled by my cmd2click, control2click ÇPioneerware by Scott S. Lawton Çrevisions Ç6/13/96: handle menuscripts Ç5/16/96: now handle an "object database map" Ç3/19/96: moved to enhanced2click table, updated paths Ç1/27/96 to handle double-clicking on part of the hierarchy within a single "with" Ç5/28/95 to handle comment in the "with" Ç5/15/95 to handle hierarchy within a single "with" Çe.g. "with ObjectModel, QXP, defs" Ç(Actually, I only look at pairs. It didn't seem worth the effort to test every combination.) Çpossible improvements Çlook for nested "with" (as I do for outlines & an "object database map"), e.g. Çwith Player Çwith Keys Çlook for all combinations with multiple "fields" (not just pairs), e.g. Çwith QXP, ObjectModel, defs Çlook at every "with" in an outline oneLiner Çcall Simple.window.frontmostType to handle menuscripts Çbut then the enhanced2click package wouldn't stand on its own local { categorizedName = name; theLine; space = " "; windowType = "Unknown"; Ç modified below... windowName = window.frontmost(); whereAmI; displayStatus; leftOfSelection = 0; rightOfSelection = 0}; try { Çthe following fails for a few cases, see Simple.window.frontmostType() ... the only one we need is handled in the else windowType = typeOf(windowName^)} else { Ç 6/13/96 if window.isMenuScript(windowName) { windowType = scriptType}}; on initialize() { displayStatus = op.getDisplay(); Ç want to restore it to original state op.setDisplay(false); Ç no need to show the user our travels case windowType { outlineType; Ç added 5/16/96 ==> changed to a case statement scriptType { whereAmI = op.getCursor()}}; Ç uniqueID, to restore at end if wp.inTextMode() { Ç doesn't apply to cmd2Click, but may to Jump wp.getSelect(@leftOfSelection, @rightOfSelection)}; };Çelse: the left/right of selection are correct at zero on restoreOutline() { case windowType { outlineType; Ç added 5/16/96 ==> changed to a case statement scriptType { op.setCursor(whereAmI)}}; wp.setTextMode(true); wp.setSelect(leftOfSelection, rightOfSelection); op.setDisplay(displayStatus)}; on checkAllFields() { Çglobals ÇtheLine Ç which has the spaces removed Çname ÇwhereAmI local { comma = ","; fieldCount; previous; i}; fieldCount = string.countFields(theLine, comma); for i = 1 to fieldCount { categorizedName = string.nthField(theLine, comma, i) + "." + name; if defined (categorizedName^) { restoreOutline(); callbackAction^(categorizedName, true); Ç second parameter: yes it's in a "with" return (true)}}; for i = 1 to fieldCount { Ç 5/15/95: check pairs next (less likely) previous = string.nthField(theLine, comma, i); for j = i+1 to fieldCount { categorizedName = previous + "." + string.nthField(theLine, comma, j) + "." + name; if defined (categorizedName^) { restoreOutline(); callbackAction^(categorizedName, true); Ç second parameter: yes it's in a "with" return (true)}}}; return false}; Ç won't get here if it finds a match on handleWith() { Ç1/27/96: call twice ==> moved to a subroutine theLine = string.popLeading( string.lower(op.getLineText()), space ); if theLine beginsWith "with " { theLine = string.commentDelete(theLine); Ç 5/28/95 Çget rid of the with, then strip out spaces so they don't interfere with nthField theLine = string.replaceAll( theLine - "with", space, "" ); if checkAllFields() { Çit also performs the callbackAction return true} else { return false}} else { return false}}; on handleOutlineHierarchy() { Ç5/16/96: doesn't actually check "with", but something similar Çit's easier to add here than as a separate script since it calls initialize & restoreOutline categorizedName = string.nthField(string.popLeading(op.getLineText(), space), space, 1) + "." + categorizedName; if defined (categorizedName^) { restoreOutline(); callbackAction^(categorizedName, true); Ç second parameter: yes it's in a "with" return (true)} else { return false}}; case windowType { scriptType { initialize(); if handleWith () { Ç 1/27/96: for cases like "with Player, keys"; 2click on keys return true}; Ç i.e. out of the whole script while op.go (left, 1) { if handleWith () { return true}}; Ç i.e. out of the whole script restoreOutline (); return false}; outlineType { Ç assume it's a oneLiner (5/16/96: also handle an "object database map") initialize(); local { theLine = string.lower(op.getLineText())}; if theLine contains "with " { Ç at present: only looks at the FIRST "with" local { fromPosition = string.patternMatch("with ", theLine) + 5; toPosition = string.patternMatch("{", theLine); numChars = toPosition - fromPosition}; Çget rid of the with, then strip out spaces so they don't interfere with nthField theLine = string.replaceAll(string.mid(theLine, fromPosition, numChars), space, ""); if checkAllFields() { Çit also performs the callbackAction return true}} Ç i.e. out of the whole script else { Ç modified 5/16/96 to walk up the hierarchy Çunlike "with", do NOT check the current line ÇcategorizedName starts out as just name; that's what we want here too while op.go(left, 1) { Ç 5/16/96 if handleOutlineHierarchy() { return true}}; Ç i.e. out of the whole script restoreOutline(); return false}}} else { return false}}; on pathToBracketedPath (s) { ÇSunday, January 25, 1998 at 4:21:03 PM by PBS local (path, flinquotes, flinbrackets, fladd, flend); local (i, ch = "", lastch = "", piece); local (oneElement = "", elementList = {}); for i = 1 to sizeOf (s) { fladd = false; flend = false; lastch = ch; ch = s [i]; case ch { '"' { if lastch == '\\' { fladd = true} else { if !flinquotes { flinquotes = true} else { flinquotes = false}}}; '[' { if !flinquotes { flinbrackets = true}}; ']' { if !flinquotes { flinbrackets = false}}; '.' { if !flinquotes and !flinbrackets { flend = true} else { fladd = true}}} else { fladd = true}; if fladd { oneElement = oneElement + ch}; if flend { elementList = elementList + oneElement; oneElement = ""}}; elementList = elementList + oneElement; for oneElement in elementList { path = path + "[\"" + oneElement + "\"]."}; path = string.mid (path, 1, sizeOf (path) - 1); // strip off trailing dot return (path)}; Frontier.createUserCallbacksSubtable (nameOf (this^)); Çif not defined (user.callbacks.cmd2click) // old code Çnew (tabletype, @user.callbacks.cmd2click) local (i); local (bracketedName); for i = 1 to sizeof (user.callbacks.cmd2click) { local (adrScript = @user.callbacks.cmd2click [i]); try { while typeOf (adrScript^) == addressType { adrScript = adrScript^}; if adrScript^ (name) { return (true)}}}; on checkOtherTables (name, callbackAction) { Çlook in tables that UserTalk references, but aren't global ... to match "table.[name]" Çcalled by my cmd2click, Cmd-Jump & possibly others ÇPioneerware by Scott S. Lawton Çrevisions Ç3/19/96: moved to enhanced2click table, updated paths Ç5/15/95: handle subtables, e.g. "dialog.getFile" (in Simple) should NOT be bracketed local { jumpPaths = { "system.compiler.language.constants", "system.compiler.language.builtins", "system.compiler.language.keywords", "system.misc", "people", "system.verbs", "Simple"}; path; test}; for path in jumpPaths { test = path + "." + name; Ç added 5/15/95 if defined (test^) { callbackAction^ (test); return true}; test = path + "." + "[\"" + name + "\"]"; if defined (test^) { callbackAction^ (test); return true}}; return false}; Ç will only get here if the above fails on checkScript (name) { Çlook in the script itself for a local "handler" Çcalled by my cmd2click, control2click, Cmd-Jump & possibly others ÇPioneerware by Scott S. Lawton Çrevisions Ç3/19/96: moved to enhanced2click table, updated paths Ç6/17/95: created local { windowType = "Unknown"; Ç modified below... whereAmI; displayStatus; leftOfSelection = 0; rightOfSelection = 0}; try { Çthe following fails for a few cases, see Simple.window.frontmostType() ... though it isn't needed here windowType = typeOf (window.frontmost()^)}; on initialize() { displayStatus = op.getDisplay(); Ç want to restore it to original state op.setDisplay (false); Ç no need to show the user our travels if windowType equals scriptType { whereAmI = op.getCursor()}; Ç uniqueID, to restore at end if wp.inTextMode() { Ç doesn't apply to cmd2Click, but may to Jump wp.getSelect(@leftOfSelection, @rightOfSelection)}; };Çelse: the left/right of selection are correct at zero on restoreOutline() { if windowType equals scriptType { op.setCursor(whereAmI)}; wp.setTextMode(true); wp.setSelect(leftOfSelection, rightOfSelection); op.setDisplay(displayStatus)}; if windowType equals scriptType { initialize(); bundle { Ç set the search parameters user.prefs.search.casesensitive = false; user.prefs.search.wholewords = false; user.prefs.search.wraparound = true}; op.firstSummit (); Ç FIND seems to take current heading as its scope if op.find ("on " + name) { Ç look for the "category" text wp.setTextMode (true); op.setDisplay (displayStatus); return true} else { restoreOutline (); return false}} else { return false}}; on doIt (objectName, fromWith = false) { ÇSSL: moved standard behavior here if kb.optionKey () { local (front = window.frontMost ()); edit (address (objectName)); if window.getFile (front) == nil { window.close (front)} else { window.hide (front)}} else { edit (address (objectName))}}; if string.lower (name) == "string" { name = "system.verbs.builtins." + name}; if defined (name^) { Çsimple: just jump to it doIt (name); return (true)}; bracketedName = pathToBracketedPath (name); if defined (bracketedName^) { doIt (bracketedName); return (true)}; if defined (("websites." + name)^) { //it's in the websites table ÇSaturday, January 24, 1998 at 4:03:20 PM by PBS doIt ("websites." + name); return (true)}; if defined (("websites." + bracketedName)^) { //it's in the websites table ÇSaturday, January 24, 1998 at 4:03:20 PM by PBS doIt ("websites." + bracketedName); return (true)}; bundle { Ç4.2 -- make cmd-2clicking work for macros ÇWed, Dec 11, 1996 at 7:30:25 PM by DW try { if defined (websites.["#data"].tools) { if defined (websites.["#data"].tools^.[name]) { edit (@websites.["#data"].tools^.[name]); return (true)}}}; try { if defined (user.html.macros.[name]) { edit (@user.html.macros.[name]); return (true)}}; try { if defined (user.html.renderers.[name]) { edit (@user.html.renderers.[name]); return (true)}}; try { if defined (html.data.standardMacros.[name]) { edit (@html.data.standardMacros.[name]); return (true)}}}; if checkOtherTables (name, @doIt) { Çcheck reserved words return (true)}; if checkWith (name, @doIt) { Çcheck every "with" return (true)}; if checkScript (name) { Çcheck this script return (true)}; if file.exists (name) { // maybe it's a filename if sys.os () == "MacOS" { return (Finder.reveal (name))} else { return (webBrowser.openDocument (file.folderFromPath (name)))}}; if name beginsWith "http://" or name beginsWith "www." { // it's a URL if not (name beginsWith "http://") { name = "http://" + name}; if webBrowser.openURL (name) { webBrowser.bringToFront ()}; return (true)}; return (false)}; Çbundle // testing Çcmd2Click ("string") \ No newline at end of file --- 1,3 ---- FrontierVcsFile:1:scpt:system.callbacks.cmd2Click ! on cmd2Click (name) { ÇChanges Ç1/27/06; 2:27:38 PM by TAC Çif name is "date" most certainly the user wants to see the system.verbs.builtins.date table, not system.verbs.globals.date Ç1/17/06; 10:35:24 AM by TAC Çif name is "string" most certainly the user wants to see the system.verbs.builtins.string table, not system.verbs.globals.string Ç6/18/05; 1:34:38 PM by TAC Çuse Frontier.createUserCallbacksSubtable to initialize tables Ç4/20/01; 4:05:40 PM by JES ÇAllow callbacks to be addresses or addresses of addresses... ÇTue, Oct 7, 1997 at 11:37:49 AM by PBS ÇNew callbacks for cmd2click. Callback script returns true if it handled the click, then this script immediately returns true. Otherwise, this script handles the click. ÇWed, Dec 11, 1996 at 11:16:00 PM by DW Ç4.2, handles macros in web pages Ç8/15/96 by dmb Ç integrated ssl's "enhanced2click" functionality Ç3/19/96 by ssl Çmoved checkWith etc. to enhanced2click table to simplify distribution Ç6/17/95 by ssl Çadded support for local scripts (via checkScript) Çssl change notes Çenhanced to walk up the script/outline hierarchy and check every "with" path in an outline window, assume it's a oneLiner Çadded support for reserved constants, keywords & builtins Çchanges are Pioneerware by Scott S. Lawton ÇInternet: ss...@pr..., http://www.tiac.net/prefab/ Çcalled when you cmd-double-click on an identifier ÇIt enhances the default, built-in behavior of jumping to the named object. ÇIt checks for the option key, and closes the front window if it's pressed. ÇIf the name is a file rather than a db object, it will reveal it in the Finder on checkWith (name, callbackAction) { Çwalk up the script/outline hierarchy checking in "with" for a match: "table.[name]" Çcalled by my cmd2click, control2click ÇPioneerware by Scott S. Lawton Çrevisions Ç6/13/96: handle menuscripts Ç5/16/96: now handle an "object database map" Ç3/19/96: moved to enhanced2click table, updated paths Ç1/27/96 to handle double-clicking on part of the hierarchy within a single "with" Ç5/28/95 to handle comment in the "with" Ç5/15/95 to handle hierarchy within a single "with" Çe.g. "with ObjectModel, QXP, defs" Ç(Actually, I only look at pairs. It didn't seem worth the effort to test every combination.) Çpossible improvements Çlook for nested "with" (as I do for outlines & an "object database map"), e.g. Çwith Player Çwith Keys Çlook for all combinations with multiple "fields" (not just pairs), e.g. Çwith QXP, ObjectModel, defs Çlook at every "with" in an outline oneLiner Çcall Simple.window.frontmostType to handle menuscripts Çbut then the enhanced2click package wouldn't stand on its own local { categorizedName = name; theLine; space = " "; windowType = "Unknown"; Ç modified below... windowName = window.frontmost(); whereAmI; displayStatus; leftOfSelection = 0; rightOfSelection = 0}; try { Çthe following fails for a few cases, see Simple.window.frontmostType() ... the only one we need is handled in the else windowType = typeOf(windowName^)} else { Ç 6/13/96 if window.isMenuScript(windowName) { windowType = scriptType}}; on initialize() { displayStatus = op.getDisplay(); Ç want to restore it to original state op.setDisplay(false); Ç no need to show the user our travels case windowType { outlineType; Ç added 5/16/96 ==> changed to a case statement scriptType { whereAmI = op.getCursor()}}; Ç uniqueID, to restore at end if wp.inTextMode() { Ç doesn't apply to cmd2Click, but may to Jump wp.getSelect(@leftOfSelection, @rightOfSelection)}}; Çelse: the left/right of selection are correct at zero on restoreOutline() { case windowType { outlineType; Ç added 5/16/96 ==> changed to a case statement scriptType { op.setCursor(whereAmI)}}; wp.setTextMode(true); wp.setSelect(leftOfSelection, rightOfSelection); op.setDisplay(displayStatus)}; on checkAllFields() { Çglobals ÇtheLine Ç which has the spaces removed Çname ÇwhereAmI local { comma = ","; fieldCount; previous; i}; fieldCount = string.countFields(theLine, comma); for i = 1 to fieldCount { categorizedName = string.nthField(theLine, comma, i) + "." + name; if defined (categorizedName^) { restoreOutline(); callbackAction^(categorizedName, true); Ç second parameter: yes it's in a "with" return (true)}}; for i = 1 to fieldCount { Ç 5/15/95: check pairs next (less likely) previous = string.nthField(theLine, comma, i); for j = i+1 to fieldCount { categorizedName = previous + "." + string.nthField(theLine, comma, j) + "." + name; if defined (categorizedName^) { restoreOutline(); callbackAction^(categorizedName, true); Ç second parameter: yes it's in a "with" return (true)}}}; return false}; Ç won't get here if it finds a match on handleWith() { Ç1/27/96: call twice ==> moved to a subroutine theLine = string.popLeading( string.lower(op.getLineText()), space ); if theLine beginsWith "with " { theLine = string.commentDelete(theLine); Ç 5/28/95 Çget rid of the with, then strip out spaces so they don't interfere with nthField theLine = string.replaceAll( theLine - "with", space, "" ); if checkAllFields() { Çit also performs the callbackAction return true} else { return false}} else { return false}}; on handleOutlineHierarchy() { Ç5/16/96: doesn't actually check "with", but something similar Çit's easier to add here than as a separate script since it calls initialize & restoreOutline categorizedName = string.nthField(string.popLeading(op.getLineText(), space), space, 1) + "." + categorizedName; if defined (categorizedName^) { restoreOutline(); callbackAction^(categorizedName, true); Ç second parameter: yes it's in a "with" return (true)} else { return false}}; case windowType { scriptType { initialize(); if handleWith () { Ç 1/27/96: for cases like "with Player, keys"; 2click on keys return true}; Ç i.e. out of the whole script while op.go (left, 1) { if handleWith () { return true}}; Ç i.e. out of the whole script restoreOutline (); return false}; outlineType { Ç assume it's a oneLiner (5/16/96: also handle an "object database map") initialize(); local { theLine = string.lower(op.getLineText())}; if theLine contains "with " { Ç at present: only looks at the FIRST "with" local { fromPosition = string.patternMatch("with ", theLine) + 5; toPosition = string.patternMatch("{", theLine); numChars = toPosition - fromPosition}; Çget rid of the with, then strip out spaces so they don't interfere with nthField theLine = string.replaceAll(string.mid(theLine, fromPosition, numChars), space, ""); if checkAllFields() { Çit also performs the callbackAction return true}} Ç i.e. out of the whole script else { Ç modified 5/16/96 to walk up the hierarchy Çunlike "with", do NOT check the current line ÇcategorizedName starts out as just name; that's what we want here too while op.go(left, 1) { Ç 5/16/96 if handleOutlineHierarchy() { return true}}; Ç i.e. out of the whole script restoreOutline(); return false}}} else { return false}}; on pathToBracketedPath (s) { ÇSunday, January 25, 1998 at 4:21:03 PM by PBS local (path, flinquotes, flinbrackets, fladd, flend); local (i, ch = "", lastch = "", piece); local (oneElement = "", elementList = {}); for i = 1 to sizeOf (s) { fladd = false; flend = false; lastch = ch; ch = s [i]; case ch { '"' { if lastch == '\\' { fladd = true} else { if !flinquotes { flinquotes = true} else { flinquotes = false}}}; '[' { if !flinquotes { flinbrackets = true}}; ']' { if !flinquotes { flinbrackets = false}}; '.' { if !flinquotes and !flinbrackets { flend = true} else { fladd = true}}} else { fladd = true}; if fladd { oneElement = oneElement + ch}; if flend { elementList = elementList + oneElement; oneElement = ""}}; elementList = elementList + oneElement; for oneElement in elementList { path = path + "[\"" + oneElement + "\"]."}; path = string.mid (path, 1, sizeOf (path) - 1); // strip off trailing dot return (path)}; Frontier.createUserCallbacksSubtable (nameOf (this^)); Çif not defined (user.callbacks.cmd2click) // old code Çnew (tabletype, @user.callbacks.cmd2click) local (i); local (bracketedName); for i = 1 to sizeof (user.callbacks.cmd2click) { local (adrScript = @user.callbacks.cmd2click [i]); try { while typeOf (adrScript^) == addressType { adrScript = adrScript^}; if adrScript^ (name) { return (true)}}}; on checkOtherTables (name, callbackAction) { Çlook in tables that UserTalk references, but aren't global ... to match "table.[name]" Çcalled by my cmd2click, Cmd-Jump & possibly others ÇPioneerware by Scott S. Lawton Çrevisions Ç3/19/96: moved to enhanced2click table, updated paths Ç5/15/95: handle subtables, e.g. "dialog.getFile" (in Simple) should NOT be bracketed local { jumpPaths = { "system.compiler.language.constants", "system.compiler.language.builtins", "system.compiler.language.keywords", "system.misc", "people", "system.verbs", "Simple"}; path; test}; for path in jumpPaths { test = path + "." + name; Ç added 5/15/95 if defined (test^) { callbackAction^ (test); return true}; test = path + "." + "[\"" + name + "\"]"; if defined (test^) { callbackAction^ (test); return true}}; return false}; Ç will only get here if the above fails on checkScript (name) { Çlook in the script itself for a local "handler" Çcalled by my cmd2click, control2click, Cmd-Jump & possibly others ÇPioneerware by Scott S. Lawton Çrevisions Ç3/19/96: moved to enhanced2click table, updated paths Ç6/17/95: created local { windowType = "Unknown"; Ç modified below... whereAmI; displayStatus; leftOfSelection = 0; rightOfSelection = 0}; try { Çthe following fails for a few cases, see Simple.window.frontmostType() ... though it isn't needed here windowType = typeOf (window.frontmost()^)}; on initialize() { displayStatus = op.getDisplay(); Ç want to restore it to original state op.setDisplay (false); Ç no need to show the user our travels if windowType equals scriptType { whereAmI = op.getCursor()}; Ç uniqueID, to restore at end if wp.inTextMode() { Ç doesn't apply to cmd2Click, but may to Jump wp.getSelect(@leftOfSelection, @rightOfSelection)}}; Çelse: the left/right of selection are correct at zero on restoreOutline() { if windowType equals scriptType { op.setCursor(whereAmI)}; wp.setTextMode(true); wp.setSelect(leftOfSelection, rightOfSelection); op.setDisplay(displayStatus)}; if windowType equals scriptType { initialize(); bundle { Ç set the search parameters user.prefs.search.casesensitive = false; user.prefs.search.wholewords = false; user.prefs.search.wraparound = true}; op.firstSummit (); Ç FIND seems to take current heading as its scope if op.find ("on " + name) { Ç look for the "category" text wp.setTextMode (true); op.setDisplay (displayStatus); return true} else { restoreOutline (); return false}} else { return false}}; on doIt (objectName, fromWith = false) { ÇSSL: moved standard behavior here if kb.optionKey () { local (front = window.frontMost ()); edit (address (objectName)); if window.getFile (front) == nil { window.close (front)} else { window.hide (front)}} else { edit (address (objectName))}}; case string.lower (name) { // override some globals with builtins "date"; "string" { name = "system.verbs.builtins." + name}}; if defined (name^) { Çsimple: just jump to it doIt (name); return (true)}; bracketedName = pathToBracketedPath (name); if defined (bracketedName^) { doIt (bracketedName); return (true)}; if defined (("websites." + name)^) { //it's in the websites table ÇSaturday, January 24, 1998 at 4:03:20 PM by PBS doIt ("websites." + name); return (true)}; if defined (("websites." + bracketedName)^) { //it's in the websites table ÇSaturday, January 24, 1998 at 4:03:20 PM by PBS doIt ("websites." + bracketedName); return (true)}; bundle { Ç4.2 -- make cmd-2clicking work for macros ÇWed, Dec 11, 1996 at 7:30:25 PM by DW try { if defined (websites.["#data"].tools) { if defined (websites.["#data"].tools^.[name]) { edit (@websites.["#data"].tools^.[name]); return (true)}}}; try { if defined (user.html.macros.[name]) { edit (@user.html.macros.[name]); return (true)}}; try { if defined (user.html.renderers.[name]) { edit (@user.html.renderers.[name]); return (true)}}; try { if defined (html.data.standardMacros.[name]) { edit (@html.data.standardMacros.[name]); return (true)}}}; if checkOtherTables (name, @doIt) { Çcheck reserved words return (true)}; if checkWith (name, @doIt) { Çcheck every "with" return (true)}; if checkScript (name) { Çcheck this script return (true)}; if file.exists (name) { // maybe it's a filename if sys.os () == "MacOS" { return (Finder.reveal (name))} else { return (webBrowser.openDocument (file.folderFromPath (name)))}}; if name beginsWith "http://" or name beginsWith "www." { // it's a URL if not (name beginsWith "http://") { name = "http://" + name}; if webBrowser.openURL (name) { webBrowser.bringToFront ()}; return (true)}; return (false)}; Çbundle // testing Çcmd2Click ("string") \ No newline at end of file |
|
From: creedon <icr...@us...> - 2006-01-31 19:13:24
|
Update of /cvsroot/frontierkernel/Frontier/Common/source In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1540 Modified Files: resources.c Log Message: on mac os 9, error out when trying to use rez verbs to access data fork resources Index: resources.c =================================================================== RCS file: /cvsroot/frontierkernel/Frontier/Common/source/resources.c,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** resources.c 20 Dec 2005 22:31:51 -0000 1.6 --- resources.c 31 Jan 2006 19:13:16 -0000 1.7 *************** *** 35,38 **** --- 35,39 ---- #include "file.h" #include "resources.h" + #include "langinternal.h" /* 2006-01-30 creedon */ *************** *** 142,145 **** --- 143,148 ---- #ifdef MACVERSION /* + 2006-01-30 creedon: added check for non-carbon OS and trying to access the data fork of a file, error message + 2005-09-02 creedon: added support for fork parameter, see resources.c: openresourcefile and pushresourcefile */ *************** *** 149,154 **** HFSUniStr255 fork; FSRef myRef; #endif ! SetResLoad (false); --- 152,162 ---- HFSUniStr255 fork; FSRef myRef; + #else + if (forktype == datafork) { // if we're not on carbon then trying to use the data fork for resources is an error + langerrormessage ("\x4A" "Can't open the data fork for use with resources on this version of the OS."); + return (false); + } #endif ! SetResLoad (false); *************** *** 606,609 **** --- 614,619 ---- /* + 2006-01-30 creedon: added check for non-carbon OS and trying to access the data fork of a file, error message + 2005-09-02 creedon: added support for fork parameter, allows access to resources in data forks *************** *** 615,618 **** --- 625,633 ---- #if TARGET_API_MAC_CARBON == 1 FSRef myRef; + #else + if (forktype == datafork) { // if we're not on carbon then trying to use the data fork for resources is an error + langerrormessage ("\x4A" "Can't open the data fork for use with resources on this version of the OS."); + return (false); + } #endif |
|
From: creedon <icr...@us...> - 2006-01-31 19:11:40
|
Update of /cvsroot/frontierkernel/Frontier/Common/resources/Mac In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv518 Modified Files: lang.r Log Message: resource STR# 258, Mac Errors, has 92 elements Index: lang.r =================================================================== RCS file: /cvsroot/frontierkernel/Frontier/Common/resources/Mac/lang.r,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** lang.r 1 Nov 2005 18:11:31 -0000 1.9 --- lang.r 31 Jan 2006 19:11:32 -0000 1.10 *************** *** 721,725 **** resource 'STR#' (258, "Mac Errors", purgeable) { ! { /* array StringArray: 87 elements */ /* [1] */ "The Ò^0Ó folder is full.", --- 721,725 ---- resource 'STR#' (258, "Mac Errors", purgeable) { ! { /* array StringArray: 92 elements */ /* [1] */ "The Ò^0Ó folder is full.", |
|
From: Karsten W. <kar...@us...> - 2006-01-31 16:49:28
|
Update of /cvsroot/frontierkernel/Frontier/build_XCode/Frontier.xcode In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1930 Modified Files: Tag: pre_int64_branch project.pbxproj Log Message: extended warnings Index: project.pbxproj =================================================================== RCS file: /cvsroot/frontierkernel/Frontier/build_XCode/Frontier.xcode/project.pbxproj,v retrieving revision 1.20 retrieving revision 1.20.2.1 diff -C2 -d -r1.20 -r1.20.2.1 *** project.pbxproj 17 Sep 2005 16:39:24 -0000 1.20 --- project.pbxproj 31 Jan 2006 16:49:19 -0000 1.20.2.1 *************** *** 36,39 **** --- 36,40 ---- BB3B83610730603C0049D0C1, 651527B7072BFE0E00411831, + 8DE0CF47098EDBC700547115, ); isa = PBXGroup; *************** *** 70,73 **** --- 71,75 ---- 6515255E072BFC6500411831, 6515255F072BFC6500411831, + 8D06B207098EDCB60046E8BC, ); hasScannedForEncodings = 1; *************** *** 649,653 **** name = Frontier; productName = "Frontier OSX MachO Debug"; ! productReference = 65152569072BFC6500411831; productSettingsXML = "<?xml version=\"1.0\" encoding=\"UTF-8\"?> <!DOCTYPE plist PUBLIC \"-//Apple Computer//DTD PLIST 1.0//EN\" \"http://www.apple.com/DTDs/PropertyList-1.0.dtd\"> --- 651,655 ---- name = Frontier; productName = "Frontier OSX MachO Debug"; ! productReference = 8DE0CF47098EDBC700547115; productSettingsXML = "<?xml version=\"1.0\" encoding=\"UTF-8\"?> <!DOCTYPE plist PUBLIC \"-//Apple Computer//DTD PLIST 1.0//EN\" \"http://www.apple.com/DTDs/PropertyList-1.0.dtd\"> *************** *** 658,669 **** productType = "com.apple.product-type.application"; }; - 65152569072BFC6500411831 = { - explicitFileType = wrapper.application; - includeInIndex = 0; - isa = PBXFileReference; - path = Frontier.app; - refType = 3; - sourceTree = BUILT_PRODUCTS_DIR; - }; 6515256C072BFC6700411831 = { children = ( --- 660,663 ---- *************** *** 8673,8676 **** --- 8667,8715 ---- //653 //654 + //8D0 + //8D1 + //8D2 + //8D3 + //8D4 + 8D06B207098EDCB60046E8BC = { + buildSettings = { + COPY_PHASE_STRIP = NO; + GCC_ENABLE_FIX_AND_CONTINUE = YES; + GCC_MODEL_TUNING = ""; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_PRECOMPILE_PREFIX_HEADER = YES; + GCC_PREFIX_HEADER = Frontier.xcode.h; + GCC_WARN_ABOUT_MISSING_PROTOTYPES = YES; + GCC_WARN_ALLOW_INCOMPLETE_PROTOCOL = NO; + GCC_WARN_CHECK_SWITCH_STATEMENTS = YES; + GCC_WARN_INITIALIZER_NOT_FULLY_BRACKETED = YES; + GCC_WARN_MISSING_PARENTHESES = YES; + GCC_WARN_SHADOW = YES; + GCC_WARN_TYPECHECK_CALLS_TO_PRINTF = YES; + GCC_WARN_UNKNOWN_PRAGMAS = YES; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_LABEL = YES; + GCC_WARN_UNUSED_PARAMETER = YES; + GCC_WARN_UNUSED_VALUE = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + MACOSX_DEPLOYMENT_TARGET = 10.3; + OTHER_CFLAGS = "-fconstant-cfstrings -fno-inline -malign-mac68k "; + }; + isa = PBXBuildStyle; + name = "Development All Warnings"; + }; + 8DE0CF47098EDBC700547115 = { + explicitFileType = wrapper.application; + includeInIndex = 0; + isa = PBXFileReference; + path = Frontier.app; + refType = 3; + sourceTree = BUILT_PRODUCTS_DIR; + }; + //8D0 + //8D1 + //8D2 + //8D3 + //8D4 //BB0 //BB1 |
|
From: Karsten W. <kar...@us...> - 2006-01-31 16:48:10
|
Update of /cvsroot/frontierkernel/Frontier/FrontierSDK/Toolkits/IACTools/Source In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1316/IACTools/Source Modified Files: Tag: pre_int64_branch iacapps.c iacasynch.c Log Message: initial checkin from private sandbox Index: iacapps.c =================================================================== RCS file: /cvsroot/frontierkernel/Frontier/FrontierSDK/Toolkits/IACTools/Source/iacapps.c,v retrieving revision 1.4 retrieving revision 1.4.6.1 diff -C2 -d -r1.4 -r1.4.6.1 *** iacapps.c 11 Jan 2005 22:48:36 -0000 1.4 --- iacapps.c 31 Jan 2006 16:47:55 -0000 1.4.6.1 *************** *** 109,115 **** ! static pascal OSErr CoerceTargetIDToType (DescType typecode, Ptr dataptr, Size datasize, DescType totype, long refcon, AEDesc *result) { ! ! #pragma unused (typecode, datasize, totype) TargetID target; --- 109,122 ---- ! static pascal OSErr ! CoerceTargetIDToType ( ! DescType typecode, ! Ptr dataptr, ! Size datasize, ! DescType totype, ! long refcon, ! AEDesc *result) ! { ! #pragma unused (typecode, datasize, totype, refcon) TargetID target; *************** *** 267,276 **** */ ! long gestaltAppleEventsPresent; ! if (Gestalt (gestaltAppleEventsAttr, &gestaltAppleEventsPresent) != noErr) return (false); ! return (gestaltAppleEventsPresent != 0); } /*IAChaveappleevents*/ --- 274,283 ---- */ ! long gestaltAEPresent; // kw - 2006-01-30 --- renamed due to shadow warning ! if (Gestalt (gestaltAppleEventsAttr, &gestaltAEPresent) != noErr) return (false); ! return (gestaltAEPresent != 0); } /*IAChaveappleevents*/ Index: iacasynch.c =================================================================== RCS file: /cvsroot/frontierkernel/Frontier/FrontierSDK/Toolkits/IACTools/Source/iacasynch.c,v retrieving revision 1.3 retrieving revision 1.3.6.1 diff -C2 -d -r1.3 -r1.3.6.1 *** iacasynch.c 11 Jan 2005 22:48:36 -0000 1.3 --- iacasynch.c 31 Jan 2006 16:47:55 -0000 1.3.6.1 *************** *** 30,35 **** ! static Boolean IACaddreplyhandler (tyAsynchCallback callback, long id) { ! short i; --- 30,38 ---- ! static Boolean ! IACaddreplyhandler ( ! tyAsynchCallback pcallback, // kw - 2006-01-30 --- renamed due to shadow warning ! long id) ! { short i; *************** *** 40,44 **** replyhandlers [i].id = id; ! replyhandlers [i].callback = callback; return (true); --- 43,47 ---- replyhandlers [i].id = id; ! replyhandlers [i].callback = pcallback; return (true); *************** *** 51,55 **** static pascal OSErr IAChandleanswer (AppleEvent *event, AppleEvent *reply, long refcon) { ! long replyid; short i; --- 54,59 ---- static pascal OSErr IAChandleanswer (AppleEvent *event, AppleEvent *reply, long refcon) { ! #pragma unused (reply, refcon) ! long replyid; short i; *************** *** 89,94 **** ! Boolean IACsendasynch (AppleEvent *event, tyAsynchCallback callback) { ! AppleEvent reply; OSErr ec; --- 93,101 ---- ! Boolean ! IACsendasynch ( ! AppleEvent *event, ! tyAsynchCallback pcallback) ! { AppleEvent reply; OSErr ec; *************** *** 101,115 **** return (false); ! if (callback != nil) { /*DW 7/30/93*/ ! if (!IACaddreplyhandler (callback, replyid)) return (false); } ec = AESend ( ! ! event, &reply, kAEQueueReply + kAECanInteract + kAECanSwitchLayer, ! ! kAENormalPriority, kNoTimeOut, IACwaitroutineUPP, nil); AEDisposeDesc (event); --- 108,125 ---- return (false); ! if (pcallback != nil) { /*DW 7/30/93*/ ! if (!IACaddreplyhandler (pcallback, replyid)) return (false); } ec = AESend ( ! event, ! &reply, ! kAEQueueReply + kAECanInteract + kAECanSwitchLayer, ! kAENormalPriority, ! kNoTimeOut, ! IACwaitroutineUPP, ! nil); AEDisposeDesc (event); |
|
From: Karsten W. <kar...@us...> - 2006-01-31 16:48:07
|
Update of /cvsroot/frontierkernel/Frontier/FrontierSDK/Toolkits/AppletToolkit/Source In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1316/AppletToolkit/Source Modified Files: Tag: pre_int64_branch appletfrontier.c Log Message: initial checkin from private sandbox Index: appletfrontier.c =================================================================== RCS file: /cvsroot/frontierkernel/Frontier/FrontierSDK/Toolkits/AppletToolkit/Source/appletfrontier.c,v retrieving revision 1.3 retrieving revision 1.3.6.1 diff -C2 -d -r1.3 -r1.3.6.1 *** appletfrontier.c 11 Jan 2005 22:48:21 -0000 1.3 --- appletfrontier.c 31 Jan 2006 16:47:55 -0000 1.3.6.1 *************** *** 879,883 **** boolean editFrontierObject (bigstring celladdress) { ! /* uses a new protocol in Frontier 3.0 to open the window --- 879,883 ---- boolean editFrontierObject (bigstring celladdress) { ! #pragma unused(celladdress) /* uses a new protocol in Frontier 3.0 to open the window |
|
From: Karsten W. <kar...@us...> - 2006-01-31 16:43:44
|
Update of /cvsroot/frontierkernel/Frontier/Common/source In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv32474 Modified Files: Tag: pre_int64_branch file.c filelaunch.c fileverbs.c langexternal.c langops.c langscan.c langvalue.c langverbs.c osacomponent.c pictverbs.c Log Message: initial checkin from private sandbox Index: langscan.c =================================================================== RCS file: /cvsroot/frontierkernel/Frontier/Common/source/langscan.c,v retrieving revision 1.6 retrieving revision 1.6.4.1 diff -C2 -d -r1.6 -r1.6.4.1 *** langscan.c 24 Jan 2005 02:10:01 -0000 1.6 --- langscan.c 31 Jan 2006 16:43:31 -0000 1.6.4.1 *************** *** 443,450 **** else { ! if (!isdigit (ch) && !(flhex && isxdigit (ch))) { ! ! if (flfloat) { ! double d; Handle x; --- 443,452 ---- else { ! if ( !isdigit (ch) ! && !( flhex ! && isxdigit (ch))) ! { ! if (flfloat) ! { double d; Handle x; Index: langexternal.c =================================================================== RCS file: /cvsroot/frontierkernel/Frontier/Common/source/langexternal.c,v retrieving revision 1.4 retrieving revision 1.4.6.1 diff -C2 -d -r1.4 -r1.4.6.1 *** langexternal.c 11 Jan 2005 22:48:06 -0000 1.4 --- langexternal.c 31 Jan 2006 16:43:31 -0000 1.4.6.1 *************** *** 2887,2894 **** register tyvaluetype type = langgetvaluetype (typeid); ! if (type >= outlinevaluetype) type = externalvaluetype; ! return (type); } /*langexternalgetvaluetype*/ --- 2887,2903 ---- register tyvaluetype type = langgetvaluetype (typeid); ! ! // kw - 2006-01-30 --- for new int types - these were added at the end ! // not sure if these need to be externaltypes ! #if 0 //LONGINT_LONGDATE == 1 ! if ( (type < longlongintvaluetype) ! && (type >= outlinevaluetype)) ! { ! type = externalvaluetype; ! } ! #else if (type >= outlinevaluetype) type = externalvaluetype; ! #endif return (type); } /*langexternalgetvaluetype*/ Index: pictverbs.c =================================================================== RCS file: /cvsroot/frontierkernel/Frontier/Common/source/pictverbs.c,v retrieving revision 1.4 retrieving revision 1.4.6.1 diff -C2 -d -r1.4 -r1.4.6.1 *** pictverbs.c 11 Jan 2005 22:48:10 -0000 1.4 --- pictverbs.c 31 Jan 2006 16:43:31 -0000 1.4.6.1 *************** *** 1167,1171 **** boolean pictstart (void) { ! /* set up callback routines record, and link our data into the shell's --- 1167,1171 ---- boolean pictstart (void) { ! /* set up callback routines record, and link our data into the shell's Index: file.c =================================================================== RCS file: /cvsroot/frontierkernel/Frontier/Common/source/file.c,v retrieving revision 1.4 retrieving revision 1.4.6.1 diff -C2 -d -r1.4 -r1.4.6.1 *** file.c 11 Jan 2005 22:48:05 -0000 1.4 --- file.c 31 Jan 2006 16:43:31 -0000 1.4.6.1 *************** *** 206,228 **** get the size of a file that's already open. */ - - #ifdef MACVERSION - long filesize; - - if (GetEOF (fnum, &filesize) != noErr) - filesize = 0; - - return (filesize); - #endif ! #ifdef WIN95VERSION ! long filesize; ! filesize = GetFileSize (fnum, NULL); ! if (filesize == -1L) ! filesize = 0L; ! return (filesize); ! #endif } /*filegetsize*/ --- 206,228 ---- get the size of a file that's already open. */ ! #ifdef MACVERSION ! long fsize; // kw - 2006-01-30 --- renamed due to shadow warning ! if (GetEOF (fnum, &fsize) != noErr) ! fsize = 0; ! return (fsize); ! #endif ! ! #ifdef WIN95VERSION ! long fsize; // kw - 2006-01-30 --- renamed due to shadow warning ! ! fsize = GetFileSize (fnum, NULL); ! if (fsize == -1L) ! fsize = 0L; ! ! return (fsize); ! #endif } /*filegetsize*/ *************** *** 404,418 **** */ ! register long filesize; register Handle h; ! filesize = filegetsize (fnum); ! if (!newclearhandle (filesize, hreturned)) return (false); h = *hreturned; /*copy into register*/ ! if (!fileread (fnum, filesize, *h)) { disposehandle (h); --- 404,418 ---- */ ! register long fsize; // kw - 2006-01-30 --- renamed due to shadow warning register Handle h; ! fsize = filegetsize (fnum); ! if (!newclearhandle (fsize, hreturned)) return (false); h = *hreturned; /*copy into register*/ ! if (!fileread (fnum, fsize, *h)) { disposehandle (h); *************** *** 463,467 **** boolean flushvolumechanges (const tyfilespec *fs, hdlfilenum fnum) { ! #ifdef MACVERSION /* 4.1b7 dmb: was -- FlushVol (nil, (*fs).vRefNum); --- 463,468 ---- boolean flushvolumechanges (const tyfilespec *fs, hdlfilenum fnum) { ! #ifdef MACVERSION ! #pragma unused (fnum) /* 4.1b7 dmb: was -- FlushVol (nil, (*fs).vRefNum); Index: langverbs.c =================================================================== RCS file: /cvsroot/frontierkernel/Frontier/Common/source/langverbs.c,v retrieving revision 1.12 retrieving revision 1.12.2.1 diff -C2 -d -r1.12 -r1.12.2.1 *** langverbs.c 8 Apr 2005 12:29:30 -0000 1.12 --- langverbs.c 31 Jan 2006 16:43:31 -0000 1.12.2.1 *************** *** 864,868 **** if ((type >= outlinevaluetype) && (type <= pictvaluetype)) { ! if (!langexternalnewvalue ((tyexternalid) (type - outlinevaluetype), nil, &val)) return (false); --- 864,876 ---- if ((type >= outlinevaluetype) && (type <= pictvaluetype)) { ! #if LONGINT_LONGDATE == 1 ! int x = type; ! if ((type == 38) || (type == 39)) ! { ! x = -x; ! x = -x; ! } ! #else ! #endif if (!langexternalnewvalue ((tyexternalid) (type - outlinevaluetype), nil, &val)) return (false); Index: filelaunch.c =================================================================== RCS file: /cvsroot/frontierkernel/Frontier/Common/source/filelaunch.c,v retrieving revision 1.4 retrieving revision 1.4.6.1 diff -C2 -d -r1.4 -r1.4.6.1 *** filelaunch.c 11 Jan 2005 22:48:05 -0000 1.4 --- filelaunch.c 31 Jan 2006 16:43:31 -0000 1.4.6.1 *************** *** 127,131 **** Boolean wasChanged; AliasHandle targetAlias; ! long index; long nTargets = 1; FSSpec targets[1]; --- 127,131 ---- Boolean wasChanged; AliasHandle targetAlias; ! long idx; // kw - 2006-01-30 --- renamed due to shadow warning long nTargets = 1; FSSpec targets[1]; *************** *** 145,181 **** /* create an open documents event targeting the finder */ ! err = AECreateDesc(typeApplSignature, (Ptr) &fndrCreator, ! sizeof(fndrCreator), &fndrAddress); ! if (err != noErr) goto bail; ! err = AECreateAppleEvent(kCoreEventClass, kAEOpenDocuments, ! &fndrAddress, kAutoGenerateReturnID, ! kAnyTransactionID, &theAEvent); ! if (err != noErr) goto bail; ! /* create the list of files to open */ err = AECreateList(NULL, 0, false, &targetListDesc); ! if (err != noErr) goto bail; ! for ( index=0; index < nTargets; index++) { if (targetAlias == NULL) ! err = NewAlias(NULL, (targetList + index), &targetAlias); ! else err = UpdateAlias(NULL, (targetList + index), targetAlias, &wasChanged); ! if (err != noErr) goto bail; HLock((Handle) targetAlias); ! err = AEPutPtr(&targetListDesc, (index + 1), typeAlias, *targetAlias, GetHandleSize((Handle) targetAlias)); HUnlock((Handle) targetAlias); ! if (err != noErr) goto bail; } ! /* add the file list to the apple event */ err = AEPutParamDesc(&theAEvent, keyDirectObject, &targetListDesc); - if (err != noErr) goto bail; ! /* send the event to the Finder */ ! err = AESend(&theAEvent, &theReply, kAENoReply, ! kAENormalPriority, kAEDefaultTimeout, NULL, NULL); /* clean up and leave */ bail: ! if (targetAlias != NULL) DisposeHandle((Handle) targetAlias); AEDisposeDesc(&targetListDesc); AEDisposeDesc(&theAEvent); --- 145,219 ---- /* create an open documents event targeting the finder */ ! err = AECreateDesc( ! typeApplSignature, ! (Ptr) &fndrCreator, ! sizeof(fndrCreator), ! &fndrAddress); ! if (err != noErr) ! goto bail; ! ! err = AECreateAppleEvent( ! kCoreEventClass, ! kAEOpenDocuments, ! &fndrAddress, ! kAutoGenerateReturnID, ! kAnyTransactionID, ! &theAEvent); ! ! if (err != noErr) ! goto bail; ! ! /* create the list of files to open */ err = AECreateList(NULL, 0, false, &targetListDesc); ! ! if (err != noErr) ! goto bail; ! ! for ( idx = 0; idx < nTargets; idx++) ! { if (targetAlias == NULL) ! err = NewAlias(NULL, (targetList + idx), &targetAlias); ! else ! err = UpdateAlias(NULL, (targetList + idx), targetAlias, &wasChanged); ! ! if (err != noErr) ! goto bail; ! HLock((Handle) targetAlias); ! err = AEPutPtr( ! &targetListDesc, ! (idx + 1), ! typeAlias, ! *targetAlias, ! GetHandleSize((Handle) targetAlias)); ! HUnlock((Handle) targetAlias); ! ! if (err != noErr) ! goto bail; } ! /* add the file list to the apple event */ err = AEPutParamDesc(&theAEvent, keyDirectObject, &targetListDesc); ! if (err != noErr) ! goto bail; ! ! /* send the event to the Finder */ ! err = AESend( ! &theAEvent, ! &theReply, ! kAENoReply, ! kAENormalPriority, ! kAEDefaultTimeout, ! NULL, ! NULL); /* clean up and leave */ bail: ! if (targetAlias != NULL) ! DisposeHandle((Handle) targetAlias); ! AEDisposeDesc(&targetListDesc); AEDisposeDesc(&theAEvent); Index: fileverbs.c =================================================================== RCS file: /cvsroot/frontierkernel/Frontier/Common/source/fileverbs.c,v retrieving revision 1.9 retrieving revision 1.9.2.1 diff -C2 -d -r1.9 -r1.9.2.1 *** fileverbs.c 27 Dec 2005 00:55:32 -0000 1.9 --- fileverbs.c 31 Jan 2006 16:43:31 -0000 1.9.2.1 *************** *** 746,750 **** short ctconsumed = 3; short ctpositional = 3; ! tyvaluerecord val; if (!gettypelistvalue (hparam1, 3, &filetypes, &typelist)) --- 746,750 ---- short ctconsumed = 3; short ctpositional = 3; ! tyvaluerecord lval; // kw -2006-01-30 --- renamed due to shadow warning if (!gettypelistvalue (hparam1, 3, &filetypes, &typelist)) *************** *** 753,762 **** flnextparamislast = true; ! setostypevalue (oscreator, &val); ! if (!getoptionalparamvalue (hparam1, &ctconsumed, &ctpositional, "\x07""creator", &val)) return (false); ! oscreator = val.data.ostypevalue; } --- 753,762 ---- flnextparamislast = true; ! setostypevalue (oscreator, &lval); ! if (!getoptionalparamvalue (hparam1, &ctconsumed, &ctpositional, "\x07""creator", &lval)) return (false); ! oscreator = lval.data.ostypevalue; } Index: langops.c =================================================================== RCS file: /cvsroot/frontierkernel/Frontier/Common/source/langops.c,v retrieving revision 1.4 retrieving revision 1.4.6.1 diff -C2 -d -r1.4 -r1.4.6.1 *** langops.c 11 Jan 2005 22:48:07 -0000 1.4 --- langops.c 31 Jan 2006 16:43:31 -0000 1.4.6.1 *************** *** 70,134 **** static tytypeinfo typeinfo [ctvaluetypes] = { ! {'\?\?\?\?', STR_unknown}, ! {'char', STR_char}, ! {'shor', STR_int}, ! {'long', STR_long}, ! {'bad1', STR_unused1}, /*8/13*/ ! {'data', STR_binary}, ! {'bool', STR_boolean}, ! {'tokn', STR_token}, ! {'date', STR_date}, ! {'addr', STR_address}, ! {'code', STR_compiled_code}, ! {'exte', STR_double}, ! {'TEXT', STR_string}, /*8/13*/ ! {'xtrn', STR_external}, ! {'dir ', STR_direction}, ! {'bad2', STR_unused2}, /*9/17/91*/ ! {'type', STR_string4}, ! {'bad3', STR_unused3}, ! {'QDpt', STR_point}, ! {'qdrt', STR_rect}, ! {'tptn', STR_pattern}, ! {'cRGB', STR_rgb}, /*12/11/92 dmb*/ ! {'fixd', STR_fixed}, ! {'sing', STR_single}, ! {'doub', STR_double}, ! {'obj ', STR_objspec}, ! {'fss ', STR_filespec}, ! {'alis', STR_alias}, ! {'enum', STR_enumerator}, ! {'list', STR_list}, ! {'reco', STR_record}, /* --- 70,134 ---- static tytypeinfo typeinfo [ctvaluetypes] = { ! /* 0 */ {'\?\?\?\?', STR_unknown}, ! /* 1 */ {'char', STR_char}, ! /* 2 */ {'shor', STR_int}, ! /* 3 */ {'long', STR_long}, ! /* 4 */ {'bad1', STR_unused1}, /*8/13*/ ! /* 5 */ {'data', STR_binary}, ! /* 6 */ {'bool', STR_boolean}, ! /* 7 */ {'tokn', STR_token}, ! /* 8 */ {'date', STR_date}, ! /* 9 */ {'addr', STR_address}, ! /* 10 */ {'code', STR_compiled_code}, ! /* 11 */ {'exte', STR_double}, ! /* 12 */ {'TEXT', STR_string}, /*8/13*/ ! /* 13 */ {'xtrn', STR_external}, ! /* 14 */ {'dir ', STR_direction}, ! /* 15 */ {'bad2', STR_unused2}, /*9/17/91*/ ! /* 16 */ {'type', STR_string4}, ! /* 17 */ {'bad3', STR_unused3}, ! /* 18 */ {'QDpt', STR_point}, ! /* 19 */ {'qdrt', STR_rect}, ! /* 20 */ {'tptn', STR_pattern}, ! /* 21 */ {'cRGB', STR_rgb}, /*12/11/92 dmb*/ ! /* 22 */ {'fixd', STR_fixed}, ! /* 23 */ {'sing', STR_single}, ! /* 24 */ {'doub', STR_double}, ! /* 25 */ {'obj ', STR_objspec}, ! /* 26 */ {'fss ', STR_filespec}, ! /* 27 */ {'alis', STR_alias}, ! /* 28 */ {'enum', STR_enumerator}, ! /* 29 */ {'list', STR_list}, ! /* 30 */ {'reco', STR_record}, /* *************** *** 138,163 **** */ ! {'optx', STR_outline}, ! {'wptx', STR_wptext}, #ifdef fliowa ! {'intf', STR_interface}, #else ! {'head', STR_headline}, #endif ! {'tabl', STR_table}, ! ! {'scpt', STR_script}, ! {'mbar', STR_menubar}, ! {'pict', STR_picture} }; --- 138,168 ---- */ ! /* 31 */ {'optx', STR_outline}, ! /* 32 */ {'wptx', STR_wptext}, #ifdef fliowa ! /* 33 */ {'intf', STR_interface}, #else ! /* 33 */ {'head', STR_headline}, #endif ! /* 34 */ {'tabl', STR_table}, ! /* 35 */ {'scpt', STR_script}, ! /* 36 */ {'mbar', STR_menubar}, + /* 37 */ {'pict', STR_picture} + + #if LONGINT_LONGDATE == 1 + + /* 38 */ ,{'comp', STR_longlongtype }, + /* 39 */ {'ldt ', STR_longdatetype } + #endif }; *************** *** 166,170 **** boolean fl = true; ! if ((type < novaluetype) || (type >= ctvaluetypes)) { --- 171,181 ---- boolean fl = true; ! ! int ! x = type, ! y = ctvaluetypes; ! ! tytypeinfo z = typeinfo[type]; ! if ((type < novaluetype) || (type >= ctvaluetypes)) { *************** *** 173,176 **** --- 184,191 ---- fl = false; } + if (x >= 38) + { + x = x * 1; + } copystring ((ptrstring) typeinfo [type].bsname, bs); *************** *** 214,227 **** 12/11/92 dmb: added backward compatibility check for rgb values */ ! register tyvaluetype type; ! ! for (type = novaluetype; type < ctvaluetypes; ++type) if (typeinfo [type].id == ostypeid) return (type); ! if (ostypeid == 'RGB ') /*12/11/92 dmb*/ return (rgbvaluetype); ! return ((tyvaluetype) -1); } /*langgetvaluetype*/ --- 229,248 ---- 12/11/92 dmb: added backward compatibility check for rgb values */ ! register tyvaluetype type; ! static UInt64 x = 0; ! x++; ! ! for ( type = novaluetype; ! type < ctvaluetypes; ! ++type) ! { if (typeinfo [type].id == ostypeid) return (type); ! } ! if (ostypeid == 'RGB ') /*12/11/92 dmb*/ return (rgbvaluetype); ! return ((tyvaluetype) -1); } /*langgetvaluetype*/ *************** *** 235,240 **** return true if the binary type can be coerced into a normal scalar value */ ! ! if ((type < novaluetype) || (type >= outlinevaluetype)) /*outside of good range*/ return (false); --- 256,262 ---- return true if the binary type can be coerced into a normal scalar value */ ! ! if ( (type < novaluetype) ! || (type >= outlinevaluetype)) /*outside of good range*/ return (false); Index: langvalue.c =================================================================== RCS file: /cvsroot/frontierkernel/Frontier/Common/source/langvalue.c,v retrieving revision 1.8 retrieving revision 1.8.2.1 diff -C2 -d -r1.8 -r1.8.2.1 *** langvalue.c 15 Dec 2005 21:42:52 -0000 1.8 --- langvalue.c 31 Jan 2006 16:43:31 -0000 1.8.2.1 *************** *** 78,192 **** ! typedef struct tyfastflagsvaluerecord { ! ! tyvaluetype valuetype; ! ! byte flags: 8; /*instead of 4 separate bits fields to clear*/ ! ! tyvaluedata data; ! } tyfastflagsvaluerecord; ! ! boolean langsymbolreference (hdlhashtable htable, bigstring bs, tyvaluerecord *val, hdlhashnode * hnode) { ! /* a bundle that was getting replicated everywhere. look up the indicated name in the table, and return true with *val equal to its value if the symbol is defined. */ ! boolean fl; ! pushhashtable (htable); ! ! fl = langgetsymbolval (bs, val, hnode); ! pophashtable (); ! ! if (!fl) { ! ! if ((htable == nil) && isemptystring (bs)) langerror (niladdresserror); else langparamerror (unknownidentifiererror, bs); - - return (false); } ! return (true); ! } /*langsymbolreference*/ ! static boolean gettokenvisit (bigstring bsname, hdlhashnode hnode, tyvaluerecord val, ptrvoid refcon) { #pragma unused(bsname, hnode, refcon) if (val.valuetype != tokenvaluetype) return (false); ! return (val.data.tokenvalue == functiontoken); ! } /*gettokenvisit*/ ! ! ! static boolean gettokenname (bigstring bsname) { ! register boolean fl; fl = hashinversesearch (hbuiltinfunctions, &gettokenvisit, nil, bsname); - return (fl); ! } /*gettokenname*/ ! void initvalue (tyvaluerecord *val, tyvaluetype type) { ! ! /* ! call this routine to set the type and clear other fields of a new value ! */ ! (*val).valuetype = type; - (*val).data.longvalue = 0; - (*(tyfastflagsvaluerecord *) val).flags = 0; ! } /*initvalue*/ ! boolean setnilvalue (tyvaluerecord *val) { ! initvalue (val, novaluetype); - return (true); ! } /*setnilvalue*/ ! boolean setbooleanvalue (boolean fl, tyvaluerecord *val) { ! ! /* ! set val to be a the boolean value fl. can't fail. ! */ (*val).valuetype = booleanvaluetype; - (*val).data.flvalue = fl; - (*(tyfastflagsvaluerecord *) val).flags = 0; - return (true); ! } /*setbooleanvalue*/ ! boolean setcharvalue (byte ch, tyvaluerecord *val) { ! ! /* ! set val to be a the character value ch. can't fail. ! */ ! (*val).valuetype = charvaluetype; - (*val).data.chvalue = ch; - (*(tyfastflagsvaluerecord *) val).flags = 0; - return (true); ! } /*setcharvalue*/ --- 78,197 ---- ! typedef struct tyfastflagsvaluerecord ! { ! tyvaluetype valuetype; ! byte flags: 8; /*instead of 4 separate bits fields to clear*/ ! tyvaluedata data; ! } tyfastflagsvaluerecord; ! boolean ! langsymbolreference ( ! hdlhashtable htable, ! bigstring bs, ! tyvaluerecord *val, ! hdlhashnode *hnode) ! { /* a bundle that was getting replicated everywhere. look up the indicated name in the table, and return true with *val equal to its value if the symbol is defined. */ ! boolean fl; ! pushhashtable (htable); ! fl = langgetsymbolval (bs, val, hnode); pophashtable (); ! ! if (!fl) ! { ! if ( (htable == nil) ! && isemptystring (bs)) ! { langerror (niladdresserror); + } else + { langparamerror (unknownidentifiererror, bs); } ! return (false); ! } return (true); ! } /* langsymbolreference */ ! static boolean ! gettokenvisit ( ! bigstring bsname, ! hdlhashnode hnode, ! tyvaluerecord val, ! ptrvoid refcon) ! { #pragma unused(bsname, hnode, refcon) + if (val.valuetype != tokenvaluetype) return (false); ! return (val.data.tokenvalue == functiontoken); ! } /*gettokenvisit*/ ! ! ! static boolean ! gettokenname (bigstring bsname) ! { register boolean fl; fl = hashinversesearch (hbuiltinfunctions, &gettokenvisit, nil, bsname); return (fl); ! } /*gettokenname*/ ! void ! initvalue ( ! tyvaluerecord *val, ! tyvaluetype type) ! { ! // call this routine to set the type and clear other fields of a new value ! (*val).valuetype = type; (*val).data.longvalue = 0; (*(tyfastflagsvaluerecord *) val).flags = 0; ! } /*initvalue*/ ! boolean ! setnilvalue (tyvaluerecord *val) ! { initvalue (val, novaluetype); return (true); ! } /*setnilvalue*/ ! boolean ! setbooleanvalue ( ! boolean fl, ! tyvaluerecord *val) ! { ! // set val to be a the boolean value fl. can't fail. (*val).valuetype = booleanvaluetype; (*val).data.flvalue = fl; (*(tyfastflagsvaluerecord *) val).flags = 0; return (true); ! } /*setbooleanvalue*/ ! boolean ! setcharvalue ( ! byte ch, ! tyvaluerecord *val) ! { ! // set val to be a the character value ch. can't fail. ! (*val).valuetype = charvaluetype; (*val).data.chvalue = ch; (*(tyfastflagsvaluerecord *) val).flags = 0; return (true); ! } /*setcharvalue*/ *************** *** 222,225 **** --- 227,265 ---- } /*setlongvalue*/ + #if LONGINT_LONGDATE == 1 + boolean setlonglongintvalue (tylonglongint x, tyvaluerecord *val) { + + /* + set val to be a the long long value x. can't fail. + */ + + (*val).valuetype = longlongintvaluetype; + + **(*val).data.longlongintvalue = x; + + (*(tyfastflagsvaluerecord *) val).flags = 0; + + return (true); + } /* setlonglongintvalue */ + #endif + + + #if LONGINT_LONGDATE == 1 + boolean setlongdatevalue (tylonglongint x, tyvaluerecord *val) { + + /* + set val to be a the long date value x. can't fail. + */ + + (*val).valuetype = longdatetimevaluetype; + + **(*val).data.longlongintvalue = x; + + (*(tyfastflagsvaluerecord *) val).flags = 0; + + return (true); + } /* setlongdatevalue */ + #endif + boolean setdatevalue (unsigned long x, tyvaluerecord *val) { *************** *** 906,938 **** case listvaluetype: case recordvaluetype: ! #endif initvalue (vreturned, novaluetype); ! #ifdef flnewfeatures ! ! if (v.fldiskval) { ! /* ! 4.0.2b1 dmb: for disk-based scalars, the copy will be the actual ! data, while the original value (and the hashtable node) will still be on disk */ ! ! if (!dbrefhandle (v.data.diskvalue, &x)) ! return (false); ! } ! else { ! if (!copyhandle (v.data.binaryvalue, &x)) ! return (false); ! } ! #else ! if (!copyhandle (v.data.binaryvalue, &x)) return (false); ! ! #endif ! return (setheapvalue (x, v.valuetype, vreturned)); ! ! #ifdef oplanglists case listvaluetype: case recordvaluetype: --- 946,975 ---- case listvaluetype: case recordvaluetype: ! #endif initvalue (vreturned, novaluetype); ! #ifdef flnewfeatures ! if (v.fldiskval) { ! /* ! 4.0.2b1 dmb: for disk-based scalars, the copy will be the actual ! data, while the original value (and the hashtable node) will still be on disk */ ! ! if (!dbrefhandle (v.data.diskvalue, &x)) ! return (false); ! } ! else ! { if (!copyhandle (v.data.binaryvalue, &x)) return (false); ! } ! #else ! if (!copyhandle (v.data.binaryvalue, &x)) ! return (false); ! #endif return (setheapvalue (x, v.valuetype, vreturned)); ! ! #ifdef oplanglists case listvaluetype: case recordvaluetype: *************** *** 958,969 **** break; } /*switch*/ ! return (true); ! } /*copyvaluerecord*/ - #ifdef DATABASE_DEBUG ! void debug_disposevaluerecord (tyvaluerecord val, boolean fldisk, long line, char *sourcefile) #else --- 995,1011 ---- break; } /*switch*/ ! return (true); ! } /*copyvaluerecord*/ ! #ifdef DATABASE_DEBUG + void + debug_disposevaluerecord ( + tyvaluerecord val, + boolean fldisk, + long line, + char *sourcefile) #else *************** *** 972,976 **** #endif { - /* 9/24/92 dmb: never dispose code trees here; there's no such thing as --- 1014,1017 ---- *************** *** 1115,1160 **** if (v1 != nil) ! if ((*v1).fltmpstack) { //isgarbagetype ((*v1).valuetype)) { ! #ifdef oplanglists disposevaluerecord (*v1, true); ! #else releaseheaptmp ((Handle) (*v1).data.stringvalue); ! #endif ! } ! if (v2 != nil) ! if ((*v2).fltmpstack) { //isgarbagetype ((*v2).valuetype)) { ! #ifdef oplanglists disposevaluerecord (*v2, true); ! #else releaseheaptmp ((Handle) (*v2).data.stringvalue); ! #endif ! } ! ! } /*disposevalues*/ ! boolean stringisboolean (bigstring bs, boolean *flboolean) { ! alllower (bs); ! ! if (equalstrings (bs, bstrue)) { ! *flboolean = true; - return (true); ! } ! ! if (equalstrings (bs, bsfalse)) { ! *flboolean = false; - return (true);; ! } ! return (false); } /*stringisboolean*/ --- 1156,1203 ---- if (v1 != nil) ! { if ((*v1).fltmpstack) { //isgarbagetype ((*v1).valuetype)) { ! #ifdef oplanglists disposevaluerecord (*v1, true); ! #else releaseheaptmp ((Handle) (*v1).data.stringvalue); ! #endif ! } ! } ! if (v2 != nil) ! { if ((*v2).fltmpstack) { //isgarbagetype ((*v2).valuetype)) { ! #ifdef oplanglists disposevaluerecord (*v2, true); ! #else releaseheaptmp ((Handle) (*v2).data.stringvalue); ! #endif ! } ! } ! } /*disposevalues*/ ! boolean ! stringisboolean ( ! bigstring bs, ! boolean *flboolean) ! { alllower (bs); ! ! if (equalstrings (bs, bstrue)) ! { *flboolean = true; return (true); ! } ! ! if (equalstrings (bs, bsfalse)) ! { *flboolean = false; return (true);; ! } ! return (false); } /*stringisboolean*/ *************** *** 2033,2036 **** --- 2076,2096 ---- + static boolean longlongrangeerror (double f) { + + bigstring bs; + + if ( (f > 2147483647.0) + || (f < -2147483648.0)) + { + floattostring (f, bs); + + langparamerror (floattolongerror, bs); + + return (true); + } + return (false); + } /*longrangeerror*/ + + boolean coercetolong (tyvaluerecord *v) { *************** *** 2146,2149 **** --- 2206,2328 ---- + #if LONGINT_LONGDATE == 1 + boolean coercetolonglong (tyvaluerecord *v) { + + /* + kw - 2006-01-30 --- new; modelled after coercetolong + dmb:must releaseheaptmp when coercing binary type + + */ + + tylonglongint x; + double f; + + switch ((*v).valuetype) { + + case longvaluetype: + // kwtodo - 2006-01-30 + return (true); + + case novaluetype: + if (flinhibitnilcoercion) + return (false); + + x = 0; + + break; + + case booleanvaluetype: + x = (tylonglongint) (*v).data.flvalue; + + break; + + case charvaluetype: + x = (tylonglongint) (*v).data.chvalue; + + break; + + case intvaluetype: + x = (tylonglongint) (*v).data.intvalue; + + break; + + case directionvaluetype: + x = (tylonglongint) (*v).data.dirvalue; + + break; + + case datevaluetype: + x = (tylonglongint) (*v).data.datevalue; + + break; + + case stringvaluetype: + // kwtodo - 2006-01-30 + return (stringtolong (v)); + + case ostypevaluetype: + x = 0 & (tylonglongint) (*v).data.ostypevalue; + break; + + case pointvaluetype: + x = (tylonglongint) (*v).data.ostypevalue; + break; + + #ifdef MACVERSION + case fixedvaluetype: + x = (tylonglongint) FixRound ((*v).data.fixedvalue); + break; + #endif + + case singlevaluetype: + f = (*v).data.singlevalue; + + if (longrangeerror (f)) + return (false); + + x = (long) f; + + break; + + case doublevaluetype: + f = **(*v).data.doublevalue; + + if (longrangeerror (f)) + return (false); + + x = (long) f; + + break; + + case binaryvaluetype: { + long n; + register Handle h = (*v).data.binaryvalue; + + if (!getbinarynumber (h, &n)) + return (binarytoscalar (v, longvaluetype)); + + x = n; + + releaseheaptmp (h); + + break; + } + + case listvaluetype: + case recordvaluetype: + return (coercelistvalue (v, longvaluetype)); + + default: + langerror (longcoerceerror); + + return (false); + } /*switch*/ + + return (setlongvalue (x, v)); + } /* coercetolong */ + #endif + + + static boolean coercetolongfortype (tyvaluerecord *v, tyvaluetype type) { *************** *** 8814,8819 **** return (builtinvalue ((tyfunctype) val.data.tokenvalue, hparam1, vreturned)); } /*functionvalue*/ - - - - --- 8993,8994 ---- Index: osacomponent.c =================================================================== RCS file: /cvsroot/frontierkernel/Frontier/Common/source/osacomponent.c,v retrieving revision 1.7 retrieving revision 1.7.6.1 diff -C2 -d -r1.7 -r1.7.6.1 *** osacomponent.c 11 Jan 2005 22:48:10 -0000 1.7 --- osacomponent.c 31 Jan 2006 16:43:31 -0000 1.7.6.1 *************** *** 1260,1265 **** AEDesc list; register ScrpSTElement *pstyle; ! ! #ifdef fldegug if (totype != typeStyledText) --- 1260,1266 ---- AEDesc list; register ScrpSTElement *pstyle; ! ! // kw -2006-01-28 --- typo, was "degug" ! #ifdef fldebug if (totype != typeStyledText) *************** *** 3222,3227 **** long curA5 = SetUpAppA5 (); #endif ! ! #ifdef fldegug if ((*desc).descriptorType != typeInsertionLoc) --- 3223,3229 ---- long curA5 = SetUpAppA5 (); #endif ! ! // kw -2006-01-28 --- typo, was "degug" ! #ifdef fldebug if ((*desc).descriptorType != typeInsertionLoc) |
|
From: Karsten W. <kar...@us...> - 2006-01-31 16:41:54
|
Update of /cvsroot/frontierkernel/Frontier/Common/UserLandIACToolkit In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv31854/d Modified Files: Tag: pre_int64_branch land.c landsystem7.c Log Message: initial checkin from private sandbox Index: landsystem7.c =================================================================== RCS file: /cvsroot/frontierkernel/Frontier/Common/UserLandIACToolkit/landsystem7.c,v retrieving revision 1.6 retrieving revision 1.6.6.1 diff -C2 -d -r1.6 -r1.6.6.1 *** landsystem7.c 11 Jan 2005 22:47:59 -0000 1.6 --- landsystem7.c 31 Jan 2006 16:41:41 -0000 1.6.6.1 *************** *** 337,344 **** */ ! #if TARGET_API_MAC_CARBON == 1 //what the hell do I do here? return true; ! #else register OSErr err; --- 337,345 ---- */ ! #if TARGET_API_MAC_CARBON == 1 ! #pragma unused(adr) //what the hell do I do here? return true; ! #else register OSErr err; *************** *** 427,430 **** --- 428,432 ---- pascal boolean landstring2networkaddress (ConstStr255Param bsadr, tynetworkaddress *adr) { + #pragma unused(bsadr, adr) /* *************** *** 557,563 **** return (true); ! #else return false; ! #endif } /*landbrowsenetworkapps*/ --- 559,566 ---- return (true); ! #else ! #pragma unused(bsprompt, adr, id) return false; ! #endif } /*landbrowsenetworkapps*/ *************** *** 1056,1059 **** --- 1059,1063 ---- static pascal OSErr landsystem7replyroutine (AppleEvent *message, AppleEvent *reply, long refcon) { + #pragma unused(reply, refcon) /* *************** *** 1091,1094 **** --- 1095,1099 ---- static pascal OSErr landsystem7openapproutine (AppleEvent *message, AppleEvent *reply, long refcon) { + #pragma unused(message, reply, refcon) /* *************** *** 1166,1169 **** --- 1171,1175 ---- static pascal OSErr landsystem7opendocsroutine (AppleEvent *message, AppleEvent *reply, long refcon) { + #pragma unused(reply, refcon) /* *************** *** 1193,1196 **** --- 1199,1203 ---- static pascal OSErr landsystem7quitapproutine (AppleEvent *message, AppleEvent *reply, long refcon) { + #pragma unused(message, reply, refcon) /* *************** *** 2037,2041 **** ! static pascal OSErr whyinternational (DescType itxt, const void *x, Size len, DescType text, SInt32 refcon, AEDesc *result) { if (*(short *) x != smRoman) /*can't treat this as plain text*/ --- 2044,2057 ---- ! static pascal OSErr ! whyinternational ( ! DescType itxt, ! const void *x, ! Size len, ! DescType text, ! SInt32 refcon, ! AEDesc *result) ! { ! #pragma unused(itxt, refcon) if (*(short *) x != smRoman) /*can't treat this as plain text*/ Index: land.c =================================================================== RCS file: /cvsroot/frontierkernel/Frontier/Common/UserLandIACToolkit/land.c,v retrieving revision 1.4 retrieving revision 1.4.6.1 diff -C2 -d -r1.4 -r1.4.6.1 *** land.c 11 Jan 2005 22:47:59 -0000 1.4 --- land.c 31 Jan 2006 16:41:41 -0000 1.4.6.1 *************** *** 634,639 **** ! pascal boolean landsetapplicationid (tyapplicationid tynewid) { ! return (false); --- 634,641 ---- ! pascal boolean ! landsetapplicationid (tyapplicationid tynewid) ! { ! #pragma unused(tynewid) return (false); |
|
From: Karsten W. <kar...@us...> - 2006-01-31 16:41:49
|
Update of /cvsroot/frontierkernel/Frontier/Common/SystemHeaders In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv31854/SystemHeaders Modified Files: Tag: pre_int64_branch land.h Log Message: initial checkin from private sandbox Index: land.h =================================================================== RCS file: /cvsroot/frontierkernel/Frontier/Common/SystemHeaders/land.h,v retrieving revision 1.6 retrieving revision 1.6.2.1 diff -C2 -d -r1.6 -r1.6.2.1 *** land.h 11 Sep 2005 02:39:18 -0000 1.6 --- land.h 31 Jan 2006 16:41:41 -0000 1.6.2.1 *************** *** 169,174 **** fsspectype = typeFSS, /*a Macintosh filespec*/ ! objectspectype = cObjectSpecifier /*a Mac object specifier, for Frontier, not fully supported in Toolkit*/ } typaramtype; --- 169,179 ---- fsspectype = typeFSS, /*a Macintosh filespec*/ ! objectspectype = cObjectSpecifier /*a Mac object specifier, for Frontier, not fully supported in Toolkit*/ + + #if LONGINT_LONGDATE == 1 + ,longlonginttype = 'comp', + longdatetimetype = 'ldt ' + #endif } typaramtype; *************** *** 302,339 **** typedef struct tyverbrecord { ! ! tyverbclass verbclass; /*4-byte class, often same as receiver id*/ ! ! tyverbtoken verbtoken; /*4-byte token, e.g. 'save', 'go '*/ ! ! tyapplicationid idreceiver; /*signature of the receiver, for outgoing verbs*/ ! ! tyapplicationid idsender; /*signature of the caller, for incoming verbs*/ ! ! long idtransaction; /*for use by caller*/ ! ! Handle transportinfo; /*info the transport layer needs*/ ! ! boolean flverbgetsnoreply : 1; /*set true before landsendverb call*/ ! ! boolean flnextparamisoptional : 1; /*set true before landgetxxxparam call*/ ! ! boolean flverbisdirect: 1; /*set true if verb is to be dispatched directly to code extension*/ ! ! boolean flsystemverb: 1; /*verb was received by a system event handler*/ ! ! Handle hdirectcode; /*for code extension*/ ! ! short ctparams; /*number of items in the params array*/ ! ! #if 0 /*sys6*/ ! ! short nextparam; /*next open slot in the params array*/ ! ! typaramrecord params []; /*variable-length array of parameters*/ ! ! #endif ! ! long landrefcon; /*for client use*/ } tyverbrecord, *ptrverbrecord, **hdlverbrecord; --- 307,328 ---- typedef struct tyverbrecord { ! ! tyverbclass verbclass; /*4-byte class, often same as receiver id*/ ! tyverbtoken verbtoken; /*4-byte token, e.g. 'save', 'go '*/ ! tyapplicationid idreceiver; /*signature of the receiver, for outgoing verbs*/ ! tyapplicationid idsender; /*signature of the caller, for incoming verbs*/ ! long idtransaction; /*for use by caller*/ ! Handle transportinfo; /*info the transport layer needs*/ ! boolean flverbgetsnoreply : 1; /*set true before landsendverb call*/ ! boolean flnextparamisoptional : 1; /*set true before landgetxxxparam call*/ ! boolean flverbisdirect: 1; /*set true if verb is to be dispatched directly to code extension*/ ! boolean flsystemverb: 1; /*verb was received by a system event handler*/ ! Handle hdirectcode; /*for code extension*/ ! short ctparams; /*number of items in the params array*/ ! #if 0 /*sys6*/ ! short nextparam; /*next open slot in the params array*/ ! typaramrecord params []; /*variable-length array of parameters*/ ! #endif ! long landrefcon; /*for client use*/ } tyverbrecord, *ptrverbrecord, **hdlverbrecord; *************** *** 412,485 **** } tyfastverbcontext; ! typedef struct tylandglobals { ! ! boolean flconnected; /*tells us if we can do IAC or not*/ ! ! boolean flacceptanyverb; /*determines whether all verbs are accepted by landhandleverb*/ ! ! tytransport transport; /*set by landinit, indicates which transport we're using*/ ! ! tyapplicationid applicationid; /*the creator id of the application we're inside of*/ ! ! short iderrorlist; /*resource id of STR# list which holds error messages*/ ! ! hdlverbarray verbarray; /*holds all registered verbs*/ ! ! WindowPtr statswindow; /*if non-nil, the stats window is open*/ ! ! tyverbclass currentclass; /*set by landaddclass*/ ! ! pascal boolean (*handleverbroutine) (hdlverbrecord); /*if non-nil, gets all verbs we don't handle*/ ! ! pascal boolean (*findhandlerroutine) (hdlverbrecord); /*for handling wildcard verbs*/ ! ! landeventrecordcallback breakembraceroutine; /*if non-nil, break a synchronous deadly embrace*/ ! ! /*landcallback menuscriptcompleteroutine; /%if non-nil, callback when script completes*/ ! /*names that begin with "mac" are inherently NOT cross-platform*/ ! ! landnoparamcallback macopenapproutine; /*system 7 open application event handler*/ ! ! landfilespeccallback macopendocroutine; /*system 7 open document event handler*/ ! ! landfilespeccallback macprintdocroutine; /*system 7 print document event handler*/ ! ! landnoparamcallback macquitapproutine; /*system 7 quit application event handler*/ ! ! tyapplicationid maceventsender; /*id of app that invoked macxxxroutine*/ ! ! tyeventcreatecallback eventcreatecallback; /*for OSA support*/ ! ! tyeventsendcallback eventsendcallback; /*for OSA support*/ ! ! tymacnetglobals macnetglobals; /*info for system 7 network transport*/ ! ! boolean fldirtyruntimemenus; /*program's runtime menus need updating*/ ! ! boolean flscriptcancelled; /*indicate that menu script has been cancelled*/ ! ! long idmenuscript; /*if not 0, Frontier's id for the currently running script*/ ! ! hdlmenuarray hmenuarray; /*we keep a copy of the menuarray data structure*/ ! ! tysystem6processid system6processid; /*the INIT's id for our mailbox*/ ! ! short ipcrefnum; /*for system 6, the refnum of the UserLand INIT driver*/ ! ! Handle hqueue; /*for system 6, queues message that arrive while we're waiting for a response*/ ! ! short maxqueuedepth; /*for stats window -- the longest chain in the system 6 queue*/ ! /*Handle mactypes; /%for system 7, maps our param types to Apple's*/ ! ! long initialfreemem; /*for stats window -- the amount of memory free after landinit*/ ! tymaceventsettings eventsettings; ! ! OSErr landerrorcode; /*error code that caused land call to return false*/ ! ! } tylandglobals, *ptrlandglobals, **hdllandglobals; --- 401,443 ---- } tyfastverbcontext; ! typedef struct tylandglobals { ! boolean flconnected; /*tells us if we can do IAC or not*/ ! boolean flacceptanyverb; /*determines whether all verbs are accepted by landhandleverb*/ ! tytransport transport; /*set by landinit, indicates which transport we're using*/ ! tyapplicationid applicationid; /*the creator id of the application we're inside of*/ ! short iderrorlist; /*resource id of STR# list which holds error messages*/ ! hdlverbarray verbarray; /*holds all registered verbs*/ ! WindowPtr statswindow; /*if non-nil, the stats window is open*/ ! tyverbclass currentclass; /*set by landaddclass*/ ! pascal boolean (*handleverbroutine) (hdlverbrecord); /*if non-nil, gets all verbs we don't handle*/ ! pascal boolean (*findhandlerroutine) (hdlverbrecord); /*for handling wildcard verbs*/ ! landeventrecordcallback breakembraceroutine; /*if non-nil, break a synchronous deadly embrace*/ ! ! /*landcallback menuscriptcompleteroutine; /%if non-nil, callback when script completes*/ /*names that begin with "mac" are inherently NOT cross-platform*/ ! ! landnoparamcallback macopenapproutine; /*system 7 open application event handler*/ ! landfilespeccallback macopendocroutine; /*system 7 open document event handler*/ ! landfilespeccallback macprintdocroutine; /*system 7 print document event handler*/ ! landnoparamcallback macquitapproutine; /*system 7 quit application event handler*/ ! tyapplicationid maceventsender; /*id of app that invoked macxxxroutine*/ ! tyeventcreatecallback eventcreatecallback; /*for OSA support*/ ! tyeventsendcallback eventsendcallback; /*for OSA support*/ ! tymacnetglobals macnetglobals; /*info for system 7 network transport*/ ! boolean fldirtyruntimemenus; /*program's runtime menus need updating*/ ! boolean flscriptcancelled; /*indicate that menu script has been cancelled*/ ! long idmenuscript; /*if not 0, Frontier's id for the currently running script*/ ! hdlmenuarray hmenuarray; /*we keep a copy of the menuarray data structure*/ ! tysystem6processid system6processid; /*the INIT's id for our mailbox*/ ! short ipcrefnum; /*for system 6, the refnum of the UserLand INIT driver*/ ! Handle hqueue; /*for system 6, queues message that arrive while we're waiting for a response*/ ! short maxqueuedepth; /*for stats window -- the longest chain in the system 6 queue*/ ! /*Handle mactypes; /%for system 7, maps our param types to Apple's*/ ! long initialfreemem; /*for stats window -- the amount of memory free after landinit*/ tymaceventsettings eventsettings; ! OSErr landerrorcode; /*error code that caused land call to return false*/ ! } tylandglobals, *ptrlandglobals, **hdllandglobals; |
|
From: Karsten W. <kar...@us...> - 2006-01-31 16:40:18
|
Update of /cvsroot/frontierkernel/Frontier/Common/headers In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv31416 Modified Files: Tag: pre_int64_branch frontierdefs.h lang.h macconv.h stringdefs.h Log Message: initial checkin from private sandbox Index: macconv.h =================================================================== RCS file: /cvsroot/frontierkernel/Frontier/Common/headers/macconv.h,v retrieving revision 1.4 retrieving revision 1.4.6.1 diff -C2 -d -r1.4 -r1.4.6.1 *** macconv.h 11 Jan 2005 22:48:01 -0000 1.4 --- macconv.h 31 Jan 2006 16:40:09 -0000 1.4.6.1 *************** *** 152,155 **** --- 152,158 ---- typeLongInteger = 'long', typeShortInteger = 'shor', + // kw - 2006-01-27 --- new 64-bit int types + typeSInt64 = 'comp', + typeLongFloat = 'doub', typeShortFloat = 'sing', Index: stringdefs.h =================================================================== RCS file: /cvsroot/frontierkernel/Frontier/Common/headers/stringdefs.h,v retrieving revision 1.3 retrieving revision 1.3.6.1 diff -C2 -d -r1.3 -r1.3.6.1 *** stringdefs.h 11 Jan 2005 22:48:02 -0000 1.3 --- stringdefs.h 31 Jan 2006 16:40:09 -0000 1.3.6.1 *************** *** 75,78 **** --- 75,83 ---- #define STR_picture "\x07" "picture" + // kw - 2006-01-30 --- new types added + #define STR_longlongtype "\x09" "64bit-int" + #define STR_longdatetype "\x08" "longdate" + + #define STR_with "\x04" "with" #define STR_this "\x04" "this" Index: lang.h =================================================================== RCS file: /cvsroot/frontierkernel/Frontier/Common/headers/lang.h,v retrieving revision 1.8 retrieving revision 1.8.4.1 diff -C2 -d -r1.8 -r1.8.4.1 *** lang.h 13 Jan 2005 23:54:18 -0000 1.8 --- lang.h 31 Jan 2006 16:40:09 -0000 1.8.4.1 *************** *** 279,287 **** #ifdef xmlfeatures ! xmlvaluetype, ! #endif /*new types must be added at end of list, these get saved on disk*/ ! ctvaluetypes --- 279,292 ---- #ifdef xmlfeatures ! xmlvaluetype, ! #endif /*new types must be added at end of list, these get saved on disk*/ ! #if LONGINT_LONGDATE == 1 ! // kw - 2006-01-27 --- new types added ! longlongintvaluetype, ! ! longdatetimevaluetype, ! #endif ctvaluetypes *************** *** 289,312 **** ! typedef struct tydiskvalue { /*4.0.2b1 dmb*/ dbaddress adr; - Handle hvalue; ! ! } tydiskvalue, *ptrdiskvalue, **hdldiskvalue; typedef union tyvaluedata { ! ! boolean flvalue; ! ! byte chvalue; ! ! short intvalue; ! ! long longvalue; ! ! unsigned long datevalue; #ifdef MACVERSION --- 294,321 ---- ! // kw - 2006-01-27 --- new longlong types ! ! #if LONGINT_LONGDATE == 1 ! # if defined (WIN95VERSION) ! typedef long long int tylonglongint; ! # endif ! # if defined (MACVERSION) ! typedef SInt64 tylonglongint; ! # endif ! #endif + + typedef struct tydiskvalue { /*4.0.2b1 dmb*/ dbaddress adr; Handle hvalue; ! } tydiskvalue, *ptrdiskvalue, **hdldiskvalue; typedef union tyvaluedata { ! boolean flvalue; ! byte chvalue; ! short intvalue; ! long longvalue; ! unsigned long datevalue; #ifdef MACVERSION *************** *** 318,322 **** OSType ostypevalue; - Handle stringvalue; --- 327,330 ---- *************** *** 325,408 **** */ ! hdlstring addressvalue; ! ! Handle binaryvalue; ! ! short tokenvalue; /*can be coerced to a tyfunctype, see note in langtokens.h*/ ! ! struct tytreenode **codevalue; /*implemented in UserLang*/ ! ! Handle externalvalue; /*structure is defined in langexternal.h*/ ! ! Point pointvalue; ! ! Rect **rectvalue; ! ! Pattern **patternvalue; ! ! RGBColor **rgbvalue; ! ! Fixed fixedvalue; ! ! float singlevalue; ! ! double **doublevalue; ! ! Handle objspecvalue; ! ! hdlfilespec filespecvalue; ! ! Handle aliasvalue; /*AliasHandle*/ ! ! OSType enumvalue; ! #ifdef oplanglists struct tylistrecord **listvalue; - struct tylistrecord **recordvalue; #else ! Handle listvalue; ! ! Handle recordvalue; #endif ! ! dbaddress diskvalue; /*4.0.2b1 dmb*/ ! } tyvaluedata; typedef struct tyvaluerecord { ! ! tyvaluetype valuetype; ! /*flags are never set in the database; used at runtime only*/ ! byte fltmpdata: 1; /*set when value data is handle to original, and needs duplication*/ ! ! byte fltmpstack: 1; /*set when value data is in the temp stack, and is volatile*/ ! ! byte flformalval: 1; /*set when value is set as default by function header*/ ! ! byte fldiskval: 1; /*set when value data points to disk block of actual value*/ ! tyvaluedata data; ! } tyvaluerecord; typedef struct tytreenode { - tytreetype nodetype; /*add, subtract, if, etc.*/ - - tyvaluerecord nodeval; /*the value stored at this level of the tree*/ - - struct tytreenode **link; /*links parameter lists, statement lists*/ - - unsigned long lnum; /*which line number in the source was this node generated from?*/ - - byte charnum; /*at what character offset? max is 255*/ - - byte ctparams; /*number of params actually allocated, max is 4*/ - /*param1 - param4 must be at the end of the record - see newtreenode*/ ! struct tytreenode **param1, **param2, **param3, **param4; } tytreenode, *ptrtreenode, **hdltreenode; --- 333,393 ---- */ ! hdlstring addressvalue; ! Handle binaryvalue; ! short tokenvalue; /*can be coerced to a tyfunctype, see note in langtokens.h*/ ! struct tytreenode **codevalue; /*implemented in UserLang*/ ! Handle externalvalue; /*structure is defined in langexternal.h*/ ! Point pointvalue; ! Rect **rectvalue; ! Pattern **patternvalue; ! RGBColor **rgbvalue; ! Fixed fixedvalue; ! float singlevalue; ! double **doublevalue; ! Handle objspecvalue; ! hdlfilespec filespecvalue; ! Handle aliasvalue; /*AliasHandle*/ ! OSType enumvalue; ! #ifdef oplanglists struct tylistrecord **listvalue; struct tylistrecord **recordvalue; #else ! Handle listvalue; ! Handle recordvalue; #endif ! ! dbaddress diskvalue; /*4.0.2b1 dmb*/ ! #if LONGINT_LONGDATE == 1 ! tylonglongint **longlongintvalue; ! tylonglongint **longdatevalue; ! #endif ! } tyvaluedata; typedef struct tyvaluerecord { ! tyvaluetype valuetype; ! /*flags are never set in the database; used at runtime only*/ ! byte fltmpdata: 1; /*set when value data is handle to original, and needs duplication*/ ! byte fltmpstack: 1; /*set when value data is in the temp stack, and is volatile*/ ! byte flformalval: 1; /*set when value is set as default by function header*/ ! byte fldiskval: 1; /*set when value data points to disk block of actual value*/ ! tyvaluedata data; ! } tyvaluerecord; typedef struct tytreenode { + tytreetype nodetype; /*add, subtract, if, etc.*/ + tyvaluerecord nodeval; /*the value stored at this level of the tree*/ + struct tytreenode **link; /*links parameter lists, statement lists*/ + unsigned long lnum; /*which line number in the source was this node generated from?*/ + byte charnum; /*at what character offset? max is 255*/ + byte ctparams; /*number of params actually allocated, max is 4*/ /*param1 - param4 must be at the end of the record - see newtreenode*/ ! struct tytreenode **param1, **param2, **param3, **param4; } tytreenode, *ptrtreenode, **hdltreenode; Index: frontierdefs.h =================================================================== RCS file: /cvsroot/frontierkernel/Frontier/Common/headers/frontierdefs.h,v retrieving revision 1.7 retrieving revision 1.7.6.1 diff -C2 -d -r1.7 -r1.7.6.1 *** frontierdefs.h 11 Jan 2005 22:48:01 -0000 1.7 --- frontierdefs.h 31 Jan 2006 16:40:09 -0000 1.7.6.1 *************** *** 81,84 **** --- 81,86 ---- #undef fltracklocaladdresses /*2004-12-08 aradke: disable [buggy] code for tracking deleted local addresses*/ + // kw 2006-01-27 --- make new data types + #define LONGINT_LONGDATE 1 #ifdef MACVERSION |
|
From: Karsten W. <kar...@us...> - 2006-01-31 16:33:40
|
Update of /cvsroot/frontierkernel/Frontier/Common/IOAToolkit In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29072 Modified Files: Tag: pre_int64_branch ioabutton.c ioacheckbox.c ioaicon.c ioapopup.c ioastatic.c Log Message: warning fixes Index: ioastatic.c =================================================================== RCS file: /cvsroot/frontierkernel/Frontier/Common/IOAToolkit/ioastatic.c,v retrieving revision 1.3 retrieving revision 1.3.6.1 diff -C2 -d -r1.3 -r1.3.6.1 *** ioastatic.c 11 Jan 2005 22:47:38 -0000 1.3 --- ioastatic.c 31 Jan 2006 16:33:23 -0000 1.3.6.1 *************** *** 106,110 **** static boolean debugstatic (hdlobject h, bigstring errorstring) { ! setstringlength (errorstring, 0); --- 106,111 ---- static boolean debugstatic (hdlobject h, bigstring errorstring) { ! #pragma unused (h) ! setstringlength (errorstring, 0); *************** *** 134,138 **** static boolean initstatic (tyobject *obj) { ! return (true); /*we do want to edit it*/ } /*initstatic*/ --- 135,140 ---- static boolean initstatic (tyobject *obj) { ! #pragma unused (obj) ! return (true); /*we do want to edit it*/ } /*initstatic*/ *************** *** 140,144 **** static boolean recalcstatic (hdlobject h, boolean flmajorrecalc) { ! return (IOArecalcobjectvalue (h)); } /*recalcstatic*/ --- 142,147 ---- static boolean recalcstatic (hdlobject h, boolean flmajorrecalc) { ! #pragma unused (flmajorrecalc) ! return (IOArecalcobjectvalue (h)); } /*recalcstatic*/ Index: ioapopup.c =================================================================== RCS file: /cvsroot/frontierkernel/Frontier/Common/IOAToolkit/ioapopup.c,v retrieving revision 1.5 retrieving revision 1.5.6.1 diff -C2 -d -r1.5 -r1.5.6.1 *** ioapopup.c 11 Jan 2005 22:47:38 -0000 1.5 --- ioapopup.c 31 Jan 2006 16:33:23 -0000 1.5.6.1 *************** *** 386,395 **** (*r).bottom = (*r).top + height; ! /*side-effect -- we use the popup width when drawing the object*/ { ! ! hdlpopupdata hdata = (hdlpopupdata) (**h).objectdata; ! ! (**hdata).popupwidth = popupwidth; ! } return (true); --- 386,395 ---- (*r).bottom = (*r).top + height; ! /*side-effect -- we use the popup width when drawing the object*/ ! { ! hdlpopupdata lhdata = (hdlpopupdata) (**h).objectdata; ! ! (**lhdata).popupwidth = popupwidth; ! } return (true); *************** *** 421,425 **** static boolean clickpopup (hdlobject listhead, hdlobject h, Point pt, boolean flshiftkey, boolean fl2click) { ! hdlpopupdata hdata = (hdlpopupdata) (**h).objectdata; hdlcard hc = (**h).owningcard; --- 421,426 ---- static boolean clickpopup (hdlobject listhead, hdlobject h, Point pt, boolean flshiftkey, boolean fl2click) { ! #pragma unused (listhead, flshiftkey, fl2click) ! hdlpopupdata hdata = (hdlpopupdata) (**h).objectdata; hdlcard hc = (**h).owningcard; *************** *** 517,523 **** #if TARGET_API_MAC_CARBON == 1 ! static void MyThemeButtonDrawCallback (const Rect *bounds, ThemeButtonKind kind, const ThemeButtonDrawInfo *info, ! UInt32 refcon, SInt16 depth, Boolean isColorDev) { ! /* 7.0b48 PBS: draw the label for a popup menu. --- 518,532 ---- #if TARGET_API_MAC_CARBON == 1 ! static void ! MyThemeButtonDrawCallback ( ! const Rect *bounds, ! ThemeButtonKind kind, ! const ThemeButtonDrawInfo *info, ! UInt32 refcon, ! SInt16 depth, ! Boolean isColorDev) ! { ! #pragma unused (kind, info, depth, isColorDev) ! /* 7.0b48 PBS: draw the label for a popup menu. *************** *** 674,678 **** static boolean recalcpopup (hdlobject h, boolean flmajorrecalc) { ! bigstring errorstring; Handle htoss; --- 683,688 ---- static boolean recalcpopup (hdlobject h, boolean flmajorrecalc) { ! #pragma unused (flmajorrecalc) ! bigstring errorstring; Handle htoss; *************** *** 729,733 **** static boolean canreplicatepopup (hdlobject h) { ! return (true); } /*canreplicatepopup*/ --- 739,744 ---- static boolean canreplicatepopup (hdlobject h) { ! #pragma unused (h) ! return (true); } /*canreplicatepopup*/ *************** *** 766,770 **** static boolean debugpopup (hdlobject h, bigstring errorstring) { ! setstringlength (errorstring, 0); --- 777,782 ---- static boolean debugpopup (hdlobject h, bigstring errorstring) { ! #pragma unused (h) ! setstringlength (errorstring, 0); Index: ioabutton.c =================================================================== RCS file: /cvsroot/frontierkernel/Frontier/Common/IOAToolkit/ioabutton.c,v retrieving revision 1.4 retrieving revision 1.4.6.1 diff -C2 -d -r1.4 -r1.4.6.1 *** ioabutton.c 11 Jan 2005 22:47:38 -0000 1.4 --- ioabutton.c 31 Jan 2006 16:33:23 -0000 1.4.6.1 *************** *** 68,72 **** static boolean canreplicatebutton (hdlobject h) { ! return (true); /*it can be replicated*/ } /*canreplicatebutton*/ --- 68,72 ---- static boolean canreplicatebutton (hdlobject h) { ! #pragma unused (h) return (true); /*it can be replicated*/ } /*canreplicatebutton*/ *************** *** 100,104 **** static boolean debugbutton (hdlobject h, bigstring errorstring) { ! setstringlength (errorstring, 0); --- 100,104 ---- static boolean debugbutton (hdlobject h, bigstring errorstring) { ! #pragma unused (h) setstringlength (errorstring, 0); *************** *** 108,119 **** #if TARGET_API_MAC_CARBON == 1 - static void MyThemeButtonDrawCallback (const Rect *bounds, ThemeButtonKind kind, const ThemeButtonDrawInfo *info, - UInt32 refcon, SInt16 depth, Boolean isColorDev) { - - /* - 7.0b48 PBS: draw the label for a popup menu. - */ - Handle htext = (Handle) refcon; ThemeFontID idfont; --- 108,125 ---- #if TARGET_API_MAC_CARBON == 1 + static void + MyThemeButtonDrawCallback ( + const Rect *bounds, + ThemeButtonKind kind, + const ThemeButtonDrawInfo *info, + UInt32 refcon, + SInt16 depth, + Boolean isColorDev) + { + #pragma unused (kind, info, depth, isColorDev) + /* + 7.0b48 PBS: draw the label for a popup menu. + */ Handle htext = (Handle) refcon; ThemeFontID idfont; Index: ioaicon.c =================================================================== RCS file: /cvsroot/frontierkernel/Frontier/Common/IOAToolkit/ioaicon.c,v retrieving revision 1.3 retrieving revision 1.3.6.1 diff -C2 -d -r1.3 -r1.3.6.1 *** ioaicon.c 11 Jan 2005 22:47:38 -0000 1.3 --- ioaicon.c 31 Jan 2006 16:33:23 -0000 1.3.6.1 *************** *** 95,99 **** static boolean canreplicateicon (hdlobject h) { ! return (true); /*it can be replicated*/ } /*canreplicateicon*/ --- 95,100 ---- static boolean canreplicateicon (hdlobject h) { ! #pragma unused (h) ! return (true); /*it can be replicated*/ } /*canreplicateicon*/ *************** *** 107,111 **** static boolean debugicon (hdlobject h, bigstring errorstring) { ! setstringlength (errorstring, 0); --- 108,113 ---- static boolean debugicon (hdlobject h, bigstring errorstring) { ! #pragma unused (h) ! setstringlength (errorstring, 0); *************** *** 210,214 **** static boolean recalciconobject (hdlobject h, boolean flmajorrecalc) { ! return (IOArecalcobjectvalue (h)); } /*recalciconobject*/ --- 212,217 ---- static boolean recalciconobject (hdlobject h, boolean flmajorrecalc) { ! #pragma unused (flmajorrecalc) ! return (IOArecalcobjectvalue (h)); } /*recalciconobject*/ *************** *** 325,336 **** } /*unpackicondata*/ ! ! static boolean clickicon (hdlobject listhead, hdlobject h, Point pt, boolean flshiftkey, boolean fl2click) { ! hdlicondata hdata = (hdlicondata) (**h).objectdata; ! tyiconclickcallback callback = (**hdata).iconclick; ! if (callback != nil) ! return ((*callback) (h, fl2click)); if (fl2click) --- 328,347 ---- } /*unpackicondata*/ ! ! static boolean ! clickicon ( ! hdlobject listhead, ! hdlobject h, ! Point pt, ! boolean flshiftkey, ! boolean fl2click) ! { ! #pragma unused (listhead, pt, flshiftkey) ! hdlicondata hdata = (hdlicondata) (**h).objectdata; ! tyiconclickcallback lcallback = (**hdata).iconclick; ! if (lcallback != nil) ! return ((*lcallback) (h, fl2click)); if (fl2click) Index: ioacheckbox.c =================================================================== RCS file: /cvsroot/frontierkernel/Frontier/Common/IOAToolkit/ioacheckbox.c,v retrieving revision 1.3 retrieving revision 1.3.6.1 diff -C2 -d -r1.3 -r1.3.6.1 *** ioacheckbox.c 11 Jan 2005 22:47:38 -0000 1.3 --- ioacheckbox.c 31 Jan 2006 16:33:23 -0000 1.3.6.1 *************** *** 80,84 **** static boolean canreplicatecheckbox (hdlobject h) { ! return (true); /*it can be replicated*/ } /*canreplicatecheckbox*/ --- 80,85 ---- static boolean canreplicatecheckbox (hdlobject h) { ! #pragma unused (h) ! return (true); /*it can be replicated*/ } /*canreplicatecheckbox*/ *************** *** 108,112 **** static boolean debugcheckbox (hdlobject h, bigstring errorstring) { ! setstringlength (errorstring, 0); --- 109,114 ---- static boolean debugcheckbox (hdlobject h, bigstring errorstring) { ! #pragma unused (h) ! setstringlength (errorstring, 0); *************** *** 167,171 **** static boolean initcheckbox (tyobject *obj) { ! return (true); /*nothing special, we do want to edit it*/ } /*initcheckbox*/ --- 169,174 ---- static boolean initcheckbox (tyobject *obj) { ! #pragma unused (obj) ! return (true); /*nothing special, we do want to edit it*/ } /*initcheckbox*/ *************** *** 173,177 **** static boolean recalccheckbox (hdlobject h, boolean flmajorrecalc) { ! bigstring errorstring; Handle hboolvalue; --- 176,180 ---- static boolean recalccheckbox (hdlobject h, boolean flmajorrecalc) { ! #pragma unused (flmajorrecalc) bigstring errorstring; Handle hboolvalue; *************** *** 187,191 **** static boolean clickcheckbox (hdlobject listhead, hdlobject h, Point pt, boolean flshiftkey, boolean fl2click) { ! (**h).objectflag = !(**h).objectflag; --- 190,194 ---- static boolean clickcheckbox (hdlobject listhead, hdlobject h, Point pt, boolean flshiftkey, boolean fl2click) { ! #pragma unused (listhead, pt, flshiftkey, fl2click) (**h).objectflag = !(**h).objectflag; |
|
From: creedon <icr...@us...> - 2006-01-30 01:42:14
|
Update of /cvsroot/frontierkernel/Frontier/Common/source In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20620 Modified Files: CallMachOFrameWork.c Log Message: change buf from 32 to 1024 to increase performance of function, we can do this now because fread is now in non-blocking mode, kernel remains repsonsive Index: CallMachOFrameWork.c =================================================================== RCS file: /cvsroot/frontierkernel/Frontier/Common/source/CallMachOFrameWork.c,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** CallMachOFrameWork.c 30 Jan 2006 00:15:24 -0000 1.9 --- CallMachOFrameWork.c 30 Jan 2006 01:42:04 -0000 1.10 *************** *** 65,68 **** --- 65,70 ---- /* + 2006-01-29 creedon: change buf from 32 to 1024 to increase performance of function, we can do this now because fread is now in non-blocking mode, kernel remains repsonsive + 2006-01-10 creedon: laid down the groundwork for a timeoutsecs parameter, what is a good default? longinfinity? several minutes? I know that some commands I've done have taken 15 - 30 minutes fread now reads in non-blocking mode, no error checking *************** *** 77,81 **** FILE *f; ! char buf [32]; long ct = 0; // unsigned long timeoutsecs = 60 * 5; --- 79,83 ---- FILE *f; ! char buf [1024]; long ct = 0; // unsigned long timeoutsecs = 60 * 5; |
|
From: creedon <icr...@us...> - 2006-01-30 00:15:33
|
Update of /cvsroot/frontierkernel/Frontier/Common/source In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv22727 Modified Files: CallMachOFrameWork.c Log Message: no functional change, my previous commit was missing some information in unixshellcall function... fread now reads in non-blocking mode, no error checking changed buf size from 256 to 32, makes envrionment more responsive added call to new unixshellcallbackgroundtask function so kernel doesn't lock up while waiting for a lot of data to be read Index: CallMachOFrameWork.c =================================================================== RCS file: /cvsroot/frontierkernel/Frontier/Common/source/CallMachOFrameWork.c,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** CallMachOFrameWork.c 29 Jan 2006 19:53:53 -0000 1.8 --- CallMachOFrameWork.c 30 Jan 2006 00:15:24 -0000 1.9 *************** *** 326,330 **** if (inmainthread ()) { EventRecord ev; ! short mask = osMask|activMask|mDownMask|keyDownMask; //|highLevelEventMask|updateMask long sleepTime = 6; // 1/10 of a second by default --- 326,330 ---- if (inmainthread ()) { EventRecord ev; ! short mask = osMask|activMask|mDownMask|keyDownMask; // |highLevelEventMask|updateMask long sleepTime = 6; // 1/10 of a second by default |
|
From: creedon <icr...@us...> - 2006-01-29 23:26:07
|
Update of /cvsroot/frontierkernel/Frontier/Common/headers In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv2487 Modified Files: CallMachOFrameWork.h Log Message: define F_GETFL, F_SETFL, and O_NONBLOCK for CodeWarrior compilation Index: CallMachOFrameWork.h =================================================================== RCS file: /cvsroot/frontierkernel/Frontier/Common/headers/CallMachOFrameWork.h,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** CallMachOFrameWork.h 15 Jan 2005 16:43:09 -0000 1.6 --- CallMachOFrameWork.h 29 Jan 2006 23:25:59 -0000 1.7 *************** *** 29,32 **** --- 29,41 ---- #define callmachoframework + /* 2006-01-29 creedon - define the following for CodeWarrior compilation because it doesn't have these defined in its headers, as Xcode does */ + + #ifdef __MWERKS__ + #define F_GETFL 3 /* get file status flags */ + #define F_SETFL 4 /* set file status flags */ + #define O_NONBLOCK 0x0004 /* no delay */ + #endif + + extern boolean unixshellcall (Handle hcommand, Handle hreturn); |
|
From: creedon <icr...@us...> - 2006-01-29 19:54:05
|
Update of /cvsroot/frontierkernel/Frontier/Common/source In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv27608 Modified Files: CallMachOFrameWork.c Log Message: fread now reads in non-blocking mode, no error checking Index: CallMachOFrameWork.c =================================================================== RCS file: /cvsroot/frontierkernel/Frontier/Common/source/CallMachOFrameWork.c,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** CallMachOFrameWork.c 15 Jan 2005 16:43:10 -0000 1.7 --- CallMachOFrameWork.c 29 Jan 2006 19:53:53 -0000 1.8 *************** *** 28,45 **** #include "frontier.h" #include "standard.h" #include "CallMachOFrameWork.h" #include "memory.h" ! /*System.framework functions: popen, pclose, and fread.*/ typedef FILE* (*popenptr) (const char* command, const char *type); typedef int (*pcloseptr) (FILE* f); typedef size_t (*freadptr) (void *ptr, size_t size, size_t nobj, FILE* f); ! static popenptr popenfunc; static pcloseptr pclosefunc; static freadptr freadfunc; static boolean unixshellcallinited = false; --- 28,55 ---- #include "frontier.h" #include "standard.h" + #include "threads.h" + #include "shell.h" + #include "lang.h" #include "CallMachOFrameWork.h" #include "memory.h" + #include "fcntl.h" /* 2006-01-10 creedon */ ! /*System.framework functions: popen, pclose, fread, fcntl, feof, and fileno.*/ typedef FILE* (*popenptr) (const char* command, const char *type); typedef int (*pcloseptr) (FILE* f); typedef size_t (*freadptr) (void *ptr, size_t size, size_t nobj, FILE* f); ! typedef int (*fcntlptr) (int fd, int cmd, int arg); /* 2006-01-10 creedon */ ! typedef int (*feofptr) (FILE *f); /* 2006-01-10 creedon */ ! typedef int (*filenoptr) (FILE *f); /* 2006-01-10 creedon */ ! static popenptr popenfunc; static pcloseptr pclosefunc; static freadptr freadfunc; + static fcntlptr fcntlfunc; /* 2006-01-10 creedon */ + static feofptr feoffunc; /* 2006-01-10 creedon */ + static filenoptr filenofunc; /* 2006-01-10 creedon */ static boolean unixshellcallinited = false; *************** *** 47,51 **** ! static boolean unixshellcallinit (void); /* forward declaration */ --- 57,63 ---- ! /* prototypes */ ! static boolean unixshellcallinit (void); ! static boolean unixshellcallbackgroundtask (void); *************** *** 53,66 **** /* ! 7.0b51: Call the UNIX popen command, which evaluates a string as if it were typed ! on the command line. Verb: sys.unixShellCommand. ! Code adapted by Timothy Paustian from Apple sample code. ! This routine by PBS. */ FILE *f; ! char buf [256]; long ct = 0; ! if (!unixshellcallinit ()) return (false); --- 65,85 ---- /* ! 2006-01-10 creedon: laid down the groundwork for a timeoutsecs parameter, what is a good default? longinfinity? several minutes? I know that some commands I've done have taken 15 - 30 minutes ! fread now reads in non-blocking mode, no error checking ! ! 2005-10-02 creedon: changed buf size from 256 to 32, makes envrionment more responsive ! added call to new unixshellcallbackgroundtask function so kernel doesn't lock up while waiting for a lot of data to be read ! ! 7.0b51: Call the UNIX popen command, which evaluates a string as if it were typed on the command line. Verb: sys.unixShellCommand. ! Code adapted by Timothy Paustian from Apple sample code. ! This routine by PBS. */ FILE *f; ! char buf [32]; long ct = 0; ! // unsigned long timeoutsecs = 60 * 5; ! // long timeoutticks = gettickcount () + (timeoutsecs * 60); ! if (!unixshellcallinit ()) return (false); *************** *** 75,88 **** unlockhandle (hcommand); while (true) { ct = freadfunc (buf, 1, sizeof buf, f); /*fread*/ ! if (ct > 0) if (!insertinhandle (hreturn, gethandlesize (hreturn), buf, ct)) break; ! if (ct < sizeof (buf)) break; } /*while*/ --- 94,120 ---- unlockhandle (hcommand); + fcntlfunc (filenofunc (f), F_SETFL, fcntlfunc (filenofunc (f), F_GETFL, 0) | O_NONBLOCK); + while (true) { ct = freadfunc (buf, 1, sizeof buf, f); /*fread*/ ! if (ct > 0) // { ! if (!insertinhandle (hreturn, gethandlesize (hreturn), buf, ct)) break; + + // timeoutticks = gettickcount () + (timeoutsecs * 60); + // } ! if (feoffunc (f)) break; + + /* if (gettickcount () > timeoutticks) + break; */ + + if (!unixshellcallbackgroundtask ()) + break; + } /*while*/ *************** *** 96,99 **** --- 128,133 ---- /* + 2006-01-10 creedon: added fcntlfunc, feoffunc and filenofunc + 7.0b51 PBS: load the bundle and get the function pointers the first time called. */ *************** *** 121,124 **** --- 155,173 ---- return (false); + fcntlfunc = (fcntlptr) CFBundleGetFunctionPointerForName (sysBundle, CFSTR ("fcntl")); + + if (fcntlfunc == nil) + return (false); + + feoffunc = (feofptr) CFBundleGetFunctionPointerForName (sysBundle, CFSTR ("feof")); + + if (feoffunc == nil) + return (false); + + filenofunc = (filenoptr) CFBundleGetFunctionPointerForName (sysBundle, CFSTR ("fileno")); + + if (filenofunc == nil) + return (false); + unixshellcallinited = true; *************** *** 266,267 **** --- 315,339 ---- } /*disposecfmfuncptr*/ + + static boolean unixshellcallbackgroundtask (void) { + + /* + 2005-10-02 creedon: created, cribbed from OpenTransportNetEvents.c: fwsbackgroundtask + */ + + boolean fl = true; + + if (inmainthread ()) { + EventRecord ev; + short mask = osMask|activMask|mDownMask|keyDownMask; //|highLevelEventMask|updateMask + long sleepTime = 6; // 1/10 of a second by default + + if (WaitNextEvent (mask, &ev, sleepTime, nil)) /* might return false to indicate a null event, but that's not an error */ + fl = shellprocessevent (&ev); + } + else + fl = langbackgroundtask (true); + + return (fl); + }/* unixshellcallbackgroundtask */ + |
|
From: creedon <icr...@us...> - 2006-01-29 19:10:32
|
Update of /cvsroot/frontierkernel/Frontier/Common/resources/Win32 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12055 Modified Files: WinLand.rc Log Message: ifdef macversion'ed open recent menu feature, it works on Mac OS X, and i need a Windows programmer with a few minutes to make it work on Windows Index: WinLand.rc =================================================================== RCS file: /cvsroot/frontierkernel/Frontier/Common/resources/Win32/WinLand.rc,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** WinLand.rc 31 Dec 2005 20:23:07 -0000 1.11 --- WinLand.rc 29 Jan 2006 19:10:24 -0000 1.12 *************** *** 238,242 **** --- 238,244 ---- MENUITEM "&New", newobjectmenu MENUITEM "&Open... \tCtrl+O", filemenu+openitem + #ifdef MACVERSION MENUITEM "Open Recent", filemenu+openrecentitem /* 2005-09-25 creedon */ + #endif MENUITEM SEPARATOR MENUITEM "&Close\tCtrl+W", filemenu+closeitem *************** *** 446,450 **** END ! openrecentmenu MENU DISCARDABLE BEGIN POPUP "Open Recent" --- 448,453 ---- END ! #ifdef MACVERSION ! openrecentmenu MENU DISCARDABLE /* 2005-09-25 creedon */ BEGIN POPUP "Open Recent" *************** *** 454,457 **** --- 457,461 ---- END END + #endif ///////////////////////////////////////////////////////////////////////////// |
|
From: creedon <icr...@us...> - 2006-01-28 04:06:08
|
Update of /cvsroot/frontierkernel/odbs/frontierRoot/system/verbs/apps/Manila/newsItem In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10605/newsItem Log Message: Directory /cvsroot/frontierkernel/odbs/frontierRoot/system/verbs/apps/Manila/newsItem added to the repository |
|
From: creedon <icr...@us...> - 2006-01-27 02:47:12
|
Update of /cvsroot/frontierkernel/odbs/frontierRoot/system/menus/modals In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1562 Modified Files: wptx Log Message: when saving a text file set f to the name of the object Index: wptx =================================================================== RCS file: /cvsroot/frontierkernel/odbs/frontierRoot/system/menus/modals/wptx,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** wptx 14 Jun 2005 02:40:18 -0000 1.2 --- wptx 27 Jan 2006 02:47:03 -0000 1.3 *************** *** 1,3 **** FrontierVcsFile:1:mbar:system.menus.modals.wptx ! AAEFAQAAAfoAAQAAAAAAAAAAAAABDwAvAjgCtAAAAAAAAAZHZW5ldmEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgBkAGQBpAJEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAIAAACYAAAAegAAAgAADwZHZW5ldmEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAAAAAAAAAAAAAAAAAApDoDu73CpCcAAARGAAAAsQC2AS4ByUxBTkT///////8AAAAAAABtYWMgAAAAAAAAAAAAAAAAV1ANCUhUTUwNCS0NCVVwcGVyY2FzZQ0JTG93ZXJjYXNlDQlXcmFwDQlXcmFwICYgSW5kZW50DQlGaXggSGFyZCBSZXR1cm5zDQktDQlNYXJnaW5zIEZpdCBXaW5kb3cNCS0NCVNhdmUgYXMgUGxhaW4gVGV4dC4uLg2AAAAAAAoAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAKAAAAAAAAAWOjsAAAAAAACgAAAAAAAAFjo7QAAAAAAAoAAAAAAAABY6O4AAAAAAAKAAAAAAAAAWOjxAAAAAAACgAAAAAAAAFjo9AAAAAAAAAAAAAAAApLAAAAAAABY6Q8AAAAAAAAAAAAAAAKAAAAAAAAAWOkYAACAAAABgAAACwAAAIAAA8NTHVjaWRhIEdyYW5kZQAAAAAAAAAAAAAAAAAAAAAAAAAAAAoAAAAAAAAAAAAABlQAAKsou3mueWLJAAAAIwAAAVkBfwIhAwBMQU5E////////AAAAAAAAbWFjIAAAAAAAAAAAAAAAAHdwLmluc2VydCAoc3RyaW5nLnVwcGVyICh3cC5nZXRTZWxUZXh0ICgpKSkNgAAAAAAAAAIAAAAGAAAALAAAAgAADw1MdWNpZGEgR3JhbmRlAAAAAAAAAAAAAAAAAAAAAAAAAAAACgAAAAAAAAAAAAAGVAAAqyi7ea55YskAAAAkAAABWQF/AiEDAExBTkT///////8AAAAAAABtYWMgAAAAAAAAAAAAAAAAd3AuaW5zZXJ0IChzdHJpbmcubG93ZXIgKHdwLmdldFNlbFRleHQgKCkpKQ2AAAAAAAAAAgAAABIAAABLAAECAAAPBkdlbmV2YQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAMAAAAAAAAAAAAAAbAAACrKUkosJJjrwAAACYBAAFZAX8CIQMATEFORP///////wAAAAAAAG1hYyAAAAAAAAAAAAAAAABsb2NhbCAodGV4dCA9IHdwLmdldFNlbFRleHQgKCkpDXRleHQgPSBzdHJpbmcud3JhcCAodGV4dCkNd3AuaW5zZXJ0ICh0ZXh0KQ2AAAAAAACAAAAAAACAAAAAAAAAAgAAABgAAACDAAMCAAAPDUx1Y2lkYSBHcmFuZGUAAAAAAAAAAAAAAAAAAAAAAAAAAAAKAAAAAAAAAAAAAAZUAACrKUkornliyQAAACUAAAFZAX8CIQMATEFORP///////wAAAAAAAG1hYyAAAAAAAAAAAAAAAABsb2NhbCAodGV4dCA9IHdwLmdldFNlbFRleHQgKCkpDXRleHQgPSBFdWRvcmEudWNtZHMud3JhcFRleHQgKHRleHQpDXRleHQgPSBFdWRvcmEudWNtZHMubWFzc2FnZVRleHQgKDIsIDU1LCB0ZXh0KQ13cC5pbnNlcnQgKHRleHQpDYAAAAAAAIAAAAAAAIAAAAAAAIAAAAAAAAACAAAAEgAAAFIAAgIAAA8NTHVjaWRhIEdyYW5kZQAAAAAAAAAAAAAAAAAAAAAAAAAAAAoAAAAAAAAAAAAABlQAAKsou3mueWLJAAAAJgAAAVkBfwIhAwBMQU5E////////AAAAAAAAbWFjIAAAAAAAAAAAAAAAAGxvY2FsIChzID0gd3AuZ2V0U2VsVGV4dCAoKSkNcyA9IHN0cmluZy5yZXBsYWNlQWxsIChzLCBjciwgY3IgKyBjcikNd3AuaW5zZXJ0IChzKQ2AAAAAAACAAAAAAACAAAAAAAAAAgAAAEIAAAFqAAMCAAAPDUx1Y2lkYSBHcmFuZGUAAAAAAAAAAAAAAAAAAAAAAAAAAAAKAAAAAAABAAAAAAZ4AACkevIQrnliyQAAACwAAACxALYBLgHJTEFORP///////wAAAAAAAG1hYyAAAAAAAAAAAAAAAABzZWxlY3QgdGhpcyBjb21tYW5kIHdpdGggYSBXUCB3aW5kb3cgb3Blbg0JaXQgcmVmb3JtYXRzIGl0IHNvIHRoZSB0ZXh0IGZpdHMganVzdCBpbnNpZGUgdGhlIHdpbmRvdw1sb2NhbCAod2lkdGgsIGhlaWdodCwgbWFyZ2luKQ1pZiBub3Qgd2luZG93LmdldFNpemUgKHdpbmRvdy5mcm9udG1vc3QgKCksIEB3aWR0aCwgQGhlaWdodCkNCXJldHVybiAoZmFsc2UpDW1hcmdpbiA9IHdwLnJ1bGVyTGVuZ3RoICgpIC0gd2lkdGggKyAyMSDHbGVhdmUgc3BhY2UgZm9yIHNjcm9sbGJhcg1pZiBtYXJnaW4gPCAwDQltYXJnaW4gPSAwDWVkaXRNZW51LnNlbGVjdEFsbCAoKQ13cC5zZXRSaWdodE1hcmdpbiAobWFyZ2luKQ1yZXR1cm4gKHRydWUpDYQAAAAAAIAAAAAAAIAAAAAAAIAAAAAAAIAAAAAAAIAAAAAAAIAAAAAAAIAAAAAAAIAAAAAAAIAAAAAAAIAAAAAAAAACAAAAHgAAAKoAAwIAAA8NTHVjaWRhIEdyYW5kZQAAAAAAAAAAAAAAAAAAAAAAAAAAAAoAAAAAAAAAAAAABsAAALBvC7uwgC1xAAAAEwAAASYBPwHuAsBMQU5E////////AAAAAAAAbWFjIAAAAAAAAAAAAAAAAGxvY2FsIChmLCBzKQ1pZiBmaWxlLnB1dGZpbGVkaWFsb2cgKCJTYXZlIGFzIHRleHQgZmlsZToiLCBAZikNCXMgPSBzdHJpbmcgKHdpbmRvdy5mcm9udG1vc3QgKCleKQ0JZmlsZS53cml0ZXdob2xlZmlsZSAoZiwgcywgJ1RFWFQnLCAnTEFORCcsIGNsb2NrLm5vdyAoKSkNCXJldHVybiAodHJ1ZSkNgAAAAAAAgAAAAAAAgAAAAAAAgAAAAAAAgAAAAAAA \ No newline at end of file --- 1,3 ---- FrontierVcsFile:1:mbar:system.menus.modals.wptx ! AAEFAQAAAfoAAQAAAAAAAAAAAAAAKwADA/0E/QAAAAAAAAZHZW5ldmEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgArAAMBZQEHAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAIAAACYAAAAegAAAgAADwZHZW5ldmEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAAAAAAAAAAAAAAAAAApDoDu73CpCcAAARVAAAAsQC2AS4ByUxBTkT///////8AAAAAAABtYWMgAAAAAAAAAAAAAAAAV1ANCUhUTUwNCS0NCVVwcGVyY2FzZQ0JTG93ZXJjYXNlDQlXcmFwDQlXcmFwICYgSW5kZW50DQlGaXggSGFyZCBSZXR1cm5zDQktDQlNYXJnaW5zIEZpdCBXaW5kb3cNCS0NCVNhdmUgYXMgUGxhaW4gVGV4dC4uLg2AAAAAAAoAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAKAAAAAAAAAUgkeAAAAAAACgAAAAAAAAFIJHwAAAAAAAoAAAAAAAABSCSAAAAAAAAKAAAAAAAAAUgkjAAAAAAACgAAAAAAAAFIJJgAAAAAAAAAAAAAAApLAAAAAAABSCS0AAAAAAAAAAAAAAAKAAAAAAAAAUgk2AACAAAABgAAACwAAAIAAA8NTHVjaWRhIEdyYW5kZQAAAAAAAAAAAAAAAAAAAAAAAAAAAAoAAAAAAAAAAAAABlQAAKsou3mueWLJAAAAJAAAAVkBfwIhAwBMQU5E////////AAAAAAAAbWFjIAAAAAAAAAAAAAAAAHdwLmluc2VydCAoc3RyaW5nLnVwcGVyICh3cC5nZXRTZWxUZXh0ICgpKSkNgAAAAAAAAAIAAAAGAAAALAAAAgAADw1MdWNpZGEgR3JhbmRlAAAAAAAAAAAAAAAAAAAAAAAAAAAACgAAAAAAAAAAAAAGVAAAqyi7ea55YskAAAAlAAABWQF/AiEDAExBTkT///////8AAAAAAABtYWMgAAAAAAAAAAAAAAAAd3AuaW5zZXJ0IChzdHJpbmcubG93ZXIgKHdwLmdldFNlbFRleHQgKCkpKQ2AAAAAAAAAAgAAABIAAABLAAECAAAPBkdlbmV2YQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAMAAAAAAAAAAAAAAbAAACrKUkosJJjrwAAACcBAAFZAX8CIQMATEFORP///////wAAAAAAAG1hYyAAAAAAAAAAAAAAAABsb2NhbCAodGV4dCA9IHdwLmdldFNlbFRleHQgKCkpDXRleHQgPSBzdHJpbmcud3JhcCAodGV4dCkNd3AuaW5zZXJ0ICh0ZXh0KQ2AAAAAAACAAAAAAACAAAAAAAAAAgAAABgAAACDAAMCAAAPDUx1Y2lkYSBHcmFuZGUAAAAAAAAAAAAAAAAAAAAAAAAAAAAKAAAAAAAAAAAAAAZUAACrKUkornliyQAAACYAAAFZAX8CIQMATEFORP///////wAAAAAAAG1hYyAAAAAAAAAAAAAAAABsb2NhbCAodGV4dCA9IHdwLmdldFNlbFRleHQgKCkpDXRleHQgPSBFdWRvcmEudWNtZHMud3JhcFRleHQgKHRleHQpDXRleHQgPSBFdWRvcmEudWNtZHMubWFzc2FnZVRleHQgKDIsIDU1LCB0ZXh0KQ13cC5pbnNlcnQgKHRleHQpDYAAAAAAAIAAAAAAAIAAAAAAAIAAAAAAAAACAAAAEgAAAFIAAgIAAA8NTHVjaWRhIEdyYW5kZQAAAAAAAAAAAAAAAAAAAAAAAAAAAAoAAAAAAAAAAAAABlQAAKsou3mueWLJAAAAJwAAAVkBfwIhAwBMQU5E////////AAAAAAAAbWFjIAAAAAAAAAAAAAAAAGxvY2FsIChzID0gd3AuZ2V0U2VsVGV4dCAoKSkNcyA9IHN0cmluZy5yZXBsYWNlQWxsIChzLCBjciwgY3IgKyBjcikNd3AuaW5zZXJ0IChzKQ2AAAAAAACAAAAAAACAAAAAAAAAAgAAAEIAAAFqAAMCAAAPDUx1Y2lkYSBHcmFuZGUAAAAAAAAAAAAAAAAAAAAAAAAAAAAKAAAAAAABAAAAAAZ4AACkevIQrnliyQAAAC0AAACxALYBLgHJTEFORP///////wAAAAAAAG1hYyAAAAAAAAAAAAAAAABzZWxlY3QgdGhpcyBjb21tYW5kIHdpdGggYSBXUCB3aW5kb3cgb3Blbg0JaXQgcmVmb3JtYXRzIGl0IHNvIHRoZSB0ZXh0IGZpdHMganVzdCBpbnNpZGUgdGhlIHdpbmRvdw1sb2NhbCAod2lkdGgsIGhlaWdodCwgbWFyZ2luKQ1pZiBub3Qgd2luZG93LmdldFNpemUgKHdpbmRvdy5mcm9udG1vc3QgKCksIEB3aWR0aCwgQGhlaWdodCkNCXJldHVybiAoZmFsc2UpDW1hcmdpbiA9IHdwLnJ1bGVyTGVuZ3RoICgpIC0gd2lkdGggKyAyMSDHbGVhdmUgc3BhY2UgZm9yIHNjcm9sbGJhcg1pZiBtYXJnaW4gPCAwDQltYXJnaW4gPSAwDWVkaXRNZW51LnNlbGVjdEFsbCAoKQ13cC5zZXRSaWdodE1hcmdpbiAobWFyZ2luKQ1yZXR1cm4gKHRydWUpDYQAAAAAAIAAAAAAAIAAAAAAAIAAAAAAAIAAAAAAAIAAAAAAAIAAAAAAAIAAAAAAAIAAAAAAAIAAAAAAAIAAAAAAAAACAAAATgAAATcAAAIAAA8GR2VuZXZhAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4AAAAAAAAAAAAAAAAAALBvC7u//qBeAAAAFQAAASYBPwHuAsBMQU5E////////AAAAAAAAbWFjIAAAAAAAAAAAAAAAAENoYW5nZXMNCTEvMjYvMDY7IDM6NDU6MDAgUE0gYnkgVEFDDQkJdHdlYWtlZCBmb3JtYXR0aW5nIG9mIHNjcmlwdA0JCXNldCBmIHRvIG5hbWUgb2YgZnJvbnRtb3N0IHdpbmRvdw0NbG9jYWwgKGFkciA9IHdpbmRvdy5mcm9udG1vc3QgKCksIGYgPSBuYW1lT2YgKGFkcl4pKQ0NaWYgZmlsZS5wdXRGaWxlRGlhbG9nICgiU2F2ZSBhcyB0ZXh0IGZpbGU6IiwgQGYpDQlsb2NhbCAocyA9IHN0cmluZyAoYWRyXikpDQkNCWZpbGUud3JpdGVXaG9sZUZpbGUgKGYsIHMsICdURVhUJywgJ0xBTkQnLCBjbG9jay5ub3cgKCkpDQkNCXJldHVybiAodHJ1ZSkNhAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAgAAAAAAAgAAAAAAAgAAAAAAAgAAAAAAAgAAAAAAAgAAAAAAAgAAAAAAAgAAAAAAAgAAAAAAA \ No newline at end of file |
|
From: Karsten W. <kar...@us...> - 2006-01-26 16:20:13
|
Update of /cvsroot/frontierkernel/Frontier/Common/source In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv2537 Modified Files: shellprint.c Log Message: fixing compile errors on windows Index: shellprint.c =================================================================== RCS file: /cvsroot/frontierkernel/Frontier/Common/source/shellprint.c,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** shellprint.c 15 Dec 2005 21:40:10 -0000 1.6 --- shellprint.c 26 Jan 2006 16:19:58 -0000 1.7 *************** *** 170,174 **** --- 170,178 ---- carbonValidSession(void) { + #if TARGET_API_MAC_CARBON == 1 return (nil != shellprintinfo.printhandle); + #else + return (false); + #endif } *************** *** 177,182 **** carbonSessionPrintSession() { - OSStatus theErr; #if TARGET_API_MAC_CARBON == 1 if (nil == shellprintinfo.printhandle) --- 181,186 ---- carbonSessionPrintSession() { #if TARGET_API_MAC_CARBON == 1 + OSStatus theErr; if (nil == shellprintinfo.printhandle) *************** *** 198,206 **** carbonSessionDefaultPageAndSettingValidate(void) { OSStatus theErr; Boolean f; ! ! #if TARGET_API_MAC_CARBON == 1 ! theErr = PMSessionDefaultPageFormat( shellprintinfo.printhandle, --- 202,210 ---- carbonSessionDefaultPageAndSettingValidate(void) { + #if TARGET_API_MAC_CARBON == 1 OSStatus theErr; Boolean f; ! ! theErr = PMSessionDefaultPageFormat( shellprintinfo.printhandle, *************** *** 227,231 **** goto error; - #endif return (true); --- 231,234 ---- *************** *** 233,236 **** --- 236,241 ---- error: carbonKillPrintVars(); + + #endif return false; *************** *** 242,247 **** carbonCreateFormatAndSetting(void) { - OSStatus theErr; #if TARGET_API_MAC_CARBON == 1 theErr = PMCreatePageFormat(&shellprintinfo.pageformat); --- 247,252 ---- carbonCreateFormatAndSetting(void) { #if TARGET_API_MAC_CARBON == 1 + OSStatus theErr; theErr = PMCreatePageFormat(&shellprintinfo.pageformat); *************** *** 253,257 **** goto error; - #endif return (true); --- 258,261 ---- *************** *** 259,262 **** --- 263,267 ---- carbonKillPrintVars(); + #endif return false; } |
|
From: Seth D. <set...@us...> - 2006-01-25 16:26:14
|
Update of /cvsroot/frontierkernel/Frontier/Common/source In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv26445 Modified Files: oplangtext.c Log Message: Fixed another problem with round-trips from script to string and back. Comment lines that were children of non comment lines, such as the easter-egg line found at the bottom of system.verbs.apps.amazon.artistSearch were causing the script to fail (found by Thomas). This pointed out a way to clean up a little bit of the code's ugliness, and fix the reported problem at the same time. Index: oplangtext.c =================================================================== RCS file: /cvsroot/frontierkernel/Frontier/Common/source/oplangtext.c,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** oplangtext.c 25 Jan 2006 00:39:02 -0000 1.5 --- oplangtext.c 25 Jan 2006 16:26:02 -0000 1.6 *************** *** 180,191 **** if (flmakeitpretty) { ! if (!copyhandle ((**h).headstring, &bshead)) goto exit; ch = chcomment; ! if (!insertinhandle (bshead, 0, &ch, 1L)) goto exit; - } --- 180,190 ---- if (flmakeitpretty) { ! if (!copyhandle ((**h).headstring, &bscomment)) goto exit; ch = chcomment; ! if (!insertinhandle (bscomment, 0, &ch, 1L)) goto exit; } *************** *** 194,204 **** if (opnavigate (left, &nomad) && opnestedincomment (nomad)) { - if (!copyhandle (bshead, &bscomment)) - goto exit; - flparentwascomment = true; goto L2; - } --- 193,199 ---- *************** *** 349,353 **** } } - else { --- 344,347 ---- |
|
From: creedon <icr...@us...> - 2006-01-25 04:05:09
|
Update of /cvsroot/frontierkernel/odbs/frontierRoot/system/verbs/builtins/Frontier/tools In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8819 Modified Files: installNewTools getInfoTable Log Message: use clean tool name script to set shortName Index: getInfoTable =================================================================== RCS file: /cvsroot/frontierkernel/odbs/frontierRoot/system/verbs/builtins/Frontier/tools/getInfoTable,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** getInfoTable 26 Mar 2005 19:42:48 -0000 1.1.1.1 --- getInfoTable 25 Jan 2006 04:04:55 -0000 1.2 *************** *** 1,3 **** FrontierVcsFile:1:scpt:system.verbs.builtins.Frontier.tools.getInfoTable ! on getInfoTable () { ÇReturn a table containing info about the Tools in the Tools folder. Each Tool gets a sub-table whose name is the filename of the Tool. Each sub-table contains: Çf -- the path on disk ÇflEnabled -- whether it's enabled or not ÇflInstalled -- whether it's installed or not ÇflOpen -- whether the gdb is open or not Ç01/08/01; 1:15:30 PM by PBS local (f, folder = Frontier.tools.getToolsFolderPath ()); local (infoTable); new (tableType, @infoTable); fileloop (f in folder) { local (fname = file.fileFromPath (f)); local (shortName = string.popSuffix (fname)); local (adrItem = @infoTable.[fname]); new (tableType, adrItem); adrItem^.f = f; adrItem^.flOpen = defined ([f]); adrItem^.flEnabled = false; //default adrItem^.flInstalled = false; //default bundle { //is the Tool installed? if defined (user.tools.databases.[shortName].flInstalled) { adrItem^.flInstalled = user.tools.databases.[shortName].flInstalled}}; bundle { //is the Tool enabled? if adrItem^.flOpen { if Frontier.tools.isEnabled (f) { adrItem^.flEnabled = true}}}}; return (infoTable)} \ No newline at end of file --- 1,3 ---- FrontierVcsFile:1:scpt:system.verbs.builtins.Frontier.tools.getInfoTable ! on getInfoTable () { ÇChanges Ç1/23/06; 3:31:21 PM by TAC Çuse clean tool name script to set shortName Ç01/08/01; 1:15:30 PM by PBS Çcreated ÇReturn a table containing info about the Tools in the Tools folder. Each Tool gets a sub-table whose name is the filename of the Tool. Each sub-table contains: Çf -- the path on disk ÇflEnabled -- whether it's enabled or not ÇflInstalled -- whether it's installed or not ÇflOpen -- whether the gdb is open or not local (f, folder = Frontier.tools.getToolsFolderPath ()); local (infoTable); new (tableType, @infoTable); fileloop (f in folder) { local (fname = file.fileFromPath (f)); local (shortName = Frontier.tools.cleanToolName (fname)); local (adrItem = @infoTable.[fname]); new (tableType, adrItem); adrItem^.f = f; adrItem^.flOpen = defined ([f]); adrItem^.flEnabled = false; //default adrItem^.flInstalled = false; //default bundle { //is the Tool installed? if defined (user.tools.databases.[shortName].flInstalled) { adrItem^.flInstalled = user.tools.databases.[shortName].flInstalled}}; bundle { //is the Tool enabled? if adrItem^.flOpen { if Frontier.tools.isEnabled (f) { adrItem^.flEnabled = true}}}}; return (infoTable)} \ No newline at end of file Index: installNewTools =================================================================== RCS file: /cvsroot/frontierkernel/odbs/frontierRoot/system/verbs/builtins/Frontier/tools/installNewTools,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** installNewTools 26 Mar 2005 19:42:49 -0000 1.1.1.1 --- installNewTools 25 Jan 2006 04:04:55 -0000 1.2 *************** *** 1,3 **** FrontierVcsFile:1:scpt:system.verbs.builtins.Frontier.tools.installNewTools ! on installNewTools () { ÇInstall any new Tools in the Tools folder. Return a list of file paths of any new Tools that were installed. Ç01/06/01; 3:37:49 PM by PBS ÇChanges: Ç2/24/01; 2:19:45 PM by PBS ÇIf a tool does not have a table in user.tools.databases, create it. This prevents opening and closing disabled tools every 10 seconds, which interrupts typing and causes screen flashing. local (newTools = {}); local (toolsFolder = Frontier.tools.getToolsFolderPath ()); local (f); fileloop (f in toolsFolder) { local (fname = file.fileFromPath (f)); local (shortName = string.popSuffix (fname)); if string.lower (fname) endsWith ".root" { if not (defined ([f])) { //is it a new tool? if not defined (user.tools.databases.[shortName]) { if Frontier.tools.isEnabled (f) { Frontier.tools.install (f); newTools = newTools + f} else { //PBS 02/24/01: set up table for this tool; this prevents opening it every 10 seconds local (adrTable = @user.tools.databases.[shortName]); local (t); new (tableType, @t); t.flInstalled = false; t.lastModified = file.modified (f); t.path = f; adrTable^ = t}}}}}; return (newTools)} //list of file paths of new Tools installed \ No newline at end of file --- 1,3 ---- FrontierVcsFile:1:scpt:system.verbs.builtins.Frontier.tools.installNewTools ! on installNewTools () { ÇChanges Ç1/23/06; 3:31:21 PM by TAC Çuse clean tool name script to set shortName Ç2/24/01; 2:19:45 PM by PBS ÇIf a tool does not have a table in user.tools.databases, create it. This prevents opening and closing disabled tools every 10 seconds, which interrupts typing and causes screen flashing. Ç01/06/01; 3:37:49 PM by PBS Çcreated ÇInstall any new Tools in the Tools folder. Return a list of file paths of any new Tools that were installed. local (newTools = {}); local (toolsFolder = Frontier.tools.getToolsFolderPath ()); local (f); fileloop (f in toolsFolder) { local (fname = file.fileFromPath (f)); local (shortName = Frontier.tools.cleanToolName (fname)); if string.lower (fname) endsWith ".root" { if not (defined ([f])) { //is it a new tool? if not defined (user.tools.databases.[shortName]) { if Frontier.tools.isEnabled (f) { Frontier.tools.install (f); newTools = newTools + f} else { //PBS 02/24/01: set up table for this tool; this prevents opening it every 10 seconds local (adrTable = @user.tools.databases.[shortName]); local (t); new (tableType, @t); t.flInstalled = false; t.lastModified = file.modified (f); t.path = f; adrTable^ = t}}}}}; return (newTools)} //list of file paths of new Tools installed \ No newline at end of file |
|
From: Seth D. <set...@us...> - 2006-01-25 00:39:12
|
Update of /cvsroot/frontierkernel/Frontier/Common/source In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10988 Modified Files: oplangtext.c Log Message: Lots of little changes in oplangtextvisit to correct problems with round-trip issues. Converting an outline script to text and then re-inserting that text into a new script outline would result in corruption of comments and structure. I apologize to all future generations of kernel hackers for the condition of oplangtextvisit()! It was ugly -- really ugly -- when I found it. Now it's even uglier and more spaghetti-like, as if a circus freak mated with a bowl of pasta and produced one ugly function. Ok, ok, that's enough of a checkin note. Index: oplangtext.c =================================================================== RCS file: /cvsroot/frontierkernel/Frontier/Common/source/oplangtext.c,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** oplangtext.c 11 Jan 2005 22:48:09 -0000 1.4 --- oplangtext.c 25 Jan 2006 00:39:02 -0000 1.5 *************** *** 41,46 **** static short langtextlastlevel; /*globals used for visit routines*/ - //static Handle hlangtext; - static boolean flfirstlangtextline; --- 41,44 ---- *************** *** 62,66 **** if (len > 0 && (*bs) [len - 1] == '\\') { - //setstringlength (bs, len - 1); popfromhandle (bs, 1, nil); --- 60,63 ---- *************** *** 96,99 **** --- 93,117 ---- } /*poptrailingwhitespacehandle*/ + static boolean remainingsubheadsarecomments (hdlheadrecord hnode) { + + /* + are all of the remaining subheads (at the current level) comments? + */ + + hdlheadrecord nomad = hnode; + + if (!(**nomad).flcomment) + return false; + + while (opnavigate (down, &nomad)) { + + if (!(**nomad).flcomment) + return false; + + } + + return true; + } /*remainingsubheadsarecomments*/ + static boolean oplangtextvisit (hdlheadrecord hnode, ptrvoid refcon) { *************** *** 130,138 **** 6.0a13 dmb: rewrote to use handles, handlestreams */ ! register hdlheadrecord h = hnode; handlestream *langtext = (handlestream *) refcon; ! register short level; bigstring bs; Handle bshead; --- 148,161 ---- 6.0a13 dmb: rewrote to use handles, handlestreams + + 2006-01-23 smd: lots of changes when flmakepretty is true, + to fix problems with round trip between script outline and text. + This function is in desperate need of a rewrite, but it seem to work now + for every test case I could come up with. */ ! hdlheadrecord h = hnode; handlestream *langtext = (handlestream *) refcon; ! short level; bigstring bs; Handle bshead; *************** *** 140,143 **** --- 163,167 ---- boolean fltobecontinued = false; boolean flcomment; + boolean flparentwascomment = false; hdlheadrecord nomad; bigstring bsfirst; *************** *** 152,164 **** if (flcomment) { /*just generate a blank line for a comment line*/ ! bshead = nil; //setemptystring (bshead); if (flmakeitpretty) { - //opgetheadstring (h, bshead); if (!copyhandle ((**h).headstring, &bshead)) goto exit; - //insertchar (chcomment, bshead); ch = chcomment; --- 176,186 ---- if (flcomment) { /*just generate a blank line for a comment line*/ ! bshead = nil; if (flmakeitpretty) { if (!copyhandle ((**h).headstring, &bshead)) goto exit; ch = chcomment; *************** *** 166,176 **** goto exit; - //setemptystring (bscomment); } nomad = h; ! if (opnavigate (left, &nomad) && opnestedincomment (nomad)) goto L2; if (level > langtextlastlevel) { --- 188,205 ---- goto exit; } nomad = h; ! if (opnavigate (left, &nomad) && opnestedincomment (nomad)) { ! ! if (!copyhandle (bshead, &bscomment)) ! goto exit; ! ! flparentwascomment = true; ! goto L2; + + } if (level > langtextlastlevel) { *************** *** 192,196 **** else { - //getheadstring (h, bshead); if (!copyhandle ((**h).headstring, &bshead)) goto exit; --- 221,224 ---- *************** *** 205,209 **** len2 = langcommentdelete (chcomment, *bshead, len1); ! if (len2 >= 0) { //comment detected if (flmakeitpretty) { /*for exporting, we want to *add* comment character*/ --- 233,237 ---- len2 = langcommentdelete (chcomment, *bshead, len1); ! if (len2 >= 0) { /* line is partly a comment */ if (flmakeitpretty) { /*for exporting, we want to *add* comment character*/ *************** *** 243,248 **** setemptystring (bsfirst); ! if (!equalidentifiers (bsfirst, STR_else)) /*never want a semicolon before else*/ ! pushchar (';', bs); } } --- 271,279 ---- setemptystring (bsfirst); ! if (!equalidentifiers (bsfirst, STR_else)) { /*never want a semicolon before else*/ ! ! if (!flmakeitpretty || !flcomment || !remainingsubheadsarecomments (h)) /* no semicolon before the closing braces */ ! pushchar (';', bs); ! } } } *************** *** 258,262 **** L2: ! if (flmakeitpretty) { if (!writehandlestreamhandle (langtext, *plastcomment)) --- 289,293 ---- L2: ! if (flmakeitpretty && !flcomment) { if (!writehandlestreamhandle (langtext, *plastcomment)) *************** *** 265,270 **** disposehandle (*plastcomment); - //copystring (bscomment, plastcomment); *plastcomment = bscomment; } --- 296,301 ---- disposehandle (*plastcomment); *plastcomment = bscomment; + } *************** *** 283,294 **** } ! if (!writehandlestreamstring (langtext, bs)) ! goto exit; } flfirstlangtextline = false; ! if (!writehandlestreamhandle (langtext, bshead)) ! goto exit; if (fltobecontinued) --- 314,358 ---- } ! if (flmakeitpretty && flparentwascomment) { ! ! if (!pushtexthandle (bs, *plastcomment)) ! goto exit; ! ! } ! else if (flmakeitpretty && flcomment) { ! ! if (!inserttextinhandle (bscomment, 0L, bs)) ! goto exit; ! ! } ! else { ! ! if (!writehandlestreamstring (langtext, bs)) ! goto exit; ! ! } } flfirstlangtextline = false; ! if (flmakeitpretty && flcomment) { ! ! if (! *plastcomment) ! ! *plastcomment = bscomment; ! ! else { ! ! if (!pushhandle (bscomment, *plastcomment)) ! goto exit; ! ! } ! } ! ! else { ! ! if (!writehandlestreamhandle (langtext, bshead)) ! goto exit; ! } if (fltobecontinued) *************** *** 350,356 **** setemptystring (bs); - // if (!newgrowinghandle (0, htext)) - // return (false); - *htext = nil; --- 414,417 ---- *************** *** 384,388 **** fllastwascomment = true; - //setemptystring (bslastcomment); bslastcomment = nil; --- 445,448 ---- |
|
From: creedon <icr...@us...> - 2006-01-21 02:47:45
|
Update of /cvsroot/frontierkernel/odbs/frontierRoot/system/startup In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10936 Modified Files: startupScript Log Message: disable agents for all startups, not just for first root run, there was a problem with Tools starting up and its agent manipulating menus at the same time and causing a crash Index: startupScript =================================================================== RCS file: /cvsroot/frontierkernel/odbs/frontierRoot/system/startup/startupScript,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** startupScript 25 Dec 2005 01:40:10 -0000 1.14 --- startupScript 21 Jan 2006 02:47:35 -0000 1.15 *************** *** 1,3 **** FrontierVcsFile:1:scpt:system.startup.startupScript ! ÇChanges Ç12/24/05; 12:33:32 PM by TAC Çprefs.root now has a #startup script, deal with it Ç11/10/05; 4:24:48 PM by TAC Çmoved system.temp.Frontier/starting up after first if firstRootRun check was causing startup problem Ç11/5/05; 12:00:32 PM by TAC Çmoved system.temp.Frontier check back to top of script Ç10/9/05; 3:39:07 PM by TAC Çwhen storing prefs.root path, store realative path Çuse table.copyUndefinedContents to copy some item Çmove some of the user prefs initializations into Frontier.data.userPrefs Çrearrange script so that some initializations can happen outside of the first root run, this should make it easier to add new items and not have them get missed because the first root run had already been run once Ç10/4/05; 7:26:36 PM by TAC Çupon check for presence of Psapi.dll, don't use hard coded application name Ç9/26/05; 4:30:14 PM by TAC Çadded user.prefs.flReplaceDialogExpertMode Ç8/23/05; 7:22:18 PM by TAC Çadded user.prefs.flCompactModalMenus Ç7/14/05; 10:35:39 AM by TAC Çsystem.menus.data.currentMenuType set to nil so agent will update modal menu properly upon relaunch Ç7/6/05; 12:21:38 PM by TAC Çchanged user.callbacks.sendmail to user.callbacks.tcpSendMail Çadded user.prefs.mailHostPort Ç6/15/05; 6:52:11 PM by TAC Çrewrite for Open Source release, bring in code from startup.startupScript, userland.firstRootRun, userland.finishInstall, and userland.cleanRoot ÇOld code Çstartup.startupScript <http://cvs.sourceforge.net/viewcvs.py/frontierkernel/odbs/frontierRoot/system/startup/startupScript?rev=1.1> Çuserland.firstRootRun <http://cvs.sourceforge.net/viewcvs.py/frontierkernel/odbs/frontierRoot/system/verbs/builtins/userland/Attic/firstRootRun?rev=1.1> Çuserland.finishInstall <http://cvs.sourceforge.net/viewcvs.py/frontierkernel/odbs/frontierRoot/system/verbs/builtins/userland/Attic/finishInstall?rev=1.1> Çuserland.cleanRoot <http://cvs.sourceforge.net/viewcvs.py/frontierkernel/odbs/frontierRoot/system/verbs/builtins/userland/Attic/cleanRoot?rev=1.1> Ç06/08/01; 11:24:35 PM by JES ÇWhen opening databases defined at user.databases, skip objects which aren't tables. This avoids the condition where startup wouldn't complete, if there's an item #1 in the user.databases table. Ç06/02/01; 8:34:20 PM by PBS ÇDo the web-based install and open the Control Panel if this is the first root run. Ç04/28/01; 7:48:46 PM by JES ÇCall Frontier.tools.startup in a try block, so that the startup process will finish even if Tools installation fails. Ç04/20/01; 4:49:05 PM by JES ÇCall tools.startup to install Tools at startup. Ç10/7/99; 4:20:26 PM by PBS ÇOnly run the #startup script in a guest database if runStartupScript exists and is true. Previously, it would be run whether runStartupScript was true or false. Çhttp://frontier.userland.com/stories/storyReader$1760 Ç10/6/99; 10:21:35 PM by PBS ÇOnly set the taskTime for the overnight task if it's in the past. This fixes a bug when the taskTime was before midnight, but it was being set for the next day, so the overnight task wouldn't run. Çhttp://frontier.userland.com/stories/storyReader$1761 Ç8/19/99; 6:44:48 AM by DW ÇMake sure that taskTimes in user.scheduler.tasks are in the future. ÇWe do this much more quickly than scheduler.monitor would. Çhttp://discuss.userland.com/msgReader$9658 ÇThis script runs when Frontier opens the Frontier.root file. if defined (system.temp.Frontier) { // only run the startup script once return}; local (flEnableAgents = true, flOpenDatabases = true, flEnableHttpServer = true); // can be set by the external startup script local (flFirstRootRun = true); bundle { // miscellaneous variable initializations and checks, phase 1 of 2 Frontier.pathString = file.folderFromPath (frontier.getFilePath ())}; if defined (user.prefs.firstRootRun) { flFirstRootRun = user.prefs.firstRootRun}; if flFirstRootRun { // disable agents, hide all windows, wipe temp and user Frontier.enableAgents (false); // try to keep agents from reporting errors while window.frontmost () != "" { // open windows can mess things up later on window.hide (window.frontmost ())}; Çreturn (false) // enable for testing new (tableType, @system.temp); new (tableType, @root.user)}; bundle { // system.temp.Frontier, we are starting up new (tableType, @system.temp.Frontier); system.temp.Frontier.startupTime = clock.now (); system.temp.Frontier.startingUp = true}; backups.init (); batchExporter.init (); export.init (); rootUpdates.init (); // set up user.rootUpdates, even though root updates uses tcp, its ok to set up here as no tcp calls are made at this time webEdit.init (); bundle { // set up user.prefs if flFirstRootRun { new (tableType, @user.prefs); bundle { // set up user.prefs.commonStyles case sys.os () { "MacOS" { if system.environment.isCarbon { user.prefs.commonStyles = Frontier.data.commonStylesMacCarbon} else { user.prefs.commonStyles = Frontier.data.commonStylesMac}}; "Win95"; "WinNT" { user.prefs.commonStyles = Frontier.data.commonStylesWin}}}}; table.copyUndefinedContents (@Frontier.data.userPrefs, @user.prefs); bundle { // set up user.prefs.dialogs if flFirstRootRun { new (tableType, @user.prefs.dialogs)}; table.copyUndefinedContents (@Frontier.data.userPrefs.dialogs, @user.prefs.dialogs)}; bundle { // set up user.prefs.search if flFirstRootRun { new (tableType, @user.prefs.search)}; table.copyUndefinedContents (@Frontier.data.userPrefs.search, @user.prefs.search); if not (defined (user.prefs.search.replaceWith)) { user.prefs.search.replaceWith = Frontier.version ()}}; Frontier.setupUserPrefsFonts ()}; if flFirstRootRun { bundle { // set up the quick script window clipboard.putvalue ("dialog.notify (\"Hello World!\")"); window.quickScript (); editmenu.selectall (); editmenu.paste (); window.close ("Quick Script")}; bundle { // set up root window local (w = "root"); window.open (w); window.setPosition (w, 0, 0); editMenu.setFont (user.prefs.fonts.tableFont); editMenu.setFontSize (user.prefs.fonts.tableFontSize); window.zoom (w)}; bundle { // set up user.callbacks new (tableType, @user.callbacks); new (tableType, @user.callbacks.closeWindow); new (tableType, @user.callbacks.cmd2click); new (tableType, @user.callbacks.compileChangedScript); new (tableType, @user.callbacks.control2click); new (tableType, @user.callbacks.fileWriteWholeFile); new (tableType, @user.callbacks.opCollapse); new (tableType, @user.callbacks.opCursorMoved); new (tableType, @user.callbacks.openWindow); new (tableType, @user.callbacks.opExpand); new (tableType, @user.callbacks.opInsert); new (tableType, @user.callbacks.opReturnKey); new (tableType, @user.callbacks.opRightClick); new (tableType, @user.callbacks.opStruct2Click); new (tableType, @user.callbacks.option2click); new (tableType, @user.callbacks.resume); new (tableType, @user.callbacks.saveWindow); new (tableType, @user.callbacks.shutdown); new (tableType, @user.callbacks.startup); new (tableType, @user.callbacks.statusMessage); new (tableType, @user.callbacks.suspend); new (tableType, @user.callbacks.systemTrayIcon2Click); new (tableType, @user.callbacks.systemTrayIconRightClick); new (tableType, @user.callbacks.tcpSendMail)}; bundle { // clear applications paths in system.verbs.apps local (adrAppsTable = @system.verbs.apps, i); for i = 1 to sizeof (adrAppsTable^) { local (adrAppInfo = @adrAppsTable^ [i].appInfo); if defined (adrAppInfo^) { adrAppInfo^.path = ""}}}; bundle { // set up Frontier.tools.thread Frontier.tools.thread.ct = 0; Frontier.tools.thread.enabled = true}; bundle { // set up workspace new (tableType, @root.workspace); new (outlineType, @workspace.notepad)}; bundle { // miscellaneous new (tableType, @root.scratchpad); new (tableType, @system.deskscripts); new (tableType, @user.databases); new (tableType, @user.protocols); }};Çnew (tableType, @websites.["#data"]) bundle { // set up user.menus if flFirstRootRun { new (tableType, @user.menus)}; Çuser.menus.bookmarkMenu = userland.virginBookmarkMenu if not (defined (user.menus.customMenu)) { user.menus.customMenu = Frontier.data.virginCustomMenu}}; if flFirstRootRun { // open mainResponder.root and prefs.root bundle { // open mainResponder.root, hidden and add to user.databases local (appFolder = Frontier.getSubFolder ("apps")); if not defined ( [appFolder + "mainResponder.root"] ) { Frontier.installApp ("mainResponder.root", false)}}; bundle { // open prefs.root, hidden and add to user.databases local (f = Frontier.getSubFolder ("www") + "prefs.root"); if not (defined ([f])) { fileMenu.open (f, true);}; //open hidden ÇAdd an entry to the user.databases table. local (adrTable = @user.databases.["prefs.root"]); new (tableType, adrTable); adrTable^.f = file.getPathChar () + (f - Frontier.pathString); adrTable^.openOnStartup = true; adrTable^.runStartupScript = true; adrTable^.supportsSubscribe = false; bundle { // run the startup script local (adrStartupScript = @[adrTable^.f].["#startup"]); if defined (adrStartupScript^) { adrStartupScript^ ()}}}}; // run the startup script Çbundle //initialize responders Çuser.webserver.responders.websiteFramework.data.docTree.samples = @websites.samples Çtry Çdelete (@user.webserver.responders.websiteFramework.data.docTree.allSites) Çtry Çdelete (@user.webserver.responders.websiteFramework.data.docTree.contents) Ç Çif defined (user.webserver.responders.manilaEdit) Çdelete (@user.webserver.responders.manilaEdit) ÇfileMenu.save () bundle { // miscellaneous variable initializations and checks, phase 2 of 2 system.menus.data.currentsuite = ""; system.menus.data.currentMenuType = nil; system.menus.data.currentmenu = 0; bundle { // check for presence of Psapi.dll if sys.os () == "WinNT" { if not (sys.appIsRunning (file.fileFromPath (Frontier.getProgramPath ()))) { // 11/27/04; 12:14:40 PM by TAC - would it be possible for Frontier to install this on its own? dialog.alert ("You need to run the Frontier Psapi Installer for certain Frontier verbs to work properly.")}}}}; bundle { //open the about window if the pref says we should Çadded 12/16/98; 6:47:28 PM by DW if not defined (user.prefs.openAboutWindow) { user.prefs.openAboutWindow = true}; if user.prefs.openAboutWindow { window.about ()}}; bundle { //initialize the log, next bit of code could add a log item Çadded 12/16/98; 6:52:40 PM by DW if defined (log.startup) { log.startup ()}}; bundle { //run the external startup script local (fname = "frontierStartupCommands.txt"); local (f = file.folderFromPath (Frontier.getProgramPath ()) + fname); if file.exists (f) { try { evaluate (string (file.readWholeFile (f)))} else { log.add ("Error running " + fname + ": \"" + tryError + "\"", "startupError", flwptext:true)}}}; bundle { // tcp based services webserver.init (); // needs to load first betty.init (); // needs to load second soap.init ()}; bundle { // people based services people.init (); // needs to load first custody.init (); webEditServer.init ()}; bundle { //open all the databases that have openOnStartup true Çadded 12/16/98; 6:23:16 PM by DW if defined (user.databases) { if flOpenDatabases { local (i, flmsg = false); for i = 1 to sizeof (user.databases) { if typeOf (user.databases[i]) == tableType { //06/08/01 JES: avert item #1 errors with user.databases [i] { local (flopened = false); try { if openOnStartup { msg (this + ": Opening " + file.fileFromPath (f)); flmsg = true; fileMenu.open (f, hidden:true); flopened = true}} else { log.add ("Startup error opening guest database " + nameof (user.databases [i]) + ": \"" + tryError + "\"", "startupError", flwptext:true)}; if flopened { if defined (runStartupScript) { if runStartupScript { //PBS 10/7/99: check the value of runStartupScript: only run the script if the boolean is true local (adrscript = @[filespec (f)].["#startup"]); if defined (adrscript^) { try { adrscript^ ()} else { log.add ("Error running #startup script in guest database " + nameof (user.databases [i]) + ": \"" + tryError + "\"", "startupError", flwptext:true)}}}}}}}}; if flmsg { msg ("")}}}}; try { //04/28/2001 JES: prevent startup from failing if Tool installation fails. Frontier.tools.startup ()}; scheduler.init (); html.init (); bundle { // webBrowser webBrowser.init (); if system.environment.isMac { try {new (tableType, @user.odbEditors.data.openFiles)}}; //Empty out the list of externally-edited files. if system.environment.isWindows { user.webBrowser.winDefaultBrowserApp = file.findApplication ("htm")}}; bundle { // first root run, phase 2 of 3 if flFirstRootRun { bundle { // set up websites table and related with websites.["#ftpSite"] { folder = file.folderFromPath (Frontier.getProgramPath ()) + "Websites" + file.getPathChar (); Çfile.sureFolder (folder) url = file.fileToURL (folder); isLocal = true}; user.html.sites.default = websites.["#ftpSite"]}; bundle { // personalize this copy of Frontier, configure network settings, and complete the installation local (flWebBasedInstall = true); if flWebBasedInstall { Ç11/29/04; 11:17:45 AM by TAC - the following seems like it should be done as part of mainRepsonder startup, init. IIRC, members.root is a feature of mainResponder bundle { //create the Admin membership group if needed local (adrRoot = @[system.temp.mainResponder.membersRootFile]); local (adrGroup = @adrRoot^.admin); if not defined (adrGroup^) { new (tableType, adrGroup)}; if not defined (adrGroup^.callbacks) { new (tableType, @adrGroup^.callbacks)}; if not defined (adrGroup^.cookieDomain) { adrGroup^.cookieDomain = ""}; if not defined (adrGroup^.cookieExpires) { adrGroup^.cookieExpires = "Mon, 01 Apr 2030 07:00:00 GMT"}; if not defined (adrGroup^.cookieName) { adrGroup^.cookieName = "Admin"}; if not defined (adrGroup^.mailReturnAddress) { adrGroup^.mailReturnAddress = user.prefs.mailAddress}; if not defined (adrGroup^.mailSubject) { adrGroup^.mailSubject = "Admin"}; if not defined (adrGroup^.mailTemplate) { wp.newTextObject ("", @adrGroup^.mailTemplate)}; if not defined (adrGroup^.openToPublic) { adrGroup^.openToPublic = false}; if not defined (adrGroup^.users) { new (tableType, @adrGroup^.users)}}; bundle { // prep for web based install via mainResponder admin website local (portString = ""); if user.inetd.config.http2.port != 80 { portString = ":" + user.inetd.config.http2.port}; if not defined (system.temp.Frontier.setupFrontier) { new (tableType, @system.temp.Frontier.setupFrontier)}; system.temp.Frontier.setupFrontier.flAllowLocalAccessToSetupPage = true; local (setupUrl = "http://127.0.0.1" + portString + "/setupFrontier"); if not defined (system.temp.installer) { new (tableType, @system.temp.installer)}; system.temp.installer.urlToOpen = setupUrl}} else { on infoDialog () { //prompt the user for name, org and initials on kernelCall (adrName, adrInitials, adrOrg, adrEmail) { kernel (dialog.getUserInfo)}; local (name, initials, organization, email); case sys.os () { "Win95"; "WinNT" { if not (kernelCall (@name, @initials, @organization, @email)) { return (false)}; if initials == "" { dialog.alert ("You must specify your initials."); infoDialog ()}; user.prefs.name = name; user.prefs.initials = initials; user.prefs.organization = organization; user.prefs.mailAddress = email}; "MacOS" { bundle { //initialize user.prefs.name etc using info from Internet Config try { name = ic.geticpreference (ic.eventinfo.realName)}; try { organization = ic.geticpreference (ic.eventinfo.organization)}; try { email = ic.geticpreferece (ic.eventinfo.emailAddress)}; user.prefs.name = name; user.prefs.organization = organization; if name != "" { local (i); user.prefs.initials = name [1]; for i = 3 to sizeof (name) { if name [i] == ' ' { user.prefs.initials = user.prefs.initials + name [i+1]}}}}; card.run (@system.cards.userInfoDialog)}}; return (true)}; infoDialog ()}}; //AR 09/27/04 : personalize install ÇrootUpdates.getCurrent ("Frontier") // 11/29/04; 6:57:54 PM by TAC - if we get a root update then we'll need to use rootUpdates.update bundle { // about window local (w); window.about (); w = window.frontMost (); window.zoom (w); menus.scripts.styleCommand ("medium"); window.setPosition (w, 25, 75); };Çwindow.close (s) bundle { // license edit (@system.startup.license); // 12/4/04; 9:26:35 PM by TAC - i rather do this near the beginning of phase 1 firstRootRun but had a problem with this window and setting up the quick script window wp.setSelect (0, 0)}}}; system.callbacks.startup (); //call user's startup scripts bundle { // build menu bar system.menus.buildMenuBar (); system.menus.buildSuitesSubmenu ()}; //5.0 Frontier.enableAgents (flEnableAgents); if flEnableHttpServer { //6.0, daemons don't start up until all the startup code has run new (tableType, @user.inetd.listens); inetd.start ()}; //start up all daemons with startup set true if flFirstRootRun { // open a url and set first root run to false if defined (system.temp.installer.urlToOpen) { Çwindow.update ("About Frontier") webBrowser.openUrl (system.temp.installer.urlToOpen); webBrowser.bringToFront ()}; user.prefs.firstRootRun = false}; system.temp.Frontier.startingUp = false; //signal to all who care, let the hits begin! msg (""); fileMenu.save (); Ç Çbundle //license agreement Çlocal (editLicense = false) Çif sys.os () == "MacOS" Çon itemhit (itemnumber) Çcase (itemnumber) Ç1 Çyes ÇeditLicense = true Çreturn (false) Çstop processing the dialog Ç2 Çno Çreturn (false) Çstop processing the dialog Çreturn (true) Çkeep processing the dialog Çdialog.run (517, 1, @itemhit) Çelse Çif dialog.yesNo ("Frontier is licensed software. Do you want to read the license agreement now?") ÇeditLicense = true Çif editLicense Çbundle //get root update ÇproxyInit () Çif user.prefs.serialNumber != "" and not (string.lower (user.prefs.serialNumber) contains "trial") ÇrootUpdates.init () \ No newline at end of file --- 1,3 ---- FrontierVcsFile:1:scpt:system.startup.startupScript ! ÇChanges Ç1/20/06; 1:54:05 PM by TAC Çdisable agents for all startups, not just for first root run Çthere was a problem with Tools starting up and its agent manipulating menus at the same time and causing a crash Ç12/24/05; 12:33:32 PM by TAC Çprefs.root now has a #startup script, deal with it Ç11/10/05; 4:24:48 PM by TAC Çmoved system.temp.Frontier/starting up after first if firstRootRun check was causing startup problem Ç11/5/05; 12:00:32 PM by TAC Çmoved system.temp.Frontier check back to top of script Ç10/9/05; 3:39:07 PM by TAC Çwhen storing prefs.root path, store realative path Çuse table.copyUndefinedContents to copy some item Çmove some of the user prefs initializations into Frontier.data.userPrefs Çrearrange script so that some initializations can happen outside of the first root run, this should make it easier to add new items and not have them get missed because the first root run had already been run once Ç10/4/05; 7:26:36 PM by TAC Çupon check for presence of Psapi.dll, don't use hard coded application name Ç9/26/05; 4:30:14 PM by TAC Çadded user.prefs.flReplaceDialogExpertMode Ç8/23/05; 7:22:18 PM by TAC Çadded user.prefs.flCompactModalMenus Ç7/14/05; 10:35:39 AM by TAC Çsystem.menus.data.currentMenuType set to nil so agent will update modal menu properly upon relaunch Ç7/6/05; 12:21:38 PM by TAC Çchanged user.callbacks.sendmail to user.callbacks.tcpSendMail Çadded user.prefs.mailHostPort Ç6/15/05; 6:52:11 PM by TAC Çrewrite for Open Source release, bring in code from startup.startupScript, userland.firstRootRun, userland.finishInstall, and userland.cleanRoot ÇOld code Çstartup.startupScript <http://cvs.sourceforge.net/viewcvs.py/frontierkernel/odbs/frontierRoot/system/startup/startupScript?rev=1.1> Çuserland.firstRootRun <http://cvs.sourceforge.net/viewcvs.py/frontierkernel/odbs/frontierRoot/system/verbs/builtins/userland/Attic/firstRootRun?rev=1.1> Çuserland.finishInstall <http://cvs.sourceforge.net/viewcvs.py/frontierkernel/odbs/frontierRoot/system/verbs/builtins/userland/Attic/finishInstall?rev=1.1> Çuserland.cleanRoot <http://cvs.sourceforge.net/viewcvs.py/frontierkernel/odbs/frontierRoot/system/verbs/builtins/userland/Attic/cleanRoot?rev=1.1> Ç06/08/01; 11:24:35 PM by JES ÇWhen opening databases defined at user.databases, skip objects which aren't tables. This avoids the condition where startup wouldn't complete, if there's an item #1 in the user.databases table. Ç06/02/01; 8:34:20 PM by PBS ÇDo the web-based install and open the Control Panel if this is the first root run. Ç04/28/01; 7:48:46 PM by JES ÇCall Frontier.tools.startup in a try block, so that the startup process will finish even if Tools installation fails. Ç04/20/01; 4:49:05 PM by JES ÇCall tools.startup to install Tools at startup. Ç10/7/99; 4:20:26 PM by PBS ÇOnly run the #startup script in a guest database if runStartupScript exists and is true. Previously, it would be run whether runStartupScript was true or false. Çhttp://frontier.userland.com/stories/storyReader$1760 Ç10/6/99; 10:21:35 PM by PBS ÇOnly set the taskTime for the overnight task if it's in the past. This fixes a bug when the taskTime was before midnight, but it was being set for the next day, so the overnight task wouldn't run. Çhttp://frontier.userland.com/stories/storyReader$1761 Ç8/19/99; 6:44:48 AM by DW ÇMake sure that taskTimes in user.scheduler.tasks are in the future. ÇWe do this much more quickly than scheduler.monitor would. Çhttp://discuss.userland.com/msgReader$9658 ÇThis script runs when Frontier opens the Frontier.root file. if defined (system.temp.Frontier) { // only run the startup script once return}; local (flEnableAgents = true, flOpenDatabases = true, flEnableHttpServer = true); // can be set by the external startup script local (flFirstRootRun = true); bundle { // miscellaneous initializations, checks, and etc., phase 1 of 2 Frontier.enableAgents (false); // try to keep agents from reporting errors and causing problems Frontier.pathString = file.folderFromPath (frontier.getFilePath ()); if defined (user.prefs.firstRootRun) { flFirstRootRun = user.prefs.firstRootRun}}; if flFirstRootRun { // hide all windows, wipe temp and user while window.frontmost () != "" { // open windows can mess things up later on window.hide (window.frontmost ())}; Çreturn (false) // enable for testing new (tableType, @system.temp); new (tableType, @root.user)}; bundle { // system.temp.Frontier, we are starting up new (tableType, @system.temp.Frontier); system.temp.Frontier.startupTime = clock.now (); system.temp.Frontier.startingUp = true}; backups.init (); batchExporter.init (); export.init (); rootUpdates.init (); // set up user.rootUpdates, even though root updates uses tcp, its ok to set up here as no tcp calls are made at this time webEdit.init (); bundle { // set up user.prefs if flFirstRootRun { new (tableType, @user.prefs); bundle { // set up user.prefs.commonStyles case sys.os () { "MacOS" { if system.environment.isCarbon { user.prefs.commonStyles = Frontier.data.commonStylesMacCarbon} else { user.prefs.commonStyles = Frontier.data.commonStylesMac}}; "Win95"; "WinNT" { user.prefs.commonStyles = Frontier.data.commonStylesWin}}}}; table.copyUndefinedContents (@Frontier.data.userPrefs, @user.prefs); bundle { // set up user.prefs.dialogs if flFirstRootRun { new (tableType, @user.prefs.dialogs)}; table.copyUndefinedContents (@Frontier.data.userPrefs.dialogs, @user.prefs.dialogs)}; bundle { // set up user.prefs.search if flFirstRootRun { new (tableType, @user.prefs.search)}; table.copyUndefinedContents (@Frontier.data.userPrefs.search, @user.prefs.search); if not (defined (user.prefs.search.replaceWith)) { user.prefs.search.replaceWith = Frontier.version ()}}; Frontier.setupUserPrefsFonts ()}; if flFirstRootRun { bundle { // set up the quick script window clipboard.putvalue ("dialog.notify (\"Hello World!\")"); window.quickScript (); editmenu.selectall (); editmenu.paste (); window.close ("Quick Script")}; bundle { // set up root window local (w = "root"); window.open (w); window.setPosition (w, 0, 0); editMenu.setFont (user.prefs.fonts.tableFont); editMenu.setFontSize (user.prefs.fonts.tableFontSize); window.zoom (w)}; bundle { // set up user.callbacks new (tableType, @user.callbacks); new (tableType, @user.callbacks.closeWindow); new (tableType, @user.callbacks.cmd2click); new (tableType, @user.callbacks.compileChangedScript); new (tableType, @user.callbacks.control2click); new (tableType, @user.callbacks.fileWriteWholeFile); new (tableType, @user.callbacks.opCollapse); new (tableType, @user.callbacks.opCursorMoved); new (tableType, @user.callbacks.openWindow); new (tableType, @user.callbacks.opExpand); new (tableType, @user.callbacks.opInsert); new (tableType, @user.callbacks.opReturnKey); new (tableType, @user.callbacks.opRightClick); new (tableType, @user.callbacks.opStruct2Click); new (tableType, @user.callbacks.option2click); new (tableType, @user.callbacks.resume); new (tableType, @user.callbacks.saveWindow); new (tableType, @user.callbacks.shutdown); new (tableType, @user.callbacks.startup); new (tableType, @user.callbacks.statusMessage); new (tableType, @user.callbacks.suspend); new (tableType, @user.callbacks.systemTrayIcon2Click); new (tableType, @user.callbacks.systemTrayIconRightClick); new (tableType, @user.callbacks.tcpSendMail)}; bundle { // clear applications paths in system.verbs.apps local (adrAppsTable = @system.verbs.apps, i); for i = 1 to sizeof (adrAppsTable^) { local (adrAppInfo = @adrAppsTable^ [i].appInfo); if defined (adrAppInfo^) { adrAppInfo^.path = ""}}}; bundle { // set up Frontier.tools.thread Frontier.tools.thread.ct = 0; Frontier.tools.thread.enabled = true}; bundle { // set up workspace new (tableType, @root.workspace); new (outlineType, @workspace.notepad)}; bundle { // miscellaneous new (tableType, @root.scratchpad); new (tableType, @system.deskscripts); new (tableType, @user.databases); new (tableType, @user.protocols); }};Çnew (tableType, @websites.["#data"]) bundle { // set up user.menus if flFirstRootRun { new (tableType, @user.menus)}; Çuser.menus.bookmarkMenu = userland.virginBookmarkMenu if not (defined (user.menus.customMenu)) { user.menus.customMenu = Frontier.data.virginCustomMenu}}; if flFirstRootRun { // open mainResponder.root and prefs.root bundle { // open mainResponder.root, hidden and add to user.databases local (appFolder = Frontier.getSubFolder ("apps")); if not defined ( [appFolder + "mainResponder.root"] ) { Frontier.installApp ("mainResponder.root", false)}}; bundle { // open prefs.root, hidden and add to user.databases local (f = Frontier.getSubFolder ("www") + "prefs.root"); if not (defined ([f])) { fileMenu.open (f, true);}; //open hidden ÇAdd an entry to the user.databases table. local (adrTable = @user.databases.["prefs.root"]); new (tableType, adrTable); adrTable^.f = file.getPathChar () + (f - Frontier.pathString); adrTable^.openOnStartup = true; adrTable^.runStartupScript = true; adrTable^.supportsSubscribe = false; bundle { // run the startup script local (adrStartupScript = @[adrTable^.f].["#startup"]); if defined (adrStartupScript^) { adrStartupScript^ ()}}}}; // run the startup script Çbundle //initialize responders Çuser.webserver.responders.websiteFramework.data.docTree.samples = @websites.samples Çtry Çdelete (@user.webserver.responders.websiteFramework.data.docTree.allSites) Çtry Çdelete (@user.webserver.responders.websiteFramework.data.docTree.contents) Ç Çif defined (user.webserver.responders.manilaEdit) Çdelete (@user.webserver.responders.manilaEdit) ÇfileMenu.save () bundle { // miscellaneous variable initializations and checks, phase 2 of 2 system.menus.data.currentsuite = ""; system.menus.data.currentMenuType = nil; system.menus.data.currentmenu = 0; bundle { // check for presence of Psapi.dll if sys.os () == "WinNT" { if not (sys.appIsRunning (file.fileFromPath (Frontier.getProgramPath ()))) { // 11/27/04; 12:14:40 PM by TAC - would it be possible for Frontier to install this on its own? dialog.alert ("You need to run the Frontier Psapi Installer for certain Frontier verbs to work properly.")}}}}; bundle { //open the about window if the pref says we should Çadded 12/16/98; 6:47:28 PM by DW if not defined (user.prefs.openAboutWindow) { user.prefs.openAboutWindow = true}; if user.prefs.openAboutWindow { window.about ()}}; bundle { //initialize the log, next bit of code could add a log item Çadded 12/16/98; 6:52:40 PM by DW if defined (log.startup) { log.startup ()}}; bundle { //run the external startup script local (fname = "frontierStartupCommands.txt"); local (f = file.folderFromPath (Frontier.getProgramPath ()) + fname); if file.exists (f) { try { evaluate (string (file.readWholeFile (f)))} else { log.add ("Error running " + fname + ": \"" + tryError + "\"", "startupError", flwptext:true)}}}; bundle { // tcp based services webserver.init (); // needs to load first betty.init (); // needs to load second soap.init ()}; bundle { // people based services people.init (); // needs to load first custody.init (); webEditServer.init ()}; bundle { //open all the databases that have openOnStartup true Çadded 12/16/98; 6:23:16 PM by DW if defined (user.databases) { if flOpenDatabases { local (i, flmsg = false); for i = 1 to sizeof (user.databases) { if typeOf (user.databases[i]) == tableType { //06/08/01 JES: avert item #1 errors with user.databases [i] { local (flopened = false); try { if openOnStartup { msg (this + ": Opening " + file.fileFromPath (f)); flmsg = true; fileMenu.open (f, hidden:true); flopened = true}} else { log.add ("Startup error opening guest database " + nameof (user.databases [i]) + ": \"" + tryError + "\"", "startupError", flwptext:true)}; if flopened { if defined (runStartupScript) { if runStartupScript { //PBS 10/7/99: check the value of runStartupScript: only run the script if the boolean is true local (adrscript = @[filespec (f)].["#startup"]); if defined (adrscript^) { try { adrscript^ ()} else { log.add ("Error running #startup script in guest database " + nameof (user.databases [i]) + ": \"" + tryError + "\"", "startupError", flwptext:true)}}}}}}}}; if flmsg { msg ("")}}}}; try { //04/28/2001 JES: prevent startup from failing if Tool installation fails. Frontier.tools.startup ()}; scheduler.init (); html.init (); bundle { // webBrowser webBrowser.init (); if system.environment.isMac { try {new (tableType, @user.odbEditors.data.openFiles)}}; //Empty out the list of externally-edited files. if system.environment.isWindows { user.webBrowser.winDefaultBrowserApp = file.findApplication ("htm")}}; bundle { // first root run, phase 2 of 3 if flFirstRootRun { bundle { // set up websites table and related with websites.["#ftpSite"] { folder = file.folderFromPath (Frontier.getProgramPath ()) + "Websites" + file.getPathChar (); Çfile.sureFolder (folder) url = file.fileToURL (folder); isLocal = true}; user.html.sites.default = websites.["#ftpSite"]}; bundle { // personalize this copy of Frontier, configure network settings, and complete the installation local (flWebBasedInstall = true); if flWebBasedInstall { Ç11/29/04; 11:17:45 AM by TAC - the following seems like it should be done as part of mainRepsonder startup, init. IIRC, members.root is a feature of mainResponder bundle { //create the Admin membership group if needed local (adrRoot = @[system.temp.mainResponder.membersRootFile]); local (adrGroup = @adrRoot^.admin); if not defined (adrGroup^) { new (tableType, adrGroup)}; if not defined (adrGroup^.callbacks) { new (tableType, @adrGroup^.callbacks)}; if not defined (adrGroup^.cookieDomain) { adrGroup^.cookieDomain = ""}; if not defined (adrGroup^.cookieExpires) { adrGroup^.cookieExpires = "Mon, 01 Apr 2030 07:00:00 GMT"}; if not defined (adrGroup^.cookieName) { adrGroup^.cookieName = "Admin"}; if not defined (adrGroup^.mailReturnAddress) { adrGroup^.mailReturnAddress = user.prefs.mailAddress}; if not defined (adrGroup^.mailSubject) { adrGroup^.mailSubject = "Admin"}; if not defined (adrGroup^.mailTemplate) { wp.newTextObject ("", @adrGroup^.mailTemplate)}; if not defined (adrGroup^.openToPublic) { adrGroup^.openToPublic = false}; if not defined (adrGroup^.users) { new (tableType, @adrGroup^.users)}}; bundle { // prep for web based install via mainResponder admin website local (portString = ""); if user.inetd.config.http2.port != 80 { portString = ":" + user.inetd.config.http2.port}; if not defined (system.temp.Frontier.setupFrontier) { new (tableType, @system.temp.Frontier.setupFrontier)}; system.temp.Frontier.setupFrontier.flAllowLocalAccessToSetupPage = true; local (setupUrl = "http://127.0.0.1" + portString + "/setupFrontier"); if not defined (system.temp.installer) { new (tableType, @system.temp.installer)}; system.temp.installer.urlToOpen = setupUrl}} else { on infoDialog () { //prompt the user for name, org and initials on kernelCall (adrName, adrInitials, adrOrg, adrEmail) { kernel (dialog.getUserInfo)}; local (name, initials, organization, email); case sys.os () { "Win95"; "WinNT" { if not (kernelCall (@name, @initials, @organization, @email)) { return (false)}; if initials == "" { dialog.alert ("You must specify your initials."); infoDialog ()}; user.prefs.name = name; user.prefs.initials = initials; user.prefs.organization = organization; user.prefs.mailAddress = email}; "MacOS" { bundle { //initialize user.prefs.name etc using info from Internet Config try { name = ic.geticpreference (ic.eventinfo.realName)}; try { organization = ic.geticpreference (ic.eventinfo.organization)}; try { email = ic.geticpreferece (ic.eventinfo.emailAddress)}; user.prefs.name = name; user.prefs.organization = organization; if name != "" { local (i); user.prefs.initials = name [1]; for i = 3 to sizeof (name) { if name [i] == ' ' { user.prefs.initials = user.prefs.initials + name [i+1]}}}}; card.run (@system.cards.userInfoDialog)}}; return (true)}; infoDialog ()}}; //AR 09/27/04 : personalize install ÇrootUpdates.getCurrent ("Frontier") // 11/29/04; 6:57:54 PM by TAC - if we get a root update then we'll need to use rootUpdates.update bundle { // about window local (w); window.about (); w = window.frontMost (); window.zoom (w); menus.scripts.styleCommand ("medium"); window.setPosition (w, 25, 75); };Çwindow.close (s) bundle { // license edit (@system.startup.license); // 12/4/04; 9:26:35 PM by TAC - i rather do this near the beginning of phase 1 firstRootRun but had a problem with this window and setting up the quick script window wp.setSelect (0, 0)}}}; system.callbacks.startup (); //call user's startup scripts bundle { // build menu bar system.menus.buildMenuBar (); system.menus.buildSuitesSubmenu ()}; //5.0 Frontier.enableAgents (flEnableAgents); if flEnableHttpServer { //6.0, daemons don't start up until all the startup code has run new (tableType, @user.inetd.listens); inetd.start ()}; //start up all daemons with startup set true if flFirstRootRun { // open a url and set first root run to false if defined (system.temp.installer.urlToOpen) { Çwindow.update ("About Frontier") webBrowser.openUrl (system.temp.installer.urlToOpen); webBrowser.bringToFront ()}; user.prefs.firstRootRun = false}; system.temp.Frontier.startingUp = false; //signal to all who care, let the hits begin! msg (""); fileMenu.save (); Ç Çbundle //license agreement Çlocal (editLicense = false) Çif sys.os () == "MacOS" Çon itemhit (itemnumber) Çcase (itemnumber) Ç1 Çyes ÇeditLicense = true Çreturn (false) Çstop processing the dialog Ç2 Çno Çreturn (false) Çstop processing the dialog Çreturn (true) Çkeep processing the dialog Çdialog.run (517, 1, @itemhit) Çelse Çif dialog.yesNo ("Frontier is licensed software. Do you want to read the license agreement now?") ÇeditLicense = true Çif editLicense Çbundle //get root update ÇproxyInit () Çif user.prefs.serialNumber != "" and not (string.lower (user.prefs.serialNumber) contains "trial") ÇrootUpdates.init () \ No newline at end of file |