home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
OS/2 Shareware BBS: 10 Tools
/
10-Tools.zip
/
sa104os2.zip
/
SATHR104.ZIP
/
SATHER
/
LIBRARY
/
ERR.SA
< prev
next >
Wrap
Text File
|
1994-12-22
|
3KB
|
93 lines
-- Copyright (C) International Computer Science Institute, 1994. COPYRIGHT --
-- NOTICE: This code is provided "AS IS" WITHOUT ANY WARRANTY and is subject --
-- to the terms of the SATHER LIBRARY GENERAL PUBLIC LICENSE contained in --
-- the file "Doc/License" of the Sather distribution. The license is also --
-- available from ICSI, 1947 Center St., Suite 600, Berkeley CA 94704, USA. --
--------> Please email comments to "sather-bugs@icsi.berkeley.edu". <----------
-- err.sa: Output on stderr.
-------------------------------------------------------------------
class ERR is
-- Direct access to stderr.
create:SAME is return self end;
plus(s:STR):SAME is
-- Print `s' on stderr and return self.
C_ERR::c_err_nstr(s.size,s); return self end;
plus(s:STR) is
-- Print `s' on stderr.
C_ERR::c_err_nstr(s.size,s) end;
plus(c:CHAR):SAME is
-- Print the character `c' on stderr and return self.
C_ERR::c_err_char(c); return self end;
plus(c:CHAR) is
-- Print the character `c' on stderr.
C_ERR::c_err_char(c) end;
plus(s:FSTR):SAME is
-- Print `s' on stdout and return self.
C_ERR::c_err_nstr(s.size,s.str); return self end;
plus(s:FSTR) is
-- Print `s' on stdout.
C_ERR::c_err_nstr(s.size,s.str) end;
plus(b:BOOL):SAME is
-- Print `b' on stdout and return self.
C_ERR::c_err_str(b.str); return self end;
plus(b:BOOL) is
-- Print `b' on stdout.
C_ERR::c_err_str(b.str) end;
plus(i:INT):SAME is
-- Print `i' on stdout and return self.
C_ERR::c_err_str(i.str); return self end;
plus(i:INT) is
-- Print `i' on stdout.
C_ERR::c_err_str(i.str) end;
plus(f:FLT):SAME is
-- Print `f' on stdout and return self.
C_ERR::c_err_str(f.str); return self end;
plus(f:FLT) is
-- Print `f' on stdout.
C_ERR::c_err_str(f.str) end;
plus(f:FLTD):SAME is
-- Print `f' on stdout and return self.
C_ERR::c_err_str(f.str); return self end;
plus(f:FLTD) is
-- Print `f' on stdout.
C_ERR::c_err_str(f.str) end;
flush is
-- Flush buffer. For ERR, this shouldn't be necessary since
-- it should be unbuffered. But you never know.
C_ERR::c_err_flush end;
end; -- class ERR
-------------------------------------------------------------------
external class C_ERR is
-- Interface to C functions supporting ERR.
c_err_char(c:CHAR); -- Print the char `c' on stderr.
c_err_str(s:STR); -- Print the string `s' on stderr.
c_err_flush; -- Flush the output buffer.
c_err_nstr(n:INT,s:STR); -- Print `n' characters of the string `s' on stderr.
end; -- external class C_ERR
-------------------------------------------------------------------