Date: Fri, 17 Mar 2017 05:55:07 +1100 (EST) From: Bruce Evans <brde@optusnet.com.au> To: Oliver Pinter <oliver.pinter@hardenedbsd.org> Cc: Bruce Evans <brde@optusnet.com.au>, Bruce Evans <bde@freebsd.org>, svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r315418 - in head/sys/teken: . libteken Message-ID: <20170317055036.D27477@besplex.bde.org> In-Reply-To: <CAPQ4ffvWtZ4fRMOP6_KKHmmy2aPsZ%2BiLFQ5zQB6XWM8LAiNAag@mail.gmail.com> References: <201703161640.v2GGes8N033822@repo.freebsd.org> <20170317040832.N26977@besplex.bde.org> <CAPQ4ffvWtZ4fRMOP6_KKHmmy2aPsZ%2BiLFQ5zQB6XWM8LAiNAag@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On Thu, 16 Mar 2017, Oliver Pinter wrote: > On 3/16/17, Bruce Evans <brde@optusnet.com.au> wrote: >> On Thu, 16 Mar 2017, Bruce Evans wrote: >> >>> Log: >>> Add teken_256to16() to convert xterm-256 256-color codes to xterm >>> 16-color >>> codes. This will be used to fix bright colors. >>> >>> Improve teken_256to8(). Use a lookup table instead of calculations. >>> The >>> ... >> >> A shell script for printing some text color maps is attached. Also a >> sloppier one for printing some CSI sequences. >> ... > > If I'm not wrong, these scripts where made on OS X. They use \r\n line endings, > and this triggers random cryptic runtime errors: > > op@opn /tmp> sh -x sc-vt-CSI > + printf $'\\033[m\r' > + printf $'\\033[x\r' > sc-vt-CSI: 5: Syntax error: word unexpected > > The simple fix is to delete the '\r's from the scripts: > > cat sc-vt-CSI | tr -d '\r' > trans.sh No OS X here. It means that some mailers mangle even attachments. Shells should probably accept \r\n as newline on systems where this is not the native newline. Some C compilers do. Bruce
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20170317055036.D27477>