Files
source/Tactical
Marco Antonio J. Costa d008d10b31 Replace a ton of trivial #ifdefs with runtime checks
This one is big, but unless I missed something, should be all be
trivial.

scripted-diff with the following, then manually tweaked whatever needed:
```

if [ $# -ne 3 ]; then
    echo "Usage: $0 '<pattern>' '<replacement>' '<filename>'"
    exit 1
fi

pattern="$1"
replacement="$2"
filename="$3"

if [ ! -f "$filename" ]; then
    echo "Error: File $filename does not exist."
    exit 1
fi

sed -i '/'"$pattern"'/ {
    :loop
    $ !{
        N
        /'"$pattern"'.*\n.*#endif/ {
            s/'"$pattern"'/'"$replacement"'/
            s/#else/} else {/
            s/#endif/}/
            P
            D
        }
        /'"$pattern"'/ b loop
    }
}' "$filename"

echo "Replacement complete in $filename"
```

h/t to Grok2 for the sed command
2024-12-31 16:28:44 -03:00
..
2023-10-07 15:14:15 +03:00
2023-01-03 15:51:48 +02:00
2023-10-20 21:30:39 +03:00
2023-01-22 23:35:08 +02:00
2023-10-10 19:53:19 +03:00
2020-06-25 22:42:44 +00:00
2023-01-03 15:51:48 +02:00
2023-01-03 15:51:48 +02:00
2023-01-19 00:13:08 +02:00
2014-01-01 12:02:23 +00:00
2024-12-22 00:08:45 +02:00
2023-10-07 15:14:15 +03:00
2023-01-19 00:13:08 +02:00
2016-04-24 19:59:25 +00:00
2023-01-19 00:13:08 +02:00
2023-01-03 15:51:48 +02:00
2023-10-07 15:14:15 +03:00
2023-01-03 15:51:48 +02:00
2023-01-03 15:51:48 +02:00
2023-01-03 15:51:48 +02:00
2022-01-26 01:02:30 +00:00
2023-01-03 15:51:48 +02:00
2023-10-07 15:14:15 +03:00
2023-01-03 15:51:48 +02:00
2023-01-03 15:51:48 +02:00
2023-01-03 15:51:48 +02:00
2023-01-03 15:51:48 +02:00
2023-01-19 00:13:08 +02:00
2023-01-03 15:51:48 +02:00
2023-01-03 15:51:48 +02:00
2010-02-20 15:49:46 +00:00
2023-01-03 15:51:48 +02:00
2023-01-03 15:51:48 +02:00
2023-01-03 15:51:48 +02:00