fix remapping behavior. Remapping is only necessary if we are rendering on the workbe...
[AROS-Contrib.git] / sqlite3 / mkopcodec.awk
blobbf6bfbeb3706470c3f8c5bc968f6c2030cdb7d4f
1 #!/usr/bin/awk -f
3 # This AWK script scans the opcodes.h file (which is itself generated by
4 # another awk script) and uses the information gleaned to create the
5 # opcodes.c source file.
7 # Opcodes.c contains strings which are the symbolic names for the various
8 # opcodes used by the VDBE. These strings are used when disassembling a
9 # VDBE program during tracing or as a result of the EXPLAIN keyword.
11 BEGIN {
12 print "/* Automatically generated. Do not edit */"
13 print "/* See the mkopcodec.awk script for details. */"
14 printf "#if !defined(SQLITE_OMIT_EXPLAIN)"
15 printf " || !defined(NDEBUG)"
16 printf " || defined(VDBE_PROFILE)"
17 print " || defined(SQLITE_DEBUG)"
18 print "const char *const sqlite3OpcodeNames[] = { \"?\","
20 /define OP_/ {
21 sub("OP_","",$2)
22 i++
23 printf " /* %3d */ \"%s\",\n", $3, $2
25 END {
26 print "};"
27 print "#endif"