Module Name: src Committed By: rillig Date: Tue Feb 16 16:14:27 UTC 2021
Modified Files: src/usr.bin/make: var.c Log Message: make: sync comment about duplicated code with reality There are only very few places in var.c that contain really duplicate code anymore. There is still lots of _almost_ duplicate, for example the code for parsing variable modifiers. It differs subtly in behavior: * The modifiers ':M' and ':N' use '$$' to escape a '$' sign, while almost all other modifiers use '\$' for this purpose. * The modifiers ':M', ':N', ':S', ':@' and several others parse balanced parentheses and braces, allowing '(' to '}' to match. The modifiers ':D' and ':U' only treat the end character special but not the other 3 of '(){}'. * When parsing the modifier ':S' but not evaluating it, the code for nested variable expressions is parsed differently from when it is in evaluation mode (VARE_WANTRES). This applies to an outer ':S' modifier and an inner ':D' or ':M' modifier. Since these inconsistencies affect the behavior in edge cases and some users of make might depend on it, they cannot be fixed by behavior-preserving refactorings. To generate a diff of this commit: cvs rdiff -u -r1.826 -r1.827 src/usr.bin/make/var.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.