From f88affa2a188f4cf608900239d8486b649c00353 Mon Sep 17 00:00:00 2001 From: Zhiyi Zhang Date: Mon, 17 Apr 2023 16:07:18 +0800 Subject: [PATCH] findstr: Add basic functionality. Company of Heroes: Battle of Crete needs a functioning findstr.exe to exit properly. Freemake Video Converter 4.1 installer also needs this. Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=35254 --- configure | 1 + configure.ac | 1 + po/ar.po | 20 +++ po/ast.po | 18 +++ po/bg.po | 19 +++ po/ca.po | 20 +++ po/cs.po | 20 +++ po/da.po | 20 +++ po/de.po | 20 +++ po/el.po | 18 +++ po/en.po | 16 +++ po/en_US.po | 16 +++ po/eo.po | 20 +++ po/es.po | 20 +++ po/fa.po | 17 +++ po/fi.po | 20 +++ po/fr.po | 20 +++ po/he.po | 19 +++ po/hi.po | 16 +++ po/hr.po | 20 +++ po/hu.po | 20 +++ po/it.po | 20 +++ po/ja.po | 20 +++ po/ko.po | 20 +++ po/lt.po | 20 +++ po/ml.po | 16 +++ po/nb_NO.po | 20 +++ po/nl.po | 20 +++ po/or.po | 16 +++ po/pa.po | 16 +++ po/pl.po | 20 +++ po/pt_BR.po | 20 +++ po/pt_PT.po | 20 +++ po/rm.po | 16 +++ po/ro.po | 20 +++ po/ru.po | 20 +++ po/si.po | 20 +++ po/sk.po | 18 +++ po/sl.po | 20 +++ po/sr_RS@cyrillic.po | 19 +++ po/sr_RS@latin.po | 19 +++ po/sv.po | 20 +++ po/ta.po | 16 +++ po/te.po | 16 +++ po/th.po | 17 +++ po/tr.po | 20 +++ po/uk.po | 20 +++ po/wa.po | 18 +++ po/wine.pot | 16 +++ po/zh_CN.po | 20 +++ po/zh_TW.po | 20 +++ programs/findstr/Makefile.in | 3 + programs/findstr/findstr.h | 38 ++++++ programs/findstr/findstr.rc | 31 +++++ programs/findstr/main.c | 210 ++++++++++++++++++++++++++++- programs/findstr/tests/Makefile.in | 4 + programs/findstr/tests/findstr.c | 208 ++++++++++++++++++++++++++++ 57 files changed, 1413 insertions(+), 5 deletions(-) create mode 100644 programs/findstr/findstr.h create mode 100644 programs/findstr/findstr.rc create mode 100644 programs/findstr/tests/Makefile.in create mode 100644 programs/findstr/tests/findstr.c diff --git a/configure b/configure index 1d110a8b70d..6201d4444fd 100755 --- a/configure +++ b/configure @@ -22095,6 +22095,7 @@ wine_fn_config_makefile programs/fc enable_fc wine_fn_config_makefile programs/find enable_find wine_fn_config_makefile programs/find/tests enable_tests wine_fn_config_makefile programs/findstr enable_findstr +wine_fn_config_makefile programs/findstr/tests enable_tests wine_fn_config_makefile programs/fsutil enable_fsutil wine_fn_config_makefile programs/fsutil/tests enable_tests wine_fn_config_makefile programs/hh enable_hh diff --git a/configure.ac b/configure.ac index 32c9d433a4e..265c7425a8e 100644 --- a/configure.ac +++ b/configure.ac @@ -3333,6 +3333,7 @@ WINE_CONFIG_MAKEFILE(programs/fc) WINE_CONFIG_MAKEFILE(programs/find) WINE_CONFIG_MAKEFILE(programs/find/tests) WINE_CONFIG_MAKEFILE(programs/findstr) +WINE_CONFIG_MAKEFILE(programs/findstr/tests) WINE_CONFIG_MAKEFILE(programs/fsutil) WINE_CONFIG_MAKEFILE(programs/fsutil/tests) WINE_CONFIG_MAKEFILE(programs/hh) diff --git a/po/ar.po b/po/ar.po index a6c78236bc4..5341f4332c8 100644 --- a/po/ar.po +++ b/po/ar.po @@ -16017,6 +16017,26 @@ msgstr "بدء التشغيل" msgid "&Run..." msgstr "ش&غل..." +#: programs/findstr/findstr.rc:28 +#, fuzzy +#| msgid "Reset Connections" +msgid "Usage: findstr /options string\n" +msgstr "إعادة الاتصالات" + +#: programs/findstr/findstr.rc:29 +#, fuzzy +#| msgid "Invalid command line.\n" +msgid "FINDSTR: Bad command line\n" +msgstr "سطر الاوامر غير سليم.\n" + +#: programs/findstr/findstr.rc:30 +msgid "FINDSTR: Cannot open %s\n" +msgstr "" + +#: programs/findstr/findstr.rc:31 +msgid "FINDSTR: /%c ignored\n" +msgstr "" + #: programs/fsutil/fsutil.mc:28 msgid "" "- Supported Commands -\n" diff --git a/po/ast.po b/po/ast.po index 7acae63fbcf..cb536de7217 100644 --- a/po/ast.po +++ b/po/ast.po @@ -14819,6 +14819,24 @@ msgstr "" msgid "&Run..." msgstr "&Executar..." +#: programs/findstr/findstr.rc:28 +#, fuzzy +#| msgid "Connections" +msgid "Usage: findstr /options string\n" +msgstr "Conexones" + +#: programs/findstr/findstr.rc:29 +msgid "FINDSTR: Bad command line\n" +msgstr "" + +#: programs/findstr/findstr.rc:30 +msgid "FINDSTR: Cannot open %s\n" +msgstr "" + +#: programs/findstr/findstr.rc:31 +msgid "FINDSTR: /%c ignored\n" +msgstr "" + #: programs/fsutil/fsutil.mc:28 msgid "" "- Supported Commands -\n" diff --git a/po/bg.po b/po/bg.po index f5bd71825b0..641f6c1f58d 100644 --- a/po/bg.po +++ b/po/bg.po @@ -14717,6 +14717,25 @@ msgstr "Рестартиране" msgid "&Run..." msgstr "" +#: programs/findstr/findstr.rc:28 +#, fuzzy +#| msgid "LAN Connection" +msgid "Usage: findstr /options string\n" +msgstr "LAN връзка" + +#: programs/findstr/findstr.rc:29 +#, fuzzy +msgid "FINDSTR: Bad command line\n" +msgstr "Невалидни знаци в пътя.\n" + +#: programs/findstr/findstr.rc:30 +msgid "FINDSTR: Cannot open %s\n" +msgstr "" + +#: programs/findstr/findstr.rc:31 +msgid "FINDSTR: /%c ignored\n" +msgstr "" + #: programs/fsutil/fsutil.mc:28 msgid "" "- Supported Commands -\n" diff --git a/po/ca.po b/po/ca.po index 1ea63510af7..8596354882d 100644 --- a/po/ca.po +++ b/po/ca.po @@ -14811,6 +14811,26 @@ msgstr "Inici" msgid "&Run..." msgstr "&Executa..." +#: programs/findstr/findstr.rc:28 +#, fuzzy +#| msgid "Use c&onnection string" +msgid "Usage: findstr /options string\n" +msgstr "Utilitza una cadena de c&onnexió" + +#: programs/findstr/findstr.rc:29 +#, fuzzy +#| msgid "Invalid command line.\n" +msgid "FINDSTR: Bad command line\n" +msgstr "La línia d'ordres no és vàlida.\n" + +#: programs/findstr/findstr.rc:30 +msgid "FINDSTR: Cannot open %s\n" +msgstr "" + +#: programs/findstr/findstr.rc:31 +msgid "FINDSTR: /%c ignored\n" +msgstr "" + #: programs/fsutil/fsutil.mc:28 msgid "" "- Supported Commands -\n" diff --git a/po/cs.po b/po/cs.po index 71ed79441db..34bebd70739 100644 --- a/po/cs.po +++ b/po/cs.po @@ -15520,6 +15520,26 @@ msgstr "Start" msgid "&Run..." msgstr "&Spustit..." +#: programs/findstr/findstr.rc:28 +#, fuzzy +#| msgid "Reset Connections" +msgid "Usage: findstr /options string\n" +msgstr "Resetovat připojení" + +#: programs/findstr/findstr.rc:29 +#, fuzzy +#| msgid "Invalid command line.\n" +msgid "FINDSTR: Bad command line\n" +msgstr "Neplatné zadání příkazu.\n" + +#: programs/findstr/findstr.rc:30 +msgid "FINDSTR: Cannot open %s\n" +msgstr "" + +#: programs/findstr/findstr.rc:31 +msgid "FINDSTR: /%c ignored\n" +msgstr "" + #: programs/fsutil/fsutil.mc:28 msgid "" "- Supported Commands -\n" diff --git a/po/da.po b/po/da.po index 38ccb7bd64b..47b9dc5f517 100644 --- a/po/da.po +++ b/po/da.po @@ -15926,6 +15926,26 @@ msgstr "Start op" msgid "&Run..." msgstr "Kø&r..." +#: programs/findstr/findstr.rc:28 +#, fuzzy +#| msgid "LAN Connection" +msgid "Usage: findstr /options string\n" +msgstr "Lokal netværksforbindelse" + +#: programs/findstr/findstr.rc:29 +#, fuzzy +#| msgid "Invalid command line.\n" +msgid "FINDSTR: Bad command line\n" +msgstr "Ugyldig kommando linje.\n" + +#: programs/findstr/findstr.rc:30 +msgid "FINDSTR: Cannot open %s\n" +msgstr "" + +#: programs/findstr/findstr.rc:31 +msgid "FINDSTR: /%c ignored\n" +msgstr "" + #: programs/fsutil/fsutil.mc:28 msgid "" "- Supported Commands -\n" diff --git a/po/de.po b/po/de.po index 6cec8fc4c0d..8f96bf792aa 100644 --- a/po/de.po +++ b/po/de.po @@ -14789,6 +14789,26 @@ msgstr "Start" msgid "&Run..." msgstr "&Ausführen..." +#: programs/findstr/findstr.rc:28 +#, fuzzy +#| msgid "Use c&onnection string" +msgid "Usage: findstr /options string\n" +msgstr "Verbindungs-Zeichenkette &verwenden" + +#: programs/findstr/findstr.rc:29 +#, fuzzy +#| msgid "Invalid command line.\n" +msgid "FINDSTR: Bad command line\n" +msgstr "Ungültige Kommandozeile.\n" + +#: programs/findstr/findstr.rc:30 +msgid "FINDSTR: Cannot open %s\n" +msgstr "" + +#: programs/findstr/findstr.rc:31 +msgid "FINDSTR: /%c ignored\n" +msgstr "" + #: programs/fsutil/fsutil.mc:28 msgid "" "- Supported Commands -\n" diff --git a/po/el.po b/po/el.po index 75f969c29b5..1000f9aec63 100644 --- a/po/el.po +++ b/po/el.po @@ -14469,6 +14469,24 @@ msgstr "" msgid "&Run..." msgstr "" +#: programs/findstr/findstr.rc:28 +#, fuzzy +msgid "Usage: findstr /options string\n" +msgstr "Επιλογές" + +#: programs/findstr/findstr.rc:29 +#, fuzzy +msgid "FINDSTR: Bad command line\n" +msgstr "Μη έγγυρος(οι) χαρακτήρας(ες) στο μονοπάτι.\n" + +#: programs/findstr/findstr.rc:30 +msgid "FINDSTR: Cannot open %s\n" +msgstr "" + +#: programs/findstr/findstr.rc:31 +msgid "FINDSTR: /%c ignored\n" +msgstr "" + #: programs/fsutil/fsutil.mc:28 msgid "" "- Supported Commands -\n" diff --git a/po/en.po b/po/en.po index da810c973fa..5baea25b989 100644 --- a/po/en.po +++ b/po/en.po @@ -14706,6 +14706,22 @@ msgstr "Start" msgid "&Run..." msgstr "&Run..." +#: programs/findstr/findstr.rc:28 +msgid "Usage: findstr /options string\n" +msgstr "Usage: findstr /options string\n" + +#: programs/findstr/findstr.rc:29 +msgid "FINDSTR: Bad command line\n" +msgstr "FINDSTR: Bad command line\n" + +#: programs/findstr/findstr.rc:30 +msgid "FINDSTR: Cannot open %s\n" +msgstr "FINDSTR: Cannot open %s\n" + +#: programs/findstr/findstr.rc:31 +msgid "FINDSTR: /%c ignored\n" +msgstr "FINDSTR: /%c ignored\n" + #: programs/fsutil/fsutil.mc:28 msgid "" "- Supported Commands -\n" diff --git a/po/en_US.po b/po/en_US.po index d63f36220fa..2730f8fe90a 100644 --- a/po/en_US.po +++ b/po/en_US.po @@ -14706,6 +14706,22 @@ msgstr "Start" msgid "&Run..." msgstr "&Run..." +#: programs/findstr/findstr.rc:28 +msgid "Usage: findstr /options string\n" +msgstr "Usage: findstr /options string\n" + +#: programs/findstr/findstr.rc:29 +msgid "FINDSTR: Bad command line\n" +msgstr "FINDSTR: Bad command line\n" + +#: programs/findstr/findstr.rc:30 +msgid "FINDSTR: Cannot open %s\n" +msgstr "FINDSTR: Cannot open %s\n" + +#: programs/findstr/findstr.rc:31 +msgid "FINDSTR: /%c ignored\n" +msgstr "FINDSTR: /%c ignored\n" + #: programs/fsutil/fsutil.mc:28 msgid "" "- Supported Commands -\n" diff --git a/po/eo.po b/po/eo.po index 30413e5976e..f118d731a59 100644 --- a/po/eo.po +++ b/po/eo.po @@ -15082,6 +15082,26 @@ msgstr "Starto" msgid "&Run..." msgstr "" +#: programs/findstr/findstr.rc:28 +#, fuzzy +#| msgid "LAN Connection" +msgid "Usage: findstr /options string\n" +msgstr "LAN konektiĝo" + +#: programs/findstr/findstr.rc:29 +#, fuzzy +#| msgid "Invalid command line.\n" +msgid "FINDSTR: Bad command line\n" +msgstr "Nevalida komandlinio.\n" + +#: programs/findstr/findstr.rc:30 +msgid "FINDSTR: Cannot open %s\n" +msgstr "" + +#: programs/findstr/findstr.rc:31 +msgid "FINDSTR: /%c ignored\n" +msgstr "" + #: programs/fsutil/fsutil.mc:28 msgid "" "- Supported Commands -\n" diff --git a/po/es.po b/po/es.po index 64b81c5f619..66d54a11865 100644 --- a/po/es.po +++ b/po/es.po @@ -15379,6 +15379,26 @@ msgstr "Arranque" msgid "&Run..." msgstr "E&jecutar..." +#: programs/findstr/findstr.rc:28 +#, fuzzy +#| msgid "Use c&onnection string" +msgid "Usage: findstr /options string\n" +msgstr "Utilice datos de C&onexión" + +#: programs/findstr/findstr.rc:29 +#, fuzzy +#| msgid "Invalid command line.\n" +msgid "FINDSTR: Bad command line\n" +msgstr "Línea de comandos inválida.\n" + +#: programs/findstr/findstr.rc:30 +msgid "FINDSTR: Cannot open %s\n" +msgstr "" + +#: programs/findstr/findstr.rc:31 +msgid "FINDSTR: /%c ignored\n" +msgstr "" + #: programs/fsutil/fsutil.mc:28 msgid "" "- Supported Commands -\n" diff --git a/po/fa.po b/po/fa.po index 09bf4d57cfe..20662fb4c1d 100644 --- a/po/fa.po +++ b/po/fa.po @@ -14654,6 +14654,23 @@ msgstr "" msgid "&Run..." msgstr "" +#: programs/findstr/findstr.rc:28 +#, fuzzy +msgid "Usage: findstr /options string\n" +msgstr "اطلاعات" + +#: programs/findstr/findstr.rc:29 +msgid "FINDSTR: Bad command line\n" +msgstr "" + +#: programs/findstr/findstr.rc:30 +msgid "FINDSTR: Cannot open %s\n" +msgstr "" + +#: programs/findstr/findstr.rc:31 +msgid "FINDSTR: /%c ignored\n" +msgstr "" + #: programs/fsutil/fsutil.mc:28 msgid "" "- Supported Commands -\n" diff --git a/po/fi.po b/po/fi.po index b82c301ed48..36ac133eb5a 100644 --- a/po/fi.po +++ b/po/fi.po @@ -14684,6 +14684,26 @@ msgstr "Käynnistä" msgid "&Run..." msgstr "&Suorita..." +#: programs/findstr/findstr.rc:28 +#, fuzzy +#| msgid "Use c&onnection string" +msgid "Usage: findstr /options string\n" +msgstr "Syötä yhteysasetukset &merkkijonona" + +#: programs/findstr/findstr.rc:29 +#, fuzzy +#| msgid "Invalid command line.\n" +msgid "FINDSTR: Bad command line\n" +msgstr "Komentorivi ei kelpaa.\n" + +#: programs/findstr/findstr.rc:30 +msgid "FINDSTR: Cannot open %s\n" +msgstr "" + +#: programs/findstr/findstr.rc:31 +msgid "FINDSTR: /%c ignored\n" +msgstr "" + #: programs/fsutil/fsutil.mc:28 msgid "" "- Supported Commands -\n" diff --git a/po/fr.po b/po/fr.po index bcf6d3ead08..7c1d5278b00 100644 --- a/po/fr.po +++ b/po/fr.po @@ -15296,6 +15296,26 @@ msgstr "Démarrer" msgid "&Run..." msgstr "E&xécuter..." +#: programs/findstr/findstr.rc:28 +#, fuzzy +#| msgid "Use c&onnection string" +msgid "Usage: findstr /options string\n" +msgstr "Utiliser une chaîne de connexion" + +#: programs/findstr/findstr.rc:29 +#, fuzzy +#| msgid "Invalid command line.\n" +msgid "FINDSTR: Bad command line\n" +msgstr "Ligne de commande invalide.\n" + +#: programs/findstr/findstr.rc:30 +msgid "FINDSTR: Cannot open %s\n" +msgstr "" + +#: programs/findstr/findstr.rc:31 +msgid "FINDSTR: /%c ignored\n" +msgstr "" + #: programs/fsutil/fsutil.mc:28 msgid "" "- Supported Commands -\n" diff --git a/po/he.po b/po/he.po index d3cd7591551..6beb1876668 100644 --- a/po/he.po +++ b/po/he.po @@ -15480,6 +15480,25 @@ msgstr "תפריט ההתחלה" msgid "&Run..." msgstr "הפע&לה..." +#: programs/findstr/findstr.rc:28 +#, fuzzy +#| msgid "Reset Connections" +msgid "Usage: findstr /options string\n" +msgstr "Reset Connections" + +#: programs/findstr/findstr.rc:29 +#, fuzzy +msgid "FINDSTR: Bad command line\n" +msgstr "אפשרות שגויה.\n" + +#: programs/findstr/findstr.rc:30 +msgid "FINDSTR: Cannot open %s\n" +msgstr "" + +#: programs/findstr/findstr.rc:31 +msgid "FINDSTR: /%c ignored\n" +msgstr "" + #: programs/fsutil/fsutil.mc:28 msgid "" "- Supported Commands -\n" diff --git a/po/hi.po b/po/hi.po index dd87c8640e0..2e4f6838965 100644 --- a/po/hi.po +++ b/po/hi.po @@ -14201,6 +14201,22 @@ msgstr "" msgid "&Run..." msgstr "" +#: programs/findstr/findstr.rc:28 +msgid "Usage: findstr /options string\n" +msgstr "" + +#: programs/findstr/findstr.rc:29 +msgid "FINDSTR: Bad command line\n" +msgstr "" + +#: programs/findstr/findstr.rc:30 +msgid "FINDSTR: Cannot open %s\n" +msgstr "" + +#: programs/findstr/findstr.rc:31 +msgid "FINDSTR: /%c ignored\n" +msgstr "" + #: programs/fsutil/fsutil.mc:28 msgid "" "- Supported Commands -\n" diff --git a/po/hr.po b/po/hr.po index 73a2e82f90b..07f7ee5b7a8 100644 --- a/po/hr.po +++ b/po/hr.po @@ -15482,6 +15482,26 @@ msgstr "'Start' izbornik" msgid "&Run..." msgstr "Pok&reni..." +#: programs/findstr/findstr.rc:28 +#, fuzzy +#| msgid "Reconnecting" +msgid "Usage: findstr /options string\n" +msgstr "Ponovno povezivanje" + +#: programs/findstr/findstr.rc:29 +#, fuzzy +#| msgid "Invalid command line.\n" +msgid "FINDSTR: Bad command line\n" +msgstr "Neispravna naredbena linija.\n" + +#: programs/findstr/findstr.rc:30 +msgid "FINDSTR: Cannot open %s\n" +msgstr "" + +#: programs/findstr/findstr.rc:31 +msgid "FINDSTR: /%c ignored\n" +msgstr "" + #: programs/fsutil/fsutil.mc:28 msgid "" "- Supported Commands -\n" diff --git a/po/hu.po b/po/hu.po index dc25fabe578..e3cab5c7994 100644 --- a/po/hu.po +++ b/po/hu.po @@ -15918,6 +15918,26 @@ msgstr "Indítópult" msgid "&Run..." msgstr "&Futtatás..." +#: programs/findstr/findstr.rc:28 +#, fuzzy +#| msgid "LAN Connection" +msgid "Usage: findstr /options string\n" +msgstr "LAN kapcsolat" + +#: programs/findstr/findstr.rc:29 +#, fuzzy +#| msgid "Invalid command line.\n" +msgid "FINDSTR: Bad command line\n" +msgstr "Érvénytelen parancs sor.\n" + +#: programs/findstr/findstr.rc:30 +msgid "FINDSTR: Cannot open %s\n" +msgstr "" + +#: programs/findstr/findstr.rc:31 +msgid "FINDSTR: /%c ignored\n" +msgstr "" + #: programs/fsutil/fsutil.mc:28 msgid "" "- Supported Commands -\n" diff --git a/po/it.po b/po/it.po index f68cb65dde5..9f0fff24553 100644 --- a/po/it.po +++ b/po/it.po @@ -15995,6 +15995,26 @@ msgstr "Esecuzione automatica" msgid "&Run..." msgstr "&Esegui..." +#: programs/findstr/findstr.rc:28 +#, fuzzy +#| msgid "LAN Connection" +msgid "Usage: findstr /options string\n" +msgstr "Connessione LAN" + +#: programs/findstr/findstr.rc:29 +#, fuzzy +#| msgid "Invalid command line.\n" +msgid "FINDSTR: Bad command line\n" +msgstr "Linea di comando non valida.\n" + +#: programs/findstr/findstr.rc:30 +msgid "FINDSTR: Cannot open %s\n" +msgstr "" + +#: programs/findstr/findstr.rc:31 +msgid "FINDSTR: /%c ignored\n" +msgstr "" + #: programs/fsutil/fsutil.mc:28 msgid "" "- Supported Commands -\n" diff --git a/po/ja.po b/po/ja.po index ed6bba051ba..37828e8bdec 100644 --- a/po/ja.po +++ b/po/ja.po @@ -14705,6 +14705,26 @@ msgstr "スタート" msgid "&Run..." msgstr "実行(&R)..." +#: programs/findstr/findstr.rc:28 +#, fuzzy +#| msgid "Use c&onnection string" +msgid "Usage: findstr /options string\n" +msgstr "利用する接続文字列(&O)" + +#: programs/findstr/findstr.rc:29 +#, fuzzy +#| msgid "Invalid command line.\n" +msgid "FINDSTR: Bad command line\n" +msgstr "コマンド ラインが正しくありません。\n" + +#: programs/findstr/findstr.rc:30 +msgid "FINDSTR: Cannot open %s\n" +msgstr "" + +#: programs/findstr/findstr.rc:31 +msgid "FINDSTR: /%c ignored\n" +msgstr "" + #: programs/fsutil/fsutil.mc:28 msgid "" "- Supported Commands -\n" diff --git a/po/ko.po b/po/ko.po index c5a22683c02..393d7ac7c33 100644 --- a/po/ko.po +++ b/po/ko.po @@ -14661,6 +14661,26 @@ msgstr "시작" msgid "&Run..." msgstr "실행(&R)..." +#: programs/findstr/findstr.rc:28 +#, fuzzy +#| msgid "Use c&onnection string" +msgid "Usage: findstr /options string\n" +msgstr "연결 문자열 사용(&O)" + +#: programs/findstr/findstr.rc:29 +#, fuzzy +#| msgid "Invalid command line.\n" +msgid "FINDSTR: Bad command line\n" +msgstr "잘못된 명령줄.\n" + +#: programs/findstr/findstr.rc:30 +msgid "FINDSTR: Cannot open %s\n" +msgstr "" + +#: programs/findstr/findstr.rc:31 +msgid "FINDSTR: /%c ignored\n" +msgstr "" + #: programs/fsutil/fsutil.mc:28 msgid "" "- Supported Commands -\n" diff --git a/po/lt.po b/po/lt.po index fee636cdde3..cec7be7010e 100644 --- a/po/lt.po +++ b/po/lt.po @@ -14710,6 +14710,26 @@ msgstr "Pradžia" msgid "&Run..." msgstr "&Vykdyti..." +#: programs/findstr/findstr.rc:28 +#, fuzzy +#| msgid "Use c&onnection string" +msgid "Usage: findstr /options string\n" +msgstr "Naudoti r&yšio eilutę" + +#: programs/findstr/findstr.rc:29 +#, fuzzy +#| msgid "Invalid command line.\n" +msgid "FINDSTR: Bad command line\n" +msgstr "Neteisinga komandos eilutė.\n" + +#: programs/findstr/findstr.rc:30 +msgid "FINDSTR: Cannot open %s\n" +msgstr "" + +#: programs/findstr/findstr.rc:31 +msgid "FINDSTR: /%c ignored\n" +msgstr "" + #: programs/fsutil/fsutil.mc:28 msgid "" "- Supported Commands -\n" diff --git a/po/ml.po b/po/ml.po index 111a2423085..3ee300d101d 100644 --- a/po/ml.po +++ b/po/ml.po @@ -14200,6 +14200,22 @@ msgstr "" msgid "&Run..." msgstr "" +#: programs/findstr/findstr.rc:28 +msgid "Usage: findstr /options string\n" +msgstr "" + +#: programs/findstr/findstr.rc:29 +msgid "FINDSTR: Bad command line\n" +msgstr "" + +#: programs/findstr/findstr.rc:30 +msgid "FINDSTR: Cannot open %s\n" +msgstr "" + +#: programs/findstr/findstr.rc:31 +msgid "FINDSTR: /%c ignored\n" +msgstr "" + #: programs/fsutil/fsutil.mc:28 msgid "" "- Supported Commands -\n" diff --git a/po/nb_NO.po b/po/nb_NO.po index eb2930c22ef..a70dd556d74 100644 --- a/po/nb_NO.po +++ b/po/nb_NO.po @@ -15500,6 +15500,26 @@ msgstr "Start" msgid "&Run..." msgstr "Kjø&r..." +#: programs/findstr/findstr.rc:28 +#, fuzzy +#| msgid "Reset Connections" +msgid "Usage: findstr /options string\n" +msgstr "Tilbakestill tilkoblinger" + +#: programs/findstr/findstr.rc:29 +#, fuzzy +#| msgid "Invalid command line.\n" +msgid "FINDSTR: Bad command line\n" +msgstr "Ugyldig kommandolinje.\n" + +#: programs/findstr/findstr.rc:30 +msgid "FINDSTR: Cannot open %s\n" +msgstr "" + +#: programs/findstr/findstr.rc:31 +msgid "FINDSTR: /%c ignored\n" +msgstr "" + #: programs/fsutil/fsutil.mc:28 msgid "" "- Supported Commands -\n" diff --git a/po/nl.po b/po/nl.po index 9e9fc388065..811c6c5d0a3 100644 --- a/po/nl.po +++ b/po/nl.po @@ -14761,6 +14761,26 @@ msgstr "Start" msgid "&Run..." msgstr "&Uitvoeren..." +#: programs/findstr/findstr.rc:28 +#, fuzzy +#| msgid "Use c&onnection string" +msgid "Usage: findstr /options string\n" +msgstr "Ver&bindingsreeks gebruiken" + +#: programs/findstr/findstr.rc:29 +#, fuzzy +#| msgid "Invalid command line.\n" +msgid "FINDSTR: Bad command line\n" +msgstr "Ongeldige opdrachtregel.\n" + +#: programs/findstr/findstr.rc:30 +msgid "FINDSTR: Cannot open %s\n" +msgstr "" + +#: programs/findstr/findstr.rc:31 +msgid "FINDSTR: /%c ignored\n" +msgstr "" + #: programs/fsutil/fsutil.mc:28 msgid "" "- Supported Commands -\n" diff --git a/po/or.po b/po/or.po index 325e5f97606..7368e8fd455 100644 --- a/po/or.po +++ b/po/or.po @@ -14186,6 +14186,22 @@ msgstr "" msgid "&Run..." msgstr "" +#: programs/findstr/findstr.rc:28 +msgid "Usage: findstr /options string\n" +msgstr "" + +#: programs/findstr/findstr.rc:29 +msgid "FINDSTR: Bad command line\n" +msgstr "" + +#: programs/findstr/findstr.rc:30 +msgid "FINDSTR: Cannot open %s\n" +msgstr "" + +#: programs/findstr/findstr.rc:31 +msgid "FINDSTR: /%c ignored\n" +msgstr "" + #: programs/fsutil/fsutil.mc:28 msgid "" "- Supported Commands -\n" diff --git a/po/pa.po b/po/pa.po index 59aca39767b..8b49da4b14c 100644 --- a/po/pa.po +++ b/po/pa.po @@ -14186,6 +14186,22 @@ msgstr "" msgid "&Run..." msgstr "" +#: programs/findstr/findstr.rc:28 +msgid "Usage: findstr /options string\n" +msgstr "" + +#: programs/findstr/findstr.rc:29 +msgid "FINDSTR: Bad command line\n" +msgstr "" + +#: programs/findstr/findstr.rc:30 +msgid "FINDSTR: Cannot open %s\n" +msgstr "" + +#: programs/findstr/findstr.rc:31 +msgid "FINDSTR: /%c ignored\n" +msgstr "" + #: programs/fsutil/fsutil.mc:28 msgid "" "- Supported Commands -\n" diff --git a/po/pl.po b/po/pl.po index 071574c7e5f..c8484cde069 100644 --- a/po/pl.po +++ b/po/pl.po @@ -14848,6 +14848,26 @@ msgstr "Start" msgid "&Run..." msgstr "Urucho&m..." +#: programs/findstr/findstr.rc:28 +#, fuzzy +#| msgid "Use c&onnection string" +msgid "Usage: findstr /options string\n" +msgstr "&Użyj ciągu znaków połączenia" + +#: programs/findstr/findstr.rc:29 +#, fuzzy +#| msgid "Invalid command line.\n" +msgid "FINDSTR: Bad command line\n" +msgstr "Nieprawidłowy wiersz poleceń.\n" + +#: programs/findstr/findstr.rc:30 +msgid "FINDSTR: Cannot open %s\n" +msgstr "" + +#: programs/findstr/findstr.rc:31 +msgid "FINDSTR: /%c ignored\n" +msgstr "" + #: programs/fsutil/fsutil.mc:28 msgid "" "- Supported Commands -\n" diff --git a/po/pt_BR.po b/po/pt_BR.po index 8fdcfeb808f..64936cdb15f 100644 --- a/po/pt_BR.po +++ b/po/pt_BR.po @@ -14900,6 +14900,26 @@ msgstr "Iniciar" msgid "&Run..." msgstr "E&xecutar..." +#: programs/findstr/findstr.rc:28 +#, fuzzy +#| msgid "Use c&onnection string" +msgid "Usage: findstr /options string\n" +msgstr "Usar string de conexão" + +#: programs/findstr/findstr.rc:29 +#, fuzzy +#| msgid "Invalid command line.\n" +msgid "FINDSTR: Bad command line\n" +msgstr "Linha de comando inválida.\n" + +#: programs/findstr/findstr.rc:30 +msgid "FINDSTR: Cannot open %s\n" +msgstr "" + +#: programs/findstr/findstr.rc:31 +msgid "FINDSTR: /%c ignored\n" +msgstr "" + #: programs/fsutil/fsutil.mc:28 msgid "" "- Supported Commands -\n" diff --git a/po/pt_PT.po b/po/pt_PT.po index 43bef658f39..e3e01f2478a 100644 --- a/po/pt_PT.po +++ b/po/pt_PT.po @@ -15675,6 +15675,26 @@ msgstr "Iniciar" msgid "&Run..." msgstr "Exec&utar..." +#: programs/findstr/findstr.rc:28 +#, fuzzy +#| msgid "Reset Connections" +msgid "Usage: findstr /options string\n" +msgstr "Restabelecer ligações" + +#: programs/findstr/findstr.rc:29 +#, fuzzy +#| msgid "Invalid command line.\n" +msgid "FINDSTR: Bad command line\n" +msgstr "Linha de comandos inválida.\n" + +#: programs/findstr/findstr.rc:30 +msgid "FINDSTR: Cannot open %s\n" +msgstr "" + +#: programs/findstr/findstr.rc:31 +msgid "FINDSTR: /%c ignored\n" +msgstr "" + #: programs/fsutil/fsutil.mc:28 msgid "" "- Supported Commands -\n" diff --git a/po/rm.po b/po/rm.po index ae89c0d4435..b6ab69675f0 100644 --- a/po/rm.po +++ b/po/rm.po @@ -14277,6 +14277,22 @@ msgstr "" msgid "&Run..." msgstr "" +#: programs/findstr/findstr.rc:28 +msgid "Usage: findstr /options string\n" +msgstr "" + +#: programs/findstr/findstr.rc:29 +msgid "FINDSTR: Bad command line\n" +msgstr "" + +#: programs/findstr/findstr.rc:30 +msgid "FINDSTR: Cannot open %s\n" +msgstr "" + +#: programs/findstr/findstr.rc:31 +msgid "FINDSTR: /%c ignored\n" +msgstr "" + #: programs/fsutil/fsutil.mc:28 msgid "" "- Supported Commands -\n" diff --git a/po/ro.po b/po/ro.po index 63f6b919634..0a076c868ad 100644 --- a/po/ro.po +++ b/po/ro.po @@ -15752,6 +15752,26 @@ msgstr "Meniu Start" msgid "&Run..." msgstr "E&xecutare..." +#: programs/findstr/findstr.rc:28 +#, fuzzy +#| msgid "Reset Connections" +msgid "Usage: findstr /options string\n" +msgstr "Conexiuni întrerupte" + +#: programs/findstr/findstr.rc:29 +#, fuzzy +#| msgid "Invalid command line.\n" +msgid "FINDSTR: Bad command line\n" +msgstr "Linie de comandă nevalidă.\n" + +#: programs/findstr/findstr.rc:30 +msgid "FINDSTR: Cannot open %s\n" +msgstr "" + +#: programs/findstr/findstr.rc:31 +msgid "FINDSTR: /%c ignored\n" +msgstr "" + #: programs/fsutil/fsutil.mc:28 msgid "" "- Supported Commands -\n" diff --git a/po/ru.po b/po/ru.po index 6f9167767da..984b5c8b7ab 100644 --- a/po/ru.po +++ b/po/ru.po @@ -15131,6 +15131,26 @@ msgstr "Пуск" msgid "&Run..." msgstr "&Запустить..." +#: programs/findstr/findstr.rc:28 +#, fuzzy +#| msgid "Use c&onnection string" +msgid "Usage: findstr /options string\n" +msgstr "Использовать &строку подключения" + +#: programs/findstr/findstr.rc:29 +#, fuzzy +#| msgid "Invalid command line.\n" +msgid "FINDSTR: Bad command line\n" +msgstr "Неверная командная строка.\n" + +#: programs/findstr/findstr.rc:30 +msgid "FINDSTR: Cannot open %s\n" +msgstr "" + +#: programs/findstr/findstr.rc:31 +msgid "FINDSTR: /%c ignored\n" +msgstr "" + #: programs/fsutil/fsutil.mc:28 msgid "" "- Supported Commands -\n" diff --git a/po/si.po b/po/si.po index 2bffc22843f..1168a2fbc3d 100644 --- a/po/si.po +++ b/po/si.po @@ -14796,6 +14796,26 @@ msgstr "ඇරඹුම" msgid "&Run..." msgstr "ධාවනය කරන්න... (&R)" +#: programs/findstr/findstr.rc:28 +#, fuzzy +#| msgid "Connection is being made" +msgid "Usage: findstr /options string\n" +msgstr "සබැඳුම දැන් හදනවා" + +#: programs/findstr/findstr.rc:29 +#, fuzzy +#| msgid "Invalid command line.\n" +msgid "FINDSTR: Bad command line\n" +msgstr "අවලංගු විධාන පේළිය.\n" + +#: programs/findstr/findstr.rc:30 +msgid "FINDSTR: Cannot open %s\n" +msgstr "" + +#: programs/findstr/findstr.rc:31 +msgid "FINDSTR: /%c ignored\n" +msgstr "" + #: programs/fsutil/fsutil.mc:28 msgid "" "- Supported Commands -\n" diff --git a/po/sk.po b/po/sk.po index 3ee83cbaa65..6beec27139a 100644 --- a/po/sk.po +++ b/po/sk.po @@ -15227,6 +15227,24 @@ msgstr "" msgid "&Run..." msgstr "" +#: programs/findstr/findstr.rc:28 +#, fuzzy +#| msgid "Activation" +msgid "Usage: findstr /options string\n" +msgstr "Aktivácia" + +#: programs/findstr/findstr.rc:29 +msgid "FINDSTR: Bad command line\n" +msgstr "" + +#: programs/findstr/findstr.rc:30 +msgid "FINDSTR: Cannot open %s\n" +msgstr "" + +#: programs/findstr/findstr.rc:31 +msgid "FINDSTR: /%c ignored\n" +msgstr "" + #: programs/fsutil/fsutil.mc:28 msgid "" "- Supported Commands -\n" diff --git a/po/sl.po b/po/sl.po index f1fb0d7630f..8f4986d6e66 100644 --- a/po/sl.po +++ b/po/sl.po @@ -15948,6 +15948,26 @@ msgstr "Zagon" msgid "&Run..." msgstr "&Zaženi ..." +#: programs/findstr/findstr.rc:28 +#, fuzzy +#| msgid "LAN Connection" +msgid "Usage: findstr /options string\n" +msgstr "Povezava LAN" + +#: programs/findstr/findstr.rc:29 +#, fuzzy +#| msgid "Invalid command line.\n" +msgid "FINDSTR: Bad command line\n" +msgstr "Neveljavna ukazna vrstica.\n" + +#: programs/findstr/findstr.rc:30 +msgid "FINDSTR: Cannot open %s\n" +msgstr "" + +#: programs/findstr/findstr.rc:31 +msgid "FINDSTR: /%c ignored\n" +msgstr "" + #: programs/fsutil/fsutil.mc:28 msgid "" "- Supported Commands -\n" diff --git a/po/sr_RS@cyrillic.po b/po/sr_RS@cyrillic.po index 24f04868bf6..b4e0269162c 100644 --- a/po/sr_RS@cyrillic.po +++ b/po/sr_RS@cyrillic.po @@ -15268,6 +15268,25 @@ msgstr "„Старт“ мени" msgid "&Run..." msgstr "" +#: programs/findstr/findstr.rc:28 +#, fuzzy +#| msgid "LAN Connection" +msgid "Usage: findstr /options string\n" +msgstr "LAN веза" + +#: programs/findstr/findstr.rc:29 +#, fuzzy +msgid "FINDSTR: Bad command line\n" +msgstr "Неисправна синтакса.\n" + +#: programs/findstr/findstr.rc:30 +msgid "FINDSTR: Cannot open %s\n" +msgstr "" + +#: programs/findstr/findstr.rc:31 +msgid "FINDSTR: /%c ignored\n" +msgstr "" + #: programs/fsutil/fsutil.mc:28 msgid "" "- Supported Commands -\n" diff --git a/po/sr_RS@latin.po b/po/sr_RS@latin.po index 03cf504ff1e..3ad3b7fc181 100644 --- a/po/sr_RS@latin.po +++ b/po/sr_RS@latin.po @@ -15420,6 +15420,25 @@ msgstr "„Start“ meni" msgid "&Run..." msgstr "" +#: programs/findstr/findstr.rc:28 +#, fuzzy +#| msgid "LAN Connection" +msgid "Usage: findstr /options string\n" +msgstr "LAN veza" + +#: programs/findstr/findstr.rc:29 +#, fuzzy +msgid "FINDSTR: Bad command line\n" +msgstr "Neispravna sintaksa.\n" + +#: programs/findstr/findstr.rc:30 +msgid "FINDSTR: Cannot open %s\n" +msgstr "" + +#: programs/findstr/findstr.rc:31 +msgid "FINDSTR: /%c ignored\n" +msgstr "" + #: programs/fsutil/fsutil.mc:28 msgid "" "- Supported Commands -\n" diff --git a/po/sv.po b/po/sv.po index 2b6b98d6ee7..898b4bf6927 100644 --- a/po/sv.po +++ b/po/sv.po @@ -15630,6 +15630,26 @@ msgstr "Start" msgid "&Run..." msgstr "&Kör..." +#: programs/findstr/findstr.rc:28 +#, fuzzy +#| msgid "Reset Connections" +msgid "Usage: findstr /options string\n" +msgstr "Återställda anslutningar" + +#: programs/findstr/findstr.rc:29 +#, fuzzy +#| msgid "Invalid command line.\n" +msgid "FINDSTR: Bad command line\n" +msgstr "Ogiltig kommandorad.\n" + +#: programs/findstr/findstr.rc:30 +msgid "FINDSTR: Cannot open %s\n" +msgstr "" + +#: programs/findstr/findstr.rc:31 +msgid "FINDSTR: /%c ignored\n" +msgstr "" + #: programs/fsutil/fsutil.mc:28 msgid "" "- Supported Commands -\n" diff --git a/po/ta.po b/po/ta.po index 7ff4e75bba0..9be4126733d 100644 --- a/po/ta.po +++ b/po/ta.po @@ -14171,6 +14171,22 @@ msgstr "" msgid "&Run..." msgstr "" +#: programs/findstr/findstr.rc:28 +msgid "Usage: findstr /options string\n" +msgstr "" + +#: programs/findstr/findstr.rc:29 +msgid "FINDSTR: Bad command line\n" +msgstr "" + +#: programs/findstr/findstr.rc:30 +msgid "FINDSTR: Cannot open %s\n" +msgstr "" + +#: programs/findstr/findstr.rc:31 +msgid "FINDSTR: /%c ignored\n" +msgstr "" + #: programs/fsutil/fsutil.mc:28 msgid "" "- Supported Commands -\n" diff --git a/po/te.po b/po/te.po index 6637c77f80b..f39b6a77892 100644 --- a/po/te.po +++ b/po/te.po @@ -14186,6 +14186,22 @@ msgstr "" msgid "&Run..." msgstr "" +#: programs/findstr/findstr.rc:28 +msgid "Usage: findstr /options string\n" +msgstr "" + +#: programs/findstr/findstr.rc:29 +msgid "FINDSTR: Bad command line\n" +msgstr "" + +#: programs/findstr/findstr.rc:30 +msgid "FINDSTR: Cannot open %s\n" +msgstr "" + +#: programs/findstr/findstr.rc:31 +msgid "FINDSTR: /%c ignored\n" +msgstr "" + #: programs/fsutil/fsutil.mc:28 msgid "" "- Supported Commands -\n" diff --git a/po/th.po b/po/th.po index 0bd5781e5b6..42443664527 100644 --- a/po/th.po +++ b/po/th.po @@ -14744,6 +14744,23 @@ msgstr "" msgid "&Run..." msgstr "" +#: programs/findstr/findstr.rc:28 +#, fuzzy +msgid "Usage: findstr /options string\n" +msgstr "รายละเอียด" + +#: programs/findstr/findstr.rc:29 +msgid "FINDSTR: Bad command line\n" +msgstr "" + +#: programs/findstr/findstr.rc:30 +msgid "FINDSTR: Cannot open %s\n" +msgstr "" + +#: programs/findstr/findstr.rc:31 +msgid "FINDSTR: /%c ignored\n" +msgstr "" + #: programs/fsutil/fsutil.mc:28 msgid "" "- Supported Commands -\n" diff --git a/po/tr.po b/po/tr.po index f0090b9e477..c3f1c662aa0 100644 --- a/po/tr.po +++ b/po/tr.po @@ -14722,6 +14722,26 @@ msgstr "Başlangıç" msgid "&Run..." msgstr "&Çalıştır..." +#: programs/findstr/findstr.rc:28 +#, fuzzy +#| msgid "Use c&onnection string" +msgid "Usage: findstr /options string\n" +msgstr "&Bağlantı dizesini kullan" + +#: programs/findstr/findstr.rc:29 +#, fuzzy +#| msgid "Invalid command line.\n" +msgid "FINDSTR: Bad command line\n" +msgstr "Geçersiz komut satırı.\n" + +#: programs/findstr/findstr.rc:30 +msgid "FINDSTR: Cannot open %s\n" +msgstr "" + +#: programs/findstr/findstr.rc:31 +msgid "FINDSTR: /%c ignored\n" +msgstr "" + #: programs/fsutil/fsutil.mc:28 msgid "" "- Supported Commands -\n" diff --git a/po/uk.po b/po/uk.po index 04fe18bb64e..f8180c9dabc 100644 --- a/po/uk.po +++ b/po/uk.po @@ -14994,6 +14994,26 @@ msgstr "Пуск" msgid "&Run..." msgstr "&Запустити..." +#: programs/findstr/findstr.rc:28 +#, fuzzy +#| msgid "Use c&onnection string" +msgid "Usage: findstr /options string\n" +msgstr "Використовувати р&ядок підключення" + +#: programs/findstr/findstr.rc:29 +#, fuzzy +#| msgid "Invalid command line.\n" +msgid "FINDSTR: Bad command line\n" +msgstr "Невірний командний рядок.\n" + +#: programs/findstr/findstr.rc:30 +msgid "FINDSTR: Cannot open %s\n" +msgstr "" + +#: programs/findstr/findstr.rc:31 +msgid "FINDSTR: /%c ignored\n" +msgstr "" + #: programs/fsutil/fsutil.mc:28 msgid "" "- Supported Commands -\n" diff --git a/po/wa.po b/po/wa.po index fd35c5bf626..01db541c276 100644 --- a/po/wa.po +++ b/po/wa.po @@ -14641,6 +14641,24 @@ msgstr "" msgid "&Run..." msgstr "" +#: programs/findstr/findstr.rc:28 +#, fuzzy +#| msgid "Direction" +msgid "Usage: findstr /options string\n" +msgstr "Direccion" + +#: programs/findstr/findstr.rc:29 +msgid "FINDSTR: Bad command line\n" +msgstr "" + +#: programs/findstr/findstr.rc:30 +msgid "FINDSTR: Cannot open %s\n" +msgstr "" + +#: programs/findstr/findstr.rc:31 +msgid "FINDSTR: /%c ignored\n" +msgstr "" + #: programs/fsutil/fsutil.mc:28 msgid "" "- Supported Commands -\n" diff --git a/po/wine.pot b/po/wine.pot index 5ba23a8b291..504e41cb6cd 100644 --- a/po/wine.pot +++ b/po/wine.pot @@ -14100,6 +14100,22 @@ msgstr "" msgid "&Run..." msgstr "" +#: programs/findstr/findstr.rc:28 +msgid "Usage: findstr /options string\n" +msgstr "" + +#: programs/findstr/findstr.rc:29 +msgid "FINDSTR: Bad command line\n" +msgstr "" + +#: programs/findstr/findstr.rc:30 +msgid "FINDSTR: Cannot open %s\n" +msgstr "" + +#: programs/findstr/findstr.rc:31 +msgid "FINDSTR: /%c ignored\n" +msgstr "" + #: programs/fsutil/fsutil.mc:28 msgid "" "- Supported Commands -\n" diff --git a/po/zh_CN.po b/po/zh_CN.po index 131a13988e9..33aaabe99fc 100644 --- a/po/zh_CN.po +++ b/po/zh_CN.po @@ -14498,6 +14498,26 @@ msgstr "起点" msgid "&Run..." msgstr "运行(&R)..." +#: programs/findstr/findstr.rc:28 +#, fuzzy +#| msgid "Use c&onnection string" +msgid "Usage: findstr /options string\n" +msgstr "使用连接字符串(&O)" + +#: programs/findstr/findstr.rc:29 +#, fuzzy +#| msgid "Invalid command line.\n" +msgid "FINDSTR: Bad command line\n" +msgstr "命令行无效。\n" + +#: programs/findstr/findstr.rc:30 +msgid "FINDSTR: Cannot open %s\n" +msgstr "" + +#: programs/findstr/findstr.rc:31 +msgid "FINDSTR: /%c ignored\n" +msgstr "" + #: programs/fsutil/fsutil.mc:28 msgid "" "- Supported Commands -\n" diff --git a/po/zh_TW.po b/po/zh_TW.po index 772d46e00cf..fe2785879eb 100644 --- a/po/zh_TW.po +++ b/po/zh_TW.po @@ -14554,6 +14554,26 @@ msgstr "開始" msgid "&Run..." msgstr "執行(&R)..." +#: programs/findstr/findstr.rc:28 +#, fuzzy +#| msgid "Use c&onnection string" +msgid "Usage: findstr /options string\n" +msgstr "使用連線字串(&O)" + +#: programs/findstr/findstr.rc:29 +#, fuzzy +#| msgid "Invalid command line.\n" +msgid "FINDSTR: Bad command line\n" +msgstr "無效的命令列。\n" + +#: programs/findstr/findstr.rc:30 +msgid "FINDSTR: Cannot open %s\n" +msgstr "" + +#: programs/findstr/findstr.rc:31 +msgid "FINDSTR: /%c ignored\n" +msgstr "" + #: programs/fsutil/fsutil.mc:28 msgid "" "- Supported Commands -\n" diff --git a/programs/findstr/Makefile.in b/programs/findstr/Makefile.in index e97ec9c20e3..d3f8f728854 100644 --- a/programs/findstr/Makefile.in +++ b/programs/findstr/Makefile.in @@ -1,6 +1,9 @@ MODULE = findstr.exe +IMPORTS = user32 EXTRADLLFLAGS = -mconsole -municode C_SRCS = \ main.c + +RC_SRCS = findstr.rc diff --git a/programs/findstr/findstr.h b/programs/findstr/findstr.h new file mode 100644 index 00000000000..bb78fda7f06 --- /dev/null +++ b/programs/findstr/findstr.h @@ -0,0 +1,38 @@ +/* + * Copyright 2023 Zhiyi Zhang for CodeWeavers + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + */ + +#include + +#define MAXSTRING 8192 + +#define STRING_USAGE 101 +#define STRING_BAD_COMMAND_LINE 102 +#define STRING_CANNOT_OPEN 103 +#define STRING_IGNORED 104 + +struct findstr_string +{ + const WCHAR *string; + struct findstr_string *next; +}; + +struct findstr_file +{ + FILE *file; + struct findstr_file *next; +}; diff --git a/programs/findstr/findstr.rc b/programs/findstr/findstr.rc new file mode 100644 index 00000000000..242efe15a41 --- /dev/null +++ b/programs/findstr/findstr.rc @@ -0,0 +1,31 @@ +/* + * Copyright 2023 Zhiyi Zhang for CodeWeavers + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + */ + +#include "findstr.h" + +#pragma makedep po + +LANGUAGE LANG_ENGLISH, SUBLANG_DEFAULT + +STRINGTABLE +{ + STRING_USAGE, "Usage: findstr /options string\n" + STRING_BAD_COMMAND_LINE, "FINDSTR: Bad command line\n" + STRING_CANNOT_OPEN, "FINDSTR: Cannot open %s\n" + STRING_IGNORED, "FINDSTR: /%c ignored\n" +} diff --git a/programs/findstr/main.c b/programs/findstr/main.c index d25e1965f6e..3a6a250f514 100644 --- a/programs/findstr/main.c +++ b/programs/findstr/main.c @@ -1,5 +1,6 @@ /* * Copyright 2012 Qian Hong + * Copyright 2023 Zhiyi Zhang for CodeWeavers * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -16,18 +17,217 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ +#include +#include +#include "findstr.h" #include "wine/debug.h" WINE_DEFAULT_DEBUG_CHANNEL(findstr); +static int WINAPIV findstr_error_wprintf(int msg, ...) +{ + WCHAR msg_buffer[MAXSTRING]; + va_list va_args; + int ret; + + LoadStringW(GetModuleHandleW(NULL), msg, msg_buffer, ARRAY_SIZE(msg_buffer)); + va_start(va_args, msg); + ret = vfwprintf(stderr, msg_buffer, va_args); + va_end(va_args); + return ret; +} + +static int findstr_message(int msg) +{ + WCHAR msg_buffer[MAXSTRING]; + + LoadStringW(GetModuleHandleW(NULL), msg, msg_buffer, ARRAY_SIZE(msg_buffer)); + return wprintf(msg_buffer); +} + +static BOOL add_file(struct findstr_file **head, const WCHAR *path) +{ + struct findstr_file **ptr, *new_file; + + ptr = head; + while (*ptr) + ptr = &((*ptr)->next); + + new_file = calloc(1, sizeof(*new_file)); + if (!new_file) + { + WINE_ERR("Out of memory.\n"); + return FALSE; + } + + if (!path) + { + new_file->file = stdin; + } + else + { + new_file->file = _wfopen(path, L"rt,ccs=unicode"); + if (!new_file->file) + { + findstr_error_wprintf(STRING_CANNOT_OPEN, path); + return FALSE; + } + } + + *ptr = new_file; + return TRUE; +} + +static void add_string(struct findstr_string **head, const WCHAR *string) +{ + struct findstr_string **ptr, *new_string; + + ptr = head; + while (*ptr) + ptr = &((*ptr)->next); + + new_string = calloc(1, sizeof(*new_string)); + if (!new_string) + { + WINE_ERR("Out of memory.\n"); + return; + } + + new_string->string = string; + *ptr = new_string; +} + int __cdecl wmain(int argc, WCHAR *argv[]) { - int i; + struct findstr_string *string_head = NULL, *current_string, *next_string; + struct findstr_file *file_head = NULL, *current_file, *next_file; + WCHAR *string, *ptr, *buffer, line[MAXSTRING]; + BOOL has_string = FALSE, has_file = FALSE; + int ret = 1, i, j; - WINE_FIXME("stub:"); for (i = 0; i < argc; i++) - WINE_FIXME(" %s", wine_dbgstr_w(argv[i])); - WINE_FIXME("\n"); + WINE_TRACE("%s ", wine_dbgstr_w(argv[i])); + WINE_TRACE("\n"); - return 0; + if (argc == 1) + { + findstr_error_wprintf(STRING_BAD_COMMAND_LINE); + return 2; + } + + for (i = 1; i < argc; i++) + { + if (argv[i][0] == '/') + { + if (argv[i][1] == '\0') + { + findstr_error_wprintf(STRING_BAD_COMMAND_LINE); + return 2; + } + + j = 1; + while (argv[i][j] != '\0') + { + switch(argv[i][j]) + { + case '?': + findstr_message(STRING_USAGE); + ret = 0; + goto done; + case 'C': + case 'c': + if (argv[i][j + 1] == ':') + { + ptr = argv[i] + j + 2; + if (*ptr == '"') + ptr++; + + string = ptr; + while (*ptr != '"' && *ptr != '\0' ) + ptr++; + *ptr = '\0'; + j = ptr - argv[i] - 1; + add_string(&string_head, string); + has_string = TRUE; + } + break; + default: + findstr_error_wprintf(STRING_IGNORED, argv[i][j]); + break; + } + + j++; + } + } + else if (!has_string) + { + string = wcstok(argv[i], L" ", &buffer); + if (string) + { + add_string(&string_head, string); + has_string = TRUE; + } + while ((string = wcstok(NULL, L" ", &buffer))) + add_string(&string_head, string); + } + else + { + if (!add_file(&file_head, argv[i])) + goto done; + has_file = TRUE; + } + } + + if (!has_string) + { + findstr_error_wprintf(STRING_BAD_COMMAND_LINE); + ret = 2; + goto done; + } + + if (!has_file) + add_file(&file_head, NULL); + + current_file = file_head; + while (current_file) + { + while (fgetws(line, ARRAY_SIZE(line), current_file->file)) + { + current_string = string_head; + while (current_string) + { + if (wcsstr(line, current_string->string)) + { + wprintf(line); + if (current_file->file == stdin) + wprintf(L"\n"); + ret = 0; + } + + current_string = current_string->next; + } + } + + current_file = current_file->next; + } + +done: + current_file = file_head; + while (current_file) + { + next_file = current_file->next; + if (current_file->file != stdin) + fclose(current_file->file); + free(current_file); + current_file = next_file; + } + + current_string = string_head; + while (current_string) + { + next_string = current_string->next; + free(current_string); + current_string = next_string; + } + return ret; } diff --git a/programs/findstr/tests/Makefile.in b/programs/findstr/tests/Makefile.in new file mode 100644 index 00000000000..b900619c10b --- /dev/null +++ b/programs/findstr/tests/Makefile.in @@ -0,0 +1,4 @@ +TESTDLL = findstr.exe + +C_SRCS = \ + findstr.c diff --git a/programs/findstr/tests/findstr.c b/programs/findstr/tests/findstr.c new file mode 100644 index 00000000000..1f565210e79 --- /dev/null +++ b/programs/findstr/tests/findstr.c @@ -0,0 +1,208 @@ +/* + * Copyright 2023 Zhiyi Zhang for CodeWeavers + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + */ + +#include +#include "wine/test.h" + +#define MAX_BUFFER 65536 + +static char stdout_buffer[MAX_BUFFER], stderr_buffer[MAX_BUFFER]; +static DWORD stdout_size, stderr_size; + +static void read_all_from_handle(HANDLE handle, char *buffer, DWORD *size) +{ + char bytes[4096]; + DWORD bytes_read; + + memset(buffer, 0, MAX_BUFFER); + *size = 0; + for (;;) + { + BOOL success = ReadFile(handle, bytes, sizeof(bytes), &bytes_read, NULL); + if (!success || !bytes_read) + break; + if (*size + bytes_read > MAX_BUFFER) + { + ok(FALSE, "Insufficient buffer.\n"); + break; + } + memcpy(buffer + *size, bytes, bytes_read); + *size += bytes_read; + } +} + +static void write_to_handle(HANDLE handle, const char *str, int len) +{ + DWORD dummy; + + WriteFile(handle, str, len, &dummy, NULL); +} + +#define run_find_stdin(a, b, c) _run_find_stdin(__FILE__, __LINE__, a, b, c) +static void _run_find_stdin(const char *file, int line, const char *commandline, const char *input, + int exitcode_expected) +{ + HANDLE parent_stdin_write, parent_stdout_read, parent_stderr_read; + HANDLE child_stdin_read, child_stdout_write, child_stderr_write; + SECURITY_ATTRIBUTES security_attributes = {0}; + PROCESS_INFORMATION process_info = {0}; + STARTUPINFOA startup_info = {0}; + char cmd[4096]; + DWORD exitcode; + + security_attributes.nLength = sizeof(SECURITY_ATTRIBUTES); + security_attributes.bInheritHandle = TRUE; + + CreatePipe(&child_stdin_read, &parent_stdin_write, &security_attributes, 0); + CreatePipe(&parent_stdout_read, &child_stdout_write, &security_attributes, 0); + CreatePipe(&parent_stderr_read, &child_stderr_write, &security_attributes, 0); + + SetHandleInformation(parent_stdin_write, HANDLE_FLAG_INHERIT, 0); + SetHandleInformation(parent_stdout_read, HANDLE_FLAG_INHERIT, 0); + SetHandleInformation(parent_stderr_read, HANDLE_FLAG_INHERIT, 0); + + startup_info.cb = sizeof(STARTUPINFOA); + startup_info.hStdInput = child_stdin_read; + startup_info.hStdOutput = child_stdout_write; + startup_info.hStdError = child_stderr_write; + startup_info.dwFlags |= STARTF_USESTDHANDLES; + + sprintf(cmd, "findstr.exe %s", commandline); + + CreateProcessA(NULL, cmd, NULL, NULL, TRUE, 0, NULL, NULL, &startup_info, &process_info); + CloseHandle(child_stdin_read); + CloseHandle(child_stdout_write); + CloseHandle(child_stderr_write); + + write_to_handle(parent_stdin_write, input, lstrlenA(input)); + CloseHandle(parent_stdin_write); + + read_all_from_handle(parent_stdout_read, stdout_buffer, &stdout_size); + read_all_from_handle(parent_stderr_read, stderr_buffer, &stderr_size); + CloseHandle(parent_stdout_read); + CloseHandle(parent_stderr_read); + + WaitForSingleObject(process_info.hProcess, INFINITE); + GetExitCodeProcess(process_info.hProcess, &exitcode); + CloseHandle(process_info.hProcess); + CloseHandle(process_info.hThread); + ok_(file, line)(exitcode == exitcode_expected, "Expected exitcode %d, got %ld\n", + exitcode_expected, exitcode); +} + +#define run_find_file(a, b, c) _run_find_file(__FILE__, __LINE__, a, b, c) +static void _run_find_file(const char *file, int line, const char *commandline, const char *input, + int exitcode_expected) +{ + char path_temp_file[MAX_PATH], path_temp_dir[MAX_PATH], commandline_new[MAX_PATH]; + HANDLE handle_file; + + GetTempPathA(ARRAY_SIZE(path_temp_dir), path_temp_dir); + GetTempFileNameA(path_temp_dir, "", 0, path_temp_file); + handle_file = CreateFileA(path_temp_file, GENERIC_WRITE, 0, NULL, CREATE_ALWAYS, 0, NULL); + write_to_handle(handle_file, input, lstrlenA(input)); + CloseHandle(handle_file); + + sprintf(commandline_new, "%s %s", commandline, path_temp_file); + _run_find_stdin(file, line, commandline_new, "", exitcode_expected); + + DeleteFileA(path_temp_file); +} + +static void test_basic(void) +{ + int ret; + + /* No options */ + run_find_stdin("", "", 2); + ok(stdout_size == 0, "Unexpected stdout buffer size %ld.\n", stdout_size); + ok(stderr_size > 0, "Unexpected stderr buffer size %ld.\n", stderr_size); + ret = strcmp(stderr_buffer, "FINDSTR: Bad command line\r\n"); + ok(!ret, "Got the wrong result.\n"); + + /* /? */ + run_find_stdin("/?", "", 0); + ok(stdout_size > 0, "Unexpected stdout buffer size %ld.\n", stdout_size); + ok(stderr_size == 0, "Unexpected stderr buffer size %ld.\n", stderr_size); + + /* find string in stdin */ + run_find_stdin("abc", "abc", 0); + ok(stdout_size > 0, "Unexpected stdout buffer size %ld.\n", stdout_size); + ok(stderr_size == 0, "Unexpected stderr buffer size %ld.\n", stderr_size); + ret = strcmp(stdout_buffer, "abc\r\n"); + ok(!ret, "Got the wrong result.\n"); + + /* find string in stdin fails */ + run_find_stdin("abc", "cba", 1); + ok(stdout_size == 0, "Unexpected stdout buffer size %ld.\n", stdout_size); + ok(stderr_size == 0, "Unexpected stderr buffer size %ld.\n", stderr_size); + + /* find string in file */ + run_find_file("abc", "abc", 0); + ok(stdout_size > 0, "Unexpected stdout buffer size %ld.\n", stdout_size); + ok(stderr_size == 0, "Unexpected stderr buffer size %ld.\n", stderr_size); + ret = strcmp(stdout_buffer, "abc"); + ok(!ret, "Got the wrong result.\n"); + + /* find string in file fails */ + run_find_file("abc", "cba", 1); + ok(stdout_size == 0, "Unexpected stdout buffer size %ld.\n", stdout_size); + ok(stderr_size == 0, "Unexpected stderr buffer size %ld.\n", stderr_size); + + /* find string in stdin with space separator */ + run_find_stdin("\"abc cba\"", "abc", 0); + ok(stdout_size > 0, "Unexpected stdout buffer size %ld.\n", stdout_size); + ok(stderr_size == 0, "Unexpected stderr buffer size %ld.\n", stderr_size); + ret = strcmp(stdout_buffer, "abc\r\n"); + ok(!ret, "Got the wrong result.\n"); + + /* find string in stdin with /C: */ + run_find_stdin("/C:abc", "abc", 0); + ok(stdout_size > 0, "Unexpected stdout buffer size %ld.\n", stdout_size); + ok(stderr_size == 0, "Unexpected stderr buffer size %ld.\n", stderr_size); + ret = strcmp(stdout_buffer, "abc\r\n"); + ok(!ret, "Got the wrong result.\n"); + + /* find string in stdin with /C:"abc" */ + run_find_stdin("/C:\"abc\"", "abc", 0); + ok(stdout_size > 0, "Unexpected stdout buffer size %ld.\n", stdout_size); + ok(stderr_size == 0, "Unexpected stderr buffer size %ld.\n", stderr_size); + ret = strcmp(stdout_buffer, "abc\r\n"); + ok(!ret, "Got the wrong result.\n"); + + /* find string in stdin with /C:"abc cba" fails */ + run_find_stdin("/C:\"abc cba\"", "abc", 1); + ok(stdout_size == 0, "Unexpected stdout buffer size %ld.\n", stdout_size); + ok(stderr_size == 0, "Unexpected stderr buffer size %ld.\n", stderr_size); + + /* find string in stdin with /C: fails */ + run_find_stdin("/C:abc", "cba", 1); + ok(stdout_size == 0, "Unexpected stdout buffer size %ld.\n", stdout_size); + ok(stderr_size == 0, "Unexpected stderr buffer size %ld.\n", stderr_size); +} + +START_TEST(findstr) +{ + if (PRIMARYLANGID(GetUserDefaultUILanguage()) != LANG_ENGLISH) + { + skip("Tests only work with English locale.\n"); + return; + } + + test_basic(); +}