aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/ChangeLog11
-rw-r--r--src/gui/gui.pro.in13
-rw-r--r--src/interp/int-top.boot6
-rw-r--r--src/interp/spad-parser.boot4
-rw-r--r--src/interp/sys-globals.boot10
-rw-r--r--src/interp/sys-macros.lisp4
-rw-r--r--src/interp/vmlisp.lisp10
-rw-r--r--src/lisp/core.lisp.in5
8 files changed, 41 insertions, 22 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index ae042707..191bda02 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,5 +1,16 @@
2014-11-20 Gabriel Dos Reis <gdr@integrable-solutions.net>
+ * lisp/core.lisp.in (forkStreamByName): New.
+ * interp/int-top.boot (ncIntLoop): Use it.
+ * interp/spad-parser.boot (parseSpadFile): Likewise.
+ * interp/sys-globals.boot: Likewise.
+ * interp/sys-macros.lisp (quietlyIfInteractive): Likewise.
+ * interp/vmlisp.lisp (MAKE-INSTREAM): Likewise.
+ (MAKE-OUTSTREAM): Likewise.
+ (DEFIOSTREAM): Likewise.
+
+2014-11-20 Gabriel Dos Reis <gdr@integrable-solutions.net>
+
* algebra/files.spad.pamphlet (endOfFile?)[TextFile]: Use builtin eof?
* interp/br-data.boot (dbAugmentConstructorDataTable): Likewise.
* interp/topics.boot (mkTopicHashTable): Likewise.
diff --git a/src/gui/gui.pro.in b/src/gui/gui.pro.in
index a34f55cc..b7d6f34d 100644
--- a/src/gui/gui.pro.in
+++ b/src/gui/gui.pro.in
@@ -7,9 +7,6 @@ oa_targetdir = @top_builddir@/@target@
OA_INC = $${oa_targetdir}/include
OA_LIB = -L@top_builddir@/@target@/lib -lOpenAxiom
-OA_IOLIB = -L@top_builddir@/src/io -lio
-OA_SYNTAX_LIB = -L@top_builddir@/src/syntax -lsyntax
-OA_RT_LIB = -L@top_builddir@/src/rt -lruntime
## We build in release mode.
CONFIG += release
@@ -23,15 +20,23 @@ macx-g++ {
QMAKE_CFLAGS_X86_64 -= -Xarch_x86_64
QMAKE_CXXFLAGS -= -Xarch_x86_64
+ QMAKE_CXXFLAGS += -stdlib=libc++
QMAKE_CXXFLAGS_X86_64 -= -Xarch_x86_64
+ QMAKE_CXXFLAGS_X86_64 += -stdlib=libc++
QMAKE_LFLAGS -= -Xarch_x86_64
+ QMAKE_LFLAGS += -stdlib=libc++
QMAKE_LFLAGS_X86_64 -= -Xarch_x86_64
+ QMAKE_LFLAGS_X86_64 += -stdlib=libc++
}
+QMAKE_MACOSX_DEPLOYMENT_TARGET = 10.7
## We are building a GUI application.
TEMPLATE = app
+QT += core gui
+greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
+
## Put the executable directly in the staged bin directory.
DESTDIR = @top_builddir@/@target@/bin
TARGET = open-axiom
@@ -51,7 +56,7 @@ DEPENDPATH += @srcdir@
SOURCES += server.cc conversation.cc main-window.cc debate.cc main.cc
## Additional support libraries
-LIBS += $$OA_RT_LIB $$OA_SYNTAX_LIB $$OA_LIB $$OA_IOLIB
+LIBS += $$OA_LIB
## C++ compiler
QMAKE_CXX = @CXX@
diff --git a/src/interp/int-top.boot b/src/interp/int-top.boot
index 4a74a8ff..51a426da 100644
--- a/src/interp/int-top.boot
+++ b/src/interp/int-top.boot
@@ -1,6 +1,6 @@
-- Copyright (c) 1991-2002, The Numerical Algorithms Group Ltd.
-- All rights reserved.
--- Copyright (C) 2007-2012, Gabriel Dos Reis.
+-- Copyright (C) 2007-2014, Gabriel Dos Reis.
-- All rights reserved.
--
-- Redistribution and use in source and binary forms, with or without
@@ -92,8 +92,8 @@ ncTopLevel() ==
ncIntLoop() ==
- $InputStream : local := MAKE_-SYNONYM_-STREAM "*STANDARD-INPUT*"
- $OutputStream : local := MAKE_-SYNONYM_-STREAM "*STANDARD-OUTPUT*"
+ $InputStream : local := forkStreamByName "*STANDARD-INPUT*"
+ $OutputStream : local := forkStreamByName "*STANDARD-OUTPUT*"
intloop()
diff --git a/src/interp/spad-parser.boot b/src/interp/spad-parser.boot
index 4fc465d3..27c1b371 100644
--- a/src/interp/spad-parser.boot
+++ b/src/interp/spad-parser.boot
@@ -1,4 +1,4 @@
--- Copyright (C) 2007-2013, Gabriel Dos Reis.
+-- Copyright (C) 2007-2014, Gabriel Dos Reis.
-- All rights reserved.
--
-- Redistribution and use in source and binary forms, with or without
@@ -1065,7 +1065,7 @@ parseSpadFile sourceFile ==
FILE_-CLOSED : local := false -- current stream closed?
try
-- noise to standard output
- $OutputStream: local := MAKE_-SYNONYM_-STREAM "*STANDARD-OUTPUT*"
+ $OutputStream: local := forkStreamByName "*STANDARD-OUTPUT*"
-- we need to tell the post-parsing transformers that we're compiling
-- Spad because few parse forms have slightly different representations
-- depending on whether we are interpreter mode or compiler mode.
diff --git a/src/interp/sys-globals.boot b/src/interp/sys-globals.boot
index 825b40ce..ae2d5f80 100644
--- a/src/interp/sys-globals.boot
+++ b/src/interp/sys-globals.boot
@@ -1,6 +1,6 @@
-- Copyright (c) 1991-2002, The Numerical Algorithms Group Ltd.
-- All rights reserved.
--- Copyright (C) 2007-2013, Gabriel Dos Reis.
+-- Copyright (C) 2007-2014, Gabriel Dos Reis.
-- All rights reserved.
--
-- Redistribution and use in source and binary forms, with or without
@@ -365,14 +365,12 @@ $compForModeIfTrue := false
--%
-$algebraOutputStream :=
- MAKE_-SYNONYM_-STREAM "*STANDARD-OUTPUT*"
+$algebraOutputStream := forkStreamByName "*STANDARD-OUTPUT*"
++
-$texOutputStream := MAKE_-SYNONYM_-STREAM "*STANDARD-OUTPUT*"
+$texOutputStream := forkStreamByName "*STANDARD-OUTPUT*"
-$fortranOutputStream :=
- MAKE_-SYNONYM_-STREAM "*STANDARD-OUTPUT*"
+$fortranOutputStream := forkStreamByName "*STANDARD-OUTPUT*"
--%
diff --git a/src/interp/sys-macros.lisp b/src/interp/sys-macros.lisp
index d03cec85..1d5d98bf 100644
--- a/src/interp/sys-macros.lisp
+++ b/src/interp/sys-macros.lisp
@@ -1,6 +1,6 @@
;; Copyright (c) 1991-2002, The Numerical Algorithms Group Ltd.
;; All rights reserved.
-;; Copyright (C) 2007-2013, Gabriel Dos Reis.
+;; Copyright (C) 2007-2014, Gabriel Dos Reis.
;; All rights reserved.
;;
;; Redistribution and use in source and binary forms, with or without
@@ -1050,7 +1050,7 @@
(defmacro |quietlyIfInteractive| (cmd)
`(let ((|$OutputStream| (if |$InteractiveMode|
(make-broadcast-stream)
- (make-synonym-stream '*standard-output*))))
+ (|forkStreamByName| '*standard-output*))))
,cmd))
(defmacro |withOutputFile| (stream filespec form)
diff --git a/src/interp/vmlisp.lisp b/src/interp/vmlisp.lisp
index cbb6de78..bf75f950 100644
--- a/src/interp/vmlisp.lisp
+++ b/src/interp/vmlisp.lisp
@@ -912,13 +912,13 @@
(defun MAKE-INSTREAM (filespec &optional (recnum 0))
(declare (ignore recnum))
- (cond ((numberp filespec) (make-synonym-stream '*standard-input*))
+ (cond ((numberp filespec) (|forkStreamByName| '*standard-input*))
((null filespec) (error "not handled yet"))
(t (|inputTextFile| (|makeInputFilename| filespec)))))
(defun MAKE-OUTSTREAM (filespec &optional (width nil) (recnum 0))
(declare (ignore width) (ignore recnum))
- (cond ((numberp filespec) (make-synonym-stream '*standard-output*))
+ (cond ((numberp filespec) (|forkStreamByName| '*standard-output*))
((null filespec) (error "not handled yet"))
(t (|outputTextFile| (|makeFilename| filespec)))))
@@ -926,7 +926,7 @@
"fortran support"
(declare (ignore width) (ignore recnum))
(cond
- ((numberp filespec) (make-synonym-stream '*standard-output*))
+ ((numberp filespec) (|forkStreamByName| '*standard-output*))
((null filespec) (error "make-appendstream: not handled yet"))
('else (open (|makeFilename| filespec) :direction :output
:if-exists :append :if-does-not-exist :create))))
@@ -938,8 +938,8 @@
(dev (cdr (assoc 'DEVICE stream-alist))))
(if (EQ dev 'CONSOLE)
(case mode
- ((OUTPUT O) (make-synonym-stream '*standard-output*))
- ((INPUT I) (make-synonym-stream '*standard-input*)))
+ ((OUTPUT O) (|forkStreamByName| '*standard-output*))
+ ((INPUT I) (|forkStreamByName| '*standard-input*)))
(let ((strm (case mode
((OUTPUT O) (open (|makeFilename| filename)
:direction :output))
diff --git a/src/lisp/core.lisp.in b/src/lisp/core.lisp.in
index 025791f2..dece602f 100644
--- a/src/lisp/core.lisp.in
+++ b/src/lisp/core.lisp.in
@@ -113,6 +113,7 @@
"closeFile"
"closeStream"
"eof?"
+ "forkStreamByName"
"prettyPrint"
"readLine"
"readExpr"
@@ -607,6 +608,10 @@
(defmacro |eof?| (s)
`(null (peek-char nil ,s nil nil nil)))
+;; Make a new stream object, duplicate of the denotation of argument.
+(defmacro |forkStreamByName| (s)
+ `(make-synonym-stream ,s))
+
;; Read a line from the input text file. Quietly return
;; %nothing at end of file.
(defmacro |readLine| (f)