DXR is a code search and navigation tool aimed at making sense of large projects. It supports full-text and regex searches as well as structural queries.

Git (c9229f3f99)

VCS Links

Line Code
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23
#!/bin/bash
#
# Handy tool for extracting #defines from jsapi.h.  For example:
#     ./jsdefine %x JSCLASS_GLOBAL_FLAGS
# outputs
#     48000

ETCDIR=$(dirname $0)
JSDIR=${ETCDIR}/../../build/src/mozjs/dist/
INCDIR=${JSDIR}/include
LIBDIR=${JSDIR}/lib

echo > jsdefine.c
echo '#include "jsapi.h"' >> jsdefine.c
echo '' >> jsdefine.c
echo 'int main() {' >> jsdefine.c
echo '    printf(' >> jsdefine.c
echo '      "'"$1"'\n"', >> jsdefine.c
echo "      $2);" >> jsdefine.c
echo '}' >> jsdefine.c

g++ -I ${INCDIR} jsdefine.c -o jsdefine.exe 
./jsdefine.exe