Commit 9a820387 authored by Kevin Bracey's avatar Kevin Bracey
Browse files

Changed console output so that '\n' outputs VDU 10,13 rather than 13,10.

This is the standard RISC OS convention (cf OS_NewLine) - some apps assume
it when redirecting output.

Version 5.02. Tagged as 'RISC_OSLib-5_02'
parent f7997a5f
......@@ -6,9 +6,9 @@
GBLS Module_MinorVersion
GBLS Module_Date
GBLS Module_FullVersion
Module_MajorVersion SETS "5.01"
Module_Version SETA 501
Module_MajorVersion SETS "5.02"
Module_Version SETA 502
Module_MinorVersion SETS ""
Module_Date SETS "14 Jan 2000"
Module_FullVersion SETS "5.01"
Module_Date SETS "07 Mar 2000"
Module_FullVersion SETS "5.02"
END
/* (5.01)
/* (5.02)
*
* This file is automatically maintained by srccommit, do not edit manually.
*
*/
#define Module_MajorVersion_CMHG 5.01
#define Module_MajorVersion_CMHG 5.02
#define Module_MinorVersion_CMHG
#define Module_Date_CMHG 14 Jan 2000
#define Module_Date_CMHG 07 Mar 2000
#define Module_MajorVersion "5.01"
#define Module_Version 501
#define Module_MajorVersion "5.02"
#define Module_Version 502
#define Module_MinorVersion ""
#define Module_Date "14 Jan 2000"
#define Module_Date "07 Mar 2000"
#define Module_FullVersion "5.01"
#define Module_FullVersion "5.02"
......@@ -208,6 +208,7 @@ void _sys_msg(const char *s)
}
#define LF '\n'
#define CR '\r'
static int isttyname(const char *s)
{ if (s[0] == ':' && (s[1]|0x20) == 't' && (s[2]|0x20) == 't' && s[3] == 0)
......@@ -343,13 +344,13 @@ int _sys_close(FILEHANDLE fh)
int _ttywrite(const unsigned char *buf, unsigned int len, int flag)
/* behaves like Kgbpb, but outputs to console. */
/* if 'flag' has _IOBIN set then LF's ('\n's) do not have CR prefixed. */
/* if 'flag' has _IOBIN set then LF's ('\n's) do not have CR suffixed. */
{ while (len-- > 0)
{ int ch = *buf++;
if (!(flag & _IOBIN)) {
if (ch == '\n') {
if (_kernel_oswrch('\r') < 0) return -1;
ch = LF;
if (_kernel_oswrch(LF) < 0) return -1;
ch = CR;
} else if (ch < 32 && ch != 0x07 && !isspace(ch)) {
if (_kernel_oswrch('|') < 0) return -1;
ch = (ch & 31) | 64;
......
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