expand: Merge syntax/quotes in memtodest with flags

2018-05-27 Thread Herbert Xu
The function arguments syntax and quotes are both derived from the expansion flags. As syntax is only used by memtodest we do not need to maintain it outside of the function at all. The only place that uses something other than BASESYNTAX or DQSYNTAX is exptilde. However in that case DQSYNTAX

expand: Escape minus sign in arithmetic expansion

2018-05-27 Thread Herbert Xu
The minus sign generated from arithmetic expansion is currently unquoted which causes anomalies when the result is used in where the quoting matters. This patch fixes it by explicitly calling memtodest for the minus sign. Signed-off-by: Herbert Xu diff --git