view ifndef_wrapper.sh @ 1652:d2753238f35f

Added signature for changeset ebcdb893992d
author Matt Johnston <matt@ucc.asn.au>
date Wed, 27 Mar 2019 22:15:23 +0800
parents 0196f4f83fee
children
line wrap: on
line source

#!/bin/sh

# Wrap all "#define X Y" with a #ifndef X...#endif"

sed 's/^\( *#define \([^ ][^ ]*\) .*\)/#ifndef \2\
\1\
#endif/'