[TUHS] // comment in C++

Steffen Nurpmeso steffen at sdaoden.eu
Fri Feb 10 05:36:44 AEST 2017

Steffen Nurpmeso <steffen at sdaoden.eu> wrote:

 |jnc at mercury.lcs.mit.edu (Noel Chiappa) wrote:
 ||> From: Michael Kjorling
 |You xor it via toupper(X)^0x40, yes of course.  My code is right,

To be exact, it is

  c = upperconv(c2) ^ 0x40;
  if((ui8_t)c > 0x1F && c != 0x7F){ /* ASCII C0: 0..1F, 7F */

and converts from \cX notation to the actual control character.
That is, we do test the result in advance, which i wanted to add.


More information about the TUHS mailing list