├── .clang-format ├── .gitattributes ├── .github ├── FUNDING.yml ├── ISSUE_TEMPLATE │ ├── 1-bug.yml │ ├── 2-feature.yml │ └── config.yml ├── PULL_REQUEST_TEMPLATE.md ├── dependabot.yml └── workflows │ ├── ci-alpine.yml │ ├── ci-fedora.yml │ ├── ci-freebsd.yml │ ├── ci-macos.yml │ ├── ci-solaris.yml │ ├── ci-ubuntu.yml │ ├── ci.yml │ ├── command-rebase.yml │ ├── issue-label-approve.yml │ ├── issue-label-review.yml │ ├── merge-checks.yml │ ├── pr-label-approve.yml │ ├── process-closed-issues.yml │ ├── process-closed-prs.yml │ ├── process-incoming-issues.yml │ ├── process-incoming-prs.yml │ ├── transifex.yml │ ├── update-skins.yml │ └── update-sources.yml ├── .gitignore ├── AUTHORS ├── COPYING ├── ChangeLog ├── INSTALL ├── Makefile.am ├── NEWS ├── README ├── 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 ├── TODO ├── 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 ├── terminal.c ├── terminal.h ├── 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_require_defined.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-encoding.m4 ├── mc-ext2fs-attr.m4 ├── mc-get-fs-info.m4 ├── mc-glib.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.py ├── find-dup-includes │ ├── exclude-list.cfg │ ├── find-in-one-file.pl │ └── runme.sh ├── htagsfix ├── mandoc-1.14.6.css ├── 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 │ ├── 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 │ ├── terminal.c │ ├── tty.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_complete_word_cmd_test_data.txt.in │ └── edit_replace_cmd.c │ ├── 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 │ ├── fixtures │ ├── hints │ │ └── mc.hint │ ├── mc.charsets │ └── viewertest.txt │ ├── usermenu__test_condition.c │ └── 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 └── 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: None 33 | IndentWidth: 4 34 | SortIncludes: Never 35 | SpaceAfterCStyleCast: true 36 | SpacesBeforeTrailingComments: 2 37 | -------------------------------------------------------------------------------- /.gitattributes: -------------------------------------------------------------------------------- 1 | po/*.po -diff 2 | -------------------------------------------------------------------------------- /.github/FUNDING.yml: -------------------------------------------------------------------------------- 1 | github: [zyv] 2 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/config.yml: -------------------------------------------------------------------------------- 1 | blank_issues_enabled: false 2 | 3 | contact_links: 4 | - name: Questions or discussions about Midnight Commander 5 | url: https://github.com/MidnightCommander/mc/discussions 6 | about: Please ask for support and answer questions here 7 | 8 | - name: List for Midnight Commander users 9 | url: https://lists.midnight-commander.org/mailman/listinfo/mc 10 | about: If you prefer mailing lists, post your questions to the users list 11 | - name: List for Midnight Commander developers 12 | url: https://lists.midnight-commander.org/mailman/listinfo/mc-devel 13 | about: If you prefer mailing lists, post development-related messages to the developers list 14 | -------------------------------------------------------------------------------- /.github/PULL_REQUEST_TEMPLATE.md: -------------------------------------------------------------------------------- 1 | ## Proposed changes 2 | 3 | 8 | 9 | Resolves: #... 10 | 11 | ## Checklist 12 | 13 | 14 | 15 | 👉 Our coding style can be found here: https://midnight-commander.org/coding-style/ 👈 16 | 17 | - [ ] I have referenced the issue(s) resolved by this PR (if any) 18 | - [ ] I have signed-off my contribution with `git commit --amend -s` 19 | - [ ] Lint and unit tests pass locally with my changes (`make indent && make check`) 20 | - [ ] I have added tests that prove my fix is effective or that my feature works 21 | - [ ] I have added the necessary documentation (if appropriate) 22 | 23 | 30 | -------------------------------------------------------------------------------- /.github/dependabot.yml: -------------------------------------------------------------------------------- 1 | # To get started with Dependabot version updates, you'll need to specify which 2 | # package ecosystems to update and where the package manifests are located. 3 | # Please see the documentation for all configuration options: 4 | # https://docs.github.com/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file 5 | 6 | version: 2 7 | updates: 8 | - package-ecosystem: "github-actions" # See documentation for possible values 9 | directory: "/" # Location of package manifests 10 | schedule: 11 | interval: "monthly" 12 | labels: 13 | - "area: adm" 14 | -------------------------------------------------------------------------------- /.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 | timeout-minutes: 5 10 | 11 | container: 12 | image: alpine:latest 13 | 14 | permissions: 15 | contents: read 16 | 17 | steps: 18 | - uses: actions/checkout@v4 19 | 20 | - name: Install dependencies 21 | run: | 22 | apk add autoconf automake build-base libtool pkgconf sudo 23 | apk add aspell-dev check-dev e2fsprogs-dev gettext-dev glib-dev gpm-dev libssh2-dev perl slang-dev 24 | 25 | - name: Bootstrap build system 26 | run: ./autogen.sh 27 | 28 | - name: Build default configuration 29 | run: | 30 | adduser --home "$(pwd)" --no-create-home --disabled-password test 31 | chown -R test "$(pwd)" 32 | 33 | su - test -c ' \ 34 | ./configure \ 35 | --prefix="$(pwd)/install-prefix" \ 36 | --enable-mclib \ 37 | --enable-aspell \ 38 | --enable-werror \ 39 | && \ 40 | \ 41 | make -j$(nproc) && \ 42 | make check && \ 43 | make install \ 44 | ' 45 | 46 | - uses: actions/upload-artifact@v4 47 | if: failure() 48 | with: 49 | name: test-suite-logs-alpine 50 | path: ./**/test-suite.log 51 | -------------------------------------------------------------------------------- /.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 | permissions: 18 | contents: read 19 | 20 | steps: 21 | - uses: actions/checkout@v4 22 | 23 | - name: Install dependencies 24 | run: | 25 | brew install autoconf automake gettext check libtool pkg-config 26 | brew install aspell e2fsprogs glib libssh2 openssl s-lang 27 | 28 | # unzip is part of the base system 29 | 30 | - name: Bootstrap build system 31 | run: ./autogen.sh 32 | 33 | - name: Build default configuration 34 | run: | 35 | export CFLAGS="${{ inputs.CFLAGS }}" 36 | 37 | ./configure \ 38 | --prefix="$(pwd)/install-prefix" \ 39 | --enable-mclib \ 40 | --enable-aspell=/opt/homebrew 41 | 42 | make -j$(sysctl -n hw.logicalcpu) 43 | make check 44 | make install 45 | 46 | - uses: actions/upload-artifact@v4 47 | if: failure() 48 | with: 49 | name: test-suite-logs-macos 50 | path: ./**/test-suite.log 51 | -------------------------------------------------------------------------------- /.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 | secrets: 13 | SOURCE_DEPLOY_KEY: ${{ secrets.SOURCE_DEPLOY_KEY }} 14 | 15 | call-build-alpine: 16 | if: github.event_name == 'push' || github.event.pull_request.head.repo.full_name != github.repository 17 | uses: ./.github/workflows/ci-alpine.yml 18 | 19 | call-build-macos: 20 | if: github.event_name == 'push' || github.event.pull_request.head.repo.full_name != github.repository 21 | uses: ./.github/workflows/ci-macos.yml 22 | 23 | call-build-solaris: 24 | if: github.event_name == 'push' || github.event.pull_request.head.repo.full_name != github.repository 25 | uses: ./.github/workflows/ci-solaris.yml 26 | 27 | call-build-freebsd: 28 | if: github.event_name == 'push' || github.event.pull_request.head.repo.full_name != github.repository 29 | uses: ./.github/workflows/ci-freebsd.yml 30 | with: 31 | # https://github.com/GNUAspell/aspell/pull/651 32 | CFLAGS: -Wno-strict-prototypes 33 | -------------------------------------------------------------------------------- /.github/workflows/issue-label-approve.yml: -------------------------------------------------------------------------------- 1 | name: Approve issue 2 | 3 | on: 4 | issues: 5 | types: [ labeled ] 6 | workflow_dispatch: 7 | inputs: 8 | issue_number: 9 | description: Issue number 10 | required: true 11 | type: number 12 | 13 | jobs: 14 | approve-issue: 15 | runs-on: ubuntu-latest 16 | timeout-minutes: 5 17 | 18 | if: ${{ !github.event.issue.pull_request && (contains(github.event.label.name, 'approved') || inputs.issue_number != '') }} 19 | 20 | permissions: 21 | issues: write 22 | 23 | steps: 24 | - run: | 25 | gh issue edit \ 26 | ${{ inputs.issue_number != '' && inputs.issue_number || github.event.issue.number }} \ 27 | --remove-label "state: in review" 28 | 29 | gh issue comment \ 30 | ${{ inputs.issue_number != '' && inputs.issue_number || github.event.issue.number }} \ 31 | --body "The changes in the branch associated with this issue have been approved." 32 | env: 33 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} 34 | GH_REPO: ${{ github.repository }} 35 | -------------------------------------------------------------------------------- /.github/workflows/issue-label-review.yml: -------------------------------------------------------------------------------- 1 | name: Review issue 2 | 3 | on: 4 | issues: 5 | types: [ labeled ] 6 | workflow_dispatch: 7 | inputs: 8 | issue_number: 9 | description: Issue number 10 | required: true 11 | type: number 12 | 13 | jobs: 14 | review-issue: 15 | runs-on: ubuntu-latest 16 | timeout-minutes: 5 17 | 18 | if: ${{ !github.event.issue.pull_request && (contains(github.event.label.name, 'in review') || inputs.issue_number != '') }} 19 | 20 | permissions: 21 | issues: write 22 | 23 | steps: 24 | - run: | 25 | gh issue edit \ 26 | ${{ inputs.issue_number != '' && inputs.issue_number || github.event.issue.number }} \ 27 | --remove-label "state: approved" 28 | 29 | gh issue comment \ 30 | ${{ inputs.issue_number != '' && inputs.issue_number || github.event.issue.number }} \ 31 | --body "The changes in the branch associated with this issue are ready for review." 32 | env: 33 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} 34 | GH_REPO: ${{ github.repository }} 35 | -------------------------------------------------------------------------------- /.github/workflows/merge-checks.yml: -------------------------------------------------------------------------------- 1 | # This file was added by Pulumi and should not be edited manually. 2 | 3 | name: Merge checks 4 | 5 | on: 6 | push: 7 | branches: 8 | - "**" 9 | pull_request_target: 10 | 11 | jobs: 12 | merge-checks: 13 | runs-on: ubuntu-latest 14 | timeout-minutes: 5 15 | 16 | if: github.event_name == 'push' || github.event.pull_request.head.repo.full_name != github.repository 17 | 18 | permissions: 19 | contents: read 20 | statuses: write 21 | 22 | steps: 23 | - uses: actions/checkout@v4 24 | 25 | - uses: actions/github-script@v7 26 | id: get-head-hash 27 | with: 28 | result-encoding: string 29 | script: | 30 | core.setOutput("value", context.eventName == "pull_request_target" ? context.payload.pull_request.head.sha : context.sha); 31 | 32 | - name: Merge checks 33 | uses: midnightcommander/action-merge-checks@master 34 | with: 35 | github_token: ${{ secrets.GITHUB_TOKEN }} 36 | head_sha: ${{ steps.get-head-hash.outputs.value }} 37 | -------------------------------------------------------------------------------- /.github/workflows/pr-label-approve.yml: -------------------------------------------------------------------------------- 1 | name: Approve PR 2 | 3 | on: 4 | pull_request_target: 5 | types: [ labeled ] 6 | workflow_dispatch: 7 | inputs: 8 | issue_number: 9 | description: Issue number 10 | required: true 11 | type: number 12 | 13 | jobs: 14 | approve-pr: 15 | runs-on: ubuntu-latest 16 | timeout-minutes: 5 17 | 18 | if: ${{ contains(github.event.label.name, 'approved') || inputs.issue_number != '' }} 19 | 20 | permissions: 21 | pull-requests: write 22 | 23 | # https://github.com/cli/cli/issues/6274 24 | repository-projects: read 25 | 26 | steps: 27 | - run: | 28 | gh pr review \ 29 | ${{ inputs.issue_number != '' && inputs.issue_number || github.event.pull_request.number }} \ 30 | --approve 31 | 32 | gh pr edit \ 33 | ${{ inputs.issue_number != '' && inputs.issue_number || github.event.pull_request.number }} \ 34 | --remove-label "state: in review" 35 | env: 36 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} 37 | GH_REPO: ${{ github.repository }} 38 | -------------------------------------------------------------------------------- /.github/workflows/process-closed-issues.yml: -------------------------------------------------------------------------------- 1 | name: Process closed issues 2 | 3 | on: 4 | issues: 5 | types: [ closed ] 6 | workflow_dispatch: 7 | inputs: 8 | issue_number: 9 | description: Issue number 10 | required: true 11 | type: number 12 | 13 | jobs: 14 | remove-labels-on-close: 15 | runs-on: ubuntu-latest 16 | timeout-minutes: 5 17 | 18 | permissions: 19 | issues: write 20 | 21 | steps: 22 | - run: | 23 | gh issue edit ${{ inputs.issue_number != '' && inputs.issue_number || github.event.issue.number }} \ 24 | --remove-label "state: in review,state: approved" 25 | env: 26 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} 27 | GH_REPO: ${{ github.repository }} 28 | -------------------------------------------------------------------------------- /.github/workflows/process-closed-prs.yml: -------------------------------------------------------------------------------- 1 | name: Process closed PRs 2 | 3 | on: 4 | pull_request_target: 5 | types: [ closed ] 6 | workflow_dispatch: 7 | inputs: 8 | pr_number: 9 | description: PR number 10 | required: true 11 | type: number 12 | 13 | jobs: 14 | remove-labels-on-close: 15 | runs-on: ubuntu-latest 16 | timeout-minutes: 5 17 | 18 | permissions: 19 | pull-requests: write 20 | 21 | # https://github.com/cli/cli/issues/6274 22 | repository-projects: read 23 | 24 | steps: 25 | - run: | 26 | gh pr edit ${{ inputs.pr_number != '' && inputs.pr_number || github.event.pull_request.number }} \ 27 | --remove-label "state: in review,state: approved" 28 | env: 29 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} 30 | GH_REPO: ${{ github.repository }} 31 | 32 | - run: | 33 | gh pr edit ${{ github.event.pull_request.number }} \ 34 | --remove-milestone 35 | if: ${{ ! github.event.pull_request.merged && ! inputs.pr_number != ''}} 36 | env: 37 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} 38 | GH_REPO: ${{ github.repository }} 39 | -------------------------------------------------------------------------------- /.github/workflows/process-incoming-prs.yml: -------------------------------------------------------------------------------- 1 | name: Process incoming PRs 2 | 3 | on: 4 | pull_request_target: 5 | types: [ opened ] 6 | workflow_dispatch: 7 | inputs: 8 | pr_number: 9 | description: PR number 10 | required: true 11 | type: number 12 | 13 | jobs: 14 | label-new-pr: 15 | runs-on: ubuntu-latest 16 | timeout-minutes: 5 17 | 18 | permissions: 19 | pull-requests: write 20 | 21 | # https://github.com/cli/cli/issues/6274 22 | repository-projects: read 23 | 24 | steps: 25 | - run: | 26 | gh pr edit ${{ inputs.pr_number != '' && inputs.pr_number || github.event.pull_request.number }} \ 27 | --add-label "needs triage,prio: medium" \ 28 | --milestone "Future Releases" 29 | env: 30 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} 31 | GH_REPO: ${{ github.repository }} 32 | -------------------------------------------------------------------------------- /.github/workflows/transifex.yml: -------------------------------------------------------------------------------- 1 | name: transifex 2 | 3 | on: 4 | push: 5 | branches: 6 | - master 7 | 8 | concurrency: 9 | group: ${{ github.workflow }}-${{ github.ref }} 10 | 11 | jobs: 12 | transifex-upload: 13 | runs-on: ubuntu-latest 14 | timeout-minutes: 5 15 | 16 | permissions: 17 | contents: read 18 | 19 | steps: 20 | - uses: actions/checkout@v4 21 | 22 | - name: Install gettext & po4a 23 | run: sudo apt-get install -y gettext po4a 24 | 25 | - name: Install modern Transifex client 26 | run: | 27 | mkdir -p $HOME/.local/bin && cd $HOME/.local/bin 28 | curl -o- https://raw.githubusercontent.com/transifex/cli/master/install.sh | bash 29 | echo "${HOME}/.local/bin" >> $GITHUB_PATH 30 | 31 | - run: ./maint/sync-transifex/po-to-transifex.py 32 | env: 33 | TX_TOKEN: ${{ secrets.TX_TOKEN }} 34 | 35 | - run: ./maint/sync-transifex/hints-to-transifex.py 36 | env: 37 | TX_TOKEN: ${{ secrets.TX_TOKEN }} 38 | -------------------------------------------------------------------------------- /.github/workflows/update-skins.yml: -------------------------------------------------------------------------------- 1 | name: update-skins 2 | 3 | on: 4 | push: 5 | branches: 6 | - master 7 | workflow_dispatch: 8 | 9 | concurrency: 10 | group: ${{ github.workflow }}-${{ github.ref }} 11 | 12 | jobs: 13 | update-skins: 14 | runs-on: ubuntu-latest 15 | timeout-minutes: 5 16 | 17 | steps: 18 | - uses: actions/github-script@v7 19 | with: 20 | github-token: ${{ secrets.REPOSITORY_DISPATCH_GITHUB_TOKEN }} 21 | script: | 22 | await github.rest.repos.createDispatchEvent({ 23 | owner: context.repo.owner, 24 | repo: "skins", 25 | event_type: "deploy-skins" 26 | }); 27 | -------------------------------------------------------------------------------- /.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 | mc.kdevelop 37 | version.h 38 | TAGS 39 | doc/devel/ 40 | doc/html/ 41 | .deps 42 | libtool 43 | make.log 44 | make.clang 45 | make.gcc 46 | make.tcc 47 | tests/src/editor/test-data.txt 48 | tests/src/vfs/extfs/helpers-list/data/config.sh 49 | mc-version.h 50 | -------------------------------------------------------------------------------- /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 -------------------------------------------------------------------------------- /Makefile.am: -------------------------------------------------------------------------------- 1 | ## Process this file with automake to create Makefile.in. 2 | AUTOMAKE_OPTIONS = 1.14 3 | 4 | SUBDIRS = po lib src doc contrib misc 5 | 6 | if HAVE_TESTS 7 | SUBDIRS += tests 8 | endif 9 | 10 | EXTRA_DIST = 11 | 12 | dist_noinst_SCRIPTS = \ 13 | build-glib2.sh \ 14 | version.sh 15 | 16 | dist_noinst_HEADERS = $(top_srcdir)/mc-version.h 17 | 18 | ACLOCAL_AMFLAGS = -I m4 19 | 20 | CONFIG_STATUS_DEPENDENCIES = $(top_srcdir)/mc-version.h 21 | 22 | .PHONY: update-version 23 | 24 | update-version: 25 | @if test -x $(top_srcdir)/version.sh; then \ 26 | $(top_srcdir)/version.sh "$(top_srcdir)" 2>&1 >/dev/null; \ 27 | else \ 28 | if test ! -e $(top_srcdir)/mc-version.h; then \ 29 | echo "File not found: $(top_srcdir)/version.sh"; \ 30 | exit 1; \ 31 | fi; \ 32 | fi 33 | 34 | $(top_srcdir)/mc-version.h: update-version 35 | 36 | INDENT_CMD = clang-format -i 37 | 38 | INDENT_DIRS = \ 39 | "$(top_srcdir)/lib" \ 40 | "$(top_srcdir)/src" \ 41 | "$(top_srcdir)/tests" 42 | 43 | indent: 44 | for directory in $(INDENT_DIRS); do \ 45 | find "$${directory}" -name '*.[ch]' -print0 | \ 46 | xargs -0 $(INDENT_CMD); \ 47 | done 48 | -------------------------------------------------------------------------------- /NEWS: -------------------------------------------------------------------------------- 1 | doc/NEWS -------------------------------------------------------------------------------- /README: -------------------------------------------------------------------------------- 1 | doc/README -------------------------------------------------------------------------------- /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/ax_require_defined.m4]) 10 | m4_include([m4.include/ax_check_compile_flag.m4]) 11 | m4_include([m4.include/ax_append_flag.m4]) 12 | m4_include([m4.include/ax_append_compile_flags.m4]) 13 | m4_include([m4.include/mc-cflags.m4]) 14 | m4_include([m4.include/mc-stdckdint.m4]) 15 | m4_include([m4.include/mc-get-fs-info.m4]) 16 | m4_include([m4.include/mc-with-x.m4]) 17 | m4_include([m4.include/mc-use-termcap.m4]) 18 | m4_include([m4.include/mc-with-screen.m4]) 19 | m4_include([m4.include/mc-with-internal-edit.m4]) 20 | m4_include([m4.include/mc-subshell.m4]) 21 | m4_include([m4.include/mc-background.m4]) 22 | m4_include([m4.include/mc-ext2fs-attr.m4]) 23 | m4_include([m4.include/mc-glib.m4]) 24 | m4_include([m4.include/mc-vfs.m4]) 25 | m4_include([m4.include/mc-version.m4]) 26 | m4_include([m4.include/mc-tests.m4]) 27 | m4_include([m4.include/mc-encoding.m4]) 28 | m4_include([m4.include/mc-assert.m4]) 29 | -------------------------------------------------------------------------------- /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 | 9 | cfgdir = $(sysconfdir)/@PACKAGE@ 10 | cfg_DATA = \ 11 | $(LIBFILES_ADD) 12 | 13 | CLEANFILES = $(SCRIPTS_OUT) 14 | 15 | # Files processed by configure don't need to be here 16 | EXTRA_DIST = \ 17 | $(SCRIPTS_IN) \ 18 | $(noinst_DATA) 19 | 20 | mc.csh: $(top_builddir)/config.status $(srcdir)/mc.csh.in 21 | $(SED) "s%@""pkglibexecdir@%$(pkglibexecdir)%" $(srcdir)/mc.csh.in > mc.csh 22 | 23 | mc.sh: $(top_builddir)/config.status $(srcdir)/mc.sh.in 24 | $(SED) "s%@""pkglibexecdir@%$(pkglibexecdir)%" $(srcdir)/mc.sh.in > mc.sh 25 | 26 | mc-wrapper.csh: $(top_builddir)/config.status $(srcdir)/mc-wrapper.csh.in 27 | $(SED) "s%@""bindir@%$(bindir)%" $(srcdir)/mc-wrapper.csh.in > mc-wrapper.csh 28 | 29 | mc-wrapper.sh: $(top_builddir)/config.status $(srcdir)/mc-wrapper.sh.in 30 | $(SED) "s%@""bindir@%$(bindir)%" $(srcdir)/mc-wrapper.sh.in > mc-wrapper.sh 31 | 32 | -------------------------------------------------------------------------------- /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 | EXTRA_DIST = FAQ HACKING INSTALL 5 | -------------------------------------------------------------------------------- /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%{@pkglibexecdir@{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/terminal.h: -------------------------------------------------------------------------------- 1 | /** \file terminal.h 2 | * \brief Header: terminal emulation logic. 3 | */ 4 | 5 | #ifndef MC_TERMINAL_H 6 | #define MC_TERMINAL_H 7 | 8 | #include 9 | #include // uint32_t 10 | 11 | #include "lib/global.h" // include 12 | 13 | /*** typedefs(not structures) and defined constants **********************************************/ 14 | 15 | /*** enums ***************************************************************************************/ 16 | 17 | /*** structures declarations (and typedefs of structures)*****************************************/ 18 | 19 | struct csi_command_t 20 | { 21 | char private_mode; 22 | uint32_t params[16][4]; 23 | size_t param_count; 24 | }; 25 | 26 | /*** global variables defined in .c file *********************************************************/ 27 | 28 | /*** declarations of public functions ************************************************************/ 29 | 30 | gboolean parse_csi (struct csi_command_t *out, const char **sptr, const char *end); 31 | 32 | char *strip_ctrl_codes (char *s); 33 | 34 | /* Replaces "\\E" and "\\e" with "\033". Replaces "^" + [a-z] with 35 | * ((char) 1 + (c - 'a')). The same goes for "^" + [A-Z]. 36 | * Returns a newly allocated string. */ 37 | char *convert_controls (const char *s); 38 | 39 | /*** inline functions ****************************************************************************/ 40 | 41 | #endif 42 | -------------------------------------------------------------------------------- /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/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-encoding.m4: -------------------------------------------------------------------------------- 1 | dnl @synopsis mc_ENCODING 2 | dnl 3 | dnl Clarify encoding names in mc.charset 4 | dnl 5 | dnl @author Slava Zanko 6 | dnl @modified Yury V. Zaytsev 7 | dnl @modified Andrew Borodin 8 | dnl @version 2025-03-22 9 | dnl @license GPL 10 | dnl @copyright Free Software Foundation, Inc. 11 | 12 | AC_DEFUN([mc_ENCODING],[ 13 | AC_CHECK_HEADERS([gnu/libc-version.h]) 14 | 15 | dnl Solaris has different name of Windows 1251 encoding 16 | case $host_os in 17 | solaris*) 18 | ENCODING_CP1251="ANSI-1251" 19 | ;; 20 | *) 21 | ENCODING_CP1251="CP1251" 22 | ;; 23 | esac 24 | 25 | if test "x$ac_cv_header_gnu_libc_version_h" != "xno"; then 26 | ENCODING_CP866="IBM866" 27 | ENCODING_ISO8859="ISO-8859" 28 | else 29 | ENCODING_CP866="CP866" 30 | ENCODING_ISO8859="ISO8859" 31 | fi 32 | 33 | AC_SUBST(ENCODING_CP1251) 34 | AC_SUBST(ENCODING_CP866) 35 | AC_SUBST(ENCODING_ISO8859) 36 | ]) 37 | -------------------------------------------------------------------------------- /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 | *) 22 | AC_MSG_ERROR([Value of the screen library is incorrect]) 23 | ;; 24 | esac 25 | ]) 26 | -------------------------------------------------------------------------------- /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/" lib/global.c > lib/global.c.tmp && \ 25 | mv -f lib/global.c.tmp lib/global.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 = mc.charsets 12 | 13 | dist_pkgdata_DATA = \ 14 | mc.lib 15 | 16 | pkgdata_DATA = \ 17 | $(PKGDATA_OUT) 18 | 19 | SCRIPTS_IN = \ 20 | mc.menu.in \ 21 | mcedit.menu.in 22 | 23 | SCRIPTS_OUT = \ 24 | mc.menu \ 25 | mcedit.menu 26 | 27 | LIBFILES_CONST = \ 28 | filehighlight.ini \ 29 | mc.default.keymap \ 30 | mc.emacs.keymap \ 31 | mc.vim.keymap 32 | 33 | 34 | LIBFILES_SCRIPT = \ 35 | edit.indent.rc 36 | 37 | CLEANFILES = $(SCRIPTS_OUT) $(PKGDATA_OUT) 38 | 39 | cfgdir = $(sysconfdir)/@PACKAGE@ 40 | cfg_DATA = \ 41 | $(LIBFILES_CONST) \ 42 | $(SCRIPTS_OUT) \ 43 | $(LIBFILES_OUT) 44 | 45 | cfg_SCRIPTS = \ 46 | $(LIBFILES_SCRIPT) 47 | 48 | # Files processed by configure don't need to be here 49 | EXTRA_DIST = \ 50 | $(LIBFILES_CONST) \ 51 | $(LIBFILES_SCRIPT) \ 52 | $(SCRIPTS_IN) \ 53 | $(noinst_DATA) \ 54 | $(PKGDATA_IN) 55 | 56 | install-data-hook: 57 | cd $(DESTDIR)$(cfgdir) && rm -f mc.keymap && $(LN_S) mc.default.keymap mc.keymap 58 | 59 | uninstall-hook: 60 | cd $(DESTDIR)$(cfgdir) && rm -f mc.keymap 61 | -------------------------------------------------------------------------------- /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 | misc.sh.in \ 5 | text.sh.in 6 | 7 | SCRIPTS_OUT = \ 8 | misc.sh \ 9 | text.sh 10 | 11 | SCRIPTS_UNTOUCHED = \ 12 | archive.sh \ 13 | doc.sh \ 14 | image.sh \ 15 | package.sh \ 16 | sound.sh \ 17 | video.sh \ 18 | web.sh 19 | 20 | ext_SCRIPTS = \ 21 | $(SCRIPTS_UNTOUCHED) \ 22 | $(SCRIPTS_OUT) 23 | 24 | EXTRA_DIST = \ 25 | $(SCRIPTS_UNTOUCHED) \ 26 | $(SCRIPTS_IN) 27 | 28 | -------------------------------------------------------------------------------- /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/595fef42ed6bfe2fbca2cb3486fa2761f17d8ecf/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/595fef42ed6bfe2fbca2cb3486fa2761f17d8ecf/misc/syntax/cs.syntax -------------------------------------------------------------------------------- /misc/syntax/cuda.syntax: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MidnightCommander/mc/595fef42ed6bfe2fbca2cb3486fa2761f17d8ecf/misc/syntax/cuda.syntax -------------------------------------------------------------------------------- /misc/syntax/cxx.syntax: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MidnightCommander/mc/595fef42ed6bfe2fbca2cb3486fa2761f17d8ecf/misc/syntax/cxx.syntax -------------------------------------------------------------------------------- /misc/syntax/d.syntax: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MidnightCommander/mc/595fef42ed6bfe2fbca2cb3486fa2761f17d8ecf/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/595fef42ed6bfe2fbca2cb3486fa2761f17d8ecf/misc/syntax/haskell.syntax -------------------------------------------------------------------------------- /misc/syntax/idl.syntax: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MidnightCommander/mc/595fef42ed6bfe2fbca2cb3486fa2761f17d8ecf/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/595fef42ed6bfe2fbca2cb3486fa2761f17d8ecf/misc/syntax/nemerle.syntax -------------------------------------------------------------------------------- /misc/syntax/opencl.syntax: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MidnightCommander/mc/595fef42ed6bfe2fbca2cb3486fa2761f17d8ecf/misc/syntax/opencl.syntax -------------------------------------------------------------------------------- /misc/syntax/osl.syntax: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MidnightCommander/mc/595fef42ed6bfe2fbca2cb3486fa2761f17d8ecf/misc/syntax/osl.syntax -------------------------------------------------------------------------------- /misc/syntax/slang.syntax: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MidnightCommander/mc/595fef42ed6bfe2fbca2cb3486fa2761f17d8ecf/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/595fef42ed6bfe2fbca2cb3486fa2761f17d8ecf/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/595fef42ed6bfe2fbca2cb3486fa2761f17d8ecf/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 | pkglibexec_PROGRAMS = cons.saver 2 | 3 | cons_saver_SOURCES = cons.saver.c 4 | 5 | AM_CPPFLAGS = -I$(top_srcdir) 6 | -------------------------------------------------------------------------------- /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 | MC_MOCKABLE 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/selcodepage.h: -------------------------------------------------------------------------------- 1 | 2 | /** \file selcodepage.h 3 | * \brief Header: user %interface for charset %selection 4 | */ 5 | 6 | #ifndef MC__SELCODEPAGE_H 7 | #define MC__SELCODEPAGE_H 8 | 9 | #include "lib/global.h" 10 | 11 | /*** typedefs(not structures) and defined constants **********************************************/ 12 | 13 | /* some results of select_charset() */ 14 | #define SELECT_CHARSET_CANCEL -2 // dialog has been canceled 15 | #define SELECT_CHARSET_NO_TRANSLATE -1 // 1st item ("No translation") has been selected 16 | /* In other cases select_charset() returns non-negative value 17 | * which is number of codepage in codepage list */ 18 | 19 | /*** enums ***************************************************************************************/ 20 | 21 | /*** structures declarations (and typedefs of structures)*****************************************/ 22 | 23 | /*** global variables defined in .c file *********************************************************/ 24 | 25 | /*** declarations of public functions ************************************************************/ 26 | 27 | int select_charset (int center_y, int center_x, int current_charset); 28 | gboolean do_set_codepage (int); 29 | gboolean do_select_codepage (void); 30 | 31 | /*** inline functions ****************************************************************************/ 32 | 33 | #endif 34 | -------------------------------------------------------------------------------- /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 | void file_error_message (const char *format, const char *filename); 18 | 19 | /*** inline functions ****************************************************************************/ 20 | 21 | #endif 22 | -------------------------------------------------------------------------------- /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=\""$(pkglibexecdir)"\" \ 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/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/595fef42ed6bfe2fbca2cb3486fa2761f17d8ecf/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/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=\""$(pkglibexecdir)/"\" \ 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 = $(pkglibexecdir)/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/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 | -DTEST_SHARE_DIR=\"$(abs_srcdir)/fixtures\" \ 14 | @CHECK_CFLAGS@ 15 | 16 | LIBS = @CHECK_LIBS@ \ 17 | $(top_builddir)/src/libinternal.la \ 18 | $(top_builddir)/lib/libmc.la 19 | 20 | if ENABLE_MCLIB 21 | LIBS += $(GLIB_LIBS) 22 | endif 23 | 24 | EXTRA_DIST = \ 25 | fixtures/mc.charsets \ 26 | fixtures/hints/mc.hint \ 27 | fixtures/viewertest.txt \ 28 | execute__common.c 29 | 30 | TESTS = \ 31 | execute__execute_with_vfs_arg \ 32 | execute__execute_external_editor_or_viewer \ 33 | execute__execute_get_external_cmd_opts_from_config \ 34 | usermenu__test_condition 35 | 36 | check_PROGRAMS = $(TESTS) 37 | 38 | execute__execute_with_vfs_arg_SOURCES = \ 39 | execute__execute_with_vfs_arg.c 40 | 41 | 42 | execute__execute_external_editor_or_viewer_SOURCES = \ 43 | execute__execute_external_editor_or_viewer.c 44 | 45 | 46 | execute__execute_get_external_cmd_opts_from_config_SOURCES = \ 47 | execute__execute_get_external_cmd_opts_from_config.c 48 | 49 | usermenu__test_condition_SOURCES = \ 50 | usermenu__test_condition.c 51 | -------------------------------------------------------------------------------- /tests/src/editor/Makefile.am: -------------------------------------------------------------------------------- 1 | PACKAGE_STRING = "/src/editor" 2 | 3 | AM_CPPFLAGS = \ 4 | -DTEST_SHARE_DIR=\"$(abs_srcdir)/../fixtures\" \ 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 = edit_complete_word_cmd_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/edit_complete_word_cmd_test_data.txt.in: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MidnightCommander/mc/595fef42ed6bfe2fbca2cb3486fa2761f17d8ecf/tests/src/editor/edit_complete_word_cmd_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)/../fixtures\" \ 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 | TESTS = \ 19 | cd_to \ 20 | examine_cd \ 21 | exec_get_export_variables_ext \ 22 | filegui_is_wildcarded \ 23 | get_random_hint 24 | 25 | check_PROGRAMS = $(TESTS) 26 | 27 | cd_to_SOURCES = \ 28 | cd_to.c 29 | 30 | examine_cd_SOURCES = \ 31 | examine_cd.c 32 | 33 | exec_get_export_variables_ext_SOURCES = \ 34 | exec_get_export_variables_ext.c 35 | 36 | get_random_hint_SOURCES = \ 37 | get_random_hint.c 38 | 39 | filegui_is_wildcarded_SOURCES = \ 40 | filegui_is_wildcarded.c 41 | -------------------------------------------------------------------------------- /tests/src/fixtures/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/fixtures/mc.charsets: -------------------------------------------------------------------------------- 1 | KOI8-R KOI8-R 2 | UTF-8 UTF-8 3 | -------------------------------------------------------------------------------- /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://github.com/MidnightCommander/mc/issues/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/torrent.input: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MidnightCommander/mc/595fef42ed6bfe2fbca2cb3486fa2761f17d8ecf/tests/src/vfs/extfs/helpers-list/data/torrent.input -------------------------------------------------------------------------------- /tests/src/vfs/extfs/helpers-list/data/torrent.output: -------------------------------------------------------------------------------- 1 | dr-xr-xr-x 1 0 0 0 2011-05-05 08:49:00 .META 2 | -r--r--r-- 1 0 0 13 2011-05-05 08:49:00 .META/created by 3 | -r--r--r-- 1 0 0 24 2011-05-05 08:49:00 .META/creation date 4 | -r--r--r-- 1 0 0 5 2011-05-05 08:49:00 .META/encoding 5 | -r--r--r-- 1 0 0 7 2011-05-05 08:49:00 .META/piece length 6 | -r--r--r-- 1 0 0 9 2011-05-05 08:49:00 .META/publisher 7 | -r--r--r-- 1 0 0 31 2011-05-05 08:49:00 .META/publisher-url 8 | -r--r--r-- 1 0 0 5490455272 2011-05-05 08:49:00 Sintel.2010.4K.DMRip.x264.DD.DTS.SRT-MaLLIeHbKa.mkv 9 | -------------------------------------------------------------------------------- /tests/src/vfs/extfs/helpers-list/data/u7z.README: -------------------------------------------------------------------------------- 1 | 2 | We have 4 inputs: 3 | 4 | - u7z.simple.input 5 | 6 | Simplest input: no abnormalities. 7 | (One line has a filename with spaces in it.) 8 | 9 | - u7z.missing-date.input 10 | 11 | Date field is missing (see #2707). 12 | 13 | - u7z.missing-size-and-date.input 14 | 15 | Size field is missing, and in some rows the date is missing too (see #2707). 16 | 17 | - u7z.complex.input 18 | 19 | Downloaded from #2707. It's 'list.txt' plus three bottom lines from 20 | 'listing2.txt'. It demonstrates all the above: missing date, missing 21 | uncompressed and compressed size. 22 | 23 | 24 | Output files must be constant. Therefore in our '*.env_var' files we 25 | define a command that sets missing dates to some fixed date (instead of 26 | being the archive's date). 27 | -------------------------------------------------------------------------------- /tests/src/vfs/extfs/helpers-list/data/u7z.complex.env_vars: -------------------------------------------------------------------------------- 1 | MC_TEST_EXTFS_U7Z_STAT="echo 2007-07-07 07:07:07" 2 | -------------------------------------------------------------------------------- /tests/src/vfs/extfs/helpers-list/data/u7z.missing-date.env_vars: -------------------------------------------------------------------------------- 1 | MC_TEST_EXTFS_U7Z_STAT="echo 2007-07-07 07:07:07" 2 | -------------------------------------------------------------------------------- /tests/src/vfs/extfs/helpers-list/data/u7z.missing-date.input: -------------------------------------------------------------------------------- 1 | Date Time Attr Size Compressed Name 2 | ------------------- ----- ------------ ------------ ------------------------ 3 | D.... 0 0 $PLUGINSDIR 4 | ..... 11024 8005 $PLUGINSDIR/InstallOptions.dll 5 | 2007-11-15 01:12:38 ..... 235 134 $PLUGINSDIR/ioSpecial.ini 6 | -------------------------------------------------------------------------------- /tests/src/vfs/extfs/helpers-list/data/u7z.missing-date.output: -------------------------------------------------------------------------------- 1 | drwxr-xr-x 1 <> <> 0 2007-07-07 07:07:07 $PLUGINSDIR 2 | -rw-r--r-- 1 <> <> 11024 2007-07-07 07:07:07 $PLUGINSDIR/InstallOptions.dll 3 | -rw-r--r-- 1 <> <> 235 2007-11-15 01:12:38 $PLUGINSDIR/ioSpecial.ini 4 | -------------------------------------------------------------------------------- /tests/src/vfs/extfs/helpers-list/data/u7z.missing-size-and-date.env_vars: -------------------------------------------------------------------------------- 1 | MC_TEST_EXTFS_U7Z_STAT="echo 2007-07-07 07:07:07" 2 | -------------------------------------------------------------------------------- /tests/src/vfs/extfs/helpers-list/data/u7z.missing-size-and-date.input: -------------------------------------------------------------------------------- 1 | Date Time Attr Size Compressed Name 2 | ------------------- ----- ------------ ------------ ------------------------ 3 | 2011-11-01 01:33:04 ..... 469920 cpuidsdk64.dll 4 | 2011-11-02 02:23:16 D.... 0 $_OUTDIR/html/ui 5 | 2011-11-03 03:33:04 ..... test.dll 6 | 2011-11-04 04:23:16 D.... test 7 | ..... 17770090 no-date-cpuidsdk64.dll 8 | D.... 0 no-date-$_OUTDIR/html/ui 9 | ..... no-date-test.dll 10 | D.... no-date-test 11 | 2011-11-05 05:23:16 ..... 17897 12817 $_OUTDIR/html/ui/callout-bg-bottom.gif 12 | -------------------------------------------------------------------------------- /tests/src/vfs/extfs/helpers-list/data/u7z.missing-size-and-date.output: -------------------------------------------------------------------------------- 1 | drwxr-xr-x 1 <> <> 0 2011-11-02 02:23:16 $_OUTDIR/html/ui 2 | -rw-r--r-- 1 <> <> 17897 2011-11-05 05:23:16 $_OUTDIR/html/ui/callout-bg-bottom.gif 3 | -rw-r--r-- 1 <> <> 469920 2011-11-01 01:33:04 cpuidsdk64.dll 4 | drwxr-xr-x 1 <> <> 0 2007-07-07 07:07:07 no-date-$_OUTDIR/html/ui 5 | -rw-r--r-- 1 <> <> 17770090 2007-07-07 07:07:07 no-date-cpuidsdk64.dll 6 | drwxr-xr-x 1 <> <> 0 2007-07-07 07:07:07 no-date-test 7 | -rw-r--r-- 1 <> <> 0 2007-07-07 07:07:07 no-date-test.dll 8 | drwxr-xr-x 1 <> <> 0 2011-11-04 04:23:16 test 9 | -rw-r--r-- 1 <> <> 0 2011-11-03 03:33:04 test.dll 10 | -------------------------------------------------------------------------------- /tests/src/vfs/extfs/helpers-list/data/uace.README: -------------------------------------------------------------------------------- 1 | 2 | The input file was created by doing "unace l test.ace" on an archive 3 | created with WinAce (run under Wine; there's no native Linux ACE packer). 4 | One date was then changed by hand to "17.04.94" to test the 1900/2000 5 | boundary. 6 | 7 | Known issues with our uace: 8 | 9 | - It doesn't support filenames with spaces. (For the benefit of those 10 | wishing to fix this, the input file intentionally contains such files.) 11 | 12 | - It reports '0' gid. 13 | 14 | - See note in the source about using Debian's 'unace-nonfree' package, 15 | not 'unace'. 16 | -------------------------------------------------------------------------------- /tests/src/vfs/extfs/helpers-list/data/uarc.README: -------------------------------------------------------------------------------- 1 | 2 | The input file was created by doing "arc v test.arc" on archive created 3 | with "arc a test.arc ...". We then made sure to have: 4 | 5 | - One date prior to year 2000 (to test the 1900/2000 boundary). 6 | - Both AM and PM times. 7 | 8 | Our 'uarc' doesn't support spaces in filenames but that's no biggie: 9 | 10 | Man page: "Full compatibility with PC ARC files is maintained, the 11 | price for which is that arc doesn't like long filenames, and can only 12 | archive files with names of up to 12 characters. [...] I suggest you 13 | put long-winded filenames in a 'shar' before arcing them." 14 | 15 | Wikipedia: "ARC is incapable of compressing entire directory trees" 16 | 17 | Known issues with our uarc: 18 | 19 | - It reports '0' gid. 20 | -------------------------------------------------------------------------------- /tests/src/vfs/extfs/helpers-list/data/uarc.input: -------------------------------------------------------------------------------- 1 | Name Length Stowage SF Size now Date Time CRC 2 | ============ ======== ======== ==== ======== ========= ====== ==== 3 | README.html 9799 Crunched 50% 4922 23 Nov 16 11:48a 40ba 4 | extfs.c 49679 Crunched 67% 16874 18 Apr 94 3:05p 38ff 5 | run.log 1051 Crunched 50% 536 23 Nov 16 10:36a 6184 6 | ==== ======== ==== ======== 7 | Total 3 60529 64% 22332 8 | -------------------------------------------------------------------------------- /tests/src/vfs/extfs/helpers-list/data/uarc.output: -------------------------------------------------------------------------------- 1 | -rw-r--r-- 1 <> 0 9799 2016-11-23 11:48:00 README.html 2 | -rw-r--r-- 1 <> 0 49679 1994-04-18 15:05:00 extfs.c 3 | -rw-r--r-- 1 <> 0 1051 2016-11-23 10:36:00 run.log 4 | -------------------------------------------------------------------------------- /tests/src/vfs/extfs/helpers-list/data/urar.README: -------------------------------------------------------------------------------- 1 | 2 | The archive was created thus: 3 | 4 | echo hello > 'filename with spaces.txt' 5 | rar a archive.rar 'filename with spaces.txt' ... 6 | 7 | Our 'urar' supports two listing formats: that of versions 6 and 5, and that of 8 | versions 4 and 3. 9 | 10 | 'urar.v6,v5.input' was created with "unrar vt -c- -cfg- archive.rar" using 11 | unrar 5.30. 12 | 13 | 'urar.v4,v3.input' was created with "unrar v -c- -cfg- archive.rar" using 14 | unrar 3.80 for DOS (google "unrar dos"), via DOSBox (and then the "\" was 15 | changed to "/" by hand). An inspection of our urar's source code should 16 | lead us to conclude that this format is compatible with that of version 17 | 4. 18 | -------------------------------------------------------------------------------- /tests/src/vfs/extfs/helpers-list/data/urar.v4,v3.env_vars: -------------------------------------------------------------------------------- 1 | MC_TEST_EXTFS_UNRAR_VERSION=4 2 | -------------------------------------------------------------------------------- /tests/src/vfs/extfs/helpers-list/data/urar.v4,v3.input: -------------------------------------------------------------------------------- 1 | 2 | UNRAR 3.80 freeware Copyright (c) 1993-2008 Alexander Roshal 3 | 4 | Archive ARCHIVE.RAR 5 | 6 | Pathname/Comment 7 | Size Packed Ratio Date Time Attr CRC Meth Ver 8 | ------------------------------------------------------------------------------- 9 | .viminfo 10 | 11032 2468 22% 23-11-16 07:10 -rw------- 295ED9AB m3g 2.9 11 | .wget-hsts 12 | 205 181 88% 26-10-16 13:14 -rw-rw-r-- 58429CA4 m3g 2.9 13 | .xboardrc 14 | 7527 2964 39% 17-04-16 01:21 -rw-rw-r-- 1DA6AD04 m3g 2.9 15 | .xchm 16 | 559 382 68% 29-09-16 01:08 -rw-rw-r-- 73DBF2B9 m3g 2.9 17 | .xinputrc 18 | 130 123 94% 27-12-15 17:08 -rw-rw-r-- 70CD8EF3 m3g 2.9 19 | .dosbox/dosbox-0.74.conf 20 | 10730 4005 37% 07-06-16 20:43 -rw-rw-r-- 1D5A9AA6 m3g 2.9 21 | log.txt 22 | 5869937 42114 0% 23-11-16 07:43 -rw-rw-r-- E63DE4A6 m3g 2.9 23 | filename with spaces.txt 24 | 6 16 266% 23-11-16 07:39 -rw-r--r-- 363A3020 m3g 2.9 25 | .dosbox 26 | 0 0 0% 07-06-16 20:43 drwx------ 00000000 m0 2.0 27 | ------------------------------------------------------------------------------- 28 | 9 5900126 52253 0% 29 | 30 | -------------------------------------------------------------------------------- /tests/src/vfs/extfs/helpers-list/data/urar.v4,v3.output: -------------------------------------------------------------------------------- 1 | drwx------ 1 <> <> 0 2016-06-07 20:43:00 ./.dosbox 2 | -rw-rw-r-- 1 <> <> 10730 2016-06-07 20:43:00 ./.dosbox/dosbox-0.74.conf 3 | -rw------- 1 <> <> 11032 2016-11-23 07:10:00 ./.viminfo 4 | -rw-rw-r-- 1 <> <> 205 2016-10-26 13:14:00 ./.wget-hsts 5 | -rw-rw-r-- 1 <> <> 7527 2016-04-17 01:21:00 ./.xboardrc 6 | -rw-rw-r-- 1 <> <> 559 2016-09-29 01:08:00 ./.xchm 7 | -rw-rw-r-- 1 <> <> 130 2015-12-27 17:08:00 ./.xinputrc 8 | -rw-r--r-- 1 <> <> 6 2016-11-23 07:39:00 ./filename with spaces.txt 9 | -rw-rw-r-- 1 <> <> 5869937 2016-11-23 07:43:00 ./log.txt 10 | -------------------------------------------------------------------------------- /tests/src/vfs/extfs/helpers-list/data/urar.v6,v5.env_vars: -------------------------------------------------------------------------------- 1 | MC_TEST_EXTFS_UNRAR_VERSION=5 2 | -------------------------------------------------------------------------------- /tests/src/vfs/extfs/helpers-list/data/urar.v6,v5.output: -------------------------------------------------------------------------------- 1 | drwx------ 1 <> <> 0 2016-06-07 20:43:00 ./.dosbox 2 | -rw-rw-r-- 1 <> <> 10730 2016-06-07 20:43:00 ./.dosbox/dosbox-0.74.conf 3 | -rw------- 1 <> <> 11032 2016-11-23 07:10:00 ./.viminfo 4 | -rw-rw-r-- 1 <> <> 205 2016-10-26 13:14:00 ./.wget-hsts 5 | -rw-rw-r-- 1 <> <> 7527 2016-04-17 01:21:00 ./.xboardrc 6 | -rw-rw-r-- 1 <> <> 559 2016-09-29 01:08:00 ./.xchm 7 | -rw-rw-r-- 1 <> <> 130 2015-12-27 17:08:00 ./.xinputrc 8 | -rw-r--r-- 1 <> <> 6 2016-11-23 07:39:00 ./filename with spaces.txt 9 | -rw-rw-r-- 1 <> <> 5869937 2016-11-23 07:43:00 ./log.txt 10 | -------------------------------------------------------------------------------- /tests/src/vfs/extfs/helpers-list/data/usqfs.args: -------------------------------------------------------------------------------- 1 | --drop-ids 2 | -------------------------------------------------------------------------------- /tests/src/vfs/extfs/helpers-list/data/uzip.README: -------------------------------------------------------------------------------- 1 | 2 | The input files were created thus: 3 | 4 | cd ~/.gimp-2.8 5 | echo hello > 'filename with spaces.txt' 6 | echo hello > ' filename with leading space.txt' 7 | echo hello > '-filename with leading dash.txt' 8 | zip a.zip * 9 | unzip -Z -l -T a.zip > uzip.with-zipinfo.input 10 | unzip -qq -v a.zip > uzip.without-zipinfo--ymd.input 11 | rm a.zip 12 | 13 | uzip supports two date formats for "without-zipinfo" mode: ymd 14 | (YYYY-MM-DD) and mdy (MM-DD-YY). To create the 15 | 'uzip.without-zipinfo--mdy.input' file, with MM-DD-YY dates, I simply 16 | altered two dates with an editor (one with year before 70, one after). 17 | -------------------------------------------------------------------------------- /tests/src/vfs/extfs/helpers-list/data/uzip.with-zipinfo.env_vars: -------------------------------------------------------------------------------- 1 | MC_TEST_EXTFS_HAVE_ZIPINFO=1 2 | -------------------------------------------------------------------------------- /tests/src/vfs/extfs/helpers-list/data/uzip.without-zipinfo--mdy.env_vars: -------------------------------------------------------------------------------- 1 | MC_TEST_EXTFS_HAVE_ZIPINFO=0 2 | -------------------------------------------------------------------------------- /tests/src/vfs/extfs/helpers-list/data/uzip.without-zipinfo--mdy.input: -------------------------------------------------------------------------------- 1 | 0 Stored 0 0% 12-25-15 00:15 00000000 brushes/ 2 | 739 Defl:N 164 78% 09-16-78 16:45 2d7277eb colorrc 3 | -------------------------------------------------------------------------------- /tests/src/vfs/extfs/helpers-list/data/uzip.without-zipinfo--mdy.output: -------------------------------------------------------------------------------- 1 | drwxr-xr-x 1 <> <> 0 2015-12-25 00:15:00 ./brushes/ 2 | -rw-r--r-- 1 <> <> 739 1978-09-16 16:45:00 ./colorrc 3 | -------------------------------------------------------------------------------- /tests/src/vfs/extfs/helpers-list/data/uzip.without-zipinfo--ymd.env_vars: -------------------------------------------------------------------------------- 1 | MC_TEST_EXTFS_HAVE_ZIPINFO=0 2 | -------------------------------------------------------------------------------- /tests/src/vfs/extfs/helpers-list/data/uzoo.README: -------------------------------------------------------------------------------- 1 | 2 | The input file was created by running "zoo lq" on the archive at: 3 | 4 | https://github.com/MidnightCommander/mc/issues/3696 5 | 6 | Known bugs in our uzoo: 7 | - It doesn't support filenames with spaces. 8 | - It reports '0' gid. 9 | -------------------------------------------------------------------------------- /tests/src/vfs/extfs/helpers-list/data/uzoo.input: -------------------------------------------------------------------------------- 1 | 4 0% 4 26 Sep 16 12:56:02+61 тест/тест3/тест2.txt 2 | 4 0% 4 26 Sep 16 12:56:00+61 тест/тест3/тест1.txt 3 | 4 0% 4 26 Sep 16 12:56:08+61 тест/тест3/тест3.txt 4 | 4 0% 4 26 Sep 16 12:56:02+61 тест/тест1/тест2.txt 5 | 4 0% 4 26 Sep 16 12:56:00+61 тест/тест1/тест1.txt 6 | 4 0% 4 26 Sep 16 12:56:08+61 тест/тест1/тест3.txt 7 | 4 0% 4 26 Sep 16 12:56:02+61 тест/тест2/тест2.txt 8 | 4 0% 4 26 Sep 16 12:56:00+61 тест/тест2/тест1.txt 9 | 4 0% 4 26 Sep 16 12:56:08+61 тест/тест2/тест3.txt 10 | 4 0% 4 26 Sep 16 12:56:02+61 тест/test1/тест2.txt 11 | 4 0% 4 26 Sep 16 12:56:00+61 тест/test1/тест1.txt 12 | 4 0% 4 26 Sep 16 12:56:08+61 тест/test1/тест3.txt 13 | 4 0% 4 26 Sep 16 12:56:02+61 тест/test3/тест2.txt 14 | 4 0% 4 26 Sep 16 12:56:00+61 тест/test3/тест1.txt 15 | 4 0% 4 26 Sep 16 12:56:08+61 тест/test3/тест3.txt 16 | 4 0% 4 26 Sep 16 12:56:02+61 тест/test2/тест2.txt 17 | 4 0% 4 26 Sep 16 12:56:00+61 тест/test2/тест1.txt 18 | 4 0% 4 26 Sep 16 12:56:08+61 тест/test2/тест3.txt 19 | -------------------------------------------------------------------------------- /tests/src/vfs/extfs/helpers-list/mc_xcat: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # 4 | # This program is intended to be identical to 'cat' with the exception that 5 | # it ignores any arguments past the 1st one. 6 | # 7 | # To understand why it's needed, first read the section about 8 | # MC_TEST_EXTFS_LIST_CMD in the README. As explained there, the command in 9 | # MC_TEST_EXTFS_LIST_CMD has to ignore any extra arguments passed to it. 10 | # The tester achieves this by invoking a helper thus (roughly): 11 | # 12 | # export MC_TEST_EXTFS_LIST_CMD="mc_xcat /path/to/fake/input" 13 | # sh /path/to/helper list /dev/null 14 | # 15 | 16 | exec cat "$1" 17 | -------------------------------------------------------------------------------- /tests/src/vfs/extfs/helpers-list/misc/Makefile.am: -------------------------------------------------------------------------------- 1 | 2 | EXTRA_DIST = rpm/rpm2tags.pl rpm/test.spec 3 | -------------------------------------------------------------------------------- /tests/src/vfs/ftpfs/Makefile.am: -------------------------------------------------------------------------------- 1 | PACKAGE_STRING = "/src/vfs/ftpfs" 2 | 3 | AM_CPPFLAGS = \ 4 | $(GLIB_CFLAGS) \ 5 | -DTEST_DATA_DIR=\"$(abs_srcdir)/data\" \ 6 | -I$(top_srcdir) \ 7 | -I$(top_srcdir)/lib/vfs \ 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 = \ 19 | data/aix_list.input \ 20 | data/aix_list.output \ 21 | data/ms_list.input \ 22 | data/ms_list.output 23 | 24 | TESTS = \ 25 | ftpfs_parse_long_list 26 | 27 | check_PROGRAMS = $(TESTS) 28 | 29 | ftpfs_parse_long_list_SOURCES = \ 30 | ftpfs_parse_long_list.c 31 | -------------------------------------------------------------------------------- /tests/src/vfs/ftpfs/data/ms_list.input: -------------------------------------------------------------------------------- 1 | 10-15-13 10:08AM analytics 2 | 05-27-14 05:16AM aspnet_client 3 | 11-20-14 12:36PM 161645801 DiscIntercity.tsv 4 | 11-20-14 12:47PM 2031110 DiscLocal.tsv 5 | 03-22-15 01:15PM INC0023508 6 | 12-23-14 12:35PM 3403603000 Initial_KPI_20141223_62808477.CSV 7 | 10-14-13 04:07PM segment 8 | 11-20-14 02:54AM 399282436 SSUnlimAll.tsv 9 | 10-14-13 04:07PM subscriber 10 | 03-22-15 05:51PM tmp 11 | 11-20-14 11:45AM 773305597 UnlimOnnet.tsv 12 | -------------------------------------------------------------------------------- /tests/src/vfs/ftpfs/data/ms_list.output: -------------------------------------------------------------------------------- 1 | analytics 2 | aspnet_client 3 | DiscIntercity.tsv 4 | DiscLocal.tsv 5 | INC0023508 6 | Initial_KPI_20141223_62808477.CSV 7 | segment 8 | SSUnlimAll.tsv 9 | subscriber 10 | tmp 11 | UnlimOnnet.tsv 12 | --------------------------------------------------------------------------------