]> wagner.pp.ru Git - openssl-gost/engine.git/commitdiff
Always cNORM before "\n"
authorRichard Levitte <richard@levitte.org>
Mon, 22 Feb 2021 05:08:55 +0000 (06:08 +0100)
committerDmitry Belyavskiy <beldmit@users.noreply.github.com>
Mon, 22 Feb 2021 08:30:54 +0000 (09:30 +0100)
Using cNORM after "\n" may or may not work, probably because of the
line buffered nature of standard output.

If an error is displayed immediately after a printf that has cNORM
after "\n", the error output sometimes "overrides" the cNORM, and you
may end up with a surprisingly colorful error message, not to mention
that this may also affect your prompt in the same manner.

The lesson is to always output cNORM before the ending "\n".


No differences found