diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index aac7c605..16459ccd 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -36,7 +36,7 @@ jobs: steps: - name: Checkout repository - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Checkout submodules run: | @@ -54,7 +54,9 @@ jobs: run: | c:\msys64\usr\bin\pacman --noconfirm -S base-devel c:\msys64\usr\bin\pacman --noconfirm -S mingw-w64-x86_64-gcc + c:\msys64\usr\bin\pacman --noconfirm -S mingw-w64-x86_64-gettext-tools c:\msys64\usr\bin\pacman --noconfirm -S mingw-w64-i686-gcc + c:\msys64\usr\bin\pacman --noconfirm -S mingw-w64-i686-gettext-tools dir c:\msys64\usr\bin - name: OpenWatcom setup @@ -64,16 +66,23 @@ jobs: version: "2.0" location: "C:\\Watcom" + - name: Windows extra + if: startsWith(matrix.config.name, 'Windows Latest MSVC') || startsWith(matrix.config.name, 'Windows Latest OWC') + run: | + c:\msys64\usr\bin\pacman --noconfirm -S mingw-w64-x86_64-gettext-tools + - name: Generate if: startsWith(matrix.config.name, 'Windows Latest') shell: cmd run: | @if "${{ matrix.config.toolchain }}"=="mingw32" set PATH=c:\msys64\mingw32\bin;%PATH% @if "${{ matrix.config.toolchain }}"=="mingw64" set PATH=c:\msys64\mingw64\bin;%PATH% - @if "${{ matrix.config.toolchain }}"=="owc20" call .\mcwin32\support\owc20setenv.bat C:\Watcom + @if "${{ matrix.config.toolchain }}"=="owc20" call .\mcwin32\support\owc20setenv.bat C:\Watcom + @set BUSYBOX=./support/busybox + @if "${{ matrix.config.toolchain }}"=="mingw64" set BUSYBOX=./support/busybox64 @set PERL=c:/Strawberry/perl/bin/perl cd mcwin32 - c:/Strawberry/perl/bin/perl makelib.pl --perlpath=c:/Strawberry/perl/bin --busybox=./support/busybox --verbose "${{ matrix.config.toolchain }}" + c:/Strawberry/perl/bin/perl makelib.pl --perlpath=c:/Strawberry/perl/bin --busybox=%BUSYBOX% --verbose "${{ matrix.config.toolchain }}" - name: Compile if: startsWith(matrix.config.name, 'Windows Latest') @@ -81,19 +90,21 @@ jobs: run: | @if "${{ matrix.config.toolchain }}"=="mingw32" set PATH=c:\msys64\mingw32\bin;%PATH% @if "${{ matrix.config.toolchain }}"=="mingw64" set PATH=c:\msys64\mingw64\bin;%PATH% - @if "${{ matrix.config.toolchain }}"=="owc20" call .\mcwin32\support\owc20setenv.bat C:\Watcom + @if "${{ matrix.config.toolchain }}"=="owc20" call .\mcwin32\support\owc20setenv.bat C:\Watcom + @if "${{ matrix.config.toolchain }}"=="owc20" set PATH=%PATH%;c:\msys64\mingw64\bin + @if "${{ matrix.config.toolchain }}"=="vc2022" set PATH=%PATH%;c:\msys64\mingw64\bin @set PERL=c:/Strawberry/perl/bin/perl cd mcwin32 .\support\gmake-42 release build - name: Package - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: package-${{ matrix.config.toolchain }} path: mcwin32/bin.${{ matrix.config.toolversion }}/release/* - name: Installer - if: startsWith(matrix.config.name, 'Windows Latest MSVC') + if: startsWith(matrix.config.name, 'Windows Latest MSVC') || startsWith(matrix.config.name, 'Windows Latest OWC') shell: cmd run: | @set PERL=c:/Strawberry/perl/bin/perl @@ -103,9 +114,9 @@ jobs: "%programfiles(x86)%\Inno Setup 5\ISCC" -DBUILD_INFO=1 -DBUILD_TYPE=release ".\releases\mc-inno-setup.iss" - name: Release artifacts - if: startsWith(matrix.config.name, 'Windows Latest MSVC') + if: startsWith(matrix.config.name, 'Windows Latest MSVC') || startsWith(matrix.config.name, 'Windows Latest OWC') uses: softprops/action-gh-release@v1 with: files: ./mcwin32/releases/mcwin32-build*-setup.exe draft: true - + diff --git a/mcsrc/configure.ac b/mcsrc/configure.ac index c1a14604..5cf1f2f7 100644 --- a/mcsrc/configure.ac +++ b/mcsrc/configure.ac @@ -654,8 +654,8 @@ src/vfs/extfs/helpers/uwim src/vfs/extfs/helpers/uzip src/vfs/extfs/helpers/uzoo -src/vfs/fish/Makefile -src/vfs/fish/helpers/Makefile +src/vfs/shell/Makefile +src/vfs/shell/helpers/Makefile src/vfs/ftpfs/Makefile diff --git a/mcsrc/doc/FAQ b/mcsrc/doc/FAQ index 47450f62..72cc2fa7 100644 --- a/mcsrc/doc/FAQ +++ b/mcsrc/doc/FAQ @@ -152,7 +152,7 @@ Frequently Asked Questions You need a POSIX (Unix compatible) operating system. If you are running Windows, use Cygwin. - To compile any edition you need to have glib >= 2.30 installed. + To compile any edition you need to have glib >= 2.32 installed. It's available at https://download.gnome.org/sources/glib/. If you want to use mouse on the Linux console you need the gpm daemon diff --git a/mcsrc/doc/HACKING b/mcsrc/doc/HACKING index 15cc1de6..5957f17a 100644 --- a/mcsrc/doc/HACKING +++ b/mcsrc/doc/HACKING @@ -19,7 +19,7 @@ required: Autoconf 2.64 and above (latest is recommended) Automake 1.12 and above (latest is recommended) Gettext 0.18.2 and above -Glib 2.30 and above +Glib 2.32 and above Full list of requirements you can see at: https://www.midnight-commander.org/wiki/doc/buildAndInstall/req diff --git a/mcsrc/doc/INSTALL b/mcsrc/doc/INSTALL index 3881c523..1e5d1a26 100644 --- a/mcsrc/doc/INSTALL +++ b/mcsrc/doc/INSTALL @@ -15,7 +15,7 @@ Build requirements for GNU Midnight Commander - autoconf >= 2.64 - automake >= 1.12 - libtool -- glib2 >= 2.30 +- glib2 >= 2.32 - slang2 or ncurses - gettext >= 0.18.2 - libssh2 >= 1.2.8 is required only for sftp vfs @@ -171,9 +171,9 @@ VFS options: (on by default) Support for FTP vfs -`--enable-vfs-fish' +`--enable-vfs-shell' (on by default) - Support for FISH vfs + Support for SHELL vfs `--enable-vfs-sftp' (auto) @@ -367,8 +367,8 @@ get glib from ftp://ftp.gnome.org/pub/gnome/sources/glib/ -Minimal version of glib: 2.30.0 -Recommended version: 2.30.x and higher. +Minimal version of glib: 2.32.0 +Recommended version: 2.32.x and higher. Newer versions may work, but haven't been tested. diff --git a/mcsrc/doc/NEWS b/mcsrc/doc/NEWS index bef3cd15..1414d9bf 100644 --- a/mcsrc/doc/NEWS +++ b/mcsrc/doc/NEWS @@ -1,3 +1,36 @@ +Version 4.8.31 + +- Core + + * Minimal version of GLib is 2.32.0. + +- VFS + + * fish: drop support of native FISH server and protocol. Rename VFS to shell (#4232) + * extfs; + * uc1541 extfs: update up to 3.6 version (#4511) + * s3+: port to Python3 (#4324) + * Support for LZO/LZOP compression format (#4509) + +- Misc + + * Skins: add color for non-printable characters in editor (#4433) + +- Fixes + + * FTBFS on FreeBSD with ext2fs attribute support (#4493) + * Broken stickchars (-a) mode (#4498) + * Wrong timestamp after resuming of file copy operation (#4499) + * Editor: wrong deletion of marked column (#3761) + * Diff viewer: segfault when display of line numbers is enabled (#4500) + * Tar VFS: broken handling of hard links (#4494) + * Sftp VFS: failure establishing SSH session due hashed host names in ~/.ssh/known_hosts (#4506) + * Shell VFS: incorrect file names with cyrillic or diacritic symbols (#4507) + * mc.ext.ini: incorrect description of of how multiple sections and keys with same names are processed (#4497) + * mc.ext.ini: unescaped backslash \ is treated as invalid escape sequence in glib-2.77.3 and glib-2.79 (#4502) + * mc.ext.ini: file "Makefile.zip" is handled as Makefile not as zip-arhive (#4419) + + Version 4.8.30 - Core diff --git a/mcsrc/doc/README b/mcsrc/doc/README index 71d69d8c..c2718ae4 100644 --- a/mcsrc/doc/README +++ b/mcsrc/doc/README @@ -128,7 +128,7 @@ These are hints for the text mode edition: * The Virtual File System is a cute addition to the project, you may browse in tar and compressed tar files as well as browsing remote - machines with the fish file system. + machines with the shell file system. * Please read the manual page. diff --git a/mcsrc/doc/TODO b/mcsrc/doc/TODO index e6253fdb..d29eda78 100644 --- a/mcsrc/doc/TODO +++ b/mcsrc/doc/TODO @@ -73,7 +73,7 @@ window title. Better date parser - don't allow seconds and year in ftp listings on the same line. -Report errors in fish operations and recover from them. +Report errors in shell operations and recover from them. Allow colors to be defined in the mc.lib file. Make it possible to avoid using a super-long line to redefine all colors. @@ -82,7 +82,7 @@ Filters in the editor should operate on the open file - don't close and reopen the file. They don't work on VFS now. For example, a gzipped files on FTP cannot be edited. -ftp and fish with home != '/' - readjust directory to the home. +ftp and shell with home != '/' - readjust directory to the home. Make "Find File" dialog more responsive. Keep state in a structure and preserve it when the search is suspended. diff --git a/mcsrc/doc/hints/l10n/mc.hint.be b/mcsrc/doc/hints/l10n/mc.hint.be index d77b2278..ee8dbc2d 100644 --- a/mcsrc/doc/hints/l10n/mc.hint.be +++ b/mcsrc/doc/hints/l10n/mc.hint.be @@ -1,10 +1,10 @@ -Падказка. «C-x t» перапісвае ў загадны радок назвы пазначаных файлаў. +Падказка. «C-x t» перапісвае ў камандны радок назвы пазначаных файлаў. -Падказка. «C-x p» перапісвае у загадны радок дзейны шлях. +Падказка. «C-x p» перапісвае у камандны радок дзейны шлях. Падказка. «M-Tab» ці «Esc+Tab» дапаўняе набранае. Каб убачыць сьпіс, націсьніце двойчы. -Падказка. «M-p» і «M-n» дае доступ да гісторыі загадаў. +Падказка. «M-p» і «M-n» дае доступ да гісторыі каманд. Падказка. Трэба ўставіць знак літаральна? Цісьніце «Control-q» і знак. @@ -36,7 +36,7 @@ Падказка. Хочаце звычайную абалонку? Цісьніце «C-o», а каб вярнуцца — «C-o» яшчэ раз. -Падказка. Каб хутчэй набіраць загады «cd …», вызначце зьменную «CDPATH». +Падказка. Каб хутчэй набіраць каманды «cd …», вызначце зьменную «CDPATH». Падказка. Калі хочаце бачыць схаваныя файлы «.*», вызначце гэта ў «Настаўленьнях». @@ -48,17 +48,17 @@ Намінка. Шукаць файл: кнопка «На панэль» дазваляе працаваць са знойдзеным. -Падказка. Калі патрэбны складаны пошук, ужывайце загад «На вонкавую панэль». +Падказка. Калі патрэбны складаны пошук, ужывайце каманду «На вонкавую панэль». -Падказка. Каб хутка зьмяніць каталёґ, калі набіраеце загад, цісьніце «M-c». +Падказка. Каб хутка зьмяніць каталёґ, калі набіраеце каманду, цісьніце «M-c». -Падказка: загады абалонкі могуць не працаваць на немясцовых файлавых сыстэмах. +Падказка: каманды абалонкі могуць не працаваць на немясцовых файлавых сыстэмах. Падказка. «C-y» вяртае страчаны тэкст. Падказка. Пэўныя клявішы не працуюць? Зірніце «Налады» → «Вывучыць клявішы». -Падказка. Каб пабачыць вывад загаду ў праглядніку, цісьніце «M-!» +Падказка. Каб пабачыць вывад каманды ў праглядніку, цісьніце «M-!» Падказка. «F13» (або «Shift-F3») праглядае файл наўпрост. diff --git a/mcsrc/doc/hints/l10n/mc.hint.ko b/mcsrc/doc/hints/l10n/mc.hint.ko index d4c4c94f..a61af686 100644 --- a/mcsrc/doc/hints/l10n/mc.hint.ko +++ b/mcsrc/doc/hints/l10n/mc.hint.ko @@ -12,7 +12,7 @@ 힌트: 디렉터리 선택: 일치하는 패턴의 끝에 슬래시를 추가합니다. -힌트: 터미널에 기능 키가 없는 경우 ESC+숫자 시퀀스를 사용합니다. +힌트: 터미널에 기능 키가 없으면 ESC+숫자 시퀀스를 사용합니다. 힌트: GNU 미드나잇 커맨더 홈페이지: https://www.midnight-commander.org @@ -22,7 +22,7 @@ 힌트: VFS cool: tar 파일을 입력하여 내용을 검토합니다. -힌트 : 우리는 또한 멋진 매뉴얼 페이지를 가지고 있습니다. +힌트 : 멋진 매뉴얼 페이지도 있습니다. 힌트 : Lynx 스타일 탐색을 원하십니까? 구성 대화 상자에서 설정하십시오. @@ -44,7 +44,7 @@ 힌트: 완성은 모든 대화 상자의 모든 입력 라인에서 작동합니다. M-Tab을 누르면 됩니다. -힌트: 느린 터미널에서 -s 플래그가 도움이 될 수 있습니다. +힌트: 느린 터미널에는 -s 플래그가 도움이 될 수 있습니다. 힌트 : 파일 찾기 : 패널 크기조정 버튼을 사용하여 찾은 파일을 작업할 수 있습니다. diff --git a/mcsrc/doc/man/es/mc.1.in b/mcsrc/doc/man/es/mc.1.in index b2c3db7e..602251e3 100644 --- a/mcsrc/doc/man/es/mc.1.in +++ b/mcsrc/doc/man/es/mc.1.in @@ -3405,8 +3405,8 @@ de error: errdfocus, errdhotnormal, errdhotfocus, errdtitle; los colores de la ayuda: helpnormal, helpitalic, helpbold, helplink, helpslink, helptitle; los colores del visor: viewnormal, viewbold, viewunderline, viewselected; loc colores del editor: editnormal, editbold, editmarked, -editwhitespace, editlinestate; los colores de los menús desplegables: -pmenunormal, pmenusel, pmenutitle. +editwhitespace, editnonprintable, editlinestate; los colores de los menús +desplegables: pmenunormal, pmenusel, pmenutitle. .PP .I header determina el color del encabezado de los paneles, la línea con los diff --git a/mcsrc/doc/man/hu/mc.1.in b/mcsrc/doc/man/hu/mc.1.in index 5f26f622..f668a7c9 100644 --- a/mcsrc/doc/man/hu/mc.1.in +++ b/mcsrc/doc/man/hu/mc.1.in @@ -2869,7 +2869,7 @@ dhotnormal, dhotfocus; Súgó színek: helpnormal, helpitalic, helpbold, helplink, helpslink; Fájlnéző színek: viewunderline; Speciális kijelölés színei: executable, directory, link, stalelink, device, special, core; Viewer colors are: viewnormal, viewbold, viewunderline, viewselected. -Szerkesztő színei: editnormal, editbold, editmarked. +Szerkesztő színei: editnormal, editbold, editmarked, editnonprintable. .PP .I input maghatározza a beviteli sorok színét a dialogus ablakora vonatkozóan. diff --git a/mcsrc/doc/man/it/mc.1.in b/mcsrc/doc/man/it/mc.1.in index 3a458934..4cbf4a47 100644 --- a/mcsrc/doc/man/it/mc.1.in +++ b/mcsrc/doc/man/it/mc.1.in @@ -2881,7 +2881,7 @@ Il colore del visualizzatore è: viewunderline. Colori speciali di evidenziazione: executable, directory, link, device, special, core. I colori dell'viewer sono: viewnormal, viewbold, viewunderline, viewselected. -I colori dell'editor sono: editnormal, editbold, editmarked. +I colori dell'editor sono: editnormal, editbold, editmarked, editnonprintable. .PP .I input determina il colore delle righe di input usate delle finestre di dialogo. diff --git a/mcsrc/doc/man/mc.1.in b/mcsrc/doc/man/mc.1.in index e6aad0e2..aad40fe2 100644 --- a/mcsrc/doc/man/mc.1.in +++ b/mcsrc/doc/man/mc.1.in @@ -3138,7 +3138,7 @@ used to manipulate tar and compressed tar files; the .IR undelfs , used to recover deleted files on ext2 file systems (the default file system for Linux systems), -.I fish +.I shell (for manipulating files over shell connections such as rsh and ssh). If the code was compiled with .I sftpfs @@ -3225,10 +3225,9 @@ Examples: The latter specifies the full path of the tar archive. .\"NODE " FIle transfer over SHell filesystem" .SH " FIle transfer over SHell filesystem" -The fish file system is a network based file system that allows you to +The shell file system is a network based file system that allows you to manipulate the files in a remote machine as if they were local. To use -this, the other side has to either run fish server, or has to have -bash\-compatible shell. +this, the other side has to have bash\-compatible shell. .PP To connect to a remote machine, you just need to chdir into a special directory which name is in the following @@ -3514,8 +3513,8 @@ dhotnormal, dhotfocus, dtitle. Error dialog colors are: errdfocus, errdhotnormal errdhotfocus, errdtitle. Help colors are: helpnormal, helpitalic, helpbold, helplink, helpslink, helptitle. Viewer colors are: viewnormal, viewbold, viewunderline, viewselected. Editor colors are: editnormal, editbold, editmarked, -editwhitespace, editlinestate. Popup menu colors are: pmenunormal, pmenusel, -pmenutitle. +editwhitespace, editnonprintable, editlinestate. Popup menu colors are: pmenunormal, +pmenusel, pmenutitle. .PP .I header determines the color of panel header, the line that contains column titles @@ -4095,7 +4094,7 @@ If this variable is on (default is off) when you browse the file system on a Tree panel, it will automatically reload the other panel with the contents of the selected directory. .TP -.I fish_directory_timeout +.I shell_directory_timeout This variable holds the lifetime of a directory cache entry in seconds. The default value is 900 seconds. .TP diff --git a/mcsrc/doc/man/pl/mc.1.in b/mcsrc/doc/man/pl/mc.1.in index 344c4b26..e7341f5d 100644 --- a/mcsrc/doc/man/pl/mc.1.in +++ b/mcsrc/doc/man/pl/mc.1.in @@ -2542,8 +2542,8 @@ dhotfocus; Kolory pomocy: helpnormal, helpitalic, helpbold, helplink, helpslink; Kolory podglądu: viewunderline; Specjalne tryby podświetlenia: executable, directory, link, device, special. Viewer colors are: viewnormal, viewbold, viewunderline, viewselected. Editor colors are: editnormal, editbold, -editmarked, editwhitespace, editlinestate. Popup menu colors are: pmenunormal, -pmenusel, pmenutitle. +editmarked, editwhitespace, editnonprintable, editlinestate. Popup menu colors +are: pmenunormal, pmenusel, pmenutitle. [nie tłumaczyłem nazw z racji tego, że trzeba je stosować w ich angielskim brzmieniu \- jeśli jesteś aż tak zaawansowany, użyj słownika]. .PP diff --git a/mcsrc/doc/man/ru/mc.1.in b/mcsrc/doc/man/ru/mc.1.in index badde230..d958b777 100644 --- a/mcsrc/doc/man/ru/mc.1.in +++ b/mcsrc/doc/man/ru/mc.1.in @@ -42,7 +42,7 @@ UNIX\-подобных операционных системах. .\"Colors" .TP .I \-\-configure\-options -Выводит опции конфигурирования, с которыми был собран Midnight Commander. +Выводит опции конфигурирования, с которыми был собран Midnight Commander. .TP .I \-d, \-\-nomouse Отключает поддержку мыши. @@ -75,7 +75,7 @@ termcap/terminfo. Этот ключ используется только на комбинаций к действиям. .TP .I \-l файл, \-\-ftplog=файл -Сохранить диалог с ftp\-сервером в файл file. +Сохранить диалог с FTP\-сервером в файл file. .TP .I \-\-nokeymap Не загружать клавиатурные комбинации из файла, использовать определённые @@ -83,7 +83,7 @@ termcap/terminfo. Этот ключ используется только на .TP .I \-P файл, \-\-printwd=файл По окончании работы Midnight Commander запишет последний текущий каталог -в указанный файл. Эту опцию не следует использовать напрямую. Она +в указанный файл. Эту опцию не следует использовать напрямую. Она используется специальной функцией оболочки, которая меняет текущий каталог оболочки на последний каталог, использованный Midnight Commander. @@ -576,8 +576,8 @@ Midnight Commander\-а. Для возврата к вашему приложен .TP .B Alt\-i Сделать текущий каталог активной панели также текущим каталогом -неактивной панели. Если необходимо, перевести неактивную панель в режим -отображения списка файлов. Если активная панель находится в режиме +неактивной панели. Если необходимо, перевести неактивную панель в режим +отображения списка файлов. Если активная панель находится в режиме панелизации, неактивная панель в этот режим не переводится. .TP .B C\-PageUp, C\-PageDown @@ -816,7 +816,7 @@ Commander\-ом (например, символ '+'). программы Midnight Commander. Один из пунктов этого меню служит для сохранения настроек, заданных пользователем. .\"NODE " Left and Right Menus" -.SH "Меню левой и правой (или верхней и нижней) панелей" +.SH " Меню левой и правой (или верхней и нижней) панелей" Вид панелей, в которых отображаются списки файлов и каталогов, может быть изменен через пункты меню .B "Левая" (или "Верхняя") @@ -986,7 +986,7 @@ half name | size:7 | type mode:3 .B Tab в панель просмотра, вы сможете использовать все команды управления просмотром. .\"NODE " Sort Order..." -.SH "Порядок сортировки..." +.SH " Порядок сортировки..." Отображение списка файлов в любой из панелей может производиться в соответствии с одним из восьми порядков сортировки: .nf @@ -1069,7 +1069,7 @@ Escape\-последовательности, генерируемые клав встроенная программа просмотра\&, .\"Internal File Viewer" но, сняв отметку с опции -.I "Встроенный просмотр" +.I "Встроенный просмотр" в пункте "Конфигурация" меню "Настройки", можно вызывать внешнюю программу просмотра, путь к которой должен быть указан в переменной окружения .BR PAGER . @@ -1125,7 +1125,7 @@ F13, встроенная программа просмотра не выпол выставив конфигурационную опцию preallocate_space. О том, как задать шаблон для имен копируемых файлов (обычно это "*" или "^\\(.*\\)$", в зависимости от установки опции -.IR "Образцы в стиле shell" , +.IR "Образцы в стиле shell" , и о допустимых символах замены (wildcards) в строке целевого каталога вы можете узнать, просмотрев раздел .\"LINK2" @@ -1364,8 +1364,8 @@ Midnight Commander за счет добавления в личное меню строку оболочки (перемещение подсветки \- клавишами .BR Up/Down , копирование \- по клавише -.BR Enter ) - Доступ к истории команд можно получить также по комбинациям клавиш +.BR Enter ). +Доступ к истории команд можно получить также по комбинациям клавиш .B Alt\-p или .BR Alt\-n , @@ -1388,7 +1388,7 @@ Midnight Commander за счет добавления в личное меню отображает список виртуальных файловых систем, активных на настоящий момент. Можно перейти на выбранную виртуальную файловую систему. Для Обновления списка выберите кнопку -.B [Освежить] +.B [Освежить] в диалоговом окне. Кнопка .B [Освободить ВФС сейчас] @@ -1853,7 +1853,7 @@ L List the contents of a compressed tar\-archive меню, а другое \- для выполнения, надо предпослать пункту меню две строки условий, одну \- начинающуюся с '+', и другую \- начинающуюся с '='. .\"NODE " Options Menu" -.SH "Меню 'Настройки'" +.SH " Меню 'Настройки'" Программа Midnight Commander имеет ряд установок (опций), каждая из которых может быть включена или выключена, для чего служат несколько диалоговых окон, доступных через меню "Настройки". Опция включена, если @@ -1977,7 +1977,7 @@ mc на экране. и если за это время ни одна клавиша не нажата, то Esc интерпретируется как команда "Отмена" (Esc Esc). .PP -.IR Интервал . +.IR "Интервал" . Эта опция используется для задания временного интервала (в микросекундах) для использования однократного нажатия на клавишу Esc. По умолчанию этот интервал равен 1 секунде (1000000 микросекунд). Кроме того, этот интервал @@ -1985,13 +1985,13 @@ mc на экране. (также в микросекундах), которая имеет приоритет над над значением этой опции. .PP -.B Пауза после исполнения +.B "Пауза после исполнения" .PP После выполнения вашей команды Midnight Commander может обеспечить паузу, чтобы вы могли просмотреть и изучить вывод команды. Есть три варианта установки этой опции: .PP -.IR Никогда . +.IR "Никогда" . Это значит, что вы не хотите видеть вывод команды. На консоли Linux или FreeBSD или при использовании xterm вы можете просмотреть этот вывод, нажав C\-o. @@ -2001,10 +2001,10 @@ FreeBSD или при использовании xterm вы можете про показ вывода последней из выполнявшихся команд (это любые терминалы, отличные от xterm или консоли Linux). .PP -.IR Всегда . +.IR "Всегда" . Программа обеспечит паузу после выполнения любой команды. .PP -.B Прочие настройки +.B "Прочие настройки" .PP .IR "Встроенный редактор" . Если эта опция включена, то для редактирования файлов вызывается @@ -2400,7 +2400,7 @@ Commander, выделены цветом, определённым ключев С целью ускорения доступа к файлам Midnight Commander сохраняет в оперативной памяти информацию, относящуюся к некоторым виртуальным файловым системам (например, списки файлов в каталогах удалённых -ftp\-серверов). +FTP\-серверов). .PP Кроме того, для получения доступа к содержимому сжатых архивов (например, сжатых tar\-файлов) Midnight Commander создаёт временные файлы @@ -2411,7 +2411,7 @@ ftp\-серверов). чтобы уменьшить эти расходы или повысить скорость доступа к часто используемым файловым системам. .PP -Файловая система архиватора tar очень разумно организует работу с +Файловая система архиватора TAR очень разумно организует работу с архивными файлами: она сохраняет на диске структуру каталогов архива и, когда возникает необходимость обращения к информации из tar\-файла, использует этот список для извлечения нужного файла. @@ -2419,7 +2419,7 @@ ftp\-серверов). В общем случае tar\-файлы обычно хранятся в сжатом виде (простые tar\-файлы \- вымирающее явление), и в силу природы таких файлов (структура подкаталогов для tar\-файлов недоступна для мгновенной -загрузки/отображения), файловая система tar должна разархивировать файлы +загрузки/отображения), файловая система TAR должна разархивировать файлы на диск во временный каталог и затем представить обращение к разархивированным файлам как обращение к tar\-файлу. .PP @@ -2432,16 +2432,16 @@ tar\-архивов, стало самой обычной ситуацией к освобождены. По умолчанию величина этого интервала устанавливается равной 1 минуте. Смотрите также .\"LINK2" -Файловая система tar\&. -.\"Tar File System" +Файловая система TAR\&. +.\"TAR File System" .PP Файловая система FTP сохраняет список каталогов, полученный с FTP\-сервера, в памяти (в кеше). Время, в течение которого этот список хранится в кеше, задаётся опцией .I Тайм\-аут кеша каталога FTP. Слишком маленькое значение этого параметра будет замедлять все операции -с файловой системой ftp, потому что каждое обращение к ней будет -означать реальное обращение к удалённому ftp\-серверу. +с файловой системой FTP, потому что каждое обращение к ней будет +означать реальное обращение к удалённому FTP\-серверу. .PP Кроме того, в том же диалоговом окне можно задать имя прокси\-сервера (proxy host), который будет использоваться для перекачки файлов по ftp и @@ -2450,7 +2450,7 @@ FTP\-сервера, в памяти (в кеше). Время, в течени .PP .I Пароль анонимного FTP: \- пароль, используемый когда вы регистрируетесь как анонимный пользователь -"anonymous". Для некоторых сайтов требуется полноценный электронный адрес, +"anonymous". Для некоторых сайтов требуется полноценный электронный адрес, с другой стороны, вероятно, вы не захотите указывать свой настоящий электронный адрес для сайтов, которым не доверяете, особенно если не используется фильтрация нежелательной корреспонденции. @@ -2476,7 +2476,7 @@ FTP\-сервера, в памяти (в кеше). Время, в течени Этот файл располагается в каталоге, путь к которому можно определить, запустив команду .BR "mc \-f" . -(это можно сделать даже из командной строки MC). Если и этого файла не +(это можно сделать даже из командной строки MC). Если и этого файла не существует, .I MC использует установки по умолчанию. @@ -2524,7 +2524,7 @@ FTP\-сервера, в памяти (в кеше). Время, в течени .\"LINK2" файле расширений\&. .\"Edit Extension File" -Если в файле расширений найдется подраздел, задающий процедуры обработки +Если в файле расширений найдётся подраздел, задающий процедуры обработки файлов с данным расширением, то обработка файла производится в соответствии с заданными в этом подразделе командами. Перед обработкой выполняются простые @@ -3152,7 +3152,7 @@ chattr \- команде изменения атрибутов файлов и .\"NODE "Diff Viewer" .SH "Встроенная программа сравнения файлов" mcdiff \- это встроенное средство для сравнения файлов, позволяющее сравнить два файла. -Также оно позволяет редактировать их (после завершения редактирования произойдет +Также оно позволяет редактировать их (после завершения редактирования произойдёт обновление различий). Можно просматривать файлы, находящиеся под контролем различных систем управления версиями, такими как GIT, Subversion и другие. .PP @@ -3463,21 +3463,17 @@ ASCII и шестнадцатеричный (hex). Для переключени в вашем домашнем каталоге. .PP Встроенный редактор обрабатывает символы из второй половины кодовой -таблицы (160+). Но когда редактируете бинарные файлы, лучше установить +таблицы (160+). Но при редактировании бинарных файлов лучше установить опцию .B "Биты символов" -из меню "Настройки" в положение "7 бит", чтобы сохранить формат файла -(to keep the spacing clean). +из меню "Настройки" в положение "7 бит", чтобы сохранить формат файла. .PP Описать все функции встроенного редактора в данной подсказке невозможно. Запомните только, что все основные операции можно выполнить через пункты меню, которое вызывается нажатием клавиши .B F9 -в окне редактирования. Кроме того, можно прочитать man\-страницу по -команде -.B man mcedit -или -.B info mcedit +в окне редактирования. Кроме того, можно прочитать man\-страницу по команде +.B man mcedit . .\"NODE "Internal File Editor / options" .SH "Опции в ini\-файле для редактора" @@ -3588,7 +3584,7 @@ tar\-файлов; файлов в файловой системе ext2 (файловая система, используемая в Linux по умолчанию); .br -\- файловой системы fish (для манипулирования файлами при работе с +\- файловой системы shell (для манипулирования файлами при работе с оболочкой через такие программы как rsh и ssh); .br \- и, наконец, сетевой файловой системы nfs. @@ -3599,15 +3595,15 @@ tar\-файлов; файловых систем описаны в отдельных разделах по каждой ВФС: .IP .\"LINK2" -Файловая система ftpfs +Файловая система FTP .\"FTP File System" .br .\"LINK2" -Файловая система tar -.\"Tar File System" +Файловая система TAR +.\"TAR File System" .br .\"LINK2" -Файловая система FISH (FIle transfer over SHell) +Файловая система SHELL (FIle transfer over SHell) .\"FIle transfer over SHell filesystem" .br .\"LINK2" @@ -3617,9 +3613,9 @@ tar\-файлов; .\"LINK2" Файловая система UFS (Undelete File System) .\"Undelete File System" -.\"NODE "FTP File System" -.SH "Файловая система ftpfs" -Файловая система ftpfs позволяет работать с файлами на удалённых +.\"NODE " FTP File System" +.SH " Файловая система FTP" +Файловая система FTP позволяет работать с файлами на удалённых компьютерах. Для этого можно использовать команду "FTP\-соединение" (доступную из меню левой и правой панелей) или же непосредственно сменить текущий каталог командой cd, задав путь к каталогу следующим @@ -3663,7 +3659,7 @@ anonymous или имя из файла ~/.netrc. Необязательный .PP Чтобы не задавать имя прокси\-сервера каждый раз, можно поставить отметку в квадратных скобках возле опции -.I Всегда использовать FTP прокси +.I Всегда использовать FTP\-прокси в диалоговом окне .\"LINK2" Виртуальные ФС... @@ -3678,7 +3674,7 @@ anonymous или имя из файла ~/.netrc. Необязательный .B mc.no_proxy без точки, то производит прямое обращение к данной машине. .PP -При подключении к ftp\-серверу через фильтрующий пакеты маршрутизатор, +При подключении к FTP\-серверу через фильтрующий пакеты маршрутизатор, который не позволяет использовать обычный режим открытия файлов, можно заставить программу работать в режиме пассивного открытия файла. Для этого установите в конфигурационном файле параметр @@ -3699,9 +3695,9 @@ Midnight Commander сохраняет в течение заданного ин Это не является недоработкой (если вы думаете, что это ошибка, поразмыслите над тем, как происходит работа по FTP с файлами, находящимися на другой стороне Атлантического океана). -.\"NODE " Tar File System" -.SH "Файловая система tar" -Файловая система tar обеспечивает доступ по чтению к tar\- и сжатым +.\"NODE " TAR File System" +.SH " Файловая система TAR" +Файловая система TAR обеспечивает доступ по чтению к tar\- и сжатым tar\-файлам, используя команду chdir. Для перехода в каталог, представляющий список файлов tar\-файла, нужно использовать команду, имеющую следующий формат: @@ -3710,7 +3706,7 @@ tar\-файлам, используя команду chdir. Для перехо .PP Файл mc.ext.ini по умолчанию содержит команды для просмотра tar\-файлов, то есть обычно для получения списка файлов tar\-архива -достаточно просто переместить указатель на имя tar\-файла и нажать +достаточно просто переместить указатель на имя tar\-файла и нажать .BR Enter . Чтобы понять, как это достигается, смотрите раздел .\"LINK2" @@ -3726,12 +3722,11 @@ tar\-файлов, то есть обычно для получения спис .PP В последнем примере указан полный путь к tar\-архиву. .\"NODE " FIle transfer over SHell filesystem" -.SH " Файловая система FISH (FIle transfer over SHell)" -Файловая система fish \- это сетевая файловая система, которая позволяет +.SH " Файловая система SHELL (FIle transfer over SHell)" +Файловая система shell \- это сетевая файловая система, которая позволяет работать с файлами на удалённом компьютере так, как если бы они были расположены на вашем диске. Для того чтобы это было возможно, на -удалённом компьютере должен быть запущен fish\-сервер, или -bash\-совместимая оболочка shell. +удалённом компьютере должна быть запущена bash\-совместимая оболочка shell. .PP Для соединения с удалённым компьютером нужно выполнить команду перехода в каталог (chdir), имя которого задаётся в следующем формате: @@ -3775,7 +3770,7 @@ bash\-совместимая оболочка shell. Файловая система SFTP \- это сетевая файловая система, которая позволяет работать с файлами на удалённом компьютере так, как если бы они были расположены на вашем диске. Для того чтобы это было возможно, на -удалённом компьютере должен быть запущен sftp\-сервер. +удалённом компьютере должен быть запущен SFTP\-сервер. .PP Для соединения с удалённым компьютером нужно выполнить команду перехода в каталог (chdir), имя которого задаётся в следующем формате: @@ -3831,7 +3826,7 @@ ext2fs, позволяющий восстановить имена всех уд .PP Для того чтобы воспользоваться этой возможностью (этой файловой системой), нужно выполнить команду перехода (chdir) в специальный -каталог, имя которого образуется из префикса "undel://" и имени +каталог, имя которого образуется из префикса "undel://" и имени специального файла устройства, на котором находится реальная файловая система. .PP @@ -3858,7 +3853,7 @@ SCSI\-диска, нужно использовать следующее имя: 1. Автономные файловые системы, которые не ассоциированы ни с одним из типов файлов.они представляют некоторые системные данные как дерево каталогов Вы можете их вызвать набрав \fIcd fsname://\fR", где fsname \- это короткое -имя extfs (см. ниже). Примеры этих ВФС включают audio (список всех звуковых +имя extfs (см. ниже). Примеры этих ВФС включают audio (список всех звуковых дорожек на CD) или apt (список всех установленных в системе пакетов Debian). .PP Например, для получения списка звуковых дорожек на CD наберите: @@ -3868,7 +3863,7 @@ SCSI\-диска, нужно использовать следующее имя: .fi .PP 2. "Архивные" файловые системы (такие как rpm, patchfs и прочие) представляют -содержимое файла как дерево каталогов. Они могут состоять из "реальных" файлов, +содержимое файла как дерево каталогов. Они могут состоять из "реальных" файлов, находящихся в сжатом виде в архивах (urar, rpm) или из виртуальных файлов, например, сообщений в файле mailbox (mailfs) или части diff\-файла (patchfs). Для доступа к этим ВФС суффикс @@ -4020,7 +4015,8 @@ bbarhotkey, bbarbutton. Цвета в диалоге\-сообщении об ошибке: errdfocus, errdhotnormal, errdhotfocus, errdtitle. Цвета в окне встроенной помощи: helpnormal, helpitalic, helpbold, helplink, helpslink. Цвета в окне программы просмотра: viewnormal, viewbold, viewunderline, viewselected. -Цвета в редакторе: editnormal, editbold, editmarked, editwhitespace, editlinestate. +Цвета в редакторе: editnormal, editbold, editmarked, editwhitespace, editnonprintable, +editlinestate. Цвета окна всплывающего меню: pmenunormal, pmenusel, pmenutitle. .PP Цвета задавать не обязательно. Цвет какого именно поля определяется @@ -4471,7 +4467,7 @@ menuhotsel=yellow;black;bold+underline Названия групп должны совпадать с названиями параметров в секции [filehighlight] в текущем скин\-файле. .PP -Ключи в группах могут принимать следующие значения: +Ключи в группах могут принимать следующие значения: .TP .I type Тип файла. Если параметр присутствует, остальные опции игнорируются @@ -4533,7 +4529,7 @@ menuhotsel=yellow;black;bold+underline .IP Этот параметр задаёт интервал времени (в секундах), по истечении которого Midnight Commander будет предпринимать повторную попытку -соединиться с ftp\-сервером после того, как предыдущая попытка окончилась +соединиться с FTP\-сервером после того, как предыдущая попытка окончилась неудачей. Если задано нулевое значение, программа не будет повторять попытку соединиться. .PP @@ -4543,7 +4539,7 @@ menuhotsel=yellow;black;bold+underline протоколу FTP в тех случаях, когда компьютер пользователя располагается за маршрутизатором, фильтрующим пакеты (behind a filtering packet router). Эта опция работает только в том случае, если вы не используете -прокси (you are not using an ftp proxy). +FTP\-прокси. .PP .I max_dirt_limit .IP @@ -4594,7 +4590,7 @@ subshell. Если она установлена, то при нажатии Установка этой опции слегка изменяет реакцию программы на нажатие клавиш .B Home и -.B End +.B End в активной панели. Вместо того, чтобы перемещать подсветку (курсор) к первому или последнему из имен файлов, отображенных на панели, нажатие этих клавиш будет вызывать следующую реакцию: @@ -4664,7 +4660,7 @@ autodetect_codeset=russian .\"NODE "Parameters for external editor or viewer" .SH "Параметры для внешних редакторов и программ просмотра" Midnight Commander позволяет задать некоторые параметрыы для внешних редакторов -и программ просмотра. Они задаются в секции "[External editor or viewer parameters]", +и программ просмотра. Они задаются в секции [External editor or viewer parameters], которая сначала ищется в системном (mc.lib), а затем в пользовательском (~/.config/mc/ini) файле инициализации. Имя параметра должно совпадать с именем внешнего редактора или программы просмотра. Значение параметра может содержать следующие переменные: @@ -4789,9 +4785,9 @@ insert=\\e[Op .PP .I %pkgdatadir%/mc.lib .IP -Глобальные установки для Midnight Commander. Установки из этого файла +Глобальные установки для Midnight Commander. Установки из этого файла действительны для всех пользователей, независимо от того, имеют ли они -~/.config/mc/ini или нет. В настоящий момент только +~/.config/mc/ini или нет. В настоящий момент только .\"LINK2" настройки терминалов .\"Terminal databases" @@ -4851,7 +4847,7 @@ insert=\\e[Op .SH Лицензия Эта программа распространяется в надежде, что она будет полезной, но БЕЗ КАКИХ\-ЛИБО ГАРАНТИЙ; даже без подразумеваемых гарантий КОММЕРЧЕСКОЙ -ЦЕННОСТИ или ПРИГОДНОСТИ ДЛЯ КОНКРЕТНОЙ ЦЕЛИ. Для получения подробных +ЦЕННОСТИ или ПРИГОДНОСТИ ДЛЯ КОНКРЕТНОЙ ЦЕЛИ. Для получения подробных сведений смотрите Универсальную Общественную Лицензию GNU. .\"NODE "AVAILABILITY" .SH "Обновление версий" @@ -4868,7 +4864,7 @@ zsh(1), mcedit(1). .fi .PP Данная страница оперативного руководства содержит информацию, актуальную -для версии 4.6.0 (январь 2003 года). Если вы используете более свежую +для версии 4.6.0 (январь 2003 года). Если вы используете более свежую версию программы, оригинальная страница на английском языке может содержать более полную и актуальную информацию. Для просмотра оригинальной страницы в оболочке bash можно использовать команду diff --git a/mcsrc/doc/man/sr/mc.1.in b/mcsrc/doc/man/sr/mc.1.in index dd04dec1..a7484cf1 100644 --- a/mcsrc/doc/man/sr/mc.1.in +++ b/mcsrc/doc/man/sr/mc.1.in @@ -2865,7 +2865,7 @@ dnormal, dfocus, dhotnormal, dhotfocus. Боје помоћи су: helpnormal, helpbold, helplink, helpslink. Боја прегледача је: viewunderline. Посебне боје за истицање су: executable, directory, link, stalelink, device, special, core. Viewer colors are: viewnormal, viewbold, viewunderline, -viewselected. Боје уређивача су: editnormal, editbold, editmarked. +viewselected. Боје уређивача су: editnormal, editbold, editmarked, editnonprintable. .PP .I input одређује боју редова за унос који се користе у дијалозима упита. diff --git a/mcsrc/lib/charsets.c b/mcsrc/lib/charsets.c index 99f62ce4..d8641d50 100644 --- a/mcsrc/lib/charsets.c +++ b/mcsrc/lib/charsets.c @@ -1,7 +1,7 @@ /* Text conversion from one charset to another. - Copyright (C) 2001-2023 + Copyright (C) 2001-2024 Free Software Foundation, Inc. Written by: @@ -136,6 +136,7 @@ load_codepages_list_from_file (GPtrArray ** list, const char *fname) if (*list == NULL) { *list = g_ptr_array_sized_new (16); + g_ptr_array_set_free_func (*list, free_codepage_desc); g_ptr_array_add (*list, new_codepage_desc (id, p)); } else diff --git a/mcsrc/lib/event/event.c b/mcsrc/lib/event/event.c index 10df96dd..1c782f80 100644 --- a/mcsrc/lib/event/event.c +++ b/mcsrc/lib/event/event.c @@ -2,7 +2,7 @@ Handle events in application. Interface functions: init/deinit; start/stop - Copyright (C) 2011-2023 + Copyright (C) 2011-2024 Free Software Foundation, Inc. Written by: diff --git a/mcsrc/lib/event/manage.c b/mcsrc/lib/event/manage.c index b8f97338..4657af58 100644 --- a/mcsrc/lib/event/manage.c +++ b/mcsrc/lib/event/manage.c @@ -2,7 +2,7 @@ Handle any events in application. Manage events: add, delete, destroy, search - Copyright (C) 2011-2023 + Copyright (C) 2011-2024 Free Software Foundation, Inc. Written by: diff --git a/mcsrc/lib/event/raise.c b/mcsrc/lib/event/raise.c index 37cad468..8806b02f 100644 --- a/mcsrc/lib/event/raise.c +++ b/mcsrc/lib/event/raise.c @@ -2,7 +2,7 @@ Handle any events in application. Raise events. - Copyright (C) 2011-2023 + Copyright (C) 2011-2024 Free Software Foundation, Inc. Written by: diff --git a/mcsrc/lib/filehighlight/common.c b/mcsrc/lib/filehighlight/common.c index d5197446..71994aa8 100644 --- a/mcsrc/lib/filehighlight/common.c +++ b/mcsrc/lib/filehighlight/common.c @@ -2,7 +2,7 @@ File highlight plugin. Interface functions - Copyright (C) 2009-2023 + Copyright (C) 2009-2024 Free Software Foundation, Inc. Written by: diff --git a/mcsrc/lib/filehighlight/get-color.c b/mcsrc/lib/filehighlight/get-color.c index cdca7e4e..41224083 100644 --- a/mcsrc/lib/filehighlight/get-color.c +++ b/mcsrc/lib/filehighlight/get-color.c @@ -2,7 +2,7 @@ File highlight plugin. Interface functions. get color pair index for highlighted file. - Copyright (C) 2009-2023 + Copyright (C) 2009-2024 Free Software Foundation, Inc. Written by: diff --git a/mcsrc/lib/filehighlight/ini-file-read.c b/mcsrc/lib/filehighlight/ini-file-read.c index 596663d8..7f6b87d2 100644 --- a/mcsrc/lib/filehighlight/ini-file-read.c +++ b/mcsrc/lib/filehighlight/ini-file-read.c @@ -2,7 +2,7 @@ File highlight plugin. Reading and parse rules from ini-files - Copyright (C) 2009-2023 + Copyright (C) 2009-2024 Free Software Foundation, Inc. Written by: diff --git a/mcsrc/lib/fileloc.h b/mcsrc/lib/fileloc.h index ebcfe9d1..a075d030 100644 --- a/mcsrc/lib/fileloc.h +++ b/mcsrc/lib/fileloc.h @@ -30,23 +30,23 @@ #define CHARSETS_LIST "mc.charsets" #define MC_MACRO_FILE "mc.macros" -#define FISH_PREFIX "fish" - -#define FISH_LS_FILE "ls" -#define FISH_EXISTS_FILE "fexists" -#define FISH_MKDIR_FILE "mkdir" -#define FISH_UNLINK_FILE "unlink" -#define FISH_CHOWN_FILE "chown" -#define FISH_CHMOD_FILE "chmod" -#define FISH_UTIME_FILE "utime" -#define FISH_RMDIR_FILE "rmdir" -#define FISH_LN_FILE "ln" -#define FISH_MV_FILE "mv" -#define FISH_HARDLINK_FILE "hardlink" -#define FISH_GET_FILE "get" -#define FISH_SEND_FILE "send" -#define FISH_APPEND_FILE "append" -#define FISH_INFO_FILE "info" +#define VFS_SHELL_PREFIX "shell" + +#define VFS_SHELL_LS_FILE "ls" +#define VFS_SHELL_EXISTS_FILE "fexists" +#define VFS_SHELL_MKDIR_FILE "mkdir" +#define VFS_SHELL_UNLINK_FILE "unlink" +#define VFS_SHELL_CHOWN_FILE "chown" +#define VFS_SHELL_CHMOD_FILE "chmod" +#define VFS_SHELL_UTIME_FILE "utime" +#define VFS_SHELL_RMDIR_FILE "rmdir" +#define VFS_SHELL_LN_FILE "ln" +#define VFS_SHELL_MV_FILE "mv" +#define VFS_SHELL_HARDLINK_FILE "hardlink" +#define VFS_SHELL_GET_FILE "get" +#define VFS_SHELL_SEND_FILE "send" +#define VFS_SHELL_APPEND_FILE "append" +#define VFS_SHELL_INFO_FILE "info" #define MC_EXTFS_DIR "extfs.d" diff --git a/mcsrc/lib/glibcompat.c b/mcsrc/lib/glibcompat.c index 0522c0fe..0d58e493 100644 --- a/mcsrc/lib/glibcompat.c +++ b/mcsrc/lib/glibcompat.c @@ -1,7 +1,7 @@ /* GLIB - Library of useful routines for C programming - Copyright (C) 2009-2023 + Copyright (C) 2009-2024 Free Software Foundation, Inc. Written by: @@ -111,29 +111,8 @@ g_clear_list (GList ** list_ptr, GDestroyNotify destroy) } } -/* --------------------------------------------------------------------------------------------- */ - #endif /* ! GLIB_CHECK_VERSION (2, 63, 3) */ -#if ! GLIB_CHECK_VERSION (2, 32, 0) -/** - * g_queue_free_full: - * @queue: a pointer to a #GQueue - * @free_func: the function to be called to free each element's data - * - * Convenience method, which frees all the memory used by a #GQueue, - * and calls the specified destroy function on every element's data. - * - * Since: 2.32 - */ -void -g_queue_free_full (GQueue * queue, GDestroyNotify free_func) -{ - g_queue_foreach (queue, (GFunc) free_func, NULL); - g_queue_free (queue); -} -#endif /* ! GLIB_CHECK_VERSION (2, 32, 0) */ - /* --------------------------------------------------------------------------------------------- */ #if ! GLIB_CHECK_VERSION (2, 60, 0) @@ -161,6 +140,41 @@ g_queue_clear_full (GQueue * queue, GDestroyNotify free_func) /* --------------------------------------------------------------------------------------------- */ +#if ! GLIB_CHECK_VERSION (2, 77, 0) +/** + * g_string_new_take: + * @init: (nullable): initial text used as the string. + * Ownership of the string is transferred to the #GString. + * Passing NULL creates an empty string. + * + * Creates a new #GString, initialized with the given string. + * + * After this call, @init belongs to the #GString and may no longer be + * modified by the caller. The memory of @data has to be dynamically + * allocated and will eventually be freed with g_free(). + * + * Returns: the new #GString + */ +GString * +g_string_new_take (char *init) +{ + GString *string; + + if (init == NULL) + return g_string_new (NULL); + + string = g_slice_new (GString); + + string->str = init; + string->len = strlen (string->str); + string->allocated_len = string->len + 1; + + return string; +} +#endif /* ! GLIB_CHECK_VERSION (2, 77, 0) */ + +/* --------------------------------------------------------------------------------------------- */ + /** * mc_g_string_copy: * @dest: (not nullable): the destination #GString. Its current contents are destroyed diff --git a/mcsrc/lib/glibcompat.h b/mcsrc/lib/glibcompat.h index cb409662..4f0b4d63 100644 --- a/mcsrc/lib/glibcompat.h +++ b/mcsrc/lib/glibcompat.h @@ -21,14 +21,14 @@ void g_clear_slist (GSList ** slist_ptr, GDestroyNotify destroy); void g_clear_list (GList ** list_ptr, GDestroyNotify destroy); #endif /* ! GLIB_CHECK_VERSION (2, 63, 3) */ -#if ! GLIB_CHECK_VERSION (2, 32, 0) -void g_queue_free_full (GQueue * queue, GDestroyNotify free_func); -#endif /* ! GLIB_CHECK_VERSION (2, 32, 0) */ - #if ! GLIB_CHECK_VERSION (2, 60, 0) void g_queue_clear_full (GQueue * queue, GDestroyNotify free_func); #endif /* ! GLIB_CHECK_VERSION (2, 60, 0) */ +#if ! GLIB_CHECK_VERSION (2, 77, 0) +GString *g_string_new_take (char *init); +#endif /* ! GLIB_CHECK_VERSION (2, 77, 0) */ + /* There is no such API in GLib2 */ GString *mc_g_string_copy (GString * dest, const GString * src); diff --git a/mcsrc/lib/global.c b/mcsrc/lib/global.c index 0b1639d5..40efcf9d 100644 --- a/mcsrc/lib/global.c +++ b/mcsrc/lib/global.c @@ -1,7 +1,7 @@ /* Global structure for some library-related variables - Copyright (C) 2009-2023 + Copyright (C) 2009-2024 Free Software Foundation, Inc. Written by: diff --git a/mcsrc/lib/global.h b/mcsrc/lib/global.h index 184cb4eb..d3442f24 100644 --- a/mcsrc/lib/global.h +++ b/mcsrc/lib/global.h @@ -306,6 +306,9 @@ typedef struct #if defined(WIN32) /* Set if the window has changed it's size */ SIG_ATOMIC_VOLATILE_T winch_flag; + + /* ALtGr map; If true filter AltGr control states */ + int altgr_enabled; #endif //WIN32 } tty; diff --git a/mcsrc/lib/hook.c b/mcsrc/lib/hook.c index c67d75c6..94ae5a9b 100644 --- a/mcsrc/lib/hook.c +++ b/mcsrc/lib/hook.c @@ -4,7 +4,7 @@ Slavaz: Warning! this file is deprecated and should be replaced by mcevents functional. - Copyright (C) 1994-2023 + Copyright (C) 1994-2024 Free Software Foundation, Inc. Written by: diff --git a/mcsrc/lib/keybind.c b/mcsrc/lib/keybind.c index 9af31757..bd8f47dd 100644 --- a/mcsrc/lib/keybind.c +++ b/mcsrc/lib/keybind.c @@ -1,7 +1,7 @@ /* Definitions of key bindings. - Copyright (C) 2005-2023 + Copyright (C) 2005-2024 Free Software Foundation, Inc. Written by: @@ -174,8 +174,8 @@ static name_keymap_t command_names[] = { ADD_KEYMAP_NAME (LinkSymbolicEdit), ADD_KEYMAP_NAME (ExternalPanelize), ADD_KEYMAP_NAME (Filter), -#ifdef ENABLE_VFS_FISH - ADD_KEYMAP_NAME (ConnectFish), +#ifdef ENABLE_VFS_SHELL + ADD_KEYMAP_NAME (ConnectShell), #endif #ifdef ENABLE_VFS_FTP ADD_KEYMAP_NAME (ConnectFtp), diff --git a/mcsrc/lib/keybind.h b/mcsrc/lib/keybind.h index 793bfff0..ea936b38 100644 --- a/mcsrc/lib/keybind.h +++ b/mcsrc/lib/keybind.h @@ -154,7 +154,7 @@ enum CK_LinkSymbolicEdit, CK_ExternalPanelize, CK_Filter, - CK_ConnectFish, + CK_ConnectShell, CK_ConnectFtp, CK_ConnectSftp, CK_PanelInfo, @@ -345,7 +345,7 @@ enum CK_MergeOther, /* Change drive support (WIN32/APY) */ - CK_DriveChange = 800, + CK_DriveChange = 800L, CK_DriveChangeA, CK_DriveChangeB }; diff --git a/mcsrc/lib/lock.c b/mcsrc/lib/lock.c index c78fdbef..6b23b293 100644 --- a/mcsrc/lib/lock.c +++ b/mcsrc/lib/lock.c @@ -1,7 +1,7 @@ /* File locking - Copyright (C) 2003-2023 + Copyright (C) 2003-2024 Free Software Foundation, Inc. Written by: diff --git a/mcsrc/lib/logging.c b/mcsrc/lib/logging.c index 6dd0731d..8e286125 100644 --- a/mcsrc/lib/logging.c +++ b/mcsrc/lib/logging.c @@ -1,7 +1,7 @@ /* Provides a log file to ease tracing the program. - Copyright (C) 2006-2023 + Copyright (C) 2006-2024 Free Software Foundation, Inc. Written by: diff --git a/mcsrc/lib/mcconfig.h b/mcsrc/lib/mcconfig.h index 0c3ab3be..abc28efe 100644 --- a/mcsrc/lib/mcconfig.h +++ b/mcsrc/lib/mcconfig.h @@ -105,6 +105,8 @@ vfs_path_t *mc_config_get_full_vpath (const char *config_name); /* read history to the mc_config, but don't save config to file */ GList *mc_config_history_get (const char *name); +/* read recent item from the history */ +char *mc_config_history_get_recent_item (const char *name); /* load history from the mc_config */ GList *mc_config_history_load (mc_config_t * cfg, const char *name); /* save history to the mc_config, but don't save config to file */ diff --git a/mcsrc/lib/mcconfig/common.c b/mcsrc/lib/mcconfig/common.c index 75979be1..4891a39f 100644 --- a/mcsrc/lib/mcconfig/common.c +++ b/mcsrc/lib/mcconfig/common.c @@ -1,7 +1,7 @@ /* Configure module for the Midnight Commander - Copyright (C) 1994-2023 + Copyright (C) 1994-2024 Free Software Foundation, Inc. This file is part of the Midnight Commander. diff --git a/mcsrc/lib/mcconfig/get.c b/mcsrc/lib/mcconfig/get.c index f8ecfb10..4793b619 100644 --- a/mcsrc/lib/mcconfig/get.c +++ b/mcsrc/lib/mcconfig/get.c @@ -1,7 +1,7 @@ /* Configure module for the Midnight Commander - Copyright (C) 1994-2023 + Copyright (C) 1994-2024 Free Software Foundation, Inc. This file is part of the Midnight Commander. diff --git a/mcsrc/lib/mcconfig/history.c b/mcsrc/lib/mcconfig/history.c index bfbdf0ab..57249c4c 100644 --- a/mcsrc/lib/mcconfig/history.c +++ b/mcsrc/lib/mcconfig/history.c @@ -1,7 +1,7 @@ /* - Widgets for the Midnight Commander + Configure module for the Midnight Commander - Copyright (C) 1994-2023 + Copyright (C) 1994-2024 Free Software Foundation, Inc. Authors: @@ -10,7 +10,7 @@ Jakub Jelinek, 1995 Andrej Borsenkow, 1996 Norbert Warmuth, 1997 - Andrew Borodin , 2009-2019 + Andrew Borodin , 2009-2023 This file is part of the Midnight Commander. @@ -65,7 +65,7 @@ int num_history_items_recorded = 60; /* --------------------------------------------------------------------------------------------- */ /** - * Load the history from the ${XDG_CACHE_HOME}/mc/history file. + * Load the history from the ${XDG_DATA_HOME}/mc/history file. * It is called with the widgets history name and returns the GList list. */ @@ -94,6 +94,33 @@ mc_config_history_get (const char *name) /* --------------------------------------------------------------------------------------------- */ +/** + * Get the recent item of a history from the ${XDG_DATA_HOME}/mc/history file. + * + * TODO: get rid of load the entire history to get the only top item. + */ + +char * +mc_config_history_get_recent_item (const char *name) +{ + GList *history; + char *item = NULL; + + history = mc_config_history_get (name); + if (history != NULL) + { + /* FIXME: can history->data be NULL? */ + item = (char *) history->data; + history->data = NULL; + history = g_list_first (history); + g_list_free_full (history, g_free); + } + + return item; +} + +/* --------------------------------------------------------------------------------------------- */ + /** * Load history from the mc_config */ @@ -177,8 +204,7 @@ mc_config_history_save (mc_config_t * cfg, const char *name, GList * h) for (i = 0; (i < num_history_items_recorded - 1) && (h->prev != NULL); i++) h = g_list_previous (h); - if (name != NULL) - mc_config_del_group (cfg, name); + mc_config_del_group (cfg, name); /* create charset conversion handler to convert strings from system codepage to UTF-8 */ diff --git a/mcsrc/lib/mcconfig/paths.c b/mcsrc/lib/mcconfig/paths.c index 46ec14d1..fbb71c3f 100644 --- a/mcsrc/lib/mcconfig/paths.c +++ b/mcsrc/lib/mcconfig/paths.c @@ -1,7 +1,7 @@ /* paths to configuration files - Copyright (C) 2010-2023 + Copyright (C) 2010-2024 Free Software Foundation, Inc. Written by: @@ -74,7 +74,7 @@ static const struct /* data */ { &mc_data_str, MC_SKINS_DIR }, - { &mc_data_str, FISH_PREFIX }, + { &mc_data_str, VFS_SHELL_PREFIX }, { &mc_data_str, MC_ASHRC_FILE }, { &mc_data_str, MC_BASHRC_FILE }, { &mc_data_str, MC_INPUTRC_FILE }, diff --git a/mcsrc/lib/mcconfig/set.c b/mcsrc/lib/mcconfig/set.c index 961435fa..ce6d887b 100644 --- a/mcsrc/lib/mcconfig/set.c +++ b/mcsrc/lib/mcconfig/set.c @@ -1,7 +1,7 @@ /* Configure module for the Midnight Commander - Copyright (C) 1994-2023 + Copyright (C) 1994-2024 Free Software Foundation, Inc. This file is part of the Midnight Commander. diff --git a/mcsrc/lib/search/glob.c b/mcsrc/lib/search/glob.c index 5874abaf..a0326d0e 100644 --- a/mcsrc/lib/search/glob.c +++ b/mcsrc/lib/search/glob.c @@ -2,7 +2,7 @@ Search text engine. Glob-style pattern matching - Copyright (C) 2009-2023 + Copyright (C) 2009-2024 Free Software Foundation, Inc. Written by: diff --git a/mcsrc/lib/search/hex.c b/mcsrc/lib/search/hex.c index 50af6fb6..a5764d88 100644 --- a/mcsrc/lib/search/hex.c +++ b/mcsrc/lib/search/hex.c @@ -2,7 +2,7 @@ Search text engine. HEX-style pattern matching - Copyright (C) 2009-2023 + Copyright (C) 2009-2024 Free Software Foundation, Inc. Written by: diff --git a/mcsrc/lib/search/lib.c b/mcsrc/lib/search/lib.c index 2c22504f..1158e833 100644 --- a/mcsrc/lib/search/lib.c +++ b/mcsrc/lib/search/lib.c @@ -2,7 +2,7 @@ Search text engine. Common share code for module. - Copyright (C) 2009-2023 + Copyright (C) 2009-2024 Free Software Foundation, Inc. Written by: diff --git a/mcsrc/lib/search/normal.c b/mcsrc/lib/search/normal.c index 9042bfce..9d86b44a 100644 --- a/mcsrc/lib/search/normal.c +++ b/mcsrc/lib/search/normal.c @@ -2,7 +2,7 @@ Search text engine. Plain search - Copyright (C) 2009-2023 + Copyright (C) 2009-2024 Free Software Foundation, Inc. Written by: diff --git a/mcsrc/lib/search/regex.c b/mcsrc/lib/search/regex.c index 0d41de01..163e31a1 100644 --- a/mcsrc/lib/search/regex.c +++ b/mcsrc/lib/search/regex.c @@ -2,7 +2,7 @@ Search text engine. Regex search - Copyright (C) 2009-2023 + Copyright (C) 2009-2024 Free Software Foundation, Inc. Written by: @@ -397,17 +397,16 @@ mc_search_regex__get_max_num_of_replace_tokens (const gchar * str, gsize len) { int max_token = 0; gsize loop; + for (loop = 0; loop < len - 1; loop++) - { if (str[loop] == '\\' && g_ascii_isdigit (str[loop + 1])) { if (strutils_is_char_escaped (str, &str[loop])) continue; if (max_token < str[loop + 1] - '0') max_token = str[loop + 1] - '0'; - continue; } - if (str[loop] == '$' && str[loop + 1] == '{') + else if (str[loop] == '$' && str[loop + 1] == '{') { gsize tmp_len; @@ -430,7 +429,7 @@ mc_search_regex__get_max_num_of_replace_tokens (const gchar * str, gsize len) g_free (tmp_str); } } - } + return max_token; } diff --git a/mcsrc/lib/search/search.c b/mcsrc/lib/search/search.c index 8ccb65fb..ddbdc2b5 100644 --- a/mcsrc/lib/search/search.c +++ b/mcsrc/lib/search/search.c @@ -2,7 +2,7 @@ Search text engine. Interface functions - Copyright (C) 2009-2023 + Copyright (C) 2009-2024 Free Software Foundation, Inc. Written by: diff --git a/mcsrc/lib/serialize.c b/mcsrc/lib/serialize.c index 1db0a9ce..6021af5a 100644 --- a/mcsrc/lib/serialize.c +++ b/mcsrc/lib/serialize.c @@ -1,7 +1,7 @@ /* Provides a serialize/unserialize functionality for INI-like formats. - Copyright (C) 2011-2023 + Copyright (C) 2011-2024 Free Software Foundation, Inc. Written by: diff --git a/mcsrc/lib/shell.c b/mcsrc/lib/shell.c index b81fad25..f205b0ae 100644 --- a/mcsrc/lib/shell.c +++ b/mcsrc/lib/shell.c @@ -1,7 +1,7 @@ /* Provides a functions for working with shell. - Copyright (C) 2006-2023 + Copyright (C) 2006-2024 Free Software Foundation, Inc. Written by: @@ -189,6 +189,8 @@ mc_shell_recognize_real_path (mc_shell_t * mc_shell) mc_shell->type = SHELL_ASH_BUSYBOX; mc_shell->name = mc_shell->path; } +#if defined(WIN32) //WIN32, TODO/XXX +#endif else mc_shell->type = SHELL_NONE; } diff --git a/mcsrc/lib/skin.h b/mcsrc/lib/skin.h index 024e0c50..099c3646 100644 --- a/mcsrc/lib/skin.h +++ b/mcsrc/lib/skin.h @@ -87,28 +87,29 @@ * Last is defined to view color. */ #define EDITOR_NORMAL_COLOR mc_skin_color__cache[49] -#define EDITOR_BOLD_COLOR mc_skin_color__cache[50] -#define EDITOR_MARKED_COLOR mc_skin_color__cache[51] -#define EDITOR_WHITESPACE_COLOR mc_skin_color__cache[52] -#define EDITOR_RIGHT_MARGIN_COLOR mc_skin_color__cache[53] -#define EDITOR_BACKGROUND mc_skin_color__cache[54] -#define EDITOR_FRAME mc_skin_color__cache[55] -#define EDITOR_FRAME_ACTIVE mc_skin_color__cache[56] -#define EDITOR_FRAME_DRAG mc_skin_color__cache[57] +#define EDITOR_NONPRINTABLE_COLOR mc_skin_color__cache[50] +#define EDITOR_BOLD_COLOR mc_skin_color__cache[51] +#define EDITOR_MARKED_COLOR mc_skin_color__cache[52] +#define EDITOR_WHITESPACE_COLOR mc_skin_color__cache[53] +#define EDITOR_RIGHT_MARGIN_COLOR mc_skin_color__cache[54] +#define EDITOR_BACKGROUND mc_skin_color__cache[55] +#define EDITOR_FRAME mc_skin_color__cache[56] +#define EDITOR_FRAME_ACTIVE mc_skin_color__cache[57] +#define EDITOR_FRAME_DRAG mc_skin_color__cache[58] /* color of left 8 char status per line */ -#define LINE_STATE_COLOR mc_skin_color__cache[58] -#define BOOK_MARK_COLOR mc_skin_color__cache[59] -#define BOOK_MARK_FOUND_COLOR mc_skin_color__cache[60] +#define LINE_STATE_COLOR mc_skin_color__cache[59] +#define BOOK_MARK_COLOR mc_skin_color__cache[60] +#define BOOK_MARK_FOUND_COLOR mc_skin_color__cache[61] /* Diff colors */ -#define DFF_ADD_COLOR mc_skin_color__cache[61] -#define DFF_CHG_COLOR mc_skin_color__cache[62] -#define DFF_CHH_COLOR mc_skin_color__cache[63] -#define DFF_CHD_COLOR mc_skin_color__cache[64] -#define DFF_DEL_COLOR mc_skin_color__cache[65] -#define DFF_ERROR_COLOR mc_skin_color__cache[66] - -#define MC_SKIN_COLOR_CACHE_COUNT 67 +#define DFF_ADD_COLOR mc_skin_color__cache[62] +#define DFF_CHG_COLOR mc_skin_color__cache[63] +#define DFF_CHH_COLOR mc_skin_color__cache[64] +#define DFF_CHD_COLOR mc_skin_color__cache[65] +#define DFF_DEL_COLOR mc_skin_color__cache[66] +#define DFF_ERROR_COLOR mc_skin_color__cache[67] + +#define MC_SKIN_COLOR_CACHE_COUNT 68 /*** enums ***************************************************************************************/ diff --git a/mcsrc/lib/skin/colors-old.c b/mcsrc/lib/skin/colors-old.c index 628b2aa7..3430cd64 100644 --- a/mcsrc/lib/skin/colors-old.c +++ b/mcsrc/lib/skin/colors-old.c @@ -2,7 +2,7 @@ Skins engine. Work with colors - backward compatibility - Copyright (C) 2009-2023 + Copyright (C) 2009-2024 Free Software Foundation, Inc. Written by: @@ -69,6 +69,7 @@ static const mc_skin_colors_old_t old_colors[] = { {"editframedrag", "editor", "editframedrag"}, {"editlinestate", "editor", "editlinestate"}, {"editmarked", "editor", "editmarked"}, + {"editnonprintable", "editor", "editnonprintable"}, {"editnormal", "editor", "_default_"}, {"editwhitespace", "editor", "editwhitespace"}, {"errdhotfocus", "error", "errdhotfocus"}, diff --git a/mcsrc/lib/skin/colors.c b/mcsrc/lib/skin/colors.c index 87e9442d..688866ea 100644 --- a/mcsrc/lib/skin/colors.c +++ b/mcsrc/lib/skin/colors.c @@ -2,7 +2,7 @@ Skins engine. Work with colors - Copyright (C) 2009-2023 + Copyright (C) 2009-2024 Free Software Foundation, Inc. Written by: @@ -49,11 +49,11 @@ int mc_skin_color__cache[MC_SKIN_COLOR_CACHE_COUNT]; /*** file scope functions ************************************************************************/ /* --------------------------------------------------------------------------------------------- */ -static mc_skin_color_t * +static tty_color_pair_t * mc_skin_color_get_from_hash (mc_skin_t * mc_skin, const gchar * group, const gchar * key) { gchar kname[BUF_TINY]; - mc_skin_color_t *mc_skin_color; + tty_color_pair_t *mc_skin_color; if (group == NULL || key == NULL) return NULL; @@ -62,7 +62,7 @@ mc_skin_color_get_from_hash (mc_skin_t * mc_skin, const gchar * group, const gch mc_skin = &mc_skin__default; g_snprintf (kname, sizeof (kname), "%s.%s", group, key); - mc_skin_color = (mc_skin_color_t *) g_hash_table_lookup (mc_skin->colors, (gpointer) kname); + mc_skin_color = (tty_color_pair_t *) g_hash_table_lookup (mc_skin->colors, (gpointer) kname); return mc_skin_color; } @@ -89,7 +89,7 @@ mc_skin_color_remove_from_hash (mc_skin_t * mc_skin, const gchar * group, const static void mc_skin_color_add_to_hash (mc_skin_t * mc_skin, const gchar * group, const gchar * key, - mc_skin_color_t * mc_skin_color) + tty_color_pair_t * mc_skin_color) { gchar *kname; @@ -105,10 +105,10 @@ mc_skin_color_add_to_hash (mc_skin_t * mc_skin, const gchar * group, const gchar /* --------------------------------------------------------------------------------------------- */ -static mc_skin_color_t * +static tty_color_pair_t * mc_skin_color_get_with_defaults (const gchar * group, const gchar * name) { - mc_skin_color_t *mc_skin_color; + tty_color_pair_t *mc_skin_color; mc_skin_color = mc_skin_color_get_from_hash (NULL, group, name); if (mc_skin_color != NULL) @@ -179,12 +179,12 @@ mc_skin_color_look_up_alias (mc_skin_t * mc_skin, gchar * str) /* --------------------------------------------------------------------------------------------- */ -static mc_skin_color_t * +static tty_color_pair_t * mc_skin_color_get_from_ini_file (mc_skin_t * mc_skin, const gchar * group, const gchar * key) { gsize items_count; gchar **values; - mc_skin_color_t *mc_skin_color, *tmp; + tty_color_pair_t *mc_skin_color, *tmp; values = mc_config_get_string_list (mc_skin->config, group, key, &items_count); if (values == NULL || values[0] == NULL) @@ -193,7 +193,7 @@ mc_skin_color_get_from_ini_file (mc_skin_t * mc_skin, const gchar * group, const return NULL; } - mc_skin_color = g_try_new0 (mc_skin_color_t, 1); + mc_skin_color = g_try_new0 (tty_color_pair_t, 1); if (mc_skin_color == NULL) { g_strfreev (values); @@ -201,21 +201,19 @@ mc_skin_color_get_from_ini_file (mc_skin_t * mc_skin, const gchar * group, const } tmp = mc_skin_color_get_with_defaults (group, "_default_"); - mc_skin_color->fgcolor = (items_count > 0 && values[0][0]) ? + mc_skin_color->fg = (items_count > 0 && values[0][0]) ? mc_skin_color_look_up_alias (mc_skin, g_strstrip (g_strdup (values[0]))) : - (tmp != NULL) ? g_strdup (tmp->fgcolor) : NULL; - mc_skin_color->bgcolor = (items_count > 1 && values[1][0]) ? + (tmp != NULL) ? g_strdup (tmp->fg) : NULL; + mc_skin_color->bg = (items_count > 1 && values[1][0]) ? mc_skin_color_look_up_alias (mc_skin, g_strstrip (g_strdup (values[1]))) : - (tmp != NULL) ? g_strdup (tmp->bgcolor) : NULL; + (tmp != NULL) ? g_strdup (tmp->bg) : NULL; mc_skin_color->attrs = (items_count > 2 && values[2][0]) ? mc_skin_color_look_up_alias (mc_skin, g_strstrip (g_strdup (values[2]))) : (tmp != NULL) ? g_strdup (tmp->attrs) : NULL; g_strfreev (values); - mc_skin_color->pair_index = - tty_try_alloc_color_pair2 (mc_skin_color->fgcolor, mc_skin_color->bgcolor, - mc_skin_color->attrs, FALSE); + mc_skin_color->pair_index = tty_try_alloc_color_pair (mc_skin_color, FALSE); return mc_skin_color; } @@ -225,16 +223,15 @@ mc_skin_color_get_from_ini_file (mc_skin_t * mc_skin, const gchar * group, const static void mc_skin_color_set_default_for_terminal (mc_skin_t * mc_skin) { - mc_skin_color_t *mc_skin_color; - mc_skin_color = g_try_new0 (mc_skin_color_t, 1); + tty_color_pair_t *mc_skin_color; + + mc_skin_color = g_try_new0 (tty_color_pair_t, 1); if (mc_skin_color != NULL) { - mc_skin_color->fgcolor = g_strdup ("default"); - mc_skin_color->bgcolor = g_strdup ("default"); + mc_skin_color->fg = g_strdup ("default"); + mc_skin_color->bg = g_strdup ("default"); mc_skin_color->attrs = NULL; - mc_skin_color->pair_index = - tty_try_alloc_color_pair2 (mc_skin_color->fgcolor, mc_skin_color->bgcolor, - mc_skin_color->attrs, FALSE); + mc_skin_color->pair_index = tty_try_alloc_color_pair (mc_skin_color, FALSE); mc_skin_color_add_to_hash (mc_skin, "skin", "terminal_default_color", mc_skin_color); } } @@ -305,6 +302,7 @@ mc_skin_color_cache_init (void) EDITOR_BOLD_COLOR = mc_skin_color_get ("editor", "editbold"); EDITOR_MARKED_COLOR = mc_skin_color_get ("editor", "editmarked"); EDITOR_WHITESPACE_COLOR = mc_skin_color_get ("editor", "editwhitespace"); + EDITOR_NONPRINTABLE_COLOR = mc_skin_color_get ("editor", "editnonprintable"); EDITOR_RIGHT_MARGIN_COLOR = mc_skin_color_get ("editor", "editrightmargin"); LINE_STATE_COLOR = mc_skin_color_get ("editor", "editlinestate"); EDITOR_BACKGROUND = mc_skin_color_get ("editor", "editbg"); @@ -363,7 +361,7 @@ mc_skin_color_parse_ini_file (mc_skin_t * mc_skin) gboolean ret = FALSE; gsize items_count; gchar **groups, **orig_groups; - mc_skin_color_t *mc_skin_color; + tty_color_pair_t *mc_skin_color; mc_skin_color_check_bw_mode (mc_skin); @@ -377,7 +375,7 @@ mc_skin_color_parse_ini_file (mc_skin_t * mc_skin) if (mc_skin_color == NULL) goto ret; - tty_color_set_defaults (mc_skin_color->fgcolor, mc_skin_color->bgcolor, mc_skin_color->attrs); + tty_color_set_defaults (mc_skin_color); mc_skin_color_add_to_hash (mc_skin, "core", "_default_", mc_skin_color); for (groups = orig_groups; *groups != NULL; groups++) @@ -412,7 +410,7 @@ mc_skin_color_parse_ini_file (mc_skin_t * mc_skin) int mc_skin_color_get (const gchar * group, const gchar * name) { - mc_skin_color_t *mc_skin_color; + tty_color_pair_t *mc_skin_color; mc_skin_color = mc_skin_color_get_with_defaults (group, name); diff --git a/mcsrc/lib/skin/common.c b/mcsrc/lib/skin/common.c index 85790f28..e94977c2 100644 --- a/mcsrc/lib/skin/common.c +++ b/mcsrc/lib/skin/common.c @@ -2,7 +2,7 @@ Skins engine. Interface functions - Copyright (C) 2009-2023 + Copyright (C) 2009-2024 Free Software Foundation, Inc. Written by: @@ -54,9 +54,10 @@ static gboolean mc_skin_is_init = FALSE; static void mc_skin_hash_destroy_value (gpointer data) { - mc_skin_color_t *mc_skin_color = (mc_skin_color_t *) data; - g_free (mc_skin_color->fgcolor); - g_free (mc_skin_color->bgcolor); + tty_color_pair_t *mc_skin_color = (tty_color_pair_t *) data; + + g_free (mc_skin_color->fg); + g_free (mc_skin_color->bg); g_free (mc_skin_color->attrs); g_free (mc_skin_color); } @@ -180,8 +181,7 @@ mc_skin_init (const gchar * skin_override, GError ** mcerror) void mc_skin_deinit (void) { - tty_color_free_all_tmp (); - tty_color_free_all_non_tmp (); + tty_color_free_all (); MC_PTR_FREE (mc_skin__default.name); g_hash_table_destroy (mc_skin__default.colors); diff --git a/mcsrc/lib/skin/hc-skins.c b/mcsrc/lib/skin/hc-skins.c index 95ac73df..1a13decf 100644 --- a/mcsrc/lib/skin/hc-skins.c +++ b/mcsrc/lib/skin/hc-skins.c @@ -2,7 +2,7 @@ Skins engine. Set of hardcoded skins - Copyright (C) 2009-2023 + Copyright (C) 2009-2024 Free Software Foundation, Inc. Written by: diff --git a/mcsrc/lib/skin/ini-file.c b/mcsrc/lib/skin/ini-file.c index 6d924357..24d7c25f 100644 --- a/mcsrc/lib/skin/ini-file.c +++ b/mcsrc/lib/skin/ini-file.c @@ -2,7 +2,7 @@ Skins engine. Reading and parse ini-files - Copyright (C) 2009-2023 + Copyright (C) 2009-2024 Free Software Foundation, Inc. Written by: diff --git a/mcsrc/lib/skin/internal.h b/mcsrc/lib/skin/internal.h index 8b468db3..6bc0a23b 100644 --- a/mcsrc/lib/skin/internal.h +++ b/mcsrc/lib/skin/internal.h @@ -10,14 +10,6 @@ /*** structures declarations (and typedefs of structures)*****************************************/ -typedef struct mc_skin_color_struct -{ - gchar *fgcolor; - gchar *bgcolor; - gchar *attrs; - int pair_index; -} mc_skin_color_t; - /*** global variables defined in .c file *********************************************************/ /*** declarations of public functions ************************************************************/ diff --git a/mcsrc/lib/skin/lines.c b/mcsrc/lib/skin/lines.c index 90cc0280..436f5557 100644 --- a/mcsrc/lib/skin/lines.c +++ b/mcsrc/lib/skin/lines.c @@ -2,7 +2,7 @@ Skins engine. Work with line draving chars. - Copyright (C) 2009-2023 + Copyright (C) 2009-2024 Free Software Foundation, Inc. Written by: @@ -68,33 +68,31 @@ mc_skin_lines_parse_ini_file (mc_skin_t * mc_skin) mc_skin_hardcoded_space_lines (mc_skin); else if (mc_global.tty.ugly_line_drawing) mc_skin_hardcoded_ugly_lines (mc_skin); - else - { - /* single lines */ - mc_tty_frm[MC_TTY_FRM_VERT] = mc_skin_lines_load_frm (mc_skin, "vert"); - mc_tty_frm[MC_TTY_FRM_HORIZ] = mc_skin_lines_load_frm (mc_skin, "horiz"); - mc_tty_frm[MC_TTY_FRM_LEFTTOP] = mc_skin_lines_load_frm (mc_skin, "lefttop"); - mc_tty_frm[MC_TTY_FRM_RIGHTTOP] = mc_skin_lines_load_frm (mc_skin, "righttop"); - mc_tty_frm[MC_TTY_FRM_LEFTBOTTOM] = mc_skin_lines_load_frm (mc_skin, "leftbottom"); - mc_tty_frm[MC_TTY_FRM_RIGHTBOTTOM] = mc_skin_lines_load_frm (mc_skin, "rightbottom"); - mc_tty_frm[MC_TTY_FRM_TOPMIDDLE] = mc_skin_lines_load_frm (mc_skin, "topmiddle"); - mc_tty_frm[MC_TTY_FRM_BOTTOMMIDDLE] = mc_skin_lines_load_frm (mc_skin, "bottommiddle"); - mc_tty_frm[MC_TTY_FRM_LEFTMIDDLE] = mc_skin_lines_load_frm (mc_skin, "leftmiddle"); - mc_tty_frm[MC_TTY_FRM_RIGHTMIDDLE] = mc_skin_lines_load_frm (mc_skin, "rightmiddle"); - mc_tty_frm[MC_TTY_FRM_CROSS] = mc_skin_lines_load_frm (mc_skin, "cross"); - - /* double lines */ - mc_tty_frm[MC_TTY_FRM_DVERT] = mc_skin_lines_load_frm (mc_skin, "dvert"); - mc_tty_frm[MC_TTY_FRM_DHORIZ] = mc_skin_lines_load_frm (mc_skin, "dhoriz"); - mc_tty_frm[MC_TTY_FRM_DLEFTTOP] = mc_skin_lines_load_frm (mc_skin, "dlefttop"); - mc_tty_frm[MC_TTY_FRM_DRIGHTTOP] = mc_skin_lines_load_frm (mc_skin, "drighttop"); - mc_tty_frm[MC_TTY_FRM_DLEFTBOTTOM] = mc_skin_lines_load_frm (mc_skin, "dleftbottom"); - mc_tty_frm[MC_TTY_FRM_DRIGHTBOTTOM] = mc_skin_lines_load_frm (mc_skin, "drightbottom"); - mc_tty_frm[MC_TTY_FRM_DTOPMIDDLE] = mc_skin_lines_load_frm (mc_skin, "dtopmiddle"); - mc_tty_frm[MC_TTY_FRM_DBOTTOMMIDDLE] = mc_skin_lines_load_frm (mc_skin, "dbottommiddle"); - mc_tty_frm[MC_TTY_FRM_DLEFTMIDDLE] = mc_skin_lines_load_frm (mc_skin, "dleftmiddle"); - mc_tty_frm[MC_TTY_FRM_DRIGHTMIDDLE] = mc_skin_lines_load_frm (mc_skin, "drightmiddle"); - } + + /* single lines */ + mc_tty_frm[MC_TTY_FRM_VERT] = mc_skin_lines_load_frm (mc_skin, "vert"); + mc_tty_frm[MC_TTY_FRM_HORIZ] = mc_skin_lines_load_frm (mc_skin, "horiz"); + mc_tty_frm[MC_TTY_FRM_LEFTTOP] = mc_skin_lines_load_frm (mc_skin, "lefttop"); + mc_tty_frm[MC_TTY_FRM_RIGHTTOP] = mc_skin_lines_load_frm (mc_skin, "righttop"); + mc_tty_frm[MC_TTY_FRM_LEFTBOTTOM] = mc_skin_lines_load_frm (mc_skin, "leftbottom"); + mc_tty_frm[MC_TTY_FRM_RIGHTBOTTOM] = mc_skin_lines_load_frm (mc_skin, "rightbottom"); + mc_tty_frm[MC_TTY_FRM_TOPMIDDLE] = mc_skin_lines_load_frm (mc_skin, "topmiddle"); + mc_tty_frm[MC_TTY_FRM_BOTTOMMIDDLE] = mc_skin_lines_load_frm (mc_skin, "bottommiddle"); + mc_tty_frm[MC_TTY_FRM_LEFTMIDDLE] = mc_skin_lines_load_frm (mc_skin, "leftmiddle"); + mc_tty_frm[MC_TTY_FRM_RIGHTMIDDLE] = mc_skin_lines_load_frm (mc_skin, "rightmiddle"); + mc_tty_frm[MC_TTY_FRM_CROSS] = mc_skin_lines_load_frm (mc_skin, "cross"); + + /* double lines */ + mc_tty_frm[MC_TTY_FRM_DVERT] = mc_skin_lines_load_frm (mc_skin, "dvert"); + mc_tty_frm[MC_TTY_FRM_DHORIZ] = mc_skin_lines_load_frm (mc_skin, "dhoriz"); + mc_tty_frm[MC_TTY_FRM_DLEFTTOP] = mc_skin_lines_load_frm (mc_skin, "dlefttop"); + mc_tty_frm[MC_TTY_FRM_DRIGHTTOP] = mc_skin_lines_load_frm (mc_skin, "drighttop"); + mc_tty_frm[MC_TTY_FRM_DLEFTBOTTOM] = mc_skin_lines_load_frm (mc_skin, "dleftbottom"); + mc_tty_frm[MC_TTY_FRM_DRIGHTBOTTOM] = mc_skin_lines_load_frm (mc_skin, "drightbottom"); + mc_tty_frm[MC_TTY_FRM_DTOPMIDDLE] = mc_skin_lines_load_frm (mc_skin, "dtopmiddle"); + mc_tty_frm[MC_TTY_FRM_DBOTTOMMIDDLE] = mc_skin_lines_load_frm (mc_skin, "dbottommiddle"); + mc_tty_frm[MC_TTY_FRM_DLEFTMIDDLE] = mc_skin_lines_load_frm (mc_skin, "dleftmiddle"); + mc_tty_frm[MC_TTY_FRM_DRIGHTMIDDLE] = mc_skin_lines_load_frm (mc_skin, "drightmiddle"); } /* --------------------------------------------------------------------------------------------- */ diff --git a/mcsrc/lib/strescape.h b/mcsrc/lib/strescape.h index a24f5d60..def5467b 100644 --- a/mcsrc/lib/strescape.h +++ b/mcsrc/lib/strescape.h @@ -20,6 +20,7 @@ char *strutils_escape (const char *src, gsize src_len, const char *escaped_chars char *strutils_unescape (const char *src, gsize src_len, const char *unescaped_chars, gboolean unescape_non_printable); char *strutils_shell_unescape (const char *text); +char *strutils_shell_unescape_special (const char *text); //WIN32 char *strutils_shell_escape (const char *text); char *strutils_glob_escape (const char *text); diff --git a/mcsrc/lib/strutil/filevercmp.c b/mcsrc/lib/strutil/filevercmp.c index 6a6232ae..281c594a 100644 --- a/mcsrc/lib/strutil/filevercmp.c +++ b/mcsrc/lib/strutil/filevercmp.c @@ -1,7 +1,7 @@ /* Copyright (C) 1995 Ian Jackson Copyright (C) 2001 Anthony Towns - Copyright (C) 2008-2023 Free Software Foundation, Inc. + Copyright (C) 2008-2022 Free Software Foundation, Inc. This file is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as diff --git a/mcsrc/lib/strutil/replace.c b/mcsrc/lib/strutil/replace.c index 99356eef..a2d700df 100644 --- a/mcsrc/lib/strutil/replace.c +++ b/mcsrc/lib/strutil/replace.c @@ -1,7 +1,7 @@ /* Functions for replacing substrings in strings. - Copyright (C) 2013-2023 + Copyright (C) 2013-2024 Free Software Foundation, Inc. Written by: diff --git a/mcsrc/lib/strutil/strescape.c b/mcsrc/lib/strutil/strescape.c index a605ad87..7c40e634 100644 --- a/mcsrc/lib/strutil/strescape.c +++ b/mcsrc/lib/strutil/strescape.c @@ -1,7 +1,7 @@ /* Functions for escaping and unescaping strings - Copyright (C) 2009-2023 + Copyright (C) 2009-2024 Free Software Foundation, Inc. Written by: @@ -220,6 +220,13 @@ strutils_shell_unescape (const char *text) return strutils_unescape (text, -1, ESCAPE_SHELL_CHARS, TRUE); } + +char * +strutils_shell_unescape_special (const char *text) +{ + return strutils_unescape (text, -1, ESCAPE_SHELL_CHARS, FALSE); +} + /* --------------------------------------------------------------------------------------------- */ char * diff --git a/mcsrc/lib/strutil/strutil.c b/mcsrc/lib/strutil/strutil.c index dcb12d61..3e97d745 100644 --- a/mcsrc/lib/strutil/strutil.c +++ b/mcsrc/lib/strutil/strutil.c @@ -1,7 +1,7 @@ /* Common strings utilities - Copyright (C) 2007-2023 + Copyright (C) 2007-2024 Free Software Foundation, Inc. Written by: diff --git a/mcsrc/lib/strutil/strutil8bit.c b/mcsrc/lib/strutil/strutil8bit.c index 2002e5e1..468e6ea9 100644 --- a/mcsrc/lib/strutil/strutil8bit.c +++ b/mcsrc/lib/strutil/strutil8bit.c @@ -1,7 +1,7 @@ /* 8bit strings utilities - Copyright (C) 2007-2023 + Copyright (C) 2007-2024 Free Software Foundation, Inc. Written by: @@ -677,13 +677,14 @@ str_8bit_casecmp (const char *s1, const char *s2) return strcasecmp (s1, s2); #else - gint c1, c2; g_return_val_if_fail (s1 != NULL, 0); g_return_val_if_fail (s2 != NULL, 0); - while (*s1 != '\0' && *s2 != '\0') + for (; *s1 != '\0' && *s2 != '\0'; s1++, s2++) { + gint c1, c2; + /* According to A. Cox, some platforms have islower's that * don't work right on non-uppercase */ @@ -691,8 +692,6 @@ str_8bit_casecmp (const char *s1, const char *s2) c2 = isupper ((guchar) * s2) ? tolower ((guchar) * s2) : *s2; if (c1 != c2) return (c1 - c2); - s1++; - s2++; } return (((gint) (guchar) * s1) - ((gint) (guchar) * s2)); @@ -716,11 +715,12 @@ str_8bit_ncasecmp (const char *s1, const char *s2) #ifdef HAVE_STRNCASECMP return strncasecmp (s1, s2, n); #else - gint c1, c2; - while (n != 0 && *s1 != '\0' && *s2 != '\0') + for (; *s1 != '\0' && *s2 != '\0'; s1++, s2++) { - n -= 1; + gint c1, c2; + + n--; /* According to A. Cox, some platforms have islower's that * don't work right on non-uppercase */ @@ -728,8 +728,6 @@ str_8bit_ncasecmp (const char *s1, const char *s2) c2 = isupper ((guchar) * s2) ? tolower ((guchar) * s2) : *s2; if (c1 != c2) return (c1 - c2); - s1++; - s2++; } if (n == 0) diff --git a/mcsrc/lib/strutil/strutilascii.c b/mcsrc/lib/strutil/strutilascii.c index 421bfdb3..eb0a7426 100644 --- a/mcsrc/lib/strutil/strutilascii.c +++ b/mcsrc/lib/strutil/strutilascii.c @@ -1,7 +1,7 @@ /* ASCII strings utilities - Copyright (C) 2007-2023 + Copyright (C) 2007-2024 Free Software Foundation, Inc. Written by: diff --git a/mcsrc/lib/strutil/strutilutf8.c b/mcsrc/lib/strutil/strutilutf8.c index e143abe7..9142f3d1 100644 --- a/mcsrc/lib/strutil/strutilutf8.c +++ b/mcsrc/lib/strutil/strutilutf8.c @@ -1,7 +1,7 @@ /* UTF-8 strings utilities - Copyright (C) 2007-2023 + Copyright (C) 2007-2024 Free Software Foundation, Inc. Written by: @@ -901,12 +901,12 @@ str_utf8_offset_to_pos (const char *text, size_t length) else { int result; - GString *buffer; + char *buffer; - buffer = g_string_new (text); - str_utf8_fix_string (buffer->str); - result = g_utf8_offset_to_pointer (buffer->str, length) - buffer->str; - g_string_free (buffer, TRUE); + buffer = g_strdup (text); + str_utf8_fix_string (buffer); + result = g_utf8_offset_to_pointer (buffer, length) - buffer; + g_free (buffer); return result; } } diff --git a/mcsrc/lib/strutil/strverscmp.c b/mcsrc/lib/strutil/strverscmp.c index 7d720c51..26ab5e9c 100644 --- a/mcsrc/lib/strutil/strverscmp.c +++ b/mcsrc/lib/strutil/strverscmp.c @@ -1,7 +1,7 @@ /* Compare strings while treating digits characters numerically. - Copyright (C) 1997-2023 + Copyright (C) 1997-2024 Free Software Foundation, Inc. This file is part of the GNU C Library. diff --git a/mcsrc/lib/strutil/xstrtol.c b/mcsrc/lib/strutil/xstrtol.c index a0f93ce6..5695c195 100644 --- a/mcsrc/lib/strutil/xstrtol.c +++ b/mcsrc/lib/strutil/xstrtol.c @@ -1,6 +1,6 @@ /* A more useful interface to strtol. - Copyright (C) 1995-2023 + Copyright (C) 1995-2024 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify diff --git a/mcsrc/lib/timefmt.c b/mcsrc/lib/timefmt.c index 43bd4293..caa7a1dc 100644 --- a/mcsrc/lib/timefmt.c +++ b/mcsrc/lib/timefmt.c @@ -1,7 +1,7 @@ /* Time formatting functions - Copyright (C) 1994-2023 + Copyright (C) 1994-2024 Free Software Foundation, Inc. Written by: diff --git a/mcsrc/lib/tty/color-internal.c b/mcsrc/lib/tty/color-internal.c index 8db2b6cd..16b76efc 100644 --- a/mcsrc/lib/tty/color-internal.c +++ b/mcsrc/lib/tty/color-internal.c @@ -1,7 +1,7 @@ /* Internal stuff of color setup - Copyright (C) 1994-2023 + Copyright (C) 1994-2024 Free Software Foundation, Inc. Written by: @@ -184,9 +184,9 @@ tty_color_get_name_by_index (int idx) char name[9]; if (idx < 256) - sprintf (name, "color%d", idx); + g_snprintf (name, sizeof (name), "color%d", idx); else - sprintf (name, "#%06X", (unsigned int) idx & 0xFFFFFF); + g_snprintf (name, sizeof (name), "#%06X", (unsigned int) idx & 0xFFFFFF); return g_intern_string (name); } return "default"; diff --git a/mcsrc/lib/tty/color-internal.h b/mcsrc/lib/tty/color-internal.h index dc852252..a9b8d690 100644 --- a/mcsrc/lib/tty/color-internal.h +++ b/mcsrc/lib/tty/color-internal.h @@ -31,14 +31,15 @@ typedef enum { /*** structures declarations (and typedefs of structures)*****************************************/ -typedef struct mc_color_pair_struct +/* Screen library specific color pair */ +typedef struct { - int ifg; - int ibg; + int fg; + int bg; int attr; size_t pair_index; gboolean is_temp; -} tty_color_pair_t; +} tty_color_lib_pair_t; /*** global variables defined in .c file *********************************************************/ @@ -54,7 +55,7 @@ int tty_attr_get_bits (const char *attrs); void tty_color_init_lib (gboolean disable, gboolean force); void tty_color_deinit_lib (void); -void tty_color_try_alloc_pair_lib (tty_color_pair_t * mc_color_pair); +void tty_color_try_alloc_lib_pair (tty_color_lib_pair_t * mc_color_pair); /*** inline functions ****************************************************************************/ diff --git a/mcsrc/lib/tty/color-ncurses.c b/mcsrc/lib/tty/color-ncurses.c index f01d697b..055a3afb 100644 --- a/mcsrc/lib/tty/color-ncurses.c +++ b/mcsrc/lib/tty/color-ncurses.c @@ -1,7 +1,7 @@ /* Color setup for NCurses screen library - Copyright (C) 1994-2023 + Copyright (C) 1994-2024 Free Software Foundation, Inc. Written by: @@ -103,7 +103,7 @@ color_get_attr (int color_pair) /* --------------------------------------------------------------------------------------------- */ static void -mc_tty_color_pair_init_special (tty_color_pair_t * mc_color_pair, +mc_tty_color_pair_init_special (tty_color_lib_pair_t * mc_color_pair, int fg1, int bg1, int fg2, int bg2, int attr) { if (has_colors () && !mc_tty_color_disable) @@ -145,11 +145,11 @@ tty_color_deinit_lib (void) /* --------------------------------------------------------------------------------------------- */ void -tty_color_try_alloc_pair_lib (tty_color_pair_t * mc_color_pair) +tty_color_try_alloc_lib_pair (tty_color_lib_pair_t * mc_color_pair) { - if (mc_color_pair->ifg <= (int) SPEC_A_REVERSE) + if (mc_color_pair->fg <= (int) SPEC_A_REVERSE) { - switch (mc_color_pair->ifg) + switch (mc_color_pair->fg) { case SPEC_A_REVERSE: mc_tty_color_pair_init_special (mc_color_pair, @@ -179,8 +179,8 @@ tty_color_try_alloc_pair_lib (tty_color_pair_t * mc_color_pair) { int ifg, ibg, attr; - ifg = mc_color_pair->ifg; - ibg = mc_color_pair->ibg; + ifg = mc_color_pair->fg; + ibg = mc_color_pair->bg; attr = mc_color_pair->attr; /* In legacy color mode, change bright colors into bold */ diff --git a/mcsrc/lib/tty/color-slang.c b/mcsrc/lib/tty/color-slang.c index 5dd26637..33344b59 100644 --- a/mcsrc/lib/tty/color-slang.c +++ b/mcsrc/lib/tty/color-slang.c @@ -1,7 +1,7 @@ /* Color setup for S_Lang screen library - Copyright (C) 1994-2023 + Copyright (C) 1994-2024 Free Software Foundation, Inc. Written by: @@ -99,7 +99,7 @@ has_colors (gboolean disable, gboolean force) /* --------------------------------------------------------------------------------------------- */ static void -mc_tty_color_pair_init_special (tty_color_pair_t * mc_color_pair, +mc_tty_color_pair_init_special (tty_color_lib_pair_t * mc_color_pair, const char *fg1, const char *bg1, const char *fg2, const char *bg2, SLtt_Char_Type mask) { @@ -145,11 +145,11 @@ tty_color_deinit_lib (void) /* --------------------------------------------------------------------------------------------- */ void -tty_color_try_alloc_pair_lib (tty_color_pair_t * mc_color_pair) +tty_color_try_alloc_lib_pair (tty_color_lib_pair_t * mc_color_pair) { - if (mc_color_pair->ifg <= (int) SPEC_A_REVERSE) + if (mc_color_pair->fg <= (int) SPEC_A_REVERSE) { - switch (mc_color_pair->ifg) + switch (mc_color_pair->fg) { case SPEC_A_REVERSE: mc_tty_color_pair_init_special (mc_color_pair, @@ -176,8 +176,8 @@ tty_color_try_alloc_pair_lib (tty_color_pair_t * mc_color_pair) { const char *fg, *bg; - fg = tty_color_get_name_by_index (mc_color_pair->ifg); - bg = tty_color_get_name_by_index (mc_color_pair->ibg); + fg = tty_color_get_name_by_index (mc_color_pair->fg); + bg = tty_color_get_name_by_index (mc_color_pair->bg); SLtt_set_color (mc_color_pair->pair_index, (char *) "", (char *) fg, (char *) bg); SLtt_add_color_attribute (mc_color_pair->pair_index, mc_color_pair->attr); } diff --git a/mcsrc/lib/tty/color.c b/mcsrc/lib/tty/color.c index c79e13af..78d50b73 100644 --- a/mcsrc/lib/tty/color.c +++ b/mcsrc/lib/tty/color.c @@ -2,7 +2,7 @@ Color setup. Interface functions. - Copyright (C) 1994-2023 + Copyright (C) 1994-2024 Free Software Foundation, Inc. Written by: @@ -46,9 +46,15 @@ /*** global variables ****************************************************************************/ -static char *tty_color_defaults__fg = NULL; -static char *tty_color_defaults__bg = NULL; -static char *tty_color_defaults__attrs = NULL; +/* *INDENT-OFF* */ +static tty_color_pair_t tty_color_defaults = +{ + .fg = NULL, + .bg = NULL, + .attrs = NULL, + .pair_index = 0 +}; +/* *INDENT-ON* */ /* Set if we are actually using colors */ gboolean use_colors = FALSE; @@ -67,25 +73,23 @@ static GHashTable *mc_tty_color__hashtable = NULL; /*** file scope functions ************************************************************************/ /* --------------------------------------------------------------------------------------------- */ -static gboolean -tty_color_free_condition_cb (gpointer key, gpointer value, gpointer user_data) +static void +mc_color__deinit (tty_color_pair_t * color) { - tty_color_pair_t *mc_color_pair = (tty_color_pair_t *) value; - gboolean is_temp_color; - - (void) key; - - is_temp_color = user_data != NULL; - return (mc_color_pair->is_temp == is_temp_color); + g_free (color->fg); + g_free (color->bg); + g_free (color->attrs); } /* --------------------------------------------------------------------------------------------- */ -static void -tty_color_free_all (gboolean is_temp_color) +static gboolean +tty_color_free_temp_cb (gpointer key, gpointer value, gpointer user_data) { - g_hash_table_foreach_remove (mc_tty_color__hashtable, tty_color_free_condition_cb, - is_temp_color ? GSIZE_TO_POINTER (1) : NULL); + (void) key; + (void) user_data; + + return ((tty_color_lib_pair_t *) value)->is_temp; } /* --------------------------------------------------------------------------------------------- */ @@ -93,7 +97,7 @@ tty_color_free_all (gboolean is_temp_color) static gboolean tty_color_get_next_cpn_cb (gpointer key, gpointer value, gpointer user_data) { - tty_color_pair_t *mc_color_pair = (tty_color_pair_t *) value; + tty_color_lib_pair_t *mc_color_pair = (tty_color_lib_pair_t *) value; size_t cp = GPOINTER_TO_SIZE (user_data); (void) key; @@ -134,10 +138,7 @@ void tty_colors_done (void) { tty_color_deinit_lib (); - g_free (tty_color_defaults__fg); - g_free (tty_color_defaults__bg); - g_free (tty_color_defaults__attrs); - + mc_color__deinit (&tty_color_defaults); g_hash_table_destroy (mc_tty_color__hashtable); } @@ -152,30 +153,27 @@ tty_use_colors (void) /* --------------------------------------------------------------------------------------------- */ int -tty_try_alloc_color_pair2 (const char *fg, const char *bg, const char *attrs, - gboolean is_temp_color) +tty_try_alloc_color_pair (const tty_color_pair_t * color, gboolean is_temp) { + gboolean is_base; gchar *color_pair; - tty_color_pair_t *mc_color_pair; + tty_color_lib_pair_t *mc_color_pair; int ifg, ibg, attr; - if (fg == NULL || strcmp (fg, "base") == 0) - fg = tty_color_defaults__fg; - if (bg == NULL || strcmp (bg, "base") == 0) - bg = tty_color_defaults__bg; - if (attrs == NULL || strcmp (attrs, "base") == 0) - attrs = tty_color_defaults__attrs; - - ifg = tty_color_get_index_by_name (fg); - ibg = tty_color_get_index_by_name (bg); - attr = tty_attr_get_bits (attrs); + is_base = (color->fg == NULL || strcmp (color->fg, "base") == 0); + ifg = tty_color_get_index_by_name (is_base ? tty_color_defaults.fg : color->fg); + is_base = (color->bg == NULL || strcmp (color->bg, "base") == 0); + ibg = tty_color_get_index_by_name (is_base ? tty_color_defaults.bg : color->bg); + is_base = (color->attrs == NULL || strcmp (color->attrs, "base") == 0); + attr = tty_attr_get_bits (is_base ? tty_color_defaults.attrs : color->attrs); color_pair = g_strdup_printf ("%d.%d.%d", ifg, ibg, attr); if (color_pair == NULL) return 0; mc_color_pair = - (tty_color_pair_t *) g_hash_table_lookup (mc_tty_color__hashtable, (gpointer) color_pair); + (tty_color_lib_pair_t *) g_hash_table_lookup (mc_tty_color__hashtable, + (gpointer) color_pair); if (mc_color_pair != NULL) { @@ -183,20 +181,20 @@ tty_try_alloc_color_pair2 (const char *fg, const char *bg, const char *attrs, return mc_color_pair->pair_index; } - mc_color_pair = g_try_new0 (tty_color_pair_t, 1); + mc_color_pair = g_try_new0 (tty_color_lib_pair_t, 1); if (mc_color_pair == NULL) { g_free (color_pair); return 0; } - mc_color_pair->is_temp = is_temp_color; - mc_color_pair->ifg = ifg; - mc_color_pair->ibg = ibg; + mc_color_pair->is_temp = is_temp; + mc_color_pair->fg = ifg; + mc_color_pair->bg = ibg; mc_color_pair->attr = attr; mc_color_pair->pair_index = tty_color_get_next__color_pair_number (); - tty_color_try_alloc_pair_lib (mc_color_pair); + tty_color_try_alloc_lib_pair (mc_color_pair); g_hash_table_insert (mc_tty_color__hashtable, (gpointer) color_pair, (gpointer) mc_color_pair); @@ -205,40 +203,31 @@ tty_try_alloc_color_pair2 (const char *fg, const char *bg, const char *attrs, /* --------------------------------------------------------------------------------------------- */ -int -tty_try_alloc_color_pair (const char *fg, const char *bg, const char *attrs) -{ - return tty_try_alloc_color_pair2 (fg, bg, attrs, TRUE); -} - -/* --------------------------------------------------------------------------------------------- */ - void -tty_color_free_all_tmp (void) +tty_color_free_temp (void) { - tty_color_free_all (TRUE); + g_hash_table_foreach_remove (mc_tty_color__hashtable, tty_color_free_temp_cb, NULL); } /* --------------------------------------------------------------------------------------------- */ void -tty_color_free_all_non_tmp (void) +tty_color_free_all (void) { - tty_color_free_all (FALSE); + g_hash_table_remove_all (mc_tty_color__hashtable); } /* --------------------------------------------------------------------------------------------- */ void -tty_color_set_defaults (const char *fgcolor, const char *bgcolor, const char *attrs) +tty_color_set_defaults (const tty_color_pair_t * color) { - g_free (tty_color_defaults__fg); - g_free (tty_color_defaults__bg); - g_free (tty_color_defaults__attrs); + mc_color__deinit (&tty_color_defaults); - tty_color_defaults__fg = g_strdup (fgcolor); - tty_color_defaults__bg = g_strdup (bgcolor); - tty_color_defaults__attrs = g_strdup (attrs); + tty_color_defaults.fg = g_strdup (color->fg); + tty_color_defaults.bg = g_strdup (color->bg); + tty_color_defaults.attrs = g_strdup (color->attrs); + tty_color_defaults.pair_index = 0; } /* --------------------------------------------------------------------------------------------- */ diff --git a/mcsrc/lib/tty/color.h b/mcsrc/lib/tty/color.h index 583cce3c..e09516f6 100644 --- a/mcsrc/lib/tty/color.h +++ b/mcsrc/lib/tty/color.h @@ -21,6 +21,14 @@ /*** typedefs(not structures) and defined constants **********************************************/ +typedef struct +{ + char *fg; + char *bg; + char *attrs; + size_t pair_index; +} tty_color_pair_t; + /*** enums ***************************************************************************************/ /*** structures declarations (and typedefs of structures)*****************************************/ @@ -33,18 +41,16 @@ void tty_init_colors (gboolean disable, gboolean force); void tty_colors_done (void); gboolean tty_use_colors (void); -int tty_try_alloc_color_pair (const char *fg, const char *bg, const char *attrs); -int tty_try_alloc_color_pair2 (const char *fg, const char *bg, const char *attrs, - gboolean is_temp_color); +int tty_try_alloc_color_pair (const tty_color_pair_t * color, gboolean is_temp); -void tty_color_free_all_tmp (void); -void tty_color_free_all_non_tmp (void); +void tty_color_free_temp (void); +void tty_color_free_all (void); void tty_setcolor (int color); void tty_lowlevel_setcolor (int color); void tty_set_normal_attrs (void); -void tty_color_set_defaults (const char *fgcolor, const char *bgcolor, const char *attrs); +void tty_color_set_defaults (const tty_color_pair_t * color); extern gboolean tty_use_256colors (GError ** error); extern gboolean tty_use_truecolors (GError ** error); diff --git a/mcsrc/lib/tty/key.c b/mcsrc/lib/tty/key.c index 43ba997e..91229836 100644 --- a/mcsrc/lib/tty/key.c +++ b/mcsrc/lib/tty/key.c @@ -1,7 +1,7 @@ /* Keyboard support routines. - Copyright (C) 1994-2023 + Copyright (C) 1994-2024 Free Software Foundation, Inc. Written by: @@ -1173,28 +1173,19 @@ getch_with_timeout (unsigned int delay_us) /* --------------------------------------------------------------------------------------------- */ static void -learn_store_key (char *buffer, char **p, int c) +learn_store_key (GString * buffer, int c) { - if (*p - buffer > 253) - return; - if (c == ESC_CHAR) - { - *(*p)++ = '\\'; - *(*p)++ = 'e'; - } + g_string_append (buffer, "\\e"); else if (c < ' ') { - *(*p)++ = '^'; - *(*p)++ = c + 'a' - 1; + g_string_append_c (buffer, '^'); + g_string_append_c (buffer, c + 'a' - 1); } else if (c == '^') - { - *(*p)++ = '^'; - *(*p)++ = '^'; - } + g_string_append (buffer, "^^"); else - *(*p)++ = (char) c; + g_string_append_c (buffer, (char) c); } /* --------------------------------------------------------------------------------------------- */ @@ -2163,14 +2154,15 @@ learn_key (void) fd_set Read_FD_Set; gint64 end_time; int c; - char buffer[256]; - char *p = buffer; + GString *buffer; + + buffer = g_string_sized_new (16); tty_keypad (FALSE); /* disable interpreting keys by ncurses */ c = tty_lowlevel_getch (); while (c == -1) c = tty_lowlevel_getch (); /* Sanity check, should be unnecessary */ - learn_store_key (buffer, &p, c); + learn_store_key (buffer, c); end_time = g_get_monotonic_time () + LEARN_TIMEOUT * MC_USEC_PER_MSEC; @@ -2194,12 +2186,12 @@ learn_key (void) } if (c == -1) break; - learn_store_key (buffer, &p, c); + learn_store_key (buffer, c); } tty_keypad (TRUE); tty_nodelay (FALSE); - *p = '\0'; - return (buffer[0] != '\0' ? g_strdup (buffer) : NULL); + + return g_string_free (buffer, buffer->len == 0); #undef LEARN_TIMEOUT } diff --git a/mcsrc/lib/tty/key.h b/mcsrc/lib/tty/key.h index 91639c34..1f6f8851 100644 --- a/mcsrc/lib/tty/key.h +++ b/mcsrc/lib/tty/key.h @@ -28,18 +28,18 @@ #define ALT(x) (KEY_M_ALT | (unsigned int)(x)) /* To define sequences and return codes */ -#define MCKEY_NOACTION 0 -#define MCKEY_ESCAPE 1 +#define MCKEY_NOACTION 0 +#define MCKEY_ESCAPE 1 /* Return code for the mouse sequence */ -#define MCKEY_MOUSE -2 +#define MCKEY_MOUSE -2 /* Return code for the extended mouse sequence */ -#define MCKEY_EXTENDED_MOUSE -3 +#define MCKEY_EXTENDED_MOUSE -3 /* Return code for brackets of bracketed paste mode */ #define MCKEY_BRACKETED_PASTING_START -4 -#define MCKEY_BRACKETED_PASTING_END -5 +#define MCKEY_BRACKETED_PASTING_END -5 /*** enums ***************************************************************************************/ diff --git a/mcsrc/lib/tty/keyxdef.c b/mcsrc/lib/tty/keyxdef.c index a496f67c..45271612 100644 --- a/mcsrc/lib/tty/keyxdef.c +++ b/mcsrc/lib/tty/keyxdef.c @@ -3,7 +3,7 @@ /* Additional keyboard support routines. - Copyright (C) 1998-2023 + Copyright (C) 1998-2024 Free Software Foundation, Inc. Written by: diff --git a/mcsrc/lib/tty/mouse.c b/mcsrc/lib/tty/mouse.c index cf422873..574e3493 100644 --- a/mcsrc/lib/tty/mouse.c +++ b/mcsrc/lib/tty/mouse.c @@ -1,7 +1,7 @@ /* Mouse managing - Copyright (C) 1994-2023 + Copyright (C) 1994-2024 Free Software Foundation, Inc. Written by: diff --git a/mcsrc/lib/tty/tty-internal.c b/mcsrc/lib/tty/tty-internal.c index c79301db..46932353 100644 --- a/mcsrc/lib/tty/tty-internal.c +++ b/mcsrc/lib/tty/tty-internal.c @@ -1,7 +1,7 @@ /* Internal stuff of the terminal controlling library. - Copyright (C) 2019-2023 + Copyright (C) 2019-2024 Free Software Foundation, Inc. Written by: diff --git a/mcsrc/lib/tty/tty-ncurses.c b/mcsrc/lib/tty/tty-ncurses.c index 08f663df..fa503da7 100644 --- a/mcsrc/lib/tty/tty-ncurses.c +++ b/mcsrc/lib/tty/tty-ncurses.c @@ -2,7 +2,7 @@ Interface to the terminal controlling library. Ncurses wrapper. - Copyright (C) 2005-2023 + Copyright (C) 2005-2024 Free Software Foundation, Inc. Written by: diff --git a/mcsrc/lib/tty/tty-slang.c b/mcsrc/lib/tty/tty-slang.c index 3aa74de2..752825b6 100644 --- a/mcsrc/lib/tty/tty-slang.c +++ b/mcsrc/lib/tty/tty-slang.c @@ -2,7 +2,7 @@ Interface to the terminal controlling library. Slang wrapper. - Copyright (C) 2005-2023 + Copyright (C) 2005-2024 Free Software Foundation, Inc. Written by: diff --git a/mcsrc/lib/tty/tty.c b/mcsrc/lib/tty/tty.c index e0057ed4..95019dc6 100644 --- a/mcsrc/lib/tty/tty.c +++ b/mcsrc/lib/tty/tty.c @@ -1,7 +1,7 @@ /* Interface to the terminal controlling library. - Copyright (C) 2005-2023 + Copyright (C) 2005-2024 Free Software Foundation, Inc. Written by: diff --git a/mcsrc/lib/tty/win.c b/mcsrc/lib/tty/win.c index 45451a48..5ac8a5ae 100644 --- a/mcsrc/lib/tty/win.c +++ b/mcsrc/lib/tty/win.c @@ -1,7 +1,7 @@ /* Terminal management xterm and rxvt support - Copyright (C) 1995-2023 + Copyright (C) 1995-2024 Free Software Foundation, Inc. Written by: diff --git a/mcsrc/lib/tty/x11conn.c b/mcsrc/lib/tty/x11conn.c index 20e201bc..dfd64547 100644 --- a/mcsrc/lib/tty/x11conn.c +++ b/mcsrc/lib/tty/x11conn.c @@ -1,7 +1,7 @@ /* X11 support for the Midnight Commander. - Copyright (C) 2005-2023 + Copyright (C) 2005-2024 Free Software Foundation, Inc. Written by: diff --git a/mcsrc/lib/util.c b/mcsrc/lib/util.c index f10311a6..92ee6868 100644 --- a/mcsrc/lib/util.c +++ b/mcsrc/lib/util.c @@ -1,7 +1,7 @@ /* Various utilities - Copyright (C) 1994-2023 + Copyright (C) 1994-2024 Free Software Foundation, Inc. Written by: @@ -257,6 +257,9 @@ name_quote (const char *s, gboolean quote_percent) { GString *ret; + if (s == NULL || *s == '\0') + return NULL; + ret = g_string_sized_new (64); if (*s == '-') @@ -306,7 +309,7 @@ name_quote (const char *s, gboolean quote_percent) g_string_append_c (ret, *s); } - return g_string_free (ret, FALSE); + return g_string_free (ret, ret->len == 0); } /* --------------------------------------------------------------------------------------------- */ @@ -315,7 +318,8 @@ char * fake_name_quote (const char *s, gboolean quote_percent) { (void) quote_percent; - return g_strdup (s); + + return (s == NULL || *s == '\0' ? NULL : g_strdup (s)); } /* --------------------------------------------------------------------------------------------- */ @@ -892,6 +896,11 @@ get_compression_type (int fd, const char *name) && magic[2] == 'Z' && magic[3] == 'M' && magic[4] == 'A' && magic[5] == 0x00) return COMPRESSION_LZMA; + /* LZO format - \x89\x4c\x5a\x4f\x00\x0d\x0a\x1a\x0a lzop compressed data */ + if (magic[0] == 0x89 && magic[1] == 0x4c && + magic[2] == 0x5a && magic[3] == 0x4f && magic[4] == 0x00 && magic[5] == 0x0d) + return COMPRESSION_LZO; + /* XZ compression magic */ if (magic[0] == 0xFD && magic[1] == 0x37 @@ -931,6 +940,8 @@ decompress_extension (int type) return "/ulz4" VFS_PATH_URL_DELIMITER; case COMPRESSION_LZMA: return "/ulzma" VFS_PATH_URL_DELIMITER; + case COMPRESSION_LZO: + return "/ulzo" VFS_PATH_URL_DELIMITER; case COMPRESSION_XZ: return "/uxz" VFS_PATH_URL_DELIMITER; case COMPRESSION_ZSTD: @@ -1418,8 +1429,8 @@ guess_message_value (void) /* Last possibility is the LANG environment variable. */ "LANG", #if defined(WIN32) //WIN32, config - /* GNU gettext extension. */ - "LANGUAGE", + /* GNU gettext extension. */ + "LANGUAGE", #endif /* NULL exit loops */ NULL diff --git a/mcsrc/lib/util.h b/mcsrc/lib/util.h index 40744f1f..34e790d2 100644 --- a/mcsrc/lib/util.h +++ b/mcsrc/lib/util.h @@ -84,6 +84,7 @@ enum compression_type COMPRESSION_LZIP, COMPRESSION_LZ4, COMPRESSION_LZMA, + COMPRESSION_LZO, COMPRESSION_XZ, COMPRESSION_ZSTD, }; diff --git a/mcsrc/lib/utilunix.c b/mcsrc/lib/utilunix.c index ec5e3f23..c6c78ab3 100644 --- a/mcsrc/lib/utilunix.c +++ b/mcsrc/lib/utilunix.c @@ -1,7 +1,7 @@ /* Various utilities - Unix variants - Copyright (C) 1994-2023 + Copyright (C) 1994-2024 Free Software Foundation, Inc. Written by: diff --git a/mcsrc/lib/vfs/direntry.c b/mcsrc/lib/vfs/direntry.c index 32b8594c..5f9a8efb 100644 --- a/mcsrc/lib/vfs/direntry.c +++ b/mcsrc/lib/vfs/direntry.c @@ -1,7 +1,7 @@ /* Directory cache support - Copyright (C) 1998-2023 + Copyright (C) 1998-2024 Free Software Foundation, Inc. Written by: diff --git a/mcsrc/lib/vfs/gc.c b/mcsrc/lib/vfs/gc.c index 32b9025e..dac2c18b 100644 --- a/mcsrc/lib/vfs/gc.c +++ b/mcsrc/lib/vfs/gc.c @@ -1,7 +1,7 @@ /* Virtual File System garbage collection code - Copyright (C) 2003-2023 + Copyright (C) 2003-2024 Free Software Foundation, Inc. Written by: diff --git a/mcsrc/lib/vfs/interface.c b/mcsrc/lib/vfs/interface.c index 28acfe29..0df1518d 100644 --- a/mcsrc/lib/vfs/interface.c +++ b/mcsrc/lib/vfs/interface.c @@ -1,7 +1,7 @@ /* Virtual File System: interface functions - Copyright (C) 2011-2023 + Copyright (C) 2011-2024 Free Software Foundation, Inc. Written by: diff --git a/mcsrc/lib/vfs/netutil.c b/mcsrc/lib/vfs/netutil.c index 1306879b..3f31d46c 100644 --- a/mcsrc/lib/vfs/netutil.c +++ b/mcsrc/lib/vfs/netutil.c @@ -1,7 +1,7 @@ /* Network utilities for the Midnight Commander Virtual File System. - Copyright (C) 1995-2023 + Copyright (C) 1995-2024 Free Software Foundation, Inc. This file is part of the Midnight Commander. diff --git a/mcsrc/lib/vfs/parse_ls_vga.c b/mcsrc/lib/vfs/parse_ls_vga.c index 2b8d4af8..572b8b21 100644 --- a/mcsrc/lib/vfs/parse_ls_vga.c +++ b/mcsrc/lib/vfs/parse_ls_vga.c @@ -1,7 +1,7 @@ /* Routines for parsing output from the 'ls' command. - Copyright (C) 1988-2023 + Copyright (C) 1988-2024 Free Software Foundation, Inc. Copyright (C) 1995, 1996 Miguel de Icaza @@ -49,7 +49,7 @@ /*** file scope macro definitions ****************************************************************/ -/* Parsing code is used by ftpfs, fish and extfs */ +/* Parsing code is used by ftpfs, shell and extfs */ #define MAXCOLS 30 /*** file scope type declarations ****************************************************************/ diff --git a/mcsrc/lib/vfs/path.c b/mcsrc/lib/vfs/path.c index 746286a4..80b4de4f 100644 --- a/mcsrc/lib/vfs/path.c +++ b/mcsrc/lib/vfs/path.c @@ -1,7 +1,7 @@ /* Virtual File System path handlers - Copyright (C) 2011-2023 + Copyright (C) 2011-2024 Free Software Foundation, Inc. Written by: @@ -602,13 +602,12 @@ vfs_path_tokens_add_class_info (const vfs_path_element_t * element, GString * re g_string_append (ret_tokens, VFS_PATH_URL_DELIMITER); url_str = vfs_path_build_url_params_str (element, TRUE); - if (url_str->len != 0) + if (url_str != NULL) { g_string_append_len (ret_tokens, url_str->str, url_str->len); g_string_append_c (ret_tokens, PATH_SEP); + g_string_free (url_str, TRUE); } - - g_string_free (url_str, TRUE); } #ifdef HAVE_CHARSET @@ -743,13 +742,12 @@ vfs_path_to_str_flags (const vfs_path_t * vpath, int elements_count, vfs_path_fl g_string_append (buffer, VFS_PATH_URL_DELIMITER); url_str = vfs_path_build_url_params_str (element, !(flags & VPF_STRIP_PASSWORD)); - if (url_str->len != 0) + if (url_str != NULL) { g_string_append_len (buffer, url_str->str, url_str->len); g_string_append_c (buffer, PATH_SEP); + g_string_free (url_str, TRUE); } - - g_string_free (url_str, TRUE); } #ifdef HAVE_CHARSET @@ -1598,7 +1596,7 @@ vfs_path_vtokens_get (const vfs_path_t * vpath, ssize_t start_position, ssize_t * @param element path element * @param keep_password TRUE or FALSE * - * @return newly allocated string + * @return newly allocated non-empty string or NULL */ GString * @@ -1637,7 +1635,11 @@ vfs_path_build_url_params_str (const vfs_path_element_t * element, gboolean keep g_string_append_printf (buffer, "%d", element->port); } - return buffer; + if (buffer->len != 0) + return buffer; + + g_string_free (buffer, TRUE); + return NULL; } /* --------------------------------------------------------------------------------------------- */ @@ -1658,14 +1660,16 @@ vfs_path_element_build_pretty_path_str (const vfs_path_element_t * element) g_string_append (pretty_path, VFS_PATH_URL_DELIMITER); url_params = vfs_path_build_url_params_str (element, FALSE); - g_string_append_len (pretty_path, url_params->str, url_params->len); - g_string_free (url_params, TRUE); + if (url_params != NULL) + { + g_string_append_len (pretty_path, url_params->str, url_params->len); + g_string_free (url_params, TRUE); + } if (!IS_PATH_SEP (*element->path)) g_string_append_c (pretty_path, PATH_SEP); - g_string_append (pretty_path, element->path); - return pretty_path; + return g_string_append (pretty_path, element->path); } /* --------------------------------------------------------------------------------------------- */ diff --git a/mcsrc/lib/vfs/utilvfs.c b/mcsrc/lib/vfs/utilvfs.c index f47ee6e4..3d98925c 100644 --- a/mcsrc/lib/vfs/utilvfs.c +++ b/mcsrc/lib/vfs/utilvfs.c @@ -1,7 +1,7 @@ /* Utilities for VFS modules. - Copyright (C) 1988-2023 + Copyright (C) 1988-2024 Free Software Foundation, Inc. Copyright (C) 1995, 1996 Miguel de Icaza @@ -188,7 +188,11 @@ vfs_mkstemps (vfs_path_t ** pname_vpath, const char *prefix, const char *param_b int fd; /* Strip directories */ +#if defined(WIN32) //WIN32, path + p = strrchr2 (param_basename, PATH_SEP, PATH_SEP2); +#else p = strrchr (param_basename, PATH_SEP); +#endif if (p == NULL) p = param_basename; else @@ -253,12 +257,11 @@ vfs_url_split (const char *path, int default_port, vfs_url_flags_t flags) if ((flags & URL_NOSLASH) == 0) { - char *dir = pcopy; + char *dir; /* locate path component */ - while (!IS_PATH_SEP (*dir) && *dir != '\0') //WIN32 - dir++; - if (*dir == '\0') + dir = strchr (pcopy, PATH_SEP); + if (dir == NULL) path_element->path = g_strdup (PATH_SEP_STR); else { diff --git a/mcsrc/lib/vfs/vfs.c b/mcsrc/lib/vfs/vfs.c index 7780a0b4..b9e75824 100644 --- a/mcsrc/lib/vfs/vfs.c +++ b/mcsrc/lib/vfs/vfs.c @@ -1,7 +1,7 @@ /* Virtual File System switch code - Copyright (C) 1995-2023 + Copyright (C) 1995-2024 Free Software Foundation, Inc. Written by: 1995 Miguel de Icaza @@ -363,7 +363,11 @@ vfs_strip_suffix_from_filename (const char *filename) char *vfs_prefix; *semi = '\0'; +#if defined(WIN32) //WIN32, path + vfs_prefix = strrchr2 (p, PATH_SEP, PATH_SEP2); +#else vfs_prefix = strrchr (p, PATH_SEP); +#endif if (vfs_prefix == NULL) *semi = *VFS_PATH_URL_DELIMITER; else diff --git a/mcsrc/lib/vfs/vfs.h b/mcsrc/lib/vfs/vfs.h index 77e819e2..84c31982 100644 --- a/mcsrc/lib/vfs/vfs.h +++ b/mcsrc/lib/vfs/vfs.h @@ -72,7 +72,7 @@ #endif #ifdef EREMOTEIO -#define E_REMOTE EREMOTEIO /* if other side of ftp/fish reports error */ +#define E_REMOTE EREMOTEIO /* if other side of ftp/shell reports error */ #else #define E_REMOTE ENETUNREACH /* :-( there's no EREMOTEIO on some systems */ #endif @@ -137,7 +137,7 @@ typedef struct vfs_class { const char *name; /* "FIles over SHell" */ vfs_flags_t flags; - const char *prefix; /* "fish:" */ + const char *prefix; /* "shell:" */ int verrno; /* can't use errno because glibc2 might define errno as function */ gboolean flush; /* if set to TRUE, invalidate directory cache */ FILE *logfile; diff --git a/mcsrc/lib/vfs/xdirentry.h b/mcsrc/lib/vfs/xdirentry.h index 7d6f8677..bfe6ae6a 100644 --- a/mcsrc/lib/vfs/xdirentry.h +++ b/mcsrc/lib/vfs/xdirentry.h @@ -112,7 +112,7 @@ typedef struct } vfs_file_handler_t; /* - * One of our subclasses (tar, cpio, fish, ftpfs) with data and methods. + * One of our subclasses (tar, cpio, shell, ftpfs) with data and methods. * Extends vfs_class. */ struct vfs_s_subclass diff --git a/mcsrc/lib/widget/background.c b/mcsrc/lib/widget/background.c index 1965dee6..afea8253 100644 --- a/mcsrc/lib/widget/background.c +++ b/mcsrc/lib/widget/background.c @@ -1,7 +1,7 @@ /* Widgets for the Midnight Commander - Copyright (C) 2020-2023 + Copyright (C) 2020-2024 The Free Software Foundation, Inc. Authors: diff --git a/mcsrc/lib/widget/button.c b/mcsrc/lib/widget/button.c index 9f0bfa52..2cdaafc8 100644 --- a/mcsrc/lib/widget/button.c +++ b/mcsrc/lib/widget/button.c @@ -1,7 +1,7 @@ /* Widgets for the Midnight Commander - Copyright (C) 1994-2023 + Copyright (C) 1994-2024 Free Software Foundation, Inc. Authors: diff --git a/mcsrc/lib/widget/buttonbar.c b/mcsrc/lib/widget/buttonbar.c index 45220001..24e4f758 100644 --- a/mcsrc/lib/widget/buttonbar.c +++ b/mcsrc/lib/widget/buttonbar.c @@ -1,7 +1,7 @@ /* Widgets for the Midnight Commander - Copyright (C) 1994-2023 + Copyright (C) 1994-2024 Free Software Foundation, Inc. Authors: diff --git a/mcsrc/lib/widget/check.c b/mcsrc/lib/widget/check.c index 63c55e38..b77573ec 100644 --- a/mcsrc/lib/widget/check.c +++ b/mcsrc/lib/widget/check.c @@ -1,7 +1,7 @@ /* Widgets for the Midnight Commander - Copyright (C) 1994-2023 + Copyright (C) 1994-2024 Free Software Foundation, Inc. Authors: diff --git a/mcsrc/lib/widget/dialog-switch.c b/mcsrc/lib/widget/dialog-switch.c index 959cbf9e..74aedff0 100644 --- a/mcsrc/lib/widget/dialog-switch.c +++ b/mcsrc/lib/widget/dialog-switch.c @@ -3,7 +3,7 @@ Original idea and code: Oleg "Olegarch" Konovalov - Copyright (C) 2009-2023 + Copyright (C) 2009-2024 Free Software Foundation, Inc. Written by: diff --git a/mcsrc/lib/widget/dialog.c b/mcsrc/lib/widget/dialog.c index 3ab2191d..25968575 100644 --- a/mcsrc/lib/widget/dialog.c +++ b/mcsrc/lib/widget/dialog.c @@ -1,7 +1,7 @@ /* Dialog box features module for the Midnight Commander - Copyright (C) 1994-2023 + Copyright (C) 1994-2024 Free Software Foundation, Inc. This file is part of the Midnight Commander. @@ -83,7 +83,7 @@ dlg_default_get_colors (const Widget * w) /* --------------------------------------------------------------------------------------------- */ /** - * Read histories from the ${XDG_CACHE_HOME}/mc/history file + * Read histories from the ${XDG_DATA_HOME}/mc/history file */ static void dlg_read_history (WDialog * h) @@ -122,6 +122,16 @@ refresh_cmd (void) /* --------------------------------------------------------------------------------------------- */ +static void +dlg_help (const WDialog * h) +{ + ev_help_t event_data = { NULL, h->help_ctx }; + + mc_event_raise (MCEVENT_GROUP_CORE, "help", &event_data); +} + +/* --------------------------------------------------------------------------------------------- */ + static cb_ret_t dlg_execute_cmd (WDialog * h, long command) { @@ -152,10 +162,7 @@ dlg_execute_cmd (WDialog * h, long command) break; case CK_Help: - { - ev_help_t event_data = { NULL, h->help_ctx }; - mc_event_raise (MCEVENT_GROUP_CORE, "help", &event_data); - } + dlg_help (h); break; case CK_Suspend: @@ -571,7 +578,7 @@ dlg_run (WDialog * h) /* --------------------------------------------------------------------------------------------- */ /** - * Write history to the ${XDG_CACHE_HOME}/mc/history file + * Write history to the ${XDG_DATA_HOME}/mc/history file */ void dlg_save_history (WDialog * h) diff --git a/mcsrc/lib/widget/frame.c b/mcsrc/lib/widget/frame.c index 31127ab0..127649e4 100644 --- a/mcsrc/lib/widget/frame.c +++ b/mcsrc/lib/widget/frame.c @@ -1,7 +1,7 @@ /* Widgets for the Midnight Commander - Copyright (C) 2020-2023 + Copyright (C) 2020-2024 The Free Software Foundation, Inc. Authors: diff --git a/mcsrc/lib/widget/gauge.c b/mcsrc/lib/widget/gauge.c index 5eebb11c..14b5fa81 100644 --- a/mcsrc/lib/widget/gauge.c +++ b/mcsrc/lib/widget/gauge.c @@ -1,7 +1,7 @@ /* Widgets for the Midnight Commander - Copyright (C) 1994-2023 + Copyright (C) 1994-2024 Free Software Foundation, Inc. Authors: diff --git a/mcsrc/lib/widget/group.c b/mcsrc/lib/widget/group.c index d606a931..77e4ca56 100644 --- a/mcsrc/lib/widget/group.c +++ b/mcsrc/lib/widget/group.c @@ -1,7 +1,7 @@ /* Widget group features module for the Midnight Commander - Copyright (C) 2020-2023 + Copyright (C) 2020-2024 The Free Software Foundation, Inc. Written by: diff --git a/mcsrc/lib/widget/groupbox.c b/mcsrc/lib/widget/groupbox.c index 49cf7b01..4f6a0214 100644 --- a/mcsrc/lib/widget/groupbox.c +++ b/mcsrc/lib/widget/groupbox.c @@ -1,7 +1,7 @@ /* Widgets for the Midnight Commander - Copyright (C) 1994-2023 + Copyright (C) 1994-2024 Free Software Foundation, Inc. Authors: diff --git a/mcsrc/lib/widget/history.c b/mcsrc/lib/widget/history.c index 8197db86..7076d137 100644 --- a/mcsrc/lib/widget/history.c +++ b/mcsrc/lib/widget/history.c @@ -1,7 +1,7 @@ /* Widgets for the Midnight Commander - Copyright (C) 1994-2023 + Copyright (C) 1994-2024 Free Software Foundation, Inc. Authors: diff --git a/mcsrc/lib/widget/hline.c b/mcsrc/lib/widget/hline.c index 73e261a2..0f77a84f 100644 --- a/mcsrc/lib/widget/hline.c +++ b/mcsrc/lib/widget/hline.c @@ -1,7 +1,7 @@ /* Widgets for the Midnight Commander - Copyright (C) 1994-2023 + Copyright (C) 1994-2024 Free Software Foundation, Inc. Authors: diff --git a/mcsrc/lib/widget/input.c b/mcsrc/lib/widget/input.c index 3a67b497..a7ad7f5a 100644 --- a/mcsrc/lib/widget/input.c +++ b/mcsrc/lib/widget/input.c @@ -1,7 +1,7 @@ /* Widgets for the Midnight Commander - Copyright (C) 1994-2023 + Copyright (C) 1994-2024 Free Software Foundation, Inc. Authors: diff --git a/mcsrc/lib/widget/input_complete.c b/mcsrc/lib/widget/input_complete.c index 4c550fc8..c91cb8d1 100644 --- a/mcsrc/lib/widget/input_complete.c +++ b/mcsrc/lib/widget/input_complete.c @@ -2,7 +2,7 @@ Input line filename/username/hostname/variable/command completion. (Let mc type for you...) - Copyright (C) 1995-2023 + Copyright (C) 1995-2024 Free Software Foundation, Inc. Written by: @@ -100,7 +100,6 @@ static char **hosts = NULL; static char **hosts_p = NULL; static int hosts_alloclen = 0; -static int complete_height, complete_width; static WInput *input; static int min_end; static int start = 0; @@ -1281,11 +1280,9 @@ complete_engine (WInput * in, int what_to_do) input = in; min_end = end; - complete_height = h; - complete_width = w; complete_dlg = - dlg_create (TRUE, y, x, complete_height, complete_width, WPOS_KEEP_DEFAULT, TRUE, + dlg_create (TRUE, y, x, h, w, WPOS_KEEP_DEFAULT, TRUE, dialog_colors, complete_callback, NULL, "[Completion]", NULL); complete_list = listbox_new (1, 1, h - 2, w - 2, FALSE, NULL); group_add_widget (GROUP (complete_dlg), complete_list); diff --git a/mcsrc/lib/widget/label.c b/mcsrc/lib/widget/label.c index 5a04a0f0..4cde1900 100644 --- a/mcsrc/lib/widget/label.c +++ b/mcsrc/lib/widget/label.c @@ -1,7 +1,7 @@ /* Widgets for the Midnight Commander - Copyright (C) 1994-2023 + Copyright (C) 1994-2024 Free Software Foundation, Inc. Authors: diff --git a/mcsrc/lib/widget/listbox-window.c b/mcsrc/lib/widget/listbox-window.c index 47d7f8b7..7cad8720 100644 --- a/mcsrc/lib/widget/listbox-window.c +++ b/mcsrc/lib/widget/listbox-window.c @@ -1,7 +1,7 @@ /* Widget based utility functions. - Copyright (C) 1994-2023 + Copyright (C) 1994-2024 Free Software Foundation, Inc. Authors: diff --git a/mcsrc/lib/widget/listbox.c b/mcsrc/lib/widget/listbox.c index 9f25487c..76f07ad6 100644 --- a/mcsrc/lib/widget/listbox.c +++ b/mcsrc/lib/widget/listbox.c @@ -1,7 +1,7 @@ /* Widgets for the Midnight Commander - Copyright (C) 1994-2023 + Copyright (C) 1994-2024 Free Software Foundation, Inc. Authors: diff --git a/mcsrc/lib/widget/menu.c b/mcsrc/lib/widget/menu.c index 4a30c024..b27c4c3a 100644 --- a/mcsrc/lib/widget/menu.c +++ b/mcsrc/lib/widget/menu.c @@ -1,7 +1,7 @@ /* Pulldown menu code - Copyright (C) 1994-2023 + Copyright (C) 1994-2024 Free Software Foundation, Inc. Written by: @@ -530,6 +530,24 @@ menubar_try_exec_menu (WMenuBar * menubar, int hotkey) /* --------------------------------------------------------------------------------------------- */ +static void +menubar_help (const WMenuBar * menubar) +{ + ev_help_t event_data; + + event_data.filename = NULL; + + if (menubar->is_dropped) + event_data.node = MENU (g_list_nth_data (menubar->menu, menubar->current))->help_node; + else + event_data.node = "[Menu Bar]"; + + mc_event_raise (MCEVENT_GROUP_CORE, "help", &event_data); + menubar_draw (menubar); +} + +/* --------------------------------------------------------------------------------------------- */ + static cb_ret_t menubar_execute_cmd (WMenuBar * menubar, long command) { @@ -538,18 +556,7 @@ menubar_execute_cmd (WMenuBar * menubar, long command) switch (command) { case CK_Help: - { - ev_help_t event_data = { NULL, NULL }; - - if (menubar->is_dropped) - event_data.node = - MENU (g_list_nth_data (menubar->menu, menubar->current))->help_node; - else - event_data.node = "[Menu Bar]"; - - mc_event_raise (MCEVENT_GROUP_CORE, "help", &event_data); - menubar_draw (menubar); - } + menubar_help (menubar); break; case CK_Left: diff --git a/mcsrc/lib/widget/mouse.c b/mcsrc/lib/widget/mouse.c index 15ad5f5a..2183903c 100644 --- a/mcsrc/lib/widget/mouse.c +++ b/mcsrc/lib/widget/mouse.c @@ -1,7 +1,7 @@ /* Widgets for the Midnight Commander - Copyright (C) 2016-2023 + Copyright (C) 2016-2024 Free Software Foundation, Inc. Authors: diff --git a/mcsrc/lib/widget/quick.c b/mcsrc/lib/widget/quick.c index 35f5d680..3a6d165b 100644 --- a/mcsrc/lib/widget/quick.c +++ b/mcsrc/lib/widget/quick.c @@ -1,7 +1,7 @@ /* Widget based utility functions. - Copyright (C) 1994-2023 + Copyright (C) 1994-2024 Free Software Foundation, Inc. Authors: diff --git a/mcsrc/lib/widget/radio.c b/mcsrc/lib/widget/radio.c index 8fb52d8b..94463f62 100644 --- a/mcsrc/lib/widget/radio.c +++ b/mcsrc/lib/widget/radio.c @@ -1,7 +1,7 @@ /* Widgets for the Midnight Commander - Copyright (C) 1994-2023 + Copyright (C) 1994-2024 Free Software Foundation, Inc. Authors: diff --git a/mcsrc/lib/widget/rect.c b/mcsrc/lib/widget/rect.c index 34ae8b05..8c2d4641 100644 --- a/mcsrc/lib/widget/rect.c +++ b/mcsrc/lib/widget/rect.c @@ -1,6 +1,6 @@ /* Rectangular class for Midnight Commander widgets - Copyright (C) 2020-2023 + Copyright (C) 2020-2024 The Free Software Foundation, Inc. Written by: diff --git a/mcsrc/lib/widget/widget-common.c b/mcsrc/lib/widget/widget-common.c index 821b7b31..459de104 100644 --- a/mcsrc/lib/widget/widget-common.c +++ b/mcsrc/lib/widget/widget-common.c @@ -1,7 +1,7 @@ /* Widgets for the Midnight Commander - Copyright (C) 1994-2023 + Copyright (C) 1994-2024 Free Software Foundation, Inc. Authors: diff --git a/mcsrc/lib/widget/wtools.c b/mcsrc/lib/widget/wtools.c index bc3a7cef..90aeb49f 100644 --- a/mcsrc/lib/widget/wtools.c +++ b/mcsrc/lib/widget/wtools.c @@ -1,7 +1,7 @@ /* Widget based utility functions. - Copyright (C) 1994-2023 + Copyright (C) 1994-2024 Free Software Foundation, Inc. Authors: diff --git a/mcsrc/m4.include/mc-ext2fs-attr.m4 b/mcsrc/m4.include/mc-ext2fs-attr.m4 index 6a57cd5e..42e4a292 100644 --- a/mcsrc/m4.include/mc-ext2fs-attr.m4 +++ b/mcsrc/m4.include/mc-ext2fs-attr.m4 @@ -12,9 +12,8 @@ AC_DEFUN([mc_EXT2FS_ATTR], if test x"$found_e2p" = "xyes"; then AC_DEFINE(ENABLE_EXT2FS_ATTR, 1, [Define to enable support for ext2fs attributes]) - AC_SUBST(EXT2FS_CFLAGS) - AC_SUBST(E2P_CFLAGS) MCLIBS="$MCLIBS $E2P_LIBS" + CPPFLAGS="$CPPFLAGS $EXT2FS_CFLAGS $E2P_CFLAGS" ext2fs_attr_msg="yes" else AC_MSG_WARN([e2p library not found or version too old (must be >= 1.42.4)]) diff --git a/mcsrc/m4.include/mc-glib.m4 b/mcsrc/m4.include/mc-glib.m4 index 40082072..f93962f0 100644 --- a/mcsrc/m4.include/mc-glib.m4 +++ b/mcsrc/m4.include/mc-glib.m4 @@ -8,12 +8,12 @@ AC_DEFUN([mc_G_MODULE_SUPPORTED], [ g_module_supported="" found_gmodule=no - PKG_CHECK_MODULES(GMODULE, [gmodule-no-export-2.0 >= 2.30], [found_gmodule=yes], [:]) + PKG_CHECK_MODULES(GMODULE, [gmodule-no-export-2.0 >= 2.32], [found_gmodule=yes], [:]) if test x"$found_gmodule" = xyes; then g_module_supported="gmodule-no-export-2.0" else dnl try fallback to the generic gmodule - PKG_CHECK_MODULES(GMODULE, [gmodule-2.0 >= 2.30], [found_gmodule=yes], [:]) + PKG_CHECK_MODULES(GMODULE, [gmodule-2.0 >= 2.32], [found_gmodule=yes], [:]) if test x"$found_gmodule" = xyes; then g_module_supported="gmodule-2.0" fi @@ -78,9 +78,9 @@ AC_DEFUN([mc_CHECK_GLIB], [ AS_HELP_STRING([--with-glib-static], [Link glib statically @<:@no@:>@])) glib_found=no - PKG_CHECK_MODULES(GLIB, [glib-2.0 >= 2.30], [glib_found=yes], [:]) + PKG_CHECK_MODULES(GLIB, [glib-2.0 >= 2.32], [glib_found=yes], [:]) if test x"$glib_found" = xno; then - AC_MSG_ERROR([glib-2.0 not found or version too old (must be >= 2.30)]) + AC_MSG_ERROR([glib-2.0 not found or version too old (must be >= 2.32)]) fi ]) diff --git a/mcsrc/m4.include/mc-vfs.m4 b/mcsrc/m4.include/mc-vfs.m4 index f14fcfee..82567bda 100644 --- a/mcsrc/m4.include/mc-vfs.m4 +++ b/mcsrc/m4.include/mc-vfs.m4 @@ -13,7 +13,7 @@ m4_include([m4.include/vfs/mc-vfs-extfs.m4]) m4_include([m4.include/vfs/mc-vfs-sfs.m4]) m4_include([m4.include/vfs/mc-vfs-ftp.m4]) m4_include([m4.include/vfs/mc-vfs-sftp.m4]) -m4_include([m4.include/vfs/mc-vfs-fish.m4]) +m4_include([m4.include/vfs/mc-vfs-shell.m4]) m4_include([m4.include/vfs/mc-vfs-undelfs.m4]) m4_include([m4.include/vfs/mc-vfs-tarfs.m4]) m4_include([m4.include/vfs/mc-vfs-cpiofs.m4]) @@ -71,7 +71,7 @@ AC_DEFUN([mc_VFS_CHECKS], mc_VFS_CPIOFS mc_VFS_EXTFS - mc_VFS_FISH + mc_VFS_SHELL mc_VFS_FTP mc_VFS_SFS mc_VFS_SFTP @@ -80,7 +80,7 @@ AC_DEFUN([mc_VFS_CHECKS], AM_CONDITIONAL(ENABLE_VFS, [test x"$enable_vfs" = x"yes"]) - if test x"$enable_vfs_ftp" = x"yes" -o x"$enable_vfs_fish" = x"yes" -o x"$enable_vfs_sftp" = x"yes"; then + if test x"$enable_vfs_ftp" = x"yes" -o x"$enable_vfs_shell" = x"yes" -o x"$enable_vfs_sftp" = x"yes"; then mc_ENABLE_VFS_NET fi diff --git a/mcsrc/m4.include/vfs/mc-vfs-shell.m4 b/mcsrc/m4.include/vfs/mc-vfs-shell.m4 new file mode 100644 index 00000000..b07b22b3 --- /dev/null +++ b/mcsrc/m4.include/vfs/mc-vfs-shell.m4 @@ -0,0 +1,12 @@ +dnl Enable SHELL protocol +AC_DEFUN([mc_VFS_SHELL], +[ + AC_ARG_ENABLE([vfs-shell], + AS_HELP_STRING([--enable-vfs-shell], [Support for SHELL filesystem @<:@yes@:>@])) + if test "$enable_vfs" = "yes" -a "x$enable_vfs_shell" != xno; then + enable_vfs_shell="yes" + mc_VFS_ADDNAME([shell]) + AC_DEFINE([ENABLE_VFS_SHELL], [1], [Support for SHELL vfs]) + fi + AM_CONDITIONAL(ENABLE_VFS_SHELL, [test "$enable_vfs" = "yes" -a x"$enable_vfs_shell" = x"yes"]) +]) diff --git a/mcsrc/maint/utils/update-years.sh b/mcsrc/maint/utils/update-years.sh index b14b128f..efe16a4f 100644 --- a/mcsrc/maint/utils/update-years.sh +++ b/mcsrc/maint/utils/update-years.sh @@ -3,19 +3,20 @@ YEAR=`date +%Y` SOURCES="`find lib src tests -name '*.c'`" +SOURCES="$SOURCES src/man2hlp/man2hlp.in" LINE="Copyright (C)" -for i in "$SOURCES"; do +for i in $SOURCES; do # replace year: XXXX-YYYY -> XXXX-ZZZZ # add year: XXXX -> XXXX-ZZZZ - ${SED-sed} -i -e " + ${SED-sed} -e " 1,20 { /$LINE/s/-[0-9]\{4\}$/-$YEAR/ }; 1,20 { /$LINE/s/ [0-9]\{4\}$/&-$YEAR/ - }" $i + }" $i > $i.tmp && mv -f $i.tmp $i done # special case diff --git a/mcsrc/misc/ext.d/archive.sh b/mcsrc/misc/ext.d/archive.sh index 840fd471..12beb015 100644 --- a/mcsrc/misc/ext.d/archive.sh +++ b/mcsrc/misc/ext.d/archive.sh @@ -32,6 +32,9 @@ do_view_action() { lzma) lzma -dc "${MC_EXT_FILENAME}" 2>/dev/null ;; + lzo) + lzop -dc "${MC_EXT_FILENAME}" 2>/dev/null + ;; xz) xz -dc "${MC_EXT_FILENAME}" 2>/dev/null ;; @@ -65,6 +68,10 @@ do_view_action() { lzma -dc "${MC_EXT_FILENAME}" 2>/dev/null | \ tar tvvf - ;; + tar.lzo|tzo) + lzop -dc "${MC_EXT_FILENAME}" 2>/dev/null | \ + tar tvvf - + ;; tar.xz) xz -dc "${MC_EXT_FILENAME}" 2>/dev/null | \ tar tvvf - @@ -114,6 +121,10 @@ do_view_action() { lz4 -dc "${MC_EXT_FILENAME}" | \ cpio -itv 2>/dev/null ;; + cpio.lzo) + lzop -dc "${MC_EXT_FILENAME}" | \ + cpio -itv 2>/dev/null + ;; cpio.xz) xz -dc "${MC_EXT_FILENAME}" | \ cpio -itv 2>/dev/null @@ -177,6 +188,9 @@ do_open_action() { lzma) lzma -dc "${MC_EXT_FILENAME}" | ${pager} ;; + lzo) + lzop -dc "${MC_EXT_FILENAME}" | ${pager} + ;; xz) xz -dc "${MC_EXT_FILENAME}" | ${pager} ;; diff --git a/mcsrc/misc/ext.d/image.sh b/mcsrc/misc/ext.d/image.sh index 04307e01..c191225c 100644 --- a/mcsrc/misc/ext.d/image.sh +++ b/mcsrc/misc/ext.d/image.sh @@ -12,14 +12,19 @@ do_view_action() { filetype=$1 case "${filetype}" in - jpeg) - identify "${MC_EXT_FILENAME}" - which exif >/dev/null 2>&1 && exif "${MC_EXT_FILENAME}" 2>/dev/null - ;; xpm) - sxpm "${MC_EXT_FILENAME}" + [ -n "$DISPLAY" ] && sxpm "${MC_EXT_FILENAME}" ;; *) + if which exif >/dev/null 2>&1; then + exif "${MC_EXT_FILENAME}" 2>/dev/null + E=$? + else + E=1 + fi + if [ $E != 0 ] && which exiftool >/dev/null 2>&1; then + exiftool "${MC_EXT_FILENAME}" 2>/dev/null + fi identify "${MC_EXT_FILENAME}" ;; esac diff --git a/mcsrc/misc/ext.d/text.sh.in b/mcsrc/misc/ext.d/text.sh.in index 2bd6ca05..357f9e11 100644 --- a/mcsrc/misc/ext.d/text.sh.in +++ b/mcsrc/misc/ext.d/text.sh.in @@ -31,6 +31,9 @@ get_unpacker() { man.lzma) unpacker="lzma -dc" ;; + man.lzo) + unpacker="lzop -dc" + ;; man.xz) unpacker="xz -dc" ;; @@ -67,7 +70,7 @@ do_view_action() { nroff.ms) nroff @MAN_FLAGS@ -ms "${MC_EXT_FILENAME}" ;; - man.gz|man.bz|man.bz2|man.lz|man.lz4|man.lzma|man.xz|man.zst) + man.gz|man.bz|man.bz2|man.lz|man.lz4|man.lzma|man.lzo|man.xz|man.zst) case "${MC_EXT_FILENAME}" in */log/*|*/logs/*) ${unpacker} "${MC_EXT_FILENAME}" @@ -114,7 +117,7 @@ do_open_action() { nroff.ms) nroff @MAN_FLAGS@ -ms "${MC_EXT_FILENAME}" | ${pager} ;; - man.gz|man.bz|man.bz2|man.lz|man.lz4|man.lzma|man.xz|man.zst) + man.gz|man.bz|man.bz2|man.lz|man.lz4|man.lzma|man.lzo|man.xz|man.zst) case "${MC_EXT_FILENAME}" in */log/*|*/logs/*) ${unpacker} "${MC_EXT_FILENAME}" diff --git a/mcsrc/misc/filehighlight.ini b/mcsrc/misc/filehighlight.ini index c31f562e..28824238 100644 --- a/mcsrc/misc/filehighlight.ini +++ b/mcsrc/misc/filehighlight.ini @@ -25,7 +25,7 @@ regexp=(^#.*|.*~$) [archive] - extensions=7z;Z;ace;apk;arc;arj;ark;bz2;cab;cpio;deb;gz;lha;lz;lz4;lzh;lzma;rar;rpm;tar;tbz;tbz2;tgz;tlz;txz;tzst;vsix;xz;zip;zoo;zst + extensions=7z;Z;ace;apk;arc;arj;ark;bz2;cab;cpio;deb;gz;lha;lz;lz4;lzh;lzma;lzo;rar;rpm;tar;tbz;tbz2;tgz;tlz;txz;tzo;tzst;vsix;xz;zip;zoo;zst [doc] extensions=chm;css;ctl;diz;doc;docm;docx;dtd;fodg;fodp;fods;fodt;htm;html;json;letter;lsm;mail;man;markdown;md;me;mkd;msg;nroff;odg;odp;ods;odt;pdf;po;ppt;pptm;pptx;ps;rtf;sgml;shtml;tex;text;txt;xls;xlsm;xlsx;xml;xsd;xslt diff --git a/mcsrc/misc/mc.default.keymap b/mcsrc/misc/mc.default.keymap index a39eb5d3..6e7e8bd4 100644 --- a/mcsrc/misc/mc.default.keymap +++ b/mcsrc/misc/mc.default.keymap @@ -50,14 +50,11 @@ ScreenList = alt-prime # EditExtensionsFile = # EditFileHighlightFile = # Filter = -# ConnectFish = +# ConnectShell = # ConnectFtp = # Undelete = EditorViewerHistory = alt-shift-e ExtendedKeyMap = ctrl-x -DriveChange = alt-d -DriveChangeA = alt-f1 -DriveChangeB = alt-f2 [filemanager:xmap] ChangeMode = c @@ -133,8 +130,6 @@ Bottom = alt-gt; end; c1 # Filter = # ScrollLeft = # ScrollRight = -DriveChangeA = alt-f1 -DriveChangeB = alt-f2 [dialog] Ok = enter diff --git a/mcsrc/misc/mc.emacs.keymap b/mcsrc/misc/mc.emacs.keymap index dd7c80e8..53c47494 100644 --- a/mcsrc/misc/mc.emacs.keymap +++ b/mcsrc/misc/mc.emacs.keymap @@ -50,12 +50,11 @@ ScreenList = alt-prime # EditExtensionsFile = # EditFileHighlightFile = # Filter = -# ConnectFish = +# ConnectShell = # ConnectFtp = # Undelete = EditorViewerHistory = alt-shift-e ExtendedKeyMap = ctrl-x -DriveChange = alt-d [filemanager:xmap] ChangeMode = c diff --git a/mcsrc/misc/mc.ext.ini.in b/mcsrc/misc/mc.ext.ini.in index 87dc1d2f..c2152ee4 100644 --- a/mcsrc/misc/mc.ext.ini.in +++ b/mcsrc/misc/mc.ext.ini.in @@ -26,8 +26,8 @@ # Section [Include/xxxx] can be located as before as after sections that point to it. # # Sections are processed from top to bottom, thus the order is important. -# If there are more than one sections with the same name in this file, the first -# section will be used. +# Multiple sections with the same name are allowed, they are merged together. +# Sections may contain the same key multiple times; the last entry wins. # # [Default] should be a catch-all action and come last. # @@ -57,8 +57,12 @@ # the literal | and | has a special meaning (or), and () have a special meaning # and \( \) stand for literal ( ). # +# An unescaped backslash \ is handled as invalid escape sequences in glib = 2.77.3 and +# glib >= 2.79 (https://gitlab.gnome.org/GNOME/glib/-/issues/3094), therefore backslash +# must be escaped. +# # Example: -# Regex=\.t(ar\.lzma|lz)$ +# Regex=\\.t(ar\\.lzma|lz)$ # matches *.tar.lzma or *.tlz. # # RegexIgnoreCase [true|false] @@ -188,7 +192,7 @@ Version=4.0 ### GIT Repo ### [gitfs changeset] -Regex=^\[git\] +Regex=^\\[git\\] Open=%cd %p/changesetfs:// View=%cd %p/patchsetfs:// @@ -200,7 +204,7 @@ View=%cd %p/patchsetfs:// # .tgz, .tpz, .tar.gz, .tar.z, .tar.Z [tar.gzip] -Regex=\.t([gp]?z|ar\.g?[zZ])$ +Regex=\\.t([gp]?z|ar\\.g?[zZ])$ Include=tar.gz [ipk] @@ -217,13 +221,13 @@ Shell=.tar.bz View=%view{ascii} @EXTHELPERSDIR@/archive.sh view tar.bzip [tar.bzip2] -Regex=\.t(ar\.bz2|bz2?|b2)$ +Regex=\\.t(ar\\.bz2|bz2?|b2)$ Open=%cd %p/utar:// View=%view{ascii} @EXTHELPERSDIR@/archive.sh view tar.bzip2 # .tar.lzma, .tlz [tar.lzma] -Regex=\.t(ar\.lzma|lz)$ +Regex=\\.t(ar\\.lzma|lz)$ Open=%cd %p/utar:// View=%view{ascii} @EXTHELPERSDIR@/archive.sh view tar.lzma @@ -234,19 +238,25 @@ View=%view{ascii} @EXTHELPERSDIR@/archive.sh view tar.lz # .tar.lz4, .tlz4 [tar.lz4] -Regex=\.t(ar\.lz4|lz4)$ +Regex=\\.t(ar\\.lz4|lz4)$ Open=%cd %p/utar:// View=%view{ascii} @EXTHELPERSDIR@/archive.sh view tar.lz4 +# .tar.lzo, .tzo +[tar.lzo] +Regex=\\.t(ar\\.lzo|zo)$ +Open=%cd %p/utar:// +View=%view{ascii} @EXTHELPERSDIR@/archive.sh view tar.lzo + # .tar.xz, .txz [tar.xz] -Regex=\.t(ar\.xz|xz)$ +Regex=\\.t(ar\\.xz|xz)$ Open=%cd %p/utar:// View=%view{ascii} @EXTHELPERSDIR@/archive.sh view tar.xz # .tar.zst, .tzst [tar.zst] -Regex=\.t(ar\.zst|zst)$ +Regex=\\.t(ar\\.zst|zst)$ Open=%cd %p/utar:// View=%view{ascii} @EXTHELPERSDIR@/archive.sh view tar.zst @@ -258,7 +268,7 @@ View=%view{ascii} @EXTHELPERSDIR@/archive.sh view tar.F # .qpr/.qpk - QNX Neutrino package installer files [tar.qpr] -Regex=\.qp[rk]$ +Regex=\\.qp[rk]$ Open=%cd %p/utar:// View=%view{ascii} @EXTHELPERSDIR@/archive.sh view tar.qpr @@ -269,7 +279,7 @@ Open=%cd %p/utar:// View=%view{ascii} @EXTHELPERSDIR@/archive.sh view tar [arj] -Regex=\.a(rj|[0-9][0-9])$ +Regex=\\.a(rj|[0-9][0-9])$ RegexIgnoreCase=true Open=%cd %p/uarj:// View=%view{ascii} @EXTHELPERSDIR@/archive.sh view arj @@ -287,7 +297,7 @@ Open=%cd %p/uha:// View=%view{ascii} @EXTHELPERSDIR@/archive.sh view ha [rar] -Regex=\.r(ar|[0-9][0-9])$ +Regex=\\.r(ar|[0-9][0-9])$ RegexIgnoreCase=true Open=%cd %p/urar:// View=%view{ascii} @EXTHELPERSDIR@/archive.sh view rar @@ -314,6 +324,11 @@ Shell=.cpio.lz4 Open=%cd %p/ucpio:// View=%view{ascii} @EXTHELPERSDIR@/archive.sh view cpio.lz4 +[cpio.lzo] +Shell=.cpio.lzo +Open=%cd %p/ucpio:// +View=%view{ascii} @EXTHELPERSDIR@/archive.sh view cpio.lzo + [cpio.xz] Shell=.cpio.xz Open=%cd %p/ucpio:// @@ -335,7 +350,7 @@ ShellIgnoreCase=true Include=cpio [initrd] -Regex=^(initramfs.*\.img|initrd(-.+)?\.img(-.+)?)$ +Regex=^(initramfs.*\\.img|initrd(-.+)?\\.img(-.+)?)$ Include=cpio [7zip] @@ -345,32 +360,32 @@ Open=%cd %p/u7z:// View=%view{ascii} @EXTHELPERSDIR@/archive.sh view 7z [patch] -Regex=\.(diff|patch)$ +Regex=\\.(diff|patch)$ Open=%cd %p/patchfs:// View=%view{ascii} @EXTHELPERSDIR@/misc.sh view cat [patch.gz] -Regex=\.(diff|patch)\.(gz|Z)$ +Regex=\\.(diff|patch)\\.(gz|Z)$ Open=%cd %p/patchfs:// View=%view{ascii} @EXTHELPERSDIR@/archive.sh view gz [patch.bz2] -Regex=\.(diff|patch)\.bz2$ +Regex=\\.(diff|patch)\\.bz2$ Open=%cd %p/patchfs:// View=%view{ascii} @EXTHELPERSDIR@/archive.sh view bz2 [patch.xz] -Regex=\.(diff|patch)\.xz$ +Regex=\\.(diff|patch)\\.xz$ Open=%cd %p/patchfs:// View=%view{ascii} @EXTHELPERSDIR@/archive.sh view xz [patch.zst] -Regex=\.(diff|patch)\.zst$ +Regex=\\.(diff|patch)\\.zst$ Open=%cd %p/patchfs:// View=%view{ascii} @EXTHELPERSDIR@/archive.sh view zst [ls-lR] -Regex=(^|\.)ls-?lR(\.gz|Z|bz2)$ +Regex=(^|\\.)ls-?lR(\\.gz|Z|bz2)$ Open=%cd %p/lslR:// [trpm] @@ -380,7 +395,7 @@ View=%view{ascii} @EXTHELPERSDIR@/package.sh view trpm # RPM packages (SuSE uses *.spm for source packages) [src.rpm] -Regex=\.(src\.rpm|spm)$ +Regex=\\.(src\\.rpm|spm)$ Open=%cd %p/rpm:// View=%view{ascii} @EXTHELPERSDIR@/package.sh view src.rpm @@ -390,7 +405,7 @@ Open=%cd %p/rpm:// View=%view{ascii} @EXTHELPERSDIR@/package.sh view rpm [deb] -Regex=\.u?deb$ +Regex=\\.u?deb$ Open=%cd %p/deb:// View=%view{ascii} @EXTHELPERSDIR@/package.sh view deb @@ -411,7 +426,7 @@ Open=%cd %p/iso9660:// View=%view{ascii} @EXTHELPERSDIR@/misc.sh view iso9660 [ar] -Regex=\.s?a$ +Regex=\\.s?a$ Open=%cd %p/uar:// #Open=%view{ascii} ar tv %f View=%view{ascii} @EXTHELPERSDIR@/misc.sh view ar @@ -425,12 +440,12 @@ View=%view{ascii} @EXTHELPERSDIR@/misc.sh view lib ### Sources ### [C/C++] -Regex=\.(c|cc|cpp|cxx|c\+\+)$ +Regex=\\.(c|cc|cpp|cxx|c\\+\\+)$ RegexIgnoreCase=true Include=editor [C/C++ header] -Regex=\.(h|hh|hpp|hxx|h\+\+)$ +Regex=\\.(h|hh|hpp|hxx|h\\+\\+)$ RegexIgnoreCase=true Include=editor @@ -440,7 +455,7 @@ ShellIgnoreCase=true Include=editor [Assembler] -Regex=\.(s|asm)$ +Regex=\\.(s|asm)$ RegexIgnoreCase=true Include=editor @@ -452,19 +467,19 @@ Include=editor # .so libraries [so] -Regex=\.(so|so\.[0-9\.]*)$ +Regex=\\.(so|so\\.[0-9\\.]*)$ View=%view{ascii} @EXTHELPERSDIR@/misc.sh view so # .dylib libraries [dylib] -Regex=\.(dylib|dylib\.[0-9\.]*)$ +Regex=\\.(dylib|dylib\\.[0-9\\.]*)$ View=%view{ascii} @EXTHELPERSDIR@/misc.sh view dylib ### Documentation ### #[Texinfo] -#Regex=\.(te?xi|texinfo)$ +#Regex=\\.(te?xi|texinfo)$ [info-by-shell] Shell=.info @@ -497,27 +512,32 @@ View=%view{ascii,nroff} @EXTHELPERSDIR@/text.sh view nroff.ms %var{PAGER:more} # Manual page [man.lz] -Regex=([^0-9]|^[^\.]*)\.([1-9][A-Za-z]*|[ln])\.lz$ +Regex=([^0-9]|^[^\\.]*)\\.([1-9][A-Za-z]*|[ln])\\.lz$ Open=@EXTHELPERSDIR@/text.sh open man.lz %var{PAGER:more} View=%view{ascii,nroff} @EXTHELPERSDIR@/text.sh view man.lz %var{PAGER:more} [man.lz4] -Regex=([^0-9]|^[^\.]*)\.([1-9][A-Za-z]*|[ln])\.lz4$ +Regex=([^0-9]|^[^\\.]*)\\.([1-9][A-Za-z]*|[ln])\\.lz4$ Open=@EXTHELPERSDIR@/text.sh open man.lz4 %var{PAGER:more} View=%view{ascii,nroff} @EXTHELPERSDIR@/text.sh view man.lz4 %var{PAGER:more} [man.lzma] -Regex=([^0-9]|^[^\.]*)\.([1-9][A-Za-z]*|[ln])\.lzma$ +Regex=([^0-9]|^[^\\.]*)\\.([1-9][A-Za-z]*|[ln])\\.lzma$ Open=@EXTHELPERSDIR@/text.sh open man.lzma %var{PAGER:more} View=%view{ascii,nroff} @EXTHELPERSDIR@/text.sh view man.lzma %var{PAGER:more} +[man.lzo] +Regex=([^0-9]|^[^\\.]*)\\.([1-9][A-Za-z]*|[ln])\\.lzo$ +Open=@EXTHELPERSDIR@/text.sh open man.lzo %var{PAGER:more} +View=%view{ascii,nroff} @EXTHELPERSDIR@/text.sh view man.lzo %var{PAGER:more} + [man.xz] -Regex=([^0-9]|^[^\.]*)\.([1-9][A-Za-z]*|[ln])\.xz$ +Regex=([^0-9]|^[^\\.]*)\\.([1-9][A-Za-z]*|[ln])\\.xz$ Open=@EXTHELPERSDIR@/text.sh open man.xz %var{PAGER:more} View=%view{ascii,nroff} @EXTHELPERSDIR@/text.sh view man.xz %var{PAGER:more} [man.zst] -Regex=([^0-9]|^[^\.]*)\.([1-9][A-Za-z]*|[ln])\.zst$ +Regex=([^0-9]|^[^\\.]*)\\.([1-9][A-Za-z]*|[ln])\\.zst$ Open=@EXTHELPERSDIR@/text.sh open man.zst %var{PAGER:more} View=%view{ascii,nroff} @EXTHELPERSDIR@/text.sh view man.zst %var{PAGER:more} @@ -556,17 +576,26 @@ ShellIgnoreCase=true View=%view{ascii} @EXTHELPERSDIR@/image.sh view svg Open=@EXTHELPERSDIR@/image.sh open svg +[webp] +Shell=.webp +View=%view{ascii} @EXTHELPERSDIR@/image.sh view webp +Open=@EXTHELPERSDIR@/image.sh open webp + +[avif] +Shell=.avif +View=%view{ascii} @EXTHELPERSDIR@/image.sh view avif +Open=@EXTHELPERSDIR@/image.sh open avif ### Sound files ### [sound] -Regex=\.(wav|snd|voc|au|smp|aiff|snd|m4a|ape|aac|wv|spx|flac)$ +Regex=\\.(wav|snd|voc|au|smp|aiff|snd|m4a|ape|aac|wv|spx|flac)$ RegexIgnoreCase=true Open=@EXTHELPERSDIR@/sound.sh open common View=%view{ascii} @EXTHELPERSDIR@/sound.sh view common [mod] -Regex=\.(mod|s3m|xm|it|mtm|669|stm|ult|far)$ +Regex=\\.(mod|s3m|xm|it|mtm|669|stm|ult|far)$ RegexIgnoreCase=true Open=@EXTHELPERSDIR@/sound.sh open mod @@ -582,7 +611,7 @@ Open=@EXTHELPERSDIR@/sound.sh open mp3 View=%view{ascii} @EXTHELPERSDIR@/sound.sh view mp3 [ogg] -Regex=\.og[gax]$ +Regex=\\.og[gax]$ RegexIgnoreCase=true Open=@EXTHELPERSDIR@/sound.sh open ogg View=%view{ascii} @EXTHELPERSDIR@/sound.sh view ogg @@ -594,7 +623,7 @@ Open=@EXTHELPERSDIR@/sound.sh open opus View=%view{ascii} @EXTHELPERSDIR@/sound.sh view opus [midi] -Regex=\.(midi?|rmid?)$ +Regex=\\.(midi?|rmid?)$ RegexIgnoreCase=true Open=@EXTHELPERSDIR@/sound.sh open midi @@ -606,7 +635,7 @@ View=%view{ascii} @EXTHELPERSDIR@/sound.sh view wma # Play list [playlist] -Regex=\.(m3u|pls)$ +Regex=\\.(m3u|pls)$ RegexIgnoreCase=true Open=@EXTHELPERSDIR@/sound.sh open playlist @@ -619,7 +648,7 @@ ShellIgnoreCase=true Include=video [asf] -Regex=\.as[fx]$ +Regex=\\.as[fx]$ RegexIgnoreCase=true Include=video @@ -634,12 +663,12 @@ ShellIgnoreCase=true Include=video [mov] -Regex=\.(mov|qt)$ +Regex=\\.(mov|qt)$ RegexIgnoreCase=true Include=video [mp4] -Regex=\.(mp4|m4v|mpe?g)$ +Regex=\\.(mp4|m4v|mpe?g)$ RegexIgnoreCase=true Include=video @@ -665,7 +694,7 @@ ShellIgnoreCase=true Include=video [fli] -Regex=\.fl[icv]$ +Regex=\\.fl[icv]$ RegexIgnoreCase=true Include=video @@ -675,7 +704,7 @@ ShellIgnoreCase=true Include=video [realaudio] -Regex=\.ra?m$ +Regex=\\.ra?m$ RegexIgnoreCase=true Open=@EXTHELPERSDIR@/video.sh open ram @@ -688,7 +717,7 @@ Include=video ### Documents ### [html] -Regex=\.html?$ +Regex=\\.html?$ RegexIgnoreCase=true Open=@EXTHELPERSDIR@/web.sh open html View=%view{ascii} @EXTHELPERSDIR@/web.sh view html @@ -700,7 +729,7 @@ Open=@EXTHELPERSDIR@/doc.sh open ooffice # StarOffice 6 and OpenOffice.org formats [OpenOffice.org] -Regex=\.(odt|fodt|ott|sxw|stw|ods|fods|ots|sxc|stc|odp|fodp|otp|sxi|sti|odg|fodg|otg|sxd|std|odb|odf|sxm|odm|sxg)$ +Regex=\\.(odt|fodt|ott|sxw|stw|ods|fods|ots|sxc|stc|odp|fodp|otp|sxi|sti|odg|fodg|otg|sxd|std|odb|odf|sxm|odm|sxg)$ RegexIgnoreCase=true Open=@EXTHELPERSDIR@/doc.sh open ooffice View=%view{ascii} @EXTHELPERSDIR@/doc.sh view odt @@ -722,21 +751,21 @@ Open=@EXTHELPERSDIR@/doc.sh open msdoc # Microsoft Word Document [msdoc-by-shell] -Regex=\.(do[ct]|wri|docx)$ +Regex=\\.(do[ct]|wri|docx)$ RegexIgnoreCase=true Open=@EXTHELPERSDIR@/doc.sh open msdoc View=%view{ascii} @EXTHELPERSDIR@/doc.sh view msdoc # Microsoft Excel Worksheet [msxls-by-shell] -Regex=\.(xl[sw]|xlsx)$ +Regex=\\.(xl[sw]|xlsx)$ RegexIgnoreCase=true Open=@EXTHELPERSDIR@/doc.sh open msxls View=%view{ascii} @EXTHELPERSDIR@/doc.sh view msxls # Microsoft PowerPoint Presentation [msppt] -Regex=\.(pp[ts]|pptx)$ +Regex=\\.(pp[ts]|pptx)$ RegexIgnoreCase=true Open=@EXTHELPERSDIR@/doc.sh open msppt View=%view{ascii} @EXTHELPERSDIR@/doc.sh view msppt @@ -753,25 +782,25 @@ ShellIgnoreCase=true Include=editor [markdown] -Regex=\.mk?d$ +Regex=\\.mk?d$ RegexIgnoreCase=true Include=editor [djvu] -Regex=\.djvu?$ +Regex=\\.djvu?$ RegexIgnoreCase=true Open=@EXTHELPERSDIR@/doc.sh open djvu View=%view{ascii} @EXTHELPERSDIR@/doc.sh view djvu # Comic Books [cbr] -Regex=\.cb[zr]$ +Regex=\\.cb[zr]$ RegexIgnoreCase=true Open=@EXTHELPERSDIR@/doc.sh open comic # Epup, mobi, fb2 [ebook] -Regex=\.(epub|mobi|fb2)$ +Regex=\\.(epub|mobi|fb2)$ RegexIgnoreCase=true Open=@EXTHELPERSDIR@/doc.sh open ebook View=%view{ascii} @EXTHELPERSDIR@/doc.sh view ebook @@ -790,11 +819,11 @@ Open=xmkmf -a # Makefile.PL (MakeMaker) [Makefile.pl] -Regex=^Makefile\.(PL|pl)$ +Regex=^Makefile\\.(PL|pl)$ Open=%var{PERL:perl} %f [Makefile] -Regex=^[Mm]akefile +Regex=^[Mm]akefile$ Open=make -f %f %{Enter parameters} [dbf] @@ -805,7 +834,7 @@ View=%view{ascii} @EXTHELPERSDIR@/misc.sh view dbf # REXX script [rexx] -Regex=\.(rexx?|cmd)$ +Regex=\\.(rexx?|cmd)$ Open=rexx %f %{Enter parameters};echo "Press ENTER";read y # Disk images for Commodore computers (VIC20, C64, C128) @@ -874,6 +903,12 @@ ShellIgnoreCase=true Open=@EXTHELPERSDIR@/archive.sh view lz4 %var{PAGER:more} View=%view{ascii} @EXTHELPERSDIR@/archive.sh view lz4 +[lzo] +Shell=.lzo +ShellIgnoreCase=true +Open=@EXTHELPERSDIR@/archive.sh view lzo %var{PAGER:more} +View=%view{ascii} @EXTHELPERSDIR@/archive.sh view lzo + [wim] Shell=.wim ShellIgnoreCase=true diff --git a/mcsrc/misc/mc.menu.in b/mcsrc/misc/mc.menu.in index c491858f..9d37e378 100644 --- a/mcsrc/misc/mc.menu.in +++ b/mcsrc/misc/mc.menu.in @@ -93,6 +93,15 @@ shell_patterns=0 tar cf - "$Pwd" | zstd -f > "$tar.tar.zst" && \ echo "../$tar.tar.zst created." +8 Compress the current subdirectory (tar.lzo) + Pwd=`basename %d /` + echo -n "Name of the compressed file (without extension) [$Pwd]: " + read tar + [ "$tar"x = x ] && tar="$Pwd" + cd .. && \ + tar cf - "$Pwd" | lzop -f > "$tar.tar.lzo" && \ + echo "../$tar.tar.lzo created." + = f \.c$ & t r + f \.c$ & t r & ! t t c Compile and link current .c file @@ -228,7 +237,7 @@ U Uudecode marked news articles (needs work) fi echo "Please test the output file before deleting anything." -=+ f \.tar\.gz$ | f \.tar\.z$ | f \.tgz$ | f \.tpz$ | f \.tar\.lz$ | f \.tar\.lz4$ | f \.tar\.lzma$ | f \.tar\.7z$ | f \.tar\.xz$ | f \.tar\.zst | f \.tar\.Z$ | f \.tar\.bz2$ & t rl +=+ f \.tar\.gz$ | f \.tar\.z$ | f \.tgz$ | f \.tpz$ | f \.tar\.lz$ | f \.tar\.lz4$ | f \.tar\.lzma$ | f \.tar\.lzo$ | f \.tar\.7z$ | f \.tar\.xz$ | f \.tar\.zst | f \.tar\.Z$ | f \.tar\.bz2$ & t rl x Extract the contents of a compressed tar file unset PRG case %f in @@ -238,6 +247,7 @@ x Extract the contents of a compressed tar file *.tar.lz) PRG="lzip -dc";; *.tar.lz4) PRG="lz4 -dc";; *.tar.lzma) PRG="lzma -dc";; + *.tar.lzo) PRG="lzop -dc";; *.tar.xz) PRG="xz -dc";; *.tar.zst) PRG="zstd -dc";; *) exit 1;; diff --git a/mcsrc/misc/skins/dark.ini b/mcsrc/misc/skins/dark.ini index 8ad29b33..707b05b4 100644 --- a/mcsrc/misc/skins/dark.ini +++ b/mcsrc/misc/skins/dark.ini @@ -104,6 +104,7 @@ editbold = yellow;green editmarked = black;lightgray editwhitespace = brightblue;black + editnonprintable = ;black editlinestate = white;cyan bookmark = white;red bookmarkfound = black;green diff --git a/mcsrc/misc/skins/darkfar.ini b/mcsrc/misc/skins/darkfar.ini index 9ac7399e..1329e1da 100644 --- a/mcsrc/misc/skins/darkfar.ini +++ b/mcsrc/misc/skins/darkfar.ini @@ -104,6 +104,7 @@ editbold = yellow;green editmarked = black;lightgray editwhitespace = brightblue;black + editnonprintable = ;black editlinestate = white;cyan bookmark = white;red bookmarkfound = black;green diff --git a/mcsrc/misc/skins/default.ini b/mcsrc/misc/skins/default.ini index 145eb998..a3dd3e39 100644 --- a/mcsrc/misc/skins/default.ini +++ b/mcsrc/misc/skins/default.ini @@ -104,6 +104,7 @@ editbold = yellow;green editmarked = black;cyan editwhitespace = brightblue;blue + editnonprintable = ;black editlinestate = white;cyan bookmark = white;red bookmarkfound = black;green diff --git a/mcsrc/misc/skins/double-lines.ini b/mcsrc/misc/skins/double-lines.ini index 7f35df0b..f6bdac0d 100644 --- a/mcsrc/misc/skins/double-lines.ini +++ b/mcsrc/misc/skins/double-lines.ini @@ -104,6 +104,7 @@ editbold = yellow;green editmarked = black;cyan editwhitespace = brightblue;blue + editnonprintable = ;black editlinestate = white;cyan bookmark = white;red bookmarkfound = black;green diff --git a/mcsrc/misc/skins/featured-plus.ini b/mcsrc/misc/skins/featured-plus.ini index a0dc0702..def2147d 100644 --- a/mcsrc/misc/skins/featured-plus.ini +++ b/mcsrc/misc/skins/featured-plus.ini @@ -106,6 +106,7 @@ editbold = yellow;green editmarked = black;cyan editwhitespace = brightblue;blue + editnonprintable = ;black editlinestate = white;cyan bookmark = white;red bookmarkfound = black;green diff --git a/mcsrc/misc/skins/featured.ini b/mcsrc/misc/skins/featured.ini index 43ce2f29..f5b6f5dc 100644 --- a/mcsrc/misc/skins/featured.ini +++ b/mcsrc/misc/skins/featured.ini @@ -107,6 +107,7 @@ editmarked = black;cyan editwhitespace = brightblue;blue editlinestate = white;cyan + editnonprintable = ;black bookmark = white;red bookmarkfound = black;green editrightmargin = brightblue;black diff --git a/mcsrc/misc/skins/gotar.ini b/mcsrc/misc/skins/gotar.ini index 3b81867f..d49ddb6c 100644 --- a/mcsrc/misc/skins/gotar.ini +++ b/mcsrc/misc/skins/gotar.ini @@ -101,6 +101,7 @@ editbold = yellow;blue editmarked = brightgreen;red editwhitespace = brightblue;blue + editnonprintable = ;black editlinestate = brightgreen bookmark = white;red bookmarkfound = black;green diff --git a/mcsrc/misc/skins/gray-green-purple256.ini b/mcsrc/misc/skins/gray-green-purple256.ini index 3f00e2a6..12a09e30 100644 --- a/mcsrc/misc/skins/gray-green-purple256.ini +++ b/mcsrc/misc/skins/gray-green-purple256.ini @@ -111,6 +111,7 @@ editbold = rgb400 editmarked = ;main1 editwhitespace = rgb400;bgdarker + editnonprintable = ;black editlinestate = ;bgdarker bookmark = ;rgb531 bookmarkfound = ;main2 diff --git a/mcsrc/misc/skins/gray-orange-blue256.ini b/mcsrc/misc/skins/gray-orange-blue256.ini index 4953c167..bce1a983 100644 --- a/mcsrc/misc/skins/gray-orange-blue256.ini +++ b/mcsrc/misc/skins/gray-orange-blue256.ini @@ -111,6 +111,7 @@ editbold = rgb400 editmarked = ;main1 editwhitespace = rgb400;bgdarker + editnonprintable = ;black editlinestate = ;bgdarker bookmark = ;rgb531 bookmarkfound = ;main2 diff --git a/mcsrc/misc/skins/julia256.ini b/mcsrc/misc/skins/julia256.ini index 18ed248a..2a731801 100644 --- a/mcsrc/misc/skins/julia256.ini +++ b/mcsrc/misc/skins/julia256.ini @@ -107,6 +107,7 @@ editbold = yellow;green editmarked = black;lightgray editwhitespace = brightblue;black + editnonprintable = ;black editlinestate = white;cyan bookmark = white;red bookmarkfound = black;green diff --git a/mcsrc/misc/skins/mc46.ini b/mcsrc/misc/skins/mc46.ini index f971310e..fe42e792 100644 --- a/mcsrc/misc/skins/mc46.ini +++ b/mcsrc/misc/skins/mc46.ini @@ -95,6 +95,7 @@ editbold = yellow; editmarked = black;cyan editwhitespace = brightblue;blue + editnonprintable = ;black editlinestate = white;cyan bookmark = white;red bookmarkfound = black;green diff --git a/mcsrc/misc/skins/modarcon16-defbg.ini b/mcsrc/misc/skins/modarcon16-defbg.ini index e06e721b..c79a5a2b 100644 --- a/mcsrc/misc/skins/modarcon16-defbg.ini +++ b/mcsrc/misc/skins/modarcon16-defbg.ini @@ -146,6 +146,7 @@ editbold = color15;;bold editmarked = color11;color2;bold editwhitespace = color12;color4 + editnonprintable = ;black editlinestate = color2;color0 bookmark = color0;color7 bookmarkfound = color0;color7 diff --git a/mcsrc/misc/skins/modarcon16.ini b/mcsrc/misc/skins/modarcon16.ini index e2c86d71..6e958368 100644 --- a/mcsrc/misc/skins/modarcon16.ini +++ b/mcsrc/misc/skins/modarcon16.ini @@ -146,6 +146,7 @@ editbold = color15;;bold editmarked = color11;color2;bold editwhitespace = color2;color0 + editnonprintable = ;black editlinestate = color2;color0 bookmark = color0;color7 bookmarkfound = color0;color7 diff --git a/mcsrc/misc/skins/modarcon16root-defbg.ini b/mcsrc/misc/skins/modarcon16root-defbg.ini index 5d052690..677f3ead 100644 --- a/mcsrc/misc/skins/modarcon16root-defbg.ini +++ b/mcsrc/misc/skins/modarcon16root-defbg.ini @@ -146,6 +146,7 @@ editbold = color15;;bold editmarked = color11;color1;bold editwhitespace = color12;color4 + editnonprintable = ;black editlinestate = color1;color0 bookmark = color0;color7 bookmarkfound = color0;color7 diff --git a/mcsrc/misc/skins/modarcon16root.ini b/mcsrc/misc/skins/modarcon16root.ini index 46ed6950..49164d6a 100644 --- a/mcsrc/misc/skins/modarcon16root.ini +++ b/mcsrc/misc/skins/modarcon16root.ini @@ -146,6 +146,7 @@ editbold = color15;;bold editmarked = color11;color1;bold editwhitespace = color12;color4 + editnonprintable = ;black editlinestate = color1;color0 bookmark = color0;color7 bookmarkfound = color0;color7 diff --git a/mcsrc/misc/skins/modarin256-defbg.ini b/mcsrc/misc/skins/modarin256-defbg.ini index 9ba2e60a..d4e84fef 100644 --- a/mcsrc/misc/skins/modarin256-defbg.ini +++ b/mcsrc/misc/skins/modarin256-defbg.ini @@ -146,6 +146,7 @@ editbold = color228;;bold editmarked = color228;color23;bold editwhitespace = color56;color234 + editnonprintable = ;black editlinestate = color66;color235 bookmark = ;color239 bookmarkfound = ;color239;bold diff --git a/mcsrc/misc/skins/modarin256.ini b/mcsrc/misc/skins/modarin256.ini index 0dba2175..afdd71c6 100644 --- a/mcsrc/misc/skins/modarin256.ini +++ b/mcsrc/misc/skins/modarin256.ini @@ -146,6 +146,7 @@ editbold = color228;;bold editmarked = color228;color23;bold editwhitespace = color56;color234 + editnonprintable = ;black editlinestate = color66;color235 bookmark = ;color239 bookmarkfound = ;color239;bold diff --git a/mcsrc/misc/skins/modarin256root-defbg.ini b/mcsrc/misc/skins/modarin256root-defbg.ini index 2a8fa75d..bb0a8233 100644 --- a/mcsrc/misc/skins/modarin256root-defbg.ini +++ b/mcsrc/misc/skins/modarin256root-defbg.ini @@ -146,6 +146,7 @@ editbold = color228;;bold editmarked = color228;color88;bold editwhitespace = color56;color234 + editnonprintable = ;black editlinestate = color95;color235 bookmark = ;color239 bookmarkfound = ;color239;bold diff --git a/mcsrc/misc/skins/modarin256root.ini b/mcsrc/misc/skins/modarin256root.ini index 688fea35..dd05c005 100644 --- a/mcsrc/misc/skins/modarin256root.ini +++ b/mcsrc/misc/skins/modarin256root.ini @@ -146,6 +146,7 @@ editbold = color228;;bold editmarked = color228;color88;bold editwhitespace = color56;color234 + editnonprintable = ;black editlinestate = color95;color235 bookmark = ;color239 bookmarkfound = ;color239;bold diff --git a/mcsrc/misc/skins/nicedark.ini b/mcsrc/misc/skins/nicedark.ini index 0b5ee010..3bace63b 100644 --- a/mcsrc/misc/skins/nicedark.ini +++ b/mcsrc/misc/skins/nicedark.ini @@ -104,6 +104,7 @@ editbold = brown;blue editmarked = black;cyan editwhitespace = brightblue;blue + editnonprintable = ;black editlinestate = white;cyan bookmark = white;red bookmarkfound = black;green diff --git a/mcsrc/misc/skins/sand256.ini b/mcsrc/misc/skins/sand256.ini index 664ce7a2..33c43c72 100644 --- a/mcsrc/misc/skins/sand256.ini +++ b/mcsrc/misc/skins/sand256.ini @@ -161,6 +161,7 @@ editbold = rgb400 editmarked = ;rgb452;italic editwhitespace = rgb400;rgb553 + editnonprintable = ;black editlinestate = ;rgb553 bookmark = ;rgb551 bookmarkfound = ;rgb530 diff --git a/mcsrc/misc/skins/seasons-autumn16M.ini b/mcsrc/misc/skins/seasons-autumn16M.ini index 47abb4cd..4a94ccbf 100644 --- a/mcsrc/misc/skins/seasons-autumn16M.ini +++ b/mcsrc/misc/skins/seasons-autumn16M.ini @@ -171,6 +171,7 @@ editbold = MarkedFg;;bold editmarked = ;Selected editwhitespace = ;EditorWhitespace + editnonprintable = ;black editlinestate = #000;EditorLineNumber bookmark = #000;EditorBookmark bookmarkfound = #000;EditorFindAll diff --git a/mcsrc/misc/skins/seasons-spring16M.ini b/mcsrc/misc/skins/seasons-spring16M.ini index 855b4e13..c839f818 100644 --- a/mcsrc/misc/skins/seasons-spring16M.ini +++ b/mcsrc/misc/skins/seasons-spring16M.ini @@ -171,6 +171,7 @@ editbold = MarkedFg;;bold editmarked = ;Selected editwhitespace = ;EditorWhitespace + editnonprintable = ;black editlinestate = #000;EditorLineNumber bookmark = #000;EditorBookmark bookmarkfound = #000;EditorFindAll diff --git a/mcsrc/misc/skins/seasons-summer16M.ini b/mcsrc/misc/skins/seasons-summer16M.ini index 7cad34b9..3ab01481 100644 --- a/mcsrc/misc/skins/seasons-summer16M.ini +++ b/mcsrc/misc/skins/seasons-summer16M.ini @@ -171,6 +171,7 @@ editbold = MarkedFg;;bold editmarked = ;Selected editwhitespace = ;EditorWhitespace + editnonprintable = ;black editlinestate = #000;EditorLineNumber bookmark = #000;EditorBookmark bookmarkfound = #000;EditorFindAll diff --git a/mcsrc/misc/skins/seasons-winter16M.ini b/mcsrc/misc/skins/seasons-winter16M.ini index 76479bdd..cae092f4 100644 --- a/mcsrc/misc/skins/seasons-winter16M.ini +++ b/mcsrc/misc/skins/seasons-winter16M.ini @@ -171,6 +171,7 @@ editbold = MarkedFg;;bold editmarked = ;Selected editwhitespace = ;EditorWhitespace + editnonprintable = ;black editlinestate = #000;EditorLineNumber bookmark = #000;EditorBookmark bookmarkfound = #000;EditorFindAll diff --git a/mcsrc/misc/skins/xoria256.ini b/mcsrc/misc/skins/xoria256.ini index cbc9c99b..d1e9dd05 100644 --- a/mcsrc/misc/skins/xoria256.ini +++ b/mcsrc/misc/skins/xoria256.ini @@ -147,6 +147,7 @@ editbold = ;;bold editmarked = ;color60 editwhitespace = color236;color234 + editnonprintable = ;black editlinestate = ;color235 bookmark = ;color239; bookmarkfound = ;color239;bold diff --git a/mcsrc/misc/skins/yadt256-defbg.ini b/mcsrc/misc/skins/yadt256-defbg.ini index ea3d7c7d..d59b65a6 100644 --- a/mcsrc/misc/skins/yadt256-defbg.ini +++ b/mcsrc/misc/skins/yadt256-defbg.ini @@ -113,6 +113,7 @@ editbold = color228;;bold editmarked = color228;blue;bold editwhitespace = color56;color234 + editnonprintable = ;black editlinestate = color66;color235 bookmark = ;color239 bookmarkfound = ;color239;bold diff --git a/mcsrc/misc/skins/yadt256.ini b/mcsrc/misc/skins/yadt256.ini index 194c2b08..2aaf4e59 100644 --- a/mcsrc/misc/skins/yadt256.ini +++ b/mcsrc/misc/skins/yadt256.ini @@ -112,6 +112,7 @@ editbold = color228;;bold editmarked = color228;blue;bold editwhitespace = color56;color234 + editnonprintable = ;black editlinestate = color66;color235 bookmark = ;color239 bookmarkfound = ;color239;bold diff --git a/mcsrc/misc/syntax/sh.syntax b/mcsrc/misc/syntax/sh.syntax index e89142d6..3f4754d9 100644 --- a/mcsrc/misc/syntax/sh.syntax +++ b/mcsrc/misc/syntax/sh.syntax @@ -1564,6 +1564,7 @@ wholechars abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789-._ keyword whole lsusb cyan keyword whole lzip cyan keyword whole lziprecover cyan + keyword whole lzop cyan keyword whole lynx cyan keyword whole MAKEDEV cyan keyword whole MAKEFLOPPIES cyan diff --git a/mcsrc/po/af.po b/mcsrc/po/af.po index 1bec8f9b..df2d9231 100644 --- a/mcsrc/po/af.po +++ b/mcsrc/po/af.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Midnight Commander\n" "Report-Msgid-Bugs-To: https://www.midnight-commander.org/\n" -"POT-Creation-Date: 2023-08-06 15:50+0200\n" +"POT-Creation-Date: 2024-01-20 20:51+0100\n" "PO-Revision-Date: 2010-12-29 10:19+0000\n" "Last-Translator: FULL NAME \n" "Language-Team: Afrikaans (http://app.transifex.com/mc/mc/language/af/)\n" @@ -703,7 +703,8 @@ msgid "" " errdhotfocus\n" " Menus: menunormal, menuhot, menusel, menuhotsel, menuinactive\n" " Popup menus: pmenunormal, pmenusel, pmenutitle\n" -" Editor: editnormal, editbold, editmarked, editwhitespace,\n" +" Editor: editnormal, editbold, editmarked, editwhitespace, " +"editnonprintable,\n" " editlinestate, editbg, editframe, editframeactive\n" " editframedrag\n" " Viewer: viewnormal,viewbold, viewunderline, viewselected\n" @@ -1539,7 +1540,7 @@ msgid "" "written for the Midnight Commander." msgstr "" -msgid "Copyright (C) 1996-2023 the Free Software Foundation" +msgid "Copyright (C) 1996-2024 the Free Software Foundation" msgstr "" msgid "About" @@ -3900,65 +3901,23 @@ msgid "" "%s" msgstr "" -#, c-format -msgid "Warning: cannot open %s directory\n" -msgstr "" - -#, c-format -msgid "fish: Disconnecting from %s" -msgstr "" - -msgid "fish: Waiting for initial line..." -msgstr "" - -msgid "Sorry, we cannot do password authenticated connections for now." -msgstr "" - -#, c-format -msgid "fish: Password is required for %s" -msgstr "" - -msgid "fish: Sending password..." -msgstr "" - -msgid "fish: Sending initial line..." -msgstr "" - -msgid "fish: Handshaking version..." -msgstr "" - -msgid "fish: Getting host info..." -msgstr "" - -#, c-format -msgid "fish: Reading directory %s..." +msgid "" +"EXTFS virtual file system:\n" +"wrong file name" msgstr "" -#, c-format -msgid "%s: done." +msgid "" +"EXTFS virtual file system:\n" +"wrong archive name" msgstr "" -#, c-format -msgid "%s: failure" +msgid "" +"EXTFS virtual file system:\n" +"cannot build command" msgstr "" #, c-format -msgid "fish: store %s: sending command..." -msgstr "" - -msgid "fish: Local read failed, sending zeros" -msgstr "" - -msgid "fish: storing file" -msgstr "" - -msgid "Aborting transfer..." -msgstr "" - -msgid "Error reported after abort." -msgstr "" - -msgid "Aborted transfer would be successful." +msgid "Warning: cannot open %s directory\n" msgstr "" #, c-format @@ -4071,6 +4030,14 @@ msgstr "" msgid "ftpfs: failed; nowhere to fallback to" msgstr "" +#, c-format +msgid "%s: failure" +msgstr "" + +#, c-format +msgid "%s: done." +msgstr "" + msgid "ftpfs: storing file" msgstr "" @@ -4204,6 +4171,52 @@ msgstr "" msgid "sftp: Listing done." msgstr "" +#, c-format +msgid "shell: Disconnecting from %s" +msgstr "" + +msgid "shell: Waiting for initial line..." +msgstr "" + +msgid "Sorry, we cannot do password authenticated connections for now." +msgstr "" + +#, c-format +msgid "shell: Password is required for %s" +msgstr "" + +msgid "shell: Sending password..." +msgstr "" + +msgid "shell: Sending initial line..." +msgstr "" + +msgid "shell: Getting host info..." +msgstr "" + +#, c-format +msgid "shell: Reading directory %s..." +msgstr "" + +#, c-format +msgid "shell: store %s: sending command..." +msgstr "" + +msgid "shell: Local read failed, sending zeros" +msgstr "" + +msgid "shell: storing file" +msgstr "" + +msgid "Aborting transfer..." +msgstr "" + +msgid "Error reported after abort." +msgstr "" + +msgid "Aborted transfer would be successful." +msgstr "" + msgid "Inconsistent tar archive" msgstr "" diff --git a/mcsrc/po/ar.po b/mcsrc/po/ar.po index 9f77f3c6..01f0b08a 100644 --- a/mcsrc/po/ar.po +++ b/mcsrc/po/ar.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Midnight Commander\n" "Report-Msgid-Bugs-To: https://www.midnight-commander.org/\n" -"POT-Creation-Date: 2023-08-06 15:50+0200\n" +"POT-Creation-Date: 2024-01-20 20:51+0100\n" "PO-Revision-Date: 2010-12-29 10:19+0000\n" "Last-Translator: FULL NAME \n" "Language-Team: Arabic (http://app.transifex.com/mc/mc/language/ar/)\n" @@ -704,7 +704,8 @@ msgid "" " errdhotfocus\n" " Menus: menunormal, menuhot, menusel, menuhotsel, menuinactive\n" " Popup menus: pmenunormal, pmenusel, pmenutitle\n" -" Editor: editnormal, editbold, editmarked, editwhitespace,\n" +" Editor: editnormal, editbold, editmarked, editwhitespace, " +"editnonprintable,\n" " editlinestate, editbg, editframe, editframeactive\n" " editframedrag\n" " Viewer: viewnormal,viewbold, viewunderline, viewselected\n" @@ -1540,7 +1541,7 @@ msgid "" "written for the Midnight Commander." msgstr "" -msgid "Copyright (C) 1996-2023 the Free Software Foundation" +msgid "Copyright (C) 1996-2024 the Free Software Foundation" msgstr "" msgid "About" @@ -3917,65 +3918,23 @@ msgid "" "%s" msgstr "" -#, c-format -msgid "Warning: cannot open %s directory\n" -msgstr "" - -#, c-format -msgid "fish: Disconnecting from %s" -msgstr "" - -msgid "fish: Waiting for initial line..." -msgstr "" - -msgid "Sorry, we cannot do password authenticated connections for now." -msgstr "" - -#, c-format -msgid "fish: Password is required for %s" -msgstr "" - -msgid "fish: Sending password..." -msgstr "" - -msgid "fish: Sending initial line..." -msgstr "" - -msgid "fish: Handshaking version..." -msgstr "" - -msgid "fish: Getting host info..." -msgstr "" - -#, c-format -msgid "fish: Reading directory %s..." +msgid "" +"EXTFS virtual file system:\n" +"wrong file name" msgstr "" -#, c-format -msgid "%s: done." +msgid "" +"EXTFS virtual file system:\n" +"wrong archive name" msgstr "" -#, c-format -msgid "%s: failure" +msgid "" +"EXTFS virtual file system:\n" +"cannot build command" msgstr "" #, c-format -msgid "fish: store %s: sending command..." -msgstr "" - -msgid "fish: Local read failed, sending zeros" -msgstr "" - -msgid "fish: storing file" -msgstr "" - -msgid "Aborting transfer..." -msgstr "" - -msgid "Error reported after abort." -msgstr "" - -msgid "Aborted transfer would be successful." +msgid "Warning: cannot open %s directory\n" msgstr "" #, c-format @@ -4088,6 +4047,14 @@ msgstr "" msgid "ftpfs: failed; nowhere to fallback to" msgstr "" +#, c-format +msgid "%s: failure" +msgstr "" + +#, c-format +msgid "%s: done." +msgstr "" + msgid "ftpfs: storing file" msgstr "" @@ -4221,6 +4188,52 @@ msgstr "" msgid "sftp: Listing done." msgstr "" +#, c-format +msgid "shell: Disconnecting from %s" +msgstr "" + +msgid "shell: Waiting for initial line..." +msgstr "" + +msgid "Sorry, we cannot do password authenticated connections for now." +msgstr "" + +#, c-format +msgid "shell: Password is required for %s" +msgstr "" + +msgid "shell: Sending password..." +msgstr "" + +msgid "shell: Sending initial line..." +msgstr "" + +msgid "shell: Getting host info..." +msgstr "" + +#, c-format +msgid "shell: Reading directory %s..." +msgstr "" + +#, c-format +msgid "shell: store %s: sending command..." +msgstr "" + +msgid "shell: Local read failed, sending zeros" +msgstr "" + +msgid "shell: storing file" +msgstr "" + +msgid "Aborting transfer..." +msgstr "" + +msgid "Error reported after abort." +msgstr "" + +msgid "Aborted transfer would be successful." +msgstr "" + msgid "Inconsistent tar archive" msgstr "" diff --git a/mcsrc/po/az.po b/mcsrc/po/az.po index c2d17e88..6b9f0b4b 100644 --- a/mcsrc/po/az.po +++ b/mcsrc/po/az.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Midnight Commander\n" "Report-Msgid-Bugs-To: https://www.midnight-commander.org/\n" -"POT-Creation-Date: 2023-08-06 15:50+0200\n" +"POT-Creation-Date: 2024-01-20 20:51+0100\n" "PO-Revision-Date: 2010-12-29 10:19+0000\n" "Last-Translator: Slava Zanko , 2011\n" "Language-Team: Azerbaijani (http://app.transifex.com/mc/mc/language/az/)\n" @@ -706,7 +706,8 @@ msgid "" " errdhotfocus\n" " Menus: menunormal, menuhot, menusel, menuhotsel, menuinactive\n" " Popup menus: pmenunormal, pmenusel, pmenutitle\n" -" Editor: editnormal, editbold, editmarked, editwhitespace,\n" +" Editor: editnormal, editbold, editmarked, editwhitespace, " +"editnonprintable,\n" " editlinestate, editbg, editframe, editframeactive\n" " editframedrag\n" " Viewer: viewnormal,viewbold, viewunderline, viewselected\n" @@ -1542,7 +1543,7 @@ msgid "" "written for the Midnight Commander." msgstr "" -msgid "Copyright (C) 1996-2023 the Free Software Foundation" +msgid "Copyright (C) 1996-2024 the Free Software Foundation" msgstr "" msgid "About" @@ -3933,67 +3934,25 @@ msgid "" "%s" msgstr "" -#, c-format -msgid "Warning: cannot open %s directory\n" +msgid "" +"EXTFS virtual file system:\n" +"wrong file name" msgstr "" -#, c-format -msgid "fish: Disconnecting from %s" -msgstr "balıq: %s dən qopdum" - -msgid "fish: Waiting for initial line..." -msgstr "balıq: Birinci xətti gözləyirəm..." - -msgid "Sorry, we cannot do password authenticated connections for now." -msgstr "Bağışlayın, indilik parollu tanıtma bağlantıları qura bilmirik." - -#, c-format -msgid "fish: Password is required for %s" +msgid "" +"EXTFS virtual file system:\n" +"wrong archive name" msgstr "" -msgid "fish: Sending password..." -msgstr "balıq: Parol göndərilir..." - -msgid "fish: Sending initial line..." -msgstr "balıq: Birinci xətt göndərilir..." - -msgid "fish: Handshaking version..." -msgstr "balıq: Əl sıxışmalı yol..." - -msgid "fish: Getting host info..." +msgid "" +"EXTFS virtual file system:\n" +"cannot build command" msgstr "" #, c-format -msgid "fish: Reading directory %s..." -msgstr "balıq: %s Qovluğu oxunur..." - -#, c-format -msgid "%s: done." -msgstr "%s : oldu." - -#, c-format -msgid "%s: failure" -msgstr "%s : xəta" - -#, c-format -msgid "fish: store %s: sending command..." -msgstr "balıq: %s göndər: göndərmə əmri..." - -msgid "fish: Local read failed, sending zeros" -msgstr "balıq: Yerli oxuma bacarılmadı, sıfır göndərilir" - -msgid "fish: storing file" +msgid "Warning: cannot open %s directory\n" msgstr "" -msgid "Aborting transfer..." -msgstr "Daşıma ləğv edilər..." - -msgid "Error reported after abort." -msgstr "Xəta ləğv etmədən sonra bildirildi." - -msgid "Aborted transfer would be successful." -msgstr "Ləğv edilmiş daşıma əməliyyatı müvəffəqiyyətli olmuş olmaılıdır." - #, c-format msgid "ftpfs: Disconnecting from %s" msgstr "ftpfs : %s ilə bağlantı kəsilir" @@ -4104,6 +4063,14 @@ msgstr "(chdir first)" msgid "ftpfs: failed; nowhere to fallback to" msgstr "ftpfs : müvəffəqiyyətsizlık ..; geriyə dönüləcək nöqtə yoxdur" +#, c-format +msgid "%s: failure" +msgstr "%s : xəta" + +#, c-format +msgid "%s: done." +msgstr "%s : oldu." + msgid "ftpfs: storing file" msgstr "" @@ -4241,6 +4208,52 @@ msgstr "" msgid "sftp: Listing done." msgstr "" +#, c-format +msgid "shell: Disconnecting from %s" +msgstr "" + +msgid "shell: Waiting for initial line..." +msgstr "" + +msgid "Sorry, we cannot do password authenticated connections for now." +msgstr "Bağışlayın, indilik parollu tanıtma bağlantıları qura bilmirik." + +#, c-format +msgid "shell: Password is required for %s" +msgstr "" + +msgid "shell: Sending password..." +msgstr "" + +msgid "shell: Sending initial line..." +msgstr "" + +msgid "shell: Getting host info..." +msgstr "" + +#, c-format +msgid "shell: Reading directory %s..." +msgstr "" + +#, c-format +msgid "shell: store %s: sending command..." +msgstr "" + +msgid "shell: Local read failed, sending zeros" +msgstr "" + +msgid "shell: storing file" +msgstr "" + +msgid "Aborting transfer..." +msgstr "Daşıma ləğv edilər..." + +msgid "Error reported after abort." +msgstr "Xəta ləğv etmədən sonra bildirildi." + +msgid "Aborted transfer would be successful." +msgstr "Ləğv edilmiş daşıma əməliyyatı müvəffəqiyyətli olmuş olmaılıdır." + msgid "Inconsistent tar archive" msgstr "Tar arxivi düzgün deyildir" diff --git a/mcsrc/po/be.po b/mcsrc/po/be.po index 5328b2d4..27c0769c 100644 --- a/mcsrc/po/be.po +++ b/mcsrc/po/be.po @@ -6,7 +6,8 @@ # Pavel Suravezhkin, 2022 # debconf , 2023 # Slava Zanko , 2011 -# Viačasłaŭ Chalikin, 2023 +# Viačasłaŭ Chalikin , 2023 +# Viačasłaŭ Chalikin , 2023-2024 # Viktar Palstsiuk , 2015 # Yury V. Zaytsev , 2019 # Źmicier Turok , 2018 @@ -16,9 +17,9 @@ msgid "" msgstr "" "Project-Id-Version: Midnight Commander\n" "Report-Msgid-Bugs-To: https://www.midnight-commander.org/\n" -"POT-Creation-Date: 2023-08-06 15:50+0200\n" +"POT-Creation-Date: 2024-01-20 20:51+0100\n" "PO-Revision-Date: 2010-12-29 10:19+0000\n" -"Last-Translator: debconf , 2023\n" +"Last-Translator: Viačasłaŭ Chalikin , 2023-2024\n" "Language-Team: Belarusian (http://app.transifex.com/mc/mc/language/be/)\n" "Language: be\n" "MIME-Version: 1.0\n" @@ -40,13 +41,13 @@ msgid "Cannot translate from %s to %s" msgstr "Немагчыма пераўтварыць з %s у %s" msgid "Event system already initialized" -msgstr "Сістэма падзей ужо запушчаная" +msgstr "Сістэма падзей ужо ініцыялізаваная" msgid "Failed to initialize event system" -msgstr "Не атрымалася запусціць сістэму падзей" +msgstr "Не атрымалася ініцыялізаваць сістэму падзей" msgid "Event system not initialized" -msgstr "Сістэма падзей не запушчаная" +msgstr "Сістэма падзей не ініцыялізаваная" msgid "Check input data! Some of parameters are NULL!" msgstr "Спраўдзіце ўведзенае! Пэўныя параметры роўныя «NULL»!" @@ -67,7 +68,7 @@ msgid "" msgstr "" "Файл «%s» ужо рэдагуецца.\n" "Карыстальнік: %s\n" -"Нумар працэсу: %d" +"ID працэсу: %d" msgid "File locked" msgstr "Файл заблакаваны" @@ -83,7 +84,7 @@ msgid "Cannot create %s directory" msgstr "Нельга стварыць каталог «%s»" msgid "FATAL: not a directory:" -msgstr "ХІБА: не з’яўляецца каталогам:" +msgstr "ЗГУБНА: не з’яўляецца каталогам:" msgid "" "Number out of range (should be in byte range, 0 <= n <= 0xFF, expressed in " @@ -696,7 +697,7 @@ msgid "Tries to use an old highlight mouse tracking" msgstr "Спрабаваць сачыць за мышшу старым спосабам" msgid "Disable mouse support in text version" -msgstr "Не падтрымліваць мыш у тэкставай версіі" +msgstr "Адключыць падтрымку мышы ў тэкставай вэрсіі" msgid "Tries to use termcap instead of terminfo" msgstr "Спрабаваць ужываць «termcap» замест «terminfo»" @@ -746,31 +747,13 @@ msgid "" " errdhotfocus\n" " Menus: menunormal, menuhot, menusel, menuhotsel, menuinactive\n" " Popup menus: pmenunormal, pmenusel, pmenutitle\n" -" Editor: editnormal, editbold, editmarked, editwhitespace,\n" +" Editor: editnormal, editbold, editmarked, editwhitespace, " +"editnonprintable,\n" " editlinestate, editbg, editframe, editframeactive\n" " editframedrag\n" " Viewer: viewnormal,viewbold, viewunderline, viewselected\n" " Help: helpnormal, helpitalic, helpbold, helplink, helpslink\n" msgstr "" -"--colors KEYWORD={FORE},{BACK},{ATTR}:KEYWORD2=...\n" -"\n" -"{FORE}, {BACK} і {ATTR} могуць быць апушчаныя, будзе выкарыстоўвацца " -"прадвызначанае значэнне \n" -"\n" -" Ключавыя словы:\n" -" Глабальныя: errors, disabled, reverse, gauge, header\n" -" input, inputmark, inputunchanged, commandlinemark\n" -" bbarhotkey, bbarbutton, statusbar\n" -" Паказ файлаў: normal, selected, marked, markselect\n" -" Дыялогавыя вокны: dnormal, dfocus, dhotnormal, dhotfocus, errdhotnormal,\n" -" errdhotfocus\n" -" Меню: menunormal, menuhot, menusel, menuhotsel, menuinactive\n" -" Выплыўныя меню: pmenunormal, pmenusel, pmenutitle\n" -" Рэдактар: editnormal, editbold, editmarked, editwhitespace,\n" -" editlinestate, editbg, editframe, editframeactive\n" -" editframedrag\n" -" Прагляд: viewnormal,viewbold, viewunderline, viewselected\n" -" Даведка: helpnormal, helpitalic, helpbold, helplink, helpslink\n" #. TRANSLATORS: don't translate color names and attributes msgid "" @@ -1228,23 +1211,23 @@ msgid "Sort" msgstr "Упарадкаваць" msgid "Cannot execute sort command" -msgstr "Немагчыма выканаць загад «упарадкаваць»" +msgstr "Немагчыма выканаць каманду sort" #, c-format msgid "Sort returned non-zero: %s" msgstr "Парадкаванне вярнула ненулявы код: %s" msgid "Paste output of external command" -msgstr "Уставіць вывад вонкавага загада" +msgstr "Уставіць вывад знешняй каманды" msgid "Enter shell command(s):" -msgstr "Увядзіце загад(ы) абалонкі:" +msgstr "Увядзіце каманду(ы) абалонкі:" msgid "External command" -msgstr "Вонкавы загад" +msgstr "Знешняя каманда" msgid "Cannot execute command" -msgstr "Немагчыма выканаць загад" +msgstr "Немагчыма выканаць каманду" msgid "mail -s -c " msgstr "mail -s <тэма> -c <копіі> <каму>" @@ -1299,7 +1282,7 @@ msgid "Macro not deleted" msgstr "Макрас не выдалілі" msgid "Repeat last commands" -msgstr "Паўтарыць апошнія загады" +msgstr "Паўтарыць апошнія каманды" msgid "Repeat times:" msgstr "Колькасць разоў:" @@ -1515,7 +1498,7 @@ msgid "&Search" msgstr "Шукаць(&S)" msgid "&Command" -msgstr "Загад(&C)" +msgstr "Каманда(&C)" msgid "For&mat" msgstr "Фарматаванне(&M)" @@ -1638,8 +1621,8 @@ msgstr "" "Зручны тэкставы рэдактар,\n" "напісаны для Midnight Commander." -msgid "Copyright (C) 1996-2023 the Free Software Foundation" -msgstr "Аўтарскія правы (C) 1996-2023 Free Software Foundation" +msgid "Copyright (C) 1996-2024 the Free Software Foundation" +msgstr "Аўтарскае права © 1996-2024 the Free Software Foundation" msgid "About" msgstr "Пра праграму" @@ -1791,14 +1774,14 @@ msgstr "" "MC не можа перайсці ў каталог, які патрабуе\n" "ўбудаваная абалонка. Можа, вы\n" "выдалілі працоўны каталог або далі сабе дадатковыя\n" -"прывілеі загадам su?" +"прывілеі камандай su?" #, c-format msgid "Cannot fetch a local copy of %s" msgstr "Немагчыма атрымаць лакальную копію «%s»" msgid "The shell is already running a command" -msgstr "Абалонка ўжо выконвае загад" +msgstr "Абалонка ўжо выконвае каманду" msgid "" "Not an xterm or Linux console;\n" @@ -1836,7 +1819,7 @@ msgid "Permissions (octal): %o" msgstr "Дазволы (васьмерычныя): %o" msgid "Chown advanced command" -msgstr "Пашыраны загад «chown»" +msgstr "Пашыраная каманда «chown»" #, c-format msgid "" @@ -1960,7 +1943,7 @@ msgid "Skin:" msgstr "Абалонка:" msgid "&Shadows" -msgstr "" +msgstr "Цені(&S)" msgid "Appearance" msgstr "Выгляд" @@ -2178,6 +2161,9 @@ msgid "" "%s\n" "%s" msgstr "" +"Немагчыма перайсці ў каталог\n" +"%s\n" +"%s" msgid "Secure deletion" msgstr "Надзейнае выдаленне" @@ -2331,7 +2317,7 @@ msgid "Group name:" msgstr "Назва групы:" msgid "Chmod command" -msgstr "Загад «chmod»" +msgstr "Каманда «chmod»" msgid "Permission" msgstr "Дазвол" @@ -2358,7 +2344,7 @@ msgid "Size" msgstr "Памер" msgid "Chown command" -msgstr "Загад «chown»" +msgstr "Каманда «chown»" msgid "User name" msgstr "Імя карыстальніка" @@ -2400,7 +2386,7 @@ msgid "Filtered view" msgstr "Прагляд вываду загада" msgid "Filter command and arguments:" -msgstr "Загад і аргументы:" +msgstr "Каманда фільтра ды яго аргументы:" msgid "Edit file" msgstr "Рэдагаваць файл" @@ -2445,8 +2431,8 @@ msgid "" "Both panels should be in the listing mode\n" "to use this command" msgstr "" -"Каб выканаць загад, патрэбна, каб абедзве панэлі\n" -"адлюстроўваліся спісамі" +"Абедзве панэлі мусяць адлюстроўвацца спісамі,\n" +"каб выканаць гэтую каманду" #, c-format msgid "'%s' is not a symbolic link" @@ -2501,7 +2487,7 @@ msgid "Unable to save setup to %s" msgstr "Немагчыма захаваць налады ў «%s»" msgid "Cannot execute commands on non-local filesystems" -msgstr "На нелакальных файлавых сістэмах нельга выконваць загады" +msgstr "На нелакальных файлавых сістэмах нельга выконваць каманды" msgid "Parameter" msgstr "Параметр" @@ -2511,7 +2497,7 @@ msgid "" "Cannot create temporary command file\n" "%s" msgstr "" -"Немагчыма стварыць часовы загадны файл\n" +"Немагчыма стварыць часовы камандны файл\n" "%s" msgid "Pipe failed" @@ -2857,7 +2843,7 @@ msgid "&Keep" msgstr "Захаваць(&K)" msgid "&Continue copy" -msgstr "" +msgstr "Працягнуць капіяванне(&C)" #, c-format msgid "" @@ -3180,7 +3166,7 @@ msgid "Show directory s&izes" msgstr "Памеры каталогаў(&I)" msgid "Command &history" -msgstr "Гісторыя загадаў(&H)" +msgstr "Гісторыя каманд(&H)" msgid "Viewed/edited files hi&story" msgstr "Гісторыя прагледжаных / рэдагаваных файлаў" @@ -3550,7 +3536,7 @@ msgid "&Menubar visible" msgstr "Адлюстроўваць меню(&M)" msgid "Command &prompt" -msgstr "Загадны радок(&P)" +msgstr "Камандны радок(&P)" msgid "&Keybar visible" msgstr "Радок клавіш(&K)" @@ -3738,16 +3724,16 @@ msgid "External panelize" msgstr "Загад на вонкавую панэль" msgid "Other command" -msgstr "Іншы загад" +msgstr "Іншая каманда" msgid "Command" -msgstr "Загад" +msgstr "Каманда" msgid "Add to external panelize" msgstr "Дадаць да загадаў" msgid "Enter command label:" -msgstr "Увядзіце назву загада:" +msgstr "Увядзіце назву каманды:" #, c-format msgid "" @@ -4181,80 +4167,44 @@ msgstr "" "Віртуальная файлавая сістэма EXTFS:\n" "%s" -#, c-format -msgid "Warning: cannot open %s directory\n" -msgstr "Увага: немагчыма адкрыць каталог «%s»\n" - -#, c-format -msgid "fish: Disconnecting from %s" -msgstr "fish: адлучаемся ад «%s»" - -msgid "fish: Waiting for initial line..." -msgstr "fish: чакаецца пачатковы радок..." - -msgid "Sorry, we cannot do password authenticated connections for now." -msgstr "Пакуль немагчыма злучыцца і ўвесці пароль." - -#, c-format -msgid "fish: Password is required for %s" -msgstr "fish: «%s» патрабуе пароль" - -msgid "fish: Sending password..." -msgstr "fish: адпраўляецца пароль..." - -msgid "fish: Sending initial line..." -msgstr "fish: адпраўляецца пачатковы радок..." - -msgid "fish: Handshaking version..." -msgstr "fish: пацвярджаецца версія..." - -msgid "fish: Getting host info..." -msgstr "fish: атрымліваюцца звесткі пра вузел..." - -#, c-format -msgid "fish: Reading directory %s..." -msgstr "fish: чытаецца каталог «%s»..." +msgid "" +"EXTFS virtual file system:\n" +"wrong file name" +msgstr "" +"Віртуальная файлавая сістэма EXTFS:\n" +"памылковая назва файла" -#, c-format -msgid "%s: done." -msgstr "%s: завершана." +msgid "" +"EXTFS virtual file system:\n" +"wrong archive name" +msgstr "" +"Віртуальная файлавая сістэма EXTFS:\n" +"памылковая назва архіва" -#, c-format -msgid "%s: failure" -msgstr "%s: не атрымалася" +msgid "" +"EXTFS virtual file system:\n" +"cannot build command" +msgstr "" +"Віртуальная файлавая сістэма EXTFS:\n" +"немагчыма стварыць каманду" #, c-format -msgid "fish: store %s: sending command..." -msgstr "fish: захаваць «%s»: адпраўляецца загад..." - -msgid "fish: Local read failed, sending zeros" -msgstr "fish: не атрымалася прачытаць лакальнае, адпраўляюцца нулі" - -msgid "fish: storing file" -msgstr "fish: захоўваецца файл" - -msgid "Aborting transfer..." -msgstr "Перадача скасоўваецца..." - -msgid "Error reported after abort." -msgstr "Пасля скасавання выяўлена памылка." - -msgid "Aborted transfer would be successful." -msgstr "Перадача скасаваная." +msgid "Warning: cannot open %s directory\n" +msgstr "Увага: немагчыма адкрыць каталог «%s»\n" #, c-format msgid "ftpfs: Disconnecting from %s" -msgstr "ftpfs: адлучаемся ад «%s»" +msgstr "ftpfs: адлучэнне ад «%s»" #, c-format msgid "FTP: Password required for %s" msgstr "FTP: «%s» патрабуе пароль" msgid "ftpfs: sending login name" -msgstr "ftpfs: адпраўляецца імя карыстальніка" +msgstr "ftpfs: адпраўка імя карыстальніка" msgid "ftpfs: sending user password" -msgstr "ftpfs: адпраўляецца пароль карыстальніка" +msgstr "ftpfs: адпраўка пароля карыстальніка" #, c-format msgid "FTP: Account required for user %s" @@ -4264,7 +4214,7 @@ msgid "Account:" msgstr "Акаўнт:" msgid "ftpfs: sending user account" -msgstr "ftpfs: адпраўляецца рахунак карыстальніка" +msgstr "ftpfs: адпраўка акаўнта карыстальніка" msgid "ftpfs: logged in" msgstr "ftpfs: увайшлі" @@ -4282,10 +4232,10 @@ msgstr "ftpfs: %s" #, c-format msgid "ftpfs: making connection to %s" -msgstr "ftpfs: злучаемся з «%s»" +msgstr "ftpfs: здзяйсненне злучэння з «%s»" msgid "ftpfs: connection interrupted by user" -msgstr "ftpfs: карыстальнік кінуў злучацца" +msgstr "ftpfs: злучэнне перарванае карыстальнікам" #, c-format msgid "ftpfs: connection to server failed: %s" @@ -4301,11 +4251,11 @@ msgstr "ftpfs: немагчыма пераўтварць адрас у імя: % #, c-format msgid "ftpfs: try reconnect to server, attempt %u" -msgstr "ftpfs: спрабую перападключыцца да сервера, спроба %u" +msgstr "ftpfs: спрабаванне паўторнага злучэння з серверам, спроба %u" #, c-format msgid "ftpfs: could not get socket name: %s" -msgstr "ftpfs: не магу атрымаць імя сокета: %s" +msgstr "ftpfs: не ўдалося атрымаць назву сокета: %s" msgid "ftpfs: could not reconnect to server" msgstr "ftpfs: не ўдалося паўторна злучыцца з серверам" @@ -4315,20 +4265,20 @@ msgstr "ftpfs: хібная сям’я адрасоў" #, c-format msgid "ftpfs: could not create socket: %s" -msgstr "ftpfs: нельга стварыць сокет: %s" +msgstr "ftpfs: не ўдалося стварыць сокет: %s" msgid "ftpfs: could not setup passive mode" -msgstr "ftpfs: нельга наладзіць пасіўны рэжым" +msgstr "ftpfs: не ўдалося наладзіць пасіўны рэжым" msgid "ftpfs: aborting transfer." -msgstr "ftpfs: перадача скасоўваецца." +msgstr "ftpfs: скасаванне перадачы." #, c-format msgid "ftpfs: abort error: %s" -msgstr "ftpfs: не атрымалася скасаваць: %s" +msgstr "ftpfs: памылка скасавання: %s" msgid "ftpfs: abort failed" -msgstr "ftpfs: памылка падчас скасавання" +msgstr "ftpfs: не атрымалася скасаваць" msgid "ftpfs: CWD failed." msgstr "ftpfs: не атрымалася змяніць бягучы працоўны каталог." @@ -4341,7 +4291,7 @@ msgstr "Разбіраецца сімвалічная спасылка..." #, c-format msgid "ftpfs: Reading FTP directory %s... %s%s" -msgstr "ftpfs: чытаецца FTP-каталог «%s»… %s%s" +msgstr "ftpfs: чытанне каталога FTP %s... %s%s" msgid "(strict rfc959)" msgstr "(абмежаванне RFC959)" @@ -4352,8 +4302,16 @@ msgstr "(спачатку «chdir»)" msgid "ftpfs: failed; nowhere to fallback to" msgstr "ftpfs: памылка; няма куды вярнуцца ў аварыйны стан" +#, c-format +msgid "%s: failure" +msgstr "%s: не атрымалася" + +#, c-format +msgid "%s: done." +msgstr "%s: завершана." + msgid "ftpfs: storing file" -msgstr "ftpfs: захоўваецца файл" +msgstr "ftpfs: захоўванне файла" msgid "" "~/.netrc file has incorrect mode\n" @@ -4509,6 +4467,52 @@ msgstr "sftp: чытаецца спіс (спыніць — «Ctrl-G»)… %s" msgid "sftp: Listing done." msgstr "sftp: спіс прачытаны." +#, c-format +msgid "shell: Disconnecting from %s" +msgstr "shell: адлучэнне ад «%s»" + +msgid "shell: Waiting for initial line..." +msgstr "shell: чаканне пачатковага радка..." + +msgid "Sorry, we cannot do password authenticated connections for now." +msgstr "Пакуль немагчыма злучыцца і ўвесці пароль." + +#, c-format +msgid "shell: Password is required for %s" +msgstr "shell: «%s» патрабуе пароль" + +msgid "shell: Sending password..." +msgstr "shell: адпраўка пароля..." + +msgid "shell: Sending initial line..." +msgstr "shell: адпраўка пачатковага радка..." + +msgid "shell: Getting host info..." +msgstr "shell: атрыманне звестак пра вузел..." + +#, c-format +msgid "shell: Reading directory %s..." +msgstr "shell: чытанне каталога «%s»..." + +#, c-format +msgid "shell: store %s: sending command..." +msgstr "shell: захоўванне «%s»: адпраўка каманды..." + +msgid "shell: Local read failed, sending zeros" +msgstr "shell: не атрымалася прачытаць лакальна, адпраўляюцца нулі" + +msgid "shell: storing file" +msgstr "shell: захоўванне файла" + +msgid "Aborting transfer..." +msgstr "Перадача скасоўваецца..." + +msgid "Error reported after abort." +msgstr "Пасля скасавання выяўлена памылка." + +msgid "Aborted transfer would be successful." +msgstr "Перадача скасаваная." + msgid "Inconsistent tar archive" msgstr "Несумяшчальны архіў tar" @@ -4520,7 +4524,7 @@ msgid "" "Cannot open tar archive\n" "%s" msgstr "" -"Немагчыма адкрыць tar-архіў\n" +"Немагчыма адкрыць архіў tar\n" "%s" #, c-format @@ -4528,9 +4532,11 @@ msgid "" "%s\n" "doesn't look like a tar archive" msgstr "" +"%s\n" +"не падобны на архіў tar" msgid "tar: mc_lseek not stopped at a record boundary" -msgstr "" +msgstr "tar: mc_lseek не спыніўся на мяжы запісу" msgid "undelfs: error" msgstr "undelfs: памылка" diff --git a/mcsrc/po/bg.po b/mcsrc/po/bg.po index 776aee02..7a390dd3 100644 --- a/mcsrc/po/bg.po +++ b/mcsrc/po/bg.po @@ -13,7 +13,7 @@ msgid "" msgstr "" "Project-Id-Version: Midnight Commander\n" "Report-Msgid-Bugs-To: https://www.midnight-commander.org/\n" -"POT-Creation-Date: 2023-08-06 15:50+0200\n" +"POT-Creation-Date: 2024-01-20 20:51+0100\n" "PO-Revision-Date: 2010-12-29 10:19+0000\n" "Last-Translator: Alexander Shopov , 2022\n" "Language-Team: Bulgarian (http://app.transifex.com/mc/mc/language/bg/)\n" @@ -739,31 +739,13 @@ msgid "" " errdhotfocus\n" " Menus: menunormal, menuhot, menusel, menuhotsel, menuinactive\n" " Popup menus: pmenunormal, pmenusel, pmenutitle\n" -" Editor: editnormal, editbold, editmarked, editwhitespace,\n" +" Editor: editnormal, editbold, editmarked, editwhitespace, " +"editnonprintable,\n" " editlinestate, editbg, editframe, editframeactive\n" " editframedrag\n" " Viewer: viewnormal,viewbold, viewunderline, viewselected\n" " Help: helpnormal, helpitalic, helpbold, helplink, helpslink\n" msgstr "" -"--colors КЛЮЧОВА_ДУМА={ЦВЯТ},{ФОН},{АТРИБУТ}:КЛЮЧОВА_ДУМА_2=…\n" -"\n" -"Когато пропуснете {ЦВЯТ}, {ФОН} или {АТРИБУТ}, се ползват стандартните\n" -"стойности\n" -"\n" -"Ключови думи:\n" -" Глобални: errors, disabled, reverse, gauge, header,\n" -" input, inputmark, inputunchanged, commandlinemark,\n" -" bbarhotkey, bbarbutton, statusbar\n" -" Файлове: normal, selected, marked, markselect\n" -" Диалогови прозорци: dnormal, dfocus, dhotnormal, dhotfocus, errdhotnormal,\n" -" errdhotfocus\n" -" Менюта: menunormal, menuhot, menusel, menuhotsel, menuinactive\n" -" Изскачащи менюта: pmenunormal, pmenusel, pmenutitle\n" -" Редактор: editnormal, editbold, editmarked, editwhitespace,\n" -" editlinestate, editbg, editframe, editframeactive,\n" -" editframedrag\n" -" Преглед: viewnormal, viewbold, viewunderline, viewselected\n" -" Помощ: helpnormal, helpitalic, helpbold, helplink, helpslink\n" #. TRANSLATORS: don't translate color names and attributes msgid "" @@ -1633,7 +1615,7 @@ msgstr "" "Удобен текстови редактор\n" "за Midnight Commander." -msgid "Copyright (C) 1996-2023 the Free Software Foundation" +msgid "Copyright (C) 1996-2024 the Free Software Foundation" msgstr "" msgid "About" @@ -4157,66 +4139,24 @@ msgstr "" "Виртуална ФС по EXTFS:\n" "%s" -#, c-format -msgid "Warning: cannot open %s directory\n" -msgstr "Предупреждение: директорията %s не може да се отвори \n" - -#, c-format -msgid "fish: Disconnecting from %s" -msgstr "fish: Изключване от %s" - -msgid "fish: Waiting for initial line..." -msgstr "fish: Изчаква се начален ред…" - -msgid "Sorry, we cannot do password authenticated connections for now." -msgstr "Засега връзки с парола не може да се осъществят." - -#, c-format -msgid "fish: Password is required for %s" -msgstr "fish: Нужна е парола за %s" - -msgid "fish: Sending password..." -msgstr "fish: Изпращане на парола…" - -msgid "fish: Sending initial line..." -msgstr "fish: Изпращане на начален ред…" - -msgid "fish: Handshaking version..." -msgstr "fish: Потвърждаване на версията…" - -msgid "fish: Getting host info..." -msgstr "fish: Получаване на данни за хоста…" - -#, c-format -msgid "fish: Reading directory %s..." -msgstr "fish: Прочитане на директорията %s…" +msgid "" +"EXTFS virtual file system:\n" +"wrong file name" +msgstr "" -#, c-format -msgid "%s: done." -msgstr "%s: готово." +msgid "" +"EXTFS virtual file system:\n" +"wrong archive name" +msgstr "" -#, c-format -msgid "%s: failure" -msgstr "%s: неуспех" +msgid "" +"EXTFS virtual file system:\n" +"cannot build command" +msgstr "" #, c-format -msgid "fish: store %s: sending command..." -msgstr "fish: запис на %s: изпращане на командата…" - -msgid "fish: Local read failed, sending zeros" -msgstr "fish: Неуспешно локалнот четене, изпращат се нули" - -msgid "fish: storing file" -msgstr "fish: запис на файл" - -msgid "Aborting transfer..." -msgstr "Отмяна на пренасянето…" - -msgid "Error reported after abort." -msgstr "Грешка след отмяната." - -msgid "Aborted transfer would be successful." -msgstr "Преносът е отменен успешно." +msgid "Warning: cannot open %s directory\n" +msgstr "Предупреждение: директорията %s не може да се отвори \n" #, c-format msgid "ftpfs: Disconnecting from %s" @@ -4328,6 +4268,14 @@ msgstr "(първо cd)" msgid "ftpfs: failed; nowhere to fallback to" msgstr "ftpfs: неуспех; няма място за връщане" +#, c-format +msgid "%s: failure" +msgstr "%s: неуспех" + +#, c-format +msgid "%s: done." +msgstr "%s: готово." + msgid "ftpfs: storing file" msgstr "ftpfs: съхраняване на файл" @@ -4485,6 +4433,52 @@ msgstr "sftp: (прекъсване с Ctrl-G) Извеждане… %s" msgid "sftp: Listing done." msgstr "sftp: Извеждането приключи." +#, c-format +msgid "shell: Disconnecting from %s" +msgstr "" + +msgid "shell: Waiting for initial line..." +msgstr "" + +msgid "Sorry, we cannot do password authenticated connections for now." +msgstr "Засега връзки с парола не може да се осъществят." + +#, c-format +msgid "shell: Password is required for %s" +msgstr "" + +msgid "shell: Sending password..." +msgstr "" + +msgid "shell: Sending initial line..." +msgstr "" + +msgid "shell: Getting host info..." +msgstr "" + +#, c-format +msgid "shell: Reading directory %s..." +msgstr "" + +#, c-format +msgid "shell: store %s: sending command..." +msgstr "" + +msgid "shell: Local read failed, sending zeros" +msgstr "" + +msgid "shell: storing file" +msgstr "" + +msgid "Aborting transfer..." +msgstr "Отмяна на пренасянето…" + +msgid "Error reported after abort." +msgstr "Грешка след отмяната." + +msgid "Aborted transfer would be successful." +msgstr "Преносът е отменен успешно." + msgid "Inconsistent tar archive" msgstr "сгрешен архив tar" diff --git a/mcsrc/po/br.po b/mcsrc/po/br.po index 77212f8d..7bd8a0f5 100644 --- a/mcsrc/po/br.po +++ b/mcsrc/po/br.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Midnight Commander\n" "Report-Msgid-Bugs-To: https://www.midnight-commander.org/\n" -"POT-Creation-Date: 2023-08-06 15:50+0200\n" +"POT-Creation-Date: 2024-01-20 20:51+0100\n" "PO-Revision-Date: 2010-12-29 10:19+0000\n" "Last-Translator: Irriep Nala Novram , 2017-2018\n" "Language-Team: Breton (http://app.transifex.com/mc/mc/language/br/)\n" @@ -708,7 +708,8 @@ msgid "" " errdhotfocus\n" " Menus: menunormal, menuhot, menusel, menuhotsel, menuinactive\n" " Popup menus: pmenunormal, pmenusel, pmenutitle\n" -" Editor: editnormal, editbold, editmarked, editwhitespace,\n" +" Editor: editnormal, editbold, editmarked, editwhitespace, " +"editnonprintable,\n" " editlinestate, editbg, editframe, editframeactive\n" " editframedrag\n" " Viewer: viewnormal,viewbold, viewunderline, viewselected\n" @@ -1544,7 +1545,7 @@ msgid "" "written for the Midnight Commander." msgstr "" -msgid "Copyright (C) 1996-2023 the Free Software Foundation" +msgid "Copyright (C) 1996-2024 the Free Software Foundation" msgstr "" msgid "About" @@ -3917,65 +3918,23 @@ msgid "" "%s" msgstr "" -#, c-format -msgid "Warning: cannot open %s directory\n" -msgstr "" - -#, c-format -msgid "fish: Disconnecting from %s" -msgstr "" - -msgid "fish: Waiting for initial line..." -msgstr "" - -msgid "Sorry, we cannot do password authenticated connections for now." -msgstr "" - -#, c-format -msgid "fish: Password is required for %s" -msgstr "" - -msgid "fish: Sending password..." -msgstr "" - -msgid "fish: Sending initial line..." -msgstr "" - -msgid "fish: Handshaking version..." -msgstr "" - -msgid "fish: Getting host info..." -msgstr "" - -#, c-format -msgid "fish: Reading directory %s..." +msgid "" +"EXTFS virtual file system:\n" +"wrong file name" msgstr "" -#, c-format -msgid "%s: done." +msgid "" +"EXTFS virtual file system:\n" +"wrong archive name" msgstr "" -#, c-format -msgid "%s: failure" +msgid "" +"EXTFS virtual file system:\n" +"cannot build command" msgstr "" #, c-format -msgid "fish: store %s: sending command..." -msgstr "" - -msgid "fish: Local read failed, sending zeros" -msgstr "" - -msgid "fish: storing file" -msgstr "" - -msgid "Aborting transfer..." -msgstr "" - -msgid "Error reported after abort." -msgstr "" - -msgid "Aborted transfer would be successful." +msgid "Warning: cannot open %s directory\n" msgstr "" #, c-format @@ -4088,6 +4047,14 @@ msgstr "" msgid "ftpfs: failed; nowhere to fallback to" msgstr "" +#, c-format +msgid "%s: failure" +msgstr "" + +#, c-format +msgid "%s: done." +msgstr "" + msgid "ftpfs: storing file" msgstr "" @@ -4221,6 +4188,52 @@ msgstr "" msgid "sftp: Listing done." msgstr "" +#, c-format +msgid "shell: Disconnecting from %s" +msgstr "" + +msgid "shell: Waiting for initial line..." +msgstr "" + +msgid "Sorry, we cannot do password authenticated connections for now." +msgstr "" + +#, c-format +msgid "shell: Password is required for %s" +msgstr "" + +msgid "shell: Sending password..." +msgstr "" + +msgid "shell: Sending initial line..." +msgstr "" + +msgid "shell: Getting host info..." +msgstr "" + +#, c-format +msgid "shell: Reading directory %s..." +msgstr "" + +#, c-format +msgid "shell: store %s: sending command..." +msgstr "" + +msgid "shell: Local read failed, sending zeros" +msgstr "" + +msgid "shell: storing file" +msgstr "" + +msgid "Aborting transfer..." +msgstr "" + +msgid "Error reported after abort." +msgstr "" + +msgid "Aborted transfer would be successful." +msgstr "" + msgid "Inconsistent tar archive" msgstr "" diff --git a/mcsrc/po/ca.po b/mcsrc/po/ca.po index bc09d58c..0cf6bc7d 100644 --- a/mcsrc/po/ca.po +++ b/mcsrc/po/ca.po @@ -3,7 +3,7 @@ # This file is distributed under the same license as the mc package. # # Translators: -# Antoni Bella Pérez , 2017-2023 +# Antoni Bella Pérez , 2017-2024 # Daniel , 2011 # Daniel , 2011-2012 # Daniel , 2012 @@ -16,9 +16,9 @@ msgid "" msgstr "" "Project-Id-Version: Midnight Commander\n" "Report-Msgid-Bugs-To: https://www.midnight-commander.org/\n" -"POT-Creation-Date: 2023-08-06 15:50+0200\n" +"POT-Creation-Date: 2024-01-20 20:51+0100\n" "PO-Revision-Date: 2010-12-29 10:19+0000\n" -"Last-Translator: Antoni Bella Pérez , 2017-2023\n" +"Last-Translator: Antoni Bella Pérez , 2017-2024\n" "Language-Team: Catalan (http://app.transifex.com/mc/mc/language/ca/)\n" "Language: ca\n" "MIME-Version: 1.0\n" @@ -750,30 +750,34 @@ msgid "" " errdhotfocus\n" " Menus: menunormal, menuhot, menusel, menuhotsel, menuinactive\n" " Popup menus: pmenunormal, pmenusel, pmenutitle\n" -" Editor: editnormal, editbold, editmarked, editwhitespace,\n" +" Editor: editnormal, editbold, editmarked, editwhitespace, " +"editnonprintable,\n" " editlinestate, editbg, editframe, editframeactive\n" " editframedrag\n" " Viewer: viewnormal,viewbold, viewunderline, viewselected\n" " Help: helpnormal, helpitalic, helpbold, helplink, helpslink\n" msgstr "" -"--colors KEYWORD={FORE},{BACK},{ATTR}:KEYWORD2=...\n" +"--colors PARAULA_CLAU={FORE},{BACK},{ATTR}:PARAULA_CLAU_2=...\n" "\n" -"{FORE}, {BACK} i {ATTR} es poden ometre i s'usarà el valor predeterminat\n" +"{FORE}, {BACK} i {ATTR} es pot ometre i s'usarà el valor predeterminat\n" "\n" " Paraules clau:\n" -" Global: errors, disabled, reverse, gauge, header\n" -" input, inputmark, inputunchanged, commandlinemark\n" -" bbarhotkey, bbarbutton, statusbar\n" -" Visor fitxer: normal, selected, marked, markselect\n" -" Diàlegs: dnormal, dfocus, dhotnormal, dhotfocus, errdhotnormal,\n" -" errdhotfocus\n" -" Menús: menunormal, menuhot, menusel, menuhotsel, menuinactive\n" -" Menús emerg: pmenunormal, pmenusel, pmenutitle\n" -" Editor: editnormal, editbold, editmarked, editwhitespace,\n" -" editlinestate, editbg, editframe, editframeactive\n" -" editframedrag\n" -" Visor: viewnormal,viewbold, viewunderline, viewselected\n" -" Ajuda: helpnormal, helpitalic, helpbold, helplink, helpslink\n" +" Global: errors, disabled, reverse, gauge, header,\n" +" input, inputmark, inputunchanged, commandlinemark,\n" +" bbarhotkey, bbarbutton i statusbar.\n" +" Mostra els fitxers: normal, selected, marked i markselect.\n" +" Diàlegs: dnormal, dfocus, dhotnormal, dhotfocus, " +"errdhotnormal\n" +" i errdhotfocus.\n" +" Menús: menunormal, menuhot, menusel, menuhotsel i " +"menuinactive.\n" +" Menús emergents: pmenunormal, pmenusel i pmenutitle.\n" +" Editor: editnormal, editbold, editmarked, editwhitespace,\n" +" editnonprintable, editlinestate, editbg, editframe,\n" +" editframeactive i editframedrag.\n" +" Visor: viewnormal,viewbold, viewunderline i viewselected.\n" +" Ajuda: helpnormal, helpitalic, helpbold, helplink i " +"helpslink.\n" #. TRANSLATORS: don't translate color names and attributes msgid "" @@ -1644,8 +1648,8 @@ msgstr "" "Un editor de text fàcil d'emprar\n" "escrit per al Midnight Commander." -msgid "Copyright (C) 1996-2023 the Free Software Foundation" -msgstr "Copyright (C) 1996-2023 la «Free Software Foundation»" +msgid "Copyright (C) 1996-2024 the Free Software Foundation" +msgstr "Copyright (C) 1996-2024 la Free Software Foundation" msgid "About" msgstr "Quant a" @@ -2184,6 +2188,9 @@ msgid "" "%s\n" "%s" msgstr "" +"No s'ha pogut canviar el directori a\n" +"%s\n" +"%s" msgid "Secure deletion" msgstr "Supressió segura" @@ -4186,67 +4193,30 @@ msgstr "" "Sistema de fitxers virtual EXTFS:\n" "%s" -#, c-format -msgid "Warning: cannot open %s directory\n" -msgstr "Avís: no s'ha pogut obrir el directori %s\n" - -#, c-format -msgid "fish: Disconnecting from %s" -msgstr "fish: S'està desconnectant de %s" - -msgid "fish: Waiting for initial line..." -msgstr "fish: Està esperant a la línia inicial..." - -msgid "Sorry, we cannot do password authenticated connections for now." +msgid "" +"EXTFS virtual file system:\n" +"wrong file name" msgstr "" -"Ho sentim, de moment no es poden fer connexions autenticades amb contrasenya." - -#, c-format -msgid "fish: Password is required for %s" -msgstr "fish: Contrasenya requerida per %s" - -msgid "fish: Sending password..." -msgstr "fish: S'està enviant la contrasenya..." - -msgid "fish: Sending initial line..." -msgstr "fish: S'està enviant la línia inicial..." - -msgid "fish: Handshaking version..." -msgstr "fish: S'està intercanviant la versió..." - -msgid "fish: Getting host info..." -msgstr "fish: S'està obtenint informació de l'amfitrió..." - -#, c-format -msgid "fish: Reading directory %s..." -msgstr "fish: S'està llegint el directori %s..." +"Sistema de fitxers virtual EXTFS:\n" +"nom de fitxer incorrecte" -#, c-format -msgid "%s: done." -msgstr "%s: fet." +msgid "" +"EXTFS virtual file system:\n" +"wrong archive name" +msgstr "" +"Sistema de fitxers virtual EXTFS:\n" +"nom d'arxiu incorrecte" -#, c-format -msgid "%s: failure" -msgstr "%s: fallada" +msgid "" +"EXTFS virtual file system:\n" +"cannot build command" +msgstr "" +"Sistema de fitxers virtual EXTFS:\n" +"no s'ha pogut crear l'ordre" #, c-format -msgid "fish: store %s: sending command..." -msgstr "fish: emmagatzema %s: s'està enviant l'ordre..." - -msgid "fish: Local read failed, sending zeros" -msgstr "fish: Ha fallat la lectura local, s'estan enviant zeros" - -msgid "fish: storing file" -msgstr "fish: s'està emmagatzemant el fitxer" - -msgid "Aborting transfer..." -msgstr "S'està interrompent la transferència..." - -msgid "Error reported after abort." -msgstr "S'ha informat d'un error després d'interrompre." - -msgid "Aborted transfer would be successful." -msgstr "Transferència interrompuda amb èxit." +msgid "Warning: cannot open %s directory\n" +msgstr "Avís: no s'ha pogut obrir el directori %s\n" #, c-format msgid "ftpfs: Disconnecting from %s" @@ -4358,6 +4328,14 @@ msgstr "(primer canvia de directori)" msgid "ftpfs: failed; nowhere to fallback to" msgstr "FTPFS: ha fallat; enlloc per a retornar-hi" +#, c-format +msgid "%s: failure" +msgstr "%s: fallada" + +#, c-format +msgid "%s: done." +msgstr "%s: fet." + msgid "ftpfs: storing file" msgstr "FTPFS: s'està emmagatzemant el fitxer" @@ -4520,6 +4498,53 @@ msgstr "sftp: (Ctrl-G per a cancel·lar) s'està llistant... %s" msgid "sftp: Listing done." msgstr "sftp: el llistat s'ha completat." +#, c-format +msgid "shell: Disconnecting from %s" +msgstr "intèrpret d'ordres: S'està desconnectant de %s" + +msgid "shell: Waiting for initial line..." +msgstr "intèrpret d'ordres: S'està esperant la línia inicial..." + +msgid "Sorry, we cannot do password authenticated connections for now." +msgstr "" +"Ho sentim, de moment no es poden fer connexions autenticades amb contrasenya." + +#, c-format +msgid "shell: Password is required for %s" +msgstr "intèrpret d'ordres: Es requereix una contrasenya per a %s" + +msgid "shell: Sending password..." +msgstr "intèrpret d'ordres: S'està enviant la contrasenya..." + +msgid "shell: Sending initial line..." +msgstr "intèrpret d'ordres: S'està enviant la línia inicial..." + +msgid "shell: Getting host info..." +msgstr "intèrpret d'ordres: S'està rebent informació de l'amfitrió..." + +#, c-format +msgid "shell: Reading directory %s..." +msgstr "intèrpret d'ordres: S'està llegint el directori %s..." + +#, c-format +msgid "shell: store %s: sending command..." +msgstr "intèrpret d'ordres: emmagatzematge %s: s'està enviant l'ordre..." + +msgid "shell: Local read failed, sending zeros" +msgstr "intèrpret d'ordres: La lectura local ha fallat, s'estan enviant zeros" + +msgid "shell: storing file" +msgstr "intèrpret d'ordres: fitxer d'emmagatzematge" + +msgid "Aborting transfer..." +msgstr "S'està interrompent la transferència..." + +msgid "Error reported after abort." +msgstr "S'ha informat d'un error després d'interrompre." + +msgid "Aborted transfer would be successful." +msgstr "Transferència interrompuda amb èxit." + msgid "Inconsistent tar archive" msgstr "L'arxiu TAR no és coherent" @@ -4539,9 +4564,11 @@ msgid "" "%s\n" "doesn't look like a tar archive" msgstr "" +"%s\n" +"no sembla un arxiu tar" msgid "tar: mc_lseek not stopped at a record boundary" -msgstr "" +msgstr "tar: «mc_lseek» no s'ha aturat en un límit de registre" msgid "undelfs: error" msgstr "undelfs: error" diff --git a/mcsrc/po/cs.po b/mcsrc/po/cs.po index 77b06fed..13f16d17 100644 --- a/mcsrc/po/cs.po +++ b/mcsrc/po/cs.po @@ -14,7 +14,7 @@ msgid "" msgstr "" "Project-Id-Version: Midnight Commander\n" "Report-Msgid-Bugs-To: https://www.midnight-commander.org/\n" -"POT-Creation-Date: 2023-08-06 15:50+0200\n" +"POT-Creation-Date: 2024-01-20 20:51+0100\n" "PO-Revision-Date: 2010-12-29 10:19+0000\n" "Last-Translator: Pavel Borecki , 2017-2023\n" "Language-Team: Czech (http://app.transifex.com/mc/mc/language/cs/)\n" @@ -742,30 +742,13 @@ msgid "" " errdhotfocus\n" " Menus: menunormal, menuhot, menusel, menuhotsel, menuinactive\n" " Popup menus: pmenunormal, pmenusel, pmenutitle\n" -" Editor: editnormal, editbold, editmarked, editwhitespace,\n" +" Editor: editnormal, editbold, editmarked, editwhitespace, " +"editnonprintable,\n" " editlinestate, editbg, editframe, editframeactive\n" " editframedrag\n" " Viewer: viewnormal,viewbold, viewunderline, viewselected\n" " Help: helpnormal, helpitalic, helpbold, helplink, helpslink\n" msgstr "" -"--colors KLICOVESLOVO={FORE},{BACK},{ATTR}:KEYWORD2=...\n" -"\n" -"{FORE}, {BACK} and {ATTR} can be omitted, and the default will be used\n" -"\n" -" Klíčová slova:\n" -" Globální: errors, disabled, reverse, gauge, header\n" -" input, inputmark, inputunchanged, commandlinemark\n" -" bbarhotkey, bbarbutton, statusbar\n" -" Zobrazení souborů: normal, selected, marked, markselect\n" -" Dialogy: dnormal, dfocus, dhotnormal, dhotfocus, errdhotnormal,\n" -" errdhotfocus\n" -" Nabídka: menunormal, menuhot, menusel, menuhotsel, menuinactive\n" -" Vyskakovcí nabídka: pmenunormal, pmenusel, pmenutitle\n" -" Editor: editnormal, editbold, editmarked, editwhitespace,\n" -" editlinestate, editbg, editframe, editframeactive\n" -" editframedrag\n" -" Prohlížeč: viewnormal,viewbold, viewunderline, viewselected\n" -" Nápověda: helpnormal, helpitalic, helpbold, helplink, helpslink\n" #. TRANSLATORS: don't translate color names and attributes msgid "" @@ -1632,8 +1615,8 @@ msgstr "" "Uživatelsky přívětivý textový editor\n" "napsaný pro Midnight Commander." -msgid "Copyright (C) 1996-2023 the Free Software Foundation" -msgstr "Autorská práva © 1996-2023 nadace Free Software Foundation" +msgid "Copyright (C) 1996-2024 the Free Software Foundation" +msgstr "" msgid "About" msgstr "O programu" @@ -4185,67 +4168,24 @@ msgstr "" "Virtuální souborový systém EXTFS:\n" "%s" -#, c-format -msgid "Warning: cannot open %s directory\n" -msgstr "Varování: složku %s se nedaří otevřít\n" - -#, c-format -msgid "fish: Disconnecting from %s" -msgstr "fish: Odpojování od %s" - -msgid "fish: Waiting for initial line..." -msgstr "fish: Čekání na úvodní spojení…" - -msgid "Sorry, we cannot do password authenticated connections for now." -msgstr "Je nám líto, ale prozatím nelze navazovat heslem se ověřující spojení." - -#, c-format -msgid "fish: Password is required for %s" -msgstr "fish: Pro %s je vyžadováno heslo" - -msgid "fish: Sending password..." -msgstr "fish: Odesílání hesla…" - -msgid "fish: Sending initial line..." -msgstr "fish: Odesílá se úvodní řádek…" - -msgid "fish: Handshaking version..." -msgstr "fish: Domlouvání verze…" - -msgid "fish: Getting host info..." -msgstr "fish: Získávání informací o hostiteli…" - -#, c-format -msgid "fish: Reading directory %s..." -msgstr "fish: Načítaní složky %s…" - -#, c-format -msgid "%s: done." -msgstr "%s: hotovo." - -#, c-format -msgid "%s: failure" -msgstr "%s: nezdar" - -#, c-format -msgid "fish: store %s: sending command..." -msgstr "fish: ukládání %s: odesílání příkazu…" - -msgid "fish: Local read failed, sending zeros" +msgid "" +"EXTFS virtual file system:\n" +"wrong file name" msgstr "" -"fish: Načtení místního souboru se nezdařilo, náhradně se odesílají nuly" - -msgid "fish: storing file" -msgstr "fish: ukládání souboru" -msgid "Aborting transfer..." -msgstr "Přerušení přenosu…" +msgid "" +"EXTFS virtual file system:\n" +"wrong archive name" +msgstr "" -msgid "Error reported after abort." -msgstr "Po přerušení byla oznámena chyba." +msgid "" +"EXTFS virtual file system:\n" +"cannot build command" +msgstr "" -msgid "Aborted transfer would be successful." -msgstr "Přerušení přenosu proběhlo v pořádku." +#, c-format +msgid "Warning: cannot open %s directory\n" +msgstr "Varování: složku %s se nedaří otevřít\n" #, c-format msgid "ftpfs: Disconnecting from %s" @@ -4357,6 +4297,14 @@ msgstr "(nejdříve chdir)" msgid "ftpfs: failed; nowhere to fallback to" msgstr "ftpfs: nezdar; není jiná možnost" +#, c-format +msgid "%s: failure" +msgstr "%s: nezdar" + +#, c-format +msgid "%s: done." +msgstr "%s: hotovo." + msgid "ftpfs: storing file" msgstr "ftpfs: ukládá se soubor" @@ -4515,6 +4463,52 @@ msgstr "sftp: (přerušení CTRL+G) vypisování… %s" msgid "sftp: Listing done." msgstr "sftp: Vypsání dokončeno." +#, c-format +msgid "shell: Disconnecting from %s" +msgstr "" + +msgid "shell: Waiting for initial line..." +msgstr "" + +msgid "Sorry, we cannot do password authenticated connections for now." +msgstr "Je nám líto, ale prozatím nelze navazovat heslem se ověřující spojení." + +#, c-format +msgid "shell: Password is required for %s" +msgstr "" + +msgid "shell: Sending password..." +msgstr "" + +msgid "shell: Sending initial line..." +msgstr "" + +msgid "shell: Getting host info..." +msgstr "" + +#, c-format +msgid "shell: Reading directory %s..." +msgstr "" + +#, c-format +msgid "shell: store %s: sending command..." +msgstr "" + +msgid "shell: Local read failed, sending zeros" +msgstr "" + +msgid "shell: storing file" +msgstr "" + +msgid "Aborting transfer..." +msgstr "Přerušení přenosu…" + +msgid "Error reported after abort." +msgstr "Po přerušení byla oznámena chyba." + +msgid "Aborted transfer would be successful." +msgstr "Přerušení přenosu proběhlo v pořádku." + msgid "Inconsistent tar archive" msgstr "Nekonzistentní archiv .tar" diff --git a/mcsrc/po/da.po b/mcsrc/po/da.po index 8953a7c4..38db7f90 100644 --- a/mcsrc/po/da.po +++ b/mcsrc/po/da.po @@ -13,7 +13,7 @@ msgid "" msgstr "" "Project-Id-Version: Midnight Commander\n" "Report-Msgid-Bugs-To: https://www.midnight-commander.org/\n" -"POT-Creation-Date: 2023-08-06 15:50+0200\n" +"POT-Creation-Date: 2024-01-20 20:51+0100\n" "PO-Revision-Date: 2010-12-29 10:19+0000\n" "Last-Translator: Morten Bo Johansen , 2018,2023\n" "Language-Team: Danish (http://app.transifex.com/mc/mc/language/da/)\n" @@ -738,30 +738,13 @@ msgid "" " errdhotfocus\n" " Menus: menunormal, menuhot, menusel, menuhotsel, menuinactive\n" " Popup menus: pmenunormal, pmenusel, pmenutitle\n" -" Editor: editnormal, editbold, editmarked, editwhitespace,\n" +" Editor: editnormal, editbold, editmarked, editwhitespace, " +"editnonprintable,\n" " editlinestate, editbg, editframe, editframeactive\n" " editframedrag\n" " Viewer: viewnormal,viewbold, viewunderline, viewselected\n" " Help: helpnormal, helpitalic, helpbold, helplink, helpslink\n" msgstr "" -"--colors NØGLEORD={FORG},{BAGG},{ATTR}:NØGLEORD2=...\n" -"\n" -"{FORG}, {BAGG} og {ATTR} kan udelades, så bruges standarden\n" -"\n" -" Nøgleord:\n" -" Globale: errors, disabled, reverse, gauge, header\n" -" input, inputmark, inputunchanged, commandlinemark\n" -" bbarhotkey, bbarbutton, statusbar\n" -" Filvisning: normal, selected, marked, markselect\n" -" Dialogbokse: dnormal, dfocus, dhotnormal, dhotfocus, errdhotnormal,\n" -" errdhotfocus\n" -" Menuer: menunormal, menuhot, menusel, menuhotsel, menuinactive\n" -" Pop op-menuer: pmenunormal, pmenusel, pmenutitle\n" -" Editor: editnormal, editbold, editmarked, editwhitespace,\n" -" editlinestate, editbg, editframe, editframeactive\n" -" editframedrag\n" -" Fremviser: viewnormal,viewbold, viewunderline, viewselected\n" -" Hjælp: helpnormal, helpitalic, helpbold, helplink, helpslink\n" #. TRANSLATORS: don't translate color names and attributes msgid "" @@ -1629,8 +1612,8 @@ msgstr "" "En brugervenlig teksteditor\n" "skrevet til Midnight Commander." -msgid "Copyright (C) 1996-2023 the Free Software Foundation" -msgstr "Ophavsret (C) 1996-2023, The Free Software Foundation" +msgid "Copyright (C) 1996-2024 the Free Software Foundation" +msgstr "" msgid "About" msgstr "Om" @@ -4168,66 +4151,24 @@ msgstr "" "Virtuelt EXTFS-filsystem:\n" "%s" -#, c-format -msgid "Warning: cannot open %s directory\n" -msgstr "Advarsel: Kan ikke åbne mappen %s\n" - -#, c-format -msgid "fish: Disconnecting from %s" -msgstr "fisk: Afkobler fra %s" - -msgid "fish: Waiting for initial line..." -msgstr "fisk: Venter på begyndelseslinje..." - -msgid "Sorry, we cannot do password authenticated connections for now." -msgstr "Beklager, vi kan ikke lave adgangskodebekræftede forbindelser endnu." - -#, c-format -msgid "fish: Password is required for %s" -msgstr "fisk: Adgangskode er krævet for %s" - -msgid "fish: Sending password..." -msgstr "fisk: Sender adgangskode..." - -msgid "fish: Sending initial line..." -msgstr "fisk: Sender begyndelseslinje..." - -msgid "fish: Handshaking version..." -msgstr "fisk: Håndrystende version..." - -msgid "fish: Getting host info..." -msgstr "fisk: Indhenter værtsinformation..." - -#, c-format -msgid "fish: Reading directory %s..." -msgstr "fisk: Læser mappe %s..." +msgid "" +"EXTFS virtual file system:\n" +"wrong file name" +msgstr "" -#, c-format -msgid "%s: done." -msgstr "%s: færdig." +msgid "" +"EXTFS virtual file system:\n" +"wrong archive name" +msgstr "" -#, c-format -msgid "%s: failure" -msgstr "%s: fejl" +msgid "" +"EXTFS virtual file system:\n" +"cannot build command" +msgstr "" #, c-format -msgid "fish: store %s: sending command..." -msgstr "fisk: gem %s: sender kommando..." - -msgid "fish: Local read failed, sending zeros" -msgstr "fisk: Lokal læsning fejlede, sender nuller" - -msgid "fish: storing file" -msgstr "fisk: gemmer fil" - -msgid "Aborting transfer..." -msgstr "Afbryder overførsel..." - -msgid "Error reported after abort." -msgstr "Fejl meldt tilbage efter afbrydelse." - -msgid "Aborted transfer would be successful." -msgstr "Afbrudt overførsel ville være lykkedes." +msgid "Warning: cannot open %s directory\n" +msgstr "Advarsel: Kan ikke åbne mappen %s\n" #, c-format msgid "ftpfs: Disconnecting from %s" @@ -4339,6 +4280,14 @@ msgstr "(chdir først)" msgid "ftpfs: failed; nowhere to fallback to" msgstr "ftpfs: Fejlede; ingen steder at falde tilbage på" +#, c-format +msgid "%s: failure" +msgstr "%s: fejl" + +#, c-format +msgid "%s: done." +msgstr "%s: færdig." + msgid "ftpfs: storing file" msgstr "ftpfs: Gemmer fil" @@ -4495,6 +4444,52 @@ msgstr "sftp: (Ctrl-G break) Liste... %s" msgid "sftp: Listing done." msgstr "sftp: Liste færdig." +#, c-format +msgid "shell: Disconnecting from %s" +msgstr "" + +msgid "shell: Waiting for initial line..." +msgstr "" + +msgid "Sorry, we cannot do password authenticated connections for now." +msgstr "Beklager, vi kan ikke lave adgangskodebekræftede forbindelser endnu." + +#, c-format +msgid "shell: Password is required for %s" +msgstr "" + +msgid "shell: Sending password..." +msgstr "" + +msgid "shell: Sending initial line..." +msgstr "" + +msgid "shell: Getting host info..." +msgstr "" + +#, c-format +msgid "shell: Reading directory %s..." +msgstr "" + +#, c-format +msgid "shell: store %s: sending command..." +msgstr "" + +msgid "shell: Local read failed, sending zeros" +msgstr "" + +msgid "shell: storing file" +msgstr "" + +msgid "Aborting transfer..." +msgstr "Afbryder overførsel..." + +msgid "Error reported after abort." +msgstr "Fejl meldt tilbage efter afbrydelse." + +msgid "Aborted transfer would be successful." +msgstr "Afbrudt overførsel ville være lykkedes." + msgid "Inconsistent tar archive" msgstr "Inkonsistent tar-arkiv" diff --git a/mcsrc/po/de.po b/mcsrc/po/de.po index 79c8bbe7..785da3ec 100644 --- a/mcsrc/po/de.po +++ b/mcsrc/po/de.po @@ -6,7 +6,7 @@ # Atha Translate, 2016 # Benjamin M. Berwien , 2023 # cheese , 2016 -# Ettore Atalan , 2015-2023 +# Ettore Atalan , 2015-2024 # Fabian Affolter , 2012-2013 # Johannes Hellmuth , 2020 # Karsten , 2016 @@ -21,9 +21,9 @@ msgid "" msgstr "" "Project-Id-Version: Midnight Commander\n" "Report-Msgid-Bugs-To: https://www.midnight-commander.org/\n" -"POT-Creation-Date: 2023-08-06 15:50+0200\n" +"POT-Creation-Date: 2024-01-20 20:51+0100\n" "PO-Revision-Date: 2010-12-29 10:19+0000\n" -"Last-Translator: Benjamin M. Berwien , 2023\n" +"Last-Translator: Ettore Atalan , 2015-2024\n" "Language-Team: German (http://app.transifex.com/mc/mc/language/de/)\n" "Language: de\n" "MIME-Version: 1.0\n" @@ -547,7 +547,7 @@ msgstr "" "%s" msgid "Cannot close pipe descriptor (p == NULL)" -msgstr "Kann Pipe Deskriptor nicht schliessen (p == NULL)" +msgstr "Kann Pipe-Deskriptor nicht schließen (p == NULL)" #, c-format msgid "" @@ -754,31 +754,13 @@ msgid "" " errdhotfocus\n" " Menus: menunormal, menuhot, menusel, menuhotsel, menuinactive\n" " Popup menus: pmenunormal, pmenusel, pmenutitle\n" -" Editor: editnormal, editbold, editmarked, editwhitespace,\n" +" Editor: editnormal, editbold, editmarked, editwhitespace, " +"editnonprintable,\n" " editlinestate, editbg, editframe, editframeactive\n" " editframedrag\n" " Viewer: viewnormal,viewbold, viewunderline, viewselected\n" " Help: helpnormal, helpitalic, helpbold, helplink, helpslink\n" msgstr "" -"--colors KEYWORD={FORE},{BACK},{ATTR}:KEYWORD2=...\n" -"\n" -"{FORE}, {BACK} und {ATTR} kann weggelassen werden und der Standardwert wird " -"verwendet\n" -"\n" -" Schlüsselwörter:\n" -" Global: errors, disabled, reverse, gauge, header\n" -" input, inputmark, inputunchanged, commandlinemark\n" -" bbarhotkey, bbarbutton, statusbar\n" -" Datei-Anzeiger: normal, selected, marked, markselect\n" -" Dialogboxen: dnormal, dfocus, dhotnormal, dhotfocus, errdhotnormal,\n" -" errdhotfocus\n" -" Menü: menunormal, menuhot, menusel, menuhotsel, menuinactive\n" -" Pop-up-Menü: pmenunormal, pmenusel, pmenutitle\n" -" Editor: editnormal, editbold, editmarked, editwhitespace,\n" -" editlinestate, editbg, editframe, editframeactive\n" -" editframedrag\n" -" Betrachter: viewnormal, viewbold, viewunderline, viewselected\n" -" Hilfe: helpnormal, helpitalic, helpbold, helplink, helpslink\n" #. TRANSLATORS: don't translate color names and attributes msgid "" @@ -1231,7 +1213,7 @@ msgstr "Sortierung ausführen" msgid "Enter sort options (see sort(1) manpage) separated by whitespace:" msgstr "" -"Gib Sortierungs-Optionen ein (siehe sort(1) manpage), getrennt durch " +"Geben Sie Sortieroptionen ein (siehe sort(1) manpage), getrennt durch " "Leerzeichen:" msgid "Sort" @@ -1648,8 +1630,8 @@ msgstr "" "Ein benutzerfreundlicher Texteditor,\n" "geschrieben für Midnight Commander." -msgid "Copyright (C) 1996-2023 the Free Software Foundation" -msgstr "Copyright (C) 1996-2023 the Free Software Foundation" +msgid "Copyright (C) 1996-2024 the Free Software Foundation" +msgstr "Copyright (C) 1996-2024 the Free Software Foundation" msgid "About" msgstr "Über" @@ -2187,6 +2169,9 @@ msgid "" "%s\n" "%s" msgstr "" +"Kann Verzeichnis nicht wechseln zu\n" +"%s\n" +"%s" msgid "Secure deletion" msgstr "Sicheres Löschen" @@ -4186,76 +4171,36 @@ msgstr "" "Virtuelles Dateisystem EXTFS:\n" "%s" -#, c-format -msgid "Warning: cannot open %s directory\n" -msgstr "Warnung: Kann Verzeichnis \"%s\" nicht öffnen\n" - -#, c-format -msgid "fish: Disconnecting from %s" -msgstr "fish: Trenne von %s" - -msgid "fish: Waiting for initial line..." -msgstr "fish: Warte auf erste Zeile..." - -msgid "Sorry, we cannot do password authenticated connections for now." +msgid "" +"EXTFS virtual file system:\n" +"wrong file name" msgstr "" -"Entschuldigung, aber wir können momentan noch keine passwortgesicherten\n" -"Verbindungen benutzen." - -#, c-format -msgid "fish: Password is required for %s" -msgstr "fish: Passwort benötigt für %s" - -msgid "fish: Sending password..." -msgstr "fish: Sende Passwort..." - -msgid "fish: Sending initial line..." -msgstr "fish: Sende erste Zeile..." - -msgid "fish: Handshaking version..." -msgstr "fish: Tausche Versionsnummer aus..." - -msgid "fish: Getting host info..." -msgstr "fish: Hole Hostinformation..." - -#, c-format -msgid "fish: Reading directory %s..." -msgstr "fish: Lese Verzeichnis %s..." +"Virtuelles Dateisystem EXTFS:\n" +"falscher Dateiname" -#, c-format -msgid "%s: done." -msgstr "%s: fertig." +msgid "" +"EXTFS virtual file system:\n" +"wrong archive name" +msgstr "" +"Virtuelles Dateisystem EXTFS:\n" +"falscher Archivname" -#, c-format -msgid "%s: failure" -msgstr "%s: Fehler" +msgid "" +"EXTFS virtual file system:\n" +"cannot build command" +msgstr "" #, c-format -msgid "fish: store %s: sending command..." -msgstr "fish: Speichere %s: Sende Befehl..." - -msgid "fish: Local read failed, sending zeros" -msgstr "fish: Lokales Lesen fehlgeschlagen, sende Nullen" - -msgid "fish: storing file" -msgstr "fish: Datei speichern" - -msgid "Aborting transfer..." -msgstr "Breche Transfer ab..." - -msgid "Error reported after abort." -msgstr "Fehler nach Abbruch gemeldet." - -msgid "Aborted transfer would be successful." -msgstr "Abgebrochener Transfer wäre erfolgreich." +msgid "Warning: cannot open %s directory\n" +msgstr "Warnung: Kann Verzeichnis \"%s\" nicht öffnen\n" #, c-format msgid "ftpfs: Disconnecting from %s" -msgstr "ftpfs: Trenne von %s" +msgstr "ftpfs: Trennen der Verbindung von %s" #, c-format msgid "FTP: Password required for %s" -msgstr "FTP: Passwort benötigt für %s" +msgstr "FTP: Passwort ist erforderlich für %s" msgid "ftpfs: sending login name" msgstr "ftpfs: Sende Loginnamen" @@ -4304,7 +4249,7 @@ msgstr "Warte bis zum nächsten Versuch... %d (Strg+G zum Abbrechen)" #, c-format msgid "ftpfs: could not make address-to-name translation: %s" -msgstr "ftpfs: Adresse-zu-Name Übersetzung fehlgeschlagen: %s" +msgstr "ftpfs: Adresse-zu-Name-Übersetzung fehlgeschlagen: %s" #, c-format msgid "ftpfs: try reconnect to server, attempt %u" @@ -4312,7 +4257,7 @@ msgstr "ftpfs: versuche nochmals mit Server zu verbinden, Anlauf %u" #, c-format msgid "ftpfs: could not get socket name: %s" -msgstr "ftpfs: konnte Socket-Name nicht auslesen: %s" +msgstr "ftpfs: konnte Socket-Namen nicht auslesen: %s" msgid "ftpfs: could not reconnect to server" msgstr "ftpfs: Verbindung zum Server konnte nicht wiederhergestellt werden" @@ -4359,6 +4304,14 @@ msgstr "(zuerst chdir)" msgid "ftpfs: failed; nowhere to fallback to" msgstr "ftpfs: Fehlgeschlagen; alle Stricke gerissen" +#, c-format +msgid "%s: failure" +msgstr "%s: Fehler" + +#, c-format +msgid "%s: done." +msgstr "%s: fertig." + msgid "ftpfs: storing file" msgstr "ftpfs: Datei speichern" @@ -4412,7 +4365,9 @@ msgid "sftp: %s" msgstr "sftp: %s" msgid "sftp: failed to convert remote host IP address into text form" -msgstr "sftp: Fehler beim Konvertieren der Remote Host IP-Adresse in Textform" +msgstr "" +"sftp: Konvertierung der IP-Adresse des entfernten Hosts in Textform " +"fehlgeschlagen" #, c-format msgid "sftp: making connection to %s" @@ -4426,10 +4381,10 @@ msgid "sftp: connection to server failed: %s" msgstr "sftp: Verbindung zum Server fehlgeschlagen: %s" msgid "sftp: found host key of unsupported type: RSA1" -msgstr "sftp: Host-Key gefunden, aber nicht unterstützter Typ: RSA1" +msgstr "sftp: Hostschlüssel von nicht unterstütztem Typ gefunden: RSA1" msgid "sftp: unknown host key type:" -msgstr "sftp: unbekannter Host-Key Typ:" +msgstr "sftp: unbekannter Hostschlüsseltyp:" #, c-format msgid "" @@ -4442,14 +4397,15 @@ msgstr "" "zur Liste der bekannten Hosts." msgid "sftp: cannot get the remote host key" -msgstr "sftp: bekomme keinen Remote Host-Key " +msgstr "sftp: kann den Schlüssel des entfernten Hosts nicht erhalten" msgid "sftp: unsupported key type, can't check remote host key" msgstr "" -"sftp: nicht unterstützter Key-Typ, kann Remote Host-Key nicht überprüfen" +"sftp: nicht unterstützter Schlüsseltyp, kann den Schlüssel des entfernten " +"Hosts nicht überprüfen" msgid "sftp: can't compute host key fingerprint hash" -msgstr "sftp: kann Host-Key Fingerprint-Hash nicht berechnen" +msgstr "sftp: kann den Fingerprint-Hash des Hostschlüssels nicht berechnen" #, c-format msgid "" @@ -4463,9 +4419,10 @@ msgstr "" "Die Authentizität des Hosts\n" "%s (%s)\n" "kann nicht festgestellt werden!\n" -"%s Host-Key Fingerprint-Hash ist\n" +"%s Schlüssel-Fingerprint-Hash ist\n" "SHA1:%s.\n" -"Willst Du ihn zur Known-Hosts-Liste hinzufügen und weiter verbinden?" +"Möchten Sie ihn in die Liste der bekannten Hosts aufnehmen und die " +"Verbindung fortsetzen?" #, c-format msgid "" @@ -4515,6 +4472,54 @@ msgstr "sftp: Auflisten... %s (Strg+G zum Unterbrechen)" msgid "sftp: Listing done." msgstr "sftp: Auflisten beendet." +#, c-format +msgid "shell: Disconnecting from %s" +msgstr "shell: Trennen der Verbindung von %s" + +msgid "shell: Waiting for initial line..." +msgstr "" + +msgid "Sorry, we cannot do password authenticated connections for now." +msgstr "" +"Entschuldigung, aber wir können momentan noch keine passwortgesicherten\n" +"Verbindungen benutzen." + +#, c-format +msgid "shell: Password is required for %s" +msgstr "shell: Passwort ist erforderlich für %s" + +msgid "shell: Sending password..." +msgstr "Shell: Passwort wird gesendet..." + +msgid "shell: Sending initial line..." +msgstr "" + +msgid "shell: Getting host info..." +msgstr "" + +#, c-format +msgid "shell: Reading directory %s..." +msgstr "Shell: Verzeichnis %s wird gelesen..." + +#, c-format +msgid "shell: store %s: sending command..." +msgstr "" + +msgid "shell: Local read failed, sending zeros" +msgstr "" + +msgid "shell: storing file" +msgstr "shell: Datei speichern" + +msgid "Aborting transfer..." +msgstr "Breche Transfer ab..." + +msgid "Error reported after abort." +msgstr "Fehler nach Abbruch gemeldet." + +msgid "Aborted transfer would be successful." +msgstr "Abgebrochener Transfer wäre erfolgreich." + msgid "Inconsistent tar archive" msgstr "Inkonsistentes tar-Archiv" @@ -4534,9 +4539,11 @@ msgid "" "%s\n" "doesn't look like a tar archive" msgstr "" +"%s\n" +"sieht nicht wie ein tar-Archiv aus" msgid "tar: mc_lseek not stopped at a record boundary" -msgstr "" +msgstr "tar: mc_lseek hält nicht an einer Satzgrenze an" msgid "undelfs: error" msgstr "undelfs: Fehler" diff --git a/mcsrc/po/de_CH.po b/mcsrc/po/de_CH.po index 1316c273..526c0bdd 100644 --- a/mcsrc/po/de_CH.po +++ b/mcsrc/po/de_CH.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Midnight Commander\n" "Report-Msgid-Bugs-To: https://www.midnight-commander.org/\n" -"POT-Creation-Date: 2023-08-06 15:50+0200\n" +"POT-Creation-Date: 2024-01-20 20:51+0100\n" "PO-Revision-Date: 2015-02-26 09:48+0000\n" "Last-Translator: Piotr Drąg \n" "Language-Team: German (Switzerland) (http://www.transifex.com/projects/p/mc/" @@ -704,7 +704,8 @@ msgid "" " errdhotfocus\n" " Menus: menunormal, menuhot, menusel, menuhotsel, menuinactive\n" " Popup menus: pmenunormal, pmenusel, pmenutitle\n" -" Editor: editnormal, editbold, editmarked, editwhitespace,\n" +" Editor: editnormal, editbold, editmarked, editwhitespace, " +"editnonprintable,\n" " editlinestate, editbg, editframe, editframeactive\n" " editframedrag\n" " Viewer: viewnormal,viewbold, viewunderline, viewselected\n" @@ -1540,7 +1541,7 @@ msgid "" "written for the Midnight Commander." msgstr "" -msgid "Copyright (C) 1996-2023 the Free Software Foundation" +msgid "Copyright (C) 1996-2024 the Free Software Foundation" msgstr "" msgid "About" @@ -3901,65 +3902,23 @@ msgid "" "%s" msgstr "" -#, c-format -msgid "Warning: cannot open %s directory\n" -msgstr "" - -#, c-format -msgid "fish: Disconnecting from %s" -msgstr "" - -msgid "fish: Waiting for initial line..." -msgstr "" - -msgid "Sorry, we cannot do password authenticated connections for now." -msgstr "" - -#, c-format -msgid "fish: Password is required for %s" -msgstr "" - -msgid "fish: Sending password..." -msgstr "" - -msgid "fish: Sending initial line..." -msgstr "" - -msgid "fish: Handshaking version..." -msgstr "" - -msgid "fish: Getting host info..." -msgstr "" - -#, c-format -msgid "fish: Reading directory %s..." +msgid "" +"EXTFS virtual file system:\n" +"wrong file name" msgstr "" -#, c-format -msgid "%s: done." +msgid "" +"EXTFS virtual file system:\n" +"wrong archive name" msgstr "" -#, c-format -msgid "%s: failure" +msgid "" +"EXTFS virtual file system:\n" +"cannot build command" msgstr "" #, c-format -msgid "fish: store %s: sending command..." -msgstr "" - -msgid "fish: Local read failed, sending zeros" -msgstr "" - -msgid "fish: storing file" -msgstr "" - -msgid "Aborting transfer..." -msgstr "" - -msgid "Error reported after abort." -msgstr "" - -msgid "Aborted transfer would be successful." +msgid "Warning: cannot open %s directory\n" msgstr "" #, c-format @@ -4072,6 +4031,14 @@ msgstr "" msgid "ftpfs: failed; nowhere to fallback to" msgstr "" +#, c-format +msgid "%s: failure" +msgstr "" + +#, c-format +msgid "%s: done." +msgstr "" + msgid "ftpfs: storing file" msgstr "" @@ -4205,6 +4172,52 @@ msgstr "" msgid "sftp: Listing done." msgstr "" +#, c-format +msgid "shell: Disconnecting from %s" +msgstr "" + +msgid "shell: Waiting for initial line..." +msgstr "" + +msgid "Sorry, we cannot do password authenticated connections for now." +msgstr "" + +#, c-format +msgid "shell: Password is required for %s" +msgstr "" + +msgid "shell: Sending password..." +msgstr "" + +msgid "shell: Sending initial line..." +msgstr "" + +msgid "shell: Getting host info..." +msgstr "" + +#, c-format +msgid "shell: Reading directory %s..." +msgstr "" + +#, c-format +msgid "shell: store %s: sending command..." +msgstr "" + +msgid "shell: Local read failed, sending zeros" +msgstr "" + +msgid "shell: storing file" +msgstr "" + +msgid "Aborting transfer..." +msgstr "" + +msgid "Error reported after abort." +msgstr "" + +msgid "Aborted transfer would be successful." +msgstr "" + msgid "Inconsistent tar archive" msgstr "" diff --git a/mcsrc/po/el.po b/mcsrc/po/el.po index 39194d24..3016e107 100644 --- a/mcsrc/po/el.po +++ b/mcsrc/po/el.po @@ -12,7 +12,7 @@ msgid "" msgstr "" "Project-Id-Version: Midnight Commander\n" "Report-Msgid-Bugs-To: https://www.midnight-commander.org/\n" -"POT-Creation-Date: 2023-08-06 15:50+0200\n" +"POT-Creation-Date: 2024-01-20 20:51+0100\n" "PO-Revision-Date: 2010-12-29 10:19+0000\n" "Last-Translator: Efstathios Iosifidis , 2015\n" "Language-Team: Greek (http://app.transifex.com/mc/mc/language/el/)\n" @@ -717,7 +717,8 @@ msgid "" " errdhotfocus\n" " Menus: menunormal, menuhot, menusel, menuhotsel, menuinactive\n" " Popup menus: pmenunormal, pmenusel, pmenutitle\n" -" Editor: editnormal, editbold, editmarked, editwhitespace,\n" +" Editor: editnormal, editbold, editmarked, editwhitespace, " +"editnonprintable,\n" " editlinestate, editbg, editframe, editframeactive\n" " editframedrag\n" " Viewer: viewnormal,viewbold, viewunderline, viewselected\n" @@ -1564,7 +1565,7 @@ msgid "" "written for the Midnight Commander." msgstr "" -msgid "Copyright (C) 1996-2023 the Free Software Foundation" +msgid "Copyright (C) 1996-2024 the Free Software Foundation" msgstr "" msgid "About" @@ -4006,67 +4007,24 @@ msgid "" "%s" msgstr "" -#, c-format -msgid "Warning: cannot open %s directory\n" -msgstr "Προειδοποίηση: δεν ήταν δυνατό το άνοιγμα του καταλόγου %s\n" - -#, c-format -msgid "fish: Disconnecting from %s" -msgstr "fish: Γίνεται αποσύνδεση από %s" - -msgid "fish: Waiting for initial line..." -msgstr "" - -msgid "Sorry, we cannot do password authenticated connections for now." +msgid "" +"EXTFS virtual file system:\n" +"wrong file name" msgstr "" -"Λυπούμαστε, αλλά προς το παρόν συνδέσεις με χρήση κωδικού δεν υποστηρίζονται." - -#, c-format -msgid "fish: Password is required for %s" -msgstr "fish: Απαιτείται κωδικός πρόσβασης για %s" -msgid "fish: Sending password..." -msgstr "fish: Αποστολή κωδικού πρόσβασης..." - -msgid "fish: Sending initial line..." +msgid "" +"EXTFS virtual file system:\n" +"wrong archive name" msgstr "" -msgid "fish: Handshaking version..." +msgid "" +"EXTFS virtual file system:\n" +"cannot build command" msgstr "" -msgid "fish: Getting host info..." -msgstr "fish: Γίνεται λήψη πληροφοριών υπολογιστή..." - -#, c-format -msgid "fish: Reading directory %s..." -msgstr "fish: Ανάγνωση φακέλου %s..." - #, c-format -msgid "%s: done." -msgstr "%s: εντάξει." - -#, c-format -msgid "%s: failure" -msgstr "%s: απέτυχε" - -#, c-format -msgid "fish: store %s: sending command..." -msgstr "fish: αποθήκευση %s: αποστολή εντολής..." - -msgid "fish: Local read failed, sending zeros" -msgstr "fish: Η τοπική ανάγνωση απέτυψε, αποστέλνονται μηδενικά" - -msgid "fish: storing file" -msgstr "fish: το αρχείο αποθηκεύεται" - -msgid "Aborting transfer..." -msgstr "Ακύρωση μεταφοράς..." - -msgid "Error reported after abort." -msgstr "Αναφέρθηκε σφάλμα μετά την ακύρωση." - -msgid "Aborted transfer would be successful." -msgstr "" +msgid "Warning: cannot open %s directory\n" +msgstr "Προειδοποίηση: δεν ήταν δυνατό το άνοιγμα του καταλόγου %s\n" #, c-format msgid "ftpfs: Disconnecting from %s" @@ -4178,6 +4136,14 @@ msgstr "" msgid "ftpfs: failed; nowhere to fallback to" msgstr "" +#, c-format +msgid "%s: failure" +msgstr "%s: απέτυχε" + +#, c-format +msgid "%s: done." +msgstr "%s: εντάξει." + msgid "ftpfs: storing file" msgstr "ftpfs: αποθήκευση αρχείου" @@ -4315,6 +4281,53 @@ msgstr "" msgid "sftp: Listing done." msgstr "" +#, c-format +msgid "shell: Disconnecting from %s" +msgstr "" + +msgid "shell: Waiting for initial line..." +msgstr "" + +msgid "Sorry, we cannot do password authenticated connections for now." +msgstr "" +"Λυπούμαστε, αλλά προς το παρόν συνδέσεις με χρήση κωδικού δεν υποστηρίζονται." + +#, c-format +msgid "shell: Password is required for %s" +msgstr "" + +msgid "shell: Sending password..." +msgstr "" + +msgid "shell: Sending initial line..." +msgstr "" + +msgid "shell: Getting host info..." +msgstr "" + +#, c-format +msgid "shell: Reading directory %s..." +msgstr "" + +#, c-format +msgid "shell: store %s: sending command..." +msgstr "" + +msgid "shell: Local read failed, sending zeros" +msgstr "" + +msgid "shell: storing file" +msgstr "" + +msgid "Aborting transfer..." +msgstr "Ακύρωση μεταφοράς..." + +msgid "Error reported after abort." +msgstr "Αναφέρθηκε σφάλμα μετά την ακύρωση." + +msgid "Aborted transfer would be successful." +msgstr "" + msgid "Inconsistent tar archive" msgstr "Χαλασμένη αρχειοθήκη tar" diff --git a/mcsrc/po/en_GB.po b/mcsrc/po/en_GB.po index f0b42a39..774c5fd0 100644 --- a/mcsrc/po/en_GB.po +++ b/mcsrc/po/en_GB.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Midnight Commander\n" "Report-Msgid-Bugs-To: https://www.midnight-commander.org/\n" -"POT-Creation-Date: 2023-08-06 15:50+0200\n" +"POT-Creation-Date: 2024-01-20 20:51+0100\n" "PO-Revision-Date: 2010-12-29 10:19+0000\n" "Last-Translator: Andi Chandler , 2016-2017,2020,2022-2023\n" "Language-Team: English (United Kingdom) (http://app.transifex.com/mc/mc/" @@ -734,30 +734,13 @@ msgid "" " errdhotfocus\n" " Menus: menunormal, menuhot, menusel, menuhotsel, menuinactive\n" " Popup menus: pmenunormal, pmenusel, pmenutitle\n" -" Editor: editnormal, editbold, editmarked, editwhitespace,\n" +" Editor: editnormal, editbold, editmarked, editwhitespace, " +"editnonprintable,\n" " editlinestate, editbg, editframe, editframeactive\n" " editframedrag\n" " Viewer: viewnormal,viewbold, viewunderline, viewselected\n" " Help: helpnormal, helpitalic, helpbold, helplink, helpslink\n" msgstr "" -"--colors KEYWORD={FORE},{BACK},{ATTR}:KEYWORD2=...\n" -"\n" -"{FORE}, {BACK} and {ATTR} can be omitted, and the default will be used\n" -"\n" -" Keywords:\n" -" Global: errors, disabled, reverse, gauge, header\n" -" input, inputmark, inputunchanged, commandlinemark\n" -" bbarhotkey, bbarbutton, statusbar\n" -" File display: normal, selected, marked, markselect\n" -" Dialogue boxes: dnormal, dfocus, dhotnormal, dhotfocus, errdhotnormal,\n" -" errdhotfocus\n" -" Menus: menunormal, menuhot, menusel, menuhotsel, menuinactive\n" -" Popup menus: pmenunormal, pmenusel, pmenutitle\n" -" Editor: editnormal, editbold, editmarked, editwhitespace,\n" -" editlinestate, editbg, editframe, editframeactive\n" -" editframedrag\n" -" Viewer: viewnormal,viewbold, viewunderline, viewselected\n" -" Help: helpnormal, helpitalic, helpbold, helplink, helpslink\n" #. TRANSLATORS: don't translate color names and attributes msgid "" @@ -1342,205 +1325,205 @@ msgid "Unmar&k" msgstr "Unmar&k" msgid "Cop&y" -msgstr "" +msgstr "Cop&y" msgid "Mo&ve" -msgstr "" +msgstr "Mo&ve" msgid "&Delete" -msgstr "" +msgstr "&Delete" msgid "Co&py to clipfile" -msgstr "" +msgstr "Co&py to clipfile" msgid "&Cut to clipfile" -msgstr "" +msgstr "&Cut to clipfile" msgid "Pa&ste from clipfile" -msgstr "" +msgstr "Pa&ste from clipfile" msgid "&Beginning" -msgstr "" +msgstr "&Beginning" msgid "&End" -msgstr "" +msgstr "&End" msgid "&Search..." -msgstr "" +msgstr "&Search..." msgid "Search &again" -msgstr "" +msgstr "Search &again" msgid "&Replace..." -msgstr "" +msgstr "&Replace..." msgid "&Toggle bookmark" -msgstr "" +msgstr "&Toggle bookmark" msgid "&Next bookmark" -msgstr "" +msgstr "&Next bookmark" msgid "&Prev bookmark" -msgstr "" +msgstr "&Prev bookmark" msgid "&Flush bookmarks" -msgstr "" +msgstr "&Flush bookmarks" msgid "&Go to line..." -msgstr "" +msgstr "&Go to line..." msgid "&Toggle line state" -msgstr "" +msgstr "&Toggle line state" msgid "Go to matching &bracket" -msgstr "" +msgstr "Go to matching &bracket" msgid "Toggle s&yntax highlighting" -msgstr "" +msgstr "Toggle s&yntax highlighting" msgid "&Find declaration" -msgstr "" +msgstr "&Find declaration" msgid "Back from &declaration" -msgstr "" +msgstr "Back from &declaration" msgid "For&ward to declaration" -msgstr "" +msgstr "For&ward to declaration" msgid "Encod&ing..." -msgstr "" +msgstr "Encod&ing..." msgid "&Refresh screen" -msgstr "" +msgstr "&Refresh screen" msgid "&Start/Stop record macro" -msgstr "" +msgstr "&Start/Stop record macro" msgid "Delete macr&o..." -msgstr "" +msgstr "Delete macr&o..." msgid "Record/Repeat &actions" -msgstr "" +msgstr "Record/Repeat &actions" msgid "S&pell check" -msgstr "" +msgstr "S&pell check" msgid "C&heck word" -msgstr "" +msgstr "C&heck word" msgid "Change spelling &language..." -msgstr "" +msgstr "Change spelling &language..." msgid "&Mail..." -msgstr "" +msgstr "&Mail..." msgid "Insert &literal..." -msgstr "" +msgstr "Insert &literal..." msgid "Insert &date/time" -msgstr "" +msgstr "Insert &date/time" msgid "&Format paragraph" -msgstr "" +msgstr "&Format paragraph" msgid "&Sort..." -msgstr "" +msgstr "&Sort..." msgid "&Paste output of..." -msgstr "" +msgstr "&Paste output of..." msgid "&External formatter" -msgstr "" +msgstr "&External formatter" msgid "&Move" -msgstr "" +msgstr "&Move" msgid "&Resize" -msgstr "" +msgstr "&Resize" msgid "&Toggle fullscreen" -msgstr "" +msgstr "&Toggle fullscreen" msgid "&Next" -msgstr "" +msgstr "&Next" msgid "&Previous" -msgstr "" +msgstr "&Previous" msgid "&List..." -msgstr "" +msgstr "&List..." msgid "&General..." -msgstr "" +msgstr "&General..." msgid "Save &mode..." -msgstr "" +msgstr "Save &mode..." msgid "Learn &keys..." -msgstr "" +msgstr "Learn &keys..." msgid "Syntax &highlighting..." -msgstr "" +msgstr "Syntax &highlighting..." msgid "S&yntax file" -msgstr "" +msgstr "S&yntax file" msgid "&Menu file" -msgstr "" +msgstr "&Menu file" msgid "&Save setup" -msgstr "" +msgstr "&Save setup" msgid "&File" -msgstr "" +msgstr "&File" msgid "&Edit" -msgstr "" +msgstr "&Edit" msgid "&Search" -msgstr "" +msgstr "&Search" msgid "&Command" -msgstr "" +msgstr "&Command" msgid "For&mat" -msgstr "" +msgstr "For&mat" msgid "&Window" -msgstr "" +msgstr "&Window" msgid "&Options" -msgstr "" +msgstr "&Options" msgid "&None" -msgstr "" +msgstr "&None" msgid "&Dynamic paragraphing" -msgstr "" +msgstr "&Dynamic paragraphing" msgid "Type &writer wrap" -msgstr "" +msgstr "Type &writer wrap" msgid "Wrap mode" -msgstr "" +msgstr "Wrap mode" msgid "Tabulation" -msgstr "" +msgstr "Tabulation" msgid "&Fake half tabs" -msgstr "" +msgstr "&Fake half tabs" msgid "&Backspace through tabs" -msgstr "" +msgstr "&Backspace through tabs" msgid "Fill tabs with &spaces" -msgstr "" +msgstr "Fill tabs with &spaces" msgid "Tab spacing:" -msgstr "" +msgstr "Tab spacing:" msgid "Other options" -msgstr "" +msgstr "Other options" msgid "&Return does autoindent" msgstr "" @@ -1622,7 +1605,7 @@ msgid "" "written for the Midnight Commander." msgstr "" -msgid "Copyright (C) 1996-2023 the Free Software Foundation" +msgid "Copyright (C) 1996-2024 the Free Software Foundation" msgstr "" msgid "About" @@ -3983,65 +3966,23 @@ msgid "" "%s" msgstr "" -#, c-format -msgid "Warning: cannot open %s directory\n" -msgstr "" - -#, c-format -msgid "fish: Disconnecting from %s" -msgstr "" - -msgid "fish: Waiting for initial line..." -msgstr "" - -msgid "Sorry, we cannot do password authenticated connections for now." -msgstr "" - -#, c-format -msgid "fish: Password is required for %s" -msgstr "" - -msgid "fish: Sending password..." -msgstr "" - -msgid "fish: Sending initial line..." -msgstr "" - -msgid "fish: Handshaking version..." -msgstr "" - -msgid "fish: Getting host info..." -msgstr "" - -#, c-format -msgid "fish: Reading directory %s..." +msgid "" +"EXTFS virtual file system:\n" +"wrong file name" msgstr "" -#, c-format -msgid "%s: done." +msgid "" +"EXTFS virtual file system:\n" +"wrong archive name" msgstr "" -#, c-format -msgid "%s: failure" +msgid "" +"EXTFS virtual file system:\n" +"cannot build command" msgstr "" #, c-format -msgid "fish: store %s: sending command..." -msgstr "" - -msgid "fish: Local read failed, sending zeros" -msgstr "" - -msgid "fish: storing file" -msgstr "" - -msgid "Aborting transfer..." -msgstr "" - -msgid "Error reported after abort." -msgstr "" - -msgid "Aborted transfer would be successful." +msgid "Warning: cannot open %s directory\n" msgstr "" #, c-format @@ -4154,6 +4095,14 @@ msgstr "" msgid "ftpfs: failed; nowhere to fallback to" msgstr "" +#, c-format +msgid "%s: failure" +msgstr "" + +#, c-format +msgid "%s: done." +msgstr "" + msgid "ftpfs: storing file" msgstr "" @@ -4287,6 +4236,52 @@ msgstr "" msgid "sftp: Listing done." msgstr "" +#, c-format +msgid "shell: Disconnecting from %s" +msgstr "" + +msgid "shell: Waiting for initial line..." +msgstr "" + +msgid "Sorry, we cannot do password authenticated connections for now." +msgstr "" + +#, c-format +msgid "shell: Password is required for %s" +msgstr "" + +msgid "shell: Sending password..." +msgstr "" + +msgid "shell: Sending initial line..." +msgstr "" + +msgid "shell: Getting host info..." +msgstr "" + +#, c-format +msgid "shell: Reading directory %s..." +msgstr "" + +#, c-format +msgid "shell: store %s: sending command..." +msgstr "" + +msgid "shell: Local read failed, sending zeros" +msgstr "" + +msgid "shell: storing file" +msgstr "" + +msgid "Aborting transfer..." +msgstr "" + +msgid "Error reported after abort." +msgstr "" + +msgid "Aborted transfer would be successful." +msgstr "" + msgid "Inconsistent tar archive" msgstr "" diff --git a/mcsrc/po/eo.po b/mcsrc/po/eo.po index a7a98d5f..9ce1bdd1 100644 --- a/mcsrc/po/eo.po +++ b/mcsrc/po/eo.po @@ -9,7 +9,7 @@ msgid "" msgstr "" "Project-Id-Version: Midnight Commander\n" "Report-Msgid-Bugs-To: https://www.midnight-commander.org/\n" -"POT-Creation-Date: 2023-08-06 15:50+0200\n" +"POT-Creation-Date: 2024-01-20 20:51+0100\n" "PO-Revision-Date: 2010-12-29 10:19+0000\n" "Last-Translator: Yury V. Zaytsev , 2022\n" "Language-Team: Esperanto (http://app.transifex.com/mc/mc/language/eo/)\n" @@ -735,32 +735,13 @@ msgid "" " errdhotfocus\n" " Menus: menunormal, menuhot, menusel, menuhotsel, menuinactive\n" " Popup menus: pmenunormal, pmenusel, pmenutitle\n" -" Editor: editnormal, editbold, editmarked, editwhitespace,\n" +" Editor: editnormal, editbold, editmarked, editwhitespace, " +"editnonprintable,\n" " editlinestate, editbg, editframe, editframeactive\n" " editframedrag\n" " Viewer: viewnormal,viewbold, viewunderline, viewselected\n" " Help: helpnormal, helpitalic, helpbold, helplink, helpslink\n" msgstr "" -"--colors Ŝlosilvorto={teksto},{fono},{atributo}:Ŝlosilvorto2=...\n" -"Se {teksto}, {fono} aŭ {atributo} estas ellasitaj, la aprioraj estas uzotaj\n" -"\n" -" Ŝlosilvortoj:\n" -" Tutprograma: errors, disabled, reverse, gauge, header\n" -" input, inputmark, inputunchanged, commandlinemark\n" -" bbarhotkey, bbarhotbutton, statusbar\n" -" Dosieradministrado: normal, selected, marked, markselect\n" -" Dialogujo: dnormal, dfocus, dhotnormal, dhotfocus, " -"errdhotnormal,\n" -" errdhotfocus\n" -" Menuoj: menunormal, menuhot, menusel, menuhotsel, " -"menuinactive\n" -" Ŝprucmenuoj: pmenunormal, pmenusel, pmenutitle\n" -" Tekstoredaktilo: editnormal, editbold, editmarked, editwhitespace\n" -" editlinestate, editbg, editframe, editframeactive\n" -" editframedrag\n" -" Tekstolegilo: viewnormal, viewbold, viewunderline, viewselected\n" -" Helpilo: helpnormal, helpitalic, helpbold, helplink, " -"helpslink\n" #. TRANSLATORS: don't translate color names and attributes msgid "" @@ -1629,8 +1610,8 @@ msgstr "" "Afabla tekstoredaktilo\n" "verkita por Midnight Commander." -msgid "Copyright (C) 1996-2023 the Free Software Foundation" -msgstr "Kopirajto (C) 1996–2023 la Fondaĵo pri Libera Programaro" +msgid "Copyright (C) 1996-2024 the Free Software Foundation" +msgstr "" msgid "About" msgstr "Pri" @@ -2169,6 +2150,9 @@ msgid "" "%s\n" "%s" msgstr "" +"Ne eblas ŝanĝi dosierujon al\n" +"%s\n" +"%s" msgid "Secure deletion" msgstr "Sekura forigo" @@ -4164,66 +4148,30 @@ msgstr "" "Virtuala dosiersistemo EXTFS:\n" "%s" -#, c-format -msgid "Warning: cannot open %s directory\n" -msgstr "Averto: ne eblas malfermi dosierujon %s\n" - -#, c-format -msgid "fish: Disconnecting from %s" -msgstr "fish: Malkonektiĝanta de %s" - -msgid "fish: Waiting for initial line..." -msgstr "fish: Atendanta komencan linion..." - -msgid "Sorry, we cannot do password authenticated connections for now." -msgstr "Bedaŭrinde ni ne povas nun fari pasvortajn atestadajn konektojn." - -#, c-format -msgid "fish: Password is required for %s" -msgstr "fish: Pasvorto estas postulita por %s" - -msgid "fish: Sending password..." -msgstr "fish: Sendanta pasvorton..." - -msgid "fish: Sending initial line..." -msgstr "fish: Sendanta komencan linion..." - -msgid "fish: Handshaking version..." -msgstr "fish: Konsentanta eldonon..." - -msgid "fish: Getting host info..." -msgstr "fish: Akiranta gastiganto-informojn..." - -#, c-format -msgid "fish: Reading directory %s..." -msgstr "fish: Leganta dosierujon %s..." +msgid "" +"EXTFS virtual file system:\n" +"wrong file name" +msgstr "" +"Virtuala dosiersistemo EXTFS:\n" +"malĝusta dosiernomo" -#, c-format -msgid "%s: done." -msgstr "%s: finita." +msgid "" +"EXTFS virtual file system:\n" +"wrong archive name" +msgstr "" +"Virtuala dosiersistemo EXTFS:\n" +"malĝusta arkivnomo" -#, c-format -msgid "%s: failure" -msgstr "%s: malsukceso" +msgid "" +"EXTFS virtual file system:\n" +"cannot build command" +msgstr "" +"Virtuala dosiersistemo EXTFS:\n" +"ne eblas konstrui komandon" #, c-format -msgid "fish: store %s: sending command..." -msgstr "fish: teno %s: sendanta komandon..." - -msgid "fish: Local read failed, sending zeros" -msgstr "fish: Loka legado malsukcesis, sendanta nulojn" - -msgid "fish: storing file" -msgstr "fish: konservanta dosieron" - -msgid "Aborting transfer..." -msgstr "Ĉesiganta transigon..." - -msgid "Error reported after abort." -msgstr "Eraro raportita post ĉesigo." - -msgid "Aborted transfer would be successful." -msgstr "Ĉesigita transigo estus sukcesa." +msgid "Warning: cannot open %s directory\n" +msgstr "Averto: ne eblas malfermi dosierujon %s\n" #, c-format msgid "ftpfs: Disconnecting from %s" @@ -4335,6 +4283,14 @@ msgstr "(ŝanĝi dosierujon unue)" msgid "ftpfs: failed; nowhere to fallback to" msgstr "ftpfs: malsukcesis; neniuj pluaj litoj" +#, c-format +msgid "%s: failure" +msgstr "%s: malsukceso" + +#, c-format +msgid "%s: done." +msgstr "%s: finita." + msgid "ftpfs: storing file" msgstr "ftpfs: konservanta dosieron" @@ -4490,6 +4446,52 @@ msgstr "sftp: (Stir-G rompi) Listo... %s" msgid "sftp: Listing done." msgstr "sftp: Listado finita." +#, c-format +msgid "shell: Disconnecting from %s" +msgstr "ŝelo: Malkonektiĝanta de %s" + +msgid "shell: Waiting for initial line..." +msgstr "ŝelo: Atendanta komencan linion..." + +msgid "Sorry, we cannot do password authenticated connections for now." +msgstr "Bedaŭrinde ni ne povas nun fari pasvortajn atestadajn konektojn." + +#, c-format +msgid "shell: Password is required for %s" +msgstr "ŝelo: Pasvorto estas postulita por %s" + +msgid "shell: Sending password..." +msgstr "ŝelo: Sendanta pasvorton..." + +msgid "shell: Sending initial line..." +msgstr "ŝelo: Sendanta komencan linion..." + +msgid "shell: Getting host info..." +msgstr "ŝelo: Akiranta gastiganto-informojn..." + +#, c-format +msgid "shell: Reading directory %s..." +msgstr "ŝelo: Leganta dosierujon %s..." + +#, c-format +msgid "shell: store %s: sending command..." +msgstr "ŝelo: teno %s: sendanta komandon..." + +msgid "shell: Local read failed, sending zeros" +msgstr "ŝelo: Loka legado malsukcesis, sendanta nulojn" + +msgid "shell: storing file" +msgstr "ŝelo: konservanta dosieron" + +msgid "Aborting transfer..." +msgstr "Ĉesiganta transigon..." + +msgid "Error reported after abort." +msgstr "Eraro raportita post ĉesigo." + +msgid "Aborted transfer would be successful." +msgstr "Ĉesigita transigo estus sukcesa." + msgid "Inconsistent tar archive" msgstr "Malkonsekvenca tar-dosiero" @@ -4509,9 +4511,11 @@ msgid "" "%s\n" "doesn't look like a tar archive" msgstr "" +"%s\n" +"ne ŝajnas esti TAR-arkivo" msgid "tar: mc_lseek not stopped at a record boundary" -msgstr "" +msgstr "tar: mc_lsek ne ĉesigita je rikorda limo" msgid "undelfs: error" msgstr "undelfs: eraro" diff --git a/mcsrc/po/es.po b/mcsrc/po/es.po index 376d8994..99adba14 100644 --- a/mcsrc/po/es.po +++ b/mcsrc/po/es.po @@ -13,7 +13,7 @@ msgid "" msgstr "" "Project-Id-Version: Midnight Commander\n" "Report-Msgid-Bugs-To: https://www.midnight-commander.org/\n" -"POT-Creation-Date: 2023-08-06 15:50+0200\n" +"POT-Creation-Date: 2024-01-20 20:51+0100\n" "PO-Revision-Date: 2010-12-29 10:19+0000\n" "Last-Translator: Slava Zanko , 2011\n" "Language-Team: Spanish (http://app.transifex.com/mc/mc/language/es/)\n" @@ -740,7 +740,8 @@ msgid "" " errdhotfocus\n" " Menus: menunormal, menuhot, menusel, menuhotsel, menuinactive\n" " Popup menus: pmenunormal, pmenusel, pmenutitle\n" -" Editor: editnormal, editbold, editmarked, editwhitespace,\n" +" Editor: editnormal, editbold, editmarked, editwhitespace, " +"editnonprintable,\n" " editlinestate, editbg, editframe, editframeactive\n" " editframedrag\n" " Viewer: viewnormal,viewbold, viewunderline, viewselected\n" @@ -762,8 +763,9 @@ msgstr "" " Menús: menunormal, menuhot, menusel, menuhotsel, " "menuinactive\n" " Menús emergentes: pmenunormal, pmenusel, pmenutitle\n" -" Editor: editnormal, editbold, editmarked, editwhitespace,\n" -" editlinestate, editbg, editframe, editframeactive\n" +" Editor: editnormal, editbold, editmarked, editwhitespace, " +"editnonprintable,\n" +" editlinestate, editbg, editframe, editframeactive,\n" " editframedrag\n" " Visor: viewnormal, viewbold, viewunderline, viewselected\n" " Ayuda: helpnormal, helpitalic, helpbold, helplink, helpslink\n" @@ -1635,8 +1637,8 @@ msgstr "" "Un editor de texto amigable\n" "para Midnight Commander." -msgid "Copyright (C) 1996-2023 the Free Software Foundation" -msgstr "Copyright (C) 1996-2023 the Free Software Foundation" +msgid "Copyright (C) 1996-2024 the Free Software Foundation" +msgstr "Copyright (C) 1996-2024 the Free Software Foundation" msgid "About" msgstr "Acerca de..." @@ -3178,7 +3180,7 @@ msgid "E&xternal panelize" msgstr "búsqueda e&Xterna..." msgid "Show directory s&izes" -msgstr "mostrar &Tamaños de los directorios" +msgstr "mostrar &Tamaños de directorios" msgid "Command &history" msgstr "&Historia de órdenes" @@ -3241,7 +3243,7 @@ msgstr "Paneles:" msgid "You have %zu opened screen. Quit anyway?" msgid_plural "You have %zu opened screens. Quit anyway?" msgstr[0] "Hay %zu pantalla abierta. ¿Desea realmente salir?" -msgstr[1] "Hay %zu pantallas abiertas. ¿Desea realmente salir?" +msgstr[1] "Hay %zu de pantallas abiertas. ¿Desea realmente salir?" msgstr[2] "Hay %zu pantallas abiertas. ¿Desea realmente salir?" msgid "The Midnight Commander" @@ -3343,7 +3345,7 @@ msgstr "Terminado" msgid "Finished (ignored %zu directory)" msgid_plural "Finished (ignored %zu directories)" msgstr[0] "Terminado (%zu directorio ignorado)" -msgstr[1] "Terminado (%zu directorios ignorados)" +msgstr[1] "Terminado (%zu de directorios ignorados)" msgstr[2] "Terminado (%zu directorios ignorados)" #, c-format @@ -3515,7 +3517,7 @@ msgstr "Tamaño: %s" msgid " (%lu block)" msgid_plural " (%lu blocks)" msgstr[0] " (%lu bloque)" -msgstr[1] " (%lu bloques)" +msgstr[1] " (%lu de bloques)" msgstr[2] " (%lu bloques)" #, c-format @@ -3695,7 +3697,7 @@ msgstr "" msgid "%s in %d file" msgid_plural "%s in %d files" msgstr[0] "%s en %d archivo" -msgstr[1] "%s en %d archivos" +msgstr[1] "%s en %d de archivos" msgstr[2] "%s en %d archivos" msgid "Panelize" @@ -4178,66 +4180,30 @@ msgstr "" "Sistema de archivos virtual EXTFS:\n" "%s" -#, c-format -msgid "Warning: cannot open %s directory\n" -msgstr "Atención: imposible abrir el directorio %s\n" - -#, c-format -msgid "fish: Disconnecting from %s" -msgstr "fish: Desconectando de %s" - -msgid "fish: Waiting for initial line..." -msgstr "fish: Esperando línea de inicio..." - -msgid "Sorry, we cannot do password authenticated connections for now." -msgstr "Lo siento, las conexiones con contraseña aún no son posibles." - -#, c-format -msgid "fish: Password is required for %s" -msgstr "fish: Contraseña requerida para %s" - -msgid "fish: Sending password..." -msgstr "fish: Enviando contraseña de usuario" - -msgid "fish: Sending initial line..." -msgstr "fish: Enviando línea de inicio..." - -msgid "fish: Handshaking version..." -msgstr "fish: Negociando versión..." - -msgid "fish: Getting host info..." -msgstr "fish: Obteniendo información del servidor..." - -#, c-format -msgid "fish: Reading directory %s..." -msgstr "fish: Leyendo el directorio %s..." +msgid "" +"EXTFS virtual file system:\n" +"wrong file name" +msgstr "" +"Sistema de archivos virtual EXTFS:\n" +"nombre de archivo incorrecto" -#, c-format -msgid "%s: done." -msgstr "%s: Hecho." +msgid "" +"EXTFS virtual file system:\n" +"wrong archive name" +msgstr "" +"Sistema de archivos virtual EXTFS:\n" +"nombre de archivador incorrecto" -#, c-format -msgid "%s: failure" -msgstr "%s: Fallo." +msgid "" +"EXTFS virtual file system:\n" +"cannot build command" +msgstr "" +"Sistema de archivos virtual EXTFS:\n" +"imposible construir comando" #, c-format -msgid "fish: store %s: sending command..." -msgstr "fish: Guardar %s: enviando comando..." - -msgid "fish: Local read failed, sending zeros" -msgstr "fish: Fallo de lectura local, enviando ceros" - -msgid "fish: storing file" -msgstr "fish: Guardando archivo" - -msgid "Aborting transfer..." -msgstr "Abortando transferencia." - -msgid "Error reported after abort." -msgstr "Error denunciado tras abortar." - -msgid "Aborted transfer would be successful." -msgstr "Abortada transferencia con éxito." +msgid "Warning: cannot open %s directory\n" +msgstr "Atención: imposible abrir el directorio %s\n" #, c-format msgid "ftpfs: Disconnecting from %s" @@ -4349,6 +4315,14 @@ msgstr "(chdir)" msgid "ftpfs: failed; nowhere to fallback to" msgstr "ftpfs: Falló; no hay dónde replegarse" +#, c-format +msgid "%s: failure" +msgstr "%s: Fallo." + +#, c-format +msgid "%s: done." +msgstr "%s: Hecho." + msgid "ftpfs: storing file" msgstr "ftpfs: Guardando archivo" @@ -4503,6 +4477,52 @@ msgstr "sftp: (Ctrl-G para cancelar) Listando... %s" msgid "sftp: Listing done." msgstr "sftp: Listado completo." +#, c-format +msgid "shell: Disconnecting from %s" +msgstr "shell: Desconectando de %s" + +msgid "shell: Waiting for initial line..." +msgstr "shell: Esperando línea de inicio..." + +msgid "Sorry, we cannot do password authenticated connections for now." +msgstr "Lo siento, las conexiones con contraseña aún no son posibles." + +#, c-format +msgid "shell: Password is required for %s" +msgstr "shell: Contraseña requerida para %s" + +msgid "shell: Sending password..." +msgstr "shell: Enviando contraseña de usuario" + +msgid "shell: Sending initial line..." +msgstr "shell: Enviando línea de inicio..." + +msgid "shell: Getting host info..." +msgstr "shell: Obteniendo información del servidor..." + +#, c-format +msgid "shell: Reading directory %s..." +msgstr "shell: Leyendo el directorio %s..." + +#, c-format +msgid "shell: store %s: sending command..." +msgstr "shell: Guardar %s: enviando comando..." + +msgid "shell: Local read failed, sending zeros" +msgstr "shell: Fallo de lectura local, enviando ceros" + +msgid "shell: storing file" +msgstr "shell: Guardando archivo" + +msgid "Aborting transfer..." +msgstr "Abortando transferencia." + +msgid "Error reported after abort." +msgstr "Error denunciado tras abortar." + +msgid "Aborted transfer would be successful." +msgstr "Abortada transferencia con éxito." + msgid "Inconsistent tar archive" msgstr "Archivo de tipo tar inconsistente" diff --git a/mcsrc/po/et.po b/mcsrc/po/et.po index 237979d6..34ab061f 100644 --- a/mcsrc/po/et.po +++ b/mcsrc/po/et.po @@ -4,7 +4,7 @@ # # Translators: # Ivar Smolin , 2021 -# Kristjan Räts , 2013-2016,2018-2019 +# Kristjan Räts , 2013-2016,2018-2019,2024 # Priit Jõerüüt , 2020-2021,2023 # vaba , 2020 # vaba , 2020 @@ -12,9 +12,10 @@ msgid "" msgstr "" "Project-Id-Version: Midnight Commander\n" "Report-Msgid-Bugs-To: https://www.midnight-commander.org/\n" -"POT-Creation-Date: 2023-08-06 15:50+0200\n" +"POT-Creation-Date: 2024-01-20 20:51+0100\n" "PO-Revision-Date: 2010-12-29 10:19+0000\n" -"Last-Translator: vaba , 2020\n" +"Last-Translator: Kristjan Räts , " +"2013-2016,2018-2019,2024\n" "Language-Team: Estonian (http://app.transifex.com/mc/mc/language/et/)\n" "Language: et\n" "MIME-Version: 1.0\n" @@ -480,12 +481,18 @@ msgid "" "\n" "Cannot configure write end of SIGWINCH pipe: %s (%d)\n" msgstr "" +"\n" +"SIGWINCH saatmispoolt ei saa\n" +"konfigureerida: %s (%d)\n" #, c-format msgid "" "\n" "Cannot configure read end of SIGWINCH pipe: %s (%d)\n" msgstr "" +"\n" +"SIGWINCH lugemispoolt ei saa\n" +"konfigureerida: %s (%d)\n" #, c-format msgid "" @@ -531,7 +538,7 @@ msgstr "" "%s" msgid "Cannot close pipe descriptor (p == NULL)" -msgstr "" +msgstr "Toru deskriptor ei saa sulgeda (p == NULL)" #, c-format msgid "" @@ -735,7 +742,8 @@ msgid "" " errdhotfocus\n" " Menus: menunormal, menuhot, menusel, menuhotsel, menuinactive\n" " Popup menus: pmenunormal, pmenusel, pmenutitle\n" -" Editor: editnormal, editbold, editmarked, editwhitespace,\n" +" Editor: editnormal, editbold, editmarked, editwhitespace, " +"editnonprintable,\n" " editlinestate, editbg, editframe, editframeactive\n" " editframedrag\n" " Viewer: viewnormal,viewbold, viewunderline, viewselected\n" @@ -758,7 +766,7 @@ msgstr "" " Toimeti: editnormal, editbold, editmarked, editwhitespace,\n" " editlinestate, editbg, editframe, editframeactive\n" " editframedrag\n" -" Kuvaja: viewnormal,viewbold, viewunderline, viewselected\n" +" Kuvaja: viewnormal, viewbold, viewunderline, viewselected\n" " Abi: helpnormal, helpitalic, helpbold, helplink, helpslink\n" #. TRANSLATORS: don't translate color names and attributes @@ -1207,7 +1215,7 @@ msgid "You must first highlight a block of text" msgstr "Esmalt vali tekstiplokk" msgid "Run sort" -msgstr "Räivita sortimine" +msgstr "Käivita sortimine" msgid "Enter sort options (see sort(1) manpage) separated by whitespace:" msgstr "" @@ -1628,8 +1636,8 @@ msgstr "" "Kasutajasõbralik tekstitoimeti, mis\n" "on loodud Midnight Commanderile." -msgid "Copyright (C) 1996-2023 the Free Software Foundation" -msgstr "Autoriõigused (C) 1996-2023 the Free Software Foundation" +msgid "Copyright (C) 1996-2024 the Free Software Foundation" +msgstr "Autoriõigused (C) 1996-2024 the Free Software Foundation" msgid "About" msgstr "Programmist" @@ -2034,13 +2042,13 @@ msgstr "" "Lisainfot leiad manuaalist." msgid "&Full file list" -msgstr "&Täielik failide loend" +msgstr "&Täielik faililoend" msgid "&Brief file list:" -msgstr "&Lühike failide loend:" +msgstr "&Lühike faililoend:" msgid "&Long file list" -msgstr "&Pikk failide loend" +msgstr "&Pikk faililoend" msgid "&User defined:" msgstr "&Kasutaja määratud:" @@ -2166,6 +2174,9 @@ msgid "" "%s\n" "%s" msgstr "" +"Nurjus vahetus kataloogiks \n" +"%s \n" +"%s" msgid "Secure deletion" msgstr "Turvaline kustutamine" @@ -2186,7 +2197,7 @@ msgid "Append only" msgstr "Ainult lisa" msgid "No dump" -msgstr "" +msgstr "Tõmmis puudub" msgid "No update atime" msgstr "Jäta atime uuendamata" @@ -2213,7 +2224,7 @@ msgid "Indexed directory" msgstr "Indekseeritud kataloog" msgid "No tail merging" -msgstr "" +msgstr "Keela lõppude mestimine" msgid "Top of directory hierarchies" msgstr "Kataloogihierarhiate tipp" @@ -2222,16 +2233,16 @@ msgid "Inode uses extents" msgstr "Inode kasutab ulatusi" msgid "Huge_file" -msgstr "" +msgstr "suurfail" msgid "No COW" -msgstr "" +msgstr "COW puudub" msgid "Direct access for files" msgstr "Otsene juurdepääs failidele" msgid "Casefolded file" -msgstr "" +msgstr "Tõstutundetustatud fail" msgid "Inode has inline data" msgstr "I-kirjel on põimitud andmeid" @@ -2259,6 +2270,8 @@ msgid "" "Cannot chattr \"%s\"\n" "%s" msgstr "" +"\"%s\" attribuutide muutmine nurjus\n" +"%s" #, c-format msgid "" @@ -2431,8 +2444,8 @@ msgid "" "Both panels should be in the listing mode\n" "to use this command" msgstr "" -"Selle käsu kasutamiseks peaksid mõlemad\n" -"paneelid kuvama failide loendit" +"Selle käsu kasutamiseks peaksid\n" +"mõlemad paneelid kuvama faililoendit" #, c-format msgid "'%s' is not a symbolic link" @@ -3044,7 +3057,7 @@ msgid "Invalid source pattern '%s'" msgstr "Vigane lähtemuster \"%s\"" msgid "File listin&g" -msgstr "F&ailide loend" +msgstr "F&aililoend" msgid "&Quick view" msgstr "&Kiirvaade" @@ -3053,7 +3066,7 @@ msgid "&Info" msgstr "&Info" msgid "&Tree" -msgstr "&Puu" +msgstr "P&uu" msgid "&Listing format..." msgstr "&Loendi vormindus..." @@ -3077,7 +3090,7 @@ msgid "SFTP li&nk..." msgstr "SFTP li&nk..." msgid "Paneli&ze" -msgstr "Pa&neelile" +msgstr "&Paneelile" msgid "&Rescan" msgstr "Ko&rdusskannimine" @@ -3188,7 +3201,7 @@ msgid "&Undelete files (ext2fs only)" msgstr "F&ailide taastamine (ainult ext2fs)" msgid "&Listing format edit" -msgstr "&Loend vorminduse muutmine" +msgstr "Muuda &loendi vormindust" msgid "Edit &extension file" msgstr "Muuda &laiendite faili" @@ -3572,7 +3585,7 @@ msgid "sort|u" msgstr "sort|m" msgid "&Unsorted" -msgstr "Sorti&mata" +msgstr "S&ortimata" #. TRANSLATORS: one single character to represent 'name' sort mode #. TRANSLATORS: no need to translate 'sort', it's just a context prefix @@ -4160,66 +4173,30 @@ msgstr "" "EXTFS virtuaalne failisüsteem:\n" "%s" -#, c-format -msgid "Warning: cannot open %s directory\n" -msgstr "Hoiatus: kataloogi %s avamine nurjus\n" - -#, c-format -msgid "fish: Disconnecting from %s" -msgstr "fish: katkestatakse ühendus serveriga %s" - -msgid "fish: Waiting for initial line..." -msgstr "fish: oodatakse serveri vastust..." - -msgid "Sorry, we cannot do password authenticated connections for now." -msgstr "Vabandust, parooliga autenditud ühendused ei ole hetkel võimalikud." - -#, c-format -msgid "fish: Password is required for %s" -msgstr "fish: Server %s küsib parooli" - -msgid "fish: Sending password..." -msgstr "fish: saadetakse parooli..." - -msgid "fish: Sending initial line..." -msgstr "fish: lähtestamine..." - -msgid "fish: Handshaking version..." -msgstr "fish: Versiooni kokku leppimine..." - -msgid "fish: Getting host info..." -msgstr "fish: Hangitakse hosti infot..." - -#, c-format -msgid "fish: Reading directory %s..." -msgstr "fish: Loetakse kataloogi %s..." +msgid "" +"EXTFS virtual file system:\n" +"wrong file name" +msgstr "" +"EXTFS virtuaalne failisüsteem:\n" +"vale failinimi" -#, c-format -msgid "%s: done." -msgstr "%s: valmis." +msgid "" +"EXTFS virtual file system:\n" +"wrong archive name" +msgstr "" +"EXTFS virtuaalne failisüsteem:\n" +"vale arhiivinimi" -#, c-format -msgid "%s: failure" -msgstr "%s: nurjumine" +msgid "" +"EXTFS virtual file system:\n" +"cannot build command" +msgstr "" +"EXTFS virtuaalne failisüsteem:\n" +"käsu loomine nurjus" #, c-format -msgid "fish: store %s: sending command..." -msgstr "fish: salvesta %s: saadetakse käsku..." - -msgid "fish: Local read failed, sending zeros" -msgstr "fish: kohalik lugemine nurjus, saadetakse nullid" - -msgid "fish: storing file" -msgstr "fish: salvestatakse fail" - -msgid "Aborting transfer..." -msgstr "Saatmine katkestatakse..." - -msgid "Error reported after abort." -msgstr "Pärast katkestamist raporteeriti viga." - -msgid "Aborted transfer would be successful." -msgstr "Katkestatud ülekanne oleks edukas." +msgid "Warning: cannot open %s directory\n" +msgstr "Hoiatus: kataloogi %s avamine nurjus\n" #, c-format msgid "ftpfs: Disconnecting from %s" @@ -4331,6 +4308,14 @@ msgstr "(esmalt chdir)" msgid "ftpfs: failed; nowhere to fallback to" msgstr "ftpfs: nurjumine; täiendavaid alternatiive ei ole" +#, c-format +msgid "%s: failure" +msgstr "%s: nurjumine" + +#, c-format +msgid "%s: done." +msgstr "%s: valmis." + msgid "ftpfs: storing file" msgstr "ftpfs: salvestatakse faili" @@ -4411,7 +4396,7 @@ msgid "" msgstr "" "Püsivalt lisatud\n" "%s (%s)\n" -"teadaolevate hostide loendisse." +"tuntud hostide loendisse." msgid "sftp: cannot get the remote host key" msgstr "sftp: ei saa kaughosti võtit hankida" @@ -4431,13 +4416,12 @@ msgid "" "SHA1:%s.\n" "Do you want to add it to the list of known hosts and continue connecting?" msgstr "" -"Hosti autentsus\n" +"Hosti autentsust ei saa kindlaks teha!\n" "%s (%s)\n" -"ei saa kindlaks teha!\n" "%s võtme sõrmejälje räsi on\n" "SHA1:%s.\n" -"Kas soovite selle teadaolevate hostide loendisse lisada ja ühenduse loomist " -"jätkata?" +"Kas soovite selle lisada tuntud hostide loendisse ja jätkata ühenduse " +"loomist?" #, c-format msgid "" @@ -4450,7 +4434,7 @@ msgstr "" "%s (%s)\n" "on leitud tuntud hostide loendist, kuid\n" "VÕTMED EI SOBI KOKKU! SEE VÕIB OLLA MITM rünnak!\n" -"Kas olete kindel, et soovite selle teadaolevate hostide loendisse lisada ja " +"Kas olete kindel, et soovite selle tuntud hostide loendisse lisada ja " "ühenduse loomist jätkata?" msgid "sftp: host key verification failed" @@ -4487,6 +4471,52 @@ msgstr "sftp: (Ctrl+G katkestab) Loendamine... %s" msgid "sftp: Listing done." msgstr "sftp: Loendamine lõpetatud." +#, c-format +msgid "shell: Disconnecting from %s" +msgstr "kest: katkestatakse ühendus serveriga %s" + +msgid "shell: Waiting for initial line..." +msgstr "kest: oodatakse serveri vastust..." + +msgid "Sorry, we cannot do password authenticated connections for now." +msgstr "Vabandust, parooliga autenditud ühendused ei ole hetkel võimalikud." + +#, c-format +msgid "shell: Password is required for %s" +msgstr "kest: server %s küsib parooli" + +msgid "shell: Sending password..." +msgstr "kest: parooli saatmine..." + +msgid "shell: Sending initial line..." +msgstr "kest: lähtestamine..." + +msgid "shell: Getting host info..." +msgstr "kest: hosti info hankimine..." + +#, c-format +msgid "shell: Reading directory %s..." +msgstr "kest: loetakse kataloogi %s..." + +#, c-format +msgid "shell: store %s: sending command..." +msgstr "kes: salvesta %s: saadetakse käsku..." + +msgid "shell: Local read failed, sending zeros" +msgstr "kest: kohalik lugemine nurjus, saadetakse nullid" + +msgid "shell: storing file" +msgstr "kest: faili salvestamine" + +msgid "Aborting transfer..." +msgstr "Saatmine katkestatakse..." + +msgid "Error reported after abort." +msgstr "Pärast katkestamist raporteeriti viga." + +msgid "Aborted transfer would be successful." +msgstr "Katkestatud ülekanne oleks edukas." + msgid "Inconsistent tar archive" msgstr "Tar arhiiv sisaldab vasturääkivusi" @@ -4506,9 +4536,11 @@ msgid "" "%s\n" "doesn't look like a tar archive" msgstr "" +"%s\n" +"ei meenuta tar arhiivi" msgid "tar: mc_lseek not stopped at a record boundary" -msgstr "" +msgstr "tar: mc_lseek ei peatunud kirje piiril" msgid "undelfs: error" msgstr "undelfs: viga" diff --git a/mcsrc/po/eu.po b/mcsrc/po/eu.po index 250addd4..9a84ecfc 100644 --- a/mcsrc/po/eu.po +++ b/mcsrc/po/eu.po @@ -9,7 +9,7 @@ msgid "" msgstr "" "Project-Id-Version: Midnight Commander\n" "Report-Msgid-Bugs-To: https://www.midnight-commander.org/\n" -"POT-Creation-Date: 2023-08-06 15:50+0200\n" +"POT-Creation-Date: 2024-01-20 20:51+0100\n" "PO-Revision-Date: 2010-12-29 10:19+0000\n" "Last-Translator: Iñigo Salvador Azurmendi , " "2011,2015-2019\n" @@ -730,32 +730,13 @@ msgid "" " errdhotfocus\n" " Menus: menunormal, menuhot, menusel, menuhotsel, menuinactive\n" " Popup menus: pmenunormal, pmenusel, pmenutitle\n" -" Editor: editnormal, editbold, editmarked, editwhitespace,\n" +" Editor: editnormal, editbold, editmarked, editwhitespace, " +"editnonprintable,\n" " editlinestate, editbg, editframe, editframeactive\n" " editframedrag\n" " Viewer: viewnormal,viewbold, viewunderline, viewselected\n" " Help: helpnormal, helpitalic, helpbold, helplink, helpslink\n" msgstr "" -"--colors GAKOHITZA={AURRE},{ATZE},{EZAUGR}:GAKOHITZA2=...\n" -"\n" -"{AURRE}, {ATZE} eta {EZAUGR} jarri gabe utzi daitezke, eta lehenetsitakoa " -"erabiliko da\n" -"\n" -" Gakohitzak:\n" -" Globala: errors, disabled, reverse, gauge, header\n" -" input, inputmark, inputunchanged, commandlinemark\n" -" bbarhotkey, bbarbutton, statusbar\n" -" Fitxategien bistaratzea: normal, selected, marked, markselect\n" -" Elkarrizketa laukiak: dnormal, dfocus, dhotnormal, dhotfocus, " -"errdhotnormal,\n" -" errdhotfocus\n" -" Menuak: menunormal, menuhot, menusel, menuhotsel, menuinactive\n" -" Menu gainazaleratuak: pmenunormal, pmenusel, pmenutitle\n" -" Editorea: editnormal, editbold, editmarked, editwhitespace,\n" -" editlinestate, editbg, editframe, editframeactive\n" -" editframedrag\n" -" Erakuslea: viewnormal,viewbold, viewunderline, viewselected\n" -" Laguntza: helpnormal, helpitalic, helpbold, helplink, helpslink\n" #. TRANSLATORS: don't translate color names and attributes msgid "" @@ -1622,7 +1603,7 @@ msgstr "" "Testu editore lagunkoi bat\n" "Midnight Commander-rarentzako idatzia." -msgid "Copyright (C) 1996-2023 the Free Software Foundation" +msgid "Copyright (C) 1996-2024 the Free Software Foundation" msgstr "" msgid "About" @@ -4130,67 +4111,24 @@ msgid "" "%s" msgstr "" -#, c-format -msgid "Warning: cannot open %s directory\n" -msgstr "Abisua: %s direktorioa ezin ireki\n" - -#, c-format -msgid "fish: Disconnecting from %s" -msgstr "fish: %s(e)tik deskonektatzen" - -msgid "fish: Waiting for initial line..." -msgstr "fish: Hasierako lerroaren zain..." - -msgid "Sorry, we cannot do password authenticated connections for now." +msgid "" +"EXTFS virtual file system:\n" +"wrong file name" msgstr "" -"Barkatu, oraingoz ezin dugu pasahitz bidez autentikatutako konexiorik egin." - -#, c-format -msgid "fish: Password is required for %s" -msgstr "fish: %s(a)rentzako pasahitza behar da" - -msgid "fish: Sending password..." -msgstr "fish: Pasahitza bidaltzen..." - -msgid "fish: Sending initial line..." -msgstr "fish: Hasierako lerroa bidaltzen..." - -msgid "fish: Handshaking version..." -msgstr "fish: bertsioak egiaztatzen (Handshaking)..." - -msgid "fish: Getting host info..." -msgstr "fish: Ostalariaren info eskuratzen..." -#, c-format -msgid "fish: Reading directory %s..." -msgstr "fish: %s direktorioa irakurtzen..." - -#, c-format -msgid "%s: done." -msgstr "%s: eginda." +msgid "" +"EXTFS virtual file system:\n" +"wrong archive name" +msgstr "" -#, c-format -msgid "%s: failure" -msgstr "%s: hutsegitea" +msgid "" +"EXTFS virtual file system:\n" +"cannot build command" +msgstr "" #, c-format -msgid "fish: store %s: sending command..." -msgstr "fish: %s biltegiratu: komandoa bidaltzen..." - -msgid "fish: Local read failed, sending zeros" -msgstr "fish: Irakurtze lokalak huts egin du, zeroak bidaltzen" - -msgid "fish: storing file" -msgstr "fish: fitxategia biltegiratzen" - -msgid "Aborting transfer..." -msgstr "Transferentzia galarazten..." - -msgid "Error reported after abort." -msgstr "Akatsaren berri eman da galarazi ondoren." - -msgid "Aborted transfer would be successful." -msgstr "Galarazitako transferentzia arrakastatsua izango zen." +msgid "Warning: cannot open %s directory\n" +msgstr "Abisua: %s direktorioa ezin ireki\n" #, c-format msgid "ftpfs: Disconnecting from %s" @@ -4302,6 +4240,14 @@ msgstr "(aurrena chdir)" msgid "ftpfs: failed; nowhere to fallback to" msgstr "ftpfs: huts egin du; ez dauka nora itzuli" +#, c-format +msgid "%s: failure" +msgstr "%s: hutsegitea" + +#, c-format +msgid "%s: done." +msgstr "%s: eginda." + msgid "ftpfs: storing file" msgstr "ftpfs: fitxategia biltegiratzen" @@ -4441,6 +4387,53 @@ msgstr "sftp: (Ktrl-G eteteko) Zerrendatzen... %s" msgid "sftp: Listing done." msgstr "sftp: Zerrenda osatuta." +#, c-format +msgid "shell: Disconnecting from %s" +msgstr "" + +msgid "shell: Waiting for initial line..." +msgstr "" + +msgid "Sorry, we cannot do password authenticated connections for now." +msgstr "" +"Barkatu, oraingoz ezin dugu pasahitz bidez autentikatutako konexiorik egin." + +#, c-format +msgid "shell: Password is required for %s" +msgstr "" + +msgid "shell: Sending password..." +msgstr "" + +msgid "shell: Sending initial line..." +msgstr "" + +msgid "shell: Getting host info..." +msgstr "" + +#, c-format +msgid "shell: Reading directory %s..." +msgstr "" + +#, c-format +msgid "shell: store %s: sending command..." +msgstr "" + +msgid "shell: Local read failed, sending zeros" +msgstr "" + +msgid "shell: storing file" +msgstr "" + +msgid "Aborting transfer..." +msgstr "Transferentzia galarazten..." + +msgid "Error reported after abort." +msgstr "Akatsaren berri eman da galarazi ondoren." + +msgid "Aborted transfer would be successful." +msgstr "Galarazitako transferentzia arrakastatsua izango zen." + msgid "Inconsistent tar archive" msgstr "tar artxibo inkoherentea" diff --git a/mcsrc/po/fa.po b/mcsrc/po/fa.po index 4c6c259c..092f31ce 100644 --- a/mcsrc/po/fa.po +++ b/mcsrc/po/fa.po @@ -12,7 +12,7 @@ msgid "" msgstr "" "Project-Id-Version: Midnight Commander\n" "Report-Msgid-Bugs-To: https://www.midnight-commander.org/\n" -"POT-Creation-Date: 2023-08-06 15:50+0200\n" +"POT-Creation-Date: 2024-01-20 20:51+0100\n" "PO-Revision-Date: 2010-12-29 10:19+0000\n" "Last-Translator: Arya Hadi , 2017\n" "Language-Team: Persian (http://app.transifex.com/mc/mc/language/fa/)\n" @@ -708,7 +708,8 @@ msgid "" " errdhotfocus\n" " Menus: menunormal, menuhot, menusel, menuhotsel, menuinactive\n" " Popup menus: pmenunormal, pmenusel, pmenutitle\n" -" Editor: editnormal, editbold, editmarked, editwhitespace,\n" +" Editor: editnormal, editbold, editmarked, editwhitespace, " +"editnonprintable,\n" " editlinestate, editbg, editframe, editframeactive\n" " editframedrag\n" " Viewer: viewnormal,viewbold, viewunderline, viewselected\n" @@ -1544,7 +1545,7 @@ msgid "" "written for the Midnight Commander." msgstr "" -msgid "Copyright (C) 1996-2023 the Free Software Foundation" +msgid "Copyright (C) 1996-2024 the Free Software Foundation" msgstr "" msgid "About" @@ -3905,66 +3906,24 @@ msgid "" "%s" msgstr "" -#, c-format -msgid "Warning: cannot open %s directory\n" -msgstr "اخطار: پوشه‌ی %s را نمی‌توان باز کرد\n" - -#, c-format -msgid "fish: Disconnecting from %s" -msgstr "" - -msgid "fish: Waiting for initial line..." -msgstr "" - -msgid "Sorry, we cannot do password authenticated connections for now." -msgstr "" - -#, c-format -msgid "fish: Password is required for %s" -msgstr "" - -msgid "fish: Sending password..." -msgstr "" - -msgid "fish: Sending initial line..." -msgstr "" - -msgid "fish: Handshaking version..." -msgstr "" - -msgid "fish: Getting host info..." +msgid "" +"EXTFS virtual file system:\n" +"wrong file name" msgstr "" -#, c-format -msgid "fish: Reading directory %s..." +msgid "" +"EXTFS virtual file system:\n" +"wrong archive name" msgstr "" -#, c-format -msgid "%s: done." -msgstr "%s: انجام شد." - -#, c-format -msgid "%s: failure" +msgid "" +"EXTFS virtual file system:\n" +"cannot build command" msgstr "" #, c-format -msgid "fish: store %s: sending command..." -msgstr "" - -msgid "fish: Local read failed, sending zeros" -msgstr "" - -msgid "fish: storing file" -msgstr "" - -msgid "Aborting transfer..." -msgstr "" - -msgid "Error reported after abort." -msgstr "" - -msgid "Aborted transfer would be successful." -msgstr "" +msgid "Warning: cannot open %s directory\n" +msgstr "اخطار: پوشه‌ی %s را نمی‌توان باز کرد\n" #, c-format msgid "ftpfs: Disconnecting from %s" @@ -4076,6 +4035,14 @@ msgstr "" msgid "ftpfs: failed; nowhere to fallback to" msgstr "" +#, c-format +msgid "%s: failure" +msgstr "" + +#, c-format +msgid "%s: done." +msgstr "%s: انجام شد." + msgid "ftpfs: storing file" msgstr "" @@ -4209,6 +4176,52 @@ msgstr "" msgid "sftp: Listing done." msgstr "" +#, c-format +msgid "shell: Disconnecting from %s" +msgstr "" + +msgid "shell: Waiting for initial line..." +msgstr "" + +msgid "Sorry, we cannot do password authenticated connections for now." +msgstr "" + +#, c-format +msgid "shell: Password is required for %s" +msgstr "" + +msgid "shell: Sending password..." +msgstr "" + +msgid "shell: Sending initial line..." +msgstr "" + +msgid "shell: Getting host info..." +msgstr "" + +#, c-format +msgid "shell: Reading directory %s..." +msgstr "" + +#, c-format +msgid "shell: store %s: sending command..." +msgstr "" + +msgid "shell: Local read failed, sending zeros" +msgstr "" + +msgid "shell: storing file" +msgstr "" + +msgid "Aborting transfer..." +msgstr "" + +msgid "Error reported after abort." +msgstr "" + +msgid "Aborted transfer would be successful." +msgstr "" + msgid "Inconsistent tar archive" msgstr "" diff --git a/mcsrc/po/fi.po b/mcsrc/po/fi.po index 4fdbaa23..7d9563fc 100644 --- a/mcsrc/po/fi.po +++ b/mcsrc/po/fi.po @@ -11,7 +11,7 @@ msgid "" msgstr "" "Project-Id-Version: Midnight Commander\n" "Report-Msgid-Bugs-To: https://www.midnight-commander.org/\n" -"POT-Creation-Date: 2023-08-06 15:50+0200\n" +"POT-Creation-Date: 2024-01-20 20:51+0100\n" "PO-Revision-Date: 2010-12-29 10:19+0000\n" "Last-Translator: Kimmo Kujansuu , 2021\n" "Language-Team: Finnish (http://app.transifex.com/mc/mc/language/fi/)\n" @@ -737,7 +737,8 @@ msgid "" " errdhotfocus\n" " Menus: menunormal, menuhot, menusel, menuhotsel, menuinactive\n" " Popup menus: pmenunormal, pmenusel, pmenutitle\n" -" Editor: editnormal, editbold, editmarked, editwhitespace,\n" +" Editor: editnormal, editbold, editmarked, editwhitespace, " +"editnonprintable,\n" " editlinestate, editbg, editframe, editframeactive\n" " editframedrag\n" " Viewer: viewnormal,viewbold, viewunderline, viewselected\n" @@ -1594,7 +1595,7 @@ msgstr "" "Midnight Commanderille kirjoitettu\n" "käyttäjäystävällinen tekstieditori." -msgid "Copyright (C) 1996-2023 the Free Software Foundation" +msgid "Copyright (C) 1996-2024 the Free Software Foundation" msgstr "" msgid "About" @@ -4007,67 +4008,24 @@ msgid "" "%s" msgstr "" -#, c-format -msgid "Warning: cannot open %s directory\n" -msgstr "Varoitus: Kansion %s avaaminen ei onnistu\n" - -#, c-format -msgid "fish: Disconnecting from %s" -msgstr "fish: Katkaistaan yhteys kohteesta %s" - -msgid "fish: Waiting for initial line..." -msgstr "" - -msgid "Sorry, we cannot do password authenticated connections for now." +msgid "" +"EXTFS virtual file system:\n" +"wrong file name" msgstr "" -"Sori, mutta emme voi tehdä salasanan authenkaatiota yhteyksille juuri nyt." -#, c-format -msgid "fish: Password is required for %s" -msgstr "fish: Salasana pakollinen kohteelle %s" - -msgid "fish: Sending password..." -msgstr "fish: Lähetetään salasana..." - -msgid "fish: Sending initial line..." +msgid "" +"EXTFS virtual file system:\n" +"wrong archive name" msgstr "" -msgid "fish: Handshaking version..." +msgid "" +"EXTFS virtual file system:\n" +"cannot build command" msgstr "" -msgid "fish: Getting host info..." -msgstr "fish: Haetaan palveluntarjoajan tietoja..." - #, c-format -msgid "fish: Reading directory %s..." -msgstr "fish: Luetaan kansiota %s..." - -#, c-format -msgid "%s: done." -msgstr "%s: valmis." - -#, c-format -msgid "%s: failure" -msgstr "%s: nyt tuli jokin moka" - -#, c-format -msgid "fish: store %s: sending command..." -msgstr "fish: Säilytä %s: lähettämällä komento ..." - -msgid "fish: Local read failed, sending zeros" -msgstr "fish: Paikallisen tiedoston luku epäonnistui, lähetetään nollia" - -msgid "fish: storing file" -msgstr "" - -msgid "Aborting transfer..." -msgstr "Keskeytetään transferrointi..." - -msgid "Error reported after abort." -msgstr "Virhe raportoitu keskeyttämisen jälkeen." - -msgid "Aborted transfer would be successful." -msgstr "Keskeytetty siirto olisi onnistunut." +msgid "Warning: cannot open %s directory\n" +msgstr "Varoitus: Kansion %s avaaminen ei onnistu\n" #, c-format msgid "ftpfs: Disconnecting from %s" @@ -4179,6 +4137,14 @@ msgstr "" msgid "ftpfs: failed; nowhere to fallback to" msgstr "" +#, c-format +msgid "%s: failure" +msgstr "%s: nyt tuli jokin moka" + +#, c-format +msgid "%s: done." +msgstr "%s: valmis." + msgid "ftpfs: storing file" msgstr "" @@ -4316,6 +4282,53 @@ msgstr "" msgid "sftp: Listing done." msgstr "" +#, c-format +msgid "shell: Disconnecting from %s" +msgstr "" + +msgid "shell: Waiting for initial line..." +msgstr "" + +msgid "Sorry, we cannot do password authenticated connections for now." +msgstr "" +"Sori, mutta emme voi tehdä salasanan authenkaatiota yhteyksille juuri nyt." + +#, c-format +msgid "shell: Password is required for %s" +msgstr "" + +msgid "shell: Sending password..." +msgstr "" + +msgid "shell: Sending initial line..." +msgstr "" + +msgid "shell: Getting host info..." +msgstr "" + +#, c-format +msgid "shell: Reading directory %s..." +msgstr "" + +#, c-format +msgid "shell: store %s: sending command..." +msgstr "" + +msgid "shell: Local read failed, sending zeros" +msgstr "" + +msgid "shell: storing file" +msgstr "" + +msgid "Aborting transfer..." +msgstr "Keskeytetään transferrointi..." + +msgid "Error reported after abort." +msgstr "Virhe raportoitu keskeyttämisen jälkeen." + +msgid "Aborted transfer would be successful." +msgstr "Keskeytetty siirto olisi onnistunut." + msgid "Inconsistent tar archive" msgstr "" diff --git a/mcsrc/po/fr.po b/mcsrc/po/fr.po index 6e976b2f..6e94fbf2 100644 --- a/mcsrc/po/fr.po +++ b/mcsrc/po/fr.po @@ -12,15 +12,15 @@ # Slava Zanko , 2011 # 4a14a73d523224463300dea5e0502458_3dab472, 2012 # Towinet, 2017 -# Wallon Wallon, 2022-2023 +# Wallon Wallon, 2022-2024 # Yury V. Zaytsev , 2016 msgid "" msgstr "" "Project-Id-Version: Midnight Commander\n" "Report-Msgid-Bugs-To: https://www.midnight-commander.org/\n" -"POT-Creation-Date: 2023-08-06 15:50+0200\n" +"POT-Creation-Date: 2024-01-20 20:51+0100\n" "PO-Revision-Date: 2010-12-29 10:19+0000\n" -"Last-Translator: Wallon Wallon, 2022-2023\n" +"Last-Translator: Wallon Wallon, 2022-2024\n" "Language-Team: French (http://app.transifex.com/mc/mc/language/fr/)\n" "Language: fr\n" "MIME-Version: 1.0\n" @@ -751,29 +751,33 @@ msgid "" " errdhotfocus\n" " Menus: menunormal, menuhot, menusel, menuhotsel, menuinactive\n" " Popup menus: pmenunormal, pmenusel, pmenutitle\n" -" Editor: editnormal, editbold, editmarked, editwhitespace,\n" +" Editor: editnormal, editbold, editmarked, editwhitespace, " +"editnonprintable,\n" " editlinestate, editbg, editframe, editframeactive\n" " editframedrag\n" " Viewer: viewnormal,viewbold, viewunderline, viewselected\n" " Help: helpnormal, helpitalic, helpbold, helplink, helpslink\n" msgstr "" "--colors KEYWORD={FORE},{BACK},{ATTR}:KEYWORD2=...\n" -"{FORE}, {BACK} et {ATTR} peuvent être omis, et la valeur par défaut sera " -"utilisée\n" -"Mot clés :\n" -"Global : errors, disabled, reverse, gauge, header\n" -"input, inputmark, inputunchanged, commandlinemark\n" -"bbarhotkey, bbarbutton, statusbar\n" -"Affichage fichier: normal, selected, marked, markselect\n" -"Boîtes de dialogue : dnormal, dfocus, dhotnormal, dhotfocus, errdhotnormal,\n" -"errdhotfocus\n" -"Menus : menunormal, menuhot, menusel, menuhotsel, menuinactive\n" -"Menus popup : pmenunormal, pmenusel, pmenutitle\n" -"Éditeur : editnormal, editbold, editmarked, editwhitespace,\n" -"editlinestate, editbg, editframe, editframeactive\n" -"editframedrag\n" -"Visionneuse : viewnormal,viewbold, viewunderline, viewselected\n" -"Aide : helpnormal, helpitalic, helpbold, helplink, helpslink\n" +"\n" +"{FORE}, {BACK} et {ATTR} peuvent être omis. La valeur par défaut sera " +"utilisée.\n" +"\n" +" Mots-clés:\n" +" Global: errors, disabled, reverse, gauge, header\n" +" input, inputmark, inputunchanged, commandlinemark\n" +" bbarhotkey, bbarbutton, statusbar\n" +" File display: normal, selected, marked, markselect\n" +" Dialog boxes: dnormal, dfocus, dhotnormal, dhotfocus, errdhotnormal,\n" +" errdhotfocus\n" +" Menus: menunormal, menuhot, menusel, menuhotsel, menuinactive\n" +" Popup menus: pmenunormal, pmenusel, pmenutitle\n" +" Editor: editnormal, editbold, editmarked, editwhitespace, " +"editnonprintable,\n" +" editlinestate, editbg, editframe, editframeactive\n" +" editframedrag\n" +" Viewer: viewnormal,viewbold, viewunderline, viewselected\n" +" Help: helpnormal, helpitalic, helpbold, helplink, helpslink\n" #. TRANSLATORS: don't translate color names and attributes msgid "" @@ -1641,8 +1645,8 @@ msgstr "" "Un éditeur de text facile d’utilisation.\n" "écrit pour Midnight Commander." -msgid "Copyright (C) 1996-2023 the Free Software Foundation" -msgstr "Copyright (C) 1996-2023 the Free Software Foundation" +msgid "Copyright (C) 1996-2024 the Free Software Foundation" +msgstr "Copyright (C) 1996-2024 the Free Software Foundation" msgid "About" msgstr "À propos" @@ -4189,68 +4193,30 @@ msgstr "" "Système de fichiers virtuel EXTFS :\n" "%s" -#, c-format -msgid "Warning: cannot open %s directory\n" -msgstr "Avertissement : impossible d’ouvrir le répertoire %s\n" - -#, c-format -msgid "fish: Disconnecting from %s" -msgstr "fish : Déconnexion de %s" - -msgid "fish: Waiting for initial line..." -msgstr "fish : attente de la première ligne..." - -msgid "Sorry, we cannot do password authenticated connections for now." +msgid "" +"EXTFS virtual file system:\n" +"wrong file name" msgstr "" -"Désolé, nous ne pouvons pas faire de connexion authentifiée par mot de passe " -"pour l’instant." - -#, c-format -msgid "fish: Password is required for %s" -msgstr "fish : mot de passe requis pour %s" - -msgid "fish: Sending password..." -msgstr "fish : envoi du mot de passe..." - -msgid "fish: Sending initial line..." -msgstr "fish : envoi de la ligne initiale..." +"Système de fichier virtuel EXTFS :\n" +"nom de fichier erroné" -msgid "fish: Handshaking version..." -msgstr "fish : vérification des numéros de version..." - -msgid "fish: Getting host info..." -msgstr "fish : récupère les informations de l’hôte..." - -#, c-format -msgid "fish: Reading directory %s..." -msgstr "fish : lecture du répertoire %s..." - -#, c-format -msgid "%s: done." -msgstr "%s : fait." +msgid "" +"EXTFS virtual file system:\n" +"wrong archive name" +msgstr "" +"Système de fichier virtuel EXTFS :\n" +"mauvais nom d’archive" -#, c-format -msgid "%s: failure" -msgstr "%s : échec" +msgid "" +"EXTFS virtual file system:\n" +"cannot build command" +msgstr "" +"Système de fichier virtuel EXTFS :\n" +"impossible de construire la commande" #, c-format -msgid "fish: store %s: sending command..." -msgstr "fish : sauve %s : envoi de la commande..." - -msgid "fish: Local read failed, sending zeros" -msgstr "fish : échec de lecture locale, envoie de zéros" - -msgid "fish: storing file" -msgstr "fish: enregistrement du fichier" - -msgid "Aborting transfer..." -msgstr "Abandon du transfert..." - -msgid "Error reported after abort." -msgstr "Erreur rapportée après l’abandon." - -msgid "Aborted transfer would be successful." -msgstr "Le transfert abandonné devrait avoir réussi." +msgid "Warning: cannot open %s directory\n" +msgstr "Avertissement : impossible d’ouvrir le répertoire %s\n" #, c-format msgid "ftpfs: Disconnecting from %s" @@ -4362,6 +4328,14 @@ msgstr "(chdir d’abord)" msgid "ftpfs: failed; nowhere to fallback to" msgstr "ftpfs : échec ; nulle part où retomber" +#, c-format +msgid "%s: failure" +msgstr "%s : échec" + +#, c-format +msgid "%s: done." +msgstr "%s : fait." + msgid "ftpfs: storing file" msgstr "ftpfs : enregistrement du fichier" @@ -4525,6 +4499,54 @@ msgstr "sftp : (Ctrl-G break) Listing... %s" msgid "sftp: Listing done." msgstr "sftp : listing effectué." +#, c-format +msgid "shell: Disconnecting from %s" +msgstr "shell : Déconnexion de %s" + +msgid "shell: Waiting for initial line..." +msgstr "shell : En attente de la ligne initiale..." + +msgid "Sorry, we cannot do password authenticated connections for now." +msgstr "" +"Désolé, nous ne pouvons pas faire de connexion authentifiée par mot de passe " +"pour l’instant." + +#, c-format +msgid "shell: Password is required for %s" +msgstr "shell : Le mot de passe est nécessaire pour %s" + +msgid "shell: Sending password..." +msgstr "shell : Envoi du mot de passe..." + +msgid "shell: Sending initial line..." +msgstr "shell : Envoi de la ligne initiale..." + +msgid "shell: Getting host info..." +msgstr "shell : Obtention d’informations sur l’hôte..." + +#, c-format +msgid "shell: Reading directory %s..." +msgstr "shell : Lecture du répertoire %s..." + +#, c-format +msgid "shell: store %s: sending command..." +msgstr "shell : stocker %s : envoi de la commande..." + +msgid "shell: Local read failed, sending zeros" +msgstr "shell : Échec de la lecture locale, envoi de zéros" + +msgid "shell: storing file" +msgstr "shell : stockage du fichier" + +msgid "Aborting transfer..." +msgstr "Abandon du transfert..." + +msgid "Error reported after abort." +msgstr "Erreur rapportée après l’abandon." + +msgid "Aborted transfer would be successful." +msgstr "Le transfert abandonné devrait avoir réussi." + msgid "Inconsistent tar archive" msgstr "Archive tar incohérente" diff --git a/mcsrc/po/fr_CA.po b/mcsrc/po/fr_CA.po index 9a9900f9..09a6fa20 100644 --- a/mcsrc/po/fr_CA.po +++ b/mcsrc/po/fr_CA.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Midnight Commander\n" "Report-Msgid-Bugs-To: https://www.midnight-commander.org/\n" -"POT-Creation-Date: 2023-08-06 15:50+0200\n" +"POT-Creation-Date: 2024-01-20 20:51+0100\n" "PO-Revision-Date: 2015-02-26 09:48+0000\n" "Last-Translator: Piotr Drąg \n" "Language-Team: French (Canada) (http://www.transifex.com/projects/p/mc/" @@ -704,7 +704,8 @@ msgid "" " errdhotfocus\n" " Menus: menunormal, menuhot, menusel, menuhotsel, menuinactive\n" " Popup menus: pmenunormal, pmenusel, pmenutitle\n" -" Editor: editnormal, editbold, editmarked, editwhitespace,\n" +" Editor: editnormal, editbold, editmarked, editwhitespace, " +"editnonprintable,\n" " editlinestate, editbg, editframe, editframeactive\n" " editframedrag\n" " Viewer: viewnormal,viewbold, viewunderline, viewselected\n" @@ -1540,7 +1541,7 @@ msgid "" "written for the Midnight Commander." msgstr "" -msgid "Copyright (C) 1996-2023 the Free Software Foundation" +msgid "Copyright (C) 1996-2024 the Free Software Foundation" msgstr "" msgid "About" @@ -3901,65 +3902,23 @@ msgid "" "%s" msgstr "" -#, c-format -msgid "Warning: cannot open %s directory\n" -msgstr "" - -#, c-format -msgid "fish: Disconnecting from %s" -msgstr "" - -msgid "fish: Waiting for initial line..." -msgstr "" - -msgid "Sorry, we cannot do password authenticated connections for now." -msgstr "" - -#, c-format -msgid "fish: Password is required for %s" -msgstr "" - -msgid "fish: Sending password..." -msgstr "" - -msgid "fish: Sending initial line..." -msgstr "" - -msgid "fish: Handshaking version..." -msgstr "" - -msgid "fish: Getting host info..." -msgstr "" - -#, c-format -msgid "fish: Reading directory %s..." +msgid "" +"EXTFS virtual file system:\n" +"wrong file name" msgstr "" -#, c-format -msgid "%s: done." +msgid "" +"EXTFS virtual file system:\n" +"wrong archive name" msgstr "" -#, c-format -msgid "%s: failure" +msgid "" +"EXTFS virtual file system:\n" +"cannot build command" msgstr "" #, c-format -msgid "fish: store %s: sending command..." -msgstr "" - -msgid "fish: Local read failed, sending zeros" -msgstr "" - -msgid "fish: storing file" -msgstr "" - -msgid "Aborting transfer..." -msgstr "" - -msgid "Error reported after abort." -msgstr "" - -msgid "Aborted transfer would be successful." +msgid "Warning: cannot open %s directory\n" msgstr "" #, c-format @@ -4072,6 +4031,14 @@ msgstr "" msgid "ftpfs: failed; nowhere to fallback to" msgstr "" +#, c-format +msgid "%s: failure" +msgstr "" + +#, c-format +msgid "%s: done." +msgstr "" + msgid "ftpfs: storing file" msgstr "" @@ -4205,6 +4172,52 @@ msgstr "" msgid "sftp: Listing done." msgstr "" +#, c-format +msgid "shell: Disconnecting from %s" +msgstr "" + +msgid "shell: Waiting for initial line..." +msgstr "" + +msgid "Sorry, we cannot do password authenticated connections for now." +msgstr "" + +#, c-format +msgid "shell: Password is required for %s" +msgstr "" + +msgid "shell: Sending password..." +msgstr "" + +msgid "shell: Sending initial line..." +msgstr "" + +msgid "shell: Getting host info..." +msgstr "" + +#, c-format +msgid "shell: Reading directory %s..." +msgstr "" + +#, c-format +msgid "shell: store %s: sending command..." +msgstr "" + +msgid "shell: Local read failed, sending zeros" +msgstr "" + +msgid "shell: storing file" +msgstr "" + +msgid "Aborting transfer..." +msgstr "" + +msgid "Error reported after abort." +msgstr "" + +msgid "Aborted transfer would be successful." +msgstr "" + msgid "Inconsistent tar archive" msgstr "" diff --git a/mcsrc/po/ga.po b/mcsrc/po/ga.po index 8ec6f3ac..892a60e8 100644 --- a/mcsrc/po/ga.po +++ b/mcsrc/po/ga.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Midnight Commander\n" "Report-Msgid-Bugs-To: https://www.midnight-commander.org/\n" -"POT-Creation-Date: 2023-08-06 15:50+0200\n" +"POT-Creation-Date: 2024-01-20 20:51+0100\n" "PO-Revision-Date: 2010-12-29 10:19+0000\n" "Last-Translator: FULL NAME \n" "Language-Team: Irish (http://app.transifex.com/mc/mc/language/ga/)\n" @@ -704,7 +704,8 @@ msgid "" " errdhotfocus\n" " Menus: menunormal, menuhot, menusel, menuhotsel, menuinactive\n" " Popup menus: pmenunormal, pmenusel, pmenutitle\n" -" Editor: editnormal, editbold, editmarked, editwhitespace,\n" +" Editor: editnormal, editbold, editmarked, editwhitespace, " +"editnonprintable,\n" " editlinestate, editbg, editframe, editframeactive\n" " editframedrag\n" " Viewer: viewnormal,viewbold, viewunderline, viewselected\n" @@ -1540,7 +1541,7 @@ msgid "" "written for the Midnight Commander." msgstr "" -msgid "Copyright (C) 1996-2023 the Free Software Foundation" +msgid "Copyright (C) 1996-2024 the Free Software Foundation" msgstr "" msgid "About" @@ -3913,65 +3914,23 @@ msgid "" "%s" msgstr "" -#, c-format -msgid "Warning: cannot open %s directory\n" -msgstr "" - -#, c-format -msgid "fish: Disconnecting from %s" -msgstr "" - -msgid "fish: Waiting for initial line..." -msgstr "" - -msgid "Sorry, we cannot do password authenticated connections for now." -msgstr "" - -#, c-format -msgid "fish: Password is required for %s" -msgstr "" - -msgid "fish: Sending password..." -msgstr "" - -msgid "fish: Sending initial line..." -msgstr "" - -msgid "fish: Handshaking version..." -msgstr "" - -msgid "fish: Getting host info..." -msgstr "" - -#, c-format -msgid "fish: Reading directory %s..." +msgid "" +"EXTFS virtual file system:\n" +"wrong file name" msgstr "" -#, c-format -msgid "%s: done." +msgid "" +"EXTFS virtual file system:\n" +"wrong archive name" msgstr "" -#, c-format -msgid "%s: failure" +msgid "" +"EXTFS virtual file system:\n" +"cannot build command" msgstr "" #, c-format -msgid "fish: store %s: sending command..." -msgstr "" - -msgid "fish: Local read failed, sending zeros" -msgstr "" - -msgid "fish: storing file" -msgstr "" - -msgid "Aborting transfer..." -msgstr "" - -msgid "Error reported after abort." -msgstr "" - -msgid "Aborted transfer would be successful." +msgid "Warning: cannot open %s directory\n" msgstr "" #, c-format @@ -4084,6 +4043,14 @@ msgstr "" msgid "ftpfs: failed; nowhere to fallback to" msgstr "" +#, c-format +msgid "%s: failure" +msgstr "" + +#, c-format +msgid "%s: done." +msgstr "" + msgid "ftpfs: storing file" msgstr "" @@ -4217,6 +4184,52 @@ msgstr "" msgid "sftp: Listing done." msgstr "" +#, c-format +msgid "shell: Disconnecting from %s" +msgstr "" + +msgid "shell: Waiting for initial line..." +msgstr "" + +msgid "Sorry, we cannot do password authenticated connections for now." +msgstr "" + +#, c-format +msgid "shell: Password is required for %s" +msgstr "" + +msgid "shell: Sending password..." +msgstr "" + +msgid "shell: Sending initial line..." +msgstr "" + +msgid "shell: Getting host info..." +msgstr "" + +#, c-format +msgid "shell: Reading directory %s..." +msgstr "" + +#, c-format +msgid "shell: store %s: sending command..." +msgstr "" + +msgid "shell: Local read failed, sending zeros" +msgstr "" + +msgid "shell: storing file" +msgstr "" + +msgid "Aborting transfer..." +msgstr "" + +msgid "Error reported after abort." +msgstr "" + +msgid "Aborted transfer would be successful." +msgstr "" + msgid "Inconsistent tar archive" msgstr "" diff --git a/mcsrc/po/gl.po b/mcsrc/po/gl.po index 3c218fdd..2f284b5f 100644 --- a/mcsrc/po/gl.po +++ b/mcsrc/po/gl.po @@ -12,7 +12,7 @@ msgid "" msgstr "" "Project-Id-Version: Midnight Commander\n" "Report-Msgid-Bugs-To: https://www.midnight-commander.org/\n" -"POT-Creation-Date: 2023-08-06 15:50+0200\n" +"POT-Creation-Date: 2024-01-20 20:51+0100\n" "PO-Revision-Date: 2010-12-29 10:19+0000\n" "Last-Translator: Miguel Anxo Bouzada , " "2012,2014-2015,2019\n" @@ -737,34 +737,13 @@ msgid "" " errdhotfocus\n" " Menus: menunormal, menuhot, menusel, menuhotsel, menuinactive\n" " Popup menus: pmenunormal, pmenusel, pmenutitle\n" -" Editor: editnormal, editbold, editmarked, editwhitespace,\n" +" Editor: editnormal, editbold, editmarked, editwhitespace, " +"editnonprintable,\n" " editlinestate, editbg, editframe, editframeactive\n" " editframedrag\n" " Viewer: viewnormal,viewbold, viewunderline, viewselected\n" " Help: helpnormal, helpitalic, helpbold, helplink, helpslink\n" msgstr "" -"--colors CONTEXTO={FRENTE},{FONDO},{ATRIBUTOS}:CONTEXTO2=...\n" -"\n" -"{FRENTE}, {FONDO} e {ATRIBUTOS}poden omitirse, empregarase o valor " -"predeterminado\n" -"\n" -" Contextos:\n" -" Globais: errors, disabled, reverse, gauge, header\n" -" input, inputmark, inputunchanged, commandlinemark\n" -" bbarhotkey, bbarbutton, statusbar\n" -" Visor de ficheiros: normal, selected, marked, markselect\n" -" Diálogos: dnormal, dfocus, dhotnormal, dhotfocus, " -"errdhotnormal,\n" -" errdhotfocus\n" -" Menús: menunormal, menuhot, menusel, menuhotsel, " -"menuinactive\n" -" Menús emerxentes: pmenunormal, pmenusel, pmenutitle\n" -" Editor: editnormal, editbold, editmarked, editwhitespace,\n" -" editlinestate, editbg, editframe, editframeactive\n" -" editframedrag\n" -" Visor: viewnormal,viewbold, viewunderline, viewselected\n" -" Axuda: helpnormal, helpitalic, helpbold, helplink, " -"helpslink\n" #. TRANSLATORS: don't translate color names and attributes msgid "" @@ -1631,7 +1610,7 @@ msgstr "" "Un editor de texto de uso amigábel\n" "escrito para o Midnight Commander." -msgid "Copyright (C) 1996-2023 the Free Software Foundation" +msgid "Copyright (C) 1996-2024 the Free Software Foundation" msgstr "" msgid "About" @@ -4136,66 +4115,24 @@ msgid "" "%s" msgstr "" -#, c-format -msgid "Warning: cannot open %s directory\n" -msgstr "Aviso: non é posíbel abrir o directorio %s\n" - -#, c-format -msgid "fish: Disconnecting from %s" -msgstr "fish: desconectando de %s" - -msgid "fish: Waiting for initial line..." -msgstr "fish: esperando liña de inicio..." - -msgid "Sorry, we cannot do password authenticated connections for now." -msgstr "Síntoo, as conexións con contrasinal aínda non son posíbeis." - -#, c-format -msgid "fish: Password is required for %s" -msgstr "fish: precisase contrasinal para %s" - -msgid "fish: Sending password..." -msgstr "fish: enviando contrasinal de usuario..." - -msgid "fish: Sending initial line..." -msgstr "fish: enviando liña de inicio..." - -msgid "fish: Handshaking version..." -msgstr "fish: negociando versión..." - -msgid "fish: Getting host info..." -msgstr "fish: obtendo información do servidor..." - -#, c-format -msgid "fish: Reading directory %s..." -msgstr "fish: lendo o directorio %s..." +msgid "" +"EXTFS virtual file system:\n" +"wrong file name" +msgstr "" -#, c-format -msgid "%s: done." -msgstr "%s: feito." +msgid "" +"EXTFS virtual file system:\n" +"wrong archive name" +msgstr "" -#, c-format -msgid "%s: failure" -msgstr "%s: fallo" +msgid "" +"EXTFS virtual file system:\n" +"cannot build command" +msgstr "" #, c-format -msgid "fish: store %s: sending command..." -msgstr "fish: gardar %s: enviando orde..." - -msgid "fish: Local read failed, sending zeros" -msgstr "fish: fallo local de lectura, enviando ceros" - -msgid "fish: storing file" -msgstr "fish: gardando ficheiro" - -msgid "Aborting transfer..." -msgstr "Interrompendo transferencia..." - -msgid "Error reported after abort." -msgstr "Informouse dun erro despois de interromper." - -msgid "Aborted transfer would be successful." -msgstr "Transferencia interrompida satisfactoriamente." +msgid "Warning: cannot open %s directory\n" +msgstr "Aviso: non é posíbel abrir o directorio %s\n" #, c-format msgid "ftpfs: Disconnecting from %s" @@ -4307,6 +4244,14 @@ msgstr "(primeiro chdir)" msgid "ftpfs: failed; nowhere to fallback to" msgstr "ftpfs: produciuse un fallo; non hai onde repregarse" +#, c-format +msgid "%s: failure" +msgstr "%s: fallo" + +#, c-format +msgid "%s: done." +msgstr "%s: feito." + msgid "ftpfs: storing file" msgstr "ftpfs: gardando ficheiro" @@ -4446,6 +4391,52 @@ msgstr "sftp: (Ctrl-G interrompe) Listado... %s" msgid "sftp: Listing done." msgstr "sftp: Feito o listado." +#, c-format +msgid "shell: Disconnecting from %s" +msgstr "" + +msgid "shell: Waiting for initial line..." +msgstr "" + +msgid "Sorry, we cannot do password authenticated connections for now." +msgstr "Síntoo, as conexións con contrasinal aínda non son posíbeis." + +#, c-format +msgid "shell: Password is required for %s" +msgstr "" + +msgid "shell: Sending password..." +msgstr "" + +msgid "shell: Sending initial line..." +msgstr "" + +msgid "shell: Getting host info..." +msgstr "" + +#, c-format +msgid "shell: Reading directory %s..." +msgstr "" + +#, c-format +msgid "shell: store %s: sending command..." +msgstr "" + +msgid "shell: Local read failed, sending zeros" +msgstr "" + +msgid "shell: storing file" +msgstr "" + +msgid "Aborting transfer..." +msgstr "Interrompendo transferencia..." + +msgid "Error reported after abort." +msgstr "Informouse dun erro despois de interromper." + +msgid "Aborted transfer would be successful." +msgstr "Transferencia interrompida satisfactoriamente." + msgid "Inconsistent tar archive" msgstr "Arquivo de tipo tar inconsistente" diff --git a/mcsrc/po/he.po b/mcsrc/po/he.po index 74103f78..fedd809c 100644 --- a/mcsrc/po/he.po +++ b/mcsrc/po/he.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Midnight Commander\n" "Report-Msgid-Bugs-To: https://www.midnight-commander.org/\n" -"POT-Creation-Date: 2023-08-06 15:50+0200\n" +"POT-Creation-Date: 2024-01-20 20:51+0100\n" "PO-Revision-Date: 2010-12-29 10:19+0000\n" "Last-Translator: FULL NAME \n" "Language-Team: Hebrew (http://app.transifex.com/mc/mc/language/he/)\n" @@ -704,7 +704,8 @@ msgid "" " errdhotfocus\n" " Menus: menunormal, menuhot, menusel, menuhotsel, menuinactive\n" " Popup menus: pmenunormal, pmenusel, pmenutitle\n" -" Editor: editnormal, editbold, editmarked, editwhitespace,\n" +" Editor: editnormal, editbold, editmarked, editwhitespace, " +"editnonprintable,\n" " editlinestate, editbg, editframe, editframeactive\n" " editframedrag\n" " Viewer: viewnormal,viewbold, viewunderline, viewselected\n" @@ -1540,7 +1541,7 @@ msgid "" "written for the Midnight Commander." msgstr "" -msgid "Copyright (C) 1996-2023 the Free Software Foundation" +msgid "Copyright (C) 1996-2024 the Free Software Foundation" msgstr "" msgid "About" @@ -3909,65 +3910,23 @@ msgid "" "%s" msgstr "" -#, c-format -msgid "Warning: cannot open %s directory\n" -msgstr "" - -#, c-format -msgid "fish: Disconnecting from %s" -msgstr "" - -msgid "fish: Waiting for initial line..." -msgstr "" - -msgid "Sorry, we cannot do password authenticated connections for now." -msgstr "" - -#, c-format -msgid "fish: Password is required for %s" -msgstr "" - -msgid "fish: Sending password..." -msgstr "" - -msgid "fish: Sending initial line..." -msgstr "" - -msgid "fish: Handshaking version..." -msgstr "" - -msgid "fish: Getting host info..." -msgstr "" - -#, c-format -msgid "fish: Reading directory %s..." +msgid "" +"EXTFS virtual file system:\n" +"wrong file name" msgstr "" -#, c-format -msgid "%s: done." +msgid "" +"EXTFS virtual file system:\n" +"wrong archive name" msgstr "" -#, c-format -msgid "%s: failure" +msgid "" +"EXTFS virtual file system:\n" +"cannot build command" msgstr "" #, c-format -msgid "fish: store %s: sending command..." -msgstr "" - -msgid "fish: Local read failed, sending zeros" -msgstr "" - -msgid "fish: storing file" -msgstr "" - -msgid "Aborting transfer..." -msgstr "" - -msgid "Error reported after abort." -msgstr "" - -msgid "Aborted transfer would be successful." +msgid "Warning: cannot open %s directory\n" msgstr "" #, c-format @@ -4080,6 +4039,14 @@ msgstr "" msgid "ftpfs: failed; nowhere to fallback to" msgstr "" +#, c-format +msgid "%s: failure" +msgstr "" + +#, c-format +msgid "%s: done." +msgstr "" + msgid "ftpfs: storing file" msgstr "" @@ -4213,6 +4180,52 @@ msgstr "" msgid "sftp: Listing done." msgstr "" +#, c-format +msgid "shell: Disconnecting from %s" +msgstr "" + +msgid "shell: Waiting for initial line..." +msgstr "" + +msgid "Sorry, we cannot do password authenticated connections for now." +msgstr "" + +#, c-format +msgid "shell: Password is required for %s" +msgstr "" + +msgid "shell: Sending password..." +msgstr "" + +msgid "shell: Sending initial line..." +msgstr "" + +msgid "shell: Getting host info..." +msgstr "" + +#, c-format +msgid "shell: Reading directory %s..." +msgstr "" + +#, c-format +msgid "shell: store %s: sending command..." +msgstr "" + +msgid "shell: Local read failed, sending zeros" +msgstr "" + +msgid "shell: storing file" +msgstr "" + +msgid "Aborting transfer..." +msgstr "" + +msgid "Error reported after abort." +msgstr "" + +msgid "Aborted transfer would be successful." +msgstr "" + msgid "Inconsistent tar archive" msgstr "" diff --git a/mcsrc/po/hr.po b/mcsrc/po/hr.po index 8a8ab096..eab13288 100644 --- a/mcsrc/po/hr.po +++ b/mcsrc/po/hr.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Midnight Commander\n" "Report-Msgid-Bugs-To: https://www.midnight-commander.org/\n" -"POT-Creation-Date: 2023-08-06 15:50+0200\n" +"POT-Creation-Date: 2024-01-20 20:51+0100\n" "PO-Revision-Date: 2010-12-29 10:19+0000\n" "Last-Translator: FULL NAME \n" "Language-Team: Croatian (http://app.transifex.com/mc/mc/language/hr/)\n" @@ -704,7 +704,8 @@ msgid "" " errdhotfocus\n" " Menus: menunormal, menuhot, menusel, menuhotsel, menuinactive\n" " Popup menus: pmenunormal, pmenusel, pmenutitle\n" -" Editor: editnormal, editbold, editmarked, editwhitespace,\n" +" Editor: editnormal, editbold, editmarked, editwhitespace, " +"editnonprintable,\n" " editlinestate, editbg, editframe, editframeactive\n" " editframedrag\n" " Viewer: viewnormal,viewbold, viewunderline, viewselected\n" @@ -1540,7 +1541,7 @@ msgid "" "written for the Midnight Commander." msgstr "" -msgid "Copyright (C) 1996-2023 the Free Software Foundation" +msgid "Copyright (C) 1996-2024 the Free Software Foundation" msgstr "" msgid "About" @@ -3905,65 +3906,23 @@ msgid "" "%s" msgstr "" -#, c-format -msgid "Warning: cannot open %s directory\n" -msgstr "" - -#, c-format -msgid "fish: Disconnecting from %s" -msgstr "" - -msgid "fish: Waiting for initial line..." -msgstr "" - -msgid "Sorry, we cannot do password authenticated connections for now." -msgstr "" - -#, c-format -msgid "fish: Password is required for %s" -msgstr "" - -msgid "fish: Sending password..." -msgstr "" - -msgid "fish: Sending initial line..." -msgstr "" - -msgid "fish: Handshaking version..." -msgstr "" - -msgid "fish: Getting host info..." -msgstr "" - -#, c-format -msgid "fish: Reading directory %s..." +msgid "" +"EXTFS virtual file system:\n" +"wrong file name" msgstr "" -#, c-format -msgid "%s: done." +msgid "" +"EXTFS virtual file system:\n" +"wrong archive name" msgstr "" -#, c-format -msgid "%s: failure" +msgid "" +"EXTFS virtual file system:\n" +"cannot build command" msgstr "" #, c-format -msgid "fish: store %s: sending command..." -msgstr "" - -msgid "fish: Local read failed, sending zeros" -msgstr "" - -msgid "fish: storing file" -msgstr "" - -msgid "Aborting transfer..." -msgstr "" - -msgid "Error reported after abort." -msgstr "" - -msgid "Aborted transfer would be successful." +msgid "Warning: cannot open %s directory\n" msgstr "" #, c-format @@ -4076,6 +4035,14 @@ msgstr "" msgid "ftpfs: failed; nowhere to fallback to" msgstr "" +#, c-format +msgid "%s: failure" +msgstr "" + +#, c-format +msgid "%s: done." +msgstr "" + msgid "ftpfs: storing file" msgstr "" @@ -4209,6 +4176,52 @@ msgstr "" msgid "sftp: Listing done." msgstr "" +#, c-format +msgid "shell: Disconnecting from %s" +msgstr "" + +msgid "shell: Waiting for initial line..." +msgstr "" + +msgid "Sorry, we cannot do password authenticated connections for now." +msgstr "" + +#, c-format +msgid "shell: Password is required for %s" +msgstr "" + +msgid "shell: Sending password..." +msgstr "" + +msgid "shell: Sending initial line..." +msgstr "" + +msgid "shell: Getting host info..." +msgstr "" + +#, c-format +msgid "shell: Reading directory %s..." +msgstr "" + +#, c-format +msgid "shell: store %s: sending command..." +msgstr "" + +msgid "shell: Local read failed, sending zeros" +msgstr "" + +msgid "shell: storing file" +msgstr "" + +msgid "Aborting transfer..." +msgstr "" + +msgid "Error reported after abort." +msgstr "" + +msgid "Aborted transfer would be successful." +msgstr "" + msgid "Inconsistent tar archive" msgstr "" diff --git a/mcsrc/po/hu.po b/mcsrc/po/hu.po index b32bdcc9..fc05c954 100644 --- a/mcsrc/po/hu.po +++ b/mcsrc/po/hu.po @@ -3,7 +3,7 @@ # This file is distributed under the same license as the mc package. # # Translators: -# András Tőrös , 2020 +# 6bdcf737f9bcb6037ecba892a70fb951_e9eeb40 , 2020 # Mátyás Demeter , 2014 # Rezső Páder , 2012-2017,2019 # Slava Zanko , 2011 @@ -12,9 +12,10 @@ msgid "" msgstr "" "Project-Id-Version: Midnight Commander\n" "Report-Msgid-Bugs-To: https://www.midnight-commander.org/\n" -"POT-Creation-Date: 2023-08-06 15:50+0200\n" +"POT-Creation-Date: 2024-01-20 20:51+0100\n" "PO-Revision-Date: 2010-12-29 10:19+0000\n" -"Last-Translator: András Tőrös , 2020\n" +"Last-Translator: 6bdcf737f9bcb6037ecba892a70fb951_e9eeb40 " +", 2020\n" "Language-Team: Hungarian (http://app.transifex.com/mc/mc/language/hu/)\n" "Language: hu\n" "MIME-Version: 1.0\n" @@ -722,30 +723,13 @@ msgid "" " errdhotfocus\n" " Menus: menunormal, menuhot, menusel, menuhotsel, menuinactive\n" " Popup menus: pmenunormal, pmenusel, pmenutitle\n" -" Editor: editnormal, editbold, editmarked, editwhitespace,\n" +" Editor: editnormal, editbold, editmarked, editwhitespace, " +"editnonprintable,\n" " editlinestate, editbg, editframe, editframeactive\n" " editframedrag\n" " Viewer: viewnormal,viewbold, viewunderline, viewselected\n" " Help: helpnormal, helpitalic, helpbold, helplink, helpslink\n" msgstr "" -"--colors KEYWORD={FORE},{BACK},{ATTR}:KEYWORD2=...\n" -"\n" -"{FORE}, {BACK} és {ATTR} elhagyható, akkor az alapértelmezett lesz " -"használva\n" -" Keywords:\n" -" Általános: errors, disabled, reverse, gauge, header\n" -" input, inputmark, inputunchanged, commandlinemark\n" -" bbarhotkey, bbarbutton, statusbar\n" -" Fájl megjelenítés: normal, selected, marked, markselect\n" -" Dialógus dobozok: dnormal, dfocus, dhotnormal, dhotfocus, errdhotnormal,\n" -" errdhotfocus\n" -" Menük: menunormal, menuhot, menusel, menuhotsel, menuinactive\n" -" Popup menük: pmenunormal, pmenusel, pmenutitle\n" -" Szerkesztő: editnormal, editbold, editmarked, editwhitespace,\n" -" editlinestate, editbg, editframe, editframeactive\n" -" editframedrag\n" -" Megjelenítő: viewnormal,viewbold, viewunderline, viewselected\n" -" Súgó: helpnormal, helpitalic, helpbold, helplink, helpslink\n" #. TRANSLATORS: don't translate color names and attributes msgid "" @@ -1612,7 +1596,7 @@ msgstr "" "Felhasználóbarát szövegszerkesztő\n" "a Midnight Commander-hez készítve" -msgid "Copyright (C) 1996-2023 the Free Software Foundation" +msgid "Copyright (C) 1996-2024 the Free Software Foundation" msgstr "" msgid "About" @@ -4112,66 +4096,24 @@ msgid "" "%s" msgstr "" -#, c-format -msgid "Warning: cannot open %s directory\n" -msgstr "Figyelem: A(z) %s könyvtár nem megnyitható\n" - -#, c-format -msgid "fish: Disconnecting from %s" -msgstr "Fish: lekapcsolódás a kiszolgálóról: %s" - -msgid "fish: Waiting for initial line..." -msgstr "Fish: várakozás kezdősorra..." - -msgid "Sorry, we cannot do password authenticated connections for now." -msgstr "Jelszavas azonosítás egyelőre nem lehetséges." - -#, c-format -msgid "fish: Password is required for %s" -msgstr "Fish: Jelszó kell %s azonosításához" - -msgid "fish: Sending password..." -msgstr "Fish: jelszó küldése..." - -msgid "fish: Sending initial line..." -msgstr "Fish: kezdősor küldése..." - -msgid "fish: Handshaking version..." -msgstr "Fish: verzióegyeztetés..." - -msgid "fish: Getting host info..." -msgstr "Fish: Gép info lekérdezés..." - -#, c-format -msgid "fish: Reading directory %s..." -msgstr "Fish: könyvtár olvasása: %s..." +msgid "" +"EXTFS virtual file system:\n" +"wrong file name" +msgstr "" -#, c-format -msgid "%s: done." -msgstr "%s: kész" +msgid "" +"EXTFS virtual file system:\n" +"wrong archive name" +msgstr "" -#, c-format -msgid "%s: failure" -msgstr "%s: hiba" +msgid "" +"EXTFS virtual file system:\n" +"cannot build command" +msgstr "" #, c-format -msgid "fish: store %s: sending command..." -msgstr "Fish: \"%s\" tárolása: parancs küldése..." - -msgid "fish: Local read failed, sending zeros" -msgstr "Fish: nem sikerült a helyi olvasás; nullák küldése..." - -msgid "fish: storing file" -msgstr "fish: fájl tárolása" - -msgid "Aborting transfer..." -msgstr "Átvitel megszakítása..." - -msgid "Error reported after abort." -msgstr "Megszakítás után hibajelzés érkezett." - -msgid "Aborted transfer would be successful." -msgstr "Átvitel megszakítva; hibajelzés nem érkezett." +msgid "Warning: cannot open %s directory\n" +msgstr "Figyelem: A(z) %s könyvtár nem megnyitható\n" #, c-format msgid "ftpfs: Disconnecting from %s" @@ -4283,6 +4225,14 @@ msgstr "(először könyvtárváltás végzendő)" msgid "ftpfs: failed; nowhere to fallback to" msgstr "Ftpfs: hiba; minden lehetőség kimerítve" +#, c-format +msgid "%s: failure" +msgstr "%s: hiba" + +#, c-format +msgid "%s: done." +msgstr "%s: kész" + msgid "ftpfs: storing file" msgstr "ftpfs: fájl tárolása" @@ -4422,6 +4372,52 @@ msgstr "sftp: %s listázása... (megszakítás: Ctrl-G)" msgid "sftp: Listing done." msgstr "sftp: A listázás kész." +#, c-format +msgid "shell: Disconnecting from %s" +msgstr "" + +msgid "shell: Waiting for initial line..." +msgstr "" + +msgid "Sorry, we cannot do password authenticated connections for now." +msgstr "Jelszavas azonosítás egyelőre nem lehetséges." + +#, c-format +msgid "shell: Password is required for %s" +msgstr "" + +msgid "shell: Sending password..." +msgstr "" + +msgid "shell: Sending initial line..." +msgstr "" + +msgid "shell: Getting host info..." +msgstr "" + +#, c-format +msgid "shell: Reading directory %s..." +msgstr "" + +#, c-format +msgid "shell: store %s: sending command..." +msgstr "" + +msgid "shell: Local read failed, sending zeros" +msgstr "" + +msgid "shell: storing file" +msgstr "" + +msgid "Aborting transfer..." +msgstr "Átvitel megszakítása..." + +msgid "Error reported after abort." +msgstr "Megszakítás után hibajelzés érkezett." + +msgid "Aborted transfer would be successful." +msgstr "Átvitel megszakítva; hibajelzés nem érkezett." + msgid "Inconsistent tar archive" msgstr "Inkonzisztens tar-archívum." diff --git a/mcsrc/po/ia.po b/mcsrc/po/ia.po index e32d70be..806e426a 100644 --- a/mcsrc/po/ia.po +++ b/mcsrc/po/ia.po @@ -10,7 +10,7 @@ msgid "" msgstr "" "Project-Id-Version: Midnight Commander\n" "Report-Msgid-Bugs-To: https://www.midnight-commander.org/\n" -"POT-Creation-Date: 2023-08-06 15:50+0200\n" +"POT-Creation-Date: 2024-01-20 20:51+0100\n" "PO-Revision-Date: 2010-12-29 10:19+0000\n" "Last-Translator: Martijn Dekker , 2012,2017\n" "Language-Team: Interlingua (http://app.transifex.com/mc/mc/language/ia/)\n" @@ -715,7 +715,8 @@ msgid "" " errdhotfocus\n" " Menus: menunormal, menuhot, menusel, menuhotsel, menuinactive\n" " Popup menus: pmenunormal, pmenusel, pmenutitle\n" -" Editor: editnormal, editbold, editmarked, editwhitespace,\n" +" Editor: editnormal, editbold, editmarked, editwhitespace, " +"editnonprintable,\n" " editlinestate, editbg, editframe, editframeactive\n" " editframedrag\n" " Viewer: viewnormal,viewbold, viewunderline, viewselected\n" @@ -1560,7 +1561,7 @@ msgid "" "written for the Midnight Commander." msgstr "" -msgid "Copyright (C) 1996-2023 the Free Software Foundation" +msgid "Copyright (C) 1996-2024 the Free Software Foundation" msgstr "" msgid "About" @@ -3933,68 +3934,24 @@ msgid "" "%s" msgstr "" -#, c-format -msgid "Warning: cannot open %s directory\n" -msgstr "Attention: impossibile aperir directorio %s\n" - -#, c-format -msgid "fish: Disconnecting from %s" -msgstr "fish: Disconnecte de %s" - -msgid "fish: Waiting for initial line..." -msgstr "fish: Attende le linea initial..." - -msgid "Sorry, we cannot do password authenticated connections for now." +msgid "" +"EXTFS virtual file system:\n" +"wrong file name" msgstr "" -"Pro le momento il es impossibile establir connexiones authenticate con " -"contrasigno." -#, c-format -msgid "fish: Password is required for %s" -msgstr "fish: Un contrasigno es necessari pro %s" - -msgid "fish: Sending password..." -msgstr "fish: Invia contrasigno..." - -msgid "fish: Sending initial line..." -msgstr "fish: Invia linea initial..." - -msgid "fish: Handshaking version..." -msgstr "fish: Negotia version..." - -msgid "fish: Getting host info..." -msgstr "fish: Obtene info sur host..." - -#, c-format -msgid "fish: Reading directory %s..." -msgstr "fish: Lege directorio %s..." - -#, c-format -msgid "%s: done." -msgstr "%s: finite." +msgid "" +"EXTFS virtual file system:\n" +"wrong archive name" +msgstr "" -#, c-format -msgid "%s: failure" -msgstr "%s: fallimento" +msgid "" +"EXTFS virtual file system:\n" +"cannot build command" +msgstr "" #, c-format -msgid "fish: store %s: sending command..." -msgstr "fish: immagazina %s: invia commando..." - -msgid "fish: Local read failed, sending zeros" -msgstr "fish: Lectura local fallite, invia zeros" - -msgid "fish: storing file" -msgstr "fish: immagazina file" - -msgid "Aborting transfer..." -msgstr "Aborta transferentia..." - -msgid "Error reported after abort." -msgstr "Error reportate post abortamento." - -msgid "Aborted transfer would be successful." -msgstr "Le transferentia abortate haberea succedite." +msgid "Warning: cannot open %s directory\n" +msgstr "Attention: impossibile aperir directorio %s\n" #, c-format msgid "ftpfs: Disconnecting from %s" @@ -4106,6 +4063,14 @@ msgstr "(chdir primo)" msgid "ftpfs: failed; nowhere to fallback to" msgstr "ftpfs: fallite; nulle parte a que revenir" +#, c-format +msgid "%s: failure" +msgstr "%s: fallimento" + +#, c-format +msgid "%s: done." +msgstr "%s: finite." + msgid "ftpfs: storing file" msgstr "ftpfs: immagazina file" @@ -4245,6 +4210,54 @@ msgstr "" msgid "sftp: Listing done." msgstr "" +#, c-format +msgid "shell: Disconnecting from %s" +msgstr "" + +msgid "shell: Waiting for initial line..." +msgstr "" + +msgid "Sorry, we cannot do password authenticated connections for now." +msgstr "" +"Pro le momento il es impossibile establir connexiones authenticate con " +"contrasigno." + +#, c-format +msgid "shell: Password is required for %s" +msgstr "" + +msgid "shell: Sending password..." +msgstr "" + +msgid "shell: Sending initial line..." +msgstr "" + +msgid "shell: Getting host info..." +msgstr "" + +#, c-format +msgid "shell: Reading directory %s..." +msgstr "" + +#, c-format +msgid "shell: store %s: sending command..." +msgstr "" + +msgid "shell: Local read failed, sending zeros" +msgstr "" + +msgid "shell: storing file" +msgstr "" + +msgid "Aborting transfer..." +msgstr "Aborta transferentia..." + +msgid "Error reported after abort." +msgstr "Error reportate post abortamento." + +msgid "Aborted transfer would be successful." +msgstr "Le transferentia abortate haberea succedite." + msgid "Inconsistent tar archive" msgstr "Archivo tar inconsistente" diff --git a/mcsrc/po/id.po b/mcsrc/po/id.po index 12f2cddf..0e9a14ea 100644 --- a/mcsrc/po/id.po +++ b/mcsrc/po/id.po @@ -10,7 +10,7 @@ msgid "" msgstr "" "Project-Id-Version: Midnight Commander\n" "Report-Msgid-Bugs-To: https://www.midnight-commander.org/\n" -"POT-Creation-Date: 2023-08-06 15:50+0200\n" +"POT-Creation-Date: 2024-01-20 20:51+0100\n" "PO-Revision-Date: 2010-12-29 10:19+0000\n" "Last-Translator: Ferriandy Chianiago , 2015\n" "Language-Team: Indonesian (http://app.transifex.com/mc/mc/language/id/)\n" @@ -723,7 +723,8 @@ msgid "" " errdhotfocus\n" " Menus: menunormal, menuhot, menusel, menuhotsel, menuinactive\n" " Popup menus: pmenunormal, pmenusel, pmenutitle\n" -" Editor: editnormal, editbold, editmarked, editwhitespace,\n" +" Editor: editnormal, editbold, editmarked, editwhitespace, " +"editnonprintable,\n" " editlinestate, editbg, editframe, editframeactive\n" " editframedrag\n" " Viewer: viewnormal,viewbold, viewunderline, viewselected\n" @@ -1577,7 +1578,7 @@ msgid "" "written for the Midnight Commander." msgstr "" -msgid "Copyright (C) 1996-2023 the Free Software Foundation" +msgid "Copyright (C) 1996-2024 the Free Software Foundation" msgstr "" msgid "About" @@ -3938,65 +3939,23 @@ msgid "" "%s" msgstr "" -#, c-format -msgid "Warning: cannot open %s directory\n" -msgstr "" - -#, c-format -msgid "fish: Disconnecting from %s" -msgstr "" - -msgid "fish: Waiting for initial line..." -msgstr "" - -msgid "Sorry, we cannot do password authenticated connections for now." -msgstr "" - -#, c-format -msgid "fish: Password is required for %s" -msgstr "" - -msgid "fish: Sending password..." -msgstr "" - -msgid "fish: Sending initial line..." -msgstr "" - -msgid "fish: Handshaking version..." -msgstr "" - -msgid "fish: Getting host info..." -msgstr "" - -#, c-format -msgid "fish: Reading directory %s..." +msgid "" +"EXTFS virtual file system:\n" +"wrong file name" msgstr "" -#, c-format -msgid "%s: done." +msgid "" +"EXTFS virtual file system:\n" +"wrong archive name" msgstr "" -#, c-format -msgid "%s: failure" +msgid "" +"EXTFS virtual file system:\n" +"cannot build command" msgstr "" #, c-format -msgid "fish: store %s: sending command..." -msgstr "" - -msgid "fish: Local read failed, sending zeros" -msgstr "" - -msgid "fish: storing file" -msgstr "" - -msgid "Aborting transfer..." -msgstr "" - -msgid "Error reported after abort." -msgstr "" - -msgid "Aborted transfer would be successful." +msgid "Warning: cannot open %s directory\n" msgstr "" #, c-format @@ -4109,6 +4068,14 @@ msgstr "" msgid "ftpfs: failed; nowhere to fallback to" msgstr "" +#, c-format +msgid "%s: failure" +msgstr "" + +#, c-format +msgid "%s: done." +msgstr "" + msgid "ftpfs: storing file" msgstr "" @@ -4242,6 +4209,52 @@ msgstr "" msgid "sftp: Listing done." msgstr "" +#, c-format +msgid "shell: Disconnecting from %s" +msgstr "" + +msgid "shell: Waiting for initial line..." +msgstr "" + +msgid "Sorry, we cannot do password authenticated connections for now." +msgstr "" + +#, c-format +msgid "shell: Password is required for %s" +msgstr "" + +msgid "shell: Sending password..." +msgstr "" + +msgid "shell: Sending initial line..." +msgstr "" + +msgid "shell: Getting host info..." +msgstr "" + +#, c-format +msgid "shell: Reading directory %s..." +msgstr "" + +#, c-format +msgid "shell: store %s: sending command..." +msgstr "" + +msgid "shell: Local read failed, sending zeros" +msgstr "" + +msgid "shell: storing file" +msgstr "" + +msgid "Aborting transfer..." +msgstr "" + +msgid "Error reported after abort." +msgstr "" + +msgid "Aborted transfer would be successful." +msgstr "" + msgid "Inconsistent tar archive" msgstr "" diff --git a/mcsrc/po/ie.po b/mcsrc/po/ie.po index 8bc2c618..471851e6 100644 --- a/mcsrc/po/ie.po +++ b/mcsrc/po/ie.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Midnight Commander\n" "Report-Msgid-Bugs-To: https://www.midnight-commander.org/\n" -"POT-Creation-Date: 2023-08-06 15:50+0200\n" +"POT-Creation-Date: 2024-01-20 20:51+0100\n" "PO-Revision-Date: 2010-12-29 10:19+0000\n" "Last-Translator: FULL NAME \n" "Language-Team: Interlingue (http://app.transifex.com/mc/mc/language/ie/)\n" @@ -703,7 +703,8 @@ msgid "" " errdhotfocus\n" " Menus: menunormal, menuhot, menusel, menuhotsel, menuinactive\n" " Popup menus: pmenunormal, pmenusel, pmenutitle\n" -" Editor: editnormal, editbold, editmarked, editwhitespace,\n" +" Editor: editnormal, editbold, editmarked, editwhitespace, " +"editnonprintable,\n" " editlinestate, editbg, editframe, editframeactive\n" " editframedrag\n" " Viewer: viewnormal,viewbold, viewunderline, viewselected\n" @@ -1539,7 +1540,7 @@ msgid "" "written for the Midnight Commander." msgstr "" -msgid "Copyright (C) 1996-2023 the Free Software Foundation" +msgid "Copyright (C) 1996-2024 the Free Software Foundation" msgstr "" msgid "About" @@ -3906,65 +3907,23 @@ msgid "" "%s" msgstr "" -#, c-format -msgid "Warning: cannot open %s directory\n" -msgstr "" - -#, c-format -msgid "fish: Disconnecting from %s" -msgstr "" - -msgid "fish: Waiting for initial line..." -msgstr "" - -msgid "Sorry, we cannot do password authenticated connections for now." -msgstr "" - -#, c-format -msgid "fish: Password is required for %s" -msgstr "fish: Un contrasigne es besonat por %s" - -msgid "fish: Sending password..." -msgstr "" - -msgid "fish: Sending initial line..." -msgstr "" - -msgid "fish: Handshaking version..." +msgid "" +"EXTFS virtual file system:\n" +"wrong file name" msgstr "" -msgid "fish: Getting host info..." +msgid "" +"EXTFS virtual file system:\n" +"wrong archive name" msgstr "" -#, c-format -msgid "fish: Reading directory %s..." +msgid "" +"EXTFS virtual file system:\n" +"cannot build command" msgstr "" #, c-format -msgid "%s: done." -msgstr "%s: finit." - -#, c-format -msgid "%s: failure" -msgstr "%s: ne successat" - -#, c-format -msgid "fish: store %s: sending command..." -msgstr "" - -msgid "fish: Local read failed, sending zeros" -msgstr "" - -msgid "fish: storing file" -msgstr "" - -msgid "Aborting transfer..." -msgstr "" - -msgid "Error reported after abort." -msgstr "" - -msgid "Aborted transfer would be successful." +msgid "Warning: cannot open %s directory\n" msgstr "" #, c-format @@ -4077,6 +4036,14 @@ msgstr "" msgid "ftpfs: failed; nowhere to fallback to" msgstr "" +#, c-format +msgid "%s: failure" +msgstr "%s: ne successat" + +#, c-format +msgid "%s: done." +msgstr "%s: finit." + msgid "ftpfs: storing file" msgstr "" @@ -4210,6 +4177,52 @@ msgstr "" msgid "sftp: Listing done." msgstr "" +#, c-format +msgid "shell: Disconnecting from %s" +msgstr "" + +msgid "shell: Waiting for initial line..." +msgstr "" + +msgid "Sorry, we cannot do password authenticated connections for now." +msgstr "" + +#, c-format +msgid "shell: Password is required for %s" +msgstr "" + +msgid "shell: Sending password..." +msgstr "" + +msgid "shell: Sending initial line..." +msgstr "" + +msgid "shell: Getting host info..." +msgstr "" + +#, c-format +msgid "shell: Reading directory %s..." +msgstr "" + +#, c-format +msgid "shell: store %s: sending command..." +msgstr "" + +msgid "shell: Local read failed, sending zeros" +msgstr "" + +msgid "shell: storing file" +msgstr "" + +msgid "Aborting transfer..." +msgstr "" + +msgid "Error reported after abort." +msgstr "" + +msgid "Aborted transfer would be successful." +msgstr "" + msgid "Inconsistent tar archive" msgstr "" diff --git a/mcsrc/po/it.po b/mcsrc/po/it.po index 85da5e33..b7a88c14 100644 --- a/mcsrc/po/it.po +++ b/mcsrc/po/it.po @@ -14,7 +14,7 @@ msgid "" msgstr "" "Project-Id-Version: Midnight Commander\n" "Report-Msgid-Bugs-To: https://www.midnight-commander.org/\n" -"POT-Creation-Date: 2023-08-06 15:50+0200\n" +"POT-Creation-Date: 2024-01-20 20:51+0100\n" "PO-Revision-Date: 2010-12-29 10:19+0000\n" "Last-Translator: Marco Ciampa , 2023\n" "Language-Team: Italian (http://app.transifex.com/mc/mc/language/it/)\n" @@ -741,31 +741,13 @@ msgid "" " errdhotfocus\n" " Menus: menunormal, menuhot, menusel, menuhotsel, menuinactive\n" " Popup menus: pmenunormal, pmenusel, pmenutitle\n" -" Editor: editnormal, editbold, editmarked, editwhitespace,\n" +" Editor: editnormal, editbold, editmarked, editwhitespace, " +"editnonprintable,\n" " editlinestate, editbg, editframe, editframeactive\n" " editframedrag\n" " Viewer: viewnormal,viewbold, viewunderline, viewselected\n" " Help: helpnormal, helpitalic, helpbold, helplink, helpslink\n" msgstr "" -"--colors PAROLACHIAVE={PRIMOP},{SFONDO},{ATTR}:PAROLACHIAVE2=...\n" -"\n" -"{PRIMOP}, {SFONDO} e {ATTR} si possono omettere, in tal caso mc usa\n" -"valore il predefinito\n" -"\n" -" Parole chiave:\n" -" Globali: errors, disabled, reverse, gauge, header\n" -" input, inputmark, inputunchanged, commandlinemark\n" -" bbarhotkey, bbarbutton, statusbar\n" -" Fines. file: normal, selected, marked, markselect\n" -" Fin. dialog.: dnormal, dfocus, dhotnormal, dhotfocus, errdhotnormal,\n" -" errdhotfocus\n" -" Menu: menunormal, menuhot, menusel, menuhotsel, menuinactive\n" -" Menu scomp.: pmenunormal, pmenusel, pmenutitle\n" -" Editor: editnormal, editbold, editmarked, editwhitespace,\n" -" editlinestate, editbg, editframe, editframeactive\n" -" editframedrag\n" -" Visualiz.: viewnormal, viewbold, viewunderline, viewselected\n" -" Aiuto: helpnormal, helpitalic, helpbold, helplink, helpslink\n" #. TRANSLATORS: don't translate color names and attributes msgid "" @@ -1632,8 +1614,8 @@ msgstr "" "Un semplice editor di testi\n" "scritto per il Midnight Commander." -msgid "Copyright (C) 1996-2023 the Free Software Foundation" -msgstr "Copyright (C) 1996-2023 the Free Software Foundation" +msgid "Copyright (C) 1996-2024 the Free Software Foundation" +msgstr "" msgid "About" msgstr "Informazioni" @@ -4159,66 +4141,24 @@ msgstr "" "File system virtuale EXTFS:\n" "%s" -#, c-format -msgid "Warning: cannot open %s directory\n" -msgstr "Attenzione: impossibile aprire la directory %s\n" - -#, c-format -msgid "fish: Disconnecting from %s" -msgstr "fish: disconnessione da %s" - -msgid "fish: Waiting for initial line..." -msgstr "fish: attesa riga iniziale..." - -msgid "Sorry, we cannot do password authenticated connections for now." -msgstr "Spiacente, non posso fare connessioni autenticate per adesso." - -#, c-format -msgid "fish: Password is required for %s" -msgstr "fish: password richiesta per %s" - -msgid "fish: Sending password..." -msgstr "fish: spedizione password..." - -msgid "fish: Sending initial line..." -msgstr "fish: spedizione riga iniziale..." - -msgid "fish: Handshaking version..." -msgstr "fish: versione handshaking..." - -msgid "fish: Getting host info..." -msgstr "fish: ricezione info host..." - -#, c-format -msgid "fish: Reading directory %s..." -msgstr "fish: lettura directory FTP %s..." +msgid "" +"EXTFS virtual file system:\n" +"wrong file name" +msgstr "" -#, c-format -msgid "%s: done." -msgstr "%s: fatto." +msgid "" +"EXTFS virtual file system:\n" +"wrong archive name" +msgstr "" -#, c-format -msgid "%s: failure" -msgstr "%s: errore" +msgid "" +"EXTFS virtual file system:\n" +"cannot build command" +msgstr "" #, c-format -msgid "fish: store %s: sending command..." -msgstr "fish: memorizza %s: spedizione comando..." - -msgid "fish: Local read failed, sending zeros" -msgstr "fish: lettura locale fallita, spedizione zeri" - -msgid "fish: storing file" -msgstr "fish: memorizzazione file" - -msgid "Aborting transfer..." -msgstr "Interruzione trasferimento..." - -msgid "Error reported after abort." -msgstr "Errori dopo l'interruzione." - -msgid "Aborted transfer would be successful." -msgstr "L'interruzione trasferimento sarebbe riuscita." +msgid "Warning: cannot open %s directory\n" +msgstr "Attenzione: impossibile aprire la directory %s\n" #, c-format msgid "ftpfs: Disconnecting from %s" @@ -4330,6 +4270,14 @@ msgstr "(antepone chdir)" msgid "ftpfs: failed; nowhere to fallback to" msgstr "ftpfs: fallito; non so dove rileggere" +#, c-format +msgid "%s: failure" +msgstr "%s: errore" + +#, c-format +msgid "%s: done." +msgstr "%s: fatto." + msgid "ftpfs: storing file" msgstr "ftpfs: memorizzazione file" @@ -4485,6 +4433,52 @@ msgstr "sftp: (Ctrl-G break) listato... %s" msgid "sftp: Listing done." msgstr "sftp: listato eseguito." +#, c-format +msgid "shell: Disconnecting from %s" +msgstr "" + +msgid "shell: Waiting for initial line..." +msgstr "" + +msgid "Sorry, we cannot do password authenticated connections for now." +msgstr "Spiacente, non posso fare connessioni autenticate per adesso." + +#, c-format +msgid "shell: Password is required for %s" +msgstr "" + +msgid "shell: Sending password..." +msgstr "" + +msgid "shell: Sending initial line..." +msgstr "" + +msgid "shell: Getting host info..." +msgstr "" + +#, c-format +msgid "shell: Reading directory %s..." +msgstr "" + +#, c-format +msgid "shell: store %s: sending command..." +msgstr "" + +msgid "shell: Local read failed, sending zeros" +msgstr "" + +msgid "shell: storing file" +msgstr "" + +msgid "Aborting transfer..." +msgstr "Interruzione trasferimento..." + +msgid "Error reported after abort." +msgstr "Errori dopo l'interruzione." + +msgid "Aborted transfer would be successful." +msgstr "L'interruzione trasferimento sarebbe riuscita." + msgid "Inconsistent tar archive" msgstr "Archivio tar inconsistente" diff --git a/mcsrc/po/ja.po b/mcsrc/po/ja.po index 8225de55..60f58e59 100644 --- a/mcsrc/po/ja.po +++ b/mcsrc/po/ja.po @@ -13,7 +13,7 @@ msgid "" msgstr "" "Project-Id-Version: Midnight Commander\n" "Report-Msgid-Bugs-To: https://www.midnight-commander.org/\n" -"POT-Creation-Date: 2023-08-06 15:50+0200\n" +"POT-Creation-Date: 2024-01-20 20:51+0100\n" "PO-Revision-Date: 2010-12-29 10:19+0000\n" "Last-Translator: Takuro Onoue , 2021\n" "Language-Team: Japanese (http://app.transifex.com/mc/mc/language/ja/)\n" @@ -718,7 +718,8 @@ msgid "" " errdhotfocus\n" " Menus: menunormal, menuhot, menusel, menuhotsel, menuinactive\n" " Popup menus: pmenunormal, pmenusel, pmenutitle\n" -" Editor: editnormal, editbold, editmarked, editwhitespace,\n" +" Editor: editnormal, editbold, editmarked, editwhitespace, " +"editnonprintable,\n" " editlinestate, editbg, editframe, editframeactive\n" " editframedrag\n" " Viewer: viewnormal,viewbold, viewunderline, viewselected\n" @@ -1554,7 +1555,7 @@ msgid "" "written for the Midnight Commander." msgstr "" -msgid "Copyright (C) 1996-2023 the Free Software Foundation" +msgid "Copyright (C) 1996-2024 the Free Software Foundation" msgstr "" msgid "About" @@ -3942,66 +3943,24 @@ msgid "" "%s" msgstr "" -#, c-format -msgid "Warning: cannot open %s directory\n" -msgstr "警告: ディレクトリ %s を閲覧できません\n" - -#, c-format -msgid "fish: Disconnecting from %s" -msgstr "fish: %s から切断しています" - -msgid "fish: Waiting for initial line..." -msgstr "fish: 最初の行を待っています..." - -msgid "Sorry, we cannot do password authenticated connections for now." -msgstr "すいませんが,今のところパスワードを証明することが出来ません" - -#, c-format -msgid "fish: Password is required for %s" +msgid "" +"EXTFS virtual file system:\n" +"wrong file name" msgstr "" -msgid "fish: Sending password..." -msgstr "fish: パスワード送信中..." - -msgid "fish: Sending initial line..." -msgstr "fish: 最初の行を送信..." - -msgid "fish: Handshaking version..." -msgstr "fish: バージョンのハンドシェイク..." - -msgid "fish: Getting host info..." +msgid "" +"EXTFS virtual file system:\n" +"wrong archive name" msgstr "" -#, c-format -msgid "fish: Reading directory %s..." -msgstr "fish: ディレクトリ%sを読み込み中... " - -#, c-format -msgid "%s: done." -msgstr "%s: 完了" - -#, c-format -msgid "%s: failure" -msgstr "%s: 失敗" - -#, c-format -msgid "fish: store %s: sending command..." -msgstr "fish: store %s: コマンドを送信中..." - -msgid "fish: Local read failed, sending zeros" -msgstr "fish: 局部読み込みに失敗しました。zeroを送信します" - -msgid "fish: storing file" +msgid "" +"EXTFS virtual file system:\n" +"cannot build command" msgstr "" -msgid "Aborting transfer..." -msgstr "転送を中断します..." - -msgid "Error reported after abort." -msgstr "中断後にエラーが報告されました" - -msgid "Aborted transfer would be successful." -msgstr "転送中断に成功しました" +#, c-format +msgid "Warning: cannot open %s directory\n" +msgstr "警告: ディレクトリ %s を閲覧できません\n" #, c-format msgid "ftpfs: Disconnecting from %s" @@ -4113,6 +4072,14 @@ msgstr "(初めに chdir)" msgid "ftpfs: failed; nowhere to fallback to" msgstr "ftpfs: 失敗しました。フォールバックできません" +#, c-format +msgid "%s: failure" +msgstr "%s: 失敗" + +#, c-format +msgid "%s: done." +msgstr "%s: 完了" + msgid "ftpfs: storing file" msgstr "" @@ -4250,6 +4217,52 @@ msgstr "" msgid "sftp: Listing done." msgstr "" +#, c-format +msgid "shell: Disconnecting from %s" +msgstr "" + +msgid "shell: Waiting for initial line..." +msgstr "" + +msgid "Sorry, we cannot do password authenticated connections for now." +msgstr "すいませんが,今のところパスワードを証明することが出来ません" + +#, c-format +msgid "shell: Password is required for %s" +msgstr "" + +msgid "shell: Sending password..." +msgstr "" + +msgid "shell: Sending initial line..." +msgstr "" + +msgid "shell: Getting host info..." +msgstr "" + +#, c-format +msgid "shell: Reading directory %s..." +msgstr "" + +#, c-format +msgid "shell: store %s: sending command..." +msgstr "" + +msgid "shell: Local read failed, sending zeros" +msgstr "" + +msgid "shell: storing file" +msgstr "" + +msgid "Aborting transfer..." +msgstr "転送を中断します..." + +msgid "Error reported after abort." +msgstr "中断後にエラーが報告されました" + +msgid "Aborted transfer would be successful." +msgstr "転送中断に成功しました" + msgid "Inconsistent tar archive" msgstr "tar アーカイブに不整合" diff --git a/mcsrc/po/ka.po b/mcsrc/po/ka.po index 5ccbf6c8..1ddf0d92 100644 --- a/mcsrc/po/ka.po +++ b/mcsrc/po/ka.po @@ -11,7 +11,7 @@ msgid "" msgstr "" "Project-Id-Version: Midnight Commander\n" "Report-Msgid-Bugs-To: https://www.midnight-commander.org/\n" -"POT-Creation-Date: 2023-08-06 15:50+0200\n" +"POT-Creation-Date: 2024-01-20 20:51+0100\n" "PO-Revision-Date: 2010-12-29 10:19+0000\n" "Last-Translator: Temuri Doghonadze , 2022\n" "Language-Team: Georgian (http://app.transifex.com/mc/mc/language/ka/)\n" @@ -711,31 +711,13 @@ msgid "" " errdhotfocus\n" " Menus: menunormal, menuhot, menusel, menuhotsel, menuinactive\n" " Popup menus: pmenunormal, pmenusel, pmenutitle\n" -" Editor: editnormal, editbold, editmarked, editwhitespace,\n" +" Editor: editnormal, editbold, editmarked, editwhitespace, " +"editnonprintable,\n" " editlinestate, editbg, editframe, editframeactive\n" " editframedrag\n" " Viewer: viewnormal,viewbold, viewunderline, viewselected\n" " Help: helpnormal, helpitalic, helpbold, helplink, helpslink\n" msgstr "" -"--colors KEYWORD={FORE},{BACK},{ATTR}:KEYWORD2=...\n" -"\n" -"{FORE}, {BACK} და {ATTR} შეგიძლიათ გამოტოვოთ.გამოყენებული იქნება " -"ნაგულისხმები მნიშვნელობები\n" -"\n" -" საკვანძო სიტყვები:\n" -" გლობალური: errors, disabled, reverse, gauge, header\n" -" input, inputmark, inputunchanged, commandlinemark\n" -" bbarhotkey, bbarbutton, statusbar\n" -" ფაილის ჩვენება: normal, selected, marked, markselect\n" -" ფანჯრები: dnormal, dfocus, dhotnormal, dhotfocus, errdhotnormal,\n" -" errdhotfocus\n" -" მენიუები: menunormal, menuhot, menusel, menuhotsel, menuinactive\n" -" მხტუნარა მენიუები: pmenunormal, pmenusel, pmenutitle\n" -" რედაქტორი: editnormal, editbold, editmarked, editwhitespace,\n" -" editlinestate, editbg, editframe, editframeactive\n" -" editframedrag\n" -" მნახველი: viewnormal,viewbold, viewunderline, viewselected\n" -" დახმარება: helpnormal, helpitalic, helpbold, helplink, helpslink\n" #. TRANSLATORS: don't translate color names and attributes msgid "" @@ -1566,7 +1548,7 @@ msgid "" "written for the Midnight Commander." msgstr "" -msgid "Copyright (C) 1996-2023 the Free Software Foundation" +msgid "Copyright (C) 1996-2024 the Free Software Foundation" msgstr "" msgid "About" @@ -3936,65 +3918,23 @@ msgid "" "%s" msgstr "" -#, c-format -msgid "Warning: cannot open %s directory\n" -msgstr "" - -#, c-format -msgid "fish: Disconnecting from %s" -msgstr "" - -msgid "fish: Waiting for initial line..." -msgstr "" - -msgid "Sorry, we cannot do password authenticated connections for now." -msgstr "" - -#, c-format -msgid "fish: Password is required for %s" +msgid "" +"EXTFS virtual file system:\n" +"wrong file name" msgstr "" -msgid "fish: Sending password..." -msgstr "fish: პაროლის გაგზავნა..." - -msgid "fish: Sending initial line..." +msgid "" +"EXTFS virtual file system:\n" +"wrong archive name" msgstr "" -msgid "fish: Handshaking version..." +msgid "" +"EXTFS virtual file system:\n" +"cannot build command" msgstr "" -msgid "fish: Getting host info..." -msgstr "fish: ჰოსტის ინფორმაციის მიღება..." - -#, c-format -msgid "fish: Reading directory %s..." -msgstr "fish: იკითხება %s საქაღალდე..." - -#, c-format -msgid "%s: done." -msgstr "%s: დასრულებულია." - -#, c-format -msgid "%s: failure" -msgstr "%s: შეცდომა" - #, c-format -msgid "fish: store %s: sending command..." -msgstr "fish: საცავი %s: ბრძანების გაგზავნა..." - -msgid "fish: Local read failed, sending zeros" -msgstr "" - -msgid "fish: storing file" -msgstr "fish: ფაილის ჩაწერა" - -msgid "Aborting transfer..." -msgstr "" - -msgid "Error reported after abort." -msgstr "" - -msgid "Aborted transfer would be successful." +msgid "Warning: cannot open %s directory\n" msgstr "" #, c-format @@ -4107,6 +4047,14 @@ msgstr "(ჯერ chdir)" msgid "ftpfs: failed; nowhere to fallback to" msgstr "" +#, c-format +msgid "%s: failure" +msgstr "%s: შეცდომა" + +#, c-format +msgid "%s: done." +msgstr "%s: დასრულებულია." + msgid "ftpfs: storing file" msgstr "ftpfs: ფაილის შენახვა" @@ -4240,6 +4188,52 @@ msgstr "" msgid "sftp: Listing done." msgstr "" +#, c-format +msgid "shell: Disconnecting from %s" +msgstr "" + +msgid "shell: Waiting for initial line..." +msgstr "" + +msgid "Sorry, we cannot do password authenticated connections for now." +msgstr "" + +#, c-format +msgid "shell: Password is required for %s" +msgstr "" + +msgid "shell: Sending password..." +msgstr "" + +msgid "shell: Sending initial line..." +msgstr "" + +msgid "shell: Getting host info..." +msgstr "" + +#, c-format +msgid "shell: Reading directory %s..." +msgstr "" + +#, c-format +msgid "shell: store %s: sending command..." +msgstr "" + +msgid "shell: Local read failed, sending zeros" +msgstr "" + +msgid "shell: storing file" +msgstr "" + +msgid "Aborting transfer..." +msgstr "" + +msgid "Error reported after abort." +msgstr "" + +msgid "Aborted transfer would be successful." +msgstr "" + msgid "Inconsistent tar archive" msgstr "" diff --git a/mcsrc/po/kk.po b/mcsrc/po/kk.po index 1717785a..136bcc94 100644 --- a/mcsrc/po/kk.po +++ b/mcsrc/po/kk.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Midnight Commander\n" "Report-Msgid-Bugs-To: https://www.midnight-commander.org/\n" -"POT-Creation-Date: 2023-08-06 15:50+0200\n" +"POT-Creation-Date: 2024-01-20 20:51+0100\n" "PO-Revision-Date: 2010-12-29 10:19+0000\n" "Last-Translator: Aidos Kakimzhanov , 2016\n" "Language-Team: Kazakh (http://app.transifex.com/mc/mc/language/kk/)\n" @@ -704,7 +704,8 @@ msgid "" " errdhotfocus\n" " Menus: menunormal, menuhot, menusel, menuhotsel, menuinactive\n" " Popup menus: pmenunormal, pmenusel, pmenutitle\n" -" Editor: editnormal, editbold, editmarked, editwhitespace,\n" +" Editor: editnormal, editbold, editmarked, editwhitespace, " +"editnonprintable,\n" " editlinestate, editbg, editframe, editframeactive\n" " editframedrag\n" " Viewer: viewnormal,viewbold, viewunderline, viewselected\n" @@ -1540,7 +1541,7 @@ msgid "" "written for the Midnight Commander." msgstr "" -msgid "Copyright (C) 1996-2023 the Free Software Foundation" +msgid "Copyright (C) 1996-2024 the Free Software Foundation" msgstr "" msgid "About" @@ -3901,65 +3902,23 @@ msgid "" "%s" msgstr "" -#, c-format -msgid "Warning: cannot open %s directory\n" -msgstr "" - -#, c-format -msgid "fish: Disconnecting from %s" -msgstr "" - -msgid "fish: Waiting for initial line..." -msgstr "" - -msgid "Sorry, we cannot do password authenticated connections for now." -msgstr "" - -#, c-format -msgid "fish: Password is required for %s" -msgstr "" - -msgid "fish: Sending password..." -msgstr "" - -msgid "fish: Sending initial line..." -msgstr "" - -msgid "fish: Handshaking version..." -msgstr "" - -msgid "fish: Getting host info..." -msgstr "" - -#, c-format -msgid "fish: Reading directory %s..." +msgid "" +"EXTFS virtual file system:\n" +"wrong file name" msgstr "" -#, c-format -msgid "%s: done." +msgid "" +"EXTFS virtual file system:\n" +"wrong archive name" msgstr "" -#, c-format -msgid "%s: failure" +msgid "" +"EXTFS virtual file system:\n" +"cannot build command" msgstr "" #, c-format -msgid "fish: store %s: sending command..." -msgstr "" - -msgid "fish: Local read failed, sending zeros" -msgstr "" - -msgid "fish: storing file" -msgstr "" - -msgid "Aborting transfer..." -msgstr "" - -msgid "Error reported after abort." -msgstr "" - -msgid "Aborted transfer would be successful." +msgid "Warning: cannot open %s directory\n" msgstr "" #, c-format @@ -4072,6 +4031,14 @@ msgstr "" msgid "ftpfs: failed; nowhere to fallback to" msgstr "" +#, c-format +msgid "%s: failure" +msgstr "" + +#, c-format +msgid "%s: done." +msgstr "" + msgid "ftpfs: storing file" msgstr "" @@ -4205,6 +4172,52 @@ msgstr "" msgid "sftp: Listing done." msgstr "" +#, c-format +msgid "shell: Disconnecting from %s" +msgstr "" + +msgid "shell: Waiting for initial line..." +msgstr "" + +msgid "Sorry, we cannot do password authenticated connections for now." +msgstr "" + +#, c-format +msgid "shell: Password is required for %s" +msgstr "" + +msgid "shell: Sending password..." +msgstr "" + +msgid "shell: Sending initial line..." +msgstr "" + +msgid "shell: Getting host info..." +msgstr "" + +#, c-format +msgid "shell: Reading directory %s..." +msgstr "" + +#, c-format +msgid "shell: store %s: sending command..." +msgstr "" + +msgid "shell: Local read failed, sending zeros" +msgstr "" + +msgid "shell: storing file" +msgstr "" + +msgid "Aborting transfer..." +msgstr "" + +msgid "Error reported after abort." +msgstr "" + +msgid "Aborted transfer would be successful." +msgstr "" + msgid "Inconsistent tar archive" msgstr "" diff --git a/mcsrc/po/ko.po b/mcsrc/po/ko.po index cf54000f..ec936024 100644 --- a/mcsrc/po/ko.po +++ b/mcsrc/po/ko.po @@ -8,15 +8,16 @@ # JinYeong Bak , 2016 # Junghee Lee , 2022-2023 # Junghee Lee , 2022 -# Junghee Lee , 2019-2021 +# Junghee Lee , 2019-2021,2023 +# Seong-ho Cho , 2023 # Slava Zanko , 2011 msgid "" msgstr "" "Project-Id-Version: Midnight Commander\n" "Report-Msgid-Bugs-To: https://www.midnight-commander.org/\n" -"POT-Creation-Date: 2023-08-06 15:50+0200\n" +"POT-Creation-Date: 2024-01-20 20:51+0100\n" "PO-Revision-Date: 2010-12-29 10:19+0000\n" -"Last-Translator: Junghee Lee , 2022-2023\n" +"Last-Translator: Seong-ho Cho , 2023\n" "Language-Team: Korean (http://app.transifex.com/mc/mc/language/ko/)\n" "Language: ko\n" "MIME-Version: 1.0\n" @@ -26,14 +27,14 @@ msgstr "" # "Plural-Forms: nplurals=INTEGER; plural=EXPRESSION;\n" msgid "Warning: cannot load codepages list" -msgstr "경고: 코드 페이지 목록을 불러올 수 없습니다" +msgstr "경고: 코드 페이지 목록을 불러올 수 없음" msgid "7-bit ASCII" -msgstr "7-bit ASCII" +msgstr "7비트 아스키" #, c-format msgid "Cannot translate from %s to %s" -msgstr "%s에서 %s로 변환할 수 없습니다" +msgstr "%s에서 %s로 변환할 수 없음" msgid "Event system already initialized" msgstr "이벤트 시스템이 이미 초기화되었습니다" @@ -76,7 +77,7 @@ msgstr "잠금 무시(&I)" #, c-format msgid "Cannot create %s directory" -msgstr "%s 디렉터리을 만들 수 없습니다" +msgstr "%s 디렉터리를 만들 수 없음" msgid "FATAL: not a directory:" msgstr "치명적인 오류: 디렉터리가 아님:" @@ -97,11 +98,11 @@ msgid "" "Hex pattern error at position %d:\n" "%s." msgstr "" -"%d 에서 16진수 형식의 오류 발견됨:\n" +"%d에서 16진수 형식의 오류 발견:\n" "%s." msgid "Search string not found" -msgstr "검색 문자열을 찾을 수 없습니다" +msgstr "검색 문자열을 찾을 수 없음" msgid "Not implemented yet" msgstr "아직 구현되지 않음" @@ -134,15 +135,15 @@ msgid "" "Default skin has been loaded" msgstr "" "'%s' 스킨을 불러올 수 없습니다.\n" -"기본 스킨이 불러오기 되었습니다" +"기본 스킨을 불러왔습니다" #, c-format msgid "" "Unable to parse '%s' skin.\n" "Default skin has been loaded" msgstr "" -"'%s' 스킨을 구문 분석할 수 없습니다.\n" -"기본 스킨이 불러오기 되었습니다" +"'%s' 스킨을 분석할 수 없습니다.\n" +"기본 스킨을 불러왔습니다" #, c-format msgid "" @@ -150,9 +151,9 @@ msgid "" "%s\n" "Default skin has been loaded" msgstr "" -"트루컬러를 지원하는 '%s' 스킨을 사용할 수 없습니다:\n" +"트루컬러를 지원하는 '%s' 스킨을 사용할 수 없음:\n" "%s\n" -"기본 스킨이 불러오기 되었습니다" +"기본 스킨을 불러왔습니다" #, c-format msgid "" @@ -162,10 +163,10 @@ msgid "" msgstr "" "256색이 아닌 터미널에서 256색을 지원하는\n" "'%s' 스킨을 사용할 수 없습니다.\n" -"기본 스킨이 불러오기 되었습니다" +"기본 스킨을 불러왔습니다" msgid "True color not supported with ncurses." -msgstr "트루 컬러는 ncurses에서 지원 되지 않습니다." +msgstr "트루 컬러는 ncurses에서 지원하지 않습니다." msgid "Your terminal doesn't even seem to support 256 colors." msgstr "터미널이 256색상을 지원하지 않는 것 같습니다." @@ -180,64 +181,64 @@ msgid "Escape" msgstr "Esc" msgid "Function key 1" -msgstr "기능 키 1" +msgstr "F1" msgid "Function key 2" -msgstr "기능 키 2" +msgstr "F2" msgid "Function key 3" -msgstr "기능 키 3" +msgstr "F3" msgid "Function key 4" -msgstr "기능 키 4" +msgstr "F4" msgid "Function key 5" -msgstr "기능 키 5" +msgstr "F5" msgid "Function key 6" -msgstr "기능 키 6" +msgstr "F6" msgid "Function key 7" -msgstr "기능 키 7" +msgstr "F7" msgid "Function key 8" -msgstr "기능 키 8" +msgstr "F8" msgid "Function key 9" -msgstr "기능 키 9" +msgstr "F9" msgid "Function key 10" -msgstr "기능 키 10" +msgstr "F10" msgid "Function key 11" -msgstr "기능 키 11" +msgstr "F11" msgid "Function key 12" -msgstr "기능 키 12" +msgstr "F12" msgid "Function key 13" -msgstr "기능 키 13" +msgstr "F13" msgid "Function key 14" -msgstr "기능 키 14" +msgstr "F14" msgid "Function key 15" -msgstr "기능 키 15" +msgstr "F15" msgid "Function key 16" -msgstr "기능 키 16" +msgstr "F16" msgid "Function key 17" -msgstr "기능 키 17" +msgstr "F17" msgid "Function key 18" -msgstr "기능 키 18" +msgstr "F18" msgid "Function key 19" -msgstr "기능 키 19" +msgstr "F19" msgid "Function key 20" -msgstr "기능 키 20" +msgstr "F20" msgid "Completion/M-tab" msgstr "완성/M-tab" @@ -246,7 +247,7 @@ msgid "BackTab/S-tab" msgstr "뒤로 탭/S-tab" msgid "Backspace" -msgstr "백스페이스" +msgstr "Backspace" msgid "Up arrow" msgstr "위쪽 방향키" @@ -261,22 +262,22 @@ msgid "Right arrow" msgstr "오른쪽 방향키" msgid "Insert" -msgstr "삽입 키" +msgstr "Insert" msgid "Delete" -msgstr "삭제 키" +msgstr "Delete" msgid "Home" -msgstr "홈 키" +msgstr "Home" msgid "End key" -msgstr "End 키" +msgstr "End" msgid "Page Up" -msgstr "페이지 위로 키" +msgstr "Page Up" msgid "Page Down" -msgstr "페이지 아래로 키" +msgstr "Page Down" msgid "/ on keypad" msgstr "키패드 /" @@ -324,16 +325,16 @@ msgid "Enter on keypad" msgstr "키패드 Enter" msgid "Function key 21" -msgstr "기능 키 21" +msgstr "F21" msgid "Function key 22" -msgstr "기능 키 22" +msgstr "F22" msgid "Function key 23" -msgstr "기능 키 23" +msgstr "F23" msgid "Function key 24" -msgstr "기능 키 24" +msgstr "F24" msgid "A1 key" msgstr "A1 키" @@ -432,10 +433,10 @@ msgid "Enter" msgstr "↵" msgid "Tab key" -msgstr "탭 키" +msgstr "Tab" msgid "Space key" -msgstr "스페이스키" +msgstr "Space" msgid "Slash key" msgstr "/" @@ -463,7 +464,7 @@ msgid "The TERM environment variable is unset!\n" msgstr "TERM 환경변수가 설정되어있지 않습니다!\n" msgid "Cannot check SIGWINCH pipe" -msgstr "SIGWINCH 파이프를 확인할 수 없습니다" +msgstr "SIGWINCH 파이프를 확인할 수 없음" #, c-format msgid "" @@ -471,7 +472,7 @@ msgid "" "Cannot create pipe for SIGWINCH: %s (%d)\n" msgstr "" "\n" -"SIGWINCH용 파이프를 작성할 수 없습니다: %s (%d)\n" +"SIGWINCH용 파이프를 작성할 수 없음: %s (%d)\n" #, c-format msgid "" @@ -479,7 +480,7 @@ msgid "" "Cannot configure write end of SIGWINCH pipe: %s (%d)\n" msgstr "" "\n" -"SIGWINCH 파이프의 쓰기 끝을 구성할 수 없습니다: %s (%d)\n" +"SIGWINCH 파이프의 쓰기 끝을 구성할 수 없음: %s (%d)\n" #, c-format msgid "" @@ -487,7 +488,7 @@ msgid "" "Cannot configure read end of SIGWINCH pipe: %s (%d)\n" msgstr "" "\n" -"SIGWINCH 파이프의 읽기 끝을 구성할 수 없습니다: %s (%d)\n" +"SIGWINCH 파이프의 읽기 끝을 구성할 수 없음: %s (%d)\n" #, c-format msgid "" @@ -498,42 +499,42 @@ msgstr "" "TERM 환경변수를 확인해 보세요.\n" msgid "B" -msgstr "바이트" +msgstr "B" msgid "kB" -msgstr "킬로바이트" +msgstr "kB" msgid "KiB" -msgstr "키비바이트" +msgstr "KiB" msgid "MB" -msgstr "메가바이트" +msgstr "MB" msgid "MiB" -msgstr "메비바이트" +msgstr "MiB" msgid "GB" -msgstr "기가바이트" +msgstr "GB" msgid "GiB" -msgstr "기비바이트" +msgstr "GiB" msgid "Cannot create pipe descriptor" -msgstr "파이프 설명도구를 작성할 수 없습니다" +msgstr "파이프 디스크립터를 생성할 수 없음" msgid "Cannot create pipe streams" -msgstr "파이프 데이터 스트림을 생성할 수 없습니다" +msgstr "파이프 데이터 스트림을 생성할 수 없음" #, c-format msgid "" "Unexpected error in select() reading data from a child process:\n" "%s" msgstr "" -"Select()에서 하위 프로세스의 데이터를 읽는 도중 예상치 못한 오류 발생:\n" +"select()에서 하위 프로세스의 데이터를 읽는 중 예상치 못한 오류 발생:\n" "%s" msgid "Cannot close pipe descriptor (p == NULL)" -msgstr "파이프 설명자를 닫을 수 없습니다(p == NULL)" +msgstr "파이프 디스크립터를 닫을 수 없음 (p == NULL)" #, c-format msgid "" @@ -574,11 +575,11 @@ msgstr "%s 디렉터리가 사용자의 소유가 아님\n" #, c-format msgid "Cannot set correct permissions for directory %s\n" -msgstr "%s 디렉터리에 대한 올바른 사용 권한을 설정할 수 없습니다\n" +msgstr "%s 디렉터리에 대한 올바른 사용 권한을 설정할 수 없음\n" #, c-format msgid "Cannot create temporary directory %s: %s\n" -msgstr "%s 임시 디렉터리를 생성할 수 없습니다: %s\n" +msgstr "%s 임시 디렉터리를 생성할 수 없음: %s\n" #, c-format msgid "Temporary files will be created in %s\n" @@ -592,7 +593,7 @@ msgid "Press any key to continue..." msgstr "계속하려면 아무 키나 누르십시오..." msgid "Cannot parse:" -msgstr "구문 분석할 수 없습니다:" +msgstr "분석할 수 없음:" msgid "More parsing errors will be ignored." msgstr "더 많은 구문 분석 오류가 무시됩니다." @@ -601,26 +602,26 @@ msgid "Internal error:" msgstr "내부 오류:" msgid "Password:" -msgstr "비밀번호:" +msgstr "암호:" msgid "Screens" msgstr "화면" msgid "History" -msgstr "히스토리" +msgstr "기록" #. TRANSLATORS: no need to translate 'DialogTitle', it's just a context prefix msgid "DialogTitle|History cleanup" -msgstr "히스토리 정리" +msgstr "기록 정리" msgid "Do you want clean this history?" -msgstr "이 히스토리를 지우시겠습니까?" +msgstr "이 기록을 지우시겠습니까?" msgid "&Yes" msgstr "예(&Y)" msgid "&No" -msgstr "아니오(&N)" +msgstr "아니요(&N)" msgid "&OK" msgstr "확인(&O)" @@ -648,13 +649,13 @@ msgid "Print data directory" msgstr "데이터 디렉터리 인쇄" msgid "Print extended info about used data directories" -msgstr "사용된 데이터 디렉터리에 대한 확장 정보 인쇄" +msgstr "사용 데이터 디렉터리의 확장 정보 출력" msgid "Print configure options" -msgstr "설정 옵션 인쇄" +msgstr "설정 옵션 출력" msgid "Print last working directory to specified file" -msgstr "마지막 작업 디렉터리를 지정된 파일로 인쇄" +msgstr "마지막 작업 디렉터리를 지정된 파일로 출력" msgid "" msgstr "" @@ -708,7 +709,7 @@ msgid "Don't load definitions of key bindings from file, use defaults" msgstr "파일에서 키 바인딩 정의 불러오기 안함, 기본값 사용" msgid "Requests to run in black and white" -msgstr "흑백모드로 실행 요청" +msgstr "흑백 모드로 실행 요청" msgid "Request to run in color mode" msgstr "컬러 모드로 실행 요청" @@ -737,30 +738,13 @@ msgid "" " errdhotfocus\n" " Menus: menunormal, menuhot, menusel, menuhotsel, menuinactive\n" " Popup menus: pmenunormal, pmenusel, pmenutitle\n" -" Editor: editnormal, editbold, editmarked, editwhitespace,\n" +" Editor: editnormal, editbold, editmarked, editwhitespace, " +"editnonprintable,\n" " editlinestate, editbg, editframe, editframeactive\n" " editframedrag\n" " Viewer: viewnormal,viewbold, viewunderline, viewselected\n" " Help: helpnormal, helpitalic, helpbold, helplink, helpslink\n" msgstr "" -"--colors KEYWORD={FORE},{BACK},{ATTR}:KEYWORD2=...\n" -"\n" -"{FORE}, {BACK} 및 {ATTR}을(를) 생략할 수 있으며 기본값이 사용됨\n" -"\n" -"키워드:\n" -" 전역: errors, disabled, reverse, gauge, header\n" -" input, inputmark, inputunchanged, commandlinemark\n" -" bbarhotkey, bbarbutton, statusbar\n" -" 파일 표시: normal, selected, marked, markselect\n" -" 대화 상자: dnormal, dfocus, dhotnormal, dhotfocus, errdhotnormal,\n" -" errdhotfocus\n" -" 메뉴: menunormal, menuhot, menusel, menuhotsel, menuinactive\n" -" 팝업 메뉴: pmenunormal, pmenusel, pmenutitle\n" -" 편집기: editnormal, editbold, editmarked, editwhitespace,\n" -" editlinestate, editbg, editframe, editframeactive\n" -" editframedrag\n" -" 뷰어: viewnormal,viewbold, viewunderline, viewselected\n" -" 도움말: helpnormal, helpitalic, helpbold, helplink, helpslink\n" #. TRANSLATORS: don't translate color names and attributes msgid "" @@ -815,19 +799,19 @@ msgid "GNU Midnight Commander %s\n" msgstr "GNU 미드나잇 커맨더 %s\n" msgid "Main options" -msgstr "기본 옵션" +msgstr "주요 옵션" msgid "Terminal options" msgstr "터미널 옵션" msgid "Arguments parse error!" -msgstr "인수 구문 분석 오류!" +msgstr "인수 분석 오류!" msgid "No arguments given to the viewer." -msgstr "뷰어에 지정된 인수가 없습니다." +msgstr "뷰어에 지정한 인자가 없습니다." msgid "Two files are required to invoke the diffviewer." -msgstr "Diffviewer를 호출하려면 두 개의 파일이 필요합니다." +msgstr "diffviewer를 호출하려면 파일 두 개가 필요합니다." msgid "Background protocol error" msgstr "백그라운드 프로토콜 오류" @@ -839,10 +823,10 @@ msgid "Background process error" msgstr "백그라운드 프로세스 오류" msgid "Unknown error in child" -msgstr "하위에서 알 수 없는 오류 발생" +msgstr "하위 프로세스에서 알 수 없는 오류 발생" msgid "Child died unexpectedly" -msgstr "하위가 예기치 않게 죽음" +msgstr "하위 프로세스가 예기치 않게 죽음" msgid "" "Background process sent us a request for more arguments\n" @@ -881,7 +865,7 @@ msgid "" "%s" msgstr "" "%s\n" -"임시 Diff 파일을 생성할 수 없습니다" +"임시 Diff 파일을 생성할 수 없음" #, c-format msgid "" @@ -891,7 +875,7 @@ msgid "" msgstr "" "%s%s\n" "%s\n" -" 백업 파일을 생성할 수 없습니다" +" 백업 파일을 생성할 수 없음" #, c-format msgid "" @@ -899,7 +883,7 @@ msgid "" "%s" msgstr "" "%s\n" -"임시 병합 파일을 생성할 수 없습니다" +"임시 병합 파일을 생성할 수 없음" msgid "&Fastest (Assume large files)" msgstr "가장 빠름 (대용량 파일 추정)(&F)" @@ -971,14 +955,14 @@ msgid "Quit" msgstr "종료" msgid "File(s) was modified. Save with exit?" -msgstr "파일 수정됨. 종료로 저장하시겠습니까?" +msgstr "파일을 수정했습니다. 저장 후 나가시겠습니까?" msgid "" "Midnight Commander is being shut down.\n" "Save modified file(s)?" msgstr "" -"미드나잇 커맨더가 종료됩니다.\n" -"수정된 파일을 저장하시겠습니까?" +"미드나잇 커맨더를 끝냅니다.\n" +"수정한 파일을 저장하시겠습니까?" msgid "Diff:" msgstr "비교:" @@ -1010,7 +994,7 @@ msgstr "불러오는 중..." #, c-format msgid "Cannot open %s for reading" -msgstr "%s을(를) 열 수 없습니다" +msgstr "%s을(를) 열 수 없음" msgid "Load file" msgstr "파일 불러오기" @@ -1021,7 +1005,7 @@ msgstr "%s을(를) 읽는 중 오류 발생" #, c-format msgid "Cannot get size/permissions for %s" -msgstr "%s에 대한 크기/사용 권한을 가져올 수 없습니다" +msgstr "%s에 대한 크기/사용 권한을 가져올 수 없음" #, c-format msgid "\"%s\" is not a regular file" @@ -1044,7 +1028,7 @@ msgstr "파이프에서 읽는 중 오류 발생: %s" #, c-format msgid "Cannot open pipe for reading: %s" -msgstr "읽을 파이프를 열 수 없습니다: %s" +msgstr "읽을 파이프를 열 수 없음: %s" msgid "File has hard-links. Detach before saving?" msgstr "파일에 하드-링크가 있습니다. 저장하기 전에 분리 하시겠습니까?" @@ -1058,11 +1042,11 @@ msgstr "파이프에 쓰는 중 오류 발생: %s" #, c-format msgid "Cannot open pipe for writing: %s" -msgstr "쓰기 위해 파이프를 열 수 없습니다: %s" +msgstr "쓰기 위해 파이프를 열 수 없음: %s" #, c-format msgid "Cannot open file for writing: %s" -msgstr "쓰기 위해 파일을 열 수 없습니다: %s" +msgstr "쓰기 위해 파일을 열 수 없음: %s" msgid "The file you are saving does not end with a newline." msgstr "저장중인 파일은 개행 문자로 끝나지 않음." @@ -1110,7 +1094,7 @@ msgid "Save as" msgstr "다른 이름으로 저장" msgid "Cannot save: destination is not a regular file" -msgstr "저장할 수 없습니다: 대상이 일반 파일이 아님" +msgstr "저장할 수 없음: 대상이 일반 파일이 아님" msgid "A file already exists with this name" msgstr "이 이름의 파일이 이미 있음" @@ -1119,7 +1103,7 @@ msgid "&Overwrite" msgstr "덮어쓰기(&O)" msgid "Cannot save file" -msgstr "파일을 저장할 수 없습니다" +msgstr "파일을 저장할 수 없음" #, c-format msgid "Confirm save file: \"%s\"" @@ -1156,7 +1140,7 @@ msgid "&Local" msgstr "로컬(&L)" msgid "[NoName]" -msgstr "[이름 없습니다]" +msgstr "[이름 없음]" #, c-format msgid "" @@ -1184,7 +1168,7 @@ msgid "Copy to clipboard" msgstr "클립보드로 복사하기" msgid "Unable to save to file" -msgstr "파일에 저장할 수 없습니다" +msgstr "파일에 저장할 수 없음" msgid "Cut to clipboard" msgstr "클립보드로 잘라내기" @@ -1199,7 +1183,7 @@ msgid "Insert file" msgstr "파일 삽입" msgid "Cannot insert file" -msgstr "파일을 삽입할 수 없습니다" +msgstr "파일을 삽입할 수 없음" msgid "Sort block" msgstr "블록 정렬" @@ -1217,7 +1201,7 @@ msgid "Sort" msgstr "정렬" msgid "Cannot execute sort command" -msgstr "정렬 명령을 실행할 수 없습니다" +msgstr "정렬 명령을 실행할 수 없음" #, c-format msgid "Sort returned non-zero: %s" @@ -1233,7 +1217,7 @@ msgid "External command" msgstr "확장 명령어" msgid "Cannot execute command" -msgstr "명령을 실행할 수 없습니다" +msgstr "명령을 실행할 수 없음" msgid "mail -s -c " msgstr "mail -s -c " @@ -1251,7 +1235,7 @@ msgid "Mail" msgstr "메일" msgid "Insert literal" -msgstr "텍스트 삽입" +msgstr "문자 삽입" msgid "Press any key:" msgstr "아무 키나 누르기:" @@ -1270,7 +1254,7 @@ msgid "Collect completions" msgstr "완성 정보 수집" msgid "NoName" -msgstr "이름없습니다" +msgstr "이름없음" msgid "Save macro" msgstr "매크로 저장" @@ -1438,7 +1422,7 @@ msgid "&Mail..." msgstr "메일(&M)..." msgid "Insert &literal..." -msgstr "텍스트 삽입(&L)..." +msgstr "문자 삽입(&L)..." msgid "Insert &date/time" msgstr "날짜/시간 삽입(&D)" @@ -1516,7 +1500,7 @@ msgid "&Options" msgstr "옵션(&O)" msgid "&None" -msgstr "없습니다(&N)" +msgstr "없음(&N)" msgid "&Dynamic paragraphing" msgstr "동적 분할(&D)" @@ -1627,8 +1611,8 @@ msgstr "" "사용자 친화적인 텍스트 편집기\n" "미드나잇 커맨더를 위해 작성됨." -msgid "Copyright (C) 1996-2023 the Free Software Foundation" -msgstr "Copyright (C) 1996-2023 자유 소프트웨어 재단" +msgid "Copyright (C) 1996-2024 the Free Software Foundation" +msgstr "" msgid "About" msgstr "소개" @@ -1764,7 +1748,7 @@ msgid "" "Cannot open file %s\n" "%s" msgstr "" -"%s 파일을 열 수 없습니다\n" +"%s 파일을 열 수 없음\n" "%s" #, c-format @@ -1783,7 +1767,7 @@ msgstr "" #, c-format msgid "Cannot fetch a local copy of %s" -msgstr "%s의 로컬 복사본을 가져올 수 없습니다" +msgstr "%s의 로컬 복사본을 가져올 수 없음" msgid "The shell is already running a command" msgstr "셸이 이미 명령을 실행하고 있음" @@ -1831,7 +1815,7 @@ msgid "" "Cannot chmod \"%s\"\n" "%s" msgstr "" -"\"%s\"을(를) chmod할 수 없습니다\n" +"\"%s\"을(를) chmod할 수 없음\n" "%s" msgid "&Ignore" @@ -1848,7 +1832,7 @@ msgid "" "Cannot chown \"%s\"\n" "%s" msgstr "" -"\"%s\"을(를) 선택할 수 없습니다\n" +"\"%s\"을(를) 선택할 수 없음\n" "%s" msgid "< Default >" @@ -2104,10 +2088,10 @@ msgid "Display bits" msgstr "디스플레이 비트" msgid "Input / display codepage:" -msgstr "코드 페이지 입력/표시:" +msgstr "입력 / 디스플레이 코드페이지:" msgid "Directory tree" -msgstr "디렉터리 트리구조" +msgstr "디렉터리 트리" msgid "Timeout for freeing VFSs (sec):" msgstr "VFS를 해제하기 위한 타임아웃(초):" @@ -2134,10 +2118,10 @@ msgid "Virtual File System Setting" msgstr "가상 파일 시스템 설정" msgid "cd" -msgstr "디렉터리 변경" +msgstr "cd" msgid "Quick cd" -msgstr "빠른 디렉터리 변경" +msgstr "빠른 cd" msgid "Existing filename (filename symlink will point to):" msgstr "대상 파일 이름 (심볼릭링크 파일이 가리킬 파일):" @@ -2166,18 +2150,21 @@ msgid "" "%s\n" "%s" msgstr "" +"디렉터리를 다음으로 변경할 수 없음\n" +"%s\n" +"%s" msgid "Secure deletion" -msgstr "안전한 삭제" +msgstr "보안 삭제" msgid "Undelete" msgstr "삭제취소" msgid "Synchronous updates" -msgstr "동기 업데이트" +msgstr "실시간 업데이트" msgid "Synchronous directory updates" -msgstr "동기 디렉터리 업데이트" +msgstr "실시간 디렉터리 업데이트" msgid "Immutable" msgstr "불변" @@ -2186,10 +2173,10 @@ msgid "Append only" msgstr "첨부 만" msgid "No dump" -msgstr "덤프 없습니다" +msgstr "덤프 없음" msgid "No update atime" -msgstr "한 번에 업데이트 없습니다" +msgstr "atime 업데이트 안함" msgid "Compress" msgstr "압축" @@ -2213,7 +2200,7 @@ msgid "Indexed directory" msgstr "색인된 디렉터리" msgid "No tail merging" -msgstr "꼬리 병합 없습니다" +msgstr "꼬리 병합 없음" msgid "Top of directory hierarchies" msgstr "최상위 디렉터리 계층" @@ -2225,7 +2212,7 @@ msgid "Huge_file" msgstr "대용량_파일" msgid "No COW" -msgstr "COW 없습니다" +msgstr "COW 없음" msgid "Direct access for files" msgstr "파일에 대한 직접 액세스" @@ -2259,7 +2246,7 @@ msgid "" "Cannot chattr \"%s\"\n" "%s" msgstr "" -"\"%s\" 속성 변경을 할 수 없습니다\n" +"\"%s\" 속성 변경을 할 수 없음\n" "%s" #, c-format @@ -2267,7 +2254,7 @@ msgid "" "Cannot get flags of \"%s\"\n" "%s" msgstr "" -"\"%s\" 플래그를 가져올 수 없습니다\n" +"\"%s\" 플래그를 가져올 수 없음\n" "%s" msgid "set &user ID on execution" @@ -2449,7 +2436,7 @@ msgstr "심볼릭링크 편집" #, c-format msgid "edit symlink, unable to remove %s: %s" -msgstr "심볼릭링크 편집, %s을(를) 제거할 수 없습니다: %s" +msgstr "심볼릭링크 편집, %s을(를) 제거할 수 없음: %s" #, c-format msgid "edit symlink: %s" @@ -2486,10 +2473,10 @@ msgstr "%s에 저장된 설정" #, c-format msgid "Unable to save setup to %s" -msgstr "%s에 설정을 저장할 수 없습니다" +msgstr "%s에 설정을 저장할 수 없음" msgid "Cannot execute commands on non-local filesystems" -msgstr "로컬이 아닌 파일 시스템에서 명령을 실행할 수 없습니다" +msgstr "로컬이 아닌 파일 시스템에서 명령을 실행할 수 없음" msgid "Parameter" msgstr "매개변수" @@ -2499,7 +2486,7 @@ msgid "" "Cannot create temporary command file\n" "%s" msgstr "" -"임시 명령 파일을 생성할 수 없습니다\n" +"임시 명령 파일을 생성할 수 없음\n" "%s" msgid "Pipe failed" @@ -2590,7 +2577,7 @@ msgid "" "Cannot stat hardlink source file \"%s\"\n" "%s" msgstr "" -"\"%s\" 하드링크 소스 파일을 통계할 수 없습니다\n" +"\"%s\" 하드링크 소스 파일을 통계할 수 없음\n" "%s" #, c-format @@ -2598,19 +2585,19 @@ msgid "" "Cannot create target hardlink \"%s\"\n" "%s" msgstr "" -"\"%s\" 대상 하드링크를 만들 수 없습니다\n" +"\"%s\" 대상 하드링크를 만들 수 없음\n" "%s" #, c-format msgid "Cannot create target hardlink \"%s\"" -msgstr "\"%s\" 대상 하드링크를 만들 수 없습니다" +msgstr "\"%s\" 대상 하드링크를 만들 수 없음" #, c-format msgid "" "Cannot read source link \"%s\"\n" "%s" msgstr "" -"\"%s\" 소스 링크를 읽을 수 없습니다\n" +"\"%s\" 소스 링크를 읽을 수 없음\n" "%s" msgid "" @@ -2618,7 +2605,7 @@ msgid "" "\n" "Option Stable Symlinks will be disabled" msgstr "" -"로컬이 아닌 파일 시스템 간에 안정적인 심볼릭링크를 만들 수 없습니다:\n" +"로컬이 아닌 파일 시스템 간에 안정적인 심볼릭링크를 만들 수 없음:\n" "\n" "옵션 안정 심볼릭링크가 비활성화 됩니다" @@ -2627,7 +2614,7 @@ msgid "" "Cannot create target symlink \"%s\"\n" "%s" msgstr "" -"\"%s\" 대상 심볼릭링크를 만들 수 없습니다\n" +"\"%s\" 대상 심볼릭링크를 만들 수 없음\n" "%s" #, c-format @@ -2676,14 +2663,14 @@ msgstr "" "다시 삭제하시겠습니까?" msgid "Non&e" -msgstr "없습니다(&E)" +msgstr "없음(&E)" #, c-format msgid "" "Cannot remove file \"%s\"\n" "%s" msgstr "" -"%s 파일을 제거할 수 없습니다\n" +"%s 파일을 제거할 수 없음\n" "%s" #, c-format @@ -2691,19 +2678,19 @@ msgid "" "Cannot stat file \"%s\"\n" "%s" msgstr "" -"%s 파일을 stat할 수 없습니다\n" +"%s 파일을 stat할 수 없음\n" "%s" #, c-format msgid "Cannot overwrite directory \"%s\"" -msgstr "%s 디렉터리를 덮어쓸 수 없습니다" +msgstr "%s 디렉터리를 덮어쓸 수 없음" #, c-format msgid "" "Cannot move file \"%s\" to \"%s\"\n" "%s" msgstr "" -"%s 파일을 \"%s\"로 이동할 수 없습니다\n" +"%s 파일을 \"%s\"로 이동할 수 없음\n" "\n" "%s" @@ -2712,7 +2699,7 @@ msgid "" "Cannot remove directory \"%s\"\n" "%s" msgstr "" -"%s 디렉터리를 제거할 수 없습니다\n" +"%s 디렉터리를 제거할 수 없음\n" "%s" #, c-format @@ -2720,7 +2707,7 @@ msgid "" "Cannot overwrite directory \"%s\"\n" "%s" msgstr "" -"%s 디렉터리를 덮어쓸 수 없습니다\n" +"%s 디렉터리를 덮어쓸 수 없음\n" "%s" #, c-format @@ -2728,7 +2715,7 @@ msgid "" "Cannot overwrite file \"%s\"\n" "%s" msgstr "" -"%s 파일을 덮어쓸 수 없습니다\n" +"%s 파일을 덮어쓸 수 없음\n" "%s" #, c-format @@ -2736,7 +2723,7 @@ msgid "" "Cannot move directory \"%s\" to \"%s\"\n" "%s" msgstr "" -"\"%s\" 디렉터리를 \"%s\"로 이동할 수 없습니다\n" +"\"%s\" 디렉터리를 \"%s\"로 이동할 수 없음\n" "%s" msgid "Cannot operate on \"..\"!" @@ -2747,7 +2734,7 @@ msgid "" "Cannot stat source file \"%s\"\n" "%s" msgstr "" -"\"%s\" 원본 파일을 통계할 수 없습니다\n" +"\"%s\" 원본 파일을 통계할 수 없음\n" "%s" #, c-format @@ -2755,7 +2742,7 @@ msgid "" "Cannot create special file \"%s\"\n" "%s" msgstr "" -"\"%s\" 특수 파일을 만들 수 없습니다\n" +"\"%s\" 특수 파일을 만들 수 없음\n" "%s" #, c-format @@ -2763,7 +2750,7 @@ msgid "" "Cannot chown target file \"%s\"\n" "%s" msgstr "" -"\"%s\" 대상 파일을 chown 할 수 없습니다\n" +"\"%s\" 대상 파일을 chown 할 수 없음\n" "%s" #, c-format @@ -2771,7 +2758,7 @@ msgid "" "Cannot chmod target file \"%s\"\n" "%s" msgstr "" -"\"%s\" 대상 파일을 chmod할 수 없습니다\n" +"\"%s\" 대상 파일을 chmod할 수 없음\n" "%s" #, c-format @@ -2779,7 +2766,7 @@ msgid "" "Cannot open source file \"%s\"\n" "%s" msgstr "" -"\"%s\" 원본 파일을 열 수 없습니다\n" +"\"%s\" 원본 파일을 열 수 없음\n" "%s" msgid "Reget failed, about to overwrite file" @@ -2790,7 +2777,7 @@ msgid "" "Cannot fstat source file \"%s\"\n" "%s" msgstr "" -"\"%s\" 소스 파일을 fstat할 수 없습니다\n" +"\"%s\" 소스 파일을 fstat할 수 없음\n" "%s" #, c-format @@ -2798,7 +2785,7 @@ msgid "" "Cannot create target file \"%s\"\n" "%s" msgstr "" -"\"%s\" 대상 파일을 생성할 수 없습니다\n" +"\"%s\" 대상 파일을 생성할 수 없음\n" "%s" #, c-format @@ -2806,7 +2793,7 @@ msgid "" "Cannot fstat target file \"%s\"\n" "%s" msgstr "" -"\"%s\" 대상 파일을 fstat할 수 없습니다\n" +"\"%s\" 대상 파일을 fstat할 수 없음\n" "%s" #, c-format @@ -2814,7 +2801,7 @@ msgid "" "Cannot preallocate space for target file \"%s\"\n" "%s" msgstr "" -"\"%s\" 대상 파일에 대한 공간을 사전 할당할 수 없습니다\n" +"\"%s\" 대상 파일에 대한 공간을 사전 할당할 수 없음\n" "%s" #, c-format @@ -2822,7 +2809,7 @@ msgid "" "Cannot read source file \"%s\"\n" "%s" msgstr "" -"\"%s\" 소스 파일를 읽을 수 없습니다\n" +"\"%s\" 소스 파일를 읽을 수 없음\n" "%s" #, c-format @@ -2830,7 +2817,7 @@ msgid "" "Cannot write target file \"%s\"\n" "%s" msgstr "" -"\"%s\" 대상 파일을 쓸 수 없습니다\n" +"\"%s\" 대상 파일을 쓸 수 없음\n" "%s" msgid "(stalled)" @@ -2850,7 +2837,7 @@ msgid "" "Cannot close source file \"%s\"\n" "%s" msgstr "" -"\"%s\" 원본 파일을 닫을 수 없습니다\n" +"\"%s\" 원본 파일을 닫을 수 없음\n" "%s" #, c-format @@ -2858,7 +2845,7 @@ msgid "" "Cannot close target file \"%s\"\n" "%s" msgstr "" -"\"%s\" 대상 파일을 닫을 수 없습니다\n" +"\"%s\" 대상 파일을 닫을 수 없음\n" "%s" #, c-format @@ -2866,7 +2853,7 @@ msgid "" "Cannot stat source directory \"%s\"\n" "%s" msgstr "" -"\"%s\" 소스 디렉터리를 stat할 수 없습니다\n" +"\"%s\" 소스 디렉터리를 stat할 수 없음\n" "%s" #, c-format @@ -2882,7 +2869,7 @@ msgid "" "Cannot copy cyclic symbolic link\n" "\"%s\"" msgstr "" -"순환 심볼릭 링크를 복사할 수 없습니다\n" +"순환 심볼릭 링크를 복사할 수 없음\n" "\"%s\"" #, c-format @@ -2898,7 +2885,7 @@ msgid "" "Cannot create target directory \"%s\"\n" "%s" msgstr "" -"\"%s\" 대상 디렉터리를 생성할 수 없습니다\n" +"\"%s\" 대상 디렉터리를 생성할 수 없음\n" "%s" #, c-format @@ -2906,7 +2893,7 @@ msgid "" "Cannot chown target directory \"%s\"\n" "%s" msgstr "" -"\"%s\" 대상 디렉터리를 선택할 수 없습니다\n" +"\"%s\" 대상 디렉터리를 선택할 수 없음\n" "%s" #, c-format @@ -2914,7 +2901,7 @@ msgid "Directories: %zu, total size: %s" msgstr "디렉터리: %zu, 전체 크기: %s" msgid "Sorry, I could not put the job in background" -msgstr "죄송합니다, 백그라운드에서 작업을 넣을 수 없습니다" +msgstr "죄송합니다, 백그라운드에서 작업을 넣을 수 없음" msgid "S&uspend" msgstr "일시 중단(&U)" @@ -3096,7 +3083,7 @@ msgid "&Copy" msgstr "복사(&C)" msgid "C&hmod" -msgstr "파일/디렉터리 권한 변경(&H)" +msgstr "퍼미션(chmod)(&H)" msgid "&Link" msgstr "링크(&L)" @@ -3126,7 +3113,7 @@ msgid "&Mkdir" msgstr "&디렉생성" msgid "&Quick cd" -msgstr "빠른 디렉터리 변경(&Q)" +msgstr "빠른cd(&Q)" msgid "Select &group" msgstr "그룹 선택(&G)" @@ -3144,7 +3131,7 @@ msgid "&User menu" msgstr "사용자 메뉴(&U)" msgid "&Directory tree" -msgstr "디렉터리 트리구조(&D)" +msgstr "디렉터리 트리(&D)" msgid "&Find file" msgstr "파일 찾기(&F)" @@ -3216,7 +3203,7 @@ msgid "&Appearance..." msgstr "외형(&A)..." msgid "&Display bits..." -msgstr "비트 표시(&D)..." +msgstr "디스플레이 비트(&D)..." msgid "&Virtual FS..." msgstr "가상 파일시스템(&V)..." @@ -3260,7 +3247,7 @@ msgid "ButtonBar|Mkdir" msgstr "디렉생성" msgid "&Chdir" -msgstr "디렉터리 이동(&C)" +msgstr "Chdir(&C)" msgid "&Again" msgstr "다시(&A)" @@ -3427,7 +3414,7 @@ msgid "" "MC was unable to write %s file,\n" "your old hotlist entries were not deleted" msgstr "" -"MC가 %s 파일을 쓸 수 없습니다,\n" +"MC가 %s 파일을 쓸 수 없음,\n" "이전 단축목록 항목이 삭제되지 않음" #, c-format @@ -3446,13 +3433,13 @@ msgid "File: %s" msgstr "파일: %s" msgid "No node information" -msgstr "노드 정보 없습니다" +msgstr "노드 정보 없음" msgid "Free nodes:" msgstr "사용 가능한 노드:" msgid "No space information" -msgstr "공간 정보 없습니다" +msgstr "공간 정보 없음" #, c-format msgid "Free space: %s / %s (%d%%)" @@ -3512,7 +3499,7 @@ msgid "Attributes: %s" msgstr "속성: %s" msgid "Attributes: unavailable" -msgstr "속성: 사용할 수 없습니다" +msgstr "속성: 사용할 수 없음" #, c-format msgid "Mode: %s (%04o)" @@ -3661,13 +3648,13 @@ msgid "[dev]" msgstr "[dev]" msgid "UP--DIR" -msgstr "상위 디렉터리" +msgstr "상위--DIR" msgid "SYMLINK" msgstr "심볼릭링크" msgid "SUB-DIR" -msgstr "하위 디렉터리" +msgstr "하위--DIR" msgid "" msgstr "" @@ -3681,7 +3668,7 @@ msgid "Panelize" msgstr "패널 크기조정" msgid "Unknown tag on display format:" -msgstr "표시 형식의 알 수 없는 태그:" +msgstr "디스플레이 형식의 알 수 없는 태그:" msgid "&Files only" msgstr "파일만(&F)" @@ -3702,7 +3689,7 @@ msgid "Do you really want to execute?" msgstr "정말로 실행하시겠습니까?" msgid "Cannot read directory contents" -msgstr "디렉터리 내용을 읽을 수 없습니다" +msgstr "디렉터리 내용을 읽을 수 없음" msgid "User supplied format looks invalid, reverting to default." msgstr "사용자가 제공한 형식이 잘못되어 기본값으로 되돌립니다." @@ -3740,11 +3727,11 @@ msgid "" "%s" msgstr "" "확장 패널크기:\n" -"하위 프로세스의 stdout에서 ​​데이터를 읽을 수 없습니다:\n" +"하위 프로세스의 stdout에서 ​​데이터를 읽을 수 없음:\n" "%s" msgid "Cannot run external panelize in a non-local directory" -msgstr "로컬이 아닌 디렉터리에서 확장 패널크기를 실행할 수 없습니다" +msgstr "로컬이 아닌 디렉터리에서 확장 패널크기를 실행할 수 없음" msgid "Modified git files" msgstr "수정된 git 파일" @@ -3763,7 +3750,7 @@ msgid "" "Cannot open the %s file for writing:\n" "%s\n" msgstr "" -"쓰기 위한 파일 %s을(를) 열 수 없습니다:\n" +"쓰기 위한 파일 %s을(를) 열 수 없음:\n" "%s\n" #, c-format @@ -3779,7 +3766,7 @@ msgid "" "Cannot stat the destination\n" "%s" msgstr "" -"대상 정보를 볼 수 없습니다\n" +"대상 정보를 볼 수 없음\n" "%s" #, c-format @@ -3806,7 +3793,7 @@ msgid "" "Cannot write to the %s file:\n" "%s\n" msgstr "" -"%s 파일에 쓸 수 없습니다:\n" +"%s 파일에 쓸 수 없음:\n" "%s\n" msgid "Help file format error\n" @@ -3817,7 +3804,7 @@ msgstr "내부 버그: 링크 영역이 양방향으로 시작됨" #, c-format msgid "Cannot find node %s in help file" -msgstr "도움말 파일에서 %s 노드를 찾을 수 없습니다" +msgstr "도움말 파일에서 %s 노드를 찾을 수 없음" msgid "Help" msgstr "도움말" @@ -3855,7 +3842,7 @@ msgstr "" "마찬가지로 기다리십시오." msgid "Cannot accept this key" -msgstr "이 키를 수락할 수 없습니다" +msgstr "이 키를 수락할 수 없음" #, c-format msgid "You have entered \"%s\"" @@ -3918,7 +3905,7 @@ msgid "" "%s\n" msgstr "" "\n" -"닫기 시 실패함:\n" +"닫는 동안 실패:\n" "%s\n" msgid "Choose codepage" @@ -3938,12 +3925,12 @@ msgid "" "Cannot save file %s:\n" "%s" msgstr "" -"파일을 저장할 수 없습니다%s:\n" +"파일을 저장할 수 없음%s:\n" "%s" #, c-format msgid "Cannot open named pipe %s\n" -msgstr "명명된 %s 파이프를 열 수 없습니다\n" +msgstr "명명된 %s 파이프를 열 수 없음\n" msgid "The shell is still active. Quit anyway?" msgstr "셸이 아직 활성 상태입니다. 그래도 끝낼까요?" @@ -4018,7 +4005,7 @@ msgid "Data types:" msgstr "데이터 유형:" msgid "Home directory:" -msgstr "홈 디렉터리 :" +msgstr "홈 디렉터리:" msgid "Profile root directory:" msgstr "프로필 루트 디렉터리:" @@ -4075,15 +4062,15 @@ msgstr "파일 확장자 파일의 형식 오류" #, c-format msgid "The %%var macro has no default" -msgstr "%%var 매크로에 기본값이 없습니다" +msgstr "%%var 매크로에 기본값이 없음" #, c-format msgid "The %%var macro has no variable" -msgstr "%%var 매크로에 변수가 없습니다" +msgstr "%%var 매크로에 변수가 없음" #, c-format msgid "No suitable entries found in %s" -msgstr "%s에서 해당 항목을 찾을 수 없습니다" +msgstr "%s에서 해당 항목을 찾을 수 없음" msgid "User menu" msgstr "사용자 메뉴" @@ -4134,7 +4121,7 @@ msgid "" "%s" msgstr "" "%s\n" -"파일의 예기치 않은 끝" +"예기치 않은 파일의 끝" msgid "Inconsistent archive" msgstr "일관성 없는 압축파일" @@ -4145,7 +4132,7 @@ msgid "" "%s:\n" "%s" msgstr "" -"%s 압축파일을 열 수 없습니다\n" +"%s 압축파일을 열 수 없음\n" "%s:\n" "%s" @@ -4157,66 +4144,30 @@ msgstr "" "EXTFS 가상 파일 시스템:\n" "%s" -#, c-format -msgid "Warning: cannot open %s directory\n" -msgstr "경고: %s 디렉터리를 열 수 없습니다\n" - -#, c-format -msgid "fish: Disconnecting from %s" -msgstr "fish : %s에서 연결 해제 중" - -msgid "fish: Waiting for initial line..." -msgstr "fish: 초기화 라인을 기다리는 중..." - -msgid "Sorry, we cannot do password authenticated connections for now." -msgstr "죄송합니다. 지금은 비밀번호 인증 연결을 사용할 수 없습니다." - -#, c-format -msgid "fish: Password is required for %s" -msgstr "fish: %s에 대한 비밀번호가 필요함" - -msgid "fish: Sending password..." -msgstr "fish: 비밀번호 보내기..." - -msgid "fish: Sending initial line..." -msgstr "fish: 초기화 라인 보내기..." - -msgid "fish: Handshaking version..." -msgstr "fish: 핸드셰이킹 버전..." - -msgid "fish: Getting host info..." -msgstr "fish: 호스트 정보 가져오는 중..." - -#, c-format -msgid "fish: Reading directory %s..." -msgstr "fish: %s 디렉터리 읽는 중..." +msgid "" +"EXTFS virtual file system:\n" +"wrong file name" +msgstr "" +"EXTFS 가상 파일시스템:\n" +"파일 이름이 올바르지 않습니다" -#, c-format -msgid "%s: done." -msgstr "%s: 완료." +msgid "" +"EXTFS virtual file system:\n" +"wrong archive name" +msgstr "" +"EXTFS 가상 파일시스템:\n" +"압축 파일 이름이 올바르지 않습니다" -#, c-format -msgid "%s: failure" -msgstr "%s: 실패" +msgid "" +"EXTFS virtual file system:\n" +"cannot build command" +msgstr "" +"EXTFS 가상 파일시스템:\n" +"명령을 구성할 수 없습니다" #, c-format -msgid "fish: store %s: sending command..." -msgstr "fish: %s 저장: 명령 보내기..." - -msgid "fish: Local read failed, sending zeros" -msgstr "fish: 로컬 읽기 실패, 0 보내기" - -msgid "fish: storing file" -msgstr "fish: 파일 저장중" - -msgid "Aborting transfer..." -msgstr "전송을 중단하는 중..." - -msgid "Error reported after abort." -msgstr "중단 후 오류가 보고됨" - -msgid "Aborted transfer would be successful." -msgstr "중단된 전송이 성공적으로 완료되었을 수 있음." +msgid "Warning: cannot open %s directory\n" +msgstr "경고: %s 디렉터리를 열 수 없음\n" #, c-format msgid "ftpfs: Disconnecting from %s" @@ -4269,11 +4220,11 @@ msgstr "ftpfs: 서버 연결 실패: %s" #, c-format msgid "Waiting to retry... %d (Control-G to cancel)" -msgstr "재시도 대기 중... %d(Control-G가 취소됨)" +msgstr "재시도 대기 중... %d(취소하려면 Control-G)" #, c-format msgid "ftpfs: could not make address-to-name translation: %s" -msgstr "ftpfs: 주소를 이름으로 변환할 수 없습니다: %s" +msgstr "ftpfs: 주소를 이름으로 변환할 수 없음: %s" #, c-format msgid "ftpfs: try reconnect to server, attempt %u" @@ -4281,20 +4232,20 @@ msgstr "ftpfs: 서버에 다시 연결 시도, %u 시도" #, c-format msgid "ftpfs: could not get socket name: %s" -msgstr "ftpfs: 소켓 이름을 가져올 수 없습니다: %s" +msgstr "ftpfs: 소켓 이름을 가져올 수 없음: %s" msgid "ftpfs: could not reconnect to server" -msgstr "ftpfs: 서버에 다시 연결할 수 없습니다" +msgstr "ftpfs: 서버에 다시 연결할 수 없음" msgid "ftpfs: invalid address family" -msgstr "ftpfs: 잘못된 주소 패밀리" +msgstr "ftpfs: 잘못된 주소 계열" #, c-format msgid "ftpfs: could not create socket: %s" -msgstr "ftpfs: 소켓을 만들 수 없습니다: %s" +msgstr "ftpfs: 소켓을 만들 수 없음: %s" msgid "ftpfs: could not setup passive mode" -msgstr "ftpfs: 패시브 모드를 설정할 수 없습니다" +msgstr "ftpfs: 패시브 모드를 설정할 수 없음" msgid "ftpfs: aborting transfer." msgstr "ftpfs: 전송 중단." @@ -4310,10 +4261,10 @@ msgid "ftpfs: CWD failed." msgstr "ftpfs: CWD 실패." msgid "ftpfs: couldn't resolve symlink" -msgstr "ftpfs: 심볼릭링크를 확인할 수 없습니다" +msgstr "ftpfs: 심볼릭 링크를 확인할 수 없음" msgid "Resolving symlink..." -msgstr "심볼릭링크 해결 중..." +msgstr "심볼릭 링크 해결 중..." #, c-format msgid "ftpfs: Reading FTP directory %s... %s%s" @@ -4323,10 +4274,18 @@ msgid "(strict rfc959)" msgstr "(엄격하게 rfc959를 따름)" msgid "(chdir first)" -msgstr "(먼저 디렉터리 변경)" +msgstr "(chdir 먼저)" msgid "ftpfs: failed; nowhere to fallback to" -msgstr "ftpfs: 실패함, 어디에서도 fallback할 수 없습니다" +msgstr "ftpfs: 실패함, 어디에서도 fallback할 수 없음" + +#, c-format +msgid "%s: failure" +msgstr "%s: 실패" + +#, c-format +msgid "%s: done." +msgstr "%s: 완료." msgid "ftpfs: storing file" msgstr "ftpfs: 파일 저장중" @@ -4348,7 +4307,7 @@ msgstr "" #, c-format msgid "%s: Warning: file %s not found\n" -msgstr "%s: 경고: %s 파일을 찾을 수 없습니다\n" +msgstr "%s: 경고: %s 파일을 찾을 수 없음\n" #, c-format msgid "" @@ -4388,7 +4347,7 @@ msgid "sftp: making connection to %s" msgstr "sftp: %s에 연결" msgid "sftp: connection interrupted by user" -msgstr "sftp: 사용자에 의해 연결이 중단됨" +msgstr "sftp: 사용자가 연결을 중단함" #, c-format msgid "sftp: connection to server failed: %s" @@ -4398,7 +4357,7 @@ msgid "sftp: found host key of unsupported type: RSA1" msgstr "sftp: 지원되지 않는 유형의 호스트 키를 찾았습니다: RSA1" msgid "sftp: unknown host key type:" -msgstr "sftp: 호스트 키 유형을 알 수 없습니다:" +msgstr "sftp: 호스트 키 유형을 알 수 없음:" #, c-format msgid "" @@ -4411,13 +4370,13 @@ msgstr "" "영구적으로 추가되었습니다." msgid "sftp: cannot get the remote host key" -msgstr "sftp: 원격 호스트 키를 가져올 수 없습니다" +msgstr "sftp: 원격 호스트 키를 가져올 수 없음" msgid "sftp: unsupported key type, can't check remote host key" -msgstr "sftp: 지원되지 않는 키 유형, 원격 호스트 키를 확인할 수 없습니다" +msgstr "sftp: 지원되지 않는 키 유형, 원격 호스트 키를 확인할 수 없음" msgid "sftp: can't compute host key fingerprint hash" -msgstr "sftp: 호스트 키 지문 해시를 계산할 수 없습니다" +msgstr "sftp: 호스트 키 지문 해시를 계산할 수 없음" #, c-format msgid "" @@ -4468,7 +4427,7 @@ msgid "sftp: failure establishing SSH session" msgstr "sftp: SSH 세션을 설정하지 못했습니다" msgid "sftp: No file handler data present for reading file" -msgstr "sftp: 파일을 읽기 위한 파일 처리기 데이터가 없습니다" +msgstr "sftp: 파일을 읽기 위한 파일 처리기 데이터가 없음" #, c-format msgid "sftp: socket error: %s" @@ -4481,8 +4440,54 @@ msgstr "sftp: (Ctrl-G break) 목록... %s" msgid "sftp: Listing done." msgstr "sftp: 목록 작성 완료." +#, c-format +msgid "shell: Disconnecting from %s" +msgstr "셸: %s 연결 끊는 중" + +msgid "shell: Waiting for initial line..." +msgstr "셸: 초기 행 기다리는 중..." + +msgid "Sorry, we cannot do password authenticated connections for now." +msgstr "죄송합니다. 지금은 비밀번호 인증 연결을 사용할 수 없습니다." + +#, c-format +msgid "shell: Password is required for %s" +msgstr "셸: %s 암호가 필요합니다" + +msgid "shell: Sending password..." +msgstr "셸: 암호 보내는 중..." + +msgid "shell: Sending initial line..." +msgstr "셸: 초기 행 보내는 중..." + +msgid "shell: Getting host info..." +msgstr "셸: 호스트 정보 가져오는 중..." + +#, c-format +msgid "shell: Reading directory %s..." +msgstr "셸: %s 디렉터리 읽는 중..." + +#, c-format +msgid "shell: store %s: sending command..." +msgstr "셸: %s 저장: 명령 보내는 중..." + +msgid "shell: Local read failed, sending zeros" +msgstr "셸: 로컬 읽기를 실패했습니다. 0값 보내는 중" + +msgid "shell: storing file" +msgstr "셸: 파일 저장 중" + +msgid "Aborting transfer..." +msgstr "전송을 중단하는 중..." + +msgid "Error reported after abort." +msgstr "중단 후 오류가 보고됨" + +msgid "Aborted transfer would be successful." +msgstr "중단된 전송이 성공적으로 완료되었을 수 있음." + msgid "Inconsistent tar archive" -msgstr "잘못된 tar 압축파일" +msgstr "잘못된 tar 압축 파일" msgid "Unexpected EOF on archive file" msgstr "압축 파일에 예기치 않은 EOF가 있음" @@ -4492,7 +4497,7 @@ msgid "" "Cannot open tar archive\n" "%s" msgstr "" -"tar 압축파일을 열 수 없습니다\n" +"tar 압축 파일을 열 수 없음\n" "%s" #, c-format @@ -4500,9 +4505,11 @@ msgid "" "%s\n" "doesn't look like a tar archive" msgstr "" +"%s\n" +"tar 압축 파일처럼 보이지 않습니다" msgid "tar: mc_lseek not stopped at a record boundary" -msgstr "" +msgstr "tar: mc_lseek가 레코드 경계에서 멈추지 않았습니다" msgid "undelfs: error" msgstr "unelfs: 오류" @@ -4530,7 +4537,7 @@ msgid "while calling ext2_block_iterate %d" msgstr "ext2_block_iterate %d을(를) 호출하는 중" msgid "no more memory while reallocating array" -msgstr "배열을 재할당하는 동안 메모리가 더 이상 없습니다" +msgstr "배열을 재할당하는 동안 메모리가 더 이상 없음" #, c-format msgid "while doing inode scan %d" @@ -4538,7 +4545,7 @@ msgstr "inode 스캔 %d를 수행하는 동안" #, c-format msgid "Cannot open file %s" -msgstr "%s 파일을 열 수 없습니다" +msgstr "%s 파일을 열 수 없음" msgid "undelfs: reading inode bitmap..." msgstr "unelfs: inode 비트맵 읽는 중..." @@ -4548,7 +4555,7 @@ msgid "" "Cannot load inode bitmap from:\n" "%s" msgstr "" -"다음 위치에서 inode 비트맵을 로드할 수 없습니다:\n" +"다음 위치에서 inode 비트맵을 로드할 수 없음:\n" "%s" msgid "undelfs: reading block bitmap..." @@ -4559,7 +4566,7 @@ msgid "" "Cannot load block bitmap from:\n" "%s" msgstr "" -"블록 비트맵을 로드할 수 없습니다:\n" +"블록 비트맵을 로드할 수 없음:\n" "%s" msgid "vfs_info is not fs!" @@ -4573,7 +4580,7 @@ msgstr "블록을 반복하는 동안" #, c-format msgid "Cannot open file \"%s\"" -msgstr "%s 파일을 열 수 없습니다" +msgstr "\"%s\" 파일을 열 수 없음" msgid "Ext2lib error" msgstr "Ext2lib 오류" @@ -4582,7 +4589,7 @@ msgid "Invalid value" msgstr "잘못된 값" msgid "File was modified. Save with exit?" -msgstr "파일이 수정되었습니다. 종료와 함께 저장하시겠습니까?" +msgstr "파일이 수정되었습니다. 저장 후 나가시겠습니까?" msgid "&Cancel quit" msgstr "끝내기 취소(&C)" @@ -4595,13 +4602,13 @@ msgstr "" "수정된 파일을 저장하시겠습니까?" msgid "&Line number" -msgstr "줄 번호(&L)" +msgstr "행 번호(&L)" msgid "Pe&rcents" msgstr "퍼센트(&R)" msgid "&Decimal offset" -msgstr "10 진수 오프셋(&D)" +msgstr "10진수 오프셋(&D)" msgid "He&xadecimal offset" msgstr "16진수 오프셋(&X)" @@ -4610,7 +4617,7 @@ msgid "Goto" msgstr "건너뛰기" msgid "ButtonBar|Ascii" -msgstr "Ascii" +msgstr "아스키" msgid "ButtonBar|HxSrch" msgstr "16비트 검색" @@ -4622,16 +4629,16 @@ msgid "ButtonBar|Wrap" msgstr "줄바꿈" msgid "ButtonBar|Hex" -msgstr " 16비트" +msgstr "16비트" msgid "ButtonBar|Goto" -msgstr " Goto" +msgstr "건너뛰기" msgid "ButtonBar|Raw" -msgstr " 원본 형식" +msgstr "원본 형식" msgid "ButtonBar|Parse" -msgstr " 구문 분석" +msgstr "분석" msgid "ButtonBar|Unform" msgstr " 형식화되지 않음" @@ -4644,7 +4651,7 @@ msgid "" "Failed to read data from child stdout:\n" "%s" msgstr "" -"하위 프로세스의 stdout에서 ​​데이터를 읽을 수 없습니다:\n" +"하위 프로세스의 stdout에서 ​​데이터를 읽을 수 없음:\n" "%s" #, c-format @@ -4662,7 +4669,7 @@ msgid "" "Cannot save file:\n" "%s" msgstr "" -"파일을 저장할 수 없습니다:\n" +"파일을 저장할 수 없음:\n" "%s" msgid "View: " @@ -4673,18 +4680,18 @@ msgid "" "Cannot open \"%s\"\n" "%s" msgstr "" -"%s을(를) 열 수 없습니다\n" +"\"%s\"을(를) 열 수 없음\n" "%s" msgid "Cannot view: not a regular file" -msgstr "볼 수 없습니다: 일반 파일이 아님" +msgstr "볼 수 없음: 일반 파일이 아님" #, c-format msgid "" "Cannot open \"%s\" in parse mode\n" "%s" msgstr "" -"%s을(를) 구문 모드에서 열 수 없습니다\n" +"\"%s\"을(를) 분석 모드에서 열 수 없음\n" "%s" msgid "Search done" @@ -4694,4 +4701,4 @@ msgid "Continue from beginning?" msgstr "처음부터 계속하시겠습니까?" msgid "Cannot fetch a local copy of /ftp://some.host/editme.txt" -msgstr "/ftp://some.host/editme.txt의 로컬 복사본을 가져올 수 없습니다" +msgstr "/ftp://some.host/editme.txt의 로컬 복사본을 가져올 수 없음" diff --git a/mcsrc/po/kw.po b/mcsrc/po/kw.po index 25ca5b09..1aedd17e 100644 --- a/mcsrc/po/kw.po +++ b/mcsrc/po/kw.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Midnight Commander\n" "Report-Msgid-Bugs-To: https://www.midnight-commander.org/\n" -"POT-Creation-Date: 2023-08-06 15:50+0200\n" +"POT-Creation-Date: 2024-01-20 20:51+0100\n" "PO-Revision-Date: 2010-12-29 10:19+0000\n" "Last-Translator: FULL NAME \n" "Language-Team: Cornish (http://app.transifex.com/mc/mc/language/kw/)\n" @@ -709,7 +709,8 @@ msgid "" " errdhotfocus\n" " Menus: menunormal, menuhot, menusel, menuhotsel, menuinactive\n" " Popup menus: pmenunormal, pmenusel, pmenutitle\n" -" Editor: editnormal, editbold, editmarked, editwhitespace,\n" +" Editor: editnormal, editbold, editmarked, editwhitespace, " +"editnonprintable,\n" " editlinestate, editbg, editframe, editframeactive\n" " editframedrag\n" " Viewer: viewnormal,viewbold, viewunderline, viewselected\n" @@ -1545,7 +1546,7 @@ msgid "" "written for the Midnight Commander." msgstr "" -msgid "Copyright (C) 1996-2023 the Free Software Foundation" +msgid "Copyright (C) 1996-2024 the Free Software Foundation" msgstr "" msgid "About" @@ -3922,65 +3923,23 @@ msgid "" "%s" msgstr "" -#, c-format -msgid "Warning: cannot open %s directory\n" -msgstr "" - -#, c-format -msgid "fish: Disconnecting from %s" -msgstr "" - -msgid "fish: Waiting for initial line..." -msgstr "" - -msgid "Sorry, we cannot do password authenticated connections for now." -msgstr "" - -#, c-format -msgid "fish: Password is required for %s" -msgstr "" - -msgid "fish: Sending password..." -msgstr "" - -msgid "fish: Sending initial line..." -msgstr "" - -msgid "fish: Handshaking version..." -msgstr "" - -msgid "fish: Getting host info..." -msgstr "" - -#, c-format -msgid "fish: Reading directory %s..." +msgid "" +"EXTFS virtual file system:\n" +"wrong file name" msgstr "" -#, c-format -msgid "%s: done." +msgid "" +"EXTFS virtual file system:\n" +"wrong archive name" msgstr "" -#, c-format -msgid "%s: failure" +msgid "" +"EXTFS virtual file system:\n" +"cannot build command" msgstr "" #, c-format -msgid "fish: store %s: sending command..." -msgstr "" - -msgid "fish: Local read failed, sending zeros" -msgstr "" - -msgid "fish: storing file" -msgstr "" - -msgid "Aborting transfer..." -msgstr "" - -msgid "Error reported after abort." -msgstr "" - -msgid "Aborted transfer would be successful." +msgid "Warning: cannot open %s directory\n" msgstr "" #, c-format @@ -4093,6 +4052,14 @@ msgstr "" msgid "ftpfs: failed; nowhere to fallback to" msgstr "" +#, c-format +msgid "%s: failure" +msgstr "" + +#, c-format +msgid "%s: done." +msgstr "" + msgid "ftpfs: storing file" msgstr "" @@ -4226,6 +4193,52 @@ msgstr "" msgid "sftp: Listing done." msgstr "" +#, c-format +msgid "shell: Disconnecting from %s" +msgstr "" + +msgid "shell: Waiting for initial line..." +msgstr "" + +msgid "Sorry, we cannot do password authenticated connections for now." +msgstr "" + +#, c-format +msgid "shell: Password is required for %s" +msgstr "" + +msgid "shell: Sending password..." +msgstr "" + +msgid "shell: Sending initial line..." +msgstr "" + +msgid "shell: Getting host info..." +msgstr "" + +#, c-format +msgid "shell: Reading directory %s..." +msgstr "" + +#, c-format +msgid "shell: store %s: sending command..." +msgstr "" + +msgid "shell: Local read failed, sending zeros" +msgstr "" + +msgid "shell: storing file" +msgstr "" + +msgid "Aborting transfer..." +msgstr "" + +msgid "Error reported after abort." +msgstr "" + +msgid "Aborted transfer would be successful." +msgstr "" + msgid "Inconsistent tar archive" msgstr "" diff --git a/mcsrc/po/lt.po b/mcsrc/po/lt.po index c9ea554f..f8f0087d 100644 --- a/mcsrc/po/lt.po +++ b/mcsrc/po/lt.po @@ -14,7 +14,7 @@ msgid "" msgstr "" "Project-Id-Version: Midnight Commander\n" "Report-Msgid-Bugs-To: https://www.midnight-commander.org/\n" -"POT-Creation-Date: 2023-08-06 15:50+0200\n" +"POT-Creation-Date: 2024-01-20 20:51+0100\n" "PO-Revision-Date: 2010-12-29 10:19+0000\n" "Last-Translator: Mantas Kriaučiūnas Baltix , 2020\n" "Language-Team: Lithuanian (http://app.transifex.com/mc/mc/language/lt/)\n" @@ -734,7 +734,8 @@ msgid "" " errdhotfocus\n" " Menus: menunormal, menuhot, menusel, menuhotsel, menuinactive\n" " Popup menus: pmenunormal, pmenusel, pmenutitle\n" -" Editor: editnormal, editbold, editmarked, editwhitespace,\n" +" Editor: editnormal, editbold, editmarked, editwhitespace, " +"editnonprintable,\n" " editlinestate, editbg, editframe, editframeactive\n" " editframedrag\n" " Viewer: viewnormal,viewbold, viewunderline, viewselected\n" @@ -1589,7 +1590,7 @@ msgstr "" "Lengvas vartoti teksto redaktorius\n" "sukurtas Midnight Commander aplinkai." -msgid "Copyright (C) 1996-2023 the Free Software Foundation" +msgid "Copyright (C) 1996-2024 the Free Software Foundation" msgstr "" msgid "About" @@ -4030,66 +4031,24 @@ msgid "" "%s" msgstr "" -#, c-format -msgid "Warning: cannot open %s directory\n" -msgstr "Įspėjimas: nepavyko pereiti į aplanką %s\n" - -#, c-format -msgid "fish: Disconnecting from %s" -msgstr "fish: atsijungiama nuo %s" - -msgid "fish: Waiting for initial line..." -msgstr "fish: laukiama pradinės eilutės..." - -msgid "Sorry, we cannot do password authenticated connections for now." -msgstr "Šiuo metu slaptažodžių apsaugotų prisijungimų atlikti negalima." - -#, c-format -msgid "fish: Password is required for %s" +msgid "" +"EXTFS virtual file system:\n" +"wrong file name" msgstr "" -msgid "fish: Sending password..." -msgstr "fish: siunčiamas slaptažodis..." - -msgid "fish: Sending initial line..." -msgstr "fish: siunčiama pradinė linija..." - -msgid "fish: Handshaking version..." -msgstr "fish: derinamos versijos..." - -msgid "fish: Getting host info..." +msgid "" +"EXTFS virtual file system:\n" +"wrong archive name" msgstr "" -#, c-format -msgid "fish: Reading directory %s..." -msgstr "fish: atveriamas aplankas %s..." - -#, c-format -msgid "%s: done." -msgstr "%s: atlikta." - -#, c-format -msgid "%s: failure" -msgstr "%s: nepavyko" - -#, c-format -msgid "fish: store %s: sending command..." -msgstr "fish: „%s“ siuntimas: siunčiamas slaptažodis..." - -msgid "fish: Local read failed, sending zeros" -msgstr "fish: vietinis skaitymas nepavyko, siunčiami nuliai" - -msgid "fish: storing file" +msgid "" +"EXTFS virtual file system:\n" +"cannot build command" msgstr "" -msgid "Aborting transfer..." -msgstr "Nutraukiamas siuntimas..." - -msgid "Error reported after abort." -msgstr "Po nutraukties pranešta klaida." - -msgid "Aborted transfer would be successful." -msgstr "Nutrauktas siuntimas būtų sėkmingas." +#, c-format +msgid "Warning: cannot open %s directory\n" +msgstr "Įspėjimas: nepavyko pereiti į aplanką %s\n" #, c-format msgid "ftpfs: Disconnecting from %s" @@ -4201,6 +4160,14 @@ msgstr "(keičiamas katalogas)" msgid "ftpfs: failed; nowhere to fallback to" msgstr "ftpfs: nepavyko; nėra kur grįžti" +#, c-format +msgid "%s: failure" +msgstr "%s: nepavyko" + +#, c-format +msgid "%s: done." +msgstr "%s: atlikta." + msgid "ftpfs: storing file" msgstr "" @@ -4338,6 +4305,52 @@ msgstr "" msgid "sftp: Listing done." msgstr "" +#, c-format +msgid "shell: Disconnecting from %s" +msgstr "" + +msgid "shell: Waiting for initial line..." +msgstr "" + +msgid "Sorry, we cannot do password authenticated connections for now." +msgstr "Šiuo metu slaptažodžių apsaugotų prisijungimų atlikti negalima." + +#, c-format +msgid "shell: Password is required for %s" +msgstr "" + +msgid "shell: Sending password..." +msgstr "" + +msgid "shell: Sending initial line..." +msgstr "" + +msgid "shell: Getting host info..." +msgstr "" + +#, c-format +msgid "shell: Reading directory %s..." +msgstr "" + +#, c-format +msgid "shell: store %s: sending command..." +msgstr "" + +msgid "shell: Local read failed, sending zeros" +msgstr "" + +msgid "shell: storing file" +msgstr "" + +msgid "Aborting transfer..." +msgstr "Nutraukiamas siuntimas..." + +msgid "Error reported after abort." +msgstr "Po nutraukties pranešta klaida." + +msgid "Aborted transfer would be successful." +msgstr "Nutrauktas siuntimas būtų sėkmingas." + msgid "Inconsistent tar archive" msgstr "Nevientisas tar archyvas" diff --git a/mcsrc/po/lv.po b/mcsrc/po/lv.po index c60682fa..0eeaace0 100644 --- a/mcsrc/po/lv.po +++ b/mcsrc/po/lv.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Midnight Commander\n" "Report-Msgid-Bugs-To: https://www.midnight-commander.org/\n" -"POT-Creation-Date: 2023-08-06 15:50+0200\n" +"POT-Creation-Date: 2024-01-20 20:51+0100\n" "PO-Revision-Date: 2010-12-29 10:19+0000\n" "Last-Translator: Slava Zanko , 2011\n" "Language-Team: Latvian (http://app.transifex.com/mc/mc/language/lv/)\n" @@ -707,7 +707,8 @@ msgid "" " errdhotfocus\n" " Menus: menunormal, menuhot, menusel, menuhotsel, menuinactive\n" " Popup menus: pmenunormal, pmenusel, pmenutitle\n" -" Editor: editnormal, editbold, editmarked, editwhitespace,\n" +" Editor: editnormal, editbold, editmarked, editwhitespace, " +"editnonprintable,\n" " editlinestate, editbg, editframe, editframeactive\n" " editframedrag\n" " Viewer: viewnormal,viewbold, viewunderline, viewselected\n" @@ -1543,7 +1544,7 @@ msgid "" "written for the Midnight Commander." msgstr "" -msgid "Copyright (C) 1996-2023 the Free Software Foundation" +msgid "Copyright (C) 1996-2024 the Free Software Foundation" msgstr "" msgid "About" @@ -3940,68 +3941,25 @@ msgid "" "%s" msgstr "" -#, c-format -msgid "Warning: cannot open %s directory\n" -msgstr "" - -#, c-format -msgid "fish: Disconnecting from %s" -msgstr "fish: Atvienojamies no %s" - -msgid "fish: Waiting for initial line..." -msgstr "fish: Gaidām sākotnējo līniju..." - -msgid "Sorry, we cannot do password authenticated connections for now." +msgid "" +"EXTFS virtual file system:\n" +"wrong file name" msgstr "" -"Piedodiet, mēs patreiz nevaram veikt ar paroli autorizētus savienojumus." -#, c-format -msgid "fish: Password is required for %s" +msgid "" +"EXTFS virtual file system:\n" +"wrong archive name" msgstr "" -msgid "fish: Sending password..." -msgstr "fish: Sūtam paroli..." - -msgid "fish: Sending initial line..." -msgstr "fish: Sūtam sākotnējo līniju..." - -msgid "fish: Handshaking version..." -msgstr "fish: Rokspiešanas versija..." - -msgid "fish: Getting host info..." +msgid "" +"EXTFS virtual file system:\n" +"cannot build command" msgstr "" #, c-format -msgid "fish: Reading directory %s..." -msgstr "fish: Lasām direktoriju %s..." - -#, c-format -msgid "%s: done." -msgstr "%s: izdarīts." - -#, c-format -msgid "%s: failure" -msgstr "%s: neveiksme" - -#, c-format -msgid "fish: store %s: sending command..." -msgstr "fish: glabājam %s: sutām komandu..." - -msgid "fish: Local read failed, sending zeros" -msgstr "fish: Lokālā lasīšana kļūdaina, sūtam nulles" - -msgid "fish: storing file" +msgid "Warning: cannot open %s directory\n" msgstr "" -msgid "Aborting transfer..." -msgstr "Pātraucam pārraidīšanu..." - -msgid "Error reported after abort." -msgstr "Kļūda paziņota pēc pātraukšanas." - -msgid "Aborted transfer would be successful." -msgstr "Pātraukā pārraidīšana varētu būt veiksmīga" - #, c-format msgid "ftpfs: Disconnecting from %s" msgstr "ftpfs: Atvienošanās no %s" @@ -4112,6 +4070,14 @@ msgstr "(chdir vispirms)" msgid "ftpfs: failed; nowhere to fallback to" msgstr "ftpfs: neizdevās; nav kur atkrist" +#, c-format +msgid "%s: failure" +msgstr "%s: neveiksme" + +#, c-format +msgid "%s: done." +msgstr "%s: izdarīts." + msgid "ftpfs: storing file" msgstr "" @@ -4249,6 +4215,53 @@ msgstr "" msgid "sftp: Listing done." msgstr "" +#, c-format +msgid "shell: Disconnecting from %s" +msgstr "" + +msgid "shell: Waiting for initial line..." +msgstr "" + +msgid "Sorry, we cannot do password authenticated connections for now." +msgstr "" +"Piedodiet, mēs patreiz nevaram veikt ar paroli autorizētus savienojumus." + +#, c-format +msgid "shell: Password is required for %s" +msgstr "" + +msgid "shell: Sending password..." +msgstr "" + +msgid "shell: Sending initial line..." +msgstr "" + +msgid "shell: Getting host info..." +msgstr "" + +#, c-format +msgid "shell: Reading directory %s..." +msgstr "" + +#, c-format +msgid "shell: store %s: sending command..." +msgstr "" + +msgid "shell: Local read failed, sending zeros" +msgstr "" + +msgid "shell: storing file" +msgstr "" + +msgid "Aborting transfer..." +msgstr "Pātraucam pārraidīšanu..." + +msgid "Error reported after abort." +msgstr "Kļūda paziņota pēc pātraukšanas." + +msgid "Aborted transfer would be successful." +msgstr "Pātraukā pārraidīšana varētu būt veiksmīga" + msgid "Inconsistent tar archive" msgstr "Neatbilstīgs tar arhīvs" diff --git a/mcsrc/po/mc.pot b/mcsrc/po/mc.pot index bd3a99cb..d0f68b43 100644 --- a/mcsrc/po/mc.pot +++ b/mcsrc/po/mc.pot @@ -5,9 +5,9 @@ # msgid "" msgstr "" -"Project-Id-Version: mc 4.8.30-pre1-7-g7f7ae6e04\n" +"Project-Id-Version: mc 4.8.30-111-gb03981f1f\n" "Report-Msgid-Bugs-To: https://www.midnight-commander.org/\n" -"POT-Creation-Date: 2023-08-13 20:47+0200\n" +"POT-Creation-Date: 2024-01-14 17:58+0300\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -17,15 +17,15 @@ msgstr "" "Content-Transfer-Encoding: 8bit\n" # "Plural-Forms: nplurals=INTEGER; plural=EXPRESSION;\n" -#: lib/charsets.c:219 +#: lib/charsets.c:220 msgid "Warning: cannot load codepages list" msgstr "" -#: lib/charsets.c:222 src/filemanager/boxes.c:387 +#: lib/charsets.c:223 src/filemanager/boxes.c:387 msgid "7-bit ASCII" msgstr "" -#: lib/charsets.c:317 lib/charsets.c:328 +#: lib/charsets.c:318 lib/charsets.c:329 #, c-format msgid "Cannot translate from %s to %s" msgstr "" @@ -123,11 +123,11 @@ msgstr "" msgid "Invalid token number %d" msgstr "" -#: lib/search/regex.c:340 lib/search/regex.c:839 src/filemanager/ext.c:758 +#: lib/search/regex.c:340 lib/search/regex.c:838 src/filemanager/ext.c:775 msgid "Regular expression error" msgstr "" -#: lib/search/search.c:55 src/diffviewer/ydiff.c:2423 +#: lib/search/search.c:55 src/diffviewer/ydiff.c:2347 tmp/ydiff.c:2404 msgid "No&rmal" msgstr "" @@ -143,21 +143,21 @@ msgstr "" msgid "Wil&dcard search" msgstr "" -#: lib/skin/common.c:133 +#: lib/skin/common.c:134 #, c-format msgid "" "Unable to load '%s' skin.\n" "Default skin has been loaded" msgstr "" -#: lib/skin/common.c:143 +#: lib/skin/common.c:144 #, c-format msgid "" "Unable to parse '%s' skin.\n" "Default skin has been loaded" msgstr "" -#: lib/skin/common.c:155 +#: lib/skin/common.c:156 #, c-format msgid "" "Unable to use '%s' skin with true colors support:\n" @@ -165,7 +165,7 @@ msgid "" "Default skin has been loaded" msgstr "" -#: lib/skin/common.c:167 +#: lib/skin/common.c:168 #, c-format msgid "" "Unable to use '%s' skin with 256 colors support\n" @@ -602,31 +602,31 @@ msgid "" "Check the TERM environment variable.\n" msgstr "" -#: lib/util.c:351 +#: lib/util.c:355 msgid "B" msgstr "" -#: lib/util.c:356 +#: lib/util.c:360 msgid "kB" msgstr "" -#: lib/util.c:356 +#: lib/util.c:360 msgid "KiB" msgstr "" -#: lib/util.c:361 +#: lib/util.c:365 msgid "MB" msgstr "" -#: lib/util.c:361 +#: lib/util.c:365 msgid "MiB" msgstr "" -#: lib/util.c:366 +#: lib/util.c:370 msgid "GB" msgstr "" -#: lib/util.c:366 +#: lib/util.c:370 msgid "GiB" msgstr "" @@ -750,44 +750,44 @@ msgstr "" msgid "Do you want clean this history?" msgstr "" -#: lib/widget/listbox.c:325 src/diffviewer/ydiff.c:3090 src/editor/edit.c:369 -#: src/editor/editcmd.c:180 src/editor/editcmd.c:203 src/editor/editcmd.c:1522 -#: src/editor/editcmd.c:1528 src/filemanager/cmd.c:145 +#: lib/widget/listbox.c:325 src/diffviewer/ydiff.c:3021 src/editor/edit.c:375 +#: src/editor/editcmd.c:180 src/editor/editcmd.c:203 src/editor/editcmd.c:1473 +#: src/editor/editcmd.c:1479 src/filemanager/cmd.c:145 #: src/filemanager/file.c:1014 src/filemanager/file.c:2022 #: src/filemanager/filegui.c:482 src/filemanager/filemanager.c:1056 #: src/filemanager/filemanager.c:1064 src/filemanager/hotlist.c:1164 #: src/filemanager/hotlist.c:1181 src/filemanager/panel.c:2961 #: src/filemanager/tree.c:826 src/subshell/common.c:1653 -#: src/vfs/sftpfs/connection.c:521 src/vfs/sftpfs/connection.c:533 -#: src/viewer/actions_cmd.c:644 src/viewer/actions_cmd.c:650 -#: src/viewer/search.c:452 +#: src/vfs/sftpfs/connection.c:562 src/vfs/sftpfs/connection.c:574 +#: src/viewer/actions_cmd.c:634 src/viewer/actions_cmd.c:640 +#: src/viewer/search.c:452 tmp/ydiff.c:3069 msgid "&Yes" msgstr "" -#: lib/widget/listbox.c:325 src/diffviewer/ydiff.c:3090 src/editor/edit.c:369 -#: src/editor/editcmd.c:180 src/editor/editcmd.c:1522 src/editor/editcmd.c:1528 +#: lib/widget/listbox.c:325 src/diffviewer/ydiff.c:3021 src/editor/edit.c:375 +#: src/editor/editcmd.c:180 src/editor/editcmd.c:1473 src/editor/editcmd.c:1479 #: src/filemanager/cmd.c:145 src/filemanager/file.c:1014 #: src/filemanager/file.c:2022 src/filemanager/filegui.c:484 #: src/filemanager/filemanager.c:1056 src/filemanager/filemanager.c:1064 #: src/filemanager/hotlist.c:1164 src/filemanager/hotlist.c:1181 #: src/filemanager/panel.c:2961 src/filemanager/tree.c:826 -#: src/subshell/common.c:1653 src/vfs/sftpfs/connection.c:521 -#: src/vfs/sftpfs/connection.c:533 src/viewer/actions_cmd.c:644 -#: src/viewer/actions_cmd.c:650 src/viewer/search.c:453 +#: src/subshell/common.c:1653 src/vfs/sftpfs/connection.c:562 +#: src/vfs/sftpfs/connection.c:574 src/viewer/actions_cmd.c:634 +#: src/viewer/actions_cmd.c:640 src/viewer/search.c:453 tmp/ydiff.c:3069 msgid "&No" msgstr "" #: lib/widget/quick.h:213 src/editor/editsearch.c:105 -#: src/editor/editsearch.c:1021 src/editor/editwidget.c:157 +#: src/editor/editsearch.c:1018 src/editor/editwidget.c:157 #: src/filemanager/boxes.c:1292 src/filemanager/filegui.c:1386 #: src/filemanager/find.c:605 src/filemanager/layout.c:511 src/main.c:414 msgid "&OK" msgstr "" #: lib/widget/quick.h:214 src/editor/editcmd.c:180 src/editor/editcmd.c:203 -#: src/editor/editcmd.c:375 src/editor/editcmd.c:519 src/editor/editcmd.c:939 -#: src/editor/editcmd.c:1016 src/editor/editcmd.c:1522 -#: src/editor/editcmd.c:2018 src/editor/editcmd.c:2047 +#: src/editor/editcmd.c:375 src/editor/editcmd.c:517 src/editor/editcmd.c:953 +#: src/editor/editcmd.c:1030 src/editor/editcmd.c:1473 +#: src/editor/editcmd.c:1969 src/editor/editcmd.c:1998 #: src/editor/editsearch.c:107 src/editor/editsearch.c:252 #: src/editor/etags.c:375 src/editor/spell.c:750 src/filemanager/achown.c:89 #: src/filemanager/achown.c:863 src/filemanager/achown.c:900 @@ -806,10 +806,10 @@ msgstr "" msgid "Background process:" msgstr "" -#: lib/widget/wtools.c:295 lib/widget/wtools.c:424 src/editor/edit.c:209 -#: src/editor/edit.c:230 src/editor/edit.c:381 src/editor/edit.c:1989 -#: src/editor/edit.c:1999 src/editor/editcmd.c:265 src/editor/editcmd.c:275 -#: src/editor/editcmd.c:318 src/editor/editcmd.c:1626 src/editor/spell.c:325 +#: lib/widget/wtools.c:295 lib/widget/wtools.c:424 src/editor/edit.c:210 +#: src/editor/edit.c:231 src/editor/edit.c:387 src/editor/edit.c:2022 +#: src/editor/edit.c:2032 src/editor/editcmd.c:265 src/editor/editcmd.c:275 +#: src/editor/editcmd.c:318 src/editor/editcmd.c:1577 src/editor/spell.c:325 #: src/editor/spell.c:545 src/editor/spell.c:553 #: tests/src/execute__common.c:150 #: tests/src/execute__execute_with_vfs_arg.c:152 @@ -823,7 +823,7 @@ msgstr "" #: lib/widget/wtools.c:704 src/filemanager/file.c:893 #: src/filemanager/file.c:967 src/filemanager/file.c:969 -#: src/filemanager/file.c:1015 src/filemanager/file.c:3174 +#: src/filemanager/file.c:1015 src/filemanager/file.c:3179 #: src/filemanager/filegui.c:257 src/filemanager/filegui.c:506 msgid "&Abort" msgstr "" @@ -952,7 +952,8 @@ msgid "" " errdhotfocus\n" " Menus: menunormal, menuhot, menusel, menuhotsel, menuinactive\n" " Popup menus: pmenunormal, pmenusel, pmenutitle\n" -" Editor: editnormal, editbold, editmarked, editwhitespace,\n" +" Editor: editnormal, editbold, editmarked, editwhitespace, " +"editnonprintable,\n" " editlinestate, editbg, editframe, editframeactive\n" " editframedrag\n" " Viewer: viewnormal,viewbold, viewunderline, viewselected\n" @@ -1052,7 +1053,7 @@ msgid "" "than we can handle." msgstr "" -#: src/diffviewer/internal.h:15 src/diffviewer/search.c:235 +#: src/diffviewer/internal.h:15 src/diffviewer/search.c:236 #: src/editor/edit-impl.h:76 src/editor/edit-impl.h:77 src/viewer/search.c:484 #: src/viewer/search.c:486 msgid "&Dismiss" @@ -1063,52 +1064,52 @@ msgstr "" msgid "Enter search string:" msgstr "" -#: src/diffviewer/search.c:94 src/editor/editsearch.c:96 +#: src/diffviewer/search.c:95 src/editor/editsearch.c:96 #: src/editor/editsearch.c:179 src/filemanager/boxes.c:687 #: src/filemanager/boxes.c:894 src/filemanager/find.c:591 #: src/viewer/dialogs.c:89 msgid "Cas&e sensitive" msgstr "" -#: src/diffviewer/search.c:95 src/editor/editsearch.c:97 +#: src/diffviewer/search.c:96 src/editor/editsearch.c:97 #: src/editor/editsearch.c:180 src/viewer/dialogs.c:90 msgid "&Backwards" msgstr "" -#: src/diffviewer/search.c:96 src/editor/editsearch.c:99 +#: src/diffviewer/search.c:97 src/editor/editsearch.c:99 #: src/editor/editsearch.c:182 src/filemanager/find.c:602 #: src/viewer/dialogs.c:91 msgid "&Whole words" msgstr "" -#: src/diffviewer/search.c:98 src/editor/editsearch.c:101 +#: src/diffviewer/search.c:99 src/editor/editsearch.c:101 #: src/editor/editsearch.c:184 src/filemanager/find.c:589 #: src/viewer/dialogs.c:93 msgid "&All charsets" msgstr "" -#: src/diffviewer/search.c:109 src/diffviewer/search.c:235 -#: src/diffviewer/search.c:248 src/diffviewer/search.c:281 +#: src/diffviewer/search.c:110 src/diffviewer/search.c:236 +#: src/diffviewer/search.c:249 src/diffviewer/search.c:282 #: src/editor/editsearch.c:115 src/editor/editsearch.c:600 #: src/editor/editsearch.c:626 src/editor/editsearch.c:655 -#: src/editor/editsearch.c:905 src/editor/editsearch.c:916 +#: src/editor/editsearch.c:902 src/editor/editsearch.c:913 #: src/viewer/dialogs.c:104 src/viewer/search.c:404 src/viewer/search.c:464 #: src/viewer/search.c:484 src/viewer/search.c:486 msgid "Search" msgstr "" -#: src/diffviewer/search.c:248 src/diffviewer/search.c:281 +#: src/diffviewer/search.c:249 src/diffviewer/search.c:282 msgid "Search is disabled" msgstr "" -#: src/diffviewer/ydiff.c:181 +#: src/diffviewer/ydiff.c:185 tmp/ydiff.c:168 #, c-format msgid "" "Cannot create temporary diff file\n" "%s" msgstr "" -#: src/diffviewer/ydiff.c:2213 +#: src/diffviewer/ydiff.c:2143 tmp/ydiff.c:2200 #, c-format msgid "" "Cannot create backup file\n" @@ -1116,205 +1117,208 @@ msgid "" "%s" msgstr "" -#: src/diffviewer/ydiff.c:2222 +#: src/diffviewer/ydiff.c:2152 tmp/ydiff.c:2209 #, c-format msgid "" "Cannot create temporary merge file\n" "%s" msgstr "" -#: src/diffviewer/ydiff.c:2424 +#: src/diffviewer/ydiff.c:2348 tmp/ydiff.c:2405 msgid "&Fastest (Assume large files)" msgstr "" -#: src/diffviewer/ydiff.c:2425 +#: src/diffviewer/ydiff.c:2349 tmp/ydiff.c:2406 msgid "&Minimal (Find a smaller set of change)" msgstr "" -#: src/diffviewer/ydiff.c:2430 +#: src/diffviewer/ydiff.c:2354 tmp/ydiff.c:2411 msgid "Diff algorithm" msgstr "" -#: src/diffviewer/ydiff.c:2433 +#: src/diffviewer/ydiff.c:2357 tmp/ydiff.c:2414 msgid "Diff extra options" msgstr "" -#: src/diffviewer/ydiff.c:2434 +#: src/diffviewer/ydiff.c:2358 tmp/ydiff.c:2415 msgid "&Ignore case" msgstr "" -#: src/diffviewer/ydiff.c:2435 +#: src/diffviewer/ydiff.c:2359 tmp/ydiff.c:2416 msgid "Ignore tab &expansion" msgstr "" -#: src/diffviewer/ydiff.c:2436 +#: src/diffviewer/ydiff.c:2360 tmp/ydiff.c:2417 msgid "Ignore &space change" msgstr "" -#: src/diffviewer/ydiff.c:2437 +#: src/diffviewer/ydiff.c:2361 tmp/ydiff.c:2418 msgid "Ignore all &whitespace" msgstr "" -#: src/diffviewer/ydiff.c:2438 +#: src/diffviewer/ydiff.c:2362 tmp/ydiff.c:2419 msgid "Strip &trailing carriage return" msgstr "" -#: src/diffviewer/ydiff.c:2449 +#: src/diffviewer/ydiff.c:2373 tmp/ydiff.c:2430 msgid "Diff Options" msgstr "" -#: src/diffviewer/ydiff.c:2953 +#: src/diffviewer/ydiff.c:2884 tmp/ydiff.c:2932 msgid "Edit" msgstr "" -#: src/diffviewer/ydiff.c:2953 +#: src/diffviewer/ydiff.c:2884 tmp/ydiff.c:2932 msgid "Edit is disabled" msgstr "" -#: src/diffviewer/ydiff.c:2987 +#: src/diffviewer/ydiff.c:2918 tmp/ydiff.c:2966 msgid "Goto line (left)" msgstr "" -#: src/diffviewer/ydiff.c:2988 +#: src/diffviewer/ydiff.c:2919 tmp/ydiff.c:2967 msgid "Goto line (right)" msgstr "" -#: src/diffviewer/ydiff.c:2996 src/editor/editcmd.c:1709 +#: src/diffviewer/ydiff.c:2927 src/editor/editcmd.c:1660 tmp/ydiff.c:2975 msgid "Enter line:" msgstr "" -#: src/diffviewer/ydiff.c:3035 src/editor/editwidget.c:677 -#: src/filemanager/filemanager.c:1634 src/filemanager/tree.c:1169 -#: src/help.c:1164 src/viewer/display.c:90 +#: src/diffviewer/ydiff.c:2966 src/editor/editwidget.c:677 +#: src/filemanager/filemanager.c:1634 src/filemanager/tree.c:1176 +#: src/help.c:1170 src/viewer/display.c:90 tmp/ydiff.c:3014 msgid "ButtonBar|Help" msgstr "" -#: src/diffviewer/ydiff.c:3036 src/editor/editwidget.c:678 -#: src/viewer/display.c:102 +#: src/diffviewer/ydiff.c:2967 src/editor/editwidget.c:678 +#: src/viewer/display.c:102 tmp/ydiff.c:3015 msgid "ButtonBar|Save" msgstr "" -#: src/diffviewer/ydiff.c:3037 src/filemanager/filemanager.c:1637 -#: src/viewer/display.c:97 +#: src/diffviewer/ydiff.c:2968 src/filemanager/filemanager.c:1637 +#: src/viewer/display.c:97 tmp/ydiff.c:3016 msgid "ButtonBar|Edit" msgstr "" -#: src/diffviewer/ydiff.c:3038 +#: src/diffviewer/ydiff.c:2969 tmp/ydiff.c:3017 msgid "ButtonBar|Merge" msgstr "" -#: src/diffviewer/ydiff.c:3039 src/editor/editwidget.c:683 -#: src/viewer/display.c:112 +#: src/diffviewer/ydiff.c:2970 src/editor/editwidget.c:683 +#: src/viewer/display.c:112 tmp/ydiff.c:3018 msgid "ButtonBar|Search" msgstr "" -#: src/diffviewer/ydiff.c:3040 +#: src/diffviewer/ydiff.c:2971 tmp/ydiff.c:3019 msgid "ButtonBar|Options" msgstr "" -#: src/diffviewer/ydiff.c:3041 src/editor/editwidget.c:686 -#: src/filemanager/filemanager.c:1643 src/help.c:1173 src/viewer/display.c:121 -#: src/viewer/display.c:124 +#: src/diffviewer/ydiff.c:2972 src/editor/editwidget.c:686 +#: src/filemanager/filemanager.c:1643 src/help.c:1179 src/viewer/display.c:121 +#: src/viewer/display.c:124 tmp/ydiff.c:3020 msgid "ButtonBar|Quit" msgstr "" -#: src/diffviewer/ydiff.c:3087 src/editor/editcmd.c:1528 -#: src/viewer/actions_cmd.c:642 src/viewer/actions_cmd.c:648 +#: src/diffviewer/ydiff.c:3018 src/editor/editcmd.c:1479 +#: src/viewer/actions_cmd.c:632 src/viewer/actions_cmd.c:638 tmp/ydiff.c:3066 msgid "Quit" msgstr "" -#: src/diffviewer/ydiff.c:3088 +#: src/diffviewer/ydiff.c:3019 tmp/ydiff.c:3067 msgid "File(s) was modified. Save with exit?" msgstr "" -#: src/diffviewer/ydiff.c:3089 +#: src/diffviewer/ydiff.c:3020 tmp/ydiff.c:3068 msgid "" "Midnight Commander is being shut down.\n" "Save modified file(s)?" msgstr "" -#: src/diffviewer/ydiff.c:3421 src/diffviewer/ydiff.c:3424 +#: src/diffviewer/ydiff.c:3352 src/diffviewer/ydiff.c:3355 tmp/ydiff.c:3400 +#: tmp/ydiff.c:3403 msgid "Diff:" msgstr "" -#: src/diffviewer/ydiff.c:3545 src/diffviewer/ydiff.c:3555 -#: src/diffviewer/ydiff.c:3575 src/diffviewer/ydiff.c:3592 +#: src/diffviewer/ydiff.c:3475 src/diffviewer/ydiff.c:3485 +#: src/diffviewer/ydiff.c:3505 src/diffviewer/ydiff.c:3522 tmp/ydiff.c:3524 +#: tmp/ydiff.c:3534 tmp/ydiff.c:3554 tmp/ydiff.c:3571 #, c-format msgid "\"%s\" is a directory" msgstr "" -#: src/diffviewer/ydiff.c:3581 src/diffviewer/ydiff.c:3598 -#: src/filemanager/file.c:1830 src/viewer/mcviewer.c:354 +#: src/diffviewer/ydiff.c:3511 src/diffviewer/ydiff.c:3528 +#: src/filemanager/file.c:1830 src/viewer/mcviewer.c:354 tmp/ydiff.c:3560 +#: tmp/ydiff.c:3577 #, c-format msgid "" "Cannot stat \"%s\"\n" "%s" msgstr "" -#: src/diffviewer/ydiff.c:3607 +#: src/diffviewer/ydiff.c:3537 tmp/ydiff.c:3586 msgid "Diff viewer: invalid mode" msgstr "" -#: src/diffviewer/ydiff.c:3636 +#: src/diffviewer/ydiff.c:3563 tmp/ydiff.c:3616 msgid "Two files are needed to compare" msgstr "" -#: src/editor/edit.c:165 +#: src/editor/edit.c:166 #, c-format msgid "Loading: %3d%%" msgstr "" -#: src/editor/edit.c:168 +#: src/editor/edit.c:169 msgid "Loading..." msgstr "" -#: src/editor/edit.c:208 src/editor/edit.c:321 +#: src/editor/edit.c:209 src/editor/edit.c:327 #, c-format msgid "Cannot open %s for reading" msgstr "" -#: src/editor/edit.c:218 +#: src/editor/edit.c:219 msgid "Load file" msgstr "" -#: src/editor/edit.c:229 +#: src/editor/edit.c:230 #, c-format msgid "Error reading %s" msgstr "" -#: src/editor/edit.c:333 +#: src/editor/edit.c:339 #, c-format msgid "Cannot get size/permissions for %s" msgstr "" -#: src/editor/edit.c:342 +#: src/editor/edit.c:348 #, c-format msgid "\"%s\" is not a regular file" msgstr "" -#: src/editor/edit.c:367 +#: src/editor/edit.c:373 #, c-format msgid "" "File \"%s\" is too large.\n" "Open it anyway?" msgstr "" -#: src/editor/edit.c:369 src/editor/editcmd.c:178 src/editor/editcmd.c:201 -#: src/editor/editcmd.c:373 src/editor/editcmd.c:517 src/editor/editcmd.c:938 -#: src/editor/editcmd.c:2015 src/editor/editcmd.c:2044 src/editor/etags.c:373 -#: src/execute.c:137 src/filemanager/ext.c:775 src/filemanager/file.c:2461 -#: src/filemanager/panel.c:4708 src/help.c:363 src/main.c:411 -#: src/subshell/common.c:1651 src/vfs/sftpfs/connection.c:521 -#: src/viewer/actions_cmd.c:444 +#: src/editor/edit.c:375 src/editor/editcmd.c:178 src/editor/editcmd.c:201 +#: src/editor/editcmd.c:373 src/editor/editcmd.c:515 src/editor/editcmd.c:952 +#: src/editor/editcmd.c:1966 src/editor/editcmd.c:1995 src/editor/etags.c:373 +#: src/execute.c:137 src/filemanager/ext.c:792 src/filemanager/file.c:2461 +#: src/filemanager/panel.c:4710 src/help.c:365 src/main.c:411 +#: src/subshell/common.c:1651 src/vfs/sftpfs/connection.c:562 +#: src/viewer/actions_cmd.c:434 msgid "Warning" msgstr "" -#: src/editor/edit.c:1988 +#: src/editor/edit.c:2021 #, c-format msgid "Error reading from pipe: %s" msgstr "" -#: src/editor/edit.c:1998 +#: src/editor/edit.c:2031 #, c-format msgid "Cannot open pipe for reading: %s" msgstr "" @@ -1346,8 +1350,8 @@ msgstr "" msgid "The file you are saving does not end with a newline." msgstr "" -#: src/editor/editcmd.c:375 src/editor/editcmd.c:519 src/editor/editcmd.c:2017 -#: src/editor/editcmd.c:2046 src/editor/etags.c:375 +#: src/editor/editcmd.c:375 src/editor/editcmd.c:517 src/editor/editcmd.c:1968 +#: src/editor/editcmd.c:1997 src/editor/etags.c:375 msgid "C&ontinue" msgstr "" @@ -1367,8 +1371,8 @@ msgstr "" msgid "&Macintosh format (CR)" msgstr "" -#: src/editor/editcmd.c:396 src/editor/editcmd.c:1038 src/editor/editcmd.c:1750 -#: src/editor/editcmd.c:1781 src/filemanager/cmd.c:735 +#: src/editor/editcmd.c:396 src/editor/editcmd.c:1052 src/editor/editcmd.c:1701 +#: src/editor/editcmd.c:1732 src/filemanager/cmd.c:735 msgid "Enter file name:" msgstr "" @@ -1380,228 +1384,228 @@ msgstr "" msgid "Save As" msgstr "" -#: src/editor/editcmd.c:837 +#: src/editor/editcmd.c:851 msgid "&Quick save" msgstr "" -#: src/editor/editcmd.c:838 +#: src/editor/editcmd.c:852 msgid "&Safe save" msgstr "" -#: src/editor/editcmd.c:839 +#: src/editor/editcmd.c:853 msgid "&Do backups with following extension:" msgstr "" -#: src/editor/editcmd.c:858 +#: src/editor/editcmd.c:872 msgid "Check &POSIX new line" msgstr "" -#: src/editor/editcmd.c:867 +#: src/editor/editcmd.c:881 msgid "Edit Save Mode" msgstr "" -#: src/editor/editcmd.c:921 src/editor/editcmd.c:980 +#: src/editor/editcmd.c:935 src/editor/editcmd.c:994 msgid "Save as" msgstr "" -#: src/editor/editcmd.c:923 +#: src/editor/editcmd.c:937 msgid "Cannot save: destination is not a regular file" msgstr "" -#: src/editor/editcmd.c:939 +#: src/editor/editcmd.c:953 msgid "A file already exists with this name" msgstr "" -#: src/editor/editcmd.c:939 +#: src/editor/editcmd.c:953 msgid "&Overwrite" msgstr "" -#: src/editor/editcmd.c:980 src/editor/editcmd.c:1760 +#: src/editor/editcmd.c:994 src/editor/editcmd.c:1711 msgid "Cannot save file" msgstr "" -#: src/editor/editcmd.c:1014 +#: src/editor/editcmd.c:1028 #, c-format msgid "Confirm save file: \"%s\"" msgstr "" -#: src/editor/editcmd.c:1016 src/viewer/hex.c:418 src/viewer/hex.c:430 +#: src/editor/editcmd.c:1030 src/viewer/hex.c:418 src/viewer/hex.c:430 msgid "Save file" msgstr "" -#: src/editor/editcmd.c:1016 src/editor/editmenu.c:80 src/learn.c:195 +#: src/editor/editcmd.c:1030 src/editor/editmenu.c:80 src/learn.c:195 #: src/learn.c:260 msgid "&Save" msgstr "" -#: src/editor/editcmd.c:1038 +#: src/editor/editcmd.c:1052 msgid "Load" msgstr "" -#: src/editor/editcmd.c:1121 +#: src/editor/editcmd.c:1135 msgid "Syntax file edit" msgstr "" -#: src/editor/editcmd.c:1122 +#: src/editor/editcmd.c:1136 msgid "Which syntax file you want to edit?" msgstr "" -#: src/editor/editcmd.c:1123 src/editor/editcmd.c:1169 +#: src/editor/editcmd.c:1137 src/editor/editcmd.c:1183 #: src/filemanager/cmd.c:834 src/filemanager/cmd.c:875 #: src/filemanager/cmd.c:933 msgid "&User" msgstr "" -#: src/editor/editcmd.c:1123 src/editor/editcmd.c:1169 +#: src/editor/editcmd.c:1137 src/editor/editcmd.c:1183 msgid "&System wide" msgstr "" -#: src/editor/editcmd.c:1167 src/filemanager/cmd.c:873 +#: src/editor/editcmd.c:1181 src/filemanager/cmd.c:873 msgid "Menu edit" msgstr "" -#: src/editor/editcmd.c:1168 src/filemanager/cmd.c:874 +#: src/editor/editcmd.c:1182 src/filemanager/cmd.c:874 msgid "Which menu file do you want to edit?" msgstr "" -#: src/editor/editcmd.c:1169 src/filemanager/cmd.c:875 +#: src/editor/editcmd.c:1183 src/filemanager/cmd.c:875 msgid "&Local" msgstr "" -#: src/editor/editcmd.c:1503 src/editor/editwidget.c:387 +#: src/editor/editcmd.c:1454 src/editor/editwidget.c:388 msgid "[NoName]" msgstr "" -#: src/editor/editcmd.c:1521 +#: src/editor/editcmd.c:1472 #, c-format msgid "" "File %s was modified.\n" "Save before close?" msgstr "" -#: src/editor/editcmd.c:1522 +#: src/editor/editcmd.c:1473 msgid "Close file" msgstr "" -#: src/editor/editcmd.c:1526 +#: src/editor/editcmd.c:1477 #, c-format msgid "" "Midnight Commander is being shut down.\n" "Save modified file %s?" msgstr "" -#: src/editor/editcmd.c:1626 +#: src/editor/editcmd.c:1577 msgid "This function is not implemented" msgstr "" -#: src/editor/editcmd.c:1641 +#: src/editor/editcmd.c:1592 msgid "Copy to clipboard" msgstr "" -#: src/editor/editcmd.c:1641 src/editor/editcmd.c:1665 +#: src/editor/editcmd.c:1592 src/editor/editcmd.c:1616 msgid "Unable to save to file" msgstr "" -#: src/editor/editcmd.c:1665 +#: src/editor/editcmd.c:1616 msgid "Cut to clipboard" msgstr "" -#: src/editor/editcmd.c:1709 +#: src/editor/editcmd.c:1660 msgid "Goto line" msgstr "" -#: src/editor/editcmd.c:1750 src/editor/editcmd.c:1760 +#: src/editor/editcmd.c:1701 src/editor/editcmd.c:1711 msgid "Save block" msgstr "" -#: src/editor/editcmd.c:1781 src/editor/editcmd.c:1796 +#: src/editor/editcmd.c:1732 src/editor/editcmd.c:1747 msgid "Insert file" msgstr "" -#: src/editor/editcmd.c:1796 +#: src/editor/editcmd.c:1747 msgid "Cannot insert file" msgstr "" -#: src/editor/editcmd.c:1817 +#: src/editor/editcmd.c:1768 msgid "Sort block" msgstr "" -#: src/editor/editcmd.c:1817 +#: src/editor/editcmd.c:1768 msgid "You must first highlight a block of text" msgstr "" -#: src/editor/editcmd.c:1825 +#: src/editor/editcmd.c:1776 msgid "Run sort" msgstr "" -#: src/editor/editcmd.c:1826 +#: src/editor/editcmd.c:1777 msgid "Enter sort options (see sort(1) manpage) separated by whitespace:" msgstr "" -#: src/editor/editcmd.c:1846 src/editor/editcmd.c:1853 +#: src/editor/editcmd.c:1797 src/editor/editcmd.c:1804 msgid "Sort" msgstr "" -#: src/editor/editcmd.c:1846 +#: src/editor/editcmd.c:1797 msgid "Cannot execute sort command" msgstr "" -#: src/editor/editcmd.c:1852 +#: src/editor/editcmd.c:1803 #, c-format msgid "Sort returned non-zero: %s" msgstr "" -#: src/editor/editcmd.c:1889 +#: src/editor/editcmd.c:1840 msgid "Paste output of external command" msgstr "" -#: src/editor/editcmd.c:1890 +#: src/editor/editcmd.c:1841 msgid "Enter shell command(s):" msgstr "" -#: src/editor/editcmd.c:1907 +#: src/editor/editcmd.c:1858 msgid "External command" msgstr "" -#: src/editor/editcmd.c:1907 +#: src/editor/editcmd.c:1858 msgid "Cannot execute command" msgstr "" -#: src/editor/editcmd.c:1952 +#: src/editor/editcmd.c:1903 msgid "mail -s -c " msgstr "" -#: src/editor/editcmd.c:1953 +#: src/editor/editcmd.c:1904 msgid "To" msgstr "" -#: src/editor/editcmd.c:1956 +#: src/editor/editcmd.c:1907 msgid "Subject" msgstr "" -#: src/editor/editcmd.c:1959 +#: src/editor/editcmd.c:1910 msgid "Copies to" msgstr "" -#: src/editor/editcmd.c:1970 +#: src/editor/editcmd.c:1921 msgid "Mail" msgstr "" -#: src/editor/editcmd.c:2004 +#: src/editor/editcmd.c:1955 msgid "Insert literal" msgstr "" -#: src/editor/editcmd.c:2005 +#: src/editor/editcmd.c:1956 msgid "Press any key:" msgstr "" -#: src/editor/editcmd.c:2016 src/editor/editcmd.c:2045 src/editor/etags.c:374 +#: src/editor/editcmd.c:1967 src/editor/editcmd.c:1996 src/editor/etags.c:374 msgid "" "Current text was modified without a file save.\n" "Continue discards these changes." msgstr "" -#: src/editor/editcmd.c:2098 +#: src/editor/editcmd.c:2049 msgid "Cancel" msgstr "" @@ -1609,7 +1613,7 @@ msgstr "" msgid "Collect completions" msgstr "" -#: src/editor/editdraw.c:256 src/editor/editwidget.c:333 +#: src/editor/editdraw.c:256 src/editor/editwidget.c:334 msgid "NoName" msgstr "" @@ -2039,8 +2043,8 @@ msgstr "" msgid "Enter replacement string:" msgstr "" -#: src/editor/editsearch.c:195 src/editor/editsearch.c:981 -#: src/editor/editsearch.c:1021 src/editor/editsearch.c:1033 +#: src/editor/editsearch.c:195 src/editor/editsearch.c:978 +#: src/editor/editsearch.c:1018 src/editor/editsearch.c:1030 msgid "Replace" msgstr "" @@ -2059,7 +2063,7 @@ msgstr "" #: src/editor/editsearch.c:251 src/editor/spell.c:748 #: src/filemanager/file.c:893 src/filemanager/file.c:966 -#: src/filemanager/file.c:969 src/filemanager/file.c:3175 +#: src/filemanager/file.c:969 src/filemanager/file.c:3180 #: src/filemanager/filegui.c:254 msgid "&Skip" msgstr "" @@ -2079,7 +2083,7 @@ msgstr "" msgid "Searching %s" msgstr "" -#: src/editor/editsearch.c:1033 +#: src/editor/editsearch.c:1030 #, c-format msgid "%ld replacements made" msgstr "" @@ -2091,18 +2095,18 @@ msgid "" msgstr "" #: src/editor/editwidget.c:155 -msgid "Copyright (C) 1996-2023 the Free Software Foundation" +msgid "Copyright (C) 1996-2024 the Free Software Foundation" msgstr "" #: src/editor/editwidget.c:165 msgid "About" msgstr "" -#: src/editor/editwidget.c:324 +#: src/editor/editwidget.c:325 msgid "Open files" msgstr "" -#: src/editor/editwidget.c:391 src/editor/editwidget.c:394 +#: src/editor/editwidget.c:392 src/editor/editwidget.c:395 msgid "Edit: " msgstr "" @@ -2115,7 +2119,7 @@ msgid "ButtonBar|Replac" msgstr "" #: src/editor/editwidget.c:681 src/filemanager/filemanager.c:1638 -#: src/filemanager/tree.c:1174 +#: src/filemanager/tree.c:1181 msgid "ButtonBar|Copy" msgstr "" @@ -2251,31 +2255,31 @@ msgstr "" msgid "Select language" msgstr "" -#: src/editor/syntax.c:1428 +#: src/editor/syntax.c:1440 msgid "Choose syntax highlighting" msgstr "" -#: src/editor/syntax.c:1429 +#: src/editor/syntax.c:1441 msgid "< Auto >" msgstr "" -#: src/editor/syntax.c:1430 +#: src/editor/syntax.c:1442 msgid "< Reload Current Syntax >" msgstr "" -#: src/editor/syntax.c:1531 src/editor/syntax.c:1537 +#: src/editor/syntax.c:1543 src/editor/syntax.c:1549 msgid "Load syntax file" msgstr "" -#: src/editor/syntax.c:1532 src/help.c:1098 src/usermenu.c:986 -#: src/usermenu.c:1026 +#: src/editor/syntax.c:1544 src/help.c:1105 src/usermenu.c:999 +#: src/usermenu.c:1039 #, c-format msgid "" "Cannot open file %s\n" "%s" msgstr "" -#: src/editor/syntax.c:1538 +#: src/editor/syntax.c:1550 #, c-format msgid "Error in file %s on line %d" msgstr "" @@ -2288,7 +2292,7 @@ msgid "" "extra access permissions with the \"su\" command?" msgstr "" -#: src/execute.c:198 src/filemanager/ext.c:669 +#: src/execute.c:198 src/filemanager/ext.c:686 #, c-format msgid "Cannot fetch a local copy of %s" msgstr "" @@ -2358,8 +2362,8 @@ msgstr "" #: src/filemanager/achown.c:862 src/filemanager/achown.c:899 #: src/filemanager/chattr.c:1123 src/filemanager/chmod.c:441 -#: src/filemanager/chown.c:313 src/vfs/sftpfs/connection.c:521 -#: src/vfs/sftpfs/connection.c:533 +#: src/filemanager/chown.c:313 src/vfs/sftpfs/connection.c:562 +#: src/vfs/sftpfs/connection.c:574 msgid "&Ignore" msgstr "" @@ -2609,7 +2613,7 @@ msgid "Panel options" msgstr "" #: src/filemanager/boxes.c:749 src/filemanager/info.c:86 -#: src/vfs/sftpfs/connection.c:380 +#: src/vfs/sftpfs/connection.c:421 msgid "Information" msgstr "" @@ -2718,7 +2722,7 @@ msgstr "" msgid "Input / display codepage:" msgstr "" -#: src/filemanager/boxes.c:1090 src/filemanager/tree.c:1124 +#: src/filemanager/boxes.c:1090 src/filemanager/tree.c:1131 msgid "Directory tree" msgstr "" @@ -3212,26 +3216,26 @@ msgstr "" msgid "Unable to save setup to %s" msgstr "" -#: src/filemanager/command.c:119 src/usermenu.c:975 +#: src/filemanager/command.c:119 src/usermenu.c:988 msgid "Cannot execute commands on non-local filesystems" msgstr "" -#: src/filemanager/ext.c:257 src/usermenu.c:486 +#: src/filemanager/ext.c:257 src/usermenu.c:490 msgid "Parameter" msgstr "" -#: src/filemanager/ext.c:469 src/usermenu.c:457 +#: src/filemanager/ext.c:473 src/usermenu.c:461 #, c-format msgid "" "Cannot create temporary command file\n" "%s" msgstr "" -#: src/filemanager/ext.c:740 +#: src/filemanager/ext.c:757 msgid "Pipe failed" msgstr "" -#: src/filemanager/ext.c:776 +#: src/filemanager/ext.c:793 #, c-format msgid "" "You have an outdated %s file.\n" @@ -3239,7 +3243,7 @@ msgid "" "Please copy your modifications of the old file to the new one." msgstr "" -#: src/filemanager/ext.c:827 +#: src/filemanager/ext.c:844 #, c-format msgid "" "The format of the\n" @@ -3249,7 +3253,7 @@ msgid "" "Please fetch a fresh copy from the Midnight Commander package." msgstr "" -#: src/filemanager/ext.c:842 +#: src/filemanager/ext.c:859 #, c-format msgid "" "The format of the\n" @@ -3470,14 +3474,14 @@ msgid "" "%s" msgstr "" -#: src/filemanager/file.c:2411 src/filemanager/file.c:2779 +#: src/filemanager/file.c:2411 src/filemanager/file.c:2782 #, c-format msgid "" "Cannot chown target file \"%s\"\n" "%s" msgstr "" -#: src/filemanager/file.c:2426 src/filemanager/file.c:2795 +#: src/filemanager/file.c:2426 src/filemanager/file.c:2798 #, c-format msgid "" "Cannot chmod target file \"%s\"\n" @@ -3567,28 +3571,28 @@ msgid "" "%s" msgstr "" -#: src/filemanager/file.c:2860 +#: src/filemanager/file.c:2865 #, c-format msgid "" "Cannot stat source directory \"%s\"\n" "%s" msgstr "" -#: src/filemanager/file.c:2904 +#: src/filemanager/file.c:2909 #, c-format msgid "" "Source \"%s\" is not a directory\n" "%s" msgstr "" -#: src/filemanager/file.c:2916 +#: src/filemanager/file.c:2921 #, c-format msgid "" "Cannot copy cyclic symbolic link\n" "\"%s\"" msgstr "" -#: src/filemanager/file.c:2955 src/filemanager/file.c:3447 +#: src/filemanager/file.c:2960 src/filemanager/file.c:3452 #: src/filemanager/tree.c:769 #, c-format msgid "" @@ -3596,26 +3600,26 @@ msgid "" "%s" msgstr "" -#: src/filemanager/file.c:2988 +#: src/filemanager/file.c:2993 #, c-format msgid "" "Cannot create target directory \"%s\"\n" "%s" msgstr "" -#: src/filemanager/file.c:3012 +#: src/filemanager/file.c:3017 #, c-format msgid "" "Cannot chown target directory \"%s\"\n" "%s" msgstr "" -#: src/filemanager/file.c:3219 +#: src/filemanager/file.c:3224 #, c-format msgid "Directories: %zu, total size: %s" msgstr "" -#: src/filemanager/file.c:3365 +#: src/filemanager/file.c:3370 msgid "Sorry, I could not put the job in background" msgstr "" @@ -3753,7 +3757,7 @@ msgid "Deleting" msgstr "" #: src/filemanager/filegui.c:1373 src/filemanager/find.c:587 -#: src/filemanager/panel.c:2618 +#: src/filemanager/panel.c:2617 msgid "&Using shell patterns" msgstr "" @@ -4066,11 +4070,11 @@ msgstr "" msgid "ButtonBar|View" msgstr "" -#: src/filemanager/filemanager.c:1639 src/filemanager/tree.c:1175 +#: src/filemanager/filemanager.c:1639 src/filemanager/tree.c:1182 msgid "ButtonBar|RenMov" msgstr "" -#: src/filemanager/filemanager.c:1640 src/filemanager/tree.c:1178 +#: src/filemanager/filemanager.c:1640 src/filemanager/tree.c:1185 msgid "ButtonBar|Mkdir" msgstr "" @@ -4100,7 +4104,7 @@ msgid "Found: %lu" msgstr "" #: src/filemanager/find.c:510 src/filemanager/find.c:521 -#: src/filemanager/panel.c:2656 +#: src/filemanager/panel.c:2655 msgid "Malformed regular expression" msgstr "" @@ -4622,23 +4626,23 @@ msgstr "" msgid "Unknown tag on display format:" msgstr "" -#: src/filemanager/panel.c:2617 +#: src/filemanager/panel.c:2616 msgid "&Files only" msgstr "" -#: src/filemanager/panel.c:2620 +#: src/filemanager/panel.c:2619 msgid "&Case sensitive" msgstr "" -#: src/filemanager/panel.c:2710 +#: src/filemanager/panel.c:2709 msgid "Select" msgstr "" -#: src/filemanager/panel.c:2719 +#: src/filemanager/panel.c:2718 msgid "Unselect" msgstr "" -#: src/filemanager/panel.c:2749 +#: src/filemanager/panel.c:2748 msgid "Filter" msgstr "" @@ -4646,12 +4650,12 @@ msgstr "" msgid "Do you really want to execute?" msgstr "" -#: src/filemanager/panel.c:3430 src/filemanager/panel.c:4607 -#: src/filemanager/panel.c:4655 src/viewer/actions_cmd.c:314 +#: src/filemanager/panel.c:3432 src/filemanager/panel.c:4609 +#: src/filemanager/panel.c:4657 src/viewer/actions_cmd.c:310 msgid "Cannot read directory contents" msgstr "" -#: src/filemanager/panel.c:4709 +#: src/filemanager/panel.c:4711 msgid "User supplied format looks invalid, reverting to default." msgstr "" @@ -4744,23 +4748,23 @@ msgstr "" msgid "Delete %s?" msgstr "" -#: src/filemanager/tree.c:981 src/filemanager/tree.c:1172 +#: src/filemanager/tree.c:981 src/filemanager/tree.c:1179 msgid "ButtonBar|Static" msgstr "" -#: src/filemanager/tree.c:981 src/filemanager/tree.c:1173 +#: src/filemanager/tree.c:981 src/filemanager/tree.c:1180 msgid "ButtonBar|Dynamc" msgstr "" -#: src/filemanager/tree.c:1170 +#: src/filemanager/tree.c:1177 msgid "ButtonBar|Rescan" msgstr "" -#: src/filemanager/tree.c:1171 +#: src/filemanager/tree.c:1178 msgid "ButtonBar|Forget" msgstr "" -#: src/filemanager/tree.c:1182 +#: src/filemanager/tree.c:1189 msgid "ButtonBar|Rmdir" msgstr "" @@ -4771,28 +4775,28 @@ msgid "" "%s\n" msgstr "" -#: src/help.c:325 +#: src/help.c:327 msgid "Help file format error\n" msgstr "" -#: src/help.c:363 +#: src/help.c:365 msgid "Internal bug: Double start of link area" msgstr "" -#: src/help.c:635 src/help.c:1120 +#: src/help.c:642 src/help.c:1127 #, c-format msgid "Cannot find node %s in help file" msgstr "" -#: src/help.c:1135 +#: src/help.c:1142 msgid "Help" msgstr "" -#: src/help.c:1165 +#: src/help.c:1171 msgid "ButtonBar|Index" msgstr "" -#: src/help.c:1166 +#: src/help.c:1172 msgid "ButtonBar|Prev" msgstr "" @@ -4861,7 +4865,7 @@ msgid "" "%s\n" msgstr "" -#: src/main.c:287 +#: src/main.c:294 msgid "Home directory path is not absolute" msgstr "" @@ -5038,57 +5042,57 @@ msgstr "" msgid "Cache directory:" msgstr "" -#: src/usermenu.c:330 +#: src/usermenu.c:334 msgid "Debug" msgstr "" -#: src/usermenu.c:347 +#: src/usermenu.c:351 msgid "ERROR:" msgstr "" -#: src/usermenu.c:351 +#: src/usermenu.c:355 msgid "True:" msgstr "" -#: src/usermenu.c:353 +#: src/usermenu.c:357 msgid "False:" msgstr "" -#: src/usermenu.c:586 +#: src/usermenu.c:596 msgid "Error calling program" msgstr "" -#: src/usermenu.c:614 +#: src/usermenu.c:624 msgid "Warning -- ignoring file" msgstr "" -#: src/usermenu.c:615 +#: src/usermenu.c:625 #, c-format msgid "" "File %s is not owned by root or you or is world writable.\n" "Using it may compromise your security" msgstr "" -#: src/usermenu.c:727 +#: src/usermenu.c:737 msgid "Format error on file Extensions File" msgstr "" -#: src/usermenu.c:728 +#: src/usermenu.c:738 #, c-format msgid "The %%var macro has no default" msgstr "" -#: src/usermenu.c:729 +#: src/usermenu.c:739 #, c-format msgid "The %%var macro has no variable" msgstr "" -#: src/usermenu.c:1132 +#: src/usermenu.c:1145 #, c-format msgid "No suitable entries found in %s" msgstr "" -#: src/usermenu.c:1146 +#: src/usermenu.c:1159 msgid "User menu" msgstr "" @@ -5147,93 +5151,35 @@ msgid "" "%s" msgstr "" -#: src/vfs/extfs/extfs.c:753 src/vfs/extfs/extfs.c:951 -#: src/vfs/extfs/extfs.c:961 src/vfs/extfs/extfs.c:966 +#: src/vfs/extfs/extfs.c:753 src/vfs/extfs/extfs.c:979 +#: src/vfs/extfs/extfs.c:989 src/vfs/extfs/extfs.c:994 #, c-format msgid "" "EXTFS virtual file system:\n" "%s" msgstr "" -#: src/vfs/extfs/extfs.c:1549 -#, c-format -msgid "Warning: cannot open %s directory\n" -msgstr "" - -#: src/vfs/fish/fish.c:384 -#, c-format -msgid "fish: Disconnecting from %s" -msgstr "" - -#: src/vfs/fish/fish.c:569 -msgid "fish: Waiting for initial line..." -msgstr "" - -#: src/vfs/fish/fish.c:579 -msgid "Sorry, we cannot do password authenticated connections for now." -msgstr "" - -#: src/vfs/fish/fish.c:587 -#, c-format -msgid "fish: Password is required for %s" -msgstr "" - -#: src/vfs/fish/fish.c:595 -msgid "fish: Sending password..." -msgstr "" - -#: src/vfs/fish/fish.c:632 -msgid "fish: Sending initial line..." -msgstr "" - -#: src/vfs/fish/fish.c:643 -msgid "fish: Handshaking version..." -msgstr "" - -#: src/vfs/fish/fish.c:654 -msgid "fish: Getting host info..." -msgstr "" - -#: src/vfs/fish/fish.c:933 -#, c-format -msgid "fish: Reading directory %s..." +#: src/vfs/extfs/extfs.c:932 +msgid "" +"EXTFS virtual file system:\n" +"wrong file name" msgstr "" -#: src/vfs/fish/fish.c:978 src/vfs/ftpfs/ftpfs.c:1914 -#: src/vfs/undelfs/undelfs.c:382 -#, c-format -msgid "%s: done." +#: src/vfs/extfs/extfs.c:945 +msgid "" +"EXTFS virtual file system:\n" +"wrong archive name" msgstr "" -#: src/vfs/fish/fish.c:985 src/vfs/ftpfs/ftpfs.c:1862 -#: src/vfs/undelfs/undelfs.c:385 -#, c-format -msgid "%s: failure" +#: src/vfs/extfs/extfs.c:969 +msgid "" +"EXTFS virtual file system:\n" +"cannot build command" msgstr "" -#: src/vfs/fish/fish.c:1043 +#: src/vfs/extfs/extfs.c:1577 #, c-format -msgid "fish: store %s: sending command..." -msgstr "" - -#: src/vfs/fish/fish.c:1067 -msgid "fish: Local read failed, sending zeros" -msgstr "" - -#: src/vfs/fish/fish.c:1086 -msgid "fish: storing file" -msgstr "" - -#: src/vfs/fish/fish.c:1156 -msgid "Aborting transfer..." -msgstr "" - -#: src/vfs/fish/fish.c:1172 -msgid "Error reported after abort." -msgstr "" - -#: src/vfs/fish/fish.c:1174 -msgid "Aborted transfer would be successful." +msgid "Warning: cannot open %s directory\n" msgstr "" #: src/vfs/ftpfs/ftpfs.c:588 @@ -5378,6 +5324,18 @@ msgstr "" msgid "ftpfs: failed; nowhere to fallback to" msgstr "" +#: src/vfs/ftpfs/ftpfs.c:1862 src/vfs/shell/shell.c:979 +#: src/vfs/undelfs/undelfs.c:385 +#, c-format +msgid "%s: failure" +msgstr "" + +#: src/vfs/ftpfs/ftpfs.c:1914 src/vfs/shell/shell.c:972 +#: src/vfs/undelfs/undelfs.c:382 +#, c-format +msgid "%s: done." +msgstr "" + #: src/vfs/ftpfs/ftpfs.c:2004 msgid "ftpfs: storing file" msgstr "" @@ -5423,42 +5381,42 @@ msgstr "" msgid "sftp: Unable to get current user name." msgstr "" -#: src/vfs/sftpfs/connection.c:116 src/vfs/sftpfs/sftpfs.c:745 +#: src/vfs/sftpfs/connection.c:147 src/vfs/sftpfs/sftpfs.c:745 msgid "sftp: Invalid host name." msgstr "" -#: src/vfs/sftpfs/connection.c:148 src/vfs/sftpfs/connection.c:188 +#: src/vfs/sftpfs/connection.c:179 src/vfs/sftpfs/connection.c:219 #, c-format msgid "sftp: %s" msgstr "" -#: src/vfs/sftpfs/connection.c:176 +#: src/vfs/sftpfs/connection.c:207 msgid "sftp: failed to convert remote host IP address into text form" msgstr "" -#: src/vfs/sftpfs/connection.c:193 +#: src/vfs/sftpfs/connection.c:224 #, c-format msgid "sftp: making connection to %s" msgstr "" -#: src/vfs/sftpfs/connection.c:203 +#: src/vfs/sftpfs/connection.c:234 msgid "sftp: connection interrupted by user" msgstr "" -#: src/vfs/sftpfs/connection.c:205 +#: src/vfs/sftpfs/connection.c:236 #, c-format msgid "sftp: connection to server failed: %s" msgstr "" -#: src/vfs/sftpfs/connection.c:321 +#: src/vfs/sftpfs/connection.c:355 msgid "sftp: found host key of unsupported type: RSA1" msgstr "" -#: src/vfs/sftpfs/connection.c:324 +#: src/vfs/sftpfs/connection.c:358 msgid "sftp: unknown host key type:" msgstr "" -#: src/vfs/sftpfs/connection.c:381 +#: src/vfs/sftpfs/connection.c:422 #, c-format msgid "" "Permanently added\n" @@ -5466,19 +5424,19 @@ msgid "" "to the list of known hosts." msgstr "" -#: src/vfs/sftpfs/connection.c:445 +#: src/vfs/sftpfs/connection.c:486 msgid "sftp: cannot get the remote host key" msgstr "" -#: src/vfs/sftpfs/connection.c:485 +#: src/vfs/sftpfs/connection.c:526 msgid "sftp: unsupported key type, can't check remote host key" msgstr "" -#: src/vfs/sftpfs/connection.c:492 +#: src/vfs/sftpfs/connection.c:533 msgid "sftp: can't compute host key fingerprint hash" msgstr "" -#: src/vfs/sftpfs/connection.c:514 +#: src/vfs/sftpfs/connection.c:555 #, c-format msgid "" "The authenticity of host\n" @@ -5489,7 +5447,7 @@ msgid "" "Do you want to add it to the list of known hosts and continue connecting?" msgstr "" -#: src/vfs/sftpfs/connection.c:527 +#: src/vfs/sftpfs/connection.c:568 #, c-format msgid "" "%s (%s)\n" @@ -5499,29 +5457,29 @@ msgid "" "connecting?" msgstr "" -#: src/vfs/sftpfs/connection.c:554 +#: src/vfs/sftpfs/connection.c:595 msgid "sftp: host key verification failed" msgstr "" -#: src/vfs/sftpfs/connection.c:690 +#: src/vfs/sftpfs/connection.c:731 #, c-format msgid "sftp: Enter passphrase for %s " msgstr "" -#: src/vfs/sftpfs/connection.c:695 +#: src/vfs/sftpfs/connection.c:736 msgid "sftp: Passphrase is empty." msgstr "" -#: src/vfs/sftpfs/connection.c:800 +#: src/vfs/sftpfs/connection.c:841 #, c-format msgid "sftp: Enter password for %s " msgstr "" -#: src/vfs/sftpfs/connection.c:805 +#: src/vfs/sftpfs/connection.c:846 msgid "sftp: Password is empty." msgstr "" -#: src/vfs/sftpfs/connection.c:886 +#: src/vfs/sftpfs/connection.c:927 msgid "sftp: failure establishing SSH session" msgstr "" @@ -5543,30 +5501,90 @@ msgstr "" msgid "sftp: Listing done." msgstr "" -#: src/vfs/tar/tar.c:661 src/vfs/tar/tar.c:734 src/vfs/tar/tar.c:829 -#: src/vfs/tar/tar-internal.c:411 +#: src/vfs/shell/shell.c:385 +#, c-format +msgid "shell: Disconnecting from %s" +msgstr "" + +#: src/vfs/shell/shell.c:570 +msgid "shell: Waiting for initial line..." +msgstr "" + +#: src/vfs/shell/shell.c:580 +msgid "Sorry, we cannot do password authenticated connections for now." +msgstr "" + +#: src/vfs/shell/shell.c:588 +#, c-format +msgid "shell: Password is required for %s" +msgstr "" + +#: src/vfs/shell/shell.c:597 +msgid "shell: Sending password..." +msgstr "" + +#: src/vfs/shell/shell.c:634 +msgid "shell: Sending initial line..." +msgstr "" + +#: src/vfs/shell/shell.c:643 +msgid "shell: Getting host info..." +msgstr "" + +#: src/vfs/shell/shell.c:926 +#, c-format +msgid "shell: Reading directory %s..." +msgstr "" + +#: src/vfs/shell/shell.c:1037 +#, c-format +msgid "shell: store %s: sending command..." +msgstr "" + +#: src/vfs/shell/shell.c:1061 +msgid "shell: Local read failed, sending zeros" +msgstr "" + +#: src/vfs/shell/shell.c:1080 +msgid "shell: storing file" +msgstr "" + +#: src/vfs/shell/shell.c:1150 +msgid "Aborting transfer..." +msgstr "" + +#: src/vfs/shell/shell.c:1166 +msgid "Error reported after abort." +msgstr "" + +#: src/vfs/shell/shell.c:1168 +msgid "Aborted transfer would be successful." +msgstr "" + +#: src/vfs/tar/tar.c:655 src/vfs/tar/tar.c:728 src/vfs/tar/tar.c:823 +#: src/vfs/tar/tar-internal.c:418 msgid "Inconsistent tar archive" msgstr "" -#: src/vfs/tar/tar.c:691 src/vfs/tar/tar.c:714 +#: src/vfs/tar/tar.c:685 src/vfs/tar/tar.c:708 msgid "Unexpected EOF on archive file" msgstr "" -#: src/vfs/tar/tar.c:916 src/vfs/tar/tar.c:938 +#: src/vfs/tar/tar.c:910 src/vfs/tar/tar.c:932 #, c-format msgid "" "Cannot open tar archive\n" "%s" msgstr "" -#: src/vfs/tar/tar.c:998 src/vfs/tar/tar.c:1023 +#: src/vfs/tar/tar.c:992 src/vfs/tar/tar.c:1017 #, c-format msgid "" "%s\n" "doesn't look like a tar archive" msgstr "" -#: src/vfs/tar/tar-internal.c:166 +#: src/vfs/tar/tar-internal.c:165 msgid "tar: mc_lseek not stopped at a record boundary" msgstr "" @@ -5659,19 +5677,19 @@ msgstr "" msgid "Ext2lib error" msgstr "" -#: src/viewer/actions_cmd.c:444 +#: src/viewer/actions_cmd.c:434 msgid "Invalid value" msgstr "" -#: src/viewer/actions_cmd.c:643 +#: src/viewer/actions_cmd.c:633 msgid "File was modified. Save with exit?" msgstr "" -#: src/viewer/actions_cmd.c:644 +#: src/viewer/actions_cmd.c:634 msgid "&Cancel quit" msgstr "" -#: src/viewer/actions_cmd.c:649 +#: src/viewer/actions_cmd.c:639 msgid "" "Midnight Commander is being shut down.\n" "Save modified file?" diff --git a/mcsrc/po/mn.po b/mcsrc/po/mn.po index d41fe8d2..ea1aef38 100644 --- a/mcsrc/po/mn.po +++ b/mcsrc/po/mn.po @@ -9,7 +9,7 @@ msgid "" msgstr "" "Project-Id-Version: Midnight Commander\n" "Report-Msgid-Bugs-To: https://www.midnight-commander.org/\n" -"POT-Creation-Date: 2023-08-06 15:50+0200\n" +"POT-Creation-Date: 2024-01-20 20:51+0100\n" "PO-Revision-Date: 2010-12-29 10:19+0000\n" "Last-Translator: Shuree Nyam-Oidov <99shuree@gmail.com>, 2020\n" "Language-Team: Mongolian (http://app.transifex.com/mc/mc/language/mn/)\n" @@ -707,7 +707,8 @@ msgid "" " errdhotfocus\n" " Menus: menunormal, menuhot, menusel, menuhotsel, menuinactive\n" " Popup menus: pmenunormal, pmenusel, pmenutitle\n" -" Editor: editnormal, editbold, editmarked, editwhitespace,\n" +" Editor: editnormal, editbold, editmarked, editwhitespace, " +"editnonprintable,\n" " editlinestate, editbg, editframe, editframeactive\n" " editframedrag\n" " Viewer: viewnormal,viewbold, viewunderline, viewselected\n" @@ -1543,7 +1544,7 @@ msgid "" "written for the Midnight Commander." msgstr "" -msgid "Copyright (C) 1996-2023 the Free Software Foundation" +msgid "Copyright (C) 1996-2024 the Free Software Foundation" msgstr "" msgid "About" @@ -3934,67 +3935,25 @@ msgid "" "%s" msgstr "" -#, c-format -msgid "Warning: cannot open %s directory\n" +msgid "" +"EXTFS virtual file system:\n" +"wrong file name" msgstr "" -#, c-format -msgid "fish: Disconnecting from %s" -msgstr "fish: %s аас салгагдаж байна" - -msgid "fish: Waiting for initial line..." -msgstr "fish: Эхлэл мөрийг хүлээж байна..." - -msgid "Sorry, we cannot do password authenticated connections for now." -msgstr "Уучлаарай, Бид энэ холболтод нууц үг ашиглаж чадахгүй байна." - -#, c-format -msgid "fish: Password is required for %s" +msgid "" +"EXTFS virtual file system:\n" +"wrong archive name" msgstr "" -msgid "fish: Sending password..." -msgstr "fish: Нууц үгийг илгээж байна..." - -msgid "fish: Sending initial line..." -msgstr "fish: эхлэл мөрийг илгээж байна..." - -msgid "fish: Handshaking version..." -msgstr "fish: Handshaking version..." - -msgid "fish: Getting host info..." +msgid "" +"EXTFS virtual file system:\n" +"cannot build command" msgstr "" #, c-format -msgid "fish: Reading directory %s..." -msgstr "fish: %s лавлахыг уншиж байна..." - -#, c-format -msgid "%s: done." -msgstr "%s: дууссан." - -#, c-format -msgid "%s: failure" -msgstr "%s: алдаа" - -#, c-format -msgid "fish: store %s: sending command..." -msgstr "fish: %s сэргээх: командыг илгээж байна..." - -msgid "fish: Local read failed, sending zeros" -msgstr "fish: локал уншилт бүтсэнгүй, тэгийг илгээж байна" - -msgid "fish: storing file" +msgid "Warning: cannot open %s directory\n" msgstr "" -msgid "Aborting transfer..." -msgstr "Дамжуулалтыг таслаж байна..." - -msgid "Error reported after abort." -msgstr "Таслалтын дараа алдаа илтгэгдлээ." - -msgid "Aborted transfer would be successful." -msgstr "Таслагдсан дамжуулалт дууссан ч байж магадгүй." - #, c-format msgid "ftpfs: Disconnecting from %s" msgstr "ftpfs: %s ээс салгагдаж байна" @@ -4105,6 +4064,14 @@ msgstr "(эхлэл chdir)" msgid "ftpfs: failed; nowhere to fallback to" msgstr "ftpfs: алдаа; ослын горимд хаашаа ч шилжих боломжгүй" +#, c-format +msgid "%s: failure" +msgstr "%s: алдаа" + +#, c-format +msgid "%s: done." +msgstr "%s: дууссан." + msgid "ftpfs: storing file" msgstr "" @@ -4242,6 +4209,52 @@ msgstr "" msgid "sftp: Listing done." msgstr "" +#, c-format +msgid "shell: Disconnecting from %s" +msgstr "" + +msgid "shell: Waiting for initial line..." +msgstr "" + +msgid "Sorry, we cannot do password authenticated connections for now." +msgstr "Уучлаарай, Бид энэ холболтод нууц үг ашиглаж чадахгүй байна." + +#, c-format +msgid "shell: Password is required for %s" +msgstr "" + +msgid "shell: Sending password..." +msgstr "" + +msgid "shell: Sending initial line..." +msgstr "" + +msgid "shell: Getting host info..." +msgstr "" + +#, c-format +msgid "shell: Reading directory %s..." +msgstr "" + +#, c-format +msgid "shell: store %s: sending command..." +msgstr "" + +msgid "shell: Local read failed, sending zeros" +msgstr "" + +msgid "shell: storing file" +msgstr "" + +msgid "Aborting transfer..." +msgstr "Дамжуулалтыг таслаж байна..." + +msgid "Error reported after abort." +msgstr "Таслалтын дараа алдаа илтгэгдлээ." + +msgid "Aborted transfer would be successful." +msgstr "Таслагдсан дамжуулалт дууссан ч байж магадгүй." + msgid "Inconsistent tar archive" msgstr "Алдаатай архив tar" diff --git a/mcsrc/po/nb.po b/mcsrc/po/nb.po index fb2c90dc..63871b39 100644 --- a/mcsrc/po/nb.po +++ b/mcsrc/po/nb.po @@ -3,16 +3,17 @@ # This file is distributed under the same license as the mc package. # # Translators: -# heskjestad , 2021-2023 -# heskjestad , 2019-2021 +# heskjestad , 2021-2023 +# heskjestad , 2024 +# heskjestad , 2019-2021 # Slava Zanko , 2011 msgid "" msgstr "" "Project-Id-Version: Midnight Commander\n" "Report-Msgid-Bugs-To: https://www.midnight-commander.org/\n" -"POT-Creation-Date: 2023-08-13 20:47+0200\n" +"POT-Creation-Date: 2024-01-20 20:51+0100\n" "PO-Revision-Date: 2010-12-29 10:19+0000\n" -"Last-Translator: heskjestad , 2021-2023\n" +"Last-Translator: heskjestad , 2024\n" "Language-Team: Norwegian Bokmål (http://app.transifex.com/mc/mc/language/" "nb/)\n" "Language: nb\n" @@ -740,30 +741,32 @@ msgid "" " errdhotfocus\n" " Menus: menunormal, menuhot, menusel, menuhotsel, menuinactive\n" " Popup menus: pmenunormal, pmenusel, pmenutitle\n" -" Editor: editnormal, editbold, editmarked, editwhitespace,\n" +" Editor: editnormal, editbold, editmarked, editwhitespace, " +"editnonprintable,\n" " editlinestate, editbg, editframe, editframeactive\n" " editframedrag\n" " Viewer: viewnormal,viewbold, viewunderline, viewselected\n" " Help: helpnormal, helpitalic, helpbold, helplink, helpslink\n" msgstr "" -"--colors NØKKELORD={FORGR},{BAKGR},{ATTR}:NØKKELORD2=...\n" +"--colors NØKKELORD={FORAN},{BAK},{ATTR}:NØKKELORD2=...\n" "\n" -"{FORGR}, {BAKGR} og {ATTR} kan utelates for å bruke forvalgte verdier\n" +"{FORAN}, {BAK} and {ATTR} kan utelates for å ta i bruk standardverdier\n" "\n" " Nøkkelord:\n" -" Globale: errors, disabled, reverse, gauge, header\n" +" Globale: errors, disabled, reverse, gauge, header\n" " input, inputmark, inputunchanged, commandlinemark\n" " bbarhotkey, bbarbutton, statusbar\n" -" Filvisning: normal, selected, marked, markselect\n" -" Dialogbokser: dnormal, dfocus, dhotnormal, dhotfocus, errdhotnormal,\n" +" Filvisning: normal, selected, marked, markselect\n" +" Dialogvinduer: dnormal, dfocus, dhotnormal, dhotfocus, errdhotnormal,\n" " errdhotfocus\n" -" Menyer: menunormal, menuhot, menusel, menuhotsel, menuinactive\n" -" Sprettoppmenyer: pmenunormal, pmenusel, pmenutitle\n" -" Tekstprogram: editnormal, editbold, editmarked, editwhitespace,\n" +" Menyer: menunormal, menuhot, menusel, menuhotsel, menuinactive\n" +" Sprettoppmenyer: pmenunormal, pmenusel, pmenutitle\n" +" Redigering: editnormal, editbold, editmarked, editwhitespace, " +"editnonprintable,\n" " editlinestate, editbg, editframe, editframeactive\n" " editframedrag\n" -" Tekstviser: viewnormal,viewbold, viewunderline, viewselected\n" -" Hjelp: helpnormal, helpitalic, helpbold, helplink, helpslink\n" +" Visning: viewnormal,viewbold, viewunderline, viewselected\n" +" Hjelp: helpnormal, helpitalic, helpbold, helplink, helpslink\n" #. TRANSLATORS: don't translate color names and attributes msgid "" @@ -1634,8 +1637,8 @@ msgstr "" "Et brukervennlig skriveprogram\n" "skrevet for Midnight Commander." -msgid "Copyright (C) 1996-2023 the Free Software Foundation" -msgstr "Opphavsrett (C) 1996-2023 the Free Software Foundation" +msgid "Copyright (C) 1996-2024 the Free Software Foundation" +msgstr "Opphavsrett (C) 1996-2024 Free Software Foundation" msgid "About" msgstr "Om" @@ -4172,66 +4175,30 @@ msgstr "" "EXTFS virtuelt filsystem:\n" "%s" -#, c-format -msgid "Warning: cannot open %s directory\n" -msgstr "Advarsel: Klarte ikke åpne mappa %s\n" - -#, c-format -msgid "fish: Disconnecting from %s" -msgstr "fish: Kobler fra %s" - -msgid "fish: Waiting for initial line..." -msgstr "fish: Venter på innledende linje ..." - -msgid "Sorry, we cannot do password authenticated connections for now." -msgstr "Passordautentisering av tilkoblinger støttes ikke per i dag." - -#, c-format -msgid "fish: Password is required for %s" -msgstr "fish: Trenger passord for %s" - -msgid "fish: Sending password..." -msgstr "fish: Sender passord ..." - -msgid "fish: Sending initial line..." -msgstr "fish: Sender innledende linje ..." - -msgid "fish: Handshaking version..." -msgstr "fish: Avklarer versjon ..." - -msgid "fish: Getting host info..." -msgstr "fish: Henter vertsinformasjon ..." - -#, c-format -msgid "fish: Reading directory %s..." -msgstr "fish: Leser mappa %s ..." +msgid "" +"EXTFS virtual file system:\n" +"wrong file name" +msgstr "" +"EXTFS virtuelt filsystem:\n" +"feil filnavn" -#, c-format -msgid "%s: done." -msgstr "%s: ferdig." +msgid "" +"EXTFS virtual file system:\n" +"wrong archive name" +msgstr "" +"EXTFS virtuelt filsystem:\n" +"feil arkivnavn" -#, c-format -msgid "%s: failure" -msgstr " %s: mislyktes" +msgid "" +"EXTFS virtual file system:\n" +"cannot build command" +msgstr "" +"EXTFS virtuelt filsystem:\n" +"kan ikke kjøre kommando" #, c-format -msgid "fish: store %s: sending command..." -msgstr "fish: lagre %s: sender kommando ..." - -msgid "fish: Local read failed, sending zeros" -msgstr "fish: Lokal lesekommando mislyktes, sender nuller" - -msgid "fish: storing file" -msgstr "fish: lagrer fil" - -msgid "Aborting transfer..." -msgstr "Avbryter overføring ..." - -msgid "Error reported after abort." -msgstr "Feil rapportert etter avbrudd." - -msgid "Aborted transfer would be successful." -msgstr "Avbrutt overføring ville vært i orden." +msgid "Warning: cannot open %s directory\n" +msgstr "Advarsel: Klarte ikke åpne mappa %s\n" #, c-format msgid "ftpfs: Disconnecting from %s" @@ -4343,6 +4310,14 @@ msgstr "(chdir først)" msgid "ftpfs: failed; nowhere to fallback to" msgstr "ftpfs: mislyktes; ingen retrettmuligheter" +#, c-format +msgid "%s: failure" +msgstr " %s: mislyktes" + +#, c-format +msgid "%s: done." +msgstr "%s: ferdig." + msgid "ftpfs: storing file" msgstr "ftpfs: lagrer fil" @@ -4501,6 +4476,52 @@ msgstr "sftp: (Ctrl + G avbryter) Lister ut ... %s" msgid "sftp: Listing done." msgstr "sftp: Utlisting ferdig." +#, c-format +msgid "shell: Disconnecting from %s" +msgstr "skall: Kobler fra %s" + +msgid "shell: Waiting for initial line..." +msgstr "skall: Venter på innledende linje ..." + +msgid "Sorry, we cannot do password authenticated connections for now." +msgstr "Passordautentisering av tilkoblinger støttes ikke per i dag." + +#, c-format +msgid "shell: Password is required for %s" +msgstr "skall: Trenger passord for %s" + +msgid "shell: Sending password..." +msgstr "skall: Sender passord ..." + +msgid "shell: Sending initial line..." +msgstr "skall: Sender innledende linje ..." + +msgid "shell: Getting host info..." +msgstr "skall: Henter vertsinformasjon ..." + +#, c-format +msgid "shell: Reading directory %s..." +msgstr "skall: Leser mappa %s ..." + +#, c-format +msgid "shell: store %s: sending command..." +msgstr "skall: lagre %s: sender kommando ..." + +msgid "shell: Local read failed, sending zeros" +msgstr "skall: Lokal lesekommando mislyktes, sender nuller" + +msgid "shell: storing file" +msgstr "skall: lagrer fil" + +msgid "Aborting transfer..." +msgstr "Avbryter overføring ..." + +msgid "Error reported after abort." +msgstr "Feil rapportert etter avbrudd." + +msgid "Aborted transfer would be successful." +msgstr "Avbrutt overføring ville vært i orden." + msgid "Inconsistent tar archive" msgstr "Inkonsistent tar-arkiv" diff --git a/mcsrc/po/nl.po b/mcsrc/po/nl.po index e2792b92..cf28342a 100644 --- a/mcsrc/po/nl.po +++ b/mcsrc/po/nl.po @@ -15,7 +15,7 @@ msgid "" msgstr "" "Project-Id-Version: Midnight Commander\n" "Report-Msgid-Bugs-To: https://www.midnight-commander.org/\n" -"POT-Creation-Date: 2023-08-06 15:50+0200\n" +"POT-Creation-Date: 2024-01-20 20:51+0100\n" "PO-Revision-Date: 2010-12-29 10:19+0000\n" "Last-Translator: Jaap Kramer , 2023\n" "Language-Team: Dutch (http://app.transifex.com/mc/mc/language/nl/)\n" @@ -739,30 +739,13 @@ msgid "" " errdhotfocus\n" " Menus: menunormal, menuhot, menusel, menuhotsel, menuinactive\n" " Popup menus: pmenunormal, pmenusel, pmenutitle\n" -" Editor: editnormal, editbold, editmarked, editwhitespace,\n" +" Editor: editnormal, editbold, editmarked, editwhitespace, " +"editnonprintable,\n" " editlinestate, editbg, editframe, editframeactive\n" " editframedrag\n" " Viewer: viewnormal,viewbold, viewunderline, viewselected\n" " Help: helpnormal, helpitalic, helpbold, helplink, helpslink\n" msgstr "" -"--colors KEYWORD={FORE},{BACK},{ATTR}:KEYWORD2=...\n" -"\n" -"{FORE}, {BACK} and {ATTR} can be omitted, and the default will be used\n" -"\n" -" Keywords:\n" -" Global: errors, disabled, reverse, gauge, header\n" -" input, inputmark, inputunchanged, commandlinemark\n" -" bbarhotkey, bbarbutton, statusbar\n" -" File display: normal, selected, marked, markselect\n" -" Dialog boxes: dnormal, dfocus, dhotnormal, dhotfocus, errdhotnormal,\n" -" errdhotfocus\n" -" Menus: menunormal, menuhot, menusel, menuhotsel, menuinactive\n" -" Popup menus: pmenunormal, pmenusel, pmenutitle\n" -" Editor: editnormal, editbold, editmarked, editwhitespace,\n" -" editlinestate, editbg, editframe, editframeactive\n" -" editframedrag\n" -" Viewer: viewnormal,viewbold, viewunderline, viewselected\n" -" Help: helpnormal, helpitalic, helpbold, helplink, helpslink\n" #. TRANSLATORS: don't translate color names and attributes msgid "" @@ -1627,7 +1610,7 @@ msgstr "" "Een gebruikersvriendelijke tekstbewerker\n" "geschreven voor de Midnight Commander" -msgid "Copyright (C) 1996-2023 the Free Software Foundation" +msgid "Copyright (C) 1996-2024 the Free Software Foundation" msgstr "" msgid "About" @@ -4157,67 +4140,24 @@ msgstr "" "EXTFS virtueel bestandssysteem:\n" "%s" -#, c-format -msgid "Warning: cannot open %s directory\n" -msgstr "Waarschuwing: kan map %s niet openen\n" - -#, c-format -msgid "fish: Disconnecting from %s" -msgstr "fish: Verbinding verbreken met %s" - -msgid "fish: Waiting for initial line..." -msgstr "fish: Wachten op initiële lijn..." - -msgid "Sorry, we cannot do password authenticated connections for now." +msgid "" +"EXTFS virtual file system:\n" +"wrong file name" msgstr "" -"Helaas, wachtwoord-beveiligde verbindingen zijn op dit moment niet mogelijk." - -#, c-format -msgid "fish: Password is required for %s" -msgstr "fish: Wachtwoord is verplicht voor %s" - -msgid "fish: Sending password..." -msgstr "fish: Wachtwoord wordt verstuurd..." - -msgid "fish: Sending initial line..." -msgstr "fish: Initiële lijn wordt verstuurd..." - -msgid "fish: Handshaking version..." -msgstr "fish: Versie handshaking..." - -msgid "fish: Getting host info..." -msgstr "fish: Verkrijgen van host-informatie..." -#, c-format -msgid "fish: Reading directory %s..." -msgstr "fish: Map %s wordt gelezen..." - -#, c-format -msgid "%s: done." -msgstr "%s: voltooid." +msgid "" +"EXTFS virtual file system:\n" +"wrong archive name" +msgstr "" -#, c-format -msgid "%s: failure" -msgstr " %s: fout " +msgid "" +"EXTFS virtual file system:\n" +"cannot build command" +msgstr "" #, c-format -msgid "fish: store %s: sending command..." -msgstr "fish: bewaar %s: opdracht verzenden..." - -msgid "fish: Local read failed, sending zeros" -msgstr "fisch: Lokale leesopdracht mislukt, nullen worden verzonden" - -msgid "fish: storing file" -msgstr "fish: opslaan van bestand" - -msgid "Aborting transfer..." -msgstr "Overdracht wordt verbroken..." - -msgid "Error reported after abort." -msgstr "Fout gemeld na verbreking." - -msgid "Aborted transfer would be successful." -msgstr "Verbroken transfer zou een success zijn." +msgid "Warning: cannot open %s directory\n" +msgstr "Waarschuwing: kan map %s niet openen\n" #, c-format msgid "ftpfs: Disconnecting from %s" @@ -4329,6 +4269,14 @@ msgstr "(eerst chdir)" msgid "ftpfs: failed; nowhere to fallback to" msgstr "ftpfs: mislukt; geen terugvalmogelijkheid " +#, c-format +msgid "%s: failure" +msgstr " %s: fout " + +#, c-format +msgid "%s: done." +msgstr "%s: voltooid." + msgid "ftpfs: storing file" msgstr "ftpfs: bestand opslaan" @@ -4485,6 +4433,53 @@ msgstr "sftp: (Ctrl-G break) Weergave lijst... %s" msgid "sftp: Listing done." msgstr "sftp: Klaar met opsomming." +#, c-format +msgid "shell: Disconnecting from %s" +msgstr "" + +msgid "shell: Waiting for initial line..." +msgstr "" + +msgid "Sorry, we cannot do password authenticated connections for now." +msgstr "" +"Helaas, wachtwoord-beveiligde verbindingen zijn op dit moment niet mogelijk." + +#, c-format +msgid "shell: Password is required for %s" +msgstr "" + +msgid "shell: Sending password..." +msgstr "" + +msgid "shell: Sending initial line..." +msgstr "" + +msgid "shell: Getting host info..." +msgstr "" + +#, c-format +msgid "shell: Reading directory %s..." +msgstr "" + +#, c-format +msgid "shell: store %s: sending command..." +msgstr "" + +msgid "shell: Local read failed, sending zeros" +msgstr "" + +msgid "shell: storing file" +msgstr "" + +msgid "Aborting transfer..." +msgstr "Overdracht wordt verbroken..." + +msgid "Error reported after abort." +msgstr "Fout gemeld na verbreking." + +msgid "Aborted transfer would be successful." +msgstr "Verbroken transfer zou een success zijn." + msgid "Inconsistent tar archive" msgstr "Inconsistent tar-archief" diff --git a/mcsrc/po/nl_BE.po b/mcsrc/po/nl_BE.po index 8f2258ec..58a55787 100644 --- a/mcsrc/po/nl_BE.po +++ b/mcsrc/po/nl_BE.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Midnight Commander\n" "Report-Msgid-Bugs-To: https://www.midnight-commander.org/\n" -"POT-Creation-Date: 2023-08-06 15:50+0200\n" +"POT-Creation-Date: 2024-01-20 20:51+0100\n" "PO-Revision-Date: 2010-12-29 10:19+0000\n" "Last-Translator: FULL NAME \n" "Language-Team: Dutch (Belgium) (http://app.transifex.com/mc/mc/language/" @@ -704,7 +704,8 @@ msgid "" " errdhotfocus\n" " Menus: menunormal, menuhot, menusel, menuhotsel, menuinactive\n" " Popup menus: pmenunormal, pmenusel, pmenutitle\n" -" Editor: editnormal, editbold, editmarked, editwhitespace,\n" +" Editor: editnormal, editbold, editmarked, editwhitespace, " +"editnonprintable,\n" " editlinestate, editbg, editframe, editframeactive\n" " editframedrag\n" " Viewer: viewnormal,viewbold, viewunderline, viewselected\n" @@ -1540,7 +1541,7 @@ msgid "" "written for the Midnight Commander." msgstr "" -msgid "Copyright (C) 1996-2023 the Free Software Foundation" +msgid "Copyright (C) 1996-2024 the Free Software Foundation" msgstr "" msgid "About" @@ -3901,65 +3902,23 @@ msgid "" "%s" msgstr "" -#, c-format -msgid "Warning: cannot open %s directory\n" -msgstr "" - -#, c-format -msgid "fish: Disconnecting from %s" -msgstr "" - -msgid "fish: Waiting for initial line..." -msgstr "" - -msgid "Sorry, we cannot do password authenticated connections for now." -msgstr "" - -#, c-format -msgid "fish: Password is required for %s" -msgstr "" - -msgid "fish: Sending password..." -msgstr "" - -msgid "fish: Sending initial line..." -msgstr "" - -msgid "fish: Handshaking version..." -msgstr "" - -msgid "fish: Getting host info..." -msgstr "" - -#, c-format -msgid "fish: Reading directory %s..." +msgid "" +"EXTFS virtual file system:\n" +"wrong file name" msgstr "" -#, c-format -msgid "%s: done." +msgid "" +"EXTFS virtual file system:\n" +"wrong archive name" msgstr "" -#, c-format -msgid "%s: failure" +msgid "" +"EXTFS virtual file system:\n" +"cannot build command" msgstr "" #, c-format -msgid "fish: store %s: sending command..." -msgstr "" - -msgid "fish: Local read failed, sending zeros" -msgstr "" - -msgid "fish: storing file" -msgstr "" - -msgid "Aborting transfer..." -msgstr "" - -msgid "Error reported after abort." -msgstr "" - -msgid "Aborted transfer would be successful." +msgid "Warning: cannot open %s directory\n" msgstr "" #, c-format @@ -4072,6 +4031,14 @@ msgstr "" msgid "ftpfs: failed; nowhere to fallback to" msgstr "" +#, c-format +msgid "%s: failure" +msgstr "" + +#, c-format +msgid "%s: done." +msgstr "" + msgid "ftpfs: storing file" msgstr "" @@ -4205,6 +4172,52 @@ msgstr "" msgid "sftp: Listing done." msgstr "" +#, c-format +msgid "shell: Disconnecting from %s" +msgstr "" + +msgid "shell: Waiting for initial line..." +msgstr "" + +msgid "Sorry, we cannot do password authenticated connections for now." +msgstr "" + +#, c-format +msgid "shell: Password is required for %s" +msgstr "" + +msgid "shell: Sending password..." +msgstr "" + +msgid "shell: Sending initial line..." +msgstr "" + +msgid "shell: Getting host info..." +msgstr "" + +#, c-format +msgid "shell: Reading directory %s..." +msgstr "" + +#, c-format +msgid "shell: store %s: sending command..." +msgstr "" + +msgid "shell: Local read failed, sending zeros" +msgstr "" + +msgid "shell: storing file" +msgstr "" + +msgid "Aborting transfer..." +msgstr "" + +msgid "Error reported after abort." +msgstr "" + +msgid "Aborted transfer would be successful." +msgstr "" + msgid "Inconsistent tar archive" msgstr "" diff --git a/mcsrc/po/pl.po b/mcsrc/po/pl.po index e8f499fd..b107882d 100644 --- a/mcsrc/po/pl.po +++ b/mcsrc/po/pl.po @@ -3,16 +3,16 @@ # This file is distributed under the same license as the mc package. # # Translators: -# Piotr Drąg , 2011-2023 +# Piotr Drąg , 2011-2024 # Slava Zanko , 2011 # Waldemar Stoczkowski, 2021 msgid "" msgstr "" "Project-Id-Version: Midnight Commander\n" "Report-Msgid-Bugs-To: https://www.midnight-commander.org/\n" -"POT-Creation-Date: 2023-08-06 15:50+0200\n" +"POT-Creation-Date: 2024-01-20 20:51+0100\n" "PO-Revision-Date: 2010-12-29 10:19+0000\n" -"Last-Translator: Piotr Drąg , 2011-2023\n" +"Last-Translator: Piotr Drąg , 2011-2024\n" "Language-Team: Polish (http://app.transifex.com/mc/mc/language/pl/)\n" "Language: pl\n" "MIME-Version: 1.0\n" @@ -743,15 +743,16 @@ msgid "" " errdhotfocus\n" " Menus: menunormal, menuhot, menusel, menuhotsel, menuinactive\n" " Popup menus: pmenunormal, pmenusel, pmenutitle\n" -" Editor: editnormal, editbold, editmarked, editwhitespace,\n" +" Editor: editnormal, editbold, editmarked, editwhitespace, " +"editnonprintable,\n" " editlinestate, editbg, editframe, editframeactive\n" " editframedrag\n" " Viewer: viewnormal,viewbold, viewunderline, viewselected\n" " Help: helpnormal, helpitalic, helpbold, helplink, helpslink\n" msgstr "" -"--colors KEYWORD={TEKST},{TŁO},{ATR}:SŁOWO_KLUCZOWE2=…\n" +"--colors SŁOWO_KLUCZOWE={TEKST},{TŁO},{ATR}:SŁOWO_KLUCZOWE2=…\n" "\n" -"{TEKST}, {TŁO} i {ATR} można pominąć, zostaną użyte wartości domyślne\n" +"{TEKST}, {TŁO} i {ATR} można pominąć, zostaną użyte wartości domyślne\n" "\n" " Słowa kluczowe:\n" " Globalne: errors, disabled, reverse, gauge, header\n" @@ -761,8 +762,9 @@ msgstr "" " Okna dialogowe: dnormal, dfocus, dhotnormal, dhotfocus, errdhotnormal,\n" " errdhotfocus\n" " Menu: menunormal, menuhot, menusel, menuhotsel, menuinactive\n" -" Menu wyskakujące: pmenunormal, pmenusel, pmenutitle\n" -" Edytor: editnormal, editbold, editmarked, editwhitespace,\n" +" Menu wyskakujące: pmenunormal, pmenusel, pmenutitle\n" +" Edytor: editnormal, editbold, editmarked, editwhitespace, " +"editnonprintable,\n" " editlinestate, editbg, editframe, editframeactive\n" " editframedrag\n" " Przeglądarka: viewnormal,viewbold, viewunderline, viewselected\n" @@ -1637,8 +1639,8 @@ msgstr "" "Łatwy w obsłudze edytor tekstu,\n" "napisany dla programu Midnight Commander." -msgid "Copyright (C) 1996-2023 the Free Software Foundation" -msgstr "Copyright © 1996-2023 Free Software Foundation" +msgid "Copyright (C) 1996-2024 the Free Software Foundation" +msgstr "Copyright © 1996-2024 Free Software Foundation" msgid "About" msgstr "O programie" @@ -4186,66 +4188,30 @@ msgstr "" "Wirtualny system plików EXTFS:\n" "%s" -#, c-format -msgid "Warning: cannot open %s directory\n" -msgstr "Ostrzeżenie: nie można utworzyć katalogu %s\n" - -#, c-format -msgid "fish: Disconnecting from %s" -msgstr "fish: rozłączanie z %s" - -msgid "fish: Waiting for initial line..." -msgstr "fish: oczekiwanie na wiersz początkowy…" - -msgid "Sorry, we cannot do password authenticated connections for now." -msgstr "Połączenia uwierzytelniane hasłem nie są na razie obsługiwane." - -#, c-format -msgid "fish: Password is required for %s" -msgstr "fish: wymagane jest hasło dla %s" - -msgid "fish: Sending password..." -msgstr "fish: wysyłanie hasła…" - -msgid "fish: Sending initial line..." -msgstr "fish: wysyłanie wiersza początkowego…" - -msgid "fish: Handshaking version..." -msgstr "fish: ustalanie wersji…" - -msgid "fish: Getting host info..." -msgstr "fish: pobieranie informacji o komputerze…" - -#, c-format -msgid "fish: Reading directory %s..." -msgstr "fish: odczytywanie katalogu %s…" +msgid "" +"EXTFS virtual file system:\n" +"wrong file name" +msgstr "" +"Wirtualny system plików EXTFS:\n" +"błędna nazwa pliku" -#, c-format -msgid "%s: done." -msgstr "%s: ukończono." +msgid "" +"EXTFS virtual file system:\n" +"wrong archive name" +msgstr "" +"Wirtualny system plików EXTFS:\n" +"błędna nazwa archiwum" -#, c-format -msgid "%s: failure" -msgstr "%s: niepowodzenie" +msgid "" +"EXTFS virtual file system:\n" +"cannot build command" +msgstr "" +"Wirtualny system plików EXTFS:\n" +"nie można zbudować polecenia" #, c-format -msgid "fish: store %s: sending command..." -msgstr "fish: zapis %s: wysyłanie polecenia…" - -msgid "fish: Local read failed, sending zeros" -msgstr "fish: lokalny odczyt się nie powiódł, wysyłanie zer" - -msgid "fish: storing file" -msgstr "fish: wysyłanie pliku" - -msgid "Aborting transfer..." -msgstr "Przerywanie przesyłania…" - -msgid "Error reported after abort." -msgstr "Zgłoszono błąd po przerwaniu." - -msgid "Aborted transfer would be successful." -msgstr "Przerwane przesyłanie zostałoby pomyślnie zakończone." +msgid "Warning: cannot open %s directory\n" +msgstr "Ostrzeżenie: nie można utworzyć katalogu %s\n" #, c-format msgid "ftpfs: Disconnecting from %s" @@ -4357,6 +4323,14 @@ msgstr "(najpierw chdir)" msgid "ftpfs: failed; nowhere to fallback to" msgstr "ftpfs: niepowodzenie; brak możliwości wycofania" +#, c-format +msgid "%s: failure" +msgstr "%s: niepowodzenie" + +#, c-format +msgid "%s: done." +msgstr "%s: ukończono." + msgid "ftpfs: storing file" msgstr "ftpfs: wysyłanie pliku" @@ -4515,6 +4489,52 @@ msgstr "sftp: (Ctrl-G przerywa) wyświetlanie listy… %s" msgid "sftp: Listing done." msgstr "sftp: ukończono wyświetlanie listy." +#, c-format +msgid "shell: Disconnecting from %s" +msgstr "powłoka: rozłączanie z %s" + +msgid "shell: Waiting for initial line..." +msgstr "powłoka: oczekiwanie na wiersz początkowy…" + +msgid "Sorry, we cannot do password authenticated connections for now." +msgstr "Połączenia uwierzytelniane hasłem nie są na razie obsługiwane." + +#, c-format +msgid "shell: Password is required for %s" +msgstr "powłoka: wymagane jest hasło dla %s" + +msgid "shell: Sending password..." +msgstr "powłoka: wysyłanie hasła…" + +msgid "shell: Sending initial line..." +msgstr "powłoka: wysyłanie wiersza początkowego…" + +msgid "shell: Getting host info..." +msgstr "powłoka: pobieranie informacji o komputerze…" + +#, c-format +msgid "shell: Reading directory %s..." +msgstr "powłoka: odczytywanie katalogu %s…" + +#, c-format +msgid "shell: store %s: sending command..." +msgstr "powłoka: zapis %s: wysyłanie polecenia…" + +msgid "shell: Local read failed, sending zeros" +msgstr "powłoka: lokalny odczyt się nie powiódł, wysyłanie zer" + +msgid "shell: storing file" +msgstr "powłoka: wysyłanie pliku" + +msgid "Aborting transfer..." +msgstr "Przerywanie przesyłania…" + +msgid "Error reported after abort." +msgstr "Zgłoszono błąd po przerwaniu." + +msgid "Aborted transfer would be successful." +msgstr "Przerwane przesyłanie zostałoby pomyślnie zakończone." + msgid "Inconsistent tar archive" msgstr "Niespójne archiwum tar" diff --git a/mcsrc/po/pt.po b/mcsrc/po/pt.po index eefd494a..c57fc0c5 100644 --- a/mcsrc/po/pt.po +++ b/mcsrc/po/pt.po @@ -5,16 +5,16 @@ # Translators: # Gilberto J <2101458@my.ipleiria.pt>, 2012 # Gilberto Jorge , 2012-2013 -# Gilberto Jorge , 2013-2023 +# Gilberto Jorge , 2013-2024 # Peter J. Mello , 2021 # Slava Zanko , 2011 msgid "" msgstr "" "Project-Id-Version: Midnight Commander\n" "Report-Msgid-Bugs-To: https://www.midnight-commander.org/\n" -"POT-Creation-Date: 2023-08-06 15:50+0200\n" +"POT-Creation-Date: 2024-01-20 20:51+0100\n" "PO-Revision-Date: 2010-12-29 10:19+0000\n" -"Last-Translator: Gilberto Jorge , 2013-2023\n" +"Last-Translator: Gilberto Jorge , 2013-2024\n" "Language-Team: Portuguese (http://app.transifex.com/mc/mc/language/pt/)\n" "Language: pt\n" "MIME-Version: 1.0\n" @@ -742,7 +742,8 @@ msgid "" " errdhotfocus\n" " Menus: menunormal, menuhot, menusel, menuhotsel, menuinactive\n" " Popup menus: pmenunormal, pmenusel, pmenutitle\n" -" Editor: editnormal, editbold, editmarked, editwhitespace,\n" +" Editor: editnormal, editbold, editmarked, editwhitespace, " +"editnonprintable,\n" " editlinestate, editbg, editframe, editframeactive\n" " editframedrag\n" " Viewer: viewnormal,viewbold, viewunderline, viewselected\n" @@ -750,23 +751,23 @@ msgid "" msgstr "" "--colors KEYWORD={FORE},{BACK},{ATTR}:KEYWORD2=...\n" "\n" -"{FORE}, {BACK} e {ATTR} pode ser omitido, e o valor por omissão será usado\n" +"{FORE}, {BACK} e {ATTR} podem ser omitidos, o valor por omissão será usado\n" "\n" -" Palavras chave (Keywords):\n" +" Keywords:\n" " Global: errors, disabled, reverse, gauge, header\n" " input, inputmark, inputunchanged, commandlinemark\n" " bbarhotkey, bbarbutton, statusbar\n" -" Visualização de ficheiro: normal, selected, marked, markselect\n" -" Caixas de diálogo: dnormal, dfocus, dhotnormal, dhotfocus, " -"errdhotnormal,\n" +" File display: normal, selected, marked, markselect\n" +" Dialog boxes: dnormal, dfocus, dhotnormal, dhotfocus, errdhotnormal,\n" " errdhotfocus\n" " Menus: menunormal, menuhot, menusel, menuhotsel, menuinactive\n" -" Menus popup: pmenunormal, pmenusel, pmenutitle\n" -" Editor: editnormal, editbold, editmarked, editwhitespace,\n" +" Popup menus: pmenunormal, pmenusel, pmenutitle\n" +" Editor: editnormal, editbold, editmarked, editwhitespace, " +"editnonprintable,\n" " editlinestate, editbg, editframe, editframeactive\n" " editframedrag\n" -" Visualizador: viewnormal,viewbold, viewunderline, viewselected\n" -" Ajuda: helpnormal, helpitalic, helpbold, helplink, helpslink\n" +" Viewer: viewnormal,viewbold, viewunderline, viewselected\n" +" Help: helpnormal, helpitalic, helpbold, helplink, helpslink\n" #. TRANSLATORS: don't translate color names and attributes msgid "" @@ -1636,8 +1637,8 @@ msgstr "" "Um editor de texto amigo do utilizador\n" "escrito para o Midnight Commander." -msgid "Copyright (C) 1996-2023 the Free Software Foundation" -msgstr "Copyright (C) 1996-2023 the Free Software Foundation" +msgid "Copyright (C) 1996-2024 the Free Software Foundation" +msgstr "Copyright (C) 1996-2024 the Free Software Foundation" msgid "About" msgstr "Acerca" @@ -4181,66 +4182,30 @@ msgstr "" "Sistema de ficheiro virtual EXTFS:\n" "%s" -#, c-format -msgid "Warning: cannot open %s directory\n" -msgstr "Aviso: não é possível abrir o diretório %s\n" - -#, c-format -msgid "fish: Disconnecting from %s" -msgstr "fish: A desligar de %s" - -msgid "fish: Waiting for initial line..." -msgstr "fish: A aguardar por linha inicial..." - -msgid "Sorry, we cannot do password authenticated connections for now." -msgstr "Desculpe, por ora ligações com senha autenticada não são possíveis." - -#, c-format -msgid "fish: Password is required for %s" -msgstr "fish: É necessário senha para %s" - -msgid "fish: Sending password..." -msgstr "fish: A enviar senha..." - -msgid "fish: Sending initial line..." -msgstr "fish: A enviar linha inicial..." - -msgid "fish: Handshaking version..." -msgstr "fish: Versão de protocolo (handshacking)..." - -msgid "fish: Getting host info..." -msgstr "fish: A obter informação de host..." - -#, c-format -msgid "fish: Reading directory %s..." -msgstr "fish: A ler directório %s..." +msgid "" +"EXTFS virtual file system:\n" +"wrong file name" +msgstr "" +"Sistema de ficheiros virtual EXTFS:\n" +"nome de ficheiro errado" -#, c-format -msgid "%s: done." -msgstr "%s: terminado." +msgid "" +"EXTFS virtual file system:\n" +"wrong archive name" +msgstr "" +"Sistema de ficheiros virtual EXTFS:\n" +"nome de arquivo errado" -#, c-format -msgid "%s: failure" -msgstr "%s: falha" +msgid "" +"EXTFS virtual file system:\n" +"cannot build command" +msgstr "" +"Sistema de ficheiros virtual EXTFS:\n" +"não é possível construir comando" #, c-format -msgid "fish: store %s: sending command..." -msgstr "fish: armazenar %s: a enviar comando..." - -msgid "fish: Local read failed, sending zeros" -msgstr "fish: Leitura local falhou, a enviar zeros" - -msgid "fish: storing file" -msgstr "fish: a guardar ficheiro" - -msgid "Aborting transfer..." -msgstr "A abortar transferência..." - -msgid "Error reported after abort." -msgstr "Erro reportado após abortar." - -msgid "Aborted transfer would be successful." -msgstr "Transferência abortada teria tido sucesso." +msgid "Warning: cannot open %s directory\n" +msgstr "Aviso: não é possível abrir o diretório %s\n" #, c-format msgid "ftpfs: Disconnecting from %s" @@ -4352,6 +4317,14 @@ msgstr "(chdir primeiro)" msgid "ftpfs: failed; nowhere to fallback to" msgstr "ftpfs: falhou; nenhum local para onde ir" +#, c-format +msgid "%s: failure" +msgstr "%s: falha" + +#, c-format +msgid "%s: done." +msgstr "%s: terminado." + msgid "ftpfs: storing file" msgstr "ftpfs: a guardar ficheiro" @@ -4508,6 +4481,52 @@ msgstr "sftp: (Ctrl-G break) A listar... %s" msgid "sftp: Listing done." msgstr "sftp: Listagem efetuada." +#, c-format +msgid "shell: Disconnecting from %s" +msgstr "shell: A desligar de %s" + +msgid "shell: Waiting for initial line..." +msgstr "shell: À espera da linha inicial..." + +msgid "Sorry, we cannot do password authenticated connections for now." +msgstr "Desculpe, por ora ligações com senha autenticada não são possíveis." + +#, c-format +msgid "shell: Password is required for %s" +msgstr "shell: É necessário password para %s" + +msgid "shell: Sending password..." +msgstr "shell: A enviar password..." + +msgid "shell: Sending initial line..." +msgstr "shell: A enviar linha inicial..." + +msgid "shell: Getting host info..." +msgstr "shell: A obter informação do host..." + +#, c-format +msgid "shell: Reading directory %s..." +msgstr "shell: A ler directório %s..." + +#, c-format +msgid "shell: store %s: sending command..." +msgstr "shell: guardar %s: a enviar comando..." + +msgid "shell: Local read failed, sending zeros" +msgstr "shell: Leitura local falhou, a enviar zeros" + +msgid "shell: storing file" +msgstr "shell: a guardar ficheiro" + +msgid "Aborting transfer..." +msgstr "A abortar transferência..." + +msgid "Error reported after abort." +msgstr "Erro reportado após abortar." + +msgid "Aborted transfer would be successful." +msgstr "Transferência abortada teria tido sucesso." + msgid "Inconsistent tar archive" msgstr "Arquivo tar inconsistente" diff --git a/mcsrc/po/pt_BR.po b/mcsrc/po/pt_BR.po index 202a1105..4185935a 100644 --- a/mcsrc/po/pt_BR.po +++ b/mcsrc/po/pt_BR.po @@ -5,7 +5,7 @@ # Translators: # Enrico Nicoletto , 2013 # Heitor Adão Júnior , 2017 -# marcelo cripe , 2022-2023 +# marcelo cripe , 2022-2024 # Mauro Hemerly Gazzani , 2017 # Rafael Fontenelle , 2012 # Slava Zanko , 2011 @@ -14,9 +14,9 @@ msgid "" msgstr "" "Project-Id-Version: Midnight Commander\n" "Report-Msgid-Bugs-To: https://www.midnight-commander.org/\n" -"POT-Creation-Date: 2023-08-06 15:50+0200\n" +"POT-Creation-Date: 2024-01-20 20:51+0100\n" "PO-Revision-Date: 2010-12-29 10:19+0000\n" -"Last-Translator: marcelo cripe , 2022-2023\n" +"Last-Translator: marcelo cripe , 2022-2024\n" "Language-Team: Portuguese (Brazil) (http://app.transifex.com/mc/mc/language/" "pt_BR/)\n" "Language: pt_BR\n" @@ -755,7 +755,8 @@ msgid "" " errdhotfocus\n" " Menus: menunormal, menuhot, menusel, menuhotsel, menuinactive\n" " Popup menus: pmenunormal, pmenusel, pmenutitle\n" -" Editor: editnormal, editbold, editmarked, editwhitespace,\n" +" Editor: editnormal, editbold, editmarked, editwhitespace, " +"editnonprintable,\n" " editlinestate, editbg, editframe, editframeactive\n" " editframedrag\n" " Viewer: viewnormal,viewbold, viewunderline, viewselected\n" @@ -763,22 +764,26 @@ msgid "" msgstr "" "--colors KEYWORD={FORE},{BACK},{ATTR}:KEYWORD2=...\n" "\n" -"{FORE}, {BACK} e {ATTR} podem ser omitidos e o padrão será utilizado\n" +"{FORE}, {BACK} e {ATTR} pode ser omitido e o padrão será utilizado\n" "\n" -" Palavras-chave:\n" -" Global: errors, disabled, reverse, gauge, header\n" -" input, inputmark, inputunchanged, commandlinemark\n" -" bbarhotkey, bbarbutton, statusbar\n" -" Exibição de arquivo: normal, selected, marked, markselect\n" +" Keywords (Palavras-chave):\n" +" Global: erros, desativado, reverso, medidor, entrada do\n" +" cabeçalho, marca de entrada, entrada inalterada,\n" +" tecla de atalho da marca da linha de comando da\n" +" barra, botão da barra, estado da barra\n" +"\n" +"\n" +" Exibição do arquivo: normal, selecionado, marcado, marca da seleção\n" " Caixas de diálogo: dnormal, dfocus, dhotnormal, dhotfocus, " "errdhotnormal,\n" " errdhotfocus\n" " Menus: menunormal, menuhot, menusel, menuhotsel, menuinactive\n" -" Caixas de diálogo dos menus: pmenunormal, pmenusel, pmenutitle\n" -" Editor: editnormal, editbold, editmarked, editwhitespace,\n" +" Menus de contexto pmenunormal, pmenusel, pmenutitle\n" +" Editor: editnormal, editbold, editmarked, editwhitespace, " +"editnonprintable,\n" " editlinestate, editbg, editframe, editframeactive\n" " editframedrag\n" -" Visualizador: viewnormal,viewbold, viewunderline, viewselected\n" +" Visualização: viewnormal,viewbold, viewunderline, viewselected\n" " Ajuda: helpnormal, helpitalic, helpbold, helplink, helpslink\n" #. TRANSLATORS: don't translate color names and attributes @@ -1658,8 +1663,8 @@ msgstr "" "Um editor de texto amigável\n" "escrito para o Midnight Commander." -msgid "Copyright (C) 1996-2023 the Free Software Foundation" -msgstr "Direitos de Autor (c) 1996-2023 a Fundação Free Software Foundation" +msgid "Copyright (C) 1996-2024 the Free Software Foundation" +msgstr "Direitos de Autor (C) 1996-2024 a Fundação ‘Free Software Foundation’" msgid "About" msgstr "Sobre" @@ -4231,69 +4236,32 @@ msgstr "" "Sistema de arquivos virtual EXTFS:\n" "%s" -#, c-format -msgid "Warning: cannot open %s directory\n" +msgid "" +"EXTFS virtual file system:\n" +"wrong file name" msgstr "" -"Aviso:\n" -"Não foi possível abrir o diretório %s\n" - -#, c-format -msgid "fish: Disconnecting from %s" -msgstr "O fish foi desconectado de %s" - -msgid "fish: Waiting for initial line..." -msgstr "O fish está aguardando a linha inicial..." +"Sistema de arquivos virtual EXTFS:\n" +"O nome do arquivo não está correto" -msgid "Sorry, we cannot do password authenticated connections for now." +msgid "" +"EXTFS virtual file system:\n" +"wrong archive name" msgstr "" -"Desculpe-me, não é possível fazer a autenticação por senha neste momento." - -#, c-format -msgid "fish: Password is required for %s" -msgstr "O fish necessita da senha para %s" - -msgid "fish: Sending password..." -msgstr "O fish está enviando a senha..." +"Sistema de arquivos virtuais EXTFS:\n" +"O nome do arquivo está errado" -msgid "fish: Sending initial line..." -msgstr "O fish está enviando a linha inicial..." - -msgid "fish: Handshaking version..." -msgstr "A versão de protocolo(handshacking) do fish..." - -msgid "fish: Getting host info..." -msgstr "O fish está obtendo as informações do hospedeiro..." - -#, c-format -msgid "fish: Reading directory %s..." -msgstr "O fish está lendo o diretório %s..." - -#, c-format -msgid "%s: done." -msgstr "%s: foi concluído com sucesso." - -#, c-format -msgid "%s: failure" -msgstr "%s: falhou durante o processo" +msgid "" +"EXTFS virtual file system:\n" +"cannot build command" +msgstr "" +"Sistema de arquivos virtuais EXTFS:\n" +"Não foi possível construir o comando" #, c-format -msgid "fish: store %s: sending command..." -msgstr "O fish armazenou %s e está enviando o comando..." - -msgid "fish: Local read failed, sending zeros" -msgstr "Ocorreu um erro no fish durante a leitura local e será enviado zeros" - -msgid "fish: storing file" -msgstr "O fish está armazenando o(s) arquivo(s)" - -msgid "Aborting transfer..." -msgstr "Interrompendo a transferência..." - -msgid "Error reported after abort." -msgstr "O erro foi reportado depois será finalizado." - -msgid "Aborted transfer would be successful." -msgstr "A transferência foi interrompida, mas poderia ser bem sucedida." +msgid "Warning: cannot open %s directory\n" +msgstr "" +"Aviso:\n" +"Não foi possível abrir o diretório %s\n" #, c-format msgid "ftpfs: Disconnecting from %s" @@ -4409,6 +4377,14 @@ msgstr "(primeiro o chdir)" msgid "ftpfs: failed; nowhere to fallback to" msgstr "Ocorreu uma falha no ftpfs e não é possível voltar" +#, c-format +msgid "%s: failure" +msgstr "%s: falhou durante o processo" + +#, c-format +msgid "%s: done." +msgstr "%s: foi concluído com sucesso." + msgid "ftpfs: storing file" msgstr "O ftpfs está armazenando os arquivos" @@ -4578,6 +4554,53 @@ msgstr "O sftp está listando (pressione as teclas Ctrl+G para pausar)... %s" msgid "sftp: Listing done." msgstr "A listagem do sftp foi concluída com sucesso." +#, c-format +msgid "shell: Disconnecting from %s" +msgstr "Shell: Desconectando de %s" + +msgid "shell: Waiting for initial line..." +msgstr "Shell: Aguardando a linha inicial..." + +msgid "Sorry, we cannot do password authenticated connections for now." +msgstr "" +"Desculpe-me, não é possível fazer a autenticação por senha neste momento." + +#, c-format +msgid "shell: Password is required for %s" +msgstr "Shell: A senha é necessária para %s" + +msgid "shell: Sending password..." +msgstr "Shell: Enviando a senha..." + +msgid "shell: Sending initial line..." +msgstr "Shell: Enviando a linha inicial..." + +msgid "shell: Getting host info..." +msgstr "Shell: Obtendo as informações do hospedeiro..." + +#, c-format +msgid "shell: Reading directory %s..." +msgstr "Shell: Lendo o diretório %s..." + +#, c-format +msgid "shell: store %s: sending command..." +msgstr "Shell: Armazenar %s: Enviando o comando..." + +msgid "shell: Local read failed, sending zeros" +msgstr "Shell: Ocorreu uma falha na leitura local, enviando zeros" + +msgid "shell: storing file" +msgstr "Shell: Armazenando o arquivo" + +msgid "Aborting transfer..." +msgstr "Interrompendo a transferência..." + +msgid "Error reported after abort." +msgstr "O erro foi reportado depois será finalizado." + +msgid "Aborted transfer would be successful." +msgstr "A transferência foi interrompida, mas poderia ser bem sucedida." + msgid "Inconsistent tar archive" msgstr "O arquivo tar não é consistente" diff --git a/mcsrc/po/ro.po b/mcsrc/po/ro.po index 6b6b1153..4d6a5bd9 100644 --- a/mcsrc/po/ro.po +++ b/mcsrc/po/ro.po @@ -16,7 +16,7 @@ msgid "" msgstr "" "Project-Id-Version: Midnight Commander\n" "Report-Msgid-Bugs-To: https://www.midnight-commander.org/\n" -"POT-Creation-Date: 2023-08-06 15:50+0200\n" +"POT-Creation-Date: 2024-01-20 20:51+0100\n" "PO-Revision-Date: 2010-12-29 10:19+0000\n" "Last-Translator: Simona Iacob , 2021-2023\n" "Language-Team: Romanian (http://app.transifex.com/mc/mc/language/ro/)\n" @@ -744,30 +744,13 @@ msgid "" " errdhotfocus\n" " Menus: menunormal, menuhot, menusel, menuhotsel, menuinactive\n" " Popup menus: pmenunormal, pmenusel, pmenutitle\n" -" Editor: editnormal, editbold, editmarked, editwhitespace,\n" +" Editor: editnormal, editbold, editmarked, editwhitespace, " +"editnonprintable,\n" " editlinestate, editbg, editframe, editframeactive\n" " editframedrag\n" " Viewer: viewnormal,viewbold, viewunderline, viewselected\n" " Help: helpnormal, helpitalic, helpbold, helplink, helpslink\n" msgstr "" -"--colors KEYWORD={FORE},{BACK},{ATTR}:KEYWORD2=...\n" -"\n" -"{FORE}, {BACK} and {ATTR} can be omitted, and the default will be used\n" -"\n" -" Keywords:\n" -" Global: errors, disabled, reverse, gauge, header\n" -" input, inputmark, inputunchanged, commandlinemark\n" -" bbarhotkey, bbarbutton, statusbar\n" -" File display: normal, selected, marked, markselect\n" -" Dialog boxes: dnormal, dfocus, dhotnormal, dhotfocus, errdhotnormal,\n" -" errdhotfocus\n" -" Menus: menunormal, menuhot, menusel, menuhotsel, menuinactive\n" -" Popup menus: pmenunormal, pmenusel, pmenutitle\n" -" Editor: editnormal, editbold, editmarked, editwhitespace,\n" -" editlinestate, editbg, editframe, editframeactive\n" -" editframedrag\n" -" Viewer: viewnormal,viewbold, viewunderline, viewselected\n" -" Help: helpnormal, helpitalic, helpbold, helplink, helpslink\n" #. TRANSLATORS: don't translate color names and attributes msgid "" @@ -1637,8 +1620,8 @@ msgstr "" "Un editor de text ușor de utilizat\n" "creat pentru Midnight Commander." -msgid "Copyright (C) 1996-2023 the Free Software Foundation" -msgstr "Copyright (C) 1996-2023 Fundația pentru Software Liber" +msgid "Copyright (C) 1996-2024 the Free Software Foundation" +msgstr "" msgid "About" msgstr "Despre" @@ -4178,68 +4161,24 @@ msgstr "" "Sistem de fișiere virtuale EXTFS:\n" "%s" -#, c-format -msgid "Warning: cannot open %s directory\n" -msgstr "Atenție: nu se poate deschide dosarul %s\n" - -#, c-format -msgid "fish: Disconnecting from %s" -msgstr "fish: Se deconectează de la %s" - -msgid "fish: Waiting for initial line..." -msgstr "fish: Se așteptă linia inițială..." - -msgid "Sorry, we cannot do password authenticated connections for now." +msgid "" +"EXTFS virtual file system:\n" +"wrong file name" msgstr "" -"Ne pare rău, deocamdată nu se pot efectua conectări autentificate prin " -"parolă." - -#, c-format -msgid "fish: Password is required for %s" -msgstr "fish: Este necesară o parolă pentru %s" - -msgid "fish: Sending password..." -msgstr "fish: Se trimite parola..." - -msgid "fish: Sending initial line..." -msgstr "fish: Se trimite linia inițială..." - -msgid "fish: Handshaking version..." -msgstr "fish: Se negociază versiunea..." -msgid "fish: Getting host info..." -msgstr "fish: Se obțin informații despre gazdă..." - -#, c-format -msgid "fish: Reading directory %s..." -msgstr "fish: Citesc dosarul %s..." - -#, c-format -msgid "%s: done." -msgstr "%s: efectuat." +msgid "" +"EXTFS virtual file system:\n" +"wrong archive name" +msgstr "" -#, c-format -msgid "%s: failure" -msgstr "%s: eșec" +msgid "" +"EXTFS virtual file system:\n" +"cannot build command" +msgstr "" #, c-format -msgid "fish: store %s: sending command..." -msgstr "fish: stochează %s: trimit comanda..." - -msgid "fish: Local read failed, sending zeros" -msgstr "fish: Citirea locală a eșuat, trimit zero-uri" - -msgid "fish: storing file" -msgstr "fish: se stochează fișierul" - -msgid "Aborting transfer..." -msgstr "Abandonez transferul..." - -msgid "Error reported after abort." -msgstr "S-a raportat o eroare după abandon." - -msgid "Aborted transfer would be successful." -msgstr "Transferul abandonat va reuși." +msgid "Warning: cannot open %s directory\n" +msgstr "Atenție: nu se poate deschide dosarul %s\n" #, c-format msgid "ftpfs: Disconnecting from %s" @@ -4351,6 +4290,14 @@ msgstr "(întâi chdir)" msgid "ftpfs: failed; nowhere to fallback to" msgstr "ftpfs: eșec; nu mai există nici o variantă la care să revin" +#, c-format +msgid "%s: failure" +msgstr "%s: eșec" + +#, c-format +msgid "%s: done." +msgstr "%s: efectuat." + msgid "ftpfs: storing file" msgstr "ftpfs: se stochează fișierul" @@ -4509,6 +4456,54 @@ msgstr "sftp: (Ctrl-G întrerupe) Afișare... %s" msgid "sftp: Listing done." msgstr "sftp: Afișarea a fost efectuată." +#, c-format +msgid "shell: Disconnecting from %s" +msgstr "" + +msgid "shell: Waiting for initial line..." +msgstr "" + +msgid "Sorry, we cannot do password authenticated connections for now." +msgstr "" +"Ne pare rău, deocamdată nu se pot efectua conectări autentificate prin " +"parolă." + +#, c-format +msgid "shell: Password is required for %s" +msgstr "" + +msgid "shell: Sending password..." +msgstr "" + +msgid "shell: Sending initial line..." +msgstr "" + +msgid "shell: Getting host info..." +msgstr "" + +#, c-format +msgid "shell: Reading directory %s..." +msgstr "" + +#, c-format +msgid "shell: store %s: sending command..." +msgstr "" + +msgid "shell: Local read failed, sending zeros" +msgstr "" + +msgid "shell: storing file" +msgstr "" + +msgid "Aborting transfer..." +msgstr "Abandonez transferul..." + +msgid "Error reported after abort." +msgstr "S-a raportat o eroare după abandon." + +msgid "Aborted transfer would be successful." +msgstr "Transferul abandonat va reuși." + msgid "Inconsistent tar archive" msgstr "Arhivă tar trunchiată" diff --git a/mcsrc/po/ru.po b/mcsrc/po/ru.po index 9daaa3bf..49b45c49 100644 --- a/mcsrc/po/ru.po +++ b/mcsrc/po/ru.po @@ -8,6 +8,7 @@ # Alex Tkachenko , 1998 # and Alex Tkachenko , 1998 # Andrei Stepanov, 2023 +# Andrei Stepanov, 2023 # Andrew Borodin , 2009-2012 # Andrew V. Samoilov , 1999,2014 # Anton Sergeevich Chumak , 2005 @@ -18,6 +19,7 @@ # Mr.GreyWolf, 2016 # NaiLi (aka jamesjames) Rootaerc , 2012 # Pavel Suravezhkin, 2022 +# Pavel Suravezhkin, 2022 # Piotr Drąg , 2018 # Sergey Panov , 1999 # Simple88, 2016 @@ -28,7 +30,7 @@ msgid "" msgstr "" "Project-Id-Version: Midnight Commander\n" "Report-Msgid-Bugs-To: https://www.midnight-commander.org/\n" -"POT-Creation-Date: 2023-08-06 15:50+0200\n" +"POT-Creation-Date: 2024-01-20 20:51+0100\n" "PO-Revision-Date: 2010-12-29 10:19+0000\n" "Last-Translator: Andrei Stepanov, 2023\n" "Language-Team: Russian (http://app.transifex.com/mc/mc/language/ru/)\n" @@ -187,7 +189,7 @@ msgid "True color not supported with ncurses." msgstr "True Color не поддерживается ncurses." msgid "Your terminal doesn't even seem to support 256 colors." -msgstr "Кажется, ваш терминал не поддерживает даже 256 цветов." +msgstr "Похоже, ваш терминал не поддерживает даже 256 цветов." msgid "True color not supported in this slang version." msgstr "True Color не поддерживается в этой версии slang." @@ -759,34 +761,13 @@ msgid "" " errdhotfocus\n" " Menus: menunormal, menuhot, menusel, menuhotsel, menuinactive\n" " Popup menus: pmenunormal, pmenusel, pmenutitle\n" -" Editor: editnormal, editbold, editmarked, editwhitespace,\n" +" Editor: editnormal, editbold, editmarked, editwhitespace, " +"editnonprintable,\n" " editlinestate, editbg, editframe, editframeactive\n" " editframedrag\n" " Viewer: viewnormal,viewbold, viewunderline, viewselected\n" " Help: helpnormal, helpitalic, helpbold, helplink, helpslink\n" msgstr "" -"--colors КЛЮЧЕВОЕ_СЛОВО={ТЕКСТ},{ФОН},{АТРИБУТ}:КЛЮЧЕВОЕ_СЛОВО2=...\n" -"\n" -"{ТЕКСТ}, {ФОН} и {АТРИБУТ} можно опустить, чтобы использовать значения по " -"умолчанию\n" -"\n" -"Ключевые слова:\n" -" Общие: errors, disabled, reverse, gauge, header\n" -" input, inputmark, inputunchanged, commandlinemark\n" -" bbarhotkey, bbarbutton, statusbar\n" -" Отображение файлов: normal, selected, marked, markselect\n" -" Диалоги: dnormal, dfocus, dhotnormal, dhotfocus, " -"errdhotnormal,\n" -" errdhotfocus\n" -" Меню: menunormal, menuhot, menusel, menuhotsel, " -"menuinactive\n" -" Всплывающие меню: pmenunormal, pmenusel, pmenutitle\n" -" Редактор: editnormal, editbold, editmarked, editwhitespace,\n" -" editlinestate, editbg, editframe, editframeactive\n" -" editframedrag\n" -" Просмотрщик: viewnormal, viewbold, viewunderline, viewselected\n" -" Справка: helpnormal, helpitalic, helpbold, helplink, " -"helpslink\n" #. TRANSLATORS: don't translate color names and attributes msgid "" @@ -977,7 +958,7 @@ msgid "ButtonBar|Help" msgstr "Помощь" msgid "ButtonBar|Save" -msgstr "Сохранить" +msgstr "Сохран" msgid "ButtonBar|Edit" msgstr "Правка" @@ -989,7 +970,7 @@ msgid "ButtonBar|Search" msgstr "Поиск" msgid "ButtonBar|Options" -msgstr "Настройки" +msgstr "Настр" msgid "ButtonBar|Quit" msgstr "Выход" @@ -1546,10 +1527,10 @@ msgid "&None" msgstr "Не&т" msgid "&Dynamic paragraphing" -msgstr "Динамический" +msgstr "&Динамический" msgid "Type &writer wrap" -msgstr "Автоматический перенос" +msgstr "&Автоматический перенос" msgid "Wrap mode" msgstr "Режим переноса строк" @@ -1573,13 +1554,13 @@ msgid "Other options" msgstr "Прочие настройки" msgid "&Return does autoindent" -msgstr "&Автоотступ \"Вводом\"" +msgstr "А&втоотступ \"Вводом\"" msgid "Confir&m before saving" -msgstr "П&одтверждать запись файла" +msgstr "Подтверждать запись &файла" msgid "Save file &position" -msgstr "Со&хранять позицию в файле" +msgstr "Сох&ранять позицию в файле" msgid "&Visible trailing spaces" msgstr "Отображать проб&елы" @@ -1654,8 +1635,8 @@ msgstr "" "Текстовый редактор с дружественным интерфейсом пользователя.\n" "Создан для Midnight Commander." -msgid "Copyright (C) 1996-2023 the Free Software Foundation" -msgstr "Copyright (C) 1996-2023 the Free Software Foundation" +msgid "Copyright (C) 1996-2024 the Free Software Foundation" +msgstr "" msgid "About" msgstr "О программе" @@ -1928,7 +1909,7 @@ msgid "S&ingle press" msgstr "Одино&чное нажатие" msgid "Timeout:" -msgstr "Интервал:" +msgstr "Период:" msgid "Pause after run" msgstr "Пауза после выполнения" @@ -1985,10 +1966,10 @@ msgid "Case &insensitive" msgstr "Без &учёта регистра" msgid "Use panel sort mo&de" -msgstr "&Использовать сортировку панели" +msgstr "И&спользовать сортировку панели" msgid "Show mi&ni-status" -msgstr "Показывать &мини-статус" +msgstr "&Показывать строку состояния" msgid "Use SI si&ze units" msgstr "Вывод в единицах &СИ" @@ -2006,7 +1987,7 @@ msgid "&Fast dir reload" msgstr "&Быстрая загрузка каталога" msgid "Ma&rk moves down" -msgstr "&Отметка перемещает курсор" +msgstr "Отметка переме&щает курсор" msgid "Re&verse files only" msgstr "Обрат&ить только файлы" @@ -2071,22 +2052,22 @@ msgid "&Long file list" msgstr "&Расширенный" msgid "&User defined:" -msgstr "&Определённый пользователем" +msgstr "&Заданный пользователем:" msgid "columns" msgstr "столбцы" msgid "User &mini status" -msgstr "Строка &мини-статуса в формате пользователя" +msgstr "&Пользовательская строка состояния" msgid "Listing format" msgstr "Формат списка файлов" msgid "Executable &first" -msgstr "Исполняемые &вначале" +msgstr "Сперва испо&лняемые" msgid "&Reverse" -msgstr "&Обратный" +msgstr "Обра&тный" msgid "Sort order" msgstr "Порядок сортировки" @@ -2108,7 +2089,7 @@ msgid "Confirmation|Di&rectory hotlist delete" msgstr "Удаление списка &каталогов" msgid "Confirmation|&History cleanup" -msgstr "&Очистка истории" +msgstr "О&чистка истории" msgid "Confirmation" msgstr "Подтверждение" @@ -2194,6 +2175,9 @@ msgid "" "%s\n" "%s" msgstr "" +"Не удалось сменить каталог на\n" +"%s\n" +"%s" msgid "Secure deletion" msgstr "Надёжное удаление" @@ -2455,7 +2439,7 @@ msgid "&Size only" msgstr "По &размеру" msgid "&Thorough" -msgstr "По&байтный" +msgstr "Поб&айтный" msgid "" "Both panels should be in the listing mode\n" @@ -2510,11 +2494,11 @@ msgstr "Настройка" #, c-format msgid "Setup saved to %s" -msgstr "Параметры сохранены в %s" +msgstr "Настройки сохранены в %s" #, c-format msgid "Unable to save setup to %s" -msgstr "Не удалось сохранить параметры в %s" +msgstr "Не удалось сохранить настройки в %s" msgid "Cannot execute commands on non-local filesystems" msgstr "Не удалось выполнить команды на нелокальных файловых системах" @@ -2620,7 +2604,7 @@ msgid "" "Cannot stat hardlink source file \"%s\"\n" "%s" msgstr "" -"Не удалось получить свойства исходного файла жёст. ссылки\"%s\"\n" +"Не удалось получить свойства исходного файла жёст. ссылки \"%s\"\n" "%s" #, c-format @@ -3084,13 +3068,13 @@ msgid "&Info" msgstr "Инфо&рмация" msgid "&Tree" -msgstr "Дерев&о" +msgstr "&Дерево" msgid "&Listing format..." msgstr "Фор&мат списка..." msgid "&Sort order..." -msgstr "Порядок &сортировки..." +msgstr "Порядок сор&тировки..." msgid "&Filter..." msgstr "&Фильтр..." @@ -3111,7 +3095,7 @@ msgid "Paneli&ze" msgstr "Па&нелизация" msgid "&Rescan" -msgstr "&Перепроверить" +msgstr "&Обновить" msgid "&View" msgstr "П&росмотр" @@ -3339,7 +3323,7 @@ msgid "A&ll charsets" msgstr "Вс&е кодировки" msgid "Fir&st hit" -msgstr "До первого в&хождения" +msgstr "До первого вхо&ждения" msgid "Find File" msgstr "Поиск файла" @@ -3485,7 +3469,7 @@ msgid "No node information" msgstr "Нет информации об узле" msgid "Free nodes:" -msgstr "Свободно узлов:" +msgstr "Своб. узлов:" msgid "No space information" msgstr "Нет информации о пространстве" @@ -3511,7 +3495,7 @@ msgstr "ФС: %s" #, c-format msgid "Accessed: %s" -msgstr "Обращение: %s" +msgstr "Доступ: %s" #, c-format msgid "Modified: %s" @@ -3652,7 +3636,7 @@ msgid "sort|m" msgstr "м" msgid "&Modify time" -msgstr "Время &правки" +msgstr "Дата &правки" #. TRANSLATORS: one single character to represent 'Access time' sort mode #. TRANSLATORS: no need to translate 'sort', it's just a context prefix @@ -3660,7 +3644,7 @@ msgid "sort|a" msgstr "д" msgid "&Access time" -msgstr "Время &доступа" +msgstr "Дата &доступа" #. TRANSLATORS: one single character to represent 'Change time' sort mode #. TRANSLATORS: no need to translate 'sort', it's just a context prefix @@ -3668,7 +3652,7 @@ msgid "sort|h" msgstr "п" msgid "C&hange time" -msgstr "В&ремя правки атрибутов" +msgstr "Дата &смены" msgid "Perm" msgstr "Права" @@ -3726,7 +3710,7 @@ msgid "Unknown tag on display format:" msgstr "Неизвестный тег в формате отображения:" msgid "&Files only" -msgstr "Только файлы" +msgstr "Только &файлы" msgid "&Case sensitive" msgstr "С учётом ре&гистра" @@ -3836,7 +3820,7 @@ msgid "ButtonBar|Dynamc" msgstr "Динамч" msgid "ButtonBar|Rescan" -msgstr "Пересм" +msgstr "Обновить" msgid "ButtonBar|Forget" msgstr "Забыть" @@ -3875,7 +3859,7 @@ msgid "Learn keys" msgstr "Определение клавиш" msgid "Teach me a key" -msgstr "Обучите меня клавише" +msgstr "Привязка клавиши" #, c-format msgid "" @@ -3930,9 +3914,9 @@ msgid "" "which keys are not marked with OK. Press space on the missing\n" "key, or click with the mouse to define it. Move around with Tab." msgstr "" -"Нажмите все перечисленные выше клавиши. После нажатий найдите,\n" -"какие клавиши не имеют пометки \"OK\". Для обучения клавише выберите\n" -"её при помощи Tab или мышкой и нажмите пробел." +"Нажмите все перечисленные выше клавиши. После найдите\n" +"клавиши без пометки \"OK\". Для привязки клавиши выберите\n" +"её через Tab и нажмите пробел, или щёлкните мышкой." #, c-format msgid "" @@ -4199,66 +4183,30 @@ msgstr "" "Виртуальная файловая система EXTFS:\n" "%s" -#, c-format -msgid "Warning: cannot open %s directory\n" -msgstr "Внимание: не удалось открыть каталог %s\n" - -#, c-format -msgid "fish: Disconnecting from %s" -msgstr "fish: отсоединение от %s" - -msgid "fish: Waiting for initial line..." -msgstr "fish: ожидается начальная строка..." - -msgid "Sorry, we cannot do password authenticated connections for now." -msgstr "Извините, не удалось создать авторизованные паролем соединения." - -#, c-format -msgid "fish: Password is required for %s" -msgstr "fish: требуется пароль для %s" - -msgid "fish: Sending password..." -msgstr "fish: посылается пароль..." - -msgid "fish: Sending initial line..." -msgstr "fish: посылается начальная строка..." - -msgid "fish: Handshaking version..." -msgstr "fish: версия подтверждения связи..." - -msgid "fish: Getting host info..." -msgstr "fish: собирается информация об удалённой машине..." - -#, c-format -msgid "fish: Reading directory %s..." -msgstr "fish: Чтение каталога %s..." +msgid "" +"EXTFS virtual file system:\n" +"wrong file name" +msgstr "" +"Виртуальная файловая система EXTFS:\n" +"неправильное имя файла" -#, c-format -msgid "%s: done." -msgstr "%s: готово." +msgid "" +"EXTFS virtual file system:\n" +"wrong archive name" +msgstr "" +"Виртуальная файловая система EXTFS:\n" +"неправильное имя архива" -#, c-format -msgid "%s: failure" -msgstr "%s: ошибка" +msgid "" +"EXTFS virtual file system:\n" +"cannot build command" +msgstr "" +"Виртуальная файловая система EXTFS:\n" +"не удаётся собрать команду" #, c-format -msgid "fish: store %s: sending command..." -msgstr "fish: запись %s: посылается команда..." - -msgid "fish: Local read failed, sending zeros" -msgstr "fish: сбой локального чтения, посылаются нули" - -msgid "fish: storing file" -msgstr "fish: запись файла" - -msgid "Aborting transfer..." -msgstr "Прерывание передачи..." - -msgid "Error reported after abort." -msgstr "Отмечена ошибка после прерывания." - -msgid "Aborted transfer would be successful." -msgstr "Передача успешно прервана." +msgid "Warning: cannot open %s directory\n" +msgstr "Внимание: не удалось открыть каталог %s\n" #, c-format msgid "ftpfs: Disconnecting from %s" @@ -4370,6 +4318,14 @@ msgstr "(сначала chdir)" msgid "ftpfs: failed; nowhere to fallback to" msgstr "ftpfs: ошибка; некуда перейти на аварийный режим" +#, c-format +msgid "%s: failure" +msgstr "%s: ошибка" + +#, c-format +msgid "%s: done." +msgstr "%s: готово." + msgid "ftpfs: storing file" msgstr "ftpfs: запись файла" @@ -4527,6 +4483,52 @@ msgstr "sftp: чтение списка файлов (прерывание по msgid "sftp: Listing done." msgstr "sftp: Чтение списка файлов завершено." +#, c-format +msgid "shell: Disconnecting from %s" +msgstr "shell: Отключение от %s" + +msgid "shell: Waiting for initial line..." +msgstr "shell: Ожидание начальное строки..." + +msgid "Sorry, we cannot do password authenticated connections for now." +msgstr "Извините, не удалось создать авторизованные паролем соединения." + +#, c-format +msgid "shell: Password is required for %s" +msgstr "shell: Требуется пароль для %s" + +msgid "shell: Sending password..." +msgstr "shell: Отправляется пароль..." + +msgid "shell: Sending initial line..." +msgstr "shell: Отправляется начальная строка..." + +msgid "shell: Getting host info..." +msgstr "shell: Получение данных хоста..." + +#, c-format +msgid "shell: Reading directory %s..." +msgstr "shell: Чтение каталога %s..." + +#, c-format +msgid "shell: store %s: sending command..." +msgstr "shell: хранилище %s: отправляется команда..." + +msgid "shell: Local read failed, sending zeros" +msgstr "shell: Локальное чтение не удалось, отправляются нули" + +msgid "shell: storing file" +msgstr "shell: сохранение файла" + +msgid "Aborting transfer..." +msgstr "Прерывание передачи..." + +msgid "Error reported after abort." +msgstr "Отмечена ошибка после прерывания." + +msgid "Aborted transfer would be successful." +msgstr "Передача успешно прервана." + msgid "Inconsistent tar archive" msgstr "Несогласованный архив tar" @@ -4546,9 +4548,11 @@ msgid "" "%s\n" "doesn't look like a tar archive" msgstr "" +"%s\n" +"не похож на архив tar" msgid "tar: mc_lseek not stopped at a record boundary" -msgstr "" +msgstr "tar: mc_lseek не остановился границе записи" msgid "undelfs: error" msgstr "undelfs: ошибка" diff --git a/mcsrc/po/sk.po b/mcsrc/po/sk.po index bd0b44cf..c1ee08bf 100644 --- a/mcsrc/po/sk.po +++ b/mcsrc/po/sk.po @@ -15,7 +15,7 @@ msgid "" msgstr "" "Project-Id-Version: Midnight Commander\n" "Report-Msgid-Bugs-To: https://www.midnight-commander.org/\n" -"POT-Creation-Date: 2023-08-06 15:50+0200\n" +"POT-Creation-Date: 2024-01-20 20:51+0100\n" "PO-Revision-Date: 2010-12-29 10:19+0000\n" "Last-Translator: hualahyja, 2019\n" "Language-Team: Slovak (http://app.transifex.com/mc/mc/language/sk/)\n" @@ -735,30 +735,13 @@ msgid "" " errdhotfocus\n" " Menus: menunormal, menuhot, menusel, menuhotsel, menuinactive\n" " Popup menus: pmenunormal, pmenusel, pmenutitle\n" -" Editor: editnormal, editbold, editmarked, editwhitespace,\n" +" Editor: editnormal, editbold, editmarked, editwhitespace, " +"editnonprintable,\n" " editlinestate, editbg, editframe, editframeactive\n" " editframedrag\n" " Viewer: viewnormal,viewbold, viewunderline, viewselected\n" " Help: helpnormal, helpitalic, helpbold, helplink, helpslink\n" msgstr "" -"--colors KĽÚČ_SLOVO={POPRED},{POZAD},{ATRIB}:KĽÚČ_SLOVO2=...\n" -"\n" -"{POPRED}, {POZAD} a {ATRIB} je možné vynechať a použijú sa predvolené\n" -"\n" -"Kľúčové slová:\n" -" Globálne: errors, disabled, reverse, gauge, header\n" -" input, inputmark, inputunchanged, commandlinemark\n" -" bbarhotkey, bbarbutton, statusbar\n" -" Zobr. súbor.: normal, selected, marked, markselect\n" -" Dialóg. okná: dnormal, dfocus, dhotnormal, dhotfocus, errdhotnormal,\n" -" errdhotfocus\n" -" Menu: menunormal, menuhot, menusel, menuhotsel, menuinactive\n" -" Rolet. menu: pmenunormal, pmenusel, pmenutitle\n" -" Editor: editnormal, editbold, editmarked, editwhitespace,\n" -" editlinestate, editbg, editframe, editframeactive\n" -" editframedrag\n" -" Prehliadač: viewnormal,viewbold, viewunderline, viewselected\n" -" Pomocník: helpnormal, helpitalic, helpbold, helplink, helpslink\n" #. TRANSLATORS: don't translate color names and attributes msgid "" @@ -1625,7 +1608,7 @@ msgstr "" "Používateľsky prívetivý textový editor\n" "napísaný pre Midnight Commander." -msgid "Copyright (C) 1996-2023 the Free Software Foundation" +msgid "Copyright (C) 1996-2024 the Free Software Foundation" msgstr "" msgid "About" @@ -4135,66 +4118,24 @@ msgid "" "%s" msgstr "" -#, c-format -msgid "Warning: cannot open %s directory\n" -msgstr "Upozornenie: nepodarilo sa otvoriť adresár %s\n" - -#, c-format -msgid "fish: Disconnecting from %s" -msgstr "fish: Odpája sa z %s" - -msgid "fish: Waiting for initial line..." -msgstr "fish: Čaká sa na inicializačný riadok..." - -msgid "Sorry, we cannot do password authenticated connections for now." -msgstr "Ľutujeme, zatiaľ nedokážeme pracovať s autentifikovanými spojeniami." - -#, c-format -msgid "fish: Password is required for %s" -msgstr "fish: %s vyžaduje heslo" - -msgid "fish: Sending password..." -msgstr "fish: Posiela sa heslo..." - -msgid "fish: Sending initial line..." -msgstr "fish: Posiela sa inicializačný riadok..." - -msgid "fish: Handshaking version..." -msgstr "fish: Dohaduje sa verzia..." - -msgid "fish: Getting host info..." -msgstr "fish: Získavajú sa informácie o hostiteľovi" - -#, c-format -msgid "fish: Reading directory %s..." -msgstr "fish: Načítava sa adresár %s..." +msgid "" +"EXTFS virtual file system:\n" +"wrong file name" +msgstr "" -#, c-format -msgid "%s: done." -msgstr "%s: hotovo." +msgid "" +"EXTFS virtual file system:\n" +"wrong archive name" +msgstr "" -#, c-format -msgid "%s: failure" -msgstr "%s: chyba" +msgid "" +"EXTFS virtual file system:\n" +"cannot build command" +msgstr "" #, c-format -msgid "fish: store %s: sending command..." -msgstr "fish: store %s: posiela sa príkaz..." - -msgid "fish: Local read failed, sending zeros" -msgstr "fish: Miestne čítanie zlyhalo, posielajú sa nuly" - -msgid "fish: storing file" -msgstr "fish: ukladá sa súbor" - -msgid "Aborting transfer..." -msgstr "Prerušuje sa prenos..." - -msgid "Error reported after abort." -msgstr "Chyba hlásená po prerušení." - -msgid "Aborted transfer would be successful." -msgstr "Prerušenie prenosu bolo úspešné." +msgid "Warning: cannot open %s directory\n" +msgstr "Upozornenie: nepodarilo sa otvoriť adresár %s\n" #, c-format msgid "ftpfs: Disconnecting from %s" @@ -4306,6 +4247,14 @@ msgstr "(naprv cd)" msgid "ftpfs: failed; nowhere to fallback to" msgstr "ftpfs: chyba; niet kam sa vrátiť" +#, c-format +msgid "%s: failure" +msgstr "%s: chyba" + +#, c-format +msgid "%s: done." +msgstr "%s: hotovo." + msgid "ftpfs: storing file" msgstr "ftpfs: ukladám súbor" @@ -4445,6 +4394,52 @@ msgstr "sftp: (Ctrl-G preruší) Výpis... %s" msgid "sftp: Listing done." msgstr "sftp: Výpis - hotovo." +#, c-format +msgid "shell: Disconnecting from %s" +msgstr "" + +msgid "shell: Waiting for initial line..." +msgstr "" + +msgid "Sorry, we cannot do password authenticated connections for now." +msgstr "Ľutujeme, zatiaľ nedokážeme pracovať s autentifikovanými spojeniami." + +#, c-format +msgid "shell: Password is required for %s" +msgstr "" + +msgid "shell: Sending password..." +msgstr "" + +msgid "shell: Sending initial line..." +msgstr "" + +msgid "shell: Getting host info..." +msgstr "" + +#, c-format +msgid "shell: Reading directory %s..." +msgstr "" + +#, c-format +msgid "shell: store %s: sending command..." +msgstr "" + +msgid "shell: Local read failed, sending zeros" +msgstr "" + +msgid "shell: storing file" +msgstr "" + +msgid "Aborting transfer..." +msgstr "Prerušuje sa prenos..." + +msgid "Error reported after abort." +msgstr "Chyba hlásená po prerušení." + +msgid "Aborted transfer would be successful." +msgstr "Prerušenie prenosu bolo úspešné." + msgid "Inconsistent tar archive" msgstr "Poškodený archív .tar" diff --git a/mcsrc/po/sl.po b/mcsrc/po/sl.po index 4d690676..ac94842f 100644 --- a/mcsrc/po/sl.po +++ b/mcsrc/po/sl.po @@ -10,7 +10,7 @@ msgid "" msgstr "" "Project-Id-Version: Midnight Commander\n" "Report-Msgid-Bugs-To: https://www.midnight-commander.org/\n" -"POT-Creation-Date: 2023-08-06 15:50+0200\n" +"POT-Creation-Date: 2024-01-20 20:51+0100\n" "PO-Revision-Date: 2010-12-29 10:19+0000\n" "Last-Translator: Matej Urbančič <>, 2012\n" "Language-Team: Slovenian (http://app.transifex.com/mc/mc/language/sl/)\n" @@ -716,7 +716,8 @@ msgid "" " errdhotfocus\n" " Menus: menunormal, menuhot, menusel, menuhotsel, menuinactive\n" " Popup menus: pmenunormal, pmenusel, pmenutitle\n" -" Editor: editnormal, editbold, editmarked, editwhitespace,\n" +" Editor: editnormal, editbold, editmarked, editwhitespace, " +"editnonprintable,\n" " editlinestate, editbg, editframe, editframeactive\n" " editframedrag\n" " Viewer: viewnormal,viewbold, viewunderline, viewselected\n" @@ -1552,7 +1553,7 @@ msgid "" "written for the Midnight Commander." msgstr "" -msgid "Copyright (C) 1996-2023 the Free Software Foundation" +msgid "Copyright (C) 1996-2024 the Free Software Foundation" msgstr "" msgid "About" @@ -3952,68 +3953,25 @@ msgid "" "%s" msgstr "" -#, c-format -msgid "Warning: cannot open %s directory\n" -msgstr "" - -#, c-format -msgid "fish: Disconnecting from %s" -msgstr "fish: Prekinjam povezavo z %s" - -msgid "fish: Waiting for initial line..." -msgstr "fish: Čakam na inicializacijsko vrstico..." - -msgid "Sorry, we cannot do password authenticated connections for now." +msgid "" +"EXTFS virtual file system:\n" +"wrong file name" msgstr "" -"Oprostite, zaenkrat ne znamo ustvarjati z geslom avtentificiranih povezav." -#, c-format -msgid "fish: Password is required for %s" +msgid "" +"EXTFS virtual file system:\n" +"wrong archive name" msgstr "" -msgid "fish: Sending password..." -msgstr "fish: Pošiljam geslo..." - -msgid "fish: Sending initial line..." -msgstr "fish: Pošiljam inicializacijsko vrstico..." - -msgid "fish: Handshaking version..." -msgstr "fish: Rovanje različic..." - -msgid "fish: Getting host info..." +msgid "" +"EXTFS virtual file system:\n" +"cannot build command" msgstr "" #, c-format -msgid "fish: Reading directory %s..." -msgstr "fish: Berem imenik %s..." - -#, c-format -msgid "%s: done." -msgstr "%s: opravljeno." - -#, c-format -msgid "%s: failure" -msgstr "%s: napaka" - -#, c-format -msgid "fish: store %s: sending command..." -msgstr "fish: shranjujem %s: pošiljnam ukaz..." - -msgid "fish: Local read failed, sending zeros" -msgstr "fish: Krajevno branje ni uspelo, pošiljam nule" - -msgid "fish: storing file" +msgid "Warning: cannot open %s directory\n" msgstr "" -msgid "Aborting transfer..." -msgstr "Prekinjam prenos..." - -msgid "Error reported after abort." -msgstr "Napaka sporočena po prekinitvi." - -msgid "Aborted transfer would be successful." -msgstr "Prekinjen prenos bi bil uspešen." - #, c-format msgid "ftpfs: Disconnecting from %s" msgstr "ftpfs: Prekinjam povezavo z %s" @@ -4124,6 +4082,14 @@ msgstr "(najprej spremeni imenik)" msgid "ftpfs: failed; nowhere to fallback to" msgstr "ftpfs: spodletel; ni več možnih rešitev" +#, c-format +msgid "%s: failure" +msgstr "%s: napaka" + +#, c-format +msgid "%s: done." +msgstr "%s: opravljeno." + msgid "ftpfs: storing file" msgstr "" @@ -4261,6 +4227,53 @@ msgstr "" msgid "sftp: Listing done." msgstr "" +#, c-format +msgid "shell: Disconnecting from %s" +msgstr "" + +msgid "shell: Waiting for initial line..." +msgstr "" + +msgid "Sorry, we cannot do password authenticated connections for now." +msgstr "" +"Oprostite, zaenkrat ne znamo ustvarjati z geslom avtentificiranih povezav." + +#, c-format +msgid "shell: Password is required for %s" +msgstr "" + +msgid "shell: Sending password..." +msgstr "" + +msgid "shell: Sending initial line..." +msgstr "" + +msgid "shell: Getting host info..." +msgstr "" + +#, c-format +msgid "shell: Reading directory %s..." +msgstr "" + +#, c-format +msgid "shell: store %s: sending command..." +msgstr "" + +msgid "shell: Local read failed, sending zeros" +msgstr "" + +msgid "shell: storing file" +msgstr "" + +msgid "Aborting transfer..." +msgstr "Prekinjam prenos..." + +msgid "Error reported after abort." +msgstr "Napaka sporočena po prekinitvi." + +msgid "Aborted transfer would be successful." +msgstr "Prekinjen prenos bi bil uspešen." + msgid "Inconsistent tar archive" msgstr "Nekonsistenten tar arhiv" diff --git a/mcsrc/po/sr.po b/mcsrc/po/sr.po index de69dc6e..e3ad4221 100644 --- a/mcsrc/po/sr.po +++ b/mcsrc/po/sr.po @@ -9,7 +9,7 @@ msgid "" msgstr "" "Project-Id-Version: Midnight Commander\n" "Report-Msgid-Bugs-To: https://www.midnight-commander.org/\n" -"POT-Creation-Date: 2023-08-06 15:50+0200\n" +"POT-Creation-Date: 2024-01-20 20:51+0100\n" "PO-Revision-Date: 2010-12-29 10:19+0000\n" "Last-Translator: Slava Zanko , 2011\n" "Language-Team: Serbian (http://app.transifex.com/mc/mc/language/sr/)\n" @@ -722,30 +722,13 @@ msgid "" " errdhotfocus\n" " Menus: menunormal, menuhot, menusel, menuhotsel, menuinactive\n" " Popup menus: pmenunormal, pmenusel, pmenutitle\n" -" Editor: editnormal, editbold, editmarked, editwhitespace,\n" +" Editor: editnormal, editbold, editmarked, editwhitespace, " +"editnonprintable,\n" " editlinestate, editbg, editframe, editframeactive\n" " editframedrag\n" " Viewer: viewnormal,viewbold, viewunderline, viewselected\n" " Help: helpnormal, helpitalic, helpbold, helplink, helpslink\n" msgstr "" -"--colors KEYWORD={FORE},{BACK},{ATTR}:KEYWORD2=...\n" -"\n" -"{FORE}, {BACK} и {ATTR} могу да се изоставе, а биће коришћене основности\n" -"\n" -" Кључне речи:\n" -" Опште: errors, disabled, reverse, gauge, header\n" -" input, inputmark, inputunchanged, commandlinemark\n" -" bbarhotkey, bbarbutton, statusbar\n" -" Приказивање датотека: normal, selected, marked, markselect\n" -" Поља прозорчета: dnormal, dfocus, dhotnormal, dhotfocus, errdhotnormal,\n" -" errdhotfocus\n" -" Изборници: menunormal, menuhot, menusel, menuhotsel, menuinactive\n" -" Искачући изборници: pmenunormal, pmenusel, pmenutitle\n" -" Уређивач: editnormal, editbold, editmarked, editwhitespace,\n" -" editlinestate, editbg, editframe, editframeactive\n" -" editframedrag\n" -" Прегледач: viewnormal,viewbold, viewunderline, viewselected\n" -" Помоћ: helpnormal, helpitalic, helpbold, helplink, helpslink\n" #. TRANSLATORS: don't translate color names and attributes msgid "" @@ -1612,7 +1595,7 @@ msgstr "" "Уређивач текста наклоњен кориснику\n" "написан за Поноћног наредника." -msgid "Copyright (C) 1996-2023 the Free Software Foundation" +msgid "Copyright (C) 1996-2024 the Free Software Foundation" msgstr "" msgid "About" @@ -4111,66 +4094,24 @@ msgid "" "%s" msgstr "" -#, c-format -msgid "Warning: cannot open %s directory\n" -msgstr "Упозорење: не могу да отворим директоријум „%s“\n" - -#, c-format -msgid "fish: Disconnecting from %s" -msgstr "fish: Прекидам везу са „%s“" - -msgid "fish: Waiting for initial line..." -msgstr "fish: Чекам почетни ред..." - -msgid "Sorry, we cannot do password authenticated connections for now." -msgstr "Извините, али за сад не можемо да се повезујемо уз потврду лозинке." - -#, c-format -msgid "fish: Password is required for %s" -msgstr "fish: Потребна је лозинка за „%s“" - -msgid "fish: Sending password..." -msgstr "fish: Шаљем лозинку..." - -msgid "fish: Sending initial line..." -msgstr "fish: Шаљем почетни ред..." - -msgid "fish: Handshaking version..." -msgstr "fish: Преговарам о издању..." - -msgid "fish: Getting host info..." -msgstr "fish: Добављам податке о домаћину..." - -#, c-format -msgid "fish: Reading directory %s..." -msgstr "fish: Читам директоријум „%s“..." +msgid "" +"EXTFS virtual file system:\n" +"wrong file name" +msgstr "" -#, c-format -msgid "%s: done." -msgstr "%s: готово." +msgid "" +"EXTFS virtual file system:\n" +"wrong archive name" +msgstr "" -#, c-format -msgid "%s: failure" -msgstr "%s: неуспех" +msgid "" +"EXTFS virtual file system:\n" +"cannot build command" +msgstr "" #, c-format -msgid "fish: store %s: sending command..." -msgstr "fish: складиште „%s“: шаљем наредбу..." - -msgid "fish: Local read failed, sending zeros" -msgstr "fish: Месно читање није успело, шаљем нуле" - -msgid "fish: storing file" -msgstr "fish: смештам датотеку" - -msgid "Aborting transfer..." -msgstr "Прекидам пренос..." - -msgid "Error reported after abort." -msgstr "Пријављена је грешка после прекида." - -msgid "Aborted transfer would be successful." -msgstr "Прекинути пренос би био успешан." +msgid "Warning: cannot open %s directory\n" +msgstr "Упозорење: не могу да отворим директоријум „%s“\n" #, c-format msgid "ftpfs: Disconnecting from %s" @@ -4282,6 +4223,14 @@ msgstr "(прво промени директоријум)" msgid "ftpfs: failed; nowhere to fallback to" msgstr "ftpfs: нисам успео; немам решења" +#, c-format +msgid "%s: failure" +msgstr "%s: неуспех" + +#, c-format +msgid "%s: done." +msgstr "%s: готово." + msgid "ftpfs: storing file" msgstr "ftpfs: смештам датотеку" @@ -4421,6 +4370,52 @@ msgstr "sftp: (Ктрл-Г прекида) Исписујем... %s" msgid "sftp: Listing done." msgstr "sftp: Исписивање је готово." +#, c-format +msgid "shell: Disconnecting from %s" +msgstr "" + +msgid "shell: Waiting for initial line..." +msgstr "" + +msgid "Sorry, we cannot do password authenticated connections for now." +msgstr "Извините, али за сад не можемо да се повезујемо уз потврду лозинке." + +#, c-format +msgid "shell: Password is required for %s" +msgstr "" + +msgid "shell: Sending password..." +msgstr "" + +msgid "shell: Sending initial line..." +msgstr "" + +msgid "shell: Getting host info..." +msgstr "" + +#, c-format +msgid "shell: Reading directory %s..." +msgstr "" + +#, c-format +msgid "shell: store %s: sending command..." +msgstr "" + +msgid "shell: Local read failed, sending zeros" +msgstr "" + +msgid "shell: storing file" +msgstr "" + +msgid "Aborting transfer..." +msgstr "Прекидам пренос..." + +msgid "Error reported after abort." +msgstr "Пријављена је грешка после прекида." + +msgid "Aborted transfer would be successful." +msgstr "Прекинути пренос би био успешан." + msgid "Inconsistent tar archive" msgstr "Недоследна тар архива" diff --git a/mcsrc/po/sv.po b/mcsrc/po/sv.po index 94331511..469a986d 100644 --- a/mcsrc/po/sv.po +++ b/mcsrc/po/sv.po @@ -18,7 +18,7 @@ msgid "" msgstr "" "Project-Id-Version: Midnight Commander\n" "Report-Msgid-Bugs-To: https://www.midnight-commander.org/\n" -"POT-Creation-Date: 2023-08-06 15:50+0200\n" +"POT-Creation-Date: 2024-01-20 20:51+0100\n" "PO-Revision-Date: 2010-12-29 10:19+0000\n" "Last-Translator: Alexander Kilian , 2022\n" "Language-Team: Swedish (http://app.transifex.com/mc/mc/language/sv/)\n" @@ -740,30 +740,13 @@ msgid "" " errdhotfocus\n" " Menus: menunormal, menuhot, menusel, menuhotsel, menuinactive\n" " Popup menus: pmenunormal, pmenusel, pmenutitle\n" -" Editor: editnormal, editbold, editmarked, editwhitespace,\n" +" Editor: editnormal, editbold, editmarked, editwhitespace, " +"editnonprintable,\n" " editlinestate, editbg, editframe, editframeactive\n" " editframedrag\n" " Viewer: viewnormal,viewbold, viewunderline, viewselected\n" " Help: helpnormal, helpitalic, helpbold, helplink, helpslink\n" msgstr "" -"--colors NYCKELORD={FÖRGR},{BAKGR},{ATTR}:NYCKELORD2=...\n" -"\n" -"Om {FÖRGR}, {BAKGR} eller {ATTR} utelämnas används förinställt värde\n" -"\n" -" Nyckelord:\n" -" Globalt: errors, disabled, reverse, gauge, header\n" -" input, inputmark, inputunchanged, commandlinemark\n" -" bbarhotkey, bbarbutton, statusbar\n" -" Filvisning: normal, selected, marked, markselect\n" -" Dialogrutor: dnormal, dfocus, dhotnormal, dhotfocus, errdhotnormal,\n" -" errdhotfocus\n" -" Menyer: menunormal, menuhot, menusel, menuhotsel, menuinactive\n" -" Popupmenyer: pmenunormal, pmenusel, pmenutitle\n" -" Editor: editnormal, editbold, editmarked, editwhitespace,\n" -" editlinestate, editbg, editframe, editframeactive\n" -" editframedrag\n" -" Textvisare: viewnormal,viewbold, viewunderline, viewselected\n" -" Hjälp: helpnormal, helpitalic, helpbold, helplink, helpslink\n" #. TRANSLATORS: don't translate color names and attributes msgid "" @@ -1630,7 +1613,7 @@ msgstr "" "En användarvänlig texteditor\n" "skriven för Midnight Commander." -msgid "Copyright (C) 1996-2023 the Free Software Foundation" +msgid "Copyright (C) 1996-2024 the Free Software Foundation" msgstr "" msgid "About" @@ -4135,66 +4118,24 @@ msgid "" "%s" msgstr "" -#, c-format -msgid "Warning: cannot open %s directory\n" -msgstr "Varning: Öppning av katalogen %s misslyckades\n" - -#, c-format -msgid "fish: Disconnecting from %s" -msgstr "fish: Kopplar ned från %s" - -msgid "fish: Waiting for initial line..." -msgstr "fish: Väntar på första raden..." - -msgid "Sorry, we cannot do password authenticated connections for now." -msgstr "Kan inte göra lösenords autentiserade anslutningar för närvarande." - -#, c-format -msgid "fish: Password is required for %s" -msgstr "fish: Lösenord krävs för %s" - -msgid "fish: Sending password..." -msgstr "fish: Sänder lösenord..." - -msgid "fish: Sending initial line..." -msgstr "fish: Sänder första raden..." - -msgid "fish: Handshaking version..." -msgstr "fish: Handskakning version..." - -msgid "fish: Getting host info..." -msgstr "fish: Mottar värd-info..." - -#, c-format -msgid "fish: Reading directory %s..." -msgstr "fish: Läser katalog %s..." +msgid "" +"EXTFS virtual file system:\n" +"wrong file name" +msgstr "" -#, c-format -msgid "%s: done." -msgstr "%s: klar." +msgid "" +"EXTFS virtual file system:\n" +"wrong archive name" +msgstr "" -#, c-format -msgid "%s: failure" -msgstr "%s: fel" +msgid "" +"EXTFS virtual file system:\n" +"cannot build command" +msgstr "" #, c-format -msgid "fish: store %s: sending command..." -msgstr "fish: lagrar %s: sänder kommando..." - -msgid "fish: Local read failed, sending zeros" -msgstr "fish: Lokal läsning misslyckades, sänder nollor" - -msgid "fish: storing file" -msgstr "fish: sparar fil" - -msgid "Aborting transfer..." -msgstr "Avbryter överföringen..." - -msgid "Error reported after abort." -msgstr "Fel rapporterades efter avslutningen." - -msgid "Aborted transfer would be successful." -msgstr "Avbruten överföring skulle ha varit lyckad." +msgid "Warning: cannot open %s directory\n" +msgstr "Varning: Öppning av katalogen %s misslyckades\n" #, c-format msgid "ftpfs: Disconnecting from %s" @@ -4306,6 +4247,14 @@ msgstr "(chdir först)" msgid "ftpfs: failed; nowhere to fallback to" msgstr "ftpfs: misslyckades: det finns ingenstans att falla tillbaka på" +#, c-format +msgid "%s: failure" +msgstr "%s: fel" + +#, c-format +msgid "%s: done." +msgstr "%s: klar." + msgid "ftpfs: storing file" msgstr "ftpfs: sparar fil" @@ -4445,6 +4394,52 @@ msgstr "sftp: (Ctrl-G avbryter) Listar... %s" msgid "sftp: Listing done." msgstr "sftp: Listning klar." +#, c-format +msgid "shell: Disconnecting from %s" +msgstr "" + +msgid "shell: Waiting for initial line..." +msgstr "" + +msgid "Sorry, we cannot do password authenticated connections for now." +msgstr "Kan inte göra lösenords autentiserade anslutningar för närvarande." + +#, c-format +msgid "shell: Password is required for %s" +msgstr "" + +msgid "shell: Sending password..." +msgstr "" + +msgid "shell: Sending initial line..." +msgstr "" + +msgid "shell: Getting host info..." +msgstr "" + +#, c-format +msgid "shell: Reading directory %s..." +msgstr "" + +#, c-format +msgid "shell: store %s: sending command..." +msgstr "" + +msgid "shell: Local read failed, sending zeros" +msgstr "" + +msgid "shell: storing file" +msgstr "" + +msgid "Aborting transfer..." +msgstr "Avbryter överföringen..." + +msgid "Error reported after abort." +msgstr "Fel rapporterades efter avslutningen." + +msgid "Aborted transfer would be successful." +msgstr "Avbruten överföring skulle ha varit lyckad." + msgid "Inconsistent tar archive" msgstr "Inkonsistensfel i tararkivet" diff --git a/mcsrc/po/szl.po b/mcsrc/po/szl.po index c3726445..f4b5f1e1 100644 --- a/mcsrc/po/szl.po +++ b/mcsrc/po/szl.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Midnight Commander\n" "Report-Msgid-Bugs-To: https://www.midnight-commander.org/\n" -"POT-Creation-Date: 2023-08-06 15:50+0200\n" +"POT-Creation-Date: 2024-01-20 20:51+0100\n" "PO-Revision-Date: 2010-12-29 10:19+0000\n" "Last-Translator: FULL NAME \n" "Language-Team: Silesian (http://app.transifex.com/mc/mc/language/szl/)\n" @@ -704,7 +704,8 @@ msgid "" " errdhotfocus\n" " Menus: menunormal, menuhot, menusel, menuhotsel, menuinactive\n" " Popup menus: pmenunormal, pmenusel, pmenutitle\n" -" Editor: editnormal, editbold, editmarked, editwhitespace,\n" +" Editor: editnormal, editbold, editmarked, editwhitespace, " +"editnonprintable,\n" " editlinestate, editbg, editframe, editframeactive\n" " editframedrag\n" " Viewer: viewnormal,viewbold, viewunderline, viewselected\n" @@ -1540,7 +1541,7 @@ msgid "" "written for the Midnight Commander." msgstr "" -msgid "Copyright (C) 1996-2023 the Free Software Foundation" +msgid "Copyright (C) 1996-2024 the Free Software Foundation" msgstr "" msgid "About" @@ -3905,65 +3906,23 @@ msgid "" "%s" msgstr "" -#, c-format -msgid "Warning: cannot open %s directory\n" -msgstr "" - -#, c-format -msgid "fish: Disconnecting from %s" -msgstr "" - -msgid "fish: Waiting for initial line..." -msgstr "" - -msgid "Sorry, we cannot do password authenticated connections for now." -msgstr "" - -#, c-format -msgid "fish: Password is required for %s" -msgstr "" - -msgid "fish: Sending password..." -msgstr "" - -msgid "fish: Sending initial line..." -msgstr "" - -msgid "fish: Handshaking version..." -msgstr "" - -msgid "fish: Getting host info..." -msgstr "" - -#, c-format -msgid "fish: Reading directory %s..." +msgid "" +"EXTFS virtual file system:\n" +"wrong file name" msgstr "" -#, c-format -msgid "%s: done." +msgid "" +"EXTFS virtual file system:\n" +"wrong archive name" msgstr "" -#, c-format -msgid "%s: failure" +msgid "" +"EXTFS virtual file system:\n" +"cannot build command" msgstr "" #, c-format -msgid "fish: store %s: sending command..." -msgstr "" - -msgid "fish: Local read failed, sending zeros" -msgstr "" - -msgid "fish: storing file" -msgstr "" - -msgid "Aborting transfer..." -msgstr "" - -msgid "Error reported after abort." -msgstr "" - -msgid "Aborted transfer would be successful." +msgid "Warning: cannot open %s directory\n" msgstr "" #, c-format @@ -4076,6 +4035,14 @@ msgstr "" msgid "ftpfs: failed; nowhere to fallback to" msgstr "" +#, c-format +msgid "%s: failure" +msgstr "" + +#, c-format +msgid "%s: done." +msgstr "" + msgid "ftpfs: storing file" msgstr "" @@ -4209,6 +4176,52 @@ msgstr "" msgid "sftp: Listing done." msgstr "" +#, c-format +msgid "shell: Disconnecting from %s" +msgstr "" + +msgid "shell: Waiting for initial line..." +msgstr "" + +msgid "Sorry, we cannot do password authenticated connections for now." +msgstr "" + +#, c-format +msgid "shell: Password is required for %s" +msgstr "" + +msgid "shell: Sending password..." +msgstr "" + +msgid "shell: Sending initial line..." +msgstr "" + +msgid "shell: Getting host info..." +msgstr "" + +#, c-format +msgid "shell: Reading directory %s..." +msgstr "" + +#, c-format +msgid "shell: store %s: sending command..." +msgstr "" + +msgid "shell: Local read failed, sending zeros" +msgstr "" + +msgid "shell: storing file" +msgstr "" + +msgid "Aborting transfer..." +msgstr "" + +msgid "Error reported after abort." +msgstr "" + +msgid "Aborted transfer would be successful." +msgstr "" + msgid "Inconsistent tar archive" msgstr "" diff --git a/mcsrc/po/ta.po b/mcsrc/po/ta.po index d59c0121..38e9a683 100644 --- a/mcsrc/po/ta.po +++ b/mcsrc/po/ta.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Midnight Commander\n" "Report-Msgid-Bugs-To: https://www.midnight-commander.org/\n" -"POT-Creation-Date: 2023-08-06 15:50+0200\n" +"POT-Creation-Date: 2024-01-20 20:51+0100\n" "PO-Revision-Date: 2010-12-29 10:19+0000\n" "Last-Translator: Slava Zanko , 2011\n" "Language-Team: Tamil (http://app.transifex.com/mc/mc/language/ta/)\n" @@ -704,7 +704,8 @@ msgid "" " errdhotfocus\n" " Menus: menunormal, menuhot, menusel, menuhotsel, menuinactive\n" " Popup menus: pmenunormal, pmenusel, pmenutitle\n" -" Editor: editnormal, editbold, editmarked, editwhitespace,\n" +" Editor: editnormal, editbold, editmarked, editwhitespace, " +"editnonprintable,\n" " editlinestate, editbg, editframe, editframeactive\n" " editframedrag\n" " Viewer: viewnormal,viewbold, viewunderline, viewselected\n" @@ -1540,7 +1541,7 @@ msgid "" "written for the Midnight Commander." msgstr "" -msgid "Copyright (C) 1996-2023 the Free Software Foundation" +msgid "Copyright (C) 1996-2024 the Free Software Foundation" msgstr "" msgid "About" @@ -3901,65 +3902,23 @@ msgid "" "%s" msgstr "" -#, c-format -msgid "Warning: cannot open %s directory\n" -msgstr "" - -#, c-format -msgid "fish: Disconnecting from %s" -msgstr "" - -msgid "fish: Waiting for initial line..." -msgstr "" - -msgid "Sorry, we cannot do password authenticated connections for now." -msgstr "" - -#, c-format -msgid "fish: Password is required for %s" -msgstr "" - -msgid "fish: Sending password..." -msgstr "" - -msgid "fish: Sending initial line..." -msgstr "" - -msgid "fish: Handshaking version..." -msgstr "" - -msgid "fish: Getting host info..." -msgstr "" - -#, c-format -msgid "fish: Reading directory %s..." +msgid "" +"EXTFS virtual file system:\n" +"wrong file name" msgstr "" -#, c-format -msgid "%s: done." +msgid "" +"EXTFS virtual file system:\n" +"wrong archive name" msgstr "" -#, c-format -msgid "%s: failure" +msgid "" +"EXTFS virtual file system:\n" +"cannot build command" msgstr "" #, c-format -msgid "fish: store %s: sending command..." -msgstr "" - -msgid "fish: Local read failed, sending zeros" -msgstr "" - -msgid "fish: storing file" -msgstr "" - -msgid "Aborting transfer..." -msgstr "" - -msgid "Error reported after abort." -msgstr "" - -msgid "Aborted transfer would be successful." +msgid "Warning: cannot open %s directory\n" msgstr "" #, c-format @@ -4072,6 +4031,14 @@ msgstr "" msgid "ftpfs: failed; nowhere to fallback to" msgstr "" +#, c-format +msgid "%s: failure" +msgstr "" + +#, c-format +msgid "%s: done." +msgstr "" + msgid "ftpfs: storing file" msgstr "" @@ -4205,6 +4172,52 @@ msgstr "" msgid "sftp: Listing done." msgstr "" +#, c-format +msgid "shell: Disconnecting from %s" +msgstr "" + +msgid "shell: Waiting for initial line..." +msgstr "" + +msgid "Sorry, we cannot do password authenticated connections for now." +msgstr "" + +#, c-format +msgid "shell: Password is required for %s" +msgstr "" + +msgid "shell: Sending password..." +msgstr "" + +msgid "shell: Sending initial line..." +msgstr "" + +msgid "shell: Getting host info..." +msgstr "" + +#, c-format +msgid "shell: Reading directory %s..." +msgstr "" + +#, c-format +msgid "shell: store %s: sending command..." +msgstr "" + +msgid "shell: Local read failed, sending zeros" +msgstr "" + +msgid "shell: storing file" +msgstr "" + +msgid "Aborting transfer..." +msgstr "" + +msgid "Error reported after abort." +msgstr "" + +msgid "Aborted transfer would be successful." +msgstr "" + msgid "Inconsistent tar archive" msgstr "" diff --git a/mcsrc/po/te.po b/mcsrc/po/te.po index dfc7be46..3c3341d9 100644 --- a/mcsrc/po/te.po +++ b/mcsrc/po/te.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Midnight Commander\n" "Report-Msgid-Bugs-To: https://www.midnight-commander.org/\n" -"POT-Creation-Date: 2023-08-06 15:50+0200\n" +"POT-Creation-Date: 2024-01-20 20:51+0100\n" "PO-Revision-Date: 2010-12-29 10:19+0000\n" "Last-Translator: FULL NAME \n" "Language-Team: Telugu (http://app.transifex.com/mc/mc/language/te/)\n" @@ -703,7 +703,8 @@ msgid "" " errdhotfocus\n" " Menus: menunormal, menuhot, menusel, menuhotsel, menuinactive\n" " Popup menus: pmenunormal, pmenusel, pmenutitle\n" -" Editor: editnormal, editbold, editmarked, editwhitespace,\n" +" Editor: editnormal, editbold, editmarked, editwhitespace, " +"editnonprintable,\n" " editlinestate, editbg, editframe, editframeactive\n" " editframedrag\n" " Viewer: viewnormal,viewbold, viewunderline, viewselected\n" @@ -1539,7 +1540,7 @@ msgid "" "written for the Midnight Commander." msgstr "" -msgid "Copyright (C) 1996-2023 the Free Software Foundation" +msgid "Copyright (C) 1996-2024 the Free Software Foundation" msgstr "" msgid "About" @@ -3900,65 +3901,23 @@ msgid "" "%s" msgstr "" -#, c-format -msgid "Warning: cannot open %s directory\n" -msgstr "" - -#, c-format -msgid "fish: Disconnecting from %s" -msgstr "" - -msgid "fish: Waiting for initial line..." -msgstr "" - -msgid "Sorry, we cannot do password authenticated connections for now." -msgstr "" - -#, c-format -msgid "fish: Password is required for %s" -msgstr "" - -msgid "fish: Sending password..." -msgstr "" - -msgid "fish: Sending initial line..." -msgstr "" - -msgid "fish: Handshaking version..." -msgstr "" - -msgid "fish: Getting host info..." -msgstr "" - -#, c-format -msgid "fish: Reading directory %s..." +msgid "" +"EXTFS virtual file system:\n" +"wrong file name" msgstr "" -#, c-format -msgid "%s: done." +msgid "" +"EXTFS virtual file system:\n" +"wrong archive name" msgstr "" -#, c-format -msgid "%s: failure" +msgid "" +"EXTFS virtual file system:\n" +"cannot build command" msgstr "" #, c-format -msgid "fish: store %s: sending command..." -msgstr "" - -msgid "fish: Local read failed, sending zeros" -msgstr "" - -msgid "fish: storing file" -msgstr "" - -msgid "Aborting transfer..." -msgstr "" - -msgid "Error reported after abort." -msgstr "" - -msgid "Aborted transfer would be successful." +msgid "Warning: cannot open %s directory\n" msgstr "" #, c-format @@ -4071,6 +4030,14 @@ msgstr "" msgid "ftpfs: failed; nowhere to fallback to" msgstr "" +#, c-format +msgid "%s: failure" +msgstr "" + +#, c-format +msgid "%s: done." +msgstr "" + msgid "ftpfs: storing file" msgstr "" @@ -4204,6 +4171,52 @@ msgstr "" msgid "sftp: Listing done." msgstr "" +#, c-format +msgid "shell: Disconnecting from %s" +msgstr "" + +msgid "shell: Waiting for initial line..." +msgstr "" + +msgid "Sorry, we cannot do password authenticated connections for now." +msgstr "" + +#, c-format +msgid "shell: Password is required for %s" +msgstr "" + +msgid "shell: Sending password..." +msgstr "" + +msgid "shell: Sending initial line..." +msgstr "" + +msgid "shell: Getting host info..." +msgstr "" + +#, c-format +msgid "shell: Reading directory %s..." +msgstr "" + +#, c-format +msgid "shell: store %s: sending command..." +msgstr "" + +msgid "shell: Local read failed, sending zeros" +msgstr "" + +msgid "shell: storing file" +msgstr "" + +msgid "Aborting transfer..." +msgstr "" + +msgid "Error reported after abort." +msgstr "" + +msgid "Aborted transfer would be successful." +msgstr "" + msgid "Inconsistent tar archive" msgstr "" diff --git a/mcsrc/po/tr.po b/mcsrc/po/tr.po index eaa2fe7c..89a0ae49 100644 --- a/mcsrc/po/tr.po +++ b/mcsrc/po/tr.po @@ -15,7 +15,7 @@ msgid "" msgstr "" "Project-Id-Version: Midnight Commander\n" "Report-Msgid-Bugs-To: https://www.midnight-commander.org/\n" -"POT-Creation-Date: 2023-08-06 15:50+0200\n" +"POT-Creation-Date: 2024-01-20 20:51+0100\n" "PO-Revision-Date: 2010-12-29 10:19+0000\n" "Last-Translator: Mehmet Akif 9oglu, 2023\n" "Language-Team: Turkish (http://app.transifex.com/mc/mc/language/tr/)\n" @@ -741,31 +741,13 @@ msgid "" " errdhotfocus\n" " Menus: menunormal, menuhot, menusel, menuhotsel, menuinactive\n" " Popup menus: pmenunormal, pmenusel, pmenutitle\n" -" Editor: editnormal, editbold, editmarked, editwhitespace,\n" +" Editor: editnormal, editbold, editmarked, editwhitespace, " +"editnonprintable,\n" " editlinestate, editbg, editframe, editframeactive\n" " editframedrag\n" " Viewer: viewnormal,viewbold, viewunderline, viewselected\n" " Help: helpnormal, helpitalic, helpbold, helplink, helpslink\n" msgstr "" -"--colors KEYWORD={FORE},{BACK},{ATTR}:KEYWORD2=...\n" -"\n" -"{FORE}, {BACK} ve {ATTR} kaldırılabilir, ve varsayılan kullanılacaktır\n" -"\n" -" Keywords:\n" -" Genel: errors, disabled, reverse, gauge, header\n" -" input, inputmark, inputunchanged, commandlinemark\n" -" bbarhotkey, bbarbutton, statusbar\n" -" Dosya görüntüsü: normal, selected, marked, markselect\n" -" İletişim kutucukları: dnormal, dfocus, dhotnormal, dhotfocus, " -"errdhotnormal,\n" -" errdhotfocus\n" -" Menüler: menunormal, menuhot, menusel, menuhotsel, menuinactive\n" -" Açılır pencere menüleri: pmenunormal, pmenusel, pmenutitle\n" -" Düzenleyici: editnormal, editbold, editmarked, editwhitespace,\n" -" editlinestate, editbg, editframe, editframeactive\n" -" editframedrag\n" -" Görüntüleyici: viewnormal,viewbold, viewunderline, viewselected\n" -" Yardım: helpnormal, helpitalic, helpbold, helplink, helpslink\n" #. TRANSLATORS: don't translate color names and attributes msgid "" @@ -1636,8 +1618,8 @@ msgstr "" "Kullanıcı dostu bir metin düzenleyici\n" "Midnight Commander için yazıldı" -msgid "Copyright (C) 1996-2023 the Free Software Foundation" -msgstr "Telif Hakkı (C) 1996-2023 Özgür Yazılım Vakfı" +msgid "Copyright (C) 1996-2024 the Free Software Foundation" +msgstr "" msgid "About" msgstr "Hakkında" @@ -4141,67 +4123,24 @@ msgid "" "%s" msgstr "" -#, c-format -msgid "Warning: cannot open %s directory\n" -msgstr "Uyarı: %s dizini açılamadı\n" - -#, c-format -msgid "fish: Disconnecting from %s" -msgstr "fish: %s bağlantısı kapanıyor" - -msgid "fish: Waiting for initial line..." -msgstr "fish: Kendi satırı için bekliyor..." - -msgid "Sorry, we cannot do password authenticated connections for now." +msgid "" +"EXTFS virtual file system:\n" +"wrong file name" msgstr "" -"Üzgünüm, şimdilik parola ile kimlik bildirimi yapılan bağlantılar yapılamıyor" - -#, c-format -msgid "fish: Password is required for %s" -msgstr "fish: %s için parola gerekli" - -msgid "fish: Sending password..." -msgstr "fish: Parola gönderimi..." - -msgid "fish: Sending initial line..." -msgstr "fish: Satır gönderimi..." -msgid "fish: Handshaking version..." -msgstr "fish: Sürüm anlaşması..." - -msgid "fish: Getting host info..." -msgstr "fish: İstemci bilgisi alınıyor" - -#, c-format -msgid "fish: Reading directory %s..." -msgstr "fish: %s dizini okunuyor..." - -#, c-format -msgid "%s: done." -msgstr "%s: bitti." +msgid "" +"EXTFS virtual file system:\n" +"wrong archive name" +msgstr "" -#, c-format -msgid "%s: failure" -msgstr "%s: başarısız" +msgid "" +"EXTFS virtual file system:\n" +"cannot build command" +msgstr "" #, c-format -msgid "fish: store %s: sending command..." -msgstr "fish: %s kaydet: komut gönderiliyor..." - -msgid "fish: Local read failed, sending zeros" -msgstr "fish: Yerel okuma başarısız, sıfırlar gönderiliyor" - -msgid "fish: storing file" -msgstr "fish: dosya saklama" - -msgid "Aborting transfer..." -msgstr "Aktarım durduruluyor..." - -msgid "Error reported after abort." -msgstr "Durdurma sonra hata raporlandı." - -msgid "Aborted transfer would be successful." -msgstr "Aktarımın durdurulması başarıldı." +msgid "Warning: cannot open %s directory\n" +msgstr "Uyarı: %s dizini açılamadı\n" #, c-format msgid "ftpfs: Disconnecting from %s" @@ -4313,6 +4252,14 @@ msgstr "(önce chdir)" msgid "ftpfs: failed; nowhere to fallback to" msgstr "ftpfs: başarısız; son çare yok" +#, c-format +msgid "%s: failure" +msgstr "%s: başarısız" + +#, c-format +msgid "%s: done." +msgstr "%s: bitti." + msgid "ftpfs: storing file" msgstr "ftpfs: dosya saklama" @@ -4452,6 +4399,53 @@ msgstr "sftp: (kesmek için Ctrl-G) Listeleniyor... %s" msgid "sftp: Listing done." msgstr "sftp: Listeleme yapıldı." +#, c-format +msgid "shell: Disconnecting from %s" +msgstr "" + +msgid "shell: Waiting for initial line..." +msgstr "" + +msgid "Sorry, we cannot do password authenticated connections for now." +msgstr "" +"Üzgünüm, şimdilik parola ile kimlik bildirimi yapılan bağlantılar yapılamıyor" + +#, c-format +msgid "shell: Password is required for %s" +msgstr "" + +msgid "shell: Sending password..." +msgstr "" + +msgid "shell: Sending initial line..." +msgstr "" + +msgid "shell: Getting host info..." +msgstr "" + +#, c-format +msgid "shell: Reading directory %s..." +msgstr "" + +#, c-format +msgid "shell: store %s: sending command..." +msgstr "" + +msgid "shell: Local read failed, sending zeros" +msgstr "" + +msgid "shell: storing file" +msgstr "" + +msgid "Aborting transfer..." +msgstr "Aktarım durduruluyor..." + +msgid "Error reported after abort." +msgstr "Durdurma sonra hata raporlandı." + +msgid "Aborted transfer would be successful." +msgstr "Aktarımın durdurulması başarıldı." + msgid "Inconsistent tar archive" msgstr "Tar arşivi düzgün değil" diff --git a/mcsrc/po/uk.po b/mcsrc/po/uk.po index 62325860..ac8d6dc5 100644 --- a/mcsrc/po/uk.po +++ b/mcsrc/po/uk.po @@ -19,7 +19,7 @@ msgid "" msgstr "" "Project-Id-Version: Midnight Commander\n" "Report-Msgid-Bugs-To: https://www.midnight-commander.org/\n" -"POT-Creation-Date: 2023-08-06 15:50+0200\n" +"POT-Creation-Date: 2024-01-20 20:51+0100\n" "PO-Revision-Date: 2010-12-29 10:19+0000\n" "Last-Translator: Rostyslav Haitkulov , 2023\n" "Language-Team: Ukrainian (http://app.transifex.com/mc/mc/language/uk/)\n" @@ -750,31 +750,13 @@ msgid "" " errdhotfocus\n" " Menus: menunormal, menuhot, menusel, menuhotsel, menuinactive\n" " Popup menus: pmenunormal, pmenusel, pmenutitle\n" -" Editor: editnormal, editbold, editmarked, editwhitespace,\n" +" Editor: editnormal, editbold, editmarked, editwhitespace, " +"editnonprintable,\n" " editlinestate, editbg, editframe, editframeactive\n" " editframedrag\n" " Viewer: viewnormal,viewbold, viewunderline, viewselected\n" " Help: helpnormal, helpitalic, helpbold, helplink, helpslink\n" msgstr "" -"--colors КЛЮЧ={ТЕКСТ},{ФОН},{АТРИБУТ}:KEYWORD2=...\n" -"\n" -"{ТЕКСТ}, {ФОН} та {АТРИБУТ} можна не вказувати, в такому випадку будуть " -"використовуватись стандартні значення\n" -"\n" -"Ключі :\n" -" Глобальні: errors, disabled, reverse, gauge, header\n" -" input, inputmark, inputunchanged, commandlinemark\n" -" bbarhotkey, bbarbutton, statusbar\n" -" Відображення файлів: normal, selected, marked, markselect\n" -" Діалогові вікна: dnormal, dfocus, dhotnormal, dhotfocus, errdhotnormal,\n" -" errdhotfocus\n" -" Меню: menunormal, menuhot, menusel, menuhotsel, menuinactive\n" -" Контекстні меню: pmenunormal, pmenusel, pmenutitle\n" -" Редактор: editnormal, editbold, editmarked, editwhitespace,\n" -" editlinestate, editbg, editframe, editframeactive\n" -" editframedrag\n" -" Переглядач: viewnormal,viewbold, viewunderline, viewselected\n" -" Довідка: helpnormal, helpitalic, helpbold, helplink, helpslink\n" #. TRANSLATORS: don't translate color names and attributes msgid "" @@ -1641,7 +1623,7 @@ msgstr "" "Дружній до користувача редактор тексту\n" "написаний для Midnight Commander." -msgid "Copyright (C) 1996-2023 the Free Software Foundation" +msgid "Copyright (C) 1996-2024 the Free Software Foundation" msgstr "" msgid "About" @@ -4172,66 +4154,24 @@ msgstr "" "Віртуальна файлова система EXTFS:\n" "%s" -#, c-format -msgid "Warning: cannot open %s directory\n" -msgstr "Попередження: не вдалося відкрити каталог %s\n" - -#, c-format -msgid "fish: Disconnecting from %s" -msgstr "fish: триває від’єднання від %s" - -msgid "fish: Waiting for initial line..." -msgstr "fish: очікується початковий рядок…" - -msgid "Sorry, we cannot do password authenticated connections for now." -msgstr "Зараз немає змоги створювати з’єднання, авторизовані паролем." - -#, c-format -msgid "fish: Password is required for %s" -msgstr "fish: вимагається пароль для %s" - -msgid "fish: Sending password..." -msgstr "fish: триває надсилання пароля…" - -msgid "fish: Sending initial line..." -msgstr "fish: триває надсилання початкового рядка…" - -msgid "fish: Handshaking version..." -msgstr "fish: тривають переговори про версію…" - -msgid "fish: Getting host info..." -msgstr "fish: триває отримання відомостей про вузол…" - -#, c-format -msgid "fish: Reading directory %s..." -msgstr "fish: триває читання каталога %s…" +msgid "" +"EXTFS virtual file system:\n" +"wrong file name" +msgstr "" -#, c-format -msgid "%s: done." -msgstr "%s: завершено." +msgid "" +"EXTFS virtual file system:\n" +"wrong archive name" +msgstr "" -#, c-format -msgid "%s: failure" -msgstr "%s: сталася помилка" +msgid "" +"EXTFS virtual file system:\n" +"cannot build command" +msgstr "" #, c-format -msgid "fish: store %s: sending command..." -msgstr "fish: запис %s: триває надсилання команди…" - -msgid "fish: Local read failed, sending zeros" -msgstr "fish: сталася помилка локального читання, надсилаються нулі" - -msgid "fish: storing file" -msgstr "fish: триває зберігання файлу" - -msgid "Aborting transfer..." -msgstr "Триває переривання перенесення…" - -msgid "Error reported after abort." -msgstr "Сталася помилка після переривання." - -msgid "Aborted transfer would be successful." -msgstr "Перерване перенесення могло завершитися успішно." +msgid "Warning: cannot open %s directory\n" +msgstr "Попередження: не вдалося відкрити каталог %s\n" #, c-format msgid "ftpfs: Disconnecting from %s" @@ -4343,6 +4283,14 @@ msgstr "(спочатку chdir)" msgid "ftpfs: failed; nowhere to fallback to" msgstr "ftpfs: сталася помилка; нікуди перейти на аварійний режим" +#, c-format +msgid "%s: failure" +msgstr "%s: сталася помилка" + +#, c-format +msgid "%s: done." +msgstr "%s: завершено." + msgid "ftpfs: storing file" msgstr "ftpfs: триває зберігання файлу" @@ -4502,6 +4450,52 @@ msgstr "sftp: (Ctrl-G перервати) Створення списку... %s" msgid "sftp: Listing done." msgstr "sftp: Створення списку завершено." +#, c-format +msgid "shell: Disconnecting from %s" +msgstr "" + +msgid "shell: Waiting for initial line..." +msgstr "" + +msgid "Sorry, we cannot do password authenticated connections for now." +msgstr "Зараз немає змоги створювати з’єднання, авторизовані паролем." + +#, c-format +msgid "shell: Password is required for %s" +msgstr "" + +msgid "shell: Sending password..." +msgstr "" + +msgid "shell: Sending initial line..." +msgstr "" + +msgid "shell: Getting host info..." +msgstr "" + +#, c-format +msgid "shell: Reading directory %s..." +msgstr "" + +#, c-format +msgid "shell: store %s: sending command..." +msgstr "" + +msgid "shell: Local read failed, sending zeros" +msgstr "" + +msgid "shell: storing file" +msgstr "" + +msgid "Aborting transfer..." +msgstr "Триває переривання перенесення…" + +msgid "Error reported after abort." +msgstr "Сталася помилка після переривання." + +msgid "Aborted transfer would be successful." +msgstr "Перерване перенесення могло завершитися успішно." + msgid "Inconsistent tar archive" msgstr "Виявлено неузгоджений архів tar" diff --git a/mcsrc/po/uz.po b/mcsrc/po/uz.po index 9256683d..98890209 100644 --- a/mcsrc/po/uz.po +++ b/mcsrc/po/uz.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Midnight Commander\n" "Report-Msgid-Bugs-To: https://www.midnight-commander.org/\n" -"POT-Creation-Date: 2023-08-06 15:50+0200\n" +"POT-Creation-Date: 2024-01-20 20:51+0100\n" "PO-Revision-Date: 2010-12-29 10:19+0000\n" "Last-Translator: FULL NAME \n" "Language-Team: Uzbek (http://app.transifex.com/mc/mc/language/uz/)\n" @@ -703,7 +703,8 @@ msgid "" " errdhotfocus\n" " Menus: menunormal, menuhot, menusel, menuhotsel, menuinactive\n" " Popup menus: pmenunormal, pmenusel, pmenutitle\n" -" Editor: editnormal, editbold, editmarked, editwhitespace,\n" +" Editor: editnormal, editbold, editmarked, editwhitespace, " +"editnonprintable,\n" " editlinestate, editbg, editframe, editframeactive\n" " editframedrag\n" " Viewer: viewnormal,viewbold, viewunderline, viewselected\n" @@ -1539,7 +1540,7 @@ msgid "" "written for the Midnight Commander." msgstr "" -msgid "Copyright (C) 1996-2023 the Free Software Foundation" +msgid "Copyright (C) 1996-2024 the Free Software Foundation" msgstr "" msgid "About" @@ -3896,65 +3897,23 @@ msgid "" "%s" msgstr "" -#, c-format -msgid "Warning: cannot open %s directory\n" -msgstr "" - -#, c-format -msgid "fish: Disconnecting from %s" -msgstr "" - -msgid "fish: Waiting for initial line..." -msgstr "" - -msgid "Sorry, we cannot do password authenticated connections for now." -msgstr "" - -#, c-format -msgid "fish: Password is required for %s" -msgstr "" - -msgid "fish: Sending password..." -msgstr "" - -msgid "fish: Sending initial line..." -msgstr "" - -msgid "fish: Handshaking version..." -msgstr "" - -msgid "fish: Getting host info..." -msgstr "" - -#, c-format -msgid "fish: Reading directory %s..." +msgid "" +"EXTFS virtual file system:\n" +"wrong file name" msgstr "" -#, c-format -msgid "%s: done." +msgid "" +"EXTFS virtual file system:\n" +"wrong archive name" msgstr "" -#, c-format -msgid "%s: failure" +msgid "" +"EXTFS virtual file system:\n" +"cannot build command" msgstr "" #, c-format -msgid "fish: store %s: sending command..." -msgstr "" - -msgid "fish: Local read failed, sending zeros" -msgstr "" - -msgid "fish: storing file" -msgstr "" - -msgid "Aborting transfer..." -msgstr "" - -msgid "Error reported after abort." -msgstr "" - -msgid "Aborted transfer would be successful." +msgid "Warning: cannot open %s directory\n" msgstr "" #, c-format @@ -4067,6 +4026,14 @@ msgstr "" msgid "ftpfs: failed; nowhere to fallback to" msgstr "" +#, c-format +msgid "%s: failure" +msgstr "" + +#, c-format +msgid "%s: done." +msgstr "" + msgid "ftpfs: storing file" msgstr "" @@ -4200,6 +4167,52 @@ msgstr "" msgid "sftp: Listing done." msgstr "" +#, c-format +msgid "shell: Disconnecting from %s" +msgstr "" + +msgid "shell: Waiting for initial line..." +msgstr "" + +msgid "Sorry, we cannot do password authenticated connections for now." +msgstr "" + +#, c-format +msgid "shell: Password is required for %s" +msgstr "" + +msgid "shell: Sending password..." +msgstr "" + +msgid "shell: Sending initial line..." +msgstr "" + +msgid "shell: Getting host info..." +msgstr "" + +#, c-format +msgid "shell: Reading directory %s..." +msgstr "" + +#, c-format +msgid "shell: store %s: sending command..." +msgstr "" + +msgid "shell: Local read failed, sending zeros" +msgstr "" + +msgid "shell: storing file" +msgstr "" + +msgid "Aborting transfer..." +msgstr "" + +msgid "Error reported after abort." +msgstr "" + +msgid "Aborted transfer would be successful." +msgstr "" + msgid "Inconsistent tar archive" msgstr "" diff --git a/mcsrc/po/vi.po b/mcsrc/po/vi.po index 71e2cad5..23af2642 100644 --- a/mcsrc/po/vi.po +++ b/mcsrc/po/vi.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Midnight Commander\n" "Report-Msgid-Bugs-To: https://www.midnight-commander.org/\n" -"POT-Creation-Date: 2023-08-06 15:50+0200\n" +"POT-Creation-Date: 2024-01-20 20:51+0100\n" "PO-Revision-Date: 2010-12-29 10:19+0000\n" "Last-Translator: Slava Zanko , 2011\n" "Language-Team: Vietnamese (http://app.transifex.com/mc/mc/language/vi/)\n" @@ -706,7 +706,8 @@ msgid "" " errdhotfocus\n" " Menus: menunormal, menuhot, menusel, menuhotsel, menuinactive\n" " Popup menus: pmenunormal, pmenusel, pmenutitle\n" -" Editor: editnormal, editbold, editmarked, editwhitespace,\n" +" Editor: editnormal, editbold, editmarked, editwhitespace, " +"editnonprintable,\n" " editlinestate, editbg, editframe, editframeactive\n" " editframedrag\n" " Viewer: viewnormal,viewbold, viewunderline, viewselected\n" @@ -1542,7 +1543,7 @@ msgid "" "written for the Midnight Commander." msgstr "" -msgid "Copyright (C) 1996-2023 the Free Software Foundation" +msgid "Copyright (C) 1996-2024 the Free Software Foundation" msgstr "" msgid "About" @@ -3930,67 +3931,25 @@ msgid "" "%s" msgstr "" -#, c-format -msgid "Warning: cannot open %s directory\n" +msgid "" +"EXTFS virtual file system:\n" +"wrong file name" msgstr "" -#, c-format -msgid "fish: Disconnecting from %s" -msgstr "fish: Ngừng kết nối từ %s" - -msgid "fish: Waiting for initial line..." -msgstr "fish: Đang chời dòng đầu tiên..." - -msgid "Sorry, we cannot do password authenticated connections for now." -msgstr "Xin lỗi, bây giờ không thể tạo kết nối xác thực theo mật khẩu." - -#, c-format -msgid "fish: Password is required for %s" +msgid "" +"EXTFS virtual file system:\n" +"wrong archive name" msgstr "" -msgid "fish: Sending password..." -msgstr "fish: Đang gửi mật khẩu..." - -msgid "fish: Sending initial line..." -msgstr "fish: Đang gửi dòng đầu tiên..." - -msgid "fish: Handshaking version..." -msgstr "fish: Đang xác nhận phiên bản..." - -msgid "fish: Getting host info..." +msgid "" +"EXTFS virtual file system:\n" +"cannot build command" msgstr "" #, c-format -msgid "fish: Reading directory %s..." -msgstr "fish: Đọc thư mục %s..." - -#, c-format -msgid "%s: done." -msgstr "%s: xong." - -#, c-format -msgid "%s: failure" -msgstr "%s: lỗi" - -#, c-format -msgid "fish: store %s: sending command..." -msgstr "fish: bản ghi %s: đang gửi câu lệnh..." - -msgid "fish: Local read failed, sending zeros" -msgstr "fish: Lỗi đọc nội bộ, đang gửi các số không" - -msgid "fish: storing file" +msgid "Warning: cannot open %s directory\n" msgstr "" -msgid "Aborting transfer..." -msgstr "Dừng truyền tải..." - -msgid "Error reported after abort." -msgstr "Có lỗi báo cáo sau khi dừng." - -msgid "Aborted transfer would be successful." -msgstr "Dừng truyền tải thành công." - #, c-format msgid "ftpfs: Disconnecting from %s" msgstr "ftpfs: Ngắt kết nối từ %s" @@ -4101,6 +4060,14 @@ msgstr "(đầu tiên chdir)" msgid "ftpfs: failed; nowhere to fallback to" msgstr "ftpfs: lỗi; không có nơi nào để quay lại về" +#, c-format +msgid "%s: failure" +msgstr "%s: lỗi" + +#, c-format +msgid "%s: done." +msgstr "%s: xong." + msgid "ftpfs: storing file" msgstr "" @@ -4238,6 +4205,52 @@ msgstr "" msgid "sftp: Listing done." msgstr "" +#, c-format +msgid "shell: Disconnecting from %s" +msgstr "" + +msgid "shell: Waiting for initial line..." +msgstr "" + +msgid "Sorry, we cannot do password authenticated connections for now." +msgstr "Xin lỗi, bây giờ không thể tạo kết nối xác thực theo mật khẩu." + +#, c-format +msgid "shell: Password is required for %s" +msgstr "" + +msgid "shell: Sending password..." +msgstr "" + +msgid "shell: Sending initial line..." +msgstr "" + +msgid "shell: Getting host info..." +msgstr "" + +#, c-format +msgid "shell: Reading directory %s..." +msgstr "" + +#, c-format +msgid "shell: store %s: sending command..." +msgstr "" + +msgid "shell: Local read failed, sending zeros" +msgstr "" + +msgid "shell: storing file" +msgstr "" + +msgid "Aborting transfer..." +msgstr "Dừng truyền tải..." + +msgid "Error reported after abort." +msgstr "Có lỗi báo cáo sau khi dừng." + +msgid "Aborted transfer would be successful." +msgstr "Dừng truyền tải thành công." + msgid "Inconsistent tar archive" msgstr "Tập tin tar không thích hợp" diff --git a/mcsrc/po/wa.po b/mcsrc/po/wa.po index dfd08ae3..00e0116b 100644 --- a/mcsrc/po/wa.po +++ b/mcsrc/po/wa.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Midnight Commander\n" "Report-Msgid-Bugs-To: https://www.midnight-commander.org/\n" -"POT-Creation-Date: 2023-08-06 15:50+0200\n" +"POT-Creation-Date: 2024-01-20 20:51+0100\n" "PO-Revision-Date: 2010-12-29 10:19+0000\n" "Last-Translator: Slava Zanko , 2011\n" "Language-Team: Walloon (http://app.transifex.com/mc/mc/language/wa/)\n" @@ -704,7 +704,8 @@ msgid "" " errdhotfocus\n" " Menus: menunormal, menuhot, menusel, menuhotsel, menuinactive\n" " Popup menus: pmenunormal, pmenusel, pmenutitle\n" -" Editor: editnormal, editbold, editmarked, editwhitespace,\n" +" Editor: editnormal, editbold, editmarked, editwhitespace, " +"editnonprintable,\n" " editlinestate, editbg, editframe, editframeactive\n" " editframedrag\n" " Viewer: viewnormal,viewbold, viewunderline, viewselected\n" @@ -1540,7 +1541,7 @@ msgid "" "written for the Midnight Commander." msgstr "" -msgid "Copyright (C) 1996-2023 the Free Software Foundation" +msgid "Copyright (C) 1996-2024 the Free Software Foundation" msgstr "" msgid "About" @@ -3923,65 +3924,23 @@ msgid "" "%s" msgstr "" -#, c-format -msgid "Warning: cannot open %s directory\n" -msgstr "" - -#, c-format -msgid "fish: Disconnecting from %s" -msgstr "fish: Dji m' disraloye di %s" - -msgid "fish: Waiting for initial line..." -msgstr "" - -msgid "Sorry, we cannot do password authenticated connections for now." -msgstr "" - -#, c-format -msgid "fish: Password is required for %s" -msgstr "" - -msgid "fish: Sending password..." -msgstr "fish: dj' evoye li scret di l' ûzeu..." - -msgid "fish: Sending initial line..." -msgstr "" - -msgid "fish: Handshaking version..." +msgid "" +"EXTFS virtual file system:\n" +"wrong file name" msgstr "" -msgid "fish: Getting host info..." +msgid "" +"EXTFS virtual file system:\n" +"wrong archive name" msgstr "" -#, c-format -msgid "fish: Reading directory %s..." -msgstr "fish: Dji lé li ridant FTP %s..." - -#, c-format -msgid "%s: done." +msgid "" +"EXTFS virtual file system:\n" +"cannot build command" msgstr "" #, c-format -msgid "%s: failure" -msgstr "%s: berwete" - -#, c-format -msgid "fish: store %s: sending command..." -msgstr "" - -msgid "fish: Local read failed, sending zeros" -msgstr "" - -msgid "fish: storing file" -msgstr "" - -msgid "Aborting transfer..." -msgstr "" - -msgid "Error reported after abort." -msgstr "" - -msgid "Aborted transfer would be successful." +msgid "Warning: cannot open %s directory\n" msgstr "" #, c-format @@ -4094,6 +4053,14 @@ msgstr "" msgid "ftpfs: failed; nowhere to fallback to" msgstr "" +#, c-format +msgid "%s: failure" +msgstr "%s: berwete" + +#, c-format +msgid "%s: done." +msgstr "" + msgid "ftpfs: storing file" msgstr "" @@ -4227,6 +4194,52 @@ msgstr "" msgid "sftp: Listing done." msgstr "" +#, c-format +msgid "shell: Disconnecting from %s" +msgstr "" + +msgid "shell: Waiting for initial line..." +msgstr "" + +msgid "Sorry, we cannot do password authenticated connections for now." +msgstr "" + +#, c-format +msgid "shell: Password is required for %s" +msgstr "" + +msgid "shell: Sending password..." +msgstr "" + +msgid "shell: Sending initial line..." +msgstr "" + +msgid "shell: Getting host info..." +msgstr "" + +#, c-format +msgid "shell: Reading directory %s..." +msgstr "" + +#, c-format +msgid "shell: store %s: sending command..." +msgstr "" + +msgid "shell: Local read failed, sending zeros" +msgstr "" + +msgid "shell: storing file" +msgstr "" + +msgid "Aborting transfer..." +msgstr "" + +msgid "Error reported after abort." +msgstr "" + +msgid "Aborted transfer would be successful." +msgstr "" + msgid "Inconsistent tar archive" msgstr "" diff --git a/mcsrc/po/zh_CN.po b/mcsrc/po/zh_CN.po index 9052fda0..ae4e1cc5 100644 --- a/mcsrc/po/zh_CN.po +++ b/mcsrc/po/zh_CN.po @@ -18,7 +18,7 @@ msgid "" msgstr "" "Project-Id-Version: Midnight Commander\n" "Report-Msgid-Bugs-To: https://www.midnight-commander.org/\n" -"POT-Creation-Date: 2023-08-06 15:50+0200\n" +"POT-Creation-Date: 2024-01-20 20:51+0100\n" "PO-Revision-Date: 2010-12-29 10:19+0000\n" "Last-Translator: Gurbuzguven <6mehmet6@gmail.com>, 2021\n" "Language-Team: Chinese (China) (http://app.transifex.com/mc/mc/language/" @@ -736,30 +736,13 @@ msgid "" " errdhotfocus\n" " Menus: menunormal, menuhot, menusel, menuhotsel, menuinactive\n" " Popup menus: pmenunormal, pmenusel, pmenutitle\n" -" Editor: editnormal, editbold, editmarked, editwhitespace,\n" +" Editor: editnormal, editbold, editmarked, editwhitespace, " +"editnonprintable,\n" " editlinestate, editbg, editframe, editframeactive\n" " editframedrag\n" " Viewer: viewnormal,viewbold, viewunderline, viewselected\n" " Help: helpnormal, helpitalic, helpbold, helplink, helpslink\n" msgstr "" -"--colors KEYWORD={FORE},{BACK},{ATTR}:KEYWORD2=...\n" -"\n" -"{FORE}, {BACK} 及 {ATTR} 可以省略,省略时使用默认值\n" -"\n" -"关键词: \n" -"全局: errors, disabled, reverse, gauge, header\n" -" input, inputmark, inputunchanged, commandlinemark\n" -" bbarhotkey, bbarbutton, statusbar\n" -"文件显示: normal, selected, marked, markselect\n" -"对话框窗口:dnormal, dfocus, dhotnormal, dhotfocus, errdhotnormal, " -"errdhotfocus\n" -"菜单: menunormal, menuhot, menusel, menuhotsel, menuinactive\n" -"弹出菜单:pmenunormal, pmenusel, pmenutitle\n" -"编辑器:editnormal, editbold, editmarked, editwhitespace,\n" -" editlinestate, editbg, editframe, editframeactive\n" -" editframedrag\n" -"查看器:viewbold, viewunderline, viewselected\n" -"帮助:helpnormal, helpi talic, helpbold, helplink, helpslink\n" #. TRANSLATORS: don't translate color names and attributes msgid "" @@ -1625,7 +1608,7 @@ msgstr "" "为 Midnight Commander 编写的\n" "一个界面友好的文本编辑器。" -msgid "Copyright (C) 1996-2023 the Free Software Foundation" +msgid "Copyright (C) 1996-2024 the Free Software Foundation" msgstr "" msgid "About" @@ -4122,66 +4105,24 @@ msgid "" "%s" msgstr "" -#, c-format -msgid "Warning: cannot open %s directory\n" -msgstr "警告: 无法打开目录 %s\n" - -#, c-format -msgid "fish: Disconnecting from %s" -msgstr "fish: 正在从 %s 断开连接" - -msgid "fish: Waiting for initial line..." -msgstr "fish: 正在等待初始化行..." - -msgid "Sorry, we cannot do password authenticated connections for now." -msgstr "抱歉,目前无法建立密码验证的连接。" - -#, c-format -msgid "fish: Password is required for %s" -msgstr "fish: %s 需要密码" - -msgid "fish: Sending password..." -msgstr "fish: 正在发送密码..." - -msgid "fish: Sending initial line..." -msgstr "fish: 正在发送初始化行..." - -msgid "fish: Handshaking version..." -msgstr "fish: 正在握手,协商版本..." - -msgid "fish: Getting host info..." -msgstr "fish: 正在获取主机信息..." - -#, c-format -msgid "fish: Reading directory %s..." -msgstr "fish: 正在读取目录 %s..." +msgid "" +"EXTFS virtual file system:\n" +"wrong file name" +msgstr "" -#, c-format -msgid "%s: done." -msgstr "%s: 完成。" +msgid "" +"EXTFS virtual file system:\n" +"wrong archive name" +msgstr "" -#, c-format -msgid "%s: failure" -msgstr "%s: 失败" +msgid "" +"EXTFS virtual file system:\n" +"cannot build command" +msgstr "" #, c-format -msgid "fish: store %s: sending command..." -msgstr "fish: 保存 %s: 正在发送命令..." - -msgid "fish: Local read failed, sending zeros" -msgstr "fish: 本地读取失败,正在发送零" - -msgid "fish: storing file" -msgstr "fish: 正在保存文件" - -msgid "Aborting transfer..." -msgstr "正在中止传输..." - -msgid "Error reported after abort." -msgstr "中止后发生错误。" - -msgid "Aborted transfer would be successful." -msgstr "被中止的传输可能成功完成了。" +msgid "Warning: cannot open %s directory\n" +msgstr "警告: 无法打开目录 %s\n" #, c-format msgid "ftpfs: Disconnecting from %s" @@ -4293,6 +4234,14 @@ msgstr "(先改变目录)" msgid "ftpfs: failed; nowhere to fallback to" msgstr "ftpfs: 失败;没有后备" +#, c-format +msgid "%s: failure" +msgstr "%s: 失败" + +#, c-format +msgid "%s: done." +msgstr "%s: 完成。" + msgid "ftpfs: storing file" msgstr "ftpfs: 保存文件中" @@ -4432,6 +4381,52 @@ msgstr "sftp: (Ctrl-G 终止) 正在列出... %s" msgid "sftp: Listing done." msgstr "sftp: 列出完毕。" +#, c-format +msgid "shell: Disconnecting from %s" +msgstr "" + +msgid "shell: Waiting for initial line..." +msgstr "" + +msgid "Sorry, we cannot do password authenticated connections for now." +msgstr "抱歉,目前无法建立密码验证的连接。" + +#, c-format +msgid "shell: Password is required for %s" +msgstr "" + +msgid "shell: Sending password..." +msgstr "" + +msgid "shell: Sending initial line..." +msgstr "" + +msgid "shell: Getting host info..." +msgstr "" + +#, c-format +msgid "shell: Reading directory %s..." +msgstr "" + +#, c-format +msgid "shell: store %s: sending command..." +msgstr "" + +msgid "shell: Local read failed, sending zeros" +msgstr "" + +msgid "shell: storing file" +msgstr "" + +msgid "Aborting transfer..." +msgstr "正在中止传输..." + +msgid "Error reported after abort." +msgstr "中止后发生错误。" + +msgid "Aborted transfer would be successful." +msgstr "被中止的传输可能成功完成了。" + msgid "Inconsistent tar archive" msgstr "不完整的 tar 档案文件" diff --git a/mcsrc/po/zh_TW.po b/mcsrc/po/zh_TW.po index 5c67fb16..798c444a 100644 --- a/mcsrc/po/zh_TW.po +++ b/mcsrc/po/zh_TW.po @@ -10,7 +10,7 @@ msgid "" msgstr "" "Project-Id-Version: Midnight Commander\n" "Report-Msgid-Bugs-To: https://www.midnight-commander.org/\n" -"POT-Creation-Date: 2023-08-06 15:50+0200\n" +"POT-Creation-Date: 2024-01-20 20:51+0100\n" "PO-Revision-Date: 2010-12-29 10:19+0000\n" "Last-Translator: Meng Pang Wang, 2023\n" "Language-Team: Chinese (Taiwan) (http://app.transifex.com/mc/mc/language/" @@ -724,7 +724,8 @@ msgid "" " errdhotfocus\n" " Menus: menunormal, menuhot, menusel, menuhotsel, menuinactive\n" " Popup menus: pmenunormal, pmenusel, pmenutitle\n" -" Editor: editnormal, editbold, editmarked, editwhitespace,\n" +" Editor: editnormal, editbold, editmarked, editwhitespace, " +"editnonprintable,\n" " editlinestate, editbg, editframe, editframeactive\n" " editframedrag\n" " Viewer: viewnormal,viewbold, viewunderline, viewselected\n" @@ -1569,7 +1570,7 @@ msgid "" "written for the Midnight Commander." msgstr "" -msgid "Copyright (C) 1996-2023 the Free Software Foundation" +msgid "Copyright (C) 1996-2024 the Free Software Foundation" msgstr "" msgid "About" @@ -3985,66 +3986,24 @@ msgid "" "%s" msgstr "" -#, c-format -msgid "Warning: cannot open %s directory\n" -msgstr "警告:無法開啟目錄 %s\n" - -#, c-format -msgid "fish: Disconnecting from %s" -msgstr "fish: 結束至 %s 的連線" - -msgid "fish: Waiting for initial line..." -msgstr "fish: 等待起始化訊息" - -msgid "Sorry, we cannot do password authenticated connections for now." -msgstr "不好意思,目前無法進行經過密碼認證的連線。" - -#, c-format -msgid "fish: Password is required for %s" -msgstr "fish: %s 要求輸入密碼" - -msgid "fish: Sending password..." -msgstr "fish: 正在送出登入密碼" - -msgid "fish: Sending initial line..." -msgstr "fish: 送出起始化訊息" - -msgid "fish: Handshaking version..." -msgstr "fish: 交握版本" - -msgid "fish: Getting host info..." -msgstr "fish: 取得主機資訊..." - -#, c-format -msgid "fish: Reading directory %s..." -msgstr "fish:正在讀取目錄 %s..." +msgid "" +"EXTFS virtual file system:\n" +"wrong file name" +msgstr "" -#, c-format -msgid "%s: done." -msgstr "%s: 完成。" +msgid "" +"EXTFS virtual file system:\n" +"wrong archive name" +msgstr "" -#, c-format -msgid "%s: failure" -msgstr "%s: 失敗" +msgid "" +"EXTFS virtual file system:\n" +"cannot build command" +msgstr "" #, c-format -msgid "fish: store %s: sending command..." -msgstr "fish: 儲存%s: 送出命令" - -msgid "fish: Local read failed, sending zeros" -msgstr "fish: 本地端讀取錯誤, 沒有送出" - -msgid "fish: storing file" -msgstr "fish: 儲存檔案" - -msgid "Aborting transfer..." -msgstr "放棄傳輸...." - -msgid "Error reported after abort." -msgstr "放棄後回報錯誤" - -msgid "Aborted transfer would be successful." -msgstr "將成功放棄傳輸" +msgid "Warning: cannot open %s directory\n" +msgstr "警告:無法開啟目錄 %s\n" #, c-format msgid "ftpfs: Disconnecting from %s" @@ -4156,6 +4115,14 @@ msgstr "(先切換路徑)" msgid "ftpfs: failed; nowhere to fallback to" msgstr "ftpfs: 失敗; 無法轉移到其它目錄" +#, c-format +msgid "%s: failure" +msgstr "%s: 失敗" + +#, c-format +msgid "%s: done." +msgstr "%s: 完成。" + msgid "ftpfs: storing file" msgstr "ftpfs: 儲存檔案" @@ -4293,6 +4260,52 @@ msgstr "sftp: (Ctrl-G 跳出) 列表... %s" msgid "sftp: Listing done." msgstr "sftp: 列表完成。" +#, c-format +msgid "shell: Disconnecting from %s" +msgstr "" + +msgid "shell: Waiting for initial line..." +msgstr "" + +msgid "Sorry, we cannot do password authenticated connections for now." +msgstr "不好意思,目前無法進行經過密碼認證的連線。" + +#, c-format +msgid "shell: Password is required for %s" +msgstr "" + +msgid "shell: Sending password..." +msgstr "" + +msgid "shell: Sending initial line..." +msgstr "" + +msgid "shell: Getting host info..." +msgstr "" + +#, c-format +msgid "shell: Reading directory %s..." +msgstr "" + +#, c-format +msgid "shell: store %s: sending command..." +msgstr "" + +msgid "shell: Local read failed, sending zeros" +msgstr "" + +msgid "shell: storing file" +msgstr "" + +msgid "Aborting transfer..." +msgstr "放棄傳輸...." + +msgid "Error reported after abort." +msgstr "放棄後回報錯誤" + +msgid "Aborted transfer would be successful." +msgstr "將成功放棄傳輸" + msgid "Inconsistent tar archive" msgstr "不完整的 tar 檔案集" diff --git a/mcsrc/src/Makefile.am b/mcsrc/src/Makefile.am index cca050cb..a466599c 100644 --- a/mcsrc/src/Makefile.am +++ b/mcsrc/src/Makefile.am @@ -1,128 +1,75 @@ -SUBDIRS = filemanager man2hlp vfs viewer +SUBDIRS = event filehighlight mcconfig search skin tty vfs strutil widget . -if USE_INTERNAL_EDIT -SUBDIRS += editor -endif - -if USE_DIFF -SUBDIRS += diffviewer -endif - -if ENABLE_SUBSHELL -SUBDIRS += subshell -endif - -noinst_LTLIBRARIES = libinternal.la - -AM_CPPFLAGS = \ - -DSYSCONFDIR=\""$(sysconfdir)/@PACKAGE@/"\" \ - -DLIBEXECDIR=\""$(libexecdir)/@PACKAGE@/"\" \ - -DDATADIR=\""$(pkgdatadir)/"\" \ - -DLOCALEDIR=\""$(localedir)"\" \ - -DEXTHELPERSDIR=\""@EXTHELPERSDIR@/"\" - -if CONS_SAVER -SUBDIRS += consaver -AM_CPPFLAGS += -DSAVERDIR=\""$(pkglibexecdir)"\" -endif - -AM_CPPFLAGS += -I$(top_srcdir) $(GLIB_CFLAGS) - -localedir = $(datadir)/locale -pkglibexecdir = $(libexecdir)/@PACKAGE@ - -bin_PROGRAMS = mc - -if USE_INTERNAL_EDIT -EDITLIB = editor/libedit.la -endif - -if USE_DIFF -DIFFLIB = diffviewer/libdiffviewer.la -endif - -if ENABLE_SUBSHELL -SUBSHELLLIB = subshell/libsubshell.la -endif - -libinternal_la_LIBADD = \ - filemanager/libmcfilemanager.la \ - vfs/libmc-vfs.la \ - viewer/libmcviewer.la \ - $(DIFFLIB) $(EDITLIB) $(SUBSHELLLIB) +if ENABLE_MCLIB + LIB_VERSION=`echo $(LIBMC_VERSION) | \ + tr '.' ' '| \ + while read v1 v2 v3; do echo $$v2':'$$v3':'$$v1; done` -mc_LDADD = \ - libinternal.la + AM_LDFLAGS=-no-undefined -version-info $(LIB_VERSION) -release $(LIBMC_RELEASE) -if ENABLE_MCLIB -libinternal_la_LIBADD += \ - $(top_builddir)/lib/libmc.la + lib_LTLIBRARIES = libmc.la else -mc_LDADD += \ - $(top_builddir)/lib/libmc.la + noinst_LTLIBRARIES = libmc.la endif -SRC_mc_conssaver = \ - cons.handler.c consaver/cons.saver.h -mc_SOURCES = \ - main.c +SUBLIB_includes = \ + event.h event-types.h \ + filehighlight.h \ + mcconfig.h \ + search.h \ + skin.h \ + strescape.h \ + strutil.h \ + widget.h -libinternal_la_SOURCES = \ - $(SRC_mc_conssaver) \ - args.c args.h \ - clipboard.c clipboard.h \ - events_init.c events_init.h \ - execute.c execute.h \ - file_history.c file_history.h \ - help.c help.h \ - history.h \ - keymap.c keymap.h \ - learn.c learn.h \ - setup.c setup.h \ - textconf.c textconf.h \ - usermenu.c usermenu.h \ +SRC_mc_utils = \ + utilunix.c utilunix.h \ + unixcompat.h \ util.c util.h -if CHARSET - libinternal_la_SOURCES += selcodepage.c selcodepage.h -endif - -if ENABLE_BACKGROUND - libinternal_la_SOURCES += background.c background.h +libmc_la_SOURCES = \ + $(SUBLIB_includes) \ + $(SRC_mc_utils) \ + file-entry.h \ + fileloc.h \ + fs.h \ + hook.c hook.h \ + glibcompat.c glibcompat.h \ + global.c global.h \ + keybind.c keybind.h \ + lock.c lock.h \ + serialize.c serialize.h \ + shell.c shell.h \ + stat-size.h \ + timefmt.c timefmt.h + +if USE_MAINTAINER_MODE +libmc_la_SOURCES += logging.c logging.h endif -EXTRA_DIST = $(SRC_maintainer) $(SRC_charset) - -# end of automated testing - -install-exec-hook: - $(MAKE) install_mcview -if USE_INTERNAL_EDIT - $(MAKE) install_mcedit -endif -if USE_DIFF - $(MAKE) install_mcdiff +if CHARSET +libmc_la_SOURCES += charsets.c charsets.h endif -# -# Make relative symlinks, but do the right thing if LN_S is `ln' or `cp'. -# -install_mcview: - cd $(DESTDIR)$(bindir)/$(binprefix) && rm -f mcview && $(LN_S) mc mcview +AM_CPPFLAGS = $(GLIB_CFLAGS) -I$(top_srcdir) -install_mcedit: - cd $(DESTDIR)$(bindir)/$(binprefix) && rm -f mcedit && $(LN_S) mc mcedit +libmc_la_LIBADD = \ + event/libmcevent.la \ + filehighlight/libmcfilehighlight.la \ + mcconfig/libmcconfig.la \ + search/libsearch.la \ + strutil/libmcstrutil.la \ + skin/libmcskin.la \ + tty/libmctty.la \ + vfs/libmcvfs.la \ + widget/libmcwidget.la -install_mcdiff: - cd $(DESTDIR)$(bindir)/$(binprefix) && rm -f mcdiff && $(LN_S) mc mcdiff +libmc_la_LIBADD += $(MCLIBS) $(SLANGLIB) -uninstall-hook: - rm -f $(DESTDIR)$(bindir)/$(binprefix)/mcview -if USE_INTERNAL_EDIT - rm -f $(DESTDIR)$(bindir)/$(binprefix)/mcedit -endif -if USE_DIFF - rm -f $(DESTDIR)$(bindir)/$(binprefix)/mcdiff +if HAVE_GMODULE + libmc_la_LIBADD += $(GMODULE_LIBS) +else + libmc_la_LIBADD += $(GLIB_LIBS) endif diff --git a/mcsrc/src/args.c b/mcsrc/src/args.c index a10631fa..fc1cecf3 100644 --- a/mcsrc/src/args.c +++ b/mcsrc/src/args.c @@ -1,7 +1,7 @@ /* Handle command line arguments. - Copyright (C) 2009-2023 + Copyright (C) 2009-2024 Free Software Foundation, Inc. Written by: @@ -349,7 +349,7 @@ mc_args_new_color_group (void) " errdhotfocus\n" " Menus: menunormal, menuhot, menusel, menuhotsel, menuinactive\n" " Popup menus: pmenunormal, pmenusel, pmenutitle\n" - " Editor: editnormal, editbold, editmarked, editwhitespace,\n" + " Editor: editnormal, editbold, editmarked, editwhitespace, editnonprintable,\n" " editlinestate, editbg, editframe, editframeactive\n" " editframedrag\n" " Viewer: viewnormal,viewbold, viewunderline, viewselected\n" diff --git a/mcsrc/src/background.c b/mcsrc/src/background.c index 41a7f40d..74c449e3 100644 --- a/mcsrc/src/background.c +++ b/mcsrc/src/background.c @@ -2,7 +2,7 @@ /* Background support. - Copyright (C) 1996-2023 + Copyright (C) 1996-2024 Free Software Foundation, Inc. Written by: @@ -553,7 +553,10 @@ do_background (file_op_context_t * ctx, char *info) { int nullfd; + (void) close (comm[0]); parent_fd = comm[1]; + + (void) close (back_comm[1]); from_parent_fd = back_comm[0]; mc_global.we_are_background = TRUE; @@ -580,6 +583,8 @@ do_background (file_op_context_t * ctx, char *info) } else { + (void) close (comm[1]); + (void) close (back_comm[0]); ctx->pid = pid; register_task_running (ctx, pid, comm[0], back_comm[1], info); return 1; diff --git a/mcsrc/src/clipboard.c b/mcsrc/src/clipboard.c index 3c31cb05..a9197929 100644 --- a/mcsrc/src/clipboard.c +++ b/mcsrc/src/clipboard.c @@ -1,7 +1,7 @@ /* Util for external clipboard. - Copyright (C) 2009-2023 + Copyright (C) 2009-2024 Free Software Foundation, Inc. Written by: diff --git a/mcsrc/src/cons.handler.c b/mcsrc/src/cons.handler.c index 284fffd0..891e6560 100644 --- a/mcsrc/src/cons.handler.c +++ b/mcsrc/src/cons.handler.c @@ -1,7 +1,7 @@ /* Client interface for General purpose Linux console save/restore server - Copyright (C) 1994-2023 + Copyright (C) 1994-2024 Free Software Foundation, Inc. This file is part of the Midnight Commander. diff --git a/mcsrc/src/consaver/cons.saver.c b/mcsrc/src/consaver/cons.saver.c index 4867ab6a..dda9c413 100644 --- a/mcsrc/src/consaver/cons.saver.c +++ b/mcsrc/src/consaver/cons.saver.c @@ -11,7 +11,7 @@ Partly rewritten by Jakub Jelinek . - Copyright (C) 1994-2023 + Copyright (C) 1994-2024 Free Software Foundation, Inc. This file is part of the Midnight Commander. diff --git a/mcsrc/src/diffviewer/internal.h b/mcsrc/src/diffviewer/internal.h index 728d4b5e..ad6fcb2d 100644 --- a/mcsrc/src/diffviewer/internal.h +++ b/mcsrc/src/diffviewer/internal.h @@ -108,7 +108,7 @@ typedef struct WDiff gboolean new_frame; int skip_rows; int skip_cols; - int display_symbols; + gboolean display_symbols; int display_numbers; gboolean show_cr; int tab_size; diff --git a/mcsrc/src/diffviewer/search.c b/mcsrc/src/diffviewer/search.c index 098b0123..0ad2592b 100644 --- a/mcsrc/src/diffviewer/search.c +++ b/mcsrc/src/diffviewer/search.c @@ -1,7 +1,7 @@ /* Search functions for diffviewer. - Copyright (C) 2010-2023 + Copyright (C) 2010-2024 Free Software Foundation, Inc. Written by: @@ -93,7 +93,8 @@ mcdiffview_dialog_search (WDiff * dview) quick_widget_t quick_widgets[] = { /* *INDENT-OFF* */ QUICK_LABELED_INPUT (N_("Enter search string:"), input_label_above, INPUT_LAST_TEXT, - MC_HISTORY_SHARED_SEARCH, &exp, NULL, FALSE, FALSE, INPUT_COMPLETE_NONE), + MC_HISTORY_SHARED_SEARCH, &exp, NULL, FALSE, FALSE, + INPUT_COMPLETE_NONE), QUICK_SEPARATOR (TRUE), QUICK_START_COLUMNS, QUICK_RADIO (num_of_types, (const char **) list_of_types, diff --git a/mcsrc/src/diffviewer/ydiff.c b/mcsrc/src/diffviewer/ydiff.c index cca8dfc8..f7d8f31d 100644 --- a/mcsrc/src/diffviewer/ydiff.c +++ b/mcsrc/src/diffviewer/ydiff.c @@ -1,7 +1,7 @@ /* File difference viewer - Copyright (C) 2007-2023 + Copyright (C) 2007-2024 Free Software Foundation, Inc. Written by: @@ -29,6 +29,11 @@ #include +#if defined(WIN32) +#define WIN32_LEAN_AND_MEAN +#include +#endif + #include #include #include /* ptrdiff_t */ @@ -71,19 +76,6 @@ /*** file scope macro definitions ****************************************************************/ -#define g_array_foreach(a, TP, cbf) \ -do { \ - size_t g_array_foreach_i;\ - \ - for (g_array_foreach_i = 0; g_array_foreach_i < a->len; g_array_foreach_i++) \ - { \ - TP *g_array_foreach_var; \ - \ - g_array_foreach_var = &g_array_index (a, TP, g_array_foreach_i); \ - (*cbf) (g_array_foreach_var); \ - } \ -} while (0) - #define FILE_READ_BUF 4096 #define FILE_FLAG_TEMP (1 << 0) @@ -131,6 +123,37 @@ TAB_SKIP (int ts, int pos) /* --------------------------------------------------------------------------------------------- */ +/** + * Fill buffer by spaces + * + * @param buf buffer + * @param n number of spaces + * @param zero_terminate add a nul after @n spaces + */ +static void +fill_by_space (char *buf, size_t n, gboolean zero_terminate) +{ + memset (buf, ' ', n); + if (zero_terminate) + buf[n] = '\0'; +} + +/* --------------------------------------------------------------------------------------------- */ + +#if defined(WIN32) +static FILE * +fopen_binary(const char *path, const char *mode) +{ + if ('r' == mode[0]) + return fopen(path, "rb"); + if ('w' == mode[0]) + return fopen(path, "wb"); + return NULL; +} + +#define fopen(__a,__b) fopen_binary(__a,__b) +#endif + static gboolean rewrite_backup_content (const vfs_path_t * from_file_name_vpath, const char *to_file_name) { @@ -196,7 +219,7 @@ open_temp (void **name) */ static FBUF * -f_dopen (int fd) +dview_fdopen (int fd) { FBUF *fs; @@ -232,11 +255,11 @@ f_dopen (int fd) */ static int -f_free (FBUF * fs) +dview_ffree (FBUF * fs) { int rv = 0; - if (fs->flags & FILE_FLAG_TEMP) + if ((fs->flags & FILE_FLAG_TEMP) != 0) { rv = unlink (fs->data); g_free (fs->data); @@ -255,19 +278,19 @@ f_free (FBUF * fs) * @return file structure */ static FBUF * -f_temp (void) +dview_ftemp (void) { int fd; FBUF *fs; - fs = f_dopen (0); + fs = dview_fdopen (0); if (fs == NULL) return NULL; fd = open_temp (&fs->data); if (fd < 0) { - f_free (fs); + dview_ffree (fs); return NULL; } @@ -288,19 +311,23 @@ f_temp (void) */ static FBUF * -f_open (const char *filename, int flags) +dview_fopen (const char *filename, int flags) { int fd; FBUF *fs; - fs = f_dopen (0); + fs = dview_fdopen (0); if (fs == NULL) return NULL; +#if defined(WIN32) + fd = open (filename, flags|O_BINARY); +#else fd = open (filename, flags); +#endif if (fd < 0) { - f_free (fs); + dview_ffree (fs); return NULL; } @@ -323,20 +350,20 @@ f_open (const char *filename, int flags) */ static size_t -f_gets (char *buf, size_t size, FBUF * fs) +dview_fgets (char *buf, size_t size, FBUF * fs) { size_t j = 0; do { int i; - int stop = 0; + gboolean stop = FALSE; for (i = fs->pos; j < size && i < fs->len && !stop; i++, j++) { buf[j] = fs->buf[i]; if (buf[j] == '\n') - stop = 1; + stop = TRUE; } fs->pos = i; @@ -365,11 +392,11 @@ f_gets (char *buf, size_t size, FBUF * fs) */ static off_t -f_seek (FBUF * fs, off_t off, int whence) +dview_fseek (FBUF * fs, off_t off, int whence) { off_t rv; - if (fs->len && whence != SEEK_END) + if (fs->len != 0 && whence != SEEK_END) { rv = lseek (fs->fd, 0, SEEK_CUR); if (rv != -1) @@ -404,7 +431,7 @@ f_seek (FBUF * fs, off_t off, int whence) */ static off_t -f_reset (FBUF * fs) +dview_freset (FBUF * fs) { off_t rv; @@ -428,7 +455,7 @@ f_reset (FBUF * fs) */ static ssize_t -f_write (FBUF * fs, const char *buf, size_t size) +dview_fwrite (FBUF * fs, const char *buf, size_t size) { ssize_t rv; @@ -450,7 +477,7 @@ f_write (FBUF * fs, const char *buf, size_t size) */ static off_t -f_trunc (FBUF * fs) +dview_ftrunc (FBUF * fs) { off_t off; @@ -479,14 +506,14 @@ f_trunc (FBUF * fs) */ static int -f_close (FBUF * fs) +dview_fclose (FBUF * fs) { int rv = -1; if (fs != NULL) { rv = close (fs->fd); - f_free (fs); + dview_ffree (fs); } return rv; @@ -504,7 +531,7 @@ f_close (FBUF * fs) */ static FBUF * -p_open (const char *cmd, int flags) +dview_popen (const char *cmd, int flags) { FILE *f; FBUF *fs; @@ -518,14 +545,17 @@ p_open (const char *cmd, int flags) if (type == NULL) return NULL; - fs = f_dopen (0); + fs = dview_fdopen (0); if (fs == NULL) return NULL; +#if defined(WIN32) + win32_ptrace (); +#endif f = popen (cmd, type); if (f == NULL) { - f_free (fs); + dview_ffree (fs); return NULL; } @@ -544,14 +574,17 @@ p_open (const char *cmd, int flags) */ static int -p_close (FBUF * fs) +dview_pclose (FBUF * fs, const char *cmd) { int rv = -1; if (fs != NULL) { rv = pclose (fs->data); - f_free (fs); +#if defined(WIN32) + win32_perror (rv != 0, cmd); +#endif + dview_ffree (fs); } return rv; @@ -694,7 +727,7 @@ scan_line (const char *p, GArray * ops) int f1, f2; int t1, t2; int cmd; - int range; + gboolean range = FALSE; /* handle the following cases: * NUMaNUM[,NUM] @@ -707,20 +740,19 @@ scan_line (const char *p, GArray * ops) return -1; f2 = f1; - range = 0; if (*p == ',') { p++; if (scan_deci (&p, &f2) != 0 || f2 < f1) return -1; - range = 1; + range = TRUE; } cmd = *p++; if (cmd == 'a') { - if (range != 0) + if (range) return -1; } else if (cmd != 'c' && cmd != 'd') @@ -730,17 +762,17 @@ scan_line (const char *p, GArray * ops) return -1; t2 = t1; - range = 0; + range = FALSE; if (*p == ',') { p++; if (scan_deci (&p, &t2) != 0 || t2 < t1) return -1; - range = 1; + range = TRUE; } - if (cmd == 'd' && range != 0) + if (cmd == 'd' && range) return -1; op.a[0][0] = f1; @@ -768,7 +800,7 @@ scan_diff (FBUF * f, GArray * ops) int sz; char buf[BUFSIZ]; - while ((sz = f_gets (buf, sizeof (buf) - 1, f)) != 0) + while ((sz = dview_fgets (buf, sizeof (buf) - 1, f)) != 0) { if (isdigit (buf[0])) { @@ -778,12 +810,10 @@ scan_diff (FBUF * f, GArray * ops) buf[sz] = '\0'; if (scan_line (buf, ops) != 0) return -1; - - continue; } - - while (buf[sz - 1] != '\n' && (sz = f_gets (buf, sizeof (buf), f)) != 0) - ; + else + while (buf[sz - 1] != '\n' && (sz = dview_fgets (buf, sizeof (buf), f)) != 0) + ; } return ops->len; @@ -803,15 +833,33 @@ scan_diff (FBUF * f, GArray * ops) * @return positive number indicating number of hunks, otherwise negative */ +#if defined(WIN32) +const char * +mcdiff(void) +{ + static char mcdiff[1024] = {0}; + if (0 == mcdiff[0]) { + char *end = NULL; + if (GetModuleFileNameA(NULL, mcdiff, sizeof(mcdiff) - 6)) { + end = (char *)strrchr(mcdiff, '\\'); + } + strcpy(end ? (end + 1) : mcdiff, "mcdiff"); + } + return mcdiff; +} +#endif //WIN32 + static int dff_execute (const char *args, const char *extra, const char *file1, const char *file2, GArray * ops) { +#if !defined(WIN32) static const char *opt = " --old-group-format='%df%(f=l?:,%dl)d%dE\n'" " --new-group-format='%dea%dF%(F=L?:,%dL)\n'" " --changed-group-format='%df%(f=l?:,%dl)c%dF%(F=L?:,%dL)\n'" " --unchanged-group-format=''"; +#endif int rv; FBUF *f; @@ -822,21 +870,47 @@ dff_execute (const char *args, const char *extra, const char *file1, const char /* escape potential $ to avoid shell variable substitutions in popen() */ file1_esc = strutils_shell_escape (file1); file2_esc = strutils_shell_escape (file2); +#if defined(WIN32) + cmd = g_strdup_printf ("\"%s\"%s%s%s%s --mc-format \"%s\" \"%s\"", mcdiff(), + (*args ? " " : ""), args, (*extra ? " " : ""), extra, file1_esc, file2_esc); +#else cmd = g_strdup_printf ("diff %s %s %s %s %s", args, extra, opt, file1_esc, file2_esc); +#endif g_free (file1_esc); g_free (file2_esc); if (cmd == NULL) return -1; - f = p_open (cmd, O_RDONLY); - g_free (cmd); - + f = dview_popen (cmd, O_RDONLY); +#if defined(WIN32) if (f == NULL) + { + const char *arg0 = strstr(cmd + 1, "\" "); + char *errmsg; + + if (arg0) { + errmsg = g_strdup_printf (_("Cannot open pipe for reading: %s\n%s"), mcdiff(), arg0 + 2); + } else { + errmsg = g_strdup_printf (_("Cannot open pipe for reading: %s"), cmd); + } + query_dialog (_("Error"), errmsg, D_ERROR, 1, _("&Dismiss")); + g_free (errmsg); + g_free (cmd); + return -2; // command errpr + } + +#else + if (f == NULL) + { + g_free (cmd); return -1; + } +#endif rv = scan_diff (f, ops); - code = p_close (f); + code = dview_pclose (f, cmd); + g_free (cmd); if (rv < 0 || code == -1 || !WIFEXITED (code) || WEXITSTATUS (code) == 2) rv = -1; @@ -846,6 +920,38 @@ dff_execute (const char *args, const char *extra, const char *file1, const char /* --------------------------------------------------------------------------------------------- */ +static gboolean +printer_for (char ch, DFUNC printer, void *ctx, FBUF * f, int *line, off_t * off) +{ + size_t sz; + char buf[BUFSIZ]; + + sz = dview_fgets (buf, sizeof (buf), f); + if (sz == 0) + return FALSE; + + (*line)++; + printer (ctx, ch, *line, *off, sz, buf); + *off += sz; + + while (buf[sz - 1] != '\n') + { + sz = dview_fgets (buf, sizeof (buf), f); + if (sz == 0) + { + printer (ctx, 0, 0, 0, 1, "\n"); + break; + } + + printer (ctx, 0, 0, 0, sz, buf); + *off += sz; + } + + return TRUE; +} + +/* --------------------------------------------------------------------------------------------- */ + /** * Reparse and display file according to diff statements. * @@ -863,29 +969,30 @@ dff_reparse (diff_place_t ord, const char *filename, const GArray * ops, DFUNC p { size_t i; FBUF *f; - size_t sz; - char buf[BUFSIZ]; int line = 0; off_t off = 0; const DIFFCMD *op; diff_place_t eff; - int add_cmd; - int del_cmd; + int add_cmd, del_cmd; - f = f_open (filename, O_RDONLY); + f = dview_fopen (filename, O_RDONLY); if (f == NULL) return -1; - ord &= 1; + if (ord != DIFF_LEFT) + ord = DIFF_RIGHT; eff = ord; - add_cmd = 'a'; - del_cmd = 'd'; - if (ord != 0) + if (ord != DIFF_LEFT) { add_cmd = 'd'; del_cmd = 'a'; } + else + { + add_cmd = 'a'; + del_cmd = 'd'; + } #define F1 a[eff][0] #define F2 a[eff][1] #define T1 a[ ord^1 ][0] @@ -895,60 +1002,26 @@ dff_reparse (diff_place_t ord, const char *filename, const GArray * ops, DFUNC p int n; op = &g_array_index (ops, DIFFCMD, i); - n = op->F1 - (op->cmd != add_cmd); - while (line < n && (sz = f_gets (buf, sizeof (buf), f)) != 0) - { - line++; - printer (ctx, EQU_CH, line, off, sz, buf); - off += sz; - while (buf[sz - 1] != '\n') - { - sz = f_gets (buf, sizeof (buf), f); - if (sz == 0) - { - printer (ctx, 0, 0, 0, 1, "\n"); - break; - } - printer (ctx, 0, 0, 0, sz, buf); - off += sz; - } - } + n = op->F1; + if (op->cmd != add_cmd) + n--; + + while (line < n && printer_for (EQU_CH, printer, ctx, f, &line, &off)) + ; if (line != n) goto err; if (op->cmd == add_cmd) - { - n = op->T2 - op->T1 + 1; - while (n != 0) - { + for (n = op->T2 - op->T1 + 1; n != 0; n--) printer (ctx, DEL_CH, 0, 0, 1, "\n"); - n--; - } - } if (op->cmd == del_cmd) { - n = op->F2 - op->F1 + 1; - while (n != 0 && (sz = f_gets (buf, sizeof (buf), f)) != 0) - { - line++; - printer (ctx, ADD_CH, line, off, sz, buf); - off += sz; - while (buf[sz - 1] != '\n') - { - sz = f_gets (buf, sizeof (buf), f); - if (sz == 0) - { - printer (ctx, 0, 0, 0, 1, "\n"); - break; - } - printer (ctx, 0, 0, 0, sz, buf); - off += sz; - } - n--; - } + for (n = op->F2 - op->F1 + 1; + n != 0 && printer_for (ADD_CH, printer, ctx, f, &line, &off); n--) + ; if (n != 0) goto err; @@ -956,35 +1029,15 @@ dff_reparse (diff_place_t ord, const char *filename, const GArray * ops, DFUNC p if (op->cmd == 'c') { - n = op->F2 - op->F1 + 1; - while (n != 0 && (sz = f_gets (buf, sizeof (buf), f)) != 0) - { - line++; - printer (ctx, CHG_CH, line, off, sz, buf); - off += sz; - while (buf[sz - 1] != '\n') - { - sz = f_gets (buf, sizeof (buf), f); - if (sz == 0) - { - printer (ctx, 0, 0, 0, 1, "\n"); - break; - } - printer (ctx, 0, 0, 0, sz, buf); - off += sz; - } - n--; - } + for (n = op->F2 - op->F1 + 1; + n != 0 && printer_for (CHG_CH, printer, ctx, f, &line, &off); n--) + ; if (n != 0) goto err; - n = op->T2 - op->T1 - (op->F2 - op->F1); - while (n > 0) - { + for (n = op->T2 - op->T1 - (op->F2 - op->F1); n > 0; n--) printer (ctx, CHG_CH, 0, 0, 1, "\n"); - n--; - } } } #undef T2 @@ -992,29 +1045,14 @@ dff_reparse (diff_place_t ord, const char *filename, const GArray * ops, DFUNC p #undef F2 #undef F1 - while ((sz = f_gets (buf, sizeof (buf), f)) != 0) - { - line++; - printer (ctx, EQU_CH, line, off, sz, buf); - off += sz; - while (buf[sz - 1] != '\n') - { - sz = f_gets (buf, sizeof (buf), f); - if (sz == 0) - { - printer (ctx, 0, 0, 0, 1, "\n"); - break; - } - printer (ctx, 0, 0, 0, sz, buf); - off += sz; - } - } + while (printer_for (EQU_CH, printer, ctx, f, &line, &off)) + ; - f_close (f); + dview_fclose (f); return 0; err: - f_close (f); + dview_fclose (f); return -1; } @@ -1145,8 +1183,6 @@ hdiff_multi (const char *s, const char *t, const BRACKET bracket, int min, GArra int len; ret = g_array_new (FALSE, TRUE, sizeof (PAIR)); - if (ret == NULL) - return FALSE; len = lcsubstr (s + bracket[DIFF_LEFT].off, bracket[DIFF_LEFT].len, t + bracket[DIFF_RIGHT].off, bracket[DIFF_RIGHT].len, ret, min); @@ -1295,9 +1331,8 @@ cvt_cpy (char *dst, const char *src, size_t srcsize, int base, int ts) j = TAB_SKIP (ts, i + base); i += j - 1; - while (j-- > 0) - *dst++ = ' '; - dst--; + fill_by_space (dst, j, FALSE); + dst += j - 1; } } return i + base; @@ -1339,9 +1374,8 @@ cvt_ncpy (char *dst, int dstsize, const char **_src, size_t srcsize, int base, i if (j > dstsize - i) j = dstsize - i; i += j - 1; - while (j-- > 0) - *dst++ = ' '; - dst--; + fill_by_space (dst, j, FALSE); + dst += j - 1; } } *_src = src; @@ -1435,12 +1469,9 @@ cvt_mget (const char *src, size_t srcsize, char *dst, int dstsize, int skip, int } sz = dst - tmp; } - while (dstsize != 0) - { - dstsize--; - *dst++ = ' '; - } - *dst = '\0'; + + fill_by_space (dst, dstsize, TRUE); + return sz; } @@ -1538,13 +1569,10 @@ cvt_mgeta (const char *src, size_t srcsize, char *dst, int dstsize, int skip, in } sz = dst - tmp; } - while (dstsize != 0) - { - dstsize--; - *att++ = '\0'; - *dst++ = ' '; - } - *dst = '\0'; + + memset (att, '\0', dstsize); + fill_by_space (dst, dstsize, TRUE); + return sz; } @@ -1581,17 +1609,16 @@ cvt_fget (FBUF * f, off_t off, char *dst, size_t dstsize, int skip, int ts, gboo if (sizeof (tmp) < amount || sizeof (tmp) <= dstsize || sizeof (cvt) < 8 * amount) { /* abnormal, but avoid buffer overflow */ - memset (dst, ' ', dstsize); - dst[dstsize] = '\0'; + fill_by_space (dst, dstsize, TRUE); return 0; } - f_seek (f, off, SEEK_SET); + dview_fseek (f, off, SEEK_SET); while (skip > base) { old_base = base; - sz = f_gets (tmp, amount, f); + sz = dview_fgets (tmp, amount, f); if (sz == 0) break; @@ -1606,8 +1633,7 @@ cvt_fget (FBUF * f, off_t off, char *dst, size_t dstsize, int skip, int ts, gboo if (base < skip) { - memset (dst, ' ', dstsize); - dst[dstsize] = '\0'; + fill_by_space (dst, dstsize, TRUE); return 0; } @@ -1621,7 +1647,7 @@ cvt_fget (FBUF * f, off_t off, char *dst, size_t dstsize, int skip, int ts, gboo if (q == NULL) { - sz = f_gets (tmp, dstsize - useful + 1, f); + sz = dview_fgets (tmp, dstsize - useful + 1, f); if (sz != 0) { const char *ptr = tmp; @@ -1642,7 +1668,6 @@ cvt_fget (FBUF * f, off_t off, char *dst, size_t dstsize, int skip, int ts, gboo dst[sz] = lastch; for (i = 0; i < sz && dst[i] != '\n'; i++) - { if (dst[i] == '\r' && dst[i + 1] == '\n') { if (show_cr) @@ -1653,17 +1678,13 @@ cvt_fget (FBUF * f, off_t off, char *dst, size_t dstsize, int skip, int ts, gboo dst[i++] = 'M'; } else - { dst[i++] = '*'; - } } break; } - } - for (; i < dstsize; i++) - dst[i] = ' '; - dst[i] = '\0'; + fill_by_space (dst, dstsize, TRUE); + return sz; } @@ -1671,9 +1692,9 @@ cvt_fget (FBUF * f, off_t off, char *dst, size_t dstsize, int skip, int ts, gboo /* diff printers et al ****************************************************** */ static void -cc_free_elt (void *elt) +cc_free_elt (gpointer elt) { - DIFFLN *p = elt; + DIFFLN *p = (DIFFLN *) elt; if (p != NULL) g_free (p->p); @@ -1727,7 +1748,7 @@ printer (void *ctx, int ch, int line, off_t off, size_t sz, const char *str) if (dsrc == DATA_SRC_TMP && (line != 0 || ch == 0)) { FBUF *f = ((PRINTER_CTX *) ctx)->f; - f_write (f, str, sz); + dview_fwrite (f, str, sz); } return 0; } @@ -1741,8 +1762,8 @@ redo_diff (WDiff * dview) PRINTER_CTX ctx; GArray *ops; int ndiff; - int rv; - char extra[256]; + int rv = 0; + char extra[BUF_MEDIUM]; extra[0] = '\0'; if (dview->opt.quality == 2) @@ -1762,8 +1783,8 @@ redo_diff (WDiff * dview) if (dview->dsrc != DATA_SRC_MEM) { - f_reset (f[DIFF_LEFT]); - f_reset (f[DIFF_RIGHT]); + dview_freset (f[DIFF_LEFT]); + dview_freset (f[DIFF_RIGHT]); } ops = g_array_new (FALSE, FALSE, sizeof (DIFFCMD)); @@ -1776,8 +1797,6 @@ redo_diff (WDiff * dview) } ctx.dsrc = dview->dsrc; - - rv = 0; ctx.a = dview->a[DIFF_LEFT]; ctx.f = f[DIFF_LEFT]; rv |= dff_reparse (DIFF_LEFT, dview->file[DIFF_LEFT], ops, printer, &ctx); @@ -1794,44 +1813,40 @@ redo_diff (WDiff * dview) if (dview->dsrc == DATA_SRC_TMP) { - f_trunc (f[DIFF_LEFT]); - f_trunc (f[DIFF_RIGHT]); + dview_ftrunc (f[DIFF_LEFT]); + dview_ftrunc (f[DIFF_RIGHT]); } if (dview->dsrc == DATA_SRC_MEM && HDIFF_ENABLE) { + size_t i; + dview->hdiff = g_ptr_array_new (); - if (dview->hdiff != NULL) + + for (i = 0; i < dview->a[DIFF_LEFT]->len; i++) { - size_t i; + GArray *h = NULL; + const DIFFLN *p; + const DIFFLN *q; - for (i = 0; i < dview->a[DIFF_LEFT]->len; i++) + p = &g_array_index (dview->a[DIFF_LEFT], DIFFLN, i); + q = &g_array_index (dview->a[DIFF_RIGHT], DIFFLN, i); + if (p->line != 0 && q->line != 0 && p->ch == CHG_CH) { - GArray *h = NULL; - const DIFFLN *p; - const DIFFLN *q; + gboolean runresult; - p = &g_array_index (dview->a[DIFF_LEFT], DIFFLN, i); - q = &g_array_index (dview->a[DIFF_RIGHT], DIFFLN, i); - if (p->line && q->line && p->ch == CHG_CH) - { - h = g_array_new (FALSE, FALSE, sizeof (BRACKET)); - if (h != NULL) - { - gboolean runresult; + h = g_array_new (FALSE, FALSE, sizeof (BRACKET)); - runresult = - hdiff_scan (p->p, p->u.len, q->p, q->u.len, HDIFF_MINCTX, h, - HDIFF_DEPTH); - if (!runresult) - { - g_array_free (h, TRUE); - h = NULL; - } - } + runresult = + hdiff_scan (p->p, p->u.len, q->p, q->u.len, HDIFF_MINCTX, h, HDIFF_DEPTH); + if (!runresult) + { + g_array_free (h, TRUE); + h = NULL; } - g_ptr_array_add (dview->hdiff, h); } + + g_ptr_array_add (dview->hdiff, h); } } return ndiff; @@ -1874,7 +1889,7 @@ get_digits (unsigned int n) { int d = 1; - while (n /= 10) + while ((n /= 10) != 0) d++; return d; } @@ -1935,19 +1950,19 @@ static int find_prev_hunk (const GArray * a, int pos) { #if 1 - while (pos > 0 && ((DIFFLN *) & g_array_index (a, DIFFLN, pos))->ch != EQU_CH) - pos--; - while (pos > 0 && ((DIFFLN *) & g_array_index (a, DIFFLN, pos))->ch == EQU_CH) - pos--; - while (pos > 0 && ((DIFFLN *) & g_array_index (a, DIFFLN, pos))->ch != EQU_CH) - pos--; + for (; pos > 0 && ((DIFFLN *) & g_array_index (a, DIFFLN, pos))->ch != EQU_CH; pos--) + ; + for (; pos > 0 && ((DIFFLN *) & g_array_index (a, DIFFLN, pos))->ch == EQU_CH; pos--) + ; + for (; pos > 0 && ((DIFFLN *) & g_array_index (a, DIFFLN, pos))->ch != EQU_CH; pos--) + ; if (pos > 0 && (size_t) pos < a->len) pos++; #else - while (pos > 0 && ((DIFFLN *) & g_array_index (a, DIFFLN, pos - 1))->ch == EQU_CH) - pos--; - while (pos > 0 && ((DIFFLN *) & g_array_index (a, DIFFLN, pos - 1))->ch != EQU_CH) - pos--; + for (; pos > 0 && ((DIFFLN *) & g_array_index (a, DIFFLN, pos - 1))->ch == EQU_CH; pos--) + ; + for (; pos > 0 && ((DIFFLN *) & g_array_index (a, DIFFLN, pos - 1))->ch != EQU_CH; pos--) + ; #endif return pos; @@ -1958,10 +1973,10 @@ find_prev_hunk (const GArray * a, int pos) static size_t find_next_hunk (const GArray * a, size_t pos) { - while (pos < a->len && ((DIFFLN *) & g_array_index (a, DIFFLN, pos))->ch != EQU_CH) - pos++; - while (pos < a->len && ((DIFFLN *) & g_array_index (a, DIFFLN, pos))->ch == EQU_CH) - pos++; + for (; pos < a->len && ((DIFFLN *) & g_array_index (a, DIFFLN, pos))->ch != EQU_CH; pos++) + ; + for (; pos < a->len && ((DIFFLN *) & g_array_index (a, DIFFLN, pos))->ch == EQU_CH; pos++) + ; return pos; } @@ -2009,15 +2024,17 @@ get_current_hunk (WDiff * dview, int *start_line1, int *end_line1, int *start_li default: break; } - while (pos > 0 && ((DIFFLN *) & g_array_index (a0, DIFFLN, pos))->ch != EQU_CH) - pos--; + + for (; pos > 0 && ((DIFFLN *) & g_array_index (a0, DIFFLN, pos))->ch != EQU_CH; pos--) + ; if (pos > 0) { *start_line1 = ((DIFFLN *) & g_array_index (a0, DIFFLN, pos))->line + 1; *start_line2 = ((DIFFLN *) & g_array_index (a1, DIFFLN, pos))->line + 1; } - pos = dview->skip_rows; - while (pos < a0->len && ((DIFFLN *) & g_array_index (a0, DIFFLN, pos))->ch != EQU_CH) + + for (pos = dview->skip_rows; + pos < a0->len && ((DIFFLN *) & g_array_index (a0, DIFFLN, pos))->ch != EQU_CH; pos++) { int l0, l1; @@ -2027,7 +2044,6 @@ get_current_hunk (WDiff * dview, int *start_line1, int *end_line1, int *start_li *end_line1 = MAX (*start_line1, l0); if (l1 > 0) *end_line2 = MAX (*start_line2, l1); - pos++; } } return res; @@ -2057,12 +2073,9 @@ dview_remove_hunk (WDiff * dview, FILE * merge_file, int from1, int to1, else f0 = fopen (dview->file[DIFF_LEFT], "r"); - line = 0; - while (fgets (buf, sizeof (buf), f0) != NULL && line < from1 - 1) - { - line++; + for (line = 0; fgets (buf, sizeof (buf), f0) != NULL && line < from1 - 1; line++) fputs (buf, merge_file); - } + while (fgets (buf, sizeof (buf), f0) != NULL) { line++; @@ -2090,8 +2103,7 @@ dview_add_hunk (WDiff * dview, FILE * merge_file, int from1, int from2, int to2, { int line; char buf[BUF_10K]; - FILE *f0; - FILE *f1; + FILE *f0, *f1; if (merge_direction == FROM_RIGHT_TO_LEFT) { @@ -2104,14 +2116,9 @@ dview_add_hunk (WDiff * dview, FILE * merge_file, int from1, int from2, int to2, f1 = fopen (dview->file[DIFF_RIGHT], "r"); } - line = 0; - while (fgets (buf, sizeof (buf), f0) != NULL && line < from1 - 1) - { - line++; + for (line = 0; fgets (buf, sizeof (buf), f0) != NULL && line < from1 - 1; line++) fputs (buf, merge_file); - } - line = 0; - while (fgets (buf, sizeof (buf), f1) != NULL && line <= to2) + for (line = 0; fgets (buf, sizeof (buf), f1) != NULL && line <= to2;) { line++; if (line >= from2) @@ -2141,10 +2148,9 @@ static void dview_replace_hunk (WDiff * dview, FILE * merge_file, int from1, int to1, int from2, int to2, action_direction_t merge_direction) { - int line1 = 0, line2 = 0; + int line1, line2; char buf[BUF_10K]; - FILE *f0; - FILE *f1; + FILE *f0, *f1; if (merge_direction == FROM_RIGHT_TO_LEFT) { @@ -2157,12 +2163,9 @@ dview_replace_hunk (WDiff * dview, FILE * merge_file, int from1, int to1, int fr f1 = fopen (dview->file[DIFF_RIGHT], "r"); } - while (fgets (buf, sizeof (buf), f0) != NULL && line1 < from1 - 1) - { - line1++; + for (line1 = 0; fgets (buf, sizeof (buf), f0) != NULL && line1 < from1 - 1; line1++) fputs (buf, merge_file); - } - while (fgets (buf, sizeof (buf), f1) != NULL && line2 <= to2) + for (line2 = 0; fgets (buf, sizeof (buf), f1) != NULL && line2 <= to2;) { line2++; if (line2 >= from2) @@ -2295,18 +2298,14 @@ dview_reread (WDiff * dview) destroy_hdiff (dview); if (dview->a[DIFF_LEFT] != NULL) - { - g_array_foreach (dview->a[DIFF_LEFT], DIFFLN, cc_free_elt); g_array_free (dview->a[DIFF_LEFT], TRUE); - } if (dview->a[DIFF_RIGHT] != NULL) - { - g_array_foreach (dview->a[DIFF_RIGHT], DIFFLN, cc_free_elt); g_array_free (dview->a[DIFF_RIGHT], TRUE); - } dview->a[DIFF_LEFT] = g_array_new (FALSE, FALSE, sizeof (DIFFLN)); + g_array_set_clear_func (dview->a[DIFF_LEFT], cc_free_elt); dview->a[DIFF_RIGHT] = g_array_new (FALSE, FALSE, sizeof (DIFFLN)); + g_array_set_clear_func (dview->a[DIFF_RIGHT], cc_free_elt); ndiff = redo_diff (dview); if (ndiff >= 0) @@ -2358,15 +2357,14 @@ dview_select_encoding (WDiff * dview) static void dview_load_options (WDiff * dview) { - gboolean show_numbers, show_symbols; + gboolean show_numbers; int tab_size; - show_symbols = mc_config_get_bool (mc_global.main_config, "DiffView", "show_symbols", FALSE); - if (show_symbols) - dview->display_symbols = 1; + dview->display_symbols = + mc_config_get_bool (mc_global.main_config, "DiffView", "show_symbols", FALSE); show_numbers = mc_config_get_bool (mc_global.main_config, "DiffView", "show_numbers", FALSE); if (show_numbers) - dview->display_numbers = calc_nwidth ((const GArray * const *) dview->a); + dview->display_numbers = 1; tab_size = mc_config_get_int (mc_global.main_config, "DiffView", "tab_size", 8); if (tab_size > 0 && tab_size < 9) dview->tab_size = tab_size; @@ -2394,8 +2392,7 @@ dview_load_options (WDiff * dview) static void dview_save_options (WDiff * dview) { - mc_config_set_bool (mc_global.main_config, "DiffView", "show_symbols", - dview->display_symbols != 0); + mc_config_set_bool (mc_global.main_config, "DiffView", "show_symbols", dview->display_symbols); mc_config_set_bool (mc_global.main_config, "DiffView", "show_numbers", dview->display_numbers != 0); mc_config_set_int (mc_global.main_config, "DiffView", "tab_size", dview->tab_size); @@ -2489,27 +2486,27 @@ dview_init (WDiff * dview, const char *args, const char *file1, const char *file if (dsrc == DATA_SRC_TMP) { - f[DIFF_LEFT] = f_temp (); + f[DIFF_LEFT] = dview_ftemp (); if (f[DIFF_LEFT] == NULL) return -1; - f[DIFF_RIGHT] = f_temp (); + f[DIFF_RIGHT] = dview_ftemp (); if (f[DIFF_RIGHT] == NULL) { - f_close (f[DIFF_LEFT]); + dview_fclose (f[DIFF_LEFT]); return -1; } } else if (dsrc == DATA_SRC_ORG) { - f[DIFF_LEFT] = f_open (file1, O_RDONLY); + f[DIFF_LEFT] = dview_fopen (file1, O_RDONLY); if (f[DIFF_LEFT] == NULL) return -1; - f[DIFF_RIGHT] = f_open (file2, O_RDONLY); + f[DIFF_RIGHT] = dview_fopen (file2, O_RDONLY); if (f[DIFF_RIGHT] == NULL) { - f_close (f[DIFF_LEFT]); + dview_fclose (f[DIFF_LEFT]); return -1; } } @@ -2520,7 +2517,7 @@ dview_init (WDiff * dview, const char *args, const char *file1, const char *file dview->new_frame = TRUE; dview->skip_rows = 0; dview->skip_cols = 0; - dview->display_symbols = 0; + dview->display_symbols = FALSE; dview->display_numbers = 0; dview->show_cr = TRUE; dview->tab_size = 8; @@ -2550,14 +2547,16 @@ dview_init (WDiff * dview, const char *args, const char *file1, const char *file dview_set_codeset (dview); #endif dview->a[DIFF_LEFT] = g_array_new (FALSE, FALSE, sizeof (DIFFLN)); + g_array_set_clear_func (dview->a[DIFF_LEFT], cc_free_elt); dview->a[DIFF_RIGHT] = g_array_new (FALSE, FALSE, sizeof (DIFFLN)); + g_array_set_clear_func (dview->a[DIFF_RIGHT], cc_free_elt); ndiff = redo_diff (dview); if (ndiff < 0) { /* goto MSG_DESTROY stage: dview_fini() */ - f_close (f[DIFF_LEFT]); - f_close (f[DIFF_RIGHT]); + dview_fclose (f[DIFF_LEFT]); + dview_fclose (f[DIFF_RIGHT]); return -1; } @@ -2575,8 +2574,8 @@ dview_fini (WDiff * dview) { if (dview->dsrc != DATA_SRC_MEM) { - f_close (dview->f[DIFF_RIGHT]); - f_close (dview->f[DIFF_LEFT]); + dview_fclose (dview->f[DIFF_RIGHT]); + dview_fclose (dview->f[DIFF_LEFT]); } #ifdef HAVE_CHARSET @@ -2587,13 +2586,11 @@ dview_fini (WDiff * dview) destroy_hdiff (dview); if (dview->a[DIFF_LEFT] != NULL) { - g_array_foreach (dview->a[DIFF_LEFT], DIFFLN, cc_free_elt); g_array_free (dview->a[DIFF_LEFT], TRUE); dview->a[DIFF_LEFT] = NULL; } if (dview->a[DIFF_RIGHT] != NULL) { - g_array_foreach (dview->a[DIFF_RIGHT], DIFFLN, cc_free_elt); g_array_free (dview->a[DIFF_RIGHT], TRUE); dview->a[DIFF_RIGHT] = NULL; } @@ -2612,7 +2609,7 @@ dview_display_file (const WDiff * dview, diff_place_t ord, int r, int c, int hei char buf[BUFSIZ]; FBUF *f = dview->f[ord]; int skip = dview->skip_cols; - int display_symbols = dview->display_symbols; + gboolean display_symbols = dview->display_symbols; int display_numbers = dview->display_numbers; gboolean show_cr = dview->show_cr; int tab_size = 8; @@ -2620,7 +2617,9 @@ dview_display_file (const WDiff * dview, diff_place_t ord, int r, int c, int hei int nwidth = display_numbers; int xwidth; - xwidth = display_symbols + display_numbers; + xwidth = display_numbers; + if (display_symbols) + xwidth++; if (dview->tab_size > 0 && dview->tab_size < 9) tab_size = dview->tab_size; @@ -2629,9 +2628,9 @@ dview_display_file (const WDiff * dview, diff_place_t ord, int r, int c, int hei if (xwidth > width && display_symbols) { xwidth--; - display_symbols = 0; + display_symbols = FALSE; } - if (xwidth > width && display_numbers) + if (xwidth > width && display_numbers != 0) { xwidth = width; display_numbers = width; @@ -2652,7 +2651,9 @@ dview_display_file (const WDiff * dview, diff_place_t ord, int r, int c, int hei for (i = dview->skip_rows, j = 0; i < dview->a[ord]->len && j < height; j++, i++) { - int ch, next_ch = 0, col; + int ch; + int next_ch = 0; + int col; size_t cnt; p = (DIFFLN *) & g_array_index (dview->a[ord], DIFFLN, i); @@ -2665,7 +2666,7 @@ dview_display_file (const WDiff * dview, diff_place_t ord, int r, int c, int hei } if (p->line != 0) { - if (display_numbers) + if (display_numbers != 0) { tty_gotoyx (r + j, c - xwidth); g_snprintf (buf, display_numbers + 1, "%*d", nwidth, p->line); @@ -2685,7 +2686,16 @@ dview_display_file (const WDiff * dview, diff_place_t ord, int r, int c, int hei #ifdef HAVE_CHARSET if (dview->utf8) - k = dview_str_utf8_offset_to_pos (p->p, width); + { +//WIN32 k = dview_str_utf8_offset_to_pos (p->p, width); + if (width > p->u.len) + { + k = dview_str_utf8_offset_to_pos (p->p, p->u.len); + k += width - p->u.len; + } + else + k = dview_str_utf8_offset_to_pos (p->p, width); + } else #endif k = width; @@ -2744,7 +2754,16 @@ dview_display_file (const WDiff * dview, diff_place_t ord, int r, int c, int hei #ifdef HAVE_CHARSET if (dview->utf8) - k = dview_str_utf8_offset_to_pos (p->p, width); + { +//WIN32 k = dview_str_utf8_offset_to_pos (p->p, width); + if (width > p->u.len) + { + k = dview_str_utf8_offset_to_pos (p->p, p->u.len); + k += width - p->u.len; + } + else + k = dview_str_utf8_offset_to_pos (p->p, width); + } else #endif k = width; @@ -2755,19 +2774,17 @@ dview_display_file (const WDiff * dview, diff_place_t ord, int r, int c, int hei } else { - if (display_numbers) + if (display_numbers != 0) { tty_gotoyx (r + j, c - xwidth); - memset (buf, ' ', display_numbers); - buf[display_numbers] = '\0'; + fill_by_space (buf, display_numbers, TRUE); tty_print_string (buf); } if (ch == DEL_CH) tty_setcolor (DFF_DEL_COLOR); if (ch == CHG_CH) tty_setcolor (DFF_CHD_COLOR); - memset (buf, ' ', width); - buf[width] = '\0'; + fill_by_space (buf, width, TRUE); } tty_gotoyx (r + j, c); /* tty_print_nstring (buf, width); */ @@ -2797,10 +2814,8 @@ dview_display_file (const WDiff * dview, diff_place_t ord, int r, int c, int hei if (mc_global.utf8_display) { if (!dview->utf8) - { next_ch = convert_from_8bit_to_utf_c ((unsigned char) next_ch, dview->converter); - } } else if (dview->utf8) next_ch = convert_from_utf_to_current_c (next_ch, dview->converter); @@ -2817,8 +2832,7 @@ dview_display_file (const WDiff * dview, diff_place_t ord, int r, int c, int hei k = width; if (width < xwidth - 1) k = xwidth - 1; - memset (buf, ' ', k); - buf[k] = '\0'; + fill_by_space (buf, k, TRUE); for (; j < height; j++) { if (xwidth != 0) @@ -2873,7 +2887,7 @@ dview_status (const WDiff * dview, diff_place_t ord, int width, int c) static void dview_redo (WDiff * dview) { - if (dview->display_numbers) + if (dview->display_numbers != 0) { int old; @@ -2890,8 +2904,7 @@ static void dview_update (WDiff * dview) { int height = dview->height; - int width1; - int width2; + int width1, width2; int last; last = dview->a[DIFF_LEFT]->len - 1; @@ -2906,6 +2919,10 @@ dview_update (WDiff * dview) if (height < 2) return; + /* use an actual length of dview->a */ + if (dview->display_numbers != 0) + dview->display_numbers = calc_nwidth ((const GArray * const *) dview->a); + width1 = dview->half1 + dview->bias; width2 = dview->half2 - dview->bias; if (dview->full) @@ -2919,7 +2936,9 @@ dview_update (WDiff * dview) int xwidth; tty_setcolor (NORMAL_COLOR); - xwidth = dview->display_symbols + dview->display_numbers; + xwidth = dview->display_numbers; + if (dview->display_symbols) + xwidth++; if (width1 > 1) tty_draw_box (1, 0, height, width1, FALSE); if (width2 > 1) @@ -2955,8 +2974,11 @@ dview_update (WDiff * dview) } if (width2 > 2) { - dview_status (dview, dview->ord ^ 1, width2, width1); - dview_display_file (dview, dview->ord ^ 1, 2, width1 + 1, height - 2, width2 - 2); + diff_place_t ord; + + ord = dview->ord == DIFF_LEFT ? DIFF_RIGHT : DIFF_LEFT; + dview_status (dview, ord, width2, width1); + dview_display_file (dview, ord, 2, width1 + 1, height - 2, width2 - 2); } } @@ -3025,7 +3047,6 @@ dview_goto_cmd (WDiff * dview, diff_place_t ord) size_t i = 0; if (newline > 0) - { for (; i < dview->a[ord]->len; i++) { const DIFFLN *p; @@ -3034,9 +3055,10 @@ dview_goto_cmd (WDiff * dview, diff_place_t ord) if (p->line == newline) break; } - } + dview->skip_rows = dview->search.last_accessed_num_line = (ssize_t) i; } + g_free (input); } @@ -3146,7 +3168,7 @@ dview_execute_cmd (WDiff * dview, long command) switch (command) { case CK_ShowSymbols: - dview->display_symbols ^= 1; + dview->display_symbols = !dview->display_symbols; dview->new_frame = TRUE; break; case CK_ShowNumbers: @@ -3488,7 +3510,7 @@ diff_view (const char *file1, const char *file2, const char *label1, const char dview_dlg->get_title = dview_get_title; - error = dview_init (dview, "-a", file1, file2, label1, label2, DATA_SRC_MEM); /* XXX binary diff? */ + error = dview_init (dview, "-a", file1, file2, label1, label2, DATA_SRC_MEM); /* XXX binary diff? */ if (error == 0) dlg_run (dview_dlg); @@ -3523,9 +3545,9 @@ while (0) #define UNGET_FILE(n) \ do \ { \ - if (use_copy##n) \ + if (use_copy##n != 0) \ { \ - int changed = 0; \ + gboolean changed = FALSE; \ if (use_copy##n > 0) \ { \ time_t mtime; \ @@ -3555,8 +3577,7 @@ dview_diff_cmd (const void *f0, const void *f1) /* run from panels */ const WPanel *panel0 = (const WPanel *) f0; const WPanel *panel1 = (const WPanel *) f1; - const file_entry_t *fe0; - const file_entry_t *fe1; + const file_entry_t *fe0, *fe1; fe0 = panel_current_entry (panel0); file0 = vfs_path_append_new (panel0->cwd_vpath, fe0->fname->str, (char *) NULL); @@ -3634,12 +3655,9 @@ dview_diff_cmd (const void *f0, const void *f1) rv = -1; if (file0 != NULL && file1 != NULL) { - int use_copy0; - int use_copy1; - struct stat st0; - struct stat st1; - vfs_path_t *real_file0; - vfs_path_t *real_file1; + int use_copy0, use_copy1; + struct stat st0, st1; + vfs_path_t *real_file0, *real_file1; GET_FILE_AND_STAMP (0); GET_FILE_AND_STAMP (1); diff --git a/mcsrc/src/editor/bookmark.c b/mcsrc/src/editor/bookmark.c index d5306600..040a01ba 100644 --- a/mcsrc/src/editor/bookmark.c +++ b/mcsrc/src/editor/bookmark.c @@ -1,7 +1,7 @@ /* Editor book mark handling - Copyright (C) 2001-2023 + Copyright (C) 2001-2024 Free Software Foundation, Inc. Written by: diff --git a/mcsrc/src/editor/edit-impl.h b/mcsrc/src/editor/edit-impl.h index 3d005453..98472ee8 100644 --- a/mcsrc/src/editor/edit-impl.h +++ b/mcsrc/src/editor/edit-impl.h @@ -141,7 +141,7 @@ WEdit *edit_find_editor (const WDialog * h); gboolean edit_widget_is_editor (const Widget * w); gboolean edit_drop_hotkey_menu (WDialog * h, int key); void edit_menu_cmd (WDialog * h); -void user_menu (WEdit * edit, const char *menu_file, int selected_entry); +void edit_user_menu (WEdit * edit, const char *menu_file, int selected_entry); void edit_init_menu (WMenuBar * menubar); void edit_save_mode_cmd (void); off_t edit_move_forward3 (const WEdit * edit, off_t current, long cols, off_t upto); @@ -163,7 +163,7 @@ void edit_set_codeset (WEdit * edit); void edit_block_copy_cmd (WEdit * edit); void edit_block_move_cmd (WEdit * edit); -int edit_block_delete_cmd (WEdit * edit); +gboolean edit_block_delete_cmd (WEdit * edit); void edit_delete_line (WEdit * edit); int edit_delete (WEdit * edit, gboolean byte_delete); diff --git a/mcsrc/src/editor/edit.c b/mcsrc/src/editor/edit.c index 2dfeea27..2eceeedf 100644 --- a/mcsrc/src/editor/edit.c +++ b/mcsrc/src/editor/edit.c @@ -1,7 +1,7 @@ /* Editor low level data handling and cursor fundamentals. - Copyright (C) 1996-2023 + Copyright (C) 1996-2024 Free Software Foundation, Inc. Written by: @@ -75,6 +75,7 @@ #endif /*** global variables ****************************************************************************/ + edit_options_t edit_options = { .word_wrap_line_length = DEFAULT_WRAP_LINE_LENGTH, .typewriter_wrap = FALSE, @@ -141,6 +142,7 @@ static const struct edit_filters { "lz4 -cd %s 2>&1", "lz4 > %s", ".lz4" }, { "lzip -cd %s 2>&1", "lzip > %s", ".lz"}, { "lzma -cd %s 2>&1", "lzma > %s", ".lzma" }, + { "lzop -cd %s 2>&1", "lzop > %s", ".lzo"}, { "bzip2 -cd %s 2>&1", "bzip2 > %s", ".bz2" }, { "gzip -cd %s 2>&1", "gzip > %s", ".gz" }, { "gzip -cd %s 2>&1", "gzip > %s", ".Z" } @@ -261,15 +263,20 @@ static char * edit_get_filter (const vfs_path_t * filename_vpath) { int i; - char *p, *quoted_name; + char *quoted_name; + char *p = NULL; i = edit_find_filter (filename_vpath); if (i < 0) return NULL; quoted_name = name_quote (vfs_path_as_str (filename_vpath), FALSE); - p = g_strdup_printf (all_filters[i].read, quoted_name); - g_free (quoted_name); + if (quoted_name != NULL) + { + p = g_strdup_printf (all_filters[i].read, quoted_name); + g_free (quoted_name); + } + return p; } @@ -478,6 +485,7 @@ edit_load_position (WEdit * edit, gboolean load_position) { long line, column; off_t offset; + off_t b; if (edit->filename_vpath == NULL || *(vfs_path_get_by_index (edit->filename_vpath, 0)->path) == '\0') @@ -502,7 +510,8 @@ edit_load_position (WEdit * edit, gboolean load_position) edit->search_start = edit->buffer.curs1; } - edit_move_to_prev_col (edit, edit_buffer_get_current_bol (&edit->buffer)); + b = edit_buffer_get_current_bol (&edit->buffer); + edit_move_to_prev_col (edit, b); edit_move_display (edit, line - (WIDGET (edit)->rect.lines / 2)); } @@ -636,7 +645,7 @@ edit_modification (WEdit * edit) edit->caches_valid = FALSE; /* raise lock when file modified */ - if (!edit->modified && !edit->delete_file) + if (edit->modified == 0 && edit->delete_file == 0) edit->locked = lock_file (edit->filename_vpath); edit->modified = 1; } @@ -678,12 +687,12 @@ is_blank (const edit_buffer_t * buf, off_t offset) off_t s, f; s = edit_buffer_get_bol (buf, offset); - f = edit_buffer_get_eol (buf, offset) - 1; - while (s <= f) + f = edit_buffer_get_eol (buf, offset); + for (; s < f; s++) { int c; - c = edit_buffer_get_byte (buf, s++); + c = edit_buffer_get_byte (buf, s); if (!isspace (c)) return FALSE; } @@ -696,7 +705,8 @@ is_blank (const edit_buffer_t * buf, off_t offset) static off_t edit_find_line (WEdit * edit, long line) { - long i, j = 0; + long i; + long j = 0; long m = 2000000000; /* what is the magic number? */ if (!edit->caches_valid) @@ -873,7 +883,10 @@ edit_move_to_bottom (WEdit * edit) static void edit_cursor_to_bol (WEdit * edit) { - edit_cursor_move (edit, edit_buffer_get_current_bol (&edit->buffer) - edit->buffer.curs1); + off_t b; + + b = edit_buffer_get_current_bol (&edit->buffer); + edit_cursor_move (edit, b - edit->buffer.curs1); edit->search_start = edit->buffer.curs1; edit->prev_col = edit_get_col (edit); edit->over_col = 0; @@ -885,7 +898,10 @@ edit_cursor_to_bol (WEdit * edit) static void edit_cursor_to_eol (WEdit * edit) { - edit_cursor_move (edit, edit_buffer_get_current_eol (&edit->buffer) - edit->buffer.curs1); + off_t b; + + b = edit_buffer_get_current_eol (&edit->buffer); + edit_cursor_move (edit, b - edit->buffer.curs1); edit->search_start = edit->buffer.curs1; edit->prev_col = edit_get_col (edit); edit->over_col = 0; @@ -896,8 +912,8 @@ edit_cursor_to_eol (WEdit * edit) static unsigned long my_type_of (int c) { - unsigned long x, r = 0; - const char *p, *q; + unsigned long r = 0; + const char *q; const char chars_move_whole_word[] = "!=&|<>^~ !:;, !'!`!.?!\"!( !) !{ !} !Aa0 !+-*/= |<> ![ !] !\\#! "; @@ -917,16 +933,21 @@ my_type_of (int c) else if (isspace (c)) c = ' '; q = strchr (chars_move_whole_word, c); - if (!q) + if (q == NULL) return 0xFFFFFFFFUL; + do { + unsigned long x; + const char *p; + for (x = 1, p = chars_move_whole_word; p < q; p++) if (*p == '!') x <<= 1; r |= x; } - while ((q = strchr (q + 1, c))); + while ((q = strchr (q + 1, c)) != NULL); + return r; } @@ -948,8 +969,10 @@ edit_left_word_move (WEdit * edit, int s) if (edit->buffer.curs1 == 0) break; c1 = edit_buffer_get_previous_byte (&edit->buffer); + if (c1 == '\n') + break; c2 = edit_buffer_get_current_byte (&edit->buffer); - if (c1 == '\n' || c2 == '\n') + if (c2 == '\n') break; if ((my_type_of (c1) & my_type_of (c2)) == 0) break; @@ -987,8 +1010,10 @@ edit_right_word_move (WEdit * edit, int s) if (edit->buffer.curs1 >= edit->buffer.size) break; c1 = edit_buffer_get_previous_byte (&edit->buffer); + if (c1 == '\n') + break; c2 = edit_buffer_get_current_byte (&edit->buffer); - if (c1 == '\n' || c2 == '\n') + if (c2 == '\n') break; if ((my_type_of (c1) & my_type_of (c2)) == 0) break; @@ -1117,8 +1142,10 @@ edit_right_delete_word (WEdit * edit) int c1, c2; c1 = edit_delete (edit, TRUE); + if (c1 == '\n') + break; c2 = edit_buffer_get_current_byte (&edit->buffer); - if (c1 == '\n' || c2 == '\n') + if (c2 == '\n') break; if ((isspace (c1) == 0) != (isspace (c2) == 0)) break; @@ -1137,8 +1164,10 @@ edit_left_delete_word (WEdit * edit) int c1, c2; c1 = edit_backspace (edit, TRUE); + if (c1 == '\n') + break; c2 = edit_buffer_get_previous_byte (&edit->buffer); - if (c1 == '\n' || c2 == '\n') + if (c2 == '\n') break; if ((isspace (c1) == 0) != (isspace (c2) == 0)) break; @@ -1161,8 +1190,11 @@ edit_do_undo (WEdit * edit) edit->undo_stack_disable = 1; /* don't record undo's onto undo stack! */ edit->over_col = 0; + while ((ac = edit_pop_undo_action (edit)) < KEY_PRESS) { + off_t b; + switch ((int) ac) { case STACK_BOTTOM: @@ -1198,16 +1230,14 @@ edit_do_undo (WEdit * edit) if (ac >= MARK_1 - 2 && ac < MARK_2 - 2) { edit->mark1 = ac - MARK_1; - edit->column1 = - (long) edit_move_forward3 (edit, edit_buffer_get_bol (&edit->buffer, edit->mark1), - 0, edit->mark1); + b = edit_buffer_get_bol (&edit->buffer, edit->mark1); + edit->column1 = (long) edit_move_forward3 (edit, b, 0, edit->mark1); } if (ac >= MARK_2 - 2 && ac < MARK_CURS - 2) { edit->mark2 = ac - MARK_2; - edit->column2 = - (long) edit_move_forward3 (edit, edit_buffer_get_bol (&edit->buffer, edit->mark2), - 0, edit->mark2); + b = edit_buffer_get_bol (&edit->buffer, edit->mark2); + edit->column2 = (long) edit_move_forward3 (edit, b, 0, edit->mark2); } else if (ac >= MARK_CURS - 2 && ac < KEY_PRESS) { @@ -1248,8 +1278,11 @@ edit_do_redo (WEdit * edit) return; edit->over_col = 0; + while ((ac = edit_pop_redo_action (edit)) < KEY_PRESS) { + off_t b; + switch ((int) ac) { case STACK_BOTTOM: @@ -1283,19 +1316,17 @@ edit_do_redo (WEdit * edit) if (ac >= MARK_1 - 2 && ac < MARK_2 - 2) { edit->mark1 = ac - MARK_1; - edit->column1 = - (long) edit_move_forward3 (edit, edit_buffer_get_bol (&edit->buffer, edit->mark1), - 0, edit->mark1); + b = edit_buffer_get_bol (&edit->buffer, edit->mark1); + edit->column1 = (long) edit_move_forward3 (edit, b, 0, edit->mark1); } else if (ac >= MARK_2 - 2 && ac < KEY_PRESS) { edit->mark2 = ac - MARK_2; - edit->column2 = - (long) edit_move_forward3 (edit, edit_buffer_get_bol (&edit->buffer, edit->mark2), - 0, edit->mark2); + b = edit_buffer_get_bol (&edit->buffer, edit->mark2); + edit->column2 = (long) edit_move_forward3 (edit, b, 0, edit->mark2); } /* more than one pop usually means something big */ - if (count++) + if (count++ != 0) edit->force |= REDRAW_PAGE; } @@ -1325,6 +1356,7 @@ edit_group_undo (WEdit * edit) { long ac = KEY_PRESS; long cur_ac = KEY_PRESS; + while (ac != STACK_BOTTOM && ac == cur_ac) { cur_ac = get_prev_undo_action (edit); @@ -1373,7 +1405,8 @@ is_aligned_on_a_tab (WEdit * edit) static gboolean right_of_four_spaces (WEdit * edit) { - int i, ch = 0; + int i; + int ch = 0; for (i = 1; i <= HALF_TAB_SIZE; i++) ch |= edit_buffer_get_byte (&edit->buffer, edit->buffer.curs1 - i); @@ -1441,14 +1474,8 @@ insert_spaces_tab (WEdit * edit, gboolean half) if (half) i /= 2; if (i != 0) - { - i = ((edit->curs_col / i) + 1) * i - edit->curs_col; - while (i > 0) - { + for (i = ((edit->curs_col / i) + 1) * i - edit->curs_col; i > 0; i -= space_width) edit_insert (edit, ' '); - i -= space_width; - } - } } /* --------------------------------------------------------------------------------------------- */ @@ -1608,6 +1635,8 @@ edit_move_block_to_right (WEdit * edit) do { + off_t b; + edit_cursor_move (edit, cur_bol - edit->buffer.curs1); if (!edit_line_is_blank (edit, edit->buffer.curs_line)) { @@ -1615,8 +1644,9 @@ edit_move_block_to_right (WEdit * edit) insert_spaces_tab (edit, edit_options.fake_half_tabs); else edit_insert (edit, '\t'); - edit_cursor_move (edit, - edit_buffer_get_bol (&edit->buffer, cur_bol) - edit->buffer.curs1); + + b = edit_buffer_get_bol (&edit->buffer, cur_bol); + edit_cursor_move (edit, b - edit->buffer.curs1); } if (cur_bol == 0) @@ -1686,10 +1716,10 @@ edit_move_block_to_left (WEdit * edit) static size_t edit_print_string (WEdit * e, const char *s) { - size_t i = 0; + size_t i; - while (s[i] != '\0') - edit_execute_cmd (e, CK_InsertChar, (unsigned char) s[i++]); + for (i = 0; s[i] != '\0'; i++) + edit_execute_cmd (e, CK_InsertChar, (unsigned char) s[i]); e->force |= REDRAW_COMPLETELY; edit_update_screen (e); return i; @@ -1771,10 +1801,10 @@ edit_insert_column_from_file (WEdit * edit, int file, off_t * start_pos, off_t * /** User edit menu, like user menu (F2) but only in editor. */ void -user_menu (WEdit * edit, const char *menu_file, int selected_entry) +edit_user_menu (WEdit * edit, const char *menu_file, int selected_entry) { char *block_file; - gboolean nomark; + gboolean mark; off_t curs; off_t start_mark, end_mark; struct stat status; @@ -1783,27 +1813,27 @@ user_menu (WEdit * edit, const char *menu_file, int selected_entry) block_file = mc_config_get_full_path (EDIT_HOME_BLOCK_FILE); block_file_vpath = vfs_path_from_str (block_file); curs = edit->buffer.curs1; - nomark = !eval_marks (edit, &start_mark, &end_mark); - if (!nomark) + mark = eval_marks (edit, &start_mark, &end_mark); + if (mark) edit_save_block (edit, block_file, start_mark, end_mark); /* run shell scripts from menu */ if (user_menu_cmd (CONST_WIDGET (edit), menu_file, selected_entry) && (mc_stat (block_file_vpath, &status) == 0) && (status.st_size != 0)) { - int rc = 0; + gboolean rc = FALSE; FILE *fd; /* i.e. we have marked block */ - if (!nomark) + if (mark) rc = edit_block_delete_cmd (edit); - if (rc == 0) + if (!rc) { off_t ins_len; ins_len = edit_insert_file (edit, block_file_vpath); - if (!nomark && ins_len > 0) + if (mark && ins_len > 0) edit_set_markers (edit, start_mark, start_mark + ins_len, 0, 0); } /* truncate block file */ @@ -1826,7 +1856,8 @@ edit_get_write_filter (const vfs_path_t * write_name_vpath, const vfs_path_t * f { int i; const char *write_name; - char *p, *write_name_quoted; + char *write_name_quoted; + char *p = NULL; i = edit_find_filter (filename_vpath); if (i < 0) @@ -1834,8 +1865,11 @@ edit_get_write_filter (const vfs_path_t * write_name_vpath, const vfs_path_t * f write_name = vfs_path_get_last_path_str (write_name_vpath); write_name_quoted = name_quote (write_name, FALSE); - p = g_strdup_printf (all_filters[i].write, write_name_quoted); - g_free (write_name_quoted); + if (write_name_quoted != NULL) + { + p = g_strdup_printf (all_filters[i].write, write_name_quoted); + g_free (write_name_quoted); + } return p; } @@ -1949,7 +1983,7 @@ edit_write_stream (WEdit * edit, FILE * f) gboolean is_break_char (char c) { - return (isspace (c) || strchr ("{}[]()<>=|/\\!?~-+`'\",.;:#$%^&*", c)); + return (isspace (c) || strchr ("{}[]()<>=|/\\!?~-+`'\",.;:#$%^&*", c) != NULL); } /* --------------------------------------------------------------------------------------------- */ @@ -2005,7 +2039,7 @@ edit_insert_file (WEdit * edit, const vfs_path_t * filename_vpath) { int file; off_t blocklen; - int vertical_insertion = 0; + gboolean vertical_insertion = FALSE; char *buf; file = mc_open (filename_vpath, O_RDONLY | O_BINARY); @@ -2018,7 +2052,7 @@ edit_insert_file (WEdit * edit, const vfs_path_t * filename_vpath) { /* if contain signature VERTICAL_MAGIC then it vertical block */ if (memcmp (buf, VERTICAL_MAGIC, sizeof (VERTICAL_MAGIC)) == 0) - vertical_insertion = 1; + vertical_insertion = TRUE; else mc_lseek (file, 0, SEEK_SET); } @@ -2376,6 +2410,7 @@ edit_push_undo_action (WEdit * edit, long c) && ((sp - 2) & edit->undo_stack_size_mask) != edit->undo_stack_bottom) { long d; + if (edit->undo_stack[spm1] < 0) { d = edit->undo_stack[(sp - 2) & edit->undo_stack_size_mask]; @@ -2456,6 +2491,7 @@ edit_push_redo_action (WEdit * edit, long c) && ((sp - 2) & edit->redo_stack_size_mask) != edit->redo_stack_bottom) { long d; + if (edit->redo_stack[spm1] < 0) { d = edit->redo_stack[(sp - 2) & edit->redo_stack_size_mask]; @@ -2847,8 +2883,10 @@ edit_get_cursor_offset (const WEdit * edit) long edit_get_col (const WEdit * edit) { - return (long) edit_move_forward3 (edit, edit_buffer_get_current_bol (&edit->buffer), 0, - edit->buffer.curs1); + off_t b; + + b = edit_buffer_get_current_bol (&edit->buffer); + return (long) edit_move_forward3 (edit, b, 0, edit->buffer.curs1); } /* --------------------------------------------------------------------------------------------- */ @@ -2866,8 +2904,10 @@ edit_update_curs_row (WEdit * edit) void edit_update_curs_col (WEdit * edit) { - edit->curs_col = (long) edit_move_forward3 (edit, edit_buffer_get_current_bol (&edit->buffer), - 0, edit->buffer.curs1); + off_t b; + + b = edit_buffer_get_current_bol (&edit->buffer); + edit->curs_col = (long) edit_move_forward3 (edit, b, 0, edit->buffer.curs1); } /* --------------------------------------------------------------------------------------------- */ @@ -2899,7 +2939,6 @@ edit_scroll_upward (WEdit * edit, long i) edit_update_curs_row (edit); } - /* --------------------------------------------------------------------------------------------- */ void @@ -2955,16 +2994,19 @@ edit_move_to_prev_col (WEdit * edit, off_t p) { long prev = edit->prev_col; long over = edit->over_col; + off_t b; edit_cursor_move (edit, edit_move_forward3 (edit, p, prev + edit->over_col, 0) - edit->buffer.curs1); if (edit_options.cursor_beyond_eol) { + off_t e; long line_len; - line_len = (long) edit_move_forward3 (edit, edit_buffer_get_current_bol (&edit->buffer), 0, - edit_buffer_get_current_eol (&edit->buffer)); + b = edit_buffer_get_current_bol (&edit->buffer); + e = edit_buffer_get_current_eol (&edit->buffer); + line_len = (long) edit_move_forward3 (edit, b, 0, e); if (line_len < prev + edit->over_col) { edit->over_col = prev + over - line_len; @@ -2973,9 +3015,9 @@ edit_move_to_prev_col (WEdit * edit, off_t p) } else { - edit->curs_col = prev + over; - edit->prev_col = edit->curs_col; edit->over_col = 0; + edit->prev_col = edit->curs_col; + edit->curs_col = prev + over; } } else @@ -2995,12 +3037,13 @@ edit_move_to_prev_col (WEdit * edit, off_t p) q = edit->curs_col; edit->curs_col -= (edit->curs_col % fake_half_tabs); p = edit_buffer_get_current_bol (&edit->buffer); - edit_cursor_move (edit, - edit_move_forward3 (edit, p, edit->curs_col, - 0) - edit->buffer.curs1); + b = edit_move_forward3 (edit, p, edit->curs_col, 0); + edit_cursor_move (edit, b - edit->buffer.curs1); if (!left_of_four_spaces (edit)) - edit_cursor_move (edit, - edit_move_forward3 (edit, p, q, 0) - edit->buffer.curs1); + { + b = edit_move_forward3 (edit, p, q, 0); + edit_cursor_move (edit, b - edit->buffer.curs1); + } } } } @@ -3068,6 +3111,71 @@ edit_set_markers (WEdit * edit, off_t m1, off_t m2, long c1, long c2) edit->column2 = c2; } +/* --------------------------------------------------------------------------------------------- */ +/** + if mark2 is -1 then marking is from mark1 to the cursor. + Otherwise its between the markers. This handles this. + Returns FALSE if no text is marked. + */ + +gboolean +eval_marks (WEdit * edit, off_t * start_mark, off_t * end_mark) +{ + long end_mark_curs; + + if (edit->mark1 == edit->mark2) + { + *start_mark = *end_mark = 0; + edit->column2 = edit->column1 = 0; + return FALSE; + } + + if (edit->end_mark_curs < 0) + end_mark_curs = edit->buffer.curs1; + else + end_mark_curs = edit->end_mark_curs; + + if (edit->mark2 >= 0) + { + *start_mark = MIN (edit->mark1, edit->mark2); + *end_mark = MAX (edit->mark1, edit->mark2); + } + else + { + *start_mark = MIN (edit->mark1, end_mark_curs); + *end_mark = MAX (edit->mark1, end_mark_curs); + edit->column2 = edit->curs_col + edit->over_col; + } + + if (edit->column_highlight + && ((edit->mark1 > end_mark_curs && edit->column1 < edit->column2) + || (edit->mark1 < end_mark_curs && edit->column1 > edit->column2))) + { + off_t start_bol, start_eol; + off_t end_bol, end_eol; + long col1, col2; + off_t diff1, diff2; + + start_bol = edit_buffer_get_bol (&edit->buffer, *start_mark); + start_eol = edit_buffer_get_eol (&edit->buffer, start_bol - 1) + 1; + end_bol = edit_buffer_get_bol (&edit->buffer, *end_mark); + end_eol = edit_buffer_get_eol (&edit->buffer, *end_mark); + col1 = MIN (edit->column1, edit->column2); + col2 = MAX (edit->column1, edit->column2); + + diff1 = edit_move_forward3 (edit, start_bol, col2, 0) - + edit_move_forward3 (edit, start_bol, col1, 0); + diff2 = edit_move_forward3 (edit, end_bol, col2, 0) - + edit_move_forward3 (edit, end_bol, col1, 0); + + *start_mark -= diff1; + *end_mark += diff2; + *start_mark = MAX (*start_mark, start_eol); + *end_mark = MIN (*end_mark, end_eol); + } + + return TRUE; +} /* --------------------------------------------------------------------------------------------- */ /** highlight marker toggle */ @@ -3363,7 +3471,6 @@ edit_execute_cmd (WEdit * edit, long command, int char_for_insertion) if (!mc_global.utf8_display || edit->charpoint == 0) #endif if (edit_buffer_get_current_byte (&edit->buffer) != '\n') - edit_delete (edit, FALSE); } if (edit_options.cursor_beyond_eol && edit->over_col > 0) @@ -3377,7 +3484,7 @@ edit_execute_cmd (WEdit * edit, long command, int char_for_insertion) && !mc_global.utf8_display) { unsigned char str[UTF8_CHAR_LEN + 1]; - size_t i = 0; + size_t i; int res; res = g_unichar_to_utf8 (char_for_insertion, (char *) str); @@ -3387,14 +3494,12 @@ edit_execute_cmd (WEdit * edit, long command, int char_for_insertion) str[1] = '\0'; } else - { str[res] = '\0'; - } - while (i <= UTF8_CHAR_LEN && str[i] != '\0') + + for (i = 0; i <= UTF8_CHAR_LEN && str[i] != '\0'; i++) { char_for_insertion = str[i]; edit_insert (edit, char_for_insertion); - i++; } } else @@ -3919,7 +4024,7 @@ edit_execute_cmd (WEdit * edit, long command, int char_for_insertion) edit_goto_matching_bracket (edit); break; case CK_UserMenu: - user_menu (edit, NULL, -1); + edit_user_menu (edit, NULL, -1); break; case CK_Sort: edit_sort_cmd (edit); diff --git a/mcsrc/src/editor/editbuffer.c b/mcsrc/src/editor/editbuffer.c index 24bc7eea..acc776ae 100644 --- a/mcsrc/src/editor/editbuffer.c +++ b/mcsrc/src/editor/editbuffer.c @@ -1,7 +1,7 @@ /* Editor text keep buffer. - Copyright (C) 2013-2023 + Copyright (C) 2013-2024 Free Software Foundation, Inc. Written by: diff --git a/mcsrc/src/editor/editcmd.c b/mcsrc/src/editor/editcmd.c index 76e54605..20f1e395 100644 --- a/mcsrc/src/editor/editcmd.c +++ b/mcsrc/src/editor/editcmd.c @@ -1,7 +1,7 @@ /* Editor high level editing commands - Copyright (C) 1996-2023 + Copyright (C) 1996-2024 Free Software Foundation, Inc. Written by: @@ -479,22 +479,23 @@ edit_save_cmd (WEdit * edit) /* --------------------------------------------------------------------------------------------- */ static void -edit_delete_column_of_text (WEdit * edit) +edit_delete_column_of_text (WEdit * edit, off_t m1, off_t m2) { - off_t m1, m2; off_t n; + off_t r; long b, c, d; - eval_marks (edit, &m1, &m2); n = edit_buffer_get_forward_offset (&edit->buffer, m1, 0, m2) + 1; - c = (long) edit_move_forward3 (edit, edit_buffer_get_bol (&edit->buffer, m1), 0, m1); - d = (long) edit_move_forward3 (edit, edit_buffer_get_bol (&edit->buffer, m2), 0, m2); + r = edit_buffer_get_bol (&edit->buffer, m1); + c = (long) edit_move_forward3 (edit, r, 0, m1); + r = edit_buffer_get_bol (&edit->buffer, m2); + d = (long) edit_move_forward3 (edit, r, 0, m2); b = MAX (MIN (c, d), MIN (edit->column1, edit->column2)); c = MAX (c, MAX (edit->column1, edit->column2)); while (n-- != 0) { - off_t r, p, q; + off_t p, q; r = edit_buffer_get_current_bol (&edit->buffer); p = edit_move_forward3 (edit, r, b, 0); @@ -509,25 +510,22 @@ edit_delete_column_of_text (WEdit * edit) /* move to next line except on the last delete */ if (n != 0) - edit_cursor_move (edit, - edit_buffer_get_forward_offset (&edit->buffer, edit->buffer.curs1, 1, - 0) - edit->buffer.curs1); + { + r = edit_buffer_get_forward_offset (&edit->buffer, edit->buffer.curs1, 1, 0); + edit_cursor_move (edit, r - edit->buffer.curs1); + } } } /* --------------------------------------------------------------------------------------------- */ -/** if success return 0 */ +/** if success return TRUE */ -static int -edit_block_delete (WEdit * edit) +static gboolean +edit_block_delete (WEdit * edit, off_t start_mark, off_t end_mark) { - off_t start_mark, end_mark; off_t curs_pos; long curs_line, c1, c2; - if (!eval_marks (edit, &start_mark, &end_mark)) - return 0; - if (edit->column_highlight && edit->mark2 < 0) edit_mark_cmd (edit, FALSE); @@ -536,7 +534,7 @@ edit_block_delete (WEdit * edit) edit_query_dialog2 (_("Warning"), ("Block is large, you may not be able to undo this action"), _("C&ontinue"), _("&Cancel")) != 0) - return 1; + return FALSE; c1 = MIN (edit->column1, edit->column2); c2 = MAX (edit->column1, edit->column2); @@ -557,16 +555,18 @@ edit_block_delete (WEdit * edit) { if (edit->column_highlight) { + off_t b, e; off_t line_width; if (edit->mark2 < 0) edit_mark_cmd (edit, FALSE); - edit_delete_column_of_text (edit); + edit_delete_column_of_text (edit, start_mark, end_mark); /* move cursor to the saved position */ edit_move_to_line (edit, curs_line); /* calculate line width and cursor position before cut */ - line_width = edit_move_forward3 (edit, edit_buffer_get_current_bol (&edit->buffer), 0, - edit_buffer_get_current_eol (&edit->buffer)); + b = edit_buffer_get_current_bol (&edit->buffer); + e = edit_buffer_get_current_eol (&edit->buffer); + line_width = edit_move_forward3 (edit, b, 0, e); if (edit_options.cursor_beyond_eol && curs_pos > line_width) edit->over_col = curs_pos - line_width; } @@ -582,7 +582,7 @@ edit_block_delete (WEdit * edit) edit_set_markers (edit, 0, 0, 0, 0); edit->force |= REDRAW_PAGE; - return 0; + return TRUE; } /* --------------------------------------------------------------------------------------------- */ @@ -605,7 +605,8 @@ edit_get_block (WEdit * edit, off_t start, off_t finish, off_t * l) int c; off_t x; - x = edit_move_forward3 (edit, edit_buffer_get_bol (&edit->buffer, start), 0, start); + x = edit_buffer_get_bol (&edit->buffer, start); + x = edit_move_forward3 (edit, x, 0, start); c = edit_buffer_get_byte (&edit->buffer, start); if ((x >= edit->column1 && x < edit->column2) || (x >= edit->column2 && x < edit->column1) || c == '\n') @@ -650,15 +651,28 @@ static void pipe_mail (const edit_buffer_t * buf, char *to, char *subject, char *cc) { FILE *p = 0; - char *s; + char *s = NULL; to = name_quote (to, FALSE); - subject = name_quote (subject, FALSE); - cc = name_quote (cc, FALSE); - s = g_strconcat ("mail -s ", subject, *cc ? " -c " : "", cc, " ", to, (char *) NULL); - g_free (to); - g_free (subject); - g_free (cc); + if (to != NULL) + { + subject = name_quote (subject, FALSE); + if (subject != NULL) + { + cc = name_quote (cc, FALSE); + if (cc == NULL) + s = g_strdup_printf ("mail -s %s %s", subject, to); + else + { + s = g_strdup_printf ("mail -s %s -c %s %s", subject, cc, to); + g_free (cc); + } + + g_free (subject); + } + + g_free (to); + } if (s != NULL) { @@ -1289,72 +1303,6 @@ edit_close_cmd (WEdit * edit) return ret; } -/* --------------------------------------------------------------------------------------------- */ -/** - if mark2 is -1 then marking is from mark1 to the cursor. - Otherwise its between the markers. This handles this. - Returns FALSE if no text is marked. - */ - -gboolean -eval_marks (WEdit * edit, off_t * start_mark, off_t * end_mark) -{ - long end_mark_curs; - - if (edit->mark1 == edit->mark2) - { - *start_mark = *end_mark = 0; - edit->column2 = edit->column1 = 0; - return FALSE; - } - - if (edit->end_mark_curs < 0) - end_mark_curs = edit->buffer.curs1; - else - end_mark_curs = edit->end_mark_curs; - - if (edit->mark2 >= 0) - { - *start_mark = MIN (edit->mark1, edit->mark2); - *end_mark = MAX (edit->mark1, edit->mark2); - } - else - { - *start_mark = MIN (edit->mark1, end_mark_curs); - *end_mark = MAX (edit->mark1, end_mark_curs); - edit->column2 = edit->curs_col + edit->over_col; - } - - if (edit->column_highlight - && ((edit->mark1 > end_mark_curs && edit->column1 < edit->column2) - || (edit->mark1 < end_mark_curs && edit->column1 > edit->column2))) - { - off_t start_bol, start_eol; - off_t end_bol, end_eol; - long col1, col2; - off_t diff1, diff2; - - start_bol = edit_buffer_get_bol (&edit->buffer, *start_mark); - start_eol = edit_buffer_get_eol (&edit->buffer, start_bol - 1) + 1; - end_bol = edit_buffer_get_bol (&edit->buffer, *end_mark); - end_eol = edit_buffer_get_eol (&edit->buffer, *end_mark); - col1 = MIN (edit->column1, edit->column2); - col2 = MAX (edit->column1, edit->column2); - - diff1 = edit_move_forward3 (edit, start_bol, col2, 0) - - edit_move_forward3 (edit, start_bol, col1, 0); - diff2 = edit_move_forward3 (edit, end_bol, col2, 0) - - edit_move_forward3 (edit, end_bol, col1, 0); - - *start_mark -= diff1; - *end_mark += diff2; - *start_mark = MAX (*start_mark, start_eol); - *end_mark = MIN (*end_mark, end_eol); - } - - return TRUE; -} - /* --------------------------------------------------------------------------------------------- */ void @@ -1432,6 +1380,7 @@ edit_block_move_cmd (WEdit * edit) off_t size; long c1, c2, b_width; long x, x2; + off_t b1, b2; c1 = MIN (edit->column1, edit->column2); c2 = MAX (edit->column1, edit->column2); @@ -1443,8 +1392,9 @@ edit_block_move_cmd (WEdit * edit) x2 = x + edit->over_col; /* do nothing when cursor inside first line of selected area */ - if ((edit_buffer_get_eol (&edit->buffer, edit->buffer.curs1) == - edit_buffer_get_eol (&edit->buffer, start_mark)) && x2 > c1 && x2 <= c2) + b1 = edit_buffer_get_eol (&edit->buffer, edit->buffer.curs1); + b2 = edit_buffer_get_eol (&edit->buffer, start_mark); + if (b1 == b2 && x2 > c1 && x2 <= c2) return; if (edit->buffer.curs1 > start_mark @@ -1463,7 +1413,8 @@ edit_block_move_cmd (WEdit * edit) edit->over_col = MAX (0, edit->over_col - b_width); /* calculate the cursor pos after delete block */ - current = edit_move_forward3 (edit, edit_buffer_get_current_bol (&edit->buffer), x, 0); + b1 = edit_buffer_get_current_bol (&edit->buffer); + current = edit_move_forward3 (edit, b1, x, 0); edit_cursor_move (edit, current - edit->buffer.curs1); edit_scroll_screen_over_cursor (edit); @@ -1477,6 +1428,7 @@ edit_block_move_cmd (WEdit * edit) else { off_t count, count_orig; + off_t x; current = edit->buffer.curs1; copy_buf = g_malloc0 (end_mark - start_mark); @@ -1487,9 +1439,8 @@ edit_block_move_cmd (WEdit * edit) copy_buf[end_mark - count - 1] = edit_delete (edit, TRUE); edit_scroll_screen_over_cursor (edit); - edit_cursor_move (edit, - current - edit->buffer.curs1 - - (((current - edit->buffer.curs1) > 0) ? end_mark - start_mark : 0)); + x = current > edit->buffer.curs1 ? end_mark - start_mark : 0; + edit_cursor_move (edit, current - edit->buffer.curs1 - x); edit_scroll_screen_over_cursor (edit); count_orig = count; while (count-- > start_mark) @@ -1509,19 +1460,19 @@ edit_block_move_cmd (WEdit * edit) } /* --------------------------------------------------------------------------------------------- */ -/** returns 1 if canceelled by user */ +/** returns FALSE if canceelled by user */ -int +gboolean edit_block_delete_cmd (WEdit * edit) { off_t start_mark, end_mark; if (eval_marks (edit, &start_mark, &end_mark)) - return edit_block_delete (edit); + return edit_block_delete (edit, start_mark, end_mark); edit_delete_line (edit); - return 0; + return TRUE; } /* --------------------------------------------------------------------------------------------- */ @@ -1893,7 +1844,7 @@ edit_sort_cmd (WEdit * edit) edit->force |= REDRAW_COMPLETELY; - if (edit_block_delete_cmd (edit)) + if (!edit_block_delete_cmd (edit)) return 1; { @@ -1968,7 +1919,7 @@ edit_block_process_cmd (WEdit * edit, int macro_number) fname = g_strdup_printf ("%s.%i.sh", EDIT_HOME_MACRO_FILE, macro_number); macros_fname = g_build_filename (mc_config_get_data_path (), fname, (char *) NULL); - user_menu (edit, macros_fname, 0); + edit_user_menu (edit, macros_fname, 0); g_free (fname); g_free (macros_fname); edit->force |= REDRAW_COMPLETELY; @@ -1993,8 +1944,8 @@ edit_mail_dialog (WEdit * edit) INPUT_LAST_TEXT, "mail-dlg-input-3", &mail_to, NULL, FALSE, FALSE, INPUT_COMPLETE_USERNAMES), QUICK_LABELED_INPUT (N_("Subject"), input_label_above, - INPUT_LAST_TEXT, "mail-dlg-input-2", - &mail_subject, NULL, FALSE, FALSE, INPUT_COMPLETE_NONE), + INPUT_LAST_TEXT, "mail-dlg-input-2", + &mail_subject, NULL, FALSE, FALSE, INPUT_COMPLETE_NONE), QUICK_LABELED_INPUT (N_("Copies to"), input_label_above, INPUT_LAST_TEXT, "mail-dlg-input", &mail_cc, NULL, FALSE, FALSE, INPUT_COMPLETE_USERNAMES), diff --git a/mcsrc/src/editor/editcomplete.c b/mcsrc/src/editor/editcomplete.c index 06f304dc..f3ea0e78 100644 --- a/mcsrc/src/editor/editcomplete.c +++ b/mcsrc/src/editor/editcomplete.c @@ -1,7 +1,7 @@ /* Editor word completion engine - Copyright (C) 2021-2023 + Copyright (C) 2021-2024 Free Software Foundation, Inc. Written by: diff --git a/mcsrc/src/editor/editdraw.c b/mcsrc/src/editor/editdraw.c index 2a56b707..c0fd1ab6 100644 --- a/mcsrc/src/editor/editdraw.c +++ b/mcsrc/src/editor/editdraw.c @@ -1,7 +1,7 @@ /* Editor text drawing. - Copyright (C) 1996-2023 + Copyright (C) 1996-2024 Free Software Foundation, Inc. Written by: @@ -449,7 +449,6 @@ print_to_widget (WEdit * edit, long row, int start_col, int start_col_real, { int style; unsigned int textchar; - int color; if (cols_to_skip != 0) { @@ -459,8 +458,6 @@ print_to_widget (WEdit * edit, long row, int start_col, int start_col_real, style = p->style & 0xFF00; textchar = p->ch; - /* If non-printable - use black background */ - color = (style & MOD_ABNORMAL) != 0 ? 0 : p->style >> 16; if ((style & MOD_WHITESPACE) != 0) { @@ -476,8 +473,10 @@ print_to_widget (WEdit * edit, long row, int start_col, int start_col_real, tty_setcolor (EDITOR_BOLD_COLOR); else if ((style & MOD_MARKED) != 0) tty_setcolor (EDITOR_MARKED_COLOR); + else if ((style & MOD_ABNORMAL) != 0) + tty_setcolor (EDITOR_NONPRINTABLE_COLOR); else - tty_lowlevel_setcolor (color); + tty_lowlevel_setcolor (p->style >> 16); if (edit_options.show_right_margin) { @@ -952,9 +951,8 @@ render_edit_text (WEdit * edit, long start_row, long start_column, long end_row, if ((force & REDRAW_LINE_ABOVE) != 0 && curs_row >= 1) { row = curs_row - 1; - b = edit_buffer_get_backward_offset (&edit->buffer, - edit_buffer_get_current_bol (&edit->buffer), - 1); + b = edit_buffer_get_current_bol (&edit->buffer); + b = edit_buffer_get_backward_offset (&edit->buffer, b, 1); if (row >= start_row && row <= end_row) { if (key_pending (edit)) diff --git a/mcsrc/src/editor/editmacros.c b/mcsrc/src/editor/editmacros.c index f5e3bb83..5a23fd6d 100644 --- a/mcsrc/src/editor/editmacros.c +++ b/mcsrc/src/editor/editmacros.c @@ -1,7 +1,7 @@ /* Editor macros engine - Copyright (C) 2001-2023 + Copyright (C) 2001-2024 Free Software Foundation, Inc. This file is part of the Midnight Commander. diff --git a/mcsrc/src/editor/editmenu.c b/mcsrc/src/editor/editmenu.c index 55590d75..128d5183 100644 --- a/mcsrc/src/editor/editmenu.c +++ b/mcsrc/src/editor/editmenu.c @@ -1,7 +1,7 @@ /* Editor menu definitions and initialisation - Copyright (C) 1996-2023 + Copyright (C) 1996-2024 Free Software Foundation, Inc. Written by: diff --git a/mcsrc/src/editor/editoptions.c b/mcsrc/src/editor/editoptions.c index 75b31535..965c60ca 100644 --- a/mcsrc/src/editor/editoptions.c +++ b/mcsrc/src/editor/editoptions.c @@ -1,7 +1,7 @@ /* Editor options dialog box - Copyright (C) 1996-2023 + Copyright (C) 1996-2024 Free Software Foundation, Inc. Written by: @@ -174,7 +174,8 @@ edit_options_dialog (WDialog * h) QUICK_CHECKBOX (N_("&Visible trailing spaces"), &edit_options.visible_tws, NULL), QUICK_CHECKBOX (N_("Visible &tabs"), &edit_options.visible_tabs, NULL), QUICK_CHECKBOX (N_("Synta&x highlighting"), &edit_options.syntax_highlighting, NULL), - QUICK_CHECKBOX (N_("C&ursor after inserted block"), &edit_options.cursor_after_inserted_block, NULL), + QUICK_CHECKBOX (N_("C&ursor after inserted block"), + &edit_options.cursor_after_inserted_block, NULL), QUICK_CHECKBOX (N_("Pers&istent selection"), &edit_options.persistent_selections, NULL), QUICK_CHECKBOX (N_("Cursor be&yond end of line"), &edit_options.cursor_beyond_eol, NULL), QUICK_CHECKBOX (N_("&Group undo"), &edit_options.group_undo, NULL), diff --git a/mcsrc/src/editor/editsearch.c b/mcsrc/src/editor/editsearch.c index fe239419..be80d6b4 100644 --- a/mcsrc/src/editor/editsearch.c +++ b/mcsrc/src/editor/editsearch.c @@ -1,7 +1,7 @@ /* Search & replace engine of MCEditor. - Copyright (C) 2021-2023 + Copyright (C) 2021-2024 Free Software Foundation, Inc. Written by: @@ -29,7 +29,7 @@ #include "lib/global.h" #include "lib/search.h" -#include "lib/mcconfig.h" /* mc_config_history_get */ +#include "lib/mcconfig.h" /* mc_config_history_get_recent_item() */ #ifdef HAVE_CHARSET #include "lib/charsets.h" /* cp_source */ #endif @@ -336,8 +336,8 @@ edit_dialog_replace_prompt_show (WEdit * edit, char *from_text, char *to_text, i #if defined(WIN32) //WIN32, quick qc = XQUICK_LABEL (qc, repl_from, NULL); qc = XQUICK_LABEL (qc, N_("Replace with:"), NULL); - qc = XQUICK_LABEL (qc, repl_to, NULL); - qc = XQUICK_START_BUTTONS (qc, TRUE, TRUE); + qc = XQUICK_LABEL (qc, repl_to, NULL); + qc = XQUICK_START_BUTTONS (qc, TRUE, TRUE); qc = XQUICK_BUTTON (qc, N_("&Replace"), B_ENTER, NULL, NULL); qc = XQUICK_BUTTON (qc, N_("A&ll"), B_REPLACE_ALL, NULL, NULL); qc = XQUICK_BUTTON (qc, N_("&Skip"), B_SKIP_REPLACE, NULL, NULL); @@ -865,16 +865,12 @@ edit_search_cmd (WEdit * edit, gboolean again) else { /* find last search string in history */ - GList *history; + char *s; - history = mc_config_history_get (MC_HISTORY_SHARED_SEARCH); - if (history != NULL) + s = mc_config_history_get_recent_item (MC_HISTORY_SHARED_SEARCH); + if (s != NULL) { - /* FIXME: is it possible that history->data == NULL? */ - edit->last_search_string = (char *) history->data; - history->data = NULL; - history = g_list_first (history); - g_list_free_full (history, g_free); + edit->last_search_string = s; if (edit_search_init (edit, edit->last_search_string)) { @@ -962,7 +958,8 @@ edit_replace_cmd (WEdit * edit, gboolean again) edit->search = NULL; } - input2_str = g_string_new (input2); + input2_str = g_string_new_take (input2); + input2 = NULL; if (edit->search == NULL) { diff --git a/mcsrc/src/editor/editwidget.c b/mcsrc/src/editor/editwidget.c index 1b2312f4..86cff63a 100644 --- a/mcsrc/src/editor/editwidget.c +++ b/mcsrc/src/editor/editwidget.c @@ -1,7 +1,7 @@ /* Editor initialisation and callback handler. - Copyright (C) 1996-2023 + Copyright (C) 1996-2024 Free Software Foundation, Inc. Written by: @@ -156,7 +156,7 @@ edit_about (void) QUICK_LABEL (N_("A user friendly text editor\n" "written for the Midnight Commander."), NULL), QUICK_SEPARATOR (FALSE), - QUICK_LABEL (N_("Copyright (C) 1996-2023 the Free Software Foundation"), NULL), + QUICK_LABEL (N_("Copyright (C) 1996-2024 the Free Software Foundation"), NULL), QUICK_START_BUTTONS (TRUE, TRUE), QUICK_BUTTON (N_("&OK"), B_ENTER, NULL, NULL), QUICK_END @@ -178,7 +178,7 @@ edit_about (void) qc = XQUICK_LABEL (qc, N_("A user friendly text editor\n" "written for the Midnight Commander."), NULL), qc = XQUICK_SEPARATOR (qc, FALSE), - qc = XQUICK_LABEL (qc, N_("Copyright (C) 1996-2023 the Free Software Foundation"), NULL), + qc = XQUICK_LABEL (qc, N_("Copyright (C) 1996-2024 the Free Software Foundation"), NULL), qc = XQUICK_START_BUTTONS (qc, TRUE, TRUE), qc = XQUICK_BUTTON (qc, N_("&OK"), B_ENTER, NULL, NULL), qc = XQUICK_END (qc); @@ -202,9 +202,10 @@ edit_about (void) */ static void -edit_help (void) +edit_help (const WDialog * h) { - ev_help_t event_data = { NULL, "[Internal File Editor]" }; + ev_help_t event_data = { NULL, h->help_ctx }; + mc_event_raise (MCEVENT_GROUP_CORE, "help", &event_data); } @@ -446,8 +447,7 @@ edit_dialog_command_execute (WDialog * h, long command) dlg_close (h); break; case CK_Help: - edit_help (); - /* edit->force |= REDRAW_COMPLETELY; */ + edit_help (h); break; case CK_Menu: edit_menu_cmd (h); diff --git a/mcsrc/src/editor/etags.c b/mcsrc/src/editor/etags.c index 7b570d69..ddc5ca8d 100644 --- a/mcsrc/src/editor/etags.c +++ b/mcsrc/src/editor/etags.c @@ -6,7 +6,7 @@ or, if etags utility not installed: $ find . -type f -name "*.[ch]" | ctags --c-kinds=+p --fields=+iaS --extra=+q -e -L- - Copyright (C) 2009-2023 + Copyright (C) 2009-2024 Free Software Foundation, Inc. Written by: diff --git a/mcsrc/src/editor/format.c b/mcsrc/src/editor/format.c index 31930679..9dc5d72d 100644 --- a/mcsrc/src/editor/format.c +++ b/mcsrc/src/editor/format.c @@ -1,7 +1,7 @@ /* Dynamic paragraph formatting. - Copyright (C) 2011-2023 + Copyright (C) 2011-2024 Free Software Foundation, Inc. Copyright (C) 1996 Paul Sheer diff --git a/mcsrc/src/editor/spell.c b/mcsrc/src/editor/spell.c index aa9153fb..eff8c472 100644 --- a/mcsrc/src/editor/spell.c +++ b/mcsrc/src/editor/spell.c @@ -1,7 +1,7 @@ /* Editor spell checker - Copyright (C) 2012-2023 + Copyright (C) 2012-2024 Free Software Foundation, Inc. Written by: diff --git a/mcsrc/src/editor/syntax.c b/mcsrc/src/editor/syntax.c index 30d71f4a..de24457f 100644 --- a/mcsrc/src/editor/syntax.c +++ b/mcsrc/src/editor/syntax.c @@ -1,7 +1,7 @@ /* Editor syntax highlighting. - Copyright (C) 1996-2023 + Copyright (C) 1996-2024 Free Software Foundation, Inc. Written by: @@ -248,7 +248,8 @@ compare_word_to_right (const WEdit * edit, off_t i, const GString * text, const unsigned char *p, *q; int c, d, j; - c = xx_tolower (edit, edit_buffer_get_byte (&edit->buffer, i - 1)); + c = edit_buffer_get_byte (&edit->buffer, i - 1); + c = xx_tolower (edit, c); if ((line_start && c != '\n') || (whole_left != NULL && strchr (whole_left, c) != NULL)) return -1; @@ -261,7 +262,8 @@ compare_word_to_right (const WEdit * edit, off_t i, const GString * text, return -1; while (TRUE) { - c = xx_tolower (edit, edit_buffer_get_byte (&edit->buffer, i)); + c = edit_buffer_get_byte (&edit->buffer, i); + c = xx_tolower (edit, c); if (*p == '\0' && whole_right != NULL && strchr (whole_right, c) == NULL) break; if (c == *p) @@ -277,7 +279,8 @@ compare_word_to_right (const WEdit * edit, off_t i, const GString * text, j = 0; while (TRUE) { - c = xx_tolower (edit, edit_buffer_get_byte (&edit->buffer, i)); + c = edit_buffer_get_byte (&edit->buffer, i); + c = xx_tolower (edit, c); if (c == *p) { j = i; @@ -308,7 +311,8 @@ compare_word_to_right (const WEdit * edit, off_t i, const GString * text, while (TRUE) { d = c; - c = xx_tolower (edit, edit_buffer_get_byte (&edit->buffer, i)); + c = edit_buffer_get_byte (&edit->buffer, i); + c = xx_tolower (edit, c); for (j = 0; p[j] != SYNTAX_TOKEN_BRACKET && p[j] != '\0'; j++) if (c == p[j]) goto found_char2; @@ -327,7 +331,8 @@ compare_word_to_right (const WEdit * edit, off_t i, const GString * text, case SYNTAX_TOKEN_BRACE: if (++p > q) return -1; - c = xx_tolower (edit, edit_buffer_get_byte (&edit->buffer, i)); + c = edit_buffer_get_byte (&edit->buffer, i); + c = xx_tolower (edit, c); for (; *p != SYNTAX_TOKEN_BRACE && *p != '\0'; p++) if (c == *p) goto found_char3; @@ -337,13 +342,18 @@ compare_word_to_right (const WEdit * edit, off_t i, const GString * text, p++; break; default: - if (*p != xx_tolower (edit, edit_buffer_get_byte (&edit->buffer, i))) + c = edit_buffer_get_byte (&edit->buffer, i); + if (*p != xx_tolower (edit, c)) return -1; } } - return (whole_right != NULL && - strchr (whole_right, - xx_tolower (edit, edit_buffer_get_byte (&edit->buffer, i))) != NULL) ? -1 : i; + + if (whole_right == NULL) + return i; + + c = edit_buffer_get_byte (&edit->buffer, i); + c = xx_tolower (edit, c); + return strchr (whole_right, c) != NULL ? -1 : i; } /* --------------------------------------------------------------------------------------------- */ @@ -371,7 +381,8 @@ apply_rules_going_right (WEdit * edit, off_t i) off_t end = 0; edit_syntax_rule_t _rule = edit->rule; - c = xx_tolower (edit, edit_buffer_get_byte (&edit->buffer, i)); + c = edit_buffer_get_byte (&edit->buffer, i); + c = xx_tolower (edit, c); if (c == 0) return; @@ -801,44 +812,44 @@ get_args (char *l, char **args, int args_size) /* --------------------------------------------------------------------------------------------- */ static int -this_try_alloc_color_pair (const char *fg, const char *bg, const char *attrs) +this_try_alloc_color_pair (tty_color_pair_t * color) { char f[80], b[80], a[80], *p; - if (bg != NULL && *bg == '\0') - bg = NULL; - if (fg != NULL && *fg == '\0') - fg = NULL; - if (attrs != NULL && *attrs == '\0') - attrs = NULL; + if (color->bg != NULL && *color->bg == '\0') + color->bg = NULL; + if (color->fg != NULL && *color->fg == '\0') + color->fg = NULL; + if (color->attrs != NULL && *color->attrs == '\0') + color->attrs = NULL; - if ((fg == NULL) && (bg == NULL)) + if (color->fg == NULL && color->bg == NULL) return EDITOR_NORMAL_COLOR; - if (fg != NULL) + if (color->fg != NULL) { - g_strlcpy (f, fg, sizeof (f)); + g_strlcpy (f, color->fg, sizeof (f)); p = strchr (f, '/'); if (p != NULL) *p = '\0'; - fg = f; + color->fg = f; } - if (bg != NULL) + if (color->bg != NULL) { - g_strlcpy (b, bg, sizeof (b)); + g_strlcpy (b, color->bg, sizeof (b)); p = strchr (b, '/'); if (p != NULL) *p = '\0'; - bg = b; + color->bg = b; } - if ((fg == NULL) || (bg == NULL)) + if (color->fg == NULL || color->bg == NULL) { /* get colors from skin */ char *editnormal; editnormal = mc_skin_get ("editor", "_default_", "default;default"); - if (fg == NULL) + if (color->fg == NULL) { g_strlcpy (f, editnormal, sizeof (f)); p = strchr (f, ';'); @@ -846,24 +857,24 @@ this_try_alloc_color_pair (const char *fg, const char *bg, const char *attrs) *p = '\0'; if (f[0] == '\0') g_strlcpy (f, "default", sizeof (f)); - fg = f; + color->fg = f; } - if (bg == NULL) + if (color->bg == NULL) { p = strchr (editnormal, ';'); if ((p != NULL) && (*(++p) != '\0')) g_strlcpy (b, p, sizeof (b)); else g_strlcpy (b, "default", sizeof (b)); - bg = b; + color->bg = b; } g_free (editnormal); } - if (attrs != NULL) + if (color->attrs != NULL) { - g_strlcpy (a, attrs, sizeof (a)); + g_strlcpy (a, color->attrs, sizeof (a)); p = strchr (a, '/'); if (p != NULL) *p = '\0'; @@ -871,9 +882,10 @@ this_try_alloc_color_pair (const char *fg, const char *bg, const char *attrs) p = a; while ((p = strchr (p, SYNTAX_TOKEN_PLUS)) != NULL) *p++ = '+'; - attrs = a; + color->attrs = a; } - return tty_try_alloc_color_pair (fg, bg, attrs); + + return tty_try_alloc_color_pair (color, TRUE); } /* --------------------------------------------------------------------------------------------- */ @@ -923,7 +935,7 @@ static int edit_read_syntax_rules (WEdit * edit, FILE * f, char **args, int args_size) { FILE *g = NULL; - char *fg, *bg, *attrs; + tty_color_pair_t color; char last_fg[32] = "", last_bg[32] = "", last_attrs[64] = ""; char whole_right[512]; char whole_left[512]; @@ -1089,19 +1101,19 @@ edit_read_syntax_rules (WEdit * edit, FILE * f, char **args, int args_size) g_ptr_array_add (c->keyword, k); no_words = FALSE; subst_defines (edit->defines, a, &args[ARGS_LEN]); - fg = *a; + color.fg = *a; if (*a != NULL) a++; - bg = *a; + color.bg = *a; if (*a != NULL) a++; - attrs = *a; + color.attrs = *a; if (*a != NULL) a++; - g_strlcpy (last_fg, fg != NULL ? fg : "", sizeof (last_fg)); - g_strlcpy (last_bg, bg != NULL ? bg : "", sizeof (last_bg)); - g_strlcpy (last_attrs, attrs != NULL ? attrs : "", sizeof (last_attrs)); - k->color = this_try_alloc_color_pair (fg, bg, attrs); + g_strlcpy (last_fg, color.fg != NULL ? color.fg : "", sizeof (last_fg)); + g_strlcpy (last_bg, color.bg != NULL ? color.bg : "", sizeof (last_bg)); + g_strlcpy (last_attrs, color.attrs != NULL ? color.attrs : "", sizeof (last_attrs)); + k->color = this_try_alloc_color_pair (&color); k->keyword = g_string_new (" "); check_not_a; } @@ -1153,22 +1165,22 @@ edit_read_syntax_rules (WEdit * edit, FILE * f, char **args, int args_size) k->keyword = g_string_new (*a++); subst_defines (edit->defines, a, &args[ARGS_LEN]); - fg = *a; + color.fg = *a; if (*a != NULL) a++; - bg = *a; + color.bg = *a; if (*a != NULL) a++; - attrs = *a; + color.attrs = *a; if (*a != NULL) a++; - if (fg == NULL) - fg = last_fg; - if (bg == NULL) - bg = last_bg; - if (attrs == NULL) - attrs = last_attrs; - k->color = this_try_alloc_color_pair (fg, bg, attrs); + if (color.fg == NULL) + color.fg = last_fg; + if (color.bg == NULL) + color.bg = last_bg; + if (color.attrs == NULL) + color.attrs = last_attrs; + k->color = this_try_alloc_color_pair (&color); check_not_a; } else if (*(args[0]) == '#') @@ -1481,7 +1493,7 @@ edit_free_syntax_rules (WEdit * edit) g_ptr_array_free (edit->rules, TRUE); edit->rules = NULL; g_clear_slist (&edit->syntax_marker, g_free); - tty_color_free_all_tmp (); + tty_color_free_temp (); } /* --------------------------------------------------------------------------------------------- */ diff --git a/mcsrc/src/events_init.c b/mcsrc/src/events_init.c index 53473e50..b29678c5 100644 --- a/mcsrc/src/events_init.c +++ b/mcsrc/src/events_init.c @@ -1,7 +1,7 @@ /* Event callbacks initialization - Copyright (C) 2011-2023 + Copyright (C) 2011-2024 Free Software Foundation, Inc. Written by: diff --git a/mcsrc/src/execute.c b/mcsrc/src/execute.c index c2207747..21095a20 100644 --- a/mcsrc/src/execute.c +++ b/mcsrc/src/execute.c @@ -1,7 +1,7 @@ /* Execution routines for GNU Midnight Commander - Copyright (C) 2003-2023 + Copyright (C) 2003-2024 Free Software Foundation, Inc. Written by: diff --git a/mcsrc/src/file_history.c b/mcsrc/src/file_history.c index e46985e5..f4989e79 100644 --- a/mcsrc/src/file_history.c +++ b/mcsrc/src/file_history.c @@ -1,7 +1,7 @@ /* Load and show history of edited and viewed files - Copyright (C) 2020-2023 + Copyright (C) 2020-2024 Free Software Foundation, Inc. Written by: diff --git a/mcsrc/src/filemanager/Makefile.am b/mcsrc/src/filemanager/Makefile.am index 534d8dcf..0b3c3655 100644 --- a/mcsrc/src/filemanager/Makefile.am +++ b/mcsrc/src/filemanager/Makefile.am @@ -35,6 +35,4 @@ AM_CPPFLAGS = -I$(top_srcdir) $(GLIB_CFLAGS) if ENABLE_EXT2FS_ATTR libmcfilemanager_la_SOURCES += \ chattr.c - -AM_CPPFLAGS += @EXT2FS_CFLAGS@ @E2P_CFLAGS@ endif diff --git a/mcsrc/src/filemanager/achown.c b/mcsrc/src/filemanager/achown.c index dca3ecaa..717a6456 100644 --- a/mcsrc/src/filemanager/achown.c +++ b/mcsrc/src/filemanager/achown.c @@ -1,7 +1,7 @@ /* Chown-advanced command -- for the Midnight Commander - Copyright (C) 1994-2023 + Copyright (C) 1994-2024 Free Software Foundation, Inc. This file is part of the Midnight Commander. diff --git a/mcsrc/src/filemanager/boxes.c b/mcsrc/src/filemanager/boxes.c index c8cc6733..7cf9095e 100644 --- a/mcsrc/src/filemanager/boxes.c +++ b/mcsrc/src/filemanager/boxes.c @@ -1,7 +1,7 @@ /* Some misc dialog boxes for the program. - Copyright (C) 1994-2023 + Copyright (C) 1994-2024 Free Software Foundation, Inc. Written by: @@ -1295,7 +1295,7 @@ display_bits_box (void) gboolean new_meta; #if defined(WIN32) //WIN32, quick - quick_widget_t quick_widgets[19+2] = {0}, + quick_widget_t quick_widgets[20 + 2] = {0}, *qc = quick_widgets; #else quick_widget_t quick_widgets[] = { @@ -1333,6 +1333,7 @@ display_bits_box (void) const int visible_num = G_N_ELEMENTS (visible_options); int visible_option, audible_beep, legacy_beep; + int altgr = (mc_global.tty.altgr_enabled != 0); alert_options_decode (&visible_option, &audible_beep, &legacy_beep); @@ -1351,6 +1352,7 @@ display_bits_box (void) qc = XQUICK_NEXT_COLUMN (qc), qc = XQUICK_START_GROUPBOX (qc, N_("Other Options")), qc = XQUICK_CHECKBOX (qc, N_("F&ull 8 bits input"), &new_meta, NULL), + qc = XQUICK_CHECKBOX (qc, N_("AltGr input"), &altgr, NULL), qc = XQUICK_STOP_GROUPBOX (qc), qc = XQUICK_STOP_COLUMNS (qc), qc = XQUICK_BUTTONS_OK_CANCEL (qc), @@ -1375,8 +1377,9 @@ display_bits_box (void) g_free (errmsg); } -#if defined(WIN32) //WIN32, alert-options +#if defined(WIN32) //WIN32, alert-options/AltGr alert_options_apply (visible_option, audible_beep, legacy_beep); + mc_global.tty.altgr_enabled = altgr; #endif #ifdef HAVE_SLANG diff --git a/mcsrc/src/filemanager/cd.c b/mcsrc/src/filemanager/cd.c index e54e0ae1..7d6d992d 100644 --- a/mcsrc/src/filemanager/cd.c +++ b/mcsrc/src/filemanager/cd.c @@ -1,7 +1,7 @@ /* cd_to() function. - Copyright (C) 1995-2023 + Copyright (C) 1995-2024 Free Software Foundation, Inc. Written by: @@ -90,7 +90,11 @@ examine_cd (const char *_path) char *p; /* Tilde expansion */ +#if defined(WIN32) + path = strutils_shell_unescape_special (_path); //only escape specials +#else path = strutils_shell_unescape (_path); +#endif path_tilde = tilde_expand (path); g_free (path); diff --git a/mcsrc/src/filemanager/chattr.c b/mcsrc/src/filemanager/chattr.c index 08a5a999..b5de12ad 100644 --- a/mcsrc/src/filemanager/chattr.c +++ b/mcsrc/src/filemanager/chattr.c @@ -1,7 +1,7 @@ /* Chattr command -- for the Midnight Commander - Copyright (C) 2020-2023 + Copyright (C) 2020-2024 Free Software Foundation, Inc. Written by: diff --git a/mcsrc/src/filemanager/chmod.c b/mcsrc/src/filemanager/chmod.c index c93bcbc9..bac3d993 100644 --- a/mcsrc/src/filemanager/chmod.c +++ b/mcsrc/src/filemanager/chmod.c @@ -1,7 +1,7 @@ /* Chmod command -- for the Midnight Commander - Copyright (C) 1994-2023 + Copyright (C) 1994-2024 Free Software Foundation, Inc. This file is part of the Midnight Commander. diff --git a/mcsrc/src/filemanager/chown.c b/mcsrc/src/filemanager/chown.c index 1ce769f7..ff84a4fe 100644 --- a/mcsrc/src/filemanager/chown.c +++ b/mcsrc/src/filemanager/chown.c @@ -1,7 +1,7 @@ /* Chown command -- for the Midnight Commander - Copyright (C) 1994-2023 + Copyright (C) 1994-2024 Free Software Foundation, Inc. This file is part of the Midnight Commander. diff --git a/mcsrc/src/filemanager/cmd.c b/mcsrc/src/filemanager/cmd.c index 8c33fd89..0ef71849 100644 --- a/mcsrc/src/filemanager/cmd.c +++ b/mcsrc/src/filemanager/cmd.c @@ -2,7 +2,7 @@ Routines invoked by a function key They normally operate on the current panel. - Copyright (C) 1994-2023 + Copyright (C) 1994-2024 Free Software Foundation, Inc. Written by: @@ -1199,15 +1199,15 @@ sftplink_cmd (void) /* --------------------------------------------------------------------------------------------- */ -#ifdef ENABLE_VFS_FISH +#ifdef ENABLE_VFS_SHELL void -fishlink_cmd (void) +shelllink_cmd (void) { nice_cd (_("Shell link to machine"), _(machine_str), "[FIle transfer over SHell filesystem]", ":fishlink_cmd: Shell link to machine ", "sh://", 1, TRUE); } -#endif /* ENABLE_VFS_FISH */ +#endif /* ENABLE_VFS_SHELL */ /* --------------------------------------------------------------------------------------------- */ diff --git a/mcsrc/src/filemanager/cmd.h b/mcsrc/src/filemanager/cmd.h index 26bfdb7d..30b309c2 100644 --- a/mcsrc/src/filemanager/cmd.h +++ b/mcsrc/src/filemanager/cmd.h @@ -35,8 +35,8 @@ void ftplink_cmd (void); #ifdef ENABLE_VFS_SFTP void sftplink_cmd (void); #endif -#ifdef ENABLE_VFS_FISH -void fishlink_cmd (void); +#ifdef ENABLE_VFS_SHELL +void shelllink_cmd (void); #endif void undelete_cmd (void); void help_cmd (void); diff --git a/mcsrc/src/filemanager/command.c b/mcsrc/src/filemanager/command.c index 47d2d750..360f1041 100644 --- a/mcsrc/src/filemanager/command.c +++ b/mcsrc/src/filemanager/command.c @@ -4,7 +4,7 @@ with all the magic of the command input line, we depend on some help from the program's callback. - Copyright (C) 1995-2023 + Copyright (C) 1995-2024 Free Software Foundation, Inc. Written by: @@ -139,8 +139,11 @@ enter (WInput * lc_cmdline) char *s; s = expand_format (NULL, cmd[++i], TRUE); - g_string_append (command, s); - g_free (s); + if (s != NULL) + { + g_string_append (command, s); + g_free (s); + } } } @@ -248,8 +251,11 @@ command_insert (WInput * in, const char *text, gboolean insert_extra_space) char *quoted_text; quoted_text = name_quote (text, TRUE); - input_insert (in, quoted_text, insert_extra_space); - g_free (quoted_text); + if (quoted_text != NULL) + { + input_insert (in, quoted_text, insert_extra_space); + g_free (quoted_text); + } } /* --------------------------------------------------------------------------------------------- */ diff --git a/mcsrc/src/filemanager/dir.c b/mcsrc/src/filemanager/dir.c index 09318197..b405131b 100644 --- a/mcsrc/src/filemanager/dir.c +++ b/mcsrc/src/filemanager/dir.c @@ -1,7 +1,7 @@ /* Directory routines - Copyright (C) 1994-2023 + Copyright (C) 1994-2024 Free Software Foundation, Inc. Written by: diff --git a/mcsrc/src/filemanager/ext.c b/mcsrc/src/filemanager/ext.c index 7b528a14..f7e0bd0c 100644 --- a/mcsrc/src/filemanager/ext.c +++ b/mcsrc/src/filemanager/ext.c @@ -1,7 +1,7 @@ /* Extension dependent execution. - Copyright (C) 1994-2023 + Copyright (C) 1994-2024 Free Software Foundation, Inc. Written by: @@ -340,15 +340,19 @@ exec_make_shell_string (const char *lc_data, const vfs_path_t * filename_vpath) } } - if (!is_cd) - g_string_append (shell_string, text); - else + if (text != NULL) { - strcpy (pbuffer, text); - pbuffer = strchr (pbuffer, 0); + if (!is_cd) + g_string_append (shell_string, text); + else + { + strcpy (pbuffer, text); + pbuffer = strchr (pbuffer, '\0'); + } + + g_free (text); } - g_free (text); written_nonspace = TRUE; } } @@ -680,14 +684,18 @@ get_file_type_local (const vfs_path_t * filename_vpath, char *buf, int buflen) return 1; #else - int ret; - char *tmp; + char *filename_quoted; + int ret = 0; - tmp = name_quote (vfs_path_get_last_path_str (filename_vpath), FALSE); - ret = get_popen_information (FILE_CMD, tmp, buf, buflen); - g_free (tmp); + filename_quoted = name_quote (vfs_path_get_last_path_str (filename_vpath), FALSE); + if (filename_quoted != NULL) + { + ret = get_popen_information (FILE_CMD, filename_quoted, buf, buflen); + g_free (filename_quoted); + } return ret; + #endif } @@ -699,7 +707,7 @@ get_file_type_local (const vfs_path_t * filename_vpath, char *buf, int buflen) #ifdef HAVE_CHARSET static int -get_file_encoding_local (const vfs_path_t * filename_vpath, char *encoding_id, int encoding_id_len) +get_file_encoding_local (const vfs_path_t * filename_vpath, char *buf, int buflen) { #if defined(HAVE_LIBENCA) unsigned char sample[4096]; @@ -719,7 +727,7 @@ get_file_encoding_local (const vfs_path_t * filename_vpath, char *encoding_id, i if (lang && NULL != (analyser = enca_analyser_alloc (lang))) { EncaEncoding encoding = enca_analyse (analyser, sample, sample_len); - snprintf (encoding_id, encoding_id_len-1, "%s", enca_charset_name (encoding.charset, ENCA_NAME_STYLE_HUMAN)); + snprintf (buf, buflen-1, "%s", enca_charset_name (encoding.charset, ENCA_NAME_STYLE_HUMAN)); enca_analyser_free(analyser); return 1; } @@ -727,18 +735,28 @@ get_file_encoding_local (const vfs_path_t * filename_vpath, char *encoding_id, i return 0; #else - char *tmp, *lang, *args; - int ret; + char *filename_quoted; + int ret = 0; - tmp = name_quote (vfs_path_get_last_path_str (filename_vpath), FALSE); - lang = name_quote (autodetect_codeset, FALSE); - args = g_strconcat (" -L", lang, " -i ", tmp, (char *) NULL); + filename_quoted = name_quote (vfs_path_get_last_path_str (filename_vpath), FALSE); + if (filename_quoted != NULL) + { + char *lang; - ret = get_popen_information ("enca", args, encoding_id, encoding_id_len); + lang = name_quote (autodetect_codeset, FALSE); + if (lang != NULL) + { + char *args; - g_free (args); - g_free (lang); - g_free (tmp); + args = g_strdup_printf (" -L %s -i %s", lang, filename_quoted); + g_free (lang); + + ret = get_popen_information ("enca", args, buf, buflen); + g_free (args); + } + + g_free (filename_quoted); + } return ret; #endif @@ -786,6 +804,7 @@ regex_check_type (const vfs_path_t * filename_vpath, const char *ptr, gboolean c return FALSE; } + #ifdef HAVE_CHARSET got_encoding_data = is_autodetect_codeset_enabled ? get_file_encoding_local (localfile_vpath, encoding_id, sizeof (encoding_id)) : 0; diff --git a/mcsrc/src/filemanager/file.c b/mcsrc/src/filemanager/file.c index fa2ef44e..92f342f4 100644 --- a/mcsrc/src/filemanager/file.c +++ b/mcsrc/src/filemanager/file.c @@ -1,7 +1,7 @@ /* File management. - Copyright (C) 1994-2023 + Copyright (C) 1994-2024 Free Software Foundation, Inc. Written by: @@ -556,7 +556,11 @@ make_symlink (file_op_context_t * ctx, const vfs_path_t * src_vpath, const vfs_p { const char *r; +#if defined(WIN32) //WIN32, path + r = strrchr2 (src_path, PATH_SEP, PATH_SEP2); +#else r = strrchr (src_path, PATH_SEP); +#endif if (r != NULL) { size_t slen; @@ -1521,7 +1525,7 @@ recursive_erase (file_op_total_context_t * tctx, file_op_context_t * ctx, const * * ATTENTION! Be careful when modifying this function (like commit 25e419ba0886f)! * Some implementations of readdir() in MC VFS (for example, vfs_s_readdir(), which is used - * in FISH) don't return "." and ".." entries. + * in SHELL) don't return "." and ".." entries. */ static int check_dir_is_empty (const vfs_path_t * vpath) @@ -2765,9 +2769,12 @@ copy_file_file (file_op_total_context_t * tctx, file_op_context_t * ctx, /* Query to remove short file */ if (query_dialog (Q_ ("DialogTitle|Copy"), _("Incomplete file was retrieved"), D_ERROR, 2, _("&Delete"), _("&Keep")) == 0) - mc_unlink (dst_vpath); + dst_status = DEST_SHORT_DELETE; + else + dst_status = DEST_SHORT_KEEP; } - else if (dst_status == DEST_SHORT_DELETE) + + if (dst_status == DEST_SHORT_DELETE) mc_unlink (dst_vpath); else if (dst_status == DEST_FULL && !appending) { @@ -2812,9 +2819,11 @@ copy_file_file (file_op_total_context_t * tctx, file_op_context_t * ctx, src_mode = 0100666 & ~src_mode; mc_chmod (dst_vpath, (src_mode & ctx->umask_kill)); } + } + /* Always sync timestamps */ + if (dst_status == DEST_FULL || dst_status == DEST_SHORT_KEEP) mc_utime (dst_vpath, ×); - } if (return_status == FILE_CONT) return_status = progress_update_one (tctx, ctx, file_size); diff --git a/mcsrc/src/filemanager/filegui.c b/mcsrc/src/filemanager/filegui.c index 27ca8fa1..d220e076 100644 --- a/mcsrc/src/filemanager/filegui.c +++ b/mcsrc/src/filemanager/filegui.c @@ -10,7 +10,7 @@ Janne Kukonlehto added much error recovery to them for being used in an interactive program. - Copyright (C) 1994-2023 + Copyright (C) 1994-2024 Free Software Foundation, Inc. Written by: @@ -1496,7 +1496,11 @@ file_mask_dialog (file_op_context_t * ctx, gboolean only_one, const char *format g_free (tmp); vpath = vfs_path_from_str (dest_dir); +#if defined(WIN32) //WIN32, path + ctx->dest_mask = strrchr2 (dest_dir, PATH_SEP, PATH_SEP2); +#else ctx->dest_mask = strrchr (dest_dir, PATH_SEP); +#endif if (ctx->dest_mask == NULL) ctx->dest_mask = dest_dir; else diff --git a/mcsrc/src/filemanager/filemanager.c b/mcsrc/src/filemanager/filemanager.c index 0be83aa2..cac3944c 100644 --- a/mcsrc/src/filemanager/filemanager.c +++ b/mcsrc/src/filemanager/filemanager.c @@ -1,7 +1,7 @@ /* Main dialog (file panels) of the Midnight Commander - Copyright (C) 1994-2023 + Copyright (C) 1994-2024 Free Software Foundation, Inc. Written by: @@ -214,8 +214,8 @@ create_panel_menu (void) #ifdef ENABLE_VFS_FTP entries = g_list_prepend (entries, menu_entry_new (_("FT&P link..."), CK_ConnectFtp)); #endif -#ifdef ENABLE_VFS_FISH - entries = g_list_prepend (entries, menu_entry_new (_("S&hell link..."), CK_ConnectFish)); +#ifdef ENABLE_VFS_SHELL + entries = g_list_prepend (entries, menu_entry_new (_("S&hell link..."), CK_ConnectShell)); #endif #ifdef ENABLE_VFS_SFTP entries = g_list_prepend (entries, menu_entry_new (_("SFTP li&nk..."), CK_ConnectSftp)); @@ -1250,9 +1250,9 @@ midnight_execute_cmd (Widget * sender, long command) case CK_Find: find_cmd (current_panel); break; -#ifdef ENABLE_VFS_FISH - case CK_ConnectFish: - fishlink_cmd (); +#ifdef ENABLE_VFS_SHELL + case CK_ConnectShell: + shelllink_cmd (); break; #endif #ifdef ENABLE_VFS_FTP diff --git a/mcsrc/src/filemanager/filenot.c b/mcsrc/src/filemanager/filenot.c index 2bfc76ad..0ceed42f 100644 --- a/mcsrc/src/filemanager/filenot.c +++ b/mcsrc/src/filemanager/filenot.c @@ -3,7 +3,7 @@ tree about the changes made to the directory structure. - Copyright (C) 2011-2023 + Copyright (C) 2011-2024 Free Software Foundation, Inc. Author: diff --git a/mcsrc/src/filemanager/fileopctx.c b/mcsrc/src/filemanager/fileopctx.c index a37d9996..dce6c36d 100644 --- a/mcsrc/src/filemanager/fileopctx.c +++ b/mcsrc/src/filemanager/fileopctx.c @@ -1,7 +1,7 @@ /* File operation contexts for the Midnight Commander - Copyright (C) 1999-2023 + Copyright (C) 1999-2024 Free Software Foundation, Inc. Written by: diff --git a/mcsrc/src/filemanager/find.c b/mcsrc/src/filemanager/find.c index c0d2cf97..93f89b13 100644 --- a/mcsrc/src/filemanager/find.c +++ b/mcsrc/src/filemanager/find.c @@ -1,7 +1,7 @@ /* Find file command for the Midnight Commander - Copyright (C) 1995-2023 + Copyright (C) 1995-2024 Free Software Foundation, Inc. Written by: diff --git a/mcsrc/src/filemanager/hotlist.c b/mcsrc/src/filemanager/hotlist.c index b925ae27..1a23a073 100644 --- a/mcsrc/src/filemanager/hotlist.c +++ b/mcsrc/src/filemanager/hotlist.c @@ -1,7 +1,7 @@ /* Directory hotlist -- for the Midnight Commander - Copyright (C) 1994-2023 + Copyright (C) 1994-2024 Free Software Foundation, Inc. Written by: diff --git a/mcsrc/src/filemanager/info.c b/mcsrc/src/filemanager/info.c index 790f8201..584bc2af 100644 --- a/mcsrc/src/filemanager/info.c +++ b/mcsrc/src/filemanager/info.c @@ -1,7 +1,7 @@ /* Panel managing. - Copyright (C) 1994-2023 + Copyright (C) 1994-2024 Free Software Foundation, Inc. Written by: diff --git a/mcsrc/src/filemanager/layout.c b/mcsrc/src/filemanager/layout.c index 7ec74944..8df30456 100644 --- a/mcsrc/src/filemanager/layout.c +++ b/mcsrc/src/filemanager/layout.c @@ -1,7 +1,7 @@ /* Panel layout module for the Midnight Commander - Copyright (C) 1995-2023 + Copyright (C) 1995-2024 Free Software Foundation, Inc. Written by: @@ -1016,8 +1016,7 @@ setup_cmdline (void) #ifdef ENABLE_SUBSHELL if (mc_global.tty.use_subshell) { - subshell_prompt = g_string_new (tmp_prompt); - g_free (tmp_prompt); + subshell_prompt = g_string_new_take (tmp_prompt); mc_prompt = subshell_prompt->str; } #endif diff --git a/mcsrc/src/filemanager/listmode.c b/mcsrc/src/filemanager/listmode.c index b2f18e20..d7b18796 100644 --- a/mcsrc/src/filemanager/listmode.c +++ b/mcsrc/src/filemanager/listmode.c @@ -1,7 +1,7 @@ /* Directory panel listing format editor -- for the Midnight Commander - Copyright (C) 1994-2023 + Copyright (C) 1994-2024 Free Software Foundation, Inc. Written by: diff --git a/mcsrc/src/filemanager/mountlist.c b/mcsrc/src/filemanager/mountlist.c index 756c28b2..bab6aa1f 100644 --- a/mcsrc/src/filemanager/mountlist.c +++ b/mcsrc/src/filemanager/mountlist.c @@ -1,7 +1,7 @@ /* Return a list of mounted file systems - Copyright (C) 1991-2023 + Copyright (C) 1991-2024 Free Software Foundation, Inc. This file is part of the Midnight Commander. @@ -1353,6 +1353,7 @@ get_fs_usage (char const *file, char const *disk, struct fs_usage *fsp) fsp->fsu_blocksize = (vfsd.f_frsize ? PROPAGATE_ALL_ONES (vfsd.f_frsize) : PROPAGATE_ALL_ONES (vfsd.f_bsize)); + fsp->fsu_blocks = PROPAGATE_ALL_ONES (vfsd.f_blocks); fsp->fsu_bfree = PROPAGATE_ALL_ONES (vfsd.f_bfree); fsp->fsu_bavail = PROPAGATE_TOP_BIT (vfsd.f_bavail); diff --git a/mcsrc/src/filemanager/panel.c b/mcsrc/src/filemanager/panel.c index 1b14c39c..995d672d 100644 --- a/mcsrc/src/filemanager/panel.c +++ b/mcsrc/src/filemanager/panel.c @@ -1,7 +1,7 @@ /* Panel managing. - Copyright (C) 1994-2023 + Copyright (C) 1994-2024 Free Software Foundation, Inc. Written by: @@ -2353,8 +2353,7 @@ goto_parent_dir (WPanel * panel) mc_build_filename (vfs_path_as_str (panel->panelized_descr->root_vpath), fname->str, (char *) NULL); - fname = g_string_new (fname2); - g_free (fname2); + fname = g_string_new_take (fname2); } bname = x_basename (fname->str); @@ -2759,11 +2758,13 @@ panel_select_invert_files (WPanel * panel) static void panel_do_set_filter (WPanel * panel) { + /* *INDENT-OFF* */ #if defined(__WATCOMC__) file_filter_t ff = {NULL, NULL, 0); ff.flags = panel->filter.flags; #else - file_filter_t ff = {.value = NULL,.handler = NULL,.flags = panel->filter.flags }; + file_filter_t ff = { .value = NULL, .handler = NULL, .flags = panel->filter.flags }; #endif + /* *INDENT-ON* */ ff.handler = panel_select_unselect_files_dialog (&ff.flags, _("Filter"), MC_HISTORY_FM_PANEL_FILTER, @@ -2943,6 +2944,7 @@ static gboolean do_enter_on_file_entry (WPanel * panel, file_entry_t * fe) { const char *fname = fe->fname->str; + char *fname_quoted; vfs_path_t *full_name_vpath; gboolean ok; @@ -2993,12 +2995,14 @@ do_enter_on_file_entry (WPanel * panel, file_entry_t * fe) return confirm_execute || (ret == 0); } + fname_quoted = name_quote (fname, FALSE); + if (fname_quoted != NULL) { - char *tmp, *cmd; + char *cmd; + + cmd = g_strconcat ("." PATH_SEP_STR, fname_quoted, (char *) NULL); + g_free (fname_quoted); - tmp = name_quote (fname, FALSE); - cmd = g_strconcat (".", PATH_SEP_STR, tmp, (char *) NULL); - g_free (tmp); shell_execute (cmd, 0); g_free (cmd); } @@ -5260,8 +5264,7 @@ panel_panelize_cd (void) tmp_vpath = vfs_path_append_new (pdescr->root_vpath, plist->list[i].fname->str, (char *) NULL); - list->list[i].fname = g_string_new (vfs_path_as_str (tmp_vpath)); - vfs_path_free (tmp_vpath, TRUE); + list->list[i].fname = g_string_new_take (vfs_path_free (tmp_vpath, FALSE)); } list->list[i].f.link_to_dir = plist->list[i].f.link_to_dir; list->list[i].f.stale_link = plist->list[i].f.stale_link; diff --git a/mcsrc/src/filemanager/panelize.c b/mcsrc/src/filemanager/panelize.c index e90076cc..b1c87ca2 100644 --- a/mcsrc/src/filemanager/panelize.c +++ b/mcsrc/src/filemanager/panelize.c @@ -1,7 +1,7 @@ /* External panelize - Copyright (C) 1995-2023 + Copyright (C) 1995-2024 Free Software Foundation, Inc. Written by: diff --git a/mcsrc/src/filemanager/tree.c b/mcsrc/src/filemanager/tree.c index fd504070..6f86693d 100644 --- a/mcsrc/src/filemanager/tree.c +++ b/mcsrc/src/filemanager/tree.c @@ -6,7 +6,7 @@ created and destroyed. This is required for the future vfs layer, it will be possible to have tree views over virtual file systems. - Copyright (C) 1994-2023 + Copyright (C) 1994-2024 Free Software Foundation, Inc. Written by: @@ -985,6 +985,16 @@ tree_toggle_navig (WTree * tree) /* --------------------------------------------------------------------------------------------- */ +static void +tree_help (void) +{ + ev_help_t event_data = { NULL, "[Directory Tree]" }; + + mc_event_raise (MCEVENT_GROUP_CORE, "help", &event_data); +} + +/* --------------------------------------------------------------------------------------------- */ + static cb_ret_t tree_execute_cmd (WTree * tree, long command) { @@ -996,10 +1006,7 @@ tree_execute_cmd (WTree * tree, long command) switch (command) { case CK_Help: - { - ev_help_t event_data = { NULL, "[Directory Tree]" }; - mc_event_raise (MCEVENT_GROUP_CORE, "help", &event_data); - } + tree_help (); break; case CK_Forget: tree_forget (tree); diff --git a/mcsrc/src/filemanager/treestore.c b/mcsrc/src/filemanager/treestore.c index 2d23c937..984bb92d 100644 --- a/mcsrc/src/filemanager/treestore.c +++ b/mcsrc/src/filemanager/treestore.c @@ -8,7 +8,7 @@ created and destroyed. This is required for the future vfs layer, it will be possible to have tree views over virtual file systems. - Copyright (C) 1999-2023 + Copyright (C) 1999-2024 Free Software Foundation, Inc. Written by: diff --git a/mcsrc/src/help.c b/mcsrc/src/help.c index a14744a0..f36704c9 100644 --- a/mcsrc/src/help.c +++ b/mcsrc/src/help.c @@ -1,7 +1,7 @@ /* Hypertext file browser. - Copyright (C) 1994-2023 + Copyright (C) 1994-2024 Free Software Foundation, Inc. This file is part of the Midnight Commander. @@ -126,21 +126,20 @@ static const char * search_string (const char *start, const char *text) { const char *result = NULL; - char *local_text = g_strdup (text); - char *d = local_text; + char *local_text; + char *d; const char *e = start; + local_text = g_strdup (text); + /* fmt sometimes replaces a space with a newline in the help file */ /* Replace the newlines in the link name with spaces to correct the situation */ - while (*d != '\0') - { + for (d = local_text; *d != '\0'; str_next_char (&d)) if (*d == '\n') *d = ' '; - str_next_char (&d); - } /* Do search */ - for (d = local_text; *e; e++) + for (d = local_text; *e != '\0'; e++) { if (*d == *e) d++; @@ -166,11 +165,12 @@ search_string (const char *start, const char *text) static const char * search_string_node (const char *start, const char *text) { - const char *d = text; - const char *e = start; - if (start != NULL) - for (; *e && *e != CHAR_NODE_END; e++) + { + const char *d = text; + const char *e; + + for (e = start; *e != '\0' && *e != CHAR_NODE_END; e++) { if (*d == *e) d++; @@ -179,6 +179,7 @@ search_string_node (const char *start, const char *text) if (*d == '\0') return e + 1; } + } return NULL; } @@ -271,7 +272,7 @@ move_backward (int i) static void move_to_top (void) { - while (((int) (currentpoint > fdata) > 0) && (*currentpoint != CHAR_NODE_END)) + while (((int) (currentpoint - fdata) > 0) && (*currentpoint != CHAR_NODE_END)) currentpoint--; while (*currentpoint != ']') @@ -301,7 +302,7 @@ help_follow_link (const char *start, const char *lc_selected_item) if (lc_selected_item == NULL) return start; - for (p = lc_selected_item; *p && *p != CHAR_NODE_END && *p != CHAR_LINK_POINTER; p++) + for (p = lc_selected_item; *p != '\0' && *p != CHAR_NODE_END && *p != CHAR_LINK_POINTER; p++) ; if (*p == CHAR_LINK_POINTER) { @@ -309,7 +310,8 @@ help_follow_link (const char *start, const char *lc_selected_item) char link_name[MAXLINKNAME]; link_name[0] = '['; - for (i = 1; *p != CHAR_LINK_END && *p && *p != CHAR_NODE_END && i < MAXLINKNAME - 3;) + for (i = 1; + *p != CHAR_LINK_END && *p != '\0' && *p != CHAR_NODE_END && i < MAXLINKNAME - 3;) link_name[i++] = *++p; link_name[i - 1] = ']'; link_name[i] = '\0'; @@ -447,10 +449,7 @@ help_print_word (WDialog * h, GString * word, int *col, int *line, gboolean add_ static void help_show (WDialog * h, const char *paint_start) { - const char *p, *n; - int col, line, c; gboolean painting = TRUE; - gboolean acs; /* Flag: Alternate character set active? */ gboolean repeat_paint; int active_col, active_line; /* Active link position */ char buff[MB_LEN_MAX + 1]; @@ -461,9 +460,15 @@ help_show (WDialog * h, const char *paint_start) tty_setcolor (HELP_NORMAL_COLOR); do { - line = col = active_col = active_line = 0; + int line = 0; + int col = 0; + gboolean acs = FALSE; /* Flag: Is alternate character set active? */ + const char *p, *n; + + active_col = 0; + active_line = 0; + repeat_paint = FALSE; - acs = FALSE; clear_link_areas (); if ((int) (selected_item - paint_start) < 0) @@ -473,6 +478,8 @@ help_show (WDialog * h, const char *paint_start) n = paint_start; while ((n[0] != '\0') && (n[0] != CHAR_NODE_END) && (line < help_lines)) { + int c; + p = n; n = str_cget_next_char (p); memcpy (buff, p, n - p); @@ -597,7 +604,7 @@ help_show (WDialog * h, const char *paint_start) g_string_free (word, TRUE); /* Position the cursor over a nice link */ - if (active_col) + if (active_col != 0) widget_gotoyx (h, active_line, active_col); } @@ -1143,9 +1150,8 @@ help_interactive_display (const gchar * event_group_name, const gchar * event_na selected_item = search_string_node (main_node, STRING_LINK_START) - 1; currentpoint = main_node + 1; /* Skip the newline following the start of the node */ - for (history_ptr = HISTORY_SIZE; history_ptr;) + for (history_ptr = HISTORY_SIZE - 1; history_ptr >= 0; history_ptr--) { - history_ptr--; history[history_ptr].page = currentpoint; history[history_ptr].link = selected_item; } diff --git a/mcsrc/src/keymap.c b/mcsrc/src/keymap.c index 95372c03..5d71f0a3 100644 --- a/mcsrc/src/keymap.c +++ b/mcsrc/src/keymap.c @@ -1,7 +1,7 @@ /* Default values and initialization of keybinding engine - Copyright (C) 2009-2023 + Copyright (C) 2009-2024 Free Software Foundation, Inc. Written by: diff --git a/mcsrc/src/learn.c b/mcsrc/src/learn.c index c704ce11..f42aebf2 100644 --- a/mcsrc/src/learn.c +++ b/mcsrc/src/learn.c @@ -1,7 +1,7 @@ /* Learn keys - Copyright (C) 1995-2023 + Copyright (C) 1995-2024 Free Software Foundation, Inc. Written by: diff --git a/mcsrc/src/main.c b/mcsrc/src/main.c index 75af0170..3bf7e894 100644 --- a/mcsrc/src/main.c +++ b/mcsrc/src/main.c @@ -1,7 +1,7 @@ /* Main program for the Midnight Commander - Copyright (C) 1994-2023 + Copyright (C) 1994-2024 Free Software Foundation, Inc. Written by: @@ -260,18 +260,15 @@ check_sid (void) int main (int argc, char *argv[]) { -#if defined(WIN32) //WIN32, config - extern void WIN32_Setup(void); -#endif //WIN32 GError *mcerror = NULL; int exit_code = EXIT_FAILURE; mc_global.run_from_parent_mc = !check_sid (); - /* We had LC_CTYPE before, LC_ALL includs LC_TYPE as well */ #ifdef HAVE_SETLOCALE - (void) setlocale (LC_ALL, ""); + (void) setlocale (LC_ALL, ""); /* We had LC_CTYPE before, LC_ALL includs LC_TYPE as well */ #endif + (void) bindtextdomain (PACKAGE, LOCALEDIR); (void) textdomain (PACKAGE); @@ -295,6 +292,13 @@ main (int argc, char *argv[]) return exit_code; } + /* check terminal type + * $TERM must be set and not empty + * mc_global.tty.xterm_flag is used in init_key() and tty_init() + * Do this after mc_args_parse() where mc_args__force_xterm is set up. + */ + mc_global.tty.xterm_flag = tty_check_term (mc_args__force_xterm); + /* do this before mc_args_show_info () to view paths in the --datadir-info output */ OS_Setup (); @@ -362,13 +366,6 @@ main (int argc, char *argv[]) vfs_path_free (vpath, TRUE); } - /* check terminal type - * $TERM must be set and not empty - * mc_global.tty.xterm_flag is used in init_key() and tty_init() - * Do this after mc_args_handle() where mc_args__force_xterm is set up. - */ - mc_global.tty.xterm_flag = tty_check_term (mc_args__force_xterm); - /* NOTE: This has to be called before tty_init or whatever routine calls any define_sequence */ init_key (); diff --git a/mcsrc/src/man2hlp/man2hlp.in b/mcsrc/src/man2hlp/man2hlp.in index 8aa71317..16e5e7bf 100644 --- a/mcsrc/src/man2hlp/man2hlp.in +++ b/mcsrc/src/man2hlp/man2hlp.in @@ -1,8 +1,7 @@ #! @PERL_FOR_BUILD@ # # Man page to help file converter -# Copyright (C) 1994, 1995, 1998, 2000, 2001, 2002, 2003, 2004, 2005, -# 2007, 2010, 2011 +# Copyright (C) 1994-2024 # The Free Software Foundation, Inc. # # Originally written by: diff --git a/mcsrc/src/selcodepage.c b/mcsrc/src/selcodepage.c index c8a3cdca..067ad67b 100644 --- a/mcsrc/src/selcodepage.c +++ b/mcsrc/src/selcodepage.c @@ -3,7 +3,7 @@ Copyright (C) 2001 Walery Studennikov - Copyright (C) 2011-2023 + Copyright (C) 2011-2024 Free Software Foundation, Inc. Written by: diff --git a/mcsrc/src/setup.c b/mcsrc/src/setup.c index 646404f2..84fbbdd3 100644 --- a/mcsrc/src/setup.c +++ b/mcsrc/src/setup.c @@ -1,7 +1,7 @@ /* Setup loading/saving. - Copyright (C) 1994-2023 + Copyright (C) 1994-2024 Free Software Foundation, Inc. This file is part of the Midnight Commander. @@ -44,8 +44,8 @@ #ifdef ENABLE_VFS_FTP #include "src/vfs/ftpfs/ftpfs.h" #endif -#ifdef ENABLE_VFS_FISH -#include "src/vfs/fish/fish.h" +#ifdef ENABLE_VFS_SHELL +#include "src/vfs/shell/shell.h" #endif #ifdef HAVE_CHARSET @@ -231,7 +231,7 @@ GArray *macros_list; /*** file scope variables ************************************************************************/ static char *profile_name = NULL; /* ${XDG_CONFIG_HOME}/mc/ini */ -static char *panels_profile_name = NULL; /* ${XDG_CACHE_HOME}/mc/panels.ini */ +static char *panels_profile_name = NULL; /* ${XDG_CONFIG_HOME}/mc/panels.ini */ /* *INDENT-OFF* */ static const struct @@ -396,9 +396,9 @@ static const struct { "ftpfs_directory_timeout", &ftpfs_directory_timeout }, { "ftpfs_retry_seconds", &ftpfs_retry_seconds }, #endif /* ENABLE_VFS_FTP */ -#ifdef ENABLE_VFS_FISH - { "fish_directory_timeout", &fish_directory_timeout }, -#endif /* ENABLE_VFS_FISH */ +#ifdef ENABLE_VFS_SHELL + { "shell_directory_timeout", &shell_directory_timeout }, +#endif /* ENABLE_VFS_SHELL */ #endif /* ENABLE_VFS */ /* option_tab_spacing is used in internal viewer */ { "editor_tab_spacing", &option_tab_spacing }, diff --git a/mcsrc/src/subshell/common.c b/mcsrc/src/subshell/common.c index 3ea4b5ff..1c432fd7 100644 --- a/mcsrc/src/subshell/common.c +++ b/mcsrc/src/subshell/common.c @@ -1,7 +1,7 @@ /* Concurrent shell support for the Midnight Commander - Copyright (C) 1994-2023 + Copyright (C) 1994-2024 Free Software Foundation, Inc. Written by: diff --git a/mcsrc/src/subshell/proxyfunc.c b/mcsrc/src/subshell/proxyfunc.c index 3f180d32..b1c20a9b 100644 --- a/mcsrc/src/subshell/proxyfunc.c +++ b/mcsrc/src/subshell/proxyfunc.c @@ -1,7 +1,7 @@ /* Proxy functions for getting access to public variables into 'filemanager' module. - Copyright (C) 2015-2023 + Copyright (C) 2015-2024 Free Software Foundation, Inc. Written by: diff --git a/mcsrc/src/textconf.c b/mcsrc/src/textconf.c index 943e08a8..4dcbc340 100644 --- a/mcsrc/src/textconf.c +++ b/mcsrc/src/textconf.c @@ -1,7 +1,7 @@ /* Print features specific for this build - Copyright (C) 2000-2023 + Copyright (C) 2000-2024 Free Software Foundation, Inc. This file is part of the Midnight Commander. @@ -75,8 +75,8 @@ static const char *const vfs_supported[] = { #ifdef ENABLE_VFS_SFTP "sftpfs", #endif -#ifdef ENABLE_VFS_FISH - "fish", +#ifdef ENABLE_VFS_SHELL + "shell", #endif NULL }; @@ -218,15 +218,15 @@ show_datadirs_extended (void) PRINTF_SECTION (_("File extension handlers:"), EXTHELPERSDIR); -#if defined ENABLE_VFS_EXTFS || defined ENABLE_VFS_FISH +#if defined ENABLE_VFS_EXTFS || defined ENABLE_VFS_SHELL PRINTF_SECTION (_("VFS plugins and scripts:"), LIBEXECDIR); #ifdef ENABLE_VFS_EXTFS PRINTF2 ("extfs.d:", LIBEXECDIR, MC_EXTFS_DIR PATH_SEP_STR); #endif -#ifdef ENABLE_VFS_FISH - PRINTF2 ("fish:", LIBEXECDIR, FISH_PREFIX PATH_SEP_STR); +#ifdef ENABLE_VFS_SHELL + PRINTF2 ("shell:", LIBEXECDIR, VFS_SHELL_PREFIX PATH_SEP_STR); #endif -#endif /* ENABLE_VFS_EXTFS || defiined ENABLE_VFS_FISH */ +#endif /* ENABLE_VFS_EXTFS || defiined ENABLE_VFS_SHELL */ #if defined(HAVE_LIBMAGIC) //WIN32, libmagic PRINTF2 ("magic:", mc_MAGICPATH(), ""); #endif @@ -241,8 +241,8 @@ show_datadirs_extended (void) #ifdef ENABLE_VFS_EXTFS PRINTF ("extfs.d:", mc_config_get_data_path (), MC_EXTFS_DIR PATH_SEP_STR); #endif -#ifdef ENABLE_VFS_FISH - PRINTF ("fish:", mc_config_get_data_path (), FISH_PREFIX PATH_SEP_STR); +#ifdef ENABLE_VFS_SHELL + PRINTF ("shell:", mc_config_get_data_path (), VFS_SHELL_PREFIX PATH_SEP_STR); #endif #ifdef USE_INTERNAL_EDIT PRINTF ("mcedit macros:", mc_config_get_data_path (), MC_MACRO_FILE); diff --git a/mcsrc/src/usermenu.c b/mcsrc/src/usermenu.c index 3e36b49d..6c4943b2 100644 --- a/mcsrc/src/usermenu.c +++ b/mcsrc/src/usermenu.c @@ -1,7 +1,7 @@ /* User Menu implementation - Copyright (C) 1994-2023 + Copyright (C) 1994-2024 Free Software Foundation, Inc. Written by: @@ -86,20 +86,24 @@ static char *menu = NULL; static char * strip_ext (char *ss) { - char *s = ss; + char *s; char *e = NULL; - while (*s != '\0') + if (ss == NULL) + return NULL; + + for (s = ss; *s != '\0'; s++) { if (*s == '.') e = s; if (IS_PATH_SEP (*s) && e != NULL) e = NULL; /* '.' in *directory* name */ - s++; } + if (e != NULL) *e = '\0'; - return ss; + + return (*ss == '\0' ? NULL : ss); } /* --------------------------------------------------------------------------------------------- */ @@ -501,8 +505,11 @@ execute_menu_command (const Widget * edit_widget, const char *commands, gboolean char *tmp; tmp = name_quote (parameter, FALSE); - fputs (tmp, cmd_file); - g_free (tmp); + if (tmp != NULL) + { + fputs (tmp, cmd_file); + g_free (tmp); + } } else fputs (parameter, cmd_file); @@ -528,8 +535,11 @@ execute_menu_command (const Widget * edit_widget, const char *commands, gboolean char *text; text = expand_format (edit_widget, *commands, do_quote); - fputs (text, cmd_file); - g_free (text); + if (text != NULL) + { + fputs (text, cmd_file); + g_free (text); + } } } else if (*commands == '%') @@ -779,7 +789,7 @@ expand_format (const Widget * edit_widget, char c, gboolean do_quote) else { if (get_other_type () != view_listing) - return g_strdup (""); + return NULL; panel = other_panel; } @@ -800,7 +810,7 @@ expand_format (const Widget * edit_widget, char c, gboolean do_quote) default: /* other modes don't use formats */ - return g_strdup (""); + return NULL; } if (do_quote) @@ -822,16 +832,13 @@ expand_format (const Widget * edit_widget, char c, gboolean do_quote) case 'd': { const char *cwd; - char *qstr; if (panel != NULL) cwd = vfs_path_as_str (panel->cwd_vpath); else cwd = vfs_get_current_dir (); - qstr = quote_func (cwd, FALSE); - - result = qstr; + result = quote_func (cwd, FALSE); goto ret; } case 'c': @@ -914,31 +921,37 @@ expand_format (const Widget * edit_widget, char c, gboolean do_quote) case 't': case 'u': { - GString *block; + GString *block = NULL; int i; if (panel == NULL) { - result = g_strdup (""); + result = NULL; goto ret; } - block = g_string_sized_new (16); - for (i = 0; i < panel->dir.len; i++) if (panel->dir.list[i].f.marked != 0) { char *tmp; tmp = quote_func (panel->dir.list[i].fname->str, FALSE); - g_string_append (block, tmp); - g_string_append_c (block, ' '); - g_free (tmp); + if (tmp != NULL) + { + if (block == NULL) + block = g_string_new_take (tmp); + else + { + g_string_append (block, tmp); + g_free (tmp); + } + g_string_append_c (block, ' '); + } if (c_lc == 'u') do_file_mark (panel, i, 0); } - result = g_string_free (block, FALSE); + result = block == NULL ? NULL : g_string_free (block, block->len == 0); goto ret; } /* sub case block */ default: diff --git a/mcsrc/src/util.c b/mcsrc/src/util.c index 36159a95..bc590fb0 100644 --- a/mcsrc/src/util.c +++ b/mcsrc/src/util.c @@ -1,7 +1,7 @@ /* Various non-library utilities - Copyright (C) 2003-2023 + Copyright (C) 2003-2024 Free Software Foundation, Inc. Written by: diff --git a/mcsrc/src/vfs/Makefile.am b/mcsrc/src/vfs/Makefile.am index 1441953b..4adde8e4 100644 --- a/mcsrc/src/vfs/Makefile.am +++ b/mcsrc/src/vfs/Makefile.am @@ -16,9 +16,9 @@ SUBDIRS += extfs libmc_vfs_la_LIBADD += extfs/libvfs-extfs.la endif -if ENABLE_VFS_FISH -SUBDIRS += fish -libmc_vfs_la_LIBADD += fish/libvfs-fish.la +if ENABLE_VFS_SHELL +SUBDIRS += shell +libmc_vfs_la_LIBADD += shell/libvfs-shell.la endif if ENABLE_VFS_FTP diff --git a/mcsrc/src/vfs/cpio/cpio.c b/mcsrc/src/vfs/cpio/cpio.c index 447d1f64..1b904c50 100644 --- a/mcsrc/src/vfs/cpio/cpio.c +++ b/mcsrc/src/vfs/cpio/cpio.c @@ -1,7 +1,7 @@ /* Virtual File System: GNU Tar file system. - Copyright (C) 2000-2023 + Copyright (C) 2000-2024 Free Software Foundation, Inc. Written by: diff --git a/mcsrc/src/vfs/extfs/extfs.c b/mcsrc/src/vfs/extfs/extfs.c index 73ad49fa..2485ae49 100644 --- a/mcsrc/src/vfs/extfs/extfs.c +++ b/mcsrc/src/vfs/extfs/extfs.c @@ -1,7 +1,7 @@ /* Virtual File System: External file system. - Copyright (C) 1995-2023 + Copyright (C) 1995-2024 Free Software Foundation, Inc. Written by: @@ -936,13 +936,9 @@ extfs_cmd (const char *str_extfs_cmd, const struct extfs_super_t *archive, { char *file; char *quoted_file; - char *quoted_localname; char *archive_name, *quoted_archive_name; const extfs_plugin_info_t *info; -#if defined(WIN32) // WIN32, cmd-quoting - char *quoted_cmd; -#endif - char *cmd; + char *cmd = NULL; int retval = 0; GError *error = NULL; mc_pipe_t *pip; @@ -951,28 +947,60 @@ extfs_cmd (const char *str_extfs_cmd, const struct extfs_super_t *archive, quoted_file = name_quote (file, FALSE); g_free (file); + if (quoted_file == NULL) + { + message (D_ERROR, MSG_ERROR, _("EXTFS virtual file system:\nwrong file name")); + return (-1); + } + /* Skip leading "./" (if present) added in name_quote() */ file = extfs_skip_leading_dotslash (quoted_file); archive_name = extfs_get_archive_name (archive); quoted_archive_name = name_quote (archive_name, FALSE); g_free (archive_name); - quoted_localname = name_quote (localname, FALSE); + + if (quoted_archive_name == NULL) + { + message (D_ERROR, MSG_ERROR, _("EXTFS virtual file system:\nwrong archive name")); + return (-1); + } + info = &g_array_index (extfs_plugins, extfs_plugin_info_t, archive->fstype); + if (localname == NULL || *localname == '\0') + cmd = g_strconcat (info->path, info->prefix, str_extfs_cmd, quoted_archive_name, " ", + file, (char *) NULL); + else + { + char *quoted_localname; #if defined(WIN32) // WIN32, cmd-quoting - quoted_cmd = name_quote (g_strconcat (info->path, info->prefix, NULL), FALSE); - cmd = g_strconcat (quoted_cmd, str_extfs_cmd, + char *quoted_cmd; +#endif + + quoted_localname = name_quote (localname, FALSE); + +#if defined(WIN32) // WIN32, cmd-quoting + quoted_cmd = name_quote (g_strconcat (info->path, info->prefix, NULL), FALSE); + cmd = g_strconcat (quoted_cmd, str_extfs_cmd, quoted_archive_name, " ", file, " ", quoted_localname, (char *) NULL); - g_free (quoted_cmd); + g_free (quoted_cmd); #else - cmd = g_strconcat (info->path, info->prefix, str_extfs_cmd, - quoted_archive_name, " ", file, " ", quoted_localname, (char *) NULL); + cmd = g_strconcat (info->path, info->prefix, str_extfs_cmd, quoted_archive_name, " ", + file, " ", quoted_localname, (char *) NULL); #endif + g_free (quoted_localname); + } + g_free (quoted_file); - g_free (quoted_localname); g_free (quoted_archive_name); + if (cmd == NULL) + { + message (D_ERROR, MSG_ERROR, _("EXTFS virtual file system:\ncannot build command")); + return (-1); + } + /* don't read stdout */ pip = mc_popen (cmd, FALSE, TRUE, &error); g_free (cmd); diff --git a/mcsrc/src/vfs/extfs/helpers/iso9660.in b/mcsrc/src/vfs/extfs/helpers/iso9660.in index 5f228874..310618fc 100644 --- a/mcsrc/src/vfs/extfs/helpers/iso9660.in +++ b/mcsrc/src/vfs/extfs/helpers/iso9660.in @@ -132,6 +132,7 @@ mcisofs_list () { *.lz) MYCAT="lzip -dc";; *.lz4) MYCAT="lz4 -dc";; *.lzma) MYCAT="lzma -dc";; + *.lzo) MYCAT="lzop -dc";; *.xz) MYCAT="xz -dc";; *.zst) MYCAT="zstd -dc";; *.bz2) MYCAT="bzip2 -dc";; diff --git a/mcsrc/src/vfs/extfs/helpers/lslR.in b/mcsrc/src/vfs/extfs/helpers/lslR.in index 69b663b4..f568c02a 100644 --- a/mcsrc/src/vfs/extfs/helpers/lslR.in +++ b/mcsrc/src/vfs/extfs/helpers/lslR.in @@ -15,6 +15,7 @@ case "$1" in *.lz) MYCAT="lzip -dc";; *.lz4) MYCAT="lz4 -dc";; *.lzma) MYCAT="lzma -dc";; + *.lzo) MYCAT="lzop -dc";; *.xz) MYCAT="xz -dc";; *.zst) MYCAT="zstd -dc";; *.bz2) MYCAT="bzip2 -dc";; diff --git a/mcsrc/src/vfs/extfs/helpers/mailfs.in b/mcsrc/src/vfs/extfs/helpers/mailfs.in index 5bb373b6..20cfae31 100644 --- a/mcsrc/src/vfs/extfs/helpers/mailfs.in +++ b/mcsrc/src/vfs/extfs/helpers/mailfs.in @@ -11,6 +11,7 @@ $bzcat="bzip2 -dc"; # bunzip2 to stdout $lzipcat="lzip -dc"; # unlzip to stdout $lz4cat="lz4 -dc"; # unlz4 to stdout $lzcat="lzma -dc"; # unlzma to stdout +$lzocat="lzop -dc"; # unlzo to stdout $xzcat="xz -dc"; # unxz to stdout $zstdcat="zstd -dc"; # unzstd to stdout $file="file"; # "file" command @@ -194,6 +195,8 @@ if (/gzip/) { exit 1 unless (open IN, "$lz4cat $mbox_qname|"); } elsif (/lzma/) { exit 1 unless (open IN, "$lzcat $mbox_qname|"); +} elsif (/lzo/) { + exit 1 unless (open IN, "$lzocat $mbox_qname|"); } elsif (/xz/) { exit 1 unless (open IN, "$xzcat $mbox_qname|"); } elsif (/zst/) { diff --git a/mcsrc/src/vfs/extfs/helpers/patchfs.in b/mcsrc/src/vfs/extfs/helpers/patchfs.in index ee1e6515..59fdde1f 100644 --- a/mcsrc/src/vfs/extfs/helpers/patchfs.in +++ b/mcsrc/src/vfs/extfs/helpers/patchfs.in @@ -17,6 +17,7 @@ use File::Temp 'tempfile'; my $lzip = 'lzip'; my $lz4 = 'lz4'; my $lzma = 'lzma'; +my $lzo = 'lzop'; my $xz = 'xz'; my $zstd = 'zstd'; my $bzip = 'bzip2'; @@ -88,6 +89,8 @@ sub myin return "$lzip -dc $qfname"; } elsif (/^'*lzma/) { return "$lzma -dc $qfname"; + } elsif (/^'*lzo/) { + return "$lzo -dc $qfname"; } elsif (/^'*xz/) { return "$xz -dc $qfname"; } elsif (/^'*zst/) { @@ -114,6 +117,8 @@ sub myout return "$lzip -c $sep $qfname"; } elsif (/^'*lzma/) { return "$lzma -c $sep $qfname"; + } elsif (/^'*lzo/) { + return "$lzo -c $sep $qfname"; } elsif (/^'*xz/) { return "$xz -c $sep $qfname"; } elsif (/^'*zst/) { diff --git a/mcsrc/src/vfs/extfs/helpers/s3+.in b/mcsrc/src/vfs/extfs/helpers/s3+.in index f5e4b90d..6436ba72 100644 --- a/mcsrc/src/vfs/extfs/helpers/s3+.in +++ b/mcsrc/src/vfs/extfs/helpers/s3+.in @@ -153,16 +153,16 @@ def threadmap(fun, iterable, maxthreads=16): Propagates exception safely. """ from threading import Thread - import Queue + import queue items = list(iterable) nitems = len(items) if nitems < 2: - return map(fun, items) + return list(map(fun, items)) # Create and fill input queue - input = Queue.Queue() - output = Queue.Queue() + input = queue.Queue() + output = queue.Queue() for i,item in enumerate(items): input.put( (i,item) ) @@ -181,7 +181,7 @@ def threadmap(fun, iterable, maxthreads=16): output.put( (i,result) ) except: output.put( (None,sys.exc_info()) ) - except Queue.Empty: + except queue.Empty: return # Start threads @@ -196,8 +196,8 @@ def threadmap(fun, iterable, maxthreads=16): try: i,res = output.get() if i == None: - raise res[0],res[1],res[2] - except Queue.Empty: + raise res[0](res[1]).with_traceback(res[2]) + except queue.Empty: break ret.append(res) @@ -241,7 +241,7 @@ def get_bucket(name): b = s3.get_bucket(name, validate=False) b.get_location() # just to raise an exception on error return b - except boto.exception.S3ResponseError, e: + except boto.exception.S3ResponseError as e: # Seems this is the only proper way to switch to the bucket's region. # Requesting of the default region for "?location" does not work unfortunately. m = re.search(r'(.*?)', e.body) @@ -340,7 +340,7 @@ if cmd == 'list': expr = re.compile(r'^(\d{4})-(\d{2})-(\d{2})T(\d{2}):(\d{2}):(\d{2})\.\d{3}Z$') def convDate(awsdatetime): m = expr.match(awsdatetime) - ye,mo,da,ho,mi,se = map(int,m.groups()) + ye,mo,da,ho,mi,se = list(map(int,m.groups())) dt = datetime.datetime(ye,mo,da,ho,mi,se, tzinfo=pytz.utc) return dt.astimezone(tz).strftime('%m-%d-%Y %H:%M') diff --git a/mcsrc/src/vfs/extfs/helpers/uc1541 b/mcsrc/src/vfs/extfs/helpers/uc1541 index dc15b429..abb86eac 100644 --- a/mcsrc/src/vfs/extfs/helpers/uc1541 +++ b/mcsrc/src/vfs/extfs/helpers/uc1541 @@ -1,24 +1,25 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 """ UC1541 Virtual filesystem Author: Roman 'gryf' Dobosz -Date: 2019-09-20 -Version: 3.3 +Date: 2023-10-04 +Version: 3.6 Licence: BSD source: https://bitbucket.org/gryf/uc1541 mirror: https://github.com/gryf/uc1541 """ - -import sys -import re -import os +import argparse import gzip -from subprocess import Popen, PIPE +import logging +import os +import re +import subprocess +import sys + +LOG = logging.getLogger('UC1541') if os.getenv('UC1541_DEBUG'): - import logging - LOG = logging.getLogger('UC1541') LOG.setLevel(logging.DEBUG) FILE_HANDLER = logging.FileHandler("/tmp/uc1541.log") FILE_FORMATTER = logging.Formatter("%(asctime)s %(levelname)-8s " @@ -26,47 +27,11 @@ if os.getenv('UC1541_DEBUG'): FILE_HANDLER.setFormatter(FILE_FORMATTER) FILE_HANDLER.setLevel(logging.DEBUG) LOG.addHandler(FILE_HANDLER) -else: - class LOG(object): - """ - Dummy logger object. Does nothing. - """ - @classmethod - def debug(*args, **kwargs): - pass - - @classmethod - def info(*args, **kwargs): - pass - - @classmethod - def warning(*args, **kwargs): - pass - - @classmethod - def error(*args, **kwargs): - pass - - @classmethod - def critical(*args, **kwargs): - pass SECLEN = 256 -def _ord(string_or_int): - """ - Return an int value for the (possible) string passed in argument. This - function is for compatibility between python2 and python3, where single - element in byte string array is a string or an int respectively. - """ - try: - return ord(string_or_int) - except TypeError: - return string_or_int - - def _get_raw(dimage): """ Try to get contents of the D64 image either it's gzip compressed or not. @@ -160,10 +125,10 @@ class Disk(object): filename = list() for chr_ in string: - if _ord(chr_) == 160: # shift+space character; $a0 + if chr_ == 160: # shift+space character; $a0 break - character = D64.CHAR_MAP.get(_ord(chr_), '?') + character = D64.CHAR_MAP.get(chr_, '?') filename.append(character) # special cases @@ -204,8 +169,8 @@ class Disk(object): if not self.current_sector_data: return False - self.next_track = _ord(self.current_sector_data[0]) - self.next_sector = _ord(self.current_sector_data[1]) + self.next_track = self.current_sector_data[0] + self.next_sector = self.current_sector_data[1] if (self.next_track, self.next_sector) in self._already_done: # Just a failsafe. Endless loop is not what is expected. @@ -239,7 +204,7 @@ class Disk(object): sector = self.current_sector_data for dummy in range(8): entry = sector[:32] - ftype = _ord(entry[2]) + ftype = entry[2] if ftype == 0: # deleted sector = sector[32:] @@ -247,12 +212,12 @@ class Disk(object): type_verbose = self._get_ftype(ftype) - protect = _ord(entry[2]) & 64 and "<" or " " + protect = entry[2] & 64 and "<" or " " fname = entry[5:21] if ftype == 'rel': - size = _ord(entry[23]) + size = entry[23] else: - size = _ord(entry[30]) + _ord(entry[31]) * 226 + size = entry[30] + entry[31] * 226 self._dir_contents.append({'fname': self._map_filename(fname), 'ftype': type_verbose, @@ -392,7 +357,7 @@ class Uc1541(object): """ Class for interact with c1541 program and MC """ - PRG = re.compile(r'(\d+)\s+"([^"]*)".+?\s(del|prg|rel|seq|usr)([\s<])') + PRG = re.compile(r'(\d+)\s+"([^"]*)".+?(del|prg|rel|seq|usr)([\s<])') def __init__(self, archname): self.arch = archname @@ -430,11 +395,7 @@ class Uc1541(object): """ LOG.info("Removing file %s", dst) dst = self._get_masked_fname(dst) - - if not self._call_command('delete', dst=dst): - return self._show_error() - - return 0 + return self._call_command('delete', dst=dst) def copyin(self, dst, src): """ @@ -442,11 +403,7 @@ class Uc1541(object): """ LOG.info("Copy into D64 %s as %s", src, dst) dst = self._correct_fname(dst) - - if not self._call_command('write', src=src, dst=dst): - return self._show_error() - - return 0 + return self._call_command('write', src=src, dst=dst) def copyout(self, src, dst): """ @@ -459,10 +416,7 @@ class Uc1541(object): src = self._get_masked_fname(src) - if not self._call_command('read', src=src, dst=dst): - return self._show_error() - - return 0 + return self._call_command('read', src=src, dst=dst) def mkdir(self, dirname): """Not supported""" @@ -523,8 +477,9 @@ class Uc1541(object): uid = os.getuid() gid = os.getgid() - if not self._call_command('list'): - return self._show_error() + res = self._call_command('list') + if res != 0: + return res idx = 0 for line in self.out.split("\n"): @@ -540,7 +495,7 @@ class Uc1541(object): if '/' in display_name: display_name = display_name.replace('/', '|') - # workaround for space and dash at the beginning of the + # workaround for space and dash at the beggining of the # filename char_map = {' ': '~', '-': '_'} @@ -593,13 +548,16 @@ class Uc1541(object): universal_newlines = True if cmd in ['delete', 'write']: universal_newlines = False - self.out, self.err = Popen(command, - universal_newlines=universal_newlines, - stdout=PIPE, stderr=PIPE).communicate() + (self.out, + self.err) = subprocess.Popen(command, + universal_newlines=universal_newlines, + stdout=subprocess.PIPE, + stderr=subprocess.PIPE).communicate() if self.err: LOG.debug('an err: %s', self.err) - return not self.err + return self._show_error() + return 0 CALL_MAP = {'list': lambda a: Uc1541(a.arch).list(), @@ -612,7 +570,7 @@ CALL_MAP = {'list': lambda a: Uc1541(a.arch).list(), def parse_args(): """Use ArgumentParser to check for script arguments and execute.""" - parser = ArgumentParser() + parser = argparse.ArgumentParser() subparsers = parser.add_subparsers(help='supported commands', dest='subcommand') subparsers.required = True @@ -659,44 +617,6 @@ def parse_args(): return args.func(args) -def no_parse(): - """Failsafe argument "parsing". Note, that it blindly takes positional - arguments without checking them. In case of wrong arguments it will - silently exit""" - try: - if sys.argv[1] not in ('list', 'copyin', 'copyout', 'rm', 'mkdir', - "run"): - sys.exit(2) - except IndexError: - sys.exit(2) - - class Arg(object): - """Mimic argparse object""" - dst = None - src = None - arch = None - - arg = Arg() - - try: - arg.arch = sys.argv[2] - if sys.argv[1] in ('copyin', 'copyout'): - arg.src = sys.argv[3] - arg.dst = sys.argv[4] - elif sys.argv[1] in ('rm', 'run', 'mkdir'): - arg.dst = sys.argv[3] - except IndexError: - sys.exit(2) - - return CALL_MAP[sys.argv[1]](arg) - - if __name__ == "__main__": LOG.debug("Script params: %s", str(sys.argv)) - try: - from argparse import ArgumentParser - PARSE_FUNC = parse_args - except ImportError: - PARSE_FUNC = no_parse - - sys.exit(PARSE_FUNC()) + sys.exit(parse_args()) diff --git a/mcsrc/src/vfs/fish/helpers/Makefile.am b/mcsrc/src/vfs/fish/helpers/Makefile.am deleted file mode 100644 index e3ba15db..00000000 --- a/mcsrc/src/vfs/fish/helpers/Makefile.am +++ /dev/null @@ -1,10 +0,0 @@ -fishdir = $(libexecdir)/@PACKAGE@/fish - -# Files to install and distribute other than fish scripts -FISH_MISC = README.fish - -# Install and distribute FISH helper scripts w/o shebang & executable bit as data -fish_DATA = $(FISH_MISC) ls mkdir fexists unlink chown chmod rmdir ln mv hardlink get send append info utime -fishconfdir = $(sysconfdir)/@PACKAGE@ - -EXTRA_DIST = $(fish_DATA) diff --git a/mcsrc/src/vfs/fish/helpers/README.fish b/mcsrc/src/vfs/fish/helpers/README.fish deleted file mode 100644 index ac319c8b..00000000 --- a/mcsrc/src/vfs/fish/helpers/README.fish +++ /dev/null @@ -1,217 +0,0 @@ - - FIles transferred over SHell protocol (V 0.0.3) - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -This protocol was designed for transferring files over a remote shell -connection (rsh and compatibles). It can be as well used for transfers over -rsh, and there may be other uses. - -Client sends requests of following form: - -#FISH_COMMAND -equivalent shell commands, -which may be multiline - -Only fish commands are defined here, shell equivalents are for your -information only and will probably vary from implementation to -implementation. Fish commands always have priority: server is -expected to execute fish command if it understands it. If it does not, -however, it can try the luck and execute shell command. - -Since version 4.7.3, the scripts that FISH sends to host machines after -a command is transmitted are no longer hardwired in the Midnight -Commander source code. - -First, mc looks for system-wide set of scripts, then it checks whether -current user has host-specific overrides in his per-user mc -configuration directory. User-defined overrides take priority over -sytem-wide scripts if they exist. The order in which the directories are -traversed is as follows: - - /usr/libexec/mc/fish - ~/.local/share/mc/fish// - -Server's reply is multiline, but always ends with - -### 000 - -line. ### is prefix to mark this line, 000 is return code. Return -codes are superset to those used in ftp. - -There are few new exit codes defined: - -000 don't know; if there were no previous lines, this marks COMPLETE -success, if they were, it marks failure. - -001 don't know; if there were no previous lines, this marks -PRELIMinary success, if they were, it marks failure - - Connecting - ~~~~~~~~~~ -Client uses "echo FISH:;/bin/sh" as command executed on remote -machine. This should make it possible for server to distinguish FISH -connections from normal rsh/ssh. - - Commands - ~~~~~~~~ -#FISH -echo; start_fish_server; echo '### 200' - -This command is sent at the beginning. It marks that client wishes to -talk via FISH protocol. #VER command must follow. If server -understands FISH protocol, it has option to put FISH server somewhere -on system path and name it start_fish_server. - -#VER 0.0.2 <...> -echo '### 000' - -This command is the second one. It sends client version and extensions -to the server. Server should reply with protocol version to be used, -and list of extensions accepted. - -VER 0.0.0 -### 200 - -#PWD -pwd; echo '### 200' - -Server should reply with current directory (in form /abc/def/ghi) -followed by line indicating success. - -#LIST /directory -ls -lLa $1 | grep '^[^cbt]' | ( while read p x u g s m d y n; do echo "P$p $u.$g -S$s -d$m $d $y -:$n -"; done ) -ls -lLa $1 | grep '^[cb]' | ( while read p x u g a i m d y n; do echo "P$p $u.$g -E$a$i -dD$m $d $y -:$n -"; done ) -echo '### 200' - -This allows client to list directory or get status information about -single file. Output is in following form (any line except : -may be omitted): - -P . -S -d<3-letters month name> -D [.1234] -E, -: -L - - -Unix permissions are of form X--------- where X is type of -file. Currently, '-' means regular file, 'd' means directory, 'c', 'b' -means character and block device, 'l' means symbolic link, 'p' means -FIFO and 's' means socket. - -'d' has three fields: month (one of strings Jan Feb Mar Apr May Jun -Jul Aug Sep Oct Nov Dec), day of month, and third is either single -number indicating year, or HH:MM field (assume current year in such -case). As you've probably noticed, this is pretty broken; it is for -compatibility with ls listing. - -#RETR /some/name -ls -l /some/name | ( read a b c d x e; echo $x ); echo '### 100'; cat /some/name; echo '### 200' - -Server sends line with filesize on it, followed by line with ### 100 -indicating partial success, then it sends binary data (exactly -filesize bytes) and follows them with (with no preceding newline) ### -200. - -Note that there's no way to abort running RETR command - except -closing the connection. - -#STOR /file/name -> /file/name; echo '### 001'; ( dd bs=4096 count=; dd bs= count=1 ) 2>/dev/null | ( cat > %s; cat > /dev/null ); echo '### 200' - -This command is for storing /file/name, which is exactly size bytes -big. You probably think I went crazy. Well, I did not: that strange -cat > /dev/null has purpose to discard any extra data which was not -written to disk (due to for example out of space condition). - -[Why? Imagine uploading file with "rm -rf /" line in it.] - -#CWD /somewhere -cd /somewhere; echo '### 000' - -It is specified here, but I'm not sure how wise idea is to use this -one: it breaks stateless-ness of the protocol. - -Following commands should be rather self-explanatory: - -#CHMOD 1234 file -chmod 1234 file; echo '### 000' - -#DELE /some/path -rm -f /some/path; echo '### 000' - -#MKD /some/path -mkdir /some/path; echo '### 000' - -#RMD /some/path -rmdir /some/path; echo '### 000' - -#RENAME /path/a /path/b -mv /path/a /path/b; echo '### 000' - -#LINK /path/a /path/b -ln /path/a /path/b; echo '### 000' - -#SYMLINK /path/a /path/b -ln -s /path/a /path/b; echo '### 000' - -#CHOWN user /file/name -chown user /file/name; echo '### 000' - -#CHGRP group /file/name -chgrp group /file/name; echo '### 000' - -#INFO -...collect info about host into $result ... -echo $result -echo '### 200' - -#READ /path/and/filename -cat /path/and/filename | ( dd bs=4096 count= > /dev/null; -dd bs= count=1 > /dev/null; -dd bs=4096 count=; -dd bs= count=1; ) - -Returns ### 200 on successful exit, ### 291 on successful exit when -reading ended at eof, ### 292 on successful exit when reading did not -end at eof. - -#WRITE /path/and/filename - -Hmm, shall we define these ones if we know our client is not going to -use them? - -you can use follow parameters: -FISH_FILESIZE -FISH_FILENAME -FISH_FILEMODE -FISH_FILEOWNER -FISH_FILEGROUPE -FISH_FILEFROM -FISH_FILETO - -NB: -'FISH_FILESIZE' used if we operate with single file name in 'unlink', 'rmdir', 'chmod', etc... -'FISH_FILEFROM','FISH_FILETO' used if we operate with two files in 'ln', 'hardlink', 'mv' etc... -'FISH_FILEOWNER', 'FISH_FILEGROUPE' is a new user/group in chown - -also flags: -FISH_HAVE_HEAD -FISH_HAVE_SED -FISH_HAVE_AWK -FISH_HAVE_PERL -FISH_HAVE_LSQ -FISH_HAVE_DATE_MDYT - -That's all, folks! - pavel@ucw.cz diff --git a/mcsrc/src/vfs/fish/helpers/append b/mcsrc/src/vfs/fish/helpers/append deleted file mode 100644 index 81ded44c..00000000 --- a/mcsrc/src/vfs/fish/helpers/append +++ /dev/null @@ -1,16 +0,0 @@ -#APPE $FISH_FILESIZE $FISH_FILENAME -FILENAME="/${FISH_FILENAME}" -echo "### 001" -{ - bss=4096 - bsl=4095 - if [ $FISH_FILESIZE -lt $bss ]; then - bss=1; - bsl=0; - fi - while [ $FISH_FILESIZE -gt 0 ]; do - cnt=`expr \\( $FISH_FILESIZE + $bsl \\) / $bss` - n=`dd bs=$bss count=$cnt | tee -a "${FILENAME}" | wc -c` - FISH_FILESIZE=`expr $FISH_FILESIZE - $n` - done -}; echo "### 200" diff --git a/mcsrc/src/vfs/fish/helpers/chmod b/mcsrc/src/vfs/fish/helpers/chmod deleted file mode 100644 index a5a88b43..00000000 --- a/mcsrc/src/vfs/fish/helpers/chmod +++ /dev/null @@ -1,6 +0,0 @@ -#CHMOD $FISH_FILEMODE $FISH_FILENAME -if chmod ${FISH_FILEMODE} "/${FISH_FILENAME}" 2>/dev/null; then - echo "### 000" -else - echo "### 500" -fi diff --git a/mcsrc/src/vfs/fish/helpers/chown b/mcsrc/src/vfs/fish/helpers/chown deleted file mode 100644 index 469fdc15..00000000 --- a/mcsrc/src/vfs/fish/helpers/chown +++ /dev/null @@ -1,6 +0,0 @@ -#CHOWN $FISH_FILEOWNER:$FISH_FILEGROUP $FISH_FILENAME -if chown ${FISH_FILEOWNER}:${FISH_FILEGROUP} "/${FISH_FILENAME}" ; then - echo "### 000" -else - echo "### 500" -fi diff --git a/mcsrc/src/vfs/fish/helpers/fexists b/mcsrc/src/vfs/fish/helpers/fexists deleted file mode 100644 index cf03b151..00000000 --- a/mcsrc/src/vfs/fish/helpers/fexists +++ /dev/null @@ -1,3 +0,0 @@ -#ISEXISTS $FISH_FILENAME -ls -l "/${FISH_FILENAME}" >/dev/null 2>/dev/null -echo '### '$? diff --git a/mcsrc/src/vfs/fish/helpers/mkdir b/mcsrc/src/vfs/fish/helpers/mkdir deleted file mode 100644 index b32e9954..00000000 --- a/mcsrc/src/vfs/fish/helpers/mkdir +++ /dev/null @@ -1,6 +0,0 @@ -#MKD $FISH_FILENAME -if mkdir "/$FISH_FILENAME" 2>/dev/null; then - echo "### 000" -else - echo "### 500" -fi diff --git a/mcsrc/src/vfs/fish/helpers/mv b/mcsrc/src/vfs/fish/helpers/mv deleted file mode 100644 index c8cf70c9..00000000 --- a/mcsrc/src/vfs/fish/helpers/mv +++ /dev/null @@ -1,6 +0,0 @@ -#RENAME $FISH_FILEFROM $FISH_FILETO -if mv "/${FISH_FILEFROM}" "/${FISH_FILETO}" 2>/dev/null; then - echo "### 000" -else - echo "### 500" -fi diff --git a/mcsrc/src/vfs/fish/helpers/rmdir b/mcsrc/src/vfs/fish/helpers/rmdir deleted file mode 100644 index 0f99bf69..00000000 --- a/mcsrc/src/vfs/fish/helpers/rmdir +++ /dev/null @@ -1,6 +0,0 @@ -#RMD $FISH_FILENAME -if rmdir "/${FISH_FILENAME}" 2>/dev/null; then - echo "### 000" -else - echo "### 500" -fi diff --git a/mcsrc/src/vfs/fish/helpers/send b/mcsrc/src/vfs/fish/helpers/send deleted file mode 100644 index 80dd22be..00000000 --- a/mcsrc/src/vfs/fish/helpers/send +++ /dev/null @@ -1,17 +0,0 @@ -#STOR $FISH_FILESIZE $FISH_FILENAME -FILENAME="/${FISH_FILENAME}" -echo "### 001" -{ - > "${FILENAME}" - bss=4096 - bsl=4095 - if [ $FISH_FILESIZE -lt $bss ]; then - bss=1; - bsl=0; - fi - while [ $FISH_FILESIZE -gt 0 ]; do - cnt=`expr \\( $FISH_FILESIZE + $bsl \\) / $bss` - n=`dd bs=$bss count=$cnt | tee -a "${FILENAME}" | wc -c` - FISH_FILESIZE=`expr $FISH_FILESIZE - $n` - done -}; echo "### 200" diff --git a/mcsrc/src/vfs/fish/helpers/unlink b/mcsrc/src/vfs/fish/helpers/unlink deleted file mode 100644 index 79b9ad0d..00000000 --- a/mcsrc/src/vfs/fish/helpers/unlink +++ /dev/null @@ -1,6 +0,0 @@ -#DELE $FISH_FILENAME -if rm -f "/${FISH_FILENAME}" 2>/dev/null; then - echo "### 000" -else - echo "### 500" -fi diff --git a/mcsrc/src/vfs/fish/helpers/utime b/mcsrc/src/vfs/fish/helpers/utime deleted file mode 100644 index 94395b49..00000000 --- a/mcsrc/src/vfs/fish/helpers/utime +++ /dev/null @@ -1,13 +0,0 @@ -#UTIME "$FISH_TOUCHATIME_W_NSEC" "$FISH_TOUCHMTIME_W_NSEC" "$FISH_FILENAME" -if TZ=UTC touch -h -m -d "$FISH_TOUCHMTIME_W_NSEC" "/${FISH_FILENAME}" 2>/dev/null && \ - TZ=UTC touch -h -a -d "$FISH_TOUCHATIME_W_NSEC" "/${FISH_FILENAME}" 2>/dev/null; then - echo "### 000" -elif TZ=UTC touch -h -m -t $FISH_TOUCHMTIME "/${FISH_FILENAME}" 2>/dev/null && \ - TZ=UTC touch -h -a -t $FISH_TOUCHATIME "/${FISH_FILENAME}" 2>/dev/null; then - echo "### 000" -elif [ -n "$FISH_HAVE_PERL" ] && - perl -e 'utime '$FISH_FILEATIME','$FISH_FILEMTIME',@ARGV;' "/${FISH_FILENAME}" 2>/dev/null; then - echo "### 000" -else - echo "### 500" -fi diff --git a/mcsrc/src/vfs/ftpfs/ftpfs.c b/mcsrc/src/vfs/ftpfs/ftpfs.c index 8bf69960..bba05c63 100644 --- a/mcsrc/src/vfs/ftpfs/ftpfs.c +++ b/mcsrc/src/vfs/ftpfs/ftpfs.c @@ -1,7 +1,7 @@ /* Virtual File System: FTP file system. - Copyright (C) 1995-2023 + Copyright (C) 1995-2024 Free Software Foundation, Inc. Written by: diff --git a/mcsrc/src/vfs/ftpfs/ftpfs_parse_ls.c b/mcsrc/src/vfs/ftpfs/ftpfs_parse_ls.c index 5db79e0a..a9ee58c1 100644 --- a/mcsrc/src/vfs/ftpfs/ftpfs_parse_ls.c +++ b/mcsrc/src/vfs/ftpfs/ftpfs_parse_ls.c @@ -1,7 +1,7 @@ /* Virtual File System: FTP file system - Copyright (C) 2015-2023 + Copyright (C) 2015-2024 The Free Software Foundation, Inc. Written by: Andrew Borodin , 2013 diff --git a/mcsrc/src/vfs/local/local.c b/mcsrc/src/vfs/local/local.c index a777c84c..193fb6b4 100644 --- a/mcsrc/src/vfs/local/local.c +++ b/mcsrc/src/vfs/local/local.c @@ -1,7 +1,7 @@ /* Virtual File System: local file system. - Copyright (C) 1995-2023 + Copyright (C) 1995-2024 Free Software Foundation, Inc. This file is part of the Midnight Commander. diff --git a/mcsrc/src/vfs/plugins_init.c b/mcsrc/src/vfs/plugins_init.c index 767e2843..da13a124 100644 --- a/mcsrc/src/vfs/plugins_init.c +++ b/mcsrc/src/vfs/plugins_init.c @@ -1,7 +1,7 @@ /* Init VFS plugins. - Copyright (C) 2011-2023 + Copyright (C) 2011-2024 Free Software Foundation, Inc. Written by: @@ -46,8 +46,8 @@ #include "extfs/extfs.h" #endif -#ifdef ENABLE_VFS_FISH -#include "fish/fish.h" +#ifdef ENABLE_VFS_SHELL +#include "shell/shell.h" #endif #ifdef ENABLE_VFS_FTP @@ -115,9 +115,9 @@ vfs_plugins_init (void) #ifdef ENABLE_VFS_SFTP vfs_init_sftpfs (); #endif /* ENABLE_VFS_SFTP */ -#ifdef ENABLE_VFS_FISH - vfs_init_fish (); -#endif /* ENABLE_VFS_FISH */ +#ifdef ENABLE_VFS_SHELL + vfs_init_shell (); +#endif /* ENABLE_VFS_SHELL */ } /* --------------------------------------------------------------------------------------------- */ diff --git a/mcsrc/src/vfs/sfs/sfs.c b/mcsrc/src/vfs/sfs/sfs.c index f8eea363..b1b607d8 100644 --- a/mcsrc/src/vfs/sfs/sfs.c +++ b/mcsrc/src/vfs/sfs/sfs.c @@ -1,7 +1,7 @@ /* Single File fileSystem - Copyright (C) 1998-2023 + Copyright (C) 1998-2024 Free Software Foundation, Inc. Written by: diff --git a/mcsrc/src/vfs/sfs/sfs.ini b/mcsrc/src/vfs/sfs/sfs.ini index d817dc9f..a7b059be 100644 --- a/mcsrc/src/vfs/sfs/sfs.ini +++ b/mcsrc/src/vfs/sfs/sfs.ini @@ -16,6 +16,8 @@ lz4/1 lz4 < %1 > %3 ulz4/1 lz4 -d < %1 > %3 lzma/1 lzma < %1 > %3 ulzma/1 lzma -d < %1 > %3 +lzo/1 lzop < %1 > %3 +ulzo/1 lzop -d < %1 > %3 xz/1 xz < %1 > %3 uxz/1 xz -d < %1 > %3 zst/1 zstd < %1 > %3 diff --git a/mcsrc/src/vfs/sftpfs/config_parser.c b/mcsrc/src/vfs/sftpfs/config_parser.c index b5cc9ffc..842f3d61 100644 --- a/mcsrc/src/vfs/sftpfs/config_parser.c +++ b/mcsrc/src/vfs/sftpfs/config_parser.c @@ -1,7 +1,7 @@ /* Virtual File System: SFTP file system. The SSH config parser - Copyright (C) 2011-2023 + Copyright (C) 2011-2024 Free Software Foundation, Inc. Written by: diff --git a/mcsrc/src/vfs/sftpfs/connection.c b/mcsrc/src/vfs/sftpfs/connection.c index b650b7ac..d1445ab0 100644 --- a/mcsrc/src/vfs/sftpfs/connection.c +++ b/mcsrc/src/vfs/sftpfs/connection.c @@ -1,7 +1,7 @@ /* Virtual File System: SFTP file system. The internal functions: connections - Copyright (C) 2011-2023 + Copyright (C) 2011-2024 Free Software Foundation, Inc. Written by: @@ -74,6 +74,37 @@ static const char *const hostkey_method_ssh_ecdsa_256 = "ecdsa-sha2-nistp256"; static const char *const hostkey_method_ssh_rsa = "ssh-rsa"; static const char *const hostkey_method_ssh_dss = "ssh-dss"; +/* *INDENT-OFF* */ +static const char *default_hostkey_methods = +#ifdef LIBSSH2_KNOWNHOST_KEY_ECDSA_256 + "ecdsa-sha2-nistp256," +#endif +#ifdef LIBSSH2_KNOWNHOST_KEY_ECDSA_384 + "ecdsa-sha2-nistp384," +#endif +#ifdef LIBSSH2_KNOWNHOST_KEY_ECDSA_521 + "ecdsa-sha2-nistp521," +#endif +#ifdef LIBSSH2_KNOWNHOST_KEY_ECDSA_256 + "ecdsa-sha2-nistp256-cert-v01@openssh.com," +#endif +#ifdef LIBSSH2_KNOWNHOST_KEY_ECDSA_384 + "ecdsa-sha2-nistp384-cert-v01@openssh.com," +#endif +#ifdef LIBSSH2_KNOWNHOST_KEY_ECDSA_521 + "ecdsa-sha2-nistp521-cert-v01@openssh.com," +#endif +#ifdef LIBSSH2_KNOWNHOST_KEY_ED25519 + "ssh-ed25519," + "ssh-ed25519-cert-v01@openssh.com," +#endif + "rsa-sha2-256," + "rsa-sha2-512," + "ssh-rsa," + "ssh-rsa-cert-v01@openssh.com," + "ssh-dss"; +/* *INDENT-ON* */ + /** * * The current implementation of know host key checking has following limitations: @@ -260,8 +291,10 @@ sftpfs_read_known_hosts (struct vfs_s_super *super, GError ** mcerror) continue; if (store->name == NULL) - found = TRUE; - else if (store->name[0] != '[') + /* Ignore hashed hostnames. Currently, libssh2 offers no way for us to match it */ + continue; + + if (store->name[0] != '[') found = strcmp (store->name, super->path_element->host) == 0; else { @@ -288,6 +321,7 @@ sftpfs_read_known_hosts (struct vfs_s_super *super, GError ** mcerror) { int mask; const char *hostkey_method = NULL; + char *hostkey_methods; mask = store->typemask & LIBSSH2_KNOWNHOST_KEY_MASK; @@ -329,8 +363,15 @@ sftpfs_read_known_hosts (struct vfs_s_super *super, GError ** mcerror) return FALSE; } + /* Append the default hostkey methods (with lower priority). + * Since we ignored hashed hostnames, the actual matching host + * key might have different type than the one found in + * known_hosts for non-hashed hostname. Methods not supported + * by libssh2 it are ignored. */ + hostkey_methods = g_strdup_printf ("%s,%s", hostkey_method, default_hostkey_methods); rc = libssh2_session_method_pref (sftpfs_super->session, LIBSSH2_METHOD_HOSTKEY, - hostkey_method); + hostkey_methods); + g_free (hostkey_methods); if (rc < 0) goto err; } diff --git a/mcsrc/src/vfs/sftpfs/dir.c b/mcsrc/src/vfs/sftpfs/dir.c index a19a31f0..53cb5532 100644 --- a/mcsrc/src/vfs/sftpfs/dir.c +++ b/mcsrc/src/vfs/sftpfs/dir.c @@ -1,7 +1,7 @@ /* Virtual File System: SFTP file system. The internal functions: dirs - Copyright (C) 2011-2023 + Copyright (C) 2011-2024 Free Software Foundation, Inc. Written by: diff --git a/mcsrc/src/vfs/sftpfs/file.c b/mcsrc/src/vfs/sftpfs/file.c index 5c82258c..6c11de5d 100644 --- a/mcsrc/src/vfs/sftpfs/file.c +++ b/mcsrc/src/vfs/sftpfs/file.c @@ -1,7 +1,7 @@ /* Virtual File System: SFTP file system. The internal functions: files - Copyright (C) 2011-2023 + Copyright (C) 2011-2024 Free Software Foundation, Inc. Written by: diff --git a/mcsrc/src/vfs/sftpfs/internal.c b/mcsrc/src/vfs/sftpfs/internal.c index 4a92051f..1f206f6e 100644 --- a/mcsrc/src/vfs/sftpfs/internal.c +++ b/mcsrc/src/vfs/sftpfs/internal.c @@ -1,7 +1,7 @@ /* Virtual File System: SFTP file system. The internal functions - Copyright (C) 2011-2023 + Copyright (C) 2011-2024 Free Software Foundation, Inc. Written by: diff --git a/mcsrc/src/vfs/sftpfs/sftpfs.c b/mcsrc/src/vfs/sftpfs/sftpfs.c index f2cc5921..ba7d1697 100644 --- a/mcsrc/src/vfs/sftpfs/sftpfs.c +++ b/mcsrc/src/vfs/sftpfs/sftpfs.c @@ -1,7 +1,7 @@ /* Virtual File System: SFTP file system. The interface function - Copyright (C) 2011-2023 + Copyright (C) 2011-2024 Free Software Foundation, Inc. Written by: diff --git a/mcsrc/src/vfs/fish/Makefile.am b/mcsrc/src/vfs/shell/Makefile.am similarity index 59% rename from mcsrc/src/vfs/fish/Makefile.am rename to mcsrc/src/vfs/shell/Makefile.am index 4f3ca874..a4cb725d 100644 --- a/mcsrc/src/vfs/fish/Makefile.am +++ b/mcsrc/src/vfs/shell/Makefile.am @@ -6,8 +6,8 @@ AM_CPPFLAGS = \ $(GLIB_CFLAGS) \ -I$(top_srcdir) -noinst_LTLIBRARIES = libvfs-fish.la +noinst_LTLIBRARIES = libvfs-shell.la -libvfs_fish_la_SOURCES = \ - fish.c fish.h \ - fishdef.h +libvfs_shell_la_SOURCES = \ + shell.c shell.h \ + shelldef.h diff --git a/mcsrc/src/vfs/shell/helpers/Makefile.am b/mcsrc/src/vfs/shell/helpers/Makefile.am new file mode 100644 index 00000000..aa0db258 --- /dev/null +++ b/mcsrc/src/vfs/shell/helpers/Makefile.am @@ -0,0 +1,10 @@ +shelldir = $(libexecdir)/@PACKAGE@/shell + +# Files to install and distribute other than shell scripts +SHELL_MISC = README.shell + +# Install and distribute SHELL helper scripts w/o shebang & executable bit as data +shell_DATA = $(SHELL_MISC) ls mkdir fexists unlink chown chmod rmdir ln mv hardlink get send append info utime +shellconfdir = $(sysconfdir)/@PACKAGE@ + +EXTRA_DIST = $(shell_DATA) diff --git a/mcsrc/src/vfs/shell/helpers/README.shell b/mcsrc/src/vfs/shell/helpers/README.shell new file mode 100644 index 00000000..8cc53474 --- /dev/null +++ b/mcsrc/src/vfs/shell/helpers/README.shell @@ -0,0 +1,227 @@ + + FIles transferred over SSH + ~~~~~~~~~~~~~~~~~~~~~~~~~~ + +This protocol was designed for transferring files over a remote shell +connection (rsh and compatibles). It can be as well used for transfers over +rsh, and there may be other uses. + +Since version 4.8.31 Midnight Commander doesn't support FISH commands with form + +#FISH_COMMAND [arg1] [arg2] ... [argN] + +and sends requests as shell scripts only. + +First, MC looks for system-wide set of scripts, then it checks whether +current user has host-specific overrides in his per-user MC configuration +directory. User-defined overrides take priority over sytem-wide scripts +if they exist. The order in which the directories are traversed is as follows: + + /usr/libexec/mc/shell + ~/.local/share/mc/shell// + +Server's reply is multiline, but always ends with + +### 000 + +line. ### is prefix to mark this line, 000 is return code. Return +codes are superset to those used in ftp. + +There are few new exit codes defined: + +000 don't know; if there were no previous lines, this marks COMPLETE +success, if they were, it marks failure. + +001 don't know; if there were no previous lines, this marks +PRELIMinary success, if they were, it marks failure + + Connecting + ~~~~~~~~~~ +MC uses "echo SHELL:;/bin/sh" as command executed on remote machine. + + Actions + ~~~~~~~ + +Get info about host into $result + + echo $result + echo '### 200' + +Script: info + +-------------------------------------------------------------------------------- + +List directory or get status information about single file. + + ls -lLa $1 | grep '^[^cbt]' | ( while read p x u g s m d y n; do echo "P$p $u.$g + S$s + d$m $d $y + :$n + "; done ) + ls -lLa $1 | grep '^[cb]' | ( while read p x u g a i m d y n; do echo "P$p $u.$g + E$a$i + dD$m $d $y + :$n + "; done ) + echo '### 200' + +Output is in following form (any line except : may be omitted): + +P . +S +d<3-letters month name> +D [.1234] +E, +: +L + + +Unix permissions are of form X--------- +where X is type of file: + '-' a regular file + 'd' a directory + 'c' a character device + 'b' a block device + 'l' a symbolic link + 'p' a FIFO + 's' a socket. + +'d' has three fields: + month (one of strings Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec) + day of month + single number indicating year, or HH:MM field (assume current year in such + case). As you've probably noticed, this is pretty broken; it is for + compatibility with ls listing. + +Script: ls + +-------------------------------------------------------------------------------- + +Get file + + ls -l /some/name | ( read a b c d x e; echo $x ); echo '### 100'; cat /some/name; echo '### 200' + +Server sends line with filesize on it, followed by line with ### 100 +indicating partial success, then it sends binary data (exactly filesize bytes) +and follows them with (with no preceding newline) ### 200. + +Note that there's no way to abort running RETR command - except closing +the connection. + +Script: get + +-------------------------------------------------------------------------------- + +Put file + + > /file/name; echo '### 001'; ( dd bs=4096 count=; dd bs= count=1 ) 2>/dev/null | ( cat > %s; cat > /dev/null ); echo '### 200' + +This command is for storing /file/name, which is exactly size bytes big. +You probably think I went crazy. Well, I did not: that strange cat > /dev/null +has purpose to discard any extra data which was not written to disk (due to for +example out of space condition). + +[Why? Imagine uploading file with "rm -rf /" line in it.] + +Script: send + +-------------------------------------------------------------------------------- + +Change directory + + cd /somewhere; echo '### 000' + +It is specified here, but I'm not sure how wise idea is to use this one: +it breaks stateless-ness of the protocol. + +-------------------------------------------------------------------------------- + +Change mode + + chmod 1234 file; echo '### 000' + +Script: chmod + +-------------------------------------------------------------------------------- + +Change own + + chown user /file/name; echo '### 000' + +Script: chown + +-------------------------------------------------------------------------------- + +Remove file + + rm -f /some/path; echo '### 000' + +Sctipt: unlink + +-------------------------------------------------------------------------------- + +Make directory: + + mkdir /some/path; echo '### 000' + +Script: mkdir + +-------------------------------------------------------------------------------- + +Remove directory + + rmdir /some/path; echo '### 000' + +Script: rmdir + +-------------------------------------------------------------------------------- + +Rename/move file + + mv /path/a /path/b; echo '### 000' + +Script: mv + +-------------------------------------------------------------------------------- + +Make link + + ln /path/a /path/b; echo '### 000' + +Script: hardlink + +-------------------------------------------------------------------------------- + +Make symbolic link: + + ln -s /path/a /path/b; echo '### 000' + +Script: ln + +-------------------------------------------------------------------------------- + +You can use following parameters: +SHELL_FILESIZE +SHELL_FILENAME +SHELL_FILEMODE +SHELL_FILEOWNER +SHELL_FILEGROUPE +SHELL_FILEFROM +SHELL_FILETO + +NB: +'SHELL_FILESIZE' is used if we operate with single file name in 'unlink', 'rmdir', 'chmod', etc... +'SHELL_FILEFROM','SHELL_FILETO' are used if we operate with two files in 'ln', 'hardlink', 'mv' etc... +'SHELL_FILEOWNER', 'SHELL_FILEGROUPE' are a new user/group in chown + +and flags: +SHELL_HAVE_HEAD +SHELL_HAVE_SED +SHELL_HAVE_AWK +SHELL_HAVE_PERL +SHELL_HAVE_LSQ +SHELL_HAVE_DATE_MDYT + +That's all, folks! + pavel@ucw.cz + aborodin@vmail.ru diff --git a/mcsrc/src/vfs/shell/helpers/append b/mcsrc/src/vfs/shell/helpers/append new file mode 100644 index 00000000..a73d2cd3 --- /dev/null +++ b/mcsrc/src/vfs/shell/helpers/append @@ -0,0 +1,15 @@ +FILENAME="/${SHELL_FILENAME}" +echo "### 001" +{ + bss=4096 + bsl=4095 + if [ $SHELL_FILESIZE -lt $bss ]; then + bss=1; + bsl=0; + fi + while [ $SHELL_FILESIZE -gt 0 ]; do + cnt=`expr \\( $SHELL_FILESIZE + $bsl \\) / $bss` + n=`dd bs=$bss count=$cnt | tee -a "${FILENAME}" | wc -c` + SHELL_FILESIZE=`expr $SHELL_FILESIZE - $n` + done +}; echo "### 200" diff --git a/mcsrc/src/vfs/shell/helpers/chmod b/mcsrc/src/vfs/shell/helpers/chmod new file mode 100644 index 00000000..75ea0241 --- /dev/null +++ b/mcsrc/src/vfs/shell/helpers/chmod @@ -0,0 +1,5 @@ +if chmod ${SHELL_FILEMODE} "/${SHELL_FILENAME}" 2>/dev/null; then + echo "### 000" +else + echo "### 500" +fi diff --git a/mcsrc/src/vfs/shell/helpers/chown b/mcsrc/src/vfs/shell/helpers/chown new file mode 100644 index 00000000..c2fc2b1d --- /dev/null +++ b/mcsrc/src/vfs/shell/helpers/chown @@ -0,0 +1,5 @@ +if chown ${SHELL_FILEOWNER}:${SHELL_FILEGROUP} "/${SHELL_FILENAME}" ; then + echo "### 000" +else + echo "### 500" +fi diff --git a/mcsrc/src/vfs/shell/helpers/fexists b/mcsrc/src/vfs/shell/helpers/fexists new file mode 100644 index 00000000..3d115743 --- /dev/null +++ b/mcsrc/src/vfs/shell/helpers/fexists @@ -0,0 +1,2 @@ +ls -l "/${SHELL_FILENAME}" >/dev/null 2>/dev/null +echo '### '$? diff --git a/mcsrc/src/vfs/fish/helpers/get b/mcsrc/src/vfs/shell/helpers/get similarity index 84% rename from mcsrc/src/vfs/fish/helpers/get rename to mcsrc/src/vfs/shell/helpers/get index 762267af..b633a451 100644 --- a/mcsrc/src/vfs/fish/helpers/get +++ b/mcsrc/src/vfs/shell/helpers/get @@ -1,7 +1,6 @@ -#RETR $FISH_FILENAME $FISH_START_OFFSET LC_TIME=C export LC_TIME -fish_get_perl () +shell_get_perl () { FILENAME=$1 OFFSET=$2 @@ -35,7 +34,7 @@ exit 0 ' "${FILENAME}" $OFFSET } -fish_get_tail () +shell_get_tail () { FILENAME=$1 OFFSET=$2 @@ -67,7 +66,7 @@ else fi } -fish_get_dd () +shell_get_dd () { FILENAME=$1 OFFSET=$2 @@ -96,10 +95,10 @@ else fi } -if [ -n "${FISH_HAVE_PERL}" ]; then - fish_get_perl "/${FISH_FILENAME}" ${FISH_START_OFFSET} -elif [ -n "${FISH_HAVE_TAIL}" ]; then - fish_get_tail "/${FISH_FILENAME}" ${FISH_START_OFFSET} +if [ -n "${SHELL_HAVE_PERL}" ]; then + shell_get_perl "/${SHELL_FILENAME}" ${SHELL_START_OFFSET} +elif [ -n "${SHELL_HAVE_TAIL}" ]; then + shell_get_tail "/${SHELL_FILENAME}" ${SHELL_START_OFFSET} else - fish_get_dd "/${FISH_FILENAME}" ${FISH_START_OFFSET} + shell_get_dd "/${SHELL_FILENAME}" ${SHELL_START_OFFSET} fi diff --git a/mcsrc/src/vfs/fish/helpers/hardlink b/mcsrc/src/vfs/shell/helpers/hardlink similarity index 51% rename from mcsrc/src/vfs/fish/helpers/hardlink rename to mcsrc/src/vfs/shell/helpers/hardlink index 4f36b3ff..f92b332c 100644 --- a/mcsrc/src/vfs/fish/helpers/hardlink +++ b/mcsrc/src/vfs/shell/helpers/hardlink @@ -1,6 +1,5 @@ -#LINK $FISH_FILEFROM $FISH_FILETO -FILEFROM="/${FISH_FILEFROM}" -FILETO="/${FISH_FILETO}" +FILEFROM="/${SHELL_FILEFROM}" +FILETO="/${SHELL_FILETO}" if ln "${FILEFROM}" "${FILETO}" 2>/dev/null; then echo "### 000" else diff --git a/mcsrc/src/vfs/fish/helpers/info b/mcsrc/src/vfs/shell/helpers/info similarity index 80% rename from mcsrc/src/vfs/fish/helpers/info rename to mcsrc/src/vfs/shell/helpers/info index b85b0a7f..053423af 100644 --- a/mcsrc/src/vfs/fish/helpers/info +++ b/mcsrc/src/vfs/shell/helpers/info @@ -1,12 +1,12 @@ LC_TIME=C export LC_TIME -#FISH_HAVE_HEAD 1 -#FISH_HAVE_SED 2 -#FISH_HAVE_AWK 4 -#FISH_HAVE_PERL 8 -#FISH_HAVE_LSQ 16 -#FISH_HAVE_DATE_MDYT 32 -#FISH_HAVE_TAIL 64 +#SHELL_HAVE_HEAD 1 +#SHELL_HAVE_SED 2 +#SHELL_HAVE_AWK 4 +#SHELL_HAVE_PERL 8 +#SHELL_HAVE_LSQ 16 +#SHELL_HAVE_DATE_MDYT 32 +#SHELL_HAVE_TAIL 64 res=0 if `echo yes| head -c 1 > /dev/null 2>&1` ; then res=`expr $res + 1` diff --git a/mcsrc/src/vfs/fish/helpers/ln b/mcsrc/src/vfs/shell/helpers/ln similarity index 51% rename from mcsrc/src/vfs/fish/helpers/ln rename to mcsrc/src/vfs/shell/helpers/ln index a8445d87..15a20cd9 100644 --- a/mcsrc/src/vfs/fish/helpers/ln +++ b/mcsrc/src/vfs/shell/helpers/ln @@ -1,6 +1,5 @@ -#SYMLINK $FISH_FILEFROM $FISH_FILETO -FILEFROM="${FISH_FILEFROM}" -FILETO="/${FISH_FILETO}" +FILEFROM="${SHELL_FILEFROM}" +FILETO="/${SHELL_FILETO}" if ln -s "${FILEFROM}" "${FILETO}" 2>/dev/null; then echo "### 000" else diff --git a/mcsrc/src/vfs/fish/helpers/ls b/mcsrc/src/vfs/shell/helpers/ls similarity index 77% rename from mcsrc/src/vfs/fish/helpers/ls rename to mcsrc/src/vfs/shell/helpers/ls index 7165b51f..c7701d64 100644 --- a/mcsrc/src/vfs/fish/helpers/ls +++ b/mcsrc/src/vfs/shell/helpers/ls @@ -1,11 +1,10 @@ -#LIST /${FISH_DIR} LC_TIME=C export LC_TIME perl_res="1" -fish_list_lsq () +shell_list_lsq () { -FISH_DIR="$1" -ls -Qlan "${FISH_DIR}" 2>/dev/null | grep '^[^cbt]' | ( +SHELL_DIR="$1" +ls -Qlan "${SHELL_DIR}" 2>/dev/null | grep '^[^cbt]' | ( while read p l u g s m d y n; do echo "P$p $u.$g" echo "S$s" @@ -15,7 +14,7 @@ while read p l u g s m d y n; do done ) -ls -Qlan "${FISH_DIR}" 2>/dev/null | grep '^[cb]' | ( +ls -Qlan "${SHELL_DIR}" 2>/dev/null | grep '^[cb]' | ( while read p l u g a i m d y n; do echo "P$p $u.$g" echo "E$a$i" @@ -27,13 +26,13 @@ done echo '### 200' } -fish_list_sed () +shell_list_sed () { -FISH_DIR="$1" -ls -lan "${FISH_DIR}" 2>/dev/null | grep '^[^cbt]' | ( +SHELL_DIR="$1" +ls -lan "${SHELL_DIR}" 2>/dev/null | grep '^[^cbt]' | ( while read p l u g s rec; do if [ -n "$g" ]; then - if [ -n "$FISH_HAVE_DATE_MDYT" ]; then + if [ -n "$SHELL_HAVE_DATE_MDYT" ]; then filename=`echo "$rec"| sed 's/[^[:space:]]\+ \+[^[:space:]]\+ \+[^[:space:]]\+ //'` filedate=`echo "$rec"| sed 's/\([^[:space:]]\+ \+[^[:space:]]\+ \+[^[:space:]]\+\) .*/\1/'` else @@ -43,7 +42,7 @@ while read p l u g s rec; do pfile=\"`echo "$filename" | sed -e 's#^\(.*\) -> \(.*\)#\1" -> "\2#'`\" echo "P$p $u.$g" echo "S$s" - if [ -n "$FISH_HAVE_DATE_MDYT" ]; then + if [ -n "$SHELL_HAVE_DATE_MDYT" ]; then echo "d$filedate" else echo "D$filedate" @@ -53,10 +52,10 @@ while read p l u g s rec; do fi done ) -ls -lan "${FISH_DIR}" 2>/dev/null | grep '^[cb]' | ( +ls -lan "${SHELL_DIR}" 2>/dev/null | grep '^[cb]' | ( while read p l u g a i rec; do if [ -n "$g" ]; then - if [ -n "$FISH_HAVE_DATE_MDYT" ]; then + if [ -n "$SHELL_HAVE_DATE_MDYT" ]; then filename=`echo "$rec"| sed 's/[^[:space:]]\+ \+[^[:space:]]\+ \+[^[:space:]]\+ //'` filedate=`echo "$rec"| sed 's/\([^[:space:]]\+ \+[^[:space:]]\+ \+[^[:space:]]\+\) .*/\1/'` else @@ -66,7 +65,7 @@ while read p l u g a i rec; do pfile=\"`echo "$filename" | sed -e 's#^\(.*\) -> \(.*\)#\1" -> "\2#'`\" echo "P$p $u.$g" echo "E$a$i" - if [ -n "$FISH_HAVE_DATE_MDYT" ]; then + if [ -n "$SHELL_HAVE_DATE_MDYT" ]; then echo "d$filedate" else echo "D$filedate" @@ -79,10 +78,10 @@ done echo '### 200' } -fish_list_poor_ls () +shell_list_poor_ls () { -FISH_DIR="$1" -ls -lan "${FISH_DIR}" 2>/dev/null | grep '^[^cbt]' | ( +SHELL_DIR="$1" +ls -lan "${SHELL_DIR}" 2>/dev/null | grep '^[^cbt]' | ( while read p l u g s m d y n n2 n3; do if [ -n "$g" ]; then if [ "$m" = "0" ]; then @@ -98,7 +97,7 @@ while read p l u g s m d y n n2 n3; do fi done ) -ls -lan "${FISH_DIR}" 2>/dev/null | grep '^[cb]' | ( +ls -lan "${SHELL_DIR}" 2>/dev/null | grep '^[cb]' | ( while read p l u g a i m d y n n2 n3; do if [ -n "$g" ]; then if [ "$a" = "0" ]; then @@ -117,15 +116,14 @@ done echo '### 200' } -fish_list_perl () +shell_list_perl () { -FISH_DIR=$1 +SHELL_DIR=$1 perl -e ' use strict; use POSIX; -use Fcntl; -use POSIX ":fcntl_h"; #S_ISLNK was here until 5.6 -import Fcntl ":mode" unless defined &S_ISLNK; #and is now here +use Fcntl ":mode"; # S_ISLNK, S_IFMT, S_IMODE are here +use POSIX ":fcntl_h"; # S_ISLNK might be here as well my $dirname = $ARGV[0]; if (opendir (DIR, $dirname)) { while((my $filename = readdir (DIR))){ @@ -152,19 +150,19 @@ while((my $filename = readdir (DIR))){ printf("### 500\n"); } exit 0 -' "/${FISH_DIR}" +' "/${SHELL_DIR}" perl_res=$? } -if [ -n "${FISH_HAVE_PERL}" ]; then - fish_list_perl "/${FISH_FILENAME}" +if [ -n "${SHELL_HAVE_PERL}" ]; then + shell_list_perl "/${SHELL_FILENAME}" fi if [ "${perl_res}" != "0" ]; then - if [ -n "${FISH_HAVE_LSQ}" ]; then - fish_list_lsq "/${FISH_FILENAME}" - elif [ -n "${FISH_HAVE_SED}" ]; then - fish_list_sed "/${FISH_FILENAME}" + if [ -n "${SHELL_HAVE_LSQ}" ]; then + shell_list_lsq "/${SHELL_FILENAME}" + elif [ -n "${SHELL_HAVE_SED}" ]; then + shell_list_sed "/${SHELL_FILENAME}" else - fish_list_poor_ls "/${FISH_FILENAME}" + shell_list_poor_ls "/${SHELL_FILENAME}" fi fi diff --git a/mcsrc/src/vfs/shell/helpers/mkdir b/mcsrc/src/vfs/shell/helpers/mkdir new file mode 100644 index 00000000..b05f1255 --- /dev/null +++ b/mcsrc/src/vfs/shell/helpers/mkdir @@ -0,0 +1,5 @@ +if mkdir "/$SHELL_FILENAME" 2>/dev/null; then + echo "### 000" +else + echo "### 500" +fi diff --git a/mcsrc/src/vfs/shell/helpers/mv b/mcsrc/src/vfs/shell/helpers/mv new file mode 100644 index 00000000..1fd2327d --- /dev/null +++ b/mcsrc/src/vfs/shell/helpers/mv @@ -0,0 +1,5 @@ +if mv "/${SHELL_FILEFROM}" "/${SHELL_FILETO}" 2>/dev/null; then + echo "### 000" +else + echo "### 500" +fi diff --git a/mcsrc/src/vfs/shell/helpers/rmdir b/mcsrc/src/vfs/shell/helpers/rmdir new file mode 100644 index 00000000..88172c4d --- /dev/null +++ b/mcsrc/src/vfs/shell/helpers/rmdir @@ -0,0 +1,5 @@ +if rmdir "/${SHELL_FILENAME}" 2>/dev/null; then + echo "### 000" +else + echo "### 500" +fi diff --git a/mcsrc/src/vfs/shell/helpers/send b/mcsrc/src/vfs/shell/helpers/send new file mode 100644 index 00000000..66c2a1c7 --- /dev/null +++ b/mcsrc/src/vfs/shell/helpers/send @@ -0,0 +1,16 @@ +FILENAME="/${SHELL_FILENAME}" +echo "### 001" +{ + > "${FILENAME}" + bss=4096 + bsl=4095 + if [ $SHELL_FILESIZE -lt $bss ]; then + bss=1; + bsl=0; + fi + while [ $SHELL_FILESIZE -gt 0 ]; do + cnt=`expr \\( $SHELL_FILESIZE + $bsl \\) / $bss` + n=`dd bs=$bss count=$cnt | tee -a "${FILENAME}" | wc -c` + SHELL_FILESIZE=`expr $SHELL_FILESIZE - $n` + done +}; echo "### 200" diff --git a/mcsrc/src/vfs/shell/helpers/unlink b/mcsrc/src/vfs/shell/helpers/unlink new file mode 100644 index 00000000..f02f4d35 --- /dev/null +++ b/mcsrc/src/vfs/shell/helpers/unlink @@ -0,0 +1,5 @@ +if rm -f "/${SHELL_FILENAME}" 2>/dev/null; then + echo "### 000" +else + echo "### 500" +fi diff --git a/mcsrc/src/vfs/shell/helpers/utime b/mcsrc/src/vfs/shell/helpers/utime new file mode 100644 index 00000000..a5634319 --- /dev/null +++ b/mcsrc/src/vfs/shell/helpers/utime @@ -0,0 +1,12 @@ +if TZ=UTC touch -h -m -d "$SHELL_TOUCHMTIME_W_NSEC" "/${SHELL_FILENAME}" 2>/dev/null && \ + TZ=UTC touch -h -a -d "$SHELL_TOUCHATIME_W_NSEC" "/${SHELL_FILENAME}" 2>/dev/null; then + echo "### 000" +elif TZ=UTC touch -h -m -t $SHELL_TOUCHMTIME "/${SHELL_FILENAME}" 2>/dev/null && \ + TZ=UTC touch -h -a -t $SHELL_TOUCHATIME "/${SHELL_FILENAME}" 2>/dev/null; then + echo "### 000" +elif [ -n "$SHELL_HAVE_PERL" ] && + perl -e 'utime '$SHELL_FILEATIME','$SHELL_FILEMTIME',@ARGV;' "/${SHELL_FILENAME}" 2>/dev/null; then + echo "### 000" +else + echo "### 500" +fi diff --git a/mcsrc/src/vfs/fish/fish.c b/mcsrc/src/vfs/shell/shell.c similarity index 67% rename from mcsrc/src/vfs/fish/fish.c rename to mcsrc/src/vfs/shell/shell.c index c0f5cabd..52cbd24e 100644 --- a/mcsrc/src/vfs/fish/fish.c +++ b/mcsrc/src/vfs/shell/shell.c @@ -1,8 +1,8 @@ /* - Virtual File System: FISH implementation for transferring files over + Virtual File System: SHELL implementation for transferring files over shell connections. - Copyright (C) 1998-2023 + Copyright (C) 1998-2024 Free Software Foundation, Inc. Written by: @@ -32,20 +32,20 @@ /** * \file - * \brief Source: Virtual File System: FISH implementation for transferring files over + * \brief Source: Virtual File System: SHELL implementation for transferring files over * shell connections * \author Pavel Machek * \author Michal Svec * \date 1998, 2000 * * Derived from ftpfs.c - * Read README.fish for protocol specification. + * Read README.shell for protocol specification. * * Syntax of path is: \verbatim sh://user@host[:Cr]/path \endverbatim * where C means you want compressed connection, * and r means you want to use rsh * - * Namespace: fish_vfs_ops exported. + * Namespace: shell_vfs_ops exported. */ /* Define this if your ssh can take -I option */ @@ -65,7 +65,7 @@ #include "lib/fileloc.h" #include "lib/util.h" /* my_exit() */ #include "lib/mcconfig.h" -#if defined(WIN32) //WIN32, fish +#if defined(WIN32) //WIN32, shell #include "lib/widget.h" #include "win32_misc.h" #endif @@ -78,12 +78,12 @@ #include "lib/vfs/xdirentry.h" #include "lib/vfs/gc.h" /* vfs_stamp_create */ -#include "fish.h" -#include "fishdef.h" +#include "shell.h" +#include "shelldef.h" /*** global variables ****************************************************************************/ -int fish_directory_timeout = 900; +int shell_directory_timeout = 900; /*** file scope macro definitions ****************************************************************/ @@ -91,8 +91,8 @@ int fish_directory_timeout = 900; #define DO_OPEN 2 #define DO_FREE_RESOURCE 4 -#define FISH_FLAG_COMPRESSED 1 -#define FISH_FLAG_RSH 2 +#define SHELL_FLAG_COMPRESSED 1 +#define SHELL_FLAG_RSH 2 #define OPT_FLUSH 1 #define OPT_IGNORE_ERROR 2 @@ -115,16 +115,16 @@ int fish_directory_timeout = 900; #define WANT_STRING 0x02 /* environment flags */ -#define FISH_HAVE_HEAD 1 -#define FISH_HAVE_SED 2 -#define FISH_HAVE_AWK 4 -#define FISH_HAVE_PERL 8 -#define FISH_HAVE_LSQ 16 -#define FISH_HAVE_DATE_MDYT 32 -#define FISH_HAVE_TAIL 64 +#define SHELL_HAVE_HEAD 1 +#define SHELL_HAVE_SED 2 +#define SHELL_HAVE_AWK 4 +#define SHELL_HAVE_PERL 8 +#define SHELL_HAVE_LSQ 16 +#define SHELL_HAVE_DATE_MDYT 32 +#define SHELL_HAVE_TAIL 64 -#define FISH_SUPER(super) ((fish_super_t *) (super)) -#define FISH_FILE_HANDLER(fh) ((fish_file_handler_t *) fh) +#define SHELL_SUPER(super) ((shell_super_t *) (super)) +#define SHELL_FILE_HANDLER(fh) ((shell_file_handler_t *) fh) /*** file scope type declarations ****************************************************************/ @@ -160,7 +160,7 @@ typedef struct char *scr_info; int host_flags; GString *scr_env; -} fish_super_t; +} shell_super_t; typedef struct { @@ -169,7 +169,7 @@ typedef struct off_t got; off_t total; gboolean append; -} fish_file_handler_t; +} shell_file_handler_t; /*** forward declarations (file scope functions) *************************************************/ @@ -177,15 +177,15 @@ typedef struct static char reply_str[80]; -static struct vfs_s_subclass fish_subclass; -static struct vfs_class *vfs_fish_ops = VFS_CLASS (&fish_subclass); +static struct vfs_s_subclass shell_subclass; +static struct vfs_class *vfs_shell_ops = VFS_CLASS (&shell_subclass); /* --------------------------------------------------------------------------------------------- */ /*** file scope functions ************************************************************************/ /* --------------------------------------------------------------------------------------------- */ static void -fish_set_blksize (struct stat *s) +shell_set_blksize (struct stat *s) { #ifdef HAVE_STRUCT_STAT_ST_BLKSIZE /* redefine block size */ @@ -196,12 +196,12 @@ fish_set_blksize (struct stat *s) /* --------------------------------------------------------------------------------------------- */ static struct stat * -fish_default_stat (struct vfs_class *me) +shell_default_stat (struct vfs_class *me) { struct stat *s; s = vfs_s_default_stat (me, S_IFDIR | 0755); - fish_set_blksize (s); + shell_set_blksize (s); vfs_adjust_stat (s); return s; @@ -210,15 +210,16 @@ fish_default_stat (struct vfs_class *me) /* --------------------------------------------------------------------------------------------- */ static char * -fish_load_script_from_file (const char *hostname, const char *script_name, const char *def_content) +shell_load_script_from_file (const char *hostname, const char *script_name, const char *def_content) { char *scr_filename = NULL; char *scr_content; gsize scr_len = 0; /* 1st: scan user directory */ - scr_filename = g_build_path (PATH_SEP_STR, mc_config_get_data_path (), FISH_PREFIX, hostname, - script_name, (char *) NULL); + scr_filename = + g_build_path (PATH_SEP_STR, mc_config_get_data_path (), VFS_SHELL_PREFIX, hostname, + script_name, (char *) NULL); /* silent about user dir */ g_file_get_contents (scr_filename, &scr_content, &scr_len, NULL); g_free (scr_filename); @@ -226,7 +227,7 @@ fish_load_script_from_file (const char *hostname, const char *script_name, const if (scr_content == NULL) { scr_filename = - g_build_path (PATH_SEP_STR, LIBEXECDIR, FISH_PREFIX, script_name, (char *) NULL); + g_build_path (PATH_SEP_STR, LIBEXECDIR, VFS_SHELL_PREFIX, script_name, (char *) NULL); g_file_get_contents (scr_filename, &scr_content, &scr_len, NULL); g_free (scr_filename); } @@ -240,7 +241,7 @@ fish_load_script_from_file (const char *hostname, const char *script_name, const /* --------------------------------------------------------------------------------------------- */ static int -fish_decode_reply (char *s, gboolean was_garbage) +shell_decode_reply (char *s, gboolean was_garbage) { int code; @@ -259,7 +260,7 @@ fish_decode_reply (char *s, gboolean was_garbage) /* Returns a reply code, check /usr/include/arpa/ftp.h for possible values */ static int -fish_get_reply (struct vfs_class *me, int sock, char *string_buf, int string_len) +shell_get_reply (struct vfs_class *me, int sock, char *string_buf, int string_len) { char answer[BUF_1K]; gboolean was_garbage = FALSE; @@ -274,7 +275,7 @@ fish_get_reply (struct vfs_class *me, int sock, char *string_buf, int string_len } if (strncmp (answer, "### ", 4) == 0) - return fish_decode_reply (answer + 4, was_garbage ? 1 : 0); + return shell_decode_reply (answer + 4, was_garbage ? 1 : 0); was_garbage = TRUE; if (string_buf != NULL) @@ -285,8 +286,8 @@ fish_get_reply (struct vfs_class *me, int sock, char *string_buf, int string_len /* --------------------------------------------------------------------------------------------- */ static int -fish_command (struct vfs_class *me, struct vfs_s_super *super, int wait_reply, const char *cmd, - size_t cmd_len) +shell_command (struct vfs_class *me, struct vfs_s_super *super, int wait_reply, const char *cmd, + size_t cmd_len) { ssize_t status; FILE *logfile = me->logfile; @@ -304,16 +305,16 @@ fish_command (struct vfs_class *me, struct vfs_s_super *super, int wait_reply, c } tty_enable_interrupt_key (); - status = write (FISH_SUPER (super)->sockw, cmd, cmd_len); + status = write (SHELL_SUPER (super)->sockw, cmd, cmd_len); tty_disable_interrupt_key (); if (status < 0) return TRANSIENT; if (wait_reply) - return fish_get_reply (me, FISH_SUPER (super)->sockr, - (wait_reply & WANT_STRING) != 0 ? reply_str : - NULL, sizeof (reply_str) - 1); + return shell_get_reply (me, SHELL_SUPER (super)->sockr, + (wait_reply & WANT_STRING) != 0 ? reply_str : NULL, + sizeof (reply_str) - 1); return COMPLETE; } @@ -321,16 +322,16 @@ fish_command (struct vfs_class *me, struct vfs_s_super *super, int wait_reply, c static int G_GNUC_PRINTF (5, 0) -fish_command_va (struct vfs_class *me, struct vfs_s_super *super, int wait_reply, const char *scr, - const char *vars, va_list ap) +shell_command_va (struct vfs_class *me, struct vfs_s_super *super, int wait_reply, const char *scr, + const char *vars, va_list ap) { int r; GString *command; - command = mc_g_string_dup (FISH_SUPER (super)->scr_env); + command = mc_g_string_dup (SHELL_SUPER (super)->scr_env); g_string_append_vprintf (command, vars, ap); g_string_append (command, scr); - r = fish_command (me, super, wait_reply, command->str, command->len); + r = shell_command (me, super, wait_reply, command->str, command->len); g_string_free (command, TRUE); return r; @@ -340,14 +341,14 @@ fish_command_va (struct vfs_class *me, struct vfs_s_super *super, int wait_reply static int G_GNUC_PRINTF (5, 6) -fish_command_v (struct vfs_class *me, struct vfs_s_super *super, int wait_reply, const char *scr, - const char *vars, ...) +shell_command_v (struct vfs_class *me, struct vfs_s_super *super, int wait_reply, const char *scr, + const char *vars, ...) { int r; va_list ap; va_start (ap, vars); - r = fish_command_va (me, super, wait_reply, scr, vars, ap); + r = shell_command_va (me, super, wait_reply, scr, vars, ap); va_end (ap); return r; @@ -357,16 +358,16 @@ fish_command_v (struct vfs_class *me, struct vfs_s_super *super, int wait_reply, static int G_GNUC_PRINTF (5, 6) -fish_send_command (struct vfs_class *me, struct vfs_s_super *super, int flags, const char *scr, - const char *vars, ...) +shell_send_command (struct vfs_class *me, struct vfs_s_super *super, int flags, const char *scr, + const char *vars, ...) { int r; va_list ap; va_start (ap, vars); - r = fish_command_va (me, super, WAIT_REPLY, scr, vars, ap); + r = shell_command_va (me, super, WAIT_REPLY, scr, vars, ap); va_end (ap); - vfs_stamp_create (vfs_fish_ops, super); + vfs_stamp_create (vfs_shell_ops, super); if (r != COMPLETE) ERRNOR (E_REMOTE, -1); @@ -379,11 +380,11 @@ fish_send_command (struct vfs_class *me, struct vfs_s_super *super, int flags, c /* --------------------------------------------------------------------------------------------- */ static struct vfs_s_super * -fish_new_archive (struct vfs_class *me) +shell_new_archive (struct vfs_class *me) { - fish_super_t *arch; + shell_super_t *arch; - arch = g_new0 (fish_super_t, 1); + arch = g_new0 (shell_super_t, 1); arch->base.me = me; return VFS_SUPER (arch); @@ -392,51 +393,52 @@ fish_new_archive (struct vfs_class *me) /* --------------------------------------------------------------------------------------------- */ static void -fish_free_archive (struct vfs_class *me, struct vfs_s_super *super) +shell_free_archive (struct vfs_class *me, struct vfs_s_super *super) { - fish_super_t *fish_super = FISH_SUPER (super); + shell_super_t *shell_super = SHELL_SUPER (super); - if ((fish_super->sockw != -1) || (fish_super->sockr != -1)) - vfs_print_message (_("fish: Disconnecting from %s"), super->name ? super->name : "???"); + if ((shell_super->sockw != -1) || (shell_super->sockr != -1)) + vfs_print_message (_("shell: Disconnecting from %s"), super->name ? super->name : "???"); - if (fish_super->sockw != -1) + if (shell_super->sockw != -1) { - fish_command (me, super, NONE, "#BYE\nexit\n", -1); - close (fish_super->sockw); - fish_super->sockw = -1; + shell_command (me, super, NONE, "exit\n", -1); + close (shell_super->sockw); + shell_super->sockw = -1; } - if (fish_super->sockr != -1) + if (shell_super->sockr != -1) { - close (fish_super->sockr); - fish_super->sockr = -1; + close (shell_super->sockr); + shell_super->sockr = -1; } - g_free (fish_super->scr_ls); - g_free (fish_super->scr_exists); - g_free (fish_super->scr_mkdir); - g_free (fish_super->scr_unlink); - g_free (fish_super->scr_chown); - g_free (fish_super->scr_chmod); - g_free (fish_super->scr_utime); - g_free (fish_super->scr_rmdir); - g_free (fish_super->scr_ln); - g_free (fish_super->scr_mv); - g_free (fish_super->scr_hardlink); - g_free (fish_super->scr_get); - g_free (fish_super->scr_send); - g_free (fish_super->scr_append); - g_free (fish_super->scr_info); - g_string_free (fish_super->scr_env, TRUE); + g_free (shell_super->scr_ls); + g_free (shell_super->scr_exists); + g_free (shell_super->scr_mkdir); + g_free (shell_super->scr_unlink); + g_free (shell_super->scr_chown); + g_free (shell_super->scr_chmod); + g_free (shell_super->scr_utime); + g_free (shell_super->scr_rmdir); + g_free (shell_super->scr_ln); + g_free (shell_super->scr_mv); + g_free (shell_super->scr_hardlink); + g_free (shell_super->scr_get); + g_free (shell_super->scr_send); + g_free (shell_super->scr_append); + g_free (shell_super->scr_info); + if (shell_super->scr_env != NULL) + g_string_free (shell_super->scr_env, TRUE); } /* --------------------------------------------------------------------------------------------- */ static void -fish_pipeopen (struct vfs_s_super *super, const char *path, const char *argv[]) +shell_pipeopen (struct vfs_s_super *super, const char *path, const char *argv[]) { -#if defined(WIN32) //WIN32, fish - fish_super_t *fish_super = FISH_SUPER (super); +#if defined(WIN32) //WIN32, shell + shell_super_t *shell_super = SHELL_SUPER (super); char cmd[1024], t_path[MAX_PATH] = {0}; GError *error = NULL; int fds[2] = {-1, -1}; @@ -497,8 +499,8 @@ fish_pipeopen (struct vfs_s_super *super, const char *path, const char *argv[]) g_error_free (error); } - fish_super->sockr = fds[0]; - fish_super->sockw = fds[1]; + shell_super->sockr = fds[0]; + shell_super->sockw = fds[1]; #else int fileset1[2], fileset2[2]; @@ -515,9 +517,9 @@ fish_pipeopen (struct vfs_s_super *super, const char *path, const char *argv[]) vfs_die ("Cannot fork(): %m."); /* We are the parent */ close (fileset1[0]); - FISH_SUPER (super)->sockw = fileset1[1]; + SHELL_SUPER (super)->sockw = fileset1[1]; close (fileset2[1]); - FISH_SUPER (super)->sockr = fileset2[0]; + SHELL_SUPER (super)->sockr = fileset2[0]; } else { @@ -539,32 +541,32 @@ fish_pipeopen (struct vfs_s_super *super, const char *path, const char *argv[]) /* --------------------------------------------------------------------------------------------- */ static GString * -fish_set_env (int flags) +shell_set_env (int flags) { GString *ret; ret = g_string_sized_new (256); - if ((flags & FISH_HAVE_HEAD) != 0) - g_string_append (ret, "FISH_HAVE_HEAD=1 export FISH_HAVE_HEAD; "); + if ((flags & SHELL_HAVE_HEAD) != 0) + g_string_append (ret, "SHELL_HAVE_HEAD=1 export SHELL_HAVE_HEAD; "); - if ((flags & FISH_HAVE_SED) != 0) - g_string_append (ret, "FISH_HAVE_SED=1 export FISH_HAVE_SED; "); + if ((flags & SHELL_HAVE_SED) != 0) + g_string_append (ret, "SHELL_HAVE_SED=1 export SHELL_HAVE_SED; "); - if ((flags & FISH_HAVE_AWK) != 0) - g_string_append (ret, "FISH_HAVE_AWK=1 export FISH_HAVE_AWK; "); + if ((flags & SHELL_HAVE_AWK) != 0) + g_string_append (ret, "SHELL_HAVE_AWK=1 export SHELL_HAVE_AWK; "); - if ((flags & FISH_HAVE_PERL) != 0) - g_string_append (ret, "FISH_HAVE_PERL=1 export FISH_HAVE_PERL; "); + if ((flags & SHELL_HAVE_PERL) != 0) + g_string_append (ret, "SHELL_HAVE_PERL=1 export SHELL_HAVE_PERL; "); - if ((flags & FISH_HAVE_LSQ) != 0) - g_string_append (ret, "FISH_HAVE_LSQ=1 export FISH_HAVE_LSQ; "); + if ((flags & SHELL_HAVE_LSQ) != 0) + g_string_append (ret, "SHELL_HAVE_LSQ=1 export SHELL_HAVE_LSQ; "); - if ((flags & FISH_HAVE_DATE_MDYT) != 0) - g_string_append (ret, "FISH_HAVE_DATE_MDYT=1 export FISH_HAVE_DATE_MDYT; "); + if ((flags & SHELL_HAVE_DATE_MDYT) != 0) + g_string_append (ret, "SHELL_HAVE_DATE_MDYT=1 export SHELL_HAVE_DATE_MDYT; "); - if ((flags & FISH_HAVE_TAIL) != 0) - g_string_append (ret, "FISH_HAVE_TAIL=1 export FISH_HAVE_TAIL; "); + if ((flags & SHELL_HAVE_TAIL) != 0) + g_string_append (ret, "SHELL_HAVE_TAIL=1 export SHELL_HAVE_TAIL; "); return ret; } @@ -572,23 +574,23 @@ fish_set_env (int flags) /* --------------------------------------------------------------------------------------------- */ static gboolean -fish_info (struct vfs_class *me, struct vfs_s_super *super) +shell_info (struct vfs_class *me, struct vfs_s_super *super) { - fish_super_t *fish_super = FISH_SUPER (super); + shell_super_t *shell_super = SHELL_SUPER (super); - if (fish_command (me, super, NONE, fish_super->scr_info, -1) == COMPLETE) + if (shell_command (me, super, NONE, shell_super->scr_info, -1) == COMPLETE) { while (TRUE) { int res; char buffer[BUF_8K] = ""; - res = vfs_s_get_line_interruptible (me, buffer, sizeof (buffer), fish_super->sockr); + res = vfs_s_get_line_interruptible (me, buffer, sizeof (buffer), shell_super->sockr); if ((res == 0) || (res == EINTR)) ERRNOR (ECONNRESET, FALSE); if (strncmp (buffer, "### ", 4) == 0) break; - fish_super->host_flags = atol (buffer); + shell_super->host_flags = atol (buffer); } return TRUE; } @@ -598,18 +600,18 @@ fish_info (struct vfs_class *me, struct vfs_s_super *super) /* --------------------------------------------------------------------------------------------- */ static void -fish_open_archive_pipeopen (struct vfs_s_super *super) +shell_open_archive_pipeopen (struct vfs_s_super *super) { char gbuf[10]; const char *argv[10]; /* All of 10 is used now */ - const char *xsh = (super->path_element->port == FISH_FLAG_RSH ? "rsh" : "ssh"); + const char *xsh = (super->path_element->port == SHELL_FLAG_RSH ? "rsh" : "ssh"); int i = 0; argv[i++] = xsh; - if (super->path_element->port == FISH_FLAG_COMPRESSED) + if (super->path_element->port == SHELL_FLAG_COMPRESSED) argv[i++] = "-C"; - if (super->path_element->port > FISH_FLAG_RSH) + if (super->path_element->port > SHELL_FLAG_RSH) { argv[i++] = "-p"; g_snprintf (gbuf, sizeof (gbuf), "%d", super->path_element->port); @@ -635,23 +637,23 @@ fish_open_archive_pipeopen (struct vfs_s_super *super) } argv[i++] = super->path_element->host; - argv[i++] = "echo FISH:; /bin/sh"; + argv[i++] = "echo SHELL:; /bin/sh"; argv[i++] = NULL; - fish_pipeopen (super, xsh, argv); + shell_pipeopen (super, xsh, argv); } /* --------------------------------------------------------------------------------------------- */ static gboolean -fish_open_archive_talk (struct vfs_class *me, struct vfs_s_super *super) +shell_open_archive_talk (struct vfs_class *me, struct vfs_s_super *super) { - fish_super_t *fish_super = FISH_SUPER (super); + shell_super_t *shell_super = SHELL_SUPER (super); char answer[2048]; - printf ("\n%s\n", _("fish: Waiting for initial line...")); + printf ("\n%s\n", _("shell: Waiting for initial line...")); - if (vfs_s_get_line (me, fish_super->sockr, answer, sizeof (answer), ':') == 0) + if (vfs_s_get_line (me, shell_super->sockr, answer, sizeof (answer), ':') == 0) return FALSE; if (strstr (answer, "assword") != NULL) @@ -667,7 +669,8 @@ fish_open_archive_talk (struct vfs_class *me, struct vfs_s_super *super) { char *p, *op; - p = g_strdup_printf (_("fish: Password is required for %s"), super->path_element->user); + p = g_strdup_printf (_("shell: Password is required for %s"), + super->path_element->user); op = vfs_get_password (p); g_free (p); if (op == NULL) @@ -675,14 +678,14 @@ fish_open_archive_talk (struct vfs_class *me, struct vfs_s_super *super) super->path_element->password = op; } - printf ("\n%s\n", _("fish: Sending password...")); + printf ("\n%s\n", _("shell: Sending password...")); { size_t str_len; str_len = strlen (super->path_element->password); - if ((write (fish_super.sockw, super->path_element->password, str_len) != - (ssize_t) str_len) || (write (fish_super->sockw, "\n", 1) != 1)) + if ((write (shell_super.sockw, super->path_element->password, str_len) != + (ssize_t) str_len) || (write (shell_super->sockw, "\n", 1) != 1)) return FALSE; } #endif @@ -693,7 +696,7 @@ fish_open_archive_talk (struct vfs_class *me, struct vfs_s_super *super) /* --------------------------------------------------------------------------------------------- */ static int -fish_open_archive_int (struct vfs_class *me, struct vfs_s_super *super) +shell_open_archive_int (struct vfs_class *me, struct vfs_s_super *super) { gboolean ftalk; @@ -701,10 +704,10 @@ fish_open_archive_int (struct vfs_class *me, struct vfs_s_super *super) pre_exec (); /* open pipe */ - fish_open_archive_pipeopen (super); + shell_open_archive_pipeopen (super); /* Start talk with ssh-server (password prompt, etc ) */ - ftalk = fish_open_archive_talk (me, super); + ftalk = shell_open_archive_talk (me, super); /* show panels */ post_exec (); @@ -712,31 +715,18 @@ fish_open_archive_int (struct vfs_class *me, struct vfs_s_super *super) if (!ftalk) ERRNOR (E_PROTO, -1); - vfs_print_message ("%s", _("fish: Sending initial line...")); - /* - * Run 'start_fish_server'. If it doesn't exist - no problem, - * we'll talk directly to the shell. - */ - - if (fish_command - (me, super, WAIT_REPLY, "#FISH\necho; start_fish_server 2>&1; echo '### 200'\n", - -1) != COMPLETE) - ERRNOR (E_PROTO, -1); - - vfs_print_message ("%s", _("fish: Handshaking version...")); - if (fish_command (me, super, WAIT_REPLY, "#VER 0.0.3\necho '### 000'\n", -1) != COMPLETE) - ERRNOR (E_PROTO, -1); + vfs_print_message ("%s", _("shell: Sending initial line...")); /* Set up remote locale to C, otherwise dates cannot be recognized */ - if (fish_command + if (shell_command (me, super, WAIT_REPLY, "LANG=C LC_ALL=C LC_TIME=C; export LANG LC_ALL LC_TIME;\n" "echo '### 200'\n", -1) != COMPLETE) ERRNOR (E_PROTO, -1); - vfs_print_message ("%s", _("fish: Getting host info...")); - if (fish_info (me, super)) - FISH_SUPER (super)->scr_env = fish_set_env (FISH_SUPER (super)->host_flags); + vfs_print_message ("%s", _("shell: Getting host info...")); + if (shell_info (me, super)) + SHELL_SUPER (super)->scr_env = shell_set_env (SHELL_SUPER (super)->host_flags); #if 0 super->name = @@ -746,7 +736,7 @@ fish_open_archive_int (struct vfs_class *me, struct vfs_s_super *super) super->name = g_strdup (PATH_SEP_STR); #endif - super->root = vfs_s_new_inode (me, super, fish_default_stat (me)); + super->root = vfs_s_new_inode (me, super, shell_default_stat (me)); return 0; } @@ -754,68 +744,72 @@ fish_open_archive_int (struct vfs_class *me, struct vfs_s_super *super) /* --------------------------------------------------------------------------------------------- */ static int -fish_open_archive (struct vfs_s_super *super, - const vfs_path_t * vpath, const vfs_path_element_t * vpath_element) +shell_open_archive (struct vfs_s_super *super, + const vfs_path_t * vpath, const vfs_path_element_t * vpath_element) { - fish_super_t *fish_super = FISH_SUPER (super); + shell_super_t *shell_super = SHELL_SUPER (super); (void) vpath; super->path_element = vfs_path_element_clone (vpath_element); if (strncmp (vpath_element->vfs_prefix, "rsh", 3) == 0) - super->path_element->port = FISH_FLAG_RSH; - - fish_super->scr_ls = - fish_load_script_from_file (super->path_element->host, FISH_LS_FILE, FISH_LS_DEF_CONTENT); - fish_super->scr_exists = - fish_load_script_from_file (super->path_element->host, FISH_EXISTS_FILE, - FISH_EXISTS_DEF_CONTENT); - fish_super->scr_mkdir = - fish_load_script_from_file (super->path_element->host, FISH_MKDIR_FILE, - FISH_MKDIR_DEF_CONTENT); - fish_super->scr_unlink = - fish_load_script_from_file (super->path_element->host, FISH_UNLINK_FILE, - FISH_UNLINK_DEF_CONTENT); - fish_super->scr_chown = - fish_load_script_from_file (super->path_element->host, FISH_CHOWN_FILE, - FISH_CHOWN_DEF_CONTENT); - fish_super->scr_chmod = - fish_load_script_from_file (super->path_element->host, FISH_CHMOD_FILE, - FISH_CHMOD_DEF_CONTENT); - fish_super->scr_utime = - fish_load_script_from_file (super->path_element->host, FISH_UTIME_FILE, - FISH_UTIME_DEF_CONTENT); - fish_super->scr_rmdir = - fish_load_script_from_file (super->path_element->host, FISH_RMDIR_FILE, - FISH_RMDIR_DEF_CONTENT); - fish_super->scr_ln = - fish_load_script_from_file (super->path_element->host, FISH_LN_FILE, FISH_LN_DEF_CONTENT); - fish_super->scr_mv = - fish_load_script_from_file (super->path_element->host, FISH_MV_FILE, FISH_MV_DEF_CONTENT); - fish_super->scr_hardlink = - fish_load_script_from_file (super->path_element->host, FISH_HARDLINK_FILE, - FISH_HARDLINK_DEF_CONTENT); - fish_super->scr_get = - fish_load_script_from_file (super->path_element->host, FISH_GET_FILE, FISH_GET_DEF_CONTENT); - fish_super->scr_send = - fish_load_script_from_file (super->path_element->host, FISH_SEND_FILE, - FISH_SEND_DEF_CONTENT); - fish_super->scr_append = - fish_load_script_from_file (super->path_element->host, FISH_APPEND_FILE, - FISH_APPEND_DEF_CONTENT); - fish_super->scr_info = - fish_load_script_from_file (super->path_element->host, FISH_INFO_FILE, - FISH_INFO_DEF_CONTENT); - - return fish_open_archive_int (vpath_element->class, super); + super->path_element->port = SHELL_FLAG_RSH; + + shell_super->scr_ls = + shell_load_script_from_file (super->path_element->host, VFS_SHELL_LS_FILE, + VFS_SHELL_LS_DEF_CONTENT); + shell_super->scr_exists = + shell_load_script_from_file (super->path_element->host, VFS_SHELL_EXISTS_FILE, + VFS_SHELL_EXISTS_DEF_CONTENT); + shell_super->scr_mkdir = + shell_load_script_from_file (super->path_element->host, VFS_SHELL_MKDIR_FILE, + VFS_SHELL_MKDIR_DEF_CONTENT); + shell_super->scr_unlink = + shell_load_script_from_file (super->path_element->host, VFS_SHELL_UNLINK_FILE, + VFS_SHELL_UNLINK_DEF_CONTENT); + shell_super->scr_chown = + shell_load_script_from_file (super->path_element->host, VFS_SHELL_CHOWN_FILE, + VFS_SHELL_CHOWN_DEF_CONTENT); + shell_super->scr_chmod = + shell_load_script_from_file (super->path_element->host, VFS_SHELL_CHMOD_FILE, + VFS_SHELL_CHMOD_DEF_CONTENT); + shell_super->scr_utime = + shell_load_script_from_file (super->path_element->host, VFS_SHELL_UTIME_FILE, + VFS_SHELL_UTIME_DEF_CONTENT); + shell_super->scr_rmdir = + shell_load_script_from_file (super->path_element->host, VFS_SHELL_RMDIR_FILE, + VFS_SHELL_RMDIR_DEF_CONTENT); + shell_super->scr_ln = + shell_load_script_from_file (super->path_element->host, VFS_SHELL_LN_FILE, + VFS_SHELL_LN_DEF_CONTENT); + shell_super->scr_mv = + shell_load_script_from_file (super->path_element->host, VFS_SHELL_MV_FILE, + VFS_SHELL_MV_DEF_CONTENT); + shell_super->scr_hardlink = + shell_load_script_from_file (super->path_element->host, VFS_SHELL_HARDLINK_FILE, + VFS_SHELL_HARDLINK_DEF_CONTENT); + shell_super->scr_get = + shell_load_script_from_file (super->path_element->host, VFS_SHELL_GET_FILE, + VFS_SHELL_GET_DEF_CONTENT); + shell_super->scr_send = + shell_load_script_from_file (super->path_element->host, VFS_SHELL_SEND_FILE, + VFS_SHELL_SEND_DEF_CONTENT); + shell_super->scr_append = + shell_load_script_from_file (super->path_element->host, VFS_SHELL_APPEND_FILE, + VFS_SHELL_APPEND_DEF_CONTENT); + shell_super->scr_info = + shell_load_script_from_file (super->path_element->host, VFS_SHELL_INFO_FILE, + VFS_SHELL_INFO_DEF_CONTENT); + + return shell_open_archive_int (vpath_element->class, super); } /* --------------------------------------------------------------------------------------------- */ static int -fish_archive_same (const vfs_path_element_t * vpath_element, struct vfs_s_super *super, - const vfs_path_t * vpath, void *cookie) +shell_archive_same (const vfs_path_element_t * vpath_element, struct vfs_s_super *super, + const vfs_path_t * vpath, void *cookie) { vfs_path_element_t *path_element; int result; @@ -840,7 +834,7 @@ fish_archive_same (const vfs_path_element_t * vpath_element, struct vfs_s_super /* --------------------------------------------------------------------------------------------- */ static void -fish_parse_ls (char *buffer, struct vfs_s_entry *ent) +shell_parse_ls (char *buffer, struct vfs_s_entry *ent) { #define ST ent->ino->st @@ -869,7 +863,6 @@ fish_parse_ls (char *buffer, struct vfs_s_entry *ent) // -> cannot occur in filenames, // because it will be escaped to -\> */ - linkname_bound = filename_bound; if (*filename == '"') @@ -931,7 +924,7 @@ fish_parse_ls (char *buffer, struct vfs_s_entry *ent) case 'P': { size_t skipped; -#if defined(WIN32) //WIN32, fish +#if defined(WIN32) //WIN32, shell mode_t st_mode = 0; vfs_parse_filemode (buffer, &skipped, &st_mode); ST.st_mode = st_mode; @@ -949,7 +942,7 @@ fish_parse_ls (char *buffer, struct vfs_s_entry *ent) */ size_t skipped; -#if defined(WIN32) //WIN32, fish +#if defined(WIN32) //WIN32, shell mode_t st_mode = 0; vfs_parse_raw_filemode (buffer, &skipped, &st_mode); ST.st_mode = st_mode; @@ -1008,7 +1001,7 @@ fish_parse_ls (char *buffer, struct vfs_s_entry *ent) /* --------------------------------------------------------------------------------------------- */ static int -fish_dir_load (struct vfs_class *me, struct vfs_s_inode *dir, const char *remote_path) +shell_dir_load (struct vfs_class *me, struct vfs_s_inode *dir, const char *remote_path) { struct vfs_s_super *super = dir->super; char buffer[BUF_8K] = "\0"; @@ -1017,20 +1010,20 @@ fish_dir_load (struct vfs_class *me, struct vfs_s_inode *dir, const char *remote int reply_code; /* - * Simple FISH debug interface :] + * Simple SHELL debug interface :] */ #if 0 if (me->logfile == NULL) - me->logfile = fopen ("/tmp/mc-FISH.sh", "w"); + me->logfile = fopen ("/tmp/mc-SHELL.sh", "w"); #endif - vfs_print_message (_("fish: Reading directory %s..."), remote_path); + vfs_print_message (_("shell: Reading directory %s..."), remote_path); - dir->timestamp = g_get_monotonic_time () + fish_directory_timeout * G_USEC_PER_SEC; + dir->timestamp = g_get_monotonic_time () + shell_directory_timeout * G_USEC_PER_SEC; quoted_path = strutils_shell_escape (remote_path); - (void) fish_command_v (me, super, NONE, FISH_SUPER (super)->scr_ls, "FISH_FILENAME=%s;\n", - quoted_path); + (void) shell_command_v (me, super, NONE, SHELL_SUPER (super)->scr_ls, "SHELL_FILENAME=%s;\n", + quoted_path); g_free (quoted_path); ent = vfs_s_generate_entry (me, NULL, dir, 0); @@ -1039,7 +1032,8 @@ fish_dir_load (struct vfs_class *me, struct vfs_s_inode *dir, const char *remote { int res; - res = vfs_s_get_line_interruptible (me, buffer, sizeof (buffer), FISH_SUPER (super)->sockr); + res = + vfs_s_get_line_interruptible (me, buffer, sizeof (buffer), SHELL_SUPER (super)->sockr); if ((res == 0) || (res == EINTR)) { @@ -1057,7 +1051,7 @@ fish_dir_load (struct vfs_class *me, struct vfs_s_inode *dir, const char *remote break; if (buffer[0] != '\0') - fish_parse_ls (buffer, ent); + shell_parse_ls (buffer, ent); else if (ent->name != NULL) { vfs_s_insert_entry (me, dir, ent); @@ -1066,7 +1060,7 @@ fish_dir_load (struct vfs_class *me, struct vfs_s_inode *dir, const char *remote } vfs_s_free_entry (me, ent); - reply_code = fish_decode_reply (buffer + 4, 0); + reply_code = shell_decode_reply (buffer + 4, 0); if (reply_code == COMPLETE) { vfs_print_message (_("%s: done."), me->name); @@ -1083,11 +1077,11 @@ fish_dir_load (struct vfs_class *me, struct vfs_s_inode *dir, const char *remote /* --------------------------------------------------------------------------------------------- */ static int -fish_file_store (struct vfs_class *me, vfs_file_handler_t * fh, char *name, char *localname) +shell_file_store (struct vfs_class *me, vfs_file_handler_t * fh, char *name, char *localname) { - fish_file_handler_t *fish = FISH_FILE_HANDLER (fh); + shell_file_handler_t *shell = SHELL_FILE_HANDLER (fh); struct vfs_s_super *super = VFS_FILE_HANDLER_SUPER (fh); - fish_super_t *fish_super = FISH_SUPER (super); + shell_super_t *shell_super = SHELL_SUPER (super); int code; off_t total = 0; char buffer[BUF_8K]; @@ -1134,14 +1128,14 @@ fish_file_store (struct vfs_class *me, vfs_file_handler_t * fh, char *name, char */ quoted_name = strutils_shell_escape (name); - vfs_print_message (_("fish: store %s: sending command..."), quoted_name); + vfs_print_message (_("shell: store %s: sending command..."), quoted_name); /* FIXME: File size is limited to ULONG_MAX */ code = - fish_command_v (me, super, WAIT_REPLY, - fish->append ? fish_super->scr_append : fish_super->scr_send, - "FISH_FILENAME=%s FISH_FILESIZE=%" PRIuMAX ";\n", quoted_name, - (uintmax_t) s.st_size); + shell_command_v (me, super, WAIT_REPLY, + shell->append ? shell_super->scr_append : shell_super->scr_send, + "SHELL_FILENAME=%s SHELL_FILESIZE=%" PRIuMAX ";\n", quoted_name, + (uintmax_t) s.st_size); g_free (quoted_name); if (code != PRELIM) @@ -1158,7 +1152,7 @@ fish_file_store (struct vfs_class *me, vfs_file_handler_t * fh, char *name, char { if ((errno == EINTR) && tty_got_interrupt ()) continue; - vfs_print_message ("%s", _("fish: Local read failed, sending zeros")); + vfs_print_message ("%s", _("shell: Local read failed, sending zeros")); close (h); h = open ("/dev/zero", O_RDONLY); } @@ -1166,7 +1160,7 @@ fish_file_store (struct vfs_class *me, vfs_file_handler_t * fh, char *name, char if (n == 0) break; - t = write (fish_super->sockw, buffer, n); + t = write (shell_super->sockw, buffer, n); if (t != n) { if (t == -1) @@ -1177,27 +1171,27 @@ fish_file_store (struct vfs_class *me, vfs_file_handler_t * fh, char *name, char } tty_disable_interrupt_key (); total += n; - vfs_print_message ("%s: %" PRIuMAX "/%" PRIuMAX, _("fish: storing file"), + vfs_print_message ("%s: %" PRIuMAX "/%" PRIuMAX, _("shell: storing file"), (uintmax_t) total, (uintmax_t) s.st_size); } close (h); - if (fish_get_reply (me, fish_super->sockr, NULL, 0) != COMPLETE) + if (shell_get_reply (me, shell_super->sockr, NULL, 0) != COMPLETE) ERRNOR (E_REMOTE, -1); return 0; error_return: close (h); - fish_get_reply (me, fish_super->sockr, NULL, 0); + shell_get_reply (me, shell_super->sockr, NULL, 0); return -1; } /* --------------------------------------------------------------------------------------------- */ static int -fish_linear_start (struct vfs_class *me, vfs_file_handler_t * fh, off_t offset) +shell_linear_start (struct vfs_class *me, vfs_file_handler_t * fh, off_t offset) { - fish_file_handler_t *fish = FISH_FILE_HANDLER (fh); + shell_file_handler_t *shell = SHELL_FILE_HANDLER (fh); struct vfs_s_super *super = VFS_FILE_HANDLER_SUPER (fh); char *name; char *quoted_name; @@ -1207,7 +1201,7 @@ fish_linear_start (struct vfs_class *me, vfs_file_handler_t * fh, off_t offset) return 0; quoted_name = strutils_shell_escape (name); g_free (name); - fish->append = FALSE; + shell->append = FALSE; /* * Check whether the remote file is readable by using 'dd' to copy @@ -1217,20 +1211,20 @@ fish_linear_start (struct vfs_class *me, vfs_file_handler_t * fh, off_t offset) */ offset = - fish_command_v (me, super, WANT_STRING, FISH_SUPER (super)->scr_get, - "FISH_FILENAME=%s FISH_START_OFFSET=%" PRIuMAX ";\n", quoted_name, - (uintmax_t) offset); + shell_command_v (me, super, WANT_STRING, SHELL_SUPER (super)->scr_get, + "SHELL_FILENAME=%s SHELL_START_OFFSET=%" PRIuMAX ";\n", quoted_name, + (uintmax_t) offset); g_free (quoted_name); if (offset != PRELIM) ERRNOR (E_REMOTE, 0); fh->linear = LS_LINEAR_OPEN; - fish->got = 0; + shell->got = 0; errno = 0; #if SIZEOF_OFF_T == SIZEOF_LONG - fish->total = (off_t) strtol (reply_str, NULL, 10); + shell->total = (off_t) strtol (reply_str, NULL, 10); #else - fish->total = (off_t) g_ascii_strtoll (reply_str, NULL, 10); + shell->total = (off_t) g_ascii_strtoll (reply_str, NULL, 10); #endif if (errno != 0) ERRNOR (E_REMOTE, 0); @@ -1240,9 +1234,9 @@ fish_linear_start (struct vfs_class *me, vfs_file_handler_t * fh, off_t offset) /* --------------------------------------------------------------------------------------------- */ static void -fish_linear_abort (struct vfs_class *me, vfs_file_handler_t * fh) +shell_linear_abort (struct vfs_class *me, vfs_file_handler_t * fh) { - fish_file_handler_t *fish = FISH_FILE_HANDLER (fh); + shell_file_handler_t *shell = SHELL_FILE_HANDLER (fh); struct vfs_s_super *super = VFS_FILE_HANDLER_SUPER (fh); char buffer[BUF_8K]; ssize_t n; @@ -1251,18 +1245,18 @@ fish_linear_abort (struct vfs_class *me, vfs_file_handler_t * fh) do { - n = MIN ((off_t) sizeof (buffer), (fish->total - fish->got)); + n = MIN ((off_t) sizeof (buffer), (shell->total - shell->got)); if (n != 0) { - n = read (FISH_SUPER (super)->sockr, buffer, n); + n = read (SHELL_SUPER (super)->sockr, buffer, n); if (n < 0) return; - fish->got += n; + shell->got += n; } } while (n != 0); - if (fish_get_reply (me, FISH_SUPER (super)->sockr, NULL, 0) != COMPLETE) + if (shell_get_reply (me, SHELL_SUPER (super)->sockr, NULL, 0) != COMPLETE) vfs_print_message ("%s", _("Error reported after abort.")); else vfs_print_message ("%s", _("Aborted transfer would be successful.")); @@ -1271,15 +1265,15 @@ fish_linear_abort (struct vfs_class *me, vfs_file_handler_t * fh) /* --------------------------------------------------------------------------------------------- */ static ssize_t -fish_linear_read (struct vfs_class *me, vfs_file_handler_t * fh, void *buf, size_t len) +shell_linear_read (struct vfs_class *me, vfs_file_handler_t * fh, void *buf, size_t len) { - fish_file_handler_t *fish = FISH_FILE_HANDLER (fh); + shell_file_handler_t *shell = SHELL_FILE_HANDLER (fh); struct vfs_s_super *super = VFS_FILE_HANDLER_SUPER (fh); ssize_t n = 0; - len = MIN ((size_t) (fish->total - fish->got), len); + len = MIN ((size_t) (shell->total - shell->got), len); tty_disable_interrupt_key (); - while (len != 0 && ((n = read (FISH_SUPER (super)->sockr, buf, len)) < 0)) + while (len != 0 && ((n = read (SHELL_SUPER (super)->sockr, buf, len)) < 0)) { if ((errno == EINTR) && !tty_got_interrupt ()) continue; @@ -1288,10 +1282,10 @@ fish_linear_read (struct vfs_class *me, vfs_file_handler_t * fh, void *buf, size tty_enable_interrupt_key (); if (n > 0) - fish->got += n; + shell->got += n; else if (n < 0) - fish_linear_abort (me, fh); - else if (fish_get_reply (me, FISH_SUPER (super)->sockr, NULL, 0) != COMPLETE) + shell_linear_abort (me, fh); + else if (shell_get_reply (me, SHELL_SUPER (super)->sockr, NULL, 0) != COMPLETE) ERRNOR (E_REMOTE, -1); ERRNOR (errno, n); } @@ -1299,18 +1293,18 @@ fish_linear_read (struct vfs_class *me, vfs_file_handler_t * fh, void *buf, size /* --------------------------------------------------------------------------------------------- */ static void -fish_linear_close (struct vfs_class *me, vfs_file_handler_t * fh) +shell_linear_close (struct vfs_class *me, vfs_file_handler_t * fh) { - fish_file_handler_t *fish = FISH_FILE_HANDLER (fh); + shell_file_handler_t *shell = SHELL_FILE_HANDLER (fh); - if (fish->total != fish->got) - fish_linear_abort (me, fh); + if (shell->total != shell->got) + shell_linear_abort (me, fh); } /* --------------------------------------------------------------------------------------------- */ static int -fish_ctl (void *fh, int ctlop, void *arg) +shell_ctl (void *fh, int ctlop, void *arg) { (void) arg; (void) fh; @@ -1331,7 +1325,7 @@ fish_ctl (void *fh, int ctlop, void *arg) if (file->linear == LS_LINEAR_CLOSED || file->linear == LS_LINEAR_PREOPEN) return 0; - v = vfs_s_select_on_two (VFS_FILE_HANDLER_SUPER (fh)->u.fish.sockr, 0); + v = vfs_s_select_on_two (VFS_FILE_HANDLER_SUPER (fh)->u.shell.sockr, 0); return (((v < 0) && (errno == EINTR)) || v == 0) ? 1 : 0; } @@ -1344,7 +1338,7 @@ fish_ctl (void *fh, int ctlop, void *arg) /* --------------------------------------------------------------------------------------------- */ static int -fish_rename (const vfs_path_t * vpath1, const vfs_path_t * vpath2) +shell_rename (const vfs_path_t * vpath1, const vfs_path_t * vpath2) { const char *crpath1, *crpath2; char *rpath1, *rpath2; @@ -1366,8 +1360,8 @@ fish_rename (const vfs_path_t * vpath1, const vfs_path_t * vpath2) me = VFS_CLASS (vfs_path_get_last_path_vfs (vpath1)); ret = - fish_send_command (me, super2, OPT_FLUSH, FISH_SUPER (super)->scr_mv, - "FISH_FILEFROM=%s FISH_FILETO=%s;\n", rpath1, rpath2); + shell_send_command (me, super2, OPT_FLUSH, SHELL_SUPER (super)->scr_mv, + "SHELL_FILEFROM=%s SHELL_FILETO=%s;\n", rpath1, rpath2); g_free (rpath1); g_free (rpath2); @@ -1378,7 +1372,7 @@ fish_rename (const vfs_path_t * vpath1, const vfs_path_t * vpath2) /* --------------------------------------------------------------------------------------------- */ static int -fish_link (const vfs_path_t * vpath1, const vfs_path_t * vpath2) +shell_link (const vfs_path_t * vpath1, const vfs_path_t * vpath2) { const char *crpath1, *crpath2; char *rpath1, *rpath2; @@ -1400,8 +1394,8 @@ fish_link (const vfs_path_t * vpath1, const vfs_path_t * vpath2) me = VFS_CLASS (vfs_path_get_last_path_vfs (vpath1)); ret = - fish_send_command (me, super2, OPT_FLUSH, FISH_SUPER (super)->scr_hardlink, - "FISH_FILEFROM=%s FISH_FILETO=%s;\n", rpath1, rpath2); + shell_send_command (me, super2, OPT_FLUSH, SHELL_SUPER (super)->scr_hardlink, + "SHELL_FILEFROM=%s SHELL_FILETO=%s;\n", rpath1, rpath2); g_free (rpath1); g_free (rpath2); @@ -1412,7 +1406,7 @@ fish_link (const vfs_path_t * vpath1, const vfs_path_t * vpath2) /* --------------------------------------------------------------------------------------------- */ static int -fish_symlink (const vfs_path_t * vpath1, const vfs_path_t * vpath2) +shell_symlink (const vfs_path_t * vpath1, const vfs_path_t * vpath2) { char *qsetto; const char *crpath; @@ -1431,8 +1425,8 @@ fish_symlink (const vfs_path_t * vpath1, const vfs_path_t * vpath2) me = VFS_CLASS (vfs_path_get_last_path_vfs (vpath2)); ret = - fish_send_command (me, super, OPT_FLUSH, FISH_SUPER (super)->scr_ln, - "FISH_FILEFROM=%s FISH_FILETO=%s;\n", qsetto, rpath); + shell_send_command (me, super, OPT_FLUSH, SHELL_SUPER (super)->scr_ln, + "SHELL_FILEFROM=%s SHELL_FILETO=%s;\n", qsetto, rpath); g_free (qsetto); g_free (rpath); @@ -1443,43 +1437,43 @@ fish_symlink (const vfs_path_t * vpath1, const vfs_path_t * vpath2) /* --------------------------------------------------------------------------------------------- */ static int -fish_stat (const vfs_path_t * vpath, struct stat *buf) +shell_stat (const vfs_path_t * vpath, struct stat *buf) { int ret; ret = vfs_s_stat (vpath, buf); - fish_set_blksize (buf); + shell_set_blksize (buf); return ret; } /* --------------------------------------------------------------------------------------------- */ static int -fish_lstat (const vfs_path_t * vpath, struct stat *buf) +shell_lstat (const vfs_path_t * vpath, struct stat *buf) { int ret; ret = vfs_s_lstat (vpath, buf); - fish_set_blksize (buf); + shell_set_blksize (buf); return ret; } /* --------------------------------------------------------------------------------------------- */ static int -fish_fstat (void *vfs_info, struct stat *buf) +shell_fstat (void *vfs_info, struct stat *buf) { int ret; ret = vfs_s_fstat (vfs_info, buf); - fish_set_blksize (buf); + shell_set_blksize (buf); return ret; } /* --------------------------------------------------------------------------------------------- */ static int -fish_chmod (const vfs_path_t * vpath, mode_t mode) +shell_chmod (const vfs_path_t * vpath, mode_t mode) { const char *crpath; char *rpath; @@ -1496,9 +1490,9 @@ fish_chmod (const vfs_path_t * vpath, mode_t mode) me = VFS_CLASS (vfs_path_get_last_path_vfs (vpath)); ret = - fish_send_command (me, super, OPT_FLUSH, FISH_SUPER (super)->scr_chmod, - "FISH_FILENAME=%s FISH_FILEMODE=%4.4o;\n", rpath, - (unsigned int) (mode & 07777)); + shell_send_command (me, super, OPT_FLUSH, SHELL_SUPER (super)->scr_chmod, + "SHELL_FILENAME=%s SHELL_FILEMODE=%4.4o;\n", rpath, + (unsigned int) (mode & 07777)); g_free (rpath); @@ -1508,7 +1502,7 @@ fish_chmod (const vfs_path_t * vpath, mode_t mode) /* --------------------------------------------------------------------------------------------- */ static int -fish_chown (const vfs_path_t * vpath, uid_t owner, gid_t group) +shell_chown (const vfs_path_t * vpath, uid_t owner, gid_t group) { const char *sowner, *sgroup; struct passwd *pw; @@ -1540,9 +1534,9 @@ fish_chown (const vfs_path_t * vpath, uid_t owner, gid_t group) /* FIXME: what should we report if chgrp succeeds but chown fails? */ ret = - fish_send_command (me, super, OPT_FLUSH, FISH_SUPER (super)->scr_chown, - "FISH_FILENAME=%s FISH_FILEOWNER=%s FISH_FILEGROUP=%s;\n", rpath, sowner, - sgroup); + shell_send_command (me, super, OPT_FLUSH, SHELL_SUPER (super)->scr_chown, + "SHELL_FILENAME=%s SHELL_FILEOWNER=%s SHELL_FILEGROUP=%s;\n", rpath, + sowner, sgroup); g_free (rpath); @@ -1552,7 +1546,7 @@ fish_chown (const vfs_path_t * vpath, uid_t owner, gid_t group) /* --------------------------------------------------------------------------------------------- */ static void -fish_get_atime (mc_timesbuf_t * times, time_t * sec, long *nsec) +shell_get_atime (mc_timesbuf_t * times, time_t * sec, long *nsec) { #ifdef HAVE_UTIMENSAT *sec = (*times)[0].tv_sec; @@ -1566,7 +1560,7 @@ fish_get_atime (mc_timesbuf_t * times, time_t * sec, long *nsec) /* --------------------------------------------------------------------------------------------- */ static void -fish_get_mtime (mc_timesbuf_t * times, time_t * sec, long *nsec) +shell_get_mtime (mc_timesbuf_t * times, time_t * sec, long *nsec) { #ifdef HAVE_UTIMENSAT *sec = (*times)[1].tv_sec; @@ -1580,7 +1574,7 @@ fish_get_mtime (mc_timesbuf_t * times, time_t * sec, long *nsec) /* --------------------------------------------------------------------------------------------- */ static int -fish_utime (const vfs_path_t * vpath, mc_timesbuf_t * times) +shell_utime (const vfs_path_t * vpath, mc_timesbuf_t * times) { char utcatime[16], utcmtime[16]; char utcatime_w_nsec[30], utcmtime_w_nsec[30]; @@ -1599,7 +1593,7 @@ fish_utime (const vfs_path_t * vpath, mc_timesbuf_t * times) rpath = strutils_shell_escape (crpath); - fish_get_atime (times, &atime, &atime_nsec); + shell_get_atime (times, &atime, &atime_nsec); gmt = gmtime (&atime); g_snprintf (utcatime, sizeof (utcatime), "%04d%02d%02d%02d%02d.%02d", gmt->tm_year + 1900, gmt->tm_mon + 1, gmt->tm_mday, @@ -1608,7 +1602,7 @@ fish_utime (const vfs_path_t * vpath, mc_timesbuf_t * times) gmt->tm_year + 1900, gmt->tm_mon + 1, gmt->tm_mday, gmt->tm_hour, gmt->tm_min, gmt->tm_sec, atime_nsec); - fish_get_mtime (times, &mtime, &mtime_nsec); + shell_get_mtime (times, &mtime, &mtime_nsec); gmt = gmtime (&mtime); g_snprintf (utcmtime, sizeof (utcmtime), "%04d%02d%02d%02d%02d.%02d", gmt->tm_year + 1900, gmt->tm_mon + 1, gmt->tm_mday, @@ -1619,11 +1613,11 @@ fish_utime (const vfs_path_t * vpath, mc_timesbuf_t * times) me = VFS_CLASS (vfs_path_get_last_path_vfs (vpath)); - ret = fish_send_command (me, super, OPT_FLUSH, FISH_SUPER (super)->scr_utime, - "FISH_FILENAME=%s FISH_FILEATIME=%ld FISH_FILEMTIME=%ld " - "FISH_TOUCHATIME=%s FISH_TOUCHMTIME=%s FISH_TOUCHATIME_W_NSEC=\"%s\" " - "FISH_TOUCHMTIME_W_NSEC=\"%s\";\n", rpath, (long) atime, (long) mtime, - utcatime, utcmtime, utcatime_w_nsec, utcmtime_w_nsec); + ret = shell_send_command (me, super, OPT_FLUSH, SHELL_SUPER (super)->scr_utime, + "SHELL_FILENAME=%s SHELL_FILEATIME=%ld SHELL_FILEMTIME=%ld " + "SHELL_TOUCHATIME=%s SHELL_TOUCHMTIME=%s SHELL_TOUCHATIME_W_NSEC=\"%s\" " + "SHELL_TOUCHMTIME_W_NSEC=\"%s\";\n", rpath, (long) atime, + (long) mtime, utcatime, utcmtime, utcatime_w_nsec, utcmtime_w_nsec); g_free (rpath); @@ -1633,7 +1627,7 @@ fish_utime (const vfs_path_t * vpath, mc_timesbuf_t * times) /* --------------------------------------------------------------------------------------------- */ static int -fish_unlink (const vfs_path_t * vpath) +shell_unlink (const vfs_path_t * vpath) { const char *crpath; char *rpath; @@ -1650,8 +1644,8 @@ fish_unlink (const vfs_path_t * vpath) me = VFS_CLASS (vfs_path_get_last_path_vfs (vpath)); ret = - fish_send_command (me, super, OPT_FLUSH, FISH_SUPER (super)->scr_unlink, - "FISH_FILENAME=%s;\n", rpath); + shell_send_command (me, super, OPT_FLUSH, SHELL_SUPER (super)->scr_unlink, + "SHELL_FILENAME=%s;\n", rpath); g_free (rpath); @@ -1661,7 +1655,7 @@ fish_unlink (const vfs_path_t * vpath) /* --------------------------------------------------------------------------------------------- */ static int -fish_exists (const vfs_path_t * vpath) +shell_exists (const vfs_path_t * vpath) { const char *crpath; char *rpath; @@ -1678,8 +1672,8 @@ fish_exists (const vfs_path_t * vpath) me = VFS_CLASS (vfs_path_get_last_path_vfs (vpath)); ret = - fish_send_command (me, super, OPT_FLUSH, FISH_SUPER (super)->scr_exists, - "FISH_FILENAME=%s;\n", rpath); + shell_send_command (me, super, OPT_FLUSH, SHELL_SUPER (super)->scr_exists, + "SHELL_FILENAME=%s;\n", rpath); g_free (rpath); @@ -1689,7 +1683,7 @@ fish_exists (const vfs_path_t * vpath) /* --------------------------------------------------------------------------------------------- */ static int -fish_mkdir (const vfs_path_t * vpath, mode_t mode) +shell_mkdir (const vfs_path_t * vpath, mode_t mode) { const char *crpath; char *rpath; @@ -1708,14 +1702,14 @@ fish_mkdir (const vfs_path_t * vpath, mode_t mode) me = VFS_CLASS (vfs_path_get_last_path_vfs (vpath)); ret = - fish_send_command (me, super, OPT_FLUSH, FISH_SUPER (super)->scr_mkdir, - "FISH_FILENAME=%s;\n", rpath); + shell_send_command (me, super, OPT_FLUSH, SHELL_SUPER (super)->scr_mkdir, + "SHELL_FILENAME=%s;\n", rpath); g_free (rpath); if (ret != 0) return ret; - if (fish_exists (vpath) == 0) + if (shell_exists (vpath) == 0) { me->verrno = EACCES; return -1; @@ -1726,7 +1720,7 @@ fish_mkdir (const vfs_path_t * vpath, mode_t mode) /* --------------------------------------------------------------------------------------------- */ static int -fish_rmdir (const vfs_path_t * vpath) +shell_rmdir (const vfs_path_t * vpath) { const char *crpath; char *rpath; @@ -1743,8 +1737,8 @@ fish_rmdir (const vfs_path_t * vpath) me = VFS_CLASS (vfs_path_get_last_path_vfs (vpath)); ret = - fish_send_command (me, super, OPT_FLUSH, FISH_SUPER (super)->scr_rmdir, - "FISH_FILENAME=%s;\n", rpath); + shell_send_command (me, super, OPT_FLUSH, SHELL_SUPER (super)->scr_rmdir, + "SHELL_FILENAME=%s;\n", rpath); g_free (rpath); @@ -1754,11 +1748,11 @@ fish_rmdir (const vfs_path_t * vpath) /* --------------------------------------------------------------------------------------------- */ static vfs_file_handler_t * -fish_fh_new (struct vfs_s_inode *ino, gboolean changed) +shell_fh_new (struct vfs_s_inode *ino, gboolean changed) { - fish_file_handler_t *fh; + shell_file_handler_t *fh; - fh = g_new0 (fish_file_handler_t, 1); + fh = g_new0 (shell_file_handler_t, 1); vfs_s_init_fh (VFS_FILE_HANDLER (fh), ino, changed); return VFS_FILE_HANDLER (fh); @@ -1767,9 +1761,9 @@ fish_fh_new (struct vfs_s_inode *ino, gboolean changed) /* --------------------------------------------------------------------------------------------- */ static int -fish_fh_open (struct vfs_class *me, vfs_file_handler_t * fh, int flags, mode_t mode) +shell_fh_open (struct vfs_class *me, vfs_file_handler_t * fh, int flags, mode_t mode) { - fish_file_handler_t *fish = FISH_FILE_HANDLER (fh); + shell_file_handler_t *shell = SHELL_FILE_HANDLER (fh); (void) mode; @@ -1778,7 +1772,7 @@ fish_fh_open (struct vfs_class *me, vfs_file_handler_t * fh, int flags, mode_t m { /* user pressed the button [ Append ] in the "Copy" dialog */ if ((flags & O_APPEND) != 0) - fish->append = TRUE; + shell->append = TRUE; if (fh->ino->localname == NULL) { @@ -1806,7 +1800,7 @@ fish_fh_open (struct vfs_class *me, vfs_file_handler_t * fh, int flags, mode_t m /* --------------------------------------------------------------------------------------------- */ static void -fish_fill_names (struct vfs_class *me, fill_names_f func) +shell_fill_names (struct vfs_class *me, fill_names_f func) { GList *iter; @@ -1820,14 +1814,14 @@ fish_fill_names (struct vfs_class *me, fill_names_f func) switch (super->path_element->port) { - case FISH_FLAG_RSH: + case SHELL_FLAG_RSH: flags = ":r"; break; - case FISH_FLAG_COMPRESSED: + case SHELL_FLAG_COMPRESSED: flags = ":C"; break; default: - if (super->path_element->port > FISH_FLAG_RSH) + if (super->path_element->port > SHELL_FLAG_RSH) { g_snprintf (gbuf, sizeof (gbuf), ":%d", super->path_element->port); flags = gbuf; @@ -1836,7 +1830,7 @@ fish_fill_names (struct vfs_class *me, fill_names_f func) } name = - g_strconcat (vfs_fish_ops->prefix, VFS_PATH_URL_DELIMITER, + g_strconcat (vfs_shell_ops->prefix, VFS_PATH_URL_DELIMITER, super->path_element->user, "@", super->path_element->host, flags, PATH_SEP_STR, super->path_element->path, (char *) NULL); func (name); @@ -1847,11 +1841,11 @@ fish_fill_names (struct vfs_class *me, fill_names_f func) /* --------------------------------------------------------------------------------------------- */ static void * -fish_open (const vfs_path_t * vpath, int flags, mode_t mode) +shell_open (const vfs_path_t * vpath, int flags, mode_t mode) { /* sorry, i've places hack here - cause fish don't able to open files with O_EXCL flag + cause shell don't able to open files with O_EXCL flag */ flags &= ~O_EXCL; return vfs_s_open (vpath, flags, mode); @@ -1862,38 +1856,38 @@ fish_open (const vfs_path_t * vpath, int flags, mode_t mode) /* --------------------------------------------------------------------------------------------- */ void -vfs_init_fish (void) +vfs_init_shell (void) { tcp_init (); - vfs_init_subclass (&fish_subclass, "fish", VFSF_REMOTE | VFSF_USETMP, "sh"); - vfs_fish_ops->fill_names = fish_fill_names; - vfs_fish_ops->stat = fish_stat; - vfs_fish_ops->lstat = fish_lstat; - vfs_fish_ops->fstat = fish_fstat; - vfs_fish_ops->chmod = fish_chmod; - vfs_fish_ops->chown = fish_chown; - vfs_fish_ops->utime = fish_utime; - vfs_fish_ops->open = fish_open; - vfs_fish_ops->symlink = fish_symlink; - vfs_fish_ops->link = fish_link; - vfs_fish_ops->unlink = fish_unlink; - vfs_fish_ops->rename = fish_rename; - vfs_fish_ops->mkdir = fish_mkdir; - vfs_fish_ops->rmdir = fish_rmdir; - vfs_fish_ops->ctl = fish_ctl; - fish_subclass.archive_same = fish_archive_same; - fish_subclass.new_archive = fish_new_archive; - fish_subclass.open_archive = fish_open_archive; - fish_subclass.free_archive = fish_free_archive; - fish_subclass.fh_new = fish_fh_new; - fish_subclass.fh_open = fish_fh_open; - fish_subclass.dir_load = fish_dir_load; - fish_subclass.file_store = fish_file_store; - fish_subclass.linear_start = fish_linear_start; - fish_subclass.linear_read = fish_linear_read; - fish_subclass.linear_close = fish_linear_close; - vfs_register_class (vfs_fish_ops); + vfs_init_subclass (&shell_subclass, "shell", VFSF_REMOTE | VFSF_USETMP, "sh"); + vfs_shell_ops->fill_names = shell_fill_names; + vfs_shell_ops->stat = shell_stat; + vfs_shell_ops->lstat = shell_lstat; + vfs_shell_ops->fstat = shell_fstat; + vfs_shell_ops->chmod = shell_chmod; + vfs_shell_ops->chown = shell_chown; + vfs_shell_ops->utime = shell_utime; + vfs_shell_ops->open = shell_open; + vfs_shell_ops->symlink = shell_symlink; + vfs_shell_ops->link = shell_link; + vfs_shell_ops->unlink = shell_unlink; + vfs_shell_ops->rename = shell_rename; + vfs_shell_ops->mkdir = shell_mkdir; + vfs_shell_ops->rmdir = shell_rmdir; + vfs_shell_ops->ctl = shell_ctl; + shell_subclass.archive_same = shell_archive_same; + shell_subclass.new_archive = shell_new_archive; + shell_subclass.open_archive = shell_open_archive; + shell_subclass.free_archive = shell_free_archive; + shell_subclass.fh_new = shell_fh_new; + shell_subclass.fh_open = shell_fh_open; + shell_subclass.dir_load = shell_dir_load; + shell_subclass.file_store = shell_file_store; + shell_subclass.linear_start = shell_linear_start; + shell_subclass.linear_read = shell_linear_read; + shell_subclass.linear_close = shell_linear_close; + vfs_register_class (vfs_shell_ops); } /* --------------------------------------------------------------------------------------------- */ diff --git a/mcsrc/src/vfs/fish/fish.h b/mcsrc/src/vfs/shell/shell.h similarity index 73% rename from mcsrc/src/vfs/fish/fish.h rename to mcsrc/src/vfs/shell/shell.h index 3c1fa060..e485d69e 100644 --- a/mcsrc/src/vfs/fish/fish.h +++ b/mcsrc/src/vfs/shell/shell.h @@ -1,13 +1,13 @@ /** * \file - * \brief Header: Virtual File System: FISH implementation for transferring files over + * \brief Header: Virtual File System: SHELL implementation for transferring files over * shell connections */ -#ifndef MC__VFS_FISH_H -#define MC__VFS_FISH_H +#ifndef MC__VFS_SHELL_H +#define MC__VFS_SHELL_H /*** typedefs(not structures) and defined constants **********************************************/ @@ -17,12 +17,12 @@ /*** global variables defined in .c file *********************************************************/ -extern int fish_directory_timeout; +extern int shell_directory_timeout; /*** declarations of public functions ************************************************************/ -void vfs_init_fish (void); +void vfs_init_shell (void); /*** inline functions ****************************************************************************/ -#endif +#endif /* MC__VFS_SHELL_H */ diff --git a/mcsrc/src/vfs/fish/fishdef.h b/mcsrc/src/vfs/shell/shelldef.h similarity index 66% rename from mcsrc/src/vfs/fish/fishdef.h rename to mcsrc/src/vfs/shell/shelldef.h index 129d2b92..37244d98 100644 --- a/mcsrc/src/vfs/fish/fishdef.h +++ b/mcsrc/src/vfs/shell/shelldef.h @@ -1,19 +1,18 @@ /** * \file - * \brief Header: FISH script defaults + * \brief Header: SHELL script defaults */ -#ifndef MC__FISH_DEF_H -#define MC__FISH_DEF_H +#ifndef MC__VFS_SHELL_DEF_H +#define MC__VFS_SHELL_DEF_H /*** typedefs(not structures) and defined constants **********************************************/ /* default 'ls' script */ -#define FISH_LS_DEF_CONTENT "" \ -"#LIST /${FISH_FILENAME}\n" \ +#define VFS_SHELL_LS_DEF_CONTENT "" \ "export LC_TIME=C\n" \ -"ls -Qlan \"/${FISH_FILENAME}\" 2>/dev/null | grep '^[^cbt]' | (\n" \ +"ls -Qlan \"/${SHELL_FILENAME}\" 2>/dev/null | grep '^[^cbt]' | (\n" \ "while read p l u g s m d y n; do\n" \ " echo \"P$p $u.$g\"\n" \ " echo \"S$s\"\n" \ @@ -22,7 +21,7 @@ " echo\n" \ "done\n" \ ")\n" \ -"ls -Qlan \"/${FISH_FILENAME}\" 2>/dev/null | grep '^[cb]' | (\n" \ +"ls -Qlan \"/${SHELL_FILENAME}\" 2>/dev/null | grep '^[cb]' | (\n" \ "while read p l u g a i m d y n; do\n" \ " echo \"P$p $u.$g\"\n" \ " echo \"E$a$i\"\n" \ @@ -34,120 +33,109 @@ "echo \"### 200\"\n" /* default file exists script */ -#define FISH_EXISTS_DEF_CONTENT "" \ -"#ISEXISTS $FISH_FILENAME\n" \ -"ls -l \"/${FISH_FILENAME}\" >/dev/null 2>/dev/null\n" \ +#define VFS_SHELL_EXISTS_DEF_CONTENT "" \ +"ls -l \"/${SHELL_FILENAME}\" >/dev/null 2>/dev/null\n" \ "echo '### '$?\n" /* default 'mkdir' script */ -#define FISH_MKDIR_DEF_CONTENT "" \ -"#MKD $FISH_FILENAME\n" \ -"if mkdir \"/${FISH_FILENAME}\" 2>/dev/null; then\n" \ +#define VFS_SHELL_MKDIR_DEF_CONTENT "" \ +"if mkdir \"/${SHELL_FILENAME}\" 2>/dev/null; then\n" \ " echo \"### 000\"\n" \ "else\n" \ " echo \"### 500\"\n" \ "fi\n" /* default 'unlink' script */ -#define FISH_UNLINK_DEF_CONTENT "" \ -"#DELE $FISH_FILENAME\n" \ -"if rm -f \"/${FISH_FILENAME}\" 2>/dev/null; then\n" \ +#define VFS_SHELL_UNLINK_DEF_CONTENT "" \ +"if rm -f \"/${SHELL_FILENAME}\" 2>/dev/null; then\n" \ " echo \"### 000\"\n" \ "else\n" \ " echo \"### 500\"\n" \ "fi\n" + /* default 'chown' script */ -#define FISH_CHOWN_DEF_CONTENT "" \ -"#CHOWN $FISH_FILEOWNER:$FISH_FILEGROUP $FISH_FILENAME\n" \ -"if chown ${FISH_FILEOWNER}:${FISH_FILEGROUP} \"/${FISH_FILENAME}\"; then\n"\ -" echo \"### 000\"\n" \ -"else\n" \ -" echo \"### 500\"\n" \ +#define VFS_SHELL_CHOWN_DEF_CONTENT "" \ +"if chown ${SHELL_FILEOWNER}:${SHELL_FILEGROUP} \"/${SHELL_FILENAME}\"; then\n" \ +" echo \"### 000\"\n" \ +"else\n" \ +" echo \"### 500\"\n" \ "fi\n" /* default 'chmod' script */ -#define FISH_CHMOD_DEF_CONTENT "" \ -"#CHMOD $FISH_FILEMODE $FISH_FILENAME\n" \ -"if chmod ${FISH_FILEMODE} \"/${FISH_FILENAME}\" 2>/dev/null; then\n" \ +#define VFS_SHELL_CHMOD_DEF_CONTENT "" \ +"if chmod ${SHELL_FILEMODE} \"/${SHELL_FILENAME}\" 2>/dev/null; then\n" \ " echo \"### 000\"\n" \ "else\n" \ " echo \"### 500\"\n" \ "fi\n" /* default 'utime' script */ -#define FISH_UTIME_DEF_CONTENT "" \ -"#UTIME \"$FISH_TOUCHATIME_W_NSEC\" \"$FISH_TOUCHMTIME_W_NSEC\" $FISH_FILENAME\n" \ -"if TZ=UTC touch -h -m -d \"$FISH_TOUCHMTIME_W_NSEC\" \"/${FISH_FILENAME}\" 2>/dev/null && \\\n" \ -" TZ=UTC touch -h -a -d \"$FISH_TOUCHATIME_W_NSEC\" \"/${FISH_FILENAME}\" 2>/dev/null; then\n" \ -" echo \"### 000\"\n" \ -"elif TZ=UTC touch -h -m -t $FISH_TOUCHMTIME \"/${FISH_FILENAME}\" 2>/dev/null && \\\n" \ -" TZ=UTC touch -h -a -t $FISH_TOUCHATIME \"/${FISH_FILENAME}\" 2>/dev/null; then\n" \ -" echo \"### 000\"\n" \ -"elif [ -n \"$FISH_HAVE_PERL\" ] && \\\n" \ -" perl -e 'utime '$FISH_FILEATIME','$FISH_FILEMTIME',@ARGV;' \"/${FISH_FILENAME}\" 2>/dev/null; then\n" \ -" echo \"### 000\"\n" \ -"else\n" \ -" echo \"### 500\"\n" \ +#define VFS_SHELL_UTIME_DEF_CONTENT "" \ +"#UTIME \"$SHELL_TOUCHATIME_W_NSEC\" \"$SHELL_TOUCHMTIME_W_NSEC\" $SHELL_FILENAME\n" \ +"if TZ=UTC touch -h -m -d \"$SHELL_TOUCHMTIME_W_NSEC\" \"/${SHELL_FILENAME}\" 2>/dev/null && \\\n" \ +" TZ=UTC touch -h -a -d \"$SHELL_TOUCHATIME_W_NSEC\" \"/${SHELL_FILENAME}\" 2>/dev/null; then\n" \ +" echo \"### 000\"\n" \ +"elif TZ=UTC touch -h -m -t $SHELL_TOUCHMTIME \"/${SHELL_FILENAME}\" 2>/dev/null && \\\n" \ +" TZ=UTC touch -h -a -t $SHELL_TOUCHATIME \"/${SHELL_FILENAME}\" 2>/dev/null; then\n" \ +" echo \"### 000\"\n" \ +"elif [ -n \"$SHELL_HAVE_PERL\" ] && \\\n" \ +" perl -e 'utime '$SHELL_FILEATIME','$SHELL_FILEMTIME',@ARGV;' \"/${SHELL_FILENAME}\" 2>/dev/null; then\n" \ +" echo \"### 000\"\n" \ +"else\n" \ +" echo \"### 500\"\n" \ "fi\n" - /* default 'rmdir' script */ -#define FISH_RMDIR_DEF_CONTENT "" \ -"#RMD $FISH_FILENAME\n" \ -"if rmdir \"/${FISH_FILENAME}\" 2>/dev/null; then\n" \ +#define VFS_SHELL_RMDIR_DEF_CONTENT "" \ +"if rmdir \"/${SHELL_FILENAME}\" 2>/dev/null; then\n" \ " echo \"### 000\"\n" \ "else\n" \ " echo \"### 500\"\n" \ "fi\n" /* default 'ln -s' symlink script */ -#define FISH_LN_DEF_CONTENT "" \ -"#SYMLINK $FISH_FILEFROM $FISH_FILETO\n" \ -"if ln -s \"/${FISH_FILEFROM}\" \"/${FISH_FILETO}\" 2>/dev/null; then\n" \ +#define VFS_SHELL_LN_DEF_CONTENT "" \ +"if ln -s \"/${SHELL_FILEFROM}\" \"/${SHELL_FILETO}\" 2>/dev/null; then\n" \ " echo \"### 000\"\n" \ "else\n" \ " echo \"### 500\"\n" \ "fi\n" /* default 'mv' script */ -#define FISH_MV_DEF_CONTENT "" \ -"#RENAME $FISH_FILEFROM $FISH_FILETO\n" \ -"if mv \"/${FISH_FILEFROM}\" \"/${FISH_FILETO}\" 2>/dev/null; then\n" \ +#define VFS_SHELL_MV_DEF_CONTENT "" \ +"if mv \"/${SHELL_FILEFROM}\" \"/${SHELL_FILETO}\" 2>/dev/null; then\n" \ " echo \"### 000\"\n" \ "else\n" \ " echo \"### 500\"\n" \ "fi\n" /* default 'ln' hardlink script */ -#define FISH_HARDLINK_DEF_CONTENT "" \ -"#LINK $FISH_FILEFROM $FISH_FILETO\n" \ -"if ln \"/${FISH_FILEFROM}\" \"/${FISH_FILETO}\" 2>/dev/null; then\n" \ +#define VFS_SHELL_HARDLINK_DEF_CONTENT "" \ +"if ln \"/${SHELL_FILEFROM}\" \"/${SHELL_FILETO}\" 2>/dev/null; then\n" \ " echo \"### 000\"\n" \ "else\n" \ " echo \"### 500\"\n" \ "fi\n" /* default 'retr' script */ -#define FISH_GET_DEF_CONTENT "" \ -"export LC_TIME=C\n" \ -"#RETR $FISH_FILENAME\n" \ -"if dd if=\"/${FISH_FILENAME}\" of=/dev/null bs=1 count=1 2>/dev/null ; then\n" \ -" ls -ln \"/${FISH_FILENAME}\" 2>/dev/null | (\n" \ -" read p l u g s r\n" \ -" echo $s\n" \ -" )\n" \ -" echo \"### 100\"\n" \ -" cat \"/${FISH_FILENAME}\"\n" \ -" echo \"### 200\"\n" \ -"else\n" \ -" echo \"### 500\"\n" \ +#define VFS_SHELL_GET_DEF_CONTENT "" \ +"export LC_TIME=C\n" \ +"if dd if=\"/${SHELL_FILENAME}\" of=/dev/null bs=1 count=1 2>/dev/null ; then\n" \ +" ls -ln \"/${SHELL_FILENAME}\" 2>/dev/null | (\n" \ +" read p l u g s r\n" \ +" echo $s\n" \ +" )\n" \ +" echo \"### 100\"\n" \ +" cat \"/${SHELL_FILENAME}\"\n" \ +" echo \"### 200\"\n" \ +"else\n" \ +" echo \"### 500\"\n" \ "fi\n" /* default 'stor' script */ -#define FISH_SEND_DEF_CONTENT "" \ -"FILENAME=\"/${FISH_FILENAME}\"\n" \ -"FILESIZE=${FISH_FILESIZE}\n" \ -"#STOR $FILESIZE $FILENAME\n" \ +#define VFS_SHELL_SEND_DEF_CONTENT "" \ +"FILENAME=\"/${SHELL_FILENAME}\"\n" \ +"FILESIZE=${SHELL_FILESIZE}\n" \ "echo \"### 001\"\n" \ "{\n" \ " while [ $FILESIZE -gt 0 ]; do\n" \ @@ -158,10 +146,9 @@ "}; echo \"### 200\"\n" /* default 'appe' script */ -#define FISH_APPEND_DEF_CONTENT "" \ -"FILENAME=\"/${FISH_FILENAME}\"\n" \ -"FILESIZE=${FISH_FILESIZE}\n" \ -"#APPE $FILESIZE $FILENAME\n" \ +#define VFS_SHELL_APPEND_DEF_CONTENT "" \ +"FILENAME=\"/${SHELL_FILENAME}\"\n" \ +"FILESIZE=${SHELL_FILESIZE}\n" \ "echo \"### 001\"\n" \ "res=`exec 3>&1\n" \ "(\n" \ @@ -180,15 +167,15 @@ "}; echo \"### 200\"\n" /* default 'info' script */ -#define FISH_INFO_DEF_CONTENT "" \ +#define VFS_SHELL_INFO_DEF_CONTENT "" \ "export LC_TIME=C\n" \ -"#FISH_HAVE_HEAD 1\n" \ -"#FISH_HAVE_SED 2\n" \ -"#FISH_HAVE_AWK 4\n" \ -"#FISH_HAVE_PERL 8\n" \ -"#FISH_HAVE_LSQ 16\n" \ -"#FISH_HAVE_DATE_MDYT 32\n" \ -"#FISH_HAVE_TAIL 64\n" \ +"#SHELL_HAVE_HEAD 1\n" \ +"#SHELL_HAVE_SED 2\n" \ +"#SHELL_HAVE_AWK 4\n" \ +"#SHELL_HAVE_PERL 8\n" \ +"#SHELL_HAVE_LSQ 16\n" \ +"#SHELL_HAVE_DATE_MDYT 32\n" \ +"#SHELL_HAVE_TAIL 64\n" \ "res=0\n" \ "if `echo yes| head -c 1 > /dev/null 2>&1` ; then\n" \ " res=`expr $res + 1`\n" \ @@ -233,4 +220,5 @@ /*** declarations of public functions ************************************************************/ /*** inline functions ****************************************************************************/ -#endif + +#endif /* MC__VFS_SHELL_DEF_H */ diff --git a/mcsrc/src/vfs/tar/tar-internal.c b/mcsrc/src/vfs/tar/tar-internal.c index f77b1b3f..bbaf717c 100644 --- a/mcsrc/src/vfs/tar/tar-internal.c +++ b/mcsrc/src/vfs/tar/tar-internal.c @@ -1,7 +1,7 @@ /* Virtual File System: GNU Tar file system. - Copyright (C) 2023 + Copyright (C) 2023-2024 Free Software Foundation, Inc. Written by: @@ -184,6 +184,14 @@ tar_seek_archive (tar_super_t * archive, off_t size) /*** public functions ****************************************************************************/ /* --------------------------------------------------------------------------------------------- */ +gboolean +is_octal_digit (char c) +{ + return '0' <= c && c <= '7'; +} + +/* --------------------------------------------------------------------------------------------- */ + void tar_base64_init (void) { @@ -262,13 +270,13 @@ tar_from_header (const char *where0, size_t digs, char const *type, intmax_t min if (where == lim) return (-1); - if (!isspace ((unsigned char) *where)) + if (!g_ascii_isspace (*where)) break; where++; } - if (isodigit (*where)) + if (is_octal_digit (*where)) { char const *where1 = where; gboolean overflow = FALSE; @@ -276,7 +284,7 @@ tar_from_header (const char *where0, size_t digs, char const *type, intmax_t min while (TRUE) { value += *where++ - '0'; - if (where == lim || !isodigit (*where)) + if (where == lim || !is_octal_digit (*where)) break; overflow |= value != (value << LG_8 >> LG_8); value <<= LG_8; @@ -301,7 +309,7 @@ tar_from_header (const char *where0, size_t digs, char const *type, intmax_t min { value += 7 - digit; where++; - if (where == lim || !isodigit (*where)) + if (where == lim || !is_octal_digit (*where)) break; digit = *where - '0'; overflow |= value != (value << LG_8 >> LG_8); @@ -373,7 +381,7 @@ tar_from_header (const char *where0, size_t digs, char const *type, intmax_t min value = -value; } - if (where != lim && *where != '\0' && !isspace ((unsigned char) *where)) + if (where != lim && *where != '\0' && !g_ascii_isspace (*where)) return (-1); if (value <= (negative ? minus_minval : maxval)) diff --git a/mcsrc/src/vfs/tar/tar-internal.h b/mcsrc/src/vfs/tar/tar-internal.h index c5e8ee45..7d5bf19c 100644 --- a/mcsrc/src/vfs/tar/tar-internal.h +++ b/mcsrc/src/vfs/tar/tar-internal.h @@ -69,8 +69,6 @@ typedef unsigned minor_t; #define OFF_FROM_HEADER(where) off_from_header (where, sizeof (where)) -#define isodigit(c) ( ((c) >= '0') && ((c) <= '7') ) - /*** enums ***************************************************************************************/ /*** structures declarations (and typedefs of structures)*****************************************/ @@ -306,6 +304,7 @@ extern struct tar_stat_info current_stat_info; /*** declarations of public functions ************************************************************/ /* tar-internal.c */ +gboolean is_octal_digit (char c); void tar_base64_init (void); void tar_assign_string (char **string, char *value); void tar_assign_string_dup (char **string, const char *value); diff --git a/mcsrc/src/vfs/tar/tar-sparse.c b/mcsrc/src/vfs/tar/tar-sparse.c index 0bc169b0..9795d158 100644 --- a/mcsrc/src/vfs/tar/tar-sparse.c +++ b/mcsrc/src/vfs/tar/tar-sparse.c @@ -1,7 +1,7 @@ /* Virtual File System: GNU Tar file system. - Copyright (C) 2003-2023 + Copyright (C) 2003-2024 Free Software Foundation, Inc. Written by: @@ -547,8 +547,8 @@ oldgnu_get_sparse_info (tar_super_t * archive, struct tar_sparse_file *file) { size_t i; union block *h = current_header; - int ext_p; - enum oldgnu_add_status rc; + gboolean ext_p; + enum oldgnu_add_status rc = add_fail; if (file->stat_info->sparse_map != NULL) g_array_set_size (file->stat_info->sparse_map, 0); @@ -560,8 +560,8 @@ oldgnu_get_sparse_info (tar_super_t * archive, struct tar_sparse_file *file) break; } - for (ext_p = h->oldgnu_header.isextended ? 1 : 0; rc == add_ok && ext_p != 0; - ext_p = h->sparse_header.isextended ? 1 : 0) + for (ext_p = h->oldgnu_header.isextended != 0; rc == add_ok && ext_p; + ext_p = h->sparse_header.isextended != 0) { h = tar_find_next_block (archive); if (h == NULL) @@ -612,7 +612,7 @@ star_get_sparse_info (tar_super_t * archive, struct tar_sparse_file *file) { size_t i; union block *h = current_header; - int ext_p = 1; + gboolean ext_p = TRUE; enum oldgnu_add_status rc = add_ok; if (file->stat_info->sparse_map != NULL) @@ -628,10 +628,10 @@ star_get_sparse_info (tar_super_t * archive, struct tar_sparse_file *file) break; } - ext_p = h->star_in_header.isextended ? 1 : 0; + ext_p = h->star_in_header.isextended != 0; } - for (; rc == add_ok && ext_p != 0; ext_p = h->star_ext_header.isextended ? 1 : 0) + for (; rc == add_ok && ext_p; ext_p = h->star_ext_header.isextended != 0) { h = tar_find_next_block (archive); if (h == NULL) diff --git a/mcsrc/src/vfs/tar/tar-xheader.c b/mcsrc/src/vfs/tar/tar-xheader.c index 99e9e856..c6c684aa 100644 --- a/mcsrc/src/vfs/tar/tar-xheader.c +++ b/mcsrc/src/vfs/tar/tar-xheader.c @@ -1,7 +1,7 @@ /* Virtual File System: GNU Tar file system. - Copyright (C) 1995-2023 + Copyright (C) 1995-2024 Free Software Foundation, Inc. Written by: diff --git a/mcsrc/src/vfs/tar/tar.c b/mcsrc/src/vfs/tar/tar.c index 2d32111a..4ce6494e 100644 --- a/mcsrc/src/vfs/tar/tar.c +++ b/mcsrc/src/vfs/tar/tar.c @@ -1,7 +1,7 @@ /* Virtual File System: GNU Tar file system. - Copyright (C) 1995-2023 + Copyright (C) 1995-2024 Free Software Foundation, Inc. Written by: @@ -87,6 +87,8 @@ struct tar_stat_info current_stat_info; #define XGLTYPE 'g' /* Global extended header */ /* Values used in typeflag field. */ +#define REGTYPE '0' /* regular file */ +#define AREGTYPE '\0' /* regular file */ #define LNKTYPE '1' /* link */ #define SYMTYPE '2' /* symbolic link */ #define CHRTYPE '3' /* character special */ @@ -123,7 +125,6 @@ struct tar_stat_info current_stat_info; #define MODE_FROM_HEADER(where,hbits) mode_from_header (where, sizeof (where), hbits) #define TIME_FROM_HEADER(where) time_from_header (where, sizeof (where)) #define UID_FROM_HEADER(where) uid_from_header (where, sizeof (where)) -#define UINTMAX_FROM_HEADER(where) uintmax_from_header (where, sizeof (where)) /*** file scope type declarations ****************************************************************/ @@ -247,14 +248,6 @@ uid_from_header (const char *p, size_t s) /* --------------------------------------------------------------------------------------------- */ -static inline uintmax_t -uintmax_from_header (const char *p, size_t s) -{ - return tar_from_header (p, s, "uintmax_t", 0, UINTMAX_MAX, FALSE); -} - -/* --------------------------------------------------------------------------------------------- */ - static void tar_calc_sparse_offsets (struct vfs_s_inode *inode) { @@ -304,7 +297,7 @@ tar_skip_member (tar_super_t * archive, struct vfs_s_inode *inode) } else if (save_typeflag != DIRTYPE) { - if (inode != NULL) + if (inode != NULL && (save_typeflag == REGTYPE || save_typeflag == AREGTYPE)) inode->data_offset = BLOCKSIZE * tar_current_block_ordinal (archive); return tar_skip_file (archive, current_stat_info.stat.st_size); @@ -390,8 +383,10 @@ tar_decode_header (union block *header, tar_super_t * arch) { if (strcmp (header->header.magic, TMAGIC) == 0) { - if (header->star_header.prefix[130] == 0 && isodigit (header->star_header.atime[0]) - && header->star_header.atime[11] == ' ' && isodigit (header->star_header.ctime[0]) + if (header->star_header.prefix[130] == 0 + && is_octal_digit (header->star_header.atime[0]) + && header->star_header.atime[11] == ' ' + && is_octal_digit (header->star_header.ctime[0]) && header->star_header.ctime[11] == ' ') arch->type = TAR_STAR; else if (current_stat_info.xhdr.buffer != NULL) @@ -588,7 +583,6 @@ tar_insert_entry (struct vfs_class *me, struct vfs_s_super *archive, union block (*inode)->st.st_mtime = current_stat_info.mtime.tv_sec; (*inode)->st.st_atime = current_stat_info.atime.tv_sec; (*inode)->st.st_ctime = current_stat_info.ctime.tv_sec; - (*inode)->data_offset = BLOCKSIZE * tar_current_block_ordinal (TAR_SUPER (archive)); if (link_name != NULL && *link_name != '\0') (*inode)->linkname = g_strdup (link_name); diff --git a/mcsrc/src/vfs/undelfs/undelfs.c b/mcsrc/src/vfs/undelfs/undelfs.c index de544406..e480040f 100644 --- a/mcsrc/src/vfs/undelfs/undelfs.c +++ b/mcsrc/src/vfs/undelfs/undelfs.c @@ -7,7 +7,7 @@ Parts of this program were taken from the lsdel.c and dump.c files written by Ted Ts'o (tytso@mit.edu) for the ext2fs package. - Copyright (C) 1995-2023 + Copyright (C) 1995-2024 Free Software Foundation, Inc. Written by: diff --git a/mcsrc/src/viewer/actions_cmd.c b/mcsrc/src/viewer/actions_cmd.c index 465f0f02..453eb78f 100644 --- a/mcsrc/src/viewer/actions_cmd.c +++ b/mcsrc/src/viewer/actions_cmd.c @@ -2,7 +2,7 @@ Internal file viewer for the Midnight Commander Callback function for some actions (hotkeys, menu) - Copyright (C) 1994-2023 + Copyright (C) 1994-2024 Free Software Foundation, Inc. Written by: @@ -57,13 +57,13 @@ #include "lib/charsets.h" #endif #include "lib/event.h" /* mc_event_raise() */ -#include "lib/mcconfig.h" /* mc_config_history_get() */ +#include "lib/mcconfig.h" /* mc_config_history_get_recent_item() */ #include "src/filemanager/layout.h" #include "src/filemanager/filemanager.h" /* current_panel */ #include "src/filemanager/ext.h" /* regex_command_for() */ -#include "src/history.h" +#include "src/history.h" /* MC_HISTORY_SHARED_SEARCH */ #include "src/file_history.h" /* show_file_history() */ #include "src/execute.h" #include "src/keymap.h" @@ -139,16 +139,12 @@ mcview_continue_search_cmd (WView * view) else { /* find last search string in history */ - GList *history; + char *s; - history = mc_config_history_get (MC_HISTORY_SHARED_SEARCH); - if (history != NULL) + s = mc_config_history_get_recent_item (MC_HISTORY_SHARED_SEARCH); + if (s != NULL) { - /* FIXME: is it possible that history->data == NULL? */ - view->last_search_string = (gchar *) history->data; - history->data = NULL; - history = g_list_first (history); - g_list_free_full (history, g_free); + view->last_search_string = s; if (mcview_search_init (view)) { @@ -405,12 +401,6 @@ mcview_execute_cmd (WView * view, long command) switch (command) { - case CK_Help: - { - ev_help_t event_data = { NULL, "[Internal File Viewer]" }; - mc_event_raise (MCEVENT_GROUP_CORE, "help", &event_data); - } - break; case CK_HexMode: /* Toggle between hex view and text view */ mcview_toggle_hex_mode (view); diff --git a/mcsrc/src/viewer/ascii.c b/mcsrc/src/viewer/ascii.c index f786dcc2..c406feb5 100644 --- a/mcsrc/src/viewer/ascii.c +++ b/mcsrc/src/viewer/ascii.c @@ -2,7 +2,7 @@ Internal file viewer for the Midnight Commander Function for plain view - Copyright (C) 1994-2023 + Copyright (C) 1994-2024 Free Software Foundation, Inc. Written by: diff --git a/mcsrc/src/viewer/coord_cache.c b/mcsrc/src/viewer/coord_cache.c index 190dbd52..2ea23c22 100644 --- a/mcsrc/src/viewer/coord_cache.c +++ b/mcsrc/src/viewer/coord_cache.c @@ -2,7 +2,7 @@ Internal file viewer for the Midnight Commander Function for work with coordinate cache (ccache) - Copyright (C) 1994-2023 + Copyright (C) 1994-2024 Free Software Foundation, Inc. Written by: diff --git a/mcsrc/src/viewer/datasource.c b/mcsrc/src/viewer/datasource.c index ea4199cb..94c8099c 100644 --- a/mcsrc/src/viewer/datasource.c +++ b/mcsrc/src/viewer/datasource.c @@ -2,7 +2,7 @@ Internal file viewer for the Midnight Commander Functions for datasources - Copyright (C) 1994-2023 + Copyright (C) 1994-2024 Free Software Foundation, Inc. Written by: diff --git a/mcsrc/src/viewer/dialogs.c b/mcsrc/src/viewer/dialogs.c index f93c3f4e..82b94e2b 100644 --- a/mcsrc/src/viewer/dialogs.c +++ b/mcsrc/src/viewer/dialogs.c @@ -2,7 +2,7 @@ Internal file viewer for the Midnight Commander Function for paint dialogs - Copyright (C) 1994-2023 + Copyright (C) 1994-2024 Free Software Foundation, Inc. Written by: diff --git a/mcsrc/src/viewer/display.c b/mcsrc/src/viewer/display.c index e76c4dd3..08fdb642 100644 --- a/mcsrc/src/viewer/display.c +++ b/mcsrc/src/viewer/display.c @@ -2,7 +2,7 @@ Internal file viewer for the Midnight Commander Function for whow info on display - Copyright (C) 1994-2023 + Copyright (C) 1994-2024 Free Software Foundation, Inc. Written by: diff --git a/mcsrc/src/viewer/growbuf.c b/mcsrc/src/viewer/growbuf.c index e18a5276..f1fbb9b5 100644 --- a/mcsrc/src/viewer/growbuf.c +++ b/mcsrc/src/viewer/growbuf.c @@ -2,7 +2,7 @@ Internal file viewer for the Midnight Commander Function for work with growing buffers - Copyright (C) 1994-2023 + Copyright (C) 1994-2024 Free Software Foundation, Inc. Written by: diff --git a/mcsrc/src/viewer/hex.c b/mcsrc/src/viewer/hex.c index c0cf7d0f..de037cdf 100644 --- a/mcsrc/src/viewer/hex.c +++ b/mcsrc/src/viewer/hex.c @@ -2,7 +2,7 @@ Internal file viewer for the Midnight Commander Function for hex view - Copyright (C) 1994-2023 + Copyright (C) 1994-2024 Free Software Foundation, Inc. Written by: diff --git a/mcsrc/src/viewer/lib.c b/mcsrc/src/viewer/lib.c index 5f2eb520..b427987e 100644 --- a/mcsrc/src/viewer/lib.c +++ b/mcsrc/src/viewer/lib.c @@ -2,7 +2,7 @@ Internal file viewer for the Midnight Commander Common finctions (used from some other mcviewer functions) - Copyright (C) 1994-2023 + Copyright (C) 1994-2024 Free Software Foundation, Inc. Written by: diff --git a/mcsrc/src/viewer/mcviewer.c b/mcsrc/src/viewer/mcviewer.c index 36d31c0d..1ec75c3d 100644 --- a/mcsrc/src/viewer/mcviewer.c +++ b/mcsrc/src/viewer/mcviewer.c @@ -2,7 +2,7 @@ Internal file viewer for the Midnight Commander Interface functions - Copyright (C) 1994-2023 + Copyright (C) 1994-2024 Free Software Foundation, Inc Written by: diff --git a/mcsrc/src/viewer/move.c b/mcsrc/src/viewer/move.c index 4f15b7cf..0bdf38fd 100644 --- a/mcsrc/src/viewer/move.c +++ b/mcsrc/src/viewer/move.c @@ -2,7 +2,7 @@ Internal file viewer for the Midnight Commander Functions for handle cursor movement - Copyright (C) 1994-2023 + Copyright (C) 1994-2024 Free Software Foundation, Inc. Written by: diff --git a/mcsrc/src/viewer/nroff.c b/mcsrc/src/viewer/nroff.c index 14dacd51..a7c7fe2d 100644 --- a/mcsrc/src/viewer/nroff.c +++ b/mcsrc/src/viewer/nroff.c @@ -2,7 +2,7 @@ Internal file viewer for the Midnight Commander Functions for searching in nroff-like view - Copyright (C) 1994-2023 + Copyright (C) 1994-2024 Free Software Foundation, Inc. Written by: diff --git a/mcsrc/src/viewer/search.c b/mcsrc/src/viewer/search.c index f470a361..9fce3989 100644 --- a/mcsrc/src/viewer/search.c +++ b/mcsrc/src/viewer/search.c @@ -2,7 +2,7 @@ Internal file viewer for the Midnight Commander Function for search data - Copyright (C) 1994-2023 + Copyright (C) 1994-2024 Free Software Foundation, Inc. Written by: diff --git a/mcsrc/tests/lib/library_independ.c b/mcsrc/tests/lib/library_independ.c index aa3a2a17..b9e2c1c9 100644 --- a/mcsrc/tests/lib/library_independ.c +++ b/mcsrc/tests/lib/library_independ.c @@ -1,7 +1,7 @@ /* libmc - check if library is independent to $(topsrc)/src directory - Copyright (C) 2011-2023 + Copyright (C) 2011-2024 Free Software Foundation, Inc. Written by: diff --git a/mcsrc/tests/lib/mc_build_filename.c b/mcsrc/tests/lib/mc_build_filename.c index 780676b6..9025a30d 100644 --- a/mcsrc/tests/lib/mc_build_filename.c +++ b/mcsrc/tests/lib/mc_build_filename.c @@ -1,7 +1,7 @@ /* lib - mc_build_filename() function testing - Copyright (C) 2011-2023 + Copyright (C) 2011-2024 Free Software Foundation, Inc. Written by: diff --git a/mcsrc/tests/lib/mc_realpath.c b/mcsrc/tests/lib/mc_realpath.c index f00873cb..a552cdf4 100644 --- a/mcsrc/tests/lib/mc_realpath.c +++ b/mcsrc/tests/lib/mc_realpath.c @@ -1,7 +1,7 @@ /* lib - realpath - Copyright (C) 2017-2023 + Copyright (C) 2017-2024 Free Software Foundation, Inc. Written by: diff --git a/mcsrc/tests/lib/mcconfig/config_string.c b/mcsrc/tests/lib/mcconfig/config_string.c index 4a3a68db..535cc6aa 100644 --- a/mcsrc/tests/lib/mcconfig/config_string.c +++ b/mcsrc/tests/lib/mcconfig/config_string.c @@ -1,7 +1,7 @@ /* libmc - check mcconfig submodule. read and write config files - Copyright (C) 2011-2023 + Copyright (C) 2011-2024 Free Software Foundation, Inc. Written by: diff --git a/mcsrc/tests/lib/mcconfig/user_configs_path.c b/mcsrc/tests/lib/mcconfig/user_configs_path.c index 6140c120..96b02053 100644 --- a/mcsrc/tests/lib/mcconfig/user_configs_path.c +++ b/mcsrc/tests/lib/mcconfig/user_configs_path.c @@ -1,7 +1,7 @@ /* libmc - check mcconfig submodule. Get full paths to user's config files. - Copyright (C) 2011-2023 + Copyright (C) 2011-2024 Free Software Foundation, Inc. Written by: @@ -118,7 +118,7 @@ static const struct test_user_config_paths_ds }, { /* 10. */ CONF_DATA, - FISH_PREFIX + VFS_SHELL_PREFIX }, { /* 11. */ CONF_DATA, diff --git a/mcsrc/tests/lib/name_quote.c b/mcsrc/tests/lib/name_quote.c index e86a6087..f59c2343 100644 --- a/mcsrc/tests/lib/name_quote.c +++ b/mcsrc/tests/lib/name_quote.c @@ -1,7 +1,7 @@ /* lib - Quote file names - Copyright (C) 2011-2023 + Copyright (C) 2011-2024 Free Software Foundation, Inc. Written by: @@ -91,6 +91,8 @@ static const struct data_source2 const char *expected_string; } data_source2[] = { + {NULL, NULL}, + {"", NULL}, {"-", "./-"}, {"blabla-", "blabla-"}, {"\r\n\t", "\\\r\\\n\\\t"}, diff --git a/mcsrc/tests/lib/search/glob_prepare_replace_str.c b/mcsrc/tests/lib/search/glob_prepare_replace_str.c index 6cc50209..07329809 100644 --- a/mcsrc/tests/lib/search/glob_prepare_replace_str.c +++ b/mcsrc/tests/lib/search/glob_prepare_replace_str.c @@ -1,7 +1,7 @@ /* libmc - checks for processing esc sequences in replace string - Copyright (C) 2011-2023 + Copyright (C) 2011-2024 Free Software Foundation, Inc. Written by: @@ -77,7 +77,7 @@ START_PARAMETRIZED_TEST (test_glob_prepare_replace_str, test_glob_prepare_replac /* when */ mc_search_run (s, data->input_value, 0, strlen (data->input_value), NULL); - dest_str = mc_search_prepare_replace_str2 (s, (char *) data->replace_str); + dest_str = mc_search_prepare_replace_str2 (s, data->replace_str); /* then */ mctest_assert_str_eq (dest_str, data->expected_result); diff --git a/mcsrc/tests/lib/search/glob_translate_to_regex.c b/mcsrc/tests/lib/search/glob_translate_to_regex.c index a15df94b..15b40736 100644 --- a/mcsrc/tests/lib/search/glob_translate_to_regex.c +++ b/mcsrc/tests/lib/search/glob_translate_to_regex.c @@ -1,7 +1,7 @@ /* libmc - checks for processing esc sequences in replace string - Copyright (C) 2011-2023 + Copyright (C) 2011-2024 Free Software Foundation, Inc. Written by: diff --git a/mcsrc/tests/lib/search/hex_translate_to_regex.c b/mcsrc/tests/lib/search/hex_translate_to_regex.c index a250bc0b..c71490df 100644 --- a/mcsrc/tests/lib/search/hex_translate_to_regex.c +++ b/mcsrc/tests/lib/search/hex_translate_to_regex.c @@ -1,7 +1,7 @@ /* libmc - checks for hex pattern parsing - Copyright (C) 2017-2023 + Copyright (C) 2017-2024 Free Software Foundation, Inc. This file is part of the Midnight Commander. diff --git a/mcsrc/tests/lib/search/regex_process_escape_sequence.c b/mcsrc/tests/lib/search/regex_process_escape_sequence.c index c7d77858..1296d139 100644 --- a/mcsrc/tests/lib/search/regex_process_escape_sequence.c +++ b/mcsrc/tests/lib/search/regex_process_escape_sequence.c @@ -1,7 +1,7 @@ /* libmc - checks for processing esc sequences in replace string - Copyright (C) 2011-2023 + Copyright (C) 2011-2024 Free Software Foundation, Inc. Written by: diff --git a/mcsrc/tests/lib/search/regex_replace_esc_seq.c b/mcsrc/tests/lib/search/regex_replace_esc_seq.c index 7d5cd3e0..39298d77 100644 --- a/mcsrc/tests/lib/search/regex_replace_esc_seq.c +++ b/mcsrc/tests/lib/search/regex_replace_esc_seq.c @@ -1,7 +1,7 @@ /* libmc - checks for processing esc sequences in replace string - Copyright (C) 2011-2023 + Copyright (C) 2011-2024 Free Software Foundation, Inc. Written by: diff --git a/mcsrc/tests/lib/search/translate_replace_glob_to_regex.c b/mcsrc/tests/lib/search/translate_replace_glob_to_regex.c index 4933adf7..535bcb2a 100644 --- a/mcsrc/tests/lib/search/translate_replace_glob_to_regex.c +++ b/mcsrc/tests/lib/search/translate_replace_glob_to_regex.c @@ -1,7 +1,7 @@ /* libmc - checks for processing esc sequences in replace string - Copyright (C) 2011-2023 + Copyright (C) 2011-2024 Free Software Foundation, Inc. Written by: diff --git a/mcsrc/tests/lib/serialize.c b/mcsrc/tests/lib/serialize.c index f150727c..e1b35516 100644 --- a/mcsrc/tests/lib/serialize.c +++ b/mcsrc/tests/lib/serialize.c @@ -1,7 +1,7 @@ /* lib - common serialize/deserialize functions - Copyright (C) 2011-2023 + Copyright (C) 2011-2024 Free Software Foundation, Inc. Written by: diff --git a/mcsrc/tests/lib/strutil/filevercmp.c b/mcsrc/tests/lib/strutil/filevercmp.c index ba7f7751..29339636 100644 --- a/mcsrc/tests/lib/strutil/filevercmp.c +++ b/mcsrc/tests/lib/strutil/filevercmp.c @@ -1,7 +1,7 @@ /* lib/strutil - tests for lib/strutil/fileverscmp function. - Copyright (C) 2019-2023 + Copyright (C) 2019-2024 Free Software Foundation, Inc. Written by: diff --git a/mcsrc/tests/lib/strutil/parse_integer.c b/mcsrc/tests/lib/strutil/parse_integer.c index 4e25fa46..45520d16 100644 --- a/mcsrc/tests/lib/strutil/parse_integer.c +++ b/mcsrc/tests/lib/strutil/parse_integer.c @@ -1,7 +1,7 @@ /* lib/strutil - tests for lib/strutil/parse_integer function. - Copyright (C) 2013-2023 + Copyright (C) 2013-2024 Free Software Foundation, Inc. Written by: diff --git a/mcsrc/tests/lib/strutil/str_replace_all.c b/mcsrc/tests/lib/strutil/str_replace_all.c index 1a1cb892..836b68df 100644 --- a/mcsrc/tests/lib/strutil/str_replace_all.c +++ b/mcsrc/tests/lib/strutil/str_replace_all.c @@ -1,7 +1,7 @@ /* lib/strutil - tests for lib/strutil/replace.c:str_replace_all() function. - Copyright (C) 2013-2023 + Copyright (C) 2013-2024 Free Software Foundation, Inc. Written by: diff --git a/mcsrc/tests/lib/strutil/str_verscmp.c b/mcsrc/tests/lib/strutil/str_verscmp.c index df11975c..1ae55495 100644 --- a/mcsrc/tests/lib/strutil/str_verscmp.c +++ b/mcsrc/tests/lib/strutil/str_verscmp.c @@ -2,7 +2,7 @@ lib/strutil - tests for lib/strutil/str_verscmp function. Testcases are taken from Gnulib. - Copyright (C) 2019-2023 + Copyright (C) 2019-2024 Free Software Foundation, Inc. Written by: diff --git a/mcsrc/tests/lib/utilunix__mc_pstream_get_string.c b/mcsrc/tests/lib/utilunix__mc_pstream_get_string.c index db5233ee..5ba2285b 100644 --- a/mcsrc/tests/lib/utilunix__mc_pstream_get_string.c +++ b/mcsrc/tests/lib/utilunix__mc_pstream_get_string.c @@ -1,7 +1,7 @@ /* lib - Read string from mc_pipe_stream - Copyright (C) 2021-2023 + Copyright (C) 2021-2024 Free Software Foundation, Inc. Written by: diff --git a/mcsrc/tests/lib/utilunix__my_system-common.c b/mcsrc/tests/lib/utilunix__my_system-common.c index e6391076..db462996 100644 --- a/mcsrc/tests/lib/utilunix__my_system-common.c +++ b/mcsrc/tests/lib/utilunix__my_system-common.c @@ -1,7 +1,7 @@ /* lib - common code for testing lib/utilinux:my_system() function - Copyright (C) 2013-2023 + Copyright (C) 2013-2024 Free Software Foundation, Inc. Written by: diff --git a/mcsrc/tests/lib/utilunix__my_system-fork_child.c b/mcsrc/tests/lib/utilunix__my_system-fork_child.c index b34217b9..46c1fa26 100644 --- a/mcsrc/tests/lib/utilunix__my_system-fork_child.c +++ b/mcsrc/tests/lib/utilunix__my_system-fork_child.c @@ -1,7 +1,7 @@ /* lib - tests lib/utilinux:my_system() function - Copyright (C) 2013-2023 + Copyright (C) 2013-2024 Free Software Foundation, Inc. Written by: diff --git a/mcsrc/tests/lib/utilunix__my_system-fork_child_shell.c b/mcsrc/tests/lib/utilunix__my_system-fork_child_shell.c index 4c062bf9..6c9cb89d 100644 --- a/mcsrc/tests/lib/utilunix__my_system-fork_child_shell.c +++ b/mcsrc/tests/lib/utilunix__my_system-fork_child_shell.c @@ -1,7 +1,7 @@ /* lib - tests lib/utilinux:my_system() function - Copyright (C) 2013-2023 + Copyright (C) 2013-2024 Free Software Foundation, Inc. Written by: diff --git a/mcsrc/tests/lib/utilunix__my_system-fork_fail.c b/mcsrc/tests/lib/utilunix__my_system-fork_fail.c index 638c9524..975045d1 100644 --- a/mcsrc/tests/lib/utilunix__my_system-fork_fail.c +++ b/mcsrc/tests/lib/utilunix__my_system-fork_fail.c @@ -1,7 +1,7 @@ /* lib - tests lib/utilinux:my_system() function - Copyright (C) 2013-2023 + Copyright (C) 2013-2024 Free Software Foundation, Inc. Written by: diff --git a/mcsrc/tests/lib/vfs/canonicalize_pathname.c b/mcsrc/tests/lib/vfs/canonicalize_pathname.c index 8d890c4e..16712fda 100644 --- a/mcsrc/tests/lib/vfs/canonicalize_pathname.c +++ b/mcsrc/tests/lib/vfs/canonicalize_pathname.c @@ -1,7 +1,7 @@ /* lib - canonicalize path - Copyright (C) 2011-2023 + Copyright (C) 2011-2024 Free Software Foundation, Inc. Written by: diff --git a/mcsrc/tests/lib/vfs/current_dir.c b/mcsrc/tests/lib/vfs/current_dir.c index 3814886c..80784bfa 100644 --- a/mcsrc/tests/lib/vfs/current_dir.c +++ b/mcsrc/tests/lib/vfs/current_dir.c @@ -1,7 +1,7 @@ /* lib/vfs - manipulate with current directory - Copyright (C) 2011-2023 + Copyright (C) 2011-2024 Free Software Foundation, Inc. Written by: diff --git a/mcsrc/tests/lib/vfs/path_cmp.c b/mcsrc/tests/lib/vfs/path_cmp.c index 9df1e0e8..b2db3d2a 100644 --- a/mcsrc/tests/lib/vfs/path_cmp.c +++ b/mcsrc/tests/lib/vfs/path_cmp.c @@ -1,6 +1,6 @@ /* lib/vfs - vfs_path_t compare functions - Copyright (C) 2011-2023 + Copyright (C) 2011-2024 Free Software Foundation, Inc. Written by: diff --git a/mcsrc/tests/lib/vfs/path_len.c b/mcsrc/tests/lib/vfs/path_len.c index cb6a782f..6bab6f55 100644 --- a/mcsrc/tests/lib/vfs/path_len.c +++ b/mcsrc/tests/lib/vfs/path_len.c @@ -1,6 +1,6 @@ /* lib/vfs - tests for vfspath_len() function. - Copyright (C) 2011-2023 + Copyright (C) 2011-2024 Free Software Foundation, Inc. Written by: diff --git a/mcsrc/tests/lib/vfs/path_manipulations.c b/mcsrc/tests/lib/vfs/path_manipulations.c index 9857e82d..f379d912 100644 --- a/mcsrc/tests/lib/vfs/path_manipulations.c +++ b/mcsrc/tests/lib/vfs/path_manipulations.c @@ -1,6 +1,6 @@ /* lib/vfs - test vfs_path_t manipulation functions - Copyright (C) 2011-2023 + Copyright (C) 2011-2024 Free Software Foundation, Inc. Written by: diff --git a/mcsrc/tests/lib/vfs/path_recode.c b/mcsrc/tests/lib/vfs/path_recode.c index da31f1ca..a6f6abe6 100644 --- a/mcsrc/tests/lib/vfs/path_recode.c +++ b/mcsrc/tests/lib/vfs/path_recode.c @@ -1,7 +1,7 @@ /* lib/vfs - vfs_path_t charset recode functions - Copyright (C) 2011-2023 + Copyright (C) 2011-2024 Free Software Foundation, Inc. Written by: diff --git a/mcsrc/tests/lib/vfs/path_serialize.c b/mcsrc/tests/lib/vfs/path_serialize.c index a56db8d1..442a3b22 100644 --- a/mcsrc/tests/lib/vfs/path_serialize.c +++ b/mcsrc/tests/lib/vfs/path_serialize.c @@ -1,7 +1,7 @@ /* lib/vfs - vfs_path_t serialize/deserialize functions - Copyright (C) 2011-2023 + Copyright (C) 2011-2024 Free Software Foundation, Inc. Written by: diff --git a/mcsrc/tests/lib/vfs/relative_cd.c b/mcsrc/tests/lib/vfs/relative_cd.c index 8eaa1fff..29f42212 100644 --- a/mcsrc/tests/lib/vfs/relative_cd.c +++ b/mcsrc/tests/lib/vfs/relative_cd.c @@ -1,6 +1,6 @@ /* lib/vfs - test vfs_path_t manipulation functions - Copyright (C) 2011-2023 + Copyright (C) 2011-2024 Free Software Foundation, Inc. Written by: diff --git a/mcsrc/tests/lib/vfs/tempdir.c b/mcsrc/tests/lib/vfs/tempdir.c index 7795e9ba..2a499d19 100644 --- a/mcsrc/tests/lib/vfs/tempdir.c +++ b/mcsrc/tests/lib/vfs/tempdir.c @@ -1,7 +1,7 @@ /* lib/vfs - manipulations with temp files and dirs - Copyright (C) 2012-2023 + Copyright (C) 2012-2024 Free Software Foundation, Inc. Written by: diff --git a/mcsrc/tests/lib/vfs/vfs_adjust_stat.c b/mcsrc/tests/lib/vfs/vfs_adjust_stat.c index 9fb56ee0..19b5e097 100644 --- a/mcsrc/tests/lib/vfs/vfs_adjust_stat.c +++ b/mcsrc/tests/lib/vfs/vfs_adjust_stat.c @@ -1,7 +1,7 @@ /* lib/vfs - test vfs_adjust_stat() functionality - Copyright (C) 2017-2023 + Copyright (C) 2017-2024 Free Software Foundation, Inc. Written by: diff --git a/mcsrc/tests/lib/vfs/vfs_get_encoding.c b/mcsrc/tests/lib/vfs/vfs_get_encoding.c index a7503caa..d599cdf9 100644 --- a/mcsrc/tests/lib/vfs/vfs_get_encoding.c +++ b/mcsrc/tests/lib/vfs/vfs_get_encoding.c @@ -1,7 +1,7 @@ /* lib/vfs - test vfs_get_encoding() functionality - Copyright (C) 2013-2023 + Copyright (C) 2013-2024 Free Software Foundation, Inc. Written by: diff --git a/mcsrc/tests/lib/vfs/vfs_parse_ls_lga.c b/mcsrc/tests/lib/vfs/vfs_parse_ls_lga.c index 3d51f820..316de8f9 100644 --- a/mcsrc/tests/lib/vfs/vfs_parse_ls_lga.c +++ b/mcsrc/tests/lib/vfs/vfs_parse_ls_lga.c @@ -1,7 +1,7 @@ /* lib/vfs - test vfs_parse_ls_lga() functionality - Copyright (C) 2011-2023 + Copyright (C) 2011-2024 Free Software Foundation, Inc. Written by: diff --git a/mcsrc/tests/lib/vfs/vfs_path_from_str_flags.c b/mcsrc/tests/lib/vfs/vfs_path_from_str_flags.c index 1f1c29de..9a68f436 100644 --- a/mcsrc/tests/lib/vfs/vfs_path_from_str_flags.c +++ b/mcsrc/tests/lib/vfs/vfs_path_from_str_flags.c @@ -1,6 +1,6 @@ /* lib/vfs - test vfs_path_from_str_flags() function - Copyright (C) 2013-2023 + Copyright (C) 2013-2024 Free Software Foundation, Inc. Written by: diff --git a/mcsrc/tests/lib/vfs/vfs_path_string_convert.c b/mcsrc/tests/lib/vfs/vfs_path_string_convert.c index 4a792494..b062a83e 100644 --- a/mcsrc/tests/lib/vfs/vfs_path_string_convert.c +++ b/mcsrc/tests/lib/vfs/vfs_path_string_convert.c @@ -1,7 +1,7 @@ /* lib/vfs - get vfs_path_t from string - Copyright (C) 2011-2023 + Copyright (C) 2011-2024 Free Software Foundation, Inc. Written by: diff --git a/mcsrc/tests/lib/vfs/vfs_prefix_to_class.c b/mcsrc/tests/lib/vfs/vfs_prefix_to_class.c index 414d52d1..482c6dbe 100644 --- a/mcsrc/tests/lib/vfs/vfs_prefix_to_class.c +++ b/mcsrc/tests/lib/vfs/vfs_prefix_to_class.c @@ -1,7 +1,7 @@ /* lib/vfs - test vfs_prefix_to_class() functionality - Copyright (C) 2011-2023 + Copyright (C) 2011-2024 Free Software Foundation, Inc. Written by: diff --git a/mcsrc/tests/lib/vfs/vfs_s_get_path.c b/mcsrc/tests/lib/vfs/vfs_s_get_path.c index 382b6ef6..51812e6e 100644 --- a/mcsrc/tests/lib/vfs/vfs_s_get_path.c +++ b/mcsrc/tests/lib/vfs/vfs_s_get_path.c @@ -1,7 +1,7 @@ /* lib/vfs - test vfs_s_get_path() function - Copyright (C) 2011-2023 + Copyright (C) 2011-2024 Free Software Foundation, Inc. Written by: diff --git a/mcsrc/tests/lib/vfs/vfs_setup_cwd.c b/mcsrc/tests/lib/vfs/vfs_setup_cwd.c index 9acfb92a..2722d814 100644 --- a/mcsrc/tests/lib/vfs/vfs_setup_cwd.c +++ b/mcsrc/tests/lib/vfs/vfs_setup_cwd.c @@ -1,7 +1,7 @@ /* lib/vfs - test vfs_setup_cwd() functionality - Copyright (C) 2013-2023 + Copyright (C) 2013-2024 Free Software Foundation, Inc. Written by: diff --git a/mcsrc/tests/lib/vfs/vfs_split.c b/mcsrc/tests/lib/vfs/vfs_split.c index cafa8552..a7fe7a48 100644 --- a/mcsrc/tests/lib/vfs/vfs_split.c +++ b/mcsrc/tests/lib/vfs/vfs_split.c @@ -1,7 +1,7 @@ /* lib/vfs - test vfs_split() functionality - Copyright (C) 2011-2023 + Copyright (C) 2011-2024 Free Software Foundation, Inc. Written by: diff --git a/mcsrc/tests/lib/widget/complete_engine.c b/mcsrc/tests/lib/widget/complete_engine.c index b16a4d92..d723b34a 100644 --- a/mcsrc/tests/lib/widget/complete_engine.c +++ b/mcsrc/tests/lib/widget/complete_engine.c @@ -1,7 +1,7 @@ /* lib/widget - tests for autocomplete feature - Copyright (C) 2013-2023 + Copyright (C) 2013-2024 Free Software Foundation, Inc. Written by: diff --git a/mcsrc/tests/lib/widget/group_init_destroy.c b/mcsrc/tests/lib/widget/group_init_destroy.c index 0da28216..32d0184e 100644 --- a/mcsrc/tests/lib/widget/group_init_destroy.c +++ b/mcsrc/tests/lib/widget/group_init_destroy.c @@ -1,7 +1,7 @@ /* libmc - checks for initialization and deinitialization of WGroup widget - Copyright (C) 2020-2023 + Copyright (C) 2020-2024 The Free Software Foundation, Inc. Written by: diff --git a/mcsrc/tests/lib/widget/hotkey_equal.c b/mcsrc/tests/lib/widget/hotkey_equal.c index a455d842..8375bc0b 100644 --- a/mcsrc/tests/lib/widget/hotkey_equal.c +++ b/mcsrc/tests/lib/widget/hotkey_equal.c @@ -1,7 +1,7 @@ /* lib/widget - tests for hotkey comparison - Copyright (C) 2019-2023 + Copyright (C) 2019-2024 Free Software Foundation, Inc. Written by: diff --git a/mcsrc/tests/lib/widget/widget_find_by_id.c b/mcsrc/tests/lib/widget/widget_find_by_id.c index 2477c026..88229e44 100644 --- a/mcsrc/tests/lib/widget/widget_find_by_id.c +++ b/mcsrc/tests/lib/widget/widget_find_by_id.c @@ -1,7 +1,7 @@ /* libmc - checks for search widget with requested ID - Copyright (C) 2020-2023 + Copyright (C) 2020-2024 The Free Software Foundation, Inc. Written by: diff --git a/mcsrc/tests/lib/widget/widget_make_global_local.c b/mcsrc/tests/lib/widget/widget_make_global_local.c index 379746dd..e4a92e4c 100644 --- a/mcsrc/tests/lib/widget/widget_make_global_local.c +++ b/mcsrc/tests/lib/widget/widget_make_global_local.c @@ -1,7 +1,7 @@ /* libmc - checks for search widget with requested ID - Copyright (C) 2021-2023 + Copyright (C) 2021-2024 The Free Software Foundation, Inc. Written by: diff --git a/mcsrc/tests/lib/x_basename.c b/mcsrc/tests/lib/x_basename.c index 2adce3ba..6137cd98 100644 --- a/mcsrc/tests/lib/x_basename.c +++ b/mcsrc/tests/lib/x_basename.c @@ -1,7 +1,7 @@ /* lib - x_basename() function testing - Copyright (C) 2011-2023 + Copyright (C) 2011-2024 Free Software Foundation, Inc. Written by: diff --git a/mcsrc/tests/src/editor/edit_complete_word_cmd.c b/mcsrc/tests/src/editor/edit_complete_word_cmd.c index 77bb4d0b..a75c98db 100644 --- a/mcsrc/tests/src/editor/edit_complete_word_cmd.c +++ b/mcsrc/tests/src/editor/edit_complete_word_cmd.c @@ -1,7 +1,7 @@ /* src/editor - tests for edit_complete_word_cmd() function - Copyright (C) 2013-2023 + Copyright (C) 2013-2024 Free Software Foundation, Inc. Written by: diff --git a/mcsrc/tests/src/execute__common.c b/mcsrc/tests/src/execute__common.c index 598b3d0c..0ca5dc01 100644 --- a/mcsrc/tests/src/execute__common.c +++ b/mcsrc/tests/src/execute__common.c @@ -1,7 +1,7 @@ /* Common code for testing functions in src/execute.c file. - Copyright (C) 2013-2023 + Copyright (C) 2013-2024 Free Software Foundation, Inc. diff --git a/mcsrc/tests/src/execute__execute_external_editor_or_viewer.c b/mcsrc/tests/src/execute__execute_external_editor_or_viewer.c index e6594772..7fb8d969 100644 --- a/mcsrc/tests/src/execute__execute_external_editor_or_viewer.c +++ b/mcsrc/tests/src/execute__execute_external_editor_or_viewer.c @@ -1,7 +1,7 @@ /* src - tests for execute_external_editor_or_viewer() function - Copyright (C) 2013-2023 + Copyright (C) 2013-2024 Free Software Foundation, Inc. Written by: diff --git a/mcsrc/tests/src/execute__execute_get_external_cmd_opts_from_config.c b/mcsrc/tests/src/execute__execute_get_external_cmd_opts_from_config.c index bf7f77dd..87643cfe 100644 --- a/mcsrc/tests/src/execute__execute_get_external_cmd_opts_from_config.c +++ b/mcsrc/tests/src/execute__execute_get_external_cmd_opts_from_config.c @@ -1,7 +1,7 @@ /* src - tests for execute_external_editor_or_viewer() function - Copyright (C) 2013-2023 + Copyright (C) 2013-2024 Free Software Foundation, Inc. Written by: diff --git a/mcsrc/tests/src/execute__execute_with_vfs_arg.c b/mcsrc/tests/src/execute__execute_with_vfs_arg.c index 528586bf..232132e9 100644 --- a/mcsrc/tests/src/execute__execute_with_vfs_arg.c +++ b/mcsrc/tests/src/execute__execute_with_vfs_arg.c @@ -1,7 +1,7 @@ /* src - tests for execute_with_vfs_arg() function - Copyright (C) 2013-2023 + Copyright (C) 2013-2024 Free Software Foundation, Inc. Written by: diff --git a/mcsrc/tests/src/filemanager/cd_to.c b/mcsrc/tests/src/filemanager/cd_to.c index 37156d57..96a04e64 100644 --- a/mcsrc/tests/src/filemanager/cd_to.c +++ b/mcsrc/tests/src/filemanager/cd_to.c @@ -1,7 +1,7 @@ /* src/filemanager - tests for cd_to() function - Copyright (C) 2011-2023 + Copyright (C) 2011-2024 Free Software Foundation, Inc. Written by: diff --git a/mcsrc/tests/src/filemanager/examine_cd.c b/mcsrc/tests/src/filemanager/examine_cd.c index bbb92f92..7298c268 100644 --- a/mcsrc/tests/src/filemanager/examine_cd.c +++ b/mcsrc/tests/src/filemanager/examine_cd.c @@ -1,7 +1,7 @@ /* src/filemanager - examine_cd() function testing - Copyright (C) 2012-2023 + Copyright (C) 2012-2024 Free Software Foundation, Inc. Written by: diff --git a/mcsrc/tests/src/filemanager/exec_get_export_variables_ext.c b/mcsrc/tests/src/filemanager/exec_get_export_variables_ext.c index dea05a1d..6f6901ba 100644 --- a/mcsrc/tests/src/filemanager/exec_get_export_variables_ext.c +++ b/mcsrc/tests/src/filemanager/exec_get_export_variables_ext.c @@ -1,7 +1,7 @@ /* src/filemanager - filemanager functions - Copyright (C) 2011-2023 + Copyright (C) 2011-2024 Free Software Foundation, Inc. Written by: diff --git a/mcsrc/tests/src/filemanager/filegui_is_wildcarded.c b/mcsrc/tests/src/filemanager/filegui_is_wildcarded.c index 28a11fda..7d6d4cec 100644 --- a/mcsrc/tests/src/filemanager/filegui_is_wildcarded.c +++ b/mcsrc/tests/src/filemanager/filegui_is_wildcarded.c @@ -1,7 +1,7 @@ /* src/filemanager - tests for is_wildcarded() function - Copyright (C) 2011-2023 + Copyright (C) 2011-2024 Free Software Foundation, Inc. Written by: diff --git a/mcsrc/tests/src/filemanager/get_random_hint.c b/mcsrc/tests/src/filemanager/get_random_hint.c index 80dd1a73..8370619f 100644 --- a/mcsrc/tests/src/filemanager/get_random_hint.c +++ b/mcsrc/tests/src/filemanager/get_random_hint.c @@ -2,7 +2,7 @@ src/filemanager - filemanager functions. Tests for getting random hints. - Copyright (C) 2013-2023 + Copyright (C) 2013-2024 Free Software Foundation, Inc. Written by: diff --git a/mcsrc/tests/src/vfs/extfs/helpers-list/mc_parse_ls_l.c b/mcsrc/tests/src/vfs/extfs/helpers-list/mc_parse_ls_l.c index 7c6ef18e..8c1889e3 100644 --- a/mcsrc/tests/src/vfs/extfs/helpers-list/mc_parse_ls_l.c +++ b/mcsrc/tests/src/vfs/extfs/helpers-list/mc_parse_ls_l.c @@ -1,7 +1,7 @@ /* A parser for file-listings formatted like 'ls -l'. - Copyright (C) 2016-2023 + Copyright (C) 2016-2024 Free Software Foundation, Inc. This file is part of the Midnight Commander. diff --git a/mcsrc/tests/src/vfs/ftpfs/ftpfs_parse_long_list.c b/mcsrc/tests/src/vfs/ftpfs/ftpfs_parse_long_list.c index 29433648..840c57d0 100644 --- a/mcsrc/tests/src/vfs/ftpfs/ftpfs_parse_long_list.c +++ b/mcsrc/tests/src/vfs/ftpfs/ftpfs_parse_long_list.c @@ -1,6 +1,6 @@ /* src/vfs/ftpfs - tests for ftpfs_parse_long_list() function. - Copyright (C) 2021-2023 + Copyright (C) 2021-2024 Free Software Foundation, Inc. Written by: diff --git a/mcsrc/tests/src/viewer/viewertest.txt b/mcsrc/tests/src/viewer/viewertest.txt index 88c2032b..3b737bdb 100644 Binary files a/mcsrc/tests/src/viewer/viewertest.txt and b/mcsrc/tests/src/viewer/viewertest.txt differ diff --git a/mcwin32/Makefile.in b/mcwin32/Makefile.in index fa3ede92..6ec170bb 100644 --- a/mcwin32/Makefile.in +++ b/mcwin32/Makefile.in @@ -1,7 +1,7 @@ # -*- mode: mak; indent-tabs-mode: t; tab-width: 8 -*- # Midnight command WIN32 # -# Copyright (c) 2007, 2012 - 2023 Adam Young. +# Copyright (c) 2007, 2012 - 2024 Adam Young. # # This file is part of the Midnight Commander. # @@ -540,7 +540,7 @@ MC_LIBVFS_SFTPFS=\ MC_LIBVFS=\ $(D_OBJVFS)/cpio_cpio$(O) \ $(D_OBJVFS)/extfs_extfs$(O) \ - $(D_OBJVFS)/fish_fish$(O) \ + $(D_OBJVFS)/shell_shell$(O) \ $(D_OBJVFS)/ftpfs_ftpfs$(O) \ $(D_OBJVFS)/ftpfs_ftpfs_parse_ls$(O) \ $(D_OBJVFS)/local_local$(O) \ @@ -558,7 +558,6 @@ else MC_RES= $(D_OBJ)/mc.res endif - OBJS= $(MC_OBJS) @@ -571,7 +570,7 @@ MAN_SRC= $(MCSOURCE)/doc/man HLP_SRC= $(MCSOURCE)/doc/hlp EXTD_SRC= $(MCSOURCE)/misc/ext.d EXTFS_SRC= $(MCSOURCE)/src/vfs/extfs/helpers -FISH_SRC= $(MCSOURCE)/src/vfs/fish/helpers +SHELL_SRC= $(MCSOURCE)/src/vfs/shell/helpers MISC_SRC= $(MCSOURCE)/misc SKINS_SRC= $(MCSOURCE)/misc/skins SYNTAX_SRC= $(MCSOURCE)/misc/syntax @@ -636,8 +635,8 @@ CFG_PLUGIN:= $(addprefix $(D_PLUGIN)/, \ CFG_PLUGIN_EXTFS_D:= $(addprefix $(D_PLUGIN)/extfs.d/, \ $(subst .in,,$(filter-out Makefile.am sfs.ini CVS, $(notdir $(wildcard $(EXTFS_SRC)/*.in))))) -CFG_PLUGIN_FISH:= $(addprefix $(D_PLUGIN)/fish/, \ - $(filter-out Makefile.am CVS, $(notdir $(wildcard $(FISH_SRC)/*)))) +CFG_PLUGIN_SHELL:= $(addprefix $(D_PLUGIN)/shell/, \ + $(filter-out Makefile.am CVS, $(notdir $(wildcard $(SHELL_SRC)/*)))) CFG_WIN32_PLUGIN:= $(filter-out CVS extfs.d, $(notdir $(wildcard $(WIN32_PLUGIN_SRC)/*))) CFG_WIN32_PLUGIN_EXTFS_D:=$(filter-out CVS, $(notdir $(wildcard $(WIN32_PLUGIN_SRC)/extfs.d/*.in))) @@ -678,7 +677,7 @@ CONFIGURATION=\ $(CFG_SHARE_MACROS_D) \ $(CFG_PLUGIN) \ $(CFG_PLUGIN_EXTFS_D) \ - $(CFG_PLUGIN_FISH) \ + $(CFG_PLUGIN_SHELL) \ $(CFG_DOC) @@ -687,6 +686,8 @@ CONFIGURATION=\ TARGETS=\ $(D_BIN)/mc$(E) \ + $(D_BIN)/mcdiff$(E) \ + $(D_BIN)/kbtest$(E) \ $(D_BIN)/man2hlp.pl IMPORT=\ @@ -761,7 +762,7 @@ DIRECTORIES:=\ $(D_LOCALE)/.created \ $(D_PLUGIN)/.created \ $(D_PLUGIN)/extfs.d/.created \ - $(D_PLUGIN)/fish/.created \ + $(D_PLUGIN)/shell/.created \ $(D_SHARE)/.created \ $(D_SHARE)/help/.created \ $(D_SHARE)/hints/.created \ @@ -912,6 +913,8 @@ clean: $(MAKE) -C libregex clean $(MAKE) -C libz clean $(MAKE) -C libw32 clean + $(MAKE) -C diff clean + $(MAKE) -C src/kbtest clean $(MAKE) -C autoupdater clean -$(RM) $(MSGOBJS) $(MSGDIRS) $(QUIETOUT) -$(RM) $(CONFIGURATION) $(QUIETOUT) @@ -932,6 +935,12 @@ $(D_BIN)/mc$(E): MAPFILE=$(basename $@).map $(D_BIN)/mc$(E): $(MC_OBJS) $(MC_RES) $(LDLIBRARIES) $(LIBTOOL) --mode=link $(CC) $(LDFLAGS) -o $@ $^ $(LDLIBS) @LDMAPFILE@ +$(D_BIN)/mcdiff$(E): + $(MAKE) -C diff + +$(D_BIN)/kbtest$(E): + $(MAKE) -C src/kbtest + $(MC_RES): config.h buildinfo.h BUILD_DATE= $(shell $(BUSYBOX) date +'%Y%m%d') @@ -1039,8 +1048,8 @@ $(D_PLUGIN)/extfs.d/% : $(EXTFS_SRC)/% $(D_PLUGIN)/extfs.d/% : $(EXTFS_SRC)/%.in @$(PERL) ./support/sedin.pl -u $^ $@ -# .. plugin/fish -$(D_PLUGIN)/fish/% : $(FISH_SRC)/% +# .. plugin/shell +$(D_PLUGIN)/shell/% : $(SHELL_SRC)/% @echo importing $@ .. @$(CP) $^ $@ @$(BUSYBOX) dos2unix $@ @@ -1258,7 +1267,7 @@ $(D_OBJVFS)/cpio_%$(O) : $(MCSOURCE)/src/vfs/cpio/%.c $(D_OBJVFS)/extfs_%$(O) : $(MCSOURCE)/src/vfs/extfs/%.c $(CC) $(CFLAGS) -o $@ -c $< -$(D_OBJVFS)/fish_%$(O) : $(MCSOURCE)/src/vfs/fish/%.c +$(D_OBJVFS)/shell_%$(O) : $(MCSOURCE)/src/vfs/shell/%.c $(CC) $(CFLAGS) -o $@ -c $< $(D_OBJVFS)/ftpfs_%$(O) : $(MCSOURCE)/src/vfs/ftpfs/%.c diff --git a/mcwin32/autoupdater/updater.rc b/mcwin32/autoupdater/updater.rc index fb91b8a8..def1191e 100644 --- a/mcwin32/autoupdater/updater.rc +++ b/mcwin32/autoupdater/updater.rc @@ -96,7 +96,7 @@ VS_VERSION_INFO VERSIONINFO VALUE "InternalName", "WIN32 Midnight Commander" VALUE "Copyright", - "Copyright (C) 2012-2023, Adam Young. All rights reserved. \n" + "Copyright (C) 2012-2024, Adam Young. All rights reserved. \n" "Copyright (c) 1998-2000 Thai Open Source Software Center Ltd and Clark Cooper. \n" "Copyright (c) 2001-2019 Expat maintainers. \n" "This is free software; see the source for copying conditions. \n" diff --git a/mcwin32/buildinfo.pl b/mcwin32/buildinfo.pl index e191241e..96586262 100644 --- a/mcwin32/buildinfo.pl +++ b/mcwin32/buildinfo.pl @@ -1,9 +1,9 @@ #!/usr/bin/perl -w # -*- mode: perl; -*- -# $Id: buildinfo.pl,v 1.9 2023/01/31 17:07:13 cvsuser Exp $ +# $Id: buildinfo.pl,v 1.11 2024/03/09 17:58:47 cvsuser Exp $ # buildinfo generation # -# Copyright Adam Young 2018-2023 +# Copyright Adam Young 2018 - 2024 # All rights reserved. # # The applications are free software: you can redistribute it @@ -131,8 +131,13 @@ #define ${prefix}BUILD_NUMBER "${buildnumber}" EOT - print FILE "#define BUILD_TOOLCHAIN \"${buildtoolchain}\"\n" - if ($buildtoolchain); + if ($buildtoolchain) { + my $buildtoolname = $buildtoolchain; + $buildtoolname =~ s/^\.//; + + print FILE "#define BUILD_TOOLCHAIN \"${buildtoolchain}\"\n"; + print FILE "#define BUILD_TOOLNAME \"${buildtoolname}\"\n"; + } if ($buildtype) { print FILE "#define BUILD_TYPE \"${buildtype}\"\n"; diff --git a/mcwin32/busyboxcmds.pl b/mcwin32/busyboxcmds.pl index ec09f37d..d2a163a0 100644 --- a/mcwin32/busyboxcmds.pl +++ b/mcwin32/busyboxcmds.pl @@ -1,9 +1,9 @@ #!/usr/bin/perl -w # -*- mode: perl; -*- -# $Id: busyboxcmds.pl,v 1.3 2023/11/26 15:05:41 cvsuser Exp $ +# $Id: busyboxcmds.pl,v 1.4 2024/01/16 15:18:03 cvsuser Exp $ # busybox command line generation # -# Copyright Adam Young 2023 +# Copyright Adam Young 2023 - 2024 # All rights reserved. # # The applications are free software: you can redistribute it diff --git a/mcwin32/config.h b/mcwin32/config.h index 076a3970..5158a35c 100644 --- a/mcwin32/config.h +++ b/mcwin32/config.h @@ -3,7 +3,7 @@ /* * win32 Midnight Commander -- config.h * - * Written by: Adam Young 2012 - 2023 + * Written by: Adam Young 2012 - 2024 * * This file is part of the Midnight Commander. * @@ -80,8 +80,12 @@ const char * mc_EXTHELPERSDIR(void); #define LIBEXECDIR mc_LIBEXECDIR() /* /lib/mc */ #define EXTHELPERSDIR mc_EXTHELPERSDIR() /* ???, 4.8.7 */ +extern void WIN32_Setup(void); + extern FILE * win32_popen(const char *cmd, const char *mode); extern int win32_pclose(FILE *file); +extern void win32_ptrace(void); +extern int win32_perror(int error, const char *msg); #ifndef popen #define popen(__cmd,__mode) win32_popen(__cmd, __mode) @@ -177,9 +181,8 @@ extern void tty_set_title(const char *title); #define ENABLE_VFS_SFS 1 #define ENABLE_VFS_EXTFS 1 #define ENABLE_VFS_FTP 1 -#define ENABLE_VFS_FISH 1 /* build-225+ */ +#define ENABLE_VFS_SHELL 1 /* build-225+ */ #define ENABLE_VFS_SFTP 1 /* libssh2 */ - //#undef ENABLE_VFS_SMB /* removed, 4.8.28 */ #undef ENABLE_VFS_UNDELFS #define SIG_ATOMIC_VOLATILE_T int volatile diff --git a/mcwin32/diff/.cvsignore b/mcwin32/diff/.cvsignore new file mode 100644 index 00000000..83a4ebfe --- /dev/null +++ b/mcwin32/diff/.cvsignore @@ -0,0 +1,5 @@ +diff_license.h +diff_usage.h +mcdiffinfo.h +Makefile +*.err diff --git a/mcwin32/diff/.gitignore b/mcwin32/diff/.gitignore new file mode 100644 index 00000000..512cd221 --- /dev/null +++ b/mcwin32/diff/.gitignore @@ -0,0 +1,5 @@ +diff_license.h +diff_usage.h +mcdiffinfo.h + + diff --git a/mcwin32/diff/LICENSE b/mcwin32/diff/LICENSE new file mode 100644 index 00000000..bb0a295a --- /dev/null +++ b/mcwin32/diff/LICENSE @@ -0,0 +1,63 @@ +/*- + * SPDX-License-Identifier: BSD-4-Clause + * + * Copyright (C) Caldera International Inc. 2001-2002. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code and documentation must retain the above + * copyright notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. All advertising materials mentioning features or use of this software + * must display the following acknowledgement: + * This product includes software developed or owned by Caldera + * International, Inc. + * 4. Neither the name of Caldera International, Inc. nor the names of other + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * USE OF THE SOFTWARE PROVIDED FOR UNDER THIS LICENSE BY CALDERA + * INTERNATIONAL, INC. AND CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL CALDERA INTERNATIONAL, INC. BE LIABLE FOR ANY DIRECT, + * INDIRECT INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, + * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING + * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + */ +/*- + * Copyright (c) 1991, 1993 + * The Regents of the University of California. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. Neither the name of the University nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ diff --git a/mcwin32/diff/Makefile.in b/mcwin32/diff/Makefile.in new file mode 100644 index 00000000..8e3332e5 --- /dev/null +++ b/mcwin32/diff/Makefile.in @@ -0,0 +1,260 @@ +# -*- mode: mak; indent-tabs-mode: t; tab-width: 8 -*- +# $Id: Makefile.in,v 1.2 2024/03/03 06:56:44 cvsuser Exp $ +# mcdiff +# +# +# + +@SET_MAKE@ +ROOT= @abs_top_builddir@ +top_builddir= @top_builddir@ + +# Configuration + +PACKAGE= "mc" +PKG_NAME= "mcdiff" +PKG_VERSION= 1.0.2 + +# File extensions + +E= +O= .o +A= .a +LP= lib + +CLEAN= *.bak *~ *.BAK *.swp *.tmp core *.core a.out +XCLEAN= + +# Compilers, programs + +CC= @CC@ +CXX= @CXX@ +AR= @AR@ +RANLIB= @RANLIB@ +RM= @RM@ +PERL= @PERL@ +LIBTOOL= @LIBTOOL@ +RC= @RC@ + +BUSYBOX= @BUSYBOX@ +ifeq ($(BUSYBOX),busybox) +BUSYBOX= $(shell which busybox 2>/dev/null) +endif + +BUILD_DATE= $(shell $(BUSYBOX) date +'%Y%m%d') +ifneq ($(APPVEYOR_BUILD_NUMBER),) +BUILD_NUMBER= $(APPVEYOR_BUILD_NUMBER) +else ifneq ($(GITHUB_RUN_NUMBER),) +BUILD_NUMBER= $(GITHUB_RUN_NUMBER) +else +BUILD_NUMBER= $(shell $(BUSYBOX) cat ../BUILDNUMBER) +endif + +# Configuration + +ifeq ("$(BUILD_TYPE)","") #default +BUILD_TYPE= debug +MAKEFLAGS+= BUILD_TYPE=debug +endif +ifneq ("$(BUILD_TYPE)","release") +RTSUFFIX=d +endif + +QUIETOUT:= >/dev/null 2>&1 +ifeq ($(VERBOSE),1) +QUIETOUT:= +else ifeq ($(VERBOSE),0) +else ifeq ($(VERBOSE),) +else +$(error VERBOSE: unexpected value 0 or 1 required, $(VERBOSE) given])) +endif + +# Directories + +D_INC= $(ROOT)/include +D_BIN= $(ROOT)/bin@TOOLCHAINEXT@/$(BUILD_TYPE) +D_LIB= $(ROOT)/lib@TOOLCHAINEXT@/$(BUILD_TYPE) +D_OBJ= $(ROOT)/obj@TOOLCHAINEXT@/$(BUILD_TYPE)/mcdiff + +# Common flags + +XFLAGS= +CFLAGS= @CFLAGS@ +CWARN= @CWARN@ $(CWALL) +ifeq ("gcc","@CC@") +#CWARN+= -Wno-shadow -Wno-sign-compare -Wno-type-limits +#CWARN+= -Wno-unused-variable -Wno-unused-parameter +#CWARN+= -Wno-unused-parameter -Wno-unused-function +#CWARN+= -Wno-missing-field-initializers -Wno-implicit-fallthrough +endif +CDEBUG= @CDEBUG@ +CRELEASE= @CRELEASE@ +CXXFLAGS= @CXXFLAGS@ +ifeq ("gcc","@CC@") +CXXFLAGS+= -fpermissive +endif +CXXDEBUG= @CXXDEBUG@ +ifeq ("$(CXXDEBUG)","") +CXXDEBUG= $(CDEBUG) +endif +CXXRELEASE= @CXXRELEASE@ +ifeq ("$(CXXRELEASE)","") +CXXRELEASE= $(CRELEASE) +endif +LDDEBUG= @LDDEBUG@ +LDRELEASE= @LDRELEASE@ + +CINCLUDE= -I$(D_INC) @CINCLUDE@ +CEXTRA= @DEFS@ @LIBCURL_CPPFLAGS@ -DLIBTRE_DLL +ifdef PURIFY +CEXTRA+= -DUSING_PURIFY +endif +ifeq ("win32","@build_os@") +CEXTRA+= -DWIN32 +endif +CDEPFLAGS= $(CEXTRA) $(CINCLUDE) + +ifeq ("$(BUILD_TYPE)","release") +CFLAGS+= $(CRELEASE) $(CWARN) $(CINCLUDE) $(CEXTRA) $(XFLAGS) +CXXFLAGS+= $(CXXRELEASE) $(CXXWARN) $(CINCLUDE) @CXXINCLUDE@ $(CEXTRA) $(XFLAGS) +LDFLAGS= $(LDRELEASE) @LDFLAGS@ +else +CFLAGS+= $(CDEBUG) $(CWARN) $(CINCLUDE) $(CEXTRA) $(XFLAGS) +CXXFLAGS+= $(CXXDEBUG) $(CXXWARN) $(CINCLUDE) @CXXINCLUDE@ $(CEXTRA) $(XFLAGS) +LDFLAGS= $(LDDEBUG) @LDFLAGS@ +endif +LDLIBS= -L$(D_LIB) $(D_LIB)/$(LP)regex$(A) @LIBS@ @EXTRALIBS@ + +YFLAGS= -d +ARFLAGS= rcv +RMFLAGS= -f +RMDFLAGS= -rf + + +######################################################################################### +# Targets + +MCDIFFLIB= $(D_LIB)/$(LP)mcdiff$(A) + +MCDIFFTSK= $(D_BIN)/mcdiff$(E) +MCDIFFSRC= . + +VPATH+= ./compat +LIBCSOURCES=\ + bcopy.c \ + bzero.c \ + explicit_bzero.c \ + fgetln.c \ + getline.c \ + fnmatch.c \ + localtime_r.c \ + mktemp.c \ + qsort_r.c \ + scandir.c \ + strndup.c \ + strtonum.c \ + \ + reallocarray.c \ + recallocarray.c \ + \ + asprintf.c \ + vasprintf.c + +VPATH+= $(MCDIFFSRC) +CSOURCES=\ + diff.c \ + diffdir.c \ + diffreg.c \ + diffwin.c \ + xmalloc.c + +## $(D_OBJ)/pr.c + +LIBOBJS= $(addprefix $(D_OBJ)/,$(subst .c,$(O),$(LIBCSOURCES))) + +TSKOBJS= $(addprefix $(D_OBJ)/,$(subst .c,$(O),$(CSOURCES))) + +ifeq (mingw,$(findstring mingw,"@TOOLCHAIN@")) +TSKOBJS+= $(D_OBJ)/mcdiff_res.o +else +TSKOBJS+= $(D_OBJ)/mcdiff.res +endif + +OBJS= $(LIBOBJS) $(TSKOBJS) +LIBS= $(MCDIFFLIB) +DLLS= +TSKS= $(MCDIFFTSK) +INSTALLED= +GENERATED= + + +######################################################################################### +# Rules + +.PHONY: headers build release debug +build: headers buildinfo $(LIBS) $(DLLS) $(TSKS) + +release: + $(MAKE) BUILD_TYPE=release $(filter-out release, $(MAKECMDGOALS)) +debug: + $(MAKE) BUILD_TYPE=debug $(filter-out debug, $(MAKECMDGOALS)) + +headers: diff_license.h diff_usage.h + +GENERATED+= diff_license.h +diff_license.h: LICENSE ../support/mklicense.pl + @$(PERL) ../support/mklicense.pl $< $@ diff_license + +GENERATED+= diff_usage.h +diff_usage.h: man.txt ../support/mklicense.pl + @$(PERL) ../support/mklicense.pl $< $@ diff_usage + +$(MCDIFFLIB): CEXTRA += -I./compat -DLIBCOMPAT_SOURCE +$(MCDIFFLIB): CEXTRA += -DLIBW32_DYNAMIC +$(MCDIFFLIB): $(D_OBJ)/.created $(LIBOBJS) + $(RM) $(RMFLAGS) $@ $(QUIETOUT) + $(AR) $(ARFLAGS) $@ $(LIBOBJS) + $(RANLIB) $@ + +$(MCDIFFTSK): CEXTRA += -I. -I./compat +$(MCDIFFTSK): CEXTRA += -DLIBW32_DYNAMIC +$(MCDIFFTSK): MAPFILE=$(basename $@).map +$(MCDIFFTSK): $(D_OBJ)/.created $(TSKOBJS) + $(LIBTOOL) --mode=link $(CXX) $(LDFLAGS) -o $@ $(TSKOBJS) $(MCDIFFLIB) $(LDLIBS) -MAP:$(MAPFILE) + +.PHONY: buildinfo +mcdiffinfo.h: buildinfo +buildinfo: Makefile ../buildinfo.pl + @echo updating mcdiffinfo.h ... + -@$(PERL) ..//buildinfo.pl -o mcdiffinfo.h --package="$(PACKAGE)" --name="$(PKG_NAME)" --version="$(PKG_VERSION)" \ + --date="$(BUILD_DATE)" --build="$(BUILD_NUMBER)" --toolchain="@TOOLCHAINEXT@" + +%/.created: + -@mkdir $(@D) + @echo "do not delete, managed directory" > $@ + +clean: + @echo $(BUILD_TYPE) clean + -@$(LIBTOOL) --mode=clean $(RM) $(OBJS) $(DLLS) $(DLLOBJS) $(QUIETOUT) + -@$(RM) $(RMFLAGS) $(BAK) $(TSKS) $(INSTALLED) $(LIBS) $(CLEAN) $(XCLEAN) $(QUIETOUT) + -@$(RM) $(LIBOBJS) $(QUIETOUT) + +$(D_OBJ)/%$(O): %.cpp + $(CC) $(CXXFLAGS) -o $@ -c $< + +$(D_OBJ)/%$(O): %.c + $(CC) $(CFLAGS) -o $@ -c $< + +$(D_OBJ)/%.lo: %.cpp + $(LIBTOOL) --mode=compile $(CC) $(CXXFLAGS) -o $@ -c $< + +$(D_OBJ)/%.lo: %.c + $(LIBTOOL) --mode=compile $(CC) $(CFLAGS) -o $@ -c $< + +$(D_OBJ)/%.res: %.rc + $(RC) -fo $@ $(RCDEFS) $< + +$(D_OBJ)/%_res.o: %.rc + $(RC) -o $@ $(RCDEFS) $< + +#end diff --git a/mcwin32/diff/TODO b/mcwin32/diff/TODO new file mode 100644 index 00000000..c958ee2c --- /dev/null +++ b/mcwin32/diff/TODO @@ -0,0 +1,9 @@ +to be implemented: +--horizon-lines +--ignore-tab-expansion +--line-format + +Will probably be not implemented: +--GTYPE-group-format (partially implement - minimal) +--LTYPE-line-format +--help (We have a manpage already) diff --git a/mcwin32/diff/compat/asprintf.c b/mcwin32/diff/compat/asprintf.c new file mode 100644 index 00000000..f25a8703 --- /dev/null +++ b/mcwin32/diff/compat/asprintf.c @@ -0,0 +1,62 @@ +// +// compat_asprintf +// + +#include "libcompat.h" + +#if !defined(HAVE_ASPRINTF) + +#include +#include +#include +#include + +/* + SYNOPSIS + int + asprintf(char **ret, const char *format, ...); + + int + vasprintf(char **ret, const char *format, va_list ap); + + DESCRIPTION + The printf() family of functions ... + + The functions asprintf() and vasprintf() are analogs of sprintf(3) and vsprintf(3), + except that they allocate a string large enough to hold the output including the + terminating null byte, and return a pointer to it via the first argument. + This pointer should be passed to free(3) to release the allocated storage when it is + no longer needed. + + RETURNS + When successful, these functions return the number of bytes printed, just like sprintf(3). + If sufficient space cannot be allocated, asprintf() and vasprintf() will return -1 and set ret to be a NULL pointer. +*/ + +#if !defined(HAVE_VASPRINTF) +extern int vasprintf(char **str, const char *fmt, va_list ap); +#endif + +int +asprintf(char **str, const char *fmt, ...) +{ + va_list ap; + int size; + + va_start(ap, fmt); + size = vasprintf(str, fmt, ap); + va_end(ap); + + return size; +} + + +#else +extern void __stdlibrary_has_asprintf(void); + +void +__stdlibrary_has_asprintf(void) +{ +} + +#endif \ No newline at end of file diff --git a/mcwin32/diff/compat/bcopy.c b/mcwin32/diff/compat/bcopy.c new file mode 100644 index 00000000..68036532 --- /dev/null +++ b/mcwin32/diff/compat/bcopy.c @@ -0,0 +1,53 @@ +// +// compat_bcopy +// + +#include "libcompat.h" + +#include +#include +#if defined(HAVE_STRINGS_H) +#include +#endif + +// NAME +// +// bcopy - memory operations (LEGACY) +// +// SYNOPSIS +// +// #include +// +// void bcopy(const void *s1, void *s2, size_t n); +// +// DESCRIPTION +// +// The bcopy() function shall copy n bytes from the area pointed to by s1 to the area pointed to by s2. +// +// The bytes are copied correctly even if the area pointed to by s1 overlaps the area pointed to by s2. +// +// RETURN VALUE +// +// The bcopy() function shall not return a value. +// +// ERRORS +// +// No errors are defined. +// + +#if !defined(HAVE_BCOPY) +void +bcopy(const void *s1, void *s2, size_t n) +{ + (void) memmove(s2, s1, n); +} + +#else +extern void __stdlibrary_has_bcopy(void); + +void +__stdlibrary_has_bcopy(void) +{ +} + +#endif diff --git a/mcwin32/diff/compat/bzero.c b/mcwin32/diff/compat/bzero.c new file mode 100644 index 00000000..2a311119 --- /dev/null +++ b/mcwin32/diff/compat/bzero.c @@ -0,0 +1,51 @@ +// +// compat_bzero +// + +#include "libcompat.h" + +#include +#include +#if defined(HAVE_STRINGS_H) +#include +#endif + +// NAME +// +// bzero - memory operations (LEGACY) +// +// SYNOPSIS +// +// #include +// +// void bzero(void *s, size_t n); +// +// DESCRIPTION +// +// The bzero() function shall place n zero-valued bytes in the area pointed to by s. +// +// RETURN VALUE +// +// The bzero() function shall not return a value. +// +// ERRORS +// +// No errors are defined. +// + +#if !defined(HAVE_BZERO) +void +bzero(void *s, size_t len) +{ + (void) memset (s, '\0', len); +} + +#else +extern void __stdlibrary_has_bzero(void); + +void +__stdlibrary_has_bzero(void) +{ +} + +#endif \ No newline at end of file diff --git a/mcwin32/diff/compat/explicit_bzero.c b/mcwin32/diff/compat/explicit_bzero.c new file mode 100644 index 00000000..fa92af54 --- /dev/null +++ b/mcwin32/diff/compat/explicit_bzero.c @@ -0,0 +1,104 @@ +/* + * compat_explicit_bzero - don't let the compiler optimize away bzero + * + * Public domain. + * Written by Ted Unangst + * OPENBSD ORIGINAL: lib/libc/string/explicit_bzero.c + */ + +#include "libcompat.h" + +#include +#include +#if defined(HAVE_STRINGS_H) +#include +#endif + +#if defined(HAVE_SECUREZEROMEMORY) && (defined(WIN32) || defined(_WIN32)) +#define WINDOWS_MEAN_AND_LEAN +#include +#endif + + +// NAME +// +// explicit_bzero - memory operations (LEGACY) +// +// SYNOPSIS +// +// #include +// +// void explicit_bzero(void *s, size_t n); +// +// DESCRIPTION +// +// The explicit_bzero() variant behaves like bzero(), but will not be removed by +// a compiler's dead store optimization pass, making it useful for clearing +// sensitive memory such as a password. +// +// RETURN VALUE +// +// The explicit_bzero() function shall not return a value. +// +// ERRORS +// +// No errors are defined. +// + +#if defined(HAVE_MEMSET_S) + +void +explicit_bzero(void *p, size_t n) +{ + if (n == 0) + return; + (void)memset_s(p, n, 0, n); +} + + +#elif defined(HAVE_SECUREZEROMEMORY) + +void +explicit_bzero(void *p, size_t n) +{ + if (n == 0) + return; + (void)SecureZeroMemory(p, n); +} + + +#else /*HAVE_MEMSET_S*/ + +#if !defined(HAVE_BZERO) +/* + * See bzero.c + */ +extern void bzero(void *s, size_t len); +#endif + +/* + * Indirect bzero through a volatile pointer to hopefully avoid + * dead-store optimisation eliminating the call. + */ +static void (* volatile xbzero)(void *, size_t) = bzero; + +void +explicit_bzero(void *p, size_t n) +{ + if (n == 0) + return; + /* + * clang -fsanitize=memory needs to intercept memset-like functions + * to correctly detect memory initialisation. Make sure one is called + * directly since our indirection trick above sucessfully confuses it. + */ +#if defined(__has_feature) +#if __has_feature(memory_sanitizer) + memset(p, 0, n); +#endif +#endif + + xbzero(p, n); +} + +#endif /* HAVE_MEMSET_S */ \ No newline at end of file diff --git a/mcwin32/diff/compat/fgetln.c b/mcwin32/diff/compat/fgetln.c new file mode 100644 index 00000000..2a5205ee --- /dev/null +++ b/mcwin32/diff/compat/fgetln.c @@ -0,0 +1,82 @@ +/* $NetBSD: fgetln.c,v 1.8 2006/10/18 15:17:38 christos Exp $ */ + +/*- + * Copyright (c) 1998 The NetBSD Foundation, Inc. + * All rights reserved. + * + * This code is derived from software contributed to The NetBSD Foundation + * by Christos Zoulas. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS + * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS + * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + */ + +#include "libcompat.h" + +#include +#include +#include +#include +#include + +char * +fgetln(FILE *fp, size_t *len) +{ + static char *buf = NULL; + static size_t bufsiz = 0; + char *ptr; + + if (buf == NULL) { + bufsiz = BUFSIZ; + if ((buf = malloc(bufsiz)) == NULL) + return NULL; + } + + if (fgets(buf, bufsiz, fp) == NULL) + return NULL; + + *len = 0; + while ((ptr = strchr(&buf[*len], '\n')) == NULL) { + size_t nbufsiz = bufsiz + BUFSIZ; + char *nbuf = realloc(buf, nbufsiz); + + if (nbuf == NULL) { + int oerrno = errno; + free(buf); + errno = oerrno; + buf = NULL; + return NULL; + } else + buf = nbuf; + + if (fgets(&buf[bufsiz], BUFSIZ, fp) == NULL) { + buf[bufsiz] = '\0'; + *len = strlen(buf); + return buf; + } + + *len = bufsiz; + bufsiz = nbufsiz; + } + + *len = (ptr - buf) + 1; + return buf; +} diff --git a/mcwin32/diff/compat/fnmatch.c b/mcwin32/diff/compat/fnmatch.c new file mode 100644 index 00000000..d9191d39 --- /dev/null +++ b/mcwin32/diff/compat/fnmatch.c @@ -0,0 +1,309 @@ +/* + * Copyright (c) 1989, 1993, 1994 + * The Regents of the University of California. All rights reserved. + * + * This code is derived from software contributed to Berkeley by + * Guido van Rossum. + * + * Copyright (c) 2011 The FreeBSD Foundation + * All rights reserved. + * Portions of this software were developed by David Chisnall + * under sponsorship from the FreeBSD Foundation. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 4. Neither the name of the University nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#if defined(LIBC_SCCS) && !defined(lint) +static char sccsid[] = "@(#)fnmatch.c 8.2 (Berkeley) 4/16/94"; +#endif /* LIBC_SCCS and not lint */ +#include +//__FBSDID("$FreeBSD$"); + +/* + * Function fnmatch() as specified in POSIX 1003.2-1992, section B.6. + * Compares a filename or pathname to a pattern. + */ + +/* + * Some notes on multibyte character support: + * 1. Patterns with illegal byte sequences match nothing. + * 2. Illegal byte sequences in the "string" argument are handled by treating + * them as single-byte characters with a value of the first byte of the + * sequence cast to wchar_t. + * 3. Multibyte conversion state objects (mbstate_t) are passed around and + * used for most, but not all, conversions. Further work will be required + * to support state-dependent encodings. + */ + +#if defined(WIN32) +#define __BSD_VISIBLE 1 +#endif + +#include "fnmatch.h" +#include +#include +#include +#include + +#if !defined(WIN32) +#include "collate.h" +#endif + +#define EOS '\0' + +#define RANGE_MATCH 1 +#define RANGE_NOMATCH 0 +#define RANGE_ERROR (-1) + +static int rangematch(const char *, wchar_t, int, char **, mbstate_t *); +static int fnmatch1(const char *, const char *, const char *, int, mbstate_t, + mbstate_t); + +int +fnmatch(const char *pattern, const char *string, int flags) +// const char *pattern, *string; +// int flags; +{ + static const mbstate_t initial; + + return (fnmatch1(pattern, string, string, flags, initial, initial)); +} + +static int +fnmatch1(const char *pattern, const char *string, const char *stringstart, int flags, mbstate_t patmbs, mbstate_t strmbs) +// const char *pattern, *string, *stringstart; +// int flags; +// mbstate_t patmbs, strmbs; +{ + char *newp; + char c; + wchar_t pc, sc; + size_t pclen, sclen; + + for (;;) { + pclen = mbrtowc(&pc, pattern, MB_LEN_MAX, &patmbs); + if (pclen == (size_t)-1 || pclen == (size_t)-2) + return (FNM_NOMATCH); + pattern += pclen; + sclen = mbrtowc(&sc, string, MB_LEN_MAX, &strmbs); + if (sclen == (size_t)-1 || sclen == (size_t)-2) { + sc = (unsigned char)*string; + sclen = 1; + memset(&strmbs, 0, sizeof(strmbs)); + } + switch (pc) { + case EOS: + if ((flags & FNM_LEADING_DIR) && sc == '/') + return (0); + return (sc == EOS ? 0 : FNM_NOMATCH); + case '?': + if (sc == EOS) + return (FNM_NOMATCH); + if (sc == '/' && (flags & FNM_PATHNAME)) + return (FNM_NOMATCH); + if (sc == '.' && (flags & FNM_PERIOD) && + (string == stringstart || + ((flags & FNM_PATHNAME) && *(string - 1) == '/'))) + return (FNM_NOMATCH); + string += sclen; + break; + case '*': + c = *pattern; + /* Collapse multiple stars. */ + while (c == '*') + c = *++pattern; + + if (sc == '.' && (flags & FNM_PERIOD) && + (string == stringstart || + ((flags & FNM_PATHNAME) && *(string - 1) == '/'))) + return (FNM_NOMATCH); + + /* Optimize for pattern with * at end or before /. */ + if (c == EOS) + if (flags & FNM_PATHNAME) + return ((flags & FNM_LEADING_DIR) || + strchr(string, '/') == NULL ? + 0 : FNM_NOMATCH); + else + return (0); + else if (c == '/' && flags & FNM_PATHNAME) { + if ((string = strchr(string, '/')) == NULL) + return (FNM_NOMATCH); + break; + } + + /* General case, use recursion. */ + while (sc != EOS) { + if (!fnmatch1(pattern, string, stringstart, + flags, patmbs, strmbs)) + return (0); + sclen = mbrtowc(&sc, string, MB_LEN_MAX, + &strmbs); + if (sclen == (size_t)-1 || + sclen == (size_t)-2) { + sc = (unsigned char)*string; + sclen = 1; + memset(&strmbs, 0, sizeof(strmbs)); + } + if (sc == '/' && flags & FNM_PATHNAME) + break; + string += sclen; + } + return (FNM_NOMATCH); + case '[': + if (sc == EOS) + return (FNM_NOMATCH); + if (sc == '/' && (flags & FNM_PATHNAME)) + return (FNM_NOMATCH); + if (sc == '.' && (flags & FNM_PERIOD) && + (string == stringstart || + ((flags & FNM_PATHNAME) && *(string - 1) == '/'))) + return (FNM_NOMATCH); + + switch (rangematch(pattern, sc, flags, &newp, + &patmbs)) { + case RANGE_ERROR: + goto norm; + case RANGE_MATCH: + pattern = newp; + break; + case RANGE_NOMATCH: + return (FNM_NOMATCH); + } + string += sclen; + break; + case '\\': + if (!(flags & FNM_NOESCAPE)) { + pclen = mbrtowc(&pc, pattern, MB_LEN_MAX, + &patmbs); + if (pclen == (size_t)-1 || pclen == (size_t)-2) + return (FNM_NOMATCH); + pattern += pclen; + } + /* FALLTHROUGH */ + default: + norm: + if (pc == sc) + ; + else if ((flags & FNM_CASEFOLD) && + (towlower(pc) == towlower(sc))) + ; + else + return (FNM_NOMATCH); + string += sclen; + break; + } + } + /* NOTREACHED */ +} + +static int +rangematch(const char *pattern, wchar_t test, int flags, char **newp, mbstate_t *patmbs) +// const char *pattern; +// wchar_t test; +// int flags; +// char **newp; +// mbstate_t *patmbs; +{ + int negate, ok; + wchar_t c, c2; + size_t pclen; + const char *origpat; +#if !defined(WIN32) + struct xlocale_collate *table = + (struct xlocale_collate*)__get_locale()->components[XLC_COLLATE]; +#endif + + /* + * A bracket expression starting with an unquoted circumflex + * character produces unspecified results (IEEE 1003.2-1992, + * 3.13.2). This implementation treats it like '!', for + * consistency with the regular expression syntax. + * J.T. Conklin (conklin@ngai.kaleida.com) + */ + if ( (negate = (*pattern == '!' || *pattern == '^')) ) + ++pattern; + + if (flags & FNM_CASEFOLD) + test = towlower(test); + + /* + * A right bracket shall lose its special meaning and represent + * itself in a bracket expression if it occurs first in the list. + * -- POSIX.2 2.8.3.2 + */ + ok = 0; + origpat = pattern; + for (;;) { + if (*pattern == ']' && pattern > origpat) { + pattern++; + break; + } else if (*pattern == '\0') { + return (RANGE_ERROR); + } else if (*pattern == '/' && (flags & FNM_PATHNAME)) { + return (RANGE_NOMATCH); + } else if (*pattern == '\\' && !(flags & FNM_NOESCAPE)) + pattern++; + pclen = mbrtowc(&c, pattern, MB_LEN_MAX, patmbs); + if (pclen == (size_t)-1 || pclen == (size_t)-2) + return (RANGE_NOMATCH); + pattern += pclen; + + if (flags & FNM_CASEFOLD) + c = towlower(c); + + if (*pattern == '-' && *(pattern + 1) != EOS && + *(pattern + 1) != ']') { + if (*++pattern == '\\' && !(flags & FNM_NOESCAPE)) + if (*pattern != EOS) + pattern++; + pclen = mbrtowc(&c2, pattern, MB_LEN_MAX, patmbs); + if (pclen == (size_t)-1 || pclen == (size_t)-2) + return (RANGE_NOMATCH); + pattern += pclen; + if (c2 == EOS) + return (RANGE_ERROR); + + if (flags & FNM_CASEFOLD) + c2 = towlower(c2); + +#if defined(WIN32) + if (c <= test && test <= c2) + ok = 1; +#else + if (table->__collate_load_error ? + c <= test && test <= c2 : + __collate_range_cmp(table, c, test) <= 0 + && __collate_range_cmp(table, test, c2) <= 0 + ) + ok = 1; +#endif + } else if (c == test) + ok = 1; + } + + *newp = (char *)pattern; + return (ok == negate ? RANGE_NOMATCH : RANGE_MATCH); +} diff --git a/mcwin32/diff/compat/fnmatch.h b/mcwin32/diff/compat/fnmatch.h new file mode 100644 index 00000000..e6403a54 --- /dev/null +++ b/mcwin32/diff/compat/fnmatch.h @@ -0,0 +1,59 @@ +/*- + * Copyright (c) 1992, 1993 + * The Regents of the University of California. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. Neither the name of the University nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * $FreeBSD$ + * @(#)fnmatch.h 8.1 (Berkeley) 6/2/93 + */ + +#ifndef _FNMATCH_H_ +#define _FNMATCH_H_ + +#include + +#define FNM_NOMATCH 1 /* Match failed. */ + +#define FNM_NOESCAPE 0x01 /* Disable backslash escaping. */ +#define FNM_PATHNAME 0x02 /* Slash must be matched by slash. */ +#define FNM_PERIOD 0x04 /* Period must be matched by period. */ + +#if __XSI_VISIBLE +#define FNM_NOSYS (-1) /* Reserved. */ +#endif + +#if __BSD_VISIBLE +#define FNM_LEADING_DIR 0x08 /* Ignore / after Imatch. */ +#define FNM_CASEFOLD 0x10 /* Case insensitive search. */ +#define FNM_IGNORECASE FNM_CASEFOLD +#define FNM_FILE_NAME FNM_PATHNAME +#endif + +__BEGIN_DECLS +int fnmatch(const char *, const char *, int); +__END_DECLS + +#endif /* !_FNMATCH_H_ */ diff --git a/mcwin32/diff/compat/getline.c b/mcwin32/diff/compat/getline.c new file mode 100644 index 00000000..222660db --- /dev/null +++ b/mcwin32/diff/compat/getline.c @@ -0,0 +1,101 @@ +/* $NetBSD: fgetln.c,v 1.9 2008/04/29 06:53:03 martin Exp $ */ + +/*- + * Copyright (c) 2011 The NetBSD Foundation, Inc. + * All rights reserved. + * + * This code is derived from software contributed to The NetBSD Foundation + * by Christos Zoulas. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS + * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS + * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + */ + +#include "libcompat.h" + +#if !defined(HAVE_GETLINE) + +#include +#include +#include +#include +#include + +#if !defined(ssize_t) +#define ssize_t int +#endif + +int /*ssize_t*/ +getdelim(char **buf, size_t *bufsiz, int delimiter, FILE *fp) +{ + char *ptr, *eptr; + + + if (*buf == NULL || *bufsiz == 0) { + *bufsiz = BUFSIZ; + if ((*buf = malloc(*bufsiz)) == NULL) + return -1; + } + + for (ptr = *buf, eptr = *buf + *bufsiz;;) { + int c = fgetc(fp); + if (c == -1) { + if (feof(fp)) + return ptr == *buf ? -1 : ptr - *buf; + else + return -1; + } + *ptr++ = (char)c; + if (c == delimiter) { + *ptr = '\0'; + return ptr - *buf; + } + if (ptr + 2 >= eptr) { + char *nbuf; + size_t nbufsiz = *bufsiz * 2; + ssize_t d = ptr - *buf; + if ((nbuf = realloc(*buf, nbufsiz)) == NULL) + return -1; + *buf = nbuf; + *bufsiz = nbufsiz; + eptr = nbuf + nbufsiz; + ptr = nbuf + d; + } + } +} + + +int /*ssize_t*/ +getline(char **buf, size_t *bufsiz, FILE *fp) +{ + return getdelim(buf, bufsiz, '\n', fp); +} + + +#else +extern void __stdlibrary_has_getline(void); + +void +__stdlibrary_has_getline(void) +{ +} + +#endif \ No newline at end of file diff --git a/mcwin32/diff/compat/libcompat.h b/mcwin32/diff/compat/libcompat.h new file mode 100644 index 00000000..6ade162e --- /dev/null +++ b/mcwin32/diff/compat/libcompat.h @@ -0,0 +1,264 @@ +#pragma once +#ifndef LIBCOMPACT_H_INCLUDED +#define LIBCOMPACT_H_INCLUDED +// +// libcompat +// + +#include "w32config.h" + +#if defined(LIBCOMPAT_SOURCE) +#if !defined(_CRT_SECURE_NO_WARNINGS) +#define _CRT_SECURE_NO_WARNINGS +#endif +#endif + +#include +#include +#include +#include +#include + +__BEGIN_DECLS + +//#if !defined(HAVE_STRNLEN) +//extern size_t strnlen(const char *str, size_t maxlen); +//#if !defined(LIBCOMPAT_SOURCE) +//#define HAVE_STRNLEN +//#endif +//#endif /*HAVE_STRNLEN*/ + +#if !defined(HAVE_STRNDUP) +extern char *strndup(const char *str, size_t maxlen); +#if !defined(LIBCOMPAT_SOURCE) +#define HAVE_STRNDUP +#endif +#endif /*HAVE_STRNDUP*/ + +//#if !defined(HAVE_STRCATN) +//extern char *strcatn(char *s1, char *s2, int n); +//#if !defined(LIBCOMPAT_SOURCE) +//#define HAVE_STRCATN +//#endif +//#endif /*HAVE_STRCATN*/ + +//#if !defined(HAVE_STRLCPY) +//extern size_t strlcpy(char *dst, const char *src, size_t siz); +//#if !defined(LIBCOMPAT_SOURCE) +//#define HAVE_STRLCPY +//#endif +//#endif /*HAVE_STRLCPY*/ + +//#if !defined(HAVE_STRLCAT) +//extern size_t strlcat(char *dst, const char *src, size_t siz); +//#if !defined(LIBCOMPAT_SOURCE) +//#define HAVE_STRLCAT +///#endif +//#endif /*HAVE_STRLCAT*/ + +//#if !defined(HAVE_STRSEP) +//extern char *strsep(char **stringp, const char *delim); +//#if !defined(LIBCOMPAT_SOURCE) +//#define HAVE_STRSEP +//#endif +//#endif /*HAVE_STRSEP*/ + +#if !defined(HAVE_STRTONUM) /*libbsd*/ +extern long long strtonum(const char *numstr, long long minval, long long maxval, const char **errstrp); +#if !defined(LIBCOMPAT_SOURCE) +#define HAVE_STRTONUM +#endif +#endif /*HAVE_STRTONUM*/ + +//#if !defined(HAVE_STRCASECMP) +//extern int strcasecmp(const char *s1, const char *s2); +//#if !defined(LIBCOMPAT_SOURCE) +//#define HAVE_STRCASECMP +//#endif +//#endif /*HAVE_STRCASECMP*/ + +//#if !defined(HAVE_STRNCASECMP) +//extern int strncasecmp(const char *s1, const char *s2, size_t len); +//#if !defined(LIBCOMPAT_SOURCE) +//#define HAVE_STRNCASECMP +//#endif +//#endif /*HAVE_STRNCASECMP*/ + +//#if !defined(HAVE_STRTOK_R) +//extern char * strtok_r(char *s, const char *delim, char **lasts); +//#if !defined(LIBCOMPAT_SOURCE) +//#define HAVE_STRTOK_R +//#endif +//#endif /*HAVE_STRTOK_R*/ + +#if !defined(HAVE_BCOPY) +extern void bcopy(const void *s1, void *s2, size_t n); +#if !defined(LIBCOMPAT_SOURCE) +#define HAVE_BCOPY +#endif +#endif /*HAVE_BCOPY*/ + +#if !defined(HAVE_BZERO) +extern void bzero(void *s, size_t len); +#if !defined(LIBCOMPAT_SOURCE) +#define HAVE_BZERO +#endif +#endif /*HAVE_BZERO*/ + +#if !defined(HAVE_EXPLICIT_BZERO) +extern void explicit_bzero(void *s, size_t len); +#if !defined(LIBCOMPAT_SOURCE) +#define HAVE_EXPLICIT_BZERO +#endif +#endif /*HAVE_EXPLICIT_BZERO*/ + +//#if !defined(HAVE_MEMMEM) +//extern void *memmem(const void *h0, size_t k, const void *n0, size_t l); +//#if !defined(LIBCOMPAT_SOURCE) +//#define HAVE_MEMMEM +//#endif +//#endif /*HAVE_MEMMEM*/ + +//#if !defined(HAVE_PUTW) +//extern int putw(int w, FILE *fp); +//#if !defined(LIBCOMPAT_SOURCE) +//#define HAVE_PUTW +//#endif +//#endif /*HAVE_PUTW*/ + +//#if !defined(HAVE_GETW) +//extern int getw(FILE *fp); +//#if !defined(LIBCOMPAT_SOURCE) +//#define HAVE_GETW +//#endif +//#endif /*HAVE_GETW*/ + +//#if !defined(HAVE_INDEX) +//extern char *index(const char *s, int c); +//#if !defined(LIBCOMPAT_SOURCE) +//#define HAVE_INDEX +//#endif +//#endif /*HAVE_INDEX*/ + +//#if !defined(HAVE_RINDEX) +//extern char *rindex(const char *s, int c); +//#if !defined(LIBCOMPAT_SOURCE) +//#define HAVE_RINDEX +//#endif +//#endif /*HAVE_RINDEX*/ + +#if !defined(HAVE_MKSTEMP) +extern int mkstemp(char *path); +#if !defined(LIBCOMPAT_SOURCE) +#define HAVE_MKSTEMP +#endif +#endif /*HAVE_MKSTEMP*/ + +#if !defined(HAVE_MKTEMP) +extern char *mktemp(char *path); +#if !defined(LIBCOMPAT_SOURCE) +#define HAVE_MKTEMP +#endif +#endif /*HAVE_MKTEMP*/ +extern char *xmktemp(char *path, char *result, size_t length); /*extension*/ + +//#if !defined(HAVE_BASENAME) /*libgen.h*/ +//extern char *basename(char *path); +//#if !defined(LIBCOMPAT_SOURCE) +//#define HAVE_BASENAME +//#endif +//#endif /*HAVE_BASENAME*/ + +//#if !defined(HAVE_DIRNAME) /*libgen.h*/ +//extern char *dirname(char *path); +//#if !defined(LIBCOMPAT_SOURCE) +//#define HAVE_DIRNAME +//#endif +//#endif /*HAVE_DIRNAME*/ + +#if !defined(HAVE_REALLOCARRAY) +extern void *reallocarray(void *optr, size_t nmemb, size_t size); +#if !defined(LIBCOMPAT_SOURCE) +#define HAVE_REALLOCARRAY +#endif +#endif /*HAVE_REALLOCARRAY*/ + +#if !defined(HAVE_RECALLOCARRAY) +extern void *recallocarray(void *ptr, size_t oldnmemb, size_t newnmemb, size_t size); +#if !defined(LIBCOMPAT_SOURCE) +#define HAVE_RECALLOCARRAY +#endif +#endif /*HAVE_RECALLOCARRAY*/ + +#if !defined(HAVE_ASPRINTF) /*stdio.h*/ +extern int asprintf(char **str, const char *fmt, ...); +#if !defined(LIBCOMPAT_SOURCE) +#define HAVE_REALLOCARRAY +#endif +#endif /*HAVE_ASPRINTF*/ + +#if !defined(HAVE_VASPRINTF) /*stdio.h*/ +extern int vasprintf(char **str, const char *fmt, va_list ap); +#if !defined(LIBCOMPAT_SOURCE) +#define HAVE_VASPRINTF +#endif +#endif /*HAVE_VASPRINTF*/ + +#if !defined(HAVE_TIMEGM) /*unistd.h*/ +struct tm; +extern time_t timegm(struct tm *tm); +#if !defined(LIBCOMPAT_SOURCE) +#define HAVE_TIMEGM +#endif +#endif /*HAVE_TIMEGM*/ + +#if !defined(HAVE_LOCALTIME_R) /*unistd.h*/ +extern struct tm *localtime_r(const time_t *timep, struct tm *result); +#if !defined(LIBCOMPAT_SOURCE) +#define HAVE_LOCALTIME_R +#endif +#endif /*HAVE_TIMEGM*/ + +//extern char *xmktemp(char *path, char *result, size_t length); + +#if !defined(HAVE_GETLINE) +extern int /*ssize_t*/ getdelim(char **buf, size_t *bufsiz, int delimiter, FILE *fp); +extern int /*ssize_t*/ getline(char **buf, size_t *bufsiz, FILE *fp); +#if !defined(LIBCOMPAT_SOURCE) +#define HAVE_GETLINE +#endif +#endif + +#if !defined(HAVE_FGETLN) +extern char *fgetln(FILE *fp, size_t *len); +#if !defined(LIBCOMPAT_SOURCE) +#define HAVE_FGETLN +#endif +#endif /*HAVE_FGETLN*/ + +#if !defined(HAVE_ALPHASORT) +struct dirent; +extern int alphasort(const struct dirent **d1, const struct dirent **d2); +#if !defined(LIBCOMPAT_SOURCE) +#define HAVE_ALPHASORT +#endif +#endif /*HAVE_ALPHASORT*/ + +#if !defined(HAVE_SCANDIR) +struct dirent; +extern int scandir(const char *dirname, struct dirent ***namelist, int (*select)(const struct dirent *), int (*dcomp)(const struct dirent **, const struct dirent **)); +#if !defined(LIBCOMPAT_SOURCE) +#define HAVE_SCANDIR +#endif +#endif /*HAVE_SCANDIR*/ + +#if !defined(HAVE_QSORT_R) +extern void qsort_r(void *a, size_t n, size_t es, void *thunk, int (*cmp)(void *, const void *, const void *)); +#if !defined(LIBCOMPAT_SOURCE) +#define HAVE_QSORT_R +#endif +#endif /*HAVE_QSORT_R*/ + +__END_DECLS + +#endif /*LIBCOMPACT_H_INCLUDED*/ diff --git a/mcwin32/diff/compat/localtime_r.c b/mcwin32/diff/compat/localtime_r.c new file mode 100644 index 00000000..f6ee39eb --- /dev/null +++ b/mcwin32/diff/compat/localtime_r.c @@ -0,0 +1,18 @@ +/* + * localtime_r: WIN32 + */ + +#include "libcompat.h" + +// #if !defined(HAVE_LOCALTIME_R) + +struct tm * +localtime_r(const time_t *timep, struct tm *result) +{ + *result = *localtime(timep); + return result; +} + +// #endif //HAVE_LOCALTIME_R + +//end diff --git a/mcwin32/diff/compat/mktemp.c b/mcwin32/diff/compat/mktemp.c new file mode 100644 index 00000000..d9d718ba --- /dev/null +++ b/mcwin32/diff/compat/mktemp.c @@ -0,0 +1,256 @@ +/* -*- c: tabs: 9 -*- + * Copyright (c) 1987, 1993 + * The Regents of the University of California. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. All advertising materials mentioning features or use of this software + * must display the following acknowledgement: + * This product includes software developed by the University of + * California, Berkeley and its contributors. + * 4. Neither the name of the University nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#if !defined(lint) && defined(sccs) +static char sccsid[] = "@(#)mktemp.c 8.1 (Berkeley) 6/4/93"; +#endif /* LIBC_SCCS and not lint */ + +#ifndef _CRT_SECURE_NO_WARNINGS +#define _CRT_SECURE_NO_WARNINGS +#endif + +#include "libcompat.h" + +#include +#include +#include +#include +#include +#include +#include +#include + +#if !defined(unix) +#include +#include + +#if defined(WIN32) || defined(_WIN32) +#define WINDOWS_MEAN_AND_LEAN +#include +#endif + +#if defined(_MSC_VER) +#define getpid() _getpid() +#endif + +#if (defined(WIN32) || defined(_WIN32)) && !defined(S_ISDIR) +#define S_ISDIR(m) (m & _S_IFDIR) +#endif +#endif + +static int _gettemp(char *path, int *doopen); + + +#if !defined(HAVE_MKSTEMP) +int +mkstemp(char *path) +{ + int fd = -1; + + if (_gettemp(path, &fd)) { + return fd; + } + +#if defined(WIN32) || defined(_WIN32) + /* "/tmp/", reference system temporary path */ + if (path && 0 == memcmp(path, "/tmp/", 5)) { + + int pathlen, tmplen; + char t_path[256], *p; + + tmplen = (int)GetTempPathA(sizeof(t_path), t_path); + + pathlen = strlen(path + 4); /*include trailing '/'*/ + if (tmplen && (pathlen + tmplen) < sizeof(t_path)) { + + if (t_path[tmplen-1] == '\\') --tmplen; + (void) memcpy(t_path + tmplen, path + 4, pathlen + 1 /*nul*/); + for (p = t_path; NULL != (p = strchr(p, '/'));) { + *p++ = '\\'; + } + + if (_gettemp(t_path, &fd)) { + + strcpy(path + 4, t_path + tmplen); + if ('\\' == path[4]) path[4] = '/'; + return fd; + } + } + } +#endif + + assert(0); + return -1; +} +#endif //HAVE_MKSTEMP + + +#if !defined(HAVE_MKTEMP) +char * +mktemp(char *path) +{ + return(_gettemp(path, (int *)NULL) ? path : (char *)NULL); +} +#endif //HAVE_MKTEMP) + + +// +// xmktemp - extension +// +char * +xmktemp(char *path, char *result, size_t length) +{ + if (_gettemp(path, (int *)NULL)) { + if (result && length) { /* return resulting path*/ + strncpy(result, (const char *)path, length); + result[length-1]=0; + } + return result; + } + +#if defined(WIN32) || defined(_WIN32) + if (path && result && length && 0 == memcmp(path, "/tmp/", 5)) { + + size_t pathlen, tmplen; + char t_path[256], *p; + + tmplen = (size_t)GetTempPathA(sizeof(t_path), t_path); + + pathlen = strlen(path + 4); /*include trailing '/'*/ + + if (tmplen && (pathlen + tmplen) < sizeof(t_path)) { + + if (t_path[tmplen - 1] == '\\') --tmplen; + (void) memcpy(t_path + tmplen, path + 4, pathlen + 1 /*nul*/); + for (p = t_path; NULL != (p = strchr(p, '/'));) { + *p++ = '\\'; + } + + if (_gettemp(t_path, NULL)) { + + strcpy(path + 4, t_path + tmplen); + if ('\\' == path[4]) path[4] = '/'; + strncpy(result, t_path, length); + + return result; + } + } + } +#endif + + assert(0); + return NULL; +} + + +static int +_gettemp(char *path, register int *doopen) +{ + register char *start, *trv; + struct stat sbuf; + unsigned int pid; +#if !defined(unix) + char slash; +#endif + + pid = getpid(); + for (trv = path; *trv; ++trv); /* extra X's get set to 0's */ + while (*--trv == 'X') { + *trv = (pid % 10) + '0'; + pid /= 10; + } + + /* + * check the target directory; if you have six X's and it + * doesn't exist this runs for a *very* long time. + */ + for (start = trv + 1;; --trv) { + if (trv <= path) + break; +#if !defined(unix) + if (*trv == '/' || *trv == '\\') { /*}*/ + slash = *trv; +#else + if (*trv == '/') { +#endif + *trv = '\0'; + if (stat(path, &sbuf)) { + return 0; + } + if (!S_ISDIR(sbuf.st_mode)) { + errno = ENOTDIR; + return 0; + } +#if !defined(unix) + *trv = slash; +#else + *trv = '/'; +#endif + break; + } + } + + for (;;) { + if (doopen) { +#if defined(_MSC_VER) || defined(__WATCOMC__) + if ((*doopen = _open(path, O_CREAT|O_EXCL|O_RDWR|O_BINARY, 0600)) >= 0) +#else + if ((*doopen = open(path, O_CREAT|O_EXCL|O_RDWR|O_BINARY, 0600)) >= 0) +#endif + return(1); + if (errno != EEXIST) + return(0); + } else if (stat(path, &sbuf)) { + return(errno == ENOENT ? 1 : 0); + } + + /* tricky little algorithm for backward compatibility */ + for (trv = start;;) { + if (!*trv) + return(0); + if (*trv == 'z') + *trv++ = 'a'; + else { + if (isdigit(*trv)) + *trv = 'a'; + else + ++*trv; + break; + } + } + } + /*NOTREACHED*/ +} + + + diff --git a/mcwin32/diff/compat/qsort.c b/mcwin32/diff/compat/qsort.c new file mode 100644 index 00000000..52dbbe06 --- /dev/null +++ b/mcwin32/diff/compat/qsort.c @@ -0,0 +1,202 @@ +/*- + * Copyright (c) 1992, 1993 + * The Regents of the University of California. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. Neither the name of the University nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#if defined(LIBC_SCCS) && !defined(lint) +static char sccsid[] = "@(#)qsort.c 8.1 (Berkeley) 6/4/93"; +#endif /* LIBC_SCCS and not lint */ +#include +//__FBSDID("$FreeBSD$"); + +#include "libcompat.h" + +#if defined(__GNUC__) +#pragma GCC diagnostic ignored "-Wsign-compare" +#endif + +#include + +#ifdef I_AM_QSORT_R +typedef int cmp_t(void *, const void *, const void *); +#else +typedef int cmp_t(const void *, const void *); +#endif +static inline char *med3(char *, char *, char *, cmp_t *, void *); +static inline void swapfunc(char *, char *, int, int); + +#undef min +#define min(a, b) (a) < (b) ? a : b + +/* + * Qsort routine from Bentley & McIlroy's "Engineering a Sort Function". + */ +#define swapcode(TYPE, parmi, parmj, n) { \ + long i = (n) / sizeof (TYPE); \ + TYPE *pi = (TYPE *) (parmi); \ + TYPE *pj = (TYPE *) (parmj); \ + do { \ + TYPE t = *pi; \ + *pi++ = *pj; \ + *pj++ = t; \ + } while (--i > 0); \ +} + +#define SWAPINIT(a, es) swaptype = ((char *)a - (char *)0) % sizeof(long) || \ + es % sizeof(long) ? 2 : es == sizeof(long)? 0 : 1; + +static inline void +swapfunc(char *a, char *b, int n, int swaptype) +// char *a, *b; +// int n, swaptype; +{ + if(swaptype <= 1) + swapcode(long, a, b, n) + else + swapcode(char, a, b, n) +} + +#define swap(a, b) \ + if (swaptype == 0) { \ + long t = *(long *)(a); \ + *(long *)(a) = *(long *)(b); \ + *(long *)(b) = t; \ + } else \ + swapfunc(a, b, es, swaptype) + +#define vecswap(a, b, n) if ((n) > 0) swapfunc(a, b, n, swaptype) + +#ifdef I_AM_QSORT_R +#define CMP(t, x, y) (cmp((t), (x), (y))) +#else +#define CMP(t, x, y) (cmp((x), (y))) +#endif + +static inline char * +med3(char *a, char *b, char *c, cmp_t *cmp, void *thunk +#ifndef I_AM_QSORT_R +__unused +#endif +) +{ + return CMP(thunk, a, b) < 0 ? + (CMP(thunk, b, c) < 0 ? b : (CMP(thunk, a, c) < 0 ? c : a )) + :(CMP(thunk, b, c) > 0 ? b : (CMP(thunk, a, c) < 0 ? a : c )); +} + +#ifdef I_AM_QSORT_R +void +qsort_r(void *a, size_t n, size_t es, void *thunk, cmp_t *cmp) +#else +#define thunk NULL +void +qsort(void *a, size_t n, size_t es, cmp_t *cmp) +#endif +{ + char *pa, *pb, *pc, *pd, *pl, *pm, *pn; + size_t d, r; + int cmp_result; + int swaptype, swap_cnt; + +loop: SWAPINIT(a, es); + swap_cnt = 0; + if (n < 7) { + for (pm = (char *)a + es; pm < (char *)a + n * es; pm += es) + for (pl = pm; + pl > (char *)a && CMP(thunk, pl - es, pl) > 0; + pl -= es) + swap(pl, pl - es); + return; + } + pm = (char *)a + (n / 2) * es; + if (n > 7) { + pl = a; + pn = (char *)a + (n - 1) * es; + if (n > 40) { + d = (n / 8) * es; + pl = med3(pl, pl + d, pl + 2 * d, cmp, thunk); + pm = med3(pm - d, pm, pm + d, cmp, thunk); + pn = med3(pn - 2 * d, pn - d, pn, cmp, thunk); + } + pm = med3(pl, pm, pn, cmp, thunk); + } + swap(a, pm); + pa = pb = (char *)a + es; + + pc = pd = (char *)a + (n - 1) * es; + for (;;) { + while (pb <= pc && (cmp_result = CMP(thunk, pb, a)) <= 0) { + if (cmp_result == 0) { + swap_cnt = 1; + swap(pa, pb); + pa += es; + } + pb += es; + } + while (pb <= pc && (cmp_result = CMP(thunk, pc, a)) >= 0) { + if (cmp_result == 0) { + swap_cnt = 1; + swap(pc, pd); + pd -= es; + } + pc -= es; + } + if (pb > pc) + break; + swap(pb, pc); + swap_cnt = 1; + pb += es; + pc -= es; + } + if (swap_cnt == 0) { /* Switch to insertion sort */ + for (pm = (char *)a + es; pm < (char *)a + n * es; pm += es) + for (pl = pm; + pl > (char *)a && CMP(thunk, pl - es, pl) > 0; + pl -= es) + swap(pl, pl - es); + return; + } + + pn = (char *)a + n * es; + r = min(pa - (char *)a, pb - pa); + vecswap(a, pb - r, r); + r = min(pd - pc, pn - pd - es); + vecswap(pb, pn - r, r); + if ((r = pb - pa) > es) +#ifdef I_AM_QSORT_R + qsort_r(a, r / es, es, thunk, cmp); +#else + qsort(a, r / es, es, cmp); +#endif + if ((r = pd - pc) > es) { + /* Iterate rather than recurse to save stack space */ + a = pn - r; + n = r / es; + goto loop; + } +/* qsort(pn - r, r / es, es, cmp);*/ +} diff --git a/mcwin32/diff/compat/qsort_r.c b/mcwin32/diff/compat/qsort_r.c new file mode 100644 index 00000000..d8687360 --- /dev/null +++ b/mcwin32/diff/compat/qsort_r.c @@ -0,0 +1,8 @@ +/* + * This file is in the public domain. Originally written by Garrett + * A. Wollman. + * + * $FreeBSD$ + */ +#define I_AM_QSORT_R +#include "qsort.c" diff --git a/mcwin32/diff/compat/reallocarray.c b/mcwin32/diff/compat/reallocarray.c new file mode 100644 index 00000000..7e678f1c --- /dev/null +++ b/mcwin32/diff/compat/reallocarray.c @@ -0,0 +1,43 @@ +/* $OpenBSD: reallocarray.c,v 1.2 2014/12/08 03:45:00 bcook Exp $ */ +/* + * Copyright (c) 2008 Otto Moerbeek + * + * Permission to use, copy, modify, and distribute this software for any + * purpose with or without fee is hereby granted, provided that the above + * copyright notice and this permission notice appear in all copies. + * + * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES + * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR + * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN + * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF + * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + */ + +#include "libcompat.h" + +#include + ///__FBSDID("$FreeBSD$"); + +#include +#include +#include +#include + +/* + * This is sqrt(SIZE_MAX+1), as s1*s2 <= SIZE_MAX + * if both s1 < MUL_NO_OVERFLOW and s2 < MUL_NO_OVERFLOW + */ +#define MUL_NO_OVERFLOW ((size_t)1 << (sizeof(size_t) * 4)) + +void * +reallocarray(void *optr, size_t nmemb, size_t size) +{ + if ((nmemb >= MUL_NO_OVERFLOW || size >= MUL_NO_OVERFLOW) && + nmemb > 0 && SIZE_MAX / nmemb < size) { + errno = ENOMEM; + return (NULL); + } + return (realloc(optr, size * nmemb)); +} diff --git a/mcwin32/diff/compat/recallocarray.c b/mcwin32/diff/compat/recallocarray.c new file mode 100644 index 00000000..547ba882 --- /dev/null +++ b/mcwin32/diff/compat/recallocarray.c @@ -0,0 +1,87 @@ +/* $OpenBSD: recallocarray.c,v 1.1 2017/03/06 18:44:21 otto Exp $ */ +/* + * Copyright (c) 2008, 2017 Otto Moerbeek + * + * Permission to use, copy, modify, and distribute this software for any + * purpose with or without fee is hereby granted, provided that the above + * copyright notice and this permission notice appear in all copies. + * + * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES + * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR + * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN + * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF + * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + */ + +#include "libcompat.h" + +#include +#include +#include +#include +#include + +/* + * This is sqrt(SIZE_MAX+1), as s1*s2 <= SIZE_MAX + * if both s1 < MUL_NO_OVERFLOW and s2 < MUL_NO_OVERFLOW + */ +#define MUL_NO_OVERFLOW ((size_t)1 << (sizeof(size_t) * 4)) + +void * +recallocarray(void *ptr, size_t oldnmemb, size_t newnmemb, size_t size) +{ + size_t oldsize, newsize; + void *newptr; + + if (ptr == NULL) + return calloc(newnmemb, size); + + if ((newnmemb >= MUL_NO_OVERFLOW || size >= MUL_NO_OVERFLOW) && + newnmemb > 0 && SIZE_MAX / newnmemb < size) { + errno = ENOMEM; + return NULL; + } + newsize = newnmemb * size; + + if ((oldnmemb >= MUL_NO_OVERFLOW || size >= MUL_NO_OVERFLOW) && + oldnmemb > 0 && SIZE_MAX / oldnmemb < size) { + errno = EINVAL; + return NULL; + } + oldsize = oldnmemb * size; + + /* + * Don't bother too much if we're shrinking just a bit, + * we do not shrink for series of small steps, oh well. + */ + if (newsize <= oldsize) { + size_t d = oldsize - newsize; + +#if defined(_WIN32) +#define getpagesize() (4096) +#endif + if (d < oldsize / 2 && d < getpagesize()) { + memset((char *)ptr + newsize, 0, d); + return ptr; + } + } + + newptr = malloc(newsize); + if (newptr == NULL) + return NULL; + + if (newsize > oldsize) { + memcpy(newptr, ptr, oldsize); + memset((char *)newptr + oldsize, 0, newsize - oldsize); + } else + memcpy(newptr, ptr, newsize); + + explicit_bzero(ptr, oldsize); + free(ptr); + + return newptr; +} + +/*DEF_WEAK(recallocarray);*/ diff --git a/mcwin32/diff/compat/scandir.c b/mcwin32/diff/compat/scandir.c new file mode 100644 index 00000000..500362a2 --- /dev/null +++ b/mcwin32/diff/compat/scandir.c @@ -0,0 +1,147 @@ +/* + * Copyright (c) 1983, 1993 + * The Regents of the University of California. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 4. Neither the name of the University nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#if defined(LIBC_SCCS) && !defined(lint) +static char sccsid[] = "@(#)scandir.c 8.3 (Berkeley) 1/2/94"; +#endif /* LIBC_SCCS and not lint */ +#include +//__FBSDID("$FreeBSD$"); + +/* + * Scan the directory dirname calling select to make a list of selected + * directory entries then sort using qsort and compare routine dcomp. + * Returns the number of entries and a pointer to a list of pointers to + * struct dirent (through namelist). Returns -1 if there were any errors. + */ + +//#include "namespace.h" +#include +#include +#include +//#include "un-namespace.h" + +#include "libcompat.h" + +static int alphasort_thunk(void *thunk, const void *p1, const void *p2); + +/* + * The DIRSIZ macro is the minimum record length which will hold the directory + * entry. This requires the amount of space in struct dirent without the + * d_name field, plus enough space for the name and a terminating nul byte + * (dp->d_namlen + 1), rounded up to a 4 byte boundary. + */ +#undef DIRSIZ +#define DIRSIZ(dp) \ + ((sizeof(struct dirent) - sizeof(dp)->d_name) + \ + (((dp)->d_namlen + 1 + 3) &~ 3)) + +int +scandir(const char *dirname, struct dirent ***namelist, + int (*select)(const struct dirent *), int (*dcomp)(const struct dirent **, + const struct dirent **)) +{ + struct dirent *d, *p, **names = NULL; + size_t nitems = 0; + size_t /*long*/ arraysz; + DIR *dirp; + + if ((dirp = opendir(dirname)) == NULL) + return(-1); + + arraysz = 32; /* initial estimate of the array size */ + names = (struct dirent **)malloc(arraysz * sizeof(struct dirent *)); + if (names == NULL) + goto fail; + + while ((d = readdir(dirp)) != NULL) { + if (select != NULL && !(*select)(d)) + continue; /* just selected names */ + /* + * Make a minimum size copy of the data + */ + p = (struct dirent *)malloc(DIRSIZ(d)); + if (p == NULL) + goto fail; + p->d_fileno = d->d_fileno; + p->d_type = d->d_type; + p->d_reclen = d->d_reclen; + p->d_namlen = d->d_namlen; + bcopy(d->d_name, p->d_name, p->d_namlen + 1); + /* + * Check to make sure the array has space left and + * realloc the maximum size. + */ + if (nitems >= arraysz) { + struct dirent **names2; + + names2 = (struct dirent **)realloc((char *)names, + (arraysz * 2) * sizeof(struct dirent *)); + if (names2 == NULL) { + free(p); + goto fail; + } + names = names2; + arraysz *= 2; + } + names[nitems++] = p; + } + closedir(dirp); + if (nitems && dcomp != NULL) + qsort_r(names, nitems, sizeof(struct dirent *), + &dcomp, alphasort_thunk); + *namelist = names; + return (nitems); + +fail: + while (nitems > 0) + free(names[--nitems]); + free(names); + closedir(dirp); + return (-1); +} + +/* + * Alphabetic order comparison routine for those who want it. + * POSIX 2008 requires that alphasort() uses strcoll(). + */ +int +alphasort(const struct dirent **d1, const struct dirent **d2) +{ + + return (strcoll((*d1)->d_name, (*d2)->d_name)); +} + +static int +alphasort_thunk(void *thunk, const void *p1, const void *p2) +{ + int (*dc)(const struct dirent **, const struct dirent **); + + dc = *(int (**)(const struct dirent **, const struct dirent **))thunk; + return (dc((const struct dirent **)p1, (const struct dirent **)p2)); +} diff --git a/mcwin32/diff/compat/strlcat.c b/mcwin32/diff/compat/strlcat.c new file mode 100644 index 00000000..f4fc16e5 --- /dev/null +++ b/mcwin32/diff/compat/strlcat.c @@ -0,0 +1,67 @@ +/* + * Copyright (c) 1998 Todd C. Miller + * + * Permission to use, copy, modify, and distribute this software for any + * purpose with or without fee is hereby granted, provided that the above + * copyright notice and this permission notice appear in all copies. + * + * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES + * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR + * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN + * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF + * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + */ + +#include "libcompat.h" + +#include +#include + +/* + * Appends src to string dst of size siz (unlike strncat, siz is the + * full size of dst, not space left). At most siz-1 characters + * will be copied. Always NUL terminates (unless siz <= strlen(dst)). + * Returns strlen(src) + MIN(siz, strlen(initial dst)). + * If retval >= siz, truncation occurred. + */ +#if !defined(HAVE_STRLCAT) + +size_t +strlcat(char *dst, const char *src, size_t siz) +{ + char *d = dst; + const char *s = src; + size_t n = siz; + size_t dlen; + + /* Find the end of dst and adjust bytes left but don't go past end */ + while (n-- != 0 && *d != '\0') + d++; + dlen = d - dst; + n = siz - dlen; + + if (n == 0) + return(dlen + strlen(s)); + while (*s != '\0') { + if (n != 1) { + *d++ = *s; + n--; + } + s++; + } + *d = '\0'; + + return(dlen + (s - src)); /* count does not include NUL */ +} + +#else +extern void __stdlibrary_has_strlcat(void); + +void +__stdlibrary_has_strlcat(void) +{ +} + +#endif \ No newline at end of file diff --git a/mcwin32/diff/compat/strlcpy.c b/mcwin32/diff/compat/strlcpy.c new file mode 100644 index 00000000..b03b47fa --- /dev/null +++ b/mcwin32/diff/compat/strlcpy.c @@ -0,0 +1,63 @@ +/* + * Copyright (c) 1998 Todd C. Miller + * + * Permission to use, copy, modify, and distribute this software for any + * purpose with or without fee is hereby granted, provided that the above + * copyright notice and this permission notice appear in all copies. + * + * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES + * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR + * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN + * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF + * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + */ + +#include "libcompat.h" + +#include +#include + +/* + * Copy src to string dst of size siz. At most siz-1 characters + * will be copied. Always NUL terminates (unless siz == 0). + * Returns strlen(src); if retval >= siz, truncation occurred. + */ +#if !defined(HAVE_STRLCPY) + +size_t +strlcpy(char *dst, const char *src, size_t siz) +{ + char *d = dst; + const char *s = src; + size_t n = siz; + + /* Copy as many bytes as will fit */ + if (n != 0) { + while (--n != 0) { + if ((*d++ = *s++) == '\0') + break; + } + } + + /* Not enough room in dst, add NUL and traverse rest of src */ + if (n == 0) { + if (siz != 0) + *d = '\0'; /* NUL-terminate dst */ + while (*s++) + ; + } + + return(s - src - 1); /* count does not include NUL */ +} + +#else +extern void __stdlibrary_has_strlcpy(void); + +void +__stdlibrary_has_strlcpy(void) +{ +} + +#endif \ No newline at end of file diff --git a/mcwin32/diff/compat/strndup.c b/mcwin32/diff/compat/strndup.c new file mode 100644 index 00000000..9740cf88 --- /dev/null +++ b/mcwin32/diff/compat/strndup.c @@ -0,0 +1,81 @@ +/* + * Copyright (c) 2010 Todd C. Miller + * + * Permission to use, copy, modify, and distribute this software for any + * purpose with or without fee is hereby granted, provided that the above + * copyright notice and this permission notice appear in all copies. + * + * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES + * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR + * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN + * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF + * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + */ + +#include "libcompat.h" + +#include +#include +#include + +// NAME +// +// strndup - duplicate a specific number of bytes from a string. +// +// SYNOPSIS +// +// #include +// +// char *strndup(const char *s, size_t size); +// +// DESCRIPTION +// +// The strndup() function shall be equivalent to the strdup() function, duplicating the +// provided s in a new block of memory allocated as if by using malloc(), with the exception +// being that strndup() copies at most size plus one bytes into the newly allocated memory, +// terminating the new string with a NUL character. If the length of s is larger than size, +// only size bytes shall be duplicated. If size is larger than the length of s, all bytes +// in 's' shall be copied into the new memory buffer, including the terminating NUL character. +// The newly created string shall always be properly terminated. +// +// RETURN VALUE +// +// Upon successful completion, the strndup() function shall return a pointer to the newly +// allocated memory containing the duplicated string. Otherwise, it shall return a null +// pointer and set errno to indicate the error. +// +// ERRORS +// +// These functions shall fail if: +// +// [ENOMEM] - Storage space available is insufficient. +// + +#if !defined(HAVE_STRNDUP) +char * +strndup(const char *str, size_t maxlen) +{ + char *copy; + size_t len; + + len = strnlen(str, maxlen); + copy = malloc(len + 1); + if (copy != NULL) { + (void)memcpy(copy, str, len); + copy[len] = '\0'; + } + + return copy; +} + +#else +extern void __stdlibrary_has_strndup(void); + +void +__stdlibrary_has_strndup(void) +{ +} + +#endif diff --git a/mcwin32/diff/compat/strtonum.c b/mcwin32/diff/compat/strtonum.c new file mode 100644 index 00000000..f82511e8 --- /dev/null +++ b/mcwin32/diff/compat/strtonum.c @@ -0,0 +1,71 @@ +/* $OpenBSD: strtonum.c,v 1.6 2004/08/03 19:38:01 millert Exp $ */ + +/* + * Copyright (c) 2004 Ted Unangst and Todd Miller + * All rights reserved. + * + * Permission to use, copy, modify, and distribute this software for any + * purpose with or without fee is hereby granted, provided that the above + * copyright notice and this permission notice appear in all copies. + * + * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES + * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR + * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN + * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF + * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + */ + +/* OPENBSD ORIGINAL: lib/libc/stdlib/strtonum.c */ + +//#if defined(__linux__) +#include +#include +#include + +#include "libcompat.h" + +#define INVALID 1 +#define TOOSMALL 2 +#define TOOLARGE 3 + +long long +strtonum(const char *numstr, long long minval, long long maxval, const char **errstrp) +{ + long long ll = 0; + char *ep; + int error = 0; + struct errval { + const char *errstr; + int err; + } ev[4] = { + { NULL, 0 }, + { "invalid", EINVAL }, + { "too small", ERANGE }, + { "too large", ERANGE }, + }; + + ev[0].err = errno; + errno = 0; + if (minval > maxval) + error = INVALID; + else { + ll = strtoll(numstr, &ep, 10); + if (numstr == ep || *ep != '\0') + error = INVALID; + else if ((ll == LLONG_MIN && errno == ERANGE) || ll < minval) + error = TOOSMALL; + else if ((ll == LLONG_MAX && errno == ERANGE) || ll > maxval) + error = TOOLARGE; + } + if (errstrp != NULL) + *errstrp = ev[error].errstr; + errno = ev[error].err; + if (error) + ll = 0; + + return (ll); +} + +//#endif diff --git a/mcwin32/diff/compat/timegm.c b/mcwin32/diff/compat/timegm.c new file mode 100644 index 00000000..944a23fb --- /dev/null +++ b/mcwin32/diff/compat/timegm.c @@ -0,0 +1,129 @@ +/* -*- mode: c; indent-width: 8; -*- */ + +/* + * Copyright (c) 1997 Kungliga Tekniska Hgskolan + * (Royal Institute of Technology, Stockholm, Sweden). + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * 3. Neither the name of the Institute nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE INSTITUTE AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE INSTITUTE OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#include + +#include "libcompat.h" + +#include +#include + +#if defined(_MSC_VER) || defined(__WATCOMC__) || \ + (defined(__MINGW32__) && !defined(HAVE_TIMEGM)) + +/* + * Simplifed version of timegm() that wont allow out of bound values. + * + * The timegm() function interprets the input structure as representing Universal Coordinated Time (UTC). + */ + +static int +calc_leap_years(int y) +{ + y -= 1; + return y / 4 - y / 100 + y / 400; +} + + +static int +is_leap(unsigned y) +{ + y += 1900; + return (y % 4) == 0 && ((y % 100) != 0 || (y % 400) == 0); +} + + +time_t +timegm(struct tm *tm) +{ + static const unsigned ndays[2][12] = { + {31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31}, + {31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31}}; + + time_t res = 0; + int i, leap; + + if (! tm) + return -1; + + if (tm->tm_year < 0) + return -1; + + leap = is_leap(tm->tm_year); + + if (tm->tm_mon < 0 || tm->tm_mon > 11 || + tm->tm_mday < 1 || tm->tm_mday > (int)ndays[leap][tm->tm_mon] || + tm->tm_min < 0 || tm->tm_min > 59 || + tm->tm_sec < 0 || tm->tm_sec > 60 || + tm->tm_hour < 0 || tm->tm_hour > 23) { + return -1; + } + +// for (i = 70; i < tm->tm_year; ++i) +// res += is_leap(i) ? 366 : 365; + + res = (tm->tm_year - 70) * 365 + + (calc_leap_years(tm->tm_year + 1900) - calc_leap_years(1970)); + + leap = is_leap(tm->tm_year); + for (i = 0; i < tm->tm_mon; ++i) + res += ndays[leap][i]; + + res += tm->tm_mday - 1; + res *= 24; + res += tm->tm_hour; + res *= 60; + res += tm->tm_min; + res *= 60; + res += tm->tm_sec; + +#if defined(_MSC_VER) + assert(res == _mkgmtime(tm)); +#endif + return res; +} + + +#else +extern void __stdlibrary_has_timegm(void); + +void +__stdlibrary_has_timegm(void) +{ +} + +#endif + +//end diff --git a/mcwin32/diff/compat/vasprintf.c b/mcwin32/diff/compat/vasprintf.c new file mode 100644 index 00000000..72e4a9ad --- /dev/null +++ b/mcwin32/diff/compat/vasprintf.c @@ -0,0 +1,93 @@ +// +// compat_vasprintf +// + +#include "libcompat.h" + +#if !defined(HAVE_VASPRINTF) + +#include +#include +#include +#include +#include + +#ifndef VA_COPY +# if defined(HAVE_VA_COPY) || defined(va_copy) + /* ISO C99 and later */ +#define VA_COPY(__dst, __src) va_copy(__dst, __src) +# elif defined(HAVE___VA_COPY) || defined(__va_copy) + /* gnu */ +#define VA_COPY(__dst, __src) __va_copy(__dst, __src) +# elif defined(__WATCOMC__) + /* Older Watcom implementations */ +#define VA_COPY(__dst, __src) memcpy((__dst), (__src), sizeof (va_list)) +# else +#define VA_COPY(__dst, __src) (__dst) = (__src) +# endif +#endif /*VA_COPY*/ + + +/* + SYNOPSIS + int + asprintf(char **ret, const char *format, ...); + + int + vasprintf(char **ret, const char *format, va_list ap); + + DESCRIPTION + The printf() family of functions ... + + The functions asprintf() and vasprintf() are analogs of sprintf(3) and vsprintf(3), + except that they allocate a string large enough to hold the output including the + terminating null byte, and return a pointer to it via the first argument. + This pointer should be passed to free(3) to release the allocated storage when it is + no longer needed. + + RETURNS + When successful, these functions return the number of bytes printed, just like sprintf(3). + If sufficient space cannot be allocated, asprintf() and vasprintf() will return -1 and set ret to be a NULL pointer. + + COMPAT + These functions are GNU extensions, not in C or POSIX. + They are also available under *BSD. The FreeBSD implementation sets strp to NULL on error. +*/ + +int +vasprintf(char **str, const char *fmt, va_list ap) +{ + va_list tap; + char *buf = NULL; + int osize, size; + + if (NULL == str || NULL == fmt) { + errno = EINVAL; + return -1; + } + + VA_COPY(tap, ap); + osize = vsnprintf(NULL, 0, fmt, tap); + if (osize < 0 || + (NULL == (buf = (char *)malloc(osize + 16)))) { + size = -1; + } else { + size = vsprintf(buf, fmt, ap); + assert(size == osize); + } + *str = buf; + va_end(tap); + + return size; +} + + +#else +extern void __stdlibrary_has_vasprintf(void); + +void +__stdlibrary_has_vasprintf(void) +{ +} + +#endif \ No newline at end of file diff --git a/mcwin32/diff/diff.1 b/mcwin32/diff/diff.1 new file mode 100644 index 00000000..10a34934 --- /dev/null +++ b/mcwin32/diff/diff.1 @@ -0,0 +1,741 @@ +.\" $OpenBSD: diff.1,v 1.47 2015/11/24 19:35:41 jmc Exp $ +.\" +.\" Copyright (c) 1980, 1990, 1993 +.\" The Regents of the University of California. All rights reserved. +.\" +.\" Redistribution and use in source and binary forms, with or without +.\" modification, are permitted provided that the following conditions +.\" are met: +.\" 1. Redistributions of source code must retain the above copyright +.\" notice, this list of conditions and the following disclaimer. +.\" 2. Redistributions in binary form must reproduce the above copyright +.\" notice, this list of conditions and the following disclaimer in the +.\" documentation and/or other materials provided with the distribution. +.\" 3. Neither the name of the University nor the names of its contributors +.\" may be used to endorse or promote products derived from this software +.\" without specific prior written permission. +.\" +.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +.\" SUCH DAMAGE. +.\" +.Dd March 10, 2022 +.Dt DIFF 1 +.Os +.Sh NAME +.Nm diff +.Nd differential file and directory comparator +.Sh SYNOPSIS +.Nm diff +.Op Fl aBbdipTtw +.Oo +.Fl c | e | f | +.Fl n | q | u | y +.Oc +.Op Fl -brief +.Op Fl -color Ns = Ns Ar when +.Op Fl -changed-group-format Ar GFMT +.Op Fl -ed +.Op Fl -expand-tabs +.Op Fl -forward-ed +.Op Fl -ignore-all-space +.Op Fl -ignore-case +.Op Fl -ignore-space-change +.Op Fl -initial-tab +.Op Fl -minimal +.Op Fl -no-ignore-file-name-case +.Op Fl -normal +.Op Fl -rcs +.Op Fl -show-c-function +.Op Fl -starting-file +.Op Fl -speed-large-files +.Op Fl -strip-trailing-cr +.Op Fl -tabsize Ar number +.Op Fl -text +.Op Fl -unified +.Op Fl I Ar pattern | Fl -ignore-matching-lines Ar pattern +.Op Fl F Ar pattern | Fl -show-function-line Ar pattern +.Op Fl L Ar label | Fl -label Ar label +.Ar file1 file2 +.Nm diff +.Op Fl aBbdilpTtw +.Op Fl I Ar pattern | Fl -ignore-matching-lines Ar pattern +.Op Fl F Ar pattern | Fl -show-function-line Ar pattern +.Op Fl L Ar label | Fl -label Ar label +.Op Fl -brief +.Op Fl -color Ns = Ns Ar when +.Op Fl -changed-group-format Ar GFMT +.Op Fl -ed +.Op Fl -expand-tabs +.Op Fl -forward-ed +.Op Fl -ignore-all-space +.Op Fl -ignore-case +.Op Fl -ignore-space-change +.Op Fl -initial-tab +.Op Fl -minimal +.Op Fl -no-ignore-file-name-case +.Op Fl -normal +.Op Fl -paginate +.Op Fl -rcs +.Op Fl -show-c-function +.Op Fl -speed-large-files +.Op Fl -starting-file +.Op Fl -strip-trailing-cr +.Op Fl -tabsize Ar number +.Op Fl -text +.Fl C Ar number | -context Ar number +.Ar file1 file2 +.Nm diff +.Op Fl aBbdiltw +.Op Fl I Ar pattern | Fl -ignore-matching-lines Ar pattern +.Op Fl -brief +.Op Fl -color Ns = Ns Ar when +.Op Fl -changed-group-format Ar GFMT +.Op Fl -ed +.Op Fl -expand-tabs +.Op Fl -forward-ed +.Op Fl -ignore-all-space +.Op Fl -ignore-case +.Op Fl -ignore-space-change +.Op Fl -initial-tab +.Op Fl -minimal +.Op Fl -no-ignore-file-name-case +.Op Fl -normal +.Op Fl -paginate +.Op Fl -rcs +.Op Fl -show-c-function +.Op Fl -speed-large-files +.Op Fl -starting-file +.Op Fl -strip-trailing-cr +.Op Fl -tabsize Ar number +.Op Fl -text +.Fl D Ar string | Fl -ifdef Ar string +.Ar file1 file2 +.Nm diff +.Op Fl aBbdilpTtw +.Op Fl I Ar pattern | Fl -ignore-matching-lines Ar pattern +.Op Fl F Ar pattern | Fl -show-function-line Ar pattern +.Op Fl L Ar label | Fl -label Ar label +.Op Fl -brief +.Op Fl -color Ns = Ns Ar when +.Op Fl -changed-group-format Ar GFMT +.Op Fl -ed +.Op Fl -expand-tabs +.Op Fl -forward-ed +.Op Fl -ignore-all-space +.Op Fl -ignore-case +.Op Fl -ignore-space-change +.Op Fl -initial-tab +.Op Fl -minimal +.Op Fl -no-ignore-file-name-case +.Op Fl -normal +.Op Fl -paginate +.Op Fl -rcs +.Op Fl -show-c-function +.Op Fl -speed-large-files +.Op Fl -starting-file +.Op Fl -strip-trailing-cr +.Op Fl -tabsize Ar number +.Op Fl -text +.Fl U Ar number | Fl -unified Ar number +.Ar file1 file2 +.Nm diff +.Op Fl aBbdilNPprsTtw +.Oo +.Fl c | e | f | +.Fl n | q | u +.Oc +.Op Fl -brief +.Op Fl -color Ns = Ns Ar when +.Op Fl -changed-group-format Ar GFMT +.Op Fl -context +.Op Fl -ed +.Op Fl -expand-tabs +.Op Fl -forward-ed +.Op Fl -ignore-all-space +.Op Fl -ignore-case +.Op Fl -ignore-space-change +.Op Fl -initial-tab +.Op Fl -minimal +.Op Fl -new-file +.Op Fl -no-ignore-file-name-case +.Op Fl -normal +.Op Fl -paginate +.Op Fl -rcs +.Op Fl -recursive +.Op Fl -report-identical-files +.Op Fl -show-c-function +.Op Fl -speed-large-files +.Op Fl -strip-trailing-cr +.Op Fl -tabsize Ar number +.Op Fl -text +.Op Fl -unidirectional-new-file +.Op Fl -unified +.Op Fl I Ar pattern | Fl -ignore-matching-lines Ar pattern +.Op Fl F Ar pattern | Fl -show-function-line Ar pattern +.Bk -words +.Op Fl L Ar label | Fl -label Ar label +.Op Fl S Ar name | Fl -starting-file Ar name +.Op Fl X Ar file | Fl -exclude-from Ar file +.Op Fl x Ar pattern | Fl -exclude Ar pattern +.Ek +.Ar dir1 dir2 +.Nm diff +.Op Fl aBbditwW +.Op Fl -color Ns = Ns Ar when +.Op Fl -expand-tabs +.Op Fl -ignore-all-blanks +.Op Fl -ignore-blank-lines +.Op Fl -ignore-case +.Op Fl -minimal +.Op Fl -no-ignore-file-name-case +.Op Fl -strip-trailing-cr +.Op Fl -suppress-common-lines +.Op Fl -tabsize Ar number +.Op Fl -text +.Op Fl -width +.Fl y | Fl -side-by-side +.Ar file1 file2 +.Nm diff +.Op Fl -help +.Op Fl -version +.Sh DESCRIPTION +The +.Nm +utility compares the contents of +.Ar file1 +and +.Ar file2 +and writes to the standard output the list of changes necessary to +convert one file into the other. +No output is produced if the files are identical. +.Pp +Output options (mutually exclusive): +.Bl -tag -width Ds +.It Fl C Ar number Fl -context Ar number +Like +.Fl c +but produces a diff with +.Ar number +lines of context. +.It Fl c +Produces a diff with 3 lines of context. +With +.Fl c +the output format is modified slightly: +the output begins with identification of the files involved and +their creation dates and then each change is separated +by a line with fifteen +.Li * Ns 's . +The lines removed from +.Ar file1 +are marked with +.Sq \&-\ \& ; +those added to +.Ar file2 +are marked +.Sq +\ \& . +Lines which are changed from one file to the other are marked in +both files with +.Sq !\ \& . +Changes which lie within 3 lines of each other are grouped together on +output. +.It Fl D Ar string Fl -ifdef Ar string +Creates a merged version of +.Ar file1 +and +.Ar file2 +on the standard output, with C preprocessor controls included so that +a compilation of the result without defining +.Ar string +is equivalent to compiling +.Ar file1 , +while defining +.Ar string +will yield +.Ar file2 . +.It Fl e -ed +Produces output in a form suitable as input for the editor utility, +.Xr ed 1 , +which can then be used to convert file1 into file2. +.Pp +Extra commands are added to the output when comparing directories with +.Fl e , +so that the result is a +.Xr sh 1 +script for converting text files which are common to the two directories +from their state in +.Ar dir1 +to their state in +.Ar dir2 . +.It Fl f -forward-ed +Identical output to that of the +.Fl e +flag, but in reverse order. +It cannot be digested by +.Xr ed 1 . +.It Fl -help +This option prints a summary to stdout and exits with status 0. +.It Fl n +Produces a script similar to that of +.Fl e , +but in the opposite order and with a count of changed lines on each +insert or delete command. +This is the form used by rcsdiff. +.It Fl q -brief +Just print a line when the files differ. +Does not output a list of changes. +.It Fl U Ar number Fl -unified Ar number +Like +.Fl u +but produces a diff with +.Ar number +lines of context. +.It Fl u +Produces a +.Em unified +diff with 3 lines of context. +A unified diff is similar to the context diff produced by the +.Fl c +option. +However, unlike with +.Fl c , +all lines to be changed (added and/or removed) are present in +a single section. +.It Fl -version +This option prints a version string to stdout and exits with status 0. +.It Fl y Fl -side-by-side +Output in two columns with a marker between them. +The marker can be one +of the following: +.Pp +.Bl -tag -width Ds -offset indent -compact +.It space +Corresponding lines are identical. +.It '|' +Corresponding lines are different. +.It '<' +Files differ and only the first file contains the line. +.It '>' +Files differ and only the second file contains the line. +.El +.El +.Pp +Comparison options: +.Bl -tag -width Ds +.It Fl a -text +Treat all files as ASCII text. +Normally +.Nm +will simply print +.Dq Binary files ... differ +if files contain binary characters. +Use of this option forces +.Nm +to produce a diff. +.It Fl B Fl -ignore-blank-lines +Causes chunks that include only blank lines to be ignored. +.It Fl b -ignore-space-change +Causes trailing blanks (spaces and tabs) to be ignored, and other +strings of blanks to compare equal. +.It Fl -color= Ns Oo Ar when Oc +Color the additions green, and removals red, or the value in the +.Ev DIFFCOLORS +environment variable. +The possible values of +.Ar when +are +.Dq Cm never , +.Dq Cm always +and +.Dq Cm auto . +.Cm auto +will use color if the output is a tty and the +.Ev COLORTERM +environment variable is set to a non-empty string. +.It Fl d -minimal +Try very hard to produce a diff as small as possible. +This may consume a lot of processing power and memory when processing +large files with many changes. +.It Fl F Ar pattern, Fl -show-function-line Ar pattern +Like +.Fl p, +but display the last line that matches provided pattern. +.It Fl I Ar pattern Fl -ignore-matching-lines Ar pattern +Ignores changes, insertions, and deletions whose lines match the +extended regular expression +.Ar pattern . +Multiple +.Fl I +patterns may be specified. +All lines in the change must match some pattern for the change to be +ignored. +See +.Xr re_format 7 +for more information on regular expression patterns. +.It Fl i -ignore-case +Ignores the case of letters. +E.g., +.Dq A +will compare equal to +.Dq a . +.It Fl l -paginate +Pass the output through +.Xr pr 1 +to paginate it. +.It Fl L Ar label Fl -label Ar label +Print +.Ar label +instead of the first (and second, if this option is specified twice) +file name and time in the context or unified diff header. +.It Fl p -show-c-function +With unified and context diffs, show with each change +the first 40 characters of the last line before the context beginning +with a letter, an underscore or a dollar sign. +For C and Objective-C source code following standard layout conventions, this +will show the prototype of the function the change applies to. +.It Fl T -initial-tab +Print a tab rather than a space before the rest of the line for the +normal, context or unified output formats. +This makes the alignment of tabs in the line consistent. +.It Fl t -expand-tabs +Will expand tabs in output lines. +Normal or +.Fl c +output adds character(s) to the front of each line which may screw up +the indentation of the original source lines and make the output listing +difficult to interpret. +This option will preserve the original source's indentation. +.It Fl w -ignore-all-blanks +Is similar to +.Fl b -ignore-space-change +but causes whitespace (blanks and tabs) to be totally ignored. +E.g., +.Dq if (\ \&a == b \&) +will compare equal to +.Dq if(a==b) . +.It Fl W Ar number Fl -width Ar number +Output at most +.Ar number +columns when using side by side format. +The default value is 130. +.It Fl -changed-group-format Ar GFMT +Format input groups in the provided +.Pp +the format is a string with special keywords: +.Bl -tag -width %< +.It %< +lines from FILE1 +.It %< +lines from FILE2 +.El +.It Fl -ignore-file-name-case +ignore case when comparing file names +.It Fl -no-ignore-file-name-case +do not ignore case when comparing file names (default) +.It Fl -normal +default diff output +.It Fl -speed-large-files +stub option for compatibility with GNU diff +.It Fl -strip-trailing-cr +strip carriage return on input files +.It Fl -suppress-common-lines +Do not output common lines when using the side by side format +.It Fl -tabsize Ar number +Number of spaces representing a tab (default 8) +.El +.Pp +Directory comparison options: +.Bl -tag -width Ds +.It Fl N -new-file +If a file is found in only one directory, act as if it was found in the +other directory too but was of zero size. +.It Fl P -unidirectional-new-file +If a file is found only in +.Ar dir2 , +act as if it was found in +.Ar dir1 +too but was of zero size. +.It Fl r -recursive +Causes application of +.Nm +recursively to common subdirectories encountered. +.It Fl S Ar name Fl -starting-file Ar name +Re-starts a directory +.Nm +in the middle, beginning with file +.Ar name . +.It Fl s -report-identical-files +Causes +.Nm +to report files which are the same, which are otherwise not mentioned. +.It Fl X Ar file Fl -exclude-from Ar file +Exclude files and subdirectories from comparison whose basenames match +lines in +.Ar file . +Multiple +.Fl X +options may be specified. +.It Fl x Ar pattern Fl -exclude Ar pattern +Exclude files and subdirectories from comparison whose basenames match +.Ar pattern . +Patterns are matched using shell-style globbing via +.Xr fnmatch 3 . +Multiple +.Fl x +options may be specified. +.El +.Pp +If both arguments are directories, +.Nm +sorts the contents of the directories by name, and then runs the +regular file +.Nm +algorithm, producing a change list, +on text files which are different. +Binary files which differ, +common subdirectories, and files which appear in only one directory +are described as such. +In directory mode only regular files and directories are compared. +If a non-regular file such as a device special file or FIFO is encountered, +a diagnostic message is printed. +.Pp +If only one of +.Ar file1 +and +.Ar file2 +is a directory, +.Nm +is applied to the non-directory file and the file contained in +the directory file with a filename that is the same as the +last component of the non-directory file. +.Pp +If either +.Ar file1 +or +.Ar file2 +is +.Sq - , +the standard input is +used in its place. +.Ss Output Style +The default (without +.Fl e , +.Fl c , +or +.Fl n -rcs +.\" -C +options) +output contains lines of these forms, where +.Va XX , YY , ZZ , QQ +are line numbers respective of file order. +.Pp +.Bl -tag -width "XX,YYcZZ,QQ" -compact +.It Li XX Ns Ic a Ns Li YY +At (the end of) line +.Va XX +of +.Ar file1 , +append the contents +of line +.Va YY +of +.Ar file2 +to make them equal. +.It Li XX Ns Ic a Ns Li YY,ZZ +Same as above, but append the range of lines, +.Va YY +through +.Va ZZ +of +.Ar file2 +to line +.Va XX +of file1. +.It Li XX Ns Ic d Ns Li YY +At line +.Va XX +delete +the line. +The value +.Va YY +tells to which line the change would bring +.Ar file1 +in line with +.Ar file2 . +.It Li XX,YY Ns Ic d Ns Li ZZ +Delete the range of lines +.Va XX +through +.Va YY +in +.Ar file1 . +.It Li XX Ns Ic c Ns Li YY +Change the line +.Va XX +in +.Ar file1 +to the line +.Va YY +in +.Ar file2 . +.It Li XX,YY Ns Ic c Ns Li ZZ +Replace the range of specified lines with the line +.Va ZZ . +.It Li XX,YY Ns Ic c Ns Li ZZ,QQ +Replace the range +.Va XX , Ns Va YY +from +.Ar file1 +with the range +.Va ZZ , Ns Va QQ +from +.Ar file2 . +.El +.Pp +These lines resemble +.Xr ed 1 +subcommands to convert +.Ar file1 +into +.Ar file2 . +The line numbers before the action letters pertain to +.Ar file1 ; +those after pertain to +.Ar file2 . +Thus, by exchanging +.Ic a +for +.Ic d +and reading the line in reverse order, one can also +determine how to convert +.Ar file2 +into +.Ar file1 . +As in +.Xr ed 1 , +identical +pairs (where num1 = num2) are abbreviated as a single +number. +.Sh ENVIRONMENT +.Bl -tag -width DIFFCOLORS +.It Ev DIFFCOLORS +The value of this variable is the form +.Ar add Ns : Ns Ar rm , +where +.Ar add +is the ASCII escape sequence for additions and +.Ar rm +is the ASCII escape sequence for deletions. +If this is unset, +.Nm +uses green for additions and red for removals. +.El +.Sh FILES +.Bl -tag -width /tmp/diff.XXXXXXXX -compact +.It Pa /tmp/diff.XXXXXXXX +Temporary file used when comparing a device or the standard input. +Note that the temporary file is unlinked as soon as it is created +so it will not show up in a directory listing. +.El +.Sh EXIT STATUS +The +.Nm +utility exits with one of the following values: +.Pp +.Bl -tag -width Ds -offset indent -compact +.It 0 +No differences were found. +.It 1 +Differences were found. +.It >1 +An error occurred. +.El +.Pp +The +.Fl -help +and +.Fl -version +options exit with a status of 0. +.Sh EXAMPLES +Compare +.Pa old_dir +and +.Pa new_dir +recursively generating an unified diff and treating files found only in one +of those directories as new files: +.Bd -literal -offset indent +$ diff -ruN /path/to/old_dir /path/to/new_dir +.Ed +.Pp +Same as above but excluding files matching the expressions +.Dq *.h +and +.Dq *.c : +.Bd -literal -offset indent +$ diff -ruN -x '*.h' -x '*.c' /path/to/old_dir /path/to/new_dir +.Ed +.Pp +Show a single line indicating if the files differ: +.Bd -literal -offset indent +$ diff -q /boot/loader.conf /boot/defaults/loader.conf +Files /boot/loader.conf and /boot/defaults/loader.conf differ +.Ed +.Pp +Assuming a file named +.Pa example.txt +with the following contents: +.Bd -literal -offset indent +FreeBSD is an operating system +Linux is a kernel +OpenBSD is an operating system +.Ed +.Pp +Compare stdin with +.Pa example.txt +excluding from the comparison those lines containing either +.Qq Linux +or +.Qq Open : +.Bd -literal -offset indent +$ echo "FreeBSD is an operating system" | diff -q -I 'Linux|Open' example.txt - +.Ed +.Sh SEE ALSO +.Xr cmp 1 , +.Xr comm 1 , +.Xr diff3 1 , +.Xr ed 1 , +.Xr patch 1 , +.Xr pr 1 , +.Xr sdiff 1 +.Rs +.%A James W. Hunt +.%A M. Douglas McIlroy +.%T "An Algorithm for Differential File Comparison" +.%J Computing Science Technical Report +.%Q Bell Laboratories 41 +.%D June 1976 +.Re +.Sh STANDARDS +The +.Nm +utility is compliant with the +.St -p1003.1-2008 +specification. +.Pp +The flags +.Op Fl aDdIiLlNnPpqSsTtwXxy +are extensions to that specification. +.Sh HISTORY +A +.Nm +command appeared in +.At v6 . diff --git a/mcwin32/diff/diff.c b/mcwin32/diff/diff.c new file mode 100644 index 00000000..304cbabe --- /dev/null +++ b/mcwin32/diff/diff.c @@ -0,0 +1,723 @@ +/* $OpenBSD: diff.c,v 1.67 2019/06/28 13:35:00 deraadt Exp $ */ + +/* + * Copyright (c) 2003 Todd C. Miller + * + * Permission to use, copy, modify, and distribute this software for any + * purpose with or without fee is hereby granted, provided that the above + * copyright notice and this permission notice appear in all copies. + * + * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES + * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR + * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN + * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF + * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + * + * Sponsored in part by the Defense Advanced Research Projects + * Agency (DARPA) and Air Force Research Laboratory, Air Force + * Materiel Command, USAF, under agreement number F39502-99-1-0512. + */ + +#if defined(WIN32) && !defined(WIN32_UNISTD_MAP) +#define WIN32_UNISTD_MAP 1 +#endif + +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "diff.h" +#include "xmalloc.h" + +#if defined(WIN32) +#include "diffwin.h" +#include "diff_license.h" +#include "diff_usage.h" +#endif + +static const char diff_version[] = "FreeBSD diff 20220309"; + +bool lflag, Nflag, Pflag, rflag, sflag, Tflag, cflag; +bool ignore_file_case, suppress_common, color, noderef; +static bool help = false; +int diff_format, diff_context, status; +int tabsize = 8, width = 130; +static int colorflag = COLORFLAG_NEVER; +char *start, *ifdefname, *diffargs, *label[2]; +char *ignore_pats, *most_recent_pat; +char *group_format = NULL; +const char *add_code, *del_code; +struct stat stb1, stb2; +struct excludes *excludes_list; +regex_t ignore_re, most_recent_re; + +#define OPTIONS "0123456789aBbC:cdD:efF:HhI:iL:lnNPpqrS:sTtU:uwW:X:x:y" +enum { + OPT_TSIZE = CHAR_MAX + 1, + OPT_STRIPCR, + OPT_IGN_FN_CASE, + OPT_NO_IGN_FN_CASE, + OPT_NORMAL, + OPT_HELP, + OPT_HORIZON_LINES, + OPT_CHANGED_GROUP_FORMAT, + OPT_SUPPRESS_COMMON, + OPT_COLOR, + OPT_NO_DEREFERENCE, + OPT_VERSION, +#if defined(WIN32) + OPT_MC_FORMAT, + OPT_LICENSE, + OPT_USAGE +#endif //WIN32 +}; + +static const struct option longopts[] = { + { "text", no_argument, 0, 'a' }, + { "ignore-space-change", no_argument, 0, 'b' }, + { "context", optional_argument, 0, 'C' }, + { "ifdef", required_argument, 0, 'D' }, + { "minimal", no_argument, 0, 'd' }, + { "ed", no_argument, 0, 'e' }, + { "forward-ed", no_argument, 0, 'f' }, + { "show-function-line", required_argument, 0, 'F' }, + { "speed-large-files", no_argument, NULL, 'H' }, + { "ignore-blank-lines", no_argument, 0, 'B' }, + { "ignore-matching-lines", required_argument, 0, 'I' }, + { "ignore-case", no_argument, 0, 'i' }, +#if !defined(WIN32) + { "paginate", no_argument, NULL, 'l' }, +#endif //WIN32 + { "label", required_argument, 0, 'L' }, + { "new-file", no_argument, 0, 'N' }, + { "rcs", no_argument, 0, 'n' }, + { "unidirectional-new-file", no_argument, 0, 'P' }, + { "show-c-function", no_argument, 0, 'p' }, + { "brief", no_argument, 0, 'q' }, + { "recursive", no_argument, 0, 'r' }, + { "report-identical-files", no_argument, 0, 's' }, + { "starting-file", required_argument, 0, 'S' }, + { "expand-tabs", no_argument, 0, 't' }, + { "initial-tab", no_argument, 0, 'T' }, + { "unified", optional_argument, 0, 'U' }, + { "ignore-all-space", no_argument, 0, 'w' }, + { "width", required_argument, 0, 'W' }, + { "exclude", required_argument, 0, 'x' }, + { "exclude-from", required_argument, 0, 'X' }, + { "side-by-side", no_argument, NULL, 'y' }, + { "ignore-file-name-case", no_argument, NULL, OPT_IGN_FN_CASE }, + { "help", no_argument, NULL, OPT_HELP}, + { "horizon-lines", required_argument, NULL, OPT_HORIZON_LINES }, + { "no-dereference", no_argument, NULL, OPT_NO_DEREFERENCE}, + { "no-ignore-file-name-case", no_argument, NULL, OPT_NO_IGN_FN_CASE }, + { "normal", no_argument, NULL, OPT_NORMAL }, + { "strip-trailing-cr", no_argument, NULL, OPT_STRIPCR }, + { "tabsize", required_argument, NULL, OPT_TSIZE }, + { "changed-group-format", required_argument, NULL, OPT_CHANGED_GROUP_FORMAT}, + { "suppress-common-lines", no_argument, NULL, OPT_SUPPRESS_COMMON }, + { "color", optional_argument, NULL, OPT_COLOR }, + { "version", no_argument, NULL, OPT_VERSION }, +#if defined(WIN32) + { "mc-format", no_argument, NULL, OPT_MC_FORMAT }, + { "license", no_argument, NULL, OPT_LICENSE }, + { "usage", no_argument, NULL, OPT_USAGE }, +#endif //WIN32 + { NULL } +}; + +static void checked_regcomp(char const *, regex_t *); +static void usage(void); +static void conflicting_format(void); +static void push_excludes(char *); +static void push_ignore_pats(char *); +static void read_excludes_file(char *file); +static void set_argstr(char **, char **); +static char *splice(char *, char *); +static bool do_color(void); + +int +main(int argc, char **argv) +{ + const char *errstr = NULL; + char *ep, **oargv; + long l; + int ch, dflags, lastch, gotstdin, prevoptind, newarg; + + oargv = argv; + gotstdin = 0; + dflags = 0; + lastch = '\0'; + prevoptind = 1; + newarg = 1; + diff_context = 3; + diff_format = D_UNSET; + +#define FORMAT_MISMATCHED(type) \ + (diff_format != D_UNSET && diff_format != (type)) + + while ((ch = getopt_long(argc, argv, OPTIONS, longopts, NULL)) != -1) { + switch (ch) { + case '0': case '1': case '2': case '3': case '4': + case '5': case '6': case '7': case '8': case '9': + if (newarg) + usage(); /* disallow -[0-9]+ */ + else if (lastch == 'c' || lastch == 'u') + diff_context = 0; + else if (!isdigit(lastch) || diff_context > INT_MAX / 10) + usage(); + diff_context = (diff_context * 10) + (ch - '0'); + break; + case 'a': + dflags |= D_FORCEASCII; + break; + case 'b': + dflags |= D_FOLDBLANKS; + break; + case 'C': + case 'c': + if (FORMAT_MISMATCHED(D_CONTEXT)) + conflicting_format(); + cflag = true; + diff_format = D_CONTEXT; + if (optarg != NULL) { + l = strtol(optarg, &ep, 10); + if (*ep != '\0' || l < 0 || l >= INT_MAX) + usage(); + diff_context = (int)l; + } + break; + case 'd': + dflags |= D_MINIMAL; + break; + case 'D': + if (FORMAT_MISMATCHED(D_IFDEF)) + conflicting_format(); + diff_format = D_IFDEF; + ifdefname = optarg; + break; + case 'e': + if (FORMAT_MISMATCHED(D_EDIT)) + conflicting_format(); + diff_format = D_EDIT; + break; + case 'f': + if (FORMAT_MISMATCHED(D_REVERSE)) + conflicting_format(); + diff_format = D_REVERSE; + break; + case 'H': + /* ignore but needed for compatibility with GNU diff */ + break; + case 'h': + /* silently ignore for backwards compatibility */ + break; + case 'B': + dflags |= D_SKIPBLANKLINES; + break; + case 'F': + if (dflags & D_PROTOTYPE) + conflicting_format(); + dflags |= D_MATCHLAST; + most_recent_pat = xstrdup(optarg); + break; + case 'I': + push_ignore_pats(optarg); + break; + case 'i': + dflags |= D_IGNORECASE; + break; + case 'L': + if (label[0] == NULL) + label[0] = optarg; + else if (label[1] == NULL) + label[1] = optarg; + else + usage(); + break; +#if !defined(WIN32) + case 'l': + lflag = true; + break; +#endif //WIN32 + case 'N': + Nflag = true; + break; + case 'n': + if (FORMAT_MISMATCHED(D_NREVERSE)) + conflicting_format(); + diff_format = D_NREVERSE; + break; + case 'p': + if (dflags & D_MATCHLAST) + conflicting_format(); + dflags |= D_PROTOTYPE; + break; + case 'P': + Pflag = true; + break; + case 'r': + rflag = true; + break; + case 'q': + if (FORMAT_MISMATCHED(D_BRIEF)) + conflicting_format(); + diff_format = D_BRIEF; + break; + case 'S': + start = optarg; + break; + case 's': + sflag = true; + break; + case 'T': + Tflag = true; + break; + case 't': + dflags |= D_EXPANDTABS; + break; + case 'U': + case 'u': + if (FORMAT_MISMATCHED(D_UNIFIED)) + conflicting_format(); + diff_format = D_UNIFIED; + if (optarg != NULL) { + l = strtol(optarg, &ep, 10); + if (*ep != '\0' || l < 0 || l >= INT_MAX) + usage(); + diff_context = (int)l; + } + break; + case 'w': + dflags |= D_IGNOREBLANKS; + break; + case 'W': + width = (int) strtonum(optarg, 1, INT_MAX, &errstr); + if (errstr) { + warnx("Invalid argument for width"); + usage(); + } + break; + case 'X': + read_excludes_file(optarg); + break; + case 'x': + push_excludes(optarg); + break; + case 'y': + if (FORMAT_MISMATCHED(D_SIDEBYSIDE)) + conflicting_format(); + diff_format = D_SIDEBYSIDE; + break; + case OPT_CHANGED_GROUP_FORMAT: + if (FORMAT_MISMATCHED(D_GFORMAT)) + conflicting_format(); + diff_format = D_GFORMAT; + group_format = optarg; + break; +#if defined(WIN32) + case OPT_MC_FORMAT: + if (FORMAT_MISMATCHED(D_MC_FORMAT)) + conflicting_format(); + diff_format = D_MC_FORMAT; + break; +#endif //WIN32 + case OPT_HELP: + help = true; + usage(); + break; + case OPT_HORIZON_LINES: + break; /* XXX TODO for compatibility with GNU diff3 */ + case OPT_IGN_FN_CASE: + ignore_file_case = true; + break; + case OPT_NO_IGN_FN_CASE: + ignore_file_case = false; + break; + case OPT_NORMAL: + if (FORMAT_MISMATCHED(D_NORMAL)) + conflicting_format(); + diff_format = D_NORMAL; + break; + case OPT_TSIZE: + tabsize = (int) strtonum(optarg, 1, INT_MAX, &errstr); + if (errstr) { + warnx("Invalid argument for tabsize"); + usage(); + } + break; + case OPT_STRIPCR: + dflags |= D_STRIPCR; + break; + case OPT_SUPPRESS_COMMON: + suppress_common = 1; + break; + case OPT_COLOR: + if (optarg == NULL || strncmp(optarg, "auto", 4) == 0) + colorflag = COLORFLAG_AUTO; + else if (strncmp(optarg, "always", 6) == 0) + colorflag = COLORFLAG_ALWAYS; + else if (strncmp(optarg, "never", 5) == 0) + colorflag = COLORFLAG_NEVER; + else + errx(2, "unsupported --color value '%s' (must be always, auto, or never)", + optarg); + break; + case OPT_NO_DEREFERENCE: + rflag = true; + noderef = true; + break; + case OPT_VERSION: + printf("%s\n", diff_version); + exit(0); +#if defined(WIN32) + case OPT_LICENSE: + for (unsigned i = 0; i < _countof(diff_license); ++i) { + printf("%s\n", diff_license[i]); + } + exit(0); + case OPT_USAGE: + for (unsigned i = 0; i < _countof(diff_usage); ++i) { + printf("%s\n", diff_usage[i]); + } + exit(0); +#endif //WIN32 + default: + usage(); + break; + } + lastch = ch; + newarg = optind != prevoptind; + prevoptind = optind; + } + if (diff_format == D_UNSET && (dflags & D_PROTOTYPE) != 0) + diff_format = D_CONTEXT; + if (diff_format == D_UNSET) + diff_format = D_NORMAL; + argc -= optind; + argv += optind; + + if (do_color()) { + char *p; + const char *env; + + color = true; + add_code = "32"; + del_code = "31"; + env = getenv("DIFFCOLORS"); + if (env != NULL && *env != '\0' && (p = strdup(env))) { + add_code = p; + strsep(&p, ":"); + if (p != NULL) + del_code = p; + } + } + +#ifdef __OpenBSD__ + if (pledge("stdio rpath tmppath", NULL) == -1) + err(2, "pledge"); +#endif + + /* + * Do sanity checks, fill in stb1 and stb2 and call the appropriate + * driver routine. Both drivers use the contents of stb1 and stb2. + */ + if (argc != 2) + usage(); + checked_regcomp(ignore_pats, &ignore_re); + checked_regcomp(most_recent_pat, &most_recent_re); + if (strcmp(argv[0], "-") == 0) { + fstat(STDIN_FILENO, &stb1); + gotstdin = 1; + } else if (stat(argv[0], &stb1) != 0) { + if (!Nflag || errno != ENOENT) + err(2, "%s", argv[0]); + dflags |= D_EMPTY1; + memset(&stb1, 0, sizeof(struct stat)); + } + + if (strcmp(argv[1], "-") == 0) { + fstat(STDIN_FILENO, &stb2); + gotstdin = 1; + } else if (stat(argv[1], &stb2) != 0) { + if (!Nflag || errno != ENOENT) + err(2, "%s", argv[1]); + dflags |= D_EMPTY2; + memset(&stb2, 0, sizeof(stb2)); + stb2.st_mode = stb1.st_mode; + } + + if (dflags & D_EMPTY1 && dflags & D_EMPTY2){ + warn("%s", argv[0]); + warn("%s", argv[1]); + exit(2); + } + + if (stb1.st_mode == 0) + stb1.st_mode = stb2.st_mode; + + if (gotstdin && (S_ISDIR(stb1.st_mode) || S_ISDIR(stb2.st_mode))) + errx(2, "can't compare - to a directory"); + set_argstr(oargv, argv); + if (S_ISDIR(stb1.st_mode) && S_ISDIR(stb2.st_mode)) { + if (diff_format == D_IFDEF) + errx(2, "-D option not supported with directories"); + diffdir(argv[0], argv[1], dflags); + } else { + if (S_ISDIR(stb1.st_mode)) { + argv[0] = splice(argv[0], argv[1]); + if (stat(argv[0], &stb1) == -1) + err(2, "%s", argv[0]); + } + if (S_ISDIR(stb2.st_mode)) { + argv[1] = splice(argv[1], argv[0]); + if (stat(argv[1], &stb2) == -1) + err(2, "%s", argv[1]); + } + print_status(diffreg(argv[0], argv[1], dflags, 1), argv[0], + argv[1], ""); + } + exit(status); +} + + +static void +checked_regcomp(char const *pattern, regex_t *comp) +{ + char buf[BUFSIZ]; + int error; + + if (pattern == NULL) + return; + + error = regcomp(comp, pattern, REG_NEWLINE | REG_EXTENDED); + if (error != 0) { + regerror(error, comp, buf, sizeof(buf)); + if (*pattern != '\0') + errx(2, "%s: %s", pattern, buf); + else + errx(2, "%s", buf); + } +} + + +static void +set_argstr(char **av, char **ave) +{ + size_t argsize = 5; // "diff\0" + char **ap; + +//WIN32 argsize = 4 + *ave - *av + 1; + for (ap = av + 1; ap < ave; ap++) { + if (strcmp(*ap, "--") != 0) { + argsize += 1 + strlen(*ap); + } + } + + diffargs = xmalloc(argsize); + strlcpy(diffargs, "diff", argsize); + for (ap = av + 1; ap < ave; ap++) { + if (strcmp(*ap, "--") != 0) { + strlcat(diffargs, " ", argsize); + strlcat(diffargs, *ap, argsize); + } + } +} + +/* + * Read in an excludes file and push each line. + */ +static void +read_excludes_file(char *file) +{ + FILE *fp; + char *buf, *pattern; + size_t len; + + if (strcmp(file, "-") == 0) + fp = stdin; + else if ((fp = fopen(file, "r")) == NULL) + err(2, "%s", file); + while ((buf = fgetln(fp, &len)) != NULL) { + if (buf[len - 1] == '\n') + len--; + if ((pattern = strndup(buf, len)) == NULL) + err(2, "xstrndup"); + push_excludes(pattern); + } + if (strcmp(file, "-") != 0) + fclose(fp); +} + +/* + * Push a pattern onto the excludes list. + */ +static void +push_excludes(char *pattern) +{ + struct excludes *entry; + + entry = xmalloc(sizeof(*entry)); + entry->pattern = pattern; + entry->next = excludes_list; + excludes_list = entry; +} + +static void +push_ignore_pats(char *pattern) +{ + size_t len; + + if (ignore_pats == NULL) + ignore_pats = xstrdup(pattern); + else { + /* old + "|" + new + NUL */ + len = strlen(ignore_pats) + strlen(pattern) + 2; + ignore_pats = xreallocarray(ignore_pats, 1, len); + strlcat(ignore_pats, "|", len); + strlcat(ignore_pats, pattern, len); + } +} + +void +print_status(int val, char *path1, char *path2, const char *entry) +{ + if (label[0] != NULL) + path1 = label[0]; + if (label[1] != NULL) + path2 = label[1]; + + switch (val) { + case D_BINARY: + printf("Binary files %s%s and %s%s differ\n", + path1, entry, path2, entry); + break; + case D_DIFFER: + if (diff_format == D_BRIEF) + printf("Files %s%s and %s%s differ\n", + path1, entry, path2, entry); + break; + case D_SAME: + if (sflag) + printf("Files %s%s and %s%s are identical\n", + path1, entry, path2, entry); + break; + case D_MISMATCH1: + printf("File %s%s is a directory while file %s%s is a regular file\n", + path1, entry, path2, entry); + break; + case D_MISMATCH2: + printf("File %s%s is a regular file while file %s%s is a directory\n", + path1, entry, path2, entry); + break; + case D_SKIPPED1: + printf("File %s%s is not a regular file or directory and was skipped\n", + path1, entry); + break; + case D_SKIPPED2: + printf("File %s%s is not a regular file or directory and was skipped\n", + path2, entry); + break; + case D_ERROR: + break; + } +} + +static void +usage(void) +{ + (void)fprintf(help ? stdout : stderr, + "usage: diff [-aBbdilpTtw] [-c | -e | -f | -n | -q | -u] [--ignore-case]\n" + " [--no-ignore-case] [--normal] [--strip-trailing-cr] [--tabsize]\n" + " [-I pattern] [-F pattern] [-L label] file1 file2\n" + " diff [-aBbdilpTtw] [-I pattern] [-L label] [--ignore-case]\n" + " [--no-ignore-case] [--normal] [--strip-trailing-cr] [--tabsize]\n" + " [-F pattern] -C number file1 file2\n" + " diff [-aBbdiltw] [-I pattern] [--ignore-case] [--no-ignore-case]\n" + " [--normal] [--strip-trailing-cr] [--tabsize] -D string file1 file2\n" + " diff [-aBbdilpTtw] [-I pattern] [-L label] [--ignore-case]\n" + " [--no-ignore-case] [--normal] [--tabsize] [--strip-trailing-cr]\n" + " [-F pattern] -U number file1 file2\n" + " diff [-aBbdilNPprsTtw] [-c | -e | -f | -n | -q | -u] [--ignore-case]\n" + " [--no-ignore-case] [--normal] [--tabsize] [-I pattern] [-L label]\n" + " [-F pattern] [-S name] [-X file] [-x pattern] dir1 dir2\n" + " diff [-aBbditwW] [--expand-tabs] [--ignore-all-blanks]\n" + " [--ignore-blank-lines] [--ignore-case] [--minimal]\n" + " [--no-ignore-file-name-case] [--strip-trailing-cr]\n" + " [--suppress-common-lines] [--tabsize] [--text] [--width]\n" + " -y | --side-by-side file1 file2\n" +#if defined(WIN32) + " diff [--help] [--version] [--license] [--usage]\n"); +#else + " diff [--help] [--version]\n"); +#endif + + if (help) + exit(0); + else + exit(2); +} + +static void +conflicting_format(void) +{ + + fprintf(stderr, "error: conflicting output format options.\n"); + usage(); +} + +static bool +do_color(void) +{ +#if !defined(WIN32) + const char *p, *p2; +#endif + + switch (colorflag) { + case COLORFLAG_AUTO: +#if defined(WIN32) + if (iscolorconsole()) + return true; +#else + p = getenv("CLICOLOR"); + p2 = getenv("COLORTERM"); + if ((p != NULL && *p != '\0') || (p2 != NULL && *p2 != '\0')) { + return (bool)isatty(STDOUT_FILENO); + } +#endif + break; + case COLORFLAG_ALWAYS: + return (true); + case COLORFLAG_NEVER: + return (false); + } + return (false); +} + +static char * +splice(char *dir, char *path) +{ + char *tail, *buf; + size_t dirlen; + + dirlen = strlen(dir); + while (dirlen != 0 && dir[dirlen - 1] == '/') + dirlen--; + if ((tail = strrchr(path, '/')) == NULL) + tail = path; + else + tail++; + xasprintf(&buf, "%.*s/%s", (int)dirlen, dir, tail); + return (buf); +} diff --git a/mcwin32/diff/diff.h b/mcwin32/diff/diff.h new file mode 100644 index 00000000..5cbef764 --- /dev/null +++ b/mcwin32/diff/diff.h @@ -0,0 +1,123 @@ +/* $OpenBSD: diff.h,v 1.34 2020/11/01 18:16:08 jcs Exp $ */ +#pragma once +/*- + * Copyright (c) 1991, 1993 + * The Regents of the University of California. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. Neither the name of the University nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#include + +#include "diffbool.h" +#include + +#if defined(WIN32) +#include "libcompat.h" +#endif + +/* + * Output format options + */ +#define D_NORMAL 0 /* Normal output */ +#define D_EDIT -1 /* Editor script out */ +#define D_REVERSE 1 /* Reverse editor script */ +#define D_CONTEXT 2 /* Diff with context */ +#define D_UNIFIED 3 /* Unified context diff */ +#define D_IFDEF 4 /* Diff with merged #ifdef's */ +#define D_NREVERSE 5 /* Reverse ed script with numbered + lines and no trailing . */ +#define D_BRIEF 6 /* Say if the files differ */ +#define D_GFORMAT 7 /* Diff with defined changed group format */ +#define D_SIDEBYSIDE 8 /* Side by side */ +#if defined(WIN32) +#define D_MC_FORMAT 9 /* mcdiff-format support */ +#endif + +#define D_UNSET -2 + + +/* + * Output flags + */ +#define D_HEADER 0x001 /* Print a header/footer between files */ +#define D_EMPTY1 0x002 /* Treat first file as empty (/dev/null) */ +#define D_EMPTY2 0x004 /* Treat second file as empty (/dev/null) */ + +/* + * Command line flags + */ +#define D_FORCEASCII 0x008 /* Treat file as ascii regardless of content */ +#define D_FOLDBLANKS 0x010 /* Treat all white space as equal */ +#define D_MINIMAL 0x020 /* Make diff as small as possible */ +#define D_IGNORECASE 0x040 /* Case-insensitive matching */ +#define D_PROTOTYPE 0x080 /* Display C function prototype */ +#define D_EXPANDTABS 0x100 /* Expand tabs to spaces */ +#define D_IGNOREBLANKS 0x200 /* Ignore white space changes */ +#define D_STRIPCR 0x400 /* Strip trailing cr */ +#define D_SKIPBLANKLINES 0x800 /* Skip blank lines */ +#define D_MATCHLAST 0x1000 /* Display last line matching provided regex */ + +/* + * Status values for print_status() and diffreg() return values + */ +#define D_SAME 0 /* Files are the same */ +#define D_DIFFER 1 /* Files are different */ +#define D_BINARY 2 /* Binary files are different */ +#define D_MISMATCH1 3 /* path1 was a dir, path2 a file */ +#define D_MISMATCH2 4 /* path1 was a file, path2 a dir */ +#define D_SKIPPED1 5 /* path1 was a special file */ +#define D_SKIPPED2 6 /* path2 was a special file */ +#define D_ERROR 7 /* A file access error occurred */ + +/* + * Color options + */ +#define COLORFLAG_NEVER 0 +#define COLORFLAG_AUTO 1 +#define COLORFLAG_ALWAYS 2 + +struct excludes { + char *pattern; + struct excludes *next; +}; + +extern bool lflag, Nflag, Pflag, rflag, sflag, Tflag, cflag; +extern bool ignore_file_case, suppress_common, color, noderef; +extern int diff_format, diff_context, status; +extern int tabsize, width; +extern char *start, *ifdefname, *diffargs, *label[2]; +extern char *ignore_pats, *most_recent_pat; +extern char *group_format; +extern const char *add_code, *del_code; +extern struct stat stb1, stb2; +extern struct excludes *excludes_list; +extern regex_t ignore_re, most_recent_re; + +int diffreg(char *, char *, int, int); +void diffdir(char *, char *, int); +void print_status(int, char *, char *, const char *); + +//end diff --git a/mcwin32/diff/diffbool.h b/mcwin32/diff/diffbool.h new file mode 100644 index 00000000..8724a315 --- /dev/null +++ b/mcwin32/diff/diffbool.h @@ -0,0 +1,15 @@ +#pragma once +/*- + * diff --- bool. + */ + +#if defined(WIN32) +typedef unsigned char bool; +#define true 1 +#define false 0 + +#else +#include +#endif + +//end diff --git a/mcwin32/diff/diffdir.c b/mcwin32/diff/diffdir.c new file mode 100644 index 00000000..af036224 --- /dev/null +++ b/mcwin32/diff/diffdir.c @@ -0,0 +1,320 @@ +/* $OpenBSD: diffdir.c,v 1.45 2015/10/05 20:15:00 millert Exp $ */ + +/* + * Copyright (c) 2003, 2010 Todd C. Miller + * + * Permission to use, copy, modify, and distribute this software for any + * purpose with or without fee is hereby granted, provided that the above + * copyright notice and this permission notice appear in all copies. + * + * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES + * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR + * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN + * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF + * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + * + * Sponsored in part by the Defense Advanced Research Projects + * Agency (DARPA) and Air Force Research Laboratory, Air Force + * Materiel Command, USAF, under agreement number F39502-99-1-0512. + */ + +#include +#include + +#if defined(WIN32) && !defined(WIN32_UNISTD_MAP) +#define WIN32_UNISTD_MAP 1 +#endif + +#include +#include +#include +#include +//#include +#include +#include +#include +#include +#include + +#include "diff.h" +#include "paths.h" + +static int selectfile(const struct dirent *); +static void diffit(struct dirent *, char *, size_t, struct dirent *, char *, size_t, int); +static void print_only(const char *, size_t, const char *); + +#define d_status d_type /* we need to store status for -l */ + +/* + * Diff directory traversal. Will be called recursively if -r was specified. + */ +void +diffdir(char *p1, char *p2, int flags) +{ + struct dirent *dent1, **dp1, **edp1, **dirp1 = NULL; + struct dirent *dent2, **dp2, **edp2, **dirp2 = NULL; + size_t dirlen1, dirlen2; + char path1[PATH_MAX], path2[PATH_MAX]; + int pos; + + edp1 = edp2 = NULL; + + dirlen1 = strlcpy(path1, *p1 ? p1 : ".", sizeof(path1)); + if (dirlen1 >= sizeof(path1) - 1) { + warnc(ENAMETOOLONG, "%s", p1); + status |= 2; + return; + } + if (path1[dirlen1 - 1] != '/') { + path1[dirlen1++] = '/'; + path1[dirlen1] = '\0'; + } + dirlen2 = strlcpy(path2, *p2 ? p2 : ".", sizeof(path2)); + if (dirlen2 >= sizeof(path2) - 1) { + warnc(ENAMETOOLONG, "%s", p2); + status |= 2; + return; + } + if (path2[dirlen2 - 1] != '/') { + path2[dirlen2++] = '/'; + path2[dirlen2] = '\0'; + } + + /* + * Get a list of entries in each directory, skipping "excluded" files + * and sorting alphabetically. + */ + pos = scandir(path1, &dirp1, selectfile, alphasort); + if (pos == -1) { + if (errno == ENOENT && (Nflag || Pflag)) { + pos = 0; + } else { + warn("%s", path1); + goto closem; + } + } + dp1 = dirp1; + edp1 = dirp1 + pos; + + pos = scandir(path2, &dirp2, selectfile, alphasort); + if (pos == -1) { + if (errno == ENOENT && Nflag) { + pos = 0; + } else { + warn("%s", path2); + goto closem; + } + } + dp2 = dirp2; + edp2 = dirp2 + pos; + + /* + * If we were given a starting point, find it. + */ + if (start != NULL) { + while (dp1 != edp1 && strcmp((*dp1)->d_name, start) < 0) + dp1++; + while (dp2 != edp2 && strcmp((*dp2)->d_name, start) < 0) + dp2++; + } + + /* + * Iterate through the two directory lists, diffing as we go. + */ + while (dp1 != edp1 || dp2 != edp2) { + dent1 = dp1 != edp1 ? *dp1 : NULL; + dent2 = dp2 != edp2 ? *dp2 : NULL; + + pos = dent1 == NULL ? 1 : dent2 == NULL ? -1 : + ignore_file_case ? strcasecmp(dent1->d_name, dent2->d_name) : + strcmp(dent1->d_name, dent2->d_name) ; + if (pos == 0) { + /* file exists in both dirs, diff it */ + diffit(dent1, path1, dirlen1, dent2, path2, dirlen2, flags); + dp1++; + dp2++; + } else if (pos < 0) { + /* file only in first dir, only diff if -N */ + if (Nflag) { + diffit(dent1, path1, dirlen1, dent2, path2, + dirlen2, flags); + } else { + print_only(path1, dirlen1, dent1->d_name); + status |= 1; + } + dp1++; + } else { + /* file only in second dir, only diff if -N or -P */ + if (Nflag || Pflag) + diffit(dent2, path1, dirlen1, dent1, path2, + dirlen2, flags); + else { + print_only(path2, dirlen2, dent2->d_name); + status |= 1; + } + dp2++; + } + } + +closem: + if (dirp1 != NULL) { + for (dp1 = dirp1; dp1 < edp1; dp1++) + free(*dp1); + free(dirp1); + } + if (dirp2 != NULL) { + for (dp2 = dirp2; dp2 < edp2; dp2++) + free(*dp2); + free(dirp2); + } +} + +/* + * Do the actual diff by calling either diffreg() or diffdir(). + */ +static void +diffit(struct dirent *dp, char *path1, size_t plen1, struct dirent *dp2, + char *path2, size_t plen2, int flags) +{ + flags |= D_HEADER; + strlcpy(path1 + plen1, dp->d_name, PATH_MAX - plen1); + + /* + * If we are ignoring file case, use dent2s name here if both names are + * the same apart from case. + */ + if (ignore_file_case && strcasecmp(dp2->d_name, dp2->d_name) == 0) + strlcpy(path2 + plen2, dp2->d_name, PATH_MAX - plen2); + else + strlcpy(path2 + plen2, dp->d_name, PATH_MAX - plen2); + + if (noderef) { + if (lstat(path1, &stb1) != 0) { + if (!(Nflag || Pflag) || errno != ENOENT) { + warn("%s", path1); + return; + } + flags |= D_EMPTY1; + memset(&stb1, 0, sizeof(stb1)); + } + + if (lstat(path2, &stb2) != 0) { + if (!Nflag || errno != ENOENT) { + warn("%s", path2); + return; + } + flags |= D_EMPTY2; + memset(&stb2, 0, sizeof(stb2)); + stb2.st_mode = stb1.st_mode; + } + if (stb1.st_mode == 0) + stb1.st_mode = stb2.st_mode; + if (S_ISLNK(stb1.st_mode) || S_ISLNK(stb2.st_mode)) { + if (S_ISLNK(stb1.st_mode) && S_ISLNK(stb2.st_mode)) { + char buf1[PATH_MAX]; + char buf2[PATH_MAX]; + ssize_t len1 = 0; + ssize_t len2 = 0; + + len1 = readlink(path1, buf1, sizeof(buf1)); + len2 = readlink(path2, buf2, sizeof(buf2)); + + if (len1 < 0 || len2 < 0) { + perror("reading links"); + return; + } + buf1[len1] = '\0'; + buf2[len2] = '\0'; + + if (len1 != len2 || strncmp(buf1, buf2, len1) != 0) { + printf("Symbolic links %s and %s differ\n", + path1, path2); + status |= 1; + } + + return; + } + + printf("File %s is a %s while file %s is a %s\n", + path1, S_ISLNK(stb1.st_mode) ? "symbolic link" : + (S_ISDIR(stb1.st_mode) ? "directory" : + (S_ISREG(stb1.st_mode) ? "file" : "error")), + path2, S_ISLNK(stb2.st_mode) ? "symbolic link" : + (S_ISDIR(stb2.st_mode) ? "directory" : + (S_ISREG(stb2.st_mode) ? "file" : "error"))); + status |= 1; + return; + } + } else { + if (stat(path1, &stb1) != 0) { + if (!(Nflag || Pflag) || errno != ENOENT) { + warn("%s", path1); + return; + } + flags |= D_EMPTY1; + memset(&stb1, 0, sizeof(stb1)); + } + + if (stat(path2, &stb2) != 0) { + if (!Nflag || errno != ENOENT) { + warn("%s", path2); + return; + } + flags |= D_EMPTY2; + memset(&stb2, 0, sizeof(stb2)); + stb2.st_mode = stb1.st_mode; + } + if (stb1.st_mode == 0) + stb1.st_mode = stb2.st_mode; + } + if (S_ISDIR(stb1.st_mode) && S_ISDIR(stb2.st_mode)) { + if (rflag) + diffdir(path1, path2, flags); + else + printf("Common subdirectories: %s and %s\n", + path1, path2); + return; + } + if (!S_ISREG(stb1.st_mode) && !S_ISDIR(stb1.st_mode)) + dp->d_status = D_SKIPPED1; + else if (!S_ISREG(stb2.st_mode) && !S_ISDIR(stb2.st_mode)) + dp->d_status = D_SKIPPED2; + else + dp->d_status = diffreg(path1, path2, flags, 0); + print_status(dp->d_status, path1, path2, ""); +} + +/* + * Returns 1 if the directory entry should be included in the + * diff, else 0. Checks the excludes list. + */ +static int +selectfile(const struct dirent *dp) +{ + struct excludes *excl; + + if (dp->d_fileno == 0) + return (0); + + /* always skip "." and ".." */ + if (dp->d_name[0] == '.' && (dp->d_name[1] == '\0' || + (dp->d_name[1] == '.' && dp->d_name[2] == '\0'))) + return (0); + + /* check excludes list */ + for (excl = excludes_list; excl != NULL; excl = excl->next) + if (fnmatch(excl->pattern, dp->d_name, FNM_PATHNAME) == 0) + return (0); + + return (1); +} + +void +print_only(const char *path, size_t dirlen, const char *entry) +{ + if (dirlen > 1) + dirlen--; + printf("Only in %.*s: %s\n", (int)dirlen, path, entry); +} diff --git a/mcwin32/diff/diffreg.c b/mcwin32/diff/diffreg.c new file mode 100644 index 00000000..25f5cd15 --- /dev/null +++ b/mcwin32/diff/diffreg.c @@ -0,0 +1,1740 @@ +/* $OpenBSD: diffreg.c,v 1.93 2019/06/28 13:35:00 deraadt Exp $ */ + +/*- + * SPDX-License-Identifier: BSD-4-Clause + * + * Copyright (C) Caldera International Inc. 2001-2002. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code and documentation must retain the above + * copyright notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. All advertising materials mentioning features or use of this software + * must display the following acknowledgement: + * This product includes software developed or owned by Caldera + * International, Inc. + * 4. Neither the name of Caldera International, Inc. nor the names of other + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * USE OF THE SOFTWARE PROVIDED FOR UNDER THIS LICENSE BY CALDERA + * INTERNATIONAL, INC. AND CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL CALDERA INTERNATIONAL, INC. BE LIABLE FOR ANY DIRECT, + * INDIRECT INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, + * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING + * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + */ +/*- + * Copyright (c) 1991, 1993 + * The Regents of the University of California. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. Neither the name of the University nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#if defined(WIN32) && !defined(WIN32_UNISTD_MAP) +#define WIN32_UNISTD_MAP 1 +#endif + +#if !defined(WIN32) +#include +#endif +#include + +#if !defined(WIN32) +#include +#endif +#include +#include +#include +#include +#include +//#include +#include +//#include +#include +#include +#include +#include +#include +#if defined(WIN32) +#include +#endif + +#if !defined(WIN32) +#include "pr.h" +#endif +#include "diff.h" +#include "xmalloc.h" +#include "paths.h" + + +/* + * diff - compare two files. + */ + +/* + * Uses an algorithm due to Harold Stone, which finds a pair of longest + * identical subsequences in the two files. + * + * The major goal is to generate the match vector J. J[i] is the index of + * the line in file1 corresponding to line i file0. J[i] = 0 if there is no + * such line in file1. + * + * Lines are hashed so as to work in core. All potential matches are + * located by sorting the lines of each file on the hash (called + * ``value''). In particular, this collects the equivalence classes in + * file1 together. Subroutine equiv replaces the value of each line in + * file0 by the index of the first element of its matching equivalence in + * (the reordered) file1. To save space equiv squeezes file1 into a single + * array member in which the equivalence classes are simply concatenated, + * except that their first members are flagged by changing sign. + * + * Next the indices that point into member are unsorted into array class + * according to the original order of file0. + * + * The cleverness lies in routine stone. This marches through the lines of + * file0, developing a vector klist of "k-candidates". At step i + * a k-candidate is a matched pair of lines x,y (x in file0 y in file1) + * such that there is a common subsequence of length k between the first + * i lines of file0 and the first y lines of file1, but there is no such + * subsequence for any smaller y. x is the earliest possible mate to y that + * occurs in such a subsequence. + * + * Whenever any of the members of the equivalence class of lines in file1 + * matable to a line in file0 has serial number less than the y of some + * k-candidate, that k-candidate with the smallest such y is replaced. The + * new k-candidate is chained (via pred) to the current k-1 candidate so + * that the actual subsequence can be recovered. When a member has serial + * number greater that the y of all k-candidates, the klist is extended. At + * the end, the longest subsequence is pulled out and placed in the array J + * by unravel. + * + * With J in hand, the matches there recorded are check'ed against reality + * to assure that no spurious matches have crept in due to hashing. If they + * have, they are broken, and "jackpot" is recorded -- a harmless matter + * except that a true match for a spuriously mated line may now be + * unnecessarily reported as a change. + * + * Much of the complexity of the program comes simply from trying to + * minimize core utilization and maximize the range of doable problems by + * dynamically allocating what is needed and reusing what is not. The core + * requirements for problems larger than somewhat are (in words) + * 2*length(file0) + length(file1) + 3*(number of k-candidates installed), + * typically about 6n words for files of length n. + */ + +struct cand { + int x; + int y; + int pred; +}; + +static struct line { + int serial; + int value; +} *file[2]; + +/* + * The following struct is used to record change information when + * doing a "context" or "unified" diff. (see routine "change" to + * understand the highly mnemonic field names) + */ +struct context_vec { + int a; /* start line in old file */ + int b; /* end line in old file */ + int c; /* start line in new file */ + int d; /* end line in new file */ +}; + +enum readhash { RH_BINARY, RH_OK, RH_EOF }; + +#define MIN_PAD 1 +static FILE *opentemp(const char *); +static void output(char *, FILE *, char *, FILE *, int); +static void check(FILE *, FILE *, int); +static void range(int, int, const char *); +static void uni_range(int, int); +static void dump_context_vec(FILE *, FILE *, int); +static void dump_unified_vec(FILE *, FILE *, int); +static bool prepare(int, FILE *, size_t, int); +static void prune(void); +static void equiv(struct line *, int, struct line *, int, int *); +static void unravel(int); +static void unsort(struct line *, int, int *); +static void change(char *, FILE *, char *, FILE *, int, int, int, int, int *); +static void sort(struct line *, int); +static void print_header(const char *, const char *); +static void print_space(int, int, int); +static bool ignoreline_pattern(char *); +static bool ignoreline(char *, bool); +static int asciifile(FILE *); +static int fetch(long *, int, int, FILE *, int, int, int); +static int newcand(int, int, int); +static int search(int *, int, int); +static int skipline(FILE *); +static int stone(int *, int, int *, int *, int); +static enum readhash readhash(FILE *, int, unsigned *); +static int files_differ(FILE *, FILE *, int); +static char *match_function(const long *, int, FILE *); +static char *preadline(int, size_t, off_t); + +static int *J; /* will be overlaid on class */ +static int *class; /* will be overlaid on file[0] */ +static int *klist; /* will be overlaid on file[0] after class */ +static int *member; /* will be overlaid on file[1] */ +static int clen; +static int inifdef; /* whether or not we are in a #ifdef block */ +static int len[2]; +static int pref, suff; /* length of prefix and suffix */ +static int slen[2]; +static int anychange; +static int hw, padding; /* half width and padding */ +static int edoffset; +static long *ixnew; /* will be overlaid on file[1] */ +static long *ixold; /* will be overlaid on klist */ +static struct cand *clist; /* merely a free storage pot for candidates */ +static int clistlen; /* the length of clist */ +static struct line *sfile[2]; /* shortened by pruning common prefix/suffix */ +static int (*chrtran)(int); /* translation table for case-folding */ +static struct context_vec *context_vec_start; +static struct context_vec *context_vec_end; +static struct context_vec *context_vec_ptr; + +#define FUNCTION_CONTEXT_SIZE 55 +static char lastbuf[FUNCTION_CONTEXT_SIZE]; +static int lastline; +static int lastmatchline; + +#if defined(WIN32) +static FILE * +fopen_binary(const char *path, const char *mode) +{ + if ('r' == mode[0]) + return fopen(path, "rb"); + if ('w' == mode[0]) + return fopen(path, "wb"); + return NULL; +} + +#define fopen(__a,__b) fopen_binary(__a,__b) +#endif + +static int +clow2low(int c) +{ + + return (c); +} + +static int +cup2low(int c) +{ + + return (tolower(c)); +} + +int +diffreg(char *file1, char *file2, int flags, int capsicum) +{ + FILE *f1, *f2; + int i, rval; +#if !defined(WIN32) + struct pr *pr = NULL; + cap_rights_t rights_ro; +#endif + + f1 = f2 = NULL; + rval = D_SAME; + anychange = 0; + lastline = 0; + lastmatchline = 0; + +#if defined(WIN32) + (void) capsicum; +#endif + + /* + * hw excludes padding and make sure when -t is not used, + * the second column always starts from the closest tab stop + */ + if (diff_format == D_SIDEBYSIDE) { + hw = width >> 1; + padding = tabsize - (hw % tabsize); + if ((flags & D_EXPANDTABS) != 0 || (padding % tabsize == 0)) + padding = MIN_PAD; + + hw = (width >> 1) - + ((padding == MIN_PAD) ? (padding << 1) : padding) - 1; + } + + if (flags & D_IGNORECASE) + chrtran = cup2low; + else + chrtran = clow2low; + if (S_ISDIR(stb1.st_mode) != S_ISDIR(stb2.st_mode)) + return (S_ISDIR(stb1.st_mode) ? D_MISMATCH1 : D_MISMATCH2); + if (strcmp(file1, "-") == 0 && strcmp(file2, "-") == 0) + goto closem; + + if (flags & D_EMPTY1) + f1 = fopen(_PATH_DEVNULL, "r"); + else { + if (!S_ISREG(stb1.st_mode)) { + if ((f1 = opentemp(file1)) == NULL || + fstat(fileno(f1), &stb1) == -1) { + warn("%s", file1); + rval = D_ERROR; + status |= 2; + goto closem; + } + } else if (strcmp(file1, "-") == 0) { + f1 = stdin; + } else { + f1 = fopen(file1, "r"); + } + } + if (f1 == NULL) { + warn("%s", file1); + rval = D_ERROR; + status |= 2; + goto closem; + } + + if (flags & D_EMPTY2) + f2 = fopen(_PATH_DEVNULL, "r"); + else { + if (!S_ISREG(stb2.st_mode)) { + if ((f2 = opentemp(file2)) == NULL || + fstat(fileno(f2), &stb2) == -1) { + warn("%s", file2); + rval = D_ERROR; + status |= 2; + goto closem; + } + } else if (strcmp(file2, "-") == 0) { + f2 = stdin; + } else { + f2 = fopen(file2, "r"); + } + } + if (f2 == NULL) { + warn("%s", file2); + rval = D_ERROR; + status |= 2; + goto closem; + } + +#if !defined(WIN32) + if (lflag) + pr = start_pr(file1, file2); +#endif + +#if !defined(WIN32) + if (capsicum) { + cap_rights_init(&rights_ro, CAP_READ, CAP_FSTAT, CAP_SEEK); + if (caph_rights_limit(fileno(f1), &rights_ro) < 0) + err(2, "unable to limit rights on: %s", file1); + if (caph_rights_limit(fileno(f2), &rights_ro) < 0) + err(2, "unable to limit rights on: %s", file2); + if (fileno(f1) == STDIN_FILENO || fileno(f2) == STDIN_FILENO) { + /* stdin has already been limited */ + if (caph_limit_stderr() == -1) + err(2, "unable to limit stderr"); + if (caph_limit_stdout() == -1) + err(2, "unable to limit stdout"); + } else if (caph_limit_stdio() == -1) + err(2, "unable to limit stdio"); + + caph_cache_catpages(); + caph_cache_tzdata(); + if (caph_enter() < 0) + err(2, "unable to enter capability mode"); + } +#endif + + switch (files_differ(f1, f2, flags)) { + case 0: + goto closem; + case 1: + break; + default: + /* error */ + rval = D_ERROR; + status |= 2; + goto closem; + } + + if (diff_format == D_BRIEF && ignore_pats == NULL && + (flags & (D_FOLDBLANKS|D_IGNOREBLANKS|D_IGNORECASE|D_STRIPCR)) == 0) + { + rval = D_DIFFER; + status |= 1; + goto closem; + } + if ((flags & D_FORCEASCII) != 0) { + (void)prepare(0, f1, stb1.st_size, flags); + (void)prepare(1, f2, stb2.st_size, flags); + } else if (!asciifile(f1) || !asciifile(f2) || + !prepare(0, f1, stb1.st_size, flags) || + !prepare(1, f2, stb2.st_size, flags)) { + rval = D_BINARY; + status |= 1; + goto closem; + } + + prune(); + sort(sfile[0], slen[0]); + sort(sfile[1], slen[1]); + + member = (int *)file[1]; + equiv(sfile[0], slen[0], sfile[1], slen[1], member); + member = xreallocarray(member, slen[1] + 2, sizeof(*member)); + + class = (int *)file[0]; + unsort(sfile[0], slen[0], class); + class = xreallocarray(class, slen[0] + 2, sizeof(*class)); + + klist = xcalloc(slen[0] + 2, sizeof(*klist)); + clen = 0; + clistlen = 100; + clist = xcalloc(clistlen, sizeof(*clist)); + i = stone(class, slen[0], member, klist, flags); + free(member); + free(class); + + J = xreallocarray(J, len[0] + 2, sizeof(*J)); + unravel(klist[i]); + free(clist); + free(klist); + + ixold = xreallocarray(ixold, len[0] + 2, sizeof(*ixold)); + ixnew = xreallocarray(ixnew, len[1] + 2, sizeof(*ixnew)); + check(f1, f2, flags); + output(file1, f1, file2, f2, flags); + +closem: +#if !defined(WIN32) + if (pr != NULL) + stop_pr(pr); +#endif + if (anychange) { + status |= 1; + if (rval == D_SAME) + rval = D_DIFFER; + } + if (f1 != NULL) + fclose(f1); + if (f2 != NULL) + fclose(f2); + + return (rval); +} + +/* + * Check to see if the given files differ. + * Returns 0 if they are the same, 1 if different, and -1 on error. + * XXX - could use code from cmp(1) [faster] + */ +static int +files_differ(FILE *f1, FILE *f2, int flags) +{ + char buf1[BUFSIZ], buf2[BUFSIZ]; + size_t i, j; + + if ((flags & (D_EMPTY1|D_EMPTY2)) || stb1.st_size != stb2.st_size || + (stb1.st_mode & S_IFMT) != (stb2.st_mode & S_IFMT)) + return (1); + + if (stb1.st_dev == stb2.st_dev && stb1.st_ino == stb2.st_ino) + return (0); + + for (;;) { + i = fread(buf1, 1, sizeof(buf1), f1); + j = fread(buf2, 1, sizeof(buf2), f2); + if ((!i && ferror(f1)) || (!j && ferror(f2))) + return (-1); + if (i != j) + return (1); + if (i == 0) + return (0); + if (memcmp(buf1, buf2, i) != 0) + return (1); + } +} + +static FILE * +opentemp(const char *f) +{ + char buf[BUFSIZ], tempfile[PATH_MAX]; + ssize_t nread; + int ifd, ofd; + + if (strcmp(f, "-") == 0) + ifd = STDIN_FILENO; +#if defined(WIN32) + else if ((ifd = open(f, O_RDONLY|O_BINARY, 0644)) == -1) +#else + else if ((ifd = open(f, O_RDONLY, 0644)) == -1) +#endif + return (NULL); + + (void)strlcpy(tempfile, _PATH_TMP "/diff.XXXXXXXX", sizeof(tempfile)); + + if ((ofd = mkstemp(tempfile)) == -1) { + close(ifd); + return (NULL); + } + unlink(tempfile); + while ((nread = read(ifd, buf, BUFSIZ)) > 0) { + if (write(ofd, buf, nread) != nread) { + close(ifd); + close(ofd); + return (NULL); + } + } + close(ifd); + lseek(ofd, (off_t)0, SEEK_SET); + return (fdopen(ofd, "r")); +} + +static bool +prepare(int i, FILE *fd, size_t filesize, int flags) +{ + struct line *p; + unsigned h; + size_t sz, j = 0; + enum readhash r; + + rewind(fd); + + sz = MIN(filesize, SIZE_MAX) / 25; + if (sz < 100) + sz = 100; + + p = xcalloc(sz + 3, sizeof(*p)); + while ((r = readhash(fd, flags, &h)) != RH_EOF) + switch (r) { + case RH_EOF: /* otherwise clang complains */ + case RH_BINARY: + return (false); + case RH_OK: + if (j == sz) { + sz = sz * 3 / 2; + p = xreallocarray(p, sz + 3, sizeof(*p)); + } + p[++j].value = h; + } + + len[i] = j; + file[i] = p; + + return (true); +} + +static void +prune(void) +{ + int i, j; + + for (pref = 0; pref < len[0] && pref < len[1] && + file[0][pref + 1].value == file[1][pref + 1].value; + pref++) + ; + for (suff = 0; suff < len[0] - pref && suff < len[1] - pref && + file[0][len[0] - suff].value == file[1][len[1] - suff].value; + suff++) + ; + for (j = 0; j < 2; j++) { + sfile[j] = file[j] + pref; + slen[j] = len[j] - pref - suff; + for (i = 0; i <= slen[j]; i++) + sfile[j][i].serial = i; + } +} + +static void +equiv(struct line *a, int n, struct line *b, int m, int *c) +{ + int i, j; + + i = j = 1; + while (i <= n && j <= m) { + if (a[i].value < b[j].value) + a[i++].value = 0; + else if (a[i].value == b[j].value) + a[i++].value = j; + else + j++; + } + while (i <= n) + a[i++].value = 0; + b[m + 1].value = 0; + j = 0; + while (++j <= m) { + c[j] = -b[j].serial; + while (b[j + 1].value == b[j].value) { + j++; + c[j] = b[j].serial; + } + } + c[j] = -1; +} + +static int +stone(int *a, int n, int *b, int *c, int flags) +{ + int i, k, y, j, l; + int oldc, tc, oldl, sq; + unsigned numtries, bound; + + if (flags & D_MINIMAL) + bound = UINT_MAX; + else { + sq = (int)sqrt(n); + bound = MAX(256, sq); + } + + k = 0; + c[0] = newcand(0, 0, 0); + for (i = 1; i <= n; i++) { + j = a[i]; + if (j == 0) + continue; + y = -b[j]; + oldl = 0; + oldc = c[0]; + numtries = 0; + do { + if (y <= clist[oldc].y) + continue; + l = search(c, k, y); + if (l != oldl + 1) + oldc = c[l - 1]; + if (l <= k) { + if (clist[c[l]].y <= y) + continue; + tc = c[l]; + c[l] = newcand(i, y, oldc); + oldc = tc; + oldl = l; + numtries++; + } else { + c[l] = newcand(i, y, oldc); + k++; + break; + } + } while ((y = b[++j]) > 0 && numtries < bound); + } + return (k); +} + +static int +newcand(int x, int y, int pred) +{ + struct cand *q; + + if (clen == clistlen) { + clistlen = clistlen * 11 / 10; + clist = xreallocarray(clist, clistlen, sizeof(*clist)); + } + q = clist + clen; + q->x = x; + q->y = y; + q->pred = pred; + return (clen++); +} + +static int +search(int *c, int k, int y) +{ + int i, j, l, t; + + if (clist[c[k]].y < y) /* quick look for typical case */ + return (k + 1); + i = 0; + j = k + 1; + for (;;) { + l = (i + j) / 2; + if (l <= i) + break; + t = clist[c[l]].y; + if (t > y) + j = l; + else if (t < y) + i = l; + else + return (l); + } + return (l + 1); +} + +static void +unravel(int p) +{ + struct cand *q; + int i; + + for (i = 0; i <= len[0]; i++) + J[i] = i <= pref ? i : + i > len[0] - suff ? i + len[1] - len[0] : 0; + for (q = clist + p; q->y != 0; q = clist + q->pred) + J[q->x + pref] = q->y + pref; +} + +/* + * Check does double duty: + * 1. ferret out any fortuitous correspondences due to confounding by + * hashing (which result in "jackpot") + * 2. collect random access indexes to the two files + */ +static void +check(FILE *f1, FILE *f2, int flags) +{ + int i, j, /* jackpot, */ c, d; + long ctold, ctnew; + + rewind(f1); + rewind(f2); + j = 1; + ixold[0] = ixnew[0] = 0; + /* jackpot = 0; */ + ctold = ctnew = 0; + for (i = 1; i <= len[0]; i++) { + if (J[i] == 0) { + ixold[i] = ctold += skipline(f1); + continue; + } + while (j < J[i]) { + ixnew[j] = ctnew += skipline(f2); + j++; + } + if (flags & (D_FOLDBLANKS | D_IGNOREBLANKS | D_IGNORECASE | D_STRIPCR)) { + for (;;) { + c = getc(f1); + d = getc(f2); + /* + * GNU diff ignores a missing newline + * in one file for -b or -w. + */ + if (flags & (D_FOLDBLANKS | D_IGNOREBLANKS)) { + if (c == EOF && d == '\n') { + ctnew++; + break; + } else if (c == '\n' && d == EOF) { + ctold++; + break; + } + } + ctold++; + ctnew++; + if (flags & D_STRIPCR && (c == '\r' || d == '\r')) { + if (c == '\r') { + if ((c = getc(f1)) == '\n') { + ctold++; + } else { + ungetc(c, f1); + } + } + if (d == '\r') { + if ((d = getc(f2)) == '\n') { + ctnew++; + } else { + ungetc(d, f2); + } + } + break; + } + if ((flags & D_FOLDBLANKS) && isspace(c) && + isspace(d)) { + do { + if (c == '\n') + break; + ctold++; + } while (isspace(c = getc(f1))); + do { + if (d == '\n') + break; + ctnew++; + } while (isspace(d = getc(f2))); + } else if (flags & D_IGNOREBLANKS) { + while (isspace(c) && c != '\n') { + c = getc(f1); + ctold++; + } + while (isspace(d) && d != '\n') { + d = getc(f2); + ctnew++; + } + } + if (chrtran(c) != chrtran(d)) { + /* jackpot++; */ + J[i] = 0; + if (c != '\n' && c != EOF) + ctold += skipline(f1); + if (d != '\n' && c != EOF) + ctnew += skipline(f2); + break; + } + if (c == '\n' || c == EOF) + break; + } + } else { + for (;;) { + ctold++; + ctnew++; + if ((c = getc(f1)) != (d = getc(f2))) { + /* jackpot++; */ + J[i] = 0; + if (c != '\n' && c != EOF) + ctold += skipline(f1); + if (d != '\n' && c != EOF) + ctnew += skipline(f2); + break; + } + if (c == '\n' || c == EOF) + break; + } + } + ixold[i] = ctold; + ixnew[j] = ctnew; + j++; + } + for (; j <= len[1]; j++) { + ixnew[j] = ctnew += skipline(f2); + } + /* + * if (jackpot) + * fprintf(stderr, "jackpot\n"); + */ +} + +/* shellsort CACM #201 */ +static void +sort(struct line *a, int n) +{ + struct line *ai, *aim, w; + int j, m = 0, k; + + if (n == 0) + return; + for (j = 1; j <= n; j *= 2) + m = 2 * j - 1; + for (m /= 2; m != 0; m /= 2) { + k = n - m; + for (j = 1; j <= k; j++) { + for (ai = &a[j]; ai > a; ai -= m) { + aim = &ai[m]; + if (aim < ai) + break; /* wraparound */ + if (aim->value > ai[0].value || + (aim->value == ai[0].value && + aim->serial > ai[0].serial)) + break; + w.value = ai[0].value; + ai[0].value = aim->value; + aim->value = w.value; + w.serial = ai[0].serial; + ai[0].serial = aim->serial; + aim->serial = w.serial; + } + } + } +} + +static void +unsort(struct line *f, int l, int *b) +{ + int *a, i; + + a = xcalloc(l + 1, sizeof(*a)); + for (i = 1; i <= l; i++) + a[f[i].serial] = f[i].value; + for (i = 1; i <= l; i++) + b[i] = a[i]; + free(a); +} + +static int +skipline(FILE *f) +{ + int i, c; + + for (i = 1; (c = getc(f)) != '\n' && c != EOF; i++) + continue; + return (i); +} + +static void +output(char *file1, FILE *f1, char *file2, FILE *f2, int flags) +{ + int i, j, m, i0, i1, j0, j1, nc; + + rewind(f1); + rewind(f2); + m = len[0]; + J[0] = 0; + J[m + 1] = len[1] + 1; + if (diff_format != D_EDIT) { + for (i0 = 1; i0 <= m; i0 = i1 + 1) { + while (i0 <= m && J[i0] == J[i0 - 1] + 1) { + if (diff_format == D_SIDEBYSIDE && suppress_common != 1) { + nc = fetch(ixold, i0, i0, f1, '\0', 1, flags); + print_space(nc, (hw - nc) + (padding << 1) + 1, flags); + fetch(ixnew, J[i0], J[i0], f2, '\0', 0, flags); + printf("\n"); + } + i0++; + } + j0 = J[i0 - 1] + 1; + i1 = i0 - 1; + while (i1 < m && J[i1 + 1] == 0) + i1++; + j1 = J[i1 + 1] - 1; + J[i1] = j1; + + /* + * When using side-by-side, lines from both of the files are + * printed. The algorithm used by diff(1) identifies the ranges + * in which two files differ. + * See the change() function below. + * The for loop below consumes the shorter range, whereas one of + * the while loops deals with the longer one. + */ + if (diff_format == D_SIDEBYSIDE) { + for (i = i0, j = j0; i <= i1 && j <= j1; i++, j++) + change(file1, f1, file2, f2, i, i, j, j, &flags); + + while (i <= i1) { + change(file1, f1, file2, f2, i, i, j + 1, j, &flags); + i++; + } + + while (j <= j1) { + change(file1, f1, file2, f2, i + 1, i, j, j, &flags); + j++; + } + } else + change(file1, f1, file2, f2, i0, i1, j0, j1, &flags); + } + } else { + for (i0 = m; i0 >= 1; i0 = i1 - 1) { + while (i0 >= 1 && J[i0] == J[i0 + 1] - 1 && J[i0] != 0) + i0--; + j0 = J[i0 + 1] - 1; + i1 = i0 + 1; + while (i1 > 1 && J[i1 - 1] == 0) + i1--; + j1 = J[i1 - 1] + 1; + J[i1] = j1; + change(file1, f1, file2, f2, i1, i0, j1, j0, &flags); + } + } + if (m == 0) + change(file1, f1, file2, f2, 1, 0, 1, len[1], &flags); + if (diff_format == D_IFDEF || diff_format == D_GFORMAT) { + for (;;) { +#define c i0 + if ((c = getc(f1)) == EOF) + return; + printf("%c", c); + } +#undef c + } + if (anychange != 0) { + if (diff_format == D_CONTEXT) + dump_context_vec(f1, f2, flags); + else if (diff_format == D_UNIFIED) + dump_unified_vec(f1, f2, flags); + } +} + +static void +range(int a, int b, const char *separator) +{ + printf("%d", a > b ? b : a); + if (a < b) + printf("%s%d", separator, b); +} + +static void +uni_range(int a, int b) +{ + if (a < b) + printf("%d,%d", a, b - a + 1); + else if (a == b) + printf("%d", b); + else + printf("%d,0", b); +} + +static char * +preadline(int fd, size_t rlen, off_t off) +{ + char *line; + ssize_t nr; + + line = xmalloc(rlen + 1); + if ((nr = pread(fd, line, rlen, off)) == -1) + err(2, "preadline"); + if (nr > 0 && line[nr-1] == '\n') + nr--; + line[nr] = '\0'; + return (line); +} + +static bool +ignoreline_pattern(char *line) +{ + int ret; + + ret = regexec(&ignore_re, line, 0, NULL, 0); + return (ret == 0); /* if it matched, it should be ignored. */ +} + +static bool +ignoreline(char *line, bool skip_blanks) +{ + + if (skip_blanks && *line == '\0') + return (true); + if (ignore_pats != NULL && ignoreline_pattern(line)) + return (true); + return (false); +} + +/* + * Indicate that there is a difference between lines a and b of the from file + * to get to lines c to d of the to file. If a is greater then b then there + * are no lines in the from file involved and this means that there were + * lines appended (beginning at b). If c is greater than d then there are + * lines missing from the to file. + */ +static void +change(char *file1, FILE *f1, char *file2, FILE *f2, int a, int b, int c, int d, int *pflags) +{ + static size_t max_context = 64; + long curpos; + int i, nc; + const char *walk; + bool skip_blanks, ignore; + + skip_blanks = (bool)(*pflags & D_SKIPBLANKLINES); +restart: + if ((diff_format != D_IFDEF || diff_format == D_GFORMAT) && + a > b && c > d) + return; + if (ignore_pats != NULL || skip_blanks) { + char *line; + /* + * All lines in the change, insert, or delete must match an ignore + * pattern for the change to be ignored. + */ + if (a <= b) { /* Changes and deletes. */ + for (i = a; i <= b; i++) { + line = preadline(fileno(f1), + ixold[i] - ixold[i - 1], ixold[i - 1]); + ignore = ignoreline(line, skip_blanks); + free(line); + if (!ignore) + goto proceed; + } + } + if (a > b || c <= d) { /* Changes and inserts. */ + for (i = c; i <= d; i++) { + line = preadline(fileno(f2), + ixnew[i] - ixnew[i - 1], ixnew[i - 1]); + ignore = ignoreline(line, skip_blanks); + free(line); + if (!ignore) + goto proceed; + } + } + return; + } +proceed: + if (*pflags & D_HEADER && diff_format != D_BRIEF) { + printf("%s %s %s\n", diffargs, file1, file2); + *pflags &= ~D_HEADER; + } + if (diff_format == D_CONTEXT || diff_format == D_UNIFIED) { + /* + * Allocate change records as needed. + */ + if (context_vec_start == NULL || + context_vec_ptr == context_vec_end - 1) { + ptrdiff_t offset = -1; + + if (context_vec_start != NULL) + offset = context_vec_ptr - context_vec_start; + max_context <<= 1; + context_vec_start = xreallocarray(context_vec_start, + max_context, sizeof(*context_vec_start)); + context_vec_end = context_vec_start + max_context; + context_vec_ptr = context_vec_start + offset; + } + if (anychange == 0) { + /* + * Print the context/unidiff header first time through. + */ + print_header(file1, file2); + anychange = 1; + } else if (a > context_vec_ptr->b + (2 * diff_context) + 1 && + c > context_vec_ptr->d + (2 * diff_context) + 1) { + /* + * If this change is more than 'diff_context' lines from the + * previous change, dump the record and reset it. + */ + if (diff_format == D_CONTEXT) + dump_context_vec(f1, f2, *pflags); + else + dump_unified_vec(f1, f2, *pflags); + } + context_vec_ptr++; + context_vec_ptr->a = a; + context_vec_ptr->b = b; + context_vec_ptr->c = c; + context_vec_ptr->d = d; + return; + } + if (anychange == 0) + anychange = 1; + switch (diff_format) { + case D_BRIEF: + return; + case D_NORMAL: + case D_EDIT: + range(a, b, ","); + printf("%c", a > b ? 'a' : c > d ? 'd' : 'c'); + if (diff_format == D_NORMAL) + range(c, d, ","); + printf("\n"); + break; + case D_REVERSE: + printf("%c", a > b ? 'a' : c > d ? 'd' : 'c'); + range(a, b, " "); + printf("\n"); + break; + case D_NREVERSE: + if (a > b) + printf("a%d %d\n", b, d - c + 1); + else { + printf("d%d %d\n", a, b - a + 1); + if (!(c > d)) + /* add changed lines */ + printf("a%d %d\n", b, d - c + 1); + } + break; + } + if (diff_format == D_GFORMAT) { + curpos = ftell(f1); + /* print through if append (a>b), else to (nb: 0 vs 1 orig) */ + nc = ixold[a > b ? b : a - 1] - curpos; + for (i = 0; i < nc; i++) + printf("%c", getc(f1)); + for (walk = group_format; *walk != '\0'; walk++) { + if (*walk == '%') { + walk++; + switch (*walk) { + case '<': + fetch(ixold, a, b, f1, '<', 1, *pflags); + break; + case '>': + fetch(ixnew, c, d, f2, '>', 0, *pflags); + break; + default: + printf("%%%c", *walk); + break; + } + continue; + } + printf("%c", *walk); + } + } + if (diff_format == D_MC_FORMAT) { + /* standard format, without content */ + range(a, b, ","); + printf("%c", a > b ? 'a' : c > d ? 'd' : 'c'); + range(c, d, ","); + printf("\n"); + } + if (diff_format == D_SIDEBYSIDE) { + if (color && a > b) + printf("\033[%sm", add_code); + else if (color && c > d) + printf("\033[%sm", del_code); + if (a > b) { + print_space(0, hw + padding , *pflags); + } else { + nc = fetch(ixold, a, b, f1, '\0', 1, *pflags); + print_space(nc, hw - nc + padding, *pflags); + } + if (color && a > b) + printf("\033[%sm", add_code); + else if (color && c > d) + printf("\033[%sm", del_code); + printf("%c", (a > b) ? '>' : ((c > d) ? '<' : '|')); + if (color && c > d) + printf("\033[m"); + print_space(hw + padding + 1 , padding, *pflags); + fetch(ixnew, c, d, f2, '\0', 0, *pflags); + printf("\n"); + } + if (diff_format == D_NORMAL || diff_format == D_IFDEF) { + fetch(ixold, a, b, f1, '<', 1, *pflags); + if (a <= b && c <= d && diff_format == D_NORMAL) + printf("---\n"); + } + if (diff_format != D_GFORMAT && diff_format != D_SIDEBYSIDE && diff_format != D_MC_FORMAT) + fetch(ixnew, c, d, f2, diff_format == D_NORMAL ? '>' : '\0', 0, *pflags); + if (edoffset != 0 && diff_format == D_EDIT) { + /* + * A non-zero edoffset value for D_EDIT indicates that the last line + * printed was a bare dot (".") that has been escaped as ".." to + * prevent ed(1) from misinterpreting it. We have to add a + * substitute command to change this back and restart where we left + * off. + */ + printf(".\n"); + printf("%ds/.//\n", a + edoffset - 1); + b = a + edoffset - 1; + a = b + 1; + c += edoffset; + goto restart; + } + if ((diff_format == D_EDIT || diff_format == D_REVERSE) && c <= d) + printf(".\n"); + if (inifdef) { + printf("#endif /* %s */\n", ifdefname); + inifdef = 0; + } +} + +static int +fetch(long *f, int a, int b, FILE *lb, int ch, int oldfile, int flags) +{ + int i, j, c, lastc, col = 0, nc, newcol; + + edoffset = 0; + nc = 0; + /* + * When doing #ifdef's, copy down to current line + * if this is the first file, so that stuff makes it to output. + */ + if ((diff_format == D_IFDEF) && oldfile) { + long curpos = ftell(lb); + /* print through if append (a>b), else to (nb: 0 vs 1 orig) */ + nc = f[a > b ? b : a - 1] - curpos; + for (i = 0; i < nc; i++) + printf("%c", getc(lb)); + } + if (a > b) + return (0); + if (diff_format == D_IFDEF) { + if (inifdef) { + printf("#else /* %s%s */\n", + oldfile == 1 ? "!" : "", ifdefname); + } else { + if (oldfile) + printf("#ifndef %s\n", ifdefname); + else + printf("#ifdef %s\n", ifdefname); + } + inifdef = 1 + oldfile; + } + for (i = a; i <= b; i++) { + fseek(lb, f[i - 1], SEEK_SET); + nc = f[i] - f[i - 1]; + if (diff_format == D_SIDEBYSIDE && hw < nc) + nc = hw; + if (diff_format != D_IFDEF && diff_format != D_GFORMAT && + ch != '\0') { + if (color && (ch == '>' || ch == '+')) + printf("\033[%sm", add_code); + else if (color && (ch == '<' || ch == '-')) + printf("\033[%sm", del_code); + printf("%c", ch); + if (Tflag && (diff_format == D_NORMAL || + diff_format == D_CONTEXT || + diff_format == D_UNIFIED)) + printf("\t"); + else if (diff_format != D_UNIFIED) + printf(" "); + } + col = j = 0; + lastc = '\0'; + while (j < nc && (hw == 0 || col < hw)) { + c = getc(lb); + if (flags & D_STRIPCR && c == '\r') { + if ((c = getc(lb)) == '\n') + j++; + else { + ungetc(c, lb); + c = '\r'; + } + } + if (c == EOF) { + if (diff_format == D_EDIT || + diff_format == D_REVERSE || + diff_format == D_NREVERSE) + warnx("No newline at end of file"); + else + printf("\n\\ No newline at end of file\n"); + return (col); + } + /* + * when using --side-by-side, col needs to be increased + * in any case to keep the columns aligned + */ + if (c == '\t') { + if (flags & D_EXPANDTABS) { + newcol = ((col / tabsize) + 1) * tabsize; + do { + printf(" "); + } while (++col < newcol && col < hw); + } else { + if (diff_format == D_SIDEBYSIDE) { + if ((col + tabsize) > hw) { + printf("%*s", hw - col, ""); + col = hw; + } else { + printf("\t"); + col += tabsize - 1; + } + } else { + printf("\t"); + col++; + } + } + } else { + if (diff_format == D_EDIT && j == 1 && c == '\n' && + lastc == '.') { + /* + * Don't print a bare "." line since that will confuse + * ed(1). Print ".." instead and set the, global variable + * edoffset to an offset from which to restart. The + * caller must check the value of edoffset + */ + printf(".\n"); + edoffset = i - a + 1; + return (edoffset); + } + /* when side-by-side, do not print a newline */ + if (diff_format != D_SIDEBYSIDE || c != '\n') { + if (color && c == '\n') + printf("\033[m%c", c); + else + printf("%c", c); + col++; + } + } + + j++; + lastc = c; + } + } + if (color && diff_format == D_SIDEBYSIDE) + printf("\033[m"); + return (col); +} + +/* + * Hash function taken from Robert Sedgewick, Algorithms in C, 3d ed., p 578. + */ +static enum readhash +readhash(FILE *f, int flags, unsigned *hash) +{ + int i, t, space; + unsigned sum; + + sum = 1; + space = 0; + for (i = 0;;) { + switch (t = getc(f)) { + case '\0': + if ((flags & D_FORCEASCII) == 0) + return (RH_BINARY); + goto hashchar; + case '\r': + if (flags & D_STRIPCR) { + t = getc(f); + if (t == '\n') + break; + ungetc(t, f); + } + /* FALLTHROUGH */ + case '\t': + case '\v': + case '\f': + case ' ': + if ((flags & (D_FOLDBLANKS|D_IGNOREBLANKS)) != 0) { + space++; + continue; + } + /* FALLTHROUGH */ + default: + hashchar: + if (space && (flags & D_IGNOREBLANKS) == 0) { + i++; + space = 0; + } + sum = sum * 127 + chrtran(t); + i++; + continue; + case EOF: + if (i == 0) + return (RH_EOF); + /* FALLTHROUGH */ + case '\n': + break; + } + break; + } + *hash = sum; + return (RH_OK); +} + +static int +asciifile(FILE *f) +{ + unsigned char buf[BUFSIZ]; + size_t cnt; + + if (f == NULL) + return (1); + + rewind(f); + cnt = fread(buf, 1, sizeof(buf), f); + return (memchr(buf, '\0', cnt) == NULL); +} + +#define begins_with(s, pre) (strncmp((const char *)s, pre, sizeof(pre) - 1) == 0) + +static char * +match_function(const long *f, int pos, FILE *fp) +{ + unsigned char buf[FUNCTION_CONTEXT_SIZE]; + size_t nc; + int last = lastline; + const char *state = NULL; + + lastline = pos; + for (; pos > last; pos--) { + fseek(fp, f[pos - 1], SEEK_SET); + nc = f[pos] - f[pos - 1]; + if (nc >= sizeof(buf)) + nc = sizeof(buf) - 1; + nc = fread(buf, 1, nc, fp); + if (nc == 0) + continue; + buf[nc] = '\0'; + buf[strcspn((const char *)buf, "\n")] = '\0'; + if (most_recent_pat != NULL) { + int ret = regexec(&most_recent_re, (const char *)buf, 0, NULL, 0); + + if (ret != 0) + continue; + strlcpy(lastbuf, (const char *)buf, sizeof(lastbuf)); + lastmatchline = pos; + return (lastbuf); + } else if (isalpha(buf[0]) || buf[0] == '_' || buf[0] == '$' + || buf[0] == '-' || buf[0] == '+') { + if (begins_with(buf, "private:")) { + if (!state) + state = " (private)"; + } else if (begins_with(buf, "protected:")) { + if (!state) + state = " (protected)"; + } else if (begins_with(buf, "public:")) { + if (!state) + state = " (public)"; + } else { + strlcpy(lastbuf, (const char *)buf, sizeof(lastbuf)); + if (state) + strlcat(lastbuf, state, sizeof(lastbuf)); + lastmatchline = pos; + return (lastbuf); + } + } + } + return (lastmatchline > 0 ? lastbuf : NULL); +} + +/* dump accumulated "context" diff changes */ +static void +dump_context_vec(FILE *f1, FILE *f2, int flags) +{ + struct context_vec *cvp = context_vec_start; + int lowa, upb, lowc, upd, do_output; + int a, b, c, d; + char ch, *f; + + if (context_vec_start > context_vec_ptr) + return; + + b = d = 0; /* gcc */ + lowa = MAX(1, cvp->a - diff_context); + upb = MIN(len[0], context_vec_ptr->b + diff_context); + lowc = MAX(1, cvp->c - diff_context); + upd = MIN(len[1], context_vec_ptr->d + diff_context); + + printf("***************"); + if (flags & (D_PROTOTYPE | D_MATCHLAST)) { + f = match_function(ixold, cvp->a - 1, f1); + if (f != NULL) + printf(" %s", f); + } + printf("\n*** "); + range(lowa, upb, ","); + printf(" ****\n"); + + /* + * Output changes to the "old" file. The first loop suppresses + * output if there were no changes to the "old" file (we'll see + * the "old" lines as context in the "new" list). + */ + do_output = 0; + for (; cvp <= context_vec_ptr; cvp++) + if (cvp->a <= cvp->b) { + cvp = context_vec_start; + do_output++; + break; + } + if (do_output) { + while (cvp <= context_vec_ptr) { + a = cvp->a; + b = cvp->b; + c = cvp->c; + d = cvp->d; + + if (a <= b && c <= d) + ch = 'c'; + else + ch = (a <= b) ? 'd' : 'a'; + + if (ch == 'a') + fetch(ixold, lowa, b, f1, ' ', 0, flags); + else { + fetch(ixold, lowa, a - 1, f1, ' ', 0, flags); + fetch(ixold, a, b, f1, + ch == 'c' ? '!' : '-', 0, flags); + } + lowa = b + 1; + cvp++; + } + fetch(ixold, b + 1, upb, f1, ' ', 0, flags); + } + /* output changes to the "new" file */ + printf("--- "); + range(lowc, upd, ","); + printf(" ----\n"); + + do_output = 0; + for (cvp = context_vec_start; cvp <= context_vec_ptr; cvp++) + if (cvp->c <= cvp->d) { + cvp = context_vec_start; + do_output++; + break; + } + if (do_output) { + while (cvp <= context_vec_ptr) { + a = cvp->a; + b = cvp->b; + c = cvp->c; + d = cvp->d; + + if (a <= b && c <= d) + ch = 'c'; + else + ch = (a <= b) ? 'd' : 'a'; + + if (ch == 'd') + fetch(ixnew, lowc, d, f2, ' ', 0, flags); + else { + fetch(ixnew, lowc, c - 1, f2, ' ', 0, flags); + fetch(ixnew, c, d, f2, + ch == 'c' ? '!' : '+', 0, flags); + } + lowc = d + 1; + cvp++; + } + fetch(ixnew, d + 1, upd, f2, ' ', 0, flags); + } + context_vec_ptr = context_vec_start - 1; +} + +/* dump accumulated "unified" diff changes */ +static void +dump_unified_vec(FILE *f1, FILE *f2, int flags) +{ + struct context_vec *cvp = context_vec_start; + int lowa, upb, lowc, upd; + int a, b, c, d; + char ch, *f; + + if (context_vec_start > context_vec_ptr) + return; + + b = d = 0; /* gcc */ + lowa = MAX(1, cvp->a - diff_context); + upb = MIN(len[0], context_vec_ptr->b + diff_context); + lowc = MAX(1, cvp->c - diff_context); + upd = MIN(len[1], context_vec_ptr->d + diff_context); + + printf("@@ -"); + uni_range(lowa, upb); + printf(" +"); + uni_range(lowc, upd); + printf(" @@"); + if (flags & (D_PROTOTYPE | D_MATCHLAST)) { + f = match_function(ixold, cvp->a - 1, f1); + if (f != NULL) + printf(" %s", f); + } + printf("\n"); + + /* + * Output changes in "unified" diff format--the old and new lines + * are printed together. + */ + for (; cvp <= context_vec_ptr; cvp++) { + a = cvp->a; + b = cvp->b; + c = cvp->c; + d = cvp->d; + + /* + * c: both new and old changes + * d: only changes in the old file + * a: only changes in the new file + */ + if (a <= b && c <= d) + ch = 'c'; + else + ch = (a <= b) ? 'd' : 'a'; + + switch (ch) { + case 'c': + fetch(ixold, lowa, a - 1, f1, ' ', 0, flags); + fetch(ixold, a, b, f1, '-', 0, flags); + fetch(ixnew, c, d, f2, '+', 0, flags); + break; + case 'd': + fetch(ixold, lowa, a - 1, f1, ' ', 0, flags); + fetch(ixold, a, b, f1, '-', 0, flags); + break; + case 'a': + fetch(ixnew, lowc, c - 1, f2, ' ', 0, flags); + fetch(ixnew, c, d, f2, '+', 0, flags); + break; + } + lowa = b + 1; + lowc = d + 1; + } + fetch(ixnew, d + 1, upd, f2, ' ', 0, flags); + + context_vec_ptr = context_vec_start - 1; +} + +static void +print_header(const char *file1, const char *file2) +{ + const char *time_format; + char buf[256]; + struct tm tm1, tm2, *tm_ptr1, *tm_ptr2; +#if !defined(WIN32) + int nsec1 = stb1.st_mtim.tv_nsec; + int nsec2 = stb2.st_mtim.tv_nsec; +#endif + + time_format = "%Y-%m-%d %H:%M:%S"; + + if (cflag) + time_format = "%c"; + tm_ptr1 = localtime_r(&stb1.st_mtime, &tm1); + tm_ptr2 = localtime_r(&stb2.st_mtime, &tm2); + if (label[0] != NULL) + printf("%s %s\n", diff_format == D_CONTEXT ? "***" : "---", + label[0]); + else { + strftime(buf, sizeof(buf), time_format, tm_ptr1); + printf("%s %s\t%s", diff_format == D_CONTEXT ? "***" : "---", + file1, buf); + if (!cflag) { + strftime(buf, sizeof(buf), "%z", tm_ptr1); +#if !defined(WIN32) + printf(".%.9d %s", nsec1, buf); +#endif + } + printf("\n"); + } + if (label[1] != NULL) + printf("%s %s\n", diff_format == D_CONTEXT ? "---" : "+++", + label[1]); + else { + strftime(buf, sizeof(buf), time_format, tm_ptr2); + printf("%s %s\t%s", diff_format == D_CONTEXT ? "---" : "+++", + file2, buf); + if (!cflag) { + strftime(buf, sizeof(buf), "%z", tm_ptr2); +#if !defined(WIN32) + printf(".%.9d %s", nsec2, buf); +#endif + } + printf("\n"); + } +} + +/* + * Prints n number of space characters either by using tab + * or single space characters. + * nc is the preceding number of characters + */ +static void +print_space(int nc, int n, int flags) { + int i, col; + + col = n; + if ((flags & D_EXPANDTABS) == 0) { + /* first tabstop may be closer than tabsize */ + i = tabsize - (nc % tabsize); + while (col >= tabsize) { + printf("\t"); + col -= i; + i = tabsize; + } + } + printf("%*s", col, ""); +} diff --git a/mcwin32/diff/diffwin.c b/mcwin32/diff/diffwin.c new file mode 100644 index 00000000..07bef7fd --- /dev/null +++ b/mcwin32/diff/diffwin.c @@ -0,0 +1,101 @@ +/*- + * diff --- Window support. + */ + +#if !defined(MEAN_AND_LEAN) +#define MEAN_AND_LEAN +#endif +#undef _WIN32_WINNT +#define _WIN32_WINNT 0x0600 +#include + +#include +#include + +#include "diffwin.h" + +#if !defined(ENABLE_VIRTUAL_TERMINAL_PROCESSING) +#define ENABLE_VIRTUAL_TERMINAL_PROCESSING 0x0004 + // When writing with WriteFile or WriteConsole, characters are parsed for VT100 and similar control + // character sequences that control cursor movement, color/font mode, and other operations that can + // also be performed via the existing Console APIs. +#endif + +#if defined(__MINGW32__) +typedef struct _OSVERSIONINFOW RTL_OSVERSIONINFOW, *PRTL_OSVERSIONINFOW; +typedef DWORD (WINAPI *fnRtlGetVersion_t)(PRTL_OSVERSIONINFOW); +#elif defined(__WATCOMC__) +typedef struct _OSVERSIONINFOW RTL_OSVERSIONINFOW, *PRTL_OSVERSIONINFOW; +#endif +typedef NTSTATUS (WINAPI *RtlGetVersionPtr)(PRTL_OSVERSIONINFOW); + +static bool +hascolorconsole(void) +{ + const DWORD MINV_MAJOR = 10, MINV_MINOR = 0, MINV_BUILD = 10586; + bool ret = false; + + HMODULE hMod = GetModuleHandle(TEXT("ntdll.dll")); + if (hMod) { + RtlGetVersionPtr fn = (RtlGetVersionPtr) GetProcAddress(hMod, "RtlGetVersion"); + if (fn != NULL) { + RTL_OSVERSIONINFOW rovi = { 0 }; + rovi.dwOSVersionInfoSize = sizeof(rovi); + if (fn(&rovi) == 0) { + if (rovi.dwMajorVersion > MINV_MAJOR || + (rovi.dwMajorVersion == MINV_MAJOR && + (rovi.dwMinorVersion > MINV_MINOR || (rovi.dwMinorVersion == MINV_MINOR && rovi.dwBuildNumber >= MINV_BUILD)))) { + ret = true; + } + } + } + } + return ret; +} + +#if defined(__WATCOMC__) +static void +#else +static void __cdecl +#endif +disable_atexit(void) +{ + const int fd = _fileno(stdout); + HANDLE h = (HANDLE) _get_osfhandle(fd); + DWORD mode; + + if (h == INVALID_HANDLE_VALUE || GetFileType(h) != FILE_TYPE_CHAR) + return; + if (GetConsoleMode(h, &mode) && (mode & ENABLE_VIRTUAL_TERMINAL_PROCESSING)) { + mode &= ~ENABLE_VIRTUAL_TERMINAL_PROCESSING; + (void) SetConsoleMode(h, mode); + } + return; +} + +bool +iscolorconsole(void) +{ + const int fd = _fileno(stdout); + HANDLE h = (HANDLE) _get_osfhandle(fd); + CONSOLE_SCREEN_BUFFER_INFO sbi = {0}; + DWORD mode; + + if (h == INVALID_HANDLE_VALUE || GetFileType(h) != FILE_TYPE_CHAR) // stdout tty + return false; + if (!hascolorconsole()) // build 10.10586 + return false; + if (!GetConsoleScreenBufferInfo(h, &sbi)) // output buffer + return false; + if (!GetConsoleMode(h, &mode)) // console + return false; + + if (ENABLE_VIRTUAL_TERMINAL_PROCESSING & mode) // TTY enabled + return true; + if (!SetConsoleMode(h, mode|ENABLE_VIRTUAL_TERMINAL_PROCESSING)) // enable + return false; + atexit(disable_atexit); // restore + return true; +} + +//end diff --git a/mcwin32/diff/diffwin.h b/mcwin32/diff/diffwin.h new file mode 100644 index 00000000..a6e3692b --- /dev/null +++ b/mcwin32/diff/diffwin.h @@ -0,0 +1,10 @@ +#pragma once +/*- + * diff --- Window support. + */ + +#include "diffbool.h" + +bool iscolorconsole(void); + +//end diff --git a/mcwin32/diff/man.txt b/mcwin32/diff/man.txt new file mode 100644 index 00000000..c1797f18 --- /dev/null +++ b/mcwin32/diff/man.txt @@ -0,0 +1,381 @@ +DIFF(1) General Commands Manual DIFF(1) + +NAME + diff -- differential file and directory comparator + +SYNOPSIS + diff [-aBbdipTtw] [-c | -e | -f | -n | -q | -u | -y] [--brief] + [--color=when] [--changed-group-format GFMT] [--ed] + [--expand-tabs] [--forward-ed] [--ignore-all-space] + [--ignore-case] [--ignore-space-change] [--initial-tab] + [--minimal] [--no-ignore-file-name-case] [--normal] [--rcs] + [--show-c-function] [--starting-file] [--speed-large-files] + [--strip-trailing-cr] [--tabsize number] [--text] [--unified] + [-I pattern | --ignore-matching-lines pattern] + [-F pattern | --show-function-line pattern] + [-L label | --label label] file1 file2 + diff [-aBbdilpTtw] [-I pattern | --ignore-matching-lines pattern] + [-F pattern | --show-function-line pattern] + [-L label | --label label] [--brief] [--color=when] + [--changed-group-format GFMT] [--ed] [--expand-tabs] + [--forward-ed] [--ignore-all-space] [--ignore-case] + [--ignore-space-change] [--initial-tab] [--minimal] + [--no-ignore-file-name-case] [--normal] [--paginate] [--rcs] + [--show-c-function] [--speed-large-files] [--starting-file] + [--strip-trailing-cr] [--tabsize number] [--text] -C number | + -context number file1 file2 + diff [-aBbdiltw] [-I pattern | --ignore-matching-lines pattern] + [--brief] [--color=when] [--changed-group-format GFMT] [--ed] + [--expand-tabs] [--forward-ed] [--ignore-all-space] + [--ignore-case] [--ignore-space-change] [--initial-tab] + [--minimal] [--no-ignore-file-name-case] [--normal] [--paginate] + [--rcs] [--show-c-function] [--speed-large-files] + [--starting-file] [--strip-trailing-cr] [--tabsize number] + [--text] -D string | --ifdef string file1 file2 + diff [-aBbdilpTtw] [-I pattern | --ignore-matching-lines pattern] + [-F pattern | --show-function-line pattern] + [-L label | --label label] [--brief] [--color=when] + [--changed-group-format GFMT] [--ed] [--expand-tabs] + [--forward-ed] [--ignore-all-space] [--ignore-case] + [--ignore-space-change] [--initial-tab] [--minimal] + [--no-ignore-file-name-case] [--normal] [--paginate] [--rcs] + [--show-c-function] [--speed-large-files] [--starting-file] + [--strip-trailing-cr] [--tabsize number] [--text] -U number | + --unified number file1 file2 + diff [-aBbdilNPprsTtw] [-c | -e | -f | -n | -q | -u] [--brief] + [--color=when] [--changed-group-format GFMT] [--context] [--ed] + [--expand-tabs] [--forward-ed] [--ignore-all-space] + [--ignore-case] [--ignore-space-change] [--initial-tab] + [--minimal] [--new-file] [--no-ignore-file-name-case] [--normal] + [--paginate] [--rcs] [--recursive] [--report-identical-files] + [--show-c-function] [--speed-large-files] [--strip-trailing-cr] + [--tabsize number] [--text] [--unidirectional-new-file] + [--unified] [-I pattern | --ignore-matching-lines pattern] + [-F pattern | --show-function-line pattern] + [-L label | --label label] [-S name | --starting-file name] + [-X file | --exclude-from file] [-x pattern | --exclude pattern] + dir1 dir2 + diff [-aBbditwW] [--color=when] [--expand-tabs] [--ignore-all-blanks] + [--ignore-blank-lines] [--ignore-case] [--minimal] + [--no-ignore-file-name-case] [--strip-trailing-cr] + [--suppress-common-lines] [--tabsize number] [--text] [--width] -y + | --side-by-side file1 file2 + diff [--help] [--version] + +DESCRIPTION + The diff utility compares the contents of file1 and file2 and writes to + the standard output the list of changes necessary to convert one file + into the other. No output is produced if the files are identical. + + Output options (mutually exclusive): + + -C number --context number + Like -c but produces a diff with number lines of context. + + -c Produces a diff with 3 lines of context. With -c the output + format is modified slightly: the output begins with identifica- + tion of the files involved and their creation dates and then + each change is separated by a line with fifteen *'s. The lines + removed from file1 are marked with `- '; those added to file2 + are marked `+ '. Lines which are changed from one file to the + other are marked in both files with `! '. Changes which lie + within 3 lines of each other are grouped together on output. + + -D string --ifdef string + Creates a merged version of file1 and file2 on the standard + output, with C preprocessor controls included so that a compi- + lation of the result without defining string is equivalent to + compiling file1, while defining string will yield file2. + + -e --ed + Produces output in a form suitable as input for the editor + utility, ed(1), which can then be used to convert file1 into + file2. + + Extra commands are added to the output when comparing directo- + ries with -e, so that the result is a sh(1) script for convert- + ing text files which are common to the two directories from + their state in dir1 to their state in dir2. + + -f --forward-ed + Identical output to that of the -e flag, but in reverse order. + It cannot be digested by ed(1). + + --help This option prints a summary to stdout and exits with status 0. + + -n Produces a script similar to that of -e, but in the opposite + order and with a count of changed lines on each insert or + delete command. This is the form used by rcsdiff. + + -q --brief + Just print a line when the files differ. Does not output a + list of changes. + + -U number --unified number + Like -u but produces a diff with number lines of context. + + -u Produces a unified diff with 3 lines of context. A unified + diff is similar to the context diff produced by the -c option. + However, unlike with -c, all lines to be changed (added and/or + removed) are present in a single section. + + --version + This option prints a version string to stdout and exits with + status 0. + + -y --side-by-side + Output in two columns with a marker between them. The marker + can be one of the following: + + space Corresponding lines are identical. + '|' Corresponding lines are different. + '<' Files differ and only the first file contains the + line. + '>' Files differ and only the second file contains + the line. + + Comparison options: + + -a --text + Treat all files as ASCII text. Normally diff will simply print + "Binary files ... differ" if files contain binary characters. + Use of this option forces diff to produce a diff. + + -B --ignore-blank-lines + Causes chunks that include only blank lines to be ignored. + + -b --ignore-space-change + Causes trailing blanks (spaces and tabs) to be ignored, and + other strings of blanks to compare equal. + + --color=[when] + Color the additions green, and removals red, or the value in + the DIFFCOLORS environment variable. The possible values of + when are "never", "always" and "auto". auto will use color if + the output is a tty and the COLORTERM environment variable is + set to a non-empty string. + + -d --minimal + Try very hard to produce a diff as small as possible. This may + consume a lot of processing power and memory when processing + large files with many changes. + + -F pattern, --show-function-line pattern + Like -p, but display the last line that matches provided pat- + tern. + + -I pattern --ignore-matching-lines pattern + Ignores changes, insertions, and deletions whose lines match + the extended regular expression pattern. Multiple -I patterns + may be specified. All lines in the change must match some pat- + tern for the change to be ignored. See re_format(7) for more + information on regular expression patterns. + + -i --ignore-case + Ignores the case of letters. E.g., "A" will compare equal to + "a". + + -l --paginate + Pass the output through pr(1) to paginate it. + + -L label --label label + Print label instead of the first (and second, if this option is + specified twice) file name and time in the context or unified + diff header. + + -p --show-c-function + With unified and context diffs, show with each change the first + 40 characters of the last line before the context beginning + with a letter, an underscore or a dollar sign. For C and Ob- + jective-C source code following standard layout conventions, + this will show the prototype of the function the change applies + to. + + -T --initial-tab + Print a tab rather than a space before the rest of the line for + the normal, context or unified output formats. This makes the + alignment of tabs in the line consistent. + + -t --expand-tabs + Will expand tabs in output lines. Normal or -c output adds + character(s) to the front of each line which may screw up the + indentation of the original source lines and make the output + listing difficult to interpret. This option will preserve the + original source's indentation. + + -w --ignore-all-blanks + Is similar to -b --ignore-space-change but causes whitespace + (blanks and tabs) to be totally ignored. E.g., "if ( a == b )" + will compare equal to "if(a==b)". + + -W number --width number + Output at most number columns when using side by side format. + The default value is 130. + + --changed-group-format GFMT + Format input groups in the provided + + the format is a string with special keywords: + + %< lines from FILE1 + + %< lines from FILE2 + + --ignore-file-name-case + ignore case when comparing file names + + --no-ignore-file-name-case + do not ignore case wen comparing file names (default) + + --normal + default diff output + + --speed-large-files + stub option for compatibility with GNU diff + + --strip-trailing-cr + strip carriage return on input files + + --suppress-common-lines + Do not output common lines when using the side by side format + + --tabsize number + Number of spaces representing a tab (default 8) + + Directory comparison options: + + -N --new-file + If a file is found in only one directory, act as if it was + found in the other directory too but was of zero size. + + -P --unidirectional-new-file + If a file is found only in dir2, act as if it was found in dir1 + too but was of zero size. + + -r --recursive + Causes application of diff recursively to common subdirectories + encountered. + + -S name --starting-file name + Re-starts a directory diff in the middle, beginning with file + name. + + -s --report-identical-files + Causes diff to report files which are the same, which are oth- + erwise not mentioned. + + -X file --exclude-from file + Exclude files and subdirectories from comparison whose base- + names match lines in file. Multiple -X options may be speci- + fied. + + -x pattern --exclude pattern + Exclude files and subdirectories from comparison whose base- + names match pattern. Patterns are matched using shell-style + globbing via fnmatch(3). Multiple -x options may be specified. + + If both arguments are directories, diff sorts the contents of the di- + rectories by name, and then runs the regular file diff algorithm, pro- + ducing a change list, on text files which are different. Binary files + which differ, common subdirectories, and files which appear in only one + directory are described as such. In directory mode only regular files + and directories are compared. If a non-regular file such as a device + special file or FIFO is encountered, a diagnostic message is printed. + + If only one of file1 and file2 is a directory, diff is applied to the + non-directory file and the file contained in the directory file with a + filename that is the same as the last component of the non-directory + file. + + If either file1 or file2 is `-', the standard input is used in its + place. + + Output Style + The default (without -e, -c, or -n --rcs options) output contains lines + of these forms, where XX, YY, ZZ, QQ are line numbers respective of + file order. + + XXaYY At (the end of) line XX of file1, append the contents of + line YY of file2 to make them equal. + XXaYY,ZZ Same as above, but append the range of lines, YY through + ZZ of file2 to line XX of file1. + XXdYY At line XX delete the line. The value YY tells to which + line the change would bring file1 in line with file2. + XX,YYdZZ Delete the range of lines XX through YY in file1. + XXcYY Change the line XX in file1 to the line YY in file2. + XX,YYcZZ Replace the range of specified lines with the line ZZ. + XX,YYcZZ,QQ Replace the range XX,YY from file1 with the range ZZ,QQ + from file2. + + These lines resemble ed(1) subcommands to convert file1 into file2. + The line numbers before the action letters pertain to file1; those af- + ter pertain to file2. Thus, by exchanging a for d and reading the line + in reverse order, one can also determine how to convert file2 into + file1. As in ed(1), identical pairs (where num1 = num2) are abbrevi- + ated as a single number. + +ENVIRONMENT + DIFFCOLORS The value of this variable is the form add:rm, where add is + the ASCII escape sequence for additions and rm is the ASCII + escape sequence for deletions. If this is unset, diff uses + green for additions and red for removals. + +FILES + /tmp/diff.XXXXXXXX Temporary file used when comparing a device or the + standard input. Note that the temporary file is + unlinked as soon as it is created so it will not + show up in a directory listing. + +EXIT STATUS + The diff utility exits with one of the following values: + + 0 No differences were found. + 1 Differences were found. + >1 An error occurred. + + The --help and --version options exit with a status of 0. + +EXAMPLES + Compare old_dir and new_dir recursively generating an unified diff and + treating files found only in one of those directories as new files: + + $ diff -ruN /path/to/old_dir /path/to/new_dir + + Same as above but excluding files matching the expressions "*.h" and + "*.c": + + $ diff -ruN -x '*.h' -x '*.c' /path/to/old_dir /path/to/new_dir + + Show a single line indicating if the files differ: + + $ diff -q /boot/loader.conf /boot/defaults/loader.conf + Files /boot/loader.conf and /boot/defaults/loader.conf differ + + Assuming a file named example.txt with the following contents: + + FreeBSD is an operating system + Linux is a kernel + OpenBSD is an operating system + + Compare stdin with example.txt excluding from the comparison those + lines containing either "Linux" or "Open": + + $ echo "FreeBSD is an operating system" | diff -q -I 'Linux|Open' example.txt - + +SEE ALSO + cmp(1), comm(1), diff3(1), ed(1), patch(1), pr(1), sdiff(1) + + James W. Hunt and M. Douglas McIlroy, "An Algorithm for Differential + File Comparison", Computing Science Technical Report, Bell Laboratories + 41, June 1976. + +STANDARDS + The diff utility is compliant with the IEEE Std 1003.1-2008 ("POSIX.1") + specification. + + The flags [-aDdIiLlNnPpqSsTtwXxy] are extensions to that specification. + +HISTORY + A diff command appeared in Version 6 AT&T UNIX. + +FreeBSD 13.2 March 10, 2022 DIFF(1) \ No newline at end of file diff --git a/mcwin32/diff/mcdiff.rc b/mcwin32/diff/mcdiff.rc new file mode 100644 index 00000000..9e026cf9 --- /dev/null +++ b/mcwin32/diff/mcdiff.rc @@ -0,0 +1,122 @@ +/* + * windows resource file + * + * This file is part of the Midnight Commander. + * + * The Midnight Commander is free software: you can redistribute it + * and/or modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation, either version 3 of the License, + * or (at your option) any later version. + * + * The Midnight Commander 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 General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#ifndef WINDRES +#include "windows.h" +#include "winver.h" +#endif + +#include "mcdiffinfo.h" + +#define RC_PRODUCTVERSION VERSION_1 , VERSION_2 , VERSION_3 , VERSION_4 +#define RC_FILEVERSION VERSION_1 , VERSION_2 , VERSION_3 , VERSION_4 + +/* + * English (U.S.) resources + */ + +#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU) + +#ifdef _WIN32 +#ifndef WINDRES +LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US +#endif +#pragma code_page(1252) +#endif /* _WIN32 */ + +/* + * Manifest + */ +#ifndef RT_MANIFEST +#define RT_MANIFEST 24 +#endif +#ifndef CREATEPROCESS_MANIFEST_RESOURCE_ID +#define CREATEPROCESS_MANIFEST_RESOURCE_ID 1 +#endif + +/* + * Updater Meta Data + * nameID typeID { raw data } + */ + +UPDATER HostURL { "\0" } +UPDATER Channel { "release\0" } + + +/* + * Version Information + */ + +VS_VERSION_INFO VERSIONINFO +#if defined(RC_FILEVERSION) + FILEVERSION RC_FILEVERSION + PRODUCTVERSION RC_PRODUCTVERSION +#endif + FILEFLAGSMASK VS_FFI_FILEFLAGSMASK +#ifdef _DEBUG + FILEFLAGS (VS_FF_SPECIALBUILD|VS_FF_DEBUG) +#else + FILEFLAGS (VS_FF_SPECIALBUILD) +#endif + FILEOS VOS_NT_WINDOWS32 + FILETYPE VFT_APP + FILESUBTYPE VFT2_UNKNOWN + BEGIN + BLOCK "StringFileInfo" + BEGIN + BLOCK "040904E4" + BEGIN + VALUE "CompanyName", "" + + VALUE "FileDescription", "mcdiff" + + VALUE "FileVersion", VERSION ", Build:" BUILD_DATE "-" BUILD_NUMBER /* match mc.rc */ + + VALUE "InternalName", "mcdiff" + + VALUE "Copyright", + "Copyright (C) 2024, Adam Young. \n" + "[bsd-diff] Copyright (c) 2003, 2010 Todd C. Miller . \n" + "There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. \n" + + VALUE "Maintainers", "https://github.com/adamyg/mcwin32" + + VALUE "LegalTrademarks", "SPDX-License-Identifier: BSD-4-Clause" + + VALUE "OriginalFilename", "mcdiff.exe" + + VALUE "ProductName", "MCDiff" + END + END + + /* The following line should only be modified for localized versions. */ + /* It consists of any number of WORD,WORD pairs, with each pair */ + /* describing a language,codepage combination supported by the file. */ + /* */ + /* For example, a file might have values "0x409,1252" indicating that it */ + /* supports English language (0x409) in the Windows ANSI codepage (1252). */ + + BLOCK "VarFileInfo" + BEGIN + VALUE "Translation", 0x409, 1252 + END + END + +#endif /* English (U.S.) resources */ + diff --git a/mcwin32/diff/paths.h b/mcwin32/diff/paths.h new file mode 100644 index 00000000..24f06742 --- /dev/null +++ b/mcwin32/diff/paths.h @@ -0,0 +1,17 @@ +/* + * paths.h: WIN32 + */ + +#define _PATH_DEVNULL "NUL" +#define _PATH_TMP "/tmp" + +#if !defined(MIN) +#define MIN(__a,__b) (((__a)<(__b))?(__a):(__b)) +#define MAX(__a,__b) (((__a)>(__b))?(__a):(__b)) +#endif + +#if !defined(PATH_MAX) +#define PATH_MAX 1024 +#endif + +//end diff --git a/mcwin32/diff/pr.c b/mcwin32/diff/pr.c new file mode 100644 index 00000000..5dedf689 --- /dev/null +++ b/mcwin32/diff/pr.c @@ -0,0 +1,123 @@ +/*- + * Copyright (c) 2017 Baptiste Daroussin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer + * in this position and unchanged. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR(S) ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR(S) BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include +#include +#include + +#include +#include +#include +#include +#include +#include + +#include "pr.h" +#include "diff.h" +#include "xmalloc.h" + +#define _PATH_PR "/usr/bin/pr" + +struct pr * +start_pr(char *file1, char *file2) +{ + int pfd[2]; + int pr_pd; + pid_t pid; + char *header; + struct pr *pr; + + pr = xcalloc(1, sizeof(*pr)); + + xasprintf(&header, "%s %s %s", diffargs, file1, file2); + signal(SIGPIPE, SIG_IGN); + fflush(stdout); + rewind(stdout); + if (pipe(pfd) == -1) + err(2, "pipe"); + switch ((pid = pdfork(&pr_pd, PD_CLOEXEC))) { + case -1: + status |= 2; + free(header); + err(2, "No more processes"); + case 0: + /* child */ + if (pfd[0] != STDIN_FILENO) { + dup2(pfd[0], STDIN_FILENO); + close(pfd[0]); + } + close(pfd[1]); + execl(_PATH_PR, _PATH_PR, "-h", header, (char *)0); + _exit(127); + default: + + /* parent */ + if (pfd[1] != STDOUT_FILENO) { + pr->ostdout = dup(STDOUT_FILENO); + dup2(pfd[1], STDOUT_FILENO); + close(pfd[1]); + } + close(pfd[0]); + rewind(stdout); + free(header); + pr->kq = kqueue(); + if (pr->kq == -1) + err(2, "kqueue"); + pr->e = xmalloc(sizeof(struct kevent)); + EV_SET(pr->e, pr_pd, EVFILT_PROCDESC, EV_ADD, NOTE_EXIT, 0, + NULL); + if (kevent(pr->kq, pr->e, 1, NULL, 0, NULL) == -1) + err(2, "kevent"); + } + return (pr); +} + +/* close the pipe to pr and restore stdout */ +void +stop_pr(struct pr *pr) +{ + int wstatus; + + if (pr == NULL) + return; + + fflush(stdout); + if (pr->ostdout != STDOUT_FILENO) { + close(STDOUT_FILENO); + dup2(pr->ostdout, STDOUT_FILENO); + close(pr->ostdout); + } + if (kevent(pr->kq, NULL, 0, pr->e, 1, NULL) == -1) + err(2, "kevent"); + wstatus = pr->e[0].data; + close(pr->kq); + free(pr); + if (WIFEXITED(wstatus) && WEXITSTATUS(wstatus) != 0) + errx(2, "pr exited abnormally"); + else if (WIFSIGNALED(wstatus)) + errx(2, "pr killed by signal %d", + WTERMSIG(wstatus)); +} diff --git a/mcwin32/diff/pr.h b/mcwin32/diff/pr.h new file mode 100644 index 00000000..2ff5949f --- /dev/null +++ b/mcwin32/diff/pr.h @@ -0,0 +1,36 @@ +/*- + * Copyright (c) 2017 Baptiste Daroussin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer + * in this position and unchanged. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR(S) ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR(S) BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include + +struct pr { + int ostdout; + int kq; + struct kevent *e; +}; + +struct pr *start_pr(char *file1, char *file2); +void stop_pr(struct pr *); diff --git a/mcwin32/diff/xmalloc.c b/mcwin32/diff/xmalloc.c new file mode 100644 index 00000000..e538a0ae --- /dev/null +++ b/mcwin32/diff/xmalloc.c @@ -0,0 +1,89 @@ +/* $OpenBSD: xmalloc.c,v 1.10 2019/06/28 05:44:09 deraadt Exp $ */ +/* + * Author: Tatu Ylonen + * Copyright (c) 1995 Tatu Ylonen , Espoo, Finland + * All rights reserved + * Versions of malloc and friends that check their results, and never return + * failure (they call fatal if they encounter an error). + * + * As far as I am concerned, the code I have written for this software + * can be used freely for any purpose. Any derived versions of this + * software must be clearly marked as such, and if the derived work is + * incompatible with the protocol description in the RFC file, it must be + * called by a name other than "ssh" or "Secure Shell". + */ + +#include +#include +#include +#include +#include +#include +#include + +#if defined(WIN32) +#include "libcompat.h" +#endif +#include "xmalloc.h" + +void * +xmalloc(size_t size) +{ + void *ptr; + + if (size == 0) + errx(2, "xmalloc: zero size"); + ptr = malloc(size); + if (ptr == NULL) + err(2, "xmalloc: allocating %zu bytes", size); + return ptr; +} + +void * +xcalloc(size_t nmemb, size_t size) +{ + void *ptr; + + ptr = calloc(nmemb, size); + if (ptr == NULL) + err(2, "xcalloc: allocating %zu * %zu bytes", nmemb, size); + return ptr; +} + +void * +xreallocarray(void *ptr, size_t nmemb, size_t size) +{ + void *new_ptr; + + new_ptr = reallocarray(ptr, nmemb, size); + if (new_ptr == NULL) + err(2, "xreallocarray: allocating %zu * %zu bytes", + nmemb, size); + return new_ptr; +} + +char * +xstrdup(const char *str) +{ + char *cp; + + if ((cp = strdup(str)) == NULL) + err(2, "xstrdup"); + return cp; +} + +int +xasprintf(char **ret, const char *fmt, ...) +{ + va_list ap; + int i; + + va_start(ap, fmt); + i = vasprintf(ret, fmt, ap); + va_end(ap); + + if (i == -1) + err(2, "xasprintf"); + + return i; +} diff --git a/mcwin32/diff/xmalloc.h b/mcwin32/diff/xmalloc.h new file mode 100644 index 00000000..4681a151 --- /dev/null +++ b/mcwin32/diff/xmalloc.h @@ -0,0 +1,36 @@ +/* $OpenBSD: xmalloc.h,v 1.4 2015/11/12 16:30:30 mmcc Exp $ */ + +/* + * Author: Tatu Ylonen + * Copyright (c) 1995 Tatu Ylonen , Espoo, Finland + * All rights reserved + * Created: Mon Mar 20 22:09:17 1995 ylo + * + * Versions of malloc and friends that check their results, and never return + * failure (they call fatal if they encounter an error). + * + * As far as I am concerned, the code I have written for this software + * can be used freely for any purpose. Any derived versions of this + * software must be clearly marked as such, and if the derived work is + * incompatible with the protocol description in the RFC file, it must be + * called by a name other than "ssh" or "Secure Shell". + */ + +#ifndef XMALLOC_H +#define XMALLOC_H + +#if defined(_WIN32) +#if !defined(__attribute__) +#define __attribute__(__x) +#endif +#endif + +void *xmalloc(size_t); +void *xcalloc(size_t, size_t); +void *xreallocarray(void *, size_t, size_t); +char *xstrdup(const char *); +int xasprintf(char **, const char *, ...) + __attribute__((__format__ (printf, 2, 3))) + __attribute__((__nonnull__ (2))); + +#endif /* XMALLOC_H */ diff --git a/mcwin32/doc/LICENSE.diff b/mcwin32/doc/LICENSE.diff new file mode 100644 index 00000000..bb0a295a --- /dev/null +++ b/mcwin32/doc/LICENSE.diff @@ -0,0 +1,63 @@ +/*- + * SPDX-License-Identifier: BSD-4-Clause + * + * Copyright (C) Caldera International Inc. 2001-2002. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code and documentation must retain the above + * copyright notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. All advertising materials mentioning features or use of this software + * must display the following acknowledgement: + * This product includes software developed or owned by Caldera + * International, Inc. + * 4. Neither the name of Caldera International, Inc. nor the names of other + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * USE OF THE SOFTWARE PROVIDED FOR UNDER THIS LICENSE BY CALDERA + * INTERNATIONAL, INC. AND CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL CALDERA INTERNATIONAL, INC. BE LIABLE FOR ANY DIRECT, + * INDIRECT INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, + * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING + * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + */ +/*- + * Copyright (c) 1991, 1993 + * The Regents of the University of California. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. Neither the name of the University nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ diff --git a/mcwin32/doc/README.win32 b/mcwin32/doc/README.win32 index 9f7f5c92..17636cbf 100644 --- a/mcwin32/doc/README.win32 +++ b/mcwin32/doc/README.win32 @@ -8,13 +8,20 @@ the current 4.8.x development stream. Version Latest Build + 4.8.31 230 (mc merge 4.8.31) + + - mbedtls 3.5.2 (#67) + - AltGr detection (#71, #52) + - mcdiff integration (#74) + - cd/cdpath (#72) + 4.8.30 229 (mc merge 4.8.30) - pcre2 10.42 - mbedtls 3.4.1 - enca 1.19 - file 5.45 - - zlib 1.2.13 + - zlib 1.3 4.8.29 228 (mc merge 4.8.29) diff --git a/mcwin32/libintl/src/gettext.c b/mcwin32/libintl/src/gettext.c index b8ec0feb..87e22b0a 100644 --- a/mcwin32/libintl/src/gettext.c +++ b/mcwin32/libintl/src/gettext.c @@ -36,6 +36,10 @@ __RCSID("$NetBSD: gettext.c,v 1.28 2012/07/30 23:04:42 yamt Exp $"); #ifndef WINDOWS_MEAN_AND_LEAN #define WINDOWS_MEAN_AND_LEAN #endif +#if defined(_MSC_VER) && (!defined(WINVER) || (WINVER < 0x500)) +#undef WINVER +#define WINVER WIN32_WINNT /* GetThreadLocale, SDK 10+ */ +#endif #include #pragma comment(lib, "Kernel32.lib") #endif //WIN32 @@ -823,6 +827,9 @@ lookup(const char *msgid, struct domainbinding *db, size_t *rlen) static const char * get_lang_env(const char *category_name) { +#if defined(_WIN32) + char winlocale[64] = {0}; +#endif const char *lang; /* @@ -848,12 +855,27 @@ get_lang_env(const char *category_name) #if defined(_WIN32) if (!lang) - { static char ISO639_LanguageName[32]; //FIXME: tls - - ISO639_LanguageName[0] = 0; - if (GetLocaleInfoA(GetUserDefaultLCID(), LOCALE_SISO639LANGNAME, - ISO639_LanguageName, sizeof(ISO639_LanguageName)) && ISO639_LanguageName[0]) { - lang = ISO639_LanguageName; + { + char iso639[16] = {0}, iso3166[16] = {0}; + const char *isocs = NULL; // TODO (GetACP() to codeset) + const LCID lcid = GetThreadLocale(); // Active application locale. + + if (GetLocaleInfoA(lcid, LOCALE_SISO639LANGNAME, iso639, sizeof(iso639))) { + if (GetLocaleInfoA(lcid, LOCALE_SISO3166CTRYNAME, iso3166, sizeof(iso3166)) && iso3166[0]) { + if (isocs) { + snprintf(winlocale, sizeof(winlocale), "%s_%s.%s", iso639, iso3166, isocs); // language_territory.codeset + } else { + snprintf(winlocale, sizeof(winlocale), "%s_%s", iso639, iso3166); // language_territory + } + } else { + if (isocs) { + snprintf(winlocale, sizeof(winlocale), "%s.%s", iso639, isocs); // language.codeset + } else { + snprintf(winlocale, sizeof(winlocale), "%s", iso639); // language + } + } + winlocale[sizeof(winlocale) - 1] = '\0'; + lang = winlocale; } } #endif //WIN32 diff --git a/mcwin32/libmbedtls/.cvsignore b/mcwin32/libmbedtls/.cvsignore index 16ce7d43..384a8e14 100644 --- a/mcwin32/libmbedtls/.cvsignore +++ b/mcwin32/libmbedtls/.cvsignore @@ -4,6 +4,8 @@ mbedtls-2.27.0 mbedtls-3.2.1 mbedtls-3.3.0 mbedtls-3.4.1 +mbedtls-3.5.2 +ref .unpacked.* Makefile *.err diff --git a/mcwin32/libmbedtls/.gitignore b/mcwin32/libmbedtls/.gitignore index c372db54..04b282c1 100644 --- a/mcwin32/libmbedtls/.gitignore +++ b/mcwin32/libmbedtls/.gitignore @@ -5,6 +5,7 @@ mbedtls-2.16.6*/ mbedtls-3.2.1*/ mbedtls-3.3.0/ mbedtls-3.4.1/ +mbedtls-3.5.2/ ref/ .unpacked.* Makefile diff --git a/mcwin32/libmbedtls/Makefile.in b/mcwin32/libmbedtls/Makefile.in index 97a75cbe..f27fd940 100644 --- a/mcwin32/libmbedtls/Makefile.in +++ b/mcwin32/libmbedtls/Makefile.in @@ -1,9 +1,9 @@ # -*- mode: mak; indent-tabs-mode: t; tab-width: 8 -*- -# $Id: Makefile.in,v 1.17 2023/10/02 12:11:28 cvsuser Exp $ +# $Id: Makefile.in,v 1.19 2024/03/29 11:55:58 cvsuser Exp $ # libmbedtls makefile. # # -# Copyright (c) 2017 - 2023 Adam Young. +# Copyright (c) 2017 - 2024 Adam Young. # All rights reserved. # # This file is part of the Midnight Commander. @@ -79,6 +79,9 @@ D_OBJ= $(ROOT)/obj@TOOLCHAINEXT@/$(BUILD_TYPE)/libmbedtls XFLAGS= CFLAGS= @CFLAGS@ +ifeq (mingw,$(findstring mingw,"@TOOLCHAIN@")) +CFLAGS+= -mpclmul -msse2 -maes +endif CWARN= @CWARN@ CDEBUG= @CDEBUG@ CRELEASE= @CRELEASE@ @@ -86,6 +89,9 @@ LDDEBUG= @LDDEBUG@ LDRELEASE= @LDRELEASE@ CINCLUDE= -I. -I$(D_INC) @CINCLUDE@ +ifeq (owc,$(findstring owc,"@TOOLCHAIN@")) +CINCLUDE+= -I.\owc +endif CEXTRA= @DEFS@ ifeq ("$(BUILD_TYPE)","release") CFLAGS+= $(CRELEASE) $(CWARN) $(CINCLUDE) $(CEXTRA) $(XFLAGS) @@ -94,7 +100,7 @@ else CFLAGS+= $(CDEBUG) $(CWARN) $(CINCLUDE) $(CEXTRA) $(XFLAGS) LDFLAGS= $(LDDEBUG) @LDFLAGS@ endif -LDLIBS= -L$(D_LIB) @LIBS@ @LIBM@ @EXTRALIBS@ +LDLIBS= -L$(D_LIB) BCrypt.lib @LIBS@ @LIBM@ @EXTRALIBS@ ARFLAGS= rcv RMFLAGS= -f @@ -112,7 +118,7 @@ MBEDX509DLL= $(D_LIB)/$(LP)mbedx509.la MBEDTLSLIB= $(D_LIB)/$(LP)mbedtls_static$(A) MBEDTLSDLL= $(D_LIB)/$(LP)mbedtls.la -VERSION= 3.4.1 +VERSION= 3.5.2 VERSION_1 =$(word 1,$(subst ., ,$(VERSION))) VERSION_2 =$(word 2,$(subst ., ,$(VERSION))) VERSION_3 =$(word 3,$(subst ., ,$(VERSION))) @@ -132,120 +138,134 @@ VPATH+= $(MBEDBASE)/programs/test VPATH+= ./win32 #see: library/CMakelists.txt -CRYPTO_SOURCES= \ - aes.c \ - aesni.c \ - aria.c \ - asn1parse.c \ - asn1write.c \ - base64.c \ - bignum.c \ - bignum_core.c \ - bignum_mod.c \ - bignum_mod_raw.c \ - camellia.c \ - ccm.c \ - chacha20.c \ - chachapoly.c \ - cipher.c \ - cipher_wrap.c \ - constant_time.c \ - cmac.c \ - ctr_drbg.c \ - des.c \ - dhm.c \ - ecdh.c \ - ecdsa.c \ - ecjpake.c \ - ecp.c \ - ecp_curves.c \ - entropy.c \ - entropy_poll.c \ - error.c \ - gcm.c \ - hash_info.c \ - hkdf.c \ - hmac_drbg.c \ - lmots.c \ - lms.c \ - md.c \ - md5.c \ - memory_buffer_alloc.c \ - nist_kw.c \ - oid.c \ - padlock.c \ - pem.c \ - pk.c \ - pk_wrap.c \ - pkcs12.c \ - pkcs5.c \ - pkparse.c \ - pkwrite.c \ - platform.c \ - platform_util.c \ - poly1305.c \ - psa_crypto.c \ - psa_crypto_aead.c \ - psa_crypto_cipher.c \ - psa_crypto_client.c \ - psa_crypto_driver_wrappers.c \ - psa_crypto_ecp.c \ - psa_crypto_hash.c \ - psa_crypto_mac.c \ - psa_crypto_pake.c \ - psa_crypto_rsa.c \ - psa_crypto_se.c \ - psa_crypto_slot_management.c \ - psa_crypto_storage.c \ - psa_its_file.c \ - psa_util.c \ - ripemd160.c \ - rsa.c \ - rsa_alt_helpers.c \ - sha1.c \ - sha256.c \ - sha512.c \ - threading.c \ - timing.c \ - version.c \ +COMMON_SOURCES=\ + constant_time.c + +CRYPTO_SOURCES=\ + aes.c \ + aesce.c \ + aria.c \ + asn1parse.c \ + asn1write.c \ + base64.c \ + bignum.c \ + bignum_core.c \ + bignum_mod.c \ + bignum_mod_raw.c \ + camellia.c \ + ccm.c \ + chacha20.c \ + chachapoly.c \ + cipher.c \ + cipher_wrap.c \ + cmac.c \ + ctr_drbg.c \ + des.c \ + dhm.c \ + ecdh.c \ + ecdsa.c \ + ecjpake.c \ + ecp.c \ + ecp_curves.c \ + ecp_curves_new.c \ + entropy.c \ + entropy_poll.c \ + error.c \ + gcm.c \ + hkdf.c \ + hmac_drbg.c \ + lmots.c \ + lms.c \ + md.c \ + md5.c \ + memory_buffer_alloc.c \ + nist_kw.c \ + oid.c \ + padlock.c \ + pem.c \ + pk.c \ + pk_wrap.c \ + pkcs12.c \ + pkcs5.c \ + pkparse.c \ + pkwrite.c \ + platform.c \ + platform_util.c \ + poly1305.c \ + psa_crypto.c \ + psa_crypto_aead.c \ + psa_crypto_cipher.c \ + psa_crypto_client.c \ + psa_crypto_driver_wrappers_no_static.c \ + psa_crypto_ecp.c \ + psa_crypto_ffdh.c \ + psa_crypto_hash.c \ + psa_crypto_mac.c \ + psa_crypto_pake.c \ + psa_crypto_rsa.c \ + psa_crypto_se.c \ + psa_crypto_slot_management.c \ + psa_crypto_storage.c \ + psa_its_file.c \ + psa_util.c \ + ripemd160.c \ + rsa.c \ + rsa_alt_helpers.c \ + sha1.c \ + sha256.c \ + sha512.c \ + sha3.c \ + threading.c \ + timing.c \ + version.c \ version_features.c +ifneq (owc,$(findstring owc,"@TOOLCHAIN@")) +CRYPTO_SOURCES+=\ + aesni.c +endif + X509_SOURCES=\ - pkcs7.c \ - x509.c \ - x509_create.c \ - x509_crl.c \ - x509_crt.c \ - x509_csr.c \ - x509write_crt.c \ - x509write_csr.c \ + pkcs7.c \ + x509.c \ + x509_create.c \ + x509_crl.c \ + x509_crt.c \ + x509_csr.c \ + x509write.c \ + x509write_crt.c \ + x509write_csr.c TLS_SOURCES=\ - debug.c \ - mps_reader.c \ - mps_trace.c \ - net_sockets.c \ - ssl_cache.c \ - ssl_ciphersuites.c \ - ssl_client.c \ - ssl_cookie.c \ - ssl_debug_helpers_generated.c \ - ssl_msg.c \ - ssl_ticket.c \ - ssl_tls.c \ - ssl_tls12_client.c \ - ssl_tls12_server.c \ - ssl_tls13_keys.c \ - ssl_tls13_server.c \ - ssl_tls13_client.c \ + debug.c \ + mps_reader.c \ + mps_trace.c \ + net_sockets.c \ + ssl_cache.c \ + ssl_ciphersuites.c \ + ssl_client.c \ + ssl_cookie.c \ + ssl_debug_helpers_generated.c \ + ssl_msg.c \ + ssl_ticket.c \ + ssl_tls.c \ + ssl_tls12_client.c \ + ssl_tls12_server.c \ + ssl_tls13_keys.c \ + ssl_tls13_server.c \ + ssl_tls13_client.c \ ssl_tls13_generic.c ####### -CRYPTO_LIBOBJS=\ - $(addprefix $(D_OBJ)/,$(subst .c,$(O),$(CRYPTO_SOURCES))) -CRYPTO_DLLOBJS=\ +CRYPTO_LIBOBJS:=\ + $(addprefix $(D_OBJ)/,$(subst .c,$(O),$(CRYPTO_SOURCES) $(COMMON_SOURCES))) +CRYPTO_DLLOBJS:=\ $(subst $(O),.lo,$(CRYPTO_LIBOBJS)) \ $(D_OBJ)/crypto_globals.lo +ifeq (owc,$(findstring owc,"@TOOLCHAIN@")) +CRYPTO_LIBOBJS+=$(D_OBJ)/owc_aesni.obj +CRYPTO_DLLOBJS+=$(D_OBJ)/owc_aesni.obj +endif ifeq ("win32","@build_os@") ifeq (mingw,$(findstring mingw,"@TOOLCHAIN@")) CRYPTO_DLLOBJS+=$(D_OBJ)/libmbedtls_res.o @@ -256,7 +276,7 @@ endif ####### X509_LIBOBJS=\ - $(addprefix $(D_OBJ)/,$(subst .c,$(O),$(X509_SOURCES))) + $(addprefix $(D_OBJ)/,$(subst .c,$(O),$(X509_SOURCES) $(COMMON_SOURCES))) X509_DLLOBJS=\ $(subst $(O),.lo,$(X509_LIBOBJS)) \ $(D_OBJ)/alignment_linkage.lo \ @@ -271,7 +291,7 @@ endif ####### TLS_LIBOBJS=\ - $(addprefix $(D_OBJ)/,$(subst .c,$(O),$(TLS_SOURCES))) + $(addprefix $(D_OBJ)/,$(subst .c,$(O),$(TLS_SOURCES) $(COMMON_SOURCES))) TLS_DLLOBJS=\ $(subst $(O),.lo,$(TLS_LIBOBJS)) \ $(D_OBJ)/alignment_linkage.lo @@ -327,6 +347,11 @@ $(MBEDCRYPTOLIB): $(CRYPTO_LIBOBJS) $(RM) $(RMFLAGS) $@ $(QUIETOUT) $(AR) $(ARFLAGS) $@ $^ $(RANLIB) $@ + +ifeq (owc,$(findstring owc,"@TOOLCHAIN@")) +$(D_OBJ)/owc_aesni.obj: owc\aesni.obj + @cp owc\aesni.obj $(D_OBJ)\owc_aesni.obj +endif INSTALLED+= $(D_BIN)/libmbedcrypto.$(VERSION).dll $(MBEDCRYPTODLL): LIBNAME=libmbedcrypto @@ -384,9 +409,10 @@ source: .unpacked.$(VERSION) object: $(D_OBJ)/.created .PHONY: installinc -installinc: ../include/.created ../include/mbedtls/.created +installinc: ../include/.created ../include/mbedtls/.created ../include/psa/.created @echo publishing headers ... -cp $(MBEDINCLUDE)/mbedtls/*.h ../include/mbedtls + -cp $(MBEDINCLUDE)/psa/*.h ../include/psa -cp ./win32/*.h ../include/mbedtls %/.created: @@ -399,6 +425,7 @@ clean: -@$(RM) $(RMFLAGS) $(BAK) $(TSKS) $(INSTALLED) $(LIBS) $(CLEAN) $(XCLEAN) $(QUIETOUT) -@$(RM) $(LIBOBJS) $(QUIETOUT) -@$(RM) ../include/mbedtls/* $(QUIETOUT) + -@$(RM) ../include/psa/* $(QUIETOUT) $(D_OBJ)/%$(O): %.c $(CC) $(CFLAGS) -o $@ -c $< diff --git a/mcwin32/libmbedtls/Makefile.in.3.3.1 b/mcwin32/libmbedtls/Makefile.in.3.3.1 new file mode 100644 index 00000000..70fa33a5 --- /dev/null +++ b/mcwin32/libmbedtls/Makefile.in.3.3.1 @@ -0,0 +1,414 @@ +# -*- mode: mak; indent-tabs-mode: t; tab-width: 8 -*- +# $Id: Makefile.in,v 1.17 2023/10/02 12:11:28 cvsuser Exp $ +# libmbedtls makefile. +# +# +# Copyright (c) 2017 - 2023 Adam Young. +# All rights reserved. +# +# This file is part of the Midnight Commander. +# +# The Midnight Commander is free software: you can redistribute it +# and/or modify it under the terms of the GNU General Public License as +# published by the Free Software Foundation, either version 3 of the License, +# or (at your option) any later version. +# +# The Midnight Commander 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 General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# ==end== +# + +@SET_MAKE@ +ROOT= @abs_top_builddir@ +top_builddir= @top_builddir@ + +# File extensions + +E= +O= .o +H= .h +A= .a +LP= lib + +CLEAN= *.bak *~ *.BAK *.swp *.tmp core *.core a.out +XCLEAN= + +# Compilers, programs + +CC= @CC@ +AR= @AR@ +RANLIB= @RANLIB@ +RM= @RM@ +PERL= @PERL@ +LIBTOOL= @LIBTOOL@ +RC= @RC@ + +# Configuration + +ifeq ("$(BUILD_TYPE)","") #default +BUILD_TYPE= debug +MAKEFLAGS+= BUILD_TYPE=debug +endif +ifneq ("$(BUILD_TYPE)","release") +RTSUFFIX=d +endif + +QUIETOUT:= >/dev/null 2>&1 +ifeq ($(VERBOSE),1) +QUIETOUT:= +else ifeq ($(VERBOSE),0) +else ifeq ($(VERBOSE),) +else +$(error VERBOSE: unexpected value 0 or 1 required, $(VERBOSE) given])) +endif + +# Directories + +D_INC= $(ROOT)/include +D_BIN= $(ROOT)/bin@TOOLCHAINEXT@/$(BUILD_TYPE) +D_LIB= $(ROOT)/lib@TOOLCHAINEXT@/$(BUILD_TYPE) +D_OBJ= $(ROOT)/obj@TOOLCHAINEXT@/$(BUILD_TYPE)/libmbedtls + +# Common flags + +XFLAGS= + +CFLAGS= @CFLAGS@ +CWARN= @CWARN@ +CDEBUG= @CDEBUG@ +CRELEASE= @CRELEASE@ +LDDEBUG= @LDDEBUG@ +LDRELEASE= @LDRELEASE@ + +CINCLUDE= -I. -I$(D_INC) @CINCLUDE@ +CEXTRA= @DEFS@ +ifeq ("$(BUILD_TYPE)","release") +CFLAGS+= $(CRELEASE) $(CWARN) $(CINCLUDE) $(CEXTRA) $(XFLAGS) +LDFLAGS= $(LDRELEASE) @LDFLAGS@ +else +CFLAGS+= $(CDEBUG) $(CWARN) $(CINCLUDE) $(CEXTRA) $(XFLAGS) +LDFLAGS= $(LDDEBUG) @LDFLAGS@ +endif +LDLIBS= -L$(D_LIB) @LIBS@ @LIBM@ @EXTRALIBS@ + +ARFLAGS= rcv +RMFLAGS= -f + + +######################################################################################### +# Targets + +MBEDCRYPTOLIB= $(D_LIB)/$(LP)mbedcrypto_static$(A) +MBEDCRYPTODLL= $(D_LIB)/$(LP)mbedcrypto.la + +MBEDX509LIB= $(D_LIB)/$(LP)mbedx509_static$(A) +MBEDX509DLL= $(D_LIB)/$(LP)mbedx509.la + +MBEDTLSLIB= $(D_LIB)/$(LP)mbedtls_static$(A) +MBEDTLSDLL= $(D_LIB)/$(LP)mbedtls.la + +VERSION= 3.3.1 +VERSION_1 =$(word 1,$(subst ., ,$(VERSION))) +VERSION_2 =$(word 2,$(subst ., ,$(VERSION))) +VERSION_3 =$(word 3,$(subst ., ,$(VERSION))) +VERSIONSPEC= $(subst .,:,$(VERSION)) +VERPACKED= mbedtls-$(VERSION).gr.tgz + +MBEDBASE= ./mbedtls-$(VERSION) +MBEDSRC= $(MBEDBASE)/library +MBEDINCLUDE= $(MBEDBASE)/include + +CINCLUDE+= -I./win32 -I$(MBEDINCLUDE) +CEXTRA+= -DLIBMBED_WIN32 -DLIBMBED_HAVE_ZLIB +CEXTRA+= -DMBEDTLS_EXPORTS -DKRML_VERIFIED_UINT128 + +VPATH+= $(MBEDSRC) +VPATH+= $(MBEDBASE)/programs/test +VPATH+= ./win32 + +#see: library/CMakelists.txt +CRYPTO_SOURCES= \ + aes.c \ + aesni.c \ + aria.c \ + asn1parse.c \ + asn1write.c \ + base64.c \ + bignum.c \ + bignum_core.c \ + bignum_mod.c \ + bignum_mod_raw.c \ + camellia.c \ + ccm.c \ + chacha20.c \ + chachapoly.c \ + cipher.c \ + cipher_wrap.c \ + constant_time.c \ + cmac.c \ + ctr_drbg.c \ + des.c \ + dhm.c \ + ecdh.c \ + ecdsa.c \ + ecjpake.c \ + ecp.c \ + ecp_curves.c \ + entropy.c \ + entropy_poll.c \ + error.c \ + gcm.c \ + hash_info.c \ + hkdf.c \ + hmac_drbg.c \ + lmots.c \ + lms.c \ + md.c \ + md5.c \ + memory_buffer_alloc.c \ + nist_kw.c \ + oid.c \ + padlock.c \ + pem.c \ + pk.c \ + pk_wrap.c \ + pkcs12.c \ + pkcs5.c \ + pkparse.c \ + pkwrite.c \ + platform.c \ + platform_util.c \ + poly1305.c \ + psa_crypto.c \ + psa_crypto_aead.c \ + psa_crypto_cipher.c \ + psa_crypto_client.c \ + psa_crypto_driver_wrappers.c \ + psa_crypto_ecp.c \ + psa_crypto_hash.c \ + psa_crypto_mac.c \ + psa_crypto_pake.c \ + psa_crypto_rsa.c \ + psa_crypto_se.c \ + psa_crypto_slot_management.c \ + psa_crypto_storage.c \ + psa_its_file.c \ + ripemd160.c \ + rsa.c \ + rsa_alt_helpers.c \ + sha1.c \ + sha256.c \ + sha512.c \ + threading.c \ + timing.c \ + version.c \ + version_features.c + +X509_SOURCES=\ + pkcs7.c \ + x509.c \ + x509_create.c \ + x509_crl.c \ + x509_crt.c \ + x509_csr.c \ + x509write_crt.c \ + x509write_csr.c \ + +TLS_SOURCES=\ + debug.c \ + mps_reader.c \ + mps_trace.c \ + net_sockets.c \ + ssl_cache.c \ + ssl_ciphersuites.c \ + ssl_client.c \ + ssl_cookie.c \ + ssl_debug_helpers_generated.c \ + ssl_msg.c \ + ssl_ticket.c \ + ssl_tls.c \ + ssl_tls12_client.c \ + ssl_tls12_server.c \ + ssl_tls13_keys.c \ + ssl_tls13_server.c \ + ssl_tls13_client.c \ + ssl_tls13_generic.c + +####### +CRYPTO_LIBOBJS=\ + $(addprefix $(D_OBJ)/,$(subst .c,$(O),$(CRYPTO_SOURCES))) +CRYPTO_DLLOBJS=\ + $(subst $(O),.lo,$(CRYPTO_LIBOBJS)) \ + $(D_OBJ)/crypto_globals.lo +ifeq ("win32","@build_os@") +ifeq (mingw,$(findstring mingw,"@TOOLCHAIN@")) +CRYPTO_DLLOBJS+=$(D_OBJ)/libmbedtls_res.o +else +CRYPTO_DLLOBJS+=$(D_OBJ)/libmbedtls.res +endif +endif + +####### +X509_LIBOBJS=\ + $(addprefix $(D_OBJ)/,$(subst .c,$(O),$(X509_SOURCES))) +X509_DLLOBJS=\ + $(subst $(O),.lo,$(X509_LIBOBJS)) \ + $(D_OBJ)/alignment_linkage.lo \ + $(D_OBJ)/x509_globals.lo +ifeq ("win32","@build_os@") +ifeq (mingw,$(findstring mingw,"@TOOLCHAIN@")) +X509_DLLOBJS+= $(D_OBJ)/libmbedtls_res.o +else +X509_DLLOBJS+= $(D_OBJ)/libmbedtls.res +endif +endif + +####### +TLS_LIBOBJS=\ + $(addprefix $(D_OBJ)/,$(subst .c,$(O),$(TLS_SOURCES))) +TLS_DLLOBJS=\ + $(subst $(O),.lo,$(TLS_LIBOBJS)) \ + $(D_OBJ)/alignment_linkage.lo +ifeq ("win32","@build_os@") +ifeq (mingw,$(findstring mingw,"@TOOLCHAIN@")) +TLS_DLLOBJS+= $(D_OBJ)/libmbedtls_res.o +else +TLS_DLLOBJS+= $(D_OBJ)/libmbedtls.res +endif +endif + +### +LIBOBJS= $(CRYPTO_LIBOBJS) \ + $(X509_LIBOBJS) \ + $(TLS_LIBOBJS) + +DLLOBJS= $(CRYPTO_DLLOBJS) \ + $(X509_DLLOBJS) \ + $(TLS_DLLOBJS) + +LIBS= $(MBEDCRYPTOLIB) \ + $(MBEDX509LIB) \ + $(MBEDTLSLIB) + +DLLS= $(MBEDCRYPTODLL) \ + $(MBEDX509DLL) \ + $(MBEDTLSDLL) + +TARGET= mbedtls_selftest$(E) +TARGETOBJS= $(D_OBJ)/selftest$(O) + +TSKS= $(D_BIN)/$(TARGET) +INSTALLED= + + +######################################################################################### +# Rules + +.PHONY: build release debug +build: source unpacked +unpacked: object $(LIBS) $(DLLS) $(TSKS) installinc + +release: + $(MAKE) BUILD_TYPE=release $(filter-out release, $(MAKECMDGOALS)) +debug: + $(MAKE) BUILD_TYPE=debug $(filter-out debug, $(MAKECMDGOALS)) + +CEXTRA += -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE + +####### +$(MBEDCRYPTOLIB): CEXTRA += -DLIBMBED_STATIC -DLIBMBEDCRYPTO_SOURCE +$(MBEDCRYPTOLIB): $(CRYPTO_LIBOBJS) + $(RM) $(RMFLAGS) $@ $(QUIETOUT) + $(AR) $(ARFLAGS) $@ $^ + $(RANLIB) $@ + +INSTALLED+= $(D_BIN)/libmbedcrypto.$(VERSION).dll +$(MBEDCRYPTODLL): LIBNAME=libmbedcrypto +$(MBEDCRYPTODLL): LIBDEF=-export-symbols win32/libmbedcrypto.def.$(VERSION) +$(MBEDCRYPTODLL): CEXTRA += -DLIBMBED_DYNAMIC -DLIBMBEDCRYPTO_SOURCE -D_WINDLL +$(MBEDCRYPTODLL): $(CRYPTO_DLLOBJS) + $(LIBTOOL) --mode=link $(CC) $(LDFLAGS) -version-number $(VERSIONSPEC) \ + -rpath $(D_LIB) -bindir $(D_BIN) $(LIBDEF) -o $@ $^ $(LDLIBS) + +####### +$(MBEDX509LIB): CEXTRA += -DLIBMBED_STATIC -DLIBMBEDX509_SOURCE -DLIBMBEDX509 +$(MBEDX509LIB): $(X509_LIBOBJS) + $(RM) $(RMFLAGS) $@ $(QUIETOUT) + $(AR) $(ARFLAGS) $@ $^ + $(RANLIB) $@ + +INSTALLED+= $(D_BIN)/libmbedx509.$(VERSION).dll +$(MBEDX509DLL): LIBNAME=libmbedx509 +$(MBEDX509DLL): LIBDEF=-export-symbols win32/libmbedx509.def.$(VERSION) +$(MBEDX509DLL): CEXTRA += -DLIBMBED_DYNAMIC -DLIBMBEDX509_SOURCE -D_WINDLL +$(MBEDX509DLL): $(X509_DLLOBJS) + $(LIBTOOL) --mode=link $(CC) $(LDFLAGS) -version-number $(VERSIONSPEC) \ + -rpath $(D_LIB) -bindir $(D_BIN) $(LIBDEF) -o $@ $^ -lmbedcrypto $(LDLIBS) + +####### +$(MBEDTLSLIB): CEXTRA += -DLIBMBED_STATIC -DLIBMBEDTLS_SOURCE +$(MBEDTLSLIB): $(TLS_LIBOBJS) + $(RM) $(RMFLAGS) $@ $(QUIETOUT) + $(AR) $(ARFLAGS) $@ $^ + $(RANLIB) $@ + +INSTALLED+= $(D_BIN)/libmbedtls.$(VERSION).dll +$(MBEDTLSDLL): LIBNAME=libmbedtls +$(MBEDTLSDLL): LIBDEF=-export-symbols win32/libmbedtls.def.$(VERSION) +$(MBEDTLSDLL): CEXTRA += -DLIBMBED_DYNAMIC -DLIBMBEDTLS_SOURCE -DLIBMBEDTLS -D_WINDLL +$(MBEDTLSDLL): $(TLS_DLLOBJS) + $(LIBTOOL) --mode=link $(CC) $(LDFLAGS) -version-number $(VERSIONSPEC) \ + -rpath $(D_LIB) -bindir $(D_BIN) $(LIBDEF) -o $@ $^ -lmbedcrypto -lmbedx509 $(LDLIBS) + +####### +$(D_BIN)/$(TARGET): MAPFILE=$(basename $@).map +$(D_BIN)/$(TARGET): $(D_OBJ)/.created $(TARGETOBJS) + $(LIBTOOL) --mode=link $(CC) $(LDFLAGS) -o $@ $(TARGETOBJS) $(LDFLAGS) -lmbedtls -lmbedcrypto -lmbedx509 $(LDLIBS) @LDMAPFILE@ + +####### +source: .unpacked.$(VERSION) + $(MAKE) unpacked + +.unpacked.$(VERSION): $(VERPACKED) + @echo "do not delete, managed file" > $@ + @echo "unpacking source $(VERPACKED)" + @gzip -c -d $(VERPACKED) | tar -xvf - + +.PHONY: object +object: $(D_OBJ)/.created + +.PHONY: installinc +installinc: ../include/.created ../include/mbedtls/.created + @echo publishing headers ... + -cp $(MBEDINCLUDE)/mbedtls/*.h ../include/mbedtls + -cp ./win32/*.h ../include/mbedtls + +%/.created: + -@mkdir $(@D) + @echo "do not delete, managed directory" > $@ + +clean: + @echo $(BUILD_TYPE) clean + -@$(LIBTOOL) --mode=clean $(RM) $(DLLS) $(DLLOBJS) $(QUIETOUT) + -@$(RM) $(RMFLAGS) $(BAK) $(TSKS) $(INSTALLED) $(LIBS) $(CLEAN) $(XCLEAN) $(QUIETOUT) + -@$(RM) $(LIBOBJS) $(QUIETOUT) + -@$(RM) ../include/mbedtls/* $(QUIETOUT) + +$(D_OBJ)/%$(O): %.c + $(CC) $(CFLAGS) -o $@ -c $< + +$(D_OBJ)/%.lo: %.c + $(LIBTOOL) --mode=compile $(CC) $(CFLAGS) -o $@ -c $< + +$(D_OBJ)/%.res: %.rc + $(RC) -DLIBNAME=$(LIBNAME) -DVERSION=$(VERSION) -DVERSION_1=$(VERSION_1) -DVERSION_2=$(VERSION_2) -DVERSION_3=$(VERSION_3) -fo $@ $< + +$(D_OBJ)/%_res.o: %.rc + $(RC) -DLIBNAME=$(LIBNAME) -DVERSION=$(VERSION) -DVERSION_1=$(VERSION_1) -DVERSION_2=$(VERSION_2) -DVERSION_3=$(VERSION_3) -o $@ $< + +#end diff --git a/mcwin32/libmbedtls/Makefile.in.3.4.1 b/mcwin32/libmbedtls/Makefile.in.3.4.1 new file mode 100644 index 00000000..97a75cbe --- /dev/null +++ b/mcwin32/libmbedtls/Makefile.in.3.4.1 @@ -0,0 +1,415 @@ +# -*- mode: mak; indent-tabs-mode: t; tab-width: 8 -*- +# $Id: Makefile.in,v 1.17 2023/10/02 12:11:28 cvsuser Exp $ +# libmbedtls makefile. +# +# +# Copyright (c) 2017 - 2023 Adam Young. +# All rights reserved. +# +# This file is part of the Midnight Commander. +# +# The Midnight Commander is free software: you can redistribute it +# and/or modify it under the terms of the GNU General Public License as +# published by the Free Software Foundation, either version 3 of the License, +# or (at your option) any later version. +# +# The Midnight Commander 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 General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# ==end== +# + +@SET_MAKE@ +ROOT= @abs_top_builddir@ +top_builddir= @top_builddir@ + +# File extensions + +E= +O= .o +H= .h +A= .a +LP= lib + +CLEAN= *.bak *~ *.BAK *.swp *.tmp core *.core a.out +XCLEAN= + +# Compilers, programs + +CC= @CC@ +AR= @AR@ +RANLIB= @RANLIB@ +RM= @RM@ +PERL= @PERL@ +LIBTOOL= @LIBTOOL@ +RC= @RC@ + +# Configuration + +ifeq ("$(BUILD_TYPE)","") #default +BUILD_TYPE= debug +MAKEFLAGS+= BUILD_TYPE=debug +endif +ifneq ("$(BUILD_TYPE)","release") +RTSUFFIX=d +endif + +QUIETOUT:= >/dev/null 2>&1 +ifeq ($(VERBOSE),1) +QUIETOUT:= +else ifeq ($(VERBOSE),0) +else ifeq ($(VERBOSE),) +else +$(error VERBOSE: unexpected value 0 or 1 required, $(VERBOSE) given])) +endif + +# Directories + +D_INC= $(ROOT)/include +D_BIN= $(ROOT)/bin@TOOLCHAINEXT@/$(BUILD_TYPE) +D_LIB= $(ROOT)/lib@TOOLCHAINEXT@/$(BUILD_TYPE) +D_OBJ= $(ROOT)/obj@TOOLCHAINEXT@/$(BUILD_TYPE)/libmbedtls + +# Common flags + +XFLAGS= + +CFLAGS= @CFLAGS@ +CWARN= @CWARN@ +CDEBUG= @CDEBUG@ +CRELEASE= @CRELEASE@ +LDDEBUG= @LDDEBUG@ +LDRELEASE= @LDRELEASE@ + +CINCLUDE= -I. -I$(D_INC) @CINCLUDE@ +CEXTRA= @DEFS@ +ifeq ("$(BUILD_TYPE)","release") +CFLAGS+= $(CRELEASE) $(CWARN) $(CINCLUDE) $(CEXTRA) $(XFLAGS) +LDFLAGS= $(LDRELEASE) @LDFLAGS@ +else +CFLAGS+= $(CDEBUG) $(CWARN) $(CINCLUDE) $(CEXTRA) $(XFLAGS) +LDFLAGS= $(LDDEBUG) @LDFLAGS@ +endif +LDLIBS= -L$(D_LIB) @LIBS@ @LIBM@ @EXTRALIBS@ + +ARFLAGS= rcv +RMFLAGS= -f + + +######################################################################################### +# Targets + +MBEDCRYPTOLIB= $(D_LIB)/$(LP)mbedcrypto_static$(A) +MBEDCRYPTODLL= $(D_LIB)/$(LP)mbedcrypto.la + +MBEDX509LIB= $(D_LIB)/$(LP)mbedx509_static$(A) +MBEDX509DLL= $(D_LIB)/$(LP)mbedx509.la + +MBEDTLSLIB= $(D_LIB)/$(LP)mbedtls_static$(A) +MBEDTLSDLL= $(D_LIB)/$(LP)mbedtls.la + +VERSION= 3.4.1 +VERSION_1 =$(word 1,$(subst ., ,$(VERSION))) +VERSION_2 =$(word 2,$(subst ., ,$(VERSION))) +VERSION_3 =$(word 3,$(subst ., ,$(VERSION))) +VERSIONSPEC= $(subst .,:,$(VERSION)) +VERPACKED= mbedtls-$(VERSION).gr.tgz + +MBEDBASE= ./mbedtls-$(VERSION) +MBEDSRC= $(MBEDBASE)/library +MBEDINCLUDE= $(MBEDBASE)/include + +CINCLUDE+= -I./win32 -I$(MBEDINCLUDE) +CEXTRA+= -DLIBMBED_WIN32 -DLIBMBED_HAVE_ZLIB +CEXTRA+= -DMBEDTLS_EXPORTS -DKRML_VERIFIED_UINT128 + +VPATH+= $(MBEDSRC) +VPATH+= $(MBEDBASE)/programs/test +VPATH+= ./win32 + +#see: library/CMakelists.txt +CRYPTO_SOURCES= \ + aes.c \ + aesni.c \ + aria.c \ + asn1parse.c \ + asn1write.c \ + base64.c \ + bignum.c \ + bignum_core.c \ + bignum_mod.c \ + bignum_mod_raw.c \ + camellia.c \ + ccm.c \ + chacha20.c \ + chachapoly.c \ + cipher.c \ + cipher_wrap.c \ + constant_time.c \ + cmac.c \ + ctr_drbg.c \ + des.c \ + dhm.c \ + ecdh.c \ + ecdsa.c \ + ecjpake.c \ + ecp.c \ + ecp_curves.c \ + entropy.c \ + entropy_poll.c \ + error.c \ + gcm.c \ + hash_info.c \ + hkdf.c \ + hmac_drbg.c \ + lmots.c \ + lms.c \ + md.c \ + md5.c \ + memory_buffer_alloc.c \ + nist_kw.c \ + oid.c \ + padlock.c \ + pem.c \ + pk.c \ + pk_wrap.c \ + pkcs12.c \ + pkcs5.c \ + pkparse.c \ + pkwrite.c \ + platform.c \ + platform_util.c \ + poly1305.c \ + psa_crypto.c \ + psa_crypto_aead.c \ + psa_crypto_cipher.c \ + psa_crypto_client.c \ + psa_crypto_driver_wrappers.c \ + psa_crypto_ecp.c \ + psa_crypto_hash.c \ + psa_crypto_mac.c \ + psa_crypto_pake.c \ + psa_crypto_rsa.c \ + psa_crypto_se.c \ + psa_crypto_slot_management.c \ + psa_crypto_storage.c \ + psa_its_file.c \ + psa_util.c \ + ripemd160.c \ + rsa.c \ + rsa_alt_helpers.c \ + sha1.c \ + sha256.c \ + sha512.c \ + threading.c \ + timing.c \ + version.c \ + version_features.c + +X509_SOURCES=\ + pkcs7.c \ + x509.c \ + x509_create.c \ + x509_crl.c \ + x509_crt.c \ + x509_csr.c \ + x509write_crt.c \ + x509write_csr.c \ + +TLS_SOURCES=\ + debug.c \ + mps_reader.c \ + mps_trace.c \ + net_sockets.c \ + ssl_cache.c \ + ssl_ciphersuites.c \ + ssl_client.c \ + ssl_cookie.c \ + ssl_debug_helpers_generated.c \ + ssl_msg.c \ + ssl_ticket.c \ + ssl_tls.c \ + ssl_tls12_client.c \ + ssl_tls12_server.c \ + ssl_tls13_keys.c \ + ssl_tls13_server.c \ + ssl_tls13_client.c \ + ssl_tls13_generic.c + +####### +CRYPTO_LIBOBJS=\ + $(addprefix $(D_OBJ)/,$(subst .c,$(O),$(CRYPTO_SOURCES))) +CRYPTO_DLLOBJS=\ + $(subst $(O),.lo,$(CRYPTO_LIBOBJS)) \ + $(D_OBJ)/crypto_globals.lo +ifeq ("win32","@build_os@") +ifeq (mingw,$(findstring mingw,"@TOOLCHAIN@")) +CRYPTO_DLLOBJS+=$(D_OBJ)/libmbedtls_res.o +else +CRYPTO_DLLOBJS+=$(D_OBJ)/libmbedtls.res +endif +endif + +####### +X509_LIBOBJS=\ + $(addprefix $(D_OBJ)/,$(subst .c,$(O),$(X509_SOURCES))) +X509_DLLOBJS=\ + $(subst $(O),.lo,$(X509_LIBOBJS)) \ + $(D_OBJ)/alignment_linkage.lo \ + $(D_OBJ)/x509_globals.lo +ifeq ("win32","@build_os@") +ifeq (mingw,$(findstring mingw,"@TOOLCHAIN@")) +X509_DLLOBJS+= $(D_OBJ)/libmbedtls_res.o +else +X509_DLLOBJS+= $(D_OBJ)/libmbedtls.res +endif +endif + +####### +TLS_LIBOBJS=\ + $(addprefix $(D_OBJ)/,$(subst .c,$(O),$(TLS_SOURCES))) +TLS_DLLOBJS=\ + $(subst $(O),.lo,$(TLS_LIBOBJS)) \ + $(D_OBJ)/alignment_linkage.lo +ifeq ("win32","@build_os@") +ifeq (mingw,$(findstring mingw,"@TOOLCHAIN@")) +TLS_DLLOBJS+= $(D_OBJ)/libmbedtls_res.o +else +TLS_DLLOBJS+= $(D_OBJ)/libmbedtls.res +endif +endif + +### +LIBOBJS= $(CRYPTO_LIBOBJS) \ + $(X509_LIBOBJS) \ + $(TLS_LIBOBJS) + +DLLOBJS= $(CRYPTO_DLLOBJS) \ + $(X509_DLLOBJS) \ + $(TLS_DLLOBJS) + +LIBS= $(MBEDCRYPTOLIB) \ + $(MBEDX509LIB) \ + $(MBEDTLSLIB) + +DLLS= $(MBEDCRYPTODLL) \ + $(MBEDX509DLL) \ + $(MBEDTLSDLL) + +TARGET= mbedtls_selftest$(E) +TARGETOBJS= $(D_OBJ)/selftest$(O) + +TSKS= $(D_BIN)/$(TARGET) +INSTALLED= + + +######################################################################################### +# Rules + +.PHONY: build release debug +build: source unpacked +unpacked: object $(LIBS) $(DLLS) $(TSKS) installinc + +release: + $(MAKE) BUILD_TYPE=release $(filter-out release, $(MAKECMDGOALS)) +debug: + $(MAKE) BUILD_TYPE=debug $(filter-out debug, $(MAKECMDGOALS)) + +CEXTRA += -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE + +####### +$(MBEDCRYPTOLIB): CEXTRA += -DLIBMBED_STATIC -DLIBMBEDCRYPTO_SOURCE +$(MBEDCRYPTOLIB): $(CRYPTO_LIBOBJS) + $(RM) $(RMFLAGS) $@ $(QUIETOUT) + $(AR) $(ARFLAGS) $@ $^ + $(RANLIB) $@ + +INSTALLED+= $(D_BIN)/libmbedcrypto.$(VERSION).dll +$(MBEDCRYPTODLL): LIBNAME=libmbedcrypto +$(MBEDCRYPTODLL): LIBDEF=-export-symbols win32/libmbedcrypto.def.$(VERSION) +$(MBEDCRYPTODLL): CEXTRA += -DLIBMBED_DYNAMIC -DLIBMBEDCRYPTO_SOURCE -D_WINDLL +$(MBEDCRYPTODLL): $(CRYPTO_DLLOBJS) + $(LIBTOOL) --mode=link $(CC) $(LDFLAGS) -version-number $(VERSIONSPEC) \ + -rpath $(D_LIB) -bindir $(D_BIN) $(LIBDEF) -o $@ $^ $(LDLIBS) + +####### +$(MBEDX509LIB): CEXTRA += -DLIBMBED_STATIC -DLIBMBEDX509_SOURCE -DLIBMBEDX509 +$(MBEDX509LIB): $(X509_LIBOBJS) + $(RM) $(RMFLAGS) $@ $(QUIETOUT) + $(AR) $(ARFLAGS) $@ $^ + $(RANLIB) $@ + +INSTALLED+= $(D_BIN)/libmbedx509.$(VERSION).dll +$(MBEDX509DLL): LIBNAME=libmbedx509 +$(MBEDX509DLL): LIBDEF=-export-symbols win32/libmbedx509.def.$(VERSION) +$(MBEDX509DLL): CEXTRA += -DLIBMBED_DYNAMIC -DLIBMBEDX509_SOURCE -D_WINDLL +$(MBEDX509DLL): $(X509_DLLOBJS) + $(LIBTOOL) --mode=link $(CC) $(LDFLAGS) -version-number $(VERSIONSPEC) \ + -rpath $(D_LIB) -bindir $(D_BIN) $(LIBDEF) -o $@ $^ -lmbedcrypto $(LDLIBS) + +####### +$(MBEDTLSLIB): CEXTRA += -DLIBMBED_STATIC -DLIBMBEDTLS_SOURCE +$(MBEDTLSLIB): $(TLS_LIBOBJS) + $(RM) $(RMFLAGS) $@ $(QUIETOUT) + $(AR) $(ARFLAGS) $@ $^ + $(RANLIB) $@ + +INSTALLED+= $(D_BIN)/libmbedtls.$(VERSION).dll +$(MBEDTLSDLL): LIBNAME=libmbedtls +$(MBEDTLSDLL): LIBDEF=-export-symbols win32/libmbedtls.def.$(VERSION) +$(MBEDTLSDLL): CEXTRA += -DLIBMBED_DYNAMIC -DLIBMBEDTLS_SOURCE -DLIBMBEDTLS -D_WINDLL +$(MBEDTLSDLL): $(TLS_DLLOBJS) + $(LIBTOOL) --mode=link $(CC) $(LDFLAGS) -version-number $(VERSIONSPEC) \ + -rpath $(D_LIB) -bindir $(D_BIN) $(LIBDEF) -o $@ $^ -lmbedcrypto -lmbedx509 $(LDLIBS) + +####### +$(D_BIN)/$(TARGET): MAPFILE=$(basename $@).map +$(D_BIN)/$(TARGET): $(D_OBJ)/.created $(TARGETOBJS) + $(LIBTOOL) --mode=link $(CC) $(LDFLAGS) -o $@ $(TARGETOBJS) $(LDFLAGS) -lmbedtls -lmbedcrypto -lmbedx509 $(LDLIBS) @LDMAPFILE@ + +####### +source: .unpacked.$(VERSION) + $(MAKE) unpacked + +.unpacked.$(VERSION): $(VERPACKED) + @echo "do not delete, managed file" > $@ + @echo "unpacking source $(VERPACKED)" + @gzip -c -d $(VERPACKED) | tar -xvf - + +.PHONY: object +object: $(D_OBJ)/.created + +.PHONY: installinc +installinc: ../include/.created ../include/mbedtls/.created + @echo publishing headers ... + -cp $(MBEDINCLUDE)/mbedtls/*.h ../include/mbedtls + -cp ./win32/*.h ../include/mbedtls + +%/.created: + -@mkdir $(@D) + @echo "do not delete, managed directory" > $@ + +clean: + @echo $(BUILD_TYPE) clean + -@$(LIBTOOL) --mode=clean $(RM) $(DLLS) $(DLLOBJS) $(QUIETOUT) + -@$(RM) $(RMFLAGS) $(BAK) $(TSKS) $(INSTALLED) $(LIBS) $(CLEAN) $(XCLEAN) $(QUIETOUT) + -@$(RM) $(LIBOBJS) $(QUIETOUT) + -@$(RM) ../include/mbedtls/* $(QUIETOUT) + +$(D_OBJ)/%$(O): %.c + $(CC) $(CFLAGS) -o $@ -c $< + +$(D_OBJ)/%.lo: %.c + $(LIBTOOL) --mode=compile $(CC) $(CFLAGS) -o $@ -c $< + +$(D_OBJ)/%.res: %.rc + $(RC) -DLIBNAME=$(LIBNAME) -DVERSION=$(VERSION) -DVERSION_1=$(VERSION_1) -DVERSION_2=$(VERSION_2) -DVERSION_3=$(VERSION_3) -fo $@ $< + +$(D_OBJ)/%_res.o: %.rc + $(RC) -DLIBNAME=$(LIBNAME) -DVERSION=$(VERSION) -DVERSION_1=$(VERSION_1) -DVERSION_2=$(VERSION_2) -DVERSION_3=$(VERSION_3) -o $@ $< + +#end diff --git a/mcwin32/libmbedtls/Makefile.in.3.5.2 b/mcwin32/libmbedtls/Makefile.in.3.5.2 new file mode 100644 index 00000000..5e488735 --- /dev/null +++ b/mcwin32/libmbedtls/Makefile.in.3.5.2 @@ -0,0 +1,440 @@ +# -*- mode: mak; indent-tabs-mode: t; tab-width: 8 -*- +# $Id: Makefile.in,v 1.17 2023/10/02 12:11:28 cvsuser Exp $ +# libmbedtls makefile. +# +# +# Copyright (c) 2017 - 2024 Adam Young. +# All rights reserved. +# +# This file is part of the Midnight Commander. +# +# The Midnight Commander is free software: you can redistribute it +# and/or modify it under the terms of the GNU General Public License as +# published by the Free Software Foundation, either version 3 of the License, +# or (at your option) any later version. +# +# The Midnight Commander 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 General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# ==end== +# + +@SET_MAKE@ +ROOT= @abs_top_builddir@ +top_builddir= @top_builddir@ + +# File extensions + +E= +O= .o +H= .h +A= .a +LP= lib + +CLEAN= *.bak *~ *.BAK *.swp *.tmp core *.core a.out +XCLEAN= + +# Compilers, programs + +CC= @CC@ +AR= @AR@ +RANLIB= @RANLIB@ +RM= @RM@ +PERL= @PERL@ +LIBTOOL= @LIBTOOL@ +RC= @RC@ + +# Configuration + +ifeq ("$(BUILD_TYPE)","") #default +BUILD_TYPE= debug +MAKEFLAGS+= BUILD_TYPE=debug +endif +ifneq ("$(BUILD_TYPE)","release") +RTSUFFIX=d +endif + +QUIETOUT:= >/dev/null 2>&1 +ifeq ($(VERBOSE),1) +QUIETOUT:= +else ifeq ($(VERBOSE),0) +else ifeq ($(VERBOSE),) +else +$(error VERBOSE: unexpected value 0 or 1 required, $(VERBOSE) given])) +endif + +# Directories + +D_INC= $(ROOT)/include +D_BIN= $(ROOT)/bin@TOOLCHAINEXT@/$(BUILD_TYPE) +D_LIB= $(ROOT)/lib@TOOLCHAINEXT@/$(BUILD_TYPE) +D_OBJ= $(ROOT)/obj@TOOLCHAINEXT@/$(BUILD_TYPE)/libmbedtls + +# Common flags + +XFLAGS= + +CFLAGS= @CFLAGS@ +ifeq (mingw,$(findstring mingw,"@TOOLCHAIN@")) +CFLAGS+= -mpclmul -msse2 -maes +endif +CWARN= @CWARN@ +CDEBUG= @CDEBUG@ +CRELEASE= @CRELEASE@ +LDDEBUG= @LDDEBUG@ +LDRELEASE= @LDRELEASE@ + +CINCLUDE= -I. -I$(D_INC) @CINCLUDE@ +ifeq (owc,$(findstring owc,"@TOOLCHAIN@")) +CINCLUDE+= -I.\owc +endif +CEXTRA= @DEFS@ +ifeq ("$(BUILD_TYPE)","release") +CFLAGS+= $(CRELEASE) $(CWARN) $(CINCLUDE) $(CEXTRA) $(XFLAGS) +LDFLAGS= $(LDRELEASE) @LDFLAGS@ +else +CFLAGS+= $(CDEBUG) $(CWARN) $(CINCLUDE) $(CEXTRA) $(XFLAGS) +LDFLAGS= $(LDDEBUG) @LDFLAGS@ +endif +LDLIBS= -L$(D_LIB) BCrypt.lib @LIBS@ @LIBM@ @EXTRALIBS@ + +ARFLAGS= rcv +RMFLAGS= -f + + +######################################################################################### +# Targets + +MBEDCRYPTOLIB= $(D_LIB)/$(LP)mbedcrypto_static$(A) +MBEDCRYPTODLL= $(D_LIB)/$(LP)mbedcrypto.la + +MBEDX509LIB= $(D_LIB)/$(LP)mbedx509_static$(A) +MBEDX509DLL= $(D_LIB)/$(LP)mbedx509.la + +MBEDTLSLIB= $(D_LIB)/$(LP)mbedtls_static$(A) +MBEDTLSDLL= $(D_LIB)/$(LP)mbedtls.la + +VERSION= 3.5.2 +VERSION_1 =$(word 1,$(subst ., ,$(VERSION))) +VERSION_2 =$(word 2,$(subst ., ,$(VERSION))) +VERSION_3 =$(word 3,$(subst ., ,$(VERSION))) +VERSIONSPEC= $(subst .,:,$(VERSION)) +VERPACKED= mbedtls-$(VERSION).gr.tgz + +MBEDBASE= ./mbedtls-$(VERSION) +MBEDSRC= $(MBEDBASE)/library +MBEDINCLUDE= $(MBEDBASE)/include + +CINCLUDE+= -I./win32 -I$(MBEDINCLUDE) +CEXTRA+= -DLIBMBED_WIN32 -DLIBMBED_HAVE_ZLIB +CEXTRA+= -DMBEDTLS_EXPORTS -DKRML_VERIFIED_UINT128 + +VPATH+= $(MBEDSRC) +VPATH+= $(MBEDBASE)/programs/test +VPATH+= ./win32 + +#see: library/CMakelists.txt +COMMON_SOURCES=\ + constant_time.c + +CRYPTO_SOURCES=\ + aes.c \ + aesce.c \ + aria.c \ + asn1parse.c \ + asn1write.c \ + base64.c \ + bignum.c \ + bignum_core.c \ + bignum_mod.c \ + bignum_mod_raw.c \ + camellia.c \ + ccm.c \ + chacha20.c \ + chachapoly.c \ + cipher.c \ + cipher_wrap.c \ + cmac.c \ + ctr_drbg.c \ + des.c \ + dhm.c \ + ecdh.c \ + ecdsa.c \ + ecjpake.c \ + ecp.c \ + ecp_curves.c \ + ecp_curves_new.c \ + entropy.c \ + entropy_poll.c \ + error.c \ + gcm.c \ + hkdf.c \ + hmac_drbg.c \ + lmots.c \ + lms.c \ + md.c \ + md5.c \ + memory_buffer_alloc.c \ + nist_kw.c \ + oid.c \ + padlock.c \ + pem.c \ + pk.c \ + pk_wrap.c \ + pkcs12.c \ + pkcs5.c \ + pkparse.c \ + pkwrite.c \ + platform.c \ + platform_util.c \ + poly1305.c \ + psa_crypto.c \ + psa_crypto_aead.c \ + psa_crypto_cipher.c \ + psa_crypto_client.c \ + psa_crypto_driver_wrappers_no_static.c \ + psa_crypto_ecp.c \ + psa_crypto_ffdh.c \ + psa_crypto_hash.c \ + psa_crypto_mac.c \ + psa_crypto_pake.c \ + psa_crypto_rsa.c \ + psa_crypto_se.c \ + psa_crypto_slot_management.c \ + psa_crypto_storage.c \ + psa_its_file.c \ + psa_util.c \ + ripemd160.c \ + rsa.c \ + rsa_alt_helpers.c \ + sha1.c \ + sha256.c \ + sha512.c \ + sha3.c \ + threading.c \ + timing.c \ + version.c \ + version_features.c + +ifneq (owc,$(findstring owc,"@TOOLCHAIN@")) +CRYPTO_SOURCES+=\ + aesni.c +endif + +X509_SOURCES=\ + pkcs7.c \ + x509.c \ + x509_create.c \ + x509_crl.c \ + x509_crt.c \ + x509_csr.c \ + x509write.c \ + x509write_crt.c \ + x509write_csr.c + +TLS_SOURCES=\ + debug.c \ + mps_reader.c \ + mps_trace.c \ + net_sockets.c \ + ssl_cache.c \ + ssl_ciphersuites.c \ + ssl_client.c \ + ssl_cookie.c \ + ssl_debug_helpers_generated.c \ + ssl_msg.c \ + ssl_ticket.c \ + ssl_tls.c \ + ssl_tls12_client.c \ + ssl_tls12_server.c \ + ssl_tls13_keys.c \ + ssl_tls13_server.c \ + ssl_tls13_client.c \ + ssl_tls13_generic.c + +####### +CRYPTO_LIBOBJS:=\ + $(addprefix $(D_OBJ)/,$(subst .c,$(O),$(CRYPTO_SOURCES) $(COMMON_SOURCES))) +CRYPTO_DLLOBJS:=\ + $(subst $(O),.lo,$(CRYPTO_LIBOBJS)) \ + $(D_OBJ)/crypto_globals.lo +ifeq (owc,$(findstring owc,"@TOOLCHAIN@")) +CRYPTO_LIBOBJS+=$(D_OBJ)/owc_aesni.obj +CRYPTO_DLLOBJS+=$(D_OBJ)/owc_aesni.obj +endif +ifeq ("win32","@build_os@") +ifeq (mingw,$(findstring mingw,"@TOOLCHAIN@")) +CRYPTO_DLLOBJS+=$(D_OBJ)/libmbedtls_res.o +else +CRYPTO_DLLOBJS+=$(D_OBJ)/libmbedtls.res +endif +endif + +####### +X509_LIBOBJS=\ + $(addprefix $(D_OBJ)/,$(subst .c,$(O),$(X509_SOURCES) $(COMMON_SOURCES))) +X509_DLLOBJS=\ + $(subst $(O),.lo,$(X509_LIBOBJS)) \ + $(D_OBJ)/alignment_linkage.lo \ + $(D_OBJ)/x509_globals.lo +ifeq ("win32","@build_os@") +ifeq (mingw,$(findstring mingw,"@TOOLCHAIN@")) +X509_DLLOBJS+= $(D_OBJ)/libmbedtls_res.o +else +X509_DLLOBJS+= $(D_OBJ)/libmbedtls.res +endif +endif + +####### +TLS_LIBOBJS=\ + $(addprefix $(D_OBJ)/,$(subst .c,$(O),$(TLS_SOURCES) $(COMMON_SOURCES))) +TLS_DLLOBJS=\ + $(subst $(O),.lo,$(TLS_LIBOBJS)) \ + $(D_OBJ)/alignment_linkage.lo +ifeq ("win32","@build_os@") +ifeq (mingw,$(findstring mingw,"@TOOLCHAIN@")) +TLS_DLLOBJS+= $(D_OBJ)/libmbedtls_res.o +else +TLS_DLLOBJS+= $(D_OBJ)/libmbedtls.res +endif +endif + +### +LIBOBJS= $(CRYPTO_LIBOBJS) \ + $(X509_LIBOBJS) \ + $(TLS_LIBOBJS) + +DLLOBJS= $(CRYPTO_DLLOBJS) \ + $(X509_DLLOBJS) \ + $(TLS_DLLOBJS) + +LIBS= $(MBEDCRYPTOLIB) \ + $(MBEDX509LIB) \ + $(MBEDTLSLIB) + +DLLS= $(MBEDCRYPTODLL) \ + $(MBEDX509DLL) \ + $(MBEDTLSDLL) + +TARGET= mbedtls_selftest$(E) +TARGETOBJS= $(D_OBJ)/selftest$(O) + +TSKS= $(D_BIN)/$(TARGET) +INSTALLED= + + +######################################################################################### +# Rules + +.PHONY: build release debug +build: source unpacked +unpacked: object $(LIBS) $(DLLS) $(TSKS) installinc + +release: + $(MAKE) BUILD_TYPE=release $(filter-out release, $(MAKECMDGOALS)) +debug: + $(MAKE) BUILD_TYPE=debug $(filter-out debug, $(MAKECMDGOALS)) + +CEXTRA += -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE + +####### +$(MBEDCRYPTOLIB): CEXTRA += -DLIBMBED_STATIC -DLIBMBEDCRYPTO_SOURCE +$(MBEDCRYPTOLIB): $(CRYPTO_LIBOBJS) + $(RM) $(RMFLAGS) $@ $(QUIETOUT) + $(AR) $(ARFLAGS) $@ $^ + $(RANLIB) $@ + +ifeq (owc,$(findstring owc,"@TOOLCHAIN@")) +$(D_OBJ)/owc_aesni.obj: owc\aesni.obj + @cp owc\aesni.obj $(D_OBJ)\owc_aesni.obj +endif + +INSTALLED+= $(D_BIN)/libmbedcrypto.$(VERSION).dll +$(MBEDCRYPTODLL): LIBNAME=libmbedcrypto +$(MBEDCRYPTODLL): LIBDEF=-export-symbols win32/libmbedcrypto.def.$(VERSION) +$(MBEDCRYPTODLL): CEXTRA += -DLIBMBED_DYNAMIC -DLIBMBEDCRYPTO_SOURCE -D_WINDLL +$(MBEDCRYPTODLL): $(CRYPTO_DLLOBJS) + $(LIBTOOL) --mode=link $(CC) $(LDFLAGS) -version-number $(VERSIONSPEC) \ + -rpath $(D_LIB) -bindir $(D_BIN) $(LIBDEF) -o $@ $^ $(LDLIBS) + +####### +$(MBEDX509LIB): CEXTRA += -DLIBMBED_STATIC -DLIBMBEDX509_SOURCE -DLIBMBEDX509 +$(MBEDX509LIB): $(X509_LIBOBJS) + $(RM) $(RMFLAGS) $@ $(QUIETOUT) + $(AR) $(ARFLAGS) $@ $^ + $(RANLIB) $@ + +INSTALLED+= $(D_BIN)/libmbedx509.$(VERSION).dll +$(MBEDX509DLL): LIBNAME=libmbedx509 +$(MBEDX509DLL): LIBDEF=-export-symbols win32/libmbedx509.def.$(VERSION) +$(MBEDX509DLL): CEXTRA += -DLIBMBED_DYNAMIC -DLIBMBEDX509_SOURCE -D_WINDLL +$(MBEDX509DLL): $(X509_DLLOBJS) + $(LIBTOOL) --mode=link $(CC) $(LDFLAGS) -version-number $(VERSIONSPEC) \ + -rpath $(D_LIB) -bindir $(D_BIN) $(LIBDEF) -o $@ $^ -lmbedcrypto $(LDLIBS) + +####### +$(MBEDTLSLIB): CEXTRA += -DLIBMBED_STATIC -DLIBMBEDTLS_SOURCE +$(MBEDTLSLIB): $(TLS_LIBOBJS) + $(RM) $(RMFLAGS) $@ $(QUIETOUT) + $(AR) $(ARFLAGS) $@ $^ + $(RANLIB) $@ + +INSTALLED+= $(D_BIN)/libmbedtls.$(VERSION).dll +$(MBEDTLSDLL): LIBNAME=libmbedtls +$(MBEDTLSDLL): LIBDEF=-export-symbols win32/libmbedtls.def.$(VERSION) +$(MBEDTLSDLL): CEXTRA += -DLIBMBED_DYNAMIC -DLIBMBEDTLS_SOURCE -DLIBMBEDTLS -D_WINDLL +$(MBEDTLSDLL): $(TLS_DLLOBJS) + $(LIBTOOL) --mode=link $(CC) $(LDFLAGS) -version-number $(VERSIONSPEC) \ + -rpath $(D_LIB) -bindir $(D_BIN) $(LIBDEF) -o $@ $^ -lmbedcrypto -lmbedx509 $(LDLIBS) + +####### +$(D_BIN)/$(TARGET): MAPFILE=$(basename $@).map +$(D_BIN)/$(TARGET): $(D_OBJ)/.created $(TARGETOBJS) + $(LIBTOOL) --mode=link $(CC) $(LDFLAGS) -o $@ $(TARGETOBJS) $(LDFLAGS) -lmbedtls -lmbedcrypto -lmbedx509 $(LDLIBS) @LDMAPFILE@ + +####### +source: .unpacked.$(VERSION) + $(MAKE) unpacked + +.unpacked.$(VERSION): $(VERPACKED) + @echo "do not delete, managed file" > $@ + @echo "unpacking source $(VERPACKED)" + @gzip -c -d $(VERPACKED) | tar -xvf - + +.PHONY: object +object: $(D_OBJ)/.created + +.PHONY: installinc +installinc: ../include/.created ../include/mbedtls/.created + @echo publishing headers ... + -cp $(MBEDINCLUDE)/mbedtls/*.h ../include/mbedtls + -cp ./win32/*.h ../include/mbedtls + +%/.created: + -@mkdir $(@D) + @echo "do not delete, managed directory" > $@ + +clean: + @echo $(BUILD_TYPE) clean + -@$(LIBTOOL) --mode=clean $(RM) $(DLLS) $(DLLOBJS) $(QUIETOUT) + -@$(RM) $(RMFLAGS) $(BAK) $(TSKS) $(INSTALLED) $(LIBS) $(CLEAN) $(XCLEAN) $(QUIETOUT) + -@$(RM) $(LIBOBJS) $(QUIETOUT) + -@$(RM) ../include/mbedtls/* $(QUIETOUT) + +$(D_OBJ)/%$(O): %.c + $(CC) $(CFLAGS) -o $@ -c $< + +$(D_OBJ)/%.lo: %.c + $(LIBTOOL) --mode=compile $(CC) $(CFLAGS) -o $@ -c $< + +$(D_OBJ)/%.res: %.rc + $(RC) -DLIBNAME=$(LIBNAME) -DVERSION=$(VERSION) -DVERSION_1=$(VERSION_1) -DVERSION_2=$(VERSION_2) -DVERSION_3=$(VERSION_3) -fo $@ $< + +$(D_OBJ)/%_res.o: %.rc + $(RC) -DLIBNAME=$(LIBNAME) -DVERSION=$(VERSION) -DVERSION_1=$(VERSION_1) -DVERSION_2=$(VERSION_2) -DVERSION_3=$(VERSION_3) -o $@ $< + +#end diff --git a/mcwin32/libmbedtls/mbedtls-3.5.2.gr.tgz b/mcwin32/libmbedtls/mbedtls-3.5.2.gr.tgz new file mode 100644 index 00000000..f5d2ba15 Binary files /dev/null and b/mcwin32/libmbedtls/mbedtls-3.5.2.gr.tgz differ diff --git a/mcwin32/libmbedtls/owc/IntSafe.h b/mcwin32/libmbedtls/owc/IntSafe.h new file mode 100644 index 00000000..f1f067b3 --- /dev/null +++ b/mcwin32/libmbedtls/owc/IntSafe.h @@ -0,0 +1,1407 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information. + +/****************************************************************** +* * +* intsafe.h -- This module defines helper functions to prevent * +* integer overflow issues. * +* * +* * +******************************************************************/ +#ifndef _INTSAFE_H_INCLUDED_ +#define _INTSAFE_H_INCLUDED_ + +#if _MSC_VER > 1000 +#pragma once +#endif + +#include // for IN, etc. + +#define INTSAFE_E_ARITHMETIC_OVERFLOW ((HRESULT)0x80070216L) // 0x216 = 534 = ERROR_ARITHMETIC_OVERFLOW + +#ifndef LOWORD +#define LOWORD(l) ((WORD)(((DWORD_PTR)(l)) & 0xffff)) +#endif + +#ifndef HIWORD +#define HIWORD(l) ((WORD)(((DWORD_PTR)(l)) >> 16)) +#endif + +#define HIDWORD(_qw) ((ULONG)((_qw) >> 32)) +#define LODWORD(_qw) ((ULONG)(_qw)) + +#if defined(MIDL_PASS) || defined(RC_INVOKED) || defined(_M_CEE_PURE) \ + || defined(_M_AMD64) || defined(__ARM_ARCH) + +#ifndef UInt32x32To64 +#define UInt32x32To64(a, b) ((unsigned __int64)((ULONG)(a)) * (unsigned __int64)((ULONG)(b))) +#endif + +#elif defined(_M_IX86) + +#ifndef UInt32x32To64 +#define UInt32x32To64(a, b) (unsigned __int64)((unsigned __int64)(ULONG)(a) * (ULONG)(b)) +#endif + +#else + +#error Must define a target architecture. + +#endif + +#define DWORD_MAX 0xffffffffUL + +// +// It is common for -1 to be used as an error value for various types +// +#define USHORT_ERROR (0xffff) +#define INT_ERROR (-1) +#define LONG_ERROR (-1L) +#define UINT_ERROR (0xffffffff) +#define ULONG_ERROR (0xffffffffUL) +#ifdef _MSC_VER +#define ULONGLONG_ERROR (0xffffffffffffffffui64) +#define HIDWORD_MASK (0xffffffff00000000ui64) +#else // _MSC_VER +#define ULONGLONG_ERROR (0xffffffffffffffffULL) +#define HIDWORD_MASK (0xffffffff00000000ULL) +#endif // _MSC_VER +#ifdef BIT64 +#define SIZET_ERROR ULONGLONG_ERROR +#else +#define SIZET_ERROR ULONG_ERROR +#endif + +// +// We make some assumptions about the sizes of various types. Let's be +// explicit about those assumptions and check them. +// +C_ASSERT(sizeof(unsigned short) == 2); +C_ASSERT(sizeof(unsigned int) == 4); +C_ASSERT(sizeof(ULONG) == 4); + +// +// INT -> signed char conversion +// +__inline +HRESULT +IntToSignedChar( + IN INT iOperand, + OUT signed char* pch) +{ + HRESULT hr = INTSAFE_E_ARITHMETIC_OVERFLOW; + *pch = 0; + + if ((iOperand >= -128) && (iOperand <= 127)) + { + *pch = (signed char)iOperand; + hr = S_OK; + } + + return hr; +} + +// +// INT -> UCHAR conversion +// +__inline +HRESULT +IntToUChar( + IN INT iOperand, + OUT UCHAR* pch) +{ + HRESULT hr = INTSAFE_E_ARITHMETIC_OVERFLOW; + *pch = 0; + + if ((iOperand >= 0) && (iOperand <= 255)) + { + *pch = (UCHAR)iOperand; + hr = S_OK; + } + + return hr; +} + +// +// LONG -> UCHAR conversion +// +__inline +HRESULT +LongToUChar( + IN LONG lOperand, + OUT UCHAR* pch) +{ + HRESULT hr = INTSAFE_E_ARITHMETIC_OVERFLOW; + *pch = 0; + + if ((lOperand >= 0) && (lOperand <= 255)) + { + *pch = (UCHAR)lOperand; + hr = S_OK; + } + + return hr; +} + +// +// __inline is not sufficient. __forceinline is necessary. +// If the function is not inlined and you link .objs compiled with different compiler switches, +// you get one or the other function arbitrarily chosen. +// +// INT -> CHAR conversion +// +#if defined(__WATCOMC__) +#define __forceinline __inline +#endif +__forceinline +HRESULT +IntToChar( + IN INT iOperand, + OUT CHAR* pch) +{ +#ifdef _CHAR_UNSIGNED + return IntToUChar(iOperand, (UCHAR*)pch); +#else + return IntToSignedChar(iOperand, (signed char*)pch); +#endif +} + +// +// INT -> USHORT conversion +// +__inline +HRESULT +IntToUShort( + IN INT iOperand, + OUT USHORT* pusResult) +{ + HRESULT hr = INTSAFE_E_ARITHMETIC_OVERFLOW; + *pusResult = USHORT_ERROR; + + if ((iOperand >= 0) && (iOperand <= USHRT_MAX)) + { + *pusResult = (USHORT)iOperand; + hr = S_OK; + } + + return hr; +} + +// +// INT -> UINT conversion +// +__inline +HRESULT +IntToUInt( + IN INT iOperand, + OUT UINT* puResult) +{ + HRESULT hr = INTSAFE_E_ARITHMETIC_OVERFLOW; + *puResult = UINT_ERROR; + + if (iOperand >= 0) + { + *puResult = (UINT)iOperand; + hr = S_OK; + } + + return hr; +} + +// +// INT -> ULONG conversion +// +__inline +HRESULT +IntToULong( + IN INT iOperand, + OUT ULONG* pulResult) +{ + HRESULT hr = INTSAFE_E_ARITHMETIC_OVERFLOW; + *pulResult = ULONG_ERROR; + + if (iOperand >= 0) + { + *pulResult = (ULONG)iOperand; + hr = S_OK; + } + + return hr; +} + +// +// INT -> ULONGLONG conversion +// +__inline +HRESULT +IntToULongLong( + IN INT iOperand, + OUT ULONGLONG* pullResult) +{ + HRESULT hr = INTSAFE_E_ARITHMETIC_OVERFLOW; + *pullResult = ULONG_ERROR; + + if (iOperand >= 0) + { + *pullResult = (ULONGLONG)iOperand; + hr = S_OK; + } + + return hr; +} + +// +// UINT -> signed char conversion +// +__inline +HRESULT +UIntToSignedChar( + IN UINT uOperand, + OUT signed char* pch) +{ + HRESULT hr = INTSAFE_E_ARITHMETIC_OVERFLOW; + *pch = 0; + + if (uOperand <= 127) + { + *pch = (signed char)uOperand; + hr = S_OK; + } + + return hr; +} + +// +// UINT -> UCHAR conversion +// +__inline +HRESULT +UIntToUChar( + IN UINT uOperand, + OUT UCHAR* pch) +{ + HRESULT hr = INTSAFE_E_ARITHMETIC_OVERFLOW; + *pch = 0; + + if (uOperand <= 255) + { + *pch = (UCHAR)uOperand; + hr = S_OK; + } + + return hr; +} + +// +// UINT -> BYTE conversion +// +#define UIntToByte UIntToUChar + +// +// __inline is not sufficient. __forceinline is necessary. +// If the function is not inlined and you link .objs compiled with different compiler switches, +// you get one or the other function arbitrarily chosen. +// +// UINT -> CHAR conversion +// +__forceinline +HRESULT +UIntToChar( + IN UINT uOperand, + OUT CHAR* pch) +{ +#ifdef _CHAR_UNSIGNED + return UIntToUChar(uOperand, (UCHAR*)pch); +#else + return UIntToSignedChar(uOperand, (signed char*)pch); +#endif // _CHAR_UNSIGNED +} + +// +// UINT -> INT conversion +// +__inline +HRESULT +UIntToInt( + IN UINT uOperand, + OUT INT* piResult) +{ + HRESULT hr = INTSAFE_E_ARITHMETIC_OVERFLOW; + *piResult = INT_ERROR; + + if (uOperand <= INT_MAX) + { + *piResult = (INT)uOperand; + hr = S_OK; + } + + return hr; +} + +// +// UINT -> LONG conversion +// +__inline +HRESULT +UIntToLong( + IN UINT Operand, + OUT LONG* Result) +{ + if (Operand <= _I32_MAX) + { + *Result = (LONG)Operand; + return S_OK; + } + else + { + *Result = LONG_ERROR; + return INTSAFE_E_ARITHMETIC_OVERFLOW; + } +} + +// +// UINT -> ULONG conversion +// +__inline +HRESULT +UIntToULong( + IN UINT uOperand, + OUT ULONG* pulResult) +{ + *pulResult = (ULONG)uOperand; + + return S_OK; +} + +// +// ULONG -> UCHAR conversion +// +__inline +HRESULT +ULongToSignedChar( + IN ULONG ulOperand, + OUT signed char* pch) +{ + HRESULT hr = INTSAFE_E_ARITHMETIC_OVERFLOW; + *pch = 0; + + if (ulOperand <= 127) + { + *pch = (signed char)ulOperand; + hr = S_OK; + } + + return hr; +} + +// +// ULONG -> UCHAR conversion +// +__inline +HRESULT +ULongToUChar( + IN ULONG ulOperand, + OUT unsigned char* pch) +{ + HRESULT hr = INTSAFE_E_ARITHMETIC_OVERFLOW; + *pch = 0; + + if (ulOperand <= 255) + { + *pch = (unsigned char)ulOperand; + hr = S_OK; + } + + return hr; +} + +// +// __inline is not sufficient. __forceinline is necessary. +// If the function is not inlined and you link .objs compiled with different compiler switches, +// you get one or the other function arbitrarily chosen. +// +// ULONG -> CHAR conversion +// +__forceinline +HRESULT +ULongToChar( + IN ULONG ulOperand, + OUT CHAR* pch) +{ +#ifdef _CHAR_UNSIGNED + return ULongToUChar(ulOperand, (unsigned char*)pch); +#else + return ULongToSignedChar(ulOperand, (signed char*)pch); +#endif // _CHAR_UNSIGNED +} + +// +// ULONG -> USHORT conversion +// +__inline +HRESULT +ULongToUShort( + IN ULONG ulOperand, + OUT USHORT* pusResult) +{ + HRESULT hr = INTSAFE_E_ARITHMETIC_OVERFLOW; + *pusResult = USHORT_ERROR; + + if (ulOperand <= USHRT_MAX) + { + *pusResult = (USHORT)ulOperand; + hr = S_OK; + } + + return hr; +} + +// +// ULONG -> INT conversion +// +__inline +HRESULT +ULongToInt( + IN ULONG ulOperand, + OUT INT* piResult) +{ + if (ulOperand <= INT_MAX) + { + *piResult = (INT)ulOperand; + return S_OK; + } + else + { + *piResult = INT_ERROR; + return INTSAFE_E_ARITHMETIC_OVERFLOW; + } +} + +// +// ULONG -> UINT conversion +// +__inline +HRESULT +ULongToUInt( + IN ULONG ulOperand, + OUT UINT* puResult) +{ + *puResult = (UINT)ulOperand; + + return S_OK; +} + +// +// ULONG -> LONG conversion +// +__inline +HRESULT +ULongToLong( + IN ULONG Operand, + OUT LONG* Result) +{ + if (Operand <= _I32_MAX) + { + *Result = (LONG)Operand; + return S_OK; + } + else + { + *Result = LONG_ERROR; + return INTSAFE_E_ARITHMETIC_OVERFLOW; + } +} + +// +// ULONGLONG -> INT conversion +// +__inline +HRESULT +ULongLongToInt( + IN ULONGLONG ullOperand, + OUT INT* piResult) +{ + if (ullOperand <= INT_MAX) + { + *piResult = (INT)ullOperand; + return S_OK; + } + else + { + *piResult = INT_ERROR; + return INTSAFE_E_ARITHMETIC_OVERFLOW; + } +} + +// +// ULONGLONG -> LONG conversion +// +__inline +HRESULT +ULongLongToLong( + IN ULONGLONG Operand, + OUT LONG* Result) +{ + if (Operand <= _I32_MAX) + { + *Result = (LONG)Operand; + return S_OK; + } + else + { + *Result = LONG_ERROR; + return INTSAFE_E_ARITHMETIC_OVERFLOW; + } +} + +// +// UINT -> USHORT conversion +// +__inline +HRESULT +UIntToUShort( + IN UINT uOperand, + OUT USHORT* pusResult) +{ + HRESULT hr = INTSAFE_E_ARITHMETIC_OVERFLOW; + *pusResult = USHORT_ERROR; + + if (uOperand <= USHRT_MAX) + { + *pusResult = (USHORT)uOperand; + hr = S_OK; + } + + return hr; +} + +// +// ULONGLONG -> USHORT conversion +// +__inline +HRESULT +ULongLongToUShort( + IN ULONGLONG ullOperand, + OUT USHORT* pusResult) +{ + HRESULT hr = INTSAFE_E_ARITHMETIC_OVERFLOW; + USHORT usResult = USHORT_ERROR; + + if (ullOperand <= USHRT_MAX) + { + usResult = (USHORT)ullOperand; + hr = S_OK; + } + *pusResult = usResult; + + return hr; +} + +// +// ULONGLONG -> ULONG conversion +// +__inline +HRESULT +ULongLongToULong( + IN ULONGLONG ullOperand, + OUT ULONG* pulResult) +{ + HRESULT hr = INTSAFE_E_ARITHMETIC_OVERFLOW; + *pulResult = ULONG_ERROR; + + if (ullOperand <= _UI32_MAX) + { + *pulResult = (ULONG)ullOperand; + hr = S_OK; + } + + return hr; +} + +// +// UINT_PTR -> ULONG conversion +// ULONG_PTR -> ULONG conversion +// +#ifdef BIT64 + +#define UIntPtrToULong ULongLongToULong +#define ULongPtrToULong ULongLongToULong + +#else + +__inline +HRESULT +UIntPtrToULong( + IN UINT_PTR Operand, + OUT ULONG* pResult) +{ + *pResult = (ULONG)Operand; + return S_OK; +} + +__inline +HRESULT +ULongPtrToULong( + IN ULONG_PTR Operand, + OUT ULONG* pResult) +{ + *pResult = (ULONG)Operand; + return S_OK; +} + +#endif + +// +// ULONGLONG -> UINT conversion +// +__inline +HRESULT +ULongLongToUInt( + IN ULONGLONG ullOperand, + OUT UINT* puResult) +{ + HRESULT hr = INTSAFE_E_ARITHMETIC_OVERFLOW; + *puResult = UINT_ERROR; + + if (ullOperand <= UINT_MAX) + { + *puResult = (UINT)ullOperand; + hr = S_OK; + } + + return hr; +} + +// +// UINT_PTR -> UINT conversion +// ULONG_PTR -> UINT conversion +// +#ifdef BIT64 + +#define UIntPtrToUInt ULongLongToUInt +#define ULongPtrToUInt ULongLongToUInt + +#else + +__inline +HRESULT +UIntPtrToUInt( + IN UINT_PTR Operand, + OUT UINT* pResult) +{ + *pResult = (UINT)Operand; + return S_OK; +} + +__inline +HRESULT +ULongPtrToUInt( + IN ULONG_PTR Operand, + OUT UINT* pResult) +{ + *pResult = (UINT)Operand; + return S_OK; +} + +#endif + +// +// * -> BYTE conversion (BYTE is always unsigned char) +// +#define IntToByte IntToUChar +#define UIntToByte UIntToUChar +#define LongToByte LongToUChar +#define ULongToByte ULongToUChar + +// +// * -> WORD conversion (WORD is always unsigned short) +// +#define IntToWord IntToUShort +#define LongToWord LongToUShort +#define LongLongToWord LongLongToUShort +#define UIntToWord UIntToUShort +#define ULongToWord ULongToUShort +#define ULongLongToWord ULongLongToUShort +#define UIntPtrToWord UIntPtrToUShort +#define ULongPtrToWord ULongPtrToUShort +#define SizeTToWord SizeTToUShort +#define SIZETToWord SIZETToUShort + +// +// WORD -> * conversion (WORD is always unsigned short) +// +#define WordToUChar UShortToUChar +#define WordToByte UShortToByte +#define WordToChar UShortToChar +#define WordToSignedChar UShortToSignedChar +#define WordToInt UShortToInt +#define WordToLong UShortToLong +#define WordToLongLong UShortToLongLong +#define WordToIntPtr UShortToIntPtr +#define WordToLongPtr UShortToLongPtr + +// +// * -> DWORD conversion (DWORD is always ULONG) +// +#define CharToDWord CharToULong +#define SignedCharToDWord SignedCharToULong +#define ShortToDWord ShortToULong +#define IntToDWord IntToULong +#define LongToDWord LongToULong +#define LongLongToDWord LongLongToULong +#define UIntToDWord UIntToULong +#define ULongLongToDWord ULongLongToULong +#define IntPtrToDWord IntPtrToULong +#define LongPtrToDWord LongPtrToULong +#define UIntPtrToDWord UIntPtrToULong +#define ULongPtrToDWord ULongPtrToULong +#define SizeTToDWord SizeTToULong +#define SIZETToDWord SIZETToULong + +// +// DWORD -> * conversion (DWORD is always ULONG) +// +#define DWordToChar ULongToChar +#define DWordToUChar ULongToUChar +#define DWordToByte ULongToByte +#define DWordToSignedChar ULongToSignedChar +#define DWordToUShort ULongToUShort +#define DWordToUInt ULongToUInt +#define DWordToInt ULongToInt +#define DWordToLong ULongToLong +#define DWordToLongLong ULongToLongLong +#define DWordToIntPtr ULongToIntPtr +#define DWordToLongPtr ULongToLongPtr + + +// +// * -> UINT_PTR conversion (UINT_PTR is UINT on Win32, ULONGLONG on Win64) +// +#ifdef BIT64 +#define CharToUIntPtr CharToULongLong +#define SignedCharToUIntPtr SignedCharToULongLong +#define ShortToUIntPtr ShortToULongLong +#define IntToUIntPtr IntToULongLong +#define LongToUIntPtr LongToULongLong +#define LongLongToUIntPtr LongLongToULongLong +#define IntPtrToUIntPtr IntPtrToULongLong +#define LongPtrToUIntPtr LongPtrToULongLong +#else +#define CharToUIntPtr CharToUInt +#define SignedCharToUIntPtr SignedCharToUInt +#define ShortToUIntPtr ShortToUInt + +__inline +HRESULT +IntToUIntPtr( + IN INT iOperand, + OUT UINT_PTR* puResult) +{ + return IntToUInt(iOperand, (UINT*)puResult); +} + +#define LongToUIntPtr LongToUInt +#define LongLongToUIntPtr LongLongToUInt + +#define IntPtrToUIntPtr IntPtrToUInt +#define LongPtrToUIntPtr LongPtrToUInt +#endif + +__inline +HRESULT +ULongLongToUIntPtr( + IN ULONGLONG ullOperand, + OUT UINT_PTR* puResult) +{ +#ifdef BIT64 + *puResult = ullOperand; + return S_OK; +#else + return ULongLongToUInt(ullOperand, (UINT*)puResult); +#endif +} + + +// +// UINT_PTR -> * conversion (UINT_PTR is UINT on Win32, ULONGLONG on Win64) +// +#ifdef BIT64 +#define UIntPtrToUShort ULongLongToUShort +#define UIntPtrToInt ULongLongToInt +#define UIntPtrToLong ULongLongToLong +#define UIntPtrToLongLong ULongLongToLongLong +#define UIntPtrToIntPtr ULongLongToIntPtr +#define UIntPtrToLongPtr ULongLongToLongPtr +#else + +__inline +HRESULT +UIntPtrToUShort( + IN UINT_PTR uOperand, + OUT USHORT* pusResult) +{ + return UIntToUShort((UINT)uOperand, pusResult); +} + +__inline +HRESULT +UIntPtrToInt( + IN UINT_PTR uOperand, + OUT INT* piResult) +{ + return UIntToInt((UINT)uOperand, piResult); +} + +__inline +HRESULT +UIntPtrToLong( + IN UINT_PTR Operand, + OUT LONG* Result) +{ + return UIntToLong((UINT)Operand, Result); +} + +#define UIntPtrToLongLong UIntToLongLong +#define UIntPtrToIntPtr UIntToIntPtr +#define UIntPtrToLongPtr UIntToLongPtr +#endif + + +// +// * -> ULONG_PTR conversion (ULONG_PTR is ULONG on Win32, ULONGLONG on Win64) +// +#ifdef BIT64 +#define CharToULongPtr CharToULongLong +#define SignedCharToULongPtr SignedCharToULongLong +#define ShortToULongPtr ShortToULongLong +#define IntToULongPtr IntToULongLong +#define LongToULongPtr LongToULongLong +#define LongLongToULongPtr LongLongToULongLong +#define IntPtrToULongPtr IntPtrToULongLong +#define LongPtrToULongPtr LongPtrToULongLong +#else +#define CharToULongPtr CharToULong +#define SignedCharToULongPtr SignedCharToULong +#define ShortToULongPtr ShortToULong + +__inline +HRESULT +IntToULongPtr( + IN INT iOperand, + OUT ULONG_PTR* pulResult) +{ + return IntToULong(iOperand, (ULONG*)pulResult); +} + +#define LongToULongPtr LongToULong +#define LongLongToULongPtr LongLongToULong + +#define IntPtrToULongPtr IntPtrToULong +#define LongPtrToULongPtr LongPtrToULong +#endif + +__inline +HRESULT +ULongLongToULongPtr( + IN ULONGLONG ullOperand, + OUT ULONG_PTR* pulResult) +{ +#ifdef BIT64 + *pulResult = ullOperand; + return S_OK; +#else + return ULongLongToULong(ullOperand, (ULONG*)pulResult); +#endif +} + + +// +// ULONG_PTR -> * conversion (ULONG_PTR is ULONG on Win32, ULONGLONG on Win64) +// +#ifdef BIT64 +#define ULongPtrToUShort ULongLongToUShort +#define ULongPtrToInt ULongLongToInt +#define ULongPtrToLong ULongLongToLong +#define ULongPtrToLongLong ULongLongToLongLong +#define ULongPtrToIntPtr ULongLongToIntPtr +#define ULongPtrToLongPtr ULongLongToLongPtr +#else + +__inline +HRESULT +ULongPtrToUShort( + IN ULONG_PTR ulOperand, + OUT USHORT* pusResult) +{ + return ULongToUShort((ULONG)ulOperand, pusResult); +} + +__inline +HRESULT +ULongPtrToInt( + IN ULONG_PTR ulOperand, + OUT INT* piResult) +{ + return ULongToInt((ULONG)ulOperand, piResult); +} + +__inline +HRESULT +ULongPtrToLong( + IN ULONG_PTR Operand, + OUT LONG* Result) +{ + return ULongToLong((ULONG)Operand, Result); +} + +#define ULongPtrToLongLong ULongToLongLong +#define ULongPtrToIntPtr ULongToIntPtr +#define ULongPtrToLongPtr ULongToLongPtr +#endif + +// +// * -> size_t conversion (size_t is always UINT_PTR) +// +#define CharToSizeT CharToUIntPtr +#define SignedCharToSizeT SignedCharToUIntPtr +#define ShortToSizeT ShortToUIntPtr +#define IntToSizeT IntToUIntPtr +#define LongToSizeT LongToUIntPtr +#define LongLongToSizeT LongLongToUIntPtr +#define ULongLongToSizeT ULongLongToUIntPtr +#define IntPtrToSizeT IntPtrToUIntPtr +#define LongPtrToSizeT LongPtrToUIntPtr + +// +// size_t -> * conversion (size_t is always UINT_PTR) +// +#define SizeTToUShort UIntPtrToUShort +#define SizeTToUInt UIntPtrToUInt +#define SizeTToULong UIntPtrToULong +#define SizeTToInt UIntPtrToInt +#define SizeTToLong UIntPtrToLong +#define SizeTToLongLong UIntPtrToLongLong +#define SizeTToIntPtr UIntPtrToIntPtr +#define SizeTToLongPtr UIntPtrToLongPtr + +// +// * -> SIZE_T conversion (SIZE_T is always ULONG_PTR) +// +#define CharToSIZET CharToULongPtr +#define SignedCharToSIZET SignedCharToULongPtr +#define ShortToSIZET ShortToULongPtr +#define IntToSIZET IntToULongPtr +#define LongToSIZET LongToULongPtr +#define LongLongToSIZET LongLongToULongPtr +#define IntPtrToSIZET IntPtrToULongPtr +#define LongPtrToSIZET LongPtrToULongPtr +#define ULongLongToSIZET ULongLongToULongPtr + +// +// SIZE_T -> * conversion (SIZE_T is always ULONG_PTR) +// +#define SIZETToUShort ULongPtrToUShort +#define SIZETToUInt ULongPtrToUInt +#define SIZETToULong ULongPtrToULong +#define SIZETToUIntPtr ULongPtrToUIntPtr +#define SIZETToULongPtr ULongPtrToULongPtr +#define SIZETToInt ULongPtrToInt +#define SIZETToLong ULongPtrToLong +#define SIZETToLongLong ULongPtrToLongLong +#define SIZETToIntPtr ULongPtrToIntPtr +#define SIZETToLongPtr ULongPtrToLongPtr + +// +// * -> DWORD_PTR conversion (DWORD_PTR is always ULONG_PTR) +// +#define CharToDWordPtr CharToULongPtr +#define SignedCharToDWordPtr SignedCharToULongPtr +#define ShortToDWordPtr ShortToULongPtr +#define IntToDWordPtr IntToULongPtr +#define LongToDWordPtr LongToULongPtr +#define LongLongToDWordPtr LongLongToULongPtr +#define ULongLongToDWordPtr ULongLongToULongPtr +#define IntPtrToDWordPtr IntPtrToULongPtr +#define LongPtrToDWordPtr LongPtrToULongPtr + +// +// DWORD_PTR -> * conversion (DWORD_PTR is always ULONG_PTR) +// +#define DWordPtrToUShort ULongPtrToUShort +#define DWordPtrToUInt ULongPtrToUInt +#define DWordPtrToULong ULongPtrToULong +#define DWordPtrToDWord ULongPtrToDWord +#define DWordPtrToInt ULongPtrToInt +#define DWordPtrToLong ULongPtrToLong +#define DWordPtrToLongLong ULongPtrToLongLong +#define DWordPtrToIntPtr ULongPtrToIntPtr +#define DWordPtrToLongPtr ULongPtrToLongPtr + +// +// USHORT addition +// +__inline +HRESULT +UShortAdd( + IN USHORT usAugend, + IN USHORT usAddend, + OUT USHORT* pusResult) +{ + HRESULT hr = INTSAFE_E_ARITHMETIC_OVERFLOW; + *pusResult = USHORT_ERROR; + + if (((USHORT)(usAugend + usAddend)) >= usAugend) + { + *pusResult = (usAugend + usAddend); + hr = S_OK; + } + + return hr; +} + +// +// WORD addtition +// +#define WordAdd UShortAdd + +// +// UINT addition +// +__inline +HRESULT +UIntAdd( + IN UINT uAugend, + IN UINT uAddend, + OUT UINT* puResult) +{ + HRESULT hr = INTSAFE_E_ARITHMETIC_OVERFLOW; + *puResult = UINT_ERROR; + + if ((uAugend + uAddend) >= uAugend) + { + *puResult = (uAugend + uAddend); + hr = S_OK; + } + + return hr; +} + +// +// UINT_PTR addition +// +#define UIntPtrAdd SizeTAdd + +// +// ULONG addition +// +__inline +HRESULT +ULongAdd( + IN ULONG ulAugend, + IN ULONG ulAddend, + OUT ULONG* pulResult) +{ + HRESULT hr = INTSAFE_E_ARITHMETIC_OVERFLOW; + *pulResult = ULONG_ERROR; + + if ((ulAugend + ulAddend) >= ulAugend) + { + *pulResult = (ulAugend + ulAddend); + hr = S_OK; + } + + return hr; +} + +// +// ULONG_PTR addition +// +#ifdef BIT64 +#define ULongPtrAdd ULongLongAdd +#else +__inline +HRESULT +ULongPtrAdd( + IN ULONG_PTR ulAugend, + IN ULONG_PTR ulAddend, + OUT ULONG_PTR* pulResult) +{ + return ULongAdd((ULONG)ulAugend, (ULONG)ulAddend, (ULONG*)pulResult); +} +#endif // BIT64 + +// +// DWORD addition +// +#define DWordAdd ULongAdd + +// +// DWORD_PTR addition +// +#define DWordPtrAdd ULongPtrAdd + +// +// size_t addition +// +__inline +HRESULT +SizeTAdd( + IN size_t Augend, + IN size_t Addend, + OUT size_t* pResult) +{ + HRESULT hr = INTSAFE_E_ARITHMETIC_OVERFLOW; + *pResult = SIZET_ERROR; + + if ((Augend + Addend) >= Augend) + { + *pResult = (Augend + Addend); + hr = S_OK; + } + + return hr; +} + +// +// SIZE_T addition +// +#define SIZETAdd ULongPtrAdd + +// +// ULONGLONG addition +// +__inline +HRESULT +ULongLongAdd( + IN ULONGLONG ullAugend, + IN ULONGLONG ullAddend, + OUT ULONGLONG* pullResult) +{ + HRESULT hr = INTSAFE_E_ARITHMETIC_OVERFLOW; + *pullResult = ULONGLONG_ERROR; + + if ((ullAugend + ullAddend) >= ullAugend) + { + *pullResult = (ullAugend + ullAddend); + hr = S_OK; + } + + return hr; +} + +// +// USHORT subtraction +// +__inline +HRESULT +UShortSub( + IN USHORT usMinuend, + IN USHORT usSubtrahend, + OUT USHORT* pusResult) +{ + HRESULT hr = INTSAFE_E_ARITHMETIC_OVERFLOW; + *pusResult = USHORT_ERROR; + + if (usMinuend >= usSubtrahend) + { + *pusResult = (usMinuend - usSubtrahend); + hr = S_OK; + } + + return hr; +} + +// +// WORD subtraction +// +#define WordSub UShortSub + + +// +// UINT subtraction +// +__inline +HRESULT +UIntSub( + IN UINT uMinuend, + IN UINT uSubtrahend, + OUT UINT* puResult) +{ + HRESULT hr = INTSAFE_E_ARITHMETIC_OVERFLOW; + *puResult = UINT_ERROR; + + if (uMinuend >= uSubtrahend) + { + *puResult = (uMinuend - uSubtrahend); + hr = S_OK; + } + + return hr; +} + +// +// UINT_PTR subtraction +// +#define UIntPtrSub SizeTSub + +// +// ULONG subtraction +// +__inline +HRESULT +ULongSub( + IN ULONG ulMinuend, + IN ULONG ulSubtrahend, + OUT ULONG* pulResult) +{ + HRESULT hr = INTSAFE_E_ARITHMETIC_OVERFLOW; + *pulResult = ULONG_ERROR; + + if (ulMinuend >= ulSubtrahend) + { + *pulResult = (ulMinuend - ulSubtrahend); + hr = S_OK; + } + + return hr; +} + +// +// ULONG_PTR subtraction +// +#ifdef BIT64 +#define ULongPtrSub ULongLongSub +#else +__inline +HRESULT +ULongPtrSub( + IN ULONG_PTR ulMinuend, + IN ULONG_PTR ulSubtrahend, + OUT ULONG_PTR* pulResult) +{ + return ULongSub((ULONG)ulMinuend, (ULONG)ulSubtrahend, (ULONG*)pulResult); +} +#endif // BIT64 + + +// +// DWORD subtraction +// +#define DWordSub ULongSub + +// +// DWORD_PTR subtraction +// +#define DWordPtrSub ULongPtrSub + +// +// size_t subtraction +// +__inline +HRESULT +SizeTSub( + IN size_t Minuend, + IN size_t Subtrahend, + OUT size_t* pResult) +{ + HRESULT hr = INTSAFE_E_ARITHMETIC_OVERFLOW; + *pResult = SIZET_ERROR; + + if (Minuend >= Subtrahend) + { + *pResult = (Minuend - Subtrahend); + hr = S_OK; + } + + return hr; +} + +// +// SIZE_T subtraction +// +#define SIZETSub ULongPtrSub + +// +// ULONGLONG subtraction +// +__inline +HRESULT +ULongLongSub( + IN ULONGLONG ullMinuend, + IN ULONGLONG ullSubtrahend, + OUT ULONGLONG* pullResult) +{ + HRESULT hr = INTSAFE_E_ARITHMETIC_OVERFLOW; + *pullResult = ULONGLONG_ERROR; + + if (ullMinuend >= ullSubtrahend) + { + *pullResult = (ullMinuend - ullSubtrahend); + hr = S_OK; + } + + return hr; +} + +// +// USHORT multiplication +// +__inline +HRESULT +UShortMult( + IN USHORT usMultiplicand, + IN USHORT usMultiplier, + OUT USHORT* pusResult) +{ + ULONG ulResult = ((ULONG)usMultiplicand) * (ULONG)usMultiplier; + + return ULongToUShort(ulResult, pusResult); +} + +// +// WORD multiplication +// +#define WordMult UShortMult + +// +// UINT multiplication +// +__inline +HRESULT +UIntMult( + IN UINT uMultiplicand, + IN UINT uMultiplier, + OUT UINT* puResult) +{ + ULONGLONG ull64Result = UInt32x32To64(uMultiplicand, uMultiplier); + + return ULongLongToUInt(ull64Result, puResult); +} + +// +// ULONG multiplication +// +__inline +HRESULT +ULongMult( + IN ULONG ulMultiplicand, + IN ULONG ulMultiplier, + OUT ULONG* pulResult) +{ + ULONGLONG ull64Result = UInt32x32To64(ulMultiplicand, ulMultiplier); + + return ULongLongToULong(ull64Result, pulResult); +} + +// +// DWORD multiplication +// +#define DWordMult ULongMult + +// +// DWORD_PTR multiplication +// +#define DWordPtrMult ULongPtrMult + +#endif // _INTSAFE_H_INCLUDED_ diff --git a/mcwin32/libmbedtls/owc/WSPiApi.h b/mcwin32/libmbedtls/owc/WSPiApi.h new file mode 100644 index 00000000..29a1aebc --- /dev/null +++ b/mcwin32/libmbedtls/owc/WSPiApi.h @@ -0,0 +1,6 @@ +#pragma once +/* + * + */ + +/*end*/ diff --git a/mcwin32/libmbedtls/owc/aesni.asm b/mcwin32/libmbedtls/owc/aesni.asm new file mode 100644 index 00000000..768261f5 --- /dev/null +++ b/mcwin32/libmbedtls/owc/aesni.asm @@ -0,0 +1,867 @@ +;; +; Module: aesni.obj +; +; Functions: +; int cdecl mbedtls_aesni_has_support(unsigned int what); +; +; int cdecl mbedtls_aesni_crypt_ecb(mbedtls_aes_context *ctx, int mode, const unsigned char input[16], unsigned char output[16]); +; +; void cdecl mbedtls_aesni_gcm_mult(unsigned char c[16], const unsigned char a[16], const unsigned char b[16]); +; +; void cdecl mbedtls_aesni_inverse_key(unsigned char *invkey, const unsigned char *fwdkey, int nr); +; +; int cdecl mbedtls_aesni_setkey_enc(unsigned char *rk, const unsigned char *key, size_t bits); +; +; Build Options: +; uasm32 or ml +;; + +option dotname + +.686 +.xmm +.model flat + +public _mbedtls_aesni_crypt_ecb +public _mbedtls_aesni_gcm_mult +public _mbedtls_aesni_has_support +public _mbedtls_aesni_inverse_key +public _mbedtls_aesni_setkey_enc + +;; BSS + +.bss SEGMENT DWORD PUBLIC 'BSS' + +aesni_has_support_done label dword + dd ? ; 0000 + +aesni_has_support_flag label dword + dd ? ; 0004 + +aesni_has_support_info label dword + dd 4 dup (?) ; 0008 + +.bss ENDS + +;; CODE + +.text$mn SEGMENT PARA PUBLIC 'CODE' + ; Communal section not supported by MASM + +_aesni_set_rk_128 LABEL NEAR + movaps xmm3, xmm0 ; 0000 _ 0F 28. D8 + pshufd xmm1, xmm1, 0FFH ; 0003 _ 66: 0F 70. C9, FF + pxor xmm1, xmm3 ; 0008 _ 66: 0F EF. CB + pslldq xmm3, 4 ; 000C _ 66: 0F 73. FB, 04 + movaps xmm2, xmm3 ; 0011 _ 0F 28. D3 + pslldq xmm3, 4 ; 0014 _ 66: 0F 73. FB, 04 + movaps xmm0, xmm3 ; 0019 _ 0F 28. C3 + pxor xmm2, xmm1 ; 001C _ 66: 0F EF. D1 + pxor xmm0, xmm2 ; 0020 _ 66: 0F EF. C2 + pslldq xmm3, 4 ; 0024 _ 66: 0F 73. FB, 04 + pxor xmm0, xmm3 ; 0029 _ 66: 0F EF. C3 + ret ; 002D _ C3 + +.text$mn ENDS + +.text$mn SEGMENT PARA PUBLIC 'CODE' ; section number 7 + ; Communal section not supported by MASM + +_aesni_set_rk_192 LABEL NEAR + mov eax, dword ptr [esp+4H] ; 0000 _ 8B. 44 24, 04 + mov edx, dword ptr [esp+8H] ; 0004 _ 8B. 54 24, 08 + mov ecx, dword ptr [esp+0CH] ; 0008 _ 8B. 4C 24, 0C + pshufd xmm0, xmm0, 55H ; 000C _ 66: 0F 70. C0, 55 + movaps xmm2, xmmword ptr [eax] ; 0011 _ 0F 28. 10 + pxor xmm0, xmm2 ; 0014 _ 66: 0F EF. C2 + pslldq xmm2, 4 ; 0018 _ 66: 0F 73. FA, 04 + movaps xmm1, xmm2 ; 001D _ 0F 28. CA + pslldq xmm2, 4 ; 0020 _ 66: 0F 73. FA, 04 + pxor xmm1, xmm0 ; 0025 _ 66: 0F EF. C8 + movaps xmm0, xmm2 ; 0029 _ 0F 28. C2 + pxor xmm0, xmm1 ; 002C _ 66: 0F EF. C1 + pslldq xmm2, 4 ; 0030 _ 66: 0F 73. FA, 04 + pxor xmm2, xmm0 ; 0035 _ 66: 0F EF. D0 + movaps xmmword ptr [eax], xmm2 ; 0039 _ 0F 29. 10 + movaps xmm1, xmmword ptr [edx] ; 003C _ 0F 28. 0A + pshufd xmm0, xmm2, 0FFH ; 003F _ 66: 0F 70. C2, FF + pxor xmm0, xmm1 ; 0044 _ 66: 0F EF. C1 + pslldq xmm1, 4 ; 0048 _ 66: 0F 73. F9, 04 + pxor xmm1, xmm0 ; 004D _ 66: 0F EF. C8 + movaps xmmword ptr [edx], xmm1 ; 0051 _ 0F 29. 0A + movups xmm0, xmmword ptr [eax] ; 0054 _ 0F 10. 00 + movups xmmword ptr [ecx], xmm0 ; 0057 _ 0F 11. 01 + mov eax, dword ptr [edx] ; 005A _ 8B. 02 + mov dword ptr [ecx+10H], eax ; 005C _ 89. 41, 10 + mov eax, dword ptr [edx+4H] ; 005F _ 8B. 42, 04 + mov dword ptr [ecx+14H], eax ; 0062 _ 89. 41, 14 + ret ; 0065 _ C3 + +.text$mn ENDS + +.text$mn SEGMENT PARA PUBLIC 'CODE' + ; Communal section not supported by MASM + +_aesni_set_rk_256 LABEL NEAR + mov eax, dword ptr [esp+4H] ; 0000 _ 8B. 44 24, 04 + movaps xmm4, xmm0 ; 0004 _ 0F 28. E0 + pshufd xmm2, xmm2, 0FFH ; 0007 _ 66: 0F 70. D2, FF + movaps xmm5, xmm1 ; 000C _ 0F 28. E9 + pxor xmm2, xmm4 ; 000F _ 66: 0F EF. D4 + pslldq xmm4, 4 ; 0013 _ 66: 0F 73. FC, 04 + movaps xmm3, xmm4 ; 0018 _ 0F 28. DC + pslldq xmm4, 4 ; 001B _ 66: 0F 73. FC, 04 + movaps xmm0, xmm4 ; 0020 _ 0F 28. C4 + pxor xmm3, xmm2 ; 0023 _ 66: 0F EF. DA + pxor xmm0, xmm3 ; 0027 _ 66: 0F EF. C3 + pslldq xmm4, 4 ; 002B _ 66: 0F 73. FC, 04 + pxor xmm0, xmm4 ; 0030 _ 66: 0F EF. C4 + movaps xmmword ptr [eax], xmm0 ; 0034 _ 0F 29. 00 + mov eax, dword ptr [esp+8H] ; 0037 _ 8B. 44 24, 08 + aeskeygenassist xmm0, xmm0, 00H ; 003B _ 66: 0F 3A DF. C0, 00 + pshufd xmm0, xmm0, 0AAH ; 0041 _ 66: 0F 70. C0, AA + pxor xmm0, xmm5 ; 0046 _ 66: 0F EF. C5 + pslldq xmm5, 4 ; 004A _ 66: 0F 73. FD, 04 + movaps xmm1, xmm5 ; 004F _ 0F 28. CD + pslldq xmm5, 4 ; 0052 _ 66: 0F 73. FD, 04 + pxor xmm1, xmm0 ; 0057 _ 66: 0F EF. C8 + movaps xmm0, xmm5 ; 005B _ 0F 28. C5 + pxor xmm0, xmm1 ; 005E _ 66: 0F EF. C1 + pslldq xmm5, 4 ; 0062 _ 66: 0F 73. FD, 04 + pxor xmm0, xmm5 ; 0067 _ 66: 0F EF. C5 + movaps xmmword ptr [eax], xmm0 ; 006B _ 0F 29. 00 + ret ; 006E _ C3 + +.text$mn ENDS + +.text$mn SEGMENT PARA PUBLIC 'CODE' + ; Communal section not supported by MASM + +_aesni_setkey_enc_128 LABEL NEAR + mov eax, dword ptr [esp+8H] ; 0000 _ 8B. 44 24, 08 + movups xmm0, xmmword ptr [eax] ; 0004 _ 0F 10. 00 + mov eax, dword ptr [esp+4H] ; 0007 _ 8B. 44 24, 04 + movups xmmword ptr [eax], xmm0 ; 000B _ 0F 11. 00 + movaps xmm2, xmmword ptr [eax] ; 000E _ 0F 28. 10 + aeskeygenassist xmm0, xmm2, 01H ; 0011 _ 66: 0F 3A DF. C2, 01 + pshufd xmm0, xmm0, 0FFH ; 0017 _ 66: 0F 70. C0, FF + pxor xmm0, xmm2 ; 001C _ 66: 0F EF. C2 + pslldq xmm2, 4 ; 0020 _ 66: 0F 73. FA, 04 + movaps xmm1, xmm2 ; 0025 _ 0F 28. CA + pslldq xmm2, 4 ; 0028 _ 66: 0F 73. FA, 04 + pxor xmm1, xmm0 ; 002D _ 66: 0F EF. C8 + movaps xmm3, xmm2 ; 0031 _ 0F 28. DA + pxor xmm3, xmm1 ; 0034 _ 66: 0F EF. D9 + pslldq xmm2, 4 ; 0038 _ 66: 0F 73. FA, 04 + pxor xmm3, xmm2 ; 003D _ 66: 0F EF. DA + aeskeygenassist xmm0, xmm3, 02H ; 0041 _ 66: 0F 3A DF. C3, 02 + pshufd xmm0, xmm0, 0FFH ; 0047 _ 66: 0F 70. C0, FF + pxor xmm0, xmm3 ; 004C _ 66: 0F EF. C3 + movaps xmmword ptr [eax+10H], xmm3 ; 0050 _ 0F 29. 58, 10 + pslldq xmm3, 4 ; 0054 _ 66: 0F 73. FB, 04 + movaps xmm1, xmm3 ; 0059 _ 0F 28. CB + pslldq xmm3, 4 ; 005C _ 66: 0F 73. FB, 04 + pxor xmm1, xmm0 ; 0061 _ 66: 0F EF. C8 + movaps xmm2, xmm3 ; 0065 _ 0F 28. D3 + pxor xmm2, xmm1 ; 0068 _ 66: 0F EF. D1 + pslldq xmm3, 4 ; 006C _ 66: 0F 73. FB, 04 + pxor xmm2, xmm3 ; 0071 _ 66: 0F EF. D3 + aeskeygenassist xmm0, xmm2, 04H ; 0075 _ 66: 0F 3A DF. C2, 04 + pshufd xmm0, xmm0, 0FFH ; 007B _ 66: 0F 70. C0, FF + pxor xmm0, xmm2 ; 0080 _ 66: 0F EF. C2 + movaps xmmword ptr [eax+20H], xmm2 ; 0084 _ 0F 29. 50, 20 + pslldq xmm2, 4 ; 0088 _ 66: 0F 73. FA, 04 + movaps xmm1, xmm2 ; 008D _ 0F 28. CA + pslldq xmm2, 4 ; 0090 _ 66: 0F 73. FA, 04 + pxor xmm1, xmm0 ; 0095 _ 66: 0F EF. C8 + movaps xmm3, xmm2 ; 0099 _ 0F 28. DA + pxor xmm3, xmm1 ; 009C _ 66: 0F EF. D9 + pslldq xmm2, 4 ; 00A0 _ 66: 0F 73. FA, 04 + pxor xmm3, xmm2 ; 00A5 _ 66: 0F EF. DA + aeskeygenassist xmm0, xmm3, 08H ; 00A9 _ 66: 0F 3A DF. C3, 08 + pshufd xmm0, xmm0, 0FFH ; 00AF _ 66: 0F 70. C0, FF + pxor xmm0, xmm3 ; 00B4 _ 66: 0F EF. C3 + movaps xmmword ptr [eax+30H], xmm3 ; 00B8 _ 0F 29. 58, 30 + pslldq xmm3, 4 ; 00BC _ 66: 0F 73. FB, 04 + movaps xmm1, xmm3 ; 00C1 _ 0F 28. CB + pslldq xmm3, 4 ; 00C4 _ 66: 0F 73. FB, 04 + pxor xmm1, xmm0 ; 00C9 _ 66: 0F EF. C8 + movaps xmm2, xmm3 ; 00CD _ 0F 28. D3 + pxor xmm2, xmm1 ; 00D0 _ 66: 0F EF. D1 + pslldq xmm3, 4 ; 00D4 _ 66: 0F 73. FB, 04 + pxor xmm2, xmm3 ; 00D9 _ 66: 0F EF. D3 + aeskeygenassist xmm0, xmm2, 10H ; 00DD _ 66: 0F 3A DF. C2, 10 + pshufd xmm0, xmm0, 0FFH ; 00E3 _ 66: 0F 70. C0, FF + pxor xmm0, xmm2 ; 00E8 _ 66: 0F EF. C2 + movaps xmmword ptr [eax+40H], xmm2 ; 00EC _ 0F 29. 50, 40 + pslldq xmm2, 4 ; 00F0 _ 66: 0F 73. FA, 04 + movaps xmm1, xmm2 ; 00F5 _ 0F 28. CA + pslldq xmm2, 4 ; 00F8 _ 66: 0F 73. FA, 04 + pxor xmm1, xmm0 ; 00FD _ 66: 0F EF. C8 + movaps xmm3, xmm2 ; 0101 _ 0F 28. DA + pxor xmm3, xmm1 ; 0104 _ 66: 0F EF. D9 + pslldq xmm2, 4 ; 0108 _ 66: 0F 73. FA, 04 + pxor xmm3, xmm2 ; 010D _ 66: 0F EF. DA + aeskeygenassist xmm0, xmm3, 20H ; 0111 _ 66: 0F 3A DF. C3, 20 + pshufd xmm0, xmm0, 0FFH ; 0117 _ 66: 0F 70. C0, FF + pxor xmm0, xmm3 ; 011C _ 66: 0F EF. C3 + movaps xmmword ptr [eax+50H], xmm3 ; 0120 _ 0F 29. 58, 50 + pslldq xmm3, 4 ; 0124 _ 66: 0F 73. FB, 04 + movaps xmm1, xmm3 ; 0129 _ 0F 28. CB + pslldq xmm3, 4 ; 012C _ 66: 0F 73. FB, 04 + pxor xmm1, xmm0 ; 0131 _ 66: 0F EF. C8 + movaps xmm2, xmm3 ; 0135 _ 0F 28. D3 + pxor xmm2, xmm1 ; 0138 _ 66: 0F EF. D1 + pslldq xmm3, 4 ; 013C _ 66: 0F 73. FB, 04 + pxor xmm2, xmm3 ; 0141 _ 66: 0F EF. D3 + aeskeygenassist xmm0, xmm2, 40H ; 0145 _ 66: 0F 3A DF. C2, 40 + pshufd xmm0, xmm0, 0FFH ; 014B _ 66: 0F 70. C0, FF + movaps xmmword ptr [eax+60H], xmm2 ; 0150 _ 0F 29. 50, 60 + pxor xmm0, xmm2 ; 0154 _ 66: 0F EF. C2 + pslldq xmm2, 4 ; 0158 _ 66: 0F 73. FA, 04 + movaps xmm1, xmm2 ; 015D _ 0F 28. CA + pslldq xmm2, 4 ; 0160 _ 66: 0F 73. FA, 04 + pxor xmm1, xmm0 ; 0165 _ 66: 0F EF. C8 + movaps xmm3, xmm2 ; 0169 _ 0F 28. DA + pxor xmm3, xmm1 ; 016C _ 66: 0F EF. D9 + pslldq xmm2, 4 ; 0170 _ 66: 0F 73. FA, 04 + pxor xmm3, xmm2 ; 0175 _ 66: 0F EF. DA + aeskeygenassist xmm0, xmm3, 80H ; 0179 _ 66: 0F 3A DF. C3, 80 + pshufd xmm0, xmm0, 0FFH ; 017F _ 66: 0F 70. C0, FF + pxor xmm0, xmm3 ; 0184 _ 66: 0F EF. C3 + movaps xmmword ptr [eax+70H], xmm3 ; 0188 _ 0F 29. 58, 70 + pslldq xmm3, 4 ; 018C _ 66: 0F 73. FB, 04 + movaps xmm1, xmm3 ; 0191 _ 0F 28. CB + pslldq xmm3, 4 ; 0194 _ 66: 0F 73. FB, 04 + pxor xmm1, xmm0 ; 0199 _ 66: 0F EF. C8 + movaps xmm2, xmm3 ; 019D _ 0F 28. D3 + pxor xmm2, xmm1 ; 01A0 _ 66: 0F EF. D1 + pslldq xmm3, 4 ; 01A4 _ 66: 0F 73. FB, 04 + pxor xmm2, xmm3 ; 01A9 _ 66: 0F EF. D3 + aeskeygenassist xmm0, xmm2, 1BH ; 01AD _ 66: 0F 3A DF. C2, 1B + pshufd xmm0, xmm0, 0FFH ; 01B3 _ 66: 0F 70. C0, FF + pxor xmm0, xmm2 ; 01B8 _ 66: 0F EF. C2 + movaps xmmword ptr [eax+80H], xmm2 ; 01BC _ 0F 29. 90, 00000080 + pslldq xmm2, 4 ; 01C3 _ 66: 0F 73. FA, 04 + movaps xmm1, xmm2 ; 01C8 _ 0F 28. CA + pslldq xmm2, 4 ; 01CB _ 66: 0F 73. FA, 04 + pxor xmm1, xmm0 ; 01D0 _ 66: 0F EF. C8 + movaps xmm3, xmm2 ; 01D4 _ 0F 28. DA + pxor xmm3, xmm1 ; 01D7 _ 66: 0F EF. D9 + pslldq xmm2, 4 ; 01DB _ 66: 0F 73. FA, 04 + pxor xmm3, xmm2 ; 01E0 _ 66: 0F EF. DA + aeskeygenassist xmm0, xmm3, 36H ; 01E4 _ 66: 0F 3A DF. C3, 36 + pshufd xmm0, xmm0, 0FFH ; 01EA _ 66: 0F 70. C0, FF + pxor xmm0, xmm3 ; 01EF _ 66: 0F EF. C3 + movaps xmmword ptr [eax+90H], xmm3 ; 01F3 _ 0F 29. 98, 00000090 + pslldq xmm3, 4 ; 01FA _ 66: 0F 73. FB, 04 + movaps xmm1, xmm3 ; 01FF _ 0F 28. CB + pslldq xmm3, 4 ; 0202 _ 66: 0F 73. FB, 04 + pxor xmm1, xmm0 ; 0207 _ 66: 0F EF. C8 + movaps xmm0, xmm3 ; 020B _ 0F 28. C3 + pxor xmm0, xmm1 ; 020E _ 66: 0F EF. C1 + pslldq xmm3, 4 ; 0212 _ 66: 0F 73. FB, 04 + pxor xmm0, xmm3 ; 0217 _ 66: 0F EF. C3 + movaps xmmword ptr [eax+0A0H], xmm0 ; 021B _ 0F 29. 80, 000000A0 + ret ; 0222 _ C3 + +.text$mn ENDS + +.text$mn SEGMENT PARA PUBLIC 'CODE' + ; Communal section not supported by MASM + +_aesni_setkey_enc_192 LABEL NEAR + mov ecx, dword ptr [esp+4H] ; 0000 _ 8B. 4C 24, 04 + mov eax, dword ptr [esp+8H] ; 0004 _ 8B. 44 24, 08 + movups xmm0, xmmword ptr [eax] ; 0008 _ 0F 10. 00 + movups xmmword ptr [ecx], xmm0 ; 000B _ 0F 11. 01 + movq xmm0, qword ptr [eax+10H] ; 000E _ F3: 0F 7E. 40, 10 + movq qword ptr [ecx+10H], xmm0 ; 0013 _ 66: 0F D6. 41, 10 + movq xmm2, qword ptr [ecx+10H] ; 0018 _ F3: 0F 7E. 51, 10 + movaps xmm1, xmmword ptr [ecx] ; 001D _ 0F 28. 09 + aeskeygenassist xmm0, xmm2, 01H ; 0020 _ 66: 0F 3A DF. C2, 01 + pshufd xmm3, xmm0, 55H ; 0026 _ 66: 0F 70. D8, 55 + pxor xmm3, xmm1 ; 002B _ 66: 0F EF. D9 + pslldq xmm1, 4 ; 002F _ 66: 0F 73. F9, 04 + pxor xmm3, xmm1 ; 0034 _ 66: 0F EF. D9 + pslldq xmm1, 4 ; 0038 _ 66: 0F 73. F9, 04 + pxor xmm3, xmm1 ; 003D _ 66: 0F EF. D9 + pslldq xmm1, 4 ; 0041 _ 66: 0F 73. F9, 04 + pxor xmm3, xmm1 ; 0046 _ 66: 0F EF. D9 + pshufd xmm1, xmm3, 0FFH ; 004A _ 66: 0F 70. CB, FF + pxor xmm1, xmm2 ; 004F _ 66: 0F EF. CA + pslldq xmm2, 4 ; 0053 _ 66: 0F 73. FA, 04 + pxor xmm1, xmm2 ; 0058 _ 66: 0F EF. CA + movups xmmword ptr [ecx+18H], xmm3 ; 005C _ 0F 11. 59, 18 + movaps xmm0, xmm1 ; 0060 _ 0F 28. C1 + movd dword ptr [ecx+28H], xmm1 ; 0063 _ 66: 0F 7E. 49, 28 + psrldq xmm0, 4 ; 0068 _ 66: 0F 73. D8, 04 + movd dword ptr [ecx+2CH], xmm0 ; 006D _ 66: 0F 7E. 41, 2C + aeskeygenassist xmm0, xmm1, 02H ; 0072 _ 66: 0F 3A DF. C1, 02 + pshufd xmm4, xmm0, 55H ; 0078 _ 66: 0F 70. E0, 55 + pxor xmm4, xmm3 ; 007D _ 66: 0F EF. E3 + pslldq xmm3, 4 ; 0081 _ 66: 0F 73. FB, 04 + pxor xmm4, xmm3 ; 0086 _ 66: 0F EF. E3 + pslldq xmm3, 4 ; 008A _ 66: 0F 73. FB, 04 + pxor xmm4, xmm3 ; 008F _ 66: 0F EF. E3 + pslldq xmm3, 4 ; 0093 _ 66: 0F 73. FB, 04 + pxor xmm4, xmm3 ; 0098 _ 66: 0F EF. E3 + pshufd xmm2, xmm4, 0FFH ; 009C _ 66: 0F 70. D4, FF + pxor xmm2, xmm1 ; 00A1 _ 66: 0F EF. D1 + pslldq xmm1, 4 ; 00A5 _ 66: 0F 73. F9, 04 + pxor xmm2, xmm1 ; 00AA _ 66: 0F EF. D1 + movups xmmword ptr [ecx+30H], xmm4 ; 00AE _ 0F 11. 61, 30 + movaps xmm0, xmm2 ; 00B2 _ 0F 28. C2 + movd dword ptr [ecx+40H], xmm2 ; 00B5 _ 66: 0F 7E. 51, 40 + psrldq xmm0, 4 ; 00BA _ 66: 0F 73. D8, 04 + movd dword ptr [ecx+44H], xmm0 ; 00BF _ 66: 0F 7E. 41, 44 + aeskeygenassist xmm0, xmm2, 04H ; 00C4 _ 66: 0F 3A DF. C2, 04 + pshufd xmm3, xmm0, 55H ; 00CA _ 66: 0F 70. D8, 55 + pxor xmm3, xmm4 ; 00CF _ 66: 0F EF. DC + pslldq xmm4, 4 ; 00D3 _ 66: 0F 73. FC, 04 + pxor xmm3, xmm4 ; 00D8 _ 66: 0F EF. DC + pslldq xmm4, 4 ; 00DC _ 66: 0F 73. FC, 04 + pxor xmm3, xmm4 ; 00E1 _ 66: 0F EF. DC + pslldq xmm4, 4 ; 00E5 _ 66: 0F 73. FC, 04 + pxor xmm3, xmm4 ; 00EA _ 66: 0F EF. DC + pshufd xmm1, xmm3, 0FFH ; 00EE _ 66: 0F 70. CB, FF + pxor xmm1, xmm2 ; 00F3 _ 66: 0F EF. CA + pslldq xmm2, 4 ; 00F7 _ 66: 0F 73. FA, 04 + pxor xmm1, xmm2 ; 00FC _ 66: 0F EF. CA + movaps xmm0, xmm1 ; 0100 _ 0F 28. C1 + movd dword ptr [ecx+58H], xmm1 ; 0103 _ 66: 0F 7E. 49, 58 + psrldq xmm0, 4 ; 0108 _ 66: 0F 73. D8, 04 + movd dword ptr [ecx+5CH], xmm0 ; 010D _ 66: 0F 7E. 41, 5C + aeskeygenassist xmm0, xmm1, 08H ; 0112 _ 66: 0F 3A DF. C1, 08 + movups xmmword ptr [ecx+48H], xmm3 ; 0118 _ 0F 11. 59, 48 + pshufd xmm4, xmm0, 55H ; 011C _ 66: 0F 70. E0, 55 + pxor xmm4, xmm3 ; 0121 _ 66: 0F EF. E3 + pslldq xmm3, 4 ; 0125 _ 66: 0F 73. FB, 04 + pxor xmm4, xmm3 ; 012A _ 66: 0F EF. E3 + pslldq xmm3, 4 ; 012E _ 66: 0F 73. FB, 04 + pxor xmm4, xmm3 ; 0133 _ 66: 0F EF. E3 + pslldq xmm3, 4 ; 0137 _ 66: 0F 73. FB, 04 + pxor xmm4, xmm3 ; 013C _ 66: 0F EF. E3 + pshufd xmm2, xmm4, 0FFH ; 0140 _ 66: 0F 70. D4, FF + pxor xmm2, xmm1 ; 0145 _ 66: 0F EF. D1 + pslldq xmm1, 4 ; 0149 _ 66: 0F 73. F9, 04 + pxor xmm2, xmm1 ; 014E _ 66: 0F EF. D1 + movaps xmm0, xmm2 ; 0152 _ 0F 28. C2 + movd dword ptr [ecx+70H], xmm2 ; 0155 _ 66: 0F 7E. 51, 70 + psrldq xmm0, 4 ; 015A _ 66: 0F 73. D8, 04 + movd dword ptr [ecx+74H], xmm0 ; 015F _ 66: 0F 7E. 41, 74 + movups xmmword ptr [ecx+60H], xmm4 ; 0164 _ 0F 11. 61, 60 + aeskeygenassist xmm0, xmm2, 10H ; 0168 _ 66: 0F 3A DF. C2, 10 + pshufd xmm3, xmm0, 55H ; 016E _ 66: 0F 70. D8, 55 + pxor xmm3, xmm4 ; 0173 _ 66: 0F EF. DC + pslldq xmm4, 4 ; 0177 _ 66: 0F 73. FC, 04 + pxor xmm3, xmm4 ; 017C _ 66: 0F EF. DC + pslldq xmm4, 4 ; 0180 _ 66: 0F 73. FC, 04 + pxor xmm3, xmm4 ; 0185 _ 66: 0F EF. DC + pslldq xmm4, 4 ; 0189 _ 66: 0F 73. FC, 04 + pxor xmm3, xmm4 ; 018E _ 66: 0F EF. DC + pshufd xmm1, xmm3, 0FFH ; 0192 _ 66: 0F 70. CB, FF + pxor xmm1, xmm2 ; 0197 _ 66: 0F EF. CA + pslldq xmm2, 4 ; 019B _ 66: 0F 73. FA, 04 + pxor xmm1, xmm2 ; 01A0 _ 66: 0F EF. CA + movups xmmword ptr [ecx+78H], xmm3 ; 01A4 _ 0F 11. 59, 78 + movaps xmm0, xmm1 ; 01A8 _ 0F 28. C1 + movd dword ptr [ecx+88H], xmm1 ; 01AB _ 66: 0F 7E. 89, 00000088 + psrldq xmm0, 4 ; 01B3 _ 66: 0F 73. D8, 04 + movd dword ptr [ecx+8CH], xmm0 ; 01B8 _ 66: 0F 7E. 81, 0000008C + aeskeygenassist xmm0, xmm1, 20H ; 01C0 _ 66: 0F 3A DF. C1, 20 + pshufd xmm4, xmm0, 55H ; 01C6 _ 66: 0F 70. E0, 55 + pxor xmm4, xmm3 ; 01CB _ 66: 0F EF. E3 + pslldq xmm3, 4 ; 01CF _ 66: 0F 73. FB, 04 + pxor xmm4, xmm3 ; 01D4 _ 66: 0F EF. E3 + pslldq xmm3, 4 ; 01D8 _ 66: 0F 73. FB, 04 + pxor xmm4, xmm3 ; 01DD _ 66: 0F EF. E3 + pslldq xmm3, 4 ; 01E1 _ 66: 0F 73. FB, 04 + pxor xmm4, xmm3 ; 01E6 _ 66: 0F EF. E3 + pshufd xmm2, xmm4, 0FFH ; 01EA _ 66: 0F 70. D4, FF + pxor xmm2, xmm1 ; 01EF _ 66: 0F EF. D1 + pslldq xmm1, 4 ; 01F3 _ 66: 0F 73. F9, 04 + pxor xmm2, xmm1 ; 01F8 _ 66: 0F EF. D1 + movaps xmm0, xmm2 ; 01FC _ 0F 28. C2 + movd dword ptr [ecx+0A0H], xmm2 ; 01FF _ 66: 0F 7E. 91, 000000A0 + psrldq xmm0, 4 ; 0207 _ 66: 0F 73. D8, 04 + movd dword ptr [ecx+0A4H], xmm0 ; 020C _ 66: 0F 7E. 81, 000000A4 + movups xmmword ptr [ecx+90H], xmm4 ; 0214 _ 0F 11. A1, 00000090 + aeskeygenassist xmm0, xmm2, 40H ; 021B _ 66: 0F 3A DF. C2, 40 + pshufd xmm5, xmm0, 55H ; 0221 _ 66: 0F 70. E8, 55 + pxor xmm5, xmm4 ; 0226 _ 66: 0F EF. EC + pslldq xmm4, 4 ; 022A _ 66: 0F 73. FC, 04 + pxor xmm5, xmm4 ; 022F _ 66: 0F EF. EC + pslldq xmm4, 4 ; 0233 _ 66: 0F 73. FC, 04 + pxor xmm5, xmm4 ; 0238 _ 66: 0F EF. EC + pslldq xmm4, 4 ; 023C _ 66: 0F 73. FC, 04 + pxor xmm5, xmm4 ; 0241 _ 66: 0F EF. EC + pshufd xmm3, xmm5, 0FFH ; 0245 _ 66: 0F 70. DD, FF + pxor xmm3, xmm2 ; 024A _ 66: 0F EF. DA + pslldq xmm2, 4 ; 024E _ 66: 0F 73. FA, 04 + pxor xmm3, xmm2 ; 0253 _ 66: 0F EF. DA + movaps xmm0, xmm3 ; 0257 _ 0F 28. C3 + movd dword ptr [ecx+0B8H], xmm3 ; 025A _ 66: 0F 7E. 99, 000000B8 + psrldq xmm0, 4 ; 0262 _ 66: 0F 73. D8, 04 + movd dword ptr [ecx+0BCH], xmm0 ; 0267 _ 66: 0F 7E. 81, 000000BC + aeskeygenassist xmm0, xmm3, 80H ; 026F _ 66: 0F 3A DF. C3, 80 + pshufd xmm1, xmm0, 55H ; 0275 _ 66: 0F 70. C8, 55 + movups xmmword ptr [ecx+0A8H], xmm5 ; 027A _ 0F 11. A9, 000000A8 + pxor xmm1, xmm5 ; 0281 _ 66: 0F EF. CD + pslldq xmm5, 4 ; 0285 _ 66: 0F 73. FD, 04 + pxor xmm1, xmm5 ; 028A _ 66: 0F EF. CD + pslldq xmm5, 4 ; 028E _ 66: 0F 73. FD, 04 + pxor xmm1, xmm5 ; 0293 _ 66: 0F EF. CD + pslldq xmm5, 4 ; 0297 _ 66: 0F 73. FD, 04 + pxor xmm1, xmm5 ; 029C _ 66: 0F EF. CD + pshufd xmm0, xmm1, 0FFH ; 02A0 _ 66: 0F 70. C1, FF + pxor xmm0, xmm3 ; 02A5 _ 66: 0F EF. C3 + pslldq xmm3, 4 ; 02A9 _ 66: 0F 73. FB, 04 + pxor xmm0, xmm3 ; 02AE _ 66: 0F EF. C3 + movd dword ptr [ecx+0D0H], xmm0 ; 02B2 _ 66: 0F 7E. 81, 000000D0 + psrldq xmm0, 4 ; 02BA _ 66: 0F 73. D8, 04 + movups xmmword ptr [ecx+0C0H], xmm1 ; 02BF _ 0F 11. 89, 000000C0 + movd dword ptr [ecx+0D4H], xmm0 ; 02C6 _ 66: 0F 7E. 81, 000000D4 + ret ; 02CE _ C3 + +.text$mn ENDS + +.text$mn SEGMENT PARA PUBLIC 'CODE' + ; Communal section not supported by MASM + +_aesni_setkey_enc_256 LABEL NEAR + mov eax, dword ptr [esp+8H] ; 0000 _ 8B. 44 24, 08 + push ebx ; 0004 _ 53 + push ebp ; 0005 _ 55 + mov ebp, dword ptr [esp+0CH] ; 0006 _ 8B. 6C 24, 0C + movups xmm0, xmmword ptr [eax] ; 000A _ 0F 10. 00 + push esi ; 000D _ 56 + push edi ; 000E _ 57 + movups xmmword ptr [ebp], xmm0 ; 000F _ 0F 11. 45, 00 + lea ecx, [ebp+30H] ; 0013 _ 8D. 4D, 30 + movups xmm0, xmmword ptr [eax+10H] ; 0016 _ 0F 10. 40, 10 + lea esi, [ebp+20H] ; 001A _ 8D. 75, 20 + push ecx ; 001D _ 51 + movups xmmword ptr [ebp+10H], xmm0 ; 001E _ 0F 11. 45, 10 + push esi ; 0022 _ 56 + movaps xmm1, xmmword ptr [ebp+10H] ; 0023 _ 0F 28. 4D, 10 + movaps xmm0, xmmword ptr [ebp] ; 0027 _ 0F 28. 45, 00 + aeskeygenassist xmm2, xmm1, 01H ; 002B _ 66: 0F 3A DF. D1, 01 + call _aesni_set_rk_256 ; 0031 _ E8, 00000000(rel) + movaps xmm1, xmmword ptr [ecx] ; 0036 _ 0F 28. 09 + lea edx, [ebp+50H] ; 0039 _ 8D. 55, 50 + movaps xmm0, xmmword ptr [esi] ; 003C _ 0F 28. 06 + lea edi, [ebp+40H] ; 003F _ 8D. 7D, 40 + push edx ; 0042 _ 52 + push edi ; 0043 _ 57 + aeskeygenassist xmm2, xmm1, 02H ; 0044 _ 66: 0F 3A DF. D1, 02 + call _aesni_set_rk_256 ; 004A _ E8, 00000000(rel) + movaps xmm1, xmmword ptr [edx] ; 004F _ 0F 28. 0A + lea ecx, [ebp+70H] ; 0052 _ 8D. 4D, 70 + movaps xmm0, xmmword ptr [edi] ; 0055 _ 0F 28. 07 + lea esi, [ebp+60H] ; 0058 _ 8D. 75, 60 + push ecx ; 005B _ 51 + push esi ; 005C _ 56 + aeskeygenassist xmm2, xmm1, 04H ; 005D _ 66: 0F 3A DF. D1, 04 + call _aesni_set_rk_256 ; 0063 _ E8, 00000000(rel) + movaps xmm1, xmmword ptr [ecx] ; 0068 _ 0F 28. 09 + lea edx, [ebp+90H] ; 006B _ 8D. 95, 00000090 + movaps xmm0, xmmword ptr [esi] ; 0071 _ 0F 28. 06 + lea edi, [ebp+80H] ; 0074 _ 8D. BD, 00000080 + push edx ; 007A _ 52 + push edi ; 007B _ 57 + aeskeygenassist xmm2, xmm1, 08H ; 007C _ 66: 0F 3A DF. D1, 08 + call _aesni_set_rk_256 ; 0082 _ E8, 00000000(rel) + movaps xmm1, xmmword ptr [edx] ; 0087 _ 0F 28. 0A + lea esi, [ebp+0B0H] ; 008A _ 8D. B5, 000000B0 + movaps xmm0, xmmword ptr [edi] ; 0090 _ 0F 28. 07 + lea ebx, [ebp+0A0H] ; 0093 _ 8D. 9D, 000000A0 + push esi ; 0099 _ 56 + push ebx ; 009A _ 53 + aeskeygenassist xmm2, xmm1, 10H ; 009B _ 66: 0F 3A DF. D1, 10 + call _aesni_set_rk_256 ; 00A1 _ E8, 00000000(rel) + movaps xmm1, xmmword ptr [esi] ; 00A6 _ 0F 28. 0E + lea ecx, [ebp+0D0H] ; 00A9 _ 8D. 8D, 000000D0 + movaps xmm0, xmmword ptr [ebx] ; 00AF _ 0F 28. 03 + lea edx, [ebp+0C0H] ; 00B2 _ 8D. 95, 000000C0 + push ecx ; 00B8 _ 51 + push edx ; 00B9 _ 52 + aeskeygenassist xmm2, xmm1, 20H ; 00BA _ 66: 0F 3A DF. D1, 20 + call _aesni_set_rk_256 ; 00C0 _ E8, 00000000(rel) + movaps xmm1, xmmword ptr [ecx] ; 00C5 _ 0F 28. 09 + lea eax, [ebp+0F0H] ; 00C8 _ 8D. 85, 000000F0 + movaps xmm0, xmmword ptr [edx] ; 00CE _ 0F 28. 02 + push eax ; 00D1 _ 50 + lea eax, [ebp+0E0H] ; 00D2 _ 8D. 85, 000000E0 + push eax ; 00D8 _ 50 + aeskeygenassist xmm2, xmm1, 40H ; 00D9 _ 66: 0F 3A DF. D1, 40 + call _aesni_set_rk_256 ; 00DF _ E8, 00000000(rel) + add esp, 56 ; 00E4 _ 83. C4, 38 + pop edi ; 00E7 _ 5F + pop esi ; 00E8 _ 5E + pop ebp ; 00E9 _ 5D + pop ebx ; 00EA _ 5B + ret ; 00EB _ C3 + +.text$mn ENDS + +.text$mn SEGMENT PARA PUBLIC 'CODE' + ; Communal section not supported by MASM + +_gcm_clmul LABEL NEAR + mov ecx, dword ptr [esp+4H] ; 0000 _ 8B. 4C 24, 04 + movaps xmm4, xmm0 ; 0004 _ 0F 28. E0 + mov eax, dword ptr [esp+8H] ; 0007 _ 8B. 44 24, 08 + movaps xmm2, xmm4 ; 000B _ 0F 28. D4 + pclmulqdq xmm2, xmm1, 00H ; 000E _ 66: 0F 3A 44. D1, 00 + movaps xmm3, xmm4 ; 0014 _ 0F 28. DC + movaps xmmword ptr [ecx], xmm2 ; 0017 _ 0F 29. 11 + movaps xmm2, xmm4 ; 001A _ 0F 28. D4 + pclmulqdq xmm3, xmm1, 10H ; 001D _ 66: 0F 3A 44. D9, 10 + pclmulqdq xmm2, xmm1, 01H ; 0023 _ 66: 0F 3A 44. D1, 01 + pxor xmm3, xmm2 ; 0029 _ 66: 0F EF. DA + movaps xmm0, xmm3 ; 002D _ 0F 28. C3 + pslldq xmm3, 8 ; 0030 _ 66: 0F 73. FB, 08 + pclmulqdq xmm4, xmm1, 11H ; 0035 _ 66: 0F 3A 44. E1, 11 + psrldq xmm0, 8 ; 003B _ 66: 0F 73. D8, 08 + pxor xmm4, xmm0 ; 0040 _ 66: 0F EF. E0 + movaps xmmword ptr [eax], xmm4 ; 0044 _ 0F 29. 20 + pxor xmm3, xmmword ptr [ecx] ; 0047 _ 66: 0F EF. 19 + movaps xmmword ptr [ecx], xmm3 ; 004B _ 0F 29. 19 + ret ; 004E _ C3 + +.text$mn ENDS + +.text$mn SEGMENT PARA PUBLIC 'CODE' + ; Communal section not supported by MASM + +_gcm_mix LABEL NEAR + movaps xmm3, xmm0 ; 0000 _ 0F 28. D8 + psllq xmm0, 63 ; 0003 _ 66: 0F 73. F0, 3F + movaps xmm1, xmm3 ; 0008 _ 0F 28. CB + movaps xmm2, xmm3 ; 000B _ 0F 28. D3 + psllq xmm1, 62 ; 000E _ 66: 0F 73. F1, 3E + psrlq xmm2, 2 ; 0013 _ 66: 0F 73. D2, 02 + pxor xmm0, xmm1 ; 0018 _ 66: 0F EF. C1 + movaps xmm1, xmm3 ; 001C _ 0F 28. CB + psllq xmm1, 57 ; 001F _ 66: 0F 73. F1, 39 + pxor xmm0, xmm1 ; 0024 _ 66: 0F EF. C1 + movaps xmm1, xmm3 ; 0028 _ 0F 28. CB + psrlq xmm1, 1 ; 002B _ 66: 0F 73. D1, 01 + psrldq xmm0, 8 ; 0030 _ 66: 0F 73. D8, 08 + pxor xmm2, xmm1 ; 0035 _ 66: 0F EF. D1 + movaps xmm1, xmm3 ; 0039 _ 0F 28. CB + psrlq xmm1, 7 ; 003C _ 66: 0F 73. D1, 07 + pxor xmm2, xmm1 ; 0041 _ 66: 0F EF. D1 + pxor xmm0, xmm2 ; 0045 _ 66: 0F EF. C2 + pxor xmm0, xmm3 ; 0049 _ 66: 0F EF. C3 + ret ; 004D _ C3 + +.text$mn ENDS + +.text$mn SEGMENT PARA PUBLIC 'CODE' + ; Communal section not supported by MASM + +_gcm_reduce LABEL NEAR + movaps xmm2, xmm0 ; 0000 _ 0F 28. D0 + psllq xmm0, 63 ; 0003 _ 66: 0F 73. F0, 3F + movaps xmm1, xmm2 ; 0008 _ 0F 28. CA + psllq xmm1, 62 ; 000B _ 66: 0F 73. F1, 3E + pxor xmm0, xmm1 ; 0010 _ 66: 0F EF. C1 + movaps xmm1, xmm2 ; 0014 _ 0F 28. CA + psllq xmm1, 57 ; 0017 _ 66: 0F 73. F1, 39 + pxor xmm0, xmm1 ; 001C _ 66: 0F EF. C1 + pslldq xmm0, 8 ; 0020 _ 66: 0F 73. F8, 08 + pxor xmm0, xmm2 ; 0025 _ 66: 0F EF. C2 + ret ; 0029 _ C3 + +.text$mn ENDS + +.text$mn SEGMENT PARA PUBLIC 'CODE' + ; Communal section not supported by MASM + +_gcm_shift LABEL NEAR + mov eax, dword ptr [esp+4H] ; 0000 _ 8B. 44 24, 04 + mov ecx, dword ptr [esp+8H] ; 0004 _ 8B. 4C 24, 08 + movaps xmm1, xmmword ptr [eax] ; 0008 _ 0F 28. 08 + movaps xmm4, xmmword ptr [ecx] ; 000B _ 0F 28. 21 + movaps xmm2, xmm1 ; 000E _ 0F 28. D1 + movaps xmm3, xmm4 ; 0011 _ 0F 28. DC + psrlq xmm2, 63 ; 0014 _ 66: 0F 73. D2, 3F + psrlq xmm4, 63 ; 0019 _ 66: 0F 73. D4, 3F + movaps xmm0, xmm2 ; 001E _ 0F 28. C2 + psllq xmm3, 1 ; 0021 _ 66: 0F 73. F3, 01 + pslldq xmm4, 8 ; 0026 _ 66: 0F 73. FC, 08 + psllq xmm1, 1 ; 002B _ 66: 0F 73. F1, 01 + por xmm4, xmm3 ; 0030 _ 66: 0F EB. E3 + pslldq xmm0, 8 ; 0034 _ 66: 0F 73. F8, 08 + psrldq xmm2, 8 ; 0039 _ 66: 0F 73. DA, 08 + por xmm1, xmm0 ; 003E _ 66: 0F EB. C8 + por xmm4, xmm2 ; 0042 _ 66: 0F EB. E2 + movaps xmmword ptr [eax], xmm1 ; 0046 _ 0F 29. 08 + movaps xmmword ptr [ecx], xmm4 ; 0049 _ 0F 29. 21 + ret ; 004C _ C3 + +.text$mn ENDS + +.text$mn SEGMENT PARA PUBLIC 'CODE' + ; Communal section not supported by MASM + +_mbedtls_aesni_crypt_ecb PROC NEAR + mov edx, dword ptr [esp+4H] ; 0000 _ 8B. 54 24, 04 + mov ecx, dword ptr [esp+0CH] ; 0004 _ 8B. 4C 24, 0C + mov eax, dword ptr [edx+4H] ; 0008 _ 8B. 42, 04 + movups xmm0, xmmword ptr [ecx] ; 000B _ 0F 10. 01 + lea eax, [edx+eax*4] ; 000E _ 8D. 04 82 + mov ecx, dword ptr [edx] ; 0011 _ 8B. 0A + movaps xmm1, xmmword ptr [eax+8H] ; 0013 _ 0F 28. 48, 08 + dec ecx ; 0017 _ 49 + add eax, 24 ; 0018 _ 83. C0, 18 + pxor xmm1, xmm0 ; 001B _ 66: 0F EF. C8 + cmp dword ptr [esp+8H], 0 ; 001F _ 83. 7C 24, 08, 00 + jnz ?_003 ; 0024 _ 75, 26 + test ecx, ecx ; 0026 _ 85. C9 + jz ?_002 ; 0028 _ 74, 13 + ; Filling space: 6H + ; Filler type: Multi-byte NOP + ; db 66H, 0FH, 1FH, 44H, 00H, 00H + +ALIGN 8 +?_001: aesdec xmm1, xmmword ptr [eax] ; 0030 _ 66: 0F 38 DE. 08 + add eax, 16 ; 0035 _ 83. C0, 10 + sub ecx, 1 ; 0038 _ 83. E9, 01 + jnz ?_001 ; 003B _ 75, F3 +?_002: aesdeclast xmm1, xmmword ptr [eax] ; 003D _ 66: 0F 38 DF. 08 + mov eax, dword ptr [esp+10H] ; 0042 _ 8B. 44 24, 10 + movups xmmword ptr [eax], xmm1 ; 0046 _ 0F 11. 08 + xor eax, eax ; 0049 _ 33. C0 + ret ; 004B _ C3 +_mbedtls_aesni_crypt_ecb ENDP + +?_003 LABEL NEAR + test ecx, ecx ; 004C _ 85. C9 + jz ?_005 ; 004E _ 74, 0D +?_004: aesenc xmm1, xmmword ptr [eax] ; 0050 _ 66: 0F 38 DC. 08 + add eax, 16 ; 0055 _ 83. C0, 10 + sub ecx, 1 ; 0058 _ 83. E9, 01 + jnz ?_004 ; 005B _ 75, F3 +?_005: aesenclast xmm1, xmmword ptr [eax] ; 005D _ 66: 0F 38 DD. 08 + mov eax, dword ptr [esp+10H] ; 0062 _ 8B. 44 24, 10 + movups xmmword ptr [eax], xmm1 ; 0066 _ 0F 11. 08 + xor eax, eax ; 0069 _ 33. C0 + ret ; 006B _ C3 + +.text$mn ENDS + +.text$mn SEGMENT PARA PUBLIC 'CODE' + ; Communal section not supported by MASM + +_mbedtls_aesni_gcm_mult PROC NEAR + push ebp ; 0000 _ 55 + mov ebp, esp ; 0001 _ 8B. EC + and esp, 0FFFFFFF0H ; 0003 _ 83. E4, F0 + mov ecx, dword ptr [ebp+10H] ; 0006 _ 8B. 4D, 10 + sub esp, 44 ; 0009 _ 83. EC, 2C + xor eax, eax ; 000C _ 33. C0 + push esi ; 000E _ 56 + mov esi, dword ptr [ebp+0CH] ; 000F _ 8B. 75, 0C + lea edx, [ecx+0FH] ; 0012 _ 8D. 51, 0F + sub esi, ecx ; 0015 _ 2B. F1 + ; Filling space: 9H + ; Filler type: Multi-byte NOP + ; db 66H, 0FH, 1FH, 84H, 00H, 00H, 00H, 00H + ; db 00H + +ALIGN 16 +?_006: movzx ecx, byte ptr [esi+edx] ; 0020 _ 0F B6. 0C 16 + lea edx, [edx-1H] ; 0024 _ 8D. 52, FF + mov byte ptr [esp+eax+10H], cl ; 0027 _ 88. 4C 04, 10 + movzx ecx, byte ptr [edx+1H] ; 002B _ 0F B6. 4A, 01 + mov byte ptr [esp+eax+20H], cl ; 002F _ 88. 4C 04, 20 + inc eax ; 0033 _ 40 + cmp eax, 16 ; 0034 _ 83. F8, 10 + jc ?_006 ; 0037 _ 72, E7 + movaps xmm3, xmmword ptr [esp+10H] ; 0039 _ 0F 28. 5C 24, 10 + lea edx, [esp+2FH] ; 003E _ 8D. 54 24, 2F + movaps xmm1, xmmword ptr [esp+20H] ; 0042 _ 0F 28. 4C 24, 20 + movaps xmm2, xmm3 ; 0047 _ 0F 28. D3 + pclmulqdq xmm2, xmm1, 10H ; 004A _ 66: 0F 3A 44. D1, 10 + movaps xmm0, xmm3 ; 0050 _ 0F 28. C3 + mov esi, dword ptr [ebp+8H] ; 0053 _ 8B. 75, 08 + pclmulqdq xmm0, xmm1, 01H ; 0056 _ 66: 0F 3A 44. C1, 01 + pxor xmm2, xmm0 ; 005C _ 66: 0F EF. D0 + movaps xmm5, xmm3 ; 0060 _ 0F 28. EB + pclmulqdq xmm3, xmm1, 00H ; 0063 _ 66: 0F 3A 44. D9, 00 + movaps xmm0, xmm2 ; 0069 _ 0F 28. C2 + xor ecx, ecx ; 006C _ 33. C9 + pslldq xmm2, 8 ; 006E _ 66: 0F 73. FA, 08 + pxor xmm3, xmm2 ; 0073 _ 66: 0F EF. DA + psrldq xmm0, 8 ; 0077 _ 66: 0F 73. D8, 08 + movaps xmm4, xmm3 ; 007C _ 0F 28. E3 + psllq xmm3, 1 ; 007F _ 66: 0F 73. F3, 01 + pclmulqdq xmm5, xmm1, 11H ; 0084 _ 66: 0F 3A 44. E9, 11 + pxor xmm5, xmm0 ; 008A _ 66: 0F EF. E8 + psrlq xmm4, 63 ; 008E _ 66: 0F 73. D4, 3F + movaps xmm1, xmm4 ; 0093 _ 0F 28. CC + psrldq xmm4, 8 ; 0096 _ 66: 0F 73. DC, 08 + pslldq xmm1, 8 ; 009B _ 66: 0F 73. F9, 08 + por xmm1, xmm3 ; 00A0 _ 66: 0F EB. CB + movaps xmm2, xmm1 ; 00A4 _ 0F 28. D1 + movaps xmm0, xmm1 ; 00A7 _ 0F 28. C1 + psllq xmm0, 62 ; 00AA _ 66: 0F 73. F0, 3E + psllq xmm2, 63 ; 00AF _ 66: 0F 73. F2, 3F + pxor xmm2, xmm0 ; 00B4 _ 66: 0F EF. D0 + movaps xmm0, xmm1 ; 00B8 _ 0F 28. C1 + psllq xmm0, 57 ; 00BB _ 66: 0F 73. F0, 39 + pxor xmm2, xmm0 ; 00C0 _ 66: 0F EF. D0 + pslldq xmm2, 8 ; 00C4 _ 66: 0F 73. FA, 08 + pxor xmm2, xmm1 ; 00C9 _ 66: 0F EF. D1 + movaps xmm3, xmm2 ; 00CD _ 0F 28. DA + movaps xmm0, xmm2 ; 00D0 _ 0F 28. C2 + psllq xmm0, 62 ; 00D3 _ 66: 0F 73. F0, 3E + movaps xmm1, xmm2 ; 00D8 _ 0F 28. CA + psllq xmm3, 63 ; 00DB _ 66: 0F 73. F3, 3F + psrlq xmm1, 2 ; 00E0 _ 66: 0F 73. D1, 02 + pxor xmm3, xmm0 ; 00E5 _ 66: 0F EF. D8 + movaps xmm0, xmm2 ; 00E9 _ 0F 28. C2 + psllq xmm0, 57 ; 00EC _ 66: 0F 73. F0, 39 + pxor xmm3, xmm0 ; 00F1 _ 66: 0F EF. D8 + movaps xmm0, xmm2 ; 00F5 _ 0F 28. C2 + psrlq xmm0, 1 ; 00F8 _ 66: 0F 73. D0, 01 + psrldq xmm3, 8 ; 00FD _ 66: 0F 73. DB, 08 + pxor xmm1, xmm0 ; 0102 _ 66: 0F EF. C8 + movaps xmm0, xmm2 ; 0106 _ 0F 28. C2 + psrlq xmm0, 7 ; 0109 _ 66: 0F 73. D0, 07 + pxor xmm1, xmm0 ; 010E _ 66: 0F EF. C8 + movaps xmm0, xmm5 ; 0112 _ 0F 28. C5 + psrlq xmm0, 63 ; 0115 _ 66: 0F 73. D0, 3F + pxor xmm3, xmm1 ; 011A _ 66: 0F EF. D9 + psllq xmm5, 1 ; 011E _ 66: 0F 73. F5, 01 + pxor xmm3, xmm2 ; 0123 _ 66: 0F EF. DA + pslldq xmm0, 8 ; 0127 _ 66: 0F 73. F8, 08 + por xmm0, xmm5 ; 012C _ 66: 0F EB. C5 + por xmm0, xmm4 ; 0130 _ 66: 0F EB. C4 + pxor xmm3, xmm0 ; 0134 _ 66: 0F EF. D8 + movaps xmmword ptr [esp+20H], xmm3 ; 0138 _ 0F 29. 5C 24, 20 + ; Filling space: 3H + ; Filler type: Multi-byte NOP + ; db 0FH, 1FH, 00H + +ALIGN 8 +?_007: mov al, byte ptr [edx] ; 0140 _ 8A. 02 + lea edx, [edx-1H] ; 0142 _ 8D. 52, FF + mov byte ptr [ecx+esi], al ; 0145 _ 88. 04 31 + inc ecx ; 0148 _ 41 + cmp ecx, 16 ; 0149 _ 83. F9, 10 + jc ?_007 ; 014C _ 72, F2 + pop esi ; 014E _ 5E + mov esp, ebp ; 014F _ 8B. E5 + pop ebp ; 0151 _ 5D + ret ; 0152 _ C3 +_mbedtls_aesni_gcm_mult ENDP + +.text$mn ENDS + +.text$mn SEGMENT PARA PUBLIC 'CODE' + ; Communal section not supported by MASM + +_mbedtls_aesni_has_support PROC NEAR + cmp dword ptr [aesni_has_support_done], 0 ; 0000 _ 83. 3D, 00000000(d), 00 + jnz ?_008 ; 0007 _ 75, 3E + xor ecx, ecx ; 0009 _ 33. C9 + mov dword ptr [aesni_has_support_done], 1 ; 000B _ C7. 05, 00000000(d), 00000001 + push ebx ; 0015 _ 53 + mov eax, 1 ; 0016 _ B8, 00000001 + cpuid ; 001B _ 0F A2 + mov dword ptr [aesni_has_support_info], eax ; 001D _ A3, 00000000(d) + mov eax, ecx ; 0022 _ 8B. C1 + mov dword ptr [aesni_has_support_flag], eax ; 0024 _ A3, 00000000(d) + and eax, dword ptr [esp+8H] ; 0029 _ 23. 44 24, 08 + neg eax ; 002D _ F7. D8 + mov dword ptr [aesni_has_support_info], ebx ; 002F _ 89. 1D, 00000004(d) + mov dword ptr [aesni_has_support_info], ecx ; 0035 _ 89. 0D, 00000008(d) + sbb eax, eax ; 003B _ 1B. C0 + mov dword ptr [aesni_has_support_info], edx ; 003D _ 89. 15, 0000000C(d) + pop ebx ; 0043 _ 5B + neg eax ; 0044 _ F7. D8 + ret ; 0046 _ C3 +_mbedtls_aesni_has_support ENDP + +?_008 LABEL NEAR + mov eax, dword ptr [aesni_has_support_flag] ; 0047 _ A1, 00000000(d) + and eax, dword ptr [esp+4H] ; 004C _ 23. 44 24, 04 + neg eax ; 0050 _ F7. D8 + sbb eax, eax ; 0052 _ 1B. C0 + neg eax ; 0054 _ F7. D8 + ret ; 0056 _ C3 + +.text$mn ENDS + +.text$mn SEGMENT PARA PUBLIC 'CODE' + ; Communal section not supported by MASM + +_mbedtls_aesni_inverse_key PROC NEAR + mov eax, dword ptr [esp+0CH] ; 0000 _ 8B. 44 24, 0C + mov edx, dword ptr [esp+8H] ; 0004 _ 8B. 54 24, 08 + mov ecx, dword ptr [esp+4H] ; 0008 _ 8B. 4C 24, 04 + shl eax, 4 ; 000C _ C1. E0, 04 + add eax, edx ; 000F _ 03. C2 + movaps xmm0, xmmword ptr [eax] ; 0011 _ 0F 28. 00 + sub eax, 16 ; 0014 _ 83. E8, 10 + movaps xmmword ptr [ecx], xmm0 ; 0017 _ 0F 29. 01 + add ecx, 16 ; 001A _ 83. C1, 10 + cmp eax, edx ; 001D _ 3B. C2 + jbe ?_010 ; 001F _ 76, 12 +?_009: aesimc xmm0, xmmword ptr [eax] ; 0021 _ 66: 0F 38 DB. 00 + sub eax, 16 ; 0026 _ 83. E8, 10 + movaps xmmword ptr [ecx], xmm0 ; 0029 _ 0F 29. 01 + lea ecx, [ecx+10H] ; 002C _ 8D. 49, 10 + cmp eax, edx ; 002F _ 3B. C2 + ja ?_009 ; 0031 _ 77, EE +?_010: movaps xmm0, xmmword ptr [eax] ; 0033 _ 0F 28. 00 + movaps xmmword ptr [ecx], xmm0 ; 0036 _ 0F 29. 01 + ret ; 0039 _ C3 +_mbedtls_aesni_inverse_key ENDP + +.text$mn ENDS + +.text$mn SEGMENT PARA PUBLIC 'CODE' + ; Communal section not supported by MASM + +_mbedtls_aesni_setkey_enc PROC NEAR + mov eax, dword ptr [esp+0CH] ; 0000 _ 8B. 44 24, 0C + sub eax, 128 ; 0004 _ 2D, 00000080 + jz ?_013 ; 0009 _ 74, 36 + sub eax, 64 ; 000B _ 83. E8, 40 + jz ?_012 ; 000E _ 74, 1E + sub eax, 64 ; 0010 _ 83. E8, 40 + jz ?_011 ; 0013 _ 74, 06 + mov eax, 4294967264 ; 0015 _ B8, FFFFFFE0 + ret ; 001A _ C3 + +?_011: push dword ptr [esp+8H] ; 001B _ FF. 74 24, 08 + push dword ptr [esp+8H] ; 001F _ FF. 74 24, 08 + call _aesni_setkey_enc_256 ; 0023 _ E8, 00000000(rel) + add esp, 8 ; 0028 _ 83. C4, 08 + xor eax, eax ; 002B _ 33. C0 + ret ; 002D _ C3 + +?_012: push dword ptr [esp+8H] ; 002E _ FF. 74 24, 08 + push dword ptr [esp+8H] ; 0032 _ FF. 74 24, 08 + call _aesni_setkey_enc_192 ; 0036 _ E8, 00000000(rel) + add esp, 8 ; 003B _ 83. C4, 08 + xor eax, eax ; 003E _ 33. C0 + ret ; 0040 _ C3 +_mbedtls_aesni_setkey_enc ENDP + +?_013 LABEL NEAR + push dword ptr [esp+8H] ; 0041 _ FF. 74 24, 08 + push dword ptr [esp+8H] ; 0045 _ FF. 74 24, 08 + call _aesni_setkey_enc_128 ; 0049 _ E8, 00000000(rel) + add esp, 8 ; 004E _ 83. C4, 08 + xor eax, eax ; 0051 _ 33. C0 + ret ; 0053 _ C3 + +.text$mn ENDS + +END diff --git a/mcwin32/libmbedtls/owc/aesni.obj b/mcwin32/libmbedtls/owc/aesni.obj new file mode 100644 index 00000000..87eb6f0b Binary files /dev/null and b/mcwin32/libmbedtls/owc/aesni.obj differ diff --git a/mcwin32/libmbedtls/readme_3_5_2.txt b/mcwin32/libmbedtls/readme_3_5_2.txt new file mode 100644 index 00000000..98fc4d00 --- /dev/null +++ b/mcwin32/libmbedtls/readme_3_5_2.txt @@ -0,0 +1,223 @@ + + Source: mbed TLS 3.5.2 + + Makefile.in: + + o CRYPTO_SOURCES, updated + + aesce.c + + ecp_curves_new.c + - hash_info.c + u psa_crypto_driver_wrappers_no_static.c + + psa_crypto_ffdh.c + + sha3.c + + o X509_SOURCES, cloned + + x509write.c + + o TLS_SOURCES, cloned + + o Externals + + owc\aseni.obj [OpenWatcom only] + + Bcrypt.lib + + Source: /mbedtls-3.5.2/library/CMakefile.txt + + Definitions: + + libmbedcrypto.def + + mbedtls_asn1_write_algorithm_identifier_ext + - library\bignum_mod.c + - library\bignum_mod_raw.c + - library\constant_time.c + - library\hash_info.c + * library\oid.c [updated] + * library\platform_util.c + + mbedtls_zeroize_and_free + + mbedtls_ms_time + * library\sha3.c + + mbedtls_sha3_init + + mbedtls_sha3_free + + mbedtls_sha3_clone + + mbedtls_sha3_starts + + mbedtls_sha3_update + + mbedtls_sha3_finish + + mbedtls_sha3 + + mbedtls_sha3_self_test + + libmbedtls.def + + libmbedx509.def + + Compiler tweaks: + + library\aesni.h + + + #if defined(__WATCOMC__) + + #define MBEDTLS_AESNI_DECL __cdecl + + #endif + + #if !defined(MBEDTLS_AESNI_DECL) + + #define MBEDTLS_AESNI_DECL + + #endif + + - int mbedtls_aesni_has_support(unsigned int what); + + int MBEDTLS_AESNI_DECL mbedtls_aesni_has_support(unsigned int what); + + - int mbedtls_aesni_crypt_ecb(mbedtls_aes_context *ctx, + + int MBEDTLS_AESNI_DECL mbedtls_aesni_crypt_ecb(mbedtls_aes_context *ctx, + + - void mbedtls_aesni_inverse_key(unsigned char *invkey, + + void MBEDTLS_AESNI_DECL mbedtls_aesni_inverse_key(unsigned char *invkey, + + - int mbedtls_aesni_setkey_enc(unsigned char *rk, + + int MBEDTLS_AESNI_DECL mbedtls_aesni_setkey_enc(unsigned char *rk, + + library\aesni.c + + + #if defined(__MINGW32__) + + static int info[4] = { 0, 0, 0, 0 }; + + #else + static unsigned info[4] = { 0, 0, 0, 0 }; + + #endif + - #if defined(_MSC_VER) + + #if defined(_MSC_VER) || defined(__MINGW32__) + + library\psa_crypto.c (19 occurances) + + - psa_key_attributes_t attributes = { + - .core = slot->attr + - }; + + psa_key_attributes_t attributes = {0}; //OWC + + attributes.core = slot->attr; + + and: + - psa_key_attributes_t attributes = { + - .core = private_key->attr + - }; + + psa_key_attributes_t attributes = {0}; //OWC + + attributes.core = private_key->attr; + + + library\ssl_tls12_server.c(948): + + - MBEDTLS_SSL_DEBUG_MSG( 2, ( "=> parse client hello" ) ); + + + MBEDTLS_SSL_DEBUG_MSG( 2, ( "=> parse client hello" ) ); + read_record_header:; + + + include\mbedtls\platform.h: + + - #if defined(__MINGW32__) || (defined(_MSC_VER) && _MSC_VER <= 1900) + + #if defined(__MINGW32__) || (defined(_MSC_VER) && _MSC_VER <= 1900) || defined(__WATCOMC__) + #define MBEDTLS_PLATFORM_HAS_NON_CONFORMING_SNPRINTF + #define MBEDTLS_PLATFORM_HAS_NON_CONFORMING_VSNPRINTF + + ------- + + #if defined(MBEDTLS_PLATFORM_FPRINTF_ALT) + /* We need FILE * */ + #include + + #if defined(LIBMBED_WIN32) && !defined(LIBMBEDCRYPTO_SOURCE) //stdlib, linkage + + #include "crypto_globals.h" + + #define mbedtls_fprintf get_mbedtls_fprintf() + + #else + extern int (*mbedtls_fprintf)( FILE *stream, const char *format, ... ); + + #endif + + ------- + + #if defined(MBEDTLS_PLATFORM_PRINTF_ALT) + + #if defined(LIBMBED_WIN32) && !defined(LIBMBEDCRYPTO_SOURCE) //stdlib, linkage + + #include "crypto_globals.h" + + #define mbedtls_printf get_mbedtls_printf() + + #else + extern int (*mbedtls_printf)( const char * format, ... ); + + #endif + + ------- + + #if defined(MBEDTLS_PLATFORM_SNPRINTF_ALT) + + #if defined(LIBMBED_WIN32) && !defined(LIBMBEDCRYPTO_SOURCE) //stdlib, linkage + + #include "crypto_globals.h" + + #define mbedtls_snprintf get_mbedtls_snprintf() + + #else + extern int (*mbedtls_snprintf)( char * s, size_t n, const char * format, ... ); + + #endif + + ------- + + #if defined(MBEDTLS_PLATFORM_VSNPRINTF_ALT) + #include + + #if defined(LIBMBED_WIN32) && !defined(LIBMBEDCRYPTO_SOURCE) //stdlib, linkage + + #include "crypto_globals.h" + + #define mbedtls_vsnprintf get_mbedtls_vsnprintf() + + #else + extern int (*mbedtls_vsnprintf)( char * s, size_t n, const char * format, va_list arg ); + + #endif + + include\mbedtls\platform_util.h + + + #if defined(LIBMBED_WIN32) && defined(LIBMBEDCRYPTO_SOURCE) //stdlib, linkage + + #include "crypto_globals.h" + + CRYPTO_MBEDAPI struct tm *mbedtls_platform_gmtime_r( const mbedtls_time_t *tt, + + struct tm *tm_buf ); + + #else + struct tm *mbedtls_platform_gmtime_r( const mbedtls_time_t *tt, + struct tm *tm_buf ); + + #endif + + library\platform_util.c: + + + #if defined(_MSC_VER) || defined(__WATCOMC__) //stdlib, linkage + + static void * stdlib_memset( void *buf, int value, size_t len) + + { + + return memset( buf, value, len); + + } + + static void * (* const volatile memset_func)( void *, int, size_t ) = stdlib_memset; + + #elif ... + static void * (* const volatile memset_func)( void *, int, size_t ) = memset; + + ------- + + - #elif defined(__STDC_LIB_EXT1__) + + #elif defined(__STDC_LIB_EXT1__) && !defined(__WATCOMC__) + memset_s(buf, len, 0, len); + - #elif defined(_WIN32) + + #elif defined(_WIN32) && !defined(__WATCOMC__) + + library\ssl_tls.c: + + #if defined(MBEDTLS_SSL_TLS_C) + + #if defined(_WINDLL) && defined(LIBMBED_DYNAMIC) //stdlib, linkage + + #include "x509_globals.h" + + #endif + + ------- + + + #if defined(_WINDLL) && defined(LIBMBED_DYNAMIC) //stdlib, linkage + + conf->cert_profile = get_mbedtls_x509_crt_profile_suiteb(); + + #else + conf->cert_profile = &mbedtls_x509_crt_profile_suiteb; + + #endf + + ------- + + + #if defined(_WINDLL) && defined(LIBMBED_DYNAMIC) //stdlib, linkage + + conf->cert_profile = get_mbedtls_x509_crt_profile_default(); + + #else + conf->cert_profile = &mbedtls_x509_crt_profile_default; + + #endif + + library\x509_create.c: + + + #if defined(__WATCOMC__) + + mbedtls_asn1_buf oid = {0}; + + #else + mbedtls_asn1_buf oid = { .p = NULL, .len = 0, .tag = MBEDTLS_ASN1_NULL }; + + #endif + + + #if defined(__WATCOMC__) + + oid.tag = MBEDTLS_ASN1_NULL; + + #endif + +//end diff --git a/mcwin32/libmbedtls/win32/crypto_globals.c b/mcwin32/libmbedtls/win32/crypto_globals.c index fb9cd3c0..1ac8675e 100644 --- a/mcwin32/libmbedtls/win32/crypto_globals.c +++ b/mcwin32/libmbedtls/win32/crypto_globals.c @@ -1,4 +1,4 @@ -//$Id: crypto_globals.c,v 1.5 2021/11/08 14:40:45 cvsuser Exp $ +//$Id: crypto_globals.c,v 1.7 2024/03/29 13:51:55 cvsuser Exp $ // // libmbedcrypto support - // retrieve the dynamic fprintf/snprintf/printf implementations (if required) @@ -6,6 +6,14 @@ #include "crypto_globals.h" +#if defined(_MSC_VER) || defined(__WATCOMC__) +#pragma comment(lib, "BCrypt.lib") // BCryptGenRandom() +#endif + +/* + * Global instances + */ + #if defined(MBEDTLS_PLATFORM_FPRINTF_ALT) CRYPTO_MBEDAPI mbedtls_fprintf_t get_mbedtls_fprintf(void) { @@ -23,21 +31,30 @@ get_mbedtls_printf(void) { } #endif + #if defined(MBEDTLS_PLATFORM_SNPRINTF_ALT) CRYPTO_MBEDAPI mbedtls_snprintf_t get_mbedtls_snprintf(void) { #undef mbedtls_snprintf return mbedtls_snprintf; } +#else +int mbedtls_platform_set_snprintf(int (*snprintf_func)(char *s, size_t n, const char *format, ...)) { + return 0; /*not-enabled*/ +} #endif -#if defined(MBEDTLS_PLATFORM_SNPRINTF_ALT) +#if defined(MBEDTLS_PLATFORM_VSNPRINTF_ALT) CRYPTO_MBEDAPI mbedtls_vsnprintf_t get_mbedtls_vsnprintf(void) { #undef mbedtls_vsnprintf return mbedtls_vsnprintf; } +#else +int mbedtls_platform_set_vsnprintf(int (*vsnprintf_func)(char *s, size_t n, const char *format, va_list arg)) { + return 0; /*not-enabled*/ +} #endif diff --git a/mcwin32/libmbedtls/win32/libmbedcrypto.def.3.3.0 b/mcwin32/libmbedtls/win32/libmbedcrypto.def.3.3.0 index 39367f6e..c65d6d9c 100644 --- a/mcwin32/libmbedtls/win32/libmbedcrypto.def.3.3.0 +++ b/mcwin32/libmbedtls/win32/libmbedcrypto.def.3.3.0 @@ -1,4 +1,4 @@ -;$Id: libmbedcrypto.def.3.3.0,v 1.1 2023/03/05 03:34:27 cvsuser Exp $ +;$Id: libmbedcrypto.def.3.3.0,v 1.3 2024/03/29 13:51:55 cvsuser Exp $ ; ; libmbedcrypto library definition (3.3.0) ; diff --git a/mcwin32/libmbedtls/win32/libmbedcrypto.def.3.5.2 b/mcwin32/libmbedtls/win32/libmbedcrypto.def.3.5.2 new file mode 100644 index 00000000..7a0ebf71 --- /dev/null +++ b/mcwin32/libmbedtls/win32/libmbedcrypto.def.3.5.2 @@ -0,0 +1,1003 @@ +;$Id: libmbedcrypto.def.3.5.2,v 1.1 2024/03/29 11:26:49 cvsuser Exp $ +; +; libmbedcrypto library definition (3.4.1) +; +DESCRIPTION "libmbedcrypto" +EXPORTS + +; library\aes.c + mbedtls_aes_init + mbedtls_aes_free + mbedtls_aes_xts_init + mbedtls_aes_xts_free + mbedtls_aes_setkey_enc + mbedtls_aes_setkey_dec + mbedtls_aes_xts_setkey_enc + mbedtls_aes_xts_setkey_dec + mbedtls_internal_aes_encrypt + mbedtls_internal_aes_decrypt + mbedtls_aes_crypt_ecb + mbedtls_aes_crypt_cbc + mbedtls_aes_crypt_xts + mbedtls_aes_crypt_cfb128 + mbedtls_aes_crypt_cfb8 + mbedtls_aes_crypt_ofb + mbedtls_aes_crypt_ctr + mbedtls_aes_self_test + +; library\aria.c + mbedtls_aria_setkey_enc + mbedtls_aria_setkey_dec + mbedtls_aria_crypt_ecb + mbedtls_aria_init + mbedtls_aria_free + mbedtls_aria_crypt_cbc + mbedtls_aria_crypt_cfb128 + mbedtls_aria_crypt_ctr + mbedtls_aria_self_test + +; library\asn1parse.c + mbedtls_asn1_get_len + mbedtls_asn1_get_tag + mbedtls_asn1_get_bool + mbedtls_asn1_get_int + mbedtls_asn1_get_enum + mbedtls_asn1_get_mpi + mbedtls_asn1_get_bitstring + mbedtls_asn1_traverse_sequence_of + mbedtls_asn1_get_bitstring_null + mbedtls_asn1_sequence_free + mbedtls_asn1_get_sequence_of + mbedtls_asn1_get_alg + mbedtls_asn1_get_alg_null + mbedtls_asn1_free_named_data + mbedtls_asn1_free_named_data_list + mbedtls_asn1_free_named_data_list_shallow + mbedtls_asn1_find_named_data + +; library\asn1write.c + mbedtls_asn1_write_len + mbedtls_asn1_write_tag + mbedtls_asn1_write_raw_buffer + mbedtls_asn1_write_mpi + mbedtls_asn1_write_null + mbedtls_asn1_write_oid + mbedtls_asn1_write_algorithm_identifier + mbedtls_asn1_write_algorithm_identifier_ext + mbedtls_asn1_write_bool + mbedtls_asn1_write_int + mbedtls_asn1_write_enum + mbedtls_asn1_write_tagged_string + mbedtls_asn1_write_utf8_string + mbedtls_asn1_write_printable_string + mbedtls_asn1_write_ia5_string + mbedtls_asn1_write_named_bitstring + mbedtls_asn1_write_bitstring + mbedtls_asn1_write_octet_string + mbedtls_asn1_store_named_data + +; library\base64.c + mbedtls_base64_encode + mbedtls_base64_decode + mbedtls_base64_self_test + +; library\bignum.c + mbedtls_mpi_init + mbedtls_mpi_free + mbedtls_mpi_grow + mbedtls_mpi_shrink + mbedtls_mpi_copy + mbedtls_mpi_swap + mbedtls_mpi_lset + mbedtls_mpi_get_bit + mbedtls_mpi_set_bit + mbedtls_mpi_lsb + mbedtls_mpi_bitlen + mbedtls_mpi_size + mbedtls_mpi_read_string + mbedtls_mpi_write_string + mbedtls_mpi_read_file + mbedtls_mpi_write_file + mbedtls_mpi_read_binary_le + mbedtls_mpi_read_binary + mbedtls_mpi_write_binary_le + mbedtls_mpi_write_binary + mbedtls_mpi_shift_l + mbedtls_mpi_shift_r + mbedtls_mpi_cmp_abs + mbedtls_mpi_cmp_mpi + mbedtls_mpi_cmp_int + mbedtls_mpi_add_abs + mbedtls_mpi_sub_abs + mbedtls_mpi_add_mpi + mbedtls_mpi_sub_mpi + mbedtls_mpi_add_int + mbedtls_mpi_sub_int + mbedtls_mpi_mul_mpi + mbedtls_mpi_mul_int + mbedtls_mpi_div_mpi + mbedtls_mpi_div_int + mbedtls_mpi_mod_mpi + mbedtls_mpi_mod_int + mbedtls_mpi_exp_mod + mbedtls_mpi_gcd + mbedtls_mpi_fill_random + mbedtls_mpi_random + mbedtls_mpi_inv_mod + mbedtls_mpi_is_prime_ext + mbedtls_mpi_gen_prime + mbedtls_mpi_self_test + +; library\bignum_core.c + mbedtls_mpi_core_clz + mbedtls_mpi_core_bitlen + mbedtls_mpi_core_bigendian_to_host + mbedtls_mpi_core_cond_assign + mbedtls_mpi_core_cond_swap + mbedtls_mpi_core_read_le + mbedtls_mpi_core_read_be + mbedtls_mpi_core_write_le + mbedtls_mpi_core_write_be + mbedtls_mpi_core_shift_r + mbedtls_mpi_core_add + mbedtls_mpi_core_add_if + mbedtls_mpi_core_sub + mbedtls_mpi_core_mla + mbedtls_mpi_core_montmul_init + mbedtls_mpi_core_montmul + mbedtls_mpi_core_get_mont_r2_unsafe + mbedtls_mpi_core_fill_random + mbedtls_mpi_core_exp_mod_working_limbs + mbedtls_mpi_core_exp_mod + mbedtls_mpi_core_sub_int + +; library\camellia.c + mbedtls_camellia_init + mbedtls_camellia_free + mbedtls_camellia_setkey_enc + mbedtls_camellia_setkey_dec + mbedtls_camellia_crypt_ecb + mbedtls_camellia_crypt_cbc + mbedtls_camellia_crypt_cfb128 + mbedtls_camellia_crypt_ctr + mbedtls_camellia_self_test + +; library\ccm.c + mbedtls_ccm_init + mbedtls_ccm_setkey + mbedtls_ccm_free + mbedtls_ccm_starts + mbedtls_ccm_set_lengths + mbedtls_ccm_update_ad + mbedtls_ccm_update + mbedtls_ccm_finish + mbedtls_ccm_star_encrypt_and_tag + mbedtls_ccm_encrypt_and_tag + mbedtls_ccm_star_auth_decrypt + mbedtls_ccm_auth_decrypt + mbedtls_ccm_self_test + +; library\chacha20.c + mbedtls_chacha20_init + mbedtls_chacha20_free + mbedtls_chacha20_setkey + mbedtls_chacha20_starts + mbedtls_chacha20_update + mbedtls_chacha20_crypt + mbedtls_chacha20_self_test + +; library\chachapoly.c + mbedtls_chachapoly_init + mbedtls_chachapoly_free + mbedtls_chachapoly_setkey + mbedtls_chachapoly_starts + mbedtls_chachapoly_update_aad + mbedtls_chachapoly_update + mbedtls_chachapoly_finish + mbedtls_chachapoly_encrypt_and_tag + mbedtls_chachapoly_auth_decrypt + mbedtls_chachapoly_self_test + +; library\cipher.c + mbedtls_cipher_list + mbedtls_cipher_info_from_type + mbedtls_cipher_info_from_string + mbedtls_cipher_info_from_values + mbedtls_cipher_init + mbedtls_cipher_free + mbedtls_cipher_setup + mbedtls_cipher_setkey + mbedtls_cipher_set_iv + mbedtls_cipher_reset + mbedtls_cipher_update_ad + mbedtls_cipher_update + mbedtls_cipher_finish + mbedtls_cipher_set_padding_mode + mbedtls_cipher_write_tag + mbedtls_cipher_check_tag + mbedtls_cipher_crypt + mbedtls_cipher_auth_encrypt_ext + mbedtls_cipher_auth_decrypt_ext + +; library\cipher_wrap.c + ;_mbedtls_cipher_definitions + ;_mbedtls_cipher_supported + +; library\constant_time.c + ;mbedtls_ct_memcmp + +; library\cmac.c + mbedtls_cipher_cmac_starts + mbedtls_cipher_cmac_update + mbedtls_cipher_cmac_finish + mbedtls_cipher_cmac_reset + mbedtls_cipher_cmac + mbedtls_aes_cmac_prf_128 + mbedtls_cmac_self_test + +; library\ctr_drbg.c + mbedtls_ctr_drbg_init + mbedtls_ctr_drbg_free + mbedtls_ctr_drbg_set_prediction_resistance + mbedtls_ctr_drbg_set_entropy_len + mbedtls_ctr_drbg_set_nonce_len + mbedtls_ctr_drbg_set_reseed_interval + mbedtls_ctr_drbg_update + mbedtls_ctr_drbg_reseed + mbedtls_ctr_drbg_seed + mbedtls_ctr_drbg_random_with_add + mbedtls_ctr_drbg_random + mbedtls_ctr_drbg_write_seed_file + mbedtls_ctr_drbg_update_seed_file + mbedtls_ctr_drbg_self_test + +; library\des.c + mbedtls_des_init + mbedtls_des_free + mbedtls_des3_init + mbedtls_des3_free + mbedtls_des_key_set_parity + mbedtls_des_key_check_key_parity + mbedtls_des_key_check_weak + mbedtls_des_setkey + mbedtls_des_setkey_enc + mbedtls_des_setkey_dec + mbedtls_des3_set2key_enc + mbedtls_des3_set2key_dec + mbedtls_des3_set3key_enc + mbedtls_des3_set3key_dec + mbedtls_des_crypt_ecb + mbedtls_des_crypt_cbc + mbedtls_des3_crypt_ecb + mbedtls_des3_crypt_cbc + mbedtls_des_self_test + +; library\dhm.c + mbedtls_dhm_init + mbedtls_dhm_get_bitlen + mbedtls_dhm_get_len + mbedtls_dhm_get_value + mbedtls_dhm_read_params + mbedtls_dhm_make_params + mbedtls_dhm_set_group + mbedtls_dhm_read_public + mbedtls_dhm_make_public + mbedtls_dhm_calc_secret + mbedtls_dhm_free + mbedtls_dhm_parse_dhm + mbedtls_dhm_parse_dhmfile + mbedtls_dhm_self_test + +; library\ecdh.c + mbedtls_ecdh_can_do + mbedtls_ecdh_gen_public + mbedtls_ecdh_compute_shared + mbedtls_ecdh_init + mbedtls_ecdh_setup + mbedtls_ecdh_free + mbedtls_ecdh_make_params + mbedtls_ecdh_read_params + mbedtls_ecdh_get_params + mbedtls_ecdh_make_public + mbedtls_ecdh_read_public + mbedtls_ecdh_calc_secret + +; library\ecdsa.c + mbedtls_ecdsa_can_do + mbedtls_ecdsa_sign + mbedtls_ecdsa_sign_det_ext + mbedtls_ecdsa_verify + mbedtls_ecdsa_write_signature_restartable + mbedtls_ecdsa_write_signature + mbedtls_ecdsa_read_signature + mbedtls_ecdsa_read_signature_restartable + mbedtls_ecdsa_genkey + mbedtls_ecdsa_from_keypair + mbedtls_ecdsa_init + mbedtls_ecdsa_free + +; library\ecjpake.c + mbedtls_ecjpake_init + mbedtls_ecjpake_free + mbedtls_ecjpake_setup + mbedtls_ecjpake_set_point_format + mbedtls_ecjpake_check + mbedtls_ecjpake_read_round_one + mbedtls_ecjpake_write_round_one + mbedtls_ecjpake_read_round_two + mbedtls_ecjpake_write_round_two + mbedtls_ecjpake_derive_secret + mbedtls_ecjpake_write_shared_key + mbedtls_ecjpake_self_test + +; library\ecp.c + mbedtls_ecp_curve_list + mbedtls_ecp_grp_id_list + mbedtls_ecp_curve_info_from_grp_id + mbedtls_ecp_curve_info_from_tls_id + mbedtls_ecp_curve_info_from_name + mbedtls_ecp_get_type + mbedtls_ecp_point_init + mbedtls_ecp_group_init + mbedtls_ecp_keypair_init + mbedtls_ecp_point_free + mbedtls_ecp_group_free + mbedtls_ecp_keypair_free + mbedtls_ecp_copy + mbedtls_ecp_group_copy + mbedtls_ecp_set_zero + mbedtls_ecp_is_zero + mbedtls_ecp_point_cmp + mbedtls_ecp_point_read_string + mbedtls_ecp_point_write_binary + mbedtls_ecp_point_read_binary + mbedtls_ecp_tls_read_point + mbedtls_ecp_tls_write_point + mbedtls_ecp_tls_read_group + mbedtls_ecp_tls_read_group_id + mbedtls_ecp_tls_write_group + mbedtls_ecp_mul_restartable + mbedtls_ecp_mul + mbedtls_ecp_muladd_restartable + mbedtls_ecp_muladd + mbedtls_ecp_check_pubkey + mbedtls_ecp_check_privkey + mbedtls_ecp_gen_privkey + mbedtls_ecp_gen_keypair_base + mbedtls_ecp_gen_keypair + mbedtls_ecp_gen_key + mbedtls_ecp_read_key + mbedtls_ecp_write_key + mbedtls_ecp_check_pub_priv + mbedtls_ecp_export + mbedtls_ecp_self_test + +; library\ecp_curves.c + mbedtls_ecp_group_load + +; library\entropy.c + mbedtls_entropy_init + mbedtls_entropy_free + mbedtls_entropy_add_source + mbedtls_entropy_update_manual + mbedtls_entropy_gather + mbedtls_entropy_func + mbedtls_entropy_write_seed_file + mbedtls_entropy_update_seed_file + mbedtls_entropy_self_test + +; library\entropy_poll.c + mbedtls_platform_entropy_poll + +; library\error.c + mbedtls_high_level_strerr + mbedtls_low_level_strerr + mbedtls_strerror + +; library\gcm.c + mbedtls_gcm_init + mbedtls_gcm_setkey + mbedtls_gcm_starts + mbedtls_gcm_update_ad + mbedtls_gcm_update + mbedtls_gcm_finish + mbedtls_gcm_crypt_and_tag + mbedtls_gcm_auth_decrypt + mbedtls_gcm_free + mbedtls_gcm_self_test + +; library\hkdf.c + mbedtls_hkdf + mbedtls_hkdf_extract + mbedtls_hkdf_expand + +; library\hmac_drbg.c + mbedtls_hmac_drbg_init + mbedtls_hmac_drbg_update + mbedtls_hmac_drbg_seed_buf + mbedtls_hmac_drbg_reseed + mbedtls_hmac_drbg_seed + mbedtls_hmac_drbg_set_prediction_resistance + mbedtls_hmac_drbg_set_entropy_len + mbedtls_hmac_drbg_set_reseed_interval + mbedtls_hmac_drbg_random_with_add + mbedtls_hmac_drbg_random + mbedtls_hmac_drbg_free + mbedtls_hmac_drbg_write_seed_file + mbedtls_hmac_drbg_update_seed_file + mbedtls_hmac_drbg_self_test + +; library\lmots.c + mbedtls_lms_unsigned_int_to_network_bytes + mbedtls_lms_network_bytes_to_unsigned_int + mbedtls_lms_error_from_psa + mbedtls_lmots_public_init + mbedtls_lmots_public_free + mbedtls_lmots_import_public_key + mbedtls_lmots_export_public_key + mbedtls_lmots_calculate_public_key_candidate + mbedtls_lmots_verify + +; library\lms.c + mbedtls_lms_public_init + mbedtls_lms_public_free + mbedtls_lms_import_public_key + mbedtls_lms_export_public_key + mbedtls_lms_verify + +; library\md.c + mbedtls_md_list + mbedtls_md_info_from_string + mbedtls_md_info_from_type + mbedtls_md_info_from_ctx + mbedtls_md_init + mbedtls_md_free + mbedtls_md_clone + mbedtls_md_setup + mbedtls_md_starts + mbedtls_md_update + mbedtls_md_finish + mbedtls_md + mbedtls_md_file + mbedtls_md_hmac_starts + mbedtls_md_hmac_update + mbedtls_md_hmac_finish + mbedtls_md_hmac_reset + mbedtls_md_hmac + ; mbedtls_md_process + mbedtls_md_get_size + mbedtls_md_get_type + mbedtls_md_get_name + +; library\md5.c + mbedtls_md5_init + mbedtls_md5_free + mbedtls_md5_clone + mbedtls_md5_starts + mbedtls_internal_md5_process + mbedtls_md5_update + mbedtls_md5_finish + mbedtls_md5 + mbedtls_md5_self_test + +; library\nist_kw.c + mbedtls_nist_kw_init + mbedtls_nist_kw_setkey + mbedtls_nist_kw_free + mbedtls_nist_kw_wrap + mbedtls_nist_kw_unwrap + mbedtls_nist_kw_self_test + +; library\oid.c + mbedtls_oid_from_numeric_string + mbedtls_oid_get_attr_short_name + mbedtls_oid_get_certificate_policies + mbedtls_oid_get_cipher_alg + mbedtls_oid_get_ec_grp + mbedtls_oid_get_ec_grp_algid + mbedtls_oid_get_extended_key_usage + mbedtls_oid_get_md_alg + mbedtls_oid_get_md_hmac + mbedtls_oid_get_numeric_string + mbedtls_oid_get_oid_by_ec_grp + mbedtls_oid_get_oid_by_ec_grp_algid + mbedtls_oid_get_oid_by_md + mbedtls_oid_get_oid_by_pk_alg + mbedtls_oid_get_oid_by_sig_alg + mbedtls_oid_get_pk_alg + mbedtls_oid_get_pkcs12_pbe_alg + mbedtls_oid_get_sig_alg + mbedtls_oid_get_sig_alg_desc + mbedtls_oid_get_x509_ext_type + +; library\pem.c + mbedtls_pem_init + mbedtls_pem_read_buffer + mbedtls_pem_free + mbedtls_pem_write_buffer + +; library\pk.c + mbedtls_pk_init + mbedtls_pk_free + mbedtls_pk_info_from_type + mbedtls_pk_setup + mbedtls_pk_setup_rsa_alt + mbedtls_pk_can_do + mbedtls_pk_verify_restartable + mbedtls_pk_verify + mbedtls_pk_verify_ext + mbedtls_pk_sign_restartable + mbedtls_pk_sign + mbedtls_pk_sign_ext + mbedtls_pk_decrypt + mbedtls_pk_encrypt + mbedtls_pk_check_pair + mbedtls_pk_get_bitlen + mbedtls_pk_debug + mbedtls_pk_get_name + mbedtls_pk_get_type + +; library\pk_wrap.c + mbedtls_pk_error_from_psa + mbedtls_pk_error_from_psa_rsa + mbedtls_pk_psa_rsa_sign_ext + +; library\pkcs12.c + mbedtls_pkcs12_pbe + mbedtls_pkcs12_derivation + +; library\pkcs5.c + mbedtls_pkcs5_pbes2 + mbedtls_pkcs5_pbkdf2_hmac + mbedtls_pkcs5_pbkdf2_hmac_ext + mbedtls_pkcs5_self_test + +; library\pkparse.c + mbedtls_pk_load_file + mbedtls_pk_parse_keyfile + mbedtls_pk_parse_public_keyfile + mbedtls_pk_parse_subpubkey + mbedtls_pk_parse_key + mbedtls_pk_parse_public_key + +; library\pkwrite.c + mbedtls_pk_write_pubkey + mbedtls_pk_write_pubkey_der + mbedtls_pk_write_key_der + mbedtls_pk_write_pubkey_pem + mbedtls_pk_write_key_pem + +; library\platform.c + mbedtls_platform_win32_snprintf + mbedtls_platform_set_snprintf + mbedtls_platform_win32_vsnprintf + mbedtls_platform_set_vsnprintf + mbedtls_platform_setup + mbedtls_platform_teardown + +; library\platform_util.c + mbedtls_zeroize_and_free + mbedtls_ms_time + mbedtls_platform_zeroize + mbedtls_platform_gmtime_r + +; library\poly1305.c + mbedtls_poly1305_init + mbedtls_poly1305_free + mbedtls_poly1305_starts + mbedtls_poly1305_update + mbedtls_poly1305_finish + mbedtls_poly1305_mac + mbedtls_poly1305_self_test + +; library\psa_crypto.c + mbedtls_to_psa_error + mbedtls_ecc_group_of_psa + ;psa_validate_unstructured_key_bit_size + ;psa_allocate_buffer_to_slot + ;psa_copy_key_material_into_slot + ;psa_import_key_into_slot + ;psa_key_policy_algorithm_intersection + ;psa_key_algorithm_permits + ;psa_key_policy_permits + ;psa_restrict_key_policy + ;psa_get_and_lock_key_slot_with_policy + ;psa_get_and_lock_transparent_key_slot_with_policy + ;psa_remove_key_data_from_memory + ;psa_wipe_key_slot + ;psa_destroy_key + ;psa_get_rsa_public_exponent + ;psa_get_key_attributes + ;psa_export_key_buffer_internal + ;psa_export_key_internal + ;psa_export_key + ;psa_export_public_key_internal + ;psa_export_public_key + ;psa_validate_key_policy + ;psa_validate_key_attributes + ;psa_start_key_creation + ;psa_finish_key_creation + ;psa_fail_key_creation + ;psa_validate_optional_attributes + ;psa_import_key + ;psa_copy_key + ;psa_hash_abort + ;psa_hash_setup + ;psa_hash_update + ;psa_hash_finish + ;psa_hash_verify + ;psa_hash_compute + ;psa_hash_compare + ;psa_hash_clone + ;psa_mac_abort + ;psa_mac_finalize_alg_and_key_validation + ;psa_mac_setup + ;psa_mac_sign_setup + ;psa_mac_verify_setup + ;psa_mac_update + ;psa_mac_sign_finish + ;psa_mac_verify_finish + ;psa_mac_compute_internal + ;psa_mac_compute + ;psa_mac_verify + ;psa_sign_verify_check_alg + ;psa_sign_internal + ;psa_verify_internal + ;psa_sign_message_builtin + ;psa_sign_message + ;psa_verify_message_builtin + ;psa_verify_message + ;psa_sign_hash_builtin + ;psa_sign_hash + ;psa_verify_hash_builtin + ;psa_verify_hash + ;psa_asymmetric_encrypt + ;psa_asymmetric_decrypt + ;psa_cipher_setup + ;psa_cipher_encrypt_setup + ;psa_cipher_decrypt_setup + ;psa_cipher_generate_iv + ;psa_cipher_set_iv + ;psa_cipher_update + ;psa_cipher_finish + ;psa_cipher_abort + ;psa_cipher_encrypt + ;psa_cipher_decrypt + ;psa_aead_get_base_algorithm + ;psa_aead_check_nonce_length + ;psa_aead_check_algorithm + ;psa_aead_encrypt + ;psa_aead_decrypt + ;psa_validate_tag_length + ;psa_aead_setup + ;psa_aead_encrypt_setup + ;psa_aead_decrypt_setup + ;psa_aead_generate_nonce + ;psa_aead_set_nonce + ;psa_aead_set_lengths + ;psa_aead_update_ad + ;psa_aead_update + ;psa_aead_final_checks + ;psa_aead_finish + ;psa_aead_verify + ;psa_aead_abort + ;psa_key_derivation_start_hmac + ;psa_key_derivation_get_kdf_alg + ;psa_key_derivation_abort + ;psa_key_derivation_get_capacity + ;psa_key_derivation_set_capacity + ;psa_key_derivation_hkdf_read + ;psa_key_derivation_tls12_prf_generate_next_block + ;psa_key_derivation_tls12_prf_read + ;psa_key_derivation_tls12_ecjpake_to_pms_read + ;psa_key_derivation_output_bytes + ;psa_des_set_key_parity + ;psa_generate_derived_ecc_key_weierstrass_helper + ;psa_generate_derived_ecc_key_montgomery_helper + ;psa_generate_derived_key_internal + ;psa_key_derivation_output_key + ;psa_hash_try_support + ;psa_key_derivation_setup_kdf + ;psa_key_agreement_try_support + ;psa_key_derivation_setup + ;psa_hkdf_input + ;psa_tls12_prf_set_seed + ;psa_tls12_prf_set_key + ;psa_tls12_prf_set_label + ;psa_tls12_prf_input + ;psa_tls12_prf_psk_to_ms_set_key + ;psa_tls12_prf_psk_to_ms_set_other_key + ;psa_tls12_prf_psk_to_ms_input + ;psa_tls12_ecjpake_to_pms_input + ;psa_key_derivation_check_input_type + ;psa_key_derivation_input_internal + ;psa_key_derivation_input_bytes + ;psa_key_derivation_input_key + ;psa_key_agreement_raw_builtin + ;psa_key_agreement_raw_internal + ;psa_key_agreement_internal + ;psa_key_derivation_key_agreement + ;psa_raw_key_agreement + ;mbedtls_psa_random_init + ;mbedtls_psa_random_free + ;mbedtls_psa_random_seed + ;psa_generate_random + ;psa_validate_key_type_and_size_for_key_generation + ;psa_generate_key_internal + ;psa_generate_key + mbedtls_psa_crypto_configure_entropy_sources + mbedtls_psa_crypto_free + ;psa_crypto_init + ;_mbedtls_psa_get_random + ;_mbedtls_psa_random_state + +; library\psa_crypto_aead.c + mbedtls_psa_aead_encrypt + mbedtls_psa_aead_decrypt + mbedtls_psa_aead_encrypt_setup + mbedtls_psa_aead_decrypt_setup + mbedtls_psa_aead_set_nonce + mbedtls_psa_aead_set_lengths + mbedtls_psa_aead_update_ad + mbedtls_psa_aead_update + mbedtls_psa_aead_finish + mbedtls_psa_aead_abort + +; library\psa_crypto_cipher.c + mbedtls_cipher_info_from_psa + mbedtls_psa_cipher_encrypt_setup + mbedtls_psa_cipher_decrypt_setup + mbedtls_psa_cipher_set_iv + mbedtls_psa_cipher_update + mbedtls_psa_cipher_finish + mbedtls_psa_cipher_abort + mbedtls_psa_cipher_encrypt + mbedtls_psa_cipher_decrypt + +; library\psa_crypto_client.c + ;psa_reset_key_attributes + ;psa_set_key_domain_parameters + ;psa_get_key_domain_parameters + +; library\psa_crypto_driver_wrappers.c + ;psa_driver_wrapper_init + ;psa_driver_wrapper_free + ;psa_driver_wrapper_sign_message + ;psa_driver_wrapper_verify_message + ;psa_driver_wrapper_sign_hash + ;psa_driver_wrapper_verify_hash + ;psa_driver_wrapper_get_key_buffer_size_from_key_data + ;psa_driver_wrapper_get_key_buffer_size + ;psa_driver_wrapper_generate_key + ;psa_driver_wrapper_import_key + ;psa_driver_wrapper_export_key + ;psa_driver_wrapper_export_public_key + ;psa_driver_wrapper_get_builtin_key + ;psa_driver_wrapper_copy_key + ;psa_driver_wrapper_cipher_encrypt + ;psa_driver_wrapper_cipher_decrypt + ;psa_driver_wrapper_cipher_encrypt_setup + ;psa_driver_wrapper_cipher_decrypt_setup + ;psa_driver_wrapper_cipher_set_iv + ;psa_driver_wrapper_cipher_update + ;psa_driver_wrapper_cipher_finish + ;psa_driver_wrapper_cipher_abort + ;psa_driver_wrapper_hash_compute + ;psa_driver_wrapper_hash_setup + ;psa_driver_wrapper_hash_clone + ;psa_driver_wrapper_hash_update + ;psa_driver_wrapper_hash_finish + ;psa_driver_wrapper_hash_abort + ;psa_driver_wrapper_aead_encrypt + ;psa_driver_wrapper_aead_decrypt + ;psa_driver_wrapper_aead_encrypt_setup + ;psa_driver_wrapper_aead_decrypt_setup + ;psa_driver_wrapper_aead_set_nonce + ;psa_driver_wrapper_aead_set_lengths + ;psa_driver_wrapper_aead_update_ad + ;psa_driver_wrapper_aead_update + ;psa_driver_wrapper_aead_finish + ;psa_driver_wrapper_aead_verify + ;psa_driver_wrapper_aead_abort + ;psa_driver_wrapper_mac_compute + ;psa_driver_wrapper_mac_sign_setup + ;psa_driver_wrapper_mac_verify_setup + ;psa_driver_wrapper_mac_update + ;psa_driver_wrapper_mac_sign_finish + ;psa_driver_wrapper_mac_verify_finish + ;psa_driver_wrapper_mac_abort + ;psa_driver_wrapper_asymmetric_encrypt + ;psa_driver_wrapper_asymmetric_decrypt + ;psa_driver_wrapper_key_agreement + +; library\psa_crypto_ecp.c + mbedtls_psa_ecp_load_representation + mbedtls_psa_ecp_import_key + mbedtls_psa_ecp_export_key + mbedtls_psa_ecp_export_public_key + mbedtls_psa_ecp_generate_key + mbedtls_psa_ecdsa_sign_hash + mbedtls_psa_ecdsa_verify_hash + mbedtls_psa_key_agreement_ecdh + +; library\psa_crypto_hash.c + mbedtls_psa_hash_abort + mbedtls_psa_hash_setup + mbedtls_psa_hash_clone + mbedtls_psa_hash_update + mbedtls_psa_hash_finish + mbedtls_psa_hash_compute + +; library\psa_crypto_mac.c + mbedtls_psa_mac_abort + mbedtls_psa_mac_sign_setup + mbedtls_psa_mac_verify_setup + mbedtls_psa_mac_update + mbedtls_psa_mac_sign_finish + mbedtls_psa_mac_verify_finish + mbedtls_psa_mac_compute + +; library\psa_crypto_pake.c + ;psa_pake_setup + ;psa_pake_set_password_key + ;psa_pake_set_user + ;psa_pake_set_peer + ;psa_pake_set_role + ;psa_pake_output + ;psa_pake_input + ;psa_pake_get_implicit_key + ;psa_pake_abort + +; library\psa_crypto_rsa.c + mbedtls_psa_rsa_load_representation + mbedtls_psa_rsa_import_key + mbedtls_psa_rsa_export_key + mbedtls_psa_rsa_export_public_key + mbedtls_psa_rsa_generate_key + mbedtls_psa_rsa_sign_hash + mbedtls_psa_rsa_verify_hash + mbedtls_psa_asymmetric_encrypt + mbedtls_psa_asymmetric_decrypt + +; library\psa_crypto_slot_management.c + ;psa_is_valid_key_id + ;psa_initialize_key_slots + ;psa_wipe_all_key_slots + ;psa_get_empty_key_slot + ;psa_get_and_lock_key_slot + ;psa_unlock_key_slot + ;psa_validate_key_location + ;psa_validate_key_persistence + ;psa_open_key + ;psa_close_key + ;psa_purge_key + mbedtls_psa_get_stats + +; library\psa_crypto_storage.c + ;psa_is_key_present_in_storage + ;psa_destroy_persistent_key + ;psa_format_key_data_for_storage + ;psa_parse_key_data_from_storage + ;psa_save_persistent_key + ;psa_free_persistent_key_data + ;psa_load_persistent_key + +; library\psa_its_file.c + ;psa_its_get_info + ;psa_its_get + ;psa_its_set + ;psa_its_remove + +; library\ripemd160.c + mbedtls_ripemd160_init + mbedtls_ripemd160_free + mbedtls_ripemd160_clone + mbedtls_ripemd160_starts + mbedtls_internal_ripemd160_process + mbedtls_ripemd160_update + mbedtls_ripemd160_finish + mbedtls_ripemd160 + mbedtls_ripemd160_self_test + +; library\rsa.c + mbedtls_rsa_import + mbedtls_rsa_import_raw + mbedtls_rsa_complete + mbedtls_rsa_export_raw + mbedtls_rsa_export + mbedtls_rsa_export_crt + mbedtls_rsa_init + mbedtls_rsa_set_padding + mbedtls_rsa_get_len + mbedtls_rsa_gen_key + mbedtls_rsa_check_pubkey + mbedtls_rsa_check_privkey + mbedtls_rsa_check_pub_priv + mbedtls_rsa_public + mbedtls_rsa_private + mbedtls_rsa_rsaes_oaep_encrypt + mbedtls_rsa_rsaes_pkcs1_v15_encrypt + mbedtls_rsa_pkcs1_encrypt + mbedtls_rsa_rsaes_oaep_decrypt + mbedtls_rsa_rsaes_pkcs1_v15_decrypt + mbedtls_rsa_pkcs1_decrypt + mbedtls_rsa_rsassa_pss_sign_ext + mbedtls_rsa_rsassa_pss_sign + mbedtls_rsa_rsassa_pkcs1_v15_sign + mbedtls_rsa_pkcs1_sign + mbedtls_rsa_rsassa_pss_verify_ext + mbedtls_rsa_rsassa_pss_verify + mbedtls_rsa_rsassa_pkcs1_v15_verify + mbedtls_rsa_pkcs1_verify + mbedtls_rsa_copy + mbedtls_rsa_free + mbedtls_rsa_self_test + +; library\rsa_alt_helpers.c + mbedtls_rsa_deduce_primes + mbedtls_rsa_deduce_private_exponent + mbedtls_rsa_deduce_crt + mbedtls_rsa_validate_params + mbedtls_rsa_validate_crt + +; library\sha1.c + mbedtls_sha1_init + mbedtls_sha1_free + mbedtls_sha1_clone + mbedtls_sha1_starts + mbedtls_internal_sha1_process + mbedtls_sha1_update + mbedtls_sha1_finish + mbedtls_sha1 + mbedtls_sha1_self_test + +; library\sha256.c + mbedtls_sha256_init + mbedtls_sha256_free + mbedtls_sha256_clone + mbedtls_sha256_starts + mbedtls_internal_sha256_process + mbedtls_sha256_update + mbedtls_sha256_finish + mbedtls_sha256 + mbedtls_sha256_self_test + mbedtls_sha224_self_test + +; library\sha512.c + mbedtls_sha512_init + mbedtls_sha512_free + mbedtls_sha512_clone + mbedtls_sha512_starts + mbedtls_internal_sha512_process + mbedtls_sha512_update + mbedtls_sha512_finish + mbedtls_sha512 + mbedtls_sha512_self_test + mbedtls_sha384_self_test + +; library\sha3.c + mbedtls_sha3_init + mbedtls_sha3_free + mbedtls_sha3_clone + mbedtls_sha3_starts + mbedtls_sha3_update + mbedtls_sha3_finish + mbedtls_sha3 + mbedtls_sha3_self_test + +; library\timing.c + mbedtls_timing_get_timer + mbedtls_timing_set_delay + mbedtls_timing_get_delay + mbedtls_timing_get_final_delay + +; library\version.c + mbedtls_version_get_number + mbedtls_version_get_string + mbedtls_version_get_string_full + +; library\version_features.c + mbedtls_version_check_feature + +;end + diff --git a/mcwin32/libmbedtls/win32/libmbedtls.def.3.5.2 b/mcwin32/libmbedtls/win32/libmbedtls.def.3.5.2 new file mode 100644 index 00000000..779a04dc --- /dev/null +++ b/mcwin32/libmbedtls/win32/libmbedtls.def.3.5.2 @@ -0,0 +1,436 @@ +;$Id: libmbedtls.def.3.5.2,v 1.1 2024/03/29 11:26:49 cvsuser Exp $ +; +; libmbedtls library definition (3.4.1) +; +DESCRIPTION "libmbedtls" +EXPORTS + +; library\debug.c + mbedtls_debug_set_threshold + mbedtls_debug_print_msg + mbedtls_debug_print_ret + mbedtls_debug_print_buf + mbedtls_debug_print_ecp + mbedtls_debug_print_mpi + ;mbedtls_debug_printf_ecdh_internal + mbedtls_debug_printf_ecdh + +; library\net_sockets.c + mbedtls_net_init + mbedtls_net_connect + mbedtls_net_bind + mbedtls_net_accept + mbedtls_net_set_block + mbedtls_net_set_nonblock + mbedtls_net_poll + mbedtls_net_usleep + mbedtls_net_recv + mbedtls_net_recv_timeout + mbedtls_net_send + mbedtls_net_close + mbedtls_net_free + +; library\ssl_cache.c + mbedtls_ssl_cache_init + mbedtls_ssl_cache_get + mbedtls_ssl_cache_set + mbedtls_ssl_cache_set_timeout + mbedtls_ssl_cache_set_max_entries + mbedtls_ssl_cache_free + mbedtls_ssl_cache_remove + +; library\ssl_ciphersuites.c + mbedtls_ssl_list_ciphersuites + mbedtls_ssl_ciphersuite_from_string + mbedtls_ssl_ciphersuite_from_id + mbedtls_ssl_get_ciphersuite_name + mbedtls_ssl_get_ciphersuite_id + mbedtls_ssl_ciphersuite_get_cipher_key_bitlen + mbedtls_ssl_get_ciphersuite_sig_pk_alg + mbedtls_ssl_get_ciphersuite_sig_alg + mbedtls_ssl_ciphersuite_uses_ec + mbedtls_ssl_ciphersuite_uses_psk + +; library\ssl_client.c + ;ssl_write_hostname_ext + ;ssl_write_alpn_ext + ;ssl_write_supported_groups_ext + ;ssl_write_client_hello_cipher_suites + ;ssl_write_client_hello_body + ;ssl_generate_random + ;ssl_prepare_client_hello + mbedtls_ssl_write_client_hello + +; library\ssl_cookie.c + mbedtls_ssl_cookie_init + mbedtls_ssl_cookie_set_timeout + mbedtls_ssl_cookie_free + mbedtls_ssl_cookie_setup + ;ssl_cookie_hmac + mbedtls_ssl_cookie_write + mbedtls_ssl_cookie_check + +; library\ssl_debug_helpers_generated.c + ;mbedtls_ssl_named_group_to_str + mbedtls_ssl_sig_alg_to_str + mbedtls_ssl_states_str + ;mbedtls_ssl_protocol_version_str + ;mbedtls_tls_prf_types_str + ;mbedtls_ssl_key_export_type_str + +; library\ssl_msg.c + mbedtls_ssl_set_timer + mbedtls_ssl_check_timer + mbedtls_ssl_check_record + ;ssl_get_maximum_datagram_size + ;ssl_get_remaining_space_in_datagram + ;ssl_get_remaining_payload_in_datagram + ;ssl_double_retransmit_timeout + ;ssl_reset_retransmit_timeout + ;ssl_compute_padding_length + ;ssl_build_inner_plaintext + ;ssl_parse_inner_plaintext + ;ssl_extract_add_data_from_record + ;ssl_transform_aead_dynamic_iv_is_explicit + ;ssl_build_record_nonce + mbedtls_ssl_encrypt_buf + mbedtls_ssl_decrypt_buf + mbedtls_ssl_fetch_input + mbedtls_ssl_flush_output + ;ssl_flight_append + mbedtls_ssl_flight_free + ;ssl_swap_epochs + mbedtls_ssl_resend + mbedtls_ssl_flight_transmit + mbedtls_ssl_recv_flight_completed + mbedtls_ssl_send_flight_completed + mbedtls_ssl_start_handshake_msg + mbedtls_ssl_write_handshake_msg_ext + mbedtls_ssl_finish_handshake_msg + mbedtls_ssl_write_record + ;ssl_hs_is_proper_fragment + ;ssl_get_hs_frag_len + ;ssl_get_hs_frag_off + ;ssl_check_hs_header + ;ssl_bitmask_set + ;ssl_bitmask_check + ;ssl_get_reassembly_buffer_size + ;ssl_get_hs_total_len + mbedtls_ssl_prepare_handshake_record + mbedtls_ssl_update_handshake_status + mbedtls_ssl_dtls_replay_reset + ;mbedtls_ssl_dtls_record_replay_check + mbedtls_ssl_dtls_replay_check + mbedtls_ssl_dtls_replay_update + ;mbedtls_ssl_check_dtls_clihlo_cookie + ;ssl_handle_possible_reconnect + ;ssl_check_record_type + ;ssl_parse_record_header + ;ssl_check_client_reconnect + ;ssl_prepare_record_content + mbedtls_ssl_read_record + ;ssl_next_record_is_in_datagram + ;ssl_load_buffered_message + ;ssl_buffer_make_space + ;ssl_buffer_message + ;ssl_consume_current_message + ;ssl_record_is_in_progress + ;ssl_free_buffered_record + ;ssl_load_buffered_record + ;ssl_buffer_future_record + ;ssl_get_next_record + mbedtls_ssl_handle_message_type + mbedtls_ssl_send_fatal_handshake_failure + mbedtls_ssl_send_alert_message + mbedtls_ssl_write_change_cipher_spec + mbedtls_ssl_parse_change_cipher_spec + ;ssl_transform_get_explicit_iv_len + mbedtls_ssl_update_out_pointers + mbedtls_ssl_update_in_pointers + mbedtls_ssl_reset_in_out_pointers + mbedtls_ssl_get_bytes_avail + mbedtls_ssl_check_pending + mbedtls_ssl_get_record_expansion + ;ssl_check_ctr_renegotiate + ;ssl_tls12_handle_hs_message_post_handshake + ;ssl_handle_hs_message_post_handshake + mbedtls_ssl_read + ;ssl_write_real + mbedtls_ssl_write + mbedtls_ssl_close_notify + mbedtls_ssl_transform_free + mbedtls_ssl_set_inbound_transform + mbedtls_ssl_set_outbound_transform + mbedtls_ssl_buffering_free + ;ssl_buffering_free_slot + mbedtls_ssl_write_version + mbedtls_ssl_read_version + mbedtls_ssl_handle_pending_alert + mbedtls_ssl_pend_fatal_alert + +; library\ssl_ticket.c + mbedtls_ssl_ticket_init + ;ssl_ticket_gen_key + ;ssl_ticket_update_keys + mbedtls_ssl_ticket_rotate + mbedtls_ssl_ticket_setup + mbedtls_ssl_ticket_write + ;ssl_ticket_select_key + mbedtls_ssl_ticket_parse + mbedtls_ssl_ticket_free + +; library\ssl_tls.c + mbedtls_ssl_conf_cid + mbedtls_ssl_set_cid + mbedtls_ssl_get_own_cid + mbedtls_ssl_get_peer_cid + ;ssl_mfl_code_to_length + mbedtls_ssl_session_copy + mbedtls_ssl_tls_prf + ;ssl_clear_peer_cert + mbedtls_ssl_get_extension_id + mbedtls_ssl_get_extension_mask + mbedtls_ssl_get_extension_name + ;ssl_tls13_get_hs_msg_name + mbedtls_ssl_print_extension + mbedtls_ssl_print_extensions + mbedtls_ssl_optimize_checksum + mbedtls_ssl_add_hs_hdr_to_checksum + mbedtls_ssl_add_hs_msg_to_checksum + mbedtls_ssl_reset_checksum + ;ssl_update_checksum_start + ;ssl_update_checksum_sha256 + ;ssl_update_checksum_sha384 + ;ssl_handshake_params_init + mbedtls_ssl_transform_init + mbedtls_ssl_session_init + ;ssl_handshake_init + ;ssl_cookie_write_dummy + ;ssl_cookie_check_dummy + mbedtls_ssl_init + ;ssl_conf_version_check + ;ssl_conf_check + mbedtls_ssl_setup + mbedtls_ssl_session_reset_msg_layer + mbedtls_ssl_session_reset_int + mbedtls_ssl_session_reset + mbedtls_ssl_conf_endpoint + mbedtls_ssl_conf_transport + mbedtls_ssl_conf_dtls_anti_replay + mbedtls_ssl_conf_dtls_badmac_limit + mbedtls_ssl_set_datagram_packing + mbedtls_ssl_conf_handshake_timeout + mbedtls_ssl_conf_authmode + mbedtls_ssl_conf_verify + mbedtls_ssl_conf_rng + mbedtls_ssl_conf_dbg + mbedtls_ssl_set_bio + mbedtls_ssl_set_mtu + mbedtls_ssl_conf_read_timeout + mbedtls_ssl_set_timer_cb + mbedtls_ssl_conf_session_cache + mbedtls_ssl_set_session + mbedtls_ssl_conf_ciphersuites + mbedtls_ssl_conf_cert_profile + ;ssl_key_cert_free + ;ssl_append_key_cert + mbedtls_ssl_conf_own_cert + mbedtls_ssl_conf_ca_chain + mbedtls_ssl_get_hs_sni + mbedtls_ssl_set_hs_own_cert + mbedtls_ssl_set_hs_ca_chain + mbedtls_ssl_set_hs_dn_hints + mbedtls_ssl_set_hs_authmode + mbedtls_ssl_set_verify + mbedtls_ssl_conf_has_static_psk + ;ssl_conf_remove_psk + ;ssl_conf_set_psk_identity + mbedtls_ssl_conf_psk + ;ssl_remove_psk + mbedtls_ssl_set_hs_psk + mbedtls_ssl_conf_psk_cb + ;mbedtls_ssl_get_base_mode + ;mbedtls_ssl_get_actual_mode + mbedtls_ssl_get_mode_from_transform + mbedtls_ssl_get_mode_from_ciphersuite + mbedtls_ssl_conf_dh_param_bin + mbedtls_ssl_conf_dh_param_ctx + mbedtls_ssl_conf_dhm_min_bitlen + mbedtls_ssl_conf_sig_hashes + mbedtls_ssl_conf_sig_algs + mbedtls_ssl_conf_curves + mbedtls_ssl_conf_groups + mbedtls_ssl_set_hostname + mbedtls_ssl_conf_sni + mbedtls_ssl_conf_alpn_protocols + mbedtls_ssl_get_alpn_protocol + mbedtls_ssl_conf_max_version + mbedtls_ssl_conf_min_version + mbedtls_ssl_conf_cert_req_ca_list + mbedtls_ssl_conf_encrypt_then_mac + mbedtls_ssl_conf_extended_master_secret + mbedtls_ssl_conf_max_frag_len + mbedtls_ssl_conf_legacy_renegotiation + mbedtls_ssl_conf_renegotiation + mbedtls_ssl_conf_renegotiation_enforced + mbedtls_ssl_conf_renegotiation_period + mbedtls_ssl_conf_session_tickets + mbedtls_ssl_conf_session_tickets_cb + mbedtls_ssl_set_export_keys_cb + mbedtls_ssl_get_verify_result + mbedtls_ssl_get_ciphersuite_id_from_ssl + mbedtls_ssl_get_ciphersuite + mbedtls_ssl_get_version + mbedtls_ssl_get_input_max_frag_len + mbedtls_ssl_get_output_max_frag_len + mbedtls_ssl_get_current_mtu + mbedtls_ssl_get_max_out_record_payload + mbedtls_ssl_get_max_in_record_payload + mbedtls_ssl_get_peer_cert + mbedtls_ssl_get_session + ;ssl_session_save + mbedtls_ssl_session_save + ;ssl_session_load + mbedtls_ssl_session_load + ;ssl_prepare_handshake_step + mbedtls_ssl_handshake_step + mbedtls_ssl_handshake + ;ssl_write_hello_request + mbedtls_ssl_start_renegotiation + mbedtls_ssl_renegotiate + mbedtls_ssl_handshake_free + mbedtls_ssl_session_free + mbedtls_ssl_context_save + ;ssl_context_load + mbedtls_ssl_context_load + mbedtls_ssl_free + mbedtls_ssl_config_init + ;ssl_check_no_sig_alg_duplication + mbedtls_ssl_config_defaults + mbedtls_ssl_config_free + mbedtls_ssl_sig_from_pk + mbedtls_ssl_sig_from_pk_alg + mbedtls_ssl_pk_alg_from_sig + mbedtls_ssl_md_alg_from_hash + mbedtls_ssl_hash_from_md_alg + mbedtls_ssl_check_curve_tls_id + mbedtls_ssl_check_curve + mbedtls_ssl_check_cert_usage + ;ssl_get_handshake_transcript_sha384 + ;ssl_get_handshake_transcript_sha256 + mbedtls_ssl_get_handshake_transcript + mbedtls_ssl_parse_sig_alg_ext + ;tls_prf_generic + ;tls_prf_sha256 + ;tls_prf_sha384 + ;ssl_set_handshake_prfs + ;ssl_compute_master + mbedtls_ssl_derive_keys + mbedtls_ssl_set_calc_verify_md + ;ssl_calc_verify_tls_sha256 + ;ssl_calc_verify_tls_sha384 + mbedtls_ssl_psk_derive_premaster + mbedtls_ssl_resend_hello_request + mbedtls_ssl_write_certificate + ;ssl_check_peer_crt_unchanged + ;ssl_parse_certificate_chain + ;ssl_srv_check_client_no_crt_notification + ;ssl_parse_certificate_coordinate + ;ssl_parse_certificate_verify + mbedtls_ssl_parse_certificate + ;ssl_calc_finished_tls_sha256 + ;ssl_calc_finished_tls_sha384 + mbedtls_ssl_handshake_wrapup_free_hs_transform + mbedtls_ssl_handshake_wrapup + mbedtls_ssl_write_finished + mbedtls_ssl_parse_finished + ;ssl_tls12prf_from_cs + ;tls_prf_get_type + ;ssl_tls12_populate_transform + mbedtls_ssl_get_key_exchange_md_tls1_2 + mbedtls_ssl_tls12_get_preferred_hash_for_sig_alg + ;ssl_tls12_session_save + ;ssl_tls12_session_load + mbedtls_ssl_validate_ciphersuite + mbedtls_ssl_write_sig_alg_ext + mbedtls_ssl_parse_server_name_ext + mbedtls_ssl_parse_alpn_ext + mbedtls_ssl_write_alpn_ext + +; library\ssl_tls12_client.c + ;ssl_write_renegotiation_ext + ;ssl_write_supported_point_formats_ext + ;ssl_write_cid_ext + ;ssl_write_max_fragment_length_ext + ;ssl_write_encrypt_then_mac_ext + ;ssl_write_extended_ms_ext + ;ssl_write_session_ticket_ext + mbedtls_ssl_tls12_write_client_hello_exts + ;ssl_parse_renegotiation_info + ;ssl_parse_max_fragment_length_ext + ;ssl_parse_cid_ext + ;ssl_parse_encrypt_then_mac_ext + ;ssl_parse_extended_ms_ext + ;ssl_parse_session_ticket_ext + ;ssl_parse_supported_point_formats_ext + ;ssl_parse_alpn_ext + ;ssl_parse_hello_verify_request + ;ssl_parse_server_hello + ;ssl_parse_server_dh_params + ;ssl_check_server_ecdh_params + ;ssl_parse_server_ecdh_params + ;ssl_parse_server_psk_hint + ;ssl_write_encrypted_pms + ;ssl_get_ecdh_params_from_cert + ;ssl_parse_server_key_exchange + ;ssl_parse_certificate_request + ;ssl_parse_server_hello_done + ;ssl_write_client_key_exchange + ;ssl_write_certificate_verify + ;ssl_parse_new_session_ticket + mbedtls_ssl_handshake_client_step + +; library\ssl_tls12_server.c + mbedtls_ssl_set_client_transport_id + mbedtls_ssl_conf_dtls_cookies + ;ssl_conf_has_psk_or_cb + ;ssl_parse_renegotiation_info + ;ssl_parse_supported_groups_ext + ;ssl_parse_supported_point_formats + ;ssl_parse_max_fragment_length_ext + ;ssl_parse_cid_ext + ;ssl_parse_encrypt_then_mac_ext + ;ssl_parse_extended_ms_ext + ;ssl_parse_session_ticket_ext + ;ssl_check_key_curve + ;ssl_pick_cert + ;ssl_ciphersuite_match + ;ssl_parse_client_hello + ;ssl_write_cid_ext + ;ssl_write_encrypt_then_mac_ext + ;ssl_write_extended_ms_ext + ;ssl_write_session_ticket_ext + ;ssl_write_renegotiation_ext + ;ssl_write_max_fragment_length_ext + ;ssl_write_supported_point_formats_ext + ;ssl_write_hello_verify_request + ;ssl_handle_id_based_session_resumption + ;ssl_write_server_hello + ;ssl_write_certificate_request + ;ssl_get_ecdh_params_from_cert + ;ssl_prepare_server_key_exchange + ;ssl_write_server_key_exchange + ;ssl_write_server_hello_done + ;ssl_parse_client_dh_public + ;ssl_decrypt_encrypted_pms + ;ssl_parse_encrypted_pms + ;ssl_parse_client_psk_identity + ;ssl_parse_client_key_exchange + ;ssl_parse_certificate_verify + ;ssl_write_new_session_ticket + mbedtls_ssl_handshake_server_step + mbedtls_ssl_conf_preference_order + +;end + + diff --git a/mcwin32/libmbedtls/win32/libmbedx509.def.3.5.2 b/mcwin32/libmbedtls/win32/libmbedx509.def.3.5.2 new file mode 100644 index 00000000..da62b6d4 --- /dev/null +++ b/mcwin32/libmbedtls/win32/libmbedx509.def.3.5.2 @@ -0,0 +1,98 @@ +;$Id: libmbedx509.def.3.5.2,v 1.1 2024/03/29 11:26:50 cvsuser Exp $ +; +; libmbedx509 library definition (3.4.1) +; +DESCRIPTION "libmbedx509" +EXPORTS + +; library\x509.c + mbedtls_x509_dn_gets + mbedtls_x509_get_alg + mbedtls_x509_get_alg_null + mbedtls_x509_get_ext + mbedtls_x509_get_name + mbedtls_x509_get_rsassa_pss_params + mbedtls_x509_get_serial + mbedtls_x509_get_sig + mbedtls_x509_get_sig_alg + mbedtls_x509_get_time + mbedtls_x509_key_size_helper + ;mbedtls_x509_self_test + mbedtls_x509_serial_gets + mbedtls_x509_sig_alg_gets + mbedtls_x509_time_is_future + mbedtls_x509_time_is_past + +; library\x509_create.c + mbedtls_x509_set_extension + mbedtls_x509_string_to_names + mbedtls_x509_write_extensions + mbedtls_x509_write_names + mbedtls_x509_write_sig + +; library\x509_crl.c + mbedtls_x509_crl_free + mbedtls_x509_crl_info + mbedtls_x509_crl_init + mbedtls_x509_crl_parse + mbedtls_x509_crl_parse_der + mbedtls_x509_crl_parse_file + +; library\x509_crt.c + mbedtls_x509_crt_check_extended_key_usage + mbedtls_x509_crt_check_key_usage + mbedtls_x509_crt_free + mbedtls_x509_crt_info + mbedtls_x509_crt_init + mbedtls_x509_crt_is_revoked + mbedtls_x509_crt_parse + mbedtls_x509_crt_parse_der + mbedtls_x509_crt_parse_file + mbedtls_x509_crt_parse_path + mbedtls_x509_crt_verify + mbedtls_x509_crt_verify_info + mbedtls_x509_crt_verify_with_profile + mbedtls_x509_crt_verify_restartable + +; library\x509_csr.c + mbedtls_x509_csr_free + mbedtls_x509_csr_info + mbedtls_x509_csr_init + mbedtls_x509_csr_parse + mbedtls_x509_csr_parse_der + mbedtls_x509_csr_parse_file + +; library\x509write_crt.c + mbedtls_x509write_crt_der + mbedtls_x509write_crt_free + mbedtls_x509write_crt_init + mbedtls_x509write_crt_pem + mbedtls_x509write_crt_set_authority_key_identifier + mbedtls_x509write_crt_set_basic_constraints + mbedtls_x509write_crt_set_extension + mbedtls_x509write_crt_set_issuer_key + mbedtls_x509write_crt_set_issuer_name + mbedtls_x509write_crt_set_key_usage + mbedtls_x509write_crt_set_md_alg + mbedtls_x509write_crt_set_ns_cert_type + mbedtls_x509write_crt_set_serial + mbedtls_x509write_crt_set_subject_key + mbedtls_x509write_crt_set_subject_key_identifier + mbedtls_x509write_crt_set_subject_name + mbedtls_x509write_crt_set_validity + mbedtls_x509write_crt_set_version + +; library\x509write_csr.c + mbedtls_x509write_csr_der + mbedtls_x509write_csr_free + mbedtls_x509write_csr_init + mbedtls_x509write_csr_pem + mbedtls_x509write_csr_set_extension + mbedtls_x509write_csr_set_key + mbedtls_x509write_csr_set_key_usage + mbedtls_x509write_csr_set_md_alg + mbedtls_x509write_csr_set_ns_cert_type + mbedtls_x509write_csr_set_subject_name + +;;end + diff --git a/mcwin32/libregex/.gitignore b/mcwin32/libregex/.gitignore index d718f179..7b02c6df 100644 --- a/mcwin32/libregex/.gitignore +++ b/mcwin32/libregex/.gitignore @@ -1,3 +1,6 @@ +test/ +old/ +new/ Makefile *.err diff --git a/mcwin32/libssh2/Makefile.in b/mcwin32/libssh2/Makefile.in index 905b32cd..2e3dffc2 100644 --- a/mcwin32/libssh2/Makefile.in +++ b/mcwin32/libssh2/Makefile.in @@ -1,9 +1,9 @@ # -*- mode: mak; indent-tabs-mode: t; tab-width: 8 -*- -# $Id: Makefile.in,v 1.22 2023/10/02 12:11:29 cvsuser Exp $ +# $Id: Makefile.in,v 1.23 2024/03/29 09:08:33 cvsuser Exp $ # libssh2 makefile. # # -# Copyright (c) 2015 - 2023, Adam Young. +# Copyright (c) 2015 - 2024, Adam Young. # All rights reserved. # # @@ -95,7 +95,7 @@ else CFLAGS+= $(CDEBUG) $(CWARN) $(CINCLUDE) $(CEXTRA) $(XFLAGS) LDFLAGS= $(LDDEBUG) @LDFLAGS@ endif -LDLIBS= -L$(D_LIB) @LIBS@ @EXTRALIBS@ +LDLIBS= -L$(D_LIB) $(CRYPTOLIBS) @LIBS@ @EXTRALIBS@ ARFLAGS= rcv YFLAGS= -d @@ -132,8 +132,8 @@ CEXTRA+= -DLIBSSH2_MBEDTLS # Note: current Windows enc engine wont allow OpenSSH connections. # LIBSSH2_MBEDTLS mbedtls # -LDLIBS+= libmbedcrypto_static.lib -LDLIBS+= libz_static.lib +CRYPTOLIBS += libmbedcrypto_static.lib +CRYPTOLIBS += libz_static.lib VPATH+= $(SSH2SRC) $(SSH2BASE)/win32 CRYPTO_CSOURCES=\ diff --git a/mcwin32/libssh2/libssh2_helper.c b/mcwin32/libssh2/libssh2_helper.c index 739ac76e..c5cfefb8 100644 --- a/mcwin32/libssh2/libssh2_helper.c +++ b/mcwin32/libssh2/libssh2_helper.c @@ -1,4 +1,4 @@ -//$Id: libssh2_helper.c,v 1.1 2020/05/01 14:33:15 cvsuser Exp $ +//$Id: libssh2_helper.c,v 1.2 2024/03/29 13:22:24 cvsuser Exp $ // // libssh2 support // @@ -7,6 +7,11 @@ #include +#if defined(_MSC_VER) || defined(__WATCOMC__) +#pragma comment(lib, "BCrypt.lib") // BCryptGenRandom(), +3.5.0 +#endif + + LIBSSH2_API int libssh2_helper_trace(void) { diff --git a/mcwin32/libtool_win32.pl b/mcwin32/libtool_win32.pl index 922f2fa9..b3282fe5 100644 --- a/mcwin32/libtool_win32.pl +++ b/mcwin32/libtool_win32.pl @@ -1,6 +1,6 @@ #!/usr/bin/perl -w # -*- mode: perl; -*- -# $Id: libtool_win32.pl,v 1.22 2023/11/26 15:06:58 cvsuser Exp $ +# $Id: libtool_win32.pl,v 1.23 2024/01/16 15:18:03 cvsuser Exp $ # libtool emulation for WIN32 builds. # # **Warning** @@ -18,7 +18,7 @@ # $(D_LIB)/%.lo: %.cpp # $(LIBTOOL) --mode=compile $(CXX) $(CXXFLAGS) -o $(D_OBJ)/$@ -c $< # -# Copyright Adam Young 2012 - 2023 +# Copyright Adam Young 2012 - 2024 # All rights reserved. # # This file is part of the Midnight Commander. diff --git a/mcwin32/libw32/Makefile.in b/mcwin32/libw32/Makefile.in index 6eae0c15..a31c4cbe 100644 --- a/mcwin32/libw32/Makefile.in +++ b/mcwin32/libw32/Makefile.in @@ -1,9 +1,9 @@ # -*- mode: mak; indent-tabs-mode: t; tab-width: 8 -*- -# $Id: Makefile.in,v 1.26 2024/01/01 16:54:38 cvsuser Exp $ +# $Id: Makefile.in,v 1.27 2024/02/03 17:22:14 cvsuser Exp $ # libwin32 makefile. # # -# Copyright (c) 2007, 2012 - 2023 Adam Young. +# Copyright (c) 2007, 2012 - 2024 Adam Young. # All rights reserved. # # This file is part of the Midnight Commander. diff --git a/mcwin32/libw32/alloca.h b/mcwin32/libw32/alloca.h index 879ff3d2..31fac31f 100644 --- a/mcwin32/libw32/alloca.h +++ b/mcwin32/libw32/alloca.h @@ -1,14 +1,14 @@ #ifndef LIBW32_ALLOCA_H_INCLUDED #define LIBW32_ALLOCA_H_INCLUDED #include -__CIDENT_RCSID(gr_libw32_alloca_h,"$Id: alloca.h,v 1.7 2023/09/17 13:04:55 cvsuser Exp $") +__CIDENT_RCSID(gr_libw32_alloca_h,"$Id: alloca.h,v 1.8 2024/01/16 15:17:51 cvsuser Exp $") __CPRAGMA_ONCE /* -*- mode: c; indent-width: 4; -*- */ /* * win32 implementation * - * Copyright (c) 2007, 2012 - 2023 Adam Young. + * Copyright (c) 2007, 2012 - 2024 Adam Young. * * This file is part of the Midnight Commander. * diff --git a/mcwin32/libw32/arpa/ftp.h b/mcwin32/libw32/arpa/ftp.h index 182e7bf8..f8d07b4b 100644 --- a/mcwin32/libw32/arpa/ftp.h +++ b/mcwin32/libw32/arpa/ftp.h @@ -1,12 +1,12 @@ #ifndef LIBW32_ARPA_FTP_H_INCLUDED #define LIBW32_ARPA_FTP_H_INCLUDED #include -__CIDENT_RCSID(gr_libw32_arpa_ftp_h,"$Id: ftp.h,v 1.5 2023/11/06 15:08:43 cvsuser Exp $") +__CIDENT_RCSID(gr_libw32_arpa_ftp_h,"$Id: ftp.h,v 1.6 2024/03/14 18:54:32 cvsuser Exp $") __CPRAGMA_ONCE /* -*- mode: c; indent-width: 4; -*- */ /* - * Copyright (c) 1998 - 2023, Adam Young. + * Copyright (c) 1998 - 2024, Adam Young. * All rights reserved. * * This file is part of the Midnight Commander. diff --git a/mcwin32/libw32/arpa/inet.h b/mcwin32/libw32/arpa/inet.h index b8443eac..d0b493ac 100644 --- a/mcwin32/libw32/arpa/inet.h +++ b/mcwin32/libw32/arpa/inet.h @@ -1,12 +1,12 @@ #ifndef LIBW32_ARPA_INET_H_INCLUDED #define LIBW32_ARPA_INET_H_INCLUDED #include -__CIDENT_RCSID(gr_libw32_arpa_inet_h,"$Id: inet.h,v 1.4 2023/11/06 15:08:43 cvsuser Exp $") +__CIDENT_RCSID(gr_libw32_arpa_inet_h,"$Id: inet.h,v 1.5 2024/03/14 18:54:32 cvsuser Exp $") __CPRAGMA_ONCE /* -*- mode: c; indent-width: 4; -*- */ /* - * Copyright (c) 1998 - 2023, Adam Young. + * Copyright (c) 1998 - 2024, Adam Young. * All rights reserved. * * This file is part of the Midnight Commander. diff --git a/mcwin32/libw32/dirent.h b/mcwin32/libw32/dirent.h index 5f5f3584..733eb90c 100644 --- a/mcwin32/libw32/dirent.h +++ b/mcwin32/libw32/dirent.h @@ -1,14 +1,14 @@ #ifndef LIBW32_DIRENT_H_INCLUDED #define LIBW32_DIRENT_H_INCLUDED #include -__CIDENT_RCSID(gr_libw32_dirent_h,"$Id: dirent.h,v 1.16 2023/09/17 13:04:55 cvsuser Exp $") +__CIDENT_RCSID(gr_libw32_dirent_h,"$Id: dirent.h,v 1.18 2024/03/03 11:29:13 cvsuser Exp $") __CPRAGMA_ONCE /* -*- mode: c; indent-width: 4; -*- */ /* * win32 implementation * - * Copyright (c) 2007, 2012 - 2023 Adam Young. + * Copyright (c) 2007, 2012 - 2024 Adam Young. * All rights reserved. * * This file is part of the Midnight Commander. @@ -230,9 +230,9 @@ LIBW32_API void _wseekdir __P((_WDIR *, long)); LIBW32_API long _wtelldir __P((_WDIR *)); LIBW32_API int _wreaddir_r __P((_WDIR *, struct _wdirent *, struct _wdirent **)); /*deprecated*/ -LIBW32_API int alphasort __P((const void *, const void *)); -LIBW32_API int scandir __P((void)); -LIBW32_API int getdirentries __P((int, char *, int, long *)); +//LIBW32_API int alphasort __P((const void *, const void *)); +//LIBW32_API int scandir __P((void)); +//LIBW32_API int getdirentries __P((int, char *, int, long *)); #endif /*_POSIX_SOURCE*/ __END_DECLS diff --git a/mcwin32/libw32/dlfcn.h b/mcwin32/libw32/dlfcn.h index f05cf80c..0c97841b 100644 --- a/mcwin32/libw32/dlfcn.h +++ b/mcwin32/libw32/dlfcn.h @@ -1,14 +1,14 @@ #ifndef GR_DLFCN_H_INCLUDED #define GR_DLFCN_H_INCLUDED #include -__CIDENT_RCSID(gr_libw32_dlfcn_h,"$Id: dlfcn.h,v 1.4 2023/09/17 13:04:55 cvsuser Exp $") +__CIDENT_RCSID(gr_libw32_dlfcn_h,"$Id: dlfcn.h,v 1.5 2024/02/03 17:22:14 cvsuser Exp $") __CPRAGMA_ONCE /* -*- mode: c; indent-width: 4; -*- */ /* * for windows * - * Copyright (c) 1998 - 2023, Adam Young. + * Copyright (c) 1998 - 2024, Adam Young. * All rights reserved. * * This file is part of the Midnight Commander. diff --git a/mcwin32/libw32/edidentifier.h b/mcwin32/libw32/edidentifier.h index 58ea8c4a..c648d741 100644 --- a/mcwin32/libw32/edidentifier.h +++ b/mcwin32/libw32/edidentifier.h @@ -2,7 +2,7 @@ #define LIBW32_EDIDENTIFIER_H_INCLUDED /* -*- mode: c; indent-width: 4; -*- */ -/* $Id: edidentifier.h,v 1.6 2023/09/17 13:04:55 cvsuser Exp $ +/* $Id: edidentifier.h,v 1.7 2024/01/16 15:17:51 cvsuser Exp $ * Compiler specific object identify functionality. * * __CIDENT(description) @@ -10,7 +10,7 @@ * __CPRAGMA_ONCE * * - * Copyright (c) 2007, 2012 - 2023 Adam Young. + * Copyright (c) 2007, 2012 - 2024 Adam Young. * * This file is part of the Midnight Commander. * diff --git a/mcwin32/libw32/err.h b/mcwin32/libw32/err.h index 84eb89d4..1b5566ed 100644 --- a/mcwin32/libw32/err.h +++ b/mcwin32/libw32/err.h @@ -1,14 +1,14 @@ #ifndef LIBW32_ERR_H_INCLUDED #define LIBW32_ERR_H_INCLUDED #include -__CIDENT_RCSID(gr_libw32_err_h,"$Id: err.h,v 1.4 2023/09/17 13:04:56 cvsuser Exp $") +__CIDENT_RCSID(gr_libw32_err_h,"$Id: err.h,v 1.6 2024/02/25 16:50:07 cvsuser Exp $") __CPRAGMA_ONCE /* -*- mode: c; indent-width: 4; -*- */ /* * win * - * Copyright (c) 1998 - 2023, Adam Young. + * Copyright (c) 1998 - 2024, Adam Young. * All rights reserved. * * This file is part of the Midnight Commander. @@ -36,22 +36,55 @@ __CPRAGMA_ONCE #include #include +/* + * - Formatted error message. + * + * The err() and warn() family of functions display a formatted error message on stderr. For a comparison of the members of this family, see err(). + * + * The vwarn() function produces a message that consists of: + * + * o the last component of the program name, followed by a colon and a space + * + * O the formatted message, followed by a colon and a space, if the fmt argument isn't NULL + * + * O the string associated with the current value of errno + * + * o a newline character + * + * The vwarnx() function produces a similar message, except that it doesn't include the string associated with errno. The message consists of: + * + * o the last component of the program name, followed by a colon and a space + * + * o the formatted message, if the fmt argument isn't NULL + * + * o a newline character + */ + __BEGIN_DECLS /* ": : \n", on stderr. */ -LIBW32_API void warn(const char *fmt, ...); -LIBW32_API void vwarn(const char *fmt, va_list ap); +LIBW32_API void warn(const char *fmt, ...); +LIBW32_API void vwarn(const char *fmt, va_list ap); +LIBW32_API void warnc(int code, const char *fmt, ...); +LIBW32_API void vwarnc(int code, const char *fmt, va_list ap); /* Likewise, but without ": " and the standard error string. */ -LIBW32_API void warnx(const char *fmt, ...); -LIBW32_API void vwarnx(const char *fmt, va_list ap); +LIBW32_API void warnx(const char *fmt, ...); +LIBW32_API void vwarnx(const char *fmt, va_list ap); + /* Like above, but the exits using 'eval' */ -LIBW32_API void err(int eval, const char *fmt, ...); -LIBW32_API void verr(int eval, const char *fmt, va_list ap); +LIBW32_API void err(int eval, const char *fmt, ...); +LIBW32_API void verr(int eval, const char *fmt, va_list ap); + +LIBW32_API void errc(int eval, int code, const char *fmt, ...); +LIBW32_API void verrc(int eval, int code, const char *fmt, va_list); + +LIBW32_API void errx(int eval, const char *fmt, ...); +LIBW32_API void verrx(int eval, const char *fmt, va_list ap); -LIBW32_API void errx(int eval, const char *fmt, ...); -LIBW32_API void verrx(int eval, const char *fmt, va_list ap); +LIBW32_API void err_set_file(void *); +LIBW32_API void err_set_exit(void (*)(int)); __END_DECLS diff --git a/mcwin32/libw32/getopt.h b/mcwin32/libw32/getopt.h index ce9904b5..05129498 100644 --- a/mcwin32/libw32/getopt.h +++ b/mcwin32/libw32/getopt.h @@ -1,14 +1,14 @@ #ifndef LIBW32_GETOPT_H_INCLUDED #define LIBW32_GETOPT_H_INCLUDED #include -__CIDENT_RCSID(gr_libw32_getopt_h,"$Id: getopt.h,v 1.12 2024/01/01 16:54:38 cvsuser Exp $") +__CIDENT_RCSID(gr_libw32_getopt_h,"$Id: getopt.h,v 1.13 2024/02/03 17:22:14 cvsuser Exp $") __CPRAGMA_ONCE /* -*- mode: c; indent-width: 4; -*- */ /* * win * - * Copyright (c) 1998 - 2023, Adam Young. + * Copyright (c) 1998 - 2024, Adam Young. * All rights reserved. * * This file is part of the Midnight Commander. diff --git a/mcwin32/libw32/grp.h b/mcwin32/libw32/grp.h index 453732d9..6f207519 100644 --- a/mcwin32/libw32/grp.h +++ b/mcwin32/libw32/grp.h @@ -1,14 +1,14 @@ #ifndef LIBW32_GRP_H_INCLUDED #define LIBW32_GRP_H_INCLUDED #include -__CIDENT_RCSID(gr_libw32_grp_h,"$Id: grp.h,v 1.11 2023/09/17 13:04:56 cvsuser Exp $") +__CIDENT_RCSID(gr_libw32_grp_h,"$Id: grp.h,v 1.12 2024/01/16 15:17:51 cvsuser Exp $") __CPRAGMA_ONCE /* -*- mode: c; indent-width: 4; -*- */ /* * win32 implementation * - * Copyright (c) 2007, 2012 - 2023 Adam Young. + * Copyright (c) 2007, 2012 - 2024 Adam Young. * All rights reserved. * * This file is part of the Midnight Commander. diff --git a/mcwin32/libw32/langinfo.h b/mcwin32/libw32/langinfo.h index 49e0419b..54948624 100644 --- a/mcwin32/libw32/langinfo.h +++ b/mcwin32/libw32/langinfo.h @@ -1,14 +1,14 @@ #ifndef LIBW32_LANGINFO_H_INCLUDED #define LIBW32_LANGINFO_H_INCLUDED #include -__CIDENT_RCSID(gr_libw32_langinfo_h,"$Id: langinfo.h,v 1.7 2023/09/17 13:04:56 cvsuser Exp $") +__CIDENT_RCSID(gr_libw32_langinfo_h,"$Id: langinfo.h,v 1.8 2024/01/16 15:17:51 cvsuser Exp $") __CPRAGMA_ONCE /* -*- mode: c; indent-width: 4; -*- */ /* * win32 implementation * - * Copyright (c) 2007, 2012 - 2023 Adam Young. + * Copyright (c) 2007, 2012 - 2024 Adam Young. * * This file is part of the Midnight Commander. * diff --git a/mcwin32/libw32/libgen.h b/mcwin32/libw32/libgen.h index b3f69f4a..9d0c41bf 100644 --- a/mcwin32/libw32/libgen.h +++ b/mcwin32/libw32/libgen.h @@ -1,14 +1,14 @@ #ifndef LIBW32_LIBGEN_H_INCLUDED #define LIBW32_LIBGEN_H_INCLUDED #include -__CIDENT_RCSID(gr_libgen_h,"$Id: libgen.h,v 1.5 2023/09/17 13:04:56 cvsuser Exp $") +__CIDENT_RCSID(gr_libgen_h,"$Id: libgen.h,v 1.6 2024/01/16 15:17:51 cvsuser Exp $") __CPRAGMA_ONCE /* -*- mode: c; indent-width: 4; -*- */ /* * win32 implementation * - * Copyright (c) 2007, 2012 - 2023 Adam Young. + * Copyright (c) 2007, 2012 - 2024 Adam Young. * * This file is part of the Midnight Commander. * diff --git a/mcwin32/libw32/libw32.h b/mcwin32/libw32/libw32.h index b86765ba..aed34e27 100644 --- a/mcwin32/libw32/libw32.h +++ b/mcwin32/libw32/libw32.h @@ -4,7 +4,7 @@ /* * win32 public interface * - * Copyright (c) 2007, 2012 - 2023 Adam Young. + * Copyright (c) 2007, 2012 - 2024 Adam Young. * * This file is part of the Midnight Commander. * diff --git a/mcwin32/libw32/libw32_version.h b/mcwin32/libw32/libw32_version.h index b001460d..6d18fb7f 100644 --- a/mcwin32/libw32/libw32_version.h +++ b/mcwin32/libw32/libw32_version.h @@ -1,7 +1,7 @@ #ifndef LIBW32_VERSION_H_INCLUDED #define LIBW32_VERSION_H_INCLUDED /* - * Copyright (c) 2016 - 2023 Adam Young. + * Copyright (c) 2016 - 2024 Adam Young. * * This file is part of the Midnight Commander. * diff --git a/mcwin32/libw32/msvcversions.h b/mcwin32/libw32/msvcversions.h index 89ec49e0..c644f1e8 100644 --- a/mcwin32/libw32/msvcversions.h +++ b/mcwin32/libw32/msvcversions.h @@ -1,14 +1,14 @@ #ifndef LIBW32_MSVCVERSIONS_H_INCLUDED #define LIBW32_MSVCVERSIONS_H_INCLUDED #include -__CIDENT_RCSID(gr_msvcversions_h,"$Id: msvcversions.h,v 1.2 2023/09/17 13:04:56 cvsuser Exp $") +__CIDENT_RCSID(gr_msvcversions_h,"$Id: msvcversions.h,v 1.3 2024/01/16 15:17:51 cvsuser Exp $") __CPRAGMA_ONCE /* -*- mode: c; indent-width: 4; -*- */ -/* $Id: msvcversions.h,v 1.2 2023/09/17 13:04:56 cvsuser Exp $ +/* $Id: msvcversions.h,v 1.3 2024/01/16 15:17:51 cvsuser Exp $ * _MSC_VER definitions * - * Copyright (c) 2017 - 2023, Adam Young. + * Copyright (c) 2017 - 2024, Adam Young. * All rights reserved. * * This file is part of inetd-win32. diff --git a/mcwin32/libw32/netdb.h b/mcwin32/libw32/netdb.h index bc20c89e..102aa737 100644 --- a/mcwin32/libw32/netdb.h +++ b/mcwin32/libw32/netdb.h @@ -1,14 +1,14 @@ #ifndef LIBW32_NETDB_H_INCLUDED #define LIBW32_NETDB_H_INCLUDED #include -__CIDENT_RCSID(gr_libw32_netdb_h,"$Id: netdb.h,v 1.9 2023/09/17 13:04:56 cvsuser Exp $") +__CIDENT_RCSID(gr_libw32_netdb_h,"$Id: netdb.h,v 1.10 2024/01/16 15:17:51 cvsuser Exp $") __CPRAGMA_ONCE /* -*- mode: c; indent-width: 4; -*- */ /* * win32 implementation * - * Copyright (c) 2007, 2012 - 2023 Adam Young. + * Copyright (c) 2007, 2012 - 2024 Adam Young. * * This file is part of the Midnight Commander. * diff --git a/mcwin32/libw32/netinet/in.h b/mcwin32/libw32/netinet/in.h index 7dd01429..8e2c6ef8 100644 --- a/mcwin32/libw32/netinet/in.h +++ b/mcwin32/libw32/netinet/in.h @@ -1,14 +1,14 @@ #ifndef LIBW32_NETINET_IN_H_INCLUDED #define LIBW32_NETINET_IN_H_INCLUDED #include -__CIDENT_RCSID(gr_libw32_netinet_in_h,"$Id: in.h,v 1.6 2023/11/06 15:08:35 cvsuser Exp $") +__CIDENT_RCSID(gr_libw32_netinet_in_h,"$Id: in.h,v 1.7 2024/03/14 18:54:57 cvsuser Exp $") __CPRAGMA_ONCE /* -*- mode: c; indent-width: 4; -*- */ /* * netinet/in.h * - * Copyright (c) 1998 - 2023, Adam Young. + * Copyright (c) 1998 - 2024, Adam Young. * All rights reserved. * * This file is part of the Midnight Commander. diff --git a/mcwin32/libw32/netinet/tcp.h b/mcwin32/libw32/netinet/tcp.h index 26a1082c..dd179001 100644 --- a/mcwin32/libw32/netinet/tcp.h +++ b/mcwin32/libw32/netinet/tcp.h @@ -1,14 +1,14 @@ #ifndef LIBW32_NETINET_TCP_H_INCLUDED #define LIBW32_NETINET_TCP_H_INCLUDED #include -__CIDENT_RCSID(gr_libw32_netinet_tcp_h,"$Id: tcp.h,v 1.6 2023/11/06 15:08:35 cvsuser Exp $") +__CIDENT_RCSID(gr_libw32_netinet_tcp_h,"$Id: tcp.h,v 1.7 2024/03/14 18:54:57 cvsuser Exp $") __CPRAGMA_ONCE /* -*- mode: c; indent-width: 4; -*- */ /* * netinet/tcp.h * - * Copyright (c) 1998 - 2023, Adam Young. + * Copyright (c) 1998 - 2024, Adam Young. * All rights reserved. * * This file is part of the Midnight Commander. diff --git a/mcwin32/libw32/poll.h b/mcwin32/libw32/poll.h index a5354fd0..b65f419c 100644 --- a/mcwin32/libw32/poll.h +++ b/mcwin32/libw32/poll.h @@ -1,14 +1,14 @@ #ifndef LIBW32_POLL_H_INCLUDED #define LIBW32_POLL_H_INCLUDED #include -__CIDENT_RCSID(gr_libw32_poll_h,"$Id: poll.h,v 1.10 2023/09/17 13:04:56 cvsuser Exp $") +__CIDENT_RCSID(gr_libw32_poll_h,"$Id: poll.h,v 1.11 2024/01/16 15:17:51 cvsuser Exp $") __CPRAGMA_ONCE /* -*- mode: c; indent-width: 4; -*- */ /* * win * - * Copyright (c) 2007, 2012 - 2023 Adam Young. + * Copyright (c) 2007, 2012 - 2024 Adam Young. * * This file is part of the Midnight Commander. * diff --git a/mcwin32/libw32/slang.h b/mcwin32/libw32/slang.h index 6dacd5fe..3a0e414c 100644 --- a/mcwin32/libw32/slang.h +++ b/mcwin32/libw32/slang.h @@ -4,7 +4,7 @@ /* * win32 partial implementation * - * Copyright (c) 2007, 2012 - 2023 Adam Young. + * Copyright (c) 2007, 2012 - 2024 Adam Young. * * This file is part of the Midnight Commander. * diff --git a/mcwin32/libw32/sys/cdefs.h b/mcwin32/libw32/sys/cdefs.h index 0ee96fe5..474118d3 100644 --- a/mcwin32/libw32/sys/cdefs.h +++ b/mcwin32/libw32/sys/cdefs.h @@ -1,14 +1,14 @@ #ifndef LIBW32_SYS_CDEFS_H_INCLUDED #define LIBW32_SYS_CDEFS_H_INCLUDED #include -__CIDENT_RCSID(gr_libw32_sys_cdefs_h,"$Id: cdefs.h,v 1.11 2023/11/06 15:06:06 cvsuser Exp $") +__CIDENT_RCSID(gr_libw32_sys_cdefs_h,"$Id: cdefs.h,v 1.12 2024/01/16 15:17:52 cvsuser Exp $") __CPRAGMA_ONCE /* -*- mode: c; indent-width: 4; -*- * * win32 declaration helpers * - * Copyright (c) 1998 - 2023, Adam Young. + * Copyright (c) 1998 - 2024, Adam Young. * All rights reserved. * * This file is part of the Midnight Commander. diff --git a/mcwin32/libw32/sys/endian.h b/mcwin32/libw32/sys/endian.h index 5b5f9a53..1e77e96c 100644 --- a/mcwin32/libw32/sys/endian.h +++ b/mcwin32/libw32/sys/endian.h @@ -1,14 +1,14 @@ #ifndef GR_ENDIAN_H_INCLUDED #define GR_ENDIAN_H_INCLUDED #include -__CIDENT_RCSID(gr_libw32_sys_endian_h,"$Id: endian.h,v 1.4 2024/01/01 15:15:13 cvsuser Exp $") +__CIDENT_RCSID(gr_libw32_sys_endian_h,"$Id: endian.h,v 1.5 2024/01/16 15:17:52 cvsuser Exp $") __CPRAGMA_ONCE /* -*- mode: c; indent-width: 4; -*- * * win32 implementation * - * Copyright (c) 1998 - 2023, Adam Young. + * Copyright (c) 1998 - 2024, Adam Young. * All rights reserved. * * This file is part of the Midnight Commander. diff --git a/mcwin32/libw32/sys/fd_set.h b/mcwin32/libw32/sys/fd_set.h index 4e2d719c..6775b82d 100644 --- a/mcwin32/libw32/sys/fd_set.h +++ b/mcwin32/libw32/sys/fd_set.h @@ -3,7 +3,7 @@ /* * * - * Copyright (c) 2022 - 2023, Adam Young. + * Copyright (c) 2022 - 2024, Adam Young. * All rights reserved. * * This file is part of the Midnight Commander. diff --git a/mcwin32/libw32/sys/file.h b/mcwin32/libw32/sys/file.h index e97c7e30..9aa460bc 100644 --- a/mcwin32/libw32/sys/file.h +++ b/mcwin32/libw32/sys/file.h @@ -1,14 +1,14 @@ #ifndef LIBW32_SYS_FILE_H_INCLUDED #define LIBW32_SYS_FILE_H_INCLUDED #include -__CIDENT_RCSID(gr_libw32_sys_file_h,"$Id: file.h,v 1.3 2023/11/06 15:06:06 cvsuser Exp $") +__CIDENT_RCSID(gr_libw32_sys_file_h,"$Id: file.h,v 1.4 2024/01/16 15:17:52 cvsuser Exp $") __CPRAGMA_ONCE /* -*- mode: c; indent-width: 4; -*- */ /* * win32 sys/file.h * - * Copyright (c) 2020 - 2023, Adam Young. + * Copyright (c) 2020 - 2024, Adam Young. * All rights reserved. * * This file is part of the Midnight Commander. diff --git a/mcwin32/libw32/sys/ioctl.h b/mcwin32/libw32/sys/ioctl.h index 1f62cb80..08df46fb 100644 --- a/mcwin32/libw32/sys/ioctl.h +++ b/mcwin32/libw32/sys/ioctl.h @@ -1,12 +1,12 @@ #ifndef LIBW32_SYS_IOCTL_H_INCLUDED #define LIBW32_SYS_IOCTL_H_INCLUDED #include -__CIDENT_RCSID(gr_libw32_sys_ioctl_h,"$Id: ioctl.h,v 1.6 2023/11/06 15:06:06 cvsuser Exp $") +__CIDENT_RCSID(gr_libw32_sys_ioctl_h,"$Id: ioctl.h,v 1.7 2024/01/16 15:17:52 cvsuser Exp $") __CPRAGMA_ONCE /* -*- mode: c; indent-width: 4; -*- */ /* - * Copyright (c) 2012 - 2023, Adam Young. + * Copyright (c) 2012 - 2024, Adam Young. * All rights reserved. * * This file is part of the Midnight Commander. diff --git a/mcwin32/libw32/sys/mman.h b/mcwin32/libw32/sys/mman.h index 773d578d..cad4b9bd 100644 --- a/mcwin32/libw32/sys/mman.h +++ b/mcwin32/libw32/sys/mman.h @@ -1,13 +1,13 @@ #ifndef LIBW32_SYS_MMAN_H_INCLUDED #define LIBW32_SYS_MMAN_H_INCLUDED #include -__CIDENT_RCSID(gr_libw32_sys_mman_h,"$Id: mman.h,v 1.10 2023/12/28 17:31:16 cvsuser Exp $") +__CIDENT_RCSID(gr_libw32_sys_mman_h,"$Id: mman.h,v 1.11 2024/01/16 15:17:52 cvsuser Exp $") __CPRAGMA_ONCE /* -*- mode: c; indent-width: 4; -*- */ /* * win32 mmap implementation - * Copyright (c) 2012 - 2023, Adam Young. + * Copyright (c) 2012 - 2024, Adam Young. * All rights reserved. * * This file is part of the Midnight Commander. diff --git a/mcwin32/libw32/sys/mount.h b/mcwin32/libw32/sys/mount.h index f2cb4d4f..610ae2c0 100644 --- a/mcwin32/libw32/sys/mount.h +++ b/mcwin32/libw32/sys/mount.h @@ -1,14 +1,14 @@ #ifndef LIBW32_SYS_MOUNT_H_INCLUDED #define LIBW32_SYS_MOUNT_H_INCLUDED #include -__CIDENT_RCSID(gr_libw32_sys_mount_h,"$Id: mount.h,v 1.8 2023/11/06 15:06:06 cvsuser Exp $") +__CIDENT_RCSID(gr_libw32_sys_mount_h,"$Id: mount.h,v 1.9 2024/01/16 15:17:52 cvsuser Exp $") __CPRAGMA_ONCE /* -*- mode: c; indent-width: 4; -*- */ /* * win32 mount() implementation * - * Copyright (c) 2012 - 2023, Adam Young. + * Copyright (c) 2012 - 2024, Adam Young. * All rights reserved. * * This file is part of the Midnight Commander. diff --git a/mcwin32/libw32/sys/pack0.h b/mcwin32/libw32/sys/pack0.h index eb160903..4c3409f2 100644 --- a/mcwin32/libw32/sys/pack0.h +++ b/mcwin32/libw32/sys/pack0.h @@ -1,10 +1,10 @@ /* -*- mode: c; indent-width: 4; -*- - * $Id: pack0.h,v 1.4 2023/11/06 15:06:06 cvsuser Exp $ + * $Id: pack0.h,v 1.5 2024/01/16 15:17:52 cvsuser Exp $ * ==noguard== * * win32 declaration helpers * - * Copyright (c) 1998 - 2023, Adam Young. + * Copyright (c) 1998 - 2024, Adam Young. * All rights reserved. * * This file is part of the Midnight Commander. diff --git a/mcwin32/libw32/sys/pack1.h b/mcwin32/libw32/sys/pack1.h index c945262e..7a4f890e 100644 --- a/mcwin32/libw32/sys/pack1.h +++ b/mcwin32/libw32/sys/pack1.h @@ -1,10 +1,10 @@ /* -*- mode: c; indent-width: 4; -*- - * $Id: pack1.h,v 1.4 2023/11/06 15:06:06 cvsuser Exp $ + * $Id: pack1.h,v 1.5 2024/01/16 15:17:52 cvsuser Exp $ * ==noguard== * * win32 declaration helpers * - * Copyright (c) 1998 - 2023, Adam Young. + * Copyright (c) 1998 - 2024, Adam Young. * All rights reserved. * * This file is part of the Midnight Commander. diff --git a/mcwin32/libw32/sys/param.h b/mcwin32/libw32/sys/param.h index cc50fed7..d6069450 100644 --- a/mcwin32/libw32/sys/param.h +++ b/mcwin32/libw32/sys/param.h @@ -1,14 +1,14 @@ #ifndef LIBW32_SYS_PARAM_H_INCLUDED #define LIBW32_SYS_PARAM_H_INCLUDED #include -__CIDENT_RCSID(gr_libw32_sys_param_h,"$Id: param.h,v 1.6 2023/11/06 15:06:06 cvsuser Exp $") +__CIDENT_RCSID(gr_libw32_sys_param_h,"$Id: param.h,v 1.7 2024/01/16 15:17:52 cvsuser Exp $") __CPRAGMA_ONCE /* -*- mode: c; indent-width: 4; -*- */ /* * win32 * - * Copyright (c) 2012 - 2023, Adam Young. + * Copyright (c) 2012 - 2024, Adam Young. * All rights reserved. * * This file is part of the Midnight Commander. diff --git a/mcwin32/libw32/sys/poll.h b/mcwin32/libw32/sys/poll.h index 9860011d..8e6a65eb 100644 --- a/mcwin32/libw32/sys/poll.h +++ b/mcwin32/libw32/sys/poll.h @@ -1,12 +1,12 @@ #ifndef LIBW32_SYS_POLL_H_INCLUDED #define LIBW32_SYS_POLL_H_INCLUDED #include -__CIDENT_RCSID(gr_libw32_sys_poll_h,"$Id: poll.h,v 1.6 2023/11/06 15:06:06 cvsuser Exp $") +__CIDENT_RCSID(gr_libw32_sys_poll_h,"$Id: poll.h,v 1.7 2024/01/16 15:17:52 cvsuser Exp $") __CPRAGMA_ONCE /* -*- mode: c; indent-width: 4; -*- */ /* - * Copyright (c) 1998 - 2023, Adam Young. + * Copyright (c) 1998 - 2024, Adam Young. * All rights reserved. * * This file is part of the Midnight Commander. diff --git a/mcwin32/libw32/sys/queue.h b/mcwin32/libw32/sys/queue.h index 0e70d80c..9314b100 100644 --- a/mcwin32/libw32/sys/queue.h +++ b/mcwin32/libw32/sys/queue.h @@ -1,12 +1,12 @@ #ifndef GR_QUEUE_H_INCLUDED #define GR_QUEUE_H_INCLUDED #include -__CIDENT_RCSID(gr_libw32_sys_queue_h,"$Id: queue.h,v 1.3 2023/11/06 15:06:06 cvsuser Exp $") +__CIDENT_RCSID(gr_libw32_sys_queue_h,"$Id: queue.h,v 1.4 2024/01/16 15:17:52 cvsuser Exp $") __CPRAGMA_ONCE /* -*- mode: c; indent-width: 4; -*- */ /* - * Copyright (c) 1998 - 2023, Adam Young. + * Copyright (c) 1998 - 2024, Adam Young. * All rights reserved. * * This file is part of the Midnight Commander. diff --git a/mcwin32/libw32/sys/resource.h b/mcwin32/libw32/sys/resource.h index a6e81967..fa370330 100644 --- a/mcwin32/libw32/sys/resource.h +++ b/mcwin32/libw32/sys/resource.h @@ -6,7 +6,7 @@ __CPRAGMA_ONCE /* -*- mode: c; indent-width: 4; -*- */ /* - * Copyright (c) 2020 - 2023, Adam Young. + * Copyright (c) 2020 - 2024, Adam Young. * All rights reserved. * * This file is part of the Midnight Commander. diff --git a/mcwin32/libw32/sys/rwlock.h b/mcwin32/libw32/sys/rwlock.h index 07886f35..e5720b3a 100644 --- a/mcwin32/libw32/sys/rwlock.h +++ b/mcwin32/libw32/sys/rwlock.h @@ -1,14 +1,14 @@ #ifndef LIBW32_SYS_RWLOCK_H_INCLUDED #define LIBW32_SYS_RWLOCK_H_INCLUDED #include -__CIDENT_RCSID(gr_libw32_sys_rwlock_h,"$Id: rwlock.h,v 1.5 2023/12/28 17:31:16 cvsuser Exp $") +__CIDENT_RCSID(gr_libw32_sys_rwlock_h,"$Id: rwlock.h,v 1.6 2024/01/16 15:17:52 cvsuser Exp $") __CPRAGMA_ONCE /* -*- mode: c; indent-width: 4; -*- */ /* * win32 implementation * - * Copyright (c) 1998 - 2023, Adam Young. + * Copyright (c) 1998 - 2024, Adam Young. * All rights reserved. * * This file is part of the Midnight Commander. diff --git a/mcwin32/libw32/sys/select.h b/mcwin32/libw32/sys/select.h index 80dd6b39..16bdb6ea 100644 --- a/mcwin32/libw32/sys/select.h +++ b/mcwin32/libw32/sys/select.h @@ -1,12 +1,12 @@ #ifndef LIBW32_SYS_SELECT_H_INCLUDED #define LIBW32_SYS_SELECT_H_INCLUDED #include -__CIDENT_RCSID(gr_libw32_sys_select_h,"$Id: select.h,v 1.9 2023/12/28 17:31:16 cvsuser Exp $") +__CIDENT_RCSID(gr_libw32_sys_select_h,"$Id: select.h,v 1.10 2024/01/16 15:17:52 cvsuser Exp $") __CPRAGMA_ONCE /* -*- mode: c; indent-width: 4; -*- */ /* - * Copyright (c) 2012 - 2023 Adam Young. + * Copyright (c) 2012 - 2024 Adam Young. * All rights reserved. * * This file is part of the Midnight Commander. diff --git a/mcwin32/libw32/sys/socket.h b/mcwin32/libw32/sys/socket.h index 9905f864..111ad46f 100644 --- a/mcwin32/libw32/sys/socket.h +++ b/mcwin32/libw32/sys/socket.h @@ -1,14 +1,14 @@ #ifndef LIBW32_SYS_SOCKET_H_INCLUDED #define LIBW32_SYS_SOCKET_H_INCLUDED #include -__CIDENT_RCSID(gr_libw32_sys_socket_h,"$Id: socket.h,v 1.15 2023/12/28 17:31:16 cvsuser Exp $") +__CIDENT_RCSID(gr_libw32_sys_socket_h,"$Id: socket.h,v 1.16 2024/01/16 15:17:52 cvsuser Exp $") __CPRAGMA_ONCE /* -*- mode: c; indent-width: 4; -*- */ /* * win32 * - * Copyright (c) 2012 - 2023, Adam Young. + * Copyright (c) 2012 - 2024, Adam Young. * All rights reserved. * * This file is part of the Midnight Commander. diff --git a/mcwin32/libw32/sys/statfs.h b/mcwin32/libw32/sys/statfs.h index 84c28374..7bcf1c68 100644 --- a/mcwin32/libw32/sys/statfs.h +++ b/mcwin32/libw32/sys/statfs.h @@ -1,14 +1,14 @@ #ifndef LIBW32_SYS_STATFS_H_INCLUDED #define LIBW32_SYS_STATFS_H_INCLUDED #include -__CIDENT_RCSID(gr_libw32_sys_statfs_h,"$Id: statfs.h,v 1.9 2023/01/31 17:14:13 cvsuser Exp $") +__CIDENT_RCSID(gr_libw32_sys_statfs_h,"$Id: statfs.h,v 1.10 2024/01/16 15:17:52 cvsuser Exp $") __CPRAGMA_ONCE /* -*- mode: c; indent-width: 4; -*- */ /* * win32 [f]statfs implementation * - * Copyright (c) 2012 - 2023, Adam Young. + * Copyright (c) 2012 - 2024, Adam Young. * All rights reserved. * * This file is part of the Midnight Commander. diff --git a/mcwin32/libw32/sys/statvfs.h b/mcwin32/libw32/sys/statvfs.h index 588b6751..00a6f29c 100644 --- a/mcwin32/libw32/sys/statvfs.h +++ b/mcwin32/libw32/sys/statvfs.h @@ -1,14 +1,14 @@ #ifndef LIBW32_SYS_STATVFS_H #define LIBW32_SYS_STATVFS_H #include -__CIDENT_RCSID(gr_libw32_sys_statvfs_h,"$Id: statvfs.h,v 1.8 2023/01/31 17:14:13 cvsuser Exp $") +__CIDENT_RCSID(gr_libw32_sys_statvfs_h,"$Id: statvfs.h,v 1.9 2024/01/16 15:17:52 cvsuser Exp $") __CPRAGMA_ONCE /* -*- mode: c; indent-width: 4; -*- */ /* * win32 [f]statvfs implementation * - * Copyright (c) 2012 - 2023, Adam Young. + * Copyright (c) 2012 - 2024, Adam Young. * All rights reserved. * * This file is part of the Midnight Commander. diff --git a/mcwin32/libw32/sys/time.h b/mcwin32/libw32/sys/time.h index 961918df..fb5da6ff 100644 --- a/mcwin32/libw32/sys/time.h +++ b/mcwin32/libw32/sys/time.h @@ -1,14 +1,14 @@ #ifndef LIBW32_SYS_TIME_H_INCLUDED #define LIBW32_SYS_TIME_H_INCLUDED #include -__CIDENT_RCSID(gr_libw32_sys_time_h,"$Id: time.h,v 1.11 2023/12/28 17:31:16 cvsuser Exp $") +__CIDENT_RCSID(gr_libw32_sys_time_h,"$Id: time.h,v 1.12 2024/01/16 15:17:52 cvsuser Exp $") __CPRAGMA_ONCE /* -*- mode: c; indent-width: 4; -*- */ /* * win32 sys/time.h implementation. * - * Copyright (c) 1998 - 2023, Adam Young. + * Copyright (c) 1998 - 2024, Adam Young. * All rights reserved. * * This file is part of the Midnight Commander. diff --git a/mcwin32/libw32/sys/uio.h b/mcwin32/libw32/sys/uio.h index c049e4ed..8a79865a 100644 --- a/mcwin32/libw32/sys/uio.h +++ b/mcwin32/libw32/sys/uio.h @@ -1,14 +1,14 @@ #ifndef LIBW32_SYS_UIO_H_INCLUDED #define LIBW32_SYS_UIO_H_INCLUDED #include -__CIDENT_RCSID(gr_libw32_sys_uio_h,"$Id: uio.h,v 1.9 2023/11/06 15:06:06 cvsuser Exp $") +__CIDENT_RCSID(gr_libw32_sys_uio_h,"$Id: uio.h,v 1.10 2024/01/16 15:17:52 cvsuser Exp $") __CPRAGMA_ONCE /* -*- mode: c; indent-width: 4; -*- */ /* * win32 sys/uio.h * - * Copyright (c) 1998 - 2023, Adam Young. + * Copyright (c) 1998 - 2024, Adam Young. * All rights reserved. * * This file is part of the Midnight Commander. diff --git a/mcwin32/libw32/sys/utsname.h b/mcwin32/libw32/sys/utsname.h index 59ed623b..a19cfe11 100644 --- a/mcwin32/libw32/sys/utsname.h +++ b/mcwin32/libw32/sys/utsname.h @@ -1,12 +1,12 @@ #ifndef LIBW32_SYS_UTSNAME_H_INCLUDED #define LIBW32_SYS_UTSNAME_H_INCLUDED #include -__CIDENT_RCSID(gr_libw32_sys_utsname_h,"$Id: utsname.h,v 1.6 2023/12/28 17:31:16 cvsuser Exp $") +__CIDENT_RCSID(gr_libw32_sys_utsname_h,"$Id: utsname.h,v 1.7 2024/01/16 15:17:52 cvsuser Exp $") __CPRAGMA_ONCE /* -*- mode: c; indent-width: 4; -*- */ /* - * Copyright (c) 2012 - 2023, Adam Young. + * Copyright (c) 2012 - 2024, Adam Young. * All rights reserved. * * This file is part of the Midnight Commander. diff --git a/mcwin32/libw32/sys/utypes.h b/mcwin32/libw32/sys/utypes.h index 8098e6e8..c5b35f35 100644 --- a/mcwin32/libw32/sys/utypes.h +++ b/mcwin32/libw32/sys/utypes.h @@ -1,14 +1,14 @@ #ifndef LIBW32_SYS_UTYPES_H_INCLUDED #define LIBW32_SYS_UTYPES_H_INCLUDED #include -__CIDENT_RCSID(gr_libw32_sys_utypes_h,"$Id: utypes.h,v 1.23 2023/12/28 17:31:16 cvsuser Exp $") +__CIDENT_RCSID(gr_libw32_sys_utypes_h,"$Id: utypes.h,v 1.24 2024/01/16 15:17:52 cvsuser Exp $") __CPRAGMA_ONCE /* -*- mode: c; indent-width: 4; -*- */ /* * win32 unix types * - * Copyright (c) 1998 - 2023, Adam Young. + * Copyright (c) 1998 - 2024, Adam Young. * All rights reserved. * * This file is part of the Midnight Commander. diff --git a/mcwin32/libw32/sys/vfs.h b/mcwin32/libw32/sys/vfs.h index 78178532..dfbb0649 100644 --- a/mcwin32/libw32/sys/vfs.h +++ b/mcwin32/libw32/sys/vfs.h @@ -1,12 +1,12 @@ #ifndef LIBW32_SYS_VFS_H #define LIBW32_SYS_VFS_H #include -__CIDENT_RCSID(gr_libw32_sys_vfs_h,"$Id: vfs.h,v 1.5 2023/11/06 15:06:07 cvsuser Exp $") +__CIDENT_RCSID(gr_libw32_sys_vfs_h,"$Id: vfs.h,v 1.6 2024/01/16 15:17:52 cvsuser Exp $") __CPRAGMA_ONCE /* -*- mode: c; indent-width: 4; -*- */ /* - * Copyright (c) 2012 - 2023, Adam Young. + * Copyright (c) 2012 - 2024, Adam Young. * All rights reserved. * * This file is part of the Midnight Commander. diff --git a/mcwin32/libw32/sys/wait.h b/mcwin32/libw32/sys/wait.h index adc4283a..651b1554 100644 --- a/mcwin32/libw32/sys/wait.h +++ b/mcwin32/libw32/sys/wait.h @@ -1,12 +1,12 @@ #ifndef LIBW32_SYS_WAIT_H #define LIBW32_SYS_WAIT_H #include -__CIDENT_RCSID(gr_libw32_sys_wait_h,"$Id: wait.h,v 1.6 2023/11/06 15:06:07 cvsuser Exp $") +__CIDENT_RCSID(gr_libw32_sys_wait_h,"$Id: wait.h,v 1.7 2024/01/16 15:17:52 cvsuser Exp $") __CPRAGMA_ONCE /* -*- mode: c; indent-width: 4; -*- */ /* - * Copyright (c) 2012 - 2023 Adam Young. + * Copyright (c) 2012 - 2024 Adam Young. * All rights reserved. * * This file is part of the Midnight Commander. diff --git a/mcwin32/libw32/termemu_vio.c b/mcwin32/libw32/termemu_vio.c index fab94fb6..12f3b10b 100644 --- a/mcwin32/libw32/termemu_vio.c +++ b/mcwin32/libw32/termemu_vio.c @@ -2,7 +2,7 @@ /* * libtermemu console driver * - * Copyright (c) 2007, 2012 - 2023 Adam Young. + * Copyright (c) 2007, 2012 - 2024 Adam Young. * * This file is part of the Midnight Commander. * @@ -2560,7 +2560,11 @@ consolefontcreate(int height, int width, int weight, int italic, const char *fac const BOOL isTerminal = // special terminal/raster support. (0 == strcmp(facename, "Terminal")); - HFONT hFont = CreateFontA( + wchar_t wfacename[64] = {0}; + for (unsigned i = 0; i < (_countof(wfacename)-1) && facename[i]; ++i) + wfacename[i] = (wchar_t)(facename[i]); + + HFONT hFont = CreateFontW( height, width - // logic (device dependent pixels) height and width. (italic ? 3 : (FW_BOLD == weight ? 1 : 0)), 0, 0, weight, @@ -2576,7 +2580,7 @@ consolefontcreate(int height, int width, int weight, int italic, const char *fac CLIP_DEFAULT_PRECIS, // default clipping behavior. (italic ? PROOF_QUALITY : ANTIALIASED_QUALITY), FIXED_PITCH | FF_MODERN, // DECORATIVE, DONTCARE, MODERN, ROMAN, SCRIPT, SWISS - facename); + wfacename); TRACE_LOG(("Create Font: <%s> %dx%d, Weight:%d, Italic:%d (%p)\n", \ facename, width, height, weight, italic, hFont)) diff --git a/mcwin32/libw32/termemu_vio.h b/mcwin32/libw32/termemu_vio.h index c1e86a50..c8ea4dc9 100644 --- a/mcwin32/libw32/termemu_vio.h +++ b/mcwin32/libw32/termemu_vio.h @@ -1,14 +1,14 @@ #ifndef TERMEMU_VIO_H_INCLUDED #define TERMEMU_VIO_H_INCLUDED #include -__CIDENT_RCSID(termemu_vio_h,"$Id: termemu_vio.h,v 1.9 2024/01/01 15:24:07 cvsuser Exp $") +__CIDENT_RCSID(termemu_vio_h,"$Id: termemu_vio.h,v 1.10 2024/01/16 15:17:51 cvsuser Exp $") __CPRAGMA_ONCE /* -*- mode: c; indent-width: 4; -*- */ /* * libtermemu console driver * - * Copyright (c) 2007, 2012 - 2023 Adam Young. + * Copyright (c) 2007, 2012 - 2024 Adam Young. * * This file is part of the Midnight Commander. * diff --git a/mcwin32/libw32/unicode_cp437.h b/mcwin32/libw32/unicode_cp437.h index 0aabc7b3..21290eb9 100644 --- a/mcwin32/libw32/unicode_cp437.h +++ b/mcwin32/libw32/unicode_cp437.h @@ -1,7 +1,7 @@ #ifndef UNICODE_CP437_H_INCLUDED #define UNICODE_CP437_H_INCLUDED /* -*- mode: c; indent-width: 4; -*- */ -/* $Id: unicode_cp437.h,v 1.2 2018/09/29 02:22:53 cvsuser Exp $ +/* $Id: unicode_cp437.h,v 1.3 2024/02/02 15:18:41 cvsuser Exp $ * * UNICODE to CP437 table */ @@ -196,4 +196,3 @@ unicode_cp437[] = { }; #endif //UNICODE_CP437_H_INCLUDED - diff --git a/mcwin32/libw32/unistd.h b/mcwin32/libw32/unistd.h index c60b74c2..f9eb644b 100644 --- a/mcwin32/libw32/unistd.h +++ b/mcwin32/libw32/unistd.h @@ -1,14 +1,14 @@ #ifndef LIBW32_UNISTD_H_INCLUDED #define LIBW32_UNISTD_H_INCLUDED #include -__CIDENT_RCSID(gr_libw32_unistd_h,"$Id: unistd.h,v 1.41 2024/01/01 16:54:38 cvsuser Exp $") +__CIDENT_RCSID(gr_libw32_unistd_h,"$Id: unistd.h,v 1.44 2024/03/03 15:03:10 cvsuser Exp $") __CPRAGMA_ONCE /* -*- mode: c; indent-width: 4; -*- */ /* * win32 header (_MSC_VER, __WATCOMC__ and __MINGW32__) * - * Copyright (c) 2007, 2012 - 2023 Adam Young. + * Copyright (c) 2007, 2012 - 2024 Adam Young. * * This file is part of the Midnight Commander. * @@ -41,8 +41,8 @@ __CPRAGMA_ONCE #if (_MSC_VER != 1900) /* MSVC 19/2015 */ #if (_MSC_VER < 1910 || _MSC_VER > 1916) /* MSVC 2017: 19.10 .. 16 */ #if (_MSC_VER > 1929) /* MSVC 2019: 19.20 .. 29 */ -#if (_MSC_VER > 1937) /* MSVC 2022: 19.30 .. 37*/ -#error unistd.h: untested MSVC Version (2005 -- 2019.37) +#if (_MSC_VER > 1939) /* MSVC 2022: 19.30 .. 39 */ +#error unistd.h: untested MSVC Version (2005 -- 2022 19.39) //see: https://en.wikipedia.org/wiki/Microsoft_Visual_C%2B%2B #endif //2022 #endif //2019 @@ -632,9 +632,9 @@ LIBW32_API wchar_t * w32_getcwddW (char drive, wchar_t *path, size_t size); LIBW32_API int w32_mkstemp (char *path); LIBW32_API int w32_mkstempA (char *path); LIBW32_API int w32_mkstempW (wchar_t *path); -#if defined(_MSC_VER) -LIBW32_API int mkstemp (char *path); -#endif +//#if defined(_MSC_VER) +//LIBW32_API int mkstemp (char *path); +//#endif LIBW32_API int w32_mkstemps (char *path, int suffixlen); LIBW32_API int w32_mkstempsA (char *path, int suffixlen); diff --git a/mcwin32/libw32/w32_access.c b/mcwin32/libw32/w32_access.c index d5f2f2e2..3f17a9c0 100644 --- a/mcwin32/libw32/w32_access.c +++ b/mcwin32/libw32/w32_access.c @@ -1,11 +1,11 @@ #include -__CIDENT_RCSID(gr_w32_access_c,"$Id: w32_access.c,v 1.4 2023/09/17 13:04:56 cvsuser Exp $") +__CIDENT_RCSID(gr_w32_access_c,"$Id: w32_access.c,v 1.5 2024/01/16 15:17:51 cvsuser Exp $") /* -*- mode: c; indent-width: 4; -*- */ /* * win2 access() system calls * - * Copyright (c) 2021 - 2023 Adam Young. + * Copyright (c) 2021 - 2024 Adam Young. * All rights reserved. * * This file is part of the Midnight Commander. diff --git a/mcwin32/libw32/w32_check.c b/mcwin32/libw32/w32_check.c index 10c1080b..f17db05f 100644 --- a/mcwin32/libw32/w32_check.c +++ b/mcwin32/libw32/w32_check.c @@ -1,12 +1,12 @@ #include -__CIDENT_RCSID(gr_w32_check_c,"$Id: w32_check.c,v 1.13 2023/09/17 13:04:56 cvsuser Exp $") +__CIDENT_RCSID(gr_w32_check_c,"$Id: w32_check.c,v 1.14 2024/01/16 15:17:51 cvsuser Exp $") /* -*- mode: c; indent-width: 4; -*- */ /* * win32 system io functionality * Note: NOT CALLED -- purely a compile time check of the mode namespace * - * Copyright (c) 2007, 2012 - 2023 Adam Young. + * Copyright (c) 2007, 2012 - 2024 Adam Young. * * This file is part of the Midnight Commander. * diff --git a/mcwin32/libw32/w32_child.c b/mcwin32/libw32/w32_child.c index 6500db58..8cbd2b6c 100644 --- a/mcwin32/libw32/w32_child.c +++ b/mcwin32/libw32/w32_child.c @@ -1,11 +1,11 @@ #include -__CIDENT_RCSID(gr_w32_child_c,"$Id: w32_child.c,v 1.20 2023/11/06 15:07:41 cvsuser Exp $") +__CIDENT_RCSID(gr_w32_child_c,"$Id: w32_child.c,v 1.22 2024/03/03 11:29:13 cvsuser Exp $") /* -*- mode: c; indent-width: 4; -*- */ /* * win32 sub-process support * - * Copyright (c) 2007, 2012 - 2023 Adam Young. + * Copyright (c) 2007, 2012 - 2024 Adam Young. * * This file is part of the Midnight Commander. * @@ -68,7 +68,7 @@ typedef struct { int fd; } Redirect_t; -static int cmdis(const char *shell, int slen, const char *cmd); +static int cmdisA(const char *shell, int slen, const char *cmd); static int cmdisW(const wchar_t *shell, int slen, const wchar_t *cmd); static int TOLOWER(wchar_t ch); @@ -556,18 +556,17 @@ w32_iscommandA(const char *shell) { const int slen = (int)strlen(shell); - if (cmdis(shell, slen, "cmd") || - cmdis(shell, slen, "cmd.exe") || - cmdis(shell, slen, "command") || - cmdis(shell, slen, "command.com") || - cmdis(shell, slen, "command.exe")) { + if (cmdisA(shell, slen, "cmd") || + cmdisA(shell, slen, "cmd.exe") || + cmdisA(shell, slen, "command") || + cmdisA(shell, slen, "command.com") || + cmdisA(shell, slen, "command.exe")) { return TRUE; } return FALSE; } - LIBW32_API int w32_iscommandW(const wchar_t *shell) { @@ -585,7 +584,7 @@ w32_iscommandW(const wchar_t *shell) static int -cmdis(const char *shell, int slen, const char *cmd) +cmdisA(const char *shell, int slen, const char *cmd) { const int clen = (int)strlen(cmd); const char *p = shell + slen - clen; @@ -640,6 +639,7 @@ w32_child_execA( return 0; } + assert((NULL != args->cmd && NULL == args->argv) || (NULL == args->cmd && NULL != args->argv)); if (! BuildVectorsA(args, &argblk, &envblk) != 0) { InternalError("BuildVector"); return 0; @@ -671,7 +671,7 @@ w32_child_execA( si.dwFlags |= STARTF_USESHOWWINDOW; /* - * Launch the process that you want to redirect, as lpApplicationName is NULL, search path is: + * Launch the process that you want to redirect, if lpApplicationName is NULL, search path is: * * o The directory from which the application loaded. * o The current directory for the parent process. @@ -680,7 +680,7 @@ w32_child_execA( * o The Windows directory. Use the GetWindowsDirectory function to get the path of this directory. * o The directories that are listed in the PATH environment variable. */ - if (0 == (hProc = ExecChildA(args, NULL, argblk, envblk, &si, &pi))) { + if (0 == (hProc = ExecChildA(args, args->arg0, argblk, envblk, &si, &pi))) { const char *path, *cmd = (args->argv ? args->argv[0] : args->cmd); char *pfin, *buf = NULL; @@ -763,6 +763,7 @@ w32_child_execW( return 0; } + assert((NULL != args->cmd && NULL == args->argv) || (NULL == args->cmd && NULL != args->argv)); if (! BuildVectorsW(args, &argblk, &envblk)) { InternalError("building arg and env"); return 0; @@ -794,7 +795,7 @@ w32_child_execW( si.dwFlags |= STARTF_USESHOWWINDOW; /* - * Launch the process that you want to redirect, as lpApplicationName is NULL, search path is: + * Launch the process that you want to redirect, if lpApplicationName/arg0 is NULL, search path is: * * o The directory from which the application loaded. * o The current directory for the parent process. @@ -803,7 +804,7 @@ w32_child_execW( * o The Windows directory. Use the GetWindowsDirectory function to get the path of this directory. * o The directories that are listed in the PATH environment variable. */ - if (0 == (hProc = ExecChildW(args, NULL, argblk, envblk, &si, &pi))) { + if (0 == (hProc = ExecChildW(args, args->arg0, argblk, envblk, &si, &pi))) { const wchar_t *path, *cmd = (args->argv ? args->argv[0] : args->cmd); wchar_t *pfin, *buf = NULL; @@ -989,10 +990,65 @@ w32_child_wait(HANDLE hProc, int *status, int nowait) } CloseHandle(hProc); // process complete if (status) { - if (0 == (dwStatus & 0xff)) { + if (dwStatus > 0xff) { // treat as signal + switch (dwStatus) { + case STATUS_ACCESS_VIOLATION: // 0xC0000005L + case STATUS_IN_PAGE_ERROR: // 0xC0000006L + case STATUS_INVALID_HANDLE: // 0xC0000008L + case STATUS_INVALID_PARAMETER: // 0xC000000DL + case STATUS_NO_MEMORY: // 0xC0000017L + *status = SIGSEGV; + break; + case STATUS_ILLEGAL_INSTRUCTION: // 0xC000001DL + *status = SIGILL; + break; + case STATUS_NONCONTINUABLE_EXCEPTION: // 0xC0000025L + case STATUS_INVALID_DISPOSITION: // 0xC0000026L + case STATUS_ARRAY_BOUNDS_EXCEEDED: // 0xC000008CL + *status = SIGABRT; + break; + case STATUS_FLOAT_DENORMAL_OPERAND: // 0xC000008DL + case STATUS_FLOAT_DIVIDE_BY_ZERO: // 0xC000008EL + case STATUS_FLOAT_INEXACT_RESULT: // 0xC000008FL + case STATUS_FLOAT_INVALID_OPERATION: // 0xC0000090L + case STATUS_FLOAT_OVERFLOW: // 0xC0000091L + case STATUS_FLOAT_STACK_CHECK: // 0xC0000092L + case STATUS_FLOAT_UNDERFLOW: // 0xC0000093L + *status = SIGFPE; + break; + case STATUS_INTEGER_DIVIDE_BY_ZERO: // 0xC0000094L + case STATUS_INTEGER_OVERFLOW: // 0xC0000095L + *status = SIGFPE; + break; + case STATUS_PRIVILEGED_INSTRUCTION: // 0xC0000096L + *status = SIGILL; + break; + // case STATUS_STACK_OVERFLOW: // 0xC00000FDL + // case STATUS_DLL_NOT_FOUND: // 0xC0000135L + // case STATUS_ORDINAL_NOT_FOUND: // 0xC0000138L + // case STATUS_ENTRYPOINT_NOT_FOUND: // 0xC0000139L + case STATUS_CONTROL_C_EXIT: // 0xC000013AL + *status = SIGBREAK; + break; + // case STATUS_DLL_INIT_FAILED: // 0xC0000142L + case STATUS_FLOAT_MULTIPLE_FAULTS: // 0xC00002B4L + case STATUS_FLOAT_MULTIPLE_TRAPS: // 0xC00002B5L + *status = SIGFPE; + break; + // case STATUS_REG_NAT_CONSUMPTION: // 0xC00002C9L + // case STATUS_HEAP_CORRUPTION: // 0xC0000374L + // case STATUS_STACK_BUFFER_OVERRUN: // 0xC0000409L + // case STATUS_INVALID_CRUNTIME_PARAMETER: // 0xC0000417L + case STATUS_ASSERTION_FAILURE: // 0xC0000420L + *status = SIGABRT; + break; + default: + *status = 0x7f; + break; + } + + } else { // application return value. *status = (int)(dwStatus >> 8); - } else { - *status = (int)(dwStatus & 0xff); } } ret = TRUE; @@ -1036,7 +1092,6 @@ BuildVectorsA(win32_spawn_t *args, char **argblk, char **envblk) } - static char * BuildArgA(const char *cmd, const char **argv) { diff --git a/mcwin32/libw32/w32_chmod.c b/mcwin32/libw32/w32_chmod.c index c1188510..131a595e 100644 --- a/mcwin32/libw32/w32_chmod.c +++ b/mcwin32/libw32/w32_chmod.c @@ -1,11 +1,11 @@ #include -__CIDENT_RCSID(gr_w32_chmod_c,"$Id: w32_chmod.c,v 1.6 2023/09/17 13:04:56 cvsuser Exp $") +__CIDENT_RCSID(gr_w32_chmod_c,"$Id: w32_chmod.c,v 1.7 2024/01/16 15:17:51 cvsuser Exp $") /* -*- mode: c; indent-width: 4; -*- */ /* * win32 chmod() system calls. * - * Copyright (c) 2020 - 2023 Adam Young. + * Copyright (c) 2020 - 2024 Adam Young. * * This file is part of the Midnight Commander. * diff --git a/mcwin32/libw32/w32_chown.c b/mcwin32/libw32/w32_chown.c index 005f5ed7..0365a06a 100644 --- a/mcwin32/libw32/w32_chown.c +++ b/mcwin32/libw32/w32_chown.c @@ -1,11 +1,11 @@ #include -__CIDENT_RCSID(gr_w32_chown_c,"$Id: w32_chown.c,v 1.11 2023/09/17 13:04:56 cvsuser Exp $") +__CIDENT_RCSID(gr_w32_chown_c,"$Id: w32_chown.c,v 1.12 2024/01/16 15:17:51 cvsuser Exp $") /* -*- mode: c; indent-width: 4; -*- */ /* * win32 chown() system calls. * - * Copyright (c) 2007, 2012 - 2023 Adam Young. + * Copyright (c) 2007, 2012 - 2024 Adam Young. * * This file is part of the Midnight Commander. * diff --git a/mcwin32/libw32/w32_close.c b/mcwin32/libw32/w32_close.c index a57746dd..714208ef 100644 --- a/mcwin32/libw32/w32_close.c +++ b/mcwin32/libw32/w32_close.c @@ -1,11 +1,11 @@ #include -__CIDENT_RCSID(gr_w32_close_c,"$Id: w32_close.c,v 1.12 2023/09/17 13:04:57 cvsuser Exp $") +__CIDENT_RCSID(gr_w32_close_c,"$Id: w32_close.c,v 1.13 2024/01/16 15:17:51 cvsuser Exp $") /* -*- mode: c; indent-width: 4; -*- */ /* * win32 close() system calls. * - * Copyright (c) 2007, 2012 - 2023 Adam Young. + * Copyright (c) 2007, 2012 - 2024 Adam Young. * All rights reserved. * * This file is part of the Midnight Commander. diff --git a/mcwin32/libw32/w32_colors256.h b/mcwin32/libw32/w32_colors256.h index e69e9364..faf822ce 100644 --- a/mcwin32/libw32/w32_colors256.h +++ b/mcwin32/libw32/w32_colors256.h @@ -3,7 +3,7 @@ /* * RGB Colors -- win32 slang emulation. * - * Copyright (c) 2015 - 2023, Adam Young. + * Copyright (c) 2015 - 2024, Adam Young. * * This file is part of the Midnight Commander. * diff --git a/mcwin32/libw32/w32_dir.c b/mcwin32/libw32/w32_dir.c index ca357cad..1dc4babb 100644 --- a/mcwin32/libw32/w32_dir.c +++ b/mcwin32/libw32/w32_dir.c @@ -1,5 +1,5 @@ #include -__CIDENT_RCSID(gr_w32_dir_c, "$Id: w32_dir.c,v 1.23 2023/09/17 13:04:57 cvsuser Exp $") +__CIDENT_RCSID(gr_w32_dir_c, "$Id: w32_dir.c,v 1.24 2024/01/16 15:17:51 cvsuser Exp $") /* -*- mode: c; indent-width: 4; -*- */ /* @@ -7,7 +7,7 @@ __CIDENT_RCSID(gr_w32_dir_c, "$Id: w32_dir.c,v 1.23 2023/09/17 13:04:57 cvsuser * * mkdir, rmdir, chdir * - * Copyright (c) 2007, 2012 - 2023 Adam Young. + * Copyright (c) 2007, 2012 - 2024 Adam Young. * All rights reserved. * * This file is part of the Midnight Commander. diff --git a/mcwin32/libw32/w32_dirent.c b/mcwin32/libw32/w32_dirent.c index 6d01b877..8fa87262 100644 --- a/mcwin32/libw32/w32_dirent.c +++ b/mcwin32/libw32/w32_dirent.c @@ -1,5 +1,5 @@ #include -__CIDENT_RCSID(gr_w32_dirent_c,"$Id: w32_dirent.c,v 1.28 2023/12/28 17:30:51 cvsuser Exp $") +__CIDENT_RCSID(gr_w32_dirent_c,"$Id: w32_dirent.c,v 1.29 2024/01/16 15:17:51 cvsuser Exp $") /* -*- mode: c; indent-width: 4; -*- */ /* @@ -7,7 +7,7 @@ __CIDENT_RCSID(gr_w32_dirent_c,"$Id: w32_dirent.c,v 1.28 2023/12/28 17:30:51 cvs * * opendir, closedir, readdir, seekdir, rewindir, telldir * - * Copyright (c) 2007, 2012 - 2023 Adam Young. + * Copyright (c) 2007, 2012 - 2024 Adam Young. * * This file is part of the Midnight Commander. * diff --git a/mcwin32/libw32/w32_direntunc.c b/mcwin32/libw32/w32_direntunc.c index c2ec028d..6a8c8395 100644 --- a/mcwin32/libw32/w32_direntunc.c +++ b/mcwin32/libw32/w32_direntunc.c @@ -1,11 +1,11 @@ #include -__CIDENT_RCSID(gr_w32_direntunc_c,"$Id: w32_direntunc.c,v 1.10 2023/11/06 15:07:41 cvsuser Exp $") +__CIDENT_RCSID(gr_w32_direntunc_c,"$Id: w32_direntunc.c,v 1.12 2024/03/03 11:29:13 cvsuser Exp $") /* -*- mode: c; indent-width: 4; -*- */ /* * win32 unc directory access services ... * - * Copyright (c) 2007, 2012 - 2023 Adam Young. + * Copyright (c) 2007, 2012 - 2024 Adam Young. * * This file is part of the Midnight Commander. * @@ -106,7 +106,7 @@ w32_unc_iterateW(const wchar_t *servername, unc_push_t push, void *data) // build directory .. for (e = 0, ent = buffer; e < entries; ++e, ++ent) { if (STYPE_DISKTREE == ent->shi502_type) { - const WCHAR *filename = ent->shi502_netname; + const wchar_t *filename = ent->shi502_netname; if ('p' == filename[0]) { // prnproc$ or print$ if (0 == wcscmp(filename, L"prnproc$") || diff --git a/mcwin32/libw32/w32_dlfcn.c b/mcwin32/libw32/w32_dlfcn.c index e2359300..ae696698 100644 --- a/mcwin32/libw32/w32_dlfcn.c +++ b/mcwin32/libw32/w32_dlfcn.c @@ -1,5 +1,5 @@ #include -__CIDENT_RCSID(gr_w32_dlfcn_c,"$Id: w32_dlfcn.c,v 1.5 2023/09/17 13:04:57 cvsuser Exp $") +__CIDENT_RCSID(gr_w32_dlfcn_c,"$Id: w32_dlfcn.c,v 1.6 2024/02/04 10:38:35 cvsuser Exp $") /* -*- mode: c; indent-width: 4; -*- */ /* @@ -7,7 +7,7 @@ __CIDENT_RCSID(gr_w32_dlfcn_c,"$Id: w32_dlfcn.c,v 1.5 2023/09/17 13:04:57 cvsuse * * dlopen, dlsym, dlclose and dlerror * - * Copyright (c) 1998 - 2023, Adam Young. + * Copyright (c) 1998 - 2024, Adam Young. * * This file is part of the Midnight Commander. * diff --git a/mcwin32/libw32/w32_domainname.c b/mcwin32/libw32/w32_domainname.c index 34139e29..0bd0cac4 100644 --- a/mcwin32/libw32/w32_domainname.c +++ b/mcwin32/libw32/w32_domainname.c @@ -1,11 +1,11 @@ #include -__CIDENT_RCSID(gr_w32_getdomainname_c,"$Id: w32_domainname.c,v 1.4 2023/09/17 13:04:57 cvsuser Exp $") +__CIDENT_RCSID(gr_w32_getdomainname_c,"$Id: w32_domainname.c,v 1.5 2024/01/16 15:17:51 cvsuser Exp $") /* -*- mode: c; indent-width: 4; -*- */ /* * win32 getdomainname() * - * Copyright (c) 2017 - 2023 Adam Young. + * Copyright (c) 2017 - 2024 Adam Young. * All rights reserved. * * This file is part of the Midnight Commander. diff --git a/mcwin32/libw32/w32_err.c b/mcwin32/libw32/w32_err.c index 948005de..ae40aaed 100644 --- a/mcwin32/libw32/w32_err.c +++ b/mcwin32/libw32/w32_err.c @@ -1,9 +1,9 @@ #include -__CIDENT_RCSID(gr_w32_err_c,"$Id: w32_err.c,v 1.3 2022/06/08 09:51:43 cvsuser Exp $") +__CIDENT_RCSID(gr_w32_err_c,"$Id: w32_err.c,v 1.4 2024/02/25 16:50:07 cvsuser Exp $") -/* +/*- * Copyright (c) 1993 - * The Regents of the University of California. All rights reserved. + * The Regents of the University of California. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -13,7 +13,7 @@ __CIDENT_RCSID(gr_w32_err_c,"$Id: w32_err.c,v 1.3 2022/06/08 09:51:43 cvsuser Ex * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. Neither the name of the University nor the names of its contributors + * 4. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * @@ -40,109 +40,147 @@ __CIDENT_RCSID(gr_w32_err_c,"$Id: w32_err.c,v 1.3 2022/06/08 09:51:43 cvsuser Ex #include #include -static void vwarni(const char *, va_list); -static void vwarnxi(const char *, va_list); +static FILE *err_file; /* file to use for error output */ +static void (*err_exit)(int); -/* ": ", on stderr. */ -static void -vwarnxi(const char *fmt, va_list ap) +/* + * This is declared to take a `void *' so that the caller is not required + * to include first. However, it is really a `FILE *', and the + * manual page documents it as such. + */ +LIBW32_API void +err_set_file(void *fp) { - fprintf(stderr, "%s: ", getprogname()); - if (fmt != NULL) - vfprintf(stderr, fmt, ap); + if (fp) + err_file = fp; + else + err_file = stderr; } -/* ": : \n", on stderr. */ -static void -vwarni(const char *fmt, va_list ap) +LIBW32_API void +err_set_exit(void (*ef)(int)) { - int sverrno; + err_exit = ef; +} - sverrno = errno; - vwarnxi(fmt, ap); - if (fmt != NULL) - fputs(": ", stderr); - fprintf(stderr, "%s\n", w32_strerror(sverrno)); +LIBW32_API void +err(int eval, const char *fmt, ...) +{ + va_list ap; + va_start(ap, fmt); + verrc(eval, errno, fmt, ap); + va_end(ap); } +LIBW32_API void +verr(int eval, const char *fmt, va_list ap) +{ + verrc(eval, errno, fmt, ap); +} LIBW32_API void -err(int eval, const char *fmt, ...) +errc(int eval, int code, const char *fmt, ...) { va_list ap; - va_start(ap, fmt); - vwarni(fmt, ap); + verrc(eval, code, fmt, ap); va_end(ap); - exit(eval); } - LIBW32_API void -verr(int eval, const char *fmt, va_list ap) +verrc(int eval, int code, const char *fmt, va_list ap) { - vwarni(fmt, ap); + if (err_file == 0) + err_set_file((FILE *)0); + fprintf(err_file, "%s: ", getprogname()); + if (fmt != NULL) { + vfprintf(err_file, fmt, ap); + fprintf(err_file, ": "); + } + fprintf(err_file, "%s\n", strerror(code)); + if (err_exit) + err_exit(eval); exit(eval); } - LIBW32_API void errx(int eval, const char *fmt, ...) { va_list ap; - va_start(ap, fmt); - vwarnxi(fmt, ap); + verrx(eval, fmt, ap); va_end(ap); - fputc('\n', stderr); - exit(eval); } - LIBW32_API void verrx(int eval, const char *fmt, va_list ap) { - vwarnxi(fmt, ap); - fputc('\n', stderr); + if (err_file == 0) + err_set_file((FILE *)0); + fprintf(err_file, "%s: ", getprogname()); + if (fmt != NULL) + vfprintf(err_file, fmt, ap); + fprintf(err_file, "\n"); + if (err_exit) + err_exit(eval); exit(eval); } - LIBW32_API void warn(const char *fmt, ...) { va_list ap; - va_start(ap, fmt); - vwarni(fmt, ap); + vwarnc(errno, fmt, ap); va_end(ap); } - LIBW32_API void vwarn(const char *fmt, va_list ap) { - vwarni(fmt, ap); + vwarnc(errno, fmt, ap); +} + +LIBW32_API void +warnc(int code, const char *fmt, ...) +{ + va_list ap; + va_start(ap, fmt); + vwarnc(code, fmt, ap); + va_end(ap); } +LIBW32_API void +vwarnc(int code, const char *fmt, va_list ap) +{ + if (err_file == 0) + err_set_file((FILE *)0); + fprintf(err_file, "%s: ", getprogname()); + if (fmt != NULL) { + vfprintf(err_file, fmt, ap); + fprintf(err_file, ": "); + } + fprintf(err_file, "%s\n", strerror(code)); +} LIBW32_API void warnx(const char *fmt, ...) { va_list ap; - va_start(ap, fmt); - vwarnxi(fmt, ap); + vwarnx(fmt, ap); va_end(ap); - fputc('\n', stderr); } - LIBW32_API void vwarnx(const char *fmt, va_list ap) { - vwarnxi(fmt, ap); - fputc('\n', stderr); + if (err_file == 0) + err_set_file((FILE *)0); + fprintf(err_file, "%s: ", getprogname()); + if (fmt != NULL) + vfprintf(err_file, fmt, ap); + fprintf(err_file, "\n"); } /*end*/ diff --git a/mcwin32/libw32/w32_errno.c b/mcwin32/libw32/w32_errno.c index 16130673..1a2fa22b 100644 --- a/mcwin32/libw32/w32_errno.c +++ b/mcwin32/libw32/w32_errno.c @@ -1,11 +1,11 @@ #include -__CIDENT_RCSID(gr_w32_errno_c,"$Id: w32_errno.c,v 1.14 2023/09/20 16:29:53 cvsuser Exp $") +__CIDENT_RCSID(gr_w32_errno_c,"$Id: w32_errno.c,v 1.15 2024/01/16 15:17:51 cvsuser Exp $") /* -*- mode: c; indent-width: 4; -*- */ /* * win32 errno mapping support * - * Copyright (c) 2007, 2012 - 2023 Adam Young. + * Copyright (c) 2007, 2012 - 2024 Adam Young. * All rights reserved. * * This file is part of the Midnight Commander. diff --git a/mcwin32/libw32/w32_fallocate.c b/mcwin32/libw32/w32_fallocate.c index 97e7f541..843fe5fa 100644 --- a/mcwin32/libw32/w32_fallocate.c +++ b/mcwin32/libw32/w32_fallocate.c @@ -1,11 +1,11 @@ #include -__CIDENT_RCSID(gr_w32_fallocate_c, "$Id: w32_fallocate.c,v 1.6 2023/09/17 13:04:57 cvsuser Exp $") +__CIDENT_RCSID(gr_w32_fallocate_c, "$Id: w32_fallocate.c,v 1.7 2024/01/16 15:17:51 cvsuser Exp $") /* -*- mode: c; indent-width: 4; -*- */ /* * win32 posix_fallocate() system calls * - * Copyright (c) 2018 - 2023 Adam Young. + * Copyright (c) 2018 - 2024 Adam Young. * * This file is part of the Midnight Commander. * diff --git a/mcwin32/libw32/w32_fcntl.c b/mcwin32/libw32/w32_fcntl.c index fc32af46..eee538de 100644 --- a/mcwin32/libw32/w32_fcntl.c +++ b/mcwin32/libw32/w32_fcntl.c @@ -1,11 +1,11 @@ #include -__CIDENT_RCSID(gr_w32_fcntl_c,"$Id: w32_fcntl.c,v 1.11 2023/09/17 13:04:57 cvsuser Exp $") +__CIDENT_RCSID(gr_w32_fcntl_c,"$Id: w32_fcntl.c,v 1.12 2024/01/16 15:17:51 cvsuser Exp $") /* -*- mode: c; indent-width: 4; -*- */ /* * win32 fcntl() system calls * - * Copyright (c) 2007, 2012 - 2023 Adam Young. + * Copyright (c) 2007, 2012 - 2024 Adam Young. * * This file is part of the Midnight Commander. * diff --git a/mcwin32/libw32/w32_flock.c b/mcwin32/libw32/w32_flock.c index ef302dc0..6fda4d24 100644 --- a/mcwin32/libw32/w32_flock.c +++ b/mcwin32/libw32/w32_flock.c @@ -1,11 +1,11 @@ #include -__CIDENT_RCSID(gr_w32_flock_c,"$Id: w32_flock.c,v 1.4 2023/09/17 13:04:57 cvsuser Exp $") +__CIDENT_RCSID(gr_w32_flock_c,"$Id: w32_flock.c,v 1.5 2024/01/16 15:17:51 cvsuser Exp $") /* -*- mode: c; indent-width: 4; -*- */ /* * win32 flockc() system calls * - * Copyright (c) 2020 - 2023, Adam Young. + * Copyright (c) 2020 - 2024, Adam Young. * All rights reserved. * * This file is part of the Midnight Commander. diff --git a/mcwin32/libw32/w32_fsync.c b/mcwin32/libw32/w32_fsync.c index 8332d566..e3be6a5f 100644 --- a/mcwin32/libw32/w32_fsync.c +++ b/mcwin32/libw32/w32_fsync.c @@ -1,11 +1,11 @@ #include -__CIDENT_RCSID(gr_w32_fsync_c,"$Id: w32_fsync.c,v 1.12 2023/09/17 13:04:57 cvsuser Exp $") +__CIDENT_RCSID(gr_w32_fsync_c,"$Id: w32_fsync.c,v 1.13 2024/01/16 15:17:51 cvsuser Exp $") /* -*- mode: c; indent-width: 4; -*- */ /* * win32 fsync() system calls * - * Copyright (c) 2007, 2012 - 2023 Adam Young. + * Copyright (c) 2007, 2012 - 2024 Adam Young. * All rights reserved. * * This file is part of the Midnight Commander. diff --git a/mcwin32/libw32/w32_getcwd.c b/mcwin32/libw32/w32_getcwd.c index ece42928..af096b84 100644 --- a/mcwin32/libw32/w32_getcwd.c +++ b/mcwin32/libw32/w32_getcwd.c @@ -1,11 +1,11 @@ #include -__CIDENT_RCSID(gr_w32_getcwd_c,"$Id: w32_getcwd.c,v 1.25 2023/12/28 17:30:51 cvsuser Exp $") +__CIDENT_RCSID(gr_w32_getcwd_c,"$Id: w32_getcwd.c,v 1.26 2024/01/16 15:17:51 cvsuser Exp $") /* -*- mode: c; indent-width: 4; -*- */ /* * win32 getcwd() implementation * - * Copyright (c) 2007, 2012 - 2023 Adam Young. + * Copyright (c) 2007, 2012 - 2024 Adam Young. * All rights reserved. * * This file is part of the Midnight Commander. diff --git a/mcwin32/libw32/w32_getcwdd.c b/mcwin32/libw32/w32_getcwdd.c index 63d88b70..1df94e12 100644 --- a/mcwin32/libw32/w32_getcwdd.c +++ b/mcwin32/libw32/w32_getcwdd.c @@ -1,11 +1,11 @@ #include -__CIDENT_RCSID(gr_w32_getcwdd_c,"$Id: w32_getcwdd.c,v 1.9 2023/11/06 15:07:42 cvsuser Exp $") +__CIDENT_RCSID(gr_w32_getcwdd_c,"$Id: w32_getcwdd.c,v 1.10 2024/01/16 15:17:51 cvsuser Exp $") /* -*- mode: c; indent-width: 4; -*- */ /* * win32 getcwdd() implementation * - * Copyright (c) 2007, 2012 - 2023 Adam Young. + * Copyright (c) 2007, 2012 - 2024 Adam Young. * * This file is part of the Midnight Commander. * @@ -239,4 +239,4 @@ w32_getcwddW(char drive, wchar_t *path, size_t size) return NULL; } -/*end*/ \ No newline at end of file +/*end*/ diff --git a/mcwin32/libw32/w32_gethostname.c b/mcwin32/libw32/w32_gethostname.c index c92fa7db..673e6cb0 100644 --- a/mcwin32/libw32/w32_gethostname.c +++ b/mcwin32/libw32/w32_gethostname.c @@ -1,11 +1,11 @@ #include -__CIDENT_RCSID(gr_w32_gethostname_c,"$Id: w32_gethostname.c,v 1.13 2023/11/06 15:07:42 cvsuser Exp $") +__CIDENT_RCSID(gr_w32_gethostname_c,"$Id: w32_gethostname.c,v 1.14 2024/02/04 10:38:35 cvsuser Exp $") /* -*- mode: c; indent-width: 4; -*- */ /* * win32 gethostname * - * Copyright (c) 1998 - 2023, Adam Young. + * Copyright (c) 1998 - 2024, Adam Young. * All rights reserved. * * This file is part of the Midnight Commander. diff --git a/mcwin32/libw32/w32_getlocale.c b/mcwin32/libw32/w32_getlocale.c index dfae64c5..d8c93872 100644 --- a/mcwin32/libw32/w32_getlocale.c +++ b/mcwin32/libw32/w32_getlocale.c @@ -1,11 +1,11 @@ #include -__CIDENT_RCSID(gr_w32_getlocale_c,"$Id: w32_getlocale.c,v 1.4 2023/09/17 13:04:57 cvsuser Exp $") +__CIDENT_RCSID(gr_w32_getlocale_c,"$Id: w32_getlocale.c,v 1.5 2024/02/04 10:38:35 cvsuser Exp $") /* -*- mode: c; indent-width: 4; -*- */ /* * win32 getlocale() system calls * - * Copyright (c) 1998 - 2023, Adam Young. + * Copyright (c) 1998 - 2024, Adam Young. * All rights reserved. * * This file is part of the Midnight Commander. diff --git a/mcwin32/libw32/w32_getrlimit.c b/mcwin32/libw32/w32_getrlimit.c index 495fd957..b1fe5443 100644 --- a/mcwin32/libw32/w32_getrlimit.c +++ b/mcwin32/libw32/w32_getrlimit.c @@ -1,11 +1,11 @@ #include -__CIDENT_RCSID(gr_w32_getrlimit_c,"$Id: w32_getrlimit.c,v 1.3 2023/09/17 13:04:57 cvsuser Exp $") +__CIDENT_RCSID(gr_w32_getrlimit_c,"$Id: w32_getrlimit.c,v 1.4 2024/01/16 15:17:51 cvsuser Exp $") /* -*- mode: c; indent-width: 4; -*- */ /* * win32 getrlimit() system calls * - * Copyright (c) 2020 - 2023, Adam Young. + * Copyright (c) 2020 - 2024, Adam Young. * All rights reserved. * * This file is part of the Midnight Commander. diff --git a/mcwin32/libw32/w32_getrusage.c b/mcwin32/libw32/w32_getrusage.c index 0c6c7017..219a47ce 100644 --- a/mcwin32/libw32/w32_getrusage.c +++ b/mcwin32/libw32/w32_getrusage.c @@ -1,11 +1,11 @@ #include -__CIDENT_RCSID(gr_w32_getrusage_c,"$Id: w32_getrusage.c,v 1.5 2023/11/06 15:07:42 cvsuser Exp $") +__CIDENT_RCSID(gr_w32_getrusage_c,"$Id: w32_getrusage.c,v 1.6 2024/01/16 15:17:51 cvsuser Exp $") /* -*- mode: c; indent-width: 4; -*- */ /* * win32 getrusage() system calls * - * Copyright (c) 2020 - 2023, Adam Young. + * Copyright (c) 2020 - 2024, Adam Young. * All rights reserved. * * This file is part of the Midnight Commander. diff --git a/mcwin32/libw32/w32_gistrerror.c b/mcwin32/libw32/w32_gistrerror.c index 0abc297b..c53bbbad 100644 --- a/mcwin32/libw32/w32_gistrerror.c +++ b/mcwin32/libw32/w32_gistrerror.c @@ -1,11 +1,11 @@ #include -__CIDENT_RCSID(gr_w32_gistrerror_c,"$Id: w32_gistrerror.c,v 1.11 2023/09/17 13:04:57 cvsuser Exp $") +__CIDENT_RCSID(gr_w32_gistrerror_c,"$Id: w32_gistrerror.c,v 1.12 2024/01/16 15:17:52 cvsuser Exp $") /* -*- mode: c; indent-width: 4; -*- */ /* * win32 gi_strerror() * - * Copyright (c) 2007, 2012 - 2023 Adam Young. + * Copyright (c) 2007, 2012 - 2024 Adam Young. * All rights reserved. * * This file is part of the Midnight Commander. diff --git a/mcwin32/libw32/w32_grp.c b/mcwin32/libw32/w32_grp.c index b79a3b9f..0fe157f4 100644 --- a/mcwin32/libw32/w32_grp.c +++ b/mcwin32/libw32/w32_grp.c @@ -1,11 +1,11 @@ #include -__CIDENT_RCSID(gr_w32_grp_c, "$Id: w32_grp.c,v 1.17 2023/11/06 15:07:42 cvsuser Exp $") +__CIDENT_RCSID(gr_w32_grp_c, "$Id: w32_grp.c,v 1.18 2024/01/16 15:17:52 cvsuser Exp $") /* -*- mode: c; indent-width: 4; -*- */ /* * win32 pwd() implementation * - * Copyright (c) 2007, 2012 - 2023 Adam Young. + * Copyright (c) 2007, 2012 - 2024 Adam Young. * All rights reserved. * * This file is part of the Midnight Commander. @@ -691,4 +691,4 @@ copy_group(const struct group *grp, struct group *dst, char *buffer, size_t bufs return 0; //success } -/*end*/ \ No newline at end of file +/*end*/ diff --git a/mcwin32/libw32/w32_iconv.c b/mcwin32/libw32/w32_iconv.c index ac10782a..66f7cef5 100644 --- a/mcwin32/libw32/w32_iconv.c +++ b/mcwin32/libw32/w32_iconv.c @@ -1,11 +1,11 @@ #include -__CIDENT_RCSID(gr_w32_iconv_c,"$Id: w32_iconv.c,v 1.10 2023/09/17 13:04:58 cvsuser Exp $") +__CIDENT_RCSID(gr_w32_iconv_c,"$Id: w32_iconv.c,v 1.11 2024/02/04 10:39:25 cvsuser Exp $") /* -*- mode: c; indent-width: 4; -*- */ /* * win32 iconv dynamic loader. * - * Copyright (c) 1998 - 2023, Adam Young. + * Copyright (c) 1998 - 2024, Adam Young. * All rights reserved. * * This file is part of the Midnight Commander. diff --git a/mcwin32/libw32/w32_iconv_native.c b/mcwin32/libw32/w32_iconv_native.c index a8da67d1..2659c2cf 100644 --- a/mcwin32/libw32/w32_iconv_native.c +++ b/mcwin32/libw32/w32_iconv_native.c @@ -1,5 +1,5 @@ #include -__CIDENT_RCSID(gr_w32_iconv_native_c,"$Id: w32_iconv_native.c,v 1.9 2024/01/01 15:25:01 cvsuser Exp $") +__CIDENT_RCSID(gr_w32_iconv_native_c,"$Id: w32_iconv_native.c,v 1.10 2024/02/02 15:18:41 cvsuser Exp $") /* * iconv implementation using Win32 API to convert. @@ -124,7 +124,7 @@ static int iso2022jp_mbtowc(csconv_t *cv, const uchar *buf, int bufsize, ushort static int iso2022jp_wctomb(csconv_t *cv, ushort *wbuf, int wbufsize, uchar *buf, int bufsize); static int iso2022jp_flush(csconv_t *cv, uchar *buf, int bufsize); -static struct { +static const struct { int codepage; const char *name; } codepage_alias[] = { diff --git a/mcwin32/libw32/w32_ino.c b/mcwin32/libw32/w32_ino.c index 97fbd82b..e8313a3f 100644 --- a/mcwin32/libw32/w32_ino.c +++ b/mcwin32/libw32/w32_ino.c @@ -1,11 +1,11 @@ #include -__CIDENT_RCSID(gr_w32_ino_c,"$Id: w32_ino.c,v 1.13 2023/09/17 13:04:58 cvsuser Exp $") +__CIDENT_RCSID(gr_w32_ino_c,"$Id: w32_ino.c,v 1.14 2024/01/16 15:17:52 cvsuser Exp $") /* -*- mode: c; indent-width: 4; -*- */ /* * win32 ino implementation * - * Copyright (c) 2007, 2012 - 2023 Adam Young. + * Copyright (c) 2007, 2012 - 2024 Adam Young. * All rights reserved. * * This file is part of the Midnight Commander. diff --git a/mcwin32/libw32/w32_io.c b/mcwin32/libw32/w32_io.c index 7681ffc2..0e8f498c 100644 --- a/mcwin32/libw32/w32_io.c +++ b/mcwin32/libw32/w32_io.c @@ -1,5 +1,5 @@ #include -__CIDENT_RCSID(gr_w32_io_c, "$Id: w32_io.c,v 1.32 2023/12/28 17:30:52 cvsuser Exp $") +__CIDENT_RCSID(gr_w32_io_c, "$Id: w32_io.c,v 1.33 2024/01/16 15:17:52 cvsuser Exp $") /* -*- mode: c; indent-width: 4; -*- */ /* @@ -7,7 +7,7 @@ __CIDENT_RCSID(gr_w32_io_c, "$Id: w32_io.c,v 1.32 2023/12/28 17:30:52 cvsuser Ex * * stat, lstat, fstat, readlink, symlink, open * - * Copyright (c) 2007, 2012 - 2023 Adam Young. + * Copyright (c) 2007, 2012 - 2024 Adam Young. * All rights reserved. * * This file is part of the Midnight Commander. diff --git a/mcwin32/libw32/w32_itimer.c b/mcwin32/libw32/w32_itimer.c index a0fddd94..3f12b9ba 100644 --- a/mcwin32/libw32/w32_itimer.c +++ b/mcwin32/libw32/w32_itimer.c @@ -1,11 +1,11 @@ #include -__CIDENT_RCSID(gr_w32_itimer_c,"$Id: w32_itimer.c,v 1.6 2023/09/17 13:04:58 cvsuser Exp $") +__CIDENT_RCSID(gr_w32_itimer_c,"$Id: w32_itimer.c,v 1.7 2024/01/16 15:17:52 cvsuser Exp $") /* -*- mode: c; indent-width: 4; -*- */ /* * win32 itimer system calls -- INCOMPLETE, signal interface required. * - * Copyright (c) 2018 - 2023, Adam Young. + * Copyright (c) 2018 - 2024, Adam Young. * All rights reserved. * * This file is part of the Midnight Commander. diff --git a/mcwin32/libw32/w32_langinfo.c b/mcwin32/libw32/w32_langinfo.c index 78248855..7d48193e 100644 --- a/mcwin32/libw32/w32_langinfo.c +++ b/mcwin32/libw32/w32_langinfo.c @@ -1,11 +1,11 @@ #include -__CIDENT_RCSID(gr_w32_langinfo_c,"$Id: w32_langinfo.c,v 1.11 2023/12/28 17:30:52 cvsuser Exp $") +__CIDENT_RCSID(gr_w32_langinfo_c,"$Id: w32_langinfo.c,v 1.12 2024/01/16 15:17:52 cvsuser Exp $") /* -*- mode: c; indent-width: 4; -*- */ /* * win32 langinfo() implementation * - * Copyright (c) 2007, 2012 - 2023 Adam Young. + * Copyright (c) 2007, 2012 - 2024 Adam Young. * * This file is part of the Midnight Commander. * diff --git a/mcwin32/libw32/w32_link.c b/mcwin32/libw32/w32_link.c index 2ce95865..0841e457 100644 --- a/mcwin32/libw32/w32_link.c +++ b/mcwin32/libw32/w32_link.c @@ -1,11 +1,11 @@ #include -__CIDENT_RCSID(gr_w32_link_c, "$Id: w32_link.c,v 1.15 2023/11/06 15:07:42 cvsuser Exp $") +__CIDENT_RCSID(gr_w32_link_c, "$Id: w32_link.c,v 1.16 2024/01/16 15:17:52 cvsuser Exp $") /* -*- mode: c; indent-width: 4; -*- */ /* * win32 link() system calls. * - * Copyright (c) 2007, 2012 - 2023 Adam Young. + * Copyright (c) 2007, 2012 - 2024 Adam Young. * All rights reserved. * * This file is part of the Midnight Commander. diff --git a/mcwin32/libw32/w32_mknod.c b/mcwin32/libw32/w32_mknod.c index 3038b112..ab4b7775 100644 --- a/mcwin32/libw32/w32_mknod.c +++ b/mcwin32/libw32/w32_mknod.c @@ -1,11 +1,11 @@ #include -__CIDENT_RCSID(gr_w32_mknod_c,"$Id: w32_mknod.c,v 1.13 2023/12/28 17:30:52 cvsuser Exp $") +__CIDENT_RCSID(gr_w32_mknod_c,"$Id: w32_mknod.c,v 1.14 2024/01/16 15:17:52 cvsuser Exp $") /* -*- mode: c; indent-width: 4; -*- */ /* * win32 mknod() system calls. * - * Copyright (c) 2007, 2012 - 2023 Adam Young. + * Copyright (c) 2007, 2012 - 2024 Adam Young. * All rights reserved. * * This file is part of the Midnight Commander. diff --git a/mcwin32/libw32/w32_mkstemp.c b/mcwin32/libw32/w32_mkstemp.c index 6c3f1cb4..8412df64 100644 --- a/mcwin32/libw32/w32_mkstemp.c +++ b/mcwin32/libw32/w32_mkstemp.c @@ -1,11 +1,11 @@ #include -__CIDENT_RCSID(gr_w32_mkstemp_c, "$Id: w32_mkstemp.c,v 1.16 2023/12/28 17:30:52 cvsuser Exp $") +__CIDENT_RCSID(gr_w32_mkstemp_c, "$Id: w32_mkstemp.c,v 1.17 2024/01/16 15:17:52 cvsuser Exp $") /* -*- mode: c; indent-width: 4; -*- */ /* * win32 mkstemp() implementation * - * Copyright (c) 2007, 2012 - 2023 Adam Young. + * Copyright (c) 2007, 2012 - 2024 Adam Young. * All rights reserved. * * This file is part of the Midnight Commander. diff --git a/mcwin32/libw32/w32_mmap.c b/mcwin32/libw32/w32_mmap.c index 4423a2b3..caf03ced 100644 --- a/mcwin32/libw32/w32_mmap.c +++ b/mcwin32/libw32/w32_mmap.c @@ -1,11 +1,11 @@ #include -__CIDENT_RCSID(gr_w32_mmap_c,"$Id: w32_mmap.c,v 1.13 2023/12/28 17:30:52 cvsuser Exp $") +__CIDENT_RCSID(gr_w32_mmap_c,"$Id: w32_mmap.c,v 1.14 2024/01/16 15:17:52 cvsuser Exp $") /* -*- mode: c; indent-width: 4; -*- */ /* * win32 mmap() system calls. * - * Copyright (c) 2007, 2012 - 2023 Adam Young. + * Copyright (c) 2007, 2012 - 2024 Adam Young. * All rights reserved. * * This file is part of the Midnight Commander. diff --git a/mcwin32/libw32/w32_neterr.c b/mcwin32/libw32/w32_neterr.c index 281385d1..d99eff4c 100644 --- a/mcwin32/libw32/w32_neterr.c +++ b/mcwin32/libw32/w32_neterr.c @@ -1,11 +1,11 @@ #include -__CIDENT_RCSID(gr_w32_neterr_c,"$Id: w32_neterr.c,v 1.10 2023/12/28 17:30:52 cvsuser Exp $") +__CIDENT_RCSID(gr_w32_neterr_c,"$Id: w32_neterr.c,v 1.11 2024/01/16 15:17:52 cvsuser Exp $") /* -*- mode: c; indent-width: 4; -*- */ /* * win32 network errno mapping support * - * Copyright (c) 2007, 2012 - 2023 Adam Young. + * Copyright (c) 2007, 2012 - 2024 Adam Young. * All rights reserved. * * This file is part of the Midnight Commander. diff --git a/mcwin32/libw32/w32_pipe.c b/mcwin32/libw32/w32_pipe.c index 0935901a..60168950 100644 --- a/mcwin32/libw32/w32_pipe.c +++ b/mcwin32/libw32/w32_pipe.c @@ -1,11 +1,11 @@ #include -__CIDENT_RCSID(gr_w32_pipe_c,"$Id: w32_pipe.c,v 1.2 2023/09/17 13:04:58 cvsuser Exp $") +__CIDENT_RCSID(gr_w32_pipe_c,"$Id: w32_pipe.c,v 1.3 2024/01/16 15:17:52 cvsuser Exp $") /* -*- mode: c; indent-width: 4; -*- */ /* * win32 pipe() system calls, * - * Copyright (c) 2018 - 2023, Adam Young. + * Copyright (c) 2018 - 2024, Adam Young. * All rights reserved. * * This file is part of the Midnight Commander. diff --git a/mcwin32/libw32/w32_poll.c b/mcwin32/libw32/w32_poll.c index 8332fc89..acedf4ea 100644 --- a/mcwin32/libw32/w32_poll.c +++ b/mcwin32/libw32/w32_poll.c @@ -1,11 +1,11 @@ #include -__CIDENT_RCSID(gr_w32_poll_c,"$Id: w32_poll.c,v 1.11 2023/12/28 17:30:52 cvsuser Exp $") +__CIDENT_RCSID(gr_w32_poll_c,"$Id: w32_poll.c,v 1.12 2024/02/04 10:38:35 cvsuser Exp $") /* -*- mode: c; indent-width: 4; -*- */ /* * win32 poll system calls * - * Copyright (c) 1998 - 2023 Adam Young. + * Copyright (c) 1998 - 2024, Adam Young. * All rights reserved. * * This file is part of the Midnight Commander. diff --git a/mcwin32/libw32/w32_popen.c b/mcwin32/libw32/w32_popen.c index 141d6fb6..84ff8cd1 100644 --- a/mcwin32/libw32/w32_popen.c +++ b/mcwin32/libw32/w32_popen.c @@ -1,11 +1,11 @@ #include -__CIDENT_RCSID(gr_w32_popen_c,"$Id: w32_popen.c,v 1.14 2023/12/28 17:30:52 cvsuser Exp $") +__CIDENT_RCSID(gr_w32_popen_c,"$Id: w32_popen.c,v 1.17 2024/03/14 13:52:42 cvsuser Exp $") /* -*- mode: c; indent-width: 4; -*- */ /* * win32 popen implementation * - * Copyright (c) 2007, 2012 - 2023 Adam Young. + * Copyright (c) 2007, 2012 - 2024 Adam Young. * All rights reserved. * * This file is part of the Midnight Commander. @@ -220,15 +220,15 @@ PipeA(const char *cmd, const char *mode) for (++mode; *mode; ++mode) { switch (*mode) { - case 't': //text mode. + case 't': // text mode. if (textOrBinary) goto einvalid; textOrBinary = 't'; break; - case 'b': //binary mode. + case 'b': // binary mode. if (textOrBinary) goto einvalid; textOrBinary = 'b'; break; - case 'e': //ignore, close on exec (linux) + case 'e': // ignore, close on exec (linux) break; default: return NULL; @@ -246,15 +246,45 @@ PipeA(const char *cmd, const char *mode) // detect the type of shell argv[0] = shell; if (w32_iscommand(shell)) { - argv[1] = "/C"; - if (NULL == strstr("2>&1", cmd)) { // redirect stderr to stdout ? */ - argv[2] = cmd; - } else { - argv[2] = cmd2 = WIN32_STRDUP(cmd); - memcpy(strstr("2>&1", cmd2), " ", 4); + // String is processed by examining the first character to verify whether it is an opening quotation mark. + // If the first character is an opening quotation mark, it is stripped along with the closing quotation mark. + // Any text following the closing quotation marks is preserved. + const char *arg = cmd; + size_t len = strlen(arg); + + // redirect stderr to stdout + if (NULL != strstr(arg, "2>&1")) { + if (NULL == (cmd2 = WIN32_STRDUP(arg))) + goto enomem; + for (char *o = strstr(cmd2, "2>&1"), *i = o + 4;; ++i, ++o) { + if (0 == (*o = *i)) // remove 2>&1 + break; + } + len -= 4; + while (len && ' ' == cmd2[len - 1]) { + cmd2[--len] = 0; // trim trailing white-space. + } redirect_error = TRUE; + assert(strlen(cmd2) == len); + arg = cmd2; + } + + // encase within quotes "cmd"\0. + if (strcspn(arg, "\" ") != len) { + if (NULL == cmd2 && NULL == (cmd2 = (char *)malloc(sizeof(char) * (len + 3)))) + goto enomem; // note: size of buffer (len + 4) if cmd2 != NULL + (void) memmove(cmd2 + 1, arg, sizeof(char) * len); + cmd2[0] = '"'; + cmd2[len + 1] = '"'; + cmd2[len + 2] = 0; + assert(strlen(cmd2) == (len + 2)); + arg = cmd2; } + + argv[1] = "/c"; + argv[2] = arg; argv[3] = NULL; + } else { argv[1] = "-i"; argv[2] = cmd; @@ -280,22 +310,30 @@ PipeA(const char *cmd, const char *mode) assert('r' == p->readOrWrite || 'w' == p->readOrWrite); if ('r' == p->readOrWrite) { + const int fd = + _open_osfhandle((OSFHANDLE)out_read, _O_NOINHERIT | ('b' == textOrBinary ? _O_BINARY : _O_TEXT) | _O_RDONLY); + if (-1 == fd) + goto pipe_error; + + out_read = INVALID_HANDLE_VALUE; // fd has ownership if (NULL == (p->file = _fdopen( // readable end of the pipe - _open_osfhandle((OSFHANDLE)out_read, - _O_NOINHERIT | ('b' == textOrBinary ? _O_BINARY : _O_TEXT)), - 'b' == textOrBinary ? "rb" : "rt"))) { + fd, 'b' == textOrBinary ? "rb" : "rt"))) { + _close(fd); goto pipe_error; } - out_read = INVALID_HANDLE_VALUE; } else { + const int fd = + _open_osfhandle((OSFHANDLE)in_write, _O_NOINHERIT | ('b' == textOrBinary ? _O_BINARY : _O_TEXT)); + if (-1 == fd) + goto pipe_error; + + in_write = INVALID_HANDLE_VALUE; // fd has ownership if (NULL == (p->file = _fdopen( // writeable end of the pipe - _open_osfhandle((OSFHANDLE)in_write, - _O_NOINHERIT | ('b' == textOrBinary ? _O_BINARY : _O_TEXT)), - 'b' == textOrBinary ? "wb" : "wt"))) { + fd, 'b' == textOrBinary ? "wb" : "wt"))) { + _close(fd); goto pipe_error; } - in_write = INVALID_HANDLE_VALUE; } setvbuf(p->file, NULL, _IONBF, 0); // non-buffered @@ -339,6 +377,11 @@ PipeA(const char *cmd, const char *mode) errno = EINVAL; return NULL; +enomem: + free(p); + errno = ENOMEM; + return NULL; + #endif /*USE_NATIVE_POPEN*/ } @@ -376,15 +419,15 @@ PipeW(const wchar_t *cmd, const char *mode) for (++mode; *mode; ++mode) { switch (*mode) { - case 't': //text mode. + case 't': // text mode. if (textOrBinary) goto einvalid; textOrBinary = 't'; break; - case 'b': //binary mode. + case 'b': // binary mode. if (textOrBinary) goto einvalid; textOrBinary = 'b'; break; - case 'e': //ignore, close on exec (linux) + case 'e': // ignore, close on exec (linux) break; default: return NULL; @@ -392,25 +435,56 @@ PipeW(const wchar_t *cmd, const char *mode) } if (!textOrBinary) textOrBinary = 'b'; // optional, binary default. - if (NULL == (p = calloc(1, sizeof(*p)))) { + if (NULL == (p = (struct pipe *)calloc(1, sizeof(*p)))) return NULL; - } + p->magic = PIPE_MAGIC; p->readOrWrite = readOrWrite; p->textOrBinary = textOrBinary; // detect the type of shell argv[0] = shell; + if (w32_iscommandW(shell)) { - argv[1] = L"/C"; - if (NULL == wcsstr(L"2>&1", cmd)) { // redirect stderr to stdout ? */ - argv[2] = cmd; - } else { - argv[2] = cmd2 = WIN32_STRDUPW(cmd); - wcsncpy(wcsstr(L"2>&1", cmd2), L" ", 4); + // String is processed by examining the first character to verify whether it is an opening quotation mark. + // If the first character is an opening quotation mark, it is stripped along with the closing quotation mark. + // Any text following the closing quotation marks is preserved. + const wchar_t *arg = cmd; + size_t len = wcslen(arg); + + // redirect stderr to stdout + if (NULL != wcsstr(arg, L"2>&1")) { + if (NULL == (cmd2 = WIN32_STRDUPW(arg))) + goto enomem; + for (wchar_t *o = wcsstr(cmd2, L"2>&1"), *i = o + 4;; ++i, ++o) { + if (0 == (*o = *i)) // remove 2>&1 + break; + } + len -= 4; + while (len && ' ' == cmd2[len - 1]) { + cmd2[--len] = 0; // trim trailing white-space. + } redirect_error = TRUE; + assert(wcslen(cmd2) == len); + arg = cmd2; + } + + // encase within quotes "cmd"\0. + if (wcscspn(arg, L"\" ") != len) { + if (NULL == cmd2 && NULL == (cmd2 = (wchar_t *)malloc(sizeof(wchar_t) * (len + 3)))) + goto enomem; // note: size of buffer (len + 4) if cmd2 != NULL + (void) memmove(cmd2 + 1, arg, sizeof(wchar_t) * len); + cmd2[0] = '"'; + cmd2[len + 1] = '"'; + cmd2[len + 2] = 0; + assert(wcslen(cmd2) == (len + 2)); + arg = cmd2; } + + argv[1] = L"/c"; + argv[2] = arg; argv[3] = NULL; + } else { argv[1] = L"-i"; argv[2] = cmd; @@ -433,22 +507,30 @@ PipeW(const wchar_t *cmd, const char *mode) } if ('r' == p->readOrWrite) { + const int fd = + _open_osfhandle((OSFHANDLE)out_read, _O_NOINHERIT | ('b' == textOrBinary ? _O_BINARY : _O_TEXT) | _O_RDONLY); + if (-1 == fd) + goto pipe_error; + + out_read = INVALID_HANDLE_VALUE; // fd has ownership if (NULL == (p->file = _fdopen( // readable end of the pipe - _open_osfhandle((OSFHANDLE)out_read, - _O_NOINHERIT | ('b' == textOrBinary ? _O_BINARY : _O_TEXT)), - 'b' == textOrBinary ? "rb" : "rt"))) { + fd, 'b' == textOrBinary ? "rb" : "rt"))) { + _close(fd); goto pipe_error; } - out_read = INVALID_HANDLE_VALUE; } else { + const int fd = + _open_osfhandle((OSFHANDLE)in_write, _O_NOINHERIT | ('b' == textOrBinary ? _O_BINARY : _O_TEXT)); + if (-1 == fd) + goto pipe_error; + + in_write = INVALID_HANDLE_VALUE; // fd has ownership if (NULL == (p->file = _fdopen( // writeable end of the pipe - _open_osfhandle((OSFHANDLE)in_write, - _O_NOINHERIT | ('b' == textOrBinary ? _O_BINARY : _O_TEXT)), - 'b' == textOrBinary ? "wb" : "wt"))) { + fd, 'b' == textOrBinary ? "wb" : "wt"))) { + _close(fd); goto pipe_error; } - in_write = INVALID_HANDLE_VALUE; } setvbuf(p->file, NULL, _IONBF, 0); // non-buffered @@ -492,6 +574,11 @@ PipeW(const wchar_t *cmd, const char *mode) errno = EINVAL; return NULL; +enomem: + free(p); + errno = ENOMEM; + return NULL; + #endif /*USE_NATIVE_POPEN*/ } diff --git a/mcwin32/libw32/w32_proctitle.c b/mcwin32/libw32/w32_proctitle.c index 20764a5e..1947067e 100644 --- a/mcwin32/libw32/w32_proctitle.c +++ b/mcwin32/libw32/w32_proctitle.c @@ -1,11 +1,11 @@ #include -__CIDENT_RCSID(gr_w32_proctitle_c,"$Id: w32_proctitle.c,v 1.3 2023/11/06 15:07:42 cvsuser Exp $") +__CIDENT_RCSID(gr_w32_proctitle_c,"$Id: w32_proctitle.c,v 1.4 2024/01/16 15:17:52 cvsuser Exp $") /* -*- mode: c; indent-width: 4; -*- */ /* * win32 setproctitle * - * Copyright (c) 2020 - 2023, Adam Young. + * Copyright (c) 2020 - 2024, Adam Young. * All rights reserved. * * This file is part of the Midnight Commander. diff --git a/mcwin32/libw32/w32_progname.c b/mcwin32/libw32/w32_progname.c index 8e2bb2f7..02ed51ca 100644 --- a/mcwin32/libw32/w32_progname.c +++ b/mcwin32/libw32/w32_progname.c @@ -1,11 +1,11 @@ #include -__CIDENT_RCSID(gr_w32_progname_c,"$Id: w32_progname.c,v 1.10 2023/09/17 13:04:58 cvsuser Exp $") +__CIDENT_RCSID(gr_w32_progname_c,"$Id: w32_progname.c,v 1.11 2024/01/16 15:17:52 cvsuser Exp $") /* -*- mode: c; indent-width: 4; -*- */ /* * win32 set/getprogname * - * Copyright (c) 2016 - 2023, Adam Young. + * Copyright (c) 2016 - 2024, Adam Young. * All rights reserved. * * This file is part of the Midnight Commander. diff --git a/mcwin32/libw32/w32_pwd.c b/mcwin32/libw32/w32_pwd.c index 8fef0576..f0f01bcc 100644 --- a/mcwin32/libw32/w32_pwd.c +++ b/mcwin32/libw32/w32_pwd.c @@ -1,11 +1,11 @@ #include -__CIDENT_RCSID(gr_w32_pwd_c,"$Id: w32_pwd.c,v 1.18 2023/12/28 17:30:52 cvsuser Exp $") +__CIDENT_RCSID(gr_w32_pwd_c,"$Id: w32_pwd.c,v 1.19 2024/01/16 15:17:52 cvsuser Exp $") /* -*- mode: c; indent-width: 4; -*- */ /* * win32 pwd(2) implementation * - * Copyright (c) 2007, 2012 - 2023 Adam Young. + * Copyright (c) 2007, 2012 - 2024 Adam Young. * All rights reserved. * * This file is part of the Midnight Commander. diff --git a/mcwin32/libw32/w32_read.c b/mcwin32/libw32/w32_read.c index 2272db05..60c17361 100644 --- a/mcwin32/libw32/w32_read.c +++ b/mcwin32/libw32/w32_read.c @@ -1,11 +1,11 @@ #include -__CIDENT_RCSID(gr_w32_read_c,"$Id: w32_read.c,v 1.12 2023/12/28 17:30:52 cvsuser Exp $") +__CIDENT_RCSID(gr_w32_read_c,"$Id: w32_read.c,v 1.13 2024/01/16 15:17:52 cvsuser Exp $") /* -*- mode: c; indent-width: 4; -*- */ /* * win32 read() system calls. * - * Copyright (c) 2007, 2012 - 2023 Adam Young. + * Copyright (c) 2007, 2012 - 2024 Adam Young. * All rights reserved. * * This file is part of the Midnight Commander. diff --git a/mcwin32/libw32/w32_readv.c b/mcwin32/libw32/w32_readv.c index 0e7e5f22..bd899372 100644 --- a/mcwin32/libw32/w32_readv.c +++ b/mcwin32/libw32/w32_readv.c @@ -1,11 +1,11 @@ #include -__CIDENT_RCSID(gr_w32_readv_c,"$Id: w32_readv.c,v 1.5 2023/09/17 13:04:58 cvsuser Exp $") +__CIDENT_RCSID(gr_w32_readv_c,"$Id: w32_readv.c,v 1.6 2024/01/16 15:17:52 cvsuser Exp $") /* -*- mode: c; indent-width: 4; -*- */ /* * win32 readv() implementation * - * Copyright (c) 2018 - 2023, Adam Young. + * Copyright (c) 2018 - 2024, Adam Young. * All rights reserved. * * This file is part of the Midnight Commander. diff --git a/mcwin32/libw32/w32_realpath.c b/mcwin32/libw32/w32_realpath.c index ded8c7f6..e4f00eab 100644 --- a/mcwin32/libw32/w32_realpath.c +++ b/mcwin32/libw32/w32_realpath.c @@ -1,5 +1,5 @@ #include -__CIDENT_RCSID(gr_w32_realpath_c, "$Id: w32_realpath.c,v 1.13 2023/12/28 17:30:52 cvsuser Exp $") +__CIDENT_RCSID(gr_w32_realpath_c, "$Id: w32_realpath.c,v 1.14 2024/01/16 15:17:52 cvsuser Exp $") /* -*- mode: c; indent-width: 4; -*- */ /* @@ -7,7 +7,7 @@ __CIDENT_RCSID(gr_w32_realpath_c, "$Id: w32_realpath.c,v 1.13 2023/12/28 17:30:5 * * realpath * - * Copyright (c) 2018 - 2023 Adam Young. + * Copyright (c) 2018 - 2024 Adam Young. * * This file is part of the Midnight Commander. * @@ -389,4 +389,4 @@ w32_realpathW(const wchar_t *path, wchar_t *resolved_path, size_t maxlen) return result; } -/*end*/ \ No newline at end of file +/*end*/ diff --git a/mcwin32/libw32/w32_rename.c b/mcwin32/libw32/w32_rename.c index c10ade40..85cd2dce 100644 --- a/mcwin32/libw32/w32_rename.c +++ b/mcwin32/libw32/w32_rename.c @@ -1,11 +1,11 @@ #include -__CIDENT_RCSID(gr_w32_rename_c,"$Id: w32_rename.c,v 1.6 2023/09/17 13:04:59 cvsuser Exp $") +__CIDENT_RCSID(gr_w32_rename_c,"$Id: w32_rename.c,v 1.7 2024/01/16 15:17:52 cvsuser Exp $") /* -*- mode: c; indent-width: 4; -*- */ /* * win32 rename() system calls. * - * Copyright (c) 2020 - 2023 Adam Young. + * Copyright (c) 2020 - 2024 Adam Young. * All rights reserved. * * This file is part of the Midnight Commander. diff --git a/mcwin32/libw32/w32_reparse.c b/mcwin32/libw32/w32_reparse.c index bd83cb57..1687a29d 100644 --- a/mcwin32/libw32/w32_reparse.c +++ b/mcwin32/libw32/w32_reparse.c @@ -1,11 +1,11 @@ #include -__CIDENT_RCSID(gr_w32_reparse_c,"$Id: w32_reparse.c,v 1.16 2023/11/06 15:07:42 cvsuser Exp $") +__CIDENT_RCSID(gr_w32_reparse_c,"$Id: w32_reparse.c,v 1.17 2024/01/16 15:17:52 cvsuser Exp $") /* -*- mode: c; indent-width: 4; -*- */ /* * win32 directory support services * - * Copyright (c) 2007, 2012 - 2023 Adam Young. + * Copyright (c) 2007, 2012 - 2024 Adam Young. * * This file is part of the Midnight Commander. * diff --git a/mcwin32/libw32/w32_rwlock.c b/mcwin32/libw32/w32_rwlock.c index eb21eb81..f6d03e36 100644 --- a/mcwin32/libw32/w32_rwlock.c +++ b/mcwin32/libw32/w32_rwlock.c @@ -1,11 +1,11 @@ #include -__CIDENT_RCSID(gr_w32_rwlock_c,"$Id: w32_rwlock.c,v 1.8 2023/11/06 15:07:42 cvsuser Exp $") +__CIDENT_RCSID(gr_w32_rwlock_c,"$Id: w32_rwlock.c,v 1.9 2024/02/04 10:38:35 cvsuser Exp $") /* -*- mode: c; indent-width: 4; -*- */ /* * win32 rwlock functionality/emulation * - * Copyright (c) 1998 - 2023, Adam Young. + * Copyright (c) 1998 - 2024, Adam Young. * All rights reserved. * * This file is part of the Midnight Commander. diff --git a/mcwin32/libw32/w32_select.c b/mcwin32/libw32/w32_select.c index d10c3288..37a255cd 100644 --- a/mcwin32/libw32/w32_select.c +++ b/mcwin32/libw32/w32_select.c @@ -1,11 +1,11 @@ #include -__CIDENT_RCSID(gr_w32_select_c,"$Id: w32_select.c,v 1.14 2023/12/28 17:30:52 cvsuser Exp $") +__CIDENT_RCSID(gr_w32_select_c,"$Id: w32_select.c,v 1.15 2024/01/16 15:17:52 cvsuser Exp $") /* -*- mode: c; indent-width: 4; -*- */ /* * Windows 'select' compat interface * - * Copyright (c) 2007, 2012 - 2023 Adam Young. + * Copyright (c) 2007, 2012 - 2024 Adam Young. * All rights reserved. * * This file is part of the Midnight Commander. diff --git a/mcwin32/libw32/w32_setrlimit.c b/mcwin32/libw32/w32_setrlimit.c index d74a250a..2704d8ee 100644 --- a/mcwin32/libw32/w32_setrlimit.c +++ b/mcwin32/libw32/w32_setrlimit.c @@ -1,11 +1,11 @@ #include -__CIDENT_RCSID(gr_w32_setrlimit_c,"$Id: w32_setrlimit.c,v 1.3 2023/11/06 15:07:42 cvsuser Exp $") +__CIDENT_RCSID(gr_w32_setrlimit_c,"$Id: w32_setrlimit.c,v 1.4 2024/01/16 15:17:52 cvsuser Exp $") /* -*- mode: c; indent-width: 4; -*- */ /* * win32 setrlimit() system calls * - * Copyright (c) 2020 - 2023, Adam Young. + * Copyright (c) 2020 - 2024, Adam Young. * All rights reserved. * * This file is part of the Midnight Commander. diff --git a/mcwin32/libw32/w32_shell.c b/mcwin32/libw32/w32_shell.c index 27649e1a..d6a9808c 100644 --- a/mcwin32/libw32/w32_shell.c +++ b/mcwin32/libw32/w32_shell.c @@ -1,11 +1,11 @@ #include -__CIDENT_RCSID(gr_w32_shell_c,"$Id: w32_shell.c,v 1.18 2023/12/28 17:30:52 cvsuser Exp $") +__CIDENT_RCSID(gr_w32_shell_c,"$Id: w32_shell.c,v 1.20 2024/03/03 11:29:13 cvsuser Exp $") /* -*- mode: c; indent-width: 4; -*- */ /* * win32 shell and sub-process support * - * Copyright (c) 2007, 2012 - 2023 Adam Young. + * Copyright (c) 2007, 2012 - 2024 Adam Young. * All rights reserved. * * This file is part of the Midnight Commander. @@ -73,6 +73,9 @@ static const char * OutDirectA(const char *path, int *append); static const wchar_t * OutDirectW(const wchar_t *path, int *append); static void ShellCleanup(void *p); +static int IsAbsPathA(const char *path); +static int IsAbsPathW(const wchar_t *path); + static const wchar_t * ImportArgv(const char **argv); static const wchar_t ** ImportEnvv(const char **envv); @@ -242,6 +245,9 @@ ShellA(const char *shell, const char *cmd, // command or interactive (void)memset(&args, 0, sizeof(args)); + if (IsAbsPathA(shname)) // abs-path + args.arg0 = shname; + if (w32_iscommandA(shname)) { slash = shname - 1; while ((slash = strchr(slash + 1, XSLASHCHAR)) != NULL) { @@ -300,7 +306,7 @@ ShellW(const wchar_t *shell, const wchar_t *cmd, HANDLE hInFile, hOutFile, hErrFile; struct procdata pd = {0}; win32_spawnw_t args = {0}; - const wchar_t *argv[4] = {0}; + const wchar_t *argv[4] = {NULL}; HANDLE hProc = 0; int status = 0; @@ -384,6 +390,9 @@ ShellW(const wchar_t *shell, const wchar_t *cmd, // command or interactive (void)memset(&args, 0, sizeof(args)); + if (IsAbsPathW(shname)) // abs-path + args.arg0 = shname; + if (w32_iscommandW(shname)) { slash = shname - 1; while ((slash = wcschr(slash + 1, XSLASHCHAR)) != NULL) { @@ -409,7 +418,7 @@ ShellW(const wchar_t *shell, const wchar_t *cmd, argv[2] = NULL; } - // create child process + // create child process args.argv = argv; args._dwFlags = 0; @@ -857,6 +866,26 @@ w32_exec(win32_exec_t *args) } +static int +IsAbsPathA(const char *path) +{ + if (path && *path) { + return (ISSLASH(path[0]) || path[1] == ':'); + } + return 0; +} + + +static int +IsAbsPathW(const wchar_t *path) +{ + if (path && *path) { + return (ISSLASH(path[0]) || path[1] == ':'); + } + return 0; +} + + static const wchar_t * ImportArgv(const char **argv) { diff --git a/mcwin32/libw32/w32_signal.c b/mcwin32/libw32/w32_signal.c index b04e5f87..77df3e1f 100644 --- a/mcwin32/libw32/w32_signal.c +++ b/mcwin32/libw32/w32_signal.c @@ -1,11 +1,11 @@ #include -__CIDENT_RCSID(gr_w32_signal_c,"$Id: w32_signal.c,v 1.12 2023/12/28 17:30:52 cvsuser Exp $") +__CIDENT_RCSID(gr_w32_signal_c,"$Id: w32_signal.c,v 1.13 2024/01/16 15:17:52 cvsuser Exp $") /* -*- mode: c; indent-width: 4; -*- */ /* * win32 signal support * - * Copyright (c) 2007, 2012 - 2023 Adam Young. + * Copyright (c) 2007, 2012 - 2024 Adam Young. * All rights reserved. * * This file is part of the Midnight Commander. diff --git a/mcwin32/libw32/w32_slang.c b/mcwin32/libw32/w32_slang.c index 700b8bed..b3e30eb4 100644 --- a/mcwin32/libw32/w32_slang.c +++ b/mcwin32/libw32/w32_slang.c @@ -2,7 +2,7 @@ /* * win32 Slang Screen Management (SLsmg) function emulation. * - * Copyright (c) 2007, 2012 - 2023 Adam Young. + * Copyright (c) 2007, 2012 - 2024 Adam Young. * * This file is part of the Midnight Commander. * diff --git a/mcwin32/libw32/w32_sockbase.c b/mcwin32/libw32/w32_sockbase.c index 7ee09caf..99d61808 100644 --- a/mcwin32/libw32/w32_sockbase.c +++ b/mcwin32/libw32/w32_sockbase.c @@ -1,11 +1,11 @@ #include -__CIDENT_RCSID(gr_w32_sockbase_c,"$Id: w32_sockbase.c,v 1.10 2023/12/28 17:30:52 cvsuser Exp $") +__CIDENT_RCSID(gr_w32_sockbase_c,"$Id: w32_sockbase.c,v 1.11 2024/01/16 15:17:52 cvsuser Exp $") /* * win32 socket () system calls * Base functionality. * - * Copyright (c) 2007, 2012 - 2023 Adam Young. + * Copyright (c) 2007, 2012 - 2024 Adam Young. * * This file is part of the Midnight Commander. * diff --git a/mcwin32/libw32/w32_socket.c b/mcwin32/libw32/w32_socket.c index a62495de..66e961c3 100644 --- a/mcwin32/libw32/w32_socket.c +++ b/mcwin32/libw32/w32_socket.c @@ -1,11 +1,11 @@ #include -__CIDENT_RCSID(gr_w32_socket_c,"$Id: w32_socket.c,v 1.17 2023/09/17 13:04:59 cvsuser Exp $") +__CIDENT_RCSID(gr_w32_socket_c,"$Id: w32_socket.c,v 1.18 2024/01/16 15:17:52 cvsuser Exp $") /* -*- mode: c; indent-width: 4; -*- */ /* * win32 socket () system calls * - * Copyright (c) 2007, 2012 - 2023 Adam Young. + * Copyright (c) 2007, 2012 - 2024 Adam Young. * All rights reserved. * * This file is part of the Midnight Commander. diff --git a/mcwin32/libw32/w32_socket2.c b/mcwin32/libw32/w32_socket2.c index 3eefbfb7..47170848 100644 --- a/mcwin32/libw32/w32_socket2.c +++ b/mcwin32/libw32/w32_socket2.c @@ -1,11 +1,11 @@ #include -__CIDENT_RCSID(gr_w32_socket2_c,"$Id: w32_socket2.c,v 1.13 2023/09/17 13:04:59 cvsuser Exp $") +__CIDENT_RCSID(gr_w32_socket2_c,"$Id: w32_socket2.c,v 1.14 2024/01/16 15:17:52 cvsuser Exp $") /* * win32 socket () system calls * Light weight replacement functions, which maintain the global errno. * - * Copyright (c) 2007, 2012 - 2023 Adam Young. + * Copyright (c) 2007, 2012 - 2024 Adam Young. * * This file is part of the Midnight Commander. * diff --git a/mcwin32/libw32/w32_sockfd.c b/mcwin32/libw32/w32_sockfd.c index 92b90d15..98ab7794 100644 --- a/mcwin32/libw32/w32_sockfd.c +++ b/mcwin32/libw32/w32_sockfd.c @@ -1,10 +1,10 @@ #include -__CIDENT_RCSID(gr_w32_sockfd_c,"$Id: w32_sockfd.c,v 1.12 2023/09/17 13:04:59 cvsuser Exp $") +__CIDENT_RCSID(gr_w32_sockfd_c,"$Id: w32_sockfd.c,v 1.13 2024/01/16 15:17:52 cvsuser Exp $") /* * win32 socket file-descriptor support * - * Copyright (c) 2007, 2012 - 2023 Adam Young. + * Copyright (c) 2007, 2012 - 2024 Adam Young. * * This file is part of the Midnight Commander. * diff --git a/mcwin32/libw32/w32_sockpair.c b/mcwin32/libw32/w32_sockpair.c index fb34a890..44f07b82 100644 --- a/mcwin32/libw32/w32_sockpair.c +++ b/mcwin32/libw32/w32_sockpair.c @@ -1,10 +1,10 @@ #include -__CIDENT_RCSID(gr_w32_sockpair_c,"$Id: w32_sockpair.c,v 1.12 2023/11/06 15:07:42 cvsuser Exp $") +__CIDENT_RCSID(gr_w32_sockpair_c,"$Id: w32_sockpair.c,v 1.13 2024/01/16 15:17:52 cvsuser Exp $") /* * win32 socket file-descriptor support * - * Copyright (c) 2007, 2012 - 2023 Adam Young. + * Copyright (c) 2007, 2012 - 2024 Adam Young. * * This file is part of the Midnight Commander. * diff --git a/mcwin32/libw32/w32_statfs.c b/mcwin32/libw32/w32_statfs.c index e5b5f2af..9b312d6b 100644 --- a/mcwin32/libw32/w32_statfs.c +++ b/mcwin32/libw32/w32_statfs.c @@ -1,11 +1,11 @@ #include -__CIDENT_RCSID(gr_w32_statfs_c,"$Id: w32_statfs.c,v 1.15 2023/12/28 17:30:52 cvsuser Exp $") +__CIDENT_RCSID(gr_w32_statfs_c,"$Id: w32_statfs.c,v 1.16 2024/01/16 15:17:52 cvsuser Exp $") /* -*- mode: c; indent-width: 4; -*- */ /* * win32 statfs()/statvfs() and getmntinfo() system calls. * - * Copyright (c) 2007, 2012 - 2023 Adam Young. + * Copyright (c) 2007, 2012 - 2024 Adam Young. * All rights reserved. * * This file is part of the Midnight Commander. diff --git a/mcwin32/libw32/w32_string.c b/mcwin32/libw32/w32_string.c index 401055c3..3a1013c9 100644 --- a/mcwin32/libw32/w32_string.c +++ b/mcwin32/libw32/w32_string.c @@ -1,11 +1,11 @@ #include -__CIDENT_RCSID(gr_w32_string_c,"$Id: w32_string.c,v 1.11 2023/12/28 17:30:52 cvsuser Exp $") +__CIDENT_RCSID(gr_w32_string_c,"$Id: w32_string.c,v 1.12 2024/01/16 15:17:52 cvsuser Exp $") /* -*- mode: c; indent-width: 4; -*- */ /* * win32 string functionality * - * Copyright (c) 2007, 2012 - 2023 Adam Young. + * Copyright (c) 2007, 2012 - 2024 Adam Young. * All rights reserved. * * This file is part of the Midnight Commander. diff --git a/mcwin32/libw32/w32_sysconf.c b/mcwin32/libw32/w32_sysconf.c index 033bb2ee..5aac0a6e 100644 --- a/mcwin32/libw32/w32_sysconf.c +++ b/mcwin32/libw32/w32_sysconf.c @@ -1,5 +1,5 @@ #include -__CIDENT_RCSID(gr_w32_sysconf_c,"$Id: w32_sysconf.c,v 1.1 2024/01/01 15:25:01 cvsuser Exp $") +__CIDENT_RCSID(gr_w32_sysconf_c,"$Id: w32_sysconf.c,v 1.2 2024/01/16 15:17:52 cvsuser Exp $") /* -*- mode: c; indent-width: 4; -*- */ /* @@ -109,4 +109,4 @@ sysconf(int name) return -1; } -//end \ No newline at end of file +//end diff --git a/mcwin32/libw32/w32_sysdir.c b/mcwin32/libw32/w32_sysdir.c index 87f6c96c..d9cdcc81 100644 --- a/mcwin32/libw32/w32_sysdir.c +++ b/mcwin32/libw32/w32_sysdir.c @@ -1,11 +1,11 @@ #include -__CIDENT_RCSID(gr_w32_sysdir_c,"$Id: w32_sysdir.c,v 1.11 2023/09/17 13:04:59 cvsuser Exp $") +__CIDENT_RCSID(gr_w32_sysdir_c,"$Id: w32_sysdir.c,v 1.12 2024/01/16 15:17:52 cvsuser Exp $") /* -*- mode: c; indent-width: 4; -*- */ /* * win32 interface support * - * Copyright (c) 2007, 2012 - 2023 Adam Young. + * Copyright (c) 2007, 2012 - 2024 Adam Young. * * This file is part of the Midnight Commander. * diff --git a/mcwin32/libw32/w32_time.c b/mcwin32/libw32/w32_time.c index e866b6ac..ff89ecf5 100644 --- a/mcwin32/libw32/w32_time.c +++ b/mcwin32/libw32/w32_time.c @@ -1,11 +1,11 @@ #include -__CIDENT_RCSID(gr_w32_time_c,"$Id: w32_time.c,v 1.16 2023/09/17 13:04:59 cvsuser Exp $") +__CIDENT_RCSID(gr_w32_time_c,"$Id: w32_time.c,v 1.17 2024/01/16 15:17:52 cvsuser Exp $") /* -*- mode: c; indent-width: 4; -*- */ /* * win32 time system calls. * - * Copyright (c) 2007, 2012 - 2023 Adam Young. + * Copyright (c) 2007, 2012 - 2024 Adam Young. * All rights reserved. * * This file is part of the Midnight Commander. diff --git a/mcwin32/libw32/w32_truncate.c b/mcwin32/libw32/w32_truncate.c index cf6e2686..6f34300d 100644 --- a/mcwin32/libw32/w32_truncate.c +++ b/mcwin32/libw32/w32_truncate.c @@ -1,11 +1,11 @@ #include -__CIDENT_RCSID(gr_w32_truncate_c,"$Id: w32_truncate.c,v 1.11 2023/09/17 13:05:00 cvsuser Exp $") +__CIDENT_RCSID(gr_w32_truncate_c,"$Id: w32_truncate.c,v 1.12 2024/01/16 15:17:52 cvsuser Exp $") /* -*- mode: c; indent-width: 4; -*- */ /* * win32 ftruncate()/truncate() system calls. * - * Copyright (c) 2007, 2012 - 2023 Adam Young. + * Copyright (c) 2007, 2012 - 2024 Adam Young. * All rights reserved. * * This file is part of the Midnight Commander. diff --git a/mcwin32/libw32/w32_uname.c b/mcwin32/libw32/w32_uname.c index c7c3423f..b5c1bb97 100644 --- a/mcwin32/libw32/w32_uname.c +++ b/mcwin32/libw32/w32_uname.c @@ -1,11 +1,11 @@ #include -__CIDENT_RCSID(gr_w32_uname_c,"$Id: w32_uname.c,v 1.10 2023/09/17 13:05:00 cvsuser Exp $") +__CIDENT_RCSID(gr_w32_uname_c,"$Id: w32_uname.c,v 1.11 2024/02/04 10:38:35 cvsuser Exp $") /* -*- mode: c; indent-width: 4; -*- */ /* * win32 uname() system calls. * - * Copyright (c) 1998 - 2023, Adam Young. + * Copyright (c) 1998 - 2024, Adam Young. * * This file is part of the Midnight Commander. * diff --git a/mcwin32/libw32/w32_unlink.c b/mcwin32/libw32/w32_unlink.c index db64e603..e188f933 100644 --- a/mcwin32/libw32/w32_unlink.c +++ b/mcwin32/libw32/w32_unlink.c @@ -1,11 +1,11 @@ #include -__CIDENT_RCSID(gr_w32_unlink_c,"$Id: w32_unlink.c,v 1.13 2023/09/17 13:05:00 cvsuser Exp $") +__CIDENT_RCSID(gr_w32_unlink_c,"$Id: w32_unlink.c,v 1.14 2024/01/16 15:17:52 cvsuser Exp $") /* -*- mode: c; indent-width: 4; -*- */ /* * win32 unlink() system call. * - * Copyright (c) 2007, 2012 - 2023 Adam Young. + * Copyright (c) 2007, 2012 - 2024 Adam Young. * All rights reserved. * * This file is part of the Midnight Commander. diff --git a/mcwin32/libw32/w32_user.c b/mcwin32/libw32/w32_user.c index 838cac13..ad7d0fbc 100644 --- a/mcwin32/libw32/w32_user.c +++ b/mcwin32/libw32/w32_user.c @@ -1,11 +1,11 @@ #include -__CIDENT_RCSID(gr_w32_user_c,"$Id: w32_user.c,v 1.19 2023/11/06 15:07:42 cvsuser Exp $") +__CIDENT_RCSID(gr_w32_user_c,"$Id: w32_user.c,v 1.20 2024/01/16 15:17:52 cvsuser Exp $") /* -*- mode: c; indent-width: 4; -*- */ /* * win32 user identification functionality * - * Copyright (c) 2007, 2012 - 2023 Adam Young. + * Copyright (c) 2007, 2012 - 2024 Adam Young. * All rights reserved. * * This file is part of the Midnight Commander. diff --git a/mcwin32/libw32/w32_util.c b/mcwin32/libw32/w32_util.c index f10c8045..df4b298a 100644 --- a/mcwin32/libw32/w32_util.c +++ b/mcwin32/libw32/w32_util.c @@ -1,11 +1,11 @@ #include -__CIDENT_RCSID(gr_w32_util_c,"$Id: w32_util.c,v 1.19 2023/11/06 15:07:42 cvsuser Exp $") +__CIDENT_RCSID(gr_w32_util_c,"$Id: w32_util.c,v 1.20 2024/01/16 15:17:52 cvsuser Exp $") /* -*- mode: c; indent-width: 4; -*- */ /* * win32 util unix functionality. * - * Copyright (c) 2007, 2012 - 2023 Adam Young. + * Copyright (c) 2007, 2012 - 2024 Adam Young. * All rights reserved. * * This file is part of the Midnight Commander. diff --git a/mcwin32/libw32/w32_wdirent.c b/mcwin32/libw32/w32_wdirent.c index 26557ef1..d4a0fab4 100644 --- a/mcwin32/libw32/w32_wdirent.c +++ b/mcwin32/libw32/w32_wdirent.c @@ -1,5 +1,5 @@ #include -__CIDENT_RCSID(gr_w32_wdirent_c,"$Id: w32_wdirent.c,v 1.7 2023/11/06 15:07:43 cvsuser Exp $") +__CIDENT_RCSID(gr_w32_wdirent_c,"$Id: w32_wdirent.c,v 1.8 2024/01/16 15:17:52 cvsuser Exp $") /* -*- mode: c; indent-width: 4; -*- */ /* @@ -7,7 +7,7 @@ __CIDENT_RCSID(gr_w32_wdirent_c,"$Id: w32_wdirent.c,v 1.7 2023/11/06 15:07:43 cv * * _wopendir, _wclosedir, _wreaddir, _wseekdir, _wrewindir, _wtelldir * - * Copyright (c) 2021 - 2023 Adam Young. + * Copyright (c) 2021 - 2024 Adam Young. * * This file is part of the Midnight Commander. * diff --git a/mcwin32/libw32/w32_write.c b/mcwin32/libw32/w32_write.c index 3fbf9550..ba3ade4e 100644 --- a/mcwin32/libw32/w32_write.c +++ b/mcwin32/libw32/w32_write.c @@ -1,11 +1,11 @@ #include -__CIDENT_RCSID(gr_w32_write_c,"$Id: w32_write.c,v 1.15 2023/12/28 17:30:53 cvsuser Exp $") +__CIDENT_RCSID(gr_w32_write_c,"$Id: w32_write.c,v 1.16 2024/01/16 15:17:52 cvsuser Exp $") /* -*- mode: c; indent-width: 4; -*- */ /* * win32 write() system calls. * - * Copyright (c) 2007, 2012 - 2023 Adam Young. + * Copyright (c) 2007, 2012 - 2024 Adam Young. * All rights reserved. * * This file is part of the Midnight Commander. diff --git a/mcwin32/libw32/w32_writev.c b/mcwin32/libw32/w32_writev.c index 9163070e..ddf41d82 100644 --- a/mcwin32/libw32/w32_writev.c +++ b/mcwin32/libw32/w32_writev.c @@ -1,11 +1,11 @@ #include -__CIDENT_RCSID(gr_w32_writev_c,"$Id: w32_writev.c,v 1.5 2023/09/17 13:05:00 cvsuser Exp $") +__CIDENT_RCSID(gr_w32_writev_c,"$Id: w32_writev.c,v 1.6 2024/01/16 15:17:52 cvsuser Exp $") /* -*- mode: c; indent-width: 4; -*- */ /* * win32 writev() system calls, * - * Copyright (c) 2018 - 2023, Adam Young. + * Copyright (c) 2018 - 2024, Adam Young. * All rights reserved. * * This file is part of the Midnight Commander. diff --git a/mcwin32/libw32/w32config.hin b/mcwin32/libw32/w32config.hin index 2bfbb442..605b208c 100644 --- a/mcwin32/libw32/w32config.hin +++ b/mcwin32/libw32/w32config.hin @@ -1,13 +1,13 @@ #ifndef WIN32_CONFIG_H_INCLUDED #define WIN32_CONFIG_H_INCLUDED /* -*- mode: c; set-indent: 4; -*- */ -/* $Id: w32config.hin,v 1.22 2023/10/24 16:48:46 cvsuser Exp $ +/* $Id: w32config.hin,v 1.23 2024/02/03 17:22:14 cvsuser Exp $ * Machine configuration. * * System dependent configuration template, * Windows targets (see makelib.pl for details). * - * Copyright (c) 1998 - 2023, Adam Young. + * Copyright (c) 1998 - 2024, Adam Young. * All rights reserved. * * This file is part of the Midnight Commander. diff --git a/mcwin32/libw32/win32_cdef.h b/mcwin32/libw32/win32_cdef.h index 230b00b4..c4e95b83 100644 --- a/mcwin32/libw32/win32_cdef.h +++ b/mcwin32/libw32/win32_cdef.h @@ -4,7 +4,7 @@ /* * internal definitions * - * Copyright (c) 2016 - 2023 Adam Young. + * Copyright (c) 2016 - 2024 Adam Young. * * This file is part of the Midnight Commander. * diff --git a/mcwin32/libw32/win32_child.h b/mcwin32/libw32/win32_child.h index e4c4c8b9..fc8a5fc8 100644 --- a/mcwin32/libw32/win32_child.h +++ b/mcwin32/libw32/win32_child.h @@ -1,14 +1,14 @@ #ifndef LIBW32_WIN32_CHILD_H_INCLUDED #define LIBW32_WIN32_CHILD_H_INCLUDED #include -__CIDENT_RCSID(gr_libw32_win32_child_h,"$Id: win32_child.h,v 1.13 2023/09/17 13:05:00 cvsuser Exp $") +__CIDENT_RCSID(gr_libw32_win32_child_h,"$Id: win32_child.h,v 1.15 2024/03/03 11:29:14 cvsuser Exp $") __CPRAGMA_ONCE /* -*- mode: c; indent-width: 4; -*- */ /* * child process support * - * Copyright (c) 2007, 2012 - 2023 Adam Young. + * Copyright (c) 2007, 2012 - 2024 Adam Young. * All rights reserved. * * This file is part of the Midnight Commander. @@ -40,7 +40,8 @@ __CPRAGMA_ONCE __BEGIN_DECLS typedef struct win32_spawn { - const char * cmd; + const char * cmd; /* command, or [arg0,]argv */ + const char * arg0; const char ** argv; const char ** envv; const char * dir; @@ -52,7 +53,8 @@ typedef struct win32_spawn { } win32_spawn_t; typedef struct win32_spawnw { - const wchar_t * cmd; + const wchar_t * cmd; /* command, or [arg0,]argv */ + const wchar_t * arg0; const wchar_t ** argv; const wchar_t ** envv; const wchar_t * dir; diff --git a/mcwin32/libw32/win32_direct.h b/mcwin32/libw32/win32_direct.h index 0519eb9f..51688952 100644 --- a/mcwin32/libw32/win32_direct.h +++ b/mcwin32/libw32/win32_direct.h @@ -3,7 +3,7 @@ /* -*- mode: c; indent-width: 4; -*- */ /* - * Copyright (c) 2021 - 2023, Adam Young. + * Copyright (c) 2021 - 2024, Adam Young. * * This file is part of the Midnight Commander. * diff --git a/mcwin32/libw32/win32_errno.h b/mcwin32/libw32/win32_errno.h index ccf2764c..926aa6fe 100644 --- a/mcwin32/libw32/win32_errno.h +++ b/mcwin32/libw32/win32_errno.h @@ -1,14 +1,14 @@ #ifndef LIBW32_WIN32_ERRNO_H_INCLUDED #define LIBW32_WIN32_ERRNO_H_INCLUDED #include -__CIDENT_RCSID(gr_libw32_win32_errno_h,"$Id: win32_errno.h,v 1.12 2023/12/28 17:30:53 cvsuser Exp $") +__CIDENT_RCSID(gr_libw32_win32_errno_h,"$Id: win32_errno.h,v 1.13 2024/01/16 15:17:52 cvsuser Exp $") __CPRAGMA_ONCE /* -*- mode: c; indent-width: 4; -*- */ /* * * - * Copyright (c) 2007, 2012 - 2023 Adam Young. + * Copyright (c) 2007, 2012 - 2024 Adam Young. * * This file is part of the Midnight Commander. * diff --git a/mcwin32/libw32/win32_iconv.h b/mcwin32/libw32/win32_iconv.h index 3bb9dabe..910f03d0 100644 --- a/mcwin32/libw32/win32_iconv.h +++ b/mcwin32/libw32/win32_iconv.h @@ -1,14 +1,14 @@ #ifndef LIBW32_WIN32_ICONV_H_INCLUDED #define LIBW32_WIN32_ICONV_H_INCLUDED #include -__CIDENT_RCSID(gr_libw32_win32_iconv_h,"$Id: win32_iconv.h,v 1.9 2023/09/17 13:05:00 cvsuser Exp $") +__CIDENT_RCSID(gr_libw32_win32_iconv_h,"$Id: win32_iconv.h,v 1.10 2024/01/16 15:17:52 cvsuser Exp $") __CPRAGMA_ONCE /* -*- mode: c; indent-width: 4; -*- */ /* * win32 iconv dynamic loader. * - * Copyright (c) 2007, 2012 - 2023, Adam Young. + * Copyright (c) 2007, 2012 - 2024, Adam Young. * All rights reserved. * * This file is part of the Midnight Commander. diff --git a/mcwin32/libw32/win32_include.h b/mcwin32/libw32/win32_include.h index d6eb28f2..d3baf68e 100644 --- a/mcwin32/libw32/win32_include.h +++ b/mcwin32/libw32/win32_include.h @@ -1,14 +1,14 @@ #ifndef LIBW32_WIN32_INCLUDE_H_INCLUDED #define LIBW32_WIN32_INCLUDE_H_INCLUDED #include -__CIDENT_RCSID(gr_libw32_win32_include_h,"$Id: win32_include.h,v 1.12 2023/09/17 13:05:00 cvsuser Exp $") +__CIDENT_RCSID(gr_libw32_win32_include_h,"$Id: win32_include.h,v 1.13 2024/01/16 15:17:52 cvsuser Exp $") __CPRAGMA_ONCE /* -*- mode: c; indent-width: 4; -*- */ /* * winsock2.h and windows.h include guard * - * Copyright (c) 2007, 2012 - 2023 Adam Young. + * Copyright (c) 2007, 2012 - 2024 Adam Young. * All rights reserved. * * This file is part of the Midnight Commander. diff --git a/mcwin32/libw32/win32_internal.h b/mcwin32/libw32/win32_internal.h index 92fafe3c..5a9c48be 100644 --- a/mcwin32/libw32/win32_internal.h +++ b/mcwin32/libw32/win32_internal.h @@ -1,14 +1,14 @@ #ifndef LIBW32_WIN32_INTERNAL_H_INCLUDED #define LIBW32_WIN32_INTERNAL_H_INCLUDED #include -__CIDENT_RCSID(gr_libw32_win32_internal_h,"$Id: win32_internal.h,v 1.26 2023/11/06 15:07:43 cvsuser Exp $") +__CIDENT_RCSID(gr_libw32_win32_internal_h,"$Id: win32_internal.h,v 1.27 2024/01/16 15:17:52 cvsuser Exp $") __CPRAGMA_ONCE /* -*- mode: c; indent-width: 4; -*- */ /* * internal definitions * - * Copyright (c) 2007, 2012 - 2023 Adam Young. + * Copyright (c) 2007, 2012 - 2024 Adam Young. * All rights reserved. * * This file is part of the Midnight Commander. diff --git a/mcwin32/libw32/win32_io.h b/mcwin32/libw32/win32_io.h index 716154f0..5d8cdfb9 100644 --- a/mcwin32/libw32/win32_io.h +++ b/mcwin32/libw32/win32_io.h @@ -1,14 +1,14 @@ #ifndef LIBW32_WIN32_IO_H_INCLUDED #define LIBW32_WIN32_IO_H_INCLUDED #include -__CIDENT_RCSID(gr_libw32_win32_io_h,"$Id: win32_io.h,v 1.26 2023/11/06 15:07:43 cvsuser Exp $") +__CIDENT_RCSID(gr_libw32_win32_io_h,"$Id: win32_io.h,v 1.27 2024/01/16 15:17:52 cvsuser Exp $") __CPRAGMA_ONCE /* -*- mode: c; indent-width: 4; -*- */ /* * win32 io functionality. * - * Copyright (c) 2007, 2012 - 2023 Adam Young. + * Copyright (c) 2007, 2012 - 2024 Adam Young. * All rights reserved. * * This file is part of the Midnight Commander. diff --git a/mcwin32/libw32/win32_ioctl.h b/mcwin32/libw32/win32_ioctl.h index bf4139ee..d9b010cb 100644 --- a/mcwin32/libw32/win32_ioctl.h +++ b/mcwin32/libw32/win32_ioctl.h @@ -1,14 +1,14 @@ #ifndef LIBW32_WIN32_IOCTL_H_INCLUDED #define LIBW32_WIN32_IOCTL_H_INCLUDED #include -__CIDENT_RCSID(gr_libw32_win32_ioctl_h,"$Id: win32_ioctl.h,v 1.6 2023/09/17 13:05:00 cvsuser Exp $") +__CIDENT_RCSID(gr_libw32_win32_ioctl_h,"$Id: win32_ioctl.h,v 1.7 2024/01/16 15:17:52 cvsuser Exp $") __CPRAGMA_ONCE /* -*- mode: c; indent-width: 4; -*- */ /* * win32 ioctl support. * - * Copyright (c) 2018 - 2023, Adam Young. + * Copyright (c) 2018 - 2024, Adam Young. * All rights reserved. * * This file is part of the Midnight Commander. diff --git a/mcwin32/libw32/win32_misc.h b/mcwin32/libw32/win32_misc.h index 6027e4d5..bb415965 100644 --- a/mcwin32/libw32/win32_misc.h +++ b/mcwin32/libw32/win32_misc.h @@ -1,14 +1,14 @@ #ifndef LIBW32_WIN32_MISC_H_INCLUDED #define LIBW32_WIN32_MISC_H_INCLUDED #include -__CIDENT_RCSID(gr_libw32_win32_misc_h,"$Id: win32_misc.h,v 1.15 2023/11/06 15:07:43 cvsuser Exp $") +__CIDENT_RCSID(gr_libw32_win32_misc_h,"$Id: win32_misc.h,v 1.16 2024/01/16 15:17:52 cvsuser Exp $") __CPRAGMA_ONCE /* -*- mode: c; indent-width: 4; -*- */ /* * win32 public interface * - * Copyright (c) 2007, 2012 - 2023 Adam Young. + * Copyright (c) 2007, 2012 - 2024 Adam Young. * All rights reserved. * * This file is part of the Midnight Commander. diff --git a/mcwin32/libw32/win32_time.h b/mcwin32/libw32/win32_time.h index 770fe247..bc5aa425 100644 --- a/mcwin32/libw32/win32_time.h +++ b/mcwin32/libw32/win32_time.h @@ -1,14 +1,14 @@ #ifndef LIBW32_WIN32_TIME_H_INCLUDED #define LIBW32_WIN32_TIME_H_INCLUDED #include -__CIDENT_RCSID(gr_libw32_win32_time_h,"$Id: win32_time.h,v 1.15 2023/09/17 13:05:00 cvsuser Exp $") +__CIDENT_RCSID(gr_libw32_win32_time_h,"$Id: win32_time.h,v 1.16 2024/02/03 17:22:14 cvsuser Exp $") __CPRAGMA_ONCE /* -*- mode: c; indent-width: 4; -*- */ /* * win32 time functionality. * - * Copyright (c) 1998 - 2023, Adam Young. + * Copyright (c) 1998 - 2024, Adam Young. * All rights reserved. * * This file is part of the Midnight Commander. diff --git a/mcwin32/makelib.in b/mcwin32/makelib.in index 8a4a9780..b90bf9fb 100644 --- a/mcwin32/makelib.in +++ b/mcwin32/makelib.in @@ -1,5 +1,5 @@ #!/usr/bin/perl -# $Id: makelib.in,v 1.14 2023/10/02 12:11:28 cvsuser Exp $ +# $Id: makelib.in,v 1.16 2024/03/03 07:32:03 cvsuser Exp $ # -*- mode: perl; tabs: 8; indent-width: 4; -*- # makelib configuration # @@ -31,7 +31,7 @@ $PACKAGE = 'mc'; $PACKAGE_NAME = 'Midnight Commander WIN32'; -$PACKAGE_VERSION= '4.8.30'; +$PACKAGE_VERSION= '4.8.31'; $PACKAGE_URL = 'https://github.com/adamyg/mcwin32'; @@ -93,6 +93,8 @@ $PACKAGE_FILE = 'package.h'; 'libmagic', 'libintl', 'libglib', + 'src/kbtest', + 'diff', 'autoupdater' ); diff --git a/mcwin32/mc.rc b/mcwin32/mc.rc index b3ff5f03..1b14526d 100644 --- a/mcwin32/mc.rc +++ b/mcwin32/mc.rc @@ -78,7 +78,7 @@ VS_VERSION_INFO VERSIONINFO VALUE "InternalName", "WIN32 Midnight Commander" VALUE "LegalCopyright", - "Copyright (C) 2012 - 2023, Adam Young. All rights reserved. \n" + "Copyright (C) 2012 - 2024, Adam Young. All rights reserved. \n" "Copyright (C) 1994 - 2022, Free Software Foundation, and others. \n" "Copyright (C) 1990, 1993, The Regents of the University of California. \n" "Licensed under GNU General Public License version 3.0. \n" diff --git a/mcwin32/releases/README.txt b/mcwin32/releases/README.txt index 9f7f5c92..03897eb4 100644 --- a/mcwin32/releases/README.txt +++ b/mcwin32/releases/README.txt @@ -8,13 +8,21 @@ the current 4.8.x development stream. Version Latest Build + 4.8.31 230 (mc merge 4.8.31) + + - 4.8.31 (#74) + - mbedtls 3.5.2 (#67) + - AltGr detection (#71, #52) + - mcdiff integration (#70) + - cd/cdpath (#72) + 4.8.30 229 (mc merge 4.8.30) - pcre2 10.42 - mbedtls 3.4.1 - enca 1.19 - file 5.45 - - zlib 1.2.13 + - zlib 1.3 4.8.29 228 (mc merge 4.8.29) diff --git a/mcwin32/releases/mc-inno-setup.iss b/mcwin32/releases/mc-inno-setup.iss index b24cfd20..8203376b 100644 --- a/mcwin32/releases/mc-inno-setup.iss +++ b/mcwin32/releases/mc-inno-setup.iss @@ -1,7 +1,7 @@ ; ; Midnight Commander - Inno Setup ; -; Adam Young, 2012 - 2023 +; Adam Young, 2012 - 2024 ; This file is part of the Midnight Commander. ; ; The Midnight Commander is free software: you can redistribute it @@ -52,7 +52,11 @@ DefaultGroupName=Midnight Commander LicenseFile=..\{#BinDir}\doc\COPYING OutputDir=. +#if defined(BUILD_TOOLNAME) +OutputBaseFilename=mcwin32-build{#BUILD_NUMBER}-{#BUILD_TOOLNAME}-setup +#else OutputBaseFilename=mcwin32-build{#BUILD_NUMBER}-setup +#endif Compression=lzma SolidCompression=yes ChangesEnvironment=true @@ -100,9 +104,11 @@ Source: "..\{#BinDir}\mc.exe"; DestDir: "{app}"; Flags: ignoreversion Source: "..\{#BinDir}\mc.exe"; DestDir: "{app}"; DestName: "mcedit.exe"; Flags: ignoreversion ;;Source: "..\{#BinDir}\mc.map"; DestDir: "{app}"; Flags: ignoreversion Source: "..\{#BinDir}\mcupdater.exe"; DestDir: "{app}"; Flags: ignoreversion +Source: "..\{#BinDir}\mcdiff.exe"; DestDir: "{app}"; Flags: ignoreversion Source: "..\{#BinDir}\busybox.exe"; DestDir: "{app}"; Flags: ignoreversion Source: "..\{#BinDir}\file.exe"; DestDir: "{app}"; Flags: ignoreversion Source: "..\{#BinDir}\enca.exe"; DestDir: "{app}"; Flags: ignoreversion +Source: "..\{#BinDir}\kbtest.exe"; DestDir: "{app}"; Flags: ignoreversion Source: "..\{#BinDir}\*.dll"; DestDir: "{app}"; Flags: ignoreversion Source: "..\{#BinDir}\man2hlp.pl"; DestDir: "{app}"; Flags: ignoreversion Source: "..\{#BinDir}\etc\*"; Excludes: ".created"; DestDir: "{app}\etc"; Flags: ignoreversion recursesubdirs createallsubdirs diff --git a/mcwin32/src/drive.c b/mcwin32/src/drive.c index 363a8869..97c0e06d 100644 --- a/mcwin32/src/drive.c +++ b/mcwin32/src/drive.c @@ -11,7 +11,7 @@ Copyright (C) 2012 The Free Software Foundation, Inc. - Written by: Adam Young 2012 - 2023 + Written by: Adam Young 2012 - 2024 This file is part of the Midnight Commander. diff --git a/mcwin32/src/drive.h b/mcwin32/src/drive.h index 70901a5e..408b9556 100644 --- a/mcwin32/src/drive.h +++ b/mcwin32/src/drive.h @@ -7,7 +7,7 @@ Copyright (C) 2012 The Free Software Foundation, Inc. - Written by: Adam Young 2012 - 2023 + Written by: Adam Young 2012 - 2024 This file is part of the Midnight Commander. diff --git a/mcwin32/src/kbtest/.cvsignore b/mcwin32/src/kbtest/.cvsignore new file mode 100644 index 00000000..4ddeeb27 --- /dev/null +++ b/mcwin32/src/kbtest/.cvsignore @@ -0,0 +1,4 @@ +Makefile +kbbuildinfo.h + + diff --git a/mcwin32/src/kbtest/.gitignore b/mcwin32/src/kbtest/.gitignore new file mode 100644 index 00000000..d35cf458 --- /dev/null +++ b/mcwin32/src/kbtest/.gitignore @@ -0,0 +1,3 @@ +reference/ +kbbuildinfo.h + diff --git a/mcwin32/src/kbtest/KBDGR.xml b/mcwin32/src/kbtest/KBDGR.xml new file mode 100644 index 00000000..2ef344e0 --- /dev/null +++ b/mcwin32/src/kbtest/KBDGR.xml @@ -0,0 +1,516 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/mcwin32/src/kbtest/KBDIT.xml b/mcwin32/src/kbtest/KBDIT.xml new file mode 100644 index 00000000..b2cbbc5f --- /dev/null +++ b/mcwin32/src/kbtest/KBDIT.xml @@ -0,0 +1,431 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/mcwin32/src/kbtest/KBDRU.xml b/mcwin32/src/kbtest/KBDRU.xml new file mode 100644 index 00000000..3ac41191 --- /dev/null +++ b/mcwin32/src/kbtest/KBDRU.xml @@ -0,0 +1,437 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/mcwin32/src/kbtest/KBDUS.xml b/mcwin32/src/kbtest/KBDUS.xml new file mode 100644 index 00000000..e5e4377e --- /dev/null +++ b/mcwin32/src/kbtest/KBDUS.xml @@ -0,0 +1,424 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/mcwin32/src/kbtest/Makefile.in b/mcwin32/src/kbtest/Makefile.in new file mode 100644 index 00000000..7bcc445d --- /dev/null +++ b/mcwin32/src/kbtest/Makefile.in @@ -0,0 +1,225 @@ +# -*- mode: mak; indent-tabs-mode: t; tab-width: 8 -*- +# $Id: Makefile.in,v 1.2 2024/02/27 17:18:08 cvsuser Exp $ +# kbtest +# +# +# + +@SET_MAKE@ +ROOT= @abs_top_builddir@ +top_builddir= @top_builddir@ + +# Configuration + +PACKAGE= "mc" +PKG_NAME= "KBTest" +PKG_VERSION= 1.0.2 + +# File extensions + +E= +O= .o +A= .a +LP= lib + +CLEAN= *.bak *~ *.BAK *.swp *.tmp core *.core a.out +XCLEAN= + +# Compilers, programs + +CC= @CC@ +CXX= @CXX@ +AR= @AR@ +RANLIB= @RANLIB@ +RM= @RM@ +PERL= @PERL@ +LIBTOOL= @LIBTOOL@ +RC= @RC@ + +BUSYBOX= @BUSYBOX@ +ifeq ($(BUSYBOX),busybox) +BUSYBOX= $(shell which busybox 2>/dev/null) +endif + +BUILD_DATE= $(shell $(BUSYBOX) date +'%Y%m%d') +ifneq ($(APPVEYOR_BUILD_NUMBER),) +BUILD_NUMBER= $(APPVEYOR_BUILD_NUMBER) +else ifneq ($(GITHUB_RUN_NUMBER),) +BUILD_NUMBER= $(GITHUB_RUN_NUMBER) +else +BUILD_NUMBER= $(shell $(BUSYBOX) cat ../../BUILDNUMBER) +endif + +# Configuration + +ifeq ("$(BUILD_TYPE)","") #default +BUILD_TYPE= debug +MAKEFLAGS+= BUILD_TYPE=debug +endif +ifneq ("$(BUILD_TYPE)","release") +RTSUFFIX=d +endif + +QUIETOUT:= >/dev/null 2>&1 +ifeq ($(VERBOSE),1) +QUIETOUT:= +else ifeq ($(VERBOSE),0) +else ifeq ($(VERBOSE),) +else +$(error VERBOSE: unexpected value 0 or 1 required, $(VERBOSE) given])) +endif + +# Directories + +D_INC= $(ROOT)/include +D_BIN= $(ROOT)/bin@TOOLCHAINEXT@/$(BUILD_TYPE) +D_LIB= $(ROOT)/lib@TOOLCHAINEXT@/$(BUILD_TYPE) +D_OBJ= $(ROOT)/obj@TOOLCHAINEXT@/$(BUILD_TYPE)/kbtest + +# Common flags + +XFLAGS= +CFLAGS= @CFLAGS@ +CWARN= @CWARN@ $(CWALL) +ifeq ("gcc","@CC@") +#CWARN+= -Wno-shadow -Wno-sign-compare -Wno-type-limits +#CWARN+= -Wno-unused-variable -Wno-unused-parameter +#CWARN+= -Wno-unused-parameter -Wno-unused-function +#CWARN+= -Wno-missing-field-initializers -Wno-implicit-fallthrough +endif +CDEBUG= @CDEBUG@ +CRELEASE= @CRELEASE@ +CXXFLAGS= @CXXFLAGS@ +ifeq ("gcc","@CC@") +CXXFLAGS+= -fpermissive +endif +CXXDEBUG= @CXXDEBUG@ +ifeq ("$(CXXDEBUG)","") +CXXDEBUG= $(CDEBUG) +endif +CXXRELEASE= @CXXRELEASE@ +ifeq ("$(CXXRELEASE)","") +CXXRELEASE= $(CRELEASE) +endif +LDDEBUG= @LDDEBUG@ +LDRELEASE= @LDRELEASE@ + +CINCLUDE= -I$(D_INC) @CINCLUDE@ +CEXTRA= @DEFS@ @LIBCURL_CPPFLAGS@ -DLIBTRE_DLL +ifdef PURIFY +CEXTRA+= -DUSING_PURIFY +endif +ifeq ("win32","@build_os@") +CEXTRA+= -DWIN32 +endif +CDEPFLAGS= $(CEXTRA) $(CINCLUDE) + +ifeq ("$(BUILD_TYPE)","release") +CFLAGS+= $(CRELEASE) $(CWARN) $(CINCLUDE) $(CEXTRA) $(XFLAGS) +CXXFLAGS+= $(CXXRELEASE) $(CXXWARN) $(CINCLUDE) @CXXINCLUDE@ $(CEXTRA) $(XFLAGS) +LDFLAGS= $(LDRELEASE) @LDFLAGS@ +else +CFLAGS+= $(CDEBUG) $(CWARN) $(CINCLUDE) $(CEXTRA) $(XFLAGS) +CXXFLAGS+= $(CXXDEBUG) $(CXXWARN) $(CINCLUDE) @CXXINCLUDE@ $(CEXTRA) $(XFLAGS) +LDFLAGS= $(LDDEBUG) @LDFLAGS@ +endif +LDLIBS= -L$(D_LIB) @LIBS@ @EXTRALIBS@ + +YFLAGS= -d +ARFLAGS= rcv +RMFLAGS= -f +RMDFLAGS= -rf + + +######################################################################################### +# Targets + +KBTESTTSK= $(D_BIN)/kbtest$(E) +KBTESTSRC= . +ifeq ("owc19","@TOOLCHAIN@") +EXPATSRC= ../../autoupdater/expat_legacy +else +EXPATSRC= ../../autoupdater/libappupdater/expat +endif + +VPATH= $(KBTESTSRC) $(EXPATSRC) + +KBTESTOBJS=\ + $(D_OBJ)/kbtest$(O) \ + $(D_OBJ)/kbconsole$(O) \ + $(D_OBJ)/kbcurrent$(O) \ + $(D_OBJ)/kbdefinition$(O) \ + $(D_OBJ)/kbdump$(O) \ + $(D_OBJ)/kblayout$(O) \ + $(D_OBJ)/kbmap$(O) \ + \ + $(D_OBJ)/xmlparse$(O) \ + $(D_OBJ)/xmlrole$(O) \ + $(D_OBJ)/xmltok$(O) + +ifeq (mingw,$(findstring mingw,"@TOOLCHAIN@")) +KBTESTOBJS+= $(D_OBJ)/kbtest_res.o +else +KBTESTOBJS+= $(D_OBJ)/kbtest.res +endif + +OBJS= $(KBTESTOBJS) +LIBS= +DLLS= +TSKS= $(KBTESTTSK) +INSTALLED= + + +######################################################################################### +# Rules + +.PHONY: build release debug +build: buildinfo $(LIBS) $(DLLS) $(TSKS) + +release: + $(MAKE) BUILD_TYPE=release $(filter-out release, $(MAKECMDGOALS)) +debug: + $(MAKE) BUILD_TYPE=debug $(filter-out debug, $(MAKECMDGOALS)) + +$(KBTESTTSK): CEXTRA += -I$(KBTESTSRC) -I$(EXPATSRC) +$(KBTESTTSK): CEXTRA += -DXML_STATIC -DLIBW32_DYNAMIC -DCOMPILED_FROM_DSP +$(KBTESTTSK): MAPFILE=$(basename $@).map +$(KBTESTTSK): $(D_OBJ)/.created $(KBTESTOBJS) + $(LIBTOOL) --mode=link $(CXX) $(LDFLAGS) -o $@ $(KBTESTOBJS) $(LDLIBS) @LDMAPFILE@ + +.PHONY: buildinfo +kbbuildinfo.h: buildinfo +buildinfo: Makefile ../../buildinfo.pl + @echo updating kbbuildinfo.h ... + -@$(PERL) ../..//buildinfo.pl -o kbbuildinfo.h --package="$(PACKAGE)" --name="$(PKG_NAME)" --version="$(PKG_VERSION)" \ + --date="$(BUILD_DATE)" --build="$(BUILD_NUMBER)" --toolchain="@TOOLCHAINEXT@" + +%/.created: + -@mkdir $(@D) + @echo "do not delete, managed directory" > $@ + +clean: + @echo $(BUILD_TYPE) clean + -@$(LIBTOOL) --mode=clean $(RM) $(OBJS) $(DLLS) $(DLLOBJS) $(QUIETOUT) + -@$(RM) $(RMFLAGS) $(BAK) $(TSKS) $(INSTALLED) $(LIBS) $(CLEAN) $(XCLEAN) $(QUIETOUT) + -@$(RM) $(LIBOBJS) $(QUIETOUT) + +$(D_OBJ)/%$(O): %.cpp + $(CC) $(CXXFLAGS) -o $@ -c $< + +$(D_OBJ)/%$(O): %.c + $(CC) $(CFLAGS) -o $@ -c $< + +$(D_OBJ)/%.lo: %.cpp + $(LIBTOOL) --mode=compile $(CC) $(CXXFLAGS) -o $@ -c $< + +$(D_OBJ)/%.lo: %.c + $(LIBTOOL) --mode=compile $(CC) $(CFLAGS) -o $@ -c $< + +$(D_OBJ)/%.res: %.rc + $(RC) -fo $@ $(RCDEFS) $< + +$(D_OBJ)/%_res.o: %.rc + $(RC) -o $@ $(RCDEFS) $< + +#end diff --git a/mcwin32/src/kbtest/VKGuide.png b/mcwin32/src/kbtest/VKGuide.png new file mode 100644 index 00000000..cf3de3b5 Binary files /dev/null and b/mcwin32/src/kbtest/VKGuide.png differ diff --git a/mcwin32/src/kbtest/kbconsole.c b/mcwin32/src/kbtest/kbconsole.c new file mode 100644 index 00000000..45c610b6 --- /dev/null +++ b/mcwin32/src/kbtest/kbconsole.c @@ -0,0 +1,188 @@ +#include +__CIDENT_RCSID(btest_c,"$Id: kbconsole.c,v 1.5 2024/02/28 15:55:21 cvsuser Exp $") + +/* -*- mode: c; indent-width: 4; -*- */ +/* + * console keyboard test application + * + * Copyright (c) 2015 - 2024, Adam Young. + * All rights reserved. + * + * This file is part of the WinXSH project. + * + * The applications are free software: you can redistribute it + * and/or modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation, version 3. + * + * Redistributions of source code must retain the above copyright + * notice, and must be distributed with the license document above. + * + * Redistributions in binary form must reproduce the above copyright + * notice, and must include the license document above in + * the documentation and/or other materials provided with the + * distribution. + * + * This project 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 + * License for more details. + * ==end== + */ + +#include "kbconsole.h" + +#include +#include + +#include "kbutil.h" + +/* + * ConsoleClear --- + * Clear the console. + **/ +void +ConsoleClear(HANDLE console) +{ + COORD coord = {0,0}; + CONSOLE_SCREEN_BUFFER_INFO csbi = {0,0}; + DWORD dwConSize, cCharsWritten; + + GetConsoleScreenBufferInfo(console, &csbi); + dwConSize = csbi.dwSize.X * csbi.dwSize.Y; + FillConsoleOutputCharacterA(console, ' ', dwConSize, coord, &cCharsWritten); + FillConsoleOutputAttribute(console, csbi.wAttributes, dwConSize, coord, &cCharsWritten); + SetConsoleCursorPosition(console, coord); +} + + +/* + * ConsoleClearEOS --- + * Clear to End-Of-Screen. + **/ +void +ConsoleCEOS(HANDLE console) +{ + CONSOLE_SCREEN_BUFFER_INFO csbi = {0,0}; + DWORD dwConSize, cCharsWritten; + + GetConsoleScreenBufferInfo(console, &csbi); + dwConSize = csbi.dwSize.X - csbi.dwCursorPosition.X; // EOL + if (--csbi.dwCursorPosition.Y < csbi.dwSize.Y) dwConSize += (csbi.dwSize.Y - csbi.dwCursorPosition.Y) * csbi.dwSize.Y; // EOS + FillConsoleOutputCharacterA(console, ' ', dwConSize, csbi.dwCursorPosition, &cCharsWritten); + FillConsoleOutputAttribute(console, csbi.wAttributes, dwConSize, csbi.dwCursorPosition, &cCharsWritten); +} + + +/* + * ConsoleClearEOL --- + * Clear to End-Of-Line. + **/ +void +ConsoleCEOL(HANDLE console) +{ + CONSOLE_SCREEN_BUFFER_INFO csbi = {0,0}; + DWORD dwConSize, cCharsWritten; + + GetConsoleScreenBufferInfo(console, &csbi); + dwConSize = csbi.dwSize.X - csbi.dwCursorPosition.X; + FillConsoleOutputCharacterA(console, ' ', dwConSize, csbi.dwCursorPosition, &cCharsWritten); + FillConsoleOutputAttribute(console, csbi.wAttributes, dwConSize, csbi.dwCursorPosition, &cCharsWritten); +} + + +/* + * ConsoleSizeSet --- + * Set the console size. + **/ +int +ConsoleSizeSet(HANDLE console, int width, int height) +{ + if (INVALID_HANDLE_VALUE == console) + return -1; // invalid handle + + if (width < 0 && height < 0) + return TRUE; // done + + COORD coord = {0}; + coord.X = (SHORT)(width); + coord.Y = (SHORT)(height); + if (SetConsoleScreenBufferSize(console, coord) == FALSE) + return 0; // error + + SMALL_RECT rect = {0}; + rect.Bottom = coord.X - 1; + rect.Right = coord.Y - 1; + return (SetConsoleWindowInfo(console, TRUE, &rect) != FALSE); +} + + +/* + * ConsoleHome --- + * Home cursor. + **/ +void +ConsoleHome(HANDLE console) +{ + COORD iHome = {0,0}; + SetConsoleCursorPosition(console, iHome); +} + + +/* + * Console formatted output + **/ + +void +cprinta(const char *fmt, ...) +{ + HANDLE cout = GetStdHandle(STD_OUTPUT_HANDLE); + char *cursor, *nl; + char buffer[1024]; + va_list ap; + int len; + + va_start(ap, fmt); + len = vsnprintf(buffer, _countof(buffer), fmt, ap); + SetConsoleTextAttribute(cout, FOREGROUND_RED | FOREGROUND_GREEN | FOREGROUND_BLUE); + + cursor = buffer; + while ((nl = strchr(cursor, '\n')) != NULL) { + const int part = (nl - cursor) + 1; + WriteConsoleA(cout, cursor, part - 1, NULL, NULL); + ConsoleCEOL(cout); + WriteConsoleA(cout, "\n\r", 2, NULL, NULL); + cursor += part; + len -= part; + } + WriteConsoleA(cout, cursor, len, NULL, NULL); + va_end(ap); +} + + +void +cprintw(const wchar_t *fmt, ...) +{ + HANDLE cout = GetStdHandle(STD_OUTPUT_HANDLE); + wchar_t *cursor, *nl; + wchar_t buffer[1024]; + va_list ap; + int len; + + va_start(ap, fmt); + len = _vsnwprintf(buffer, _countof(buffer), fmt, ap); + SetConsoleTextAttribute(cout, FOREGROUND_RED | FOREGROUND_GREEN | FOREGROUND_BLUE); + + cursor = buffer; + while ((nl = wcschr(cursor, '\n')) != NULL) { + const int part = (nl - cursor) + 1; + WriteConsoleW(cout, cursor, part - 1, NULL, NULL); + ConsoleCEOL(cout); + WriteConsoleA(cout, "\n\r", 2, NULL, NULL); + cursor += part; + len -= part; + } + WriteConsoleW(cout, cursor, len, NULL, NULL); + va_end(ap); +} + +/*end*/ diff --git a/mcwin32/src/kbtest/kbconsole.h b/mcwin32/src/kbtest/kbconsole.h new file mode 100644 index 00000000..3621b374 --- /dev/null +++ b/mcwin32/src/kbtest/kbconsole.h @@ -0,0 +1,55 @@ +#ifndef KBCONSOLE_H_INCLUDED +#define KBCONSOLE_H_INCLUDED +#include +__CIDENT_RCSID(kbconsole_h,"$Id: kbconsole.h,v 1.4 2024/02/28 15:55:21 cvsuser Exp $") +__CPRAGMA_ONCE + +/* -*- mode: c; indent-width: 4; -*- */ +/* + * console keyboard test application + * + * Copyright (c) 2024, Adam Young. + * All rights reserved. + * + * This file is part of the WinXSH project. + * + * The applications are free software: you can redistribute it + * and/or modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation, version 3. + * + * Redistributions of source code must retain the above copyright + * notice, and must be distributed with the license document above. + * + * Redistributions in binary form must reproduce the above copyright + * notice, and must include the license document above in + * the documentation and/or other materials provided with the + * distribution. + * + * This project 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 + * License for more details. + * ==end== + */ + +#ifndef _WIN32_WINNT +#define _WIN32_WINNT 0x0500 +#endif +#ifndef WIN32_LEAN_AND_MEAN +#define WIN32_LEAN_AND_MEAN +#endif +#include + +void ConsoleClear(HANDLE console); +void ConsoleCEOS(HANDLE console); +void ConsoleCEOL(HANDLE console); + +void ConsoleHome(HANDLE console); +int ConsoleSizeSet(HANDLE console, int width, int height); + +void cprinta(const char *fmt, ...); +void cprintw(const wchar_t *fmt, ...); + +#endif //KBCONSOLE_H_INCLUDED + +//end diff --git a/mcwin32/src/kbtest/kbcurrent.c b/mcwin32/src/kbtest/kbcurrent.c new file mode 100644 index 00000000..7785dda0 --- /dev/null +++ b/mcwin32/src/kbtest/kbcurrent.c @@ -0,0 +1,197 @@ +/* -*- mode: c; indent-width: 4; -*- */ +/* + * console keyboard test application + * + * Copyright (c) 2024, Adam Young. + * All rights reserved. + * + * This file is part of the WinXSH project. + * + * The applications are free software: you can redistribute it + * and/or modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation, version 3. + * + * Redistributions of source code must retain the above copyright + * notice, and must be distributed with the license document above. + * + * Redistributions in binary form must reproduce the above copyright + * notice, and must include the license document above in + * the documentation and/or other materials provided with the + * distribution. + * + * This project 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 + * License for more details. + * ==end== + */ + +#ifndef _WIN32_WINNT +#define _WIN32_WINNT 0x0500 +#endif +#ifndef WIN32_LEAN_AND_MEAN +#define WIN32_LEAN_AND_MEAN +#endif +#include + +#include +#include +#include + +#include "kbdefinition.h" +#include "kbutil.h" + +static unsigned VirtualKeys(const HKL hkl, unsigned *vk2sc); + +/* + * Keyboard definition --- + * Derive the current keyboard definition. + **/ +KBDefinition * +KBDefinitionCurrent(void) +{ + static const struct State { + unsigned shift : 1; + unsigned capital : 1; + unsigned control : 1; + unsigned alt : 1; + + } states[] = { // TODO: L/R Shift/Control/Alt + { 0, 0, 0, 0 }, // Normal + { 1, 0, 0, 0 }, // Shift + { 0, 1, 0, 0 }, // Capital + { 1, 1, 0, 0 }, // Shift-Capital + { 0, 0, 1, 0 }, // Control + { 1, 0, 1, 0 }, // Shift-Control + { 0, 0, 1, 1 }, // Control-Alt + { 1, 0, 1, 1 } // Shift-Control-Alt + }; + + const HKL hkl = GetKeyboardLayout(0); + KBDefinition *def; + unsigned vk2sc[512] = { 0 }; + BYTE keyState[256] = { 0 }; + + if (NULL == (def = (KBDefinition *)calloc(sizeof(KBDefinition), 1))) { + return NULL; + } + + VirtualKeys(hkl, vk2sc); + + // ForEach(VK) + for (unsigned idx = 0x01; idx < _countof(vk2sc); ++idx) { + const unsigned sc = vk2sc[ idx ]; + const unsigned vk = idx & 0xff; + PhysicalKey *pk; + + if (0 == sc) // void + continue; + + assert(def->PhysicalKeysCount < _countof(def->PhysicalKeys)); + if (def->PhysicalKeysCount == _countof(def->PhysicalKeys)) { + break; // overflow + } + pk = def->PhysicalKeys + def->PhysicalKeysCount++; + + pk->SC = sc; + pk->VK = vk; + + GetKeyNameTextW(sc << 16, pk->Name, _countof(pk->Name)-1); + if (pk->Name[0] < ' ') // unprintable + pk->Name[0] = 0; + + for (unsigned s = 0; s < _countof(states); ++s) { + const struct State *state = states + s; + wchar_t keys[4]; + + keyState[VK_SHIFT] = (state->shift ? 0x80 : 0); + keyState[VK_CONTROL] = (state->control ? 0x80 : 0); + keyState[VK_MENU] = (state->alt ? 0x80 : 0); + keyState[VK_CAPITAL] = (state->capital ? 0x01 : 0); + + if (1 == ToUnicodeEx(vk, sc, keyState, keys, _countof(keys), 0, hkl)) { + PhysicalResults *results = def->Results + def->ResultsCount++; + + if (pk->Count++ == 0) + pk->Results = results; + assert(pk->Results + (pk->Count - 1) == results); + + if (keys[0] >= ' ') { // printable + results->Text[0] = keys[0]; + } else { + results->TextCodepoints = keys[0]; + } + + if (state->shift) + results->With |= WITH_SHIFT; + if (state->capital) + results->With |= WITH_CAPITAL; + if (state->control) + results->With |= WITH_CONTROL; + if (state->alt) + results->With |= WITH_MENU; + } + } + } + + return def; +} + + +/* + * VirtualKeys --- + * Iterate Scan Code (SC) values and get the valid Virtual Key (VK) values for them. + **/ +static unsigned +VirtualKeys(const HKL hkl, unsigned *vk2sc) +{ + unsigned count = 0; + +//#define VKDUMP +#if defined(VKDUMP) + printf("\n"); + printf(" SC VK\n"); + printf(" ===========================================\n"); +#endif + + // Iterate Scan Code (SC) values and get the valid Virtual Key (VK) values in it. + for (unsigned sc = 0x01; sc <= 0x79; ++sc) { // standard, #01..#79 + unsigned vk = MapVirtualKeyExW(sc, MAPVK_VSC_TO_VK_EX, hkl); + if (vk) { + assert(vk <= 0xff); + if (0 == vk2sc[vk]) { // unique + vk2sc[vk] = sc; + } +#if defined(VKDUMP) + printf("%c%02x %02x - %s\n", (vk2sc[vk] == sc ? ' ' : '*'), + sc, vk, KBVirtualKeyName(vk)); +#endif + ++count; + } + } + + for (unsigned sc = 0xe001; sc <= 0xe079; ++sc) { // enhanced 0xE001..0xE079 + unsigned vk = MapVirtualKeyExW(sc, MAPVK_VSC_TO_VK_EX, hkl); + if (vk) { + assert(vk <= 0xff); + if (0 == vk2sc[vk|0x100]) { // unique + vk2sc[vk|0x100] = sc; + } +#if defined(VKDUMP) + printf("%c%04x %02x - %s\n", (vk2sc[vk|0x100] == sc ? ' ' : '*'), + sc, vk, KBVirtualKeyName(vk)); +#endif + ++count; + } + } + +#if defined(VKDUMP) + printf(" ===========================================\n"); + printf(" Total: %u\n", count); +#endif + + return count; +} + +//end + diff --git a/mcwin32/src/kbtest/kbdefinition.c b/mcwin32/src/kbtest/kbdefinition.c new file mode 100644 index 00000000..0cdedbdc --- /dev/null +++ b/mcwin32/src/kbtest/kbdefinition.c @@ -0,0 +1,467 @@ +/* -*- mode: c; indent-width: 4; -*- */ +/* + * console keyboard test application + * + * Copyright (c) 2024, Adam Young. + * All rights reserved. + * + * This file is part of the WinXSH project. + * + * The applications are free software: you can redistribute it + * and/or modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation, version 3. + * + * Redistributions of source code must retain the above copyright + * notice, and must be distributed with the license document above. + * + * Redistributions in binary form must reproduce the above copyright + * notice, and must include the license document above in + * the documentation and/or other materials provided with the + * distribution. + * + * This project 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 + * License for more details. + * ==end== + */ + +#ifndef _WIN32_WINNT +#define _WIN32_WINNT 0x0500 +#endif +#ifndef WIN32_LEAN_AND_MEAN +#define WIN32_LEAN_AND_MEAN +#endif +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include + +#include "kbdefinition.h" +#include "kbvirtualextra.h" +#include "kbmap.h" +#include "kbutil.h" + +typedef enum Element { + elmNone = 0, + elmKeyboardLayout = 1, + elmPhysicalKeys = 2, + elmPK = 3, + elmResult = 4, + elmDeadKeyTable = 51, + elmDeadKeyTableResult = 52 +} Element; + +typedef struct { + XML_Parser parser; + Element element; + KBDefinition *layout; + FILE *file; + char buffer[8 * 1024]; + char error[256]; + PhysicalKey *current; +} ParserContext; + +static int /*_cdecl*/ PhysicalKeysCompare(const void *a, const void *b); +static void XMLCALL OnStartElement(void *data, const char *name, const char **attrs); +static void XMLCALL OnEndElement(void *data, const char *name); +static void XMLCALL OnTextElement(void *data, const char *s, int len); + + +/* + * Keyboard definition --- + * Load an external keyboard definition. + **/ +KBDefinition * +KBDefinitionLoad(const char *source) +{ + XML_Parser parser = NULL; + ParserContext *ctx = NULL; + KBDefinition *ret = NULL; + + if (NULL == (parser = XML_ParserCreate(NULL))) { + printf("Failed to create XML parser."); + return NULL; + } + + if (NULL == (ctx = (ParserContext *)calloc(sizeof(ParserContext), 1))) { + printf("XML parser error: alloc context\n"); + + } else if (NULL == (ctx->layout = (KBDefinition *)calloc(sizeof(KBDefinition), 1))) { + printf("XML parser error: alloc context\n"); + + } else { + XML_SetElementHandler(parser, OnStartElement, OnEndElement); + XML_SetCharacterDataHandler(parser, OnTextElement); + XML_SetUserData(parser, ctx); + + if (NULL == (ctx->file = fopen(source, "r"))) { + printf("XML parser error: opening source <%s> : %s\n", source, strerror(errno)); + + } else { + int done = XML_TRUE; + + ret = ctx->layout; + ctx->parser = parser; + do { + const int length = (int)fread(ctx->buffer, 1, sizeof(ctx->buffer), ctx->file); + + done = ((length < (int)sizeof(ctx->buffer) && feof(ctx->file)) ? XML_TRUE : XML_FALSE); + if (XML_Parse(parser, ctx->buffer, length, done) == XML_STATUS_ERROR) { + if (ctx->error[0]) { + printf("XML parser error: %s\n", ctx->error); + } else { + const enum XML_Error err = XML_GetErrorCode(parser); + printf("XML parser error: %s (%d)\n", XML_ErrorString(err), (int)err); + } + ret = NULL; + break; + } + } while (!done); + } + } + + XML_ParserFree(parser); + if (NULL == ret) { + free((void *)ctx->layout); + } else { + qsort(ret->PhysicalKeys, ret->PhysicalKeysCount, sizeof(ret->PhysicalKeys[0]), PhysicalKeysCompare); + } + free((void *)ctx); + return ret; +} + + +static int /*__cdecl*/ +PhysicalKeysCompare(const void *a, const void *b) +{ + const PhysicalKey *v1 = (const PhysicalKey *)(a), *v2 = (const PhysicalKey *)(b); + if (v1->VK < v2->VK) + return -1; + if (v1->VK > v2->VK) + return 1; + return 0; +} + + +void +KBDefinitionFree(KBDefinition *layout) +{ + free(layout); +} + + +/////////////////////////////////////////////////////////////////////////////// +// Parser callbacks +// +// Example: https://kbdlayout.info/kbdgr/download/xml +// +// +// +// +// +// +// +// +// : +// +// +// + +static const char tagKeyboardLayout[] = "KeyboardLayout"; +static const char tagPhysicalKeys[] = "PhysicalKeys"; +static const char tagPK[] = "PK"; +static const char tagResult[] = "Result"; +static const char tagDeadKeyTable[] = "DeadKeyTable"; + +static int AttributeBOOL(const char *value); +static unsigned AttributeWITH(const char *value); + +static void +ParserError(ParserContext* ctx, const char *fmt, ...) +{ + va_list ap; + int len; + + va_start(ap, fmt); + len = snprintf(ctx->error, sizeof(ctx->error)-1, "%u: ", (unsigned)XML_GetCurrentLineNumber(ctx->parser)); + vsnprintf(ctx->error + len, (sizeof(ctx->error) - 1) - len, fmt, ap); + XML_StopParser(ctx->parser, XML_FALSE); + va_end(ap); +} + + +static void XMLCALL +OnStartElement(void *data, const char *name, const char **attrs) +{ + ParserContext* ctx = (ParserContext*)(data); + KBDefinition *layout = ctx->layout; + + if (elmDeadKeyTable == ctx->element) { + if (0 == strcmp(name, tagResult)) { + ctx->element = elmDeadKeyTableResult; + return; + } + ParserError(ctx, "<%s/%s> expected", tagDeadKeyTable, tagResult); + + } else if (elmResult == ctx->element) { + if (0 == strcmp(name, tagDeadKeyTable)) { + ctx->element = elmDeadKeyTable; + return; + } + ParserError(ctx, "<%s> expected", tagResult); + + } else if (elmPK == ctx->element) { + if (0 == strcmp(name, tagResult)) { + PhysicalResults *results; + + ctx->element = elmResult; + if (layout->ResultsCount > _countof(layout->Results)) { + ParserError(ctx, "<%s> key element limit of %s exceeded", tagPK, _countof(layout->Results)); + return; + } + + assert((0 == ctx->current->Count && NULL == ctx->current->Results) || (0 != ctx->current->Count && NULL != ctx->current->Results)); + if (0 == ctx->current->Count) { + ctx->current->Results = layout->Results + layout->ResultsCount; + } + results = ctx->current->Results + ctx->current->Count++; + ++layout->ResultsCount; + + for (unsigned i = 0; attrs[i];) { + const char *tag = attrs[i++], *value = attrs[i++]; + + if (0 == strcmp(tag, "Text")) { + MultiByteToWideChar(CP_UTF8, 0, value, -1, results->Text, _countof(results->Text)-1); + + } else if (0 == strcmp(tag, "TextCodepoints")) { + results->TextCodepoints = (wchar_t)strtoul(value, 0, 16); + + } else if (0 == strcmp(tag, "VK")) { + if (results->VK) { + ParserError(ctx, "<%s> duplicate 'VK' value <%s>", tagResult, value); + return; + } + if (0 == (results->VK = KBVirtualKeyValue(value))) { + ParserError(ctx, "<%s> unknown 'VK' value <%s>", tagResult, value); + return; + } + + } else if (0 == strcmp(tag, "With")) { + if (results->With) { + ParserError(ctx, "<%s> duplicate 'With' value <%s>", tagResult, value); + return; + } + if (0 == (results->With = AttributeWITH(value))) { + ParserError(ctx, "<%s> unknown 'With' value <%s>", tagResult, value); + return; + } + + } else { + ParserError(ctx, "<%s> unexpected attribute <%s>", tagResult, tag); + return; + } + } + return; + } + ParserError(ctx, "<%s> expected", tagResult); + + } else if (elmPhysicalKeys == ctx->element) { + if (0 == strcmp(name, tagPK)) { + PhysicalKey *pk; + + ctx->element = elmPK; + + if (layout->PhysicalKeysCount > _countof(layout->PhysicalKeys)) { + ParserError(ctx, "<%s> key element limit of %s exceeded", tagPK, _countof(layout->PhysicalKeys)); + return; + } + pk = ctx->current = layout->PhysicalKeys + layout->PhysicalKeysCount++; + + for (unsigned i = 0; attrs[i];) { + const char *tag = attrs[i++], *value = attrs[i++]; + + if (0 == strcmp(tag, "SC")) { + if (pk->SC) { + ParserError(ctx, "<%s> duplicate 'SC' value <%s>", tagPK, value); + return; + } + pk->SC = (unsigned)strtoul(value, 0, 16); + + } else if (0 == strcmp(tag, "VK")) { + if (pk->VK) { + ParserError(ctx, "<%s> duplicate 'VK' value <%s>", tagPK, value); + return; + } + if (0 == (pk->VK = KBVirtualKeyValue(value))) { + ParserError(ctx, "<%s> unknown 'VK' value <%s>", tagPK, value); + return; + } + + } else if (0 == strcmp(tag, "Name")) { + MultiByteToWideChar(CP_UTF8, 0, value, -1, pk->Name, _countof(pk->Name)-1); + + } else { + ParserError(ctx, "<%s> unexpected attribute <%s>", tagPK, tag); + return; + } + } + return; + } + ParserError(ctx, "<%s> expected", tagPK); + + } else if (elmKeyboardLayout == ctx->element) { + if (0 == strcmp(name, tagPhysicalKeys)) { + ctx->element = elmPhysicalKeys; + return; + } + ParserError(ctx, "<%s> expected", tagPhysicalKeys); + + } else { + if (0 == strcmp(name, tagKeyboardLayout)) { + ctx->element = elmKeyboardLayout; + for (unsigned i = 0; attrs[i];) { + const char *tag = attrs[i++], *value = attrs[i++]; + + if (0 == strcmp(tag, "RightAltIsAltGr")) { + layout->RightAltIsAltGr = AttributeBOOL(value); + } else if (0 == strcmp(tag, "ShiftCancelsCapsLock")) { + layout->ShiftCancelsCapsLock = AttributeBOOL(value); + } else if (0 == strcmp(tag, "ChangesDirectionality")) { + layout->ChangesDirectionality = AttributeBOOL(value); + } else { + ParserError(ctx, "<%s> unexpected attribute <%s>", tagKeyboardLayout, tag); + return; + } + } + return; + } + ParserError(ctx, "<%s> expected", tagKeyboardLayout); + } +} + + +static void XMLCALL +OnEndElement(void *data, const char *name) +{ + ParserContext* ctx = (ParserContext*)(data); + + if (elmDeadKeyTableResult == ctx->element) { + if (0 == strcmp(name, tagResult)) { + ctx->element = elmDeadKeyTable; + return; + } + ParserError(ctx, "<%s> expected", tagResult); + + } else if (elmDeadKeyTable == ctx->element) { + if (0 == strcmp(name, tagDeadKeyTable)) { + ctx->element = elmResult; + return; + } + ParserError(ctx, "<%s> expected", tagDeadKeyTable); + + } else if (elmResult == ctx->element) { + if (0 == strcmp(name, tagResult)) { + ctx->element = elmPK; + return; + } + ParserError(ctx, "<%s> expected", tagResult); + + } else if (elmPK == ctx->element) { + if (0 == strcmp(name, tagPK)) { + ctx->element = elmPhysicalKeys; + return; + } + ParserError(ctx, "<%s> expected", tagPK); + + } else if (elmPhysicalKeys == ctx->element) { + if (0 == strcmp(name, tagPhysicalKeys)) { + ctx->element = elmKeyboardLayout; + return; + } + ParserError(ctx, "<%s> expected", tagPhysicalKeys); + + } else if (elmKeyboardLayout == ctx->element) { + if (0 == strcmp(name, tagKeyboardLayout)) { + ctx->element = elmNone; + return; + } + ParserError(ctx, "<%s> expected", tagKeyboardLayout); + + } else { + ParserError(ctx, "expected token"); + } +} + + +static void XMLCALL +OnTextElement(void *data, const char *s, int len) +{ + ParserContext* ctx = (ParserContext*)(data); + if (NULL == ctx || 0 == len || s == NULL) return; +} + + +static int +AttributeBOOL(const char *value) +{ + if (0 == strcmp(value, "true")) return 1; + if (0 == strcmp(value, "false")) return 0; + return -1; +} + + +static unsigned +AttributeWITH(const char *value) +{ + static const struct mvk { + char name[16]; + unsigned len; + unsigned value; +#define MVK(__v,__c) { #__v, sizeof(#__v)-1, __c } + } mvks[] = { + MVK(VK_SHIFT, WITH_SHIFT), + MVK(VK_CONTROL, WITH_CONTROL), + MVK(VK_CAPITAL, WITH_CAPITAL), + MVK(VK_NUMLOCK, WITH_NUMLOCK), + MVK(VK_MENU, WITH_MENU) + }; + + unsigned ret = 0; + if (value && *value) { + do { + const char *end; + unsigned len = 0; + while (' ' == *value) ++value; // leading whitespace + for (end = value; *end;) { + if (*end == ' ') break; + ++end, ++len; + } + if (len) { + unsigned t_ret = 0; + for (const struct mvk *it = mvks, *itend = it + _countof(mvks); it != itend; ++it) { + if (len == it->len && 0 == strncmp(value, it->name, len)) { + t_ret = it->value; + break; + } + } + if (0 == t_ret) return 0; // unmatched + ret |= t_ret; + } + value = end; + } while (*value); + } + return ret; +} + +//end + diff --git a/mcwin32/src/kbtest/kbdefinition.h b/mcwin32/src/kbtest/kbdefinition.h new file mode 100644 index 00000000..1b456703 --- /dev/null +++ b/mcwin32/src/kbtest/kbdefinition.h @@ -0,0 +1,72 @@ +#ifndef KBDEFINITION_H_INCLUDED +#define KBDEFINITION_H_INCLUDED +#include +__CIDENT_RCSID(kbdefinition_h,"$Id: kbdefinition.h,v 1.5 2024/02/27 17:18:08 cvsuser Exp $") +__CPRAGMA_ONCE + +/* -*- mode: c; indent-width: 4; -*- */ +/* + * console keyboard test application + * + * Copyright (c) 2024, Adam Young. + * All rights reserved. + * + * This file is part of the WinXSH project. + * + * The applications are free software: you can redistribute it + * and/or modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation, version 3. + * + * Redistributions of source code must retain the above copyright + * notice, and must be distributed with the license document above. + * + * Redistributions in binary form must reproduce the above copyright + * notice, and must include the license document above in + * the documentation and/or other materials provided with the + * distribution. + * + * This project 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 + * License for more details. + * ==end== + */ + +typedef struct Result { + unsigned VK; + wchar_t Text[31]; + wchar_t TextCodepoints; +#define WITH_SHIFT (1<<0) +#define WITH_CONTROL (1<<1) +#define WITH_CAPITAL (1<<2) +#define WITH_NUMLOCK (1<<3) +#define WITH_MENU (1<<4) + unsigned With; +} PhysicalResults; + +typedef struct { + unsigned VK; + unsigned SC; + wchar_t Name[31]; + unsigned Count; + PhysicalResults *Results; +} PhysicalKey; + +typedef struct KBDefinition { + int RightAltIsAltGr; + int ShiftCancelsCapsLock; + int ChangesDirectionality; + unsigned PhysicalKeysCount; + unsigned ResultsCount; + PhysicalKey PhysicalKeys[256]; + PhysicalResults Results[245*4]; +} KBDefinition; + +KBDefinition *KBDefinitionCurrent(void); +KBDefinition *KBDefinitionLoad(const char *source); +void KBDefinitionFree(KBDefinition *); + +#endif //KBDEFINITION_H_INCLUDED + +//end + diff --git a/mcwin32/src/kbtest/kbdump.c b/mcwin32/src/kbtest/kbdump.c new file mode 100644 index 00000000..6919b1db --- /dev/null +++ b/mcwin32/src/kbtest/kbdump.c @@ -0,0 +1,119 @@ +#include +__CIDENT_RCSID(kblayout_c, "$Id: kbdump.c,v 1.6 2024/02/28 15:55:21 cvsuser Exp $") + +/* -*- mode: c; indent-width: 4; -*- */ +/* + * console keyboard test application + * + * Copyright (c) 2024, Adam Young. + * All rights reserved. + * + * This file is part of the WinXSH project. + * + * The applications are free software: you can redistribute it + * and/or modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation, version 3. + * + * Redistributions of source code must retain the above copyright + * notice, and must be distributed with the license document above. + * + * Redistributions in binary form must reproduce the above copyright + * notice, and must include the license document above in + * the documentation and/or other materials provided with the + * distribution. + * + * This project 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 + * License for more details. + * ==end== + */ + +#ifndef _WIN32_WINNT +#define _WIN32_WINNT 0x0500 +#endif +#ifndef WIN32_LEAN_AND_MEAN +#define WIN32_LEAN_AND_MEAN +#endif +#include + +#include +#include +#include + +#include "kbdump.h" +#include "kbdefinition.h" +#include "kbmap.h" +#include "kbconsole.h" +#include "kbutil.h" + + +/* + * KBDump --- + * Dump the keyboard scan-code, virtual-key definition. + **/ +void +KBDump(const struct KBDefinition *def) +{ + static const unsigned with[] = { + 0, + WITH_SHIFT, + WITH_CAPITAL, + WITH_SHIFT|WITH_CAPITAL, + WITH_CONTROL, + WITH_SHIFT|WITH_CONTROL, + WITH_CONTROL|WITH_MENU, + WITH_SHIFT|WITH_CONTROL|WITH_MENU + }; + + cprinta("\n"); + cprinta(" SC VK TEXT _ s C sC c sc ca sca\n"); + cprinta(" ==========================================================================================================================================\n"); + // 1234567 12 - 123456789012345678901234567890 123456789012345678901234567890 1234567 1234567 1234567 1234567 1234567 1234567 1234567 1234567 + + for (const PhysicalKey *pk = def->PhysicalKeys, *end = pk + def->PhysicalKeysCount; pk != end; ++pk) { + const unsigned sc = pk->SC; + const unsigned vk = pk->VK; + wchar_t values[_countof(with)] = {0}; + + for (const PhysicalResults *rs = pk->Results, *rsend = rs + pk->Count; rs != rsend; ++rs) { + for (unsigned w = 0; w < _countof(with); ++w) { + if (rs->With == with[w]) { + if (rs->TextCodepoints) { + values[w] = rs->TextCodepoints; + } else { + values[w] = rs->Text[0]; + } + break; + } + } + } + + if (0xE000 & sc) { + cprinta(" %04x ", sc); + } else { + cprinta(" %02x ", sc); + } + + cprinta("%02x - %-30.30s ", vk, KBVirtualKeyName(vk)); + cprintw(L"%-30.30s ", pk->Name); + + for (unsigned v = 0; v < _countof(values); ++v) { + const wchar_t value = values[v]; + if (value) { + if (value & 0xff00) { + cprinta("%04x ", value); + } else { + cprinta("%02x ", value); + } + } else { + cprinta("-1 "); + } + } + + cprinta("\n"); + } + cprinta("\n"); +} + +//end diff --git a/mcwin32/src/kbtest/kbdump.h b/mcwin32/src/kbtest/kbdump.h new file mode 100644 index 00000000..9ad81e50 --- /dev/null +++ b/mcwin32/src/kbtest/kbdump.h @@ -0,0 +1,40 @@ +#ifndef KBDUMP_H_INCLUDED +#define KBDUMP_H_INCLUDED +#include +__CIDENT_RCSID(kbdump_h,"$Id: kbdump.h,v 1.3 2024/02/17 08:23:13 cvsuser Exp $") +__CPRAGMA_ONCE + +/* -*- mode: c; indent-width: 4; -*- */ +/* + * console keyboard test application + * + * Copyright (c) 2024, Adam Young. + * All rights reserved. + * + * This file is part of the WinXSH project. + * + * The applications are free software: you can redistribute it + * and/or modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation, version 3. + * + * Redistributions of source code must retain the above copyright + * notice, and must be distributed with the license document above. + * + * Redistributions in binary form must reproduce the above copyright + * notice, and must include the license document above in + * the documentation and/or other materials provided with the + * distribution. + * + * This project 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 + * License for more details. + * ==end== + */ + +struct KBDefinition; +void KBDump(const struct KBDefinition *def); + +#endif //KBDUMP_H_INCLUDED + +//end diff --git a/mcwin32/src/kbtest/kblayout.c b/mcwin32/src/kbtest/kblayout.c new file mode 100644 index 00000000..50de7f93 --- /dev/null +++ b/mcwin32/src/kbtest/kblayout.c @@ -0,0 +1,218 @@ +#include +__CIDENT_RCSID(kblayout_c, "$Id: kblayout.c,v 1.7 2024/02/28 16:00:49 cvsuser Exp $") + +/* -*- mode: c; indent-width: 4; -*- */ +/* + * console keyboard test application + * + * Copyright (c) 2015 - 2024, Adam Young. + * All rights reserved. + * + * This file is part of the WinXSH project. + * + * The applications are free software: you can redistribute it + * and/or modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation, version 3. + * + * Redistributions of source code must retain the above copyright + * notice, and must be distributed with the license document above. + * + * Redistributions in binary form must reproduce the above copyright + * notice, and must include the license document above in + * the documentation and/or other materials provided with the + * distribution. + * + * This project 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 + * License for more details. + * ==end== + */ + +#ifndef _WIN32_WINNT +#define _WIN32_WINNT 0x0500 +#endif +#ifndef WIN32_LEAN_AND_MEAN +#define WIN32_LEAN_AND_MEAN +#endif +#include +#include + +#include "kbvirtualextra.h" +#include "kbdefinition.h" +#include "kblayout.h" + +static const wchar_t CUp[2] = {0x25B2}; +static const wchar_t CLeft[2] = {0x25C4}; +static const wchar_t CRight[2] = {0x25BA}; +static const wchar_t CDown[2] = {0x25BC}; +static const wchar_t CApp[2] = {0x2261}; + +/* + * KBLayoutDefault --- + * Default, US keyboard layout. + **/ +const struct KBRow ** +KBLayoutDefault(void) +{ +#define __V(__v) __v // Value helper +#define __X(__a,__b) __a##__b // Concat helper +#define AK(__k) __V(VK_##__k),__X(L,#__k) // Alphanum VK_[0-9][A-Z] +#define VK(__k) __V(VK_##__k) // VK_xxx +#define EK(__k) (__V(VK_##__k)|VK_ISENHANCED) // Enhanced VK_xxx +#define NK() (0xfff) // NUL key +#define AS(__c) (__c) // ASCII + + // US/AU/HK + // + // --------------------------------------------------------------------------------------------------------------------------------------- + // [ESC ] [ F1 ][ F2 ][ F3 ][ F4 ] [ F5 ][ F6 ][ F7 ][ F8 ] [ F9 ][ F10][ F11][ F12] [Prt] [Slk] [Pse] + // + // [ ` ] [ 1 ][ 2 ][ 3 ][ 4 ][ 5 ][ 6 ][ 7 ][ 8 ][ 9 ][ 0 ][ - ][ = ][ _<_ ] [INS] [HOM] [PUp] [NUM] [ / ] [ * ] [ - ] + // [ |- ] [ Q ][ W ][ E ][ R ][ T ][ Y ][ U ][ I ][ O ][ P ][ { ][ } ] [.....] [DEL] [END] [PDn] [ 7 ] [ 8 ] [ 9 ] | | + // [CAPS.] [ A ][ S ][ D ][ F ][ G ][ H ][ J ][ K ][ L ][ ; ][ ' ][ | ] [ENT] [ 4 ] [ 5 ] [ 6 ] | _ | + // [SHIFT...] [ \ ][ Z ][ X ][ C ][ V ][ B ][ N ][ M ][ , ][ . ][ / ] [SHIFT...] [ ^ ] [ 1 ] [ 2 ] [ 3 ] | | + // [CTRL_][_WIN_][_ALT_][ SPACE ][_ALT_][_APP_][MENU][_CTRL] [ < ] [ V ] [ > ] [ IN ] [ . ] | _ | + // + // + static const struct KBRow row1[] = { + {VK(ESCAPE),L"ESC"},{VK(F1),L"F1"},{VK(F2),L"F2"},{VK(F3),L"F3"},{VK(F4),L"F4"},{VK(F5),L"F5"},{VK(F6),L"F6"},{VK(F7),L"F7"}, + {VK(F8),L"F8"},{VK(F9),L"F9"},{VK(F10),L"F10"},{VK(F11),L"F11"},{VK(F11),L"F12"}, + {VK(PRINT),L"PRT"},{VK(SCROLL),L"SLk"},{EK(PAUSE),L"Brk"}, + {0}}; + static const struct KBRow row2[] = { + {VK(OEM_3),L"~"},{AK(1)},{AK(2)},{AK(3)},{AK(4)},{AK(5)},{AK(6)},{AK(7)},{AK(8)},{AK(9)},{VK(OEM_MINUS),L"-"},{VK(OEM_PLUS),L"="},{VK(BACK),L"Bck"}, + {EK(INSERT),L"Ins"},{EK(HOME),L"Hom"},{EK(PRIOR),L"PUp"}, + {VK(NUMLOCK),L"Num"},{EK(DIVIDE),L"/"},{VK(MULTIPLY),L"*"},{VK(SUBTRACT),L"-"}, + {0}}; + static const struct KBRow row3[] = { + {VK(TAB),L"Tab"},{AK(Q)},{AK(W)},{AK(E)},{AK(T)},{AK(Y)},{AK(U)},{AK(I)},{AK(O)},{AK(P)},{VK(OEM_4),L"["},{VK(OEM_6),L"]"},{-1}, + {EK(DELETE),L"Del"},{EK(END),L"End"},{EK(NEXT),L"PUp"}, + {VK(NUMPAD7),L"7"},{VK(NUMPAD8),L"8"},{VK(NUMPAD9),L"9"},{VK(ADD),L"+"}, + {0}}; + static const struct KBRow row4[] = { + {VK(CAPITAL),L"Cap"},{AK(A)},{AK(S)},{AK(D)},{AK(F)},{AK(G)},{AK(H)},{AK(J)},{AK(K)},{VK(OEM_1),L";"},{VK(OEM_7),L"\'"},{VK(OEM_5),L"\\"},{VK(RETURN),L"CR"}, + {-1},{-1},{-1}, + {VK(NUMPAD4),L"4"},{VK(NUMPAD5),L"5"},{VK(NUMPAD6),L"6"},{-1}, + {0}}; + static const struct KBRow row5[] = { + {VK(LSHIFT),L"LSH"},{VK(OEM_102),L"\\"},{AK(Z)},{AK(X)},{AK(C)},{AK(V)},{AK(B)},{AK(N)},{AK(M)},{VK(OEM_COMMA),L","},{VK(OEM_PERIOD),L"."},{VK(OEM_2),L"/"},{VK(RSHIFT),L"RSH"}, + {-1},{EK(UP),CUp},{-1}, + {VK(NUMPAD1),L"1"},{VK(NUMPAD2),L"2"},{VK(NUMPAD3),L"3"},{EK(RETURN),L"CR"}, + {0}}; + static const struct KBRow row6[] = { + {VK(LCONTROL),L"Ctrl"},{EK(LWIN),L"Win"},{VK(LMENU),L"Alt"},{VK(SPACE),L"",44},{EK(RMENU),L"AGr"},{EK(RWIN),L"App"},{VK(APPS),CApp},{EK(RCONTROL),L"Ctrl"}, + {EK(LEFT),CLeft},{EK(DOWN),CDown},{EK(RIGHT),CRight}, + {VK(NUMPAD0),L" 0 ",12},{VK(DECIMAL),L"."}, + {0}}; + static const struct KBRow *rows[] = + { row1, row2, row3, row4, row5, row6, NULL }; + +#undef __V +#undef __X +#undef AK +#undef VK +#undef EK +#undef NK +#undef AS + return rows; +} + + +/* + * KBLayoutBuild --- + * Build a layout from the supplied definition. + **/ +const struct KBRow ** +KBLayoutBuild(const KBDefinition *layout) +{ + // Set-1 Scancodes (see above): + // + // --------------------------------------------------------------------------------------------------------------------------------------------- + // [ 01 ] [ 3B ][ 3C ][ 3D ][ 3E ] [ 3F ][ 40 ][ 41 ][ 42 ] [ 43 ][ 44 ][ 57 ][ 58 ] [ 54 ][ 46 ][E11D] ---- ---- ---- + // + // [ 29 ][ 02 ][ 03 ][ 04 ][ 05 ][ 06 ][ 07 ][ 08 ][ 09 ][ 00 ][ 0B ][ 0C ][ 0D ][ OE ] [E052][E047][E049] [ 45 ][E035][ 37 ][ 4A ] + // [ 0F ][ 10 ][ 11 ][ 12 ][ 13 ][ 14 ][ 15 ][ 16 ][ 17 ][ 18 ][ 19 ][ 1A ][ 1B ][ __ ] [E053][E04F][E051] [ 47 ][ 48 ][ 49 ]| 4E | + // [ 3A__ ][ 1E ][ 1F ][ 20 ][ 21 ][ 22 ][ 23 ][ 24 ][ 25 ][ 26 ][ 27 ][ 28 ][ 2B ][ 1C ] [ 4B ][ 4C ][ 4D ]| __ | + // [ 2A ][ 56 ][ 2C ][ 2D ][ 2E ][ 2F ][ 30 ][ 31 ][ 32 ][ 33 ][ 34 ][ 35 ][ 36 ] [E048] [ 4F ][ 50 ][ 51 ]|E01C| + // [ 1D ][E05B ][ 38 ][ 39 ][E038 ][E05C ][E05D ][E01D ] [E04B][E050][E04D] [ 52 ][ 53 ]| __ | + // + // --------------------------------------------------------------------------------------------------------------------------------------------- + // + +#define SC(_sc) {0,L"",0,_sc} +#define SCX(_sc,_wc) {0,L"",_wc,_sc} +#define SCT(_sc,_tx) {0,_tx,0,_sc} +#define SCTX(_sc,_tx,_wc) {0,_tx,_wc,_sc} +#define SP(_wc) {-1,NULL,_wc,0} + + static struct KBRow row1[] = { + SC(0x01),{-1},SC(0x3B),SC(0x3C),SC(0x3D),SC(0x3E),SP(2),SC(0x3F),SC(0x40),SC(0x41),SC(0x42),SP(2),SC(0x43),SC(0x44),SC(0x57),SC(0x58), + SP(2),SC(0x54),SC(0x46),SC(0xE11D), + {0}}; + static struct KBRow row2[] = { + SC(0x29),SC(0x02),SC(0x03),SC(0x04),SC(0x05),SC(0x06),SC(0x07),SC(0x08),SC(0x09),SC(0x0A),SC(0x0B),SC(0x0C),SC(0x0D),SCX(0x0E,8), + SP(2),SC(0xE052),SC(0xE047),SC(0xE049), + SP(2),SC(0x45),SC(0xE035),SC(0x37),SC(0x4A), + {0}}; + static struct KBRow row3[] = { + SCX(0x0F,6),SC(0x10),SC(0x11),SC(0x12),SC(0x13),SC(0x14),SC(0x15),SC(0x16),SC(0x17),SC(0x18),SC(0x19),SC(0x1A),SC(0x1B),SP(10), + SP(2),SC(0xE053),SC(0xE04F),SC(0xE051), + SP(2),SC(0x47),SC(0x48),SC(0x49),{-1}, + {0}}; + static struct KBRow row4[] = { + SCX(0x3A,7),SC(0x1E),SC(0x1F),SC(0x20),SC(0x21),SC(0x22),SC(0x23),SC(0x24),SC(0x25),SC(0x26),SC(0x27),SC(0x28),SC(0x2B),SCX(0x1C,5), + SP(2),{-1},{-1},{-1}, + SP(2),SC(0x4B),SC(0x4C),SC(0x4D),SC(0x4E), + {0}}; + static struct KBRow row5[] = { + SCX(0x2A,5),SC(0x56),SC(0x2C),SC(0x2D),SC(0x2E),SC(0x2F),SC(0x30),SC(0x31),SC(0x32),SC(0x33),SC(0x34),SC(0x35),SCX(0x36,15), + SP(2),{-1},SCT(0xE048,CUp),{-1}, + SP(2),SC(0x4F),SC(0x50),SC(0x51),{-1}, + {0}}; + static struct KBRow row6[] = { + SCX(0x1D,5),SCX(0xE05B,5),SCX(0x38,5),SCTX(0x39,L"",49),SCX(0xE038,5),SCX(0xE05C,5),SCX(0xE05D,5),SCX(0xE01D,5), + SP(2),SCT(0xE04B,CLeft),SCT(0xE050,CDown),SCT(0xE04D,CRight), + SP(2),SCX(0x52,12),SC(0x53),SC(0xE01C), + {0}}; + static struct KBRow *rows[] = + { row1, row2, row3, row4, row5, row6, NULL }; + + for (const PhysicalKey *pk = layout->PhysicalKeys, *end = pk + layout->PhysicalKeysCount; pk != end; ++pk) { + for (unsigned r = 0; rows[r]; ++r) { + struct KBRow *row = rows[r]; + if (0 == row->sc) continue; // void + for (;row->sc||row->vk; ++row) { + if (row->vk) continue; + if (row->sc == (int)pk->SC) { // ScanCode match + + row->vk = pk->VK; + if ((row->sc & 0xFF00) == 0xE000) + row->vk |= VK_ISENHANCED; // Enhanced + + if (pk->Results && pk->Results->Text[0]) { + row->label1 = pk->Results->Text; + } else { + if (0 == row->label1[0] && pk->Name[0]) { + row->label1 = pk->Name; + } + } + + for (const PhysicalResults *rs = pk->Results, *rsend = rs + pk->Count; rs != rsend; ++rs) { // Results + if (rs->With == WITH_SHIFT) { // Shift + row->label2 = rs->Text; + } else if (rs->With == (WITH_CONTROL|WITH_MENU)) { // AltGr + row->label3 = rs->Text; + } + } + + r = 5; // done + break; + } + } + } + } + return (const struct KBRow **)(rows); +} + +//end diff --git a/mcwin32/src/kbtest/kblayout.h b/mcwin32/src/kbtest/kblayout.h new file mode 100644 index 00000000..c7ff8612 --- /dev/null +++ b/mcwin32/src/kbtest/kblayout.h @@ -0,0 +1,52 @@ +#ifndef KBLAYOUT_H_INCLUDED +#define KBLAYOUT_H_INCLUDED +#include +__CIDENT_RCSID(kblayout_h,"$Id: kblayout.h,v 1.3 2024/02/27 17:18:08 cvsuser Exp $") +__CPRAGMA_ONCE + +/* -*- mode: c; indent-width: 4; -*- */ +/* + * console keyboard test application + * + * Copyright (c) 2024, Adam Young. + * All rights reserved. + * + * This file is part of the WinXSH project. + * + * The applications are free software: you can redistribute it + * and/or modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation, version 3. + * + * Redistributions of source code must retain the above copyright + * notice, and must be distributed with the license document above. + * + * Redistributions in binary form must reproduce the above copyright + * notice, and must include the license document above in + * the documentation and/or other materials provided with the + * distribution. + * + * This project 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 + * License for more details. + * ==end== + */ + +struct KBRow { +#define VK_ISENHANCED 0x100 // Enhanced VirtualKey + + int vk; // Virtual key {-1} = None. + const wchar_t *label1; // First key label. + int width; // Optional, text is centred width. + int sc; // Optional, Scancode. + const wchar_t *label2; // OPtional, second key label. + const wchar_t *label3; // Optional, third key label (AltGr). +}; + +const struct KBRow **KBLayoutDefault(void); +const struct KBRow **KBLayoutBuild(const struct KBDefinition *def); + +#endif //KBLAYOUT_H_INCLUDED + +//end + diff --git a/mcwin32/src/kbtest/kbmap.c b/mcwin32/src/kbtest/kbmap.c new file mode 100644 index 00000000..d4ea5675 --- /dev/null +++ b/mcwin32/src/kbtest/kbmap.c @@ -0,0 +1,1028 @@ +#include +__CIDENT_RCSID(kbmap_c,"$Id: kbmap.c,v 1.9 2024/02/27 17:18:08 cvsuser Exp $") + +/* -*- mode: c; indent-width: 4; -*- */ +/* + * libtermemu console driver + * + * Copyright (c) 2015 - 2024, Adam Young. + * All rights reserved. + * + * This file is part of the WinXSH project. + * + * The applications are free software: you can redistribute it + * and/or modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation, version 3. + * + * Redistributions of source code must retain the above copyright + * notice, and must be distributed with the license document above. + * + * Redistributions in binary form must reproduce the above copyright + * notice, and must include the license document above in + * the documentation and/or other materials provided with the + * distribution. + * + * This project 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 + * License for more details. + * ==end== + */ + +#ifndef _WIN32_WINNT +#define _WIN32_WINNT 0x0500 +#endif +#ifndef WIN32_LEAN_AND_MEAN +#define WIN32_LEAN_AND_MEAN +#endif +#include + +#include +#include +#include + +#include "kbvirtualextra.h" +#include "kbmap.h" +#include "kbutil.h" + +struct xkb { +#define VK_VOID 0xffff +#define __VKVALUE(__v) __v +#define VK(__v) { __VKVALUE(VK_##__v), VK_VOID, 0, #__v } +#define VKN(__v,__n) { __VKVALUE(VK_##__v), VK_VOID, 0, #__v, __n } +#define VKALT(__v,__a) { __VKVALUE(VK_##__v), VK_VOID, __a, #__v } +#define VKALTN(__v,__a,__n) { __VKVALUE(VK_##__v), VK_VOID, __a, #__v, __n } +#define VKSCAN(__v,__s) { __VKVALUE(VK_##__v), __s, 0, #__v } +#define VKSCANALT(__v,__s,__a) { __VKVALUE(VK_##__v), __s, __a, #__v } +#define VKSCANALTN(__v,__s,__a,__n) { __VKVALUE(VK_##__v), __s, __a, #__v, __n } + + WORD wVirtualKeyCode; // virtual key code. + WORD wVirtualScanCode; // optional scan-code. + WORD vkext; // alternative VK_ specials. + const char *vkname; // VK name. + const char *kblabel; // XKB optional label. +}; + +/* + * Standard key table. + */ +static const struct xkb standard[] = { + VK(LBUTTON), // 0x01 - Left mouse button + VK(RBUTTON), // 0x02 - Right mouse button + VK(CANCEL), // 0x03 - Control-break processing + VK(MBUTTON), // 0x04 - Middle mouse button + VK(XBUTTON1), // 0x05 - X1 mouse button + VK(XBUTTON2), // 0x06 - X2 mouse button + // 0x07 -- Reserved + VKN(BACK, "BackSpace"), // 0x08 - BACKSPACE key + VKN(TAB, "Tab"), // 0x09 - TAB key + // 0x0A-0B -- Reserved + VKN(CLEAR, "Clear"), // 0x0C - CLEAR key + VKN(RETURN, "Return"), // 0x0D - ENTER key + // 0x0E-0F -- Unassigned + VKSCANALTN(SHIFT, 0x002a, VK_LSHIFT, "Shift_L"), // 0x10 - SHIFT key + VKSCANALTN(SHIFT, 0x0036, VK_RSHIFT, "Shift_R"), + VK(SHIFT), + VKALT(CONTROL, VK_LCONTROL), // 0x11 - CTRL key + VKALT(MENU, VK_LMENU), // 0x12 - ALT key + VKN(PAUSE, "Pause"), // 0x13 - PAUSE key + VKN(CAPITAL, "Caps_Lock"), // 0x14 - CAPS LOCK key + VK(KANA), // 0x15 - IME Kana mode + VK(HANGUL), // 0x15 - IME Hangul mode (Korean) +#if defined(VK_IME_ON) + VK(IME_ON), // 0x16 - IME On +#endif + VK(JUNJA), // 0x17 - IME Junja mode + VK(FINAL), // 0x18 - IME final mode + VK(HANJA), // 0x19 - IME Hanja mode (Korean) + VK(KANJI), // 0x19 - IME Kanji mode +#if defined(IME_OFF) + VK(IME_OFF), // 0x1A - IME Off +#endif + VKN(ESCAPE, "Escape"), // 0x1B - ESC key + VK(CONVERT), // 0x1C - IME convert + VK(NONCONVERT), // 0x1D - IME nonconvert + VK(ACCEPT), // 0x1E - IME accept + VK(MODECHANGE), // 0x1F - IME mode change request + VKN(SPACE, "Space"), // 0x20 - SPACEBAR + VK(PRIOR), // 0x21 - PAGE UP key + VK(NEXT), // 0x22 - PAGE DOWN key + VK(END), // 0x23 - END key + VK(HOME), // 0x24 - HOME key + VK(LEFT), // 0x25 - LEFT ARROW key + VK(UP), // 0x26 - UP ARROW key + VK(RIGHT), // 0x27 - RIGHT ARROW key + VK(DOWN), // 0x28 - DOWN ARROW key + VK(SELECT), // 0x29 - SELECT key + VK(PRINT), // 0x2A - PRINT key + VK(EXECUTE), // 0x2B - EXECUTE key + VK(SNAPSHOT), // 0x2C - PRINT SCREEN key + VK(INSERT), // 0x2D - INS key + VK(DELETE), // 0x2E - DEL key + VK(HELP), // 0x2F - HELP key +// VK(0), // 0x30 - 0 key +// VK(1), // 0x31 - 1 key +// VK(2), // 0x32 - 2 key +// VK(3), // 0x33 - 3 key +// VK(4), // 0x34 - 4 key +// VK(5), // 0x35 - 5 key +// VK(6), // 0x36 - 6 key +// VK(7), // 0x37 - 7 key +// VK(8), // 0x38 - 8 key +// VK(9), // 0x39 - 9 key + // 0x3A-40 -- Undefined +// VK(A), // 0x41 - A key +// VK(B), // 0x42 - B key +// VK(C), // 0x43 - C key +// VK(D), // 0x44 - D key +// VK(E), // 0x45 - E key +// VK(F), // 0x46 - F key +// VK(G), // 0x47 - G key +// VK(H), // 0x48 - H key +// VK(I), // 0x49 - I key +// VK(J), // 0x4A - J key +// VK(K), // 0x4B - K key +// VK(L), // 0x4C - L key +// VK(M), // 0x4D - M key +// VK(N), // 0x4E - N key +// VK(O), // 0x4F - O key +// VK(P), // 0x50 - P key +// VK(Q), // 0x51 - Q key +// VK(R), // 0x52 - R key +// VK(S), // 0x53 - S key +// VK(T), // 0x54 - T key +// VK(U), // 0x55 - U key +// VK(V), // 0x56 - V key +// VK(W), // 0x57 - W key +// VK(X), // 0x58 - X key +// VK(Y), // 0x59 - Y key +// VK(Z), // 0x5A - Z key +// VK(LWIN), // 0x5B - Left Windows key +// VK(RWIN), // 0x5C - Right Windows key +// VK(APPS), // 0x5D - Applications key + VK(SLEEP), // 0x5F - Computer Sleep key + VKN(NUMPAD0, "KP_0"), // 0x60 - Numeric keypad 0 key + VKN(NUMPAD1, "KP_1"), // 0x61 - Numeric keypad 1 key + VKN(NUMPAD2, "KP_2"), // 0x62 - Numeric keypad 2 key + VKN(NUMPAD3, "KP_3"), // 0x63 - Numeric keypad 3 key + VKN(NUMPAD4, "KP_4"), // 0x64 - Numeric keypad 4 key + VKN(NUMPAD5, "KP_5"), // 0x65 - Numeric keypad 5 key + VKN(NUMPAD6, "KP_6"), // 0x66 - Numeric keypad 6 key + VKN(NUMPAD7, "KP_7"), // 0x67 - Numeric keypad 7 key + VKN(NUMPAD8, "KP_8"), // 0x68 - Numeric keypad 8 key + VKN(NUMPAD9, "KP_9"), // 0x69 - Numeric keypad 9 key + VKN(MULTIPLY, "KP_Multiply"), // 0x6A - Multiply key + VKN(ADD, "KP_Add"), // 0x6B - Add key + VKN(SEPARATOR, "KP_Separator"), // 0x6C - Separator key + VKN(SUBTRACT, "KP_Subtract"), // 0x6D - Subtract key + VKN(DECIMAL, "KP_Decimal"), // 0x6E - Decimal key + VKN(DIVIDE, "KP_Divide"), // 0x6F - Divide key + VKN(F1, "F1"), // 0x70 - F1 key + VKN(F2, "F2"), // 0x71 - F2 key + VKN(F3, "F3"), // 0x72 - F3 key + VKN(F4, "F4"), // 0x73 - F4 key + VKN(F5, "F5"), // 0x74 - F5 key + VKN(F6, "F6"), // 0x75 - F6 key + VKN(F7, "F7"), // 0x76 - F7 key + VKN(F8, "F8"), // 0x77 - F8 key + VKN(F9, "F9"), // 0x78 - F9 key + VKN(F10, "F10"), // 0x79 - F10 key + VKN(F11, "F11"), // 0x7A - F11 key + VKN(F12, "F12"), // 0x7B - F12 key + VKN(F13, "F13"), // 0x7C - F13 key + VKN(F14, "F14"), // 0x7D - F14 key + VKN(F15, "F15"), // 0x7E - F15 key + VKN(F16, "F16"), // 0x7F - F16 key + VKN(F17, "F17"), // 0x80 - F17 key + VKN(F18, "F18"), // 0x81 - F18 key + VKN(F19, "F19"), // 0x82 - F19 key + VKN(F20, "F20"), // 0x83 - F20 key + VKN(F21, "F21"), // 0x84 - F21 key + VKN(F22, "F22"), // 0x85 - F22 key + VKN(F23, "F23"), // 0x86 - F23 key + VKN(F24, "F24"), // 0x87 - F24 key + // 0x88-8F -- Reserved +// VK(NUMLOCK), // 0x90 - NUM LOCK key +// VK(SCROLL), // 0x91 - SCROLL LOCK key + // 0x92-96 -- OEM specific + // 0x97-9F -- Unassigned +// VK(LSHIFT), // 0xA0 - Left SHIFT key +// VK(RSHIFT), // 0xA1 - Right SHIFT key +// VK(LCONTROL), // 0xA2 - Left CONTROL key +// VK(RCONTROL), // 0xA3 - Right CONTROL key +// VK(LMENU), // 0xA4 - Left ALT key +// VK(RMENU), // 0xA5 - Right ALT key + VKN(BROWSER_BACK, "XF86Back"), // 0xA6 - Browser Back key + VKN(BROWSER_FORWARD, "XF86Forward"), // 0xA7 - Browser Forward key + VKN(BROWSER_REFRESH, "XF86Refresh"), // 0xA8 - Browser Refresh key + VKN(BROWSER_STOP, "XF86Stop"), // 0xA9 - Browser Stop key + VKN(BROWSER_SEARCH, "XF86Search"), // 0xAA - Browser Search key + VKN(BROWSER_FAVORITES, "XF86Favorites"), // 0xAB - Browser Favorites key + VKN(BROWSER_HOME, "XF86HomePage"), // 0xAC - Browser Start and Home key + VKN(VOLUME_MUTE, "XF86AudioMute"), // 0xAD - Volume Mute key + VKN(VOLUME_DOWN, "XF86AudioLowerVolume"), // 0xAE - Volume Down key + VKN(VOLUME_UP, "XF86AudioRaiseVolume"), // 0xAF - Volume Up key + VKN(MEDIA_NEXT_TRACK, "XF86AudioNext"), // 0xB0 - Next Track key + VKN(MEDIA_PREV_TRACK, "XF86AudioPrev"), // 0xB1 - Previous Track key + VKN(MEDIA_STOP, "XF86AudioStop"), // 0xB2 - Stop Media key + VKN(MEDIA_PLAY_PAUSE, "XF86AudioPlay"), // 0xB3 - Play/Pause Media key + VKN(LAUNCH_MAIL, "XF86Mail"), // 0xB4 - Start Mail key + VKN(LAUNCH_MEDIA_SELECT, "XF86Select"), // 0xB5 - Select Media key + VKN(LAUNCH_APP1, "XF86Launch0"), // 0xB6 - Start Application 1 key + VKN(LAUNCH_APP2, "XF86Launch1"), // 0xB7 - Start Application 2 key + // 0xB8-B9 -- Reserved + VK(OEM_1), // 0xBA - Used for miscellaneous characters; it can vary by keyboard. For the US standard keyboard, the ;: key + VKN(OEM_PLUS, "Plus"), // 0xBB - For any country/region, the + key + VKN(OEM_COMMA, "Comma"), // 0xBC - For any country/region, the , key + VKN(OEM_MINUS, "Minus"), // 0xBD - For any country/region, the - key + VKN(OEM_PERIOD, "Period"), // 0xBE - For any country/region, the . key + VK(OEM_2), // 0xBF - Used for miscellaneous characters; it can vary by keyboard. For the US standard keyboard, the /? key + VK(OEM_3), // 0xC0 - Used for miscellaneous characters; it can vary by keyboard. For the US standard keyboard, the `~ key + // 0xC1-DA -- Reserved +#if !defined(VK_ABNT_C1) +#define VK_ABNT_C1 0xC1 +#define VK_ABNT_C2 0xC2 +#endif + VK(ABNT_C1), // 0xC1 - Brazilian special. + VK(ABNT_C2), // 0xC2 - Japanese keyboard layout. + // + VK(OEM_4), // 0xDB - Used for miscellaneous characters; it can vary by keyboard. For the US standard keyboard, the [{ key + VK(OEM_5), // 0xDC - Used for miscellaneous characters; it can vary by keyboard. For the US standard keyboard, the \\| key + VK(OEM_6), // 0xDD - Used for miscellaneous characters; it can vary by keyboard. For the US standard keyboard, the ]} key + VK(OEM_7), // 0xDE - Used for miscellaneous characters; it can vary by keyboard. For the US standard keyboard, the '" key + VK(OEM_8), // 0xDF - Used for miscellaneous characters; it can vary by keyboard. + // 0xE0 -- Reserved + // 0xE1 -- OEM specific + VK(OEM_102), // 0xE2 - The <> keys on the US standard keyboard, or the \\| key on the non-US 102-key keyboard + // 0xE3-E4 -- OEM specifi + VK(PROCESSKEY), // 0xE5 - IME PROCESS key + // 0xE6 -- OEM specific + VK(PACKET), // 0xE7 - Used to pass Unicode characters as if they were keystrokes. + // The VK_PACKET key is the low word of a 32-bit Virtual Key value used for non-keyboard input methods. + // For more information, see Remark in KEYBDINPUT, SendInput, WM_KEYDOWN, and WM_KEYUP + // 0xE8 -- Unassigned + VK(OEM_RESET), // 0xE9 + VK(OEM_JUMP), // 0xEA + VK(OEM_PA1), // 0xEB + VK(OEM_PA2), // 0xEC + VK(OEM_PA3), // 0xED + VK(OEM_WSCTRL), // 0xEE + VK(OEM_CUSEL), // 0xEF + VK(OEM_ATTN), // 0xF0 + VK(OEM_FINISH), // 0xF1 + VK(OEM_COPY), // 0xF2 + VK(OEM_AUTO), // 0xF3 + VK(OEM_ENLW), // 0xF4 + VK(OEM_BACKTAB), // 0xF5 + // 0xE9-F5 -- OEM specific + VK(ATTN), // 0xF6 - Attn key + VK(CRSEL), // 0xF7 - CrSel key + VK(EXSEL), // 0xF8 - ExSel key + VK(EREOF), // 0xF9 - Erase EOF key + VK(PLAY), // 0xFA - Play key + VK(ZOOM), // 0xFB - Zoom key + VK(NONAME), // 0xFC - Reserved + VK(PA1), // 0xFD - PA1 key + VK(OEM_CLEAR), // 0xFE - Clear key + // Japanese Extra + VK(DBE_ALPHANUMERIC), // 0xf0 + VK(DBE_KATAKANA), // 0xf1 + VK(DBE_HIRAGANA), // 0xf2 + VK(DBE_SBCSCHAR), // 0xf3 + VK(DBE_DBCSCHAR), // 0xf4 + VK(DBE_ROMAN), // 0xf5 + VK(DBE_NOROMAN), // 0xf6 + VK(DBE_ENTERWORDREGISTERMODE), // 0xf7 + VK(DBE_ENTERIMECONFIGMODE), // 0xf8 + VK(DBE_FLUSHSTRING), // 0xf9 + VK(DBE_CODEINPUT), // 0xfa + VK(DBE_NOCODEINPUT), // 0xfb + VK(DBE_DETERMINESTRING), // 0xfc + VK(DBE_ENTERDLGCONVERSIONMODE) // 0xfd + }; + + +/* + * Enhanced key table. + */ +static const struct xkb enhanced[] = { + // Enhanced keys for the IBM-101, IBM-102 (plus MS-104 key keyboards are the + // INS, DEL, HOME, END, PAGE UP, PAGE DOWN, WIN, RALT, RWIN, APP, LCONTROL + // + // and direction keys in the clusters to the left of the keypad; + // and the divide (/) and ENTER keys in the keypad. + // + // Set-1 Scancodes: + // + // +-------------------------------------------------------------------------------------------------------------------------------------------+ + // | | + // | [ 01 ] [ 3B ][ 3C ][ 3D ][ 3E ] [ 3F ][ 40 ][ 41 ][ 42 ] [ 43 ][ 44 ][ 57 ][ 58 ] [ 54 ][ 46 ][E11D] ---- ---- ---- | + // | | + // | [ 29 ][ 02 ][ 03 ][ 04 ][ 05 ][ 06 ][ 07 ][ 08 ][ 09 ][ 00 ][ 0B ][ 0C ][ 0D ][ OE ] [E052][E047][E049] [ 45 ][E035][ 37 ][ 4A ] | + // | [ 0F ][ 10 ][ 11 ][ 12 ][ 13 ][ 14 ][ 15 ][ 16 ][ 17 ][ 18 ][ 19 ][ 1A ][ 1B ][ __ ] [E053][E04F][E051] [ 47 ][ 48 ][ 49 ]| 4E | | + // | [ 3A__ ][ 1E ][ 1F ][ 20 ][ 21 ][ 22 ][ 23 ][ 24 ][ 25 ][ 26 ][ 27 ][ 28 ][ 2B ][ 1C ] [ 4B ][ 4C ][ 4D ]| __ | | + // | [ 2A ][ 56 ][ 2C ][ 2D ][ 2E ][ 2F ][ 30 ][ 31 ][ 32 ][ 33 ][ 34 ][ 35 ][ 36 ] [E048] [ 4F ][ 50 ][ 51 ]|E01C| | + // | [ 1D ][E05B ][ 38 ][ 39 ][E038 ][E05C ][E05D ][E01D ] [E04B][E050][E04D] [ 52 ][ 53 ]| __ | | + // | | + // +-------------------------------------------------------------------------------------------------------------------------------------------+ + // + VKN(PRIOR, "Prior"), // 0xE049, PgUp + VKN(NEXT, "Next"), // 0xE051, PgDn + VKN(HOME, "Home"), // 0xE047 + VKN(END, "End"), // 0xE04F + VKN(LEFT, "Left"), // 0xE04B + VKN(RIGHT, "Right"), // 0xE04D + VKN(UP, "Up"), // 0xE048 + VKN(DOWN, "Down"), // 0xE050 + VKN(INSERT, "Insert"), // 0xE052 + VKN(DELETE, "Delete"), // 0xE053 + VKN(DIVIDE, "KP_Divide"), // 0xE035 + VKN(RETURN, "KP_Enter"), // 0xE01C + VKALTN(CONTROL, VK_RCONTROL, "Control_R"), // 0xE01D + VKALTN(MENU, VK_RMENU, "Alt_R") // 0xE038 + }; + +/* + * VK_xxxx names + */ +static const char *vknames[0x100] = { + "NONE", // 0x00 + "VK_LBUTTON", // 0x01 + "VK_RBUTTON", // 0x02 + "VK_CANCEL", // 0x03 + "VK_MBUTTON", // 0x04 + "VK_XBUTTON1", // 0x05 + "VK_XBUTTON2", // 0x06 + /* + * 0x07 : unassigned + */ + "VK_RESERVED_07", // 0x07 + /**/ + "VK_BACK", // 0x08 + "VK_TAB", // 0x09 + /* + * 0x0A - 0x0B : reserved + */ + "VK_RESERVED_0A", // 0x0A + "VK_RESERVED_0B", // 0x0B + /**/ + "VK_CLEAR", // 0x0C + "VK_RETURN", // 0x0D, Keys.Enter + /* + * 0x0E - 0x0F : unassigned + */ + "VK_RESERVED_0E", // 0x0E + "VK_RESERVED_0F", // 0x0F + /**/ + "VK_SHIFT", // 0x10 + "VK_CONTROL", // 0x11 + "VK_MENU", // 0x12 + "VK_PAUSE", // 0x13 + "VK_CAPITAL", // 0x14, Keys.CapsLock + "VK_KANA", // 0x15 + "VK_HANGEUL", // 0x15, Keys.HangulMode + "VK_JUNJA", // 0x17 + "VK_FINAL", // 0x18 + "VK_HANJA", // 0x19 + "VK_KANJI", // 0x19 + "VK_ESCAPE", // 0x1B + "VK_CONVERT", // 0x1C + "VK_NONCONVERT", // 0x1D + "VK_ACCEPT", // 0x1E, Keys.IMEAccept + "VK_MODECHANGE", // 0x1F + "VK_SPACE", // 0x20 + "VK_PRIOR", // 0x21, Keys.PageUp + "VK_NEXT", // 0x22, Keys.PageDown + "VK_END", // 0x23 + "VK_HOME", // 0x24 + "VK_LEFT", // 0x25 + "VK_UP", // 0x26 + "VK_RIGHT", // 0x27 + "VK_DOWN", // 0x28 + "VK_SELECT", // 0x29 + "VK_PRINT", // 0x2A + "VK_EXECUTE", // 0x2B + "VK_SNAPSHOT", // 0x2C, Keys.PrintScreen + "VK_INSERT", // 0x2D + "VK_DELETE", // 0x2E + "VK_HELP", // 0x2F + "VK_0", // 0x30 + "VK_1", // 0x31 + "VK_2", // 0x32 + "VK_3", // 0x33 + "VK_4", // 0x34 + "VK_5", // 0x35 + "VK_6", // 0x36 + "VK_7", // 0x37 + "VK_8", // 0x38 + "VK_9", // 0x39 + /* + * 0x3A-40: undefined + */ + "VK_RESERVED_3A", // 0x3A + "VK_RESERVED_3B", // 0x3B + "VK_RESERVED_3C", // 0x3C + "VK_RESERVED_3D", // 0x3D + "VK_RESERVED_3E", // 0x3E + "VK_RESERVED_3F", // 0x3F + "VK_RESERVED_40", // 0x40 + /**/ + "VK_A", // 0x41 + "VK_B", // 0x42 + "VK_C", // 0x43 + "VK_D", // 0x44 + "VK_E", // 0x45 + "VK_F", // 0x46 + "VK_G", // 0x47 + "VK_H", // 0x48 + "VK_I", // 0x49 + "VK_J", // 0x4A + "VK_K", // 0x4B + "VK_L", // 0x4C + "VK_M", // 0x4D + "VK_N", // 0x4E + "VK_O", // 0x4F + "VK_P", // 0x50 + "VK_Q", // 0x51 + "VK_R", // 0x52 + "VK_S", // 0x53 + "VK_T", // 0x54 + "VK_U", // 0x55 + "VK_V", // 0x56 + "VK_W", // 0x57 + "VK_X", // 0x58 + "VK_Y", // 0x59 + "VK_Z", // 0x5A + "VK_LWIN", // 0x5B + "VK_RWIN", // 0x5C + "VK_APPS", // 0x5D + /* + * 0x5E : reserved + */ + "VK_RESERVED_5E", // 0x5E + /**/ + "VK_SLEEP", // 0x5F, Keys.Sleep + "VK_NUMPAD0", // 0x60 + "VK_NUMPAD1", // 0x61 + "VK_NUMPAD2", // 0x62 + "VK_NUMPAD3", // 0x63 + "VK_NUMPAD4", // 0x64 + "VK_NUMPAD5", // 0x65 + "VK_NUMPAD6", // 0x66 + "VK_NUMPAD7", // 0x67 + "VK_NUMPAD8", // 0x68 + "VK_NUMPAD9", // 0x69 + "VK_MULTIPLY", // 0x6A + "VK_ADD", // 0x6B + "VK_SEPARATOR", // 0x6C + "VK_SUBTRACT", // 0x6D + "VK_DECIMAL", // 0x6E + "VK_DIVIDE", // 0x6F + "VK_F1", // 0x70 + "VK_F2", // 0x71 + "VK_F3", // 0x72 + "VK_F4", // 0x73 + "VK_F5", // 0x74 + "VK_F6", // 0x75 + "VK_F7", // 0x76 + "VK_F8", // 0x77 + "VK_F9", // 0x78 + "VK_F10", // 0x79 + "VK_F11", // 0x7A + "VK_F12", // 0x7B + "VK_F13", // 0x7C + "VK_F14", // 0x7D + "VK_F15", // 0x7E + "VK_F16", // 0x7F + "VK_F17", // 0x80 + "VK_F18", // 0x81 + "VK_F19", // 0x82 + "VK_F20", // 0x83 + "VK_F21", // 0x84 + "VK_F22", // 0x85 + "VK_F23", // 0x86 + "VK_F24", // 0x87 + /* + * 0x88 - 0x8F : unassigned + */ + "VK_RESERVED_88", // 0x88 + "VK_RESERVED_89", // 0x89 + "VK_RESERVED_8A", // 0x8A + "VK_RESERVED_8B", // 0x8B + "VK_RESERVED_8C", // 0x8C + "VK_RESERVED_8D", // 0x8D + "VK_RESERVED_8E", // 0x8E + "VK_RESERVED_8F", // 0x8F + /**/ + "VK_NUMLOCK", // 0x90 + "VK_SCROLL", // 0x91 + "VK_OEM_NEC_EQUAL", // 0x92, NEC PC-9800 kbd definition +//dup "VK_OEM_FJ_JISHO", // 0x92, Fujitsu/OASYS kbd definition + "VK_OEM_FJ_MASSHOU", // 0x93, Fujitsu/OASYS kbd definition + "VK_OEM_FJ_TOUROKU", // 0x94, Fujitsu/OASYS kbd definition + "VK_OEM_FJ_LOYA", // 0x95, Fujitsu/OASYS kbd definition + "VK_OEM_FJ_ROYA", // 0x96, Fujitsu/OASYS kbd definition + /* + * 0x97 - 0x9F : unassigned + */ + "VK_RESERVED_97", // 0x97 + "VK_RESERVED_98", // 0x98 + "VK_RESERVED_99", // 0x99 + "VK_RESERVED_9A", // 0x9A + "VK_RESERVED_9B", // 0x9B + "VK_RESERVED_9C", // 0x9C + "VK_RESERVED_9D", // 0x9D + "VK_RESERVED_9E", // 0x9E + "VK_RESERVED_9F", // 0x9F + /**/ + "VK_LSHIFT", // 0xA0 + "VK_RSHIFT", // 0xA1 + "VK_LCONTROL", // 0xA2 + "VK_RCONTROL", // 0xA3 + "VK_LMENU", // 0xA4 + "VK_RMENU", // 0xA5 + "VK_BROWSER_BACK", // 0xA6 + "VK_BROWSER_FORWARD", // 0xA7 + "VK_BROWSER_REFRESH", // 0xA8 + "VK_BROWSER_STOP", // 0xA9 + "VK_BROWSER_SEARCH", // 0xAA + "VK_BROWSER_FAVORITES", // 0xAB + "VK_BROWSER_HOME", // 0xAC + "VK_VOLUME_MUTE", // 0xAD + "VK_VOLUME_DOWN", // 0xAE + "VK_VOLUME_UP", // 0xAF + "VK_MEDIA_NEXT_TRACK", // 0xB0 + "VK_MEDIA_PREV_TRACK", // 0xB1 + "VK_MEDIA_STOP", // 0xB2 + "VK_MEDIA_PLAY_PAUSE", // 0xB3 + "VK_LAUNCH_MAIL", // 0xB4 + "VK_LAUNCH_MEDIA_SELECT", // 0xB5 + "VK_LAUNCH_APP1", // 0xB6 + "VK_LAUNCH_APP2", // 0xB7 + /* + * 0xB8 - 0xB9 : reserved + */ + "VK_RESERVED_B8", // 0xB8 + "VK_RESERVED_B9", // 0xB9 + /**/ + "VK_OEM_1", // 0xBA, Keys.Oem1 + "VK_OEM_PLUS", // 0xBB + "VK_OEM_COMMA", // 0xBC + "VK_OEM_MINUS", // 0xBD + "VK_OEM_PERIOD", // 0xBE + "VK_OEM_2", // 0xBF, Keys.Oem2 + "VK_OEM_3", // 0xC0, Keys.Oem3 + /* + * 0xC1 - 0xD7 : reserved + */ +// "VK_RESERVED_C1", // 0xC1 +// "VK_RESERVED_C2", // 0xC2 + "VK_ABNT_C1", // 0xC1 - Brazilian special. + "VK_ABNT_C2", // 0xC2 - Japanese keyboard layout. + "VK_RESERVED_C3", // 0xC3 + "VK_RESERVED_C4", // 0xC4 + "VK_RESERVED_C5", // 0xC5 + "VK_RESERVED_C6", // 0xC6 + "VK_RESERVED_C7", // 0xC7 + "VK_RESERVED_C8", // 0xC8 + "VK_RESERVED_C9", // 0xC9 + "VK_RESERVED_CA", // 0xCA + "VK_RESERVED_CB", // 0xCB + "VK_RESERVED_CC", // 0xCC + "VK_RESERVED_CD", // 0xCD + "VK_RESERVED_CE", // 0xCE + "VK_RESERVED_CF", // 0xCF + "VK_RESERVED_D0", // 0xD0 + "VK_RESERVED_D1", // 0xD1 + "VK_RESERVED_D2", // 0xD2 + "VK_RESERVED_D3", // 0xD3 + "VK_RESERVED_D4", // 0xD4 + "VK_RESERVED_D5", // 0xD5 + "VK_RESERVED_D6", // 0xD6 + "VK_RESERVED_D7", // 0xD7 + /**/ + /* + * 0xD8 - 0xDA : unassigned + */ + "VK_RESERVED_D8", // 0xD8 + "VK_RESERVED_D9", // 0xD9 + "VK_RESERVED_DA", // 0xDA + /**/ + "VK_OEM_4", // 0xDB, Keys.Oem4 + "VK_OEM_5", // 0xDC, Keys.Oem5 + "VK_OEM_6", // 0xDD, Keys.Oem6 + "VK_OEM_7", // 0xDE, Keys.Oem7 + "VK_OEM_8", // 0xDF + /* + * 0xE0 : reserved + */ + "VK_RESERVED_E0", // 0xE0 + /**/ + "VK_OEM_AX", // 0xE1, 'AX' key on Japanese AX kbd + "VK_OEM_102", // 0xE2, Keys.Oem102 + "VK_ICO_HELP", // 0xE3, Help key on ICO + "VK_ICO_00", // 0xE4, 00 key on ICO + "VK_PROCESSKEY", // 0xE5 + "VK_ICO_CLEAR", // 0xE6 + "VK_PACKET", // 0xE7, Keys.Packet + /* + * 0xE8 : unassigned + */ + "VK_RESERVED_E8", // 0xE8 + /**/ + "VK_OEM_RESET", // 0xE9, Nokia/Ericsson definition + "VK_OEM_JUMP", // 0xEA, Nokia/Ericsson definition + "VK_OEM_PA1", // 0xEB, Nokia/Ericsson definition + "VK_OEM_PA2", // 0xEC, Nokia/Ericsson definition + "VK_OEM_PA3", // 0xED, Nokia/Ericsson definition + "VK_OEM_WSCTRL", // 0xEE, Nokia/Ericsson definition + "VK_OEM_CUSEL", // 0xEF, Nokia/Ericsson definition + "VK_OEM_ATTN", // 0xF0, Nokia/Ericsson definition + "VK_OEM_FINISH", // 0xF1, Nokia/Ericsson definition + "VK_OEM_COPY", // 0xF2, Nokia/Ericsson definition + "VK_OEM_AUTO", // 0xF3, Nokia/Ericsson definition + "VK_OEM_ENLW", // 0xF4, Nokia/Ericsson definition + "VK_OEM_BACKTAB", // 0xF5, Nokia/Ericsson definition + "VK_ATTN", // 0xF6 + "VK_CRSEL", // 0xF7 + "VK_EXSEL", // 0xF8 + "VK_EREOF", // 0xF9 + "VK_PLAY", // 0xFA + "VK_ZOOM", // 0xFB + "VK_NONAME", // 0xFC + "VK_PA1", // 0xFD + "VK_OEM_CLEAR", // 0xFE + /* + * 0xFF : reserved + */ + "VK_RESERVED_FF" // 0xFF + }; + +#undef __VKVALUE +#undef VK +#undef __XKBVALUE +#undef XKB + +static inline int +ToUpper(WORD key) +{ + if (key >= 'a' && key <= 'z') { + return (int)('A' + (key - 'a')); + } + return (int)key; +} + + +/* + * KBMapEvent --- + * Console key event parser. + **/ +int +KBMapEvent(const KEY_EVENT_RECORD *key, key_event_t *evt) +{ + const WORD wVirtualKeyCode = key->wVirtualKeyCode; + const WORD wVirtualScanCode = key->wVirtualScanCode; + const DWORD state = KBNormalizeAltGr(key); + WCHAR uc = key->uChar.UnicodeChar; + + if (! key->bKeyDown) { + return 0; // generally ignore key down events + } + + // Base evt. + evt->vkmodifiers = state; + evt->vkkey = wVirtualKeyCode; + evt->vkext = 0; + evt->vkname = NULL; + evt->vkenhanced = 0; + evt->kblabel = NULL; + evt->kbmodifiers = KBMapModifiers(state, 1); + evt->ascii = 0; + evt->unicode = KEY_INVALID; + + // Virtual keys. + if (ENHANCED_KEY & state) { + const struct xkb *vkkey = enhanced, + *vkend = vkkey + (sizeof(enhanced)/sizeof(enhanced[0])); + for (;vkkey < vkend; ++vkkey) { // Specialised enhanced keys. + if (vkkey->wVirtualKeyCode == wVirtualKeyCode && + (VK_VOID == vkkey->wVirtualScanCode || vkkey->wVirtualScanCode == wVirtualScanCode)) { + evt->vkname = vkkey->vkname; + evt->kblabel = vkkey->kblabel; + evt->vkext = vkkey->vkext; + evt->vkenhanced = 1; + return 1; + } + } + } + + // Unicode keys (Printable/non-printable unicode characters) + if (uc) { + if (uc <= 0x1f && (evt->kbmodifiers & (MODIFIER_CONTROL|MODIFIER_ALT))) { + evt->ascii = '@' + uc; // Control, convert to source key; Ctrl-A .. + // no equiv unicode character. + } else { + //assert((uc >= 0x20 && uc <= 0x7f) || (uc >= 0xa0 && uc < 0x10ffff)); + if (uc <= 0x7f) { // Unshifted ASCII character + evt->ascii = uc; + if ((evt->kbmodifiers & (MODIFIER_SHIFT|MODIFIER_CAPSLOCK)) == MODIFIER_SHIFT) + evt->ascii = ToUpper(uc); // Apply shift. + } + evt->unicode = uc; // Shifted character value. + } + } + + // Standard key. + { const struct xkb *vkkey = standard, + *vkend = vkkey + (sizeof(standard)/sizeof(standard[0])); + for (;vkkey < vkend; ++vkkey) { // General or non-specialised enhanced keys. + if (vkkey->wVirtualKeyCode == wVirtualKeyCode && + (VK_VOID == vkkey->wVirtualScanCode || vkkey->wVirtualScanCode == wVirtualScanCode)) { + evt->vkname = vkkey->vkname; + evt->kblabel = vkkey->kblabel; + evt->vkext = vkkey->vkext; + return 2; + } + } + if (uc) { + evt->vkname = KBVirtualKeyName(wVirtualKeyCode); + return 3; + } + } + + // Specials. +#define SPECIALMODS (MODIFIER_ALT|MODIFIER_CONTROL) + if (SPECIALMODS & evt->kbmodifiers) { + // + // Not all keys are visible when control and/or alt are active + // Lookup the ASCII key against only the scancode possiblity shifted. + // Examples include ',' and '.' + // + // These can be/are reportd via VK_OEM_xxx definitions, yet many are locale specific + // as such not portable beyond US keyboards; the follow method (so far) seems the cleanise. + // + // References: + // https://msdn.microsoft.com/en-us/library/ms892480.aspx, + // scan-code to vk-code, by locale/keyboard. + // +#if (0) + BYTE keystate[256] = {0}; // VK key states. + WORD keys[8] = {0}; + + if (key->dwControlKeyState & SHIFT_PRESSED) + keystate[VK_SHIFT] = 0x80; // down; high bit + if (key->dwControlKeyState & CAPSLOCK_ON) + keystate[VK_CAPITAL] = 0x01; // on; low bit + +//See:KBNormalizeAltGr evt->kbmodifiers &= ~SPECIALMODS; + if (1 == ToUnicode(wVirtualKeyCode, key->wVirtualScanCode, keystate, keys, 8, 0)) { + if (keys[0] >= 0x20 && keys[0] <= 0x7f) { + evt->ascii = keys[0]; + if (evt->kbmodifiers & MODIFIER_SHIFT) + evt=>ascii = tolower(evt->ascii) + return 4; + } else if (keys[0] >= 0x80) { + evt->unicode = keys[0]; + return 4; + } + } +#else + //See:KBNormalizeAltGr + // evt->kbmodifiers &= ~SPECIALMODS; + if ((uc = (WCHAR)MapVirtualKeyW(wVirtualKeyCode, MAPVK_VK_TO_CHAR)) != 0) { + if (uc >= 0x20 && uc <= 0x7f) { + evt->kbmodifiers &= ~MODIFIER_SHIFT; + evt->ascii = ToUpper(uc); + return 4; + } else if (uc >= 0x80) { + evt->unicode = uc; + return 4; + } + } +#endif + } + + return 0; +} + + +/* + * KBVirtualKeyName --- + * Retrieve the VirtualKey name, otherwise VK_UNKNOWN if out of range. + **/ +const char * +KBVirtualKeyName(unsigned vk) +{ + if (vk < 0x100) + return vknames[vk]; + return "VK_UNKNOWN"; +} + + +/* + * KBVirtualKeyValue --- + * Retrieve the VirtualKey value, otherwise 0 if unmapped. + **/ +unsigned +KBVirtualKeyValue(const char *name) +{ + static const struct vkextra { + // Additional + // See: http://www.kbdedit.com/manual/low_level_vk_list.html + char name[30]; + unsigned value; +#define XVK(__v) { #__v, __v } + } vkextras[] = { + /* + * duplicate + */ + XVK(VK_OEM_FJ_JISHO), + /* + * extra + */ + XVK(VK_DBE_ALPHANUMERIC), + XVK(VK_DBE_KATAKANA), + XVK(VK_DBE_HIRAGANA), + XVK(VK_DBE_SBCSCHAR), + XVK(VK_DBE_DBCSCHAR), + XVK(VK_DBE_ROMAN), + XVK(VK_DBE_NOROMAN), + XVK(VK_DBE_ENTERWORDREGISTERMODE), + XVK(VK_DBE_ENTERIMECONFIGMODE), + XVK(VK_DBE_FLUSHSTRING), + XVK(VK_DBE_CODEINPUT), + XVK(VK_DBE_NOCODEINPUT), + XVK(VK_DBE_DETERMINESTRING), + XVK(VK_DBE_ENTERDLGCONVERSIONMODE) + }; + + for (unsigned vk = 1; vk < _countof(vknames); ++vk) { + if (0 == strcmp(name, vknames[vk])) { + return vk; + } + } + + for (const struct vkextra *it = vkextras, *end = it + _countof(vkextras); it != end; ++it) { + if (0 == strcmp(name, it->name)) { + return it->value; + } + } + return 0; +} + + +/* + * KBNormalizeAltGr --- + * Filter AtrGr events from modifiers. + **/ +DWORD +KBNormalizeAltGr(const KEY_EVENT_RECORD *key) +{ + DWORD state = key->dwControlKeyState; + + // AltGr condition (LCtrl + RAlt) + if (0 == (state & (LEFT_ALT_PRESSED | RIGHT_ALT_PRESSED))) + return state; + + if (0 == (state & (LEFT_CTRL_PRESSED | RIGHT_CTRL_PRESSED))) + return state; + + if (0 == key->uChar.UnicodeChar) + return state; + + // Filter Left-Ctrl+Right+Alt, attempt to allow: + // + // Left-Alt + AltGr, + // Right-Ctrl + AltGr, + // or Left-Alt + Right-Ctrl + AltGr. + // + + if (state & RIGHT_ALT_PRESSED) { + // Remove Right-Alt. + state &= ~RIGHT_ALT_PRESSED; + + // As a character was presented, Left-Ctrl is almost always set, + // except if the user presses Right-Ctrl, then AltGr (in that specific order) for whatever reason. + // At any rate, make sure the bit is not set. + state &= ~LEFT_CTRL_PRESSED; + + } else if (state & LEFT_ALT_PRESSED) { + // Remove Left-Alt. + state &= ~LEFT_ALT_PRESSED; + + // Whichever Ctrl key is down, remove it from the state. + // We only remove one key, to improve our chances of detecting the corner-case of Left-Ctrl + Left-Alt + Right-Ctrl. + if ((state & LEFT_CTRL_PRESSED) != 0) { + // Remove Left-Ctrl. + state &= ~LEFT_CTRL_PRESSED; + + } else if ((state & RIGHT_CTRL_PRESSED) != 0) { + // Remove Right-Ctrl. + state &= ~RIGHT_CTRL_PRESSED; + } + } + + return state; +} + + +/* + * KBMapModifiers --- + * Console event modifier parser. + **/ +unsigned +KBMapModifiers(const DWORD state, int apps) +{ + unsigned modifiers = 0; + if (state & (SHIFT_PRESSED)) { + modifiers |= MODIFIER_SHIFT; + } + if (state & (LEFT_CTRL_PRESSED | RIGHT_CTRL_PRESSED)) { + modifiers |= MODIFIER_CONTROL; + } + if (state & (LEFT_ALT_PRESSED | RIGHT_ALT_PRESSED)) { + modifiers |= MODIFIER_ALT; + } + if (state & (NUMLOCK_ON)) { + modifiers |= MODIFIER_NUMLOCK; + } + if (state & (SCROLLLOCK_ON)) { + modifiers |= MODIFIER_SCROLLLOCK; + } + if (state & (CAPSLOCK_ON)) { + modifiers |= MODIFIER_CAPSLOCK; + } + if (apps && GetKeyState(VK_APPS)) { + modifiers |= MODIFIER_LOGO; // Hamburger Button, not windows key + // beware: Key toggles like CapsLock, ie: press on, when press off + } + return modifiers; +} + + +/* + * KBMapModifiers --- + * Console event modifier parser. + **/ +int +KBPrintModifiers(const DWORD state, char *buffer, size_t buflen, unsigned detailed) +{ + static const struct State { + unsigned detailed; + const char *label; + DWORD bits; + } states[] = { + // Detailed + { 0x01, "Enhanced", ENHANCED_KEY }, + { 0x01, "ScrLk", SCROLLLOCK_ON }, + { 0x01, "Caps", CAPSLOCK_ON }, + { 0x01, "NumLk", NUMLOCK_ON }, + { 0x01, "AltL", LEFT_ALT_PRESSED }, + { 0x01, "AltR", RIGHT_ALT_PRESSED }, + { 0x01, "CtrlL", LEFT_CTRL_PRESSED }, + { 0x01, "CtrlR", RIGHT_CTRL_PRESSED }, + { 0x01, "Shift", SHIFT_PRESSED }, + // Summary + { 0x00, "Alt", LEFT_ALT_PRESSED|RIGHT_ALT_PRESSED }, + { 0x00, "Ctrl", LEFT_CTRL_PRESSED|RIGHT_CTRL_PRESSED }, + { 0x00, "Shift", SHIFT_PRESSED }, + }; + + char *cursor = buffer; + unsigned modifiers = 0; + + if (NULL == buffer || 0 == buflen) + return -1; + + --buflen; // nul + + if (GetKeyState(VK_APPS)) { // hamburger key + const int len = _snprintf(cursor, buflen, "%sApps", (modifiers++ ? "-" : "")); + if ((size_t)len <= buflen) { + cursor += len, buflen -= len; + } + } + + for (const struct State *it = states, *end = states + (sizeof(states)/sizeof(states[0])); buflen && it != end; ++it) { + if (it->detailed == detailed && (state & it->bits)) { + const int len = _snprintf(cursor, buflen, "%s%s", (modifiers++ ? "-" : ""), it->label); + if ((size_t)len <= buflen) { + cursor += len, buflen -= len; + continue; + } + break; // overflow + } + } + + if (buflen) { + const int len = snprintf(cursor, buflen, "%s", (modifiers ? "-" : "")); + if ((size_t)len <= buflen) { + cursor += len, buflen -= len; + } + } + + *cursor = 0; // nul + return cursor - buffer; +} + +/*end*/ diff --git a/mcwin32/src/kbtest/kbmap.h b/mcwin32/src/kbtest/kbmap.h new file mode 100644 index 00000000..8b60b39b --- /dev/null +++ b/mcwin32/src/kbtest/kbmap.h @@ -0,0 +1,83 @@ +#ifndef KBMAP_H_INCLUDED +#define KBMAP_H_INCLUDED +#include +__CIDENT_RCSID(kbmap_h,"$Id: kbmap.h,v 1.6 2024/02/27 17:18:08 cvsuser Exp $") +__CPRAGMA_ONCE + +/* -*- mode: c; indent-width: 4; -*- */ +/* + * libtermemu console driver + * + * Copyright (c) 2015 - 2024, Adam Young. + * All rights reserved. + * + * This file is part of the WinXSH project. + * + * The applications are free software: you can redistribute it + * and/or modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation, version 3. + * + * Redistributions of source code must retain the above copyright + * notice, and must be distributed with the license document above. + * + * Redistributions in binary form must reproduce the above copyright + * notice, and must include the license document above in + * the documentation and/or other materials provided with the + * distribution. + * + * This project 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 + * License for more details. + * ==end== + */ + +#ifndef _WIN32_WINNT +#define _WIN32_WINNT 0x0500 +#endif +#ifndef WIN32_LEAN_AND_MEAN +#define WIN32_LEAN_AND_MEAN +#endif +#include + +#include + +enum key_modifier { + MODIFIER_SHIFT = (1 << 0), + MODIFIER_CONTROL = (1 << 1), + MODIFIER_ALT = (1 << 2), + MODIFIER_NUMLOCK = (1 << 3), + MODIFIER_SCROLLLOCK = (1 << 4), + MODIFIER_CAPSLOCK = (1 << 5), + MODIFIER_LOGO = (1 << 6) +}; + +#define KEY_INVALID -1 + +typedef struct event { + unsigned vkmodifiers; // Cooked VK modifiers. + unsigned vkkey; // VK_xxxx key code; otherwise 0. + unsigned vkext; // Extended VK_xxxx key code; otherwise 0. + const char *vkname; // VK symbol name; otherwise NULL. + const char *kblabel; // XKB label; otherwise NULL. + int vkenhanced; // Whether an enhanced VK, 1 otherwise 0. + unsigned kbmodifiers; // MODIFIER_XXXK(s) +__CIDENT_RCSID(kbscancode_c, "$Id: kbscancodes.h,v 1.1 2024/02/28 16:00:49 cvsuser Exp $") + +/* -*- mode: c; indent-width: 4; -*- */ +/* + * console keyboard test application + * + * Copyright (c) 2015 - 2024, Adam Young. + * All rights reserved. + * + * This file is part of the WinXSH project. + * + * The applications are free software: you can redistribute it + * and/or modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation, version 3. + * + * Redistributions of source code must retain the above copyright + * notice, and must be distributed with the license document above. + * + * Redistributions in binary form must reproduce the above copyright + * notice, and must include the license document above in + * the documentation and/or other materials provided with the + * distribution. + * + * This project 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 + * License for more details. + * ==end== + */ + +enum USScancode { + SC_Escape = 0x01, + SC_1 = 0x02, + SC_2 = 0x03, + SC_3 = 0x04, + SC_4 = 0x05, + SC_5 = 0x06, + SC_6 = 0x07, + SC_7 = 0x08, + SC_8 = 0x09, + SC_9 = 0x0A, + SC_0 = 0x0B, + SC_Minus = 0x0C, + SC_Equals = 0x0D, + SC_Backspace = 0x0E, + SC_Tab = 0x0F, + SC_Q = 0x10, + SC_W = 0x11, + SC_E = 0x12, + SC_R = 0x13, + SC_T = 0x14, + SC_Y = 0x15, + SC_U = 0x16, + SC_I = 0x17, + SC_O = 0x18, + SC_P = 0x19, + SC_BracketLeft = 0x1A, + SC_BracketRight = 0x1B, + SC_Enter = 0x1C, + SC_ControlLeft = 0x1D, + SC_A = 0x1E, + SC_S = 0x1F, + SC_D = 0x20, + SC_F = 0x21, + SC_G = 0x22, + SC_H = 0x23, + SC_J = 0x24, + SC_K = 0x25, + SC_L = 0x26, + SC_Semicolon = 0x27, + SC_Apostrophe = 0x28, + SC_Grave = 0x29, + SC_ShiftLeft = 0x2A, + SC_Backslash = 0x2B, + SC_Z = 0x2C, + SC_X = 0x2D, + SC_C = 0x2E, + SC_V = 0x2F, + SC_B = 0x30, + SC_N = 0x31, + SC_M = 0x32, + SC_Comma = 0x33, + SC_Preiod = 0x34, + SC_Slash = 0x35, + SC_ShiftRight = 0x36, + SC_Numpad_multiply = 0x37, + SC_AltLeft = 0x38, + SC_Space = 0x39, + SC_CapsLock = 0x3A, + SC_F1 = 0x3B, + SC_F2 = 0x3C, + SC_F3 = 0x3D, + SC_F4 = 0x3E, + SC_F5 = 0x3F, + SC_F6 = 0x40, + SC_F7 = 0x41, + SC_F8 = 0x42, + SC_F9 = 0x43, + SC_F10 = 0x44, + SC_NumLock = 0x45, + SC_ScrollLock = 0x46, + SC_Numpad_7 = 0x47, + SC_Numpad_8 = 0x48, + SC_Numpad_9 = 0x49, + SC_Numpad_minus = 0x4A, + SC_Numpad_4 = 0x4B, + SC_Numpad_5 = 0x4C, + SC_Numpad_6 = 0x4D, + SC_Numpad_plus = 0x4E, + SC_Numpad_1 = 0x4F, + SC_Numpad_2 = 0x50, + SC_Numpad_3 = 0x51, + SC_Numpad_0 = 0x52, + SC_Numpad_period = 0x53, + SC_Alt_printScreen = 0x54, /* Alt + print screen. MapVirtualKeyEx( VK_SNAPSHOT, MAPVK_VK_TO_VSC_EX, 0 ) returns scancode 0x54. */ + SC_BracketAngle = 0x56, /* Key between the left shift and Z. */ + SC_F11 = 0x57, + SC_F12 = 0x58, + SC_OEM_1 = 0x5a, /* VK_OEM_WSCTRL */ + SC_OEM_2 = 0x5b, /* VK_OEM_FINISH */ + SC_OEM_3 = 0x5c, /* VK_OEM_JUMP */ + SC_EraseEOF = 0x5d, + SC_OEM_4 = 0x5e, /* VK_OEM_BACKTAB */ + SC_OEM_5 = 0x5f, /* VK_OEM_AUTO */ + SC_Zoom = 0x62, + SC_Help = 0x63, + SC_F13 = 0x64, + SC_F14 = 0x65, + SC_F15 = 0x66, + SC_F16 = 0x67, + SC_F17 = 0x68, + SC_F18 = 0x69, + SC_F19 = 0x6a, + SC_F20 = 0x6b, + SC_F21 = 0x6c, + SC_F22 = 0x6d, + SC_F23 = 0x6e, + SC_OEM_6 = 0x6f, /* VK_OEM_PA3 */ + SC_Katakana = 0x70, + SC_OEM_7 = 0x71, /* VK_OEM_RESET */ + SC_F24 = 0x76, + SC_Sbcschar = 0x77, + SC_Convert = 0x79, + SC_Nonconvert = 0x7B, /* VK_OEM_PA1 */ + + SC_Media_previous = 0xE010, + SC_Media_next = 0xE019, + SC_Numpad_enter = 0xE01C, + SC_ControlRight = 0xE01D, + SC_Volume_mute = 0xE020, + SC_Launch_app2 = 0xE021, + SC_Media_play = 0xE022, + SC_Media_stop = 0xE024, + SC_Volume_down = 0xE02E, + SC_Volume_up = 0xE030, + SC_Browser_home = 0xE032, + SC_Numpad_divide = 0xE035, + SC_PrintScreen = 0xE037, + /* + SC_PrintScreen: + - mAke: 0xE02A 0xE037 + - bReak: 0xE0B7 0xE0AA + - MApVirtualKeyEx( VK_SNAPSHOT, MAPVK_VK_TO_VSC_EX, 0 ) returns scancode 0x54; + - THere is no VK_KEYDOWN with VK_SNAPSHOT. + */ + SC_AltRight = 0xE038, + SC_Cancel = 0xE046, /* CTRL + Pause */ + SC_Home = 0xE047, + SC_ArrowUp = 0xE048, + SC_PageUp = 0xE049, + SC_ArrowLeft = 0xE04B, + SC_ArrowRight = 0xE04D, + SC_End = 0xE04F, + SC_ArrowDown = 0xE050, + SC_PageDown = 0xE051, + SC_Insert = 0xE052, + SC_Delete = 0xE053, + SC_MetaLeft = 0xE05B, + SC_MetaRight = 0xE05C, + SC_Application = 0xE05D, + SC_Power = 0xE05E, + SC_Sleep = 0xE05F, + SC_Wake = 0xE063, + SC_Browser_search = 0xE065, + SC_Browser_favorites = 0xE066, + SC_Browser_refresh = 0xE067, + SC_Browser_stop = 0xE068, + SC_Browser_forward = 0xE069, + SC_Browser_back = 0xE06A, + SC_Launch_app1 = 0xE06B, + SC_Launch_email = 0xE06C, + SC_Launch_media = 0xE06D, + + SC_Pause = 0xE11D45, + /* + SC_Pause: + - make: 0xE11D 45 0xE19D C5 + - make in raw input: 0xE11D 0x45 + - break: none + - No repeat when you hold the key down + */ +}; + +//end diff --git a/mcwin32/src/kbtest/kbtest.c b/mcwin32/src/kbtest/kbtest.c new file mode 100644 index 00000000..e1a08948 --- /dev/null +++ b/mcwin32/src/kbtest/kbtest.c @@ -0,0 +1,719 @@ +#include +__CIDENT_RCSID(btest_c,"$Id: kbtest.c,v 1.9 2024/02/28 15:55:21 cvsuser Exp $") + +/* -*- mode: c; indent-width: 4; -*- */ +/* + * console keyboard test application + * + * Copyright (c) 2015 - 2024, Adam Young. + * All rights reserved. + * + * This file is part of the WinXSH project. + * + * The applications are free software: you can redistribute it + * and/or modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation, version 3. + * + * Redistributions of source code must retain the above copyright + * notice, and must be distributed with the license document above. + * + * Redistributions in binary form must reproduce the above copyright + * notice, and must include the license document above in + * the documentation and/or other materials provided with the + * distribution. + * + * This project 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 + * License for more details. + * ==end== + */ + +#ifndef _WIN32_WINNT +#define _WIN32_WINNT 0x0500 +#endif +#ifndef WIN32_LEAN_AND_MEAN +#define WIN32_LEAN_AND_MEAN +#endif +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "expat.h" + +#include "kbmap.h" +#include "kbconsole.h" +#include "kbdefinition.h" +#include "kblayout.h" +#include "kbdump.h" + +#include "kbbuildinfo.h" +#include "kbutil.h" + +struct iobuf { + unsigned length; + unsigned char text[128]; +}; + +struct record { + key_event_t evt; + const char *str; + int key; +}; + +#if !defined(ENABLE_VIRTUAL_TERMINAL_PROCESSING) +#define ENABLE_VIRTUAL_TERMINAL_PROCESSING 0x0004 + // When writing with WriteFile or WriteConsole, characters are parsed for VT100 and similar control + // character sequences that control cursor movement, color/font mode, and other operations that can + // also be performed via the existing Console APIs. +#endif +#if !defined(DISABLE_NEWLINE_AUTO_RETURN) +#define DISABLE_NEWLINE_AUTO_RETURN 0x0008 + // When writing with WriteFile or WriteConsole, this adds an additional state to end-of-line wrapping + // that can delay the cursor move and buffer scroll operations. +#endif + +#define VKS_DONE 0x01 // VK key status +#define VKS_SHIFT 0x02 +#define VKS_CTRL 0x04 +#define VKS_ALT 0x08 +#define VKS_APPS 0x10 +#define VKS_PRESS 0x40 +#define VKS_ON 0x80 + +static void EnvironmentStatus(void); + +static void KeyboardPush(HANDLE console, const struct KBRow **rows, BYTE *status, const key_event_t *evt); +static void KeyboardStatus(HANDLE console, const struct KBRow **rows, BYTE *status); +static int KeyboardKey(HANDLE console, unsigned height, const struct KBRow *key, BYTE *status); + +static void Usage(const char *msg, ...); +static void Version(void); + +static BOOL WINAPI ConsoleHandler(DWORD dwCtrlType); +static void XKBTranslation(const key_event_t *evt); +static const char *latin1name(unsigned value); + +static volatile int ctrl_break = 0; + +#define SHORTOPTIONS "ak:l:V" + +static const struct option long_options[] = { + { "help", no_argument, NULL, 1000 }, + { "klid", required_argument, NULL, 'k' }, + { "layout", required_argument, NULL, 'l' }, + { "version", no_argument, NULL, 'V' }, + { NULL } + }; + +static unsigned oklid = 0; +static const char *olayout = NULL; + +int +main(int argc, char *argv[]) +{ + char szKLID[KL_NAMELENGTH] = {0}; + DWORD consolemode = 0, oconsolemode = 0; + BYTE vkstatus[256*3 /*vk,VK+,ascii*/] = {0}; + + const struct KBDefinition *layout = NULL; + const struct KBRow **rows = KBLayoutDefault(); + HANDLE console, oconsole; + const char *cmd = ""; + INPUT_RECORD ir; + int esc = 0, ch; + + // command line + while ((ch = getopt_long(argc, argv, SHORTOPTIONS, long_options, NULL)) != -1) + switch(ch) { + case 'k': // --klid= + oklid = (unsigned) strtoull(optarg, NULL, 0); + break; + case 'l': // --layout= + olayout = optarg; + break; + case 'V': // --version + Version(); + break; + case 1000: // --help + case '?': + Usage(NULL); + break; + } + argv += optind; + if ((argc -= optind) < 1) { + Usage("missing command"); + } else if (argc > 1) { + Usage("unexpected argument(s) <%s ...>", argv[1]); + } + + cmd = argv[0]; + if (0 != strcmp(cmd, "dump") && 0 != strcmp(cmd, "test")) { + Usage("invalid command <%s>", argv[0]); + } + + // setup + console = GetStdHandle(STD_INPUT_HANDLE); + oconsole = GetStdHandle(STD_OUTPUT_HANDLE); + + if (oklid) { // optional KLID + char t_szKLID[KL_NAMELENGTH] = {0}; + + snprintf(t_szKLID, sizeof(t_szKLID), "%08u", oklid); + GetKeyboardLayoutNameA(szKLID); + LoadKeyboardLayoutA(t_szKLID, KLF_ACTIVATE); + + // Layout must be already loaded, inform GUI + // PostMessage(GetConsoleWindow(), WM_INPUTLANGCHANGEREQUEST, 0, (LPARAM)klid); + } + + if (olayout) { // external layout + if (NULL == (layout = KBDefinitionLoad(olayout))) + exit(EXIT_FAILURE); + rows = KBLayoutBuild(layout); + } else { + layout = KBDefinitionCurrent(); + rows = KBLayoutBuild(layout); + } + + // execute + if (0 == strcmp(cmd, "dump")) { + EnvironmentStatus(); + KBDump(layout); + return 0; + } + + if (! GetConsoleMode(console, &consolemode) || + ! GetConsoleMode(oconsole, &oconsolemode)) { + Usage("console expected"); + } + + SetConsoleMode(console, ENABLE_WINDOW_INPUT); + SetConsoleMode(oconsole, oconsolemode | \ + ENABLE_VIRTUAL_TERMINAL_PROCESSING | DISABLE_NEWLINE_AUTO_RETURN); + SetConsoleCtrlHandler(ConsoleHandler, TRUE); + + ConsoleClear(oconsole); // prime display + KeyboardStatus(oconsole, rows, vkstatus); + EnvironmentStatus(); + cprinta("Press consecutively 3 times to exit.\n"); + + while (! ctrl_break && esc < 3) { // foreach(key) + const KEY_EVENT_RECORD *key = &ir.Event.KeyEvent; + char modifiers[128]; + key_event_t evt = {0}; + unsigned scanCode; + DWORD count; + int cio = 1; + + // next event + if (WAIT_OBJECT_0 != WaitForSingleObject(console, INFINITE) || ctrl_break || + 0 == ReadConsoleInputW(console, &ir, 1, &count) || ctrl_break) { + break; // eof or Ctrl-Break + } + + if (WINDOW_BUFFER_SIZE_EVENT == ir.EventType) { + ConsoleClear(oconsole); + KeyboardStatus(oconsole, rows, vkstatus); + EnvironmentStatus(); + continue; + } else if (!count || ir.EventType != KEY_EVENT || !key->bKeyDown) { + continue; // ignore non-key down events + } + + // decode event + esc = (0x1b == key->uChar.AsciiChar ? esc + 1 : 0); + cio = KBMapEvent(key, &evt); + + ConsoleHome(oconsole); + KeyboardPush(oconsole, rows, vkstatus, &evt); + + scanCode = key->wVirtualScanCode | (key->dwControlKeyState & ENHANCED_KEY ? 0xE000 : 0); + KBPrintModifiers(key->dwControlKeyState, modifiers, sizeof(modifiers), TRUE); + if (key->uChar.AsciiChar >= 0x20 && key->uChar.AsciiChar < 0x7f /*isprint*/) { // ASCII + cprinta("%sVK:%u/0x%x SCAN:0x%04x/0x%04X Ascii(0x%x/%c) ", + modifiers, key->wVirtualKeyCode, key->wVirtualKeyCode, key->wVirtualScanCode, scanCode, key->uChar.AsciiChar, key->uChar.AsciiChar); + } else { // UNICODE + cprinta("%sVK:%u/0x%x SCAN:0x%04x/0x%04X Unicode(0x%x) ", + modifiers, key->wVirtualKeyCode, key->wVirtualKeyCode, key->wVirtualScanCode, scanCode, key->uChar.UnicodeChar); + } + XKBTranslation(&evt); + + // decode KEY_EVENT + if (cio) { + KBPrintModifiers(evt.vkmodifiers, modifiers, sizeof(modifiers), FALSE); + cprinta("\n => %sVK(%u) ASCII(0x%x/%c)", + modifiers, evt.vkkey, evt.ascii, (evt.ascii >= 0x20 && evt.ascii <= 0x7f ? evt.ascii : ' ')); + if (evt.unicode != KEY_INVALID) { + cprintw(L" UNICODE(U+%0*x/%c)", (evt.unicode & 0xff0000 ? 6 : 4), (unsigned)evt.unicode, (unsigned)evt.unicode); + } + } else { + cprinta("\n => "); + } + EnvironmentStatus(); + } + + if (szKLID[0]) LoadKeyboardLayoutA(szKLID, KLF_ACTIVATE); + SetConsoleMode(oconsole, oconsolemode); + SetConsoleMode(console, consolemode); + return 0; +} + + +/* + * KeyboardPush --- + * Push the event status into the keyboard-status buffer. + **/ +static void +KeyboardPush(HANDLE console, const struct KBRow **rows, BYTE *status, const key_event_t *evt) +{ + if (evt->vkext) { // extended key-code. + const unsigned vkext = evt->vkext; + if (evt->vkenhanced) { + /*if (0 == evt->vkmodifier)*/ status[vkext|VK_ISENHANCED] |= VKS_DONE; + status[vkext|VK_ISENHANCED] |= VKS_PRESS; + } else { + /*if (0 == evt->vkmodifier)*/ status[vkext] |= VKS_DONE; + status[vkext] |= VKS_PRESS; + } + } + + if (evt->vkkey) { // primary key-code + const unsigned modifiers = evt->kbmodifiers; + const unsigned vkkey = evt->vkkey; + + if (evt->vkenhanced) { + /*if (0 == evt->vkmodifier)*/ status[vkkey|VK_ISENHANCED] |= VKS_DONE; + status[vkkey|VK_ISENHANCED] |= VKS_PRESS; + } else { + /*if (0 == evt->vkmodifier)*/ status[vkkey] |= VKS_DONE; + status[vkkey] |= VKS_PRESS; + } + + status[VK_SHIFT|VK_ISENHANCED] = 0; + if (modifiers & MODIFIER_SHIFT) { + status[VK_SHIFT|VK_ISENHANCED] = VKS_ON; + status[vkkey] |= VKS_SHIFT; + } + + status[VK_CONTROL|VK_ISENHANCED] = 0; + if (modifiers & MODIFIER_CONTROL) { + status[VK_CONTROL|VK_ISENHANCED] = VKS_ON; + status[vkkey] |= VKS_CTRL; + } + + status[VK_MENU|VK_ISENHANCED] = 0; + if (modifiers & MODIFIER_ALT) { + status[VK_MENU|VK_ISENHANCED] = VKS_ON; + status[vkkey] |= VKS_ALT; + } + + status[VK_APPS|VK_ISENHANCED] = 0; + if (modifiers & MODIFIER_LOGO) { + status[VK_APPS|VK_ISENHANCED] = VKS_ON; + status[vkkey] |= VKS_APPS; + } + } + + KeyboardStatus(console, rows, status); +} + + +/* + * EnvironmentStatus + */ +static void +EnvironmentStatus(void) +{ + wchar_t klid[KL_NAMELENGTH] = { 0 }; + wchar_t iso639[16] = { 0 }, iso3166[16] = { 0 }, displayname[256] = { 0 }; + const LCID slcid = GetSystemDefaultLCID(); + const LCID ulcid = GetUserDefaultLCID(); + const LCID tlcid = GetThreadLocale(); + + cprintw(L"\n"); + + GetKeyboardLayoutNameW(klid); + cprintw(L"\nKLID: <%s>, type=0x%x/0x%x, fns=%u", klid, GetKeyboardType(0), GetKeyboardType(1), GetKeyboardType(2)); + + cprintw(L"\nLCID:"); + cprintw(L" sys=%u/0x%x", slcid, slcid); + if (GetLocaleInfoW(slcid, LOCALE_SISO639LANGNAME, iso639, _countof(iso639)) && + GetLocaleInfoW(slcid, LOCALE_SISO3166CTRYNAME, iso3166, _countof(iso3166))) { + GetLocaleInfoW(slcid, LOCALE_SLOCALIZEDCOUNTRYNAME, displayname, _countof(displayname)); + cprintw(L" <%s_%s> (%s)", iso639, iso3166, displayname); // "9_9 (displayname)" + } + + cprintw(L", user=%u/0x%x", ulcid, ulcid); + if (GetLocaleInfoW(ulcid, LOCALE_SISO639LANGNAME, iso639, _countof(iso639)) && + GetLocaleInfoW(ulcid, LOCALE_SISO3166CTRYNAME, iso3166, _countof(iso3166))) { + GetLocaleInfoW(ulcid, LOCALE_SLOCALIZEDCOUNTRYNAME, displayname, _countof(displayname)); + cprintw(L" <%s_%s> (%s)", iso639, iso3166, displayname); // "9_9 (displayname)" + } + + cprintw(L", thr=%u/0x%x", tlcid, tlcid); + if (GetLocaleInfoW(tlcid, LOCALE_SISO639LANGNAME, iso639, _countof(iso639)) && + GetLocaleInfoW(tlcid, LOCALE_SISO3166CTRYNAME, iso3166, _countof(iso3166))) { + GetLocaleInfoW(tlcid, LOCALE_SLOCALIZEDCOUNTRYNAME, displayname, _countof(displayname)); + cprintw(L" <%s_%s> (%s)", iso639, iso3166, displayname); // "9_9 (displayname)" + } + + cprintw(L"\nCP: oem=%u/0x%x, acp=%u/0x%x, cin=%u/0x%x, cout=%u/0x%x", + GetOEMCP(), GetOEMCP(), GetACP(), GetACP(), GetConsoleCP(), GetConsoleCP(), GetConsoleOutputCP(), GetConsoleOutputCP()); + + cprintw(L"\n\n"); +} + + +/* + * KeyboardStatus --- + * Echo the current keyboard status. + **/ +static void +KeyboardStatus(HANDLE console, const struct KBRow **rows, BYTE *status) +{ + COORD coord = {0, 1}; + const struct KBRow *key; + unsigned r, c; + + for (r = 0; rows[r]; ++r) { + for (c = 0, key = rows[r]; key->vk; ++key) { + coord.X = (SHORT)(c + 1); + SetConsoleCursorPosition(console, coord); + c += KeyboardKey(console, 2, key, status); + } + ConsoleCEOL(console); + coord.Y += 1; + + for (c = 0, key = rows[r]; key->vk; ++key) { + coord.X = (SHORT)(c + 1); + SetConsoleCursorPosition(console, coord); + c += KeyboardKey(console, 1, key, status); + } + ConsoleCEOL(console); + coord.Y += 2; + } + coord.X = 0; + SetConsoleCursorPosition(console, coord); +} + + +/* + * KeyboardKey --- + * Echo the specified key status. + **/ +static int +KeyboardKey(HANDLE console, unsigned line, const struct KBRow *key, BYTE *status) +{ + const int vk = key->vk; + + if (vk > 0) { + const wchar_t t_name[2] = {(wchar_t) '?', 0}; + const wchar_t *label = (2 == line ? (key->label2 ? key->label2 : L"") : + (key->label1 ? key->label1 : t_name)); + const WORD vkstatus = status[vk]; + WCHAR wbuffer[128] = {0}; + DWORD len1, len2; + int length, width; + + length = wcslen(label); + width = (key->width ? key->width : 4); // default=4 + if (length >= width) { // limit + len1 = wnsprintfW(wbuffer, _countof(wbuffer)-1, L"%-*.*s", width, width, label); + } else { // center + const int extra = width - length, left = extra / 2; + len1 = wnsprintfW(wbuffer, _countof(wbuffer)-1, L"%*s%s%*s", left, L"", label, width - (left + length), L""); + } + + if (1 == line && key->label3) { // AltGr + length = wcslen(key->label3); + if (length) { + wbuffer[len1 - 1] = key->label3[0]; + } + } + + SetConsoleTextAttribute(console, FOREGROUND_RED|FOREGROUND_GREEN|FOREGROUND_BLUE|FOREGROUND_INTENSITY| + ((vkstatus & VKS_PRESS) ? BACKGROUND_GREEN : + ((vkstatus & VKS_DONE) ? BACKGROUND_RED : + ((vkstatus & VKS_ON) ? BACKGROUND_BLUE : BACKGROUND_INTENSITY)))); + WriteConsoleW(console, wbuffer, len1, NULL, NULL); + + len2 = wsprintfW(wbuffer, L"%c%c%c", // control bits, width=3 + (vkstatus & VKS_SHIFT) ? 'S' : ' ', (vkstatus & VKS_CTRL) ? 'C' : ' ', (vkstatus & VKS_ALT) ? 'A' : ' '); + SetConsoleTextAttribute(console, FOREGROUND_RED|FOREGROUND_GREEN|FOREGROUND_BLUE); + WriteConsoleW(console, wbuffer, len2, NULL, NULL); + + if (1 == line && (vkstatus & VKS_PRESS)) + status[vk] &= ~VKS_PRESS; + + return len1 + len2 + 1; + } + + if (key->width) return key->width; + return 8; //4+3+1 +} + + +/* + * Usage --- + * Command line usage. + **/ +static void +Usage(const char *msg, ...) +{ + if (msg) { + va_list ap; + va_start(ap, msg); + printf("kbtest: "); vprintf(msg, ap); printf("\n\n"); + va_end(ap); + } + + printf("kbtest - keyboard encode test application\n" \ + "\n" \ + "usage: kbtest [options] keyboard layout ID.\n" \ + " --layout= Layout definition.\n" \ + "\n" \ + " --version application version.\n" \ + " --help command line.\n" \ + "\n" \ + "Commands:\n" \ + " dump report keyboard definition.\n" \ + " test interactive.\n" \ + "\n"); + exit(3); + /*NOTREACHED*/ +} + + +/* + * Version --- + * Application build information. + **/ +static void +Version(void) +{ + printf("kbtest - keyboard encode test application\n"); + exit(3); + /*NOTREACHED*/ +} + + +/* + * HandlerRoutine --- + * Console event/signal handler. + **/ +static BOOL WINAPI +ConsoleHandler(DWORD dwCtrlType) +{ + switch(dwCtrlType) { + case 3: // 3 is reserved! + case 4: // 4 is reserved! + assert(0); + break; + case CTRL_BREAK_EVENT: // Ctrl-Break + ++ctrl_break; // exit main-loop + SetEvent(GetStdHandle(STD_INPUT_HANDLE)); + return TRUE; + } + return FALSE; +} + + +static void +XKBTranslation(const key_event_t *evt) +{ + char text[128] = {0}, *cursor = text; + const char *name; + + // modifiers + if (evt->kbmodifiers) { + const unsigned kbmodifiers = evt->kbmodifiers; + unsigned modifiers = 0; + + if (kbmodifiers & MODIFIER_LOGO ) cursor += sprintf(cursor, "%sLogo", (modifiers++ ? "-" : "")); + if (kbmodifiers & MODIFIER_ALT ) cursor += sprintf(cursor, "%sAlt", (modifiers++ ? "-" : "")); + if (kbmodifiers & MODIFIER_CONTROL) cursor += sprintf(cursor, "%sCtrl", (modifiers++ ? "-" : "")); + if (kbmodifiers & MODIFIER_SHIFT ) cursor += sprintf(cursor, "%sShift", (modifiers++ ? "-" : "")); + } + + // event + cursor += sprintf(cursor, ""); + if (evt->kblabel) { // resolved key-symbol. + cursor += sprintf(cursor, "%s", evt->kblabel); + + } else if (evt->ascii && NULL != (name = latin1name(evt->ascii))) { + cursor += sprintf(cursor, "%s", name); // latin1 key-symbol. + + } else if (evt->vkname) { // VK name. + cursor += sprintf(cursor, "%s", evt->vkname); + + } else if (evt->ascii >= 0x20 && evt->ascii <= 0x7f /*isprint*/) { + cursor += sprintf(cursor, "%c", evt->ascii); // value; unshifted see cio decoder. + + } else if (evt->unicode != KEY_INVALID) { + cursor += sprintf(cursor, "0x%u", evt->unicode); // unicode. + } + + assert(cursor < (text + sizeof(text))); + cprinta("XKB: %s", text); +} + + +static const char * +latin1name(unsigned value) +{ + switch (value) { + // controls + + case 0x20: return "space"; // ! ! + case 0x21: return "exclam"; // ! ! ! + case 0x22: return "quotedbl"; // ! " ! + case 0x23: return "numbersign"; // ! # ! + case 0x24: return "dollar"; // ! $ ! + case 0x25: return "percent"; // ! % ! + case 0x26: return "ampersand"; // ! & ! + case 0x27: return "apostrophe"; // ! \ ! + case 0x28: return "parenleft"; // ! ( ! + case 0x29: return "parenright"; // ! ) ! + case 0x2a: return "asterisk"; // ! * ! + case 0x2b: return "plus"; // ! + ! + case 0x2c: return "comma"; // ! , ! + case 0x2d: return "minus"; // ! - ! + case 0x2e: return "period"; // ! . ! + case 0x2f: return "slash"; // ! / ! + // 0 .. 9 + case 0x3a: return "colon"; // ! : ! + case 0x3b: return "semicolon"; // ! ; ! + case 0x3c: return "less "; // ! < ! + case 0x3d: return "equal"; // ! = ! + case 0x3e: return "greater"; // ! > ! + case 0x3f: return "question"; // ! ? ! + case 0x40: return "at"; // ! @ ! + // A .. Z + case 0x5b: return "bracketleft"; // ! [ ! + case 0x5c: return "backslash"; // ! \ ! + case 0x5d: return "bracketright"; // ! ] ! + case 0x5e: return "asciicircum"; // ! ^ ! + case 0x5f: return "underscore"; // ! _ ! + // a .. z + case 0x60: return "grave"; // ! ` ! + case 0x7b: return "braceleft"; // ! { ! + case 0x7c: return "bar"; // ! | ! + case 0x7d: return "braceright"; // ! } ! + case 0x7e: return "asciitilde"; // ! ~ ! + // controls + + // Latin1 + case 0xa0: return "nobreakspace"; // ! ! + case 0xa1: return "exclamdown"; // ! ! + case 0xa2: return "cent"; // ! ! + case 0xa3: return "sterling"; // ! ! + case 0xa4: return "currency"; // ! ! + case 0xa5: return "yen"; // ! ! + case 0xa6: return "brokenbar"; // ! ! + case 0xa7: return "section"; // ! ! + case 0xa8: return "diaeresis"; // ! ! + case 0xa9: return "copyright"; // ! ! + case 0xaa: return "ordfeminine"; // ! ! + case 0xab: return "guillemotleft"; // ! ! + case 0xac: return "notsign"; // ! ! + case 0xad: return "hyphen"; // ! ! + case 0xae: return "registered"; // ! ! + case 0xaf: return "macron"; // ! ! + case 0xb0: return "degree"; // ! ! + case 0xb1: return "plusminus"; // ! ! + case 0xb2: return "twosuperior"; // ! ! + case 0xb3: return "threesuperior"; // ! ! + case 0xb4: return "acute"; // ! ! + case 0xb5: return "mu"; // ! ! + case 0xb6: return "paragraph"; // ! ! + case 0xb7: return "periodcentere"; // ! ! + case 0xb8: return "cedilla"; // ! ! + case 0xb9: return "onesuperior"; // ! ! + case 0xba: return "masculine"; // ! ! + case 0xbb: return "guillemotrigh"; // ! ! + case 0xbc: return "onequarter"; // ! ! + case 0xbd: return "onehalf"; // ! ! + case 0xbe: return "threequarters"; // ! ! + case 0xbf: return "questiondown"; // ! ! + case 0xc0: return "Agrave"; // ! ! + case 0xc1: return "Aacute"; // ! ! + case 0xc2: return "Acircumflex"; // ! ! + case 0xc3: return "Atilde"; // ! ! + case 0xc4: return "Adiaeresis"; // ! ! + case 0xc5: return "Aring"; // ! ! + case 0xc6: return "AE"; // ! ! + case 0xc7: return "Ccedilla"; // ! ! + case 0xc8: return "Egrave"; // ! ! + case 0xc9: return "Eacute"; // ! ! + case 0xca: return "Ecircumflex"; // ! ! + case 0xcb: return "Ediaeresis"; // ! ! + case 0xcc: return "Igrave"; // ! ! + case 0xcd: return "Iacute"; // ! ! + case 0xce: return "Icircumflex"; // ! ! + case 0xcf: return "Idiaeresis"; // ! ! + case 0xd0: return "ETH"; // ! ! + case 0xd1: return "Ntilde"; // ! ! + case 0xd2: return "Ograve"; // ! ! + case 0xd3: return "Oacute"; // ! ! + case 0xd4: return "Ocircumflex"; // ! ! + case 0xd5: return "Otilde"; // ! ! + case 0xd6: return "Odiaeresis"; // ! ! + case 0xd7: return "multiply"; // ! ! + case 0xd8: return "Ooblique"; // ! ! + case 0xd9: return "Ugrave"; // ! ! + case 0xda: return "Uacute"; // ! ! + case 0xdb: return "Ucircumflex"; // ! ! + case 0xdc: return "Udiaeresis"; // ! ! + case 0xdd: return "Yacute"; // ! ! + case 0xde: return "THORN"; // ! ! + case 0xdf: return "ssharp"; // ! ! + case 0xe0: return "agrave"; // ! ! + case 0xe1: return "aacute"; // ! ! + case 0xe2: return "acircumflex"; // ! ! + case 0xe3: return "atilde"; // ! ! + case 0xe4: return "adiaeresis"; // ! ! + case 0xe5: return "aring"; // ! ! + case 0xe6: return "ae"; // ! ! + case 0xe7: return "ccedilla"; // ! ! + case 0xe8: return "egrave"; // ! ! + case 0xe9: return "eacute"; // ! ! + case 0xea: return "ecircumflex"; // ! ! + case 0xeb: return "ediaeresis"; // ! ! + case 0xec: return "igrave"; // ! ! + case 0xed: return "iacute"; // ! ! + case 0xee: return "icircumflex"; // ! ! + case 0xef: return "idiaeresis"; // ! ! + case 0xf0: return "eth"; // ! ! + case 0xf1: return "ntilde"; // ! ! + case 0xf2: return "ograve"; // ! ! + case 0xf3: return "oacute"; // ! ! + case 0xf4: return "ocircumflex"; // ! ! + case 0xf5: return "otilde"; // ! ! + case 0xf6: return "odiaeresis"; // ! ! + case 0xf7: return "division"; // ! ! + case 0xf8: return "oslash"; // ! ! + case 0xf9: return "ugrave"; // ! ! + case 0xfa: return "uacute"; // ! ! + case 0xfb: return "ucircumflex"; // ! ! + case 0xfc: return "udiaeresis"; // ! ! + case 0xfd: return "yacute"; // ! ! + case 0xfe: return "thorn"; // ! ! + case 0xff: return "ydiaeresis"; // ! ! + } + return NULL; +} + +/*end*/ diff --git a/mcwin32/src/kbtest/kbtest.rc b/mcwin32/src/kbtest/kbtest.rc new file mode 100644 index 00000000..9022a85d --- /dev/null +++ b/mcwin32/src/kbtest/kbtest.rc @@ -0,0 +1,124 @@ +/* + * windows resource file + * + * This file is part of the Midnight Commander. + * + * The Midnight Commander is free software: you can redistribute it + * and/or modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation, either version 3 of the License, + * or (at your option) any later version. + * + * The Midnight Commander 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 General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#ifndef WINDRES +#include "windows.h" +#include "winver.h" +#endif + +#include "kbbuildinfo.h" + +#define RC_PRODUCTVERSION VERSION_1 , VERSION_2 , VERSION_3 , VERSION_4 +#define RC_FILEVERSION VERSION_1 , VERSION_2 , VERSION_3 , VERSION_4 + +/* + * English (U.S.) resources + */ + +#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU) + +#ifdef _WIN32 +#ifndef WINDRES +LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US +#endif +#pragma code_page(1252) +#endif /* _WIN32 */ + +/* + * Manifest + */ +#ifndef RT_MANIFEST +#define RT_MANIFEST 24 +#endif +#ifndef CREATEPROCESS_MANIFEST_RESOURCE_ID +#define CREATEPROCESS_MANIFEST_RESOURCE_ID 1 +#endif + +/* + * Updater Meta Data + * nameID typeID { raw data } + */ + +UPDATER HostURL { "\0" } +UPDATER Channel { "release\0" } + + +/* + * Version Information + */ + +VS_VERSION_INFO VERSIONINFO +#if defined(RC_FILEVERSION) + FILEVERSION RC_FILEVERSION + PRODUCTVERSION RC_PRODUCTVERSION +#endif + FILEFLAGSMASK VS_FFI_FILEFLAGSMASK +#ifdef _DEBUG + FILEFLAGS (VS_FF_SPECIALBUILD|VS_FF_DEBUG) +#else + FILEFLAGS (VS_FF_SPECIALBUILD) +#endif + FILEOS VOS_NT_WINDOWS32 + FILETYPE VFT_APP + FILESUBTYPE VFT2_UNKNOWN + BEGIN + BLOCK "StringFileInfo" + BEGIN + BLOCK "040904E4" + BEGIN + VALUE "CompanyName", "" + + VALUE "FileDescription", "KBTest" + + VALUE "FileVersion", VERSION ", Build:" BUILD_DATE "-" BUILD_NUMBER /* match mc.rc */ + + VALUE "InternalName", "Console keyboard tester" + + VALUE "Copyright", + "Copyright (C) 2024, Adam Young. All rights reserved. \n" + "Copyright (c) 1998-2000 Thai Open Source Software Center Ltd and Clark Cooper. \n" + "Copyright (c) 2001-2019 Expat maintainers. \n" + "This is free software; see the source for copying conditions. \n" + "There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. \n" + + VALUE "Maintainers", "https://github.com/adamyg/mcwin32" + + VALUE "LegalTrademarks", "see MC License" + + VALUE "OriginalFilename", "kbtest.exe" + + VALUE "ProductName", "KBTest" /* match mc.rc */ + END + END + + /* The following line should only be modified for localized versions. */ + /* It consists of any number of WORD,WORD pairs, with each pair */ + /* describing a language,codepage combination supported by the file. */ + /* */ + /* For example, a file might have values "0x409,1252" indicating that it */ + /* supports English language (0x409) in the Windows ANSI codepage (1252). */ + + BLOCK "VarFileInfo" + BEGIN + VALUE "Translation", 0x409, 1252 + END + END + +#endif /* English (U.S.) resources */ + diff --git a/mcwin32/src/kbtest/kbutil.h b/mcwin32/src/kbtest/kbutil.h new file mode 100644 index 00000000..5f3c0573 --- /dev/null +++ b/mcwin32/src/kbtest/kbutil.h @@ -0,0 +1,42 @@ +#ifndef KBUTIL_H_INCLUDED +#define KBUTIL_H_INCLUDED +#include +__CIDENT_RCSID(kbutil_h,"$Id: kbutil.h,v 1.1 2024/02/27 17:18:08 cvsuser Exp $") +__CPRAGMA_ONCE + +/* -*- mode: c; indent-width: 4; -*- */ +/* + * console keyboard test application + * + * Copyright (c) 2024, Adam Young. + * All rights reserved. + * + * This file is part of the WinXSH project. + * + * The applications are free software: you can redistribute it + * and/or modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation, version 3. + * + * Redistributions of source code must retain the above copyright + * notice, and must be distributed with the license document above. + * + * Redistributions in binary form must reproduce the above copyright + * notice, and must include the license document above in + * the documentation and/or other materials provided with the + * distribution. + * + * This project 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 + * License for more details. + * ==end== + */ + +#if !defined(_countof) +#define _countof(a) (sizeof(a)/sizeof(a[0])) +#endif + +#endif //KBUTIL_H_INCLUDED + +//end + diff --git a/mcwin32/src/kbtest/kbvirtualextra.h b/mcwin32/src/kbtest/kbvirtualextra.h new file mode 100644 index 00000000..6dc175bb --- /dev/null +++ b/mcwin32/src/kbtest/kbvirtualextra.h @@ -0,0 +1,86 @@ +/* -*- mode: c; indent-width: 4; -*- */ +/* + * libtermemu console driver + * + * Copyright (c) 2024, Adam Young. + * All rights reserved. + * + * This file is part of the WinXSH project. + * + * The applications are free software: you can redistribute it + * and/or modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation, version 3. + * + * Redistributions of source code must retain the above copyright + * notice, and must be distributed with the license document above. + * + * Redistributions in binary form must reproduce the above copyright + * notice, and must include the license document above in + * the documentation and/or other materials provided with the + * distribution. + * + * This project 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 + * License for more details. + * ==end== + */ + +#if !defined(VK_0) +#define VK_0 0x30 // 0x30 - 0 key +#define VK_1 0x31 // 0x31 - 1 key +#define VK_2 0x32 // 0x32 - 2 key +#define VK_3 0x33 // 0x33 - 3 key +#define VK_4 0x34 // 0x34 - 4 key +#define VK_5 0x35 // 0x35 - 5 key +#define VK_6 0x36 // 0x36 - 6 key +#define VK_7 0x37 // 0x37 - 7 key +#define VK_8 0x38 // 0x38 - 8 key +#define VK_9 0x39 // 0x39 - 9 key + +#define VK_A 0x41 // 0x41 - A key +#define VK_B 0x42 // 0x42 - B key +#define VK_C 0x43 // 0x43 - C key +#define VK_D 0x44 // 0x44 - D key +#define VK_E 0x45 // 0x45 - E key +#define VK_F 0x46 // 0x46 - F key +#define VK_G 0x47 // 0x47 - G key +#define VK_H 0x48 // 0x48 - H key +#define VK_I 0x49 // 0x49 - I key +#define VK_J 0x4A // 0x4A - J key +#define VK_K 0x4B // 0x4B - K key +#define VK_L 0x4C // 0x4C - L key +#define VK_M 0x4D // 0x4D - M key +#define VK_N 0x4E // 0x4E - N key +#define VK_O 0x4F // 0x4F - O key +#define VK_P 0x50 // 0x50 - P key +#define VK_Q 0x51 // 0x51 - Q key +#define VK_R 0x52 // 0x52 - R key +#define VK_S 0x53 // 0x53 - S key +#define VK_T 0x54 // 0x54 - T key +#define VK_U 0x55 // 0x55 - U key +#define VK_V 0x56 // 0x56 - V key +#define VK_W 0x57 // 0x57 - W key +#define VK_X 0x58 // 0x58 - X key +#define VK_Y 0x59 // 0x59 - Y key +#define VK_Z 0x5A // 0x5A - Z key +#endif + +#if !defined(VK_DBE_ALPHANUMERIC) +#define VK_DBE_ALPHANUMERIC 0x0f0 +#define VK_DBE_KATAKANA 0x0f1 +#define VK_DBE_HIRAGANA 0x0f2 +#define VK_DBE_SBCSCHAR 0x0f3 +#define VK_DBE_DBCSCHAR 0x0f4 +#define VK_DBE_ROMAN 0x0f5 +#define VK_DBE_NOROMAN 0x0f6 +#define VK_DBE_ENTERWORDREGISTERMODE 0x0f7 +#define VK_DBE_ENTERIMECONFIGMODE 0x0f8 +#define VK_DBE_FLUSHSTRING 0x0f9 +#define VK_DBE_CODEINPUT 0x0fa +#define VK_DBE_NOCODEINPUT 0x0fb +#define VK_DBE_DETERMINESTRING 0x0fc +#define VK_DBE_ENTERDLGCONVERSIONMODE 0x0fd +#endif + +//end diff --git a/mcwin32/src/win32_glib.c b/mcwin32/src/win32_glib.c index 7c71f0ec..e6b92be9 100644 --- a/mcwin32/src/win32_glib.c +++ b/mcwin32/src/win32_glib.c @@ -17,7 +17,7 @@ Copyright (C) 2012 The Free Software Foundation, Inc. - Written by: Adam Young 2012 - 2023 + Written by: Adam Young 2012 - 2024 This file is part of the Midnight Commander. diff --git a/mcwin32/src/win32_key.c b/mcwin32/src/win32_key.c index 1bddcb46..f45319c3 100644 --- a/mcwin32/src/win32_key.c +++ b/mcwin32/src/win32_key.c @@ -36,7 +36,7 @@ void enable_bracketed_paste (void); void disable_bracketed_paste (void); - Written by: Adam Young 2012 - 2023 + Written by: Adam Young 2012 - 2024 This file is part of the Midnight Commander. @@ -73,6 +73,8 @@ #include "win32_trace.h" +//#define KEY_TRACE + #if defined(__WATCOMC__) #if (__WATCOMC__ >= 1300) char volatile __WD_Present = 0; /* ??? */ @@ -348,11 +350,14 @@ static DWORD WINAPI CancelSynchronousIoImp(HANDLE hThread); static BOOL __stdcall CtrlHandler(DWORD fdwCtrlType); +static void key_config(void); static int key_next(int no_delay, unsigned *UnicodeChar); static int key_esc_special(void); +static DWORD key_normalizeAltGr(const KEY_EVENT_RECORD *key); static int key_mapwin32(unsigned long dwCtrlKeyState, unsigned wVirtKeyCode, unsigned UnicodeChar); + /* * runtime initialisation */ @@ -363,6 +368,8 @@ init_key (void) hConsoleOut = GetStdHandle (STD_OUTPUT_HANDLE); hWindow = GetConsoleWindow(); + key_config(); + mc_global.tty.console_flag = '\001'; /* console save/restore, toggle available */ tty_reset_prog_mode (); @@ -383,6 +390,26 @@ init_key (void) } +static void +key_config(void) +{ + char *buffer; + + mc_global.tty.altgr_enabled = -1; /* default; auto */ + + buffer = mc_config_get_string (mc_global.main_config, CONFIG_MISC_SECTION, "altgr_enabled", ""); + if (buffer[0]) { + if (0 == strcmp(buffer, "off")) { /* "off" or "on" */ + mc_global.tty.altgr_enabled = 0; + } else if (0 == strcmp(buffer, "on")) { + mc_global.tty.altgr_enabled = 1; + } + } + + g_free (buffer); +} + + static DWORD WINAPI CancelSynchronousIoImp (HANDLE hThread) { @@ -1146,16 +1173,17 @@ key_next(int no_delay, unsigned *unicode) case KEY_EVENT: if (k.Event.KeyEvent.bKeyDown) { const KEY_EVENT_RECORD *pKey = &k.Event.KeyEvent; + const DWORD dwControlKeyState = key_normalizeAltGr(pKey); const unsigned UnicodeChar = pKey->uChar.UnicodeChar; int c; #if !defined(KEY_M_UNICODE) #define KEY_M_UNICODE 0x8000 #endif - if ((c = key_mapwin32(pKey->dwControlKeyState, + if ((c = key_mapwin32(dwControlKeyState, pKey->wVirtualKeyCode, UnicodeChar)) != -1) { if (KEY_M_UNICODE & c) { -#if defined(_DEBUG) && (0) +#if defined(KEY_TRACE) OutputDebugPrintA ("%05u/0x%04x = unicode\n", UnicodeChar, UnicodeChar); #endif if (unicode) { @@ -1163,7 +1191,7 @@ key_next(int no_delay, unsigned *unicode) return (c & ~KEY_M_UNICODE); // modifiers, if any } } else { -#if defined(_DEBUG) && (0) +#if defined(KEY_TRACE) char *skeyname = lookup_key_by_code (c); OutputDebugPrintA ("%05u/0x%04x = %s\n", c, c, skeyname); g_free (skeyname); @@ -1204,7 +1232,7 @@ key_esc_special(void) DWORD count = 0; if (WaitForSingleObject(hConsoleIn, timeoutms) == WAIT_OBJECT_0 && - PeekConsoleInput(hConsoleIn, &ir, 1, &count) && 1 == count) { + PeekConsoleInputW(hConsoleIn, &ir, 1, &count) && 1 == count) { if (KEY_EVENT == ir.EventType) { const KEY_EVENT_RECORD *key = &ir.Event.KeyEvent; @@ -1356,11 +1384,73 @@ CtrlHandler(DWORD fdwCtrlType) /* - * Translate the key press into a keycode identifier. - */ + * key_normalizeAltGr --- + * Filter AtrGr events from modifiers; attempt to allow: + * + * Left-Alt + AltGr, + * Right-Ctrl + AltGr, + * Left-Alt + Right-Ctrl + AltGr. + **/ +static DWORD +key_normalizeAltGr (const KEY_EVENT_RECORD *key) +{ + DWORD state = key->dwControlKeyState; + + // Enabled? + if (0 == mc_global.tty.altgr_enabled) + return state; + + // AltGr condition (LCtrl + RAlt) + if (0 == (state & (LEFT_ALT_PRESSED | RIGHT_ALT_PRESSED))) + return state; + + if (0 == (state & (LEFT_CTRL_PRESSED | RIGHT_CTRL_PRESSED))) + return state; + + if (0 == key->uChar.UnicodeChar) + return state; + + if (state & RIGHT_ALT_PRESSED) { + // Remove Right-Alt. + state &= ~RIGHT_ALT_PRESSED; + + // As a character was presented, Left-Ctrl is almost always set, + // except if the user presses Right-Ctrl, then AltGr (in that specific order) for whatever reason. + // At any rate, make sure the bit is not set. + state &= ~LEFT_CTRL_PRESSED; + + } else if (state & LEFT_ALT_PRESSED) { + // Remove Left-Alt. + state &= ~LEFT_ALT_PRESSED; + + // Whichever Ctrl key is down, remove it from the state. + // We only remove one key, to improve our chances of detecting the corner-case of Left-Ctrl + Left-Alt + Right-Ctrl. + if ((state & LEFT_CTRL_PRESSED) != 0) { + // Remove Left-Ctrl. + state &= ~LEFT_CTRL_PRESSED; + + } else if ((state & RIGHT_CTRL_PRESSED) != 0) { + // Remove Right-Ctrl. + state &= ~RIGHT_CTRL_PRESSED; + } + } + +#if defined(KEY_TRACE) + OutputDebugPrintA ("AltGr: 0x%04x = 0x%04x\n", key->dwControlKeyState, state); +#endif + + return state; +} + + +/* + * key_mapwin32 --- + * Translate the key press into a keycode identifier. + **/ static int key_mapwin32 (unsigned long dwCtrlKeyState, unsigned wVirtKeyCode, unsigned uChar) { + int mod = 0, ch = -1; int i; @@ -1464,7 +1554,7 @@ is_idle (void) INPUT_RECORD k; while (hConsoleIn && WaitForSingleObject(hConsoleIn, 0 /*NONBLOCKING*/) == WAIT_OBJECT_0 && - PeekConsoleInput(hConsoleIn, &k, 1, &count) && count == 1) { + PeekConsoleInputW(hConsoleIn, &k, 1, &count) && count == 1) { if (KEY_EVENT == k.EventType) { if (!k.Event.KeyEvent.bKeyDown) { // diff --git a/mcwin32/src/win32_key.h b/mcwin32/src/win32_key.h index cc782aca..652b33da 100644 --- a/mcwin32/src/win32_key.h +++ b/mcwin32/src/win32_key.h @@ -5,7 +5,7 @@ Copyright (C) 2012 The Free Software Foundation, Inc. - Written by: Adam Young 2012 - 2023 + Written by: Adam Young 2012 - 2024 This file is part of the Midnight Commander. diff --git a/mcwin32/src/win32_pipe.c b/mcwin32/src/win32_pipe.c index a857a313..1e3ffe40 100644 --- a/mcwin32/src/win32_pipe.c +++ b/mcwin32/src/win32_pipe.c @@ -6,7 +6,7 @@ mc_pread mc_pclose - Written by: Adam Young 2015 - 2023 + Written by: Adam Young 2015 - 2024 The Midnight Commander is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as diff --git a/mcwin32/src/win32_tty.c b/mcwin32/src/win32_tty.c index 2805cf54..302a08e7 100644 --- a/mcwin32/src/win32_tty.c +++ b/mcwin32/src/win32_tty.c @@ -5,7 +5,7 @@ Copyright (C) 2012 The Free Software Foundation, Inc. - Written by: Adam Young 2012 - 2023 + Written by: Adam Young 2012 - 2024 This file is part of the Midnight Commander. @@ -540,4 +540,3 @@ tty_destroy_winch_pipe (void) } /*end*/ - diff --git a/mcwin32/src/win32_utl.c b/mcwin32/src/win32_utl.c index 69ab0607..6c7c5ae2 100644 --- a/mcwin32/src/win32_utl.c +++ b/mcwin32/src/win32_utl.c @@ -21,7 +21,7 @@ Copyright (C) 2012 The Free Software Foundation, Inc. - Written by: Adam Young 2012 - 2023 + Written by: Adam Young 2012 - 2024 Portions sourced from lib/utilunix.c, see for additional information. @@ -271,7 +271,7 @@ static void set_tmpdir(void) { const char *tmpdir = NULL; - + if (NULL != (tmpdir = getenv("MC_TMPDIR")) && *tmpdir) { return; } @@ -392,7 +392,7 @@ mc_get_locale(void) { static char x_lang[64] = {0}; - if (0 == x_lang[0]) + if (0 == x_lang[0]) { char iso639[16] = {0}, iso3166[16] = {0}; LCID lcid = GetThreadLocale(); @@ -666,9 +666,9 @@ mc_USERCONFIGDIR(const char *subdir) const char *env; int len, done = FALSE; -#if defined(MC_HOMEDIR_XDG) +#if defined(MC_HOMEDIR_XDG) /* /mc */ - if (NULL != (env = getenv("XDG_CONFIG_HOME")) && *env) { + if (NULL != (env = getenv("XDG_CONFIG_HOME")) && *env) { if (0 == _access(env, 0)) { _snprintf(x_buffer, sizeof(x_buffer), "%s/mc", env); mkdir(x_buffer, S_IRWXU); /* auto create */ @@ -680,7 +680,7 @@ mc_USERCONFIGDIR(const char *subdir) /* /.config/mc */ if (!done) { // - if (NULL != (env = getenv("HOME")) && *env) { + if (NULL != (env = getenv("HOME")) && *env) { _snprintf(x_buffer, sizeof(x_buffer), "%s/.config", env); if (0 == _access(x_buffer, 0)) { _snprintf(x_buffer, sizeof(x_buffer), "%s/.config/mc", env); @@ -1077,7 +1077,7 @@ system_impl (int flags, const char *shell, const char *cmd) const int cmdlen = space - cmd; unsigned i; - for (i = 0; i < _countof(busyboxexts); ++i) { + for (i = 0; i < _countof(busyboxexts); ++i) { if (0 == strncmp(busyboxexts[i], cmd, cmdlen)) { char *t_cmd; @@ -1111,7 +1111,7 @@ system_impl (int flags, const char *shell, const char *cmd) } else { /* * If - * execute as + * execute as */ const char *space; @@ -1120,7 +1120,7 @@ system_impl (int flags, const char *shell, const char *cmd) char *t_cmd; if (NULL != (t_cmd = g_strconcat("\"", busybox, "\" sh", space, NULL))) { - ret = w32_shell(shell, t_cmd, NULL, NULL, NULL); + ret = w32_shell(busybox, t_cmd, NULL, NULL, NULL); g_free(t_cmd); } return ret; @@ -1149,12 +1149,7 @@ system_impl (int flags, const char *shell, const char *cmd) for (i = 0; i < _countof(busyboxcmds); ++i) { if (0 == strcmp(busyboxcmds[i], argv[0])) { - char *t_cmd; - - if (NULL != (t_cmd = g_strconcat("\"", busybox, "\" ", cmd, NULL))) { - ret = w32_shell(shell, t_cmd, NULL, NULL, NULL); - g_free(t_cmd); - } + ret = w32_shell(busybox, cmd, NULL, NULL, NULL); return ret; } } @@ -1322,7 +1317,7 @@ mc_isscript(const char *cmd) /** - * unquote an excaped command line; yet retain any existing quoted elements. + * unquote an escaped command line; yet retain any existing quoted elements. */ char * my_unquote(const char *cmd, int quotews) @@ -1404,7 +1399,7 @@ my_unquote(const char *cmd, int quotews) default: // non-whitespace if (NULL == start) { start = cursor; // first non-whitespace - } + } break; case ' ': case '\t': // whitespace if (!instring) { @@ -1502,7 +1497,7 @@ win32_popen(const char *cmd, const char *mode) if (pe_open >= 0) { if (NULL == file) { - pe_open += _snprintf(pe_buffer, PE_BUFFER_SIZE, "popen ; %s", strerror(errno)); + pe_open += _snprintf(pe_buffer, PE_BUFFER_SIZE, "popen : %s", strerror(errno)); } else { HANDLE hThread; @@ -1542,16 +1537,15 @@ win32_pclose(FILE *file) * text is prepended to the error message from the pipe */ void -open_error_pipe(void) +win32_ptrace(void) { - pe_open = 0; // open stream + pe_open = 0; /* open stream */ } int -close_error_pipe(int error, const char *text) +win32_perror(int error, const char *msg) { - const char *title; int len; EnterCriticalSection(&pe_guard); @@ -1559,42 +1553,32 @@ close_error_pipe(int error, const char *text) pe_open = -1; pe_stream = NULL; LeaveCriticalSection(&pe_guard); - if (len < 0) { - return 0; - } - - if (error < 0 || (error > 0 && (error & D_ERROR) != 0)) { - title = MSG_ERROR; - } else { - title = _("Warning"); - } - - if (error < 0) { - return 0; /* just ignore error message */ + if (len <= 0) { + return 0; /* nothing to show */ } - /* Show message from pipe */ - if (text == NULL) { - if (len <= 0) { - return 0; /* Nothing to show */ - } + if (NULL == msg) { pe_buffer[len] = 0; - text = pe_buffer; + msg = pe_buffer; - } else { /* Show given text and possible message from pipe */ - const size_t textlen = strlen(text); + } else { /* show given text and possible message from pipe */ + const size_t textlen = strlen(msg); if (textlen + len < sizeof(pe_buffer)) { memmove(pe_buffer + textlen + 1, (const char *)pe_buffer, len); - memmove(pe_buffer, text, textlen); - len += textlen + 1; + memmove(pe_buffer, msg, textlen); + len += textlen + 1; pe_buffer[textlen] = '\n'; pe_buffer[len] = 0; - text = pe_buffer; + msg = pe_buffer; } } - query_dialog(title, text, D_NORMAL, 1, _("&Ok")); + if (error) { + query_dialog(MSG_ERROR, msg, D_ERROR, 1, _("&Dismiss")); + } else { + query_dialog(_("Warning"), msg, D_NORMAL, 1, _("&Ok")); + } return 1; } @@ -1757,19 +1741,24 @@ system_bustargs(char *cmd, const char **argv, int cnt) char * tilde_expand(const char *directory) { + if (0 == directory[0]) { + return g_strdup (""); /* empty */ + } + if (PATH_SEP == directory[0] && /* fix '/X:', vfs work around */ - isalpha((unsigned char)directory[1]) && ':' == directory[2]) { + directory[1] && ':' == directory[2] && isalpha((unsigned char)directory[1])) { ++directory; } - if (PATH_SEP == *directory) { /* / ==> x:/ */ + if (IS_PATH_SEP(*directory)) { /* '/xxx' ==> 'x:/xxx' */ + const char slash = *directory; - if (PATH_SEP != directory[1] || /* preserve URL's (// */ + } + } else if ('~' == *directory) { struct passwd *passwd = NULL; @@ -1888,7 +1885,7 @@ custom_canonicalize_pathname(char *orgpath, CANON_PATH_FLAGS flags) for (p = lpath + 2; p[0] != '\0' && !IS_PATH_SEP (p[0]); p++) ; - if (p[0] == PATH_SEP && p > (orgpath + 2)) + if (p[0] == PATH_SEP && p > (orgpath + 2)) { if (0 == strcmp(p + 1, "..")) { /* "//servername/.." --> "X:/" */ @@ -1907,7 +1904,7 @@ custom_canonicalize_pathname(char *orgpath, CANON_PATH_FLAGS flags) * o standardize seperator * o preserve leading drive */ - if (!unc) + if (!unc) { if (PATH_SEP == lpath[0] && ':' == lpath[2] && isalpha((unsigned char)lpath[1])) { @@ -2129,7 +2126,7 @@ void canonicalize_pathname(char *path) { #if !defined(CANON_PATH_FLAGS) - canonicalize_pathname_custom (path, CANON_PATH_ALL); + canonicalize_pathname_custom (path, CANON_PATH_ALL); #else custom_canonicalize_pathname (path, CANON_PATH_ALL); #endif @@ -2183,7 +2180,7 @@ mc_build_filenamev(const char *first_element, va_list args) canonicalize_pathname (tmp_element); len = strlen (tmp_element); - start = IS_PATH_SEP (tmp_element[0]) ? tmp_element + 1 : tmp_element; + start = IS_PATH_SEP (tmp_element[0]) ? tmp_element + 1 : tmp_element; g_string_append (path, start); if (!IS_PATH_SEP (tmp_element[len - 1]) && element != NULL) @@ -2193,7 +2190,7 @@ mc_build_filenamev(const char *first_element, va_list args) } while (element != NULL); - if (absolute) + if (absolute) { if (! path->len || ':' != path->str[1] /*not-drive*/) { @@ -2206,7 +2203,7 @@ mc_build_filenamev(const char *first_element, va_list args) if (driveno <= 0) driveno = w32_getlastdrive(); // see: vfs_canon() generally when we are returning from a ftp/sftp or UNC reference. - if (driveno > 0) + if (driveno > 0) { char drive[3] = "X:"; drive[0] = driveno + ('A' - 1); diff --git a/mcwin32/src/win32_utl.h b/mcwin32/src/win32_utl.h index cedbbb7d..f569f8b8 100644 --- a/mcwin32/src/win32_utl.h +++ b/mcwin32/src/win32_utl.h @@ -1,6 +1,6 @@ /* -*- mode: c; indent-width: 4; -*- */ /* - Adam Young 2021 - 2023 + Adam Young 2021 - 2024 This file is part of the Midnight Commander. diff --git a/mcwin32/src/win32_win.c b/mcwin32/src/win32_win.c index 3cab3ac4..a9edb77c 100644 --- a/mcwin32/src/win32_win.c +++ b/mcwin32/src/win32_win.c @@ -10,7 +10,7 @@ Copyright (C) 2012 The Free Software Foundation, Inc. - Written by: Adam Young 2012 - 2023 + Written by: Adam Young 2012 - 2024 This file is part of the Midnight Commander. diff --git a/mcwin32/support/busybox.1 b/mcwin32/support/busybox.1 new file mode 100644 index 00000000..ad55f424 --- /dev/null +++ b/mcwin32/support/busybox.1 @@ -0,0 +1,1726 @@ +BUSYBOX(1) busybox BUSYBOX(1) + +NAME + BusyBox - The Swiss Army Knife of Embedded Linux + +SYNTAX + busybox [arguments...] # or + + [arguments...] # if symlinked + +DESCRIPTION + BusyBox combines tiny versions of many common UNIX utilities into a + single small executable. It provides minimalist replacements for most + of the utilities you usually find in GNU coreutils, util-linux, etc. + The utilities in BusyBox generally have fewer options than their full- + featured GNU cousins; however, the options that are included provide + the expected functionality and behave very much like their GNU + counterparts. + + BusyBox has been written with size-optimization and limited resources + in mind. It is also extremely modular so you can easily include or + exclude commands (or features) at compile time. This makes it easy to + customize your embedded systems. To create a working system, just add + /dev, /etc, and a Linux kernel. BusyBox provides a fairly complete + POSIX environment for any small or embedded system. + + BusyBox is extremely configurable. This allows you to include only the + components you need, thereby reducing binary size. Run 'make config' or + 'make menuconfig' to select the functionality that you wish to enable. + Then run 'make' to compile BusyBox using your configuration. + + After the compile has finished, you should use 'make install' to + install BusyBox. This will install the 'bin/busybox' binary, in the + target directory specified by CONFIG_PREFIX. CONFIG_PREFIX can be set + when configuring BusyBox, or you can specify an alternative location at + install time (i.e., with a command line like 'make + CONFIG_PREFIX=/tmp/foo install'). If you enabled any applet + installation scheme (either as symlinks or hardlinks), these will also + be installed in the location pointed to by CONFIG_PREFIX. + +USAGE + BusyBox is a multi-call binary. A multi-call binary is an executable + program that performs the same job as more than one utility program. + That means there is just a single BusyBox binary, but that single + binary acts like a large number of utilities. This allows BusyBox to + be smaller since all the built-in utility programs (we call them + applets) can share code for many common operations. + + You can also invoke BusyBox by issuing a command as an argument on the + command line. For example, entering + + /bin/busybox ls + + will also cause BusyBox to behave as 'ls'. + + Of course, adding '/bin/busybox' into every command would be painful. + So most people will invoke BusyBox using links to the BusyBox binary. + + For example, entering + + ln -s /bin/busybox ls + ./ls + + will cause BusyBox to behave as 'ls' (if the 'ls' command has been + compiled into BusyBox). Generally speaking, you should never need to + make all these links yourself, as the BusyBox build system will do this + for you when you run the 'make install' command. + + If you invoke BusyBox with no arguments, it will provide you with a + list of the applets that have been compiled into your BusyBox binary. + +COMMON OPTIONS + Most BusyBox applets support the --help argument to provide a terse + runtime description of their behavior. If the + CONFIG_FEATURE_VERBOSE_USAGE option has been enabled, more detailed + usage information will also be available. + +COMMANDS + Currently available applets include: + + [, [[, ar, arch, ash, awk, base64, basename, bash, bunzip2, busybox, + bzcat, bzip2, cal, cat, chmod, cksum, clear, cmp, comm, cp, cpio, + cut, date, dc, dd, df, diff, dirname, dos2unix, dpkg-deb, du, echo, + ed, egrep, env, expand, expr, factor, false, fgrep, find, fold, + fsync, ftpget, ftpput, getopt, grep, groups, gunzip, gzip, hd, head, + hexdump, id, ipcalc, kill, killall, less, link, ln, logname, ls, + lzcat, lzma, lzop, lzopcat, man, md5sum, mkdir, mktemp, mv, nc, nl, + od, paste, patch, pgrep, pidof, pipe_progress, pkill, printenv, + printf, ps, pwd, realpath, rev, rm, rmdir, rpm, rpm2cpio, sed, seq, + sh, sha1sum, sha256sum, sha3sum, sha512sum, shred, shuf, sleep, + sort, split, ssl_client, stat, strings, sum, tac, tail, tar, tee, + test, timeout, touch, tr, true, truncate, ttysize, uname, + uncompress, unexpand, uniq, unix2dos, unlink, unlzma, unlzop, unxz, + unzip, usleep, uudecode, uuencode, vi, watch, wc, wget, which, + whoami, whois, xargs, xxd, xz, xzcat, yes, zcat + +COMMAND DESCRIPTIONS + ar ar [-o] [-v] [-p] [-t] [-x] ARCHIVE FILES + + Extract or list FILES from an ar archive + + -o Preserve original dates + -p Extract to stdout + -t List + -x Extract + -v Verbose + + arch + arch + + Print system architecture + + ash ash [-/+OPTIONS] [-/+o OPT]... [-c 'SCRIPT' [ARG0 [ARGS]] / FILE + [ARGS] / -s [ARGS]] + + Unix shell interpreter + + awk awk [OPTIONS] [AWK_PROGRAM] [FILE]... + + -v VAR=VAL Set variable + -F SEP Use SEP as field separator + -f FILE Read program from FILE + -e AWK_PROGRAM + + base64 + base64 [-d] [FILE] + + Base64 encode or decode FILE to standard output -d Decode + data + + basename + basename FILE [SUFFIX] + + Strip directory path and .SUFFIX from FILE + + bash + bash [-/+OPTIONS] [-/+o OPT]... [-c 'SCRIPT' [ARG0 [ARGS]] / FILE + [ARGS] / -s [ARGS]] + + Unix shell interpreter + + bunzip2 + bunzip2 [-cfk] [FILE]... + + Decompress FILEs (or stdin) + + -c Write to stdout + -f Force + -k Keep input files + + bzcat + bzcat [FILE]... + + Decompress to stdout + + bzip2 + bzip2 [OPTIONS] [FILE]... + + Compress FILEs (or stdin) with bzip2 algorithm + + -1..9 Compression level + -d Decompress + -t Test file integrity + -c Write to stdout + -f Force + -k Keep input files + + cal cal [-jy] [[MONTH] YEAR] + + Display a calendar + + -j Use julian dates + -y Display the entire year + + cat cat [-nbvteA] [FILE]... + + Print FILEs to stdout + + -n Number output lines + -b Number nonempty lines + -v Show nonprinting characters as ^x or M-x + -t ...and tabs as ^I + -e ...and end lines with $ + -A Same as -vte + + chmod + chmod [-Rcvf] MODE[,MODE]... FILE... + + Each MODE is one or more of the letters ugoa, one of the symbols + +-= and one or more of the letters rwxst + + -R Recurse + -c List changed files + -v List all files + -f Hide errors + + cksum + cksum FILE... + + Calculate the CRC32 checksums of FILEs + + clear + clear + + Clear screen + + cmp cmp [-l] [-s] FILE1 [FILE2 [SKIP1 [SKIP2]]] + + Compare FILE1 with FILE2 (or stdin) + + -l Write the byte numbers (decimal) and values (octal) + for all differing bytes + -s Quiet + + comm + comm [-123] FILE1 FILE2 + + Compare FILE1 with FILE2 + + -1 Suppress lines unique to FILE1 + -2 Suppress lines unique to FILE2 + -3 Suppress lines common to both files + + cp cp [OPTIONS] SOURCE... DEST + + Copy SOURCE(s) to DEST + + -a Same as -dpR + -R,-r Recurse + -d,-P Preserve symlinks (default if -R) + -L Follow all symlinks + -H Follow symlinks on command line + -p Preserve file attributes if possible + -f Overwrite + -i Prompt before overwrite + -l,-s Create (sym)links + -T Treat DEST as a normal file + -u Copy only newer files + + cpio + cpio [-dmvu] [-F FILE] [-R USER[:GRP]] [-H newc] [-tio] + [EXTR_FILE]... + + Extract (-i) or list (-t) files from a cpio archive, or take file + list from stdin and create an archive (-o) + + Main operation mode: + + -t List + -i Extract EXTR_FILEs (or all) + -o Create (requires -H newc) + Options: + + -H newc Archive format + -d Make leading directories + -m Preserve mtime + -v Verbose + -u Overwrite + -F FILE Input (-t,-i,-p) or output (-o) file + -R USER[:GRP] Set owner of created files + -L Dereference symlinks + -0 Input is separated by NULs + + cut cut [OPTIONS] [FILE]... + + Print selected fields from each input FILE to stdout + + -b LIST Output only bytes from LIST + -c LIST Output only characters from LIST + -d CHAR Use CHAR instead of tab as the field delimiter + -s Output only the lines containing delimiter + -f N Print only these fields + -n Ignored + + date + date [OPTIONS] [+FMT] [TIME] + + Display time (using +FMT), or set time + + [-s,--set] TIME Set time to TIME + -u,--utc Work in UTC (don't convert to local time) + -R,--rfc-2822 Output RFC-2822 compliant date string + -I[SPEC] Output ISO-8601 compliant date string + SPEC='date' (default) for date only, + 'hours', 'minutes', or 'seconds' for date and + time to the indicated precision + -r,--reference FILE Display last modification time of FILE + -d,--date TIME Display TIME, not 'now' + -D FMT Use FMT for -d TIME conversion + + Recognized TIME formats: + + hh:mm[:ss] + [YYYY.]MM.DD-hh:mm[:ss] + YYYY-MM-DD hh:mm[:ss] + [[[[[YY]YY]MM]DD]hh]mm[.ss] + 'date TIME' form accepts MMDDhhmm[[YY]YY][.ss] instead + + dc dc EXPRESSION... + + Tiny RPN calculator. Operations: +, add, -, sub, *, mul, /, div, %, + mod, **, exp, and, or, not, xor, p - print top of the stack + (without popping), f - print entire stack, o - pop the value and + set output radix (must be 10, 16, 8 or 2). Examples: 'dc 2 2 add + p' -> 4, 'dc 8 8 mul 2 2 + / p' -> 16 + + dd dd [if=FILE] [of=FILE] [ibs=N] [obs=N] [bs=N] [count=N] [skip=N] + [seek=N] [conv=notrunc|noerror|sync|fsync] + [iflag=skip_bytes|fullblock] + + Copy a file with converting and formatting + + if=FILE Read from FILE instead of stdin + of=FILE Write to FILE instead of stdout + bs=N Read and write N bytes at a time + ibs=N Read N bytes at a time + obs=N Write N bytes at a time + count=N Copy only N input blocks + skip=N Skip N input blocks + seek=N Skip N output blocks + conv=notrunc Don't truncate output file + conv=noerror Continue after read errors + conv=sync Pad blocks with zeros + conv=fsync Physically write data out before finishing + conv=swab Swap every pair of bytes + iflag=skip_bytes skip=N is in bytes + iflag=fullblock Read full blocks + status=noxfer Suppress rate output + status=none Suppress all output + + if=/dev/zero and if=/dev/urandom are supported N may be suffixed by + c (1), w (2), b (512), kB (1000), k (1024), MB, M, GB, G + + df df [-PkmhT] [FILESYSTEM]... + + Print filesystem usage statistics + + -P POSIX output format + -k 1024-byte blocks (default) + -m 1M-byte blocks + -h Human readable (e.g. 1K 243M 2G) + -T Print filesystem type + + diff + diff [-abBdiNqrTstw] [-L LABEL] [-S FILE] [-U LINES] FILE1 FILE2 + + Compare files line by line and output the differences between them. + This implementation supports unified diffs only. + + -a Treat all files as text + -b Ignore changes in the amount of whitespace + -B Ignore changes whose lines are all blank + -d Try hard to find a smaller set of changes + -i Ignore case differences + -L Use LABEL instead of the filename in the unified header + -N Treat absent files as empty + -q Output only whether files differ + -r Recurse + -S Start with FILE when comparing directories + -T Make tabs line up by prefixing a tab when necessary + -s Report when two files are the same + -t Expand tabs to spaces in output + -U Output LINES lines of context + -w Ignore all whitespace + + dirname + dirname FILENAME + + Strip non-directory suffix from FILENAME + + dos2unix + dos2unix [-ud] [FILE] + + Convert FILE in-place from DOS to Unix format. When no file is + given, use stdin/stdout. + + -u dos2unix + -d unix2dos + + dpkg-deb + dpkg-deb [-cefxX] FILE [DIR] + + Perform actions on Debian packages (.deb) + + -c List files + -f Print control fields + -e Extract control files to DIR (default: ./DEBIAN) + -x Extract files to DIR (no default) + -X Verbose -x + + du du [-aHLdclsxhmk] [FILE]... + + Summarize disk space used for each FILE and/or directory + + -a Show file sizes too + -L Follow all symlinks + -H Follow symlinks on command line + -d N Limit output to directories (and files with -a) of depth < N + -c Show grand total + -l Count sizes many times if hard linked + -s Display only a total for each argument + -x Skip directories on different filesystems + -h Sizes in human readable format (e.g., 1K 243M 2G) + -m Sizes in megabytes + -k Sizes in kilobytes (default) + + echo + echo [-neE] [ARG]... + + Print the specified ARGs to stdout + + -n Suppress trailing newline + -e Interpret backslash escapes (i.e., \t=tab) + -E Don't interpret backslash escapes (default) + + ed ed [FILE] + + env env [-iu] [-] [name=value]... [PROG ARGS] + + Print the current environment or run PROG after setting up the + specified environment + + -, -i Start with an empty environment + -u Remove variable from the environment + + expand + expand [-i] [-t N] [FILE]... + + Convert tabs to spaces, writing to stdout + + -i Don't convert tabs after non blanks + -t Tabstops every N chars + + expr + expr EXPRESSION + + Print the value of EXPRESSION to stdout + + EXPRESSION may be: + + ARG1 | ARG2 ARG1 if it is neither null nor 0, otherwise ARG2 + ARG1 & ARG2 ARG1 if neither argument is null or 0, otherwise 0 + ARG1 < ARG2 1 if ARG1 is less than ARG2, else 0. Similarly: + ARG1 <= ARG2 + ARG1 = ARG2 + ARG1 != ARG2 + ARG1 >= ARG2 + ARG1 > ARG2 + ARG1 + ARG2 Sum of ARG1 and ARG2. Similarly: + ARG1 - ARG2 + ARG1 * ARG2 + ARG1 / ARG2 + ARG1 % ARG2 + STRING : REGEXP Anchored pattern match of REGEXP in STRING + match STRING REGEXP Same as STRING : REGEXP + substr STRING POS LENGTH Substring of STRING, POS counted from 1 + index STRING CHARS Index in STRING where any CHARS is found, or 0 + length STRING Length of STRING + quote TOKEN Interpret TOKEN as a string, even if + it is a keyword like 'match' or an + operator like '/' + (EXPRESSION) Value of EXPRESSION + + Beware that many operators need to be escaped or quoted for shells. + Comparisons are arithmetic if both ARGs are numbers, else + lexicographical. Pattern matches return the string matched between + \( and \) or null; if \( and \) are not used, they return the + number of characters matched or 0. + + factor + factor [NUMBER]... + + Print prime factors + + find + find [-HL] [PATH]... [OPTIONS] [ACTIONS] + + Search for files and perform actions on them. First failed action + stops processing of current file. Defaults: PATH is current + directory, action is '-print' + + -L,-follow Follow symlinks + -H ...on command line only + -maxdepth N Descend at most N levels. -maxdepth 0 applies + actions to command line arguments only + -mindepth N Don't act on first N levels + -depth Act on directory *after* traversing it + + Actions: + + ( ACTIONS ) Group actions for -o / -a + ! ACT Invert ACT's success/failure + ACT1 [-a] ACT2 If ACT1 fails, stop, else do ACT2 + ACT1 -o ACT2 If ACT1 succeeds, stop, else do ACT2 + Note: -a has higher priority than -o + -name PATTERN Match file name (w/o directory name) to PATTERN + -iname PATTERN Case insensitive -name + -path PATTERN Match path to PATTERN + -ipath PATTERN Case insensitive -path + -regex PATTERN Match path to regex PATTERN + -type X File type is X (one of: f,d,l,b,c,s,p) + -executable File is executable + -perm MASK At least one mask bit (+MASK), all bits (-MASK), + or exactly MASK bits are set in file's mode + -mtime DAYS mtime is greater than (+N), less than (-N), + or exactly N days in the past + -mmin MINS mtime is greater than (+N), less than (-N), + or exactly N minutes in the past + -newer FILE mtime is more recent than FILE's + -size N[bck] File size is N (c:bytes,k:kbytes,b:512 bytes(def.)) + +/-N: file size is bigger/smaller than N + -prune If current file is directory, don't descend into it + If none of the following actions is specified, -print is assumed + -print Print file name + -print0 Print file name, NUL terminated + -exec CMD ARG ; Run CMD with all instances of {} replaced by + file name. Fails if CMD exits with nonzero + -exec CMD ARG + Run CMD with {} replaced by list of file names + -delete Delete current file/directory. Turns on -depth option + -quit Exit + + fold + fold [-bs] [-w WIDTH] [FILE]... + + Wrap input lines in each FILE (or stdin), writing to stdout + + -b Count bytes rather than columns + -s Break at spaces + -w Use WIDTH columns instead of 80 + + fsync + fsync [-d] FILE... + + Write files' buffered blocks to disk + + -d Avoid syncing metadata + + ftpget + ftpget [OPTIONS] HOST [LOCAL_FILE] REMOTE_FILE + + Download a file via FTP + + -c Continue previous transfer + -v Verbose + -u USER Username + -p PASS Password + -P NUM Port + + ftpput + ftpput [OPTIONS] HOST [REMOTE_FILE] LOCAL_FILE + + Upload a file to a FTP server + + -v Verbose + -u USER Username + -p PASS Password + -P NUM Port number + + getopt + getopt [OPTIONS] [--] OPTSTRING PARAMS + + -a Allow long options starting with single - + -l LOPT[,...] Long options to recognize + -n PROGNAME The name under which errors are reported + -o OPTSTRING Short options to recognize + -q No error messages on unrecognized options + -Q No normal output + -s SHELL Set shell quoting conventions + -T Version test (exits with 4) + -u Don't quote output + + Example: + + O=`getopt -l bb: -- ab:c:: "$@"` || exit 1 eval set -- "$O" while + true; do case "$1" in -a) echo A; shift;; -b|--bb) + echo "B:'$2'"; shift 2;; -c) case "$2" in "") echo + C; shift 2;; *) echo "C:'$2'"; shift 2;; + esac;; --) shift; break;; *) echo Error; + exit 1;; esac done + + grep + grep [-HhnlLoqvsriwFE] [-m N] [-A/B/C N] PATTERN/-e PATTERN.../-f + FILE [FILE]... + + Search for PATTERN in FILEs (or stdin) + + -H Add 'filename:' prefix + -h Do not add 'filename:' prefix + -n Add 'line_no:' prefix + -l Show only names of files that match + -L Show only names of files that don't match + -c Show only count of matching lines + -o Show only the matching part of line + -q Quiet. Return 0 if PATTERN is found, 1 otherwise + -v Select non-matching lines + -s Suppress open and read errors + -r Recurse + -i Ignore case + -w Match whole words only + -x Match whole lines only + -F PATTERN is a literal (not regexp) + -E PATTERN is an extended regexp + -m N Match up to N times per file + -A N Print N lines of trailing context + -B N Print N lines of leading context + -C N Same as '-A N -B N' + -e PTRN Pattern to match + -f FILE Read pattern from file + + groups + groups [USER] + + Print the group memberships of USER or for the current process + + gunzip + gunzip [-cfkt] [FILE]... + + Decompress FILEs (or stdin) + + -c Write to stdout + -f Force + -k Keep input files + -t Test file integrity + + gzip + gzip [-cfkdt123456789] [FILE]... + + Compress FILEs (or stdin) + + -1..9 Compression level + -d Decompress + -t Test file integrity + -c Write to stdout + -f Force + -k Keep input files + + hd hd FILE... + + hd is an alias for hexdump -C + + head + head [OPTIONS] [FILE]... + + Print first 10 lines of each FILE (or stdin) to stdout. With more + than one FILE, precede each with a filename header. + + -n N[kbm] Print first N lines + -n -N[kbm] Print all except N last lines + -c [-]N[kbm] Print first N bytes + -q Never print headers + -v Always print headers + + N may be suffixed by k (x1024), b (x512), or m (x1024^2). + + hexdump + hexdump [-bcCdefnosvxR] [FILE]... + + Display FILEs (or stdin) in a user specified format + + -b 1-byte octal display + -c 1-byte character display + -d 2-byte decimal display + -o 2-byte octal display + -x 2-byte hex display + -C hex+ASCII 16 bytes per line + -v Show all (no dup folding) + -e FORMAT_STR Example: '16/1 "%02x|""\n"' + -f FORMAT_FILE + -n LENGTH Show only first LENGTH bytes + -s OFFSET Skip OFFSET bytes + -R Reverse of 'hexdump -Cv' + + id id [OPTIONS] [USER] + + Print information about USER or the current user + + -u User ID + -g Group ID + -G Supplementary group IDs + -n Print names instead of numbers + -r Print real ID instead of effective ID + + ipcalc + ipcalc [OPTIONS] ADDRESS[/PREFIX] [NETMASK] + + Calculate and display network settings from IP address + + -b Broadcast address + -n Network address + -m Default netmask for IP + -p Prefix for IP/NETMASK + -h Resolved host name + -s No error messages + + kill + kill [-l] [-SIG] PID... + + Send a signal (default: TERM) to given PIDs + + -l List all signal names and numbers + + killall + killall [-l] [-q] [-SIG] PROCESS_NAME... + + Send a signal (default: TERM) to given processes + + -l List all signal names and numbers + -q Don't complain if no processes were killed + + less + less [-EFIMmNSRh~] [FILE]... + + View FILE (or stdin) one screenful at a time + + -E Quit once the end of a file is reached + -F Quit if entire file fits on first screen + -I Ignore case in all searches + -M,-m Display status line with line numbers + and percentage through the file + -N Prefix line number to each line + -S Truncate long lines + -R Remove color escape codes in input + -~ Suppress ~s displayed past EOF + + link + link FILE LINK + + Create hard LINK to FILE + + ln ln [OPTIONS] TARGET... LINK|DIR + + Create a link LINK or DIR/TARGET to the specified TARGET(s) + + -s Make symlinks instead of hardlinks + -f Remove existing destinations + -n Don't dereference symlinks - treat like normal file + -b Make a backup of the target (if exists) before link operation + -S suf Use suffix instead of ~ when making backup files + -T 2nd arg must be a DIR + -v Verbose + + logname + logname + + Print the name of the current user + + ls ls [-1AaCxdLHRFplinshrSXvctu] [-w WIDTH] [FILE]... + + List directory contents + + -1 One column output + -a Include entries which start with . + -A Like -a, but exclude . and .. + -x List by lines + -d List directory entries instead of contents + -L Follow symlinks + -H Follow symlinks on command line + -R Recurse + -p Append / to dir entries + -F Append indicator (one of */=@|) to entries + -l Long listing format + -i List inode numbers + -n List numeric UIDs and GIDs instead of names + -s List allocated blocks + -lc List ctime + -lu List atime + --full-time List full date and time + -h Human readable sizes (1K 243M 2G) + --group-directories-first + -S Sort by size + -X Sort by extension + -v Sort by version + -t Sort by mtime + -tc Sort by ctime + -tu Sort by atime + -r Reverse sort order + -w N Format N columns wide + --color[={always,never,auto}] Control coloring + + lzcat + lzcat [FILE]... + + Decompress to stdout + + lzma + lzma -d [-cfk] [FILE]... + + Decompress FILE (or stdin) + + -d Decompress + -c Write to stdout + -f Force + -k Keep input files + + lzop + lzop [-cfUvd123456789CF] [FILE]... + + -1..9 Compression level + -d Decompress + -c Write to stdout + -f Force + -U Delete input files + -v Verbose + -F Don't store or verify checksum + -C Also write checksum of compressed block + + lzopcat + lzopcat [-vF] [FILE]... + + -v Verbose + -F Don't verify checksum + + man man [-aw] [MANPAGE]... + + Format and display manual page + + -a Display all pages + -w Show page locations + + $COLUMNS overrides output width + + md5sum + md5sum [-c[sw]] [FILE]... + + Print or check MD5 checksums + + -c Check sums against list in FILEs + -s Don't output anything, status code shows success + -w Warn about improperly formatted checksum lines + + mkdir + mkdir [OPTIONS] DIRECTORY... + + Create DIRECTORY + + -m MODE Mode + -p No error if exists; make parent directories as needed + + mktemp + mktemp [-dt] [-p DIR] [TEMPLATE] + + Create a temporary file with name based on TEMPLATE and print its + name. TEMPLATE must end with XXXXXX (e.g. [/dir/]nameXXXXXX). + Without TEMPLATE, -t tmp.XXXXXX is assumed. + + -d Make directory, not file + -q Fail silently on errors + -t Prepend base directory name to TEMPLATE + -p DIR Use DIR as a base directory (implies -t) + -u Do not create anything; print a name + + Base directory is: -p DIR, else $TMPDIR, else /tmp + + mv mv [-fin] SOURCE DEST or: mv [-fin] SOURCE... DIRECTORY + + Rename SOURCE to DEST, or move SOURCE(s) to DIRECTORY + + -f Don't prompt before overwriting + -i Interactive, prompt before overwrite + -n Don't overwrite an existing file + + nc nc [-l] [-p PORT] [IPADDR PORT] + + Open a pipe to IP:PORT + + -l Listen mode, for inbound connects + -p PORT Local port + + nl nl [OPTIONS] [FILE]... + + Write FILEs to standard output with line numbers added + + -b STYLE Which lines to number - a: all, t: nonempty, n: none + -i N Line number increment + -s STRING Use STRING as line number separator + -v N Start from N + -w N Width of line numbers + + od od [-abcdfhilovxs] [-t TYPE] [-A RADIX] [-N SIZE] [-j SKIP] [-S + MINSTR] [-w WIDTH] [FILE]... + + Print FILEs (or stdin) unambiguously, as octal bytes by default + + paste + paste [OPTIONS] [FILE]... + + Paste lines from each input file, separated with tab + + -d LIST Use delimiters from LIST, not tab + -s Serial: one file at a time + + patch + patch [OPTIONS] [ORIGFILE [PATCHFILE]] + + -p N Strip N leading components from file names + -i DIFF Read DIFF instead of stdin + -R Reverse patch + -N Ignore already applied patches + -E Remove output files if they become empty + --dry-run Don't actually change files + + pgrep + pgrep [-flanovx] [-s SID|-P PPID|PATTERN] + + Display process(es) selected by regex PATTERN + + -l Show command name too + -a Show command line too + -f Match against entire command line + -n Show the newest process only + -o Show the oldest process only + -v Negate the match + -x Match whole name (not substring) + -s Match session ID (0 for current) + -P Match parent process ID + + pidof + pidof [OPTIONS] [NAME]... + + List PIDs of all processes with names that match NAMEs + + -s Show only one PID + -o PID Omit given pid + Use %PPID to omit pid of pidof's parent + + pipe_progress + pipe_progress + + Display a dot to indicate pipe activity + + pkill + pkill [-l|-SIGNAL] [-fnovx] [-s SID|-P PPID|PATTERN] + + Send a signal to process(es) selected by regex PATTERN + + -l List all signals + -f Match against entire command line + -n Signal the newest process only + -o Signal the oldest process only + -v Negate the match + -x Match whole name (not substring) + -s Match session ID (0 for current) + -P Match parent process ID + + printenv + printenv [VARIABLE]... + + Print environment VARIABLEs. If no VARIABLE specified, print all. + + printf + printf FORMAT [ARG]... + + Format and print ARG(s) according to FORMAT (a-la C printf) + + ps ps [-o COL1,COL2=HEADER] + + Show list of processes + + -o COL1,COL2=HEADER Select columns for display + + pwd pwd + + Print the full filename of the current working directory + + realpath + realpath FILE... + + Return the absolute pathnames of given FILE + + rev rev [FILE]... + + Reverse lines of FILE + + rm rm [-irf] FILE... + + Remove (unlink) FILEs + + -i Always prompt before removing + -f Never prompt + -R,-r Recurse + + rmdir + rmdir [OPTIONS] DIRECTORY... + + Remove DIRECTORY if it is empty + + -p Include parents + --ignore-fail-on-non-empty + + rpm rpm -i PACKAGE.rpm; rpm -qp[ildc] PACKAGE.rpm + + Manipulate RPM packages + + Commands: + + -i Install package + -qp Query package + -qpi Show information + -qpl List contents + -qpd List documents + -qpc List config files + + rpm2cpio + rpm2cpio PACKAGE.rpm + + Output a cpio archive of the rpm file + + sed sed [-i[SFX]] [-nrE] [-f FILE]... [-e CMD]... [FILE]... or: sed + [-i[SFX]] [-nrE] CMD [FILE]... + + -e CMD Add CMD to sed commands to be executed + -f FILE Add FILE contents to sed commands to be executed + -i[SFX] Edit files in-place (otherwise sends to stdout) + Optionally back files up, appending SFX + -n Suppress automatic printing of pattern space + -r,-E Use extended regex syntax + -b Keep CR/LF (Windows-only) + + If no -e or -f, the first non-option argument is the sed command + string. Remaining arguments are input files (stdin if none). + + seq seq [-w] [-s SEP] [FIRST [INC]] LAST + + Print numbers from FIRST to LAST, in steps of INC. FIRST, INC + default to 1. + + -w Pad to last with leading zeros + -s SEP String separator + + sh sh [-/+OPTIONS] [-/+o OPT]... [-c 'SCRIPT' [ARG0 [ARGS]] / FILE + [ARGS] / -s [ARGS]] + + Unix shell interpreter + + sha1sum + sha1sum [-c[sw]] [FILE]... + + Print or check SHA1 checksums + + -c Check sums against list in FILEs + -s Don't output anything, status code shows success + -w Warn about improperly formatted checksum lines + + sha256sum + sha256sum [-c[sw]] [FILE]... + + Print or check SHA256 checksums + + -c Check sums against list in FILEs + -s Don't output anything, status code shows success + -w Warn about improperly formatted checksum lines + + sha3sum + sha3sum [-c[sw]] [-a BITS] [FILE]... + + Print or check SHA3 checksums + + -c Check sums against list in FILEs + -s Don't output anything, status code shows success + -w Warn about improperly formatted checksum lines + -a BITS 224 (default), 256, 384, 512 + + sha512sum + sha512sum [-c[sw]] [FILE]... + + Print or check SHA512 checksums + + -c Check sums against list in FILEs + -s Don't output anything, status code shows success + -w Warn about improperly formatted checksum lines + + shred + shred FILE... + + Overwrite/delete FILEs + + -f Chmod to ensure writability + -n N Overwrite N times (default 3) + -z Final overwrite with zeros + -u Remove file + + shuf + shuf [-e|-i L-H] [-n NUM] [-o FILE] [-z] [FILE|ARG...] + + Randomly permute lines + + -e Treat ARGs as lines + -i L-H Treat numbers L-H as lines + -n NUM Output at most NUM lines + -o FILE Write to FILE, not standard output + -z End lines with zero byte, not newline + + sleep + sleep [N]... + + Pause for a time equal to the total of the args given, where each + arg can have an optional suffix of (s)econds, (m)inutes, (h)ours, + or (d)ays + + sort + sort [-nrugMcszbdfiokt] [-o FILE] [-k + start[.offset][opts][,end[.offset][opts]] [-t CHAR] [FILE]... + + Sort lines of text + + -o FILE Output to FILE + -c Check whether input is sorted + -b Ignore leading blanks + -f Ignore case + -i Ignore unprintable characters + -d Dictionary order (blank or alphanumeric only) + -n Sort numbers + -g General numerical sort + -M Sort month + -V Sort version + -t CHAR Field separator + -k N[,M] Sort by Nth field + -r Reverse sort order + -s Stable (don't sort ties alphabetically) + -u Suppress duplicate lines + -z Lines are terminated by NUL, not newline + + split + split [OPTIONS] [INPUT [PREFIX]] + + -b N[k|m] Split by N (kilo|mega)bytes + -l N Split by N lines + -a N Use N letters as suffix + + ssl_client + ssl_client [-e] -h handle [-n SNI] + + stat + stat [OPTIONS] FILE... + + Display file (default) or filesystem status + + -c FMT Use the specified format + -f Display filesystem status + -L Follow links + -t Terse display + + FMT sequences for files: + + %a Access rights in octal + %A Access rights in human readable form + %b Number of blocks allocated (see %B) + %B Size in bytes of each block reported by %b + %d Device number in decimal + %D Device number in hex + %f Raw mode in hex + %F File type + %g Group ID + %G Group name + %h Number of hard links + %i Inode number + %n File name + %N File name, with -> TARGET if symlink + %o I/O block size + %s Total size in bytes + %t Major device type in hex + %T Minor device type in hex + %u User ID + %U User name + %x Time of last access + %X Time of last access as seconds since Epoch + %y Time of last modification + %Y Time of last modification as seconds since Epoch + %z Time of last change + %Z Time of last change as seconds since Epoch + + FMT sequences for file systems: + + %a Free blocks available to non-superuser + %b Total data blocks + %c Total file nodes + %d Free file nodes + %f Free blocks + %i File System ID in hex + %l Maximum length of filenames + %n File name + %s Block size (for faster transfer) + %S Fundamental block size (for block counts) + %t Type in hex + %T Type in human readable form + + strings + strings [-fo] [-t o/d/x] [-n LEN] [FILE]... + + Display printable strings in a binary file + + -f Precede strings with filenames + -o Precede strings with octal offsets + -t o/d/x Precede strings with offsets in base 8/10/16 + -n LEN At least LEN characters form a string (default 4) + + sum sum [-rs] [FILE]... + + Checksum and count the blocks in a file + + -r Use BSD sum algorithm (1K blocks) + -s Use System V sum algorithm (512byte blocks) + + tac tac [FILE]... + + Concatenate FILEs and print them in reverse + + tail + tail [OPTIONS] [FILE]... + + Print last 10 lines of each FILE (or stdin) to stdout. With more + than one FILE, precede each with a filename header. + + -f Print data as file grows + -c [+]N[kbm] Print last N bytes + -n N[kbm] Print last N lines + -n +N[kbm] Start on Nth line and print the rest + -q Never print headers + -s SECONDS Wait SECONDS between reads with -f + -v Always print headers + -F Same as -f, but keep retrying + + N may be suffixed by k (x1024), b (x512), or m (x1024^2). + + tar tar c|x|t [-ZzJjahmvokO] [-f TARFILE] [-C DIR] [-T FILE] [-X FILE] + [--exclude PATTERN]... [FILE]... + + Create, extract, or list files from a tar file + + c Create + x Extract + t List + -f FILE Name of TARFILE ('-' for stdin/out) + -C DIR Change to DIR before operation + -v Verbose + -O Extract to stdout + -m Don't restore mtime + -o Don't restore user:group + -k Don't replace existing files + -Z (De)compress using compress + -z (De)compress using gzip + -J (De)compress using xz + -j (De)compress using bzip2 + -a (De)compress using lzma + -h Follow symlinks + -T FILE File with names to include + -X FILE File with glob patterns to exclude + --exclude PATTERN Glob pattern to exclude + + tee tee [-ai] [FILE]... + + Copy stdin to each FILE, and also to stdout + + -a Append to the given FILEs, don't overwrite + -i Ignore interrupt signals (SIGINT) + + timeout + timeout [-s SIG] SECS PROG ARGS + + Runs PROG. Sends SIG to it if it is not gone in SECS seconds. + Default SIG: TERM. + + touch + touch [-c] [-d DATE] [-t DATE] [-r FILE] FILE... + + Update the last-modified date on the given FILE[s] + + -c Don't create files + -d DT Date/time to use + -t DT Date/time to use + -r FILE Use FILE's date/time + + tr tr [-cds] STRING1 [STRING2] + + Translate, squeeze, or delete characters from stdin, writing to + stdout + + -c Take complement of STRING1 + -d Delete input characters coded STRING1 + -s Squeeze multiple output characters of STRING2 into one character + + truncate + truncate [-c] -s SIZE FILE... + + Truncate FILEs to the given size + + -c Do not create files + -s SIZE Truncate to SIZE + + ttysize + ttysize [w] [h] + + Print dimensions of stdin tty, or 80x24 + + uname + uname [-amnrspvio] + + Print system information + + -a Print all + -m The machine (hardware) type + -n Hostname + -r Kernel release + -s Kernel name (default) + -p Processor type + -v Kernel version + -i The hardware platform + -o OS name + + uncompress + uncompress [-cf] [FILE]... + + Decompress .Z file[s] + + -c Write to stdout + -f Overwrite + + unexpand + unexpand [-fa][-t N] [FILE]... + + Convert spaces to tabs, writing to stdout + + -a Convert all blanks + -f Convert only leading blanks + -t N Tabstops every N chars + + uniq + uniq [-cdu][-f,s,w N] [INPUT [OUTPUT]] + + Discard duplicate lines + + -c Prefix lines by the number of occurrences + -d Only print duplicate lines + -u Only print unique lines + -i Ignore case + -f N Skip first N fields + -s N Skip first N chars (after any skipped fields) + -w N Compare N characters in line + + unix2dos + unix2dos [-ud] [FILE] + + Convert FILE in-place from Unix to DOS format. When no file is + given, use stdin/stdout. + + -u dos2unix + -d unix2dos + + unlink + unlink FILE + + Delete FILE by calling unlink() + + unlzma + unlzma [-cfk] [FILE]... + + Decompress FILE (or stdin) + + -c Write to stdout + -f Force + -k Keep input files + + unlzop + unlzop [-cfUvF] [FILE]... + + -c Write to stdout + -f Force + -U Delete input files + -v Verbose + -F Don't verify checksum + + unxz + unxz [-cfk] [FILE]... + + Decompress FILE (or stdin) + + -c Write to stdout + -f Force + -k Keep input files + + unzip + unzip [-lnojpq] FILE[.zip] [FILE]... [-x FILE...] [-d DIR] + + Extract FILEs from ZIP archive + + -l List contents (with -q for short form) + -n Never overwrite files (default: ask) + -o Overwrite + -j Do not restore paths + -p Print to stdout + -q Quiet + -x FILE Exclude FILEs + -d DIR Extract into DIR + + usleep + usleep N + + Pause for N microseconds + + uudecode + uudecode [-o OUTFILE] [INFILE] + + Uudecode a file Finds OUTFILE in uuencoded source unless -o is + given + + uuencode + uuencode [-m] [FILE] STORED_FILENAME + + Uuencode FILE (or stdin) to stdout + + -m Use base64 encoding per RFC1521 + + vi vi [OPTIONS] [FILE]... + + Edit FILE + + -c CMD Initial command to run ($EXINIT also available) + -R Read-only + -H List available features + + watch + watch [-n SEC] [-t] PROG ARGS + + Run PROG periodically + + -n Loop period in seconds (default 2) + -t Don't print header + + wc wc [-clwL] [FILE]... + + Count lines, words, and bytes for each FILE (or stdin) + + -c Count bytes + -l Count newlines + -w Count words + -L Print longest line length + + wget + wget [-c|--continue] [--spider] [-q|--quiet] [-O|--output-document + FILE] [--header 'header: value'] [-Y|--proxy on/off] [-P DIR] + [-S|--server-response] [-U|--user-agent AGENT] URL... + + Retrieve files via HTTP or FTP + + --spider Only check URL existence: $? is 0 if exists + -c Continue retrieval of aborted transfer + -q Quiet + -P DIR Save to DIR (default .) + -S Show server response + -O FILE Save to FILE ('-' for stdout) + -U STR Use STR for User-Agent header + -Y on/off Use proxy + + which + which [COMMAND]... + + Locate a COMMAND + + whoami + whoami + + Print the user name associated with the current effective user id + + whois + whois [-i] [-h SERVER] [-p PORT] NAME... + + Query WHOIS info about NAME + + -i Show redirect results too + -h,-p Server to query + + xargs + xargs [OPTIONS] [PROG ARGS] + + Run PROG on every item given by stdin + + -p Ask user whether to run each command + -r Don't run command if input is empty + -0 Input is separated by NULs + -a FILE Read from FILE instead of stdin + -t Print the command on stderr before execution + -e[STR] STR stops input processing + -n N Pass no more than N args to PROG + -s N Pass command line of no more than N bytes + -I STR Replace STR within PROG ARGS with input line + -P N Run up to N PROGs in parallel + -x Exit if size is exceeded + + xxd xxd [OPTIONS] [FILE] + + Hex dump FILE (or stdin) + + -g N Bytes per group + -c N Bytes per line + -p Show only hex bytes, assumes -c30 + -l LENGTH Show only first LENGTH bytes + -s OFFSET Skip OFFSET bytes + + xz xz -d [-cfk] [FILE]... + + Decompress FILE (or stdin) + + -d Decompress + -c Write to stdout + -f Force + -k Keep input files + + xzcat + xzcat [FILE]... + + Decompress to stdout + + yes yes [STRING] + + Repeatedly output a line with STRING, or 'y' + + zcat + zcat [FILE]... + + Decompress to stdout + +LIBC NSS + GNU Libc (glibc) uses the Name Service Switch (NSS) to configure the + behavior of the C library for the local environment, and to configure + how it reads system data, such as passwords and group information. + This is implemented using an /etc/nsswitch.conf configuration file, and + using one or more of the /lib/libnss_* libraries. BusyBox tries to + avoid using any libc calls that make use of NSS. Some applets however, + such as login and su, will use libc functions that require NSS. + + If you enable CONFIG_USE_BB_PWD_GRP, BusyBox will use internal + functions to directly access the /etc/passwd, /etc/group, and + /etc/shadow files without using NSS. This may allow you to run your + system without the need for installing any of the NSS configuration + files and libraries. + + When used with glibc, the BusyBox 'networking' applets will similarly + require that you install at least some of the glibc NSS stuff (in + particular, /etc/nsswitch.conf, /lib/libnss_dns*, /lib/libnss_files*, + and /lib/libresolv*). + + Shameless Plug: As an alternative, one could use a C library such as + uClibc. In addition to making your system significantly smaller, + uClibc does not require the use of any NSS support files or libraries. + +MAINTAINER + Denis Vlasenko + +AUTHORS + The following people have contributed code to BusyBox whether they know + it or not. If you have written code included in BusyBox, you should + probably be listed here so you can obtain your bit of eternal glory. + If you should be listed here, or the description of what you have done + needs more detail, or is incorrect, please send in an update. + + Emanuele Aina + run-parts + + Erik Andersen + + Tons of new stuff, major rewrite of most of the + core apps, tons of new apps as noted in header files. + Lots of tedious effort writing these boring docs that + nobody is going to actually read. + + Laurence Anderson + + rpm2cpio, unzip, get_header_cpio, read_gz interface, rpm + + Jeff Angielski + + ftpput, ftpget + + Edward Betts + + expr, hostid, logname, whoami + + John Beppu + + du, nslookup, sort + + Brian Candler + + tiny-ls(ls) + + Randolph Chung + + fbset, ping, hostname + + Dave Cinege + + more(v2), makedevs, dutmp, modularization, auto links file, + various fixes, Linux Router Project maintenance + + Jordan Crouse + + ipcalc + + Magnus Damm + + tftp client insmod powerpc support + + Larry Doolittle + + pristine source directory compilation, lots of patches and fixes. + + Glenn Engel + + httpd + + Gennady Feldman + + Sysklogd (single threaded syslogd, IPC Circular buffer support, + logread), various fixes. + + Karl M. Hegbloom + + cp_mv.c, the test suite, various fixes to utility.c, &c. + + Daniel Jacobowitz + + mktemp.c + + Matt Kraai + + documentation, bugfixes, test suite + + Stephan Linz + + ipcalc, Red Hat equivalence + + John Lombardo + + tr + + Glenn McGrath + + Common unarchiving code and unarchiving applets, ifupdown, ftpgetput, + nameif, sed, patch, fold, install, uudecode. + Various bugfixes, review and apply numerous patches. + + Manuel Novoa III + + cat, head, mkfifo, mknod, rmdir, sleep, tee, tty, uniq, usleep, wc, yes, + mesg, vconfig, make_directory, parse_mode, dirname, mode_string, + get_last_path_component, simplify_path, and a number trivial libbb routines + + also bug fixes, partial rewrites, and size optimizations in + ash, basename, cal, cmp, cp, df, du, echo, env, ln, logname, md5sum, mkdir, + mv, realpath, rm, sort, tail, touch, uname, watch, arith, human_readable, + interface, dutmp, ifconfig, route + + Vladimir Oleynik + + cmdedit; xargs(current), httpd(current); + ports: ash, crond, fdisk, inetd, stty, traceroute, top; + locale, various fixes + and irreconcilable critic of everything not perfect. + + Bruce Perens + + Original author of BusyBox in 1995, 1996. Some of his code can + still be found hiding here and there... + + Tim Riker + + bug fixes, member of fan club + + Kent Robotti + + reset, tons and tons of bug reports and patches. + + Chip Rosenthal , + + wget - Contributed by permission of Covad Communications + + Pavel Roskin + + Lots of bugs fixes and patches. + + Gyepi Sam + + Remote logging feature for syslogd + + Linus Torvalds + + mkswap, fsck.minix, mkfs.minix + + Mark Whitley + + grep, sed, cut, xargs(previous), + style-guide, new-applet-HOWTO, bug fixes, etc. + + Charles P. Wright + + gzip, mini-netcat(nc) + + Enrique Zanardi + + tarcat (since removed), loadkmap, various fixes, Debian maintenance + + Tito Ragusa + + devfsd and size optimizations in strings, openvt and deallocvt. + + Paul Fox + + vi editing mode for ash, various other patches/fixes + + Roberto A. Foglietta + + port: dnsd + + Bernhard Reutner-Fischer + + misc + + Mike Frysinger + + initial e2fsprogs, printenv, setarch, sum, misc + + Jie Zhang + + fixed two bugs in msh and hush (exitcode of killed processes) + +version 1.30.0-FRP-2358-g25a1bcec72018-09-11 BUSYBOX(1) diff --git a/mcwin32/support/busybox.exe b/mcwin32/support/busybox.exe index 05082255..3f36d4df 100644 Binary files a/mcwin32/support/busybox.exe and b/mcwin32/support/busybox.exe differ diff --git a/mcwin32/support/busybox.exe.sig b/mcwin32/support/busybox.exe.sig new file mode 100644 index 00000000..bb831134 Binary files /dev/null and b/mcwin32/support/busybox.exe.sig differ diff --git a/mcwin32/support/busybox64.exe b/mcwin32/support/busybox64.exe new file mode 100644 index 00000000..537b7f94 Binary files /dev/null and b/mcwin32/support/busybox64.exe differ diff --git a/mcwin32/support/busybox64.exe.sig b/mcwin32/support/busybox64.exe.sig new file mode 100644 index 00000000..e444d56e Binary files /dev/null and b/mcwin32/support/busybox64.exe.sig differ diff --git a/mcwin32/support/mklicense.pl b/mcwin32/support/mklicense.pl new file mode 100644 index 00000000..1cb860b7 --- /dev/null +++ b/mcwin32/support/mklicense.pl @@ -0,0 +1,74 @@ +#!/usr/bin/perl -w +# -*- mode: perl; -*- +# $Id: mklicense.pl,v 1.1 2024/03/15 13:49:24 cvsuser Exp $ +# +# Copyright (c) 2020 - 2024, Adam Young. +# All rights reserved. +# +# The applications are free software: you can redistribute it +# and/or modify it under the terms of the GNU General Public License as +# published by the Free Software Foundation, version 3. +# +# Redistributions of source code must retain the above copyright +# notice, and must be distributed with the license document above. +# +# Redistributions in binary form must reproduce the above copyright +# notice, and must include the license document above in +# the documentation and/or other materials provided with the +# distribution. +# +# The applications are 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 General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# ==end== +# + +use strict; +use warnings 'all'; + +my $in = shift @ARGV; +my $out = shift @ARGV; +my $lbl = 'license'; + +$lbl = shift @ARGV + if (scalar @ARGV); + +die "usage: mklicense [label=license]\n\n" + if (!$in or !$out); + +open (INPUT, $in) or + die "can't open <${in}>: $!"; + +open (OUTPUT, '>', $out) or + die "can't create <${out}>: $!"; + +print OUTPUT + "/* File created from ${in} via mklicense.pl */\n". + "const char *${lbl}[] = {\n"; + +my $lines = 0; +while () { + chomp; + print OUTPUT ",\n" + if ($lines++); + s/\"/\\\"/g; + print OUTPUT "\t\"$_\""; + last if (/END OF TERMS AND CONDITIONS/); + } + +print OUTPUT + "\n};\n". + "/*end*/\n"; + +close(INPUT) or + die "can't close <${in}>: $!"; + +close(OUTPUT) or + die "can't close <${out}>: $!"; + +#end + diff --git a/mcwin32/support/owc20setenv.bat b/mcwin32/support/owc20setenv.bat index 6290d60a..9dc4be43 100644 --- a/mcwin32/support/owc20setenv.bat +++ b/mcwin32/support/owc20setenv.bat @@ -1,6 +1,8 @@ @echo off echo Open Watcom 2.0 Build Environment -SET OWC20=d:\tools\WC20 +if not defined OWC20 ( + SET OWC20=d:\tools\WC20 +) if NOT "%1" == "" SET OWC20=%1 PATH %OWC20%\BINNT64;%OWC20%\BINNT;%PATH% SET INCLUDE=%OWC20%\H;%OWC20%\H\NT;%OWC20%\H\NT\DIRECTX;%OWC20%\H\NT\DDK;%INCLUDE% diff --git a/mcwin32/support/rmdir_p.pl b/mcwin32/support/rmdir_p.pl new file mode 100644 index 00000000..89ab67e0 --- /dev/null +++ b/mcwin32/support/rmdir_p.pl @@ -0,0 +1,39 @@ +#!/usr/bin/perl -w +# -*- mode: perl; -*- +# $Id: rmdir_p.pl,v 1.1 2024/03/15 13:49:24 cvsuser Exp $ +# +# "rmdir -p" emulation. +# +use strict; +use warnings 'all'; + +sub rmdir_p { + my $dir = shift; + my $child = shift; + + $dir =~ s|/*\Z(?!\n)||s; + return if (-d $dir); + + unless (rmdir($dir)) { + return if ($child); + die "Cannot remove directory $dir: $!\n"; + } + + if ($dir =~ m|[^/]/|s) { + my $parent = $dir; + $parent =~ s|[^/]*\Z(?!\n)||s; + rmdir_p($parent, 1); + } + + print "removed directory `$dir'\n"; +} + +my $arg; + +foreach $arg (@ARGV) { + $arg =~ tr|\\|/|; + rmdir_p($arg, 0); +} + +#end + diff --git a/mcwin32/support/updateyear.pl b/mcwin32/support/updateyear.pl index efe25b8a..2f90f16c 100644 --- a/mcwin32/support/updateyear.pl +++ b/mcwin32/support/updateyear.pl @@ -1,5 +1,5 @@ #!/usr/bin/perl -# $Id: updateyear.pl,v 1.1 2023/10/02 08:13:36 cvsuser Exp $ +# $Id: updateyear.pl,v 1.2 2024/02/02 15:19:01 cvsuser Exp $ # -*- mode: perl; tabs: 8; indent-width: 4; -*- # Update the copyright year within the specified files # @@ -151,8 +151,15 @@ chomp(); chomp(); if ($result < 0) { if (/Copyright \(C\) 20/i) { + s/- 2023/- 2024/; + s/-2023/-2024/; s/-2022/-2023/; $result = scalar @lines; + + } elsif (/Copyright \(C\) 19/i) { + s/- 2023/- 2024/; + s/- 2022/- 2024/; + $result = scalar @lines; } } push @lines, $_."\n";