}
BEGIN {
+ # Check if "\\\\" in substitutions gives just one backslash.
+ bs = "x"; sub(/x/, "\\\\", bs);
+ bs = (length(bs) == 1 ? "\\\\" : "\\");
+
opts["strtab"] = 1;
depth = max_depth = 0;
}
}
- gsub(/\1/, "\"\n\t\"\\0\" \"", entry_strtab);
+ gsub("\1", "\"\n\t\"" bs "0\" \"", entry_strtab);
sub(/^"/, "", entry_strtab);
sub(/\n[^\n]*$/, ";", entry_strtab);
print "\nstatic const char tree_strtab[] =" entry_strtab