|
From: <cre...@us...> - 2007-02-23 19:47:29
|
Revision: 1621
http://svn.sourceforge.net/frontierkernel/?rev=1621&view=rev
Author: creecode
Date: 2007-02-23 11:47:25 -0800 (Fri, 23 Feb 2007)
Log Message:
-----------
formatting tweaks
Modified Paths:
--------------
Frontier/branches/Frontier_Long_File_Paths/Common/IOAToolkit/ioa.c
Frontier/branches/Frontier_Long_File_Paths/Common/IOAToolkit/ioa.h
Frontier/branches/Frontier_Long_File_Paths/Common/IowaRuntime/Source/iowacore.c
Frontier/branches/Frontier_Long_File_Paths/Common/IowaRuntime/Source/iowafrontier.c
Frontier/branches/Frontier_Long_File_Paths/Common/IowaRuntime/Source/iowainit.c
Frontier/branches/Frontier_Long_File_Paths/Common/IowaRuntime/Source/iowascript.c
Frontier/branches/Frontier_Long_File_Paths/Common/headers/FDllCall.h
Frontier/branches/Frontier_Long_File_Paths/Common/headers/frontierwindows.h
Frontier/branches/Frontier_Long_File_Paths/Common/source/filedialog.c
Frontier/branches/Frontier_Long_File_Paths/Common/source/frontierconfig.c
Frontier/branches/Frontier_Long_File_Paths/Common/source/frontierstart.c
Frontier/branches/Frontier_Long_File_Paths/build_Xcode/frontier.xcode.h
Modified: Frontier/branches/Frontier_Long_File_Paths/Common/IOAToolkit/ioa.c
===================================================================
--- Frontier/branches/Frontier_Long_File_Paths/Common/IOAToolkit/ioa.c 2007-02-23 19:27:43 UTC (rev 1620)
+++ Frontier/branches/Frontier_Long_File_Paths/Common/IOAToolkit/ioa.c 2007-02-23 19:47:25 UTC (rev 1621)
@@ -1867,6 +1867,7 @@
IOAregister (12, 'scro', &scrollbarmain, &setupscrollbar);
return (true);
+
} /*IOAregistercomponents*/
Modified: Frontier/branches/Frontier_Long_File_Paths/Common/IOAToolkit/ioa.h
===================================================================
--- Frontier/branches/Frontier_Long_File_Paths/Common/IOAToolkit/ioa.h 2007-02-23 19:27:43 UTC (rev 1620)
+++ Frontier/branches/Frontier_Long_File_Paths/Common/IOAToolkit/ioa.h 2007-02-23 19:47:25 UTC (rev 1621)
@@ -264,8 +264,6 @@
typedef boolean (*tyevalscriptcallback) (hdlobject, Handle, Handle *, OSType, bigstring);
-
-
typedef struct tycard {
short versionnumber; /*must be the first object in the struct, must be 2 bytes*/
@@ -429,6 +427,7 @@
hdlobject recalcobject; /*dmb 1.0b20 - the object that changed, triggering a card recalc*/
char waste [4]; /*room for growth*/
+
} tycard, **hdlcard;
Modified: Frontier/branches/Frontier_Long_File_Paths/Common/IowaRuntime/Source/iowacore.c
===================================================================
--- Frontier/branches/Frontier_Long_File_Paths/Common/IowaRuntime/Source/iowacore.c 2007-02-23 19:27:43 UTC (rev 1620)
+++ Frontier/branches/Frontier_Long_File_Paths/Common/IowaRuntime/Source/iowacore.c 2007-02-23 19:47:25 UTC (rev 1621)
@@ -2649,6 +2649,7 @@
*h = nil;
return (true);
+
}
if (unpack.p >= unpack.lastp)
@@ -2660,6 +2661,7 @@
unpack.p += ctbytes;
return (true);
+
} /*unpackhandle*/
@@ -2713,6 +2715,7 @@
switch ((**h).objecttype) {
case clonetype: /*force a recalc of the object*/
+
disposehandle ((**h).objectdata);
(**h).objectdata = nil;
@@ -2720,10 +2723,13 @@
break;
default:
+
callunpackdata (h);
break;
+
} /*switch*/
+
} /*postunpackfilter*/
@@ -2792,7 +2798,8 @@
oldclutconverter (info.objectrecalcperiod, &info.objecttextcolor);
- oldclutconverter (info.unused1, &info.objectframecolor);
+ oldclutconverter (info.unused1, &info.objectframecolor);
+
}
clearbytes (&obj, longsizeof (obj));
@@ -2877,6 +2884,7 @@
return (false);
(**h).childobjectlist = firstchild;
+
}
*hobject = h;
@@ -2887,15 +2895,16 @@
error:
- disposehandle (obj.objectname);
-
- disposehandle (obj.objectvalue);
-
- disposehandle (obj.objectscript);
-
- disposehandle (obj.objectdata);
-
- return (false);
+ disposehandle (obj.objectname);
+
+ disposehandle (obj.objectvalue);
+
+ disposehandle (obj.objectscript);
+
+ disposehandle (obj.objectdata);
+
+ return (false);
+
} /*unpackobject*/
@@ -2922,9 +2931,11 @@
if (unpack.p >= unpack.lastp)
return (true);
+
} /*while*/
return (false);
+
} /*unpacklist*/
@@ -2977,6 +2988,7 @@
header.lenwindowtitle = 0;
unpack.p -= 66;
+
}
disktomemshort (header.v2backcolor);
@@ -3005,13 +3017,17 @@
if (header.versionnumber <= 2) /*back color was stored as an index, now stored as a RGBColor*/
oldclutconverter (header.v2backcolor, &header.backcolor);
+
+ switch (header.versionnumber) {
- switch (header.versionnumber) {
+ case 1:
- case 1:
break;
- case 2: case 3: case 4: {
+ case 2:
+ case 3:
+ case 4: {
+
Handle htable;
if (header.flselection) /*we're unpacking for a paste operation*/
@@ -3023,10 +3039,13 @@
(**iowadata).embeddedtable = htable;
break;
+
}
default:
+
goto error;
+
} /*switch*/
/*DW 12/12/93 -- unpack the card's window title*/ {
@@ -3039,6 +3058,7 @@
goto error;
(**iowadata).windowtitle = hwindowtitle;
+
}
}
@@ -3054,12 +3074,15 @@
if ((**hc).objectlist == nil)
(**hc).objectlist = newlist;
+
else {
+
hdlobject lastobject;
getlastinlist ((**hc).objectlist, &lastobject);
(**lastobject).nextobject = newlist;
+
}
laythread (); /*re-establish the flat thread thru all non-group objects*/
@@ -3095,6 +3118,7 @@
header.idwindow = 128;
(**hc).idwindow = header.idwindow;
+
}
checkobjectnames ();
@@ -3103,9 +3127,10 @@
error:
- unlockhandle (hpacked);
-
- return (false);
+ unlockhandle (hpacked);
+
+ return (false);
+
} /*iowaunpack*/
Modified: Frontier/branches/Frontier_Long_File_Paths/Common/IowaRuntime/Source/iowafrontier.c
===================================================================
--- Frontier/branches/Frontier_Long_File_Paths/Common/IowaRuntime/Source/iowafrontier.c 2007-02-23 19:27:43 UTC (rev 1620)
+++ Frontier/branches/Frontier_Long_File_Paths/Common/IowaRuntime/Source/iowafrontier.c 2007-02-23 19:47:25 UTC (rev 1621)
@@ -204,10 +204,12 @@
componenterrormessage (ec, errormessage);
return (false);
+
}
}
flinitialized = true;
+
}
*scriptcomp = comp;
@@ -215,6 +217,7 @@
*scriptid = id;
return (true);
+
} /*getcompiledscript*/
@@ -248,11 +251,13 @@
ec = OSACoerceToDesc (scriptcomp, resultid, resulttype, kOSANullMode, &resultdesc);
OSADispose (scriptcomp, resultid);
+
}
/*DW 11/17/95 -- site of a former memory leak*/ {
AEDisposeDesc (message);
+
}
switch (ec) {
@@ -320,6 +325,7 @@
AEDisposeDesc (&selfAddress);
return (ec == noErr);
+
} /*newevent*/
@@ -330,7 +336,7 @@
boolean frontStartCard (AEDesc *filelist) {
-
+
/*
a card is starting up. we call the script at system.verbs.traps.IRUN.stcd
to create a table for it, unpack the packed table at that location, and
@@ -365,24 +371,27 @@
if ((**iowadata).tablestoredinfrontier)
return (true);
+
+ getappspec (&fsapp);
- getappspec (&fsapp);
-
/*pull the table name from the tablename handle*/ {
if ((**iowadata).tablename == nil) { /*let the script assign a name to the table*/
-
+
setstringlength (tablename, 0);
flcopyname = true;
+
}
else {
+
texthandletostring ((**iowadata).tablename, tablename);
flcopyname = false;
+
}
}
-
+
if (!newevent (startcardtoken, &event))
return (false);
@@ -390,29 +399,29 @@
if (!IACpushstringparam (tablename, 'prm1'))
goto error;
-
+
IACglobals.dontdisposenextparam = true; /*dmb 1.0b19*/
if (!IACpushbinaryparam ((**iowadata).embeddedtable, 'tabl', 'prm2'))
goto error;
-
+
if (!IACpushfilespecparam (&fsapp, 'prm3'))
goto error;
+
+ if (filelist == nil) {
- if (filelist == nil) {
-
AEDesc desc;
#if TARGET_API_MAC_CARBON == 1 /*PBS 03/14/02: AE OS X fix.*/
newdescnull (&desc, typeNull);
-
+
#else
desc.descriptorType = typeNull;
-
+
desc.dataHandle = nil;
-
+
#endif
if (AEPutParamDesc (IACglobals.event, 'prm4', &desc) != noErr)
@@ -421,7 +430,7 @@
else
if (AEPutParamDesc (IACglobals.event, 'prm4', filelist) != noErr)
goto error;
-
+
/*
if (!IACpushbooleanparam ((**iowadata).runmode, 'runm'))
goto error;
@@ -436,12 +445,13 @@
installRuntimeEventHandlers (); /*1.0b20 dmb: init script may call back to card*/
if (!callcompiledscript (&event, typeChar, errormessage, &htablename)) {
-
+
iowadata = savediowadata;
alertdialog (errormessage);
return (false);
+
}
iowadata = savediowadata;
@@ -453,17 +463,19 @@
lasttablewasmajor = true;
*/
+
}
-
+
(**iowadata).tablestoredinfrontier = true;
return (true);
error:
- AEDisposeDesc (&event);
-
- return (false);
+ AEDisposeDesc (&event);
+
+ return (false);
+
} /*frontStartCard*/
@@ -591,6 +603,7 @@
alertdialog (errormessage);
return (false);
+
}
disposehandle (hresult);
@@ -603,6 +616,7 @@
AEDisposeDesc (&event);
return (false);
+
} /*frontEditTable*/
@@ -1028,8 +1042,8 @@
disposehandle (hresult);
return (false);
+
} /*frontEditObject*/
#endif
-
Modified: Frontier/branches/Frontier_Long_File_Paths/Common/IowaRuntime/Source/iowainit.c
===================================================================
--- Frontier/branches/Frontier_Long_File_Paths/Common/IowaRuntime/Source/iowainit.c 2007-02-23 19:27:43 UTC (rev 1620)
+++ Frontier/branches/Frontier_Long_File_Paths/Common/IowaRuntime/Source/iowainit.c 2007-02-23 19:47:25 UTC (rev 1621)
@@ -61,6 +61,7 @@
initlangcomponents ();
return (true);
+
} /*iowaInit*/
Modified: Frontier/branches/Frontier_Long_File_Paths/Common/IowaRuntime/Source/iowascript.c
===================================================================
--- Frontier/branches/Frontier_Long_File_Paths/Common/IowaRuntime/Source/iowascript.c 2007-02-23 19:27:43 UTC (rev 1620)
+++ Frontier/branches/Frontier_Long_File_Paths/Common/IowaRuntime/Source/iowascript.c 2007-02-23 19:47:25 UTC (rev 1621)
@@ -439,32 +439,36 @@
disposehandle (hscript);
return (false);
+
}
-
+
copystring ("\p}", bswith);
pushtexthandle (bswith, hscript);
+
}
-
+
#ifdef isFrontier
- /*bypass the component manager; run script directly*/ {
-
- extern boolean langrunhandletraperror (Handle, bigstring, bigstring);
- bigstring bsresult;
+ /*bypass the component manager; run script directly*/ {
- if (!langrunhandletraperror (hscript, bsresult, errorstring))
- return (false); /***need to trap error info*/
-
- if (flgetreturn)
- return (newtexthandle (bsresult, hreturns));
-
- return (true);
- }
-
+ extern boolean langrunhandletraperror (Handle, bigstring, bigstring);
+ bigstring bsresult;
+
+ if (!langrunhandletraperror (hscript, bsresult, errorstring))
+ return (false); /***need to trap error info*/
+
+ if (flgetreturn)
+ return (newtexthandle (bsresult, hreturns));
+
+ return (true);
+
+ }
+
#endif
+
}
-
+
setstringlength (errorstring, 0);
#if TARGET_API_MAC_CARBON == 1 /*PBS 03/14/02: AE OS X fix.*/
@@ -482,7 +486,7 @@
scriptcomp = findlangcomponent (idlanguage);
if (scriptcomp == 0) { /*didn't find the component*/
-
+
bigstring bs;
AEDisposeDesc (&scriptdesc);
@@ -498,8 +502,9 @@
pushstring ("\p' scripting component.", errorstring);
return (false);
+
}
-
+
ec = OSADoScript (scriptcomp, &scriptdesc, kOSANullScript, typeChar, kOSAModeTransparentScope, &resultdesc);
if (ec != noErr)
@@ -525,44 +530,47 @@
error:
- AEDisposeDesc (&scriptdesc);
-
- if (ec == errOSAScriptError) { /*try to get an error message*/
+ AEDisposeDesc (&scriptdesc);
- AEDesc errordesc;
-
- ec = OSAScriptError (scriptcomp, kOSAErrorMessage, typeChar, &errordesc);
-
- if (ec == noErr) {
+ if (ec == errOSAScriptError) { /*try to get an error message*/
- #if TARGET_API_MAC_CARBON == 1 /*PBS 03/14/02: AE OS X fix.*/
+ AEDesc errordesc;
- datahandletostring (&errordesc, errorstring);
+ ec = OSAScriptError (scriptcomp, kOSAErrorMessage, typeChar, &errordesc);
- #else
+ if (ec == noErr) {
+
+ #if TARGET_API_MAC_CARBON == 1 /*PBS 03/14/02: AE OS X fix.*/
+
+ datahandletostring (&errordesc, errorstring);
+
+ #else
+
+ texthandletostring (errordesc.dataHandle, errorstring);
+
+ #endif
+
+ AEDisposeDesc (&errordesc);
+
+ }
+ else
+ copystring ("\pThe script generated an error, but no message was provided.", errorstring);
+ }
- texthandletostring (errordesc.dataHandle, errorstring);
+ if (ec == -128) /*1.0b15 DW -- user cancelled the script with cmd-period*/
+ return (false);
+
+ if (stringlength (errorstring) == 0) {
- #endif
+ copystring ("\pComponent Manager error. Its code number is ", errorstring);
- AEDisposeDesc (&errordesc);
+ pushlong (ec, errorstring);
+
+ pushstring ("\p.", errorstring);
+
}
- else
- copystring ("\pThe script generated an error, but no message was provided.", errorstring);
- }
-
- if (ec == -128) /*1.0b15 DW -- user cancelled the script with cmd-period*/
+
return (false);
-
- if (stringlength (errorstring) == 0) {
- copystring ("\pComponent Manager error. Its code number is ", errorstring);
-
- pushlong (ec, errorstring);
-
- pushstring ("\p.", errorstring);
- }
-
- return (false);
} /*runlangscript*/
Modified: Frontier/branches/Frontier_Long_File_Paths/Common/headers/FDllCall.h
===================================================================
--- Frontier/branches/Frontier_Long_File_Paths/Common/headers/FDllCall.h 2007-02-23 19:27:43 UTC (rev 1620)
+++ Frontier/branches/Frontier_Long_File_Paths/Common/headers/FDllCall.h 2007-02-23 19:47:25 UTC (rev 1621)
@@ -42,20 +42,24 @@
#endif
#ifdef WIN32
-#define Handle HANDLE
-typedef unsigned long FourCharCode;
-typedef FourCharCode OSType;
+ #define Handle HANDLE
-typedef struct tyPoint
- {
- short v;
- short h;
- } Point, *PointPtr;
+ typedef unsigned long FourCharCode;
-typedef RECT Rect;
+ typedef FourCharCode OSType;
-typedef HANDLE hdlfilenum;
+ typedef struct tyPoint {
+
+ short v;
+ short h;
+
+ } Point, *PointPtr;
+
+ typedef RECT Rect;
+
+ typedef HANDLE hdlfilenum;
+
#endif
#endif
Modified: Frontier/branches/Frontier_Long_File_Paths/Common/headers/frontierwindows.h
===================================================================
--- Frontier/branches/Frontier_Long_File_Paths/Common/headers/frontierwindows.h 2007-02-23 19:27:43 UTC (rev 1620)
+++ Frontier/branches/Frontier_Long_File_Paths/Common/headers/frontierwindows.h 2007-02-23 19:47:25 UTC (rev 1621)
@@ -28,13 +28,13 @@
#define windowsinclude
-/*prototypes*/
+// prototypes
extern WindowPtr getnewwindow (short, boolean, Rect *);
extern void disposewindow (WindowPtr);
-extern void windowsettitle (WindowPtr, bigstring);
+extern void windowsettitle ( WindowPtr, const Handle );
extern void windowgettitle (WindowPtr, bigstring);
Modified: Frontier/branches/Frontier_Long_File_Paths/Common/source/filedialog.c
===================================================================
--- Frontier/branches/Frontier_Long_File_Paths/Common/source/filedialog.c 2007-02-23 19:27:43 UTC (rev 1620)
+++ Frontier/branches/Frontier_Long_File_Paths/Common/source/filedialog.c 2007-02-23 19:47:25 UTC (rev 1621)
@@ -1120,7 +1120,7 @@
anErr = NavDialogRun (dialogRef);
anErr = NavDialogGetReply (dialogRef, &reply);
-
+
if (anErr == noErr && reply.validRecord) {
AEKeyword theKeyword;
Modified: Frontier/branches/Frontier_Long_File_Paths/Common/source/frontierconfig.c
===================================================================
--- Frontier/branches/Frontier_Long_File_Paths/Common/source/frontierconfig.c 2007-02-23 19:27:43 UTC (rev 1620)
+++ Frontier/branches/Frontier_Long_File_Paths/Common/source/frontierconfig.c 2007-02-23 19:47:25 UTC (rev 1621)
@@ -96,6 +96,7 @@
*/
register Handle h;
+
bigstring bs;
h = getresourcehandle (configresourcetype, configresnum);
@@ -158,14 +159,16 @@
reztomemrect ((*cr).defaultwindowrect);
- getstringlist (fontnamelistnumber, (*cr).defaultfont, bs);
+ getstringlist ( fontnamelistnumber, ( *cr ).defaultfont, bs );
- fontgetnumber (bs, &(*cr).defaultfont);
+ fontgetnumber ( bs, &(*cr).defaultfont );
centerrectondesktop (&(*cr).defaultwindowrect);
+
}
else
initconfigrecord (cr);
+
} /*loadconfigresource*/
Modified: Frontier/branches/Frontier_Long_File_Paths/Common/source/frontierstart.c
===================================================================
--- Frontier/branches/Frontier_Long_File_Paths/Common/source/frontierstart.c 2007-02-23 19:27:43 UTC (rev 1620)
+++ Frontier/branches/Frontier_Long_File_Paths/Common/source/frontierstart.c 2007-02-23 19:47:25 UTC (rev 1621)
@@ -150,5 +150,3 @@
return (true);
} /*frontierstart*/
-
-
Modified: Frontier/branches/Frontier_Long_File_Paths/build_Xcode/frontier.xcode.h
===================================================================
--- Frontier/branches/Frontier_Long_File_Paths/build_Xcode/frontier.xcode.h 2007-02-23 19:27:43 UTC (rev 1620)
+++ Frontier/branches/Frontier_Long_File_Paths/build_Xcode/frontier.xcode.h 2007-02-23 19:47:25 UTC (rev 1621)
@@ -40,3 +40,4 @@
#define FRONTIER_FRAMEWORK_INCLUDES 1
#include "frontier.h"
+
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|