view ifndef_wrapper.sh @ 1458:bdd3802c8ac6

fix format Argument no. 3 nominally inconsistent with format (int vs. unsigned int)
author Francois Perrad <francois.perrad@gadz.org>
date Sat, 12 Aug 2017 20:51:58 +0200
parents 750ec4ec4cbe
children 198e2ee0f4b1
line wrap: on
line source

#!/bin/sh

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

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