diff --git a/po/ar.po b/po/ar.po index f5e94a36ebe..11b7597641c 100644 --- a/po/ar.po +++ b/po/ar.po @@ -9758,6 +9758,28 @@ msgid "" "Can't recognize '%1' as an internal or external command, or batch script.\n" msgstr "" +#: cmd.rc:357 +msgid "Division by zero error.\n" +msgstr "" + +#: cmd.rc:358 +msgid "Expected an operand.\n" +msgstr "" + +#: cmd.rc:359 +msgid "Expected an operator.\n" +msgstr "" + +#: cmd.rc:360 +msgid "Mismatch in parentheses.\n" +msgstr "" + +#: cmd.rc:361 +msgid "" +"Badly formed number - must be one of decimal (12),\n" +" hexadecimal (0x34) or octal (056).\n" +msgstr "" + #: dxdiag.rc:27 msgid "DirectX Diagnostic Tool" msgstr "" diff --git a/po/bg.po b/po/bg.po index 2b751d0062d..a4b814a25e7 100644 --- a/po/bg.po +++ b/po/bg.po @@ -9902,6 +9902,28 @@ msgid "" "Can't recognize '%1' as an internal or external command, or batch script.\n" msgstr "" +#: cmd.rc:357 +msgid "Division by zero error.\n" +msgstr "" + +#: cmd.rc:358 +msgid "Expected an operand.\n" +msgstr "" + +#: cmd.rc:359 +msgid "Expected an operator.\n" +msgstr "" + +#: cmd.rc:360 +msgid "Mismatch in parentheses.\n" +msgstr "" + +#: cmd.rc:361 +msgid "" +"Badly formed number - must be one of decimal (12),\n" +" hexadecimal (0x34) or octal (056).\n" +msgstr "" + #: dxdiag.rc:27 msgid "DirectX Diagnostic Tool" msgstr "" diff --git a/po/ca.po b/po/ca.po index 9bae8704cdc..427814e08fa 100644 --- a/po/ca.po +++ b/po/ca.po @@ -10238,6 +10238,30 @@ msgid "" "Can't recognize '%1' as an internal or external command, or batch script.\n" msgstr "" +#: cmd.rc:357 +msgid "Division by zero error.\n" +msgstr "" + +#: cmd.rc:358 +msgid "Expected an operand.\n" +msgstr "" + +#: cmd.rc:359 +#, fuzzy +#| msgid "Unexpected network error.\n" +msgid "Expected an operator.\n" +msgstr "Error de xarxa inesperat.\n" + +#: cmd.rc:360 +msgid "Mismatch in parentheses.\n" +msgstr "" + +#: cmd.rc:361 +msgid "" +"Badly formed number - must be one of decimal (12),\n" +" hexadecimal (0x34) or octal (056).\n" +msgstr "" + #: dxdiag.rc:27 msgid "DirectX Diagnostic Tool" msgstr "Eina Diagnòstica de DirextX" diff --git a/po/cs.po b/po/cs.po index 04cd6071130..e0e4912e3c9 100644 --- a/po/cs.po +++ b/po/cs.po @@ -10266,6 +10266,29 @@ msgid "" "Can't recognize '%1' as an internal or external command, or batch script.\n" msgstr "" +#: cmd.rc:357 +msgid "Division by zero error.\n" +msgstr "" + +#: cmd.rc:358 +msgid "Expected an operand.\n" +msgstr "" + +#: cmd.rc:359 +#, fuzzy +msgid "Expected an operator.\n" +msgstr "Nedefinovaná vnější chyba." + +#: cmd.rc:360 +msgid "Mismatch in parentheses.\n" +msgstr "" + +#: cmd.rc:361 +msgid "" +"Badly formed number - must be one of decimal (12),\n" +" hexadecimal (0x34) or octal (056).\n" +msgstr "" + #: dxdiag.rc:27 msgid "DirectX Diagnostic Tool" msgstr "" diff --git a/po/da.po b/po/da.po index d01e2ee2e32..c2509b01340 100644 --- a/po/da.po +++ b/po/da.po @@ -10152,6 +10152,30 @@ msgid "" "Can't recognize '%1' as an internal or external command, or batch script.\n" msgstr "" +#: cmd.rc:357 +msgid "Division by zero error.\n" +msgstr "" + +#: cmd.rc:358 +msgid "Expected an operand.\n" +msgstr "" + +#: cmd.rc:359 +#, fuzzy +#| msgid "Unexpected network error.\n" +msgid "Expected an operator.\n" +msgstr "Uventet netværksfejl.\n" + +#: cmd.rc:360 +msgid "Mismatch in parentheses.\n" +msgstr "" + +#: cmd.rc:361 +msgid "" +"Badly formed number - must be one of decimal (12),\n" +" hexadecimal (0x34) or octal (056).\n" +msgstr "" + #: dxdiag.rc:27 msgid "DirectX Diagnostic Tool" msgstr "DirectX diagnostiskværktøj" diff --git a/po/de.po b/po/de.po index 729df8fbfc8..cc54b21444d 100644 --- a/po/de.po +++ b/po/de.po @@ -10194,6 +10194,30 @@ msgstr "" "'%1' konnte nicht als interner oder externer Befehl, oder als Batchscript\n" "erkannt werden.\n" +#: cmd.rc:357 +msgid "Division by zero error.\n" +msgstr "" + +#: cmd.rc:358 +msgid "Expected an operand.\n" +msgstr "" + +#: cmd.rc:359 +#, fuzzy +#| msgid "Unexpected network error.\n" +msgid "Expected an operator.\n" +msgstr "Unerwarteter Netzwerkfehler.\n" + +#: cmd.rc:360 +msgid "Mismatch in parentheses.\n" +msgstr "" + +#: cmd.rc:361 +msgid "" +"Badly formed number - must be one of decimal (12),\n" +" hexadecimal (0x34) or octal (056).\n" +msgstr "" + #: dxdiag.rc:27 msgid "DirectX Diagnostic Tool" msgstr "DirectX Diagnosewerkzeug" diff --git a/po/el.po b/po/el.po index 26711af8d4d..ca036e911f6 100644 --- a/po/el.po +++ b/po/el.po @@ -9751,6 +9751,28 @@ msgid "" "Can't recognize '%1' as an internal or external command, or batch script.\n" msgstr "" +#: cmd.rc:357 +msgid "Division by zero error.\n" +msgstr "" + +#: cmd.rc:358 +msgid "Expected an operand.\n" +msgstr "" + +#: cmd.rc:359 +msgid "Expected an operator.\n" +msgstr "" + +#: cmd.rc:360 +msgid "Mismatch in parentheses.\n" +msgstr "" + +#: cmd.rc:361 +msgid "" +"Badly formed number - must be one of decimal (12),\n" +" hexadecimal (0x34) or octal (056).\n" +msgstr "" + #: dxdiag.rc:27 msgid "DirectX Diagnostic Tool" msgstr "" diff --git a/po/en.po b/po/en.po index 995ed70daeb..ee6f6d12dd4 100644 --- a/po/en.po +++ b/po/en.po @@ -10114,6 +10114,30 @@ msgid "" msgstr "" "Can't recognise '%1' as an internal or external command, or batch script.\n" +#: cmd.rc:357 +msgid "Division by zero error.\n" +msgstr "Division by zero error.\n" + +#: cmd.rc:358 +msgid "Expected an operand.\n" +msgstr "Expected an operand.\n" + +#: cmd.rc:359 +msgid "Expected an operator.\n" +msgstr "Expected an operator.\n" + +#: cmd.rc:360 +msgid "Mismatch in parentheses.\n" +msgstr "Mismatch in parentheses.\n" + +#: cmd.rc:361 +msgid "" +"Badly formed number - must be one of decimal (12),\n" +" hexadecimal (0x34) or octal (056).\n" +msgstr "" +"Badly formed number - must be one of decimal (12),\n" +" hexadecimal (0x34) or octal (056).\n" + #: dxdiag.rc:27 msgid "DirectX Diagnostic Tool" msgstr "DirectX Diagnostic Tool" diff --git a/po/en_US.po b/po/en_US.po index b3af78605df..acd669b67a6 100644 --- a/po/en_US.po +++ b/po/en_US.po @@ -10118,6 +10118,30 @@ msgid "" msgstr "" "Can't recognize '%1' as an internal or external command, or batch script.\n" +#: cmd.rc:357 +msgid "Division by zero error.\n" +msgstr "Division by zero error.\n" + +#: cmd.rc:358 +msgid "Expected an operand.\n" +msgstr "Expected an operand.\n" + +#: cmd.rc:359 +msgid "Expected an operator.\n" +msgstr "Expected an operator.\n" + +#: cmd.rc:360 +msgid "Mismatch in parentheses.\n" +msgstr "Mismatch in parentheses.\n" + +#: cmd.rc:361 +msgid "" +"Badly formed number - must be one of decimal (12),\n" +" hexadecimal (0x34) or octal (056).\n" +msgstr "" +"Badly formed number - must be one of decimal (12),\n" +" hexadecimal (0x34) or octal (056).\n" + #: dxdiag.rc:27 msgid "DirectX Diagnostic Tool" msgstr "DirectX Diagnostic Tool" diff --git a/po/eo.po b/po/eo.po index d215b53e834..b2af3221233 100644 --- a/po/eo.po +++ b/po/eo.po @@ -9622,6 +9622,28 @@ msgid "" "Can't recognize '%1' as an internal or external command, or batch script.\n" msgstr "" +#: cmd.rc:357 +msgid "Division by zero error.\n" +msgstr "" + +#: cmd.rc:358 +msgid "Expected an operand.\n" +msgstr "" + +#: cmd.rc:359 +msgid "Expected an operator.\n" +msgstr "" + +#: cmd.rc:360 +msgid "Mismatch in parentheses.\n" +msgstr "" + +#: cmd.rc:361 +msgid "" +"Badly formed number - must be one of decimal (12),\n" +" hexadecimal (0x34) or octal (056).\n" +msgstr "" + #: dxdiag.rc:27 msgid "DirectX Diagnostic Tool" msgstr "" diff --git a/po/es.po b/po/es.po index 9c7258bf6a3..2a3cb792410 100644 --- a/po/es.po +++ b/po/es.po @@ -10233,6 +10233,30 @@ msgid "" "Can't recognize '%1' as an internal or external command, or batch script.\n" msgstr "" +#: cmd.rc:357 +msgid "Division by zero error.\n" +msgstr "" + +#: cmd.rc:358 +msgid "Expected an operand.\n" +msgstr "" + +#: cmd.rc:359 +#, fuzzy +#| msgid "Unexpected network error.\n" +msgid "Expected an operator.\n" +msgstr "Error de red inesperado.\n" + +#: cmd.rc:360 +msgid "Mismatch in parentheses.\n" +msgstr "" + +#: cmd.rc:361 +msgid "" +"Badly formed number - must be one of decimal (12),\n" +" hexadecimal (0x34) or octal (056).\n" +msgstr "" + #: dxdiag.rc:27 msgid "DirectX Diagnostic Tool" msgstr "Utilidad de Diagnóstico de DirectX" diff --git a/po/fa.po b/po/fa.po index fd8130c7b3c..9b930cdc608 100644 --- a/po/fa.po +++ b/po/fa.po @@ -9759,6 +9759,28 @@ msgid "" "Can't recognize '%1' as an internal or external command, or batch script.\n" msgstr "" +#: cmd.rc:357 +msgid "Division by zero error.\n" +msgstr "" + +#: cmd.rc:358 +msgid "Expected an operand.\n" +msgstr "" + +#: cmd.rc:359 +msgid "Expected an operator.\n" +msgstr "" + +#: cmd.rc:360 +msgid "Mismatch in parentheses.\n" +msgstr "" + +#: cmd.rc:361 +msgid "" +"Badly formed number - must be one of decimal (12),\n" +" hexadecimal (0x34) or octal (056).\n" +msgstr "" + #: dxdiag.rc:27 msgid "DirectX Diagnostic Tool" msgstr "" diff --git a/po/fi.po b/po/fi.po index ef675bddb95..a4c82796ce6 100644 --- a/po/fi.po +++ b/po/fi.po @@ -10102,6 +10102,30 @@ msgid "" "Can't recognize '%1' as an internal or external command, or batch script.\n" msgstr "'%1' ei ole sisäinen eikä ulkoinen komento eikä komentojono.\n" +#: cmd.rc:357 +msgid "Division by zero error.\n" +msgstr "" + +#: cmd.rc:358 +msgid "Expected an operand.\n" +msgstr "" + +#: cmd.rc:359 +#, fuzzy +#| msgid "Unexpected network error.\n" +msgid "Expected an operator.\n" +msgstr "Odottamaton verkkovirhe.\n" + +#: cmd.rc:360 +msgid "Mismatch in parentheses.\n" +msgstr "" + +#: cmd.rc:361 +msgid "" +"Badly formed number - must be one of decimal (12),\n" +" hexadecimal (0x34) or octal (056).\n" +msgstr "" + #: dxdiag.rc:27 msgid "DirectX Diagnostic Tool" msgstr "DirectX-diagnostiikkatyökalu" diff --git a/po/fr.po b/po/fr.po index f6bc59086e3..7a3863a4d94 100644 --- a/po/fr.po +++ b/po/fr.po @@ -10234,6 +10234,30 @@ msgstr "" "Ne reconnaît pas « %1 » comme commande interne ou externe, ou fichier de " "traitement par lots.\n" +#: cmd.rc:357 +msgid "Division by zero error.\n" +msgstr "" + +#: cmd.rc:358 +msgid "Expected an operand.\n" +msgstr "" + +#: cmd.rc:359 +#, fuzzy +#| msgid "Unexpected network error.\n" +msgid "Expected an operator.\n" +msgstr "Erreur réseau inattendue.\n" + +#: cmd.rc:360 +msgid "Mismatch in parentheses.\n" +msgstr "" + +#: cmd.rc:361 +msgid "" +"Badly formed number - must be one of decimal (12),\n" +" hexadecimal (0x34) or octal (056).\n" +msgstr "" + #: dxdiag.rc:27 msgid "DirectX Diagnostic Tool" msgstr "Outil de diagnostic DirectX" diff --git a/po/he.po b/po/he.po index 210e75f4593..04e9d90929b 100644 --- a/po/he.po +++ b/po/he.po @@ -10202,6 +10202,28 @@ msgid "" "Can't recognize '%1' as an internal or external command, or batch script.\n" msgstr "" +#: cmd.rc:357 +msgid "Division by zero error.\n" +msgstr "" + +#: cmd.rc:358 +msgid "Expected an operand.\n" +msgstr "" + +#: cmd.rc:359 +msgid "Expected an operator.\n" +msgstr "" + +#: cmd.rc:360 +msgid "Mismatch in parentheses.\n" +msgstr "" + +#: cmd.rc:361 +msgid "" +"Badly formed number - must be one of decimal (12),\n" +" hexadecimal (0x34) or octal (056).\n" +msgstr "" + #: dxdiag.rc:27 msgid "DirectX Diagnostic Tool" msgstr "כלי ניתוח ה־DirectX" diff --git a/po/hi.po b/po/hi.po index 3b362d86a9e..4fb8901fc1f 100644 --- a/po/hi.po +++ b/po/hi.po @@ -9610,6 +9610,28 @@ msgid "" "Can't recognize '%1' as an internal or external command, or batch script.\n" msgstr "" +#: cmd.rc:357 +msgid "Division by zero error.\n" +msgstr "" + +#: cmd.rc:358 +msgid "Expected an operand.\n" +msgstr "" + +#: cmd.rc:359 +msgid "Expected an operator.\n" +msgstr "" + +#: cmd.rc:360 +msgid "Mismatch in parentheses.\n" +msgstr "" + +#: cmd.rc:361 +msgid "" +"Badly formed number - must be one of decimal (12),\n" +" hexadecimal (0x34) or octal (056).\n" +msgstr "" + #: dxdiag.rc:27 msgid "DirectX Diagnostic Tool" msgstr "" diff --git a/po/hu.po b/po/hu.po index ac6095f22a0..cd62a7a2c6a 100644 --- a/po/hu.po +++ b/po/hu.po @@ -10154,6 +10154,30 @@ msgid "" "Can't recognize '%1' as an internal or external command, or batch script.\n" msgstr "" +#: cmd.rc:357 +msgid "Division by zero error.\n" +msgstr "" + +#: cmd.rc:358 +msgid "Expected an operand.\n" +msgstr "" + +#: cmd.rc:359 +#, fuzzy +#| msgid "Unexpected network error.\n" +msgid "Expected an operator.\n" +msgstr "Nem várt hálózati hiba.\n" + +#: cmd.rc:360 +msgid "Mismatch in parentheses.\n" +msgstr "" + +#: cmd.rc:361 +msgid "" +"Badly formed number - must be one of decimal (12),\n" +" hexadecimal (0x34) or octal (056).\n" +msgstr "" + #: dxdiag.rc:27 msgid "DirectX Diagnostic Tool" msgstr "DirectX diagnosztikai eszköz" diff --git a/po/it.po b/po/it.po index 161e344a2e5..573a488c406 100644 --- a/po/it.po +++ b/po/it.po @@ -10233,6 +10233,30 @@ msgid "" "Can't recognize '%1' as an internal or external command, or batch script.\n" msgstr "" +#: cmd.rc:357 +msgid "Division by zero error.\n" +msgstr "" + +#: cmd.rc:358 +msgid "Expected an operand.\n" +msgstr "" + +#: cmd.rc:359 +#, fuzzy +#| msgid "Unexpected network error.\n" +msgid "Expected an operator.\n" +msgstr "Errore del network inaspettato.\n" + +#: cmd.rc:360 +msgid "Mismatch in parentheses.\n" +msgstr "" + +#: cmd.rc:361 +msgid "" +"Badly formed number - must be one of decimal (12),\n" +" hexadecimal (0x34) or octal (056).\n" +msgstr "" + #: dxdiag.rc:27 msgid "DirectX Diagnostic Tool" msgstr "Strumento di Diagnostica DirectX" diff --git a/po/ja.po b/po/ja.po index 84a9954fff2..986c9ad48a3 100644 --- a/po/ja.po +++ b/po/ja.po @@ -10122,6 +10122,30 @@ msgid "" "Can't recognize '%1' as an internal or external command, or batch script.\n" msgstr "" +#: cmd.rc:357 +msgid "Division by zero error.\n" +msgstr "" + +#: cmd.rc:358 +msgid "Expected an operand.\n" +msgstr "" + +#: cmd.rc:359 +#, fuzzy +#| msgid "Unexpected network error.\n" +msgid "Expected an operator.\n" +msgstr "予期しないネットワーク エラーです。\n" + +#: cmd.rc:360 +msgid "Mismatch in parentheses.\n" +msgstr "" + +#: cmd.rc:361 +msgid "" +"Badly formed number - must be one of decimal (12),\n" +" hexadecimal (0x34) or octal (056).\n" +msgstr "" + #: dxdiag.rc:27 msgid "DirectX Diagnostic Tool" msgstr "DirectX 診断ツール" diff --git a/po/ko.po b/po/ko.po index 524409dd9e0..e6008b9c874 100644 --- a/po/ko.po +++ b/po/ko.po @@ -10080,6 +10080,30 @@ msgid "" "Can't recognize '%1' as an internal or external command, or batch script.\n" msgstr "'%1'을 내부나 외부 명령어,나 배치 스크립트로 인식할 수 없습니다.\n" +#: cmd.rc:357 +msgid "Division by zero error.\n" +msgstr "" + +#: cmd.rc:358 +msgid "Expected an operand.\n" +msgstr "" + +#: cmd.rc:359 +#, fuzzy +#| msgid "Unexpected network error.\n" +msgid "Expected an operator.\n" +msgstr "예기치 않은 네트워크 오류.\n" + +#: cmd.rc:360 +msgid "Mismatch in parentheses.\n" +msgstr "" + +#: cmd.rc:361 +msgid "" +"Badly formed number - must be one of decimal (12),\n" +" hexadecimal (0x34) or octal (056).\n" +msgstr "" + #: dxdiag.rc:27 msgid "DirectX Diagnostic Tool" msgstr "다이렉트엑스 진단 도구" diff --git a/po/lt.po b/po/lt.po index b0b69a300af..1ecd6e9786e 100644 --- a/po/lt.po +++ b/po/lt.po @@ -10127,6 +10127,30 @@ msgstr "" "Nepavyko atpažinti „%1“ kaip vidinės ar išorinės komandos, ar komandų " "failo.\n" +#: cmd.rc:357 +msgid "Division by zero error.\n" +msgstr "" + +#: cmd.rc:358 +msgid "Expected an operand.\n" +msgstr "" + +#: cmd.rc:359 +#, fuzzy +#| msgid "Unexpected network error.\n" +msgid "Expected an operator.\n" +msgstr "Netikėta tinklo klaida.\n" + +#: cmd.rc:360 +msgid "Mismatch in parentheses.\n" +msgstr "" + +#: cmd.rc:361 +msgid "" +"Badly formed number - must be one of decimal (12),\n" +" hexadecimal (0x34) or octal (056).\n" +msgstr "" + #: dxdiag.rc:27 msgid "DirectX Diagnostic Tool" msgstr "DirectX diagnostikos įrankis" diff --git a/po/ml.po b/po/ml.po index 3e6f3566c6e..4f44521d0b3 100644 --- a/po/ml.po +++ b/po/ml.po @@ -9610,6 +9610,28 @@ msgid "" "Can't recognize '%1' as an internal or external command, or batch script.\n" msgstr "" +#: cmd.rc:357 +msgid "Division by zero error.\n" +msgstr "" + +#: cmd.rc:358 +msgid "Expected an operand.\n" +msgstr "" + +#: cmd.rc:359 +msgid "Expected an operator.\n" +msgstr "" + +#: cmd.rc:360 +msgid "Mismatch in parentheses.\n" +msgstr "" + +#: cmd.rc:361 +msgid "" +"Badly formed number - must be one of decimal (12),\n" +" hexadecimal (0x34) or octal (056).\n" +msgstr "" + #: dxdiag.rc:27 msgid "DirectX Diagnostic Tool" msgstr "" diff --git a/po/nb_NO.po b/po/nb_NO.po index 639d108a2ce..b0be3b2ba91 100644 --- a/po/nb_NO.po +++ b/po/nb_NO.po @@ -10372,6 +10372,30 @@ msgid "" "Can't recognize '%1' as an internal or external command, or batch script.\n" msgstr "" +#: cmd.rc:357 +msgid "Division by zero error.\n" +msgstr "" + +#: cmd.rc:358 +msgid "Expected an operand.\n" +msgstr "" + +#: cmd.rc:359 +#, fuzzy +#| msgid "Unexpected network error.\n" +msgid "Expected an operator.\n" +msgstr "Uventet nettverksfeil.\n" + +#: cmd.rc:360 +msgid "Mismatch in parentheses.\n" +msgstr "" + +#: cmd.rc:361 +msgid "" +"Badly formed number - must be one of decimal (12),\n" +" hexadecimal (0x34) or octal (056).\n" +msgstr "" + #: dxdiag.rc:27 msgid "DirectX Diagnostic Tool" msgstr "" diff --git a/po/nl.po b/po/nl.po index 7dfdd9663ec..a56ce79dfb7 100644 --- a/po/nl.po +++ b/po/nl.po @@ -10291,6 +10291,30 @@ msgid "" "Can't recognize '%1' as an internal or external command, or batch script.\n" msgstr "" +#: cmd.rc:357 +msgid "Division by zero error.\n" +msgstr "" + +#: cmd.rc:358 +msgid "Expected an operand.\n" +msgstr "" + +#: cmd.rc:359 +#, fuzzy +#| msgid "Unexpected network error.\n" +msgid "Expected an operator.\n" +msgstr "Onverwachte netwerk fout.\n" + +#: cmd.rc:360 +msgid "Mismatch in parentheses.\n" +msgstr "" + +#: cmd.rc:361 +msgid "" +"Badly formed number - must be one of decimal (12),\n" +" hexadecimal (0x34) or octal (056).\n" +msgstr "" + #: dxdiag.rc:27 msgid "DirectX Diagnostic Tool" msgstr "Diagnostisch instrument voor DirectX" diff --git a/po/or.po b/po/or.po index abc366bd8dd..264f9bd1a90 100644 --- a/po/or.po +++ b/po/or.po @@ -9610,6 +9610,28 @@ msgid "" "Can't recognize '%1' as an internal or external command, or batch script.\n" msgstr "" +#: cmd.rc:357 +msgid "Division by zero error.\n" +msgstr "" + +#: cmd.rc:358 +msgid "Expected an operand.\n" +msgstr "" + +#: cmd.rc:359 +msgid "Expected an operator.\n" +msgstr "" + +#: cmd.rc:360 +msgid "Mismatch in parentheses.\n" +msgstr "" + +#: cmd.rc:361 +msgid "" +"Badly formed number - must be one of decimal (12),\n" +" hexadecimal (0x34) or octal (056).\n" +msgstr "" + #: dxdiag.rc:27 msgid "DirectX Diagnostic Tool" msgstr "" diff --git a/po/pa.po b/po/pa.po index 6c02e06de4f..360fbfe8a1d 100644 --- a/po/pa.po +++ b/po/pa.po @@ -9610,6 +9610,28 @@ msgid "" "Can't recognize '%1' as an internal or external command, or batch script.\n" msgstr "" +#: cmd.rc:357 +msgid "Division by zero error.\n" +msgstr "" + +#: cmd.rc:358 +msgid "Expected an operand.\n" +msgstr "" + +#: cmd.rc:359 +msgid "Expected an operator.\n" +msgstr "" + +#: cmd.rc:360 +msgid "Mismatch in parentheses.\n" +msgstr "" + +#: cmd.rc:361 +msgid "" +"Badly formed number - must be one of decimal (12),\n" +" hexadecimal (0x34) or octal (056).\n" +msgstr "" + #: dxdiag.rc:27 msgid "DirectX Diagnostic Tool" msgstr "" diff --git a/po/pl.po b/po/pl.po index 8ec6b18546b..47bcba001eb 100644 --- a/po/pl.po +++ b/po/pl.po @@ -10180,6 +10180,30 @@ msgid "" "Can't recognize '%1' as an internal or external command, or batch script.\n" msgstr "" +#: cmd.rc:357 +msgid "Division by zero error.\n" +msgstr "" + +#: cmd.rc:358 +msgid "Expected an operand.\n" +msgstr "" + +#: cmd.rc:359 +#, fuzzy +#| msgid "Unexpected network error.\n" +msgid "Expected an operator.\n" +msgstr "Nieoczekiwany błąd sieciowy.\n" + +#: cmd.rc:360 +msgid "Mismatch in parentheses.\n" +msgstr "" + +#: cmd.rc:361 +msgid "" +"Badly formed number - must be one of decimal (12),\n" +" hexadecimal (0x34) or octal (056).\n" +msgstr "" + #: dxdiag.rc:27 msgid "DirectX Diagnostic Tool" msgstr "Narzędzie diagnostyki DirectX" diff --git a/po/pt_BR.po b/po/pt_BR.po index 54d20eadd6f..069b60c8ab8 100644 --- a/po/pt_BR.po +++ b/po/pt_BR.po @@ -10150,6 +10150,30 @@ msgid "" "Can't recognize '%1' as an internal or external command, or batch script.\n" msgstr "" +#: cmd.rc:357 +msgid "Division by zero error.\n" +msgstr "" + +#: cmd.rc:358 +msgid "Expected an operand.\n" +msgstr "" + +#: cmd.rc:359 +#, fuzzy +#| msgid "Unexpected network error.\n" +msgid "Expected an operator.\n" +msgstr "Erro de rede inesperado.\n" + +#: cmd.rc:360 +msgid "Mismatch in parentheses.\n" +msgstr "" + +#: cmd.rc:361 +msgid "" +"Badly formed number - must be one of decimal (12),\n" +" hexadecimal (0x34) or octal (056).\n" +msgstr "" + #: dxdiag.rc:27 msgid "DirectX Diagnostic Tool" msgstr "Ferramenta de Diagnóstico do DirectX" diff --git a/po/pt_PT.po b/po/pt_PT.po index 9be86a62eb2..d2965597f1f 100644 --- a/po/pt_PT.po +++ b/po/pt_PT.po @@ -10161,6 +10161,30 @@ msgid "" "Can't recognize '%1' as an internal or external command, or batch script.\n" msgstr "" +#: cmd.rc:357 +msgid "Division by zero error.\n" +msgstr "" + +#: cmd.rc:358 +msgid "Expected an operand.\n" +msgstr "" + +#: cmd.rc:359 +#, fuzzy +#| msgid "Unexpected network error.\n" +msgid "Expected an operator.\n" +msgstr "Erro de rede inesperado.\n" + +#: cmd.rc:360 +msgid "Mismatch in parentheses.\n" +msgstr "" + +#: cmd.rc:361 +msgid "" +"Badly formed number - must be one of decimal (12),\n" +" hexadecimal (0x34) or octal (056).\n" +msgstr "" + #: dxdiag.rc:27 msgid "DirectX Diagnostic Tool" msgstr "Ferramenta de Diagnóstico do DirectX" diff --git a/po/rm.po b/po/rm.po index a8f2768b52f..9ecc5f58786 100644 --- a/po/rm.po +++ b/po/rm.po @@ -9673,6 +9673,28 @@ msgid "" "Can't recognize '%1' as an internal or external command, or batch script.\n" msgstr "" +#: cmd.rc:357 +msgid "Division by zero error.\n" +msgstr "" + +#: cmd.rc:358 +msgid "Expected an operand.\n" +msgstr "" + +#: cmd.rc:359 +msgid "Expected an operator.\n" +msgstr "" + +#: cmd.rc:360 +msgid "Mismatch in parentheses.\n" +msgstr "" + +#: cmd.rc:361 +msgid "" +"Badly formed number - must be one of decimal (12),\n" +" hexadecimal (0x34) or octal (056).\n" +msgstr "" + #: dxdiag.rc:27 msgid "DirectX Diagnostic Tool" msgstr "" diff --git a/po/ro.po b/po/ro.po index 2e20e853ea2..235d3f26903 100644 --- a/po/ro.po +++ b/po/ro.po @@ -10356,6 +10356,29 @@ msgid "" "Can't recognize '%1' as an internal or external command, or batch script.\n" msgstr "" +#: cmd.rc:357 +msgid "Division by zero error.\n" +msgstr "" + +#: cmd.rc:358 +msgid "Expected an operand.\n" +msgstr "" + +#: cmd.rc:359 +#, fuzzy +msgid "Expected an operator.\n" +msgstr "Eroare externă nedeterminată." + +#: cmd.rc:360 +msgid "Mismatch in parentheses.\n" +msgstr "" + +#: cmd.rc:361 +msgid "" +"Badly formed number - must be one of decimal (12),\n" +" hexadecimal (0x34) or octal (056).\n" +msgstr "" + #: dxdiag.rc:27 msgid "DirectX Diagnostic Tool" msgstr "" diff --git a/po/ru.po b/po/ru.po index 8ee81eea690..be797d7f9a6 100644 --- a/po/ru.po +++ b/po/ru.po @@ -10113,6 +10113,30 @@ msgid "" "Can't recognize '%1' as an internal or external command, or batch script.\n" msgstr "" +#: cmd.rc:357 +msgid "Division by zero error.\n" +msgstr "" + +#: cmd.rc:358 +msgid "Expected an operand.\n" +msgstr "" + +#: cmd.rc:359 +#, fuzzy +#| msgid "Unexpected network error.\n" +msgid "Expected an operator.\n" +msgstr "Неожиданная сетевая ошибка.\n" + +#: cmd.rc:360 +msgid "Mismatch in parentheses.\n" +msgstr "" + +#: cmd.rc:361 +msgid "" +"Badly formed number - must be one of decimal (12),\n" +" hexadecimal (0x34) or octal (056).\n" +msgstr "" + #: dxdiag.rc:27 msgid "DirectX Diagnostic Tool" msgstr "Утилита диагностики DirectX" diff --git a/po/sk.po b/po/sk.po index 7eb18efc039..87768ddf84a 100644 --- a/po/sk.po +++ b/po/sk.po @@ -9760,6 +9760,30 @@ msgid "" "Can't recognize '%1' as an internal or external command, or batch script.\n" msgstr "" +#: cmd.rc:357 +msgid "Division by zero error.\n" +msgstr "" + +#: cmd.rc:358 +msgid "Expected an operand.\n" +msgstr "" + +#: cmd.rc:359 +#, fuzzy +#| msgid "Unexpected network error.\n" +msgid "Expected an operator.\n" +msgstr "Neočakávaná sieťová chyba.\n" + +#: cmd.rc:360 +msgid "Mismatch in parentheses.\n" +msgstr "" + +#: cmd.rc:361 +msgid "" +"Badly formed number - must be one of decimal (12),\n" +" hexadecimal (0x34) or octal (056).\n" +msgstr "" + #: dxdiag.rc:27 msgid "DirectX Diagnostic Tool" msgstr "" diff --git a/po/sl.po b/po/sl.po index 510ddbd03ae..7b3e761cda6 100644 --- a/po/sl.po +++ b/po/sl.po @@ -10180,6 +10180,30 @@ msgid "" "Can't recognize '%1' as an internal or external command, or batch script.\n" msgstr "" +#: cmd.rc:357 +msgid "Division by zero error.\n" +msgstr "" + +#: cmd.rc:358 +msgid "Expected an operand.\n" +msgstr "" + +#: cmd.rc:359 +#, fuzzy +#| msgid "Unexpected network error.\n" +msgid "Expected an operator.\n" +msgstr "Nepričakovana napaka omrežja.\n" + +#: cmd.rc:360 +msgid "Mismatch in parentheses.\n" +msgstr "" + +#: cmd.rc:361 +msgid "" +"Badly formed number - must be one of decimal (12),\n" +" hexadecimal (0x34) or octal (056).\n" +msgstr "" + #: dxdiag.rc:27 msgid "DirectX Diagnostic Tool" msgstr "Orodje za diagnostiko DirectX" diff --git a/po/sr_RS@cyrillic.po b/po/sr_RS@cyrillic.po index e78f4bf8aa3..ce90c69dc9c 100644 --- a/po/sr_RS@cyrillic.po +++ b/po/sr_RS@cyrillic.po @@ -10097,6 +10097,28 @@ msgid "" "Can't recognize '%1' as an internal or external command, or batch script.\n" msgstr "" +#: cmd.rc:357 +msgid "Division by zero error.\n" +msgstr "" + +#: cmd.rc:358 +msgid "Expected an operand.\n" +msgstr "" + +#: cmd.rc:359 +msgid "Expected an operator.\n" +msgstr "" + +#: cmd.rc:360 +msgid "Mismatch in parentheses.\n" +msgstr "" + +#: cmd.rc:361 +msgid "" +"Badly formed number - must be one of decimal (12),\n" +" hexadecimal (0x34) or octal (056).\n" +msgstr "" + #: dxdiag.rc:27 msgid "DirectX Diagnostic Tool" msgstr "" diff --git a/po/sr_RS@latin.po b/po/sr_RS@latin.po index c10fb59e919..ca25fca74e3 100644 --- a/po/sr_RS@latin.po +++ b/po/sr_RS@latin.po @@ -10197,6 +10197,28 @@ msgid "" "Can't recognize '%1' as an internal or external command, or batch script.\n" msgstr "" +#: cmd.rc:357 +msgid "Division by zero error.\n" +msgstr "" + +#: cmd.rc:358 +msgid "Expected an operand.\n" +msgstr "" + +#: cmd.rc:359 +msgid "Expected an operator.\n" +msgstr "" + +#: cmd.rc:360 +msgid "Mismatch in parentheses.\n" +msgstr "" + +#: cmd.rc:361 +msgid "" +"Badly formed number - must be one of decimal (12),\n" +" hexadecimal (0x34) or octal (056).\n" +msgstr "" + #: dxdiag.rc:27 msgid "DirectX Diagnostic Tool" msgstr "" diff --git a/po/sv.po b/po/sv.po index 2f18aff4c4e..ade8e39d8fa 100644 --- a/po/sv.po +++ b/po/sv.po @@ -10029,6 +10029,30 @@ msgid "" "Can't recognize '%1' as an internal or external command, or batch script.\n" msgstr "" +#: cmd.rc:357 +msgid "Division by zero error.\n" +msgstr "" + +#: cmd.rc:358 +msgid "Expected an operand.\n" +msgstr "" + +#: cmd.rc:359 +#, fuzzy +#| msgid "Unexpected network error.\n" +msgid "Expected an operator.\n" +msgstr "Oväntat nätverksfel.\n" + +#: cmd.rc:360 +msgid "Mismatch in parentheses.\n" +msgstr "" + +#: cmd.rc:361 +msgid "" +"Badly formed number - must be one of decimal (12),\n" +" hexadecimal (0x34) or octal (056).\n" +msgstr "" + #: dxdiag.rc:27 msgid "DirectX Diagnostic Tool" msgstr "" diff --git a/po/te.po b/po/te.po index 17379fac6f2..53bc1e3a98d 100644 --- a/po/te.po +++ b/po/te.po @@ -9610,6 +9610,28 @@ msgid "" "Can't recognize '%1' as an internal or external command, or batch script.\n" msgstr "" +#: cmd.rc:357 +msgid "Division by zero error.\n" +msgstr "" + +#: cmd.rc:358 +msgid "Expected an operand.\n" +msgstr "" + +#: cmd.rc:359 +msgid "Expected an operator.\n" +msgstr "" + +#: cmd.rc:360 +msgid "Mismatch in parentheses.\n" +msgstr "" + +#: cmd.rc:361 +msgid "" +"Badly formed number - must be one of decimal (12),\n" +" hexadecimal (0x34) or octal (056).\n" +msgstr "" + #: dxdiag.rc:27 msgid "DirectX Diagnostic Tool" msgstr "" diff --git a/po/th.po b/po/th.po index 51eb2a9c271..bab44462cd7 100644 --- a/po/th.po +++ b/po/th.po @@ -9776,6 +9776,28 @@ msgid "" "Can't recognize '%1' as an internal or external command, or batch script.\n" msgstr "" +#: cmd.rc:357 +msgid "Division by zero error.\n" +msgstr "" + +#: cmd.rc:358 +msgid "Expected an operand.\n" +msgstr "" + +#: cmd.rc:359 +msgid "Expected an operator.\n" +msgstr "" + +#: cmd.rc:360 +msgid "Mismatch in parentheses.\n" +msgstr "" + +#: cmd.rc:361 +msgid "" +"Badly formed number - must be one of decimal (12),\n" +" hexadecimal (0x34) or octal (056).\n" +msgstr "" + #: dxdiag.rc:27 msgid "DirectX Diagnostic Tool" msgstr "" diff --git a/po/tr.po b/po/tr.po index d11cdfd6b08..16ab69549ca 100644 --- a/po/tr.po +++ b/po/tr.po @@ -9894,6 +9894,28 @@ msgid "" "Can't recognize '%1' as an internal or external command, or batch script.\n" msgstr "" +#: cmd.rc:357 +msgid "Division by zero error.\n" +msgstr "" + +#: cmd.rc:358 +msgid "Expected an operand.\n" +msgstr "" + +#: cmd.rc:359 +msgid "Expected an operator.\n" +msgstr "" + +#: cmd.rc:360 +msgid "Mismatch in parentheses.\n" +msgstr "" + +#: cmd.rc:361 +msgid "" +"Badly formed number - must be one of decimal (12),\n" +" hexadecimal (0x34) or octal (056).\n" +msgstr "" + #: dxdiag.rc:27 msgid "DirectX Diagnostic Tool" msgstr "" diff --git a/po/uk.po b/po/uk.po index d5e813d04e1..0d264e0a7d1 100644 --- a/po/uk.po +++ b/po/uk.po @@ -10163,6 +10163,30 @@ msgid "" "Can't recognize '%1' as an internal or external command, or batch script.\n" msgstr "" +#: cmd.rc:357 +msgid "Division by zero error.\n" +msgstr "" + +#: cmd.rc:358 +msgid "Expected an operand.\n" +msgstr "" + +#: cmd.rc:359 +#, fuzzy +#| msgid "Unexpected network error.\n" +msgid "Expected an operator.\n" +msgstr "Неочікувана помилка мережі.\n" + +#: cmd.rc:360 +msgid "Mismatch in parentheses.\n" +msgstr "" + +#: cmd.rc:361 +msgid "" +"Badly formed number - must be one of decimal (12),\n" +" hexadecimal (0x34) or octal (056).\n" +msgstr "" + #: dxdiag.rc:27 msgid "DirectX Diagnostic Tool" msgstr "Утиліта Діагностики DirectX" diff --git a/po/wa.po b/po/wa.po index 971433f11f1..86c7fd774fa 100644 --- a/po/wa.po +++ b/po/wa.po @@ -9717,6 +9717,28 @@ msgid "" "Can't recognize '%1' as an internal or external command, or batch script.\n" msgstr "" +#: cmd.rc:357 +msgid "Division by zero error.\n" +msgstr "" + +#: cmd.rc:358 +msgid "Expected an operand.\n" +msgstr "" + +#: cmd.rc:359 +msgid "Expected an operator.\n" +msgstr "" + +#: cmd.rc:360 +msgid "Mismatch in parentheses.\n" +msgstr "" + +#: cmd.rc:361 +msgid "" +"Badly formed number - must be one of decimal (12),\n" +" hexadecimal (0x34) or octal (056).\n" +msgstr "" + #: dxdiag.rc:27 msgid "DirectX Diagnostic Tool" msgstr "" diff --git a/po/wine.pot b/po/wine.pot index 1844afef1b4..2cf994f2a68 100644 --- a/po/wine.pot +++ b/po/wine.pot @@ -9555,6 +9555,28 @@ msgid "" "Can't recognize '%1' as an internal or external command, or batch script.\n" msgstr "" +#: cmd.rc:357 +msgid "Division by zero error.\n" +msgstr "" + +#: cmd.rc:358 +msgid "Expected an operand.\n" +msgstr "" + +#: cmd.rc:359 +msgid "Expected an operator.\n" +msgstr "" + +#: cmd.rc:360 +msgid "Mismatch in parentheses.\n" +msgstr "" + +#: cmd.rc:361 +msgid "" +"Badly formed number - must be one of decimal (12),\n" +" hexadecimal (0x34) or octal (056).\n" +msgstr "" + #: dxdiag.rc:27 msgid "DirectX Diagnostic Tool" msgstr "" diff --git a/po/zh_CN.po b/po/zh_CN.po index 776c1ac47ec..07d31a8eaa7 100644 --- a/po/zh_CN.po +++ b/po/zh_CN.po @@ -9682,6 +9682,28 @@ msgid "" "Can't recognize '%1' as an internal or external command, or batch script.\n" msgstr "" +#: cmd.rc:357 +msgid "Division by zero error.\n" +msgstr "" + +#: cmd.rc:358 +msgid "Expected an operand.\n" +msgstr "" + +#: cmd.rc:359 +msgid "Expected an operator.\n" +msgstr "" + +#: cmd.rc:360 +msgid "Mismatch in parentheses.\n" +msgstr "" + +#: cmd.rc:361 +msgid "" +"Badly formed number - must be one of decimal (12),\n" +" hexadecimal (0x34) or octal (056).\n" +msgstr "" + #: dxdiag.rc:27 msgid "DirectX Diagnostic Tool" msgstr "" diff --git a/po/zh_TW.po b/po/zh_TW.po index 760f353e1a9..871cee989ee 100644 --- a/po/zh_TW.po +++ b/po/zh_TW.po @@ -9976,6 +9976,30 @@ msgid "" "Can't recognize '%1' as an internal or external command, or batch script.\n" msgstr "" +#: cmd.rc:357 +msgid "Division by zero error.\n" +msgstr "" + +#: cmd.rc:358 +msgid "Expected an operand.\n" +msgstr "" + +#: cmd.rc:359 +#, fuzzy +#| msgid "Unexpected network error.\n" +msgid "Expected an operator.\n" +msgstr "未預期的網路錯誤。\n" + +#: cmd.rc:360 +msgid "Mismatch in parentheses.\n" +msgstr "" + +#: cmd.rc:361 +msgid "" +"Badly formed number - must be one of decimal (12),\n" +" hexadecimal (0x34) or octal (056).\n" +msgstr "" + #: dxdiag.rc:27 msgid "DirectX Diagnostic Tool" msgstr "DirectX 診斷工具" diff --git a/programs/cmd/builtins.c b/programs/cmd/builtins.c index acf08823ebd..2899418c61a 100644 --- a/programs/cmd/builtins.c +++ b/programs/cmd/builtins.c @@ -111,6 +111,62 @@ static HINSTANCE hinst; struct env_stack *saved_environment; static BOOL verify_mode = FALSE; +/* set /a routines work from single character operators, but some of the + operators are multiple character ones, especially the assignment ones. + Temporarily represent these using the values below on the operator stack */ +#define OP_POSITIVE 'P' +#define OP_NEGATIVE 'N' +#define OP_ASSSIGNMUL 'a' +#define OP_ASSSIGNDIV 'b' +#define OP_ASSSIGNMOD 'c' +#define OP_ASSSIGNADD 'd' +#define OP_ASSSIGNSUB 'e' +#define OP_ASSSIGNAND 'f' +#define OP_ASSSIGNNOT 'g' +#define OP_ASSSIGNOR 'h' +#define OP_ASSSIGNSHL 'i' +#define OP_ASSSIGNSHR 'j' + +/* This maintains a stack of operators, holding both the operator precedence + and the single character representation of the operator in question */ +typedef struct _OPSTACK +{ + int precedence; + WCHAR op; + struct _OPSTACK *next; +} OPSTACK; + +/* This maintains a stack of values, where each value can either be a + numeric value, or a string represeting an environment variable */ +typedef struct _VARSTACK +{ + BOOL isnum; + WCHAR *variable; + int value; + struct _VARSTACK *next; +} VARSTACK; + +/* This maintains a mapping between the calculated operator and the + single character representation for the assignment operators. */ +static struct +{ + WCHAR op; + WCHAR calculatedop; +} calcassignments[] = +{ + {'*', OP_ASSSIGNMUL}, + {'/', OP_ASSSIGNDIV}, + {'%', OP_ASSSIGNMOD}, + {'+', OP_ASSSIGNADD}, + {'-', OP_ASSSIGNSUB}, + {'&', OP_ASSSIGNAND}, + {'^', OP_ASSSIGNNOT}, + {'|', OP_ASSSIGNOR}, + {'<', OP_ASSSIGNSHL}, + {'>', OP_ASSSIGNSHR}, + {' ',' '} +}; + /************************************************************************** * WCMD_ask_confirm * @@ -3402,6 +3458,521 @@ static int WCMD_setshow_sortenv(const WCHAR *s, const WCHAR *stub) return displayedcount; } +/**************************************************************************** + * WCMD_getprecedence + * Return the precedence of a particular operator + */ +static int WCMD_getprecedence(const WCHAR in) +{ + switch (in) { + case '!': + case '~': + case OP_POSITIVE: + case OP_NEGATIVE: + return 8; + case '*': + case '/': + case '%': + return 7; + case '+': + case '-': + return 6; + case '<': + case '>': + return 5; + case '&': + return 4; + case '^': + return 3; + case '|': + return 2; + case '=': + case OP_ASSSIGNMUL: + case OP_ASSSIGNDIV: + case OP_ASSSIGNMOD: + case OP_ASSSIGNADD: + case OP_ASSSIGNSUB: + case OP_ASSSIGNAND: + case OP_ASSSIGNNOT: + case OP_ASSSIGNOR: + case OP_ASSSIGNSHL: + case OP_ASSSIGNSHR: + return 1; + default: + return 0; + } +} + +/**************************************************************************** + * WCMD_pushnumber + * Push either a number or name (environment variable) onto the supplied + * stack + */ +static void WCMD_pushnumber(WCHAR *var, int num, VARSTACK **varstack) { + VARSTACK *thisstack = heap_alloc(sizeof(VARSTACK)); + thisstack->isnum = (var == NULL); + if (var) { + thisstack->variable = var; + WINE_TRACE("Pushed variable %s\n", wine_dbgstr_w(var)); + } else { + thisstack->value = num; + WINE_TRACE("Pushed number %d\n", num); + } + thisstack->next = *varstack; + *varstack = thisstack; +} + +/**************************************************************************** + * WCMD_peeknumber + * Returns the value of the top number or environment variable on the stack + * and leaves the item on the stack. + */ +static int WCMD_peeknumber(VARSTACK **varstack) { + int result = 0; + VARSTACK *thisvar; + + if (varstack) { + thisvar = *varstack; + if (!thisvar->isnum) { + WCHAR tmpstr[MAXSTRING]; + if (GetEnvironmentVariableW(thisvar->variable, tmpstr, MAXSTRING)) { + result = strtoulW(tmpstr,NULL,0); + } + WINE_TRACE("Envvar %s converted to %d\n", wine_dbgstr_w(thisvar->variable), result); + } else { + result = thisvar->value; + } + } + WINE_TRACE("Peeked number %d\n", result); + return result; +} + +/**************************************************************************** + * WCMD_popnumber + * Returns the value of the top number or environment variable on the stack + * and removes the item from the stack. + */ +static int WCMD_popnumber(VARSTACK **varstack) { + int result = 0; + VARSTACK *thisvar; + + if (varstack) { + thisvar = *varstack; + result = WCMD_peeknumber(varstack); + if (!thisvar->isnum) heap_free(thisvar->variable); + *varstack = thisvar->next; + heap_free(thisvar); + } + WINE_TRACE("Popped number %d\n", result); + return result; +} + +/**************************************************************************** + * WCMD_pushoperator + * Push an operator onto the supplied stack + */ +static void WCMD_pushoperator(WCHAR op, int precedence, OPSTACK **opstack) { + OPSTACK *thisstack = heap_alloc(sizeof(OPSTACK)); + thisstack->precedence = precedence; + thisstack->op = op; + thisstack->next = *opstack; + WINE_TRACE("Pushed operator %c\n", op); + *opstack = thisstack; +} + +/**************************************************************************** + * WCMD_popoperator + * Returns the operator from the top of the stack and removes the item from + * the stack. + */ +static WCHAR WCMD_popoperator(OPSTACK **opstack) { + WCHAR result = 0; + OPSTACK *thisop; + + if (opstack) { + thisop = *opstack; + result = thisop->op; + *opstack = thisop->next; + heap_free(thisop); + } + WINE_TRACE("Popped operator %c\n", result); + return result; +} + +/**************************************************************************** + * WCMD_reduce + * Actions the top operator on the stack against the first and sometimes + * second value on the variable stack, and pushes the result + * Returns non-zero on error. + */ +static int WCMD_reduce(OPSTACK **opstack, VARSTACK **varstack) { + OPSTACK *thisop; + int var1,var2; + int rc = 0; + + if (!*opstack || !*varstack) { + WINE_TRACE("No operators for the reduce\n"); + return WCMD_NOOPERATOR; + } + + /* Remove the top operator */ + thisop = *opstack; + *opstack = (*opstack)->next; + WINE_TRACE("Reducing the stacks - processing operator %c\n", thisop->op); + + /* One variable operators */ + var1 = WCMD_popnumber(varstack); + switch (thisop->op) { + case '!': WCMD_pushnumber(NULL, !var1, varstack); + break; + case '~': WCMD_pushnumber(NULL, ~var1, varstack); + break; + case OP_POSITIVE: WCMD_pushnumber(NULL, var1, varstack); + break; + case OP_NEGATIVE: WCMD_pushnumber(NULL, -var1, varstack); + break; + } + + /* Two variable operators */ + if (!*varstack) { + WINE_TRACE("No operands left for the reduce?\n"); + return WCMD_NOOPERAND; + } + switch (thisop->op) { + case '!': + case '~': + case OP_POSITIVE: + case OP_NEGATIVE: + break; /* Handled above */ + case '*': var2 = WCMD_popnumber(varstack); + WCMD_pushnumber(NULL, var2*var1, varstack); + break; + case '/': var2 = WCMD_popnumber(varstack); + if (var1 == 0) return WCMD_DIVIDEBYZERO; + WCMD_pushnumber(NULL, var2/var1, varstack); + break; + case '+': var2 = WCMD_popnumber(varstack); + WCMD_pushnumber(NULL, var2+var1, varstack); + break; + case '-': var2 = WCMD_popnumber(varstack); + WCMD_pushnumber(NULL, var2-var1, varstack); + break; + case '&': var2 = WCMD_popnumber(varstack); + WCMD_pushnumber(NULL, var2&var1, varstack); + break; + case '%': var2 = WCMD_popnumber(varstack); + WCMD_pushnumber(NULL, var2%var1, varstack); + break; + case '^': var2 = WCMD_popnumber(varstack); + WCMD_pushnumber(NULL, var2^var1, varstack); + break; + case '<': var2 = WCMD_popnumber(varstack); + /* Shift left has to be a positive number, 0-31 otherwise 0 is returned, + which differs from the compiler (for example gcc) so being explicit. */ + if (var1 < 0 || var1 >= (8 * sizeof(INT))) { + WCMD_pushnumber(NULL, 0, varstack); + } else { + WCMD_pushnumber(NULL, var2<': var2 = WCMD_popnumber(varstack); + WCMD_pushnumber(NULL, var2>>var1, varstack); + break; + case '|': var2 = WCMD_popnumber(varstack); + WCMD_pushnumber(NULL, var2|var1, varstack); + break; + + case OP_ASSSIGNMUL: + case OP_ASSSIGNDIV: + case OP_ASSSIGNMOD: + case OP_ASSSIGNADD: + case OP_ASSSIGNSUB: + case OP_ASSSIGNAND: + case OP_ASSSIGNNOT: + case OP_ASSSIGNOR: + case OP_ASSSIGNSHL: + case OP_ASSSIGNSHR: + { + int i = 0; + + /* The left of an equals must be one variable */ + if (!(*varstack) || (*varstack)->isnum) { + return WCMD_NOOPERAND; + } + + /* Make the number stack grow by inserting the value of the variable */ + var2 = WCMD_peeknumber(varstack); + WCMD_pushnumber(NULL, var2, varstack); + WCMD_pushnumber(NULL, var1, varstack); + + /* Make the operand stack grow by pushing the assign operator plus the + operator to perform */ + while (calcassignments[i].op != ' ' && + calcassignments[i].calculatedop != thisop->op) { + i++; + } + if (calcassignments[i].calculatedop == ' ') { + WINE_ERR("Unexpected operator %c\n", thisop->op); + return WCMD_NOOPERATOR; + } + WCMD_pushoperator('=', WCMD_getprecedence('='), opstack); + WCMD_pushoperator(calcassignments[i].op, + WCMD_getprecedence(calcassignments[i].op), opstack); + break; + } + + case '=': + { + WCHAR intFormat[] = {'%','d','\0'}; + WCHAR result[MAXSTRING]; + + /* Build the result, then push it onto the stack */ + sprintfW(result, intFormat, var1); + WINE_TRACE("Assigning %s a value %s\n", wine_dbgstr_w((*varstack)->variable), + wine_dbgstr_w(result)); + SetEnvironmentVariableW((*varstack)->variable, result); + var2 = WCMD_popnumber(varstack); + WCMD_pushnumber(NULL, var1, varstack); + break; + } + + default: WINE_ERR("Unrecognized operator %c\n", thisop->op); + } + + heap_free(thisop); + return rc; +} + + +/**************************************************************************** + * WCMD_handleExpression + * Handles an expression provided to set /a - If it finds brackets, it uses + * recursion to process the parts in brackets. + */ +static int WCMD_handleExpression(WCHAR **expr, int *ret, int depth) +{ + static const WCHAR mathDelims[] = {' ','\t','(',')','!','~','-','*','/','%', + '+','<','>','&','^','|','=',',','\0' }; + int rc = 0; + WCHAR *pos; + BOOL lastwasnumber = FALSE; /* FALSE makes a minus at the start of the expression easier to handle */ + OPSTACK *opstackhead = NULL; + VARSTACK *varstackhead = NULL; + WCHAR foundhalf = 0; + + /* Initialize */ + WINE_TRACE("Handling expression '%s'\n", wine_dbgstr_w(*expr)); + pos = *expr; + + /* Iterate through until whole expression is processed */ + while (pos && *pos) { + BOOL treatasnumber; + + /* Skip whitespace to get to the next character to process*/ + while (*pos && (*pos==' ' || *pos=='\t')) pos++; + if (!*pos) goto exprreturn; + + /* If we have found anything other than an operator then its a number/variable */ + if (strchrW(mathDelims, *pos) == NULL) { + WCHAR *parmstart, *parm, *dupparm; + WCHAR *nextpos; + + /* Cannot have an expression with var/number twice, without an operator + inbetween, nor or number following a half constructed << or >> operator */ + if (lastwasnumber || foundhalf) { + rc = WCMD_NOOPERATOR; + goto exprerrorreturn; + } + lastwasnumber = TRUE; + + if (isdigitW(*pos)) { + /* For a number - just push it onto the stack */ + int num = strtoulW(pos, &nextpos, 0); + WCMD_pushnumber(NULL, num, &varstackhead); + pos = nextpos; + + /* Verify the number was validly formed */ + if (*nextpos && (strchrW(mathDelims, *nextpos) == NULL)) { + rc = WCMD_BADHEXOCT; + goto exprerrorreturn; + } + } else { + + /* For a variable - just push it onto the stack */ + parm = WCMD_parameter_with_delims(pos, 0, &parmstart, FALSE, FALSE, mathDelims); + dupparm = heap_strdupW(parm); + WCMD_pushnumber(dupparm, 0, &varstackhead); + pos = parmstart + strlenW(dupparm); + } + continue; + } + + /* We have found an operator. Some operators are one character, some two, and the minus + and plus signs need special processing as they can be either operators or just influence + the parameter which follows them */ + if (foundhalf && (*pos != foundhalf)) { + /* Badly constructed operator pair */ + rc = WCMD_NOOPERATOR; + goto exprerrorreturn; + } + + treatasnumber = FALSE; /* We are processing an operand */ + switch (*pos) { + + /* > and < are special as they are double character operators (and spaces can be between them!) + If we see these for the first time, set a flag, and second time around we continue. + Note these double character operators are stored as just one of the characters on the stack */ + case '>': + case '<': if (!foundhalf) { + foundhalf = *pos; + pos++; + break; + } + /* We have found the rest, so clear up the knowledge of the half completed part and + drop through to normal operator processing */ + foundhalf = 0; + /* drop through */ + + case '=': if (*pos=='=') { + /* = is special cased as if the last was an operator then we may have e.g. += or + *= etc which we need to handle by replacing the operator that is on the stack + with a calculated assignment equivalent */ + if (!lastwasnumber && opstackhead) { + int i = 0; + while (calcassignments[i].op != ' ' && calcassignments[i].op != opstackhead->op) { + i++; + } + if (calcassignments[i].op == ' ') { + rc = WCMD_NOOPERAND; + goto exprerrorreturn; + } else { + /* Remove the operator on the stack, it will be replaced with a ?= equivalent + when the general operator handling happens further down. */ + *pos = calcassignments[i].calculatedop; + WCMD_popoperator(&opstackhead); + } + } + } + /* Drop though */ + + /* + and - are slightly special as they can be a numeric prefix, if they follow an operator + so if they do, convert the +/- (arithmetic) to +/- (numeric prefix for positive/negative) */ + case '+': if (!lastwasnumber && *pos=='+') *pos = OP_POSITIVE; + /* drop through */ + case '-': if (!lastwasnumber && *pos=='-') *pos = OP_NEGATIVE; + /* drop through */ + + /* Normal operators - push onto stack unless precedence means we have to calculate it now */ + case '!': /* drop through */ + case '~': /* drop through */ + case '/': /* drop through */ + case '%': /* drop through */ + case '&': /* drop through */ + case '^': /* drop through */ + case '*': /* drop through */ + case '|': + /* General code for handling most of the operators - look at the + precedence of the top item on the stack, and see if we need to + action the stack before we push something else onto it. */ + { + int precedence = WCMD_getprecedence(*pos); + WINE_TRACE("Found operator %c precedence %d (head is %d)\n", *pos, + precedence, !opstackhead?-1:opstackhead->precedence); + + /* In general, for things with the same precedence, reduce immediately + except for assignments and unary operators which do not */ + while (!rc && opstackhead && + ((opstackhead->precedence > precedence) || + ((opstackhead->precedence == precedence) && + (precedence != 1) && (precedence != 8)))) { + rc = WCMD_reduce(&opstackhead, &varstackhead); + } + if (rc) goto exprerrorreturn; + WCMD_pushoperator(*pos, precedence, &opstackhead); + pos++; + break; + } + + /* comma means start a new expression, ie calculate what we have */ + case ',': + { + int prevresult = -1; + WINE_TRACE("Found expression delimiter - reducing exising stacks\n"); + while (!rc && opstackhead) { + rc = WCMD_reduce(&opstackhead, &varstackhead); + } + if (rc) goto exprerrorreturn; + /* If we have anything other than one number left, error + otherwise throw the number away */ + if (!varstackhead || varstackhead->next) { + rc = WCMD_NOOPERATOR; + goto exprerrorreturn; + } + prevresult = WCMD_popnumber(&varstackhead); + WINE_TRACE("Expression resolved to %d\n", prevresult); + heap_free(varstackhead); + varstackhead = NULL; + pos++; + break; + } + + /* Open bracket - use iteration to parse the inner expression, then continue */ + case '(' : { + int exprresult = 0; + pos++; + rc = WCMD_handleExpression(&pos, &exprresult, depth+1); + if (rc) goto exprerrorreturn; + WCMD_pushnumber(NULL, exprresult, &varstackhead); + break; + } + + /* Close bracket - we have finished this depth, calculate and return */ + case ')' : { + pos++; + treatasnumber = TRUE; /* Things in brackets result in a number */ + if (depth == 0) { + rc = WCMD_BADPAREN; + goto exprerrorreturn; + } + goto exprreturn; + } + + default: + WINE_ERR("Unrecognized operator %c\n", *pos); + pos++; + } + lastwasnumber = treatasnumber; + } + +exprreturn: + *expr = pos; + + /* We need to reduce until we have a single number (or variable) on the + stack and set the return value to that */ + while (!rc && opstackhead) { + rc = WCMD_reduce(&opstackhead, &varstackhead); + } + if (rc) goto exprerrorreturn; + + /* If we have anything other than one number left, error + otherwise throw the number away */ + if (!varstackhead || varstackhead->next) { + rc = WCMD_NOOPERATOR; + goto exprerrorreturn; + } + + /* Now get the number (and convert if its just a variable name) */ + *ret = WCMD_popnumber(&varstackhead); + +exprerrorreturn: + /* Free all remaining memory */ + while (opstackhead) WCMD_popoperator(&opstackhead); + while (varstackhead) WCMD_popnumber(&varstackhead); + + WINE_TRACE("Returning result %d, rc %d\n", *ret, rc); + return rc; +} + /**************************************************************************** * WCMD_setshow_env * @@ -3414,6 +3985,8 @@ void WCMD_setshow_env (WCHAR *s) { WCHAR *p; int status; static const WCHAR parmP[] = {'/','P','\0'}; + static const WCHAR parmA[] = {'/','A','\0'}; + WCHAR string[MAXSTRING]; if (param1[0] == 0x00 && quals[0] == 0x00) { env = GetEnvironmentStringsW(); @@ -3425,7 +3998,6 @@ void WCMD_setshow_env (WCHAR *s) { if (CompareStringW(LOCALE_USER_DEFAULT, NORM_IGNORECASE | SORT_STRINGSORT, s, 2, parmP, -1) == CSTR_EQUAL) { - WCHAR string[MAXSTRING]; DWORD count; s += 2; @@ -3453,6 +4025,46 @@ void WCMD_setshow_env (WCHAR *s) { status = SetEnvironmentVariableW(s, string); } + /* See if /A supplied, and if so calculate the results of all the expressions */ + } else if (CompareStringW(LOCALE_USER_DEFAULT, + NORM_IGNORECASE | SORT_STRINGSORT, + s, 2, parmA, -1) == CSTR_EQUAL) { + /* /A supplied, so evaluate expressions and set variables appropriately */ + /* Syntax is set /a var=1,var2=var+4 etc, and it echos back the result */ + /* of the final computation */ + int result = 0; + int rc = 0; + WCHAR *thisexpr; + WCHAR *src,*dst; + + /* Remove all quotes before doing any calculations */ + thisexpr = heap_alloc((strlenW(s+2)+1) * sizeof(WCHAR)); + src = s+2; + dst = thisexpr; + while (*src) { + if (*src != '"') *dst++ = *src; + src++; + } + *dst = 0; + + /* Now calculate the results of the expression */ + src = thisexpr; + rc = WCMD_handleExpression(&src, &result, 0); + heap_free(thisexpr); + + /* If parsing failed, issue the error message */ + if (rc > 0) { + WCMD_output_stderr(WCMD_LoadMessage(rc)); + return; + } + + /* If we have no context (interactive or cmd.exe /c) print the final result */ + if (!context) { + static const WCHAR fmt[] = {'%','d','\0'}; + sprintfW(string, fmt, result); + WCMD_output_asis(string); + } + } else { DWORD gle; diff --git a/programs/cmd/cmd.rc b/programs/cmd/cmd.rc index 184aaa8b088..2e94b3b1b86 100644 --- a/programs/cmd/cmd.rc +++ b/programs/cmd/cmd.rc @@ -354,4 +354,9 @@ Enter HELP for further information on any of the above commands.\n" WCMD_YESNO, " (Yes|No)" WCMD_YESNOALL, " (Yes|No|All)" WCMD_NO_COMMAND_FOUND, "Can't recognize '%1' as an internal or external command, or batch script.\n" + WCMD_DIVIDEBYZERO, "Division by zero error.\n" + WCMD_NOOPERAND, "Expected an operand.\n" + WCMD_NOOPERATOR, "Expected an operator.\n" + WCMD_BADPAREN, "Mismatch in parentheses.\n" + WCMD_BADHEXOCT, "Badly formed number - must be one of decimal (12),\n hexadecimal (0x34) or octal (056).\n" } diff --git a/programs/cmd/tests/test_builtins.cmd.exp b/programs/cmd/tests/test_builtins.cmd.exp index 9e7f30b30f7..b35692b6b32 100644 --- a/programs/cmd/tests/test_builtins.cmd.exp +++ b/programs/cmd/tests/test_builtins.cmd.exp @@ -717,172 +717,172 @@ ErrorLevel 0 3 --- set /a ------ individual operations -@todo_wine@WINE_foo correctly 3 -@todo_wine@WINE_foo correctly -1 -@todo_wine@WINE_foo correctly 3 -@todo_wine@WINE_foo correctly 6 -@todo_wine@WINE_foo correctly 10 -@todo_wine@WINE_foo correctly 4 -@todo_wine@WINE_foo correctly 4 -@todo_wine@WINE_foo correctly -4 -@todo_wine@WINE_foo correctly 0 -@todo_wine@WINE_foo correctly 2 -@todo_wine@WINE_foo correctly 2 -@todo_wine@WINE_foo correctly -2 -@todo_wine@WINE_foo correctly 1 -@todo_wine@WINE_foo correctly 4 -@todo_wine@WINE_foo correctly 0@or_broken@ERROR: WINE_foo incorrectly 1073741824 [0] -@todo_wine@WINE_foo correctly 0@or_broken@ERROR: WINE_foo incorrectly -1073741824 [0] -@todo_wine@WINE_foo correctly -4 -@todo_wine@WINE_foo correctly 9 -@todo_wine@WINE_foo correctly 2 -@todo_wine@WINE_foo correctly 0 -@todo_wine@WINE_foo correctly -1 -@todo_wine@WINE_foo correctly -3 -@todo_wine@WINE_foo correctly 0 -@todo_wine@WINE_foo correctly 1 -@todo_wine@WINE_foo correctly 1 -@todo_wine@WINE_foo correctly 4 -@todo_wine@WINE_foo correctly 1 -@todo_wine@WINE_foo correctly 5 -@todo_wine@WINE_foo correctly 5 -@todo_wine@WINE_foo correctly 7 -@todo_wine@WINE_foo correctly 5 -@todo_wine@WINE_foo correctly 5 -@todo_wine@WINE_foo correctly 5 -@todo_wine@WINE_foo correctly 4 -@todo_wine@WINE_foo correctly 6 -@todo_wine@WINE_foo correctly 1 -@todo_wine@WINE_foo correctly 4 +WINE_foo correctly 3 +WINE_foo correctly -1 +WINE_foo correctly 3 +WINE_foo correctly 6 +WINE_foo correctly 10 +WINE_foo correctly 4 +WINE_foo correctly 4 +WINE_foo correctly -4 +WINE_foo correctly 0 +WINE_foo correctly 2 +WINE_foo correctly 2 +WINE_foo correctly -2 +WINE_foo correctly 1 +WINE_foo correctly 4 +WINE_foo correctly 0@or_broken@ERROR: WINE_foo incorrectly 1073741824 [0] +WINE_foo correctly 0@or_broken@ERROR: WINE_foo incorrectly -1073741824 [0] +WINE_foo correctly -4 +WINE_foo correctly 9 +WINE_foo correctly 2 +WINE_foo correctly 0 +WINE_foo correctly -1 +WINE_foo correctly -3 +WINE_foo correctly 0 +WINE_foo correctly 1 +WINE_foo correctly 1 +WINE_foo correctly 4 +WINE_foo correctly 1 +WINE_foo correctly 5 +WINE_foo correctly 5 +WINE_foo correctly 7 +WINE_foo correctly 5 +WINE_foo correctly 5 +WINE_foo correctly 5 +WINE_foo correctly 4 +WINE_foo correctly 6 +WINE_foo correctly 1 +WINE_foo correctly 4 ------ precedence and grouping -@todo_wine@WINE_foo correctly 10 -@todo_wine@WINE_foo correctly 18@or_broken@ERROR: WINE_foo incorrectly [18] -@todo_wine@WINE_foo correctly 2@or_broken@ERROR: WINE_foo incorrectly 0 [2] -@todo_wine@WINE_foo correctly 2@or_broken@ERROR: WINE_foo incorrectly [2] -@todo_wine@WINE_foo correctly 0@or_broken@ERROR: WINE_foo incorrectly 4 [0] -@todo_wine@WINE_foo correctly 4@or_broken@ERROR: WINE_foo incorrectly [4] -@todo_wine@WINE_foo correctly 3@or_broken@ERROR: WINE_foo incorrectly [3] -@todo_wine@WINE_foo correctly 3@or_broken@ERROR: WINE_foo incorrectly [3] +WINE_foo correctly 10 +WINE_foo correctly 18@or_broken@ERROR: WINE_foo incorrectly [18] +WINE_foo correctly 2@or_broken@ERROR: WINE_foo incorrectly 0 [2] +WINE_foo correctly 2@or_broken@ERROR: WINE_foo incorrectly [2] +WINE_foo correctly 0@or_broken@ERROR: WINE_foo incorrectly 4 [0] +WINE_foo correctly 4@or_broken@ERROR: WINE_foo incorrectly [4] +WINE_foo correctly 3@or_broken@ERROR: WINE_foo incorrectly [3] +WINE_foo correctly 3@or_broken@ERROR: WINE_foo incorrectly [3] ------ octal and hexadecimal -@todo_wine@WINE_foo correctly 18 -@todo_wine@WINE_foo correctly 18 -@todo_wine@WINE_foo correctly 15 -@todo_wine@WINE_foo correctly 3 +WINE_foo correctly 18 +WINE_foo correctly 18 +WINE_foo correctly 15 +WINE_foo correctly 3 ------ variables -@todo_wine@WINE_foo correctly 3@or_broken@ERROR: WINE_foo incorrectly 0 [3] -@todo_wine@WINE_bar correctly 3@or_broken@ERROR: WINE_bar incorrectly [3] -@todo_wine@WINE_foo correctly 3@or_broken@ERROR: WINE_foo incorrectly 0 [3] -@todo_wine@WINE_bar correctly 4@or_broken@ERROR: WINE_bar incorrectly [4] -@todo_wine@WINE_foo correctly 3@or_broken@ERROR: WINE_foo incorrectly 0 [3] -@todo_wine@WINE_bar correctly 3@or_broken@ERROR: WINE_bar incorrectly [3] -@todo_wine@WINE_baz correctly 4@or_broken@ERROR: WINE_baz incorrectly [4] -@todo_wine@WINE_foo correctly 9@or_broken@ERROR: WINE_foo incorrectly 3 [9] -@todo_wine@WINE_bar correctly 9@or_broken@ERROR: WINE_bar incorrectly 3 [9] -@todo_wine@WINE_foo correctly 0 -@todo_wine@WINE_foo correctly 4 +WINE_foo correctly 3@or_broken@ERROR: WINE_foo incorrectly 0 [3] +WINE_bar correctly 3@or_broken@ERROR: WINE_bar incorrectly [3] +WINE_foo correctly 3@or_broken@ERROR: WINE_foo incorrectly 0 [3] +WINE_bar correctly 4@or_broken@ERROR: WINE_bar incorrectly [4] +WINE_foo correctly 3@or_broken@ERROR: WINE_foo incorrectly 0 [3] +WINE_bar correctly 3@or_broken@ERROR: WINE_bar incorrectly [3] +WINE_baz correctly 4@or_broken@ERROR: WINE_baz incorrectly [4] +WINE_foo correctly 9@or_broken@ERROR: WINE_foo incorrectly 3 [9] +WINE_bar correctly 9@or_broken@ERROR: WINE_bar incorrectly 3 [9] +WINE_foo correctly 0 +WINE_foo correctly 4 WINE_bar correctly 4 -@todo_wine@WINE_foo correctly -7@or_broken@ERROR: WINE_foo incorrectly 4 [-7] -@todo_wine@WINE_bar correctly -7@or_broken@ERROR: WINE_bar incorrectly 4 [-7] -@todo_wine@WINE_foo correctly -1@or_broken@ERROR: WINE_foo incorrectly -7 [-1] -@todo_wine@WINE_bar correctly -1@or_broken@ERROR: WINE_bar incorrectly -7 [-1] -@todo_wine@WINE_foo correctly 5@or_broken@ERROR: WINE_foo incorrectly 0 [5] -@todo_wine@WINE_bar correctly 1@or_broken@ERROR: WINE_bar incorrectly [1] -@todo_wine@WINE_foo correctly 4@or_broken@ERROR: WINE_foo incorrectly 1 [4] -@todo_wine@WINE_bar correctly 4@or_broken@ERROR: WINE_bar incorrectly 1 [4] -@todo_wine@WINE_foo correctly 1@or_broken@ERROR: WINE_foo incorrectly 4 [1] -@todo_wine@WINE_bar correctly 1@or_broken@ERROR: WINE_bar incorrectly 4 [1] -@todo_wine@WINE_foo correctly 0@or_broken@ERROR: WINE_foo incorrectly 1 [0] -@todo_wine@WINE_bar correctly 0@or_broken@ERROR: WINE_bar incorrectly 1 [0] -@todo_wine@WINE_foo correctly 5@or_broken@ERROR: WINE_foo incorrectly 0 [5] -@todo_wine@WINE_bar correctly 7@or_broken@ERROR: WINE_bar incorrectly [7] -@todo_wine@WINE_foo correctly 5@or_broken@ERROR: WINE_foo incorrectly 0 [5] -@todo_wine@WINE_bar correctly 7@or_broken@ERROR: WINE_bar incorrectly [7] -@todo_wine@WINE_foo correctly 19@or_broken@ERROR: WINE_foo incorrectly 0 [19] -@todo_wine@WINE_bar correctly 3@or_broken@ERROR: WINE_bar incorrectly [3] +WINE_foo correctly -7@or_broken@ERROR: WINE_foo incorrectly 4 [-7] +WINE_bar correctly -7@or_broken@ERROR: WINE_bar incorrectly 4 [-7] +WINE_foo correctly -1@or_broken@ERROR: WINE_foo incorrectly -7 [-1] +WINE_bar correctly -1@or_broken@ERROR: WINE_bar incorrectly -7 [-1] +WINE_foo correctly 5@or_broken@ERROR: WINE_foo incorrectly 0 [5] +WINE_bar correctly 1@or_broken@ERROR: WINE_bar incorrectly [1] +WINE_foo correctly 4@or_broken@ERROR: WINE_foo incorrectly 1 [4] +WINE_bar correctly 4@or_broken@ERROR: WINE_bar incorrectly 1 [4] +WINE_foo correctly 1@or_broken@ERROR: WINE_foo incorrectly 4 [1] +WINE_bar correctly 1@or_broken@ERROR: WINE_bar incorrectly 4 [1] +WINE_foo correctly 0@or_broken@ERROR: WINE_foo incorrectly 1 [0] +WINE_bar correctly 0@or_broken@ERROR: WINE_bar incorrectly 1 [0] +WINE_foo correctly 5@or_broken@ERROR: WINE_foo incorrectly 0 [5] +WINE_bar correctly 7@or_broken@ERROR: WINE_bar incorrectly [7] +WINE_foo correctly 5@or_broken@ERROR: WINE_foo incorrectly 0 [5] +WINE_bar correctly 7@or_broken@ERROR: WINE_bar incorrectly [7] +WINE_foo correctly 19@or_broken@ERROR: WINE_foo incorrectly 0 [19] +WINE_bar correctly 3@or_broken@ERROR: WINE_bar incorrectly [3] WINE_baz correctly 4 --- quotes -@todo_wine@WINE_foo correctly 1 -@todo_wine@WINE_foo correctly 1 -@todo_wine@WINE_foo correctly 1 -@todo_wine@WINE_bar correctly 2 -@todo_wine@WINE_foo correctly 1 -@todo_wine@WINE_bar correctly 2 -@todo_wine@WINE_foo correctly 1 -@todo_wine@WINE_bar correctly 2 -@todo_wine@WINE_foo correctly 1 -@todo_wine@WINE_bar correctly 2 -@todo_wine@WINE_foo correctly 1 -@todo_wine@WINE_bar correctly 2 -@todo_wine@WINE_baz correctly 3 -@todo_wine@WINE_foo correctly 1 -@todo_wine@WINE_bar correctly 2 -@todo_wine@WINE_baz correctly 3 -@todo_wine@WINE_foo correctly 1 -@todo_wine@WINE_bar correctly 2 -@todo_wine@WINE_baz correctly 3 -@todo_wine@WINE_foo correctly 1 -@todo_wine@WINE_bar correctly 2 -@todo_wine@WINE_baz correctly 3 -@todo_wine@WINE_foo correctly 1 -@todo_wine@WINE_bar correctly 2 -@todo_wine@WINE_baz correctly 3 -@todo_wine@WINE_foo correctly 1 -@todo_wine@WINE_foo correctly 1 -@todo_wine@WINE_bar correctly 5 -@todo_wine@WINE_baz correctly 2 -@todo_wine@WINE_foo correctly 18 +WINE_foo correctly 1 +WINE_foo correctly 1 +WINE_foo correctly 1 +WINE_bar correctly 2 +WINE_foo correctly 1 +WINE_bar correctly 2 +WINE_foo correctly 1 +WINE_bar correctly 2 +WINE_foo correctly 1 +WINE_bar correctly 2 +WINE_foo correctly 1 +WINE_bar correctly 2 +WINE_baz correctly 3 +WINE_foo correctly 1 +WINE_bar correctly 2 +WINE_baz correctly 3 +WINE_foo correctly 1 +WINE_bar correctly 2 +WINE_baz correctly 3 +WINE_foo correctly 1 +WINE_bar correctly 2 +WINE_baz correctly 3 +WINE_foo correctly 1 +WINE_bar correctly 2 +WINE_baz correctly 3 +WINE_foo correctly 1 +WINE_foo correctly 1 +WINE_bar correctly 5 +WINE_baz correctly 2 +WINE_foo correctly 18 WINE_foo correctly 3 -@todo_wine@WINE_bar correctly 7@or_broken@ERROR: WINE_bar incorrectly 4 [7] +WINE_bar correctly 7@or_broken@ERROR: WINE_bar incorrectly 4 [7] --- whitespace are ignored between double char operators -@todo_wine@WINE_foo correctly 10@or_broken@ERROR: WINE_foo incorrectly 4 [10] -@todo_wine@WINE_bar correctly 50@or_broken@ERROR: WINE_bar incorrectly 5 [50] -@todo_wine@WINE_foo correctly 772@or_broken@ERROR: WINE_foo incorrectly 4 [772] -@todo_wine@WINE_bar correctly 7720@or_broken@ERROR: WINE_bar incorrectly 5 [7720] +WINE_foo correctly 10@or_broken@ERROR: WINE_foo incorrectly 4 [10] +WINE_bar correctly 50@or_broken@ERROR: WINE_bar incorrectly 5 [50] +WINE_foo correctly 772@or_broken@ERROR: WINE_foo incorrectly 4 [772] +WINE_bar correctly 7720@or_broken@ERROR: WINE_bar incorrectly 5 [7720] --- invalid operator sequence 4 4 ----- negative prefix -@todo_wine@WINE_foo correctly -1 -@todo_wine@WINE_foo correctly 1@or_broken@ERROR: WINE_foo incorrectly [1] -@todo_wine@WINE_foo correctly 6 -@todo_wine@WINE_foo correctly 0 -@todo_wine@WINE_foo correctly 6 -@todo_wine@WINE_foo correctly 2 -@todo_wine@WINE_foo correctly 0@or_broken@ERROR: WINE_foo incorrectly [0] -@todo_wine@WINE_foo correctly 5 -@todo_wine@WINE_foo correctly 3@or_broken@ERROR: WINE_foo incorrectly -5 [3] +WINE_foo correctly -1 +WINE_foo correctly 1@or_broken@ERROR: WINE_foo incorrectly [1] +WINE_foo correctly 6 +WINE_foo correctly 0 +WINE_foo correctly 6 +WINE_foo correctly 2 +WINE_foo correctly 0@or_broken@ERROR: WINE_foo incorrectly [0] +WINE_foo correctly 5 +WINE_foo correctly 3@or_broken@ERROR: WINE_foo incorrectly -5 [3] ----- assignment tests involving the end destination -@todo_wine@WINE_foo correctly 11@or_broken@ERROR: WINE_foo incorrectly 3 [11] -@todo_wine@WINE_foo correctly 6@or_broken@ERROR: WINE_foo incorrectly 2 [6] -@todo_wine@WINE_bar correctly 9@or_broken@ERROR: WINE_bar incorrectly [9] -@todo_wine@WINE_foo correctly 6@or_broken@ERROR: WINE_foo incorrectly 2 [6] -@todo_wine@WINE_bar correctly 10@or_broken@ERROR: WINE_bar incorrectly [10] -@todo_wine@WINE_baz correctly 7@or_broken@ERROR: WINE_baz incorrectly [7] -@todo_wine@WINE_foo correctly 7@or_broken@ERROR: WINE_foo incorrectly 2 [7] -@todo_wine@WINE_bar correctly 7@or_broken@ERROR: WINE_bar incorrectly 2 [7] +WINE_foo correctly 11@or_broken@ERROR: WINE_foo incorrectly 3 [11] +WINE_foo correctly 6@or_broken@ERROR: WINE_foo incorrectly 2 [6] +WINE_bar correctly 9@or_broken@ERROR: WINE_bar incorrectly [9] +WINE_foo correctly 6@or_broken@ERROR: WINE_foo incorrectly 2 [6] +WINE_bar correctly 10@or_broken@ERROR: WINE_bar incorrectly [10] +WINE_baz correctly 7@or_broken@ERROR: WINE_baz incorrectly [7] +WINE_foo correctly 7@or_broken@ERROR: WINE_foo incorrectly 2 [7] +WINE_bar correctly 7@or_broken@ERROR: WINE_bar incorrectly 2 [7] ----- equal precedence on stack -@todo_wine@WINE_foo correctly 1@or_broken@ERROR: WINE_foo incorrectly 0 [1] -@todo_wine@WINE_foo correctly 0 -@todo_wine@WINE_foo correctly 1@or_broken@ERROR: WINE_foo incorrectly [1] -@todo_wine@WINE_foo correctly 0@or_broken@ERROR: WINE_foo incorrectly [0] -@todo_wine@WINE_foo correctly 1@or_broken@ERROR: WINE_foo incorrectly [1] -@todo_wine@WINE_foo correctly -1@or_broken@ERROR: WINE_foo incorrectly [-1] -@todo_wine@WINE_foo correctly -1@or_broken@ERROR: WINE_foo incorrectly [-1] -@todo_wine@WINE_foo correctly 1@or_broken@ERROR: WINE_foo incorrectly [1] -@todo_wine@WINE_foo correctly 0@or_broken@ERROR: WINE_foo incorrectly [0] -@todo_wine@WINE_foo correctly -1 -@todo_wine@WINE_foo correctly 0@or_broken@ERROR: WINE_foo incorrectly -1 [0] -@todo_wine@WINE_foo correctly 0 -@todo_wine@WINE_foo correctly 1@or_broken@ERROR: WINE_foo incorrectly 0 [1] -@todo_wine@WINE_foo correctly -1@or_broken@ERROR: WINE_foo incorrectly 0 [-1] -@todo_wine@WINE_foo correctly 25@or_broken@ERROR: WINE_foo incorrectly 20 [25] -@todo_wine@WINE_foo correctly 20 -@todo_wine@WINE_foo correctly 1 -@todo_wine@WINE_foo correctly 4 -@todo_wine@WINE_foo correctly 7 -@todo_wine@WINE_foo correctly 8@or_broken@ERROR: WINE_foo incorrectly 4 [8] -@todo_wine@WINE_foo correctly 6@or_broken@ERROR: WINE_foo incorrectly 5 [6] -@todo_wine@WINE_bar correctly 6@or_broken@ERROR: WINE_bar incorrectly 5 [6] +WINE_foo correctly 1@or_broken@ERROR: WINE_foo incorrectly 0 [1] +WINE_foo correctly 0 +WINE_foo correctly 1@or_broken@ERROR: WINE_foo incorrectly [1] +WINE_foo correctly 0@or_broken@ERROR: WINE_foo incorrectly [0] +WINE_foo correctly 1@or_broken@ERROR: WINE_foo incorrectly [1] +WINE_foo correctly -1@or_broken@ERROR: WINE_foo incorrectly [-1] +WINE_foo correctly -1@or_broken@ERROR: WINE_foo incorrectly [-1] +WINE_foo correctly 1@or_broken@ERROR: WINE_foo incorrectly [1] +WINE_foo correctly 0@or_broken@ERROR: WINE_foo incorrectly [0] +WINE_foo correctly -1 +WINE_foo correctly 0@or_broken@ERROR: WINE_foo incorrectly -1 [0] +WINE_foo correctly 0 +WINE_foo correctly 1@or_broken@ERROR: WINE_foo incorrectly 0 [1] +WINE_foo correctly -1@or_broken@ERROR: WINE_foo incorrectly 0 [-1] +WINE_foo correctly 25@or_broken@ERROR: WINE_foo incorrectly 20 [25] +WINE_foo correctly 20 +WINE_foo correctly 1 +WINE_foo correctly 4 +WINE_foo correctly 7 +WINE_foo correctly 8@or_broken@ERROR: WINE_foo incorrectly 4 [8] +WINE_foo correctly 6@or_broken@ERROR: WINE_foo incorrectly 5 [6] +WINE_bar correctly 6@or_broken@ERROR: WINE_bar incorrectly 5 [6] --- for /F ------ string argument a diff --git a/programs/cmd/wcmd.h b/programs/cmd/wcmd.h index 3cc4c0b1a50..278a5789a72 100644 --- a/programs/cmd/wcmd.h +++ b/programs/cmd/wcmd.h @@ -317,3 +317,8 @@ extern WCHAR version_string[]; #define WCMD_YESNO 1038 #define WCMD_YESNOALL 1039 #define WCMD_NO_COMMAND_FOUND 1040 +#define WCMD_DIVIDEBYZERO 1041 +#define WCMD_NOOPERAND 1042 +#define WCMD_NOOPERATOR 1043 +#define WCMD_BADPAREN 1044 +#define WCMD_BADHEXOCT 1045