--- gforth/kernel/errore.fs 1998/08/29 20:46:14 1.3 +++ gforth/kernel/errore.fs 2000/09/23 15:06:10 1.9 @@ -1,6 +1,6 @@ \ ERRORE.FS English error strings 9may93jaw -\ Copyright (C) 1995 Free Software Foundation, Inc. +\ Copyright (C) 1995,1996,1997,1998,1999 Free Software Foundation, Inc. \ This file is part of Gforth. @@ -22,6 +22,9 @@ \ The errors are defined by a linked list, for easy adding \ and deleting. Speed is not neccassary at this point. +require ./io.fs +require ./nio.fs + AVariable ErrLink \ Linked list entry point NIL ErrLink ! @@ -34,13 +37,16 @@ decimal \ error numbers between -512 and -2047 are for OS errors and are \ handled with strerror +has? OS [IF] : >stderr ( -- ) r> outfile-id >r stderr to outfile-id >exec r> to outfile-id ; +[ELSE] +: >stderr ; +[THEN] : .error ( n -- ) >stderr - cr ." Error: " ErrLink BEGIN @ dup WHILE @@ -59,4 +65,4 @@ decimal 512 + negate strerror type EXIT THEN [ [THEN] ] - . ; + ." error " dec. ;