For each link given as http://, verify that the site is accessible over
https:// and, if so, switch to it. These domains were converted:
* llvm.org
* clang.llvm.org
* en.cppreference.com
* www.dxx-rebirth.com
* www.libsdl.org
* www.scons.org
Per request from Mako88, remove unused loadgl typedefs. loadgl.h
was imported from elsewhere and defines typedefs for many functions
that Descent does not use. Some of these are guarded by WINVER
conditionals and, in Mako88's unspecified environment, defining WINVER
to expose these results in a build failure because the guarded typedef
requires a type that is not defined by the environment.
Compensate for that by removing all unused gl typedefs.
# Save the results to a file, then run the file separately. This
# avoids any chance that sed might try to edit the file while later
# searches are still running.
git grep 'typedef .*OGLFUNCCALL \*' common/include/loadgl.h | sed -e 's/^.*OGLFUNCCALL \*//' -e 's/).*$//' | while read f; do
if ! git grep -q 'DEFVAR\s'"$f"'\>' -- common/include/loadgl.h; then
echo "/\\<$f\\>/d"
fi
done > unused.sed
sed -i common/include/loadgl.h -f unused.sed
Per request from Mako88, remove unused loadgl indirections. loadgl.h
was imported from elsewhere and defines indirections for many functions
that Descent does not use. Some of these are guarded by WINVER
conditionals and, in Mako88's unspecified environment, defining WINVER
to expose these results in a build failure because the guarded typedef
requires a type that is not defined by the environment.
Compensate for that, and likely improve the generated code, by removing
all unused gl symbols.
# Save the results to a file, then run the file separately. This
# avoids any chance that sed might try to edit the file while later
# searches are still running.
s=( `git ls-files '*.h' '*.cpp' | grep -v -F common/include/loadgl.h` )
git grep '#define w\?gl[A-Z]\w\+ dw\?gl' common/include/loadgl.h |
gawk '{print $2;}' | while read f; do
if ! git grep -q -l '\<d\?'"$f"'\>' -- "${s[@]}"; then
echo "/\\<d\?$f\\>/d"
fi
done > unused.sed
sed -i common/include/loadgl.h -f unused.sed