mirror of https://github.com/MidnightCommander/mc
Merge branch '4426_cleanup'
* 4426_cleanup: (49 commits) ru/mc.1: fix typo. doc/NEWS: indentation. Update po/*.po files. Ticket #4437: (file_frmt_time): fix time format. mcedit: use diff syntax highlighting for git commit messages (load_extension_file): make one-line long error messages multi-line. mc.ext.ini.in: fix a typo (closes MidnightCommander/mc#178). Filehighlight: recognize vsix files as zip files (closes MidnightCommander/mc#171). mcedit: support modern ECMAScript syntax in TypeScript (closes MidnightCommander/mc#172). Aadd syntax highlighting for modern ECMAScript (closes MidnightCommander/mc#172). extfs helpers: replace "perl -w" with "use warnings" (closes MidnightCommander/mc#174). (do_find): use dir_list_append() to create file list for panelization. (do_find): remove unused variable. Fix various typos in the source code (closes MidnightCommander/mc#177). (panel_destroy): don't free file list. (search_content): use g_get_monotonic_time() instead of g_get_real_time(). (extfs_get_plugins): minor optimization. (edit_read_syntax_rules): trivial refactoring. mcedit (syntax): minor optimization. src/filemanager/panelize.c: use GSList to hold panelize entries. ...
This commit is contained in:
commit
8a91de70c4
2
AUTHORS
2
AUTHORS
|
@ -67,7 +67,7 @@ Antonio Palama, DOS port <palama@posso.dm.unipi.it>
|
|||
DOS port.
|
||||
|
||||
Dmitry Koterov <dmitry.koterov@gmail.com>
|
||||
s3 extfs bugfixes and emprovements
|
||||
s3 extfs bugfixes and improvements
|
||||
|
||||
Egmont Koblinger <egmont@gmail.com>
|
||||
Support of 256 colors
|
||||
|
|
|
@ -215,7 +215,7 @@ mc_UNIT_TESTS
|
|||
|
||||
|
||||
dnl ############################################################################
|
||||
dnl Check for main libraies
|
||||
dnl Check for main libraries
|
||||
dnl ############################################################################
|
||||
|
||||
mc_CHECK_GLIB
|
||||
|
@ -313,7 +313,7 @@ dnl replacing lstat with statlstat on sco makes it more portable between
|
|||
dnl sco clones
|
||||
AC_CHECK_FUNCS(statlstat)
|
||||
|
||||
dnl Ovverriding mmap support. This has to be before AC_FUNC_MMAP is used.
|
||||
dnl Overriding mmap support. This has to be before AC_FUNC_MMAP is used.
|
||||
dnl We use only part of the functionality of mmap, so on AIX,
|
||||
dnl it's possible to use mmap, even if it doesn't pass the autoconf test.
|
||||
AC_ARG_WITH([mmap],
|
||||
|
|
|
@ -64,7 +64,7 @@ with those from xterm.tcap.
|
|||
The xterm.ad translation table contains many items (some of them may be
|
||||
unnecessary) but are included only to make it work on all different xterms
|
||||
(xterm terminfo and termcap databases have different sequences for the same
|
||||
keys in every different database, so xterm.ad works as a stardard to make
|
||||
keys in every different database, so xterm.ad works as a standard to make
|
||||
xterm.ti and termcap happy). If you find that xterm works well even if you
|
||||
delete some lines from the translations, feel free to do it.
|
||||
|
||||
|
|
82
doc/NEWS
82
doc/NEWS
|
@ -3,26 +3,26 @@ Version 4.8.29
|
|||
- Core
|
||||
|
||||
* Add more options for panel filter (#1373):
|
||||
* "Files only" (#4209)
|
||||
* "Case sensitive" (#4334)
|
||||
* "Using shell patterns"
|
||||
- "Files only" (#4209)
|
||||
- "Case sensitive" (#4334)
|
||||
- "Using shell patterns"
|
||||
* Continue copy after interrupt (#4409)
|
||||
* Restore menu accelerator for "Sort order": back to "S"; change menu accelerator for "SFTP link" to "N" (#4373)
|
||||
* Add support for cross-compilation with PERL path different between --build and --host (#4399)
|
||||
* Bootstrap with autotools providing direct support for Apple M1
|
||||
* Port mc.ext to INI format and rename to mc.ext.ini (#4141, #3742, #3191)
|
||||
* Implement compound (AND) conditions (Type/Shell and Type/Regex pairs) to disambiguate overloaded extensions
|
||||
* There is no fallback to previous mc.ext format
|
||||
- Implement compound (AND) conditions (Type/Shell and Type/Regex pairs) to disambiguate overloaded extensions
|
||||
- There is no fallback to previous mc.ext format
|
||||
|
||||
- Editor
|
||||
|
||||
* Change location of all user's syntax related stuff to ~/.local/share/mc/syntax/ directory (#4413)
|
||||
* syntax/Syntax: document location of syntax files (#4320)
|
||||
* Improvements of syntax highlighting:
|
||||
* YAML: improve multiline blocks highliting (#4059)
|
||||
- YAML: improve multiline blocks highliting (#4059)
|
||||
* New syntax highlighting:
|
||||
* Privoxy (https://www.privoxy.org) actions files (#4384)
|
||||
* TOML (Tom's Obvious Minimal Language) (#4412)
|
||||
- Privoxy (https://www.privoxy.org) actions files (#4384)
|
||||
- TOML (Tom's Obvious Minimal Language) (#4412)
|
||||
|
||||
- Misc
|
||||
|
||||
|
@ -60,42 +60,42 @@ Version 4.8.28
|
|||
|
||||
- VFS
|
||||
|
||||
* Remove SMB support (#1)
|
||||
* Remove SMB support (#1)
|
||||
|
||||
- Editor
|
||||
|
||||
* Add syntax highlighting:
|
||||
* Ngspice/SPICE (http://ngspice.sourceforge.net/) (#4316, #4319)
|
||||
* DOT/Graphviz (https://graphviz.org/doc/info/lang.html) (#4322)
|
||||
* Add syntax highlighting:
|
||||
- Ngspice/SPICE (http://ngspice.sourceforge.net/) (#4316, #4319)
|
||||
- DOT/Graphviz (https://graphviz.org/doc/info/lang.html) (#4322)
|
||||
|
||||
- Viewer
|
||||
|
||||
* Support file/dir macros from mc.ect for standalone viewer (#4150)
|
||||
* Support file/dir macros from mc.ect for standalone viewer (#4150)
|
||||
|
||||
- Misc
|
||||
|
||||
* Minimal version of "check" utility is 0.9.10.
|
||||
* Code cleanup (#4270, #4330)
|
||||
* Support Shift+Fn keys for KiTTY (#4325)
|
||||
* Filehighlight:
|
||||
* graphical formats: avif, jp2, jxl, heic, heif, psb, psd (#4328)
|
||||
* Markdown (#4351)
|
||||
* Minimal version of "check" utility is 0.9.10.
|
||||
* Code cleanup (#4270, #4330)
|
||||
* Support Shift+Fn keys for KiTTY (#4325)
|
||||
* Filehighlight:
|
||||
- graphical formats: avif, jp2, jxl, heic, heif, psb, psd (#4328)
|
||||
- Markdown (#4351)
|
||||
|
||||
- Fixes
|
||||
|
||||
* FTBFS with ncurses build with --disable-widec (#4200)
|
||||
* There is no exit on Ubuntu PPC64 big endian (#3887)
|
||||
* Segfault on change panel mode (#4323)
|
||||
* Accelerator conflict in Left/Right menu (#4284)
|
||||
* move a lot of files across filesystems is slow (#4287)
|
||||
* mc.ext: wrong order of rules: general matches are made before more specific ones (#4273)
|
||||
* mc.ext: compressed man pages are shown unformatted (#4272)
|
||||
* ext.d/misc.sh: invoking /bin/cat on systems that have no /bin/cat (like NixOS) (#4298)
|
||||
* mcedit: errors in syntax definitions (#4286)
|
||||
* VFS: FISH: when uploading a symbolic link, it creates both the link and its target (#4281)
|
||||
* VFS: SFTP: timestamps are not preserved for uploaded symlink (#4285)
|
||||
* VFS: EXTFS: incorrect test of isoinfo (#4326)
|
||||
* Typo in skin files (#3146)
|
||||
* FTBFS with ncurses build with --disable-widec (#4200)
|
||||
* There is no exit on Ubuntu PPC64 big endian (#3887)
|
||||
* Segfault on change panel mode (#4323)
|
||||
* Accelerator conflict in Left/Right menu (#4284)
|
||||
* move a lot of files across filesystems is slow (#4287)
|
||||
* mc.ext: wrong order of rules: general matches are made before more specific ones (#4273)
|
||||
* mc.ext: compressed man pages are shown unformatted (#4272)
|
||||
* ext.d/misc.sh: invoking /bin/cat on systems that have no /bin/cat (like NixOS) (#4298)
|
||||
* mcedit: errors in syntax definitions (#4286)
|
||||
* VFS: FISH: when uploading a symbolic link, it creates both the link and its target (#4281)
|
||||
* VFS: SFTP: timestamps are not preserved for uploaded symlink (#4285)
|
||||
* VFS: EXTFS: incorrect test of isoinfo (#4326)
|
||||
* Typo in skin files (#3146)
|
||||
|
||||
|
||||
Version 4.8.27
|
||||
|
@ -284,7 +284,7 @@ Version 4.8.24
|
|||
|
||||
- VFS
|
||||
|
||||
* sftpfs: support keyborad interactive authentication (#3921)
|
||||
* sftpfs: support keyboard interactive authentication (#3921)
|
||||
* uc1541 extfs: update up to 3.3 version (#3936)
|
||||
|
||||
- Editor
|
||||
|
@ -337,7 +337,7 @@ Version 4.8.23
|
|||
|
||||
* Expanded syntax highlighting rules (#3975):
|
||||
- expanded file name regexp for sh.syntax
|
||||
- use ini.syntax for systemd cofiguration files
|
||||
- use ini.syntax for systemd configuration files
|
||||
* Syntax updates:
|
||||
- shell (#3981)
|
||||
- ebuild (#3988)
|
||||
|
@ -798,7 +798,7 @@ Version 4.8.14
|
|||
* Info panel can't obtain file system statistics on Solaris (#3277)
|
||||
* "Shell patterns" broken beyond repair (#2309)
|
||||
* File selection by patterns uses bytes instead of unicode characters (#2743)
|
||||
* Copy files dosn't work as expected, when copying to a directory with the special symbol in its name (#3235)
|
||||
* Copy files doesn't work as expected, when copying to a directory with the special symbol in its name (#3235)
|
||||
* Wrong order of old_colors table items (#3404)
|
||||
* Input line: Alt+Backspace on one-letter word erases too much (#3390)
|
||||
* "Directory scanning" window is too narrow (#3162)
|
||||
|
@ -851,7 +851,7 @@ Version 4.8.13
|
|||
* mcviewer: incorrect percentage in mcview hex mode (#3258)
|
||||
* RAR VFS incorrectly recognizes UnRAR version (#3240)
|
||||
* viewbold and viewselected are missing from some skins (#3244)
|
||||
* Incorrect enconding name for manual page (#3239)
|
||||
* Incorrect encoding name for manual page (#3239)
|
||||
* "User menu -> View manual page" doesn't do coloring (#3243)
|
||||
|
||||
|
||||
|
@ -1164,7 +1164,7 @@ Version 4.8.5
|
|||
- xlhtml text-mode handler for XLS files
|
||||
- ppthtml text-mode handler for PPT/PPS files
|
||||
- open=view+pager fallback (noX) for PostScript, PDF, OD[PST] and DVI
|
||||
- standarized $DISPLAY checks
|
||||
- standardized $DISPLAY checks
|
||||
* File extension support:
|
||||
- SQLite database files (#2103)
|
||||
- compiled Java files (*.class) (#2103)
|
||||
|
@ -1287,7 +1287,7 @@ Version 4.8.2
|
|||
|
||||
- Core
|
||||
|
||||
* Added new flag -X (--no-x11) to allow dont't use X11 to get the state of modifiers Alt, Ctrl, Shift (#86)
|
||||
* Added new flag -X (--no-x11) to allow don't use X11 to get the state of modifiers Alt, Ctrl, Shift (#86)
|
||||
* Support of '~' as home dir in 'Start at:' field in 'Find File' dialog (#2694)
|
||||
* Support of '~' as home dir in hotlists (#2747)
|
||||
* Learn of 'Back Tab' is possible now in 'Learn keys' dialog (#2628)
|
||||
|
@ -1409,7 +1409,7 @@ Version 4.8.0-pre2
|
|||
- VFS
|
||||
|
||||
* New extfs plugin: gitfs (#2467)
|
||||
* patchfs enchancement: join several hunks of the same file into one VFS entry (#2573)
|
||||
* patchfs enhancement: join several hunks of the same file into one VFS entry (#2573)
|
||||
|
||||
- Misc
|
||||
|
||||
|
@ -1476,7 +1476,7 @@ Be aware.
|
|||
or stay old behaviour (current file under cursor) (#2266)
|
||||
* Added simple swap mode that means the swap of panel locations, in addition to current swap
|
||||
of panel content (#2368)
|
||||
* Cofiguration files now moved to directory specified in XDG_CONFIG_HOME environment variable (#1851)
|
||||
* Configuration files now moved to directory specified in XDG_CONFIG_HOME environment variable (#1851)
|
||||
* Panel options are read now from [Panels] section only. [Midnight-Commander] section is not read (#2305)
|
||||
* "Show mini info" checkbox was moved from the "Layout" dialog window to the "Panel options" one (#2305)
|
||||
* Select files by shift-left/right in file panel (#2534)
|
||||
|
@ -1511,7 +1511,7 @@ Be aware.
|
|||
|
||||
* New engine of the editor macro (#323)
|
||||
* Multiply repeat of the recorded actions (#323)
|
||||
* Call extermal scripts from the editor (#323, #2512)
|
||||
* Call external scripts from the editor (#323, #2512)
|
||||
* Added REDO action (#25)
|
||||
* Group UNDO by action (#27)
|
||||
* Selection is not reset after execute user menu (#2463)
|
||||
|
|
|
@ -2227,7 +2227,7 @@ Commander будет использовать для вывода содержи
|
|||
Если обе панели содержат списки файлов и каталогов, простая перестановка
|
||||
представляет собой изменение расположения панелей на экране: правая панель
|
||||
становится левой и наоборот. Если эта опция выключена, панели со списками файлов
|
||||
обмениваются соим содержимым, сохраняя формат списка и параметры сортировки.
|
||||
обмениваются своим содержимым, сохраняя формат списка и параметры сортировки.
|
||||
По умолчанию выключено.
|
||||
.PP
|
||||
.IR "Автосохранение настроек панелей" .
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/*
|
||||
Text conversion from one charset to another.
|
||||
|
||||
Copyright (C) 2001-2022
|
||||
Copyright (C) 2001-2023
|
||||
Free Software Foundation, Inc.
|
||||
|
||||
Written by:
|
||||
|
@ -213,7 +213,7 @@ load_codepages_list (void)
|
|||
|
||||
if (codepages == NULL)
|
||||
{
|
||||
/* files are not found, add defaullt codepage */
|
||||
/* files are not found, add default codepage */
|
||||
fprintf (stderr, "%s\n", _("Warning: cannot load codepages list"));
|
||||
|
||||
codepages = g_ptr_array_new ();
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
Handle events in application.
|
||||
Interface functions: init/deinit; start/stop
|
||||
|
||||
Copyright (C) 2011-2022
|
||||
Copyright (C) 2011-2023
|
||||
Free Software Foundation, Inc.
|
||||
|
||||
Written by:
|
||||
|
|
|
@ -75,7 +75,7 @@ where:
|
|||
name of the group, where event was initiated
|
||||
|
||||
event_name:
|
||||
event name. event_name ans event_group uniquely identify an event.
|
||||
event name. event_name and event_group uniquely identify an event.
|
||||
These parameters can be useful if event handler is tied to several events
|
||||
and the distinguish between different events (for example, function of logging)
|
||||
is required.
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
Handle any events in application.
|
||||
Manage events: add, delete, destroy, search
|
||||
|
||||
Copyright (C) 2011-2022
|
||||
Copyright (C) 2011-2023
|
||||
Free Software Foundation, Inc.
|
||||
|
||||
Written by:
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
Handle any events in application.
|
||||
Raise events.
|
||||
|
||||
Copyright (C) 2011-2022
|
||||
Copyright (C) 2011-2023
|
||||
Free Software Foundation, Inc.
|
||||
|
||||
Written by:
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
File highlight plugin.
|
||||
Interface functions
|
||||
|
||||
Copyright (C) 2009-2022
|
||||
Copyright (C) 2009-2023
|
||||
Free Software Foundation, Inc.
|
||||
|
||||
Written by:
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
File highlight plugin.
|
||||
Interface functions. get color pair index for highlighted file.
|
||||
|
||||
Copyright (C) 2009-2022
|
||||
Copyright (C) 2009-2023
|
||||
Free Software Foundation, Inc.
|
||||
|
||||
Written by:
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
File highlight plugin.
|
||||
Reading and parse rules from ini-files
|
||||
|
||||
Copyright (C) 2009-2022
|
||||
Copyright (C) 2009-2023
|
||||
Free Software Foundation, Inc.
|
||||
|
||||
Written by:
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/*
|
||||
GLIB - Library of useful routines for C programming
|
||||
|
||||
Copyright (C) 2009-2022
|
||||
Copyright (C) 2009-2023
|
||||
Free Software Foundation, Inc.
|
||||
|
||||
Written by:
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/*
|
||||
Global structure for some library-related variables
|
||||
|
||||
Copyright (C) 2009-2022
|
||||
Copyright (C) 2009-2023
|
||||
Free Software Foundation, Inc.
|
||||
|
||||
Written by:
|
||||
|
@ -60,6 +60,8 @@ mc_global_t mc_global =
|
|||
.sysconfig_dir = NULL,
|
||||
.share_data_dir = NULL,
|
||||
|
||||
.profile_name = NULL,
|
||||
|
||||
#ifdef HAVE_CHARSET
|
||||
.source_codepage = -1,
|
||||
.display_codepage = -1,
|
||||
|
|
|
@ -171,6 +171,8 @@ typedef struct
|
|||
/* share_data_dir: Area for default settings from developers */
|
||||
char *share_data_dir;
|
||||
|
||||
char *profile_name;
|
||||
|
||||
mc_config_t *main_config;
|
||||
mc_config_t *panels_config;
|
||||
|
||||
|
@ -223,7 +225,7 @@ typedef struct
|
|||
{
|
||||
/* Use the specified skin */
|
||||
char *skin;
|
||||
/* Dialog window and frop down menu have a shadow */
|
||||
/* Dialog window and drop down menu have a shadow */
|
||||
gboolean shadows;
|
||||
|
||||
char *setup_color_string;
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
Slavaz: Warning! this file is deprecated and should be replaced
|
||||
by mcevents functional.
|
||||
|
||||
Copyright (C) 1994-2022
|
||||
Copyright (C) 1994-2023
|
||||
Free Software Foundation, Inc.
|
||||
|
||||
Written by:
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/*
|
||||
Definitions of key bindings.
|
||||
|
||||
Copyright (C) 2005-2022
|
||||
Copyright (C) 2005-2023
|
||||
Free Software Foundation, Inc.
|
||||
|
||||
Written by:
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/*
|
||||
File locking
|
||||
|
||||
Copyright (C) 2003-2022
|
||||
Copyright (C) 2003-2023
|
||||
Free Software Foundation, Inc.
|
||||
|
||||
Written by:
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/*
|
||||
Provides a log file to ease tracing the program.
|
||||
|
||||
Copyright (C) 2006-2022
|
||||
Copyright (C) 2006-2023
|
||||
Free Software Foundation, Inc.
|
||||
|
||||
Written by:
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/*
|
||||
Configure module for the Midnight Commander
|
||||
|
||||
Copyright (C) 1994-2022
|
||||
Copyright (C) 1994-2023
|
||||
Free Software Foundation, Inc.
|
||||
|
||||
This file is part of the Midnight Commander.
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/*
|
||||
Configure module for the Midnight Commander
|
||||
|
||||
Copyright (C) 1994-2022
|
||||
Copyright (C) 1994-2023
|
||||
Free Software Foundation, Inc.
|
||||
|
||||
This file is part of the Midnight Commander.
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/*
|
||||
Widgets for the Midnight Commander
|
||||
|
||||
Copyright (C) 1994-2022
|
||||
Copyright (C) 1994-2023
|
||||
Free Software Foundation, Inc.
|
||||
|
||||
Authors:
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/*
|
||||
paths to configuration files
|
||||
|
||||
Copyright (C) 2010-2022
|
||||
Copyright (C) 2010-2023
|
||||
Free Software Foundation, Inc.
|
||||
|
||||
Written by:
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/*
|
||||
Configure module for the Midnight Commander
|
||||
|
||||
Copyright (C) 1994-2022
|
||||
Copyright (C) 1994-2023
|
||||
Free Software Foundation, Inc.
|
||||
|
||||
This file is part of the Midnight Commander.
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
Search text engine.
|
||||
Glob-style pattern matching
|
||||
|
||||
Copyright (C) 2009-2022
|
||||
Copyright (C) 2009-2023
|
||||
Free Software Foundation, Inc.
|
||||
|
||||
Written by:
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
Search text engine.
|
||||
HEX-style pattern matching
|
||||
|
||||
Copyright (C) 2009-2022
|
||||
Copyright (C) 2009-2023
|
||||
Free Software Foundation, Inc.
|
||||
|
||||
Written by:
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
Search text engine.
|
||||
Common share code for module.
|
||||
|
||||
Copyright (C) 2009-2022
|
||||
Copyright (C) 2009-2023
|
||||
Free Software Foundation, Inc.
|
||||
|
||||
Written by:
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
Search text engine.
|
||||
Plain search
|
||||
|
||||
Copyright (C) 2009-2022
|
||||
Copyright (C) 2009-2023
|
||||
Free Software Foundation, Inc.
|
||||
|
||||
Written by:
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
Search text engine.
|
||||
Regex search
|
||||
|
||||
Copyright (C) 2009-2022
|
||||
Copyright (C) 2009-2023
|
||||
Free Software Foundation, Inc.
|
||||
|
||||
Written by:
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
Search text engine.
|
||||
Interface functions
|
||||
|
||||
Copyright (C) 2009-2022
|
||||
Copyright (C) 2009-2023
|
||||
Free Software Foundation, Inc.
|
||||
|
||||
Written by:
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/*
|
||||
Provides a serialize/unserialize functionality for INI-like formats.
|
||||
|
||||
Copyright (C) 2011-2022
|
||||
Copyright (C) 2011-2023
|
||||
Free Software Foundation, Inc.
|
||||
|
||||
Written by:
|
||||
|
@ -98,7 +98,7 @@ go_to_end_of_serialized_string (const char *non_serialized_data,
|
|||
/**
|
||||
* Serialize some string object to string
|
||||
*
|
||||
* @param prefix prefix for serailization
|
||||
* @param prefix prefix for serialization
|
||||
* @param data data for serialization
|
||||
* @param error contain pointer to object for handle error code and message
|
||||
*
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/*
|
||||
Provides a functions for working with shell.
|
||||
|
||||
Copyright (C) 2006-2022
|
||||
Copyright (C) 2006-2023
|
||||
Free Software Foundation, Inc.
|
||||
|
||||
Written by:
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
Skins engine.
|
||||
Work with colors - backward compatibility
|
||||
|
||||
Copyright (C) 2009-2022
|
||||
Copyright (C) 2009-2023
|
||||
Free Software Foundation, Inc.
|
||||
|
||||
Written by:
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
Skins engine.
|
||||
Work with colors
|
||||
|
||||
Copyright (C) 2009-2022
|
||||
Copyright (C) 2009-2023
|
||||
Free Software Foundation, Inc.
|
||||
|
||||
Written by:
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
Skins engine.
|
||||
Interface functions
|
||||
|
||||
Copyright (C) 2009-2022
|
||||
Copyright (C) 2009-2023
|
||||
Free Software Foundation, Inc.
|
||||
|
||||
Written by:
|
||||
|
@ -103,7 +103,6 @@ mc_skin_try_to_load_default (void)
|
|||
mc_skin_reinit ();
|
||||
mc_skin_set_hardcoded_skin (&mc_skin__default);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/* --------------------------------------------------------------------------------------------- */
|
||||
|
@ -200,9 +199,8 @@ gchar *
|
|||
mc_skin_get (const gchar * group, const gchar * key, const gchar * default_value)
|
||||
{
|
||||
if (mc_global.tty.ugly_line_drawing)
|
||||
{
|
||||
return g_strdup (default_value);
|
||||
}
|
||||
|
||||
return mc_config_get_string (mc_skin__default.config, group, key, default_value);
|
||||
}
|
||||
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
Skins engine.
|
||||
Set of hardcoded skins
|
||||
|
||||
Copyright (C) 2009-2022
|
||||
Copyright (C) 2009-2023
|
||||
Free Software Foundation, Inc.
|
||||
|
||||
Written by:
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
Skins engine.
|
||||
Reading and parse ini-files
|
||||
|
||||
Copyright (C) 2009-2022
|
||||
Copyright (C) 2009-2023
|
||||
Free Software Foundation, Inc.
|
||||
|
||||
Written by:
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
Skins engine.
|
||||
Work with line draving chars.
|
||||
|
||||
Copyright (C) 2009-2022
|
||||
Copyright (C) 2009-2023
|
||||
Free Software Foundation, Inc.
|
||||
|
||||
Written by:
|
||||
|
@ -64,31 +64,33 @@ mc_skin_lines_parse_ini_file (mc_skin_t * mc_skin)
|
|||
mc_skin_hardcoded_space_lines (mc_skin);
|
||||
else if (mc_global.tty.ugly_line_drawing)
|
||||
mc_skin_hardcoded_ugly_lines (mc_skin);
|
||||
else
|
||||
{
|
||||
/* single lines */
|
||||
mc_tty_frm[MC_TTY_FRM_VERT] = mc_skin_lines_load_frm (mc_skin, "vert");
|
||||
mc_tty_frm[MC_TTY_FRM_HORIZ] = mc_skin_lines_load_frm (mc_skin, "horiz");
|
||||
mc_tty_frm[MC_TTY_FRM_LEFTTOP] = mc_skin_lines_load_frm (mc_skin, "lefttop");
|
||||
mc_tty_frm[MC_TTY_FRM_RIGHTTOP] = mc_skin_lines_load_frm (mc_skin, "righttop");
|
||||
mc_tty_frm[MC_TTY_FRM_LEFTBOTTOM] = mc_skin_lines_load_frm (mc_skin, "leftbottom");
|
||||
mc_tty_frm[MC_TTY_FRM_RIGHTBOTTOM] = mc_skin_lines_load_frm (mc_skin, "rightbottom");
|
||||
mc_tty_frm[MC_TTY_FRM_TOPMIDDLE] = mc_skin_lines_load_frm (mc_skin, "topmiddle");
|
||||
mc_tty_frm[MC_TTY_FRM_BOTTOMMIDDLE] = mc_skin_lines_load_frm (mc_skin, "bottommiddle");
|
||||
mc_tty_frm[MC_TTY_FRM_LEFTMIDDLE] = mc_skin_lines_load_frm (mc_skin, "leftmiddle");
|
||||
mc_tty_frm[MC_TTY_FRM_RIGHTMIDDLE] = mc_skin_lines_load_frm (mc_skin, "rightmiddle");
|
||||
mc_tty_frm[MC_TTY_FRM_CROSS] = mc_skin_lines_load_frm (mc_skin, "cross");
|
||||
|
||||
/* single lines */
|
||||
mc_tty_frm[MC_TTY_FRM_VERT] = mc_skin_lines_load_frm (mc_skin, "vert");
|
||||
mc_tty_frm[MC_TTY_FRM_HORIZ] = mc_skin_lines_load_frm (mc_skin, "horiz");
|
||||
mc_tty_frm[MC_TTY_FRM_LEFTTOP] = mc_skin_lines_load_frm (mc_skin, "lefttop");
|
||||
mc_tty_frm[MC_TTY_FRM_RIGHTTOP] = mc_skin_lines_load_frm (mc_skin, "righttop");
|
||||
mc_tty_frm[MC_TTY_FRM_LEFTBOTTOM] = mc_skin_lines_load_frm (mc_skin, "leftbottom");
|
||||
mc_tty_frm[MC_TTY_FRM_RIGHTBOTTOM] = mc_skin_lines_load_frm (mc_skin, "rightbottom");
|
||||
mc_tty_frm[MC_TTY_FRM_TOPMIDDLE] = mc_skin_lines_load_frm (mc_skin, "topmiddle");
|
||||
mc_tty_frm[MC_TTY_FRM_BOTTOMMIDDLE] = mc_skin_lines_load_frm (mc_skin, "bottommiddle");
|
||||
mc_tty_frm[MC_TTY_FRM_LEFTMIDDLE] = mc_skin_lines_load_frm (mc_skin, "leftmiddle");
|
||||
mc_tty_frm[MC_TTY_FRM_RIGHTMIDDLE] = mc_skin_lines_load_frm (mc_skin, "rightmiddle");
|
||||
mc_tty_frm[MC_TTY_FRM_CROSS] = mc_skin_lines_load_frm (mc_skin, "cross");
|
||||
|
||||
/* double lines */
|
||||
mc_tty_frm[MC_TTY_FRM_DVERT] = mc_skin_lines_load_frm (mc_skin, "dvert");
|
||||
mc_tty_frm[MC_TTY_FRM_DHORIZ] = mc_skin_lines_load_frm (mc_skin, "dhoriz");
|
||||
mc_tty_frm[MC_TTY_FRM_DLEFTTOP] = mc_skin_lines_load_frm (mc_skin, "dlefttop");
|
||||
mc_tty_frm[MC_TTY_FRM_DRIGHTTOP] = mc_skin_lines_load_frm (mc_skin, "drighttop");
|
||||
mc_tty_frm[MC_TTY_FRM_DLEFTBOTTOM] = mc_skin_lines_load_frm (mc_skin, "dleftbottom");
|
||||
mc_tty_frm[MC_TTY_FRM_DRIGHTBOTTOM] = mc_skin_lines_load_frm (mc_skin, "drightbottom");
|
||||
mc_tty_frm[MC_TTY_FRM_DTOPMIDDLE] = mc_skin_lines_load_frm (mc_skin, "dtopmiddle");
|
||||
mc_tty_frm[MC_TTY_FRM_DBOTTOMMIDDLE] = mc_skin_lines_load_frm (mc_skin, "dbottommiddle");
|
||||
mc_tty_frm[MC_TTY_FRM_DLEFTMIDDLE] = mc_skin_lines_load_frm (mc_skin, "dleftmiddle");
|
||||
mc_tty_frm[MC_TTY_FRM_DRIGHTMIDDLE] = mc_skin_lines_load_frm (mc_skin, "drightmiddle");
|
||||
/* double lines */
|
||||
mc_tty_frm[MC_TTY_FRM_DVERT] = mc_skin_lines_load_frm (mc_skin, "dvert");
|
||||
mc_tty_frm[MC_TTY_FRM_DHORIZ] = mc_skin_lines_load_frm (mc_skin, "dhoriz");
|
||||
mc_tty_frm[MC_TTY_FRM_DLEFTTOP] = mc_skin_lines_load_frm (mc_skin, "dlefttop");
|
||||
mc_tty_frm[MC_TTY_FRM_DRIGHTTOP] = mc_skin_lines_load_frm (mc_skin, "drighttop");
|
||||
mc_tty_frm[MC_TTY_FRM_DLEFTBOTTOM] = mc_skin_lines_load_frm (mc_skin, "dleftbottom");
|
||||
mc_tty_frm[MC_TTY_FRM_DRIGHTBOTTOM] = mc_skin_lines_load_frm (mc_skin, "drightbottom");
|
||||
mc_tty_frm[MC_TTY_FRM_DTOPMIDDLE] = mc_skin_lines_load_frm (mc_skin, "dtopmiddle");
|
||||
mc_tty_frm[MC_TTY_FRM_DBOTTOMMIDDLE] = mc_skin_lines_load_frm (mc_skin, "dbottommiddle");
|
||||
mc_tty_frm[MC_TTY_FRM_DLEFTMIDDLE] = mc_skin_lines_load_frm (mc_skin, "dleftmiddle");
|
||||
mc_tty_frm[MC_TTY_FRM_DRIGHTMIDDLE] = mc_skin_lines_load_frm (mc_skin, "drightmiddle");
|
||||
}
|
||||
}
|
||||
|
||||
/* --------------------------------------------------------------------------------------------- */
|
||||
|
|
|
@ -29,7 +29,7 @@
|
|||
* displaynig: all handled as zero with characters, expect combing character
|
||||
* at the begin of string, this character has with one (space add before),
|
||||
* so str_term_width is not good for computing width of singles characters
|
||||
* (never return zero, expect emtpy string)
|
||||
* (never return zero, expect empty string)
|
||||
* for compatibility are strings composed before displaynig
|
||||
* comparing: comparing decompose all string before comparing, n-compare
|
||||
* functions do not work as is usual, because same strings do not have to be
|
||||
|
@ -54,7 +54,7 @@
|
|||
*/
|
||||
typedef enum
|
||||
{
|
||||
/* success means, that convertion has been finished successully
|
||||
/* success means, that conversion has been finished successfully
|
||||
*/
|
||||
ESTR_SUCCESS = 0,
|
||||
/* problem means, that not every characters was successfully converted (They are
|
||||
|
@ -156,7 +156,7 @@ struct str_class
|
|||
|
||||
/*** global variables defined in .c file *********************************************************/
|
||||
|
||||
/* standard convertors */
|
||||
/* standard converters */
|
||||
extern GIConv str_cnv_to_term;
|
||||
extern GIConv str_cnv_from_term;
|
||||
/* from terminal encoding to terminal encoding */
|
||||
|
@ -168,17 +168,17 @@ struct str_class str_utf8_init (void);
|
|||
struct str_class str_8bit_init (void);
|
||||
struct str_class str_ascii_init (void);
|
||||
|
||||
/* create convertor from "from_enc" to terminal encoding
|
||||
/* create converter from "from_enc" to terminal encoding
|
||||
* if "from_enc" is not supported return INVALID_CONV
|
||||
*/
|
||||
GIConv str_crt_conv_from (const char *from_enc);
|
||||
|
||||
/* create convertor from terminal encoding to "to_enc"
|
||||
/* create converter from terminal encoding to "to_enc"
|
||||
* if "to_enc" is not supported return INVALID_CONV
|
||||
*/
|
||||
GIConv str_crt_conv_to (const char *to_enc);
|
||||
|
||||
/* close convertor, do not close str_cnv_to_term, str_cnv_from_term,
|
||||
/* close converter, do not close str_cnv_to_term, str_cnv_from_term,
|
||||
* str_cnv_not_convert
|
||||
*/
|
||||
void str_close_conv (GIConv conv);
|
||||
|
@ -352,13 +352,13 @@ gboolean str_isprint (const char *ch);
|
|||
*/
|
||||
gboolean str_iscombiningmark (const char *ch);
|
||||
|
||||
/* write lower from of fisrt characters in ch into out
|
||||
/* write lower from of first characters in ch into out
|
||||
* decrase remain by size of returned characters
|
||||
* if out is not big enough, do nothing
|
||||
*/
|
||||
gboolean str_toupper (const char *ch, char **out, size_t * remain);
|
||||
|
||||
/* write upper from of fisrt characters in ch into out
|
||||
/* write upper from of first characters in ch into out
|
||||
* decrase remain by size of returned characters
|
||||
* if out is not big enough, do nothing
|
||||
*/
|
||||
|
@ -524,7 +524,7 @@ char *str_create_key_for_filename (const char *text, gboolean case_sen);
|
|||
*/
|
||||
int str_key_collate (const char *t1, const char *t2, gboolean case_sen);
|
||||
|
||||
/* release_key created by str_create_key, only rigth way to release key
|
||||
/* release_key created by str_create_key, only right way to release key
|
||||
* I
|
||||
*/
|
||||
void str_release_key (char *key, gboolean case_sen);
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/*
|
||||
Functions for replacing substrings in strings.
|
||||
|
||||
Copyright (C) 2013-2022
|
||||
Copyright (C) 2013-2023
|
||||
Free Software Foundation, Inc.
|
||||
|
||||
Written by:
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/*
|
||||
Functions for escaping and unescaping strings
|
||||
|
||||
Copyright (C) 2009-2022
|
||||
Copyright (C) 2009-2023
|
||||
Free Software Foundation, Inc.
|
||||
|
||||
Written by:
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/*
|
||||
Common strings utilities
|
||||
|
||||
Copyright (C) 2007-2022
|
||||
Copyright (C) 2007-2023
|
||||
Free Software Foundation, Inc.
|
||||
|
||||
Written by:
|
||||
|
@ -380,7 +380,7 @@ str_detect_termencoding (void)
|
|||
/* On Linux, nl_langinfo (CODESET) returns upper case UTF-8 whether the LANG is set
|
||||
to utf-8 or UTF-8.
|
||||
On Mac OS X, it returns the same case as the LANG input.
|
||||
So let tranform result of nl_langinfo (CODESET) to upper case unconditionally. */
|
||||
So let transform result of nl_langinfo (CODESET) to upper case unconditionally. */
|
||||
term_encoding = g_ascii_strup (nl_langinfo (CODESET), -1);
|
||||
}
|
||||
|
||||
|
@ -983,7 +983,7 @@ strrstr_skip_count (const char *haystack, const char *needle, size_t skip_count)
|
|||
}
|
||||
|
||||
/* --------------------------------------------------------------------------------------------- */
|
||||
/* Interprete string as a non-negative decimal integer, optionally multiplied by various values.
|
||||
/* Interpret string as a non-negative decimal integer, optionally multiplied by various values.
|
||||
*
|
||||
* @param str input value
|
||||
* @param invalid set to TRUE if "str" does not represent a number in this format
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/*
|
||||
8bit strings utilities
|
||||
|
||||
Copyright (C) 2007-2022
|
||||
Copyright (C) 2007-2023
|
||||
Free Software Foundation, Inc.
|
||||
|
||||
Written by:
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/*
|
||||
ASCII strings utilities
|
||||
|
||||
Copyright (C) 2007-2022
|
||||
Copyright (C) 2007-2023
|
||||
Free Software Foundation, Inc.
|
||||
|
||||
Written by:
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/*
|
||||
UTF-8 strings utilities
|
||||
|
||||
Copyright (C) 2007-2022
|
||||
Copyright (C) 2007-2023
|
||||
Free Software Foundation, Inc.
|
||||
|
||||
Written by:
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/*
|
||||
Compare strings while treating digits characters numerically.
|
||||
|
||||
Copyright (C) 1997-2022
|
||||
Copyright (C) 1997-2023
|
||||
Free Software Foundation, Inc.
|
||||
|
||||
This file is part of the GNU C Library.
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/* A more useful interface to strtol.
|
||||
|
||||
Copyright (C) 1995-2022
|
||||
Copyright (C) 1995-2023
|
||||
Free Software Foundation, Inc.
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
|
@ -147,6 +147,8 @@ xstrtoumax (const char *s, char **ptr, int base, uintmax_t * val, const char *va
|
|||
case 'M':
|
||||
case 'm':
|
||||
case 'P':
|
||||
case 'Q':
|
||||
case 'R':
|
||||
case 'T':
|
||||
case 't':
|
||||
case 'Y':
|
||||
|
@ -221,6 +223,14 @@ xstrtoumax (const char *s, char **ptr, int base, uintmax_t * val, const char *va
|
|||
overflow = bkm_scale_by_power (&tmp, base, 5);
|
||||
break;
|
||||
|
||||
case 'Q': /* quetta or 2**100 */
|
||||
overflow = bkm_scale_by_power (&tmp, base, 10);
|
||||
break;
|
||||
|
||||
case 'R': /* ronna or 2**90 */
|
||||
overflow = bkm_scale_by_power (&tmp, base, 9);
|
||||
break;
|
||||
|
||||
case 'T': /* tera or tebi */
|
||||
case 't': /* 't' is undocumented; for compatibility only */
|
||||
overflow = bkm_scale_by_power (&tmp, base, 4);
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/*
|
||||
Time formatting functions
|
||||
|
||||
Copyright (C) 1994-2022
|
||||
Copyright (C) 1994-2023
|
||||
Free Software Foundation, Inc.
|
||||
|
||||
Written by:
|
||||
|
@ -86,7 +86,7 @@ i18n_checktimelength (void)
|
|||
|
||||
if (lt == NULL)
|
||||
{
|
||||
/* huh, localtime() doesnt seem to work ... falling back to "(invalid)" */
|
||||
/* huh, localtime() doesn't seem to work ... falling back to "(invalid)" */
|
||||
length = str_term_width1 (_(INVALID_TIME_TEXT));
|
||||
}
|
||||
else
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
|
||||
/** \file timefmt.h
|
||||
* \brief Header: time formating functions
|
||||
* \brief Header: time formatting functions
|
||||
*/
|
||||
|
||||
#ifndef MC__UTIL_TIMEFMT_H
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/*
|
||||
Internal stuff of color setup
|
||||
|
||||
Copyright (C) 1994-2022
|
||||
Copyright (C) 1994-2023
|
||||
Free Software Foundation, Inc.
|
||||
|
||||
Written by:
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/*
|
||||
Color setup for NCurses screen library
|
||||
|
||||
Copyright (C) 1994-2022
|
||||
Copyright (C) 1994-2023
|
||||
Free Software Foundation, Inc.
|
||||
|
||||
Written by:
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/*
|
||||
Color setup for S_Lang screen library
|
||||
|
||||
Copyright (C) 1994-2022
|
||||
Copyright (C) 1994-2023
|
||||
Free Software Foundation, Inc.
|
||||
|
||||
Written by:
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
Color setup.
|
||||
Interface functions.
|
||||
|
||||
Copyright (C) 1994-2022
|
||||
Copyright (C) 1994-2023
|
||||
Free Software Foundation, Inc.
|
||||
|
||||
Written by:
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/*
|
||||
Keyboard support routines.
|
||||
|
||||
Copyright (C) 1994-2022
|
||||
Copyright (C) 1994-2023
|
||||
Free Software Foundation, Inc.
|
||||
|
||||
Written by:
|
||||
|
@ -450,7 +450,7 @@ static key_define_t xterm_key_defines[] = {
|
|||
{0, NULL, MCKEY_NOACTION},
|
||||
};
|
||||
|
||||
/* qansi-m terminals have a much more key combinatios,
|
||||
/* qansi-m terminals have a much more key combinations,
|
||||
which are undefined in termcap/terminfo */
|
||||
static key_define_t qansi_key_defines[] = {
|
||||
/* qansi-m terminal */
|
||||
|
@ -2164,7 +2164,7 @@ learn_key (void)
|
|||
char buffer[256];
|
||||
char *p = buffer;
|
||||
|
||||
tty_keypad (FALSE); /* disable intepreting keys by ncurses */
|
||||
tty_keypad (FALSE); /* disable interpreting keys by ncurses */
|
||||
c = tty_lowlevel_getch ();
|
||||
while (c == -1)
|
||||
c = tty_lowlevel_getch (); /* Sanity check, should be unnecessary */
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
/*
|
||||
Additional keyboard support routines.
|
||||
|
||||
Copyright (C) 1998-2022
|
||||
Copyright (C) 1998-2023
|
||||
Free Software Foundation, Inc.
|
||||
|
||||
Written by:
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/*
|
||||
Mouse managing
|
||||
|
||||
Copyright (C) 1994-2022
|
||||
Copyright (C) 1994-2023
|
||||
Free Software Foundation, Inc.
|
||||
|
||||
Written by:
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/*
|
||||
Internal stuff of the terminal controlling library.
|
||||
|
||||
Copyright (C) 2019-2022
|
||||
Copyright (C) 2019-2023
|
||||
Free Software Foundation, Inc.
|
||||
|
||||
Written by:
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
Interface to the terminal controlling library.
|
||||
Ncurses wrapper.
|
||||
|
||||
Copyright (C) 2005-2022
|
||||
Copyright (C) 2005-2023
|
||||
Free Software Foundation, Inc.
|
||||
|
||||
Written by:
|
||||
|
@ -364,7 +364,7 @@ tty_reset_shell_mode (void)
|
|||
void
|
||||
tty_raw_mode (void)
|
||||
{
|
||||
raw (); /* FIXME: uneeded? */
|
||||
raw (); /* FIXME: unneeded? */
|
||||
cbreak ();
|
||||
}
|
||||
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
Interface to the terminal controlling library.
|
||||
Slang wrapper.
|
||||
|
||||
Copyright (C) 2005-2022
|
||||
Copyright (C) 2005-2023
|
||||
Free Software Foundation, Inc.
|
||||
|
||||
Written by:
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/*
|
||||
Interface to the terminal controlling library.
|
||||
|
||||
Copyright (C) 2005-2022
|
||||
Copyright (C) 2005-2023
|
||||
Free Software Foundation, Inc.
|
||||
|
||||
Written by:
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/*
|
||||
Terminal management xterm and rxvt support
|
||||
|
||||
Copyright (C) 1995-2022
|
||||
Copyright (C) 1995-2023
|
||||
Free Software Foundation, Inc.
|
||||
|
||||
Written by:
|
||||
|
@ -103,7 +103,7 @@ show_rxvt_contents (int starty, unsigned char y1, unsigned char y2)
|
|||
unsigned char *k;
|
||||
int bytes, i, j, cols = 0;
|
||||
|
||||
y1 += mc_global.keybar_visible != 0 ? 1 : 0; /* i don't knwo why we need this - paul */
|
||||
y1 += mc_global.keybar_visible != 0 ? 1 : 0; /* i don't know why we need this - paul */
|
||||
y2 += mc_global.keybar_visible != 0 ? 1 : 0;
|
||||
while (anything_ready ())
|
||||
tty_lowlevel_getch ();
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/*
|
||||
X11 support for the Midnight Commander.
|
||||
|
||||
Copyright (C) 2005-2022
|
||||
Copyright (C) 2005-2023
|
||||
Free Software Foundation, Inc.
|
||||
|
||||
Written by:
|
||||
|
|
12
lib/util.c
12
lib/util.c
|
@ -1,7 +1,7 @@
|
|||
/*
|
||||
Various utilities
|
||||
|
||||
Copyright (C) 1994-2022
|
||||
Copyright (C) 1994-2023
|
||||
Free Software Foundation, Inc.
|
||||
|
||||
Written by:
|
||||
|
@ -384,7 +384,7 @@ size_trunc_sep (uintmax_t size, gboolean use_si)
|
|||
d = x + sizeof (x) - 1;
|
||||
*d-- = '\0';
|
||||
/* @size format is "size unit", i.e. "[digits][space][letters]".
|
||||
Copy all charactes after digits. */
|
||||
Copy all characters after digits. */
|
||||
while (p >= y && !g_ascii_isdigit (*p))
|
||||
*d-- = *p--;
|
||||
for (count = 0; p >= y; count++)
|
||||
|
@ -451,8 +451,10 @@ size_trunc_len (char *buffer, unsigned int len, uintmax_t size, int units, gbool
|
|||
#endif
|
||||
};
|
||||
/* *INDENT-ON* */
|
||||
static const char *const suffix[] = { "", "K", "M", "G", "T", "P", "E", "Z", "Y", NULL };
|
||||
static const char *const suffix_lc[] = { "", "k", "m", "g", "t", "p", "e", "z", "y", NULL };
|
||||
static const char *const suffix[] =
|
||||
{ "", "K", "M", "G", "T", "P", "E", "Z", "Y", "R", "Q", NULL };
|
||||
static const char *const suffix_lc[] =
|
||||
{ "", "k", "m", "g", "t", "p", "e", "z", "y", "r", "q", NULL };
|
||||
|
||||
const char *const *sfx = use_si ? suffix_lc : suffix;
|
||||
int j = 0;
|
||||
|
@ -893,7 +895,7 @@ get_compression_type (int fd, const char *name)
|
|||
return COMPRESSION_ZSTD;
|
||||
|
||||
str_len = strlen (name);
|
||||
/* HACK: we must belive to extension of LZMA file :) ... */
|
||||
/* HACK: we must believe to extension of LZMA file :) ... */
|
||||
if ((str_len > 5 && strcmp (&name[str_len - 5], ".lzma") == 0) ||
|
||||
(str_len > 4 && strcmp (&name[str_len - 4], ".tlz") == 0))
|
||||
return COMPRESSION_LZMA;
|
||||
|
|
26
lib/util.h
26
lib/util.h
|
@ -234,7 +234,6 @@ void save_stop_handler (void);
|
|||
char *tilde_expand (const char *directory);
|
||||
|
||||
void canonicalize_pathname_custom (char *path, canon_path_flags_t flags);
|
||||
void canonicalize_pathname (char *path);
|
||||
|
||||
char *mc_realpath (const char *path, char *resolved_path);
|
||||
|
||||
|
@ -279,7 +278,9 @@ void mc_replace_error (GError ** dest, int code, const char *format, ...) G_GNUC
|
|||
|
||||
gboolean mc_time_elapsed (gint64 * timestamp, gint64 delay);
|
||||
|
||||
/*** inline functions **************************************************/
|
||||
/* --------------------------------------------------------------------------------------------- */
|
||||
/*** inline functions ****************************************************************************/
|
||||
/* --------------------------------------------------------------------------------------------- */
|
||||
|
||||
static inline gboolean
|
||||
exist_file (const char *name)
|
||||
|
@ -287,10 +288,31 @@ exist_file (const char *name)
|
|||
return (access (name, R_OK) == 0);
|
||||
}
|
||||
|
||||
/* --------------------------------------------------------------------------------------------- */
|
||||
|
||||
static inline gboolean
|
||||
is_exe (mode_t mode)
|
||||
{
|
||||
return ((mode & (S_IXUSR | S_IXGRP | S_IXOTH)) != 0);
|
||||
}
|
||||
|
||||
/* --------------------------------------------------------------------------------------------- */
|
||||
/**
|
||||
* Canonicalize path with CANON_PATH_ALL.
|
||||
*
|
||||
* @param path path to file
|
||||
* @param flags canonicalization flags
|
||||
*
|
||||
* All modifications of @path are made in place.
|
||||
* Well formed UNC paths are modified only in the local part.
|
||||
*/
|
||||
|
||||
static inline void
|
||||
canonicalize_pathname (char *path)
|
||||
{
|
||||
canonicalize_pathname_custom (path, CANON_PATH_ALL);
|
||||
}
|
||||
|
||||
/* --------------------------------------------------------------------------------------------- */
|
||||
|
||||
#endif /* MC_UTIL_H */
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/*
|
||||
Various utilities - Unix variants
|
||||
|
||||
Copyright (C) 1994-2022
|
||||
Copyright (C) 1994-2023
|
||||
Free Software Foundation, Inc.
|
||||
|
||||
Written by:
|
||||
|
@ -363,7 +363,7 @@ my_exit (int status)
|
|||
* Shell (or command) will be found in paths described in PATH variable
|
||||
* (if shell parameter doesn't begin from path delimiter)
|
||||
* @parameter command Command for shell (or first parameter for command, if flags contain EXECUTE_AS_SHELL)
|
||||
* @return 0 if successfull, -1 otherwise
|
||||
* @return 0 if successful, -1 otherwise
|
||||
*/
|
||||
|
||||
int
|
||||
|
@ -378,12 +378,12 @@ my_system (int flags, const char *shell, const char *command)
|
|||
*
|
||||
* @parameter flags addition conditions for running external programs.
|
||||
* @parameter shell shell (if flags contain EXECUTE_AS_SHELL), command to run otherwise.
|
||||
* Shell (or command) will be found in pathes described in PATH variable
|
||||
* Shell (or command) will be found in paths described in PATH variable
|
||||
* (if shell parameter doesn't begin from path delimiter)
|
||||
* @parameter ... Command for shell with addition parameters for shell
|
||||
* (or parameters for command, if flags contain EXECUTE_AS_SHELL).
|
||||
* Should be NULL terminated.
|
||||
* @return 0 if successfull, -1 otherwise
|
||||
* @return 0 if successful, -1 otherwise
|
||||
*/
|
||||
|
||||
int
|
||||
|
@ -416,7 +416,7 @@ my_systeml (int flags, const char *shell, ...)
|
|||
* @parameter command command to run. Command will be found in paths described in PATH variable
|
||||
* (if command parameter doesn't begin from path delimiter)
|
||||
* @parameter argv Array of strings (NULL-terminated) with parameters for command
|
||||
* @return 0 if successfull, -1 otherwise
|
||||
* @return 0 if successful, -1 otherwise
|
||||
*/
|
||||
|
||||
int
|
||||
|
@ -464,7 +464,7 @@ my_systemv (const char *command, char *const argv[])
|
|||
* Shell (or command) will be found in paths described in PATH variable
|
||||
* (if shell parameter doesn't begin from path delimiter)
|
||||
* @parameter argv Array of strings (NULL-terminated) with parameters for command
|
||||
* @return 0 if successfull, -1 otherwise
|
||||
* @return 0 if successful, -1 otherwise
|
||||
*/
|
||||
|
||||
int
|
||||
|
@ -495,7 +495,7 @@ my_systemv_flags (int flags, const char *command, char *const argv[])
|
|||
* @parameter command command line of child process
|
||||
* @parameter read_out do or don't read the stdout of child process
|
||||
* @parameter read_err do or don't read the stderr of child process
|
||||
* @paremeter error contains pointer to object to handle error code and message
|
||||
* @parameter error contains pointer to object to handle error code and message
|
||||
*
|
||||
* @return newly created object of mc_pipe_t class in success, NULL otherwise
|
||||
*/
|
||||
|
@ -559,7 +559,7 @@ mc_popen (const char *command, gboolean read_out, gboolean read_err, GError ** e
|
|||
* p->xxx.len == MC_PIPE_STREAM_UNREAD: stream p->xxx was not read;
|
||||
* p->xxx.len == MC_PIPE_ERROR_READ: reading error, and p->xxx.errno is set appropriately.
|
||||
*
|
||||
* @paremeter error contains pointer to object to handle error code and message
|
||||
* @parameter error contains pointer to object to handle error code and message
|
||||
*/
|
||||
|
||||
void
|
||||
|
@ -666,8 +666,8 @@ mc_pstream_get_string (mc_pipe_stream_t * ps)
|
|||
/**
|
||||
* Close pipe and destroy pipe descriptor.
|
||||
*
|
||||
* @paremeter p pipe descriptor
|
||||
* @paremeter error contains pointer to object to handle error code and message
|
||||
* @parameter p pipe descriptor
|
||||
* @parameter error contains pointer to object to handle error code and message
|
||||
*/
|
||||
|
||||
void
|
||||
|
@ -759,8 +759,6 @@ tilde_expand (const char *directory)
|
|||
* @param path path to file
|
||||
* @param flags canonicalization flags
|
||||
*
|
||||
* @return a new path
|
||||
*
|
||||
* All modifications of @path are made in place.
|
||||
* Well formed UNC paths are modified only in the local part.
|
||||
*/
|
||||
|
@ -986,25 +984,6 @@ canonicalize_pathname_custom (char *path, canon_path_flags_t flags)
|
|||
}
|
||||
}
|
||||
|
||||
/* --------------------------------------------------------------------------------------------- */
|
||||
/**
|
||||
* Canonicalize path with CANON_PATH_ALL.
|
||||
*
|
||||
* @param path path to file
|
||||
* @param flags canonicalization flags
|
||||
*
|
||||
* @return a new path
|
||||
*
|
||||
* All modifications of @path are made in place.
|
||||
* Well formed UNC paths are modified only in the local part.
|
||||
*/
|
||||
|
||||
void
|
||||
canonicalize_pathname (char *path)
|
||||
{
|
||||
canonicalize_pathname_custom (path, CANON_PATH_ALL);
|
||||
}
|
||||
|
||||
/* --------------------------------------------------------------------------------------------- */
|
||||
|
||||
char *
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/*
|
||||
Directory cache support
|
||||
|
||||
Copyright (C) 1998-2022
|
||||
Copyright (C) 1998-2023
|
||||
Free Software Foundation, Inc.
|
||||
|
||||
Written by:
|
||||
|
@ -341,7 +341,7 @@ vfs_s_free_super (struct vfs_class *me, struct vfs_s_super *super)
|
|||
}
|
||||
|
||||
#if 0
|
||||
/* FIXME: We currently leak small ammount of memory, sometimes. Fix it if you can. */
|
||||
/* FIXME: We currently leak small amount of memory, sometimes. Fix it if you can. */
|
||||
if (super->ino_usage != 0)
|
||||
message (D_ERROR, "Direntry warning",
|
||||
"Super ino_usage is %d, memory leak", super->ino_usage);
|
||||
|
@ -1318,7 +1318,7 @@ vfs_s_open (const vfs_path_t * vpath, int flags, mode_t mode)
|
|||
|
||||
if (ino == NULL)
|
||||
{
|
||||
char *dirname, *name;
|
||||
char *name;
|
||||
struct vfs_s_entry *ent;
|
||||
struct vfs_s_inode *dir;
|
||||
|
||||
|
@ -1326,9 +1326,9 @@ vfs_s_open (const vfs_path_t * vpath, int flags, mode_t mode)
|
|||
if ((flags & O_CREAT) == 0 || path_element->class->write == NULL)
|
||||
return NULL;
|
||||
|
||||
dirname = g_path_get_dirname (q);
|
||||
dir = vfs_s_find_inode (path_element->class, super, dirname, LINK_FOLLOW, FL_DIR);
|
||||
g_free (dirname);
|
||||
name = g_path_get_dirname (q);
|
||||
dir = vfs_s_find_inode (path_element->class, super, name, LINK_FOLLOW, FL_DIR);
|
||||
g_free (name);
|
||||
if (dir == NULL)
|
||||
return NULL;
|
||||
|
||||
|
@ -1431,7 +1431,7 @@ vfs_s_retrieve_file (struct vfs_class *me, struct vfs_s_inode *ino)
|
|||
{
|
||||
/* If you want reget, you'll have to open file with O_LINEAR */
|
||||
off_t total = 0;
|
||||
char buffer[8192];
|
||||
char buffer[BUF_8K];
|
||||
int handle;
|
||||
ssize_t n;
|
||||
off_t stat_size = ino->st.st_size;
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/*
|
||||
Virtual File System garbage collection code
|
||||
|
||||
Copyright (C) 2003-2022
|
||||
Copyright (C) 2003-2023
|
||||
Free Software Foundation, Inc.
|
||||
|
||||
Written by:
|
||||
|
@ -62,7 +62,7 @@
|
|||
*
|
||||
* (1) When the last open file in your filesystem gets closed, conditionally
|
||||
* create a stamp. You do this with vfs_stamp_create(). (The meaning
|
||||
* of "conditionaly" is explained below.)
|
||||
* of "conditionally" is explained below.)
|
||||
*
|
||||
* (2) When a file in your filesystem is opened, delete the stamp. You do
|
||||
* this with vfs_rmstamp().
|
||||
|
@ -207,7 +207,7 @@ vfs_stamp_create (struct vfs_class *vclass, vfsid id)
|
|||
const vfs_path_element_t *path_element;
|
||||
|
||||
/* There are three directories we have to take care of: current_dir,
|
||||
current_panel->cwd and other_panel->cwd. Athough most of the time either
|
||||
current_panel->cwd and other_panel->cwd. Although most of the time either
|
||||
current_dir and current_panel->cwd or current_dir and other_panel->cwd are the
|
||||
same, it's possible that all three are different -- Norbert */
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/*
|
||||
Virtual File System: interface functions
|
||||
|
||||
Copyright (C) 2011-2022
|
||||
Copyright (C) 2011-2023
|
||||
Free Software Foundation, Inc.
|
||||
|
||||
Written by:
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/*
|
||||
Network utilities for the Midnight Commander Virtual File System.
|
||||
|
||||
Copyright (C) 1995-2022
|
||||
Copyright (C) 1995-2023
|
||||
Free Software Foundation, Inc.
|
||||
|
||||
This file is part of the Midnight Commander.
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/*
|
||||
Routines for parsing output from the 'ls' command.
|
||||
|
||||
Copyright (C) 1988-2022
|
||||
Copyright (C) 1988-2023
|
||||
Free Software Foundation, Inc.
|
||||
|
||||
Copyright (C) 1995, 1996 Miguel de Icaza
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/*
|
||||
Virtual File System path handlers
|
||||
|
||||
Copyright (C) 2011-2022
|
||||
Copyright (C) 2011-2023
|
||||
Free Software Foundation, Inc.
|
||||
|
||||
Written by:
|
||||
|
@ -535,7 +535,7 @@ vfs_path_tokens_add_class_info (const vfs_path_element_t * element, GString * re
|
|||
if (((element->class->flags & VFSF_LOCAL) == 0 || ret_tokens->len > 0)
|
||||
&& element_tokens->len > 0)
|
||||
{
|
||||
char *url_str;
|
||||
GString *url_str;
|
||||
|
||||
if (ret_tokens->len > 0 && !IS_PATH_SEP (ret_tokens->str[ret_tokens->len - 1]))
|
||||
g_string_append_c (ret_tokens, PATH_SEP);
|
||||
|
@ -544,13 +544,13 @@ vfs_path_tokens_add_class_info (const vfs_path_element_t * element, GString * re
|
|||
g_string_append (ret_tokens, VFS_PATH_URL_DELIMITER);
|
||||
|
||||
url_str = vfs_path_build_url_params_str (element, TRUE);
|
||||
if (*url_str != '\0')
|
||||
if (url_str->len != 0)
|
||||
{
|
||||
g_string_append (ret_tokens, url_str);
|
||||
g_string_append_len (ret_tokens, url_str->str, url_str->len);
|
||||
g_string_append_c (ret_tokens, PATH_SEP);
|
||||
}
|
||||
|
||||
g_free (url_str);
|
||||
g_string_free (url_str, TRUE);
|
||||
}
|
||||
|
||||
#ifdef HAVE_CHARSET
|
||||
|
@ -651,7 +651,8 @@ vfs_path_to_str_flags (const vfs_path_t * vpath, int elements_count, vfs_path_fl
|
|||
element = vfs_path_get_by_index (vpath, element_index);
|
||||
if (element->vfs_prefix != NULL)
|
||||
{
|
||||
char *url_str;
|
||||
GString *url_str;
|
||||
|
||||
if (!is_relative && (buffer->len == 0 || !IS_PATH_SEP (buffer->str[buffer->len - 1])))
|
||||
g_string_append_c (buffer, PATH_SEP);
|
||||
|
||||
|
@ -659,14 +660,13 @@ vfs_path_to_str_flags (const vfs_path_t * vpath, int elements_count, vfs_path_fl
|
|||
g_string_append (buffer, VFS_PATH_URL_DELIMITER);
|
||||
|
||||
url_str = vfs_path_build_url_params_str (element, !(flags & VPF_STRIP_PASSWORD));
|
||||
|
||||
if (*url_str != '\0')
|
||||
if (url_str->len != 0)
|
||||
{
|
||||
g_string_append (buffer, url_str);
|
||||
g_string_append_len (buffer, url_str->str, url_str->len);
|
||||
g_string_append_c (buffer, PATH_SEP);
|
||||
}
|
||||
|
||||
g_free (url_str);
|
||||
g_string_free (url_str, TRUE);
|
||||
}
|
||||
|
||||
#ifdef HAVE_CHARSET
|
||||
|
@ -1072,7 +1072,7 @@ vfs_path_element_need_cleanup_converter (const vfs_path_element_t * element)
|
|||
* @param vpath pointer to path structure
|
||||
* encoding name of charset
|
||||
*
|
||||
* @return pointer to path structure (for use function in anoter functions)
|
||||
* @return pointer to path structure (for use function in another functions)
|
||||
*/
|
||||
vfs_path_t *
|
||||
vfs_path_change_encoding (vfs_path_t * vpath, const char *encoding)
|
||||
|
@ -1504,7 +1504,7 @@ vfs_path_vtokens_get (const vfs_path_t * vpath, ssize_t start_position, ssize_t
|
|||
* @return newly allocated string
|
||||
*/
|
||||
|
||||
char *
|
||||
GString *
|
||||
vfs_path_build_url_params_str (const vfs_path_element_t * element, gboolean keep_password)
|
||||
{
|
||||
GString *buffer;
|
||||
|
@ -1512,7 +1512,7 @@ vfs_path_build_url_params_str (const vfs_path_element_t * element, gboolean keep
|
|||
if (element == NULL)
|
||||
return NULL;
|
||||
|
||||
buffer = g_string_new ("");
|
||||
buffer = g_string_sized_new (64);
|
||||
|
||||
if (element->user != NULL)
|
||||
g_string_append (buffer, element->user);
|
||||
|
@ -1540,7 +1540,7 @@ vfs_path_build_url_params_str (const vfs_path_element_t * element, gboolean keep
|
|||
g_string_append_printf (buffer, "%d", element->port);
|
||||
}
|
||||
|
||||
return g_string_free (buffer, FALSE);
|
||||
return buffer;
|
||||
}
|
||||
|
||||
/* --------------------------------------------------------------------------------------------- */
|
||||
|
@ -1552,24 +1552,23 @@ vfs_path_build_url_params_str (const vfs_path_element_t * element, gboolean keep
|
|||
* @return newly allocated string
|
||||
*/
|
||||
|
||||
char *
|
||||
GString *
|
||||
vfs_path_element_build_pretty_path_str (const vfs_path_element_t * element)
|
||||
{
|
||||
char *url_params;
|
||||
GString *pretty_path;
|
||||
GString *url_params, *pretty_path;
|
||||
|
||||
pretty_path = g_string_new (element->class->prefix);
|
||||
g_string_append (pretty_path, VFS_PATH_URL_DELIMITER);
|
||||
|
||||
url_params = vfs_path_build_url_params_str (element, FALSE);
|
||||
g_string_append (pretty_path, url_params);
|
||||
g_free (url_params);
|
||||
g_string_append_len (pretty_path, url_params->str, url_params->len);
|
||||
g_string_free (url_params, TRUE);
|
||||
|
||||
if (!IS_PATH_SEP (*element->path))
|
||||
g_string_append_c (pretty_path, PATH_SEP);
|
||||
|
||||
g_string_append (pretty_path, element->path);
|
||||
return g_string_free (pretty_path, FALSE);
|
||||
return pretty_path;
|
||||
}
|
||||
|
||||
/* --------------------------------------------------------------------------------------------- */
|
||||
|
|
|
@ -89,8 +89,8 @@ vfs_path_t *vfs_path_change_encoding (vfs_path_t * vpath, const char *encoding);
|
|||
char *vfs_path_serialize (const vfs_path_t * vpath, GError ** error);
|
||||
vfs_path_t *vfs_path_deserialize (const char *data, GError ** error);
|
||||
|
||||
char *vfs_path_build_url_params_str (const vfs_path_element_t * element, gboolean keep_password);
|
||||
char *vfs_path_element_build_pretty_path_str (const vfs_path_element_t * element);
|
||||
GString *vfs_path_build_url_params_str (const vfs_path_element_t * element, gboolean keep_password);
|
||||
GString *vfs_path_element_build_pretty_path_str (const vfs_path_element_t * element);
|
||||
|
||||
size_t vfs_path_len (const vfs_path_t * vpath);
|
||||
gboolean vfs_path_equal (const vfs_path_t * vpath1, const vfs_path_t * vpath2);
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/*
|
||||
Utilities for VFS modules.
|
||||
|
||||
Copyright (C) 1988-2022
|
||||
Copyright (C) 1988-2023
|
||||
Free Software Foundation, Inc.
|
||||
|
||||
Copyright (C) 1995, 1996 Miguel de Icaza
|
||||
|
@ -177,7 +177,7 @@ vfs_findgid (const char *gname)
|
|||
* Create a temporary file with a name resembling the original.
|
||||
* This is needed e.g. for local copies requested by extfs.
|
||||
* Some extfs scripts may look at the extension.
|
||||
* We also protect stupid scripts agains dangerous names.
|
||||
* We also protect stupid scripts against dangerous names.
|
||||
*/
|
||||
|
||||
int
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/*
|
||||
Virtual File System switch code
|
||||
|
||||
Copyright (C) 1995-2022
|
||||
Copyright (C) 1995-2023
|
||||
Free Software Foundation, Inc.
|
||||
|
||||
Written by: 1995 Miguel de Icaza
|
||||
|
@ -34,7 +34,7 @@
|
|||
* \author Pavel Machek
|
||||
* \date 1995, 1998
|
||||
* \warning functions like extfs_lstat() have right to destroy any
|
||||
* strings you pass to them. This is acutally ok as you g_strdup what
|
||||
* strings you pass to them. This is actually ok as you g_strdup what
|
||||
* you are passing to them, anyway; still, beware.
|
||||
*
|
||||
* Namespace: exports *many* functions with vfs_ prefix; exports
|
||||
|
@ -110,8 +110,8 @@ static long vfs_free_handle_list = -1;
|
|||
* plugin to automatic detect encoding
|
||||
* path - path to translate
|
||||
* size - how many bytes from path translate
|
||||
* defcnv - convertor, that is used as default, when path does not contain any
|
||||
* #enc: subtring
|
||||
* defcnv - converter, that is used as default, when path does not contain any
|
||||
* #enc: substring
|
||||
* buffer - used to store result of translation
|
||||
*/
|
||||
|
||||
|
|
|
@ -27,13 +27,6 @@
|
|||
|
||||
#define VFS_CLASS(a) ((struct vfs_class *) (a))
|
||||
|
||||
/**
|
||||
* This is the type of callback function passed to vfs_fill_names.
|
||||
* It gets the name of the virtual file system as its first argument.
|
||||
* See also:
|
||||
* vfs_fill_names().
|
||||
*/
|
||||
|
||||
#define VFS_ENCODING_PREFIX "#enc:"
|
||||
|
||||
#define O_ALL (O_CREAT | O_EXCL | O_NOCTTY | O_NDELAY | O_SYNC | O_WRONLY | O_RDWR | O_RDONLY)
|
||||
|
@ -86,6 +79,12 @@
|
|||
#define E_PROTO EIO
|
||||
#endif
|
||||
|
||||
/**
|
||||
* This is the type of callback function passed to vfs_fill_names.
|
||||
* It gets the name of the virtual file system as its first argument.
|
||||
* See also:
|
||||
* vfs_fill_names().
|
||||
*/
|
||||
typedef void (*fill_names_f) (const char *);
|
||||
|
||||
typedef void *vfsid;
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/*
|
||||
Widgets for the Midnight Commander
|
||||
|
||||
Copyright (C) 2020-2022
|
||||
Copyright (C) 2020-2023
|
||||
The Free Software Foundation, Inc.
|
||||
|
||||
Authors:
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/*
|
||||
Widgets for the Midnight Commander
|
||||
|
||||
Copyright (C) 1994-2022
|
||||
Copyright (C) 1994-2023
|
||||
Free Software Foundation, Inc.
|
||||
|
||||
Authors:
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/*
|
||||
Widgets for the Midnight Commander
|
||||
|
||||
Copyright (C) 1994-2022
|
||||
Copyright (C) 1994-2023
|
||||
Free Software Foundation, Inc.
|
||||
|
||||
Authors:
|
||||
|
@ -249,7 +249,7 @@ buttonbar_new (void)
|
|||
widget_init (w, &r, buttonbar_callback, buttonbar_mouse_callback);
|
||||
|
||||
w->pos_flags = WPOS_KEEP_HORZ | WPOS_KEEP_BOTTOM;
|
||||
widget_want_hotkey (w, TRUE);
|
||||
w->options |= WOP_WANT_HOTKEY;
|
||||
|
||||
return bb;
|
||||
}
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/*
|
||||
Widgets for the Midnight Commander
|
||||
|
||||
Copyright (C) 1994-2022
|
||||
Copyright (C) 1994-2023
|
||||
Free Software Foundation, Inc.
|
||||
|
||||
Authors:
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
|
||||
Original idea and code: Oleg "Olegarch" Konovalov <olegarch@linuxinside.com>
|
||||
|
||||
Copyright (C) 2009-2022
|
||||
Copyright (C) 2009-2023
|
||||
Free Software Foundation, Inc.
|
||||
|
||||
Written by:
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/*
|
||||
Dialog box features module for the Midnight Commander
|
||||
|
||||
Copyright (C) 1994-2022
|
||||
Copyright (C) 1994-2023
|
||||
Free Software Foundation, Inc.
|
||||
|
||||
This file is part of the Midnight Commander.
|
||||
|
@ -538,8 +538,7 @@ dlg_init (WDialog * h)
|
|||
group_set_current_widget_next (g);
|
||||
|
||||
widget_set_state (wh, WST_ACTIVE, TRUE);
|
||||
/* draw dialog and focus found widget */
|
||||
widget_set_state (wh, WST_FOCUSED, TRUE);
|
||||
widget_draw (wh);
|
||||
|
||||
h->ret_value = 0;
|
||||
}
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/*
|
||||
Widgets for the Midnight Commander
|
||||
|
||||
Copyright (C) 2020-2022
|
||||
Copyright (C) 2020-2023
|
||||
The Free Software Foundation, Inc.
|
||||
|
||||
Authors:
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/*
|
||||
Widgets for the Midnight Commander
|
||||
|
||||
Copyright (C) 1994-2022
|
||||
Copyright (C) 1994-2023
|
||||
Free Software Foundation, Inc.
|
||||
|
||||
Authors:
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/*
|
||||
Widget group features module for the Midnight Commander
|
||||
|
||||
Copyright (C) 2020-2022
|
||||
Copyright (C) 2020-2023
|
||||
The Free Software Foundation, Inc.
|
||||
|
||||
Written by:
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/*
|
||||
Widgets for the Midnight Commander
|
||||
|
||||
Copyright (C) 1994-2022
|
||||
Copyright (C) 1994-2023
|
||||
Free Software Foundation, Inc.
|
||||
|
||||
Authors:
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/*
|
||||
Widgets for the Midnight Commander
|
||||
|
||||
Copyright (C) 1994-2022
|
||||
Copyright (C) 1994-2023
|
||||
Free Software Foundation, Inc.
|
||||
|
||||
Authors:
|
||||
|
|
|
@ -29,7 +29,7 @@ typedef struct history_descriptor_t
|
|||
int action; /**< return action in the history */
|
||||
char *text; /**< return text of selected item */
|
||||
|
||||
size_t max_width; /**< maximum width of sring in history */
|
||||
size_t max_width; /**< maximum width of string in history */
|
||||
struct WListbox *listbox; /**< listbox widget to draw history */
|
||||
|
||||
history_create_item_func create; /**< function to create item of @list */
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/*
|
||||
Widgets for the Midnight Commander
|
||||
|
||||
Copyright (C) 1994-2022
|
||||
Copyright (C) 1994-2023
|
||||
Free Software Foundation, Inc.
|
||||
|
||||
Authors:
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/*
|
||||
Widgets for the Midnight Commander
|
||||
|
||||
Copyright (C) 1994-2022
|
||||
Copyright (C) 1994-2023
|
||||
Free Software Foundation, Inc.
|
||||
|
||||
Authors:
|
||||
|
@ -161,7 +161,7 @@ do_show_hist (WInput * in)
|
|||
history_show (&hd);
|
||||
|
||||
/* in->history.list was destroyed in history_show().
|
||||
* Apply new history and current postition to avoid use-after-free. */
|
||||
* Apply new history and current position to avoid use-after-free. */
|
||||
in->history.list = hd.list;
|
||||
in->history.current = in->history.list;
|
||||
if (hd.text != NULL)
|
||||
|
|
|
@ -141,7 +141,7 @@ input_get_ctext (const WInput * in)
|
|||
*
|
||||
* @param in input line
|
||||
*
|
||||
* @return TRUE if buffer of @in is empty, FALSE othewise.
|
||||
* @return TRUE if buffer of @in is empty, FALSE otherwise.
|
||||
*/
|
||||
static inline gboolean
|
||||
input_is_empty (const WInput * in)
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
Input line filename/username/hostname/variable/command completion.
|
||||
(Let mc type for you...)
|
||||
|
||||
Copyright (C) 1995-2022
|
||||
Copyright (C) 1995-2023
|
||||
Free Software Foundation, Inc.
|
||||
|
||||
Written by:
|
||||
|
@ -665,7 +665,6 @@ command_completion_function (const char *text, int state, input_complete_t flags
|
|||
expanded = tilde_expand (*cur_path != '\0' ? cur_path : ".");
|
||||
cur_word = mc_build_filename (expanded, u_text, (char *) NULL);
|
||||
g_free (expanded);
|
||||
canonicalize_pathname (cur_word);
|
||||
cur_path = strchr (cur_path, '\0') + 1;
|
||||
init_state = state;
|
||||
}
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/*
|
||||
Widgets for the Midnight Commander
|
||||
|
||||
Copyright (C) 1994-2022
|
||||
Copyright (C) 1994-2023
|
||||
Free Software Foundation, Inc.
|
||||
|
||||
Authors:
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/*
|
||||
Widget based utility functions.
|
||||
|
||||
Copyright (C) 1994-2022
|
||||
Copyright (C) 1994-2023
|
||||
Free Software Foundation, Inc.
|
||||
|
||||
Authors:
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/*
|
||||
Widgets for the Midnight Commander
|
||||
|
||||
Copyright (C) 1994-2022
|
||||
Copyright (C) 1994-2023
|
||||
Free Software Foundation, Inc.
|
||||
|
||||
Authors:
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/*
|
||||
Pulldown menu code
|
||||
|
||||
Copyright (C) 1994-2022
|
||||
Copyright (C) 1994-2023
|
||||
Free Software Foundation, Inc.
|
||||
|
||||
Written by:
|
||||
|
@ -958,8 +958,6 @@ menubar_new (GList * menu)
|
|||
w = WIDGET (menubar);
|
||||
widget_init (w, &r, menubar_callback, menubar_mouse_callback);
|
||||
w->pos_flags = WPOS_KEEP_HORZ | WPOS_KEEP_TOP;
|
||||
/* initially, menubar is not selectable */
|
||||
widget_set_options (w, WOP_SELECTABLE, FALSE);
|
||||
w->options |= WOP_TOP_SELECT;
|
||||
w->keymap = menu_map;
|
||||
menubar_set_menu (menubar, menu);
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/*
|
||||
Widgets for the Midnight Commander
|
||||
|
||||
Copyright (C) 2016-2022
|
||||
Copyright (C) 2016-2023
|
||||
Free Software Foundation, Inc.
|
||||
|
||||
Authors:
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/*
|
||||
Widget based utility functions.
|
||||
|
||||
Copyright (C) 1994-2022
|
||||
Copyright (C) 1994-2023
|
||||
Free Software Foundation, Inc.
|
||||
|
||||
Authors:
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/*
|
||||
Widgets for the Midnight Commander
|
||||
|
||||
Copyright (C) 1994-2022
|
||||
Copyright (C) 1994-2023
|
||||
Free Software Foundation, Inc.
|
||||
|
||||
Authors:
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/* Rectangular class for Midnight Commander widgets
|
||||
|
||||
Copyright (C) 2020-2022
|
||||
Copyright (C) 2020-2023
|
||||
The Free Software Foundation, Inc.
|
||||
|
||||
Written by:
|
||||
|
@ -52,7 +52,7 @@
|
|||
*
|
||||
* @param y y-coordinate of left-up corner
|
||||
* @param x x-coordinate of left-up corner
|
||||
* @param lines heigth
|
||||
* @param lines height
|
||||
* @param cols width
|
||||
*
|
||||
* @return newly allocated WRect object.
|
||||
|
@ -78,7 +78,7 @@ rect_new (int y, int x, int lines, int cols)
|
|||
* @param r WRect object
|
||||
* @param y y-coordinate of left-up corner
|
||||
* @param x x-coordinate of left-up corner
|
||||
* @param lines heigth
|
||||
* @param lines height
|
||||
* @param cols width
|
||||
*/
|
||||
|
||||
|
@ -112,7 +112,7 @@ rect_move (WRect * r, int dy, int dx)
|
|||
* Change size of rectangle area keeping it's position.
|
||||
*
|
||||
* @param r WRect object
|
||||
* @param dl change size value of heigth
|
||||
* @param dl change size value of height
|
||||
* @param dc change size value of width
|
||||
*/
|
||||
|
||||
|
@ -128,9 +128,9 @@ rect_resize (WRect * r, int dl, int dc)
|
|||
* Change size of rectangle area keeping it's center.
|
||||
*
|
||||
* @param r WRect object
|
||||
* @param dl change size value of y-coordinate and heigth
|
||||
* Positive value means move up and increase heigth.
|
||||
* Negative value means move down and decrease heigth.
|
||||
* @param dl change size value of y-coordinate and height
|
||||
* Positive value means move up and increase height.
|
||||
* Negative value means move down and decrease height.
|
||||
* @param dc change size value of x-coordinate and width
|
||||
* Positive value means move left and increase width.
|
||||
* Negative value means move right and decrease width.
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue