openssl/util
Richard Levitte 9ba96fbb25 Perl's chop / chomp considered bad, use a regexp instead
Once upon a time, there was chop, which somply chopped off the last
character of $_ or a given variable, and it was used to take off the
EOL character (\n) of strings.

... but then, you had to check for the presence of such character.

So came chomp, the better chop which checks for \n before chopping it
off.  And this worked well, as long as Perl made internally sure that
all EOLs were converted to \n.

These days, though, there seems to be a mixture of perls, so lines
from files in the "wrong" environment might have \r\n as EOL, or just
\r (Mac OS, unless I'm misinformed).

So it's time we went for the more generic variant and use s|\R$||, the
better chomp which recognises all kinds of known EOLs and chops them
off.

A few chops were left alone, as they are use as surgical tools to
remove one last slash or one last comma.

NOTE: \R came with perl 5.10.0.  It means that from now on, our
scripts will fail with any older version.

Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-02-11 22:11:48 +01:00
..
pl util/mk1mf.pl: use LINK_CMD instead of LINK variable. 2016-02-11 20:58:10 +01:00
TLSProxy Restore -no_comp switch for backwards compatible behaviour 2016-02-05 11:00:53 -05:00
add_cr.pl
bat.sh Remove all remaining traces if PEM_Seal 2016-01-08 01:18:55 +01:00
check-buildinfo.pl Perl's chop / chomp considered bad, use a regexp instead 2016-02-11 22:11:48 +01:00
ck_errf.pl Allow for types with leading underscore when checking error macros. 2015-04-28 14:34:58 +02:00
copy-if-different.pl Remove unused variable. 2013-03-04 22:48:38 +00:00
copy.pl add -stripcr option to copy.pl from 0.9.8 2011-02-03 14:57:51 +00:00
cygwin.sh util/cygwin.sh update. 2012-03-31 11:06:46 +00:00
dirname.pl Make perl replacement for dirname, for system that lack the latter. 2002-06-05 14:10:59 +00:00
do_ms.sh
dofile.pl unified build scheme: give util/dofile.pl the possibility to output selectively 2016-02-10 14:36:04 +01:00
domd.in Better check for gcc/clang 2016-02-01 09:42:10 -05:00
extract-names.pl Perl's chop / chomp considered bad, use a regexp instead 2016-02-11 22:11:48 +01:00
extract-section.pl Allow alternative manual sections to be embedded in .pod file comments. 2004-11-25 17:47:31 +00:00
files.pl Perl's chop / chomp considered bad, use a regexp instead 2016-02-11 22:11:48 +01:00
fipslink.pl Perl's chop / chomp considered bad, use a regexp instead 2016-02-11 22:11:48 +01:00
fixNT.sh get rid of Makefile.ssl in util/ 2005-04-27 08:56:15 +00:00
FreeBSD.sh
incore util/incore update. 2015-05-13 17:23:48 +02:00
indent.pro Async port to windows 2015-11-20 23:32:18 +00:00
install.sh
libeay.num Hide OPENSSL_INIT_SETTINGS. 2016-02-11 08:43:46 -05:00
mk1mf.pl Perl's chop / chomp considered bad, use a regexp instead 2016-02-11 22:11:48 +01:00
mkbuildinf.pl Make comment match reality 2016-02-11 03:04:50 +01:00
mkcerts.sh Fix verify(1) to report failure when verification fails 2016-01-13 17:55:17 -05:00
mkdef.pl Perl's chop / chomp considered bad, use a regexp instead 2016-02-11 22:11:48 +01:00
mkdir-p.pl Update from stable branch. 2005-11-06 17:58:26 +00:00
mkerr.pl Perl's chop / chomp considered bad, use a regexp instead 2016-02-11 22:11:48 +01:00
mkfiles.pl Perl's chop / chomp considered bad, use a regexp instead 2016-02-11 22:11:48 +01:00
mkrc.pl Make util/mkrc.pl location agnostic and adapt Makefile.shared 2016-02-11 17:08:38 +01:00
openssl-format-source Find the right indent on *BSD. 2015-08-10 13:28:26 +01:00
opensslwrap.sh opensslwrap.sh to respect $OPENSSL_ENGINES. 2006-12-29 15:00:36 +00:00
perlpath.pl
point.sh Updates from 1.0.0-stable 2009-04-06 15:22:01 +00:00
selftest.pl Perl's chop / chomp considered bad, use a regexp instead 2016-02-11 22:11:48 +01:00
shlib_wrap.sh Test suite: minimal required to get mingw 'make test' work under Linux. 2015-10-13 19:46:50 +02:00
sp-diff.pl Perl's chop / chomp considered bad, use a regexp instead 2016-02-11 22:11:48 +01:00
speed.sh
ssleay.num Rename INIT funtions, deprecate old ones. 2016-02-10 09:37:03 -05:00
su-filter.pl RT4070: Improve struct/union regexp 2016-02-05 14:26:50 -05:00
toutf8.sh Small script to re-encode files that need it to UTF-8 2015-07-14 01:10:01 +02:00
with_fallback.pm Refactor file writing - arrange for use of bundled Perl modules as fallback 2016-01-22 23:12:22 +01:00
x86asm.sh