view help/help_check.sh @ 35453:c8f3bba6250a
Add an uiSetFile() counterpart.
Unset the file being played and clear all guiInfo information
associated with the file.
author |
ib |
date |
Sat, 01 Dec 2012 19:08:53 +0000 (2012-12-01) |
parents |
4df5cb727be4 |
children |
cb9975cda4bc |
line source
#!/bin/sh
# Check help message header files.
CHECK=checkhelp
trap "rm -f ${CHECK}.c ${CHECK}.o" EXIT
CC=$1
shift
for h in "$@"; do
cat <<EOF > ${CHECK}.c
#include <inttypes.h>
#include <string.h>
#include "config.h"
#include "$h"
void $CHECK () {
EOF
sed -n "s:^[ \t]*#define[ \t]\+\([0-9A-Za-z_]\+\)[ \t].*:strdup(\1);:p" "$h" >> ${CHECK}.c
echo "}" >> ${CHECK}.c
$CC -Werror -c -o ${CHECK}.o ${CHECK}.c || exit
done