diff -r -c -x *.orig -x *.rej -x #* -x *~ -N orig/gcc-2.7.2.2/ChangeLog gcc-2.7.2.2/ChangeLog
*** orig/gcc-2.7.2.2/ChangeLog	Wed Feb 12 13:57:12 1997
--- gcc-2.7.2.2/ChangeLog	Wed Mar  5 21:12:36 1997
***************
*** 1,3 ****
--- 1,117 ----
+ Wed Mar  5 19:49:16 1997  Kresten Krab Thorup  <krab@california.daimi.aau.dk>
+ 
+ 	* config/m68k/m68k.md (movqi): For PALMOS, use simple move for push.
+ 
+ 	* config/m68k/m68k.c (output_function_epilogue): Only emit it
+ 	TARGET_DEBUG_LABELS is on.
+ 
+ 	* config/m68k/m68kpalmos.h (LIB_SPEC): Removed definition.
+ 	(SUBTARGET_SWITCHES): Defines -mdebug-labels
+ 	(TARGET_DEBUG_LABELS): New macro.
+ 
+ 
+ Fri Feb 21 00:31:25 1997  Kresten Krab Thorup  <krab@california.daimi.aau.dk>
+ 
+ 	* config/m68k/lb1sf68palmos.asm: Changed all jbsr to bst.
+ 
+ 	* config/m68k/m68k.c (output_function_epilogue): Emit function
+ 	name for PalmOS stack unwinding.
+ 
+ 	* config/m68k/m68kpalmos.h: #undef PROMOTE_PROTOTYPES 
+ 	(CC1_SPEC): Added -fshort-enums.
+ 
+ Wed Feb 19 17:25:01 1997  Kresten Krab Thorup  <krab@california.daimi.aau.dk>
+ 
+ 	* config/m68k/m68kpalmos.h (CALL_USED_REGISTERS): Updated to
+ 	reflect that a5 is fixed.
+ 	(FUNCTION_VALUE): Added to reflect MetroWerks calling convention
+ 	to support systraps correctly.
+ 
+ 	* config/m68k/m68kpalmos.h (LINK_SPEC): Changed to use pilot.ld
+ 
+ 	* config/m68k/palmos_link.ld: New file.
+ 
+ 	* config/m68k/t-m68kpalmos (EXTRA_PARTS): Added pilot.ld
+ 
+ 	* c-common.c (decl_attributes): Added "systrap" attribute. 
+ 
+ 	* config/m68k/m68k.md (call_value, call): Added support for
+ 	systraps in calls.
+ 
+ 	
+ 	
+ Fri Feb 14 12:29:02 1997  Kresten Krab Thorup  <krab@california.daimi.aau.dk>
+ 
+ 	* config/m68k/m68kpalmos.h (CC1_SPEC): Disable multi-char
+ 	character constant warnings.
+ 
+ 	* toplev.c (warn_multi_char_constant): New variable.
+ 
+ 	* c-lex.c (yylex): Use long_integer_type_node for character
+ 	constants so that Mac style resource strings work on a machine
+ 	with 16-bit integers.  Also use new warning flag.
+ 	
+ 	* cp/lex.c (real_yylex): Same as above.
+ 
+ Wed Feb 12 13:34:11 1997  Kresten Krab Thorup  <krab@california.daimi.aau.dk>
+ 
+ 	* config/m68k/m68k.c (legitimize_pic_address): Handle
+ 	pic-addressing for labels in palmos.  (makes goto and switch work)
+ 
+ 	* config/m68k/t-m68kpalmos (stmp-palmos-headers): Fixed so it
+ 	calls install-dir manually, resulting in less invocations of this
+ 	target. 
+ 	(TARGET_LIBGCC2_CFLAGS): Added includes for PalmOS headers.
+ 	
+ Tue Feb 11 19:02:16 1997  Kresten Krab Thorup  <krab@california.daimi.aau.dk>
+ 
+ 	* config/m68k/t-m68kpalmos (LIBGCC2_DEP): Added dependency on
+ 	stmp-install-palmos-headers.
+ 
+ Sun Feb  9 22:12:42 1997  Kresten Krab Thorup  <krab@california.daimi.aau.dk>
+ 
+ 	* configure: New configuration for m68k-palmos-coff.
+ 	
+ 	* libgcc2.c (__builtin_new, __builtin_delete): Generate calls to
+ 	PalmOS memory management routines.
+ 
+ 	* longlong.h (count_leading_zeros): Cast 1 to USItype before
+ 	shifting.  Makes long long work for sizeof(int) != sizeof(long).
+ 
+ 	* varasm.c (assemble_variable): Invoke ENCODE_SECTION_INFO for
+ 	assembled variable.  
+ 
+ 	* integrate.c (expand_inline_function): Fixed problem with equiv
+ 	and -fpic code.  inline foo(void*x) { asm("..." : : "g"); } doesn't
+ 	work right with foo(&bar), the &bar isn't pic-ified.
+ 
+ 	* config/m68k/m68k.md: New insn pattern for loading pc-relative
+ 	addresses. 
+ 	(movsi instruction pattern): Generate pc-relative loads of text
+ 	addresses. 
+ 	(call, call_value): Generate .w versions of 
+ 
+ 	* config/m68k/m68k.h (TARGET_PCREL): New target flag -mpcrel
+ 	generates all text references pc-relative.
+ 
+ 	* config/m68k/m68k.c (output_function_prologue): Generate code for
+ 	palmos style pic code.
+ 	(legitimize_pic_address): Generate pattern for loading addresses
+ 	using pic code.
+ 	(print_operand_address): Don't emit @GOT for pic labels.
+ 
+ 	* config/m68k/fpgnulib.c (__floatsidf): declared argument long in
+ 	stead of int.  Changed 32 to 32L.
+ 	(__floatsisf): Same as above.
+ 
+ 	* config/m68k/lb1sf68palmos.asm: New file made from lb1sf68.asm
+ 
+ 	* calls.c (emit_library_call, emit_library_call_value): Set
+ 	SYMBOL_REF_FLAG of call SYMBOL_REF if PALMOS is defined. 
+ 
+ 	* config/m68k/m68kpalmos.h, config/m68k/t-m68kpalmos,
+ 	config/m68k/palmos_crt0.S: new files. 
+ 
  Sat Jun 29 12:33:39 1996  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
  
  	* Version 2.7.2.1 released.
diff -r -c -x *.orig -x *.rej -x #* -x *~ -N orig/gcc-2.7.2.2/PalmOS/AppBuildRules.h gcc-2.7.2.2/PalmOS/AppBuildRules.h
*** orig/gcc-2.7.2.2/PalmOS/AppBuildRules.h	Thu Jan  1 01:00:00 1970
--- gcc-2.7.2.2/PalmOS/AppBuildRules.h	Wed Feb 19 16:46:54 1997
***************
*** 0 ****
--- 1,35 ----
+ /*******************************************************************
+  * 							 Pilot Software
+  *
+  *		 Copyright(c) 1994, Palm Computing Inc., All Rights Reserved
+  *
+  *-------------------------------------------------------------------
+  * FileName:
+  *		AppBuildRules.h
+  *
+  * Description:
+  *		This header file can beused as a template for
+  *  application specific build options. To use, simple copy this file
+  *  and place it into your local directory. 
+  *
+  *  Typically, the options specified in this file are used to build
+  *  with different forms of error-checking, etc.  and are not common to all projects.
+  *
+  * History:
+  *   	6/6/95 RM - Created by Ron Marianetti  
+  *
+  *******************************************************************/
+  
+ // Run with error checking that forces all handles to be locked before
+ // they are accessed. Before alpha, all applications should be able to run with this
+ // option on.
+ #define	MEMORY_FORCE_LOCK		1
+ 
+ 
+ // Set these according to which Shell commands you want to
+ // link with.
+ #define	SHELL_COMMAND_DB			0	// Available
+ #define	SHELL_COMMAND_UI			0	// Not Available
+ #define	SHELL_COMMAND_APP			0	// Not Available
+ #define	SHELL_COMMAND_EMULATOR	1	// Available
+ 
diff -r -c -x *.orig -x *.rej -x #* -x *~ -N orig/gcc-2.7.2.2/PalmOS/BuildRules.h gcc-2.7.2.2/PalmOS/BuildRules.h
*** orig/gcc-2.7.2.2/PalmOS/BuildRules.h	Thu Jan  1 01:00:00 1970
--- gcc-2.7.2.2/PalmOS/BuildRules.h	Wed Feb 19 16:16:05 1997
***************
*** 0 ****
--- 1,166 ----
+ /*******************************************************************
+  * 							 Pilot Software
+  *
+  *		 Copyright(c) 1994, Palm Computing Inc., All Rights Reserved
+  *
+  *-------------------------------------------------------------------
+  * FileName:
+  *		BuildRules.h
+  *
+  * Description:
+  *		Build Rules for Pilot. This file is necessary for
+  *  the CodeWarrior environment since it doesn't permit #defines
+  *  in the "Makefile".
+  *    
+  *    This file is included from within Common.h
+  *
+  * History:
+  *   	12/13/94  RM - Created by Ron Marianetti  
+  *
+  *******************************************************************/
+ 
+ #ifndef 	__BUILDRULES_H__
+ #define	__BUILDRULES_H__
+ 
+ /************************************************************
+  * Compilation Control Options
+  *************************************************************/
+ 
+ // The makefile should set the define EMULATION_LEVEL to one of the following
+ //  constants:
+ #define	EMULATION_NONE			0		// native environment
+ #define	EMULATION_WINDOWS		1		// emulate on Windows
+ #define	EMULATION_DOS			2		// emulate on DOS
+ #define	EMULATION_MAC		   3		// emulate on Macintosh
+ 
+ 
+ // If emulation is not EMULATION_NONE, the following define controls
+ // whether we are talking to a touchdown device over the serial port,
+ // or if we are emulating a memory card in local RAM.
+ //
+ // The makefile should set the define MEMORY_TYPE to one of the following
+ //  constants
+ #define	MEMORY_LOCAL			0		// Emulate using local memory card image
+ #define	MEMORY_REMOTE			1		// Pass calls through serial port to the device
+ 
+ 
+ // The makefile should set the define ENVIRONMENT to one of the following:
+ #define	ENVIRONMENT_CW			0		// CodeWarrior on the Mac
+ #define	ENVIRONMENT_MPW		1		// MPW on the Mac
+ 
+ 
+ // The makefile should set the define ERROR_CHECK_LEVEL to one of the 
+ //  following constants:
+ #define	ERROR_CHECK_NONE		0		// compile no error checking code
+ #define	ERROR_CHECK_PARTIAL	1		// display for fatal errors only
+ #define	ERROR_CHECK_FULL		2		// display fatal or non-fatal errors
+ 
+ 
+ // The makefile should set the define CPU_TYPE to one of the 
+ //  following constants:
+ #define	CPU_68K					0		// Motorola 68K type
+ #define	CPU_x86					1		// Intel x86 type
+ 
+ 
+ // The makefile should set the define HW_TARGET to one of the 
+ // following constants:
+ #define	HW_TARGET_NONE			0		// Emulating
+ #define	HW_TARGET_302			1		// Motorola 302 ADS board
+ #define	HW_TARGET_328EMU		2		// Motorola 328 Emulator ADS board
+ #define	HW_TARGET_328			3		// Motorola 328 ADS board
+ #define	HW_TARGET_TD1			4		// Pilot hardware
+ 
+ 
+ // The makefile should set the define MEMORY_FORCE_LOCK to one of the
+ // following.
+ #define	MEMORY_FORCE_LOCK_OFF	0	// Don't force all handles to be locked
+ #define	MEMORY_FORCE_LOCK_ON		1	// Force all handles to be locked before usage
+ 
+ 
+ // The makefile should set the define DEBUG_LEVEL to one of the
+ // following. THIS DEFINE IS ONLY USED BY A COUPLE MODULES SO WE
+ //  DON'T GIVE IT A DEFAULT VALUE BELOW...
+ // ANY MODULE THAT USES THIS DEFINE SHOULD VERIFY THAT IT IS DEFINED!!
+ #define	DEBUG_LEVEL_NONE			1	// None: Does not auto-launch Console or Debugger
+ #define	DEBUG_LEVEL_PARTIAL		2	// Partial: Auto-Launches Console but skips debugger
+ #define	DEBUG_LEVEL_FULL			3	// Full: Waits in debugger on reset
+ 
+ 
+ // The makefile should set the define COUNTRY to one of the 
+ // following constants:
+ #define	COUNTRY_UNITED_STATES	0
+ #define	COUNTRY_FRANCE				1
+ #define	COUNTRY_GERMANY			2
+ 
+ 
+ // The makefile should set the define LANGUAGE to one of the 
+ // following constants:
+ #define	LANGUAGE_ENGLISH			0
+ #define	LANGUAGE_FRENCH			1
+ #define	LANGUAGE_GERMAN			2
+ 
+ 
+ 
+ /************************************************************
+  * Include the following file when running under the CodeWarriror
+  *  IDE so that default build options can be overriden. The default
+  *  version of this file is in the Incs: directory. If an app wishes
+  *  to override the default options, it should create a copy of this
+  *  include file in it's own local directory. This include file
+  *  is never used when building from MPW since MPW can specify compiler
+  *  defines from the command line.
+  *************************************************************/
+ #ifndef CMD_LINE_BUILD						// pre-defined only from MPW
+ 	#include "AppBuildRules.h"
+ 	
+ 	#include <SysBuildRules.h>
+ #endif
+ 
+ 
+ 
+ /************************************************************
+  * Settings, these can be overriden in the makefile
+  *************************************************************/ 
+ #ifndef	EMULATION_LEVEL
+ 	#define	EMULATION_LEVEL		EMULATION_NONE
+ #endif
+ 
+ #if EMULATION_LEVEL == EMULATION_NONE
+ 	#define	MEMORY_TYPE				MEMORY_LOCAL
+ #endif
+ 
+ #ifndef MEMORY_TYPE
+ 	#define	MEMORY_TYPE 			MEMORY_LOCAL
+ #endif
+ 
+ #ifndef ENVIRONMENT
+ 	#define	ENVIRONMENT				ENVIRONMENT_CW
+ #endif
+ 
+ #ifndef	ERROR_CHECK_LEVEL
+ 	#define	ERROR_CHECK_LEVEL		ERROR_CHECK_FULL
+ #endif
+ 
+ #ifndef CPU_TYPE
+ 	#define	CPU_TYPE					CPU_68K
+ #endif
+ 
+ #ifndef HW_TARGET
+ 	#define	HW_TARGET				HW_TARGET_NONE
+ #endif
+ 
+ #ifndef	MEMORY_FORCE_LOCK
+ 	#define	MEMORY_FORCE_LOCK		MEMORY_FORCE_LOCK_OFF
+ #endif
+ 
+ #ifndef	COUNTRY
+ 	#define	COUNTRY					COUNTRY_UNITED_STATES
+ #endif
+ 
+ #ifndef	LANGUAGE
+ 	#define	LANGUAGE					LANGUAGE_ENGLISH
+ #endif
+ 
+ 
+ 
+ #endif // __BUILDRULES_H__
diff -r -c -x *.orig -x *.rej -x #* -x *~ -N orig/gcc-2.7.2.2/PalmOS/Common.h gcc-2.7.2.2/PalmOS/Common.h
*** orig/gcc-2.7.2.2/PalmOS/Common.h	Thu Jan  1 01:00:00 1970
--- gcc-2.7.2.2/PalmOS/Common.h	Wed Feb 19 16:16:05 1997
***************
*** 0 ****
--- 1,217 ----
+ /*******************************************************************
+  * 							 Pilot Software
+  *
+  *		 Copyright(c) 1994, Palm Computing Inc., All Rights Reserved
+  *
+  *-------------------------------------------------------------------
+  * FileName:
+  *		Common.h
+  *
+  * Description:
+  *		Common header file for all Pilot routines.
+  *		Contains elementary data types
+  *
+  * History:
+  *   	10/19/94  RM - Created by Ron Marianetti  
+  *
+  *******************************************************************/
+ 
+ 
+ #ifndef __COMMON_H__
+ #define __COMMON_H__
+ 
+ 
+ /************************************************************
+  * Build Rules
+  *************************************************************/
+ #include <BuildRules.h>
+ 
+ 
+ /************************************************************
+  * Define whether or not we are direct linking, or going through
+  *  traps.
+  *
+  * When eumulating we use directy linking.
+  * When running under native mode, we use traps EXCEPT for the
+  *   modules that actually install the routines into the trap table. 
+  *   These modules will set the DIRECT_LINK define to 1
+  *************************************************************/
+ #ifndef USE_TRAPS 
+ 	
+ #if EMULATION_LEVEL == EMULATION_NONE
+ 	#define	USE_TRAPS 1
+ #else
+ 	#define	USE_TRAPS 0
+ #endif
+ 
+ #endif
+ 
+ 
+ #if USE_TRAPS == 0
+ #define ONEWORD_INLINE(trapNum)
+ #define TWOWORD_INLINE(w1, w2)
+ #define THREEWORD_INLINE(w1, w2, w3)
+ #define FOURWORD_INLINE(w1, w2, w3, w4)
+ #define FIVEWORD_INLINE(w1, w2, w3, w4, w5)
+ #define SIXWORD_INLINE(w1, w2, w3, w4, w5, w6)
+ #define SEVENWORD_INLINE(w1, w2, w3, w4, w5, w6, w7)
+ #define EIGHTWORD_INLINE(w1, w2, w3, w4, w5, w6, w7, w8)
+ #define NINEWORD_INLINE(w1, w2, w3, w4, w5, w6, w7, w8, w9)
+ #define TENWORD_INLINE(w1, w2, w3, w4, w5, w6, w7, w8, w9, w10)
+ #define ELEVENWORD_INLINE(w1, w2, w3, w4, w5, w6, w7, w8, w9, w10, w11)
+ #define TWELVEWORD_INLINE(w1, w2, w3, w4, w5, w6, w7, w8, w9, w10, w11, w12)
+ #else
+ #ifdef __GNUC__
+ #define ASMWORD(W) asm("dc.w %c0"::"i"(W));
+ #define ONEWORD_INLINE(trapNum) 	\
+ 	{ASMWORD(trapNum)}
+ #define TWOWORD_INLINE(w1, w2) 	\
+ 	{ASMWORD(w1)ASMWORD(w2)}
+ #define THREEWORD_INLINE(w1, w2, w3)  \
+ 	{ASMWORD(w1)ASMWORD(w2)ASMWORD(w3)}
+ #define FOURWORD_INLINE(w1, w2, w3, w4)  \
+ 	{ASMWORD(w1)ASMWORD(w2)ASMWORD(w3)ASMWORD(w4)}
+ #define FIVEWORD_INLINE(w1, w2, w3, w4, w5)  \
+ 	{ASMWORD(w1)ASMWORD(w2)ASMWORD(w3)ASMWORD(w4)ASMWORD(w5)}
+ #define SIXWORD_INLINE(w1, w2, w3, w4, w5, w6)  \
+ 	{ASMWORD(w1)ASMWORD(w2)ASMWORD(w3)ASMWORD(w4)ASMWORD(w5)ASMWORD(w6)}
+ #define SEVENWORD_INLINE(w1, w2, w3, w4, w5, w6, w7)  \
+ 	{ASMWORD(w1)ASMWORD(w2)ASMWORD(w3)ASMWORD(w4)ASMWORD(w5)ASMWORD(w6)ASMWORD(w7)}
+ #define EIGHTWORD_INLINE(w1, w2, w3, w4, w5, w6, w7, w8)  \
+ 	{ASMWORD(w1)ASMWORD(w2)ASMWORD(w3)ASMWORD(w4)ASMWORD(w5)ASMWORD(w6)ASMWORD(w7)ASMWORD(w8)}
+ #define NINEWORD_INLINE(w1, w2, w3, w4, w5, w6, w7, w8, w9)  \
+ 	{ASMWORD(w1)ASMWORD(w2)ASMWORD(w3)ASMWORD(w4)ASMWORD(w5)ASMWORD(w6)ASMWORD(w7)ASMWORD(w8)ASMWORD(w9)}
+ #define TENWORD_INLINE(w1, w2, w3, w4, w5, w6, w7, w8, w9, w10)  \
+ 	{ASMWORD(w1)ASMWORD(w2)ASMWORD(w3)ASMWORD(w4)ASMWORD(w5)ASMWORD(w6)ASMWORD(w7)ASMWORD(w8)ASMWORD(w9)ASMWORD(w10)}
+ #define ELEVENWORD_INLINE(w1, w2, w3, w4, w5, w6, w7, w8, w9, w10, w11)  \
+ 	{ASMWORD(w1)ASMWORD(w2)ASMWORD(w3)ASMWORD(w4)ASMWORD(w5)ASMWORD(w6)ASMWORD(w7)ASMWORD(w8)ASMWORD(w9)ASMWORD(w10)ASMWORD(w11)}
+ #define TWELVEWORD_INLINE(w1, w2, w3, w4, w5, w6, w7, w8, w9, w10, w11, w12)  \
+ 	{ASMWORD(w1)ASMWORD(w2)ASMWORD(w3)ASMWORD(w4)ASMWORD(w5)ASMWORD(w6)ASMWORD(w7)ASMWORD(w8)ASMWORD(w9)ASMWORD(w10)ASMWORD(w11)ASMWORD(w12)}
+ #else
+ #define ONEWORD_INLINE(trapNum) 	\
+ 	= trapNum
+ #define TWOWORD_INLINE(w1, w2) 	\
+ 	= {w1,w2}
+ #define THREEWORD_INLINE(w1, w2, w3)  \
+ 	= {w1,w2,w3}
+ #define FOURWORD_INLINE(w1, w2, w3, w4)  \
+ 	= {w1,w2,w3,w4}
+ #define FIVEWORD_INLINE(w1, w2, w3, w4, w5)  \
+ 	= {w1,w2,w3,w4,w5}
+ #define SIXWORD_INLINE(w1, w2, w3, w4, w5, w6)  \
+ 	= {w1,w2,w3,w4,w5,w6}
+ #define SEVENWORD_INLINE(w1, w2, w3, w4, w5, w6, w7)  \
+ 	= {w1,w2,w3,w4,w5,w6,w7}
+ #define EIGHTWORD_INLINE(w1, w2, w3, w4, w5, w6, w7, w8)  \
+ 	= {w1,w2,w3,w4,w5,w6,w7,w8}
+ #define NINEWORD_INLINE(w1, w2, w3, w4, w5, w6, w7, w8, w9)  \
+ 	= {w1,w2,w3,w4,w5,w6,w7,w8,w9}
+ #define TENWORD_INLINE(w1, w2, w3, w4, w5, w6, w7, w8, w9, w10)  \
+ 	= {w1,w2,w3,w4,w5,w6,w7,w8,w9,w10}
+ #define ELEVENWORD_INLINE(w1, w2, w3, w4, w5, w6, w7, w8, w9, w10, w11)  \
+ 	= {w1,w2,w3,w4,w5,w6,w7,w8,w9,w10,w11}
+ #define TWELVEWORD_INLINE(w1, w2, w3, w4, w5, w6, w7, w8, w9, w10, w11, w12)  \
+ 	= {w1,w2,w3,w4,w5,w6,w7,w8,w9,w10,w11,w12}
+ #endif
+ #endif
+ 
+ 
+ 
+ /********************************************************************
+  * Elementary data types
+  ********************************************************************/
+ 
+ // Fixed size data types
+ typedef char				SByte;		// 8 bits
+ typedef unsigned char 	Byte;
+ 
+ typedef short				SWord;		// 16 bits
+ typedef unsigned short 	Word;			
+ 
+ typedef long				SDWord;		// 32 bits
+ typedef unsigned long	DWord;		
+ 
+ 
+ // Logical data types
+ typedef unsigned char	Boolean;
+ 
+ typedef char				Char;			// Used for character strings
+ typedef unsigned char	UChar;
+ 
+ typedef short				Short;		// >= Byte
+ typedef unsigned short	UShort;
+ 
+ typedef short				Int;			// >= Word (use short so MPW and CW agree)
+ typedef unsigned short	UInt;			   
+ 
+ typedef long				Long;			// >= DWord
+ typedef unsigned long	ULong;
+ 
+ typedef short				Err;
+ 
+ typedef DWord				LocalID;		// local (card relative) chunk ID
+ 
+ 
+ 
+ /************************************************************
+  * Pointer Types
+  *************************************************************/ 
+ typedef void*				VoidPtr;
+ typedef VoidPtr*			VoidHand;
+ 
+ 
+ // Fixed size data types
+ typedef SByte*				SBytePtr;
+ typedef Byte*				BytePtr;
+ 
+ typedef SWord*				SWordPtr;
+ typedef Word*				WordPtr;
+ 
+ typedef SDWord*			SDWordPtr;
+ typedef DWord*				DWordPtr;
+ 
+ 
+ // Logical data types
+ typedef Boolean*			BooleanPtr;
+ 
+ typedef Char*				CharPtr;
+ typedef UChar*				UCharPtr;
+ 
+ typedef Short*				ShortPtr;
+ typedef UShort*			UShortPtr;
+ 
+ typedef Int*				IntPtr;
+ typedef UInt*				UIntPtr;
+ 
+ typedef Long*				LongPtr;
+ typedef ULong*				ULongPtr;
+ 
+ 
+ // Include the following typedefs if types.h wasn't read.
+ #ifndef __TYPES__
+ 
+ // Generic Pointer types used by Memory Manager
+ // We have to define Ptr as char* because that's what the Mac includes do.
+ typedef char*				Ptr;					// global pointer
+ typedef Ptr*				Handle;				// global handle
+ 
+ 
+ // Function types
+ typedef Long (*ProcPtr)();
+ 
+ #endif /* __TYPES__ */
+ 
+ 
+ /************************************************************
+  * Common constants
+  *************************************************************/
+ #ifndef NULL
+ #define NULL	0
+ #endif	// NULL
+ 
+ #ifndef __TYPES__									// Macintosh Types
+ enum {false, true};
+ #define __TYPES__
+ #endif
+ 
+ #endif //__COMMON_H__
diff -r -c -x *.orig -x *.rej -x #* -x *~ -N orig/gcc-2.7.2.2/PalmOS/Hardware/Hardware.h gcc-2.7.2.2/PalmOS/Hardware/Hardware.h
*** orig/gcc-2.7.2.2/PalmOS/Hardware/Hardware.h	Thu Jan  1 01:00:00 1970
--- gcc-2.7.2.2/PalmOS/Hardware/Hardware.h	Wed Feb 19 16:50:08 1997
***************
*** 0 ****
--- 1,246 ----
+ /*******************************************************************
+  * 							 Pilot Software
+  *
+  *		 Copyright(c) 1994, Palm Computing Inc., All Rights Reserved
+  *
+  *-------------------------------------------------------------------   
+  * FileName:
+  *		Hardware.h
+  *
+  * Description:
+  *		General Hardware Equates. This header file
+  *  contains general hardware configuration equates that are not dependent on
+  *  the version of the hardware we're running on. Equates specific to
+  *  a certain component like the 68328, etc. is contained in separate
+  *  header files.
+  *
+  * History:
+  *   	4/27/95  RM - Created by Ron Marianetti
+  *
+  *******************************************************************/  
+ 
+ #ifdef	NON_PORTABLE	   // So app's don't mistakenly include this
+ 
+ #ifndef __HARDWARE_H__
+ #define __HARDWARE_H__
+ 
+ 
+ 
+ 
+ /**************************************************************************
+  * General Equates
+  ***************************************************************************/
+  
+ // Bits in the low memory global GHwrWakeUp
+ #define	hwrWakeUpGeneral			0x0001
+ #define	hwrWakeUpPWM				0x0002
+ #define	hwrWakeUpFromKey			0x0004				// set if we woke from a key press
+ #define	hwrWakeUpReturnToSleep	0x0008				// set if we woke from 24 hr. interrupt
+ 																	//  in which case we want to go right back to sleep
+ 
+ 
+ 
+ // Bits for the call HwrDockSignals
+ #define	hwrDockInSyncButton	0x0001					// Dock button
+ #define	hwrDockInGeneric1		0x0002					// General Purpose input #1
+ 
+ #define	hwrDockOutGeneric0	0x0001					// General Purpose output #0
+ 
+ 
+ 
+ // Define # of card slots
+ #if EMULATION_LEVEL == EMULATION_NONE
+ #define	hwrNumCardSlots	1								// 1 card slot
+ #else
+ #define	hwrNumCardSlots	2								// 2 card slots for emulation
+ #endif
+ 
+ 
+ // Screen Dimensions
+ #define	hwrDisplayWidth		160					// Width of display
+ #define	hwrDisplayHeight		160					// Height of display
+ 
+ // Screen refresh rate
+ #define	hwrDisplayPeriod		12						// frame period in ms.
+ 
+ 
+ // Battery scaling:
+ //    Voltage = (level + hwrVoltStepsOffset) / hwrStepsPerVolt
+ #define	hwrStepsPerVolt		78						// 78 = 1 volt.
+ #define	hwrVoltStepsOffset	0						// Add to level before scaling		
+ 
+ //----------------------------------------------------------------------------
+ // Digitizer Dimensions
+ //----------------------------------------------------------------------------
+ #define	hwrSystemTop			(hwrDisplayHeight+4)
+ #define	hwrSystemHeight		56
+ 
+ // Graffiti Area
+ #define	hwrGraffitiTop			hwrSystemTop			// Top coordinate of Graffiti area
+ #define	hwrGraffitiLeft		27							// Left coordinate of Graffiti area
+ #define	hwrGraffitiWidth		106						// Width of Graffiti area
+ #define	hwrGraffitiHeight		hwrSystemHeight		// Height of Graffiti area
+ #define	hwrGraffitiSplit		(hwrGraffitiLeft+62)	// Split mode dividing line
+ 
+ // Launch Button
+ #define	hwrLaunchBtnLeft		0							
+ #define	hwrLaunchBtnTop		hwrSystemTop						
+ #define	hwrLaunchBtnWidth		27
+ #define	hwrLaunchBtnHeight	(hwrSystemHeight/2)
+ 
+ // Menu Button
+ #define	hwrMenuBtnLeft			0							
+ #define	hwrMenuBtnTop			(hwrSystemTop+hwrMenuBtnHeight)  							
+ #define	hwrMenuBtnWidth		27
+ #define	hwrMenuBtnHeight		(hwrSystemHeight/2)
+ 
+ // Calculator Button
+ #define	hwrCalcBtnLeft			133							
+ #define	hwrCalcBtnTop			hwrSystemTop 						
+ #define	hwrCalcBtnWidth		27
+ #define	hwrCalcBtnHeight		(hwrSystemHeight/2)
+ 
+ // Find Button
+ #define	hwrFindBtnLeft			133							
+ #define	hwrFindBtnTop			(hwrSystemTop+hwrCalcBtnHeight)	 						
+ #define	hwrFindBtnWidth		27
+ #define	hwrFindBtnHeight		(hwrSystemHeight/2)
+ 
+ 
+ 
+ /**************************************************************************
+  * Prototypes of functions used only when running on the real hardware
+  ***************************************************************************/
+ #ifdef __cplusplus
+ extern "C" {
+ #endif
+ 
+ 
+ 	// These routines are only accessed from the Debugger so they don't
+ 	//  need traps.
+ 	void		HwrPreRAMInit(void); 
+ 	
+ 	void		HwrPreDebugInit(void); 
+ 	
+ 	void 		HwrInit(void); 
+ 
+ 	void		HwrPostDebugInit(void); 
+ 	
+ 	Err		HwrFlashWriteSub(Ptr bodyP);
+ 							
+ 	void		HwrResetNMI(void);
+ 	
+ 	DWord		HwrGetRAMSize(UInt cardNo, DWord limit);
+ 	
+ 	void		HwrDrawSplashScreen(void);
+ 
+ 	void   	HwrDisableInts(void);
+ 	
+ 	void		HwrShutDownPLL(void);
+ 	
+ 	void		HwrLowBatteryHandler(void);
+ 
+ 
+ 	// These routines are for "general" use.
+ 	void		HwrIRQ1Handler(DWord param)
+ 							SYS_TRAP(sysTrapHwrIRQ1Handler);
+ 	void		HwrIRQ2Handler(DWord param)
+ 							SYS_TRAP(sysTrapHwrIRQ2Handler);
+ 	void		HwrIRQ3Handler(DWord param)
+ 							SYS_TRAP(sysTrapHwrIRQ3Handler);
+ 	void		HwrIRQ4Handler(DWord param)
+ 							SYS_TRAP(sysTrapHwrIRQ4Handler);
+ 	void		HwrIRQ5Handler(DWord param)
+ 							SYS_TRAP(sysTrapHwrIRQ5Handler);
+ 	void		HwrIRQ6Handler(DWord param)
+ 							SYS_TRAP(sysTrapHwrIRQ6Handler);
+ 							
+ 	
+ 	void 		HwrGetRAMMapping(Ptr /*CardInfoPtr*/ cardInfoP, UInt* numBlocksP, 
+ 							DWordPtr physBlockInfoP, DWordPtr logBlockInfoP)
+ 							SYS_TRAP(sysTrapHwrGetRAMMapping);
+ 				
+ 	DWord		HwrMemWritable(VoidPtr addr)
+ 							SYS_TRAP(sysTrapHwrMemWritable);
+ 	
+ 	DWord		HwrMemReadable(VoidPtr addr)
+ 							SYS_TRAP(sysTrapHwrMemReadable);
+ 							
+ 	Err		HwrCursor(Boolean set, Int* modeP, PointType* whereP, PointType* sizeP, 
+ 						UInt* blinkP)
+ 							SYS_TRAP(sysTrapHwrCursor);
+ 	
+ 	void		HwrDelay(ULong	microseconds)
+ 							SYS_TRAP(sysTrapHwrDelay);
+ 	
+ 	void		HwrDoze(Boolean onlyNMI)
+ 							SYS_TRAP(sysTrapHwrDoze);
+ 	
+ 	void		HwrSleep(Boolean untilReset, Boolean emergency)
+ 							SYS_TRAP(sysTrapHwrSleep);
+ 	
+ 	Err		HwrWake(void)
+ 							SYS_TRAP(sysTrapHwrWake);
+ 							
+ 	Err		HwrSetSystemClock(ULong*	freqP)
+ 							SYS_TRAP(sysTrapHwrSetSystemClock);
+ 							
+ 	Err		HwrSetCPUDutyCycle(UInt*	dutyP)
+ 							SYS_TRAP(sysTrapHwrSetCPUDutyCycle);
+ 							
+ 	Err		HwrLCDInit(UInt framePeriod, VoidPtr baseP, UInt width,
+ 							UInt height, UInt depth)
+ 							SYS_TRAP(sysTrapHwrLCDInit);
+ 							
+ 	Err		HwrLCDBaseAddr(Ptr* newAddrP)
+ 							SYS_TRAP(sysTrapHwrLCDBaseAddr);
+ 							
+ 	Err		HwrLCDDrawBitmap(UInt x, UInt y, Ptr bitmapP, Boolean clearFirst)
+ 							SYS_TRAP(sysTrapHwrLCDDrawBitmap);
+ 							
+ 	Err		HwrLCDSleep(Boolean untilReset, Boolean emergency)
+ 							SYS_TRAP(sysTrapHwrLCDSleep);
+ 							
+ 	Err		HwrLCDWake(void)
+ 							SYS_TRAP(sysTrapHwrLCDWake);
+ 							
+ 	Err		HwrTimerInit(UInt timer)
+ 							SYS_TRAP(sysTrapHwrTimerInit);
+ 							
+ 	Err		HwrTimerSleep(UInt timer)
+ 							SYS_TRAP(sysTrapHwrTimerSleep);
+ 							
+ 	Err		HwrTimerWake(UInt timer)
+ 							SYS_TRAP(sysTrapHwrTimerWake);
+ 							
+ 	UInt		HwrBatteryLevel(void)
+ 							SYS_TRAP(sysTrapHwrBatteryLevel);
+ 							
+ 	Boolean	HwrPluggedIn(void)
+ 							SYS_TRAP(sysTrapHwrPluggedIn);
+ 							
+ 	Boolean	HwrEnableDataWrites(void)
+ 							SYS_TRAP(sysTrapHwrEnableDataWrites);
+ 	
+ 	void		HwrDisableDataWrites(void)
+ 							SYS_TRAP(sysTrapHwrDisableDataWrites);
+ 							
+ 	Err		HwrDockSignals(WordPtr inputsP, Word outputSet, Word outputClr)
+ 							SYS_TRAP(sysTrapHwrDockSignals);
+ 	
+ 							
+ #ifdef __cplusplus 
+ }
+ #endif
+ 
+ 
+ /************************************************************
+  * Assembly Function Prototypes
+  *************************************************************/
+ #define	_HwrWake		\
+ 				ASM_SYS_TRAP(sysTrapHwrWake)
+ 
+ 
+ #endif 	//__HARDWARE_H__
+ 
+ #endif 	// NON_PORTABLE
diff -r -c -x *.orig -x *.rej -x #* -x *~ -N orig/gcc-2.7.2.2/PalmOS/Hardware/HardwarePrv.h gcc-2.7.2.2/PalmOS/Hardware/HardwarePrv.h
*** orig/gcc-2.7.2.2/PalmOS/Hardware/HardwarePrv.h	Thu Jan  1 01:00:00 1970
--- gcc-2.7.2.2/PalmOS/Hardware/HardwarePrv.h	Wed Feb 19 16:50:08 1997
***************
*** 0 ****
--- 1,174 ----
+ /*******************************************************************
+  * 							 Pilot Software
+  *
+  *		 Copyright(c) 1994, Palm Computing Inc., All Rights Reserved
+  *
+  *-------------------------------------------------------------------   
+  * FileName:
+  *		HardwarePrv.h
+  *
+  * Description:
+  *		Private Hardware Equates. This header file
+  *  contains equates that are common across all platforms but that 
+  *  change value for each hardware rev and platform.
+  *
+  * History:
+  *   	4/27/95  RM - Created by Ron Marianetti
+  *
+  *******************************************************************/  
+ 
+ #ifdef	NON_PORTABLE	   // So app's don't mistakenly include this
+ 
+ #ifndef __HARDWAREPRV_H__
+ #define __HARDWAREPRV_H__
+ 
+ 
+ // This must be defined on the command line before using this header!!
+ #if HW_TARGET != HW_TARGET_NONE
+ 	#ifndef HW_REV
+ 		#error	THE COMPILER VARIABLE HW_REV MUST BE DEFINED!!
+ 	#endif
+ #endif
+ 
+ 
+ 
+ /***********************************************************************
+  *  Equates for Emulation Mode
+  ***********************************************************************/
+ #if HW_TARGET == HW_TARGET_NONE
+ 
+ #define	hwrCardSize			0x10000000L				// Size of each card slot
+ 
+ // DOLATER.. take this out??? 
+ // Under native mode, this mask can be used to convert a pointer to a card offseš
+ //#define	hwrCardOffsetMask	0x0FFFFFFFL
+ 
+ 
+ #endif
+ 
+ 
+ 
+ /***********************************************************************
+  *  First Rev of the Pilot Hardware
+  ***********************************************************************/
+ #if HW_TARGET == HW_TARGET_TD1
+ 	
+ 
+ //  Define location and setup for the 68328 Dragonball chip
+ #define	hwr68328Base		0xFFFFF000L					// Base address of 68328 
+ 
+ 
+ 
+ // Define the base of card 0 and the size of each card slot.
+ #if HW_REV <= 3
+ #define	hwrCardBase0		0x00800000L					// starts here
+ #define	hwrCardSize			0x00800000L					// Size of each card slot
+ #define	hwrFlashBase		0x00F00000L					// Base of Flash ROM
+ #define	hwrFlashSize		0x00080000L					// Size of Flash ROM
+ #define	hwrCardOffsetMask	0x007FFFFFL					// Used to convert a pointer to a card offset
+ 
+ #else // HW_REV >= 4
+ #define	hwrCardBase0		0x10000000L					// starts here
+ #define	hwrCardSize			0x10000000L					// Size of each card slot
+ #define	hwrFlashBase		0x10C00000L					// Base of Flash ROM
+ #define	hwrFlashSize		0x00080000L					// Size of Flash ROM
+ #define	hwrCardOffsetMask	0x0FFFFFFFL					// Used to convert a pointer to a card offset
+ 
+ #endif
+ 
+ // Define the Flash width
+ #define	hwrROMWidth			2
+ 
+ //  Define location and setup for the 68681 Duart
+ #define	hwrDuartBase		0x10E00000				// Base address of DUART
+ 
+ #define	hwrDuartClock		3686400					// in Hertz (3.6864 MHz)
+  
+ // Setting of ACR register except for baud rate select 
+ // Timer mode - Crystal clock /1
+ #define	hwrDuartACRReg		0x60					
+ 
+ 
+ #endif // 	HW_TARGET == HW_TARGET_TD1
+ 
+ 
+ 
+ 
+ /***********************************************************************
+  *  Motorola 68302 Development board
+  ***********************************************************************/
+ #if HW_TARGET == HW_TARGET_302
+ 
+ // Define # of card slots and base address of each slot
+ #define	hwrNumCardSlots	1							// 1 card slot
+ #define	hwrCardBase0		0x00000000L				// starts at 0
+ #define	hwrCardSize			0x10000000L				// Size of each card slot
+ 
+ // Under native mode, this mask can be used to convert a pointer to a card offseš
+ #define	hwrCardOffsetMask	0x0FFFFFFFL
+ 
+ 
+ //  Define location and setup for the 68681 Duart
+ #define	hwrDuartBase		0x00400000				// Base address of DUART
+ 
+ #define	hwrDuartClock		3686400					// in Hertz (3.6864 MHz)
+ 														
+ #define	hwrDuartIntVec		25							// Interrupt vector number for DUART
+ 
+  
+ // Setting of ACR register except for baud rate select 
+ // Timer mode - Crystal clock /1
+ #define	hwrDuartACRReg		0x60					
+ 
+ 
+ // Define the Flash base address
+ #define	hwrFlashBase		0x00200000L
+ #define	hwrROMWidth			2
+ 
+ 
+ #endif // 	HW_TARGET == HW_TARGET_302
+ 
+ 
+ 
+ 
+ /***********************************************************************
+  *  Motorola 68328 Emulator Development board
+  ***********************************************************************/
+ #if HW_TARGET == HW_TARGET_328EMU
+ 
+ 
+ // Define # of card slots and base address of each slot
+ #define	hwrNumCardSlots	1								// 1 card slot
+ #define	hwrCardBase0		0x00000000L					// starts at 0
+ #define	hwrCardSize			0x10000000L				// Size of each card slot
+ 
+ // Under native mode, this mask can be used to convert a pointer to a card offseš
+ #define	hwrCardOffsetMask	0x0FFFFFFFL
+  
+  
+ // Define location and setup for the 68681 Duart
+ #define	hwrDuartBase		0x00F00000					// Base address of DUART
+ 
+ #define	hwrDuartClock		3686400						// in Hertz (3.6864 MHz)
+ 														
+ #define	hwrDuartIntVec		25								// Interrupt vector number for DUART
+  
+  
+  
+ // Setting of ACR register except for baud rate select
+ // Timer mode - Crystal clock /1
+ #define	hwrDuartACRReg		0x60					
+ 
+ 
+ 
+ // Define the Flash base address
+ #define	hwrFlashBase		0x00400000L
+ #define	hwrROMWidth			2
+ 
+ 
+ 
+ #endif // HW_TARGET == HW_TARGET_328EMU
+ 
+ 
+ #endif 	//__HARDWARE_H__
+ #endif 	// NON_PORTABLE
diff -r -c -x *.orig -x *.rej -x #* -x *~ -N orig/gcc-2.7.2.2/PalmOS/Hardware/HardwareTD1.h gcc-2.7.2.2/PalmOS/Hardware/HardwareTD1.h
*** orig/gcc-2.7.2.2/PalmOS/Hardware/HardwareTD1.h	Thu Jan  1 01:00:00 1970
--- gcc-2.7.2.2/PalmOS/Hardware/HardwareTD1.h	Wed Feb 19 16:50:08 1997
***************
*** 0 ****
--- 1,308 ----
+ /*******************************************************************
+  * 							 Touchdown Software
+  *
+  *		 Copyright(c) 1994, Palm Computing Inc., All Rights Reserved
+  *
+  *-------------------------------------------------------------------  
+  * FileName:
+  *		HardwareTD1.h
+  *
+  * Description:
+  *		Hardware Equates for the TD1 platform. This header file
+  *  contains equates specific to Hardware platform TD1.
+  *  It is included only in the modules "ROMHardwareTD1.c" and
+  *  "AMXHardwareTD1.c".
+  *
+  * History:
+  *   6/13/95  RM - Created by Ron Marianetti
+  *
+  *******************************************************************/  
+ 
+ #ifdef	NON_PORTABLE									// So app's don't mistakenly include this
+ 
+ #ifndef __HARDWARETD1_H__
+ #define __HARDWARETD1_H__
+ 
+ 
+ 
+ #if HW_REV == 1
+ /************************************************************************
+  * Port F Bit settings
+  ************************************************************************/
+ #define	hwrTD1PortFPanelYPOff		0x01			// (L) Vcc to Y Panel
+ #define	hwrTD1PortFPanelYMOn			0x02			// (H) Gnd to Y Panel
+ #define	hwrTD1PortFPanelXPOff		0x04			// (L) Vcc to X Panel
+ #define	hwrTD1PortFPanelXMOn			0x08			// (H) Gnd to X Panel
+ #define	hwrTD1PortFUnused4			0x10			
+ #define	hwrTD1PortFUnused5			0x20			
+ #define	hwrTD1PortFUnused6			0x40			
+ #define	hwrTD1PortFSerialOn			0x80			// (H) Serial driver Enable
+ 
+ 
+ // Configurations of the panel control bits
+ #define	hwrTD1PortFPanelMask			0x0F			// Panel control bits
+ 
+ // Configure for lowest power
+ #define	hwrTD1PortFPanelCfgOff			(hwrTD1PortFPanelYPOff | 		\
+ 												 	 hwrTD1PortFPanelXPOff)
+ 
+ // Configure to generate pen interrupt
+ #define	hwrTD1PortFPanelCfgPenIRQ		(hwrTD1PortFPanelXMOn | 		\
+ 								 				 	 hwrTD1PortFPanelYPOff | 		\
+ 												 	 hwrTD1PortFPanelXPOff)
+ 
+ // Configure to Measure Y Position
+ #define	hwrTD1PortFPanelCfgYMeas		(hwrTD1PortFPanelXMOn | 		\
+ 								 				 	 hwrTD1PortFPanelYPOff)
+ 
+ // Configure to Measure X Position
+ #define	hwrTD1PortFPanelCfgXMeas		(hwrTD1PortFPanelXPOff | 		\
+ 								 				 	 hwrTD1PortFPanelYMOn)
+ 
+ 
+ 
+ /************************************************************************
+  * Port J Bit Assignments
+  ************************************************************************/
+ #define	hwrTD1PortJADCSOff			0x02			// (L) A/D Chip select
+ #define	hwrTD1PortJBattOff			0x10			// (L) Battery Voltage measure 		
+ #define	hwrTD1PortJLCDEnableOn		0x20			// (H) LCD Display On 	
+ #define	hwrTD1PortJLCDVccOff			0x40			// (L) LCD Vcc 
+ #define	hwrTD1PortJLCDVeeOn			0x80			// (H) LCD Vee 
+ 
+ 
+ /************************************************************************
+  * Port K Bit Assignments
+  ************************************************************************/
+ #define	hwrTD1PortKSelfRefOff		0x08			// (L) PSRAM Self Refresh mode
+ #define	hwrTD1PortKSelfRefOffBit	3
+ 
+ 
+ /************************************************************************
+  * Port M Bit Assignments
+  ************************************************************************/
+ #define	hwrTD1PortMVccFail			0x04			// (L) Input indicates 3.3v is too low
+ #define	hwrTD1PortMCardIRQ			0x08			// (L) IRQ3 input from card
+ #define	hwrTD1PortMUnused4			0x10			// Unused (IRQ2)
+ #define	hwrTD1PortMDockButton		0x20			// (L) Sync button from Serial Doc
+ #define	hwrTD1PortMPenIO				0x40			// Pen input/output
+ #define	hwrTD1PortMDockIn				0x80			// (L) Gen. Purpose input from Serial Doc
+ 
+ 
+ 
+ /************************************************************************
+  * SPIM Base Configuration
+  ************************************************************************/
+ #define	hwrTD1SPIMBaseControl		(hwr328SPIMControlRateDiv32 |	\
+ 												 hwr328SPIMControlIntEnable |		\
+ 												 hwr328SPIMControlInvPolarity |	\
+ 												 hwr328SPIMControlOppPhase  |  	\
+ 												 16-1)
+ 
+ 
+ /************************************************************************
+  * Macros for turning write-protection on/off
+  * These are used in-line for MemSemaphoreReserve and MemSemaphoreRelease
+  *  for performance reasons.
+  ************************************************************************/
+ #define	hwrWriteProtectOff()														\
+ 	{																						\
+ 	HwrDBallPtr baseP = (HwrDBallPtr)hwr68328Base;							\
+ 	/* Word			mask;		*/														\
+ 																							\
+ 	/* DOLATER.. take this out....	*/											\
+ 	/* mask = baseP->csAGroupMask;		*/										\
+ 																							\
+ 	/* Clr read-only bit in chip select register for storage area */	\
+ 	baseP->csASelect1 &= ~(0x0008);												\
+ 	baseP->csASelect2 &= ~(0x0008);												\
+ 																							\
+ 	/* DOLATER.. take this out... */												\
+ 	/* baseP->csAGroupMask = mask;	*/											\
+ 	}
+ 
+ #ifndef	BUILD_OPTION_WP_OFF
+ #define	hwrWriteProtectOn()														\
+ 	{																						\
+ 	HwrDBallPtr baseP = (HwrDBallPtr)hwr68328Base;							\
+ 	/* Word			mask;		*/														\
+ 																							\
+ 	/* DOLATER.. take this out....	*/											\
+ 	/* mask = baseP->csAGroupMask;		*/										\
+ 																							\
+ 	/* Set read-only bit in chip select register for storage area */	\
+ 	baseP->csASelect1 |= (0x0008);												\
+ 	baseP->csASelect2 |= (0x0008);												\
+ 																							\
+ 	/* DOLATER.. take this out... */												\
+ 	/* baseP->csAGroupMask = mask;	*/											\
+ 	}
+ #else
+ #define	hwrWriteProtectOn()
+ #endif
+ 
+ 
+ #elif HW_REV >= 2
+ /************************************************************************
+  * Port D Bit settings
+  ************************************************************************/
+ #define	hwrTD1PortDNoExtPower		0x80			// (L) External DC input
+ 
+ /************************************************************************
+  * Port F Bit settings
+  ************************************************************************/
+ #define	hwrTD1PortFPanelYPOff		0x01			// (L) Vcc to Y Panel
+ #define	hwrTD1PortFPanelYMOn			0x02			// (H) Gnd to Y Panel
+ #define	hwrTD1PortFPanelXPOff		0x04			// (L) Vcc to X Panel
+ #define	hwrTD1PortFPanelXMOn			0x08			// (H) Gnd to X Panel
+ #define	hwrTD1PortFLCDEnableOn		0x10			// (H) LCD Display on	
+ #define	hwrTD1PortFLCDVccOff			0x20			// (L) LCD Vcc		
+ #define	hwrTD1PortFLCDVeeOn			0x40			// (H) LCD Vee
+ #define	hwrTD1PortFADCSOff			0x80			// (L) A/D Chip Select
+ 
+ 
+ // Configurations of the panel control bits
+ #define	hwrTD1PortFPanelMask			0x0F			// Panel control bits
+ 
+ // Configure for lowest power
+ #define	hwrTD1PortFPanelCfgOff			(hwrTD1PortFPanelYPOff | 		\
+ 												 	 hwrTD1PortFPanelXPOff)
+ 
+ // Configure to generate pen interrupt
+ #define	hwrTD1PortFPanelCfgPenIRQ		(hwrTD1PortFPanelXMOn | 		\
+ 								 				 	 hwrTD1PortFPanelYPOff | 		\
+ 												 	 hwrTD1PortFPanelXPOff)
+ 
+ // Configure to Measure Y Position
+ #define	hwrTD1PortFPanelCfgYMeas		(hwrTD1PortFPanelXMOn | 		\
+ 								 				 	 hwrTD1PortFPanelYPOff)
+ 
+ // Configure to Measure X Position
+ #define	hwrTD1PortFPanelCfgXMeas		(hwrTD1PortFPanelXPOff | 		\
+ 								 				 	 hwrTD1PortFPanelYMOn)
+ 
+ 
+ /************************************************************************
+  * Port G Bit Assignments
+  ************************************************************************/
+ #define	hwrTD1PortGSerialOn			0x08			// (H) Serial Driver Enable
+ #define	hwrTD1PortGBattOff			0x10			// (L) Battery Voltage Measure
+ #define	hwrTD1PortGRefreshOut		0x20			// (L) Timer 1 output to signal refresh
+ #define	hwrTD1PortGSelfRefOff		0x40			// (L) PSRAM Self Refresh mode
+ #define	hwrTD1PortGSelfRefOffBit	6				//  Bit # for above
+ #define	hwrTD1PortGDockOut1			0x80			// (H) Gen. Purpose output on Serial Doc
+ 
+ 
+ /************************************************************************
+  * Port M Bit Assignments
+  ************************************************************************/
+ #define	hwrTD1PortMVccFail			0x04			// (L) Input indicates 3.3v is too low
+ #define	hwrTD1PortMCardIRQ			0x08			// (L) IRQ3 input from card
+ #define	hwrTD1PortMUnused4			0x10			// Unused (IRQ2)
+ #define	hwrTD1PortMDockButton		0x20			// (L) Sync button from Serial Doc
+ #define	hwrTD1PortMPenIO				0x40			// Pen input/output
+ #define	hwrTD1PortMDockIn				0x80			// (L) Gen. Purpose input from Serial Doc
+ 
+ 
+ 
+ /************************************************************************
+  * SPIM Base Configuration
+  ************************************************************************/
+ #define	hwrTD1SPIMBaseControl		(hwr328SPIMControlRateDiv16 |		\
+ 												 hwr328SPIMControlIntEnable |		\
+ 												 hwr328SPIMControlInvPolarity |	\
+ 												 hwr328SPIMControlOppPhase  |  	\
+ 												 16-1)
+ 
+ 
+ /************************************************************************
+  * Macros for turning write-protection on/off
+  * These are used in-line for MemSemaphoreReserve and MemSemaphoreRelease
+  *  for performance reasons.
+  ************************************************************************/
+ #define	hwrWriteProtectOff()														\
+ 	{																						\
+ 	HwrDBallPtr baseP = (HwrDBallPtr)hwr68328Base;							\
+ 	/* Word			mask; */															\
+ 																							\
+ 	/* DOLATER.. take this out....	*/											\
+ 	/* mask = baseP->csAGroupMask;	*/											\
+ 																							\
+ 	/* Clr read-only bit in chip select register for storage area */	\
+ 	baseP->csASelect1 &= ~(0x0008);												\
+ 	baseP->csASelect3 &= ~(0x0008);												\
+ 																							\
+ 	/* DOLATER.. take this out... */												\
+ 	/*baseP->csAGroupMask = mask;	*/												\
+ 	}
+ 
+ #ifndef	BUILD_OPTION_WP_OFF
+ #define	hwrWriteProtectOn()														\
+ 	{																						\
+ 	HwrDBallPtr baseP = (HwrDBallPtr)hwr68328Base;							\
+ 	/* Word			mask; */															\
+ 																							\
+ 	/* DOLATER.. take this out....	*/											\
+ 	/* mask = baseP->csAGroupMask;	*/											\
+ 																							\
+ 	/* Set read-only bit in chip select register for storage area */	\
+ 	baseP->csASelect1 |= (0x0008);												\
+ 	baseP->csASelect3 |= (0x0008);												\
+ 																							\
+ 	/* DOLATER.. take this out... */												\
+ 	/*baseP->csAGroupMask = mask;	*/												\
+ 	}
+ #else
+ #define	hwrWriteProtectOn()	
+ #endif
+ 
+ #else // HW_REV==2
+ 	#error "Compiler variable HW_REV not valid!!!"
+ #endif
+ 
+ 
+ /************************************************************************
+  *Initial values for the PLL. We set the system clock to be VCO/2 so
+  *  the system clock speed becomes:
+  *
+  *  32768 * ((hwrTD1FreqSelP + 1) * 14 + hwrTD1FreqSelQ + 1)
+  *   --------------------------------------------------------
+  *                            2
+  ************************************************************************/
+ // NON-ASIC versions must run at 8 Mhz.
+ #if HW_REV < 4
+ #define	hwrTD1PLLControl			(hwr328PLLControlClkEn | 			\
+ 											 hwr328PLLControlSysVCODiv2 |		\
+ 											 hwr328PLLControlPixVCODiv2)
+ //#define	hwrTD1FreqSelQ				0x05
+ #define	hwrTD1FreqSelQ				0x07		// vmk 11/20/95 tunes clock freq for 38400 baud,
+ 														// allowing standard baud rates 2400-57600 to function
+ //#define	hwrTD1FreqSelP				0x23
+ #define	hwrTD1FreqSelP				0x24
+ #define	hwrTD1Frequency			(32768*((hwrTD1FreqSelP+1)*14+hwrTD1FreqSelQ+1)/2)
+ 
+ // OLD ASIC versions must run between 10 and 12.5 Mhz.
+ #elif HW_REV == 4
+ #define	hwrTD1PLLControl			(hwr328PLLControlClkEn | 			\
+ 											 hwr328PLLControlSysVCODiv1 | 	\
+ 											 hwr328PLLControlPixVCODiv1)
+ #define	hwrTD1FreqSelQ				0x05
+ #define	hwrTD1FreqSelP				0x19
+ #define	hwrTD1Frequency			(32768*((hwrTD1FreqSelP+1)*14+hwrTD1FreqSelQ+1)/1)
+ 
+ 
+ // NEW ASIC versions run at 16.580608 Mhz
+ #else 
+ #define	hwrTD1PLLControl			(hwr328PLLControlClkEn | 			\
+ 											 hwr328PLLControlSysVCODiv1 | 	\
+ 											 hwr328PLLControlPixVCODiv1)
+ #define	hwrTD1FreqSelQ				0x01
+ #define	hwrTD1FreqSelP				0x23
+ #define	hwrTD1Frequency			(32768*((hwrTD1FreqSelP+1)*14+hwrTD1FreqSelQ+1)/1)
+ #endif
+ 
+ 
+  
+ #endif 	//__HARDWARETD1_H__
+ 
+ #endif 	// NON_PORTABLE
diff -r -c -x *.orig -x *.rej -x #* -x *~ -N orig/gcc-2.7.2.2/PalmOS/Hardware/M68328Hwr.h gcc-2.7.2.2/PalmOS/Hardware/M68328Hwr.h
*** orig/gcc-2.7.2.2/PalmOS/Hardware/M68328Hwr.h	Thu Jan  1 01:00:00 1970
--- gcc-2.7.2.2/PalmOS/Hardware/M68328Hwr.h	Wed Feb 19 16:50:08 1997
***************
*** 0 ****
--- 1,638 ----
+ /*******************************************************************
+  * 							 Touchdown Software
+  *
+  *		 Copyright(c) 1994, Palm Computing Inc., All Rights Reserved
+  *
+  *-------------------------------------------------------------------  
+  * FileName:
+  *		M68328Hwr.h
+  *
+  * Description:
+  *		Hardware Equates for the Motorola 68328 Dragonball chip 
+  *
+  * History:
+  *   	4/19/95  RM		- Created by Ron Marianetti
+  *		5/15/95	VMK	- Added macros for RTC bits
+  *
+  *******************************************************************/  
+ 
+ #ifdef	NON_PORTABLE						// So apps don't include this...
+ 
+ 
+ #ifndef	__M68328HWR_H__
+ #define	__M68328HWR_H__
+ 
+ 
+ #include <Common.h>							// Touchdown includes
+ 
+ 
+ /***********************************************************************
+  * Motorola 68328  registers
+  ***********************************************************************/
+ typedef struct HwrDBallType {
+ 
+ 	Byte		scr;								// $000: System Control Register
+ 	Byte											___filler1[0xFF];				 
+ 	
+ 	Word		csAGroupBase;					// $100: Chip Select Group A Base Register
+ 	Word		csBGroupBase;					// $102: Chip Select Group B Base Register
+ 	Word		csCGroupBase;					// $104: Chip Select Group C Base Register
+ 	Word		csDGroupBase;					// $106: Chip Select Group D Base Register
+ 	
+ 	Word		csAGroupMask;					// $108: Chip Select Group A Mask Register
+ 	Word		csBGroupMask;					// $10A: Chip Select Group B Mask Register
+ 	Word		csCGroupMask;					// $10C: Chip Select Group C Mask Register
+ 	Word		csDGroupMask;					// $10E: Chip Select Group D Mask Register
+ 	
+ 	DWord		csASelect0;						// $110: Group A Chip Select 0 Register
+ 	DWord		csASelect1;						// $114: Group A Chip Select 1 Register
+ 	DWord		csASelect2;						// $118: Group A Chip Select 2 Register
+ 	DWord		csASelect3;						// $11C: Group A Chip Select 3 Register
+ 	
+ 	DWord		csBSelect0;						// $120: Group B Chip Select 0 Register
+ 	DWord		csBSelect1;						// $124: Group B Chip Select 1 Register
+ 	DWord		csBSelect2;						// $128: Group B Chip Select 2 Register
+ 	DWord		csBSelect3;						// $12C: Group B Chip Select 3 Register
+ 	
+ 	DWord		csCSelect0;						// $130: Group C Chip Select 0 Register
+ 	DWord		csCSelect1;						// $134: Group C Chip Select 1 Register
+ 	DWord		csCSelect2;						// $138: Group C Chip Select 2 Register
+ 	DWord		csCSelect3;						// $13C: Group C Chip Select 3 Register
+ 	
+ 	DWord		csDSelect0;						// $140: Group D Chip Select 0 Register
+ 	DWord		csDSelect1;						// $144: Group D Chip Select 1 Register
+ 	DWord		csDSelect2;						// $148: Group D Chip Select 2 Register
+ 	DWord		csDSelect3;						// $14C: Group D Chip Select 3 Register
+ 	
+ 	Word		csDebug;							// $150: Chip Select debug register
+ 	Byte											___filler2[0x200-0x152];		
+ 	
+ 	Word		pllControl;						// $200: PLL Control Register
+ 	Word		pllFreqSel;						// $202: PLL Frequency Select Register
+ 	Word		pllTest;							// $204: PLL Test Register
+ 	Byte											__filler44;
+ 	Byte		pwrControl;						// $207: Power Control Register
+ 	
+ 	Byte											___filler3[0x300-0x208];
+ 	
+ 	Byte		intVector;						// $300: Interrupt Vector Register
+ 	Byte											___filler4;
+ 	Word		intControl;						// $302: Interrupt Control Register
+ 	Word		intMaskHi;						// $304: Interrupt Mask Register/HIGH word
+ 	Word		intMaskLo;						// $306: Interrupt Mask Register/LOW word
+ 	Word		intWakeupEnHi;					// $308: Interrupt Wakeup Enable Register
+ 	Word		intWakeupEnLo;					// $30A: Interrupt Wakeup Enable Register
+ 	Word		intStatusHi;					// $30C: Interrupt Status Register/HIGH word
+ 	Word		intStatusLo;					// $30E: Interrupt Status Register/LOW word
+ 	Word		intPendingHi;					// $310: Interrupt Pending Register
+ 	Word		intPendingLo;					// $312: Interrupt Pending Register
+ 	
+ 	Byte 											___filler4a[0x400-0x314];
+ 	
+ 	Byte		portADir;						// $400: Port A Direction Register
+ 	Byte		portAData;						// $401: Port A Data Register
+ 	Byte											___filler5;
+ 	Byte		portASelect;					// $403: Port A Select Register
+ 	
+ 	Byte											___filler6[4];
+ 	
+ 	Byte		portBDir;						// $408: Port B Direction Register
+ 	Byte		portBData;						// $409: Port B Data Register
+ 	Byte											___filler7;
+ 	Byte		portBSelect;					// $40B: Port B Select Register	
+ 	
+ 	Byte											___filler8[4];
+ 	
+ 	Byte		portCDir;						// $410: Port C Direction Register
+ 	Byte		portCData;						// $411: Port C Data Register
+ 	Byte											___filler9;
+ 	Byte		portCSelect;					// $413: Port C Select Register	
+ 	
+ 	Byte											___filler10[4];
+ 	
+ 	Byte		portDDir;						// $418: Port D Direction Register
+ 	Byte		portDData;						// $419: Port D Data Register
+ 	Byte		portDPullupEn;					// $41A: Port D Pull-up Enable
+ 	Byte											___filler11;
+ 	Byte		portDPolarity;					// $41C: Port D Polarity Register
+ 	Byte		portDIntReqEn;					// $41D: Port D Interrupt Request Enable
+ 	Byte											___filler12;
+ 	Byte		portDIntEdge;					// $41F: Port D IRQ Edge Register
+ 	
+ 	Byte		portEDir;						// $420: Port E Direction Register
+ 	Byte		portEData;						// $421: Port E Data Register
+ 	Byte											___filler13;
+ 	Byte		portESelect;					// $423: Port E Select Register
+ 	
+ 	Byte											___filler14[4];
+ 	
+ 	Byte		portFDir;						// $428: Port F Direction Register
+ 	Byte		portFData;						// $429: Port F Data Register
+ 	Byte		portFPullupEn;					// $42A: Port F Pull-up Enable
+ 	Byte		portFSelect;					// $42B: Port F Select Register
+ 	
+ 	Byte											___filler16[4];
+ 	
+ 	Byte		portGDir;						// $430: Port G Direction Register
+ 	Byte		portGData;						// $431: Port G Data Register
+ 	Byte		portGPullupEn;					// $432: Port G Pull-up Enable
+ 	Byte		portGSelect;					// $433: Port G Select Register
+ 	
+ 	Byte											___filler18[4];
+ 	
+ 	Byte		portJDir;						// $438: Port J Direction Register
+ 	Byte		portJData;						// $439: Port J Data Register
+ 	Byte											___filler19;
+ 	Byte		portJSelect;					// $43B: Port J Select Register
+ 	
+ 	Byte											___filler19a[4];
+ 	
+ 	Byte		portKDir;						// $440: Port K Direction Register
+ 	Byte		portKData;						// $441: Port K Data Register
+ 	Byte		portKPullupEn;					// $442: Port K Pull-up Enable
+ 	Byte		portKSelect;					// $443: Port K Select Register
+ 	
+ 	Byte											___filler21[4];
+ 	
+ 	Byte		portMDir;						// $448: Port M Direction Register
+ 	Byte		portMData;						// $449: Port M Data Register
+ 	Byte		portMPullupEn;					// $44A: Port M Pull-up Enable Register
+ 	Byte		portMSelect;					// $44B: Port M Select Register
+ 	
+ 	Byte											___filler22[4];
+ 	
+ 	Byte											___filler23[0x500-0x450];
+ 	
+ 	Word		pwmControl;						// $500: PWM Control Register
+ 	Word		pwmPeriod;						// $502: PWM Period Register
+ 	Word		pwmWidth;						// $504: PWM Width Register
+ 	Word		pwmCounter;						// $506: PWM Counter
+ 	
+ 	Byte											___filler24[0x600-0x508];
+ 	
+ 	Word		tmr1Control;					// $600: Timer 1 Control Register
+ 	Word		tmr1Prescaler;					// $602: Timer 1 Prescaler Register
+ 	Word		tmr1Compare;					// $604: Timer 1 Compare Register
+ 	Word		tmr1Capture;					// $606: Timer 1 Capture Register
+ 	Word		tmr1Counter;					// $608: Timer 1 Counter Register
+ 	Word		tmr1Status;						// $60A: Timer 1 Status Register
+ 	
+ 	Word		tmr2Control;					// $60C: Timer 2 Control Register
+ 	Word		tmr2Prescaler;					// $60E: Timer 2 Prescaler Register
+ 	Word		tmr2Compare;					// $610: Timer 2 Compare Register
+ 	Word		tmr2Capture;					// $612: Timer 2 Capture Register
+ 	Word		tmr2Counter;					// $614: Timer 2 Counter Register
+ 	Word		tmr2Status;						// $616: Timer 2 Status Register
+ 	
+ 	Word		wdControl;						// $618: Watchdog Control Register
+ 	Word		wdReference;					// $61A: Watchdog Reference Register
+ 	Word		wdCounter;						// $61C: Watchdog Counter
+ 	
+ 	Byte											___filler25[0x700-0x61E];
+ 	
+ 	Word		spiSlave;						// $700: SPI Slave Register
+ 	
+ 	Byte											___filler26[0x800-0x702];
+ 	
+ 	Word		spiMasterData;					// $800: SPI Master Data Register
+ 	Word		spiMasterControl;				// $802: SPI Master Control Register
+ 	
+ 	Byte											___filler27[0x900-0x804];
+ 	
+ 	Word		uControl;						// $900: Uart Control Register
+ 	Word		uBaud;							// $902: Uart Baud Control Register
+ 	Word		uReceive;						// $904: Uart Receive Register
+ 	Word		uTransmit;						// $906: Uart Transmit Register
+ 	Word		uMisc;							// $908: Uart Miscellaneous Register
+ 	
+ 	Byte											___filler28[0xA00-0x90A];
+ 	
+ 	DWord		lcdStartAddr;					// $A00: Screen Starting Address Register
+ 	Byte											___filler29;
+ 	Byte		lcdPageWidth;					// $A05: Virtual Page Width Register
+ 	Byte											___filler30[2];
+ 	Word		lcdScreenWidth;				// $A08: Screen Width Register
+ 	Word		lcdScreenHeight;				// $A0A: Screen Height Register
+ 	Byte											___filler31[0xA18-0xA0C];
+ 	Word		lcdCursorXPos;					// $A18: Cursor X Position
+ 	Word		lcdCursorYPos;					// $A1A:	Cursor Y Position
+ 	Word		lcdCursorWidthHeight;		// $A1C: Cursor Width and Height
+ 	Byte											___filler32;
+ 	Byte		lcdBlinkControl;				// $A1F: Blink Control Register
+ 	Byte		lcdPanelControl;				// $A20: Panel Interface Control Register
+ 	Byte		lcdPolarity;					// $A21: Polarity Config Register
+ 	Byte											___filler33;						
+ 	Byte		lcdACDRate;						// $A23: ACD (M) Rate Control Register
+ 	Byte											___filler34;
+ 	Byte		lcdPixelClock;					// $A25: Pixel Clock Divider Register
+ 	Byte											___filler35;
+ 	Byte		lcdClockControl;				// $A27: Clocking Control Register
+ 	Byte											___filler36;
+ 	Byte		lcdLastBufferAddr;			// $A29: Last Buffer Address Register
+ 	Byte											___filler37;
+ 	Byte		lcdOctetTermCount;			// $A2B: Octet Terminal Count Register
+ 	Byte											___filler38;
+ 	Byte		lcdPanningOffset;				// $A2D: Panning Offset Register
+ 	Byte											___filler39[3];
+ 	Byte		lcdFrameRate;					// $A31: Frame Rate Control Modulation Register
+ 	Word		lcdGrayPalette;				// $A32: Gray Palette Mapping Register
+ 	Byte		lcdReserved;					// $A34: Reserved
+ 	
+ 	Byte											___filler40[0xB00-0xA35];
+ 	
+ 	DWord		rtcHourMinSec;					// $B00: RTC Hours, Minutes, Seconds Register
+ 	DWord		rtcAlarm;						// $B04: RTC Alarm Register
+ 	DWord		rtcReserved;					// $B08: RTC Reserved
+ 	Word		rtcControl;						// $B0C: RTC Control Register
+ 	Word		rtcIntStatus;					// $B0E: RTC Interrupt Status Register
+ 	Word		rtcIntEnable;					// $B10: RTC Interrupt Enable Register
+ 	Word		stopWatch;						// $B12: Stopwatch Minutes
+ 	
+ 	} HwrDBallType;
+ 
+ typedef	volatile   HwrDBallType*	HwrDBallPtr;
+ 
+ 
+ /************************************************************************
+  * LCD Controller Bits
+  ************************************************************************/
+ #define	hwr328LcdCursorXPosCtlMask			0xC000
+ 	#define	hwr328LcdCursorXPosCtlTrans	0x0000
+ 	#define	hwr328LcdCursorXPosCtlBlack	0x4000
+ 	#define	hwr328LcdCursorXPosCtlReverse	0x8000
+ 	
+ #define	hwr328LcdBlinkControlEnable		0x80 
+ 
+ #define	hwr328LcdPanelControlBusMask		0x06
+ 	#define	hwr328LcdPanelControlBus1Bit	0x00
+ 	#define	hwr328LcdPanelControlBus2Bit	0x02
+ 	#define	hwr328LcdPanelControlBus4Bit	0x04
+ #define	hwr328LcdPanelControlGrayScale	0x01
+ 
+ #define	hwr328LcdPolarityShiftClock		0x08
+ #define	hwr328LcdPolarityFLM					0x04
+ #define	hwr328LcdPolarityLP					0x02
+ #define	hwr328LcdPolarityPixel				0x01
+ 
+ #define	hwr328LcdClockControlEnable			0x80
+ #define	hwr328LcdClockControl16WordBursts	0x40
+ #define	hwr328LcdClockControlBurstRateMask	0x30
+ // Old dragonball allows up to 4 clocks/word
+ #if HW_REV < 3
+ 	#define	hwr328LcdClockControlBurstRate1		0x00
+ 	#define	hwr328LcdClockControlBurstRate2		0x10
+ 	#define	hwr328LcdClockControlBurstRate3		0x20
+ 	#define	hwr328LcdClockControlBurstRate4		0x30
+ // New dragonball allows up to 16 clocks/word
+ #else
+ 	#define	hwr328LcdClockControlBurstRate1		0x00
+ 	#define	hwr328LcdClockControlBurstRate2		0x04
+ 	#define	hwr328LcdClockControlBurstRate3		0x08
+ 	#define	hwr328LcdClockControlBurstRate4		0x0C
+ 	#define	hwr328LcdClockControlBurstRate5		0x10
+ 	#define	hwr328LcdClockControlBurstRate6		0x14
+ 	#define	hwr328LcdClockControlBurstRate7		0x18
+ 	#define	hwr328LcdClockControlBurstRate8		0x1C
+ 	#define	hwr328LcdClockControlBurstRate9		0x20
+ 	#define	hwr328LcdClockControlBurstRate10		0x24
+ 	#define	hwr328LcdClockControlBurstRate11		0x28
+ 	#define	hwr328LcdClockControlBurstRate12		0x2C
+ 	#define	hwr328LcdClockControlBurstRate13		0x30
+ 	#define	hwr328LcdClockControlBurstRate14		0x34
+ 	#define	hwr328LcdClockControlBurstRate15		0x38
+ 	#define	hwr328LcdClockControlBurstRate16		0x3C
+ #endif	
+ #define	hwr328LcdClockControl8BitBus			0x02
+ #define	hwr328LcdClockControlPixelClkSrc		0x01
+ 
+ 
+ /************************************************************************
+  * Interrupt Controller Bits
+  ************************************************************************/
+ // intMaskHi bits
+ #define	hwr328IntHiNMI							0x0080
+ #define	hwr328IntHiTimer1						0x0040
+ #define	hwr328IntHiSPIS						0x0020
+ #define	hwr328IntHiPen							0x0010
+ #define	hwr328IntHiIRQ6						0x0008
+ #define	hwr328IntHiIRQ3						0x0004
+ #define	hwr328IntHiIRQ2						0x0002
+ #define	hwr328IntHiIRQ1						0x0001
+ 
+ //NOTE: Due to a bug in early rev's of the DragonBall, the clear bits for
+ /// IRQ1,2,3,6 are different than the indicator bits
+ #define	hwr328IntHiIRQ6Clr					0x0001
+ #define	hwr328IntHiIRQ3Clr					0x0002
+ #define	hwr328IntHiIRQ2Clr					0x0004
+ #define	hwr328IntHiIRQ1Clr					0x0008
+ 
+ // intMaskLo bits
+ #define	hwr328IntLoInt7						0x8000
+ #define	hwr328IntLoInt6						0x4000
+ #define	hwr328IntLoInt5						0x2000
+ #define	hwr328IntLoInt4						0x1000
+ #define	hwr328IntLoInt3						0x0800
+ #define	hwr328IntLoInt2						0x0400
+ #define	hwr328IntLoInt1						0x0200
+ #define	hwr328IntLoInt0						0x0100
+ #define	hwr328IntLoAllKeys					0xFF00
+ #define	hwr328IntLoInt0Bit					8
+ #define	hwr328IntLoPWM							0x0080
+ #define	hwr328IntLoPWMBit						7
+ #define	hwr328IntLoKbd							0x0040
+ #define	hwr328IntLoLCDC						0x0020
+ #define	hwr328IntLoRTC							0x0010
+ #define	hwr328IntLoRTCBit						4
+ #define	hwr328IntLoWDT							0x0008
+ #define	hwr328IntLoUART						0x0004
+ #define	hwr328IntLoUARTBit					2
+ #define	hwr328IntLoTimer2						0x0002
+ #define	hwr328IntLoTimer2Bit					1
+ #define	hwr328IntLoSPIM						0x0001
+ 
+ // intControl bits
+ // NOTE: These are different (at least in version 0G58E) that documented in the
+ //  User's manual
+ #define	hwr328IntCtlEdge1						0x0800	
+ #define	hwr328IntCtlEdge2						0x0400
+ #define	hwr328IntCtlEdge3						0x0200
+ #define	hwr328IntCtlEdge6						0x0100
+ #define	hwr328IntCtlPol1						0x8000	
+ #define	hwr328IntCtlPol2						0x4000
+ #define	hwr328IntCtlPol3						0x2000
+ #define	hwr328IntCtlPol6						0x1000
+ 
+ 
+ /************************************************************************
+  * Timer bits
+  ************************************************************************/
+ #define	hwr328TmrControlUnused						0xFE00
+ #define	hwr328TmrControlFreeRun						0x0100
+ #define	hwr328TmrControlCaptureEdgeMask			0x00C0
+ 	#define	hwr328TmrControlCaptureEdgeNone		0x0000
+ 	#define	hwr328TmrControlCaptureEdgeRising	0x0040
+ 	#define	hwr328TmrControlCaptureEdgeFalling	0x0080
+ 	#define	hwr328TmrControlCaptureEdgeBoth		0x00C0
+ #define	hwr328TmrControlOutputModeToggle			0x0020
+ #define	hwr328TmrControlEnInterrupt				0x0010
+ #define	hwr328TmrControlClkSrcMask					0x000E
+ 	#define	hwr328TmrControlClkSrcStop				0x0000
+ 	#define	hwr328TmrControlClkSrcSys				0x0002
+ 	#define	hwr328TmrControlClkSrcSysBy16			0x0004
+ 	#define	hwr328TmrControlClkSrcTIN				0x0006
+ 	#define	hwr328TmrControlClkSrc32KHz			0x0008
+ #define	hwr328TmrControlEnable						0x0001
+ 
+ #define	hwr328TmrStatusCapture						0x0002
+ #define	hwr328TmrStatusCaptureBit					1
+ #define	hwr328TmrStatusCompare						0x0001
+ #define	hwr328TmrStatusCompareBit					0
+ 
+ 
+ /************************************************************************
+  * 68328 Serial Port Register Bits
+  ************************************************************************/
+ // uControl Register
+ #define	hwr328UControlUARTEnable			0x8000
+ #define	hwr328UControlRxEnable				0x4000
+ #define	hwr328UControlTxEnable				0x2000
+ #define	hwr328UControlRxClock1x				0x1000
+ #define	hwr328UControlParityEn				0x0800
+ #define	hwr328UControlParityOdd				0x0400
+ #define	hwr328UControlStopBits2				0x0200
+ #define	hwr328UControlDataBits8				0x0100
+ #define	hwr328UControlGPIODeltaEn			0x0080
+ #define	hwr328UControlCTSDeltaEn			0x0040
+ #define	hwr328UControlRxFullEn				0x0020
+ #define	hwr328UControlRxHalfEn				0x0010
+ #define	hwr328UControlRxRdyEn				0x0008
+ #define	hwr328UControlTxEmptyEn				0x0004
+ #define	hwr328UControlTxHalfEn				0x0002
+ #define	hwr328UControlTxAvailEn				0x0001
+ 
+ #define	hwr328UControlEnableAll			   (hwr328UControlUARTEnable |  	\
+ 														 hwr328UControlRxEnable |		\
+ 														 hwr328UControlTxEnable)
+ 
+ // uBaud Register
+ #define	hwr328UBaudGPIODelta					0x8000
+ #define	hwr328UBaudGPIOData					0x4000
+ #define	hwr328UBaudGPIODirOut				0x2000
+ #define	hwr328UBaudGPIOSrcBaudGen			0x1000
+ #define	hwr328UBaudBaudSrcGPIO				0x0800
+ #define	hwr328UBaudDivider					0x0700
+ #define	hwr328UBaudPrescaler					0x003F
+ 
+ #define	hwr328UBaudDivideBitOffset			8
+ 
+ 
+ // uReceive Register
+ #define	hwr328UReceiveFIFOFull				0x8000
+ #define	hwr328UReceiveFIFOHalf				0x4000
+ #define	hwr328UReceiveDataRdy				0x2000
+ #define	hwr328UReceiveDataRdyBit			13
+ #define	hwr328UReceiveOverrunErr			0x0800
+ #define	hwr328UReceiveOverrunErrBit		11
+ #define	hwr328UReceiveFrameErr				0x0400
+ #define	hwr328UReceiveFrameErrBit			10
+ #define	hwr328UReceiveBreakErr				0x0200
+ #define	hwr328UReceiveBreakErrBit			9
+ #define	hwr328UReceiveParityErr				0x0100
+ #define	hwr328UReceiveParityErrBit			8
+ #define	hwr328UReceiveData					0x00FF
+ 
+ #define	hwr328UReceiveErrsMask				(hwr328UReceiveOverrunErr |	\
+ 														 hwr328UReceiveFrameErr |		\
+ 														 hwr328UReceiveBreakErr |		\
+ 														 hwr328UReceiveParityErr)
+ 
+ // uTransmit Register
+ #define	hwr328UTransmitFIFOEmpty			0x8000
+ #define	hwr328UTransmitFIFOHalf				0x4000
+ #define	hwr328UTransmitTxAvail				0x2000
+ #define	hwr328UTransmitSendBreak			0x1000
+ #define	hwr328UTransmitIgnoreCTS			0x0800
+ #define	hwr328UTransmitCTSStatus			0x0200
+ #define	hwr328UTransmitCTSDelta				0x0100
+ #define	hwr328UTransmitData					0x00FF
+ 
+ // uMisc Register
+ #define	hwr328UMiscClkSrcGPIO				0x4000
+ #define	hwr328UMiscForceParityErr			0x2000
+ #define	hwr328UMiscLoopback					0x1000
+ #define	hwr328UMiscReservedMask				0x8F00
+ #define	hwr328UMiscRTSThruFIFO				0x0080
+ #define	hwr328UMiscRTSOut						0x0040
+ #define	hwr328UMiscIRDAEn						0x0020
+ #define	hwr328UMiscLoopIRDA					0x0010
+ #define	hwr328UMiscUnused						0x000F
+ 
+ 
+ 
+ /************************************************************************
+  * PWM Bits
+  ************************************************************************/
+ // PWM register bits of interest
+ #define	hwr328PWMControlEnable				0x0010
+ #define	hwr328PWMControlEnableIRQ			0x4000
+ #define	hwr328PWMControlLoad					0x0100
+ #define	hwr328PWMIRQStatus					0x8000
+ // PWM divider chain output selectors
+ #define	hwr328PWMControlDivMask				0x0007
+ #define	hwr328PWMControlDivBy2				0x0
+ #define	hwr328PWMControlDivBy4				0x1
+ #define	hwr328PWMControlDivBy8				0x2
+ #define	hwr328PWMControlDivBy16				0x3
+ #define	hwr328PWMControlDivBy32				0x4
+ #define	hwr328PWMControlDivBy64				0x5
+ #define	hwr328PWMControlDivBy128			0x6
+ #define	hwr328PWMControlDivBy256			0x7
+ 
+ 
+ /************************************************************************
+  * PLL Bits
+  ************************************************************************/
+ #define	hwr328PLLControlDisable				0x0008
+ #define	hwr328PLLControlClkEn				0x0010
+ 
+ #define	hwr328PLLControlSysVCODiv2			0x0000
+ #define	hwr328PLLControlSysVCODiv4			0x0100
+ #define	hwr328PLLControlSysVCODiv8			0x0200
+ #define	hwr328PLLControlSysVCODiv16		0x0300
+ #define	hwr328PLLControlSysVCODiv1			0x0400
+ 
+ #define	hwr328PLLControlPixVCODiv2			0x0000  
+ #define	hwr328PLLControlPixVCODiv4			0x080
+ #define	hwr328PLLControlPixVCODiv8			0x1000
+ #define	hwr328PLLControlPixVCODiv16		0x1800
+ #define	hwr328PLLControlPixVCODiv1			0x2000
+ 
+ /************************************************************************
+  * Real Time Clock (RTC) Bits
+  ************************************************************************/
+ 
+ // RTC Control Register (RTCCTL) bits
+ #define hwr328RTCControlRTCEnable				0x80
+ #define hwr328RTCControlRefSelMask				0x20
+ #define hwr328RTCControlRefSel38400				0x20		// 38.4 kHz reference frequency
+ #define hwr328RTCControlRefSel32768				0x00		// 32.768 kHz reference frequency
+ 
+ // RTC Interrupt Enable Register (RTCIENR) bits
+ #define hwr328RTCIntEnableSec						0x10
+ #define hwr328RTCIntEnable24Hr					0x08
+ #define hwr328RTCIntEnableAlarm					0x04
+ #define hwr328RTCIntEnableMinute					0x02
+ #define hwr328RTCIntEnableStopWatch				0x01
+ 
+ // RTC Interrupt Status Register bits
+ #define hwr328RTCIntStatusSec						0x10
+ #define hwr328RTCIntStatus24Hr					0x08
+ #define hwr328RTCIntStatusAlarm					0x04
+ #define hwr328RTCIntStatusMinute					0x02
+ #define hwr328RTCIntStatusStopWatch				0x01
+ 
+ // RTC Alarm register (RTCALRM) masks and offsets
+ #define hwr328RTCAlarmSecondsMask				0x0000003fL
+ #define hwr328RTCAlarmSecondsOffset				0
+ #define hwr328RTCAlarmMinutesMask				0x003f0000L
+ #define hwr328RTCAlarmMinutesOffset				16
+ #define hwr328RTCAlarmHoursMask					0x1f000000L
+ #define hwr328RTCAlarmHoursOffset				24
+ 
+ // RTC hours/minutes/seconds register (RTCHMS) masks and offsets
+ #define hwr328RTCHourMinSecSecondsMask			0x0000003fL
+ #define hwr328RTCHourMinSecSecondsOffset		0
+ #define hwr328RTCHourMinSecMinutesMask			0x003f0000L
+ #define hwr328RTCHourMinSecMinutesOffset		16
+ #define hwr328RTCHourMinSecHoursMask			0x1f000000L
+ #define hwr328RTCHourMinSecHoursOffset			24
+ 
+ 
+ /************************************************************************
+  * SPI Master bits
+  ************************************************************************/
+ #define	hwr328SPIMControlRateMask			0xE000
+ 	#define	hwr328SPIMControlRateDiv4			0x0000
+ 	#define	hwr328SPIMControlRateDiv8			0x2000
+ 	#define	hwr328SPIMControlRateDiv16			0x4000
+ 	#define	hwr328SPIMControlRateDiv32			0x6000
+ 	#define	hwr328SPIMControlRateDiv64			0x8000
+ 	#define	hwr328SPIMControlRateDiv128		0xA000
+ 	#define	hwr328SPIMControlRateDiv256		0xC000
+ 	#define	hwr328SPIMControlRateDiv512		0xE000
+ #define	hwr328SPIMControlEnable				0x0200
+ #define	hwr328SPIMControlExchange			0x0100
+ #define	hwr328SPIMControlIntStatus			0x0080
+ #define	hwr328SPIMControlIntEnable			0x0040
+ #define	hwr328SPIMControlOppPhase			0x0020
+ #define	hwr328SPIMControlInvPolarity		0x0010
+ #define	hwr328SPIMControlBitsMask			0x000F
+ 
+ 
+ /************************************************************************
+  * I/O Port C pins
+  ************************************************************************/
+ #define	hwr328PortCMOClk						0x01
+ #define	hwr328PortCUDS							0x02
+ #define	hwr328PortCLDS							0x04
+ #define	hwr328PortCNMI							0x10
+ #define	hwr328PortCDTack						0x20
+ #define	hwr328PortCPcmciaWE					0x40
+ 
+ 
+ /************************************************************************
+  * I/O Port G pins
+  ************************************************************************/
+ #define	hwr328PortGUartTxD					0x01
+ #define	hwr328PortGUartRxD					0x02
+ #define	hwr328PortGPwmOut						0x04
+ #define	hwr328PortGTOut2						0x08
+ #define	hwr328PortGTIn2						0x10
+ #define	hwr328PortGTOut1						0x20
+ #define	hwr328PortGTIn1						0x40
+ #define	hwr328PortGRtcOut						0x80
+ 
+ 
+ /************************************************************************
+  * I/O Port K pins
+  ************************************************************************/
+ #define	hwr328PortKSpimTxD					0x01
+ #define	hwr328PortKSpimRxD					0x02
+ #define	hwr328PortKSpimClkO					0x04
+ #define	hwr328PortKSpisEn						0x08
+ #define	hwr328PortKSpisRxD					0x10
+ #define	hwr328PortKSpisClkI					0x20
+ #define	hwr328PortKPcmciaCE2					0x40
+ #define	hwr328PortKPcmciaCE1					0x80
+ 
+ 
+ /************************************************************************
+  * I/O Port M pins
+  ************************************************************************/
+ #define	hwr328PortMCTS							0x01
+ #define	hwr328PortMRTS							0x02
+ #define	hwr328PortMIRQ6						0x04
+ #define	hwr328PortMIRQ3						0x08
+ #define	hwr328PortMIRQ2						0x10
+ #define	hwr328PortMIRQ1						0x20
+ #define	hwr328PortMPenIRQ						0x40
+ #define	hwr328PortMUnused7					0x80
+ 
+ 
+  
+ 
+ 
+ #endif // __M68328_H__
+ 
+ #endif // NON_PORTABLE
+ 
+ 
+ 
+ 
+ 
+ 
+ 
+ 
+ 
+ 
+ 
diff -r -c -x *.orig -x *.rej -x #* -x *~ -N orig/gcc-2.7.2.2/PalmOS/Hardware/M68681Hwr.h gcc-2.7.2.2/PalmOS/Hardware/M68681Hwr.h
*** orig/gcc-2.7.2.2/PalmOS/Hardware/M68681Hwr.h	Thu Jan  1 01:00:00 1970
--- gcc-2.7.2.2/PalmOS/Hardware/M68681Hwr.h	Wed Feb 19 16:50:08 1997
***************
*** 0 ****
--- 1,119 ----
+ /*******************************************************************
+  * 							 Touchdown Software
+  *
+  *		 Copyright(c) 1994, Palm Computing Inc., All Rights Reserved
+  *
+  *-------------------------------------------------------------------  
+  * FileName:
+  *		M68681Hwr.h
+  *
+  * Description:
+  *		Hardware Equates for the Motorola 68681 Duart 
+  *
+  * History:
+  *   	1/18/95  RM - Created by Ron Marianetti
+  *
+  *******************************************************************/  
+ 
+ 
+ #include <Common.h>							// Touchdown includes
+ 
+ 
+ /***********************************************************************
+  * Motorola 68681 DUART registers
+  ***********************************************************************/
+ typedef union HwrDuartType {
+ 
+ 	// Read Registers
+ 	struct {
+ 		Byte	u0;
+ 		Byte		mra;					// Mode registers 1A and 2A
+ 		Byte	u2;
+ 		Byte		sra;					// Status register A
+ 		Byte	u4;
+ 		Byte		doNotAccess1;		// Do Not Access
+ 		Byte	u6;
+ 		Byte		rba;					// Receive Buffer A
+ 		Byte	u8;
+ 		Byte		ipcr;					// Inport Port Change Register
+ 		Byte	uA;
+ 		Byte		isr;					// Input Status Register
+ 		Byte	uC;
+ 		Byte		cur;					// Current MSB of counter
+ 		Byte	uE;
+ 		Byte		clr;					// Current LSB of counter
+ 		Byte	u10;
+ 		Byte		mrb;					// Mode registers 1B and 2B
+ 		Byte	u12;
+ 		Byte		srb;					// Status register B
+ 		Byte	u14;
+ 		Byte		doNotAccess2;		// Do Not Access
+ 		Byte	u16;
+ 		Byte		rbb;					// Receive Buffer B
+ 		Byte	u18;				
+ 		Byte		ivr;					// Interrupt vector register
+ 		Byte	u1A;	
+ 		Byte		ipr;					// Input Port register
+ 		Byte	u1C;
+ 		Byte		startCtr;			// Start Counter command register
+ 		Byte	u1E;
+ 		Byte		stopCtr;				// Stop Counter command register
+ 		} read;
+ 		
+ 	// Write Registers
+ 	struct {
+ 		Byte	u0;
+ 		Byte		mra;					// Mode registers 1A and 2A
+ 		Byte	u2;
+ 		Byte		csra;					// Clock Select Register A
+ 		Byte	u4;
+ 		Byte		cra;					// Command Register A
+ 		Byte	u6;
+ 		Byte		tba;					// Transmit Buffer A
+ 		Byte	u8;
+ 		Byte		acr;					// Auxiliary Control Register 
+ 		Byte	uA;
+ 		Byte		imr;					// Interrupt Mask Register
+ 		Byte	uC;
+ 		Byte		ctur;					// Counter/Timer Upper Preload Register
+ 		Byte	uE;
+ 		Byte		ctlr;					// Couunter/Timer Lower Preload Register
+ 		Byte	u10;
+ 		Byte		mrb;					// Mode registers 1B and 2B
+ 		Byte	u12;
+ 		Byte		csrb;					// Clock Select Register B
+ 		Byte	u14;
+ 		Byte		crb;					// Command Register B
+ 		Byte	u16;				
+ 		Byte		tbb;					// Transmitter Buffer B
+ 		Byte	u18;	
+ 		Byte		ivr;					// Interrupt Vector Register
+ 		Byte	u1A;
+ 		Byte		opcr;					// Output Port Config Register
+ 		Byte	u1C;
+ 		Byte		opSet;				// Output Port Bit Set
+ 		Byte	u1E;
+ 		Byte		opReset;				// Output Port Bit Reset
+ 		} write;
+ 	} HwrDuartType;
+ 
+ typedef	volatile   HwrDuartType*	HwrDuartPtr;
+ 
+ 
+ 
+ 
+ 
+ /***********************************************************************
+  * For Final code on the Touchdown Hardware, define all register bits here 
+  *	 for now, we'll just define a few and use numbers in the code for the rest
+  ***********************************************************************/
+  
+ // Status Register (SR)
+ #define	hwrDuartSRRegRB			0x80		// Receive Break
+ #define	hwrDuartSRRegFE			0x40		// Framing Err
+ #define	hwrDuartSRRegPE			0x20		// Parity Err
+ #define	hwrDuartSRRegOE			0x10		// Overrun Err
+ #define	hwrDuartSRRegTxEMP		0x08		// Transmitter Empty
+ #define	hwrDuartSRRegTxRDY		0x04		// Transmitter Ready
+ #define	hwrDuartSRRegFFULL		0x02		// FIFO Full
+ #define	hwrDuartSRRegRxRDY		0x01		// Receiver Ready
diff -r -c -x *.orig -x *.rej -x #* -x *~ -N orig/gcc-2.7.2.2/PalmOS/Hardware/M68KHwr.h gcc-2.7.2.2/PalmOS/Hardware/M68KHwr.h
*** orig/gcc-2.7.2.2/PalmOS/Hardware/M68KHwr.h	Thu Jan  1 01:00:00 1970
--- gcc-2.7.2.2/PalmOS/Hardware/M68KHwr.h	Wed Feb 19 16:50:08 1997
***************
*** 0 ****
--- 1,109 ----
+ /**************************************************************************************
+  *
+  *  DHwr.h
+  *
+  *	Pilot debugger remote hardware/system info.
+  *
+  **************************************************************************************
+  * MODIFICATION HISTORY
+  **************************************************************************************/
+ 
+ #ifndef __M68KHWR_H
+ #define __M68KHWR_H
+ 
+ // Pilot common definitions
+ #include <Common.h>
+ 
+ 
+ /***********************************************************************
+  * Breakpoint words we use
+  ***********************************************************************/
+ #define m68kTrapInstr			0x4E40
+ #define m68kTrapVectorMask		0x000F
+ 
+ /***********************************************************************
+  * 68000 Exception Vector table
+  ***********************************************************************/
+ typedef struct M68KExcTableType {
+ 	DWord		initStack;								// initial stack pointer
+ 	DWord		initPC;									// initial PC
+ 	
+ 	DWord		busErr;									// 08 
+ 	DWord		addressErr;								// 0C  
+ 	DWord		illegalInstr;							// 10  
+ 	DWord		divideByZero;							// 14  
+ 	DWord		chk;									// 18
+ 	DWord		trap;									// 1C
+ 	DWord		privilege;								// 20
+ 	DWord		trace;									// 24
+ 	DWord		aTrap;									// 28
+ 	DWord		fTrap;									// 2C
+ 	DWord		reserved12;								// 30
+ 	DWord		coproc;									// 34
+ 	DWord		formatErr;								// 38
+ 	DWord		unitializedInt;							// 3C
+ 	
+ 	DWord		reserved[8];							// 40-5C
+ 	
+ 	DWord		spuriousInt;							// 60
+ 	DWord		autoVec1;								// 64
+ 	DWord		autoVec2;								// 68
+ 	DWord		autoVec3;								// 6C
+ 	DWord		autoVec4;								// 70
+ 	DWord		autoVec5;								// 74
+ 	DWord		autoVec6;								// 78
+ 	DWord		autoVec7;								// 7C
+ 	
+ 	DWord		trapN[16];								// 80 - BC
+ 	
+ 	DWord		unassigned[16];							// C0 - FC
+ 	} M68KExcTableType;
+  
+  
+ 
+ /**************************************************************************************
+  *  structure for the Motorolla 68000 processor registers (variables).
+  *
+  *	WARNING:
+  *	This structure is used as the body of the 'read regs' command response
+  *  packet.  Any changes to it will require changes in the nub's code.
+  *
+  **************************************************************************************/
+ typedef struct M68KRegsType {
+ 	DWord	d[8];							/*  data registers  */
+ 	DWord	a[7];							/*  address registers  */
+ 	DWord	usp;							/*  user stack pointer  */
+ 	DWord	ssp;							/*  supervisor stack pointer  */
+ 	DWord	pc;							/*  program counter  */
+ 	Word	sr;							/*  status register  */
+ } M68KRegsType;
+ 
+ 
+ 
+  
+ /**************************************************************************************
+  *  bit masks for testing M68000 status register fields
+  **************************************************************************************/
+ 
+ /* trace mode */
+ #define	m68kSrTraceMask			0x08000
+ #define	m68kSrTraceBit				15
+ 
+ /* supervisor state */
+ #define	m68kSrSupervisorMask		0x02000
+ 
+ /* interrupt mask */
+ #define	m68kSrInterruptMask		0x00700
+ #define	m68kSrInterruptOffset	8			/* offset for right-shifting interrupt mask */
+ 
+ /* condition codes */
+ #define	m68kSrExtendMask			0x00010
+ #define	m68kSrNegativeMask		0x00008
+ #define	m68kSrZeroMask				0x00004
+ #define	m68kSrOverflowMask		0x00002
+ #define	m68kSrCarryMask			0x00001
+ 
+ 
+ 
+ #endif	//__M68KHWR_H
+ 
diff -r -c -x *.orig -x *.rej -x #* -x *~ -N orig/gcc-2.7.2.2/PalmOS/Pilot.h gcc-2.7.2.2/PalmOS/Pilot.h
*** orig/gcc-2.7.2.2/PalmOS/Pilot.h	Thu Jan  1 01:00:00 1970
--- gcc-2.7.2.2/PalmOS/Pilot.h	Wed Feb 19 16:16:06 1997
***************
*** 0 ****
--- 1,50 ----
+ /*******************************************************************
+  * 							 Pilot Software
+  *
+  *		 Copyright(c) 1994, Palm Computing Inc., All Rights Reserved
+  *
+  *-------------------------------------------------------------------  
+  * FileName:
+  *		Pilot.h
+  *
+  * Description:
+  *		Include file used by UI library source code modules
+  *
+  * History:
+  *   	6/6/95  RM - Created by Ron Marianetti
+  *
+  *******************************************************************/  
+ 
+ 
+ // This tells "SysAll.h" not to use it's own pre-compiled header
+ #define	__PILOT_H__ 
+ 
+ #include "Common.h"
+ 
+ // Include the pre-compiled header, if not overriden. This pre-compiled header
+ //  can be automatically re-generated by CodeWarrior by including the
+ //  source file "Pilot.pch" in your project.
+ 
+ // The following Mac include file must be included before the Pilot
+ //  headers for the emulator modules that have both Mac and Pilot
+ //  code in them
+ #if EMULATION_LEVEL == EMULATION_MAC
+ #include <types.h>
+ #endif
+ 
+ 
+ // The following ANSI header files have function declarations used by some
+ //  of the UI modules.
+ 
+ 
+ // Fastest compilation speed is obtained by not including these
+ //  headers when the pre-compiled header is used.
+ #ifndef __INCLUDED_PILOT_H_OBJ__
+ #include <SysAll.h>
+ #include <UIAll.h>
+ 
+ #define	NON_PORTABLE
+ #include <Globals.h>
+ #include <UIGlobals.h>
+ 
+ #endif
diff -r -c -x *.orig -x *.rej -x #* -x *~ -N orig/gcc-2.7.2.2/PalmOS/Pilot.inc gcc-2.7.2.2/PalmOS/Pilot.inc
*** orig/gcc-2.7.2.2/PalmOS/Pilot.inc	Thu Jan  1 01:00:00 1970
--- gcc-2.7.2.2/PalmOS/Pilot.inc	Wed Feb 19 16:16:06 1997
***************
*** 0 ****
--- 1,2736 ----
+         list 0                  ;disable listing
+ 
+ ;-----------------------------------------------------------------------------
+ ; pilot.inc
+ ;
+ ;   include file for pila
+ ;
+ ;   processed from USR Pilot include files
+ ;
+ ;-----------------------------------------------------------------------------
+ 
+ ; buildrules.h
+ EMULATION_NONE         equ 0
+ EMULATION_WINDOWS      equ 1
+ EMULATION_DOS          equ 2
+ EMULATION_MAC          equ 3
+ 
+ MEMORY_LOCAL           equ 0
+ MEMORY_REMOTE          equ 1
+ 
+ ENVIRONMENT_CW         equ 0
+ ENVIRONMENT_MPW        equ 1
+ 
+ ERROR_CHECK_NONE       equ 0
+ ERROR_CHECK_PARTIAL    equ 1
+ ERROR_CHECK_FULL       equ 2
+ 
+ CPU_68K                equ 0
+ CPU_x86                equ 1
+ 
+ HW_TARGET_NONE         equ 0
+ HW_TARGET_302          equ 1
+ HW_TARGET_328EMU       equ 2
+ HW_TARGET_328          equ 3
+ HW_TARGET_TD1          equ 4
+ 
+ MEMORY_FORCE_LOCK_OFF  equ 0
+ MEMORY_FORCE_LOCK_ON   equ 1
+ 
+ DEBUG_LEVEL_NONE       equ 1
+ DEBUG_LEVEL_PARTIAL    equ 2
+ DEBUG_LEVEL_FULL       equ 3
+ 
+ COUNTRY_UNITED_STATES  equ 0
+ COUNTRY_FRANCE         equ 1
+ COUNTRY_GERMANY        equ 2
+ 
+ LANGUAGE_ENGLISH       equ 0
+ LANGUAGE_FRENCH        equ 1
+ LANGUAGE_GERMAN        equ 2
+ 
+ MEMORY_FORCE_LOCK      equ 1
+ MEMORY_TYPE            equ $00000000
+ ENVIRONMENT            equ $00000000
+ ERROR_CHECK_LEVEL      equ $00000002
+ CPU_TYPE               equ $00000000
+ HW_TARGET              equ $00000000
+ COUNTRY                equ $00000000
+ LANGUAGE               equ $00000000
+ 
+ 
+ ; appbuildrules.h
+ SHELL_COMMAND_DB        equ 0
+ SHELL_COMMAND_UI        equ 0
+ SHELL_COMMAND_APP       equ 0
+ SHELL_COMMAND_EMULATOR  equ 1
+ 
+ 
+ ; common.h
+ USE_TRAPS equ 1
+ 
+ NULL  equ 0
+ 
+ false equ 0
+ true  equ 1
+ 
+ ; hardware\m68khwr.h
+ m68kTrapInstr                   equ $00004e40
+ m68kTrapVectorMask              equ $0000000f
+ M68KExcTableType_initStack      equ 0
+ M68KExcTableType_initPC         equ 4
+ M68KExcTableType_busErr         equ 8
+ M68KExcTableType_addressErr     equ 12
+ M68KExcTableType_illegalInstr   equ 16
+ M68KExcTableType_divideByZero   equ 20
+ M68KExcTableType_chk            equ 24
+ M68KExcTableType_trap           equ 28
+ M68KExcTableType_privilege      equ 32
+ M68KExcTableType_trace          equ 36
+ M68KExcTableType_aTrap          equ 40
+ M68KExcTableType_fTrap          equ 44
+ M68KExcTableType_reserved12     equ 48
+ M68KExcTableType_coproc         equ 52
+ M68KExcTableType_formatErr      equ 56
+ M68KExcTableType_unitializedInt equ 60
+ M68KExcTableType_reserved       equ 64
+ M68KExcTableType_spuriousInt    equ 96
+ M68KExcTableType_autoVec1       equ 100
+ M68KExcTableType_autoVec2       equ 104
+ M68KExcTableType_autoVec3       equ 108
+ M68KExcTableType_autoVec4       equ 112
+ M68KExcTableType_autoVec5       equ 116
+ M68KExcTableType_autoVec6       equ 120
+ M68KExcTableType_autoVec7       equ 124
+ M68KExcTableType_trapN          equ 128
+ M68KExcTableType_unassigned     equ 192
+ M68KExcTableType_sizeof         equ 256
+ M68KRegsType_d                  equ 0
+ M68KRegsType_a                  equ 32
+ M68KRegsType_usp                equ 60
+ M68KRegsType_ssp                equ 64
+ M68KRegsType_pc                 equ 68
+ M68KRegsType_sr                 equ 72
+ M68KRegsType_sizeof             equ 74
+ m68kSrTraceMask                 equ $00008000
+ m68kSrTraceBit                  equ 15
+ m68kSrSupervisorMask            equ $00002000
+ m68kSrInterruptMask             equ $00000700
+ m68kSrInterruptOffset           equ 8
+ m68kSrExtendMask                equ $00000010
+ m68kSrNegativeMask              equ $00000008
+ m68kSrZeroMask                  equ $00000004
+ m68kSrOverflowMask              equ $00000002
+ m68kSrCarryMask                 equ $00000001
+ 
+ ; system\systraps.h
+ sysTrapBase                            equ $0000a000
+ sysTrapMemInit                         equ 40960
+ sysTrapMemInitHeapTable                equ 40961
+ sysTrapMemStoreInit                    equ 40962
+ sysTrapMemCardFormat                   equ 40963
+ sysTrapMemCardInfo                     equ 40964
+ sysTrapMemStoreInfo                    equ 40965
+ sysTrapMemStoreSetInfo                 equ 40966
+ sysTrapMemNumHeaps                     equ 40967
+ sysTrapMemNumRAMHeaps                  equ 40968
+ sysTrapMemHeapID                       equ 40969
+ sysTrapMemHeapPtr                      equ 40970
+ sysTrapMemHeapFreeBytes                equ 40971
+ sysTrapMemHeapSize                     equ 40972
+ sysTrapMemHeapFlags                    equ 40973
+ sysTrapMemHeapCompact                  equ 40974
+ sysTrapMemHeapInit                     equ 40975
+ sysTrapMemHeapFreeByOwnerID            equ 40976
+ sysTrapMemChunkNew                     equ 40977
+ sysTrapMemChunkFree                    equ 40978
+ sysTrapMemPtrNew                       equ 40979
+ sysTrapMemPtrFree                      equ sysTrapMemChunkFree
+ sysTrapMemPtrRecoverHandle             equ 40980
+ sysTrapMemPtrFlags                     equ 40981
+ sysTrapMemPtrSize                      equ 40982
+ sysTrapMemPtrOwner                     equ 40983
+ sysTrapMemPtrHeapID                    equ 40984
+ sysTrapMemPtrCardNo                    equ 40985
+ sysTrapMemPtrToLocalID                 equ 40986
+ sysTrapMemPtrSetOwner                  equ 40987
+ sysTrapMemPtrResize                    equ 40988
+ sysTrapMemPtrResetLock                 equ 40989
+ sysTrapMemHandleNew                    equ 40990
+ sysTrapMemHandleLockCount              equ 40991
+ sysTrapMemHandleToLocalID              equ 40992
+ sysTrapMemHandleLock                   equ 40993
+ sysTrapMemHandleUnlock                 equ 40994
+ sysTrapMemLocalIDToGlobal              equ 40995
+ sysTrapMemLocalIDKind                  equ 40996
+ sysTrapMemLocalIDToPtr                 equ 40997
+ sysTrapMemMove                         equ 40998
+ sysTrapMemSet                          equ 40999
+ sysTrapMemStoreSearch                  equ 41000
+ sysTrapMemPtrDataStorage               equ 41001
+ sysTrapMemKernelInit                   equ 41002
+ sysTrapMemHandleFree                   equ 41003
+ sysTrapMemHandleFlags                  equ 41004
+ sysTrapMemHandleSize                   equ 41005
+ sysTrapMemHandleOwner                  equ 41006
+ sysTrapMemHandleHeapID                 equ 41007
+ sysTrapMemHandleDataStorage            equ 41008
+ sysTrapMemHandleCardNo                 equ 41009
+ sysTrapMemHandleSetOwner               equ 41010
+ sysTrapMemHandleResize                 equ 41011
+ sysTrapMemHandleResetLock              equ 41012
+ sysTrapMemPtrUnlock                    equ 41013
+ sysTrapMemLocalIDToLockedPtr           equ 41014
+ sysTrapMemSetDebugMode                 equ 41015
+ sysTrapMemHeapScramble                 equ 41016
+ sysTrapMemHeapCheck                    equ 41017
+ sysTrapMemNumCards                     equ 41018
+ sysTrapMemDebugMode                    equ 41019
+ sysTrapMemSemaphoreReserve             equ 41020
+ sysTrapMemSemaphoreRelease             equ 41021
+ sysTrapMemHeapDynamic                  equ 41022
+ sysTrapMemNVParams                     equ 41023
+ sysTrapDmInit                          equ 41024
+ sysTrapDmCreateDatabase                equ 41025
+ sysTrapDmDeleteDatabase                equ 41026
+ sysTrapDmNumDatabases                  equ 41027
+ sysTrapDmGetDatabase                   equ 41028
+ sysTrapDmFindDatabase                  equ 41029
+ sysTrapDmDatabaseInfo                  equ 41030
+ sysTrapDmSetDatabaseInfo               equ 41031
+ sysTrapDmDatabaseSize                  equ 41032
+ sysTrapDmOpenDatabase                  equ 41033
+ sysTrapDmCloseDatabase                 equ 41034
+ sysTrapDmNextOpenDatabase              equ 41035
+ sysTrapDmOpenDatabaseInfo              equ 41036
+ sysTrapDmResetRecordStates             equ 41037
+ sysTrapDmGetLastErr                    equ 41038
+ sysTrapDmNumRecords                    equ 41039
+ sysTrapDmRecordInfo                    equ 41040
+ sysTrapDmSetRecordInfo                 equ 41041
+ sysTrapDmAttachRecord                  equ 41042
+ sysTrapDmDetachRecord                  equ 41043
+ sysTrapDmMoveRecord                    equ 41044
+ sysTrapDmNewRecord                     equ 41045
+ sysTrapDmRemoveRecord                  equ 41046
+ sysTrapDmDeleteRecord                  equ 41047
+ sysTrapDmArchiveRecord                 equ 41048
+ sysTrapDmNewHandle                     equ 41049
+ sysTrapDmRemoveSecretRecords           equ 41050
+ sysTrapDmQueryRecord                   equ 41051
+ sysTrapDmGetRecord                     equ 41052
+ sysTrapDmResizeRecord                  equ 41053
+ sysTrapDmReleaseRecord                 equ 41054
+ sysTrapDmGetResource                   equ 41055
+ sysTrapDmGet1Resource                  equ 41056
+ sysTrapDmReleaseResource               equ 41057
+ sysTrapDmResizeResource                equ 41058
+ sysTrapDmNextOpenResDatabase           equ 41059
+ sysTrapDmFindResourceType              equ 41060
+ sysTrapDmFindResource                  equ 41061
+ sysTrapDmSearchResource                equ 41062
+ sysTrapDmNumResources                  equ 41063
+ sysTrapDmResourceInfo                  equ 41064
+ sysTrapDmSetResourceInfo               equ 41065
+ sysTrapDmAttachResource                equ 41066
+ sysTrapDmDetachResource                equ 41067
+ sysTrapDmNewResource                   equ 41068
+ sysTrapDmRemoveResource                equ 41069
+ sysTrapDmGetResourceIndex              equ 41070
+ sysTrapDmQuickSort                     equ 41071
+ sysTrapDmQueryNextInCategory           equ 41072
+ sysTrapDmNumRecordsInCategory          equ 41073
+ sysTrapDmPositionInCategory            equ 41074
+ sysTrapDmSeekRecordInCategory          equ 41075
+ sysTrapDmMoveCategory                  equ 41076
+ sysTrapDmOpenDatabaseByTypeCreator     equ 41077
+ sysTrapDmWrite                         equ 41078
+ sysTrapDmStrCopy                       equ 41079
+ sysTrapDmGetNextDatabaseByTypeCreator  equ 41080
+ sysTrapDmWriteCheck                    equ 41081
+ sysTrapDmMoveOpenDBContext             equ 41082
+ sysTrapDmFindRecordByID                equ 41083
+ sysTrapDmGetAppInfoID                  equ 41084
+ sysTrapDmFindSortPosition              equ 41085
+ sysTrapDmSet                           equ 41086
+ sysTrapDmCreateDatabaseFromImage       equ 41087
+ sysTrapDbgSrcMessage                   equ 41088
+ sysTrapDbgMessage                      equ 41089
+ sysTrapDbgGetMessage                   equ 41090
+ sysTrapDbgCommSettings                 equ 41091
+ sysTrapErrDisplayFileLineMsg           equ 41092
+ sysTrapErrSetJump                      equ 41093
+ sysTrapErrLongJump                     equ 41094
+ sysTrapErrThrow                        equ 41095
+ sysTrapErrExceptionList                equ 41096
+ sysTrapSysBroadcastActionCode          equ 41097
+ sysTrapSysUnimplemented                equ 41098
+ sysTrapSysColdBoot                     equ 41099
+ sysTrapSysReset                        equ 41100
+ sysTrapSysDoze                         equ 41101
+ sysTrapSysAppLaunch                    equ 41102
+ sysTrapSysAppStartup                   equ 41103
+ sysTrapSysAppExit                      equ 41104
+ sysTrapSysSetA5                        equ 41105
+ sysTrapSysSetTrapAddress               equ 41106
+ sysTrapSysGetTrapAddress               equ 41107
+ sysTrapSysTranslateKernelErr           equ 41108
+ sysTrapSysSemaphoreCreate              equ 41109
+ sysTrapSysSemaphoreDelete              equ 41110
+ sysTrapSysSemaphoreWait                equ 41111
+ sysTrapSysSemaphoreSignal              equ 41112
+ sysTrapSysTimerCreate                  equ 41113
+ sysTrapSysTimerWrite                   equ 41114
+ sysTrapSysTaskCreate                   equ 41115
+ sysTrapSysTaskDelete                   equ 41116
+ sysTrapSysTaskTrigger                  equ 41117
+ sysTrapSysTaskID                       equ 41118
+ sysTrapSysTaskUserInfoPtr              equ 41119
+ sysTrapSysTaskDelay                    equ 41120
+ sysTrapSysTaskSetTermProc              equ 41121
+ sysTrapSysUILaunch                     equ 41122
+ sysTrapSysNewOwnerID                   equ 41123
+ sysTrapSysSemaphoreSet                 equ 41124
+ sysTrapSysDisableInts                  equ 41125
+ sysTrapSysRestoreStatus                equ 41126
+ sysTrapSysUIAppSwitch                  equ 41127
+ sysTrapSysCurAppInfoP                  equ 41128
+ sysTrapSysHandleEvent                  equ 41129
+ sysTrapSysInit                         equ 41130
+ sysTrapSysQSort                        equ 41131
+ sysTrapSysCurAppDatabase               equ 41132
+ sysTrapSysFatalAlert                   equ 41133
+ sysTrapSysResSemaphoreCreate           equ 41134
+ sysTrapSysResSemaphoreDelete           equ 41135
+ sysTrapSysResSemaphoreReserve          equ 41136
+ sysTrapSysResSemaphoreRelease          equ 41137
+ sysTrapSysSleep                        equ 41138
+ sysTrapSysKeyboardDialog               equ 41139
+ sysTrapSysAppLauncherDialog            equ 41140
+ sysTrapSysSetPerformance               equ 41141
+ sysTrapSysBatteryInfo                  equ 41142
+ sysTrapSysLibInstall                   equ 41143
+ sysTrapSysLibRemove                    equ 41144
+ sysTrapSysLibTblEntry                  equ 41145
+ sysTrapSysLibFind                      equ 41146
+ sysTrapSysBatteryDialog                equ 41147
+ sysTrapSysCopyStringResource           equ 41148
+ sysTrapSysKernelInfo                   equ 41149
+ sysTrapSysLaunchConsole                equ 41150
+ sysTrapSysTimerDelete                  equ 41151
+ sysTrapSysSetAutoOffTime               equ 41152
+ sysTrapSysFormPointerArrayToStrings    equ 41153
+ sysTrapSysRandom                       equ 41154
+ sysTrapSysTaskSwitching                equ 41155
+ sysTrapSysTimerRead                    equ 41156
+ sysTrapStrCopy                         equ 41157
+ sysTrapStrCat                          equ 41158
+ sysTrapStrLen                          equ 41159
+ sysTrapStrCompare                      equ 41160
+ sysTrapStrIToA                         equ 41161
+ sysTrapStrCaselessCompare              equ 41162
+ sysTrapStrIToH                         equ 41163
+ sysTrapStrChr                          equ 41164
+ sysTrapStrStr                          equ 41165
+ sysTrapStrAToI                         equ 41166
+ sysTrapStrToLower                      equ 41167
+ sysTrapSerReceiveISP                   equ 41168
+ sysTrapSlkOpen                         equ 41169
+ sysTrapSlkClose                        equ 41170
+ sysTrapSlkOpenSocket                   equ 41171
+ sysTrapSlkCloseSocket                  equ 41172
+ sysTrapSlkSocketRefNum                 equ 41173
+ sysTrapSlkSocketSetTimeout             equ 41174
+ sysTrapSlkFlushSocket                  equ 41175
+ sysTrapSlkSetSocketListener            equ 41176
+ sysTrapSlkSendPacket                   equ 41177
+ sysTrapSlkReceivePacket                equ 41178
+ sysTrapSlkSysPktDefaultResponse        equ 41179
+ sysTrapSlkProcessRPC                   equ 41180
+ sysTrapConPutS                         equ 41181
+ sysTrapConGetS                         equ 41182
+ sysTrapFplInit                         equ 41183
+ sysTrapFplFree                         equ 41184
+ sysTrapFplFToA                         equ 41185
+ sysTrapFplAToF                         equ 41186
+ sysTrapFplBase10Info                   equ 41187
+ sysTrapFplLongToFloat                  equ 41188
+ sysTrapFplFloatToLong                  equ 41189
+ sysTrapFplFloatToULong                 equ 41190
+ sysTrapFplMul                          equ 41191
+ sysTrapFplAdd                          equ 41192
+ sysTrapFplSub                          equ 41193
+ sysTrapFplDiv                          equ 41194
+ sysTrapScrInit                         equ 41195
+ sysTrapScrCopyRectangle                equ 41196
+ sysTrapScrDrawChars                    equ 41197
+ sysTrapScrLineRoutine                  equ 41198
+ sysTrapScrRectangleRoutine             equ 41199
+ sysTrapScrScreenInfo                   equ 41200
+ sysTrapScrDrawNotify                   equ 41201
+ sysTrapScrSendUpdateArea               equ 41202
+ sysTrapScrCompressScanLine             equ 41203
+ sysTrapScrDeCompressScanLine           equ 41204
+ sysTrapTimGetSeconds                   equ 41205
+ sysTrapTimSetSeconds                   equ 41206
+ sysTrapTimGetTicks                     equ 41207
+ sysTrapTimInit                         equ 41208
+ sysTrapTimSetAlarm                     equ 41209
+ sysTrapTimGetAlarm                     equ 41210
+ sysTrapTimHandleInterrupt              equ 41211
+ sysTrapTimSecondsToDateTime            equ 41212
+ sysTrapTimDateTimeToSeconds            equ 41213
+ sysTrapTimAdjust                       equ 41214
+ sysTrapTimSleep                        equ 41215
+ sysTrapTimWake                         equ 41216
+ sysTrapCategoryCreateList              equ 41217
+ sysTrapCategoryFreeList                equ 41218
+ sysTrapCategoryFind                    equ 41219
+ sysTrapCategoryGetName                 equ 41220
+ sysTrapCategoryEdit                    equ 41221
+ sysTrapCategorySelect                  equ 41222
+ sysTrapCategoryGetNext                 equ 41223
+ sysTrapCategorySetTriggerLabel         equ 41224
+ sysTrapCategoryTruncateName            equ 41225
+ sysTrapClipboardAddItem                equ 41226
+ sysTrapClipboardCheckIfItemExist       equ 41227
+ sysTrapClipboardGetItem                equ 41228
+ sysTrapCtlDrawControl                  equ 41229
+ sysTrapCtlEraseControl                 equ 41230
+ sysTrapCtlHideControl                  equ 41231
+ sysTrapCtlShowControl                  equ 41232
+ sysTrapCtlGetValue                     equ 41233
+ sysTrapCtlSetValue                     equ 41234
+ sysTrapCtlGetLabel                     equ 41235
+ sysTrapCtlSetLabel                     equ 41236
+ sysTrapCtlHandleEvent                  equ 41237
+ sysTrapCtlHitControl                   equ 41238
+ sysTrapCtlSetEnabled                   equ 41239
+ sysTrapCtlSetUsable                    equ 41240
+ sysTrapCtlEnabled                      equ 41241
+ sysTrapEvtInitialize                   equ 41242
+ sysTrapEvtAddEventToQueue              equ 41243
+ sysTrapEvtCopyEvent                    equ 41244
+ sysTrapEvtGetEvent                     equ 41245
+ sysTrapEvtGetPen                       equ 41246
+ sysTrapEvtSysInit                      equ 41247
+ sysTrapEvtGetSysEvent                  equ 41248
+ sysTrapEvtProcessSoftKeyStroke         equ 41249
+ sysTrapEvtGetPenBtnList                equ 41250
+ sysTrapEvtSetPenQueuePtr               equ 41251
+ sysTrapEvtPenQueueSize                 equ 41252
+ sysTrapEvtFlushPenQueue                equ 41253
+ sysTrapEvtEnqueuePenPoint              equ 41254
+ sysTrapEvtDequeuePenStrokeInfo         equ 41255
+ sysTrapEvtDequeuePenPoint              equ 41256
+ sysTrapEvtFlushNextPenStroke           equ 41257
+ sysTrapEvtSetKeyQueuePtr               equ 41258
+ sysTrapEvtKeyQueueSize                 equ 41259
+ sysTrapEvtFlushKeyQueue                equ 41260
+ sysTrapEvtEnqueueKey                   equ 41261
+ sysTrapEvtDequeueKeyEvent              equ 41262
+ sysTrapEvtWakeup                       equ 41263
+ sysTrapEvtResetAutoOffTimer            equ 41264
+ sysTrapEvtKeyQueueEmpty                equ 41265
+ sysTrapEvtEnableGraffiti               equ 41266
+ sysTrapFldCopy                         equ 41267
+ sysTrapFldCut                          equ 41268
+ sysTrapFldDrawField                    equ 41269
+ sysTrapFldEraseField                   equ 41270
+ sysTrapFldFreeMemory                   equ 41271
+ sysTrapFldGetBounds                    equ 41272
+ sysTrapFldGetTextPtr                   equ 41273
+ sysTrapFldGetSelection                 equ 41274
+ sysTrapFldHandleEvent                  equ 41275
+ sysTrapFldPaste                        equ 41276
+ sysTrapFldRecalculateField             equ 41277
+ sysTrapFldSetBounds                    equ 41278
+ sysTrapFldSetText                      equ 41279
+ sysTrapFldGetFont                      equ 41280
+ sysTrapFldSetFont                      equ 41281
+ sysTrapFldSetSelection                 equ 41282
+ sysTrapFldGrabFocus                    equ 41283
+ sysTrapFldReleaseFocus                 equ 41284
+ sysTrapFldGetInsPtPosition             equ 41285
+ sysTrapFldSetInsPtPosition             equ 41286
+ sysTrapFldSetScrollPosition            equ 41287
+ sysTrapFldGetScrollPosition            equ 41288
+ sysTrapFldGetTextHeight                equ 41289
+ sysTrapFldGetTextAllocatedSize         equ 41290
+ sysTrapFldGetTextLength                equ 41291
+ sysTrapFldScrollField                  equ 41292
+ sysTrapFldScrollable                   equ 41293
+ sysTrapFldGetVisibleLines              equ 41294
+ sysTrapFldGetAttributes                equ 41295
+ sysTrapFldSetAttributes                equ 41296
+ sysTrapFldSendChangeNotification       equ 41297
+ sysTrapFldCalcFieldHeight              equ 41298
+ sysTrapFldGetTextHandle                equ 41299
+ sysTrapFldCompactText                  equ 41300
+ sysTrapFldDirty                        equ 41301
+ sysTrapFldWordWrap                     equ 41302
+ sysTrapFldSetTextAllocatedSize         equ 41303
+ sysTrapFldSetTextHandle                equ 41304
+ sysTrapFldSetTextPtr                   equ 41305
+ sysTrapFldGetMaxChars                  equ 41306
+ sysTrapFldSetMaxChars                  equ 41307
+ sysTrapFldSetUsable                    equ 41308
+ sysTrapFldInsert                       equ 41309
+ sysTrapFldDelete                       equ 41310
+ sysTrapFldUndo                         equ 41311
+ sysTrapFldSetDirty                     equ 41312
+ sysTrapFldSendHeightChangeNotification equ 41313
+ sysTrapFldMakeFullyVisible             equ 41314
+ sysTrapFntGetFont                      equ 41315
+ sysTrapFntSetFont                      equ 41316
+ sysTrapFntGetFontPtr                   equ 41317
+ sysTrapFntBaseLine                     equ 41318
+ sysTrapFntCharHeight                   equ 41319
+ sysTrapFntLineHeight                   equ 41320
+ sysTrapFntAverageCharWidth             equ 41321
+ sysTrapFntCharWidth                    equ 41322
+ sysTrapFntCharsWidth                   equ 41323
+ sysTrapFntDescenderHeight              equ 41324
+ sysTrapFntCharsInWidth                 equ 41325
+ sysTrapFntLineWidth                    equ 41326
+ sysTrapFrmInitForm                     equ 41327
+ sysTrapFrmDeleteForm                   equ 41328
+ sysTrapFrmDrawForm                     equ 41329
+ sysTrapFrmEraseForm                    equ 41330
+ sysTrapFrmGetActiveForm                equ 41331
+ sysTrapFrmSetActiveForm                equ 41332
+ sysTrapFrmGetActiveFormID              equ 41333
+ sysTrapFrmGetUserModifiedState         equ 41334
+ sysTrapFrmSetNotUserModified           equ 41335
+ sysTrapFrmGetFocus                     equ 41336
+ sysTrapFrmSetFocus                     equ 41337
+ sysTrapFrmHandleEvent                  equ 41338
+ sysTrapFrmGetFormBounds                equ 41339
+ sysTrapFrmGetWindowHandle              equ 41340
+ sysTrapFrmGetFormId                    equ 41341
+ sysTrapFrmGetFormPtr                   equ 41342
+ sysTrapFrmGetNumberOfObjects           equ 41343
+ sysTrapFrmGetObjectIndex               equ 41344
+ sysTrapFrmGetObjectId                  equ 41345
+ sysTrapFrmGetObjectType                equ 41346
+ sysTrapFrmGetObjectPtr                 equ 41347
+ sysTrapFrmHideObject                   equ 41348
+ sysTrapFrmShowObject                   equ 41349
+ sysTrapFrmGetObjectPosition            equ 41350
+ sysTrapFrmSetObjectPositon             equ 41351
+ sysTrapFrmGetControlValue              equ 41352
+ sysTrapFrmSetControlValue              equ 41353
+ sysTrapFrmGetControlGroupSelection     equ 41354
+ sysTrapFrmSetControlGroupSelection     equ 41355
+ sysTrapFrmCopyLabel                    equ 41356
+ sysTrapFrmSetLabel                     equ 41357
+ sysTrapFrmGetLabel                     equ 41358
+ sysTrapFrmSetCategoryLabel             equ 41359
+ sysTrapFrmGetTitle                     equ 41360
+ sysTrapFrmSetTitle                     equ 41361
+ sysTrapFrmAlert                        equ 41362
+ sysTrapFrmDoDialog                     equ 41363
+ sysTrapFrmCustomAlert                  equ 41364
+ sysTrapFrmHelp                         equ 41365
+ sysTrapFrmUpdateScrollers              equ 41366
+ sysTrapFrmGetFirstForm                 equ 41367
+ sysTrapFrmVisible                      equ 41368
+ sysTrapFrmGetObjectBounds              equ 41369
+ sysTrapFrmCopyTitle                    equ 41370
+ sysTrapFrmGotoForm                     equ 41371
+ sysTrapFrmPopupForm                    equ 41372
+ sysTrapFrmUpdateForm                   equ 41373
+ sysTrapFrmReturnToForm                 equ 41374
+ sysTrapFrmSetEventHandler              equ 41375
+ sysTrapFrmDispatchEvent                equ 41376
+ sysTrapFrmCloseAllForms                equ 41377
+ sysTrapFrmSaveAllForms                 equ 41378
+ sysTrapFrmGetGadgetData                equ 41379
+ sysTrapFrmSetGadgetData                equ 41380
+ sysTrapFrmSetCategoryTrigger           equ 41381
+ sysTrapUIInitialize                    equ 41382
+ sysTrapUIReset                         equ 41383
+ sysTrapInsPtInitialize                 equ 41384
+ sysTrapInsPtSetLocation                equ 41385
+ sysTrapInsPtGetLocation                equ 41386
+ sysTrapInsPtEnable                     equ 41387
+ sysTrapInsPtEnabled                    equ 41388
+ sysTrapInsPtSetHeight                  equ 41389
+ sysTrapInsPtGetHeight                  equ 41390
+ sysTrapInsPtCheckBlink                 equ 41391
+ sysTrapLstSetDrawFunction              equ 41392
+ sysTrapLstDrawList                     equ 41393
+ sysTrapLstEraseList                    equ 41394
+ sysTrapLstGetSelection                 equ 41395
+ sysTrapLstGetSelectionText             equ 41396
+ sysTrapLstHandleEvent                  equ 41397
+ sysTrapLstSetHeight                    equ 41398
+ sysTrapLstSetSelection                 equ 41399
+ sysTrapLstSetListChoices               equ 41400
+ sysTrapLstMakeItemVisible              equ 41401
+ sysTrapLstGetNumberOfItems             equ 41402
+ sysTrapLstPopupList                    equ 41403
+ sysTrapLstSetPosition                  equ 41404
+ sysTrapMenuInit                        equ 41405
+ sysTrapMenuDispose                     equ 41406
+ sysTrapMenuHandleEvent                 equ 41407
+ sysTrapMenuDrawMenu                    equ 41408
+ sysTrapMenuEraseStatus                 equ 41409
+ sysTrapMenuGetActiveMenu               equ 41410
+ sysTrapMenuSetActiveMenu               equ 41411
+ sysTrapRctSetRectangle                 equ 41412
+ sysTrapRctCopyRectangle                equ 41413
+ sysTrapRctInsetRectangle               equ 41414
+ sysTrapRctOffsetRectangle              equ 41415
+ sysTrapRctPtInRectangle                equ 41416
+ sysTrapRctGetIntersection              equ 41417
+ sysTrapTblDrawTable                    equ 41418
+ sysTrapTblEraseTable                   equ 41419
+ sysTrapTblHandleEvent                  equ 41420
+ sysTrapTblGetItemBounds                equ 41421
+ sysTrapTblSelectItem                   equ 41422
+ sysTrapTblGetItemInt                   equ 41423
+ sysTrapTblSetItemInt                   equ 41424
+ sysTrapTblSetItemStyle                 equ 41425
+ sysTrapTblUnhighlightSelection         equ 41426
+ sysTrapTblSetRowUsable                 equ 41427
+ sysTrapTblGetNumberOfRows              equ 41428
+ sysTrapTblSetCustomDrawProcedure       equ 41429
+ sysTrapTblSetRowSelectable             equ 41430
+ sysTrapTblRowSelectable                equ 41431
+ sysTrapTblSetLoadDataProcedure         equ 41432
+ sysTrapTblSetSaveDataProcedure         equ 41433
+ sysTrapTblGetBounds                    equ 41434
+ sysTrapTblSetRowHeight                 equ 41435
+ sysTrapTblGetColumnWidth               equ 41436
+ sysTrapTblGetRowID                     equ 41437
+ sysTrapTblSetRowID                     equ 41438
+ sysTrapTblMarkRowInvalid               equ 41439
+ sysTrapTblMarkTableInvalid             equ 41440
+ sysTrapTblGetSelection                 equ 41441
+ sysTrapTblInsertRow                    equ 41442
+ sysTrapTblRemoveRow                    equ 41443
+ sysTrapTblRowInvalid                   equ 41444
+ sysTrapTblRedrawTable                  equ 41445
+ sysTrapTblRowUsable                    equ 41446
+ sysTrapTblReleaseFocus                 equ 41447
+ sysTrapTblEditing                      equ 41448
+ sysTrapTblGetCurrentField              equ 41449
+ sysTrapTblSetColumnUsable              equ 41450
+ sysTrapTblGetRowHeight                 equ 41451
+ sysTrapTblSetColumnWidth               equ 41452
+ sysTrapTblGrabFocus                    equ 41453
+ sysTrapTblSetItemPtr                   equ 41454
+ sysTrapTblFindRowID                    equ 41455
+ sysTrapTblGetLastUsableRow             equ 41456
+ sysTrapTblGetColumnSpacing             equ 41457
+ sysTrapTblFindRowData                  equ 41458
+ sysTrapTblGetRowData                   equ 41459
+ sysTrapTblSetRowData                   equ 41460
+ sysTrapTblSetColumnSpacing             equ 41461
+ sysTrapWinCreateWindow                 equ 41462
+ sysTrapWinCreateOffscreenWindow        equ 41463
+ sysTrapWinDeleteWindow                 equ 41464
+ sysTrapWinInitializeWindow             equ 41465
+ sysTrapWinAddWindow                    equ 41466
+ sysTrapWinRemoveWindow                 equ 41467
+ sysTrapWinSetActiveWindow              equ 41468
+ sysTrapWinSetDrawWindow                equ 41469
+ sysTrapWinGetDrawWindow                equ 41470
+ sysTrapWinGetActiveWindow              equ 41471
+ sysTrapWinGetDisplayWindow             equ 41472
+ sysTrapWinGetFirstWindow               equ 41473
+ sysTrapWinEnableWindow                 equ 41474
+ sysTrapWinDisableWindow                equ 41475
+ sysTrapWinGetWindowFrameRect           equ 41476
+ sysTrapWinDrawWindowFrame              equ 41477
+ sysTrapWinEraseWindow                  equ 41478
+ sysTrapWinSaveBits                     equ 41479
+ sysTrapWinRestoreBits                  equ 41480
+ sysTrapWinCopyRectangle                equ 41481
+ sysTrapWinScrollRectangle              equ 41482
+ sysTrapWinGetDisplayExtent             equ 41483
+ sysTrapWinGetWindowExtent              equ 41484
+ sysTrapWinDisplayToWindowPt            equ 41485
+ sysTrapWinWindowToDisplayPt            equ 41486
+ sysTrapWinGetClip                      equ 41487
+ sysTrapWinSetClip                      equ 41488
+ sysTrapWinResetClip                    equ 41489
+ sysTrapWinClipRectangle                equ 41490
+ sysTrapWinDrawLine                     equ 41491
+ sysTrapWinDrawGrayLine                 equ 41492
+ sysTrapWinEraseLine                    equ 41493
+ sysTrapWinInvertLine                   equ 41494
+ sysTrapWinFillLine                     equ 41495
+ sysTrapWinDrawRectangle                equ 41496
+ sysTrapWinEraseRectangle               equ 41497
+ sysTrapWinInvertRectangle              equ 41498
+ sysTrapWinDrawRectangleFrame           equ 41499
+ sysTrapWinDrawGrayRectangleFrame       equ 41500
+ sysTrapWinEraseRectangleFrame          equ 41501
+ sysTrapWinInvertRectangleFrame         equ 41502
+ sysTrapWinGetFramesRectangle           equ 41503
+ sysTrapWinDrawChars                    equ 41504
+ sysTrapWinEraseChars                   equ 41505
+ sysTrapWinInvertChars                  equ 41506
+ sysTrapWinGetPattern                   equ 41507
+ sysTrapWinSetPattern                   equ 41508
+ sysTrapWinSetUnderlineMode             equ 41509
+ sysTrapWinDrawBitmap                   equ 41510
+ sysTrapWinModal                        equ 41511
+ sysTrapWinGetWindowBounds              equ 41512
+ sysTrapWinFillRectangle                equ 41513
+ sysTrapWinDrawInvertedChars            equ 41514
+ sysTrapPrefOpenPreferenceDB            equ 41515
+ sysTrapPrefGetPreferences              equ 41516
+ sysTrapPrefSetPreferences              equ 41517
+ sysTrapPrefGetAppPreferences           equ 41518
+ sysTrapPrefSetAppPreferences           equ 41519
+ sysTrapSndInit                         equ 41520
+ sysTrapSndSetDefaultVolume             equ 41521
+ sysTrapSndGetDefaultVolume             equ 41522
+ sysTrapSndDoCmd                        equ 41523
+ sysTrapSndPlaySystemSound              equ 41524
+ sysTrapAlmInit                         equ 41525
+ sysTrapAlmCancelAll                    equ 41526
+ sysTrapAlmAlarmCallback                equ 41527
+ sysTrapAlmSetAlarm                     equ 41528
+ sysTrapAlmGetAlarm                     equ 41529
+ sysTrapAlmDisplayAlarm                 equ 41530
+ sysTrapAlmEnableNotification           equ 41531
+ sysTrapHwrGetRAMMapping                equ 41532
+ sysTrapHwrMemWritable                  equ 41533
+ sysTrapHwrMemReadable                  equ 41534
+ sysTrapHwrDoze                         equ 41535
+ sysTrapHwrSleep                        equ 41536
+ sysTrapHwrWake                         equ 41537
+ sysTrapHwrSetSystemClock               equ 41538
+ sysTrapHwrSetCPUDutyCycle              equ 41539
+ sysTrapHwrLCDInit                      equ 41540
+ sysTrapHwrLCDSleep                     equ 41541
+ sysTrapHwrTimerInit                    equ 41542
+ sysTrapHwrCursor                       equ 41543
+ sysTrapHwrBatteryLevel                 equ 41544
+ sysTrapHwrDelay                        equ 41545
+ sysTrapHwrEnableDataWrites             equ 41546
+ sysTrapHwrDisableDataWrites            equ 41547
+ sysTrapHwrLCDBaseAddr                  equ 41548
+ sysTrapHwrLCDDrawBitmap                equ 41549
+ sysTrapHwrTimerSleep                   equ 41550
+ sysTrapHwrTimerWake                    equ 41551
+ sysTrapHwrLCDWake                      equ 41552
+ sysTrapHwrIRQ1Handler                  equ 41553
+ sysTrapHwrIRQ2Handler                  equ 41554
+ sysTrapHwrIRQ3Handler                  equ 41555
+ sysTrapHwrIRQ4Handler                  equ 41556
+ sysTrapHwrIRQ5Handler                  equ 41557
+ sysTrapHwrIRQ6Handler                  equ 41558
+ sysTrapHwrDockSignals                  equ 41559
+ sysTrapHwrPluggedIn                    equ 41560
+ sysTrapCrc16CalcBlock                  equ 41561
+ sysTrapSelectDay                       equ 41562
+ sysTrapSelectTime                      equ 41563
+ sysTrapDayDrawDaySelector              equ 41564
+ sysTrapDayHandleEvent                  equ 41565
+ sysTrapDayDrawDays                     equ 41566
+ sysTrapDayOfWeek                       equ 41567
+ sysTrapDaysInMonth                     equ 41568
+ sysTrapDayOfMonth                      equ 41569
+ sysTrapDateDaysToDate                  equ 41570
+ sysTrapDateToDays                      equ 41571
+ sysTrapDateAdjust                      equ 41572
+ sysTrapDateSecondsToDate               equ 41573
+ sysTrapDateToAscii                     equ 41574
+ sysTrapDateToDOWDMFormat               equ 41575
+ sysTrapTimeToAscii                     equ 41576
+ sysTrapFind                            equ 41577
+ sysTrapFindStrInStr                    equ 41578
+ sysTrapFindSaveMatch                   equ 41579
+ sysTrapFindGetLineBounds               equ 41580
+ sysTrapFindDrawHeader                  equ 41581
+ sysTrapPenOpen                         equ 41582
+ sysTrapPenClose                        equ 41583
+ sysTrapPenGetRawPen                    equ 41584
+ sysTrapPenCalibrate                    equ 41585
+ sysTrapPenRawToScreen                  equ 41586
+ sysTrapPenScreenToRaw                  equ 41587
+ sysTrapPenResetCalibration             equ 41588
+ sysTrapPenSleep                        equ 41589
+ sysTrapPenWake                         equ 41590
+ sysTrapResLoadForm                     equ 41591
+ sysTrapResLoadMenu                     equ 41592
+ sysTrapFtrInit                         equ 41593
+ sysTrapFtrUnregister                   equ 41594
+ sysTrapFtrGet                          equ 41595
+ sysTrapFtrSet                          equ 41596
+ sysTrapFtrGetByIndex                   equ 41597
+ sysTrapGrfInit                         equ 41598
+ sysTrapGrfFree                         equ 41599
+ sysTrapGrfGetState                     equ 41600
+ sysTrapGrfSetState                     equ 41601
+ sysTrapGrfFlushPoints                  equ 41602
+ sysTrapGrfAddPoint                     equ 41603
+ sysTrapGrfInitState                    equ 41604
+ sysTrapGrfCleanState                   equ 41605
+ sysTrapGrfMatch                        equ 41606
+ sysTrapGrfGetMacro                     equ 41607
+ sysTrapGrfFilterPoints                 equ 41608
+ sysTrapGrfGetNumPoints                 equ 41609
+ sysTrapGrfGetPoint                     equ 41610
+ sysTrapGrfFindBranch                   equ 41611
+ sysTrapGrfMatchGlyph                   equ 41612
+ sysTrapGrfGetGlyphMapping              equ 41613
+ sysTrapGrfGetMacroName                 equ 41614
+ sysTrapGrfDeleteMacro                  equ 41615
+ sysTrapGrfAddMacro                     equ 41616
+ sysTrapGrfGetAndExpandMacro            equ 41617
+ sysTrapGrfProcessStroke                equ 41618
+ sysTrapGrfFieldChange                  equ 41619
+ sysTrapGetCharSortValue                equ 41620
+ sysTrapGetCharAttr                     equ 41621
+ sysTrapGetCharCaselessValue            equ 41622
+ sysTrapPwdExists                       equ 41623
+ sysTrapPwdVerify                       equ 41624
+ sysTrapPwdSet                          equ 41625
+ sysTrapPwdRemove                       equ 41626
+ sysTrapGsiInitialize                   equ 41627
+ sysTrapGsiSetLocation                  equ 41628
+ sysTrapGsiEnable                       equ 41629
+ sysTrapGsiEnabled                      equ 41630
+ sysTrapGsiSetShiftState                equ 41631
+ sysTrapKeyInit                         equ 41632
+ sysTrapKeyHandleInterrupt              equ 41633
+ sysTrapKeyCurrentState                 equ 41634
+ sysTrapKeyResetDoubleTap               equ 41635
+ sysTrapKeyRates                        equ 41636
+ sysTrapKeySleep                        equ 41637
+ sysTrapKeyWake                         equ 41638
+ sysTrapCmBroadcast                     equ 41639
+ sysTrapDlkStartServer                  equ 41640
+ sysTrapDlkGetSyncInfo                  equ 41641
+ sysTrapDlkSetLogEntry                  equ 41642
+ sysTrapPsrInit                         equ 41643
+ sysTrapPsrClose                        equ 41644
+ sysTrapPsrGetCommand                   equ 41645
+ sysTrapPsrSendReply                    equ 41646
+ sysTrapAbtShowAbout                    equ 41647
+ sysTrapMdmDial                         equ 41648
+ sysTrapMdmHangUp                       equ 41649
+ sysTrapDmSearchRecord                  equ 41650
+ sysTrapSysInsertionSort                equ 41651
+ sysTrapDmInsertionSort                 equ 41652
+ sysTrapLstSetTopItem                   equ 41653
+ sysTrapLastTrapNumber                  equ 41654
+ 
+ sysLibTrapBase   equ $0000a800
+ sysLibTrapName   equ 43008
+ sysLibTrapOpen   equ 43009
+ sysLibTrapClose  equ 43010
+ sysLibTrapSleep  equ 43011
+ sysLibTrapWake   equ 43012
+ sysLibTrapCustom equ 43013
+ 
+ sysDbgBreakpointTrapNum    equ 0
+ sysDbgTrapNum              equ 8
+ sysDispatchTrapNum         equ 15
+ 
+ sysResIDBootReset          equ 10000
+ sysResIDBootInitCode       equ 10001
+ sysResIDBootSysCodeStart   equ 10100
+ sysResIDBootSysCodeMin     equ 10102
+ sysResIDBootUICodeStart    equ 10200
+ sysResIDBootUICodeMin      equ 10203
+ sysResIDFeatures           equ 10000
+ sysResIDGrfTemplate        equ 10000
+ sysResIDGrfDictionary      equ 10000
+ sysResIDGrfDefaultMacros   equ 10000
+ sysResIDDefaultDB          equ 1
+ sysResIDSysPrefMain        equ 0
+ sysResIDSysPrefPassword    equ 1
+ sysResIDSysPrefFindStr     equ 2
+ sysResIDSysPrefCalibration equ 3
+ sysResIDDlkUserInfo        equ 4
+ 
+ 
+ ;ui\uicommon.h
+ appVersionID                equ 1
+ ainID                       equ 1000
+ systemVersionID             equ 10000
+ palmLogoBitmap              equ 10000
+ keyboardBackspaceBitmap     equ 10001
+ keyboardTabBitmap           equ 10002
+ keyboardReturnBitmap        equ 10003
+ InformationAlertBitmap      equ 10004
+ ConfirmationAlertBitmap     equ 10005
+ WarningAlertBitmap          equ 10006
+ ErrorAlertBitmap            equ 10007
+ keyboardShiftBitmap         equ 10008
+ keyboardCapBitmap           equ 10009
+ daysOfWeekStrID             equ 10000
+ dayFullNamesStrID           equ 10001
+ monthNamesStrID             equ 10002
+ monthFullNamesStrID         equ 10003
+ categoryAllStrID            equ 10004
+ categoryEditStrID           equ 10005
+ menuCommandStrID            equ 10006
+ launcherBatteryStrID        equ 10007
+ systemNameStrID             equ 10008
+ RenameCategoryAlert         equ 10000
+ RenameCategoryYes           equ 0
+ RenameCategoryNo            equ 1
+ RemoveCategoryAlert         equ 10001
+ RemoveCategoryYes           equ 0
+ RemoveCategoryNo            equ 1
+ LowBatteryAlert             equ 10002
+ VeryLowBatteryAlert         equ 10003
+ UndoAlert                   equ 10004
+ UndoCancelButton            equ 1
+ MergeCategoryAlert          equ 10005
+ MergeCategoryYes            equ 0
+ MergeCategoryNo             equ 1
+ privateRecordInfoAlert      equ 10006
+ ClipboardLimitAlert         equ 10007
+ CategoryExistsAlert         equ 10012
+ DeviceFullAlert             equ 10013
+ sysEditMenuID               equ 10000
+ sysEditMenuUndoCmd          equ 10000
+ sysEditMenuCutCmd           equ 10001
+ sysEditMenuCopyCmd          equ 10002
+ sysEditMenuPasteCmd         equ 10003
+ sysEditMenuSelectAllCmd     equ 10004
+ sysEditMenuSeparator        equ 10005
+ sysEditMenuKeyboardCmd      equ 10006
+ sysKeyboardMenuID           equ 10100
+ sysKeyboardEditUndoCmd      equ 100
+ sysKeyboardEditCutCmd       equ 101
+ sysKeyboardEditCopyCmd      equ 102
+ sysKeyboardEditPasteCmd     equ 103
+ sysKeyboardEditSelectAllCmd equ 104
+ noteMenuID                  equ 10200
+ noteUndoCmd                 equ 10000
+ noteCutCmd                  equ 10001
+ noteCopyCmd                 equ 10002
+ notePasteCmd                equ 10003
+ noteSelectAllCmd            equ 10004
+ noteSeparator               equ 10005
+ noteKeyboardCmd             equ 10006
+ noteTopOfPageCmd            equ 10200
+ noteBottomOfPageCmd         equ 10201
+ SystemKeyboardID            equ 10000
+ CategoriesEditForm          equ 10000
+ CategoriesEditDoneButton    equ 10002
+ CategoriesEditFirstField    equ 10004
+ DateSelectorForm            equ 10100
+ DateSelectorYearLabel       equ 10102
+ DateSelectorPriorYearButton equ 10103
+ DateSelectorNextYearButton  equ 10104
+ DateSelectorTodayButton     equ 10118
+ DateSelectorCancelButton    equ 10119
+ DateSelectorDayGadget       equ 10120
+ TimeSelectorForm            equ 10200
+ TimeSelectorStartTimeButton equ 10204
+ TimeSelectorEndTimeButton   equ 10205
+ TimeSelectorHourList        equ 10206
+ TimeSelectorMinuteList      equ 10207
+ TimeSelectorOKButton        equ 10208
+ TimeSelectorCancelButton    equ 10209
+ TimeSelectorNoTimeButton    equ 10210
+ KeyboardForm                equ 10300
+ KeyboardGadget              equ 10310
+ HelpForm                    equ 10400
+ HelpField                   equ 10402
+ HelpDoneButton              equ 10403
+ HelpUpButton                equ 10404
+ HelpDownButton              equ 10405
+ FindDialog                  equ 10500
+ FindStrField                equ 10503
+ FindOKButton                equ 10504
+ FindResultsDialog           equ 10600
+ FindResultsMsgLabel         equ 10602
+ FindResultsTable            equ 10603
+ FindResultsGoToButton       equ 10604
+ FindResultsCancelButton     equ 10605
+ FindResultsMoreButton       equ 10606
+ FindResultsSearchingStr     equ 10607
+ FindResultsMatchesStr       equ 10608
+ FindResultsNoMatchesStr     equ 10609
+ FindResultsContinueStr      equ 10610
+ NoteView                    equ 10900
+ NoteField                   equ 10901
+ NoteDoneButton              equ 10902
+ NoteSmallFontButton         equ 10903
+ NoteLargeFontButton         equ 10904
+ NoteDeleteButton            equ 10905
+ NoteUpButton                equ 10906
+ NoteDownButton              equ 10907
+ NoteFontGroup               equ 1
+ aboutDialog                 equ 11000
+ aboutNameLabel              equ 11001
+ aboutVersionLabel           equ 11002
+ aboutErrorStr               equ 11003
+ 
+ struct M68KExcTableType
+     initStack.l
+     initPC.l
+     busErr.l
+     addressErr.l
+     illegalInstr.l
+     divideByZero.l
+     chk.l
+     trap.l
+     privilege.l
+     trace.l
+     aTrap.l
+     fTrap.l
+     reserved12.l
+     coproc.l
+     formatErr.l
+     unitializedInt.l
+     reserved.32
+     spuriousInt.l
+     autoVec1.l
+     autoVec2.l
+     autoVec3.l
+     autoVec4.l
+     autoVec5.l
+     autoVec6.l
+     autoVec7.l
+     trapN.64
+     unassigned.64
+ endstruct
+ 
+ struct M68KRegsType
+     d.32
+     a.28
+     usp.l
+     ssp.l
+     pc.l
+     sr.w
+ endstruct
+ 
+ struct AbsRectType
+     left.w
+     top.w
+     right.w
+     bottom.w
+ endstruct
+ 
+ struct PointType
+     x.w
+     y.w
+ endstruct
+ 
+ struct RectangleType
+     topLeft.PointType
+     extent.PointType
+ endstruct
+ 
+ ; ui\font.h
+ struct FontCharInfoType
+     offset.b
+     width.b
+ endstruct
+ 
+ struct FontType
+     fontType.w
+     firstChar.w
+     lastChar.w
+     maxWidth.w
+     kernMax.w
+     nDescent.w
+     fRectWidth.w
+     fRectHeight.w
+     owTLoc.w
+     ascent.w
+     descent.w
+     leading.w
+     rowWords.w
+ endstruct
+ 
+ stdFont equ 0
+ boldFont equ 1
+ largeFont equ 2
+ symbolFont equ 3
+ symbol11Font equ 4
+ symbol7Font equ 5
+ ledFont equ 6
+ 
+ 
+ ; ui\window.h
+ 
+ up    equ 0
+ down  equ 1
+ left  equ 2
+ right equ 3
+ 
+ screenFormat  equ 0
+ genericFormat equ 1
+ 
+ scrCopy    equ 0
+ scrAND     equ 1
+ scrANDNOT  equ 2
+ scrXOR     equ 3
+ scrOR      equ 4
+ scrCopyNOT equ 5
+ 
+ blackPattern     equ 0
+ whitePattern     equ 1
+ grayPattern      equ 2
+ customPattern    equ 3
+ grayHLinePattern equ $000000aa
+ noUnderline      equ 0
+ grayUnderline    equ 1
+ solidUnderline   equ 2
+ 
+ 
+ BitmapFlagsType_compressed_shift equ 0
+ BitmapFlagsType_compressed_count equ 1
+ BitmapFlagsType_compressed_mask  equ $00000001
+ BitmapFlagsType_reserved_shift   equ 1
+ BitmapFlagsType_reserved_count   equ 15
+ BitmapFlagsType_reserved_mask    equ $0000fffe
+ 
+ struct BitmapType
+     width.w
+     height.w
+     rowBytes.w
+     flags.w ; BitmapFlagsType
+     reserved.8
+ endstruct
+ 
+ 
+ struct GraphicStateType
+     grafMode.b
+     patternMode.b
+     pattern.w
+     customPtn.8
+     fontId.b
+     padding.b
+     font.l
+     underlineMode.w
+ endstruct
+ 
+ 
+ FrameBits_cornerDiam_shift  equ 0
+ FrameBits_cornerDiam_count  equ 8
+ FrameBits_cornerDiam_mask   equ $000000ff
+ FrameBits_reserved_shift    equ 8
+ FrameBits_reserved_count    equ 4
+ FrameBits_reserved_mask     equ $00000f00
+ FrameBits_shadowWidth_shift equ 12
+ FrameBits_shadowWidth_count equ 2
+ FrameBits_shadowWidth_mask  equ $00003000
+ FrameBits_width_shift       equ 14
+ FrameBits_width_count       equ 2
+ FrameBits_width_mask        equ $0000c000
+ FrameBits_sizeof            equ 2
+ FrameBitsType_bits          equ 0
+ FrameBitsType_word          equ 0
+ FrameBitsType_sizeof        equ 2
+ 
+ noFrame        equ 0
+ simpleFrame    equ 1
+ rectangleFrame equ 1
+ roundFrame     equ $00000401
+ boldRoundFrame equ $00000702
+ popupFrame     equ $00000205
+ dialogFrame    equ $00000302
+ menuFrame      equ $00000205
+ 
+ WindowFlagsType_format_shift     equ 0
+ WindowFlagsType_format_count     equ 1
+ WindowFlagsType_format_mask      equ $00000001
+ WindowFlagsType_offscreen_shift  equ 1
+ WindowFlagsType_offscreen_count  equ 1
+ WindowFlagsType_offscreen_mask   equ $00000002
+ WindowFlagsType_modal_shift      equ 2
+ WindowFlagsType_modal_count      equ 1
+ WindowFlagsType_modal_mask       equ $00000004
+ WindowFlagsType_focusable_shift  equ 3
+ WindowFlagsType_focusable_count  equ 1
+ WindowFlagsType_focusable_mask   equ $00000008
+ WindowFlagsType_enabled_shift    equ 4
+ WindowFlagsType_enabled_count    equ 1
+ WindowFlagsType_enabled_mask     equ $00000010
+ WindowFlagsType_visible_shift    equ 5
+ WindowFlagsType_visible_count    equ 1
+ WindowFlagsType_visible_mask     equ $00000020
+ WindowFlagsType_dialog_shift     equ 6
+ WindowFlagsType_dialog_count     equ 1
+ WindowFlagsType_dialog_mask      equ $00000040
+ WindowFlagsType_compressed_shift equ 7
+ WindowFlagsType_compressed_count equ 1
+ WindowFlagsType_compressed_mask  equ $00000080
+ WindowFlagsType_reserved_shift   equ 8
+ WindowFlagsType_reserved_count   equ 8
+ WindowFlagsType_reserved_mask    equ $0000ff00
+ 
+ struct WindowType
+     displayWidth.w
+     displayHeight.w
+     displayAddr.l
+     windowFlags.w
+     windowBounds.RectangleType
+     clippingBounds.AbsRectType
+     viewOrigin.PointType
+     frameType.w
+     gstate.l
+     nextWindow.l
+ endstruct
+ 
+ 
+ ; ui\inspoint.h
+ insPtBlinkInterval equ 30
+ insPtWidth equ 2
+ 
+ ; ui\event.h
+ 
+ nilEvent              equ 0
+ penDownEvent          equ 1
+ penUpEvent            equ 2
+ penMoveEvent          equ 3
+ keyDownEvent          equ 4
+ winEnterEvent         equ 5
+ winExitEvent          equ 6
+ ctlEnterEvent         equ 7
+ ctlExitEvent          equ 8
+ ctlSelectEvent        equ 9
+ ctlRepeatEvent        equ 10
+ lstEnterEvent         equ 11
+ lstSelectEvent        equ 12
+ lstExitEvent          equ 13
+ popSelectEvent        equ 14
+ fldEnterEvent         equ 15
+ fldHeightChangedEvent equ 16
+ fldChangedEvent       equ 17
+ tblEnterEvent         equ 18
+ tblSelectEvent        equ 19
+ daySelectEvent        equ 20
+ menuEvent             equ 21
+ appStopEvent          equ 22
+ frmLoadEvent          equ 23
+ frmOpenEvent          equ 24
+ frmGotoEvent          equ 25
+ frmUpdateEvent        equ 26
+ frmSaveEvent          equ 27
+ frmCloseEvent         equ 28
+ tblExitEvent          equ 29
+ firstUserEvent        equ 32767
+ 
+ ; keyDownEvent modifiers
+ shiftKeyMask      equ $00000001
+ capsLockMask      equ $00000002
+ numLockMask       equ $00000004
+ commandKeyMask    equ $00000008
+ optionKeyMask     equ $00000010
+ controlKeyMask    equ $00000020
+ autoRepeatKeyMask equ $00000040
+ doubleTapKeyMask  equ $00000080
+ poweredOnKeyMask  equ $00000100
+ 
+ ; Event timeouts
+ evtWaitForever equ -1
+ 
+ ; EventType data unions
+ struct generic
+     data1.w
+     data2.w
+     data3.w
+     data4.w
+     data5.w
+     data6.w
+     data7.w
+     data8.w
+ endstruct
+ 
+ struct penUp
+     start.PointType
+     end.PointType
+ endstruct
+ 
+ struct keyDown
+     chr.w
+     keyCode.w
+     modifiers.w
+ endstruct
+ 
+ struct winEnter
+     enterWindow.l
+     exitWindow.l
+ endstruct
+ 
+ struct winExit
+     enterWindow.l
+     exitWindow.l
+ endstruct
+ 
+ struct ctlEnter
+     controlID.w
+     pControl.l
+ endstruct
+ 
+ struct ctlSelect
+     controlID.w
+     pControl.l
+     on.b
+     bPad.b
+ endstruct
+ 
+ struct ctlRepeat
+     controlID.w
+     pControl.l
+     time.l
+ endstruct
+ 
+ struct fldEnter
+     fieldID.w
+     pField.l
+ endstruct
+ 
+ struct fldHeightChanged
+     fieldID.w
+     pField.l
+     newHeight.w
+     currentPos.w
+ endstruct
+ 
+ struct fldChanged
+     fieldID.w
+     pField.l
+ endstruct
+ 
+ struct fldExit
+     fieldID.w
+     pField.l
+ endstruct
+ 
+ struct lstEnter
+     listID.w
+     pList.l
+     selection.w
+ endstruct
+ 
+ struct lstExit
+     listID.w
+     pList.l
+ endstruct
+ 
+ struct lstSelect
+     listID.w
+     pList.l
+     selection.w
+ endstruct
+ 
+ struct tblEnter
+     tableID.w
+     pTable.l
+     row.w
+     column.w
+ endstruct
+ 
+ struct tblExit
+     tableID.w
+     pTable.l
+     row.w
+     column.w
+ endstruct
+ 
+ struct tblSelect
+     tableID.w
+     pTable.l
+     row.w
+     column.w
+ endstruct
+ 
+ struct frmLoad
+     formID.w
+ endstruct
+ 
+ struct frmOpen
+     formID.w
+ endstruct
+ 
+ struct frmGoto
+     formID.w
+     recordNum.w
+     matchPos.w
+     matchLen.w
+     matchFieldNum.w
+     matchCustom.l
+ endstruct
+ 
+ struct frmClose
+     formID.w
+ endstruct
+ 
+ struct frmUpdate
+     formID.w
+     updateCode.w
+ endstruct
+ 
+ struct daySelect
+     pSelector.l
+     selection.w
+     useThisDate.b
+     bPad.b
+ endstruct
+ 
+ struct menu
+     itemID.w
+ endstruct
+ 
+ struct popSelect
+     controlID.w
+     controlP.l
+     listID.w
+     listP.l
+     selection.w
+     priorSelection.w
+ endstruct
+ 
+ 
+ struct EventType
+     eType.w
+     penDown.w
+     screenX.w
+     screenY.w
+     data.16
+ endstruct
+ 
+ ; system\systemmgr.h
+ sysAppLaunchCmdNormalLaunch        equ 0
+ sysAppLaunchCmdFind                equ 1
+ sysAppLaunchCmdGoTo                equ 2
+ sysAppLaunchCmdSyncNotify          equ 3
+ sysAppLaunchCmdTimeChange          equ 4
+ sysAppLaunchCmdSystemReset         equ 5
+ sysAppLaunchCmdAlarmTriggered      equ 6
+ sysAppLaunchCmdDisplayAlarm        equ 7
+ sysAppLaunchCmdCountryChange       equ 8
+ sysAppLaunchCmdSyncRequest         equ 9
+ sysAppLaunchCmdSaveData            equ 10
+ sysAppLaunchCmdInitDatabase        equ 11
+ sysAppLaunchCmdSyncCallApplication equ 12
+ 
+ sysAppLaunchFlagNewThread  equ $00000001
+ sysAppLaunchFlagNewStack   equ $00000002
+ sysAppLaunchFlagNewGlobals equ $00000004
+ sysAppLaunchFlagUIApp      equ $00000008
+ sysAppLaunchFlagSubCall    equ $00000010
+ 
+ sysDbgCommLibraryRefNum equ 0
+ 
+ memErrorClass equ $00000100
+ dmErrorClass  equ $00000200
+ serErrorClass equ $00000300
+ slkErrorClass equ $00000400
+ sysErrorClass equ $00000500
+ fplErrorClass equ $00000600
+ evtErrorClass equ $00000700
+ sndErrorClass equ $00000800
+ almErrorClass equ $00000900
+ timErrorClass equ $00000a00
+ penErrorClass equ $00000b00
+ ftrErrorClass equ $00000c00
+ cmpErrorClass equ $00000d00
+ dlkErrorClass equ $00000e00
+ padErrorClass equ $00000f00
+ grfErrorClass equ $00001000
+ mdmErrorClass equ $00001100
+ 
+ sysErrTimeout        equ $00000501
+ sysErrParamErr       equ $00000502
+ sysErrNoFreeResource equ $00000503
+ sysErrNoFreeRAM      equ $00000504
+ sysErrNotAllowed     equ $00000505
+ sysErrSemInUse       equ $00000506
+ sysErrInvalidID      equ $00000507
+ sysErrOutOfOwnerIDs  equ $00000508
+ sysErrNoFreeLibSlots equ $00000509
+ sysErrLibNotFound    equ $0000050a
+ 
+ sysFtrNumROMVersion equ 1
+ sysFtrNumProductID  equ 2
+ 
+ sysBatteryKindAlkaline equ 0
+ sysBatteryKindNiCad    equ 1
+ sysBatteryKindLithium  equ 2
+ 
+ sysTicksPerSecond equ 100
+ 
+ sysRandomMax equ $00007fff
+ 
+ 
+ struct SysAppLaunchCmdSaveDataType
+     uiComing.b
+ endstruct
+ 
+ struct SysAppLaunchCmdSystemResetType
+     hardReset.b
+     createDefaultDB.b
+ endstruct
+ 
+ struct SysAppLaunchCmdInitDatabaseType
+     dbP.l
+     creator.l
+     type.l
+     version.w
+ endstruct
+ 
+ struct SysAppLaunchCmdSyncCallApplicationType
+     action.w
+     paramSize.w
+     paramP.l
+     remoteSocket.b
+     tid.b
+     handled.b
+     bPad.b
+ endstruct
+ 
+ struct SysLibTblEntryType
+     dispatchTblP.l
+     globalsP.l
+ endstruct
+ 
+ 
+ ; system\memorymgr.h
+ memIDPtr    equ 0
+ memIDHandle equ 1
+ 
+ memNewChunkFlagPreLock    equ $00000100
+ memNewChunkFlagNonMovable equ $00000200
+ memNewChunkFlagAtStart    equ $00000400
+ memNewChunkFlagAtEnd      equ $00000800
+ 
+ memDebugModeCheckOnChange        equ $00000001
+ memDebugModeCheckOnAll           equ $00000002
+ memDebugModeScrambleOnChange     equ $00000004
+ memDebugModeScrambleOnAll        equ $00000008
+ memDebugModeFillFree             equ $00000010
+ memDebugModeAllHeaps             equ $00000020
+ memDebugModeRecordMinDynHeapFree equ $00000040
+ 
+ 
+ 
+ 
+ ; system\datamgr.h
+ dmRecAttrCategoryMask equ $0000000f
+ 
+ dmRecNumCategories equ 16
+ 
+ dmCategoryLength equ 16
+ 
+ dmAllCategories   equ $000000ff
+ dmUnfiledCategory equ 0
+ dmMaxRecordIndex  equ $0000ffff
+ dmRecAttrDelete   equ $00000080
+ dmRecAttrDirty    equ $00000040
+ dmRecAttrBusy     equ $00000020
+ dmRecAttrSecret   equ $00000010
+ 
+ dmDBNameLength equ 32
+ 
+ dmHdrAttrResDB        equ $00000001
+ dmHdrAttrReadOnly     equ $00000002
+ dmHdrAttrAppInfoDirty equ $00000004
+ dmHdrAttrBackup       equ $00000008
+ dmHdrAttrOpen         equ $00008000
+ 
+ dmModeReadOnly   equ $00000001
+ dmModeWrite      equ $00000002
+ dmModeReadWrite  equ $00000003
+ dmModeLeaveOpen  equ $00000004
+ dmModeExclusive  equ $00000008
+ dmModeShowSecret equ $00000010
+ 
+ dmSeekForward  equ 1
+ dmSeekBackward equ -1
+ 
+ struct DmSearchStateType
+     info.32
+ endstruct
+ 
+ 
+ dmErrMemError             equ $0000021
+ dmErrIndexOutOfRange      equ $0000022
+ dmErrInvalidParam         equ $0000023
+ dmErrReadOnly             equ $0000024
+ dmErrDatabaseOpen         equ $0000025
+ dmErrCantOpen             equ $0000026
+ dmErrCantFind             equ $0000027
+ dmErrRecordInWrongCard    equ $0000028
+ dmErrCorruptDatabase      equ $0000029
+ dmErrRecordDeleted        equ $00000210
+ dmErrRecordArchived       equ $00000211
+ dmErrNotRecordDB          equ $00000212
+ dmErrNotResourceDB        equ $00000213
+ dmErrROMBased             equ $00000214
+ dmErrRecordBusy           equ $00000215
+ dmErrResourceNotFound     equ $00000216
+ dmErrNoOpenDatabase       equ $00000217
+ dmErrInvalidCategory      equ $00000218
+ dmErrNotValidRecord       equ $00000219
+ dmErrWriteOutOfBounds     equ $00000220
+ dmErrSeekFailed           equ $00000221
+ dmErrAlreadyOpenForWrites equ $00000222
+ dmErrOpenedByAnotherTask  equ $00000223
+ dmErrUniqueIDNotFound     equ $00000224
+ dmErrAlreadyExists        equ $00000225
+ dmErrInvalidDatabaseName  equ $00000226
+ 
+ ; system\errormgr.h
+ 
+ struct ErrExceptionType
+     nextP.l
+     state.52
+     err.l
+ endstruct
+ 
+ ; system\preferences.h
+ 
+ preferenceDataVersion  equ 1
+ defaultAutoOffDuration equ 2
+ 
+ Australia          equ 0
+ Austria            equ 1
+ BelgiumDutch       equ 2
+ BelgiumFrench      equ 3
+ Brazil             equ 4
+ CanadaEnglish      equ 5
+ CanadaFrench       equ 6
+ Denmark            equ 7
+ Finland            equ 8
+ France             equ 9
+ Germany            equ 10
+ Iceland            equ 11
+ Ireland            equ 12
+ Italy              equ 13
+ Japan              equ 14
+ Mexico             equ 15
+ Netherlands        equ 16
+ NewZealand         equ 17
+ Norway             equ 18
+ Portugal           equ 19
+ SouthKorea         equ 20
+ Spain              equ 21
+ Sweden             equ 22
+ SwitzerlandFrench  equ 23
+ SwitzerlandGerman  equ 24
+ SwitzerlandItalian equ 25
+ Taiwan             equ 26
+ UnitedStates       equ 27
+ UnitedKingdom      equ 28
+ 
+ tfColon     equ 0
+ tfColonAMPM equ 1
+ tfColon24h  equ 2
+ tfDot       equ 3
+ tfDotAMPM   equ 4
+ tfDot24h    equ 5
+ tfHoursAMPM equ 6
+ tfHours24h  equ 7
+ 
+ slOn  equ 0
+ slOff equ 1
+ 
+ dfMDYWithSlashes   equ 0
+ dfDMYWithSlashes   equ 1
+ dfDMYWithDots      equ 2
+ dfDMYWithDashes    equ 3
+ dfYMDWithSlashes   equ 4
+ dfYMDWithDots      equ 5
+ dfYMDWithDashes    equ 6
+ dfMDYLongWithComma equ 7
+ dfDMYLong          equ 8
+ dfDMYLongWithDot   equ 9
+ dfDMYLongNoDay     equ 10
+ dfDMYLongWithComma equ 11
+ dfYMDLongWithDot   equ 12
+ dfMYMed            equ 13
+ 
+ nfCommaPeriod      equ 0
+ nfPeriodComma      equ 1
+ nfSpaceComma       equ 2
+ nfApostrophePeriod equ 3
+ 
+ struct SystemPreferencesType
+     version.w
+     country.b
+     dateFormat.b
+     longDateFormat.b
+     weekStartDay.b
+     timeFormat.b
+     numberFormat.b
+     autoOffDuration.b
+     sysSoundLevel.b
+     alarmSoundLevel.b
+     hideSecretRecords.b
+     deviceLocked.b
+     bPad.b
+     sysPrefFlags.w
+     sysBatteryKind.b
+     bPad2.b
+ endstruct
+ 
+ ; system\timemgr.h
+ timErrMemory equ $00000a01
+ 
+ ; system\alarmmgr.h
+ almErrMemory equ $00000901
+ almErrFull   equ $00000902
+ 
+ struct SysAlarmTriggeredParamType
+     ref.l
+     alarmSeconds.l
+     purgeAlarm.w
+ endstruct
+ 
+ struct SysDisplayAlarmParamType
+     ref.l
+     alarmSeconds.l
+     soundAlarm.w
+ endstruct
+ 
+ 
+ ; sysstem\soundmgr.h
+ sndMaxAmp             equ 64
+ sndDefaultAmp         equ $00000040
+ sndCmdFreqDurationAmp equ 1
+ 
+ struct SndCommandType
+     cmd.b
+     padding.b
+     param1.l
+     param2.w
+     param3.w
+ endstruct
+ 
+ sndInfo         equ 1
+ sndWarning      equ 2
+ sndError        equ 3
+ sndStartUp      equ 4
+ sndAlarm        equ 5
+ sndConfirmation equ 6
+ sndClick        equ 7
+ 
+ sndErrBadParam   equ $00000801
+ sndErrBadChannel equ $00000802
+ sndErrMemory     equ $00000803
+ sndErrOpen       equ $00000804
+ sndErrQFull      equ $00000805
+ sndErrQEmpty     equ $00000806
+ 
+ 
+ ; system\keyboard.h
+ kbdShiftKey equ 2
+ kbdCapsKey  equ 1
+ kbdNoKey    equ -1
+ 
+ ; ui\chars.h
+ downArrowChr             equ $0000001f
+ upArrowChr               equ $0000001e
+ leftArrowChr             equ $0000001c
+ rightArrowChr            equ $0000001d
+ pageUpChr                equ $0000000b
+ pageDownChr              equ $0000000c
+ lowBatteryChr            equ $00000101
+ enterDebuggerChr         equ $00000102
+ nextFieldChr             equ $00000103
+ startConsoleChr          equ $00000104
+ menuChr                  equ $00000105
+ commandChr               equ $00000106
+ confirmChr               equ $00000107
+ launchChr                equ $00000108
+ keyboardChr              equ $00000109
+ findChr                  equ $0000010a
+ calcChr                  equ $0000010b
+ prevFieldChr             equ $0000010c
+ alarmChr                 equ $0000010d
+ hardKeyMin               equ $00000200
+ hardKeyMax               equ $000002ff
+ hard1Chr                 equ $00000204
+ hard2Chr                 equ $00000205
+ hard3Chr                 equ $00000206
+ hard4Chr                 equ $00000207
+ hardPowerChr             equ $00000208
+ hardCradleChr            equ $00000209
+ nullChr                  equ $00000000
+ backspaceChr             equ $00000008
+ tabChr                   equ $00000009
+ linefeedChr              equ $0000000a
+ crChr                    equ $0000000d
+ colonChr                 equ $0000003a
+ periodChr                equ $0000002e
+ commaChr                 equ $0000002c
+ quoteChr                 equ $00000022
+ returnChr                equ $0000000d
+ escapeChr                equ $0000001b
+ spaceChr                 equ $00000020
+ lastAsciiChr             equ $000000ff
+ numericSpaceChr          equ $00000080
+ cutChr                   equ $0000012d
+ copyChr                  equ $0000012e
+ pasteChr                 equ $0000012f
+ lowSingleCommaQuoteChr   equ $00000082
+ scriptFChr               equ $00000083
+ lowDblCommaQuoteChr      equ $00000084
+ horizEllipsisChr         equ $00000085
+ daggerChr                equ $00000086
+ dblDaggerChr             equ $00000087
+ circumflexChr            equ $00000088
+ perMilleChr              equ $00000089
+ upSHacekChr              equ $0000008a
+ leftSingleGuillemetChr   equ $0000008b
+ upOEChr                  equ $0000008c
+ diamondChr               equ $0000008d
+ clubChr                  equ $0000008e
+ heartChr                 equ $0000008f
+ spadeChr                 equ $00000090
+ singleOpenCommaQuoteChr  equ $00000091
+ singleCloseCommaQuoteChr equ $00000092
+ dblOpenCommaQuoteChr     equ $00000093
+ dblCloseCommaQuoteChr    equ $00000094
+ bulletChr                equ $00000095
+ enDashChr                equ $00000096
+ emDashChr                equ $00000097
+ spacingTildeChr          equ $00000098
+ trademarkChr             equ $00000099
+ lowSHacekChr             equ $0000009a
+ rightSingleGuillemetChr  equ $0000009b
+ lowOEChr                 equ $0000009c
+ upYDiaeresisChr          equ $0000009f
+ nonBreakSpaceChr         equ $000000a0
+ invertedExclamationChr   equ $000000a1
+ centChr                  equ $000000a2
+ poundChr                 equ $000000a3
+ currencyChr              equ $000000a4
+ yenChr                   equ $000000a5
+ brokenVertBarChr         equ $000000a6
+ sectionChr               equ $000000a7
+ spacingDiaeresisChr      equ $000000a8
+ copyrightChr             equ $000000a9
+ feminineOrdinalChr       equ $000000aa
+ leftGuillemetChr         equ $000000ab
+ notChr                   equ $000000ac
+ softHyphenChr            equ $000000ad
+ registeredChr            equ $000000ae
+ spacingMacronChr         equ $000000af
+ degreeChr                equ $000000b0
+ plusMinusChr             equ $000000b1
+ superscript2Chr          equ $000000b2
+ superscript3Chr          equ $000000b3
+ spacingAcuteChr          equ $000000b4
+ microChr                 equ $000000b5
+ paragraphChr             equ $000000b6
+ middleDotChr             equ $000000b7
+ spacingCedillaChr        equ $000000b8
+ superscript1Chr          equ $000000b9
+ masculineOrdinalChr      equ $000000ba
+ rightGuillemetChr        equ $000000bb
+ fractOneQuarterChr       equ $000000bc
+ fractOneHalfChr          equ $000000bd
+ fractThreeQuartersChr    equ $000000be
+ invertedQuestionChr      equ $000000bf
+ upAGraveChr              equ $000000c0
+ upAAcuteChr              equ $000000c1
+ upACircumflexChr         equ $000000c2
+ upATildeChr              equ $000000c3
+ upADiaeresisChr          equ $000000c4
+ upARingChr               equ $000000c5
+ upAEChr                  equ $000000c6
+ upCCedillaChr            equ $000000c7
+ upEGraveChr              equ $000000c8
+ upEAcuteChr              equ $000000c9
+ upECircumflexChr         equ $000000ca
+ upEDiaeresisChr          equ $000000cb
+ upIGraveChr              equ $000000cc
+ upIAcuteChr              equ $000000cd
+ upICircumflexChr         equ $000000ce
+ upIDiaeresisChr          equ $000000cf
+ upEthChr                 equ $000000d0
+ upNTildeChr              equ $000000d1
+ upOGraveChr              equ $000000d2
+ upOAcuteChr              equ $000000d3
+ upOCircumflexChr         equ $000000d4
+ upOTildeChr              equ $000000d5
+ upODiaeresisChr          equ $000000d6
+ multiplyChr              equ $000000d7
+ upOSlashChr              equ $000000d8
+ upUGraveChr              equ $000000d9
+ upUAcuteChr              equ $000000da
+ upUCircumflexChr         equ $000000db
+ upUDiaeresisChr          equ $000000dc
+ upYAcuteChr              equ $000000dd
+ upThorn                  equ $000000de
+ lowSharpSChr             equ $000000df
+ lowAGraveChr             equ $000000e0
+ lowAAcuteChr             equ $000000e1
+ lowACircumflexChr        equ $000000e2
+ lowATildeChr             equ $000000e3
+ lowADiaeresisChr         equ $000000e4
+ lowARingChr              equ $000000e5
+ lowAEChr                 equ $000000e6
+ lowCCedillaChr           equ $000000e7
+ lowEGraveChr             equ $000000e8
+ lowEAcuteChr             equ $000000e9
+ lowECircumflexChr        equ $000000ea
+ lowEDiaeresisChr         equ $000000eb
+ lowIGraveChr             equ $000000ec
+ lowIAcuteChr             equ $000000ed
+ lowICircumflexChr        equ $000000ee
+ lowIDiaeresisChr         equ $000000ef
+ lowEthChr                equ $000000f0
+ lowNTildeChr             equ $000000f1
+ lowOGraveChr             equ $000000f2
+ lowOAcuteChr             equ $000000f3
+ lowOCircumflexChr        equ $000000f4
+ lowOTildeChr             equ $000000f5
+ lowODiaeresisChr         equ $000000f6
+ divideChr                equ $000000f7
+ lowOSlashChr             equ $000000f8
+ lowUGraveChr             equ $000000f9
+ lowUAcuteChr             equ $000000fa
+ lowUCircumflexChr        equ $000000fb
+ lowUDiaeresisChr         equ $000000fc
+ lowYAcuteChr             equ $000000fd
+ lowThorn                 equ $000000fe
+ lowYDiaeresisChr         equ $000000ff
+ 
+ symbolLeftArrow           equ 3
+ symbolRightArrow          equ 4
+ symbolUpArrow             equ 5
+ symbolDownArrow           equ 6
+ symbolSmallDownArrow      equ 7
+ symbolSmallUpArrow        equ 8
+ symbolMemo                equ 9
+ symbolHelp                equ 10
+ symbolNote                equ 11
+ symbolNoteSelected        equ 12
+ symbolCapsLock            equ 13
+ symbolNumLock             equ 14
+ symbolShiftUpper          equ 15
+ symbolShiftPunc           equ 16
+ symbolShiftExt            equ 17
+ symbolShiftNone           equ 18
+ symbolNoTime              equ 19
+ symbol7ScrollUp           equ 1
+ symbol7ScrollDown         equ 2
+ symbol7ScrollUpDisabled   equ 3
+ symbol7ScrollDownDisabled equ 4
+ symbolCheckboxOff         equ 0
+ symbolCheckboxOn          equ 1
+ symbol11LeftArrow         equ 2
+ symbol11RightArrow        equ 3
+ 
+ glfCapsLock         equ $00000001
+ glfNumLock          equ $00000002
+ gsiShiftNone        equ 0
+ gsiNumLock          equ 1
+ gsiCapsLock         equ 2
+ gsiShiftPunctuation equ 3
+ gsiShiftExtended    equ 4
+ gsiShiftUpper       equ 5
+ gsiShiftLower       equ 6
+ 
+ ; ui\clipboard.h
+ numClipboardForamts equ 3
+ cbdMaxTextLength    equ 1000
+ 
+ clipboardText   equ 0
+ clipboardInk    equ 1
+ clipboardBitmap equ 2
+ 
+ struct ClipboardItem
+     item.l
+     length.w
+ endstruct
+ 
+ ; ui\control.h
+ buttonCtl            equ 0
+ pushButtonCtl        equ 1
+ checkboxCtl          equ 2
+ popupTriggerCtl      equ 3
+ selectorTriggerCtl   equ 4
+ repeatingButtonCtl   equ 5
+ noButtonFrame        equ 0
+ standardButtonFrame  equ 1
+ boldButtonFrame      equ 2
+ rectangleButtonFrame equ 3
+ 
+ ControlAttrType_usable_shift     equ 0
+ ControlAttrType_usable_count     equ 1
+ ControlAttrType_usable_mask      equ $00000001
+ ControlAttrType_enabled_shift    equ 1
+ ControlAttrType_enabled_count    equ 1
+ ControlAttrType_enabled_mask     equ $00000002
+ ControlAttrType_visible_shift    equ 2
+ ControlAttrType_visible_count    equ 1
+ ControlAttrType_visible_mask     equ $00000004
+ ControlAttrType_on_shift         equ 3
+ ControlAttrType_on_count         equ 1
+ ControlAttrType_on_mask          equ $00000008
+ ControlAttrType_leftAnchor_shift equ 4
+ ControlAttrType_leftAnchor_count equ 1
+ ControlAttrType_leftAnchor_mask  equ $00000010
+ ControlAttrType_frame_shift      equ 5
+ ControlAttrType_frame_count      equ 3
+ ControlAttrType_frame_mask       equ $000000e0
+ 
+ 
+ struct ControlType
+     id.w
+     bounds.RectangleType
+     text.l
+     attr.w
+     style.w
+     font.b
+     group.b
+ endstruct
+ 
+ ; ui\field.h
+ 
+ maxFieldTextLen equ $00007fff
+ maxFieldLines   equ 11
+ 
+ leftAlign   equ 0
+ centerAlign equ 1
+ rightAlign  equ 2
+ 
+ undoBufferSize equ 100
+ undoNone       equ 0
+ undoTyping     equ 1
+ undoBackspace  equ 2
+ undoDelete     equ 3
+ undoPaste      equ 4
+ undoCut        equ 5
+ 
+ struct FieldUndoType
+     mode.w
+     start.w
+     end.w
+     bufferLen.w
+     buffer.l
+ endstruct
+ 
+ struct LineInfoType
+     start.w
+     length.w
+ endstruct
+ 
+ 
+ FieldAttrType_usable_shift        equ 0
+ FieldAttrType_usable_count        equ 1
+ FieldAttrType_usable_mask         equ $00000001
+ FieldAttrType_visible_shift       equ 1
+ FieldAttrType_visible_count       equ 1
+ FieldAttrType_visible_mask        equ $00000002
+ FieldAttrType_editable_shift      equ 2
+ FieldAttrType_editable_count      equ 1
+ FieldAttrType_editable_mask       equ $00000004
+ FieldAttrType_singleLine_shift    equ 3
+ FieldAttrType_singleLine_count    equ 1
+ FieldAttrType_singleLine_mask     equ $00000008
+ FieldAttrType_hasFocus_shift      equ 4
+ FieldAttrType_hasFocus_count      equ 1
+ FieldAttrType_hasFocus_mask       equ $00000010
+ FieldAttrType_dynamicSize_shift   equ 5
+ FieldAttrType_dynamicSize_count   equ 1
+ FieldAttrType_dynamicSize_mask    equ $00000020
+ FieldAttrType_insPtVisible_shift  equ 6
+ FieldAttrType_insPtVisible_count  equ 1
+ FieldAttrType_insPtVisible_mask   equ $00000040
+ FieldAttrType_dirty_shift         equ 7
+ FieldAttrType_dirty_count         equ 1
+ FieldAttrType_dirty_mask          equ $00000080
+ FieldAttrType_underlined_shift    equ 8
+ FieldAttrType_underlined_count    equ 2
+ FieldAttrType_underlined_mask     equ $00000300
+ FieldAttrType_justification_shift equ 10
+ FieldAttrType_justification_count equ 2
+ FieldAttrType_justification_mask  equ $00000c00
+ 
+ struct FieldType
+     id.w
+     rect.RectangleType
+     attr.w
+     text.l
+     textHandle.l
+     lines.l
+     textLen.w
+     textBlockSize.w
+     maxChars.w
+     selFirstPos.w
+     selLastPos.w
+     insPtXPos.w
+     insPtYPos.w
+     fontID.b
+     padding.b
+ endstruct
+ 
+ ; ui\list.h
+ noListSelection equ $0000ffff
+ 
+ ListAttrType_usable_shift   equ 0
+ ListAttrType_usable_count   equ 1
+ ListAttrType_usable_mask    equ $00000001
+ ListAttrType_enabled_shift  equ 1
+ ListAttrType_enabled_count  equ 1
+ ListAttrType_enabled_mask   equ $00000002
+ ListAttrType_visible_shift  equ 2
+ ListAttrType_visible_count  equ 1
+ ListAttrType_visible_mask   equ $00000004
+ ListAttrType_poppedUp_shift equ 3
+ ListAttrType_poppedUp_count equ 1
+ ListAttrType_poppedUp_mask  equ $00000008
+ ListAttrType_reserved_shift equ 4
+ ListAttrType_reserved_count equ 4
+ ListAttrType_reserved_mask  equ $000000f0
+ 
+ struct ListType
+     id.w
+     bounds.RectangleType
+     attr.b
+     padding.b
+     itemsText.l
+     numItems.w
+     currentItem.w
+     topItem.w
+     font.w
+     popupWin.l
+     drawItemsCallback.l
+ endstruct
+ 
+ ; ui\table.h
+ tableDefaultColumnSpacing equ 1
+ tableNoteIndicatorWidth   equ 7
+ tableNoteIndicatorHeight  equ 11
+ 
+ checkboxTableItem     equ 0
+ customTableItem       equ 1
+ dateTableItem         equ 2
+ labelTableItem        equ 3
+ numericTableItem      equ 4
+ popupTriggerTableItem equ 5
+ textTableItem         equ 6
+ textWithNoteTableItem equ 7
+ timeTableItem         equ 8
+ 
+ struct TableItemType
+     itemType.b
+     fontID.b
+     intValue.w
+     ptr.l
+ endstruct
+ 
+ struct TableColumnAttrType
+     width.w
+     usable.w
+     spacing.w
+     drawCallback.l
+     loadDataCallback.l
+     saveDataCallback.l
+ endstruct
+ 
+ struct TableRowAttrType
+     id.w
+     height.w
+     data.l
+     usable.b
+     selectable.b
+     invalid.w
+ endstruct
+ 
+ TableAttrType_visible_shift  equ 0
+ TableAttrType_visible_count  equ 1
+ TableAttrType_visible_mask   equ $00000001
+ TableAttrType_editable_shift equ 1
+ TableAttrType_editable_count equ 1
+ TableAttrType_editable_mask  equ $00000002
+ TableAttrType_editing_shift  equ 2
+ TableAttrType_editing_count  equ 1
+ TableAttrType_editing_mask   equ $00000004
+ TableAttrType_selected_shift equ 3
+ TableAttrType_selected_count equ 1
+ TableAttrType_selected_mask  equ $00000008
+ 
+ struct TableType
+     id.w
+     bounds.RectangleType
+     attr.b
+     padding.b
+     numColumns.w
+     numRows.w
+     currentRow.w
+     currentColumn.w
+     topRow.w
+     columnAttrs.l
+     rowAttrs.l
+     items.l
+     currentField.FieldType
+ endstruct
+ 
+ ; ui\form.h
+ noFocus equ $0000ffff
+ 
+ frmRedrawUpdateCode equ $00008000
+ 
+ informationAlert  equ 0
+ confirmationAlert equ 1
+ warningAlert      equ 2
+ errorAlert        equ 3
+ 
+ struct AlertTemplateType
+     alertType.w
+     helpRscID.w
+     numButtons.w
+     defaultButton.w
+ endstruct
+ 
+ 
+ frmFieldObj         equ 0
+ frmControlObj       equ 1
+ frmListObj          equ 2
+ frmTableObj         equ 3
+ frmBitmapObj        equ 4
+ frmLineObj          equ 5
+ frmFrameObj         equ 6
+ frmRectangleObj     equ 7
+ frmLabelObj         equ 8
+ frmTitleObj         equ 9
+ frmPopupObj         equ 10
+ frmGraffitiStateObj equ 11
+ frmGadgetObj        equ 12
+ 
+ FormObjAttrType_usable_shift equ 0
+ FormObjAttrType_usable_count equ 1
+ FormObjAttrType_usable_mask  equ $00000001
+ 
+ struct FormBitmapType
+     attr.b
+     padding.b
+     pos.PointType
+     rscID.w
+ endstruct
+ 
+ struct FormLineType
+     attr.b
+     padding.b
+     point1.PointType
+     point2.PointType
+ endstruct
+ 
+ struct FormFrameType
+     id.w
+     attr.b
+     padding.b
+     rect.RectangleType
+     frameType.w
+ endstruct
+ 
+ struct FormRectangleType
+     attr.b
+     padding.b
+     rect.RectangleType
+ endstruct
+ 
+ struct FormLabelType
+     id.w
+     pos.PointType
+     attr.b
+     padding.b
+     fontID.b
+     padding.b
+     text.l
+ endstruct
+ 
+ struct FormTitleType
+     rect.RectangleType
+     text.l
+ endstruct
+ 
+ struct FormPopupType
+     controlID.w
+     listID.w
+ endstruct
+ 
+ struct FrmGraffitiStateType
+     pos.PointType
+ endstruct
+ 
+ struct FormGadgetType
+     id.w
+     attr.b
+     padding.b
+     rect.RectangleType
+     data.l
+ endstruct
+ 
+ struct FormObjListType
+     objectType.w
+     object.l
+ endstruct
+ 
+ FormAttrType_usable_shift  equ 0
+ FormAttrType_usable_count  equ 1
+ FormAttrType_usable_mask   equ $00000001
+ FormAttrType_visible_shift equ 1
+ FormAttrType_visible_count equ 1
+ FormAttrType_visible_mask  equ $00000002
+ FormAttrType_dirty_shift   equ 2
+ FormAttrType_dirty_count   equ 1
+ FormAttrType_dirty_mask    equ $00000004
+ FormAttrType_saveBehind_shift  equ 3
+ FormAttrType_saveBehind_count  equ 1
+ FormAttrType_saveBehind_mask   equ $00000008
+ FormAttrType_graffitiShift_shift equ 4
+ FormAttrType_graffitiShift_count equ 1
+ FormAttrType_graffitiShift_mask  equ $00000010
+ 
+ struct FormType
+     window.WindowType
+     formId.w
+     attr.w
+     padding.w
+     bitsBehindForm.l
+     handler.l
+     focus.w
+     defaultButton.w
+     helpRscId.w
+     menuRscId.w
+     numObjects.w
+     objects.l
+ endstruct
+ 
+ ; ui\menu.h
+ noMenuSelection     equ -1
+ noMenuItemSelection equ -1
+ MenuSeparatorChar   equ $0000002d
+ 
+ struct MenuItemType
+     id.w
+     command.b
+     unused.b
+     itemStr.l
+ endstruct
+ 
+ struct MenuPullDownType
+     menuWin.l
+     bounds.RectangleType
+     bitsBehind.l
+     titleBounds.RectangleType
+     title.l
+     numItems.w
+     items.l
+ endstruct
+ 
+ MenuBarAttrType_visible_shift        equ 0
+ MenuBarAttrType_visible_count        equ 1
+ MenuBarAttrType_visible_mask         equ $00000001
+ MenuBarAttrType_commandPending_shift equ 1
+ MenuBarAttrType_commandPending_count equ 1
+ MenuBarAttrType_commandPending_mask  equ $00000002
+ MenuBarAttrType_insPtEnabled_shift   equ 2
+ MenuBarAttrType_insPtEnabled_count   equ 1
+ MenuBarAttrType_insPtEnabled_mask    equ $00000004
+ MenuBarAttrType_sizeof               equ 2
+ 
+ struct MenuBarType
+     barWin.l
+     bitsBehind.l
+     savedActiveWin.l
+     bitsBehindStatus.l
+     attr.b
+     padding.b
+     curMenu.w
+     curItem.w
+     commandTick.l
+     numMenus.w
+     menus.l
+ endstruct
+ 
+ ; ui\category.h
+ 
+ struct AppInfoType
+     renamedCategories.w
+     categoryLabels.256
+     categoryUniqIDs.16
+     lastUniqID.b
+ endstruct
+ 
+ ; ui\find.h
+ maxFinds equ 9
+ maxFindStrLen equ 16
+ 
+ struct FindMatchType
+     appCardNo.w
+     appDbID.l
+     foundInCaller.w
+     dbCardNo.w
+     dbID.l
+     recordNum.w
+     matchPos.w
+     matchFieldNum.w
+     matchCustom.l
+ endstruct
+ 
+ struct FindParamsType
+     dbAccesMode.w
+     recordNum.w
+     more.b
+     strAsTyped.17
+     strToFind.17
+     numMatches.w
+     lineNumber.w
+     continuation.b
+     searchedCaller.b
+     callerAppDbID.l
+     callerAppCardNo.w
+     appDbID.l
+     appCardNo.w
+     newSearch.w
+     searchState.DmSearchStateType
+     match0.FindMatchType
+     match1.FindMatchType
+     match2.FindMatchType
+     match3.FindMatchType
+     match4.FindMatchType
+     match5.FindMatchType
+     match6.FindMatchType
+     match7.FindMatchType
+     match8.FindMatchType
+ endstruct
+ 
+ struct GoToParamsType
+     searchStrLen.w
+     dbCardNo.w
+     dbID.l
+     recordNum.w
+     matchPos.w
+     matchFieldNum.w
+     matchCustom.l
+ endstruct
+ 
+ ; system\datetime.h
+ struct DateTimeType
+     second.w
+     minute.w
+     hour.w
+     day.w
+     month.w
+     year.w
+     weekDay.w
+ endstruct
+ 
+ struct TimeType
+     hours.b
+     minutes.b
+ endstruct
+ 
+ noTime equ -1
+ 
+ DateType_year_shift  equ 0
+ DateType_year_count  equ 7
+ DateType_year_mask   equ $0000007f
+ DateType_month_shift equ 7
+ DateType_month_count equ 4
+ DateType_month_mask  equ $00000780
+ DateType_day_shift   equ 11
+ DateType_day_count   equ 5
+ DateType_day_mask    equ $0000f800
+ 
+ 
+ timeStringLength  equ 9
+ dateStringLength  equ 9
+ longDateStrLenght equ 15
+ firstYear         equ 1904
+ numberOfYears     equ 128
+ lastYear          equ $000007ef
+ minutesInSeconds  equ 60
+ hoursInMinutes    equ 60
+ hoursInSeconds    equ $00000e10
+ hoursPerDay       equ 24
+ daysInSeconds     equ $00015180
+ daysInWeek        equ 7
+ daysInYear        equ 365
+ daysInLeapYear    equ 366
+ daysInFourYears   equ $000005b5
+ monthsInYear      equ 12
+ maxTime           equ $00477180
+ 
+ sunday     equ 0
+ monday     equ 1
+ tuesday    equ 2
+ wednesday  equ 3
+ thursday   equ 4
+ friday     equ 5
+ saturday   equ 6
+ 
+ january    equ 1
+ february   equ 2
+ march      equ 3
+ april      equ 4
+ may        equ 5
+ june       equ 6
+ july       equ 7
+ august     equ 8
+ september  equ 9
+ october    equ 10
+ november   equ 11
+ december   equ 12
+ 
+ dom1stSun  equ 0
+ dom1stMon  equ 1
+ dom1stTue  equ 2
+ dom1stWen  equ 3
+ dom1stThu  equ 4
+ dom1stFri  equ 5
+ dom1stSat  equ 6
+ dom2ndSun  equ 7
+ dom2ndMon  equ 8
+ dom2ndTue  equ 9
+ dom2ndWen  equ 10
+ dom2ndThu  equ 11
+ dom2ndFri  equ 12
+ dom2ndSat  equ 13
+ dom3rdSun  equ 14
+ dom3rdMon  equ 15
+ dom3rdTue  equ 16
+ dom3rdWen  equ 17
+ dom3rdThu  equ 18
+ dom3rdFri  equ 19
+ dom3rdSat  equ 20
+ dom4thSun  equ 21
+ dom4thMon  equ 22
+ dom4thTue  equ 23
+ dom4thWen  equ 24
+ dom4thThu  equ 25
+ dom4thFri  equ 26
+ dom4thSat  equ 27
+ domLastSun equ 28
+ domLastMon equ 29
+ domLastTue equ 30
+ domLastWen equ 31
+ domLastThu equ 32
+ domLastFri equ 33
+ domLastSat equ 34
+ 
+ struct DaySelectorType
+     bounds.RectangleType
+     visible.w
+     visibleMonth.w
+     visibleYear.w
+     selected.DateTimeType
+ endstruct
+ 
+ daySelectorMinYear equ $00000770
+ daySelectorMaxYear equ $000007ef
+ NumericSpaceChar   equ $00000080
+ 
+ ; ui\seltime.h
+ 
+ struct HMSTime
+     hours.b
+     minutes.b
+     seconds.b
+ endstruct
+ 
+ ; system\globals.h
+ sysUIRsvGlobalsSize equ $000000a0
+ 
+ struct FixedGlobalsType
+     memCardSlots.b
+     dbgWasEntered.b
+     memCardInfoP.l
+     memSemaphoreID.l
+     memDebugMode.w
+     dmOpenList.l
+     dbgInDebugger.b
+     dbgTracing.b
+     dbgGlobalsP.l
+     dbgSerGlobalsP.l
+     sysAppInfoP.l
+     sysKernelDataP.l
+     sysDispatchTableP.l
+     sysOwnerIDsInUse.l
+     sysAMXAppInfoP.l
+     sysClockFreq.l
+     sysHardKeyCreators.l
+     sysBatteryCheckTimer.w
+     sysBatteryMinThreshold.b
+     hwrBatteryLevel.b
+     sysNextBatteryAlertTimer.w
+     sysBatteryWarnThreshold.b
+     sysDispatchTableRev.b
+     sysDispatchTableSize.w
+     sysLibTableP.l
+     sysLibTableEntries.w
+     sysConsoleStackChunkP.l
+     sysUIShellAppInfoP.l
+     sysTimerID.l
+     sysAutoOffEvtTicks.l
+     sysAutoOffSeconds.w
+     sysRandomSeed.l
+     slkGlobalsP.l
+     serGlobalsP.l
+     scrGlobalsP.l
+     fplGlobalsP.l
+     penGlobalsP.l
+     sysEvtMgrGlobalsP.l
+     sndGlobalsP.l
+     timGlobalsP.l
+     almGlobalsP.l
+     ftrGlobalsP.l
+     grfGlobalsP.l
+     keyGlobalsP.l
+     uiGlobals.160
+     uiExtensionsP.l
+     curUIAppInfoP.l
+     nextUIAppDBID.l
+     nextUIAppCmd.w
+     nextUIAppCmdPBP.l
+     nextUIAppCardNo.b
+     hwrDataWELevel.b
+     hwrWakeUp.w
+     hwrCPUDutyCycle.b
+     hwrPenDown.b
+     hwrCurTicks.l
+     hwrTotalRAMSize.l
+     hwrDozeSubTicks.l
+     padGlobalsP.l
+     sysResetFlags.b
+     sysBatteryKind.b
+     memMinDynHeapFree.l
+     sysPrefFlags.w
+     sysGlobalsP.l
+     sysMiscFlags.w
+ endstruct
+ 
+ struct LowMemHdrType
+     vectors.M68KExcTableType
+     globals.FixedGlobalsType
+ endstruct
+ 
+ PilotGlobalsP equ 0
+ 
+ ; ui\uiglobals.h
+ UINumFonts equ 7
+ eventQueueSize equ 10
+ 
+ struct UIGlobalsType
+     activeWindow.l
+     displayWindow.l
+     drawWindow.l
+     firstWindow.l
+     exitWindowID.l
+     enterWindowID.l
+     exitedWindowID.l
+     gState.GraphicStateType
+     eventQ.l
+     eventQIndex.w
+     eventQLength.w
+     lastScreenX.w
+     lastScreenY.w
+     lastPenDown.w
+     needNullTickCount.l
+     uiCurrentFontPtr.l
+     uiFontTable.28
+     uiCurrentFontID.b
+     padding.b
+     currentForm.l
+     insPtIsEnabled.b
+     insPtOn.b
+     insPtLoc.PointType
+     insPtHeight.w
+     insPtLastTick.l
+     insPtBitsBehind.l
+     clipboard.18
+     uiCurrentMenu.l
+     undoGlobals.FieldUndoType
+     gsiState.b
+     gsiIsEnabled.b
+     gsiLocation.PointType
+ endstruct
+ 
+ ; system\serialmgr.h
+ serErrBadParam    equ $00000301
+ serErrBadPort     equ $00000302
+ serErrNoMem       equ $00000303
+ serErrBadConnID   equ $00000304
+ serErrTimeOut     equ $00000305
+ serErrLineErr     equ $00000306
+ serErrAlreadyOpen equ $00000307
+ serErrStillOpen   equ $00000308
+ serErrNotOpen     equ $00000309
+ 
+ struct SerSettingsType
+     baudRate.l
+     flags.l
+     ctsTimeout.l
+ endstruct
+ 
+ serSettingsFlagStopBitsM    equ $00000001
+ serSettingsFlagStopBits1    equ $00000000
+ serSettingsFlagStopBits2    equ $00000001
+ serSettingsFlagParityOnM    equ $00000002
+ serSettingsFlagParityEvenM  equ $00000004
+ serSettingsFlagXonXoffM     equ $00000008
+ serSettingsFlagRTSAutoM     equ $00000010
+ serSettingsFlagCTSAutoM     equ $00000020
+ serSettingsFlagBitsPerCharM equ $000000c0
+ serSettingsFlagBitsPerChar5 equ $00000000
+ serSettingsFlagBitsPerChar6 equ $00000040
+ serSettingsFlagBitsPerChar7 equ $00000080
+ serSettingsFlagBitsPerChar8 equ $000000c0
+ 
+ serDefaultSettings equ $000000d0
+ 
+ serLineErrorParity    equ $00000001
+ serLineErrorHWOverrun equ $00000002
+ serLineErrorFraming   equ $00000004
+ serLineErrorBreak     equ $00000008
+ serLineErrorHShake    equ $00000010
+ serLineErrorSWOverrun equ $00000020
+ 
+ sysLibTrapSerName             equ 43008
+ sysLibTrapSerOpen             equ 43009
+ sysLibTrapSerClose            equ 43010
+ sysLibTrapSerSleep            equ 43011
+ sysLibTrapSerWake             equ 43012
+ sysLibTrapSerGetSettings      equ 43013
+ sysLibTrapSerSetSettings      equ 43014
+ sysLibTrapSerGetStatus        equ 43015
+ sysLibTrapSerClearErr         equ 43016
+ sysLibTrapSerSend             equ 43017
+ sysLibTrapSerSendWait         equ 43018
+ sysLibTrapSerSendCheck        equ 43019
+ sysLibTrapSerSendFlush        equ 43020
+ sysLibTrapSerReceive          equ 43021
+ sysLibTrapSerReceiveWait      equ 43022
+ sysLibTrapSerReceiveCheck     equ 43023
+ sysLibTrapSerReceiveFlush     equ 43024
+ sysLibTrapSerSetReceiveBuffer equ 43025
+ 
+ ; system\featuremgr.h
+ ftrErrInvalidParam  equ $00000c01
+ ftrErrNoSuchFeature equ $00000c02
+ ftrErrAlreadyExists equ $00000c03
+ ftrErrROMBased      equ $00000c04
+ ftrErrInternalErr   equ $00000c05
+ 
+ ; system\systemprv.h
+ struct SysAppInfoType
+     cmd.w
+     cmdPBP.l
+     launchFlags.w
+     taskID.l
+     codeH.l
+     dbP.l
+     stackP.l
+     globalsChunkP.l
+     memOwnerID.w
+     dmAccessP.l
+     dmLastErr.w
+     errExceptionP.l
+ endstruct
+ 
+         list 1                  ;renable listing
diff -r -c -x *.orig -x *.rej -x #* -x *~ -N orig/gcc-2.7.2.2/PalmOS/Pilot.pch gcc-2.7.2.2/PalmOS/Pilot.pch
*** orig/gcc-2.7.2.2/PalmOS/Pilot.pch	Thu Jan  1 01:00:00 1970
--- gcc-2.7.2.2/PalmOS/Pilot.pch	Wed Feb 19 16:16:06 1997
***************
*** 0 ****
--- 1,30 ----
+ /*******************************************************************
+  * 							 Pilot Software
+  *
+  *		 Copyright(c) 1994, Palm Computing Inc., All Rights Reserved
+  *
+  *-------------------------------------------------------------------  
+  * FileName:
+  *		Pilot.pch
+  *
+  * Description:
+  *		Source file used to generate pre-compiled headers for Pilot
+  *  UI modules
+  *
+  * History:
+  *   	6/6/95  RM - Created by Ron Marianetti
+  *
+  *******************************************************************/  
+ 
+ // By including this module in your CodeWarrior project. You can automatically
+ //  regenerate the pre-compiled header file used by the UI modules called
+ //  Pilot.h.obj
+ #ifdef 	EMULATION_LEVEL
+ 	#pragma precompile_target ":Obj:Pilot.h.obj.mpw"
+ #else
+ 	#pragma precompile_target ":Obj:Pilot.h.obj"
+ #endif
+ 
+ // Include the World....			
+ #include <Pilot.h>
+ 
diff -r -c -x *.orig -x *.rej -x #* -x *~ -N orig/gcc-2.7.2.2/PalmOS/Startup.inc gcc-2.7.2.2/PalmOS/Startup.inc
*** orig/gcc-2.7.2.2/PalmOS/Startup.inc	Thu Jan  1 01:00:00 1970
--- gcc-2.7.2.2/PalmOS/Startup.inc	Wed Feb 19 16:16:06 1997
***************
*** 0 ****
--- 1,34 ----
+ ; Startup.inc
+ ; by Darrin Massena (darrin@massena.com)
+ ; 17 Jul 96
+ 
+         code
+ 
+ proc __Startup__()
+ local pappi.l
+ local prevGlobals.l
+ local globalsPtr.l
+ beginproc
+         systrap SysAppStartup(&pappi(a6), &prevGlobals(a6), &globalsPtr(a6))
+         tst.w   d0
+         beq.s   _SU1
+ 
+         systrap SndPlaySystemSound(#sndError.b)
+         moveq   #-1,d0
+         bra.s   _SUExit
+ 
+ _SU1:
+         movea.l pappi(a6),a0
+         call    PilotMain(SysAppInfoType.cmd(a0).w, SysAppInfoType.cmdPBP(a0).l, SysAppInfoType.launchFlags(a0).w)
+ 
+         systrap SysAppExit(pappi(a6).l, prevGlobals(a6).l, globalsPtr(a6).l)
+         moveq   #0,d0
+ 
+ _SUExit:
+ endproc
+ 
+         data
+ 
+         ds.l    1                            ;loader stores SysAppInfoPtr here
+ 
+         code
diff -r -c -x *.orig -x *.rej -x #* -x *~ -N orig/gcc-2.7.2.2/PalmOS/SysBuildRules.h gcc-2.7.2.2/PalmOS/SysBuildRules.h
*** orig/gcc-2.7.2.2/PalmOS/SysBuildRules.h	Thu Jan  1 01:00:00 1970
--- gcc-2.7.2.2/PalmOS/SysBuildRules.h	Wed Feb 19 16:47:15 1997
***************
*** 0 ****
--- 1,25 ----
+ /*******************************************************************
+  * 							 Pilot Software
+  *
+  *		 Copyright(c) 1994, Palm Computing Inc., All Rights Reserved
+  *
+  *-------------------------------------------------------------------
+  * FileName:
+  *		SysBuildRules.h
+  *
+  * Description:
+  *		This header file can beused as a template for
+  *  common build options across all applications. To use, simply break 
+  *  the pencil and edit.
+  *   
+  *
+  *  Typically, the options specified in this file are used to 
+  *  set the language and country for the emulator
+  *
+  * History:
+  *   	6/6/95 RM - Created by Ron Marianetti  
+  *
+  *******************************************************************/
+  
+ //#define	LANGUAGE					LANGUAGE_FRENCH
+ //#define	COUNTRY						COUNTRY_FRANCE
diff -r -c -x *.orig -x *.rej -x #* -x *~ -N orig/gcc-2.7.2.2/PalmOS/System/AlarmMgr.h gcc-2.7.2.2/PalmOS/System/AlarmMgr.h
*** orig/gcc-2.7.2.2/PalmOS/System/AlarmMgr.h	Thu Jan  1 01:00:00 1970
--- gcc-2.7.2.2/PalmOS/System/AlarmMgr.h	Wed Feb 19 16:49:15 1997
***************
*** 0 ****
--- 1,209 ----
+ /*******************************************************************
+  * 							 Pilot Software
+  *
+  *		 Copyright(c) 1995, Palm Computing Inc., All Rights Reserved
+  *
+  *-------------------------------------------------------------------
+  * FileName:
+  *		AlarmMgr.h
+  *
+  * Description:
+  *		Include file for Alarm Manager
+  *
+  * History:
+  *   	4/11/95  VMK - Created by Vitaly Kruglikov
+  *
+  *******************************************************************/
+ 
+ 
+ #ifndef __ALARM_MGR_H__
+ #define __ALARM_MGR_H__
+ 
+ 
+ // Include elementary types
+ #include <Common.h>
+ #include <SystemMgr.h>
+ 
+ 
+ 
+ 
+ /************************************************************
+  * Alarm Manager result codes
+  * (almErrorClass is defined in SystemMgr.h)
+  *************************************************************/
+ #define	almErrMemory			(almErrorClass | 1)	// ran out of memory
+ #define	almErrFull				(almErrorClass | 2)	// alarm table is full
+ 
+ 			
+ /********************************************************************
+  * Alarm Manager Structures
+  ********************************************************************/
+ 
+ // Structure passed with the sysAppLaunchCmdAlarmTriggered action code:
+ //
+ // This is a notification that an alarm set by the creator has
+ // gone off.  The action code handler should not do anything time-
+ // consuming here.  The intended use is to set the next alarm and/or
+ // to perform some quick maintenance task.  Particularly, this action code
+ // handler is not allowed to display any UI(dialogs, etc.) -- this would delay
+ // notification for alarms set by others.  This action code may be ignored.
+ typedef struct SysAlarmTriggeredParamType {
+ 	DWord				ref;				// --> alarm reference value passed by caller;
+ 	ULong				alarmSeconds;	// --> alarm date/time in seconds since 1/1/1904;
+ 
+ 	Boolean			purgeAlarm;		// <-- if set to true on return, this alarm
+ 											// will be removed from the alarm table and the
+ 											// display notification will NOT be generated for it
+ 	} SysAlarmTriggeredParamType;
+ 
+ // Structure passed with the sysAppLaunchCmdDisplayAlarm action code:
+ //
+ // This is a notification to display an alarm.  This action code
+ // will be called sometime after the app receives a sysAppLaunchCmdAlarmTriggered
+ // notification(perhaps after a significant delay).  It is possible that this
+ // notification will not be sent at all in the event the alarm table becomes full and
+ // the alarm table entry is used to hold a new alarm (this does NOT apply to the
+ // sysAppLaunchCmdAlarmTriggered notification).  This action code may be ignored.
+ typedef struct SysDisplayAlarmParamType {
+ 	DWord				ref;				// alarm reference value passed by caller;
+ 	ULong				alarmSeconds;	// alarm date/time in seconds since 1/1/1904;
+ 	Boolean			soundAlarm;		// non-zero if alarm needs to be sounded;
+ 	} SysDisplayAlarmParamType;
+ 
+ 
+ 
+ /********************************************************************
+  * Alarm Manager Routines
+  * These are define as external calls only under emulation mode or
+  *  under native mode from the module that actually installs the trap
+  *  vectors
+  ********************************************************************/
+ #ifdef __cplusplus
+ extern "C" {
+ #endif
+ 
+ 
+ //-------------------------------------------------------------------
+ // Initialization
+ //-------------------------------------------------------------------
+ 
+ //
+ // ISSUES:
+ //		1.	Is the Alarms Database always on Card 0 ?
+ //
+ //		A: We will store alarm info on the dynamic heap.  Upon reset and
+ //			time change, apps will be notified via action code and will re-
+ //			submit their alarms.
+ //			
+ //		2.	Should a semaphore be used by the Alarm Manager ?
+ //
+ //		A:	No.  Present implementation does not require it.  May add one
+ //			in the future to ensure data integrity between tasks.
+ //
+ //		3.	Pilot will need to go back to sleep even if the alarms dialog box is
+ //			not closed after some interval.
+ //
+ //		A:	This will happen in GetNextEvent.
+ //
+ //		4.	We will need to sound the alarm for all newly triggered alarms
+ //			even while another alarm dialog box is on-screen.
+ //
+ //		A:	Yes.  We will keep a flag in our globals to indicate when the
+ //			alarm manager is displaying an alarm.  This way we do not hog
+ //			stack and dynamic heap memory with additional alarm boxes.
+ //
+ //		5.	Should the alarm dialog box be system-modal ?
+ //
+ //		A:	Yes -- by swallowing the "QUIT" (and/or others) message in the alarm dialog's
+ //			event loop.
+ //
+ 
+ 
+ // AlmInit()
+ //
+ // Initializes the Alarm Manager.
+ //
+ // Create the Alarm Globals.
+ //
+ Err			AlmInit(void)
+ 							SYS_TRAP(sysTrapAlmInit);
+ 	
+ 
+ //-------------------------------------------------------------------
+ // API
+ //-------------------------------------------------------------------
+ 
+ 
+ // AlmSetAlarm()
+ //
+ // Sets an alarm for the given application.  If an alarm for that
+ // application had been previously set, it will be replaced.  Passing
+ // a zero for alarmSeconds cancels the current alarm for the application.
+ // 
+ Err			AlmSetAlarm(UInt cardNo, LocalID dbID, DWord ref,
+ 					ULong alarmSeconds, Boolean quiet)
+ 							SYS_TRAP(sysTrapAlmSetAlarm);
+ 
+ 
+ // AlmGetAlarm()
+ //
+ // Gets the alarm seconds for a given app.
+ // Zero is returned if there is no alarm setting for the app.
+ ULong			AlmGetAlarm(UInt cardNo, LocalID dbID, DWordPtr refP)
+ 							SYS_TRAP(sysTrapAlmGetAlarm);
+ 
+ 
+ // AlmEnableNotification
+ //
+ // Enables/disables Alarm Manager's notification mechanism.  For example,
+ // the HotSync application disables Alarm notifications during the sync
+ // to ensure that apps do not try to access their data database until
+ // the DesktopLink server had a chance to notify the apps whose databases
+ // were modified during the session.  This also prevents the alarm dialogs from
+ // blocking the HotSync UI.  A call to disable MUST always
+ // precede the call to enable.
+ //
+ void			AlmEnableNotification(Boolean enable)
+ 							SYS_TRAP(sysTrapAlmEnableNotification);
+ 
+ 
+ // AlmDisplayAlarm()
+ //
+ // Displays any alarms that have gone off.
+ //
+ // This function is called by the Event Manager executing on some app's
+ // thread.  This permits us to access resources and execute system calls
+ // which would not be possible at interrupt time.
+ //
+ void			AlmDisplayAlarm(Boolean okToDisplay)
+ 							SYS_TRAP(sysTrapAlmDisplayAlarm);
+ 
+ 
+ // AlmCancelAll()
+ //
+ // Cancels all alarms managed by the Alarm Manager.  This
+ // function is presently called by the Time Manager to cancel all alarms
+ // when the user changes date/time. 
+ //
+ void			AlmCancelAll(void)
+ 							SYS_TRAP(sysTrapAlmCancelAll);
+ 
+ 
+ 
+ // AlmAlarmCallback()
+ //
+ // This function is called at interrupt time by the Time Manager when
+ // an alarm goes off.
+ //
+ void			AlmAlarmCallback(void)
+ 							SYS_TRAP(sysTrapAlmAlarmCallback);
+ 
+ 
+ #ifdef __cplusplus 
+ }
+ #endif
+ 
+ 
+ 
+ #endif  // __ALARM_MGR_H__
+ 
diff -r -c -x *.orig -x *.rej -x #* -x *~ -N orig/gcc-2.7.2.2/PalmOS/System/AlarmPrv.h gcc-2.7.2.2/PalmOS/System/AlarmPrv.h
*** orig/gcc-2.7.2.2/PalmOS/System/AlarmPrv.h	Thu Jan  1 01:00:00 1970
--- gcc-2.7.2.2/PalmOS/System/AlarmPrv.h	Wed Feb 19 16:49:15 1997
***************
*** 0 ****
--- 1,111 ----
+ /*******************************************************************
+  * 							 Pilot Software
+  *
+  *		 Copyright(c) 1995, Palm Computing Inc., All Rights Reserved
+  *
+  *-------------------------------------------------------------------
+  * FileName:
+  *		AlarmPrv.h
+  *
+  * Description:
+  *		Private Include file for Alarm Manager
+  *
+  * History:
+  *   	4/11/95  VMK - Created by Vitaly Kruglikov
+  *
+  *******************************************************************/
+ 
+ 
+ #ifdef	NON_PORTABLE
+ #ifndef __ALARM_PRV_H__
+ #define __ALARM_PRV_H__
+ 
+ 
+ 
+ /************************************************************
+  * Alarm Manager Constants
+  *
+  *************************************************************/
+ #define almMinTableLength	2		// minimum # of entries in alarm table;
+ 											// MUST NOT BE ZERO.
+ 											
+ #define almMaxTableLength		20	// maximum # of enries in alarm table
+ 
+ 
+ /*******************************************************************
+  * Alarm Manager alarm table structures
+  *
+  *******************************************************************/
+ 
+ // An entry in the alarm table
+ typedef struct AlmEntryType {
+ 	DWord				ref;				// alarm reference value passed by caller;
+ 
+ 	ULong				alarmSeconds;	// alarm date/time in seconds since 1/1/1904;
+ 											// a value of 0 indicates unused entry;
+ 	
+ 	LocalID			dbID;				// creator app database ID;
+ 	Word				cardNo : 1;		// creator app card number;
+ 	
+ 	Word				quiet : 1;		// 1 indicates that the caller wants
+ 											// to be quietly notified when the alarm
+ 											// goes off without all the alarm bells
+ 											// and whistles;
+ 
+ 	Word				triggered : 1;	// 1 indicates the alarm has been triggered;
+ 											
+ 	Word				notified : 1;	// 1 indicates we notified the caller that
+ 											// the alarm went off;
+ 	} AlmEntryType;
+ 
+ typedef AlmEntryType*		AlmEntryPtr;
+ 
+ 
+ // The alarm table
+ typedef struct AlmTableType {
+ 	Short				numEntries;		// Number of entries in alarm Table;
+ 	
+ 											// List of alarm entries;
+ 											// This is a variable size field which
+ 											// ***MUST BE LAST***
+ 	AlmEntryType	list[almMinTableLength];
+ 	} AlmTableType;
+ 
+ typedef AlmTableType*		AlmTablePtr;
+ typedef AlmTablePtr*			AlmTableHandle;
+ 
+ 
+ /*******************************************************************
+  * Alarm Manager Globals
+  *
+  *******************************************************************/
+ typedef struct AlmGlobalsType {
+ 	// We're not making the alarm table a part of the
+ 	// Alarm Globals structure because it is allowed
+ 	// to resize, thus posing a problem for
+ 	// AlmAlarmCallback() which needs to access the
+ 	// Alarm Globals at interrupt time.
+ 	AlmTableHandle	tableH;			// alarm table handle;
+ 
+ 	ULong				lastSoundSeconds;
+ 											// alarm seconds of the last alarm for
+ 											// which an alarm was sounded;
+ 
+ 	Word				displaying : 1;// 1 indicates we're blocked waiting for
+ 											// some app to finish displaying an alarm
+ 											// dialog box; set and cleared by
+ 											// AlmDisplayNextAlarm();
+ 											
+ 	Word				triggered : 1;	// 1 indicates an alarm was triggered; this
+ 											// field is set by the AlmAlarmCallback() and
+ 											// is checked and cleared by AlmDisplayAlarm();
+ 
+ 	Byte				disableCount;	// if this value is greater than zero, Alarm
+ 											// notifications are disabled (see AlmEnableNotification);
+ 	} AlmGlobalsType;
+ 
+ typedef AlmGlobalsType*		AlmGlobalsPtr;
+ 
+ 
+ #endif  // __ALARM_MGR_H__
+ #endif  // NON_PORTABLE
diff -r -c -x *.orig -x *.rej -x #* -x *~ -N orig/gcc-2.7.2.2/PalmOS/System/CMClient.h gcc-2.7.2.2/PalmOS/System/CMClient.h
*** orig/gcc-2.7.2.2/PalmOS/System/CMClient.h	Thu Jan  1 01:00:00 1970
--- gcc-2.7.2.2/PalmOS/System/CMClient.h	Wed Feb 19 16:49:15 1997
***************
*** 0 ****
--- 1,118 ----
+ /*******************************************************************
+  * 							 Pilot Software
+  *
+  *		 Copyright(c) 1995, Palm Computing Inc., All Rights Reserved
+  *
+  *-------------------------------------------------------------------
+  * FileName:
+  *		CMClient.h
+  *
+  * Description:
+  *		Connection Management Protocol client definitions.
+  *
+  * History:
+  *   	9/14/95	vmk	Created by Vitaly Marty Kruglikov
+  *
+  *******************************************************************/
+ 
+ 
+ #ifndef __CMCLIENT_H__
+ #define __CMCLIENT_H__
+ 
+ #if EMULATION_LEVEL == 1		// EMULATION_WINDOWS
+ 	
+ 	// Pilot common definitions
+ 	#include "Common.h"
+ 	#include "SerLink.h"
+ 	
+ #else	// EMULATION_LEVEL != EMULATION_WINDOWS
+ 	
+ 	// Pilot common definitions
+ 	#include <Common.h>
+ 	#include <SerialLinkMgr.h>
+ 	
+ #endif	// EMULATION_LEVEL == EMULATION_WINDOWS
+ 
+ #if EMULATION_WINDOWS != 1
+ 	LOGIC ERROR
+ #endif
+ 
+ 
+ 
+ /************************************************************
+  * Connection Manager result codes
+  * (cmpErrorClass is defined in SystemMgr.h)
+  *************************************************************/
+ 
+ #define cmErrParam			(cmpErrorClass | 1)	// bad parameter
+ #define cmErrTimedOut		(cmpErrorClass | 2)	// connection initiation/listenning timed out
+ #define cmErrComm				(cmpErrorClass | 3)	// communication(send/receive) error
+ #define cmErrCommVersion	(cmpErrorClass | 4)	// incompatible comm version
+ #define cmErrMemory			(cmpErrorClass | 5)	// insufficient memory error
+ #define cmErrCommBusy		(cmpErrorClass | 6)	// PAD server is already in use
+ #define cmErrUserCan			(cmpErrorClass | 7)	// attempt cancelled by user
+ 
+ 
+ 
+ /********************************************************************
+  * Connection Manager Constants 
+  ********************************************************************/
+ 
+ #define cmWakeupTransactionID		0xFF
+  
+ /********************************************************************
+  * Connection Manager Structures
+  ********************************************************************/
+ typedef Int (*CmAbortProc)(DWord userRef);
+ 
+ typedef struct CmParamType {
+ 	UInt				localSocket;	// -> user's socket
+ 	UInt				remoteSocket;	// -> remote socket
+ 	ULong				maxBaud;			// -> maximum baud rate which can be used
+ 	Boolean			viaModem;		// -> set to true if connecting via modem
+ 	CmAbortProc		abortProc;		// -> ptr to abort procedure
+ 	DWord				userRef;			// -> reference value for abort procedure
+ 	} CmParamType;
+ 
+ typedef CmParamType*			CmParamPtr;
+ 
+ 
+ typedef struct CmSessionType {
+ 	// Parameters passed by user
+ 	CmParamType		param;			// user parameters
+ 	
+ 	UInt				serRefNum;		// serial library reference number
+ 	} CmSessionType;
+ 
+ typedef CmSessionType*	CmSessionPtr;
+ 
+ 
+ 
+ 
+ /********************************************************************
+  * Connection Manager API Routines
+  ********************************************************************/
+ 
+ #ifdef __cplusplus
+ extern "C" {
+ #endif
+ 
+ // Listens for a "wakeup" message from the broadcaster
+ // and completes the connection handshake by sending the "init"
+ // or "abort" message(called by client).
+ Err	CmListen(CmParamPtr paramP);
+ 
+ 
+ #ifdef __cplusplus 
+ }
+ #endif
+ 
+ 
+ 
+ /********************************************************************
+  * Connection Manager Macros
+  ********************************************************************/
+ 
+ 
+ 
+ #endif	// __CMCLIENT_H__
diff -r -c -x *.orig -x *.rej -x #* -x *~ -N orig/gcc-2.7.2.2/PalmOS/System/CMCommon.h gcc-2.7.2.2/PalmOS/System/CMCommon.h
*** orig/gcc-2.7.2.2/PalmOS/System/CMCommon.h	Thu Jan  1 01:00:00 1970
--- gcc-2.7.2.2/PalmOS/System/CMCommon.h	Wed Feb 19 16:49:15 1997
***************
*** 0 ****
--- 1,107 ----
+ /*******************************************************************
+  * 							 Pilot Software
+  *
+  *		 Copyright(c) 1995, Palm Computing Inc., All Rights Reserved
+  *
+  *-------------------------------------------------------------------
+  * FileName:
+  *		CMCommon.h
+  *
+  * Description:
+  *		Connection Management Protocol common definitions.
+  *
+  * History:
+  *   	9/14/95	vmk	Created by Vitaly Marty Kruglikov
+  *
+  *******************************************************************/
+ 
+ 
+ #ifndef __CMCOMMON_H__
+ #define __CMCOMMON_H__
+ 
+ #if EMULATION_LEVEL == 1		// EMULATION_WINDOWS
+ 	
+ 	// Pilot common definitions
+ 	#include "Common.h"
+ 	
+ #else	// EMULATION_LEVEL != EMULATION_WINDOWS
+ 	
+ 	// Pilot common definitions
+ 	#include <Common.h>
+ 	
+ #endif	// EMULATION_LEVEL == EMULATION_WINDOWS
+ 
+ #if EMULATION_WINDOWS != 1
+ 	LOGIC ERROR
+ #endif
+ 
+ 
+ 
+ /********************************************************************
+  * CMP Packet Format
+  ********************************************************************/
+ 
+ // The CMP packets are used for transmitting data for the Pilot CMP protocol layer.
+ // The structure of the CMP packet is built into the data part of the SLP packet and is,
+ // therefore, constrained by the SLP packet data size limitations.
+ 
+ 
+ // Packet type values used in the CMP packet body "type" field:
+ //
+ typedef enum CmpType {
+ 	cmpWakeup	= 1,			// CMP Wakeup packet sent from server to client
+ 	cmpInit,						// CMP Init packet sent from client to server
+ 	cmpAbort						// CMP Abort packet sent from client to server
+ 	} CmpType;
+ 
+ 
+ // cmpInit and cmpWakeup packet body structure:
+ //
+ typedef struct CmpBodyType {
+ 	Byte	type;								// CMP packet type
+ 
+ 	Byte	flags;							// in cmpInit packets: indicates which values were adjusted by
+ 												// the client(defined below); in cmpWakeup pakcets: null;
+ 												// in cmpAbort packets: reason for abort.
+ 
+ 	DWord	commVersion;					// in cmpWakeup: server comm software version number;
+ 												// in cmpInit: client comm version
+ 
+ 	DWord	baudRate;						// in cmpWakeup: max server baud rate;
+ 												// in cmpInit packets: the prescribed baud rate
+ 	} CmpBodyType;
+ 	
+ typedef CmpBodyType*		CmpBodyPtr;
+ 
+ // Flags used in the packet body "flags" field of cmpInit
+ // packets.  These values are additive in the sense that they can be
+ // added or or'ed to form a composite value:
+ #define cmpInitFlagChangeBaudRate	0x80		// signals that the baud rate was adjusted by the client
+ 
+ 
+ // Flags used in the packet body "flags" field of cmpAbort packets.
+ // These values are additive in the sense that they can be
+ // added or or'ed to form a composite value:
+ #define cmpAbortFlagVersionError		0x80		// signals incompatible comm versions
+ 
+ 
+ 
+ /********************************************************************
+  * CMP Protocol Parameters
+  ********************************************************************/
+ 
+ // This transaction id is used by cmpWakeup packets.  cmpInit and cmpAbort
+ // packets MUST use a different transaction id.
+ //
+ #define cmpWakeupTransactionID		0xFF
+ 
+ // This is the baud rate at which CMP connections are initiated
+ //
+ #define cmpInitialBaudRate				9600L
+ 
+ // This is the time limit for trying to initiate a connection
+ //
+ #define cmpMaxInitiateSec				20
+ 
+ 
+ #endif	// __CMCOMMON_H__
diff -r -c -x *.orig -x *.rej -x #* -x *~ -N orig/gcc-2.7.2.2/PalmOS/System/CMServer.h gcc-2.7.2.2/PalmOS/System/CMServer.h
*** orig/gcc-2.7.2.2/PalmOS/System/CMServer.h	Thu Jan  1 01:00:00 1970
--- gcc-2.7.2.2/PalmOS/System/CMServer.h	Wed Feb 19 16:49:15 1997
***************
*** 0 ****
--- 1,104 ----
+ /*******************************************************************
+  * 							 Pilot Software
+  *
+  *		 Copyright(c) 1995, Palm Computing Inc., All Rights Reserved
+  *
+  *-------------------------------------------------------------------
+  * FileName:
+  *		CMServer.h
+  *
+  * Description:
+  *		Connection Management Protocol server definitions.
+  *
+  * History:
+  *   	9/14/95	vmk	Created by Vitaly Marty Kruglikov
+  *
+  *******************************************************************/
+ 
+ 
+ #ifndef __CMSERVER_H__
+ #define __CMSERVER_H__
+ 
+ // Pilot common definitions
+ #include <Common.h>
+ 
+ //#include <SerialLinkMgr.h>
+ 
+ 
+ 
+ /************************************************************
+  * Connection Manager result codes
+  * (cmpErrorClass is defined in SystemMgr.h)
+  *************************************************************/
+ 
+ #define cmErrParam			(cmpErrorClass | 1)	// bad parameter
+ #define cmErrTimedOut		(cmpErrorClass | 2)	// connection initiation/listenning timed out
+ #define cmErrComm				(cmpErrorClass | 3)	// communication(send/receive) error
+ #define cmErrCommVersion	(cmpErrorClass | 4)	// incompatible comm version
+ #define cmErrMemory			(cmpErrorClass | 5)	// insufficient memory error
+ #define cmErrCommBusy		(cmpErrorClass | 6)	// PAD server is already in use
+ #define cmErrUserCan			(cmpErrorClass | 7)	// attempt cancelled by user
+ 
+ 
+ 
+ /********************************************************************
+  * Connection Manager Constants 
+  ********************************************************************/
+  
+ /********************************************************************
+  * Connection Manager Structures
+  ********************************************************************/
+ typedef Int (*CmAbortProc)(DWord userRef);
+ 
+ typedef struct CmParamType {
+ 	UInt				localSocket;	// -> user's socket
+ 	UInt				remoteSocket;	// -> remote socket
+ 	ULong				maxBaud;			// -> maximum baud rate which can be used
+ 	ULong				hwShakeAbove;	// -> enable HW hand-shake above this baud
+ 	Boolean			viaModem;		// -> set to true if connecting via modem
+ 	CmAbortProc		abortProc;		// -> ptr to abort procedure
+ 	DWord				userRef;			// -> reference value for abort procedure
+ 	} CmParamType;
+ 
+ typedef CmParamType*			CmParamPtr;
+ 
+ 
+ typedef struct CmSessionType {
+ 	// Parameters passed by user
+ 	CmParamType		param;			// user parameters
+ 	
+ 	UInt				serRefNum;		// serial library reference number
+ 	} CmSessionType;
+ 
+ typedef CmSessionType*	CmSessionPtr;
+ 
+ 
+ 
+ 
+ /********************************************************************
+  * Connection Manager API Routines
+  ********************************************************************/
+ 
+ #ifdef __cplusplus
+ extern "C" {
+ #endif
+ 
+ // Initiates connection establishment by sending "wakeup" packets
+ // and listens for connection handshake(called by server).
+ Err	CmBroadcast(CmParamPtr paramP)
+ 							SYS_TRAP(sysTrapCmBroadcast);
+ 
+ 
+ #ifdef __cplusplus 
+ }
+ #endif
+ 
+ 
+ 
+ /********************************************************************
+  * Connection Manager Macros
+  ********************************************************************/
+ 
+ 
+ 
+ #endif	// __CMSERVER_H__
diff -r -c -x *.orig -x *.rej -x #* -x *~ -N orig/gcc-2.7.2.2/PalmOS/System/ConsoleMgr.h gcc-2.7.2.2/PalmOS/System/ConsoleMgr.h
*** orig/gcc-2.7.2.2/PalmOS/System/ConsoleMgr.h	Thu Jan  1 01:00:00 1970
--- gcc-2.7.2.2/PalmOS/System/ConsoleMgr.h	Wed Feb 19 16:49:15 1997
***************
*** 0 ****
--- 1,51 ----
+ /*******************************************************************
+  * 							 Pilot Software
+  *
+  *		 Copyright(c) 1994, Palm Computing Inc., All Rights Reserved
+  *
+  *-------------------------------------------------------------------
+  * FileName:
+  *		ConsoleMgr.h
+  *
+  * Description:
+  *		This module implements simple text in and text out to a console 
+  *  application on the other end of the serial port. It talks through
+  *  the Serial Link Manager and sends and receives packets of type slkPktTypeConsole.
+  *
+  * History:
+  *   	10/25/94  RM - Created by Ron Marianetti
+  *
+  *******************************************************************/
+ 
+ #ifndef __CONSOLEMGR_H__
+ #define __CONSOLEMGR_H__
+ 
+ 
+ 
+ 
+ /********************************************************************
+  * Console Manager Routines
+  ********************************************************************/
+ #ifdef __cplusplus
+ extern "C" {
+ #endif
+ 
+ Err		ConPutS(CharPtr message)
+ 				SYS_TRAP(sysTrapConPutS);
+ 				
+ Err		ConGetS(CharPtr message, Long timeout)
+ 				SYS_TRAP(sysTrapConGetS);
+ 
+ 
+ #ifdef __cplusplus 
+ }
+ #endif
+ 
+ 
+ 
+ 
+ #endif // __CONSOLEMGR_H__
+ 
+ 
+ 
+ 
diff -r -c -x *.orig -x *.rej -x #* -x *~ -N orig/gcc-2.7.2.2/PalmOS/System/Crc.h gcc-2.7.2.2/PalmOS/System/Crc.h
*** orig/gcc-2.7.2.2/PalmOS/System/Crc.h	Thu Jan  1 01:00:00 1970
--- gcc-2.7.2.2/PalmOS/System/Crc.h	Wed Feb 19 16:49:15 1997
***************
*** 0 ****
--- 1,64 ----
+ /***********************************************************************
+  *
+  *	Copyright (c) Palm Computing 1995 -- All Rights Reserved
+  *
+  * PROJECT:  Pilot
+  * FILE:     Crc.h
+  * AUTHOR:	 Vitaly Kruglikov: May 10, 1995
+  *
+  *		
+  * DESCRIPTION:
+  *		This is the header file for the CRC calculation routines for Pilot.
+  *
+  *
+  * REVISION HISTORY:
+  *		5/10/95		vmk		Initial version.
+  *
+  **********************************************************************/
+ 
+ 
+ #ifndef __CRC_H__
+ #define __CRC_H__
+ 
+ 
+ // Include elementary types
+ #include <Common.h>
+ #include <SystemMgr.h>
+ 
+ 
+ 
+ 
+ /********************************************************************
+  * CRC Calculation Routines
+  * These are define as external calls only under emulation mode or
+  *  under native mode from the module that actually installs the trap
+  *  vectors
+  ********************************************************************/
+ #ifdef __cplusplus
+ extern "C" {
+ #endif
+ 
+ 
+ 	
+ 
+ //-------------------------------------------------------------------
+ // API
+ //-------------------------------------------------------------------
+ 
+ 
+ // Crc16CalcBlock()
+ //
+ // Calculate the 16-bit CRC of a data block using the table lookup method.
+ // 
+ Word			Crc16CalcBlock(VoidPtr bufP, UInt count, Word crc)
+ 							SYS_TRAP(sysTrapCrc16CalcBlock);
+ 
+ 
+ #ifdef __cplusplus 
+ }
+ #endif
+ 
+ 
+ 
+ #endif  // __CRC_H__
+ 
diff -r -c -x *.orig -x *.rej -x #* -x *~ -N orig/gcc-2.7.2.2/PalmOS/System/DLClient.h gcc-2.7.2.2/PalmOS/System/DLClient.h
*** orig/gcc-2.7.2.2/PalmOS/System/DLClient.h	Thu Jan  1 01:00:00 1970
--- gcc-2.7.2.2/PalmOS/System/DLClient.h	Wed Feb 19 16:49:15 1997
***************
*** 0 ****
--- 1,190 ----
+ /*******************************************************************
+  * 							 Pilot Software
+  *
+  *		 Copyright(c) 1995, Palm Computing Inc., All Rights Reserved
+  *
+  *-------------------------------------------------------------------
+  * FileName:
+  *		DLClient.h
+  *
+  * Description:
+  *		Desktop Link Protocol(DLP) client implementation definitions.
+  *
+  * History:
+  *   	7/12/95	vmk	Created by Vitaly Marty Kruglikov
+  *
+  *******************************************************************/
+ 
+ #define INCLUDE_VIEWER_ID
+ 
+ #ifndef __DL_CLIENT_H__
+ #define __DL_CLIENT_H__
+ 
+ 
+ #if EMULATION_LEVEL == 1		// EMULATION_WINDOWS
+ 
+ // Pilot common definitions
+ #include "Common.h"
+ 
+ // Desktop Link common definitions
+ #include	"DLCommon.h"
+ 
+ #else	// EMULATION_LEVEL != EMULATION_WINDOWS
+ 
+ // Pilot common definitions
+ #include <Common.h>
+ 
+ // Desktop Link common definitions
+ #include	<DLCommon.h>
+ 
+ #endif	// EMULATION_LEVEL == EMULATION_WINDOWS
+ 
+ #if EMULATION_WINDOWS != 1
+ 	LOGIC ERROR
+ #endif
+ 
+ 
+ 
+ 
+ /************************************************************
+  * DLK result codes
+  * (dlkErrorClass is defined in SystemMgr.h)
+  *************************************************************/
+ 
+ #define dlkErrParam			(dlkErrorClass | 1)	// invalid parameter
+ #define dlkErrSessClosed	(dlkErrorClass | 2)	// session closed unexpectedly
+ #define dlkErrMemory			(dlkErrorClass | 3)	// memory allocation error
+ #define dlkErrLocalCan		(dlkErrorClass | 4)	// cancelled by local user
+ #define dlkErrNoSession		(dlkErrorClass | 5)	// could not establish a session	
+ #define dlkErrSizeErr		(dlkErrorClass | 6)	// reply length is too big
+ #define dlkErrTooManyClients	(dlkErrorClass | 7)	// reply length is too big
+ #define dlkErrBufTooSmall	(dlkErrorClass | 8)	// reply buffer is too small
+ #define dlkErrCreate			(dlkErrorClass | 9)	// error creating database
+ #define dlkErrNotEnoughSpace	(dlkErrorClass | 10)	// not enough space on remote
+ #define dlkErrAlreadyExists	(dlkErrorClass | 11)	// cannot create a duplicate
+ #define dlkErrNotFound		(dlkErrorClass | 12)	// database/record/resource/block not found
+ #define dlkErrDelete			(dlkErrorClass | 13)	// delete error
+ #define dlkErrClose			(dlkErrorClass | 14)	// close error
+ #define dlkErrAdd				(dlkErrorClass | 15)	// add record/resource error
+ #define dlkErrRead			(dlkErrorClass | 16)	// read record/resource/block error
+ #define dlkErrUserInfo		(dlkErrorClass | 17)	// error reading/writing user info
+ #define dlkErrReplyFormat	(dlkErrorClass | 18)	// reply format error
+ #define dlkErrDeleted		(dlkErrorClass | 19)	// record was deleted
+ #define dlkErrOpen			(dlkErrorClass | 20)	// record was deleted
+ 
+ 
+ 
+ /********************************************************************
+  * DLK Session Structures
+  ********************************************************************/
+  	
+ //
+ // DLP Client session information
+ //
+ 
+ typedef Int (*DlkAbortProcPtr)(DWord userRef);
+ 
+ 
+ typedef struct DlkClientSessionType {
+  	// Information supplied by user
+  	Byte					remoteSocket;	// server socket
+  	Byte					localSocket;	// workstation socket
+  	DlkAbortProcPtr	abortProcP;		// ptr to abort proc
+  	DWord					userRef;			// user reference value for abort proc
+  
+ 	// Session status information
+ 	Int					numClients;		// Number of clients
+ 	Byte					dlpRefNum;		// DLP session reference number
+ 
+  	// Reply buffer
+  	WordPtr				replyBufP;
+  	ULong					replyBufSize;
+  	} DlkClientSessionType;
+  
+ typedef DlkClientSessionType*	DlkClientSessionPtr;
+ 
+ 
+ //
+ // Parameter passed to DlkInitClient()
+ //
+ typedef struct DlkClientParamType {
+  	Byte					remoteSocket;	// server socket for SP
+  	Byte					localSocket;	// workstation socket
+  	DlkAbortProcPtr	abortProcP;
+  	DWord					userRef;
+  	} DlkClientParamType;
+  
+ typedef DlkClientParamType*		DlkClientParamPtr;
+ 
+ 
+ /********************************************************************
+  * DLK Routines
+  ********************************************************************/
+ 
+ #ifdef __cplusplus
+ extern "C" {
+ #endif
+ 
+ //
+ // CLIENT API
+ //
+ 
+ // * RETURNED:	0 if session ended successfully; otherwise: dlkErrParam,
+ // *				dlkErrNoSession, dlkErrMemory, dlkErrTooManyClients
+ Err DlkInitClient(DlkClientParamPtr paramP, BytePtr refNumP);
+ 
+ Err DlkClientDone(Byte refNum);
+ 
+ Err DlkSendTickle(Byte refNum);
+ 
+ Err DlkOpenDatabase(Byte refNum, Byte cardNo, CharPtr nameP, Byte mode,
+ 		BytePtr dlkDBIDP);
+ 
+ Err DlkCreateDatabase(Byte refNum, Byte cardNo, CharPtr name, Word dbFlags,
+ 		DWord creator, DWord type, BytePtr dbIDP);
+ 
+ Err DlkDeleteDatabase(Byte refNum, UInt cardNo, CharPtr nameP);
+ 
+ Err DlkCloseDatabase(Byte refNum, Byte dbID);
+ 
+ Err DlkReadOpenDBInfo(Byte refNum, Byte dbID, WordPtr numRecP);
+ 
+ Err DlkReadAppBlock(Byte refNum, Byte dbID, UInt offset, UInt numBytes,
+ 		VoidPtr bufP, UInt bufSize, UIntPtr rcvdLenP, UIntPtr blkSizeP);
+ 
+ Err DlkAddRecord(Byte refNum, Byte dbID, VoidPtr recP,
+ 		Word recSize, DWordPtr recIDP);
+ 
+ Err DlkReadRecord(Byte refNum, Byte dbID, UInt index, UInt offset,
+ 		UInt numBytes, VoidPtr bufP, UInt bufSize, DWordPtr recIDP,
+ 		BytePtr attrP, BytePtr categoryP, UIntPtr rcvdLenP, UIntPtr recSizeP);
+ 
+ Err DlkDeleteAllRecords(Byte RefNum, Byte dbID);
+ 
+ Err DlkWriteUserInfo(Byte refNum, CharPtr userNameP, DWord userID,
+ 		DWord lastSyncPC);
+ 
+ Err DlkReadUserInfo(Byte refNum, CharPtr userNameBufP, DWordPtr userIDP,
+ 		DWordPtr lastSyncPCP);
+ 
+ Err DlkNotifyOpenConduit(Byte refNum, BooleanPtr cancelP);
+ 
+ Err DlkNotifyEndOfSync(Byte refNum, DlpSyncTermCode termCode);
+ 
+ Err DlkResetRemote(Byte refNum);
+ 
+ Err DlkGetDBNameViaCallAppTest(Byte refNum, Word cardNo, Word index, CharPtr bufP, Word bufSize);
+ 
+ 
+ #ifdef __cplusplus 
+ }
+ #endif
+ 
+ 
+ /********************************************************************
+  * DLK Macros
+  ********************************************************************/
+ 
+ 
+ 
+ #endif	// __DL_CLIENT_H__
diff -r -c -x *.orig -x *.rej -x #* -x *~ -N orig/gcc-2.7.2.2/PalmOS/System/DLCommon.h gcc-2.7.2.2/PalmOS/System/DLCommon.h
*** orig/gcc-2.7.2.2/PalmOS/System/DLCommon.h	Thu Jan  1 01:00:00 1970
--- gcc-2.7.2.2/PalmOS/System/DLCommon.h	Wed Feb 19 16:49:15 1997
***************
*** 0 ****
--- 1,1695 ----
+ /*******************************************************************
+  * 							 Pilot Software
+  *
+  *		 Copyright(c) 1995, Palm Computing Inc., All Rights Reserved
+  *
+  *-------------------------------------------------------------------
+  * FileName:
+  *		DLCommon.h
+  *
+  * Description:
+  *		Desktop Link Protocol(DLP) function id's, parameters, and frame
+  *		structures.
+  *
+  * History:
+  *   	6/7/95	vmk	Created by Vitaly Marty Kruglikov
+  *		6/15/95	vmk	Changed dlp/Read/Write/UserID to dlp/Read/Write/UserInfo and
+  *							added the last sync PC id field to their arguments at Laura's request.
+  *		6/15/95	vmk	Added option to dlpDeleteRecord to delete all records in DB. 
+  *
+  *******************************************************************/
+ 
+ 
+ #ifndef __DLCOMMON_H__
+ #define __DLCOMMON_H__
+ 
+ 
+ /************************************************************
+  * DesktopLink function codes
+  *************************************************************/
+ 
+ // DlpFuncID -- function id's used in request blocks sent to
+ // the DesktopLink application on Pilot.  The width of the function
+ // id base is 7 bits.  The high order bit(the 8th bit) is used to
+ // distinguish requests from their responses --  it is cleared in request
+ // blocks and is set in response blocks (i.e., the response to a particular
+ // command will have the same function code base as the command and the
+ // high order bit set).  See dlpFuncRespBit defined below.
+ //
+ typedef enum DlpFuncID {
+ 
+ 	dlpReservedFunc = 0x0F,			// range reserved for internal use
+ 
+ 	dlpReadUserInfo,
+ 	
+ 	dlpWriteUserInfo,
+ 	
+ 	dlpReadSysInfo,
+ 	
+ 	dlpGetSysDateTime,
+ 	
+ 	dlpSetSysDateTime,
+ 	
+ 	dlpReadStorageInfo,
+ 	
+ 	dlpReadDBList,
+ 	
+ 	dlpOpenDB,
+ 	
+ 	dlpCreateDB,
+ 	
+ 	dlpCloseDB,
+ 	
+ 	dlpDeleteDB,
+ 	
+ 	dlpReadAppBlock,
+ 	
+ 	dlpWriteAppBlock,
+ 
+ 	dlpReadSortBlock,
+ 
+ 	dlpWriteSortBlock,
+ 
+ 	dlpReadNextModifiedRec,
+ 
+ 	dlpReadRecord,
+ 
+ 	dlpWriteRecord,
+ 
+ 	dlpDeleteRecord,
+ 
+ 	dlpReadResource,
+ 
+ 	dlpWriteResource,
+ 
+ 	dlpDeleteResource,
+ 
+ 	dlpCleanUpDatabase,
+ 
+ 	dlpResetSyncFlags,
+ 
+ 	dlpCallApplication,
+ 
+ 	dlpResetSystem,
+ 	
+ 	dlpAddSyncLogEntry,
+ 	
+ 	//dlpUnused1,					// was: for debugging -- just echoes received data
+ 	dlpReadOpenDBInfo,
+ 	
+ 	dlpMoveCategory,				// was: dlpUpdateSyncStatus
+ 	
+ 	dlpProcessRPC,					// remote procedure calls interface
+ 	
+ 	dlpOpenConduit,				// this command is sent before each conduit is opened
+ 	
+ 	dlpEndOfSync,					// ends the sync session
+ 	
+ 	dlpResetDBIndex,				// resets "modified record" index
+ 	
+ 	dlpReadRecordIDList,
+ 
+ 	dlpLastFunc						// ***ALWAYS KEEP LAST***
+ 
+ 	} DlpFuncID;
+ 
+ 
+ // Desktop Link function error codes returned in the response errorCode
+ // field.
+ typedef enum DlpRespErrorCode {
+ 	dlpRespErrNone = 0,					// reserve 0 for no error
+ 	dlpRespErrSystem,						// general Pilot system error
+ 	dlpRespErrIllegalReq,				// unknown function ID
+ 	dlpRespErrMemory,						// insufficient memory
+ 	dlpRespErrParam,						// invalid parameter
+ 	dlpRespErrNotFound,					// database, record, or resource not found
+ 	dlpRespErrNoneOpen,					// there are no open databases
+ 	dlpRespErrDatabaseOpen,				// database is open by someone else
+ 	dlpRespErrTooManyOpenDatabases,	// there are too many open databases
+ 	dlpRespErrAlreadyExists,			// DB already exists
+ 	dlpRespErrCantOpen,					// couldn't open DB
+ 	dlpRespErrRecordDeleted,			// record is deleted
+ 	dlpRespErrRecordBusy,				// record is in use by someone else
+ 	dlpRespErrNotSupported,				// the requested operation is not supported
+ 												// on the given database type(record or resource)
+ 	dlpRespErrUnused1,					// was dlpRespErrROMBased
+ 	dlpRespErrReadOnly,					// caller does not have write access(or DB is in ROM)
+ 	dlpRespErrNotEnoughSpace,			// not enough space for record/resource
+ 	dlpRespErrLimitExceeded,			// size limit exceeded
+ 	dlpRespErrCancelSync,				// cancel the sync
+ 	
+ 	dlpRespErrBadWrapper,				// bad arg wrapper(for debugging)
+ 	dlpRespErrArgMissing,				// required arg not found(for debugging)
+ 	dlpRespErrArgSize,					// invalid argument size
+ 	
+ 	dlpRespErrLastReserved = 127		// last error code reserved for Palm
+ 												// *KEEP THIS ENTRY LAST*
+ 	} DlpRespErrorCode;
+ 
+ 
+ // Database flags
+ // NOTE: THESE *MUST* MATCH THE TOUCHDOWN DB ATTRIBUTES(AT LEAST IN THE FIRST VERSION).
+ // ANY CHANGES MUST BE REFLECTED IN "READ DB LIST" AND 
+ #define	dlpDBFlagResDB				0x0001	// resource DB if set; record DB if cleared
+ #define	dlpDBFlagReadOnly			0x0002	// DB is read only if set; read/write if cleared
+ #define	dlpDBFlagAppInfoDirty	0x0004	// resource DB if set; record DB if cleared
+ #define	dlpDBFlagBackup			0x0008	//	Set if database should be backed up to PC if
+ 														//	no app-specific synchronization conduit has
+ 														//	been supplied.
+ #define	dlpDBFlagOpen				0x8000	// DB is open
+ 
+ // Database record attributes
+ #define	dlpRecAttrDeleted			0x80	// delete this record next sync
+ #define	dlpRecAttrDirty			0x40	// archive this record next sync
+ #define	dlpRecAttrBusy				0x20	// record currently in use
+ #define	dlpRecAttrSecret			0x10	// "secret" record - password protected
+ #define	dlpRecAttrArchived		0x08	// archived record
+ 
+ 
+ // Date/time will be described in the following format
+ //			yr(2 bytes), mo(1 byte, 1-12), dy(1 byte, 1-31),
+ //			hr(1 byte, 0-23), min(1 byte, 0-59), sec(1 byte, 0-59),
+ //			unused(1 byte).
+ 
+ typedef struct DlpDateTimeType {	// OFFSET
+ 	Word		year;						// 0;		year (high, low)
+ 	Byte		month;					// 2;		month: 1-12
+ 	Byte		day;						// 3;		day: 1-31
+ 	Byte		hour;						// 4;		hour: 0-23
+ 	Byte		minute;					// 5;		minute: 0-59
+ 	Byte		second;					// 6;		second: 0-59
+ 	Byte		unused;					// 7;		unused -- set to null!
+ 	} DlpDateTimeType;				// TOTAL: 8 bytes
+ 
+ 
+  
+ /************************************************************
+  * Request and Response headers.
+  *
+  * Each DLP request and response data block begins with the
+  * corresponding header structure which identifies the function
+  * id, argument count, and error code(responses only).
+  *************************************************************/
+ 
+ // Request header:
+ //
+ typedef struct DlpReqHeaderType {
+ 												// OFFSET
+ 	Byte					id;				// 0;		request function ID
+ 	Byte					argc;				// 2;		count of args that follow this header
+ 												// TOTAL: 2 bytes
+ 	} DlpReqHeaderType;
+ 
+ typedef DlpReqHeaderType*		DlpReqHeaderPtr;
+ 
+ typedef struct DlpReqType {
+ 												// OFFSET
+ 	DlpReqHeaderType	header;			// 0;		request header
+ 												// FIXED SIZE: 2 bytes
+ 	Byte					args[1];			// 2;		request arguments -- var size
+ 	} DlpReqType;
+ 
+ typedef DlpReqType*		DlpReqPtr;
+  
+ // Response header:
+ //
+ typedef struct DlpRespHeaderType {
+ 												// OFFSET
+ 	Byte					id;				// 0;		response function ID
+ 	Byte					argc;				// 1;		count of arguments that follow this header
+ 	Word					errorCode;		// 2;		error code
+ 												// TOTAL: 4 bytes
+ 	} DlpRespHeaderType;
+ 
+ typedef DlpRespHeaderType*		DlpRespHeaderPtr;
+ 
+ typedef struct DlpRespType {
+ 												// OFFSET
+ 	DlpRespHeaderType	header;			// 0;		response header
+ 												// FIXED SIZE: 4 bytes
+ 	Byte					args[1];			// 4;		response arguments -- var size
+ 	} DlpRespType;
+ 	
+ typedef DlpRespType*		DlpRespPtr;
+ 
+ 
+ // Generic request/response body type(for utility routines)
+ //
+ typedef union DlpGenericBodyType {
+ 	Byte					id;				// request/response id
+ 	DlpReqType			req;				// request body
+ 	DlpRespType			resp;				// response body
+ 	} DlpGenericBodyType;
+ 	
+ typedef DlpGenericBodyType*		DlpGenericBodyPtr;
+ 
+ 
+ // dlpFuncRespBit is used to form a function response ID from a
+ // function ID by or'ing it with the function ID.  For example: if
+ // dlpFuncDeleteResource is the request ID, the correct response ID
+ // must be (dlpFuncDeleteResource | dlpFuncRespBit).
+ //
+ #define dlpFuncRespBit				0x80
+ 
+ // dlpFuncIDMask is used to mask out the function ID value
+ #define dlpFuncIDMask				0x7f
+ 
+ 
+ 
+ /************************************************************
+  *
+  * Argument headers used to "wrap" request and response arguments
+  *
+  * IMPORTANT:	ARGUMENT WRAPPERS IN REQUESTS AND RESPONSES MUST
+  *					ALWAYS START ON AN EVEN-BYTE BOUNDARY.  The server
+  *					implementation expects this to be the case.
+  *
+  *************************************************************/
+ 
+ // Maximum argument size which can be "wrapped"
+ #define dlpMaxArgSize					0xFFFF
+ 
+ 
+ // Small argument header for data sizes up to 255 bytes(optimization)
+ //
+ typedef struct DlpSmallArgWrapperType {
+ 												// OFFSET
+ 	Byte					id;				// 0;		argument ID
+ 	Byte					size;				// 1;		argument size (does NOT include this arg header)
+ 												// TOTAL: 2 bytes
+ 	} DlpSmallArgWrapperType;
+ 	
+ typedef struct DlpSmallArgType {
+ 	DlpSmallArgWrapperType	wrapper;	// 0;		argument header
+ 	Byte							data[1];	// 2;		argument data -- var size
+ 	} DlpSmallArgType;
+ 	
+ 
+ // Big argument header for data sizes above 255 bytes(*may also be used for
+ // smaller arguments when convenient*)
+ //
+ typedef struct DlpBigArgWrapperType {
+ 												// OFFSET
+ 	Byte					id;				// 0;		argument ID
+ 	Byte					unused;			// 1;		unused(for alignment) -- set to null!
+ 	Word					size;				// 2;		argument size (does NOT include this arg header)
+ 												// TOTAL: 4 bytes
+ 	} DlpBigArgWrapperType;
+ 
+ typedef struct DlpBigArgType {
+ 	DlpBigArgWrapperType		wrapper;	// 0;		argument header
+ 	Byte							data[1];	// 4;		argument data -- var size
+ 	} DlpBigArgType;
+ 
+ 
+ // dlpBigArgBit is used to identify "big" argument headers by
+ // or'ing it with the argument id in argument header.
+ //
+ #define dlpBigArgBit					0x80
+ 
+ // dlpArgIDMask is used to mask out the argument id value
+ //
+ #define dlpArgIDMask					0x7f
+ 
+ 
+ // dlpFirstArgID is the value of the first argument ID to be defined for
+ // functions.  Values below it are reserved.
+ //
+ #define dlpFirstArgID				0x20
+ 
+ 
+ // Union of arg wrappers
+ typedef union DlpGenericArgWrapperType {
+ 	Byte							id;			// arg ID field
+ 	DlpSmallArgWrapperType	small;		// small arg header
+ 	DlpBigArgWrapperType		big;			// big arg header
+ 	} DlpGenericArgWrapperType;
+ 
+ typedef DlpGenericArgWrapperType*		DlpGenericArgWrapperPtr;
+ 
+ 
+ typedef union DlpGenericArgType {
+ 	Byte							id;			// arg id
+ 	DlpSmallArgType			small;		// "small" arg
+ 	DlpBigArgType				big;			// "big" arg
+ 	} DlpGenericArgType;
+ 
+ typedef DlpGenericArgType*			DlpGenericArgPtr;
+ 
+ 
+ /********************************************************************
+  * Desktop Link Protocol Parameters
+  ********************************************************************/
+ 
+ // dlpCmdTimeoutSec -- this is the number of seconds to wait for a command
+ // to begin coming in before timing out
+ //
+ #define dlpCmdTimeoutSec				20
+ 
+ 
+ 
+ /************************************************************
+  * DLP function argument structures
+  *************************************************************/
+ 
+ 
+ //////////////////////////////////////////////////////////////////////////
+ // dlpReadUserInfo
+ //////////////////////////////////////////////////////////////////////////
+ //		Request arguments: none
+ //
+ //		Response arguments:
+ //
+ //		Possible error codes
+ //			dlpRespErrSystem,
+ //			dlpRespErrMemory
+ 
+ // Request argument structure:
+ //
+ //		none.
+ 	
+ // Response argument structure:
+ //
+ #define dlpReadUserInfoRespArgID		dlpFirstArgID
+ 
+ typedef struct DlpReadUserInfoRespHdrType {
+ 												// OFFSET
+ 	DWord					userID;			//	0;		user ID number (0 if none)
+ #ifdef INCLUDE_VIEWER_ID
+ 	DWord					viewerID;		// ?;		id assigned to viewer by the desktop
+ #endif
+ 	DWord					lastSyncPC;		// 4;		last sync PC id (0 if none)
+ 	DlpDateTimeType	succSyncDate;	//	8;		last successful sync (year = 0 if none)
+ 	DlpDateTimeType	lastSyncDate;	//	16;	last sync date(year = 0 if none)
+ 	Byte					userNameLen;	//	24;	length of user name field,
+ 												//			including null (0 = no user name)
+ 	Byte					passwordLen;	//	25;	length of encrypted password
+ 												//			(0 = no password set)
+ 												// TOTAL: 26 bytes										
+ 	} DlpReadUserInfoRespHdrType;
+ 
+ typedef struct DlpReadUserInfoRespType {
+ 												// OFFSET
+ 	DlpReadUserInfoRespHdrType			//
+ 							header;			//	0;		fixed-size header
+ 												// FIXED SIZE: 26 bytes										
+ 	Byte					nameAndPassword[1];	// 26;	user name -- var size
+ 	// User name begins at the nameAndPassword field and is null-terminated.
+ 	// The encrypted password follows the user name and is NOT null-terminated.
+ 	// The encrypted password may contain any byte values(0-255).
+ 	} DlpReadUserInfoRespType;
+ 
+ 
+ 	
+ //////////////////////////////////////////////////////////////////////////
+ //	dlpWriteUserInfo
+ //////////////////////////////////////////////////////////////////////////
+ //		Request arguments:
+ //			user id (4 bytes)
+ //			last sync PC id(4 bytes)
+ //			user name
+ //
+ //		Response arguments: none
+ //
+ //		Possible error codes
+ //			dlpRespErrSystem,
+ //			dlpRespErrNotEnoughSpace,
+ //			dlpRespErrParam
+ 
+ // Request argument structure:
+ //
+ #define dlpWriteUserInfoReqArgID		dlpFirstArgID
+ 
+ #define dlpMaxUserNameSize		41		// max user name size, including null byte
+ 
+ typedef struct DlpWriteUserInfoReqHdrType {
+ 												// OFFSET
+ 	DWord					userID;			//	0;		user ID number
+ #ifdef INCLUDE_VIEWER_ID
+ 	DWord					viewerID;		// ?;		id assigned to viewer by the desktop
+ #endif
+ 	DWord					lastSyncPC;		// 4;		last sync PC id
+ 	DlpDateTimeType	lastSyncDate;	//	8;		last sync date(year = 0 if none)
+ 	Byte					modFlags;		// 16;	flags indicating which values are being
+ 												//			modified; see the dlpUserInfoMod...
+ 												//			flags defined below
+ 	Byte					userNameLen;	//	17;	user name length, including null
+ 												// TOTAL: 18 bytes										
+ 	} DlpWriteUserInfoReqHdrType;
+ 
+ // Flags indicating which values are being changed by the dlpWriteUserInfo
+ // request.  These flags are used in the modFlags field of DlpWriteUserInfoReqHdrType.
+ // These flags are additive.
+ //
+ #define dlpUserInfoModUserID			0x80	// changing the user id
+ #define dlpUserInfoModSyncPC			0x40	// changing the last sync PC id
+ #define dlpUserInfoModSyncDate		0x20	// changing sync date
+ #define dlpUserInfoModName				0x10	// changing user name
+ #define dlpUserInfoModViewerID		0x08	// changing the viewer id
+ 
+ typedef struct DlpWriteUserInfoReqType {
+ 												// OFFSET
+ 	DlpWriteUserInfoReqHdrType
+ 							header;			//	0;		fixed-size header
+ 												// FIXED SIZE: 10 bytes										
+ 	Byte					userName[1];	// 10;	user name -- var size
+ 	// User name begins at the userName field and is null-terminated.
+ 	} DlpWriteUserInfoReqType;
+ 
+ 	
+ // Response argument structure:
+ //
+ //		none.
+ 
+ 
+ 	
+ //////////////////////////////////////////////////////////////////////////
+ //	dlpReadSysInfo
+ //////////////////////////////////////////////////////////////////////////
+ //
+ //		Possible error codes
+ //			dlpRespErrSystem
+ //
+ // Request argument structure:
+ //
+ //		none.
+ 	
+ // Response argument structure:
+ //
+ #define dlpReadSysInfoRespArgID		dlpFirstArgID
+ 
+ typedef struct DlpReadSysInfoRespHdrType {
+ 												// OFFSET
+ 	DWord					romSWVersion;	// 0;		ROM-based sys software version
+ 	DWord					localizationID;// 4;		localization ID
+ 	Byte					unused;			//	8;		unused(for alignment) -- set to null!
+ 	Byte					prodIDSize;		// 9;		size of productID/model field
+ 												// TOTAL: 10 bytes
+ 	} DlpReadSysInfoRespHdrType;
+ 
+ typedef struct DlpReadSysInfoRespType {
+ 												// OFFSET
+ 	DlpReadSysInfoRespHdrType
+ 							header;			//	0;		fixed-size header
+ 												// FIXED SIZE: 14 bytes
+ 	Byte					prodID[1];		// 14;	productID/model text -- var size
+ 	} DlpReadSysInfoRespType;
+ 	
+ 
+ 
+ //////////////////////////////////////////////////////////////////////////
+ //	dlpGetSysDateTime
+ //////////////////////////////////////////////////////////////////////////
+ //
+ //		Possible error codes: none
+ 
+ // Request argument structure:
+ //
+ //		none.
+ 	
+ // Response argument structure:
+ //
+ #define dlpGetSysDateTimeRespArgID		dlpFirstArgID
+ 
+ typedef struct DlpGetSysDateTimeRespType {
+ 												// OFFSET
+ 	DlpDateTimeType	dateTime;		// 0;		system date/time
+ 												// TOTAL: 8 bytes
+ 	} DlpGetSysDateTimeRespType;
+ 
+ 
+ 
+ //////////////////////////////////////////////////////////////////////////
+ //	dlpSetSysDateTime
+ //////////////////////////////////////////////////////////////////////////
+ //		Request arguments:
+ //			new system date/time
+ //
+ //		Response arguments: none
+ //
+ //		Possible error codes
+ //			dlpRespErrParam
+ 
+ // Request argument structure:
+ //
+ #define dlpSetSysDateTimeReqArgID		dlpFirstArgID
+ 
+ typedef struct DlpSetSysDateTimeReqType {
+ 												// OFFSET
+ 	DlpDateTimeType	dateTime;		// 0;		new system date/time
+ 												// TOTAL: 8 bytes
+ 	} DlpSetSysDateTimeReqType;
+ 
+ typedef DlpSetSysDateTimeReqType*	DlpSetSysDateTimeReqPtr;
+ 	
+ // Response argument structure:
+ //
+ //		none.
+ 
+ 
+ 	
+ //////////////////////////////////////////////////////////////////////////
+ //	dlpReadStorageInfo
+ //////////////////////////////////////////////////////////////////////////
+ //
+ //		Possible error codes
+ //			dlpRespErrSystem,
+ //			dlpRespErrMemory,
+ //			dlpRespErrNotFound
+ 
+ // Request argument structure:
+ //
+ #define dlpReadStorageInfoReqArgID		dlpFirstArgID
+ 
+ typedef struct DlpReadStorInfoReqType {
+ 												// OFFSET
+ 	Byte					startCardNo;	// 0;		card number to start at
+ 												//			(0 = first)
+ 	Byte					unused;			//	1;		unused -- set to null!
+ 												// TOTAL: 2 bytes
+ 	} DlpReadStorInfoReqType;
+ 
+ 
+ // Response argument structure:
+ //
+ #define dlpReadStorageInfoRespArgID		dlpFirstArgID
+ 
+ // Card info structure of variable size
+ typedef struct DlpCardInfoHdrType {
+ 												// OFFSET
+ 	Byte					totalSize;		// 0;		total size of this card info
+ 												//			*ROUNDED UP TO EVEN SIZE*
+ 	Byte					cardNo;			// 1;		card number
+ 	Word					cardVersion;	// 2;		card version
+ 	DlpDateTimeType	crDate;			// 4;		creation date/time
+ 	DWord					romSize;			// 12;		ROM size
+ 	DWord					ramSize;			// 16;	RAM size
+ 	DWord					freeRam;			// 20;	free RAM size
+ 	Byte					cardNameSize;	// 24;	size of card name string
+ 	Byte					manufNameSize;	// 25;	size of manuf. name string
+ 												// TOTAL: 26 bytes;
+ 	} DlpCardInfoHdrType;
+ 
+ typedef struct DlpCardInfoType {
+ 												// OFFSET
+ 	DlpCardInfoHdrType					//
+ 							header;			// 0;		fixed-size header
+ 												// FIXED SIZE: 26 bytes;
+ 	Byte					cardNameAndManuf[1];
+ 												// 26;	card name and manuf. text -- var size
+ 	// Card name is the cardNameSize bytes of text at cardNameAndManuf,
+ 	// followed immediately by manufNameSize bytes of manufacturer name.
+ 	} DlpCardInfoType;
+ 
+ 	
+ typedef struct DlpReadStorInfoRespHdrType {
+ 												// OFFSET
+ 	Byte					lastCardNo;		// 0;		card number of last card retrieved
+ 	Byte					more;				//	1;		non-zero if there are more cards
+ 	Byte					unused;			//	2;		unused -- set to null!
+ 	Byte					actCount;		// 3;		actual count of structures returned
+ 												// TOTAL: 4 bytes
+ 	} DlpReadStorInfoRespHdrType;
+ 
+ typedef struct DlpReadStorInfoRespType {
+ 												// OFFSET
+ 	DlpReadStorInfoRespHdrType			//
+ 							header;			// 0;		fixed-size header
+ 												// FIXED SIZE: 4 bytes
+ 	DlpCardInfoType	cardInfo[1];	// 4;		actCount of card info structures -- var size
+ 	} DlpReadStorInfoRespType;
+ 
+ 
+ 	
+ //////////////////////////////////////////////////////////////////////////
+ //	dlpReadDBList
+ //////////////////////////////////////////////////////////////////////////
+ //
+ //		Possible error codes
+ //			dlpRespErrSystem,
+ //			dlpRespErrMemory,
+ //			dlpRespErrNotFound
+ 
+ // Request argument structure:
+ //
+ #define dlpReadDBListReqArgID		dlpFirstArgID
+ 
+ typedef struct DlpReadDBListReqType {
+ 												// OFFSET
+ 	Byte					srchFlags;		// 0;		search flags
+ 	Byte					cardNo;			// 1;		card number -- 0-based
+ 	Word					startIndex;		// 2;		DB index to start at
+ 												//			(0 = from beginning)
+ 												// TOTAL: 4 bytes
+ 	} DlpReadDBListReqType;
+ 
+ #define dlpReadDBListFlagRAM		0x80		// Search for RAM-based
+ #define dlpReadDBListFlagROM		0x40		// Search for ROM-based
+ 
+ 
+ // Response argument structure:
+ //
+ #define dlpReadDBListRespArgID		dlpFirstArgID
+ 
+ // Database info structure of variable size
+ typedef struct DlpDBInfoHdrType {
+ 												// OFFSET
+ 	Byte					totalSize;		// 0;		total size of the DB info
+ 												//			*ROUNDED UP TO EVEN SIZE*
+ 	Byte					unused;			//	1;		unused -- set to null!
+ 	Word					dbFlags;			// 2;		DB flags: dlpDBFlagReadOnly,
+ 												//			dlpDBFlagResDB,
+ 												//			dlpDBFlagAppInfoDirty, dlpDBFlagOpen,
+ 												//			dlpDBFlagBackup;
+ 	DWord					type;				// 4;		database type
+ 	DWord					creator;			// 8;		database creator
+ 	Word					version;			// 12;	database version
+ 	DWord					modNum;			// 14;	modification number
+ 	DlpDateTimeType	crDate;			// 18;	creation date
+ 	DlpDateTimeType	modDate;			// 26;	latest modification date
+ 	DlpDateTimeType	backupDate;		// 34;	latest backup date
+ 	Word					dbIndex;			//	42;	DB index
+ 												// TOTAL: 44 bytes;
+ 	} DlpDBInfoHdrType;
+ 
+ typedef struct DlpDBInfoType {
+ 												// OFFSET
+ 	DlpDBInfoHdrType	header;			// 0;		fixed-size header
+ 												// FIXED SIZE: 44 bytes;
+ 	Byte					name[1];			// 44;	databse name text -- var size and
+ 												//			null-terminated
+ 	} DlpDBInfoType;
+ 
+ 	
+ typedef struct DlpReadDBListRespHdrType {
+ 												// OFFSET
+ 	Word					lastIndex;		// 0;		DB index of last entry retrieved
+ 	Byte					flags;			// 2;		flags: dlpReadDBListRespFlagMore
+ 	Byte					actCount;		// 3;		actual count of structures returned
+ 												// TOTAL: 4 bytes
+ 	} DlpReadDBListRespHdrType;
+ 
+ // dlpReadDBListRespFlagMore flag: if set, indicates that there are more
+ // databases to list -- this enables the server to send the listing
+ // incrementally, reducing server memory requirements if necessary
+ #define dlpReadDBListRespFlagMore	0x80
+ 	
+ typedef struct DlpReadDBListRespType {
+ 												// OFFSET
+ 	DlpReadDBListRespHdrType			//
+ 							header;			//	0;		fixed-size header
+ 												// FIXED SIZE: 4 bytes
+ 	DlpDBInfoType		dbInfo[1];		// 4;		actCount of DB info structures -- var size
+ 	} DlpReadDBListRespType;
+ 	
+ 
+ //////////////////////////////////////////////////////////////////////////
+ //	dlpOpenDB
+ //////////////////////////////////////////////////////////////////////////
+ //
+ //		Possible error codes
+ //			dlpRespErrSystem,
+ //			dlpRespErrMemory,
+ //			dlpRespErrParam,
+ //			dlpRespErrNotFound
+ //			dlpRespErrTooManyOpenDatabases
+ //			dlpRespErrCantOpen
+ 
+ // Request argument structure:
+ //
+ #define dlpOpenDBReqArgID		dlpFirstArgID
+ 
+ typedef struct DlpOpenDBReqHdrType {
+ 												// OFFSET
+ 	Byte					cardNo;			// 0;		memory module number
+ 	Byte					mode;				// 1;		open mode
+ 												// TOTAL: 2 bytes;
+ 	} DlpOpenDBReqHdrType;
+ 
+ #define dlpOpenDBModeRead			0x80
+ #define dlpOpenDBModeWrite			0x40
+ #define dlpOpenDBModeExclusive	0x20
+ #define dlpOpenDBModeShowSecret	0x10
+ 
+ 
+ typedef struct DlpOpenDBReqType {
+ 												// OFFSET
+ 	DlpOpenDBReqHdrType					//
+ 							header;			//	0;		fixed-size header
+ 												// FIXED SIZE: 2 bytes;
+ 	Byte					name[1];			// 2;		databse name text -- var size
+ 												//			zero-terminated
+ 	} DlpOpenDBReqType;
+ 
+ typedef DlpOpenDBReqType*		DlpOpenDBReqPtr;
+ 
+ 	
+ // Response argument structure:
+ //
+ #define dlpOpenDBRespArgID		dlpFirstArgID
+ //
+ // The response argument is the 1-byte database ID to be passed in
+ // subsequent read/write requests.
+ 
+ 	
+ 	
+ //////////////////////////////////////////////////////////////////////////
+ //	dlpCreateDB
+ //////////////////////////////////////////////////////////////////////////
+ //
+ //		Possible error codes
+ //			dlpRespErrSystem,
+ //			dlpRespErrMemory,
+ //			dlpRespErrParam,
+ //			dlpRespErrAlreadyExists,
+ //			dlpRespErrCantOpen,
+ //			dlpRespErrNotEnoughSpace,
+ //			dlpRespErrTooManyOpenDatabases
+ 
+ // Request argument structure:
+ //
+ #define dlpCreateDBReqArgID		dlpFirstArgID
+ 
+ typedef struct DlpCreateDBReqHdrType {
+ 												// OFFSET
+ 	DWord					creator;			// 0;		DB creator
+ 	DWord					type;				// 4;		DB type
+ 	Byte					cardNo;			// 8;		memory module number
+ 	Byte					unused;			//	9;		unused -- set to null
+ 	Word					dbFlags;			// 10;	allowed flags: dlpDBFlagResDB,
+ 												//			dlpDBFlagBackup
+ 	Word					version;			// 12;	DB version #
+ 												// TOTAL: 14 bytes;
+ 	} DlpCreateDBReqHdrType;
+ 
+ typedef struct DlpCreateDBReqType {
+ 												// OFFSET
+ 	DlpCreateDBReqHdrType				//
+ 							header;			//	0;		fixed-size header
+ 												// FIXED SIZE: 12 bytes;
+ 	Byte					name[1];			// 14;	DB name text -- var size
+ 												//			zero-terminated
+ 	} DlpCreateDBReqType;
+ 
+ typedef DlpCreateDBReqType*		DlpCreateDBReqPtr;
+ 
+ 	
+ // Response argument structure:
+ //
+ #define dlpCreateDBRespArgID		dlpFirstArgID
+ 
+ // The response argument is the 1-byte database ID to be passed in
+ // subsequent read/write requests.
+ 
+ 
+ 	
+ //////////////////////////////////////////////////////////////////////////
+ //	dlpCloseDB
+ //////////////////////////////////////////////////////////////////////////
+ //
+ //		Possible error codes
+ //			dlpRespErrParam,
+ //			dlpRespErrSystem,
+ //			dlpRespErrMemory,
+ //			dlpRespErrNoneOpen
+ 
+ // Request argument structure:
+ //
+ typedef enum {
+ 	dlpCloseDBReqDBIDArgID = dlpFirstArgID,		// close a specific database
+ 	dlpCloseDBReqAllArgID								// close all databases
+ 	} DlpCloseDBReqArgID;
+ 
+ // Argument structure to close a specific database(dlpCloseDBReqDBIDArgID):
+ //
+ // The request argument is the 1-byte database ID returned in open/create
+ // DB responses.
+ 
+ // Argument structure to close all databases(dlpCloseDBReqAllArgID):
+ //
+ // This request argument contains no data
+ 
+ 
+ // Response argument structure:
+ //
+ //		none.
+ 
+ 
+ 	
+ //////////////////////////////////////////////////////////////////////////
+ //	dlpDeleteDB
+ //////////////////////////////////////////////////////////////////////////
+ //
+ //		Possible error codes
+ //			dlpRespErrSystem,
+ //			dlpRespErrParam,
+ //			dlpRespErrNotFound,
+ //			dlpRespErrCantOpen,
+ //			dlpRespErrDatabaseOpen
+ 
+ // Request argument structure:
+ //
+ #define dlpDeleteDBReqArgID		dlpFirstArgID
+ 
+ typedef struct DlpDeleteDBReqHdrType {
+ 												// OFFSET
+ 	Byte					cardNo;			// 0;		memory module number
+ 	Byte					unused;			// 1;		unused -- set to null!
+ 												// TOTAL: 2 bytes;
+ 	} DlpDeleteDBReqHdrType;
+ 
+ 
+ typedef struct DlpDeleteDBReqType {
+ 												// OFFSET
+ 	DlpDeleteDBReqHdrType				//
+ 							header;			//	0;		fixed-size header
+ 												// FIXED SIZE: 2 bytes;
+ 	Byte					name[1];			// 2;		databse name text -- var size
+ 												//			zero-terminated
+ 	} DlpDeleteDBReqType;
+ 
+ typedef DlpDeleteDBReqType*		DlpDeleteDBReqPtr;
+ 
+ 
+ // Response argument structure:
+ //
+ //		none.
+ 
+ 
+ //////////////////////////////////////////////////////////////////////////
+ //	dlpReadOpenDBInfo
+ //////////////////////////////////////////////////////////////////////////
+ //		Get information on an open database
+ //
+ //		Possible error codes
+ //			dlpRespErrNoneOpen
+ //			dlpRespErrParam
+ 
+ // Request argument structure:
+ //
+ #define dlpReadOpenDBInfoArgID			dlpFirstArgID
+ 
+ // The request argument is the 1-byte database ID returned in open/create
+ // DB responses.
+ 	
+ 
+ // Response argument structure:
+ //
+ #define dlpReadOpenDBInfoRespArgID		dlpFirstArgID
+ 
+ 
+ typedef struct DlpReadOpenDBInfoRespType {
+ 												// OFFSET
+ 	Word					numRec;			//	0;		number of records or resources
+ 												// TOTAL: 2 bytes
+ 	} DlpReadOpenDBInfoRespType;
+ 
+ 	
+ //////////////////////////////////////////////////////////////////////////
+ //	dlpMoveCategory
+ //////////////////////////////////////////////////////////////////////////
+ //
+ //		Possible error codes
+ //			dlpRespErrNoneOpen
+ //			dlpRespErrParam
+ //			dlpRespErrNotSupported
+ //			dlpRespErrReadOnly
+ 
+ // Request argument structure:
+ //
+ #define dlpMoveCategoryReqArgID			dlpFirstArgID
+ 
+ typedef struct DlpMoveCategoryReqType {
+ 												// OFFSET
+ 	Byte					dbID;				//	0;		database id
+ 	Byte					fromCategory;	//	1;		id of the "from" category
+ 	Byte					toCategory;		//	2;		id of the "to" category
+ 	Byte					unused;			//	3;		unused -- set to null!
+ 												// TOTAL: 4 bytes;
+ 	} DlpMoveCategoryReqType;
+ 	
+ 
+ // Response argument structure:
+ //
+ //		none.
+ 
+ 	
+ //////////////////////////////////////////////////////////////////////////
+ //	dlpReadAppBlock
+ //////////////////////////////////////////////////////////////////////////
+ //
+ //		Possible error codes
+ //			dlpRespErrSystem,
+ //			dlpRespErrMemory,
+ //			dlpRespErrNotFound
+ //			dlpRespErrNoneOpen
+ //			dlpRespErrParam
+ 
+ // Request argument structure:
+ //
+ #define dlpReadBlockReqArgID			dlpFirstArgID
+ 
+ typedef struct DlpReadBlockReqType {
+ 												// OFFSET
+ 	Byte					dbID;				//	0;		database id
+ 	Byte					unused;			//	1;		unused -- set to null!
+ 	Word					offset;			//	2;		offset into the block
+ 	Word					numBytes;		//	4;		number of bytes to read starting
+ 												//			at offset(-1 = to the end)
+ 												// TOTAL: 6 bytes;
+ 	} DlpReadBlockReqType;
+ 	
+ 
+ // Response argument structure:
+ //
+ #define dlpReadBlockRespArgID			dlpFirstArgID
+ 
+ typedef struct DlpReadBlockRespHdrType {
+ 												// OFFSET
+ 	Word					blockSize;		//	0;		actual block size -- may be greater
+ 												//			than the amount of data returned
+ 												//	TOTAL: 2 bytes
+ 	} DlpReadBlockRespHdrType;
+ 
+ typedef struct DlpReadBlockRespType {
+ 												// OFFSET
+ 	DlpReadBlockRespHdrType				//
+ 							header;			//	0;		fixed size header
+ 												//	FIXED SIZE: 2 bytes
+ 	Byte					data[1];			// 2;		block data -- var size
+ 	} DlpReadBlockRespType;
+ 
+ 	
+ //////////////////////////////////////////////////////////////////////////
+ //	dlpWriteAppBlock
+ //////////////////////////////////////////////////////////////////////////
+ //
+ //		Possible error codes
+ //			dlpRespErrSystem,
+ //			dlpRespErrParam,
+ //			dlpRespErrReadOnly
+ //			dlpRespErrNotEnoughSpace
+ //			dlpRespErrNoneOpen
+ 
+ // Request argument structure:
+ //
+ #define dlpWriteBlockReqArgID			dlpFirstArgID
+ 
+ typedef struct DlpWriteBlockReqHdrType {
+ 												// OFFSET
+ 	Byte					dbID;				//	0;		database id
+ 	Byte					unused;			//	1;		unused -- set to null!
+ 	Word					blockSize;		//	2;		total block size(0 = free existing block)
+ 												// TOTAL: 4 bytes;
+ 	} DlpWriteBlockReqHdrType;
+ 
+ 
+ typedef struct DlpWriteBlockReqType {
+ 												// OFFSET
+ 	DlpWriteBlockReqHdrType				//
+ 							header;			//	0;		fixed-size header
+ 												// FIXED SIZE: 4 bytes;
+ 	Byte					data[1];			// 4;		block data -- var size
+ 	} DlpWriteBlockReqType;
+ 
+ 
+ // Response argument structure:
+ //
+ //		none.
+ 
+ 
+ 
+ //////////////////////////////////////////////////////////////////////////
+ //	dlpReadSortBlock
+ //////////////////////////////////////////////////////////////////////////
+ //
+ //		Possible error codes
+ //			dlpRespErrSystem,
+ //			dlpRespErrMemory
+ //			dlpRespErrNotFound
+ //			dlpRespErrNoneOpen
+ 
+ // Request argument structure:
+ //
+ // see dlpReadAppBlock
+ 
+ 
+ // Response argument structure:
+ //
+ // see dlpReadAppBlock
+ 
+ 
+ //////////////////////////////////////////////////////////////////////////
+ //	dlpWriteSortBlock
+ //////////////////////////////////////////////////////////////////////////
+ //
+ //		Possible error codes
+ //			dlpRespErrSystem,
+ //			dlpRespErrMemory,
+ //			dlpRespErrParam,
+ //			dlpRespErrNoneOpen
+ 
+ // Request argument structure:
+ //
+ // see dlpWriteAppBlock
+ 
+ 
+ // Response argument structure:
+ //
+ //		none.
+ 
+ 
+ 
+ //////////////////////////////////////////////////////////////////////////
+ //	dlpReadNextModifiedRec
+ //////////////////////////////////////////////////////////////////////////
+ //
+ //		Possible error codes
+ //			see dlpReadRecord
+ //
+ 
+ // Request argument structure:
+ //
+ #define dlpReadNextModRecReqArgID		dlpFirstArgID
+ // The request argument is the 1-byte database ID returned in open/create
+ // DB responses.
+ 
+ 
+ // Response argument structure:
+ //
+ // Response argument id = dlpReadRecordRespArgID
+ 
+ //	Response argument structure = DlpReadRecordRespType
+ 
+ 
+ 
+ //////////////////////////////////////////////////////////////////////////
+ //	dlpResetDBIndex
+ //////////////////////////////////////////////////////////////////////////
+ //	Resets the "next modified record" index to the beginning
+ //
+ //		Possible error codes
+ //			dlpRespErrParam
+ //			dlpRespErrNoneOpen
+ 
+ // Request argument structure:
+ //
+ #define dlpResetDBIndexReqArgID		dlpFirstArgID
+ 
+ // The request argument is the 1-byte database ID returned in open/create
+ // DB responses.
+ 
+ // Response argument structure:
+ //
+ //		none.
+ 
+ 
+ 
+ //////////////////////////////////////////////////////////////////////////
+ //	dlpReadRecord
+ //////////////////////////////////////////////////////////////////////////
+ //
+ //		Possible error codes
+ //			dlpRespErrNotSupported,
+ //			dlpRespErrSystem,
+ //			dlpRespErrMemory,
+ //			dlpRespErrParam,
+ //			dlpRespErrNotFound,
+ //			dlpRespErrRecordBusy,
+ //			dlpRespErrNoneOpen
+ 
+ typedef enum {
+ 	dlpReadRecordIdArgID = dlpFirstArgID,
+ 	dlpReadRecordIndexArgID
+ 	} DlpReadRecordReqArgID;
+ 
+ // dlpReadRecordIdArgID request argument structure:
+ //
+ typedef struct DlpReadRecordByIDReqType {
+ 												// OFFSET
+ 	Byte					dbID;				//	0;		database id
+ 	Byte					unused;			//	1;		unused -- set to null!
+ 	DWord					recordID;		// 2;		unique record id
+ 	Word					offset;			//	6;		offset into the record
+ 	Word					numBytes;		//	8;		number of bytes to read starting
+ 												//			at the offset(-1 = "to the end")
+ 												// TOTAL: 10 bytes;
+ 	} DlpReadRecordByIDReqType;
+ 
+ // dlpReadRecordIndexArgID request argument structure:
+ //
+ typedef struct DlpReadRecordByIndexReqType {
+ 												// OFFSET
+ 	Byte					dbID;				//	0;		database id
+ 	Byte					unused;			//	1;		unused -- set to null!
+ 	Word					index;			// 2;		record index
+ 	Word					offset;			//	4;		offset into the record
+ 	Word					numBytes;		//	6;		number of bytes to read starting
+ 												//			at the offset(-1 = "to the end")
+ 												// TOTAL: 8 bytes;
+ 	} DlpReadRecordByIndexReqType;
+ 
+ 
+ // Response argument structure:
+ //
+ #define dlpReadRecordRespArgID		dlpFirstArgID
+ 
+ typedef struct DlpReadRecordRespHdrType {
+ 												// OFFSET
+ 	DWord					recordID;		// 0;		unique record id
+ 	Word					index;			//	4;		record index
+ 	Word					recSize;			//	6;		total record size in bytes
+ 	Byte					attributes;		// 8;		record attributes
+ 	Byte					category;		// 9;		record category index
+ 												// TOTAL: 10 bytes;
+ 	} DlpReadRecordRespHdrType;
+ 
+ typedef struct DlpReadRecordRespType {
+ 												// OFFSET
+ 	DlpReadRecordRespHdrType			//
+ 							header;			//	0;		fixed-size header
+ 												// FIXED SIZE: 8 bytes;
+ 	Byte					data[1];			// 8;		record data -- var size
+ 	} DlpReadRecordRespType;
+ 
+ 
+ 
+ //////////////////////////////////////////////////////////////////////////
+ //	dlpReadRecordIDList
+ //////////////////////////////////////////////////////////////////////////
+ //	Returns a list of unique record id's.  May need to call more than once
+ // to get the entire list.  dlpRespErrNotFound is returned when "start"
+ // is out of bounds
+ //
+ //		Possible error codes
+ //			dlpRespErrNotSupported,
+ //			dlpRespErrParam,
+ //			dlpRespErrNotFound,
+ //			dlpRespErrNoneOpen
+ 
+ #define dlpReadRecordIDListReqArgID		dlpFirstArgID
+ 
+ // dlpReadRecordIDListReqArgID request argument structure:
+ //
+ typedef struct DlpReadRecordIDListReqType {
+ 												// OFFSET
+ 	Byte					dbID;				//	0;		database id
+ 	Byte					flags;			//	1;		request flags
+ 	Word					start;			// 2;		starting record index (0-based)
+ 	Word					maxEntries;		//	4;		maximum number of entries, or
+ 												//			0xFFFF to return as many as possible
+ 												// TOTAL: 6 bytes;
+ 	} DlpReadRecordIDListReqType;
+ 
+ // dlpReadRecordIDListFlagSortDB: if set, DL Server will call the creator
+ // application to resort the database before returning the list.
+ #define dlpReadRecordIDListFlagSortDB	0x80
+ 
+ 
+ // Response argument structure:
+ //
+ #define dlpReadRecordIDListRespArgID		dlpFirstArgID
+ 
+ typedef struct DlpReadRecordIDListRespHdrType {
+ 												// OFFSET
+ 	Word					numEntries;		// 0;		number of entries returned
+ 												// TOTAL: 2 bytes;
+ 	} DlpReadRecordIDListRespHdrType;
+ 
+ typedef struct DlpReadRecordIDListRespType {
+ 												// OFFSET
+ 	DlpReadRecordIDListRespHdrType	//
+ 							header;			//	0;		fixed-size header
+ 												// FIXED SIZE: 2 bytes;
+ 	DWord					recID[1];		// 8;		list of record id's -- var size
+ 	} DlpReadRecordIDListRespType;
+ 
+ 	
+ 
+ //////////////////////////////////////////////////////////////////////////
+ //	dlpWriteRecord
+ //////////////////////////////////////////////////////////////////////////
+ //
+ //		Possible error codes
+ //			dlpRespErrSystem,
+ //			dlpRespErrParam,
+ //			dlpRespErrNotFound
+ //			dlpRespErrNotEnoughSpace
+ //			dlpRespErrNotSupported
+ //			dlpRespErrReadOnly
+ //			dlpRespErrNoneOpen
+ 
+ // Request argument structure:
+ //
+ #define dlpWriteRecordReqArgID		dlpFirstArgID
+ 
+ // dlpWriteRecordReqArgID -- required
+ typedef struct DlpWriteRecordReqHdrType {
+ 												// OFFSET
+ 	Byte					dbID;				//	0;		database id
+ 	Byte					unused;			//	1;		unused -- set to null!
+ 	DWord					recordID;		// 2;		unique record id or null
+ 	Byte					attributes;		// 6;		record attributes -- only
+ 												//			dlpRecAttrSecret is allowed here
+ 	Byte					category;		// 7;		record category
+ 												// TOTAL: 8 bytes;
+ 	} DlpWriteRecordReqHdrType;
+ 
+ typedef struct DlpWriteRecordReqType {
+ 												// OFFSET
+ 	DlpWriteRecordReqHdrType			//
+ 							header;			//	0;		fixed-size header
+ 												// FIXED SIZE: 8 bytes;
+ 	Byte					data[1];			// 8;		record data -- var size
+ 	} DlpWriteRecordReqType;
+ 
+ 
+ // Response argument structure:
+ //
+ #define dlpWriteRecordRespArgID		dlpFirstArgID
+ 
+ typedef struct DlpWriteRecordRespType {
+ 												// OFFSET
+ 	DWord					recordID;		// 0;		record ID
+ 												// TOTAL: 4 bytes
+ 	} DlpWriteRecordRespType;
+ 
+ 
+ 
+ //////////////////////////////////////////////////////////////////////////
+ //	dlpDeleteRecord
+ //////////////////////////////////////////////////////////////////////////
+ //
+ //		Possible error codes
+ //			dlpRespErrSystem,
+ //			dlpRespErrParam,
+ //			dlpRespErrNotFound
+ //			dlpRespErrNotSupported
+ //			dlpRespErrReadOnly
+ //			dlpRespErrNoneOpen
+ //
+ 
+ // Request argument structure:
+ //
+ #define dlpDeleteRecordReqArgID	dlpFirstArgID
+ 
+ // Argument structure to delete by record ID(dlpDeleteRecordReqIDArgID):
+ typedef struct DlpDeleteRecordReqType {
+ 												// OFFSET
+ 	Byte					dbID;				//	0;		database id
+ 	Byte					flags;			//	1;		flags (dlpDeleteRecFlagDeleteAll)
+ 	DWord					recordID;		// 2;		unique record id
+ 												// TOTAL: 6 bytes;
+ 	} DlpDeleteRecordReqType;
+ 
+ // dlpDeleteRecFlagDeleteAll: if this flag is set, the reocordID field
+ // is ignored and all database records will be deleted
+ #define dlpDeleteRecFlagDeleteAll		0x80
+ 
+ // Response argument structure:
+ //
+ //		none.
+ 
+ 
+ 
+ //////////////////////////////////////////////////////////////////////////
+ //	dlpReadResource
+ //////////////////////////////////////////////////////////////////////////
+ //
+ //		Possible error codes
+ //			dlpRespErrSystem,
+ //			dlpRespErrParam,
+ //			dlpRespErrNotFound
+ //			dlpRespErrNoneOpen
+ 
+ typedef enum {
+ 	dlpReadResourceIndexArgID = dlpFirstArgID,
+ 	dlpReadResourceTypeArgID
+ 	} DlpReadResourceReqArgID;
+ 
+ // dlpReadResourceIndexArgID request argument structure:
+ //
+ typedef struct DlpReadResourceByIndexReqType {
+ 												// OFFSET
+ 	Byte					dbID;				//	0;		database id
+ 	Byte					unused;			//	1;		unused -- set to null!
+ 	Word					index;			// 2;		resource index
+ 	Word					offset;			//	4;		offset into the resource
+ 	Word					numBytes;		//	6;		number of bytes to read starting
+ 												//			at the offset(-1 = "to the end")
+ 												// TOTAL: 8 bytes;
+ 	} DlpReadResourceByIndexReqType;
+ 
+ // dlpReadResourceTypeArgID request argument structure:
+ //
+ typedef struct DlpReadResourceByTypeReqType {
+ 												// OFFSET
+ 	Byte					dbID;				//	0;		database id
+ 	Byte					unused;			//	1;		unused -- set to null!
+ 	DWord					type;				// 2;		resource type
+ 	Word					id;				// 6;		resource id
+ 	Word					offset;			//	8;		offset into the resource
+ 	Word					numBytes;		//	10;	number of bytes to read starting
+ 												//			at the offset(-1 = "to the end")
+ 												// TOTAL: 12 bytes;
+ 	} DlpReadResourceByTypeReqType;
+ 	
+ 
+ // Response argument structure:
+ //
+ #define dlpReadResourceRespArgID		dlpFirstArgID
+ 
+ typedef struct DlpReadResourceRespHdrType {
+ 												// OFFSET
+ 	DWord					type;				// 0;		resource type
+ 	Word					id;				// 4;		resource id
+ 	Word					index;			//	6;		resource index
+ 	Word					resSize;			//	8;		total resource size in bytes
+ 												// TOTAL: 10 bytes;
+ 	} DlpReadResourceRespHdrType;
+ 
+ typedef struct DlpReadResourceRespType {
+ 												// OFFSET
+ 	DlpReadResourceRespHdrType			//
+ 							header;			//	0;		fixed-size header
+ 												// FIXED SIZE: 6 bytes;
+ 	Byte					resData[1];		// 6;		resource data -- var size
+ 	} DlpReadResourceRespType;
+ 
+ 
+ 
+ //////////////////////////////////////////////////////////////////////////
+ //	dlpWriteResource
+ //////////////////////////////////////////////////////////////////////////
+ //
+ //		Possible error codes
+ //			dlpRespErrSystem,
+ //			dlpRespErrNotEnoughSpace,
+ //			dlpRespErrParam,
+ //			dlpRespErrNoneOpen
+ 
+ // Request argument structure:
+ //
+ #define dlpWriteResourceReqArgID		dlpFirstArgID
+ 
+ typedef struct DlpWriteResourceReqHdrType {
+ 												// OFFSET
+ 	Byte					dbID;				//	0;		database id
+ 	Byte					unused;			//	1;		inused -- set to null!
+ 	DWord					type;				// 2;		resource type
+ 	Word					id;				// 6;		resource id
+ 	Word					resSize;			//	8;		total resource size
+ 												// TOTAL: 10 bytes;
+ 	} DlpWriteResourceReqHdrType;
+ 
+ typedef struct DlpWriteResourceReqType {
+ 												// OFFSET
+ 	DlpWriteResourceReqHdrType			//
+ 							header;			//	0;		fixed-size header
+ 												// FIXED SIZE: 10 bytes;
+ 	Byte					data[1];			// 10;		resource data -- var size
+ 	} DlpWriteResourceReqType;
+ 
+ // Response argument structure:
+ //
+ //		none.
+ 
+ 
+ 
+ //////////////////////////////////////////////////////////////////////////
+ //	dlpDeleteResource
+ //////////////////////////////////////////////////////////////////////////
+ //
+ //		Possible error codes
+ //			dlpRespErrSystem,
+ //			dlpRespErrParam,
+ //			dlpRespErrNotFound
+ //			dlpRespErrNotSupported
+ //			dlpRespErrReadOnly
+ //			dlpRespErrNoneOpen
+ 
+ // Request argument structure:
+ //
+ #define dlpDeleteResourceReqArgID		dlpFirstArgID
+ 
+ typedef struct DlpDeleteResourceReqType {
+ 												// OFFSET
+ 	Byte					dbID;				//	0;		database id
+ 	Byte					flags;			//	1;		flags (dlpDeleteResFlagDeleteAll)
+ 	DWord					type;				// 2;		resource type
+ 	Word					id;				// 6;		resource id
+ 												// TOTAL: 8 bytes;
+ 	} DlpDeleteResourceReqType;
+ 
+ // dlpDeleteResFlagDeleteAll: if set, all resources in the db will be deleted
+ #define dlpDeleteResFlagDeleteAll	0x80
+ 
+ 
+ // Response argument structure:
+ //
+ //		none.
+ 
+ 
+ 
+ //////////////////////////////////////////////////////////////////////////
+ //	dlpCleanUpDatabase
+ //////////////////////////////////////////////////////////////////////////
+ //		Deletes all records which are marked as archived or deleted in the
+ //		record database
+ //
+ //		Possible error codes
+ //			dlpRespErrSystem,
+ //			dlpRespErrParam,
+ //			dlpRespErrReadOnly,
+ //			dlpRespErrNotSupported
+ //			dlpRespErrNoneOpen
+ 
+ // Request argument structure:
+ //
+ #define dlpCleanUpDatabaseReqArgID		dlpFirstArgID
+ 
+ // The request argument is the 1-byte database ID returned in open/create
+ // DB responses.
+ 
+ // Response argument structure:
+ //
+ //		none.
+ 
+ 
+ 
+ //////////////////////////////////////////////////////////////////////////
+ //	dlpResetSyncFlags
+ //////////////////////////////////////////////////////////////////////////
+ //		For record databases, reset all dirty flags.
+ //		For both record and resource databases, set the last sync time to NOW
+ //
+ //		Possible error codes
+ //			dlpRespErrSystem,
+ //			dlpRespErrParam
+ //			dlpRespErrReadOnly,
+ //			dlpRespErrNoneOpen
+ 
+ // Request argument structure:
+ //
+ #define dlpResetSyncFlagsReqArgID		dlpFirstArgID
+ 
+ // The request argument is the 1-byte database ID returned in open/create
+ // DB responses.
+ 
+ 
+ // Response argument structure:
+ //
+ //		none.
+ 
+ 
+ 
+ //////////////////////////////////////////////////////////////////////////
+ //	dlpCallApplication
+ //////////////////////////////////////////////////////////////////////////
+ //		Call an application entry point via an action code
+ //
+ //		Possible error codes
+ //			dlpRespErrSystem,
+ //			dlpRespErrMemory,
+ //			dlpRespErrParam,
+ //			dlpRespErrNotFound
+ 
+ // Request argument structure:
+ //
+ #define dlpCallApplicationReqArgID		dlpFirstArgID
+ 
+ typedef struct DlpCallApplicationReqHdrType {
+ 												// OFFSET
+ 	DWord					creator;			// 0;		app DB creator id
+ 	Word					action;			// 4;		action code
+ 	Word					paramSize;		// 6;	custom param size
+ 												// TOTAL: 8 bytes
+ 	} DlpCallApplicationReqHdrType;
+ 
+ typedef struct DlpCallApplicationReqType {
+ 												// OFFSET
+ 	DlpCallApplicationReqHdrType		//
+ 							header;			//	0;		fixed-size header
+ 												// FIXED SIZE: 12 bytes
+ 	Byte					paramData[1];	// 8;	custom param data -- var size
+ 	} DlpCallApplicationReqType;
+ 
+ // Response argument structure:
+ //
+ #define dlpCallApplicationRespArgID		dlpFirstArgID
+ 
+ typedef struct DlpCallApplicationRespHdrType {
+ 												// OFFSET
+ 	Word					action;			// 0;		action code which was called
+ 	Word					resultCode;		// 2;		result error code returned by action
+ 	Word					resultSize;		// 4;		custom result data size
+ 												// TOTAL: 6 bytes
+ 	} DlpCallApplicationRespHdrType;
+ 
+ typedef struct DlpCallApplicationRespType {
+ 												// OFFSET
+ 	DlpCallApplicationRespHdrType		//
+ 							header;			//	0;		fixed-size header
+ 												// FIXED SIZE: 6 bytes
+ 	Byte					resultData[1];	// 6;		custom result data -- var size
+ 	} DlpCallApplicationRespType;
+ 
+ 
+ 
+ //////////////////////////////////////////////////////////////////////////
+ //	dlpResetSystem
+ //////////////////////////////////////////////////////////////////////////
+ //
+ //		Possible error codes
+ //			dlpRespErrSystem
+ 
+ // Request argument structure:
+ //
+ //		none.
+ 
+ // Response argument structure:
+ //
+ //		none.
+ 
+ 
+ 
+ //////////////////////////////////////////////////////////////////////////
+ // dlpAddSyncLogEntry
+ //////////////////////////////////////////////////////////////////////////
+ //
+ //		Possible error codes
+ //			dlpRespErrSystem,
+ //			dlpRespErrNotEnoughSpace,
+ //			dlpRespErrLimitExceeded,
+ //			dlpRespErrParam
+ 
+ // Request argument structure:
+ //
+ #define dlpAddSyncLogEntryReqArgID		dlpFirstArgID
+ 
+ typedef struct DlpAddSyncLogEntryReqType {
+ 												// OFFSET
+ 	Byte					text[1];			// 0;		entry text -- var size and
+ 												//			null-terminated
+ 	} DlpAddSyncLogEntryReqType;
+ 
+ // Response argument structure:
+ //
+ //		none.
+ 
+ 
+ 
+ //////////////////////////////////////////////////////////////////////////
+ // dlpProcessRPC
+ //////////////////////////////////////////////////////////////////////////
+ //		Remote Procedure Call interface
+ //
+ //		Request arguments:
+ //			RPC command block
+ //
+ //		Response arguments:
+ //			RPC reply block
+ //
+ //		Possible error codes
+ //			0 on success; otherwise error code from the TouchDown
+ //			RPC executor
+ //
+ // NOTE: this is a low-level system command which does not use arg wrappers.
+ 
+ // Request argument structure:
+ //
+ // Block of RPC command data (no arg wrapper)
+ 
+ // Response argument structure:
+ //
+ // Block of RPC reply data of same length as command block(no arg wrapper)
+ 
+ 	
+ 
+ //////////////////////////////////////////////////////////////////////////
+ // dlpOpenConduit
+ //////////////////////////////////////////////////////////////////////////
+ //		This command is sent before each conduit is opened by the desktop.
+ //		If the viewer has a cancel pending, it will return dlpRespErrCancelSync
+ //		in the response header's errorCode field.
+ //
+ //		Request arguments:	none.
+ //
+ //		Response arguments:	none.
+ //
+ //		Possible error codes
+ //			dlpRespErrCancelSync
+ 
+ // Request argument structure:
+ //
+ //		none.
+ 
+ // Response argument structure:
+ //
+ //		none.
+ 
+ 
+ 	
+ //////////////////////////////////////////////////////////////////////////
+ // dlpEndOfSync
+ //////////////////////////////////////////////////////////////////////////
+ //		This command is sent by the desktop to end the sync.
+ //
+ //		Request arguments:	termination code: 0 = normal termination;
+ //									otherwise the client is aborting the sync
+ //
+ //		Possible error codes
+ //			0
+ 
+ // Request argument structure:
+ //
+ #define dlpEndOfSyncReqArgID		dlpFirstArgID
+ 
+ typedef enum DlpSyncTermCode {
+ 	dlpTermCodeNormal = 0,				// normal termination
+ 	dlpTermCodeOutOfMemory,				// termination due to low memory on TD
+ 	dlpTermCodeUserCan,					// user cancelled from desktop
+ 	dlpTermCodeOther						// catch-all abnormal termination code
+ 	} DlpSyncTermCode;
+ 	
+ 	
+ typedef struct DlpEndOfSyncReqType {
+ 												// OFFSET
+ 	Word					termCode;		// 0;		termination code
+ 												// TOTAL: 2 bytes
+ 	} DlpEndOfSyncReqType;
+ 
+ 
+ // Response argument structure:
+ //
+ //		none.
+ 
+ 
+ /************************************************************
+  * Macros
+  *************************************************************/
+ 
+ 
+ #endif // __DLCOMMON_H__
+ 
+ 
diff -r -c -x *.orig -x *.rej -x #* -x *~ -N orig/gcc-2.7.2.2/PalmOS/System/DLServer.h gcc-2.7.2.2/PalmOS/System/DLServer.h
*** orig/gcc-2.7.2.2/PalmOS/System/DLServer.h	Thu Jan  1 01:00:00 1970
--- gcc-2.7.2.2/PalmOS/System/DLServer.h	Wed Feb 19 16:49:15 1997
***************
*** 0 ****
--- 1,254 ----
+ /*******************************************************************
+  * 							 Pilot Software
+  *
+  *		 Copyright(c) 1995, Palm Computing Inc., All Rights Reserved
+  *
+  *-------------------------------------------------------------------
+  * FileName:
+  *		DLServer.h
+  *
+  * Description:
+  *		Desktop Link Protocol(DLP) Server implementation definitions.
+  *
+  * History:
+  *   	7/12/95	vmk	Created by Vitaly Marty Kruglikov
+  *
+  *******************************************************************/
+ 
+ 
+ #ifndef __DL_SERVER_H__
+ #define __DL_SERVER_H__
+ 
+ // Pilot common definitions
+ #include <Common.h>
+ #include <DataMgr.h>			// for DmOpenRef
+ 
+ 
+ // COMMENT OUT TO BUILD WITHOUT THE VIEWER ID OPTION
+ #define INCLUDE_VIEWER_ID
+ 
+ /************************************************************
+  * DLK result codes
+  * (dlkErrorClass is defined in SystemMgr.h)
+  *************************************************************/
+ 
+ #define dlkErrParam			(dlkErrorClass | 1)	// invalid parameter
+ #define dlkErrMemory			(dlkErrorClass | 2)	// memory allocation error
+ #define dlkErrNoSession		(dlkErrorClass | 3)	// could not establish a session	
+ 
+ #define dlkErrSizeErr		(dlkErrorClass | 4)	// reply length was too big
+ 
+ #define dlkErrLostConnection	(dlkErrorClass | 5)	// lost connection
+ #define dlkErrInterrupted	(dlkErrorClass | 6)	// sync was interrupted (see sync state)
+ #define dlkErrUserCan		(dlkErrorClass | 7)	// cancelled by user
+ 
+ 
+ /********************************************************************
+  * Desktop Link system preferences resource for user info
+  * id = sysResIDDlkUserInfo, defined in SystemMgr.rh
+  ********************************************************************/
+ #define dlkMaxUserNameLength			40
+ #define dlkUserNameBufSize				(dlkMaxUserNameLength + 1)
+ 
+ #define dlkMaxLogSize					(2 * 1024)
+ 
+ typedef enum DlkSyncStateType {
+ 	dlkSyncStateNeverSynced = 0,		// never synced
+ 	dlkSyncStateInProgress,				// sync is in progress
+ 	dlkSyncStateLostConnection,		// connection lost during sync
+ 	dlkSyncStateLocalCan,				// cancelled by local user on TD
+ 	dlkSyncStateRemoteCan,				// cancelled by user from desktop
+ 	dlkSyncStateLowMemoryOnTD,			// sync ended due to low memory on TD
+ 	dlkSyncStateAborted,					// sync was aborted for some other reason
+ 	dlkSyncStateCompleted				// sync completed normally
+ 	} DlkSyncStateType;
+ 
+ typedef struct DlkUserInfoHdrType {
+ 	DWord					userID;			// user id
+ #ifdef INCLUDE_VIEWER_ID
+ 	DWord					viewerID;		// id assigned to viewer by the desktop
+ #endif
+ 	DWord					lastSyncPC;		// last sync PC id
+ 	ULong					succSyncDate;	// last successful sync date
+ 	ULong					lastSyncDate;	// last sync date
+ 	DlkSyncStateType	lastSyncState;	// last sync status
+ 	Byte					userNameLen;	// length of name field(including null)
+ 	UInt					syncLogLen;		// length of sync log(including null)
+ 	} DlkUserInfoHdrType;
+ 
+ typedef struct DlkUserInfoType {
+ 	DlkUserInfoHdrType	header;			// fixed size header
+ 	Char						nameAndLog[2];	// user name, followed by sync log;
+ 													// both null-terminated(for debugging)
+ 	} DlkUserInfoType;
+ 
+ typedef DlkUserInfoType*		DlkUserInfoPtr;		// user info pointer
+ 
+ 
+ 
+ /********************************************************************
+  * DLK Session Structures
+  ********************************************************************/
+ 
+ 
+ // DesktopLink event notification callback.  If non-zero is returned,
+ // sync will be cancelled as soon as a safe point is reached.
+ typedef enum {
+ 	dlkEventOpeningConduit = 1,			// conduit is being opened -- paramP
+ 													// is null;
+ 	
+ 	dlkEventDatabaseOpened,					// client has opened a database -- paramP
+ 													// points to DlkEventDatabaseOpenedType;
+ 
+ 	dlkEventCleaningUp,						// last stage of sync -- cleaning up (notifying apps, etc) --
+ 													// paramP is null
+ 	
+ 	dlkEventSystemResetRequested			// system reset was requested by the desktop client
+ 													// (the normal action is to delay the reset until
+ 													// end of sync) -- paramP is null
+ 	} DlkEventType;
+ 
+ // Prototype for the event notification callback
+ typedef Int (*DlkEventProcPtr)(DWord userRef, DlkEventType dlkEvent,
+ 		VoidPtr paramP);
+ 
+ // Parameter structure for dlkEventDatabaseOpened
+ typedef struct DlkEventDatabaseOpenedType {
+ 	CharPtr		dbNameP;				// database name
+ 	ULong			dbCreator;			// database creator
+ 	} DlkEventDatabaseOpenedType;
+ 	
+ 
+ // Prototype for the "user cancel" check callback function
+ typedef Int (*DlkUserCanProcPtr)(DWord userRef);
+ 
+ 
+ //
+ // List of modified database creators maintained by DLP Server
+ //
+ typedef struct DlkDBCreatorList {
+ 	UInt					count;			// number of entries in the list
+ 	Handle				listH;			// chunk handle of the creators list
+ 	} DlkDBCreatorList;
+ 
+ 
+ //
+ // DLP Server session information
+ //
+ typedef struct DlkServerSessionType {
+  	// Information supplied by user
+  	Byte					sls;				// session listenning socket
+  	DlkEventProcPtr	eventProcP;		// ptr to DesktopLink event notification proc
+  	DWord					userRef;			// user reference value for event proc
+ 	DlkUserCanProcPtr	canProcP;		// ptr to user-cancel function
+ 	DWord					canRef;			// parameter for canProcP()
+ 
+ 	// Current database information
+  	Byte					dlkDBID;			// Desktop Link database id
+  	DmOpenRef			dbP;				// TouchDown database access pointer -- if null, no current db
+  	UInt					cardNo;			// memory module number
+  	ULong					dbCreator;		// creator id
+   	Char					dbName[dmDBNameLength];	// DB name
+   	UInt					dbOpenMode;		// database open mode
+  	Boolean				created;			// true if the current db was created
+  	Boolean				isResDB;			// set to true if resource database
+  	Boolean				ramBased;		// true if the db is in RAM storage
+  	Boolean				readOnly;		// true if the db is read-only
+  	LocalID				dbLocalID;		// TouchDown LocalID of the database
+  	ULong					initialModNum;	// initial DB modification number
+   	ULong					modRecIndex;	// modified record index for
+   												// dlpReadNextModifiedRec(0=beginning)
+   	
+   	// List of modified database creators maintained by DLP Server
+   	DlkDBCreatorList	creatorList;
+  
+ 	// Session status information
+ 	DlkSyncStateType	syncState;		// current sync state;
+ 	
+  	Boolean				complete;		// set to true when completion request
+  												// has been received
+  	
+  	Boolean				conduitOpened;	// set to true after the first coduit
+  												// is opened by remote
+  												
+  	Boolean				logCleared;		// set to true after sync log has been
+  												// cleared during the current session;
+ 			// The log will be cleared before any new entries are added or at
+ 			// the end of sync in case no new entries were added.
+ 			// (we do not clear the log at the beginning of sync in case the
+ 			// user cancels during the "identifying user" phase; in this
+ 			// event, the spec calls for preserving the original log)
+  												
+  	Boolean				resetPending;	// set to true if system reset is pending;
+  												// the reset will be carried out at end
+  												// of sync
+  												
+ 	// Current request information
+  	Boolean				gotCommand;		// set to true when got a request
+  	Byte					cmdTID;			// current transaction ID
+  	Word					cmdLen;			// size of data in request buffer
+  	VoidPtr				cmdP;				// pointer to command
+  	VoidHand				cmdH;				// handle of command buffer
+  	Byte					remoteSocket;	// remote socket id
+  	} DlkServerSessionType;
+ 
+ typedef DlkServerSessionType*	DlkServerSessionPtr;
+ 
+ 
+ //
+ // Parameter passed to DlkStartServer()
+ //
+ typedef struct DlkServerParamType {
+  	Byte					sls;				// server listenning socket id for PAD
+  	DlkEventProcPtr	eventProcP;		// ptr to DesktopLink event notification proc
+  	DWord					userRef;			// user reference value for event proc
+  	Int					cmdWaitSec;		// maximum number of seconds to wait for
+  												// a command (0=default, -1=forever)
+ 	DlkUserCanProcPtr	canProcP;		// ptr to user-cancel function
+ 	DWord					canRef;			// parameter for canProcP()
+  	
+  	} DlkServerParamType;
+  
+ typedef DlkServerParamType*		DlkServerParamPtr;
+ 
+ 
+ /********************************************************************
+  * DesktopLink Server Routines
+  ********************************************************************/
+ 
+ #ifdef __cplusplus
+ extern "C" {
+ #endif
+ 
+ //
+ // SERVER API
+ //
+ 
+ // * RETURNED:	0 if session ended successfully; otherwise: dlkErrParam,
+ // *				dlkErrNoSession, dlkErrLostConnection, dlkErrMemory,
+ //	*				dlkErrUserCan
+ Err	DlkStartServer(DlkServerParamPtr paramP)
+ 							SYS_TRAP(sysTrapDlkStartServer);
+ 
+ Err	DlkGetSyncInfo(ULongPtr succSyncDateP, ULongPtr lastSyncDateP,
+ 			DlkSyncStateType* syncStateP, CharPtr nameBufP,
+ 			CharPtr logBufP, ULongPtr logLenP)
+ 							SYS_TRAP(sysTrapDlkGetSyncInfo);
+ 
+ // DOLATER... this is a temporary function for debugging modem manager.
+ // remove it when done.
+ void	DlkSetLogEntry(CharPtr textP, Int textLen, Boolean append)
+ 							SYS_TRAP(sysTrapDlkSetLogEntry);
+ 
+ #ifdef __cplusplus 
+ }
+ #endif
+ 
+ 
+ /********************************************************************
+  * DLK Macros
+  ********************************************************************/
+ 
+ 
+ 
+ #endif	// __DL_SERVER_H__
diff -r -c -x *.orig -x *.rej -x #* -x *~ -N orig/gcc-2.7.2.2/PalmOS/System/DLUtil.h gcc-2.7.2.2/PalmOS/System/DLUtil.h
*** orig/gcc-2.7.2.2/PalmOS/System/DLUtil.h	Thu Jan  1 01:00:00 1970
--- gcc-2.7.2.2/PalmOS/System/DLUtil.h	Wed Feb 19 16:49:15 1997
***************
*** 0 ****
--- 1,56 ----
+ /*******************************************************************
+  * 							 Pilot Software
+  *
+  *		 Copyright(c) 1995, Palm Computing Inc., All Rights Reserved
+  *
+  *-------------------------------------------------------------------
+  * FileName:
+  *		DLUtil.h
+  *
+  * Description:
+  *		Desktop Link Protocol(DLP) utility definitions.
+  *
+  * History:
+  *   	8/12/95	vmk	Created by Vitaly Marty Kruglikov
+  *
+  *******************************************************************/
+ 
+ 
+ #ifndef __DL_UTIL_H__
+ #define __DL_UTIL_H__
+ 
+ // Pilot common definitions
+ #include <Common.h>
+ 
+ // Desktop Link common definitions
+ #include	<DLCommon.h>
+ 
+ 
+ /********************************************************************
+  * Utility Routines
+  ********************************************************************/
+ 
+ #ifdef __cplusplus
+ extern "C" {
+ #endif
+ 
+ 
+ Int DlkUtilFillArgWrapper(DlpGenericArgWrapperPtr wrapperP,
+ 		Byte argID, Word argSize);
+ 						
+ Boolean DlkUtilGetArg(VoidPtr bodyBufP, Word bodySize, Byte argID,
+ 		VoidPtr* dataPP, WordPtr dataSizeP);
+ 
+ 
+ #ifdef __cplusplus 
+ }
+ #endif
+ 
+ 
+ /********************************************************************
+  * Utility Macros
+  ********************************************************************/
+ 
+ 
+ 
+ #endif	// __DL_UTIL_H__
diff -r -c -x *.orig -x *.rej -x #* -x *~ -N orig/gcc-2.7.2.2/PalmOS/System/DataMgr.h gcc-2.7.2.2/PalmOS/System/DataMgr.h
*** orig/gcc-2.7.2.2/PalmOS/System/DataMgr.h	Thu Jan  1 01:00:00 1970
--- gcc-2.7.2.2/PalmOS/System/DataMgr.h	Wed Feb 19 16:49:16 1997
***************
*** 0 ****
--- 1,432 ----
+ /*******************************************************************
+  * 							 Pilot Software
+  *
+  *		 Copyright(c) 1994, Palm Computing Inc., All Rights Reserved
+  *
+  *-------------------------------------------------------------------
+  * FileName:
+  *		DataMgr.h
+  *
+  * Description:
+  *		Header for the Data Manager
+  *
+  * History:
+  *   	11/14/94  RM - Created by Ron Marianetti
+  *
+  *******************************************************************/
+ 
+ #ifndef __DATAMGR_H__
+ #define __DATAMGR_H__
+ 
+ 
+ // Include elementary types
+ #include <Common.h>					// Basic types
+ #include <SysTraps.h>				// Trap Numbers.
+ 
+ // Other headers we depend on
+ #include <MemoryMgr.h>				 
+ 
+ 
+ /************************************************************
+  * Category equates
+  *************************************************************/
+ #define	dmRecAttrCategoryMask	0x0F	// mask for category #
+ #define	dmRecNumCategories		16		// number of categories
+ #define	dmCategoryLength			16		// 15 chars + 1 null terminator
+ 
+ #define  dmAllCategories			0xff
+ #define  dmUnfiledCategory  		0
+ 
+ #define	dmMaxRecordIndex			0xffff
+ 
+ 
+ 
+ // Record Attributes 
+ #define	dmRecAttrDelete			0x80	// delete this record next sync
+ #define	dmRecAttrDirty				0x40	// archive this record next sync
+ #define	dmRecAttrBusy				0x20	// record currently in use
+ #define	dmRecAttrSecret			0x10	// "secret" record - password protected
+ 
+ 
+ 
+ 
+ /************************************************************
+  * Database Header equates
+  *************************************************************/
+ #define	dmDBNameLength				32			// 31 chars + 1 null terminator
+ 
+ // Attributes of a Database
+ #define	dmHdrAttrResDB				0x0001	// Resource database
+ #define 	dmHdrAttrReadOnly			0x0002	// Read Only database
+ #define	dmHdrAttrAppInfoDirty	0x0004	// Set if Application Info block is dirty
+ 														// Optionally supported by an App's conduit
+ #define	dmHdrAttrBackup			0x0008	//	Set if database should be backed up to PC if
+ 														//	no app-specific synchronization conduit has
+ 														//	been supplied.
+ #define	dmHdrAttrOpen				0x8000	// Database not closed properly
+ 
+ 
+ 
+ 
+ /************************************************************
+  * Mode flags passed to DmOpenDatabase
+  *************************************************************/
+ #define	dmModeReadOnly				0x0001		// read  access
+ #define	dmModeWrite					0x0002		// write access
+ #define	dmModeReadWrite			0x0003		// read & write access
+ #define	dmModeLeaveOpen			0x0004		// leave open when app quits
+ #define	dmModeExclusive			0x0008		// don't let anyone else open it
+ #define	dmModeShowSecret			0x0010		// force show of secret records
+ 
+ // Generic type used to represent an open Database
+ typedef	VoidPtr						DmOpenRef;
+ 
+ 
+ /************************************************************
+  * Structure passed to DmGetNextDatabaseByTypeCreator and used
+  *  to cache search information between multiple searches.
+  *************************************************************/
+ typedef struct {
+ 	DWord		info[8];
+ 	} DmSearchStateType;
+ typedef DmSearchStateType*	DmSearchStatePtr;	
+ 
+ 
+ 
+ /************************************************************
+  * Database manager error codes
+  * the constant dmErrorClass is defined in SystemMgr.h
+  *************************************************************/
+ #define	dmErrMemError					(dmErrorClass | 1)
+ #define	dmErrIndexOutOfRange			(dmErrorClass | 2)
+ #define	dmErrInvalidParam				(dmErrorClass | 3)
+ #define	dmErrReadOnly					(dmErrorClass | 4)
+ #define	dmErrDatabaseOpen				(dmErrorClass | 5)
+ #define	dmErrCantOpen					(dmErrorClass | 6)
+ #define	dmErrCantFind					(dmErrorClass | 7)
+ #define	dmErrRecordInWrongCard		(dmErrorClass | 8)
+ #define	dmErrCorruptDatabase			(dmErrorClass | 9)
+ #define	dmErrRecordDeleted			(dmErrorClass | 10)
+ #define	dmErrRecordArchived			(dmErrorClass | 11)
+ #define	dmErrNotRecordDB				(dmErrorClass | 12)
+ #define	dmErrNotResourceDB			(dmErrorClass | 13)
+ #define	dmErrROMBased					(dmErrorClass | 14)
+ #define	dmErrRecordBusy				(dmErrorClass | 15)
+ #define	dmErrResourceNotFound		(dmErrorClass | 16)
+ #define	dmErrNoOpenDatabase			(dmErrorClass | 17)
+ #define	dmErrInvalidCategory			(dmErrorClass | 18)
+ #define	dmErrNotValidRecord			(dmErrorClass | 19)
+ #define	dmErrWriteOutOfBounds		(dmErrorClass | 20)
+ #define	dmErrSeekFailed				(dmErrorClass | 21)
+ #define	dmErrAlreadyOpenForWrites	(dmErrorClass | 22)
+ #define	dmErrOpenedByAnotherTask	(dmErrorClass | 23)
+ #define  dmErrUniqueIDNotFound		(dmErrorClass | 24)
+ #define  dmErrAlreadyExists			(dmErrorClass | 25)
+ #define	dmErrInvalidDatabaseName	(dmErrorClass | 26)
+ 
+ 
+ /************************************************************
+  * Values for the direction parameter of DmSeekRecordInCategory
+  *************************************************************/
+ #define dmSeekForward				 1
+ #define dmSeekBackward				-1
+ 
+ 
+ /************************************************************
+  * Data Manager procedures
+  *************************************************************/
+ #ifdef __cplusplus
+ extern "C" {
+ #endif
+ 
+ 
+ // Initialization
+ Err		DmInit(void)
+ 							SYS_TRAP(sysTrapDmInit);
+ 
+ 
+ // Directory Lists
+ Err		DmCreateDatabase(UInt cardNo, const CharPtr nameP, 
+ 					ULong creator, ULong type, Boolean resDB)
+ 							SYS_TRAP(sysTrapDmCreateDatabase);
+ 
+ Err		DmCreateDatabaseFromImage(Ptr bufferP)
+ 							SYS_TRAP(sysTrapDmCreateDatabaseFromImage);
+ 
+ 
+ Err		DmDeleteDatabase(UInt cardNo, LocalID dbID)
+ 							SYS_TRAP(sysTrapDmDeleteDatabase);
+ 
+ UInt		DmNumDatabases(UInt cardNo)
+ 							SYS_TRAP(sysTrapDmNumDatabases);
+ 							
+ LocalID	DmGetDatabase(UInt cardNo, UInt index)
+ 							SYS_TRAP(sysTrapDmGetDatabase);
+ 
+ LocalID	DmFindDatabase(UInt cardNo, const CharPtr nameP)
+ 							SYS_TRAP(sysTrapDmFindDatabase);
+ 
+ Err	DmGetNextDatabaseByTypeCreator(Boolean newSearch, DmSearchStatePtr stateInfoP,
+ 			 		ULong	type, ULong creator, Boolean onlyLatestVers, 
+ 			 		UIntPtr cardNoP, LocalID* dbIDP)
+ 							SYS_TRAP(sysTrapDmGetNextDatabaseByTypeCreator);
+ 
+ 
+ // Database info
+ Err		DmDatabaseInfo(UInt cardNo, LocalID	dbID, const CharPtr nameP,
+ 					UIntPtr attributesP, UIntPtr versionP, ULongPtr crDateP,
+ 					ULongPtr	modDateP, ULongPtr bckUpDateP,
+ 					ULongPtr	modNumP, LocalID* appInfoIDP,
+ 					LocalID* sortInfoIDP, ULongPtr typeP,
+ 					ULongPtr creatorP)
+ 							SYS_TRAP(sysTrapDmDatabaseInfo);
+ 
+ Err		DmSetDatabaseInfo(UInt cardNo, LocalID	dbID, const CharPtr nameP,
+ 					UIntPtr attributesP, UIntPtr versionP, ULongPtr crDateP,
+ 					ULongPtr	modDateP, ULongPtr bckUpDateP,
+ 					ULongPtr	modNumP, LocalID* appInfoIDP,
+ 					LocalID* sortInfoIDP, ULongPtr typeP,
+ 					ULongPtr creatorP)
+ 							SYS_TRAP(sysTrapDmSetDatabaseInfo);
+ 
+ Err		DmDatabaseSize(UInt cardNo, LocalID dbID, ULongPtr numRecordsP,
+ 					ULongPtr	totalBytesP, ULongPtr dataBytesP)
+ 							SYS_TRAP(sysTrapDmDatabaseSize);
+ 
+ 
+ // Open Databases info
+ DmOpenRef	DmOpenDatabase(UInt cardNo, LocalID dbID, UInt mode)
+ 							SYS_TRAP(sysTrapDmOpenDatabase);
+ 							
+ DmOpenRef	DmOpenDatabaseByTypeCreator(ULong type, ULong creator, UInt mode)
+ 							SYS_TRAP(sysTrapDmOpenDatabaseByTypeCreator);
+ 							
+ Err			DmCloseDatabase(DmOpenRef dbP)
+ 							SYS_TRAP(sysTrapDmCloseDatabase);
+ 							
+ 
+ DmOpenRef	DmNextOpenDatabase(DmOpenRef currentP)
+ 							SYS_TRAP(sysTrapDmNextOpenDatabase);
+ 							
+ Err			DmOpenDatabaseInfo(DmOpenRef dbP, LocalID* dbIDP, 
+ 					UIntPtr openCountP, UIntPtr modeP, UIntPtr cardNoP,
+ 					BooleanPtr resDBP)
+ 							SYS_TRAP(sysTrapDmOpenDatabaseInfo);
+ 							
+ LocalID		DmGetAppInfoID (DmOpenRef dbP)
+ 							SYS_TRAP(sysTrapDmGetAppInfoID);
+ 
+ 
+ // Utility to unlock all records and clear busy bits
+ Err			DmResetRecordStates(DmOpenRef dbP)
+ 							SYS_TRAP(sysTrapDmResetRecordStates);
+ 
+ 
+ // Error Query
+ Err			DmGetLastErr(void)
+ 							SYS_TRAP(sysTrapDmGetLastErr);
+ 
+ 
+ //------------------------------------------------------------
+ // Record based access routines
+ //------------------------------------------------------------
+ 
+ // Record Info
+ UInt		DmNumRecords(DmOpenRef dbP)
+ 							SYS_TRAP(sysTrapDmNumRecords);
+ 
+ UInt		DmNumRecordsInCategory(DmOpenRef dbP, UInt category)
+ 							SYS_TRAP(sysTrapDmNumRecordsInCategory);
+ 
+ Err		DmRecordInfo(DmOpenRef dbP, UInt index,
+ 					UIntPtr attrP, ULongPtr uniqueIDP, LocalID* chunkIDP)
+ 							SYS_TRAP(sysTrapDmRecordInfo);
+ 
+ Err		DmSetRecordInfo(DmOpenRef dbP, UInt index,
+ 					UIntPtr attrP, ULongPtr uniqueIDP)
+ 							SYS_TRAP(sysTrapDmSetRecordInfo);
+ 							
+ 
+ 
+ // Record attaching and detaching
+ Err		DmAttachRecord(DmOpenRef dbP, UIntPtr atP,
+ 					Handle	newH, Handle* oldHP)
+ 							SYS_TRAP(sysTrapDmAttachRecord);
+ 
+ Err		DmDetachRecord(DmOpenRef dbP, UInt index,
+ 					Handle* oldHP)
+ 							SYS_TRAP(sysTrapDmDetachRecord);
+ 					
+ Err		DmMoveRecord(DmOpenRef dbP, UInt from, UInt to)
+ 							SYS_TRAP(sysTrapDmMoveRecord);
+ 
+ 
+ 
+ // Record creation and deletion
+ VoidHand	DmNewRecord(DmOpenRef dbP, UIntPtr atP,
+ 					ULong size)
+ 							SYS_TRAP(sysTrapDmNewRecord);
+ 
+ Err		DmRemoveRecord(DmOpenRef dbP, UInt index)
+ 							SYS_TRAP(sysTrapDmRemoveRecord);
+ 
+ Err		DmDeleteRecord(DmOpenRef dbP, UInt index)
+ 							SYS_TRAP(sysTrapDmDeleteRecord);
+ 
+ Err		DmArchiveRecord(DmOpenRef dbP, UInt index)
+ 							SYS_TRAP(sysTrapDmArchiveRecord);
+ 
+ VoidHand	DmNewHandle(DmOpenRef dbP, ULong size)
+ 							SYS_TRAP(sysTrapDmNewHandle);
+ 
+ Err		DmRemoveSecretRecords(DmOpenRef dbP)
+ 							SYS_TRAP(sysTrapDmRemoveSecretRecords);
+ 
+ 
+ // Record viewing manipulation
+ Err		DmFindRecordByID(DmOpenRef dbP, ULong uniqueID, UIntPtr indexP)
+ 							SYS_TRAP(sysTrapDmFindRecordByID);
+ 
+ VoidHand	DmQueryRecord(DmOpenRef dbP, UInt index)
+ 							SYS_TRAP(sysTrapDmQueryRecord);
+ 
+ VoidHand	DmGetRecord(DmOpenRef dbP, UInt index)
+ 							SYS_TRAP(sysTrapDmGetRecord);
+ 							
+ VoidHand	DmQueryNextInCategory(DmOpenRef dbP, UIntPtr indexP, UInt category)
+ 							SYS_TRAP(sysTrapDmQueryNextInCategory);
+ 							
+ UInt		DmPositionInCategory (DmOpenRef dbP, UInt index, UInt category)
+ 							SYS_TRAP(sysTrapDmPositionInCategory);
+ 							
+ Err		DmSeekRecordInCategory (DmOpenRef dbP, UIntPtr indexP, Int offset,
+ 					Int direction, UInt category)
+ 							SYS_TRAP(sysTrapDmSeekRecordInCategory);
+ 
+ 
+ VoidHand	DmResizeRecord(DmOpenRef dbP, UInt index, ULong newSize)
+ 							SYS_TRAP(sysTrapDmResizeRecord);
+ 
+ Err		DmReleaseRecord(DmOpenRef dbP, UInt index, Boolean dirty)
+ 							SYS_TRAP(sysTrapDmReleaseRecord);
+ 
+ Int		DmSearchRecord(VoidHand recH, DmOpenRef* dbPP)
+ 							SYS_TRAP(sysTrapDmSearchRecord);
+ 
+ 
+ // Category manipulation
+ Err		DmMoveCategory (DmOpenRef dbP, UInt toCategory, UInt fromCategory, Boolean dirty)
+ 							SYS_TRAP(sysTrapDmMoveCategory);
+ 							
+ 							
+ // Validation for writing
+ Err		DmWriteCheck(VoidPtr recordP, ULong offset, ULong bytes)
+ 							SYS_TRAP(sysTrapDmWriteCheck);
+ 							
+ // Writing
+ Err		DmWrite(VoidPtr recordP, ULong offset, VoidPtr srcP, ULong bytes)
+ 							SYS_TRAP(sysTrapDmWrite);
+ 							
+ Err		DmStrCopy(VoidPtr recordP, ULong offset, CharPtr srcP)
+ 							SYS_TRAP(sysTrapDmStrCopy);
+ 
+ Err		DmSet(VoidPtr recordP, ULong offset, ULong bytes, Byte value)
+ 							SYS_TRAP(sysTrapDmSet);
+ 							
+ 
+ 							
+ 
+ //------------------------------------------------------------
+ // Resource based access routines
+ //------------------------------------------------------------
+ 
+ // High level access routines
+ VoidHand		DmGetResource(ULong type, Int id)
+ 							SYS_TRAP(sysTrapDmGetResource);
+ 
+ VoidHand		DmGet1Resource(ULong type, Int id)
+ 							SYS_TRAP(sysTrapDmGet1Resource);
+ 
+ Err			DmReleaseResource(VoidHand resourceH)
+ 							SYS_TRAP(sysTrapDmReleaseResource);
+ 
+ VoidHand		DmResizeResource(VoidHand resourceH, ULong newSize)
+ 							SYS_TRAP(sysTrapDmResizeResource);
+ 
+ 
+ // Searching resource databases  
+ DmOpenRef	DmNextOpenResDatabase(DmOpenRef dbP)
+ 							SYS_TRAP(sysTrapDmNextOpenResDatabase);
+ 
+ Int			DmFindResourceType(DmOpenRef dbP, ULong resType, Int typeIndex)
+ 							SYS_TRAP(sysTrapDmFindResourceType);
+ 
+ Int			DmFindResource(DmOpenRef dbP, ULong resType, Int resID, 
+ 					VoidHand resH)
+ 							SYS_TRAP(sysTrapDmFindResource);
+ 
+ Int			DmSearchResource(ULong resType, Int resID,
+ 					VoidHand resH, DmOpenRef* dbPP)
+ 							SYS_TRAP(sysTrapDmSearchResource);
+ 
+ 
+ // Resource Info
+ UInt			DmNumResources(DmOpenRef dbP)
+ 							SYS_TRAP(sysTrapDmNumResources);
+ 
+ Err			DmResourceInfo(DmOpenRef dbP, Int index,
+ 					ULongPtr resTypeP, IntPtr resIDP,  
+ 					LocalID* chunkLocalIDP)
+ 							SYS_TRAP(sysTrapDmResourceInfo);
+ 
+ Err			DmSetResourceInfo(DmOpenRef dbP, Int index,
+ 					ULongPtr resTypeP, IntPtr resIDP)
+ 							SYS_TRAP(sysTrapDmSetResourceInfo);
+ 
+ 
+ 
+ // Resource attaching and detaching
+ Err			DmAttachResource(DmOpenRef dbP, VoidHand	newH, 
+ 					ULong resType, Int resID)
+ 							SYS_TRAP(sysTrapDmAttachResource);
+ 
+ Err			DmDetachResource(DmOpenRef dbP, Int index,
+ 					VoidHand* oldHP)
+ 							SYS_TRAP(sysTrapDmDetachResource);
+ 
+ 
+ 
+ // Resource creation and deletion
+ VoidHand		DmNewResource(DmOpenRef dbP, ULong resType, Int resID,
+ 					ULong size)
+ 							SYS_TRAP(sysTrapDmNewResource);
+ 
+ Err			DmRemoveResource(DmOpenRef dbP, Int index)
+ 							SYS_TRAP(sysTrapDmRemoveResource);
+ 
+ 
+ 
+ // Resource manipulation
+ VoidHand		DmGetResourceIndex(DmOpenRef dbP, Int index)
+ 							SYS_TRAP(sysTrapDmGetResourceIndex);
+ 
+ 
+ typedef Int DmComparF (void *, void *, Int other);
+ 
+ Err 			DmQuickSort(const DmOpenRef dbP, DmComparF *compar, Int other)
+ 							SYS_TRAP(sysTrapDmQuickSort);
+ 
+ Err			DmInsertionSort (const DmOpenRef dbR, DmComparF *compar, Int other)
+ 							SYS_TRAP(sysTrapDmInsertionSort);
+ 
+ UInt			DmFindSortPosition(DmOpenRef dbP, VoidPtr newRecord, 
+ 					DmComparF *compar, Int other)
+ 							SYS_TRAP(sysTrapDmFindSortPosition);
+ 
+ 
+ #ifdef __cplusplus
+ }
+ #endif
+ 
+ #endif // __DATAMGR_H__
+ 
diff -r -c -x *.orig -x *.rej -x #* -x *~ -N orig/gcc-2.7.2.2/PalmOS/System/DataPrv.h gcc-2.7.2.2/PalmOS/System/DataPrv.h
*** orig/gcc-2.7.2.2/PalmOS/System/DataPrv.h	Thu Jan  1 01:00:00 1970
--- gcc-2.7.2.2/PalmOS/System/DataPrv.h	Wed Feb 19 16:49:16 1997
***************
*** 0 ****
--- 1,212 ----
+ /*******************************************************************
+  * 							 Pilot Software
+  *
+  *		 Copyright(c) 1994, Palm Computing Inc., All Rights Reserved
+  *
+  *-------------------------------------------------------------------
+  * FileName:
+  *		DataPrv.h
+  *
+  * Description:
+  *		Private Header for the Data Manager
+  *
+  * History:
+  *   	8/10/95  RM - Created by Ron Marianetti
+  *
+  *******************************************************************/
+ 
+ #ifdef	NON_PORTABLE
+ #ifndef __DATAPRV_H__
+ #define __DATAPRV_H__
+ 
+ 
+ 
+ /************************************************************
+  * Structure of a Record entry
+  *************************************************************/
+ typedef struct {
+ 	LocalID		localChunkID;				// local chunkID of a record
+ 	Byte			attributes;					// record attributes;
+ 	Byte			uniqueID[3];				// unique ID of record; should
+ 													//	not be 0 for a legal record.
+ 	} RecordEntryType;
+ typedef RecordEntryType*	RecordEntryPtr;
+ 
+ 
+ 
+ /************************************************************
+  * Structure of a Resource entry
+  *************************************************************/
+ typedef struct {
+ 	DWord			type;							// resource type
+ 	Word			id;							// resource id
+ 	LocalID		localChunkID;				// resource data chunk ID
+ 	} RsrcEntryType;
+ typedef RsrcEntryType*	RsrcEntryPtr;
+ 
+ // Attributes field
+ #define	dmRsrcAttrUnused		0x0000	// to be defined...
+ 
+ 
+ 
+ /************************************************************
+  * Structure of a record list extension. This is used if all
+  *  the database record/resource entries of a database can't fit into
+  *  the database header.
+  *************************************************************/
+ typedef struct {
+ 	LocalID				nextRecordListID;			// local chunkID of next list
+ 	Word					numRecords;					// number of records in this list
+ 	Word					firstEntry;					// array of Record/Rsrc entries 
+ 															// starts here
+ 	} RecordListType;
+ typedef RecordListType*	RecordListPtr;
+ 
+ 
+ 
+ 
+ /************************************************************
+  * Structure of a Database Header
+  *************************************************************/
+ typedef struct {
+ 	Byte			name[dmDBNameLength];	// name of database
+ 	Word			attributes;					// database attributes
+ 	Word			version;						// version of database
+ 
+ 	DWord			creationDate;				// creation date of database
+ 	DWord			modificationDate;			// latest modification date
+ 	DWord			lastBackupDate;			// latest backup date
+ 	DWord			modificationNumber;		// modification number of database
+ 
+ 	LocalID		appInfoID;					// application specific info
+ 	LocalID		sortInfoID;					// app specific sorting info
+ 
+ 	DWord			type;							// database type
+ 	DWord			creator;						// database creator 
+ 	
+ 	DWord			uniqueIDSeed;				// used to generate unique IDs.
+ 													//	Note that only the low order
+ 													//	3 bytes of this is used (in
+ 													//	RecordEntryType.uniqueID).
+ 													//	We are keeping 4 bytes for 
+ 													//	alignment purposes.
+ 
+ 	RecordListType	recordList;				// first record list
+ 	} DatabaseHdrType;		
+ 
+ typedef DatabaseHdrType*	DatabaseHdrPtr;
+ typedef DatabaseHdrPtr*		DatabaseHdrHand;
+ 
+ 
+ 
+ 
+ 
+ /************************************************************
+  * Directory of all available databases - maintained by the
+  *  Database Manager. This directory also includes resource
+  *  databases. There is one of these directories for each store
+  *  (either RAM or ROM store) in a memory card.
+  *************************************************************/
+ typedef struct {
+ 	LocalID		nextDatabaseListID;		// continuation list, if any
+ 	Word			numDatabases;				// # of database ID's in this list
+ 	LocalID		databaseID[1];				// ChunkID of each Database
+ 	} DatabaseDirType;
+ 
+ typedef DatabaseDirType*	DatabaseDirPtr;
+ 
+ 
+ 
+ 
+ /************************************************************
+  * This structure is used to hold information on an open database
+  * It gets allocated as a non-movable chunk in the dynamic heap
+  *  when a database is opened and caches database information that
+  *  helps speed up performance.
+  *************************************************************/
+ typedef struct  {
+ 	VoidPtr				next;							// ptr to next access structure
+ 	UInt					openCount;					// incremented every time it's opened
+ 	ULong					ownerTaskID;				// taskID of owner
+ 	UInt					exclusive 	: 1;			// true if opened with exclusive access
+ 	UInt					writeAccess : 1;			// true if opened with write access
+ 	UInt					resDB		 	: 1;			// true if resource database
+ 	LocalID				hdrID;						// local ID of database header
+ 	DatabaseHdrHand	hdrH;							// Database header handle
+ 	DatabaseHdrPtr		hdrP;							// Database header ptr for faster access
+ 	UInt					cardNo;						// card number of database
+ 	UInt					numRecords; 				// cached here for better performance
+ 	Ptr					hdrMasterP;					// master ptr to header if ROM based
+ 	Ptr*					handleTableP;				// pointer to block of ROM handles
+ 	} DmOpenInfoType;
+ 
+ typedef DmOpenInfoType*		DmOpenInfoPtr;
+ 
+ 
+ 
+ /************************************************************
+  * This structure is used to hold client specific information for
+  *  an open database. There is one of these allocated every time 
+  *  a database is opened, even if it's already open. This structure
+  *  holds the open mode of the client and a pointer to the DmOpenInfoType
+  *  of the database which contains the common database info for all
+  *  clients. The SysAppInfoPtr, referenced off of the current A5, 
+  *  has a pointer to the first DmAccessType in the linked list.
+  *************************************************************/
+ typedef struct DmAccessType {
+ 	struct DmAccessType*	next;							// ptr to next access structure
+ 	UInt						mode;							// mode it was opened in
+ 	DmOpenInfoPtr			openP;						// ptr to DmOpenInfoType for database
+ 	} DmAccessType;
+ 
+ typedef DmAccessType*		DmAccessPtr;
+ 
+ 
+ 
+ /************************************************************
+  * This structure is used to hold the results of a search
+  *  in DmGetNextDatabaseByTypeCreator. It is the "real" structure
+  *  of the generic type DmSearchStateType used by applications.
+  *************************************************************/
+ typedef struct {
+ 		Int				index;
+ 		UInt				relIndex;
+ 		SByte				cardNo;
+ 		SByte				storeNo;
+ 		UInt				storeEntries;
+ 		UInt				storeStartIndex;
+ 		LocalID			dirID;
+ 		} DmPrvSearchStateType;
+ typedef DmPrvSearchStateType*	DmPrvSearchStatePtr;	
+ 	
+ 
+ 
+ /************************************************************
+  * The owner ID of chunks allocated by the Database Manager
+  *************************************************************/
+ #define	dmDynOwnerID					0x00		// Dynamic heap chunks
+ #define	dmMgrOwnerID					0x01		// Management chunks
+ #define	dmRecOwnerID					0x02		// Record chunks
+ #define	dmOrphanOwnerID				0x03		// Orphaned record chunks
+ 
+ 
+ /************************************************************
+  * Private Data Manager procedures
+  *************************************************************/
+ #ifdef __cplusplus
+ extern "C" {
+ #endif
+ 
+ Err			DmMoveOpenDBContext(DmAccessPtr* listHeadP, DmAccessPtr dbP)
+ 							SYS_TRAP(sysTrapDmMoveOpenDBContext);
+ 
+ 
+ 
+ #ifdef __cplusplus
+ }
+ #endif
+ 
+ 
+ #endif // __DATAPRV_H__
+ #endif //NON_PORTABLE
+ 
diff -r -c -x *.orig -x *.rej -x #* -x *~ -N orig/gcc-2.7.2.2/PalmOS/System/DateTime.h gcc-2.7.2.2/PalmOS/System/DateTime.h
*** orig/gcc-2.7.2.2/PalmOS/System/DateTime.h	Thu Jan  1 01:00:00 1970
--- gcc-2.7.2.2/PalmOS/System/DateTime.h	Wed Feb 19 16:49:16 1997
***************
*** 0 ****
--- 1,209 ----
+ /*******************************************************************
+  * 							 Pilot Software
+  *
+  *		 Copyright(c) 1995, Palm Computing Inc., All Rights Reserved
+  *
+  *-------------------------------------------------------------------
+  * FileName:
+  *		DateTime.h
+  *
+  * Description:
+  *		Date and Time calculations
+  *
+  * History:
+  *   	1/19/95  rsf - Created by Roger Flores
+  *
+  *
+  *******************************************************************/
+ 
+ #ifndef 	__DATETIME_H__
+ #define	__DATETIME_H__
+ 
+ 
+ typedef DWord time_t;
+ 
+ typedef struct {
+ 	SWord second;
+ 	SWord minute;
+ 	SWord hour;
+ 	SWord day;
+ 	SWord month;
+ 	SWord year;
+ 	SWord weekDay;		// Days since Sunday (0 to 6)
+ 	} DateTimeType;
+ 	
+ typedef DateTimeType * DateTimePtr;
+ 
+ 
+ // This is the time format.  Times are treated as words so don't 
+ // change the order of the members in this structure.
+ //
+ typedef struct {
+ 	Byte        hours;
+ 	Byte        minutes;
+ } TimeType;
+ 
+ typedef TimeType * TimePtr;
+ 
+ #define noTime	-1		// The entire TimeType is -1 if there isn't a time.
+ 
+ 
+ // This is the date format.  Dates are treated as words so don't 
+ // change the order of the members in this structure.
+ //
+ typedef struct {
+ 	Word year  :7;                   // years since 1904 (MAC format)
+ 	Word month :4; 
+ 	Word day   :5;
+ } DateType;
+ 
+ typedef DateType * DatePtr;
+ 
+ 
+ /************************************************************
+  * Date Time Constants
+  *************************************************************/
+ 
+ // Maximum lengths of strings return by the date and time formating
+ // routine DateToAscii and TimeToAscii.
+ #define timeStringLength	9
+ #define dateStringLength	9
+ #define longDateStrLenght	15
+ 
+ 
+ #define firstYear				1904
+ #define numberOfYears		128
+ #define lastYear				(firstYear + numberOfYears - 1)
+ 
+ 
+ 
+ // Constants for time calculations
+ // Could change these from xIny to yPerX
+ #define minutesInSeconds	60
+ #define hoursInMinutes		60
+ #define hoursInSeconds		(hoursInMinutes * minutesInSeconds)
+ #define hoursPerDay			24
+ //#define daysInSeconds		((long)(hoursPerDay) * ((long)hoursInSeconds))
+ #define daysInSeconds		(0x15180)	// cc bug
+ 
+ #define daysInWeek			7
+ #define daysInYear			365
+ #define daysInLeapYear		366
+ #define daysInFourYears		(daysInLeapYear + 3 * daysInYear)
+ 
+ #define monthsInYear			12
+ 
+ #define maxDays				((ULong) numberOfYears / 4 * daysInFourYears - 1)
+ #define maxSeconds			((ULong) maxDays * daysInSeconds)
+ #define maxTime				0x 
+ 
+ // Values returned by DayOfWeek routine.
+ #define sunday					0
+ #define monday					1
+ #define tuesday				2
+ #define wednesday				3
+ #define thursday				4
+ #define friday					5
+ #define saturday				6
+ 
+ // Months of the year
+ #define january				1
+ #define february				2
+ #define march					3
+ #define april					4
+ #define may						5
+ #define june					6
+ #define july					7
+ #define august					8
+ #define september				9
+ #define october				10
+ #define november				11
+ #define december				12
+ 
+ 
+ // Values returned by DoyOfMonth routine.
+ typedef enum {
+ 	dom1stSun, dom1stMon, dom1stTue, dom1stWen, dom1stThu, dom1stFri, dom1stSat,
+ 	dom2ndSun, dom2ndMon, dom2ndTue, dom2ndWen, dom2ndThu, dom2ndFri, dom2ndSat,
+ 	dom3rdSun, dom3rdMon, dom3rdTue, dom3rdWen, dom3rdThu, dom3rdFri, dom3rdSat,
+ 	dom4thSun, dom4thMon, dom4thTue, dom4thWen, dom4thThu, dom4thFri, dom4thSat,
+ 	domLastSun, domLastMon, domLastTue, domLastWen, domLastThu, domLastFri, 
+ 	domLastSat
+ 	} DayOfWeekType;
+ 
+ 
+ //************************************************************
+ //* Date and Time macros
+ //***********************************************************
+ 
+ // Convert a date in a DateType structure to an unsigned int.
+  #define DateToInt(date) (*(UInt *) &date)
+  
+  
+ // Convert a date in a DateType structure to an unsigned int.
+  #define TimeToInt(time) (*(Int *) &time)
+  
+  
+ 
+ //************************************************************
+ //* Date Time procedures
+ //************************************************************
+ #ifdef __cplusplus
+ extern "C" {
+ #endif
+ 
+ 
+ void TimSecondsToDateTime(ULong seconds, DateTimePtr dateTimeP)
+ 			SYS_TRAP(sysTrapTimSecondsToDateTime);
+ 
+ ULong TimDateTimeToSeconds(DateTimePtr dateTimeP)
+ 			SYS_TRAP(sysTrapTimDateTimeToSeconds);
+ 
+ void TimAdjust(DateTimePtr dateTimeP, Long adjustment)
+ 			SYS_TRAP(sysTrapTimAdjust);
+ 
+ void TimeToAscii(Byte hours, Byte minutes, TimeFormatType timeFormat, 
+ 				CharPtr pString)
+ 			SYS_TRAP(sysTrapTimeToAscii);
+ 
+ 
+ 
+ UInt DaysInMonth(UInt month, UInt year)
+ 			SYS_TRAP(sysTrapDaysInMonth);
+ 
+ UInt DayOfWeek (UInt month, UInt day, UInt year)
+ 			SYS_TRAP(sysTrapDayOfWeek);
+ 
+ UInt DayOfMonth (UInt month, UInt day, UInt year)
+ 			SYS_TRAP(sysTrapDayOfMonth);
+ 
+ 
+ 
+ // Date routines.
+ void DateSecondsToDate (ULong seconds, DatePtr date)
+ 			SYS_TRAP(sysTrapDateSecondsToDate);
+ 
+ void DateDaysToDate (ULong days, DatePtr date)
+ 			SYS_TRAP(sysTrapDateDaysToDate);
+ 
+ ULong DateToDays (DateType date)
+ 			SYS_TRAP(sysTrapDateToDays);
+ 
+ void DateAdjust (DatePtr dateP, Long adjustment)
+ 			SYS_TRAP(sysTrapDateAdjust);
+ 
+ void DateToAscii(Byte months, Byte days, Word years, 
+ 				DateFormatType dateFormat, CharPtr pString)
+ 			SYS_TRAP(sysTrapDateToAscii);
+ 
+ void DateToDOWDMFormat(Byte months, Byte days,  Word years,
+ 				DateFormatType dateFormat, CharPtr pString)
+ 			SYS_TRAP(sysTrapDateToDOWDMFormat);
+ 
+ 
+ #ifdef __cplusplus 
+ }
+ #endif
+ 
+ 
+ #endif //__DATETIME_H__
diff -r -c -x *.orig -x *.rej -x #* -x *~ -N orig/gcc-2.7.2.2/PalmOS/System/DebugMgr.h gcc-2.7.2.2/PalmOS/System/DebugMgr.h
*** orig/gcc-2.7.2.2/PalmOS/System/DebugMgr.h	Thu Jan  1 01:00:00 1970
--- gcc-2.7.2.2/PalmOS/System/DebugMgr.h	Wed Feb 19 16:49:16 1997
***************
*** 0 ****
--- 1,80 ----
+ /*******************************************************************
+  * 							 Pilot Software
+  *
+  *		 Copyright(c) 1994, Palm Computing Inc., All Rights Reserved
+  *
+  *-------------------------------------------------------------------
+  * FileName:
+  *		DebugMgr.h
+  *
+  * Description:
+  *		Debugging functions
+  *
+  * History:
+  *   	11/03/94  RM - Created by Ron Marianetti
+  *
+  *
+  *******************************************************************/
+ 
+ 
+ #ifndef __DEBUGMGR_H__
+ #define __DEBUGMGR_H__
+ 
+ // Include elementary types
+ #include <Common.h>					// Basic types
+ #include <SysTraps.h>				// Trap Numbers.
+ 
+ 
+ 
+ /************************************************************
+  * Prototypes
+  *************************************************************/
+ #ifdef __cplusplus
+ extern "C" {
+ #endif
+ 
+ Long 			DbgInit(Ptr spaceP, Ptr dispatchTableP[], Boolean openComm);
+ 
+ #ifdef __GNUC__
+ static inline
+ #endif
+ void 			DbgSrcBreak(void)
+ 							ONEWORD_INLINE(m68kTrapInstr+sysDbgTrapNum);
+  
+ void 			DbgSrcMessage(char* debugStr)
+ 							SYS_TRAP(sysTrapDbgSrcMessage);
+ 
+ #if EMULATION_LEVEL == EMULATION_NONE
+ #ifdef __GNUC__
+ static inline
+ #endif
+ 	void 		DbgBreak(void) ONEWORD_INLINE(m68kTrapInstr+sysDbgTrapNum);
+ #else
+ 	void 		DbgBreak(void);
+ #endif
+ 
+ void 			DbgMessage(char* aStr)
+ 							SYS_TRAP(sysTrapDbgMessage);
+ 	
+ CharPtr 		DbgGetMessage(BytePtr bufferP, Long timeout)
+ 							SYS_TRAP(sysTrapDbgGetMessage);
+ 							
+ Err			DbgCommSettings(ULongPtr baudP, ULongPtr flagsP)
+ 							SYS_TRAP(sysTrapDbgCommSettings);
+ 	
+ #ifdef __cplusplus 
+ }
+ #endif
+ 
+ 
+ /************************************************************
+  * Assembly Function Prototypes
+  *************************************************************/
+ #define	_DbgBreak		\
+ 				DC.W	m68kTrapInstr+sysDbgTrapNum
+ 				
+ 
+ 
+ #endif // __DEBUGMGR_H__
+ 
+ 
diff -r -c -x *.orig -x *.rej -x #* -x *~ -N orig/gcc-2.7.2.2/PalmOS/System/DebugPrv.h gcc-2.7.2.2/PalmOS/System/DebugPrv.h
*** orig/gcc-2.7.2.2/PalmOS/System/DebugPrv.h	Thu Jan  1 01:00:00 1970
--- gcc-2.7.2.2/PalmOS/System/DebugPrv.h	Wed Feb 19 16:49:16 1997
***************
*** 0 ****
--- 1,348 ----
+ /*******************************************************************
+  * 							 Pilot Software
+  *
+  *		 Copyright(c) 1994, Palm Computing Inc., All Rights Reserved
+  *
+  *-------------------------------------------------------------------
+  * FileName:
+  *		DebugPrv.h
+  *
+  * Description:
+  *		PrivatŽDebugging functions
+  *
+  * History:
+  *   	8/10/95 RM - Created by Ron Marianetti
+  *
+  *
+  *******************************************************************/
+ 
+ #ifdef	NON_PORTABLE
+ #ifndef __DEBUGPRV_H__
+ #define __DEBUGPRV_H__
+ 
+ 
+ /***********************************************************************
+  * Debugger Constants
+  ***********************************************************************/
+ #define  dbgLoopsPerTick		0x0800
+ #define	dbgStackSize			0x0300			// DOLATER -- resize???
+ 
+ #define	dbgNormalBreakpoints	5
+ #define	dbgTempBPIndex			dbgNormalBreakpoints
+ #define	dbgTotalBreakpoints	(dbgTempBPIndex+1)
+ 
+ #define	dbgFlashCodeSpace		sysInitStack	// where we copy flash code
+ #define	dbgFlashCodeSize		0x200				// size of flash code
+ 
+ #define	dbgTotalTrapBreaks	5					// up to this many trap breaks at a time
+ 
+ 
+ 
+ 
+ /***********************************************************************
+  * Structure of Debugger Breakpoints
+  ***********************************************************************/
+ typedef struct BreakpointType {
+ 	Ptr		addr;									// address of breakpoint
+ 	Boolean	enabled;								// true if enabled
+ 	Boolean	installed;							// for alignment
+ 	} BreakpointType;
+ 
+ 
+ 
+ 
+ 
+ /***********************************************************************
+  * Structure of Debugger Specific System Packet Type Bodies.
+  ***********************************************************************/
+  
+ #define			sysPktMaxNameLen		32		// Max length of a routine name 
+  
+ //--------------------------------------------------------------
+ // sysPktStateCmd 
+ // - get processor state
+ //------------------------------------------------------------------
+ // number of remote code words to send in the 'state response' packet
+ #define sysPktStateRspInstWords	15
+ 
+ 
+ typedef struct SysPktStateCmdType {
+ 	_sysPktBodyCommon;								// Common Body header
+ 	} SysPktStateCmdCmdType;
+ typedef SysPktStateCmdCmdType*	SysPktStateCmdCmdPtr;
+ 
+ 
+ // Packet Body structure for the state command response packet
+ typedef struct SysPktStateRspType {
+ 	_sysPktBodyCommon;								// Common Body header
+ 	Boolean						resetted;			// true if target has just reset
+ 	Word							exceptionId;		// exception which caused the
+ 															// debugger to be entered.
+ 	M68KRegsType				reg;					// current remote registers.
+ 	Word							inst[sysPktStateRspInstWords];
+ 															// instruction buffer for
+ 															// code beginning at PC.
+ 	BreakpointType				bp[dbgTotalBreakpoints];	// current breakpoints
+ 
+ 	void*							startAddr;			// start address of routine
+ 	void*							endAddr;				// end address of routine
+ 	char							name[sysPktMaxNameLen];
+ 															// routine name (0 or more chars,
+ 															// no null), immediately
+ 															// follows the address range.
+ 	Byte							trapTableRev;		// rev of trap table. Used to determine
+ 															//  when host's trap table cache is invalid
+ 	} SysPktStateRspType;
+ typedef SysPktStateRspType*	SysPktStateRspPtr;
+ 
+ //--------------------------------------------------------------------
+ // sysPktGetRtnNameCmd
+ //  - get routine name
+ //--------------------------------------------------------------------
+ // The response packet body will contain start address(4 bytes),
+ // end address(4 bytes), followed by 0 or more bytes of the routine
+ // name (no null byte).
+ typedef struct SysPktRtnNameCmdType {
+ 	_sysPktBodyCommon;								// Common Body header
+ 	void*							address;			// -> address to query on
+ 	} SysPktRtnNameCmdType;
+ typedef SysPktRtnNameCmdType*	SysPktRtnNameCmdPtr;
+ 
+ typedef struct SysPktRtnNameRspType {
+ 	_sysPktBodyCommon;							// Common Body header
+ 	void*							address;			// -> address to query on
+ 	void*							startAddr;		// <- start address of routine
+ 	void*							endAddr;			// <- end address of routine
+ 	char							name[sysPktMaxNameLen];   		// <- routine name, if any immediately
+ 														//    follows the address range.
+ 														//    The balance need not be sent.
+ 	} SysPktRtnNameRspType;
+ typedef SysPktRtnNameRspType*	SysPktRtnNameRspPtr;
+ 
+ 
+ //--------------------------------------------------------------------
+ // sysPktReadRegsCmd
+ // - read registers
+ //--------------------------------------------------------------------
+ // Packet Body structure for the read regs command response packet
+ typedef	struct SysPktReadRegsCmdType {
+ 	_sysPktBodyCommon;								// Common Body header
+ 	} SysPktReadRegsCmdType;
+ typedef SysPktReadRegsCmdType* 	SysPktReadRegsCmdPtr;
+ 
+ typedef	struct SysPktReadRegsRspType {
+ 	_sysPktBodyCommon;								// Common Body header
+ 	//M68KRegsType			reg;						// <- return registers
+ 	} SysPktReadRegsRspType;
+ typedef SysPktReadRegsRspType* 	SysPktReadRegsRspPtr;
+ 
+ 
+ 
+ //--------------------------------------------------------------------
+ // sysPktWriteRegsCmd
+ // - write registers
+ //--------------------------------------------------------------------
+ // Packet Body structure for the write regs command packet
+ typedef	struct SysPktWriteRegsCmdType {
+ 	_sysPktBodyCommon;								// Common Body header
+ 	M68KRegsType		reg;							// -> registers to write
+ 	} SysPktWriteRegsCmdType;
+ typedef SysPktWriteRegsCmdType* 	SysPktWriteRegsCmdPtr;
+ 
+ 
+ // Packet Body structure for the write regs command packet
+ typedef	struct SysPktWriteRegsRspType {
+ 	_sysPktBodyCommon;								// Common Body header
+ 	} SysPktWriteRegsRspType;
+ typedef SysPktWriteRegsRspType* 	SysPktWriteRegsRspPtr;
+ 
+ 
+ //--------------------------------------------------------------------
+ // sysPktContinueCmd
+ // -  continue
+ //--------------------------------------------------------------------
+ // Packet Body structure for the continue command packet
+ typedef struct SysPktContinueCmdType {
+ 	_sysPktBodyCommon;									// Common Body header
+ 	M68KRegsType	 		regs;							// registers
+ 	Boolean					stepSpy;						// set true to do step spy
+ 	DWord						ssAddr;						// step spy address
+ 	DWord						ssCount;						// # of bytes
+ 	DWord						ssCheckSum;					// checksum
+ 	} SysPktContinueCmdType;
+ 
+ typedef SysPktContinueCmdType* SysPktContinueCmdPtr;
+ 
+ 
+ //--------------------------------------------------------------------
+ // sysPktGetBreakPointsCmd
+ //
+ // - Get breakpoints
+ //--------------------------------------------------------------------
+ typedef struct SysPktGetBreakpointsCmdType {
+ 	_sysPktBodyCommon;								// Common Body header
+ 	} SysPktGetBreakpointsCmdType;
+ typedef SysPktGetBreakpointsCmdType*	SysPktGetBreakpointsCmdPtr;
+ 
+ typedef struct SysPktGetBreakpointsRspType {
+ 	_sysPktBodyCommon;								// Common Body header
+ 	//BreakpointType	bp[dbgTotalBreakpoints];
+ 	} SysPktGetBreakpointsRspType;
+ typedef SysPktGetBreakpointsRspType*	SysPktGetBreakpointsRspPtr;
+ 
+ 
+ //--------------------------------------------------------------------
+ // sysPktSetBreakPointsCmd
+ //
+ // - Set breakpoints
+ //--------------------------------------------------------------------
+ typedef struct SysPktSetBreakpointsCmdType {
+ 	_sysPktBodyCommon;								// Common Body header
+ 	//BreakpointType	bp[dbgTotalBreakpoints];
+ 	} SysPktSetBreakpointsCmdType;
+ typedef SysPktSetBreakpointsCmdType*	SysPktSetBreakpointsCmdPtr;
+ 
+ typedef struct SysPktSetBreakpointsRspType {
+ 	_sysPktBodyCommon;								// Common Body header
+ 	} SysPktSetBreakpointsRspType;
+ typedef SysPktSetBreakpointsRspType*	SysPktSetBreakpointsRspPtr;
+ 
+ 
+ 
+ 
+ //--------------------------------------------------------------------
+ // sysPktDbgBreakToggleCmd
+ // - Enable/Disable DbgBreak's command
+ //--------------------------------------------------------------------
+ typedef struct SysPktDbgBreakToggleCmdType {
+ 	_sysPktBodyCommon;								// Common Body header
+ 	} SysPktDbgBreakToggleCmdType;
+ typedef SysPktDbgBreakToggleCmdType*	SysPktDbgBreakToggleCmdPtr;
+ 
+ typedef struct SysPktDbgBreakToggleRspType {
+ 	_sysPktBodyCommon;								// Common Body header
+ 	Boolean		newState;
+ 	} SysPktDbgBreakToggleRspType;
+ typedef SysPktDbgBreakToggleRspType*	SysPktDbgBreakToggleRspPtr;
+ 
+ 
+ //--------------------------------------------------------------------
+ // sysPktFlashCmd
+ // Program Flash command - programs one sector of the FLASH ram
+ // If numBytes is 0, this routine returns info on the flash in:
+ //   manuf - manufacturer code
+ //   device - device code
+ //   width - width of FLASH
+ //   ramSpaceP - buffer in RAM for flash sector
+ //--------------------------------------------------------------------
+ typedef struct SysPktFlashWriteType {
+ 	_sysPktBodyCommon;								// Common Body header
+ 	Word			numBytes;							// -> # of bytes in sector
+ 	DWord			flashBase;							// -> base address of FLASH, or 0 for default
+ 	DWord			srcAddr;								// -> source address of new data
+ 	DWord			dstAddr;								// -> dest address in flash memory
+ 	Byte			manuf;								// <- manufacturer
+ 	Byte			device;								// <- device
+ 	Byte			width;								// <- Flash memory width 
+ 	Byte			filler;
+ 	DWord			ramSpaceP;							// <-  available space in RAM for sector
+ 	} SysPktFlashWriteType;
+ typedef SysPktFlashWriteType* SysPktFlashWritePtr;
+ 
+ 
+ //--------------------------------------------------------------------
+ // sysPktGetTrapBreaksCmd
+ //
+ // - Get Trap Breaks
+ //--------------------------------------------------------------------
+ typedef struct SysPktGetTrapBreaksCmdType {
+ 	_sysPktBodyCommon;								// Common Body header
+ 	} SysPktGetTrapBreaksCmdType;
+ typedef SysPktGetTrapBreaksCmdType*	SysPktGetTrapBreaksCmdPtr;
+ 
+ typedef struct SysPktGetTrapBreaksRspType {
+ 	_sysPktBodyCommon;								// Common Body header
+ 	//Word		trapBP[dbgTotalTrapBreaks];
+ 	} SysPktGetTrapBreaksRspType;
+ typedef SysPktGetTrapBreaksRspType*	SysPktGetTrapBreaksRspPtr;
+ 
+ 
+ //--------------------------------------------------------------------
+ // sysPktSetTrapBreaksCmd
+ //
+ // - Set Trap Breaks
+ //--------------------------------------------------------------------
+ typedef struct SysPktSetTrapBreaksCmdType {
+ 	_sysPktBodyCommon;								// Common Body header
+ 	//Word		trapBP[dbgTotalTrapBreaks];
+ 	} SysPktSetTrapBreaksCmdType;
+ typedef SysPktSetTrapBreaksCmdType*	SysPktSetTrapBreaksCmdPtr;
+ 
+ typedef struct SysPktSetTrapBreaksRspType {
+ 	_sysPktBodyCommon;								// Common Body header
+ 	} SysPktSetTrapBreaksRspType;
+ typedef SysPktSetTrapBreaksRspType*	SysPktSetTrapBreaksRspPtr;
+ 
+ 
+ 
+ 
+ 
+ // The following indicates how much space in debugger globals we've reserved for
+ // the SerialLibrary globals for the Debugger.  Reserve 8 extra bytes for
+ // patching.
+ #define	dbgSerRsvGlobalsSize			56
+ 
+ 
+ 
+ 
+ /***********************************************************************
+  * Stucture of Debugger Globals
+  ***********************************************************************/
+ struct DbgGlobalsType {
+ 	// Saved registers
+ 	M68KRegsType	reg;
+ 	
+ 	// Breakpoints and saved opcodes behind each one
+ 	Boolean			romBP;
+ 	Boolean			stepOverBP;							// true if single-stepping over a BP
+ 	BreakpointType	bp[dbgTotalBreakpoints];
+ 	Word				bpOpcode[dbgTotalBreakpoints];
+ 	
+ 	// Current trap breaks
+ 	Word				trapBreak[dbgTotalTrapBreaks];
+ 	DWord				oldDispatcher;						// saved trap dispatcher
+ 	Boolean			breakingOnATrap;					// set by debugger trap dispatcher
+ 	
+ 	// Mode settings
+ 	Boolean			ignoreDbgBreaks;					// if true, ignore DbgBreak's
+ 	Boolean			commOpened;							// if true, comm library and socket have been
+ 																//  opened.
+ 	
+ 	// Step spy support
+ 	Boolean			stepSpy;								// true if step spying.
+ 	DWord				ssAddr;								// address to step spy on 
+ 	DWord				ssValue;								// saved value
+ 	
+ 	// Exception type
+ 	Word				excType;								// why we entered debugger
+ 	Byte				reEntered;							// true if we re-entered
+ 	Byte				firstEntrance;						// true first time we enter debugger
+ 	
+ 	// Debugger Serial Library globals
+ 	Byte				serGlobals[dbgSerRsvGlobalsSize];	// Debugger Serial globals
+ 	
+ 	// Debugger Stack
+ 	Byte				stack[dbgStackSize];				// Debugger stack
+ 	Word				stackEnd;							// End of stack
+ 	
+ 	};
+ 	
+ typedef struct DbgGlobalsType DbgGlobalsType;
+ 	
+ typedef DbgGlobalsType*		DbgGlobalsPtr;
+ 
+ 
+ 
+ #endif // __DEBUGMGR_H__
+ #endif // NON_PORTABLE
+ 
diff -r -c -x *.orig -x *.rej -x #* -x *~ -N orig/gcc-2.7.2.2/PalmOS/System/EmuStubs.h gcc-2.7.2.2/PalmOS/System/EmuStubs.h
*** orig/gcc-2.7.2.2/PalmOS/System/EmuStubs.h	Thu Jan  1 01:00:00 1970
--- gcc-2.7.2.2/PalmOS/System/EmuStubs.h	Wed Feb 19 16:49:16 1997
***************
*** 0 ****
--- 1,122 ----
+ /*******************************************************************
+  * 							 Pilot Software
+  *
+  *		 Copyright(c) 1994, Palm Computing Inc., All Rights Reserved
+  *
+  *-------------------------------------------------------------------
+  * FileName:
+  *		EmuStubs.h
+  *
+  * Description:
+  *		Stub routines used only when emulating.
+  *		
+  *		Note: All of these routines must be declared using generic
+  *		C types so that this header file can be included in both
+  *		Pilot source code and Mac or PC source code. 
+  *
+  *		The module that contains these routines "MacStubs.c" or
+  *		"PCStubs.c" is the glue between the Pilot routines and the OS and
+  *		does not include any Pilot headers.
+  *
+  * History:
+  *   	11/03/94  RM - Created by Ron Marianetti
+  *
+  *
+  *******************************************************************/
+ 
+ 
+ #ifndef __EMUSTUBS_H__
+ #define __EMUSTUBS_H__
+ 
+ 
+ /************************************************************
+  * Prototypes
+  *************************************************************/
+ #ifdef __cplusplus
+ extern "C" {
+ #endif
+ 
+ // Screen Driver Stubs
+ void 				StubDrawNotify(void* srcWinP, short scrRowBytes, 
+ 						short fromX, short fromY, short width, short height);
+ 
+ // Console stubs
+ int 				StubConPutS(char* cstring);
+ int 				StubConGetS(char* cstring);
+ 
+ // Debugger Stubs
+ void 				StubDbgSrcBreak(void);
+ void 				StubDbgSrcMessage(char* debugStr);
+ void 				StubDbgBreak(void);
+ void 				StubDbgMessage(char* aStr);
+ 
+ // Time Manager Stubs
+ unsigned long	StubTimGetTicks(void);
+ unsigned long	StubTimGetSeconds(void);
+ void				StubTimSetSeconds(unsigned long seconds);
+ 
+ 
+ // Event Manager Stubs
+ void				StubProcessMacEvents(long timeout);
+ void				StubEnqueuePenPosition(void);
+ void				StubFlushEvents (void);
+ 
+ 
+ // Emulator Stubs
+ Boolean			StubNilEventPending();
+ 	
+ 
+ // Error Manager stubs
+ void 				StubErrDisplayFileLineMsg(char* filename, unsigned int lineNo, char* msg);
+ 	
+ 
+ // Sound Manager stubs
+ #define	stubSndErrBadParam			-1
+ #define	stubSndErrBadChannel			-2
+ 
+ #define	stubSndCmdFreqDurationAmp	1
+ 
+ short 			StubSndCommand(void* channelP, unsigned short defAmp,
+ 							unsigned short cmd, unsigned long param1,
+ 							unsigned short param2, unsigned short param3,
+ 							char noWait);
+ 							
+ 
+ // Alarm Manager stubs
+ short				StubAlmSetAlarm(unsigned long alarmType,
+ 						long (*callback)(), unsigned long alarmTime);
+ unsigned long	StubAlmGetAlarm(unsigned long alarmType);
+ void				StubAlmDisplayAlarm(void);
+ 
+ 
+ // Emulator Utility Functions
+ void				StubEventTrace(void *eventP);			// Pilot Emulator Event Trace call
+ 
+ 
+ // Resource Utility Functions
+ void**			StubGet1Resource(unsigned long resType, int resID);	
+ 
+ 
+ // Utility functions
+ unsigned int	StubRandom(void);
+ 	
+ 
+ // Key Manager stubs
+ unsigned long StubKeyCurrentState(void);
+ 
+ #define stubKeyBitPower			0x0001
+ #define stubKeyBitPageUp		0x0002
+ #define stubKeyBitPageDown		0x0004
+ #define stubKeyBitHard1			0x0008	
+ #define stubKeyBitHard2			0x0010
+ #define stubKeyBitHard3			0x0020
+ #define stubKeyBitHard4			0x0040
+ 
+ #ifdef __cplusplus 
+ }
+ #endif
+ 
+ 
+ #endif 	// __EMUSTUBS_H__
+ 
+ 
diff -r -c -x *.orig -x *.rej -x #* -x *~ -N orig/gcc-2.7.2.2/PalmOS/System/ErrorMgr.h gcc-2.7.2.2/PalmOS/System/ErrorMgr.h
*** orig/gcc-2.7.2.2/PalmOS/System/ErrorMgr.h	Thu Jan  1 01:00:00 1970
--- gcc-2.7.2.2/PalmOS/System/ErrorMgr.h	Wed Feb 19 16:49:16 1997
***************
*** 0 ****
--- 1,261 ----
+ /*******************************************************************
+  * 							 Pilot Software
+  *
+  *		 Copyright(c) 1994, Palm Computing Inc., All Rights Reserved
+  *
+  *-------------------------------------------------------------------
+  * FileName:
+  *		ErrorMgr.h
+  *
+  * Description:
+  *		Include file for Error Management 
+  *
+  * History:
+  *   	10/25/94  RM - Created by Ron Marianetti
+  *
+  *-----------------------------------------------------------------------
+  *	Exception Handling
+  *
+  *		This unit implements an exception handling mechanism that is similar
+  *		to "real" C++ Exceptions. Our Exceptions are untyped, and there
+  *		must be one and only one Catch block for each Try block.
+  *
+  *	Try/Catch Syntax:
+  *
+  *		ErrTry {
+  *			// Do something which may fail.
+  *			// Call ErrThrow() to signal failure and force jump
+  *			// to the following Catch block.
+  *		}
+  *
+  *		ErrCatch(inErr) {
+  *			// Recover or cleanup after a failure in the above Try block.
+  *			// "inErr" is an ExceptionCode identifying the reason
+  *			// for the failure.
+  *			
+  *			// You may call Throw() if you want to jump out to
+  *			// the next Catch block.
+  *
+  *			// The code in this Catch block does not execute if
+  *			// the above Try block completes without a Throw.
+  *
+  *		} ErrEndCatch
+  *
+  *		You must structure your code exactly as above. You can't have a
+  *		ErrTry { } without a ErrCatch { } ErrEndCatch, or vice versa.
+  *
+  *
+  *	ErrThrow
+  *
+  *		To signal failure, call ErrThrow() from within a Try block. The
+  *		Throw can occur anywhere in the Try block, even within functions
+  *		called from the Try block. A ErrThrow() will jump execution to the
+  *		start of the nearest Catch block, even across function calls.
+  *		Destructors for stack-based objects which go out of scope as
+  *		a result of the ErrThrow() are called.
+  *
+  *		You can call ErrThrow() from within a Catch block to "rethrow"
+  *		the exception to the next nearest Catch block.
+  *
+  *
+  *	Exception Codes
+  *
+  *		An ExceptionCode is a 32-bit number. You will normally use
+  *		Pilot error codes, which are 16-bit numbers. This allows
+  *		plently of room for defining codes for your own kinds of errors.
+  *
+  *
+  *	Limitations
+  *
+  *		Try/Catch and Throw are based on setjmp/longjmp. At the
+  *		beginning of a Try block, setjmp saves the machine registers.
+  *		Throw calls longjmp, which restores the registers and jumps
+  *		to the beginning of the Catch block. Therefore, any changes
+  *		in the Try block to variables stored in registers will not
+  *		be retained when entering the Catch block. 
+  *
+  *		The solution is to declare variables that you want to use
+  *		in both the Try and Catch blocks as "volatile". For example:
+  *
+  *		volatile long	x = 1;		// Declare volatile local variable
+  *		ErrTry {
+  *			x = 100;						// Set local variable in Try
+  *			ErrThrow(-1);
+  *		}
+  *
+  *		ErrCatch(inErr) {
+  *			if (x > 1) {				// Use local variable in Catch 	
+  *				SysBeep(1);
+  *			}
+  *		} ErrEndCatch
+  *
+  *
+  *******************************************************************/
+ 
+ #ifndef __ERRORMGR_H__
+ #define __ERRORMGR_H__
+ 
+ 
+ // Include elementary types
+ #include <Common.h>					// Basic types
+ #include <SysTraps.h>				// Trap Numbers.
+ 
+ 
+ 
+ #if EMULATION_LEVEL != EMULATION_NONE
+ #include <setjmp.h>
+ #endif
+ 
+ /************************************************************
+  * Macros for Showing Errors
+  *
+  ********************************************************************/
+ 
+ 
+ //------------------------------------------------------------
+ // Full Error Checking
+ //------------------------------------------------------------
+ #if ERROR_CHECK_LEVEL == ERROR_CHECK_FULL
+ 
+ #define ErrFatalDisplayIf(condition, msg) \
+ 	if (condition) ErrDisplayFileLineMsg(__FILE__, __LINE__, msg)
+ 
+ #define ErrNonFatalDisplayIf(condition, msg) \
+ 	if (condition) ErrDisplayFileLineMsg(__FILE__, __LINE__, msg)
+ 
+ #define ErrDisplay(msg) \
+ 		ErrDisplayFileLineMsg(__FILE__, __LINE__, msg)
+ 
+ 
+ 
+ 
+ //------------------------------------------------------------
+ // Fatal  Error Checking Only
+ //------------------------------------------------------------
+ #elif ERROR_CHECK_LEVEL == ERROR_CHECK_PARTIAL
+ 
+ #define ErrFatalDisplayIf(condition, msg) \
+ 	if (condition) ErrDisplayFileLineMsg(__FILE__, __LINE__, msg)
+ 
+ #define ErrNonFatalDisplayIf(condition, msg) 
+ 
+ #define ErrDisplay(msg) \
+ 		ErrDisplayFileLineMsg(__FILE__, __LINE__, msg)
+ 
+ 
+ 
+ //------------------------------------------------------------
+ // No  Error Checking  
+ //------------------------------------------------------------
+ #elif ERROR_CHECK_LEVEL == ERROR_CHECK_NONE
+ 
+ #define ErrFatalDisplayIf(condition, msg) 
+ 
+ #define ErrNonFatalDisplayIf(condition, msg) 
+ 
+ #define ErrDisplay(msg)  
+ 
+ 
+ //------------------------------------------------------------
+ // Not Defined...
+ //------------------------------------------------------------
+ #else
+ #error	ERROR: the compiler define 'ERROR_CHECK_LEVEL' must be defined!
+ 
+ #endif // ERROR_CHECK_LEVEL
+ 
+ 
+ 
+ 				
+ /********************************************************************
+  * Try / Catch / Throw support
+  *
+  * ---------------------------------------------------------------------
+  * Exception Handler structure
+  *  
+  *	An ErrExceptionType object is created for each ErrTry & ErrCatch block.
+  *	At any point in the program, there is a linked list of
+  *	ErrExceptionType objects. GErrFirstException points to the
+  *	most recently entered block. A ErrExceptionType blocks stores
+  *	information about the state of the machine (register values)
+  *	at the start of the Try block
+  ********************************************************************/
+ typedef long* ErrJumpBuf[12];			// D3-D7,PC,A2-A7
+ 	
+ #if EMULATION_LEVEL != EMULATION_NONE
+ 	#define	ErrJumpBuf	jmp_buf
+ #endif
+ 	
+ // Structure used to store Try state.
+ typedef struct ErrExceptionType {
+ 	struct ErrExceptionType*	nextP;	// next exception type
+ 	ErrJumpBuf						state;	// setjmp/longjmp storage
+ 	Long								err;		// Error code
+ 	} ErrExceptionType;
+ typedef ErrExceptionType* ErrExceptionPtr;
+ 
+ 
+ // Try & Catch macros
+ #define	ErrTry																\
+ 	{																				\
+ 		ErrExceptionType	_TryObject;										\
+ 		_TryObject.err = 0;													\
+ 		_TryObject.nextP = (ErrExceptionPtr)*ErrExceptionList();	\
+ 		*ErrExceptionList() = (Ptr)&_TryObject;						\
+ 		if (ErrSetJump(_TryObject.state) == 0) {
+ 		
+ 
+ #define	ErrCatch(theErr)												\
+ 			*ErrExceptionList() = (Ptr)_TryObject.nextP;			\
+ 			} 																	\
+ 		else {																\
+ 			Long	theErr = _TryObject.err;							\
+ 			*ErrExceptionList() = (Ptr)_TryObject.nextP;
+ 			
+ 			
+ #define	ErrEndCatch														\
+ 			}																	\
+ 	}
+ 
+ 
+ 
+ /********************************************************************
+  * Error Manager Routines
+  ********************************************************************/
+ #ifdef __cplusplus
+ extern "C" {
+ #endif
+ 
+ #if EMULATION_LEVEL != EMULATION_NONE
+ 	#define	ErrSetJump(buf)			setjmp(buf)
+ 	#define	ErrLongJump(buf,res) 	longjmp(buf,res)
+ 
+ #else
+ 	Int	ErrSetJump(ErrJumpBuf buf)
+ 								SYS_TRAP(sysTrapErrSetJump);
+ 								
+ 	void	ErrLongJump(ErrJumpBuf buf, Int result)
+ 								SYS_TRAP(sysTrapErrLongJump);
+ #endif
+ 						
+ Ptr*	ErrExceptionList(void)
+ 							SYS_TRAP(sysTrapErrExceptionList);	
+ 							
+ void  ErrThrow(Long err) 
+ 							SYS_TRAP(sysTrapErrThrow);
+ 
+ void	ErrDisplayFileLineMsg(CharPtr filename, UInt lineno, CharPtr msg)
+ 							SYS_TRAP(sysTrapErrDisplayFileLineMsg);
+ 
+ #ifdef __cplusplus 
+ }
+ #endif
+ 
+ 
+ 
+ 
+ #endif // __ERRORMGR_H__
+ 
+ 
+ 
+ 
diff -r -c -x *.orig -x *.rej -x #* -x *~ -N orig/gcc-2.7.2.2/PalmOS/System/FatalAlert.h gcc-2.7.2.2/PalmOS/System/FatalAlert.h
*** orig/gcc-2.7.2.2/PalmOS/System/FatalAlert.h	Thu Jan  1 01:00:00 1970
--- gcc-2.7.2.2/PalmOS/System/FatalAlert.h	Wed Feb 19 16:49:16 1997
***************
*** 0 ****
--- 1,26 ----
+ /***********************************************************************
+  *
+  *      Copyright (c) Palm Computing 1994 -- All Rights Reserved
+  *
+  * PROJECT:  Pilot
+  * FILE:     window.h
+  * AUTHOR:       Art Lamb: September 12, 1994
+  *
+  * DECLARER: UI
+  *
+  * DESCRIPTION:
+  *        This file defines window structures and routines.
+  *
+  **********************************************************************/
+ #ifndef __FATAL_ALERT_H__
+ #define __FATAL_ALERT_H__
+ 
+ // Value retunred by FatalAlert
+ #define fatalContinue	0
+ #define fatalReset		1
+ 
+ UInt SysFatalAlert (CharPtr msg)
+ 		SYS_TRAP(sysTrapSysFatalAlert);
+ 
+ #endif 
+ 
diff -r -c -x *.orig -x *.rej -x #* -x *~ -N orig/gcc-2.7.2.2/PalmOS/System/FeatureMgr.h gcc-2.7.2.2/PalmOS/System/FeatureMgr.h
*** orig/gcc-2.7.2.2/PalmOS/System/FeatureMgr.h	Thu Jan  1 01:00:00 1970
--- gcc-2.7.2.2/PalmOS/System/FeatureMgr.h	Wed Feb 19 16:49:16 1997
***************
*** 0 ****
--- 1,74 ----
+ /*******************************************************************
+  * 							 Pilot Software
+  *
+  *		 Copyright(c) 1994, Palm Computing Inc., All Rights Reserved
+  *
+  *-------------------------------------------------------------------
+  * FileName:
+  *		FeatureMgr.h
+  *
+  * Description:
+  *		Header for the Feature Manager
+  *
+  * History:
+  *   	11/14/94  RM - Created by Ron Marianetti
+  *
+  *******************************************************************/
+ 
+ #ifndef __FEATUREMGR_H__
+ #define __FEATUREMGR_H__
+ 
+ 
+ #include <Common.h>
+ 
+ 
+ 
+ /************************************************************
+  * Feature manager error codes
+  * the constant ftrErrorClass is defined in SystemMgr.h
+  *************************************************************/
+ #define	ftrErrInvalidParam				(ftrErrorClass | 1)
+ #define	ftrErrNoSuchFeature				(ftrErrorClass | 2)
+ #define	ftrErrAlreadyExists				(ftrErrorClass | 3)
+ #define	ftrErrROMBased						(ftrErrorClass | 4)
+ #define	ftrErrInternalErr					(ftrErrorClass | 5)
+ 
+ 
+ /************************************************************
+  * Feature Manager procedures
+  *************************************************************/
+ #ifdef __cplusplus
+ extern "C" {
+ #endif
+ 
+ 
+ // Init the feature Manager
+ Err		FtrInit(void)
+ 							SYS_TRAP(sysTrapFtrInit);
+ 
+ 
+ // Get a feature
+ Err		FtrGet(DWord creator, UInt featureNum, DWordPtr valueP)
+ 							SYS_TRAP(sysTrapFtrGet);
+ 
+ // Set/Create a feature.
+ Err		FtrSet(DWord creator, UInt featureNum, DWord newValue)
+ 							SYS_TRAP(sysTrapFtrSet);
+ 
+ // Unregister a feature
+ Err		FtrUnregister(DWord creator, UInt featureNum)
+ 							SYS_TRAP(sysTrapFtrUnregister);
+ 
+ // Get a feature by index
+ Err		FtrGetByIndex(UInt index, Boolean romTable, 
+ 					DWordPtr creatorP, UIntPtr numP, DWordPtr valueP)
+ 							SYS_TRAP(sysTrapFtrGetByIndex);
+ 
+ 
+ 
+ #ifdef __cplusplus
+ }
+ #endif
+ 
+ #endif // __FEATUREMGR_H__
+ 
diff -r -c -x *.orig -x *.rej -x #* -x *~ -N orig/gcc-2.7.2.2/PalmOS/System/FeaturePrv.h gcc-2.7.2.2/PalmOS/System/FeaturePrv.h
*** orig/gcc-2.7.2.2/PalmOS/System/FeaturePrv.h	Thu Jan  1 01:00:00 1970
--- gcc-2.7.2.2/PalmOS/System/FeaturePrv.h	Wed Feb 19 16:49:16 1997
***************
*** 0 ****
--- 1,77 ----
+ /*******************************************************************
+  * 							 Pilot Software
+  *
+  *		 Copyright(c) 1994, Palm Computing Inc., All Rights Reserved
+  *
+  *-------------------------------------------------------------------
+  * FileName:
+  *		FeaturePrv.h
+  *
+  * Description:
+  *		Private Header for the Feature Manager
+  *
+  * History:
+  *   	8/9/95  RM - Created by Ron Marianetti
+  *
+  *******************************************************************/
+ 
+ #ifdef NON_PORTABLE
+ #ifndef __FEATUREPRV_H__
+ #define __FEATUREPRV_H__
+ 
+ 
+ 
+ 
+ /************************************************************
+  * Structure of a Feature Table
+  *************************************************************/
+ typedef struct FtrFeatureType {
+ 	UInt		num;										// feature number
+ 	DWord		value;									// feature value
+ 	} FtrFeatureType;
+ typedef FtrFeatureType* FtrFeaturePtr;
+ 
+ typedef struct FtrCreatorType {
+ 	DWord				creator;							// feature creator
+ 	UInt				numEntries;						// # of entries
+ 	FtrFeatureType	feature[1];						// variable size array of Features
+ 	} FtrCreatorType;
+ typedef FtrCreatorType*	FtrCreatorPtr;
+ 
+ typedef struct FtrTableType {
+ 	UInt				numEntries;						// # of entries
+ 	FtrCreatorType	creator[1];						// var. size array of Creators
+ 	} FtrTableType;
+ typedef FtrTableType*	FtrTablePtr;
+ typedef FtrTablePtr*		FtrTableHand;
+ 
+ 
+ /************************************************************
+  * Structure of a Feature Manager Globals
+  *************************************************************/
+ typedef struct FtrGlobalsType {
+ 	FtrTableHand		romTableH;					// ROM table of features
+ 	FtrTableHand		ramTableH;					// RAM table of features
+ 	} FtrGlobalsType;
+ typedef	FtrGlobalsType*	FtrGlobalsPtr;
+ 
+ 
+ 
+ /************************************************************
+  *	Private structures
+  *************************************************************/
+ // This structure created for temporary use within calls
+ typedef struct FtrCacheType {
+ 	FtrTableHand		romTableH;					// ROM table of features
+ 	FtrTableHand		ramTableH;					// RAM table of features
+ 	FtrTablePtr			romTableP;
+ 	FtrTablePtr			ramTableP;
+ 	} FtrCacheType;
+ typedef FtrCacheType*	FtrCachePtr;
+ 
+ 
+ 
+ 
+ 
+ #endif // __FEATUREPRV_H__
+ #endif // NON_PORTABLE
diff -r -c -x *.orig -x *.rej -x #* -x *~ -N orig/gcc-2.7.2.2/PalmOS/System/FloatMgr.h gcc-2.7.2.2/PalmOS/System/FloatMgr.h
*** orig/gcc-2.7.2.2/PalmOS/System/FloatMgr.h	Thu Jan  1 01:00:00 1970
--- gcc-2.7.2.2/PalmOS/System/FloatMgr.h	Wed Feb 19 16:49:16 1997
***************
*** 0 ****
--- 1 ----
+ /******************************************************************* * 							 Pilot Software * *		 Copyright(c) 1994, Palm Computing Inc., All Rights Reserved * *-------------------------------------------------------------------   * FileName: *		FloatMgr.h * * Description: *		Floating point routines * * History: *   	3/9/95 - Created by Ron Marianetti * *******************************************************************/  #ifndef __FLOATMGR_H__#define __FLOATMGR_H__#include <Common.h>/************************************************************************ * Constants ***********************************************************************/#define	fMaxLong	((Long)0x7FFFFFFF);#define	fMinLong	((Long)0x80000000);/************************************************************************ * Floating point type * An exponent of kExpInf represents infinity ***********************************************************************/typedef struct {		DWord			man;		// unsigned 32 bit	SWord			exp;		// signed 16 bit	SByte			sign;		// +/- 1		} FloatType;#define	kExpInf		16000		/******************************************************************* * Floating pointer Library  Errors * The constant fplErrorClass is defined in SystemMgr.h *******************************************************************/#define	fplErrOutOfRange			(fplErrorClass | 1)	/************************************************************ * Floating point manager procedures *************************************************************/#ifdef __cplusplusextern "C" {#endifErr			FplInit(void)					SYS_TRAP(sysTrapFplInit);					void			FplFree(void)					SYS_TRAP(sysTrapFplFree);Err 			FplFToA(FloatType a, char* s)					SYS_TRAP(sysTrapFplFToA);					FloatType 	FplAToF(char* s)					SYS_TRAP(sysTrapFplAToF);					Err 			FplBase10Info(FloatType a, ULong* mantissaP, Int* exponentP, 					Int* signP)					SYS_TRAP(sysTrapFplBase10Info);FloatType 	FplLongToFloat(Long x)					SYS_TRAP(sysTrapFplLongToFloat);					Long 			FplFloatToLong(FloatType f)					SYS_TRAP(sysTrapFplFloatToLong);					ULong 		FplFloatToULong(FloatType f)					SYS_TRAP(sysTrapFplFloatToULong);					FloatType 	FplMul(FloatType a, FloatType b)					SYS_TRAP(sysTrapFplMul);					FloatType 	FplAdd(FloatType a, FloatType b)					SYS_TRAP(sysTrapFplAdd);					FloatType 	FplSub(FloatType a, FloatType b)					SYS_TRAP(sysTrapFplSub);					FloatType	FplDiv(FloatType dividend, FloatType divisor)					SYS_TRAP(sysTrapFplDiv);					#ifdef __cplusplus}#endif#endif //__FLOATMGR_H__
\ No newline at end of file
diff -r -c -x *.orig -x *.rej -x #* -x *~ -N orig/gcc-2.7.2.2/PalmOS/System/FloatPrv.h gcc-2.7.2.2/PalmOS/System/FloatPrv.h
*** orig/gcc-2.7.2.2/PalmOS/System/FloatPrv.h	Thu Jan  1 01:00:00 1970
--- gcc-2.7.2.2/PalmOS/System/FloatPrv.h	Wed Feb 19 16:49:17 1997
***************
*** 0 ****
--- 1,36 ----
+ /*******************************************************************
+  * 							 Pilot Software
+  *
+  *		 Copyright(c) 1994, Palm Computing Inc., All Rights Reserved
+  *
+  *-------------------------------------------------------------------  
+  * FileName:
+  *		FloatPrv.h
+  *
+  * Description:
+  *		Private Floating point header
+  *
+  * History:
+  *   	3/9/95 - Created by Ron Marianetti
+  *
+  *******************************************************************/  
+ 
+ #ifdef 	NON_PORTABLE
+ #ifndef __FLOATPRV_H__
+ #define __FLOATPRV_H__
+ 
+ 
+ /************************************************************************
+  * Structure of Floating point Library globals
+  ***********************************************************************/
+ typedef struct {
+ 	FloatType	tenPowers[200];				// 10^-99 to 10^99
+ 	} FplGlobalsType;
+ typedef FplGlobalsType*	FplGlobalsPtr;
+  
+ 	
+ 
+ 
+ #endif //__FLOATPRV_H__
+ #endif // NON_PORTABLE
+ 
diff -r -c -x *.orig -x *.rej -x #* -x *~ -N orig/gcc-2.7.2.2/PalmOS/System/Globals.h gcc-2.7.2.2/PalmOS/System/Globals.h
*** orig/gcc-2.7.2.2/PalmOS/System/Globals.h	Thu Jan  1 01:00:00 1970
--- gcc-2.7.2.2/PalmOS/System/Globals.h	Wed Feb 19 16:49:17 1997
***************
*** 0 ****
--- 1,286 ----
+ /*******************************************************************
+  * 							 Pilot Software
+  *
+  *		 Copyright(c) 1994, Palm Computing Inc., All Rights Reserved
+  *
+  *-------------------------------------------------------------------
+  * FileName:
+  *		globals.h
+  *
+  * Description:
+  *		Structure definition of Pilot globals
+  *
+  * History:
+  *   	10/26/94  RM - Created by Ron Marianetti
+  *		4/13/95		VMK		Added Sound Manager globals
+  *
+  *******************************************************************/
+ 
+ #ifdef	NON_PORTABLE									// So app's don't mistakenly include this
+ 
+ #ifndef 	__GLOBALS_H__
+ #define	__GLOBALS_H__
+ 
+ #include <M68KHwr.h>
+ 
+ // The following indicates how much space in low memory we've reserved for
+ //  the UI globals. The UI initialization code makes sure that we don't
+ //  overrun this space by comparing the size of the structure UIGlobalsType
+ //  with this constant. 
+ #define	sysUIRsvGlobalsSize			0xA0
+ 
+ 
+ 
+ /************************************************************
+  * Structure of Fixed System Globals
+  *************************************************************/
+ typedef struct FixedGlobalsType {
+ 
+ 	// Memory Manager Globals
+ 	Byte						memCardSlots;							// number of memory card slots
+ 	Byte						dbgWasEntered;							// set true the first time debugger is entered
+ 	Ptr						memCardInfoP;							// pointer to array of CardInfoTypes stored
+ 	DWord						memSemaphoreID;						// Memory Manager semaphore
+ 	Word						memDebugMode;							// Current debug mode of Memory Manager
+ 
+ 	// Data Manager Globals
+ 	Ptr						dmOpenList;								// Linked list of open databases (DmOpenInfoPtr)
+ 	
+ 	// Debugger/System Shared globals
+ 	Byte						dbgInDebugger;							// true if in debugger
+ 	Byte						dbgTracing;								// tracing in debugger
+ 	Ptr						dbgGlobalsP;							// pointer to dbgGlobals
+ 	Ptr						dbgSerGlobalsP;						// pointer to Debugger Serial globals
+ 	
+ 	
+ 	// System Manager Globals
+ 	Ptr						sysAppInfoP;							// pointer to SysAppInfoType for system
+ 	Ptr						sysKernelDataP;						// pointer to Kernel data
+ 	Ptr*						sysDispatchTableP;					// pointer to dispatch table
+ 	DWord						sysOwnerIDsInUse;						// 1 bit for each owner ID in use
+ 	Ptr						sysAMXAppInfoP;						// SysAppInfoType for AMX app.
+ 	DWord						sysClockFreq;							// processor clock frequency
+ 	DWordPtr					sysHardKeyCreators;					// ptr to array of App Creator types
+ 
+ 	SWord						sysBatteryCheckTimer;				// # of ticks left before we check battery again
+ 	Byte						sysBatteryMinThreshold;				// System will shut down if battery falls below this
+ 	Byte						hwrBatteryLevel;						// current battery level
+ 	SWord						sysNextBatteryAlertTimer;			// # of ticks till next battery warning
+ 	Byte						sysBatteryWarnThreshold;			// If battery below this level, post low battery keyboard event
+ 
+ 	Byte						sysDispatchTableRev;					// incremented every time a trap is patched. Used
+ 																			//  by host debugger to invalidate it's cache.
+ 	Word						sysDispatchTableSize;				// # of entries in dispatch table
+ 	Ptr						sysLibTableP;							// (SysLibTblEntryPtr) pointer to Library entries
+ 	Word						sysLibTableEntries;					// size of library table
+ 	Ptr						sysConsoleStackChunkP;				// pointer to console task stack chunk
+ 	Ptr						sysUIShellAppInfoP;					// AppInfoPtr for UIAppShell
+ 	
+ 	Long						sysTimerID;								// TimerID of timer used for periodic system stuff
+ 	ULong						sysAutoOffEvtTicks;					// Ticks of last event - used to support auto-off
+ 	Word						sysAutoOffSeconds;					// Auto-sleep timeout in seconds.
+ 	
+ 	Long						sysRandomSeed;							// Random # seed 
+ 	
+ 	
+ 	
+ 	// Other Manager's globals
+ 	Ptr						slkGlobalsP;							// pointer to serial link globals
+ 	Ptr						serGlobalsP;							// pointer to serial manager globals
+ 	Ptr						scrGlobalsP;							// pointer to screen driver globals
+ 	Ptr						fplGlobalsP;							// pointer to Floating Point Library globals
+ 	Ptr						penGlobalsP;							// Pen manager globals ptr
+ 	Ptr						sysEvtMgrGlobalsP;					// System Event Manager Globals
+ 	Ptr						sndGlobalsP;							// Sound Manager globals
+ 	Ptr						timGlobalsP;							// Time Manager globals
+ 	Ptr						almGlobalsP;							// Alarm Manager globals
+ 	Ptr						ftrGlobalsP;							// pointer to feature manager globals																		
+ 	Ptr						grfGlobalsP;							// pointer to Graffiti globals
+ 	Ptr						keyGlobalsP;							// Key manager globals
+ 	
+ 	// UI Globals
+ 	Byte						uiGlobals[sysUIRsvGlobalsSize];	// Basic UI Globals	
+ 	Ptr						uiExtensionsP;							// for future use...																	 
+ 
+ 
+ 	// Globals used by UIAppShell in order to manage the launching of UI Apps. 
+ 	Ptr						curUIAppInfoP;							// SysAppInfoPtr of current UI App
+ 	DWord						nextUIAppDBID;							// Database LocalID of next UI App to launch 
+ 	Word						nextUIAppCmd;							// Cmd for next UI App
+ 	Ptr						nextUIAppCmdPBP;						// Cmd ParamBlock Ptr for next UI App
+ 	Byte						nextUIAppCardNo;						// Card number of next UI App to launch
+ 	
+ 	
+ 	// Hardware Manager Globals
+ 	SByte						hwrDataWELevel;						// if > 0, Data area is write enabled
+ 	Word						hwrWakeUp;								// Bit mask of which peripherals need to be 
+ 																			//  enabled when system wakes
+ 	Byte						hwrCPUDutyCycle;						// Desired Duty cycle of CPU in 31ths.
+ 	Byte						hwrPenDown;								// last state of pen-down
+ 	DWord						hwrCurTicks;							// Current hardware tickCount - 
+ 																			//  maintained separately from AMX ticks for performance reasons.
+ 	DWord						hwrTotalRAMSize;						// total RAM Size, used by HwrMemWritable
+ 	DWord						hwrDozeSubTicks;						// # of subTicks we've dozed for since reset
+ 																			// a sub-tick is 1/4096 seconds.
+ 	
+ 	// Pad server
+ 	Ptr						padGlobalsP;							// PAD Server globals
+ 
+ 	// New System globals
+ 	Byte						sysResetFlags;							// Reset flags sysResetFlagXXXX
+ 	Byte						sysBatteryKind;						// SysBatteryKind enumerated type
+ 
+ 	// New Memory Manager global for recording minimum heap free - used for debugging only
+ 	DWord						memMinDynHeapFree;					// Minimum free space in dynamic heap
+ 	
+ 	
+ 	// System Preferences flags
+ 	Word						sysPrefFlags;							// System Pref flags: sysPrefFlagXXXX
+ 	
+ 	
+ 	// This is a pointer to the System Manager variable size globals
+ 	Ptr						sysGlobalsP;							// pointer to System Globals 
+ 	
+ 	// Miscellaneous System flags
+ 	Word						sysMiscFlags;							// System Misc flags: sysMiscFlagXXX
+ 	
+ 	
+ 	//-----------------------------------------------------------------------
+ 	// Put New globals here...
+ 	//-----------------------------------------------------------------------
+ 	// type 					newGlobal;
+ 
+ 
+ 	} FixedGlobalsType;
+ 	
+ 		
+ /************************************************************ 
+  * This structure defines the start of the Low Memory Area.
+  * The complete structure of LowMemory is defined in SystemPrv.h
+  *  and includes this low memory header followed by some variable
+  *  size globals that may change from rev to rev of the System Software.
+  *
+  * When emulating under Windows, this structure ends up at some random
+  * place in memory and the global variable GlobalsP points to it.
+  *
+  * When running in the native environment, this structure starts at
+  * address sysGlobalsOffset. 
+  *
+  * In order to simplify the source code, macros are defined for
+  *  accessing commonly used globals in the optimim manner for
+  *  each environment.
+  *************************************************************/
+ typedef struct LowMemHdrType {
+ 	//---------------------------------------------------------------------------
+ 	// Processor exception table
+ 	//---------------------------------------------------------------------------
+ 	M68KExcTableType		vectors;						// Exception vectors, 
+ 																// or Card header for RAM only cards
+ 	
+ 	//---------------------------------------------------------------------------
+ 	// System Globals
+ 	//---------------------------------------------------------------------------
+ 	FixedGlobalsType		globals;						// System Globals
+ 	
+ 	} LowMemHdrType;
+ 
+ 
+ 
+ #if EMULATION_LEVEL == EMULATION_NONE
+ 	#define	PilotGlobalsP	0
+ #else
+ 	extern	Ptr	PilotGlobalsP;							// pointer to start of Memory card 0
+ #endif    
+ 
+ 
+ 
+ 
+ 
+ /************************************************************
+  * Macros for accessing globals. 
+  * When emulating, the globals are allocated in a memory chunk and our
+  *  global variable Card0P points to this chunk.
+  * In native mode, Card0P is defined to be 0 at all times.
+  *************************************************************/
+ #define	GMemCardSlots				(((LowMemHdrType*)PilotGlobalsP)->globals.memCardSlots)
+ #define	GMemCardInfoP				(((LowMemHdrType*)PilotGlobalsP)->globals.memCardInfoP)
+ #define	GMemSemaphoreID			(((LowMemHdrType*)PilotGlobalsP)->globals.memSemaphoreID)
+ #define  GMemDebugMode				(((LowMemHdrType*)PilotGlobalsP)->globals.memDebugMode)
+ #define  GMemMinDynHeapFree		(((LowMemHdrType*)PilotGlobalsP)->globals.memMinDynHeapFree)
+ 
+ #define	GDmOpenList		  			(((LowMemHdrType*)PilotGlobalsP)->globals.dmOpenList)
+ 
+ #define	GDbgWasEntered	  			(((LowMemHdrType*)PilotGlobalsP)->globals.dbgWasEntered)
+ #define	GDbgInDebugger	  			(((LowMemHdrType*)PilotGlobalsP)->globals.dbgInDebugger)
+ #define	GDbgTracing		  			(((LowMemHdrType*)PilotGlobalsP)->globals.dbgTracing)
+ #define	GDbgGlobalsP	  			(((LowMemHdrType*)PilotGlobalsP)->globals.dbgGlobalsP)
+ 
+ #define	GSysAppInfoP	  			(((LowMemHdrType*)PilotGlobalsP)->globals.sysAppInfoP)
+ #define	GSysKernelDataP	  		(((LowMemHdrType*)PilotGlobalsP)->globals.sysKernelDataP)
+ #define	GSysDispatchTableP	  	(((LowMemHdrType*)PilotGlobalsP)->globals.sysDispatchTableP)
+ #define	GSysDispatchTableSize	(((LowMemHdrType*)PilotGlobalsP)->globals.sysDispatchTableSize)
+ #define	GSysDispatchTableRev		(((LowMemHdrType*)PilotGlobalsP)->globals.sysDispatchTableRev)
+ #define	GSysOwnerIDsInUse		  	(((LowMemHdrType*)PilotGlobalsP)->globals.sysOwnerIDsInUse)
+ #define	GSysAMXAppInfoP			(((LowMemHdrType*)PilotGlobalsP)->globals.sysAMXAppInfoP)
+ #define	GSysClockFreq				(((LowMemHdrType*)PilotGlobalsP)->globals.sysClockFreq)
+ #define  GSysHardKeyCreators		(((LowMemHdrType*)PilotGlobalsP)->globals.sysHardKeyCreators)
+ #define  GSysNextBatteryAlertTimer		(((LowMemHdrType*)PilotGlobalsP)->globals.sysNextBatteryAlertTimer)
+ #define  GSysBatteryCheckTimer	(((LowMemHdrType*)PilotGlobalsP)->globals.sysBatteryCheckTimer)
+ #define  GSysBatteryWarnThreshold		(((LowMemHdrType*)PilotGlobalsP)->globals.sysBatteryWarnThreshold)
+ #define  GHwrBatteryLevel			(((LowMemHdrType*)PilotGlobalsP)->globals.hwrBatteryLevel)
+ #define  GSysBatteryMinThreshold		(((LowMemHdrType*)PilotGlobalsP)->globals.sysBatteryMinThreshold)
+ #define  GSysBatteryKind			(((LowMemHdrType*)PilotGlobalsP)->globals.sysBatteryKind)
+ #define  GSysConsoleStackChunkP	(((LowMemHdrType*)PilotGlobalsP)->globals.sysConsoleStackChunkP)
+ #define  GSysUIShellAppInfoP		(((LowMemHdrType*)PilotGlobalsP)->globals.sysUIShellAppInfoP)
+ #define  GSysTimerID					(((LowMemHdrType*)PilotGlobalsP)->globals.sysTimerID)
+ #define  GSysAutoOffEvtTicks		(((LowMemHdrType*)PilotGlobalsP)->globals.sysAutoOffEvtTicks)
+ #define  GSysAutoOffSeconds		(((LowMemHdrType*)PilotGlobalsP)->globals.sysAutoOffSeconds)
+ #define  GSysRandomSeed				(((LowMemHdrType*)PilotGlobalsP)->globals.sysRandomSeed)
+ #define  GSysResetFlags				(((LowMemHdrType*)PilotGlobalsP)->globals.sysResetFlags)
+ #define  GSysPrefFlags				(((LowMemHdrType*)PilotGlobalsP)->globals.sysPrefFlags)
+ #define  GSysMiscFlags				(((LowMemHdrType*)PilotGlobalsP)->globals.sysMiscFlags)
+ #define  GSysGlobalsP				(((LowMemHdrType*)PilotGlobalsP)->globals.sysGlobalsP)
+ 
+ 
+ #define	GSlkGlobalsP	  			(((LowMemHdrType*)PilotGlobalsP)->globals.slkGlobalsP)
+ #define	GSerGlobalsP	  			(((LowMemHdrType*)PilotGlobalsP)->globals.serGlobalsP)
+ #define	GScrGlobalsP				(((LowMemHdrType*)PilotGlobalsP)->globals.scrGlobalsP)
+ #define	GFplGlobalsP				(((LowMemHdrType*)PilotGlobalsP)->globals.fplGlobalsP)
+ #define	GPenGlobalsP				(((LowMemHdrType*)PilotGlobalsP)->globals.penGlobalsP)
+ #define	GSysEvtMgrGlobalsP		(((LowMemHdrType*)PilotGlobalsP)->globals.sysEvtMgrGlobalsP)
+ #define	GSndGlobalsP				(((LowMemHdrType*)PilotGlobalsP)->globals.sndGlobalsP)
+ #define	GTimGlobalsP				(((LowMemHdrType*)PilotGlobalsP)->globals.timGlobalsP)
+ #define	GAlmGlobalsP				(((LowMemHdrType*)PilotGlobalsP)->globals.almGlobalsP)
+ #define	GFtrGlobalsP				(((LowMemHdrType*)PilotGlobalsP)->globals.ftrGlobalsP)
+ #define	GGrfGlobalsP				(((LowMemHdrType*)PilotGlobalsP)->globals.grfGlobalsP)
+ #define	GKeyGlobalsP				(((LowMemHdrType*)PilotGlobalsP)->globals.keyGlobalsP)
+ #define	GPADGlobalsP				(((LowMemHdrType*)PilotGlobalsP)->globals.padGlobalsP)
+ 
+ #define	GUIGlobalsP					(((LowMemHdrType*)PilotGlobalsP)->globals.uiGlobals)
+ 
+ #define	GNextUIAppDBID				(((LowMemHdrType*)PilotGlobalsP)->globals.nextUIAppDBID)
+ #define	GNextUIAppCardNo			(((LowMemHdrType*)PilotGlobalsP)->globals.nextUIAppCardNo)
+ #define	GNextUIAppCmd				(((LowMemHdrType*)PilotGlobalsP)->globals.nextUIAppCmd)
+ #define	GNextUIAppCmdPBP			(((LowMemHdrType*)PilotGlobalsP)->globals.nextUIAppCmdPBP)
+ #define	GCurUIAppInfoP				(((LowMemHdrType*)PilotGlobalsP)->globals.curUIAppInfoP)
+ 
+ #define	GHwrDataWELevel			(((LowMemHdrType*)PilotGlobalsP)->globals.hwrDataWELevel)
+ #define  GHwrWakeUp					(((LowMemHdrType*)PilotGlobalsP)->globals.hwrWakeUp)
+ #define  GHwrCPUDutyCycle			(((LowMemHdrType*)PilotGlobalsP)->globals.hwrCPUDutyCycle)
+ #define  GHwrPenDown					(((LowMemHdrType*)PilotGlobalsP)->globals.hwrPenDown)
+ #define  GHwrCurTicks				(((LowMemHdrType*)PilotGlobalsP)->globals.hwrCurTicks)
+ #define  GHwrTotalRAMSize			(((LowMemHdrType*)PilotGlobalsP)->globals.hwrTotalRAMSize)
+ #define  GHwrDozeSubTicks			(((LowMemHdrType*)PilotGlobalsP)->globals.hwrDozeSubTicks)
+ 
+ #define  GSysLibTableP				(((LowMemHdrType*)PilotGlobalsP)->globals.sysLibTableP)
+ #define  GSysLibTableEntries		(((LowMemHdrType*)PilotGlobalsP)->globals.sysLibTableEntries)
+ #define	GDbgSerGlobalsP			(((LowMemHdrType*)PilotGlobalsP)->globals.dbgSerGlobalsP)
+ 
+ 
+ #endif 	//__GLOBALS_H__
+ 
+ #endif 	// NON_PORTABLE
+ 
+ 
+ 
+ 
diff -r -c -x *.orig -x *.rej -x #* -x *~ -N orig/gcc-2.7.2.2/PalmOS/System/Graffiti.h gcc-2.7.2.2/PalmOS/System/Graffiti.h
*** orig/gcc-2.7.2.2/PalmOS/System/Graffiti.h	Thu Jan  1 01:00:00 1970
--- gcc-2.7.2.2/PalmOS/System/Graffiti.h	Wed Feb 19 16:49:17 1997
***************
*** 0 ****
--- 1,213 ----
+ /*******************************************************************
+  * 							 Pilot Software
+  *
+  *		 Copyright(c) 1994, Palm Computing Inc., All Rights Reserved
+  *
+  *-------------------------------------------------------------------
+  * FileName:
+  *		Graffiti.h
+  *
+  * Description:
+  *		Header for the Graffiti interface
+  *
+  * History:
+  *   	6/30  RM - Created by Ron Marianetti
+  *
+  *******************************************************************/
+ 
+ #ifndef __GRAFFITI_H__
+ #define __GRAFFITI_H__
+ 
+ #include <Common.h>
+ 
+ #define grfNoShortCut	0xffff		// Index which isn't a shortcut
+ 
+ /*------------------------------------------------------------------------------
+  * Match info structure. Returned by GrfMatch and GrfMatchGlyph  
+  *-----------------------------------------------------------------------------*/
+ typedef struct {
+ 	Byte	glyphID;							/* glyph ID of this match */
+ 	Byte	unCertainty;	            /* unCertainty of this match (0 most certain) */
+ 	} GrfMatchType;	
+ 
+ 
+ #define grfMaxMatches	4
+ typedef struct {
+ 	Word				numMatches;	      /* number of matches returned in this structure */
+ 	GrfMatchType 	match[grfMaxMatches];	
+ 	} GrfMatchInfoType;
+ typedef	GrfMatchInfoType*	GrfMatchInfoPtr;
+ 
+ #define grfNameLength	8				// eight letters possible (don't forget CR)
+ //#define grfTextLength	56				// Use <SysEvtPrv.h>
+ 
+ 
+ //----------------------------------------------------------------------------
+ // Escape codes preceding special sequences in the dictionary or macros
+ //----------------------------------------------------------------------------
+ // In dictionary or macros preceding virtual key event sequences. These are always 
+ // 11 byte sequences that have ASCII encoded values for the ascii code, keyCode,
+ //   and modifiers: 
+ //   grfVirtualSequence, ascii,   keyCode,  modifiers.
+ //         1 byte        4 bytes   4 bytes   2 byte          
+ #define	grfVirtualSequence	0x01
+ 
+ // In dictionary to tell us about temp shift state changes.
+ #define	grfShiftSequence		0x02
+ 
+ // In dictionary/macros to hide special features
+ #define	grfSpecialSequence	0x03
+ 
+ // Char indicating a seqeunce of characters to expand.
+ #define	grfExpansionSequence	'@'
+ 
+ // Chars indicating what to expand into
+ #define	expandDateChar				'D'
+ #define	expandTimeChar				'T'
+ #define	expandStampChar			'S'	//	This follows 'D' or 'T' for the sake
+ 													//	of the mnemonic name.
+ 
+ #define	shortcutBinaryDataFlag	0x01
+ 
+ 
+ // Determine if a string has a sequence
+ #define HasVirtualSequence(s)		(s[0] == grfVirtualSequence)
+ #define HasSpecialSequence(s)		(s[0] == grfSpecialSequence)
+ #define HasExpansionSequence(s)	(s[0] == grfExpansionSequence)
+ 
+ 
+ 
+ /*------------------------------------------------------------------------------
+  * Temp shift states, returned by GrfGetState
+  *-----------------------------------------------------------------------------*/
+ #define	grfTempShiftPunctuation			1
+ #define	grfTempShiftExtended				2
+ #define	grfTempShiftUpper					3
+ #define	grfTempShiftLower					4
+ 
+ 
+ 
+ /************************************************************
+  * Graffiti result codes
+  *************************************************************/
+ #define	grfErrBadParam						(grfErrorClass | 1)
+ #define	grfErrPointBufferFull			(grfErrorClass | 2)
+ #define	grfErrNoGlyphTable				(grfErrorClass | 3)
+ #define	grfErrNoDictionary				(grfErrorClass | 4)
+ #define	grfErrNoMapping					(grfErrorClass | 5)
+ #define	grfErrMacroNotFound				(grfErrorClass | 6)
+ #define	grfErrDepthTooDeep				(grfErrorClass | 7)
+ #define	grfErrMacroPtrTooSmall			(grfErrorClass | 8)
+ #define	grfErrNoMacros						(grfErrorClass | 9)
+ 
+ #define	grfErrMacroIncomplete			(grfErrorClass | 129)  // (grfWarningOffset+1)
+ #define	grfErrBranchNotFound				(grfErrorClass | 130)  // (grfWarningOffset+2)
+ 
+ 
+ /************************************************************
+  * Graffiti interface procedures
+  *************************************************************/
+ #ifdef __cplusplus
+ extern "C" {  
+ #endif
+ 
+ 
+ //-----------------------------------------------------------------
+ // High Level Calls
+ //------------------------------------------------------------------
+ Err		GrfInit (void)
+ 				SYS_TRAP(sysTrapGrfInit);
+ 
+ Err		GrfFree (void)
+ 				SYS_TRAP(sysTrapGrfFree);
+ 
+ Err		GrfProcessStroke(PointType* startPtP, PointType* endPtP,
+ 					Boolean upShift)
+ 				SYS_TRAP(sysTrapGrfProcessStroke);
+ 
+ Err		GrfFieldChange(Boolean resetState, UIntPtr characterToDelete)
+ 				SYS_TRAP(sysTrapGrfFieldChange);
+ 
+ Err		GrfGetState(Boolean* capsLockP, Boolean* numLockP, 
+ 					WordPtr tempShiftP, Boolean* autoShiftedP)
+ 				SYS_TRAP(sysTrapGrfGetState);
+ 
+ Err		GrfSetState(Boolean capsLock, Boolean numLock, 
+ 					Boolean upperShift)
+ 				SYS_TRAP(sysTrapGrfSetState);
+ 
+ 
+ //-----------------------------------------------------------------
+ // Mid Level Calls
+ //------------------------------------------------------------------
+ 
+ Err 		GrfFlushPoints (void)
+ 				SYS_TRAP(sysTrapGrfFlushPoints);
+ 
+ Err 		GrfAddPoint (PointType* pt)
+ 				SYS_TRAP(sysTrapGrfAddPoint);
+ 
+ Err 		GrfInitState(void)
+ 				SYS_TRAP(sysTrapGrfInitState);
+ 
+ Err 		GrfCleanState(void)
+ 				SYS_TRAP(sysTrapGrfCleanState);
+ 
+ Err 		GrfMatch (WordPtr flagsP, void* dataPtrP, WordPtr dataLenP,
+ 					WordPtr uncertainLenP, GrfMatchInfoPtr matchInfoP)
+ 				SYS_TRAP(sysTrapGrfMatch);
+ 
+ Err 		GrfGetMacro(CharPtr nameP, BytePtr macroDataP,
+ 					WordPtr	dataLenP)
+ 				SYS_TRAP(sysTrapGrfGetMacro);
+ 
+ Err 		GrfGetAndExpandMacro(CharPtr nameP, BytePtr macroDataP,
+ 					WordPtr	dataLenP)
+ 				SYS_TRAP(sysTrapGrfGetAndExpandMacro);
+ 
+ 
+ //-----------------------------------------------------------------
+ // Low Level Calls
+ //------------------------------------------------------------------
+ Err 		GrfFilterPoints (void)
+ 				SYS_TRAP(sysTrapGrfFilterPoints);
+ 
+ Err 		GrfGetNumPoints(WordPtr numPtsP)
+ 				SYS_TRAP(sysTrapGrfGetNumPoints);
+ 
+ Err 		GrfGetPoint(Word index, PointType* pointP)
+ 				SYS_TRAP(sysTrapGrfGetPoint);
+ 
+ Err 		GrfFindBranch(Word flags)
+ 				SYS_TRAP(sysTrapGrfFindBranch);
+ 
+ Err 		GrfMatchGlyph (GrfMatchInfoPtr matchInfoP,
+ 					Word maxUnCertainty, Word maxMatches)
+ 				SYS_TRAP(sysTrapGrfMatchGlyph);
+ 
+ Err 		GrfGetGlyphMapping (Word glyphID, WordPtr flagsP,
+ 					void* dataPtrP, WordPtr dataLenP, WordPtr uncertainLenP)
+ 				SYS_TRAP(sysTrapGrfGetGlyphMapping);
+ 
+ Err 		GrfGetMacroName(Word index, CharPtr nameP)
+ 				SYS_TRAP(sysTrapGrfGetMacroName);
+ 
+ Err 		GrfDeleteMacro(Word index)
+ 				SYS_TRAP(sysTrapGrfDeleteMacro);
+ 
+ Err 		GrfAddMacro(CharPtr nameP, BytePtr macroDataP,
+ 					Word dataLen)
+ 				SYS_TRAP(sysTrapGrfAddMacro);
+ 
+ 
+ 
+ 
+ #ifdef __cplusplus
+ }
+ #endif
+ 
+ 
+ #endif //__SYSEVTMGR_H__
+ 
+ 
+ 
diff -r -c -x *.orig -x *.rej -x #* -x *~ -N orig/gcc-2.7.2.2/PalmOS/System/GraffitiPrv.h gcc-2.7.2.2/PalmOS/System/GraffitiPrv.h
*** orig/gcc-2.7.2.2/PalmOS/System/GraffitiPrv.h	Thu Jan  1 01:00:00 1970
--- gcc-2.7.2.2/PalmOS/System/GraffitiPrv.h	Wed Feb 19 16:49:17 1997
***************
*** 0 ****
--- 1,106 ----
+ /*******************************************************************
+  * 							 Pilot Software
+  *
+  *		 Copyright(c) 1994, Palm Computing Inc., All Rights Reserved
+  *
+  *-------------------------------------------------------------------
+  * FileName:
+  *		GraffitiPRV.h
+  *
+  * Description:
+  *		Private Header for the Graffiti interface
+  *
+  * History:
+  *   	6/30  RM - Created by Ron Marianetti
+  *
+  *******************************************************************/
+ 
+ #ifdef	NON_PORTABLE
+ #ifndef __GRAFFITIPRV_H__
+ #define __GRAFFITIPRV_H__
+ 
+ 
+ 
+ #define	DP3MachineMacintosh
+ #include <P3API.h>
+ 
+ 
+ /************************************************************
+  * Graffiti Constants
+  *************************************************************/
+ // Bytes that follow the grfSpecialSequence byte in Graffiti dictionary
+ //  or macros. These are used for special test code and debugging
+ #define	grfSpecialToggleSplitMode	0x01		// Toggle split mode
+ #define	grfSpecialNoAutoOff			0x02		// Disable auto-off
+ #define	grfSpecialShowUserInfo		0x03		//	Display user information
+ #define	grfSpecialDeleteUserInfo	0x04		//	Delete user name & id
+ #define	grfSpecialSystemBuildDate	0x05		//	Show System Build date
+ #define	grfSpecialBatteryKind		0x06		//	Change battery kind
+ 
+ // Max # of keys returned from dictionary or macros 
+ #define	grfMaxKeys				100				
+ 
+ // Resource type and ID of macros resource
+ #define	grfMacrosResT			'macr'
+ #define	grfMacrosResID			10000
+ #define	grfMacrosMinSize		10					// min size of macros resource
+ 
+ // Version of Graffiti Macros database
+ #define	grfMacrosDBVersion	0					// version word
+ 
+ 
+ // Constant used to translate internal Graffiti Warnings into Pilot error codes
+ #define	grfWarningOffset		128
+ 
+ 
+ /************************************************************
+  * Graffiti Globals
+  *************************************************************/
+ #define grfMaxMacroName 	32
+ typedef struct GrfGlobalsType {
+ 	TP3Data				p3Data;
+ 	TP3DictState 		state;
+ 	Int					uncertain;
+ 	Word					glyphFlags;
+ 	Word					shiftState;				// temp shift state
+ 	
+ 	SWord					macroNameLen;
+ 	Byte					macroName[grfMaxMacroName];
+ 	Byte					lastChar;
+ 	
+ 	ULong					globalsSize;
+ 	
+ 	
+ 	// Various flags  
+ 	Word					splitMode : 1;
+ 	Word					restoreCaps : 1;
+ 	Word					inMacro : 1;
+ 	Word					wasAutoShifted : 1;
+ 	
+ 	// Glyph ID assigned to the up-stroke
+ 	Byte					upShiftGlyphID;
+ 	
+ 	// Handle to P3 private globals
+ 	Handle				globalsH;
+ 	
+ 	// Handle to template file
+ 	Handle				templateH;
+ 	
+ 	// Handle to dictionary
+ 	Handle				dictH;
+ 	
+ 	// Handle to macros resource
+ 	Handle				macrosH;
+ 	// Database acccess pointer to macros database
+ 	DmOpenRef			macrosDbP;
+ 	
+ 	} GrfGlobalsType;
+ 	
+ typedef GrfGlobalsType*	GrfGlobalsPtr;
+ 
+ 
+ #endif //__GRAFFITIPRV_H__
+ #endif // NON_PORTABLE
+ 
+ 
+ 
diff -r -c -x *.orig -x *.rej -x #* -x *~ -N orig/gcc-2.7.2.2/PalmOS/System/KeyMgr.h gcc-2.7.2.2/PalmOS/System/KeyMgr.h
*** orig/gcc-2.7.2.2/PalmOS/System/KeyMgr.h	Thu Jan  1 01:00:00 1970
--- gcc-2.7.2.2/PalmOS/System/KeyMgr.h	Wed Feb 19 16:49:17 1997
***************
*** 0 ****
--- 1,61 ----
+ /*******************************************************************
+  * 							 Pilot Software
+  *
+  *		 Copyright(c) 1994, Palm Computing Inc., All Rights Reserved  
+  *
+  *-------------------------------------------------------------------
+  * FileName:
+  *		KeyMgr.h
+  *
+  * Description:
+  *		Include file for Key manager
+  *
+  * History:
+  *   	9/13/95 Created by Ron Marianetti
+  *
+  *******************************************************************/
+ 
+ #ifndef __KEYMGR_H__
+ #define __KEYMGR_H__
+ 
+ // Pilot common definitions
+ #include <Common.h>
+ #include <SystemMgr.h>
+ 
+ 
+ /********************************************************************
+  * Definition of bit field returned from KeyCurrentState
+  ********************************************************************/
+ #define	keyBitPower			0x01			// Power key
+ #define	keyBitPageUp		0x02			// Page-up
+ #define	keyBitPageDown		0x04			// Page-down
+ #define	keyBitHard1			0x08			// App #1
+ #define	keyBitHard2			0x10			// App #2
+ #define	keyBitHard3			0x20			// App #3
+ #define	keyBitHard4			0x40			// App #4
+ #define	keyBitCradle		0x80			// Button on cradle
+ 
+ 
+ 
+ /********************************************************************
+  * Key manager Routines
+  ********************************************************************/
+ #ifdef __cplusplus
+ extern "C" {
+ #endif
+ 
+ // Set/Get the auto-key repeat rate
+ Err 		KeyRates(Boolean set, WordPtr initDelayP, WordPtr periodP, 
+ 						WordPtr doubleTapDelayP, BooleanPtr queueAheadP)
+ 							SYS_TRAP(sysTrapKeyRates);
+ 							
+ // Get the current state of the hardware keys
+ DWord		KeyCurrentState(void)
+ 							SYS_TRAP(sysTrapKeyCurrentState);
+ 							
+ #ifdef __cplusplus
+ }
+ #endif
+ 
+ 	
+ #endif	//__KEYMGR_H__
diff -r -c -x *.orig -x *.rej -x #* -x *~ -N orig/gcc-2.7.2.2/PalmOS/System/KeyPrv.h gcc-2.7.2.2/PalmOS/System/KeyPrv.h
*** orig/gcc-2.7.2.2/PalmOS/System/KeyPrv.h	Thu Jan  1 01:00:00 1970
--- gcc-2.7.2.2/PalmOS/System/KeyPrv.h	Wed Feb 19 16:49:17 1997
***************
*** 0 ****
--- 1,112 ----
+ /*******************************************************************
+  * 							 Pilot Software
+  *
+  *		 Copyright(c) 1994, Palm Computing Inc., All Rights Reserved  
+  *
+  *-------------------------------------------------------------------
+  * FileName:
+  *		KeyPrv.h
+  *
+  * Description:
+  *		Private Include file for Key manager
+  *
+  * History:
+  *   	9/13/95 Created by Ron Marianetti
+  *
+  *******************************************************************/
+ 
+ #ifdef	NON_PORTABLE
+ #ifndef __KEYPRV_H
+ #define __KEYPRV_H
+ 
+ 
+ /********************************************************************
+  * Key Manager Constants
+  ********************************************************************/
+ #define	keyMinUpTicks					(sysTicksPerSecond/20)	// Min# of ticks key must be up to recognize it
+ 
+ #define	keyBitMask						0x007F	// Which bits in port D we use for keys
+ 
+ /********************************************************************
+  * Key Manager Globals
+  ********************************************************************/
+ typedef struct KeyGlobalsType {
+ 	ULong		lastKeyTicks;					// GHwrCurTicks last time we enqueued
+ 													//  a key event - cleared as soon as
+ 													//  key is released.
+ 													
+ 
+ 	Byte		keyState;						// current state of hardware keys - returned
+ 													// by KeyCurrentState
+ 	Byte		keyUpCount;						// # of consecutive times we've detected
+ 													// no keys down - used for debouncing
+ 	Byte		initDelay;						// key repeat init delay in ticks
+ 	Byte		period;							// key repeat period in ticks
+ 	
+ 	
+ 	// These variables used for sensing double-taps
+ 	ULong		doubleTapTicks;				// GHwrCurTicks last tiem we enqueued
+ 													//  a key event - never cleared. 
+ 	Word		doubleTapDelay;				// double-tap timeout in ticks
+ 	Byte		doubleTapState;				// state of hardware keys last time
+ 	
+ 	// Belongs next to 'period' but put here for alignment
+ 	Boolean	queueAhead;						// if true, enqueue auto-repeat keys even if 
+ 													// queue is not empty.
+ 	} KeyGlobalsType;
+ 	
+ typedef KeyGlobalsType*	KeyGlobalsPtr;
+ 
+ 
+ 
+ 
+ 
+ /********************************************************************
+  * Key manager Routines
+  ********************************************************************/
+ #ifdef __cplusplus
+ extern "C" {
+ #endif
+ 
+ // Called early on during boot-up to get status of hard reset
+ //  and debugger key options. Returns DWord with bits set for each
+ //  key down.
+ DWord		KeyBootKeys(void);
+ 				
+ 
+ // Initializes the Key Manager and allocates it's globals
+ Err		KeyInit(void)
+ 				SYS_TRAP(sysTrapKeyInit);
+ 
+ 
+ // Called as a result of a key-down interrupt or periodically by
+ //  by timer task while key is down. Returns # of ticks before
+ //  it should be called again by timer task.
+ ULong		KeyHandleInterrupt(Boolean periodic, DWord status)
+ 				SYS_TRAP(sysTrapKeyHandleInterrupt);
+ 				
+ 			
+ // Called by SysEvtMgr when it gets a pen event in order to
+ //  reset the key manager's double-tap detection.
+ Err		KeyResetDoubleTap(void)
+ 				SYS_TRAP(sysTrapKeyResetDoubleTap);
+ 
+ 
+ // Called before system goes to sleep
+ Err		KeySleep(Boolean untilReset, Boolean emergency)
+ 				SYS_TRAP(sysTrapKeySleep);
+ 
+ 
+ // Called when the system wakes up
+ Err		KeyWake(void)
+ 				SYS_TRAP(sysTrapKeyWake);
+ 
+ 
+ 
+ #ifdef __cplusplus
+ }
+ #endif
+ 
+ 	
+ #endif	//__KEYPRV_H
+ #endif 	// NON_PORTABLE
\ No newline at end of file
diff -r -c -x *.orig -x *.rej -x #* -x *~ -N orig/gcc-2.7.2.2/PalmOS/System/Keyboard.h gcc-2.7.2.2/PalmOS/System/Keyboard.h
*** orig/gcc-2.7.2.2/PalmOS/System/Keyboard.h	Thu Jan  1 01:00:00 1970
--- gcc-2.7.2.2/PalmOS/System/Keyboard.h	Wed Feb 19 16:49:17 1997
***************
*** 0 ****
--- 1,51 ----
+ /***********************************************************************
+  * 
+  *	Copyright (c) Palm Computing 1994 -- All Rights Reserved
+  *
+  * PROJECT:  Pilot
+  * FILE:     Keyboard.h
+  * AUTHOR:	 Roger Flores: March 29, 1995
+  *
+  * DECLARER: UI
+  *
+  * DESCRIPTION:
+  *	  This file defines the keyboard's  structures 
+  *   and routines.
+  *
+  ***********************************************************************/
+ 
+ 
+ #ifndef __KBD_H__
+ #define __KBD_H__
+ 
+ 
+ 
+ #define kbdReturnKey		linefeedChr
+ #define kbdTabKey			tabChr
+ #define kbdBackspaceKey	backspaceChr
+ #define kbdShiftKey		2
+ #define kbdCapsKey		1
+ #define kbdNoKey			-1
+ 
+ 
+ 
+ /************************************************************
+  * Keyboard procedures
+  *************************************************************/
+ #ifdef __cplusplus
+ extern "C" {
+ #endif
+ 
+ // At some point the Graffiti code will need access to the
+ // shift and caps lock info.  Either export the structures
+ // or provide calls to the info.
+ 
+ extern void SysKeyboardDialog ()
+ 							SYS_TRAP(sysTrapSysKeyboardDialog);
+ 
+ 
+ #ifdef __cplusplus
+ }
+ #endif
+ 
+ #endif // __KBD_H__
\ No newline at end of file
diff -r -c -x *.orig -x *.rej -x #* -x *~ -N orig/gcc-2.7.2.2/PalmOS/System/Launcher.h gcc-2.7.2.2/PalmOS/System/Launcher.h
*** orig/gcc-2.7.2.2/PalmOS/System/Launcher.h	Thu Jan  1 01:00:00 1970
--- gcc-2.7.2.2/PalmOS/System/Launcher.h	Wed Feb 19 16:49:17 1997
***************
*** 0 ****
--- 1,71 ----
+ /***********************************************************************
+  *
+  *	Copyright (c) Palm Computing 1995 -- All Rights Reserved
+  *
+  * PROJECT:  Pilot
+  * FILE:     Launcher.h
+  * AUTHOR:	 Roger Flores: April 27, 1995
+  *
+  * DECLARER: UI
+  *
+  * DESCRIPTION:
+  *	  These are the routines for the launcher.
+  *
+  **********************************************************************/
+ #ifndef __LAUNCHER_H__
+ #define __LAUNCHER_H__
+ 
+ #include <Common.h>
+ #include <DataMgr.h>
+ #include <Rect.h>
+ #include <Font.h>
+ #include <Window.h>
+ 
+ typedef struct {
+ 	Char			name[dmDBNameLength];
+ 	ULong			creator;
+ 	UInt			version;
+ 	LocalID		dbID;
+ 	UInt 			cardNo;
+ 	BitmapPtr	iconP;
+ } LauncherAppInfoType;
+ 	
+ typedef struct {
+    RectangleType	bounds;
+    Int  				numItems; 			// numItems of applications available via the launcher
+    Int				columns;
+    Int				rows;
+    Int				topItem;
+ 	VoidHand			appInfoH;			// an array is to be allocated
+ 	RectangleType	frame;
+ 	WinHandle   	popupWin;
+ 	WinHandle   	savedBits;
+ 	WinHandle   	savedActiveWin;
+ 	WinHandle   	savedDrawWin;
+ 	TimeFormatType timeFormat;			// Format to display time in
+ 	char				timeString[timeStringLength];
+ 	Boolean			needToGetNamesAndIcons;
+ 	FormPtr			savedForm;			// the currently active dialog.
+ } LauncherType;
+ 
+ typedef LauncherType * LauncherPtr;
+ 
+ 
+ 
+ /************************************************************
+  * Launcher procedures
+  *************************************************************/
+ #ifdef __cplusplus
+ extern "C" {
+ #endif
+ 
+ void 		SysAppLauncherDialog()
+ 					SYS_TRAP(sysTrapSysAppLauncherDialog);
+ 
+ 
+ #ifdef __cplusplus
+ }
+ #endif
+ 
+ #endif // __LAUNCHER_H__
+ 
diff -r -c -x *.orig -x *.rej -x #* -x *~ -N orig/gcc-2.7.2.2/PalmOS/System/MemoryMgr.h gcc-2.7.2.2/PalmOS/System/MemoryMgr.h
*** orig/gcc-2.7.2.2/PalmOS/System/MemoryMgr.h	Thu Jan  1 01:00:00 1970
--- gcc-2.7.2.2/PalmOS/System/MemoryMgr.h	Wed Feb 19 16:49:17 1997
***************
*** 0 ****
--- 1,341 ----
+ /*******************************************************************
+  * 							 Pilot Software
+  *
+  *		 Copyright(c) 1994, Palm Computing Inc., All Rights Reserved
+  *
+  *-------------------------------------------------------------------
+  * FileName:
+  *		MemoryMgr.h
+  *
+  * Description:
+  *		Include file for Memory Manager
+  *
+  * History:
+  *   	10/25/94  RM - Created by Ron Marianetti
+  *
+  *******************************************************************/
+ 
+ 
+ #ifndef __MEMORYMGR_H__
+ #define __MEMORYMGR_H__
+ 
+ 
+ // Include elementary types
+ #include <Common.h>					// Basic types
+ #include <SysTraps.h>				// Trap Numbers.
+ 
+ 
+ 
+ /************************************************************
+  * Memory Manager Types
+  *************************************************************/
+ typedef enum {	memIDPtr, memIDHandle } LocalIDKind;
+ 
+ 
+ 
+ /************************************************************
+  * Flags accepted as parameter for MemNewChunk.
+  *************************************************************/
+ #define memNewChunkFlagPreLock				0x0100
+ #define memNewChunkFlagNonMovable			0x0200
+ #define memNewChunkFlagAtStart				0x0400	// force allocation at front of heap
+ #define memNewChunkFlagAtEnd					0x0800	// force allocation at end of heap
+ 
+ 
+ 
+ /************************************************************
+  * Memory Manager Debug settings for the MemSetDebugMode function
+  *************************************************************/
+ #define		memDebugModeCheckOnChange			0x0001
+ #define		memDebugModeCheckOnAll				0x0002
+ #define		memDebugModeScrambleOnChange		0x0004
+ #define		memDebugModeScrambleOnAll			0x0008
+ #define		memDebugModeFillFree					0x0010
+ #define		memDebugModeAllHeaps					0x0020
+ #define		memDebugModeRecordMinDynHeapFree	0x0040
+ 
+ 
+ 
+ 
+ /************************************************************
+  * Memory Manager result codes
+  *************************************************************/
+ #define	memErrChunkLocked			(memErrorClass | 1)
+ #define	memErrNotEnoughSpace		(memErrorClass | 2)
+ #define	memErrInvalidParam		(memErrorClass | 3)
+ #define	memErrChunkNotLocked		(memErrorClass | 4)
+ #define	memErrCardNotPresent		(memErrorClass | 5)
+ #define	memErrNoCardHeader		(memErrorClass | 6)
+ #define	memErrInvalidStoreHeader (memErrorClass | 7)
+ #define	memErrRAMOnlyCard			(memErrorClass | 8)
+ #define	memErrWriteProtect		(memErrorClass | 9)
+ #define	memErrNoRAMOnCard			(memErrorClass | 10)
+ #define	memErrNoStore				(memErrorClass | 10)
+ 
+ 
+ 
+ /********************************************************************
+  * Memory Manager Routines
+  * These are define as external calls only under emulation mode or
+  *  under native mode from the module that actually installs the trap
+  *  vectors
+  ********************************************************************/
+ #ifdef __cplusplus
+ extern "C" {
+ #endif
+ 
+ 
+ //-------------------------------------------------------------------
+ // Initialization
+ //-------------------------------------------------------------------
+ Err			MemInit(void)
+ 							SYS_TRAP(sysTrapMemInit);
+ 							
+ Err			MemKernelInit(void)
+ 							SYS_TRAP(sysTrapMemKernelInit);
+ 	
+ Err			MemInitHeapTable(UInt cardNo)
+ 							SYS_TRAP(sysTrapMemInitHeapTable);
+ 	
+ //-------------------------------------------------------------------
+ // Card formatting and Info
+ //-------------------------------------------------------------------
+ UInt			MemNumCards(void)
+ 							SYS_TRAP(sysTrapMemNumCards);
+ 					
+ Err			MemCardFormat(UInt cardNo, CharPtr cardNameP, 
+ 					CharPtr manufNameP, CharPtr ramStoreNameP)
+ 							SYS_TRAP(sysTrapMemCardFormat);
+ 					
+ Err			MemCardInfo(UInt cardNo, 
+ 					CharPtr cardNameP, CharPtr manufNameP,
+ 					UIntPtr versionP, ULongPtr crDateP,
+ 					ULongPtr romSizeP, ULongPtr ramSizeP,
+ 					ULongPtr freeBytesP)
+ 							SYS_TRAP(sysTrapMemCardInfo);
+ 
+ 
+ //-------------------------------------------------------------------
+ // Store Info
+ //-------------------------------------------------------------------
+ Err			MemStoreInfo(UInt cardNo, UInt storeNumber,  
+ 					UIntPtr versionP, UIntPtr flagsP, CharPtr nameP,
+ 					ULongPtr	crDateP, ULongPtr bckUpDateP,
+ 					ULongPtr	heapListOffsetP, ULongPtr initCodeOffset1P,
+ 					ULongPtr initCodeOffset2P, LocalID*	databaseDirIDP)
+ 							SYS_TRAP(sysTrapMemStoreInfo);
+ 
+ Err			MemStoreSetInfo(UInt cardNo, UInt storeNumber,
+ 					UIntPtr versionP, UIntPtr flagsP,  CharPtr nameP, 
+ 					ULongPtr crDateP, ULongPtr bckUpDateP, 
+ 					ULongPtr heapListOffsetP, ULongPtr initCodeOffset1P,
+ 					ULongPtr initCodeOffset2P, LocalID*	databaseDirIDP)
+ 							SYS_TRAP(sysTrapMemStoreSetInfo);
+ 
+ 
+ //-------------------------------------------------------------------
+ // Heap Info & Utilities
+ //-------------------------------------------------------------------
+ UInt				MemNumHeaps(UInt cardNo)
+ 							SYS_TRAP(sysTrapMemNumHeaps);
+ 	
+ UInt				MemNumRAMHeaps(UInt cardNo)
+ 							SYS_TRAP(sysTrapMemNumRAMHeaps);
+ 	
+ UInt				MemHeapID(UInt cardNo, UInt heapIndex)
+ 							SYS_TRAP(sysTrapMemHeapID);
+ 	
+ Boolean			MemHeapDynamic(UInt heapID)
+ 							SYS_TRAP(sysTrapMemHeapDynamic);
+ 	
+ Err				MemHeapFreeBytes(UInt heapID, ULongPtr freeP, ULongPtr maxP)
+ 							SYS_TRAP(sysTrapMemHeapFreeBytes);
+ 							
+ ULong	  			MemHeapSize(UInt heapID)
+ 							SYS_TRAP(sysTrapMemHeapSize);
+ 							
+ UInt				MemHeapFlags(UInt heapID)
+ 							SYS_TRAP(sysTrapMemHeapFlags);
+ 
+ 
+ // Heap utilities
+ Err				MemHeapCompact(UInt heapID)
+ 							SYS_TRAP(sysTrapMemHeapCompact);
+ 							
+ Err				MemHeapInit(UInt heapID, Int numHandles, Boolean initContents)
+ 							SYS_TRAP(sysTrapMemHeapInit);
+ 							
+ Err				MemHeapFreeByOwnerID(UInt heapID, UInt ownerID)
+ 							SYS_TRAP(sysTrapMemHeapFreeByOwnerID);
+ 
+ 
+ //-------------------------------------------------------------------
+ // Low Level Allocation
+ //-------------------------------------------------------------------
+ VoidPtr			MemChunkNew(UInt heapID, ULong size, UInt attr)
+ 							SYS_TRAP(sysTrapMemChunkNew);
+ 							
+ Err				MemChunkFree(VoidPtr chunkDataP)
+ 							SYS_TRAP(sysTrapMemChunkFree);
+ 
+ 
+ 
+ //-------------------------------------------------------------------
+ // Pointer (Non-Movable) based Chunk Routines
+ //-------------------------------------------------------------------
+ VoidPtr			MemPtrNew(ULong size) 
+ 							SYS_TRAP(sysTrapMemPtrNew);
+ 							
+ #define			MemPtrFree(	p) \
+ 						MemChunkFree(p)
+ 
+ // Getting Attributes
+ VoidHand			MemPtrRecoverHandle(VoidPtr p)
+ 							SYS_TRAP(sysTrapMemPtrRecoverHandle);
+ 
+ UInt				MemPtrFlags(VoidPtr p)
+ 							SYS_TRAP(sysTrapMemPtrFlags);
+ 
+ ULong				MemPtrSize(VoidPtr p)
+ 							SYS_TRAP(sysTrapMemPtrSize);
+ 							
+ UInt				MemPtrOwner(VoidPtr p)
+ 							SYS_TRAP(sysTrapMemPtrOwner);
+ 							
+ UInt				MemPtrHeapID(VoidPtr p)
+ 							SYS_TRAP(sysTrapMemPtrHeapID);
+ 							
+ Boolean			MemPtrDataStorage(VoidPtr p)
+ 							SYS_TRAP(sysTrapMemPtrDataStorage);
+ 							
+ UInt				MemPtrCardNo(VoidPtr global)
+ 							SYS_TRAP(sysTrapMemPtrCardNo);
+ 							
+ LocalID			MemPtrToLocalID(VoidPtr p)
+ 							SYS_TRAP(sysTrapMemPtrToLocalID);
+ 
+ // Setting Attributes
+ Err				MemPtrSetOwner(VoidPtr p, UInt owner)
+ 							SYS_TRAP(sysTrapMemPtrSetOwner);
+ 							
+ Err				MemPtrResize(VoidPtr p, ULong newSize)
+ 							SYS_TRAP(sysTrapMemPtrResize);
+ 							
+ Err				MemPtrResetLock(VoidPtr p)
+ 							SYS_TRAP(sysTrapMemPtrResetLock);
+ 
+ Err				MemPtrUnlock(VoidPtr p)
+ 							SYS_TRAP(sysTrapMemPtrUnlock);
+ 
+ 
+ //-------------------------------------------------------------------
+ // Handle (Movable) based Chunk Routines
+ //-------------------------------------------------------------------
+ VoidHand			MemHandleNew(ULong size)
+ 							SYS_TRAP(sysTrapMemHandleNew);
+ 							
+ Err				MemHandleFree(VoidHand h)
+ 							SYS_TRAP(sysTrapMemHandleFree);
+ 
+ // Getting Attributes
+ UInt				MemHandleFlags(VoidHand h) 
+ 							SYS_TRAP(sysTrapMemHandleFlags);				
+ 
+ ULong				MemHandleSize(VoidHand h) 
+ 							SYS_TRAP(sysTrapMemHandleSize);
+ 
+ UInt				MemHandleOwner(VoidHand h) 
+ 							SYS_TRAP(sysTrapMemHandleOwner);
+ 
+ UInt				MemHandleLockCount(VoidHand h)
+ 							SYS_TRAP(sysTrapMemHandleLockCount);
+ 							
+ UInt				MemHandleHeapID(VoidHand h) 
+ 							SYS_TRAP(sysTrapMemHandleHeapID);
+ 
+ Boolean			MemHandleDataStorage(VoidHand h) 
+ 							SYS_TRAP(sysTrapMemHandleDataStorage);
+ 
+ UInt				MemHandleCardNo(VoidHand h) 
+ 							SYS_TRAP(sysTrapMemHandleCardNo);
+ 
+ LocalID			MemHandleToLocalID(VoidHand h)
+ 							SYS_TRAP(sysTrapMemHandleToLocalID);
+ 
+ 
+ // Setting Attributes
+ Err				MemHandleSetOwner( VoidHand h,  UInt owner) 
+ 							SYS_TRAP(sysTrapMemHandleSetOwner);
+ 						
+ Err				MemHandleResize(VoidHand h,  ULong newSize) 
+ 							SYS_TRAP(sysTrapMemHandleResize);
+ 						
+ VoidPtr			MemHandleLock(VoidHand h)
+ 							SYS_TRAP(sysTrapMemHandleLock);
+ 							
+ Err				MemHandleUnlock(VoidHand h)
+ 							SYS_TRAP(sysTrapMemHandleUnlock);
+ 							
+ Err				MemHandleResetLock(VoidHand h) 
+ 							SYS_TRAP(sysTrapMemHandleResetLock);
+ 							
+ 							
+ 
+ 
+ //-------------------------------------------------------------------
+ // Local ID based routines
+ //-------------------------------------------------------------------
+ VoidPtr			MemLocalIDToGlobal(LocalID local, UInt cardNo)
+ 							SYS_TRAP(sysTrapMemLocalIDToGlobal);
+ 							
+ LocalIDKind		MemLocalIDKind(LocalID local)
+ 							SYS_TRAP(sysTrapMemLocalIDKind);
+ 
+ VoidPtr			MemLocalIDToPtr(LocalID local, UInt cardNo)
+ 							SYS_TRAP(sysTrapMemLocalIDToPtr);
+ 
+ VoidPtr			MemLocalIDToLockedPtr(LocalID local, UInt cardNo)
+ 							SYS_TRAP(sysTrapMemLocalIDToLockedPtr);
+ 
+ 
+ //-------------------------------------------------------------------
+ // Utilities
+ //-------------------------------------------------------------------
+ Err				MemMove(VoidPtr dstP, VoidPtr srcP, ULong numBytes)
+ 							SYS_TRAP(sysTrapMemMove);
+ 							
+ Err				MemSet(VoidPtr dstP, ULong numBytes, Byte value)
+ 							SYS_TRAP(sysTrapMemSet);
+ 
+ Err				MemSemaphoreReserve(Boolean writeAccess)
+ 							SYS_TRAP(sysTrapMemSemaphoreReserve);
+ 							
+ Err				MemSemaphoreRelease(Boolean writeAccess)
+ 							SYS_TRAP(sysTrapMemSemaphoreRelease);
+ 
+ //-------------------------------------------------------------------
+ // Debugging Support
+ //-------------------------------------------------------------------
+ Word				MemDebugMode(void)
+ 							SYS_TRAP(sysTrapMemDebugMode);
+ 
+ Err				MemSetDebugMode(Word flags)
+ 							SYS_TRAP(sysTrapMemSetDebugMode);
+ 
+ Err				MemHeapScramble(UInt heapID)
+ 							SYS_TRAP(sysTrapMemHeapScramble);
+ 							
+ Err				MemHeapCheck(UInt heapID)
+ 							SYS_TRAP(sysTrapMemHeapCheck);
+ 
+ 
+ #ifdef __cplusplus 
+ }
+ #endif
+ 
+ 
+ 
+ 
+ 
+ #endif  // __MEMORYMGR_H__
+ 
diff -r -c -x *.orig -x *.rej -x #* -x *~ -N orig/gcc-2.7.2.2/PalmOS/System/MemoryPrv.h gcc-2.7.2.2/PalmOS/System/MemoryPrv.h
*** orig/gcc-2.7.2.2/PalmOS/System/MemoryPrv.h	Thu Jan  1 01:00:00 1970
--- gcc-2.7.2.2/PalmOS/System/MemoryPrv.h	Wed Feb 19 16:49:17 1997
***************
*** 0 ****
--- 1,327 ----
+ /*******************************************************************
+  * 							 Pilot Software
+  *
+  *		 Copyright(c) 1994, Palm Computing Inc., All Rights Reserved
+  *
+  *-------------------------------------------------------------------
+  * FileName:
+  *		MemoryMgrPrv.h
+  *
+  * Description:
+  *		Private includes for Memory Manager
+  *
+  * History:
+  *   	7/20/95  RM - Created by Ron Marianetti
+  *
+  *******************************************************************/
+ 
+ #ifdef	NON_PORTABLE
+ 
+ 
+ // SystemPrv.h must be included before this header file. SystemPrv.h will
+ //  then in turn include this header.
+ #ifndef __SYSTEMPRV_H__
+ #include <SystemPrv.h>
+ #endif
+ 
+ #ifndef __MEMORYMGRPRV_H__
+ #define __MEMORYMGRPRV_H__
+ 
+ 
+ 
+ /********************************************************************
+  * Structure of a Master Pointer chunk
+  * The first master pointer chunk is always immediately following the
+  *  heap header. As more movable chunks are created, new master 
+  *  pointer chunks are allocated dynamically and linked together through
+  *  the nextTblOffset field and prevTblOffset field.
+  ********************************************************************/
+ typedef struct {
+ 	Word			numEntries;				// number of master pointer entries
+ 	Word			nextTblOffset;			// offset from start of heap to next table
+ 	//Ptr			mstrP[numEntries];	// array of pointers to movable chunks
+ 	} MstrPtrTableType;
+ typedef MstrPtrTableType*	MstrPtrTablePtr;
+ 
+ 
+ /********************************************************************
+  * Structure of a Heap
+  *
+  * A heap starts with a HeapHeader
+  * Followed by the offset table (numHandles)
+  * Followed by movable chunks
+  * Followed by non-movable chunks
+  ********************************************************************/
+ typedef struct {
+ 	Word					flags;			// heap flags;
+ 	Word					size;				// size of heap - 0 means 64K;
+ 	MstrPtrTableType	mstrPtrTbl;		// Master pointer table
+ 	} HeapHeaderType;
+ typedef HeapHeaderType*  		HeapHeaderPtr;
+ 
+ // Flags Field
+ #define memHeapFlagReadOnly	0x01			// heap is read-only (ROM based)
+ 
+ #define memMstrPtrTableGrowBy			50		// # of entries to grow master pointer tables by
+ #define memMstrPtrTableInitSizeD		40		// # of entries to allocate initially for dynamic heap(s)
+ #define memMstrPtrTableInitSizeS		200	// # of entries to allocate initially for storage heap(s)
+ 
+ 
+ 
+ /********************************************************************
+  * Structure of a Chunk
+  *
+  ********************************************************************/
+ typedef struct {
+ 	Word			size;				// size of block in bytes, including header
+ 	Byte			lockOwner;		// lock count in high nibble, owner in low
+ 	Byte			flags;			// flags, size adj in low nibble
+ 	SWord			hOffset;			// offset/2 to handle for movables
+ 	} ChunkHeaderType;
+ typedef ChunkHeaderType* 		ChunkHeaderPtr; 
+ 
+ // Definition of ChunkHeaderType.flags --------------------------------
+ #define memChunkFlagFree		0x80		// free bit
+ #define memChunkFlagUnused1	0x40		// unused
+ #define memChunkFlagUnused2	0x20		// unused
+ #define memChunkFlagUnused3	0x10		// unused
+ #define memChunkFlagSizeAdj	0x0F		// mask for size adjustment
+ 
+ 
+ // A non-movable chunk has 0xF as the lock count
+ #define memChunkLockMask		0xF0
+ #define memChunkOwnerMask		0x0F
+ 
+ 
+ 
+ 
+ 
+ /************************************************************
+  * Structure of a Card Header.
+  * There is 1 card header for in every card that has ROM. The
+  *  card header is stored at sysCardHeaderOffset into the card.
+  *
+  * RAM only cards will not have a card header
+  *************************************************************/
+ #define	memMaxNameLen				32		// size of name and manuf fields including null
+ typedef struct {
+ 	DWord			initStack;					// initial stack pointer
+ 	DWord			resetVector;				// reset vector
+ 	DWord			signature;					// must be sysCardSignature
+ 	Word			hdrVersion;					// header version
+ 	Word			flags;						// card flags;
+ 	Byte			name[memMaxNameLen];		// card name
+ 	Byte			manuf[memMaxNameLen];	// card manufacturer's name
+ 	Word			version;						// card version
+ 	DWord			creationDate;				// card creation date
+ 	Word			numRAMBlocks;				// number of RAM blocks on card
+ 	DWord			blockListOffset;			// offset to RAM block list
+ 	Byte			reserved[164];				// to bring us to 0x100 alignment
+ 	} CardHeaderType;
+ typedef CardHeaderType*		CardHeaderPtr;
+ 
+ #define	memCardHeaderFlagRAMOnly	0x0001	// RAM only card
+ 
+ 
+ 
+ /************************************************************
+  * Structure of a Storage Header. 
+  * There is 1 of these for every "store" on a memory card. A
+  *  "store" can be all the RAM on a card or all the ROM on a card.
+  *
+  * The RAM storage header is stored at sysRAMHeader offset into the
+  *	 card. and the ROM storage header is stored at sysROMHeader offset
+  *  into the card.
+  *************************************************************/
+ typedef struct {
+ 	DWord			signature;					// must be sysStoreSignature
+ 	Word			version;						// version of header
+ 	Word			flags;						// flags
+ 	Byte			name[memMaxNameLen];		// name of store
+ 	DWord			creationDate;				// creation date
+ 	DWord			backupDate;					// last backup date
+ 	DWord			heapListOffset;			// offset to heap list for store
+ 	DWord			initCodeOffset1;			// init code for store, if any
+ 	DWord			initCodeOffset2;			// second init code for store, if any
+ 	LocalID		databaseDirID;				// local ID of database dir.
+ 	DWord			rsvSpace;					// where first heap starts.
+ 	DWord			dynHeapSpace;				// how big the dynamic heap area is
+ 													//  (always 0 for ROM stores)
+ 	DWord			firstRAMBlockSize;		// Copy of firstRAMBlock size from cardinfo
+ 													// Used to determine if we're rebooting
+ 													// with a different amount of RAM.
+ 													
+ 	// The following fields are used to store non-volatile information that
+ 	//  must be accessed by the system but that is not convenient to store
+ 	//  in a database due to access time or frequency. It is only valid
+ 	//  in the RAM STORE ON CARD #0!.
+ 	SysNVParamsType	nvParams;
+ 	
+ 	// Filler bytes - reserved for future use. Size adjusted to
+ 	// keep total size of storage header at 0x100 bytes.
+ 	Byte			reserved[176-sizeof(SysNVParamsType)];		
+ 
+ 	// CRC value
+ 	DWord			crc;							// crc to check validity	
+ 	} StorageHeaderType;
+ typedef StorageHeaderType*		StorageHeaderPtr;
+ 
+ #define	memStoreHeaderFlagRAMOnly	0x0001	// RAM store
+ 
+ 
+ // A Heap list for each store on a card (either RAM or ROM) gives a list of
+ // heaps' starting offsets for that store
+ typedef struct {
+ 	Word				numHeaps;			// Number of heaps in store
+ 	DWord				heapOffset[1];		// offset to heap
+ 	} HeapListType;
+ 	
+ 	
+ 
+ /********************************************************************
+  * CardInfo structure
+  * The Pilot globals has a pointer to an array of CardInfo structures.
+  *
+  * This array is initialized by the Boot code before the Memory Manager
+  *  starts up. Among other things, it tells the Memory Manager where 
+  *  every card is and the size of each card.
+  ********************************************************************/
+ typedef struct {
+ 
+ 	// These fields are filled in by the boot code BEFORE
+ 	//  MemInit() is called.
+ 	BytePtr		baseP;						// base address of card
+ 	DWord			size;							// address range of card
+ 	DWord			firstRAMBlockSize;		// size of RAM block at offset 0
+ 	DWord			targetROMShift;			// used only under Emulation mode, must be
+ 													//  added to emulated ROM pointers when calculating
+ 													//  a LocalID for use in the device ROM.
+ 
+ 	
+ 	DWord			cardHeaderOffset;			// offset to card header (usually in ROM)
+ 													//  = 0 if RAM only card
+ 												
+ 	DWord			rsvSpace;					// reserve space in RAM before first heap
+ 	DWord			dynHeapSpace;				// how much space to reserve for dynamic heap(s)
+ 	StorageHeaderPtr		ramStoreP;		// pointer to RAM store header 
+ 													// This location depends on how much space
+ 													//  was reserved on the card for the dynamic
+ 													//  heap.
+ 												
+ 	// These fields are copies of information in the card and storage headers
+ 	//  they are cached here for quicker access by the Memory Manager. They
+ 	//  are filled in by the Memory Manager during MemInit.
+ 	Word			numRAMHeaps;				// Number of RAM heaps - for quick access
+ 	DWordPtr		ramHeapOffsetsP;			// Table of RAM heap offsets - for quick access
+ 	Word			numROMHeaps;				// Number of RAM heaps - for quick access
+ 	DWordPtr		romHeapOffsetsP;			// Table of RAM heap offsets - for quick access
+ 
+ 	} CardInfoType;
+ typedef CardInfoType*	CardInfoPtr;
+ 
+ // The constant hwrNumCardSlots, defined in Hardware.h defines the maximum number
+ //  of cards supported by the hardware.
+ 
+ 
+ 
+ 
+ /************************************************************
+  * Private Memory Manager Constants
+  *************************************************************/
+ // Default size of the dynamic heap
+ #define 	memDynamicHeapSize		(0x08000-sysLowMemSize)
+ 
+ 
+ // Private constant - # of dynamic heaps
+ #define	memDynamicHeaps		1
+ 
+ 
+ 
+ 
+ /************************************************************
+  * Private Memory Manager Macros. These macros are not
+  *  guaranteed to be compatible in the future and should
+  *  only be used in system code, not applications.
+  *
+  * To use these, define NON_PORTABLE at the top of your
+  *  source code module.
+  *
+  * WARNING: This macro must only be used on Locked chunks!!!
+  *          When running with error checking, it will verify
+  *				that the chunk is locked before it dereferences it.
+  *************************************************************/
+ 
+ #if MEMORY_FORCE_LOCK == MEMORY_FORCE_LOCK_ON
+ 	#define	memHandleProtect(h)											\
+ 				((VoidHand)((DWord)h | 0x80000000))
+ 	#define	memHandleUnProtect(h)										\
+ 				((VoidHand)((DWord)h & 0x7FFFFFFF))
+ #else
+ 	#define	memHandleProtect(h)		(h)
+ 	#define	memHandleUnProtect(h)	(h)
+ #endif					
+ 	
+ 
+ #if MEMORY_TYPE == MEMORY_LOCAL 
+ 	#if ERROR_CHECK_LEVEL != ERROR_CHECK_NONE									 
+ 		#define	MemDeref(h) 																\
+ 			(MemHandleLockCount(h)==0 ? (*((VoidHand)0x80000000)) : (*memHandleUnProtect(h))) 
+ 	#else																					 
+ 		#define	MemDeref(h) 	 															\
+ 			(*(memHandleUnProtect(h)))	
+ 	#endif												
+ 		
+ #else
+ 	#if ERROR_CHECK_LEVEL != ERROR_CHECK_NONE									 
+ 		#define	MemDeref(h) 																\
+ 			(MemHandleLockCount(h)==0 ? (*((VoidHand)0x80000000)) : ((Ptr)ShlDWord(h))) 
+ 	#else																					 
+ 		#define	MemDeref(h) 	 															\
+ 			((Ptr)ShlDWord(memHandleUnProtect(h)))	
+ 	#endif												
+ #endif
+ 
+ #endif		// NON_PORTABLE
+ 
+ 
+ 
+ // Typecast access to the MemCardInfo Ptr
+ #define	memCardInfoP(cardNo)				\
+ 				( ((CardInfoPtr) ((LowMemHdrType*)PilotGlobalsP)->globals.memCardInfoP) + cardNo)
+ 
+ 
+ 
+ /********************************************************************
+  * Memory Manager Private Routines
+  * These are used only by internal System code
+  ********************************************************************/
+ #ifdef __cplusplus
+ extern "C" {
+ #endif
+ 
+ 
+ HeapHeaderPtr	MemHeapPtr(UInt heapID)
+ 							SYS_TRAP(sysTrapMemHeapPtr);
+ 	
+ Err				MemStoreSearch(VoidPtr startP, DWord range, StorageHeaderPtr* storePP)
+ 							SYS_TRAP(sysTrapMemStoreSearch);
+ 
+ Err				MemStoreInit(DWord firstHeapSize, UInt firstHeapMstrPtrs, 
+ 						UInt cardNo,  Word numBlocks, DWordPtr blockInfoP, 
+ 						StorageHeaderPtr storeP, Word numMstrPtrs)
+ 							SYS_TRAP(sysTrapMemStoreInit);
+ 	
+ Err				MemNVParams(Boolean set, SysNVParamsPtr paramsP)
+ 							SYS_TRAP(sysTrapMemNVParams);
+ 
+ #ifdef __cplusplus 
+ }
+ #endif
+ 
+ 
+ 
+ 
+ 
+ 
+ #endif  // __MEMORYMGRPRV_H__
+ 
diff -r -c -x *.orig -x *.rej -x #* -x *~ -N orig/gcc-2.7.2.2/PalmOS/System/ModemMgr.h gcc-2.7.2.2/PalmOS/System/ModemMgr.h
*** orig/gcc-2.7.2.2/PalmOS/System/ModemMgr.h	Thu Jan  1 01:00:00 1970
--- gcc-2.7.2.2/PalmOS/System/ModemMgr.h	Wed Feb 19 16:49:17 1997
***************
*** 0 ****
--- 1,118 ----
+ /*******************************************************************
+  * 							 Pilot Software
+  *
+  *		 Copyright(c) 1995, Palm Computing Inc., All Rights Reserved
+  *
+  *-------------------------------------------------------------------
+  * FileName:
+  *		ModemMgr.h
+  *
+  * Description:
+  *		Include file for Modem Manager
+  *
+  * History:
+  *   	9/20/95  VMK - Created by Vitaly Kruglikov
+  *
+  *******************************************************************/
+ 
+ 
+ #ifndef __MODEM_MGR_H__
+ #define __MODEM_MGR_H__
+ 
+ 
+ // Include elementary types
+ #include <Common.h>
+ #include <SysTraps.h>				// Trap Numbers.
+ 
+ 
+ 
+ /************************************************************
+  * Modem Manager constants
+  *************************************************************/
+ 
+ #define mdmMaxStringSize	40
+ 
+ #define mdmCmdBufSize		81		// command buffer capacity (including null)
+ #define mdmRespBufSize		81		// reply buffer capacity (including null)
+ #define mdmCmdSize			8		// max storage needed for smartmodem command
+ 
+ #define mdmDefCmdTimeOut			500000L		// in micro-seconds
+ 
+ #define mdmDefDTWaitSec				4
+ #define mdmDefDCDWaitSec			70
+ #define mdmDefSpeakerVolume		1
+ 
+ /************************************************************
+  * Modem Manager data structures
+  *************************************************************/
+ // Prototype for the "user cancel" check callback function
+ typedef Int (*MdmUserCanProcPtr)(DWord userRef);
+ 
+ typedef struct MdmInfoType {
+ 	UInt		serRefNum;					// serial library reference number
+ 	ULong		initialBaud;				// initial baud rate to use
+ 	ULong		cmdTimeOut;					// number of Msec to wait after a cmd
+ 	Int		dtWaitSec;					// dialtone wait (sec)
+ 	Int		dcdWaitSec;					// dcd timeout wait (sec)
+ 	Int		volume;						// speaker volume
+ 	Boolean	pulse;						// pulse or tone dialing
+ 	Boolean	hwHShake;					// enable cts/rts handshaking
+ 	Boolean	autoBaud;					// enable/disable auto-baud to connected baud rate
+ 	MdmUserCanProcPtr	canProcP;		// ptr to user-cancel function
+ 	DWord		userRef;						// parameter for canProcP()
+ 	Char		cmdBuf[mdmCmdBufSize];	// build all commands here
+ 	Char		respBuf[mdmRespBufSize];// response buffer
+ 	ULong		connectBaud;				// baud at which connection was established
+ 												// (0 = unknown)
+ 	Boolean	traceToLog;					// RESERVED FOR INTERNAL USE: when true,
+ 												// modem commands and responses are traced
+ 												// to the Sync log.
+ 	} MdmInfoType;
+ 
+ typedef MdmInfoType*		MdmInfoPtr;
+ 
+ /************************************************************
+  * Modem Manager result codes
+  * (mdmErrorClass is defined in SystemMgr.h)
+  *************************************************************/
+ #define	mdmErrNoTone			(mdmErrorClass | 1)		// no dial tone
+ #define	mdmErrNoDCD				(mdmErrorClass | 2)		// no carrier / timeout
+ #define	mdmErrBusy				(mdmErrorClass | 3)		// busy signal heard
+ #define	mdmErrUserCan			(mdmErrorClass | 4)		// cancelled by user
+ #define	mdmErrCmdError			(mdmErrorClass | 5)		// command error
+ 
+ 
+ 
+ /********************************************************************
+  * Modem Manager Routines
+  * These are define as external calls only under emulation mode or
+  *  under native mode from the module that actually installs the trap
+  *  vectors
+  ********************************************************************/
+ #ifdef __cplusplus
+ extern "C" {
+ #endif
+ 
+ //-------------------------------------------------------------------
+ // API
+ //-------------------------------------------------------------------
+ 
+ Err MdmDial(MdmInfoPtr modemP, CharPtr okDialP, CharPtr userInitP, CharPtr phoneNumP)
+ 							SYS_TRAP(sysTrapMdmDial);
+ 
+ Err MdmHangUp(MdmInfoPtr modemP)
+ 							SYS_TRAP(sysTrapMdmHangUp);
+ 
+ 
+ #ifdef __cplusplus 
+ }
+ #endif
+ 
+ 
+ 
+ /************************************************************
+  * Modem Manager Macros
+  *************************************************************/
+ 
+ #endif  // __MODEM_MGR_H__
+ 
diff -r -c -x *.orig -x *.rej -x #* -x *~ -N orig/gcc-2.7.2.2/PalmOS/System/ModemPrv.h gcc-2.7.2.2/PalmOS/System/ModemPrv.h
*** orig/gcc-2.7.2.2/PalmOS/System/ModemPrv.h	Thu Jan  1 01:00:00 1970
--- gcc-2.7.2.2/PalmOS/System/ModemPrv.h	Wed Feb 19 16:49:17 1997
***************
*** 0 ****
--- 1,90 ----
+ /*******************************************************************
+  * 							 Pilot Software
+  *
+  *		 Copyright(c) 1995, Palm Computing Inc., All Rights Reserved
+  *
+  *-------------------------------------------------------------------
+  * FileName:
+  *		ModemPrv.h
+  *
+  * Description:
+  *		Private Include file for Modem Manager
+  *
+  * History:
+  *   	9/25/95  VMK - Created by Vitaly Kruglikov
+  *
+  *******************************************************************/
+ 
+ 
+ #ifndef __MODEM_PRV_H__
+ #define __MODEM_PRV_H__
+ 
+ // Include elementary types
+ #include <Common.h>
+ 
+ 
+ 
+ /************************************************************
+  * Modem Manager constants
+  *************************************************************/
+ 
+ 
+ /************************************************************
+  * Modem Manager data structures
+  *************************************************************/
+ 
+ typedef struct MdmCommandsType {
+ 	Char		csi[mdmCmdSize];			// command sequence introducer
+ 	Char		eoc[mdmCmdSize];			// end-of-command character(s)
+ 	Char		quietCmd[mdmCmdSize];	// Q cmd: send result codes
+ 	Char		dialTone[mdmCmdSize];	// tone dial command
+ 	Char		dialPulse[mdmCmdSize];	// pulse dial command
+ 	Char		cmdEchoOff[mdmCmdSize];	// E cmd: echoes in command mode
+ 	Char		verboseCmd[mdmCmdSize];	// V cmd: word or digit result codes
+ 	Char		dtWait[mdmCmdSize];		// (S6) dialtone wait (sec)
+ 	Char		dcdWait[mdmCmdSize];		// (S7) dcd timeout wait (sec)
+ 	Char		basicxcmd[mdmCmdSize];	// sets result code level for "basic" smartmodem
+ 	Char		advxcmd[mdmCmdSize];		// sets result code level for advanced clones
+ 	Char		spkrMode[mdmCmdSize];	// speaker mode
+ 	Char		volume[mdmCmdSize];		// speaker volume prefix
+ 	Char		hupCmd[mdmCmdSize];		// hang up command
+ 	Char		firmDTRDCD[mdmCmdSize];	// DTR on, DCD on
+ 	Char		escape[mdmCmdSize];		// Escape sequence: +++
+ 	Char		reset[mdmCmdSize];		// Z cmd: reset the modem
+ 	Char		factory[mdmCmdSize];		// recall factory config
+ 	} MdmCommandsType;
+ 
+ 
+ typedef enum MdmRespIDType {
+ 	mdmRespUnknown = 0,
+ 	mdmRespOK,
+ 	mdmRespConnect,
+ 	mdmRespNoCarrier,
+ 	mdmRespError,
+ 	mdmRespNoDialTone,
+ 	mdmRespBusy,
+ 	mdmRespRing,
+ 	
+ 	mdmRespReserved = -1					// reserve -1 for internal use
+ 	} MdmRespIDType;
+ 
+ typedef struct MdmRespEntryType {
+ 	Char				subStr[20];			// response substring
+ 	MdmRespIDType	id;					// id associated with substring
+ 	} MdmRespEntryType;
+ 
+ 
+ /************************************************************
+  * Modem Manager result codes
+  * (mdmErrorClass is defined in SystemMgr.h)
+  *************************************************************/
+ //#define	mdmErrBadParam			(mdmErrorClass | 1)
+ 
+ 
+ 
+ /************************************************************
+  * Modem Manager Macros
+  *************************************************************/
+ 
+ #endif  // __MODEM_PRV_H__
+ 
diff -r -c -x *.orig -x *.rej -x #* -x *~ -N orig/gcc-2.7.2.2/PalmOS/System/PadCommn.h gcc-2.7.2.2/PalmOS/System/PadCommn.h
*** orig/gcc-2.7.2.2/PalmOS/System/PadCommn.h	Thu Jan  1 01:00:00 1970
--- gcc-2.7.2.2/PalmOS/System/PadCommn.h	Wed Feb 19 16:49:18 1997
***************
*** 0 ****
--- 1,118 ----
+ /*******************************************************************
+  * 							 Pilot Software
+  *
+  *		 Copyright(c) 1995, Palm Computing Inc., All Rights Reserved
+  *
+  *-------------------------------------------------------------------
+  * FileName:
+  *		PadCommn.h
+  *
+  * Description:
+  *		Common Packet Assembly / Disassembly Protocol(PADP) definitions.
+  *
+  * History:
+  *   	8/8/95	vmk	Created by Vitaly Marty Kruglikov
+  *
+  *******************************************************************/
+ 
+ 
+ #ifndef __PAD_COMMON_H__
+ #define __PAD_COMMON_H__
+ 
+ #include <Common.h>
+ 
+ 
+ /********************************************************************
+  * PADP Packet Format
+  ********************************************************************/
+ 
+ // The PADP packets are used for transmitting data for the Pilot PADP protocol layer.
+ // The structure of the PADP packet is built into the data part of the SLP packet and is,
+ // therefore, constrained by the SLP packet data size limitations.
+ 
+ 
+ // Packet type values used in the PADP packet header's "type" field:
+ //
+ typedef enum PadType {
+ 	padData		= 1,						// PADP data packet
+ 	padAck		= 2,						// PADP ACK packet
+ 	padUnused	= 3,						// used to be PADP NACK packet
+ 	padTickle	= 4						// PADP TICLE packet
+ 	} PadType;
+ 
+ 
+ // PADP packet header:
+ //
+ typedef struct PadHeaderType {
+ 	Byte	type;							// PADP packet type
+ 	Byte	flags;						// flags to signal special conditions
+ 	Word	sizeOrOffset;				// (high, low) --
+ 											// in the 1st padData packet of the block, this field holds the
+ 											// total block data size; in the subsequent padData packets,
+ 											// this field holds the offset of data being sent; in padNack
+ 											// packets, this field indicates the offset of the expected
+ 											// data.
+ 	} PadHeaderType;			// TOTAL: 4 bytes
+ 
+ typedef PadHeaderType*		PadHeaderPtr;
+ 
+ // Flag values used in the PADP packet header's "flags" field.  padHdrFlagFirst and
+ // padHdrFlagLast must both be set when the entire data block is being transmitted
+ // in a single PADP packet.
+ //
+ #define padHdrFlagFirst			0x80	// identifies the 1st padData packet
+ 												// of the block
+ 														
+ #define padHdrFlagLast			0x40	// identifies the last padData packet
+ 												// of the block
+ 														
+ #define padHdrFlagErrMemory	0x20	// signals remote memory error in
+ 												// padAck packets
+ 														
+ 
+ 
+ /********************************************************************
+  * PADP Protocol Parameters
+  ********************************************************************/
+ 
+ 
+ // This is the maximum amount of data(in bytes) which may be sent in a single
+ // PADP packet(not including the PADP packet header)
+ //
+ #define padMaxPktDataSize			(1*1024)
+ 
+ 
+ // This is the maximum amount of data which may be sent in one PADP block
+ //
+ #define padMaxBlockSize				((64L * 1024L) - 1L)
+ 
+ 
+ // This is the maximum number of retries for resending a given data packet
+ //
+ #define	padMaxRetries				10
+ 
+ 
+ // This is the maximum number of seconds to wait for an acknowledgement after sending
+ // a data packet
+ //
+ #define padAckWaitSec				2
+ 
+ 
+ // This is the maximum number of seconds to wait for the next data packet to begin arriving
+ //
+ #define padInterPktTimeOutSec		30		// large value for debugging
+ 
+ 
+ // default max sec. to wait for command/reply
+ //
+ #define padCmdWaitSec				30
+ #define padReplyWaitSec				30
+ 
+ 
+ /********************************************************************
+  * Macros
+  ********************************************************************/
+ 
+ 
+ 
+ #endif	// __PAD_COMMON_H__
diff -r -c -x *.orig -x *.rej -x #* -x *~ -N orig/gcc-2.7.2.2/PalmOS/System/PadServer.h gcc-2.7.2.2/PalmOS/System/PadServer.h
*** orig/gcc-2.7.2.2/PalmOS/System/PadServer.h	Thu Jan  1 01:00:00 1970
--- gcc-2.7.2.2/PalmOS/System/PadServer.h	Wed Feb 19 16:49:18 1997
***************
*** 0 ****
--- 1,206 ----
+ /*******************************************************************
+  * 							 Pilot Software
+  *
+  *		 Copyright(c) 1995, Palm Computing Inc., All Rights Reserved
+  *
+  *-------------------------------------------------------------------
+  * FileName:
+  *		PadServer.h
+  *
+  * Description:
+  *		Packet Assembly/Disassembly server-side definitions
+  *
+  * History:
+  *   	7/17/95	vmk	Created by Vitaly Marty Kruglikov
+  *
+  *******************************************************************/
+ 
+ 
+ #ifndef __PAD_SERVER_H__
+ #define __PAD_SERVER_H__
+ 
+ // Pilot common definitions
+ #include <Common.h>
+ #include <SerialLinkMgr.h>
+ 
+ // Data Manager definitions
+ #include <DataMgr.h>			// for DmOpenRef
+ 
+ // Common Session Protocol definitions
+ #include <PadCommn.h>
+ 
+ #include <PadUtil.h>
+ 
+ 
+ /********************************************************************
+  * PAD Server Parameters
+  ********************************************************************/
+ #define psrMaxPktBufSize		( sizeof(PadHeaderType) +	\
+ 										padMaxPktDataSize )
+ 
+ // psrMinSerRcvBufSize: minimum serial receive buffer size needed
+ // for PAD Server.  The extra 32 bytes are for beginning/end of queue
+ // and other serial manager overhead
+ #define psrMinSerRcvBufSize	( sizeof(SlkPktHeaderType) +	\
+ 										psrMaxPktBufSize +				\
+ 										sizeof(SlkPktFooterType) +		\
+ 										32 )
+ 
+ // psrCmdWaitIntervalSec: when waiting for the beginning of a command,
+ // the PAD receiver will wait up to this many seconds before before timing
+ // out on the first packet.  The higher-level routine will perform
+ // its regular maintenance tasks (such as checking for user cancel) around
+ // calls to the PAD receiver.
+ #define psrCmdWaitIntervalSec		2
+ 
+ 
+ /************************************************************
+  * Session Protocol result codes
+  * (padErrorClass is defined in SystemMgr.h)
+  *************************************************************/
+ 
+ #define psrErrParam			(padErrorClass | 1)		// invalid parameter
+ #define psrErrTooManyRetries	(padErrorClass | 2)	// too many retries
+ #define psrErrTimeOut		(padErrorClass | 4)		// call timed out
+ #define psrErrInUse			(padErrorClass | 5)		// PAD Server/WS manager is in use
+ #define psrErrMemory			(padErrorClass | 6)		// not enough memory
+ #define psrErrUserCan		(padErrorClass | 7)		// cancelled by user
+ #define psrErrSizeErr			(padErrorClass | 8)		// reply block is too big
+ #define psrErrBlockFormat	(padErrorClass | 9)		// block format error
+ 
+ 
+ 
+ 
+ /********************************************************************
+  * Session Manager Structures
+  ********************************************************************/
+ 
+ 
+ //
+ // Packet Assembly/Disassembly structures
+ //
+ 
+ 
+ // PAD sender-specific parameters
+ typedef struct PsrSendParamType {
+ 	Byte				remoteSocket;	// remote socket id
+ 	Byte				transID;			// transaction ID to use on block packets
+ 	
+ 	// Send segments specification:
+ 	Int				segCount;		// number of segments to send
+ 	PmSegmentPtr	segP;				// ptr to array of segments
+ 	
+ 	// Statistical information for fine-tuning and debugging:
+ 	ULong				numAttempted;	// number of data packets we attempted to send
+ 	ULong				numAcked;		// number of packets which were acked
+ 	ULong				retries;			// number of retries
+ 	} PsrSendParamType;
+ 
+ 
+ // PAD receiver-specific parameters
+ typedef struct PsrRcvParamType {
+ 	Byte				filterTransID;	// tranasaction id to filter out
+ 	DmOpenRef		dbP;				// database reference for allocating memory
+ 	
+ 	// Set by PrvReceiveCmdBlock:
+ 	VoidPtr			cmdP;				// ptr to command in dynamic heap chunk
+ 	VoidHand			cmdBufH;			// handle of command buffer chunk in data heap;
+ 	ULong				blockSize;		// size of block
+ 	ULong				rcvdLen;			// amount of data received so far
+ 	Byte				transID;			// received transaction id
+ 	Byte				remoteSocket;	// source socket
+ 	Boolean			gotTickle;		// Set to true if Tickle had been received
+ 	} PsrRcvParamType;
+ 
+ 
+ // PAD parameter for PrvSendReplyBlock and PrvReceiveCmdBlock:
+ typedef struct PsrPadParamType {
+ 	Byte				localSocket;	// local socket
+ 	SlkPktHeaderPtr	slkHdrBufP;	// ptr to buffer for serial link header
+ 	PadHeaderPtr	pktBufP;			// ptr to packet buffer of psrMaxPktBufSize bytes
+ 	Int				initTimeoutSec;// initial receiver timeout seconds
+ 
+ 	PsrSendParamType	send;			// PAD sender-specific params
+ 	PsrRcvParamType	rcv;			// PAD receiver-specific params
+ 	} PsrPadParamType;
+ 
+ typedef PsrPadParamType*	PsrPadParamPtr;
+ 
+ 
+ //
+ // PAD Server globals
+ //
+ 
+ // Prototype for the "user cancel" check callback function
+ typedef Int (*PsrUserCanProcPtr)(DWord userRef);
+ 
+ // Server globals
+ typedef struct PsrGlobalsType {
+ 	//Boolean					inUse;				// true when session is in use
+ 	//Boolean					open;					// true when session is open
+ 	Byte						serverSocket;			// session listenning socket
+ 	Int						cmdWaitSec;				// max seconds to wait for commands
+ 															// (-1 = forever)
+ 	PsrUserCanProcPtr		canProcP;				// ptr to user-cancel function
+ 	DWord						userRef;					// parameter for cancelProcP()
+ 	SlkPktHeaderType		slkHdrBuf;				// Serial Link header buffer
+ 															// packet data buffer
+ 	Word						pktBuf[(psrMaxPktBufSize+1)/2];
+ 	Byte						lastRcvdCmdTID;		// transaction id of last command received
+ 															// (for duplicate filtration)
+ 	
+ 	PsrPadParamType		pad;						// PAD routines parameter
+ 	} PsrGlobalsType;
+ 
+ typedef PsrGlobalsType*		PsrGlobalsPtr;
+ 
+ 
+ /********************************************************************
+  * Session Manager Routines
+  ********************************************************************/
+ 
+ #ifdef __cplusplus
+ extern "C" {
+ #endif
+ 
+ 
+ //
+ // Server API
+ //
+ 
+ // RETURNED:	0 on success; otherwise: psrErrParam, psrErrInUse,
+ //					psrErrMemory
+ Err PsrInit(Byte serverSocket, PsrUserCanProcPtr canProcP, DWord userRef,
+ 		Int cmdWaitSec)
+ 							SYS_TRAP(sysTrapPsrInit);
+ 
+ // MUST be called when done with the session to clean up server info
+ // if PsrInit() was successful
+ //
+ // * RETURNED:	0 on success; otherwise: psrErrParam
+ Err PsrClose(void)	SYS_TRAP(sysTrapPsrClose);
+ 
+ // * RETURNED:	0 on success; otherwise: psrErrParam, psrErrTimeOut,
+ // *				psrErrBlockFormat, psrErrUserCan
+ Err PsrGetCommand(DmOpenRef refDBP, VoidPtr* cmdPP, VoidHand* cmdBufHP,
+ 		WordPtr rcvdCmdLenP, BytePtr tidP, BytePtr remoteSocketP)
+ 							SYS_TRAP(sysTrapPsrGetCommand);
+ 
+ // * RETURNED:	0 on success; otherwise: psrErrParam, psrErrTooManyRetries,
+ // *				psrErrSizeErr, psrErrUserCan
+ Err PsrSendReply(Byte remoteSocket, Byte refTID, PmSegmentPtr segP, Int segCount)
+ 							SYS_TRAP(sysTrapPsrSendReply);
+ 
+ 
+ #ifdef __cplusplus 
+ }
+ #endif
+ 
+ 
+ /********************************************************************
+  * Session Protocol Macros
+  ********************************************************************/
+ 
+ 
+ 
+ #endif	// __PAD_SERVER_H__
diff -r -c -x *.orig -x *.rej -x #* -x *~ -N orig/gcc-2.7.2.2/PalmOS/System/PadUtil.h gcc-2.7.2.2/PalmOS/System/PadUtil.h
*** orig/gcc-2.7.2.2/PalmOS/System/PadUtil.h	Thu Jan  1 01:00:00 1970
--- gcc-2.7.2.2/PalmOS/System/PadUtil.h	Wed Feb 19 16:49:18 1997
***************
*** 0 ****
--- 1,74 ----
+ /*******************************************************************
+  * 							 Pilot Software
+  *
+  *		 Copyright(c) 1995, Palm Computing Inc., All Rights Reserved
+  *
+  *-------------------------------------------------------------------
+  * FileName:
+  *		PadUtil.h
+  *
+  * Description:
+  *		Packet Assembly/Disassembly utility definitions
+  *
+  * History:
+  *   	8/11/95	vmk	Created by Vitaly Marty Kruglikov
+  *
+  *******************************************************************/
+ 
+ 
+ #ifndef __PAD_UTIL_H__
+ #define __PAD_UTIL_H__
+ 
+ #if EMULATION_LEVEL == 1		// EMULATION_WINDOWS
+ 	
+ 	// Pilot common definitions
+ 	#include "Common.h"
+ 
+ #else	// EMULATION_LEVEL != EMULATION_WINDOWS
+ 
+ 	// Pilot common definitions
+ 	#include <Common.h>
+ 
+ #endif	// EMULATION_LEVEL == EMULATION_WINDOWS
+ 
+ #if EMULATION_WINDOWS != 1
+ 	LOGIC ERROR
+ #endif
+ 
+ 
+ // The PmSegmentType structure enables the caller to
+ // specify the block's data in multiple non-contiguous segments.  For example, when
+ // sending a record, DesktopLink will specify the function header, the argument wrapper,
+ // the fixed record info, and the record data as two or more segments(one or more segments
+ // for the fixed structures and one segment for the record data).  In such an instance,
+ // it is not practical(and sometimes not possible) to allocate a single data buffer to
+ // contain all that information contiguously.
+ //
+ typedef struct PmSegmentType {
+ 	VoidPtr		dataP;				// ptr to segment data
+ 	Word			dataSize;			// segment data size in bytes
+ 	Boolean		wordAlign;			// if true, this segments data will be sent
+ 											// at an even offset from the start of the
+ 											// block, padding the previous segment's
+ 											// data with a null byte, if necessary
+ 	} PmSegmentType;
+ 
+ typedef PmSegmentType*		PmSegmentPtr;
+ 
+ 
+ #ifdef __cplusplus
+ extern "C" {
+ #endif
+ 
+ ULong PmAddSegmentSizes(Int segCount, PmSegmentType seg[]);
+ 
+ ULong	PmCopyFromSegments(VoidPtr bufP, Int segCount, PmSegmentType seg[],
+ 			ULong blockOffset, ULong maxSize);
+ 
+ 
+ #ifdef __cplusplus 
+ }
+ #endif
+ 
+ 
+ #endif	// __PAD_UTIL_H__
diff -r -c -x *.orig -x *.rej -x #* -x *~ -N orig/gcc-2.7.2.2/PalmOS/System/PadWS.h gcc-2.7.2.2/PalmOS/System/PadWS.h
*** orig/gcc-2.7.2.2/PalmOS/System/PadWS.h	Thu Jan  1 01:00:00 1970
--- gcc-2.7.2.2/PalmOS/System/PadWS.h	Wed Feb 19 16:49:18 1997
***************
*** 0 ****
--- 1,211 ----
+ /*******************************************************************
+  * 							 Pilot Software
+  *
+  *		 Copyright(c) 1995, Palm Computing Inc., All Rights Reserved
+  *
+  *-------------------------------------------------------------------
+  * FileName:
+  *		PadWS.h
+  *
+  * Description:
+  *		Packet Assembly/Disassembly workstation-side definitions
+  *
+  * History:
+  *   	8/11/95	vmk	Created by Vitaly Marty Kruglikov
+  *
+  *******************************************************************/
+ 
+ 
+ #ifndef __PAD_WS_H__
+ #define __PAD_WS_H__
+ 
+ 
+ 
+ #if EMULATION_LEVEL == 1		// EMULATION_WINDOWS
+ 	
+ 	// Pilot common definitions
+ 	#include "Common.h"
+ 	#include "SerLink.h"
+ 
+ 	// PAD Protocol definitions
+ 	#include "PadCommn.h"
+ 	#include "PadUtil.h"
+ 	
+ #else	// EMULATION_LEVEL != EMULATION_WINDOWS
+ 	
+ 	// Pilot common definitions
+ 	#include <Common.h>
+ 	#include <SerialLinkMgr.h>
+ 	
+ 	// PAD Protocol definitions
+ 	#include <PadCommn.h>
+ 	#include <PadUtil.h>
+ 	
+ #endif	// EMULATION_LEVEL == EMULATION_WINDOWS
+ 
+ #if EMULATION_WINDOWS != 1
+ 	LOGIC ERROR
+ #endif
+ 
+ 
+ /********************************************************************
+  * Session Manager Parameters
+  ********************************************************************/
+ #define pmMaxPktBufSize		( sizeof(PadHeaderType) +	\
+ 										padMaxPktDataSize )
+ 
+ // pmReplyWaitIntervalSec: when waiting for the beginning of a reply,
+ // the PAD receiver will wait up to this many seconds before before timing
+ // out on the first packet.  The higher-level routine will perform
+ // its regular maintenance tasks (such as checking for user cancel) around
+ // calls to the PAD receiver.
+ #define pmReplyWaitIntervalSec		2
+ 
+ 
+ /************************************************************
+  * Session Protocol result codes
+  * (padErrorClass is defined in SystemMgr.h)
+  *************************************************************/
+ 
+ #define pmErrParam			(padErrorClass | 1)		// invalid parameter
+ #define pmErrTooManyRetries	(padErrorClass | 2)	// too many retries
+ #define pmErrTimedOut		(padErrorClass | 4)		// call timed out
+ #define pmErrInUse			(padErrorClass | 5)		// PAD Server/WS manager is in use
+ #define pmErrMemory			(padErrorClass | 6)		// not enough memory
+ #define pmErrUserCan			(padErrorClass | 7)		// cancelled by user
+ #define pmErrSizeErr			(padErrorClass | 8)		// reply block is too big
+ #define pmErrBlockFormat	(padErrorClass | 9)		// block format error
+ #define pmErrBufTooSmall	(padErrorClass | 10)		// buffer is too small
+ #define pmErrRemoteMemory	(padErrorClass | 11)		// remote memory error
+ 
+ 
+ 
+ 
+ /********************************************************************
+  * Session Manager Structures
+  ********************************************************************/
+ 
+ 
+ //
+ // Packet Assembly/Disassembly structures
+ //
+ 
+ // PAD sender-specific parameters
+ typedef struct PmSendParamType {
+ 	// Send segments specification:
+ 	Int				segCount;		// number of segments to send
+ 	PmSegmentPtr	segP;				// ptr to array of segments
+ 	
+ 	// Statistical information for fine-tuning and debugging:
+ 	ULong				numAttempted;	// number of data packets we attempted to send
+ 	ULong				numSucceeded;	// number of packets successfully sent
+ 	ULong				retries;			// number of retries
+ 	} PmSendParamType;
+ 
+ 
+ // PAD receiver-specific parameters
+ typedef struct PmRcvParamType {
+ 	VoidPtr			rcvBufP;			// ptr to receive buffer
+ 	ULong				rcvBufSize;		// receive buffer size
+ 
+ 	// Set by PrvReceiveReplyBlock:
+ 	ULong				blockSize;		// size of block
+ 	ULong				rcvdLen;			// amount of data received so far
+ 	} PmRcvParamType;
+ 
+ 
+ // PAD parameter for PrvSendCommandBlock and PrvReceiveReplyBlock:
+ typedef struct PmPadParamType {
+ 	Byte				localSocket;	// local socket
+ 	Byte				remoteSocket;	// remote socket
+ 	SlkPktHeaderPtr	slkHdrBufP;	// ptr to buffer for serial link header
+ 	PadHeaderPtr	pktBufP;			// ptr to packet buffer of pmMaxPktBufSize bytes
+ 	Int				initTimeoutSec;// initial receiver timeout seconds
+ 	Byte				transID;			// current command/reply transaction ID
+ 
+ 	PmSendParamType	send;			// PAD sender-specific params
+ 	PmRcvParamType		rcv;			// PAD receiver-specific params
+ 	} PmPadParamType;
+ 
+ typedef PmPadParamType*	PmPadParamPtr;
+ 
+ 
+ 
+ //
+ // PAD Manager Workstation-end globals
+ //
+ 
+ // Prototype for the "user cancel" check callback function
+ typedef Int (*PmUserCanProcPtr)(DWord userRef);
+ 
+ typedef struct PmWSGlobalsType {
+ 	Int						replyWaitSec;			// maximum number of seconds to
+ 															// wait for a command reply
+ 
+ 	PmUserCanProcPtr		canProcP;				// ptr to user-cancel function
+ 	DWord						userRef;					// parameter for cancelProcP()
+ 
+ 	SlkPktHeaderType		slkHdrBuf;				// serial link header buffer
+ 															// packet data buffer
+ 	Word						pktBuf[(pmMaxPktBufSize+1)/2];
+ 
+ 	// Transaction id of last request which we originated
+ 	Byte						lastTID;					// last sent transaction id
+ 	
+ 	PmPadParamType			pad;						// PAD routines parameter
+ 	} PmWSGlobalsType;
+ 
+ typedef PmWSGlobalsType*		PmWSGlobalsPtr;
+ 
+ 
+ 
+ /********************************************************************
+  * Session Manager Routines
+  ********************************************************************/
+ 
+ #ifdef __cplusplus
+ extern "C" {
+ #endif
+ 
+ 
+ //
+ // Workstation API
+ //
+ 
+ // RETURNED:	0 on success; otherwise: pmErrParam, pmErrInUse,
+ //					pmErrMemory
+ Err PmInitWS(Byte wsSocket, Byte serverSocket, PmUserCanProcPtr canProcP,
+ 		DWord userRef, Int replyWaitSec);
+ 
+ // MUST be called when done with the session to clean up workstation info
+ // if PmInitWS() was successful
+ //
+ // * RETURNED:	0 on success
+ Err PmCloseWS(void);
+ 
+ //	* RETURNED:	0 on success;
+ Err PmSendTickle(void);
+ 
+ //	* RETURNED:	0 on success; otherwise: pmErrParam, pmErrTimedOut,
+ // *				pmErrBlockFormat, pmErrUserCan, pmErrSizeErr, pmErrBufTooSmall
+ Err PmSendCommand(PmSegmentPtr cmdSegP, Int cmdSegCount, Int replyWaitSec,
+ 		VoidPtr replyBufP, ULong replyBufSize, WordPtr replyLenP,
+ 		WordPtr actRcvdLenP);
+ 
+ //	* RETURNED:	0 on success; otherwise: pmErrParam, pmErrTimedOut,
+ // *				pmErrBlockFormat, pmErrUserCan, pmErrSizeErr, pmErrBufTooSmall
+ Err PmReceiveReply( Int replyWaitSec, Byte refTID, VoidPtr replyBufP,
+ 		ULong replyBufSize, WordPtr replyLenP, WordPtr actRcvdLenP);
+ 
+ #ifdef __cplusplus 
+ }
+ #endif
+ 
+ 
+ /********************************************************************
+  * Session Protocol Macros
+  ********************************************************************/
+ 
+ 
+ 
+ #endif	// __PAD_WS_H__
diff -r -c -x *.orig -x *.rej -x #* -x *~ -N orig/gcc-2.7.2.2/PalmOS/System/PenMgr.h gcc-2.7.2.2/PalmOS/System/PenMgr.h
*** orig/gcc-2.7.2.2/PalmOS/System/PenMgr.h	Thu Jan  1 01:00:00 1970
--- gcc-2.7.2.2/PalmOS/System/PenMgr.h	Wed Feb 19 16:49:18 1997
***************
*** 0 ****
--- 1,95 ----
+ /*******************************************************************
+  * 							 Pilot Software
+  *
+  *		 Copyright(c) 1994, Palm Computing Inc., All Rights Reserved  
+  *
+  *-------------------------------------------------------------------
+  * FileName:
+  *		PenMgr.h
+  *
+  * Description:
+  *		Include file for Pen manager
+  *
+  * History:
+  *   	6/5/96 Created by Ron Marianetti
+  *
+  *******************************************************************/
+ 
+ #ifndef __PEN_MGR_H
+ #define __PEN_MGR_H
+ 
+ // Pilot common definitions
+ #include <Common.h>
+ #include <SystemMgr.h>
+ 
+ 
+ /********************************************************************
+  * Pen Manager Errors
+  * the constant serErrorClass is defined in SystemMgr.h
+  ********************************************************************/
+ #define	penErrBadParam				(penErrorClass | 1)
+ 
+ 
+ 
+ /********************************************************************
+  * Pen manager Routines
+  ********************************************************************/
+ #ifdef __cplusplus
+ extern "C" {
+ #endif
+ 
+ 
+ // Initializes the Pen Manager
+ Err	PenOpen(void)
+ 				SYS_TRAP(sysTrapPenOpen);
+ 
+ // Closes the Pen Manager and frees whatever memory it allocated
+ Err 	PenClose(void)
+ 				SYS_TRAP(sysTrapPenClose);
+ 				
+ 
+ // Put pen to sleep
+ Err	PenSleep(void)
+ 				SYS_TRAP(sysTrapPenSleep);
+ 
+ // Wake pen
+ Err	PenWake(void)
+ 				SYS_TRAP(sysTrapPenWake);
+ 				
+ 
+ // Get the raw pen coordinates from the hardware. 
+ Err 	PenGetRawPen(PointType* penP)
+ 				SYS_TRAP(sysTrapPenGetRawPen);
+ 				
+ // Reset calibration in preparation for setting it again
+ Err	PenResetCalibration (void)
+ 				SYS_TRAP(sysTrapPenResetCalibration);
+ 
+ // Set calibration settings for the pen
+ Err	PenCalibrate (PointType* digTopLeftP, PointType* digBotRightP,
+ 					PointType* scrTopLeftP, PointType* scrBotRightP)
+ 				SYS_TRAP(sysTrapPenCalibrate);
+ 
+ // Scale a raw pen coordinate into screen coordinates
+ Err 	PenRawToScreen(PointType* penP)
+ 				SYS_TRAP(sysTrapPenRawToScreen);
+ 				
+ // Scale a screen pen coordinate back into a raw coordinate
+ Err 	PenScreenToRaw(PointType* penP)
+ 				SYS_TRAP(sysTrapPenScreenToRaw);
+ 				
+ 
+ #ifdef __cplusplus
+ }
+ #endif
+ 
+ 	
+ /************************************************************
+  * Assembly Function Prototypes
+  *************************************************************/
+ #define	_PenGetRawPen		\
+ 				ASM_SYS_TRAP(sysTrapPenGetRawPen)
+ 
+ 
+ 
+ #endif	//__PEN_MGR_H
diff -r -c -x *.orig -x *.rej -x #* -x *~ -N orig/gcc-2.7.2.2/PalmOS/System/PenPrv.h gcc-2.7.2.2/PalmOS/System/PenPrv.h
*** orig/gcc-2.7.2.2/PalmOS/System/PenPrv.h	Thu Jan  1 01:00:00 1970
--- gcc-2.7.2.2/PalmOS/System/PenPrv.h	Wed Feb 19 16:49:18 1997
***************
*** 0 ****
--- 1,67 ----
+ /*******************************************************************
+  * 							 Pilot Software
+  *
+  *		 Copyright(c) 1994, Palm Computing Inc., All Rights Reserved  
+  *
+  *-------------------------------------------------------------------
+  * FileName:
+  *		PenPrv.h
+  *
+  * Description:
+  *		Private Include file for Pen manager
+  *
+  * History:
+  *   	6/5/96 Created by Ron Marianetti
+  *
+  *******************************************************************/
+ 
+ #ifdef	NON_PORTABLE
+ #ifndef __PEN_PRV_H
+ #define __PEN_PRV_H
+ 
+ 
+ /********************************************************************
+  * Pen Manager Constants
+  ********************************************************************/
+ #define	penCalibrateTop			10
+ #define	penCalibrateLeft			10
+ #define	penCalibrateBottom		(hwrDisplayHeight-10)
+ #define	penCalibrateRight			(hwrDisplayWidth-10)
+ 
+ #define	penInitDelay				30
+ #define	penInitMaxDDZ				12			// max change allowed in dx or dy between
+ 														//  2 samples.
+ 
+ /********************************************************************
+  * Pen Manager Globals
+  ********************************************************************/
+ typedef struct PenGlobalsType {
+ 	UInt				xOffset, yOffset;
+ 	UInt				xScale, yScale;
+ 	
+ 	// This variable is incremented every time we detect the pen up,
+ 	//  until we've seen it enough times to believe it.
+ 	UInt				penRising;
+ 	
+ 	// We keep this information around in order to throw out invalid
+ 	//  points. Invalid points are most likey to occur as the pen is lifted
+ 	//  and we filter them by throwing out points that show a drastic
+ 	//  change in velocity in either the x or y direction
+ 	Int				lastX;			// x of last point (-1 if no previous point)
+ 	Int				lastY;			// y of last point
+ 	Int				lastDX;			// delta y of previous 2 points
+ 	Int				lastDY;			// delta x of previous 2 points
+ 	
+ 	
+ 	// Parameters for filter
+ 	UInt				delay;			// delay before reading A/D
+ 	UInt				maxDDZ;			// max 2nd derivative.
+ 	
+ 	} PenGlobalsType;
+ 	
+ typedef PenGlobalsType*	PenGlobalsPtr;
+ 
+ 
+ 
+ #endif	//__PEN_MGR_H
+ #endif 	// NON_PORTABLE
\ No newline at end of file
diff -r -c -x *.orig -x *.rej -x #* -x *~ -N orig/gcc-2.7.2.2/PalmOS/System/Preferences.h gcc-2.7.2.2/PalmOS/System/Preferences.h
*** orig/gcc-2.7.2.2/PalmOS/System/Preferences.h	Thu Jan  1 01:00:00 1970
--- gcc-2.7.2.2/PalmOS/System/Preferences.h	Wed Feb 19 16:49:18 1997
***************
*** 0 ****
--- 1,179 ----
+ /*******************************************************************
+  * 							 Pilot Software
+  *
+  *		 Copyright(c) 1995, Palm Computing Inc., All Rights Reserved
+  *
+  *-------------------------------------------------------------------
+  * FileName:
+  *		Preferences.h
+  *
+  * Description:
+  *		Header for the system preferences
+  *
+  * History:
+  *   	2/31/95  rsf - Created by Roger Flores
+  *
+  *******************************************************************/
+ 
+ #ifndef __PREFERENCES_H__
+ #define __PREFERENCES_H__
+ 
+ 
+ /***********************************************************************
+  *	Constants
+  ***********************************************************************/
+ 
+ #define preferenceDataVersion	1
+ 
+ #define defaultAutoOffDuration	2			//	minutes
+ 
+ #define prefFileTData			'PREF'		//	Database file type
+ 
+ #if EMULATION_LEVEL == EMULATION_NONE
+ 	#define defaultSysSoundLevel		slOn
+ 	#define defaultAlarmSoundLevel	slOn
+ #else	// EMULATION_LEVEL != EMULATION_NONE
+ 	#define defaultSysSoundLevel		slOff
+ 	#define defaultAlarmSoundLevel	slOn
+ #endif
+ 
+ //	This is Marketing's official list of countries.  I didn't make this
+ //	up - kcr.
+ typedef enum {
+ 	Australia,
+ 	Austria,
+ 	BelgiumDutch,
+ 	BelgiumFrench,
+ 	Brazil,
+ 	CanadaEnglish,
+ 	CanadaFrench,
+ 	Denmark,
+ 	Finland,
+ 	France,
+ 	Germany,
+ 	Iceland,
+ 	Ireland,
+ 	Italy,
+ 	Japan,
+ 	Mexico,
+ 	Netherlands,
+ 	NewZealand,
+ 	Norway,
+ 	Portugal,
+ 	SouthKorea,
+ 	Spain,
+ 	Sweden,
+ 	SwitzerlandFrench,
+ 	SwitzerlandGerman,
+ 	SwitzerlandItalian,
+ 	Taiwan,
+ 	UnitedStates,
+ 	UnitedKingdom
+ 	} CountryType;
+ 	
+ typedef enum {
+ 	tfColon,
+ 	tfColonAMPM,
+ 	tfColon24h,
+ 	tfDot,
+ 	tfDotAMPM,
+ 	tfDot24h,
+ 	tfHoursAMPM,
+ 	tfHours24h
+ 	} TimeFormatType;
+ 	
+ //	These sound levels must corrospond to positions in the popup lists
+ //	used by the preferences app.
+ typedef enum {
+ 	slOn = 0,
+ 	slOff = 1
+ 	} SoundLevelType;
+ 	
+ 
+ // pass a TimeFormatType	
+ #define Use24HourFormat(t) ((t) == tfColon24h || (t) == tfDot24h || (t) == tfHours24h)
+ #define TimeSeparator(t) ( t >= tfDot ? '.' : ':')
+ 
+ 
+ typedef enum {
+ 	dfMDYWithSlashes,		// 12/31/95
+ 	dfDMYWithSlashes,		// 31/12/95
+ 	dfDMYWithDots,			// 31.12.95
+ 	dfDMYWithDashes,		// 31-12-95
+ 	dfYMDWithSlashes,		// 95/12/31
+ 	dfYMDWithDots,			// 95.12.31
+ 	dfYMDWithDashes,		// 95-12-31
+ 
+ 	dfMDYLongWithComma,	// Dec 31, 1995
+ 	dfDMYLong,				// 31 Dec 1995
+ 	dfDMYLongWithDot,		// 31. Dec 1995
+ 	dfDMYLongNoDay,		// Dec 1995
+ 	dfDMYLongWithComma,	//	31 Dec, 1995
+ 	dfYMDLongWithDot,		//	1995.12.31
+ 
+ 	dfMYMed					//	Dec '95
+ 	} DateFormatType;
+ 
+ 
+ // The number format (thousands separator and decimal point).
+ typedef enum {
+ 	nfCommaPeriod,
+ 	nfPeriodComma,
+ 	nfSpaceComma,
+ 	nfApostrophePeriod
+ 	} NumberFormatType;
+ 
+ 	
+ 
+ 	
+ typedef struct {
+ 	Word version;							// Version of preference info
+ 	
+ 	// International preferences
+ 	CountryType country;					// Country the device is in
+ 	DateFormatType dateFormat;			// Format to display date in
+ 	DateFormatType longDateFormat;	// Format to display date in
+ 	Byte weekStartDay;					// Sunday or Monday
+ 	TimeFormatType timeFormat;			// Format to display time in
+ 	NumberFormatType numberFormat;	// Format to display numbers in
+ 	
+ 	// system preferences
+ 	Byte autoOffDuration;				// Time period before shutting off
+ 	SoundLevelType sysSoundLevel;		//	High, Med, Low, Off - error beeps
+ 	SoundLevelType alarmSoundLevel;	//	High, Med, Low, Off - alarm only
+ 	Boolean hideSecretRecords;			// True to not display records with
+ 												// their secret bit attribute set
+ 	Boolean deviceLocked;				// Device locked until the system
+ 												// password is entered
+ 	Word		sysPrefFlags;				// Miscellaneous system pref flags
+ 												//  copied into the global GSysPrefFlags
+ 												//  at boot time.
+ 	SysBatteryKind	sysBatteryKind;	// The type of batteries installed. This
+ 												// is copied into the globals GSysbatteryKind
+ 												//  at boot time.
+ 	
+ 	} SystemPreferencesType;
+ 
+ 
+ 	
+ typedef SystemPreferencesType * SystemPreferencesPtr;
+ 
+ 
+ extern DmOpenRef PrefOpenPreferenceDB (void)
+ 		SYS_TRAP(sysTrapPrefOpenPreferenceDB);
+ 
+ extern void PrefGetPreferences(SystemPreferencesPtr p)
+ 		SYS_TRAP(sysTrapPrefGetPreferences);
+ 
+ extern void PrefSetPreferences(SystemPreferencesPtr p)
+ 		SYS_TRAP(sysTrapPrefSetPreferences);
+ 
+ extern Boolean PrefGetAppPreferences (ULong type, Int version, VoidPtr prefs,
+ 	Word prefsSize)
+ 		SYS_TRAP(sysTrapPrefGetAppPreferences);
+ 
+ void PrefSetAppPreferences (ULong type, Int version, VoidPtr prefs,
+ 	Word prefsSize)
+ 		SYS_TRAP(sysTrapPrefSetAppPreferences);
+ 
+ #endif	// __PREFERENCES_H__
diff -r -c -x *.orig -x *.rej -x #* -x *~ -N orig/gcc-2.7.2.2/PalmOS/System/SerialLib68328.h gcc-2.7.2.2/PalmOS/System/SerialLib68328.h
*** orig/gcc-2.7.2.2/PalmOS/System/SerialLib68328.h	Thu Jan  1 01:00:00 1970
--- gcc-2.7.2.2/PalmOS/System/SerialLib68328.h	Wed Feb 19 16:49:18 1997
***************
*** 0 ****
--- 1,59 ----
+ /*******************************************************************
+  * 							 Pilot Software
+  *
+  *		 Copyright(c) 1994, Palm Computing Inc., All Rights Reserved  
+  *
+  *-------------------------------------------------------------------
+  * FileName:
+  *		SerialLib68328.h
+  *
+  * Description:
+  *		Include file for 68328 Serial Library
+  *
+  * History:
+  *   	2/7/95 Created by Ron Marianetti
+  *		vmk	8/21/95	Added defQData field to serial globals
+  *
+  *******************************************************************/
+ 
+ #ifndef __SERIAL_LIB_68328_H
+ #define __SERIAL_LIB_68328_H
+ 
+ 
+ // Pilot common definitions
+ #include <SerialMgr.h>
+ 
+ 
+ /********************************************************************
+  * Serial Globals 
+  ********************************************************************/
+ typedef struct SerGlobalsType {
+ 	UInt					openCount;			// # of times we've been opened
+ 	Int					port;					// DOLATER... NOT NEEDED ???
+ 	SerSettingsType	settings;
+ 	Word					lineErrors;			// line errors bitfield
+ 	
+ 	// Receive Queue. When the queue is empty, qStart == qEnd. When the queue
+ 	//  is full, qStart = qEnd-1 (taking wrap-around into account if necessary).
+ 	Word					qStart;				// start offset of queue
+ 	Word					qEnd;					// end offset of queue
+ 	Word					qSize;				// size of queue
+ 	Ptr					qData;				// pointer to queue data
+ 	Ptr					defQData;			// pointer to default queue data
+ 	
+ 	// Receive Queue semaphore info
+ 	Word					smSignalSize;		// How much the semaphore is waiting for
+ 	Long					smID;					// semaphore ID
+ 	
+ 	DWord					lastRcvTicks;		// tick count of last received char
+ 
+ 	// For debugging
+ 	Word					numReceived;		// # of chars received since serial manager opened
+ 	Word					lastErrorStatus;	// receiver status of last line error
+ 	Word					numRcvErrors;		// # of receive line errors since serial manager opened
+ 	} SerGlobalsType;
+ typedef SerGlobalsType*	SerGlobalsPtr;
+ 
+ #define	serDefaultRcvBufferSize	0x200
+ 
+ #endif	//__SERIAL_LIB_68328_H
diff -r -c -x *.orig -x *.rej -x #* -x *~ -N orig/gcc-2.7.2.2/PalmOS/System/SerialLib68681.h gcc-2.7.2.2/PalmOS/System/SerialLib68681.h
*** orig/gcc-2.7.2.2/PalmOS/System/SerialLib68681.h	Thu Jan  1 01:00:00 1970
--- gcc-2.7.2.2/PalmOS/System/SerialLib68681.h	Wed Feb 19 16:49:18 1997
***************
*** 0 ****
--- 1,58 ----
+ /*******************************************************************
+  * 							 Pilot Software
+  *
+  *		 Copyright(c) 1994, Palm Computing Inc., All Rights Reserved  
+  *
+  *-------------------------------------------------------------------
+  * FileName:
+  *		SerialLib68328.h
+  *
+  * Description:
+  *		Include file for 68328 Serial Library
+  *
+  * History:
+  *   	2/7/95 Created by Ron Marianetti
+  *		vmk	8/21/95	Added defQData field to serial globals
+  *
+  *******************************************************************/
+ 
+ #ifndef __SERIAL_LIB_68681_H
+ #define __SERIAL_LIB_68681_H
+ 
+ 
+ // Pilot common definitions
+ #include <SerialMgr.h>
+ 
+ 
+ /********************************************************************
+  * Serial Globals 
+  ********************************************************************/
+ typedef struct SerGlobalsType {
+ 	UInt					openCount;			// # of times we've been opened
+ 	Int					port;
+ 	SerSettingsType	settings;
+ 	Word					lineErrors;			// line errors bitfield
+ 	
+ 
+ 	VoidPtr				chanP;				// pointer to this channel base in UART
+ 	Boolean				staticGlobals;		// true when initialized for debugger only
+ 	
+ 	// Receive Queue. When the queue is empty, qStart == qEnd. When the queue
+ 	//  is full, qStart = qEnd-1 (taking wrap-around into account if necessary).
+ 	Word					qStart;				// start offset of queue
+ 	Word					qEnd;					// end offset of queue
+ 	Word					qSize;				// size of queue
+ 	Ptr					qData;				// pointer to queue data
+ 	Ptr					defQData;			// pointer to default queue data
+ 	
+ 	// Receive Queue semaphore info
+ 	Word					smSignalSize;		// How much the semaphore is waiting for
+ 	Long					smID;					// semaphore ID 
+ 
+ 	Byte					currentIMR;			// current value of interrupt mask register
+ 	} SerGlobalsType;
+ typedef SerGlobalsType*	SerGlobalsPtr;
+ 
+ #define	serDefaultRcvBufferSize	0x200
+ 
+ #endif	//__SERIAL_LIB_68681_H
diff -r -c -x *.orig -x *.rej -x #* -x *~ -N orig/gcc-2.7.2.2/PalmOS/System/SerialLibMac.h gcc-2.7.2.2/PalmOS/System/SerialLibMac.h
*** orig/gcc-2.7.2.2/PalmOS/System/SerialLibMac.h	Thu Jan  1 01:00:00 1970
--- gcc-2.7.2.2/PalmOS/System/SerialLibMac.h	Wed Feb 19 16:49:18 1997
***************
*** 0 ****
--- 1,46 ----
+ /*******************************************************************
+  * 							 Pilot Software
+  *
+  *		 Copyright(c) 1995, Palm Computing Inc., All Rights Reserved  
+  *
+  *-------------------------------------------------------------------
+  * FileName:
+  *		SerialLibMac.h
+  *
+  * Description:
+  *		Include file for Mac Serial Library
+  *
+  * History:
+  *   	6/30/95 Created by Vitaly Kruglikov
+  *
+  *******************************************************************/
+ 
+ #ifndef __SERIAL_LIB_MAC_H
+ #define __SERIAL_LIB_MAC_H
+ 
+ 
+ // Pilot common definitions
+ #include "Common.h"
+ #include "SerialMgr.h"
+ 
+ 
+ /********************************************************************
+  * Serial Globals
+  ********************************************************************/
+ typedef struct SerMacGlobalsType {
+ 	UInt					refNum;				// port reference number
+ 	UInt					openCount;			// number of times we have been opened
+ 	UInt					port;
+ 	SerSettingsType	settings;
+ 	Word					lineErrors;			// line errors bitfield
+ 	
+ 	short					inRefNum;			// input driver reference number
+ 	short					outRefNum;			// output driver reference number
+ 	Ptr					inBufP;				// custom input buffer ptr
+ 	} SerMacGlobalsType;
+ typedef SerMacGlobalsType*	SerMacGlobalsPtr;	
+ 
+ #define	serDefaultRcvBufferSize	(30*1024)
+ 
+ 
+ #endif	//__SERIAL_LIB_MAC_H
diff -r -c -x *.orig -x *.rej -x #* -x *~ -N orig/gcc-2.7.2.2/PalmOS/System/SerialLinkMgr.h gcc-2.7.2.2/PalmOS/System/SerialLinkMgr.h
*** orig/gcc-2.7.2.2/PalmOS/System/SerialLinkMgr.h	Thu Jan  1 01:00:00 1970
--- gcc-2.7.2.2/PalmOS/System/SerialLinkMgr.h	Wed Feb 19 16:49:18 1997
***************
*** 0 ****
--- 1,432 ----
+ /*******************************************************************
+  * 							 Pilot Software
+  *
+  *		 Copyright(c) 1994, Palm Computing Inc., All Rights Reserved  
+  *
+  *-------------------------------------------------------------------
+  * FileName:
+  *		SerialLinkMgr.c
+  *
+  * Description:
+  *		Source for Serial Link Routines on Pilot
+  *
+  * History:
+  *   	2/6/95 replaces DSerial.h from Debugger 
+  *
+  *******************************************************************/
+ 
+ #ifndef __SERIAL_LINK_H
+ #define __SERIAL_LINK_H
+ 
+ 
+ 
+ // Pilot common definitions
+ #include <Common.h>
+ #include <SystemMgr.h>
+ 
+ 
+ 
+ //*************************************************************************
+ //   Pre-defined, fixxed  Socket ID's
+ //*************************************************************************
+ #define		slkSocketDebugger			0			// Debugger Socket
+ #define		slkSocketConsole			1			// Console Socket
+ #define		slkSocketRemoteUI			2			// Remote UI Socket
+ #define		slkSocketDLP				3			// Desktop Link Socket
+ #define		slkSocketFirstDynamic	4			// first dynamic socket ID
+ 
+ 
+ //*************************************************************************
+ //  Packet Types
+ //*************************************************************************
+ #define		slkPktTypeSystem			0			// System packets
+ #define		slkPktTypeUnused1			1			// used to be: Connection Manager packets
+ #define		slkPktTypePAD				2			// PAD Protocol packets
+ #define		slkPktTypeLoopBackTest	3			// Loop-back test packets
+ 
+ 
+ 
+ //*************************************************************************
+ //
+ // Packet structure:
+ //		header
+ //		body (0-dbgMaxPacketBodyLength bytes of data)
+ //		footer
+ //
+ //*************************************************************************
+ 
+ //----------------------------------------------------------------------
+ // packet header
+ // Fields marked with -> must be filled in by caller
+ // Fields marked with X  will be filled in by SlkSendPacket.
+ //----------------------------------------------------------------------
+ 
+ typedef	Byte	SlkPktHeaderChecksum;
+ 
+ typedef struct SlkPktHeaderType {
+ 	Word						signature1;				// X  first 2 bytes of signature
+ 	Byte						signature2;				// X  3 and final byte of signature
+ 	Byte						dest;						// -> destination socket Id
+ 	Byte						src;						// -> src socket Id
+ 	Byte						type;						// -> packet type
+ 	Word						bodySize;				// X  size of body
+ 	Byte						transId;					// -> transaction Id
+ 															//    if 0 specified, it will be replaced 
+ 	SlkPktHeaderChecksum	checksum;				// X  check sum of header
+ 	} SlkPktHeaderType;
+ 
+ typedef SlkPktHeaderType*	SlkPktHeaderPtr;
+ 
+ #define	slkPktHeaderSignature1	0xBEEF
+ #define	slkPktHeaderSignature2	0xED
+ 
+ #define	slkPktHeaderSigFirst		0xBE			// First byte
+ #define	slkPktHeaderSigSecond	0xEF			// second byte
+ #define	slkPktHeaderSigThird		0xED			// third byte
+ 
+ //----------------------------------------------------------------------
+ // packet footer
+ //----------------------------------------------------------------------
+ typedef struct SlkPktFooterType {
+ 	Word		crc16;				// header and body crc
+ 	} SlkPktFooterType;
+ 
+ typedef SlkPktFooterType*	SlkPktFooterPtr;
+ 
+ 
+ //*************************************************************************
+ //
+ // Write Data Structure passed to SlkSendPacket. This structure 
+ //  Tells SlkSendPacket where each of the chunks that comprise the body are
+ //  and the size of each. SlkSendPacket accepts a pointer to an array
+ //  of SlkWriteDataTypes, the last one has a size field of 0.
+ //
+ //*************************************************************************
+ typedef struct SlkWriteDataType {
+ 	Word		size;					// last one has size of 0
+ 	void*		dataP;				// pointer to data
+ 	} SlkWriteDataType;
+ typedef SlkWriteDataType*	SlkWriteDataPtr;
+ 
+ 
+ 
+ 
+ //*************************************************************************
+ //
+ // CPU-dependent macros for getting/setting values from/to packets
+ //
+ //*************************************************************************
+ 
+ //--------------------------------------------------------------------
+ // macros to get packet values
+ //--------------------------------------------------------------------
+ 
+ #define	slkGetPacketByteVal(srcP)	(*(BytePtr)(srcP))
+ 
+ 
+ #if (CPU_TYPE == CPU_x86)
+ #define	slkGetPacketWordVal(srcP)								\
+ 	(	(Word)															\
+ 		(																	\
+ 		((Word)((BytePtr)(srcP))[0] << 8) |						\
+ 		((Word)((BytePtr)(srcP))[1])								\
+ 		)																	\
+ 	)
+ #else
+ #define	slkGetPacketWordVal(srcP)								\
+ 	( *((WordPtr)(srcP)) )
+ #endif	//CPU_TYPE == CPU_x86
+ 
+ 
+ #if (CPU_TYPE == CPU_x86)
+ #define	slkGetPacketDWordVal(srcP)								\
+ 	(	(DWord)															\
+ 		(																	\
+ 		((DWord)((BytePtr)(srcP))[0] << 24) |					\
+ 		((DWord)((BytePtr)(srcP))[1] << 16) |					\
+ 		((DWord)((BytePtr)(srcP))[2] << 8) |					\
+ 		((DWord)((BytePtr)(srcP))[3])								\
+ 		)																	\
+ 	)
+ #else
+ #define	slkGetPacketDWordVal(srcP)								\
+ 	( *((DWordPtr)(srcP)) )
+ #endif	//CPU_TYPE == CPU_x86
+ 
+ 
+ #define	slkGetPacketSignature1(sigP)							\
+ 	slkGetPacketWordVal(sigP)
+ 
+ #define	slkGetPacketSignature2(sigP)							\
+ 	slkGetPacketByteVal(sigP)
+ 
+ 
+ #define	slkGetPacketDest(addressP)								\
+ 	slkGetPacketByteVal(addressP)
+ 	
+ #define	slkGetPacketSrc(addressP)								\
+ 	slkGetPacketByteVal(addressP)
+ 	
+ #define	slkGetPacketType(commandP)								\
+ 	slkGetPacketByteVal(commandP)
+ 	
+ 
+ #define	slkGetPacketBodySize(lengthP)							\
+ 	slkGetPacketWordVal(lengthP)
+ 
+ #define	slkGetPacketTransId(transIDP)							\
+ 	slkGetPacketByteVal(transIDP)
+ 
+ #define	slkGetPacketHdrChecksum(checksumP)					\
+ 	slkGetPacketByteVal(checksumP)
+ 
+ 
+ #define	slkGetPacketTotalChecksum(checksumP)				\
+ 	slkGetPacketWordVal(checksumP)
+ 
+ 
+ 
+ 
+ 
+ 
+ //--------------------------------------------------------------------
+ // macros to set packet values
+ //--------------------------------------------------------------------
+ 
+ 
+ #define	slkSetPacketByteVal(srcByteVal, destP)					\
+ 	( *(BytePtr)(destP) = (Byte)(srcByteVal) )
+ 
+ #if (CPU_TYPE == CPU_x86)
+ #define	slkSetPacketWordVal(srcWordVal, destP)					\
+ 																				\
+ 	do {																		\
+ 		Word	___srcVal;													\
+ 		BytePtr	___srcValP;												\
+ 																				\
+ 		___srcVal = (Word)(srcWordVal);								\
+ 		___srcValP = (BytePtr)(&___srcVal);							\
+ 																				\
+ 		((BytePtr)(destP))[0] = ___srcValP[1];						\
+ 		((BytePtr)(destP))[1] = ___srcValP[0];						\
+ 	} while( false )
+ #else
+ #define	slkSetPacketWordVal(srcWordVal, destP)					\
+ 	( *((WordPtr)(destP)) = (Word)(srcWordVal) )
+ #endif	//CPU_TYPE == CPU_x86
+ 
+ 
+ #if (CPU_TYPE == CPU_x86)
+ #define	slkSetPacketDWordVal(srcDWordVal, destP)				\
+ 	do {																		\
+ 		DWord	___srcVal;													\
+ 		BytePtr	___srcValP;												\
+ 																				\
+ 		___srcVal = (DWord)(srcDWordVal);							\
+ 		___srcValP = (BytePtr)(&___srcVal);							\
+ 																				\
+ 		((BytePtr)(destP))[0] = ___srcValP[3];						\
+ 		((BytePtr)(destP))[1] = ___srcValP[2];						\
+ 		((BytePtr)(destP))[2] = ___srcValP[1];						\
+ 		((BytePtr)(destP))[3] = ___srcValP[0];						\
+ 	} while( false )
+ #else
+ #define	slkSetPacketDWordVal(srcDWordVal, destP)				\
+ 	( *((DWordPtr)(destP)) = (DWord)(srcDWordVal) )
+ #endif	//CPU_TYPE == CPU_x86
+ 
+ 
+ 
+ #define slkSetPacketSignature1(magic, destP)						\
+ 	slkSetPacketWordVal(magic, destP)
+ 
+ #define slkSetPacketSignature2(magic, destP)						\
+ 	slkSetPacketByteVal(magic, destP)
+ 
+ 
+ #define slkSetPacketDest(dest, destP)								\
+ 	slkSetPacketByteVal(dest, destP)
+ 
+ #define slkSetPacketSrc(src, destP)									\
+ 	slkSetPacketByteVal(src, destP)
+ 
+ 
+ #define slkSetPacketType(type, destP)								\
+ 	slkSetPacketByteVal(type, destP)
+ 
+ 
+ #define slkSetPacketBodySize(numBytes, destP)					\
+ 	slkSetPacketWordVal(numBytes, destP)
+ 
+ 
+ #define slkSetPacketTransId(transID, destP)						\
+ 	slkSetPacketByteVal(transID, destP)
+ 
+ #define slkSetPacketHdrChecksum(checksum, destP)				\
+ 	slkSetPacketByteVal(checksum, destP)
+ 
+ #define slkSetPacketTotalChecksum(checksum, destP)				\
+ 	slkSetPacketWordVal(checksum, destP)
+ 
+ 
+ 
+ 
+ 
+ 
+ /*******************************************************************
+  * Serial Link Manager Errors
+  * the constant slkErrorClass is defined in SystemMgr.h
+  *******************************************************************/
+ #define	slkErrChecksum				(slkErrorClass | 1)
+ #define	slkErrFormat				(slkErrorClass | 2)
+ #define	slkErrBuffer				(slkErrorClass | 3)
+ #define	slkErrTimeOut				(slkErrorClass | 4)
+ #define	slkErrHandle				(slkErrorClass | 5)
+ #define	slkErrBodyLimit			(slkErrorClass | 6)
+ #define	slkErrTransId				(slkErrorClass | 7)
+ #define	slkErrResponse				(slkErrorClass | 8)
+ #define	slkErrNoDefaultProc		(slkErrorClass | 9)
+ #define	slkErrWrongPacketType	(slkErrorClass | 10)
+ #define 	slkErrBadParam				(slkErrorClass | 11)
+ #define 	slkErrAlreadyOpen			(slkErrorClass | 12)
+ #define	slkErrOutOfSockets		(slkErrorClass | 13)
+ #define	slkErrSocketNotOpen		(slkErrorClass | 14)
+ #define	slkErrWrongDestSocket	(slkErrorClass | 15)
+ #define	slkErrWrongPktType		(slkErrorClass | 16)
+ #define	slkErrBusy					(slkErrorClass | 17)	// called while sending a packet
+ 																		// only returned on single-threaded
+ 																		// emulation implementations 
+ #define	slkErrNotOpen				(slkErrorClass | 18)
+ 
+ 
+ 
+ /*******************************************************************
+  * Type definition for a Serial Link Socket Listener
+  *
+  *******************************************************************/
+ typedef	void (*SlkSocketListenerProcPtr)
+ 			(SlkPktHeaderPtr headerP, void* bodyP);
+ 			
+ typedef struct SlkSocketListenType {
+ 	SlkSocketListenerProcPtr 	listenerP;
+ 	SlkPktHeaderPtr				headerBufferP;		// App allocated buffer for header
+ 	void*								bodyBufferP;		// App allocated buffer for body
+ 	ULong								bodyBufferSize;
+ 	} SlkSocketListenType;
+ typedef SlkSocketListenType*	SlkSocketListenPtr;
+ 
+ 
+ 
+ /*******************************************************************
+  * Prototypes
+  *******************************************************************/
+ #ifdef __cplusplus
+ extern "C" {
+ #endif
+ 
+ //-------------------------------------------------------------------
+ // Initializes the Serial Link Manager
+ //-------------------------------------------------------------------
+ Err			SlkOpen(void)
+ 					SYS_TRAP(sysTrapSlkOpen);
+ 
+ //-------------------------------------------------------------------
+ // Close down the Serial Link Manager
+ //-------------------------------------------------------------------
+ Err			SlkClose(void)
+ 					SYS_TRAP(sysTrapSlkClose);
+ 
+ 
+ 
+ 
+ //-------------------------------------------------------------------
+ // Open up another Serial Link socket. The caller must have already
+ //  opened the comm library and set it to the right settings.
+ //-------------------------------------------------------------------
+ Err			SlkOpenSocket(UInt libRefNum, UIntPtr socketP, Boolean staticSocket)
+ 					SYS_TRAP(sysTrapSlkOpenSocket);
+ 
+ //-------------------------------------------------------------------
+ // Close up a Serial Link socket. 
+ //  Warning: This routine is assymetrical with SlkOpenSocket because it
+ //   WILL CLOSE the library for the caller (unless the refNum is the
+ //   refNum of the debugger comm library).
+ //-------------------------------------------------------------------
+ Err			SlkCloseSocket(UInt socket)
+ 					SYS_TRAP(sysTrapSlkCloseSocket);
+ 					
+ 
+ //-------------------------------------------------------------------
+ // Get the library refNum for a particular Socket
+ //-------------------------------------------------------------------
+ Err			SlkSocketRefNum(UInt socket, UIntPtr refNumP)
+ 					SYS_TRAP(sysTrapSlkSocketRefNum);
+ 
+ 
+ //-------------------------------------------------------------------
+ // Set the in-packet timeout for a socket
+ //-------------------------------------------------------------------
+ Err			SlkSocketSetTimeout(UInt socket, Long timeout)
+ 					SYS_TRAP(sysTrapSlkSocketSetTimeout);
+ 
+ 
+ 
+ 
+ 
+ //-------------------------------------------------------------------
+ // Flush a Socket
+ //-------------------------------------------------------------------
+ Err			SlkFlushSocket(UInt socket, Long timeout)
+ 					SYS_TRAP(sysTrapSlkFlushSocket);
+ 
+ 
+ //-------------------------------------------------------------------
+ // Set up a Socket Listener
+ //-------------------------------------------------------------------
+ Err			SlkSetSocketListener(UInt socket,  SlkSocketListenPtr socketP)
+ 					SYS_TRAP(sysTrapSlkSetSocketListener);
+ 
+ 
+ //-------------------------------------------------------------------
+ // Sends a packet's header, body, footer.  Stuffs the header's
+ // magic number and checksum fields.  Expects all other
+ // header fields to be filled in by caller.
+ // errors returned: dseHandle, dseLine, dseIO, dseParam, dseBodyLimit,
+ //					dseOther
+ //-------------------------------------------------------------------
+ Err 			SlkSendPacket(SlkPktHeaderPtr headerP, SlkWriteDataPtr writeList)
+ 					SYS_TRAP(sysTrapSlkSendPacket);
+ 
+ 
+ //-------------------------------------------------------------------
+ // Receives and validates an entire packet.
+ // errors returned: dseHandle, dseParam, dseLine, dseIO, dseFormat,
+ //					dseChecksum, dseBuffer, dseBodyLimit, dseTimeOut,
+ //					dseOther
+ //-------------------------------------------------------------------
+ Err			SlkReceivePacket( UInt socket, Boolean andOtherSockets, 
+ 						SlkPktHeaderPtr headerP, void* bodyP,  UInt bodySize,  
+ 						Long timeout)
+ 					SYS_TRAP(sysTrapSlkReceivePacket);
+ 
+ 
+ //-------------------------------------------------------------------
+ // Do Default processing of a System packet
+ //-------------------------------------------------------------------
+ Err 			SlkSysPktDefaultResponse(SlkPktHeaderPtr headerP, void* bodyP)
+ 					SYS_TRAP(sysTrapSlkSysPktDefaultResponse);
+ 
+ //-------------------------------------------------------------------
+ // Do RPC call
+ //-------------------------------------------------------------------
+ Err 			SlkProcessRPC(SlkPktHeaderPtr headerP, void* bodyP)
+ 					SYS_TRAP(sysTrapSlkProcessRPC);
+ 
+ 
+ 
+ #ifdef __cplusplus
+ }
+ #endif
+ 	
+ 	
+ #endif	//__SERIAL_LINK_H
diff -r -c -x *.orig -x *.rej -x #* -x *~ -N orig/gcc-2.7.2.2/PalmOS/System/SerialLinkPrv.h gcc-2.7.2.2/PalmOS/System/SerialLinkPrv.h
*** orig/gcc-2.7.2.2/PalmOS/System/SerialLinkPrv.h	Thu Jan  1 01:00:00 1970
--- gcc-2.7.2.2/PalmOS/System/SerialLinkPrv.h	Wed Feb 19 16:49:18 1997
***************
*** 0 ****
--- 1,81 ----
+ /*******************************************************************
+  * 							 Pilot Software
+  *
+  *		 Copyright(c) 1994, Palm Computing Inc., All Rights Reserved  
+  *
+  *-------------------------------------------------------------------
+  * FileName:
+  *		SerialLinkPrv.c
+  *
+  * Description:
+  *		Private Serial Link includes
+  *
+  * History:
+  *   	2/6/95 replaces DSerial.h from Debugger 
+  *
+  *******************************************************************/
+ 
+ #ifdef	NON_PORTABLE
+ 
+ #ifndef __SERIALLINKPRV_H
+ #define __SERIALLINKPRV_H
+ 
+ #include <SerialLinkMgr.h>
+ 
+ 
+ //*************************************************************************
+ //  Misc Constants
+ //*************************************************************************
+ // Default timeout  value once into receiving a packet in ticks
+ #define		slkDefaultInPktTimeout		(sysTicksPerSecond*2)
+ 
+ 
+ 
+ 
+ /*******************************************************************
+  * Serial Link Globals
+  *
+  *******************************************************************/
+ #define	slkMaxSockets		5						// max # of sockets
+ #define	slkMaxRefNums		slkMaxSockets		// max # of refNums in use at any one time
+ #define	slkAnySocket		0xFF		
+ 
+ #define	slkEmptyRefNum		0xFF					// used to track empty refInfos
+ 
+ // We keep an array of these (slkMaxSockets in size) to track which
+ //  librarie's we've received packet headers for. Since we can have up
+ //  to slkMaxSockets unique refNums in use at any one time, we must make
+ //  the array at least that size.
+ typedef struct SlkRefInfoType {
+ 	Byte		refNum;									// refNum of library, or 0xFF if empty
+ 	SByte		destID;									// dest socketID, or -1 if none
+ 	} SlkRefInfoType;
+ typedef SlkRefInfoType* SlkRefInfoPtr;	
+ 
+ typedef struct SlkGlobalsType {
+ 	UInt						openCount;
+ 	
+ 	Byte						socketRefNum[slkMaxSockets];
+ 	Boolean					socketOpen[slkMaxSockets];
+ 	SlkSocketListenPtr	socketListenP[slkMaxSockets];
+ 	Word						socketTimeout[slkMaxSockets];		// inPacket timeout
+ 	
+ 	
+ 	// We can keep track of packets coming in for up to slkMaxRefNums libraries.
+ 	//  This array holds the destination socket ID for packets received from
+ 	//  each library.
+ 	SlkRefInfoType			refInfo[slkMaxRefNums];
+ 	
+ 	Byte						transId;					// next transaction ID
+ 	Long						xmitSemaphoreID;		// Semaphore ID for transmitting
+ 	Word						numReceived;			// # of packets received since serial link
+ 															// was opened.
+ 	} SlkGlobalsType;
+ 
+ typedef SlkGlobalsType*	SlkGlobalsPtr;
+ 
+ 
+ 	
+ #endif	//__SERIALLINKPRV_H
+ 
+ #endif 	//NON_PORTABLE
\ No newline at end of file
diff -r -c -x *.orig -x *.rej -x #* -x *~ -N orig/gcc-2.7.2.2/PalmOS/System/SerialMgr.h gcc-2.7.2.2/PalmOS/System/SerialMgr.h
*** orig/gcc-2.7.2.2/PalmOS/System/SerialMgr.h	Thu Jan  1 01:00:00 1970
--- gcc-2.7.2.2/PalmOS/System/SerialMgr.h	Wed Feb 19 16:49:18 1997
***************
*** 0 ****
--- 1,192 ----
+ /*******************************************************************
+  * 							 Pilot Software
+  *
+  *		 Copyright(c) 1994, Palm Computing Inc., All Rights Reserved  
+  *
+  *-------------------------------------------------------------------
+  * FileName:
+  *		SerialMgr.h
+  *
+  * Description:
+  *		Include file for Serial manager
+  *
+  * History:
+  *   	2/7/95 Created by Ron Marianetti
+  *		7/6/95	vmk	added serDefaultSettings
+  *
+  *******************************************************************/
+ 
+ #ifndef __SERIAL_MGR_H
+ #define __SERIAL_MGR_H
+ 
+ // Pilot common definitions
+ #include <Common.h>
+ #include <SystemMgr.h>
+ 
+ 
+ /********************************************************************
+  * Serial Manager Errors
+  * the constant serErrorClass is defined in SystemMgr.h
+  ********************************************************************/
+ #define	serErrBadParam				(serErrorClass | 1)
+ #define	serErrBadPort				(serErrorClass | 2)
+ #define	serErrNoMem					(serErrorClass | 3)
+ #define	serErrBadConnID			(serErrorClass | 4)
+ #define	serErrTimeOut				(serErrorClass | 5)
+ #define	serErrLineErr				(serErrorClass | 6)
+ #define	serErrAlreadyOpen			(serErrorClass | 7)
+ #define  serErrStillOpen			(serErrorClass | 8)
+ #define	serErrNotOpen				(serErrorClass | 9)
+ 
+ 
+ /********************************************************************
+  * Serial Settings Descriptor
+  ********************************************************************/
+ typedef struct SerSettingsType {
+ 	ULong			baudRate;			// baud rate
+ 	ULong			flags;				// miscellaneous settings
+ 	Long			ctsTimeout;			// max # of ticks to wait for CTS to become asserted
+ 											// before transmitting; used only when
+ 											// configured with serSettingsFlagCTSAutoM.
+ 	} SerSettingsType;
+ typedef SerSettingsType*	SerSettingsPtr;
+ 	
+ #define		serSettingsFlagStopBitsM			0x00000001		// mask for stop bits field
+ #define		serSettingsFlagStopBits1			0x00000000		//  1 stop bits	
+ #define		serSettingsFlagStopBits2			0x00000001		//  2 stop bits	
+ #define		serSettingsFlagParityOnM			0x00000002		// mask for parity on
+ #define		serSettingsFlagParityEvenM			0x00000004		// mask for parity even
+ #define		serSettingsFlagXonXoffM				0x00000008		// mask for Xon/Xoff flow control
+ #define		serSettingsFlagRTSAutoM				0x00000010		// mask for RTS rcv flow control
+ #define		serSettingsFlagCTSAutoM				0x00000020		// mask for CTS xmit flow control
+ #define		serSettingsFlagBitsPerCharM		0x000000C0		// mask for bits/char
+ #define		serSettingsFlagBitsPerChar5		0x00000000		//  5 bits/char	
+ #define		serSettingsFlagBitsPerChar6		0x00000040		//  6 bits/char	
+ #define		serSettingsFlagBitsPerChar7		0x00000080		//  7 bits/char	
+ #define		serSettingsFlagBitsPerChar8		0x000000C0		//  8 bits/char	
+ 
+ 
+ // Default settings
+ #define		serDefaultSettings		(serSettingsFlagBitsPerChar8	|		\
+ 												serSettingsFlagStopBits1		|		\
+ 												serSettingsFlagRTSAutoM)
+ 												
+ #define		serDefaultCTSTimeout		(5*sysTicksPerSecond);
+ 
+ //
+ // mask values for the lineErrors  from SerGetStatus
+ //
+ #define	serLineErrorParity		0x0001			// parity error
+ #define	serLineErrorHWOverrun	0x0002			// HW overrun
+ #define	serLineErrorFraming		0x0004			// framing error
+ #define 	serLineErrorBreak			0x0008			// break signal asserted
+ #define 	serLineErrorHShake		0x0010			// line hand-shake error
+ #define	serLineErrorSWOverrun	0x0020			// HW overrun
+ 
+ 
+ 
+ 
+ /********************************************************************
+  * Serial Library Routines
+  * These are define as external calls only under emulation mode or
+  *  under native mode from the module that actually installs the trap
+  *  vectors
+  ********************************************************************/
+ 
+ #ifdef __cplusplus
+ extern "C" {
+ #endif
+ 
+ 
+ // Acquires and opens a serial port with given baud and default settings.
+ Err SerOpen(UInt refNum, UInt port, ULong baud)
+ 				SYS_TRAP(sysLibTrapOpen);
+ 
+ // Closes the serial connection previously opened with SerOpen.
+ Err SerClose(UInt refNum)
+ 				SYS_TRAP(sysLibTrapClose);
+ 
+ // Puts serial library to sleep
+ Err SerSleep(UInt refNum)
+ 				SYS_TRAP(sysLibTrapSleep);
+ 
+ // Wake Serial library
+ Err SerWake(UInt refNum)
+ 				SYS_TRAP(sysLibTrapWake);
+ 
+ // Get attributes of the serial connection
+ Err SerGetSettings(UInt refNum, SerSettingsPtr settingsP)
+ 				SYS_TRAP(sysLibTrapCustom);
+ 				
+ // Set attributes of the serial connection
+ Err SerSetSettings(UInt refNum, SerSettingsPtr settingsP)
+ 				SYS_TRAP(sysLibTrapCustom+1);
+ 
+ // Return status of serial connection
+ Word SerGetStatus(UInt refNum, BooleanPtr ctsOnP, 
+ 				BooleanPtr dsrOnP)
+ 				SYS_TRAP(sysLibTrapCustom+2);
+ 				
+ // Reset error condition of serial connection
+ Err SerClearErr(UInt refNum)
+ 				SYS_TRAP(sysLibTrapCustom+3);
+ 				
+ 				
+ 
+ 
+ // Sends a buffer of data (may queue it up and return).
+ Err SerSend(UInt refNum, VoidPtr bufP, ULong size)
+ 				SYS_TRAP(sysLibTrapCustom+4);
+ 
+ // Waits until the serial transmit buffer empties.
+ Err SerSendWait(UInt refNum, Long timeout)
+ 				SYS_TRAP(sysLibTrapCustom+5);
+ 
+ // Returns how many characters are left in the send queue waiting 
+ //  for transmission
+ Err SerSendCheck(UInt refNum, ULongPtr numBytesP)
+ 				SYS_TRAP(sysLibTrapCustom+6);
+ 
+ // Flushes the data out of the transmit buffer
+ Err SerSendFlush(UInt refNum)
+ 				SYS_TRAP(sysLibTrapCustom+7);
+ 
+ 
+ 
+ 
+ // Receives a buffer of data of the given size.
+ Err SerReceive(UInt refNum, VoidPtr bufP, ULong bytes, Long timeout)
+ 				SYS_TRAP(sysLibTrapCustom+8);
+ 
+ // Waits for at least 'bytes' bytes of data to arrive at the serial input.
+ //  but does not read them in
+ Err SerReceiveWait(UInt refNum, ULong bytes, Long timeout)
+ 				SYS_TRAP(sysLibTrapCustom+9);
+ 
+ // Returns how many characters are in the receive queue
+ Err SerReceiveCheck(UInt refNum, ULongPtr numBytesP)
+ 				SYS_TRAP(sysLibTrapCustom+10);
+ 
+ // Flushes any data coming into the serial port, discarding the data.
+ void SerReceiveFlush(UInt refNum, Long timeout)
+ 				SYS_TRAP(sysLibTrapCustom+11);
+ 
+ 
+ // Specify a new input buffer.  To restore the original buffer, pass
+ // bufSize = 0.
+ Err SerSetReceiveBuffer(UInt refNum, VoidPtr bufP, UInt bufSize)
+ 				SYS_TRAP(sysLibTrapCustom+12);
+ 
+ 
+ // The receive character interrupt service routine, called by kernel when
+ //  a UART interrupt is detected. DOLATER... generalize ISP's for multiple Serial libs
+ Boolean SerReceiveISP(void)		
+ 				SYS_TRAP(sysTrapSerReceiveISP);
+ 
+ 
+ #ifdef __cplusplus
+ }
+ #endif
+ 
+ 	
+ #endif	//__SERIAL_MGR_H
diff -r -c -x *.orig -x *.rej -x #* -x *~ -N orig/gcc-2.7.2.2/PalmOS/System/SoundMgr.h gcc-2.7.2.2/PalmOS/System/SoundMgr.h
*** orig/gcc-2.7.2.2/PalmOS/System/SoundMgr.h	Thu Jan  1 01:00:00 1970
--- gcc-2.7.2.2/PalmOS/System/SoundMgr.h	Wed Feb 19 16:49:19 1997
***************
*** 0 ****
--- 1,161 ----
+ /*******************************************************************
+  * 							 Pilot Software
+  *
+  *		 Copyright(c) 1995, Palm Computing Inc., All Rights Reserved
+  *
+  *-------------------------------------------------------------------
+  * FileName:
+  *		SoundMgr.h
+  *
+  * Description:
+  *		Include file for Sound Manager
+  *
+  * History:
+  *   	4/11/95  VMK - Created by Vitaly Kruglikov
+  *
+  *******************************************************************/
+ 
+ 
+ #ifndef __SOUNDMGR_H__
+ #define __SOUNDMGR_H__
+ 
+ 
+ // Include elementary types
+ #include <Common.h>
+ #include <SysTraps.h>				// Trap Numbers.
+ 
+ 
+ 
+ /************************************************************
+  * Sound Manager constants
+  *
+  *************************************************************/
+ 
+ // Sound Manager max and default volume levels
+ #define sndMaxAmp				64
+ //#define sndVolumeMask		0x0ff
+ #define sndDefaultAmp		sndMaxAmp
+ 
+ 
+ /************************************************************
+  * Sound Manager data structures
+  *
+  *************************************************************/
+ 
+ //
+ // Command numbers for SndCommandType's cmd field
+ //
+ typedef enum SndCmdIDType {
+ 									
+ 	sndCmdFreqDurationAmp = 1		// play a sound
+ 											// param1 = frequency in Hz
+ 											// param2 = duration in milliseconds
+ 											// param3 = amplitude (0 - sndMaxAmp)
+ 
+ 	} SndCmdIDType;
+ 
+ //
+ // SndCommandType: used by SndDoCmd()
+ //
+ 
+ typedef struct SndCommandType {
+ SndCmdIDType	cmd;						// command id
+ Long				param1;					// first parameter
+ UInt				param2;					// second parameter
+ UInt				param3;					// third parameter
+ } SndCommandType;
+ 
+ typedef SndCommandType*		SndCommandPtr;
+ 
+ 
+ //
+ // Beep numbers used by SndSysBeep()
+ //
+ 
+ typedef enum SndSysBeepType {
+ 	sndInfo = 1,
+ 	sndWarning,
+ 	sndError,
+ 	sndStartUp,
+ 	sndAlarm,
+ 	sndConfirmation,
+ 	sndClick
+ 	} SndSysBeepType;
+ 
+ 
+ 
+ /************************************************************
+  * Sound Manager result codes
+  * (sndErrorClass is defined in SystemMgr.h)
+  *************************************************************/
+ #define	sndErrBadParam			(sndErrorClass | 1)
+ #define	sndErrBadChannel		(sndErrorClass | 2)
+ #define	sndErrMemory			(sndErrorClass | 3)
+ #define	sndErrOpen				(sndErrorClass | 4)
+ #define	sndErrQFull				(sndErrorClass | 5)
+ #define	sndErrQEmpty			(sndErrorClass | 6)		// internal
+ 
+ 
+ 
+ /********************************************************************
+  * Sound Manager Routines
+  * These are define as external calls only under emulation mode or
+  *  under native mode from the module that actually installs the trap
+  *  vectors
+  ********************************************************************/
+ #ifdef __cplusplus
+ extern "C" {
+ #endif
+ 
+ 
+ //-------------------------------------------------------------------
+ // Initialization
+ //-------------------------------------------------------------------
+ 
+ // Initializes the Sound Manager.  Should only be called by
+ // Pilot initialization code.
+ Err			SndInit(void)	SYS_TRAP(sysTrapSndInit);
+ 
+ // Frees the Sound Manager.
+ //void			SndFree(void)	SYS_TRAP(sysTrapSndFree);
+ 
+ 
+ //-------------------------------------------------------------------
+ // API
+ //-------------------------------------------------------------------
+ 
+ // Sets default sound volume levels
+ //
+ // Any parameter may be passed as NULL
+ void			SndSetDefaultVolume(UIntPtr alarmAmpP, UIntPtr sysAmpP, UIntPtr defAmpP)
+ 							SYS_TRAP(sysTrapSndSetDefaultVolume);
+ 
+ // Gets default sound volume levels
+ //
+ // Any parameter may be passed as NULL
+ void			SndGetDefaultVolume(UIntPtr alarmAmpP, UIntPtr sysAmpP, UIntPtr defAmpP)
+ 							SYS_TRAP(sysTrapSndGetDefaultVolume);
+ 
+ // Executes a sound command on the given sound channel (pass
+ // channelP = 0 to use the shared channel).
+ Err			SndDoCmd(VoidPtr /*SndChanPtr*/ channelP, SndCommandPtr cmdP, Boolean noWait)
+ 							SYS_TRAP(sysTrapSndDoCmd);
+ 
+ // Plays one of several defined system beeps/sounds (see sndSysBeep...
+ // constants).
+ void			SndPlaySystemSound(SndSysBeepType beepID)
+ 							SYS_TRAP(sysTrapSndPlaySystemSound);
+ 
+ #ifdef __cplusplus 
+ }
+ #endif
+ 
+ 
+ 
+ /************************************************************
+  * Sound Manager Macros
+  *
+  *************************************************************/
+ 
+ #endif  // __SOUND_MGR_H__
+ 
diff -r -c -x *.orig -x *.rej -x #* -x *~ -N orig/gcc-2.7.2.2/PalmOS/System/SoundPrv.h gcc-2.7.2.2/PalmOS/System/SoundPrv.h
*** orig/gcc-2.7.2.2/PalmOS/System/SoundPrv.h	Thu Jan  1 01:00:00 1970
--- gcc-2.7.2.2/PalmOS/System/SoundPrv.h	Wed Feb 19 16:49:19 1997
***************
*** 0 ****
--- 1,61 ----
+ /*******************************************************************
+  * 							 Pilot Software
+  *
+  *		 Copyright(c) 1995, Palm Computing Inc., All Rights Reserved
+  *
+  *-------------------------------------------------------------------
+  * FileName:
+  *		SoundPrv.h
+  *
+  * Description:
+  *		Private Include file for Sound Manager
+  *
+  * History:
+  *   	4/11/95  VMK - Created by Vitaly Kruglikov
+  *
+  *******************************************************************/
+ 
+ #ifdef	NON_PORTABLE
+ 
+ #ifndef __SOUNDPRV_H__
+ #define __SOUNDPRV_H__
+ 
+ 
+ 
+ /************************************************************
+  * Sound Manager constants
+  *************************************************************/
+ 
+ #define	sndSamplingRate					8000	// 8 kHz
+ 
+ 
+ // DOLATER: determine appropriate values experimentally (TBD)
+ #define	sndBeepDurationMSec				70				// msec
+ #define	sndConfirmationDurationMSec	70				// msec
+ #define	sndClickDurationMSec				9				// msec
+ 
+ // These frequencies are more audible on the current hardware.
+ #define	sndInfoFreq							500			// Hz
+ #define	sndWarningFreq						500			// Hz
+ #define	sndErrorFreq						500			// Hz
+ #define	sndConfirmationFreq				500			// Hz
+ #define	sndStartUpFreq						1000			// Hz
+ #define	sndClickFreq						200			// Hz
+ 
+ 
+ /*******************************************************************
+  * Sound Manager Globals
+  *
+  *******************************************************************/
+ typedef struct SndGlobalsType {
+ 	Long				smID;					// semaphore id for data access integrity
+ 	Byte				sysAmp;				// system sound amplitude(0-sndMaxVolume)
+ 	Byte				alarmAmp;			// alarm sound amplitude(0-sndMaxVolume)
+ 	Byte				defAmp;				// default amplitude for other sounds(0-sndMaxVolume)
+ 	} SndGlobalsType;
+ 
+ typedef SndGlobalsType*		SndGlobalsPtr;
+ 
+ 
+ #endif  // __SOUNDPRV_H__
+ #endif  // NON_PORTABLE
diff -r -c -x *.orig -x *.rej -x #* -x *~ -N orig/gcc-2.7.2.2/PalmOS/System/StringMgr.h gcc-2.7.2.2/PalmOS/System/StringMgr.h
*** orig/gcc-2.7.2.2/PalmOS/System/StringMgr.h	Thu Jan  1 01:00:00 1970
--- gcc-2.7.2.2/PalmOS/System/StringMgr.h	Wed Feb 19 16:49:19 1997
***************
*** 0 ****
--- 1,74 ----
+ /*******************************************************************
+  * 							 Pilot Software
+  *
+  *		 Copyright(c) 1994, Palm Computing Inc., All Rights Reserved
+  *
+  *-------------------------------------------------------------------
+  * FileName:
+  *		StringMgr.h
+  *
+  * Description:
+  *		String manipulation functions
+  *
+  * History:
+  *   	11/09/94  RM - Created by Ron Marianetti
+  *
+  *******************************************************************/
+ 
+ 
+ 
+ #ifndef __STRINGMGR_H__
+ #define __STRINGMGR_H__
+ 
+ 
+ // Include elementary types
+ #include <Common.h>					// Basic types
+ #include <SysTraps.h>				// Trap Numbers.
+ 
+ 
+ #ifdef __cplusplus
+ extern "C" {
+ #endif
+ 
+ // String Manipulation routines
+ CharPtr	StrCopy(CharPtr dst, CharPtr src)
+ 							SYS_TRAP(sysTrapStrCopy);
+ 
+ CharPtr	StrCat(CharPtr dst, CharPtr src)
+ 							SYS_TRAP(sysTrapStrCat);
+ 							
+ UInt		StrLen(CharPtr src)
+ 							SYS_TRAP(sysTrapStrLen);
+ 							
+ Int		StrCompare(CharPtr s1, CharPtr s2)
+ 							SYS_TRAP(sysTrapStrCompare);
+ 
+ Int 		StrCaselessCompare(CharPtr s1, CharPtr s2)
+ 							SYS_TRAP(sysTrapStrCaselessCompare);
+ 
+ CharPtr	StrToLower(CharPtr dst, CharPtr src)
+ 							SYS_TRAP(sysTrapStrToLower);
+ 
+ CharPtr 	StrIToA(CharPtr s, Long i)
+ 							SYS_TRAP(sysTrapStrIToA);
+ 
+ CharPtr 	StrIToH(CharPtr s, ULong i)
+ 							SYS_TRAP(sysTrapStrIToH);
+ 
+ CharPtr	StrChr (CharPtr str, Int chr)
+ 							SYS_TRAP(sysTrapStrChr);
+ 
+ CharPtr	StrStr (CharPtr str, CharPtr token)
+ 							SYS_TRAP(sysTrapStrStr);
+ 
+ Int		StrAToI (CharPtr str)
+ 							SYS_TRAP(sysTrapStrAToI);
+ 
+ #ifdef __cplusplus 
+ }
+ #endif
+ 
+ 
+ 
+ 
+ #endif //__STRINGMGR_H
diff -r -c -x *.orig -x *.rej -x #* -x *~ -N orig/gcc-2.7.2.2/PalmOS/System/SysAll.h gcc-2.7.2.2/PalmOS/System/SysAll.h
*** orig/gcc-2.7.2.2/PalmOS/System/SysAll.h	Thu Jan  1 01:00:00 1970
--- gcc-2.7.2.2/PalmOS/System/SysAll.h	Wed Feb 19 16:49:19 1997
***************
*** 0 ****
--- 1,64 ----
+ /*******************************************************************
+  * 							 Pilot Software 
+  *
+  *		 Copyright(c) 1994, Palm Computing Inc., All Rights Reserved
+  *
+  *-------------------------------------------------------------------
+  * FileName:
+  *		SysAll.h
+  *
+  * Description:
+  *		Includes all system header files in order to help compiler
+  *		do pre-compiled headers
+  *
+  * History:
+  *   	11/17/94  RM - Created by Ron Marianetti
+  *
+  *******************************************************************/
+ 
+ #ifndef __SYSALL_H__
+ #define __SYSALL_H__
+ 
+ 
+ //*********************************************************************
+ // If not included from Pilot.h, as is the case when compiling UI modules,
+ //  use the SysAll pre-compiled header file. 
+ //*********************************************************************
+ #ifndef __Pilot_H__
+ #ifndef __GNUC__
+ 	#ifndef PILOT_PRECOMPILED_HEADERS_OFF	
+ 		#if	!__option(precompile)
+ 			#ifdef CMD_LINE_BUILD
+ 				#include "SysAll.h.obj.mpw"
+ 			#else
+ 				#include "SysAll.h.obj"
+ 			#endif
+ 			#define	__INCLUDED_SYSALL_H_OBJ__
+ 		#endif
+ 	#endif
+ #endif
+ #endif
+ 
+ 
+ // Fastest compilation speed is obtained by not including these
+ //  headers when the pre-compiled header is used.
+ #ifndef __INCLUDED_SYSALL_H_OBJ__
+ #include <Common.h>
+ #include <SysTraps.h>
+ #include <SystemMgr.h>
+ #include <DebugMgr.h>
+ #include <ErrorMgr.h>
+ #include <StringMgr.h>
+ #include <SysUtils.h>
+ #include <MemoryMgr.h>
+ #include <DataMgr.h>
+ 
+ #include <Preferences.h>
+ #include <TimeMgr.h>
+ #include <AlarmMgr.h>
+ #include <SoundMgr.h>
+ #include <Keyboard.h>
+ #endif
+ 
+ 
+ #endif // __SYSALL_H__
diff -r -c -x *.orig -x *.rej -x #* -x *~ -N orig/gcc-2.7.2.2/PalmOS/System/SysAll.pch gcc-2.7.2.2/PalmOS/System/SysAll.pch
*** orig/gcc-2.7.2.2/PalmOS/System/SysAll.pch	Thu Jan  1 01:00:00 1970
--- gcc-2.7.2.2/PalmOS/System/SysAll.pch	Wed Feb 19 16:16:07 1997
***************
*** 0 ****
--- 1,35 ----
+ /*******************************************************************
+  * 							 Pilot Software
+  *
+  *		 Copyright(c) 1994, Palm Computing Inc., All Rights Reserved
+  *
+  *-------------------------------------------------------------------  
+  * FileName:
+  *		SysAll.pch
+  *
+  * Description:
+  *		Source file used to generate pre-compiled headers for Pilot
+  *  System Modules
+  *
+  * History:
+  *   	6/6/95  RM - Created by Ron Marianetti
+  *
+  *******************************************************************/  
+ 
+ // By including this module in your CodeWarrior project. You can automatically
+ //  regenerate the pre-compiled header file used by the System modules called
+ //  SysAll.h.obj
+ #ifdef 	EMULATION_LEVEL
+ 	#pragma precompile_target ":Obj:SysAll.h.obj.mpw"
+ #else
+ 	#pragma precompile_target ":Obj:SysAll.h.obj"
+ #endif
+ 
+ // Define this so that SysAll.h doesn't try to include the pre-compiled header
+ //   that we're currently building.
+ #define BUILDING_PRECOMPILED_HEADER	
+ 
+ 
+ // These are the Pilot-only header files.
+ #include <SysAll.h>
+ 
diff -r -c -x *.orig -x *.rej -x #* -x *~ -N orig/gcc-2.7.2.2/PalmOS/System/SysEvtMgr.h gcc-2.7.2.2/PalmOS/System/SysEvtMgr.h
*** orig/gcc-2.7.2.2/PalmOS/System/SysEvtMgr.h	Thu Jan  1 01:00:00 1970
--- gcc-2.7.2.2/PalmOS/System/SysEvtMgr.h	Wed Feb 19 16:49:19 1997
***************
*** 0 ****
--- 1,169 ----
+ /*******************************************************************
+  * 							 Pilot Software
+  *
+  *		 Copyright(c) 1994, Palm Computing Inc., All Rights Reserved
+  *
+  *-------------------------------------------------------------------
+  * FileName:
+  *		SysEvtMgr.h
+  *
+  * Description:
+  *		Header for the System Event Manager
+  *
+  * History:
+  *   	3/22/95  RM - Created by Ron Marianetti
+  *
+  *******************************************************************/
+ 
+ #ifndef __SYSEVTMGR_H__
+ #define __SYSEVTMGR_H__
+ 
+ #include <Common.h>
+ 
+ /************************************************************
+  * System Event Manager Errors
+  *************************************************************/
+ #define	evtErrParamErr			(evtErrorClass | 1)
+ #define	evtErrQueueFull		(evtErrorClass | 2)
+ #define	evtErrQueueEmpty		(evtErrorClass | 3)
+ 
+ 
+ /************************************************************
+  * System Event Manager procedures
+  *************************************************************/
+ #ifdef __cplusplus
+ extern "C" {  
+ #endif
+ 
+ 
+ //-----------------------------------------------------------------
+ // High Level Calls
+ //------------------------------------------------------------------
+ Err				EvtSysInit(void)
+ 						SYS_TRAP(sysTrapEvtSysInit);
+ 
+ // Return next "System" event. This routine will send strokes to Graffiti as necessary
+ //  and return a key event. Otherwise, it will return a simple pen down or pen
+ //  up event, or put the processor to sleep for a max time of 'timeout' if 
+ // no events are available. 
+ void				EvtGetSysEvent(EventPtr eventP, Long timeout)
+ 						SYS_TRAP(sysTrapEvtGetSysEvent);
+ 
+ 
+ 
+ // Translate a stroke in the silk screen area to a key event
+ Err				EvtProcessSoftKeyStroke(PointType* startPtP, PointType* endPtP)
+ 						SYS_TRAP(sysTrapEvtProcessSoftKeyStroke);
+ 
+ 
+ //-----------------------------------------------------------------
+ // Pen Queue Utilties
+ //------------------------------------------------------------------
+ 
+ // Replace current pen queue with another of the given size
+ Err				EvtSetPenQueuePtr(Ptr penQueueP, ULong size)
+ 						SYS_TRAP(sysTrapEvtSetPenQueuePtr);
+ 
+ // Return size of current pen queue in bytes
+ ULong				EvtPenQueueSize(void)
+ 						SYS_TRAP(sysTrapEvtPenQueueSize);
+ 
+ // Flush the pen queue
+ Err				EvtFlushPenQueue(void)
+ 						SYS_TRAP(sysTrapEvtFlushPenQueue);
+ 
+ 
+ // Append a point to the pen queue. Passing -1 for x and y means 
+ //  pen-up (terminate the current stroke). Called by digitizer interrupt routine
+ Err				EvtEnqueuePenPoint(PointType* ptP)
+ 						SYS_TRAP(sysTrapEvtEnqueuePenPoint);
+ 
+ 
+ // Return the stroke info for the next stroke in the pen queue. This MUST
+ //  be the first call when removing a stroke from the queue
+ Err				EvtDequeuePenStrokeInfo(PointType* startPtP, PointType* endPtP)
+ 						SYS_TRAP(sysTrapEvtDequeuePenStrokeInfo);
+ 
+ // Dequeue the next point from the pen queue. Returns non-0 if no
+ //  more points. The point returned will be (-1,-1) at the end
+ //  of the stroke.
+ Err				EvtDequeuePenPoint(PointType* retP)
+ 						SYS_TRAP(sysTrapEvtDequeuePenPoint);
+ 
+ 
+ // Flush the entire stroke from the pen queue and dispose it
+ Err				EvtFlushNextPenStroke()
+ 						SYS_TRAP(sysTrapEvtFlushNextPenStroke);
+ 
+ 
+ 
+ 
+ //-----------------------------------------------------------------
+ // Key Queue Utilties
+ //------------------------------------------------------------------
+ 
+ // Replace current key queue with another of the given size. This routine will
+ //  intialize the given key queue before installing it
+ Err				EvtSetKeyQueuePtr(Ptr keyQueueP, ULong size)
+ 						SYS_TRAP(sysTrapEvtSetKeyQueuePtr);
+ 
+ // Return size of current key queue in bytes
+ ULong				EvtKeyQueueSize(void)
+ 						SYS_TRAP(sysTrapEvtKeyQueueSize);
+ 
+ // Flush the key queue
+ Err				EvtFlushKeyQueue(void)
+ 						SYS_TRAP(sysTrapEvtFlushKeyQueue);
+ 
+ 
+ // Append a key to the key queue. 
+ Err				EvtEnqueueKey(UInt ascii, UInt keycode, UInt modifiers)
+ 						SYS_TRAP(sysTrapEvtEnqueueKey);
+ 
+ // Return true of key queue empty.
+ Boolean			EvtKeyQueueEmpty(void)
+ 						SYS_TRAP(sysTrapEvtKeyQueueEmpty);
+ 
+ 
+ // Pop off the next key event from the key queue and fill in the given
+ //  event record structure. Returns non-zero if there aren't any keys in the
+ //  key queue.
+ Err				EvtDequeueKeyEvent(EventPtr eventP)
+ 						SYS_TRAP(sysTrapEvtDequeueKeyEvent);
+ 
+ 
+ //-----------------------------------------------------------------
+ // General Utilities
+ //------------------------------------------------------------------
+ // Force the system to wake-up. This will result in a null event being
+ //  sent to the current app.
+ Err				EvtWakeup(void)
+ 						SYS_TRAP(sysTrapEvtWakeup);
+ 
+ // Reset the auto-off timer. This is called by the SerialLink Manager in order
+ //  so we don't auto-off while receiving data over the serial port.
+ Err				EvtResetAutoOffTimer(void)
+ 						SYS_TRAP(sysTrapEvtResetAutoOffTimer);
+ 
+ 
+ // Set Graffiti enabled or disabled.
+ void	EvtEnableGraffiti(Boolean enable)
+ 						SYS_TRAP(sysTrapEvtEnableGraffiti);
+ 
+ #ifdef __cplusplus
+ }
+ #endif
+ 
+ 
+ /************************************************************
+  * Assembly Function Prototypes
+  *************************************************************/
+ #define	_EvtEnqueuePenPoint		\
+ 				ASM_SYS_TRAP(sysTrapEvtEnqueuePenPoint)
+ 
+ 
+ 
+ #endif //__SYSEVTMGR_H__
+ 
+ 
+ 
diff -r -c -x *.orig -x *.rej -x #* -x *~ -N orig/gcc-2.7.2.2/PalmOS/System/SysEvtPrv.h gcc-2.7.2.2/PalmOS/System/SysEvtPrv.h
*** orig/gcc-2.7.2.2/PalmOS/System/SysEvtPrv.h	Thu Jan  1 01:00:00 1970
--- gcc-2.7.2.2/PalmOS/System/SysEvtPrv.h	Wed Feb 19 16:49:19 1997
***************
*** 0 ****
--- 1,220 ----
+ /*******************************************************************
+  * 							 Pilot Software
+  *
+  *		 Copyright(c) 1994, Palm Computing Inc., All Rights Reserved
+  *
+  *-------------------------------------------------------------------
+  * FileName:
+  *		SysEvtPrv.h
+  *
+  * Description:
+  *		Private Header for the System Event Manager
+  *
+  * History:
+  *   	8/10/95  RM - Created by Ron Marianetti
+  *
+  *******************************************************************/
+ 
+ #ifdef	NON_PORTABLE
+ #ifndef __SYSEVTPRV_H__
+ #define __SYSEVTPRV_H__
+ 
+ 
+ 
+ 
+ /************************************************************
+  * Structure of a Pen Capture Queue
+  *
+  * This structure is used to hold one or more pen strokes
+  *   and is filled by the digitizer interrupt routine and emptied
+  *   by application level code.
+  *
+  * A default size queue is allocated by the system and used to capture
+  *   strokes for subsequent processing by the Graffiti recognizer
+  *   or the hard icon recognizer. This queue pointer is stored in
+  *   the System Event Manager Globals.
+  *
+  * Optionally, applications can replace the system pen queue with
+  *   one of their own if it they need to hold larger strokes
+  *   or more of them.
+  *   
+  *
+  * Stroke data is stored in compressed form in this queue - refer
+  *  to the comments on the routine EvtEnqueuPenPoint  for the format
+  *  of the queue data.
+  *************************************************************/
+ typedef struct PenQueueType {
+ 	Int			start;							// start byte offset
+ 	Int			end;								// end byte offset
+ 	Int			size;								// size of queue in bytes
+ 	
+ 	UInt			strokeCount;					// # of complete strokes currently in pen queue
+ 	Boolean		returnedPenDown;				// set after we return a pen-down event for 
+ 														// the next stroke in the queue. Cleared after
+ 														// we return the pen-up for the stroke.
+ 
+ 	PointType	addLast;							// last point captured
+ 	Int			addStrokeStart;				// offset in queue to start of stroke
+ 														// currently being added to queue
+ 														// -1  : no stroke being captured
+ 	
+ 	
+ 	UInt			strokesRemoved;				// running count: # of strokes removed from queue.
+ 	UInt			strokesAdded;					// running count: # of strokes added to queue.
+ 
+ 	Int			rmvStrokeStage;				// -1  : not started
+ 														//  0  : returned stroke info
+ 														//  1  : returned start point
+ 														
+ 	PointType	rmvLast;							// last point dequeued
+ 	PointType 	rmvStartPt;						// copy of start point of stroke currently
+ 														//  being removed.
+ 	
+ 	Byte			data[1];							// 'size' bytes of data
+ 	} PenQueueType;
+ typedef PenQueueType*	PenQueuePtr;
+ 
+ 
+ 
+ /************************************************************
+  * Structure of the Key Queue
+  *
+  * This structure is used to hold one or more keystrokes 
+  *   and is filled by numerous places including the low level
+  *	  hardware key interrupt routine, the Graffiti recognizer, and
+  *	  the digitizer buttons recognizer.
+  *
+  * A default size queue is allocated by the system. 
+  *		This queue pointer is stored in the System Event Manager globals.
+  *
+  * Optionally, applications can replace the system key queue with
+  *   one of their own if it they need to hold more keys in the queue
+  *	  at one time. This may be necessary when processing large macro
+  *	  strings from Graffiti.
+  *
+  * Key data is stored in compressed form in this queue. Refer to
+  *  the comments for the function EvtEnqueueKeyString for the format
+  *  of the compressed data.
+  *   
+  *************************************************************/
+ typedef struct KeyQueueType {
+ 	UInt		start;							// start byte offset
+ 	UInt		end;								// end byte offset
+ 	UInt		size;								// size of queue in bytes
+ 	
+ 	Byte		data[1];							// 'size' bytes of data
+ 	} KeyQueueType;
+ typedef KeyQueueType*	KeyQueuePtr;
+ 
+ 
+ 
+ 
+ 
+ /************************************************************
+  * Pen button info structure. This structure is used
+  *  to hold the bounds of each button on the silk screen and
+  *  the ascii code and modifiers byte that each will generate.
+  *************************************************************/
+ typedef struct PenBtnInfoType {
+ 	RectangleType	boundsR;						// bounding rectangle of button
+ 	UInt				asciiCode;					// ascii code for key event
+ 	UInt				keyCode;						// virtual key code for key event
+ 	UInt				modifiers;					// modifiers for key event
+ 	} PenBtnInfoType;
+ typedef PenBtnInfoType* PenBtnInfoPtr;
+ 	
+ 	
+ 	
+ 
+ /************************************************************
+  * Key constants
+  *************************************************************/
+ #define 	evtKeyStringEscape 	0x01		// Escape byte for encoded key strings
+ 													// passed to EvtEnqueueKeyString or stored
+ 													//  in key queue.
+ 
+ 
+ #define	evtDefaultPenQSize	0x100
+ #define	evtDefaultKeyQSize	0x40
+ 
+ #define	evtEffectiveKeyQStorage	(evtDefaultKeyQSize - sizeof(KeyQueueType))
+ 
+ 
+ // gremlinsFlags
+ #define	grmGremlinsOn			0x01
+ #define  grmEventTraceOn		0x02
+ #define	grmGremlinsIdle		0x04
+ 
+ /************************************************************
+  * Structure of System Event Manager Globals
+  *************************************************************/
+ typedef struct SysEvtMgrGlobalsType {
+ 	Boolean			sendNullEvent;				// set by EvtWakeup 		
+ 	Boolean			enableGraffiti;			// If true, enable Graffiti translation
+ 	Boolean			enableSoftKeys;			// If true, enable digitizer button translation 
+ 												
+ 												
+ 	Boolean			removeTopStroke;			// if true, remove top stroke from queue
+ 														//  next time EvtGetSysEvent is called;
+ 	PenQueuePtr		penQP;						// pointer to current pen queue
+ 	UInt				penQStrokesRemoved;		// saved value of penQP->strokesRemoved. Used to
+ 														// determine if app removed stroke from penUp
+ 														// event or not.
+ 														
+ 	KeyQueuePtr		keyQP;						// pointer to current key queue
+ 	
+ 	RectangleType	writingR;					// enclosing rect for writing area
+ 	UInt				appAreaBottom;				// bottom coordinate of application area.
+ 	
+ 	UInt				penX;							// current pen location and state
+ 	UInt				penY;				
+ 	Boolean			penDown;
+ 	Boolean			displayingBatteryAlert; // to avoid re-entering battery dialog
+ 	
+ 	UInt				lastPenX;					// last pen location and state
+ 	UInt				lastPenY;
+ 	Boolean			lastPenDown;
+ 	
+ 	// This boolean is set by the Remote Screen Driver timer procedure periodically
+ 	//  to force the event manager to call ScrSendUpdateArea which will send the update
+ 	//  area of the screen to the host.
+ 	Boolean			needRemoteScrUpdate;		// If true, call ScrSendUpdateArea 
+ 	
+ 	
+ 	Long				smID;							// Semaphore set by interrupt routines
+ 														//  whenever a low level event is detected
+ 
+ 	Byte				gremlinsFlags;				// flag to indicate if gremlins is running and
+ 														// if we'er doing an event trace.
+ 
+ 	Boolean			idle;
+ 															
+ 	} SysEvtMgrGlobalsType;
+ 	
+ typedef SysEvtMgrGlobalsType* SysEvtMgrGlobalsPtr;
+ 
+ 
+ 
+ 
+ /************************************************************
+  * System Event Manager procedures
+  *************************************************************/
+ #ifdef __cplusplus
+ extern "C" {  
+ #endif
+ 
+ 
+ 
+ // Return pointer to the pen based button list
+ PenBtnInfoPtr	EvtGetPenBtnList(UIntPtr numButtons)
+ 						SYS_TRAP(sysTrapEvtGetPenBtnList);
+ 
+ #ifdef __cplusplus
+ }
+ #endif
+ 
+ 
+ #endif //__SYSEVTPRV_H__
+ 
+ #endif // NON_PORTABLE
+ 
diff -r -c -x *.orig -x *.rej -x #* -x *~ -N orig/gcc-2.7.2.2/PalmOS/System/SysTraps.h gcc-2.7.2.2/PalmOS/System/SysTraps.h
*** orig/gcc-2.7.2.2/PalmOS/System/SysTraps.h	Thu Jan  1 01:00:00 1970
--- gcc-2.7.2.2/PalmOS/System/SysTraps.h	Wed Feb 19 16:49:19 1997
***************
*** 0 ****
--- 1,849 ----
+ /*******************************************************************
+  * 							 Pilot Software  
+  *
+  *		 Copyright(c) 1994, Palm Computing Inc., All Rights Reserved
+  *
+  *-------------------------------------------------------------------
+  * FileName:  
+  *		SysTraps.h
+  *
+  * Description:
+  *		Pilot Traps
+  *
+  * History:
+  *		6/13/95	RM	- Created by Ron Marianetti   
+  *
+  *******************************************************************/
+ 
+  #ifndef __SYSTRAPS_H_
+  #define __SYSTRAPS_H_
+ 
+ // Include elementary types
+ #include <Common.h>
+ #include <M68KHwr.h>
+ 
+ // Regular traps start here and go up by 1's
+ #define	sysTrapBase			0xA000
+ typedef enum {
+ 	sysTrapMemInit = sysTrapBase,
+ 	sysTrapMemInitHeapTable,
+ 	sysTrapMemStoreInit,
+ 	sysTrapMemCardFormat,
+ 	sysTrapMemCardInfo,
+ 	sysTrapMemStoreInfo,
+ 	sysTrapMemStoreSetInfo,
+ 	sysTrapMemNumHeaps,
+ 	sysTrapMemNumRAMHeaps,
+ 	sysTrapMemHeapID,
+ 	sysTrapMemHeapPtr,
+ 	sysTrapMemHeapFreeBytes,
+ 	sysTrapMemHeapSize,
+ 	sysTrapMemHeapFlags,
+ 	sysTrapMemHeapCompact,
+ 	sysTrapMemHeapInit,
+ 	sysTrapMemHeapFreeByOwnerID,
+ 	sysTrapMemChunkNew,
+ 	sysTrapMemChunkFree,
+ 	sysTrapMemPtrNew,
+ 	sysTrapMemPtrRecoverHandle,
+ 	sysTrapMemPtrFlags,
+ 	sysTrapMemPtrSize,
+ 	sysTrapMemPtrOwner,
+ 	sysTrapMemPtrHeapID,
+ 	sysTrapMemPtrCardNo,
+ 	sysTrapMemPtrToLocalID,
+ 	sysTrapMemPtrSetOwner,
+ 	sysTrapMemPtrResize,
+ 	sysTrapMemPtrResetLock,
+ 	sysTrapMemHandleNew,
+ 	sysTrapMemHandleLockCount,
+ 	sysTrapMemHandleToLocalID,
+ 	sysTrapMemHandleLock,
+ 	sysTrapMemHandleUnlock,
+ 	sysTrapMemLocalIDToGlobal,
+ 	sysTrapMemLocalIDKind,
+ 	sysTrapMemLocalIDToPtr,
+ 	sysTrapMemMove,
+ 	sysTrapMemSet,
+ 	sysTrapMemStoreSearch,
+ 	sysTrapMemPtrDataStorage,
+ 	sysTrapMemKernelInit,
+ 	sysTrapMemHandleFree,
+ 	sysTrapMemHandleFlags,
+ 	sysTrapMemHandleSize,
+ 	sysTrapMemHandleOwner,
+ 	sysTrapMemHandleHeapID,
+ 	sysTrapMemHandleDataStorage,
+ 	sysTrapMemHandleCardNo,
+ 	sysTrapMemHandleSetOwner,
+ 	sysTrapMemHandleResize,
+ 	sysTrapMemHandleResetLock,
+ 	sysTrapMemPtrUnlock,
+ 	sysTrapMemLocalIDToLockedPtr,
+ 	sysTrapMemSetDebugMode,
+ 	sysTrapMemHeapScramble,
+ 	sysTrapMemHeapCheck,
+ 	sysTrapMemNumCards,
+ 	sysTrapMemDebugMode,
+ 	sysTrapMemSemaphoreReserve,
+ 	sysTrapMemSemaphoreRelease,
+ 	sysTrapMemHeapDynamic,
+ 	sysTrapMemNVParams,
+ 	
+ 	
+ 	sysTrapDmInit,
+ 	sysTrapDmCreateDatabase,
+ 	sysTrapDmDeleteDatabase,
+ 	sysTrapDmNumDatabases,
+ 	sysTrapDmGetDatabase,
+ 	sysTrapDmFindDatabase,
+ 	sysTrapDmDatabaseInfo,
+ 	sysTrapDmSetDatabaseInfo,
+ 	sysTrapDmDatabaseSize,
+ 	sysTrapDmOpenDatabase,
+ 	sysTrapDmCloseDatabase,
+ 	sysTrapDmNextOpenDatabase,
+ 	sysTrapDmOpenDatabaseInfo,
+ 	sysTrapDmResetRecordStates,
+ 	sysTrapDmGetLastErr,
+ 	sysTrapDmNumRecords,
+ 	sysTrapDmRecordInfo,
+ 	sysTrapDmSetRecordInfo,
+ 	sysTrapDmAttachRecord,
+ 	sysTrapDmDetachRecord,
+ 	sysTrapDmMoveRecord,
+ 	sysTrapDmNewRecord,
+ 	sysTrapDmRemoveRecord,
+ 	sysTrapDmDeleteRecord,
+ 	sysTrapDmArchiveRecord,
+ 	sysTrapDmNewHandle,
+ 	sysTrapDmRemoveSecretRecords,
+ 	sysTrapDmQueryRecord,
+ 	sysTrapDmGetRecord,
+ 	sysTrapDmResizeRecord,
+ 	sysTrapDmReleaseRecord,
+ 	sysTrapDmGetResource,
+ 	sysTrapDmGet1Resource,
+ 	sysTrapDmReleaseResource,
+ 	sysTrapDmResizeResource,
+ 	sysTrapDmNextOpenResDatabase,
+ 	sysTrapDmFindResourceType,
+ 	sysTrapDmFindResource,
+ 	sysTrapDmSearchResource,
+ 	sysTrapDmNumResources,
+ 	sysTrapDmResourceInfo,
+ 	sysTrapDmSetResourceInfo,
+ 	sysTrapDmAttachResource,
+ 	sysTrapDmDetachResource,
+ 	sysTrapDmNewResource,
+ 	sysTrapDmRemoveResource,
+ 	sysTrapDmGetResourceIndex,
+ 	sysTrapDmQuickSort,
+ 	sysTrapDmQueryNextInCategory,
+ 	sysTrapDmNumRecordsInCategory,
+ 	sysTrapDmPositionInCategory,
+ 	sysTrapDmSeekRecordInCategory,
+ 	sysTrapDmMoveCategory,
+ 	sysTrapDmOpenDatabaseByTypeCreator,
+ 	sysTrapDmWrite,
+ 	sysTrapDmStrCopy,
+ 	sysTrapDmGetNextDatabaseByTypeCreator,
+ 	sysTrapDmWriteCheck,
+ 	sysTrapDmMoveOpenDBContext,
+ 	sysTrapDmFindRecordByID,
+ 	sysTrapDmGetAppInfoID,
+ 	sysTrapDmFindSortPosition,
+ 	sysTrapDmSet,
+ 	sysTrapDmCreateDatabaseFromImage,
+ 
+ 	
+ 	sysTrapDbgSrcMessage,
+ 	sysTrapDbgMessage,
+ 	sysTrapDbgGetMessage,
+ 	sysTrapDbgCommSettings,
+ 	
+ 	sysTrapErrDisplayFileLineMsg,
+ 	sysTrapErrSetJump,
+ 	sysTrapErrLongJump,
+ 	sysTrapErrThrow,
+ 	sysTrapErrExceptionList,
+ 	
+ 	sysTrapSysBroadcastActionCode,
+ 	sysTrapSysUnimplemented,
+ 	sysTrapSysColdBoot,
+ 	sysTrapSysReset,
+ 	sysTrapSysDoze,
+ 	sysTrapSysAppLaunch,
+ 	sysTrapSysAppStartup,
+ 	sysTrapSysAppExit,
+ 	sysTrapSysSetA5,
+ 	sysTrapSysSetTrapAddress,
+ 	sysTrapSysGetTrapAddress,
+ 	sysTrapSysTranslateKernelErr,
+ 	sysTrapSysSemaphoreCreate,
+ 	sysTrapSysSemaphoreDelete,
+ 	sysTrapSysSemaphoreWait,
+ 	sysTrapSysSemaphoreSignal,
+ 	sysTrapSysTimerCreate,
+ 	sysTrapSysTimerWrite,
+ 	sysTrapSysTaskCreate,
+ 	sysTrapSysTaskDelete,
+ 	sysTrapSysTaskTrigger,
+ 	sysTrapSysTaskID,
+ 	sysTrapSysTaskUserInfoPtr,
+ 	sysTrapSysTaskDelay,
+ 	sysTrapSysTaskSetTermProc,
+ 	sysTrapSysUILaunch,
+ 	sysTrapSysNewOwnerID,
+ 	sysTrapSysSemaphoreSet,
+ 	sysTrapSysDisableInts,
+ 	sysTrapSysRestoreStatus,
+ 	sysTrapSysUIAppSwitch,
+ 	sysTrapSysCurAppInfoP,
+ 	sysTrapSysHandleEvent,
+ 	sysTrapSysInit,
+ 	sysTrapSysQSort,
+ 	sysTrapSysCurAppDatabase,
+ 	sysTrapSysFatalAlert,
+ 	sysTrapSysResSemaphoreCreate,
+ 	sysTrapSysResSemaphoreDelete,
+ 	sysTrapSysResSemaphoreReserve,
+ 	sysTrapSysResSemaphoreRelease,
+ 	sysTrapSysSleep,
+ 	sysTrapSysKeyboardDialog,
+ 	sysTrapSysAppLauncherDialog,
+ 	sysTrapSysSetPerformance,
+ 	sysTrapSysBatteryInfo,
+ 	sysTrapSysLibInstall,
+ 	sysTrapSysLibRemove,
+ 	sysTrapSysLibTblEntry,
+ 	sysTrapSysLibFind,
+ 	sysTrapSysBatteryDialog,
+ 	sysTrapSysCopyStringResource,
+ 	sysTrapSysKernelInfo,
+ 	sysTrapSysLaunchConsole,
+ 	sysTrapSysTimerDelete,
+ 	sysTrapSysSetAutoOffTime,
+ 	sysTrapSysFormPointerArrayToStrings,
+ 	sysTrapSysRandom,
+ 	sysTrapSysTaskSwitching,
+ 	sysTrapSysTimerRead,
+ 
+ 
+ 	sysTrapStrCopy,
+ 	sysTrapStrCat,
+ 	sysTrapStrLen,
+ 	sysTrapStrCompare,
+ 	sysTrapStrIToA,
+ 	sysTrapStrCaselessCompare,
+ 	sysTrapStrIToH,
+ 	sysTrapStrChr,
+ 	sysTrapStrStr,
+ 	sysTrapStrAToI,
+ 	sysTrapStrToLower,
+ 
+ 	sysTrapSerReceiveISP,
+ 	
+ 	sysTrapSlkOpen,
+ 	sysTrapSlkClose,
+ 	sysTrapSlkOpenSocket,
+ 	sysTrapSlkCloseSocket,
+ 	sysTrapSlkSocketRefNum,
+ 	sysTrapSlkSocketSetTimeout,
+ 	sysTrapSlkFlushSocket,
+ 	sysTrapSlkSetSocketListener,
+ 	sysTrapSlkSendPacket,
+ 	sysTrapSlkReceivePacket,
+ 	sysTrapSlkSysPktDefaultResponse,
+ 	sysTrapSlkProcessRPC,
+ 
+ 	
+ 	sysTrapConPutS,
+ 	sysTrapConGetS,
+ 	
+ 	sysTrapFplInit,
+ 	sysTrapFplFree,
+ 	sysTrapFplFToA,
+ 	sysTrapFplAToF,
+ 	sysTrapFplBase10Info,
+ 	sysTrapFplLongToFloat,
+ 	sysTrapFplFloatToLong,
+ 	sysTrapFplFloatToULong,
+ 	sysTrapFplMul,
+ 	sysTrapFplAdd,
+ 	sysTrapFplSub,
+ 	sysTrapFplDiv,
+ 	
+ 	sysTrapScrInit,
+ 	sysTrapScrCopyRectangle,
+ 	sysTrapScrDrawChars,
+ 	sysTrapScrLineRoutine,
+ 	sysTrapScrRectangleRoutine,
+ 	sysTrapScrScreenInfo,
+ 	sysTrapScrDrawNotify,
+ 	sysTrapScrSendUpdateArea,
+ 	sysTrapScrCompressScanLine,
+ 	sysTrapScrDeCompressScanLine,
+ 	
+ 	
+ 	sysTrapTimGetSeconds,
+ 	sysTrapTimSetSeconds,
+ 	sysTrapTimGetTicks,
+ 	sysTrapTimInit,
+ 	sysTrapTimSetAlarm,
+ 	sysTrapTimGetAlarm,
+ 	sysTrapTimHandleInterrupt,
+ 	sysTrapTimSecondsToDateTime,
+ 	sysTrapTimDateTimeToSeconds,
+ 	sysTrapTimAdjust,
+ 	sysTrapTimSleep,
+ 	sysTrapTimWake,
+ 	
+ 	sysTrapCategoryCreateList,
+ 	sysTrapCategoryFreeList,
+ 	sysTrapCategoryFind,
+ 	sysTrapCategoryGetName,
+ 	sysTrapCategoryEdit,
+ 	sysTrapCategorySelect,
+ 	sysTrapCategoryGetNext,
+ 	sysTrapCategorySetTriggerLabel,
+ 	sysTrapCategoryTruncateName,
+ 	
+ 	sysTrapClipboardAddItem,
+ 	sysTrapClipboardCheckIfItemExist,
+ 	sysTrapClipboardGetItem,
+ 	
+ 	sysTrapCtlDrawControl,
+ 	sysTrapCtlEraseControl,
+ 	sysTrapCtlHideControl,
+ 	sysTrapCtlShowControl,
+ 	sysTrapCtlGetValue,
+ 	sysTrapCtlSetValue,
+ 	sysTrapCtlGetLabel,
+ 	sysTrapCtlSetLabel,
+ 	sysTrapCtlHandleEvent,
+ 	sysTrapCtlHitControl,
+ 	sysTrapCtlSetEnabled,
+ 	sysTrapCtlSetUsable,
+ 	sysTrapCtlEnabled,
+ 
+ 	
+ 	sysTrapEvtInitialize,
+ 	sysTrapEvtAddEventToQueue,
+ 	sysTrapEvtCopyEvent,
+ 	sysTrapEvtGetEvent,
+ 	sysTrapEvtGetPen,
+ 	sysTrapEvtSysInit,
+ 	sysTrapEvtGetSysEvent,
+ 	sysTrapEvtProcessSoftKeyStroke,
+ 	sysTrapEvtGetPenBtnList,
+ 	sysTrapEvtSetPenQueuePtr,
+ 	sysTrapEvtPenQueueSize,
+ 	sysTrapEvtFlushPenQueue,
+ 	sysTrapEvtEnqueuePenPoint,
+ 	sysTrapEvtDequeuePenStrokeInfo,
+ 	sysTrapEvtDequeuePenPoint,
+ 	sysTrapEvtFlushNextPenStroke,
+ 	sysTrapEvtSetKeyQueuePtr,
+ 	sysTrapEvtKeyQueueSize,
+ 	sysTrapEvtFlushKeyQueue,
+ 	sysTrapEvtEnqueueKey,
+ 	sysTrapEvtDequeueKeyEvent,
+ 	sysTrapEvtWakeup,
+ 	sysTrapEvtResetAutoOffTimer,
+ 	sysTrapEvtKeyQueueEmpty,
+ 	sysTrapEvtEnableGraffiti,
+ 
+ 	
+ 	sysTrapFldCopy,
+ 	sysTrapFldCut,
+ 	sysTrapFldDrawField,
+ 	sysTrapFldEraseField,
+ 	sysTrapFldFreeMemory,
+ 	sysTrapFldGetBounds,
+ 	sysTrapFldGetTextPtr,
+ 	sysTrapFldGetSelection,
+ 	sysTrapFldHandleEvent,
+ 	sysTrapFldPaste,
+ 	sysTrapFldRecalculateField,
+ 	sysTrapFldSetBounds,
+ 	sysTrapFldSetText,
+ 	sysTrapFldGetFont,
+ 	sysTrapFldSetFont,
+ 	sysTrapFldSetSelection,
+ 	sysTrapFldGrabFocus,
+ 	sysTrapFldReleaseFocus,
+ 	sysTrapFldGetInsPtPosition,
+ 	sysTrapFldSetInsPtPosition,
+ 	sysTrapFldSetScrollPosition,
+ 	sysTrapFldGetScrollPosition,
+ 	sysTrapFldGetTextHeight,
+ 	sysTrapFldGetTextAllocatedSize,
+ 	sysTrapFldGetTextLength,
+ 	sysTrapFldScrollField,
+ 	sysTrapFldScrollable,
+ 	sysTrapFldGetVisibleLines,
+ 	sysTrapFldGetAttributes,
+ 	sysTrapFldSetAttributes,
+ 	sysTrapFldSendChangeNotification,
+ 	sysTrapFldCalcFieldHeight,
+ 	sysTrapFldGetTextHandle,
+ 	sysTrapFldCompactText,
+ 	sysTrapFldDirty,
+ 	sysTrapFldWordWrap,
+ 	sysTrapFldSetTextAllocatedSize,
+ 	sysTrapFldSetTextHandle,
+ 	sysTrapFldSetTextPtr,
+ 	sysTrapFldGetMaxChars,
+ 	sysTrapFldSetMaxChars,
+ 	sysTrapFldSetUsable,
+ 	sysTrapFldInsert,
+ 	sysTrapFldDelete,
+ 	sysTrapFldUndo,
+ 	sysTrapFldSetDirty,
+ 	sysTrapFldSendHeightChangeNotification,
+ 	sysTrapFldMakeFullyVisible,
+ 	
+ 	
+ 	sysTrapFntGetFont,
+ 	sysTrapFntSetFont,
+ 	sysTrapFntGetFontPtr,
+ 	sysTrapFntBaseLine,
+ 	sysTrapFntCharHeight,
+ 	sysTrapFntLineHeight,
+ 	sysTrapFntAverageCharWidth,
+ 	sysTrapFntCharWidth,
+ 	sysTrapFntCharsWidth,
+ 	sysTrapFntDescenderHeight,
+ 	sysTrapFntCharsInWidth,
+ 	sysTrapFntLineWidth,
+ 
+ 
+ 	
+ 	sysTrapFrmInitForm,
+ 	sysTrapFrmDeleteForm,
+ 	sysTrapFrmDrawForm,
+ 	sysTrapFrmEraseForm,
+ 	sysTrapFrmGetActiveForm,
+ 	sysTrapFrmSetActiveForm,
+ 	sysTrapFrmGetActiveFormID,
+ 	sysTrapFrmGetUserModifiedState,
+ 	sysTrapFrmSetNotUserModified,
+ 	sysTrapFrmGetFocus,
+ 	sysTrapFrmSetFocus,
+ 	sysTrapFrmHandleEvent,
+ 	sysTrapFrmGetFormBounds,
+ 	sysTrapFrmGetWindowHandle,
+ 	sysTrapFrmGetFormId,
+ 	sysTrapFrmGetFormPtr,
+ 	sysTrapFrmGetNumberOfObjects,
+ 	sysTrapFrmGetObjectIndex,
+ 	sysTrapFrmGetObjectId,
+ 	sysTrapFrmGetObjectType,
+ 	sysTrapFrmGetObjectPtr,
+ 	sysTrapFrmHideObject,
+ 	sysTrapFrmShowObject,
+ 	sysTrapFrmGetObjectPosition,
+ 	sysTrapFrmSetObjectPositon,
+ 	sysTrapFrmGetControlValue,
+ 	sysTrapFrmSetControlValue,
+ 	sysTrapFrmGetControlGroupSelection,
+ 	sysTrapFrmSetControlGroupSelection,
+ 	sysTrapFrmCopyLabel,
+ 	sysTrapFrmSetLabel,
+ 	sysTrapFrmGetLabel,
+ 	sysTrapFrmSetCategoryLabel,
+ 	sysTrapFrmGetTitle,
+ 	sysTrapFrmSetTitle,
+ 	sysTrapFrmAlert,
+ 	sysTrapFrmDoDialog,
+ 	sysTrapFrmCustomAlert,
+ 	sysTrapFrmHelp,
+ 	sysTrapFrmUpdateScrollers,
+ 	sysTrapFrmGetFirstForm,
+ 	sysTrapFrmVisible,
+ 	sysTrapFrmGetObjectBounds,
+ 	sysTrapFrmCopyTitle,
+ 	sysTrapFrmGotoForm,
+ 	sysTrapFrmPopupForm,
+ 	sysTrapFrmUpdateForm,
+ 	sysTrapFrmReturnToForm,
+ 	sysTrapFrmSetEventHandler,
+ 	sysTrapFrmDispatchEvent,
+ 	sysTrapFrmCloseAllForms,
+ 	sysTrapFrmSaveAllForms,
+ 	sysTrapFrmGetGadgetData,
+ 	sysTrapFrmSetGadgetData,
+ 	sysTrapFrmSetCategoryTrigger, 
+ 
+ 	
+ 	sysTrapUIInitialize,
+ 	sysTrapUIReset,
+ 
+ 	sysTrapInsPtInitialize,
+ 	sysTrapInsPtSetLocation,
+ 	sysTrapInsPtGetLocation,
+ 	sysTrapInsPtEnable,
+ 	sysTrapInsPtEnabled,
+ 	sysTrapInsPtSetHeight,
+ 	sysTrapInsPtGetHeight,
+ 	sysTrapInsPtCheckBlink,
+ 	
+ 	sysTrapLstSetDrawFunction,
+ 	sysTrapLstDrawList,
+ 	sysTrapLstEraseList,
+ 	sysTrapLstGetSelection,
+ 	sysTrapLstGetSelectionText,
+ 	sysTrapLstHandleEvent,
+ 	sysTrapLstSetHeight,
+ 	sysTrapLstSetSelection,
+ 	sysTrapLstSetListChoices,
+ 	sysTrapLstMakeItemVisible,
+ 	sysTrapLstGetNumberOfItems,
+ 	sysTrapLstPopupList,
+ 	sysTrapLstSetPosition,
+ 	
+ 	sysTrapMenuInit,
+ 	sysTrapMenuDispose,
+ 	sysTrapMenuHandleEvent,
+ 	sysTrapMenuDrawMenu,
+ 	sysTrapMenuEraseStatus,
+ 	sysTrapMenuGetActiveMenu,
+ 	sysTrapMenuSetActiveMenu,
+ 
+ 	
+ 	sysTrapRctSetRectangle,
+ 	sysTrapRctCopyRectangle,
+ 	sysTrapRctInsetRectangle,
+ 	sysTrapRctOffsetRectangle,
+ 	sysTrapRctPtInRectangle,
+ 	sysTrapRctGetIntersection,
+ 
+ 	
+ 	sysTrapTblDrawTable,
+ 	sysTrapTblEraseTable,
+ 	sysTrapTblHandleEvent,
+ 	sysTrapTblGetItemBounds,
+ 	sysTrapTblSelectItem,
+ 	sysTrapTblGetItemInt,
+ 	sysTrapTblSetItemInt,
+ 	sysTrapTblSetItemStyle,
+ 	sysTrapTblUnhighlightSelection,
+ 	sysTrapTblSetRowUsable,
+ 	sysTrapTblGetNumberOfRows,
+ 	sysTrapTblSetCustomDrawProcedure,
+ 	sysTrapTblSetRowSelectable,
+ 	sysTrapTblRowSelectable,
+ 	sysTrapTblSetLoadDataProcedure,
+ 	sysTrapTblSetSaveDataProcedure,
+ 	sysTrapTblGetBounds,
+ 	sysTrapTblSetRowHeight,
+ 	sysTrapTblGetColumnWidth,
+ 	sysTrapTblGetRowID,
+ 	sysTrapTblSetRowID,
+ 	sysTrapTblMarkRowInvalid,
+ 	sysTrapTblMarkTableInvalid,
+ 	sysTrapTblGetSelection,
+ 	sysTrapTblInsertRow,
+ 	sysTrapTblRemoveRow,
+ 	sysTrapTblRowInvalid,
+ 	sysTrapTblRedrawTable,
+ 	sysTrapTblRowUsable,
+ 	sysTrapTblReleaseFocus,
+ 	sysTrapTblEditing,
+ 	sysTrapTblGetCurrentField,
+ 	sysTrapTblSetColumnUsable,
+ 	sysTrapTblGetRowHeight,
+ 	sysTrapTblSetColumnWidth,
+ 	sysTrapTblGrabFocus,
+ 	sysTrapTblSetItemPtr,
+ 	sysTrapTblFindRowID,
+ 	sysTrapTblGetLastUsableRow,
+ 	sysTrapTblGetColumnSpacing,
+ 	sysTrapTblFindRowData,
+ 	sysTrapTblGetRowData,
+ 	sysTrapTblSetRowData,
+ 	sysTrapTblSetColumnSpacing,
+ 
+ 
+ 	
+ 	sysTrapWinCreateWindow,
+ 	sysTrapWinCreateOffscreenWindow,
+ 	sysTrapWinDeleteWindow,
+ 	sysTrapWinInitializeWindow,
+ 	sysTrapWinAddWindow,
+ 	sysTrapWinRemoveWindow,
+ 	sysTrapWinSetActiveWindow,
+ 	sysTrapWinSetDrawWindow,
+ 	sysTrapWinGetDrawWindow,
+ 	sysTrapWinGetActiveWindow,
+ 	sysTrapWinGetDisplayWindow,
+ 	sysTrapWinGetFirstWindow,
+ 	sysTrapWinEnableWindow,
+ 	sysTrapWinDisableWindow,
+ 	sysTrapWinGetWindowFrameRect,
+ 	sysTrapWinDrawWindowFrame,
+ 	sysTrapWinEraseWindow,
+ 	sysTrapWinSaveBits,
+ 	sysTrapWinRestoreBits,
+ 	sysTrapWinCopyRectangle,
+ 	sysTrapWinScrollRectangle,
+ 	sysTrapWinGetDisplayExtent,
+ 	sysTrapWinGetWindowExtent,
+ 	sysTrapWinDisplayToWindowPt,
+ 	sysTrapWinWindowToDisplayPt,
+ 	sysTrapWinGetClip,
+ 	sysTrapWinSetClip,
+ 	sysTrapWinResetClip,
+ 	sysTrapWinClipRectangle,
+ 	sysTrapWinDrawLine,
+ 	sysTrapWinDrawGrayLine,
+ 	sysTrapWinEraseLine,
+ 	sysTrapWinInvertLine,
+ 	sysTrapWinFillLine,
+ 	sysTrapWinDrawRectangle,
+ 	sysTrapWinEraseRectangle,
+ 	sysTrapWinInvertRectangle,
+ 	sysTrapWinDrawRectangleFrame,
+ 	sysTrapWinDrawGrayRectangleFrame,
+ 	sysTrapWinEraseRectangleFrame,
+ 	sysTrapWinInvertRectangleFrame,
+ 	sysTrapWinGetFramesRectangle,
+ 	sysTrapWinDrawChars,
+ 	sysTrapWinEraseChars,
+ 	sysTrapWinInvertChars,
+ 	sysTrapWinGetPattern,
+ 	sysTrapWinSetPattern,
+ 	sysTrapWinSetUnderlineMode,
+ 	sysTrapWinDrawBitmap,
+ 	sysTrapWinModal,
+ 	sysTrapWinGetWindowBounds,
+ 	sysTrapWinFillRectangle,
+ 	sysTrapWinDrawInvertedChars,
+ 	
+ 	
+ 	
+ 	sysTrapPrefOpenPreferenceDB,
+ 	sysTrapPrefGetPreferences,
+ 	sysTrapPrefSetPreferences,
+ 	sysTrapPrefGetAppPreferences,
+ 	sysTrapPrefSetAppPreferences,
+ 
+ 	
+ 	sysTrapSndInit,
+ 	sysTrapSndSetDefaultVolume,
+ 	sysTrapSndGetDefaultVolume,
+ 	sysTrapSndDoCmd,
+ 	sysTrapSndPlaySystemSound,
+ 	
+ 	
+ 	sysTrapAlmInit,
+ 	sysTrapAlmCancelAll,
+ 	sysTrapAlmAlarmCallback,
+ 	sysTrapAlmSetAlarm,
+ 	sysTrapAlmGetAlarm,
+ 	sysTrapAlmDisplayAlarm,
+ 	sysTrapAlmEnableNotification,
+ 	
+ 	
+ 	sysTrapHwrGetRAMMapping,
+ 	sysTrapHwrMemWritable,
+ 	sysTrapHwrMemReadable,
+ 	sysTrapHwrDoze,
+ 	sysTrapHwrSleep,
+ 	sysTrapHwrWake,
+ 	sysTrapHwrSetSystemClock,
+ 	sysTrapHwrSetCPUDutyCycle,
+ 	sysTrapHwrLCDInit,
+ 	sysTrapHwrLCDSleep,
+ 	sysTrapHwrTimerInit,
+ 	sysTrapHwrCursor,
+ 	sysTrapHwrBatteryLevel,
+ 	sysTrapHwrDelay,
+ 	sysTrapHwrEnableDataWrites,
+ 	sysTrapHwrDisableDataWrites,
+ 	sysTrapHwrLCDBaseAddr,
+ 	sysTrapHwrLCDDrawBitmap,
+ 	sysTrapHwrTimerSleep,
+ 	sysTrapHwrTimerWake,
+ 	sysTrapHwrLCDWake,
+ 	sysTrapHwrIRQ1Handler,
+ 	sysTrapHwrIRQ2Handler,
+ 	sysTrapHwrIRQ3Handler,
+ 	sysTrapHwrIRQ4Handler,
+ 	sysTrapHwrIRQ5Handler,
+ 	sysTrapHwrIRQ6Handler,
+ 	sysTrapHwrDockSignals,
+ 	sysTrapHwrPluggedIn,
+ 
+ 	
+ 	sysTrapCrc16CalcBlock,
+ 	
+ 	
+ 	sysTrapSelectDay,
+ 	sysTrapSelectTime,
+ 	
+ 	sysTrapDayDrawDaySelector,
+ 	sysTrapDayHandleEvent,
+ 	sysTrapDayDrawDays,
+ 	sysTrapDayOfWeek,
+ 	sysTrapDaysInMonth,
+ 	sysTrapDayOfMonth,
+ 	
+ 	sysTrapDateDaysToDate,
+ 	sysTrapDateToDays,
+ 	sysTrapDateAdjust,
+ 	sysTrapDateSecondsToDate,
+ 	sysTrapDateToAscii,
+ 	sysTrapDateToDOWDMFormat,
+ 	sysTrapTimeToAscii,
+ 		
+ 	
+ 	sysTrapFind,
+ 	sysTrapFindStrInStr,
+ 	sysTrapFindSaveMatch,
+ 	sysTrapFindGetLineBounds,
+ 	sysTrapFindDrawHeader,
+ 	
+ 	sysTrapPenOpen,
+ 	sysTrapPenClose,
+ 	sysTrapPenGetRawPen,
+ 	sysTrapPenCalibrate,
+ 	sysTrapPenRawToScreen,
+ 	sysTrapPenScreenToRaw,
+ 	sysTrapPenResetCalibration,
+ 	sysTrapPenSleep,
+ 	sysTrapPenWake,
+ 	
+ 	
+ 	sysTrapResLoadForm,
+ 	sysTrapResLoadMenu,
+ 	
+ 	sysTrapFtrInit,
+ 	sysTrapFtrUnregister,
+ 	sysTrapFtrGet,
+ 	sysTrapFtrSet,
+ 	sysTrapFtrGetByIndex,
+ 	
+ 	
+ 	
+ 	sysTrapGrfInit,
+ 	sysTrapGrfFree,
+ 	sysTrapGrfGetState,
+ 	sysTrapGrfSetState,
+ 	sysTrapGrfFlushPoints,
+ 	sysTrapGrfAddPoint,
+ 	sysTrapGrfInitState,
+ 	sysTrapGrfCleanState,
+ 	sysTrapGrfMatch,
+ 	sysTrapGrfGetMacro,
+ 	sysTrapGrfFilterPoints,
+ 	sysTrapGrfGetNumPoints,
+ 	sysTrapGrfGetPoint,
+ 	sysTrapGrfFindBranch,
+ 	sysTrapGrfMatchGlyph,
+ 	sysTrapGrfGetGlyphMapping,
+ 	sysTrapGrfGetMacroName,
+ 	sysTrapGrfDeleteMacro,
+ 	sysTrapGrfAddMacro,
+ 	sysTrapGrfGetAndExpandMacro,
+ 	sysTrapGrfProcessStroke,
+ 	sysTrapGrfFieldChange,
+ 	
+ 	
+ 	sysTrapGetCharSortValue,
+ 	sysTrapGetCharAttr,
+ 	sysTrapGetCharCaselessValue,
+ 	
+ 	
+ 	sysTrapPwdExists,
+ 	sysTrapPwdVerify,
+ 	sysTrapPwdSet,
+ 	sysTrapPwdRemove,
+ 	
+ 	sysTrapGsiInitialize,
+ 	sysTrapGsiSetLocation,
+ 	sysTrapGsiEnable,
+ 	sysTrapGsiEnabled,
+ 	sysTrapGsiSetShiftState,
+ 	
+ 	sysTrapKeyInit,
+ 	sysTrapKeyHandleInterrupt,
+ 	sysTrapKeyCurrentState,
+ 	sysTrapKeyResetDoubleTap,
+ 	sysTrapKeyRates,
+ 	sysTrapKeySleep,
+ 	sysTrapKeyWake,
+ 	
+ 	
+ 	sysTrapCmBroadcast,
+ 	
+ 	sysTrapDlkStartServer,
+ 	sysTrapDlkGetSyncInfo,
+ 	sysTrapDlkSetLogEntry,
+ 
+ 	sysTrapPsrInit,
+ 	sysTrapPsrClose,
+ 	sysTrapPsrGetCommand,
+ 	sysTrapPsrSendReply,
+ 	
+ 	sysTrapAbtShowAbout,
+ 	
+ 	sysTrapMdmDial,
+ 	sysTrapMdmHangUp,
+ 	
+ 	sysTrapDmSearchRecord,
+ 
+ 	sysTrapSysInsertionSort,
+ 	sysTrapDmInsertionSort,
+ 	
+ 	sysTrapLstSetTopItem,
+ 
+ 	// WARNING!! LEAVE THIS ONE AT THE END
+ 	sysTrapLastTrapNumber
+ 	} SysTrapNumber;
+ 	
+ #define	sysNumTraps	 (sysTrapLastTrapNumber - sysTrapBase)
+ 
+ 
+ 
+ //--------------------------------------------------------------------
+ // Define Library Trap Numbers
+ //--------------------------------------------------------------------
+ // Library traps start here and go up by 1's
+ #define	sysLibTrapBase		0xA800
+ typedef enum {
+ 	sysLibTrapName = sysLibTrapBase,
+ 	sysLibTrapOpen,
+ 	sysLibTrapClose,
+ 	sysLibTrapSleep,
+ 	sysLibTrapWake,
+ 	sysLibTrapCustom
+ 	} SysLibTrapNumber;
+ 
+ 
+ 
+ 	
+ /************************************************************
+  * Pilot specific TRAP instruction numbers
+  *************************************************************/
+ #define sysDbgBreakpointTrapNum		0		// For soft breakpoints		
+ #define sysDbgTrapNum					8		// For compiled breakpoints			
+ #define sysDispatchTrapNum				15		// Trap dispatcher
+ 
+ #ifdef __GNUC__
+ #define SYS_TRAP(trapNum) \
+         __attribute__ ((systrap (trapNum)))
+ #else
+ #define SYS_TRAP(trapNum) \
+ 	TWOWORD_INLINE(m68kTrapInstr+sysDispatchTrapNum,trapNum)
+ #endif	
+ 
+ #define ASM_SYS_TRAP(trapNum)	\
+ 			DC.W	m68kTrapInstr+sysDispatchTrapNum; \
+ 			DC.W	trapNum
+ 	
+ 
+ #endif  //__SYSTRAPS_H_
+ 
+ 
diff -r -c -x *.orig -x *.rej -x #* -x *~ -N orig/gcc-2.7.2.2/PalmOS/System/SysUtils.h gcc-2.7.2.2/PalmOS/System/SysUtils.h
*** orig/gcc-2.7.2.2/PalmOS/System/SysUtils.h	Thu Jan  1 01:00:00 1970
--- gcc-2.7.2.2/PalmOS/System/SysUtils.h	Wed Feb 19 16:49:19 1997
***************
*** 0 ****
--- 1,72 ----
+ /***********************************************************************
+  *
+  *	Copyright (c) Palm Computing 1995 -- All Rights Reserved
+  *
+  * PROJECT:  Pilot
+  * FILE:     SysUtils.h
+  * AUTHOR:	 Roger Flores: April 27, 1995
+  *
+  * DECLARER: UI
+  *
+  * DESCRIPTION:
+  *	  These are miscellaneous routines.
+  *
+  **********************************************************************/
+ #ifndef __SYSUTILS_H__
+ #define __SYSUTILS_H__
+ 
+ // Include elementary types
+ #include <Common.h>					// Basic types
+ #include <SysTraps.h>				// Trap Numbers.
+ 
+ 
+ 
+ //typedef Int _comparF (const void *, const void *, Int other);
+ typedef Int _comparF (VoidPtr, VoidPtr, Long other);
+ typedef _comparF * CmpFuncPtr;
+ 
+ 
+ /************************************************************
+  * Constants
+  *************************************************************/
+ #define	sysRandomMax		0x7FFF			// Max value returned from SysRandom()
+ 
+ 
+ /************************************************************
+  * Macros
+  *************************************************************/
+ #define Abs(a) ((a >= 0) ? a : (-a))
+ 
+ /************************************************************
+  * procedures
+  *************************************************************/
+ #ifdef __cplusplus
+ extern "C" {
+ #endif
+ 
+ void 		SysInsertionSort (VoidPtr baseP, Int numOfElements, Int width, 
+ 				_comparF *comparF, const Long other)
+ 						SYS_TRAP(sysTrapSysInsertionSort);
+ 
+ void 		SysQSort (VoidPtr baseP, Int numOfElements, Int width, 
+ 				_comparF *comparF, const Long other)
+ 						SYS_TRAP(sysTrapSysQSort);
+ 
+ void		SysCopyStringResource (CharPtr string, UInt theID)
+ 						SYS_TRAP(sysTrapSysCopyStringResource);
+ 
+ VoidHand SysFormPointerArrayToStrings(CharPtr c, Int stringCount)
+ 						SYS_TRAP(sysTrapSysFormPointerArrayToStrings);
+ 						
+ 						
+ // Return a random number ranging from 0 to sysRandomMax.
+ // Normally, 0 is passed unless you want to start with a new seed.
+ Int		SysRandom(ULong newSeed)
+ 						SYS_TRAP(sysTrapSysRandom);
+ 
+ #ifdef __cplusplus
+ }
+ #endif
+ 
+ #endif // __SYSUTILS_H__
+ 
diff -r -c -x *.orig -x *.rej -x #* -x *~ -N orig/gcc-2.7.2.2/PalmOS/System/SystemMgr.h gcc-2.7.2.2/PalmOS/System/SystemMgr.h
*** orig/gcc-2.7.2.2/PalmOS/System/SystemMgr.h	Thu Jan  1 01:00:00 1970
--- gcc-2.7.2.2/PalmOS/System/SystemMgr.h	Wed Feb 19 16:49:19 1997
***************
*** 0 ****
--- 1,457 ----
+ /*******************************************************************
+  * 							 Pilot Software  
+  *
+  *		 Copyright(c) 1994, Palm Computing Inc., All Rights Reserved
+  *
+  *-------------------------------------------------------------------
+  * FileName:  
+  *		SystemMgr.h
+  *
+  * Description:
+  *		Pilot system equates
+  *
+  * History:
+  *		10/27/94	RM	- Created by Ron Marianetti   
+  *
+  *******************************************************************/
+ 
+  #ifndef __SYSTEMMGR_H__
+  #define __SYSTEMMGR_H__
+ 
+ // Include elementary types
+ #include <Common.h>
+ #include <SysTraps.h>				// Trap Numbers.
+ 
+ // Other types
+ #include <SystemMgr.rh>				// Resource definitions.
+ 
+ 
+ // UI Headers 
+ #include <UICommon.h>
+ #include <Init.h>
+ #include <Rect.h>
+ #include <Font.h>
+ #include <Window.h>
+ #include <InsPoint.h>
+ #include <Event.h>
+ #include <DataMgr.h>					// for DmOpenRef
+ 
+ 
+ 
+ /************************************************************
+  * System Constants
+  *************************************************************/
+ // Define the number of ticks/second
+ #if EMULATION_LEVEL == EMULATION_MAC
+ 	#define	sysTicksPerSecond				60					// 60/sec on Macintosh
+ #elif EMULATION_LEVEL == EMULATION_NONE
+ 	#define	sysTicksPerSecond				100				// 100/sec on Pilot
+ #elif EMULATION_LEVEL == EMULATION_WINDOWS
+ 	#define	sysTicksPerSecond				1000				// 1000/sec on Windows PC
+ #else
+ 	#error
+ #endif
+ 
+ 	
+ 	
+ 
+ /************************************************************
+  * Action Codes
+  *************************************************************/
+ // SysAppLaunch Commands
+ #define	sysAppLaunchCmdNormalLaunch		0	// Normal Launch
+ #define	sysAppLaunchCmdFind					1	// Find string
+ #define	sysAppLaunchCmdGoTo					2	// Launch and go to a particular record
+ #define	sysAppLaunchCmdSyncNotify			3  // Sent to apps whose databases changed during
+ 															// HotSync after the sync has been completed
+ #define	sysAppLaunchCmdTimeChange			4  // The system time has changed
+ #define	sysAppLaunchCmdSystemReset			5  // Sent after System hard resets
+ #define	sysAppLaunchCmdAlarmTriggered		6  // Schedule next alarm
+ #define	sysAppLaunchCmdDisplayAlarm		7  // Display given alarm dialog
+ #define	sysAppLaunchCmdCountryChange		8  // The country has changed
+ #define	sysAppLaunchCmdSyncRequest			9  // The "HotSync" button was pressed
+ #define	sysAppLaunchCmdSaveData			  10  // Sent to running app before sysAppLaunchCmdFind
+ 															//  or other action codes that will cause
+ 															//  data searches or manipulation.
+ #define	sysAppLaunchCmdInitDatabase	  11  // Initialize a database; sent by DesktopLink
+ 															// server to the app whose creator ID matches
+ 															// that of the database created in response to
+ 															// the "create db" request.
+ #define	sysAppLaunchCmdSyncCallApplication	  12  // Used by DesktopLink Server command "call application"
+ 
+ 
+ 
+ // SysAppLaunch flags
+ #define	sysAppLaunchFlagNewThread		0x01	// create a new thread for application
+ 															//  - implies sysAppLaunchFlagNewStack
+ #define	sysAppLaunchFlagNewStack		0x02	// create separate stack for application
+ #define	sysAppLaunchFlagNewGlobals		0x04	// create new globals world for application
+ 															//  - implies new owner ID for Memory chunks
+ #define	sysAppLaunchFlagUIApp			0x08	// notifies launch routine that this is a UI app being
+ 															//  launched.
+ #define	sysAppLaunchFlagSubCall			0x10	// notifies launch routine that the app is calling it's
+ 															//  entry point as a subroutine call. This tells the launch
+ 															//  code that it's OK to keep the A5 (globals) pointer valid 
+ 															//  through the call.
+ 
+ //-------------------------------------------------------------------
+ // Parameter blocks for action codes
+ // NOTE: The parameter block for the  sysAppLaunchCmdFind  and sysAppLaunchCmdGoTo
+ //  action codes are defined in "Find.h";
+ //---------------------------------------------------------------------------
+ 
+ // For sysAppLaunchCmdSaveData
+ typedef struct {
+ 	Boolean		uiComing;							// true if system dialog will be put up
+ 															// before coming action code arrives.
+ 	} SysAppLaunchCmdSaveDataType;
+ 	
+ // For sysAppLaunchCmdSystemReset
+ typedef struct {
+ 	Boolean		hardReset;							// true if system was hardReset.
+ 	Boolean		createDefaultDB;					// true if app should create default database.
+ 	} SysAppLaunchCmdSystemResetType;
+ 	
+ 
+ // For sysAppLaunchCmdInitDatabase
+ typedef struct SysAppLaunchCmdInitDatabaseType {
+ 	DmOpenRef	dbP;									// database reference
+ 	ULong			creator;								// datatase creator
+ 	ULong			type;									// database type
+ 	UInt			version;								// database version
+ 	} SysAppLaunchCmdInitDatabaseType;
+ 
+ 
+ // For sysAppLaunchCmdSyncCallApplication
+ typedef struct SysAppLaunchCmdSyncCallApplicationType {
+ 	Word			action;								// call action id (app-specific)
+ 	Word			paramSize;							// parameter size
+ 	VoidPtr		paramP;								// ptr to parameter
+ 	Byte			remoteSocket;						// remote socket id
+ 	Byte			tid;									// command transaction id
+ 	Boolean		handled;								// if handled, MUST be set true by the app
+ 	} SysAppLaunchCmdSyncCallApplicationType;
+ 
+ 
+ 
+ /************************************************************
+  * Function prototype for libraries
+  *************************************************************/
+ typedef struct SysLibTblEntryType {
+ 	Ptr*	dispatchTblP;								// pointer to library dispatch table
+ 	void*	globalsP;									// Library globals
+ 	} SysLibTblEntryType;
+ typedef SysLibTblEntryType*	SysLibTblEntryPtr;
+ 
+ 
+ typedef Err (*SysLibEntryProcPtr)(UInt refNum, SysLibTblEntryPtr entryP);
+ 
+ // This library refNum is reserved for the Debugger comm library
+ #define	sysDbgCommLibraryRefNum		0
+ 
+ 
+ 
+ /************************************************************
+  * Function prototype for Kernel
+  *************************************************************/
+ // Task termination procedure prototype for use with SysTaskSetTermProc
+ typedef void (*SysTermProcPtr)(ULong taskID, Long reason);
+ 
+ // Timer procedure for use with SysTimerCreate
+ typedef void (*SysTimerProcPtr)(Long timerID, Long param);
+ 
+ 
+ 
+ 
+ /************************************************************
+  * Error Classes for each manager
+  *************************************************************/
+ #define	memErrorClass				0x0100	// Memory Manager
+ #define	dmErrorClass				0x0200	// Data Manager
+ #define	serErrorClass				0x0300	// Serial Manager
+ #define	slkErrorClass				0x0400	// Serial Link Manager
+ #define	sysErrorClass				0x0500	// System Manager
+ #define	fplErrorClass				0x0600	// Floating Point Library
+ #define	evtErrorClass				0x0700  	// System Event Manager
+ #define	sndErrorClass				0x0800  	// Sound Manager
+ #define	almErrorClass				0x0900  	// Alarm Manager
+ #define	timErrorClass				0x0A00  	// Time Manager
+ #define	penErrorClass				0x0B00  	// Pen Manager
+ #define	ftrErrorClass				0x0C00  	// Feature Manager
+ #define	cmpErrorClass				0x0D00  	// Connection Manager
+ #define	dlkErrorClass				0x0E00	// Desktop Link Manager
+ #define	padErrorClass				0x0F00	// PAD Manager
+ #define	grfErrorClass				0x1000	// Graffiti Manager
+ #define	mdmErrorClass				0x1100	// Modem Manager
+ 
+ 
+ /************************************************************
+  * System Errors
+  *************************************************************/
+ #define	sysErrTimeout			(sysErrorClass | 1)
+ #define	sysErrParamErr			(sysErrorClass | 2)
+ #define	sysErrNoFreeResource	(sysErrorClass | 3)
+ #define	sysErrNoFreeRAM		(sysErrorClass | 4)
+ #define	sysErrNotAllowed		(sysErrorClass | 5)
+ #define	sysErrSemInUse			(sysErrorClass | 6)
+ #define	sysErrInvalidID		(sysErrorClass | 7)
+ #define	sysErrOutOfOwnerIDs	(sysErrorClass | 8)
+ #define	sysErrNoFreeLibSlots	(sysErrorClass | 9)
+ #define	sysErrLibNotFound		(sysErrorClass | 10)
+ 
+ 
+ /************************************************************
+  * System Features
+  *************************************************************/
+ #define	sysFtrCreator			sysFileCSystem		// Feature Creator
+ #define	sysFtrNumROMVersion	1						// ROM Version
+ 			// 0xMMmfsbbb, where MM is major version, m is minor version
+ 			// f is bug fix, s is stage: 3-release,2-beta,1-alpha,0-development,
+ 			// bbb is build number for non-releases 
+ 			// V1.12b3   would be: 0x01122003
+ 			// V2.00a2   would be: 0x02001002
+ 			// V1.01     would be: 0x01013000
+ #define	sysFtrNumProductID	2						// Product id
+ 			// 0xMMMMRRRR, where MMMM is the model and RRRR
+ 			// is the revision.
+ 
+ 
+ 
+ 
+ /************************************************************
+  * System Types
+  *************************************************************/
+  
+ // Types of batteries installed.
+ typedef enum {
+ 	sysBatteryKindAlkaline=0,
+ 	sysBatteryKindNiCad,
+ 	sysBatteryKindLithium
+ 	} SysBatteryKind;
+ 
+ 
+ 
+ /************************************************************
+  * Function Prototypes
+  *************************************************************/
+ #ifdef __cplusplus
+ extern "C" {
+ #endif
+ 
+ // Prototype for Pilot applications entry point
+ DWord		PilotMain(Word cmd, Ptr cmdPBP, Word launchFlags);
+ 
+ 
+ void		SysUnimplemented(void)
+ 							SYS_TRAP(sysTrapSysUnimplemented);
+ 
+ void		SysColdBoot(Ptr card0P, ULong card0Size, 
+ 							Ptr card1P, ULong card1Size,
+ 							DWord	sysCardHeaderOffset)
+ 							SYS_TRAP(sysTrapSysColdBoot);
+ 							
+ void 		SysInit(void)
+ 							SYS_TRAP(sysTrapSysInit);
+ 							
+ void 		SysReset(void)
+ 							SYS_TRAP(sysTrapSysReset);
+ 							
+ void 		SysPowerOn(Ptr card0P, ULong card0Size, 
+ 							Ptr card1P, ULong card1Size,
+ 							DWord sysCardHeaderOffset, Boolean reFormat);
+ 							
+ 							
+ void 		SysDoze(Boolean onlyNMI)
+ 							SYS_TRAP(sysTrapSysDoze);
+ 							
+ Err 		SysSetPerformance(ULongPtr sysClockP, UIntPtr cpuDutyP)
+ 							SYS_TRAP(sysTrapSysSetPerformance);
+ 							
+ void 		SysSleep(Boolean untilReset, Boolean emergency)
+ 							SYS_TRAP(sysTrapSysSleep);
+ 							
+ UInt		SysBatteryInfo(Boolean set, UIntPtr warnThresholdP, UIntPtr criticalThresholdP,
+ 						UIntPtr maxTicksP, SysBatteryKind* kindP, Boolean* pluggedIn)
+ 							SYS_TRAP(sysTrapSysBatteryInfo);
+ 							
+ UInt 		SysSetAutoOffTime(UInt	seconds)
+ 							SYS_TRAP(sysTrapSysSetAutoOffTime);
+ 
+ Err		SysLaunchConsole(void)
+ 							SYS_TRAP(sysTrapSysLaunchConsole);
+ 
+ Boolean	SysHandleEvent(EventPtr eventP)
+ 							SYS_TRAP(sysTrapSysHandleEvent);
+ 							
+ void 		SysUILaunch(void)
+ 							SYS_TRAP(sysTrapSysUILaunch);
+ 
+ Err 		SysUIAppSwitch(UInt cardNo, LocalID dbID, Word cmd, Ptr cmdPBP)
+ 							SYS_TRAP(sysTrapSysUIAppSwitch);
+ 							
+ Err 		SysCurAppDatabase(UIntPtr cardNoP, LocalID* dbIDP)
+ 							SYS_TRAP(sysTrapSysCurAppDatabase);
+ 							
+ Err		SysBroadcastActionCode(Word cmd, Ptr cmdPBP)
+ 							SYS_TRAP(sysTrapSysBroadcastActionCode);
+ 							
+ Err 		SysAppLaunch(UInt cardNo, LocalID dbID, UInt launchFlags,
+ 							Word cmd, Ptr cmdPBP, DWord* resultP)
+ 							SYS_TRAP(sysTrapSysAppLaunch);
+ 							
+ UInt		SysNewOwnerID(void)
+ 							SYS_TRAP(sysTrapSysNewOwnerID);
+ 							
+ DWord		SysSetA5(DWord newValue)
+ 							SYS_TRAP(sysTrapSysSetA5);
+ 
+ 
+ Ptr		SysCardImageInfo(UInt cardNo, ULongPtr sizeP);
+ 							
+ void		SysCardImageDeleted(UInt cardNo);
+ 
+ // System Dialogs
+ void		SysBatteryDialog(void)
+ 							SYS_TRAP(sysTrapSysBatteryDialog);
+ 
+ // Utilities
+ Err		SysSetTrapAddress(UInt trapNum, VoidPtr procP)
+ 							SYS_TRAP(sysTrapSysSetTrapAddress);
+ 							
+ VoidPtr	SysGetTrapAddress(UInt trapNum)
+ 							SYS_TRAP(sysTrapSysGetTrapAddress);
+ 							
+ Word		SysDisableInts(void)
+ 							SYS_TRAP(sysTrapSysDisableInts);
+ 							
+ void		SysRestoreStatus(Word status)
+ 							SYS_TRAP(sysTrapSysRestoreStatus);
+ 							
+ 
+ // Library Management
+ Err		SysLibInstall(SysLibEntryProcPtr libraryP, UIntPtr refNumP)
+ 							SYS_TRAP(sysTrapSysLibInstall);
+ 							
+ Err		SysLibRemove(UInt refNum)
+ 							SYS_TRAP(sysTrapSysLibRemove);
+ 							
+ Err		SysLibFind(CharPtr nameP, UIntPtr refNumP)
+ 							SYS_TRAP(sysTrapSysLibFind);
+ 							
+ SysLibTblEntryPtr	SysLibTblEntry(UInt refNum)
+ 							SYS_TRAP(sysTrapSysLibTblEntry);
+ 							
+ // Generic Library calls
+ Err		SysLibOpen(UInt refNum)
+ 							SYS_TRAP(sysLibTrapOpen);
+ Err		SysLibClose(UInt refNum)
+ 							SYS_TRAP(sysLibTrapClose);
+ Err		SysLibSleep(UInt refNum)
+ 							SYS_TRAP(sysLibTrapSleep);
+ Err		SysLibWake(UInt refNum)
+ 							SYS_TRAP(sysLibTrapWake);
+ 							
+ 							
+ //-----------------------------------------------------
+ // Kernel Prototypes
+ //-----------------------------------------------------
+ Err		SysTranslateKernelErr(Err err)
+ 							SYS_TRAP(sysTrapSysTranslateKernelErr);
+ 							
+ Err		SysTaskCreate(ULongPtr taskIDP, LongPtr creator, ProcPtr codeP,
+ 							Ptr stackP, ULong stackSize, ULong attr, Long priority,
+ 							ULong tSlice)
+ 							SYS_TRAP(sysTrapSysTaskCreate);
+ 							
+ Err		SysTaskDelete(ULong taskID, Long priority)
+ 							SYS_TRAP(sysTrapSysTaskDelete);
+ 							
+ Err		SysTaskTrigger(ULong taskID)
+ 							SYS_TRAP(sysTrapSysTaskTrigger);
+ 
+ ULong		SysTaskID()
+ 							SYS_TRAP(sysTrapSysTaskID);
+ 							
+ Err		SysTaskDelay(Long delay)
+ 							SYS_TRAP(sysTrapSysTaskDelay);
+ 							
+ Err		SysTaskSetTermProc(ULong taskID, SysTermProcPtr termProcP)
+ 							SYS_TRAP(sysTrapSysTaskSetTermProc);
+ 							
+ Err		SysTaskSwitching(Boolean enable)
+ 							SYS_TRAP(sysTrapSysTaskSwitching);
+ 							
+ 							
+ // Counting Semaphores
+ Err		SysSemaphoreCreate(LongPtr smIDP, LongPtr tagP, Long initValue)
+ 							SYS_TRAP(sysTrapSysSemaphoreCreate);
+ 							
+ Err		SysSemaphoreDelete(Long smID)
+ 							SYS_TRAP(sysTrapSysSemaphoreDelete);
+ 							
+ Err		SysSemaphoreWait(Long smID, Long priority, Long timeout)
+ 							SYS_TRAP(sysTrapSysSemaphoreWait);
+ 							
+ Err		SysSemaphoreSignal(Long smID)
+ 							SYS_TRAP(sysTrapSysSemaphoreSignal);
+ 							
+ Err		SysSemaphoreSet(Long smID)
+ 							SYS_TRAP(sysTrapSysSemaphoreSet);
+ 							
+ 							
+ // Resource Semaphores				
+ Err		SysResSemaphoreCreate(LongPtr smIDP, LongPtr tagP)
+ 							SYS_TRAP(sysTrapSysResSemaphoreCreate);
+ 							
+ Err		SysResSemaphoreDelete(Long smID)
+ 							SYS_TRAP(sysTrapSysResSemaphoreDelete);
+ 							
+ Err		SysResSemaphoreReserve(Long smID, Long priority, Long timeout)
+ 							SYS_TRAP(sysTrapSysResSemaphoreReserve);
+ 							
+ Err		SysResSemaphoreRelease(Long smID)
+ 							SYS_TRAP(sysTrapSysResSemaphoreRelease);
+ 							
+ 							
+ 							
+ // Timers							
+ Err		SysTimerCreate(LongPtr timerIDP, LongPtr tagP, 
+ 							SysTimerProcPtr timerProc, Long periodicDelay,
+ 							Long	param)
+ 							SYS_TRAP(sysTrapSysTimerCreate);
+ 							
+ Err		SysTimerDelete(Long timerID)
+ 							SYS_TRAP(sysTrapSysTimerDelete);
+ 							
+ Err		SysTimerWrite(Long timerID, ULong value)
+ 							SYS_TRAP(sysTrapSysTimerWrite);
+ 							 
+ Err		SysTimerRead(Long timerID, ULong* valueP)
+ 							SYS_TRAP(sysTrapSysTimerRead);
+ 							 
+ 
+ // Information
+ Err		SysKernelInfo(VoidPtr paramP)
+ 							SYS_TRAP(sysTrapSysKernelInfo);
+ 							
+ 
+ #ifdef __cplusplus 
+ }
+ #endif
+ 
+ 
+ 
+ /************************************************************
+  * Assembly Function Prototypes
+  *************************************************************/
+ #define	_SysSemaphoreSignal		\
+ 				ASM_SYS_TRAP(sysTrapSysSemaphoreSignal)
+ 
+ #define	_SysSemaphoreSet		\
+ 				ASM_SYS_TRAP(sysTrapSysSemaphoreSet)
+ 
+ #define	_SysDoze		\
+ 				ASM_SYS_TRAP(sysTrapSysDoze)
+ 
+ 
+ #endif  //__SYSTEMMGR_H__
diff -r -c -x *.orig -x *.rej -x #* -x *~ -N orig/gcc-2.7.2.2/PalmOS/System/SystemMgr.rh gcc-2.7.2.2/PalmOS/System/SystemMgr.rh
*** orig/gcc-2.7.2.2/PalmOS/System/SystemMgr.rh	Thu Jan  1 01:00:00 1970
--- gcc-2.7.2.2/PalmOS/System/SystemMgr.rh	Wed Feb 19 16:16:08 1997
***************
*** 0 ****
--- 1,165 ----
+ /*******************************************************************
+  * 							Pilot Software
+  *
+  *  Copyright(c) 1994, Palm Computing Inc., All Rights Reserved  
+  *
+  *-------------------------------------------------------------------
+  * FileName:
+  *		SystemMgr.rh
+  *
+  * Description:
+  *		Include file for both PilotRez and the C Compiler. This file contains
+  *  equates used by both tools. When compiling using the C compiler
+  *  the variable RESOURCE_COMPILER must be defined.
+  *  
+  *
+  * History:
+  *   	2/27/95 Created by Ron Marianetti
+  *		8/4/95	vmk	Added system resource id for Desktop Link user info
+  *
+  *******************************************************************/
+ 
+ #ifndef 	__SYSTEMMGR_RH__
+ #define	__SYSTEMMGR_RH__
+ 
+ //-----------------------------------------------------------
+ // This section is common to both the C and Resource Compiler
+ //-----------------------------------------------------------
+ 
+ //................................................................
+ // File types and creators
+ //
+ //	Each database shall have a creator ID and a type.
+ //
+ //	The creator ID shall establish which application, patch, or extension
+ //	a particular database is associated with.  The creator ID should identify
+ //	the application/patch/extension, NOT who created it.
+ //
+ //	The type will determine which part of an application,
+ //	patch, or extension a particular database is.
+ //
+ //	There can be only one database per application, patch, or extension
+ //	which has type 'application', 'patch', or 'extension'.
+ //
+ //	Creators:
+ //
+ //	ROM-based applications created by Palm Computing have all-lower case
+ //	creator ID's.  Third-party applications have creator ID's which
+ //	are either all caps, or mixed case.  The same requirements go for
+ //	system patches and extensions.
+ //
+ //	All applications, system patches and extensions shall have unique creator
+ //	ID's.
+ //
+ //	Types:
+ //
+ //	'Application', 'Extension', and 'Patch' file/database types for ROM-based
+ //	apps shall be all-lower case (they are defined below).  Other
+ //	file/database types must be mixed-case,
+ //	or all caps.  These other types are internal to the applications, and
+ //	therefore the system is unconcerned with their exact values.
+ //................................................................
+ #define	sysFileCSystem						'psys'	// Creator type for System files
+ #define  sysFileCGraffiti					'graf'	// Creator type for Graffiti databases
+ #define	sysFileCSystemPatch				'ptch'	// Creator for System resource file patches
+ 
+ #define	sysFileCCalculator				'calc'	// Creator type for Calculator App
+ #define	sysFileCSecurity					'secr'	// Creator type for Security App
+ #define	sysFileCFirstApp					'pref'	// Creator type for First App after reset
+ #define	sysFileCDefaultApp				'memr'	// Creator type for Default app 
+ 
+ #define	sysFileCAddress					'addr'
+ #define	sysFileCToDo						'todo'
+ #define	sysFileCDatebook					'date'
+ #define	sysFileCMemo						'memo'
+ #define	sysFileCSync						'sync'
+ #define	sysFileCSecurity					'secr'
+ 
+ #define	sysFileTSystem						'rsrc'	// File type for Main System File
+ #define	sysFileTSystemPatch				'ptch'	// File type for System resource file patches
+ #define	sysFileTKernel						'krnl'	// File type for System Kernel (AMX)
+ #define	sysFileTUIAppShell				'uish'	// File type for UI Application Shell
+ #define	sysFileTExtension					'extn'	// File type for System Extensions
+ #define	sysFileTApplication				'appl'	// File type for applications
+ 
+ #define	sysFileTGraffitiMacros			'macr'	//  Graffiti Macros database
+ 
+ 
+ //................................................................
+ // Resource types and IDs
+ //................................................................
+ #define	sysResTBootCode					'boot'	// Resource type of boot resources
+ #define	sysResIDBootReset					10000		// Reset code 
+ #define	sysResIDBootInitCode				10001		// Init code 
+ #define	sysResIDBootSysCodeStart		10100		// System code resources start here
+ #define	sysResIDBootSysCodeMin			10102		// IDs 'Start' to this must exist!!
+ #define	sysResIDBootUICodeStart			10200		// UI code resources start here
+ #define	sysResIDBootUICodeMin			10203		// IDs 'Start' to this must exist!!
+ 	
+ #define	sysResTAppPrefs					'pref'	// Resource type of App preferences resources
+ 
+ #define	sysResTAppCode						'code'	// Resource type of App code resources
+ #define	sysResTAppGData					'data'	// Resource type of App global data resources
+ 
+ #define	sysResTExtensionCode				'extn'	// Resource type of Extensions code
+ 
+ #define	sysResTFeatures					'feat'	// Resource type of System features table
+ #define	sysResIDFeatures					10000		// Resource ID of System features table
+ 
+ #define	sysResTLibrary						'libr'	// Resource type of System Libraries
+ 
+ #define	sysResTGrfTemplate				'tmpl'	// Graffiti templates "file"
+ #define	sysResIDGrfTemplate				10000		// Graffiti templates "file" ID
+ #define	sysResTGrfDictionary				'dict'	// Graffiti dictionary "file"
+ #define	sysResIDGrfDictionary			10000		// Graffiti dictionary "file" ID
+ #define	sysResIDGrfDefaultMacros		10000		// sysResTDefaultDB resource with Graffiti Macros database
+ 
+ #define	sysResTDefaultDB					'dflt'	// Default database resource type
+ #define	sysResIDDefaultDB					1			// resource ID of sysResTDefaultDB in each app
+ 
+ // System Preferences
+ #define	sysResTSysPref						sysFileCSystem
+ #define	sysResIDSysPrefMain				0			// Main preferences
+ #define	sysResIDSysPrefPassword			1			// Password
+ #define	sysResIDSysPrefFindStr			2			// Find string
+ #define	sysResIDSysPrefCalibration		3			// Digitizer calibration.
+ #define	sysResIDDlkUserInfo				4			// Desktop Link user information.
+ 
+ 
+ //-----------------------------------------------------------
+ // This section is only valid when running the resource compiler
+ //-----------------------------------------------------------
+ #ifdef RESOURCE_COMPILER
+ 
+ // Definition of the Pilot Preferences Resource. This must match
+ //  the definition of the structure SysAppPrefs in SystemMgr.h
+ resdef {
+ 	word	priority;				// AMX task priority
+ 	long	stackSize;				// required stack size
+ 	long	minHeapSpace;			// min required free space in heap
+ 	} sysResTAppPrefs;
+ 
+ 
+ // Definition of the ROM - Based   Feature table
+ resdef {
+ 	word	featureNum;				// Feature number
+ 	long  featureValue;			// Feature value
+ 	} 'FITM';
+ 	
+ resdef {
+ 	long	creator;					// creator type
+ 	word	len(featureItems);
+ 	resource 'FITM' featureItems[];
+ 	} 'CITM';
+ 
+ resdef {
+ 	word	len(creatorItems);
+ 	resource 'CITM' creatorItems[];
+ 	} sysResTFeatures;
+ 
+ 
+ #endif
+ 
+ 
+ #endif //__SYSTEMMGR_RH__
+ 
diff -r -c -x *.orig -x *.rej -x #* -x *~ -N orig/gcc-2.7.2.2/PalmOS/System/SystemPkt.h gcc-2.7.2.2/PalmOS/System/SystemPkt.h
*** orig/gcc-2.7.2.2/PalmOS/System/SystemPkt.h	Thu Jan  1 01:00:00 1970
--- gcc-2.7.2.2/PalmOS/System/SystemPkt.h	Wed Feb 19 16:49:19 1997
***************
*** 0 ****
--- 1,389 ----
+ /*******************************************************************
+  * 							 Pilot Software
+  *
+  *		 Copyright(c) 1994, Palm Computing Inc., All Rights Reserved
+  *
+  *-------------------------------------------------------------------
+  * FileName:
+  *		SystemPkt.h
+  *
+  * Description:
+  *		Structure of System Packets for the Serial Link Manager. These
+  *	packets are used by the Debugger, Console, and Remote UI modules
+  *	for communication with the host computer.
+  *
+  * History:
+  *   	6/26/95  RM - Created by Ron Marianetti
+  *
+  *
+  *******************************************************************/
+ 
+ 
+ #ifndef __SYSTEM_PKT_H__
+ #define __SYSTEM_PKT_H__
+ 
+ #include <SerialLinkMgr.h>
+ 
+ 
+ //*************************************************************************
+ //   Constants for System Packets
+ //
+ //*************************************************************************
+ 
+ // Max # of bytes we can read/write at a time with the ReadMem and WriteMem
+ //  commands;
+ #define	sysPktMaxMemChunk			256
+ 
+ // Maximum body size for System Packets. This is big enough to have
+ //  256 bytes of data for the Read and Write Mem command plus whatever other
+ //  parameters are in the body for these commands.
+ #define	sysPktMaxBodySize			(sysPktMaxMemChunk+16)
+ 
+ 
+ // Default nitial timeout value for packet receive routines in ticks
+ #define	sysPktInitialTimeout		(sysTicksPerSecond*10)
+ 
+ 
+ 
+ //*************************************************************************
+ // Packet Body Structure
+ //*************************************************************************
+ 
+ // Common fields at the start of every body
+ #define	_sysPktBodyCommon					\
+ 	Byte	command;								\
+ 	Byte	_filler
+ 	
+ 
+ // Generic System Packet Body
+ typedef struct SysPktBodyType {
+ 	_sysPktBodyCommon;
+ 	Byte					data[sysPktMaxBodySize-2];
+ 	} SysPktBodyType;
+ typedef SysPktBodyType*	SysPktBodyPtr;
+ 
+ 
+ 
+ //*************************************************************************
+ // The max size of the array of SlkWriteDataTypes used by System Packet
+ //  assembly routines in order to minimize stack usage.
+ //*************************************************************************
+ #define	sysPktMaxBodyChunks	3
+ 
+ 
+ 
+ //*************************************************************************
+ // packet commands
+ //*************************************************************************
+ 
+ //--------------------------------------------------------------------
+ // get state command
+ //--------------------------------------------------------------------
+ #define	sysPktStateCmd					0x00
+ #define	sysPktStateRsp					0x80
+ 
+ //--------------------------------------------------------------------
+ // read memory command
+ //--------------------------------------------------------------------
+ #define	sysPktReadMemCmd				0x01
+ #define	sysPktReadMemRsp				0x81
+ 				
+ typedef struct SysPktReadMemCmdType {
+ 	_sysPktBodyCommon;								// Common Body header
+ 	void*					address;						// Address to read
+ 	Word					numBytes;					// # of bytes to read
+ 	} SysPktReadMemCmdType;
+ typedef SysPktReadMemCmdType*	SysPktReadMemCmdPtr;
+ 
+ typedef struct SysPktReadMemRspType {
+ 	_sysPktBodyCommon;								// Common Body header
+ 	// Byte				data[?];						// variable size
+ 	} SysPktReadMemRspType;
+ typedef SysPktReadMemRspType*	SysPktReadMemRspPtr;
+ 
+ 
+ //--------------------------------------------------------------------
+ // write memory command
+ //--------------------------------------------------------------------
+ #define	sysPktWriteMemCmd				0x02
+ #define	sysPktWriteMemRsp				0x82
+ 
+ typedef struct SysPktWriteMemCmdType {
+ 	_sysPktBodyCommon;								// Common Body header
+ 	void*					address;						// Address to write
+ 	Word					numBytes;					// # of bytes to write
+ 	// Byte				data[?];						// variable size data
+ 	} SysPktWriteMemCmdType;
+ typedef SysPktWriteMemCmdType*	SysPktWriteMemCmdPtr;
+ 
+ typedef struct SysPktWriteMemRspType {
+ 	_sysPktBodyCommon;								// Common Body header
+ 	} SysPktWriteMemRspType;
+ typedef SysPktWriteMemRspType*	SysPktWriteMemRspPtr;
+ 
+ 
+ //--------------------------------------------------------------------
+ // single-step command
+ //--------------------------------------------------------------------
+ #define	sysPktSingleStepCmd			0x03
+ // no response
+ 
+ //--------------------------------------------------------------------
+ // get routine name command
+ //--------------------------------------------------------------------
+ #define	sysPktGetRtnNameCmd			0x04
+ #define	sysPktGetRtnNameRsp			0x84
+ 
+ //--------------------------------------------------------------------
+ // read registers command
+ //--------------------------------------------------------------------
+ #define	sysPktReadRegsCmd				0x05
+ #define	sysPktReadRegsRsp				0x85
+ 
+ 
+ //--------------------------------------------------------------------
+ // write registers command
+ //--------------------------------------------------------------------
+ #define	sysPktWriteRegsCmd			0x06
+ #define	sysPktWriteRegsRsp			0x86
+ 
+ //--------------------------------------------------------------------
+ // continue command
+ //--------------------------------------------------------------------
+ #define	sysPktContinueCmd				0x07
+ // no response
+ 
+ 
+ //--------------------------------------------------------------------
+ // Remote Procedure call
+ //--------------------------------------------------------------------
+ #define	sysPktRPCCmd					0x0A
+ #define	sysPktRPCRsp					0x8A
+ 
+ typedef struct SysPktRPCParamInfo {
+ 	Byte 	byRef;							// true if param is by reference
+ 	Byte	size;								// # of Words of paramData					
+ 	Word	data[1];							// variable length array of paramData
+ 	} SysPktRPCParamType;
+ 	
+ typedef struct SysPktRPCType {
+ 	_sysPktBodyCommon;					// Common Body header
+ 	Word	trapWord;						// which trap to execute
+ 	DWord	resultD0;						// result from D0 placed here
+ 	DWord	resultA0;						// result from A0 placed here
+ 	Word	numParams;						// how many parameters follow
+ 	// Following is a variable length array ofSlkRPCParamInfo's
+ 	SysPktRPCParamType	param[1];
+ 	} SysPktRPCType;
+ 
+ 
+ //--------------------------------------------------------------------
+ // Set/Get breakpoints
+ //--------------------------------------------------------------------
+ #define	sysPktGetBreakpointsCmd		0x0B
+ #define	sysPktGetBreakpointsRsp		0x8B
+ #define	sysPktSetBreakpointsCmd		0x0C
+ #define	sysPktSetBreakpointsRsp		0x8C
+ 
+ 
+ //--------------------------------------------------------------------
+ // Remote UI Support - These packets are used by the screen driver
+ //  and event manager to support remote viewing and control of a Pilot
+ //  over the serial port.
+ //--------------------------------------------------------------------
+ #define	sysPktRemoteUIUpdCmd			0x0C
+ 
+ typedef struct SysPktRemoteUIUpdCmdType {
+ 	_sysPktBodyCommon;								// Common Body header
+ 
+   // These parameters are sent from traget to host after drawing operations
+   	Word	rowBytes;						// rowbytes of update area
+ 	Word	fromY;							// top of update rect
+ 	Word	fromX;							// left of update rect
+ 	Word	toY;								// top of screen rect
+ 	Word	toX;								// left of screen rect
+ 	Word	height;							// bottom of update rect
+ 	Word	width;							// right of update rect
+ 	
+   // The actual pixels of the update area follow
+   	Word	pixels;							// variable length...
+ 	
+ 	} SysPktRemoteUIUpdCmdType;
+ 
+ 
+ #define	sysPktRemoteEvtCmd			0x0D
+ 
+ typedef struct SysPktRemoteEvtCmdType {
+ 	_sysPktBodyCommon;								// Common Body header
+ 
+   // These parameters are sent from host to target to feed pen and keyboard
+   //  events. They do not require a response.
+    Boolean 	penDown;							// true if pen down
+   	SWord		penX;								// X location of pen  
+   	SWord		penY;								// Y location of pen  
+   	
+   	Boolean	keyPress;						// true if key event follows
+   	Word		keyModifiers;					// keyboard modifiers
+   	Word		keyAscii;						// key ascii code
+   	Word		keyCode;							// key virtual code
+   	
+ 	} SysPktRemoteEvtCmdType;
+ 
+ 
+ //--------------------------------------------------------------------
+ // Enable/Disable DbgBreak's command
+ //--------------------------------------------------------------------
+ #define	sysPktDbgBreakToggleCmd			0x0D
+ #define	sysPktDbgBreakToggleRsp			0x8D
+ 
+ 
+ //--------------------------------------------------------------------
+ // Program Flash command - programs one sector of the FLASH ram
+ // If numBytes is 0, this routine returns info on the flash in:
+ //   manuf - manufacturer code
+ //   device - device code
+ //--------------------------------------------------------------------
+ #define	sysPktFlashCmd						0x0E
+ #define	sysPktFlashRsp						0x8E
+ 
+ 
+ //--------------------------------------------------------------------
+ // Get/Set communication parameters
+ //--------------------------------------------------------------------
+ #define	sysPktCommCmd						0x0F
+ #define	sysPktCommRsp						0x8F
+ 
+ typedef struct SysPktCommCmdType {
+ 	_sysPktBodyCommon;								// Common Body header
+ 	Boolean						set;					// true to change parameters
+ 	ULong							baudRate;			// new baud rate
+ 	ULong							flags;				// new flags
+ 	} SysPktCommCmdType;
+ typedef SysPktCommCmdType*	                  SysPktCommCmdPtr;
+ 
+ typedef struct SysPktCommRspType {
+ 	_sysPktBodyCommon;								// Common Body header
+ 	ULong							baudRate;			// current baud rate
+ 	ULong							flags;				// current flags
+ 	} SysPktCommRspType;
+ typedef SysPktCommRspType*	SysPktCommRspPtr;
+ 
+ 
+ //--------------------------------------------------------------------
+ // Get/Set Trap Breaks 
+ //--------------------------------------------------------------------
+ #define	sysPktGetTrapBreaksCmd			0x10
+ #define	sysPktGetTrapBreaksRsp			0x90
+ #define	sysPktSetTrapBreaksCmd			0x11
+ #define	sysPktSetTrapBreaksRsp			0x91
+ 
+ 
+ //--------------------------------------------------------------------
+ // Gremlins Support - These packets are used by the screen driver
+ //  and event manager to support remote viewing and control of a Pilot
+ //  over the serial port.
+ //--------------------------------------------------------------------
+ #define	sysPktGremlinsCmd				0x12
+ 
+ typedef struct SysPktGremlinsCmdType {
+ 	_sysPktBodyCommon;								// Common Body header
+ 
+   // These parameters are sent from target to host to send Gremlins stuff
+   Word	action;
+   Byte	data[32];
+ 	
+ 	} SysPktGremlinsCmdType;
+ 	
+ // Gremlins action codes
+ #define	sysPktGremlinsIdle			1
+ #define	sysPktGremlinsEvent			2
+ 
+ 
+ //--------------------------------------------------------------------
+ // Find data - searches a range of addresses for data
+ //--------------------------------------------------------------------
+ #define	sysPktFindCmd				0x13
+ #define	sysPktFindRsp				(sysPktFindCmd | 0x80)
+ 
+ typedef struct SysPktFindCmdType {
+ 	_sysPktBodyCommon;								// Common Body header
+ 
+ 	DWord	firstAddr;									// first address to search
+ 	DWord	lastAddr;									// last address to begin searching
+ 	Word	numBytes;									// number of data bytes to match
+ 	Boolean	caseInsensitive;						// if true, perform a case-insensitive search
+ 	} SysPktFindCmdType;
+ typedef SysPktFindCmdType*			SysPktFindCmdPtr;
+ 
+ typedef struct SysPktFindRspType {
+ 	_sysPktBodyCommon;								// Common Body header
+ 
+   DWord		addr;										// address where data was found
+   Boolean	found;									// true if data was found
+ 	
+ 	} SysPktFindRspType;
+ typedef SysPktFindRspType*			SysPktFindRspPtr;
+ 
+ 
+ //--------------------------------------------------------------------
+ // message from remote unit
+ //--------------------------------------------------------------------
+ #define	sysPktRemoteMsgCmd				0x7f
+ 
+ 
+ //--------------------------------------------------------------------
+ // sysPktRemoteMsg
+ // Send a text message
+ //--------------------------------------------------------------------
+ typedef struct SysPktRemoteMsgCmdType {
+ 	_sysPktBodyCommon;								// Common Body header
+ 	//Byte		text;									// variable length text goes here
+ 	} SysPktRemoteMsgCmdType;
+ typedef SysPktRemoteMsgCmdType* SysPktRemoteMsgCmdPtr;
+ 
+ 
+ 
+ 
+ 
+ /*******************************************************************
+  * Prototypes
+  *******************************************************************/
+ #ifdef __cplusplus
+ extern "C" {
+ #endif
+ 
+ //================================================================
+ //
+ // Host Only Routines.
+ //
+ //================================================================
+ #if (EMULATION_LEVEL != EMULATION_NONE)
+ 
+ 	
+ 	//-------------------------------------------------------------------
+ 	// RPC
+ 	//------------------------------------------------------------------
+ 	// Init preparate on an RPC packet header and body.
+ 	Err 		SlkRPCInitPacket(SlkPktHeaderType* headerP, UInt dstSocket,
+ 						SysPktRPCType* bodyP, UInt trapWord);
+ 	
+ 	
+ 	// Stuff a parameter into an RPC packet body
+ 	VoidPtr	SlkRPCStuffParam(SysPktRPCType* bodyP, void* dataP,
+ 							Int dataSize, Boolean byRef);
+ 	
+ 	// Send RPC packet and wait for response.
+ 	Err		SlkRPCExecute(SlkPktHeaderPtr headerP, SysPktRPCType* bodyP, 
+ 							Boolean async);
+ 	
+ #endif	// (EMULATION_LEVEL != EMULATION_NONE)
+ 
+ 
+ #ifdef __cplusplus
+ }
+ #endif
+ 	
+ 
+ 
+ 
+ #endif //__SYSTEM_PKT_H__
diff -r -c -x *.orig -x *.rej -x #* -x *~ -N orig/gcc-2.7.2.2/PalmOS/System/SystemPrv.h gcc-2.7.2.2/PalmOS/System/SystemPrv.h
*** orig/gcc-2.7.2.2/PalmOS/System/SystemPrv.h	Thu Jan  1 01:00:00 1970
--- gcc-2.7.2.2/PalmOS/System/SystemPrv.h	Wed Feb 19 16:49:20 1997
***************
*** 0 ****
--- 1,379 ----
+ /*******************************************************************
+  * 							 Pilot Software  
+  *
+  *		 Copyright(c) 1994, Palm Computing Inc., All Rights Reserved
+  *
+  *-------------------------------------------------------------------
+  * FileName:  
+  *		SystemPrv.h
+  *
+  * Description:
+  *		Private Pilot system equates
+  *
+  * History:
+  *		8/9/95	RM	- Created by Ron Marianetti   
+  *
+  *******************************************************************/
+ 
+ #ifdef	NON_PORTABLE
+ 
+ #ifndef __SYSTEMPRV_H__
+ #define __SYSTEMPRV_H__
+ 
+ // Include fixed global type
+ #include <Globals.h>
+ 
+ 
+ /************************************************************
+  * Common Equates between Native and Emulation mode
+  *************************************************************/
+ #define	sysCardSignature				0xFEEDBEEFL			// card signature long word
+ #define  sysStoreSignature				0xFEEDFACEL			// store signature long word
+ 
+ 
+ // This should be set to sizeof(LowMemType) for the final version, but
+ //  until then we'll make it bigger than LowMemType so that we can
+ //  add more globals without having to re-format memory cards.
+ #define	sysLowMemSize					0x1200						// size of Low Memory Area
+ #define	sysInitStack					(sysLowMemSize+0x1000)	// stack ptr during boot
+ 
+ 
+ 
+ // The location of the Card Header (start of ROM) is plugged in at run
+ //  time to the global variable GSysCardHeaderOffset. This MUST be done
+ //  by the startup code. We make this a run-time variable so that the same
+ //  executable ROM image can be run from ROM or RAM.
+ // #define sysCardHeaderOffset		someConstant
+ #define	sysRAMOnlyCardHeaderOffset 0x0000000L			// RAM only card header created here 
+ #define	sysCardHeaderSize				0x0100				// size of card header
+ 
+ 
+ // Offset to ROM storage header from card header
+ #define	sysROMStoreRelOffset			sysCardHeaderSize
+ #define	sysStoreHeaderSize			0x0100				// size of storage header
+ 
+ 
+ // This equate tells us how large of a heap info table to reserve in the
+ //  globals for each card
+ #define	sysMaxHeapsPerCard			128					// max # of heaps per card
+ 
+ 
+ // This equtes tells us the initial size of the Library table as held in
+ //  the Low Memory area
+ #define	sysDefaultLibraries			2						// default size of library table
+ 
+ 
+ // The default port number and baud rate for the serial port
+ #if HW_TARGET == HW_TARGET_TD1
+ #define	sysDefaultSerPort				0						// Use port #0
+ #define	sysDefaultSerBaud				57600					// baud rate 
+ #else
+ #define	sysDefaultSerPort				1						// Use port #1
+ #define	sysDefaultSerBaud				57600					// baud rate 
+ #endif
+ 
+ 
+ 
+ /************************************************************
+  * Structure of the PREF resource in applications. Note, this
+  *  structure must mirror the structure of the PREF resource
+  *	 as defined in the PilotRez include file.
+  *************************************************************/
+ typedef struct SysAppPrefs {
+ 	Word		priority;					// task priority
+ 	DWord		stackSize;					// required stack space
+ 	DWord		minHeapSpace;				// minimum heap space required
+ 	} SysAppPrefsType;
+ typedef SysAppPrefsType* SysAppPrefsPtr;
+ 
+ 
+ 
+ /************************************************************
+  * Structure of Application info for an application. Applications
+  *  do not necessarily have to be on their own thread - there
+  *  can be more than 1 app on the same AMX task. Each application
+  *  has an assocated SysAppInfoType structure which holds the
+  *  application specific information like the database handle of the
+  *  app, the code handle, the stack chunk pointer, the owner ID, etc.
+  *************************************************************/
+ typedef struct SysAppInfoType {
+ 	Int				cmd;							// command code for app
+ 	Ptr				cmdPBP;						// cmd ParamBlock  
+ 	UInt				launchFlags;				// launch flags  
+ 	
+ 	Long				taskID;						// AMX task ID of task that app runs in
+ 	Handle			codeH;						// code handle of the main code segment
+ 	DmOpenRef		dbP;							// Application database access ptr of App
+ 	Ptr				stackP;						// stack chunk for the App
+ 	Ptr				globalsChunkP;				// globals chunk for the App
+ 
+ 	UInt				memOwnerID;					// owner ID for Memory Manager chunks 
+ 	Ptr				dmAccessP;					// pointer to linked list of opened DB's
+ 	SWord				dmLastErr;					// Last error from Data Manager
+ 	Ptr				errExceptionP;				// ErrTry,Catch exception list
+ 	} SysAppInfoType;
+ typedef SysAppInfoType* SysAppInfoPtr;
+ 
+ 
+ /************************************************************
+  * Structure of the user info in the TCB of a task. This structure
+  *	is stored in the xtcbuser fields of the AMX TCB for a task and 
+  * must not exceed 4 DWords in length (the size reserved by AMX for
+  * user info).
+  *************************************************************/
+ typedef struct SysTCBUserInfoType {
+ 	SysAppInfoPtr	tmpAppInfoP;				// used to pass appInfo to nested launches
+ 	SysAppInfoPtr	rootAppInfoP;				// App info for the root application on this task
+ 	DWord				initialA5;					// Inital value for A5 globals ptr
+ 	} SysTCBUserInfoType;
+ typedef SysTCBUserInfoType* SysTCBUserInfoPtr;
+ 
+ 
+ //*****************************************************************
+ // Structure of ParamBlock for the SysKernelInfo call
+ //*****************************************************************
+ 
+ // Selector codes
+ typedef enum	 {
+ 	sysKernelInfoSelCurTaskInfo,
+ 	sysKernelInfoSelTaskInfo,
+ 	sysKernelInfoSelSemaphoreInfo,
+ 	sysKernelInfoSelTimerInfo
+ 	} SysKernelInfoSelector;
+ 
+ typedef struct SysKernelInfoType {
+ 	SysKernelInfoSelector	selector;		// Which info to get
+ 	DWord							id;				// which object to get info on
+ 	
+ 	union {
+ 		struct task {
+ 			DWord		id;							// ID of task
+ 			DWord		nextID;						// ID of next task
+ 			
+ 			DWord		tag;							// task tag
+ 			DWord		status;						// task status
+ 			DWord		timer;						// # ticks left if task's timeout
+ 			DWord		timeSlice;					// task's time slice
+ 			SWord		priority;					// task priority
+ 			Word		attributes;					// task attributes
+ 			SWord		pendingCalls;				// # of pending calls
+ 			DWord		senderTaskID;				// task ID of message sender
+ 			DWord		msgExchangeID;				// task's message exchange ID, if any
+ 			
+ 			DWord		tcbP;							// pointer to TCB
+ 			DWord		stackP;						// stack pointer of task
+ 			DWord		stackStart;					// top of task stack (where it started).
+ 			DWord		stackSize;					// size of stack
+ 			} task;
+ 
+ 		struct semaphore {
+ 			DWord		id;
+ 			DWord		nextID;						// ID of next semaphore
+ 
+ 			DWord		tag;							// semaphore tag
+ 			SWord		initValue;					// semaphore initial value 
+ 														//  >= 0 for counting, -1 for resource
+ 			SWord		curValue;					// semaphore current value
+ 														//  >0 available
+ 														//   0 not available
+ 														//  -n not available, n tasks waiting
+ 			SWord		nestLevel;					// 0 for counting, >= 0 for resource
+ 			DWord		ownerID;						// owner ID
+ 														//   0 for counting or resource free
+ 			} semaphore;
+ 			
+ 		struct timer {
+ 			DWord		id;
+ 			DWord		nextID;						// ID of next timer
+ 			
+ 			DWord		tag;							// timer tag
+ 			DWord		ticksLeft;					// ticks left till timer runs
+ 			DWord		period;						// timer period, if periodic
+ 			DWord		proc;							// timer procedure
+ 			} timer;
+ 		} param;
+ 		
+ 	} SysKernelInfoType;
+ 	
+ 	
+ typedef SysKernelInfoType*	SysKernelInfoPtr;
+ 
+ 
+ 
+ 
+ //-----------------------------------------------------------------
+ // Bits for status field in task info parameter block
+ //------------------------------------------------------------------
+ #define	sysTaskStatusTriggerWait		0x01		// (CJ_MATSWTR) Task idle (waiting for trigger)
+ #define	sysTaskStatusSuspended			0x02		// (CJ_MATSWSUS) Task suspended (waiting for resume)
+ #define	sysTaskStatusWaiting				0x04		// (CJ_MATSWAIT) Task waiting (see other bits)
+ #define	sysTaskStatusHalted				0x80		// (CJ_MATSWHLT) Task halted
+ 
+ // If sysTaskStatusWaiting set, these bits tell why....
+ #define	sysTaskStatusWaitSemaphore		0x00100	// (CJ_MATSWSM) waiting on semaphore
+ #define	sysTaskStatusWaitEvent			0x00200	// (CJ_MATSWEV) waiting on event group
+ #define	sysTaskStatusWaitMailbox		0x00400	// (CJ_MATSWMB) waiting on mailbox
+ #define	sysTaskStatusWaitMsgExchange	0x00800	// (CJ_MATSWMX) waiting on message exchange
+ #define	sysTaskStatusWaitBuffer			0x01000	// (CJ_MATSWBUF) waiting on buffer
+ #define	sysTaskStatusWaitTimer			0x08000	// (CJ_MATSWTM) waiting on timer
+ 
+ #define	sysTaskStatusWaitMailboxAck	0x00010000L	// (CJ_MATSWMBAK) mailbox ack
+ #define	sysTaskStatusWaitMsgXAck		0x00020000L	// (CJ_MATSWMXAK) msg exchange ack
+ #define	sysTaskStatusWaitTaskSig		0x00040000L	// (CJ_MATSWSIG) task signal wait
+ 
+ //-----------------------------------------------------------------
+ // Bits for attributes field in task info parameter block
+ //------------------------------------------------------------------
+ #define	sysTaskAttrNoHalt					0x02		// (CJ_MATAHLT) Task cannot be halted
+ #define	sysTaskAttrMsgStack				0x08		// (CJ_MATAMSG) receives msgs on stack
+ #define	sysTaskAttrMsgByRef				0x10		// (CJ_MATAPBR) messages passed by reference
+ #define	sysTaskAttrMsgOnStack			0x4000	// (CJ_MATAMRDY) message ready on stack
+ #define	sysTaskAttrMsgSenderWaiting	0x8000	// (CJ_MATAMSW) msg sender waiting for ack
+ 
+ 
+ 
+ /************************************************************
+  * This structure defines a section within the RAM storage header
+  *  on Card#0 used to hold non-volatile System information. We store
+  *  System information that can not be conveniently stored or accessed
+  *  from a Database in this area because:
+  *	1.) it can be accessed earlier during the boot-up process and 
+  * 2.) It can be accessed from an interrupt routine.
+  *************************************************************/ 
+ typedef struct SysNVParamsType {
+ 	DWord		rtcHours;									// Real-Time clock hours - add to value
+ 																// in DragonBall RTC register to get
+ 																// actual date & time.
+ 	DWord		rtcHourMinSecCopy;						// Copy of latest value in rtcHourMinSec reg of 
+ 																// DBall. Used as default RTC value on Reset.
+ 	} SysNVParamsType;
+ typedef SysNVParamsType*	SysNVParamsPtr;
+ 
+ 
+ 
+ /************************************************************
+  * Structure of the System Globals. This is where we place
+  *  variable size globals that the System Manager uses. This
+  *  is currently not used but a pointer for it is reserved
+  *  in the low memory globals
+  *************************************************************/
+ /*
+ typedef struct SysGlobalsType {
+ 	} SysGlobalsType;
+ typedef SysGlobalsType* SysGlobalsPtr;
+ */
+ 
+ 
+ 
+ /************************************************************
+  * This structure defines the entire the Low Memory Area
+  *  and includes the low memory header defined in Globals.h,
+  *  followed by some variable size globals that may change 
+  *  from rev to rev of the System Software.
+  *
+  * When emulating under Windows, this structure ends up at some random
+  * place in memory and the global variable GlobalsP points to it.
+  *
+  * When running in the native environment, this structure starts at
+  * address sysGlobalsOffset. 
+  *
+  * In order to simplify the source code, macros are defined for
+  *  accessing commonly used globals in the optimim manner for
+  *  each environment.
+  *************************************************************/ 
+ #include <SerialLinkPrv.h>
+ #include <MemoryPrv.h>
+ #include <SystemPkt.h>
+ #include <DebugPrv.h>
+ #include <Hardware.h>
+ typedef struct LowMemType {
+ 
+ 
+ 	// Fixed size globals, defined in Globals.h
+ 	LowMemHdrType			fixed; 
+ 	
+ 
+ 	//---------------------------------------------------------------------------
+ 	// These structures are always placed at the end of the LowMem area so
+ 	// that other globals don't generally have to move when their sizes change
+ 	//---------------------------------------------------------------------------
+ 	CardInfoType			memCardInfo[hwrNumCardSlots];		// Memory Card Info Array
+ 	
+ 	SlkGlobalsType			slkGlobals;								// Serial Link Mgr globals
+ 	
+ 	DbgGlobalsType			dbgGlobals;								// Debugger globals
+ 	
+ 	SysAppInfoType			sysAppInfo;								// SysAppInfoType for system
+ 	
+ 	Ptr						sysDispatchTable[sysNumTraps];	// trap table
+ 	
+ 	} LowMemType;
+ 	
+ 
+ // Access to variable size globals
+ #define	GMemCardInfo				(((LowMemType*)PilotGlobalsP)->memCardInfo)
+ #define	GSlkGlobals					(((LowMemType*)PilotGlobalsP)->slkGlobals)
+ #define	GDbgGlobals					(((LowMemType*)PilotGlobalsP)->dbgGlobals)
+ #define	GSysAppInfo					(((LowMemType*)PilotGlobalsP)->sysAppInfo)
+ #define	GSysLibTable			  	(((LowMemType*)PilotGlobalsP)->sysLibTable)
+ #define	GSysDispatchTable		  	(((LowMemType*)PilotGlobalsP)->sysDispatchTable)
+ 
+ 
+ // Flags for the GSysResetFlags global
+ #define	sysResetFlagHardReset			0x01					// HardReset
+ #define	sysResetFlagCreateDefaultDBs	0x02					// create default databases
+ #define	sysResetFlagNoExtensions		0x04					// don't execute extensions
+ 
+ 
+ // Flags for the GSysPrefFlags global
+ #define	sysPrefFlagTaxiDisable			0x0001				// Disable Taxi car - insurance policy
+ 																			//  (saved in preferences).
+ #define	sysPrefFlagTaxiDisIdle			0x8000				// Disable Idle Taxi temporarily, 
+ 																			//  (not saved in preferences)
+ #define	sysPrefFlagTaxiDisIdleTime		0x4000				// Copy of the 16th bit of the system
+ 																			//  time when sysPrefFlagTaxiDisIdle bit
+ 																			//	 was set (not saved in preferences).
+ // Flags for the GSysMiscFlags global
+ #define	sysMiscFlagInFatalAlert			0x0001				// Currently displaying fatal alert
+ 
+ /************************************************************
+  * Function Prototypes
+  *************************************************************/
+ #ifdef __cplusplus
+ extern "C" {
+ #endif
+ 
+ 							
+ SysTCBUserInfoPtr	SysTaskUserInfoPtr(ULong taskID)
+ 							SYS_TRAP(sysTrapSysTaskUserInfoPtr);
+ 							
+ Err		SysAppStartup(SysAppInfoPtr* appInfoPP, Ptr* prevGlobalsP, 
+ 							Ptr* globalsPtrP)
+ 							SYS_TRAP(sysTrapSysAppStartup);
+ 							
+ Err		SysAppExit(SysAppInfoPtr appInfoP, Ptr prevGlobalsP, Ptr globalsP)
+ 							SYS_TRAP(sysTrapSysAppExit);
+ 							
+ SysAppInfoPtr 	SysCurAppInfoP(void)
+ 							SYS_TRAP(sysTrapSysCurAppInfoP);
+ 							
+ 
+ #ifdef __cplusplus 
+ }
+ #endif
+ 
+ /************************************************************
+  * Assembly Function Prototypes
+  *************************************************************/
+ #define	_SysFatalAlert		\
+ 				ASM_SYS_TRAP(sysTrapSysFatalAlert)
+ 
+ #define	_SysReset		\
+ 				ASM_SYS_TRAP(sysTrapSysReset)
+ 
+ 
+ 
+ #endif  //__SYSTEMPRV_H__
+ 
+ #endif // NON_PORTABLE
+ 
diff -r -c -x *.orig -x *.rej -x #* -x *~ -N orig/gcc-2.7.2.2/PalmOS/System/TimeMgr.h gcc-2.7.2.2/PalmOS/System/TimeMgr.h
*** orig/gcc-2.7.2.2/PalmOS/System/TimeMgr.h	Thu Jan  1 01:00:00 1970
--- gcc-2.7.2.2/PalmOS/System/TimeMgr.h	Wed Feb 19 16:49:20 1997
***************
*** 0 ****
--- 1,77 ----
+ /*******************************************************************
+  * 							 Pilot Software
+  *
+  *		 Copyright(c) 1995, Palm Computing Inc., All Rights Reserved
+  *
+  *-------------------------------------------------------------------
+  * FileName:
+  *		TimeMgr.h
+  *
+  * Description:
+  *		Time manager functions
+  *
+  * History:
+  *   	1/19/95  roger - Created by Roger Flores
+  *
+  *
+  *******************************************************************/
+ 
+ 
+ #ifndef __TIMEMGR_H__
+ #define __TIMEMGR_H__
+ 
+ 
+ // Include elementary types
+ #include <Common.h>
+ #include <SysTraps.h>				// Trap Numbers.
+ 
+ 
+ 
+ /************************************************************
+  * Time Manager result codes
+  * (timErrorClass is defined in SystemMgr.h)
+  *************************************************************/
+ #define timErrMemory			(timErrorClass | 1)
+ 
+ 
+ 
+ /************************************************************
+  * Function Prototypes
+  *************************************************************/
+ #ifdef __cplusplus
+ extern "C" {
+ #endif
+ 
+ 
+ //-------------------------------------------------------------------
+ // Initialization
+ //-------------------------------------------------------------------
+ Err			TimInit(void)	SYS_TRAP(sysTrapTimInit);
+ 
+ 
+ //-------------------------------------------------------------------
+ // API
+ //-------------------------------------------------------------------
+ 
+ // seconds since 1/1/1904
+ ULong			TimGetSeconds(void)		
+ 						SYS_TRAP(sysTrapTimGetSeconds);
+ 					
+ // seconds since 1/1/1904
+ void  		TimSetSeconds(ULong seconds) 	
+ 						SYS_TRAP(sysTrapTimSetSeconds);
+ 					
+ // ticks since power on
+ ULong 		TimGetTicks(void)					
+ 						SYS_TRAP(sysTrapTimGetTicks);
+ 
+ 
+ #ifdef __cplusplus 
+ }
+ #endif
+ 
+ 
+ 
+ #endif // __TIMEMGR_H__
+ 
+ 
diff -r -c -x *.orig -x *.rej -x #* -x *~ -N orig/gcc-2.7.2.2/PalmOS/System/TimePrv.h gcc-2.7.2.2/PalmOS/System/TimePrv.h
*** orig/gcc-2.7.2.2/PalmOS/System/TimePrv.h	Thu Jan  1 01:00:00 1970
--- gcc-2.7.2.2/PalmOS/System/TimePrv.h	Wed Feb 19 16:49:20 1997
***************
*** 0 ****
--- 1,127 ----
+ /*******************************************************************
+  * 							 Pilot Software
+  *
+  *		 Copyright(c) 1995, Palm Computing Inc., All Rights Reserved
+  *
+  *-------------------------------------------------------------------
+  * FileName:
+  *		TimePrv.h
+  *
+  * Description:
+  *		Private Time manager functions
+  *
+  * History:
+  *   	1/19/95  roger - Created by Roger Flores
+  *
+  *
+  *******************************************************************/
+ 
+ #ifdef	NON_PORTABLE
+ 
+ #ifndef __TIMEPRV_H__
+ #define __TIMEPRV_H__
+ 
+ 
+ /*******************************************************************
+  * Private Time Manager Constants
+  *
+  *******************************************************************/
+ 
+ // Alarm repeat interval -- once an alarm is triggered, it will
+ // repeat every timAlarmRepeatSeconds until it is canceled or
+ // replaced with a new alarm by the Alarm Manager.  This ensures
+ // that an alarm will not be missed by the Alarm Manager code which
+ // is executed on some app's UI thread.
+ #define timAlarmRepeatSeconds		10
+ 
+ // Alarm delta interval -- if the difference between the alarm time and the current time
+ // is less than this interval, the alarm will be triggered immediately.  This eliminates
+ // a race condition which occurs when the alarm time is TOO close to the current time.
+ #define timAlarmMinDeltaSeconds	2
+ 
+ 
+ 
+ /*******************************************************************
+  * Time Manager Globals
+  *
+  *******************************************************************/
+ typedef struct TimGlobalsType {
+ 
+ 	ULong				rtcHours;				// Added to DragonBall hours to get actual time
+ 	ULong				alarmSeconds;			// alarm time in seconds since 1/1/1904;
+ 													// 0 = none
+ 													
+ 	//-------------------------------------------------------------------------------
+ 	// The following fields are used exclusively to work around a bug in the 0G58E version
+ 	//  of the DragonBall. This bug causes the rtcHourMinSec register in the DragonBall to
+ 	//  occasionally be "out of date" when read and also prevents alarms from going off
+ 	//  if we're in sleep mode. To get around this bug, we use the 1 minute interrupt while
+ 	//  we're in sleep mode to wake up periodically and see if any alarms need to go off and
+ 	//  we use the 1 second interrupt when we're awake to update our own copy of the hours,
+ 	//  minutes and seconds.
+ 	//-------------------------------------------------------------------------------
+ 	Boolean			rtcBugWorkaround;		// true to work around bug in 0G58E version
+ 													//  of dragonball.
+ 	Boolean			rtcBugAsleep;			// true if we're in sleep mode
+ 													
+ 	// Our copy of the time that we maintain through the 1 second and minute interrupts
+ 	ULong				rtcBugAlarm;				// when alarm should be triggerred.
+ 	ULong				rtcBugSeconds;				// seconds since 1/1/1904
+ 														// IMPORTANT: The boolean rtcBugFastMinuteCalc MUST
+ 														//  be cleared whenever rtcBugSeconds is changed!!!!!!!
+ 	ULong				rtcBugLastSeconds;		// seconds after last 1 sec. or min. interrupt.
+ 	Boolean			rtcBugFastMinuteCalc;	// true when current time is on a minute
+ 														//  boundary. Used by TimHandleInterrupt speed up
+ 														//  the next minute calculation.
+ 	} TimGlobalsType;
+ 
+ typedef TimGlobalsType*		TimGlobalsPtr;
+ 
+ 
+ /************************************************************
+  * Function Prototypes
+  *************************************************************/
+ #ifdef __cplusplus
+ extern "C" {
+ #endif
+ 
+ //
+ // IMPORTANT: TimSetAlarm() and TimGetAlarm() are reserved for use by the
+ // Alarm Manager!
+ //
+ 
+ // set an alarm in seconds since 1/1/1904
+ // (reserved for Alarm Manager use only)
+ ULong			TimSetAlarm(ULong seconds)
+ 						SYS_TRAP(sysTrapTimSetAlarm);
+ 
+ // get the current alarm setting in seconds since 1/1/1904
+ // (reserved for Alarm Manager use only)
+ ULong			TimGetAlarm(void)
+ 						SYS_TRAP(sysTrapTimGetAlarm);
+ 						
+ Err			TimSleep(Boolean untilReset, Boolean emergency)
+ 						SYS_TRAP(sysTrapTimSleep);
+ 
+ Err			TimWake(void)
+ 						SYS_TRAP(sysTrapTimWake);
+ 
+ 
+ //-------------------------------------------------------------------
+ // Interrupt Service routine
+ //-------------------------------------------------------------------
+ void 			TimHandleInterrupt(Boolean periodicUpdate)
+ 						SYS_TRAP(sysTrapTimHandleInterrupt);
+ 
+ 
+ #ifdef __cplusplus 
+ }
+ #endif
+ 
+ 
+ 
+ 
+ #endif // __TIMEMGR_H__
+ 
+ 
+ #endif // NON_PORTABLE
\ No newline at end of file
diff -r -c -x *.orig -x *.rej -x #* -x *~ -N orig/gcc-2.7.2.2/PalmOS/UI/AboutBox.h gcc-2.7.2.2/PalmOS/UI/AboutBox.h
*** orig/gcc-2.7.2.2/PalmOS/UI/AboutBox.h	Thu Jan  1 01:00:00 1970
--- gcc-2.7.2.2/PalmOS/UI/AboutBox.h	Wed Feb 19 16:49:57 1997
***************
*** 0 ****
--- 1,23 ----
+ /***********************************************************************
+  *
+  *	Copyright (c) Palm Computing 1995 -- All Rights Reserved
+  *
+  * PROJECT:  Pilot
+  * FILE:     AboutBox.h
+  * AUTHOR:	 Christopher Raff: October 25th, 1995
+  *
+  * DECLARER: UI
+  *
+  * DESCRIPTION:
+  *	  This file defines About Box routines
+  *
+  ***********************************************************************/
+ #ifndef __ABOUTBOX_H__
+ #define __ABOUTBOX_H__
+ 
+ 
+ extern void AbtShowAbout (DWord creator)
+ 		SYS_TRAP(sysTrapAbtShowAbout);
+ 
+ 
+ #endif // __ABOUTBOX_H__
diff -r -c -x *.orig -x *.rej -x #* -x *~ -N orig/gcc-2.7.2.2/PalmOS/UI/Category.h gcc-2.7.2.2/PalmOS/UI/Category.h
*** orig/gcc-2.7.2.2/PalmOS/UI/Category.h	Thu Jan  1 01:00:00 1970
--- gcc-2.7.2.2/PalmOS/UI/Category.h	Wed Feb 19 16:49:57 1997
***************
*** 0 ****
--- 1,59 ----
+ /***********************************************************************
+  *
+  *	Copyright (c) Palm Computing 1995 -- All Rights Reserved
+  *
+  * PROJECT:  Pilot
+  * FILE:     Category.h
+  * AUTHOR:	 Art Lamb: March 7, 1995
+  *
+  * DECLARER: UI
+  *
+  * DESCRIPTION:
+  *	  This file defines category structures and routines.
+  *
+  ***********************************************************************/
+ #ifndef __CATEGORY_H__
+ #define __CATEGORY_H__
+ 
+ 
+ typedef struct {
+    Word	renamedCategories;
+ 	Char	categoryLabels [dmRecNumCategories] [dmCategoryLength];
+ 	Byte	categoryUniqIDs[dmRecNumCategories];
+ 	Byte	lastUniqID;	// Uniq IDs generated by the device are between
+ 							// 0 - 127.  Those from the PC are 128 - 255.
+ } AppInfoType;
+ 
+ 
+ 
+ extern void CategoryCreateList (DmOpenRef db, ListPtr lst, 
+ 	Word currentCategory, Boolean showAllCategoryCreateList)
+ 							SYS_TRAP(sysTrapCategoryCreateList);
+ 
+ extern void CategoryFreeList (DmOpenRef db, ListPtr lst)
+ 							SYS_TRAP(sysTrapCategoryFreeList);
+ 
+ extern Word CategoryFind (DmOpenRef db, CharPtr name)
+ 							SYS_TRAP(sysTrapCategoryFind);
+ 
+ extern void CategoryGetName (DmOpenRef db, Word index, CharPtr name)
+ 							SYS_TRAP(sysTrapCategoryGetName);
+ 
+ extern Boolean CategoryEdit (DmOpenRef db, WordPtr category)
+ 							SYS_TRAP(sysTrapCategoryEdit);
+ 
+ extern Boolean CategorySelect (DmOpenRef db, FormPtr frm, Word ctlID, 
+ 	Word lstID,	Boolean title, WordPtr categoryP, CharPtr categoryName)
+ 							SYS_TRAP(sysTrapCategorySelect);
+ 
+ extern Word CategoryGetNext (DmOpenRef db, Word index)
+ 							SYS_TRAP(sysTrapCategoryGetNext);
+ 
+ extern void CategorySetTriggerLabel (ControlPtr ctl, CharPtr name)
+ 							SYS_TRAP(sysTrapCategorySetTriggerLabel);
+ 
+ extern void CategoryTruncateName (CharPtr name, Word maxWidth)
+ 							SYS_TRAP(sysTrapCategoryTruncateName);
+ 
+ 
+ #endif // __CATEGORY_H__
\ No newline at end of file
diff -r -c -x *.orig -x *.rej -x #* -x *~ -N orig/gcc-2.7.2.2/PalmOS/UI/CharAttr.h gcc-2.7.2.2/PalmOS/UI/CharAttr.h
*** orig/gcc-2.7.2.2/PalmOS/UI/CharAttr.h	Thu Jan  1 01:00:00 1970
--- gcc-2.7.2.2/PalmOS/UI/CharAttr.h	Wed Feb 19 16:49:57 1997
***************
*** 0 ****
--- 1,60 ----
+ /***********************************************************************
+  *
+  * Copyright (c) Palm Computing 1994 -- All Rights Reserved
+  *
+  * PROJECT:  Pilot
+  * FILE:     CharAttr.h
+  * AUTHOR:   Art Lamb: April 21, 1995
+  *
+  * DECLARER: Toolbox
+  *
+  * DESCRIPTION:
+  *        This file defines character classification and character
+  *        conversion macros
+  *
+  **********************************************************************/
+ 
+ #ifndef _CHAR_ATTR_H
+ #define _CHAR_ATTR_H
+ 
+ // Character attribute code bits
+ #define _XA		0x200 	// extra alphabetic
+ #define _XS		0x100 	// extra space
+ #define _BB		0x80 		// BEL, BS, etc.
+ #define _CN		0x40 		// CR, FF, HT, NL, VT
+ #define _DI		0x20 		// '0'-'9'
+ #define _LO		0x10 		// 'a'-'z' and lowercase extended chars.
+ #define _PU		0x08 		// punctuation
+ #define _SP		0x04 		// space
+ #define _UP		0x02 		// 'A'-'Z' and uppercase extended chars.
+ #define _XD		0x01 		// '0'-'9', 'A'-'F', 'a'-'f'
+ 
+ 
+ // Character classification macros.
+ // If these are used to test characters from events (keyDownEvent)
+ // IsAscii should be used first.
+ #define IsAscii(c)			(c <= 255)
+ #define IsAlNum(attr,c)		(attr[(Byte)(c)] & (_DI|_LO|_UP|_XA))
+ #define IsAlpha(attr,c)		(attr[(Byte)(c)] & (_LO|_UP|_XA))
+ #define IsCntrl(attr,c)		(attr[(Byte)(c)] & (_BB|_CN))
+ #define IsDigit(attr,c)		(attr[(Byte)(c)] & _DI)
+ #define IsGraph(attr,c)		(attr[(Byte)(c)] & (_DI|_LO|_PU|_UP|_XA))
+ #define IsLower(attr,c)		(attr[(Byte)(c)] & _LO)
+ #define IsPrint(attr,c)		(attr[(Byte)(c)] & (_DI|_LO|_PU|_SP|_UP|_XA))
+ #define IsPunct(attr,c)		(attr[(Byte)(c)] & _PU)
+ #define IsSpace(attr,c)		(attr[(Byte)(c)] & (_CN|_SP|_XS))
+ #define IsUpper(attr,c)		(attr[(Byte)(c)] & _UP)
+ #define IsHex(attr,c)		(attr[(Byte)(c)] & _XD)
+ #define IsDelim(attr,c)		(attr[(Byte)(c)] & _SP|_PU)
+ 
+ 
+ WordPtr GetCharAttr (void)
+ 			SYS_TRAP(sysTrapGetCharAttr);
+ 
+ BytePtr GetCharSortValue (void)
+ 			SYS_TRAP(sysTrapGetCharSortValue);
+ 
+ BytePtr GetCharCaselessValue (void)
+ 			SYS_TRAP(sysTrapGetCharCaselessValue);
+ 
+ #endif /* _CHAR_ATTR_H */
diff -r -c -x *.orig -x *.rej -x #* -x *~ -N orig/gcc-2.7.2.2/PalmOS/UI/Chars.h gcc-2.7.2.2/PalmOS/UI/Chars.h
*** orig/gcc-2.7.2.2/PalmOS/UI/Chars.h	Thu Jan  1 01:00:00 1970
--- gcc-2.7.2.2/PalmOS/UI/Chars.h	Wed Feb 19 16:49:58 1997
***************
*** 0 ****
--- 1,255 ----
+ /***********************************************************************
+  *
+  *      Copyright (c) Palm Computing 1994 -- All Rights Reserved
+  *
+  * PROJECT:  Pilot
+  * FILE:     Chars.h
+  * AUTHOR:   Roger Flores: November 3, 1994
+  *
+  * DECLARER: UI
+  *
+  * DESCRIPTION:
+  *        This file defines the characters in fonts.
+  *
+  **********************************************************************/
+ #ifndef __CHARS_H__
+ #define __CHARS_H__
+ 
+ 
+ // Special characters
+ #define downArrowChr			0x1F
+ #define upArrowChr			0x1E
+ #define leftArrowChr			0x1C
+ #define rightArrowChr		0x1D
+ 
+ 
+ // The hardware arrow buttons generate the following Chr codes.
+ #define 	pageUpChr			0x0B
+ #define 	pageDownChr			0x0C
+ 
+ 
+ //  The following are key codes used for virtual events, like
+ //   low battery warnings, etc. These keyboard events MUST
+ //   have the commandKeyMask bit set in the modifiers in order
+ //   to be recognized.
+ #define	lowBatteryChr		0x0101			// Display low battery dialog
+ #define	enterDebuggerChr	0x0102			// Enter Debugger
+ #define 	nextFieldChr		0x0103			// Go to next field in form
+ #define	startConsoleChr	0x0104			// Startup console task
+ #define  menuChr				0x0105			// Ctl-A
+ #define  commandChr			0x0106			// Ctl-C
+ #define  confirmChr			0x0107			// Ctl-D
+ #define  launchChr			0x0108			// Ctl-E
+ #define  keyboardChr			0x0109			// Ctl-F
+ #define  findChr				0x010A
+ #define  calcChr				0x010B
+ #define	prevFieldChr		0x010C
+ #define	alarmChr				0x010D			// sent before displaying an alarm
+ 
+ 
+ 
+ //  The Application launching buttons generate the following
+ // key codes and will also set the commandKeyMask bit in the 
+ // modifiers field
+ #define  hardKeyMin			0x0200
+ #define  hardKeyMax			0x02FF
+ #define	hard1Chr				0x0204
+ #define	hard2Chr				0x0205
+ #define	hard3Chr				0x0206
+ #define	hard4Chr				0x0207
+ #define	hardPowerChr		0x0208
+ #define	hardCradleChr		0x0209			// Button on cradle pressed
+ 
+ #define ChrIsHardKey(c)		((c >= hardKeyMin) && (c <= hardKeyMax))
+ 
+ // Characters from all text fonts.  Resource ID's 9000, 9001, 9002
+ #define nullChr				0x00
+ #define backspaceChr			0x08
+ #define tabChr					0x09
+ #define linefeedChr			0x0A
+ #define crChr					0x0D
+ #define colonChr				':'
+ #define periodChr				'.'
+ #define commaChr				','
+ #define quoteChr				'"'
+ 
+ #define returnChr				0x0D
+ #define escapeChr				0x1B
+ #define spaceChr				0x20
+ #define lastAsciiChr			0xFF
+ 
+ #define numericSpaceChr		0x80
+ 
+ #define cutChr					0x12D     // Ctl-X
+ #define copyChr				0x12E     // Ctl-C
+ #define pasteChr				0x12F     // Ctl-V
+ 
+ 
+ // Extended characters for Windows Code Page 1252
+ #define lowSingleCommaQuoteChr				0x82
+ #define scriptFChr								0x83
+ #define lowDblCommaQuoteChr					0x84
+ #define horizEllipsisChr						0x85
+ #define daggerChr									0x86
+ #define dblDaggerChr								0x87
+ #define circumflexChr							0x88
+ #define perMilleChr								0x89
+ #define upSHacekChr								0x8A
+ #define leftSingleGuillemetChr				0x8B
+ #define upOEChr									0x8C
+ #define diamondChr								0x8D		//	These 4 are not actually in the
+ 																	//	windows code page, but we like 'em
+ 																	//	anyway.
+ #define clubChr									0x8E
+ #define heartChr									0x8F
+ #define spadeChr									0x90
+ #define singleOpenCommaQuoteChr				0x91
+ #define singleCloseCommaQuoteChr				0x92
+ #define dblOpenCommaQuoteChr					0x93
+ #define dblCloseCommaQuoteChr					0x94
+ #define bulletChr									0x95
+ #define enDashChr									0x96
+ #define emDashChr									0x97
+ #define spacingTildeChr							0x98
+ #define trademarkChr								0x99
+ #define lowSHacekChr								0x9A
+ #define rightSingleGuillemetChr				0x9B
+ #define lowOEChr									0x9C
+ #define upYDiaeresisChr							0x9F
+ #define nonBreakSpaceChr						0xA0
+ #define invertedExclamationChr				0xA1
+ #define centChr									0xA2
+ #define poundChr									0xA3
+ #define currencyChr								0xA4
+ #define yenChr										0xA5
+ #define brokenVertBarChr						0xA6
+ #define sectionChr								0xA7
+ #define spacingDiaeresisChr					0xA8
+ #define copyrightChr								0xA9
+ #define feminineOrdinalChr						0xAA
+ #define leftGuillemetChr						0xAB
+ #define notChr										0xAC
+ #define softHyphenChr							0xAD
+ #define registeredChr							0xAE
+ #define spacingMacronChr						0xAF
+ #define degreeChr									0xB0
+ #define plusMinusChr								0xB1
+ #define superscript2Chr							0xB2
+ #define superscript3Chr							0xB3
+ #define spacingAcuteChr							0xB4
+ #define microChr									0xB5
+ #define paragraphChr								0xB6
+ #define middleDotChr								0xB7
+ #define spacingCedillaChr						0xB8
+ #define superscript1Chr							0xB9
+ #define masculineOrdinalChr					0xBA
+ #define rightGuillemetChr						0xBB
+ #define fractOneQuarterChr						0xBC
+ #define fractOneHalfChr							0xBD
+ #define fractThreeQuartersChr					0xBE
+ #define invertedQuestionChr					0xBF
+ #define upAGraveChr								0xC0
+ #define upAAcuteChr								0xC1
+ #define upACircumflexChr						0xC2
+ #define upATildeChr								0xC3
+ #define upADiaeresisChr							0xC4
+ #define upARingChr								0xC5
+ #define upAEChr									0xC6
+ #define upCCedillaChr							0xC7
+ #define upEGraveChr								0xC8
+ #define upEAcuteChr								0xC9
+ #define upECircumflexChr						0xCA
+ #define upEDiaeresisChr							0xCB
+ #define upIGraveChr								0xCC
+ #define upIAcuteChr								0xCD
+ #define upICircumflexChr						0xCE
+ #define upIDiaeresisChr							0xCF
+ #define upEthChr									0xD0
+ #define upNTildeChr								0xD1
+ #define upOGraveChr								0xD2
+ #define upOAcuteChr								0xD3
+ #define upOCircumflexChr						0xD4
+ #define upOTildeChr								0xD5
+ #define upODiaeresisChr							0xD6
+ #define multiplyChr								0xD7
+ #define upOSlashChr								0xD8
+ #define upUGraveChr								0xD9
+ #define upUAcuteChr								0xDA
+ #define upUCircumflexChr						0xDB
+ #define upUDiaeresisChr							0xDC
+ #define upYAcuteChr								0xDD
+ #define upThorn									0xDE
+ #define lowSharpSChr								0xDF							
+ #define lowAGraveChr								0xE0
+ #define lowAAcuteChr								0xE1
+ #define lowACircumflexChr						0xE2
+ #define lowATildeChr								0xE3
+ #define lowADiaeresisChr						0xE4
+ #define lowARingChr								0xE5
+ #define lowAEChr									0xE6
+ #define lowCCedillaChr							0xE7
+ #define lowEGraveChr								0xE8
+ #define lowEAcuteChr								0xE9
+ #define lowECircumflexChr						0xEA
+ #define lowEDiaeresisChr						0xEB
+ #define lowIGraveChr								0xEC
+ #define lowIAcuteChr								0xED
+ #define lowICircumflexChr						0xEE
+ #define lowIDiaeresisChr						0xEF
+ #define lowEthChr									0xF0
+ #define lowNTildeChr								0xF1
+ #define lowOGraveChr								0xF2
+ #define lowOAcuteChr								0xF3
+ #define lowOCircumflexChr						0xF4
+ #define lowOTildeChr								0xF5
+ #define lowODiaeresisChr						0xF6
+ #define divideChr									0xF7
+ #define lowOSlashChr								0xF8
+ #define lowUGraveChr								0xF9
+ #define lowUAcuteChr								0xFA
+ #define lowUCircumflexChr						0xFB
+ #define lowUDiaeresisChr						0xFC
+ #define lowYAcuteChr								0xFD
+ #define lowThorn									0xFE
+ #define lowYDiaeresisChr						0xFF
+ 
+ 
+ // Characters in the 9 point symbol font.  Resource ID 9003
+ enum symbolChars {
+ 	symbolLeftArrow = 3,
+ 	symbolRightArrow,
+ 	symbolUpArrow,
+ 	symbolDownArrow,
+ 	symbolSmallDownArrow,
+ 	symbolSmallUpArrow,
+ 	symbolMemo = 9,
+ 	symbolHelp,
+ 	symbolNote,
+ 	symbolNoteSelected,
+ 	symbolCapsLock,
+ 	symbolNumLock,
+ 	symbolShiftUpper,
+ 	symbolShiftPunc,
+ 	symbolShiftExt,
+ 	symbolShiftNone,
+ 	symbolNoTime
+ 	};
+ 
+ // Character in the 7 point symbol font.  Resource ID 9005
+ enum symbol7Chars {
+ 	symbol7ScrollUp = 1,
+ 	symbol7ScrollDown,
+ 	symbol7ScrollUpDisabled,
+ 	symbol7ScrollDownDisabled
+ 	};
+ 
+ //	Characters in the 11 point symbol font.  Resource ID 9004
+ enum symbol11Chars {
+ 	symbolCheckboxOff = 0,
+ 	symbolCheckboxOn,
+ 	symbol11LeftArrow,
+ 	symbol11RightArrow
+ 	};
+ 
+ 
+ #endif // __CHARS_H__
diff -r -c -x *.orig -x *.rej -x #* -x *~ -N orig/gcc-2.7.2.2/PalmOS/UI/ClipBoard.h gcc-2.7.2.2/PalmOS/UI/ClipBoard.h
*** orig/gcc-2.7.2.2/PalmOS/UI/ClipBoard.h	Thu Jan  1 01:00:00 1970
--- gcc-2.7.2.2/PalmOS/UI/ClipBoard.h	Wed Feb 19 16:49:58 1997
***************
*** 0 ****
--- 1,45 ----
+ /***********************************************************************
+  *
+  *	Copyright (c) Palm Computing 1994 -- All Rights Reserved
+  *
+  * PROJECT:  Pilot
+  * FILE:     clipBoard.h
+  * AUTHOR:	 Art Lamb: September 1, 1994
+  *
+  * DECLARER: UI
+  *
+  * DESCRIPTION:
+  *	  This file defines clipboard structures and routines.
+  *
+  ***********************************************************************/
+ 
+ #ifndef __CLIPBOARD_H__
+ #define __CLIPBOARD_H__
+ 
+ 
+ #define numClipboardForamts 	3
+ #define cbdMaxTextLength		1000
+ 
+ 
+ // Clipboard standard formats
+ enum clipboardFormats { clipboardText, clipboardInk, clipboardBitmap };
+ 
+ typedef enum clipboardFormats ClipboardFormatType;
+ 
+ typedef struct {
+ 	VoidHand		item;
+ 	Word			length;
+ } ClipboardItem;
+ 
+ //----------------------------------------------------------
+ //	Clipboard Functions
+ //----------------------------------------------------------
+ 
+ extern void ClipboardAddItem 
+ 	(ClipboardFormatType format, VoidPtr ptr, Word length)
+ 							SYS_TRAP(sysTrapClipboardAddItem);
+ 
+ extern VoidHand ClipboardGetItem (ClipboardFormatType format, WordPtr length)
+ 							SYS_TRAP(sysTrapClipboardGetItem);
+ 
+ #endif // __CLIPBOARD_H__
\ No newline at end of file
diff -r -c -x *.orig -x *.rej -x #* -x *~ -N orig/gcc-2.7.2.2/PalmOS/UI/Control.h gcc-2.7.2.2/PalmOS/UI/Control.h
*** orig/gcc-2.7.2.2/PalmOS/UI/Control.h	Thu Jan  1 01:00:00 1970
--- gcc-2.7.2.2/PalmOS/UI/Control.h	Wed Feb 19 16:49:58 1997
***************
*** 0 ****
--- 1,110 ----
+ /***********************************************************************
+  *
+  *	Copyright (c) Palm Computing 1994 -- All Rights Reserved
+  *
+  * PROJECT:  Pilot
+  * FILE:     Control.h
+  * AUTHOR:	 Art Lamb: August 29, 1994
+  *
+  * DECLARER: UI
+  *
+  * DESCRIPTION:
+  *	  This file defines check box structures and routines.
+  *
+  ***********************************************************************/
+ #ifndef __CONTROL_H__
+ #define __CONTROL_H__
+ 
+ 
+ 
+ typedef struct {
+ 	Byte usable         :1;		// set if part of ui 
+ 	Byte enabled        :1;		// set if interactable (not grayed out)
+ 	Byte visible        :1;		// set if drawn (set internally)
+ 	Byte on             :1;		// set if on (checked)
+ 	Byte leftAnchor     :1;		// set if bounds expand to the right
+ 	                           // clear if bounds expand to the left
+    Byte frame          :3;
+ } ControlAttrType;
+ 
+ 
+ enum controlStyles {buttonCtl, pushButtonCtl, checkboxCtl, popupTriggerCtl,
+ 							 selectorTriggerCtl, repeatingButtonCtl};
+ typedef enum controlStyles ControlStyleType;
+ 
+ enum buttonFrames {noButtonFrame, standardButtonFrame, boldButtonFrame,
+ 						 rectangleButtonFrame};
+ typedef enum buttonFrames ButtonFrameType;
+ 
+ 
+ typedef struct {
+ 	Word						id;
+ 	RectangleType			bounds;
+ 	CharPtr				   text;	
+ 	ControlAttrType		attr;
+ 	ControlStyleType		style;
+ 	FontID					font;
+ 	Byte						group;
+ } ControlType;
+ 
+ 
+ typedef ControlType * ControlPtr;
+ 
+ 
+ 
+ //----------------------------------------------------------
+ //	Control Functions
+ //----------------------------------------------------------
+ 
+ #ifdef __cplusplus
+ extern "C" {
+ #endif
+ 
+ extern void CtlDrawControl (ControlPtr pControl)
+ 							SYS_TRAP(sysTrapCtlDrawControl);
+ 
+ extern void CtlEraseControl (ControlPtr pControl)
+ 							SYS_TRAP(sysTrapCtlEraseControl);
+ 
+ extern void CtlHideControl (ControlPtr pControl)
+ 							SYS_TRAP(sysTrapCtlHideControl);
+ 
+ extern void CtlShowControl (ControlPtr pControl)
+ 							SYS_TRAP(sysTrapCtlShowControl);
+ 
+ extern Boolean CtlEnabled (ControlPtr pControl)
+ 							SYS_TRAP(sysTrapCtlEnabled);
+ 
+ extern void CtlSetEnabled (ControlPtr pControl, Boolean usable)
+ 							SYS_TRAP(sysTrapCtlSetEnabled);
+ 
+ extern void CtlSetUsable (ControlPtr pControl, Boolean usable)
+ 							SYS_TRAP(sysTrapCtlSetUsable);
+ 
+ extern SWord CtlGetValue (ControlPtr pControl)
+ 							SYS_TRAP(sysTrapCtlGetValue);
+ 
+ extern void CtlSetValue (ControlPtr pControl, SWord newValue)
+ 							SYS_TRAP(sysTrapCtlSetValue);
+ 
+ extern CharPtr CtlGetLabel (ControlPtr pControl)
+ 							SYS_TRAP(sysTrapCtlGetLabel);
+ 
+ extern void CtlSetLabel (ControlPtr pControl, CharPtr newLabel)
+ 							SYS_TRAP(sysTrapCtlSetLabel);
+ 
+ extern void CtlHitControl (ControlPtr pControl)
+ 							SYS_TRAP(sysTrapCtlHitControl);
+ 
+ extern Boolean CtlHandleEvent (ControlPtr pControl, EventPtr pEvent)
+ 							SYS_TRAP(sysTrapCtlHandleEvent);
+ 
+ #ifdef __cplusplus 
+ }
+ #endif
+ 
+ 
+ #endif //__CONTROL_H__
+ 
+ 
+ 
diff -r -c -x *.orig -x *.rej -x #* -x *~ -N orig/gcc-2.7.2.2/PalmOS/UI/Day.h gcc-2.7.2.2/PalmOS/UI/Day.h
*** orig/gcc-2.7.2.2/PalmOS/UI/Day.h	Thu Jan  1 01:00:00 1970
--- gcc-2.7.2.2/PalmOS/UI/Day.h	Wed Feb 19 16:49:58 1997
***************
*** 0 ****
--- 1,43 ----
+ /***********************************************************************
+  *
+  *	Copyright (c) Palm Computing 1994 -- All Rights Reserved
+  *
+  * PROJECT:  Pilot
+  * FILE:     Day.h
+  * AUTHOR:	 Roger Flores: May 31, 1995
+  *
+  * DECLARER: UI
+  *
+  * DESCRIPTION:
+  *	  This file defines the date picker month object's  structures 
+  *   and routines.
+  *
+  ***********************************************************************/
+ #ifndef	__DAY_H__
+ #define	__DAY_H__
+ 
+ 
+ #include	<DateTime.h>
+ 
+ typedef struct {
+ 	RectangleType			bounds;
+ 	Boolean					visible;
+ 	SWord						visibleMonth;		// month actually displayed
+ 	SWord						visibleYear;		// year actually displayed
+ 	DateTimeType			selected;
+ } DaySelectorType;
+ 
+ typedef DaySelectorType * DaySelectorPtr;
+ 
+ 
+ void DayDrawDaySelector (DaySelectorPtr pSelector)
+ 			SYS_TRAP(sysTrapDayDrawDaySelector);
+ 
+ Boolean DayHandleEvent (DaySelectorPtr pSelector, EventPtr pEvent)
+ 			SYS_TRAP(sysTrapDayHandleEvent);
+ 
+ void DayDrawDays (DaySelectorPtr pSelector)
+ 			SYS_TRAP(sysTrapDayDrawDays);
+ 
+ 
+ #endif //__DAY_H__
diff -r -c -x *.orig -x *.rej -x #* -x *~ -N orig/gcc-2.7.2.2/PalmOS/UI/Event.H gcc-2.7.2.2/PalmOS/UI/Event.H
*** orig/gcc-2.7.2.2/PalmOS/UI/Event.H	Thu Jan  1 01:00:00 1970
--- gcc-2.7.2.2/PalmOS/UI/Event.H	Wed Feb 19 16:16:09 1997
***************
*** 0 ****
--- 1,267 ----
+ /***********************************************************************
+  *
+  *      Copyright (c) Palm Computing 1994 -- All Rights Reserved
+  *
+  * PROJECT:  Pilot
+  * FILE:     Event.h
+  * AUTHOR:   Art Lamb: September 26, 1994
+  *
+  * DECLARER: UI
+  *
+  * DESCRIPTION:
+  *        This file defines window structures and routines.
+  *
+  **********************************************************************/
+ 
+ #ifndef __EVENT_H__
+ #define __EVENT_H__
+ 
+ 
+ // Types of events
+ enum events {
+ 	nilEvent = 0,
+ 	penDownEvent,
+ 	penUpEvent,
+ 	penMoveEvent,
+ 	keyDownEvent,
+ 	winEnterEvent,
+ 	winExitEvent,
+ 	ctlEnterEvent,
+ 	ctlExitEvent,
+ 	ctlSelectEvent,
+ 	ctlRepeatEvent,
+ 	lstEnterEvent,
+ 	lstSelectEvent,
+ 	lstExitEvent,
+ 	popSelectEvent,
+ 	fldEnterEvent,
+ 	fldHeightChangedEvent,
+ 	fldChangedEvent,
+ 	tblEnterEvent,
+ 	tblSelectEvent,
+ 	daySelectEvent,
+ 	menuEvent,
+ 	appStopEvent,
+ 	frmLoadEvent,
+ 	frmOpenEvent,
+ 	frmGotoEvent,
+ 	frmUpdateEvent,
+ 	frmSaveEvent,
+ 	frmCloseEvent,
+ 	tblExitEvent,
+ 	firstUserEvent = 32767
+ };
+ 
+ // keyDownEvent modifers
+ #define shiftKeyMask			0x0001
+ #define capsLockMask			0x0002
+ #define numLockMask			0x0004
+ #define commandKeyMask		0x0008
+ #define optionKeyMask		0x0010
+ #define controlKeyMask		0x0020
+ #define autoRepeatKeyMask	0x0040		// True if generated due to auto-repeat
+ #define doubleTapKeyMask	0x0080		// True if this is a double-tap event
+ #define poweredOnKeyMask	0x0100		// True if this is a double-tap event
+ 
+ 
+ // Event timeouts
+ #define 	evtWaitForever		-1
+ 
+ 
+ // The event record.
+ typedef struct {
+ 	enum events    eType;
+ 	Boolean        penDown;
+ 	SWord          screenX;
+ 	SWord          screenY;
+ 	union data {
+ 		struct generic {
+ 			Word data1;
+ 			Word data2;
+ 			Word data3;
+ 			Word data4;
+ 			Word data5;
+ 			Word data6;
+ 			Word data7;
+ 			Word data8;
+ 			} generic;
+ 
+ 		struct {
+ 			PointType	start;					// display coord. of stroke start
+ 			PointType	end;						// display coord. of stroke start
+ 			} penUp;
+ 
+ 		struct {
+ 			Word chr;					// ascii code
+ 			Word keyCode;				// virtual key code
+ 			Word modifiers;			
+ 			} keyDown;
+ 
+ 		struct winEnter {
+ 			WinHandle    enterWindow; 
+ 			WinHandle    exitWindow;
+ 			} winEnter;
+ 
+ 		struct winExit {
+ 			WinHandle    enterWindow; 
+ 			WinHandle    exitWindow;
+ 			} winExit;
+ 
+ 		struct ctlEnter {
+ 			Word controlID;
+ 			void *     		pControl;
+ 			} ctlEnter;
+ 
+ 		struct ctlSelect {
+ 			Word controlID;
+ 			void *     		pControl;
+ 			Boolean			on;
+ 			} ctlSelect;
+ 
+ 		struct ctlRepeat {
+ 			Word controlID;
+ 			void *     		pControl;
+ 			DWord				time;
+ 			} ctlRepeat;
+ 
+ 		struct fldEnter {
+ 			Word fieldID;
+ 			void *     		pField;
+ 			} fldEnter;
+ 
+ 		struct fldHeightChanged {
+ 			Word fieldID;
+ 			void *     		pField;
+ 			Word				newHeight;
+ 			Word				currentPos;
+ 			} fldHeightChanged;
+ 
+ 		struct fldChanged {
+ 			Word fieldID;
+ 			void *     		pField;
+ 			} fldChanged;
+ 
+ 		struct fldExit {
+ 			Word fieldID;
+ 			void *     		pField;
+ 			} fldExit;
+ 
+ 		struct lstEnter {
+ 			Word listID;
+ 			void *     		pList;
+ 			Word selection;
+ 			} lstEnter;
+ 
+ 		struct lstExit {
+ 			Word listID;
+ 			void *     		pList;
+ 			} lstExit;
+ 
+ 		struct lstSelect {
+ 			Word listID;
+ 			void *     		pList;
+ 			Word selection;
+ 			} lstSelect;
+ 
+ 		struct tblEnter {
+ 			Word tableID;
+ 			void *     		pTable;
+ 			Word row;
+ 			Word column;
+ 			} tblEnter;
+ 
+ 		struct tblExit {
+ 			Word tableID;
+ 			void *     		pTable;
+ 			Word row;
+ 			Word column;
+ 			} tblExit;
+ 
+ 		struct tblSelect {
+ 			Word tableID;
+ 			void *     		pTable;
+ 			Word row;
+ 			Word column;
+ 			} tblSelect;
+ 
+ 		struct frmLoad {
+ 			Word formID;
+ 			} frmLoad;
+ 
+ 		struct frmOpen {
+ 			Word formID;
+ 			} frmOpen;
+ 
+ 		struct frmGoto {
+ 			Word formID;
+ 			Word 				recordNum;		// index of record that contain a match
+ 			Word				matchPos;		// postion in record of the match.
+ 			Word				matchLen;		// length of match.
+ 			Word				matchFieldNum;	// field number string was found int
+ 			DWord				matchCustom;	// application specific info
+ 			} frmGoto;
+ 
+ 		struct frmClose {
+ 			Word formID;
+ 			} frmClose;
+ 
+ 		struct frmUpdate {
+ 			Word formID;
+ 			Word updateCode;				// Application specific
+ 			} frmUpdate;
+ 
+ 		struct daySelect {
+ 			void *  		   pSelector;
+ 			Word selection;
+ 			Boolean			useThisDate;
+ 			} daySelect;
+ 
+ 		struct menu {
+ 			Word itemID;
+ 			} menu;
+ 
+ 		struct popSelect {
+ 			Word controlID;
+ 			void *  		   controlP;
+ 			Word listID;
+ 			void *    		listP;
+ 			Word selection;
+ 			Word priorSelection;
+ 			} popSelect;
+ 
+ 
+ 		} data;
+ } EventType;
+ 
+ typedef EventType * EventPtr;
+ 
+ //---------------------------------------------------------------------
+ //	Event Functions
+ //---------------------------------------------------------------------
+ 
+ extern void EvtInitialize (void)
+ 							SYS_TRAP(sysTrapEvtInitialize);
+ 
+ extern void EvtAddEventToQueue (EventPtr event)
+ 							SYS_TRAP(sysTrapEvtAddEventToQueue);
+ 
+ extern void EvtCopyEvent (EventPtr source, EventPtr dest)
+ 							SYS_TRAP(sysTrapEvtCopyEvent);
+ 
+ extern void EvtGetEvent (EventPtr event, SDWord timeout)
+ 							SYS_TRAP(sysTrapEvtGetEvent);
+ 
+ void			EvtGetPen(SWord *pScreenX, SWord *pScreenY, Boolean *pPenDown)
+ 						SYS_TRAP(sysTrapEvtGetPen);
+ 
+ // For Compatibility.. DOLATER... source modules should use EvtGetPen instead.
+ #define 		PenGetPoint(a,b,c)	 EvtGetPen(a,b,c)
+ 
+ 
+ #endif // __EVENT_H__
+ 
+ 
+ 
+ 
+ 
+ 
diff -r -c -x *.orig -x *.rej -x #* -x *~ -N orig/gcc-2.7.2.2/PalmOS/UI/Event.h gcc-2.7.2.2/PalmOS/UI/Event.h
*** orig/gcc-2.7.2.2/PalmOS/UI/Event.h	Thu Jan  1 01:00:00 1970
--- gcc-2.7.2.2/PalmOS/UI/Event.h	Wed Feb 19 16:49:58 1997
***************
*** 0 ****
--- 1,267 ----
+ /***********************************************************************
+  *
+  *      Copyright (c) Palm Computing 1994 -- All Rights Reserved
+  *
+  * PROJECT:  Pilot
+  * FILE:     Event.h
+  * AUTHOR:   Art Lamb: September 26, 1994
+  *
+  * DECLARER: UI
+  *
+  * DESCRIPTION:
+  *        This file defines window structures and routines.
+  *
+  **********************************************************************/
+ 
+ #ifndef __EVENT_H__
+ #define __EVENT_H__
+ 
+ 
+ // Types of events
+ enum events {
+ 	nilEvent = 0,
+ 	penDownEvent,
+ 	penUpEvent,
+ 	penMoveEvent,
+ 	keyDownEvent,
+ 	winEnterEvent,
+ 	winExitEvent,
+ 	ctlEnterEvent,
+ 	ctlExitEvent,
+ 	ctlSelectEvent,
+ 	ctlRepeatEvent,
+ 	lstEnterEvent,
+ 	lstSelectEvent,
+ 	lstExitEvent,
+ 	popSelectEvent,
+ 	fldEnterEvent,
+ 	fldHeightChangedEvent,
+ 	fldChangedEvent,
+ 	tblEnterEvent,
+ 	tblSelectEvent,
+ 	daySelectEvent,
+ 	menuEvent,
+ 	appStopEvent,
+ 	frmLoadEvent,
+ 	frmOpenEvent,
+ 	frmGotoEvent,
+ 	frmUpdateEvent,
+ 	frmSaveEvent,
+ 	frmCloseEvent,
+ 	tblExitEvent,
+ 	firstUserEvent = 32767
+ };
+ 
+ // keyDownEvent modifers
+ #define shiftKeyMask			0x0001
+ #define capsLockMask			0x0002
+ #define numLockMask			0x0004
+ #define commandKeyMask		0x0008
+ #define optionKeyMask		0x0010
+ #define controlKeyMask		0x0020
+ #define autoRepeatKeyMask	0x0040		// True if generated due to auto-repeat
+ #define doubleTapKeyMask	0x0080		// True if this is a double-tap event
+ #define poweredOnKeyMask	0x0100		// True if this is a double-tap event
+ 
+ 
+ // Event timeouts
+ #define 	evtWaitForever		-1
+ 
+ 
+ // The event record.
+ typedef struct {
+ 	enum events    eType;
+ 	Boolean        penDown;
+ 	SWord          screenX;
+ 	SWord          screenY;
+ 	union data {
+ 		struct generic {
+ 			Word data1;
+ 			Word data2;
+ 			Word data3;
+ 			Word data4;
+ 			Word data5;
+ 			Word data6;
+ 			Word data7;
+ 			Word data8;
+ 			} generic;
+ 
+ 		struct {
+ 			PointType	start;					// display coord. of stroke start
+ 			PointType	end;						// display coord. of stroke start
+ 			} penUp;
+ 
+ 		struct {
+ 			Word chr;					// ascii code
+ 			Word keyCode;				// virtual key code
+ 			Word modifiers;			
+ 			} keyDown;
+ 
+ 		struct winEnter {
+ 			WinHandle    enterWindow; 
+ 			WinHandle    exitWindow;
+ 			} winEnter;
+ 
+ 		struct winExit {
+ 			WinHandle    enterWindow; 
+ 			WinHandle    exitWindow;
+ 			} winExit;
+ 
+ 		struct ctlEnter {
+ 			Word controlID;
+ 			void *     		pControl;
+ 			} ctlEnter;
+ 
+ 		struct ctlSelect {
+ 			Word controlID;
+ 			void *     		pControl;
+ 			Boolean			on;
+ 			} ctlSelect;
+ 
+ 		struct ctlRepeat {
+ 			Word controlID;
+ 			void *     		pControl;
+ 			DWord				time;
+ 			} ctlRepeat;
+ 
+ 		struct fldEnter {
+ 			Word fieldID;
+ 			void *     		pField;
+ 			} fldEnter;
+ 
+ 		struct fldHeightChanged {
+ 			Word fieldID;
+ 			void *     		pField;
+ 			Word				newHeight;
+ 			Word				currentPos;
+ 			} fldHeightChanged;
+ 
+ 		struct fldChanged {
+ 			Word fieldID;
+ 			void *     		pField;
+ 			} fldChanged;
+ 
+ 		struct fldExit {
+ 			Word fieldID;
+ 			void *     		pField;
+ 			} fldExit;
+ 
+ 		struct lstEnter {
+ 			Word listID;
+ 			void *     		pList;
+ 			Word selection;
+ 			} lstEnter;
+ 
+ 		struct lstExit {
+ 			Word listID;
+ 			void *     		pList;
+ 			} lstExit;
+ 
+ 		struct lstSelect {
+ 			Word listID;
+ 			void *     		pList;
+ 			Word selection;
+ 			} lstSelect;
+ 
+ 		struct tblEnter {
+ 			Word tableID;
+ 			void *     		pTable;
+ 			Word row;
+ 			Word column;
+ 			} tblEnter;
+ 
+ 		struct tblExit {
+ 			Word tableID;
+ 			void *     		pTable;
+ 			Word row;
+ 			Word column;
+ 			} tblExit;
+ 
+ 		struct tblSelect {
+ 			Word tableID;
+ 			void *     		pTable;
+ 			Word row;
+ 			Word column;
+ 			} tblSelect;
+ 
+ 		struct frmLoad {
+ 			Word formID;
+ 			} frmLoad;
+ 
+ 		struct frmOpen {
+ 			Word formID;
+ 			} frmOpen;
+ 
+ 		struct frmGoto {
+ 			Word formID;
+ 			Word 				recordNum;		// index of record that contain a match
+ 			Word				matchPos;		// postion in record of the match.
+ 			Word				matchLen;		// length of match.
+ 			Word				matchFieldNum;	// field number string was found int
+ 			DWord				matchCustom;	// application specific info
+ 			} frmGoto;
+ 
+ 		struct frmClose {
+ 			Word formID;
+ 			} frmClose;
+ 
+ 		struct frmUpdate {
+ 			Word formID;
+ 			Word updateCode;				// Application specific
+ 			} frmUpdate;
+ 
+ 		struct daySelect {
+ 			void *  		   pSelector;
+ 			Word selection;
+ 			Boolean			useThisDate;
+ 			} daySelect;
+ 
+ 		struct menu {
+ 			Word itemID;
+ 			} menu;
+ 
+ 		struct popSelect {
+ 			Word controlID;
+ 			void *  		   controlP;
+ 			Word listID;
+ 			void *    		listP;
+ 			Word selection;
+ 			Word priorSelection;
+ 			} popSelect;
+ 
+ 
+ 		} data;
+ } EventType;
+ 
+ typedef EventType * EventPtr;
+ 
+ //---------------------------------------------------------------------
+ //	Event Functions
+ //---------------------------------------------------------------------
+ 
+ extern void EvtInitialize (void)
+ 							SYS_TRAP(sysTrapEvtInitialize);
+ 
+ extern void EvtAddEventToQueue (EventPtr event)
+ 							SYS_TRAP(sysTrapEvtAddEventToQueue);
+ 
+ extern void EvtCopyEvent (EventPtr source, EventPtr dest)
+ 							SYS_TRAP(sysTrapEvtCopyEvent);
+ 
+ extern void EvtGetEvent (EventPtr event, SDWord timeout)
+ 							SYS_TRAP(sysTrapEvtGetEvent);
+ 
+ void			EvtGetPen(SWord *pScreenX, SWord *pScreenY, Boolean *pPenDown)
+ 						SYS_TRAP(sysTrapEvtGetPen);
+ 
+ // For Compatibility.. DOLATER... source modules should use EvtGetPen instead.
+ #define 		PenGetPoint(a,b,c)	 EvtGetPen(a,b,c)
+ 
+ 
+ #endif // __EVENT_H__
+ 
+ 
+ 
+ 
+ 
+ 
diff -r -c -x *.orig -x *.rej -x #* -x *~ -N orig/gcc-2.7.2.2/PalmOS/UI/Field.h gcc-2.7.2.2/PalmOS/UI/Field.h
*** orig/gcc-2.7.2.2/PalmOS/UI/Field.h	Thu Jan  1 01:00:00 1970
--- gcc-2.7.2.2/PalmOS/UI/Field.h	Wed Feb 19 16:49:58 1997
***************
*** 0 ****
--- 1,245 ----
+ /***********************************************************************
+  *
+  *	Copyright (c) Palm Computing 1994 -- All Rights Reserved
+  *
+  * PROJECT:  Pilot
+  * FILE:     field.h
+  * AUTHOR:	 Art Lamb: August 29, 1994
+  *
+  * DECLARER: UI
+  *
+  * DESCRIPTION:
+  *	  This file defines field structures and routines.
+  *
+  ***********************************************************************/
+ #ifndef __FIELD_H__
+ #define __FIELD_H__
+ 
+ #define maxFieldTextLen	0x7fff
+ 
+ // Maximun number of line the a dynamicly sizing field will expand to.
+ #define  maxFieldLines 	11
+ 
+ 
+ // kind alignment values
+ #define leftAlign        	0
+ #define centerAlign      	1
+ #define rightAlign       	2
+ 
+ 
+ #define undoBufferSize 100
+ 
+ typedef enum { undoNone, undoTyping, undoBackspace, undoDelete,
+ 					undoPaste, undoCut } UndoMode;
+ 
+ typedef struct {
+ 	UndoMode		mode;
+ 	Word			start;
+ 	Word			end;
+ 	Word			bufferLen;
+ 	CharPtr		buffer;
+ 	} FieldUndoType;
+ 
+ 
+ typedef struct {
+ 	Word usable				:1;	// Set if part of ui 
+ 	Word visible			:1;	// Set if drawn, used internally
+ 	Word editable			:1;	// Set if editable
+ 	Word singleLine		:1;	// Set if only a single line is displayed
+ 	Word hasFocus       	:1;   // Set if the field has the focus
+ 	Word dynamicSize		:1;   // Set if height expands as text is entered
+ 	Word insPtVisible		:1;	// Set if the ins pt is scolled into view
+ 	Word dirty				:1;	// Set if user modified
+ 	Word underlined		:2;	// text underlined mode
+ 	Word justification	:2;	// text alignment
+ } FieldAttrType;
+ 
+ typedef FieldAttrType * FieldAttrPtr;
+ 
+ typedef struct {
+   Word	start;			// position in text string of first char.
+   Word	length;			// number of character in the line
+ } LineInfoType;
+ 
+ typedef LineInfoType * LineInfoPtr;
+ 
+ 
+ typedef struct {
+ 	Word					id;
+ 	RectangleType		rect;
+ 	FieldAttrType		attr;
+ 	CharPtr				text;					// pointer to the start of text string 
+ 	VoidHand				textHandle;			// block the contains the text string
+ 	LineInfoPtr			lines;
+ 	Word					textLen;
+ 	Word					textBlockSize;
+ 	Word					maxChars;
+ 	Word					selFirstPos;
+ 	Word					selLastPos;
+ 	Word					insPtXPos;
+ 	Word					insPtYPos;
+ 	FontID				fontID;
+ } FieldType;
+ 
+ 
+ typedef FieldType * FieldPtr;
+ 
+ //---------------------------------------------------------------------
+ //	Field Functions
+ //---------------------------------------------------------------------
+ 
+ extern void FldCopy (FieldPtr fld)
+ 							SYS_TRAP(sysTrapFldCopy);
+ 
+ extern void FldCut (FieldPtr fld)
+ 							SYS_TRAP(sysTrapFldCut);
+ 
+ extern void FldDrawField (FieldPtr fld)
+ 							SYS_TRAP(sysTrapFldDrawField);
+ 
+ extern void FldEraseField (FieldPtr fld)
+ 							SYS_TRAP(sysTrapFldEraseField);
+  
+ extern void FldFreeMemory (FieldPtr fld)
+ 							SYS_TRAP(sysTrapFldFreeMemory);
+ 
+ extern void FldGetBounds (FieldPtr fld, RectanglePtr rect)
+ 							SYS_TRAP(sysTrapFldGetBounds);
+ 
+ extern FontID FldGetFont (FieldPtr fld)
+ 							SYS_TRAP(sysTrapFldGetFont);
+ 
+ extern void FldGetSelection (FieldPtr fld, WordPtr startPosition, 
+ 	WordPtr endPosition)
+ 							SYS_TRAP(sysTrapFldGetSelection);
+ 
+ extern Handle FldGetTextHandle (FieldPtr fld)
+ 							SYS_TRAP(sysTrapFldGetTextHandle);
+ 
+ extern CharPtr FldGetTextPtr (FieldPtr fld)
+ 							SYS_TRAP(sysTrapFldGetTextPtr);
+ 
+ extern Boolean FldHandleEvent (FieldPtr fld, EventPtr pEvent)
+ 							SYS_TRAP(sysTrapFldHandleEvent);
+ 
+ extern void FldPaste (FieldPtr fld)
+ 							SYS_TRAP(sysTrapFldPaste);
+ 
+ extern void FldRecalculateField (FieldPtr fld, Boolean redraw)
+ 							SYS_TRAP(sysTrapFldRecalculateField);
+ 
+ extern void FldSetBounds (FieldPtr fld, RectanglePtr rect)
+ 							SYS_TRAP(sysTrapFldSetBounds);
+ 
+ extern void FldSetFont (FieldPtr fld, FontID fontID)
+ 							SYS_TRAP(sysTrapFldSetFont);
+ 
+ extern void FldSetText (FieldPtr fld, VoidHand textHandle, Word offset, 
+ 	Word size)
+ 							SYS_TRAP(sysTrapFldSetText);
+ 
+ extern void FldSetTextHandle (FieldPtr fld, Handle textHandle)
+ 							SYS_TRAP(sysTrapFldSetTextHandle);
+ 
+ extern void FldSetTextPtr (FieldPtr fld, CharPtr textP)
+ 							SYS_TRAP(sysTrapFldSetTextPtr);
+ 
+ extern void FldSetUsable (FieldPtr fld, Boolean usable)
+ 							SYS_TRAP(sysTrapFldSetUsable);
+ 
+ extern void FldSetSelection (FieldPtr fld, Word startPosition,
+ 	Word endPosition)
+ 							SYS_TRAP(sysTrapFldSetSelection);
+ 
+ extern void FldGrabFocus (FieldPtr fld)
+ 							SYS_TRAP(sysTrapFldGrabFocus);
+ 
+ extern void FldReleaseFocus (FieldPtr fld)
+ 							SYS_TRAP(sysTrapFldReleaseFocus);
+ 
+ 
+ extern Word FldGetInsPtPosition (FieldPtr fld)
+ 							SYS_TRAP(sysTrapFldGetInsPtPosition);
+ 
+ extern void FldSetInsPtPosition (FieldPtr fld, Word pos)
+ 							SYS_TRAP(sysTrapFldSetInsPtPosition);
+ 
+ extern Word FldGetScrollPosition (FieldPtr fld)
+ 							SYS_TRAP(sysTrapFldGetScrollPosition);
+ 
+ extern void FldSetScrollPosition (FieldPtr fld, Word pos)
+ 							SYS_TRAP(sysTrapFldSetScrollPosition);
+ 
+ extern Word FldGetTextLength (FieldPtr fld)
+ 							SYS_TRAP(sysTrapFldGetTextLength);
+ 
+ extern void FldScrollField (FieldPtr fld, Word linesToScroll, 
+ 	DirectionType direction)
+ 							SYS_TRAP(sysTrapFldScrollField);
+ 							
+ extern Boolean FldScrollable (FieldPtr fld, DirectionType direction)
+ 							SYS_TRAP(sysTrapFldScrollable);
+ 
+ extern Word FldGetVisibleLines (FieldPtr fld)
+ 							SYS_TRAP(sysTrapFldGetVisibleLines);
+ 
+ extern Word FldGetTextHeight (FieldPtr fld)
+ 							SYS_TRAP(sysTrapFldGetTextHeight);
+ 
+ extern Word FldCalcFieldHeight (CharPtr chars, Word maxWidth)
+ 							SYS_TRAP(sysTrapFldCalcFieldHeight);
+ 
+ Word FldWordWrap (CharPtr chars, Word maxWidth)
+ 							SYS_TRAP(sysTrapFldWordWrap);
+ 
+ extern void FldCompactText (FieldPtr fld)
+ 							SYS_TRAP(sysTrapFldCompactText);
+ 
+ extern Boolean FldDirty (FieldPtr fld)
+ 							SYS_TRAP(sysTrapFldDirty);
+ 
+ extern void FldSetDirty (FieldPtr fld, Boolean dirty)
+ 							SYS_TRAP(sysTrapFldSetDirty);
+ 
+ extern Word FldGetMaxChars (FieldPtr fld)
+ 							SYS_TRAP(sysTrapFldGetMaxChars);
+ 
+ extern void FldSetMaxChars (FieldPtr fld, Word maxChars)
+ 							SYS_TRAP(sysTrapFldSetMaxChars);
+ 
+ extern Boolean FldInsert (FieldPtr fld, CharPtr insertChars, Word insertLen)
+ 							SYS_TRAP(sysTrapFldInsert);
+ 
+ extern void FldDelete (FieldPtr fld, Word start, Word end)
+ 							SYS_TRAP(sysTrapFldDelete);
+ 
+ extern void FldUndo (FieldPtr fld)
+ 							SYS_TRAP(sysTrapFldUndo);
+ 
+ extern Word FldGetTextAllocatedSize (FieldPtr fld)
+ 							SYS_TRAP(sysTrapFldGetTextAllocatedSize);
+ 
+ extern void FldSetTextAllocatedSize (FieldPtr fld, Word allocatedSize)
+ 							SYS_TRAP(sysTrapFldSetTextAllocatedSize);
+ 
+ extern void FldGetAttributes (FieldPtr fld, FieldAttrPtr attrP)
+ 							SYS_TRAP(sysTrapFldGetAttributes);
+ 
+ extern void FldSetAttributes (FieldPtr fld, FieldAttrPtr attrP)
+ 							SYS_TRAP(sysTrapFldSetAttributes);
+ 
+ extern void FldSendChangeNotification (FieldPtr fld)
+ 							SYS_TRAP(sysTrapFldSendChangeNotification);
+ 
+ extern void FldSendHeightChangeNotification (FieldPtr fld, Word pos, 
+ 	Short numLines)
+ 							SYS_TRAP(sysTrapFldSendHeightChangeNotification);
+ 
+ extern Boolean FldMakeFullyVisible (FieldPtr fld)
+ 							SYS_TRAP(sysTrapFldMakeFullyVisible);
+ 
+ 
+ #endif // __FIELD_H__
+ 
+ 
+ 
diff -r -c -x *.orig -x *.rej -x #* -x *~ -N orig/gcc-2.7.2.2/PalmOS/UI/Find.h gcc-2.7.2.2/PalmOS/UI/Find.h
*** orig/gcc-2.7.2.2/PalmOS/UI/Find.h	Thu Jan  1 01:00:00 1970
--- gcc-2.7.2.2/PalmOS/UI/Find.h	Wed Feb 19 16:49:58 1997
***************
*** 0 ****
--- 1,105 ----
+ /***********************************************************************
+  *
+  *	Copyright (c) Palm Computing 1994 -- All Rights Reserved
+  *
+  * PROJECT:  Pilot
+  * FILE:     field.h
+  * AUTHOR:	 Art Lamb: August 29, 1994
+  *
+  * DECLARER: UI
+  *
+  * DESCRIPTION:
+  *	  This file defines field structures and routines.
+  *
+  ***********************************************************************/
+ #ifndef __FIND_H__
+ #define __FIND_H__
+ 
+ #define maxFinds			9
+ #define maxFindStrLen	16
+ 
+ typedef struct {
+ 	Word				appCardNo;			// card number of the application
+ 	LocalID			appDbID;				// LocalID of the application
+ 	Boolean			foundInCaller;		// true if found in app that called Find
+ 
+ 	Word				dbCardNo;			// card number of the database record was found in
+ 	LocalID			dbID;					// LocalID of the database record was found in
+ 	Word 				recordNum;			// index of record that contain a match
+ 	Word				matchPos;			// postion in record of the match.
+ 	Word				matchFieldNum;		// field number
+ 	DWord				matchCustom;			// app specific data
+ 	} FindMatchType;
+ 
+ typedef FindMatchType * FindMatchPtr;
+ 
+ typedef struct {
+ 
+ 	// These fields are used by the applications.
+ 	Word				dbAccesMode;		// read mode and maybe show secret
+ 	Word 				recordNum;			// index of last record that contained a match
+ 	Boolean			more;					// true of more matches to display
+ 	Char				strAsTyped [maxFindStrLen+1];	// search string as entered
+ 	Char				strToFind [maxFindStrLen+1];	// search string is lower case
+ 
+ 
+ 	// These fields are private to the Find routine and should NOT be accessed by
+ 	//  applications.
+ 	Word				numMatches;			// # of matches
+ 	Word				lineNumber;			// next line in the results tabel
+ 	Boolean			continuation;		// true if contining search of same app
+ 	Boolean			searchedCaller;	// true after we've searched app that initiated the find
+ 
+ 	LocalID			callerAppDbID;		// dbID of app that initiated search
+ 	Word				callerAppCardNo;	// cardNo of app that initiated search
+ 
+ 	LocalID			appDbID;				// dbID of app that we're currently searching
+ 	Word				appCardNo;			// card number of app that we're currently searching
+ 	
+ 	Boolean			newSearch;			// true for first search
+ 	DmSearchStateType	searchState;	// search state
+ 	FindMatchType	match [maxFinds];
+ } FindParamsType;
+ 
+ typedef FindParamsType * FindParamsPtr;
+ 
+ 
+ // Param Block passsed with the sysAppLaunchCmdGoto Command
+ typedef struct {
+ 	Word				searchStrLen;		// length of search string.
+ 	Word				dbCardNo;			// card number of the database	
+ 	LocalID			dbID;					// LocalID of the database
+ 	Word 				recordNum;			// index of record that contain a match
+ 	Word				matchPos;			// postion in record of the match.
+ 	Word				matchFieldNum;		// field number string was found int
+ 	DWord				matchCustom;			// application specific info
+ 	} GoToParamsType;
+ 
+ typedef GoToParamsType * GoToParamsPtr;
+ 
+ 
+ //----------------------------------------------------------
+ //	Find Functions
+ //----------------------------------------------------------
+ 
+ void Find (GoToParamsPtr goToP)
+ 			SYS_TRAP(sysTrapFind);
+ 		
+ 
+ Boolean FindStrInStr (CharPtr strToSearch, CharPtr strToFind, 
+ 	WordPtr posP)
+ 			SYS_TRAP(sysTrapFindStrInStr);
+ 
+ Boolean FindSaveMatch (FindParamsPtr findParams, Word recordNum, 
+ 	Word pos, Word fieldNum, DWord appCustom, Word cardNo, LocalID dbID)
+ 			SYS_TRAP(sysTrapFindSaveMatch);
+ 
+ void FindGetLineBounds (FindParamsPtr findParams, RectanglePtr r)
+ 			SYS_TRAP(sysTrapFindGetLineBounds);
+ 
+ Boolean FindDrawHeader (FindParamsPtr findParams, CharPtr title)
+ 			SYS_TRAP(sysTrapFindDrawHeader);
+ 
+ 
+ 
+ #endif __FIND_H__
diff -r -c -x *.orig -x *.rej -x #* -x *~ -N orig/gcc-2.7.2.2/PalmOS/UI/Font.h gcc-2.7.2.2/PalmOS/UI/Font.h
*** orig/gcc-2.7.2.2/PalmOS/UI/Font.h	Thu Jan  1 01:00:00 1970
--- gcc-2.7.2.2/PalmOS/UI/Font.h	Wed Feb 19 16:49:58 1997
***************
*** 0 ****
--- 1,109 ----
+ /***********************************************************************
+  *
+  *	Copyright (c) Palm Computing 1994 -- All Rights Reserved
+  *
+  * PROJECT:  Pilot
+  * FILE:     font.h
+  * AUTHOR:	 Art Lamb: September 13, 1994
+  *
+  * DECLARER: UI
+  *
+  * DESCRIPTION:
+  *	  This file defines font structures and routines.
+  *
+  ***********************************************************************/
+  
+ #ifndef __FONT_H__
+ #define __FONT_H__
+ 
+ 
+ typedef struct 
+ {
+ 	SByte    offset;
+ 	SByte		width;
+ } FontCharInfoType;
+ 
+ typedef struct{
+ 	SWord fontType; 			// font type
+ 	SWord firstChar; 			// ASCII code of first character
+ 	SWord lastChar; 			// ASCII code of last character
+ 	SWord maxWidth; 			// maximum character width
+ 	SWord kernMax; 			// negative of maximum character kern
+ 	SWord nDescent; 			// negative of descent
+ 	SWord fRectWidth; 		// width of font rectangle
+ 	SWord fRectHeight; 		// height of font rectangle
+ 	SWord owTLoc; 				// offset to offset/width table
+ 	SWord ascent; 				// ascent
+ 	SWord descent; 			// descent
+ 	SWord leading; 			// leading
+ 	SWord rowWords; 			// row width of bit image / 2
+ } FontType;
+ 
+ typedef FontType * FontPtr;
+  
+ enum fontID { stdFont, boldFont, largeFont, symbolFont, symbol11Font, 
+ 				  symbol7Font, ledFont };
+ 
+ #define checkboxFont symbol11Font
+ 
+ 
+ typedef enum fontID FontID;
+ 
+ 
+ //--------------------------------------------------------------------
+ //
+ // Font Function
+ //
+ //--------------------------------------------------------------------
+ 
+ #ifdef __cplusplus
+ extern "C" {
+ #endif
+ 
+ extern FontID FntGetFont (void)
+ 							SYS_TRAP(sysTrapFntGetFont);
+ 
+ extern FontID FntSetFont (FontID font)
+ 							SYS_TRAP(sysTrapFntSetFont);
+ 
+ extern FontPtr FntGetFontPtr (void)
+ 							SYS_TRAP(sysTrapFntGetFontPtr);
+ 
+ extern SWord FntBaseLine (void)
+ 							SYS_TRAP(sysTrapFntBaseLine);
+ 
+ extern SWord FntCharHeight (void)
+ 							SYS_TRAP(sysTrapFntCharHeight);
+ 
+ extern SWord FntLineHeight (void)
+ 							SYS_TRAP(sysTrapFntLineHeight);
+ 
+ extern SWord FntAverageCharWidth (void)
+ 							SYS_TRAP(sysTrapFntAverageCharWidth);
+ 
+ extern SWord FntCharWidth (Char ch)
+ 							SYS_TRAP(sysTrapFntCharWidth);
+ 
+ extern SWord FntCharsWidth (Char *chars, Word len)
+ 							SYS_TRAP(sysTrapFntCharsWidth);
+ 
+ extern void	FntCharsInWidth(CharPtr string, SWord *stringWidthP, 
+ 		SWord *stringLengthP, Boolean *fitWithinWidth)
+ 							SYS_TRAP(sysTrapFntCharsInWidth);
+ 
+ extern SWord FntDescenderHeight (void)
+ 							SYS_TRAP(sysTrapFntDescenderHeight);
+ 
+ extern SWord FntLineWidth (CharPtr pChars, Word length)
+ 							SYS_TRAP(sysTrapFntLineWidth);
+ 
+ 
+ #ifdef __cplusplus
+ }
+ #endif
+ 
+ 
+ #endif // __FONT_H__
+ 
+ 
+ 
diff -r -c -x *.orig -x *.rej -x #* -x *~ -N orig/gcc-2.7.2.2/PalmOS/UI/Form.h gcc-2.7.2.2/PalmOS/UI/Form.h
*** orig/gcc-2.7.2.2/PalmOS/UI/Form.h	Thu Jan  1 01:00:00 1970
--- gcc-2.7.2.2/PalmOS/UI/Form.h	Wed Feb 19 16:49:58 1997
***************
*** 0 ****
--- 1,364 ----
+ /***********************************************************************
+  *
+  *	Copyright (c) Palm Computing 1994 -- All Rights Reserved
+  *
+  * PROJECT:  Pilot
+  * FILE:     Form.h
+  * AUTHOR:	 Art Lamb: September 6, 1994
+  *
+  * DECLARER: UI
+  *
+  * DESCRIPTION:
+  *	  This file defines dialog box structures and routines.
+  *
+  ***********************************************************************/
+ 
+ #ifndef __FORM_H__
+ #define __FORM_H__
+ 
+ #define noFocus 0xffff
+ 
+ // Update code send as part of a frmUpdate event.
+ #define frmRedrawUpdateCode			0x8000
+ 
+ 
+ // Alert constants and structures
+ enum alertTypes {
+ 	informationAlert,
+ 	confirmationAlert,
+ 	warningAlert,
+ 	errorAlert };
+ typedef enum alertTypes AlertType;
+ 
+ typedef struct {
+ 	Word		alertType;
+ 	Word		helpRscID;
+ 	Word		numButtons;
+ 	Word		defaultButton;
+ } AlertTemplateType;
+ 
+ 
+ // Types of object in a dialog box
+ enum formObjects {
+ 	frmFieldObj,
+ 	frmControlObj,
+ 	frmListObj,
+ 	frmTableObj,
+ 	frmBitmapObj,
+ 	frmLineObj,
+ 	frmFrameObj,
+ 	frmRectangleObj,
+ 	frmLabelObj,
+ 	frmTitleObj,
+ 	frmPopupObj,
+ 	frmGraffitiStateObj,
+ 	frmGadgetObj };
+ typedef enum formObjects FormObjectKind;
+ 	
+ 
+ typedef struct {
+ 	Word usable			:1;	// Set if part of ui 
+ } FormObjAttrType;
+ 
+ 
+ typedef struct {
+ 	FormObjAttrType			attr;
+ 	PointType					pos;
+ 	Word		     				rscID;
+ } FormBitmapType;
+ 
+ 
+ typedef struct {
+ 	FormObjAttrType			attr;
+ 	PointType	      		point1;	   
+ 	PointType	      		point2;	   
+ } FormLineType;
+ 
+ 
+ typedef struct {
+ 	Word							id;
+ 	FormObjAttrType			attr;
+ 	RectangleType				rect;
+ 	Word     					frameType;
+ } FormFrameType;
+ 
+ 
+ typedef struct {
+ 	FormObjAttrType			attr;
+ 	RectangleType				rect;
+ } FormRectangleType;
+ 
+ 
+ typedef struct {
+ 	Word							id;
+ 	PointType					pos;
+ 	FormObjAttrType			attr;
+ 	FontID						fontID;
+ 	Char *						text;
+ } FormLabelType;
+ 
+ 
+ typedef struct {
+ 	RectangleType				rect;
+ 	Char *						text;
+ } FormTitleType;
+ 
+ 
+ typedef struct {
+ 	Word							controlID;
+ 	Word							listID;
+ } FormPopupType;
+ 
+ 
+ typedef struct {
+ 	PointType					pos;
+ } FrmGraffitiStateType;
+ 
+ 
+ typedef struct {
+ 	Word				id;
+ 	FormObjAttrType			attr;
+ 	RectangleType				rect;
+ 	VoidPtr			     		data;
+ } FormGadgetType;
+ 
+ 
+ typedef union {
+ 	void *                  ptr;
+ 	FieldType *					field;
+ 	ControlType *				control;
+ 	ListType	*					list;
+ 	TableType *					table;
+ 	FormBitmapType *			bitmap;
+ //	FormLineType *				line;
+ //	FormFrameType *			frame;
+ //	FormRectangleType *		rectangle;
+ 	FormLabelType *			label;
+ 	FormTitleType *			title;	
+ 	FormPopupType *			popup;
+ 	FrmGraffitiStateType *  grfState;
+ 	FormGadgetType *			gadget;
+ } FormObjectType;
+ 
+ // typedef FormObjectType * FormObjectPtr;
+ 
+ 
+ typedef struct {
+ 	FormObjectKind				objectType;
+ 	FormObjectType				object;
+ } FormObjListType;
+ 
+ 
+ typedef struct {
+ 	Word usable				:1;	// Set if part of ui 
+ 	Word enabled			:1;	// Set if interactable (not grayed out)
+ 	Word visible			:1;	// Set if drawn, used internally
+ 	Word dirty				:1;	// Set if dialog has been modified
+ 	Word saveBehind		:1;	// Set if bits behind form are save when form ids drawn
+ 	Word graffitiShift	:1;   // Set if graffiti shift indicator is supported
+ 	Word reserved			:11;
+ } FormAttrType;
+ 
+ 
+ typedef Boolean FormEventHandlerType (EventPtr eventP);
+ 
+ typedef FormEventHandlerType * FormEventHandlerPtr;
+ 
+ typedef struct {
+ 	WindowType					window;
+ 	Word							formId;
+    FormAttrType				attr;
+ 	WinHandle	       		bitsBehindForm;
+ 	FormEventHandlerPtr		handler;
+ 	Word							focus;
+ 	Word							defaultButton;
+ 	Word							helpRscId;
+ 	Word							menuRscId;
+ 	Word							numObjects;
+ 	FormObjListType *			objects;
+ } FormType;
+ 
+ 
+ typedef FormType * FormPtr;
+ 
+ 
+ //--------------------------------------------------------------------
+ //
+ // Form Function
+ //
+ //--------------------------------------------------------------------
+ 
+ extern FormPtr FrmInitForm (Word rscID)
+ 							SYS_TRAP(sysTrapFrmInitForm);
+ 
+ extern void FrmDeleteForm (FormPtr frm)
+ 							SYS_TRAP(sysTrapFrmDeleteForm);
+ 
+ extern void FrmDrawForm (FormPtr frm)
+ 							SYS_TRAP(sysTrapFrmDrawForm);
+ 
+ extern void FrmEraseForm (FormPtr frm)
+ 							SYS_TRAP(sysTrapFrmEraseForm);
+ 
+ extern FormPtr FrmGetActiveForm (void)
+ 							SYS_TRAP(sysTrapFrmGetActiveForm);
+ 
+ extern void FrmSetActiveForm (FormPtr frm)
+ 							SYS_TRAP(sysTrapFrmSetActiveForm);
+ 
+ extern Word FrmGetActiveFormID (void)
+ 							SYS_TRAP(sysTrapFrmGetActiveFormID);
+ 
+ extern Boolean FrmGetUserModifiedState (FormPtr frm)
+ 							SYS_TRAP(sysTrapFrmGetUserModifiedState);
+ 
+ extern void FrmSetNotUserModified (FormPtr frm)
+ 							SYS_TRAP(sysTrapFrmSetNotUserModified);
+ 
+ extern Word FrmGetFocus (FormPtr frm)
+ 							SYS_TRAP(sysTrapFrmGetFocus);
+             
+ extern void FrmSetFocus (FormPtr frm, Word fieldIndex)
+ 							SYS_TRAP(sysTrapFrmSetFocus);
+ 
+ extern Boolean FrmHandleEvent (FormPtr frm, EventPtr eventP)
+ 							SYS_TRAP(sysTrapFrmHandleEvent);
+ 
+ extern void FrmGetFormBounds (FormPtr frm, RectanglePtr r)
+ 							SYS_TRAP(sysTrapFrmGetFormBounds);
+ 
+ extern WinHandle FrmGetWindowHandle (FormPtr frm)
+ 							SYS_TRAP(sysTrapFrmGetWindowHandle);
+ 
+ extern Word FrmGetFormId (FormPtr frm)
+ 							SYS_TRAP(sysTrapFrmGetFormId);
+ 
+ extern FormPtr FrmGetFormPtr (Word formId)
+ 							SYS_TRAP(sysTrapFrmGetFormPtr);
+ 
+ extern FormPtr FrmGetFirstForm (void)
+ 							SYS_TRAP(sysTrapFrmGetFirstForm);
+ 
+ extern Word FrmGetNumberOfObjects (FormPtr frm)
+ 							SYS_TRAP(sysTrapFrmGetNumberOfObjects);
+ 
+ extern Word FrmGetObjectIndex (FormPtr frm, Word objID)
+ 							SYS_TRAP(sysTrapFrmGetObjectIndex);
+ 
+ extern Word FrmGetObjectId (FormPtr, Word objIndex)
+ 							SYS_TRAP(sysTrapFrmGetObjectId);
+ 
+ extern FormObjectKind FrmGetObjectType (FormPtr frm, Word objIndex)
+ 							SYS_TRAP(sysTrapFrmGetObjectType);
+ 
+ extern void * FrmGetObjectPtr (FormPtr frm, Word objIndex)
+ 							SYS_TRAP(sysTrapFrmGetObjectPtr);
+ 
+ extern void FrmGetObjectBounds (FormPtr frm, Word pObjIndex, RectanglePtr r)
+ 							SYS_TRAP(sysTrapFrmGetObjectBounds);
+ 
+ extern void FrmHideObject (FormPtr frm, Word objIndex)
+ 							SYS_TRAP(sysTrapFrmHideObject);
+ 
+ extern void FrmShowObject (FormPtr frm, Word objIndex)
+ 							SYS_TRAP(sysTrapFrmShowObject);
+ 
+ extern void FrmGetObjectPosition (FormPtr frm, Word objIndex, 
+ 	SWordPtr x, SWordPtr y)
+ 							SYS_TRAP(sysTrapFrmGetObjectPosition);
+ 
+ extern void FrmSetObjectPositon (FormPtr frm, Word objIndex, 
+ 	SWord x, SWord y)
+ 							SYS_TRAP(sysTrapFrmSetObjectPositon);
+ 
+ 
+ 
+ 
+ extern SWord FrmGetControlValue (FormPtr frm, Word controlID)
+ 							SYS_TRAP(sysTrapFrmGetControlValue);
+ 
+ extern void FrmSetControlValue (FormPtr frm, Word controlID, SWord newValue)
+ 							SYS_TRAP(sysTrapFrmSetControlValue);
+ 
+ extern Byte FrmGetControlGroupSelection (FormPtr frm, Byte groupNum)
+ 							SYS_TRAP(sysTrapFrmGetControlGroupSelection);
+ 
+ extern void FrmSetControlGroupSelection (FormPtr frm, Byte groupNum, 
+ 	Word controlID)
+ 							SYS_TRAP(sysTrapFrmSetControlGroupSelection);
+ 
+ extern void FrmCopyLabel (FormPtr frm, Word lableID, CharPtr newLable)
+ 							SYS_TRAP(sysTrapFrmCopyLabel);
+ 
+ extern CharPtr FrmGetLabel (FormPtr frm, Word lableID)
+ 							SYS_TRAP(sysTrapFrmGetLabel);
+ 
+ extern void FrmSetCategoryLabel (FormPtr frm, Word objIndex, CharPtr newLabel)
+ 							SYS_TRAP(sysTrapFrmSetCategoryLabel);
+ 
+ extern CharPtr FrmGetTitle (FormPtr frm)
+ 							SYS_TRAP(sysTrapFrmGetTitle);
+ 
+ extern void FrmSetTitle (FormPtr frm, CharPtr newTitle)
+ 							SYS_TRAP(sysTrapFrmSetTitle);
+ 
+ extern void FrmCopyTitle (FormPtr frm, CharPtr newTitle)
+ 							SYS_TRAP(sysTrapFrmCopyTitle);
+ 
+ extern VoidPtr FrmGetGadgetData (FormPtr frm, Word objIndex)
+ 							SYS_TRAP(sysTrapFrmGetGadgetData);
+ 
+ extern void FrmSetGadgetData (FormPtr frm, Word objIndex, VoidPtr data)
+ 							SYS_TRAP(sysTrapFrmSetGadgetData);
+ 
+ 
+ 
+ extern Word FrmDoDialog (FormPtr frm)
+ 							SYS_TRAP(sysTrapFrmDoDialog);
+ 
+ extern Word FrmAlert (Word  alertId)
+ 							SYS_TRAP(sysTrapFrmAlert);
+ 							
+ extern Word FrmCustomAlert (Word  alertId, CharPtr s1, CharPtr s2, CharPtr s3)
+ 							SYS_TRAP(sysTrapFrmCustomAlert);
+ 
+ extern void FrmHelp (Word helpMsgId)
+ 							SYS_TRAP(sysTrapFrmHelp);
+ 
+ extern void FrmUpdateScrollers (FormPtr frm, Word upIndex, Word downIndex,
+ 	Boolean scrollableUp, Boolean scrollabledown)
+ 							SYS_TRAP(sysTrapFrmUpdateScrollers);
+ 
+ extern Boolean FrmVisible (FormPtr frm)
+ 							SYS_TRAP(sysTrapFrmVisible);
+ 
+ extern void FrmSetEventHandler (FormPtr frm, FormEventHandlerPtr)
+ 							SYS_TRAP(sysTrapFrmSetEventHandler);
+ 
+ extern Boolean FrmDispatchEvent (EventPtr eventP)
+ 							SYS_TRAP(sysTrapFrmDispatchEvent);
+ 
+ 
+ 
+ 
+ extern void FrmPopupForm (Word formId)
+ 							SYS_TRAP(sysTrapFrmPopupForm);
+ 
+ extern void FrmGotoForm (Word formId)
+ 							SYS_TRAP(sysTrapFrmGotoForm);
+ 
+ extern void FrmUpdateForm (Word formId, Word updateCode)
+ 							SYS_TRAP(sysTrapFrmUpdateForm);
+ 							
+ extern void FrmReturnToForm  (Word formId)
+ 							SYS_TRAP(sysTrapFrmReturnToForm);
+ 							
+ extern void FrmCloseAllForms (void)
+ 							SYS_TRAP(sysTrapFrmCloseAllForms);
+ 
+ extern void FrmSaveAllForms (void)
+ 							SYS_TRAP(sysTrapFrmSaveAllForms);
+ 
+ 
+ 
+ #endif __FORM_H__
\ No newline at end of file
diff -r -c -x *.orig -x *.rej -x #* -x *~ -N orig/gcc-2.7.2.2/PalmOS/UI/GraffitiShift.h gcc-2.7.2.2/PalmOS/UI/GraffitiShift.h
*** orig/gcc-2.7.2.2/PalmOS/UI/GraffitiShift.h	Thu Jan  1 01:00:00 1970
--- gcc-2.7.2.2/PalmOS/UI/GraffitiShift.h	Wed Feb 19 16:49:58 1997
***************
*** 0 ****
--- 1,54 ----
+ /***********************************************************************
+  *
+  *      Copyright (c) Palm Computing 1995 -- All Rights Reserved
+  *
+  * PROJECT:  Pilot
+  * FILE:     GriffitifShift.h
+  * AUTHOR:   Art Lamb: Aug 24, 1995
+  *
+  * DECLARER: UI
+  *
+  * DESCRIPTION:
+  *        This file defines Griffiti shift state indicator routines.
+  *
+  **********************************************************************/
+ 
+ #ifndef __GRFSHIFTIND_H__
+ #define __GRFSHIFTIND_H__
+ 
+ 
+ // Graffiti lock flags
+ #define glfCapsLock   0x01
+ #define glfNumLock	 0x02
+ 
+ 
+ typedef enum { gsiShiftNone,				// no indicator
+ 					gsiNumLock,					// numeric lock
+ 					gsiCapsLock,				// capital lock
+ 					gsiShiftPunctuation,		// punctuation shift
+ 					gsiShiftExtended,			// extented punctuation shift
+ 					gsiShiftUpper,				// alpha upper case shift
+ 					gsiShiftLower	 			// alpha lower case
+ 				 } GsiShiftState;
+ 
+ 
+ 
+ extern void GsiInitialize (void)
+ 							SYS_TRAP(sysTrapGsiInitialize);
+ 
+ extern void GsiSetLocation (SWord x, SWord y)
+ 							SYS_TRAP(sysTrapGsiSetLocation);
+ 
+ extern void GsiEnable (Boolean enableIt)
+ 							SYS_TRAP(sysTrapGsiEnable);
+ 
+ extern Boolean GsiEnabled (void)
+ 							SYS_TRAP(sysTrapGsiEnabled);
+ 
+ extern void GsiSetShiftState (Word lockFlags, Word tempShift)
+ 							SYS_TRAP(sysTrapGsiSetShiftState);
+ 
+ 
+ #endif __GRFSHIFTIND_H__
+ 
+ 
diff -r -c -x *.orig -x *.rej -x #* -x *~ -N orig/gcc-2.7.2.2/PalmOS/UI/GraffitiUI.h gcc-2.7.2.2/PalmOS/UI/GraffitiUI.h
*** orig/gcc-2.7.2.2/PalmOS/UI/GraffitiUI.h	Thu Jan  1 01:00:00 1970
--- gcc-2.7.2.2/PalmOS/UI/GraffitiUI.h	Wed Feb 19 16:49:58 1997
***************
*** 0 ****
--- 1,25 ----
+ /***********************************************************************
+  *
+  *      Copyright (c) Palm Computing 1995 -- All Rights Reserved
+  *
+  * PROJECT:  Touchdown
+  * FILE:     GraffitifUI.h
+  * AUTHOR:   Roger Flores: Sep 15, 1995
+  *
+  * DECLARER: UI
+  *
+  * DESCRIPTION:
+  *        This file defines Graffiti UI routines.
+  *
+  **********************************************************************/
+ 
+ #ifndef __GRFUI_H__
+ #define __GRFUI_H__
+ 
+ 
+ extern void SysGrfShortCutListDialog ()
+ 							SYS_TRAP(sysTrapSysGrfShortCutListDialog);
+ 
+ 
+ #endif __GRFUI_H__
+ 
diff -r -c -x *.orig -x *.rej -x #* -x *~ -N orig/gcc-2.7.2.2/PalmOS/UI/Init.h gcc-2.7.2.2/PalmOS/UI/Init.h
*** orig/gcc-2.7.2.2/PalmOS/UI/Init.h	Thu Jan  1 01:00:00 1970
--- gcc-2.7.2.2/PalmOS/UI/Init.h	Wed Feb 19 16:49:58 1997
***************
*** 0 ****
--- 1,25 ----
+ /***********************************************************************
+  *
+  *      Copyright (c) Palm Computing 1995 -- All Rights Reserved
+  *
+  * PROJECT:  Pilot
+  * FILE:     Init.h
+  * AUTHOR:   Art Lamb: Jan 25, 1995
+  *
+  * DECLARER: UI
+  *
+  * DESCRIPTION:
+  *        This file defines UI initialization routines.
+  *
+  **********************************************************************/
+ 
+ #ifndef __INIT_H__
+ #define __INIT_H__
+ 
+ extern void UIInitialize (void)
+ 							SYS_TRAP(sysTrapUIInitialize);
+ 
+ extern void UIReset (void)
+ 							SYS_TRAP(sysTrapUIReset);
+ 
+ #endif __INIT_H__
\ No newline at end of file
diff -r -c -x *.orig -x *.rej -x #* -x *~ -N orig/gcc-2.7.2.2/PalmOS/UI/InsPoint.h gcc-2.7.2.2/PalmOS/UI/InsPoint.h
*** orig/gcc-2.7.2.2/PalmOS/UI/InsPoint.h	Thu Jan  1 01:00:00 1970
--- gcc-2.7.2.2/PalmOS/UI/InsPoint.h	Wed Feb 19 16:49:59 1997
***************
*** 0 ****
--- 1,48 ----
+ /***********************************************************************
+  *
+  *      Copyright (c) Palm Computing 1995 -- All Rights Reserved
+  *
+  * PROJECT:  Pilot
+  * FILE:     InsPoint.h
+  * AUTHOR:   Art Lamb: Jan 25, 1995
+  *
+  * DECLARER: UI
+  *
+  * DESCRIPTION:
+  *        This file defines insertion point routines.
+  *
+  **********************************************************************/
+ 
+ #ifndef __INSPOINT_H__
+ #define __INSPOINT_H__
+ 
+ // Blink interval is half of a second
+ #define		insPtBlinkInterval	30		
+ #define		insPtWidth				2
+ 
+ extern void InsPtInitialize (void)
+ 							SYS_TRAP(sysTrapInsPtInitialize);
+ 
+ extern void InsPtSetLocation (SWord x, SWord y)
+ 							SYS_TRAP(sysTrapInsPtSetLocation);
+ 
+ extern void InsPtGetLocation (SWordPtr x, SWordPtr y)
+ 							SYS_TRAP(sysTrapInsPtGetLocation);
+ 
+ extern void InsPtEnable (Boolean enableIt)
+ 							SYS_TRAP(sysTrapInsPtEnable);
+ 
+ extern Boolean InsPtEnabled (void)
+ 							SYS_TRAP(sysTrapInsPtEnabled);
+ 
+ extern void InsPtSetHeight (SWord height)
+ 							SYS_TRAP(sysTrapInsPtSetHeight);
+ 
+ extern SWord InsPtGetHeight (void)
+ 							SYS_TRAP(sysTrapInsPtGetHeight);
+ 
+ extern void InsPtCheckBlink (void)
+ 							SYS_TRAP(sysTrapInsPtCheckBlink);
+ 
+ 
+ #endif __INSPOINT_H__
\ No newline at end of file
diff -r -c -x *.orig -x *.rej -x #* -x *~ -N orig/gcc-2.7.2.2/PalmOS/UI/List.h gcc-2.7.2.2/PalmOS/UI/List.h
*** orig/gcc-2.7.2.2/PalmOS/UI/List.h	Thu Jan  1 01:00:00 1970
--- gcc-2.7.2.2/PalmOS/UI/List.h	Wed Feb 19 16:49:59 1997
***************
*** 0 ****
--- 1,104 ----
+ /***********************************************************************
+  *
+  *	Copyright (c) Palm Computing 1994 -- All Rights Reserved
+  *
+  * PROJECT:  Pilot
+  * FILE:     list.h
+  * AUTHOR:	 Roger Flores: November 3, 1994
+  *
+  * DECLARER: UI
+  *
+  * DESCRIPTION:
+  *	  This file defines list structures and routines.
+  *
+  ***********************************************************************/
+ 
+ #ifndef __LIST_H__
+ #define __LIST_H__
+ 
+ 
+ #define noListSelection    		0x0ffff
+ 
+ //-------------------------------------------------------------------
+ // List structures
+ //-------------------------------------------------------------------
+ 
+ typedef struct {
+ 	Word usable         :1;			// set if part of ui 
+ 	Word enabled        :1;			// set if interactable (not grayed out)
+ 	Word visible        :1;			// set if drawn
+    Word poppedUp       :1;     	// set if choices displayed in popup win.
+    Word reserved       :4;
+ } ListAttrType;
+ 
+ 
+ // Load data callback routine prototype
+ typedef void ListDrawDataFuncType (Word itemNum, RectanglePtr bounds, 
+ 	CharPtr *itemsText);
+ 	
+ typedef ListDrawDataFuncType * ListDrawDataFuncPtr;
+ 
+ 
+ typedef struct {
+ 	Word						id;
+    RectangleType			bounds;
+    ListAttrType			attr;
+    CharPtr					*itemsText;
+    Word						numItems;        		// number of choices in the list
+    Word   					currentItem;     		// currently display choice
+    Word   					topItem;         		// top item visible when poped up
+    FontID           		font;						// font used to draw list
+ 	WinHandle   			popupWin;				// used only by popup lists
+    ListDrawDataFuncPtr	drawItemsCallback;	// 0 indicates no function
+ } ListType;
+ 
+ typedef ListType * ListPtr;
+ 
+ 
+ //-------------------------------------------------------------------
+ // List routines
+ //-------------------------------------------------------------------
+ extern void LstDrawList (ListPtr list)
+ 							SYS_TRAP(sysTrapLstDrawList);
+ 
+ extern void LstEraseList (ListPtr list)
+ 							SYS_TRAP(sysTrapLstEraseList);
+ 
+ extern Word LstGetSelection (ListPtr list)
+ 							SYS_TRAP(sysTrapLstGetSelection);
+ 
+ extern CharPtr LstGetSelectionText (ListPtr list, Word itemNum)
+ 							SYS_TRAP(sysTrapLstGetSelectionText);
+ 
+ extern Boolean LstHandleEvent (ListPtr list, EventPtr event)
+ 							SYS_TRAP(sysTrapLstHandleEvent);
+ 
+ extern void LstSetHeight (ListPtr pList, Word  visibleItems)
+ 							SYS_TRAP(sysTrapLstSetHeight);
+ 
+ extern void LstSetPosition (ListPtr pList, SWord x, SWord y)
+ 							SYS_TRAP(sysTrapLstSetPosition);
+ 
+ extern void LstSetSelection (ListPtr list, Word itemNum)
+ 							SYS_TRAP(sysTrapLstSetSelection);
+ 
+ extern void LstSetListChoices (ListPtr list, Char ** itemsText, 
+ 	Word numItems)
+ 							SYS_TRAP(sysTrapLstSetListChoices);
+ 
+ extern void LstSetDrawFunction (ListPtr pList, ListDrawDataFuncPtr func)
+ 							SYS_TRAP(sysTrapLstSetDrawFunction);
+ 
+ extern void LstSetTopItem (ListPtr pList, Word itemNum)
+ 							SYS_TRAP(sysTrapLstSetTopItem);
+ 
+ extern void LstMakeItemVisible (ListPtr pList, Word itemNum)
+ 							SYS_TRAP(sysTrapLstMakeItemVisible);
+ 
+ extern Word LstGetNumberOfItems (ListPtr pList)
+ 							SYS_TRAP(sysTrapLstGetNumberOfItems);
+ 
+ extern SWord LstPopupList (ListPtr list)
+ 							SYS_TRAP(sysTrapLstPopupList);
+ 
+ #endif // __LIST_H__
\ No newline at end of file
diff -r -c -x *.orig -x *.rej -x #* -x *~ -N orig/gcc-2.7.2.2/PalmOS/UI/Menu.h gcc-2.7.2.2/PalmOS/UI/Menu.h
*** orig/gcc-2.7.2.2/PalmOS/UI/Menu.h	Thu Jan  1 01:00:00 1970
--- gcc-2.7.2.2/PalmOS/UI/Menu.h	Wed Feb 19 16:49:59 1997
***************
*** 0 ****
--- 1,97 ----
+ /***********************************************************************
+  *
+  *	Copyright (c) Palm Computing 1994 -- All Rights Reserved
+  *
+  * PROJECT:  Pilot
+  * FILE:     menu.h
+  * AUTHOR:	 Roger Flores: November 18, 1994
+  *
+  * DECLARER: UI
+  *
+  * DESCRIPTION:
+  *	  This file defines menu structures and routines.
+  *
+  ***********************************************************************/
+ 
+ #ifndef __MENU_H__
+ #define __MENU_H__
+ 
+ 
+ #define noMenuSelection			-1
+ #define noMenuItemSelection	-1
+ 
+ 
+ // To match Apple's ResEdit the first byte of a menu item's text can
+ // be a special char indicating a special menu item.
+ #define MenuSeparatorChar			'-'
+ 
+ 
+ 
+ typedef struct {
+ 	Word						id;				// id of the menu item
+ 	Char						command;			// command key
+ 	CharPtr					itemStr;			// string to be displayed
+ } MenuItemType;
+ 
+ 
+ typedef struct {
+ 	WinHandle				menuWin;			// window of pull-down menu
+ 	RectangleType			bounds;			// bounds of the pulldown
+ 	WinHandle				bitsBehind;		// saving bits behind pull-down menu
+ 	RectangleType			titleBounds;	// bounds of the title in menu bar
+ 	CharPtr					title;			// menu title displayed in menu bar
+ 	Word						numItems;		// number of items in the menu
+ 	MenuItemType *			items;			// array of menu items
+ } MenuPullDownType;
+ 
+ typedef MenuPullDownType * MenuPullDownPtr;
+ 
+ typedef struct {
+ 	Word visible			:1;			// Set if menu bar is drawn
+ 	Word commandPending	:1;			// Set if next key is a command
+ 	Word insPtEnabled	:1;			// Set if insPt was on when menu was drawn
+ } MenuBarAttrType;
+ 
+ 
+ typedef struct {
+ 	WinHandle				barWin;			// window of menu bar
+ 	WinHandle				bitsBehind;		// saving bits behind menu bar
+ 	WinHandle				savedActiveWin;
+ 	WinHandle				bitsBehindStatus;
+ 	MenuBarAttrType 		attr;
+ 	SWord						curMenu;			// current menu or -1 if none
+ 	SWord						curItem;			// current item in curMenu, -1 if none
+ 	SDWord					commandTick;	//
+ 	SWord						numMenus;		// number of menus
+ 	MenuPullDownPtr  		menus;			// array of menus
+ } MenuBarType;
+ 
+ typedef MenuBarType * MenuBarPtr;
+ 
+ 
+ 
+ extern MenuBarPtr MenuInit (Word resourceId)
+ 							SYS_TRAP(sysTrapMenuInit);
+ 
+ extern MenuBarPtr MenuGetActiveMenu (void)
+ 							SYS_TRAP(sysTrapMenuGetActiveMenu);
+ 
+ extern MenuBarPtr MenuSetActiveMenu (MenuBarPtr pMenu)
+ 							SYS_TRAP(sysTrapMenuSetActiveMenu);
+ 
+ extern void MenuDispose (MenuBarPtr pMenu)
+ 							SYS_TRAP(sysTrapMenuDispose);
+ 
+ extern Boolean MenuHandleEvent (MenuBarPtr pMenu, EventPtr event,
+ 	WordPtr error)
+ 							SYS_TRAP(sysTrapMenuHandleEvent);
+ 
+ extern void MenuDrawMenu (MenuBarPtr pMenu)
+ 							SYS_TRAP(sysTrapMenuDrawMenu);
+ 
+ extern void MenuEraseStatus (MenuBarPtr pMenu)
+ 							SYS_TRAP(sysTrapMenuEraseStatus);
+ 
+ 
+ 
+ #endif //__MENU_H__
diff -r -c -x *.orig -x *.rej -x #* -x *~ -N orig/gcc-2.7.2.2/PalmOS/UI/Rect.h gcc-2.7.2.2/PalmOS/UI/Rect.h
*** orig/gcc-2.7.2.2/PalmOS/UI/Rect.h	Thu Jan  1 01:00:00 1970
--- gcc-2.7.2.2/PalmOS/UI/Rect.h	Wed Feb 19 16:49:59 1997
***************
*** 0 ****
--- 1,71 ----
+ /***********************************************************************
+  *
+  *	Copyright (c) Palm Computing 1994 -- All Rights Reserved
+  *
+  * PROJECT:  Pilot
+  * FILE:     Rect.h
+  * AUTHOR:	 Roger Flores: November 3, 1994
+  *
+  * DECLARER: UI
+  *
+  * DESCRIPTION:
+  *	  This file defines rectangle structures and routines.
+  *
+  ***********************************************************************/
+ 
+ #ifndef __RECT_H__
+ #define __RECT_H__
+ 
+ typedef struct {
+   SWord left;
+   SWord top;
+   SWord right;
+   SWord bottom;
+ } AbsRectType;
+ 
+ 
+ typedef struct {
+   SWord x;
+   SWord y;
+ } PointType;
+ 
+ 
+ typedef struct {
+   PointType  topLeft;
+   PointType  extent;
+ } RectangleType;
+ 
+ typedef RectangleType * RectanglePtr;
+ 
+ 
+ 
+ #ifdef __cplusplus
+ extern "C" {
+ #endif
+ 
+ extern void RctSetRectangle (RectanglePtr r, SWord left, SWord top, 
+ 	SWord width, SWord height)
+ 							SYS_TRAP(sysTrapRctSetRectangle);
+ 
+ extern void RctCopyRectangle (RectanglePtr srcRect, RectanglePtr  dstRect)
+ 							SYS_TRAP(sysTrapRctCopyRectangle);
+ 
+ extern void RctInsetRectangle (RectanglePtr r, SWord insetAmt)
+ 							SYS_TRAP(sysTrapRctInsetRectangle);
+ 
+ extern void  RctOffsetRectangle (RectanglePtr r, SWord deltaX, SWord deltaY)
+ 							SYS_TRAP(sysTrapRctOffsetRectangle);
+ 
+ extern Boolean RctPtInRectangle (SWord x, SWord y, RectanglePtr r)
+ 							SYS_TRAP(sysTrapRctPtInRectangle);
+ 
+ extern void RctGetIntersection (RectanglePtr r1, RectanglePtr r2, RectanglePtr r3)
+ 							SYS_TRAP(sysTrapRctGetIntersection);
+ 
+ 
+ #ifdef __cplusplus
+ }
+ #endif
+ 
+ 
+ #endif //__RECT_H__
\ No newline at end of file
diff -r -c -x *.orig -x *.rej -x #* -x *~ -N orig/gcc-2.7.2.2/PalmOS/UI/ScrDriver.h gcc-2.7.2.2/PalmOS/UI/ScrDriver.h
*** orig/gcc-2.7.2.2/PalmOS/UI/ScrDriver.h	Thu Jan  1 01:00:00 1970
--- gcc-2.7.2.2/PalmOS/UI/ScrDriver.h	Wed Feb 19 16:49:59 1997
***************
*** 0 ****
--- 1,161 ----
+ /***********************************************************************
+  *
+  *	Copyright (c) Palm Computing 1995 -- All Rights Reserved
+  *
+  * PROJECT:	Pilot [EMULATOR]
+  *
+  * FILE:	ScrDriver.h
+  *
+  * AUTHOR:	Ain McKendrick
+  *
+  * DECLARER:
+  *
+  * DESCRIPTION:	Screen driver function prototypes.  For use by TD applications.
+  *	  
+  * REVISION HISTORY:
+  *			Name	Date		Description
+  *			----	----		-----------
+  *			Ain		1/25/95		Initial creation
+  *			Ain		2/3/95		Revised to use new WinPtr type due to name
+  *								changes in window.h
+  *
+  **********************************************************************/
+ 
+ #ifndef	__SCRDRIVER_H__
+ #define 	__SCRDRIVER_H__
+ 
+ #include <SystemMgr.h>
+ 
+ 
+ /**************************************************************************
+  * Internal constants
+  ***************************************************************************/
+ #define		scrMaxLineBytes		32			// Max # of bytes in a scan line
+ 														// used in compression/decompression calls
+ 														
+ 														
+ 
+ /**************************************************************************
+  * Internal Drawing info structure used by Screen Driver
+  ***************************************************************************/
+ //typedef enum {scrCopy, scrAND, scrANDNOT, scrXOR, scrOR, scrCopyNOT} ScrOperation;
+ 
+ 
+ 
+ 
+ typedef struct ScrBltInfoType {
+ 
+ 	// Common fields.
+ 	ScrOperation		op;						// which bit operation to do
+ 	SWord					height;					// height of blit operation
+ 
+ 	WordPtr				dstBaseP;				// base address of window we're blitting to
+ 	Word					dstRowBytes;			// rowBytes of window
+ 
+ 	WordPtr				srcBaseP;				// base address of window we're blitting from
+ 	Word					srcRowBytes;			// rowBytes of window
+ 
+ 
+ 	// Info for each line
+ 	Word					leftMask;				// mask for leftmost byte of row
+ 	Word					rightMask;				// mask for rightmost byte of row
+ 	SWord					midWords;				// # of words between left and right mask
+ 
+ 	SWord					dstRowDelta;			// delta bytes from row to row
+ 	WordPtr				dstP;						// byte address of first dst line
+ 
+ 	SWord					srcRowDelta;			// delta bytes from row to row
+ 	WordPtr				srcP;						// byte address of first source line
+ 
+ 
+ 	
+ 	// These fields only used for drawing operations.
+ 	Word*					patternP;				// pointer to pattern to use				
+ 	Word					solidPat;				// color word if no pattern
+ 														//DOLATER.. used to byte byte
+ 	Boolean				simple;					// true if scrCopy with solid pattern
+ 	CustomPatternType	pattern;					// copy of modified pattern
+ 	
+ 	} ScrBltInfoType;
+ typedef ScrBltInfoType* ScrBltInfoPtr;
+ 
+ 
+ 
+ 
+ /**************************************************************************
+  * Structure of Screen Driver globals
+  ***************************************************************************/
+ typedef struct ScrGlobalsType {
+ 	Word					width;					// width of display in pixels
+ 	Word					height;					// height of display in pixels
+ 	Word					rowBytes;				// rowBytes of display
+ 	Ptr					baseAddr;				// base address of display
+ 	CustomPatternType	grayPat;					// Gray pattern
+ 	Boolean				doDrawNotify;			// call ScrDrawNotify after drawing
+ 	AbsRectType			updateR;					// update rect when in remote mode
+ 	SDWord					lastUpdate;				// Tickcount of last update
+ 	} ScrGlobalsType;
+ typedef ScrGlobalsType* ScrGlobalsPtr;
+ 
+ 
+ 
+ 
+ /************************************************************
+  * Function Prototypes
+  *************************************************************/
+ #ifdef __cplusplus
+ extern "C" {
+ #endif
+ 
+ // Initialization
+ void	ScrInit(void)
+ 				SYS_TRAP(sysTrapScrInit);
+ 				
+ 
+ // BitBlt Functions
+ Err	ScrCopyRectangle(WinPtr sourceWindow, WinPtr destWindow,
+ 	 				SWord fromX, SWord fromY, SWord toX, SWord toY,
+ 	 				SWord bitCount, SWord lineCount)
+ 	 			SYS_TRAP(sysTrapScrCopyRectangle);
+ 						
+ 
+ 						
+ // Character Functions
+ void	ScrDrawChars(WinPtr pWindow, SWord xLoc, SWord yLoc, SWord xExtent, SWord yExtent,
+ 					SWord clipTop, SWord clipLeft, SWord clipBottom, SWord clipRight,
+ 					CharPtr chars, Word len, FontPtr fontPtr)
+ 				SYS_TRAP(sysTrapScrDrawChars);
+ 
+ // Line Draw Functions
+ void 	ScrLineRoutine(WinPtr pWindow, SWord x1, SWord y1, SWord x2, SWord y2)
+ 				SYS_TRAP(sysTrapScrLineRoutine);
+ 				
+ void	ScrRectangleRoutine(WinPtr pWindow, SWord x, SWord y, SWord extentX, 
+ 					SWord extentY)
+ 				SYS_TRAP(sysTrapScrRectangleRoutine);
+ 
+ // Utility Functions
+ void 	ScrScreenInfo (WinPtr pWindow)
+ 				SYS_TRAP(sysTrapScrScreenInfo);
+ 				
+ void	ScrDrawNotify(SWord updLeft, SWord updTop,  SWord updWidth, SWord updHeight)
+ 				SYS_TRAP(sysTrapScrDrawNotify);
+ 				
+ void	ScrSendUpdateArea(Boolean force)		
+ 				SYS_TRAP(sysTrapScrSendUpdateArea);
+ 
+ Word ScrCompressScanLine(BytePtr lineP, BytePtr prevLineP, Word width, 
+ 					BytePtr dstParamP, Boolean firstLine)
+ 				SYS_TRAP(sysTrapScrCompressScanLine);
+ 
+ Word ScrDeCompressScanLine(BytePtr srcP, BytePtr dstP, Word width)
+ 				SYS_TRAP(sysTrapScrDeCompressScanLine);
+ 
+ 
+ #ifdef __cplusplus 
+ }
+ #endif
+ 
+ 
+ 
+ #endif // __SCRDRIVER_H__
\ No newline at end of file
diff -r -c -x *.orig -x *.rej -x #* -x *~ -N orig/gcc-2.7.2.2/PalmOS/UI/SelDay.h gcc-2.7.2.2/PalmOS/UI/SelDay.h
*** orig/gcc-2.7.2.2/PalmOS/UI/SelDay.h	Thu Jan  1 01:00:00 1970
--- gcc-2.7.2.2/PalmOS/UI/SelDay.h	Wed Feb 19 16:49:59 1997
***************
*** 0 ****
--- 1,30 ----
+ /***********************************************************************
+  *
+  *	Copyright (c) Palm Computing 1994 -- All Rights Reserved
+  *
+  * PROJECT:  Pilot
+  * FILE:     SelDay.h
+  * AUTHOR:	 Roger Flores: November 10, 1994
+  *
+  * DECLARER: UI
+  *
+  * DESCRIPTION:
+  *	  This file defines the date picker month object's  structures 
+  *   and routines.
+  *
+  ***********************************************************************/
+ #ifndef	__SELDAY_H__
+ #define	__SELDAY_H__
+ 
+ #include <Day.h>
+ 
+ #define daySelectorMinYear  firstYear
+ #define daySelectorMaxYear  lastYear
+ 
+ 
+ 
+ extern Boolean SelectDay (SWord *month, SWord *day, SWord *year, CharPtr title)
+ 			SYS_TRAP(sysTrapSelectDay);
+ 
+ 
+ #endif //__SELDAY_H__
diff -r -c -x *.orig -x *.rej -x #* -x *~ -N orig/gcc-2.7.2.2/PalmOS/UI/SelTime.h gcc-2.7.2.2/PalmOS/UI/SelTime.h
*** orig/gcc-2.7.2.2/PalmOS/UI/SelTime.h	Thu Jan  1 01:00:00 1970
--- gcc-2.7.2.2/PalmOS/UI/SelTime.h	Wed Feb 19 16:49:59 1997
***************
*** 0 ****
--- 1,38 ----
+ /***********************************************************************
+  *
+  *	Copyright (c) Palm Computing 1994 -- All Rights Reserved
+  *
+  * PROJECT:  Pilot
+  * FILE:     selTime.h
+  * AUTHOR:	 Roger Flores: December 6, 1994
+  *
+  * DECLARER: UI
+  *
+  * DESCRIPTION:
+  *	  This file defines select time structures and routines.
+  *
+  ***********************************************************************/
+ 
+ #ifndef	__SELTIME_H__
+ #define	__SELTIME_H__
+ 
+ #define NumericSpaceChar 0x80
+ 
+ //-------------------------------------------------------------------
+ // structures
+ //-------------------------------------------------------------------
+ 
+ 
+ 
+ typedef struct {
+ 	 Byte hours;
+ 	 Byte minutes;
+ 	 Byte seconds;
+ } HMSTime;
+ 
+ 
+ extern Boolean SelectTime (TimePtr startTimeP, TimePtr EndTimeP,
+ 	Boolean untimed, CharPtr title, SWord startOfDay)
+ 						SYS_TRAP(sysTrapSelectTime);
+ 
+ #endif // __SELTIME_H__
\ No newline at end of file
diff -r -c -x *.orig -x *.rej -x #* -x *~ -N orig/gcc-2.7.2.2/PalmOS/UI/Table.h gcc-2.7.2.2/PalmOS/UI/Table.h
*** orig/gcc-2.7.2.2/PalmOS/UI/Table.h	Thu Jan  1 01:00:00 1970
--- gcc-2.7.2.2/PalmOS/UI/Table.h	Wed Feb 19 16:49:59 1997
***************
*** 0 ****
--- 1,262 ----
+ /***********************************************************************
+  *
+  *	Copyright (c) Palm Computing 1994 -- All Rights Reserved
+  *
+  * PROJECT:  Pilot
+  * FILE:     field.h
+  * AUTHOR:	 Art Lamb: September 1, 1994
+  *
+  * DECLARER: UI
+  *
+  * DESCRIPTION:
+  *	  This file defines table structures and routines.
+  *
+  ***********************************************************************/
+ #ifndef __TABLE_H__
+ #define __TABLE_H__
+ 
+ //-------------------------------------------------------------------
+ // Table structures
+ //-------------------------------------------------------------------
+ 
+ #define tableDefaultColumnSpacing 	1
+ #define tableNoteIndicatorWidth		7
+ #define tableNoteIndicatorHeight		11
+ 
+ // Display style of a table item
+ //
+ enum tableItemStyles { checkboxTableItem, 
+                        customTableItem, 
+                        dateTableItem, 
+                        labelTableItem,
+                        numericTableItem,
+                        popupTriggerTableItem,
+                        textTableItem,
+                        textWithNoteTableItem,
+                        timeTableItem};
+ typedef enum tableItemStyles TableItemStyleType;
+ 
+ 
+ typedef struct {
+ 	TableItemStyleType	itemType;		
+    FontID					fontID;		// font for drawing text
+ 	Word						intValue;
+ 	CharPtr   				ptr;
+ } TableItemType;
+ typedef TableItemType * TableItemPtr;
+ 
+ 
+ // Draw item callback routine prototype, used only by customTableItem.
+ typedef void TableDrawItemFuncType  
+ 		(VoidPtr table, Word row, Word column, RectanglePtr bounds);
+ 
+ typedef TableDrawItemFuncType * TableDrawItemFuncPtr;
+ 
+ 
+ // Load data callback routine prototype
+ typedef Err TableLoadDataFuncType 
+ 		(VoidPtr table, Word row, Word column, Boolean editable, 
+ 		VoidHand * dataH, WordPtr dataOffset, WordPtr dataSize);
+ 
+ typedef TableLoadDataFuncType * TableLoadDataFuncPtr;
+ 
+ 
+ // Save data callback routine prototype
+ typedef	Boolean TableSaveDataFuncType
+ 		(VoidPtr table, Word row, Word column);
+ 
+ typedef TableSaveDataFuncType * TableSaveDataFuncPtr;
+ 
+ 
+ typedef struct {
+ 	Word							width;			// width in pixels
+ 	Boolean						usable;
+ 	Word							spacing;			// space after column
+ 	TableDrawItemFuncPtr		drawCallback;
+ 	TableLoadDataFuncPtr		loadDataCallback;
+ 	TableSaveDataFuncPtr		saveDataCallback;
+ 
+ } TableColumnAttrType;
+ 
+ 
+ typedef struct {
+ 	Word							id;
+ 	Word							height;		// row height in pixels
+ 	DWord							data;
+ 	Boolean						usable;
+ 	Boolean						selectable;
+ 	Boolean						invalid;		// true if redraw needed
+ } TableRowAttrType;
+ 
+ 
+ typedef struct {
+ 	Word 							visible:1;	// Set if drawn, used internally
+    Word 							editable:1;	// Set if editable
+ 	Word 							editing:1;	// Set if in edit mode
+ 	Word 							selected:1;	// Set if the current item is selected
+ } TableAttrType;
+ 
+ 
+ typedef struct {
+ 	Word							id;
+    RectangleType				bounds;
+    TableAttrType				attr;
+ 	Word							numColumns;
+ 	Word							numRows;
+ 	Word							currentRow;
+ 	Word							currentColumn;
+ 	Word							topRow;
+ 	TableColumnAttrType *	columnAttrs;
+    TableRowAttrType *      rowAttrs;
+ 	TableItemPtr				items;
+ 	FieldType					currentField;
+ } TableType;
+ 
+ typedef TableType * TablePtr;
+ 
+ 
+ //-------------------------------------------------------------------
+ // Table routines
+ //-------------------------------------------------------------------
+ 
+ extern void TblDrawTable (TablePtr table)
+ 							SYS_TRAP(sysTrapTblDrawTable);
+ 
+ extern void TblRedrawTable (TablePtr table)
+ 							SYS_TRAP(sysTrapTblRedrawTable);
+ 
+ extern void TblEraseTable (TablePtr table)
+ 							SYS_TRAP(sysTrapTblEraseTable);
+ 
+ extern Boolean TblHandleEvent (TablePtr table, EventPtr event)
+ 							SYS_TRAP(sysTrapTblHandleEvent);
+ 
+ extern void TblGetItemBounds (TablePtr table, Word row, Word column,
+ 	RectanglePtr r)
+ 							SYS_TRAP(sysTrapTblGetItemBounds);
+ 
+ extern void TblSelectItem (TablePtr table, Word row, Word column)
+ 							SYS_TRAP(sysTrapTblSelectItem);
+ 
+ extern Word TblGetItemInt (TablePtr table, Word row, Word column)
+ 							SYS_TRAP(sysTrapTblGetItemInt);
+ 
+ extern void TblSetItemInt (TablePtr table, Word row, Word column, Word value)
+ 							SYS_TRAP(sysTrapTblSetItemInt);
+ 
+ extern void TblSetItemPtr (TablePtr table, Word row, Word column, VoidPtr value)
+ 							SYS_TRAP(sysTrapTblSetItemPtr);
+ 
+ extern void TblSetItemStyle (TablePtr table, Word row, Word column, 
+ 	TableItemStyleType type)
+ 							SYS_TRAP(sysTrapTblSetItemStyle);
+ 
+ extern void TblUnhighlightSelection (TablePtr table)
+ 							SYS_TRAP(sysTrapTblUnhighlightSelection);
+ 
+ extern  Boolean TblRowUsable  (TablePtr table, Word row)
+ 							SYS_TRAP(sysTrapTblRowUsable);
+ 
+ extern void TblSetRowUsable (TablePtr table, Word row, Boolean usable)
+ 							SYS_TRAP(sysTrapTblSetRowUsable);
+ 
+ extern  Word TblGetLastUsableRow (TablePtr table)
+ 							SYS_TRAP(sysTrapTblGetLastUsableRow);
+ 
+ 
+ extern void TblSetColumnUsable (TablePtr table, Word row, Boolean usable)
+ 							SYS_TRAP(sysTrapTblSetColumnUsable);
+ 
+ extern void TblSetRowSelectable (TablePtr table, Word row, Boolean selectable)
+ 							SYS_TRAP(sysTrapTblSetRowSelectable);
+ 
+ extern Boolean TblRowSelectable (TablePtr table, Word row)
+ 							SYS_TRAP(sysTrapTblRowSelectable);
+ 
+ extern Word TblGetNumberOfRows (TablePtr table)
+ 							SYS_TRAP(sysTrapTblGetNumberOfRows);
+ 
+ extern void TblSetCustomDrawProcedure 
+ 	(TablePtr table, Word column, TableDrawItemFuncPtr drawCallback)
+ 							SYS_TRAP(sysTrapTblSetCustomDrawProcedure);
+ 
+ extern void TblSetLoadDataProcedure 
+ 	(TablePtr table, Word column, TableLoadDataFuncPtr loadDataCallback)
+ 							SYS_TRAP(sysTrapTblSetLoadDataProcedure);
+ 
+ extern void TblSetSaveDataProcedure 
+ 	(TablePtr table, Word column, TableSaveDataFuncPtr saveDataCallback)
+ 							SYS_TRAP(sysTrapTblSetSaveDataProcedure);
+ 
+ 
+ extern void TblGetBounds (TablePtr table, RectanglePtr r)
+ 							SYS_TRAP(sysTrapTblGetBounds);
+ 
+ extern Word TblGetRowHeight (TablePtr table, Word row)
+ 							SYS_TRAP(sysTrapTblGetRowHeight);
+ 
+ extern void TblSetRowHeight (TablePtr table, Word row, Word height)
+ 							SYS_TRAP(sysTrapTblSetRowHeight);
+ 
+ extern Word TblGetColumnWidth (TablePtr table, Word column)
+ 							SYS_TRAP(sysTrapTblGetColumnWidth);
+ 
+ extern void TblSetColumnWidth (TablePtr table, Word column, Word width)
+ 							SYS_TRAP(sysTrapTblSetColumnWidth);
+ 
+ extern Word TblGetColumnSpacing (TablePtr table, Word column)
+ 							SYS_TRAP(sysTrapTblGetColumnSpacing);
+ 
+ extern void TblSetColumnSpacing (TablePtr table, Word column, Word spacing)
+ 							SYS_TRAP(sysTrapTblSetColumnSpacing);
+ 
+ extern Boolean TblFindRowID (TablePtr table, Word id, WordPtr rowP)
+ 							SYS_TRAP(sysTrapTblFindRowID);
+ 
+ extern Boolean TblFindRowData (TablePtr table, DWord data, WordPtr rowP)
+ 							SYS_TRAP(sysTrapTblFindRowData);
+ 
+ extern Word TblGetRowID (TablePtr table, Word row)
+ 							SYS_TRAP(sysTrapTblGetRowID);
+ 
+ extern void TblSetRowID (TablePtr table, Word row, Word id)
+ 							SYS_TRAP(sysTrapTblSetRowID);
+ 
+ extern DWord TblGetRowData (TablePtr table, Word row)
+ 							SYS_TRAP(sysTrapTblGetRowData);
+ 
+ extern void TblSetRowData (TablePtr table, Word row, DWord data)
+ 							SYS_TRAP(sysTrapTblSetRowData);
+ 
+ extern Boolean TblRowInvalid (TablePtr table, Word row)
+ 							SYS_TRAP(sysTrapTblRowInvalid);
+ 
+ extern void TblMarkRowInvalid (TablePtr table, Word row)
+ 							SYS_TRAP(sysTrapTblMarkRowInvalid);
+ 
+ extern void TblMarkTableInvalid (TablePtr table)
+ 							SYS_TRAP(sysTrapTblMarkTableInvalid);
+ 
+ extern Boolean TblGetSelection (TablePtr table, WordPtr rowP, WordPtr columnP)
+ 							SYS_TRAP(sysTrapTblGetSelection);
+ 
+ extern void TblInsertRow (TablePtr table, Word row)
+ 							SYS_TRAP(sysTrapTblInsertRow);
+ 							
+ extern void TblRemoveRow (TablePtr table, Word row)
+ 							SYS_TRAP(sysTrapTblRemoveRow);
+ 
+ extern void TblReleaseFocus (TablePtr table)
+ 							SYS_TRAP(sysTrapTblReleaseFocus);
+ 							
+ extern Boolean TblEditing (TablePtr table)
+ 							SYS_TRAP(sysTrapTblEditing);
+ 
+ extern FieldPtr TblGetCurrentField (TablePtr table)
+ 							SYS_TRAP(sysTrapTblGetCurrentField);
+ 							
+ extern void TblGrabFocus (TablePtr table, Word row, Word column)
+ 							SYS_TRAP(sysTrapTblGrabFocus);
+ 
+ 
+ #endif //__TABLE_H__
diff -r -c -x *.orig -x *.rej -x #* -x *~ -N orig/gcc-2.7.2.2/PalmOS/UI/UIAll.h gcc-2.7.2.2/PalmOS/UI/UIAll.h
*** orig/gcc-2.7.2.2/PalmOS/UI/UIAll.h	Thu Jan  1 01:00:00 1970
--- gcc-2.7.2.2/PalmOS/UI/UIAll.h	Wed Feb 19 16:49:59 1997
***************
*** 0 ****
--- 1,32 ----
+ #ifdef __cplusplus
+ extern "C" {
+ #endif
+ 
+ 
+ #include <UICommon.h>
+ #include <Init.h>
+ #include <Rect.h>
+ #include <Font.h>
+ #include <Window.h>
+ #include <Chars.h>
+ #include <InsPoint.h>
+ #include <GraffitiShift.h>
+ #include <Event.h>
+ #include <ClipBoard.h>
+ #include <Control.h>
+ #include <Field.h>
+ #include <List.h>
+ #include <Table.h>
+ #include <Form.h>
+ #include <Menu.h>
+ #include <Category.h>
+ #include <Find.h>
+ #include <SelDay.h>
+ #include <SelTime.h>
+ #include <AboutBox.h>
+ 
+ 
+ #ifdef __cplusplus
+ }
+ #endif
+ 
diff -r -c -x *.orig -x *.rej -x #* -x *~ -N orig/gcc-2.7.2.2/PalmOS/UI/UICommon.h gcc-2.7.2.2/PalmOS/UI/UICommon.h
*** orig/gcc-2.7.2.2/PalmOS/UI/UICommon.h	Thu Jan  1 01:00:00 1970
--- gcc-2.7.2.2/PalmOS/UI/UICommon.h	Wed Feb 19 16:49:59 1997
***************
*** 0 ****
--- 1,225 ----
+ #ifndef __UICOMMON_H__
+ #define __UICOMMON_H__
+ 
+ enum justifications { leftAlign, centerAlign, rightAlign };
+ typedef enum justifications JustificationType;
+ 
+ //------------------------------------------------------------
+ // System functions 
+ //------------------------------------------------------------
+ #define min(a, b) (((a) < (b)) ? (a) : (b))
+ #define max(a, b) (((a) > (b)) ? (a) : (b))
+ 
+ 
+ 
+ //------------------------------------------------------------
+ // Temporary resource routines 
+ //------------------------------------------------------------
+ 
+ #define strRsc 								'tSTR'
+ #define ainRsc 								'tAIN'
+ #define iconType								'tAIB'
+ #define bitmapRsc 							'Tbmp'
+ #define alertRscType   						'Talt'
+ #define kbdRscType							'tkbd'
+ #define MenuRscType							'MBAR'
+ #define fontRscType							'NFNT'
+ #define verRsc									'tver'
+ #define appInfoStringsRsc					'tAIS'
+ 
+ 
+ // Application version string ID
+ #define appVersionID							1
+ #define ainID									1000
+ 
+ //	System version string ID - this is hidden in
+ //	the SystemVersion.rsrc resource, because the 'system' resources
+ //	don't have ResEdit formats.
+ #define systemVersionID						10000
+ 
+ // System bitmaps
+ #define palmLogoBitmap						10000
+ #define keyboardBackspaceBitmap			10001
+ #define keyboardTabBitmap					10002
+ #define keyboardReturnBitmap				10003
+ #define InformationAlertBitmap 			10004
+ #define ConfirmationAlertBitmap			10005
+ #define WarningAlertBitmap					10006
+ #define ErrorAlertBitmap					10007
+ #define keyboardShiftBitmap				10008
+ #define keyboardCapBitmap					10009
+ 
+ 
+ // System string resources
+ #define daysOfWeekStrID						10000
+ #define dayFullNamesStrID					10001
+ #define monthNamesStrID						10002
+ #define monthFullNamesStrID				10003
+ #define categoryAllStrID					10004
+ #define categoryEditStrID  				10005
+ #define menuCommandStrID					10006
+ #define launcherBatteryStrID				10007
+ #define systemNameStrID						10008
+ 
+ 
+ // System Alerts
+ #define RenameCategoryAlert				10000
+ #define RenameCategoryYes					0
+ #define RenameCategoryNo					1
+ 
+ #define RemoveCategoryAlert				10001
+ #define RemoveCategoryYes					0
+ #define RemoveCategoryNo					1
+ 
+ #define LowBatteryAlert						10002
+ #define VeryLowBatteryAlert				10003
+ #define UndoAlert								10004
+ #define UndoCancelButton					1
+ 
+ #define MergeCategoryAlert					10005
+ #define MergeCategoryYes					0
+ #define MergeCategoryNo						1
+ 
+ #define privateRecordInfoAlert			10006
+ 
+ #define ClipboardLimitAlert				10007
+ 
+ #define CategoryExistsAlert				10012
+ 
+ #define DeviceFullAlert						10013
+ 
+ 
+ // System Menu Bar and Menus
+ #define sysEditMenuID						10000
+ #define sysEditMenuUndoCmd					10000
+ #define sysEditMenuCutCmd					10001
+ #define sysEditMenuCopyCmd					10002
+ #define sysEditMenuPasteCmd				10003
+ #define sysEditMenuSelectAllCmd			10004
+ #define sysEditMenuSeparator				10005
+ #define sysEditMenuKeyboardCmd			10006
+ 
+ 
+ // Keyboard Menu Bar and Menus
+ #define sysKeyboardMenuID					10100
+ #define sysKeyboardEditUndoCmd			100
+ #define sysKeyboardEditCutCmd				101
+ #define sysKeyboardEditCopyCmd			102
+ #define sysKeyboardEditPasteCmd			103
+ #define sysKeyboardEditSelectAllCmd		104
+ 
+ 
+ // Note View Menu Bar and Menus
+ #define noteMenuID							10200
+ #define noteUndoCmd							10000
+ #define noteCutCmd							10001
+ #define noteCopyCmd							10002
+ #define notePasteCmd							10003
+ #define noteSelectAllCmd					10004
+ #define noteSeparator						10005
+ #define noteKeyboardCmd						10006
+ #define noteTopOfPageCmd					10200
+ #define noteBottomOfPageCmd				10201
+ 
+ 
+ // System Keyboard Dialog
+ #define SystemKeyboardID					10000
+ 
+ 
+ // Categories Edit Dialog
+ #define CategoriesEditForm					10000
+ #define CategoriesEditDoneButton			10002
+ #define CategoriesEditFirstField 		10004
+ 
+ 
+ // Date Selector Dialog
+ #define DateSelectorForm					10100
+ #define DateSelectorYearLabel				10102
+ #define DateSelectorPriorYearButton		10103
+ #define DateSelectorNextYearButton		10104
+ #define DateSelectorTodayButton			10118
+ #define DateSelectorCancelButton			10119
+ #define DateSelectorDayGadget				10120
+ 
+ 
+ // Time Selector Dialog
+ #define TimeSelectorForm					10200
+ #define TimeSelectorStartTimeButton		10204
+ #define TimeSelectorEndTimeButton		10205
+ #define TimeSelectorHourList				10206
+ #define TimeSelectorMinuteList			10207
+ #define TimeSelectorOKButton				10208
+ #define TimeSelectorCancelButton			10209
+ #define TimeSelectorNoTimeButton			10210
+ 
+ 
+ // Onscreen Keyboard
+ #define KeyboardForm							10300
+ #define KeyboardGadget						10310
+ 
+ // Help Dialog
+ #define HelpForm								10400
+ #define HelpField								10402
+ #define HelpDoneButton						10403
+ #define HelpUpButton							10404
+ #define HelpDownButton						10405
+ 
+ 
+ // Find Dialog
+ #define FindDialog							10500
+ #define FindStrField							10503
+ #define FindOKButton							10504
+ 
+ 
+ // Find Results Dialog
+ #define FindResultsDialog					10600
+ #define FindResultsMsgLabel				10602
+ #define FindResultsTable					10603
+ #define FindResultsGoToButton				10604
+ #define FindResultsCancelButton			10605
+ #define FindResultsMoreButton				10606
+ #define FindResultsSearchingStr			10607
+ #define FindResultsMatchesStr				10608
+ #define FindResultsNoMatchesStr			10609
+ #define FindResultsContinueStr			10610
+ 
+ 
+ // Note View (used by Datebook, To Do, and Address apps)
+ #define NoteView								10900
+ #define NoteField								10901
+ #define NoteDoneButton						10902
+ #define NoteSmallFontButton				10903
+ #define NoteLargeFontButton				10904
+ #define NoteDeleteButton					10905
+ #define NoteUpButton							10906
+ #define NoteDownButton						10907
+ #define NoteFontGroup						1
+ 
+ //	About Box - used by Datebook, Memo, Address, To Do, & others
+ #define aboutDialog							11000
+ #define aboutNameLabel						11001
+ #define aboutVersionLabel					11002
+ #define aboutErrorStr						11003
+ 
+ //------------------------------------------------------------
+ // Temporary resource routines 
+ //------------------------------------------------------------
+ 
+ void*		ResLoadForm (Word rscID)
+ 						SYS_TRAP(sysTrapResLoadForm);
+ 
+ void* 	ResLoadMenu (Word rscID)
+ 						SYS_TRAP(sysTrapResLoadMenu);
+ 
+ 
+ CharPtr	ResLoadString (Word rscID);
+ 
+ 
+ 
+ //------------------------------------------------------------
+ // Temporary debugging routines 
+ //------------------------------------------------------------
+ extern Boolean HeapDump (void);
+ 
+ 
+ #endif //__UICOMMON_H__
diff -r -c -x *.orig -x *.rej -x #* -x *~ -N orig/gcc-2.7.2.2/PalmOS/UI/UIGlobals.h gcc-2.7.2.2/PalmOS/UI/UIGlobals.h
*** orig/gcc-2.7.2.2/PalmOS/UI/UIGlobals.h	Thu Jan  1 01:00:00 1970
--- gcc-2.7.2.2/PalmOS/UI/UIGlobals.h	Wed Feb 19 16:49:59 1997
***************
*** 0 ****
--- 1,126 ----
+ /***********************************************************************
+  *
+  *      Copyright (c) Palm Computing 1994 -- All Rights Reserved
+  *
+  * PROJECT:  Pilot
+  * FILE:     Global.h
+  * AUTHOR:   Art Lamb: September 12, 1994
+  *
+  * DECLARER: UI
+  *
+  * DESCRIPTION:
+  *        This file defines global variables used by the UI routines.
+  *
+  **********************************************************************/
+ 
+ #ifndef __GLOBAL_H__
+ #define __GLOBAL_H__
+ 
+ 
+ #define 	UINumFonts  	7
+ #define 	eventQueueSize	10
+ 
+ 
+ typedef struct UIGlobalsType {
+ 
+ 	// Global variables used by the window routines.
+ 	WinHandle			activeWindow;
+ 	WinHandle			displayWindow;
+ 	WinHandle			drawWindow;
+ 	WinHandle			firstWindow;
+ 	WinHandle			exitWindowID;
+ 	WinHandle			enterWindowID;
+ 	WinHandle			exitedWindowID;
+ 	GraphicStateType	gState;
+ 	
+ 	
+ 	// Global variables used by the event routines.
+ 	EventType*			eventQ;
+ 	Word					eventQIndex;
+ 	Word					eventQLength;
+ 	SWord      			lastScreenX;
+ 	SWord      			lastScreenY;
+ 	Boolean    			lastPenDown;
+ 	SDWord				needNullTickCount;		// We want a null Evt when ticks reaches this value
+ 	
+ 	
+ 	// Global variables used by the font routins.
+ 	FontPtr 				uiCurrentFontPtr;
+ 	FontPtr 				uiFontTable[UINumFonts];
+ 	FontID  				uiCurrentFontID;
+ 	
+ 	
+ 	// Global variables used by the form routines.
+ 	FormPtr 				currentForm;
+ 	
+ 	
+ 	// Global variables used by the insertion point routines.
+ 	Boolean				insPtIsEnabled;
+ 	Boolean				insPtOn;
+ 	PointType			insPtLoc;
+ 	SWord					insPtHeight;
+ 	SDWord				insPtLastTick;
+ 	WinHandle			insPtBitsBehind;
+ 	
+ 	// Global variables used by the clipboard routines.
+ 	ClipboardItem 		clipboard[numClipboardForamts];
+ 	
+ 	// Globals used by the Memory Manager
+ 	MenuBarPtr			uiCurrentMenu;
+ 	
+ 	// Global variables used by the field routines.
+ 	FieldUndoType 		undoGlobals;
+ 
+ 	// Global variables used by the Griffiti shift state indicator routines.
+ 	Byte					gsiState;
+ 	Boolean				gsiIsEnabled;
+ 	PointType			gsiLocation;
+ 	
+ 	} UIGlobalsType;
+ typedef UIGlobalsType* 	UIGlobalsPtr;
+ 
+ 
+ #define	ActiveWindow		((UIGlobalsPtr)GUIGlobalsP)->activeWindow
+ #define	DisplayWindow		((UIGlobalsPtr)GUIGlobalsP)->displayWindow
+ #define	DrawWindow			((UIGlobalsPtr)GUIGlobalsP)->drawWindow
+ #define	FirstWindow			((UIGlobalsPtr)GUIGlobalsP)->firstWindow
+ #define	ExitWindowID		((UIGlobalsPtr)GUIGlobalsP)->exitWindowID
+ #define	EnterWindowID		((UIGlobalsPtr)GUIGlobalsP)->enterWindowID
+ #define	ExitedWindowID		((UIGlobalsPtr)GUIGlobalsP)->exitedWindowID
+ #define	GState				((UIGlobalsPtr)GUIGlobalsP)->gState
+ 
+ #define	EventQ				((UIGlobalsPtr)GUIGlobalsP)->eventQ
+ #define	EventQIndex			((UIGlobalsPtr)GUIGlobalsP)->eventQIndex
+ #define	EventQLength		((UIGlobalsPtr)GUIGlobalsP)->eventQLength
+ #define	LastScreenX			((UIGlobalsPtr)GUIGlobalsP)->lastScreenX
+ #define	LastScreenY			((UIGlobalsPtr)GUIGlobalsP)->lastScreenY
+ #define	LastPenDown			((UIGlobalsPtr)GUIGlobalsP)->lastPenDown
+ #define	NeedNullTickCount	((UIGlobalsPtr)GUIGlobalsP)->needNullTickCount
+ 
+ #define	UICurrentFontPtr	((UIGlobalsPtr)GUIGlobalsP)->uiCurrentFontPtr
+ #define	UIFontTable			((UIGlobalsPtr)GUIGlobalsP)->uiFontTable
+ #define	UICurrentFontID	((UIGlobalsPtr)GUIGlobalsP)->uiCurrentFontID
+ 
+ #define	CurrentForm			((UIGlobalsPtr)GUIGlobalsP)->currentForm
+ 
+ #define	InsPtIsEnabled		((UIGlobalsPtr)GUIGlobalsP)->insPtIsEnabled
+ #define	InsPtOn				((UIGlobalsPtr)GUIGlobalsP)->insPtOn
+ #define	InsPtLoc				((UIGlobalsPtr)GUIGlobalsP)->insPtLoc
+ #define	InsPtHeight			((UIGlobalsPtr)GUIGlobalsP)->insPtHeight
+ #define	InsPtLastTick		((UIGlobalsPtr)GUIGlobalsP)->insPtLastTick
+ #define	InsPtBitsBehind	((UIGlobalsPtr)GUIGlobalsP)->insPtBitsBehind
+ 
+ #define	Clipboard			((UIGlobalsPtr)GUIGlobalsP)->clipboard
+ 
+ #define	UICurrentMenu		((UIGlobalsPtr)GUIGlobalsP)->uiCurrentMenu
+ 
+ #define	UndoGlobals			((UIGlobalsPtr)GUIGlobalsP)->undoGlobals
+ 
+ #define	GsiState				((UIGlobalsPtr)GUIGlobalsP)->gsiState
+ #define	GsiIsEnabled			((UIGlobalsPtr)GUIGlobalsP)->gsiIsEnabled
+ #define	GsiLocation			((UIGlobalsPtr)GUIGlobalsP)->gsiLocation
+ 
+ 
+ #endif //__GLOBAL_H__
+ 
+ 
diff -r -c -x *.orig -x *.rej -x #* -x *~ -N orig/gcc-2.7.2.2/PalmOS/UI/Window.h gcc-2.7.2.2/PalmOS/UI/Window.h
*** orig/gcc-2.7.2.2/PalmOS/UI/Window.h	Thu Jan  1 01:00:00 1970
--- gcc-2.7.2.2/PalmOS/UI/Window.h	Wed Feb 19 16:49:59 1997
***************
*** 0 ****
--- 1,338 ----
+ /***********************************************************************
+  *
+  *      Copyright (c) Palm Computing 1994 -- All Rights Reserved
+  *
+  * PROJECT:  Pilot
+  * FILE:     window.h
+  * AUTHOR:       Art Lamb: September 12, 1994
+  *
+  * DECLARER: UI
+  *
+  * DESCRIPTION:
+  *        This file defines window structures and routines.
+  *
+  **********************************************************************/
+ #ifndef __WINDOW_H__
+ #define __WINDOW_H__
+ 
+ 
+ enum directions { up = 0, down, left, right };
+ typedef enum directions DirectionType;
+ 
+ 
+ enum windowFormats { screenFormat = 0, genericFormat };
+ typedef enum windowFormats WindowFormatType;
+ 
+ 
+ //enum graphicModes { drawMode = 0, eraseMode, invertMode, mergeMode};
+ //typedef enum graphicModes GraphicModeType;
+ typedef enum {scrCopy, scrAND, scrANDNOT, scrXOR, scrOR, scrCopyNOT} ScrOperation;
+ 
+ 
+ enum patterns { blackPattern, whitePattern, grayPattern, customPattern };
+ typedef enum patterns PatternType;
+ 
+ #define grayHLinePattern	0xAA
+ 
+ enum underlineModes { noUnderline, grayUnderline, solidUnderline };
+ typedef enum underlineModes UnderlineModeType;
+ 
+ 
+ 
+ typedef struct {
+ 	Word compressed:1;  	// Data format:  0=raw; 1=compressed
+ 	Word reserved :15;
+ } BitmapFlagsType;
+ 
+ 
+ typedef struct {
+ 	Word  					width;
+ 	Word  					height;
+ 	Word  					rowBytes;
+ 	BitmapFlagsType		flags;
+ 	Word	 					reserved [4];
+ } BitmapType;
+ 
+ 
+ 
+ typedef BitmapType * BitmapPtr;
+ 
+ typedef Word CustomPatternType [4];
+ 
+ typedef struct {
+ 	ScrOperation		grafMode;
+ 	Boolean				patternMode;
+ 	PatternType			pattern;
+ 	CustomPatternType	customPtn;
+ 	FontID				fontId;
+ 	FontPtr           font;
+ 	UnderlineModeType	underlineMode;
+ } GraphicStateType;
+ 
+ typedef GraphicStateType * GraphicStatePtr;
+ 
+ 
+ typedef union {
+ 	struct {
+ 		Word cornerDiam   : 8;            // corner diameter, max 38
+ 		Word reserved     : 4;     
+ 		Word shadowWidth  : 2;            // Width of shadow
+ 		Word width        : 2;            // Width frame
+ 	} bits;
+ 	Word word;
+ } FrameBitsType;
+ 
+ typedef Word FrameType;
+ 
+ //  Standard Frame Types
+ #define noFrame         0
+ #define simpleFrame     1
+ #define rectangleFrame  1
+ #define roundFrame      0x0401          // corner = 7, frame = 1
+ #define boldRoundFrame  0x0702          // corner = 7, frame = 2
+ #define popupFrame      0x0205          // corner = 2,  frame = 1, shadow = 1
+ #define dialogFrame     0x0302          // corner = 3,  frame = 2
+ #define menuFrame       popupFrame
+ 
+ 
+ typedef struct {
+ 	Word format:1;      // window format:  0=screen mode; 1=generic mode
+ 	Word offscreen:1;   // offscreen flag: 0=onscreen ; 1=offscreen
+ 	Word modal:1;       // modal flag:     0=modeless window; 1=modal window
+ 	Word focusable:1;   // focusable flag: 0=non-focusable; 1=focusable
+ 	Word enabled:1;     // enabled flag:   0=disabled; 1=enabled
+ 	Word visible:1;     // visible flag:   0-invisible; 1=visible
+ 	Word dialog:1;      // dialog flag:    0=non-dialog; 1=dialog
+ 	Word compressed:1;	// compressed flag:  0=uncompressed; 1=compressed
+ 	Word reserved :8;
+ } WindowFlagsType;
+ 
+ 
+ typedef struct WinTypeStruct {
+   Word							displayWidth;
+   Word							displayHeight;
+   VoidPtr						displayAddr;
+   WindowFlagsType				windowFlags;
+   RectangleType				windowBounds;
+   AbsRectType					clippingBounds;
+   PointType						viewOrigin;
+   FrameBitsType   			frameType;
+   GraphicStatePtr				gstate;
+   struct WinTypeStruct *	nextWindow;
+ } WindowType;
+ 
+ typedef WindowType * WinPtr;
+ typedef WinPtr   		WinHandle;
+ 
+  
+ 
+ 
+ 
+ //-----------------------------------------------
+ //  Macros
+ //-----------------------------------------------
+ 
+ // For now, the window handle is a pointer to a window structure,
+ // this however may change, so use the following macros. 
+ 
+ #define WinGetWindowPointer(winHandle) ((WinPtr) winHandle)
+ 
+ #define WinGetWindowHandle(winPtr) ((WinHandle) winPtr)
+ 
+ 
+ //-----------------------------------------------
+ // Routines relating to windows management       
+ //-----------------------------------------------
+ 
+ extern WinHandle WinCreateWindow (RectanglePtr bounds, FrameType frame, 
+ 	Boolean modal, Boolean focusable, WordPtr error)
+ 							SYS_TRAP(sysTrapWinCreateWindow);
+ 
+ extern WinHandle WinCreateOffscreenWindow (SWord width, SWord height, 
+ 	WindowFormatType format, WordPtr error)
+ 							SYS_TRAP(sysTrapWinCreateOffscreenWindow);
+ 
+ extern void WinDeleteWindow (WinHandle winHandle, Boolean eraseIt)
+ 							SYS_TRAP(sysTrapWinDeleteWindow);
+ 
+ extern void WinInitializeWindow (WinHandle winHandle)
+ 							SYS_TRAP(sysTrapWinInitializeWindow);
+ 
+ extern void WinAddWindow (WinHandle winHandle)
+ 							SYS_TRAP(sysTrapWinAddWindow);
+ 
+ extern void WinRemoveWindow (WinHandle winHandle)
+ 							SYS_TRAP(sysTrapWinRemoveWindow);
+ 
+ extern void WinSetActiveWindow (WinHandle winHandle)
+ 							SYS_TRAP(sysTrapWinSetActiveWindow);
+ 
+ extern WinHandle WinSetDrawWindow (WinHandle winHandle)
+ 							SYS_TRAP(sysTrapWinSetDrawWindow);
+ 
+ extern WinHandle WinGetDrawWindow (void)
+ 							SYS_TRAP(sysTrapWinGetDrawWindow);
+ 
+ extern WinHandle WinGetActiveWindow (void)
+ 							SYS_TRAP(sysTrapWinGetActiveWindow);
+ 
+ extern WinHandle WinGetDisplayWindow (void)
+ 							SYS_TRAP(sysTrapWinGetDisplayWindow);
+ 
+ extern WinHandle WinGetFirstWindow (void)
+ 							SYS_TRAP(sysTrapWinGetFirstWindow);
+ 
+ extern void WinEnableWindow (WinHandle winHandle)
+ 							SYS_TRAP(sysTrapWinEnableWindow);
+ 
+ extern void WinDisableWindow (WinHandle winHandle)
+ 							SYS_TRAP(sysTrapWinDisableWindow);
+ 
+ extern void WinGetWindowFrameRect (WinHandle winHandle, RectanglePtr r)
+ 							SYS_TRAP(sysTrapWinGetWindowFrameRect);
+ 
+ extern void WinDrawWindowFrame (void)
+ 							SYS_TRAP(sysTrapWinDrawWindowFrame);
+ 
+ extern void WinEraseWindow (void)
+ 							SYS_TRAP(sysTrapWinEraseWindow);
+ 
+ extern WinHandle WinSaveBits (RectanglePtr source, WordPtr error)
+ 							SYS_TRAP(sysTrapWinSaveBits);
+ 
+ extern void WinRestoreBits (WinHandle winHandle, SWord destX, SWord destY)
+ 							SYS_TRAP(sysTrapWinRestoreBits);
+ 
+ extern void WinCopyRectangle (WinHandle srcWin, WinHandle dstWin, 
+ 	RectanglePtr srcRect, SWord destX, SWord destY, ScrOperation mode)
+ 							SYS_TRAP(sysTrapWinCopyRectangle);
+ 
+ extern void WinScrollRectangle
+  (RectanglePtr r, enum directions direction, SWord distance, 
+   RectanglePtr vacated)
+ 							SYS_TRAP(sysTrapWinScrollRectangle);
+ 
+ extern void WinGetDisplayExtent (SWordPtr extentX, SWordPtr extentY)
+ 							SYS_TRAP(sysTrapWinGetDisplayExtent);
+ 
+ extern void WinGetWindowBounds (RectanglePtr r)
+ 							SYS_TRAP(sysTrapWinGetWindowBounds);
+ 
+ extern void WinGetWindowExtent (SWordPtr extentX, SWordPtr extentY)
+ 							SYS_TRAP(sysTrapWinGetWindowExtent);
+ 
+ extern void WinDisplayToWindowPt (SWordPtr extentX, SWordPtr extentY)
+ 							SYS_TRAP(sysTrapWinDisplayToWindowPt);
+ 
+ extern void WinWindowToDisplayPt (SWordPtr extentX, SWordPtr extentY)
+ 							SYS_TRAP(sysTrapWinWindowToDisplayPt);
+ 
+ extern void WinGetClip (RectanglePtr r)
+ 							SYS_TRAP(sysTrapWinGetClip);
+ 
+ extern void WinSetClip (RectanglePtr r)
+ 							SYS_TRAP(sysTrapWinSetClip);
+ 
+ extern void WinResetClip (void)
+ 							SYS_TRAP(sysTrapWinResetClip);
+ 
+ extern void WinClipRectangle (RectanglePtr r)
+ 							SYS_TRAP(sysTrapWinClipRectangle);
+ 
+ extern Boolean WinModal (WinHandle winHandle)
+ 							SYS_TRAP(sysTrapWinModal);
+ 
+ //-----------------------------------------------
+ // Routines to draw shapes or frames shapes      
+ //-----------------------------------------------
+ 
+ extern void WinDrawLine (SWord x1, SWord y1, SWord x2, SWord y2)
+ 							SYS_TRAP(sysTrapWinDrawLine);
+ 
+ extern void WinDrawGrayLine (SWord x1, SWord y1, SWord x2, SWord y2)
+ 							SYS_TRAP(sysTrapWinDrawGrayLine);
+ 
+ extern void WinEraseLine (SWord x1, SWord y1, SWord x2, SWord y2)
+ 							SYS_TRAP(sysTrapWinEraseLine);
+ 
+ extern void WinInvertLine (SWord x1, SWord y1, SWord x2, SWord y2)
+ 							SYS_TRAP(sysTrapWinInvertLine);
+ 
+ extern void WinFillLine (SWord x1, SWord y1, SWord x2, SWord y2)
+ 							SYS_TRAP(sysTrapWinFillLine);
+ 
+ extern void WinDrawRectangle (RectanglePtr r, Word cornerDiam)
+ 							SYS_TRAP(sysTrapWinDrawRectangle);
+ 
+ extern void WinEraseRectangle (RectanglePtr r, Word cornerDiam)
+ 							SYS_TRAP(sysTrapWinEraseRectangle);
+ 
+ extern void WinInvertRectangle (RectanglePtr r, Word cornerDiam)
+ 							SYS_TRAP(sysTrapWinInvertRectangle);
+ 
+ extern void WinFillRectangle (RectanglePtr r, Word cornerDiam)
+ 							SYS_TRAP(sysTrapWinFillRectangle);
+ 
+ extern void WinDrawRectangleFrame (FrameType frame, RectanglePtr r)
+ 							SYS_TRAP(sysTrapWinDrawRectangleFrame);
+ 
+ extern void WinDrawGrayRectangleFrame (FrameType frame, RectanglePtr r)
+ 							SYS_TRAP(sysTrapWinDrawGrayRectangleFrame);
+ 
+ extern void WinEraseRectangleFrame (FrameType frame, RectanglePtr r)
+ 							SYS_TRAP(sysTrapWinEraseRectangleFrame);
+ 
+ extern void WinInvertRectangleFrame (FrameType frame, RectanglePtr r)
+ 							SYS_TRAP(sysTrapWinInvertRectangleFrame);
+ 
+ extern void WinGetFramesRectangle (FrameType  frame, RectanglePtr r, 
+ 	RectanglePtr obscuredRect)
+ 							SYS_TRAP(sysTrapWinGetFramesRectangle);
+ 
+ 
+ 
+ //-----------------------------------------------
+ // Routines relating to characters               
+ //-----------------------------------------------
+ 
+ extern void WinDrawChars (CharPtr chars, Word len, SWord x, SWord y)
+ 							SYS_TRAP(sysTrapWinDrawChars);
+ 
+ extern void WinDrawInvertedChars (CharPtr chars, Word len, SWord x, SWord y)
+ 							SYS_TRAP(sysTrapWinDrawInvertedChars);
+ 
+ extern void WinEraseChars (CharPtr chars, Word len, SWord x, SWord y)
+ 							SYS_TRAP(sysTrapWinEraseChars);
+ 
+ extern void WinInvertChars (CharPtr chars, Word len, SWord x, SWord y)
+ 							SYS_TRAP(sysTrapWinInvertChars);
+ 
+ extern UnderlineModeType WinSetUnderlineMode (UnderlineModeType mode)
+ 							SYS_TRAP(sysTrapWinSetUnderlineMode);
+ 
+ 
+ //-----------------------------------------------
+ // Routines to control patterns                  
+ //-----------------------------------------------
+ 
+ extern void WinGetPattern (CustomPatternType)
+ 							SYS_TRAP(sysTrapWinGetPattern);
+ 
+ extern void WinSetPattern (CustomPatternType)
+ 							SYS_TRAP(sysTrapWinSetPattern);
+ 
+ //extern void WinSetPatternXferMode (enum patternXferModes mode);
+ 
+ //extern enum patternXferModes WinGetPatternXferMode (void);
+ 
+ 
+ //-----------------------------------------------
+ // Routines relating to bitmaps            
+ //-----------------------------------------------
+ extern void WinDrawBitmap (BitmapPtr bitmapP, SWord x, SWord y)
+ 							SYS_TRAP(sysTrapWinDrawBitmap);
+ 
+ 
+ #endif //__WINDOW_H__
+ 
+ 
diff -r -c -x *.orig -x *.rej -x #* -x *~ -N orig/gcc-2.7.2.2/PalmOS/setjmp.h gcc-2.7.2.2/PalmOS/setjmp.h
*** orig/gcc-2.7.2.2/PalmOS/setjmp.h	Thu Jan  1 01:00:00 1970
--- gcc-2.7.2.2/PalmOS/setjmp.h	Wed Feb 19 16:16:09 1997
***************
*** 0 ****
--- 1 ----
+ 
diff -r -c -x *.orig -x *.rej -x #* -x *~ -N orig/gcc-2.7.2.2/c-common.c gcc-2.7.2.2/c-common.c
*** orig/gcc-2.7.2.2/c-common.c	Fri Oct 20 00:18:29 1995
--- gcc-2.7.2.2/c-common.c	Wed Feb 19 14:14:59 1997
***************
*** 31,37 ****
  
  enum attrs {A_PACKED, A_NOCOMMON, A_NORETURN, A_CONST, A_T_UNION,
  	    A_CONSTRUCTOR, A_DESTRUCTOR, A_MODE, A_SECTION, A_ALIGNED,
! 	    A_UNUSED, A_FORMAT, A_WEAK, A_ALIAS};
  
  static void declare_hidden_char_array	PROTO((char *, char *));
  static void add_attribute		PROTO((enum attrs, char *,
--- 31,41 ----
  
  enum attrs {A_PACKED, A_NOCOMMON, A_NORETURN, A_CONST, A_T_UNION,
  	    A_CONSTRUCTOR, A_DESTRUCTOR, A_MODE, A_SECTION, A_ALIGNED,
! 	    A_UNUSED, A_FORMAT, A_WEAK, A_ALIAS
! #ifdef PALMOS
! 	    , A_SYSTRAP
! #endif
! };
  
  static void declare_hidden_char_array	PROTO((char *, char *));
  static void add_attribute		PROTO((enum attrs, char *,
***************
*** 248,253 ****
--- 252,260 ----
  static void
  init_attributes ()
  {
+ #ifdef PALMOS
+   add_attribute (A_SYSTRAP, "systrap", 0, 1, 1);
+ #endif
    add_attribute (A_PACKED, "packed", 0, 0, 0);
    add_attribute (A_NOCOMMON, "nocommon", 0, 0, 1);
    add_attribute (A_NORETURN, "noreturn", 0, 0, 1);
***************
*** 464,469 ****
--- 471,515 ----
  		}
  	    }
  	  break;
+ 
+ #ifdef PALMOS
+ 	case A_SYSTRAP:	  
+ 	  if (TREE_CODE (decl) == FUNCTION_DECL)
+ 	    {
+ 	      char buffer[22];
+ 	      tree trap_expr = TREE_VALUE (args);
+ 	      
+ 	      if (TREE_CODE (trap_expr) == IDENTIFIER_NODE)
+ 		{
+ 		  trap_expr = IDENTIFIER_GLOBAL_VALUE (trap_expr);
+ 		  if (TREE_CODE (trap_expr) == CONST_DECL)
+ 		    trap_expr = DECL_INITIAL (trap_expr);
+ 		}
+ 
+ 	      /* Strip any NOPs of any kind.  */
+ 	      while (TREE_CODE (trap_expr) == NOP_EXPR
+ 		   || TREE_CODE (trap_expr) == CONVERT_EXPR
+ 		   || TREE_CODE (trap_expr) == NON_LVALUE_EXPR)
+ 		trap_expr = TREE_OPERAND (trap_expr, 0);
+ 	  
+ 	      if (TREE_CODE (trap_expr) != INTEGER_CST)
+ 		{
+ 		  error ("trap number is not a constant");
+ 		  continue;
+ 		}
+ 
+ 	      sprintf (buffer, "*trap #15; dc.w 0x%04x",
+ 		       TREE_INT_CST_LOW (trap_expr));
+ 	      DECL_ASSEMBLER_NAME (decl) = get_identifier (buffer);
+ 	    }
+ 	  else
+ 	    {
+ 	      error_with_decl (node,
+ 			       "systrap attribute not allowed for `%s'");
+ 	    }
+ 	  break;
+ 	  
+ #endif
  
  	case A_SECTION:
  #ifdef ASM_OUTPUT_SECTION_NAME
diff -r -c -x *.orig -x *.rej -x #* -x *~ -N orig/gcc-2.7.2.2/c-lex.c gcc-2.7.2.2/c-lex.c
*** orig/gcc-2.7.2.2/c-lex.c	Thu Jun 15 13:11:39 1995
--- gcc-2.7.2.2/c-lex.c	Fri Feb 14 12:39:22 1997
***************
*** 69,74 ****
--- 69,78 ----
  /* File used for outputting assembler code.  */
  extern FILE *asm_out_file;
  
+ /* Warn about multi-character char constants */
+ 
+ extern int warn_multi_char_constant;
+ 
  #ifndef WCHAR_TYPE_SIZE
  #ifdef INT_TYPE_SIZE
  #define WCHAR_TYPE_SIZE INT_TYPE_SIZE
***************
*** 1665,1671 ****
  #endif
  	  }
  	else
! 	  max_chars = TYPE_PRECISION (integer_type_node) / width;
  
  	while (1)
  	  {
--- 1669,1675 ----
  #endif
  	  }
  	else
! 	  max_chars = TYPE_PRECISION (long_integer_type_node) / width;
  
  	while (1)
  	  {
***************
*** 1729,1735 ****
  	    num_chars = max_chars;
  	    error ("character constant too long");
  	  }
! 	else if (num_chars != 1 && ! flag_traditional)
  	  warning ("multi-character character constant");
  
  	/* If char type is signed, sign-extend the constant.  */
--- 1733,1740 ----
  	    num_chars = max_chars;
  	    error ("character constant too long");
  	  }
! 	else if (num_chars != 1 && 
! 		 !(flag_traditional || !warn_multi_char_constant))
  	  warning ("multi-character character constant");
  
  	/* If char type is signed, sign-extend the constant.  */
***************
*** 1750,1756 ****
  		= build_int_2 (result | ~((unsigned HOST_WIDE_INT) ~0
  					  >> (HOST_BITS_PER_WIDE_INT - num_bits)),
  			       -1);
! 	    TREE_TYPE (yylval.ttype) = integer_type_node;
  	  }
  	else
  	  {
--- 1755,1761 ----
  		= build_int_2 (result | ~((unsigned HOST_WIDE_INT) ~0
  					  >> (HOST_BITS_PER_WIDE_INT - num_bits)),
  			       -1);
! 	    TREE_TYPE (yylval.ttype) = long_integer_type_node;
  	  }
  	else
  	  {
diff -r -c -x *.orig -x *.rej -x #* -x *~ -N orig/gcc-2.7.2.2/calls.c gcc-2.7.2.2/calls.c
*** orig/gcc-2.7.2.2/calls.c	Fri Oct 27 02:53:43 1995
--- gcc-2.7.2.2/calls.c	Wed Feb  5 00:04:01 1997
***************
*** 2264,2269 ****
--- 2264,2273 ----
    /* library calls are never indirect calls.  */
    int current_call_is_indirect = 0;
  
+ #ifdef PALMOS
+   SYMBOL_REF_FLAG (orgfun) = 1;
+ #endif
+ 
    VA_START (p, nargs);
  
  #ifndef __STDC__
***************
*** 2543,2548 ****
--- 2547,2556 ----
    /* library calls are never indirect calls.  */
    int current_call_is_indirect = 0;
    int is_const;
+ 
+ #ifdef PALMOS
+   SYMBOL_REF_FLAG (orgfun) = 1;
+ #endif
  
    VA_START (p, nargs);
  
diff -r -c -x *.orig -x *.rej -x #* -x *~ -N orig/gcc-2.7.2.2/config/m68k/fpexcept.c gcc-2.7.2.2/config/m68k/fpexcept.c
*** orig/gcc-2.7.2.2/config/m68k/fpexcept.c	Thu Jan  1 01:00:00 1970
--- gcc-2.7.2.2/config/m68k/fpexcept.c	Fri Feb  7 11:55:28 1997
***************
*** 0 ****
--- 1,44 ----
+ /* Definitions of software floating point exeptions
+    Copyright (C) 1997 Free Software Foundation, Inc.
+ 
+ This file is part of GNU CC.
+ 
+ GNU CC is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2, or (at your option)
+ any later version.
+ 
+ GNU CC is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ GNU General Public License for more details.
+ 
+ You should have received a copy of the GNU General Public License
+ along with GNU CC; see the file COPYING.  If not, write to
+ the Free Software Foundation, 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA.  */
+ 
+ 
+ 
+ extern struct m68881_fpCCR _fpCCR;
+ 
+ void (*__fp_exception_handler_ptr)(struct m68881_fpCCR*) = 0;
+ 
+ void
+ __fp_exception (struct m68881_fpCCR* ccr)
+ {
+   if (__fp_exception_handler_ptr == 0)
+     asm volatile ("move.l %0,sp@-; trap #15" : : "g" (ccr));
+   else
+     (*__fp_exception_handler_ptr) (ccr);
+ }
+ 
+ struct m68881_fpCCR*
+ __fp_exception_handler (void (*h) (struct m68881_fpCCR*))
+ {
+   struct m68881_fpCCR* old = __fp_exception_handler_ptr;
+   __fp_exception_handler_ptr = h;
+   return old;
+ }
+ 
+ 
diff -r -c -x *.orig -x *.rej -x #* -x *~ -N orig/gcc-2.7.2.2/config/m68k/fpgnulib.c gcc-2.7.2.2/config/m68k/fpgnulib.c
*** orig/gcc-2.7.2.2/config/m68k/fpgnulib.c	Fri Mar 10 20:04:02 1995
--- gcc-2.7.2.2/config/m68k/fpgnulib.c	Tue Feb  4 15:27:51 1997
***************
*** 107,113 ****
  
  /* convert int to double */
  double
! __floatsidf (int a1)
  {
    long sign = 0, exp = 31 + EXCESSD;
    union double_long dl;
--- 107,113 ----
  
  /* convert int to double */
  double
! __floatsidf (long a1)
  {
    long sign = 0, exp = 31 + EXCESSD;
    union double_long dl;
***************
*** 124,130 ****
        a1 = -a1;
        if (a1 < 0)
  	{
! 	  dl.l.upper = SIGNBIT | ((32 + EXCESSD) << 20L);
  	  dl.l.lower = 0;
  	  return dl.d;
          }
--- 124,130 ----
        a1 = -a1;
        if (a1 < 0)
  	{
! 	  dl.l.upper = SIGNBIT | ((32L + EXCESSD) << 20L);
  	  dl.l.lower = 0;
  	  return dl.d;
          }
***************
*** 153,159 ****
  
  /* convert int to float */
  float
! __floatsisf (int l)
  {
    double foo = __floatsidf (l);
    return foo;
--- 153,159 ----
  
  /* convert int to float */
  float
! __floatsisf (long l)
  {
    double foo = __floatsidf (l);
    return foo;
***************
*** 222,228 ****
  }
  
  /* convert double to int */
! int
  __fixdfsi (double a1)
  {
    register union double_long dl1;
--- 222,228 ----
  }
  
  /* convert double to int */
! long
  __fixdfsi (double a1)
  {
    register union double_long dl1;
***************
*** 254,260 ****
  }
  
  /* convert float to int */
! int
  __fixsfsi (float a1)
  {
    double foo = a1;
--- 254,260 ----
  }
  
  /* convert float to int */
! long
  __fixsfsi (float a1)
  {
    double foo = a1;
***************
*** 268,279 ****
     We assume all numbers are normalized, don't do any rounding, etc.  */
  
  /* Prototypes for the above in case we use them.  */
! double __floatsidf (int);
! float __floatsisf (int);
  double __extendsfdf2 (float);
  float __truncdfsf2 (double);
! int __fixdfsi (double);
! int __fixsfsi (float);
  
  /* convert double to long double */
  long double
--- 268,279 ----
     We assume all numbers are normalized, don't do any rounding, etc.  */
  
  /* Prototypes for the above in case we use them.  */
! double __floatsidf (long);
! float __floatsisf (long);
  double __extendsfdf2 (float);
  float __truncdfsf2 (double);
! long __fixdfsi (double);
! long __fixsfsi (float);
  
  /* convert double to long double */
  long double
diff -r -c -x *.orig -x *.rej -x #* -x *~ -N orig/gcc-2.7.2.2/config/m68k/lb1sf68palmos.asm gcc-2.7.2.2/config/m68k/lb1sf68palmos.asm
*** orig/gcc-2.7.2.2/config/m68k/lb1sf68palmos.asm	Thu Jan  1 01:00:00 1970
--- gcc-2.7.2.2/config/m68k/lb1sf68palmos.asm	Fri Feb 21 02:20:45 1997
***************
*** 0 ****
--- 1,3069 ----
+ /* libgcc1 routines for 68000 w/o floating-point hardware. */
+ /* Copyright (C) 1994 Free Software Foundation, Inc.
+ 
+ This file is free software; you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by the
+ Free Software Foundation; either version 2, or (at your option) any
+ later version.
+ 
+ In addition to the permissions in the GNU General Public License, the
+ Free Software Foundation gives you unlimited permission to link the
+ compiled version of this file with other programs, and to distribute
+ those programs without any restriction coming from the use of this
+ file.  (The General Public License restrictions do apply in other
+ respects; for example, they cover modification of the file, and
+ distribution when not linked into another program.)
+ 
+ This file is distributed in the hope that it will be useful, but
+ WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ General Public License for more details.
+ 
+ You should have received a copy of the GNU General Public License
+ along with this program; see the file COPYING.  If not, write to
+ the Free Software Foundation, 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA.  */
+ 
+ /* As a special exception, if you link this library with files
+    compiled with GCC to produce an executable, this does not cause
+    the resulting executable to be covered by the GNU General Public License.
+    This exception does not however invalidate any other reasons why
+    the executable file might be covered by the GNU General Public License.  */
+ 
+ /* Use this one for any 680x0; assumes no floating point hardware.
+    The trailing " '" appearing on some lines is for ANSI preprocessors.  Yuk.
+    Some of this code comes from MINIX, via the folks at ericsson.
+    D. V. Henkel-Wallace (gumby@cygnus.com) Fete Bastille, 1992
+ */
+ 
+ /* These are predefined by new versions of GNU cpp.  */
+ 
+ #ifndef __USER_LABEL_PREFIX__
+ #define __USER_LABEL_PREFIX__ _
+ #endif
+ 
+ #ifndef __REGISTER_PREFIX__
+ #define __REGISTER_PREFIX__
+ #endif
+ 
+ #ifndef __IMMEDIATE_PREFIX__
+ #define __IMMEDIATE_PREFIX__ #
+ #endif
+ 
+ /* ANSI concatenation macros.  */
+ 
+ #define CONCAT1(a, b) CONCAT2(a, b)
+ #define CONCAT2(a, b) a ## b
+ 
+ /* Use the right prefix for global labels.  */
+ 
+ #define SYM(x) CONCAT1 (__USER_LABEL_PREFIX__, x)
+ 
+ /* Use the right prefix for registers.  */
+ 
+ #define REG(x) CONCAT1 (__REGISTER_PREFIX__, x)
+ 
+ /* Use the right prefix for immediate values.  */
+ 
+ #define IMM(x) CONCAT1 (__IMMEDIATE_PREFIX__, x)
+ 
+ #define d0 REG (d0)
+ #define d1 REG (d1)
+ #define d2 REG (d2)
+ #define d3 REG (d3)
+ #define d4 REG (d4)
+ #define d5 REG (d5)
+ #define d6 REG (d6)
+ #define d7 REG (d7)
+ #define a0 REG (a0)
+ #define a1 REG (a1)
+ #define a2 REG (a2)
+ #define a3 REG (a3)
+ #define a4 REG (a4)
+ #define a5 REG (a5)
+ #define a6 REG (a6)
+ #define fp REG (fp)
+ #define sp REG (sp)
+ 
+ #ifdef L_floatex
+ 
+ | This is an attempt at a decent floating point (single, double and 
+ | extended double) code for the GNU C compiler. It should be easy to
+ | adapt to other compilers (but beware of the local labels!).
+ 
+ | Starting date: 21 October, 1990
+ 
+ | It is convenient to introduce the notation (s,e,f) for a floating point
+ | number, where s=sign, e=exponent, f=fraction. We will call a floating
+ | point number fpn to abbreviate, independently of the precision.
+ | Let MAX_EXP be in each case the maximum exponent (255 for floats, 1023 
+ | for doubles and 16383 for long doubles). We then have the following 
+ | different cases:
+ |  1. Normalized fpns have 0 < e < MAX_EXP. They correspond to 
+ |     (-1)^s x 1.f x 2^(e-bias-1).
+ |  2. Denormalized fpns have e=0. They correspond to numbers of the form
+ |     (-1)^s x 0.f x 2^(-bias).
+ |  3. +/-INFINITY have e=MAX_EXP, f=0.
+ |  4. Quiet NaN (Not a Number) have all bits set.
+ |  5. Signaling NaN (Not a Number) have s=0, e=MAX_EXP, f=1.
+ 
+ |=============================================================================
+ |                                  exceptions
+ |=============================================================================
+ 
+ | This is the floating point condition code register (_fpCCR):
+ |
+ | struct {
+ |   short _exception_bits;	
+ |   short _trap_enable_bits;	
+ |   short _sticky_bits;
+ |   short _rounding_mode;
+ |   short _format;
+ |   short _last_operation;
+ |   union {
+ |     float sf;
+ |     double df;
+ |   } _operand1;
+ |   union {
+ |     float sf;
+ |     double df;
+ |   } _operand2;
+ | } _fpCCR;
+ 
+ 	.data
+ 	.even
+ 
+ 	.globl	SYM (_fpCCR)
+ 	
+ SYM (_fpCCR):
+ __exception_bits:
+ 	.word	0
+ __trap_enable_bits:
+ 	.word	0
+ __sticky_bits:
+ 	.word	0
+ __rounding_mode:
+ 	.word	ROUND_TO_NEAREST
+ __format:
+ 	.word	NIL
+ __last_operation:
+ 	.word	NOOP
+ __operand1:
+ 	.long	0
+ 	.long	0
+ __operand2:
+ 	.long 	0
+ 	.long	0
+ 
+ | Offsets:
+ EBITS  = __exception_bits - SYM (_fpCCR)
+ TRAPE  = __trap_enable_bits - SYM (_fpCCR)
+ STICK  = __sticky_bits - SYM (_fpCCR)
+ ROUND  = __rounding_mode - SYM (_fpCCR)
+ FORMT  = __format - SYM (_fpCCR)
+ LASTO  = __last_operation - SYM (_fpCCR)
+ OPER1  = __operand1 - SYM (_fpCCR)
+ OPER2  = __operand2 - SYM (_fpCCR)
+ 
+ | The following exception types are supported:
+ INEXACT_RESULT 		= 0x0001
+ UNDERFLOW 		= 0x0002
+ OVERFLOW 		= 0x0004
+ DIVIDE_BY_ZERO 		= 0x0008
+ INVALID_OPERATION 	= 0x0010
+ 
+ | The allowed rounding modes are:
+ UNKNOWN           = -1
+ ROUND_TO_NEAREST  = 0 | round result to nearest representable value
+ ROUND_TO_ZERO     = 1 | round result towards zero
+ ROUND_TO_PLUS     = 2 | round result towards plus infinity
+ ROUND_TO_MINUS    = 3 | round result towards minus infinity
+ 
+ | The allowed values of format are:
+ NIL          = 0
+ SINGLE_FLOAT = 1
+ DOUBLE_FLOAT = 2
+ LONG_FLOAT   = 3
+ 
+ | The allowed values for the last operation are:
+ NOOP         = 0
+ ADD          = 1
+ MULTIPLY     = 2
+ DIVIDE       = 3
+ NEGATE       = 4
+ COMPARE      = 5
+ EXTENDSFDF   = 6
+ TRUNCDFSF    = 7
+ 
+ |=============================================================================
+ |                           __clear_sticky_bits
+ |=============================================================================
+ 
+ | The sticky bits are normally not cleared (thus the name), whereas the 
+ | exception type and exception value reflect the last computation. 
+ | This routine is provided to clear them (you can also write to _fpCCR,
+ | since it is globally visible).
+ 
+ 	.globl  SYM (__clear_sticky_bit)
+ 
+ 	.text
+ 	.even
+ 
+ | void __clear_sticky_bits(void);
+ SYM (__clear_sticky_bit):		
+ 	lea	SYM (_fpCCR),a0
+ |ifdef PALMOS
+ 	subl	IMM (edata),a0
+ 	addl	a5,a0
+ |endif PALMOS	
+ 	movew	IMM (0),a0@(STICK)
+ 	rts
+ 
+ |=============================================================================
+ |                           $_exception_handler
+ |=============================================================================
+ 
+ 	.globl  $_exception_handler
+ 
+ 	.text
+ 	.even
+ 
+ | This is the common exit point if an exception occurs.
+ | NOTE: it is NOT callable from C!
+ | It expects the exception type in d7, the format (SINGLE_FLOAT,
+ | DOUBLE_FLOAT or LONG_FLOAT) in d6, and the last operation code in d5.
+ | It sets the corresponding exception and sticky bits, and the format. 
+ | Depending on the format if fills the corresponding slots for the 
+ | operands which produced the exception (all this information is provided
+ | so if you write your own exception handlers you have enough information
+ | to deal with the problem).
+ | Then checks to see if the corresponding exception is trap-enabled, 
+ | in which case it pushes the address of _fpCCR and traps through 
+ | trap FPTRAP (15 for the moment).
+ 
+ FPTRAP = 15
+ 
+ $_exception_handler:
+ 	lea	SYM (_fpCCR),a0
+ |ifdef PALMOS
+ 	subl	IMM (edata),a0
+ 	addl	a5,a0
+ |endif PALMOS	
+ 	movew	d7,a0@(EBITS)	| set __exception_bits
+ 	orw	d7,a0@(STICK)	| and __sticky_bits
+ 	movew	d6,a0@(FORMT)	| and __format
+ 	movew	d5,a0@(LASTO)	| and __last_operation
+ 
+ | Now put the operands in place:
+ 	cmpw	IMM (SINGLE_FLOAT),d6
+ 	beq	1f
+ 	movel	a6@(8),a0@(OPER1)
+ 	movel	a6@(12),a0@(OPER1+4)
+ 	movel	a6@(16),a0@(OPER2)
+ 	movel	a6@(20),a0@(OPER2+4)
+ 	bra	2f
+ 1:	movel	a6@(8),a0@(OPER1)
+ 	movel	a6@(12),a0@(OPER2)
+ 2:
+ | And check whether the exception is trap-enabled:
+ 	andw	a0@(TRAPE),d7	| is exception trap-enabled?
+ 	beq	1f		| no, exit
+ |ifdef PALMOS
+ 	lea	SYM (_fpCCR),a0
+ 	subl	IMM (edata),a0
+ 	addl	a5,a0
+ 	movl	a0,sp@-
+ |endif PALMOS	
+ 	trap	IMM (FPTRAP)	| and trap
+ 1:	moveml	sp@+,d2-d7	| restore data registers
+ 	unlk	a6		| and return
+ 	rts
+ #endif /* L_floatex */
+ 
+ #ifdef  L_mulsi3
+ 	.text
+ 	.proc
+ 	.globl	SYM (__mulsi3)
+ SYM (__mulsi3):
+ 	movew	sp@(4), d0	/* x0 -> d0 */
+ 	muluw	sp@(10), d0	/* x0*y1 */
+ 	movew	sp@(6), d1	/* x1 -> d1 */
+ 	muluw	sp@(8), d1	/* x1*y0 */
+ 	addw	d1, d0
+ 	swap	d0
+ 	clrw	d0
+ 	movew	sp@(6), d1	/* x1 -> d1 */
+ 	muluw	sp@(10), d1	/* x1*y1 */
+ 	addl	d1, d0
+ 
+ 	rts
+ #endif /* L_mulsi3 */
+ 
+ #ifdef  L_udivsi3
+ 	.text
+ 	.proc
+ 	.globl	SYM (__udivsi3)
+ SYM (__udivsi3):
+ 	movel	d2, sp@-
+ 	movel	sp@(12), d1	/* d1 = divisor */
+ 	movel	sp@(8), d0	/* d0 = dividend */
+ 
+ 	cmpl	IMM (0x10000), d1 /* divisor >= 2 ^ 16 ?   */
+ 	jcc	L3		/* then try next algorithm */
+ 	movel	d0, d2
+ 	clrw	d2
+ 	swap	d2
+ 	divu	d1, d2          /* high quotient in lower word */
+ 	movew	d2, d0		/* save high quotient */
+ 	swap	d0
+ 	movew	sp@(10), d2	/* get low dividend + high rest */
+ 	divu	d1, d2		/* low quotient */
+ 	movew	d2, d0
+ 	jra	L6
+ 
+ L3:	movel	d1, d2		/* use d2 as divisor backup */
+ L4:	lsrl	IMM (1), d1	/* shift divisor */
+ 	lsrl	IMM (1), d0	/* shift dividend */
+ 	cmpl	IMM (0x10000), d1 /* still divisor >= 2 ^ 16 ?  */
+ 	jcc	L4
+ 	divu	d1, d0		/* now we have 16 bit divisor */
+ 	andl	IMM (0xffff), d0 /* mask out divisor, ignore remainder */
+ 
+ /* Multiply the 16 bit tentative quotient with the 32 bit divisor.  Because of
+    the operand ranges, this might give a 33 bit product.  If this product is
+    greater than the dividend, the tentative quotient was too large. */
+ 	movel	d2, d1
+ 	mulu	d0, d1		/* low part, 32 bits */
+ 	swap	d2
+ 	mulu	d0, d2		/* high part, at most 17 bits */
+ 	swap	d2		/* align high part with low part */
+ 	btst	IMM (0), d2	/* high part 17 bits? */
+ 	jne	L5		/* if 17 bits, quotient was too large */
+ 	addl	d2, d1		/* add parts */
+ 	jcs	L5		/* if sum is 33 bits, quotient was too large */
+ 	cmpl	sp@(8), d1	/* compare the sum with the dividend */
+ 	jls	L6		/* if sum > dividend, quotient was too large */
+ L5:	subql	IMM (1), d0	/* adjust quotient */
+ 
+ L6:	movel	sp@+, d2
+ 	rts
+ #endif /* L_udivsi3 */
+ 
+ #ifdef  L_divsi3
+ 	.text
+ 	.proc
+ 	.globl	SYM (__divsi3)
+ SYM (__divsi3):
+ 	movel	d2, sp@-
+ 
+ 	moveb	IMM (1), d2	/* sign of result stored in d2 (=1 or =-1) */
+ 	movel	sp@(12), d1	/* d1 = divisor */
+ 	jpl	L1
+ 	negl	d1
+ 	negb	d2		/* change sign because divisor <0  */
+ L1:	movel	sp@(8), d0	/* d0 = dividend */
+ 	jpl	L2
+ 	negl	d0
+ 	negb	d2
+ 
+ L2:	movel	d1, sp@-
+ 	movel	d0, sp@-
+ 	bsr	SYM (__udivsi3)	/* divide abs(dividend) by abs(divisor) */
+ 	addql	IMM (8), sp
+ 
+ 	tstb	d2
+ 	jpl	L3
+ 	negl	d0
+ 
+ L3:	movel	sp@+, d2
+ 	rts
+ #endif /* L_divsi3 */
+ 
+ #ifdef  L_umodsi3
+ 	.text
+ 	.proc
+ 	.globl	SYM (__umodsi3)
+ SYM (__umodsi3):
+ 	movel	sp@(8), d1	/* d1 = divisor */
+ 	movel	sp@(4), d0	/* d0 = dividend */
+ 	movel	d1, sp@-
+ 	movel	d0, sp@-
+ 	bsr	SYM (__udivsi3)
+ 	addql	IMM (8), sp
+ 	movel	sp@(8), d1	/* d1 = divisor */
+ 	movel	d1, sp@-
+ 	movel	d0, sp@-
+ 	bsr	SYM (__mulsi3)	/* d0 = (a/b)*b */
+ 	addql	IMM (8), sp
+ 	movel	sp@(4), d1	/* d1 = dividend */
+ 	subl	d0, d1		/* d1 = a - (a/b)*b */
+ 	movel	d1, d0
+ 	rts
+ #endif /* L_umodsi3 */
+ 
+ #ifdef  L_modsi3
+ 	.text
+ 	.proc
+ 	.globl	SYM (__modsi3)
+ SYM (__modsi3):
+ 	movel	sp@(8), d1	/* d1 = divisor */
+ 	movel	sp@(4), d0	/* d0 = dividend */
+ 	movel	d1, sp@-
+ 	movel	d0, sp@-
+ 	bsr	SYM (__divsi3)
+ 	addql	IMM (8), sp
+ 	movel	sp@(8), d1	/* d1 = divisor */
+ 	movel	d1, sp@-
+ 	movel	d0, sp@-
+ 	bsr	SYM (__mulsi3)	/* d0 = (a/b)*b */
+ 	addql	IMM (8), sp
+ 	movel	sp@(4), d1	/* d1 = dividend */
+ 	subl	d0, d1		/* d1 = a - (a/b)*b */
+ 	movel	d1, d0
+ 	rts
+ #endif /* L_modsi3 */
+ 
+ 
+ #ifdef  L_double
+ 
+ 	.globl	SYM (_fpCCR)
+ 	.globl  $_exception_handler
+ 
+ QUIET_NaN      = 0xffffffff
+ 
+ D_MAX_EXP      = 0x07ff
+ D_BIAS         = 1022
+ DBL_MAX_EXP    = D_MAX_EXP - D_BIAS
+ DBL_MIN_EXP    = 1 - D_BIAS
+ DBL_MANT_DIG   = 53
+ 
+ INEXACT_RESULT 		= 0x0001
+ UNDERFLOW 		= 0x0002
+ OVERFLOW 		= 0x0004
+ DIVIDE_BY_ZERO 		= 0x0008
+ INVALID_OPERATION 	= 0x0010
+ 
+ DOUBLE_FLOAT = 2
+ 
+ NOOP         = 0
+ ADD          = 1
+ MULTIPLY     = 2
+ DIVIDE       = 3
+ NEGATE       = 4
+ COMPARE      = 5
+ EXTENDSFDF   = 6
+ TRUNCDFSF    = 7
+ 
+ UNKNOWN           = -1
+ ROUND_TO_NEAREST  = 0 | round result to nearest representable value
+ ROUND_TO_ZERO     = 1 | round result towards zero
+ ROUND_TO_PLUS     = 2 | round result towards plus infinity
+ ROUND_TO_MINUS    = 3 | round result towards minus infinity
+ 
+ | Entry points:
+ 
+ 	.globl SYM (__adddf3)
+ 	.globl SYM (__subdf3)
+ 	.globl SYM (__muldf3)
+ 	.globl SYM (__divdf3)
+ 	.globl SYM (__negdf2)
+ 	.globl SYM (__cmpdf2)
+ 
+ 	.text
+ 	.even
+ 
+ | These are common routines to return and signal exceptions.	
+ 
+ Ld$den:
+ | Return and signal a denormalized number
+ 	orl	d7,d0
+ 	movew	IMM (UNDERFLOW),d7
+ 	orw	IMM (INEXACT_RESULT),d7
+ 	movew	IMM (DOUBLE_FLOAT),d6
+ 	jmp	$_exception_handler(%pc)
+ 
+ Ld$infty:
+ Ld$overflow:
+ | Return a properly signed INFINITY and set the exception flags 
+ 	movel	IMM (0x7ff00000),d0
+ 	movel	IMM (0),d1
+ 	orl	d7,d0
+ 	movew	IMM (OVERFLOW),d7
+ 	orw	IMM (INEXACT_RESULT),d7
+ 	movew	IMM (DOUBLE_FLOAT),d6
+ 	jmp	$_exception_handler(%pc)
+ 
+ Ld$underflow:
+ | Return 0 and set the exception flags 
+ 	movel	IMM (0),d0
+ 	movel	d0,d1
+ 	movew	IMM (UNDERFLOW),d7
+ 	orw	IMM (INEXACT_RESULT),d7
+ 	movew	IMM (DOUBLE_FLOAT),d6
+ 	jmp	$_exception_handler(%pc)
+ 
+ Ld$inop:
+ | Return a quiet NaN and set the exception flags
+ 	movel	IMM (QUIET_NaN),d0
+ 	movel	d0,d1
+ 	movew	IMM (INVALID_OPERATION),d7
+ 	orw	IMM (INEXACT_RESULT),d7
+ 	movew	IMM (DOUBLE_FLOAT),d6
+ 	jmp	$_exception_handler(%pc)
+ 
+ Ld$div$0:
+ | Return a properly signed INFINITY and set the exception flags
+ 	movel	IMM (0x7ff00000),d0
+ 	movel	IMM (0),d1
+ 	orl	d7,d0
+ 	movew	IMM (DIVIDE_BY_ZERO),d7
+ 	orw	IMM (INEXACT_RESULT),d7
+ 	movew	IMM (DOUBLE_FLOAT),d6
+ 	jmp	$_exception_handler(%pc)
+ 
+ |=============================================================================
+ |=============================================================================
+ |                         double precision routines
+ |=============================================================================
+ |=============================================================================
+ 
+ | A double precision floating point number (double) has the format:
+ |
+ | struct _double {
+ |  unsigned int sign      : 1;  /* sign bit */ 
+ |  unsigned int exponent  : 11; /* exponent, shifted by 126 */
+ |  unsigned int fraction  : 52; /* fraction */
+ | } double;
+ | 
+ | Thus sizeof(double) = 8 (64 bits). 
+ |
+ | All the routines are callable from C programs, and return the result 
+ | in the register pair d0-d1. They also preserve all registers except 
+ | d0-d1 and a0-a1.
+ 
+ |=============================================================================
+ |                              __subdf3
+ |=============================================================================
+ 
+ | double __subdf3(double, double);
+ SYM (__subdf3):
+ 	bchg	IMM (31),sp@(12) | change sign of second operand
+ 				| and fall through, so we always add
+ |=============================================================================
+ |                              __adddf3
+ |=============================================================================
+ 
+ | double __adddf3(double, double);
+ SYM (__adddf3):
+ 	link	a6,IMM (0)	| everything will be done in registers
+ 	moveml	d2-d7,sp@-	| save all data registers and a2 (but d0-d1)
+ 	movel	a6@(8),d0	| get first operand
+ 	movel	a6@(12),d1	| 
+ 	movel	a6@(16),d2	| get second operand
+ 	movel	a6@(20),d3	| 
+ 
+ 	movel	d0,d7		| get d0's sign bit in d7 '
+ 	addl	d1,d1		| check and clear sign bit of a, and gain one
+ 	addxl	d0,d0		| bit of extra precision
+ 	beq	Ladddf$b	| if zero return second operand
+ 
+ 	movel	d2,d6		| save sign in d6 
+ 	addl	d3,d3		| get rid of sign bit and gain one bit of
+ 	addxl	d2,d2		| extra precision
+ 	beq	Ladddf$a	| if zero return first operand
+ 
+ 	andl	IMM (0x80000000),d7 | isolate a's sign bit '
+         swap	d6		| and also b's sign bit '
+ 	andw	IMM (0x8000),d6	|
+ 	orw	d6,d7		| and combine them into d7, so that a's sign '
+ 				| bit is in the high word and b's is in the '
+ 				| low word, so d6 is free to be used
+ 	movel	d7,a0		| now save d7 into a0, so d7 is free to
+                 		| be used also
+ 
+ | Get the exponents and check for denormalized and/or infinity.
+ 
+ 	movel	IMM (0x001fffff),d6 | mask for the fraction
+ 	movel	IMM (0x00200000),d7 | mask to put hidden bit back
+ 
+ 	movel	d0,d4		| 
+ 	andl	d6,d0		| get fraction in d0
+ 	notl	d6		| make d6 into mask for the exponent
+ 	andl	d6,d4		| get exponent in d4
+ 	beq	Ladddf$a$den	| branch if a is denormalized
+ 	cmpl	d6,d4		| check for INFINITY or NaN
+ 	beq	Ladddf$nf       | 
+ 	orl	d7,d0		| and put hidden bit back
+ Ladddf$1:
+ 	swap	d4		| shift right exponent so that it starts
+ 	lsrw	IMM (5),d4	| in bit 0 and not bit 20
+ | Now we have a's exponent in d4 and fraction in d0-d1 '
+ 	movel	d2,d5		| save b to get exponent
+ 	andl	d6,d5		| get exponent in d5
+ 	beq	Ladddf$b$den	| branch if b is denormalized
+ 	cmpl	d6,d5		| check for INFINITY or NaN
+ 	beq	Ladddf$nf
+ 	notl	d6		| make d6 into mask for the fraction again
+ 	andl	d6,d2		| and get fraction in d2
+ 	orl	d7,d2		| and put hidden bit back
+ Ladddf$2:
+ 	swap	d5		| shift right exponent so that it starts
+ 	lsrw	IMM (5),d5	| in bit 0 and not bit 20
+ 
+ | Now we have b's exponent in d5 and fraction in d2-d3. '
+ 
+ | The situation now is as follows: the signs are combined in a0, the 
+ | numbers are in d0-d1 (a) and d2-d3 (b), and the exponents in d4 (a)
+ | and d5 (b). To do the rounding correctly we need to keep all the
+ | bits until the end, so we need to use d0-d1-d2-d3 for the first number
+ | and d4-d5-d6-d7 for the second. To do this we store (temporarily) the
+ | exponents in a2-a3.
+ 
+ 	moveml	a2-a3,sp@-	| save the address registers
+ 
+ 	movel	d4,a2		| save the exponents
+ 	movel	d5,a3		| 
+ 
+ 	movel	IMM (0),d7	| and move the numbers around
+ 	movel	d7,d6		|
+ 	movel	d3,d5		|
+ 	movel	d2,d4		|
+ 	movel	d7,d3		|
+ 	movel	d7,d2		|
+ 
+ | Here we shift the numbers until the exponents are the same, and put 
+ | the largest exponent in a2.
+ 	exg	d4,a2		| get exponents back
+ 	exg	d5,a3		|
+ 	cmpw	d4,d5		| compare the exponents
+ 	beq	Ladddf$3	| if equal don't shift '
+ 	bhi	9f		| branch if second exponent is higher
+ 
+ | Here we have a's exponent larger than b's, so we have to shift b. We do 
+ | this by using as counter d2:
+ 1:	movew	d4,d2		| move largest exponent to d2
+ 	subw	d5,d2		| and subtract second exponent
+ 	exg	d4,a2		| get back the longs we saved
+ 	exg	d5,a3		|
+ | if difference is too large we don't shift (actually, we can just exit) '
+ 	cmpw	IMM (DBL_MANT_DIG+2),d2
+ 	bge	Ladddf$b$small
+ 	cmpw	IMM (32),d2	| if difference >= 32, shift by longs
+ 	bge	5f
+ 2:	cmpw	IMM (16),d2	| if difference >= 16, shift by words	
+ 	bge	6f
+ 	bra	3f		| enter dbra loop
+ 
+ 4:	lsrl	IMM (1),d4
+ 	roxrl	IMM (1),d5
+ 	roxrl	IMM (1),d6
+ 	roxrl	IMM (1),d7
+ 3:	dbra	d2,4b
+ 	movel	IMM (0),d2
+ 	movel	d2,d3	
+ 	bra	Ladddf$4
+ 5:
+ 	movel	d6,d7
+ 	movel	d5,d6
+ 	movel	d4,d5
+ 	movel	IMM (0),d4
+ 	subw	IMM (32),d2
+ 	bra	2b
+ 6:
+ 	movew	d6,d7
+ 	swap	d7
+ 	movew	d5,d6
+ 	swap	d6
+ 	movew	d4,d5
+ 	swap	d5
+ 	movew	IMM (0),d4
+ 	swap	d4
+ 	subw	IMM (16),d2
+ 	bra	3b
+ 	
+ 9:	exg	d4,d5
+ 	movew	d4,d6
+ 	subw	d5,d6		| keep d5 (largest exponent) in d4
+ 	exg	d4,a2
+ 	exg	d5,a3
+ | if difference is too large we don't shift (actually, we can just exit) '
+ 	cmpw	IMM (DBL_MANT_DIG+2),d6
+ 	bge	Ladddf$a$small
+ 	cmpw	IMM (32),d6	| if difference >= 32, shift by longs
+ 	bge	5f
+ 2:	cmpw	IMM (16),d6	| if difference >= 16, shift by words	
+ 	bge	6f
+ 	bra	3f		| enter dbra loop
+ 
+ 4:	lsrl	IMM (1),d0
+ 	roxrl	IMM (1),d1
+ 	roxrl	IMM (1),d2
+ 	roxrl	IMM (1),d3
+ 3:	dbra	d6,4b
+ 	movel	IMM (0),d7
+ 	movel	d7,d6
+ 	bra	Ladddf$4
+ 5:
+ 	movel	d2,d3
+ 	movel	d1,d2
+ 	movel	d0,d1
+ 	movel	IMM (0),d0
+ 	subw	IMM (32),d6
+ 	bra	2b
+ 6:
+ 	movew	d2,d3
+ 	swap	d3
+ 	movew	d1,d2
+ 	swap	d2
+ 	movew	d0,d1
+ 	swap	d1
+ 	movew	IMM (0),d0
+ 	swap	d0
+ 	subw	IMM (16),d6
+ 	bra	3b
+ Ladddf$3:
+ 	exg	d4,a2	
+ 	exg	d5,a3
+ Ladddf$4:	
+ | Now we have the numbers in d0--d3 and d4--d7, the exponent in a2, and
+ | the signs in a4.
+ 
+ | Here we have to decide whether to add or subtract the numbers:
+ 	exg	d7,a0		| get the signs 
+ 	exg	d6,a3		| a3 is free to be used
+ 	movel	d7,d6		|
+ 	movew	IMM (0),d7	| get a's sign in d7 '
+ 	swap	d6              |
+ 	movew	IMM (0),d6	| and b's sign in d6 '
+ 	eorl	d7,d6		| compare the signs
+ 	bmi	Lsubdf$0	| if the signs are different we have 
+ 				| to subtract
+ 	exg	d7,a0		| else we add the numbers
+ 	exg	d6,a3		|
+ 	addl	d7,d3		|
+ 	addxl	d6,d2		|
+ 	addxl	d5,d1		| 
+ 	addxl	d4,d0           |
+ 
+ 	movel	a2,d4		| return exponent to d4
+ 	movel	a0,d7		| 
+ 	andl	IMM (0x80000000),d7 | d7 now has the sign
+ 
+ 	moveml	sp@+,a2-a3	
+ 
+ | Before rounding normalize so bit #DBL_MANT_DIG is set (we will consider
+ | the case of denormalized numbers in the rounding routine itself).
+ | As in the addition (not in the subtraction!) we could have set 
+ | one more bit we check this:
+ 	btst	IMM (DBL_MANT_DIG+1),d0	
+ 	beq	1f
+ 	lsrl	IMM (1),d0
+ 	roxrl	IMM (1),d1
+ 	roxrl	IMM (1),d2
+ 	roxrl	IMM (1),d3
+ 	addw	IMM (1),d4
+ 1:
+ 	lea	Ladddf$5(%pc),a0	| to return from rounding routine
+ 	lea	SYM (_fpCCR),a1	| check the rounding mode
+ |ifdef PALMOS
+ 	subl	IMM (edata),a1
+ 	addl	a5,a1
+ |endif PALMOS	
+ 	movew	a1@(6),d6	| rounding mode in d6
+ 	beq	Lround$to$nearest
+ 	cmpw	IMM (ROUND_TO_PLUS),d6
+ 	bhi	Lround$to$minus
+ 	blt	Lround$to$zero
+ 	bra	Lround$to$plus
+ Ladddf$5:
+ | Put back the exponent and check for overflow
+ 	cmpw	IMM (0x7ff),d4	| is the exponent big?
+ 	bge	1f
+ 	bclr	IMM (DBL_MANT_DIG-1),d0
+ 	lslw	IMM (4),d4	| put exponent back into position
+ 	swap	d0		| 
+ 	orw	d4,d0		|
+ 	swap	d0		|
+ 	bra	Ladddf$ret
+ 1:
+ 	movew	IMM (ADD),d5
+ 	bra	Ld$overflow
+ 
+ Lsubdf$0:
+ | Here we do the subtraction.
+ 	exg	d7,a0		| put sign back in a0
+ 	exg	d6,a3		|
+ 	subl	d7,d3		|
+ 	subxl	d6,d2		|
+ 	subxl	d5,d1		|
+ 	subxl	d4,d0		|
+ 	beq	Ladddf$ret$1	| if zero just exit
+ 	bpl	1f		| if positive skip the following
+ 	exg	d7,a0		|
+ 	bchg	IMM (31),d7	| change sign bit in d7
+ 	exg	d7,a0		|
+ 	negl	d3		|
+ 	negxl	d2		|
+ 	negxl	d1              | and negate result
+ 	negxl	d0              |
+ 1:	
+ 	movel	a2,d4		| return exponent to d4
+ 	movel	a0,d7
+ 	andl	IMM (0x80000000),d7 | isolate sign bit
+ 	moveml	sp@+,a2-a3	|
+ 
+ | Before rounding normalize so bit #DBL_MANT_DIG is set (we will consider
+ | the case of denormalized numbers in the rounding routine itself).
+ | As in the addition (not in the subtraction!) we could have set 
+ | one more bit we check this:
+ 	btst	IMM (DBL_MANT_DIG+1),d0	
+ 	beq	1f
+ 	lsrl	IMM (1),d0
+ 	roxrl	IMM (1),d1
+ 	roxrl	IMM (1),d2
+ 	roxrl	IMM (1),d3
+ 	addw	IMM (1),d4
+ 1:
+ 	lea	Lsubdf$1(%pc),a0	| to return from rounding routine
+ 	lea	SYM (_fpCCR),a1	| check the rounding mode
+ |ifdef PALMOS
+ 	subl	IMM (edata),a1
+ 	addl	a5,a1
+ |endif PALMOS	
+ 	movew	a1@(6),d6	| rounding mode in d6
+ 	beq	Lround$to$nearest
+ 	cmpw	IMM (ROUND_TO_PLUS),d6
+ 	bhi	Lround$to$minus
+ 	blt	Lround$to$zero
+ 	bra	Lround$to$plus
+ Lsubdf$1:
+ | Put back the exponent and sign (we don't have overflow). '
+ 	bclr	IMM (DBL_MANT_DIG-1),d0	
+ 	lslw	IMM (4),d4	| put exponent back into position
+ 	swap	d0		| 
+ 	orw	d4,d0		|
+ 	swap	d0		|
+ 	bra	Ladddf$ret
+ 
+ | If one of the numbers was too small (difference of exponents >= 
+ | DBL_MANT_DIG+1) we return the other (and now we don't have to '
+ | check for finiteness or zero).
+ Ladddf$a$small:
+ 	moveml	sp@+,a2-a3	
+ 	movel	a6@(16),d0
+ 	movel	a6@(20),d1
+ 	lea	SYM (_fpCCR),a0
+ |ifdef PALMOS
+ 	subl	IMM (edata),a0
+ 	addl	a5,a0
+ |endif PALMOS	
+ 	movew	IMM (0),a0@
+ 	moveml	sp@+,d2-d7	| restore data registers
+ 	unlk	a6		| and return
+ 	rts
+ 
+ Ladddf$b$small:
+ 	moveml	sp@+,a2-a3	
+ 	movel	a6@(8),d0
+ 	movel	a6@(12),d1
+ 	lea	SYM (_fpCCR),a0
+ |ifdef PALMOS
+ 	subl	IMM (edata),a0
+ 	addl	a5,a0
+ |endif PALMOS	
+ 	movew	IMM (0),a0@
+ 	moveml	sp@+,d2-d7	| restore data registers
+ 	unlk	a6		| and return
+ 	rts
+ 
+ Ladddf$a$den:
+ 	movel	d7,d4		| d7 contains 0x00200000
+ 	bra	Ladddf$1
+ 
+ Ladddf$b$den:
+ 	movel	d7,d5           | d7 contains 0x00200000
+ 	notl	d6
+ 	bra	Ladddf$2
+ 
+ Ladddf$b:
+ | Return b (if a is zero)
+ 	movel	d2,d0
+ 	movel	d3,d1
+ 	bra	1f
+ Ladddf$a:
+ 	movel	a6@(8),d0
+ 	movel	a6@(12),d1
+ 1:
+ 	movew	IMM (ADD),d5
+ | Check for NaN and +/-INFINITY.
+ 	movel	d0,d7         		|
+ 	andl	IMM (0x80000000),d7	|
+ 	bclr	IMM (31),d0		|
+ 	cmpl	IMM (0x7ff00000),d0	|
+ 	bge	2f			|
+ 	movel	d0,d0           	| check for zero, since we don't  '
+ 	bne	Ladddf$ret		| want to return -0 by mistake
+ 	bclr	IMM (31),d7		|
+ 	bra	Ladddf$ret		|
+ 2:
+ 	andl	IMM (0x000fffff),d0	| check for NaN (nonzero fraction)
+ 	orl	d1,d0			|
+ 	bne	Ld$inop         	|
+ 	bra	Ld$infty		|
+ 	
+ Ladddf$ret$1:
+ 	moveml	sp@+,a2-a3	| restore regs and exit
+ 
+ Ladddf$ret:
+ | Normal exit.
+ 	lea	SYM (_fpCCR),a0
+ |ifdef PALMOS
+ 	subl	IMM (edata),a0
+ 	addl	a5,a0
+ |endif PALMOS	
+ 	movew	IMM (0),a0@
+ 	orl	d7,d0		| put sign bit back
+ 	moveml	sp@+,d2-d7
+ 	unlk	a6
+ 	rts
+ 
+ Ladddf$ret$den:
+ | Return a denormalized number.
+ 	lsrl	IMM (1),d0	| shift right once more
+ 	roxrl	IMM (1),d1	|
+ 	bra	Ladddf$ret
+ 
+ Ladddf$nf:
+ 	movew	IMM (ADD),d5
+ | This could be faster but it is not worth the effort, since it is not
+ | executed very often. We sacrifice speed for clarity here.
+ 	movel	a6@(8),d0	| get the numbers back (remember that we
+ 	movel	a6@(12),d1	| did some processing already)
+ 	movel	a6@(16),d2	| 
+ 	movel	a6@(20),d3	| 
+ 	movel	IMM (0x7ff00000),d4 | useful constant (INFINITY)
+ 	movel	d0,d7		| save sign bits
+ 	movel	d2,d6		| 
+ 	bclr	IMM (31),d0	| clear sign bits
+ 	bclr	IMM (31),d2	| 
+ | We know that one of them is either NaN of +/-INFINITY
+ | Check for NaN (if either one is NaN return NaN)
+ 	cmpl	d4,d0		| check first a (d0)
+ 	bhi	Ld$inop		| if d0 > 0x7ff00000 or equal and
+ 	bne	2f
+ 	tstl	d1		| d1 > 0, a is NaN
+ 	bne	Ld$inop		| 
+ 2:	cmpl	d4,d2		| check now b (d1)
+ 	bhi	Ld$inop		| 
+ 	bne	3f
+ 	tstl	d3		| 
+ 	bne	Ld$inop		| 
+ 3:
+ | Now comes the check for +/-INFINITY. We know that both are (maybe not
+ | finite) numbers, but we have to check if both are infinite whether we
+ | are adding or subtracting them.
+ 	eorl	d7,d6		| to check sign bits
+ 	bmi	1f
+ 	andl	IMM (0x80000000),d7 | get (common) sign bit
+ 	bra	Ld$infty
+ 1:
+ | We know one (or both) are infinite, so we test for equality between the
+ | two numbers (if they are equal they have to be infinite both, so we
+ | return NaN).
+ 	cmpl	d2,d0		| are both infinite?
+ 	bne	1f		| if d0 <> d2 they are not equal
+ 	cmpl	d3,d1		| if d0 == d2 test d3 and d1
+ 	beq	Ld$inop		| if equal return NaN
+ 1:	
+ 	andl	IMM (0x80000000),d7 | get a's sign bit '
+ 	cmpl	d4,d0		| test now for infinity
+ 	beq	Ld$infty	| if a is INFINITY return with this sign
+ 	bchg	IMM (31),d7	| else we know b is INFINITY and has
+ 	bra	Ld$infty	| the opposite sign
+ 
+ |=============================================================================
+ |                              __muldf3
+ |=============================================================================
+ 
+ | double __muldf3(double, double);
+ SYM (__muldf3):
+ 	link	a6,IMM (0)
+ 	moveml	d2-d7,sp@-
+ 	movel	a6@(8),d0		| get a into d0-d1
+ 	movel	a6@(12),d1		| 
+ 	movel	a6@(16),d2		| and b into d2-d3
+ 	movel	a6@(20),d3		|
+ 	movel	d0,d7			| d7 will hold the sign of the product
+ 	eorl	d2,d7			|
+ 	andl	IMM (0x80000000),d7	|
+ 	movel	d7,a0			| save sign bit into a0 
+ 	movel	IMM (0x7ff00000),d7	| useful constant (+INFINITY)
+ 	movel	d7,d6			| another (mask for fraction)
+ 	notl	d6			|
+ 	bclr	IMM (31),d0		| get rid of a's sign bit '
+ 	movel	d0,d4			| 
+ 	orl	d1,d4			| 
+ 	beq	Lmuldf$a$0		| branch if a is zero
+ 	movel	d0,d4			|
+ 	bclr	IMM (31),d2		| get rid of b's sign bit '
+ 	movel	d2,d5			|
+ 	orl	d3,d5			| 
+ 	beq	Lmuldf$b$0		| branch if b is zero
+ 	movel	d2,d5			| 
+ 	cmpl	d7,d0			| is a big?
+ 	bhi	Lmuldf$inop		| if a is NaN return NaN
+ 	beq	Lmuldf$a$nf		| we still have to check d1 and b ...
+ 	cmpl	d7,d2			| now compare b with INFINITY
+ 	bhi	Lmuldf$inop		| is b NaN?
+ 	beq	Lmuldf$b$nf 		| we still have to check d3 ...
+ | Here we have both numbers finite and nonzero (and with no sign bit).
+ | Now we get the exponents into d4 and d5.
+ 	andl	d7,d4			| isolate exponent in d4
+ 	beq	Lmuldf$a$den		| if exponent zero, have denormalized
+ 	andl	d6,d0			| isolate fraction
+ 	orl	IMM (0x00100000),d0	| and put hidden bit back
+ 	swap	d4			| I like exponents in the first byte
+ 	lsrw	IMM (4),d4		| 
+ Lmuldf$1:			
+ 	andl	d7,d5			|
+ 	beq	Lmuldf$b$den		|
+ 	andl	d6,d2			|
+ 	orl	IMM (0x00100000),d2	| and put hidden bit back
+ 	swap	d5			|
+ 	lsrw	IMM (4),d5		|
+ Lmuldf$2:				|
+ 	addw	d5,d4			| add exponents
+ 	subw	IMM (D_BIAS+1),d4	| and subtract bias (plus one)
+ 
+ | We are now ready to do the multiplication. The situation is as follows:
+ | both a and b have bit 52 ( bit 20 of d0 and d2) set (even if they were 
+ | denormalized to start with!), which means that in the product bit 104 
+ | (which will correspond to bit 8 of the fourth long) is set.
+ 
+ | Here we have to do the product.
+ | To do it we have to juggle the registers back and forth, as there are not
+ | enough to keep everything in them. So we use the address registers to keep
+ | some intermediate data.
+ 
+ 	moveml	a2-a3,sp@-	| save a2 and a3 for temporary use
+ 	movel	IMM (0),a2	| a2 is a null register
+ 	movel	d4,a3		| and a3 will preserve the exponent
+ 
+ | First, shift d2-d3 so bit 20 becomes bit 31:
+ 	rorl	IMM (5),d2	| rotate d2 5 places right
+ 	swap	d2		| and swap it
+ 	rorl	IMM (5),d3	| do the same thing with d3
+ 	swap	d3		|
+ 	movew	d3,d6		| get the rightmost 11 bits of d3
+ 	andw	IMM (0x07ff),d6	|
+ 	orw	d6,d2		| and put them into d2
+ 	andw	IMM (0xf800),d3	| clear those bits in d3
+ 
+ 	movel	d2,d6		| move b into d6-d7
+ 	movel	d3,d7           | move a into d4-d5
+ 	movel	d0,d4           | and clear d0-d1-d2-d3 (to put result)
+ 	movel	d1,d5           |
+ 	movel	IMM (0),d3	|
+ 	movel	d3,d2           |
+ 	movel	d3,d1           |
+ 	movel	d3,d0	        |
+ 
+ | We use a1 as counter:	
+ 	movel	IMM (DBL_MANT_DIG-1),a1		
+ 	exg	d7,a1
+ 
+ 1:	exg	d7,a1		| put counter back in a1
+ 	addl	d3,d3		| shift sum once left
+ 	addxl	d2,d2           |
+ 	addxl	d1,d1           |
+ 	addxl	d0,d0           |
+ 	addl	d7,d7		|
+ 	addxl	d6,d6		|
+ 	bcc	2f		| if bit clear skip the following
+ 	exg	d7,a2		|
+ 	addl	d5,d3		| else add a to the sum
+ 	addxl	d4,d2		|
+ 	addxl	d7,d1		|
+ 	addxl	d7,d0		|
+ 	exg	d7,a2		| 
+ 2:	exg	d7,a1		| put counter in d7
+ 	dbf	d7,1b		| decrement and branch
+ 
+ 	movel	a3,d4		| restore exponent
+ 	moveml	sp@+,a2-a3
+ 
+ | Now we have the product in d0-d1-d2-d3, with bit 8 of d0 set. The 
+ | first thing to do now is to normalize it so bit 8 becomes bit 
+ | DBL_MANT_DIG-32 (to do the rounding); later we will shift right.
+ 	swap	d0
+ 	swap	d1
+ 	movew	d1,d0
+ 	swap	d2
+ 	movew	d2,d1
+ 	swap	d3
+ 	movew	d3,d2
+ 	movew	IMM (0),d3
+ 	lsrl	IMM (1),d0
+ 	roxrl	IMM (1),d1
+ 	roxrl	IMM (1),d2
+ 	roxrl	IMM (1),d3
+ 	lsrl	IMM (1),d0
+ 	roxrl	IMM (1),d1
+ 	roxrl	IMM (1),d2
+ 	roxrl	IMM (1),d3
+ 	lsrl	IMM (1),d0
+ 	roxrl	IMM (1),d1
+ 	roxrl	IMM (1),d2
+ 	roxrl	IMM (1),d3
+ 	
+ | Now round, check for over- and underflow, and exit.
+ 	movel	a0,d7		| get sign bit back into d7
+ 	movew	IMM (MULTIPLY),d5
+ 
+ 	btst	IMM (DBL_MANT_DIG+1-32),d0
+ 	beq	Lround$exit
+ 	lsrl	IMM (1),d0
+ 	roxrl	IMM (1),d1
+ 	addw	IMM (1),d4
+ 	bra	Lround$exit
+ 
+ Lmuldf$inop:
+ 	movew	IMM (MULTIPLY),d5
+ 	bra	Ld$inop
+ 
+ Lmuldf$b$nf:
+ 	movew	IMM (MULTIPLY),d5
+ 	movel	a0,d7		| get sign bit back into d7
+ 	tstl	d3		| we know d2 == 0x7ff00000, so check d3
+ 	bne	Ld$inop		| if d3 <> 0 b is NaN
+ 	bra	Ld$overflow	| else we have overflow (since a is finite)
+ 
+ Lmuldf$a$nf:
+ 	movew	IMM (MULTIPLY),d5
+ 	movel	a0,d7		| get sign bit back into d7
+ 	tstl	d1		| we know d0 == 0x7ff00000, so check d1
+ 	bne	Ld$inop		| if d1 <> 0 a is NaN
+ 	bra	Ld$overflow	| else signal overflow
+ 
+ | If either number is zero return zero, unless the other is +/-INFINITY or
+ | NaN, in which case we return NaN.
+ Lmuldf$b$0:
+ 	movew	IMM (MULTIPLY),d5
+ 	exg	d2,d0		| put b (==0) into d0-d1
+ 	exg	d3,d1		| and a (with sign bit cleared) into d2-d3
+ 	bra	1f
+ Lmuldf$a$0:
+ 	movel	a6@(16),d2	| put b into d2-d3 again
+ 	movel	a6@(20),d3	|
+ 	bclr	IMM (31),d2	| clear sign bit
+ 1:	cmpl	IMM (0x7ff00000),d2 | check for non-finiteness
+ 	bge	Ld$inop		| in case NaN or +/-INFINITY return NaN
+ 	lea	SYM (_fpCCR),a0
+ |ifdef PALMOS
+ 	subl	IMM (edata),a0
+ 	addl	a5,a0
+ |endif PALMOS	
+ 	movew	IMM (0),a0@
+ 	moveml	sp@+,d2-d7
+ 	unlk	a6
+ 	rts
+ 
+ | If a number is denormalized we put an exponent of 1 but do not put the 
+ | hidden bit back into the fraction; instead we shift left until bit 21
+ | (the hidden bit) is set, adjusting the exponent accordingly. We do this
+ | to ensure that the product of the fractions is close to 1.
+ Lmuldf$a$den:
+ 	movel	IMM (1),d4
+ 	andl	d6,d0
+ 1:	addl	d1,d1           | shift a left until bit 20 is set
+ 	addxl	d0,d0		|
+ 	subw	IMM (1),d4	| and adjust exponent
+ 	btst	IMM (20),d0	|
+ 	bne	Lmuldf$1        |
+ 	bra	1b
+ 
+ Lmuldf$b$den:
+ 	movel	IMM (1),d5
+ 	andl	d6,d2
+ 1:	addl	d3,d3		| shift b left until bit 20 is set
+ 	addxl	d2,d2		|
+ 	subw	IMM (1),d5	| and adjust exponent
+ 	btst	IMM (20),d2	|
+ 	bne	Lmuldf$2	|
+ 	bra	1b
+ 
+ 
+ |=============================================================================
+ |                              __divdf3
+ |=============================================================================
+ 
+ | double __divdf3(double, double);
+ SYM (__divdf3):
+ 	link	a6,IMM (0)
+ 	moveml	d2-d7,sp@-
+ 	movel	a6@(8),d0	| get a into d0-d1
+ 	movel	a6@(12),d1	| 
+ 	movel	a6@(16),d2	| and b into d2-d3
+ 	movel	a6@(20),d3	|
+ 	movel	d0,d7		| d7 will hold the sign of the result
+ 	eorl	d2,d7		|
+ 	andl	IMM (0x80000000),d7
+ 	movel	d7,a0		| save sign into a0
+ 	movel	IMM (0x7ff00000),d7 | useful constant (+INFINITY)
+ 	movel	d7,d6		| another (mask for fraction)
+ 	notl	d6		|
+ 	bclr	IMM (31),d0	| get rid of a's sign bit '
+ 	movel	d0,d4		|
+ 	orl	d1,d4		|
+ 	beq	Ldivdf$a$0	| branch if a is zero
+ 	movel	d0,d4		|
+ 	bclr	IMM (31),d2	| get rid of b's sign bit '
+ 	movel	d2,d5		|
+ 	orl	d3,d5		|
+ 	beq	Ldivdf$b$0	| branch if b is zero
+ 	movel	d2,d5
+ 	cmpl	d7,d0		| is a big?
+ 	bhi	Ldivdf$inop	| if a is NaN return NaN
+ 	beq	Ldivdf$a$nf	| if d0 == 0x7ff00000 we check d1
+ 	cmpl	d7,d2		| now compare b with INFINITY 
+ 	bhi	Ldivdf$inop	| if b is NaN return NaN
+ 	beq	Ldivdf$b$nf	| if d2 == 0x7ff00000 we check d3
+ | Here we have both numbers finite and nonzero (and with no sign bit).
+ | Now we get the exponents into d4 and d5 and normalize the numbers to
+ | ensure that the ratio of the fractions is around 1. We do this by
+ | making sure that both numbers have bit #DBL_MANT_DIG-32-1 (hidden bit)
+ | set, even if they were denormalized to start with.
+ | Thus, the result will satisfy: 2 > result > 1/2.
+ 	andl	d7,d4		| and isolate exponent in d4
+ 	beq	Ldivdf$a$den	| if exponent is zero we have a denormalized
+ 	andl	d6,d0		| and isolate fraction
+ 	orl	IMM (0x00100000),d0 | and put hidden bit back
+ 	swap	d4		| I like exponents in the first byte
+ 	lsrw	IMM (4),d4	| 
+ Ldivdf$1:			| 
+ 	andl	d7,d5		|
+ 	beq	Ldivdf$b$den	|
+ 	andl	d6,d2		|
+ 	orl	IMM (0x00100000),d2
+ 	swap	d5		|
+ 	lsrw	IMM (4),d5	|
+ Ldivdf$2:			|
+ 	subw	d5,d4		| subtract exponents
+ 	addw	IMM (D_BIAS),d4	| and add bias
+ 
+ | We are now ready to do the division. We have prepared things in such a way
+ | that the ratio of the fractions will be less than 2 but greater than 1/2.
+ | At this point the registers in use are:
+ | d0-d1	hold a (first operand, bit DBL_MANT_DIG-32=0, bit 
+ | DBL_MANT_DIG-1-32=1)
+ | d2-d3	hold b (second operand, bit DBL_MANT_DIG-32=1)
+ | d4	holds the difference of the exponents, corrected by the bias
+ | a0	holds the sign of the ratio
+ 
+ | To do the rounding correctly we need to keep information about the
+ | nonsignificant bits. One way to do this would be to do the division
+ | using four registers; another is to use two registers (as originally
+ | I did), but use a sticky bit to preserve information about the 
+ | fractional part. Note that we can keep that info in a1, which is not
+ | used.
+ 	movel	IMM (0),d6	| d6-d7 will hold the result
+ 	movel	d6,d7		| 
+ 	movel	IMM (0),a1	| and a1 will hold the sticky bit
+ 
+ 	movel	IMM (DBL_MANT_DIG-32+1),d5	
+ 	
+ 1:	cmpl	d0,d2		| is a < b?
+ 	bhi	3f		| if b > a skip the following
+ 	beq	4f		| if d0==d2 check d1 and d3
+ 2:	subl	d3,d1		| 
+ 	subxl	d2,d0		| a <-- a - b
+ 	bset	d5,d6		| set the corresponding bit in d6
+ 3:	addl	d1,d1		| shift a by 1
+ 	addxl	d0,d0		|
+ 	dbra	d5,1b		| and branch back
+ 	bra	5f			
+ 4:	cmpl	d1,d3		| here d0==d2, so check d1 and d3
+ 	bhi	3b		| if d1 > d2 skip the subtraction
+ 	bra	2b		| else go do it
+ 5:
+ | Here we have to start setting the bits in the second long.
+ 	movel	IMM (31),d5	| again d5 is counter
+ 
+ 1:	cmpl	d0,d2		| is a < b?
+ 	bhi	3f		| if b > a skip the following
+ 	beq	4f		| if d0==d2 check d1 and d3
+ 2:	subl	d3,d1		| 
+ 	subxl	d2,d0		| a <-- a - b
+ 	bset	d5,d7		| set the corresponding bit in d7
+ 3:	addl	d1,d1		| shift a by 1
+ 	addxl	d0,d0		|
+ 	dbra	d5,1b		| and branch back
+ 	bra	5f			
+ 4:	cmpl	d1,d3		| here d0==d2, so check d1 and d3
+ 	bhi	3b		| if d1 > d2 skip the subtraction
+ 	bra	2b		| else go do it
+ 5:
+ | Now go ahead checking until we hit a one, which we store in d2.
+ 	movel	IMM (DBL_MANT_DIG),d5
+ 1:	cmpl	d2,d0		| is a < b?
+ 	bhi	4f		| if b < a, exit
+ 	beq	3f		| if d0==d2 check d1 and d3
+ 2:	addl	d1,d1		| shift a by 1
+ 	addxl	d0,d0		|
+ 	dbra	d5,1b		| and branch back
+ 	movel	IMM (0),d2	| here no sticky bit was found
+ 	movel	d2,d3
+ 	bra	5f			
+ 3:	cmpl	d1,d3		| here d0==d2, so check d1 and d3
+ 	bhi	2b		| if d1 > d2 go back
+ 4:
+ | Here put the sticky bit in d2-d3 (in the position which actually corresponds
+ | to it; if you don't do this the algorithm loses in some cases). '
+ 	movel	IMM (0),d2
+ 	movel	d2,d3
+ 	subw	IMM (DBL_MANT_DIG),d5
+ 	addw	IMM (63),d5
+ 	cmpw	IMM (31),d5
+ 	bhi	2f
+ 1:	bset	d5,d3
+ 	bra	5f
+ 	subw	IMM (32),d5
+ 2:	bset	d5,d2
+ 5:
+ | Finally we are finished! Move the longs in the address registers to
+ | their final destination:
+ 	movel	d6,d0
+ 	movel	d7,d1
+ 	movel	IMM (0),d3
+ 
+ | Here we have finished the division, with the result in d0-d1-d2-d3, with
+ | 2^21 <= d6 < 2^23. Thus bit 23 is not set, but bit 22 could be set.
+ | If it is not, then definitely bit 21 is set. Normalize so bit 22 is
+ | not set:
+ 	btst	IMM (DBL_MANT_DIG-32+1),d0
+ 	beq	1f
+ 	lsrl	IMM (1),d0
+ 	roxrl	IMM (1),d1
+ 	roxrl	IMM (1),d2
+ 	roxrl	IMM (1),d3
+ 	addw	IMM (1),d4
+ 1:
+ | Now round, check for over- and underflow, and exit.
+ 	movel	a0,d7		| restore sign bit to d7
+ 	movew	IMM (DIVIDE),d5
+ 	bra	Lround$exit
+ 
+ Ldivdf$inop:
+ 	movew	IMM (DIVIDE),d5
+ 	bra	Ld$inop
+ 
+ Ldivdf$a$0:
+ | If a is zero check to see whether b is zero also. In that case return
+ | NaN; then check if b is NaN, and return NaN also in that case. Else
+ | return zero.
+ 	movew	IMM (DIVIDE),d5
+ 	bclr	IMM (31),d2	|
+ 	movel	d2,d4		| 
+ 	orl	d3,d4		| 
+ 	beq	Ld$inop		| if b is also zero return NaN
+ 	cmpl	IMM (0x7ff00000),d2 | check for NaN
+ 	bhi	Ld$inop		| 
+ 	blt	1f		|
+ 	tstl	d3		|
+ 	bne	Ld$inop		|
+ 1:	movel	IMM (0),d0	| else return zero
+ 	movel	d0,d1		| 
+ 	lea	SYM (_fpCCR),a0	| clear exception flags
+ |ifdef PALMOS
+ 	subl	IMM (edata),a0
+ 	addl	a5,a0
+ |endif PALMOS	
+ 	movew	IMM (0),a0@	|
+ 	moveml	sp@+,d2-d7	| 
+ 	unlk	a6		| 
+ 	rts			| 	
+ 
+ Ldivdf$b$0:
+ 	movew	IMM (DIVIDE),d5
+ | If we got here a is not zero. Check if a is NaN; in that case return NaN,
+ | else return +/-INFINITY. Remember that a is in d0 with the sign bit 
+ | cleared already.
+ 	movel	a0,d7		| put a's sign bit back in d7 '
+ 	cmpl	IMM (0x7ff00000),d0 | compare d0 with INFINITY
+ 	bhi	Ld$inop		| if larger it is NaN
+ 	tstl	d1		| 
+ 	bne	Ld$inop		| 
+ 	bra	Ld$div$0	| else signal DIVIDE_BY_ZERO
+ 
+ Ldivdf$b$nf:
+ 	movew	IMM (DIVIDE),d5
+ | If d2 == 0x7ff00000 we have to check d3.
+ 	tstl	d3		|
+ 	bne	Ld$inop		| if d3 <> 0, b is NaN
+ 	bra	Ld$underflow	| else b is +/-INFINITY, so signal underflow
+ 
+ Ldivdf$a$nf:
+ 	movew	IMM (DIVIDE),d5
+ | If d0 == 0x7ff00000 we have to check d1.
+ 	tstl	d1		|
+ 	bne	Ld$inop		| if d1 <> 0, a is NaN
+ | If a is INFINITY we have to check b
+ 	cmpl	d7,d2		| compare b with INFINITY 
+ 	bge	Ld$inop		| if b is NaN or INFINITY return NaN
+ 	tstl	d3		|
+ 	bne	Ld$inop		| 
+ 	bra	Ld$overflow	| else return overflow
+ 
+ | If a number is denormalized we put an exponent of 1 but do not put the 
+ | bit back into the fraction.
+ Ldivdf$a$den:
+ 	movel	IMM (1),d4
+ 	andl	d6,d0
+ 1:	addl	d1,d1		| shift a left until bit 20 is set
+ 	addxl	d0,d0
+ 	subw	IMM (1),d4	| and adjust exponent
+ 	btst	IMM (DBL_MANT_DIG-32-1),d0
+ 	bne	Ldivdf$1
+ 	bra	1b
+ 
+ Ldivdf$b$den:
+ 	movel	IMM (1),d5
+ 	andl	d6,d2
+ 1:	addl	d3,d3		| shift b left until bit 20 is set
+ 	addxl	d2,d2
+ 	subw	IMM (1),d5	| and adjust exponent
+ 	btst	IMM (DBL_MANT_DIG-32-1),d2
+ 	bne	Ldivdf$2
+ 	bra	1b
+ 
+ Lround$exit:
+ | This is a common exit point for __muldf3 and __divdf3. When they enter
+ | this point the sign of the result is in d7, the result in d0-d1, normalized
+ | so that 2^21 <= d0 < 2^22, and the exponent is in the lower byte of d4.
+ 
+ | First check for underlow in the exponent:
+ 	cmpw	IMM (-DBL_MANT_DIG-1),d4		
+ 	blt	Ld$underflow	
+ | It could happen that the exponent is less than 1, in which case the 
+ | number is denormalized. In this case we shift right and adjust the 
+ | exponent until it becomes 1 or the fraction is zero (in the latter case 
+ | we signal underflow and return zero).
+ 	movel	d7,a0		|
+ 	movel	IMM (0),d6	| use d6-d7 to collect bits flushed right
+ 	movel	d6,d7		| use d6-d7 to collect bits flushed right
+ 	cmpw	IMM (1),d4	| if the exponent is less than 1 we 
+ 	bge	2f		| have to shift right (denormalize)
+ 1:	addw	IMM (1),d4	| adjust the exponent
+ 	lsrl	IMM (1),d0	| shift right once 
+ 	roxrl	IMM (1),d1	|
+ 	roxrl	IMM (1),d2	|
+ 	roxrl	IMM (1),d3	|
+ 	roxrl	IMM (1),d6	| 
+ 	roxrl	IMM (1),d7	|
+ 	cmpw	IMM (1),d4	| is the exponent 1 already?
+ 	beq	2f		| if not loop back
+ 	bra	1b              |
+ 	bra	Ld$underflow	| safety check, shouldn't execute '
+ 2:	orl	d6,d2		| this is a trick so we don't lose  '
+ 	orl	d7,d3		| the bits which were flushed right
+ 	movel	a0,d7		| get back sign bit into d7
+ | Now call the rounding routine (which takes care of denormalized numbers):
+ 	lea	Lround$0(%pc),a0	| to return from rounding routine
+ 	lea	SYM (_fpCCR),a1	| check the rounding mode
+ |ifdef PALMOS
+ 	subl	IMM (edata),a1
+ 	addl	a5,a1
+ |endif PALMOS	
+ 	movew	a1@(6),d6	| rounding mode in d6
+ 	beq	Lround$to$nearest
+ 	cmpw	IMM (ROUND_TO_PLUS),d6
+ 	bhi	Lround$to$minus
+ 	blt	Lround$to$zero
+ 	bra	Lround$to$plus
+ Lround$0:
+ | Here we have a correctly rounded result (either normalized or denormalized).
+ 
+ | Here we should have either a normalized number or a denormalized one, and
+ | the exponent is necessarily larger or equal to 1 (so we don't have to  '
+ | check again for underflow!). We have to check for overflow or for a 
+ | denormalized number (which also signals underflow).
+ | Check for overflow (i.e., exponent >= 0x7ff).
+ 	cmpw	IMM (0x07ff),d4
+ 	bge	Ld$overflow
+ | Now check for a denormalized number (exponent==0):
+ 	movew	d4,d4
+ 	beq	Ld$den
+ 1:
+ | Put back the exponents and sign and return.
+ 	lslw	IMM (4),d4	| exponent back to fourth byte
+ 	bclr	IMM (DBL_MANT_DIG-32-1),d0
+ 	swap	d0		| and put back exponent
+ 	orw	d4,d0		| 
+ 	swap	d0		|
+ 	orl	d7,d0		| and sign also
+ 
+ 	lea	SYM (_fpCCR),a0
+ |ifdef PALMOS
+ 	subl	IMM (edata),a0
+ 	addl	a5,a0
+ |endif PALMOS	
+ 	movew	IMM (0),a0@
+ 	moveml	sp@+,d2-d7
+ 	unlk	a6
+ 	rts
+ 
+ |=============================================================================
+ |                              __negdf2
+ |=============================================================================
+ 
+ | double __negdf2(double, double);
+ SYM (__negdf2):
+ 	link	a6,IMM (0)
+ 	moveml	d2-d7,sp@-
+ 	movew	IMM (NEGATE),d5
+ 	movel	a6@(8),d0	| get number to negate in d0-d1
+ 	movel	a6@(12),d1	|
+ 	bchg	IMM (31),d0	| negate
+ 	movel	d0,d2		| make a positive copy (for the tests)
+ 	bclr	IMM (31),d2	|
+ 	movel	d2,d4		| check for zero
+ 	orl	d1,d4		|
+ 	beq	2f		| if zero (either sign) return +zero
+ 	cmpl	IMM (0x7ff00000),d2 | compare to +INFINITY
+ 	blt	1f		| if finite, return
+ 	bhi	Ld$inop		| if larger (fraction not zero) is NaN
+ 	tstl	d1		| if d2 == 0x7ff00000 check d1
+ 	bne	Ld$inop		|
+ 	movel	d0,d7		| else get sign and return INFINITY
+ 	andl	IMM (0x80000000),d7
+ 	bra	Ld$infty		
+ 1:	lea	SYM (_fpCCR),a0
+ |ifdef PALMOS
+ 	subl	IMM (edata),a0
+ 	addl	a5,a0
+ |endif PALMOS	
+ 	movew	IMM (0),a0@
+ 	moveml	sp@+,d2-d7
+ 	unlk	a6
+ 	rts
+ 2:	bclr	IMM (31),d0
+ 	bra	1b
+ 
+ |=============================================================================
+ |                              __cmpdf2
+ |=============================================================================
+ 
+ GREATER =  1
+ LESS    = -1
+ EQUAL   =  0
+ 
+ | int __cmpdf2(double, double);
+ SYM (__cmpdf2):
+ 	link	a6,IMM (0)
+ 	moveml	d2-d7,sp@- 	| save registers
+ 	movew	IMM (COMPARE),d5
+ 	movel	a6@(8),d0	| get first operand
+ 	movel	a6@(12),d1	|
+ 	movel	a6@(16),d2	| get second operand
+ 	movel	a6@(20),d3	|
+ | First check if a and/or b are (+/-) zero and in that case clear
+ | the sign bit.
+ 	movel	d0,d6		| copy signs into d6 (a) and d7(b)
+ 	bclr	IMM (31),d0	| and clear signs in d0 and d2
+ 	movel	d2,d7		|
+ 	bclr	IMM (31),d2	|
+ 	cmpl	IMM (0x7fff0000),d0 | check for a == NaN
+ 	bhi	Ld$inop		| if d0 > 0x7ff00000, a is NaN
+ 	beq	Lcmpdf$a$nf	| if equal can be INFINITY, so check d1
+ 	movel	d0,d4		| copy into d4 to test for zero
+ 	orl	d1,d4		|
+ 	beq	Lcmpdf$a$0	|
+ Lcmpdf$0:
+ 	cmpl	IMM (0x7fff0000),d2 | check for b == NaN
+ 	bhi	Ld$inop		| if d2 > 0x7ff00000, b is NaN
+ 	beq	Lcmpdf$b$nf	| if equal can be INFINITY, so check d3
+ 	movel	d2,d4		|
+ 	orl	d3,d4		|
+ 	beq	Lcmpdf$b$0	|
+ Lcmpdf$1:
+ | Check the signs
+ 	eorl	d6,d7
+ 	bpl	1f
+ | If the signs are not equal check if a >= 0
+ 	tstl	d6
+ 	bpl	Lcmpdf$a$gt$b	| if (a >= 0 && b < 0) => a > b
+ 	bmi	Lcmpdf$b$gt$a	| if (a < 0 && b >= 0) => a < b
+ 1:
+ | If the signs are equal check for < 0
+ 	tstl	d6
+ 	bpl	1f
+ | If both are negative exchange them
+ 	exg	d0,d2
+ 	exg	d1,d3
+ 1:
+ | Now that they are positive we just compare them as longs (does this also
+ | work for denormalized numbers?).
+ 	cmpl	d0,d2
+ 	bhi	Lcmpdf$b$gt$a	| |b| > |a|
+ 	bne	Lcmpdf$a$gt$b	| |b| < |a|
+ | If we got here d0 == d2, so we compare d1 and d3.
+ 	cmpl	d1,d3
+ 	bhi	Lcmpdf$b$gt$a	| |b| > |a|
+ 	bne	Lcmpdf$a$gt$b	| |b| < |a|
+ | If we got here a == b.
+ 	movel	IMM (EQUAL),d0
+ 	moveml	sp@+,d2-d7 	| put back the registers
+ 	unlk	a6
+ 	rts
+ Lcmpdf$a$gt$b:
+ 	movel	IMM (GREATER),d0
+ 	moveml	sp@+,d2-d7 	| put back the registers
+ 	unlk	a6
+ 	rts
+ Lcmpdf$b$gt$a:
+ 	movel	IMM (LESS),d0
+ 	moveml	sp@+,d2-d7 	| put back the registers
+ 	unlk	a6
+ 	rts
+ 
+ Lcmpdf$a$0:	
+ 	bclr	IMM (31),d6
+ 	bra	Lcmpdf$0
+ Lcmpdf$b$0:
+ 	bclr	IMM (31),d7
+ 	bra	Lcmpdf$1
+ 
+ Lcmpdf$a$nf:
+ 	tstl	d1
+ 	bne	Ld$inop
+ 	bra	Lcmpdf$0
+ 
+ Lcmpdf$b$nf:
+ 	tstl	d3
+ 	bne	Ld$inop
+ 	bra	Lcmpdf$1
+ 
+ |=============================================================================
+ |                           rounding routines
+ |=============================================================================
+ 
+ | The rounding routines expect the number to be normalized in registers
+ | d0-d1-d2-d3, with the exponent in register d4. They assume that the 
+ | exponent is larger or equal to 1. They return a properly normalized number
+ | if possible, and a denormalized number otherwise. The exponent is returned
+ | in d4.
+ 
+ Lround$to$nearest:
+ | We now normalize as suggested by D. Knuth ("Seminumerical Algorithms"):
+ | Here we assume that the exponent is not too small (this should be checked
+ | before entering the rounding routine), but the number could be denormalized.
+ 
+ | Check for denormalized numbers:
+ 1:	btst	IMM (DBL_MANT_DIG-32),d0
+ 	bne	2f		| if set the number is normalized
+ | Normalize shifting left until bit #DBL_MANT_DIG-32 is set or the exponent 
+ | is one (remember that a denormalized number corresponds to an 
+ | exponent of -D_BIAS+1).
+ 	cmpw	IMM (1),d4	| remember that the exponent is at least one
+  	beq	2f		| an exponent of one means denormalized
+ 	addl	d3,d3		| else shift and adjust the exponent
+ 	addxl	d2,d2		|
+ 	addxl	d1,d1		|
+ 	addxl	d0,d0		|
+ 	dbra	d4,1b		|
+ 2:
+ | Now round: we do it as follows: after the shifting we can write the
+ | fraction part as f + delta, where 1 < f < 2^25, and 0 <= delta <= 2.
+ | If delta < 1, do nothing. If delta > 1, add 1 to f. 
+ | If delta == 1, we make sure the rounded number will be even (odd?) 
+ | (after shifting).
+ 	btst	IMM (0),d1	| is delta < 1?
+ 	beq	2f		| if so, do not do anything
+ 	orl	d2,d3		| is delta == 1?
+ 	bne	1f		| if so round to even
+ 	movel	d1,d3		| 
+ 	andl	IMM (2),d3	| bit 1 is the last significant bit
+ 	movel	IMM (0),d2	|
+ 	addl	d3,d1		|
+ 	addxl	d2,d0		|
+ 	bra	2f		| 
+ 1:	movel	IMM (1),d3	| else add 1 
+ 	movel	IMM (0),d2	|
+ 	addl	d3,d1		|
+ 	addxl	d2,d0
+ | Shift right once (because we used bit #DBL_MANT_DIG-32!).
+ 2:	lsrl	IMM (1),d0
+ 	roxrl	IMM (1),d1		
+ 
+ | Now check again bit #DBL_MANT_DIG-32 (rounding could have produced a
+ | 'fraction overflow' ...).
+ 	btst	IMM (DBL_MANT_DIG-32),d0	
+ 	beq	1f
+ 	lsrl	IMM (1),d0
+ 	roxrl	IMM (1),d1
+ 	addw	IMM (1),d4
+ 1:
+ | If bit #DBL_MANT_DIG-32-1 is clear we have a denormalized number, so we 
+ | have to put the exponent to zero and return a denormalized number.
+ 	btst	IMM (DBL_MANT_DIG-32-1),d0
+ 	beq	1f
+ 	jmp	a0@
+ 1:	movel	IMM (0),d4
+ 	jmp	a0@
+ 
+ Lround$to$zero:
+ Lround$to$plus:
+ Lround$to$minus:
+ 	jmp	a0@
+ #endif /* L_double */
+ 
+ #ifdef  L_float
+ 
+ 	.globl	SYM (_fpCCR)
+ 	.globl  $_exception_handler
+ 
+ QUIET_NaN    = 0xffffffff
+ SIGNL_NaN    = 0x7f800001
+ INFINITY     = 0x7f800000
+ 
+ F_MAX_EXP      = 0xff
+ F_BIAS         = 126
+ FLT_MAX_EXP    = F_MAX_EXP - F_BIAS
+ FLT_MIN_EXP    = 1 - F_BIAS
+ FLT_MANT_DIG   = 24
+ 
+ INEXACT_RESULT 		= 0x0001
+ UNDERFLOW 		= 0x0002
+ OVERFLOW 		= 0x0004
+ DIVIDE_BY_ZERO 		= 0x0008
+ INVALID_OPERATION 	= 0x0010
+ 
+ SINGLE_FLOAT = 1
+ 
+ NOOP         = 0
+ ADD          = 1
+ MULTIPLY     = 2
+ DIVIDE       = 3
+ NEGATE       = 4
+ COMPARE      = 5
+ EXTENDSFDF   = 6
+ TRUNCDFSF    = 7
+ 
+ UNKNOWN           = -1
+ ROUND_TO_NEAREST  = 0 | round result to nearest representable value
+ ROUND_TO_ZERO     = 1 | round result towards zero
+ ROUND_TO_PLUS     = 2 | round result towards plus infinity
+ ROUND_TO_MINUS    = 3 | round result towards minus infinity
+ 
+ | Entry points:
+ 
+ 	.globl SYM (__addsf3)
+ 	.globl SYM (__subsf3)
+ 	.globl SYM (__mulsf3)
+ 	.globl SYM (__divsf3)
+ 	.globl SYM (__negsf2)
+ 	.globl SYM (__cmpsf2)
+ 
+ | These are common routines to return and signal exceptions.	
+ 
+ 	.text
+ 	.even
+ 
+ Lf$den:
+ | Return and signal a denormalized number
+ 	orl	d7,d0
+ 	movew	IMM (UNDERFLOW),d7
+ 	orw	IMM (INEXACT_RESULT),d7
+ 	movew	IMM (SINGLE_FLOAT),d6
+ 	jmp	$_exception_handler(%pc)
+ 
+ Lf$infty:
+ Lf$overflow:
+ | Return a properly signed INFINITY and set the exception flags 
+ 	movel	IMM (INFINITY),d0
+ 	orl	d7,d0
+ 	movew	IMM (OVERFLOW),d7
+ 	orw	IMM (INEXACT_RESULT),d7
+ 	movew	IMM (SINGLE_FLOAT),d6
+ 	jmp	$_exception_handler(%pc)
+ 
+ Lf$underflow:
+ | Return 0 and set the exception flags 
+ 	movel	IMM (0),d0
+ 	movew	IMM (UNDERFLOW),d7
+ 	orw	IMM (INEXACT_RESULT),d7
+ 	movew	IMM (SINGLE_FLOAT),d6
+ 	jmp	$_exception_handler(%pc)
+ 
+ Lf$inop:
+ | Return a quiet NaN and set the exception flags
+ 	movel	IMM (QUIET_NaN),d0
+ 	movew	IMM (INVALID_OPERATION),d7
+ 	orw	IMM (INEXACT_RESULT),d7
+ 	movew	IMM (SINGLE_FLOAT),d6
+ 	jmp	$_exception_handler(%pc)
+ 
+ Lf$div$0:
+ | Return a properly signed INFINITY and set the exception flags
+ 	movel	IMM (INFINITY),d0
+ 	orl	d7,d0
+ 	movew	IMM (DIVIDE_BY_ZERO),d7
+ 	orw	IMM (INEXACT_RESULT),d7
+ 	movew	IMM (SINGLE_FLOAT),d6
+ 	jmp	$_exception_handler(%pc)
+ 
+ |=============================================================================
+ |=============================================================================
+ |                         single precision routines
+ |=============================================================================
+ |=============================================================================
+ 
+ | A single precision floating point number (float) has the format:
+ |
+ | struct _float {
+ |  unsigned int sign      : 1;  /* sign bit */ 
+ |  unsigned int exponent  : 8;  /* exponent, shifted by 126 */
+ |  unsigned int fraction  : 23; /* fraction */
+ | } float;
+ | 
+ | Thus sizeof(float) = 4 (32 bits). 
+ |
+ | All the routines are callable from C programs, and return the result 
+ | in the single register d0. They also preserve all registers except 
+ | d0-d1 and a0-a1.
+ 
+ |=============================================================================
+ |                              __subsf3
+ |=============================================================================
+ 
+ | float __subsf3(float, float);
+ SYM (__subsf3):
+ 	bchg	IMM (31),sp@(8)	| change sign of second operand
+ 				| and fall through
+ |=============================================================================
+ |                              __addsf3
+ |=============================================================================
+ 
+ | float __addsf3(float, float);
+ SYM (__addsf3):
+ 	link	a6,IMM (0)	| everything will be done in registers
+ 	moveml	d2-d7,sp@-	| save all data registers but d0-d1
+ 	movel	a6@(8),d0	| get first operand
+ 	movel	a6@(12),d1	| get second operand
+ 	movel	d0,d6		| get d0's sign bit '
+ 	addl	d0,d0		| check and clear sign bit of a
+ 	beq	Laddsf$b	| if zero return second operand
+ 	movel	d1,d7		| save b's sign bit '
+ 	addl	d1,d1		| get rid of sign bit
+ 	beq	Laddsf$a	| if zero return first operand
+ 
+ 	movel	d6,a0		| save signs in address registers
+ 	movel	d7,a1		| so we can use d6 and d7
+ 
+ | Get the exponents and check for denormalized and/or infinity.
+ 
+ 	movel	IMM (0x00ffffff),d4	| mask to get fraction
+ 	movel	IMM (0x01000000),d5	| mask to put hidden bit back
+ 
+ 	movel	d0,d6		| save a to get exponent
+ 	andl	d4,d0		| get fraction in d0
+ 	notl 	d4		| make d4 into a mask for the exponent
+ 	andl	d4,d6		| get exponent in d6
+ 	beq	Laddsf$a$den	| branch if a is denormalized
+ 	cmpl	d4,d6		| check for INFINITY or NaN
+ 	beq	Laddsf$nf
+ 	swap	d6		| put exponent into first word
+ 	orl	d5,d0		| and put hidden bit back
+ Laddsf$1:
+ | Now we have a's exponent in d6 (second byte) and the mantissa in d0. '
+ 	movel	d1,d7		| get exponent in d7
+ 	andl	d4,d7		| 
+ 	beq	Laddsf$b$den	| branch if b is denormalized
+ 	cmpl	d4,d7		| check for INFINITY or NaN
+ 	beq	Laddsf$nf
+ 	swap	d7		| put exponent into first word
+ 	notl 	d4		| make d4 into a mask for the fraction
+ 	andl	d4,d1		| get fraction in d1
+ 	orl	d5,d1		| and put hidden bit back
+ Laddsf$2:
+ | Now we have b's exponent in d7 (second byte) and the mantissa in d1. '
+ 
+ | Note that the hidden bit corresponds to bit #FLT_MANT_DIG-1, and we 
+ | shifted right once, so bit #FLT_MANT_DIG is set (so we have one extra
+ | bit).
+ 
+ 	movel	d1,d2		| move b to d2, since we want to use
+ 				| two registers to do the sum
+ 	movel	IMM (0),d1	| and clear the new ones
+ 	movel	d1,d3		|
+ 
+ | Here we shift the numbers in registers d0 and d1 so the exponents are the
+ | same, and put the largest exponent in d6. Note that we are using two
+ | registers for each number (see the discussion by D. Knuth in "Seminumerical 
+ | Algorithms").
+ 	cmpw	d6,d7		| compare exponents
+ 	beq	Laddsf$3	| if equal don't shift '
+ 	bhi	5f		| branch if second exponent largest
+ 1:
+ 	subl	d6,d7		| keep the largest exponent
+ 	negl	d7
+ 	lsrw	IMM (8),d7	| put difference in lower byte
+ | if difference is too large we don't shift (actually, we can just exit) '
+ 	cmpw	IMM (FLT_MANT_DIG+2),d7		
+ 	bge	Laddsf$b$small
+ 	cmpw	IMM (16),d7	| if difference >= 16 swap
+ 	bge	4f
+ 2:
+ 	subw	IMM (1),d7
+ 3:	lsrl	IMM (1),d2	| shift right second operand
+ 	roxrl	IMM (1),d3
+ 	dbra	d7,3b
+ 	bra	Laddsf$3
+ 4:
+ 	movew	d2,d3
+ 	swap	d3
+ 	movew	d3,d2
+ 	swap	d2
+ 	subw	IMM (16),d7
+ 	bne	2b		| if still more bits, go back to normal case
+ 	bra	Laddsf$3
+ 5:
+ 	exg	d6,d7		| exchange the exponents
+ 	subl	d6,d7		| keep the largest exponent
+ 	negl	d7		|
+ 	lsrw	IMM (8),d7	| put difference in lower byte
+ | if difference is too large we don't shift (and exit!) '
+ 	cmpw	IMM (FLT_MANT_DIG+2),d7		
+ 	bge	Laddsf$a$small
+ 	cmpw	IMM (16),d7	| if difference >= 16 swap
+ 	bge	8f
+ 6:
+ 	subw	IMM (1),d7
+ 7:	lsrl	IMM (1),d0	| shift right first operand
+ 	roxrl	IMM (1),d1
+ 	dbra	d7,7b
+ 	bra	Laddsf$3
+ 8:
+ 	movew	d0,d1
+ 	swap	d1
+ 	movew	d1,d0
+ 	swap	d0
+ 	subw	IMM (16),d7
+ 	bne	6b		| if still more bits, go back to normal case
+ 				| otherwise we fall through
+ 
+ | Now we have a in d0-d1, b in d2-d3, and the largest exponent in d6 (the
+ | signs are stored in a0 and a1).
+ 
+ Laddsf$3:
+ | Here we have to decide whether to add or subtract the numbers
+ 	exg	d6,a0		| get signs back
+ 	exg	d7,a1		| and save the exponents
+ 	eorl	d6,d7		| combine sign bits
+ 	bmi	Lsubsf$0	| if negative a and b have opposite 
+ 				| sign so we actually subtract the
+ 				| numbers
+ 
+ | Here we have both positive or both negative
+ 	exg	d6,a0		| now we have the exponent in d6
+ 	movel	a0,d7		| and sign in d7
+ 	andl	IMM (0x80000000),d7
+ | Here we do the addition.
+ 	addl	d3,d1
+ 	addxl	d2,d0
+ | Note: now we have d2, d3, d4 and d5 to play with! 
+ 
+ | Put the exponent, in the first byte, in d2, to use the "standard" rounding
+ | routines:
+ 	movel	d6,d2
+ 	lsrw	IMM (8),d2
+ 
+ | Before rounding normalize so bit #FLT_MANT_DIG is set (we will consider
+ | the case of denormalized numbers in the rounding routine itself).
+ | As in the addition (not in the subtraction!) we could have set 
+ | one more bit we check this:
+ 	btst	IMM (FLT_MANT_DIG+1),d0	
+ 	beq	1f
+ 	lsrl	IMM (1),d0
+ 	roxrl	IMM (1),d1
+ 	addl	IMM (1),d2
+ 1:
+ 	lea	Laddsf$4(%pc),a0	| to return from rounding routine
+ 	lea	SYM (_fpCCR),a1	| check the rounding mode
+ |ifdef PALMOS
+ 	subl	IMM (edata),a1
+ 	addl	a5,a1
+ |endif PALMOS	
+ 	movew	a1@(6),d6	| rounding mode in d6
+ 	beq	Lround$to$nearest
+ 	cmpw	IMM (ROUND_TO_PLUS),d6
+ 	bhi	Lround$to$minus
+ 	blt	Lround$to$zero
+ 	bra	Lround$to$plus
+ Laddsf$4:
+ | Put back the exponent, but check for overflow.
+ 	cmpw	IMM (0xff),d2
+ 	bhi	1f
+ 	bclr	IMM (FLT_MANT_DIG-1),d0
+ 	lslw	IMM (7),d2
+ 	swap	d2
+ 	orl	d2,d0
+ 	bra	Laddsf$ret
+ 1:
+ 	movew	IMM (ADD),d5
+ 	bra	Lf$overflow
+ 
+ Lsubsf$0:
+ | We are here if a > 0 and b < 0 (sign bits cleared).
+ | Here we do the subtraction.
+ 	movel	d6,d7		| put sign in d7
+ 	andl	IMM (0x80000000),d7
+ 
+ 	subl	d3,d1		| result in d0-d1
+ 	subxl	d2,d0		|
+ 	beq	Laddsf$ret	| if zero just exit
+ 	bpl	1f		| if positive skip the following
+ 	bchg	IMM (31),d7	| change sign bit in d7
+ 	negl	d1
+ 	negxl	d0
+ 1:
+ 	exg	d2,a0		| now we have the exponent in d2
+ 	lsrw	IMM (8),d2	| put it in the first byte
+ 
+ | Now d0-d1 is positive and the sign bit is in d7.
+ 
+ | Note that we do not have to normalize, since in the subtraction bit
+ | #FLT_MANT_DIG+1 is never set, and denormalized numbers are handled by
+ | the rounding routines themselves.
+ 	lea	Lsubsf$1(%pc),a0	| to return from rounding routine
+ 	lea	SYM (_fpCCR),a1	| check the rounding mode
+ |ifdef PALMOS
+ 	subl	IMM (edata),a1
+ 	addl	a5,a1
+ |endif PALMOS	
+ 	movew	a1@(6),d6	| rounding mode in d6
+ 	beq	Lround$to$nearest
+ 	cmpw	IMM (ROUND_TO_PLUS),d6
+ 	bhi	Lround$to$minus
+ 	blt	Lround$to$zero
+ 	bra	Lround$to$plus
+ Lsubsf$1:
+ | Put back the exponent (we can't have overflow!). '
+ 	bclr	IMM (FLT_MANT_DIG-1),d0
+ 	lslw	IMM (7),d2
+ 	swap	d2
+ 	orl	d2,d0
+ 	bra	Laddsf$ret
+ 
+ | If one of the numbers was too small (difference of exponents >= 
+ | FLT_MANT_DIG+2) we return the other (and now we don't have to '
+ | check for finiteness or zero).
+ Laddsf$a$small:
+ 	movel	a6@(12),d0
+ 	lea	SYM (_fpCCR),a0
+ |ifdef PALMOS
+ 	subl	IMM (edata),a0
+ 	addl	a5,a0
+ |endif PALMOS	
+ 	movew	IMM (0),a0@
+ 	moveml	sp@+,d2-d7	| restore data registers
+ 	unlk	a6		| and return
+ 	rts
+ 
+ Laddsf$b$small:
+ 	movel	a6@(8),d0
+ 	lea	SYM (_fpCCR),a0
+ |ifdef PALMOS
+ 	subl	IMM (edata),a0
+ 	addl	a5,a0
+ |endif PALMOS	
+ 	movew	IMM (0),a0@
+ 	moveml	sp@+,d2-d7	| restore data registers
+ 	unlk	a6		| and return
+ 	rts
+ 
+ | If the numbers are denormalized remember to put exponent equal to 1.
+ 
+ Laddsf$a$den:
+ 	movel	d5,d6		| d5 contains 0x01000000
+ 	swap	d6
+ 	bra	Laddsf$1
+ 
+ Laddsf$b$den:
+ 	movel	d5,d7
+ 	swap	d7
+ 	notl 	d4		| make d4 into a mask for the fraction
+ 				| (this was not executed after the jump)
+ 	bra	Laddsf$2
+ 
+ | The rest is mainly code for the different results which can be 
+ | returned (checking always for +/-INFINITY and NaN).
+ 
+ Laddsf$b:
+ | Return b (if a is zero).
+ 	movel	a6@(12),d0
+ 	bra	1f
+ Laddsf$a:
+ | Return a (if b is zero).
+ 	movel	a6@(8),d0
+ 1:
+ 	movew	IMM (ADD),d5
+ | We have to check for NaN and +/-infty.
+ 	movel	d0,d7
+ 	andl	IMM (0x80000000),d7	| put sign in d7
+ 	bclr	IMM (31),d0		| clear sign
+ 	cmpl	IMM (INFINITY),d0	| check for infty or NaN
+ 	bge	2f
+ 	movel	d0,d0		| check for zero (we do this because we don't '
+ 	bne	Laddsf$ret	| want to return -0 by mistake
+ 	bclr	IMM (31),d7	| if zero be sure to clear sign
+ 	bra	Laddsf$ret	| if everything OK just return
+ 2:
+ | The value to be returned is either +/-infty or NaN
+ 	andl	IMM (0x007fffff),d0	| check for NaN
+ 	bne	Lf$inop			| if mantissa not zero is NaN
+ 	bra	Lf$infty
+ 
+ Laddsf$ret:
+ | Normal exit (a and b nonzero, result is not NaN nor +/-infty).
+ | We have to clear the exception flags (just the exception type).
+ 	lea	SYM (_fpCCR),a0
+ |ifdef PALMOS
+ 	subl	IMM (edata),a0
+ 	addl	a5,a0
+ |endif PALMOS	
+ 	movew	IMM (0),a0@
+ 	orl	d7,d0		| put sign bit
+ 	moveml	sp@+,d2-d7	| restore data registers
+ 	unlk	a6		| and return
+ 	rts
+ 
+ Laddsf$ret$den:
+ | Return a denormalized number (for addition we don't signal underflow) '
+ 	lsrl	IMM (1),d0	| remember to shift right back once
+ 	bra	Laddsf$ret	| and return
+ 
+ | Note: when adding two floats of the same sign if either one is 
+ | NaN we return NaN without regard to whether the other is finite or 
+ | not. When subtracting them (i.e., when adding two numbers of 
+ | opposite signs) things are more complicated: if both are INFINITY 
+ | we return NaN, if only one is INFINITY and the other is NaN we return
+ | NaN, but if it is finite we return INFINITY with the corresponding sign.
+ 
+ Laddsf$nf:
+ 	movew	IMM (ADD),d5
+ | This could be faster but it is not worth the effort, since it is not
+ | executed very often. We sacrifice speed for clarity here.
+ 	movel	a6@(8),d0	| get the numbers back (remember that we
+ 	movel	a6@(12),d1	| did some processing already)
+ 	movel	IMM (INFINITY),d4 | useful constant (INFINITY)
+ 	movel	d0,d2		| save sign bits
+ 	movel	d1,d3
+ 	bclr	IMM (31),d0	| clear sign bits
+ 	bclr	IMM (31),d1
+ | We know that one of them is either NaN of +/-INFINITY
+ | Check for NaN (if either one is NaN return NaN)
+ 	cmpl	d4,d0		| check first a (d0)
+ 	bhi	Lf$inop		
+ 	cmpl	d4,d1		| check now b (d1)
+ 	bhi	Lf$inop		
+ | Now comes the check for +/-INFINITY. We know that both are (maybe not
+ | finite) numbers, but we have to check if both are infinite whether we
+ | are adding or subtracting them.
+ 	eorl	d3,d2		| to check sign bits
+ 	bmi	1f
+ 	movel	d0,d7
+ 	andl	IMM (0x80000000),d7	| get (common) sign bit
+ 	bra	Lf$infty
+ 1:
+ | We know one (or both) are infinite, so we test for equality between the
+ | two numbers (if they are equal they have to be infinite both, so we
+ | return NaN).
+ 	cmpl	d1,d0		| are both infinite?
+ 	beq	Lf$inop		| if so return NaN
+ 
+ 	movel	d0,d7
+ 	andl	IMM (0x80000000),d7 | get a's sign bit '
+ 	cmpl	d4,d0		| test now for infinity
+ 	beq	Lf$infty	| if a is INFINITY return with this sign
+ 	bchg	IMM (31),d7	| else we know b is INFINITY and has
+ 	bra	Lf$infty	| the opposite sign
+ 
+ |=============================================================================
+ |                             __mulsf3
+ |=============================================================================
+ 
+ | float __mulsf3(float, float);
+ SYM (__mulsf3):
+ 	link	a6,IMM (0)
+ 	moveml	d2-d7,sp@-
+ 	movel	a6@(8),d0	| get a into d0
+ 	movel	a6@(12),d1	| and b into d1
+ 	movel	d0,d7		| d7 will hold the sign of the product
+ 	eorl	d1,d7		|
+ 	andl	IMM (0x80000000),d7
+ 	movel	IMM (INFINITY),d6	| useful constant (+INFINITY)
+ 	movel	d6,d5			| another (mask for fraction)
+ 	notl	d5			|
+ 	movel	IMM (0x00800000),d4	| this is to put hidden bit back
+ 	bclr	IMM (31),d0		| get rid of a's sign bit '
+ 	movel	d0,d2			|
+ 	beq	Lmulsf$a$0		| branch if a is zero
+ 	bclr	IMM (31),d1		| get rid of b's sign bit '
+ 	movel	d1,d3		|
+ 	beq	Lmulsf$b$0	| branch if b is zero
+ 	cmpl	d6,d0		| is a big?
+ 	bhi	Lmulsf$inop	| if a is NaN return NaN
+ 	beq	Lmulsf$inf	| if a is INFINITY we have to check b
+ 	cmpl	d6,d1		| now compare b with INFINITY
+ 	bhi	Lmulsf$inop	| is b NaN?
+ 	beq	Lmulsf$overflow | is b INFINITY?
+ | Here we have both numbers finite and nonzero (and with no sign bit).
+ | Now we get the exponents into d2 and d3.
+ 	andl	d6,d2		| and isolate exponent in d2
+ 	beq	Lmulsf$a$den	| if exponent is zero we have a denormalized
+ 	andl	d5,d0		| and isolate fraction
+ 	orl	d4,d0		| and put hidden bit back
+ 	swap	d2		| I like exponents in the first byte
+ 	lsrw	IMM (7),d2	| 
+ Lmulsf$1:			| number
+ 	andl	d6,d3		|
+ 	beq	Lmulsf$b$den	|
+ 	andl	d5,d1		|
+ 	orl	d4,d1		|
+ 	swap	d3		|
+ 	lsrw	IMM (7),d3	|
+ Lmulsf$2:			|
+ 	addw	d3,d2		| add exponents
+ 	subw	IMM (F_BIAS+1),d2 | and subtract bias (plus one)
+ 
+ | We are now ready to do the multiplication. The situation is as follows:
+ | both a and b have bit FLT_MANT_DIG-1 set (even if they were 
+ | denormalized to start with!), which means that in the product 
+ | bit 2*(FLT_MANT_DIG-1) (that is, bit 2*FLT_MANT_DIG-2-32 of the 
+ | high long) is set. 
+ 
+ | To do the multiplication let us move the number a little bit around ...
+ 	movel	d1,d6		| second operand in d6
+ 	movel	d0,d5		| first operand in d4-d5
+ 	movel	IMM (0),d4
+ 	movel	d4,d1		| the sums will go in d0-d1
+ 	movel	d4,d0
+ 
+ | now bit FLT_MANT_DIG-1 becomes bit 31:
+ 	lsll	IMM (31-FLT_MANT_DIG+1),d6		
+ 
+ | Start the loop (we loop #FLT_MANT_DIG times):
+ 	movew	IMM (FLT_MANT_DIG-1),d3	
+ 1:	addl	d1,d1		| shift sum 
+ 	addxl	d0,d0
+ 	lsll	IMM (1),d6	| get bit bn
+ 	bcc	2f		| if not set skip sum
+ 	addl	d5,d1		| add a
+ 	addxl	d4,d0
+ 2:	dbf	d3,1b		| loop back
+ 
+ | Now we have the product in d0-d1, with bit (FLT_MANT_DIG - 1) + FLT_MANT_DIG
+ | (mod 32) of d0 set. The first thing to do now is to normalize it so bit 
+ | FLT_MANT_DIG is set (to do the rounding).
+ 	rorl	IMM (6),d1
+ 	swap	d1
+ 	movew	d1,d3
+ 	andw	IMM (0x03ff),d3
+ 	andw	IMM (0xfd00),d1
+ 	lsll	IMM (8),d0
+ 	addl	d0,d0
+ 	addl	d0,d0
+ 	orw	d3,d0
+ 
+ 	movew	IMM (MULTIPLY),d5
+ 	
+ 	btst	IMM (FLT_MANT_DIG+1),d0
+ 	beq	Lround$exit
+ 	lsrl	IMM (1),d0
+ 	roxrl	IMM (1),d1
+ 	addw	IMM (1),d2
+ 	bra	Lround$exit
+ 
+ Lmulsf$inop:
+ 	movew	IMM (MULTIPLY),d5
+ 	bra	Lf$inop
+ 
+ Lmulsf$overflow:
+ 	movew	IMM (MULTIPLY),d5
+ 	bra	Lf$overflow
+ 
+ Lmulsf$inf:
+ 	movew	IMM (MULTIPLY),d5
+ | If either is NaN return NaN; else both are (maybe infinite) numbers, so
+ | return INFINITY with the correct sign (which is in d7).
+ 	cmpl	d6,d1		| is b NaN?
+ 	bhi	Lf$inop		| if so return NaN
+ 	bra	Lf$overflow	| else return +/-INFINITY
+ 
+ | If either number is zero return zero, unless the other is +/-INFINITY, 
+ | or NaN, in which case we return NaN.
+ Lmulsf$b$0:
+ | Here d1 (==b) is zero.
+ 	movel	d1,d0		| put b into d0 (just a zero)
+ 	movel	a6@(8),d1	| get a again to check for non-finiteness
+ 	bra	1f
+ Lmulsf$a$0:
+ 	movel	a6@(12),d1	| get b again to check for non-finiteness
+ 1:	bclr	IMM (31),d1	| clear sign bit 
+ 	cmpl	IMM (INFINITY),d1 | and check for a large exponent
+ 	bge	Lf$inop		| if b is +/-INFINITY or NaN return NaN
+ 	lea	SYM (_fpCCR),a0	| else return zero
+ |ifdef PALMOS
+ 	subl	IMM (edata),a0
+ 	addl	a5,a0
+ |endif PALMOS	
+ 	movew	IMM (0),a0@	| 
+ 	moveml	sp@+,d2-d7	| 
+ 	unlk	a6		| 
+ 	rts			| 
+ 
+ | If a number is denormalized we put an exponent of 1 but do not put the 
+ | hidden bit back into the fraction; instead we shift left until bit 23
+ | (the hidden bit) is set, adjusting the exponent accordingly. We do this
+ | to ensure that the product of the fractions is close to 1.
+ Lmulsf$a$den:
+ 	movel	IMM (1),d2
+ 	andl	d5,d0
+ 1:	addl	d0,d0		| shift a left (until bit 23 is set)
+ 	subw	IMM (1),d2	| and adjust exponent
+ 	btst	IMM (FLT_MANT_DIG-1),d0
+ 	bne	Lmulsf$1	|
+ 	bra	1b		| else loop back
+ 
+ Lmulsf$b$den:
+ 	movel	IMM (1),d3
+ 	andl	d5,d1
+ 1:	addl	d1,d1		| shift b left until bit 23 is set
+ 	subw	IMM (1),d3	| and adjust exponent
+ 	btst	IMM (FLT_MANT_DIG-1),d1
+ 	bne	Lmulsf$2	|
+ 	bra	1b		| else loop back
+ 
+ |=============================================================================
+ |                             __divsf3
+ |=============================================================================
+ 
+ | float __divsf3(float, float);
+ SYM (__divsf3):
+ 	link	a6,IMM (0)
+ 	moveml	d2-d7,sp@-
+ 	movel	a6@(8),d0		| get a into d0
+ 	movel	a6@(12),d1		| and b into d1
+ 	movel	d0,d7			| d7 will hold the sign of the result
+ 	eorl	d1,d7			|
+ 	andl	IMM (0x80000000),d7	| 
+ 	movel	IMM (INFINITY),d6	| useful constant (+INFINITY)
+ 	movel	d6,d5			| another (mask for fraction)
+ 	notl	d5			|
+ 	movel	IMM (0x00800000),d4	| this is to put hidden bit back
+ 	bclr	IMM (31),d0		| get rid of a's sign bit '
+ 	movel	d0,d2			|
+ 	beq	Ldivsf$a$0		| branch if a is zero
+ 	bclr	IMM (31),d1		| get rid of b's sign bit '
+ 	movel	d1,d3			|
+ 	beq	Ldivsf$b$0		| branch if b is zero
+ 	cmpl	d6,d0			| is a big?
+ 	bhi	Ldivsf$inop		| if a is NaN return NaN
+ 	beq	Ldivsf$inf		| if a is INFINITY we have to check b
+ 	cmpl	d6,d1			| now compare b with INFINITY 
+ 	bhi	Ldivsf$inop		| if b is NaN return NaN
+ 	beq	Ldivsf$underflow
+ | Here we have both numbers finite and nonzero (and with no sign bit).
+ | Now we get the exponents into d2 and d3 and normalize the numbers to
+ | ensure that the ratio of the fractions is close to 1. We do this by
+ | making sure that bit #FLT_MANT_DIG-1 (hidden bit) is set.
+ 	andl	d6,d2		| and isolate exponent in d2
+ 	beq	Ldivsf$a$den	| if exponent is zero we have a denormalized
+ 	andl	d5,d0		| and isolate fraction
+ 	orl	d4,d0		| and put hidden bit back
+ 	swap	d2		| I like exponents in the first byte
+ 	lsrw	IMM (7),d2	| 
+ Ldivsf$1:			| 
+ 	andl	d6,d3		|
+ 	beq	Ldivsf$b$den	|
+ 	andl	d5,d1		|
+ 	orl	d4,d1		|
+ 	swap	d3		|
+ 	lsrw	IMM (7),d3	|
+ Ldivsf$2:			|
+ 	subw	d3,d2		| subtract exponents
+  	addw	IMM (F_BIAS),d2	| and add bias
+  
+ | We are now ready to do the division. We have prepared things in such a way
+ | that the ratio of the fractions will be less than 2 but greater than 1/2.
+ | At this point the registers in use are:
+ | d0	holds a (first operand, bit FLT_MANT_DIG=0, bit FLT_MANT_DIG-1=1)
+ | d1	holds b (second operand, bit FLT_MANT_DIG=1)
+ | d2	holds the difference of the exponents, corrected by the bias
+ | d7	holds the sign of the ratio
+ | d4, d5, d6 hold some constants
+ 	movel	d7,a0		| d6-d7 will hold the ratio of the fractions
+ 	movel	IMM (0),d6	| 
+ 	movel	d6,d7
+ 
+ 	movew	IMM (FLT_MANT_DIG+1),d3
+ 1:	cmpl	d0,d1		| is a < b?
+ 	bhi	2f		|
+ 	bset	d3,d6		| set a bit in d6
+ 	subl	d1,d0		| if a >= b  a <-- a-b
+ 	beq	3f		| if a is zero, exit
+ 2:	addl	d0,d0		| multiply a by 2
+ 	dbra	d3,1b
+ 
+ | Now we keep going to set the sticky bit ...
+ 	movew	IMM (FLT_MANT_DIG),d3
+ 1:	cmpl	d0,d1
+ 	ble	2f
+ 	addl	d0,d0
+ 	dbra	d3,1b
+ 	movel	IMM (0),d1
+ 	bra	3f
+ 2:	movel	IMM (0),d1
+ 	subw	IMM (FLT_MANT_DIG),d3
+ 	addw	IMM (31),d3
+ 	bset	d3,d1
+ 3:
+ 	movel	d6,d0		| put the ratio in d0-d1
+ 	movel	a0,d7		| get sign back
+ 
+ | Because of the normalization we did before we are guaranteed that 
+ | d0 is smaller than 2^26 but larger than 2^24. Thus bit 26 is not set,
+ | bit 25 could be set, and if it is not set then bit 24 is necessarily set.
+ 	btst	IMM (FLT_MANT_DIG+1),d0		
+ 	beq	1f              | if it is not set, then bit 24 is set
+ 	lsrl	IMM (1),d0	|
+ 	addw	IMM (1),d2	|
+ 1:
+ | Now round, check for over- and underflow, and exit.
+ 	movew	IMM (DIVIDE),d5
+ 	bra	Lround$exit
+ 
+ Ldivsf$inop:
+ 	movew	IMM (DIVIDE),d5
+ 	bra	Lf$inop
+ 
+ Ldivsf$overflow:
+ 	movew	IMM (DIVIDE),d5
+ 	bra	Lf$overflow
+ 
+ Ldivsf$underflow:
+ 	movew	IMM (DIVIDE),d5
+ 	bra	Lf$underflow
+ 
+ Ldivsf$a$0:
+ 	movew	IMM (DIVIDE),d5
+ | If a is zero check to see whether b is zero also. In that case return
+ | NaN; then check if b is NaN, and return NaN also in that case. Else
+ | return zero.
+ 	andl	IMM (0x7fffffff),d1	| clear sign bit and test b
+ 	beq	Lf$inop			| if b is also zero return NaN
+ 	cmpl	IMM (INFINITY),d1	| check for NaN
+ 	bhi	Lf$inop			| 
+ 	movel	IMM (0),d0		| else return zero
+ 	lea	SYM (_fpCCR),a0		|
+ |ifdef PALMOS
+ 	subl	IMM (edata),a0
+ 	addl	a5,a0
+ |endif PALMOS	
+ 	movew	IMM (0),a0@		|
+ 	moveml	sp@+,d2-d7		| 
+ 	unlk	a6			| 
+ 	rts				| 
+ 	
+ Ldivsf$b$0:
+ 	movew	IMM (DIVIDE),d5
+ | If we got here a is not zero. Check if a is NaN; in that case return NaN,
+ | else return +/-INFINITY. Remember that a is in d0 with the sign bit 
+ | cleared already.
+ 	cmpl	IMM (INFINITY),d0	| compare d0 with INFINITY
+ 	bhi	Lf$inop			| if larger it is NaN
+ 	bra	Lf$div$0		| else signal DIVIDE_BY_ZERO
+ 
+ Ldivsf$inf:
+ 	movew	IMM (DIVIDE),d5
+ | If a is INFINITY we have to check b
+ 	cmpl	IMM (INFINITY),d1	| compare b with INFINITY 
+ 	bge	Lf$inop			| if b is NaN or INFINITY return NaN
+ 	bra	Lf$overflow		| else return overflow
+ 
+ | If a number is denormalized we put an exponent of 1 but do not put the 
+ | bit back into the fraction.
+ Ldivsf$a$den:
+ 	movel	IMM (1),d2
+ 	andl	d5,d0
+ 1:	addl	d0,d0		| shift a left until bit FLT_MANT_DIG-1 is set
+ 	subw	IMM (1),d2	| and adjust exponent
+ 	btst	IMM (FLT_MANT_DIG-1),d0
+ 	bne	Ldivsf$1
+ 	bra	1b
+ 
+ Ldivsf$b$den:
+ 	movel	IMM (1),d3
+ 	andl	d5,d1
+ 1:	addl	d1,d1		| shift b left until bit FLT_MANT_DIG is set
+ 	subw	IMM (1),d3	| and adjust exponent
+ 	btst	IMM (FLT_MANT_DIG-1),d1
+ 	bne	Ldivsf$2
+ 	bra	1b
+ 
+ Lround$exit:
+ | This is a common exit point for __mulsf3 and __divsf3. 
+ 
+ | First check for underlow in the exponent:
+ 	cmpw	IMM (-FLT_MANT_DIG-1),d2		
+ 	blt	Lf$underflow	
+ | It could happen that the exponent is less than 1, in which case the 
+ | number is denormalized. In this case we shift right and adjust the 
+ | exponent until it becomes 1 or the fraction is zero (in the latter case 
+ | we signal underflow and return zero).
+ 	movel	IMM (0),d6	| d6 is used temporarily
+ 	cmpw	IMM (1),d2	| if the exponent is less than 1 we 
+ 	bge	2f		| have to shift right (denormalize)
+ 1:	addw	IMM (1),d2	| adjust the exponent
+ 	lsrl	IMM (1),d0	| shift right once 
+ 	roxrl	IMM (1),d1	|
+ 	roxrl	IMM (1),d6	| d6 collect bits we would lose otherwise
+ 	cmpw	IMM (1),d2	| is the exponent 1 already?
+ 	beq	2f		| if not loop back
+ 	bra	1b              |
+ 	bra	Lf$underflow	| safety check, shouldn't execute '
+ 2:	orl	d6,d1		| this is a trick so we don't lose  '
+ 				| the extra bits which were flushed right
+ | Now call the rounding routine (which takes care of denormalized numbers):
+ 	lea	Lround$0(%pc),a0	| to return from rounding routine
+ 	lea	SYM (_fpCCR),a1	| check the rounding mode
+ |ifdef PALMOS
+ 	subl	IMM (edata),a1
+ 	addl	a5,a1
+ |endif PALMOS	
+ 	movew	a1@(6),d6	| rounding mode in d6
+ 	beq	Lround$to$nearest
+ 	cmpw	IMM (ROUND_TO_PLUS),d6
+ 	bhi	Lround$to$minus
+ 	blt	Lround$to$zero
+ 	bra	Lround$to$plus
+ Lround$0:
+ | Here we have a correctly rounded result (either normalized or denormalized).
+ 
+ | Here we should have either a normalized number or a denormalized one, and
+ | the exponent is necessarily larger or equal to 1 (so we don't have to  '
+ | check again for underflow!). We have to check for overflow or for a 
+ | denormalized number (which also signals underflow).
+ | Check for overflow (i.e., exponent >= 255).
+ 	cmpw	IMM (0x00ff),d2
+ 	bge	Lf$overflow
+ | Now check for a denormalized number (exponent==0).
+ 	movew	d2,d2
+ 	beq	Lf$den
+ 1:
+ | Put back the exponents and sign and return.
+ 	lslw	IMM (7),d2	| exponent back to fourth byte
+ 	bclr	IMM (FLT_MANT_DIG-1),d0
+ 	swap	d0		| and put back exponent
+ 	orw	d2,d0		| 
+ 	swap	d0		|
+ 	orl	d7,d0		| and sign also
+ 
+ 	lea	SYM (_fpCCR),a0
+ |ifdef PALMOS
+ 	subl	IMM (edata),a0
+ 	addl	a5,a0
+ |endif PALMOS	
+ 	movew	IMM (0),a0@
+ 	moveml	sp@+,d2-d7
+ 	unlk	a6
+ 	rts
+ 
+ |=============================================================================
+ |                             __negsf2
+ |=============================================================================
+ 
+ | This is trivial and could be shorter if we didn't bother checking for NaN '
+ | and +/-INFINITY.
+ 
+ | float __negsf2(float);
+ SYM (__negsf2):
+ 	link	a6,IMM (0)
+ 	moveml	d2-d7,sp@-
+ 	movew	IMM (NEGATE),d5
+ 	movel	a6@(8),d0	| get number to negate in d0
+ 	bchg	IMM (31),d0	| negate
+ 	movel	d0,d1		| make a positive copy
+ 	bclr	IMM (31),d1	|
+ 	tstl	d1		| check for zero
+ 	beq	2f		| if zero (either sign) return +zero
+ 	cmpl	IMM (INFINITY),d1 | compare to +INFINITY
+ 	blt	1f		|
+ 	bhi	Lf$inop		| if larger (fraction not zero) is NaN
+ 	movel	d0,d7		| else get sign and return INFINITY
+ 	andl	IMM (0x80000000),d7
+ 	bra	Lf$infty		
+ 1:	lea	SYM (_fpCCR),a0
+ |ifdef PALMOS
+ 	subl	IMM (edata),a0
+ 	addl	a5,a0
+ |endif PALMOS	
+ 	movew	IMM (0),a0@
+ 	moveml	sp@+,d2-d7
+ 	unlk	a6
+ 	rts
+ 2:	bclr	IMM (31),d0
+ 	bra	1b
+ 
+ |=============================================================================
+ |                             __cmpsf2
+ |=============================================================================
+ 
+ GREATER =  1
+ LESS    = -1
+ EQUAL   =  0
+ 
+ | int __cmpsf2(float, float);
+ SYM (__cmpsf2):
+ 	link	a6,IMM (0)
+ 	moveml	d2-d7,sp@- 	| save registers
+ 	movew	IMM (COMPARE),d5
+ 	movel	a6@(8),d0	| get first operand
+ 	movel	a6@(12),d1	| get second operand
+ | Check if either is NaN, and in that case return garbage and signal
+ | INVALID_OPERATION. Check also if either is zero, and clear the signs
+ | if necessary.
+ 	movel	d0,d6
+ 	andl	IMM (0x7fffffff),d0
+ 	beq	Lcmpsf$a$0
+ 	cmpl	IMM (0x7f800000),d0
+ 	bhi	Lf$inop
+ Lcmpsf$1:
+ 	movel	d1,d7
+ 	andl	IMM (0x7fffffff),d1
+ 	beq	Lcmpsf$b$0
+ 	cmpl	IMM (0x7f800000),d1
+ 	bhi	Lf$inop
+ Lcmpsf$2:
+ | Check the signs
+ 	eorl	d6,d7
+ 	bpl	1f
+ | If the signs are not equal check if a >= 0
+ 	tstl	d6
+ 	bpl	Lcmpsf$a$gt$b	| if (a >= 0 && b < 0) => a > b
+ 	bmi	Lcmpsf$b$gt$a	| if (a < 0 && b >= 0) => a < b
+ 1:
+ | If the signs are equal check for < 0
+ 	tstl	d6
+ 	bpl	1f
+ | If both are negative exchange them
+ 	exg	d0,d1
+ 1:
+ | Now that they are positive we just compare them as longs (does this also
+ | work for denormalized numbers?).
+ 	cmpl	d0,d1
+ 	bhi	Lcmpsf$b$gt$a	| |b| > |a|
+ 	bne	Lcmpsf$a$gt$b	| |b| < |a|
+ | If we got here a == b.
+ 	movel	IMM (EQUAL),d0
+ 	moveml	sp@+,d2-d7 	| put back the registers
+ 	unlk	a6
+ 	rts
+ Lcmpsf$a$gt$b:
+ 	movel	IMM (GREATER),d0
+ 	moveml	sp@+,d2-d7 	| put back the registers
+ 	unlk	a6
+ 	rts
+ Lcmpsf$b$gt$a:
+ 	movel	IMM (LESS),d0
+ 	moveml	sp@+,d2-d7 	| put back the registers
+ 	unlk	a6
+ 	rts
+ 
+ Lcmpsf$a$0:	
+ 	bclr	IMM (31),d6
+ 	bra	Lcmpsf$1
+ Lcmpsf$b$0:
+ 	bclr	IMM (31),d7
+ 	bra	Lcmpsf$2
+ 
+ |=============================================================================
+ |                           rounding routines
+ |=============================================================================
+ 
+ | The rounding routines expect the number to be normalized in registers
+ | d0-d1, with the exponent in register d2. They assume that the 
+ | exponent is larger or equal to 1. They return a properly normalized number
+ | if possible, and a denormalized number otherwise. The exponent is returned
+ | in d2.
+ 
+ Lround$to$nearest:
+ | We now normalize as suggested by D. Knuth ("Seminumerical Algorithms"):
+ | Here we assume that the exponent is not too small (this should be checked
+ | before entering the rounding routine), but the number could be denormalized.
+ 
+ | Check for denormalized numbers:
+ 1:	btst	IMM (FLT_MANT_DIG),d0
+ 	bne	2f		| if set the number is normalized
+ | Normalize shifting left until bit #FLT_MANT_DIG is set or the exponent 
+ | is one (remember that a denormalized number corresponds to an 
+ | exponent of -F_BIAS+1).
+ 	cmpw	IMM (1),d2	| remember that the exponent is at least one
+  	beq	2f		| an exponent of one means denormalized
+ 	addl	d1,d1		| else shift and adjust the exponent
+ 	addxl	d0,d0		|
+ 	dbra	d2,1b		|
+ 2:
+ | Now round: we do it as follows: after the shifting we can write the
+ | fraction part as f + delta, where 1 < f < 2^25, and 0 <= delta <= 2.
+ | If delta < 1, do nothing. If delta > 1, add 1 to f. 
+ | If delta == 1, we make sure the rounded number will be even (odd?) 
+ | (after shifting).
+ 	btst	IMM (0),d0	| is delta < 1?
+ 	beq	2f		| if so, do not do anything
+ 	tstl	d1		| is delta == 1?
+ 	bne	1f		| if so round to even
+ 	movel	d0,d1		| 
+ 	andl	IMM (2),d1	| bit 1 is the last significant bit
+ 	addl	d1,d0		| 
+ 	bra	2f		| 
+ 1:	movel	IMM (1),d1	| else add 1 
+ 	addl	d1,d0		|
+ | Shift right once (because we used bit #FLT_MANT_DIG!).
+ 2:	lsrl	IMM (1),d0		
+ | Now check again bit #FLT_MANT_DIG (rounding could have produced a
+ | 'fraction overflow' ...).
+ 	btst	IMM (FLT_MANT_DIG),d0	
+ 	beq	1f
+ 	lsrl	IMM (1),d0
+ 	addw	IMM (1),d2
+ 1:
+ | If bit #FLT_MANT_DIG-1 is clear we have a denormalized number, so we 
+ | have to put the exponent to zero and return a denormalized number.
+ 	btst	IMM (FLT_MANT_DIG-1),d0
+ 	beq	1f
+ 	jmp	a0@
+ 1:	movel	IMM (0),d2
+ 	jmp	a0@
+ 
+ Lround$to$zero:
+ Lround$to$plus:
+ Lround$to$minus:
+ 	jmp	a0@
+ #endif /* L_float */
+ 
+ | gcc expects the routines __eqdf2, __nedf2, __gtdf2, __gedf2,
+ | __ledf2, __ltdf2 to all return the same value as a direct call to
+ | __cmpdf2 would.  In this implementation, each of these routines
+ | simply calls __cmpdf2.  It would be more efficient to give the
+ | __cmpdf2 routine several names, but separating them out will make it
+ | easier to write efficient versions of these routines someday.
+ 
+ #ifdef  L_eqdf2
+ LL0:
+ 	.text
+ 	.proc
+ |#PROC# 04
+ 	LF18	=	4
+ 	LS18	=	128
+ 	LFF18	=	0
+ 	LSS18	=	0
+ 	LV18	=	0
+ 	.text
+ 	.globl	SYM (__eqdf2)
+ SYM (__eqdf2):
+ |#PROLOGUE# 0
+ 	link	a6,IMM (0)
+ |#PROLOGUE# 1
+ 	movl	a6@(20),sp@-
+ 	movl	a6@(16),sp@-
+ 	movl	a6@(12),sp@-
+ 	movl	a6@(8),sp@-
+ 	bsr	SYM (__cmpdf2)
+ |#PROLOGUE# 2
+ 	unlk	a6
+ |#PROLOGUE# 3
+ 	rts
+ #endif /* L_eqdf2 */
+ 
+ #ifdef  L_nedf2
+ LL0:
+ 	.text
+ 	.proc
+ |#PROC# 04
+ 	LF18	=	8
+ 	LS18	=	132
+ 	LFF18	=	0
+ 	LSS18	=	0
+ 	LV18	=	0
+ 	.text
+ 	.globl	SYM (__nedf2)
+ SYM (__nedf2):
+ |#PROLOGUE# 0
+ 	link	a6,IMM (0)
+ |#PROLOGUE# 1
+ 	movl	a6@(20),sp@-
+ 	movl	a6@(16),sp@-
+ 	movl	a6@(12),sp@-
+ 	movl	a6@(8),sp@-
+ 	bsr	SYM (__cmpdf2)
+ |#PROLOGUE# 2
+ 	unlk	a6
+ |#PROLOGUE# 3
+ 	rts
+ #endif /* L_nedf2 */
+ 
+ #ifdef  L_gtdf2
+ 	.text
+ 	.proc
+ |#PROC# 04
+ 	LF18	=	8
+ 	LS18	=	132
+ 	LFF18	=	0
+ 	LSS18	=	0
+ 	LV18	=	0
+ 	.text
+ 	.globl	SYM (__gtdf2)
+ SYM (__gtdf2):
+ |#PROLOGUE# 0
+ 	link	a6,IMM (0)
+ |#PROLOGUE# 1
+ 	movl	a6@(20),sp@-
+ 	movl	a6@(16),sp@-
+ 	movl	a6@(12),sp@-
+ 	movl	a6@(8),sp@-
+ 	bsr	SYM (__cmpdf2)
+ |#PROLOGUE# 2
+ 	unlk	a6
+ |#PROLOGUE# 3
+ 	rts
+ #endif /* L_gtdf2 */
+ 
+ #ifdef  L_gedf2
+ LL0:
+ 	.text
+ 	.proc
+ |#PROC# 04
+ 	LF18	=	8
+ 	LS18	=	132
+ 	LFF18	=	0
+ 	LSS18	=	0
+ 	LV18	=	0
+ 	.text
+ 	.globl	SYM (__gedf2)
+ SYM (__gedf2):
+ |#PROLOGUE# 0
+ 	link	a6,IMM (0)
+ |#PROLOGUE# 1
+ 	movl	a6@(20),sp@-
+ 	movl	a6@(16),sp@-
+ 	movl	a6@(12),sp@-
+ 	movl	a6@(8),sp@-
+ 	bsr	SYM (__cmpdf2)
+ |#PROLOGUE# 2
+ 	unlk	a6
+ |#PROLOGUE# 3
+ 	rts
+ #endif /* L_gedf2 */
+ 
+ #ifdef  L_ltdf2
+ LL0:
+ 	.text
+ 	.proc
+ |#PROC# 04
+ 	LF18	=	8
+ 	LS18	=	132
+ 	LFF18	=	0
+ 	LSS18	=	0
+ 	LV18	=	0
+ 	.text
+ 	.globl	SYM (__ltdf2)
+ SYM (__ltdf2):
+ |#PROLOGUE# 0
+ 	link	a6,IMM (0)
+ |#PROLOGUE# 1
+ 	movl	a6@(20),sp@-
+ 	movl	a6@(16),sp@-
+ 	movl	a6@(12),sp@-
+ 	movl	a6@(8),sp@-
+ 	bsr	SYM (__cmpdf2)
+ |#PROLOGUE# 2
+ 	unlk	a6
+ |#PROLOGUE# 3
+ 	rts
+ #endif /* L_ltdf2 */
+ 
+ #ifdef  L_ledf2
+ 	.text
+ 	.proc
+ |#PROC# 04
+ 	LF18	=	8
+ 	LS18	=	132
+ 	LFF18	=	0
+ 	LSS18	=	0
+ 	LV18	=	0
+ 	.text
+ 	.globl	SYM (__ledf2)
+ SYM (__ledf2):
+ |#PROLOGUE# 0
+ 	link	a6,IMM (0)
+ |#PROLOGUE# 1
+ 	movl	a6@(20),sp@-
+ 	movl	a6@(16),sp@-
+ 	movl	a6@(12),sp@-
+ 	movl	a6@(8),sp@-
+ 	bsr	SYM (__cmpdf2)
+ |#PROLOGUE# 2
+ 	unlk	a6
+ |#PROLOGUE# 3
+ 	rts
+ #endif /* L_ledf2 */
+ 
+ | The comments above about __eqdf2, et. al., also apply to __eqsf2,
+ | et. al., except that the latter call __cmpsf2 rather than __cmpdf2.
+ 
+ #ifdef  L_eqsf2
+ 	.text
+ 	.proc
+ |#PROC# 04
+ 	LF18	=	4
+ 	LS18	=	128
+ 	LFF18	=	0
+ 	LSS18	=	0
+ 	LV18	=	0
+ 	.text
+ 	.globl	SYM (__eqsf2)
+ SYM (__eqsf2):
+ |#PROLOGUE# 0
+ 	link	a6,IMM (0)
+ |#PROLOGUE# 1
+ 	movl	a6@(12),sp@-
+ 	movl	a6@(8),sp@-
+ 	bsr	SYM (__cmpsf2)
+ |#PROLOGUE# 2
+ 	unlk	a6
+ |#PROLOGUE# 3
+ 	rts
+ #endif /* L_eqsf2 */
+ 
+ #ifdef  L_nesf2
+ 	.text
+ 	.proc
+ |#PROC# 04
+ 	LF18	=	8
+ 	LS18	=	132
+ 	LFF18	=	0
+ 	LSS18	=	0
+ 	LV18	=	0
+ 	.text
+ 	.globl	SYM (__nesf2)
+ SYM (__nesf2):
+ |#PROLOGUE# 0
+ 	link	a6,IMM (0)
+ |#PROLOGUE# 1
+ 	movl	a6@(12),sp@-
+ 	movl	a6@(8),sp@-
+ 	bsr	SYM (__cmpsf2)
+ |#PROLOGUE# 2
+ 	unlk	a6
+ |#PROLOGUE# 3
+ 	rts
+ #endif /* L_nesf2 */
+ 
+ #ifdef  L_gtsf2
+ 	.text
+ 	.proc
+ |#PROC# 04
+ 	LF18	=	8
+ 	LS18	=	132
+ 	LFF18	=	0
+ 	LSS18	=	0
+ 	LV18	=	0
+ 	.text
+ 	.globl	SYM (__gtsf2)
+ SYM (__gtsf2):
+ |#PROLOGUE# 0
+ 	link	a6,IMM (0)
+ |#PROLOGUE# 1
+ 	movl	a6@(12),sp@-
+ 	movl	a6@(8),sp@-
+ 	bsr	SYM (__cmpsf2)
+ |#PROLOGUE# 2
+ 	unlk	a6
+ |#PROLOGUE# 3
+ 	rts
+ #endif /* L_gtsf2 */
+ 
+ #ifdef  L_gesf2
+ 	.text
+ 	.proc
+ |#PROC# 04
+ 	LF18	=	8
+ 	LS18	=	132
+ 	LFF18	=	0
+ 	LSS18	=	0
+ 	LV18	=	0
+ 	.text
+ 	.globl	SYM (__gesf2)
+ SYM (__gesf2):
+ |#PROLOGUE# 0
+ 	link	a6,IMM (0)
+ |#PROLOGUE# 1
+ 	movl	a6@(12),sp@-
+ 	movl	a6@(8),sp@-
+ 	bsr	SYM (__cmpsf2)
+ |#PROLOGUE# 2
+ 	unlk	a6
+ |#PROLOGUE# 3
+ 	rts
+ #endif /* L_gesf2 */
+ 
+ #ifdef  L_ltsf2
+ 	.text
+ 	.proc
+ |#PROC# 04
+ 	LF18	=	8
+ 	LS18	=	132
+ 	LFF18	=	0
+ 	LSS18	=	0
+ 	LV18	=	0
+ 	.text
+ 	.globl	SYM (__ltsf2)
+ SYM (__ltsf2):
+ |#PROLOGUE# 0
+ 	link	a6,IMM (0)
+ |#PROLOGUE# 1
+ 	movl	a6@(12),sp@-
+ 	movl	a6@(8),sp@-
+ 	bsr	SYM (__cmpsf2)
+ |#PROLOGUE# 2
+ 	unlk	a6
+ |#PROLOGUE# 3
+ 	rts
+ #endif /* L_ltsf2 */
+ 
+ #ifdef  L_lesf2
+ 	.text
+ 	.proc
+ |#PROC# 04
+ 	LF18	=	8
+ 	LS18	=	132
+ 	LFF18	=	0
+ 	LSS18	=	0
+ 	LV18	=	0
+ 	.text
+ 	.globl	SYM (__lesf2)
+ SYM (__lesf2):
+ |#PROLOGUE# 0
+ 	link	a6,IMM (0)
+ |#PROLOGUE# 1
+ 	movl	a6@(12),sp@-
+ 	movl	a6@(8),sp@-
+ 	bsr	SYM (__cmpsf2)
+ |#PROLOGUE# 2
+ 	unlk	a6
+ |#PROLOGUE# 3
+ 	rts
+ #endif /* L_lesf2 */
+ 
diff -r -c -x *.orig -x *.rej -x #* -x *~ -N orig/gcc-2.7.2.2/config/m68k/m68k.c gcc-2.7.2.2/config/m68k/m68k.c
*** orig/gcc-2.7.2.2/config/m68k/m68k.c	Thu Sep 28 19:00:17 1995
--- gcc-2.7.2.2/config/m68k/m68k.c	Wed Mar  5 19:59:09 1997
***************
*** 69,75 ****
        emit_insn (insn);
      }
  }
- 
  
  /* This function generates the assembly code for function entry.
     STREAM is a stdio stream to output the code to.
--- 69,74 ----
***************
*** 236,241 ****
--- 235,250 ----
      }
    if (flag_pic && current_function_uses_pic_offset_table)
      {
+       if (TARGET_PCREL)
+ 	{
+ 	  asm_fprintf (stream, "\tmove.l %s, %s\n",
+ 		       reg_names[13],
+ 		       reg_names[PIC_OFFSET_TABLE_REGNUM]);
+ 	  asm_fprintf (stream, "\tsub.l #edata, %s\n",
+ 		       reg_names[PIC_OFFSET_TABLE_REGNUM]);
+ 	}
+       else
+ 	{
  #ifdef MOTOROLA
        asm_fprintf (stream, "\t%Olea (%Rpc, %U_GLOBAL_OFFSET_TABLE_@GOTPC), %s\n",
  		   reg_names[PIC_OFFSET_TABLE_REGNUM]);
***************
*** 246,251 ****
--- 255,261 ----
  		   reg_names[PIC_OFFSET_TABLE_REGNUM],
  		   reg_names[PIC_OFFSET_TABLE_REGNUM]);
  #endif
+ 	}
      }
  }
  
***************
*** 537,542 ****
--- 547,562 ----
      asm_fprintf (stream, "\trtd %0I%d\n", current_function_pops_args);
    else
      fprintf (stream, "\trts\n");
+ 
+ #ifdef PALMOS
+   if (TARGET_DEBUG_LABELS)
+     {
+       int len = strlen (current_function_name);
+       ASM_OUTPUT_BYTE (stream, (len | 0x80));
+       assemble_string (current_function_name, len < 0x7f ? len : 0x7f);
+       ASM_OUTPUT_BYTE (stream, 0);
+     }
+ #endif /* PALMOS */
  }
  
  /* Similar to general_operand, but exclude stack_pointer_rtx.  */
***************
*** 1002,1010 ****
--- 1022,1042 ----
        if (reg == 0)
  	abort ();
  
+ #ifdef PALMOS
+       if (GET_CODE(orig) == SYMBOL_REF && SYMBOL_REF_FLAG (orig)
+ 	  || GET_CODE (orig) == LABEL_REF)
+ 	{
+ 	  pic_ref = gen_rtx (PLUS, Pmode, 
+ 			     gen_rtx (PC, Pmode),
+ 			     orig);
+ 	}
+       else
+ 	pic_ref = gen_rtx (PLUS, Pmode, pic_offset_table_rtx, orig);
+ #else
        pic_ref = gen_rtx (MEM, Pmode,
  			 gen_rtx (PLUS, Pmode,
  				  pic_offset_table_rtx, orig));
+ #endif
        current_function_uses_pic_offset_table = 1;
        RTX_UNCHANGING_P (pic_ref) = 1;
        emit_move_insn (reg, pic_ref);
***************
*** 2438,2444 ****
  	    if (addr != 0)
  	      {
  		output_addr_const (file, addr);
! 	        if (flag_pic && (breg == pic_offset_table_rtx))
  	          fprintf (file, "@GOT");
  	      }
  	    fprintf (file, "(%s", reg_names[REGNO (breg)]);
--- 2470,2476 ----
  	    if (addr != 0)
  	      {
  		output_addr_const (file, addr);
! 	        if (!TARGET_PCREL && flag_pic && (breg == pic_offset_table_rtx))
  	          fprintf (file, "@GOT");
  	      }
  	    fprintf (file, "(%s", reg_names[REGNO (breg)]);
diff -r -c -x *.orig -x *.rej -x #* -x *~ -N orig/gcc-2.7.2.2/config/m68k/m68k.h gcc-2.7.2.2/config/m68k/m68k.h
*** orig/gcc-2.7.2.2/config/m68k/m68k.h	Sat Oct 21 00:10:26 1995
--- gcc-2.7.2.2/config/m68k/m68k.h	Wed Feb 19 11:33:28 1997
***************
*** 93,98 ****
--- 93,101 ----
  /* Use the 68040-only fp instructions (-m68040).  */
  #define TARGET_68040_ONLY (target_flags & 01000)
  
+ /* Use only relative addressing */
+ #define TARGET_PCREL (target_flags & 02000)
+ 
  /* Macro to define tables used to set the flags.
     This is a list in braces of pairs in braces,
     each pair being { "NAME", VALUE }
***************
*** 110,115 ****
--- 113,119 ----
      { "c68000", -01405},			\
      { "soft-float", -01102},			\
      { "nobitfield", -4},			\
+     { "pcrel", 02000},				\
      { "rtd", 8},				\
      { "nortd", -8},				\
      { "short", 040},				\
***************
*** 1154,1160 ****
     || (GET_CODE (X) == PLUS && XEXP (X, 0) == pic_offset_table_rtx 	\
         && flag_pic && GET_CODE (XEXP (X, 1)) == SYMBOL_REF)		\
     || (GET_CODE (X) == PLUS && XEXP (X, 0) == pic_offset_table_rtx 	\
!        && flag_pic && GET_CODE (XEXP (X, 1)) == LABEL_REF))		\
  
  #if 0
  /* This should replace the last two (non-pic) lines
--- 1158,1164 ----
     || (GET_CODE (X) == PLUS && XEXP (X, 0) == pic_offset_table_rtx 	\
         && flag_pic && GET_CODE (XEXP (X, 1)) == SYMBOL_REF)		\
     || (GET_CODE (X) == PLUS && XEXP (X, 0) == pic_offset_table_rtx 	\
!        && flag_pic && GET_CODE (XEXP (X, 1)) == LABEL_REF))
  
  #if 0
  /* This should replace the last two (non-pic) lines
diff -r -c -x *.orig -x *.rej -x #* -x *~ -N orig/gcc-2.7.2.2/config/m68k/m68k.md gcc-2.7.2.2/config/m68k/m68k.md
*** orig/gcc-2.7.2.2/config/m68k/m68k.md	Tue Nov  7 16:57:30 1995
--- gcc-2.7.2.2/config/m68k/m68k.md	Wed Mar  5 21:06:48 1997
***************
*** 791,801 ****
--- 791,813 ----
           register (a new pseudo, or the final destination if reload_in_progress
           is set).   Then fall through normally */
        extern rtx legitimize_pic_address();
+ 
        rtx temp = reload_in_progress ? operands[0] : gen_reg_rtx (Pmode);
        operands[1] = legitimize_pic_address (operands[1], SImode, temp);
      }
  }")
  
+ ;;
+ ;; This is a special pattern we generate to load the address of 
+ ;; a symbol in the text segment.
+ ;;
+ (define_insn ""
+   [(set (match_operand:SI 0 "general_operand" "=a")
+ 	(plus:SI (pc)
+ 		 (match_operand:SI 1 "" "X")))]
+   "TARGET_PCREL"
+   "lea %a1(%%pc),%0")
+ 
  ;; General case of fullword move.  The register constraints
  ;; force integer constants in range for a moveq to be reloaded
  ;; if they are headed for memory.
***************
*** 803,809 ****
    ;; Notes: make sure no alternative allows g vs g.
    ;; We don't allow f-regs since fixed point cannot go in them.
    ;; We do allow y and x regs since fixed point is allowed in them.
!   [(set (match_operand:SI 0 "general_operand" "=g,da,y,!*x*r*m")
  	(match_operand:SI 1 "general_operand" "daymKs,i,g,*x*r*m"))]
    ""
    "*
--- 815,821 ----
    ;; Notes: make sure no alternative allows g vs g.
    ;; We don't allow f-regs since fixed point cannot go in them.
    ;; We do allow y and x regs since fixed point is allowed in them.
!   [(set (match_operand:SI 0 "general_operand" "=g,*da,y,!*x*r*m")
  	(match_operand:SI 1 "general_operand" "daymKs,i,g,*x*r*m"))]
    ""
    "*
***************
*** 837,850 ****
    else if ((GET_CODE (operands[1]) == SYMBOL_REF
  	    || GET_CODE (operands[1]) == CONST)
  	   && push_operand (operands[0], SImode))
!     return \"pea %a1\";
    else if ((GET_CODE (operands[1]) == SYMBOL_REF
  	    || GET_CODE (operands[1]) == CONST)
  	   && ADDRESS_REG_P (operands[0]))
!     return \"lea %a1,%0\";
!   return \"move%.l %1,%0\";
  }")
  
  (define_insn "movhi"
    [(set (match_operand:HI 0 "general_operand" "=g")
  	(match_operand:HI 1 "general_operand" "g"))]
--- 849,875 ----
    else if ((GET_CODE (operands[1]) == SYMBOL_REF
  	    || GET_CODE (operands[1]) == CONST)
  	   && push_operand (operands[0], SImode))
! 	{ if (TARGET_PCREL && SYMBOL_REF_FLAG (operands[1])) 
! 	     return \"pea %a1(%%pc)\";
!           else 
!              return \"pea %a1\"; }
    else if ((GET_CODE (operands[1]) == SYMBOL_REF
  	    || GET_CODE (operands[1]) == CONST)
  	   && ADDRESS_REG_P (operands[0]))
! 	{ if (TARGET_PCREL && SYMBOL_REF_FLAG (operands[1])) 
! 	     return \"lea %a1(%%pc),%0\";
!           else 
!              return \"lea %a1,%0\"; }
!   if ((GET_CODE (operands[1]) == SYMBOL_REF
!       || GET_CODE (operands[1]) == CONST)	
!       && TARGET_PCREL
!       && SYMBOL_REF_FLAG (operands[1]))
!     return \"pea %a1(%%pc); move%.l (%%sp)+,%0\";
!   else
!     return \"move%.l %1,%0\";
  }")
  
+ 
  (define_insn "movhi"
    [(set (match_operand:HI 0 "general_operand" "=g")
  	(match_operand:HI 1 "general_operand" "g"))]
***************
*** 949,954 ****
--- 974,982 ----
        && XEXP (XEXP (operands[0], 0), 0) == stack_pointer_rtx
        && ! ADDRESS_REG_P (operands[1]))
      {
+ #ifdef PALMOS
+       return \"move.b %1,%0\";
+ #else
        xoperands[1] = operands[1];
        xoperands[2]
          = gen_rtx (MEM, QImode,
***************
*** 957,962 ****
--- 985,991 ----
        /* We must put it in the low-order, high-numbered byte.  */
        output_asm_insn (\"move%.b %1,%-\;move%.b %@,%2\", xoperands);
        return \"\";
+ #endif
      }
  
    /* Moving a byte into an address register is not possible.  */
***************
*** 5582,5590 ****
    ""
    "*
  #ifdef MOTOROLA
!   return \"jbra %l0\";
  #else
!   return \"jra %l0\";
  #endif
  ")
  
--- 5611,5621 ----
    ""
    "*
  #ifdef MOTOROLA
!   if (!TARGET_PCREL) return \"jbra %l0\";
!   else return \"bra %l0\";
  #else
!   if (!TARGET_PCREL) return \"jra %l0\";
!   else return \"bra %l0\";
  #endif
  ")
  
***************
*** 5875,5881 ****
--- 5906,5914 ----
    "
  {
    if (flag_pic && GET_CODE (XEXP (operands[0], 0)) == SYMBOL_REF)
+   {
      SYMBOL_REF_FLAG (XEXP (operands[0], 0)) = 1;
+   }
  }")
  
  ;; This is a normal call sequence.
***************
*** 5884,5890 ****
  	 (match_operand:SI 1 "general_operand" "g"))]
    ;; Operand 1 not really used on the m68000.
  
!   "! flag_pic"
    "*
  #if defined (MOTOROLA) && !defined (USE_GAS)
  #ifdef MOTOROLA_BSR
--- 5917,5923 ----
  	 (match_operand:SI 1 "general_operand" "g"))]
    ;; Operand 1 not really used on the m68000.
  
!   "(! flag_pic)"
    "*
  #if defined (MOTOROLA) && !defined (USE_GAS)
  #ifdef MOTOROLA_BSR
***************
*** 5908,5913 ****
--- 5941,5955 ----
    "*
    if (GET_CODE (operands[0]) == MEM 
        && GET_CODE (XEXP (operands[0], 0)) == SYMBOL_REF)
+ #ifdef PALMOS
+   {
+     char *name = XSTR (XEXP (operands[0], 0), 0); 
+     if (name[0] == '*')
+       return &name[1];
+     else
+       return \"bsr.w %0\";
+   }
+ #else    
  #ifdef MOTOROLA
  #ifdef HPUX_ASM
      return \"bsr.l %0\";
***************
*** 5923,5928 ****
--- 5965,5971 ----
         GAS just plain ignores it.  */
      return \"jbsr %0,a1\";
  #endif
+ #endif
    return \"jsr %0\";
  ")
  
***************
*** 5947,5953 ****
  	(call (match_operand:QI 1 "memory_operand" "o")
  	      (match_operand:SI 2 "general_operand" "g")))]
    ;; Operand 2 not really used on the m68000.
!   "! flag_pic"
    "*
  #if defined (MOTOROLA) && !defined (USE_GAS)
  #ifdef MOTOROLA_BSR
--- 5990,5996 ----
  	(call (match_operand:QI 1 "memory_operand" "o")
  	      (match_operand:SI 2 "general_operand" "g")))]
    ;; Operand 2 not really used on the m68000.
!   "(! flag_pic)"
    "*
  #if defined (MOTOROLA) && !defined (USE_GAS)
  #ifdef MOTOROLA_BSR
***************
*** 5971,5976 ****
--- 6014,6028 ----
    "*
    if (GET_CODE (operands[1]) == MEM 
        && GET_CODE (XEXP (operands[1], 0)) == SYMBOL_REF)
+ #ifdef PALMOS
+   {
+     char *name = XSTR (XEXP (operands[1], 0), 0); 
+     if (name[0] == '*')
+       return &name[1];
+     else
+       return \"bsr.w %1\";
+   }
+ #else
  #ifdef MOTOROLA
  #ifdef HPUX_ASM
      return \"bsr.l %1\";
***************
*** 5986,5991 ****
--- 6038,6044 ----
         GAS just plain ignores it.  */
      return \"jbsr %1,a1\";
  #endif
+ #endif
    return \"jsr %1\";
  ")
  
***************
*** 6096,6101 ****
--- 6149,6163 ----
  #endif /* SGS_SWITCH_TABLES or not MOTOROLA */
      }
  #endif /* SGS_NO_LI */
+ 
+ #ifdef PALMOS
+   if (TARGET_PCREL && GET_CODE (operands[1]) == SYMBOL_REF) 
+   {
+     if (!SYMBOL_REF_FLAG (operands[1])) 
+       abort ();
+     return \"lea %a1(%%pc),%0\";
+   }
+ #endif
  
    return \"lea %a1,%0\";
  }")
diff -r -c -x *.orig -x *.rej -x #* -x *~ -N orig/gcc-2.7.2.2/config/m68k/m68kpalmos.h gcc-2.7.2.2/config/m68k/m68kpalmos.h
*** orig/gcc-2.7.2.2/config/m68k/m68kpalmos.h	Thu Jan  1 01:00:00 1970
--- gcc-2.7.2.2/config/m68k/m68kpalmos.h	Wed Mar  5 21:08:35 1997
***************
*** 0 ****
--- 1,155 ----
+ /* Definitions of target machine for GNU compiler.  "naked" 68020,
+    COFF object files and debugging, version.
+    Copyright (C) 1994 Free Software Foundation, Inc.
+ 
+ This file is part of GNU CC.
+ 
+ GNU CC is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2, or (at your option)
+ any later version.
+ 
+ GNU CC is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ GNU General Public License for more details.
+ 
+ You should have received a copy of the GNU General Public License
+ along with GNU CC; see the file COPYING.  If not, write to
+ the Free Software Foundation, 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA.  */
+ 
+ #include "m68k/m68k-coff.h"
+ #define  PALMOS 1
+ 
+ /* a5 is fixed as the PIC register */
+ #undef FIXED_REGISTERS
+ #define FIXED_REGISTERS        \
+  {/* Data registers.  */       \
+   0, 0, 0, 0, 0, 0, 0, 0,      \
+                                \
+   /* Address registers.  */    \
+   0, 0, 0, 0, 0, 1, 0, 1,      \
+                                \
+   /* Floating point registers  \
+      (if available).  */       \
+   0, 0, 0, 0, 0, 0, 0, 0 }
+ 
+ #undef CALL_USED_REGISTERS
+ #define CALL_USED_REGISTERS \
+  {1, 1, 1, 0, 0, 0, 0, 0,   \
+   1, 1, 0, 0, 0, 1, 0, 1,   \
+   1, 1, 0, 0, 0, 0, 0, 0 }
+ 
+ /* Under PalmOS/m68k scalars are returned in D0, and pointers 
+    are returned in A0.  We do so because CodeWarrior does.*/
+ 
+ #undef FUNCTION_VALUE
+ #define FUNCTION_VALUE(VALTYPE, FUNC)  \
+  gen_rtx (REG, TYPE_MODE (VALTYPE), (FUNC) == 0 ? 0 : \
+ 	  (TREE_CODE (TREE_TYPE (TREE_TYPE (FUNC))) == POINTER_TYPE ? 8 : 0))
+ 
+ 
+ /* 1 if N is a possible register number for a function value.
+    On the 68000, d0/a0 are the only registers thus used.  */
+ 
+ #undef FUNCTION_VALUE_REGNO_P
+ #define FUNCTION_VALUE_REGNO_P(N) ((N) == 0 || (N) == 8)
+ 
+ #undef PROMOTE_PROTOTYPES
+ 
+ /* -mpcrel -mshort -m68000 -msoft-float */
+ #undef TARGET_DEFAULT
+ #define TARGET_DEFAULT 02040
+ 
+ #undef CPP_PREDEFINES
+ #define CPP_PREDEFINES \
+   "-Dm68000 -Dmc68000 -Dm68k -D__palmos__  \
+    -Asystem(palmos) -Acpu(m68k) -Amachine(pilot)"
+ 
+ #undef CPP_SPEC
+ #define CPP_SPEC ""
+ 
+ /* -l makes the assembler generate .w branches only */
+ #undef ASM_SPEC
+ #define ASM_SPEC "-mno-68881 -m68000 -l "
+ 
+ #undef CC1_SPEC
+ #define CC1_SPEC \
+    "-fpic -msoft-float -m68000 -fshort-enums \
+     %{!Wmulti-char-const:-Wno-multi-char-const}"
+ 
+ /* Unless explicitly overridden, put both text and data at 0 */
+ #define LINK_SPEC "-T pilot.ld%s" 
+ 
+ #undef STARTFILE_SPEC
+ 
+ /*  */
+ #define ENCODE_SECTION_INFO(decl) 					\
+  { rtx sym; int decl_code = TREE_CODE(decl);				\
+    if ((decl_code == VAR_DECL || decl_code == FUNCTION_DECL)		\
+        && (sym = DECL_RTL (decl))  	 	 	 	 	\
+        && GET_CODE (sym) == MEM  	 	 	 	 	\
+        && GET_CODE (XEXP (sym, 0)) == SYMBOL_REF) 	 		\
+    {									\
+      if(decl_code == VAR_DECL && TREE_ASM_WRITTEN(decl)) 		\
+        SYMBOL_REF_FLAG(XEXP (sym, 0)) = DECL_IN_TEXT_SECTION(decl); 	\
+      else if (decl_code == FUNCTION_DECL) 			 	\
+        SYMBOL_REF_FLAG(XEXP (sym, 0)) = 1;				\
+      else			 					\
+        SYMBOL_REF_FLAG(XEXP (DECL_RTL (decl), 0)) = 0; 			\
+    } else if ((decl_code == REAL_CST 					\
+ 	       || decl_code == STRING_CST 				\
+ 	       || decl_code == COMPLEX_CST 				\
+ 	       || decl_code == CONSTRUCTOR) 				\
+ 	      && (sym = TREE_CST_RTL (decl)) 				\
+ 	      && GET_CODE (sym) == MEM 					\
+ 	      && GET_CODE (XEXP (sym, 0)) == SYMBOL_REF) 		\
+    { SYMBOL_REF_FLAG (XEXP (sym, 0)) = 1; }				\
+  }
+ 
+ /* We use %a4 as PIC register */
+ #undef PIC_OFFSET_TABLE_REGNUM
+ #define PIC_OFFSET_TABLE_REGNUM 12
+ 
+ #undef SUBTARGET_OVERRIDE_OPTIONS
+ #define SUBTARGET_OVERRIDE_OPTIONS \
+   { if (TARGET_PCREL) { flag_no_function_cse = flag_pic = 1; } }
+ 
+ #undef SUBTARGET_SWITCHES
+ #define SUBTARGET_SWITCHES \
+    { "debug-labels", 04000 }, \
+    { "no-debug-labels", -04000 },
+ 
+ #define TARGET_DEBUG_LABELS (target_flags & 04000)
+ 
+ #undef LEGITIMATE_PIC_OPERAND_P
+ #define LEGITIMATE_PIC_OPERAND_P(X)	\
+   ((! symbolic_operand (X, VOIDmode)				\
+     && ! (GET_CODE (X) == CONST_DOUBLE && CONST_DOUBLE_MEM (X)	\
+ 	  && GET_CODE (CONST_DOUBLE_MEM (X)) == MEM		\
+ 	  && symbolic_operand (XEXP (CONST_DOUBLE_MEM (X), 0),	\
+ 			       VOIDmode)))	  \
+    || (GET_CODE (X) == PLUS \
+        && GET_CODE (XEXP (X, 0)) == PC \
+        && GET_CODE (XEXP (X, 1)) == SYMBOL_REF \
+        && SYMBOL_REF_FLAG (XEXP (X, 1))) \
+    || (GET_CODE (X) == SYMBOL_REF && SYMBOL_REF_FLAG (X)) \
+    || (GET_CODE (X) == MEM && GET_CODE (XEXP (X,0) ) == SYMBOL_REF && SYMBOL_REF_FLAG (XEXP (X, 0))))
+ 
+ #define INCLUDE_DEFAULTS \
+  {						\
+     { GPLUSPLUS_INCLUDE_DIR, 1, 1 }, 		\
+     { GCC_INCLUDE_DIR, 0, 0 }, 			\
+     { CROSS_INCLUDE_DIR, 0, 0 }, 		\
+     { CROSS_INCLUDE_DIR "/System", 0, 0 }, 	\
+     { CROSS_INCLUDE_DIR "/UI", 0, 0 }, 		\
+     { CROSS_INCLUDE_DIR "/Hardware", 0, 0 }, 	\
+     { TOOL_INCLUDE_DIR, 0, 0 }, 		\
+     { 0, 0, 0 } 				\
+  } 
+ 
+ 
+ 
+ 
+ /* end of palmos.h */
diff -r -c -x *.orig -x *.rej -x #* -x *~ -N orig/gcc-2.7.2.2/config/m68k/palmos_crt0.S gcc-2.7.2.2/config/m68k/palmos_crt0.S
*** orig/gcc-2.7.2.2/config/m68k/palmos_crt0.S	Thu Jan  1 01:00:00 1970
--- gcc-2.7.2.2/config/m68k/palmos_crt0.S	Thu Feb  6 17:02:01 1997
***************
*** 0 ****
--- 1,55 ----
+ /* crt0.S:  Simple application startup code
+  * (c) 1996, Jeff Dionne (Jeff@maribor.pfnet.com)
+  * This is free software, under the LGPL V2
+  *
+  */
+ 
+ #define sysTrapSysAppStartup           41103
+ #define sysTrapSysAppExit              41104
+ #define sysTrapSndPlaySystemSound      41524
+ 
+ 	.global	start
+ 	.global	_exit
+ 
+ start:
+ 	lea	%sp@(-12), %sp
+ 	pea	%sp@(8)
+ 	pea	%sp@(8)
+ 	pea	%sp@(8)
+ 	trap	#15
+ 	dc.w	sysTrapSysAppStartup
+ 	lea	%sp@(12), %sp
+ 	tst.w	%d0
+ 	beq.s	L1
+ 
+ 	move.l	#0x03000000, %sp@-
+ 	trap	#15
+ 	dc.w	sysTrapSndPlaySystemSound
+ 	addq.w	#4, %sp
+ 
+ 	moveq	#-1, %d0
+ 	bra.s	_exit
+ 
+ L1:
+ 	movea.l	%sp@, %a0
+ 	move.w	%a0@(6), %sp@-	/* launchFlags */
+ 	move.l	%a0@(2), %sp@-	/* cmdPBP */
+ 	move.w	%a0@(0), %sp@-	/* cmd */
+ 
+ 	bsr	PilotMain
+ 
+ 	lea	%sp@(8), %sp
+ 	move.l	%sp@(8), %sp@-
+ 	move.l	%sp@(8), %sp@-
+ 	move.l	%sp@(8), %sp@-
+ 
+ 	trap	#15
+ 	dc.w	sysTrapSysAppExit
+ 	lea	%sp@(12), %sp
+ 
+ 	moveq	#0, %d0
+ _exit:
+ 	lea	%sp@(12), %sp
+ 	rts
+ 	
+ 		
\ No newline at end of file
diff -r -c -x *.orig -x *.rej -x #* -x *~ -N orig/gcc-2.7.2.2/config/m68k/palmos_crt0.c gcc-2.7.2.2/config/m68k/palmos_crt0.c
*** orig/gcc-2.7.2.2/config/m68k/palmos_crt0.c	Thu Jan  1 01:00:00 1970
--- gcc-2.7.2.2/config/m68k/palmos_crt0.c	Wed Feb 19 16:14:14 1997
***************
*** 0 ****
--- 1,27 ----
+ 
+ #include <SysAll.h>
+ #define NON_PORTABLE
+ #include <SystemPrv.h>
+ 
+ ULong start ()
+ {
+   SysAppInfoPtr appInfo;
+   Ptr prevGlobals;
+   Ptr globalsPtr;
+   ULong result;
+   
+   if (SysAppStartup (&appInfo, &prevGlobals, &globalsPtr) != 0)
+     {
+       SndPlaySystemSound (sndError);
+       return -1;
+     }
+   else
+     {
+       PilotMain (appInfo->cmd, appInfo->cmdPBP, appInfo->launchFlags);
+       SysAppExit (appInfo, prevGlobals, globalsPtr);
+       return 0;
+     }
+ 
+ }
+ 
+ 
diff -r -c -x *.orig -x *.rej -x #* -x *~ -N orig/gcc-2.7.2.2/config/m68k/palmos_link.ld gcc-2.7.2.2/config/m68k/palmos_link.ld
*** orig/gcc-2.7.2.2/config/m68k/palmos_link.ld	Thu Jan  1 01:00:00 1970
--- gcc-2.7.2.2/config/m68k/palmos_link.ld	Thu Feb 27 20:45:31 1997
***************
*** 0 ****
--- 1,26 ----
+ MEMORY 
+         {
+         coderes   : ORIGIN = 0x10000, LENGTH = 32767
+         datares   : ORIGIN = 0x0, LENGTH = 32767
+         }
+ 
+ SECTIONS
+ {
+         .text :
+         {
+         *(.text)
+         } > coderes
+ 	data_start = 0;
+         .data :
+         {
+         *(.data)
+         } > datares
+ 	bss_start = ALIGN(4);
+         .bss :
+         {
+         *(.bss)
+         *(COMMON)
+         } > datares
+         end = ALIGN( 4 );
+         edata = ALIGN( 4 );
+ }
diff -r -c -x *.orig -x *.rej -x #* -x *~ -N orig/gcc-2.7.2.2/config/m68k/t-m68kpalmos gcc-2.7.2.2/config/m68k/t-m68kpalmos
*** orig/gcc-2.7.2.2/config/m68k/t-m68kpalmos	Thu Jan  1 01:00:00 1970
--- gcc-2.7.2.2/config/m68k/t-m68kpalmos	Wed Feb 19 17:08:19 1997
***************
*** 0 ****
--- 1,44 ----
+ TARGET_LIBGCC2_CFLAGS = -Dinhibit_libc \
+ 	-I$(srcdir)/PalmOS \
+ 	-I$(srcdir)/PalmOS/System \
+ 	-I$(srcdir)/PalmOS/UI \
+ 	-I$(srcdir)/PalmOS/Hardware
+ CROSS_LIBGCC1 = libgcc1-asm.a
+ LIB1ASMSRC = m68k/lb1sf68palmos.asm
+ LIB1ASMFUNCS = _mulsi3 _udivsi3 _divsi3 _umodsi3 _modsi3 \
+    _double _float _floatex \
+    _eqdf2 _nedf2 _gtdf2 _gedf2 _ltdf2 _ledf2 \
+    _eqsf2 _nesf2 _gtsf2 _gesf2 _ltsf2 _lesf2
+ 
+ # These are really part of libgcc1, but this will cause them to be
+ # built correctly, so...
+ LIB2FUNCS_EXTRA = fpgnulib.c xfgnulib.c
+ 
+ fpgnulib.c: $(srcdir)/config/m68k/fpgnulib.c
+ 	cp $(srcdir)/config/m68k/fpgnulib.c fpgnulib.c
+ xfgnulib.c: $(srcdir)/config/m68k/fpgnulib.c
+ 	echo '#define EXTFLOAT' > xfgnulib.c
+ 	cat $(srcdir)/config/m68k/fpgnulib.c >> xfgnulib.c
+ 
+ EXTRA_PARTS = crt0.o pilot.ld
+ 
+ crt0.o: $(srcdir)/config/m68k/palmos_crt0.c xgcc
+ 	$(GCC_FOR_TARGET) $(LIBGCC2_CFLAGS) \
+ 		$(srcdir)/config/m68k/palmos_crt0.c -c -o crt0.o
+ 
+ pilot.ld: $(srcdir)/config/m68k/palmos_link.ld
+ 	cp $(srcdir)/config/m68k/palmos_link.ld pilot.ld
+ 
+ LIBGCC2_DEPS= stmp-palmos-headers
+ 
+ stmp-palmos-headers: 
+ 	$(MAKE) install-dir
+ 	-rm -rf $(libsubdir)/sys-include
+ 	mkdir $(libsubdir)/sys-include
+ 	-chmod a+rx $(libsubdir)/sys-include
+ 	(cd $(srcdir)/PalmOS; \
+ 	 tar -cf - .) | (cd $(libsubdir)/sys-include; tar $(TAROUTOPTS) - )
+ 	touch stmp-palmos-headers
+ 	
+ 
+ 
diff -r -c -x *.orig -x *.rej -x #* -x *~ -N orig/gcc-2.7.2.2/config/m68k/xm-m68kpalmos.h gcc-2.7.2.2/config/m68k/xm-m68kpalmos.h
*** orig/gcc-2.7.2.2/config/m68k/xm-m68kpalmos.h	Thu Jan  1 01:00:00 1970
--- gcc-2.7.2.2/config/m68k/xm-m68kpalmos.h	Mon Feb  3 23:32:13 1997
***************
*** 0 ****
--- 1,41 ----
+ /* Configuration for GNU C-compiler for Motorola 68000 family.
+    Copyright (C) 1987, 1993 Free Software Foundation, Inc.
+ 
+ This file is part of GNU CC.
+ 
+ GNU CC is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2, or (at your option)
+ any later version.
+ 
+ GNU CC is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ GNU General Public License for more details.
+ 
+ You should have received a copy of the GNU General Public License
+ along with GNU CC; see the file COPYING.  If not, write to
+ the Free Software Foundation, 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA.  */
+ 
+ 
+ /* #defines that need visibility everywhere.  */
+ #define FALSE 0
+ #define TRUE 1
+ 
+ /* This describes the machine the compiler is hosted on.  */
+ #define HOST_BITS_PER_CHAR 8
+ #define HOST_BITS_PER_SHORT 16
+ #define HOST_BITS_PER_INT 32
+ #define HOST_BITS_PER_LONG 32
+ #define HOST_BITS_PER_LONGLONG 64
+ 
+ #define HOST_WORDS_BIG_ENDIAN
+ 
+ /* target machine dependencies.
+    tm.h is a symbolic link to the actual target specific file.   */
+ #include "tm.h"
+ 
+ /* Arguments to use with `exit'.  */
+ #define SUCCESS_EXIT_CODE 0
+ #define FATAL_EXIT_CODE 33
diff -r -c -x *.orig -x *.rej -x #* -x *~ -N orig/gcc-2.7.2.2/configure gcc-2.7.2.2/configure
*** orig/gcc-2.7.2.2/configure	Wed Feb 12 13:57:47 1997
--- gcc-2.7.2.2/configure	Wed Feb 12 13:52:05 1997
***************
*** 1496,1501 ****
--- 1496,1506 ----
  		tm_file=m68k/m68k-aout.h
  		extra_headers=math-68881.h
  		;;
+ 	m68k-palmos-coff*)
+ 		tmake_file=m68k/t-m68kpalmos
+ 		tm_file=m68k/m68kpalmos.h
+ 		extra_headers=math-68881.h
+ 		;;
  	m68k-*-coff*)
  		tmake_file=m68k/t-m68kbare
  		tm_file=m68k/m68k-coff.h
diff -r -c -x *.orig -x *.rej -x #* -x *~ -N orig/gcc-2.7.2.2/cp/lex.c gcc-2.7.2.2/cp/lex.c
*** orig/gcc-2.7.2.2/cp/lex.c	Wed Feb 12 13:57:21 1997
--- gcc-2.7.2.2/cp/lex.c	Fri Feb 14 12:43:01 1997
***************
*** 69,74 ****
--- 69,78 ----
  extern char *index ();
  extern char *rindex ();
  
+ /* Warn about multi-character char constants */
+ 
+ extern int warn_multi_char_constant;
+ 
  void extract_interface_info ();
  void yyerror ();
  
***************
*** 3968,3974 ****
  #endif
  	  }
  	else
! 	  max_chars = TYPE_PRECISION (integer_type_node) / width;
  
  	while (1)
  	  {
--- 3972,3978 ----
  #endif
  	  }
  	else
! 	  max_chars = TYPE_PRECISION (long_integer_type_node) / width;
  
  	while (1)
  	  {
***************
*** 4032,4038 ****
  	    num_chars = max_chars;
  	    error ("character constant too long");
  	  }
! 	else if (num_chars != 1 && ! flag_traditional)
  	  warning ("multi-character character constant");
  
  	/* If char type is signed, sign-extend the constant.  */
--- 4036,4043 ----
  	    num_chars = max_chars;
  	    error ("character constant too long");
  	  }
! 	else if (num_chars != 1 
! 		 && ! (flag_traditional || !warn_multi_char_constant))
  	  warning ("multi-character character constant");
  
  	/* If char type is signed, sign-extend the constant.  */
***************
*** 4056,4062 ****
  	    if (num_chars<=1)
  	      TREE_TYPE (yylval.ttype) = char_type_node;
  	    else
! 	      TREE_TYPE (yylval.ttype) = integer_type_node;
  	  }
  	else
  	  {
--- 4061,4067 ----
  	    if (num_chars<=1)
  	      TREE_TYPE (yylval.ttype) = char_type_node;
  	    else
! 	      TREE_TYPE (yylval.ttype) = long_integer_type_node;
  	  }
  	else
  	  {
diff -r -c -x *.orig -x *.rej -x #* -x *~ -N orig/gcc-2.7.2.2/integrate.c gcc-2.7.2.2/integrate.c
*** orig/gcc-2.7.2.2/integrate.c	Fri Oct 20 23:48:13 1995
--- gcc-2.7.2.2/integrate.c	Wed Feb  5 16:36:56 1997
***************
*** 1448,1454 ****
  	      temp = copy_to_mode_reg (GET_MODE (loc), copy);
  	      REG_USERVAR_P (temp) = REG_USERVAR_P (loc);
  	      if ((CONSTANT_P (copy) || FIXED_BASE_PLUS_P (copy))
! 		  && REGNO (temp) < map->const_equiv_map_size)
  		{
  		  map->const_equiv_map[REGNO (temp)] = copy;
  		  map->const_age_map[REGNO (temp)] = CONST_AGE_PARM;
--- 1448,1458 ----
  	      temp = copy_to_mode_reg (GET_MODE (loc), copy);
  	      REG_USERVAR_P (temp) = REG_USERVAR_P (loc);
  	      if ((CONSTANT_P (copy) || FIXED_BASE_PLUS_P (copy))
! 		  && REGNO (temp) < map->const_equiv_map_size
! #ifdef PALMOS
! 		  && !(flag_pic && GET_CODE (copy) == SYMBOL_REF)
! #endif
! 		  )
  		{
  		  map->const_equiv_map[REGNO (temp)] = copy;
  		  map->const_age_map[REGNO (temp)] = CONST_AGE_PARM;
diff -r -c -x *.orig -x *.rej -x #* -x *~ -N orig/gcc-2.7.2.2/libgcc1-test.c gcc-2.7.2.2/libgcc1-test.c
*** orig/gcc-2.7.2.2/libgcc1-test.c	Wed May 24 18:53:15 1995
--- gcc-2.7.2.2/libgcc1-test.c	Fri Feb  7 11:29:49 1997
***************
*** 65,78 ****
    return 0;
  }
  
- discard (x)
-      int x;
- {}
- 
- ddiscard (x)
-      double x;
- {}
- 
  foo ()
  {
    static int table[] = {20, 69, 4, 12};
--- 65,70 ----
***************
*** 90,95 ****
--- 82,95 ----
    return table[idx++];
  }
  
+ discard (x)
+      int x;
+ {}
+ 
+ ddiscard (x)
+      double x;
+ {}
+ 
  /* Provide functions that some versions of the linker use to default
     the start address if -e symbol is not used, to avoid the warning
     message saying the start address is defaulted.  */
***************
*** 98,100 ****
--- 98,101 ----
  
  void start() {}
  void _start() {}
+ 
diff -r -c -x *.orig -x *.rej -x #* -x *~ -N orig/gcc-2.7.2.2/libgcc2.c gcc-2.7.2.2/libgcc2.c
*** orig/gcc-2.7.2.2/libgcc2.c	Sun Nov 26 20:39:21 1995
--- gcc-2.7.2.2/libgcc2.c	Thu Feb  6 14:17:08 1997
***************
*** 1647,1652 ****
--- 1647,1657 ----
  extern vfp __new_handler;
  extern void __default_new_handler (void);
  
+ #ifdef PALMOS
+ #include <MemoryMgr.h>
+ #define malloc(S) MemPtrNew(S)
+ #endif
+ 
  #ifdef WEAK_ALIAS
  void * __builtin_new (size_t sz)
       __attribute__ ((weak, alias ("___builtin_new")));
***************
*** 1749,1754 ****
--- 1754,1765 ----
     by C++ programs to return to the free store a block of memory allocated
     as a single object. */
  
+ #ifdef PALMOS
+ #include <MemoryMgr.h>
+ #define free(S) MemPtrFree(S)
+ #endif
+ 
+ 
  #ifdef WEAK_ALIAS
  void __builtin_delete (void *ptr)
       __attribute__ ((weak, alias ("___builtin_delete")));
***************
*** 1788,1794 ****
  /* End of C++ free-store management functions */
  
  #ifdef L_shtab
! unsigned int __shtab[] = {
      0x00000001, 0x00000002, 0x00000004, 0x00000008,
      0x00000010, 0x00000020, 0x00000040, 0x00000080,
      0x00000100, 0x00000200, 0x00000400, 0x00000800,
--- 1799,1805 ----
  /* End of C++ free-store management functions */
  
  #ifdef L_shtab
! unsigned long __shtab[] = {
      0x00000001, 0x00000002, 0x00000004, 0x00000008,
      0x00000010, 0x00000020, 0x00000040, 0x00000080,
      0x00000100, 0x00000200, 0x00000400, 0x00000800,
***************
*** 2337,2342 ****
--- 2348,2358 ----
     return obj;
   return 0;
  }
+ 
+ #ifdef PALMOS
+ #include "System/MemoryMgr.h"
+ #define malloc(S) MemPtrNew(S)
+ #endif
  
  void
  __register_exceptions (exception_table *table)
diff -r -c -x *.orig -x *.rej -x #* -x *~ -N orig/gcc-2.7.2.2/longlong.h gcc-2.7.2.2/longlong.h
*** orig/gcc-2.7.2.2/longlong.h	Tue Oct  3 17:23:03 1995
--- gcc-2.7.2.2/longlong.h	Tue Feb  4 13:53:03 1997
***************
*** 1161,1169 ****
  									\
      if (SI_TYPE_SIZE <= 32)						\
        {									\
! 	__a = __xr < (1<<2*__BITS4)					\
! 	  ? (__xr < (1<<__BITS4) ? 0 : __BITS4)				\
! 	  : (__xr < (1<<3*__BITS4) ?  2*__BITS4 : 3*__BITS4);		\
        }									\
      else								\
        {									\
--- 1161,1169 ----
  									\
      if (SI_TYPE_SIZE <= 32)						\
        {									\
! 	__a = __xr < (((USItype)1)<<2*__BITS4)				\
! 	  ? (__xr < (((USItype)1)<<__BITS4) ? 0 : __BITS4)		\
! 	  : (__xr < (((USItype)1)<<3*__BITS4) ?  2*__BITS4 : 3*__BITS4);\
        }									\
      else								\
        {									\
diff -r -c -x *.orig -x *.rej -x #* -x *~ -N orig/gcc-2.7.2.2/toplev.c gcc-2.7.2.2/toplev.c
*** orig/gcc-2.7.2.2/toplev.c	Fri Oct 20 22:56:35 1995
--- gcc-2.7.2.2/toplev.c	Fri Feb 14 12:46:23 1997
***************
*** 727,732 ****
--- 727,736 ----
  
  int warn_aggregate_return;
  
+ /* Nonzero means emit warning for multi-character character constant */
+ 
+ int warn_multi_char_constant = 1;
+ 
  /* Likewise for -W.  */
  
  struct { char *string; int *variable; int on_value;} W_options[] =
***************
*** 738,744 ****
    {"aggregate-return", &warn_aggregate_return, 1},
    {"cast-align", &warn_cast_align, 1},
    {"uninitialized", &warn_uninitialized, 1},
!   {"inline", &warn_inline, 1}
  };
  
  /* Output files for assembler code (real compiler output)
--- 742,749 ----
    {"aggregate-return", &warn_aggregate_return, 1},
    {"cast-align", &warn_cast_align, 1},
    {"uninitialized", &warn_uninitialized, 1},
!   {"inline", &warn_inline, 1},
!   {"multi-char-const", &warn_multi_char_constant, 1}
  };
  
  /* Output files for assembler code (real compiler output)
diff -r -c -x *.orig -x *.rej -x #* -x *~ -N orig/gcc-2.7.2.2/varasm.c gcc-2.7.2.2/varasm.c
*** orig/gcc-2.7.2.2/varasm.c	Fri Sep  1 01:02:53 1995
--- gcc-2.7.2.2/varasm.c	Tue Feb  4 16:34:29 1997
***************
*** 1247,1252 ****
--- 1247,1256 ----
    if (in_text_section ())
      DECL_IN_TEXT_SECTION (decl) = 1;
  
+ #ifdef ENCODE_SECTION_INFO
+   ENCODE_SECTION_INFO(decl);
+ #endif
+ 
    /* Record current section so we can restore it if dbxout.c clobbers it.  */
    saved_in_section = in_section;
  
diff -r -c -x *.orig -x *.rej -x #* -x *~ -N orig/gcc-2.7.2.2/version.c gcc-2.7.2.2/version.c
*** orig/gcc-2.7.2.2/version.c	Wed Feb 12 13:57:47 1997
--- gcc-2.7.2.2/version.c	Wed Mar  5 22:02:42 1997
***************
*** 1 ****
! char *version_string = "2.7.2.2";
--- 1 ----
! char *version_string = "2.7.2.2-krab-030597";
