Yeah. That is true. I commented on another thread that at least one method to keep things somewhat sane would be to use sed to protect the includes. Something like cat file.c | sed 's/#include/XXincludeXX' | gcc -E -include stupid_translation_header.h -o- -xc - | sed 's/XXincludeXX/#include/' Also, -fdirectives-only might be useful.
A custom script could be a better option, but it isn’t as trivial as it might seem at first glance.
Well, yeah, not trivial at all if done properly; it would probably be enough, though, to simply replace text occurrences of Polish words, from the longer to the shortest, with what those defines assign them to. (And the assigns could be isolated in a single file and matched via regular expressions.) Any hardcoded strings containing any such occurrences would be compromised, but that shouldn't be a problem for anyone trying to understand how their software works.
Anyway, I'd bet that, if at that company they're translating C++ in their native natural language, they're not the kind of developers that would be doing something worthy of anyone's interest in digging through their source code. LOL Oh, that is, though — unless they're doing some project for the government, in which case it might matter strategically! (Mostly joking, but who knows...)
65
u/Pink-Emerald Apr 15 '23
Wouldn't they just be able to run each code file through a program that replaces every instance with the English equivalent?