|
From: <cre...@us...> - 2007-02-27 04:38:07
|
Revision: 1634
http://svn.sourceforge.net/frontierkernel/?rev=1634&view=rev
Author: creecode
Date: 2007-02-26 20:38:00 -0800 (Mon, 26 Feb 2007)
Log Message:
-----------
formatting tweaks
Modified Paths:
--------------
Frontier/branches/Frontier_Long_File_Paths/Common/headers/opxml.h
Frontier/branches/Frontier_Long_File_Paths/Common/headers/osincludes.h
Frontier/branches/Frontier_Long_File_Paths/Common/headers/popup.h
Frontier/branches/Frontier_Long_File_Paths/Common/source/miniwindow.c
Frontier/branches/Frontier_Long_File_Paths/Common/source/op.c
Frontier/branches/Frontier_Long_File_Paths/Common/source/opinit.c
Frontier/branches/Frontier_Long_File_Paths/Common/source/oplist.c
Frontier/branches/Frontier_Long_File_Paths/Common/source/oppack.c
Frontier/branches/Frontier_Long_File_Paths/Common/source/opstructure.c
Frontier/branches/Frontier_Long_File_Paths/Common/source/opvisit.c
Frontier/branches/Frontier_Long_File_Paths/Common/source/osadroplet.c
Frontier/branches/Frontier_Long_File_Paths/Common/source/popup.c
Modified: Frontier/branches/Frontier_Long_File_Paths/Common/headers/opxml.h
===================================================================
--- Frontier/branches/Frontier_Long_File_Paths/Common/headers/opxml.h 2007-02-26 22:59:15 UTC (rev 1633)
+++ Frontier/branches/Frontier_Long_File_Paths/Common/headers/opxml.h 2007-02-27 04:38:00 UTC (rev 1634)
@@ -25,10 +25,9 @@
******************************************************************************/
-/*
-opxml.h -- 7.0b21 PBS
-*/
+// 7.0b21 PBS
-boolean opxmltooutline (Handle htext, hdloutlinerecord ho, boolean flnewoutline, hdlhashtable hto, bigstring bso, tyvaluerecord vo, hdlhashtable hcloud);
+boolean opxmltooutline ( Handle, hdloutlinerecord, boolean, hdlhashtable, Handle *, tyvaluerecord, hdlhashtable );
-boolean opoutlinetoxml (hdloutlinerecord ho, Handle hname, Handle hemail, Handle *htext, hdlhashtable hto, bigstring bso, tyvaluerecord vo, hdlhashtable hcloud);
+boolean opoutlinetoxml ( hdloutlinerecord, Handle, Handle, Handle *, hdlhashtable, Handle *, tyvaluerecord, hdlhashtable );
+
Modified: Frontier/branches/Frontier_Long_File_Paths/Common/headers/osincludes.h
===================================================================
--- Frontier/branches/Frontier_Long_File_Paths/Common/headers/osincludes.h 2007-02-26 22:59:15 UTC (rev 1633)
+++ Frontier/branches/Frontier_Long_File_Paths/Common/headers/osincludes.h 2007-02-27 04:38:00 UTC (rev 1634)
@@ -63,7 +63,6 @@
#endif /* WIN95VERSION */
-
#ifdef MACVERSION
#define OTDEBUG 1 /* must define before including OpenTransport headers */
Modified: Frontier/branches/Frontier_Long_File_Paths/Common/headers/popup.h
===================================================================
--- Frontier/branches/Frontier_Long_File_Paths/Common/headers/popup.h 2007-02-26 22:59:15 UTC (rev 1633)
+++ Frontier/branches/Frontier_Long_File_Paths/Common/headers/popup.h 2007-02-27 04:38:00 UTC (rev 1634)
@@ -65,9 +65,9 @@
typedef boolean (*popupselectcallback) (hdlmenu, short);
-/*prototypes*/
+// prototypes
-extern boolean pushpopupitem (hdlmenu, bigstring, boolean, short);
+extern boolean pushpopupitem ( hdlmenu, bigstring, boolean, short );
extern boolean popupmenuhit (Rect, boolean, fillpopupcallback, popupselectcallback);
@@ -75,5 +75,3 @@
extern boolean adjustpopupcursor (Point, Rect);
-
-
Modified: Frontier/branches/Frontier_Long_File_Paths/Common/source/miniwindow.c
===================================================================
--- Frontier/branches/Frontier_Long_File_Paths/Common/source/miniwindow.c 2007-02-26 22:59:15 UTC (rev 1633)
+++ Frontier/branches/Frontier_Long_File_Paths/Common/source/miniwindow.c 2007-02-27 04:38:00 UTC (rev 1634)
@@ -417,21 +417,25 @@
closebitmap (miniwindow);
return (true);
+
} /*minidrawmsg*/
static boolean minimessage (bigstring bs, boolean flbackgroundmsg) {
-#pragma unused (flbackgroundmsg)
+ #pragma unused (flbackgroundmsg)
+
copystring (bs, (**minidata).bsmsg);
return (minidrawmsg ());
+
} /*minimessage*/
static boolean minigettargetdata (short id) {
return ((*(**minidata).gettargetdataroutine) (id));
+
} /*minigettargetdata*/
@@ -1100,6 +1104,7 @@
shellpopglobals ();
return (true);
+
} /*minisetwindowmessage*/
Modified: Frontier/branches/Frontier_Long_File_Paths/Common/source/op.c
===================================================================
--- Frontier/branches/Frontier_Long_File_Paths/Common/source/op.c 2007-02-26 22:59:15 UTC (rev 1633)
+++ Frontier/branches/Frontier_Long_File_Paths/Common/source/op.c 2007-02-27 04:38:00 UTC (rev 1634)
@@ -235,6 +235,7 @@
opsetfont ((short) ((long) hdata));
return (true);
+
} /*undosetfont*/
@@ -256,6 +257,7 @@
oppoststylechange ();
return (true);
+
} /*opsetfont*/
@@ -265,6 +267,7 @@
opsetsize ((short) ((long) hdata));
return (true);
+
} /*undosetsize*/
@@ -959,15 +962,18 @@
opdraggingmove (pt, (**ho).hbarcursor);
break;
+
}
+
} /*while*/
return (true);
+
} /*opmousedown*/
static boolean opcmdmove (tydirection dir) {
-
+
if (!opreorgcursor (dir, 1)) {
shellouch ();
@@ -976,6 +982,7 @@
}
return (true);
+
} /*opcmdmove*/
@@ -1092,33 +1099,15 @@
langopruncallbackscripts (idopreturnkeyscript); /* DW 1/19/00, let the opReturnKey callbacks have a chance to hook in */
-/* if (flsplit) { /% AR 2/16/00, split the current headline at the cursor position %/
-
- long maxpos, startsel, endsel;
-
- opeditgetmaxpos (&maxpos);
-
- opeditgetselection (&startsel, &endsel);
-
- //set current headline to 0..startsel
-
- if (!loadfromhandletohandle ((**ho).hbuffer, &startsel, 4, false, &hstring)) {
- ouch ();
- return;
- }
-
- opinsertheadline (hstring, dir, flcomment);
- }
+ if ( newemptyhandle ( &hstring ) )
+ opinsertheadline ( hstring, dir, flcomment );
else
-*/
- if (!newemptyhandle (&hstring))
- ouch ();
- else
- opinsertheadline (hstring, dir, flcomment);
-
+ ouch ( );
+
langopruncallbackscripts (idopinsertscript); /*7.1b7: callback after a headline is created.*/
opdocursor (true);
+
} /*opreturnkey*/
@@ -1127,6 +1116,7 @@
optoggletextmode ();
return (true);
+
} /*openterkey*/
@@ -1136,6 +1126,7 @@
(**outlinedata).hbarcursor = hnode; /*move cursor to first headline encountered*/
return (false); /*stop visiting*/
+
} /*opmovetovisit*/
@@ -1408,6 +1399,7 @@
opreturnkey ();
return (true);
+
}
if (chkb == chenter) {
@@ -1423,6 +1415,7 @@
return (true);
return (openterkey ());
+
}
if (keyboardstatus.flkeypad) {
@@ -1449,6 +1442,7 @@
return (opcollapse (hcursor));
}
+
} /*keypad expand/collapse keys*/
if (!fltextmode) {
@@ -1474,6 +1468,7 @@
opeditselectall ();
fltextmode = true; /*set local copy*/
+
}
}
@@ -1498,6 +1493,7 @@
}
return (opeditkey ()); /*pass keystroke to TextEdit*/
+
}
L1: /*process keystroke as a structure command*/
@@ -1534,6 +1530,7 @@
}
goto motion;
+
}
if (floption && keyboardstatus.flcmdkey) { /*check for surface & dive keys*/
@@ -1557,6 +1554,7 @@
break;
default:
+
/* do nothing */
break;
}
@@ -1625,6 +1623,7 @@
}
return (true);
+
} /*opkeystroke*/
Modified: Frontier/branches/Frontier_Long_File_Paths/Common/source/opinit.c
===================================================================
--- Frontier/branches/Frontier_Long_File_Paths/Common/source/opinit.c 2007-02-26 22:59:15 UTC (rev 1633)
+++ Frontier/branches/Frontier_Long_File_Paths/Common/source/opinit.c 2007-02-27 04:38:00 UTC (rev 1634)
@@ -97,15 +97,18 @@
opdefaultsetscraproutine (houtline);
return (false); /*don't call any more hooks*/
+
}
return (true); /*keep going*/
+
} /*opscraphook*/
boolean opdefaultreleaserefconroutine (hdlheadrecord hnode, boolean fldisk) {
-#pragma unused (hnode, fldisk)
+ #pragma unused (hnode, fldisk)
+
/*
default callback for releasing the refcon, does nothing. note that the
callback is responsible for releasing the data linked into the refcon
@@ -113,15 +116,18 @@
*/
return (true);
+
} /*opdefaultreleaserefconroutine*/
static boolean opdefaultpushstyle (hdlheadrecord hnode) {
-#pragma unused (hnode)
+ #pragma unused (hnode)
+
oppushstyle (outlinedata);
return (true);
+
} /*opdefaultpushstyle*/
Modified: Frontier/branches/Frontier_Long_File_Paths/Common/source/oplist.c
===================================================================
--- Frontier/branches/Frontier_Long_File_Paths/Common/source/oplist.c 2007-02-26 22:59:15 UTC (rev 1633)
+++ Frontier/branches/Frontier_Long_File_Paths/Common/source/oplist.c 2007-02-27 04:38:00 UTC (rev 1634)
@@ -155,10 +155,11 @@
hcurrentlist = nil;
disposehandle ((Handle) hlist);
+
} /*opdisposelist*/
-boolean oppushhandle (hdllistrecord hlist, ptrstring pname, Handle hdata) {
+boolean oppushhandle ( hdllistrecord hlist, ptrstring pname, Handle hdata ) {
/*
add a new item at the end of the list. link in the indicated handle in the
@@ -172,6 +173,7 @@
register hdlheadrecord hlast;
register hdloutlinerecord ho;
register long ctitems;
+
hdlheadrecord hnew;
bigstring bs;
@@ -188,29 +190,30 @@
copystring (pname, bs); /*checks for nil*/
if (ctitems == 0) { /*adding to an empty list*/
-
+
hnew = (**ho).hsummit; /*set this guy's refcon handle*/
opsetheadstring (hnew, bs);
+
}
-
else {
+
hlast = oprepeatedbump (down, ctitems - 1, (**ho).hsummit, false);
- // setstringlength (bs, 0);
+ if ( ! opaddheadline ( hlast, down, bs, &hnew ) ) {
- if (!opaddheadline (hlast, down, bs, &hnew)) {
-
oppopoutline ();
goto error;
+
}
-
+
(**ho).ctexpanded++;
(**hnew).flexpanded = true;
+
}
-
+
#ifdef fldebug
if (fldebugging) {
@@ -220,23 +223,25 @@
pushint (ctitems + 1, bs);
opsetheadstring (hnew, bs);
+
}
-
+
#endif
(**hnew).hrefcon = hdata; /*link in the user's data structure*/
(**h).ctitems++;
-
+
oppopoutline ();
-
+
return (true);
-
+
error:
-
+
disposehandle (hdata);
return (false);
+
} /*oppushhandle*/
@@ -343,6 +348,7 @@
*/
return (oppushdata (hlist, pname, bs, (long) stringsize (bs)));
+
} /*oppushstring*/
Modified: Frontier/branches/Frontier_Long_File_Paths/Common/source/oppack.c
===================================================================
--- Frontier/branches/Frontier_Long_File_Paths/Common/source/oppack.c 2007-02-26 22:59:15 UTC (rev 1633)
+++ Frontier/branches/Frontier_Long_File_Paths/Common/source/oppack.c 2007-02-27 04:38:00 UTC (rev 1634)
@@ -620,6 +620,7 @@
}
return (true);
+
} /*oppack*/
@@ -634,6 +635,7 @@
oppopoutline ();
return (fl);
+
} /*oppackoutline*/
@@ -694,6 +696,7 @@
}
return (true);
+
} /*intablevisit*/
@@ -708,6 +711,7 @@
packinfo.packstream = packstream;
return (opsiblingvisiter (hsummit, false, &intablevisit, &packinfo));
+
} /*optabletooutline*/
@@ -717,6 +721,7 @@
static boolean fltabindent;
+
static void clearindentvalues (boolean flmusttabindent) {
spacesforlevel = 0;
@@ -724,6 +729,7 @@
firstindent = -1;
fltabindent = flmusttabindent;
+
} /*clearindentvalues*/
@@ -861,11 +867,13 @@
}
(*textstream).pos++;
+
} /*while*/
closehandlestream (&s);
return (true);
+
} /*opgetlinetext*/
@@ -882,60 +890,67 @@
register hdlheadrecord h = nil;
register short lastlevel = 0;
register tydirection dir;
+
Handle hlinetext;
+ boolean fl = false; /*guilty until proven innocent*/
hdlheadrecord hnewnode;
short level;
- boolean fl = false; /*guilty until proven innocent*/
opstartinternalchange ();
clearindentvalues (true);
while (true) {
+
+ if (!opgetlinetext (platform != thisplatform, packstream, &level, &hlinetext)) { /*consumed the text*/
- if (!opgetlinetext (platform != thisplatform, packstream, &level, &hlinetext)) { /*consumed the text*/
-
if (h != nil) /*success -- we got something*/
fl = true;
+
+ break;
- break;
}
+
+ if (h == nil) { /*first line*/
- if (h == nil) { /*first line*/
-
if (!opnewstructure (hlinetext, hnode))
break;
-
+
h = *hnode;
lastlevel = 0;
+
}
else {
if (level > lastlevel)
dir = right;
-
+
else {
h = oprepeatedbump (left, lastlevel - level, h, true);
dir = down;
}
+
+ if (!opdepositnewheadline (h, dir, hlinetext, &hnewnode)) {
- if (!opdepositnewheadline (h, dir, hlinetext, &hnewnode)) {
-
opdisposestructure (*hnode, false);
break;
+
}
h = hnewnode;
lastlevel = level;
+
}
+
} /*while*/
-
+
opendinternalchange ();
return (fl);
+
} /*opunpacktexttooutline*/
Modified: Frontier/branches/Frontier_Long_File_Paths/Common/source/opstructure.c
===================================================================
--- Frontier/branches/Frontier_Long_File_Paths/Common/source/opstructure.c 2007-02-26 22:59:15 UTC (rev 1633)
+++ Frontier/branches/Frontier_Long_File_Paths/Common/source/opstructure.c 2007-02-27 04:38:00 UTC (rev 1634)
@@ -443,6 +443,7 @@
opnodechanged ((**hd).headlinkleft); /*the parent's list changed*/
opnodechanged ((**hd).headlinkdown); /*the next guy's prev pointer changed*/
+
} /*opdepositdown*/
@@ -592,9 +593,11 @@
default:
return (false); /*invalid direction for deposit*/
+
} /*switch*/
return (true);
+
} /*opdeposit*/
@@ -2221,6 +2224,7 @@
static void opdisposenode (hdlheadrecord hnode) {
opdisposestructure (hnode, true);
+
} /*opdisposenode*/
@@ -2247,10 +2251,11 @@
opdisposenode (hnode);
return (true);
+
} /*opundodelete*/
-boolean opdepositnewheadline (hdlheadrecord hpre, tydirection dir, Handle hstring, hdlheadrecord *hnew) {
+boolean opdepositnewheadline ( hdlheadrecord hpre, tydirection dir, const Handle hstring, hdlheadrecord *hnew ) {
/*
6.0a1 dmb: handle-based version of opaddheadline, which now calls us
@@ -2266,6 +2271,7 @@
#endif
return (opdeposit (hpre, dir, *hnew));
+
} /*opdepositnewheadline*/
@@ -2277,6 +2283,7 @@
return (false);
return (opdepositnewheadline (hpre, dir, hstring, hnew));
+
} /*opaddheadline*/
@@ -2755,6 +2762,7 @@
opeditselectall (); // 5.0d18 dmb: in case text was added by callback
return (true);
+
} /*opinsertheadline*/
@@ -2833,6 +2841,3 @@
return (opsiblingvisiter ((**outlinedata).hsummit, true, &opsettmpbitvisit, (ptrvoid) false));
} /*opcleartmpbits*/
-
-
-
Modified: Frontier/branches/Frontier_Long_File_Paths/Common/source/opvisit.c
===================================================================
--- Frontier/branches/Frontier_Long_File_Paths/Common/source/opvisit.c 2007-02-26 22:59:15 UTC (rev 1633)
+++ Frontier/branches/Frontier_Long_File_Paths/Common/source/opvisit.c 2007-02-27 04:38:00 UTC (rev 1634)
@@ -133,7 +133,9 @@
return (true);
nomad = nextnomad;
+
} /*while*/
+
} /*oprecursivelyvisit*/
@@ -191,7 +193,9 @@
return (true);
nomad = nextnomad;
+
} /*while*/
+
} /*oprecursivelyvisitkidsfirst*/
@@ -247,7 +251,9 @@
return (true);
nomad = nextnomad; /*advance to the next sibling*/
+
} /*while*/
+
} /*opsiblingvisiter*/
Modified: Frontier/branches/Frontier_Long_File_Paths/Common/source/osadroplet.c
===================================================================
--- Frontier/branches/Frontier_Long_File_Paths/Common/source/osadroplet.c 2007-02-26 22:59:15 UTC (rev 1633)
+++ Frontier/branches/Frontier_Long_File_Paths/Common/source/osadroplet.c 2007-02-27 04:38:00 UTC (rev 1634)
@@ -1061,30 +1061,13 @@
long selfa5;
long clienta5;
- /*
- selfa5 = GetComponentRefcon (self);
-
- asm {
- move.l a5,clienta5
- move.l a5,-(a7)
- move.l selfa5,a5
- }
-
- SetComponentInstanceA5 ((ComponentInstance) self, selfa5);
- */
-
if (newcomponentglobals (self, clienta5, &hglobals))
SetComponentInstanceStorage ((ComponentInstance) self, (Handle) hglobals);
else
result = memFullErr;
- /*
- asm {
- move.l (a7)+,a5
- }
- */
-
break;
+
}
case kComponentCloseSelect:
Modified: Frontier/branches/Frontier_Long_File_Paths/Common/source/popup.c
===================================================================
--- Frontier/branches/Frontier_Long_File_Paths/Common/source/popup.c 2007-02-26 22:59:15 UTC (rev 1633)
+++ Frontier/branches/Frontier_Long_File_Paths/Common/source/popup.c 2007-02-27 04:38:00 UTC (rev 1634)
@@ -42,7 +42,7 @@
#include "shell.h"
-boolean pushpopupitem (hdlmenu hmenu, bigstring bs, boolean flenabled, short commandid) {
+boolean pushpopupitem ( hdlmenu hmenu, bigstring bs, boolean flenabled, short commandid ) {
/*
7.1b23 PBS: commandid is new parameter: allow caller to specify the command id of
@@ -56,6 +56,7 @@
disablemenuitem (hmenu, countmenuitems (hmenu));
return (true);
+
} /*pushpopupitem*/
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|