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: <cre...@us...> - 2007-02-23 18:20:39
|
Revision: 1618
http://svn.sourceforge.net/frontierkernel/?rev=1618&view=rev
Author: creecode
Date: 2007-02-23 10:20:35 -0800 (Fri, 23 Feb 2007)
Log Message:
-----------
in clayfolderloopvisit function, dispose handle fs.name
formatting tweaks
Modified Paths:
--------------
Frontier/branches/Frontier_Long_File_Paths/Common/source/claycallbacks.c
Modified: Frontier/branches/Frontier_Long_File_Paths/Common/source/claycallbacks.c
===================================================================
--- Frontier/branches/Frontier_Long_File_Paths/Common/source/claycallbacks.c 2007-02-23 18:16:53 UTC (rev 1617)
+++ Frontier/branches/Frontier_Long_File_Paths/Common/source/claycallbacks.c 2007-02-23 18:20:35 UTC (rev 1618)
@@ -594,6 +594,7 @@
fileinfotobrowserinfo (info, &browserinfo);
return ((*(*cb).callback) (bsitem, &browserinfo, (*cb).refcon));
+
} /*clayfolderexpandvisit*/
#endif
@@ -606,13 +607,14 @@
#pragma unused(hnode, val)
//
- // 2007-01-17 creedon: support for long odb item names and file paths
+ // 2007-02-23 creedon: support for long odb item names and file paths
//
// 5.0a17 dmb: no, let clayfolderloop do it, once, even if table is empty
//
// 5.0a3 dmb: set flmayaffectdisplay for the parent table
//
+ boolean fl;
tybrowserinfo info;
tybrowserspec fs;
tycallbackinfo *cbinfo = ( tycallbackinfo * ) refcon;
@@ -627,8 +629,12 @@
claygetfileinfo ( &fs, &info );
- return ( ! ( *( *cbinfo ).callback ) ( handleName, &info, ( *cbinfo ).refcon ) );
+ fl = ! ( *( *cbinfo ).callback ) ( handleName, &info, ( *cbinfo ).refcon );
+ disposehandle ( fs.name );
+
+ return ( fl );
+
} // clayfolderloopvisit
#endif
@@ -678,7 +684,7 @@
} // clayfolderloop
-boolean claygetfileinfo (const tybrowserspec *fs, tybrowserinfo *info) {
+boolean claygetfileinfo ( const tybrowserspec *fs, tybrowserinfo *info ) {
/*
5.0a3 dmb: side effect: set flmayaffectdisplay flags
@@ -714,34 +720,37 @@
hashcountitems (roottable, &ct);
(*info).filesize = ct;
+
}
else {
+
if (claylookupvalue (fs, &val, &hnode)) {
+
+ if (val.valuetype == externalvaluetype) {
- if (val.valuetype == externalvaluetype) {
-
hv = (hdlexternalvariable) val.data.externalvalue;
(**hv).flmayaffectdisplay = true;
if (istablevariable (hv)) {
-
+
(*info).flfolder = true;
(*info).filesize = 1; // can expand; don't care about actual #
if ((**hv).flinmemory) {
-
+
if (langexternalvaltotable (val, &ht, hnode))
(**ht).flmayaffectdisplay = true;
}
}
}
-
+
// langgetvalsize (val, &(*info).filesize);
+
}
}
-
+
/* *** replace fields with odb-specific info
(*fs).filetype = (*fileinfo).filetype;
@@ -883,6 +892,7 @@
}
pushstring (adj, bs);
+
} /*pushadjective*/
@@ -982,6 +992,7 @@
} /*switch*/
copystring (BIGSTRING ("\x08" "document"), bs);
+
} /*claygetfilekindstring*/
@@ -1020,14 +1031,17 @@
pushstring (BIGSTRING ("\x01" "s"), bs);
return;
+
}
numbertostring ((*browserinfo).filesize, bs);
+
} /*claygetfatsizestring*/
#endif
+
boolean browsertextchanged ( hdlheadrecord hnode, const Handle handleOriginalName ) {
//
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <cre...@us...> - 2007-02-23 18:16:57
|
Revision: 1617
http://svn.sourceforge.net/frontierkernel/?rev=1617&view=rev
Author: creecode
Date: 2007-02-23 10:16:53 -0800 (Fri, 23 Feb 2007)
Log Message:
-----------
in ccloadspecialfile function, initialize handlePath to empty handle
formatting tweaks
Modified Paths:
--------------
Frontier/branches/Frontier_Long_File_Paths/Common/source/cancoon.c
Modified: Frontier/branches/Frontier_Long_File_Paths/Common/source/cancoon.c
===================================================================
--- Frontier/branches/Frontier_Long_File_Paths/Common/source/cancoon.c 2007-02-19 01:30:23 UTC (rev 1616)
+++ Frontier/branches/Frontier_Long_File_Paths/Common/source/cancoon.c 2007-02-23 18:16:53 UTC (rev 1617)
@@ -1072,7 +1072,7 @@
#pragma unused (filetype)
//
- // 2007-01-16 creedon: support for long odb item names and file paths
+ // 2007-02-23 creedon: support for long odb item names and file paths
//
// 2006-06-23 creedon: replace fsname macro with getfsfile function;
//
@@ -1099,6 +1099,9 @@
}
}
+ if ( ! newemptyhandle ( &handlePath ) )
+ return ( false );
+
if ( ! filespectopath ( fspec, &handlePath ) ) {
bigstring bs;
@@ -1113,10 +1116,12 @@
texthandletostring ( handlePath, bspath );
+ disposehandle ( handlePath );
+
langdeparsestring (bspath, chclosecurlyquote); // add needed escape sequences
if (getsystemtablescript (idfinder2frontscript, bs)) { // frontier.findertofront=^0
-
+
#ifdef MACVERSION
if ((shellevent.what == kHighLevelEvent) && ((**landgetglobals ()).maceventsender == 'MACS'))
@@ -1125,13 +1130,13 @@
#endif
pbool = bsfalse;
-
+
parsedialogstring (bs, pbool, nil, nil, nil, bs);
langrunstringnoerror (bs, bs);
}
-
+
if (!getsystemtablescript (idfinder2clickscript, bs)) // frontier.finder2click ("^0")
return (false);
@@ -1309,6 +1314,7 @@
setcancoonglobals (origglobals); /*restore databasedata, etc.*/
return (false);
+
} /*ccnewrecord*/
@@ -1335,6 +1341,7 @@
*w = (**hinfo).macwindow;
return (true);
+
} /*ccnewfilewindow*/
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <cre...@us...> - 2007-02-19 01:30:45
|
Revision: 1616
http://svn.sourceforge.net/frontierkernel/?rev=1616&view=rev
Author: creecode
Date: 2007-02-18 17:30:23 -0800 (Sun, 18 Feb 2007)
Log Message:
-----------
support for long odb item names and file paths
formatting tweaks
Modified Paths:
--------------
Frontier/branches/Frontier_Long_File_Paths/Common/source/dockmenu.c
Modified: Frontier/branches/Frontier_Long_File_Paths/Common/source/dockmenu.c
===================================================================
--- Frontier/branches/Frontier_Long_File_Paths/Common/source/dockmenu.c 2007-02-19 01:25:35 UTC (rev 1615)
+++ Frontier/branches/Frontier_Long_File_Paths/Common/source/dockmenu.c 2007-02-19 01:30:23 UTC (rev 1616)
@@ -239,30 +239,32 @@
static boolean dockmenuinsertmenuitem (hdlmenu hmenu, short itemnumber, hdlheadrecord hnode) {
- /*
- Insert one menu item.
-
- 7.1b42 PBS: check menu items that should be checked.
- */
+ //
+ // Insert one menu item.
+ //
+ // 2007-02-18 creedon: support for long odb item names and file paths
+ //
+ // 7.1b42 PBS: check menu items that should be checked.
+ //
+ Handle handleHeadString;
bigstring bsheadstring;
- boolean flenabled = true;
- boolean flchecked = false;
-
- getheadstring (hnode, bsheadstring);
-
+ boolean flchecked = false, flenabled = true;
+
+ opGetHeadTextHandle ( hnode, &handleHeadString );
+
+ texthandletostring ( handleHeadString, bsheadstring);
+
+ disposehandle ( handleHeadString );
+
mereduceformula (bsheadstring);
mereducemenucodes (bsheadstring, &flenabled, &flchecked); /*7.0b23 PBS: items can be disabled.*/
- pushpopupitem (hmenu, bsheadstring, flenabled, menuid);
+ pushpopupitem ( hmenu, bsheadstring, flenabled, menuid );
- #if TARGET_API_MAC_CARBON == 1
-
- SetMenuItemCommandID (hmenu, countmenuitems (hmenu), menuid);
+ SetMenuItemCommandID (hmenu, countmenuitems (hmenu), menuid);
- #endif
-
if (flchecked) /*7.1b42 PBS: support for checked menu items.*/
checkmenuitem (hmenu, countmenuitems (hmenu), flchecked);
@@ -270,10 +272,13 @@
dockmenuinsertsubmenu (hmenu, itemnumber, hnode);
#ifdef MACVERSION
+
flstackneedsdisposing = true;
+
#endif
return (true);
+
} /*dockmenuinsertmenuitem*/
@@ -313,19 +318,22 @@
static boolean dockmenufillpopup (hdlmenu hmenu, hdlmenurecord *hmreturned) {
- /*
- 7.1b44 PBS: call menuverbgetsize to make sure the menu is in memory.
- */
-
+ //
+ // 2007-02-18 creedon: support for long odb item names and file paths
+ //
+ //
+ // 7.1b44 PBS: call menuverbgetsize to make sure the menu is in memory.
+ //
+
+ Handle handleAddress;
+ boolean fl = false;
+ hdlexternalhandle h;
+ hdlhashnode hnode;
hdlhashtable htable;
- hdlhashnode hnode;
+ hdlheadrecord hsummit;
hdlmenurecord hm;
+ long menusize = 0;
tyvaluerecord valaddress, val;
- hdlexternalhandle h;
- hdlheadrecord hsummit;
- bigstring bsaddress;
- boolean fl = false;
- long menusize = 0;
if (roottable == nil) /*9.1b1 JES: If there's no system root, don't crash.*/
return (false);
@@ -336,10 +344,10 @@
if (valaddress.valuetype != addressvaluetype)
goto exit;
- if (!getaddressvalue (valaddress, &htable, bsaddress))
+ if (!getaddressvalue (valaddress, &htable, &handleAddress))
goto exit;
- if (!langsymbolreference (htable, bsaddress, &val, &hnode))
+ if (!langsymbolreference (htable, handleAddress, &val, &hnode))
goto exit;
if (val.valuetype != externalvaluetype)
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <cre...@us...> - 2007-02-19 01:25:39
|
Revision: 1615
http://svn.sourceforge.net/frontierkernel/?rev=1615&view=rev
Author: creecode
Date: 2007-02-18 17:25:35 -0800 (Sun, 18 Feb 2007)
Log Message:
-----------
in function alertdialog, removed non-carbon code
formatting tweaks
Modified Paths:
--------------
Frontier/branches/Frontier_Long_File_Paths/Common/source/dialogs.c
Modified: Frontier/branches/Frontier_Long_File_Paths/Common/source/dialogs.c
===================================================================
--- Frontier/branches/Frontier_Long_File_Paths/Common/source/dialogs.c 2007-02-19 01:20:14 UTC (rev 1614)
+++ Frontier/branches/Frontier_Long_File_Paths/Common/source/dialogs.c 2007-02-19 01:25:35 UTC (rev 1615)
@@ -1578,38 +1578,68 @@
disposemodaldialog (pdialog);
return (itemnumber == askokitem);
+
} /*askdialog*/
-boolean twowaydialog (bigstring bsprompt, bigstring okbutton, bigstring cancelbutton) {
+boolean twowaydialog ( bigstring prompt, bigstring okbutton, bigstring cancelbutton ) {
+
+ #ifdef MACVERSION
- register DialogPtr pdialog;
- register short item;
+ register DialogPtr pdialog;
+ register short item;
+
+ if ((pdialog = newmodaldialog (twowaydialogid, twowayokitem)) == nil)
+ return (false);
+
+ setdialogtext (pdialog, twowaymsgitem, prompt);
+
+ dialogsetbuttonstring (pdialog, twowayokitem, okbutton);
+
+ dialogsetbuttonstring (pdialog, twowaycancelitem, cancelbutton);
+
+ WindowRef pWind = GetDialogWindow(pdialog);
+
+ ShowWindow(pWind);
+
+ item = runmodaldialog ();
+
+ disposemodaldialog (pdialog);
+
+ return (item == twowayokitem);
+
+ #endif // MACVERSION
- if ((pdialog = newmodaldialog (twowaydialogid, twowayokitem)) == nil)
- return (false);
+ #ifdef WIN95VERSION
- setdialogtext (pdialog, twowaymsgitem, bsprompt);
+ int nResult;
+ char s[256];
+
+ copyptocstring (prompt, s);
+ setbuttonstring (okbutton, gMsgRetryButton);
+ setbuttonstring (cancelbutton, gMsgCancelButton);
+
+ setmessageboxbuttonsize (2);
+
+ releasethreadglobals ();
+
+ // Set a task specific CBT hook before calling MessageBox. The CBT hook will
+ // be called when the message box is created and will give us access to
+ // the window handle of the MessageBox. The message box
+ // can then be subclassed in the CBT hook to change the color of the text and
+ // background. Remove the hook after the MessageBox is destroyed.
+
+ g_hhookCBT = SetWindowsHookEx(WH_CBT, CBTProc, shellinstance, 0);
+ nResult = MessageBox(hwndMDIClient, s, frontierstring, MB_RETRYCANCEL | MB_APPLMODAL);
+ UnhookWindowsHookEx(g_hhookCBT);
+
+ grabthreadglobals ();
+
+ return (nResult == IDRETRY);
+
+ #endif // WIN95VERSION
- dialogsetbuttonstring (pdialog, twowayokitem, okbutton);
-
- dialogsetbuttonstring (pdialog, twowaycancelitem, cancelbutton);
-
- #if TARGET_API_MAC_CARBON == 1
- {
- WindowRef pWind = GetDialogWindow(pdialog);
- ShowWindow(pWind);
- }
- #else
- ShowWindow (pdialog);
- #endif
-
- item = runmodaldialog ();
-
- disposemodaldialog (pdialog);
-
- return (item == twowayokitem);
- } /*twowaydialog*/
+ } // twowaydialog
short threewaydialog (bigstring bsprompt, bigstring yesbutton, bigstring nobutton, bigstring cancelbutton) {
@@ -1821,10 +1851,12 @@
boolean alertdialog (bigstring bsprompt) {
- /*
- put up the standard "alert" dialog, with the provided prompt and return
- true if the user clicked on ok. false if cancel was clicked.
- */
+ //
+ // put up the standard "alert" dialog, with the provided prompt and return
+ // true if the user clicked on ok. false if cancel was clicked.
+ //
+ // 2007-02-18 creedon: removed non-carbon code
+ //
register DialogPtr pdialog;
register short itemnumber;
@@ -1836,19 +1868,15 @@
setdialogtext (pdialog, alertmsgitem, bsprompt);
- #if TARGET_API_MAC_CARBON == 1
- {
WindowRef pWind = GetDialogWindow(pdialog);
ShowWindow(pWind);
- }
- #else
- ShowWindow (pdialog);
- #endif
+
itemnumber = runmodaldialog ();
disposemodaldialog (pdialog);
return (itemnumber == alertokitem);
+
} /*alertdialog*/
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <cre...@us...> - 2007-02-19 01:20:14
|
Revision: 1614
http://svn.sourceforge.net/frontierkernel/?rev=1614&view=rev
Author: creecode
Date: 2007-02-18 17:20:14 -0800 (Sun, 18 Feb 2007)
Log Message:
-----------
formatting tweaks
Modified Paths:
--------------
Frontier/branches/Frontier_Long_File_Paths/Common/headers/cancoon.h
Frontier/branches/Frontier_Long_File_Paths/Common/source/about.c
Modified: Frontier/branches/Frontier_Long_File_Paths/Common/headers/cancoon.h
===================================================================
--- Frontier/branches/Frontier_Long_File_Paths/Common/headers/cancoon.h 2007-02-19 01:19:36 UTC (rev 1613)
+++ Frontier/branches/Frontier_Long_File_Paths/Common/headers/cancoon.h 2007-02-19 01:20:14 UTC (rev 1614)
@@ -84,6 +84,7 @@
boolean flunused;
char waste [8];
+
} tycancoonwindowinfo;
Modified: Frontier/branches/Frontier_Long_File_Paths/Common/source/about.c
===================================================================
--- Frontier/branches/Frontier_Long_File_Paths/Common/source/about.c 2007-02-19 01:19:36 UTC (rev 1613)
+++ Frontier/branches/Frontier_Long_File_Paths/Common/source/about.c 2007-02-19 01:20:14 UTC (rev 1614)
@@ -1655,6 +1655,7 @@
disposehandle ((Handle) hdata);
return (false);
+
}
#if TARGET_API_MAC_CARBON == 1
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <cre...@us...> - 2007-02-19 01:19:36
|
Revision: 1613
http://svn.sourceforge.net/frontierkernel/?rev=1613&view=rev
Author: creecode
Date: 2007-02-18 17:19:36 -0800 (Sun, 18 Feb 2007)
Log Message:
-----------
support for long odb item names and file paths
formatting tweaks
Modified Paths:
--------------
Frontier/branches/Frontier_Long_File_Paths/Common/source/dbverbs.c
Modified: Frontier/branches/Frontier_Long_File_Paths/Common/source/dbverbs.c
===================================================================
--- Frontier/branches/Frontier_Long_File_Paths/Common/source/dbverbs.c 2007-02-19 01:18:30 UTC (rev 1612)
+++ Frontier/branches/Frontier_Long_File_Paths/Common/source/dbverbs.c 2007-02-19 01:19:36 UTC (rev 1613)
@@ -84,7 +84,7 @@
#else
- /*Prototypes*/
+ // Prototypes
boolean odbnewfile (hdlfilenum fnum);
@@ -96,31 +96,31 @@
boolean odbclosefile (odbref odb);
- boolean odbdefined (odbref odb, bigstring bspath);
+ boolean odbdefined ( odbref, const Handle );
- boolean odbdelete (odbref odb, bigstring bspath);
+ boolean odbdelete ( odbref, const Handle );
- boolean odbgettype (odbref odb, bigstring bspath, OSType *odbType);
+ boolean odbgettype ( odbref, const Handle, OSType * );
- boolean odbgetvalue (odbref odb, bigstring bspath, odbValueRecord *value);
+ boolean odbgetvalue ( odbref, const Handle, odbValueRecord * );
- boolean odbsetvalue (odbref odb, bigstring bspath, odbValueRecord *value);
+ boolean odbsetvalue ( odbref, const Handle, odbValueRecord *value );
- boolean odbnewtable (odbref odb, bigstring bspath);
+ boolean odbnewtable ( odbref, const Handle );
- boolean odbcountitems (odbref odb, bigstring bspath, long *count);
+ boolean odbcountitems ( odbref, const Handle, long * );
- boolean odbgetnthitem (odbref odb, bigstring bspath, long n, bigstring bsname);
+ boolean odbgetnthitem ( odbref, const Handle, long, Handle );
- boolean odbgetmoddate (odbref odb, bigstring bspath, unsigned long *date);
+ boolean odbgetmoddate ( odbref, const Handle, unsigned long * );
boolean odbdisposevalue (odbref odb, odbValueRecord *value);
- /*Functions*/
+ // Functions
boolean odbnewfile (hdlfilenum fnum) {
-
+
boolean fl;
hdlthreadglobals htg = getcurrentthreadglobals ();
@@ -135,10 +135,12 @@
swapinthreadglobals (htg);
return (fl);
+
}
+
boolean odbaccesswindow (WindowPtr w, odbref *odb) {
-
+
boolean fl;
hdlthreadglobals htg = getcurrentthreadglobals ();
@@ -153,10 +155,12 @@
swapinthreadglobals (htg);
return (fl);
+
}
+
boolean odbopenfile (hdlfilenum fnum, odbref *odb, boolean flreadonly) {
-
+
boolean fl;
hdlthreadglobals htg = getcurrentthreadglobals ();
@@ -171,10 +175,12 @@
swapinthreadglobals (htg);
return (fl);
+
}
+
boolean odbsavefile (odbref odb) {
-
+
boolean fl;
hdlthreadglobals htg = getcurrentthreadglobals ();
@@ -189,10 +195,12 @@
swapinthreadglobals (htg);
return (fl);
+
}
+
boolean odbclosefile (odbref odb) {
-
+
boolean fl;
hdlthreadglobals htg = getcurrentthreadglobals ();
@@ -207,10 +215,16 @@
swapinthreadglobals (htg);
return (fl);
+
}
- boolean odbdefined (odbref odb, bigstring bspath) {
+ boolean odbdefined (odbref odb, const Handle handlePath) {
+
+ //
+ // 2007-02-18 creedon: support for long odb item names and file paths
+ //
+
boolean fl;
hdlthreadglobals htg = getcurrentthreadglobals ();
@@ -218,17 +232,19 @@
swapinthreadglobals (nil);
- fl = odbDefined (odb, bspath);
+ fl = odbDefined (odb, handlePath);
cancoonglobals = nil;
swapinthreadglobals (htg);
return (fl);
+
}
- boolean odbdelete (odbref odb, bigstring bspath) {
+ boolean odbdelete (odbref odb, const Handle handlePath) {
+
boolean fl;
hdlthreadglobals htg = getcurrentthreadglobals ();
@@ -236,17 +252,19 @@
swapinthreadglobals (nil);
- fl = odbDelete (odb, bspath);
+ fl = odbDelete (odb, handlePath);
cancoonglobals = nil;
swapinthreadglobals (htg);
return (fl);
+
}
- boolean odbgettype (odbref odb, bigstring bspath, OSType *odbType) {
+ boolean odbgettype (odbref odb, const Handle handlePath, OSType *odbType) {
+
boolean fl;
hdlthreadglobals htg = getcurrentthreadglobals ();
@@ -254,17 +272,19 @@
swapinthreadglobals (nil);
- fl = odbGetType (odb, bspath, odbType);
+ fl = odbGetType (odb, handlePath, odbType);
cancoonglobals = nil;
swapinthreadglobals (htg);
return (fl);
+
}
- boolean odbgetvalue (odbref odb, bigstring bspath, odbValueRecord *value) {
+ boolean odbgetvalue (odbref odb, const Handle handlePath, odbValueRecord *value) {
+
boolean fl;
hdlthreadglobals htg = getcurrentthreadglobals ();
@@ -272,17 +292,19 @@
swapinthreadglobals (nil);
- fl = odbGetValue (odb, bspath, value);
+ fl = odbGetValue (odb, handlePath, value);
cancoonglobals = nil;
swapinthreadglobals (htg);
return (fl);
+
}
- boolean odbsetvalue (odbref odb, bigstring bspath, odbValueRecord *value) {
+ boolean odbsetvalue (odbref odb, const Handle handlePath, odbValueRecord *value) {
+
boolean fl;
hdlthreadglobals htg = getcurrentthreadglobals ();
@@ -290,17 +312,19 @@
swapinthreadglobals (nil);
- fl = odbSetValue (odb, bspath, value);
+ fl = odbSetValue (odb, handlePath, value);
cancoonglobals = nil;
swapinthreadglobals (htg);
return (fl);
+
}
- boolean odbnewtable (odbref odb, bigstring bspath) {
+ boolean odbnewtable (odbref odb, const Handle handlePath) {
+
boolean fl;
hdlthreadglobals htg = getcurrentthreadglobals ();
@@ -308,17 +332,19 @@
swapinthreadglobals (nil);
- fl = odbNewTable (odb, bspath);
+ fl = odbNewTable (odb, handlePath);
cancoonglobals = nil;
swapinthreadglobals (htg);
return (fl);
+
}
- boolean odbcountitems (odbref odb, bigstring bspath, long *count) {
+ boolean odbcountitems (odbref odb, const Handle handlePath, long *count) {
+
boolean fl;
hdlthreadglobals htg = getcurrentthreadglobals ();
@@ -326,17 +352,19 @@
swapinthreadglobals (nil);
- fl = odbCountItems (odb, bspath, count);
+ fl = odbCountItems (odb, handlePath, count);
cancoonglobals = nil;
swapinthreadglobals (htg);
return (fl);
+
}
- boolean odbgetnthitem (odbref odb, bigstring bspath, long n, bigstring bsname) {
+ boolean odbgetnthitem (odbref odb, const Handle handlePath, long n, Handle handleName) {
+
boolean fl;
hdlthreadglobals htg = getcurrentthreadglobals ();
@@ -344,17 +372,19 @@
swapinthreadglobals (nil);
- fl = odbGetNthItem (odb, bspath, n, bsname);
+ fl = odbGetNthItem (odb, handlePath, n, handleName);
cancoonglobals = nil;
swapinthreadglobals (htg);
return (fl);
+
}
- boolean odbgetmoddate (odbref odb, bigstring bspath, unsigned long *date) {
+ boolean odbgetmoddate (odbref odb, const Handle handlePath, unsigned long *date) {
+
boolean fl;
hdlthreadglobals htg = getcurrentthreadglobals ();
@@ -362,17 +392,19 @@
swapinthreadglobals (nil);
- fl = odbGetModDate (odb, bspath, date);
+ fl = odbGetModDate (odb, handlePath, date);
cancoonglobals = nil;
swapinthreadglobals (htg);
return (fl);
+
}
+
boolean odbdisposevalue (odbref odb, odbValueRecord *value) {
-
+
hdlthreadglobals htg = getcurrentthreadglobals ();
copythreadglobals (htg);
@@ -386,10 +418,12 @@
swapinthreadglobals (htg);
return (true);
+
}
- #define odbgeterror odbGetError
+ #define odbgeterror odbGetError
+
#endif
@@ -444,56 +478,67 @@
getmoddatefunc,
ctdbverbs
+
} tydbtoken;
static boolean odberror (boolean flresult) {
-
+
bigstring bserror;
if (flresult)
return (false);
-
+
odbgeterror (bserror);
langerrormessage (bserror);
return (true);
+
} /*odberror*/
-
+
static boolean getodbparam (hdltreenode hparam1, short pnum, hdlodbrecord *hodbrecord) {
//
+ // 2007-02-18 creedon: support for long odb item names and file paths
+ //
// 2006-06-23 creedon: for Mac, FSRef-zed
//
-
+
+ Handle h;
bigstring bs;
hdlodbrecord hodb;
+ ptrfilespec ptrfs;
tyfilespec fs;
- ptrfilespec ptrfs;
ptrfs = &fs;
-
+
if (!getfilespecvalue (hparam1, pnum, ptrfs))
return (false);
-
+
( void ) extendfilespec ( ptrfs, ptrfs );
for (hodb = hodblist; hodb != nil; hodb = (**hodb).hnext) {
if ( equalfilespecs ( &( **hodb ).fs, ptrfs ) ) {
-
+
*hodbrecord = hodb;
return (true);
+
}
}
getfsfile ( ptrfs, bs );
- lang2paramerror (dbnotopenederror, bsfunctionname, bs );
+ if ( ! newtexthandle ( bs, &h ) )
+ return ( false );
+
+ lang2paramerror ( dbnotopenederror, handleFunctionName, h );
+ disposehandle ( h );
+
return (false);
} // getodbparam
@@ -502,6 +547,8 @@
static boolean getodbvalue (hdltreenode hparam1, short pnum, tyodbrecord *odb, boolean flreadonly) {
//
+ // 2007-02-18 creedon: support for long odb item names and file paths
+ //
// 2006-06-23 creedon: for Mac, FSRef-ized
//
@@ -514,13 +561,20 @@
if ((*odb).flreadonly && !flreadonly) {
+ Handle h;
bigstring bs;
getfsfile ( &( *odb ).fs, bs );
- lang2paramerror (dbopenedreadonlyerror, bsfunctionname, bs );
+ if ( ! newtexthandle ( bs, &h ) )
+ return ( false );
+
+ lang2paramerror ( dbopenedreadonlyerror, handleFunctionName, h );
+ disposehandle ( h );
+
return (false);
+
}
return (true);
@@ -710,12 +764,14 @@
static boolean dbdefinedverb (hdltreenode hparam1, tyvaluerecord *vreturned) {
- /*
- 4.1b5 dmb: new verb
- */
+ //
+ // 2007-02-18 creedon: support for long odb item names and file paths
+ //
+ // 4.1b5 dmb: new verb
+ //
tyodbrecord odbrec;
- bigstring bsaddress;
+ Handle handleAddress;
boolean fl;
if (!getodbvalue (hparam1, 1, &odbrec, true))
@@ -723,28 +779,31 @@
flnextparamislast = true;
- if (!getstringvalue (hparam1, 2, bsaddress))
- return (false);
+ if ( ! getreadonlytextvalue ( hparam1, 2, &handleAddress ) )
+ return ( false );
- fl = odbdefined (odbrec.odb, bsaddress);
+ fl = odbdefined (odbrec.odb, handleAddress);
return (setbooleanvalue (fl, vreturned));
+
} /*dbdefinedverb*/
static boolean dbgetvalueverb (hdltreenode hparam1, tyvaluerecord *vreturned) {
- /*
- 4.1.1b1 dmb: fixed memory leak; push value on temp stack
+ //
+ // 2007-02-18 creedon: support for long odb item names and file paths
+ //
+ // 5.0.1 dmb: but only pushtmpstack if heapallocated
+ //
+ // 5.0b17 dmb: use pushtmpstackvalue to put external types returned from
+ // the other odb onto our temp stack
+ //
+ // 4.1.1b1 dmb: fixed memory leak; push value on temp stack
+ //
- 5.0b17 dmb: use pushtmpstackvalue to put external types returned from
- the other odb onto our temp stack
-
- 5.0.1 dmb: but only pushtmpstack if heapallocated
- */
-
tyodbrecord odbrec;
- bigstring bsaddress;
+ Handle handleAddress;
odbValueRecord value;
tyvaluetype type;
@@ -753,62 +812,58 @@
flnextparamislast = true;
- if (!getstringvalue (hparam1, 2, bsaddress))
- return (false);
+ if ( ! getreadonlytextvalue ( hparam1, 2, &handleAddress ) )
+ return ( false );
- if (odberror (odbgetvalue (odbrec.odb, bsaddress, &value)))
+ if (odberror (odbgetvalue (odbrec.odb, handleAddress, &value)))
return (false);
-
+
type = langexternalgetvaluetype (value.valuetype);
- if (type == (tyvaluetype) -1) {
-
+ if (type == (tyvaluetype) -1)
return (setbinaryvalue (value.data.binaryvalue, value.valuetype, vreturned));
- }
else {
-
+
initvalue (vreturned, type);
(*vreturned).data.binaryvalue = value.data.binaryvalue;
if (langheapallocated (vreturned, nil))
pushtmpstackvalue (vreturned); //5.0b17
-
+
return (true);
- /*
- initvalue (&val, type);
+ }
- val.data.binaryvalue = value.data.binaryvalue;
-
- return (copyvaluerecord (val, vreturned));
- */
- }
} /*dbgetvalueverb*/
static boolean dbsetvalueverb (hdltreenode hparam1, tyvaluerecord *vreturned) {
+
+ //
+ // 2007-02-18 creedon: support for long odb item names and file paths
+ //
+ Handle handleAddress;
+ boolean flerror;
+ odbValueRecord value;
tyodbrecord odbrec;
- bigstring bsaddress;
- odbValueRecord value;
tyvaluerecord val;
- boolean flerror;
if (!getodbvalue (hparam1, 1, &odbrec, false))
return (false);
-
- if (!getstringvalue (hparam1, 2, bsaddress))
- return (false);
-
+
+ if ( ! getreadonlytextvalue ( hparam1, 2, &handleAddress ) )
+ return ( false );
+
flnextparamislast = true;
if (!getparamvalue (hparam1, 3, &val))
return (false);
-
+
if (!copyvaluedata (&val))
return (false);
-
+
value.valuetype = (odbValueType) langexternalgettypeid (val);
/*
@@ -818,142 +873,182 @@
value.data.binaryvalue = val.data.binaryvalue; /*largest field covers everything*/
- flerror = odberror (odbsetvalue (odbrec.odb, bsaddress, &value));
+ flerror = odberror (odbsetvalue (odbrec.odb, handleAddress, &value));
disposevaluerecord (val, false);
if (flerror)
return (false);
-
+
return (setbooleanvalue (true, vreturned));
+
} /*dbsetvalueverb*/
static boolean dbdeleteverb (hdltreenode hparam1, tyvaluerecord *vreturned) {
+ //
+ // 2007-02-18 creedon: support for long odb item names and file paths
+ //
+
+ Handle handleAddress;
tyodbrecord odbrec;
- bigstring bsaddress;
if (!getodbvalue (hparam1, 1, &odbrec, false))
return (false);
flnextparamislast = true;
- if (!getstringvalue (hparam1, 2, bsaddress))
- return (false);
+ if ( ! getreadonlytextvalue ( hparam1, 2, &handleAddress ) )
+ return ( false );
- if (odberror (odbdelete (odbrec.odb, bsaddress)))
+ if (odberror (odbdelete (odbrec.odb, handleAddress)))
return (false);
+
+ return (setbooleanvalue (true, vreturned));
- return (setbooleanvalue (true, vreturned));
} /*dbdeleteverb*/
static boolean dbnewtableverb (hdltreenode hparam1, tyvaluerecord *vreturned) {
+ //
+ // 2007-02-18 creedon: support for long odb item names and file paths
+ //
+
+ Handle handleAddress;
tyodbrecord odbrec;
- bigstring bsaddress;
if (!getodbvalue (hparam1, 1, &odbrec, false))
return (false);
flnextparamislast = true;
- if (!getstringvalue (hparam1, 2, bsaddress))
+ if ( ! getreadonlytextvalue ( hparam1, 2, &handleAddress ) )
return (false);
-
- if (odberror (odbnewtable (odbrec.odb, bsaddress)))
+
+ if (odberror (odbnewtable (odbrec.odb, handleAddress)))
return (false);
-
+
return (setbooleanvalue (true, vreturned));
+
} /*dbnewtableverb*/
static boolean dbistableverb (hdltreenode hparam1, tyvaluerecord *vreturned) {
+ //
+ // 2007-02-18 creedon: support for long odb item names and file paths
+ //
+
+ Handle handleAddress;
+ OSType odbtype;
tyodbrecord odbrec;
- bigstring bsaddress;
- OSType odbtype;
if (!getodbvalue (hparam1, 1, &odbrec, true))
return (false);
flnextparamislast = true;
- if (!getstringvalue (hparam1, 2, bsaddress))
+ if ( ! getreadonlytextvalue ( hparam1, 2, &handleAddress ) )
return (false);
- if (odberror (odbgettype (odbrec.odb, bsaddress, &odbtype)))
+ if (odberror (odbgettype (odbrec.odb, handleAddress, &odbtype)))
return (false);
+
+ return (setbooleanvalue (odbtype == tableT, vreturned));
- return (setbooleanvalue (odbtype == tableT, vreturned));
} /*dbistableverb*/
static boolean dbcountitemsverb (hdltreenode hparam1, tyvaluerecord *vreturned) {
+ //
+ // 2007-02-18 creedon: support for long odb item names and file paths
+ //
+
+ Handle handleAddress;
+ long ctitems;
tyodbrecord odbrec;
- bigstring bsaddress;
- long ctitems;
if (!getodbvalue (hparam1, 1, &odbrec, true))
return (false);
-
+
flnextparamislast = true;
- if (!getstringvalue (hparam1, 2, bsaddress))
+ if ( ! getreadonlytextvalue ( hparam1, 2, &handleAddress ) )
return (false);
- if (odberror (odbcountitems (odbrec.odb, bsaddress, &ctitems)))
+ if (odberror (odbcountitems (odbrec.odb, handleAddress, &ctitems)))
return (false);
+
+ return (setlongvalue (ctitems, vreturned));
- return (setlongvalue (ctitems, vreturned));
} /*dbcountitemsverb*/
static boolean dbgetnthitemverb (hdltreenode hparam1, tyvaluerecord *vreturned) {
+ //
+ // 2007-02-18 creedon: support for long odb item names and file paths
+ //
+
+ Handle handleAddress, handleName;
+ boolean fl;
+ long n;
tyodbrecord odbrec;
- bigstring bsaddress;
- bigstring bsname;
- long n;
if (!getodbvalue (hparam1, 1, &odbrec, true))
return (false);
- if (!getstringvalue (hparam1, 2, bsaddress))
- return (false);
+ if ( ! getreadonlytextvalue ( hparam1, 2, &handleAddress ) )
+ return ( false );
flnextparamislast = true;
if (!getlongvalue (hparam1, 3, &n))
return (false);
+
+ if (odberror (odbgetnthitem (odbrec.odb, handleAddress, n, handleName))) {
- if (odberror (odbgetnthitem (odbrec.odb, bsaddress, n, bsname)))
+ disposehandle ( handleName );
+
return (false);
+
+ }
+
+ fl = newheapvalue ( *handleName, gethandlesize ( handleName ), stringvaluetype, vreturned );
+
+ disposehandle ( handleName );
- return (setstringvalue (bsname, vreturned));
+ return ( fl );
+
} /*dbgetnthitemverb*/
static boolean dbgetmoddateverb (hdltreenode hparam1, tyvaluerecord *vreturned) {
+ //
+ // 2007-02-18 creedon: support for long odb item names and file paths
+ //
+
+ Handle handleAddress;
tyodbrecord odbrec;
- bigstring bsaddress;
unsigned long moddate;
if (!getodbvalue (hparam1, 1, &odbrec, true))
return (false);
-
+
flnextparamislast = true;
- if (!getstringvalue (hparam1, 2, bsaddress))
+ if ( ! getreadonlytextvalue ( hparam1, 2, &handleAddress ) )
+ return ( false );
+
+ if (odberror (odbgetmoddate (odbrec.odb, handleAddress, &moddate)))
return (false);
+
+ return (setdatevalue (moddate, vreturned));
- if (odberror (odbgetmoddate (odbrec.odb, bsaddress, &moddate)))
- return (false);
-
- return (setdatevalue (moddate, vreturned));
} /*dbgetmoddateverb*/
@@ -1015,6 +1110,7 @@
default:
return (false);
}
+
} /*dbfunctionvalue*/
@@ -1027,5 +1123,6 @@
return (false);
return (true);
+
} /*dbinitverbs*/
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <cre...@us...> - 2007-02-19 01:18:29
|
Revision: 1612
http://svn.sourceforge.net/frontierkernel/?rev=1612&view=rev
Author: creecode
Date: 2007-02-18 17:18:30 -0800 (Sun, 18 Feb 2007)
Log Message:
-----------
support for long odb item names and file paths
formatting tweaks
Modified Paths:
--------------
Frontier/branches/Frontier_Long_File_Paths/Common/headers/db.h
Modified: Frontier/branches/Frontier_Long_File_Paths/Common/headers/db.h
===================================================================
--- Frontier/branches/Frontier_Long_File_Paths/Common/headers/db.h 2007-02-19 00:57:40 UTC (rev 1611)
+++ Frontier/branches/Frontier_Long_File_Paths/Common/headers/db.h 2007-02-19 01:18:30 UTC (rev 1612)
@@ -50,11 +50,9 @@
typedef struct tydatabaserecord { /*stored at offset 0 in the db file*/
-
unsigned char systemid; /* 0 = MAC (compatiblity) */
-
-
+
unsigned char versionnumber; /*which version created this file?*/
dbaddress availlist; /*avail list is singly-linked, nil terminated*/
@@ -81,29 +79,34 @@
to remain the same as version 3 files.
*/
-
+
long fnumdatabase; /* file handle while in memory - New to version 5*/
-
+
long headerLength; /*size of header - New to version 5*/
-
+
short longversionMajor; /*new extended version id - new to version 5*/
-
+
short longversionMinor; /*new extended version id - new to version 5*/
union {
+
char growthspace [50]; /*room for new fields without format change*/
struct {
+
dbaddress availlistblock; /*6.2a9 AR: on-disk structure mirroring availlist, a contiguous block*/
handlestream availlistshadow; /*never saved to disk; in-memory structure mirroring availlist*/
boolean flreadonly; /*6.2a9 AR: never saved to disk; if this is true, don't write to the file*/
+
} extensions;
+
} u;
+
} tydatabaserecord, *ptrdatabaserecord, **hdldatabaserecord;
-
-
+
+
extern hdldatabaserecord databasedata; /*can be set by external user*/
extern boolean fldatabasesaveas;
@@ -177,13 +180,13 @@
extern boolean dbendsaveas (void);
-extern boolean statsblockinuse (dbaddress, bigstring); /*dbstats.c*/
+#pragma mark === dbstats.c ===
-extern boolean dbstatsmessage (hdldatabaserecord, boolean); /*6.2a8 AR*/
+extern boolean statsblockinuse ( dbaddress, const Handle );
+extern boolean dbstatsmessage (hdldatabaserecord, boolean); // 6.2a8 AR
+
extern boolean statsstart (void);
#endif
-
-
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <cre...@us...> - 2007-02-19 00:57:43
|
Revision: 1611
http://svn.sourceforge.net/frontierkernel/?rev=1611&view=rev
Author: creecode
Date: 2007-02-18 16:57:40 -0800 (Sun, 18 Feb 2007)
Log Message:
-----------
formatting tweaks
Modified Paths:
--------------
Frontier/branches/Frontier_Long_File_Paths/Common/source/dbstats.c
Modified: Frontier/branches/Frontier_Long_File_Paths/Common/source/dbstats.c
===================================================================
--- Frontier/branches/Frontier_Long_File_Paths/Common/source/dbstats.c 2007-02-19 00:51:51 UTC (rev 1610)
+++ Frontier/branches/Frontier_Long_File_Paths/Common/source/dbstats.c 2007-02-19 00:57:40 UTC (rev 1611)
@@ -293,16 +293,17 @@
} /*statscountreleasestack*/
-boolean statsblockinuse (dbaddress adr, bigstring bsitem) {
-#pragma unused (bsitem)
+boolean statsblockinuse ( dbaddress adr, const Handle handleItem ) {
- /*
- called from the EFPs directly as we're doing our content-based
- database scan.
-
- 5.0a25 dmb: added bsitem parameter, keyboardescape check
- */
+ #pragma unused (handleItem)
+ //
+ // called from the EFPs directly as we're doing our content-based database
+ // scan.
+ //
+ // 5.0a25 dmb: added bsitem parameter, keyboardescape check
+ //
+
register hdlstatsrecord hs = statsdata;
boolean flfree;
long ctbytes;
@@ -310,10 +311,10 @@
if (adr == nildbaddress) /*ok to pass nil*/
return (true);
-
+
if (keyboardescape ())
return (false);
-
+
/*
if (bsitem != nil) {
@@ -324,24 +325,27 @@
*/
if (!dbreadheader (adr, &flfree, &ctbytes, &variance)) {
-
+
setstatsmessage (idreadusedheaderfailed);
return (false);
+
}
+
+ if (flfree) {
- if (flfree) {
-
setstatsmessage (idfreeblockinuse);
return (false);
+
}
-
+
(**hs).logctinuse++;
(**hs).logsizeinuse += ctbytes;
return (true);
+
} /*statsblockinuse*/
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <cre...@us...> - 2007-02-19 00:51:50
|
Revision: 1610
http://svn.sourceforge.net/frontierkernel/?rev=1610&view=rev
Author: creecode
Date: 2007-02-18 16:51:51 -0800 (Sun, 18 Feb 2007)
Log Message:
-----------
minor formatting tweaks, no functional change
Modified Paths:
--------------
Frontier/branches/Frontier_Long_File_Paths/Common/source/db.c
Modified: Frontier/branches/Frontier_Long_File_Paths/Common/source/db.c
===================================================================
--- Frontier/branches/Frontier_Long_File_Paths/Common/source/db.c 2007-02-19 00:49:13 UTC (rev 1609)
+++ Frontier/branches/Frontier_Long_File_Paths/Common/source/db.c 2007-02-19 00:51:51 UTC (rev 1610)
@@ -222,6 +222,7 @@
static boolean dbrelease (dbaddress); /*6.2b2: Dropped from db.h and declared static*/
static boolean dballocate (long databytes, ptrvoid pdata, dbaddress *paddress); /*6.2b14 AR: forward declaration for dbwriteshadowavaillist*/
+
boolean dbpushdatabase (hdldatabaserecord hdatabase) {
/*
@@ -234,6 +235,7 @@
DebugStr (STR_database_stack_overflow);
return (false);
+
}
databasestack [topdatabasestack++] = databasedata;
@@ -242,6 +244,7 @@
databasedata = hdatabase;
return (true);
+
} /*dbpushdatabase*/
@@ -286,8 +289,8 @@
return (filewrite ((hdlfilenum)((**databasedata).fnumdatabase), ctbytes, pdata));
} /*dbwrite*/
-
+
static boolean dbread (dbaddress adr, long ctbytes, ptrvoid pdata) {
if (!dbseek (adr))
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <cre...@us...> - 2007-02-19 00:49:13
|
Revision: 1609
http://svn.sourceforge.net/frontierkernel/?rev=1609&view=rev
Author: creecode
Date: 2007-02-18 16:49:13 -0800 (Sun, 18 Feb 2007)
Log Message:
-----------
added size13 = 13 and regular = 0 to cnfg
Modified Paths:
--------------
Frontier/branches/Frontier_Long_File_Paths/Common/headers/config.r
Modified: Frontier/branches/Frontier_Long_File_Paths/Common/headers/config.r
===================================================================
--- Frontier/branches/Frontier_Long_File_Paths/Common/headers/config.r 2007-02-19 00:44:32 UTC (rev 1608)
+++ Frontier/branches/Frontier_Long_File_Paths/Common/headers/config.r 2007-02-19 00:49:13 UTC (rev 1609)
@@ -71,11 +71,13 @@
integer; /*version on disk indexes into a STR# list*/
- integer size9 = 9, size12 = 12;
+ integer size9 = 9, size12 = 12, size13 = 13;
- integer plain = 0;
+ integer plain = 0, regular = 0;
integer; /*if 0, no buttons for this window type*/
Rect; /*new windows come up in this spot*/
+
};
+
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <cre...@us...> - 2007-02-19 00:44:32
|
Revision: 1608
http://svn.sourceforge.net/frontierkernel/?rev=1608&view=rev
Author: creecode
Date: 2007-02-18 16:44:32 -0800 (Sun, 18 Feb 2007)
Log Message:
-----------
in function cmdiconhit, removed unused oldthreads ifndef code
Modified Paths:
--------------
Frontier/branches/Frontier_Long_File_Paths/Common/source/command.c
Modified: Frontier/branches/Frontier_Long_File_Paths/Common/source/command.c
===================================================================
--- Frontier/branches/Frontier_Long_File_Paths/Common/source/command.c 2007-02-19 00:27:12 UTC (rev 1607)
+++ Frontier/branches/Frontier_Long_File_Paths/Common/source/command.c 2007-02-19 00:44:32 UTC (rev 1608)
@@ -43,18 +43,16 @@
#include "command.h"
-
#define cmdtextitem 1
-
static hdlprocessrecord quickscriptprocess = nil;
-
static boolean cmdsavestring (short stringnumber, Handle htext) {
-#pragma unused(stringnumber)
+ #pragma unused(stringnumber)
+
/*
the cmd dialog only has one string, so we ignore the stringnumber param.
@@ -77,22 +75,28 @@
if (!equalhandles (htext, (**hc).hscriptstring)) {
if ((**hc).hscriptstring == nil) { /* 2004-12-03 creedon, aradke */
+
copyhandle (htext, &h);
+
(**hc).hscriptstring = h;
+
}
else
copyhandlecontents (htext, (**hc).hscriptstring);
(**hc).fldirty = true;
+
}
return (true);
+
} /*cmdsavestring*/
static boolean cmdloadstring (short stringnumber, Handle *h) {
-#pragma unused(stringnumber)
+ #pragma unused(stringnumber)
+
/*
1/21/93 dmb: don't set superglobals manually anymore
@@ -102,6 +106,7 @@
assert (cancoonglobals != nil);
return (copyhandle ((**cancoonglobals).hscriptstring, h));
+
} /*cmdloadstring*/
@@ -151,8 +156,9 @@
static boolean cmdtexthit (Point pt) {
-#pragma unused (pt)
+ #pragma unused (pt)
+
/*
2.1b6 dmb: use debugging context for zooming, if available
*/
@@ -174,18 +180,21 @@
pophashtable ();
scriptunlockdebuggingcontext ();
+
}
}
return (true);
+
} /*cmdtexthit*/
static boolean cmdprocesscallback (void) {
-
+
miniinvalicon (idcommandconfig);
return (true);
+
} /*cmdprocesscallback*/
@@ -252,34 +261,42 @@
static boolean cmdiconhit (void) {
+
+ //
+ // 2007-02-17 creedon: removed unused oldthreads ifndef code
+ //
+ // 5.0b17 dmb: minigetstring result is ours to consume
+ //
+ // 5.0d14 dmb: minidialog now uses full text handles, not bigstrings
+ //
+ // 2.1b2 dmb: pass -1 for errorrefcon instead of zero to prevent top level
+ // lexical scope from being transparent (i.e. visible to
+ // subroutines)
+ //
+ // 2.1a6 dmb: reworked threading for thread mgr 1.1
+ //
+ // 1991-12-12 dmb: extract the text handle from the dialog record's TE
+ // record to overcome the miniwindow's string-oriented
+ // architecture. Unfortunately, the text also saved in the
+ // database as a string, to this is just a band-aid, not a
+ // real fix.
+ //
+ // 1991-10-27 dmb: don't dispose result value if processruncode returns
+ // false
+ //
+ // 1991-10-25 dmb: check new process's disposewhenidleflag before running
+ // it.
+ //
+ // 1991-08-20 dmb: when the process completes, we're in another thread and
+ // can't assume that the window is around anymore, let
+ // alone that its globals are set. to handle this
+ // (crashing) situation, use new minisetwindowmessage to
+ // display the result.
+ //
+ // 1991-05021 dmb: run the string as a process so we can handle errors
+ // nicely.
+ //
- /*
- 5/21/91 dmb: run the string as a process so we can handle errors nicely.
-
- 8/20/91 dmb: when the process completes, we're in another thread and can't
- assume that the window is around anymore, let alone that its globals are
- set. to handle this (crashing) situation, use new minisetwindowmessage
- to display the result.
-
- 10/25/91 dmb: check new process's disposewhenidleflag before running it.
-
- 10/27/91 dmb: don't dispose result value if processruncode returns false
-
- 12/12/91 dmb: extract the text handle from the dialog record's TE record to
- overcome the miniwindow's string-oriented architecture. Unfortunately, the
- text also saved in the database as a string, to this is just a band-aid, not
- a real fix.
-
- 2.1a6 dmb: reworked threading for thread mgr 1.1
-
- 2.1b2 dmb: pass -1 for errorrefcon instead of zero to prevent top level
- lexical scope from being transparent (i.e. visible to subroutines)
-
- 5.0d14 dmb: minidialog now uses full text handles, not bigstrings
-
- 5.0b17 dmb: minigetstring result is ours to consume
- */
-
Handle hscript;
hdltreenode hcode;
boolean fl;
@@ -292,11 +309,12 @@
sysbeep ();
return (false);
+
}
-
+
if ( ! langpusherrorcallback ( &cmderrorroutine, ( long ) -1 ) )
return (false);
-
+
minigetstring (0, &hscript);
fl = langbuildtree (hscript, false, &hcode); /*consumes htext*/
@@ -305,7 +323,7 @@
if (!fl) /*syntax error*/
return (false);
-
+
langerrorclear (); /*compilation produced no error, be sure error window is empty*/
if ( ! newprocess ( hcode, true, &cmderrorroutine, ( long ) -1, &hprocess ) ) {
@@ -313,62 +331,32 @@
langdisposetree (hcode);
return (false);
+
}
-
+
hp = hprocess; /*copy into register*/
(**hp).processstartedroutine = &cmdprocesscallback;
(**hp).processkilledroutine = &cmdprocesscallback;
- #ifndef oldthreads
-
if (!newprocessthread (&cmdthreadmain, (tythreadmainparams) hp, &hthread)) {
disposeprocess (hp);
return (false);
+
}
-
+
quickscriptprocess = hp; /*can only run one of these at a time*/
return (true);
- #else
-
- quickscriptprocess = hp; /*can only run one of these at a time*/
-
- if (!innewprocessthread (&hthread)) /*not in new thread -- we're done with synchonous stuff*/
- return (true);
-
- if ((hthread == nil) || (**hp).fldisposewhenidle)
- fl = false;
- else
- fl = processruncode (hp, &val);
-
- disposeprocess (hp);
-
- if (!fl)
- setbooleanvalue (false, &val);
-
- hashgetvaluestring (val, bsresult);
-
- disposetmpvalue (val);
-
- minisetwindowmessage (idcommandconfig, bsresult); /*can't assume miniwindow is around anymore*/
-
- quickscriptprocess = nil; /*clear "semaphore"*/
-
- endprocessthread (hthread);
-
- return (false); /*if we got here, hthread was nil*/
-
- #endif
} /*cmdiconhit*/
static boolean cmdgettargetdata (short id) {
-
+
/*
we don't want our script to operate on our window
@@ -382,11 +370,12 @@
return (false);
return (id == -1) || (id == idwordprocessor);
+
} /*cmdgettargetdata*/
static void cmdcheckrunbutton (void) {
-
+
/*
boolean fl = debuggingcurrentprocess () || !processisoneshot (false);
*/
@@ -394,11 +383,12 @@
boolean fl = (quickscriptprocess == nil) /*&& !processbusy ()*/ ;
(**minidata).fliconenabled = fl;
+
} /*cmdcheckrunbutton*/
static boolean cmdsetfields (void) {
-
+
register hdlminirecord hm = minidata;
bigstring bs;
@@ -436,14 +426,14 @@
boolean startcmddialog (void) {
-
+
return (startminidialog (idcommandconfig, &cmdsetfields));
} /*startcmddialog*/
boolean cmdstart (void) {
-
+
return (ministart (idcommandconfig));
} /*cmdstart*/
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <cre...@us...> - 2007-02-19 00:27:17
|
Revision: 1607
http://svn.sourceforge.net/frontierkernel/?rev=1607&view=rev
Author: creecode
Date: 2007-02-18 16:27:12 -0800 (Sun, 18 Feb 2007)
Log Message:
-----------
trying a way to provide more detail when converting a database, still pretty crude
Modified Paths:
--------------
Frontier/branches/Frontier_Long_File_Paths/Common/source/cancoon.c
Modified: Frontier/branches/Frontier_Long_File_Paths/Common/source/cancoon.c
===================================================================
--- Frontier/branches/Frontier_Long_File_Paths/Common/source/cancoon.c 2007-01-17 19:44:42 UTC (rev 1606)
+++ Frontier/branches/Frontier_Long_File_Paths/Common/source/cancoon.c 2007-02-19 00:27:12 UTC (rev 1607)
@@ -29,7 +29,10 @@
#include "standard.h"
#ifdef MACVERSION
+
#include <land.h>
+ #include "MoreFilesX.h"
+
#endif
#include "memory.h"
@@ -399,6 +402,7 @@
disposehandle ((Handle) hc);
return (true);
+
} /*disposecancoonrecord*/
@@ -572,11 +576,70 @@
} /*clearcancoonglobals*/
+#ifdef MACVERSION
+
+ static boolean flConvert;
+
+ // Dialog event handler
+ static pascal OSStatus ConvertDialogWindowEventHandler (EventHandlerCallRef myHandler, EventRef event, void *userData)
+ {
+ EventRecord er;
+ OSStatus result = eventNotHandledErr;
+ HICommand command;
+ bool stopModalLoop = FALSE;
+
+ // Get the HI Command
+ GetEventParameter (event, kEventParamDirectObject, typeHICommand, NULL,
+ sizeof (HICommand), NULL, &command);
+ // Look for our 'YES ' and 'NO ' commands
+ switch (command.commandID)
+ {
+ case 'CNVT':
+ flConvert = true;
+ stopModalLoop = TRUE;
+ result = noErr;
+ break;
+ case 'CNCL':
+ stopModalLoop = TRUE;
+ result = noErr;
+ break;
+ }
+
+ ConvertEventRefToEventRecord ( event, &er );
+
+ if( IsWindowPathSelectClick( userData, &er ) )
+ {
+ SInt32 itemSelected;
+
+ if (WindowPathSelect( userData, NULL, &itemSelected ) == noErr )
+ {
+ // Prior to Carbon, it was necessary to switch to the Finder
+ // after calling WindowPathSelect; in Carbon, WindowPathSelect
+ // does it for you automatically.
+ }
+ }
+
+ // Stop the modal loop.
+ if (stopModalLoop)
+ {
+ QuitAppModalLoopForWindow((WindowRef)userData);
+ }
+
+ //Return how we handled the event.
+ return result;
+ }
+
+#endif // MACVERSION
+
+
static boolean loadversion2cancoonfile ( dbaddress adr, hdlcancoonrecord hcancoon, boolean flhavehost ) {
//
- // 2007-01-16 creedon: support for long odb item names and file paths
+ // 2007-02-18 creedon: support for long odb item names and file paths
//
+ // more detail about a database when it needs to be
+ // converted
+ //
// 5.0a2 dmb: install the menubar if the database hasn't been upgraded
//
// 5.0d18 dmb: have to ccwindowsetup _after_ loading system table now
@@ -628,6 +691,7 @@
diskgetfontnum (windowinfo.fontname, &windowinfo.fontnum);
(**hc).windowinfo [i] = windowinfo;
+
} /*for*/
frontier4root = info.versionnumber < 3;
@@ -651,16 +715,125 @@
dbrefhandle (info.adrscriptstring, (Handle *) &hstring);
if ( frontier5root ) {
+
+ /* bigstring bsprompt;
- bigstring bsprompt;
-
shellgetstring ( openolddatabasestring, bsprompt );
if ( twowaydialog ( bsprompt, BIGSTRING ( "\x06" "Cancel" ), BIGSTRING ( "\x07" "Convert" ) ) )
- return ( false );
+ return ( false ); */
+
+ #ifdef MACVERSION
+ CFIndex length;
+ CFStringRef convertDatabaseString, csr;
+ ControlID id = { 'xyzt', 1 }; // set with Interface Builder in the Inspector
+ EventTypeSpec dialogSpec = {kEventClassCommand, kEventCommandProcess };
+ EventHandlerUPP dialogUPP;
+ FSSpec fsspec;
+ Handle h, handleApplicationName, handleFileName;
+ HIViewRef textView;
+ IBNibRef nibRef;
+ OSErr err;
+ OSStatus status;
+ unsigned char cstring [ 255 ];
+ WindowRef window;
+ tyfilespec fs;
+
+ flConvert = false;
+
+ clearbytes ( &fs, sizeof ( fs ) );
+
+ if ( ! newtexthandle ( BIGSTRING ( "\x08" "Frontier" ), &handleApplicationName ) ) // i'd like to grab the short name of the application at runtime
+ return ( false );
+
+ // Create a Nib reference passing the name of the nib file (without the .nib extension)
+ // CreateNibReference only searches into the application bundle.
+ status = CreateNibReference(CFSTR("main"), &nibRef);
+ require_noerr(status, CantGetNibRef);
+
+ // Then create a window. "twowaycautiondialog" is the name of the window object. This name is set in
+ // InterfaceBuilder when the nib is created.
+ status = CreateWindowFromNib(nibRef, CFSTR("twowaycautiondialog"), &window);
+ require_noerr(status, CantCreateWindow);
+
+ // We don't need the nib reference anymore.
+ DisposeNibReference(nibRef);
+
+ HIViewFindByID(HIViewGetRoot(window), id, &textView);
+
+ convertDatabaseString = CFCopyLocalizedString ( CFSTR ("convertDatabase"), "Localized convert string." );
+
+ length = CFStringGetLength ( convertDatabaseString );
+
+ if ( ! newhandle ( length, &h ) )
+ return ( false );
+
+ CFStringGetBytes ( convertDatabaseString, CFRangeMake ( 0,
+ length ), kCFStringEncodingMacRoman, '^', false, ( UInt8 * ) *h, length, NULL );
+
+ CFRelease ( convertDatabaseString );
+
+ err = FileRefNumGetFSRef ( ( **( **hc ).hdatabase ).fnumdatabase, &fs.fsref );
+
+ FSRefGetName ( &fs.fsref, &csr );
+
+ CFStringRefToCString ( csr, cstring );
+
+ CFRelease ( csr );
+
+ if ( ! newfilledhandle ( &cstring, strlen ( cstring ), &handleFileName ) )
+ return ( false );
+
+ parsedialoghandle ( h, handleFileName, handleApplicationName, NULL, NULL );
+
+ disposehandle ( handleApplicationName );
+
+ status = TXNSetData(HITextViewGetTXNObject(textView), kTXNTextData, *h, gethandlesize ( h ), kTXNStartOffset, kTXNStartOffset);
+
+ disposehandle ( h );
+
+ windowsettitle ( window, handleFileName );
+
+ disposehandle ( handleFileName );
+
+ status = SetWindowProxyCreatorAndType ( window, 'LAND', 'TABL', kOnSystemDisk );
+
+ err = FSRefMakeFSSpec ( &fs.fsref, &fsspec );
+
+ status = SetWindowProxyFSSpec( window, &fsspec );
+
+ // Install our event handler
+ dialogUPP = NewEventHandlerUPP (ConvertDialogWindowEventHandler);
+ status = InstallWindowEventHandler (window, dialogUPP, 1, &dialogSpec, (void *) window, NULL);
+ require_noerr( status, CantInstallDialogHandler );
+
+ // The window was created hidden so show it.
+ ShowWindow(window);
+
+ // Run modally
+ RunAppModalLoopForWindow(window);
+
+ HideWindow(window);
+ DisposeWindow(window);
+ DisposeEventHandlerUPP(dialogUPP);
+
+ if ( flConvert )
+ goto success;
+
+ CantCreateWindow:
+ CantGetNibRef:
+ CantInstallDialogHandler:
+
+ return ( false );
+
+ success:
+ ;
+
+ #endif // MACVERSION
+
}
-
+
(**hc).hscriptstring = (Handle) hstring;
(**hc).flflagdisabled = (info.flags & flflagdisabled_mask) != 0;
@@ -673,28 +846,29 @@
if (!ccloadsystemtable (hc, info.adrroottable, !flhavehost))
return (false);
-
+
flguest = systemtable == nil;
#ifdef fltrialsize
if (flguest) {
-
+
(**cancoonwindowinfo).hdata = nil; /*unlink data from window to avoid crash*/
shelltrialerror (noguestdatabasesstring);
return (false);
+
}
-
+
#endif
if (!flguest) {
-
+
linksystemtablestructure (roottable);
if (frontier4root) {
-
+
if (resourcestable != nil) {
Handle h;
@@ -776,6 +950,7 @@
}
return (false);
+
} /*cctrialviolation*/
#endif
@@ -785,7 +960,7 @@
#pragma unused(rnum)
//
- // 2007-01-16 creedon: support for long odb item names and file paths
+ // 2007-02-18 creedon: support for long odb item names and file paths
//
// 6.1fc2 AR: Don't link cancoondata into (**cancoonwindowinfo).hdata.
// This would crash some installations during the initialization
@@ -796,12 +971,13 @@
//
register hdlcancoonrecord hc = nil;
+
dbaddress adr;
+ hdlcancoonrecord origglobals = cancoonglobals;
short versionnumber;
- hdlcancoonrecord origglobals = cancoonglobals;
- boolean flhavehost = origglobals != nil;
- boolean flhide;
+ boolean flhavehost = origglobals != nil, flhide;
+
cancoondata = nil; /*default error return*/
if (!dbopenfile (fnum, false))
@@ -815,20 +991,21 @@
shellexitmaineventloop ();
goto error;
+
}
-
+
#endif
dbgetview (cancoonview, &adr);
if (!dbreference (adr, sizeof (versionnumber), &versionnumber))
goto error;
-
+
disktomemshort (versionnumber);
if (!newcancoonrecord (&cancoondata))
goto error;
-
+
hc = cancoondata; /*copy into register*/
//(**cancoonwindowinfo).hdata = (Handle) hc; /*link data to window*/
@@ -836,7 +1013,7 @@
(**hc).hdatabase = databasedata; /*result from dbopenfile*/
switch (versionnumber) {
-
+
/*
case 1:
if (!loadversion1cancoonfile (adr, hc))
@@ -860,6 +1037,7 @@
flhide = !ccinexpertmode () || (**hc).windowinfo [ixcancooninfo].flhidden;
(**cancoonwindowinfo).flhidden = flhide;
+
}
// ccnewfilewindow (idscriptprocessor);
@@ -867,9 +1045,11 @@
return (true);
default:
+
alertstring (baddatabaseversionstring);
goto error;
+
} /*switch*/
error:
@@ -883,6 +1063,7 @@
setcancoonglobals (origglobals); /*restore databasedata, etc.*/
return (false);
+
} /*ccloadfile*/
@@ -1789,6 +1970,7 @@
return (settablestructureglobals (rootvariable, false));
return (true);
+
} /*ccchecktablestructureglobals*/
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <cre...@us...> - 2007-01-17 19:44:47
|
Revision: 1606
http://svn.sourceforge.net/frontierkernel/?rev=1606&view=rev
Author: creecode
Date: 2007-01-17 11:44:42 -0800 (Wed, 17 Jan 2007)
Log Message:
-----------
support for long odb item names and file paths
formatting tweaks
Modified Paths:
--------------
Frontier/branches/Frontier_Long_File_Paths/Common/headers/claybrowser.h
Frontier/branches/Frontier_Long_File_Paths/Common/headers/claybrowserexpand.h
Frontier/branches/Frontier_Long_File_Paths/Common/headers/claybrowserstruc.h
Frontier/branches/Frontier_Long_File_Paths/Common/headers/claycallbacks.h
Frontier/branches/Frontier_Long_File_Paths/Common/source/cancoonverbs.c
Frontier/branches/Frontier_Long_File_Paths/Common/source/claybrowserexpand.c
Frontier/branches/Frontier_Long_File_Paths/Common/source/claybrowserstruc.c
Frontier/branches/Frontier_Long_File_Paths/Common/source/claycallbacks.c
Frontier/branches/Frontier_Long_File_Paths/Common/source/claylinelayout.c
Frontier/branches/Frontier_Long_File_Paths/Common/source/command.c
Modified: Frontier/branches/Frontier_Long_File_Paths/Common/headers/claybrowser.h
===================================================================
--- Frontier/branches/Frontier_Long_File_Paths/Common/headers/claybrowser.h 2007-01-17 18:10:34 UTC (rev 1605)
+++ Frontier/branches/Frontier_Long_File_Paths/Common/headers/claybrowser.h 2007-01-17 19:44:42 UTC (rev 1606)
@@ -54,12 +54,13 @@
typedef hdlhashtable tybrowserdir;
typedef struct tybrowserspec {
-
+
tybrowservol vRefNum;
tybrowserdir parID;
- bigstring name;
+ Handle name;
+
} tybrowserspec, *ptrbrowserspec;
#endif
@@ -118,47 +119,48 @@
tyfolderview folderview; /*for folders, view-by-name, date, etc.*/
#endif
+
} tybrowserinfo;
-typedef boolean (*tyclayfileloopcallback) (bigstring, tybrowserinfo *, long);
+typedef boolean ( *tyclayfileloopcallback ) ( const Handle, tybrowserinfo *, long );
-boolean browserinitrecord (hdltableformats);
+boolean browserinitrecord ( hdltableformats );
boolean clayinitializeoutline (void);
-boolean claymakespec (tybrowservol vnum, tybrowserdir dirid, bigstring fname, tybrowserspec *fs);
+boolean claymakespec ( tybrowservol, tybrowserdir, const Handle, tybrowserspec * );
-boolean claygetfilespec (hdlheadrecord, tybrowserspec *);
+boolean claygetfilespec ( hdlheadrecord, tybrowserspec * );
-boolean claygetfileinfo (const tybrowserspec *fs, tybrowserinfo *);
+boolean claygetfileinfo ( const tybrowserspec *, tybrowserinfo * );
-boolean clayfolderloop (const tybrowserspec *, boolean, tyclayfileloopcallback, long);
+boolean clayfolderloop (const tybrowserspec *, boolean, tyclayfileloopcallback, long );
-boolean clayrenamefile (tybrowserspec *fs, hdlheadrecord headnode); /*6.2b16 AR: headnode instead of bsnew*/
+boolean clayrenamefile ( tybrowserspec *, hdlheadrecord ); // 6.2b16 AR: headnode instead of bsnew
-boolean claygetfilename (const tybrowserspec *pfs, bigstring name);
+boolean claygetfilename ( const tybrowserspec *, Handle * );
-boolean browserexpand (hdlheadrecord, long);
+boolean browserexpand ( hdlheadrecord, long );
boolean browserselectfile (ptrfilespec, boolean, hdlheadrecord *);
-boolean browserexpandtofile (ptrfilespec);
+boolean browserexpandtofile ( ptrfilespec );
-boolean browserfollowalias (hdlheadrecord);
+boolean browserfollowalias ( hdlheadrecord );
-boolean browsernodeexists (hdlheadrecord, const tybrowserspec *);
+boolean browsernodeexists ( hdlheadrecord, const tybrowserspec * );
-boolean browsernewfolder (void);
+boolean browsernewfolder ( void );
-boolean browsernewtextfile (void);
+boolean browsernewtextfile ( void );
-boolean browsernewscript (void);
+boolean browsernewscript ( void );
-boolean browsernewoutline (void);
+boolean browsernewoutline ( void );
-boolean browsernewcopy (tybrowserspec *, bigstring);
+boolean browsernewcopy ( tybrowserspec *, bigstring );
boolean browsergetrefcon (hdlheadrecord, tybrowserinfo *);
@@ -174,7 +176,7 @@
// void browserupdatemsg (const tybrowserspec *, tyfileinfo *);
-boolean browserfileadded (hdlheadrecord, const tybrowserspec *, hdlheadrecord *);
+boolean browserfileadded ( hdlheadrecord, const tybrowserspec *, hdlheadrecord * );
boolean browserloadnode (hdlheadrecord);
@@ -182,15 +184,15 @@
void browserdrawnodeicon (const Rect *, boolean, hdlheadrecord);
-boolean browsersymbolchanged (hdlhashtable, const bigstring, boolean);
+boolean browsersymbolchanged ( hdlhashtable, const bigstring, boolean );
-boolean browsersymbolinserted (hdlhashtable, const bigstring);
+boolean browsersymbolinserted ( hdlhashtable, const bigstring );
-boolean browsersymboldeleted (hdlhashtable, const bigstring);
+boolean browsersymboldeleted ( hdlhashtable, const bigstring );
-void browserupdate (void);
+void browserupdate ( void );
-boolean browserstart (void);
+boolean browserstart ( void );
#endif
Modified: Frontier/branches/Frontier_Long_File_Paths/Common/headers/claybrowserexpand.h
===================================================================
--- Frontier/branches/Frontier_Long_File_Paths/Common/headers/claybrowserexpand.h 2007-01-17 18:10:34 UTC (rev 1605)
+++ Frontier/branches/Frontier_Long_File_Paths/Common/headers/claybrowserexpand.h 2007-01-17 19:44:42 UTC (rev 1606)
@@ -40,11 +40,10 @@
} tyexpandinfo;
+void browserfindinsertionpoint ( hdlheadrecord, const Handle, tybrowserinfo *, hdlheadrecord *, tydirection * );
-void browserfindinsertionpoint (hdlheadrecord, bigstring, tybrowserinfo *, hdlheadrecord *, tydirection *);
+boolean browserexpandvisit ( const Handle, tybrowserinfo *, long );
-boolean browserexpandvisit (bigstring, tybrowserinfo *, long);
-
boolean browserpreexpand (hdlheadrecord, short, boolean);
boolean browsercanexpand (hdlheadrecord);
Modified: Frontier/branches/Frontier_Long_File_Paths/Common/headers/claybrowserstruc.h
===================================================================
--- Frontier/branches/Frontier_Long_File_Paths/Common/headers/claybrowserstruc.h 2007-01-17 18:10:34 UTC (rev 1605)
+++ Frontier/branches/Frontier_Long_File_Paths/Common/headers/claybrowserstruc.h 2007-01-17 19:44:42 UTC (rev 1606)
@@ -67,4 +67,5 @@
extern boolean browserdeletedummyvalues (hdlheadrecord);
-#endif
\ No newline at end of file
+#endif
+
Modified: Frontier/branches/Frontier_Long_File_Paths/Common/headers/claycallbacks.h
===================================================================
--- Frontier/branches/Frontier_Long_File_Paths/Common/headers/claycallbacks.h 2007-01-17 18:10:34 UTC (rev 1605)
+++ Frontier/branches/Frontier_Long_File_Paths/Common/headers/claycallbacks.h 2007-01-17 19:44:42 UTC (rev 1606)
@@ -37,28 +37,29 @@
#ifdef odbbrowser
-#define clayfileexists(fs,isfolder) hashtablesymbolexists ((hdlhashtable) (*fs).parID, (*fs).name)
+ boolean claycopyfile (const tybrowserspec *, const tybrowserspec *);
-boolean claycopyfile (const tybrowserspec *, const tybrowserspec *);
+ boolean claydeletefile (const tybrowserspec *);
-boolean claydeletefile (const tybrowserspec *);
+ boolean claymovefile (const tybrowserspec *, const tybrowserspec *);
-boolean claymovefile (const tybrowserspec *, const tybrowserspec *);
+ boolean claylookupvalue (const tybrowserspec *, tyvaluerecord *, hdlhashnode *);
-boolean claylookupvalue (const tybrowserspec *, tyvaluerecord *, hdlhashnode *);
+ boolean claycreatefile (const tybrowserspec *);
-boolean claycreatefile (const tybrowserspec *);
-
+ boolean clayfileexists ( tybrowserspec *, boolean * );
+
#endif
-boolean claygetspecialfolder (void *, boolean, tybrowserspec *);
+boolean claygetspecialfolder ( const Handle, boolean, tybrowserspec * );
-boolean clayemptyfilefolder (tybrowserspec *);
+boolean clayemptyfilefolder ( tybrowserspec * );
boolean claygetdirid (const tybrowserspec * , tybrowserdir *);
boolean claygetinmemorydirid (const tybrowserspec *, tybrowserdir *);
-boolean claygetsubitemspec (tybrowserspec *, bigstring fname, tybrowserspec *);
+boolean claygetsubitemspec ( tybrowserspec *, const Handle, tybrowserspec * );
-boolean browsertextchanged (hdlheadrecord, bigstring);
+boolean browsertextchanged ( hdlheadrecord, const Handle );
+
Modified: Frontier/branches/Frontier_Long_File_Paths/Common/source/cancoonverbs.c
===================================================================
--- Frontier/branches/Frontier_Long_File_Paths/Common/source/cancoonverbs.c 2007-01-17 18:10:34 UTC (rev 1605)
+++ Frontier/branches/Frontier_Long_File_Paths/Common/source/cancoonverbs.c 2007-01-17 19:44:42 UTC (rev 1606)
@@ -129,27 +129,43 @@
} /*ccshowbuttonsverb*/
-static boolean ccmsgverb (hdltreenode hparam1, tyvaluerecord *vreturned) {
+static boolean ccmsgverb ( hdltreenode hparam1, tyvaluerecord *vreturned ) {
+
+ //
+ // 2007-01-17 creedon: support for long odb item names and file paths
+ //
+
+ Handle h;
+ bigstring bs;
+ long length;
- bigstring bsmsg;
-
flnextparamislast = true;
- if (!getstringvalue (hparam1, 1, bsmsg))
- return (false);
+ if ( ! getexempttextvalue ( hparam1, 1, &h ) )
+ return ( false );
+
+ length = gethandlesize ( h );
- if (shellwindow != nil)
- shellpushrootglobals (shellwindow);
+ if ( length > 255 ) // trim from the middle
+ pullfromhandle ( h, 128, length - 255, NULL );
+
+ texthandletostring ( h, bs );
+
+ disposehandle ( h );
+
+ if ( shellwindow != nil )
+
+ shellpushrootglobals ( shellwindow );
else
- shellpushfrontrootglobals ();
+ shellpushfrontrootglobals ( );
+
+ ccmsg ( bs, ! processisoneshot ( true ) );
- ccmsg (bsmsg, !processisoneshot (true));
+ shellpopglobals ( );
- shellpopglobals ();
+ return ( setbooleanvalue ( true, vreturned ) );
- return (setbooleanvalue (true, vreturned));
-
- } /*ccmsgverb*/
+ } // ccmsgverb
static boolean ccfunctionvalue (short token, hdltreenode hparam1, tyvaluerecord *vreturned, bigstring bserror) {
@@ -249,6 +265,7 @@
getstringlist (cancoonerrorlist, errornum, bserror);
return (false);
+
} /*ccfunctionvalue*/
@@ -257,8 +274,6 @@
langcallbacks.msgverbcallback = &ccmsgverb;
return (loadfunctionprocessor (idcancoonverbs, &ccfunctionvalue));
+
} /*ccinitverbs*/
-
-
-
Modified: Frontier/branches/Frontier_Long_File_Paths/Common/source/claybrowserexpand.c
===================================================================
--- Frontier/branches/Frontier_Long_File_Paths/Common/source/claybrowserexpand.c 2007-01-17 18:10:34 UTC (rev 1605)
+++ Frontier/branches/Frontier_Long_File_Paths/Common/source/claybrowserexpand.c 2007-01-17 19:44:42 UTC (rev 1606)
@@ -86,35 +86,45 @@
} /*browsercalcinsertionpoint*/
-void browserfindinsertionpoint (hdlheadrecord hparent, bigstring bsnewhead, tybrowserinfo *newfileinfo, hdlheadrecord *hpre, tydirection *dir) {
+void browserfindinsertionpoint (hdlheadrecord hparent, const Handle handleNewHead, tybrowserinfo *newfileinfo, hdlheadrecord *hpre, tydirection *dir) {
+
+ //
+ // using whatever sorting options we have, determine the insertion point
+ // for the new line. we return the info that opaddheadline needs, a handle
+ // to the "pre" node and the direction relative to that node to create the
+ // new headline.
+ //
+ // special case: if hparent == nil, we do it at the summit level.
+ //
+ // possible view settings: name, date, kind, size, label.
+ //
+ // 2007-01-17 creedon: support for long odb item names and file paths
+ //
+ // 1993-09-22 dmb: added cases for remaining possible view settings,
+ // treating them all as viewbyname. also viewbyname sort
+ // order is unicase.
+ //
- /*
- using whatever sorting options we have, determine the insertion point for the
- new line. we return the info that opaddheadline needs, a handle to the "pre"
- node and the direction relative to that node to create the new headline.
+ hdlheadrecord nomad;
+ tyfolderview folderview;
- special case: if hparent == nil, we do it at the summit level.
+ #if filebrowser
- possible view settings: name, date, kind, size, label.
+ unsigned long time1, time2;
+ unsigned long size1, size2;
+ short label1, label2;
+ bigstring bsnew;
+
+ #endif
- 9/22/93 dmb: added cases for remaining possible view settings, treating
- them all as viewbyname. also viewbyname sort order is unicase.
- */
+ #if odbbrowser
- hdlheadrecord nomad;
- tyfolderview folderview;
-#if filebrowser
- unsigned long time1, time2;
- unsigned long size1, size2;
- short label1, label2;
- bigstring bsnew;
-#endif
-#if odbbrowser
- hdlhashtable ht;
- hdlhashnode hnode, hnext;
- bigstring bsnext;
- hdlheadrecord hmatch;
-#endif
+ Handle handleNext;
+ hdlhashnode hnode, hnext;
+ hdlhashtable ht;
+ hdlheadrecord hmatch;
+
+ #endif
if (hparent == nil) {
@@ -129,11 +139,13 @@
else {
#if filebrowser
+
tybrowserinfo browserinfo;
browsergetrefcon (hparent, &browserinfo);
folderview = browserinfo.folderview;
+
#endif
nomad = hparent;
@@ -150,174 +162,180 @@
ht = (*newfileinfo).dirid;
- if (hashtablelookupnode (ht, bsnewhead, &hnode)) { // should not fail
+ if (hashtablelookupnode (ht, handleNewHead, &hnode)) { // should not fail
hnext = (**hnode).sortedlink;
if (hnext != nil) { // we're not last
- gethashkey (hnext, bsnext);
+ gethashkey ( hnext, &handleNext );
- if (opfindhead (nomad, bsnext, &hmatch)) { // shouldn't fail
+ if ( opFindHeadHandle ( nomad, handleNext, &hmatch ) ) { // shouldn't fail
*hpre = hmatch;
*dir = up;
return;
- }
- }
- }
+
+ } // if
+ } // if
+ } // if
// default: insert at end of list
- *hpre = oprepeatedbump (down, longinfinity, nomad, true);
+ *hpre = oprepeatedbump ( down, longinfinity, nomad, true );
*dir = down;
return;
#endif
-
-
+
#if filebrowser
- folderview = -1;
-
- switch (folderview) { /*initialize the things we compare against*/
+ folderview = -1;
- case viewbyname:
- case viewbyicon:
- case viewbysmallicon:
- case viewbycomment:
- case viewbyversion:
- copystring (bsnewhead, bsnew);
+ switch (folderview) { /*initialize the things we compare against*/
- alllower (bsnew);
-
- break;
-
- case viewbykind:
- setstringlength (bsnew, 4);
-
- moveleft (&(*newfileinfo).filecreator, &bsnew [1], 4);
-
- break;
-
- case viewbydate:
- time1 = (unsigned long) (*newfileinfo).timemodified;
-
- break;
-
- case viewbysize:
- size1 = (*newfileinfo).filesize;
-
- break;
-
- case viewbycolor:
- label1 = (*newfileinfo).ixlabel;
-
- break;
- } /*switch*/
-
- while (true) {
-
- switch (folderview) {
-
case viewbyname:
case viewbyicon:
case viewbysmallicon:
case viewbycomment:
- case viewbyversion: {
- bigstring bs;
+ case viewbyversion:
+ copystring (bsnewhead, bsnew);
- opgetheadstring (nomad, bs);
+ alllower (bsnew);
- alllower (bs);
+ break;
- if (comparestrings (bsnew, bs) == -1) /*bsnewhead is < bs*/
- return;
+ case viewbykind:
+ setstringlength (bsnew, 4);
+ moveleft (&(*newfileinfo).filecreator, &bsnew [1], 4);
+
break;
- }
-
- case viewbykind: {
- tybrowserinfo nomadinfo;
- bigstring bs;
-
- browsergetrefcon (nomad, &nomadinfo);
-
- setstringlength (bs, 4);
-
- moveleft (&nomadinfo.filecreator, &bs [1], 4);
- if (comparestrings (bsnew, bs) == -1) /*bsnew is < bs*/
- return;
-
+ case viewbydate:
+ time1 = (unsigned long) (*newfileinfo).timemodified;
+
break;
- }
- case viewbydate: {
- tybrowserinfo nomadinfo;
-
- browsergetrefcon (nomad, &nomadinfo);
-
- time2 = (unsigned long) nomadinfo.timemodified;
-
- if (time1 >= time2)
- return;
-
+ case viewbysize:
+ size1 = (*newfileinfo).filesize;
+
break;
- }
- case viewbysize: {
- tybrowserinfo nomadinfo;
+ case viewbycolor:
+ label1 = (*newfileinfo).ixlabel;
+
+ break;
+ } /*switch*/
- browsergetrefcon (nomad, &nomadinfo);
+ while (true) {
- size2 = nomadinfo.filesize;
+ switch (folderview) {
- if (size1 >= size2)
- return;
+ case viewbyname:
+ case viewbyicon:
+ case viewbysmallicon:
+ case viewbycomment:
+ case viewbyversion: {
+ bigstring bs;
- break;
- }
+ opgetheadstring (nomad, bs);
+
+ alllower (bs);
+
+ if (comparestrings (bsnew, bs) == -1) /*bsnewhead is < bs*/
+ return;
+
+ break;
+ }
- case viewbycolor: {
- tybrowserinfo nomadinfo;
+ case viewbykind: {
+ tybrowserinfo nomadinfo;
+ bigstring bs;
+
+ browsergetrefcon (nomad, &nomadinfo);
+
+ setstringlength (bs, 4);
+
+ moveleft (&nomadinfo.filecreator, &bs [1], 4);
+
+ if (comparestrings (bsnew, bs) == -1) /*bsnew is < bs*/
+ return;
+
+ break;
+ }
+
+ case viewbydate: {
+ tybrowserinfo nomadinfo;
+
+ browsergetrefcon (nomad, &nomadinfo);
+
+ time2 = (unsigned long) nomadinfo.timemodified;
+
+ if (time1 >= time2)
+ return;
+
+ break;
+ }
+
+ case viewbysize: {
+ tybrowserinfo nomadinfo;
+
+ browsergetrefcon (nomad, &nomadinfo);
+
+ size2 = nomadinfo.filesize;
+
+ if (size1 >= size2)
+ return;
+
+ break;
+ }
+
+ case viewbycolor: {
+ tybrowserinfo nomadinfo;
+
+ browsergetrefcon (nomad, &nomadinfo);
+
+ label2 = nomadinfo.ixlabel;
+
+ if (label1 >= label2)
+ return;
+
+ break;
+ }
+ } /*switch*/
- browsergetrefcon (nomad, &nomadinfo);
+ *hpre = nomad;
- label2 = nomadinfo.ixlabel;
+ *dir = down;
- if (label1 >= label2)
- return;
-
- break;
- }
- } /*switch*/
-
- *hpre = nomad;
-
- *dir = down;
-
- if (!opchasedown (&nomad)) /*it's the last guy in the list*/
- return;
- } /*while*/
+ if (!opchasedown (&nomad)) /*it's the last guy in the list*/
+ return;
+ } /*while*/
#endif
+
} /*browserfindinsertionpoint*/
-boolean browserexpandvisit (bigstring bsitem, tybrowserinfo *info, long refcon) {
+boolean browserexpandvisit ( const Handle handleItem, tybrowserinfo *info, long refcon ) {
+
+ //
+ // 2007-01-17 creedon: support for long odb item names and file paths
+ //
+ // 1993-09-23 dmb: call opstart/endinternalchange around opaddheadline.
+ // this turns off the lineinsertedcallback and prevents an
+ // undo from being built -- which would otherwise delete
+ // the file! these calls used to be in browserpreexpand,
+ // but that was when this visit routine wasn't directly
+ // callable.
+ //
- /*
- dmb 9/23/93: call opstart/endinternalchange around opaddheadline. this turns
- off the lineinsertedcallback and prevents an undo from being built -- which
- would otherwise delete the file! these calls used to be in browserpreexpand,
- but that was when this visit routine wasn't directly callable.
- */
+ register tyexpandinfo *expandinfo = (tyexpandinfo *) refcon;
- register tyexpandinfo *expandinfo = (tyexpandinfo *) refcon;
hdlheadrecord hnew;
if (!testheapspace (512)) /*512 bytes should be plenty*/
@@ -344,15 +362,16 @@
tydirection dir;
if ((*expandinfo).flsortnodes)
- browserfindinsertionpoint ((*expandinfo).hparent, bsitem, info, &hpre, &dir);
+ browserfindinsertionpoint ( ( *expandinfo ).hparent, handleItem, info, &hpre, &dir );
else
- browsercalcinsertionpoint ((*expandinfo).hparent, &hpre, &dir);
+ browsercalcinsertionpoint ( ( *expandinfo ).hparent, &hpre, &dir );
opstartinternalchange (); /*this operation is not undo-able, and mustn't trigger callbacks*/
- opaddheadline (hpre, dir, bsitem, &hnew);
+ opdepositnewheadline (hpre, dir, handleItem, &hnew);
opendinternalchange ();
+
}
browsercopyfileinfo (hnew, info);
@@ -370,18 +389,25 @@
return (false);
}
}
-
+
(*expandinfo).hnewnode = hnew; /*some callers need this*/
return (true);
+
} /*browserexpandvisit*/
boolean browserexpand (hdlheadrecord hnode, long ctlevels) {
+
+ //
+ // 2007-01-17 creedon: support for long odb item names and file paths
+ //
tyexpandinfo expandinfo;
tybrowserspec fs;
+ clearbytes ( &fs, sizeof ( fs ) );
+
if (opsubheadsexpanded (hnode)) { /*special case for a node that's already expanded*/
hdlheadrecord nomad = (**hnode).headlinkright;
@@ -513,18 +539,27 @@
boolean browserselectfile (ptrfilespec pfs, boolean flexpand, hdlheadrecord *hnode) {
+ //
+ // 2007-01-17 creedon: support for long odb item names and file paths
+ //
+
bigstring filepath;
hdlheadrecord nomad;
boolean flsomethingexpanded = false;
boolean flreturn = false;
boolean fldisplaywasenabled;
+ Handle handlePath;
*hnode = nil;
- compoundexpand = true; opcleartmpbits ();
+ compoundexpand = true;
- filespectopath (pfs, filepath);
+ opcleartmpbits ();
+ filespectopath ( pfs, &handlePath );
+
+ texthandletostring ( handlePath, filepath );
+
fldisplaywasenabled = opdisabledisplay ();
nomad = (**outlinedata).hsummit;
@@ -626,38 +661,27 @@
boolean browserpostcollapse (hdlheadrecord hnode) {
+
+ //
+ // 2007-01-17 creedon: support for long odb item names and file paths
+ //
+ // 5.1.4 dmb: after deleting an auto-created node, we still need to delete
+ // subs
+ //
+ // 5.0a25 dmb: auto-delete auto-created node
+ //
- /*
- 5.0a25 dmb: auto-delete auto-created node
-
- 5.1.4 dmb: after deleting an auto-created node, we still need to delete subs
- */
-
hdloutlinerecord ho = outlinedata;
boolean fldisplaywasenabled;
killundo ();
/*toss auto-created nodes, if present*/ {
+
hdlheadrecord hsub = (**hnode).headlinkright;
browserdeletedummyvalues (hsub);
- /*
- tybrowserspec fs;
- tyvaluerecord val;
-
- if ((**hsub).tmpbit2 && opislastsubhead (hsub)) {
-
- if (claygetfilespec (hsub, &fs) && claylookupvalue (&fs, &val))
- if (val.valuetype == novaluetype) {
-
- hashtabledelete (fs.parID, fs.name);
-
- //return (true);
- }
- }
- */
}
fldisplaywasenabled = opdisabledisplay (); /*keep the cursor line from flashing*/
@@ -681,6 +705,6 @@
opendinternalchange ();
return (true);
+
} /*browserpostcollapse*/
-
Modified: Frontier/branches/Frontier_Long_File_Paths/Common/source/claybrowserstruc.c
===================================================================
--- Frontier/branches/Frontier_Long_File_Paths/Common/source/claybrowserstruc.c 2007-01-17 18:10:34 UTC (rev 1605)
+++ Frontier/branches/Frontier_Long_File_Paths/Common/source/claybrowserstruc.c 2007-01-17 19:44:42 UTC (rev 1606)
@@ -47,17 +47,18 @@
#include "claybrowserexpand.h"
#include "claybrowservalidate.h"
#include "claybrowserstruc.h"
+
#if odbbrowser
+
#include "shell.rsrc.h"
#include "shellundo.h"
#include "tableinternal.h"
#include "tableverbs.h"
#include "wpengine.h"
+
#endif
-
-
boolean browsergetrefcon (hdlheadrecord hnode, tybrowserinfo *info) {
return (opgetrefcon (hnode, info, sizeof (tybrowserinfo)));
@@ -88,89 +89,101 @@
} /*browsercopyfileinfo*/
-static void filepushsuffixnumber (short suffixnum, bigstring name) {
+static void filepushsuffixnumber ( short suffixnum, Handle *name ) {
+
+ //
+ // 2007-01-17 creedon: support for long odb item names and file paths
+ //
- if (suffixnum > 0) {
+ if ( suffixnum > 0 ) {
- pushstring (BIGSTRING ("\x02" " #"), name);
+ pushtexthandle ( BIGSTRING ( "\x02" " #" ), *name );
- pushint (suffixnum, name);
+ pushIntHandle ( suffixnum, *name );
+
}
- } /*filepushsuffixnumber*/
+
+ } // filepushsuffixnumber
-static void filepopsuffixnumber (short suffixnum, bigstring name) {
+static void filepopsuffixnumber ( short suffixnum, Handle *name ) {
+
+ //
+ // 2007-01-17 creedon: support for long odb item names and file paths
+ //
- byte bssuffix [32];
+ Handle h;
+ byte bssuffix [ 32 ];
short ixsuffix;
+ long length = gethandlesize ( *name );
- if (suffixnum > 0) {
+ if ( suffixnum > 0 ) {
- copystring (BIGSTRING ("\x02" " #"), bssuffix);
+ copystring ( BIGSTRING ( "\x02" " #" ), bssuffix );
- pushint (suffixnum, bssuffix);
+ pushint ( suffixnum, bssuffix );
- ixsuffix = patternmatch (bssuffix, name) - 1;
-
- if (ixsuffix == stringlength (name) - stringlength (bssuffix))
- setstringlength (name, ixsuffix);
+ newtexthandle ( bssuffix, &h );
+
+ ixsuffix = searchhandle ( *name, h, 0, length );
+
+ if ( ixsuffix == length - stringlength ( bssuffix ) )
+ sethandlesize ( *name, ixsuffix );
}
- } /*filepushsuffixnumber*/
+ } // filepushsuffixnumber
+
boolean claygetfilespec (hdlheadrecord hnode, tybrowserspec *fs) {
- /*
- turn a headrecord into a filespec.
+ //
+ // turn a headrecord into a filespec.
+ //
+ // 2007-01-17 creedon: support for long odb item names and file paths
+ //
+ // 5.1.4 dmb: on failure, clear fs
+ //
+ // 1993-09-21 dmb: don't need special case for volumes anymore. Think Ref's
+ // recommendation is fine for specifying volumes, but it's
+ // event better to specify the root directory of the
+ // volume, removing any special cases.
+ //
+ // 1993-08-30 DW: rewrite.
+ //
+ // 1993-06-27 DW: per recommendation of Think Reference, if it's a volume,
+ // just set the vRefNum field of the filespec.
+ //
- 6/27/93 DW: per recommendation of Think Reference, if it's a
- volume, just set the vRefNum field of the filespec.
-
- 8/30/93 DW: rewrite.
-
- 9/21/93 dmb: don't need special case for volumes anymore. Think Ref's
- recommendation is fine for specifying volumes, but it's event better
- to specify the root directory of the volume, removing any special cases.
-
- 5.1.4 dmb: on failure, clear fs
- */
-
+ Handle name;
+ boolean fl;
tybrowserinfo info;
- bigstring name;
if (!browsergetrefcon (hnode, &info)) {
-
+
clearbytes (fs, sizeof (tybrowserspec));
return (false);
+
}
-
- /*
- if (info.flvolume) { /%special case%/
- (*fs).vRefNum = info.vnum;
-
- (*fs).parID = 0;
-
- setstringlength ((*fs).name, 0);
-
- return (true);
- }
- */
+ opGetHeadTextHandle ( hnode, &name );
- opgetheadstring (hnode, name);
+ fl = claymakespec ( info.vnum, info.dirid, name, fs ); // dmb 5.0b9 - was: filepushsuffixnumber (info.suffixnum, name);
- // dmb 5.0b9 - was: filepushsuffixnumber (info.suffixnum, name);
+ disposehandle ( name );
- return (claymakespec (info.vnum, info.dirid, name, fs));
- } /*claygetfilespec*/
+ return ( fl );
+
+ } // claygetfilespec
boolean browserloadnode (hdlheadrecord hnode) {
+ tybrowserinfo fileinfo;
tybrowserspec fs;
- tybrowserinfo fileinfo;
+ clearbytes ( &fs, sizeof ( fs ) );
+
(**hnode).fldirty = true; /*force update to reflect new info*/
claygetfilespec (hnode, &fs);
@@ -181,6 +194,7 @@
(**hnode).flnodeisfolder = fileinfo.flfolder;
return (browsercopyfileinfo (hnode, &fileinfo));
+
} /*browserloadnode*/
@@ -213,53 +227,31 @@
return (false);
} /*browserchecklinelength*/
-#if 0
-static boolean browserupdatefileinfo (hdlheadrecord hnode) {
+boolean browserfileadded (hdlheadrecord hnodeparent, const tybrowserspec *fsnew, hdlheadrecord *hnew) {
- /*
- change the in-memory info to reflect what's on disk
- */
+ //
+ // a new item has been added to a folder, our job is to add the file to the
+ // display.
+ //
+ // 2007-01-17 creedon: support for long odb item names and file paths
+ //
+ // 1993-09-23 dmb: removed setting/clearing of
+ // lineinsertedcallbackdisabled. browserexpandvisit now
+ // calls opstart/endinternalchange to handle this.
+ //
- tybrowserspec fs;
- tybrowserinfo info;
-
- if (hnode == nil) /*defensive driving*/
- return (false);
-
- claygetfilespec (hnode, &fs);
-
- claygetfileinfo (&fs, &info);
-
- browsercopyfileinfo (hnode, &info);
-
- return (true);
- } /*browserupdatefileinfo*/
-
-#endif
-
-
-boolean browserfileadded (hdlheadrecord hnodeparent, const tybrowserspec *fsnew, hdlheadrecord *hnew) {
-
- /*
- a new item has been added to a folder, our job is to add the file
- to the display.
-
- dmb 9/23/93: removed setting/clearing of lineinsertedcallbackdisabled.
- browserexpandvisit now calls opstart/endinternalchange to handle this.
- */
-
+ Handle name;
+ boolean fl;
+ tybrowserinfo newfileinfo;
tyexpandinfo expandinfo;
- tybrowserinfo newfileinfo;
- bigstring fname;
- boolean fl;
claygetfileinfo (fsnew, &newfileinfo);
-
- claygetfilename (fsnew, fname);
+ claygetfilename ( fsnew, &name );
+
expandinfo.hparent = hnodeparent;
-
+
expandinfo.ctlevels = 1;
expandinfo.flsortnodes = true;
@@ -270,7 +262,7 @@
lineinsertedcallbackdisabled = true;
*/
- fl = browserexpandvisit (fname, &newfileinfo, (long) &expandinfo);
+ fl = browserexpandvisit ( name, &newfileinfo, ( long ) &expandinfo );
/*
lineinsertedcallbackdisabled = false;
@@ -278,13 +270,14 @@
if (!fl)
return (false);
+
+ opexpandupdate (expandinfo.hnewnode);
- opexpandupdate (expandinfo.hnewnode);
-
*hnew = expandinfo.hnewnode;
return (fl);
- } /*browserfileadded*/
+
+ } // browserfileadded
#if 0
@@ -337,52 +330,74 @@
} /*foldercontainsfile*/
-static boolean claygetuniquefilename (tybrowserspec *fs, short *suffixnum) {
+static boolean claygetuniquefilename ( tybrowserspec *fs, short *suffixnum ) {
+
+ //
+ // 2007-01-17 creedon: support for long odb item names and file paths
+ //
+ // 5.0b9 dmb: we now expect suffixnum to have a meaningingful initial
+ // value. if it's non-zero, and the headstring ends in that
+ // suffix, remove the existing suffix before comparing
+ //
- /*
- 5.0b9 dmb: we now expect suffixnum to have a meaningingful initial value.
+ Handle name, origname;
+ boolean flfolder, flmustsuffixize = false; // Timothy Paustian Sunday, May 7, 2000 8:42:22 PM - flfolder unused
- if it's non-zero, and the headstring ends in that suffix, remove the
- existing suffix before comparing
- */
-
- bigstring origname, name;
- ////Code change by Timothy Paustian Sunday, May 7, 2000 8:42:22 PM
- //This isn't used
- //boolean flfolder;
- boolean flmustsuffixize = false;
+ filepopsuffixnumber ( *suffixnum, &( *fs ).name );
- filepopsuffixnumber (*suffixnum, (*fs).name);
+ copyhandle ( ( *fs ).name, &origname );
- copystring ((*fs).name, origname);
-
*suffixnum = 0;
- if (isemptystring (origname)) {
+ if ( isemptyhandle ( origname ) ) {
+
#if filebrowser
- return (false);
+
+ disposehandle ( origname );
+
+ return ( false );
+
#else
- copystring (BIGSTRING ("\x04" "item"), origname);
+
+ disposehandle ( origname );
+
+ if ( ! newtexthandle ( BIGSTRING ( "\x04" "item" ), &origname ) )
+ return ( false );
+
flmustsuffixize = true;
+
#endif
+
}
- while (flmustsuffixize || clayfileexists (fs, &flfolder)) {
+ while ( flmustsuffixize || clayfileexists ( fs, &flfolder ) ) {
flmustsuffixize = false; // reset
- copystring (origname, name);
+ copyhandle ( origname, &name );
- (*suffixnum)++;
+ ( *suffixnum )++;
- filepushsuffixnumber (*suffixnum, name);
+ filepushsuffixnumber ( *suffixnum, &name );
- if (!claymakespec ((*fs).vRefNum, (*fs).parID, name, fs))
+ if ( ! claymakespec ( ( *fs ).vRefNum, ( *fs ).parID, name, fs ) ) {
+
+ disposehandle ( name );
+ disposehandle ( origname );
+
return (false);
- } /*while*/
+
+ }
+
+ disposehandle ( name );
+
+ } // while
+ disposehandle ( origname );
+
return (true);
- } /*claygetuniquefilename*/
+
+ } // claygetuniquefilename
static tybrowserspec undofolderspec;
@@ -396,29 +411,49 @@
static hdlheadrecord hdeletednode = nil; /*last node deleted (unlinked) -- may yet be re-inserted*/
-static boolean getundofolderspec (void) {
+static boolean getundofolderspec ( void ) {
+
+ //
+ // 2007-01-17 creedon: support for long odb item names and file paths
+ //
+ Handle h;
static boolean folderfound = false;
-
- if (folderfound)
- return (true);
- folderfound = claygetspecialfolder (BIGSTRING ("\x04" "Undo"), true, &undofolderspec);
+ if ( folderfound )
+ return ( true );
- return (folderfound);
- } /*getundofolderspec*/
+ if ( ! newtexthandle ( BIGSTRING ( "\x04" "Undo" ), &h ) )
+ return ( false );
+
+ folderfound = claygetspecialfolder ( h, true, &undofolderspec );
+ disposehandle ( h );
-static boolean getclipfolderspec (void) {
+ return ( folderfound );
+ } // getundofolderspec
+
+
+static boolean getclipfolderspec ( void ) {
+
+ Handle h;
static boolean folderfound = false;
-
+
+ clearbytes ( &undofolderspec, sizeof ( clipfolderspec ) );
+
if (folderfound)
return (true);
+
+ if ( ! newtexthandle ( BIGSTRING ( "\x09" "Clipboard" ), &h ) )
+ return ( false );
+
+ folderfound = claygetspecialfolder ( h, true, &clipfolderspec );
- folderfound = claygetspecialfolder (BIGSTRING ("\x09" "Clipboard"), true, &clipfolderspec);
+ disposehandle ( h );
return (folderfound);
+
} /*getclipfolderspec*/
@@ -427,6 +462,7 @@
getundofolderspec ();
return (clayemptyfilefolder (&undofolderspec));
+
} /*browserclearundo*/
@@ -456,76 +492,55 @@
} /*browserdeletenodeswithtmpbitset*/
-/*
-static boolean browsercreatefile (hdlheadrecord hnode, tybrowserspec *fsfolder) {
-
- bigstring bs;
- tybrowserspec fsdest;
-
- opgetheadstring (hnode, bs);
-
- claygetsubitemspec (fsfolder, bs, &fsdest);
-
- if (claycreatefile (&fsdest)) {
-
- /%update the node's refcon to reflect the new file's position & attributes%/
-
- tybrowserinfo browserinfo;
-
- claygetfileinfo (&fsdest, &browserinfo);
-
- browsersetrefcon (hnode, &browserinfo);
- }
-
- return (true);
- } /%browsercreatefile%/
-*/
-
static boolean browsermoveto (hdlheadrecord hnode, tybrowserspec *fsfolder) {
-
- /*
- move or copy the file or folder connected to hnode to the
- indicated folder.
-
- if a file with that name already exists, append a suffix
- to the name.
-
- the "flnodeonscrap" attribute of a node indicates whether or
- not it owns the file described by the refcon. it can be false
- when a node is on the outline scrap, for example.
-
- dmb 9/20/93: 1) since undo & clip folders are always on sys volume now, we
- can't assume vRefNum of source & dest are the same; 2) fixed suffixnum
- updating; was assigning to info instead of browserinfo; 3) fsdest must not
- take suffixnum into account. suffixnum is essential for determining fssource
- from the node, but the dest should correspond to the headline name.
- 5.0b13 dmb: with the new meaning of suffixnum -- that the node/value name
- has been modified to be unique in it's new location -- we shouldn't consider
- and intially-unique name like "item #1" to be suffixized
+ // move or copy the file or folder connected to hnode to the indicated
+ // folder.
+ //
+ // if a file with that name already exists, append a suffix to the name.
+ //
+ // the "flnodeonscrap" attribute of a node indicates whether or not it
+ // owns the file described by the refcon. it can be false when a node is on
+ // the outline scrap, for example.
+ //
+ // 2007-01-17 creedon: support for long odb item names and file paths
+ //
+ // 5.1.4 dmb: don't ignore return value of claygetsubitemspec
+ //
+ // 5.0.2b20 dmb: don't do copy/delete if source or dest vnum is zero
+ //
+ // 5.0b13 dmb: with the new meaning of suffixnum -- that the node/value
+ // name has been modified to be unique in it's new location --
+ // we shouldn't consider and intially-unique name like
+ // "item #1" to be suffixized
+ //
+ // 1993-09-20 dmb: 1) since undo & clip folders are always on sys volume
+ // now, we can't assume vRefNum of source & dest are the
+ // same; 2) fixed suffixnum updating; was assigning to info
+ // instead of browserinfo; 3) fsdest must not take
+ // suffixnum into account. suffixnum is essential for
+ // determining fssource from the node, but the dest should
+ // correspond to the headline name.
+ //
- 5.0.2b20 dmb: don't do copy/delete if source or dest vnum is zero
+ Handle h;
+ boolean flsourceexists;
+ short suffixnum;
+ tybrowserinfo info;
+ tybrowserspec fsdest, fssource;
- 5.1.4 dmb: don't ignore return value of claygetsubitemspec
- */
+ clearbytes ( &fsdest, sizeof ( fsdest ) );
+ clearbytes ( &fssource, sizeof ( fssource ) );
- tybrowserspec fssource, fsdest;
- tybrowserinfo info;
- short suffixnum;
- bigstring bs;
- boolean flsourceexists;
-
flsourceexists = claygetfilespec (hnode, &fssource);
- if (flsourceexists) { // hnode is associated with a file
-
+ if (flsourceexists) // hnode is associated with a file
if (foldercontainsfile (fsfolder, &fssource)) // already in the folder*/
return (true);
- }
- opgetheadstring (hnode, bs);
+ opGetHeadTextHandle ( hnode, &h );
- if (!claygetsubitemspec (fsfolder, bs, &fsdest))
+ if ( ! claygetsubitemspec ( fsfolder, h, &fsdest ) )
return (false);
if (!browsergetrefcon (hnode, &info)) // 5.0b9 dmb
@@ -543,7 +558,8 @@
else {
if (!(**hnode).flnodeonscrap) { /*we own this file -- move it*/
- if (((fssource.vRefNum == fsdest.vRefNum) || (fssource.vRefNum == 0) || (fsdest.vRefNum == 0)) && equalidentifiers (fssource.name, fsdest.name)) {
+ if ( ( ( fssource.vRefNum == fsdest.vRefNum ) || ( fssource.vRefNum == 0 ) || ( fsdest.vRefNum == 0 ) ) &&
+ equaltextidentifiers ( *fssource.name, *fsdest.name, gethandlesize ( fssource.name ) ) ) {
if (!claymovefile (&fssource, fsfolder))
return (false);
@@ -554,16 +570,17 @@
return (false);
claydeletefile (&fssource);
+
}
}
- else { /*file not owned -- make a copy*/
-
+ else { // file not owned -- make a copy
+
if (!claycopyfile (&fssource, &fsdest))
return (false);
}
}
- /*update the node's refcon to reflect the new file's position & attributes*/ {
+ /* update the node's refcon to reflect the new file's position & attributes */ {
tybrowserinfo browserinfo;
@@ -575,40 +592,46 @@
browserinfo.suffixnum = suffixnum; // dmb 5.0b9: new
if (suffixnum != info.suffixnum) { // suffix was added or removed
-
+
opstartinternalchange ();
- opsetactualheadstring (hnode, fsdest.name);
+ sethandlecontents ( *fsdest.name, gethandlesize ( fsdest.name ), ( **hnode ).headstring );
opendinternalchange ();
+
}
#endif
- if (!flsourceexists && isemptystring (bs)) { // a new insertion
-
+ if ( ! flsourceexists && isemptyhandle ( h ) ) { // a new insertion
+
(**hnode).tmpbit2 = true;
- langexternaldontsave (fsdest.parID, fsdest.name); // 5.1.4
+ langexternaldontsave ( fsdest.parID, fsdest.name ); // 5.1.4
browserinfo.suffixnum = 0; // we made up the name, it's real w/whatever suffix
+
}
browsersetrefcon (hnode, &browserinfo);
+
}
(**hnode).flnodeonscrap = false;
return (true);
- } /*browsermoveto*/
+
+ } // browsermoveto
boolean browsergetparentspec (hdlheadrecord hnode, tybrowserspec *fsparent) {
+
+ //
+ // 2007-01-17 creedon: support for long odb item names and file paths
+ //
+ // 5.0.2b21 dmb: use new shellgetdatabase to get parent of summit
+ //
+ // 1997-05-13 dmb: fixed summit (root table) case
+ //
- /*
- 5.13.97 dmb: fixed summit (root table) case
-
- 5.0.2b21 dmb: use new shellgetdatabase to get parent of summit
- */
-
hdlheadrecord hparent = (**hnode).headlinkleft;
hdltableformats hformats;
@@ -620,12 +643,12 @@
(*fsparent).parID = (**hformats).htable; // 5.0d18 dmb: this is as clean as it gets for now
- setemptystring ((*fsparent).name);
-
return (true);
+
}
+
+ return (claygetfilespec (hparent, fsparent));
- return (claygetfilespec (hparent, fsparent));
} /*browsergetparentspec*/
@@ -735,20 +758,24 @@
tybrowserspec fapp, fdoc;
+ clearbytes ( &fapp, sizeof ( fapp ) );
+ clearbytes ( &fdoc, sizeof ( fdoc ) );
+
claygetfilespec (htarget, &fapp);
claygetfilespec ((**outlinedata).hbarcursor, &fdoc);
claylaunchappwithdoc (&fapp, &fdoc, true);
+
}
-
+
#endif
} /*browserpredrag*/
boolean browserdragcopy (hdlheadrecord hmove, hdlheadrecord hdest) {
-
+
/*
we're moving hmove down or to the right of hdest. if they're
not both from the same volume, we need to move a copy, not the
@@ -757,6 +784,9 @@
tybrowserspec fs1, fs2;
+ clearbytes ( &fs1, sizeof ( fs1 ) );
+ clearbytes ( &fs2, sizeof ( fs2 ) );
+
claygetfilespec (hmove, &fs1);
claygetfilespec (hdest, &fs2);
@@ -779,19 +809,19 @@
void browsersortfolder (hdlheadrecord hnode) {
+
+ //
+ // hnode is a folder whose sort order has changed. unlink all its subnodes
+ // and reinsert them into the list sorted according to the new order.
+ //
+ // 2007-01-17 creedon: support for long odb item names and file paths
+ //
- /*
- hnode is a folder whose sort order has changed. unlink all its
- subnodes and reinsert them into the list sorted according to the
- new order.
- */
-
- hdlheadrecord nomad = (**hnode).headlinkright, nextnomad;
+ Handle h;
+ hdlheadrecord hpre, nextnomad, nomad = (**hnode).headlinkright;
+ hdlscreenmap hmap;
tybrowserinfo browserinfo;
- bigstring bs;
- hdlheadrecord hpre;
tydirection dir;
- hdlscreenmap hmap;
if (nomad == hnode) /*no subs expanded, nothing to do*/
return;
@@ -812,9 +842,9 @@
browsergetrefcon (nomad, &browserinfo);
- opgetheadstring (nomad, bs);
+ opGetHeadTextHandle ( nomad, &h );
- browserfindinsertionpoint (hnode, bs, &browserinfo, &hpre, &dir);
+ browserfindinsertionpoint (hnode, h, &browserinfo, &hpre, &dir);
opdeposit (hpre, dir, nomad);
@@ -837,29 +867,31 @@
#ifdef fldebug
opvalidate (outlinedata);
#endif
+
} /*browsersortfolder*/
void browserinsertagain (hdlheadrecord hnode) {
- /*
- the node's text or other info has been changed, it might sort
- to a different place in its parent folder's list. we unlink it
- from the structure, and link it back in where it belongs.
+ //
+ // the node's text or other info has been changed, it might sort to a
+ // different place in its parent folder's list. we unlink it from the
+ // structure, and link it back in where it belongs.
+ //
+ // 2007-01-17 creedon: support for long odb item names and file paths
+ //
+ // 5.0d14 dmb: do nothing when hnode is the only node at its level.
+ // particularly imporant when hnode is an only summit.
+ //
+ // 1993-09-24 dmb: don't want an undo built for this operation, since it's
+ // a passive reordering going on here.
+ //
- 9/24/93 dmb: don't want an undo built for this operation, since
- it's a passive reordering going on here.
-
- 5.0d14 dmb: do nothing when hnode is the only node at its level.
- particularly imporant when hnode is an only summit.
- */
-
- hdlheadrecord hparent;
- bigstring bs;
+ Handle h;
+ hdlheadrecord hparent, hpre;
+ hdlscreenmap hmap;
tybrowserinfo browserinfo;
- hdlheadrecord hpre;
tydirection dir;
- hdlscreenmap hmap;
if (opcountatlevel (hnode) == 1) /*has no siblings, can't change order*/
return;
@@ -871,7 +903,7 @@
opstartinternalchange (); /*don't want this to trigger callbacks or add to undo stack*/
- opgetheadstring (hnode, bs);
+ opGetHeadTextHandle ( hnode, &h );
opnewscreenmap (&hmap);
@@ -879,17 +911,18 @@
browsergetrefcon (hnode, &browserinfo);
- browserfindinsertionpoint (hparent, bs, &browserinfo, &hpre, &dir);
+ browserfindinsertionpoint (hparent, h, &browserinfo, &hpre, &dir);
opdeposit (hpre, dir, hnode);
(**outlinedata).hbarcursor = hnode;
-// 2/20/97 dmb: shouldn't need this: opsetctexpanded ();
+ // 2/20/97 dmb: shouldn't need this: opsetctexpanded ();
opinvalscreenmap (hmap);
opendinternalchange ();
+
} /*browserinsertagain*/
@@ -912,9 +945,11 @@
static boolean browsergetnodevalue (hdlheadrecord hnode, tyvaluerecord *val) {
+ hdlhashnode hhashnode;
tybrowserspec fs;
- hdlhashnode hhashnode;
+ clearbytes ( &fs, sizeof ( fs ) );
+
if (!claygetfilespec (hnode, &fs))
return (false);
@@ -943,27 +978,33 @@
flinternalchange is true, for example, when you collapse a folder. the
nodes are deleted, but the files must not be.
+
*/
if (!opinternalchange () && fldisk && (!(**hnode).flnodeonscrap)) {
tybrowserspec fs;
+ clearbytes ( &fs, sizeof ( fs ) );
+
claygetfilespec (hnode, &fs);
claydeletefile (&fs);
+
}
if (hnode == hdeletednode)
hdeletednode = nil;
return (true);
+
} /*browserreleaserefcon*/
static boolean lineinsertvisit (hdlheadrecord hnode, ptrvoid refcon) {
-#pragma unused (refcon)
+ #pragma unused (refcon)
+
/*
set the node's refcon info to reflect its current position in
the outline hierarchy.
@@ -972,6 +1013,8 @@
tybrowserinfo info;
tybrowserspec fsparent;
+ clearbytes ( &fsparent, sizeof ( fsparent ) );
+
browsergetparentspec (hnode, &fsparent);
if (browsergetrefcon (hnode, &info)) {
@@ -986,6 +1029,7 @@
(**hnode).flnodeonscrap = false;
return (true);
+
} /*lineinsertvisit*/
@@ -999,10 +1043,7 @@
tybrowserspec fsparent;
- /*
- if (lineinsertedcallbackdisabled)
- return (true);
- */
+ clearbytes ( &fsparent, sizeof ( fsparent ) );
if (hnode == hdeletednode) /*finishing a move operation*/
hdeletednode = nil;
@@ -1024,6 +1065,7 @@
oprecursivelyvisit (hnode, infinity, &lineinsertvisit, nil);
return (true);
+
} /*browserlineinserted*/
@@ -1077,7 +1119,7 @@
static boolean closeownedwindows (hdlheadrecord hnode) {
-
+
/*
hnode has been deleted, but with undo. so the external value nodes
aren't being disposed to trigger window closing. tablesymboldeleted
@@ -1088,17 +1130,20 @@
tableexternal.c
*/
+ hdlhashnode hn;
tybrowserspec fs;
- hdlhashnode hn;
+ clearbytes ( &fs, sizeof ( fs ) );
+
if (!claygetfilespec (hnode, &fs))
return (false);
- if (!hashtablelookupnode (fs.parID, fs.name, &hn))
- return (false);
+ if ( ! hashtablelookupnode ( fs.parID, fs.name, &hn ) )
+ return ( false );
+
+ return ( closeownedwindowsvisit ( hn, nil ) );
- return (closeownedwindowsvisit (hn, nil));
- } /*notownrefconvisit*/
+ } // notownrefconvisit
boolean browsercommitchanges (void) {
@@ -1119,33 +1164,10 @@
hdeletednode = nil;
return (fl);
+
} /*browsercommitchanges*/
-#if 0
-
-static boolean xxxbrowserexportscrap (hdloutlinerecord hscrap) {
-
- hdlheadrecord nomad = (**hscrap).hsummit;
-
- if (!getclipfolderspec ())
- return (false);
-
- while (true) {
-
- if (!browsermoveto (nomad, &clipfolderspec))
- return (false);
-
- oprecursivelyvisit (nomad, infinity, ¬ownrefconvisit, nil);
-
- if (!opchasedown (&nomad))
- return (true);
- } /*while*/
- } /*browserexportscrap*/
-
-#endif
-
-
static void tabledisposescrap (hdloutlinerecord houtline) {
opdisposeoutline (houtline, false);
@@ -1260,25 +1282,23 @@
return true if no errors occur
*/
+ hdlhashnode hhashnode;
tybrowserspec fs;
tyvaluerecord val;
- hdlhashnode hhashnode;
+ clearbytes ( &fs, sizeof ( fs ) );
+
while (true) {
- if ((**hnode).tmpbit2) {
-
- if (claygetfilespec (hnode, &fs) && claylookupvalue (&fs, &val, &hhashnode)) {
-
+ if ((**hnode).tmpbit2)
+ if (claygetfilespec (hnode, &fs) && claylookupvalue (&fs, &val, &hhashnode))
if (val.valuetype == novaluetype)
- if (!hashtabledelete (fs.parID, fs.name))
- return (false);
- }
- }
-
+ if ( ! hashtabledelete ( fs.parID, fs.name ) )
+ return ( false );
+
if (!opchasedown (&hnode))
return (true);
}
+
} /*browserdeletedummyvalues*/
-
Modified: Frontier/branches/Frontier_Long_File_Paths/Common/source/claycallbacks.c
===================================================================
--- Frontier/branches/Frontier_Long_File_Paths/Common/source/claycallbacks.c 2007-01-17 18:10:34 UTC (rev 1605)
+++ Frontier/branches/Frontier_Long_File_Paths/Common/source/claycallbacks.c 2007-01-17 19:44:42 UTC (rev 1606)
@@ -52,37 +52,60 @@
-#if filebrowser
+typedef struct tycallbackinfo {
-boolean claymakespec (tybrowservol vnum, tybrowserdir dirid, bigstring fname, tybrowserspec *pfs) {
+ #if odbbrowser
+
+ hdldatabaserecord hdatabase;
+
+ hdlhashtable hparenttable;
+
+ #endif
+
+ tyclayfileloopcallback callback;
+
+ long refcon;
+
+ } tycallbackinfo;
- return (filemakespec (vnum, dirid, fname, pfs));
- } /*claymakespec*/
-#endif
+boolean claymakespec ( tybrowservol vnum, tybrowserdir dirid, const Handle name, tybrowserspec *pfs ) {
-#if odbbrowser
+ #if filebrowser
-boolean claymakespec (tybrowservol vnum, tybrowserdir dirid, bigstring fname, tybrowserspec *pfs) {
-
- (*pfs).vRefNum = vnum;
+ return ( filemakespec ( vnum, dirid, name, pfs ) );
- (*pfs).parID = dirid;
-
- copystring (fname, (*pfs).name);
-
- return (dirid != 0L);
- } /*claymakespec*/
+ #endif
-#endif
+ #if odbbrowser
+ (*pfs).vRefNum = vnum;
+
+ (*pfs).parID = dirid;
+
+ if ( ( *pfs ).name == NULL )
+ copyhandle ( name, &( *pfs ).name );
+ else
+ sethandlecontents ( *name, gethandlesize ( name ), ( *pfs ).name );
+
+ return ( dirid != 0L );
+
+ #endif
+
+ } // claymakespec
+
#if odbbrowser
-boolean claylookupvalue (const tybrowserspec *fs, tyvaluerecord *val, hdlhashnode * hnode) {
+boolean claylookupvalue ( const tybrowserspec *fs, tyvaluerecord *val, hdlhashnode * hnode ) {
- return (hashtablelookup ((*fs).parID, (*fs).name, val, hnode));
- } /*claylookupvalue*/
+ boolean fl;
+
+ fl = hashtablelookup ( ( *fs ).parID, ( *fs ).name, val, hnode );
+
+ return ( fl );
+
+ } // claylookupvalue
boolean claycopyfile (const tybrowserspec *fsource, const tybrowserspec *fdest) {
@@ -140,11 +163,11 @@
opstartinternalchange ();
if (fl) {
+
+ fl = hashtableassign ( ( *fdest ).parID, (*fdest).name, val );
- fl = hashtableassign ((*fdest).parID, (*fdest).name, val);
-
- if (!fl)
- disposevaluerecord (val, true);
+ if ( ! fl )
+ disposevaluerecord ( val, true );
}
opendinternalchange ();
@@ -164,7 +187,7 @@
boolean claycreatefile (const tybrowserspec *fs) {
-
+
tyvaluerecord val;
boolean fl;
@@ -172,154 +195,147 @@
opstartinternalchange ();
- fl = hashtableassign ((*fs).parID, (*fs).name, val);
+ fl = hashtableassign ( ( *fs ).parID, ( *fs ).name, val );
opendinternalchange ();
return (fl);
- } /*claycreatefile*/
+
+ } // claycreatefile
-boolean claydeletefile (const tybrowserspec *fs) {
-
+boolean claydeletefile ( const tybrowserspec *fs ) {
+
boolean fl;
opstartinternalchange ();
- fl = hashtabledelete ((*fs).parID, (ptrstring) (*fs).name);
+ fl = hashtabledelete ( ( *fs ).parID, ( *fs ).name );
opendinternalchange ();
return (fl);
- } /*claydeletefile*/
+
+ } // claydeletefile
-boolean claymovefile (const tybrowserspec *fs, const tybrowserspec *fsto) {
+boolean claymovefile ( const tybrowserspec *fs, const tybrowserspec *fsto ) {
- tyvaluerecord val;
- hdlhashtable hdest;
boolean fl;
hdlhashnode hnode;
+ hdlhashtable hdest;
+ tyvaluerecord val;
if (!claygetdirid (fsto, &hdest)) {
langerrormessage (BIGSTRING ("\x1b" "destination must be a table"));
return (false);
+
}
opstartinternalchange ();
pushhashtable ((*fs).parID);
- fl = hashlookup ((*fs).name, &val, &hnode);
+ fl = hashlookup ( ( *fs ).name, &val, &hnode );
- if (fl) {
+ if (fl)
+ hashdelete ( ( *fs ).name, false, false ); // don't toss the value
- // if ((*fs).parID == agentstable)
-
- hashdelete ((*fs).name, false, false); /*don't toss the value*/
- }
-
-
pophashtable ();
- if (fl) {
+ if (fl)
+ fl = hashtableassign ( hdest, ( *fs ).name, val );
- fl = hashtableassign (hdest, (*fs).name, val);
-
- /*
- if (fl && (hdest == agentstable) {
-
- hashtablelookupnode (hdest, (*fs).name, &hnode);
-
- scriptinstallagent (hnode);
- }
- */
- }
-
opendinternalchange ();
return (true);
- } /*claymovefile*/
+ } // claymovefile
-#endif
-#if filebrowswer
+boolean clayfileexists ( tybrowserspec *fs, boolean *isfolder ) {
-static boolean filedeletevisit (bigstring bsitem, tyfileinfo *info, long refcon) {
+ //
+ // 2006-12-14 creedon: created, cribbed from macro
+ //
- tybrowserspec fs;
+ return ( hashtablesymbolexists ( ( hdlhashtable ) ( *fs ).parID, ( *fs ).name ) );
-// if (stringlength (fs.name) == 0) /*defensive driving -- if you turn this off -- it could delete C source code in the program you're testing*/
-// return (false);
-
- claymakespec ((*info).vnum, (*info).dirid, bsitem, &fs);
-
- return (filedelete (&fs));
- } /*filedeletevisit*/
+ } // clayfileexists
-
-boolean clayemptyfilefolder (tybrowserspec *fsfolder) {
-
- return (folderloop (fsfolder, true, &filedeletevisit, 0));
- } /*clayemptyfilefolder*/
-
#endif
-#if odbbrowser
-boolean clayemptyfilefolder (tybrowserspec *fsfolder) {
+#if filebrowswer
- return (emptyhashtable ((*fsfolder).parID, true) > 0);
- } /*clayemptyfilefolder*/
-
-
+ static boolean filedeletevisit (bigstring bsitem, tyfileinfo *info, long refcon) {
+
+ tybrowserspec fs;
+
+ clearbytes ( &fs, sizeof ( fs ) );
+
+ claymakespec ((*info).vnum, (*info).dirid, bsitem, &fs);
+
+ return (filedelete (&fs));
+
+ } /*filedeletevisit*/
+
#endif
-#if filebrowser
-
-boolean claygetdirid (const tybrowserspec * fsfolder, tybrowserdir *dirid) {
-
- //
- // 2006-06-23 creedon: FSRef-ized
- //
+boolean clayemptyfilefolder ( tybrowserspec *fsfolder ) {
- FSRefParam pb;
-
- if (!getmacfileinfo (fsfolder, &pb))
- return (false);
+ #if filebrowswer
+
+ return ( folderloop ( fsfolder, true, &filedeletevisit, 0 ) );
- *dirid = pb.dirInfo.ioDrDirID;
+ #endif
- return (true);
- } // claygetdirid
+ #if odbbrowser
+
+ return ( emptyhashtable ( ( *fsfolder).parID, true ) > 0 );
+
+ #endif
+
+ } // clayemptyfilefolder
-#endif
#if odbbrowser
-static boolean claygetfolder (const tybrowserspec * fsfolder, tybrowserdir *dirid, boolean flinmemory) {
+static boolean claygetfolder ( const tybrowserspec *fsfolder, tybrowserdir *dirid, boolean flinmemory ) {
+
+ //
+ // 2007-01-17 creedon: support for long odb item names and file paths
+ //
- tyvaluerecord val;
hdlhashnode hnode;
+ tyvaluerecord val;
if ((*fsfolder).parID == nil) {
- assert (equalstrings ((*fsfolder).name, nameroottable));
+ Handle h;
+ if ( ! newtexthandle ( nameroottable, &h ) )
+ return ( false );
+
+ assert ( equalhandles ( (*fsfolder).name, h ) );
+
+ disposehandle ( h );
+
*dirid = roottable;
goto tagandexit;
+
}
-
- if (isemptystring ((*fsfolder).name)) {
+ if ( ( *fsfolder ).name == NULL ) {
+
*dirid = (*fsfolder).parID;
goto tagandexit;
+
}
if (!claylookupvalue (fsfolder, &val, &hnode))
@@ -336,28 +352,50 @@
if (!tablevaltotable (val, dirid, hnode))
return (false);
-tagandexit:
-
-// (***dirid).flmayaffectdisplay = true; // let tablesymbol calls know we may care
-
- return (true);
+ tagandexit:
+
+ return (true);
+
} /*claygetfolder*/
-boolean claygetdirid (const tybrowserspec * fsfolder, tybrowserdir *dirid) {
+boolean claygetinmemorydirid ( const tybrowserspec *fsfolder, tybrowserdir *dirid ) {
- return (claygetfolder (fsfolder, dirid, false));
- } /*claygetdirid*/
-
-
-boolean claygetinmemorydirid (const tybrowserspec * fsfolder, tybrowserdir *dirid) {
-
return (claygetfolder (fsfolder, dirid, true));
+
} /*claygetinmemorydirid*/
#endif
+boolean claygetdirid ( const tybrowserspec *fsfolder, tybrowserdir *dirid ) {
+
+ //
+ // 2006-06-23 creedon: for file browser, FSRef-ized
+ //
+
+ #if filebrowser
+
+ FSRefParam pb;
+
+ if ( ! getmacfileinfo ( fsfolder, &pb ) )
+ return ( false );
+
+ *dirid = pb.dirInfo.ioDrDirID;
+
+ return ( true );
+
+ #endif
+
+ #if odbbrowser
+
+ return ( claygetfolder ( fsfolder, dirid, false ) );
+
+ #endif
+
+ } // claygetdirid
+
+
#if filebrowser
static boolean filegetprefsspec (bigstring fname, tybrowserspec *fsprefs) {
@@ -374,24 +412,7 @@
claymakespec (vnum, dirid, fname, fsprefs);
return (true);
- } /*filegetprefsspec*/
-
-#endif
-
-#if 0 //odbbrowser
-
-static boolean xxxfilegetprefsspec (bigstring fname, tybrowserspec *fsprefs) {
- tybrowservol vnum;
- tybrowserdir dirid;
-
- vnum = databasedata; // we really should use a different record, not an fsspec
-
- dirid = internaltable;
-
- claymakespec (vnum, dirid, fname, fsprefs);
-
- return (true);
} /*filegetprefsspec*/
#endif
@@ -414,30 +435,34 @@
#if odbbrowser
static boolean filecreatefolder (tybrowserspec * fsfolder) {
-
+
tybrowserdir folderid;
- return (tablenewsystemtable ((*fsfolder).parID, (*fsfolder).name, (tybrowserdir *) &folderid));
- } /*filecreatefolder*/
+ return ( tablenewsystemtable ( ( *fsfolder ).parID, ( *fsfolder ).name, ( tybrowserdir * ) &folderid ) );
+
+ } // filecreatefolder
#endif
-boolean claygetsubitemspec (tybrowserspec *fsfolder, bigstring fname, tybrowserspec *fssubitem) {
+boolean claygetsubitemspec ( tybrowserspec *fsfolder, const Handle name, tybrowserspec *fssubitem ) {
+
+ //
+ // 2007-01-17 creedon: support for long odb item names and file paths
+ //
+ // 1993-09-20 dmb: must return false if claymakespec returns false
+ //
- /*
- dmb 9/20/93: must return false if claymakespec returns false
- */
-
tybrowserdir dirid;
if (!claygetdirid (fsfolder, &dirid))
return (false);
- return (claymakespec ((*fsfolder).vRefNum, dirid, fname, fssubitem));
- } /*claygetsubitemspec*/
+ return ( claymakespec ( ( *fsfolder ).vRefNum, dirid, name, fssubitem ) );
+
+ } // claygetsubitemspec
-boolean claygetspecialfolder (void *foldername, boolean flcreate, tybrowserspec *fsspecialfolder) {
+boolean claygetspecialfolder ( const Handle foldername, boolean flcreate, tybrowserspec *fsspecialfolder ) {
/*
a bottleneck for finding special Clay Basket folders. it actually works
@@ -449,9 +474,15 @@
the UserLand folder.
*/
+ boolean flfolder;
+
#if filebrowser
- tybrowserspec fsuserland, fsfolder;
+
+ tybrowserspec fsfolder, fsuserland;
+ clearbytes ( &fsfolder, sizeof ( fsfolder ) );
+ clearbytes ( &fsuserland, sizeof ( fsuserland ) );
+
if (!filegetprefsspec (BIGSTRING ("\x08" "UserLand"), &fsuserland))
return (false);
@@ -475,6 +506,7 @@
#endif
#if odbbrowser
+
static hdlhashtable hclaybaskettable = nil;
if (hclaybaskettable == nil) { // first time called
@@ -484,6 +516,7 @@
}
claymakespec (nil, hclaybaskettable, foldername, fsspecialfolder);
+
#endif
if (!flcreate)
@@ -493,8 +526,10 @@
return (filecreatefolder (fsspecialfolder));
return (true);
+
} /*claygetspecialfolder*/
+
#if filebrowser
void fileinfotobrowserinfo (tyfileinfo *fileinfo, tybrowserinfo *browserinfo) {
@@ -548,15 +583,6 @@
#if filebrowser
-
-typedef struct tycallbackinfo {
-
- tyclayfileloopcallback callback;
-
- long refcon;
- } tycallbackinfo;
-
-
static boolean clayfolderexpandvisit (bigstring bsitem, tyfileinfo *info, long refcon) {
tycallbackinfo *cb = (tycallbackinfo *) refcon;
@@ -570,185 +596,187 @@
return ((*(*cb).callback) (bsitem, &browserinfo, (*cb).refcon));
} /*clayfolderexpandvisit*/
-boolean clayfolderloop (const tybrowserspec *pfs, boolean flreverse, tyclayfileloopcallback filecallback, long refcon) {
-
- tycallbackinfo callbackinfo;
-
- callbackinfo.callback = filecallback;
- callbackinfo.refcon = refcon;
-
- return (folderloop (pfs, flreverse, clayfolderexpandvisit, (long) &callbackinfo));
- } /*clayfolderloop*/
-
#endif
#if odbbrowser
-typedef struct tycallbackinfo {
-
- hdldatabaserecord hdatabase;
-
- hdlhashtable hparenttable;
-
- tyclayfileloopcallback callback;
-
- long refcon;
- } tycallbackinfo;
+static boolean clayfolderloopvisit ( const Handle handleName, hdlhashnode hnode, tyvaluerecord val, ptrvoid refcon ) {
-
-static boolean clayfolderloopvisit (bigstring bsname, hdlhashnode hnode, tyvaluerec...
[truncated message content] |
|
From: <cre...@us...> - 2007-01-17 18:10:34
|
Revision: 1605
http://svn.sourceforge.net/frontierkernel/?rev=1605&view=rev
Author: creecode
Date: 2007-01-17 10:10:34 -0800 (Wed, 17 Jan 2007)
Log Message:
-----------
in ccdrawmsg function ellipsize from middle of message
formatting tweaks
Modified Paths:
--------------
Frontier/branches/Frontier_Long_File_Paths/Common/source/about.c
Modified: Frontier/branches/Frontier_Long_File_Paths/Common/source/about.c
===================================================================
--- Frontier/branches/Frontier_Long_File_Paths/Common/source/about.c 2007-01-16 19:43:18 UTC (rev 1604)
+++ Frontier/branches/Frontier_Long_File_Paths/Common/source/about.c 2007-01-17 18:10:34 UTC (rev 1605)
@@ -549,17 +549,19 @@
static boolean ccdrawmsg (void) {
- /*
- 2.1b5 dmb: don't need flbitmapactive logic; openbitmap will return
- false if one's already open.
- */
+ //
+ // 2007-01-17 creedon: support for long odb item names and file paths
+ //
+ // 2.1b5 dmb: don't need flbitmapactive logic; openbitmap will return false
+ // if one's already open.
+ //
+ register boolean flbitmap = false;
register hdlcancoonrecord hc = cancoonglobals;
- //register hdlwindowinfo hw = aboutwindowinfo;
register hdlstring hstring;
- register boolean flbitmap = false;
+
+ Rect r;
bigstring bs;
- Rect r;
if (hc == nil || aboutdata == nil)
return (false);
@@ -572,23 +574,14 @@
if (!flbitmap)
pushclip (r);
-
+
eraserect (r);
- /*
- grayframerect (r);
- */
-
hstring = (**hc).hprimarymsg;
- /*
- if (hstring == nil) /%no primary message, display file name%/
- hstring = (**hw).hfilename;
- */
-
copyheapstring (hstring, bs);
-// centerstring (r, bs);
+ ellipsizemiddle ( bs, r.right - r.left );
movepento (r.left, r.top + globalfontinfo.ascent);
@@ -924,11 +917,11 @@
popclip ();
popport ();
+
}
+
+ return (true);
-// shellpopglobals ();
-
- return (true);
} /*aboutsetmiscstring*/
@@ -991,7 +984,7 @@
goto pop;
if (flbackgroundmsg && (**hc).flbackgroundmsgblocked) {
-
+
disposehandle ((Handle) (**hc).hsecondarymsg);
(**hc).hsecondarymsg = hstring;
@@ -1372,131 +1365,136 @@
#ifndef version42orgreater
-static void drawtextitem (WindowPtr w, short item, short font, short size, short style) {
-
- Rect ritem;
- bigstring bsitem;
-
- getdialogtext ((DialogPtr) w, item, bsitem);
-
- dialoggetobjectrect ((DialogPtr) w, item, &ritem);
-
- edittextbox (bsitem, ritem, font, size, style);
-
- } /*drawtextitem*/
+ static void drawtextitem (WindowPtr w, short item, short font, short size, short style) {
+
+ Rect ritem;
+ bigstring bsitem;
+
+ getdialogtext ((DialogPtr) w, item, bsitem);
+
+ dialoggetobjectrect ((DialogPtr) w, item, &ritem);
+
+ edittextbox (bsitem, ritem, font, size, style);
+
+ } /*drawtextitem*/
-static boolean runurlscript () {
+ static boolean runurlscript () {
- bigstring bsurl;
- bigstring bsscript;
- //this is a problem. aboutwindow is a window
- getdialogtext ((DialogPtr) aboutwindow, urlitem, bsurl);
-
- if (!getsystemtablescript (idopenurlscript, bsscript))
- return (false);
-
- parsedialogstring (bsscript, bsurl, nil, nil, nil, bsscript);
-
- return (processrunstring (bsscript));
- } /*runurlscript*/
+ bigstring bsurl;
+ bigstring bsscript;
+ //this is a problem. aboutwindow is a window
+ getdialogtext ((DialogPtr) aboutwindow, urlitem, bsurl);
+
+ if (!getsystemtablescript (idopenurlscript, bsscript))
+ return (false);
+
+ parsedialogstring (bsscript, bsurl, nil, nil, nil, bsscript);
+
+ return (processrunstring (bsscript));
+
+ } /*runurlscript*/
-static void drawurlitem (boolean flpressed) {
-
- RGBColor rgb = {0, 0, 0};
-
- if (flpressed)
- rgb.red = 0xA000;
- else
- rgb.blue = 0xA000;
-
- pushforecolor (&rgb);
-
- drawtextitem (aboutwindow, urlitem, geneva, 9, underline);
-
- popforecolor ();
- } /*drawurlitem*/
+ static void drawurlitem (boolean flpressed) {
+
+ RGBColor rgb = {0, 0, 0};
+
+ if (flpressed)
+ rgb.red = 0xA000;
+ else
+ rgb.blue = 0xA000;
+
+ pushforecolor (&rgb);
+
+ drawtextitem (aboutwindow, urlitem, geneva, 9, underline);
+
+ popforecolor ();
+
+ } /*drawurlitem*/
-#define aboutresnumber 128 /*the id of the various "about" resources*/
+ #define aboutresnumber 128 /*the id of the various "about" resources*/
-static void drawabout (WindowPtr w, boolean flliveurl) {
+ static void drawabout (WindowPtr w, boolean flliveurl) {
- /*
- 10/18/91 DW: color!
-
- 10/18/91 DW: added PICT #128 to shell.\xB9.rsrc.
-
- 12/19/91 dmb: use version resource instead of buildinfo routine
- */
-
- /*draw the icon*/ {
+ /*
+ 10/18/91 DW: color!
- Rect rcicn;
+ 10/18/91 DW: added PICT #128 to shell.\xB9.rsrc.
- dialoggetobjectrect (w, iconitem, &rcicn);
+ 12/19/91 dmb: use version resource instead of buildinfo routine
+ */
- ploticon (&rcicn, aboutresnumber);
- }
-
- drawtextitem (w, userlanditem, systemFont, 12, 0);
-
- drawtextitem (w, sloganitem, helv, 9, 0);
-
- drawtextitem (w, copyrightitem, helv, 9, 0);
-
- if (flliveurl)
- drawurlitem (false);
- else
- drawtextitem (w, urlitem, helv, 9, 0);
-
- #if __powerc
-
- drawtextitem (w, nativeitem, helv, 9, 0);
-
- #else
-
- drawtextitem (w, emulateditem, helv, 9, 0);
-
- #endif
-
- /*draw the version string*/ {
-
- Rect ritem;
+ /*draw the icon*/ {
+
+ Rect rcicn;
+
+ dialoggetobjectrect (w, iconitem, &rcicn);
+
+ ploticon (&rcicn, aboutresnumber);
+ }
- bigstring bsbuildinfo;
+ drawtextitem (w, userlanditem, systemFont, 12, 0);
- filegetprogramversion (bsbuildinfo);
+ drawtextitem (w, sloganitem, helv, 9, 0);
- setfontsizestyle (geneva, 9, normal);
+ drawtextitem (w, copyrightitem, helv, 9, 0);
- dialoggetobjectrect (w, versionitem, &ritem);
+ if (flliveurl)
+ drawurlitem (false);
+ else
+ drawtextitem (w, urlitem, helv, 9, 0);
- movepento (ritem.right - stringpixels (bsbuildinfo), ritem.bottom - 6);
-
- pendrawstring (bsbuildinfo);
- }
- } /*drawabout*/
+ #if __powerc
+
+ drawtextitem (w, nativeitem, helv, 9, 0);
+
+ #else
+
+ drawtextitem (w, emulateditem, helv, 9, 0);
+
+ #endif
+
+ /*draw the version string*/ {
+
+ Rect ritem;
+
+ bigstring bsbuildinfo;
+
+ filegetprogramversion (bsbuildinfo);
+
+ setfontsizestyle (geneva, 9, normal);
+
+ dialoggetobjectrect (w, versionitem, &ritem);
+
+ movepento (ritem.right - stringpixels (bsbuildinfo), ritem.bottom - 6);
+
+ pendrawstring (bsbuildinfo);
+ }
+
+ } /*drawabout*/
-static void updateabout (WindowPtr w, boolean flliveurl) {
-
- shellupdatenow (w);
- } /*updateabout*/
+ static void updateabout (WindowPtr w, boolean flliveurl) {
+
+ shellupdatenow (w);
+
+ } /*updateabout*/
-static boolean abouteventhook (EventRecord *ev, WindowPtr w) {
-
- if (w != aboutwindow) /*don't hook if not our dialog*/
- return (true);
-
- if ((*ev).what == updateEvt)
- updateabout (w, false);
-
- return (false); /*don't process this event any further*/
- } /*abouteventhook*/
-
+ static boolean abouteventhook (EventRecord *ev, WindowPtr w) {
+
+ if (w != aboutwindow) /*don't hook if not our dialog*/
+ return (true);
+
+ if ((*ev).what == updateEvt)
+ updateabout (w, false);
+
+ return (false); /*don't process this event any further*/
+
+ } /*abouteventhook*/
+
#endif
@@ -1516,6 +1514,7 @@
}
return (true);
+
} /*aboutsave*/
@@ -1533,6 +1532,7 @@
aboutwindow = nil;
return (true);
+
} /*aboutclose*/
@@ -1547,6 +1547,7 @@
aboutport = nil;
return (true);
+
} /*aboutdisposerecord*/
@@ -1564,6 +1565,7 @@
}
return (true);
+
} /*aboutsetsuperglobals*/
@@ -1599,7 +1601,9 @@
shellpopglobals ();
detachabout ();
+
}
+
} /*aboutwindowsetup*/
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <cre...@us...> - 2007-01-16 19:43:18
|
Revision: 1604
http://svn.sourceforge.net/frontierkernel/?rev=1604&view=rev
Author: creecode
Date: 2007-01-16 11:43:18 -0800 (Tue, 16 Jan 2007)
Log Message:
-----------
formatting tweaks
Modified Paths:
--------------
Frontier/branches/Frontier_Long_File_Paths/Common/source/cancoonwindow.c
Modified: Frontier/branches/Frontier_Long_File_Paths/Common/source/cancoonwindow.c
===================================================================
--- Frontier/branches/Frontier_Long_File_Paths/Common/source/cancoonwindow.c 2007-01-16 19:41:58 UTC (rev 1603)
+++ Frontier/branches/Frontier_Long_File_Paths/Common/source/cancoonwindow.c 2007-01-16 19:43:18 UTC (rev 1604)
@@ -462,7 +462,7 @@
if (!shellfindcallbacks (idtableconfig, &ixtableconfig))
shellerrormessage (BIGSTRING ("\x24" "must initialize table before cancoon"));
-
+
*cb = globalsarray [ixtableconfig]; // start with table callbacks
loadconfigresource (idcancoonconfig, &(*cb).config);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <cre...@us...> - 2007-01-16 19:41:57
|
Revision: 1603
http://svn.sourceforge.net/frontierkernel/?rev=1603&view=rev
Author: creecode
Date: 2007-01-16 11:41:58 -0800 (Tue, 16 Jan 2007)
Log Message:
-----------
formatting tweaks
Modified Paths:
--------------
Frontier/branches/Frontier_Long_File_Paths/Common/source/cancoonverbs.c
Modified: Frontier/branches/Frontier_Long_File_Paths/Common/source/cancoonverbs.c
===================================================================
--- Frontier/branches/Frontier_Long_File_Paths/Common/source/cancoonverbs.c 2007-01-16 19:22:52 UTC (rev 1602)
+++ Frontier/branches/Frontier_Long_File_Paths/Common/source/cancoonverbs.c 2007-01-16 19:41:58 UTC (rev 1603)
@@ -148,6 +148,7 @@
shellpopglobals ();
return (setbooleanvalue (true, vreturned));
+
} /*ccmsgverb*/
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <cre...@us...> - 2007-01-16 19:22:52
|
Revision: 1602
http://svn.sourceforge.net/frontierkernel/?rev=1602&view=rev
Author: creecode
Date: 2007-01-16 11:22:52 -0800 (Tue, 16 Jan 2007)
Log Message:
-----------
support for long odb item names and file paths
formatting tweaks
Modified Paths:
--------------
Frontier/branches/Frontier_Long_File_Paths/Common/source/cancoonpopup.c
Modified: Frontier/branches/Frontier_Long_File_Paths/Common/source/cancoonpopup.c
===================================================================
--- Frontier/branches/Frontier_Long_File_Paths/Common/source/cancoonpopup.c 2007-01-16 19:17:45 UTC (rev 1601)
+++ Frontier/branches/Frontier_Long_File_Paths/Common/source/cancoonpopup.c 2007-01-16 19:22:52 UTC (rev 1602)
@@ -44,7 +44,6 @@
#include "cancooninternal.h"
-
typedef struct agentpopupinfo {
hdlmenu hagentmenu;
@@ -52,12 +51,19 @@
short checkedagentitem;
short ctagentsvisited;
+
} tyagentpopupinfo, *ptragentpopupinfo;
-static boolean ccagentpopupvisit (bigstring bsname, hdlhashnode hnode, tyvaluerecord val, ptrvoid refcon) {
-#pragma unused (hnode)
+static boolean ccagentpopupvisit ( const Handle handleName, hdlhashnode hnode, tyvaluerecord val, ptrvoid refcon ) {
+ //
+ // 2007-01-16 creedon: support for long odb item names and file paths
+ //
+
+ #pragma unused (hnode)
+
+ bigstring bsname;
hdltreenode hcode;
ptragentpopupinfo info = (ptragentpopupinfo) refcon;
@@ -72,7 +78,10 @@
if ((*info).hagentmenu == nil) /*not filling out a menu*/
return (false);
- return (!pushpopupitem ((*info).hagentmenu, bsname, true, 0)); /*terminate visit on error*/
+ texthandletostring ( handleName, bsname );
+
+ return ( ! pushpopupitem ( ( *info ).hagentmenu, bsname, true, 0 ) ); // terminate visit on error
+
} /*ccagentpopupvisit*/
@@ -89,33 +98,39 @@
info.ctagentsvisited = 0;
- if (hashsortedinversesearch (agentstable, &ccagentpopupvisit, &info))
- return (false);
+ if ( hashsortedinversesearch ( agentstable, &ccagentpopupvisit, &info ) )
+ return ( false );
*checkeditem = info.checkedagentitem;
return (true);
+
} /*ccfillagentpopup*/
-static boolean ccagentselectvisit (bigstring bsname, hdlhashnode hnode, tyvaluerecord val, ptrvoid refcon) {
+static boolean ccagentselectvisit ( Handle handleName, hdlhashnode hnode, tyvaluerecord val, ptrvoid refcon ) {
+
+ //
+ // 2007-01-16 creedon: support for long odb item names and file paths
+ //
+ // 1991-12-28 dmb: when an agent is selected and it's code isn't found,
+ // install it
+ //
+ // 1991-06-28 dmb: never toggle agent off; selecting current agent does
+ // nothing
+ //
- /*
- 6/28/91 dmb: never toggle agent off; selecting current agent does nothing
-
- 12/28/91 dmb: when an agent is selected and it's code isn't found, install it
- */
-
+ bigstring bs;
hdltreenode hcode;
- bigstring bs;
- ptragentpopupinfo info = (ptragentpopupinfo) refcon;
+ ptragentpopupinfo info = ( ptragentpopupinfo ) refcon;
- if (!langexternalvaltocode (val, &hcode)) /*not a scipt*/
+ if (!langexternalvaltocode (val, &hcode)) // not a scipt
return (false);
+
+ if (++(*info).ctagentsvisited == (*info).checkedagentitem) {
- if (++(*info).ctagentsvisited == (*info).checkedagentitem) {
+ register hdlcancoonrecord hc = cancoondata;
- register hdlcancoonrecord hc = cancoondata;
hdlprocessrecord hprocess;
/*
@@ -124,33 +139,35 @@
else
*/
- (**hc).hprimaryagent = hcode;
+ (**hc).hprimaryagent = hcode;
+
+ if ((*info).hagentmenu != nil) { // responding to a menu click
- if ((*info).hagentmenu != nil) { /*responding to a menu click*/
-
if (processfindcode (hcode, &hprocess))
copystring ((**hprocess).bsmsg, bs);
-
+
else {
-
scriptinstallagent (hnode);
copystring ((ptrstring) "\x01" " ", bs);
+
}
+
+ ccmsg (bs, false); // update existing message
- ccmsg (bs, false); /*update existing message*/
+ ccmsg (zerostring, false); // unblock agents
- ccmsg (zerostring, false); /*unblock agents*/
-
if (keyboardstatus.floptionkey || optionkeydown ())
- langexternalzoom (val, agentstable, bsname);
+ langexternalzoom ( val, agentstable, &handleName );
}
+
+ return (true); // we're done, stop visiting
- return (true); /*we're done, stop visiting*/
}
+
+ return (false); // keep visiting
- return (false); /*keep visiting*/
- } /*ccagentselectvisit*/
+ } // ccagentselectvisit
static boolean ccagentpopupselect (hdlmenu hmenu, short itemselected) {
@@ -197,6 +214,7 @@
boolean ccgetprimaryagent (short *ixagent) {
return (ccfillagentpopup (nil, ixagent));
+
} /*ccgetprimaryagent*/
@@ -207,6 +225,7 @@
ixagent = 1;
return (ccagentpopupselect (nil, ixagent));
+
} /*ccsetprimaryagent*/
@@ -221,8 +240,6 @@
}
return (true);
+
} /*cccodereplaced*/
-
-
-
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <cre...@us...> - 2007-01-16 19:17:44
|
Revision: 1601
http://svn.sourceforge.net/frontierkernel/?rev=1601&view=rev
Author: creecode
Date: 2007-01-16 11:17:45 -0800 (Tue, 16 Jan 2007)
Log Message:
-----------
cancoonversionnumber bumped to 0x04
support for long odb item names and file paths
formatting tweaks
Modified Paths:
--------------
Frontier/branches/Frontier_Long_File_Paths/Common/headers/cancooninternal.h
Modified: Frontier/branches/Frontier_Long_File_Paths/Common/headers/cancooninternal.h
===================================================================
--- Frontier/branches/Frontier_Long_File_Paths/Common/headers/cancooninternal.h 2007-01-16 19:16:21 UTC (rev 1600)
+++ Frontier/branches/Frontier_Long_File_Paths/Common/headers/cancooninternal.h 2007-01-16 19:17:45 UTC (rev 1601)
@@ -35,7 +35,7 @@
#endif
-#define cancoonversionnumber 0x03
+#define cancoonversionnumber 0x04
typedef struct tyversion1cancoonrecord {
@@ -74,8 +74,10 @@
short ixprimaryagent;
short waste [28]; /*room to grow*/
+
} tyversion2cancoonrecord;
+
#ifdef MACVERSION
#define flflagdisabled_mask 0x8000 /*hide the flag?*/
#define flpopupdisabled_mask 0x4000 /*hide the agents popup menu?*/
@@ -157,8 +159,11 @@
extern boolean cceditmenubar (boolean);
-extern boolean ccagentpopuphit (Rect, Point); /*cancoonpopup.c*/
+#pragma mark === cancoonpopup.c ===
+
+extern boolean ccagentpopuphit (Rect, Point);
+
extern void ccupdateagentpopup (Rect);
extern boolean ccgetprimaryagent (short *);
@@ -168,11 +173,15 @@
extern boolean cccodereplaced (hdltreenode, hdltreenode);
-extern boolean ccinitverbs (void); /*cancoonverbs.c*/
+#pragma mark === cancoonverbs.c ===
+extern boolean ccinitverbs (void);
-extern void ccwindowsetup (boolean, boolean); /*cancoonwindow.c*/
+#pragma mark === cancoonwindow.c ===
+
+extern void ccwindowsetup (boolean, boolean);
+
extern boolean cchelpcommand (void);
extern boolean cctoggleflag (void);
@@ -185,5 +194,3 @@
extern boolean ccwindowstart (void);
-
-
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <cre...@us...> - 2007-01-16 19:16:22
|
Revision: 1600
http://svn.sourceforge.net/frontierkernel/?rev=1600&view=rev
Author: creecode
Date: 2007-01-16 11:16:21 -0800 (Tue, 16 Jan 2007)
Log Message:
-----------
support for long odb item names and file paths
formatting tweaks
Modified Paths:
--------------
Frontier/branches/Frontier_Long_File_Paths/Common/source/cancoon.c
Modified: Frontier/branches/Frontier_Long_File_Paths/Common/source/cancoon.c
===================================================================
--- Frontier/branches/Frontier_Long_File_Paths/Common/source/cancoon.c 2007-01-16 18:41:14 UTC (rev 1599)
+++ Frontier/branches/Frontier_Long_File_Paths/Common/source/cancoon.c 2007-01-16 19:16:21 UTC (rev 1600)
@@ -505,8 +505,9 @@
create the standard global tables
*/
- register hdlcancoonrecord hc = hcancoon;
- register boolean fl;
+ /* register */ hdlcancoonrecord hc = hcancoon;
+ /* register */ boolean fl;
+
Handle hvariable;
hdlhashtable htable;
@@ -523,6 +524,7 @@
assert (tablevalidate (htable, true));
fl = settablestructureglobals (hvariable, flcreate) || !flcreate;
+
}
fldisablesymbolcallbacks = false;
@@ -570,28 +572,31 @@
} /*clearcancoonglobals*/
-static boolean loadversion2cancoonfile (dbaddress adr, hdlcancoonrecord hcancoon, boolean flhavehost) {
+static boolean loadversion2cancoonfile ( dbaddress adr, hdlcancoonrecord hcancoon, boolean flhavehost ) {
- /*
- 5.0d14 dmb: bumped cancoonversionnumber; hscriptstring is now a text handle,
- not a string handle. (no 255 char limit)
+ //
+ // 2007-01-16 creedon: support for long odb item names and file paths
+ //
+ // 5.0a2 dmb: install the menubar if the database hasn't been upgraded
+ //
+ // 5.0d18 dmb: have to ccwindowsetup _after_ loading system table now
+ //
+ // 5.0d14 dmb: bumped cancoonversionnumber; hscriptstring is now a text
+ // handle, not a string handle. (no 255 char limit)
+ //
+ // 2002-11-11 AR: Added additional asserts to make sure the C compiler
+ // chose the proper byte alignment for the
+ // tycancoonwindowinfo and tyversion2cancoonrecord struct.
+ // If it did not, we would end up corrupting any database
+ // files we saved.
+ //
- 5.0d18 dmb: have to ccwindowsetup _after_ loading system table now
-
- 5.0a2 dmb: install the menubar if the database hasn't been upgraded
-
- 2002-11-11 AR: Added additional asserts to make sure the C compiler chose the
- proper byte alignment for the tycancoonwindowinfo and tyversion2cancoonrecord
- struct. If it did not, we would end up corrupting any database files we saved.
- */
-
+ boolean flguest, frontier4root, frontier5root;
+ hdlmenurecord hmenurecord = nil;
+ hdlstring hstring;
register hdlcancoonrecord hc;
+ short i;
tyversion2cancoonrecord info;
- short i;
- hdlmenurecord hmenurecord = nil;
- hdlstring hstring;
- boolean flguest;
- boolean frontier4root;
assert (sizeof (tycancoonwindowinfo) == 62); /* one padding byte after fontname which is 33 bytes long */
@@ -625,9 +630,8 @@
(**hc).windowinfo [i] = windowinfo;
} /*for*/
- /*cancooninitwindowinfo (hc, ixunused2);*/
-
frontier4root = info.versionnumber < 3;
+ frontier5root = info.versionnumber == 3;
if (frontier4root) {
@@ -640,11 +644,23 @@
dbrefheapstring (info.adrscriptstring, &hstring);
- pullfromhandle ((Handle) hstring, 0, 1, nil); // pluck out the length byte
+ pullfromhandle ((Handle) hstring, 0L, 1L, nil); // pluck out the length byte
+
}
else
dbrefhandle (info.adrscriptstring, (Handle *) &hstring);
+ if ( frontier5root ) {
+
+ bigstring bsprompt;
+
+ shellgetstring ( openolddatabasestring, bsprompt );
+
+ if ( twowaydialog ( bsprompt, BIGSTRING ( "\x06" "Cancel" ), BIGSTRING ( "\x07" "Convert" ) ) )
+ return ( false );
+
+ }
+
(**hc).hscriptstring = (Handle) hstring;
(**hc).flflagdisabled = (info.flags & flflagdisabled_mask) != 0;
@@ -679,9 +695,19 @@
if (frontier4root) {
- if (resourcestable != nil)
- if (menugetmenubar (resourcestable, namemenubar, false, &hmenurecord))
+ if (resourcestable != nil) {
+
+ Handle h;
+
+ if ( ! newtexthandle ( namemenubar, &h ) )
+ return ( false );
+
+ if ( menugetmenubar ( resourcestable, h, false, &hmenurecord ) )
ccinstallmenubar (hc, hmenurecord); /*ignore error*/
+
+ disposehandle ( h );
+
+ } // if
}
if (ccinstalltablestructure (flhavehost))
@@ -693,6 +719,7 @@
(**hc).flguestroot = flguest;
return (true);
+
} /*loadversion2cancoonfile*/
@@ -754,17 +781,20 @@
#endif
boolean ccloadfile (hdlfilenum fnum, short rnum) {
-#pragma unused(rnum)
- /*
- 9/15/92 dmb: removed support for version1 format; it never shipped
-
- 6.1fc2 AR: Don't link cancoondata into (**cancoonwindowinfo).hdata.
- This would crash some installations during the initialization
- of the serial number dialog.
- hdata should be a hdltableformats anyway.
- */
+ #pragma unused(rnum)
+ //
+ // 2007-01-16 creedon: support for long odb item names and file paths
+ //
+ // 6.1fc2 AR: Don't link cancoondata into (**cancoonwindowinfo).hdata.
+ // This would crash some installations during the initialization
+ // of the serial number dialog. hdata should be a
+ // hdltableformats anyway.
+ //
+ // 1992-09-15 dmb: removed support for version1 format; it never shipped
+ //
+
register hdlcancoonrecord hc = nil;
dbaddress adr;
short versionnumber;
@@ -816,8 +846,10 @@
*/
case 2:
+ case 3:
case cancoonversionnumber:
- if (!loadversion2cancoonfile (adr, hc, flhavehost))
+
+ if ( ! loadversion2cancoonfile ( adr, hc, flhavehost ) )
goto error;
if ((**hc).flguestroot)
@@ -855,9 +887,12 @@
boolean ccloadspecialfile (ptrfilespec fspec, OSType filetype) {
-#pragma unused (filetype)
+ #pragma unused (filetype)
+
//
+ // 2007-01-16 creedon: support for long odb item names and file paths
+ //
// 2006-06-23 creedon: replace fsname macro with getfsfile function;
//
// 2.1b3 dmb: only set finder2front to true if the sender of the 'odoc' event was the Finder
@@ -866,8 +901,8 @@
// Frontier.finder2click always set it to true. also, handle updates now.
//
- bigstring bspath;
- bigstring bs;
+ Handle handlePath;
+ bigstring bs, bspath;
ptrbyte pbool;
if (!shellsetsuperglobals ()) {
@@ -879,11 +914,12 @@
shellerrormessage (bs);
return (false);
+
}
}
+
+ if ( ! filespectopath ( fspec, &handlePath ) ) {
- if (!filespectopath (fspec, bspath)) {
-
bigstring bs;
getfsfile ( fspec, bs );
@@ -891,132 +927,142 @@
filenotfounderror ( bs );
return (false);
+
}
+
+ texthandletostring ( handlePath, bspath );
langdeparsestring (bspath, chclosecurlyquote); // add needed escape sequences
if (getsystemtablescript (idfinder2frontscript, bs)) { // frontier.findertofront=^0
#ifdef MACVERSION
+
if ((shellevent.what == kHighLevelEvent) && ((**landgetglobals ()).maceventsender == 'MACS'))
pbool = bstrue;
else
+
#endif
pbool = bsfalse;
parsedialogstring (bs, pbool, nil, nil, nil, bs);
langrunstringnoerror (bs, bs);
+
}
if (!getsystemtablescript (idfinder2clickscript, bs)) // frontier.finder2click ("^0")
return (false);
-
+
parsedialogstring (bs, bspath, nil, nil, nil, bs);
shellpartialeventloop (updateMask); // handle updates first
return (processrunstring (bs));
+
} // ccloadspecialfile
boolean ccsavespecialfile (ptrfilespec fs, hdlfilenum fnum, short rnum, boolean flsaveas, boolean flrunnable) {
-#pragma unused(flsaveas, rnum)
- /*
- 6.17.97 dmb: this is called by opverbs, wpverbs, etc. to save a disk file.
- we leave it to the system.misc.saveWindow script to package the data,
- but we take care of writing it. (our caller did the file creation.)
+ #pragma unused(flsaveas, rnum)
- note: if we decide to make this more open architecture, we could add
- another flat for the config record that would prevent the shell from
- opening the data fork for us. then, we'd need to make this callback
- take the destination filespec as a parameter too, and the saveWindow script
- would take both the window name and the filespec (which would be the same
- for a normal save).
+ //
+ // 2007-01-16 creedon: support for long odb item names and file paths
+ //
+ // 5.0.2b8 dmb: don't unregister the window until we're about to set the
+ // new path
+ // 5.0.2b6 dmb: error checking on openfile
+ //
+ // 1997-06-17 dmb: this is called by opverbs, wpverbs, etc. to save a disk
+ // file. we leave it to the system.misc.saveWindow script
+ // to package the data, but we take care of writing it.
+ // (our caller did the file creation.)
+ //
+ // note: if we decide to make this more open architecture,
+ // we could add another flat for the config record that
+ // would prevent the shell from opening the data fork for
+ // us. then, we'd need to make this callback take the
+ // destination filespec as a parameter too, and the
+ // saveWindow script would take both the window name and
+ // the filespec (which would be the same for a normal
+ // save).
+ //
+ //
- 5.0.2b6 dmb: error checking on openfile
-
- 5.0.2b8 dmb: don't unregister the window until we're about to set the new path
- */
-
- bigstring bs, bspath;
- ptrstring bsrunnable;
- tyvaluerecord val;
- Handle hscript;
+ Handle hPath, hscript;
+ bigstring bs, bsPath;
boolean fl = false;
boolean flopenedfile = false;
hdlexternalvariable hv;
+ ptrstring bsrunnable;
+ tyvaluerecord val;
(*shellglobals.getvariableroutine) ((Handle *) &hv);
-// if (hv != nil)
-// langexternalunregisterwindow (shellwindowinfo);
-
- if (!windowgetpath (shellwindow, bspath))
- shellgetwindowtitle (shellwindowinfo, bspath);
-
- langdeparsestring (bspath, chclosecurlyquote); /*add needed escape sequences*/
+ if ( ! windowgetpath ( shellwindow, &hPath ) )
+ shellgetwindowtitle ( shellwindowinfo, &hPath );
+
+ langDeparseTextHandle ( hPath, chclosecurlyquote ); // add needed escape sequences
- if (!getsystemtablescript (idsavewindowscript, bs)) /*system.misc.saveWindow ("^0","^1")*/
- return (false);
+ if ( ! getsystemtablescript ( idsavewindowscript, bs ) ) // system.misc.saveWindow ("^0","^1")
+ return ( false );
+
+ bsrunnable = ( flrunnable ? bstrue : bsfalse );
- bsrunnable = (flrunnable? bstrue : bsfalse);
-
- parsedialogstring (bs, bspath, bsrunnable, nil, nil, bs);
+ texthandletostring ( hPath, bsPath );
- if (!newtexthandle (bs, &hscript))
- return (false);
+ parsedialogstring ( bs, bsPath, bsrunnable, nil, nil, bs );
- pushprocess (nil);
+ if ( ! newtexthandle ( bs, &hscript ) )
+ return ( false );
+
+ pushprocess ( nil );
- fl = langrun (hscript, &val);
+ fl = langrun ( hscript, &val );
- popprocess ();
+ popprocess ( );
- if (!fl)
- return (false);
+ if ( !fl )
+ return ( false );
+
+ pushhashtable ( roottable ); // need temp stack services
- pushhashtable (roottable); /*need temp stack services*/
+ pushvalueontmpstack ( &val );
- pushvalueontmpstack (&val);
+ if ( coercetostring ( &val ) ) {
- if (coercetostring (&val)) {
+ if ( fnum == 0 ) {
- if (fnum == 0) {
-
- fl = openfile (fs, &fnum, false);
+ fl = openfile ( fs, &fnum, false );
flopenedfile = fl;
+
}
+
+ if ( fl )
+ fl = fileseteof ( fnum, 0 ) && filesetposition ( fnum, 0 ) && filewritehandle ( fnum, val.data.stringvalue );
+
+ if ( flopenedfile )
+ closefile ( fnum );
+ }
- if (fl)
- fl =
- fileseteof (fnum, 0) &&
-
- filesetposition (fnum, 0) &&
-
- filewritehandle (fnum, val.data.stringvalue);
-
- if (flopenedfile)
- closefile (fnum);
- }
+ cleartmpstack ( );
- cleartmpstack ();
+ pophashtable ( );
- pophashtable ();
+ if ( hv != nil )
+ langexternalunregisterwindow ( shellwindowinfo );
+
+ if ( fl )
+ windowsetfspec ( shellwindow, fs );
+
+ if ( hv != nil )
+ langexternalregisterwindow ( hv );
+
+ return ( fl );
- if (hv != nil)
- langexternalunregisterwindow (shellwindowinfo);
-
- if (fl)
- windowsetfspec (shellwindow, fs);
-
- if (hv != nil)
- langexternalregisterwindow (hv);
-
- return (fl);
- } /*ccsavespecialfile*/
+ } // ccsavespecialfile
boolean ccnewrecord (void) {
@@ -1746,58 +1792,77 @@
} /*ccchecktablestructureglobals*/
-static boolean ccsymbolchanged (hdlhashtable htable, const bigstring bsname, hdlhashnode hnode, boolean flvalue) {
+static boolean ccsymbolchanged (hdlhashtable htable, const Handle handleName, hdlhashnode hnode, boolean flvalue) {
+
+ //
+ // used as a callback routine. the value of the indicated variable has
+ // changed. if the cell is being displayed, update the display of it.
+ // this is how the real-time changing of variables is implemented.
+ //
+ // 2007-01-16 creedon: support for long odb item names and file paths
+ //
+ // 2001-11-14 dmb: also call new langexternalsymbolchanged. we should
+ // really create a new callback so we don't have to call
+ // them explicitly here
+ //
+ // 1991-02-28 dmb: also call ccchecktablestructureglobals to make sure our
+ // globals are up to date
+ //
- /*
- used as a callback routine. the value of the indicated variable has changed.
- if the cell is being displayed, update the display of it. this is how the
- real-time changing of variables is implemented.
-
- 2/28/91 dmb: also call ccchecktablestructureglobals to make sure our
- globals are up to date
-
- 11/14/01 dmb: also call new langexternalsymbolchanged. we should really create
- a new callback so we don't have to call them explicitly here
- */
-
if (!ccchecktablestructureglobals (htable))
return (false);
- langipcsymbolchanged (htable, bsname, flvalue);
+ langipcsymbolchanged (htable, handleName, flvalue);
- langexternalsymbolchanged (htable, bsname, hnode, flvalue);
+ langexternalsymbolchanged (htable, handleName, hnode, flvalue);
- return (tablesymbolchanged (htable, bsname, hnode, flvalue));
+ return (tablesymbolchanged (htable, handleName, hnode, flvalue));
+
} /*ccsymbolchanged*/
-static boolean ccsymbolinserted (hdlhashtable htable, const bigstring bsname, hdlhashnode hnode) {
+static boolean ccsymbolinserted (hdlhashtable htable, const Handle handleName, hdlhashnode hnode) {
+
+ //
+ // 2007-01-16 creedon: support for long odb item names and file paths
+ //
if (!ccchecktablestructureglobals (htable))
return (false);
- langipcsymbolinserted (htable, bsname);
+ langipcsymbolinserted (htable, handleName);
- langexternalsymbolinserted (htable, bsname, hnode);
+ langexternalsymbolinserted (htable, handleName, hnode);
- return (tablesymbolinserted (htable, bsname));
- } /*ccsymbolinserted*/
+ return (tablesymbolinserted (htable, handleName));
+
+ } // ccsymbolinserted
-static boolean ccsymboldeleted (hdlhashtable htable, const bigstring bsname) {
+static boolean ccsymboldeleted ( hdlhashtable htable, const Handle handleName ) {
+
+ boolean fl;
- if (!ccchecktablestructureglobals (htable))
- return (false);
+ if ( ! ccchecktablestructureglobals ( htable ) )
+ return ( false );
- langipcsymboldeleted (htable, (ptrstring) bsname);
+ langipcsymboldeleted ( htable, handleName );
- return (tablesymboldeleted (htable, bsname));
- } /*ccsymboldeleted*/
+ fl = tablesymboldeleted ( htable, handleName );
+ return ( fl );
+
+ } // ccsymboldeleted
+
static short cccomparenodes (hdlhashtable htable, hdlhashnode hnode1, hdlhashnode hnode2) {
+
+ //
+ // 2007-01-16 creedon: support for long odb item names and file paths
+ //
return (tablecomparenodes (htable, hnode1, hnode2));
+
} /*cccomparenodes*/
@@ -1831,13 +1896,14 @@
if (hc != cancoonglobals)
setcancoonglobals (hc);
+
+ return (true);
- return (true);
} /*ccrestoreglobals*/
static boolean ccpartialeventloop (short desiredevents) {
-
+
/*
3/23/93 dmb: don't use ccsave/restoreglobals, 'cause we don't want to restore
nil globals (in case we're being called at an odd time, like from an error
@@ -1855,11 +1921,12 @@
setcancoonglobals (hc);
return (fl);
+
} /*ccpartialeventloop*/
boolean ccstart (void) {
-
+
/*
set up callback routines record, and link our data into the shell's
data structure.
@@ -1884,8 +1951,6 @@
shellpushmenuhook (&ccmenuroutine);
return (ccwindowstart ());
+
} /*ccstart*/
-
-
-
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <cre...@us...> - 2007-01-16 18:41:43
|
Revision: 1599
http://svn.sourceforge.net/frontierkernel/?rev=1599&view=rev
Author: creecode
Date: 2007-01-16 10:41:14 -0800 (Tue, 16 Jan 2007)
Log Message:
-----------
formatting tweaks
Modified Paths:
--------------
Frontier/branches/Frontier_Long_File_Paths/Common/headers/cancoon.h
Modified: Frontier/branches/Frontier_Long_File_Paths/Common/headers/cancoon.h
===================================================================
--- Frontier/branches/Frontier_Long_File_Paths/Common/headers/cancoon.h 2007-01-16 18:38:32 UTC (rev 1598)
+++ Frontier/branches/Frontier_Long_File_Paths/Common/headers/cancoon.h 2007-01-16 18:41:14 UTC (rev 1599)
@@ -138,6 +138,7 @@
boolean flpopupdisabled; /*hide the agents popup menu?*/
#endif
+
} tycancoonrecord, *ptrcancoonrecord, **hdlcancoonrecord;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <cre...@us...> - 2007-01-16 18:39:21
|
Revision: 1598
http://svn.sourceforge.net/frontierkernel/?rev=1598&view=rev
Author: creecode
Date: 2007-01-16 10:38:32 -0800 (Tue, 16 Jan 2007)
Log Message:
-----------
formatting tweaks
Modified Paths:
--------------
Frontier/branches/Frontier_Long_File_Paths/Common/source/about.c
Modified: Frontier/branches/Frontier_Long_File_Paths/Common/source/about.c
===================================================================
--- Frontier/branches/Frontier_Long_File_Paths/Common/source/about.c 2006-11-18 19:07:07 UTC (rev 1597)
+++ Frontier/branches/Frontier_Long_File_Paths/Common/source/about.c 2007-01-16 18:38:32 UTC (rev 1598)
@@ -241,6 +241,7 @@
Handle hdata;
return (shellfindwindow (idaboutconfig, &w, hinfo, &hdata));
+
} /*findaboutwindow*/
@@ -407,6 +408,7 @@
}
pendrawstring (bs);
+
} /*ccdrawmainwindowtext*/
@@ -418,6 +420,7 @@
pushstyle (geneva, 9, normal);
else
pushstyle ((**hw).defaultfont, (**hw).defaultsize, (**hw).defaultstyle);
+
} /*pushaboutstyle*/
@@ -599,6 +602,7 @@
popclip ();
return (true);
+
} /*ccdrawmsg*/
@@ -609,6 +613,7 @@
parsedialogstring (aboutstrings [item], param, nil, nil, nil, bsitem);
ccdrawmainwindowtext (item, style, bsitem, just);
+
} /*ccdrawtextitem*/
@@ -720,10 +725,10 @@
} /*ccupdatestatistics*/
-static void ccdrawabout (void) {
+static void ccdrawabout (void) {
/*
- 5.0b9 dmb: user Arial, but just for the frontier(tm) item
+ 5.0b9 dmb: use Arial, but just for the frontier(tm) item
*/
Rect rabout = (**aboutdata).aboutarea;
@@ -764,6 +769,7 @@
rabout.bottom = rabout.top + abouticonsize;
ccdrawfrontiericon (rabout, false);
+
}
ccdrawtextitem (copyright2item, nil, normal, leftjustified);
@@ -828,8 +834,10 @@
(**hc).hsecondarymsg = nil;
ccdrawmsg ();
+
}
}
+
} /*ccunblockmsg*/
@@ -925,7 +933,7 @@
boolean ccmsg (bigstring bs, boolean flbackgroundmsg) {
-
+
/*
can be called from a script, not as part of a callback sequence.
@@ -939,13 +947,14 @@
*/
register hdlcancoonrecord hc = cancoonglobals;
+
boolean fl = false;
+ hdlstring hstring;
hdlwindowinfo hinfo;
- hdlstring hstring;
if (hc == nil)
return (false);
-
+
if (!findaboutwindow (&hinfo) || !shellpushglobals ((**hinfo).macwindow))
hinfo = nil;
@@ -954,10 +963,11 @@
ccunblockmsg ();
goto pop;
+
}
+
+ if (flbackgroundmsg) {
- if (flbackgroundmsg) {
-
/*
coming from an agent. record the message text in the process record, so
we can use the popup to switch between the last message left by any agent.
@@ -970,16 +980,16 @@
if (hp == nil) /*only agents are allowed to send background messages!*/
goto pop;
-
+
copystring (bs, (**hp).bsmsg); /*store in process record*/
if (/*(hcode != nil) &&*/ ((**hp).hcode != hcode))
goto pop;
}
-
+
if (!newheapstring (bs, &hstring))
goto pop;
-
+
if (flbackgroundmsg && (**hc).flbackgroundmsgblocked) {
disposehandle ((Handle) (**hc).hsecondarymsg);
@@ -987,27 +997,28 @@
(**hc).hsecondarymsg = hstring;
goto pop;
+
}
-
+
disposehandle ((Handle) (**hc).hprimarymsg);
(**hc).hprimarymsg = hstring;
if (hinfo != nil)
fl = ccdrawmsg ();
-
+
if (!flbackgroundmsg)
(**hc).flbackgroundmsgblocked = true;
-
+
pop:
-
- if (hinfo != nil)
- shellpopglobals ();
+ if (hinfo != nil)
+ shellpopglobals ();
+
+ return (fl);
- return (fl);
} /*ccmsg*/
-
+
static void aboutupdate (void) {
/*
@@ -1080,7 +1091,9 @@
ccdrawagentpopup ();
ccdrawmsg ();
+
}
+
} /*aboutupdate*/
@@ -1131,6 +1144,7 @@
(**aboutdata).aboutarea = rabout;
return (true);
+
} /*aboutresetrects*/
@@ -1146,11 +1160,13 @@
(**aboutwindowinfo).parentwindow = nil;
return (false);
+
}
(**aboutwindowinfo).parentwindow = hroot;
return (true);
+
} /*attachabout*/
@@ -1366,6 +1382,7 @@
dialoggetobjectrect ((DialogPtr) w, item, &ritem);
edittextbox (bsitem, ritem, font, size, style);
+
} /*drawtextitem*/
@@ -1676,9 +1693,11 @@
shellbringtofront (hinfo);
return (true);
+
}
return (newaboutwindow (false));
+
} /*aboutcommand*/
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <cre...@us...> - 2006-11-18 19:07:09
|
Revision: 1597
http://svn.sourceforge.net/frontierkernel/?rev=1597&view=rev
Author: creecode
Date: 2006-11-18 11:07:07 -0800 (Sat, 18 Nov 2006)
Log Message:
-----------
Creating branch to support long file paths.
Added Paths:
-----------
Frontier/branches/Frontier_Long_File_Paths/
Copied: Frontier/branches/Frontier_Long_File_Paths (from rev 1596, Frontier/trunk)
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <cre...@us...> - 2006-11-17 22:30:29
|
Revision: 1596
http://svn.sourceforge.net/frontierkernel/?rev=1596&view=rev
Author: creecode
Date: 2006-11-17 14:30:27 -0800 (Fri, 17 Nov 2006)
Log Message:
-----------
added
Added Paths:
-----------
ODBs/trunk/mainResponderWebsitesRoot/sampleMrWs/23images.fvc
Added: ODBs/trunk/mainResponderWebsitesRoot/sampleMrWs/23images.fvc
===================================================================
--- ODBs/trunk/mainResponderWebsitesRoot/sampleMrWs/23images.fvc (rev 0)
+++ ODBs/trunk/mainResponderWebsitesRoot/sampleMrWs/23images.fvc 2006-11-17 22:30:27 UTC (rev 1596)
@@ -0,0 +1,5 @@
+FrontierVcsFile:3:tabl:sampleMrWs.["#images"]
+
+
+
+
Property changes on: ODBs/trunk/mainResponderWebsitesRoot/sampleMrWs/23images.fvc
___________________________________________________________________
Name: svn:eol-style
+ native
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <cre...@us...> - 2006-11-17 18:21:25
|
Revision: 1595
http://svn.sourceforge.net/frontierkernel/?rev=1595&view=rev
Author: creecode
Date: 2006-11-17 10:21:24 -0800 (Fri, 17 Nov 2006)
Log Message:
-----------
in shellhandlemenu function, in editmenu case, removed non carbon code, no functional change
Modified Paths:
--------------
Frontier/trunk/Common/source/shellmenu.c
Modified: Frontier/trunk/Common/source/shellmenu.c
===================================================================
--- Frontier/trunk/Common/source/shellmenu.c 2006-11-16 22:15:14 UTC (rev 1594)
+++ Frontier/trunk/Common/source/shellmenu.c 2006-11-17 18:21:24 UTC (rev 1595)
@@ -1711,33 +1711,27 @@
}
case editmenu:
- #if MACVERSION
+
+ #ifdef MACVERSION
- if (iditem <= clearitem) { /*standard edit menu command*/
- //Code change by Timothy Paustian Friday, June 16, 2000 3:02:01 PM
- //Changed to Opaque call for Carbon
- //we don't need this for carbon.
- #if !TARGET_API_MAC_CARBON
- if (SystemEdit (iditem - 1)) /*consumed by desk accessory*/
- break;
- #endif
-
- if (uisEdit (iditem - 1)) /*consumed by shared window*/
- break;
- }
-
- #endif
+ if ( iditem <= clearitem ) // standard edit menu command
+
+ if ( uisEdit ( iditem - 1 ) ) // consumed by shared window
+ break;
+
+ #endif // MACVERSION
- if (iditem <= selectallitem) {
+ if ( iditem <= selectallitem ) {
- shelleditcommand ((tyeditcommand) (iditem - undoitem));
+ shelleditcommand ( ( tyeditcommand ) ( iditem - undoitem ) );
break;
+
}
- runeditmenuscript (editmenu, iditem); /*7.0b27 PBS */
+ runeditmenuscript ( editmenu, iditem ); // 7.0b27 PBS
- break; /*edit menu*/
+ break; // edit menu
case fontmenu: {
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <cre...@us...> - 2006-11-16 22:15:22
|
Revision: 1594
http://svn.sourceforge.net/frontierkernel/?rev=1594&view=rev
Author: creecode
Date: 2006-11-16 14:15:14 -0800 (Thu, 16 Nov 2006)
Log Message:
-----------
in getjpegheightwidthverb function, added call to extendfilespec
Modified Paths:
--------------
Frontier/trunk/Common/source/langhtml.c
Modified: Frontier/trunk/Common/source/langhtml.c
===================================================================
--- Frontier/trunk/Common/source/langhtml.c 2006-11-11 18:46:11 UTC (rev 1593)
+++ Frontier/trunk/Common/source/langhtml.c 2006-11-16 22:15:14 UTC (rev 1594)
@@ -3185,55 +3185,71 @@
} /*ScanJPEGHeader*/
-boolean getjpegheightwidthverb (hdltreenode hparam1, tyvaluerecord *vreturned) {
+boolean getjpegheightwidthverb ( hdltreenode hparam1, tyvaluerecord *vreturned ) {
+ //
+ // 2006-11-16 creedon: added call to extendfilespec
+ //
+
+ boolean fl;
+ hdlfilenum fnum;
+ hdllistrecord list = nil;
tyfilespec fs;
- hdlfilenum fnum;
- boolean fl;
unsigned short height, width;
- hdllistrecord list = nil;
flnextparamislast = true;
- if (!getfilespecvalue (hparam1, 1, &fs))
- return (false);
+ if ( ! getfilespecvalue ( hparam1, 1, &fs ) )
+ return ( false );
+
+ ( void ) extendfilespec ( &fs, &fs );
- fl = openfile (&fs, &fnum, true);
+ fl = openfile ( &fs, &fnum, true );
- if (fl) {
+ if ( fl ) {
- fl = ScanJPEGHeader (fnum, &height, &width);
+ fl = ScanJPEGHeader ( fnum, &height, &width );
- closefile (fnum);
+ closefile ( fnum );
- if (fl) {
+ if ( fl ) {
+
#ifdef xxxoplanglists
- if (opnewlist (&list, false)) {
- if (langpushlistlong (list, (long) height)) {
- if (langpushlistlong (list, (long) width)) {
- return (setheapvalue ((Handle) list, listvaluetype, vreturned));
- }
+
+ if ( opnewlist ( &list, false ) ) {
+
+ if ( langpushlistlong ( list, ( long ) height ) ) {
+
+ if ( langpushlistlong ( list, ( long ) width ) )
+
+ return ( setheapvalue ( ( Handle ) list, listvaluetype, vreturned ) );
+
}
}
#else
Point pt;
+
pt.v = width;
pt.h = height;
- return (setpointvalue (pt, vreturned) && coercetolist (vreturned, listvaluetype));
+
+ return ( setpointvalue ( pt, vreturned ) && coercetolist ( vreturned, listvaluetype ) );
+
#endif
+
}
}
- if (list != nil)
- opdisposelist (list);
+ if ( list != nil )
+ opdisposelist ( list );
- /* JES: 10/28/2002, 9.1b1 -- ScriptError if the file couldn't be parsed for JPEG height/width instead of a silent failure */
- if (!fl) {
- langerrormessage (BIGSTRING ("\x49""Can't get JPEG height and width because the file isn't a valid JPEG file."));
- }
- return (false);
- } /*getjpegheightwidthverb*/
+ if ( ! fl ) // JES: 10/28/2002, 9.1b1 -- ScriptError if the file couldn't be parsed for JPEG height/width instead of a silent failure
+
+ langerrormessage ( BIGSTRING ( "\x49""Can't get JPEG height and width because the file isn't a valid JPEG file." ) );
+
+ return ( false );
+
+ } // getjpegheightwidthverb
#ifdef MACVERSION
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|