├── .clang-format ├── .gitattributes ├── .github ├── PULL_REQUEST_TEMPLATE.md └── workflows │ ├── ci-alpine.yml │ ├── ci-fedora.yml │ ├── ci-freebsd.yml │ ├── ci-macos.yml │ ├── ci-solaris.yml │ ├── ci-ubuntu.yml │ ├── ci.yml │ ├── transifex.yml │ └── update-sources.yml ├── .gitignore ├── AUTHORS ├── COPYING ├── ChangeLog ├── INSTALL ├── Makefile.am ├── NEWS ├── README.md ├── acinclude.m4 ├── autogen.sh ├── build-glib2.sh ├── configure.ac ├── contrib ├── .gitignore ├── Makefile.am ├── README.xterm ├── mc-wrapper.csh.in ├── mc-wrapper.sh.in ├── mc.csh.in └── mc.sh.in ├── doc ├── .gitignore ├── COPYING ├── FAQ ├── HACKING ├── INSTALL ├── Makefile.am ├── NEWS ├── NEWS.4.7 ├── NEWS.OLD ├── README ├── RELEASE_PROCEDURE ├── TODO ├── doxygen-include.am ├── doxygen.cfg ├── filehighlight.txt ├── hints │ ├── Makefile.am │ ├── l10n │ │ ├── Makefile.am │ │ ├── README.txt │ │ ├── mc.hint.be │ │ ├── mc.hint.bg │ │ ├── mc.hint.ca │ │ ├── mc.hint.cs │ │ ├── mc.hint.da │ │ ├── mc.hint.de │ │ ├── mc.hint.el │ │ ├── mc.hint.en_GB │ │ ├── mc.hint.eo │ │ ├── mc.hint.es │ │ ├── mc.hint.et │ │ ├── mc.hint.eu │ │ ├── mc.hint.fa │ │ ├── mc.hint.fr │ │ ├── mc.hint.ga │ │ ├── mc.hint.gl │ │ ├── mc.hint.hu │ │ ├── mc.hint.id │ │ ├── mc.hint.it │ │ ├── mc.hint.ja │ │ ├── mc.hint.ka │ │ ├── mc.hint.ko │ │ ├── mc.hint.lt │ │ ├── mc.hint.nb │ │ ├── mc.hint.nl │ │ ├── mc.hint.pl │ │ ├── mc.hint.pt │ │ ├── mc.hint.pt_BR │ │ ├── mc.hint.ro │ │ ├── mc.hint.ru │ │ ├── mc.hint.sk │ │ ├── mc.hint.sr │ │ ├── mc.hint.sv │ │ ├── mc.hint.tr │ │ ├── mc.hint.uk │ │ ├── mc.hint.zh_CN │ │ └── mc.hint.zh_TW │ └── mc.hint ├── hlp │ ├── Makefile.am │ ├── es │ │ ├── Makefile.am │ │ └── xnc.hlp │ ├── hlp-lang-include.am │ ├── hu │ │ ├── Makefile.am │ │ └── xnc.hlp │ ├── it │ │ ├── Makefile.am │ │ └── xnc.hlp │ ├── pl │ │ ├── Makefile.am │ │ └── xnc.hlp │ ├── ru │ │ ├── Makefile.am │ │ └── xnc.hlp │ ├── sr │ │ ├── Makefile.am │ │ └── xnc.hlp │ └── xnc.hlp └── man │ ├── Makefile.am │ ├── date-of-man-include.am │ ├── es │ ├── Makefile.am │ └── mc.1.in │ ├── hu │ ├── Makefile.am │ └── mc.1.in │ ├── it │ ├── Makefile.am │ └── mc.1.in │ ├── mc.1.in │ ├── mcdiff.1.in │ ├── mcedit.1.in │ ├── mcview.1.in │ ├── pl │ ├── Makefile.am │ └── mc.1.in │ ├── ru │ ├── Makefile.am │ └── mc.1.in │ └── sr │ ├── Makefile.am │ └── mc.1.in ├── lib ├── Makefile.am ├── charsets.c ├── charsets.h ├── event-types.h ├── event.h ├── event │ ├── Makefile.am │ ├── README │ ├── README.ru │ ├── event.c │ ├── internal.h │ ├── manage.c │ └── raise.c ├── file-entry.h ├── filehighlight.h ├── filehighlight │ ├── Makefile.am │ ├── common.c │ ├── get-color.c │ ├── ini-file-read.c │ └── internal.h ├── fileloc.h ├── fs.h ├── glibcompat.c ├── glibcompat.h ├── global.c ├── global.h ├── hook.c ├── hook.h ├── idx.h ├── intprops-internal.h ├── intprops.h ├── keybind.c ├── keybind.h ├── lock.c ├── lock.h ├── logging.c ├── logging.h ├── mcconfig.h ├── mcconfig │ ├── Makefile.am │ ├── common.c │ ├── get.c │ ├── history.c │ ├── paths.c │ └── set.c ├── search.h ├── search │ ├── Makefile.am │ ├── glob.c │ ├── hex.c │ ├── internal.h │ ├── lib.c │ ├── normal.c │ ├── regex.c │ └── search.c ├── serialize.c ├── serialize.h ├── shell.c ├── shell.h ├── skin.h ├── skin │ ├── Makefile.am │ ├── colors-old.c │ ├── colors.c │ ├── common.c │ ├── hc-skins.c │ ├── ini-file.c │ ├── internal.h │ └── lines.c ├── stat-size.h ├── stdckdint.in.h ├── strutil.h ├── strutil │ ├── Makefile.am │ ├── filevercmp.c │ ├── replace.c │ ├── strescape.c │ ├── strutil.c │ ├── strutil8bit.c │ ├── strutilascii.c │ ├── strutilutf8.c │ ├── strverscmp.c │ ├── tokenize.c │ └── xstrtol.c ├── timefmt.c ├── timefmt.h ├── tty │ ├── Makefile.am │ ├── color-internal.c │ ├── color-internal.h │ ├── color-ncurses.c │ ├── color-slang.c │ ├── color-slang.h │ ├── color.c │ ├── color.h │ ├── key.c │ ├── key.h │ ├── keyxdef.c │ ├── mouse.c │ ├── mouse.h │ ├── tty-internal.c │ ├── tty-internal.h │ ├── tty-ncurses.c │ ├── tty-ncurses.h │ ├── tty-slang.c │ ├── tty-slang.h │ ├── tty.c │ ├── tty.h │ ├── win.c │ ├── win.h │ ├── x11conn.c │ └── x11conn.h ├── unixcompat.h ├── util.c ├── util.h ├── utilunix.c ├── vfs │ ├── Makefile.am │ ├── README │ ├── direntry.c │ ├── gc.c │ ├── gc.h │ ├── interface.c │ ├── netutil.c │ ├── netutil.h │ ├── parse_ls_vga.c │ ├── path.c │ ├── path.h │ ├── utilvfs.c │ ├── utilvfs.h │ ├── vfs.c │ ├── vfs.h │ └── xdirentry.h ├── widget.h └── widget │ ├── Makefile.am │ ├── background.c │ ├── background.h │ ├── button.c │ ├── button.h │ ├── buttonbar.c │ ├── buttonbar.h │ ├── check.c │ ├── check.h │ ├── dialog-switch.c │ ├── dialog-switch.h │ ├── dialog.c │ ├── dialog.h │ ├── frame.c │ ├── frame.h │ ├── gauge.c │ ├── gauge.h │ ├── group.c │ ├── group.h │ ├── groupbox.c │ ├── groupbox.h │ ├── history.c │ ├── history.h │ ├── hline.c │ ├── hline.h │ ├── input.c │ ├── input.h │ ├── input_complete.c │ ├── label.c │ ├── label.h │ ├── listbox-window.c │ ├── listbox-window.h │ ├── listbox.c │ ├── listbox.h │ ├── menu.c │ ├── menu.h │ ├── mouse.c │ ├── mouse.h │ ├── quick.c │ ├── quick.h │ ├── radio.c │ ├── radio.h │ ├── rect.c │ ├── rect.h │ ├── widget-common.c │ ├── widget-common.h │ ├── wtools.c │ └── wtools.h ├── m4.include ├── ax_append_compile_flags.m4 ├── ax_append_flag.m4 ├── ax_check_compile_flag.m4 ├── ax_gcc_func_attribute.m4 ├── ax_require_defined.m4 ├── dx_doxygen.m4 ├── gnulib │ ├── fstypename.m4 │ ├── fsusage.m4 │ ├── mc-gnulib-common.m4 │ ├── mode_t.m4 │ ├── mountlist.m4 │ ├── stat-size.m4 │ ├── sys_types_h.m4 │ └── windows-stat-inodes.m4 ├── mc-assert.m4 ├── mc-background.m4 ├── mc-cflags.m4 ├── mc-ext2fs-attr.m4 ├── mc-get-fs-info.m4 ├── mc-glib.m4 ├── mc-i18n.m4 ├── mc-stdckdint.m4 ├── mc-subshell.m4 ├── mc-tests.m4 ├── mc-use-termcap.m4 ├── mc-version.m4 ├── mc-vfs.m4 ├── mc-with-internal-edit.m4 ├── mc-with-screen-ncurses.m4 ├── mc-with-screen-slang.m4 ├── mc-with-screen.m4 ├── mc-with-x.m4 └── vfs │ ├── mc-vfs-cpiofs.m4 │ ├── mc-vfs-extfs.m4 │ ├── mc-vfs-ftp.m4 │ ├── mc-vfs-sfs.m4 │ ├── mc-vfs-sftp.m4 │ ├── mc-vfs-shell.m4 │ ├── mc-vfs-tarfs.m4 │ ├── mc-vfs-undelfs.m4 │ └── socket.m4 ├── maint ├── doctest ├── find-dup-includes │ ├── exclude-list.cfg │ ├── find-in-one-file.pl │ └── runme.sh ├── htagsfix ├── sync-transifex │ ├── .gitignore │ ├── README.md │ ├── config.d │ │ ├── mc.hint │ │ │ ├── po4a.cfg │ │ │ └── tx.config │ │ └── mc.pot │ │ │ └── tx.config │ ├── hints-from-transifex.py │ ├── hints-to-transifex.py │ ├── po-from-transifex.py │ ├── po-to-transifex.py │ └── translation_utils.py ├── templates │ ├── template.c │ ├── template.h │ ├── template.m4 │ └── template.shell ├── unrefglobals.pl └── update-years.sh ├── misc ├── .gitignore ├── Makefile.am ├── edit.indent.rc ├── ext.d │ ├── Makefile.am │ ├── archive.sh │ ├── doc.sh.in │ ├── image.sh │ ├── misc.sh.in │ ├── package.sh │ ├── sound.sh │ ├── text.sh.in │ ├── video.sh │ └── web.sh ├── filehighlight.ini ├── macros.d │ ├── Makefile.am │ ├── macro.0.sh │ ├── macro.1.sh │ ├── macro.2.sh │ ├── macro.3.sh │ ├── macro.4.sh │ ├── macro.5.sh │ ├── macro.6.sh │ └── macro.7.sh ├── mc.charsets.in ├── mc.default.keymap ├── mc.emacs.keymap ├── mc.ext.ini.in ├── mc.keymap ├── mc.lib ├── mc.macros ├── mc.menu.in ├── mc.vim.keymap ├── mcedit.menu.in ├── skins │ ├── Makefile.am │ ├── dark.ini │ ├── darkfar.ini │ ├── default.ini │ ├── double-lines.ini │ ├── featured-plus.ini │ ├── featured.ini │ ├── gotar.ini │ ├── gray-green-purple256.ini │ ├── gray-orange-blue256.ini │ ├── julia256.ini │ ├── julia256root.ini │ ├── mc46.ini │ ├── modarcon16-defbg-thin.ini │ ├── modarcon16-defbg.ini │ ├── modarcon16-thin.ini │ ├── modarcon16.ini │ ├── modarcon16root-defbg-thin.ini │ ├── modarcon16root-defbg.ini │ ├── modarcon16root-thin.ini │ ├── modarcon16root.ini │ ├── modarin256-defbg-thin.ini │ ├── modarin256-defbg.ini │ ├── modarin256-thin.ini │ ├── modarin256.ini │ ├── modarin256root-defbg-thin.ini │ ├── modarin256root-defbg.ini │ ├── modarin256root-thin.ini │ ├── modarin256root.ini │ ├── nicedark.ini │ ├── sand256.ini │ ├── seasons-autumn16M.ini │ ├── seasons-spring16M.ini │ ├── seasons-summer16M.ini │ ├── seasons-winter16M.ini │ ├── xoria256-thin.ini │ ├── xoria256.ini │ ├── xoria256root-thin.ini │ ├── yadt256-defbg.ini │ └── yadt256.ini ├── syntax │ ├── Makefile.am │ ├── PKGBUILD.syntax │ ├── Syntax.in │ ├── ada95.syntax │ ├── as.syntax │ ├── aspx.syntax │ ├── assembler.syntax │ ├── awk.syntax │ ├── b.syntax │ ├── c.syntax │ ├── cabal.syntax │ ├── changelog.syntax │ ├── cmake.syntax │ ├── cobol.syntax │ ├── cs.syntax │ ├── css.syntax │ ├── cuda.syntax │ ├── cxx.syntax │ ├── cython.syntax │ ├── d.syntax │ ├── debian-changelog.syntax │ ├── debian-control.syntax │ ├── debian-description.syntax │ ├── debian-sources-list.syntax │ ├── diff.syntax │ ├── dlink.syntax │ ├── dos.syntax │ ├── dot.syntax │ ├── ebuild.syntax │ ├── eiffel.syntax │ ├── erlang.syntax │ ├── f90.syntax │ ├── filehighlight.syntax │ ├── fortran.syntax │ ├── glsl.syntax │ ├── go.syntax │ ├── haskell.syntax │ ├── hive.syntax │ ├── html.syntax │ ├── idl.syntax │ ├── ini.syntax │ ├── j.syntax │ ├── jal.syntax │ ├── java.syntax │ ├── js.syntax │ ├── json.syntax │ ├── kotlin.syntax │ ├── latex.syntax │ ├── lisp.syntax │ ├── lkr.syntax │ ├── lsm.syntax │ ├── lua.syntax │ ├── m4.syntax │ ├── mail.syntax │ ├── makefile.syntax │ ├── markdown.syntax │ ├── meson.syntax │ ├── ml.syntax │ ├── muttrc.syntax │ ├── named.syntax │ ├── nemerle.syntax │ ├── nroff.syntax │ ├── octave.syntax │ ├── opencl.syntax │ ├── osl.syntax │ ├── pascal.syntax │ ├── perl.syntax │ ├── php.syntax │ ├── po.syntax │ ├── povray.syntax │ ├── privoxy.syntax │ ├── procmail.syntax │ ├── properties.syntax │ ├── protobuf.syntax │ ├── puppet.syntax │ ├── python.syntax │ ├── r.syntax │ ├── ruby.syntax │ ├── rust.syntax │ ├── sh.syntax │ ├── slang.syntax │ ├── smalltalk.syntax │ ├── spec.syntax │ ├── spice.syntax │ ├── sql.syntax │ ├── strace.syntax │ ├── swift.syntax │ ├── swig.syntax │ ├── syntax.syntax │ ├── tcl.syntax │ ├── texinfo.syntax │ ├── toml.syntax │ ├── ts.syntax │ ├── tt.syntax │ ├── turtle.syntax │ ├── unknown.syntax │ ├── verilog.syntax │ ├── vhdl.syntax │ ├── xml.syntax │ ├── yabasic.syntax │ ├── yaml.syntax │ ├── yum-repo.syntax │ └── yxx.syntax └── xterm.ad ├── po ├── .gitignore ├── LINGUAS ├── Makevars ├── README ├── Rules-pot-defaults ├── af.po ├── ar.po ├── az.po ├── be.po ├── bg.po ├── br.po ├── ca.po ├── cs.po ├── da.po ├── de.po ├── de_CH.po ├── el.po ├── en_GB.po ├── eo.po ├── es.po ├── et.po ├── eu.po ├── fa.po ├── fi.po ├── fr.po ├── fr_CA.po ├── ga.po ├── gl.po ├── he.po ├── hr.po ├── hu.po ├── ia.po ├── id.po ├── ie.po ├── it.po ├── ja.po ├── ka.po ├── kk.po ├── ko.po ├── kw.po ├── lt.po ├── lv.po ├── mc.pot ├── mn.po ├── nb.po ├── nl.po ├── nl_BE.po ├── pl.po ├── pt.po ├── pt_BR.po ├── ro.po ├── ru.po ├── sk.po ├── sl.po ├── sr.po ├── sv.po ├── szl.po ├── ta.po ├── te.po ├── tr.po ├── uk.po ├── uz.po ├── vi.po ├── wa.po ├── zh_CN.po └── zh_TW.po ├── src ├── .gitignore ├── Makefile.am ├── args.c ├── args.h ├── background.c ├── background.h ├── clipboard.c ├── clipboard.h ├── cons.handler.c ├── consaver │ ├── Makefile.am │ ├── cons.saver.c │ └── cons.saver.h ├── diffviewer │ ├── Makefile.am │ ├── internal.h │ ├── search.c │ ├── ydiff.c │ └── ydiff.h ├── editor │ ├── Makefile.am │ ├── bookmark.c │ ├── edit-impl.h │ ├── edit.c │ ├── edit.h │ ├── editbuffer.c │ ├── editbuffer.h │ ├── editcmd.c │ ├── editcomplete.c │ ├── editcomplete.h │ ├── editdraw.c │ ├── editmacros.c │ ├── editmacros.h │ ├── editmenu.c │ ├── editoptions.c │ ├── editsearch.c │ ├── editsearch.h │ ├── editwidget.c │ ├── editwidget.h │ ├── etags.c │ ├── etags.h │ ├── format.c │ ├── spell.c │ ├── spell.h │ └── syntax.c ├── events_init.c ├── events_init.h ├── execute.c ├── execute.h ├── file_history.c ├── file_history.h ├── filemanager │ ├── Makefile.am │ ├── achown.c │ ├── boxes.c │ ├── boxes.h │ ├── cd.c │ ├── cd.h │ ├── chattr.c │ ├── chmod.c │ ├── chown.c │ ├── cmd.c │ ├── cmd.h │ ├── command.c │ ├── command.h │ ├── dir.c │ ├── dir.h │ ├── ext.c │ ├── ext.h │ ├── file.c │ ├── file.h │ ├── filegui.c │ ├── filegui.h │ ├── filemanager.c │ ├── filemanager.h │ ├── filenot.c │ ├── filenot.h │ ├── find.c │ ├── hotlist.c │ ├── hotlist.h │ ├── info.c │ ├── info.h │ ├── ioblksize.h │ ├── layout.c │ ├── layout.h │ ├── listmode.c │ ├── listmode.h │ ├── mountlist.c │ ├── mountlist.h │ ├── panel.c │ ├── panel.h │ ├── panelize.c │ ├── panelize.h │ ├── tree.c │ ├── tree.h │ ├── treestore.c │ └── treestore.h ├── help.c ├── help.h ├── history.h ├── keymap.c ├── keymap.h ├── learn.c ├── learn.h ├── main.c ├── man2hlp │ ├── Makefile.am │ └── man2hlp.in ├── selcodepage.c ├── selcodepage.h ├── setup.c ├── setup.h ├── subshell │ ├── Makefile.am │ ├── common.c │ ├── internal.h │ ├── proxyfunc.c │ └── subshell.h ├── textconf.c ├── textconf.h ├── usermenu.c ├── usermenu.h ├── util.c ├── util.h ├── vfs │ ├── Makefile.am │ ├── cpio │ │ ├── Makefile.am │ │ ├── cpio.c │ │ └── cpio.h │ ├── extfs │ │ ├── Makefile.am │ │ ├── extfs.c │ │ ├── extfs.h │ │ └── helpers │ │ │ ├── .gitignore │ │ │ ├── Makefile.am │ │ │ ├── README │ │ │ ├── README.extfs │ │ │ ├── README.uzip │ │ │ ├── a+.in │ │ │ ├── apt+.in │ │ │ ├── audio.in │ │ │ ├── bpp │ │ │ ├── changesetfs │ │ │ ├── deb.in │ │ │ ├── deba.in │ │ │ ├── debd.in │ │ │ ├── dpkg+.in │ │ │ ├── gitfs+ │ │ │ ├── hp48+.in │ │ │ ├── iso9660.in │ │ │ ├── lslR.in │ │ │ ├── mailfs.in │ │ │ ├── patchfs.in │ │ │ ├── patchsetfs │ │ │ ├── rpm │ │ │ ├── rpms+.in │ │ │ ├── s3+.in │ │ │ ├── torrent.in │ │ │ ├── trpm │ │ │ ├── u7z │ │ │ ├── uace.in │ │ │ ├── ualz.in │ │ │ ├── uar.in │ │ │ ├── uarc.in │ │ │ ├── uarj.in │ │ │ ├── uc1541.in │ │ │ ├── ucab.in │ │ │ ├── uha.in │ │ │ ├── ulha.in │ │ │ ├── ulib.in │ │ │ ├── unar.in │ │ │ ├── urar.in │ │ │ ├── usqfs.in │ │ │ ├── uwim.in │ │ │ ├── uzip.in │ │ │ └── uzoo.in │ ├── ftpfs │ │ ├── Makefile.am │ │ ├── ftpfs.c │ │ ├── ftpfs.h │ │ └── ftpfs_parse_ls.c │ ├── local │ │ ├── Makefile.am │ │ ├── local.c │ │ └── local.h │ ├── plugins_init.c │ ├── plugins_init.h │ ├── sfs │ │ ├── Makefile.am │ │ ├── sfs.c │ │ ├── sfs.h │ │ └── sfs.ini │ ├── sftpfs │ │ ├── Makefile.am │ │ ├── config_parser.c │ │ ├── connection.c │ │ ├── dir.c │ │ ├── file.c │ │ ├── internal.c │ │ ├── internal.h │ │ ├── sftpfs.c │ │ └── sftpfs.h │ ├── shell │ │ ├── Makefile.am │ │ ├── helpers │ │ │ ├── Makefile.am │ │ │ ├── README.shell │ │ │ ├── append │ │ │ ├── chmod │ │ │ ├── chown │ │ │ ├── fexists │ │ │ ├── get │ │ │ ├── hardlink │ │ │ ├── info │ │ │ ├── ln │ │ │ ├── ls │ │ │ ├── mkdir │ │ │ ├── mv │ │ │ ├── rmdir │ │ │ ├── send │ │ │ ├── unlink │ │ │ └── utime │ │ ├── shell.c │ │ ├── shell.h │ │ └── shelldef.h │ ├── tar │ │ ├── Makefile.am │ │ ├── tar-internal.c │ │ ├── tar-internal.h │ │ ├── tar-sparse.c │ │ ├── tar-xheader.c │ │ ├── tar.c │ │ └── tar.h │ └── undelfs │ │ ├── Makefile.am │ │ ├── undelfs.c │ │ └── undelfs.h └── viewer │ ├── Makefile.am │ ├── actions_cmd.c │ ├── ascii.c │ ├── coord_cache.c │ ├── datasource.c │ ├── dialogs.c │ ├── display.c │ ├── growbuf.c │ ├── hex.c │ ├── internal.h │ ├── lib.c │ ├── mcviewer.c │ ├── mcviewer.h │ ├── move.c │ ├── nroff.c │ └── search.c ├── tests ├── .gitignore ├── Makefile.am ├── README ├── lib │ ├── Makefile.am │ ├── library_independ.c │ ├── mc_build_filename.c │ ├── mc_realpath.c │ ├── mcconfig │ │ ├── Makefile.am │ │ ├── config_string.c │ │ └── user_configs_path.c │ ├── name_quote.c │ ├── search │ │ ├── Makefile.am │ │ ├── glob_prepare_replace_str.c │ │ ├── glob_translate_to_regex.c │ │ ├── hex_translate_to_regex.c │ │ ├── regex_process_escape_sequence.c │ │ ├── regex_replace_esc_seq.c │ │ └── translate_replace_glob_to_regex.c │ ├── serialize.c │ ├── strutil │ │ ├── Makefile.am │ │ ├── filevercmp.c │ │ ├── parse_integer.c │ │ ├── str_replace_all.c │ │ ├── str_rstrip_eol.c │ │ └── str_verscmp.c │ ├── utilunix__mc_pstream_get_string.c │ ├── utilunix__my_system-common.c │ ├── utilunix__my_system-fork_child.c │ ├── utilunix__my_system-fork_child_shell.c │ ├── utilunix__my_system-fork_fail.c │ ├── vfs │ │ ├── Makefile.am │ │ ├── canonicalize_pathname.c │ │ ├── current_dir.c │ │ ├── mc.charsets.in │ │ ├── path_cmp.c │ │ ├── path_len.c │ │ ├── path_manipulations.c │ │ ├── path_recode.c │ │ ├── path_serialize.c │ │ ├── relative_cd.c │ │ ├── tempdir.c │ │ ├── vfs_adjust_stat.c │ │ ├── vfs_get_encoding.c │ │ ├── vfs_parse_ls_lga.c │ │ ├── vfs_path_from_str_flags.c │ │ ├── vfs_path_string_convert.c │ │ ├── vfs_prefix_to_class.c │ │ ├── vfs_s_get_path.c │ │ ├── vfs_setup_cwd.c │ │ └── vfs_split.c │ ├── widget │ │ ├── Makefile.am │ │ ├── complete_engine.c │ │ ├── group_init_destroy.c │ │ ├── hotkey_equal.c │ │ ├── widget_find_by_id.c │ │ └── widget_make_global_local.c │ └── x_basename.c ├── mctest.h └── src │ ├── Makefile.am │ ├── editor │ ├── Makefile.am │ ├── edit_complete_word_cmd.c │ ├── edit_replace_cmd.c │ ├── mc.charsets │ └── test-data.txt.in │ ├── execute__common.c │ ├── execute__execute_external_editor_or_viewer.c │ ├── execute__execute_get_external_cmd_opts_from_config.c │ ├── execute__execute_with_vfs_arg.c │ ├── filemanager │ ├── Makefile.am │ ├── cd_to.c │ ├── examine_cd.c │ ├── exec_get_export_variables_ext.c │ ├── filegui_is_wildcarded.c │ ├── get_random_hint.c │ └── hints │ │ └── mc.hint │ ├── vfs │ ├── Makefile.am │ ├── extfs │ │ ├── Makefile.am │ │ └── helpers-list │ │ │ ├── Makefile.am │ │ │ ├── README │ │ │ ├── README.css.inc │ │ │ ├── data │ │ │ ├── config.sh.in │ │ │ ├── dummy │ │ │ ├── hp48+.README │ │ │ ├── hp48+.args │ │ │ ├── hp48+.input │ │ │ ├── hp48+.output │ │ │ ├── iso9660.xorriso.README │ │ │ ├── iso9660.xorriso.env_vars │ │ │ ├── iso9660.xorriso.input │ │ │ ├── iso9660.xorriso.output │ │ │ ├── lslR.1.spaces.args │ │ │ ├── lslR.1.spaces.input │ │ │ ├── lslR.1.spaces.output │ │ │ ├── lslR.2.spaces-iso.args │ │ │ ├── lslR.2.spaces-iso.input │ │ │ ├── lslR.2.spaces-iso.output │ │ │ ├── lslR.3.spaces-iso-noslash.args │ │ │ ├── lslR.3.spaces-iso-noslash.input │ │ │ ├── lslR.3.spaces-iso-noslash.output │ │ │ ├── lslR.README │ │ │ ├── rpm.README │ │ │ ├── rpm.custom.env_vars │ │ │ ├── rpm.custom.input │ │ │ ├── rpm.custom.output │ │ │ ├── rpm.glib.env_vars │ │ │ ├── rpm.glib.input │ │ │ ├── rpm.glib.output │ │ │ ├── rpm.rewrite.sh │ │ │ ├── torrent.input │ │ │ ├── torrent.output │ │ │ ├── u7z.README │ │ │ ├── u7z.complex.env_vars │ │ │ ├── u7z.complex.input │ │ │ ├── u7z.complex.output │ │ │ ├── u7z.missing-date.env_vars │ │ │ ├── u7z.missing-date.input │ │ │ ├── u7z.missing-date.output │ │ │ ├── u7z.missing-size-and-date.env_vars │ │ │ ├── u7z.missing-size-and-date.input │ │ │ ├── u7z.missing-size-and-date.output │ │ │ ├── u7z.simple.input │ │ │ ├── u7z.simple.output │ │ │ ├── uace.README │ │ │ ├── uace.input │ │ │ ├── uace.output │ │ │ ├── uarc.README │ │ │ ├── uarc.input │ │ │ ├── uarc.output │ │ │ ├── urar.README │ │ │ ├── urar.v4,v3.env_vars │ │ │ ├── urar.v4,v3.input │ │ │ ├── urar.v4,v3.output │ │ │ ├── urar.v6,v5.env_vars │ │ │ ├── urar.v6,v5.input │ │ │ ├── urar.v6,v5.output │ │ │ ├── usqfs.args │ │ │ ├── usqfs.input │ │ │ ├── usqfs.output │ │ │ ├── uzip.README │ │ │ ├── uzip.with-zipinfo.env_vars │ │ │ ├── uzip.with-zipinfo.input │ │ │ ├── uzip.with-zipinfo.output │ │ │ ├── uzip.without-zipinfo--mdy.env_vars │ │ │ ├── uzip.without-zipinfo--mdy.input │ │ │ ├── uzip.without-zipinfo--mdy.output │ │ │ ├── uzip.without-zipinfo--ymd.env_vars │ │ │ ├── uzip.without-zipinfo--ymd.input │ │ │ ├── uzip.without-zipinfo--ymd.output │ │ │ ├── uzoo.README │ │ │ ├── uzoo.input │ │ │ └── uzoo.output │ │ │ ├── mc_parse_ls_l.c │ │ │ ├── mc_xcat │ │ │ ├── misc │ │ │ ├── Makefile.am │ │ │ └── rpm │ │ │ │ ├── rpm2tags.pl │ │ │ │ └── test.spec │ │ │ └── test_all │ └── ftpfs │ │ ├── Makefile.am │ │ ├── data │ │ ├── aix_list.input │ │ ├── aix_list.output │ │ ├── ms_list.input │ │ └── ms_list.output │ │ └── ftpfs_parse_long_list.c │ └── viewer │ └── viewertest.txt └── version.sh /.clang-format: -------------------------------------------------------------------------------- 1 | --- 2 | BasedOnStyle: GNU 3 | AlignConsecutiveMacros: 4 | Enabled: true 5 | AcrossEmptyLines: true 6 | PadOperators: true 7 | AlignOperands: DontAlign 8 | AttributeMacros: 9 | - G_GNUC_PRINTF 10 | BraceWrapping: 11 | AfterCaseLabel: true 12 | AfterClass: true 13 | AfterControlStatement: Always 14 | AfterEnum: true 15 | AfterExternBlock: true 16 | AfterFunction: true 17 | AfterNamespace: true 18 | AfterObjCDeclaration: true 19 | AfterStruct: true 20 | AfterUnion: true 21 | BeforeCatch: true 22 | BeforeElse: true 23 | BeforeLambdaBody: false 24 | BeforeWhile: true 25 | IndentBraces: false 26 | SplitEmptyFunction: true 27 | SplitEmptyRecord: true 28 | SplitEmptyNamespace: true 29 | BreakBeforeBinaryOperators: NonAssignment 30 | BreakBeforeBraces: Custom 31 | ColumnLimit: 100 32 | IndentPPDirectives: AfterHash 33 | IndentWidth: 4 34 | SortIncludes: Never 35 | SpaceAfterCStyleCast: true 36 | SpacesBeforeTrailingComments: 2 37 | -------------------------------------------------------------------------------- /.gitattributes: -------------------------------------------------------------------------------- 1 | po/*.po -diff 2 | -------------------------------------------------------------------------------- /.github/PULL_REQUEST_TEMPLATE.md: -------------------------------------------------------------------------------- 1 | Thank you for thinking about contributing to Midnight Commander, but we **ARE NOT** using pull requests to manage incoming patches! 2 | 3 | Instead, please check out our Trac instance to see if the issue has already been reported, or submit a new ticket: 4 | 5 | https://midnight-commander.org/wiki/NewTicket 6 | 7 | If you chose to submit the pull request instead, keep in mind that we are not checking on them regularly, so it might take ages before we even get to it, if at all. 8 | 9 | Unfortunately, GitHub does not allow us to disable the pull requests feature for this repository, so we have to warn you this way... 10 | -------------------------------------------------------------------------------- /.github/workflows/ci-alpine.yml: -------------------------------------------------------------------------------- 1 | name: ci-alpine 2 | 3 | on: 4 | workflow_call: 5 | 6 | jobs: 7 | build-alpine: 8 | runs-on: ubuntu-latest 9 | container: 10 | image: alpine:latest 11 | timeout-minutes: 5 12 | 13 | steps: 14 | - uses: actions/checkout@v4 15 | 16 | - name: Install dependencies 17 | run: | 18 | apk add autoconf automake build-base libtool pkgconf sudo 19 | apk add aspell-dev check-dev e2fsprogs-dev gettext-dev glib-dev gpm-dev libssh2-dev perl slang-dev 20 | 21 | - name: Bootstrap build system 22 | run: ./autogen.sh 23 | 24 | - name: Build default configuration 25 | run: | 26 | adduser --home "$(pwd)" --no-create-home --disabled-password test 27 | chown -R test "$(pwd)" 28 | 29 | su - test -c ' \ 30 | ./configure \ 31 | --prefix="$(pwd)/install-prefix" \ 32 | --enable-mclib \ 33 | --enable-aspell \ 34 | --enable-werror \ 35 | && \ 36 | \ 37 | make -j$(nproc) && \ 38 | make check && \ 39 | make install \ 40 | ' 41 | 42 | - uses: actions/upload-artifact@v4 43 | if: failure() 44 | with: 45 | name: test-suite-logs-alpine 46 | path: ./**/test-suite.log 47 | -------------------------------------------------------------------------------- /.github/workflows/ci-freebsd.yml: -------------------------------------------------------------------------------- 1 | name: ci-freebsd 2 | 3 | on: 4 | workflow_call: 5 | inputs: 6 | CFLAGS: 7 | description: 'Custom CFLAGS' 8 | default: '' 9 | required: false 10 | type: string 11 | 12 | jobs: 13 | build-freebsd: 14 | runs-on: ubuntu-latest 15 | timeout-minutes: 15 16 | 17 | steps: 18 | - uses: actions/checkout@v4 19 | 20 | - name: Build on FreeBSD 21 | uses: vmactions/freebsd-vm@v1 22 | with: 23 | prepare: | 24 | pkg install -y autoconf automake gettext libtool pkgconf 25 | pkg install -y aspell check glib libssh2 libX11 python3 26 | 27 | run: | 28 | ./autogen.sh 29 | 30 | pw useradd test -d "$(pwd)" 31 | chown -R test $(pwd) 32 | 33 | su - test -c ' \ 34 | \ 35 | export CFLAGS="${{ inputs.CFLAGS }}" && \ 36 | \ 37 | ./configure \ 38 | --prefix="$(pwd)/install-prefix" \ 39 | --with-screen=ncurses \ 40 | --enable-mclib \ 41 | --enable-aspell \ 42 | --enable-werror \ 43 | && \ 44 | \ 45 | make && \ 46 | make check && \ 47 | make install \ 48 | ' 49 | 50 | - uses: actions/upload-artifact@v4 51 | if: failure() 52 | with: 53 | name: test-suite-logs-freebsd 54 | path: ./**/test-suite.log 55 | -------------------------------------------------------------------------------- /.github/workflows/ci-macos.yml: -------------------------------------------------------------------------------- 1 | name: ci-macos 2 | 3 | on: 4 | workflow_call: 5 | inputs: 6 | CFLAGS: 7 | description: 'Custom CFLAGS' 8 | default: '' 9 | required: false 10 | type: string 11 | 12 | jobs: 13 | build-macos: 14 | runs-on: macos-latest 15 | timeout-minutes: 5 16 | 17 | steps: 18 | - uses: actions/checkout@v4 19 | 20 | - name: Install dependencies 21 | run: | 22 | brew install autoconf automake gettext check libtool pkg-config 23 | brew install aspell e2fsprogs glib libssh2 openssl s-lang 24 | 25 | # unzip is part of the base system 26 | 27 | - name: Bootstrap build system 28 | run: ./autogen.sh 29 | 30 | - name: Build default configuration 31 | run: | 32 | export CFLAGS="${{ inputs.CFLAGS }}" 33 | 34 | ./configure \ 35 | --prefix="$(pwd)/install-prefix" \ 36 | --enable-mclib \ 37 | --enable-aspell=/opt/homebrew 38 | 39 | make -j$(sysctl -n hw.logicalcpu) 40 | make check 41 | make install 42 | 43 | - uses: actions/upload-artifact@v4 44 | if: failure() 45 | with: 46 | name: test-suite-logs-macos 47 | path: ./**/test-suite.log 48 | -------------------------------------------------------------------------------- /.github/workflows/ci-solaris.yml: -------------------------------------------------------------------------------- 1 | name: ci-solaris 2 | 3 | on: 4 | workflow_call: 5 | 6 | jobs: 7 | build-solaris: 8 | runs-on: ubuntu-latest 9 | timeout-minutes: 15 10 | 11 | steps: 12 | - uses: actions/checkout@v4 13 | 14 | - name: Build on Solaris 15 | uses: vmactions/solaris-vm@v1 16 | with: 17 | release: "11.4-gcc" # autoconf automake developer/gcc/gcc-c libtool pkg-config 18 | prepare: | 19 | pkg install --no-backup-be --no-refresh --accept -v \ 20 | aspell check glib2 libssh2 libx11 21 | 22 | run: | 23 | ./autogen.sh 24 | 25 | useradd -d "$(pwd)" test 26 | chown -R test $(pwd) 27 | 28 | su - test -c ' \ 29 | export PKG_CONFIG_PATH=/usr/lib/64/pkgconfig && \ 30 | \ 31 | ./configure \ 32 | --prefix="$(pwd)/install-prefix" \ 33 | --with-screen=ncurses \ 34 | --enable-mclib \ 35 | --enable-aspell \ 36 | --enable-werror \ 37 | && \ 38 | \ 39 | make && \ 40 | make check && \ 41 | make install \ 42 | ' 43 | 44 | - uses: actions/upload-artifact@v4 45 | if: failure() 46 | with: 47 | name: test-suite-logs-solaris 48 | path: ./**/test-suite.log 49 | -------------------------------------------------------------------------------- /.github/workflows/ci.yml: -------------------------------------------------------------------------------- 1 | name: CI 2 | on: [ push, pull_request ] 3 | 4 | jobs: 5 | call-build-ubuntu: 6 | if: github.event_name == 'push' || github.event.pull_request.head.repo.full_name != github.repository 7 | uses: ./.github/workflows/ci-ubuntu.yml 8 | 9 | call-build-fedora: 10 | if: github.event_name == 'push' || github.event.pull_request.head.repo.full_name != github.repository 11 | uses: ./.github/workflows/ci-fedora.yml 12 | 13 | call-build-alpine: 14 | if: github.event_name == 'push' || github.event.pull_request.head.repo.full_name != github.repository 15 | uses: ./.github/workflows/ci-alpine.yml 16 | 17 | call-build-macos: 18 | if: github.event_name == 'push' || github.event.pull_request.head.repo.full_name != github.repository 19 | uses: ./.github/workflows/ci-macos.yml 20 | 21 | call-build-solaris: 22 | if: github.event_name == 'push' || github.event.pull_request.head.repo.full_name != github.repository 23 | uses: ./.github/workflows/ci-solaris.yml 24 | 25 | call-build-freebsd: 26 | if: github.event_name == 'push' || github.event.pull_request.head.repo.full_name != github.repository 27 | uses: ./.github/workflows/ci-freebsd.yml 28 | with: 29 | # https://github.com/GNUAspell/aspell/pull/651 30 | CFLAGS: -Wno-strict-prototypes 31 | -------------------------------------------------------------------------------- /.github/workflows/transifex.yml: -------------------------------------------------------------------------------- 1 | name: transifex 2 | 3 | on: 4 | push: 5 | branches: 6 | - master 7 | 8 | jobs: 9 | transifex-upload: 10 | 11 | runs-on: ubuntu-latest 12 | timeout-minutes: 15 13 | 14 | steps: 15 | - uses: actions/checkout@v3 16 | 17 | - name: Install gettext & po4a 18 | run: sudo apt-get install -y gettext po4a 19 | 20 | - name: Install modern Transifex client 21 | run: | 22 | mkdir -p $HOME/.local/bin && cd $HOME/.local/bin 23 | curl -o- https://raw.githubusercontent.com/transifex/cli/master/install.sh | bash 24 | echo "${HOME}/.local/bin" >> $GITHUB_PATH 25 | 26 | - run: ./maint/sync-transifex/po-to-transifex.py 27 | env: 28 | TX_TOKEN: ${{ secrets.TX_TOKEN }} 29 | 30 | - run: ./maint/sync-transifex/hints-to-transifex.py 31 | env: 32 | TX_TOKEN: ${{ secrets.TX_TOKEN }} 33 | -------------------------------------------------------------------------------- /.github/workflows/update-sources.yml: -------------------------------------------------------------------------------- 1 | name: update-sources 2 | 3 | on: 4 | push: 5 | branches: 6 | - master 7 | 8 | jobs: 9 | update-sources: 10 | runs-on: ubuntu-latest 11 | steps: 12 | - uses: actions/checkout@v4 13 | 14 | - name: Install GNU Global 15 | run: sudo apt-get install -y global exuberant-ctags python3-pygments 16 | 17 | - name: Checkout source repo 18 | uses: actions/checkout@v4 19 | with: 20 | repository: MidnightCommander/source 21 | path: HTML 22 | ref: gh-pages 23 | ssh-key: ${{ secrets.SOURCE_DEPLOY_KEY }} 24 | 25 | - name: Create sources index 26 | run: | 27 | pushd HTML 28 | git rm -rf * 29 | popd 30 | 31 | gtags 32 | htags --suggest -t "Welcome to the Midnight Commander source tour!" 33 | ./maint/htagsfix 34 | 35 | - name: Deploy to GitHub 36 | run: | 37 | cd HTML 38 | 39 | touch .nojekyll 40 | echo "source.midnight-commander.org" > CNAME 41 | 42 | git config user.name "GitHub Actions" 43 | git config user.email "github@midnight-commander.org" 44 | 45 | git add . 46 | git commit -m "Deploy to GitHub Pages" 47 | 48 | git push --force-with-lease 49 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | *.o 2 | *.a 3 | *.lo 4 | *.la 5 | *~ 6 | *.cache 7 | *.tar.gz 8 | ABOUT-NLS 9 | Make.common 10 | Makefile 11 | Makefile.in 12 | aclocal.m4 13 | config 14 | config.guess 15 | config.h 16 | config.h.in 17 | config.log 18 | config.status 19 | config.sub 20 | configure 21 | configure.mc 22 | gettext.m4 23 | install-sh 24 | m4 25 | mc.qpg 26 | mc.spec 27 | missing 28 | mkinstalldirs 29 | pkginfo 30 | prototype 31 | stamp-h 32 | stamp-h? 33 | stamp-h.in 34 | tmpout 35 | debug 36 | Doxyfile 37 | mc.kdevelop 38 | version.h 39 | TAGS 40 | doc/devel/ 41 | doc/html/ 42 | .deps 43 | libtool 44 | make.log 45 | make.clang 46 | make.gcc 47 | make.tcc 48 | tests/src/editor/test-data.txt 49 | tests/src/vfs/extfs/helpers-list/data/config.sh 50 | mc-version.h 51 | -------------------------------------------------------------------------------- /COPYING: -------------------------------------------------------------------------------- 1 | doc/COPYING -------------------------------------------------------------------------------- /ChangeLog: -------------------------------------------------------------------------------- 1 | For the major changes since the last release please see doc/NEWS. For 2 | the detailed commit log please refer to the output of 'git log' against 3 | a checked out copy of the repository. 4 | -------------------------------------------------------------------------------- /INSTALL: -------------------------------------------------------------------------------- 1 | doc/INSTALL -------------------------------------------------------------------------------- /NEWS: -------------------------------------------------------------------------------- 1 | doc/NEWS -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Midnight Commander's Legacy Repository 2 | 3 | ⚠️ This repository has been archived! ⚠️ 4 | 5 | It reflects the state just before we switched from Trac to GitHub for issue tracking on Feb 28, 2025. 6 | 7 | Please use the new repository at [MidnightCommander/mc](https://github.com/MidnightCommander/mc) instead! 8 | 9 | -- Maintainers 10 | -------------------------------------------------------------------------------- /acinclude.m4: -------------------------------------------------------------------------------- 1 | m4_include([m4.include/gnulib/mc-gnulib-common.m4]) 2 | m4_include([m4.include/gnulib/mode_t.m4]) 3 | m4_include([m4.include/gnulib/stat-size.m4]) 4 | m4_include([m4.include/gnulib/fstypename.m4]) 5 | m4_include([m4.include/gnulib/fsusage.m4]) 6 | m4_include([m4.include/gnulib/mountlist.m4]) 7 | m4_include([m4.include/gnulib/windows-stat-inodes.m4]) 8 | m4_include([m4.include/gnulib/sys_types_h.m4]) 9 | m4_include([m4.include/dx_doxygen.m4]) 10 | m4_include([m4.include/ax_require_defined.m4]) 11 | m4_include([m4.include/ax_check_compile_flag.m4]) 12 | m4_include([m4.include/ax_append_flag.m4]) 13 | m4_include([m4.include/ax_append_compile_flags.m4]) 14 | m4_include([m4.include/mc-cflags.m4]) 15 | m4_include([m4.include/mc-stdckdint.m4]) 16 | m4_include([m4.include/ax_gcc_func_attribute.m4]) 17 | m4_include([m4.include/mc-get-fs-info.m4]) 18 | m4_include([m4.include/mc-with-x.m4]) 19 | m4_include([m4.include/mc-use-termcap.m4]) 20 | m4_include([m4.include/mc-with-screen.m4]) 21 | m4_include([m4.include/mc-with-internal-edit.m4]) 22 | m4_include([m4.include/mc-subshell.m4]) 23 | m4_include([m4.include/mc-background.m4]) 24 | m4_include([m4.include/mc-ext2fs-attr.m4]) 25 | m4_include([m4.include/mc-glib.m4]) 26 | m4_include([m4.include/mc-vfs.m4]) 27 | m4_include([m4.include/mc-version.m4]) 28 | m4_include([m4.include/mc-tests.m4]) 29 | m4_include([m4.include/mc-i18n.m4]) 30 | m4_include([m4.include/mc-assert.m4]) 31 | -------------------------------------------------------------------------------- /autogen.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | set -e 4 | 5 | # Use backticks to support ksh on Solaris 6 | basedir=`dirname "$0"` 7 | srcdir=`cd "$basedir" && pwd` 8 | 9 | cd "$srcdir" 10 | 11 | ${AUTORECONF:-autoreconf} --verbose --install --force -I m4 ${AUTORECONF_FLAGS} 12 | 13 | # Customize the INSTALL file 14 | rm -f INSTALL && ln -s doc/INSTALL . 15 | 16 | # Generate po/POTFILES.in 17 | if ! xgettext -h 2>&1 | grep -- '--keyword' >/dev/null ; then 18 | echo "gettext is unable to extract translations, set XGETTEXT to GNU gettext!" >&2 19 | touch po/POTFILES.in 20 | else 21 | ${XGETTEXT:-xgettext} --keyword=_ --keyword=N_ --keyword=Q_ --output=- \ 22 | `find . -name '*.[ch]'` | ${SED-sed} -ne '/^#:/{s/#://;s/:[0-9]*/\ 23 | /g;s/ //g;p;}' | \ 24 | grep -v '^$' | sort | uniq >po/POTFILES.in 25 | fi 26 | 27 | "$srcdir/version.sh" "$srcdir" 28 | 29 | if test -x "$srcdir/configure.mc"; then 30 | "$srcdir/configure.mc" "$@" 31 | fi 32 | -------------------------------------------------------------------------------- /contrib/.gitignore: -------------------------------------------------------------------------------- 1 | mc-wrapper.csh 2 | mc-wrapper.sh 3 | mc.csh 4 | mc.sh 5 | -------------------------------------------------------------------------------- /contrib/Makefile.am: -------------------------------------------------------------------------------- 1 | 2 | noinst_DATA = README.xterm 3 | 4 | SCRIPTS_IN = mc.csh.in mc.sh.in mc-wrapper.csh.in mc-wrapper.sh.in 5 | SCRIPTS_OUT = mc.csh mc.sh mc-wrapper.csh mc-wrapper.sh 6 | 7 | pkglibexec_SCRIPTS = $(SCRIPTS_OUT) 8 | pkglibexecdir = $(libexecdir)/@PACKAGE@ 9 | 10 | cfgdir = $(sysconfdir)/@PACKAGE@ 11 | cfg_DATA = \ 12 | $(LIBFILES_ADD) 13 | 14 | CLEANFILES = $(SCRIPTS_OUT) 15 | 16 | # Files processed by configure don't need to be here 17 | EXTRA_DIST = \ 18 | $(SCRIPTS_IN) \ 19 | $(noinst_DATA) 20 | 21 | mc.csh: $(top_builddir)/config.status $(srcdir)/mc.csh.in 22 | $(SED) "s%@""pkglibexecdir@%$(pkglibexecdir)%" $(srcdir)/mc.csh.in > mc.csh 23 | 24 | mc.sh: $(top_builddir)/config.status $(srcdir)/mc.sh.in 25 | $(SED) "s%@""pkglibexecdir@%$(pkglibexecdir)%" $(srcdir)/mc.sh.in > mc.sh 26 | 27 | mc-wrapper.csh: $(top_builddir)/config.status $(srcdir)/mc-wrapper.csh.in 28 | $(SED) "s%@""bindir@%$(bindir)%" $(srcdir)/mc-wrapper.csh.in > mc-wrapper.csh 29 | 30 | mc-wrapper.sh: $(top_builddir)/config.status $(srcdir)/mc-wrapper.sh.in 31 | $(SED) "s%@""bindir@%$(bindir)%" $(srcdir)/mc-wrapper.sh.in > mc-wrapper.sh 32 | 33 | -------------------------------------------------------------------------------- /contrib/mc-wrapper.csh.in: -------------------------------------------------------------------------------- 1 | if ($?MC_TMPDIR) then 2 | setenv MC_PWD_FILE "`mktemp '$MC_TMPDIR/mc.pwd.XXXXXX'`" 3 | else if ($?TMPDIR) then 4 | setenv MC_PWD_FILE "`mktemp '$TMPDIR/mc.pwd.XXXXXX'`" 5 | else 6 | setenv MC_PWD_FILE "`mktemp '/tmp/mc.pwd.XXXXXX'`" 7 | endif 8 | 9 | @bindir@/mc -P "$MC_PWD_FILE" $* 10 | 11 | if (-r "$MC_PWD_FILE") then 12 | setenv MC_PWD "`cat '$MC_PWD_FILE'`" 13 | if ("$MC_PWD" != "$cwd" && -d "$MC_PWD") then 14 | cd "$MC_PWD" || true 15 | endif 16 | unsetenv MC_PWD 17 | endif 18 | 19 | rm -f "$MC_PWD_FILE" 20 | unsetenv MC_PWD_FILE 21 | -------------------------------------------------------------------------------- /contrib/mc-wrapper.sh.in: -------------------------------------------------------------------------------- 1 | if test -n "$MC_TMPDIR"; then 2 | MC_PWD_FILE="`mktemp "${MC_TMPDIR}/mc.pwd.XXXXXX"`" 3 | elif test -n "$TMPDIR"; then 4 | MC_PWD_FILE="`mktemp "${TMPDIR}/mc.pwd.XXXXXX"`" 5 | else 6 | MC_PWD_FILE="`mktemp "/tmp/mc.pwd.XXXXXX"`" 7 | fi 8 | 9 | @bindir@/mc -P "$MC_PWD_FILE" "$@" 10 | 11 | if test -r "$MC_PWD_FILE"; then 12 | MC_PWD="`cat "$MC_PWD_FILE"`" 13 | if test -n "$MC_PWD" && test "$MC_PWD" != "$PWD" && test -d "$MC_PWD"; then 14 | cd "$MC_PWD" || true 15 | fi 16 | unset MC_PWD 17 | fi 18 | 19 | rm -f "$MC_PWD_FILE" 20 | unset MC_PWD_FILE 21 | -------------------------------------------------------------------------------- /contrib/mc.csh.in: -------------------------------------------------------------------------------- 1 | alias mc 'source @pkglibexecdir@/mc-wrapper.csh' 2 | -------------------------------------------------------------------------------- /contrib/mc.sh.in: -------------------------------------------------------------------------------- 1 | # Don't define aliases in plain Bourne shell 2 | [ -n "${BASH_VERSION}${KSH_VERSION}${ZSH_VERSION}" ] || return 0 3 | alias mc='. @pkglibexecdir@/mc-wrapper.sh' 4 | -------------------------------------------------------------------------------- /doc/.gitignore: -------------------------------------------------------------------------------- 1 | *.1 2 | *.8 3 | mc.hlp.?? 4 | Makefile.in 5 | mc.hlp 6 | -------------------------------------------------------------------------------- /doc/Makefile.am: -------------------------------------------------------------------------------- 1 | DIST_SUBDIRS = hints man hlp 2 | SUBDIRS = hints man hlp 3 | 4 | DOCS = FAQ HACKING INSTALL 5 | EXTRA_DIST = $(DX_CONFIG) doxygen-include.am $(DOCS) 6 | 7 | include doxygen-include.am 8 | -------------------------------------------------------------------------------- /doc/filehighlight.txt: -------------------------------------------------------------------------------- 1 | Main section [filehighlight] contain key names as highlight groups and values as color pairs 2 | color pair described as 'foreground;background'. 'background' may be omited. 3 | 4 | other sections describe filegroup of highlight. 5 | Keys in these groups: 6 | 7 | type 8 | - file type. if present, all other option ignored; 9 | regexp 10 | - regular expression. If present, 'extensions' option ignored; 11 | extensions 12 | - list of extensions of files. Separated by ';' sign. 13 | 14 | 'type' key may have values: 15 | 16 | - FILE - all files. 17 | - FILE_EXE 18 | - DIR - all directoryes 19 | - LINK_DIR 20 | - LINK (all links except stale link) 21 | - HARDLINK 22 | - SYMLINK 23 | - STALE_LINK 24 | - DEVICE (all device files) 25 | - DEVICE_BLOCK 26 | - DEVICE_CHAR 27 | - SPECIAL (all special files) 28 | - SPECIAL_SOCKET 29 | - SPECIAL_FIFO 30 | - SPECIAL_DOOR 31 | -------------------------------------------------------------------------------- /doc/hints/Makefile.am: -------------------------------------------------------------------------------- 1 | if USE_NLS 2 | SUBDIRS = l10n 3 | endif 4 | 5 | DIST_SUBDIRS = l10n 6 | 7 | HINTFILE = mc.hint 8 | 9 | hintdir = $(pkgdatadir)/hints 10 | 11 | hint_DATA = $(HINTFILE) 12 | 13 | # Files processed by configure don't need to be here 14 | EXTRA_DIST = $(HINTFILE) 15 | -------------------------------------------------------------------------------- /doc/hints/l10n/Makefile.am: -------------------------------------------------------------------------------- 1 | hintdir = $(pkgdatadir)/hints 2 | 3 | HINTFILES_LANG = $(srcdir)/mc.hint.* 4 | 5 | hint_DATA = $(HINTFILES_LANG) 6 | 7 | # Files processed by configure don't need to be here 8 | EXTRA_DIST = $(HINTFILES_LANG) 9 | -------------------------------------------------------------------------------- /doc/hints/l10n/README.txt: -------------------------------------------------------------------------------- 1 | ATTENTION! Don't edit hint-files in this directory! 2 | 3 | Remember that all these files is a TARGET for files originally placed on Transifex: 4 | https://www.transifex.com/mc/mc/mc-hint--master/ 5 | -------------------------------------------------------------------------------- /doc/hlp/Makefile.am: -------------------------------------------------------------------------------- 1 | DIST_SUBDIRS = es hu it pl ru sr 2 | if USE_NLS 3 | SUBDIRS = $(DOC_LINGUAS) 4 | endif 5 | 6 | hlpdir = $(pkgdatadir)/help 7 | hlp_DATA = mc.hlp 8 | 9 | EXTRA_DIST = xnc.hlp 10 | CLEANFILES = $(hlp_DATA) 11 | 12 | mc.hlp: $(top_builddir)/doc/man/mc.1 $(srcdir)/xnc.hlp $(top_builddir)/src/man2hlp/man2hlp 13 | - $(top_builddir)/src/man2hlp/man2hlp $(top_builddir)/doc/man/mc.1 $(srcdir)/xnc.hlp mc.hlp 14 | -------------------------------------------------------------------------------- /doc/hlp/es/Makefile.am: -------------------------------------------------------------------------------- 1 | HLP_LANG=es 2 | 3 | include ../hlp-lang-include.am 4 | -------------------------------------------------------------------------------- /doc/hlp/hlp-lang-include.am: -------------------------------------------------------------------------------- 1 | MAN2HLP=$(top_builddir)/src/man2hlp/man2hlp 2 | 3 | hlpdir = $(pkgdatadir)/help 4 | hlp_DATA = mc.hlp.$(HLP_LANG) 5 | 6 | EXTRA_DIST = xnc.hlp 7 | CLEANFILES = $(hlp_DATA) 8 | 9 | mc.hlp.$(HLP_LANG): $(top_builddir)/doc/man/$(HLP_LANG)/mc.1 $(srcdir)/xnc.hlp $(MAN2HLP) 10 | - $(MAN2HLP) $(top_builddir)/doc/man/$(HLP_LANG)/mc.1 $(srcdir)/xnc.hlp mc.hlp.$(HLP_LANG) 11 | -------------------------------------------------------------------------------- /doc/hlp/hu/Makefile.am: -------------------------------------------------------------------------------- 1 | HLP_LANG=hu 2 | 3 | include ../hlp-lang-include.am 4 | -------------------------------------------------------------------------------- /doc/hlp/it/Makefile.am: -------------------------------------------------------------------------------- 1 | HLP_LANG=it 2 | 3 | include ../hlp-lang-include.am 4 | -------------------------------------------------------------------------------- /doc/hlp/pl/Makefile.am: -------------------------------------------------------------------------------- 1 | HLP_LANG=pl 2 | 3 | include ../hlp-lang-include.am 4 | -------------------------------------------------------------------------------- /doc/hlp/ru/Makefile.am: -------------------------------------------------------------------------------- 1 | HLP_LANG=ru 2 | 3 | include ../hlp-lang-include.am 4 | -------------------------------------------------------------------------------- /doc/hlp/sr/Makefile.am: -------------------------------------------------------------------------------- 1 | HLP_LANG=sr 2 | 3 | include ../hlp-lang-include.am 4 | -------------------------------------------------------------------------------- /doc/man/Makefile.am: -------------------------------------------------------------------------------- 1 | DIST_SUBDIRS = es hu it pl ru sr 2 | if USE_NLS 3 | SUBDIRS = $(DOC_LINGUAS) 4 | endif 5 | 6 | man_MANS = mc.1 mcview.1 7 | 8 | if USE_INTERNAL_EDIT 9 | man_MANS += mcedit.1 10 | endif 11 | 12 | if USE_DIFF 13 | man_MANS += mcdiff.1 14 | endif 15 | 16 | CLEANFILES = $(man_MANS) 17 | 18 | EXTRA_DIST = \ 19 | date-of-man-include.am \ 20 | mc.1.in \ 21 | mcedit.1.in \ 22 | mcview.1.in \ 23 | mcdiff.1.in 24 | 25 | DATE_LANG=en_US.UTF-8 26 | DATE_FORMAT=%B %Y 27 | 28 | include date-of-man-include.am 29 | -------------------------------------------------------------------------------- /doc/man/date-of-man-include.am: -------------------------------------------------------------------------------- 1 | SED_PARAMETERS = \ 2 | -e "s/%DATE_OF_MAN_PAGE%/$${MAN_DATE}/g" \ 3 | -e "s/%MAN_VERSION%/@MAN_VERSION@/g" \ 4 | -e "s{%sysconfdir%{@sysconfdir@{g" \ 5 | -e "s{%libexecdir%{@libexecdir@{g" \ 6 | -e "s{%pkglibexecdir%{$(libexecdir)/@PACKAGE@{g" \ 7 | -e "s{%pkgdatadir%{$(datadir)/@PACKAGE@{g" 8 | 9 | MAN_DATE_CMD = \ 10 | LC_ALL=$(DATE_LANG) @PERL_FOR_BUILD@ -CS -MPOSIX -e '\ 11 | @fi=lstat("'$${MAN_FILE}'"); \ 12 | print POSIX::strftime("$(DATE_FORMAT)", localtime($$fi[9]));' 2>/dev/null 13 | 14 | mc.1: $(srcdir)/mc.1.in 15 | MAN_FILE='$(srcdir)/mc.1.in'; MAN_DATE=$$($(MAN_DATE_CMD)); \ 16 | $(SED) $(SED_PARAMETERS) '$(srcdir)/mc.1.in' > '$@' 17 | 18 | mcview.1: $(srcdir)/mcview.1.in 19 | MAN_FILE='$(srcdir)/mcview.1.in'; MAN_DATE=$$($(MAN_DATE_CMD)); \ 20 | $(SED) $(SED_PARAMETERS) '$(srcdir)/mcview.1.in' > '$@' 21 | 22 | if USE_INTERNAL_EDIT 23 | mcedit.1: $(srcdir)/mcedit.1.in 24 | MAN_FILE='$(srcdir)/mcedit.1.in'; MAN_DATE=$$($(MAN_DATE_CMD)); \ 25 | $(SED) $(SED_PARAMETERS) '$(srcdir)/mcedit.1.in' > '$@' 26 | endif 27 | 28 | if USE_DIFF 29 | mcdiff.1: $(srcdir)/mcdiff.1.in 30 | MAN_FILE='$(srcdir)/mcdiff.1.in'; MAN_DATE=$$($(MAN_DATE_CMD)); \ 31 | $(SED) $(SED_PARAMETERS) '$(srcdir)/mcdiff.1.in' > '$@' 32 | endif 33 | -------------------------------------------------------------------------------- /doc/man/es/Makefile.am: -------------------------------------------------------------------------------- 1 | LANG=es 2 | mandir = @mandir@/$(LANG) 3 | 4 | EXTRA_DIST = mc.1.in 5 | 6 | man_MANS = mc.1 7 | 8 | CLEANFILES = $(man_MANS) 9 | 10 | DATE_LANG=es_ES.UTF-8 11 | DATE_FORMAT=%B de %Y 12 | 13 | include ../date-of-man-include.am 14 | -------------------------------------------------------------------------------- /doc/man/hu/Makefile.am: -------------------------------------------------------------------------------- 1 | LANG=hu 2 | mandir = @mandir@/$(LANG) 3 | 4 | EXTRA_DIST = mc.1.in 5 | 6 | man_MANS = mc.1 7 | 8 | CLEANFILES = $(man_MANS) 9 | 10 | DATE_LANG=hu_HU.UTF-8 11 | DATE_FORMAT=%Y. %B 12 | 13 | include ../date-of-man-include.am 14 | -------------------------------------------------------------------------------- /doc/man/it/Makefile.am: -------------------------------------------------------------------------------- 1 | LANG=it 2 | mandir = @mandir@/$(LANG) 3 | 4 | EXTRA_DIST = mc.1.in 5 | 6 | man_MANS = mc.1 7 | 8 | CLEANFILES = $(man_MANS) 9 | 10 | DATE_LANG=it_IT.UTF-8 11 | DATE_FORMAT=%B %Y 12 | 13 | include ../date-of-man-include.am 14 | -------------------------------------------------------------------------------- /doc/man/pl/Makefile.am: -------------------------------------------------------------------------------- 1 | LANG=pl 2 | mandir = @mandir@/$(LANG) 3 | 4 | EXTRA_DIST = mc.1.in 5 | 6 | man_MANS = mc.1 7 | 8 | CLEANFILES = $(man_MANS) 9 | 10 | DATE_LANG=pl_PL.UTF-8 11 | DATE_FORMAT=%B %Y 12 | 13 | include ../date-of-man-include.am 14 | -------------------------------------------------------------------------------- /doc/man/ru/Makefile.am: -------------------------------------------------------------------------------- 1 | LANG=ru 2 | mandir = @mandir@/$(LANG) 3 | 4 | EXTRA_DIST = mc.1.in 5 | 6 | man_MANS = mc.1 7 | 8 | CLEANFILES = $(man_MANS) 9 | 10 | DATE_LANG=ru_RU.UTF-8 11 | DATE_FORMAT=%B %Y 12 | 13 | include ../date-of-man-include.am 14 | -------------------------------------------------------------------------------- /doc/man/sr/Makefile.am: -------------------------------------------------------------------------------- 1 | LANG=sr 2 | mandir = @mandir@/$(LANG) 3 | 4 | EXTRA_DIST = mc.1.in 5 | 6 | man_MANS = mc.1 7 | 8 | CLEANFILES = $(man_MANS) 9 | 10 | DATE_LANG=sr_SR.UTF-8 11 | DATE_FORMAT=%B %Y. 12 | 13 | include ../date-of-man-include.am 14 | -------------------------------------------------------------------------------- /lib/event/Makefile.am: -------------------------------------------------------------------------------- 1 | 2 | noinst_LTLIBRARIES = libmcevent.la 3 | 4 | libmcevent_la_SOURCES = \ 5 | event.c \ 6 | internal.h \ 7 | manage.c \ 8 | raise.c 9 | 10 | AM_CPPFLAGS = -I$(top_srcdir) $(GLIB_CFLAGS) 11 | -------------------------------------------------------------------------------- /lib/event/internal.h: -------------------------------------------------------------------------------- 1 | #ifndef MC_EVENT_INTERNAL_H 2 | #define MC_EVENT_INTERNAL_H 3 | 4 | /*** typedefs(not structures) and defined constants ********************/ 5 | 6 | /*** enums *************************************************************/ 7 | 8 | /*** structures declarations (and typedefs of structures)***************/ 9 | 10 | typedef struct mc_event_callback_struct 11 | { 12 | gpointer init_data; 13 | mc_event_callback_func_t callback; 14 | } mc_event_callback_t; 15 | 16 | /*** global variables defined in .c file *******************************/ 17 | 18 | extern GTree *mc_event_grouplist; 19 | 20 | /*** declarations of public functions **********************************/ 21 | 22 | GTree *mc_event_get_event_group_by_name (const gchar *event_group_name, gboolean create_new, 23 | GError **mcerror); 24 | GPtrArray *mc_event_get_event_by_name (GTree *event_group, const gchar *event_name, 25 | gboolean create_new, GError **mcerror); 26 | mc_event_callback_t *mc_event_is_callback_in_array (GPtrArray *callbacks, 27 | mc_event_callback_func_t event_callback, 28 | gpointer event_init_data); 29 | 30 | /*** inline functions ****************************************************************************/ 31 | #endif 32 | -------------------------------------------------------------------------------- /lib/filehighlight.h: -------------------------------------------------------------------------------- 1 | #ifndef MC__FILEHIGHLIGHT_H 2 | #define MC__FILEHIGHLIGHT_H 3 | 4 | #include "lib/mcconfig.h" // mc_config_t 5 | #include "lib/file-entry.h" 6 | 7 | /*** typedefs(not structures) and defined constants **********************************************/ 8 | 9 | /*** enums ***************************************************************************************/ 10 | 11 | /*** structures declarations (and typedefs of structures)*****************************************/ 12 | 13 | typedef struct mc_fhl_struct 14 | { 15 | mc_config_t *config; 16 | GPtrArray *filters; 17 | } mc_fhl_t; 18 | 19 | /*** global variables defined in .c file *********************************************************/ 20 | 21 | /*** declarations of public functions ************************************************************/ 22 | 23 | mc_fhl_t *mc_fhl_new (gboolean need_auto_fill); 24 | void mc_fhl_free (mc_fhl_t **fhl); 25 | 26 | int mc_fhl_get_color (const mc_fhl_t *fhl, const file_entry_t *fe); 27 | 28 | gboolean mc_fhl_read_ini_file (mc_fhl_t *fhl, const gchar *filename); 29 | gboolean mc_fhl_parse_ini_file (mc_fhl_t *fhl); 30 | void mc_fhl_clear (mc_fhl_t *fhl); 31 | 32 | /*** inline functions ****************************************************************************/ 33 | 34 | #endif 35 | -------------------------------------------------------------------------------- /lib/filehighlight/Makefile.am: -------------------------------------------------------------------------------- 1 | noinst_LTLIBRARIES = libmcfilehighlight.la 2 | 3 | libmcfilehighlight_la_SOURCES = \ 4 | common.c \ 5 | get-color.c \ 6 | ini-file-read.c \ 7 | internal.h 8 | 9 | AM_CPPFLAGS = -I$(top_srcdir) $(GLIB_CFLAGS) 10 | -------------------------------------------------------------------------------- /lib/hook.h: -------------------------------------------------------------------------------- 1 | /** \file lib/hook.h 2 | * \brief Header: hooks 3 | */ 4 | 5 | #ifndef MC_HOOK_H 6 | #define MC_HOOK_H 7 | 8 | #include "lib/global.h" 9 | 10 | /*** typedefs(not structures) and defined constants **********************************************/ 11 | 12 | /*** enums ***************************************************************************************/ 13 | 14 | /*** structures declarations (and typedefs of structures)*****************************************/ 15 | 16 | typedef struct hook_t 17 | { 18 | void (*hook_fn) (void *); 19 | void *hook_data; 20 | struct hook_t *next; 21 | } hook_t; 22 | 23 | /*** global variables defined in .c file *********************************************************/ 24 | 25 | /*** declarations of public functions ************************************************************/ 26 | 27 | void add_hook (hook_t **hook_list, void (*hook_fn) (void *), void *data); 28 | void execute_hooks (hook_t *hook_list); 29 | void delete_hook (hook_t **hook_list, void (*hook_fn) (void *)); 30 | gboolean hook_present (hook_t *hook_list, void (*hook_fn) (void *)); 31 | 32 | /*** inline functions **************************************************/ 33 | 34 | #endif 35 | -------------------------------------------------------------------------------- /lib/lock.h: -------------------------------------------------------------------------------- 1 | 2 | /** \file 3 | * \brief Header: file locking 4 | * \author Adam Byrtek 5 | * \date 2003 6 | * Look at lock.c for more details 7 | */ 8 | 9 | #ifndef MC_LOCK_H 10 | #define MC_LOCK_H 11 | 12 | #include "lib/vfs/vfs.h" // vfs_path_t 13 | 14 | /*** typedefs(not structures) and defined constants **********************************************/ 15 | 16 | /*** enums ***************************************************************************************/ 17 | 18 | /*** structures declarations (and typedefs of structures)*****************************************/ 19 | 20 | /*** global variables defined in .c file *********************************************************/ 21 | 22 | /*** declarations of public functions ************************************************************/ 23 | 24 | int lock_file (const vfs_path_t *fname_vpath); 25 | int unlock_file (const vfs_path_t *fname_vpath); 26 | 27 | /*** inline functions ****************************************************************************/ 28 | 29 | #endif 30 | -------------------------------------------------------------------------------- /lib/logging.h: -------------------------------------------------------------------------------- 1 | /** \file logging.h 2 | * \brief Header: provides a log file to ease tracing the program 3 | */ 4 | 5 | #ifndef MC_LOGGING_H 6 | #define MC_LOGGING_H 7 | 8 | /* 9 | This file provides an easy-to-use function for writing all kinds of 10 | events into a central log file that can be used for debugging. 11 | */ 12 | 13 | /*** typedefs(not structures) and defined constants **********************************************/ 14 | 15 | #define mc_log_mark() mc_log ("%s:%d\n", __FILE__, __LINE__) 16 | 17 | /*** enums ***************************************************************************************/ 18 | 19 | /*** structures declarations (and typedefs of structures)*****************************************/ 20 | 21 | /*** global variables defined in .c file *********************************************************/ 22 | 23 | /*** declarations of public functions ************************************************************/ 24 | 25 | void mc_log (const char *fmt, ...) G_GNUC_PRINTF (1, 2); 26 | void mc_always_log (const char *fmt, ...) G_GNUC_PRINTF (1, 2); 27 | 28 | /*** inline functions ****************************************************************************/ 29 | 30 | #endif 31 | -------------------------------------------------------------------------------- /lib/mcconfig/Makefile.am: -------------------------------------------------------------------------------- 1 | 2 | noinst_LTLIBRARIES = libmcconfig.la 3 | 4 | libmcconfig_la_SOURCES = \ 5 | common.c \ 6 | get.c \ 7 | history.c \ 8 | set.c \ 9 | paths.c 10 | 11 | AM_CPPFLAGS = -I$(top_srcdir) $(GLIB_CFLAGS) 12 | -------------------------------------------------------------------------------- /lib/search/Makefile.am: -------------------------------------------------------------------------------- 1 | noinst_LTLIBRARIES = libsearch.la 2 | 3 | libsearch_la_SOURCES = \ 4 | search.c \ 5 | internal.h \ 6 | lib.c \ 7 | normal.c \ 8 | regex.c \ 9 | glob.c \ 10 | hex.c 11 | 12 | AM_CPPFLAGS = -I$(top_srcdir) $(GLIB_CFLAGS) 13 | -------------------------------------------------------------------------------- /lib/serialize.h: -------------------------------------------------------------------------------- 1 | #ifndef MC__SERIALIZE_H 2 | #define MC__SERIALIZE_H 3 | 4 | #include 5 | 6 | #include "lib/global.h" 7 | #include "lib/mcconfig.h" 8 | 9 | /*** typedefs(not structures) and defined constants **********************************************/ 10 | 11 | /*** enums ***************************************************************************************/ 12 | 13 | /*** structures declarations (and typedefs of structures)*****************************************/ 14 | 15 | /*** global variables defined in .c file *********************************************************/ 16 | 17 | /*** declarations of public functions ************************************************************/ 18 | 19 | char *mc_serialize_str (const char prefix, const char *data, GError **error); 20 | char *mc_deserialize_str (const char prefix, const char *data, GError **error); 21 | 22 | char *mc_serialize_config (mc_config_t *data, GError **error); 23 | mc_config_t *mc_deserialize_config (const char *data, GError **error); 24 | 25 | /*** inline functions ****************************************************************************/ 26 | 27 | #endif 28 | -------------------------------------------------------------------------------- /lib/shell.h: -------------------------------------------------------------------------------- 1 | /** \file shell.h 2 | * \brief Header: shell structure 3 | */ 4 | 5 | #ifndef MC_SHELL_H 6 | #define MC_SHELL_H 7 | 8 | /*** typedefs(not structures) and defined constants **********************************************/ 9 | 10 | /*** enums ***************************************************************************************/ 11 | 12 | typedef enum 13 | { 14 | SHELL_NONE, 15 | SHELL_SH, 16 | SHELL_BASH, 17 | SHELL_ASH_BUSYBOX, // BusyBox default shell (ash) 18 | SHELL_DASH, // Debian variant of ash 19 | SHELL_TCSH, 20 | SHELL_ZSH, 21 | SHELL_FISH, 22 | SHELL_KSH, // Public Domain Korn shell (pdksh) and variants 23 | SHELL_MKSH // MirBSD Korn shell (mksh) 24 | } shell_type_t; 25 | 26 | /*** structures declarations (and typedefs of structures)*****************************************/ 27 | 28 | typedef struct 29 | { 30 | shell_type_t type; 31 | const char *name; 32 | char *path; 33 | char *real_path; 34 | } mc_shell_t; 35 | 36 | /*** global variables defined in .c file *********************************************************/ 37 | 38 | /*** declarations of public functions ************************************************************/ 39 | 40 | void mc_shell_init (void); 41 | void mc_shell_deinit (void); 42 | 43 | /*** inline functions **************************************************/ 44 | 45 | #endif 46 | -------------------------------------------------------------------------------- /lib/skin/Makefile.am: -------------------------------------------------------------------------------- 1 | noinst_LTLIBRARIES = libmcskin.la 2 | 3 | libmcskin_la_SOURCES = \ 4 | colors.c \ 5 | colors-old.c \ 6 | common.c \ 7 | hc-skins.c \ 8 | ini-file.c \ 9 | lines.c \ 10 | internal.h 11 | 12 | AM_CPPFLAGS = -I$(top_srcdir) $(GLIB_CFLAGS) 13 | -------------------------------------------------------------------------------- /lib/skin/internal.h: -------------------------------------------------------------------------------- 1 | #ifndef MC__SKIN_INTERNAL_H 2 | #define MC__SKIN_INTERNAL_H 3 | 4 | #include "lib/global.h" 5 | #include "lib/skin.h" 6 | 7 | /*** typedefs(not structures) and defined constants **********************************************/ 8 | 9 | /*** enums ***************************************************************************************/ 10 | 11 | /*** structures declarations (and typedefs of structures)*****************************************/ 12 | 13 | /*** global variables defined in .c file *********************************************************/ 14 | 15 | /*** declarations of public functions ************************************************************/ 16 | 17 | gboolean mc_skin_ini_file_load (mc_skin_t *mc_skin); 18 | gboolean mc_skin_ini_file_parse (mc_skin_t *mc_skin); 19 | void mc_skin_set_hardcoded_skin (mc_skin_t *mc_skin); 20 | 21 | gboolean mc_skin_ini_file_parse_colors (mc_skin_t *mc_skin); 22 | gboolean mc_skin_color_parse_ini_file (mc_skin_t *mc_skin); 23 | 24 | void mc_skin_hardcoded_ugly_lines (mc_skin_t *mc_skin); 25 | void mc_skin_hardcoded_space_lines (mc_skin_t *mc_skin); 26 | void mc_skin_hardcoded_blackwhite_colors (mc_skin_t *mc_skin); 27 | 28 | void mc_skin_colors_old_configure (mc_skin_t *mc_skin); 29 | 30 | /*** inline functions ****************************************************************************/ 31 | 32 | #endif 33 | -------------------------------------------------------------------------------- /lib/strutil/Makefile.am: -------------------------------------------------------------------------------- 1 | noinst_LTLIBRARIES = libmcstrutil.la 2 | 3 | libmcstrutil_la_SOURCES = \ 4 | filevercmp.c \ 5 | replace.c \ 6 | strescape.c \ 7 | strutil8bit.c \ 8 | strutilascii.c \ 9 | strutil.c \ 10 | strutilutf8.c \ 11 | strverscmp.c \ 12 | tokenize.c \ 13 | xstrtol.c 14 | 15 | AM_CPPFLAGS = $(GLIB_CFLAGS) -I$(top_srcdir) 16 | -------------------------------------------------------------------------------- /lib/tty/Makefile.am: -------------------------------------------------------------------------------- 1 | 2 | noinst_LTLIBRARIES = libmctty.la 3 | 4 | if USE_SCREEN_SLANG 5 | TTY_SCREEN_SRC = \ 6 | color-slang.c color-slang.h \ 7 | tty-slang.c tty-slang.h 8 | else 9 | TTY_SCREEN_SRC = \ 10 | color-ncurses.c \ 11 | tty-ncurses.c tty-ncurses.h 12 | endif 13 | 14 | TTY_SRC = \ 15 | color-internal.c color-internal.h \ 16 | color.c color.h \ 17 | key.c key.h keyxdef.c \ 18 | mouse.c mouse.h \ 19 | tty-internal.c tty-internal.h \ 20 | tty.c tty.h \ 21 | win.c win.h 22 | 23 | if HAVE_TEXTMODE_X11_SUPPORT 24 | TTY_SRC += x11conn.c x11conn.h 25 | endif 26 | 27 | libmctty_la_SOURCES = $(TTY_SRC) $(TTY_SCREEN_SRC) 28 | 29 | AM_CPPFLAGS = -I$(top_srcdir) 30 | 31 | if HAVE_GMODULE 32 | AM_CPPFLAGS += $(GMODULE_CFLAGS) 33 | else 34 | AM_CPPFLAGS += $(GLIB_CFLAGS) 35 | endif 36 | 37 | -------------------------------------------------------------------------------- /lib/tty/win.h: -------------------------------------------------------------------------------- 1 | /** \file win.h 2 | * \brief Header: X terminal management: xterm and rxvt 3 | */ 4 | 5 | #ifndef MC__WIN_H 6 | #define MC__WIN_H 7 | 8 | #include "lib/global.h" // 9 | 10 | /*** typedefs(not structures) and defined constants **********************************************/ 11 | 12 | /*** enums ***************************************************************************************/ 13 | 14 | /*** structures declarations (and typedefs of structures)*****************************************/ 15 | 16 | /*** global variables defined in .c file *********************************************************/ 17 | 18 | /*** declarations of public functions ************************************************************/ 19 | 20 | void show_rxvt_contents (int starty, unsigned char y1, unsigned char y2); 21 | gboolean look_for_rxvt_extensions (void); 22 | 23 | /*** inline functions ****************************************************************************/ 24 | #endif 25 | -------------------------------------------------------------------------------- /lib/vfs/Makefile.am: -------------------------------------------------------------------------------- 1 | noinst_LTLIBRARIES = libmcvfs.la 2 | 3 | AM_CPPFLAGS = $(GLIB_CFLAGS) -I$(top_srcdir) 4 | 5 | libmcvfs_la_SOURCES = \ 6 | direntry.c \ 7 | gc.c gc.h \ 8 | interface.c \ 9 | parse_ls_vga.c \ 10 | path.c path.h \ 11 | vfs.c vfs.h \ 12 | utilvfs.c utilvfs.h \ 13 | xdirentry.h 14 | 15 | if ENABLE_VFS_NET 16 | libmcvfs_la_SOURCES += netutil.c netutil.h 17 | endif 18 | 19 | EXTRA_DIST = README 20 | -------------------------------------------------------------------------------- /lib/vfs/gc.h: -------------------------------------------------------------------------------- 1 | /** 2 | * \file 3 | * \brief Header: Virtual File System: garbage collection code 4 | */ 5 | 6 | #ifndef MC__VFS_GC_H 7 | #define MC__VFS_GC_H 8 | 9 | #include "vfs.h" 10 | 11 | /*** typedefs(not structures) and defined constants **********************************************/ 12 | 13 | /*** enums ***************************************************************************************/ 14 | 15 | /*** structures declarations (and typedefs of structures)*****************************************/ 16 | 17 | /*** global variables defined in .c file *********************************************************/ 18 | 19 | /*** declarations of public functions ************************************************************/ 20 | 21 | gboolean vfs_stamp (struct vfs_class *vclass, vfsid id); 22 | void vfs_rmstamp (struct vfs_class *vclass, vfsid id); 23 | void vfs_stamp_create (struct vfs_class *vclass, vfsid id); 24 | void vfs_gc_done (void); 25 | 26 | /*** inline functions ****************************************************************************/ 27 | #endif 28 | -------------------------------------------------------------------------------- /lib/vfs/netutil.h: -------------------------------------------------------------------------------- 1 | 2 | /** 3 | * \file 4 | * \brief Header: Virtual File System: Network utilities 5 | */ 6 | 7 | #ifndef MC__VFS_NETUTIL_H 8 | #define MC__VFS_NETUTIL_H 9 | 10 | #include 11 | /*** typedefs(not structures) and defined constants **********************************************/ 12 | 13 | /*** enums ***************************************************************************************/ 14 | 15 | /*** structures declarations (and typedefs of structures)*****************************************/ 16 | 17 | /*** global variables defined in .c file *********************************************************/ 18 | 19 | extern SIG_ATOMIC_VOLATILE_T got_sigpipe; 20 | 21 | /*** declarations of public functions ************************************************************/ 22 | 23 | void tcp_init (void); 24 | 25 | /*** inline functions ****************************************************************************/ 26 | #endif 27 | -------------------------------------------------------------------------------- /lib/widget/Makefile.am: -------------------------------------------------------------------------------- 1 | 2 | noinst_LTLIBRARIES = libmcwidget.la 3 | 4 | libmcwidget_la_SOURCES = \ 5 | background.c background.h \ 6 | button.c button.h \ 7 | buttonbar.c buttonbar.h \ 8 | check.c check.h \ 9 | dialog.c dialog.h \ 10 | dialog-switch.c dialog-switch.h \ 11 | frame.c frame.h \ 12 | gauge.c gauge.h \ 13 | group.c group.h \ 14 | groupbox.c groupbox.h \ 15 | hline.c hline.h \ 16 | history.c history.h \ 17 | input.c input.h \ 18 | input_complete.c \ 19 | listbox-window.c listbox-window.h \ 20 | listbox.c listbox.h \ 21 | label.c label.h \ 22 | menu.c menu.h \ 23 | mouse.c mouse.h \ 24 | quick.c quick.h \ 25 | radio.c radio.h \ 26 | rect.c rect.h \ 27 | widget-common.c widget-common.h \ 28 | wtools.c wtools.h 29 | 30 | AM_CPPFLAGS = -I$(top_srcdir) $(GLIB_CFLAGS) 31 | -------------------------------------------------------------------------------- /lib/widget/background.h: -------------------------------------------------------------------------------- 1 | 2 | /** \file background.h 3 | * \brief Header: WBackground widget 4 | */ 5 | 6 | #ifndef MC__WIDGET_BACKGROUND_H 7 | #define MC__WIDGET_BACKGROUND_H 8 | 9 | /*** typedefs(not structures) and defined constants **********************************************/ 10 | 11 | #define BACKGROUND(x) ((WBackground *) (x)) 12 | #define CONST_BACKGROUND(x) ((const WBackground *) (x)) 13 | 14 | /*** enums ***************************************************************************************/ 15 | 16 | /*** structures declarations (and typedefs of structures)*****************************************/ 17 | 18 | typedef struct 19 | { 20 | Widget widget; 21 | 22 | int color; // Color to fill area 23 | unsigned char pattern; // Symbol to fill area 24 | } WBackground; 25 | 26 | /*** global variables defined in .c file *********************************************************/ 27 | 28 | /*** declarations of public functions ************************************************************/ 29 | 30 | WBackground *background_new (int y, int x, int lines, int cols, int color, unsigned char pattern, 31 | widget_cb_fn callback); 32 | cb_ret_t background_callback (Widget *w, Widget *sender, widget_msg_t msg, int parm, void *data); 33 | 34 | /*** inline functions ****************************************************************************/ 35 | 36 | #endif 37 | -------------------------------------------------------------------------------- /lib/widget/check.h: -------------------------------------------------------------------------------- 1 | 2 | /** \file check.h 3 | * \brief Header: WCheck widget 4 | */ 5 | 6 | #ifndef MC__WIDGET_CHECK_H 7 | #define MC__WIDGET_CHECK_H 8 | 9 | /*** typedefs(not structures) and defined constants **********************************************/ 10 | 11 | #define CHECK(x) ((WCheck *) (x)) 12 | 13 | /*** enums ***************************************************************************************/ 14 | 15 | /*** structures declarations (and typedefs of structures)*****************************************/ 16 | 17 | typedef struct WCheck 18 | { 19 | Widget widget; 20 | gboolean state; // check button state 21 | hotkey_t text; // text of check button 22 | } WCheck; 23 | 24 | /*** global variables defined in .c file *********************************************************/ 25 | 26 | /*** declarations of public functions ************************************************************/ 27 | 28 | WCheck *check_new (int y, int x, gboolean state, const char *text); 29 | void check_set_text (WCheck *check, const char *text); 30 | 31 | /*** inline functions ****************************************************************************/ 32 | 33 | #endif 34 | -------------------------------------------------------------------------------- /lib/widget/dialog-switch.h: -------------------------------------------------------------------------------- 1 | 2 | #ifndef MC__DIALOG_SWITCH_H 3 | #define MC__DIALOG_SWITCH_H 4 | 5 | #include 6 | 7 | /*** typedefs(not structures) and defined constants **********************************************/ 8 | 9 | /*** enums ***************************************************************************************/ 10 | 11 | /*** structures declarations (and typedefs of structures)*****************************************/ 12 | 13 | /*** global variables defined in .c file *********************************************************/ 14 | 15 | extern GList *top_dlg; 16 | 17 | extern gboolean fast_refresh; 18 | 19 | extern WDialog *filemanager; 20 | 21 | /*** declarations of public functions ************************************************************/ 22 | 23 | void dialog_switch_add (WDialog *h); 24 | void dialog_switch_remove (WDialog *h); 25 | size_t dialog_switch_num (void); 26 | 27 | void dialog_switch_next (void); 28 | void dialog_switch_prev (void); 29 | void dialog_switch_list (void); 30 | 31 | int dialog_switch_process_pending (void); 32 | void dialog_switch_got_winch (void); 33 | void dialog_switch_shutdown (void); 34 | 35 | /* Redraw all dialogs */ 36 | void do_refresh (void); 37 | 38 | void repaint_screen (void); 39 | MC_MOCKABLE void mc_refresh (void); 40 | void dialog_change_screen_size (void); 41 | 42 | /*** inline functions ****************************************************************************/ 43 | 44 | #endif 45 | -------------------------------------------------------------------------------- /lib/widget/gauge.h: -------------------------------------------------------------------------------- 1 | 2 | /** \file gauge.h 3 | * \brief Header: WGauge widget 4 | */ 5 | 6 | #ifndef MC__WIDGET_GAUGE_H 7 | #define MC__WIDGET_GAUGE_H 8 | 9 | /*** typedefs(not structures) and defined constants **********************************************/ 10 | 11 | #define GAUGE(x) ((WGauge *) (x)) 12 | 13 | /*** enums ***************************************************************************************/ 14 | 15 | /*** structures declarations (and typedefs of structures)*****************************************/ 16 | 17 | typedef struct WGauge 18 | { 19 | Widget widget; 20 | gboolean shown; 21 | int max; 22 | int current; 23 | gboolean from_left_to_right; 24 | } WGauge; 25 | 26 | /*** global variables defined in .c file *********************************************************/ 27 | 28 | /*** declarations of public functions ************************************************************/ 29 | 30 | WGauge *gauge_new (int y, int x, int cols, gboolean shown, int max, int current); 31 | void gauge_set_value (WGauge *g, int max, int current); 32 | void gauge_show (WGauge *g, gboolean shown); 33 | 34 | /*** inline functions ****************************************************************************/ 35 | 36 | #endif 37 | -------------------------------------------------------------------------------- /lib/widget/groupbox.h: -------------------------------------------------------------------------------- 1 | 2 | /** \file groupbox.h 3 | * \brief Header: WGroupbox widget 4 | */ 5 | 6 | #ifndef MC__WIDGET_GROUPBOX_H 7 | #define MC__WIDGET_GROUPBOX_H 8 | 9 | /*** typedefs(not structures) and defined constants **********************************************/ 10 | 11 | #define GROUPBOX(x) ((WGroupbox *) (x)) 12 | 13 | /*** enums ***************************************************************************************/ 14 | 15 | /*** structures declarations (and typedefs of structures)*****************************************/ 16 | 17 | typedef struct WGroupbox 18 | { 19 | Widget widget; 20 | char *title; 21 | } WGroupbox; 22 | 23 | /*** global variables defined in .c file *********************************************************/ 24 | 25 | /*** declarations of public functions ************************************************************/ 26 | 27 | WGroupbox *groupbox_new (int y, int x, int height, int width, const char *title); 28 | void groupbox_set_title (WGroupbox *g, const char *title); 29 | 30 | /*** inline functions ****************************************************************************/ 31 | 32 | #endif 33 | -------------------------------------------------------------------------------- /lib/widget/hline.h: -------------------------------------------------------------------------------- 1 | 2 | /** \file hline.h 3 | * \brief Header: WHLine widget 4 | */ 5 | 6 | #ifndef MC__WIDGET_HLINE_H 7 | #define MC__WIDGET_HLINE_H 8 | 9 | /*** typedefs(not structures) and defined constants **********************************************/ 10 | 11 | #define HLINE(x) ((WHLine *) (x)) 12 | 13 | /*** enums ***************************************************************************************/ 14 | 15 | /*** structures declarations (and typedefs of structures)*****************************************/ 16 | 17 | typedef struct 18 | { 19 | Widget widget; 20 | char *text; 21 | gboolean auto_adjust_cols; // Compute widget.cols from parent width? 22 | gboolean transparent; // Paint in the default color fg/bg 23 | } WHLine; 24 | 25 | /*** global variables defined in .c file *********************************************************/ 26 | 27 | /*** declarations of public functions ************************************************************/ 28 | 29 | WHLine *hline_new (int y, int x, int width); 30 | void hline_set_text (WHLine *l, const char *text); 31 | void hline_set_textv (WHLine *l, const char *format, ...) G_GNUC_PRINTF (2, 3); 32 | 33 | /*** inline functions ****************************************************************************/ 34 | 35 | #endif 36 | -------------------------------------------------------------------------------- /lib/widget/label.h: -------------------------------------------------------------------------------- 1 | 2 | /** \file label.h 3 | * \brief Header: WLabel widget 4 | */ 5 | 6 | #ifndef MC__WIDGET_LABEL_H 7 | #define MC__WIDGET_LABEL_H 8 | 9 | /*** typedefs(not structures) and defined constants **********************************************/ 10 | 11 | #define LABEL(x) ((WLabel *) (x)) 12 | 13 | /*** enums ***************************************************************************************/ 14 | 15 | /*** structures declarations (and typedefs of structures)*****************************************/ 16 | 17 | typedef struct 18 | { 19 | Widget widget; 20 | gboolean auto_adjust_cols; // compute widget.cols from strlen(text)? 21 | char *text; 22 | gboolean transparent; // Paint in the default color fg/bg 23 | } WLabel; 24 | 25 | /*** global variables defined in .c file *********************************************************/ 26 | 27 | /*** declarations of public functions ************************************************************/ 28 | 29 | WLabel *label_new (int y, int x, const char *text); 30 | void label_set_text (WLabel *label, const char *text); 31 | void label_set_textv (WLabel *label, const char *format, ...) G_GNUC_PRINTF (2, 3); 32 | 33 | /*** inline functions ****************************************************************************/ 34 | 35 | #endif 36 | -------------------------------------------------------------------------------- /lib/widget/radio.h: -------------------------------------------------------------------------------- 1 | 2 | /** \file radio.h 3 | * \brief Header: WRadio widget 4 | */ 5 | 6 | #ifndef MC__WIDGET_RADIO_H 7 | #define MC__WIDGET_RADIO_H 8 | 9 | #include "lib/keybind.h" // global_keymap_t 10 | 11 | /*** typedefs(not structures) and defined constants **********************************************/ 12 | 13 | #define RADIO(x) ((WRadio *) (x)) 14 | 15 | /*** enums ***************************************************************************************/ 16 | 17 | /*** structures declarations (and typedefs of structures)*****************************************/ 18 | 19 | typedef struct WRadio 20 | { 21 | Widget widget; 22 | int pos; 23 | int sel; 24 | int count; // number of members 25 | hotkey_t *texts; // texts of labels 26 | } WRadio; 27 | 28 | /*** global variables defined in .c file *********************************************************/ 29 | 30 | extern const global_keymap_t *radio_map; 31 | 32 | /*** declarations of public functions ************************************************************/ 33 | 34 | WRadio *radio_new (int y, int x, int count, const char **text); 35 | 36 | /*** inline functions ****************************************************************************/ 37 | 38 | #endif 39 | -------------------------------------------------------------------------------- /m4.include/ax_require_defined.m4: -------------------------------------------------------------------------------- 1 | # =========================================================================== 2 | # https://www.gnu.org/software/autoconf-archive/ax_require_defined.html 3 | # =========================================================================== 4 | # 5 | # SYNOPSIS 6 | # 7 | # AX_REQUIRE_DEFINED(MACRO) 8 | # 9 | # DESCRIPTION 10 | # 11 | # AX_REQUIRE_DEFINED is a simple helper for making sure other macros have 12 | # been defined and thus are available for use. This avoids random issues 13 | # where a macro isn't expanded. Instead the configure script emits a 14 | # non-fatal: 15 | # 16 | # ./configure: line 1673: AX_CFLAGS_WARN_ALL: command not found 17 | # 18 | # It's like AC_REQUIRE except it doesn't expand the required macro. 19 | # 20 | # Here's an example: 21 | # 22 | # AX_REQUIRE_DEFINED([AX_CHECK_LINK_FLAG]) 23 | # 24 | # LICENSE 25 | # 26 | # Copyright (c) 2014 Mike Frysinger 27 | # 28 | # Copying and distribution of this file, with or without modification, are 29 | # permitted in any medium without royalty provided the copyright notice 30 | # and this notice are preserved. This file is offered as-is, without any 31 | # warranty. 32 | 33 | #serial 2 34 | 35 | AC_DEFUN([AX_REQUIRE_DEFINED], [dnl 36 | m4_ifndef([$1], [m4_fatal([macro ]$1[ is not defined; is a m4 file missing?])]) 37 | ])dnl AX_REQUIRE_DEFINED 38 | -------------------------------------------------------------------------------- /m4.include/gnulib/fstypename.m4: -------------------------------------------------------------------------------- 1 | #serial 6 2 | 3 | dnl From Jim Meyering. 4 | dnl 5 | dnl See if struct statfs has the f_fstypename member. 6 | dnl If so, define HAVE_STRUCT_STATFS_F_FSTYPENAME. 7 | dnl 8 | 9 | # Copyright (C) 1998-1999, 2001, 2004, 2006, 2009-2011 Free Software 10 | # Foundation, Inc. 11 | # This file is free software; the Free Software Foundation 12 | # gives unlimited permission to copy and/or distribute it, 13 | # with or without modifications, as long as this notice is preserved. 14 | 15 | AC_DEFUN([gl_FSTYPENAME], 16 | [ 17 | AC_CHECK_MEMBERS([struct statfs.f_fstypename],,, 18 | [ 19 | #include 20 | #include 21 | #include 22 | ]) 23 | ]) 24 | -------------------------------------------------------------------------------- /m4.include/gnulib/mode_t.m4: -------------------------------------------------------------------------------- 1 | # mode_t.m4 serial 2 2 | dnl Copyright (C) 2009-2016 Free Software Foundation, Inc. 3 | dnl This file is free software; the Free Software Foundation 4 | dnl gives unlimited permission to copy and/or distribute it, 5 | dnl with or without modifications, as long as this notice is preserved. 6 | 7 | # For using mode_t, it's sufficient to use AC_TYPE_MODE_T and 8 | # include . 9 | 10 | # Define PROMOTED_MODE_T to the type that is the result of "default argument 11 | # promotion" (ISO C 6.5.2.2.(6)) of the type mode_t. 12 | AC_DEFUN([gl_PROMOTED_TYPE_MODE_T], 13 | [ 14 | AC_REQUIRE([AC_TYPE_MODE_T]) 15 | AC_CACHE_CHECK([for promoted mode_t type], [gl_cv_promoted_mode_t], [ 16 | dnl Assume mode_t promotes to 'int' if and only if it is smaller than 'int', 17 | dnl and to itself otherwise. This assumption is not guaranteed by the ISO C 18 | dnl standard, but we don't know of any real-world counterexamples. 19 | AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include ]], 20 | [[typedef int array[2 * (sizeof (mode_t) < sizeof (int)) - 1];]])], 21 | [gl_cv_promoted_mode_t='int'], 22 | [gl_cv_promoted_mode_t='mode_t']) 23 | ]) 24 | AC_DEFINE_UNQUOTED([PROMOTED_MODE_T], [$gl_cv_promoted_mode_t], 25 | [Define to the type that is the result of default argument promotions of type mode_t.]) 26 | ]) 27 | -------------------------------------------------------------------------------- /m4.include/gnulib/stat-size.m4: -------------------------------------------------------------------------------- 1 | #serial 1 2 | 3 | # Copyright (C) 2011-2020 Free Software Foundation, Inc. 4 | # 5 | # This file is free software; the Free Software Foundation 6 | # gives unlimited permission to copy and/or distribute it, 7 | # with or without modifications, as long as this notice is preserved. 8 | 9 | AC_DEFUN([gl_STAT_SIZE], 10 | [ 11 | # Don't call AC_STRUCT_ST_BLOCKS because it causes bugs. Details at 12 | # https://lists.gnu.org/r/bug-gnulib/2011-06/msg00051.html 13 | AC_CHECK_HEADERS_ONCE([sys/param.h]) 14 | ]) 15 | -------------------------------------------------------------------------------- /m4.include/gnulib/windows-stat-inodes.m4: -------------------------------------------------------------------------------- 1 | # windows-stat-inodes.m4 serial 1 2 | dnl Copyright (C) 2017-2018 Free Software Foundation, Inc. 3 | dnl This file is free software; the Free Software Foundation 4 | dnl gives unlimited permission to copy and/or distribute it, 5 | dnl with or without modifications, as long as this notice is preserved. 6 | 7 | dnl Enable inode identification in 'struct stat' on native Windows platforms. 8 | dnl Set WINDOWS_STAT_INODES to 9 | dnl - 0 -> keep the default (dev_t = 32-bit, ino_t = 16-bit), 10 | dnl - 1 -> override types normally (dev_t = 32-bit, ino_t = 64-bit), 11 | dnl - 2 -> override types in an extended way (dev_t = 64-bit, ino_t = 128-bit). 12 | AC_DEFUN([gl_WINDOWS_STAT_INODES], 13 | [ 14 | AC_REQUIRE([AC_CANONICAL_HOST]) 15 | case "$host_os" in 16 | mingw*) WINDOWS_STAT_INODES=1 ;; 17 | *) WINDOWS_STAT_INODES=0 ;; 18 | esac 19 | ]) 20 | -------------------------------------------------------------------------------- /m4.include/mc-assert.m4: -------------------------------------------------------------------------------- 1 | dnl 2 | dnl Check whether to enable/disable assertions. 3 | dnl 4 | 5 | AC_DEFUN([mc_ASSERT], 6 | [ 7 | AC_ARG_ENABLE([assert], 8 | AS_HELP_STRING([--enable-assert], [turn on assertions @<:@yes@:>@]), 9 | [ 10 | if test "x$enableval" = xno; then 11 | enable_assert=no 12 | else 13 | enable_assert=yes 14 | fi 15 | ], 16 | [enable_assert=yes]) 17 | 18 | if test "x$enable_assert" = xno; then 19 | AC_DEFINE(G_DISABLE_ASSERT, 1, [Define to disable assertions]) 20 | fi 21 | ]) 22 | -------------------------------------------------------------------------------- /m4.include/mc-background.m4: -------------------------------------------------------------------------------- 1 | dnl 2 | dnl Support for background operations 3 | dnl 4 | 5 | AC_DEFUN([mc_BACKGROUND], 6 | [ 7 | AC_ARG_ENABLE([background], 8 | AS_HELP_STRING([--enable-background], [Support for background file operations @<:@yes@:>@]), 9 | [ 10 | if test "x$enableval" = xno; then 11 | enable_background=no 12 | else 13 | enable_background=yes 14 | fi 15 | ], 16 | [enable_background=yes]) 17 | 18 | if test "x$enable_background" = xyes; then 19 | AC_DEFINE(ENABLE_BACKGROUND, 1, [Define to enable background file operations]) 20 | fi 21 | 22 | AM_CONDITIONAL(ENABLE_BACKGROUND, [test "x$enable_background" = xyes]) 23 | ]) 24 | -------------------------------------------------------------------------------- /m4.include/mc-ext2fs-attr.m4: -------------------------------------------------------------------------------- 1 | dnl 2 | dnl Support for attributes on a Linux second extended file system 3 | dnl 4 | AC_DEFUN([mc_EXT2FS_ATTR], 5 | [ 6 | ext2fs_attr_msg="no" 7 | 8 | PKG_CHECK_MODULES(EXT2FS, [ext2fs >= 1.42.4], [found_ext2fs=yes], [:]) 9 | 10 | if test x"$found_ext2fs" = "xyes"; then 11 | PKG_CHECK_MODULES(E2P, [e2p >= 1.42.4], [found_e2p=yes], [:]) 12 | 13 | if test x"$found_e2p" = "xyes"; then 14 | AC_DEFINE(ENABLE_EXT2FS_ATTR, 1, [Define to enable support for ext2fs attributes]) 15 | MCLIBS="$MCLIBS $E2P_LIBS" 16 | CPPFLAGS="$CPPFLAGS $EXT2FS_CFLAGS $E2P_CFLAGS" 17 | ext2fs_attr_msg="yes" 18 | else 19 | AC_MSG_WARN([e2p library not found or version too old (must be >= 1.42.4)]) 20 | ext2fs_attr_msg="no" 21 | fi 22 | else 23 | AC_MSG_WARN([ext2fs library not found or version too old (must be >= 1.42.4)]) 24 | ext2fs_attr_msg="no" 25 | fi 26 | 27 | AM_CONDITIONAL(ENABLE_EXT2FS_ATTR, [test "x$ext2fs_attr_msg" = "xyes"]) 28 | ]) 29 | -------------------------------------------------------------------------------- /m4.include/mc-i18n.m4: -------------------------------------------------------------------------------- 1 | dnl @synopsis mc_I18N 2 | dnl 3 | dnl Check if environment is ready for get translations of docs from transifex 4 | dnl 5 | dnl @author Slava Zanko 6 | dnl @version 2011-02-10 7 | dnl @license GPL 8 | dnl @copyright Free Software Foundation, Inc. 9 | 10 | AC_DEFUN([mc_I18N],[ 11 | dnl User visible support for charset conversion. 12 | AC_ARG_ENABLE([charset], 13 | AS_HELP_STRING([--enable-charset], [Support for charset selection and conversion @<:@yes@:>@])) 14 | have_charset= 15 | charset_msg="no" 16 | if test "x$enable_charset" != "xno"; then 17 | AC_DEFINE(HAVE_CHARSET, 1, [Define to enable charset selection and conversion]) 18 | have_charset=yes 19 | charset_msg="yes" 20 | 21 | AC_CHECK_HEADERS([gnu/libc-version.h]) 22 | 23 | dnl Solaris has different name of Windows 1251 encoding 24 | case $host_os in 25 | solaris*) 26 | ENCODING_CP1251="ANSI-1251" 27 | ;; 28 | *) 29 | ENCODING_CP1251="CP1251" 30 | ;; 31 | esac 32 | 33 | if test "x$ac_cv_header_gnu_libc_version_h" != "xno"; then 34 | ENCODING_CP866="IBM866" 35 | ENCODING_ISO8859="ISO-8859" 36 | else 37 | ENCODING_CP866="CP866" 38 | ENCODING_ISO8859="ISO8859" 39 | fi 40 | 41 | AC_SUBST(ENCODING_CP1251) 42 | AC_SUBST(ENCODING_CP866) 43 | fi 44 | ]) 45 | -------------------------------------------------------------------------------- /m4.include/mc-stdckdint.m4: -------------------------------------------------------------------------------- 1 | dnl 2 | dnl Check that is like C23. 3 | dnl 4 | 5 | AC_DEFUN([mc_CHECK_HEADER_STDCKDINT], 6 | [ 7 | AC_CHECK_HEADERS_ONCE([stdckdint.h]) 8 | if test $ac_cv_header_stdckdint_h = yes; then 9 | GL_GENERATE_STDCKDINT_H=false 10 | else 11 | GL_GENERATE_STDCKDINT_H=true 12 | fi 13 | gl_CONDITIONAL_HEADER([stdckdint.h]) 14 | 15 | dnl We need the following in order to create when the system 16 | dnl doesn't have one that works with the given compiler. 17 | if test "$GL_GENERATE_STDCKDINT_H" = "true"; then 18 | sed -e 1h -e '1s,.*,/* DO NOT EDIT! GENERATED AUTOMATICALLY! */,' -e s,bool,gboolean, -e 1G \ 19 | $ac_abs_confdir/lib/stdckdint.in.h > $ac_abs_confdir/lib/stdckdint.h 20 | else 21 | rm -f "$ac_abs_confdir/lib/stdckdint.h" 22 | fi 23 | ]) 24 | -------------------------------------------------------------------------------- /m4.include/mc-use-termcap.m4: -------------------------------------------------------------------------------- 1 | dnl 2 | dnl Try using termcap database and link with libtermcap if possible. 3 | dnl 4 | AC_DEFUN([mc_USE_TERMCAP], [ 5 | screen_msg="$screen_msg with termcap database" 6 | AC_MSG_NOTICE([using S-Lang screen library with termcap]) 7 | AC_DEFINE(USE_TERMCAP, 1, [Define to use termcap database]) 8 | 9 | ac_save_LIBS="$LIBS" 10 | AC_SEARCH_LIBS([tgoto], [termcap xcurses curses], 11 | [MCLIBS="$MCLIBS $ac_cv_search_tgoto"], 12 | [AC_MSG_ERROR([Could not find a library providing tgoto])] 13 | ) 14 | LIBS="$ac_save_LIBS" 15 | ]) 16 | 17 | dnl 18 | dnl Check if the installed S-Lang library uses termcap 19 | dnl 20 | AC_DEFUN([mc_SLANG_TERMCAP], [ 21 | unset ac_cv_lib_termcap_tgoto 22 | 23 | AC_CACHE_CHECK([if S-Lang uses termcap], [mc_cv_slang_termcap], [ 24 | ac_save_LIBS="$LIBS" 25 | LIBS="$LIBS -lslang" 26 | AC_LINK_IFELSE([AC_LANG_PROGRAM([[ 27 | #include 28 | ]], 29 | [[SLtt_get_terminfo(); SLtt_tgetflag((char*)"");]])], 30 | [mc_cv_slang_termcap=no], [mc_cv_slang_termcap=yes]) 31 | 32 | LIBS="$ac_save_LIBS" 33 | ]) 34 | 35 | if test x"$mc_cv_slang_termcap" = xyes; then 36 | mc_USE_TERMCAP 37 | fi 38 | ]) 39 | -------------------------------------------------------------------------------- /m4.include/mc-version.m4: -------------------------------------------------------------------------------- 1 | dnl @synopsis mc_VERSION 2 | dnl 3 | dnl Get current version of Midnight Commander from git tags 4 | dnl 5 | dnl @author Slava Zanko 6 | dnl @version 2021-04-04 7 | dnl @license GPL 8 | dnl @copyright Free Software Foundation, Inc. 9 | dnl @modified Andrew Borodin 10 | 11 | AC_DEFUN([mc_VERSION],[ 12 | if test -f ${srcdir}/mc-version.h; then 13 | VERSION=$(grep '^#define MC_CURRENT_VERSION' ${srcdir}/mc-version.h | ${SED-sed} 's/.*"\(.*\)"$/\1/') 14 | else 15 | VERSION="unknown" 16 | fi 17 | 18 | dnl Version without dashes for the man page 19 | MAN_VERSION=`echo $VERSION | sed 's/^\([[^\-]]*\).*/\1/'` 20 | AC_SUBST(MAN_VERSION) 21 | ]) 22 | -------------------------------------------------------------------------------- /m4.include/mc-with-screen-slang.m4: -------------------------------------------------------------------------------- 1 | 2 | dnl 3 | dnl Use the slang library. 4 | dnl 5 | AC_DEFUN([mc_WITH_SLANG], [ 6 | with_screen=slang 7 | found_slang=no 8 | PKG_CHECK_MODULES(SLANG, [slang >= 2.0], [found_slang=yes], [:]) 9 | if test x"$found_slang" = xno; then 10 | AC_MSG_ERROR([S-Lang >= 2.0.0 library not found]) 11 | fi 12 | 13 | MCLIBS="$SLANG_LIBS $MCLIBS" 14 | CPPFLAGS="$SLANG_CFLAGS $CPPFLAGS" 15 | 16 | dnl Check if termcap is needed. 17 | if test x"$found_slang" = x"yes"; then 18 | mc_SLANG_TERMCAP 19 | fi 20 | 21 | screen_type=slang 22 | screen_msg="S-Lang" 23 | 24 | AC_DEFINE(HAVE_SLANG, 1, [Define to use S-Lang library for screen management]) 25 | ]) 26 | -------------------------------------------------------------------------------- /m4.include/mc-with-screen.m4: -------------------------------------------------------------------------------- 1 | m4_include([m4.include/mc-with-screen-ncurses.m4]) 2 | m4_include([m4.include/mc-with-screen-slang.m4]) 3 | 4 | dnl 5 | dnl Select the screen library. 6 | dnl 7 | 8 | AC_DEFUN([mc_WITH_SCREEN], [ 9 | 10 | AC_ARG_WITH([screen], 11 | AS_HELP_STRING([--with-screen=@<:@LIB@:>@], 12 | [Compile with screen library: slang or ncurses @<:@slang if found@:>@])) 13 | 14 | case x$with_screen in 15 | x | xslang) 16 | mc_WITH_SLANG 17 | ;; 18 | xncurses) 19 | mc_WITH_NCURSES 20 | ;; 21 | xncursesw) 22 | mc_WITH_NCURSESW 23 | ;; 24 | *) 25 | AC_MSG_ERROR([Value of the screen library is incorrect]) 26 | ;; 27 | esac 28 | ]) 29 | -------------------------------------------------------------------------------- /m4.include/mc-with-x.m4: -------------------------------------------------------------------------------- 1 | 2 | dnl X11 support. 3 | dnl Used to read keyboard modifiers when running under X11. 4 | AC_DEFUN([mc_WITH_X], [ 5 | 6 | AC_PATH_XTRA 7 | 8 | if test x"$no_x" = xyes; then 9 | textmode_x11_support="no" 10 | else 11 | AC_DEFINE([HAVE_TEXTMODE_X11_SUPPORT], [1], 12 | [Define to enable getting events from X Window System]) 13 | textmode_x11_support="yes" 14 | 15 | CPPFLAGS="$CPPFLAGS $X_CFLAGS" 16 | 17 | if test x"$g_module_supported" = x; then 18 | MCLIBS="$MCLIBS $X_LIBS $X_PRE_LIBS -lX11 $X_EXTRA_LIBS" 19 | fi 20 | fi 21 | 22 | AM_CONDITIONAL([HAVE_TEXTMODE_X11_SUPPORT], [test x"$textmode_x11_support" = x"yes"]) 23 | ]) 24 | -------------------------------------------------------------------------------- /m4.include/vfs/mc-vfs-cpiofs.m4: -------------------------------------------------------------------------------- 1 | dnl CPIO filesystem support 2 | AC_DEFUN([mc_VFS_CPIOFS], 3 | [ 4 | AC_ARG_ENABLE([vfs-cpio], 5 | AS_HELP_STRING([--enable-vfs-cpio], [Support for cpio filesystem @<:@yes@:>@])) 6 | if test "$enable_vfs" = "yes" -a x"$enable_vfs_cpio" != x"no"; then 7 | enable_vfs_cpio="yes" 8 | AC_DEFINE([ENABLE_VFS_CPIO], [1], [Support for cpio filesystem]) 9 | mc_VFS_ADDNAME([cpio]) 10 | fi 11 | AM_CONDITIONAL(ENABLE_VFS_CPIO, [test "$enable_vfs" = "yes" -a x"$enable_vfs_cpio" = x"yes"]) 12 | ]) 13 | -------------------------------------------------------------------------------- /m4.include/vfs/mc-vfs-extfs.m4: -------------------------------------------------------------------------------- 1 | dnl mc_EXTFS_CHECKS 2 | dnl Check for tools used in extfs scripts. 3 | 4 | dnl FIXME: make this configurable 5 | AC_DEFUN([mc_EXTFS_CHECKS], [ 6 | AC_PATH_PROG([ZIP], [zip], [/usr/bin/zip]) 7 | AC_PATH_PROG([UNZIP], [unzip], [/usr/bin/unzip]) 8 | AC_CACHE_CHECK([for zipinfo code in unzip], [mc_cv_have_zipinfo], 9 | [mc_cv_have_zipinfo=no 10 | if $UNZIP -Z /dev/null 2>&1; then 11 | mc_cv_have_zipinfo=yes 12 | fi]) 13 | if test x"$mc_cv_have_zipinfo" = xyes; then 14 | HAVE_ZIPINFO=1 15 | else 16 | HAVE_ZIPINFO=0 17 | fi 18 | AC_SUBST([HAVE_ZIPINFO]) 19 | ]) 20 | 21 | 22 | dnl Enable Extfs (classic) 23 | AC_DEFUN([mc_VFS_EXTFS], 24 | [ 25 | AC_ARG_ENABLE([vfs-extfs], 26 | AS_HELP_STRING([--enable-vfs-extfs], [Support for extfs filesystem @<:@yes@:>@])) 27 | if test "$enable_vfs" = "yes" -a x"$enable_vfs_extfs" != x"no"; then 28 | mc_EXTFS_CHECKS 29 | enable_vfs_extfs="yes" 30 | mc_VFS_ADDNAME([extfs]) 31 | AC_DEFINE([ENABLE_VFS_EXTFS], [1], [Support for extfs]) 32 | fi 33 | AM_CONDITIONAL(ENABLE_VFS_EXTFS, [test "$enable_vfs" = "yes" -a x"$enable_vfs_extfs" = x"yes"]) 34 | ]) 35 | -------------------------------------------------------------------------------- /m4.include/vfs/mc-vfs-ftp.m4: -------------------------------------------------------------------------------- 1 | dnl Enable FTP filesystem (classic) 2 | AC_DEFUN([mc_VFS_FTP], 3 | [ 4 | AC_ARG_ENABLE([vfs-ftp], 5 | AS_HELP_STRING([--enable-vfs-ftp], [Support for FTP filesystem @<:@yes@:>@])) 6 | if test "$enable_vfs" != "no" -a x"$enable_vfs_ftp" != x"no"; then 7 | enable_vfs_ftp="yes" 8 | mc_VFS_ADDNAME([ftp]) 9 | AC_DEFINE([ENABLE_VFS_FTP], [1], [Support for FTP (classic)]) 10 | fi 11 | AM_CONDITIONAL([ENABLE_VFS_FTP], [test "$enable_vfs" = "yes" -a x"$enable_vfs_ftp" = x"yes"]) 12 | ]) 13 | -------------------------------------------------------------------------------- /m4.include/vfs/mc-vfs-sfs.m4: -------------------------------------------------------------------------------- 1 | dnl SFS support 2 | AC_DEFUN([mc_VFS_SFS], 3 | [ 4 | AC_ARG_ENABLE([vfs-sfs], 5 | AS_HELP_STRING([--enable-vfs-sfs], [Support for sfs filesystem @<:@yes@:>@])) 6 | if test "$enable_vfs" = "yes" -a x"$enable_vfs_sfs" != x"no"; then 7 | enable_vfs_sfs="yes" 8 | mc_VFS_ADDNAME([sfs]) 9 | AC_DEFINE([ENABLE_VFS_SFS], [1], [Support for sfs]) 10 | fi 11 | AM_CONDITIONAL(ENABLE_VFS_SFS, [test "$enable_vfs" = "yes" -a x"$enable_vfs_sfs" = x"yes"]) 12 | ]) 13 | -------------------------------------------------------------------------------- /m4.include/vfs/mc-vfs-sftp.m4: -------------------------------------------------------------------------------- 1 | dnl Enable SFTP filesystem 2 | AC_DEFUN([mc_VFS_SFTP], 3 | [ 4 | AC_ARG_ENABLE([vfs-sftp], 5 | AS_HELP_STRING([--enable-vfs-sftp], [Support for SFTP filesystem [auto]])) 6 | if test "$enable_vfs" != "no" -a x"$enable_vfs_sftp" != x"no"; then 7 | PKG_CHECK_MODULES(LIBSSH, [libssh2 >= 1.2.8], [found_libssh=yes], [:]) 8 | if test x"$found_libssh" = "xyes"; then 9 | mc_VFS_ADDNAME([sftp]) 10 | AC_DEFINE([ENABLE_VFS_SFTP], [1], [Support for SFTP filesystem]) 11 | MCLIBS="$MCLIBS $LIBSSH_LIBS" 12 | enable_vfs_sftp="yes" 13 | else 14 | if test x"$enable_vfs_sftp" = x"yes"; then 15 | dnl user explicitly requested feature 16 | AC_MSG_ERROR([libssh2 >= 1.2.8 library not found]) 17 | fi 18 | enable_vfs_sftp="no" 19 | fi 20 | fi 21 | AM_CONDITIONAL([ENABLE_VFS_SFTP], [test "$enable_vfs" = "yes" -a x"$enable_vfs_sftp" = x"yes"]) 22 | ]) 23 | -------------------------------------------------------------------------------- /m4.include/vfs/mc-vfs-shell.m4: -------------------------------------------------------------------------------- 1 | dnl Enable SHELL protocol 2 | AC_DEFUN([mc_VFS_SHELL], 3 | [ 4 | AC_ARG_ENABLE([vfs-shell], 5 | AS_HELP_STRING([--enable-vfs-shell], [Support for SHELL filesystem @<:@yes@:>@])) 6 | if test "$enable_vfs" = "yes" -a "x$enable_vfs_shell" != xno; then 7 | enable_vfs_shell="yes" 8 | mc_VFS_ADDNAME([shell]) 9 | AC_DEFINE([ENABLE_VFS_SHELL], [1], [Support for SHELL vfs]) 10 | fi 11 | AM_CONDITIONAL(ENABLE_VFS_SHELL, [test "$enable_vfs" = "yes" -a x"$enable_vfs_shell" = x"yes"]) 12 | ]) 13 | -------------------------------------------------------------------------------- /m4.include/vfs/mc-vfs-tarfs.m4: -------------------------------------------------------------------------------- 1 | dnl TAR filesystem support 2 | AC_DEFUN([mc_VFS_TARFS], 3 | [ 4 | AC_ARG_ENABLE([vfs-tar], 5 | AS_HELP_STRING([--enable-vfs-tar], [Support for tar filesystem @<:@yes@:>@])) 6 | if test "$enable_vfs" = "yes" -a x"$enable_vfs_tar" != x"no"; then 7 | enable_vfs_tar="yes" 8 | mc_VFS_ADDNAME([tar]) 9 | AC_DEFINE([ENABLE_VFS_TAR], [1], [Support for tar filesystem]) 10 | fi 11 | AM_CONDITIONAL(ENABLE_VFS_TAR, [test "$enable_vfs" = "yes" -a x"$enable_vfs_tar" = x"yes"]) 12 | ]) 13 | -------------------------------------------------------------------------------- /m4.include/vfs/socket.m4: -------------------------------------------------------------------------------- 1 | AC_DEFUN([AC_REQUIRE_SOCKET], 2 | [ 3 | AC_SEARCH_LIBS(socket, [xnet bsd socket inet], [have_socket=yes]) 4 | if test x"$have_socket" = x"yes"; then 5 | AC_SEARCH_LIBS(gethostbyname, [bsd socket inet netinet nsl]) 6 | AC_CHECK_MEMBERS([struct linger.l_linger], , , [ 7 | #include 8 | #include 9 | ]) 10 | else 11 | AC_MSG_ERROR([Couldn't find socket functions]) 12 | fi 13 | ]) 14 | -------------------------------------------------------------------------------- /maint/find-dup-includes/exclude-list.cfg: -------------------------------------------------------------------------------- 1 | src/filemanager/mountlist.c 2 | lib/tty/key.c 3 | -------------------------------------------------------------------------------- /maint/sync-transifex/.gitignore: -------------------------------------------------------------------------------- 1 | var.d 2 | -------------------------------------------------------------------------------- /maint/sync-transifex/README.md: -------------------------------------------------------------------------------- 1 | # Translations maintenance 2 | 3 | ## Requirements 4 | 5 | * tx 6 | - Transifex client 7 | - https://developers.transifex.com/docs/cli 8 | * po4a 9 | - Tool for converting translations between PO and other formats 10 | - https://po4a.org 11 | 12 | ## Configuration 13 | 14 | First time you run `tx` command it will ask you for your API token and create `~/.transifexrc`. 15 | 16 | ## Maintenance 17 | 18 | Check the `*-from-transifex.py` (run by hand) and `*-to-transifex.py` (used in CI) scripts. 19 | 20 | Wrapper for modern Transifex client: 21 | 22 | ```shell 23 | #!/bin/sh 24 | 25 | touch ~/.transifexrc 26 | 27 | export XUID=$(id -u) 28 | export XGID=$(id -g) 29 | 30 | docker run \ 31 | --rm -i \ 32 | --user $XUID:$XGID \ 33 | --volume="/etc/group:/etc/group:ro" \ 34 | --volume="/etc/passwd:/etc/passwd:ro" \ 35 | --volume="/etc/shadow:/etc/shadow:ro" \ 36 | --volume $(pwd):/app \ 37 | --volume ~/.transifexrc:/.transifexrc \ 38 | --volume /etc/ssl/certs/ca-certificates.crt:/etc/ssl/certs/ca-certificates.crt \ 39 | transifex/txcli \ 40 | --root-config /.transifexrc \ 41 | "$@" 42 | ``` -------------------------------------------------------------------------------- /maint/sync-transifex/config.d/mc.hint/po4a.cfg: -------------------------------------------------------------------------------- 1 | [po4a_paths] var.d/$master/mc.hint.pot @translations@ 2 | 3 | [options] --master-charset UTF-8 --localized-charset UTF-8 --keep 5 --wrap-po no 4 | 5 | [type:asciidoc] @srcdir@/doc/hints/mc.hint @resources@ 6 | -------------------------------------------------------------------------------- /maint/sync-transifex/config.d/mc.hint/tx.config: -------------------------------------------------------------------------------- 1 | [main] 2 | host = https://www.transifex.com 3 | 4 | [o:mc:p:mc:r:mc-hint--master] 5 | file_filter = .po 6 | source_file = mc.hint.pot 7 | source_lang = en 8 | -------------------------------------------------------------------------------- /maint/sync-transifex/config.d/mc.pot/tx.config: -------------------------------------------------------------------------------- 1 | [main] 2 | host = https://www.transifex.com 3 | 4 | [o:mc:p:mc:r:mc-pot--master] 5 | file_filter = .po 6 | source_file = mc.pot 7 | source_lang = en 8 | 9 | -------------------------------------------------------------------------------- /maint/sync-transifex/hints-from-transifex.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | 3 | import glob 4 | import subprocess 5 | from pathlib import Path 6 | from textwrap import wrap 7 | 8 | from translation_utils import create_po4a_config, init_sync_dir 9 | 10 | RESOURCE_NAME = "mc.hint" 11 | 12 | SCRIPT_DIR = Path(__file__).parent 13 | SOURCE_DIR = SCRIPT_DIR.parent.parent 14 | 15 | 16 | def unwrap_paragraphs(): 17 | hint_files = glob.glob(str(SOURCE_DIR / "doc" / "hints" / "l10n" / "mc.hint.*")) 18 | for hint_file in map(Path, hint_files): 19 | lines = hint_file.read_text().split("\n\n") 20 | hint_file.write_text("\n\n".join("".join(wrap(line, width=1024)) for line in lines) + "\n") 21 | 22 | 23 | sync_dir = init_sync_dir(SCRIPT_DIR, RESOURCE_NAME) 24 | 25 | subprocess.run(("tx", "pull", "--all", "--force"), cwd=sync_dir, check=True) 26 | 27 | po4a_config = create_po4a_config(sync_dir, SCRIPT_DIR, SOURCE_DIR, RESOURCE_NAME) 28 | 29 | subprocess.run(("po4a", str(po4a_config)), cwd=SCRIPT_DIR, check=True) 30 | 31 | unwrap_paragraphs() 32 | -------------------------------------------------------------------------------- /maint/sync-transifex/hints-to-transifex.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | 3 | import subprocess 4 | from pathlib import Path 5 | 6 | from translation_utils import create_po4a_config, init_sync_dir 7 | 8 | RESOURCE_NAME = "mc.hint" 9 | 10 | SCRIPT_DIR = Path(__file__).parent 11 | SOURCE_DIR = SCRIPT_DIR.parent.parent 12 | 13 | sync_dir = init_sync_dir(SCRIPT_DIR, RESOURCE_NAME) 14 | 15 | po4a_config = create_po4a_config(sync_dir, SCRIPT_DIR, SOURCE_DIR, RESOURCE_NAME) 16 | 17 | subprocess.run(("po4a", str(po4a_config)), cwd=SCRIPT_DIR, check=True) 18 | 19 | subprocess.run(("tx", "push", "--source"), cwd=sync_dir, check=True) 20 | -------------------------------------------------------------------------------- /maint/sync-transifex/po-from-transifex.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | 3 | import glob 4 | import subprocess 5 | from pathlib import Path 6 | 7 | from translation_utils import get_translations, init_sync_dir 8 | 9 | RESOURCE_NAME = "mc.pot" 10 | 11 | SCRIPT_DIR = Path(__file__).parent 12 | SOURCE_DIR = SCRIPT_DIR.parent.parent 13 | PO_DIR = SOURCE_DIR / "po" 14 | 15 | 16 | def strip_message_locations(work_dir: Path): 17 | for po_file in (work_dir / filename for filename in glob.glob("*.po", root_dir=work_dir)): 18 | po_file.write_text( 19 | "".join(line for line in po_file.read_text().splitlines(keepends=True) if not line.startswith("#:")) 20 | ) 21 | 22 | 23 | def copy_translations_to_source_dir(source_dir: Path, target_dir: Path): 24 | for po_file in (source_dir / filename for filename in glob.glob("*.po", root_dir=source_dir)): 25 | (target_dir / po_file.name).write_text(po_file.read_text()) 26 | 27 | 28 | def update_linguas(po_dir: Path): 29 | translations = get_translations(po_dir) 30 | (po_dir / "LINGUAS").write_text("# List of available translations\n" + "\n".join(translations) + "\n") 31 | 32 | 33 | sync_dir = init_sync_dir(SCRIPT_DIR, RESOURCE_NAME) 34 | 35 | subprocess.run(("tx", "pull", "--all", "--force"), cwd=sync_dir, check=True) 36 | 37 | strip_message_locations(sync_dir) 38 | 39 | copy_translations_to_source_dir(sync_dir, PO_DIR) 40 | 41 | update_linguas(PO_DIR) 42 | -------------------------------------------------------------------------------- /maint/sync-transifex/po-to-transifex.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | 3 | import subprocess 4 | from pathlib import Path 5 | 6 | from translation_utils import init_sync_dir 7 | 8 | RESOURCE_NAME = "mc.pot" 9 | 10 | SCRIPT_DIR = Path(__file__).parent 11 | SOURCE_DIR = SCRIPT_DIR.parent.parent 12 | 13 | sync_dir = init_sync_dir(SCRIPT_DIR, RESOURCE_NAME) 14 | 15 | # Copy mc.pot to the working directory 16 | (sync_dir / RESOURCE_NAME).write_text((SOURCE_DIR / "po" / RESOURCE_NAME).read_text()) 17 | 18 | subprocess.run(("tx", "push", "--source"), cwd=sync_dir, check=True) 19 | -------------------------------------------------------------------------------- /maint/sync-transifex/translation_utils.py: -------------------------------------------------------------------------------- 1 | import glob 2 | from pathlib import Path 3 | 4 | 5 | def get_config_file(root_dir: Path, resource: str, name: str) -> Path: 6 | return root_dir / "config.d" / resource / name 7 | 8 | 9 | def init_sync_dir(root_dir: Path, resource: str) -> Path: 10 | tx_dir = root_dir / "var.d" / resource / ".tx" 11 | tx_dir.mkdir(parents=True, exist_ok=True) 12 | (tx_dir / "config").write_text(get_config_file(root_dir, resource, "tx.config").read_text()) 13 | return tx_dir.parent 14 | 15 | 16 | def create_po4a_config(sync_dir: Path, script_dir: Path, source_dir: Path, resource: str) -> Path: 17 | langs = get_translations(sync_dir) 18 | 19 | config = get_config_file(script_dir, resource, "po4a.cfg").read_text() 20 | 21 | config = config.replace("@translations@", " ".join(f"{lang}:var.d/$master/{lang}.po" for lang in langs)) 22 | config = config.replace("@resources@", " ".join(f"{lang}:@srcdir@/doc/hints/l10n/mc.hint.{lang}" for lang in langs)) 23 | 24 | config = config.replace("@srcdir@", str(source_dir)) 25 | 26 | config_path = sync_dir / "po4a.cfg" 27 | config_path.write_text(config) 28 | 29 | return config_path 30 | 31 | 32 | def get_translations(root_dir: Path) -> list[str]: 33 | return sorted(Path(filename).name.removesuffix(".po") for filename in glob.glob("*.po", root_dir=root_dir)) 34 | -------------------------------------------------------------------------------- /maint/templates/template.h: -------------------------------------------------------------------------------- 1 | #ifndef MC__TEMPLATE_H 2 | #define MC__TEMPLATE_H 3 | 4 | /*** typedefs(not structures) and defined constants **********************************************/ 5 | 6 | /*** enums ***************************************************************************************/ 7 | 8 | /*** structures declarations (and typedefs of structures)*****************************************/ 9 | 10 | /*** global variables defined in .c file *********************************************************/ 11 | 12 | /*** declarations of public functions ************************************************************/ 13 | 14 | /*** inline functions ****************************************************************************/ 15 | 16 | #endif 17 | -------------------------------------------------------------------------------- /maint/templates/template.m4: -------------------------------------------------------------------------------- 1 | dnl @synopsis MACRO_NAME(MACRO-PARAM1,[MACRO-PARAM2],...) 2 | dnl 3 | dnl 4 | dnl 5 | dnl This macro takes next arguments: 6 | dnl ... 7 | dnl 8 | dnl This macro calls: 9 | dnl 10 | dnl AC_SUBST(XX_SOME_SUBSTED_VAR) 11 | dnl 12 | dnl @category 13 | dnl @author Firstname Secondname 14 | dnl @version 15 | dnl @license AllPermissive 16 | dnl @copyright Free Software Foundation, Inc. 17 | 18 | -------------------------------------------------------------------------------- /maint/templates/template.shell: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # Midnight Commander - 4 | # 5 | # Copyright (C) 6 | # The Free Software Foundation, Inc. 7 | # 8 | # Written by: 9 | # Firstname Secondname , 10 | # 11 | # This file is part of the Midnight Commander. 12 | # 13 | # The Midnight Commander is free software: you can redistribute it 14 | # and/or modify it under the terms of the GNU General Public License as 15 | # published by the Free Software Foundation, either version 3 of the License, 16 | # or (at your option) any later version. 17 | # 18 | # The Midnight Commander is distributed in the hope that it will be useful, 19 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 20 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 21 | # GNU General Public License for more details. 22 | # 23 | # You should have received a copy of the GNU General Public License 24 | # along with this program. If not, see . 25 | 26 | #*** include section (source functions, for example) ******************* 27 | 28 | #*** file scope functions ********************************************** 29 | 30 | #*** main code ********************************************************* 31 | -------------------------------------------------------------------------------- /maint/update-years.sh: -------------------------------------------------------------------------------- 1 | #! /bin/sh 2 | 3 | YEAR=`date +%Y` 4 | 5 | SOURCES="`find lib src tests -name '*.c'`" 6 | SOURCES="$SOURCES src/man2hlp/man2hlp.in" 7 | SOURCES="$SOURCES tests/src/vfs/extfs/helpers-list/test_all" 8 | 9 | LINE="Copyright (C)" 10 | 11 | for i in $SOURCES; do 12 | # replace year: XXXX-YYYY -> XXXX-ZZZZ 13 | # add year: XXXX -> XXXX-ZZZZ 14 | ${SED-sed} -e " 15 | 1,20 { 16 | /$LINE/s/-[0-9]\{4\}$/-$YEAR/ 17 | }; 18 | 1,20 { 19 | /$LINE/s/ [0-9]\{4\}$/&-$YEAR/ 20 | }" $i > $i.tmp && mv -f $i.tmp $i 21 | done 22 | 23 | # special case 24 | ${SED-sed} -e "/$LINE/s/-[0-9]\{4\} the/-$YEAR the/" src/editor/editwidget.c > src/editor/editwidget.c.tmp && \ 25 | mv -f src/editor/editwidget.c.tmp src/editor/editwidget.c 26 | 27 | # restore permissions 28 | chmod 755 tests/src/vfs/extfs/helpers-list/test_all 29 | -------------------------------------------------------------------------------- /misc/.gitignore: -------------------------------------------------------------------------------- 1 | mc.ext 2 | ext.d/doc.sh 3 | ext.d/misc.sh 4 | ext.d/text.sh 5 | mc.charsets 6 | mc.menu 7 | mcedit.menu 8 | syntax/Syntax 9 | -------------------------------------------------------------------------------- /misc/Makefile.am: -------------------------------------------------------------------------------- 1 | ## Process this file with automake to create Makefile.in. 2 | 3 | SUBDIRS = ext.d macros.d skins syntax 4 | 5 | LIBFILES_OUT = mc.ext.ini 6 | 7 | noinst_DATA = xterm.ad 8 | 9 | PKGDATA_IN = mc.charsets.in 10 | 11 | PKGDATA_OUT = 12 | if CHARSET 13 | PKGDATA_OUT += mc.charsets 14 | endif 15 | 16 | dist_pkgdata_DATA = \ 17 | mc.lib 18 | 19 | pkgdata_DATA = \ 20 | $(PKGDATA_OUT) 21 | 22 | SCRIPTS_IN = \ 23 | mc.menu.in \ 24 | mcedit.menu.in 25 | 26 | SCRIPTS_OUT = \ 27 | mc.menu \ 28 | mcedit.menu 29 | 30 | LIBFILES_CONST = \ 31 | filehighlight.ini \ 32 | mc.default.keymap \ 33 | mc.emacs.keymap \ 34 | mc.vim.keymap 35 | 36 | 37 | LIBFILES_SCRIPT = \ 38 | edit.indent.rc 39 | 40 | CLEANFILES = $(SCRIPTS_OUT) $(PKGDATA_OUT) 41 | 42 | cfgdir = $(sysconfdir)/@PACKAGE@ 43 | cfg_DATA = \ 44 | $(LIBFILES_CONST) \ 45 | $(SCRIPTS_OUT) \ 46 | $(LIBFILES_OUT) 47 | 48 | cfg_SCRIPTS = \ 49 | $(LIBFILES_SCRIPT) 50 | 51 | # Files processed by configure don't need to be here 52 | EXTRA_DIST = \ 53 | $(LIBFILES_CONST) \ 54 | $(LIBFILES_SCRIPT) \ 55 | $(SCRIPTS_IN) \ 56 | $(noinst_DATA) \ 57 | $(PKGDATA_IN) 58 | 59 | install-data-hook: 60 | cd $(DESTDIR)$(cfgdir) && rm -f mc.keymap && $(LN_S) mc.default.keymap mc.keymap 61 | 62 | uninstall-hook: 63 | cd $(DESTDIR)$(cfgdir) && rm -f mc.keymap 64 | -------------------------------------------------------------------------------- /misc/edit.indent.rc: -------------------------------------------------------------------------------- 1 | #! /bin/sh 2 | # *** External Formatter (Indenter) for GNU Midnight Commander. 3 | # arguments: 4 | # $1 - Name of the file being edited 5 | # $2 - Name of the file to be processed 6 | 7 | exec >/dev/null 8 | 9 | case `echo $1 |sed 's/^.*\.//'` in 10 | c|C|cc|CC|cxx|CXX|cpp|CPP|c++|C++|h|H|hh|hxx|hpp) 11 | # https://clang.llvm.org/docs/ClangFormat.html 12 | # Please add options to your .clang-format, not here. 13 | clang-format -i "$2" 14 | ;; 15 | java|JAVA) 16 | # https://astyle.sourceforge.net 17 | astyle --style=java --mode=java "$2" 18 | ;; 19 | htm|html|HTM|HTML) 20 | # https://tidy.sourceforge.net 21 | tidy -q -m -ascii -wrap 80 "$2" 22 | ;; 23 | *) 24 | # https://www.gnu.org/software/coreutils/ 25 | fmt "$2" >"$2.tmp" && rm -f "$2" && mv -f "$2.tmp" "$2" 26 | ;; 27 | esac 28 | -------------------------------------------------------------------------------- /misc/ext.d/Makefile.am: -------------------------------------------------------------------------------- 1 | extdir = $(EXTHELPERSDIR) 2 | 3 | SCRIPTS_IN = \ 4 | doc.sh.in \ 5 | misc.sh.in \ 6 | text.sh.in 7 | 8 | SCRIPTS_OUT = \ 9 | doc.sh \ 10 | misc.sh \ 11 | text.sh 12 | 13 | SCRIPTS_UNTOUCHED = \ 14 | archive.sh \ 15 | image.sh \ 16 | package.sh \ 17 | sound.sh \ 18 | video.sh \ 19 | web.sh 20 | 21 | ext_SCRIPTS = \ 22 | $(SCRIPTS_UNTOUCHED) \ 23 | $(SCRIPTS_OUT) 24 | 25 | EXTRA_DIST = \ 26 | $(SCRIPTS_UNTOUCHED) \ 27 | $(SCRIPTS_IN) 28 | 29 | -------------------------------------------------------------------------------- /misc/ext.d/package.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # $1 - action 4 | # $2 - type of file 5 | 6 | action=$1 7 | filetype=$2 8 | 9 | [ -n "${MC_XDG_OPEN}" ] || MC_XDG_OPEN="xdg-open" 10 | 11 | do_view_action() { 12 | filetype=$1 13 | 14 | case "${filetype}" in 15 | trpm) 16 | rpm -qivl --scripts `basename "${MC_EXT_BASENAME}" .trpm` 17 | ;; 18 | src.rpm|rpm) 19 | if rpm --nosignature --version >/dev/null 2>&1; then 20 | RPM="rpm --nosignature" 21 | else 22 | RPM="rpm" 23 | fi 24 | $RPM -qivlp --scripts "${MC_EXT_FILENAME}" 25 | ;; 26 | deb) 27 | dpkg-deb -I "${MC_EXT_FILENAME}" && echo && dpkg-deb -c "${MC_EXT_FILENAME}" 28 | ;; 29 | debd) 30 | dpkg -s `echo "${MC_EXT_BASENAME}" | sed 's/\([0-9a-z.-]*\).*/\1/'` 31 | ;; 32 | deba) 33 | apt-cache show `echo "${MC_EXT_BASENAME}" | sed 's/\([0-9a-z.-]*\).*/\1/'` 34 | ;; 35 | *) 36 | ;; 37 | esac 38 | } 39 | 40 | do_open_action() { 41 | filetype=$1 42 | 43 | case "${filetype}" in 44 | *) 45 | ;; 46 | esac 47 | } 48 | 49 | case "${action}" in 50 | view) 51 | do_view_action "${filetype}" 52 | ;; 53 | open) 54 | ("${MC_XDG_OPEN}" "${MC_EXT_FILENAME}" >/dev/null 2>&1) || \ 55 | do_open_action "${filetype}" 56 | ;; 57 | *) 58 | ;; 59 | esac 60 | -------------------------------------------------------------------------------- /misc/ext.d/video.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # $1 - action 4 | # $2 - type of file 5 | 6 | action=$1 7 | filetype=$2 8 | 9 | if [ -n "$DISPLAY" ]; then 10 | [ -n "${MC_XDG_OPEN}" ] || MC_XDG_OPEN="xdg-open" 11 | fi 12 | 13 | do_view_action() { 14 | filetype=$1 15 | 16 | case "${filetype}" in 17 | *) 18 | if command -v mplayer >/dev/null 2>&1; then 19 | mplayer -identify -vo null -ao null -frames 0 "${MC_EXT_FILENAME}" 2>&1 | \ 20 | sed -n 's/^ID_//p' 21 | elif command -v mpv_identify.sh >/dev/null 2>&1; then 22 | mpv_identify.sh "${MC_EXT_FILENAME}" 23 | else 24 | echo "Please install either mplayer or mpv to get information for this file" 25 | fi 26 | ;; 27 | esac 28 | } 29 | 30 | do_open_action() { 31 | filetype=$1 32 | 33 | if command -v mpv >/dev/null 2>&1; then 34 | PLAYER="mpv --really-quiet" 35 | else 36 | PLAYER="mplayer -really-quiet" 37 | fi 38 | 39 | if [ -n "$DISPLAY" ]; then 40 | ($PLAYER "${MC_EXT_FILENAME}" >/dev/null 2>&1 &) 41 | else 42 | $PLAYER -vo null "${MC_EXT_FILENAME}" 43 | fi 44 | } 45 | 46 | case "${action}" in 47 | view) 48 | do_view_action "${filetype}" 49 | ;; 50 | open) 51 | ("${MC_XDG_OPEN}" "${MC_EXT_FILENAME}" >/dev/null 2>&1) || \ 52 | do_open_action "${filetype}" 53 | ;; 54 | *) 55 | ;; 56 | esac 57 | -------------------------------------------------------------------------------- /misc/macros.d/Makefile.am: -------------------------------------------------------------------------------- 1 | macrodir = $(pkgdatadir)/examples/macros.d 2 | 3 | macro_DATA = \ 4 | macro.0.sh \ 5 | macro.1.sh \ 6 | macro.3.sh \ 7 | macro.4.sh \ 8 | macro.5.sh \ 9 | macro.6.sh \ 10 | macro.7.sh 11 | 12 | EXTRA_DIST = \ 13 | $(macro_DATA) 14 | -------------------------------------------------------------------------------- /misc/macros.d/macro.0.sh: -------------------------------------------------------------------------------- 1 | m make 2 | TMPFILE=`mktemp ${MC_TMPDIR:-/tmp}/up.XXXXXX` || exit 1 3 | make 2> $TMPFILE 4 | mcedit $TMPFILE 5 | rm $TMPFILE 6 | -------------------------------------------------------------------------------- /misc/macros.d/macro.1.sh: -------------------------------------------------------------------------------- 1 | #silent 2 | u Upper case selection 3 | TMPFILE=`mktemp ${MC_TMPDIR:-/tmp}/up.XXXXXX` || exit 1 4 | cat %b > $TMPFILE 5 | cat $TMPFILE| sed 's/\(.*\)/\U\1/' >%b 6 | rm -f $TMPFILE 7 | -------------------------------------------------------------------------------- /misc/macros.d/macro.2.sh: -------------------------------------------------------------------------------- 1 | #silent 2 | l Lower case selection 3 | TMPFILE=`mktemp ${MC_TMPDIR:-/tmp}/up.XXXXXX` || exit 1 4 | cat %b > $TMPFILE 5 | cat $TMPFILE| sed 's/\(.*\)/\L\1/' >%b 6 | rm -f $TMPFILE 7 | -------------------------------------------------------------------------------- /misc/macros.d/macro.3.sh: -------------------------------------------------------------------------------- 1 | #silent 2 | S Sort selection 3 | TMPFILE=`mktemp ${MC_TMPDIR:-/tmp}/up.XXXXXX` || exit 1 4 | cat %b > $TMPFILE 5 | cat $TMPFILE| sort >%b 6 | rm -f $TMPFILE 7 | -------------------------------------------------------------------------------- /misc/macros.d/macro.4.sh: -------------------------------------------------------------------------------- 1 | #silent 2 | t clang-format `C/C++' formatter 3 | clang-format -i %b 1>/dev/null 2> %e 4 | -------------------------------------------------------------------------------- /misc/macros.d/macro.5.sh: -------------------------------------------------------------------------------- 1 | #silent 2 | s snippets 3 | a=`cat %b` 4 | if [ "$a" = "fori" ]; then 5 | echo "for (i = 0; i _; i++)" > %b 6 | fi 7 | if [ "$a" = "ife" ]; then 8 | cat < %b 9 | if ( ) 10 | { 11 | } 12 | else 13 | { 14 | } 15 | EOF 16 | fi 17 | if [ "$a" = "GPL" ]; then 18 | cat >>%b <. 32 | */ 33 | EOF 34 | fi 35 | if [ "$a" = "type" ]; then 36 | cat < %b 37 | typedef struct { 38 | ; 39 | } ?; 40 | EOF 41 | fi 42 | -------------------------------------------------------------------------------- /misc/macros.d/macro.6.sh: -------------------------------------------------------------------------------- 1 | #silent 2 | e execute something 3 | TMPFILE=`mktemp ${MC_TMPDIR:-/tmp}/up.XXXXXX` || exit 1 4 | cat %b > $TMPFILE 5 | sh $TMPFILE > %b 6 | -------------------------------------------------------------------------------- /misc/macros.d/macro.7.sh: -------------------------------------------------------------------------------- 1 | #silent 2 | w delete trailing whitespace 3 | TMPFILE=`mktemp ${MC_TMPDIR:-/tmp}/up.XXXXXX` || exit 1 4 | cat %b > $TMPFILE 5 | cat $TMPFILE | sed 's/[ \t]*$//' > %b 6 | -------------------------------------------------------------------------------- /misc/mc.charsets.in: -------------------------------------------------------------------------------- 1 | ASCII 7-bit ASCII 2 | @ENCODING_ISO8859@-1 ISO 8859-1 3 | @ENCODING_ISO8859@-2 ISO 8859-2 4 | @ENCODING_ISO8859@-5 ISO 8859-5 5 | CP1250 Windows 1250 6 | @ENCODING_CP1251@ Windows 1251 7 | CP437 CP 437 8 | CP850 CP 850 9 | CP852 CP 852 10 | @ENCODING_CP866@ CP 866 11 | KOI8-R KOI8-R 12 | KOI8-U KOI8-U 13 | UTF-8 UTF-8 14 | -------------------------------------------------------------------------------- /misc/mc.keymap: -------------------------------------------------------------------------------- 1 | mc.default.keymap -------------------------------------------------------------------------------- /misc/mc.macros: -------------------------------------------------------------------------------- 1 | #see ./macros.d/* 2 | [editor] 3 | #autocomplete "ife", "GPL", "fori" 4 | ctrl-space=EditWordLeftHighlight:-1;EditPipeBlock:5;EditUnmark:-1; 5 | #run make 6 | ctrl-f9=EditPipeBlock:0; 7 | #indent current selection 8 | meta-ctrl-F=EditPipeBlock:4; 9 | 10 | -------------------------------------------------------------------------------- /misc/skins/Makefile.am: -------------------------------------------------------------------------------- 1 | skindir = $(pkgdatadir)/skins 2 | 3 | skin_DATA = \ 4 | dark.ini \ 5 | darkfar.ini \ 6 | default.ini \ 7 | double-lines.ini \ 8 | featured-plus.ini \ 9 | featured.ini \ 10 | gotar.ini \ 11 | gray-green-purple256.ini \ 12 | gray-orange-blue256.ini \ 13 | julia256.ini \ 14 | julia256root.ini \ 15 | mc46.ini \ 16 | modarcon16-defbg.ini \ 17 | modarcon16-defbg-thin.ini \ 18 | modarcon16.ini \ 19 | modarcon16-thin.ini \ 20 | modarcon16root-defbg.ini \ 21 | modarcon16root-defbg-thin.ini \ 22 | modarcon16root-thin.ini \ 23 | modarcon16root.ini \ 24 | modarin256-defbg-thin.ini \ 25 | modarin256-defbg.ini \ 26 | modarin256-thin.ini \ 27 | modarin256.ini \ 28 | modarin256root-defbg-thin.ini \ 29 | modarin256root-defbg.ini \ 30 | modarin256root-thin.ini \ 31 | modarin256root.ini \ 32 | nicedark.ini \ 33 | sand256.ini \ 34 | seasons-autumn16M.ini \ 35 | seasons-spring16M.ini \ 36 | seasons-summer16M.ini \ 37 | seasons-winter16M.ini \ 38 | xoria256-thin.ini \ 39 | xoria256.ini \ 40 | xoria256root-thin.ini \ 41 | yadt256-defbg.ini \ 42 | yadt256.ini 43 | 44 | EXTRA_DIST = \ 45 | $(skin_DATA) 46 | -------------------------------------------------------------------------------- /misc/syntax/aspx.syntax: -------------------------------------------------------------------------------- 1 | # ASP.NET syntax highlighting 2 | # 3 | # Author: Juan C. Olivares 4 | # https://www.juancri.com 5 | 6 | context default 7 | keyword "*" lightgray 8 | keyword '*' lightgray 9 | 10 | spellcheck 11 | 12 | context brightgreen 13 | spellcheck 14 | 15 | context yellow 16 | keyword '+' brightcyan 17 | keyword "+" brightcyan 18 | keyword \( lightgray 19 | keyword \) lightgray 20 | keyword \* lightgray 21 | keyword \? lightgray 22 | keyword \+ lightgray 23 | keyword \| lightgray 24 | keyword \, lightgray 25 | spellcheck 26 | 27 | context <% %> brightgreen 28 | keyword Application white 29 | keyword Assembly white 30 | keyword Control white 31 | keyword Implements white 32 | keyword Import white 33 | keyword Inherits white 34 | keyword OutputCache white 35 | keyword Page white 36 | keyword Reference white 37 | keyword Register white 38 | keyword WebService white 39 | keyword \s+\= yellow 40 | keyword '*' brightcyan 41 | keyword "*" brightcyan 42 | spellcheck 43 | 44 | context < > white 45 | keyword \s+\= yellow 46 | keyword "server" brightgreen 47 | keyword '*' brightcyan 48 | keyword "*" brightcyan 49 | spellcheck 50 | -------------------------------------------------------------------------------- /misc/syntax/c.syntax: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MidnightCommander/mc-old/4ff4d0df4eaa8fd380c56a453ab1ea519bd953bb/misc/syntax/c.syntax -------------------------------------------------------------------------------- /misc/syntax/changelog.syntax: -------------------------------------------------------------------------------- 1 | context default 2 | spellcheck 3 | 4 | context linestart \t \n\n 5 | keyword wholeright +() brightmagenta 6 | keyword linestart \t\*\s*: brightcyan 7 | keyword (*): cyan 8 | keyword (*)\{\s\}[*]: cyan 9 | 10 | context linestart \s\s\s\s\s\s\s\s \n\n 11 | keyword wholeright +() brightmagenta 12 | keyword \*\s*: brightcyan 13 | keyword (*): cyan 14 | keyword (*)\{\s\}[*]: cyan 15 | keyword whole \* brightcyan 16 | 17 | context linestart 19+-+\s \n yellow 18 | keyword <+> brightred 19 | context linestart 20+-+\s \n yellow 20 | keyword <+> brightred 21 | context linestart Mon\s \n yellow 22 | keyword <+> brightred 23 | context linestart Tue\s \n yellow 24 | keyword <+> brightred 25 | context linestart Wed\s \n yellow 26 | keyword <+> brightred 27 | context linestart Thu\s \n yellow 28 | keyword <+> brightred 29 | context linestart Fri\s \n yellow 30 | keyword <+> brightred 31 | context linestart Sat\s \n yellow 32 | keyword <+> brightred 33 | context linestart Sun\s \n yellow 34 | keyword <+> brightred 35 | -------------------------------------------------------------------------------- /misc/syntax/cs.syntax: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MidnightCommander/mc-old/4ff4d0df4eaa8fd380c56a453ab1ea519bd953bb/misc/syntax/cs.syntax -------------------------------------------------------------------------------- /misc/syntax/cuda.syntax: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MidnightCommander/mc-old/4ff4d0df4eaa8fd380c56a453ab1ea519bd953bb/misc/syntax/cuda.syntax -------------------------------------------------------------------------------- /misc/syntax/cxx.syntax: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MidnightCommander/mc-old/4ff4d0df4eaa8fd380c56a453ab1ea519bd953bb/misc/syntax/cxx.syntax -------------------------------------------------------------------------------- /misc/syntax/d.syntax: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MidnightCommander/mc-old/4ff4d0df4eaa8fd380c56a453ab1ea519bd953bb/misc/syntax/d.syntax -------------------------------------------------------------------------------- /misc/syntax/debian-changelog.syntax: -------------------------------------------------------------------------------- 1 | context default 2 | 3 | keyword linestart \s\s\* brightcyan/17 4 | keyword linestart \s-- brightred/19 5 | keyword linestart \s\s\s\s\+ cyan/17 6 | 7 | keyword <*@*> brightred/19 8 | keyword whole experimental; brightmagenta/magenta 9 | keyword whole unstable; brightmagenta/magenta 10 | keyword whole stable; brightmagenta/magenta 11 | keyword whole urgency=low yellow/24 12 | keyword whole urgency=medium brightgreen/6 13 | keyword whole urgency=high white/25 14 | keyword whole urgency=LOW yellow/24 15 | keyword whole urgency=MEDIUM brightgreen/6 16 | keyword whole urgency=HIGH white/25 17 | 18 | keyword whole bug white/25 19 | keyword whole Bug white/25 20 | keyword whole BUG white/25 21 | -------------------------------------------------------------------------------- /misc/syntax/debian-control.syntax: -------------------------------------------------------------------------------- 1 | context default 2 | keyword linestart Source brightmagenta/20 3 | keyword linestart Section brightmagenta/20 4 | keyword linestart Priority brightmagenta/20 5 | keyword linestart Maintainer brightmagenta/20 6 | keyword linestart Standards-Version brightmagenta/20 7 | keyword linestart Package green/6 8 | keyword linestart Architecture green/6 9 | keyword linestart Depends green/6 10 | keyword linestart Recommends green/6 11 | keyword linestart Suggests green/6 12 | keyword linestart Conflicts green/6 13 | keyword linestart Replaces green/6 14 | keyword linestart Provides green/6 15 | keyword linestart Pre-Depends green/6 16 | keyword linestart Build-Depends green/6 17 | keyword linestart Build-Depends-Indep green/6 18 | keyword linestart Build-Conflicts green/6 19 | keyword linestart Build-Conflicts-Indep green/6 20 | keyword linestart Description green/6 21 | keyword <*@*> brightred/19 22 | 23 | context linestart \s \n brown/22 24 | -------------------------------------------------------------------------------- /misc/syntax/debian-description.syntax: -------------------------------------------------------------------------------- 1 | context default 2 | keyword linestart Format green 3 | keyword linestart Source brightmagenta 4 | keyword linestart Version yellow 5 | keyword linestart Binary brightgreen 6 | keyword linestart Maintainer brightmagenta 7 | keyword <*@*> brightred 8 | keyword linestart Architecture cyan 9 | keyword linestart Standards-Version brightmagenta 10 | keyword linestart Build-Depends green 11 | keyword linestart Files green 12 | 13 | context --- \n brightred 14 | spellcheck 15 | -------------------------------------------------------------------------------- /misc/syntax/diff.syntax: -------------------------------------------------------------------------------- 1 | # Highlighting for various diffs including those generated by CVS 2 | 3 | context default yellow 4 | keyword linestart @@*@@ cyan 5 | keyword linestart Index:\s brown 6 | keyword linestart \s black white 7 | keyword linestart \*\*\*\*\*\*\*\*\*\*\*\*\*\*\* cyan 8 | keyword linestart \*\*\**\*\*\*\* cyan 9 | keyword linestart ---*---- cyan 10 | context exclusive linestart @@*@@ \n brightcyan 11 | context exclusive linestart Index:\s \n black white 12 | context exclusive linestart \s \n lightgray 13 | context exclusive linestart \t \n lightgray 14 | context linestart diff \n white red 15 | context linestart ---\s \n brightmagenta 16 | context linestart \+\+\+\s \n brightmagenta 17 | context linestart \*\*\*\s \n brightmagenta 18 | context linestart === \n brown 19 | context linestart \+ \n brightgreen 20 | context linestart > \n brightgreen 21 | context linestart - \n brightred 22 | context linestart < \n brightred 23 | context linestart ! \n yellow 24 | context linestart ? \n brown 25 | context linestart RCS\s \n brown 26 | context linestart retrieving\s \n brown 27 | context linestart Only\s \n yellow black 28 | context linestart Common\s \n yellow black 29 | context linestart File\s \n yellow black 30 | context linestart Files\s \n yellow black 31 | context linestart Binary\s \n yellow black 32 | context linestart # \n brightcyan 33 | -------------------------------------------------------------------------------- /misc/syntax/haskell.syntax: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MidnightCommander/mc-old/4ff4d0df4eaa8fd380c56a453ab1ea519bd953bb/misc/syntax/haskell.syntax -------------------------------------------------------------------------------- /misc/syntax/idl.syntax: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MidnightCommander/mc-old/4ff4d0df4eaa8fd380c56a453ab1ea519bd953bb/misc/syntax/idl.syntax -------------------------------------------------------------------------------- /misc/syntax/ini.syntax: -------------------------------------------------------------------------------- 1 | # DOS / Windows INI files 2 | 3 | context default cyan 4 | keyword = brightred 5 | 6 | # groups 7 | context [ ] yellow 8 | 9 | # comments: 10 | context # \n brown 11 | spellcheck 12 | 13 | context ; \n brown 14 | spellcheck 15 | 16 | context exclusive = \n brightcyan 17 | 18 | 19 | -------------------------------------------------------------------------------- /misc/syntax/lsm.syntax: -------------------------------------------------------------------------------- 1 | 2 | context default 3 | spellcheck 4 | keyword linestart Begin3 brightmagenta 5 | keyword linestart Title:\s\s\s\s\s\s\s\s\s\s red yellow 6 | keyword linestart Version:\s\s\s\s\s\s\s\s red yellow 7 | keyword linestart Entered-date:\s\s\s red yellow 8 | keyword linestart Description:\s\s\s\s red yellow 9 | keyword linestart Keywords:\s\s\s\s\s\s\s red yellow 10 | keyword linestart Alternate-site:\s red yellow 11 | keyword linestart Primary-site:\s\s\s red yellow 12 | keyword linestart Original-site:\s\s red yellow 13 | keyword linestart Platforms:\s\s\s\s\s\s red yellow 14 | keyword linestart Copying-policy:\s red yellow 15 | keyword linestart End brightmagenta 16 | 17 | keyword linestart \t\t white yellow 18 | keyword linestart \s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s white yellow 19 | keyword whole GPL green 20 | keyword whole BSD green 21 | keyword whole Shareware green 22 | keyword whole sunsite.unc.edu green 23 | keyword wholeright \s*.tar.gz green 24 | keyword wholeright \s*.lsm green 25 | 26 | context linestart Author:\s\s\s\s\s\s\s\s\s \n brightred 27 | keyword whole \s*@*\s(*) cyan 28 | 29 | context linestart Maintained-by:\s\s \n brightred 30 | keyword whole \s*@*\s(*) cyan 31 | 32 | ############################################################################### 33 | -------------------------------------------------------------------------------- /misc/syntax/markdown.syntax: -------------------------------------------------------------------------------- 1 | # Markdown syntax highlighting 2 | 3 | context default lightgray 4 | spellcheck 5 | # links 6 | keyword whole [*](*) yellow 7 | keyword \*\* white 8 | keyword \* yellow 9 | keyword \\_ lightgray 10 | keyword wholeleft __ white 11 | keyword wholeright __ white 12 | keyword wholeleft _ yellow 13 | keyword wholeright _ yellow 14 | 15 | context linestart #### \n red 16 | spellcheck 17 | 18 | context linestart # \n brightred 19 | spellcheck 20 | 21 | context linestart > \n green 22 | spellcheck 23 | 24 | context linestart \s\s\s\s \n cyan 25 | 26 | context ``` ``` cyan 27 | 28 | context `` `` cyan 29 | 30 | context ` ` cyan 31 | -------------------------------------------------------------------------------- /misc/syntax/nemerle.syntax: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MidnightCommander/mc-old/4ff4d0df4eaa8fd380c56a453ab1ea519bd953bb/misc/syntax/nemerle.syntax -------------------------------------------------------------------------------- /misc/syntax/opencl.syntax: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MidnightCommander/mc-old/4ff4d0df4eaa8fd380c56a453ab1ea519bd953bb/misc/syntax/opencl.syntax -------------------------------------------------------------------------------- /misc/syntax/osl.syntax: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MidnightCommander/mc-old/4ff4d0df4eaa8fd380c56a453ab1ea519bd953bb/misc/syntax/osl.syntax -------------------------------------------------------------------------------- /misc/syntax/slang.syntax: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MidnightCommander/mc-old/4ff4d0df4eaa8fd380c56a453ab1ea519bd953bb/misc/syntax/slang.syntax -------------------------------------------------------------------------------- /misc/syntax/strace.syntax: -------------------------------------------------------------------------------- 1 | context default 2 | keyword access(*) green 3 | keyword execve(*) brightgreen 4 | keyword uname(*) brightblue 5 | 6 | keyword open(*) cyan 7 | keyword close(*) cyan 8 | 9 | keyword read(*) magenta 10 | keyword select(*) magenta 11 | keyword write(*) magenta 12 | 13 | keyword readv(*) brightmagenta 14 | keyword writev(*) brightmagenta 15 | 16 | keyword fcntl64(*) white 17 | keyword fstat64(*) white 18 | keyword stat64(*) white 19 | 20 | keyword old_mmap(*) red 21 | keyword mmap2(*) red 22 | keyword munmap(*) red 23 | 24 | keyword exit_group(*) brightred 25 | keyword kill(*) brightred 26 | keyword wait4(*) brightred 27 | keyword statfs(*) brightred 28 | keyword ioctl(*) brightred 29 | keyword rt_sigaction(*) brightred 30 | keyword rt_sigprocmask(*) brightred 31 | keyword alarm(*) brightred 32 | keyword brk(*) brightred 33 | 34 | keyword chown32(*) yellow 35 | keyword chmod(*) yellow 36 | keyword geteuid32(*) yellow 37 | keyword getegid32(*) yellow 38 | keyword getuid32(*) yellow 39 | keyword getgid32(*) yellow 40 | keyword setresuid32(*) yellow 41 | keyword setresgid32(*) yellow 42 | keyword gettimeofday(*) yellow 43 | -------------------------------------------------------------------------------- /misc/syntax/swig.syntax: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MidnightCommander/mc-old/4ff4d0df4eaa8fd380c56a453ab1ea519bd953bb/misc/syntax/swig.syntax -------------------------------------------------------------------------------- /misc/syntax/toml.syntax: -------------------------------------------------------------------------------- 1 | # TOML: Tom's Obvious Minimal Language 2 | 3 | context default white 4 | 5 | # groups 6 | context [ \n brown 7 | keyword [ yellow 8 | keyword ] yellow 9 | 10 | # assignment 11 | context exclusive = \n write 12 | keyword "*" brightgreen 13 | keyword whole false brightcyan 14 | keyword whole true brightcyan 15 | keyword \{0123456789\} brightcyan 16 | 17 | # comments 18 | context # \n brown 19 | spellcheck 20 | 21 | # other strings 22 | context " " brightgreen 23 | -------------------------------------------------------------------------------- /misc/syntax/unknown.syntax: -------------------------------------------------------------------------------- 1 | context default 2 | spellcheck 3 | -------------------------------------------------------------------------------- /misc/syntax/xml.syntax: -------------------------------------------------------------------------------- 1 | # XML syntax highlighting 2 | # 3 | # Author: Petr Kozelka 4 | 5 | context default 6 | keyword &*; white cyan 7 | spellcheck 8 | 9 | context brightgreen 10 | spellcheck 11 | 12 | context yellow 13 | keyword '+' brightcyan 14 | keyword "+" brightcyan 15 | keyword whole DOCTYPE white red 16 | keyword whole PUBLIC brightred 17 | keyword whole SYSTEM brightred 18 | keyword whole NDATA brightred 19 | keyword whole CDATA white 20 | keyword whole #PCDATA white 21 | keyword whole EMPTY white 22 | keyword whole #REQUIRED white 23 | keyword whole #IMPLIED white 24 | keyword whole ELEMENT white 25 | keyword whole ENTITY brightred 26 | keyword whole ATTLIST white 27 | keyword whole %*; white cyan 28 | keyword \( lightgray 29 | keyword \) lightgray 30 | keyword \* lightgray 31 | keyword \? lightgray 32 | keyword \+ lightgray 33 | keyword \| lightgray 34 | keyword \, lightgray 35 | spellcheck 36 | 37 | context <\?xml \?> white red 38 | context <\? \?> lightgray black 39 | context < > white 40 | keyword \sxmlns\:*\="+" brightred 41 | keyword \sxmlns\="+" brightred 42 | keyword \s*= yellow 43 | keyword '*' brightcyan 44 | keyword "*" brightcyan 45 | spellcheck 46 | -------------------------------------------------------------------------------- /misc/syntax/yum-repo.syntax: -------------------------------------------------------------------------------- 1 | # Yum repo syntax highlighting 2 | # 3 | # Author: Andy Shevchenko 4 | 5 | context default 6 | keyword whole enabled=0 brightred 7 | keyword whole gpgcheck=0 brightred 8 | keyword whole enabled=1 brightgreen 9 | keyword whole gpgcheck=1 brightgreen 10 | 11 | context # \n brown 12 | spellcheck 13 | 14 | context [ ] brightcyan 15 | context exclusive = \n green 16 | -------------------------------------------------------------------------------- /misc/syntax/yxx.syntax: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MidnightCommander/mc-old/4ff4d0df4eaa8fd380c56a453ab1ea519bd953bb/misc/syntax/yxx.syntax -------------------------------------------------------------------------------- /po/.gitignore: -------------------------------------------------------------------------------- 1 | *.cat 2 | *.gmo 3 | *.mo 4 | *.msg 5 | *.pox 6 | *.pot 7 | Makefile 8 | Makefile.in 9 | Makefile.in.in 10 | Makevars.template 11 | POTFILES 12 | POTFILES.in 13 | POTFILES.in.missing 14 | Rules-quot 15 | boldquot.sed 16 | cat-id-tbl.c 17 | en@boldquot.header 18 | en@quot.header 19 | insert-header.sin 20 | messages 21 | quot.sed 22 | remove-potcdate.sed 23 | remove-potcdate.sin 24 | stamp-cat-id 25 | stamp-po 26 | -------------------------------------------------------------------------------- /po/LINGUAS: -------------------------------------------------------------------------------- 1 | # List of available translations 2 | af 3 | ar 4 | az 5 | be 6 | bg 7 | br 8 | ca 9 | cs 10 | da 11 | de 12 | de_CH 13 | el 14 | en_GB 15 | eo 16 | es 17 | et 18 | eu 19 | fa 20 | fi 21 | fr 22 | fr_CA 23 | ga 24 | gl 25 | he 26 | hr 27 | hu 28 | ia 29 | id 30 | ie 31 | it 32 | ja 33 | ka 34 | kk 35 | ko 36 | kw 37 | lt 38 | lv 39 | mn 40 | nb 41 | nl 42 | nl_BE 43 | pl 44 | pt 45 | pt_BR 46 | ro 47 | ru 48 | sk 49 | sl 50 | sr 51 | sv 52 | szl 53 | ta 54 | te 55 | tr 56 | uk 57 | uz 58 | vi 59 | wa 60 | zh_CN 61 | zh_TW 62 | -------------------------------------------------------------------------------- /po/README: -------------------------------------------------------------------------------- 1 | When you commit a translation, please strip the #: lines before. This 2 | makes it much easier to view diffs. Example: 3 | 4 | ./strip-location *.po 5 | 6 | == Special strings == 7 | 8 | Some of the translatable strings are special. They start with one of the 9 | following prefixes to distinguish them from the usual translations. 10 | 11 | ButtonBar| 12 | These strings are used in the button bar at the bottom of the 13 | screen. Only the first six characters will be shown. 14 | -------------------------------------------------------------------------------- /po/Rules-pot-defaults: -------------------------------------------------------------------------------- 1 | 2 | update-po: Makefile 3 | $(MAKE) $(DOMAIN).pot-update && \ 4 | $${SED-sed} \ 5 | -e '/#, fuzzy/d' \ 6 | -e 's/Project-Id-Version: PACKAGE VERSION/Project-Id-Version: $(PACKAGE) $(VERSION)/' \ 7 | -e 's/^"Plural-Forms: nplurals=INTEGER;/# "Plural-Forms: nplurals=INTEGER;/' \ 8 | -e 's@Content-Type: text/plain; charset=CHARSET@Content-Type: text/plain; charset=utf-8@' \ 9 | < $(srcdir)/$(DOMAIN).pot > $(DOMAIN).1po && \ 10 | mv -f $(DOMAIN).1po $(srcdir)/$(DOMAIN).pot 11 | test -z "$(UPDATEPOFILES)" || $(MAKE) $(UPDATEPOFILES) 12 | $(MAKE) update-gmo && \ 13 | for i in $(srcdir)/*.po; do sed '/^#\:/d' < $$i > $$i.clean && mv -f $$i.clean $$i; done 14 | -------------------------------------------------------------------------------- /src/.gitignore: -------------------------------------------------------------------------------- 1 | .deps 2 | cons.saver 3 | mcmfmt 4 | mc 5 | Makefile 6 | Makefile.in 7 | mc.hlp 8 | mc.hlp.?? 9 | man2hlp/man2hlp 10 | -------------------------------------------------------------------------------- /src/consaver/Makefile.am: -------------------------------------------------------------------------------- 1 | pkglibexecdir = $(libexecdir)/@PACKAGE@ 2 | 3 | pkglibexec_PROGRAMS = cons.saver 4 | 5 | cons_saver_SOURCES = cons.saver.c 6 | 7 | AM_CPPFLAGS = -I$(top_srcdir) 8 | -------------------------------------------------------------------------------- /src/diffviewer/Makefile.am: -------------------------------------------------------------------------------- 1 | noinst_LTLIBRARIES = libdiffviewer.la 2 | 3 | libdiffviewer_la_SOURCES = \ 4 | internal.h \ 5 | search.c \ 6 | ydiff.c ydiff.h 7 | 8 | AM_CPPFLAGS = -I$(top_srcdir) $(GLIB_CFLAGS) 9 | -------------------------------------------------------------------------------- /src/diffviewer/ydiff.h: -------------------------------------------------------------------------------- 1 | #ifndef MC__DIFFVIEW_YDIFF_H 2 | #define MC__DIFFVIEW_YDIFF_H 3 | 4 | /*** typedefs(not structures) and defined constants **********************************************/ 5 | 6 | /*** enums ***************************************************************************************/ 7 | 8 | /*** structures declarations (and typedefs of structures)*****************************************/ 9 | 10 | /*** global variables defined in .c file *********************************************************/ 11 | 12 | /*** declarations of public functions ************************************************************/ 13 | 14 | gboolean dview_diff_cmd (const void *f0, const void *f1); 15 | 16 | #endif 17 | -------------------------------------------------------------------------------- /src/editor/Makefile.am: -------------------------------------------------------------------------------- 1 | EXTRA_DIST = 2 | 3 | if USE_INTERNAL_EDIT 4 | noinst_LTLIBRARIES = libedit.la 5 | else 6 | noinst_LTLIBRARIES = 7 | endif 8 | 9 | libedit_la_SOURCES = \ 10 | bookmark.c \ 11 | edit-impl.h \ 12 | edit.c edit.h \ 13 | editcomplete.c editcomplete.h \ 14 | editbuffer.c editbuffer.h \ 15 | editcmd.c \ 16 | editdraw.c \ 17 | editmacros.c editmacros.h \ 18 | editmenu.c \ 19 | editoptions.c \ 20 | editsearch.c editsearch.h \ 21 | editwidget.c editwidget.h \ 22 | etags.c etags.h \ 23 | format.c \ 24 | syntax.c 25 | 26 | if USE_ASPELL 27 | if HAVE_GMODULE 28 | libedit_la_SOURCES += \ 29 | spell.c spell.h 30 | endif 31 | endif 32 | 33 | AM_CPPFLAGS = $(GLIB_CFLAGS) -I$(top_srcdir) 34 | -------------------------------------------------------------------------------- /src/editor/editcomplete.h: -------------------------------------------------------------------------------- 1 | #ifndef MC__EDIT_COMPLETE_H 2 | #define MC__EDIT_COMPLETE_H 3 | 4 | /*** typedefs(not structures) and defined constants **********************************************/ 5 | 6 | /*** enums ***************************************************************************************/ 7 | 8 | /*** structures declarations (and typedefs of structures)*****************************************/ 9 | 10 | /*** global variables defined in .c file *********************************************************/ 11 | 12 | /*** declarations of public functions ************************************************************/ 13 | 14 | /* Public function for unit tests */ 15 | MC_MOCKABLE char *edit_completion_dialog_show (const WEdit *edit, GQueue * compl, int max_width); 16 | 17 | void edit_complete_word_cmd (WEdit *edit); 18 | 19 | /*** inline functions ****************************************************************************/ 20 | 21 | #endif 22 | -------------------------------------------------------------------------------- /src/editor/editmacros.h: -------------------------------------------------------------------------------- 1 | #ifndef MC__EDIT_MACROS_H 2 | #define MC__EDIT_MACROS_H 1 3 | 4 | /*** typedefs(not structures) and defined constants **********************************************/ 5 | 6 | /*** enums ***************************************************************************************/ 7 | 8 | /*** structures declarations (and typedefs of structures)*****************************************/ 9 | 10 | /*** global variables defined in .c file *********************************************************/ 11 | 12 | /*** declarations of public functions ************************************************************/ 13 | 14 | int edit_store_macro_cmd (WEdit *edit); 15 | MC_MOCKABLE gboolean edit_load_macro_cmd (WEdit *edit); 16 | void edit_delete_macro_cmd (WEdit *edit); 17 | gboolean edit_repeat_macro_cmd (WEdit *edit); 18 | gboolean edit_execute_macro (WEdit *edit, int hotkey); 19 | void edit_begin_end_macro_cmd (WEdit *edit); 20 | void edit_begin_end_repeat_cmd (WEdit *edit); 21 | 22 | /*** inline functions ****************************************************************************/ 23 | 24 | #endif 25 | -------------------------------------------------------------------------------- /src/editor/etags.h: -------------------------------------------------------------------------------- 1 | #ifndef MC__EDIT_ETAGS_H 2 | #define MC__EDIT_ETAGS_H 1 3 | 4 | /*** typedefs(not structures) and defined constants **********************************************/ 5 | 6 | /*** enums ***************************************************************************************/ 7 | 8 | /*** structures declarations (and typedefs of structures)*****************************************/ 9 | 10 | typedef struct etags_hash_struct 11 | { 12 | char *filename; 13 | char *fullpath; 14 | char *short_define; 15 | long line; 16 | } etags_hash_t; 17 | 18 | /*** global variables defined in .c file *********************************************************/ 19 | 20 | /*** declarations of public functions ************************************************************/ 21 | 22 | void edit_get_match_keyword_cmd (WEdit *edit); 23 | 24 | /*** inline functions ****************************************************************************/ 25 | 26 | #endif 27 | -------------------------------------------------------------------------------- /src/editor/spell.h: -------------------------------------------------------------------------------- 1 | #ifndef MC__EDIT_ASPELL_H 2 | #define MC__EDIT_ASPELL_H 3 | 4 | #include "lib/global.h" // include 5 | 6 | /*** typedefs(not structures) and defined constants **********************************************/ 7 | 8 | /*** enums ***************************************************************************************/ 9 | 10 | /*** structures declarations (and typedefs of structures)*****************************************/ 11 | 12 | /*** global variables defined in .c file *********************************************************/ 13 | 14 | /*** declarations of public functions ************************************************************/ 15 | 16 | void aspell_init (void); 17 | void aspell_clean (void); 18 | 19 | int edit_suggest_current_word (WEdit *edit); 20 | void edit_spellcheck_file (WEdit *edit); 21 | void edit_set_spell_lang (void); 22 | 23 | const char *spell_dialog_lang_list_show (const GPtrArray *languages); 24 | 25 | /*** inline functions ****************************************************************************/ 26 | 27 | #endif 28 | -------------------------------------------------------------------------------- /src/events_init.h: -------------------------------------------------------------------------------- 1 | #ifndef MC__EVENTS_INIT_H 2 | #define MC__EVENTS_INIT_H 3 | 4 | /*** typedefs(not structures) and defined constants **********************************************/ 5 | 6 | /*** enums ***************************************************************************************/ 7 | 8 | /*** structures declarations (and typedefs of structures)*****************************************/ 9 | 10 | /*** global variables defined in .c file *********************************************************/ 11 | 12 | /*** declarations of public functions ************************************************************/ 13 | 14 | gboolean events_init (GError **mcerror); 15 | 16 | /*** inline functions ****************************************************************************/ 17 | 18 | #endif 19 | -------------------------------------------------------------------------------- /src/file_history.h: -------------------------------------------------------------------------------- 1 | #ifndef MC__FILE_HISTORY_H 2 | #define MC__FILE_HISTORY_H 3 | 4 | #include "lib/widget.h" 5 | 6 | /*** typedefs(not structures) and defined constants **********************************************/ 7 | 8 | /*** enums ***************************************************************************************/ 9 | 10 | /*** structures declarations (and typedefs of structures)*****************************************/ 11 | 12 | /*** global variables defined in .c file *********************************************************/ 13 | 14 | char *show_file_history (const Widget *w, int *action); 15 | 16 | /*** declarations of public functions ************************************************************/ 17 | 18 | /*** inline functions ****************************************************************************/ 19 | 20 | #endif 21 | -------------------------------------------------------------------------------- /src/filemanager/Makefile.am: -------------------------------------------------------------------------------- 1 | 2 | noinst_LTLIBRARIES = libmcfilemanager.la 3 | 4 | libmcfilemanager_la_SOURCES = \ 5 | achown.c \ 6 | boxes.c boxes.h \ 7 | cd.c cd.h \ 8 | chmod.c \ 9 | chown.c \ 10 | cmd.c cmd.h \ 11 | command.c command.h \ 12 | dir.c dir.h \ 13 | ext.c ext.h \ 14 | file.c file.h \ 15 | filegui.c filegui.h \ 16 | filemanager.h filemanager.c \ 17 | filenot.c filenot.h \ 18 | find.c \ 19 | hotlist.c hotlist.h \ 20 | info.c info.h \ 21 | ioblksize.h \ 22 | layout.c layout.h \ 23 | mountlist.c mountlist.h \ 24 | panelize.c panelize.h \ 25 | panel.c panel.h \ 26 | tree.c tree.h \ 27 | treestore.c treestore.h 28 | 29 | # Unmaintained, unsupported, etc 30 | # listmode.c listmode.h 31 | 32 | AM_CPPFLAGS = -I$(top_srcdir) $(GLIB_CFLAGS) 33 | 34 | if ENABLE_EXT2FS_ATTR 35 | libmcfilemanager_la_SOURCES += \ 36 | chattr.c 37 | endif 38 | -------------------------------------------------------------------------------- /src/filemanager/cd.h: -------------------------------------------------------------------------------- 1 | /** \file cd.h 2 | * \brief Header: cd function 3 | */ 4 | 5 | #ifndef MC__CD_H 6 | #define MC__CD_H 7 | 8 | /*** typedefs(not structures) and defined constants **********************************************/ 9 | 10 | /*** enums ***************************************************************************************/ 11 | 12 | /*** structures declarations (and typedefs of structures)*****************************************/ 13 | 14 | /*** global variables defined in .c file *********************************************************/ 15 | 16 | /*** declarations of public functions ************************************************************/ 17 | 18 | void cd_to (const char *path); 19 | void cd_error_message (const char *path); 20 | 21 | /*** inline functions ****************************************************************************/ 22 | 23 | #endif 24 | -------------------------------------------------------------------------------- /src/filemanager/command.h: -------------------------------------------------------------------------------- 1 | /** \file command.h 2 | * \brief Header: command line widget 3 | */ 4 | 5 | #ifndef MC__COMMAND_H 6 | #define MC__COMMAND_H 7 | 8 | #include "lib/widget.h" 9 | 10 | /*** typedefs(not structures) and defined constants **********************************************/ 11 | 12 | /*** enums ***************************************************************************************/ 13 | 14 | /*** structures declarations (and typedefs of structures)*****************************************/ 15 | 16 | /*** global variables defined in .c file *********************************************************/ 17 | 18 | extern WInput *cmdline; 19 | 20 | /*** declarations of public functions ************************************************************/ 21 | 22 | WInput *command_new (int y, int x, int len); 23 | void command_set_default_colors (void); 24 | void command_insert (WInput *in, const char *text, gboolean insert_extra_space); 25 | 26 | /*** inline functions ****************************************************************************/ 27 | #endif 28 | -------------------------------------------------------------------------------- /src/filemanager/ext.h: -------------------------------------------------------------------------------- 1 | /** \file ext.h 2 | * \brief Header: extension dependent execution 3 | */ 4 | 5 | #ifndef MC__EXT_H 6 | #define MC__EXT_H 7 | /*** typedefs(not structures) and defined constants **********************************************/ 8 | 9 | /*** enums ***************************************************************************************/ 10 | 11 | /*** structures declarations (and typedefs of structures)*****************************************/ 12 | 13 | /*** global variables defined in .c file *********************************************************/ 14 | 15 | /*** declarations of public functions ************************************************************/ 16 | 17 | int regex_command_for (void *target, const vfs_path_t *filename_vpath, const char *action, 18 | vfs_path_t **script_vpath); 19 | 20 | /* Call it after the user has edited the mc.ext file, 21 | * to flush the cached mc.ext file 22 | */ 23 | void flush_extension_file (void); 24 | 25 | /*** inline functions ****************************************************************************/ 26 | 27 | static inline int 28 | regex_command (const vfs_path_t *filename_vpath, const char *action) 29 | { 30 | return regex_command_for (NULL, filename_vpath, action, NULL); 31 | } 32 | 33 | #endif 34 | -------------------------------------------------------------------------------- /src/filemanager/filenot.h: -------------------------------------------------------------------------------- 1 | /** \file file.h 2 | * \brief Header: File and directory operation routines 3 | */ 4 | 5 | #ifndef MC__FILENOT_H 6 | #define MC__FILENOT_H 7 | 8 | #include "lib/global.h" 9 | 10 | /*** typedefs(not structures) and defined constants **********************************************/ 11 | 12 | /*** enums ***************************************************************************************/ 13 | 14 | /*** structures declarations (and typedefs of structures)*****************************************/ 15 | 16 | /*** global variables defined in .c file *********************************************************/ 17 | 18 | /*** declarations of public functions ************************************************************/ 19 | 20 | /* Misc Unix functions */ 21 | int my_mkdir (const vfs_path_t *vpath, mode_t mode); 22 | int my_rmdir (const char *path); 23 | 24 | /*** inline functions ****************************************************************************/ 25 | 26 | #endif 27 | -------------------------------------------------------------------------------- /src/filemanager/hotlist.h: -------------------------------------------------------------------------------- 1 | /** \file hotlist.h 2 | * \brief Header: directory hotlist 3 | */ 4 | 5 | #ifndef MC__HOTLIST_H 6 | #define MC__HOTLIST_H 7 | 8 | /*** typedefs(not structures) and defined constants **********************************************/ 9 | 10 | #include "panel.h" 11 | 12 | /*** enums ***************************************************************************************/ 13 | 14 | typedef enum 15 | { 16 | LIST_VFSLIST = 0x01, 17 | LIST_HOTLIST = 0x02, 18 | LIST_MOVELIST = 0x04 19 | } hotlist_t; 20 | 21 | /*** structures declarations (and typedefs of structures)*****************************************/ 22 | 23 | /*** global variables defined in .c file *********************************************************/ 24 | 25 | /*** declarations of public functions ************************************************************/ 26 | 27 | void add2hotlist_cmd (WPanel *panel); 28 | char *hotlist_show (hotlist_t list_type, WPanel *panel); 29 | gboolean save_hotlist (void); 30 | void done_hotlist (void); 31 | 32 | /*** inline functions ****************************************************************************/ 33 | #endif 34 | -------------------------------------------------------------------------------- /src/filemanager/info.h: -------------------------------------------------------------------------------- 1 | /** \file info.h 2 | * \brief Header: panel managing 3 | */ 4 | 5 | #ifndef MC__INFO_H 6 | #define MC__INFO_H 7 | 8 | /*** typedefs(not structures) and defined constants **********************************************/ 9 | 10 | /*** enums ***************************************************************************************/ 11 | 12 | /*** structures declarations (and typedefs of structures)*****************************************/ 13 | 14 | struct WInfo; 15 | typedef struct WInfo WInfo; 16 | 17 | /*** global variables defined in .c file *********************************************************/ 18 | 19 | /*** declarations of public functions ************************************************************/ 20 | 21 | WInfo *info_new (const WRect *r); 22 | 23 | /*** inline functions ****************************************************************************/ 24 | #endif 25 | -------------------------------------------------------------------------------- /src/filemanager/listmode.h: -------------------------------------------------------------------------------- 1 | /** \file listmode.h 2 | * \brief Header: directory panel listing format editor 3 | */ 4 | 5 | #ifndef MC__LISTMODE_H 6 | #define MC__LISTMODE_H 7 | /*** typedefs(not structures) and defined constants **********************************************/ 8 | 9 | /*** enums ***************************************************************************************/ 10 | 11 | /*** structures declarations (and typedefs of structures)*****************************************/ 12 | 13 | /*** global variables defined in .c file *********************************************************/ 14 | 15 | /*** declarations of public functions ************************************************************/ 16 | 17 | #ifdef LISTMODE_EDITOR 18 | char *listmode_edit (char *); 19 | #endif 20 | 21 | /*** inline functions ****************************************************************************/ 22 | #endif 23 | -------------------------------------------------------------------------------- /src/filemanager/mountlist.h: -------------------------------------------------------------------------------- 1 | /* 2 | Declarations for list of mounted filesystems 3 | */ 4 | 5 | /** \file mountlist.h 6 | * \brief Header: list of mounted filesystems 7 | */ 8 | 9 | #ifndef MC__MOUNTLIST_H 10 | #define MC__MOUNTLIST_H 11 | 12 | #include // uintmax_t 13 | 14 | /*** typedefs(not structures) and defined constants **********************************************/ 15 | 16 | /*** enums ***************************************************************************************/ 17 | 18 | /*** structures declarations (and typedefs of structures)*****************************************/ 19 | 20 | /* Filesystem status */ 21 | struct my_statfs 22 | { 23 | int type; 24 | char *typename; 25 | const char *mpoint; 26 | const char *mroot; 27 | const char *device; 28 | uintmax_t avail; // in kB 29 | uintmax_t total; // in kB 30 | uintmax_t nfree; 31 | uintmax_t nodes; 32 | }; 33 | 34 | /*** global variables defined in .c file *********************************************************/ 35 | 36 | /*** declarations of public functions ************************************************************/ 37 | 38 | void init_my_statfs (void); 39 | void my_statfs (struct my_statfs *myfs_stats, const char *path); 40 | void free_my_statfs (void); 41 | 42 | /*** inline functions ****************************************************************************/ 43 | 44 | #endif 45 | -------------------------------------------------------------------------------- /src/filemanager/panelize.h: -------------------------------------------------------------------------------- 1 | /** \file panelize.h 2 | * \brief Header: External panelization module 3 | */ 4 | 5 | #ifndef MC__PANELIZE_H 6 | #define MC__PANELIZE_H 7 | 8 | /*** typedefs(not structures) and defined constants **********************************************/ 9 | 10 | /*** enums ***************************************************************************************/ 11 | 12 | /*** structures declarations (and typedefs of structures)*****************************************/ 13 | 14 | /*** global variables defined in .c file *********************************************************/ 15 | 16 | /*** declarations of public functions ************************************************************/ 17 | 18 | void external_panelize_cmd (void); 19 | void external_panelize_load (void); 20 | void external_panelize_save (void); 21 | void external_panelize_free (void); 22 | 23 | /*** inline functions ****************************************************************************/ 24 | 25 | #endif 26 | -------------------------------------------------------------------------------- /src/filemanager/tree.h: -------------------------------------------------------------------------------- 1 | /** \file tree.h 2 | * \brief Header: directory tree browser 3 | */ 4 | 5 | #ifndef MC__TREE_H 6 | #define MC__TREE_H 7 | 8 | #include "lib/global.h" 9 | 10 | /*** typedefs(not structures) and defined constants **********************************************/ 11 | 12 | /*** enums ***************************************************************************************/ 13 | 14 | /*** structures declarations (and typedefs of structures)*****************************************/ 15 | 16 | typedef struct WTree WTree; 17 | 18 | /*** global variables defined in .c file *********************************************************/ 19 | 20 | extern WTree *the_tree; 21 | extern gboolean xtree_mode; 22 | 23 | /*** declarations of public functions ************************************************************/ 24 | 25 | WTree *tree_new (const WRect *r, gboolean is_panel); 26 | 27 | void tree_chdir (WTree *tree, const vfs_path_t *dir); 28 | const vfs_path_t *tree_selected_name (const WTree *tree); 29 | 30 | void sync_tree (const vfs_path_t *vpath); 31 | 32 | WTree *find_tree (const WDialog *h); 33 | 34 | /*** inline functions ****************************************************************************/ 35 | #endif 36 | -------------------------------------------------------------------------------- /src/learn.h: -------------------------------------------------------------------------------- 1 | /** \file learn.h 2 | * \brief Header: learn keys module 3 | */ 4 | 5 | #ifndef MC__LEARN_H 6 | #define MC__LEARN_H 7 | 8 | /*** typedefs(not structures) and defined constants **********************************************/ 9 | 10 | /*** enums ***************************************************************************************/ 11 | 12 | /*** structures declarations (and typedefs of structures)*****************************************/ 13 | 14 | /*** global variables defined in .c file *********************************************************/ 15 | 16 | /*** declarations of public functions ************************************************************/ 17 | 18 | void learn_keys (void); 19 | 20 | /*** inline functions ****************************************************************************/ 21 | #endif 22 | -------------------------------------------------------------------------------- /src/man2hlp/Makefile.am: -------------------------------------------------------------------------------- 1 | noinst_SCRIPTS = man2hlp 2 | -------------------------------------------------------------------------------- /src/subshell/Makefile.am: -------------------------------------------------------------------------------- 1 | noinst_LTLIBRARIES = libsubshell.la 2 | 3 | libsubshell_la_SOURCES = \ 4 | common.c \ 5 | internal.h \ 6 | proxyfunc.c \ 7 | subshell.h 8 | 9 | AM_CPPFLAGS = -I$(top_srcdir) $(GLIB_CFLAGS) 10 | -------------------------------------------------------------------------------- /src/subshell/internal.h: -------------------------------------------------------------------------------- 1 | /** \file internal.h 2 | * \brief Header: internal functions and variables 3 | */ 4 | 5 | #ifndef MC__SUBSHELL_INTERNAL_H 6 | #define MC__SUBSHELL_INTERNAL_H 7 | 8 | /* TODO: merge content of layout.h here */ 9 | 10 | /*** typedefs(not structures) and defined constants **********************************************/ 11 | 12 | /*** enums ***************************************************************************************/ 13 | 14 | /*** structures declarations (and typedefs of structures)*****************************************/ 15 | 16 | /*** global variables defined in .c file *********************************************************/ 17 | 18 | /*** declarations of public functions ************************************************************/ 19 | 20 | const vfs_path_t *subshell_get_cwd (void); 21 | void subshell_handle_cons_saver (void); 22 | 23 | int subshell_get_mainloop_quit (void); 24 | void subshell_set_mainloop_quit (const int param_quit); 25 | 26 | /*** inline functions ****************************************************************************/ 27 | 28 | #endif 29 | -------------------------------------------------------------------------------- /src/textconf.h: -------------------------------------------------------------------------------- 1 | /** \file textconf.h 2 | * \brief Header: prints features specific for this build 3 | */ 4 | 5 | #ifndef MC__TEXTCONF_H 6 | #define MC__TEXTCONF_H 7 | 8 | /*** typedefs(not structures) and defined constants **********************************************/ 9 | 10 | /*** enums ***************************************************************************************/ 11 | 12 | /*** structures declarations (and typedefs of structures)*****************************************/ 13 | 14 | /*** global variables defined in .c file *********************************************************/ 15 | 16 | /*** declarations of public functions ************************************************************/ 17 | 18 | extern void show_version (void); 19 | extern void show_datadirs_extended (void); 20 | extern void show_configure_options (void); 21 | 22 | /*** inline functions ****************************************************************************/ 23 | #endif 24 | -------------------------------------------------------------------------------- /src/util.h: -------------------------------------------------------------------------------- 1 | #ifndef MC_SRC_UTIL_H 2 | #define MC_SRC_UTIL_H 3 | 4 | /*** typedefs(not structures) and defined constants **********************************************/ 5 | 6 | /*** enums ***************************************************************************************/ 7 | 8 | /*** structures declarations (and typedefs of structures)*****************************************/ 9 | 10 | /*** global variables defined in .c file *********************************************************/ 11 | 12 | /*** declarations of public functions ************************************************************/ 13 | 14 | /* Check if the file exists. If not copy the default */ 15 | gboolean check_for_default (const vfs_path_t *default_file_vpath, const vfs_path_t *file_vpath); 16 | 17 | /*** inline functions ****************************************************************************/ 18 | 19 | #endif 20 | -------------------------------------------------------------------------------- /src/vfs/Makefile.am: -------------------------------------------------------------------------------- 1 | noinst_LTLIBRARIES = libmc-vfs.la 2 | 3 | AM_CPPFLAGS = $(GLIB_CFLAGS) -I$(top_srcdir) 4 | libmc_vfs_la_SOURCES = plugins_init.c plugins_init.h 5 | 6 | SUBDIRS = local 7 | libmc_vfs_la_LIBADD = local/libvfs-local.la 8 | 9 | if ENABLE_VFS_CPIO 10 | SUBDIRS += cpio 11 | libmc_vfs_la_LIBADD += cpio/libvfs-cpio.la 12 | endif 13 | 14 | if ENABLE_VFS_EXTFS 15 | SUBDIRS += extfs 16 | libmc_vfs_la_LIBADD += extfs/libvfs-extfs.la 17 | endif 18 | 19 | if ENABLE_VFS_SHELL 20 | SUBDIRS += shell 21 | libmc_vfs_la_LIBADD += shell/libvfs-shell.la 22 | endif 23 | 24 | if ENABLE_VFS_FTP 25 | SUBDIRS += ftpfs 26 | libmc_vfs_la_LIBADD += ftpfs/libvfs-ftpfs.la 27 | endif 28 | 29 | if ENABLE_VFS_SFTP 30 | SUBDIRS += sftpfs 31 | libmc_vfs_la_LIBADD += sftpfs/libvfs-sftpfs.la 32 | endif 33 | 34 | if ENABLE_VFS_SFS 35 | SUBDIRS += sfs 36 | libmc_vfs_la_LIBADD += sfs/libvfs-sfs.la 37 | endif 38 | 39 | if ENABLE_VFS_TAR 40 | SUBDIRS += tar 41 | libmc_vfs_la_LIBADD += tar/libvfs-tar.la 42 | endif 43 | 44 | if ENABLE_VFS_UNDELFS 45 | SUBDIRS += undelfs 46 | libmc_vfs_la_LIBADD += undelfs/libvfs-undelfs.la 47 | endif 48 | -------------------------------------------------------------------------------- /src/vfs/cpio/Makefile.am: -------------------------------------------------------------------------------- 1 | 2 | AM_CPPFLAGS = $(GLIB_CFLAGS) -I$(top_srcdir) 3 | 4 | noinst_LTLIBRARIES = libvfs-cpio.la 5 | 6 | libvfs_cpio_la_SOURCES = \ 7 | cpio.c cpio.h 8 | -------------------------------------------------------------------------------- /src/vfs/cpio/cpio.h: -------------------------------------------------------------------------------- 1 | #ifndef MC__VFS_CPIO_H 2 | #define MC__VFS_CPIO_H 3 | 4 | /*** typedefs(not structures) and defined constants **********************************************/ 5 | 6 | /*** enums ***************************************************************************************/ 7 | 8 | /*** structures declarations (and typedefs of structures)*****************************************/ 9 | 10 | /*** global variables defined in .c file *********************************************************/ 11 | 12 | /*** declarations of public functions ************************************************************/ 13 | 14 | void vfs_init_cpiofs (void); 15 | 16 | /*** inline functions ****************************************************************************/ 17 | 18 | #endif 19 | -------------------------------------------------------------------------------- /src/vfs/extfs/Makefile.am: -------------------------------------------------------------------------------- 1 | SUBDIRS = helpers 2 | DIST_SUBDIRS = helpers 3 | 4 | AM_CPPFLAGS = \ 5 | -DLIBEXECDIR=\""$(libexecdir)/@PACKAGE@/"\" \ 6 | $(GLIB_CFLAGS) \ 7 | -I$(top_srcdir) 8 | 9 | noinst_LTLIBRARIES = libvfs-extfs.la 10 | 11 | libvfs_extfs_la_SOURCES = \ 12 | extfs.c extfs.h 13 | -------------------------------------------------------------------------------- /src/vfs/extfs/extfs.h: -------------------------------------------------------------------------------- 1 | #ifndef MC__VFS_EXTFS_H 2 | #define MC__VFS_EXTFS_H 3 | 4 | /*** typedefs(not structures) and defined constants **********************************************/ 5 | 6 | /*** enums ***************************************************************************************/ 7 | 8 | /*** structures declarations (and typedefs of structures)*****************************************/ 9 | 10 | /*** global variables defined in .c file *********************************************************/ 11 | 12 | /*** declarations of public functions ************************************************************/ 13 | 14 | void vfs_init_extfs (void); 15 | 16 | /*** inline functions ****************************************************************************/ 17 | 18 | #endif 19 | -------------------------------------------------------------------------------- /src/vfs/extfs/helpers/.gitignore: -------------------------------------------------------------------------------- 1 | Makefile 2 | Makefile.in 3 | a+ 4 | apt+ 5 | audio 6 | deb 7 | deba 8 | debd 9 | dpkg+ 10 | hp48+ 11 | iso9660 12 | lslR 13 | mailfs 14 | patchfs 15 | rpms+ 16 | s3+ 17 | ualz 18 | uar 19 | uarj 20 | ucab 21 | uha 22 | ulha 23 | unar 24 | urar 25 | uwim 26 | uzip 27 | uzoo 28 | uace 29 | uarc 30 | ulib 31 | -------------------------------------------------------------------------------- /src/vfs/extfs/helpers/README.extfs: -------------------------------------------------------------------------------- 1 | # Each external VFS type must be registered in extfs.d directory if you want to use it. 2 | # Trailing plus means that the filesystem is not tied to a certain file. 3 | 4 | # Popular PC archivers 5 | uzip 6 | uzoo 7 | ulha 8 | urar 9 | uha 10 | u7z 11 | ualz 12 | # FIXME: for arj usage you need a special patch to unarj (see unarj.diff) 13 | uarj 14 | uarc 15 | uace 16 | 17 | # For cab files 18 | ucab 19 | 20 | # ar is used for static libraries 21 | uar 22 | 23 | # Packages from popular Linux distributions 24 | rpm 25 | deb 26 | 27 | # a+ - mtools filesystem 28 | a+ 29 | 30 | # For browsing lslR listings (found on many ftp sites) 31 | lslR 32 | 33 | # Hewlett Packard calculator 34 | hp48+ 35 | 36 | # Commodore 64/128 d64/D64 files 37 | uc1541 38 | 39 | # Break patches into chunks 40 | patchfs 41 | 42 | # Represents a mailbox as a directory 43 | mailfs 44 | 45 | # List all installed RPM packages on the system 46 | rpms+ 47 | trpm 48 | 49 | # dpkg frontend 50 | dpkg+ 51 | debd 52 | 53 | # apt frontend 54 | apt+ 55 | deba 56 | 57 | # Simple filesystem for audio cdroms. Use /dev/cdrom#audio (or /#audio) 58 | audio 59 | 60 | # Package of Bad Penguin (an Italian GNU/Linux distribution) 61 | bpp 62 | 63 | # ISO image 64 | iso9660 65 | 66 | # Amazon S3 67 | s3+ 68 | 69 | # git frontend 70 | gitfs - browse the git repo 71 | changesetfs - list of versions of current file 72 | patchsetfs - list of patches of current file 73 | 74 | # Gputils lib archives. 75 | ulib 76 | 77 | # PAK Archive 78 | unar 79 | -------------------------------------------------------------------------------- /src/vfs/extfs/helpers/bpp: -------------------------------------------------------------------------------- 1 | #! /bin/sh 2 | # 3 | # Written by Marco Ciampa 2000 4 | # (a simple cut & paste from rpm vfs) 5 | # (C) 1996 The Free Software Foundation. 6 | # 7 | # Package of a new italian distribution: Bad Penguin 8 | # https://www.badpenguin.org 9 | 10 | # override any locale for dates 11 | unset LC_ALL 12 | LC_TIME=C 13 | export LC_TIME 14 | 15 | mcbppfs_list () 16 | { 17 | FILEPREF="-r--r--r-- 1 0 0 " 18 | FIEXPREF="-r-xr-xr-x 1 0 0 " 19 | DATE=`date +"%b %d %H:%M"` 20 | set x `ls -l "$1"` 21 | size=$6 22 | echo "$FILEPREF $size $DATE CONTENTS.tar.gz" 23 | echo "$FIEXPREF 35 $DATE INSTALL" 24 | echo "$FIEXPREF 35 $DATE UPGRADE" 25 | } 26 | 27 | mcbppfs_copyout () 28 | { 29 | case "$2" in 30 | CONTENTS.tar.gz) cat "$1" > "$3"; exit 0;; 31 | INSTALL) echo "# Run this to install this package" > "$3"; exit 0;; 32 | UPGRADE) echo "# Run this to upgrade this package" > "$3"; exit 0;; 33 | esac 34 | } 35 | 36 | mcbppfs_run () 37 | { 38 | case "$2" in 39 | INSTALL) echo "Installing \"$1\""; package-setup --install "$1"; exit 0;; 40 | UPGRADE) echo "Upgrading \"$1\""; package-setup --update "$1"; exit 0;; 41 | esac 42 | } 43 | 44 | umask 077 45 | case "$1" in 46 | list) mcbppfs_list "$2"; exit 0;; 47 | copyout) mcbppfs_copyout "$2" "$3" "$4"; exit 0;; 48 | run) mcbppfs_run "$2" "$3"; exit 1;; 49 | esac 50 | exit 1 51 | -------------------------------------------------------------------------------- /src/vfs/extfs/helpers/gitfs+: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | LANG=C 4 | export LANG 5 | LC_TIME=C 6 | export LC_TIME 7 | 8 | umask 077 9 | prefix='[git]' 10 | 11 | gitfs_list() 12 | { 13 | DATE=`date +"%b %d %H:%M"` 14 | GIT_DIR="$2/.git" 15 | user=`whoami` 16 | git ls-files -v -c -m -d | sort -k 2 | uniq -f 1 | while read status fname 17 | do 18 | [ "$status" = "H" ] && status=" " 19 | [ "$status" = "C" ] && status="*" 20 | echo "-r--r--r-- 1 $user 0 0 $DATE `dirname $fname`/$prefix$status`basename $fname`" 21 | done 22 | } 23 | 24 | gitfs_copyout() 25 | { 26 | printf "%s\n" "$2" > "$4" 27 | b=`echo "$prefix"| wc -c` 28 | b=`expr "$b" + 1` 29 | # remove prefix from file name 30 | echo "`dirname "$3"`/`basename "$3" | tail -c+"$b"`" >> "$4" 31 | echo "git" >> "$4" 32 | } 33 | 34 | case "$1" in 35 | list) gitfs_list "$@" ;; 36 | copyout) gitfs_copyout "$@" ;; 37 | *) exit 1 ;; 38 | esac 39 | exit 0 40 | -------------------------------------------------------------------------------- /src/vfs/extfs/helpers/trpm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MidnightCommander/mc-old/4ff4d0df4eaa8fd380c56a453ab1ea519bd953bb/src/vfs/extfs/helpers/trpm -------------------------------------------------------------------------------- /src/vfs/extfs/helpers/ucab.in: -------------------------------------------------------------------------------- 1 | #! /bin/sh 2 | 3 | CAB=cabextract 4 | 5 | mccabfs_list () 6 | { 7 | $CAB -l "$1" | @AWK@ -v uid=`id -un` -v gid=`id -gn` ' 8 | BEGIN { flag=0 } 9 | /^-------/ { flag++; if (flag > 1) exit 0; next } 10 | { 11 | if (flag == 0) next 12 | if (length($6) == 0) next 13 | pr="-rw-r--r--" 14 | split($3, a, ".") 15 | split($4, b, ":") 16 | printf "%s 1 %s %s %d %02d/%02d/%02d %02d:%02d %s\n", pr, uid, gid, $1, a[2], a[1], a[3], b[1], b[2], $6 17 | }' 18 | 19 | } 20 | 21 | mccabfs_copyout () 22 | { 23 | $CAB -F "$2" -p "$1" > "$3" 24 | } 25 | 26 | LC_ALL=C 27 | export LC_ALL 28 | 29 | umask 077 30 | 31 | cmd="$1" 32 | 33 | case "$cmd" in 34 | # Workaround for a bug in mc - directories must precede files to 35 | # avoid duplicate entries, so we sort output by filenames 36 | list) mccabfs_list "$2" ;; 37 | copyout) mccabfs_copyout "$2" "$3" "$4" ;; 38 | *) exit 1 ;; 39 | esac 40 | exit 0 41 | -------------------------------------------------------------------------------- /src/vfs/extfs/helpers/uha.in: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # 3 | # It is the uhafs Valery Kornienkov vlk@st.simbirsk.su 2:5051/30@fidonet 4 | # ver 0.1 Thu Apr 6 12:05:08 2000 5 | # 6 | # Tested with HA 0.999. Source of ha can be found at 7 | # ftp://ftp.ibiblio.org/pub/Linux/utils/compress/ 8 | 9 | HA=ha 10 | 11 | mchafs_list () 12 | { 13 | $HA lf "$1" 2>/dev/null | @AWK@ -v uid=`id -ru` ' 14 | /^===========/ {next} 15 | { 16 | if ($5="%" && $8~/DIR|ASC|HSC|CPY/) { 17 | split($6, a, "-") 18 | split($7, t, ":") 19 | filename=$1 20 | filesize=$2 21 | getline 22 | if ($2=="(none)") $2="" 23 | path=$2 24 | getline 25 | if ($1~/^d.*/) next 26 | printf "%s %s %-8d %-8d %8d %s-%s-%s %s:%s %s%s\n",\ 27 | $1,1,0,0,filesize,a[3],a[2],a[1],t[1],t[2],path,filename 28 | } 29 | }' 30 | } 31 | 32 | mchafs_copyout () 33 | { 34 | TMPDIR=`mktemp -d "${MC_TMPDIR:-/tmp}/mctmpdir-uha.XXXXXX"` || exit 1 35 | cd "$TMPDIR" 36 | 37 | $HA xyq "$1" "$2" >/dev/null 38 | cat "$2" > "$3" 39 | 40 | cd / 41 | rm -rf "$TMPDIR" 42 | } 43 | 44 | cmd="$1" 45 | shift 46 | 47 | case "$cmd" in 48 | list) mchafs_list "$@" ;; 49 | copyout) mchafs_copyout "$@" ;; 50 | *) exit 1 ;; 51 | esac 52 | exit 0 53 | -------------------------------------------------------------------------------- /src/vfs/extfs/helpers/unar.in: -------------------------------------------------------------------------------- 1 | #! /bin/sh 2 | 3 | # Written by Ilia Maslakov 4 | # 5 | # (C) 2020 The Free Software Foundation. 6 | 7 | # Define awk 8 | AWK=@AWK@ 9 | 10 | # Define which archiver you are using with appropriate options 11 | UNAR_LIST="lsar " 12 | UNAR_GET="unar " 13 | 14 | # The 'list' command executive 15 | mc_unar_fs_list() 16 | { 17 | # List the contents of the archive and sort it out 18 | $UNAR_LIST -l "$1" | $AWK -v uid=`id -nu` -v gid=`id -ng` ' 19 | BEGIN { flag = 0 } 20 | /^\(Flags/ {next} 21 | /^\(Mode/ {next} 22 | { 23 | flag++; 24 | if (flag < 4) 25 | next 26 | pr="-r--r--r--" 27 | if (index($2, "D") != 0) 28 | pr="dr-xr-xr-x" 29 | split($6, a, "-") 30 | split($7, b, ":") 31 | printf "%s 1 %s %s %d %02d/%02d/%02d %02d:%02d %s\n", pr, uid, gid, $3, a[3], a[2], a[1], b[1], b[2], $8 32 | }' 33 | } 34 | 35 | # The 'copyout' command executive to copy displayed files to a destination 36 | mc_unar_fs_copyout () 37 | { 38 | TMPDIR=`mktemp -d "${MC_TMPDIR:-/tmp}/mctmpdir-uha.XXXXXX"` || exit 1 39 | 40 | $UNAR_GET "$1" "$2" -o "$TMPDIR" >/dev/null 41 | we=`basename "$1" | sed -E 's|^(.*?)\.\w+$|\1|'` 42 | cat "$TMPDIR/$we/$2" > "$3" 43 | cd / 44 | rm -rf "$TMPDIR" 45 | } 46 | 47 | # The main routine 48 | umask 077 49 | 50 | cmd="$1" 51 | shift 52 | 53 | case "$cmd" in 54 | list) mc_unar_fs_list "$@" ;; 55 | copyout) mc_unar_fs_copyout "$@" ;; 56 | *) exit 1 ;; 57 | esac 58 | 59 | exit 0 60 | -------------------------------------------------------------------------------- /src/vfs/ftpfs/Makefile.am: -------------------------------------------------------------------------------- 1 | 2 | AM_CPPFLAGS = $(GLIB_CFLAGS) -I$(top_srcdir) 3 | 4 | noinst_LTLIBRARIES = libvfs-ftpfs.la 5 | 6 | libvfs_ftpfs_la_SOURCES = \ 7 | ftpfs.c ftpfs.h \ 8 | ftpfs_parse_ls.c -------------------------------------------------------------------------------- /src/vfs/local/Makefile.am: -------------------------------------------------------------------------------- 1 | 2 | AM_CPPFLAGS = $(GLIB_CFLAGS) -I$(top_srcdir) 3 | 4 | noinst_LTLIBRARIES = libvfs-local.la 5 | 6 | libvfs_local_la_SOURCES = \ 7 | local.c local.h 8 | -------------------------------------------------------------------------------- /src/vfs/local/local.h: -------------------------------------------------------------------------------- 1 | /** 2 | * \file 3 | * \brief Header: local FS 4 | */ 5 | 6 | #ifndef MC__VFS_LOCAL_H 7 | #define MC__VFS_LOCAL_H 8 | 9 | #include "lib/vfs/vfs.h" 10 | 11 | /*** typedefs(not structures) and defined constants **********************************************/ 12 | 13 | /*** enums ***************************************************************************************/ 14 | 15 | /*** structures declarations (and typedefs of structures)*****************************************/ 16 | 17 | /*** global variables defined in .c file *********************************************************/ 18 | 19 | /*** declarations of public functions ************************************************************/ 20 | 21 | extern void vfs_init_localfs (void); 22 | 23 | /* these functions are used by other filesystems, so they are 24 | * published here. */ 25 | extern int local_close (void *data); 26 | extern ssize_t local_read (void *data, char *buffer, size_t count); 27 | extern int local_fstat (void *data, struct stat *buf); 28 | extern int local_errno (struct vfs_class *me); 29 | extern off_t local_lseek (void *data, off_t offset, int whence); 30 | 31 | /*** inline functions ****************************************************************************/ 32 | #endif 33 | -------------------------------------------------------------------------------- /src/vfs/plugins_init.h: -------------------------------------------------------------------------------- 1 | #ifndef MC__VFS_PLUINS_INIT_H 2 | #define MC__VFS_PLUINS_INIT_H 3 | 4 | /*** typedefs(not structures) and defined constants **********************************************/ 5 | 6 | /*** enums ***************************************************************************************/ 7 | 8 | /*** structures declarations (and typedefs of structures)*****************************************/ 9 | 10 | /*** global variables defined in .c file *********************************************************/ 11 | 12 | /*** declarations of public functions ************************************************************/ 13 | 14 | void vfs_plugins_init (void); 15 | 16 | /*** inline functions ****************************************************************************/ 17 | 18 | #endif 19 | -------------------------------------------------------------------------------- /src/vfs/sfs/Makefile.am: -------------------------------------------------------------------------------- 1 | 2 | AM_CPPFLAGS = $(GLIB_CFLAGS) -I$(top_srcdir) 3 | 4 | noinst_LTLIBRARIES = libvfs-sfs.la 5 | 6 | libvfs_sfs_la_SOURCES = \ 7 | sfs.c sfs.h 8 | 9 | SFSCONFFILES = sfs.ini 10 | 11 | if ENABLE_VFS_SFS 12 | sfsconfdir = $(sysconfdir)/@PACKAGE@ 13 | sfsconf_DATA = $(SFSCONFFILES) 14 | endif 15 | 16 | EXTRA_DIST = $(SFSCONFFILES) 17 | -------------------------------------------------------------------------------- /src/vfs/sfs/sfs.h: -------------------------------------------------------------------------------- 1 | #ifndef MC__VFS_SFS_H 2 | #define MC__VFS_SFS_H 3 | 4 | /*** typedefs(not structures) and defined constants **********************************************/ 5 | 6 | /*** enums ***************************************************************************************/ 7 | 8 | /*** structures declarations (and typedefs of structures)*****************************************/ 9 | 10 | /*** global variables defined in .c file *********************************************************/ 11 | 12 | /*** declarations of public functions ************************************************************/ 13 | 14 | void vfs_init_sfs (void); 15 | 16 | /*** inline functions ****************************************************************************/ 17 | 18 | #endif 19 | -------------------------------------------------------------------------------- /src/vfs/sfs/sfs.ini: -------------------------------------------------------------------------------- 1 | # 2 | # This is config for Single File fileSystem 3 | # 4 | # Notice that output files (%3) are pre-created atomically in /tmp 5 | # with 0600 rights, so it is safe to > %3 6 | # 7 | gz/1 gzip < %1 > %3 8 | ugz/1 gzip -cdf < %1 > %3 9 | bz/1 bzip < %1 > %3 10 | ubz/1 bzip -d < %1 > %3 11 | bz2/1 bzip2 < %1 > %3 12 | ubz2/1 bzip2 -d < %1 > %3 13 | lz/1 lzip < %1 > %3 14 | ulz/1 lzip -d < %1 > %3 15 | lz4/1 lz4 < %1 > %3 16 | ulz4/1 lz4 -d < %1 > %3 17 | lzma/1 lzma < %1 > %3 18 | ulzma/1 lzma -d < %1 > %3 19 | lzo/1 lzop < %1 > %3 20 | ulzo/1 lzop -d < %1 > %3 21 | xz/1 xz < %1 > %3 22 | uxz/1 xz -d < %1 > %3 23 | zst/1 zstd < %1 > %3 24 | uzst/1 zstd -d < %1 > %3 25 | tar/1 tar cf %3 %1 26 | tgz/1 tar czf %3 %1 27 | uhtml/1 lynx -force_html -dump %1 > %3 28 | uman/1 groff -Tascii -man %1 > %3 29 | uue/1 uuenpipe < %1 > %3 30 | uude/1 uudepipe < %1 > %3 31 | crlf/1 todos < %1 > %3 32 | cr/1 fromdos < %1 > %3 33 | # Fixme: we need it to fail whenever it should 34 | url:2 lynx -source `echo "%2" | sed 's-|-/-g'` > %3 35 | nop/1 cat %1 > %3 36 | strings/1 strings %1 > %3 37 | -------------------------------------------------------------------------------- /src/vfs/sftpfs/Makefile.am: -------------------------------------------------------------------------------- 1 | 2 | AM_CPPFLAGS = $(GLIB_CFLAGS) -I$(top_srcdir) $(LIBSSH_CFLAGS) 3 | 4 | noinst_LTLIBRARIES = libvfs-sftpfs.la 5 | 6 | libvfs_sftpfs_la_SOURCES = \ 7 | config_parser.c \ 8 | connection.c \ 9 | dir.c \ 10 | file.c \ 11 | internal.c internal.h \ 12 | sftpfs.c sftpfs.h 13 | -------------------------------------------------------------------------------- /src/vfs/sftpfs/sftpfs.h: -------------------------------------------------------------------------------- 1 | /** 2 | * \file 3 | * \brief Header: SFTP FS 4 | */ 5 | 6 | #ifndef MC__VFS_SFTPFS_H 7 | #define MC__VFS_SFTPFS_H 8 | 9 | /*** typedefs(not structures) and defined constants **********************************************/ 10 | 11 | /*** enums ***************************************************************************************/ 12 | 13 | /*** structures declarations (and typedefs of structures)*****************************************/ 14 | 15 | /*** global variables defined in .c file *********************************************************/ 16 | 17 | /*** declarations of public functions ************************************************************/ 18 | 19 | void vfs_init_sftpfs (void); 20 | 21 | /*** inline functions ****************************************************************************/ 22 | 23 | #endif 24 | -------------------------------------------------------------------------------- /src/vfs/shell/Makefile.am: -------------------------------------------------------------------------------- 1 | SUBDIRS = helpers 2 | DIST_SUBDIRS = helpers 3 | 4 | AM_CPPFLAGS = \ 5 | -DLIBEXECDIR=\""$(libexecdir)/@PACKAGE@/"\" \ 6 | $(GLIB_CFLAGS) \ 7 | -I$(top_srcdir) 8 | 9 | noinst_LTLIBRARIES = libvfs-shell.la 10 | 11 | libvfs_shell_la_SOURCES = \ 12 | shell.c shell.h \ 13 | shelldef.h 14 | -------------------------------------------------------------------------------- /src/vfs/shell/helpers/Makefile.am: -------------------------------------------------------------------------------- 1 | shelldir = $(libexecdir)/@PACKAGE@/shell 2 | 3 | # Files to install and distribute other than shell scripts 4 | SHELL_MISC = README.shell 5 | 6 | # Install and distribute SHELL helper scripts w/o shebang & executable bit as data 7 | shell_DATA = $(SHELL_MISC) ls mkdir fexists unlink chown chmod rmdir ln mv hardlink get send append info utime 8 | shellconfdir = $(sysconfdir)/@PACKAGE@ 9 | 10 | EXTRA_DIST = $(shell_DATA) 11 | -------------------------------------------------------------------------------- /src/vfs/shell/helpers/append: -------------------------------------------------------------------------------- 1 | FILENAME="/${SHELL_FILENAME}" 2 | echo "### 001" 3 | { 4 | bss=4096 5 | bsl=4095 6 | if [ $SHELL_FILESIZE -lt $bss ]; then 7 | bss=1; 8 | bsl=0; 9 | fi 10 | while [ $SHELL_FILESIZE -gt 0 ]; do 11 | cnt=`expr \\( $SHELL_FILESIZE + $bsl \\) / $bss` 12 | n=`dd bs=$bss count=$cnt | tee -a "${FILENAME}" | wc -c` 13 | SHELL_FILESIZE=`expr $SHELL_FILESIZE - $n` 14 | done 15 | }; echo "### 200" 16 | -------------------------------------------------------------------------------- /src/vfs/shell/helpers/chmod: -------------------------------------------------------------------------------- 1 | if chmod ${SHELL_FILEMODE} "/${SHELL_FILENAME}" 2>/dev/null; then 2 | echo "### 000" 3 | else 4 | echo "### 500" 5 | fi 6 | -------------------------------------------------------------------------------- /src/vfs/shell/helpers/chown: -------------------------------------------------------------------------------- 1 | if chown ${SHELL_FILEOWNER}:${SHELL_FILEGROUP} "/${SHELL_FILENAME}" ; then 2 | echo "### 000" 3 | else 4 | echo "### 500" 5 | fi 6 | -------------------------------------------------------------------------------- /src/vfs/shell/helpers/fexists: -------------------------------------------------------------------------------- 1 | ls -l "/${SHELL_FILENAME}" >/dev/null 2>/dev/null 2 | echo '### '$? 3 | -------------------------------------------------------------------------------- /src/vfs/shell/helpers/hardlink: -------------------------------------------------------------------------------- 1 | FILEFROM="/${SHELL_FILEFROM}" 2 | FILETO="/${SHELL_FILETO}" 3 | if ln "${FILEFROM}" "${FILETO}" 2>/dev/null; then 4 | echo "### 000" 5 | else 6 | echo "### 500" 7 | fi 8 | -------------------------------------------------------------------------------- /src/vfs/shell/helpers/info: -------------------------------------------------------------------------------- 1 | LC_TIME=C 2 | export LC_TIME 3 | #SHELL_HAVE_HEAD 1 4 | #SHELL_HAVE_SED 2 5 | #SHELL_HAVE_AWK 4 6 | #SHELL_HAVE_PERL 8 7 | #SHELL_HAVE_LSQ 16 8 | #SHELL_HAVE_DATE_MDYT 32 9 | #SHELL_HAVE_TAIL 64 10 | res=0 11 | if `echo yes| head -c 1 > /dev/null 2>&1` ; then 12 | res=`expr $res + 1` 13 | fi 14 | if `echo 1 | sed 's/1/2/' >/dev/null 2>&1` ; then 15 | res=`expr $res + 2` 16 | fi 17 | if `echo 1| awk '{print}' > /dev/null 2>&1` ; then 18 | res=`expr $res + 4` 19 | fi 20 | if `perl -v > /dev/null 2>&1` ; then 21 | res=`expr $res + 8` 22 | fi 23 | if `ls -Q / >/dev/null 2>&1` ; then 24 | res=`expr $res + 16` 25 | fi 26 | dat=`ls -lan / 2>/dev/null | head -n 3 | ( 27 | while read p l u g s rec; do 28 | if [ -n "$g" ]; then 29 | if [ -n "$l" ]; then 30 | echo "$rec" 31 | fi 32 | fi 33 | done 34 | )` 35 | dat=`echo $dat | cut -c1 2>/dev/null` 36 | r=`echo "0123456789"| grep "$dat"` 37 | if [ -z "$r" ]; then 38 | res=`expr $res + 32` 39 | fi 40 | if `echo yes| tail -c +1 - > /dev/null 2>&1` ; then 41 | res=`expr $res + 64` 42 | fi 43 | echo $res 44 | echo "### 200" 45 | -------------------------------------------------------------------------------- /src/vfs/shell/helpers/ln: -------------------------------------------------------------------------------- 1 | FILEFROM="${SHELL_FILEFROM}" 2 | FILETO="/${SHELL_FILETO}" 3 | if ln -s "${FILEFROM}" "${FILETO}" 2>/dev/null; then 4 | echo "### 000" 5 | else 6 | echo "### 500" 7 | fi 8 | -------------------------------------------------------------------------------- /src/vfs/shell/helpers/mkdir: -------------------------------------------------------------------------------- 1 | if mkdir "/$SHELL_FILENAME" 2>/dev/null; then 2 | echo "### 000" 3 | else 4 | echo "### 500" 5 | fi 6 | -------------------------------------------------------------------------------- /src/vfs/shell/helpers/mv: -------------------------------------------------------------------------------- 1 | if mv "/${SHELL_FILEFROM}" "/${SHELL_FILETO}" 2>/dev/null; then 2 | echo "### 000" 3 | else 4 | echo "### 500" 5 | fi 6 | -------------------------------------------------------------------------------- /src/vfs/shell/helpers/rmdir: -------------------------------------------------------------------------------- 1 | if rmdir "/${SHELL_FILENAME}" 2>/dev/null; then 2 | echo "### 000" 3 | else 4 | echo "### 500" 5 | fi 6 | -------------------------------------------------------------------------------- /src/vfs/shell/helpers/send: -------------------------------------------------------------------------------- 1 | FILENAME="/${SHELL_FILENAME}" 2 | echo "### 001" 3 | { 4 | > "${FILENAME}" 5 | bss=4096 6 | bsl=4095 7 | if [ $SHELL_FILESIZE -lt $bss ]; then 8 | bss=1; 9 | bsl=0; 10 | fi 11 | while [ $SHELL_FILESIZE -gt 0 ]; do 12 | cnt=`expr \\( $SHELL_FILESIZE + $bsl \\) / $bss` 13 | n=`dd bs=$bss count=$cnt | tee -a "${FILENAME}" | wc -c` 14 | SHELL_FILESIZE=`expr $SHELL_FILESIZE - $n` 15 | done 16 | }; echo "### 200" 17 | -------------------------------------------------------------------------------- /src/vfs/shell/helpers/unlink: -------------------------------------------------------------------------------- 1 | if rm -f "/${SHELL_FILENAME}" 2>/dev/null; then 2 | echo "### 000" 3 | else 4 | echo "### 500" 5 | fi 6 | -------------------------------------------------------------------------------- /src/vfs/shell/helpers/utime: -------------------------------------------------------------------------------- 1 | if TZ=UTC touch -h -m -d "$SHELL_TOUCHMTIME_W_NSEC" "/${SHELL_FILENAME}" 2>/dev/null && \ 2 | TZ=UTC touch -h -a -d "$SHELL_TOUCHATIME_W_NSEC" "/${SHELL_FILENAME}" 2>/dev/null; then 3 | echo "### 000" 4 | elif TZ=UTC touch -h -m -t $SHELL_TOUCHMTIME "/${SHELL_FILENAME}" 2>/dev/null && \ 5 | TZ=UTC touch -h -a -t $SHELL_TOUCHATIME "/${SHELL_FILENAME}" 2>/dev/null; then 6 | echo "### 000" 7 | elif [ -n "$SHELL_HAVE_PERL" ] && 8 | perl -e 'utime '$SHELL_FILEATIME','$SHELL_FILEMTIME',@ARGV;' "/${SHELL_FILENAME}" 2>/dev/null; then 9 | echo "### 000" 10 | else 11 | echo "### 500" 12 | fi 13 | -------------------------------------------------------------------------------- /src/vfs/shell/shell.h: -------------------------------------------------------------------------------- 1 | 2 | /** 3 | * \file 4 | * \brief Header: Virtual File System: SHELL implementation for transferring files over 5 | * shell connections 6 | */ 7 | 8 | #ifndef MC__VFS_SHELL_H 9 | #define MC__VFS_SHELL_H 10 | 11 | /*** typedefs(not structures) and defined constants **********************************************/ 12 | 13 | /*** enums ***************************************************************************************/ 14 | 15 | /*** structures declarations (and typedefs of structures)*****************************************/ 16 | 17 | /*** global variables defined in .c file *********************************************************/ 18 | 19 | extern int shell_directory_timeout; 20 | 21 | /*** declarations of public functions ************************************************************/ 22 | 23 | void vfs_init_shell (void); 24 | 25 | /*** inline functions ****************************************************************************/ 26 | 27 | #endif 28 | -------------------------------------------------------------------------------- /src/vfs/tar/Makefile.am: -------------------------------------------------------------------------------- 1 | 2 | AM_CPPFLAGS = $(GLIB_CFLAGS) -I$(top_srcdir) 3 | 4 | noinst_LTLIBRARIES = libvfs-tar.la 5 | 6 | libvfs_tar_la_SOURCES = \ 7 | tar-internal.c tar-internal.h \ 8 | tar-sparse.c \ 9 | tar-xheader.c \ 10 | tar.c tar.h 11 | -------------------------------------------------------------------------------- /src/vfs/tar/tar.h: -------------------------------------------------------------------------------- 1 | #ifndef MC__VFS_TAR_H 2 | #define MC__VFS_TAR_H 3 | 4 | /*** typedefs(not structures) and defined constants **********************************************/ 5 | 6 | /*** enums ***************************************************************************************/ 7 | 8 | /*** structures declarations (and typedefs of structures)*****************************************/ 9 | 10 | /*** global variables defined in .c file *********************************************************/ 11 | 12 | /*** declarations of public functions ************************************************************/ 13 | 14 | void vfs_init_tarfs (void); 15 | 16 | /*** inline functions ****************************************************************************/ 17 | 18 | #endif 19 | -------------------------------------------------------------------------------- /src/vfs/undelfs/Makefile.am: -------------------------------------------------------------------------------- 1 | 2 | AM_CPPFLAGS = $(GLIB_CFLAGS) -I$(top_srcdir) 3 | 4 | noinst_LTLIBRARIES = libvfs-undelfs.la 5 | 6 | libvfs_undelfs_la_SOURCES = \ 7 | undelfs.c undelfs.h 8 | -------------------------------------------------------------------------------- /src/vfs/undelfs/undelfs.h: -------------------------------------------------------------------------------- 1 | #ifndef MC__VFS_UNDELFS_H 2 | #define MC__VFS_UNDELFS_H 3 | 4 | /*** typedefs(not structures) and defined constants **********************************************/ 5 | 6 | /*** enums ***************************************************************************************/ 7 | 8 | /*** structures declarations (and typedefs of structures)*****************************************/ 9 | 10 | /*** global variables defined in .c file *********************************************************/ 11 | 12 | /*** declarations of public functions ************************************************************/ 13 | 14 | void vfs_init_undelfs (void); 15 | 16 | /*** inline functions ****************************************************************************/ 17 | 18 | #endif 19 | -------------------------------------------------------------------------------- /src/viewer/Makefile.am: -------------------------------------------------------------------------------- 1 | 2 | noinst_LTLIBRARIES = libmcviewer.la 3 | 4 | libmcviewer_la_SOURCES = \ 5 | actions_cmd.c \ 6 | ascii.c \ 7 | coord_cache.c \ 8 | datasource.c \ 9 | dialogs.c \ 10 | display.c \ 11 | growbuf.c \ 12 | hex.c \ 13 | internal.h \ 14 | lib.c \ 15 | mcviewer.c \ 16 | mcviewer.h \ 17 | move.c \ 18 | nroff.c \ 19 | search.c 20 | 21 | AM_CPPFLAGS = -I$(top_srcdir) $(GLIB_CFLAGS) 22 | -------------------------------------------------------------------------------- /tests/Makefile.am: -------------------------------------------------------------------------------- 1 | SUBDIRS = lib src 2 | 3 | EXTRA_DIST = mctest.h README 4 | -------------------------------------------------------------------------------- /tests/README: -------------------------------------------------------------------------------- 1 | Overview 2 | -------- 3 | 4 | This tree contains unit tests. 5 | 6 | To compile and run the tests, do 'make check' (either in the top folder, 7 | or just in the folder containing the tests you're interested in). 8 | 9 | IMPORTANT: To compile the tests, you need to have the "Check" unit 10 | testing framework[1] installed.[2] If you have it installed, you will see 11 | "Unit tests: yes" in configure's summary message; if you don't see this 12 | message, you won't be able to compile the tests.[3] 13 | 14 | Tips and tricks 15 | --------------- 16 | 17 | * To be able to step with the debugger into test code, see [4]. E.g., do: 18 | 19 | $ export CK_FORK=no 20 | 21 | [1]: https://libcheck.github.io/check/ 22 | [2]: Your package manager likely has it. 23 | [3]: Actually, some tests (like src/vfs/extfs/helpers-list) don't use 24 | this framework and will compile just fine. But that's the exception. 25 | [4]: https://stackoverflow.com/questions/1649814/debugging-unit-test-in-c-using-check 26 | -------------------------------------------------------------------------------- /tests/lib/Makefile.am: -------------------------------------------------------------------------------- 1 | PACKAGE_STRING = "/lib" 2 | 3 | SUBDIRS = . mcconfig search strutil vfs widget 4 | 5 | AM_CPPFLAGS = $(GLIB_CFLAGS) -I$(top_srcdir) @CHECK_CFLAGS@ 6 | 7 | LIBS = @CHECK_LIBS@ \ 8 | $(top_builddir)/lib/libmc.la 9 | 10 | if ENABLE_MCLIB 11 | LIBS += $(GLIB_LIBS) \ 12 | @E2P_LIBS@ 13 | endif 14 | 15 | EXTRA_DIST = utilunix__my_system-common.c 16 | 17 | TESTS = \ 18 | library_independ \ 19 | mc_build_filename \ 20 | name_quote \ 21 | serialize \ 22 | utilunix__mc_pstream_get_string \ 23 | utilunix__my_system_fork_fail \ 24 | utilunix__my_system_fork_child_shell \ 25 | utilunix__my_system_fork_child \ 26 | x_basename 27 | 28 | if CHARSET 29 | TESTS += mc_realpath 30 | endif 31 | 32 | check_PROGRAMS = $(TESTS) 33 | 34 | library_independ_SOURCES = \ 35 | library_independ.c 36 | 37 | mc_build_filename_SOURCES = \ 38 | mc_build_filename.c 39 | 40 | mc_realpath_SOURCES = \ 41 | mc_realpath.c 42 | 43 | name_quote_SOURCES = \ 44 | name_quote.c 45 | 46 | serialize_SOURCES = \ 47 | serialize.c 48 | 49 | utilunix__mc_pstream_get_string_SOURCES = \ 50 | utilunix__mc_pstream_get_string.c 51 | 52 | utilunix__my_system_fork_fail_SOURCES = \ 53 | utilunix__my_system-fork_fail.c 54 | 55 | utilunix__my_system_fork_child_shell_SOURCES = \ 56 | utilunix__my_system-fork_child_shell.c 57 | 58 | utilunix__my_system_fork_child_SOURCES = \ 59 | utilunix__my_system-fork_child.c 60 | 61 | x_basename_SOURCES = \ 62 | x_basename.c 63 | 64 | -------------------------------------------------------------------------------- /tests/lib/mcconfig/Makefile.am: -------------------------------------------------------------------------------- 1 | PACKAGE_STRING = "/lib/mcconfig" 2 | 3 | AM_CPPFLAGS = \ 4 | -DWORKDIR=\"$(abs_builddir)\" \ 5 | $(GLIB_CFLAGS) \ 6 | -I$(top_srcdir) \ 7 | @CHECK_CFLAGS@ 8 | 9 | LIBS = @CHECK_LIBS@ \ 10 | $(top_builddir)/lib/libmc.la 11 | 12 | if ENABLE_MCLIB 13 | LIBS += $(GLIB_LIBS) \ 14 | @E2P_LIBS@ 15 | endif 16 | 17 | TESTS = \ 18 | config_string \ 19 | user_configs_path 20 | 21 | check_PROGRAMS = $(TESTS) 22 | 23 | config_string_SOURCES = \ 24 | config_string.c 25 | 26 | user_configs_path_SOURCES = \ 27 | user_configs_path.c 28 | -------------------------------------------------------------------------------- /tests/lib/search/Makefile.am: -------------------------------------------------------------------------------- 1 | PACKAGE_STRING = "/lib/search" 2 | 3 | AM_CPPFLAGS = \ 4 | $(GLIB_CFLAGS) \ 5 | -I$(top_srcdir) \ 6 | -I$(top_srcdir)/lib/search \ 7 | @CHECK_CFLAGS@ 8 | 9 | LIBS = @CHECK_LIBS@ \ 10 | $(top_builddir)/lib/libmc.la 11 | 12 | if ENABLE_MCLIB 13 | LIBS += $(GLIB_LIBS) 14 | endif 15 | 16 | TESTS = \ 17 | glob_prepare_replace_str \ 18 | glob_translate_to_regex \ 19 | hex_translate_to_regex \ 20 | regex_replace_esc_seq \ 21 | regex_process_escape_sequence \ 22 | translate_replace_glob_to_regex 23 | 24 | check_PROGRAMS = $(TESTS) 25 | 26 | glob_prepare_replace_str_SOURCES = \ 27 | glob_prepare_replace_str.c 28 | 29 | regex_replace_esc_seq_SOURCES = \ 30 | regex_replace_esc_seq.c 31 | 32 | regex_process_escape_sequence_SOURCES = \ 33 | regex_process_escape_sequence.c 34 | 35 | translate_replace_glob_to_regex_SOURCES = \ 36 | translate_replace_glob_to_regex.c 37 | 38 | glob_translate_to_regex_SOURCES = \ 39 | glob_translate_to_regex.c 40 | 41 | hex_translate_to_regex_SOURCES = \ 42 | hex_translate_to_regex.c 43 | -------------------------------------------------------------------------------- /tests/lib/strutil/Makefile.am: -------------------------------------------------------------------------------- 1 | PACKAGE_STRING = "/lib/strutil" 2 | 3 | AM_CPPFLAGS = \ 4 | $(GLIB_CFLAGS) \ 5 | -I$(top_srcdir) \ 6 | @CHECK_CFLAGS@ 7 | 8 | LIBS = @CHECK_LIBS@ \ 9 | $(top_builddir)/lib/libmc.la 10 | 11 | if ENABLE_MCLIB 12 | LIBS += $(GLIB_LIBS) 13 | endif 14 | 15 | TESTS = \ 16 | parse_integer \ 17 | str_replace_all \ 18 | str_verscmp \ 19 | str_rstrip_eol \ 20 | filevercmp 21 | 22 | check_PROGRAMS = $(TESTS) 23 | 24 | parse_integer_SOURCES = \ 25 | parse_integer.c 26 | 27 | str_replace_all_SOURCES = \ 28 | str_replace_all.c 29 | 30 | str_verscmp_SOURCES = \ 31 | str_verscmp.c 32 | 33 | str_rstrip_eol_SOURCES = \ 34 | str_rstrip_eol.c 35 | 36 | filevercmp_SOURCES = \ 37 | filevercmp.c 38 | -------------------------------------------------------------------------------- /tests/lib/vfs/mc.charsets.in: -------------------------------------------------------------------------------- 1 | ASCII 7-bit ASCII 2 | @ENCODING_CP866@ CP 866 3 | KOI8-R KOI8-R 4 | KOI8-U KOI8-U 5 | UTF-8 UTF-8 6 | -------------------------------------------------------------------------------- /tests/lib/widget/Makefile.am: -------------------------------------------------------------------------------- 1 | PACKAGE_STRING = "/lib/widget" 2 | 3 | AM_CPPFLAGS = \ 4 | $(GLIB_CFLAGS) \ 5 | -I$(top_srcdir) \ 6 | -I$(top_srcdir)/lib/vfs \ 7 | @CHECK_CFLAGS@ 8 | 9 | LIBS = @CHECK_LIBS@ \ 10 | $(top_builddir)/lib/libmc.la 11 | 12 | if ENABLE_MCLIB 13 | LIBS += $(GLIB_LIBS) 14 | endif 15 | 16 | TESTS = \ 17 | complete_engine \ 18 | hotkey_equal \ 19 | group_init_destroy \ 20 | widget_find_by_id \ 21 | widget_make_global_local 22 | 23 | check_PROGRAMS = $(TESTS) 24 | 25 | complete_engine_SOURCES = \ 26 | complete_engine.c 27 | 28 | hotkey_equal_SOURCES = \ 29 | hotkey_equal.c 30 | 31 | group_init_destroy_SOURCES = \ 32 | group_init_destroy.c 33 | 34 | widget_find_by_id_SOURCES = \ 35 | widget_find_by_id.c 36 | 37 | widget_make_global_local_SOURCES = \ 38 | widget_make_global_local.c 39 | -------------------------------------------------------------------------------- /tests/src/Makefile.am: -------------------------------------------------------------------------------- 1 | PACKAGE_STRING = "/src" 2 | 3 | SUBDIRS = . filemanager vfs 4 | 5 | if USE_INTERNAL_EDIT 6 | SUBDIRS += editor 7 | endif 8 | 9 | AM_CPPFLAGS = \ 10 | $(GLIB_CFLAGS) \ 11 | -I$(top_srcdir) \ 12 | -I$(top_srcdir)/lib/vfs \ 13 | @CHECK_CFLAGS@ 14 | 15 | LIBS = @CHECK_LIBS@ \ 16 | $(top_builddir)/src/libinternal.la \ 17 | $(top_builddir)/lib/libmc.la 18 | 19 | if ENABLE_MCLIB 20 | LIBS += $(GLIB_LIBS) 21 | endif 22 | 23 | EXTRA_DIST = execute__common.c 24 | 25 | TESTS = \ 26 | execute__execute_with_vfs_arg \ 27 | execute__execute_external_editor_or_viewer \ 28 | execute__execute_get_external_cmd_opts_from_config 29 | 30 | check_PROGRAMS = $(TESTS) 31 | 32 | execute__execute_with_vfs_arg_SOURCES = \ 33 | execute__execute_with_vfs_arg.c 34 | 35 | 36 | execute__execute_external_editor_or_viewer_SOURCES = \ 37 | execute__execute_external_editor_or_viewer.c 38 | 39 | 40 | execute__execute_get_external_cmd_opts_from_config_SOURCES = \ 41 | execute__execute_get_external_cmd_opts_from_config.c 42 | 43 | -------------------------------------------------------------------------------- /tests/src/editor/Makefile.am: -------------------------------------------------------------------------------- 1 | PACKAGE_STRING = "/src/editor" 2 | 3 | AM_CPPFLAGS = \ 4 | -DTEST_SHARE_DIR=\"$(abs_srcdir)\" \ 5 | $(GLIB_CFLAGS) \ 6 | -I$(top_srcdir) \ 7 | @CHECK_CFLAGS@ 8 | 9 | LIBS = @CHECK_LIBS@ \ 10 | $(top_builddir)/src/libinternal.la \ 11 | $(top_builddir)/lib/libmc.la 12 | 13 | if ENABLE_MCLIB 14 | LIBS += $(GLIB_LIBS) 15 | endif 16 | 17 | EXTRA_DIST = mc.charsets test-data.txt.in 18 | 19 | TESTS = \ 20 | edit_complete_word_cmd \ 21 | edit_replace_cmd 22 | 23 | check_PROGRAMS = $(TESTS) 24 | 25 | edit_complete_word_cmd_SOURCES = \ 26 | edit_complete_word_cmd.c 27 | 28 | edit_replace_cmd_SOURCES = \ 29 | edit_replace_cmd.c 30 | 31 | -------------------------------------------------------------------------------- /tests/src/editor/mc.charsets: -------------------------------------------------------------------------------- 1 | KOI8-R KOI8-R 2 | UTF-8 UTF-8 3 | -------------------------------------------------------------------------------- /tests/src/editor/test-data.txt.in: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MidnightCommander/mc-old/4ff4d0df4eaa8fd380c56a453ab1ea519bd953bb/tests/src/editor/test-data.txt.in -------------------------------------------------------------------------------- /tests/src/filemanager/Makefile.am: -------------------------------------------------------------------------------- 1 | PACKAGE_STRING = "/src/filemanager" 2 | 3 | AM_CPPFLAGS = \ 4 | $(GLIB_CFLAGS) \ 5 | -I$(top_srcdir) \ 6 | -I$(top_srcdir)/lib/vfs \ 7 | -DTEST_SHARE_DIR=\"$(abs_srcdir)\" \ 8 | @CHECK_CFLAGS@ 9 | 10 | LIBS = @CHECK_LIBS@ \ 11 | $(top_builddir)/src/libinternal.la \ 12 | $(top_builddir)/lib/libmc.la 13 | 14 | if ENABLE_MCLIB 15 | LIBS += $(GLIB_LIBS) 16 | endif 17 | 18 | EXTRA_DIST = hints/mc.hint 19 | 20 | TESTS = \ 21 | cd_to \ 22 | examine_cd \ 23 | exec_get_export_variables_ext \ 24 | filegui_is_wildcarded \ 25 | get_random_hint 26 | 27 | check_PROGRAMS = $(TESTS) 28 | 29 | cd_to_SOURCES = \ 30 | cd_to.c 31 | 32 | examine_cd_SOURCES = \ 33 | examine_cd.c 34 | 35 | exec_get_export_variables_ext_SOURCES = \ 36 | exec_get_export_variables_ext.c 37 | 38 | get_random_hint_SOURCES = \ 39 | get_random_hint.c 40 | 41 | filegui_is_wildcarded_SOURCES = \ 42 | filegui_is_wildcarded.c 43 | -------------------------------------------------------------------------------- /tests/src/filemanager/hints/mc.hint: -------------------------------------------------------------------------------- 1 | Para_1 2 | 3 | Para_2_line_1 4 | Para_2_line_2 5 | 6 | 7 | Para_3 8 | 9 | P 10 | A 11 | R 12 | A 13 | _ 14 | 4 15 | -------------------------------------------------------------------------------- /tests/src/vfs/Makefile.am: -------------------------------------------------------------------------------- 1 | 2 | SUBDIRS = 3 | 4 | if ENABLE_VFS_EXTFS 5 | SUBDIRS += extfs 6 | endif 7 | 8 | if ENABLE_VFS_FTP 9 | SUBDIRS += ftpfs 10 | endif 11 | -------------------------------------------------------------------------------- /tests/src/vfs/extfs/Makefile.am: -------------------------------------------------------------------------------- 1 | 2 | SUBDIRS = helpers-list 3 | -------------------------------------------------------------------------------- /tests/src/vfs/extfs/helpers-list/README.css.inc: -------------------------------------------------------------------------------- 1 | 24 | -------------------------------------------------------------------------------- /tests/src/vfs/extfs/helpers-list/data/config.sh.in: -------------------------------------------------------------------------------- 1 | # 2 | # Configure-time parameters that may be useful in tests. 3 | # 4 | # See README for how to use this file. 5 | # 6 | PERL="@PERL@" 7 | AWK="@AWK@" 8 | PYTHON="@PYTHON@" 9 | RUBY="@RUBY@" 10 | -------------------------------------------------------------------------------- /tests/src/vfs/extfs/helpers-list/data/dummy: -------------------------------------------------------------------------------- 1 | This is a dummy file meant to ensure this directory isn't empty so that git always creates it. 2 | 3 | Otherwise our 'test_all' script will fail complaining the directory doesn't exist. 4 | -------------------------------------------------------------------------------- /tests/src/vfs/extfs/helpers-list/data/hp48+.README: -------------------------------------------------------------------------------- 1 | 2 | The input file was taken from a comment in the helper (after removing 3 | the "Directory" line (which is tricky to test), and adding the 4 | not-really-necessary "EOF"). 5 | 6 | The '--drop-mtime' argument is needed because the helper emits the 7 | current date, which is always changing, whereas our output files have to 8 | be constant. 9 | -------------------------------------------------------------------------------- /tests/src/vfs/extfs/helpers-list/data/hp48+.args: -------------------------------------------------------------------------------- 1 | --drop-mtime 2 | -------------------------------------------------------------------------------- /tests/src/vfs/extfs/helpers-list/data/hp48+.input: -------------------------------------------------------------------------------- 1 | { HOME } 105617 2 | YEN 30.5 Program 53391 3 | JYTLIGHT 21848.5 String 62692 4 | IOPAR 37.5 List 61074 5 | 6 | EOF 7 | -------------------------------------------------------------------------------- /tests/src/vfs/extfs/helpers-list/data/hp48+.output: -------------------------------------------------------------------------------- 1 | -rw-r--r-- 1 0 0 30 /YEN 2 | -rw-r--r-- 1 0 0 21848 /JYTLIGHT 3 | -rw-r--r-- 1 0 0 37 /IOPAR 4 | -------------------------------------------------------------------------------- /tests/src/vfs/extfs/helpers-list/data/iso9660.xorriso.env_vars: -------------------------------------------------------------------------------- 1 | MC_TEST_EXTFS_ISO9660_TOOL=xorriso 2 | -------------------------------------------------------------------------------- /tests/src/vfs/extfs/helpers-list/data/lslR.1.spaces.args: -------------------------------------------------------------------------------- 1 | --drop-ids --drop-mtime 2 | -------------------------------------------------------------------------------- /tests/src/vfs/extfs/helpers-list/data/lslR.1.spaces.input: -------------------------------------------------------------------------------- 1 | .: 2 | total 12 3 | drwxr-xr-x 3 serhiy serhiy 4096 Dec 29 19:12 1 2 4 | drwxr-xr-x 2 serhiy serhiy 4096 Dec 29 19:08 1 2 5 | drwxr-xr-x 2 serhiy serhiy 4096 Dec 29 19:12 1 2 6 | 7 | ./ 1 2: 8 | total 4 9 | -rw-r--r-- 1 serhiy serhiy 0 Dec 29 19:08 b 10 | drwxr-xr-x 2 serhiy serhiy 4096 Dec 29 19:12 z 11 | 12 | ./ 1 2/z: 13 | total 0 14 | 15 | ./1 2: 16 | total 0 17 | -rw-r--r-- 1 serhiy serhiy 0 Dec 29 19:08 a 18 | 19 | ./1 2 : 20 | total 0 21 | -rw-r--r-- 1 serhiy serhiy 0 Dec 29 19:09 d 22 | -rw-r--r-- 1 serhiy serhiy 0 Dec 29 19:08 c 23 | -rw-r--r-- 1 serhiy serhiy 0 Dec 29 19:09 x: 24 | -------------------------------------------------------------------------------- /tests/src/vfs/extfs/helpers-list/data/lslR.1.spaces.output: -------------------------------------------------------------------------------- 1 | drwxr-xr-x 3 4096 ./ 1 2 2 | drwxr-xr-x 2 4096 ./1 2 3 | drwxr-xr-x 2 4096 ./1 2 4 | -rw-r--r-- 1 0 ./ 1 2/b 5 | drwxr-xr-x 2 4096 ./ 1 2/z 6 | -rw-r--r-- 1 0 ./1 2/a 7 | -rw-r--r-- 1 0 ./1 2 / d 8 | -rw-r--r-- 1 0 ./1 2 /c 9 | -rw-r--r-- 1 0 ./1 2 /x: 10 | -------------------------------------------------------------------------------- /tests/src/vfs/extfs/helpers-list/data/lslR.2.spaces-iso.args: -------------------------------------------------------------------------------- 1 | --drop-ids 2 | -------------------------------------------------------------------------------- /tests/src/vfs/extfs/helpers-list/data/lslR.2.spaces-iso.input: -------------------------------------------------------------------------------- 1 | .: 2 | total 12 3 | drwxr-xr-x 3 serhiy serhiy 4096 2009-12-29 19:12 1 2 4 | drwxr-xr-x 2 serhiy serhiy 4096 2009-12-29 19:08 1 2 5 | drwxr-xr-x 2 serhiy serhiy 4096 2009-12-29 19:12 1 2 6 | 7 | ./ 1 2: 8 | total 4 9 | -rw-r--r-- 1 serhiy serhiy 0 2009-12-29 19:08 b 10 | drwxr-xr-x 2 serhiy serhiy 4096 2009-12-29 19:12 z 11 | 12 | ./ 1 2/z: 13 | total 0 14 | 15 | ./1 2: 16 | total 0 17 | -rw-r--r-- 1 serhiy serhiy 0 2009-12-29 19:08 a 18 | 19 | ./1 2 : 20 | total 0 21 | -rw-r--r-- 1 serhiy serhiy 0 2009-12-29 19:08 c 22 | -rw-r--r-- 1 serhiy serhiy 0 2009-12-29 19:09 d 23 | -rw-r--r-- 1 serhiy serhiy 0 2009-12-29 19:09 x: 24 | -------------------------------------------------------------------------------- /tests/src/vfs/extfs/helpers-list/data/lslR.2.spaces-iso.output: -------------------------------------------------------------------------------- 1 | drwxr-xr-x 3 4096 2009-12-29 19:12:00 ./ 1 2 2 | drwxr-xr-x 2 4096 2009-12-29 19:08:00 ./1 2 3 | drwxr-xr-x 2 4096 2009-12-29 19:12:00 ./1 2 4 | -rw-r--r-- 1 0 2009-12-29 19:08:00 ./ 1 2/b 5 | drwxr-xr-x 2 4096 2009-12-29 19:12:00 ./ 1 2/z 6 | -rw-r--r-- 1 0 2009-12-29 19:08:00 ./1 2/a 7 | -rw-r--r-- 1 0 2009-12-29 19:08:00 ./1 2 /c 8 | -rw-r--r-- 1 0 2009-12-29 19:09:00 ./1 2 / d 9 | -rw-r--r-- 1 0 2009-12-29 19:09:00 ./1 2 /x: 10 | -------------------------------------------------------------------------------- /tests/src/vfs/extfs/helpers-list/data/lslR.3.spaces-iso-noslash.args: -------------------------------------------------------------------------------- 1 | --drop-ids 2 | -------------------------------------------------------------------------------- /tests/src/vfs/extfs/helpers-list/data/lslR.3.spaces-iso-noslash.input: -------------------------------------------------------------------------------- 1 | 1 2: 2 | total 4 3 | -rw-r--r-- 1 serhiy serhiy 0 2009-12-29 19:08 b 4 | drwxr-xr-x 2 serhiy serhiy 4096 2009-12-29 19:12 z 5 | 6 | 1 2/z: 7 | total 0 8 | 9 | 1 2: 10 | total 0 11 | -rw-r--r-- 1 serhiy serhiy 0 2009-12-29 19:08 a 12 | 13 | 1 2 : 14 | total 0 15 | -rw-r--r-- 1 serhiy serhiy 0 2009-12-29 19:08 c 16 | -rw-r--r-- 1 serhiy serhiy 0 2009-12-29 19:09 d 17 | -rw-r--r-- 1 serhiy serhiy 0 2009-12-29 19:09 x: 18 | -------------------------------------------------------------------------------- /tests/src/vfs/extfs/helpers-list/data/lslR.3.spaces-iso-noslash.output: -------------------------------------------------------------------------------- 1 | -rw-r--r-- 1 0 2009-12-29 19:08:00 ./ 1 2/b 2 | drwxr-xr-x 2 4096 2009-12-29 19:12:00 ./ 1 2/z 3 | -rw-r--r-- 1 0 2009-12-29 19:08:00 1 2/a 4 | -rw-r--r-- 1 0 2009-12-29 19:08:00 1 2 /c 5 | -rw-r--r-- 1 0 2009-12-29 19:09:00 1 2 / d 6 | -rw-r--r-- 1 0 2009-12-29 19:09:00 1 2 /x: 7 | -------------------------------------------------------------------------------- /tests/src/vfs/extfs/helpers-list/data/lslR.README: -------------------------------------------------------------------------------- 1 | 2 | The inputs were taken from: 3 | 4 | https://www.midnight-commander.org/ticket/1921 5 | 6 | These inputs are supposed to cover: 7 | 8 | - "spaces": spaces in dir/file names. 9 | 10 | - "iso": ISO date. The ticket claims this is enabled in en_US.UTF-8 11 | locale, but that's untrue. Nevertheless, it's a useful format (the 12 | default 'ls' dates are relative and therefore somewhat useless in lslR 13 | files) so we don't mind covering it here. 14 | 15 | - "noshalsh": directories not starting with "./". 16 | 17 | Argument files: 18 | 19 | The output produced must be constant anytime. Therefore: 20 | 21 | - For the one input using non-ISO date we must use --drop-mtime. 22 | Otherwise, because these are relative dates, next year the output 23 | will show a different year. 24 | 25 | - For all inputs we use --drop-ids for the case we have user "serhiy" on 26 | our system (and we aren't running as that user). 27 | -------------------------------------------------------------------------------- /tests/src/vfs/extfs/helpers-list/data/rpm.README: -------------------------------------------------------------------------------- 1 | 2 | The *.input files for the tests are what we call "tags files". They are 3 | generated by rpm2tags. 4 | 5 | The tests: 6 | 7 | - rpm.glib.input: 8 | 9 | Generated from glib2-2.46.2-4.el7.i686.rpm (downloadable from 10 | rpmfind.net). 11 | 12 | - rpm.custom.input: 13 | 14 | Generated from our own custom package (see test.spec in this 15 | distribution). The advantage of this custom package is that it lets us 16 | test the helper with almost all the tags it's supposed to support. 17 | 18 | -- 19 | 20 | The way we test this helper is a bit unconventional: 21 | 22 | We aren't overriding one or two variables in the helper but, instead, 23 | inject a code snippet into it (see 'rpm.rewrite.sh'). This lets us 24 | override a couple of functions to imitate the 'rpm' binary. 25 | -------------------------------------------------------------------------------- /tests/src/vfs/extfs/helpers-list/data/rpm.custom.env_vars: -------------------------------------------------------------------------------- 1 | MC_TEST_RPM_REWRITE="$MC_TEST_EXTFS_DATA_DIR/rpm.rewrite.sh" 2 | 3 | MCFASTRPM= # disable "fast mode". 4 | -------------------------------------------------------------------------------- /tests/src/vfs/extfs/helpers-list/data/rpm.glib.env_vars: -------------------------------------------------------------------------------- 1 | MC_TEST_RPM_REWRITE="$MC_TEST_EXTFS_DATA_DIR/rpm.rewrite.sh" 2 | 3 | MCFASTRPM= # disable "fast mode". 4 | -------------------------------------------------------------------------------- /tests/src/vfs/extfs/helpers-list/data/rpm.rewrite.sh: -------------------------------------------------------------------------------- 1 | # 2 | # This file gets source'd into our rpm helper. 3 | # 4 | # It imitates the 'rpm' program by overriding a few functions. 5 | # 6 | 7 | # The tags file. 8 | TAGSF="$MC_TEST_EXTFS_INPUT" 9 | 10 | . "$MC_TEST_EXTFS_CONFIG_SH" # Gain access to $PERL. 11 | 12 | # ---------------------------------------------------------------------------- 13 | 14 | # 15 | # Imitates 'rpm -qp --qf