Commit bfe2b3a6 authored by Erick's avatar Erick

now when TERMis of the form xterm-xxxcolor, it is recognized as a color terminal

parent 693d8cad
......@@ -37,6 +37,8 @@ TODO.org
.beta-number
bootstrap
Python
# Doc directory
doc/TODO
doc/GO
......
;;;;
;;;; bonus.stk -- Useful primitives not in R5RS
;;;;
;;;; Copyright © 2000-2011 Erick Gallesio - I3S-CNRS/ESSI <[email protected]>
;;;; Copyright © 2000-2014 Erick Gallesio - I3S-CNRS/ESSI <[email protected]>
;;;;
;;;;
;;;; This program is free software; you can redistribute it and/or modify
......@@ -21,7 +21,7 @@
;;;;
;;;; Author: Erick Gallesio [[email protected]]
;;;; Creation date: 14-Jun-2000 17:24 (eg)
;;;; Last file update: 27-May-2011 22:58 (eg)
;;;; Last file update: 2-Jan-2014 23:16 (eg)
;;;;
......@@ -897,16 +897,17 @@ doc>
(else (error 'ansi-color "bad command ~S" args)))))))
(define do-color
(if (and (not (key-get *%program-args* :interactive #f))
(member (getenv "TERM")
'("rxvt" "xterm" "xterm-color" "linux" "cygwin" "cons25")))
;; Terminal accepts color
ansi-color
;; Provide a procedure which ignore color indications
(lambda args
(apply string-append
(map (lambda (x) (if (string? x) x ""))
args)))))
(let ((term (getenv "TERM")))
(if (and (not (key-get *%program-args* :interactive #f))
(any (lambda(x) (regexp-match x term))
'("rxvt" "xterm" "xterm-color" "linux" "cygwin" "cons25")))
;; Terminal accepts color
ansi-color
;; Provide a procedure which ignore color indications
(lambda args
(apply string-append
(map (lambda (x) (if (string? x) x ""))
args))))))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;
......
;;;;
;;;; repl.stk -- STklos REPL
;;;;
;;;; Copyright © 2000-2012 Erick Gallesio - Universite de Nice <[email protected]>
;;;; Copyright © 2000-2014 Erick Gallesio - Universite de Nice <[email protected]>
;;;;
;;;;
;;;; This program is free software; you can redistribute it and/or modify
......@@ -21,7 +21,7 @@
;;;;
;;;; Author: Erick Gallesio [[email protected]]
;;;; Creation date: 4-Jun-2000 15:07 (eg)
;;;; Last file update: 1-Jan-2012 18:43 (eg)
;;;; Last file update: 2-Jan-2014 23:18 (eg)
;;;;
;; This file defines the REPL module. This module does not export anything
......@@ -240,7 +240,7 @@ doc>
(%initialize-signals)
(when interactive?
(let ((line1 (format "STklos version ~A\n" (version)))
(line2 "Copyright (C) 1999-2012 Erick Gallesio - Universite de Nice <[email protected]>\n")
(line2 "Copyright (C) 1999-2014 Erick Gallesio - Universite de Nice <[email protected]>\n")
(line3 (format "[~a/~a/~a/~a]\n"
(machine-type)
(%thread-system)
......
This diff is collapsed.
This diff is collapsed.
/*
* stklos.c -- STklos interpreter main function
*
* Copyright © 1999-2012 Erick Gallesio - I3S-CNRS/ESSI <[email protected]>
* Copyright © 1999-2014 Erick Gallesio - I3S-CNRS/ESSI <[email protected]>
*
*
* This program is free software; you can redistribute it and/or modify
......@@ -21,7 +21,7 @@
*
* Author: Erick Gallesio [[email protected]]
* Creation date: 28-Dec-1999 21:19 (eg)
* Last file update: 26-Feb-2012 23:32 (eg)
* Last file update: 2-Jan-2014 19:46 (eg)
*/
#include <stklos.h>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment