view ifndef_wrapper.sh @ 1854:cba37fe1ddc8

Fix accidentally committed debug message Was added Oct 18 2021 "Only redirect stderr after the session login."
author Matt Johnston <matt@ucc.asn.au>
date Sat, 22 Jan 2022 12:46:08 +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/'