Codebase list libmawk / upstream/1.0.2 tools / unwarn.sh
upstream/1.0.2

Tree @upstream/1.0.2 (Download .tar.gz)

unwarn.sh @upstream/1.0.2

b761e9e
 
 
 
 
 
 
 
 
 
 
 
 
#!/bin/sh

# This file is placed in the Public Domain.

# Comment all #warnings in a file given as $1.
# Useful on systems with CC with no support for #warning.

sed '
	/^#[ \t]*warning.*/ {
		s@^@/*@
		s@$@*/@
	}
' < "$1" > "$1.tmp" && mv "$1.tmp" "$1"