Index: cm3/src/M3Path.m3 =================================================================== RCS file: /usr/cvs/cm3/m3-sys/cm3/src/M3Path.m3,v retrieving revision 1.1.1.1 retrieving revision 1.1.1.1.2.1 diff -b -B -u -r1.1.1.1 -r1.1.1.1.2.1 --- cm3/src/M3Path.m3 2001/01/14 13:40:19 1.1.1.1 +++ cm3/src/M3Path.m3 2001/01/28 13:01:46 1.1.1.1.2.1 @@ -252,8 +252,12 @@ IF (start_a + len > len_a) THEN RETURN FALSE; END; IF (start_b + len > len_b) THEN RETURN FALSE; END; WHILE (len > 0) DO +(* FIXME: Text.SetChars (buf_a, a, start_a); Text.SetChars (buf_b, b, start_b); +*) + Text.SetChars (buf_a, Text.Sub(a, start_a)); + Text.SetChars (buf_b, Text.Sub(b, start_b)); IF ignore_case THEN FOR i := 0 TO MIN (N, len) - 1 DO IF lcase[buf_a[i]] # lcase[buf_b[i]] THEN RETURN FALSE; END; Index: cm3/src/UtilsPosix.m3 =================================================================== RCS file: /usr/cvs/cm3/m3-sys/cm3/src/UtilsPosix.m3,v retrieving revision 1.2 retrieving revision 1.1.1.1.2.1 diff -b -B -u -r1.2 -r1.1.1.1.2.1 --- cm3/src/UtilsPosix.m3 2001/02/12 15:24:33 1.2 +++ cm3/src/UtilsPosix.m3 2001/01/28 17:36:25 1.1.1.1.2.1 @@ -11,11 +10,11 @@ Remove (to); MakeRelative (from, to); Msg.Commands ("link -s ", from, " ", to); - s_from := M3toC.SharedTtoS (from); - s_to := M3toC.SharedTtoS (to); + s_from := M3toC.TtoS (from); + s_to := M3toC.TtoS (to); EVAL Unix.symlink (s_from, s_to); - M3toC.FreeSharedS (from, s_from); - M3toC.FreeSharedS (to, s_to); + M3toC.FreeCopiedS (s_from); + M3toC.FreeCopiedS (s_to); END LinkFile; PROCEDURE MakeRelative (VAR from: TEXT; to: TEXT) = Index: cm3/src/m3makefile =================================================================== RCS file: /usr/cvs/cm3/m3-sys/cm3/src/m3makefile,v retrieving revision 1.2 retrieving revision 1.2.2.1 diff -b -B -u -r1.2 -r1.2.2.1 --- cm3/src/m3makefile 2001/01/27 02:01:27 1.2 +++ cm3/src/m3makefile 2001/02/06 17:51:44 1.2.2.1 @@ -9,6 +9,7 @@ % remove_m3_option ("-gui") % m3_option ("-times") +include ("../../../compat.quake") import ("libm3") import ("m3middle") import ("m3linker") Index: m3back/src/m3makefile =================================================================== RCS file: /usr/cvs/cm3/m3-sys/m3back/src/m3makefile,v retrieving revision 1.1.1.1 retrieving revision 1.1.1.1.2.1 diff -b -B -u -r1.1.1.1 -r1.1.1.1.2.1 --- m3back/src/m3makefile 2001/01/14 13:40:21 1.1.1.1 +++ m3back/src/m3makefile 2001/01/28 13:01:47 1.1.1.1.2.1 @@ -17,6 +17,7 @@ module ("Stackx86") module ("Codex86") +include("../../../compat.quake") build_standalone () Library ("m3back") Index: m3front/src/m3makefile =================================================================== RCS file: /usr/cvs/cm3/m3-sys/m3front/src/m3makefile,v retrieving revision 1.1.1.1 retrieving revision 1.1.1.1.2.1 diff -b -B -u -r1.1.1.1 -r1.1.1.1.2.1 --- m3front/src/m3makefile 2001/01/14 13:40:30 1.1.1.1 +++ m3front/src/m3makefile 2001/01/28 13:01:47 1.1.1.1.2.1 @@ -24,6 +24,7 @@ include_dir ("types") include_dir ("values") +include("../../../compat.quake") build_standalone () Library ("m3front") Index: m3front/src/exprs/TextExpr.m3 =================================================================== RCS file: /usr/cvs/cm3/m3-sys/m3front/src/exprs/TextExpr.m3,v retrieving revision 1.1.1.1 retrieving revision 1.1.1.1.2.1 diff -b -B -u -r1.1.1.1 -r1.1.1.1.2.1 --- m3front/src/exprs/TextExpr.m3 2001/01/14 13:40:31 1.1.1.1 +++ m3front/src/exprs/TextExpr.m3 2001/01/28 13:01:47 1.1.1.1.2.1 @@ -223,9 +223,15 @@ ELSIF (wa # NIL) AND (wb # NIL) THEN c := New16 (M3WString.Concat (wa, wb)); ELSIF (sa # NIL) THEN (* wb # NIL *) + <* ASSERT FALSE *> +(* FIXME c := New16 (M3WString.Concat (M3WString.Add (M3String.ToText (sa)), wb)); +*) ELSE (*wa # NIL AND sb # NIL*) + <* ASSERT FALSE *> +(* FIXME c := New16 (M3WString.Concat (wa, M3WString.Add (M3String.ToText (sb)))); +*) END; RETURN TRUE; END Cat; Index: m3front/src/misc/M3WString.m3 =================================================================== RCS file: /usr/cvs/cm3/m3-sys/m3front/src/misc/M3WString.m3,v retrieving revision 1.2 retrieving revision 1.1.1.1.2.1 diff -b -B -u -r1.2 -r1.1.1.1.2.1 --- m3front/src/misc/M3WString.m3 2001/02/12 15:25:20 1.2 +++ m3front/src/misc/M3WString.m3 2001/01/28 13:01:47 1.1.1.1.2.1 @@ -47,7 +46,10 @@ BEGIN body[len-1] := 0; FOR i := 0 TO len-1 DO +(* FIXME body[i] := ORD (Text.GetWideChar (x, i)); +*) + body[i] := ORD (Text.GetChar (x, i)); END; IF (next_t = NIL) THEN next_t := NEW (T) END; next_t.prefix := NIL; Index: m3linker/src/m3makefile =================================================================== RCS file: /usr/cvs/cm3/m3-sys/m3linker/src/m3makefile,v retrieving revision 1.1.1.1 retrieving revision 1.1.1.1.2.1 diff -b -B -u -r1.1.1.1 -r1.1.1.1.2.1 --- m3linker/src/m3makefile 2001/01/14 13:40:36 1.1.1.1 +++ m3linker/src/m3makefile 2001/01/28 13:01:47 1.1.1.1.2.1 @@ -23,6 +23,7 @@ module ("MxVSSet") module ("MxIO") +include("../../../compat.quake") build_standalone () Library ("m3link") Index: m3middle/src/M3Buf.m3 =================================================================== RCS file: /usr/cvs/cm3/m3-sys/m3middle/src/M3Buf.m3,v retrieving revision 1.1.1.1 retrieving revision 1.1.1.1.2.1 diff -b -B -u -r1.1.1.1 -r1.1.1.1.2.1 --- m3middle/src/M3Buf.m3 2001/01/14 13:40:37 1.1.1.1 +++ m3middle/src/M3Buf.m3 2001/01/28 13:01:48 1.1.1.1.2.1 @@ -8,7 +8,7 @@ MODULE M3Buf; -IMPORT Wr, Convert, Text, Text8, Thread, Target, TInt, M3FP; +IMPORT Wr, Convert, Text, (* FIXME: Text8 *) TextF, Thread, Target, TInt, M3FP; CONST ChunkSize = 2 * 1024 - 3 * BYTESIZE (INTEGER); @@ -79,7 +79,10 @@ buf : ARRAY [0..255] OF CHAR; BEGIN WHILE (cnt > 0) DO +(* FIXME Text.SetChars (buf, txt, start); +*) + Text.SetChars (buf, Text.Sub(txt, start)); PutSub (t, SUBARRAY (buf, 0, MIN (NUMBER (buf), cnt))); INC (start, NUMBER (buf)); DEC (cnt, NUMBER (buf)); END; @@ -170,17 +173,26 @@ PROCEDURE MessyToText (t: T): TEXT = VAR len := t.nFull * ChunkSize + t.next; +(* FIXME: txt := Text8.Create (len); +*) + txt := TextF.New(len); c := t.head; n := 0; BEGIN FOR i := 1 TO t.nFull DO +(* FIXME SUBARRAY (txt.contents^, n, ChunkSize) := c.buf; +*) + SUBARRAY (txt^, n, ChunkSize) := c.buf; c := c.next; INC (n, ChunkSize); END; IF (t.next # 0) THEN +(* FIXME SUBARRAY (txt.contents^, n, t.next) := SUBARRAY (c.buf, 0, t.next); +*) + SUBARRAY (txt^, n, t.next) := SUBARRAY (c.buf, 0, t.next); END; RETURN txt; END MessyToText; Index: m3middle/src/m3makefile =================================================================== RCS file: /usr/cvs/cm3/m3-sys/m3middle/src/m3makefile,v retrieving revision 1.1.1.1 retrieving revision 1.1.1.1.2.1 diff -b -B -u -r1.1.1.1 -r1.1.1.1.2.1 --- m3middle/src/m3makefile 2001/01/14 13:40:37 1.1.1.1 +++ m3middle/src/m3makefile 2001/01/28 13:01:48 1.1.1.1.2.1 @@ -37,6 +37,7 @@ Module ("M3CG_BinWr") Module ("M3RT") +include("../../../compat.quake") build_standalone () Library ("m3middle") Index: m3objfile/src/NTObjFile.m3 =================================================================== RCS file: /usr/cvs/cm3/m3-sys/m3objfile/src/NTObjFile.m3,v retrieving revision 1.1.1.1 retrieving revision 1.1.1.1.2.1 diff -b -B -u -r1.1.1.1 -r1.1.1.1.2.1 --- m3objfile/src/NTObjFile.m3 2001/01/14 13:40:39 1.1.1.1 +++ m3objfile/src/NTObjFile.m3 2001/01/28 13:01:48 1.1.1.1.2.1 @@ -9,7 +9,7 @@ IMPORT Text, Wr, Word, IntIntTbl, TextIntTbl; IMPORT M3ObjFile, M3ID, CoffTime, Target; FROM M3CG IMPORT Name, BitOffset, BitSize, ByteOffset, ByteSize, TypeUID; -IMPORT RTError; +(* IMPORT RTError; *) TYPE Seg = M3ObjFile.Seg; @@ -531,7 +531,9 @@ IF t.symtab.map.get (id, x) THEN (*duplicate symbol *) +(* RTError.Msg ("NTObjFile.m3", 534, "duplicate symbol: " & M3ID.ToText (id)); +*) <*ASSERT FALSE*> END; Index: m3objfile/src/m3makefile =================================================================== RCS file: /usr/cvs/cm3/m3-sys/m3objfile/src/m3makefile,v retrieving revision 1.1.1.1 retrieving revision 1.1.1.1.2.1 diff -b -B -u -r1.1.1.1 -r1.1.1.1.2.1 --- m3objfile/src/m3makefile 2001/01/14 13:40:39 1.1.1.1 +++ m3objfile/src/m3makefile 2001/01/28 13:01:48 1.1.1.1.2.1 @@ -11,5 +11,6 @@ Module ("MasmObjFile") Module ("NTObjFile") +include("../../../compat.quake") build_standalone () Library ("m3objfile") Index: m3quake/src/QMachine.m3 =================================================================== RCS file: /usr/cvs/cm3/m3-sys/m3quake/src/QMachine.m3,v retrieving revision 1.1.1.1 retrieving revision 1.1.1.1.2.1 diff -b -B -u -r1.1.1.1 -r1.1.1.1.2.1 --- m3quake/src/QMachine.m3 2001/01/14 13:40:39 1.1.1.1 +++ m3quake/src/QMachine.m3 2001/01/28 13:01:48 1.1.1.1.2.1 @@ -1890,8 +1890,12 @@ IF (len # Text.Length (b)) THEN RETURN FALSE; END; nxt := 0; WHILE (nxt < len) DO +(* FIXME Text.SetChars (buf_a, a, nxt); Text.SetChars (buf_b, b, nxt); +*) + Text.SetChars (buf_a, Text.Sub(a, nxt)); + Text.SetChars (buf_b, Text.Sub(b, nxt)); FOR i := 0 TO MIN (NUMBER (buf_a), len-nxt) - 1 DO IF lcase[buf_a[i]] # lcase[buf_b[i]] THEN RETURN FALSE; END; END; Index: m3quake/src/m3makefile =================================================================== RCS file: /usr/cvs/cm3/m3-sys/m3quake/src/m3makefile,v retrieving revision 1.1.1.1 retrieving revision 1.1.1.1.2.1 diff -b -B -u -r1.1.1.1 -r1.1.1.1.2.1 --- m3quake/src/m3makefile 2001/01/14 13:40:39 1.1.1.1 +++ m3quake/src/m3makefile 2001/01/28 13:01:48 1.1.1.1.2.1 @@ -25,5 +25,6 @@ Module ("QVal") Module ("MxConfig") +include("../../../compat.quake") build_standalone () Library("m3quake") Index: mklib/src/m3makefile =================================================================== RCS file: /usr/cvs/cm3/m3-sys/mklib/src/m3makefile,v retrieving revision 1.1.1.1 retrieving revision 1.1.1.1.2.1 diff -b -B -u -r1.1.1.1 -r1.1.1.1.2.1 --- mklib/src/m3makefile 2001/01/14 13:40:40 1.1.1.1 +++ mklib/src/m3makefile 2001/01/28 13:01:48 1.1.1.1.2.1 @@ -4,5 +4,6 @@ implementation ("Main") +include("../../../compat.quake") build_standalone () Program ("mklib") Index: m3cc/src/m3makefile =================================================================== RCS file: /usr/cvs/cm3/m3-sys/m3cc/src/m3makefile,v retrieving revision 1.3 retrieving revision 1.1.1.1.2.3 diff -b -B -u -r1.3 -r1.1.1.1.2.3 --- m3cc/src/m3makefile 2001/02/05 22:05:53 1.3 +++ m3cc/src/m3makefile 2001/02/06 17:51:45 1.1.1.1.2.3 @@ -98,50 +98,10 @@ % figure out where we're going to build the beast local build_dir = "." % let m3build set the build directory -if not equal (M3CC_HOST, M3CC_TARGET) - build_dir = ".." & SL & BUILD_DIR & "-" & M3CC_TARGET -end - -% make sure the derived directory exists -if stale (build_dir, build_dir) - exec ("mkdir", build_dir) -end - -if not defined ("no_config") - % configure the sources - done = ".configure-done" - donep = build_dir & SL & done - if stale(donep, donep) - exec ("cd", build_dir, "; ../gcc/configure", M3CC_CONFIG, - "--srcdir=../gcc", - "--host=" & GNU_platform (M3CC_HOST), - "--build=" & GNU_platform (M3CC_HOST), - "--target=" & GNU_platform (M3CC_TARGET), - "&& echo \"done\" > " & done) - end -end -% misc fixups & ship commands -pgms = "LANGUAGES=m3cg" -postcp = "cp -p gcc/cm3cg ." -if equal (M3CC_HOST, M3CC_TARGET) - BindExport ("cm3cg") - if equal (M3CC_HOST, "DS3100") or equal (M3CC_HOST, "ALPHA_OSF") - pgms = "LANGUAGES='m3cg mips-tfile'" - BindExport ("mips-tfile") - postcp = "cp -p gcc/cm3cg . && cp -p gcc/mips-tfile ." - end +if defined("PM3") + include("m3makefile.pm3") +else + include("m3makefile.cm3") end - -% check for non-default flags -ARG0 = get_overrides ("CC", M3CC_CC) -ARG1 = get_overrides ("CFLAGS", M3CC_CFLAGS) - -% finally, compile it -exec ("cd", build_dir, ";", M3CC_MAKE, ARG0, ARG1, pgms) -if defined("postcp") - exec(postcp) -end - - Index: m3cc/src/m3makefile.cm3 =================================================================== RCS file: m3makefile.cm3 diff -N m3makefile.cm3 --- /dev/null Fri Feb 16 22:40:07 2001 +++ /usr/tmp/cvsu16959 Fri Feb 16 23:09:36 2001 @@ -0,0 +1,45 @@ +if not equal (M3CC_HOST, M3CC_TARGET) + build_dir = ".." & SL & BUILD_DIR & "-" & M3CC_TARGET +end + +% make sure the derived directory exists +if stale (build_dir, build_dir) + exec ("mkdir", build_dir) +end + +if not defined ("no_config") + % configure the sources + done = ".configure-done" + donep = build_dir & SL & done + if stale(donep, donep) + exec ("cd", build_dir, "; ../gcc/configure", M3CC_CONFIG, + "--srcdir=../gcc", + "--host=" & GNU_platform (M3CC_HOST), + "--build=" & GNU_platform (M3CC_HOST), + "--target=" & GNU_platform (M3CC_TARGET), + "&& echo \"done\" > " & done) + end +end + +% misc fixups & ship commands +pgms = "LANGUAGES=m3cg" +postcp = "cp -p gcc/cm3cg ." +if equal (M3CC_HOST, M3CC_TARGET) + BindExport ("cm3cg") + if equal (M3CC_HOST, "DS3100") or equal (M3CC_HOST, "ALPHA_OSF") + pgms = "LANGUAGES='m3cg mips-tfile'" + BindExport ("mips-tfile") + postcp = "cp -p gcc/cm3cg . && cp -p gcc/mips-tfile ." + end +end + +% check for non-default flags +ARG0 = get_overrides ("CC", M3CC_CC) +ARG1 = get_overrides ("CFLAGS", M3CC_CFLAGS) + +% finally, compile it +exec ("cd", build_dir, ";", M3CC_MAKE, ARG0, ARG1, pgms) +if defined("postcp") + exec(postcp) +end + Index: m3cc/src/m3makefile.pm3 =================================================================== RCS file: m3makefile.pm3 diff -N m3makefile.pm3 --- /dev/null Fri Feb 16 22:40:07 2001 +++ /usr/tmp/cvsA16959 Fri Feb 16 23:09:36 2001 @@ -0,0 +1,80 @@ +% Copyright (C) 1994, Digital Equipment Corporation +% All rights reserved. +% See the file COPYRIGHT for a full description. +% +% Last modified on Fri Feb 10 13:16:06 PST 1995 by kalsow +% + +local ret = 0 + +if not equal (M3CC_HOST, M3CC_TARGET) + build_dir = ".." & SL & BUILD_DIR & "-" & M3CC_TARGET + + if stale (build_dir, build_dir) + ret = exec (["mkdir", build_dir]) + end +end + +if not defined ("no_config") + % configure the sources + local cmd = ["../gcc/configure", "--srcdir=../gcc", + "--host=" & gnu_platform (M3CC_HOST), + "--build=" & gnu_platform (M3CC_HOST), + "--target=" & gnu_platform (M3CC_TARGET)] + if not empty(M3CC_CONFIG) + cmd += M3CC_CONFIG + end + done = ".configure-done" + donep = build_dir & SL & done + if stale(donep, donep) + if equal(OS_TYPE,"WIN32") + > "tmpsh" in + write("#! /bin/sh",CR) + write(cmd,CR) + end + ret = exec(["sh","tmpsh"],[],build_dir) + else + write(cmd," ",build_dir,CR) + ret = exec(cmd,[],build_dir) + end + if equal(ret,0) + ret = exec(["echo", "done"], ["",donep,""]) + else + error("Failed to configure m3cc") + end + end +end + +% misc fixups & ship commands +pgms = "m3cg" +if equal (M3CC_HOST, M3CC_TARGET) + LibdExport (program_name("m3cgc1")) + if equal (M3CC_HOST, "DS3100") or equal (M3CC_HOST, "ALPHA_OSF") + or equal (M3CC_HOST, "Tru64v5") + pgms = ["m3cg", "mips-tfile"] + LibdExport ("mips-tfile") + end + if equal (M3CC_HOST, "ALPHA_OSF") or equal (M3CC_HOST, "Tru64v5") + > "as" in + write("#!/bin/sh",CR) + write("/bin/as $*",CR) + end + > "fixobj" in + write("#!/bin/sh",CR) + write(LIB_USE & "/mips-tfile $*",CR) + end + LibdExport ("as") + LibdExport ("fixobj") + end +end + +% check for non-default flags +ARG0 = get_overrides ("CC", M3CC_CC) +ARG1 = get_overrides ("CFLAGS", M3CC_CFLAGS) + +% finally, compile it +ret = exec ([M3CC_MAKE, ARG0, ARG1, "LANGUAGES=" & pgms],[], build_dir) +if not equal(ret,0) error("Failed to build m3cc") end +ret = exec(["cp", "-p", "gcc/cm3cg", "cm3cg"],[],build_dir) + +