@@ -49,6 +49,7 @@ int main(int argc, char** argv)
4949 (" l,lang" , " Language" , cxxopts::value<string>()->default_value (" en" ))
5050 (" a,archive" , " Archive status" , cxxopts::value<bool >())
5151 (" r,reindent" , " Re-indent" , cxxopts::value<bool >())
52+ (" smart" , " Use compatibility rewrites when converting 84+CE programs to 84Evo" , cxxopts::value<bool >())
5253 (" accessible" , " Use accessible token names for non-US-keyboard display tokens" , cxxopts::value<bool >())
5354 (" p,prettify" , " Prettify (display-oriented, may not roundtrip)" , cxxopts::value<bool >())
5455 (" s,detect_strings" , " Detect strings" , cxxopts::value<bool >())
@@ -264,21 +265,22 @@ int main(int argc, char** argv)
264265
265266 if (iformat == VARFILE)
266267 {
268+ const options_t conversionOptions = {{" smart" , result[" smart" ].as <bool >() ? 1 : 0 }};
267269 if (result.count (" name" ))
268270 {
269271 file.setVarName (requestedName);
270272 }
271273 if (result.count (" calc" ))
272274 {
273- file.convertToModel (requestedModel);
275+ file.convertToModel (requestedModel, conversionOptions );
274276 }
275277 else if (oformat == VARFILE && isEvoVarExtension (extensionOf (opath)) && !file.isEvoFormat ())
276278 {
277- file.convertToModel (TIModel{" 84Evo" });
279+ file.convertToModel (TIModel{" 84Evo" }, conversionOptions );
278280 }
279281 else if (oformat == VARFILE && isLegacyVarExtension (extensionOf (opath)) && file.isEvoFormat ())
280282 {
281- file.convertToModel (TIModel{" 84+CE" });
283+ file.convertToModel (TIModel{" 84+CE" }, conversionOptions );
282284 }
283285 }
284286
0 commit comments