diff options
author | Damien Doligez <damien.doligez-inria.fr> | 2000-04-20 13:41:23 +0000 |
---|---|---|
committer | Damien Doligez <damien.doligez-inria.fr> | 2000-04-20 13:41:23 +0000 |
commit | 886e7387321a1542af6c8a348aff9bed10940a02 (patch) | |
tree | e4e78d981d8618b5bd6e796412a2f2d26db9a0fc | |
parent | c7657e4ca33b055d6377b13f088fdb1e1a437bce (diff) |
MacOS: ajout ocamlmkappli
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@3116 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
-rw-r--r-- | maccaml/.cvsignore | 4 | ||||
-rw-r--r-- | maccaml/Makefile.Mac | 58 | ||||
-rw-r--r-- | maccaml/Makefile.Mac.depend | 84 | ||||
-rw-r--r-- | maccaml/aboutbox.c | 16 | ||||
-rw-r--r-- | maccaml/appli.r | 808 | ||||
-rw-r--r-- | maccaml/glue.c | 12 | ||||
-rw-r--r-- | maccaml/main.h | 2 | ||||
-rw-r--r-- | maccaml/ocaml.r | 780 | ||||
-rw-r--r-- | maccaml/ocamlconstants.h (renamed from maccaml/constants.h) | 6 | ||||
-rw-r--r-- | maccaml/ocamlmkappli | 89 |
10 files changed, 1051 insertions, 808 deletions
diff --git a/maccaml/.cvsignore b/maccaml/.cvsignore index 9ff0bb3a3..efe28a120 100644 --- a/maccaml/.cvsignore +++ b/maccaml/.cvsignore @@ -3,10 +3,10 @@ stdlib *.cp.x *.xcoff *.dbg -primitives +appliprims +appli prims.c Objective*Caml OCaml.68k OCaml.PPC -OCaml.bytecode dummy_fragment diff --git a/maccaml/Makefile.Mac b/maccaml/Makefile.Mac index fa7b4ba8f..fd4346d6e 100644 --- a/maccaml/Makefile.Mac +++ b/maccaml/Makefile.Mac @@ -14,6 +14,7 @@ VERSIONSTR = � "�"{OCAMLMAJOR}.{OCAMLMINOR}/Mac{MAJOR}.{MINOR}.{BUGFIX}{STAGE}{REV}�"" + COPYRIGHTSTR = "�"Copyright 1991-2000 INRIA�"" XIncludes = -i ::byterun:,::config: � @@ -86,8 +87,8 @@ camllibs = ::otherlibs:graph:graphics.cma � primfiles = ::byterun:primitives � prim_bigarray prim_graph prim_num prim_unix prim_systhreads -RezDefs = -d SystemSevenOrLater=1 -d MAJORVNUM={MAJOR} � - -d MINORVNUM=0x{MINOR}{BUGFIX} -d STAGE={STAGE} -d DEVVNUM={REV} � +RezDefs = -d MAJORVNUM={MAJOR} -d MINORVNUM=0x{MINOR}{BUGFIX} � + -d STAGE={STAGE} -d DEVVNUM={REV} � -d VERSIONSTR={VERSIONSTR} -d COPYRIGHTSTR={COPYRIGHTSTR} OBJS = aboutbox.c.o appleevents.c.o clipboard.c.o � @@ -104,21 +105,21 @@ PPCOBJS = aboutbox.c.x appleevents.c.x clipboard.c.x � menus.c.x mcmisc.c.x modalfilter.c.x prefs.c.x prims.c.x � print.c.x scroll.c.x windows.c.x gusistuff.cp.x -all � appli +all � appli appliprims ocamlconstants.h appli.r "Objective Caml" set status 0 -primitives � {primfiles} - catenate {primfiles} >primitives +appliprims � {primfiles} + catenate {primfiles} > appliprims -prims.c � primitives +prims.c � appliprims echo '#include "mlvalues.h"' > prims.c echo '#include "prims.h"' >> prims.c - streamedit -e '1,$ change "extern value " . "();"' primitives >> prims.c + streamedit -e '1,$ change "extern value " . "();"' appliprims >> prims.c echo 'c_primitive cprim [] = {' >> prims.c - streamedit -e '1,$ change " " . ","' primitives >> prims.c + streamedit -e '1,$ change " " . ","' appliprims >> prims.c echo '0 };' >> prims.c echo 'char * names_of_cprim [] = {' >> prims.c - streamedit -e '1,$ change " �"" . "�","' primitives >> prims.c + streamedit -e '1,$ change " �"" . "�","' appliprims >> prims.c echo '0 };' >> prims.c gusistuff.cp.x � gusistuff.cp @@ -136,36 +137,39 @@ OCaml.PPC � {PPCOBJS} {ppccamlrunlibs} OCaml.68k � {OBJS} {camlrunlibs} ilink -o OCaml.68k {linkoptions} {OBJS} {libs} -OCaml.bytecode � primitives ::toplevellib.cma ::toplevel:topmain.cmo � - {camllibs} - ::boot:ocamlrun ::boot:ocamlc -I ::stdlib: -linkall -use-prims primitives � - ::toplevellib.cma {camllibs} ::toplevel:topmain.cmo � - -noautolink -o OCaml.bytecode - dummy_fragment � dummy_fragment.c.x ppclink -xm l -o dummy_fragment {ppclinkoptions} dummy_fragment.c.x -appli �� OCaml.PPC OCaml.68k OCaml.bytecode ocaml.r dummy_fragment - duplicate -y OCaml.68k "Objective Caml" - rez -a -o "Objective Caml" {RezDefs} ocaml.r - mergefragment -a OCaml.PPC "Objective Caml" - mergefragment dummy_fragment "Objective Caml" - catenate OCaml.bytecode >> "Objective Caml" - setfile -t APPL -c Caml -a iB "Objective Caml" - -install � +appli �� OCaml.PPC OCaml.68k dummy_fragment + duplicate -y OCaml.68k appli + mergefragment -a OCaml.PPC appli + mergefragment dummy_fragment appli + +"Objective Caml" � appliprims appli.r ocamlconstants.h appli � + ::toplevellib.cma {camllibs} ::toplevel:topmain.cmo + :ocamlmkappli -creator Caml � + -ocamlc � + "::boot:ocamlrun ::boot:ocamlc -I ::stdlib: -linkall -noautolink" � + {rezdefs} -lib : -name "Objective Caml" -r ocaml.r � + -prefsize 5000 -minsize 3000 � + ::toplevellib.cma {camllibs} ::toplevel:topmain.cmo + +install � appli appli.r appliprims ocamlconstants.h ocamlmkappli � + "Objective Caml" duplicate -y "Objective Caml" � `exists "objective caml.xcoff" � "::test:Moretest:graph_example.ml" � ` � "{APPLIDIR}" + duplicate -y appli appli.r appliprims ocamlconstants.h "{LIBDIR}" + duplicate -y ocamlmkappli "{BINDIR}" partialclean � - delete -i OCaml.bytecode "Objective Caml" + delete -i "Objective Caml" clean � - delete -i -y {OBJS} {PPCOBJS} OCaml.68k OCaml.PPC OCaml.bytecode � - "Objective Caml" primitives prims.c null :config � + delete -i -y {OBJS} {PPCOBJS} OCaml.68k OCaml.PPC � + "Objective Caml" appliprims prims.c null :config � dummy_fragment dummy_fragment.c.x dummy_fragment.xcoff � "Objective Caml.xcoff" "Objective Caml.dbg" diff --git a/maccaml/Makefile.Mac.depend b/maccaml/Makefile.Mac.depend index a2139001a..0c9243017 100644 --- a/maccaml/Makefile.Mac.depend +++ b/maccaml/Makefile.Mac.depend @@ -1,5 +1,5 @@ #*** Dependencies: Cut here *** -# These dependencies were produced at 21:25:48 on 17 avr 2000 by MakeDepend +# These dependencies were produced at 15:17:32 on 20 avr 2000 by MakeDepend :aboutbox.c.x � � :aboutbox.c � @@ -41,7 +41,7 @@ "{CIncludes}"TextUtils.h � "{CIncludes}"ToolUtils.h � ::byterun:signals.h � - :constants.h � + :ocamlconstants.h � "{CIncludes}"NullDef.h � "{CIncludes}"SizeTDef.h � "{CIncludes}"SeekDefs.h � @@ -125,7 +125,7 @@ "{CIncludes}"TextUtils.h � "{CIncludes}"ToolUtils.h � ::byterun:signals.h � - :constants.h � + :ocamlconstants.h � "{CIncludes}"NullDef.h � "{CIncludes}"SizeTDef.h � "{CIncludes}"SeekDefs.h � @@ -209,7 +209,7 @@ "{CIncludes}"TextUtils.h � "{CIncludes}"ToolUtils.h � ::byterun:signals.h � - :constants.h � + :ocamlconstants.h � "{CIncludes}"NullDef.h � "{CIncludes}"SizeTDef.h � "{CIncludes}"SeekDefs.h � @@ -293,7 +293,7 @@ "{CIncludes}"TextUtils.h � "{CIncludes}"ToolUtils.h � ::byterun:signals.h � - :constants.h � + :ocamlconstants.h � "{CIncludes}"NullDef.h � "{CIncludes}"SizeTDef.h � "{CIncludes}"SeekDefs.h � @@ -380,7 +380,7 @@ "{CIncludes}"TextUtils.h � "{CIncludes}"ToolUtils.h � ::byterun:signals.h � - :constants.h � + :ocamlconstants.h � "{CIncludes}"NullDef.h � "{CIncludes}"SizeTDef.h � "{CIncludes}"SeekDefs.h � @@ -464,7 +464,7 @@ "{CIncludes}"TextUtils.h � "{CIncludes}"ToolUtils.h � ::byterun:signals.h � - :constants.h � + :ocamlconstants.h � "{CIncludes}"NullDef.h � "{CIncludes}"SizeTDef.h � "{CIncludes}"SeekDefs.h � @@ -548,7 +548,7 @@ "{CIncludes}"TextUtils.h � "{CIncludes}"ToolUtils.h � ::byterun:signals.h � - :constants.h � + :ocamlconstants.h � "{CIncludes}"NullDef.h � "{CIncludes}"SizeTDef.h � "{CIncludes}"SeekDefs.h � @@ -638,7 +638,7 @@ "{CIncludes}"TextUtils.h � "{CIncludes}"ToolUtils.h � ::byterun:signals.h � - :constants.h � + :ocamlconstants.h � "{CIncludes}"VaListTDef.h � "{CIncludes}"MacErrors.h � "{CIncludes}"MixedMode.h � @@ -721,7 +721,7 @@ "{CIncludes}"TextUtils.h � "{CIncludes}"ToolUtils.h � ::byterun:signals.h � - :constants.h � + :ocamlconstants.h � "{CIncludes}"MixedMode.h � "{CIncludes}"NullDef.h � "{CIncludes}"SizeTDef.h � @@ -808,7 +808,7 @@ "{CIncludes}"StandardFile.h � "{CIncludes}"Strings.h � ::byterun:signals.h � - :constants.h � + :ocamlconstants.h � "{CIncludes}"ConditionalMacros.h � "{CIncludes}"Components.h � "{CIncludes}"MixedMode.h � @@ -887,7 +887,7 @@ "{CIncludes}"TextUtils.h � "{CIncludes}"ToolUtils.h � ::byterun:signals.h � - :constants.h � + :ocamlconstants.h � "{CIncludes}"NullDef.h � "{CIncludes}"SizeTDef.h � "{CIncludes}"SeekDefs.h � @@ -971,7 +971,7 @@ "{CIncludes}"TextUtils.h � "{CIncludes}"ToolUtils.h � ::byterun:signals.h � - :constants.h � + :ocamlconstants.h � "{CIncludes}"NullDef.h � "{CIncludes}"SizeTDef.h � "{CIncludes}"SeekDefs.h � @@ -1055,7 +1055,7 @@ "{CIncludes}"TextUtils.h � "{CIncludes}"ToolUtils.h � ::byterun:signals.h � - :constants.h � + :ocamlconstants.h � "{CIncludes}"NullDef.h � "{CIncludes}"SizeTDef.h � "{CIncludes}"SeekDefs.h � @@ -1139,7 +1139,7 @@ "{CIncludes}"TextUtils.h � "{CIncludes}"ToolUtils.h � ::byterun:signals.h � - :constants.h � + :ocamlconstants.h � "{CIncludes}"NullDef.h � "{CIncludes}"SizeTDef.h � "{CIncludes}"SeekDefs.h � @@ -1223,7 +1223,7 @@ "{CIncludes}"TextUtils.h � "{CIncludes}"ToolUtils.h � ::byterun:signals.h � - :constants.h � + :ocamlconstants.h � "{CIncludes}"NullDef.h � "{CIncludes}"SizeTDef.h � "{CIncludes}"SeekDefs.h � @@ -1307,7 +1307,7 @@ "{CIncludes}"TextUtils.h � "{CIncludes}"ToolUtils.h � ::byterun:signals.h � - :constants.h � + :ocamlconstants.h � "{CIncludes}"NullDef.h � "{CIncludes}"SizeTDef.h � "{CIncludes}"SeekDefs.h � @@ -1391,7 +1391,7 @@ "{CIncludes}"TextUtils.h � "{CIncludes}"ToolUtils.h � ::byterun:signals.h � - :constants.h � + :ocamlconstants.h � "{CIncludes}"NullDef.h � "{CIncludes}"SizeTDef.h � "{CIncludes}"SeekDefs.h � @@ -1478,7 +1478,7 @@ "{CIncludes}"TextUtils.h � "{CIncludes}"ToolUtils.h � ::byterun:signals.h � - :constants.h � + :ocamlconstants.h � "{CIncludes}"NullDef.h � "{CIncludes}"SizeTDef.h � "{CIncludes}"SeekDefs.h � @@ -1562,7 +1562,7 @@ "{CIncludes}"TextUtils.h � "{CIncludes}"ToolUtils.h � ::byterun:signals.h � - :constants.h � + :ocamlconstants.h � "{CIncludes}"NullDef.h � "{CIncludes}"SizeTDef.h � "{CIncludes}"SeekDefs.h � @@ -1646,7 +1646,7 @@ "{CIncludes}"TextUtils.h � "{CIncludes}"ToolUtils.h � ::byterun:signals.h � - :constants.h � + :ocamlconstants.h � "{CIncludes}"NullDef.h � "{CIncludes}"SizeTDef.h � "{CIncludes}"SeekDefs.h � @@ -1691,7 +1691,7 @@ "{CIncludes}"DriverSynchronization.h #*** Dependencies: Cut here *** -# These dependencies were produced at 21:25:59 on 17 avr 2000 by MakeDepend +# These dependencies were produced at 15:17:41 on 20 avr 2000 by MakeDepend :aboutbox.c.o � � :aboutbox.c � @@ -1733,7 +1733,7 @@ "{CIncludes}"TextUtils.h � "{CIncludes}"ToolUtils.h � ::byterun:signals.h � - :constants.h � + :ocamlconstants.h � "{CIncludes}"NullDef.h � "{CIncludes}"SizeTDef.h � "{CIncludes}"SeekDefs.h � @@ -1817,7 +1817,7 @@ "{CIncludes}"TextUtils.h � "{CIncludes}"ToolUtils.h � ::byterun:signals.h � - :constants.h � + :ocamlconstants.h � "{CIncludes}"NullDef.h � "{CIncludes}"SizeTDef.h � "{CIncludes}"SeekDefs.h � @@ -1901,7 +1901,7 @@ "{CIncludes}"TextUtils.h � "{CIncludes}"ToolUtils.h � ::byterun:signals.h � - :constants.h � + :ocamlconstants.h � "{CIncludes}"NullDef.h � "{CIncludes}"SizeTDef.h � "{CIncludes}"SeekDefs.h � @@ -1985,7 +1985,7 @@ "{CIncludes}"TextUtils.h � "{CIncludes}"ToolUtils.h � ::byterun:signals.h � - :constants.h � + :ocamlconstants.h � "{CIncludes}"NullDef.h � "{CIncludes}"SizeTDef.h � "{CIncludes}"SeekDefs.h � @@ -2072,7 +2072,7 @@ "{CIncludes}"TextUtils.h � "{CIncludes}"ToolUtils.h � ::byterun:signals.h � - :constants.h � + :ocamlconstants.h � "{CIncludes}"NullDef.h � "{CIncludes}"SizeTDef.h � "{CIncludes}"SeekDefs.h � @@ -2156,7 +2156,7 @@ "{CIncludes}"TextUtils.h � "{CIncludes}"ToolUtils.h � ::byterun:signals.h � - :constants.h � + :ocamlconstants.h � "{CIncludes}"NullDef.h � "{CIncludes}"SizeTDef.h � "{CIncludes}"SeekDefs.h � @@ -2240,7 +2240,7 @@ "{CIncludes}"TextUtils.h � "{CIncludes}"ToolUtils.h � ::byterun:signals.h � - :constants.h � + :ocamlconstants.h � "{CIncludes}"NullDef.h � "{CIncludes}"SizeTDef.h � "{CIncludes}"SeekDefs.h � @@ -2330,7 +2330,7 @@ "{CIncludes}"TextUtils.h � "{CIncludes}"ToolUtils.h � ::byterun:signals.h � - :constants.h � + :ocamlconstants.h � "{CIncludes}"VaListTDef.h � "{CIncludes}"MacErrors.h � "{CIncludes}"MixedMode.h � @@ -2413,7 +2413,7 @@ "{CIncludes}"TextUtils.h � "{CIncludes}"ToolUtils.h � ::byterun:signals.h � - :constants.h � + :ocamlconstants.h � "{CIncludes}"MixedMode.h � "{CIncludes}"NullDef.h � "{CIncludes}"SizeTDef.h � @@ -2500,7 +2500,7 @@ "{CIncludes}"StandardFile.h � "{CIncludes}"Strings.h � ::byterun:signals.h � - :constants.h � + :ocamlconstants.h � "{CIncludes}"ConditionalMacros.h � "{CIncludes}"Components.h � "{CIncludes}"MixedMode.h � @@ -2579,7 +2579,7 @@ "{CIncludes}"TextUtils.h � "{CIncludes}"ToolUtils.h � ::byterun:signals.h � - :constants.h � + :ocamlconstants.h � "{CIncludes}"NullDef.h � "{CIncludes}"SizeTDef.h � "{CIncludes}"SeekDefs.h � @@ -2663,7 +2663,7 @@ "{CIncludes}"TextUtils.h � "{CIncludes}"ToolUtils.h � ::byterun:signals.h � - :constants.h � + :ocamlconstants.h � "{CIncludes}"NullDef.h � "{CIncludes}"SizeTDef.h � "{CIncludes}"SeekDefs.h � @@ -2747,7 +2747,7 @@ "{CIncludes}"TextUtils.h � "{CIncludes}"ToolUtils.h � ::byterun:signals.h � - :constants.h � + :ocamlconstants.h � "{CIncludes}"NullDef.h � "{CIncludes}"SizeTDef.h � "{CIncludes}"SeekDefs.h � @@ -2831,7 +2831,7 @@ "{CIncludes}"TextUtils.h � "{CIncludes}"ToolUtils.h � ::byterun:signals.h � - :constants.h � + :ocamlconstants.h � "{CIncludes}"NullDef.h � "{CIncludes}"SizeTDef.h � "{CIncludes}"SeekDefs.h � @@ -2915,7 +2915,7 @@ "{CIncludes}"TextUtils.h � "{CIncludes}"ToolUtils.h � ::byterun:signals.h � - :constants.h � + :ocamlconstants.h � "{CIncludes}"NullDef.h � "{CIncludes}"SizeTDef.h � "{CIncludes}"SeekDefs.h � @@ -2999,7 +2999,7 @@ "{CIncludes}"TextUtils.h � "{CIncludes}"ToolUtils.h � ::byterun:signals.h � - :constants.h � + :ocamlconstants.h � "{CIncludes}"NullDef.h � "{CIncludes}"SizeTDef.h � "{CIncludes}"SeekDefs.h � @@ -3083,7 +3083,7 @@ "{CIncludes}"TextUtils.h � "{CIncludes}"ToolUtils.h � ::byterun:signals.h � - :constants.h � + :ocamlconstants.h � "{CIncludes}"NullDef.h � "{CIncludes}"SizeTDef.h � "{CIncludes}"SeekDefs.h � @@ -3170,7 +3170,7 @@ "{CIncludes}"TextUtils.h � "{CIncludes}"ToolUtils.h � ::byterun:signals.h � - :constants.h � + :ocamlconstants.h � "{CIncludes}"NullDef.h � "{CIncludes}"SizeTDef.h � "{CIncludes}"SeekDefs.h � @@ -3254,7 +3254,7 @@ "{CIncludes}"TextUtils.h � "{CIncludes}"ToolUtils.h � ::byterun:signals.h � - :constants.h � + :ocamlconstants.h � "{CIncludes}"NullDef.h � "{CIncludes}"SizeTDef.h � "{CIncludes}"SeekDefs.h � @@ -3338,7 +3338,7 @@ "{CIncludes}"TextUtils.h � "{CIncludes}"ToolUtils.h � ::byterun:signals.h � - :constants.h � + :ocamlconstants.h � "{CIncludes}"NullDef.h � "{CIncludes}"SizeTDef.h � "{CIncludes}"SeekDefs.h � diff --git a/maccaml/aboutbox.c b/maccaml/aboutbox.c index 048a5495d..043397f2c 100644 --- a/maccaml/aboutbox.c +++ b/maccaml/aboutbox.c @@ -37,7 +37,7 @@ void OpenAboutBox (void) LongRect lr; WEHandle we = NULL; WStatusH st = NULL; - Handle txt = NULL; + Handle txt = NULL, copr = NULL; TextStyle ts; if (DrawAboutUPP == NULL) DrawAboutUPP = NewUserItemProc (DrawAbout); @@ -72,10 +72,21 @@ void OpenAboutBox (void) err = WESetStyle (weDoFont + weDoSize, &ts, we); if (err != noErr) goto failed; - txt = GetResource ('TEXT', kAboutText); + txt = GetResource ('TEXT', kAboutText1); err = ResError (); if (err != noErr){ err = noErr; goto failed; } DetachResource (txt); + copr = GetResource ('TEXT', kAboutText2); + err = ResError (); + if (err == noErr){ + HLock (copr); + err = HandAndHand (copr, txt); + /* ignore errors */ + HUnlock (copr); + ReleaseResource (copr); + copr = NULL; + } + err = WEUseText (txt, we); if (err != noErr) goto failed; err = WECalText (we); @@ -86,6 +97,7 @@ void OpenAboutBox (void) return; failed: + if (copr != NULL) DisposeHandle (copr); if (txt != NULL) DisposeHandle (txt); if (we != NULL) WEDispose (we); if (st != NULL) DisposeHandle ((Handle) st); diff --git a/maccaml/appli.r b/maccaml/appli.r new file mode 100644 index 000000000..ac0be1a2d --- /dev/null +++ b/maccaml/appli.r @@ -0,0 +1,808 @@ +/***********************************************************************/ +/* */ +/* Objective Caml */ +/* */ +/* Damien Doligez, projet Moscova, INRIA Rocquencourt */ +/* */ +/* Copyright 2000 Institut National de Recherche en Informatique et */ +/* en Automatique. All rights reserved. This file is distributed */ +/* under the terms of the GNU Library General Public License. */ +/* */ +/***********************************************************************/ + +/* $Id$ */ + + +#include "Types.r" +#include "Sound.r" + +#include "ocamlconstants.h" + + +/* These 5 resources are meant to be overridden. */ + +data 'Line' (1000) { "%a\000" }; /* command line template */ + +data 'Line' (1001) { "" }; /* environment template */ + +data 'TEXT' (1000, purgeable) { /* kAboutText1 */ + "\n" + APPLNAME "\n" + "\n" + "\n" + "\n" + "\n" + "\n" +}; + +data 'cicn' (1000) { /* kApplicationIcon */ + $"0000 0000 8020 0000 0000 0020 0020 0000 0000 0000 0000 0048" + $"0000 0048 0000 0000 0008 0001 0008 0000 0000 0000 0000 0000" + $"0000 0000 0000 0004 0000 0000 0020 0020 0000 0000 0004 0000" + $"0000 0020 0020 0000 0000 0000 0000 001F F01C 003F F83E 007F" + $"FC7E 00FF FEFC 01FF FFF8 03FF FFF0 07FF FFE0 0FFF FFE0 1FFF" + $"FFF0 3FFF FFF8 7FFF FFFC FFFF FFFF FFFF FFFF FFFF FFFF 7FFF" + $"FFFF 3FFF FFFF 1FFF FFFF 0FFF FFFF 07FF FFFF 03FF FFFF 01FF" + $"FFFE 00FF FFFF 007F FFFF 003F FFFF 001F FFFE 000F FFFC 0007" + $"FFF8 0003 FFF0 0001 FFE0 0000 FF80 0000 7F00 0000 0000 001F" + $"F01C 0030 3826 0048 7C5E 0084 E69C 0103 C338 0200 9E70 0400" + $"24E0 0800 49E0 1000 9330 2001 2618 4002 4E0C 8002 9A07 8001" + $"7C07 C002 8007 6002 E007 3007 FC07 1806 1FC7 0C00 01FF 0600" + $"003F 0300 0007 0180 000E 00C0 001F 0060 003F 0030 007F 0018" + $"00FE 000C 01FC 0006 03F8 0003 07F0 0001 8FE0 0000 DF80 0000" + $"7F00 0000 0000 0000 002F 0000 FFFF FFFF FFFF 0001 FFFF FFFF" + $"6666 0002 FFFF CCCC CCCC 0003 FFFF CCCC 9999 0004 FFFF CCCC" + $"6666 0005 FFFF 9999 9999 0006 FFFF 0000 3333 0007 CCCC CCCC" + $"CCCC 0008 CCCC CCCC 9999 0009 CCCC CCCC 6666 000A CCCC 9999" + $"9999 000B CCCC 9999 6666 000C CCCC 9999 3333 000D CCCC 6666" + $"6666 000E CCCC 6666 3333 000F 9999 9999 9999 0010 9999 9999" + $"6666 0011 9999 9999 3333 0012 9999 6666 6666 0013 9999 6666" + $"3333 0014 9999 3333 6666 0015 9999 3333 3333 0016 9999 0000" + $"3333 0017 9999 0000 0000 0018 6666 6666 6666 0019 6666 6666" + $"3333 001A 6666 3333 6666 001B 6666 3333 3333 001C 6666 3333" + $"0000 001D 6666 0000 3333 001E 3333 3333 0000 001F 3333 0000" + $"3333 0020 3333 0000 0000 0021 0000 0000 3333 0022 8888 0000" + $"0000 0023 4444 0000 0000 0024 1111 0000 0000 0025 0000 1111" + $"0000 0026 EEEE EEEE EEEE 0027 DDDD DDDD DDDD 0028 BBBB BBBB" + $"BBBB 0029 AAAA AAAA AAAA 002A 8888 8888 8888 002B 7777 7777" + $"7777 002C 5555 5555 5555 002D 4444 4444 4444 002E 2222 2222" + $"2222 002F 1111 1111 1111 0000 0000 0000 0000 0000 0000 0000" + $"0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000" + $"0000 0000 0029 0F29 0F29 0F29 0F18 0000 0000 0000 0022 062D" + $"0000 0000 0000 0000 0000 0000 2A2B 2600 0000 0027 2C2A 2D00" + $"0000 0000 1606 1622 2D00 0000 0000 0000 0000 002A 2700 2B26" + $"0000 072D 2928 2A2D 0000 002C 0717 171F 2D00 0000 0000 0000" + $"0000 2A07 0000 262B 2607 2C29 2827 282A 2D00 2C01 0F2B 2E2D" + $"0000 0000 0000 0000 002A 2700 0000 0026 2B2C 2928 0707 030A" + $"0F11 0410 1B23 2C00 0000 0000 0000 0000 2A27 0000 0000 0000" + $"2628 0702 0803 0A0A 1104 0C1B 1E2D 0000 0000 0000 0000 002A" + $"2700 0000 0000 0000 2627 080A 0503 0F13 040B 1B1E 1A00 0000" + $"0000 0000 0000 2A07 0000 0000 0000 0000 2708 0A03 1015 1304" + $"0B1C 1E0A 2C00 0000 0000 0000 002A 2700 0000 0000 0000 0026" + $"0A05 0312 1B13 040B 1C1F 0E03 0A18 0000 0000 0000 2A27 0000" + $"0000 0000 0000 0028 0403 0E1B 1304 0C1B 1E1B 1203 030B 2C00" + $"0000 002A 2700 0000 0000 0000 0000 2705 0312 1B13 040B 1B24" + $"1B15 1310 0303 0A2C 0000 2A27 0000 0000 0000 0000 0000 0703" + $"141C 1B09 0C1B 252F 1513 0D0B 0303 090A 182A 2C07 0000 0000" + $"0000 0000 0026 1215 1B0B 0B0D 0A0B 0303 0303 0303 0303 050B" + $"2B12 2D2C 2800 0000 0000 0000 0026 261C 1B05 0A12 120B 0B03" + $"0303 0303 030A 0B0A 2B11 002D 2C07 0000 0000 0000 0000 0711" + $"0B1B 151E 1B1B 1519 120B 0A0B 0B0B 1212 2A29 0000 2D2D 0700" + $"0000 0000 0027 120B 1319 2B12 1B1D 1E1B 1B1B 1B12 2C15 1213" + $"0F29 0000 002D 2C07 0000 0000 0008 2C2C 2A0A 2726 2729 1223" + $"2320 1E1D 1C2D 1B1B 2A29 0000 0000 2D2D 2800 0000 272C 0A28" + $"2727 2727 2727 0728 2912 1219 2C1B 1B1B 2B29 0000 0000 002D" + $"2C28 0000 0721 2D2C 182A 2928 2807 0707 0707 0707 0707 0F2B" + $"2B29 0000 0000 0000 2D2C 2800 0026 2707 2829 290F 0F0F 2928" + $"2828 2828 2828 2A2E 2D2D 0000 0000 0000 002D 2C28 0000 0026" + $"2727 2727 2707 2829 0F0F 0F0F 0F29 2E2D 2D00 0000 0000 0000" + $"0000 2D2C 2800 0000 0000 0000 2727 2707 0707 0707 282F 2D2D" + $"2D2D 0000 0000 0000 0000 002D 2C28 0000 0000 0000 0000 0000" + $"2727 2728 2F2C 2D2D 2D2D 0000 0000 0000 0000 0000 2D2C 2800" + $"0000 0000 0000 0000 0000 072F 2D2D 2D2D 2D2D 0000 0000 0000" + $"0000 0000 002D 2C28 0000 0000 0000 0000 0007 2E2D 2D2D 2D2D" + $"2D00 0000 0000 0000 0000 0000 0000 2D2C 2800 0000 0000 0000" + $"072E 2D2D 2D2D 2D2D 0000 0000 0000 0000 0000 0000 0000 002D" + $"2C28 0000 0000 0007 2E2D 2D2D 2D2D 2D00 0000 0000 0000 0000" + $"0000 0000 0000 0000 2D2C 2900 0000 072E 2D2D 2D2D 2D2D 0000" + $"0000 0000 0000 0000 0000 0000 0000 0000 002D 2C28 2607 2F2D" + $"2D2D 2D2D 2D00 0000 0000 0000 0000 0000 0000 0000 0000 0000" + $"0000 2D2D 282E 2D2D 2D2D 2D00 0000 0000 0000 0000 0000 0000" + $"0000 0000 0000 0000 0000 002D 2E2D 2D2D 2D2D 0000 0000 0000" + $"0000" +}; + +data 'ICON' (1000) { /* kApplicationIcon */ + $"0000 0000 001F F01C 0030 3826 0048 7C5E 0084 E69C 0103 C338" + $"0200 9E70 0400 24E0 0800 49E0 1000 9330 2001 2618 4002 4E0C" + $"8002 9A07 8001 7C07 C002 8007 6002 E007 3007 FC07 1806 1FC7" + $"0C00 01FF 0600 003F 0300 0007 0180 000E 00C0 001F 0060 003F" + $"0030 007F 0018 00FE 000C 01FC 0006 03F8 0003 07F0 0001 8FE0" + $"0000 DF80 0000 7F00" +}; + + +/* The other resources should not need to be changed. */ + +data 'TEXT' (kAboutText2, purgeable) { + "Includes (parts of) Objective Caml, MPW libraries," + " the WASTE text engine, GUSI, and SFIO.\n" + "\n" + "GUSI Copyright (C) 1992-1999 Matthias Neeracher\n" + "MPW � 1983-1999 by Apple Computer, Inc., all rights reserved\n" + "Objective Caml Copyright 1991-2000 INRIA, all rights reserved.\n" + "SFIO Copyright (c) 1991, 1996 by AT&T Labs - Research.\n" + "WASTE text engine � 1993-1998 Marco Piovanelli\n" +}; + +resource 'SIZE' (-1) { + reserved, + acceptSuspendResumeEvents, + reserved, + canBackground, + doesActivateOnFGSwitch, + backgroundAndForeground, + dontGetFrontClicks, + ignoreChildDiedEvents, + is32BitCompatible, + isHighLevelEventAware, + localAndRemoteHLEvents, + isStationeryAware, + dontuseTextEditServices, + reserved, + reserved, + reserved, + PREFSIZE * 1024, + MINSIZE * 1024 +}; + +type 'Kequ' { + wide array KequArray { + byte any = 0 command = 1; + byte char; + byte item; + fill byte; + }; +}; + +resource 'Kequ' (kKeysOK) { + { + any, charReturn, 1, + any, charEnter, 1, + any, 'o', 1, + any, 'O', 1, + } +}; + +resource 'Kequ' (kKeysSaveDontCancel) { + { + any, charReturn, 1, + any, charEnter, 1, + any, 'y', 1, + any, 'Y', 1, + any, 's', 1, + any, 'S', 1, + + any, charEscape, 2, + command, '.', 2, + any, 'c', 2, + any, 'C', 2, + + any, 'n', 3, + any, 'N', 3, + any, 'd', 3, + any, 'D', 3, + } +}; + +resource 'ALRT' (kAlertBug) { + {60, 61, 260, 451}, kAlertBug, + { + OK, visible, silent, + OK, visible, silent, + OK, visible, silent, + OK, visible, silent, + }, + alertPositionParentWindowScreen +}; + +resource 'DITL' (kAlertBug) { + { + {160, 310, 180, 368}, Button {enabled, "Quit"}, + + {10, 70, 80, 368}, + StaticText {disabled, /* Don't change this occurrence of Obj Caml */ + "You have discovered a bug in Objective Caml. Please" + " report the following information to <caml-bugs@inria.fr>." + }, + + {80, 20, 145, 368}, + StaticText {disabled, "file: ^1\nline: ^2\nexpr: ^0"}, + } +}; + +resource 'ALRT' (kAlertNotYet) { + {60, 81, 160, 431}, kAlertNotYet, + { + OK, visible, silent, + OK, visible, silent, + OK, visible, silent, + OK, visible, silent, + }, + alertPositionParentWindowScreen +}; + +resource 'DITL' (kAlertNotYet) { + { + {60, 270, 80, 328}, Button {enabled, "OK"}, + + {10, 70, 45, 328}, + StaticText {disabled, "This feature is not yet implemented." }, + } +}; + +resource 'ALRT' (kAlertNeedSys7) { + {60, 81, 200, 431}, kAlertNeedSys7, + { + OK, visible, silent, + OK, visible, silent, + OK, visible, silent, + OK, visible, silent, + }, + alertPositionMainScreen +}; + +resource 'DITL' (kAlertNeedSys7) { + { + {100, 270, 120, 328}, + Button {enabled, "Quit"}, + + {10, 70, 85, 328}, + StaticText { + disabled, + APPLNAME " cannot run on MacOS versions prior to System 7." + }, + + {10, 20, 42, 52}, Icon {disabled, kApplicationIcon}, + } +}; + +resource 'ALRT' (kAlertNeed32BitQD) { + {60, 81, 200, 431}, kAlertNeed32BitQD, + { + OK, visible, silent, + OK, visible, silent, + OK, visible, silent, + OK, visible, silent, + }, + alertPositionMainScreen +}; + +resource 'DITL' (kAlertNeed32BitQD) { + { + {100, 270, 120, 328}, + Button {enabled, "Quit"}, + + {10, 70, 85, 328}, + StaticText { + disabled, + APPLNAME " needs a Macintosh with 32-bit color QuickDraw." + }, + + {10, 20, 42, 52}, Icon {disabled, kApplicationIcon}, + } +}; + +resource 'ALRT' (kAlertExit) { + {60, 81, 210, 431}, kAlertExit, + { + OK, visible, silent, + OK, visible, silent, + OK, visible, silent, + OK, visible, silent, + }, + alertPositionParentWindowScreen +}; + +resource 'DITL' (kAlertExit) { + { + {110, 270, 130, 328}, Button {enabled, "OK"}, + + {10, 70, 95, 328}, + StaticText { + disabled, + "The " APPLNAME " toplevel loop has terminated.\n\n" + "Any further input in the toplevel window will be ignored." + }, + } +}; + +resource 'ALRT' (kAlertErrorMsg) { + {60, 81, 200, 431}, kAlertErrorMsg, + { + OK, visible, sound1, + OK, visible, sound1, + OK, visible, sound1, + OK, visible, sound1, + }, + alertPositionParentWindowScreen +}; + +resource 'DITL' (kAlertErrorMsg) { + { + {100, 270, 120, 328}, Button {enabled, "OK"}, + {10, 70, 85, 328}, StaticText { disabled, "^0^1^2^3" }, + } +}; + +resource 'ALRT' (kAlertErrorNum) { + {60, 81, 200, 431}, kAlertErrorNum, + { + OK, visible, sound1, + OK, visible, sound1, + OK, visible, sound1, + OK, visible, sound1, + }, + alertPositionParentWindowScreen +}; + +resource 'DITL' (kAlertErrorNum) { + { + {100, 270, 120, 328}, Button {enabled, "OK"}, + + {10, 70, 85, 328}, + StaticText { disabled, "An error occurred.\n\nerror code = ^3" }, + } +}; + +resource 'ALRT' (kAlertGeneric) { + {60, 81, 200, 431}, kAlertGeneric, + { + OK, visible, sound1, + OK, visible, sound1, + OK, visible, sound1, + OK, visible, sound1, + }, + alertPositionParentWindowScreen +}; + +resource 'DITL' (kAlertGeneric) { + { + {100, 270, 120, 328}, Button {enabled, "OK"}, + + {10, 20, 85, 378}, + StaticText { disabled, "^0^1^2^3" }, + } +}; + +resource 'ALRT' (kAlertSaveAsk) { + {60, 81, 200, 431}, kAlertSaveAsk, + { + OK, visible, silent, + OK, visible, silent, + OK, visible, silent, + OK, visible, silent, + }, + alertPositionParentWindowScreen +}; + +resource 'DITL' (kAlertSaveAsk) { + { + {100, 270, 120, 328}, Button {enabled, "Save"}, + {100, 202, 120, 260}, Button {enabled, "Cancel"}, + {100, 22, 120, 110}, Button {enabled, "Don't Save"}, + {10, 70, 85, 328}, StaticText { disabled, "Save \"^0\" before ^1 ?" }, + {10, 20, 42, 52}, Icon {disabled, kApplicationIcon}, + } +}; + +resource 'DLOG' (kDialogAbout) { + {70, 60, 285, 470}, + noGrowDocProc, + visible, + goAway, + 0, + kDialogAbout, + "About " APPLNAME, + alertPositionMainScreen +}; + +resource 'DITL' (kDialogAbout) { + { + {10, 20, 42, 52}, Icon {disabled, kApplicationIcon}, + {10, 72, 205, 400}, UserItem { disabled }, + } +}; + +resource 'MBAR' (kMenuBar) { + { kMenuApple, kMenuFile, kMenuEdit, kMenuWindows, } +}; + +resource 'MENU' (kMenuApple) { + kMenuApple, + textMenuProc, + 0x7FFFFFFD, + enabled, + apple, + { + "About " APPLNAME "�", noIcon, noKey, noMark, plain, + "-", noIcon, noKey, noMark, plain, + } +}; + +resource 'MENU' (kMenuFile) { + kMenuFile, + textMenuProc, + 0x7FFFFB7B, + enabled, + "File", + { + "New", noIcon, "N", noMark, plain, + "Open�", noIcon, "O", noMark, plain, + "-", noIcon, noKey, noMark, plain, + "Close", noIcon, "W", noMark, plain, + "Save", noIcon, "S", noMark, plain, + "Save as�", noIcon, noKey, noMark, plain, + "Revert to Saved", noIcon, noKey, noMark, plain, + "-", noIcon, noKey, noMark, plain, + "Page Setup�", noIcon, nokey, noMark, plain, + "Print�", noIcon, "P", noMark, plain, + "-", noIcon, noKey, noMark, plain, + "Quit", noIcon, "Q", noMark, plain, + } +}; + +resource 'MENU' (kMenuEdit) { + kMenuEdit, + textMenuProc, + 0x7FFFFFBD, + enabled, + "Edit", + { + "Undo", noIcon, "Z", noMark, plain, + "-", noIcon, noKey, noMark, plain, + "Cut", noIcon, "X", noMark, plain, + "Copy", noIcon, "C", noMark, plain, + "Paste", noIcon, "V", noMark, plain, + "Clear", noIcon, noKey, noMark, plain, + "Select All", noIcon, "A", noMark, plain, + "Show Clipboard", noIcon, noKey, noMark, plain, + "-", noIcon, noKey, noMark, plain, + "Find�", noIcon, "F", noMark, plain, + "Replace�", noIcon, "R", noMark, plain, + "-", noIcon, noKey, noMark, plain, + "Preferences�", noIcon, noKey, noMark, plain, + } +}; + +resource 'MENU' (kMenuWindows) { + kMenuWindows, + textMenuProc, + 0x7FFFFFF9, + enabled, + "Windows", + { + "Toplevel", noIcon, "T", noMark, plain, + "Graphics", noIcon, "G", noMark, plain, + "-", noIcon, noKey, noMark, plain, + } +}; + +resource 'STR#' (kUndoStrings) { + { + "Cannot undo", + "Undo", "Redo", + "Undo Typing", "Redo Typing", + "Undo Cut", "Redo Cut", + "Undo Paste", "Redo Paste", + "Undo Clear", "Redo Clear", + "Undo Drag & Drop", "Redo Drag & Drop", + /* Style change is not supported. */ + } +}; + +resource 'STR#' (kMiscStrings, purgeable) { + { + APPLNAME " Preferences", + "Untitled", + "closing", + "quitting", + "Unable to open \"", + "\". ", + "Save file as:", + "", + "Unable to write to \"", + } +}; + +resource 'STR#' (kErrorStrings, purgeable) { + { + "There is not enough memory.", + "The disk is full.", + "The directory is full.", + "Too many files are already open.", + "The file does not exist.", + "The disk is write-protected.", + "The file is locked.", + "The disk is locked.", + "The file is in use.", + "The file is already open (by " APPLNAME " or another application).", + "The disk was ejected.", + "The file is locked or you do not have the permission to open it.", + "You do not have the permission to write to this file.", + "The folder does not exist.", + "The connection to the file server was closed or broken.", + "A hardware error occurred during input or output.", + } +}; + +resource 'STR ' (kPrefsDescriptionStr, purgeable) { + "This document describes user preferences for " APPLNAME ". " + "You cannot open or print this document. To be " + "effective, this document must be stored in the Preferences " + "folder of the System Folder." +}; + +resource 'WIND' (kToplevelWinTemplate) { + {40, 4, 342, 512}, + zoomDocProc, + invisible, + noGoAway, + 0, + APPLNAME " Toplevel", + noAutoCenter +}; + +resource 'WIND' (kGraphicsWinTemplate) { + {40, 4, 342, 512}, + zoomDocProc, + invisible, + goAway, + 0, + APPLNAME " Graphics", + noAutoCenter +}; + +resource 'WIND' (kDocumentWinTemplate) { + {45, 10, 342, 512}, + zoomDocProc, + visible, + goAway, + 0, + "Untitled", + staggerMainScreen +}; + +resource 'CNTL' (kScrollBarTemplate) { + {0, 0, 16, 16}, + 0, + invisible, + 0, 0, + scrollBarProc, + 0, + "" +}; + +resource 'acur' (0) { + {1000, 1001, 1002, 1003, } +}; + +resource 'CURS' (1000) { + $"07C0 1F30 3F08 7F04 7F04 FF02 FF02 FFFE" + $"81FE 81FE 41FC 41FC 21F8 19F0 07C0", + $"07C0 1FF0 3FF8 7FFC 7FFC FFFE FFFE FFFE" + $"FFFE FFFE 7FFC 7FFC 3FF8 1FF0 07C0", + {7, 7} +}; + +resource 'CURS' (1001) { + $"07C0 1FF0 3FF8 5FF4 4FE4 87C2 8382 8102" + $"8382 87C2 4FE4 5FF4 3FF8 1FF0 07C0", + $"07C0 1FF0 3FF8 7FFC 7FFC FFFE FFFE FFFE" + $"FFFE FFFE 7FFC 7FFC 3FF8 1FF0 07C0", + {7, 7} +}; + +resource 'CURS' (1002) { + $"07C0 19F0 21F8 41FC 41FC 81FE 81FE FFFE" + $"FF02 FF02 7F04 7F04 3F08 1F30 07C0", + $"07C0 1FF0 3FF8 7FFC 7FFC FFFE FFFE FFFE" + $"FFFE FFFE 7FFC 7FFC 3FF8 1FF0 07C0", + {7, 7} +}; + +resource 'CURS' (1003) { + $"07C0 1830 2008 701C 783C FC7E FEFE FFFE" + $"FEFE FC7E 783C 701C 2008 1830 07C0", + $"07C0 1FF0 3FF8 7FFC 7FFC FFFE FFFE FFFE" + $"FFFE FFFE 7FFC 7FFC 3FF8 1FF0 07C0", + {7, 7} +}; + +resource 'snd ' (1002){ + FormatOne{ + { sampledSynth, 0x80 }, + }, + { + hasData, soundCmd {0x2C}, + noData, ampCmd {127}, + noData, freqDurationCmd {0x4321, 60}, + noData, quietCmd {}, + }, + { + 4, + Rate22K, + 0, 4, + 0, + 60, + $"FF01FF01" + } +}; + +resource 'snd ' (1004){ + FormatOne{ + { sampledSynth, 0x80 }, + }, + { + hasData, soundCmd {0x2C}, + noData, ampCmd {127}, + noData, freqDurationCmd {0x4321, 60}, + noData, quietCmd {}, + }, + { + 4, + Rate22K, + 0, 4, + 0, + 60, + $"FF800180" + } +}; + +resource 'snd ' (1008){ + FormatOne{ + { sampledSynth, 0x80 }, + }, + { + hasData, soundCmd {0x2C}, + noData, ampCmd {127}, + noData, freqDurationCmd {0x4321, 60}, + noData, quietCmd {}, + }, + { + 8, + Rate22K, + 0, 8, + 0, + 60, + $"FFDA8026012680DA" + } +}; + +resource 'snd ' (1032){ + FormatOne{ + { sampledSynth, 0x80 }, + }, + { + hasData, soundCmd {0x2C}, + noData, ampCmd {127}, + noData, freqDurationCmd {0x4321, 60}, + noData, quietCmd {}, + }, + { + 32, + Rate22K, + 0, 32, + 0, + 60, + $"FFFDF5EADAC7B19980674F3926160B0301030B1626394F678099B1C7DAEAF5FD" + } +}; + + +resource 'snd ' (1128){ + FormatOne{ + { sampledSynth, 0x80 }, + }, + { + hasData, soundCmd {0x2C}, + noData, ampCmd {127}, + noData, freqDurationCmd {0x4321, 60}, + noData, quietCmd {}, + }, + { + 128, + Rate22K, + 0, 128, + 0, + 60, + $"FFFFFEFEFDFBFAF8F5F3F0EDEAE6E2DEDAD5D1CCC7C1BCB6B1ABA59F99938C86" + $"807A746D67615B554F4A443F39342F2B26221E1A1613100D0B08060503020201" + $"01010202030506080B0D1013161A1E22262B2F34393F444A4F555B61676D747A" + $"80868C93999FA5ABB1B6BCC1C7CCD1D5DADEE2E6EAEDF0F3F5F8FAFBFDFEFEFF" + } +}; + +resource 'snd ' (1512, "foo"){ + FormatOne{ + { sampledSynth, 0x80 }, + }, + { + hasData, soundCmd {0x2C}, + noData, ampCmd {127}, + noData, freqDurationCmd {0x4321, 60}, + noData, quietCmd {}, + }, + { + 512, + Rate22K, + 0, 512, + 0, + 60, + $"FFFFFFFFFFFFFFFFFEFEFEFEFEFDFDFDFDFCFCFCFBFBFAFAFAF9F9F8F8F7F6F6" + $"F5F5F4F3F3F2F1F1F0EFEFEEEDECEBEAEAE9E8E7E6E5E4E3E2E1E0DFDEDDDCDB" + $"DAD9D8D6D5D4D3D2D1CFCECDCCCAC9C8C7C5C4C3C1C0BFBDBCBAB9B8B6B5B3B2" + $"B1AFAEACABA9A8A6A5A3A2A09F9D9C9A999796949391908E8C8B898886858382" + $"807E7D7B7A7877757472706F6D6C6A696766646361605E5D5B5A585755545251" + $"4F4E4D4B4A484746444341403F3D3C3B39383736343332312F2E2D2C2B2A2827" + $"262524232221201F1E1D1C1B1A1918171616151413121111100F0F0E0D0D0C0B" + $"0B0A0A0908080707060606050504040403030303020202020201010101010101" + $"0101010101010101020202020203030303040404050506060607070808090A0A" + $"0B0B0C0D0D0E0F0F1011111213141516161718191A1B1C1D1E1F202122232425" + $"2627282A2B2C2D2E2F31323334363738393B3C3D3F404143444647484A4B4D4E" + $"4F5152545557585A5B5D5E606163646667696A6C6D6F7072747577787A7B7D7E" + $"808283858688898B8C8E909193949697999A9C9D9FA0A2A3A5A6A8A9ABACAEAF" + $"B1B2B3B5B6B8B9BABCBDBFC0C1C3C4C5C7C8C9CACCCDCECFD1D2D3D4D5D6D8D9" + $"DADBDCDDDEDFE0E1E2E3E4E5E6E7E8E9EAEAEBECEDEEEFEFF0F1F1F2F3F3F4F5" + $"F5F6F6F7F8F8F9F9FAFAFAFBFBFCFCFCFDFDFDFDFEFEFEFEFEFFFFFFFFFFFFFF" + } +}; + +resource 'FREF' (128) { + 'APPL', + 0, + "" +}; + +resource 'FREF' (129) { + 'TEXT', + 1, + "" +}; + +resource 'FREF' (130) { + 'sEXT', + 2, + "" +}; + +resource 'BNDL' (128) { + CREATOR, + 0, + { /* array TypeArray: 2 elements */ + /* [1] */ + 'FREF', + { /* array IDArray: 3 elements */ + /* [1] */ + 0, 128, + /* [2] */ + 1, 129, + /* [3] */ + 2, 130 + }, + /* [2] */ + 'ICN#', + { /* array IDArray: 3 elements */ + /* [1] */ + 0, 1000, + /* [2] */ + 1, 1001, + /* [3] */ + 2, 1002 + } + } +}; + +data CREATOR (0) { + $"00" /* . */ +}; diff --git a/maccaml/glue.c b/maccaml/glue.c index 07dc66479..14860352b 100644 --- a/maccaml/glue.c +++ b/maccaml/glue.c @@ -197,6 +197,12 @@ static OSErr expand_escapes (Handle s) return err; } +static void caml_main_then_exit (char **argv) +{ + caml_main (argv); + exit (0); +} + /* [build_command_line] creates the array of strings that represents the command line according to the template found in the 'Line'(kCommandLineTemplate) resource and the environment @@ -280,10 +286,12 @@ OSErr launch_caml_main (void) err = WinOpenToplevel (); if (err != noErr) goto failed; - build_command_line (&argv); + err = build_command_line (&argv); + if (err) goto failed; pthread_attr_init (&attr); pthread_attr_setstacksize (&attr, 256 * 1024); - res = pthread_create (&topthread, &attr, (void *) caml_main, (void *) argv); + res = pthread_create (&topthread, &attr, (void *) caml_main_then_exit, + (void *) argv); pthread_attr_destroy (&attr); if (res != 0){ err = -1; diff --git a/maccaml/main.h b/maccaml/main.h index 8d03fe0c5..0a9c6cace 100644 --- a/maccaml/main.h +++ b/maccaml/main.h @@ -55,7 +55,7 @@ #include "../byterun/signals.h" -#include "constants.h" +#include "ocamlconstants.h" #if DEBUG #define Assert(cond) if (!(cond)) assert_failure (#cond, __FILE__, __LINE__) diff --git a/maccaml/ocaml.r b/maccaml/ocaml.r index f5bb2e915..f55fa6338 100644 --- a/maccaml/ocaml.r +++ b/maccaml/ocaml.r @@ -13,9 +13,8 @@ /* $Id$ */ #include "Types.r" -#include "Sound.r" -#include "constants.h" +#include "ocamlconstants.h" resource 'vers' (1) { #define d development @@ -31,652 +30,22 @@ resource 'vers' (1) { #undef b }; -resource 'SIZE' (-1) { - reserved, - acceptSuspendResumeEvents, - reserved, - canBackground, - doesActivateOnFGSwitch, - backgroundAndForeground, - dontGetFrontClicks, - ignoreChildDiedEvents, - is32BitCompatible, - isHighLevelEventAware, - localAndRemoteHLEvents, - isStationeryAware, - dontuseTextEditServices, - reserved, - reserved, - reserved, - 6000 * 1024, - 2000 * 1024 -}; - -data 'Line' (kCommandLineTemplate) { +data 'Line' (1000) { /* kCommandLineTemplate */ "%a\000" }; -data 'Line' (kEnvironmentTemplate) { - "CAMLLIB=%dstdlib:\000" +data 'Line' (1001) { /* kEnvironmentTemplate */ "TempFolder=%t\000" + "CAMLLIB=%dstdlib:\000" }; -type 'Kequ' { - wide array KequArray { - byte any = 0 command = 1; - byte char; - byte item; - fill byte; - }; -}; - -resource 'Kequ' (kKeysOK) { - { - any, charReturn, 1, - any, charEnter, 1, - any, 'o', 1, - any, 'O', 1, - } -}; - -resource 'Kequ' (kKeysSaveDontCancel) { - { - any, charReturn, 1, - any, charEnter, 1, - any, 'y', 1, - any, 'Y', 1, - any, 's', 1, - any, 'S', 1, - - any, charEscape, 2, - command, '.', 2, - any, 'c', 2, - any, 'C', 2, - - any, 'n', 3, - any, 'N', 3, - any, 'd', 3, - any, 'D', 3, - } -}; - -resource 'ALRT' (kAlertBug) { - {60, 61, 260, 451}, kAlertBug, - { - OK, visible, silent, - OK, visible, silent, - OK, visible, silent, - OK, visible, silent, - }, - alertPositionParentWindowScreen -}; - -resource 'DITL' (kAlertBug) { - { - {160, 310, 180, 368}, Button {enabled, "Quit"}, - - {10, 70, 80, 368}, - StaticText {disabled, - "You have discovered a bug in Objective Caml. Please" - " report the following information to <caml-bugs@inria.fr>." - }, - - {80, 20, 145, 368}, - StaticText {disabled, "file: ^1\nline: ^2\nexpr: ^0"}, - } -}; - -resource 'ALRT' (kAlertNotYet) { - {60, 81, 160, 431}, kAlertNotYet, - { - OK, visible, silent, - OK, visible, silent, - OK, visible, silent, - OK, visible, silent, - }, - alertPositionParentWindowScreen -}; - -resource 'DITL' (kAlertNotYet) { - { - {60, 270, 80, 328}, Button {enabled, "OK"}, - - {10, 70, 45, 328}, - StaticText {disabled, "This feature is not yet implemented." }, - } -}; - -resource 'ALRT' (kAlertNeedSys7) { - {60, 81, 200, 431}, kAlertNeedSys7, - { - OK, visible, silent, - OK, visible, silent, - OK, visible, silent, - OK, visible, silent, - }, - alertPositionMainScreen -}; - -resource 'DITL' (kAlertNeedSys7) { - { - {100, 270, 120, 328}, - Button {enabled, "Quit"}, - - {10, 70, 85, 328}, - StaticText { - disabled, - "Objective Caml cannot run on MacOS versions prior to System 7." - }, - - {10, 20, 42, 52}, Icon {disabled, kJoeCamlIcon}, - } -}; - -resource 'ALRT' (kAlertNeed32BitQD) { - {60, 81, 200, 431}, kAlertNeed32BitQD, - { - OK, visible, silent, - OK, visible, silent, - OK, visible, silent, - OK, visible, silent, - }, - alertPositionMainScreen -}; - -resource 'DITL' (kAlertNeed32BitQD) { - { - {100, 270, 120, 328}, - Button {enabled, "Quit"}, - - {10, 70, 85, 328}, - StaticText { - disabled, - "Objective Caml needs a Macintosh with 32-bit color QuickDraw." - }, - - {10, 20, 42, 52}, Icon {disabled, kJoeCamlIcon}, - } -}; - -resource 'ALRT' (kAlertExit) { - {60, 81, 210, 431}, kAlertExit, - { - OK, visible, silent, - OK, visible, silent, - OK, visible, silent, - OK, visible, silent, - }, - alertPositionParentWindowScreen -}; - -resource 'DITL' (kAlertExit) { - { - {110, 270, 130, 328}, Button {enabled, "OK"}, - - {10, 70, 95, 328}, - StaticText { - disabled, - "The O'Caml toplevel loop has terminated.\n\n" - "Any further input in the toplevel window will be ignored." - }, - } -}; - -resource 'ALRT' (kAlertErrorMsg) { - {60, 81, 200, 431}, kAlertErrorMsg, - { - OK, visible, sound1, - OK, visible, sound1, - OK, visible, sound1, - OK, visible, sound1, - }, - alertPositionParentWindowScreen -}; - -resource 'DITL' (kAlertErrorMsg) { - { - {100, 270, 120, 328}, Button {enabled, "OK"}, - {10, 70, 85, 328}, StaticText { disabled, "^0^1^2^3" }, - } -}; - -resource 'ALRT' (kAlertErrorNum) { - {60, 81, 200, 431}, kAlertErrorNum, - { - OK, visible, sound1, - OK, visible, sound1, - OK, visible, sound1, - OK, visible, sound1, - }, - alertPositionParentWindowScreen -}; - -resource 'DITL' (kAlertErrorNum) { - { - {100, 270, 120, 328}, Button {enabled, "OK"}, - - {10, 70, 85, 328}, - StaticText { disabled, "An error occurred.\n\nerror code = ^3" }, - } -}; - -resource 'ALRT' (kAlertGeneric) { - {60, 81, 200, 431}, kAlertGeneric, - { - OK, visible, sound1, - OK, visible, sound1, - OK, visible, sound1, - OK, visible, sound1, - }, - alertPositionParentWindowScreen -}; - -resource 'DITL' (kAlertGeneric) { - { - {100, 270, 120, 328}, Button {enabled, "OK"}, - - {10, 20, 85, 378}, - StaticText { disabled, "^0^1^2^3" }, - } -}; - -resource 'ALRT' (kAlertSaveAsk) { - {60, 81, 200, 431}, kAlertSaveAsk, - { - OK, visible, silent, - OK, visible, silent, - OK, visible, silent, - OK, visible, silent, - }, - alertPositionParentWindowScreen -}; - -resource 'DITL' (kAlertSaveAsk) { - { - {100, 270, 120, 328}, Button {enabled, "Save"}, - {100, 202, 120, 260}, Button {enabled, "Cancel"}, - {100, 22, 120, 110}, Button {enabled, "Don't Save"}, - {10, 70, 85, 328}, StaticText { disabled, "Save \"^0\" before ^1 ?" }, - {10, 20, 42, 52}, Icon {disabled, kJoeCamlIcon}, - } -}; - -resource 'DLOG' (kDialogAbout) { - {70, 60, 280, 470}, - noGrowDocProc, - visible, - goAway, - 0, - kDialogAbout, - "About Objective Caml", - alertPositionMainScreen -}; - -resource 'DITL' (kDialogAbout) { - { - {10, 20, 42, 52}, Icon {disabled, kJoeCamlIcon}, - {10, 72, 200, 400}, UserItem { disabled }, - } -}; - -data 'TEXT' (kAboutText, purgeable) { - "Objective Caml version " VERSIONSTR "\n" - COPYRIGHTSTR "\n" - "\n" - "Xavier Leroy, Jer�me Vouillon, Jacques Garrigue," - " Damien Doligez, et al.\n" - "\n" - "O'Caml for MacOS uses MPW libraries, the WASTE text engine," - " GUSI, and SFIO.\n" - "\n" - "MPW � 1983-1999 by Apple Computer, Inc., all rights reserved\n" - "WASTE text engine � 1993-1998 Marco Piovanelli\n" - "GUSI Copyright (C) 1992-1999 Matthias Neeracher\n" - "SFIO Copyright (c) 1991, 1996 by AT&T Labs - Research.\n" -}; - -resource 'MBAR' (kMenuBar) { - {kMenuApple, kMenuFile, kMenuEdit, kMenuWindows, } -}; - -resource 'MENU' (kMenuApple) { - kMenuApple, - textMenuProc, - 0x7FFFFFFD, - enabled, - apple, - { - "About Objective Caml�", noIcon, noKey, noMark, plain, - "-", noIcon, noKey, noMark, plain, - } -}; - -resource 'MENU' (kMenuFile) { - kMenuFile, - textMenuProc, - 0x7FFFFB7B, - enabled, - "File", - { - "New", noIcon, "N", noMark, plain, - "Open�", noIcon, "O", noMark, plain, - "-", noIcon, noKey, noMark, plain, - "Close", noIcon, "W", noMark, plain, - "Save", noIcon, "S", noMark, plain, - "Save as�", noIcon, noKey, noMark, plain, - "Revert to Saved", noIcon, noKey, noMark, plain, - "-", noIcon, noKey, noMark, plain, - "Page Setup�", noIcon, nokey, noMark, plain, - "Print�", noIcon, "P", noMark, plain, - "-", noIcon, noKey, noMark, plain, - "Quit", noIcon, "Q", noMark, plain, - } -}; - -resource 'MENU' (kMenuEdit) { - kMenuEdit, - textMenuProc, - 0x7FFFFFBD, - enabled, - "Edit", - { - "Undo", noIcon, "Z", noMark, plain, - "-", noIcon, noKey, noMark, plain, - "Cut", noIcon, "X", noMark, plain, - "Copy", noIcon, "C", noMark, plain, - "Paste", noIcon, "V", noMark, plain, - "Clear", noIcon, noKey, noMark, plain, - "Select All", noIcon, "A", noMark, plain, - "Show Clipboard", noIcon, noKey, noMark, plain, - "-", noIcon, noKey, noMark, plain, - "Find�", noIcon, "F", noMark, plain, - "Replace�", noIcon, "R", noMark, plain, - "-", noIcon, noKey, noMark, plain, - "Preferences�", noIcon, noKey, noMark, plain, - } -}; - -resource 'MENU' (kMenuWindows) { - kMenuWindows, - textMenuProc, - 0x7FFFFFF9, - enabled, - "Windows", - { - "Toplevel", noIcon, "T", noMark, plain, - "Graphics", noIcon, "G", noMark, plain, - "-", noIcon, noKey, noMark, plain, - } -}; - -resource 'STR#' (kUndoStrings) { - { - "Cannot undo", - "Undo", "Redo", - "Undo Typing", "Redo Typing", - "Undo Cut", "Redo Cut", - "Undo Paste", "Redo Paste", - "Undo Clear", "Redo Clear", - "Undo Drag & Drop", "Redo Drag & Drop", - /* Style change is not supported. */ - } -}; - -resource 'STR#' (kMiscStrings, purgeable) { - { - "Objective Caml Preferences", - "Untitled", - "closing", - "quitting", - "Unable to open \"", - "\". ", - "Save file as:", - "", - "Unable to write to \"", - } -}; - -resource 'STR#' (kErrorStrings, purgeable) { - { - "There is not enough memory.", - "The disk is full.", - "The directory is full.", - "Too many files are already open.", - "The file does not exist.", - "The disk is write-protected.", - "The file is locked.", - "The disk is locked.", - "The file is in use.", - "The file is already open (by Objective Caml or another application).", - "The disk was ejected.", - "The file is locked or you do not have the permission to open it.", - "You do not have the permission to write to this file.", - "The folder does not exist.", - "The connection to the file server was closed or broken.", - "A hardware error occurred during input or output.", - } -}; - -resource 'STR ' (kPrefsDescriptionStr, purgeable) { - "This document describes user preferences for Objective Caml. " - "You cannot open or print this document. To be " - "effective, this document must be stored in the Preferences " - "folder of the System Folder." -}; - -resource 'WIND' (kToplevelWinTemplate) { - {40, 4, 342, 512}, - zoomDocProc, - invisible, - noGoAway, - 0, - "O'Caml Toplevel", - noAutoCenter -}; - -resource 'WIND' (kGraphicsWinTemplate) { - {40, 4, 342, 512}, - zoomDocProc, - invisible, - goAway, - 0, - "O'Caml Graphics", - noAutoCenter -}; - -resource 'WIND' (kDocumentWinTemplate) { - {45, 10, 342, 512}, - zoomDocProc, - visible, - goAway, - 0, - "Untitled", - staggerMainScreen -}; - -resource 'CNTL' (kScrollBarTemplate) { - {0, 0, 16, 16}, - 0, - invisible, - 0, 0, - scrollBarProc, - 0, - "" -}; - -resource 'acur' (0) { - {1000, 1001, 1002, 1003, } -}; - -resource 'CURS' (1000) { - $"07C0 1F30 3F08 7F04 7F04 FF02 FF02 FFFE" - $"81FE 81FE 41FC 41FC 21F8 19F0 07C0", - $"07C0 1FF0 3FF8 7FFC 7FFC FFFE FFFE FFFE" - $"FFFE FFFE 7FFC 7FFC 3FF8 1FF0 07C0", - {7, 7} -}; - -resource 'CURS' (1001) { - $"07C0 1FF0 3FF8 5FF4 4FE4 87C2 8382 8102" - $"8382 87C2 4FE4 5FF4 3FF8 1FF0 07C0", - $"07C0 1FF0 3FF8 7FFC 7FFC FFFE FFFE FFFE" - $"FFFE FFFE 7FFC 7FFC 3FF8 1FF0 07C0", - {7, 7} -}; - -resource 'CURS' (1002) { - $"07C0 19F0 21F8 41FC 41FC 81FE 81FE FFFE" - $"FF02 FF02 7F04 7F04 3F08 1F30 07C0", - $"07C0 1FF0 3FF8 7FFC 7FFC FFFE FFFE FFFE" - $"FFFE FFFE 7FFC 7FFC 3FF8 1FF0 07C0", - {7, 7} -}; - -resource 'CURS' (1003) { - $"07C0 1830 2008 701C 783C FC7E FEFE FFFE" - $"FEFE FC7E 783C 701C 2008 1830 07C0", - $"07C0 1FF0 3FF8 7FFC 7FFC FFFE FFFE FFFE" - $"FFFE FFFE 7FFC 7FFC 3FF8 1FF0 07C0", - {7, 7} -}; - -resource 'snd ' (1002){ - FormatOne{ - { sampledSynth, 0x80 }, - }, - { - hasData, soundCmd {0x2C}, - noData, ampCmd {127}, - noData, freqDurationCmd {0x4321, 60}, - noData, quietCmd {}, - }, - { - 4, - Rate22K, - 0, 4, - 0, - 60, - $"FF01FF01" - } -}; - -resource 'snd ' (1004){ - FormatOne{ - { sampledSynth, 0x80 }, - }, - { - hasData, soundCmd {0x2C}, - noData, ampCmd {127}, - noData, freqDurationCmd {0x4321, 60}, - noData, quietCmd {}, - }, - { - 4, - Rate22K, - 0, 4, - 0, - 60, - $"FF800180" - } -}; - -resource 'snd ' (1008){ - FormatOne{ - { sampledSynth, 0x80 }, - }, - { - hasData, soundCmd {0x2C}, - noData, ampCmd {127}, - noData, freqDurationCmd {0x4321, 60}, - noData, quietCmd {}, - }, - { - 8, - Rate22K, - 0, 8, - 0, - 60, - $"FFDA8026012680DA" - } -}; - -resource 'snd ' (1032){ - FormatOne{ - { sampledSynth, 0x80 }, - }, - { - hasData, soundCmd {0x2C}, - noData, ampCmd {127}, - noData, freqDurationCmd {0x4321, 60}, - noData, quietCmd {}, - }, - { - 32, - Rate22K, - 0, 32, - 0, - 60, - $"FFFDF5EADAC7B19980674F3926160B0301030B1626394F678099B1C7DAEAF5FD" - } -}; - - -resource 'snd ' (1128){ - FormatOne{ - { sampledSynth, 0x80 }, - }, - { - hasData, soundCmd {0x2C}, - noData, ampCmd {127}, - noData, freqDurationCmd {0x4321, 60}, - noData, quietCmd {}, - }, - { - 128, - Rate22K, - 0, 128, - 0, - 60, - $"FFFFFEFEFDFBFAF8F5F3F0EDEAE6E2DEDAD5D1CCC7C1BCB6B1ABA59F99938C86" - $"807A746D67615B554F4A443F39342F2B26221E1A1613100D0B08060503020201" - $"01010202030506080B0D1013161A1E22262B2F34393F444A4F555B61676D747A" - $"80868C93999FA5ABB1B6BCC1C7CCD1D5DADEE2E6EAEDF0F3F5F8FAFBFDFEFEFF" - } -}; - -resource 'snd ' (1512, "foo"){ - FormatOne{ - { sampledSynth, 0x80 }, - }, - { - hasData, soundCmd {0x2C}, - noData, ampCmd {127}, - noData, freqDurationCmd {0x4321, 60}, - noData, quietCmd {}, - }, - { - 512, - Rate22K, - 0, 512, - 0, - 60, - $"FFFFFFFFFFFFFFFFFEFEFEFEFEFDFDFDFDFCFCFCFBFBFAFAFAF9F9F8F8F7F6F6" - $"F5F5F4F3F3F2F1F1F0EFEFEEEDECEBEAEAE9E8E7E6E5E4E3E2E1E0DFDEDDDCDB" - $"DAD9D8D6D5D4D3D2D1CFCECDCCCAC9C8C7C5C4C3C1C0BFBDBCBAB9B8B6B5B3B2" - $"B1AFAEACABA9A8A6A5A3A2A09F9D9C9A999796949391908E8C8B898886858382" - $"807E7D7B7A7877757472706F6D6C6A696766646361605E5D5B5A585755545251" - $"4F4E4D4B4A484746444341403F3D3C3B39383736343332312F2E2D2C2B2A2827" - $"262524232221201F1E1D1C1B1A1918171616151413121111100F0F0E0D0D0C0B" - $"0B0A0A0908080707060606050504040403030303020202020201010101010101" - $"0101010101010101020202020203030303040404050506060607070808090A0A" - $"0B0B0C0D0D0E0F0F1011111213141516161718191A1B1C1D1E1F202122232425" - $"2627282A2B2C2D2E2F31323334363738393B3C3D3F404143444647484A4B4D4E" - $"4F5152545557585A5B5D5E606163646667696A6C6D6F7072747577787A7B7D7E" - $"808283858688898B8C8E909193949697999A9C9D9FA0A2A3A5A6A8A9ABACAEAF" - $"B1B2B3B5B6B8B9BABCBDBFC0C1C3C4C5C7C8C9CACCCDCECFD1D2D3D4D5D6D8D9" - $"DADBDCDDDEDFE0E1E2E3E4E5E6E7E8E9EAEAEBECEDEEEFEFF0F1F1F2F3F3F4F5" - $"F5F6F6F7F8F8F9F9FAFAFAFBFBFCFCFCFDFDFDFDFEFEFEFEFEFFFFFFFFFFFFFF" - } +data 'TEXT' (1000, purgeable) { /* kAboutText1 */ + "Objective Caml version " VERSIONSTR "\n" + COPYRIGHTSTR "\n" + "\n" + "Xavier Leroy, Jer�me Vouillon, Jacques Garrigue, Damien Doligez, et al.\n" + "\n" + "\n" }; @@ -1057,51 +426,6 @@ resource 'ics8' (1002) { $"00FF FFFF FFFF FFFF FFFF FFFF FFFF FC" }; -resource 'FREF' (128) { - 'APPL', - 0, - "" -}; - -resource 'FREF' (129) { - 'TEXT', - 1, - "" -}; - -resource 'FREF' (130) { - 'sEXT', - 2, - "" -}; - -resource 'BNDL' (128) { - 'Caml', - 0, - { /* array TypeArray: 2 elements */ - /* [1] */ - 'FREF', - { /* array IDArray: 3 elements */ - /* [1] */ - 0, 128, - /* [2] */ - 1, 129, - /* [3] */ - 2, 130 - }, - /* [2] */ - 'ICN#', - { /* array IDArray: 3 elements */ - /* [1] */ - 0, 1000, - /* [2] */ - 1, 1001, - /* [3] */ - 2, 1002 - } - } -}; - resource 'ICON' (1000) { $"001F 8000 003F E000 00FF F000 FDF0 183E 83C0 07FE 81FF FFFE" $"80E3 FFFC C073 FFFC 603B F9F8 381F F0F0 0C0F F030 0607 E018" @@ -1112,47 +436,43 @@ resource 'ICON' (1000) { }; data 'cicn' (1000) { - $"0000 0000 8010 0000 0000 0020 0020 0000 0000 0000 0000 0048" /* ....�...... . .........H */ - $"0000 0048 0000 0000 0004 0001 0004 0000 0000 0000 0000 0000" /* ...H.................... */ - $"0000 0000 0000 0004 0000 0000 0020 0020 0000 0000 0004 0000" /* ............. . ........ */ - $"0000 0020 0020 0000 0000 FFFF FFFF FFFF FFFF FFFF FFFF FFFF" /* ... . ....�������������� */ - $"FFFF FFFF FFFF FFFF FFFF FFFF FFFF FFFF FFFF FFFF FFFF FFFF" /* ������������������������ */ - $"FFFF FFFF FFFF FFFF FFFF FFFF FFFF FFFF FFFF FFFF FFFF FFFF" /* ������������������������ */ - $"FFFF FFFF FFFF FFFF FFFF FFFF FFFF FFFF FFFF FFFF FFFF FFFF" /* ������������������������ */ - $"FFFF FFFF FFFF FFFF FFFF FFFF FFFF FFFF FFFF FFFF FFFF FFFF" /* ������������������������ */ - $"FFFF FFFF FFFF FFFF FFFF FFFF FFFF FFFF FFFF 001F 8000 003F" /* ������������������..�..? */ - $"E000 00FF F000 FDF0 183E 83C0 07FE 81FF FFFE 80E3 FFFC C073" /* �..��.��.>��.����������s */ - $"FFFC 603B F9F8 381F F0F0 0C0F F030 0607 E018 0600 300C 0E00" /* ��`;��8.��..�0..�...0... */ - $"1806 0E00 0C03 0E00 C603 0E00 C303 0E00 C183 0E00 C0C3 0E00" /* ........�...�...��..��.. */ - $"C067 0F00 E035 0700 E01D 0301 E019 0106 7019 0118 7819 0368" /* �g..�5..�...�...p...x..h */ - $"1C19 02C8 0E3A 0740 077A 0640 03FC 0C00 07E0 0800 0C00 0FFF" /* ...�.:.@.z.@.�...�.....� */ - $"F800 0000 0000 0000 0007 0000 FFFF FFFF FFFF 0001 FFFF FFFF" /* �...........������..���� */ - $"0000 0002 CCCC 9999 6666 0003 8888 8888 8888 0004 DDDD DDDD" /* ....�̙�ff..������..���� */ - $"DDDD 0005 FFFF CCCC 9999 0006 0000 BBBB 0000 000F 0000 0000" /* ��..���̙�....��........ */ - $"0000 0000 0000 000F FFFF F000 0000 0000 0000 0000 0000 00FF" /* ........���............� */ - $"FFFF FFF0 0000 0000 0000 0000 0000 FFFF FFFF FFFF 0000 0000" /* ����..........������.... */ - $"0000 FFFF FF0F FFFF 5555 555F F000 00FF FFF0 F222 22FF FF55" /* ..���.��UUU_�..����""��U */ - $"5555 5555 5FFF FFFF FFF0 F222 222F FFFF FFFF FFFF FFFF FFFF" /* UUUU_������""/���������� */ - $"FFF0 F222 2222 FFF3 33FF FFFF FFFF FFFF FF00 FF22 2222 2FFF" /* ���"""��3��������.�"""/� */ - $"44FF FFFF FFFF FFFF FF00 0FF2 2222 22FF F4FF FFFF F55F FFFF" /* D��������..�"""������_�� */ - $"F000 00FF F222 222F FFFF FFFF 5555 FFFF 0000 0000 FF22 2222" /* �..��""/����UU��....�""" */ - $"FFFF FFFF 5555 55FF 0000 0000 0FF2 2222 2FFF FFF2 2555 555F" /* ����UUU�.....�""/���%UU_ */ - $"F000 0000 0FF2 2222 2555 55FF 2255 5555 FF00 0000 FFF2 2222" /* �....�""%UU�"UUU�...��"" */ - $"5555 555F F225 5555 5FF0 0000 FFF2 2225 5555 5555 FF22 5555" /* UUU_�%UU_�..��"%UUUU�"UU */ - $"55FF 0000 FFF2 2225 5555 FF55 5FF2 2555 55FF 0000 FFF2 2225" /* U�..��"%UU�U_�%UU�..��"% */ - $"5555 FF55 55FF 2252 55FF 0000 FFF2 2225 5555 FF55 555F F222" /* UU�UU�"RU�..��"%UU�UU_�" */ - $"22FF 0000 FFF2 2225 5555 FF55 5555 FF22 22FF 0000 FFF2 2222" /* "�..��"%UU�UUU�""�..��"" */ - $"5555 FF55 5555 5FF2 2FFF 0000 FFFF 2222 2555 FFF5 5555 55FF" /* UU�UUU_�/�..��""%U��UUU� */ - $"2F5F 0000 0FFF 2222 2255 FFF5 5555 555F FF5F 0000 00FF 2222" /* /_...�"""U��UUU_�_...�"" */ - $"2221 61F5 5555 555F F55F 0000 000F 2222 2612 2FFF 5555 555F" /* "!a�UUU_�_....""&./�UUU_ */ - $"F55F 0000 000F 2221 6222 2FFF F555 555F F55F 0000 00FF 2612" /* �_...."!b"/��UU_�_...�&. */ - $"1222 222F FF55 555F F55F 0000 00F2 1122 6222 2222 FFF5 55FF" /* .""/�UU_�_...�."b"""��U� */ - $"F5F0 0000 0FF6 2622 2222 2222 2FFF 5FFF F5F0 0000 0F62 2622" /* ��...�&"""""/�_���...b&" */ - $"2222 2222 22FF FFFF FF00 0000 FF22 2222 2222 2222 2FFF FFF0" /* """""����...�"""""""/��� */ - $"0000 0000 F222 2222 2222 2222 FF00 0000 0000 0000 FFFF FFFF" /* ....�"""""""�.......���� */ - $"FFFF FFFF F000 0000 0000" /* �����..... */ -}; - -data 'Caml' (0) { - $"00" /* . */ + $"0000 0000 8010 0000 0000 0020 0020 0000 0000 0000 0000 0048" + $"0000 0048 0000 0000 0004 0001 0004 0000 0000 0000 0000 0000" + $"0000 0000 0000 0004 0000 0000 0020 0020 0000 0000 0004 0000" + $"0000 0020 0020 0000 0000 001F 8000 003F E000 00FF F000 FDFF" + $"F83E FFFF FFFE FFFF FFFE FFFF FFFC FFFF FFFC 7FFF FFF8 3FFF" + $"FFF0 0FFF FFF0 07FF FFF8 07FF FFFC 0FFF FFFE 0FFF FFFF 0FFF" + $"FFFF 0FFF FFFF 0FFF FFFF 0FFF FFFF 0FFF FFFF 0FFF FFFF 07FF" + $"FFFF 03FF FFFF 01FF FFFF 01FF FFFF 03FF FFFF 03FF FFFE 07FF" + $"FFFE 07FF FFFC 0FFF FFE0 0FFF FC00 0FFF F800 001F 8000 003F" + $"E000 00FF F000 FDF0 183E 83C0 07FE 81FF FFFE 80E3 FFFC C073" + $"FFFC 603B F9F8 381F F0F0 0C0F F030 0607 E018 0600 300C 0E00" + $"1806 0E00 0C03 0E00 C603 0E00 C303 0E00 C183 0E00 C0C3 0E00" + $"C067 0F00 E035 0700 E01D 0301 E019 0106 7019 0118 7819 0368" + $"1C19 02C8 0E3A 0740 077A 0640 03FC 0C00 07E0 0800 0C00 0FFF" + $"F800 0000 0000 0000 0007 0000 FFFF FFFF FFFF 0001 FFFF FFFF" + $"0000 0002 CCCC 9999 6666 0003 8888 8888 8888 0004 DDDD DDDD" + $"DDDD 0005 FFFF CCCC 9999 0006 0000 BBBB 0000 000F 0000 0000" + $"0000 0000 0000 000F FFFF F000 0000 0000 0000 0000 0000 00FF" + $"FFFF FFF0 0000 0000 0000 0000 0000 FFFF FFFF FFFF 0000 0000" + $"0000 FFFF FF0F FFFF 5555 555F F000 00FF FFF0 F222 22FF FF55" + $"5555 5555 5FFF FFFF FFF0 F222 222F FFFF FFFF FFFF FFFF FFFF" + $"FFF0 F222 2222 FFF3 33FF FFFF FFFF FFFF FF00 FF22 2222 2FFF" + $"44FF FFFF FFFF FFFF FF00 0FF2 2222 22FF F4FF FFFF F55F FFFF" + $"F000 00FF F222 222F FFFF FFFF 5555 FFFF 0000 0000 FF22 2222" + $"FFFF FFFF 5555 55FF 0000 0000 0FF2 2222 2FFF FFF2 2555 555F" + $"F000 0000 0FF2 2222 2555 55FF 2255 5555 FF00 0000 FFF2 2222" + $"5555 555F F225 5555 5FF0 0000 FFF2 2225 5555 5555 FF22 5555" + $"55FF 0000 FFF2 2225 5555 FF55 5FF2 2555 55FF 0000 FFF2 2225" + $"5555 FF55 55FF 2252 55FF 0000 FFF2 2225 5555 FF55 555F F222" + $"22FF 0000 FFF2 2225 5555 FF55 5555 FF22 22FF 0000 FFF2 2222" + $"5555 FF55 5555 5FF2 2FFF 0000 FFFF 2222 2555 FFF5 5555 55FF" + $"2F5F 0000 0FFF 2222 2255 FFF5 5555 555F FF5F 0000 00FF 2222" + $"2221 61F5 5555 555F F55F 0000 000F 2222 2612 2FFF 5555 555F" + $"F55F 0000 000F 2221 6222 2FFF F555 555F F55F 0000 00FF 2612" + $"1222 222F FF55 555F F55F 0000 00F2 1122 6222 2222 FFF5 55FF" + $"F5F0 0000 0FF6 2622 2222 2222 2FFF 5FFF F5F0 0000 0F62 2622" + $"2222 2222 22FF FFFF FF00 0000 FF22 2222 2222 2222 2FFF FFF0" + $"0000 0000 F222 2222 2222 2222 FF00 0000 0000 0000 FFFF FFFF" + $"FFFF FFFF F000 0000 0000" }; diff --git a/maccaml/constants.h b/maccaml/ocamlconstants.h index 23c25a95d..417ababbf 100644 --- a/maccaml/constants.h +++ b/maccaml/ocamlconstants.h @@ -72,7 +72,8 @@ #define kScrollBarTemplate 1000 -#define kJoeCamlIcon 1000 /* see ocaml.r(ICON/cicn) before changing */ +/* DO NOT CHANGE this definition. */ +#define kApplicationIcon 1000 #define kDialogAbout 1000 #define kAlertNeedSys7 1001 @@ -123,7 +124,8 @@ #define kDisconnected 15 #define kIOError 16 -#define kAboutText 1000 +#define kAboutText1 1000 +#define kAboutText2 1001 #define kMenuBar 1000 diff --git a/maccaml/ocamlmkappli b/maccaml/ocamlmkappli new file mode 100644 index 000000000..f048dbd91 --- /dev/null +++ b/maccaml/ocamlmkappli @@ -0,0 +1,89 @@ +######################################################################### +# # +# Objective Caml # +# # +# Damien Doligez, projet Moscova, INRIA Rocquencourt # +# # +# Copyright 2000 Institut National de Recherche en Informatique et # +# en Automatique. All rights reserved. This file is distributed # +# under the terms of the Q Public License version 1.0. # +# # +######################################################################### + +# $Id$ + + +# ocamlmkappli -- build a standalone application + +# usage: ocamlmkappli [option�] file� +# options: +# -creator <code> use this creator code (default '????') +# -ocamlc <command> use <command> as O'Caml compiler (default ocamlc) +# -d <def> pass "-d <def>" option to Rez +# -prefsize <int> set preferred memory size (megabytes, default 4000) +# -lib <folder> use library files from <folder> (default {CAMLLIB}) +# -minsize <int> set minimum memory size (megabytes, default 2000) +# -name <name> set the name of the application (default a.out) +# -r <file> add resources from this file (or rez source file) + +set echo 0 + +set creator '????' +set ocamlc ocamlc +set rezopt '' +set prefsize 4000 +set lib "{{CAMLLIB}}" +set minsize 2000 +set name a.out +set rezfiles '' + +set files '' + +loop + break if {#} == 0 + if "{{1}}" == "-creator" + set creator "{{2}}" + shift + else if "{{1}}" == "-ocamlc" + set ocamlc "{{2}}" + shift + else if "{{1}}" == "-d" + set rezopt "{{rezopt}} -d ``quote "{{2}}"``" + shift + else if "{{1}}" == "-prefsize" + set prefsize {2} + shift + else if "{{1}}" == "-lib" + set lib "{{2}}" + shift + else if "{{1}}" == "-minsize" + set minsize {2} + shift + else if "{{1}}" == "-name" + set name "{{2}}" + shift + else if "{{1}}" == "-r" + set rezfiles "{{rezfiles}} ``quote "{{2}}"``" + shift + else + set files "{{files}} ``quote "{{1}}"``" + end + shift +end + +if {prefsize} < {minsize} + set prefsize {minsize} +end + +set tmp "{{tempfolder}}ocamlmkappli-`date -n`" +delete -y -ay -i "{{tmp}}" + +duplicate -y "{{lib}}appli" "{{name}}" +rez -d SystemSevenOrLater=1 -d PREFSIZE="{prefsize}" -d MINSIZE="{minsize}" � + -d APPLNAME="�"{{name}}�"" -d CREATOR="'{{creator}}'" � + -a -o "{{name}}" "{{lib}}appli.r" {rezopt} {rezfiles} +{ocamlc} -use-prims "{{lib}}appliprims" {files} -o "{{tmp}}" +catenate "{{tmp}}" >> "{{name}}" +setfile -t APPL -c "{{creator}}" -a iB "{{name}}" + +delete -i "{{tmp}}" |