File: ifndef_wrapper.sh

package info (click to toggle)
dropbear 2018.76-5%2Bdeb10u1
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 12,892 kB
  • sloc: ansic: 101,581; sh: 3,937; perl: 787; makefile: 656; python: 370; java: 177; asm: 30
file content (7 lines) | stat: -rwxr-xr-x 124 bytes parent folder | download
1
2
3
4
5
6
7
#!/bin/sh

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

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