Noticed as a build failure on gentoo/glibc-2.24 as:
CCLD mc
./.libs/libinternal.a(tar.o): In function `tar_fill_stat':
/home/slyfox/dev/git/mc/src/vfs/tar/tar.c:428: undefined reference to `makedev'
collect2: error: ld returned 1 exit status
The change uses "lib/unixcompat.h" to pull
'makedev()' declaration from proper header.
Signed-off-by: Sergei Trofimovich <siarheit@google.com>
* 3693_cleanup: (22 commits)
Update copyright years.
(tar_fill_stat): add omitted breaks.
Aggressive use of whitespace() and whiteness() macros.
WCheck, WRadio: send MSG_MOTIFY without parameter.
Fish shell integration: ignore mc's prompt in history.
(tty_color_get_name_by_index): cleanup format compiler warning.
Cleanup comma compiler warnings.
(sftpfs_open_file): GCC zero initialization bug workaround.
Cleanup maybe-uninitialized compiler warnings.
(mc_search__g_regex_match_full_safe): don't use negative string length.
mcedit: syntax.syntax: highlight comments preceded by spaces.
misc/syntax/Syntax.in: fix patterns.
Use g_queue_free_full().
(mc_search__cond_struct_new_regex_ci_str): add documentation.
option_auto_syntax: change type to gboolean.
src/setup.c: minor refactoring of main options load.
setup: split integer and boolean options.
Change type from int to gboolean for variables controlled by checkboxes.
WCheck: change type of 'state' from int to gboolean.
WCheck: remove unused C_CHANGE.
...
Fish does something equivalent to bash's "HISTCONTROL=ignoreboth" by default,
so simply prefixing a command with a space will let it be ignored.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
Found by GCC 6.2.0.
color-internal.c:186:33: error: format '%X' expects argument of type 'unsigned int', but argument 3 has type 'int' [-Werror=format=]
Signed-off-by: Andreas Mohr <and@gmx.li>
We update our .output file to include the entries
`INFO/SCRIPTS/{PRE,POST}TRANS[PROG]`, which the rpm helper now emits.
(Tip: here's how we do this: we delete the output file and recreate it by
running the tester thus: "./run --create-output".)
Signed-off-by: Mooffie <mooffie@gmail.com>
Adding support for PRETRANS, PRETRANSPROG, POSTTRANS and
POSTTRANSPROG RPM tags which allow the relevant scripts to be visible
in the INFO/SCRIPTS vfs directory.
Signed-off-by: Jiri Tyr <jiri.tyr@gmail.com>
Signed-off-by: Mooffie <mooffie@gmail.com>
* 3751_extfs_rpm_tests:
extfs: rpm: move misc/* to misc/rpm/*.
extfs: rpm: add test for a custom package.
extfs: rpm: add tests.
extfs: rpm: introduce the rpm2tags tool.
extfs: rpm: make it testable.
Ticket #3751: extfs: rpm: introduce the $RPM_QUERY_FMT variable.
In the future we will probably place each helper's tests in a separate folder.
We'll then get rid of this 'misc/rpm' folder by moving it there.
Signed-off-by: Mooffie <mooffie@gmail.com>
We use a 'spec' contributed by Jiri Tyr.
We keep the previous test (by renaming rpm.* to rpm.glib.*), though, in case
somebody wants to work on data from "the real world".
Signed-off-by: Mooffie <mooffie@gmail.com>
This is a preliminary step before being able to write tests for our rpm helper.
We introduce 'rpm2tags', a tool for converting RPM packages to parsable text
files. This will enable us to write tests that can run even where the 'rpm'
program isn't installed.
Signed-off-by: Mooffie <mooffie@gmail.com>
The way we make this helper testable is a bit different than with other
helpers:
While in other helpers we make it possible to override just one or two
variables, here we make it possible to inject a code snippet into it. This is a
more powerful approach which lets us override even functions, as will be shown
in a following patch.
(As for relocating the "AllTAGS=..." line: all non-declarative code needs to be
moved past our new injection point, or else this code won't be affected by the
injection. BTW, the "$1" on that line isn't used; a vestige from old days.)
Signed-off-by: Mooffie <mooffie@gmail.com>
This minor refactoring will enable us to make this helper testable.
Instead of doing:
$RPM -qp --qf a b c
we are now doing:
$RPM_QUERY_FMT a b c
In a future patch we'll then be able to point $RPM_QUERY_FMT to some mock
program.
Signed-off-by: Mooffie <mooffie@gmail.com>
* 3757_two_plus_columns_broken:
Documentation: panels nowadays can display more than 2 columns.
Ticket #3757: cannot show more than one column in user defined listing mode.
In the past panels supported up to 2 "columns" only. We update the
documentation.
Note: a naive fix is to change it to say "After the panel size, you may specify
the number of columns to display in the panel". Unfortunately, users may think
by "columns" we mean "fields", so we have to word it differrently.
Signed-off-by: Mooffie <mooffie@gmail.com>
In user-defined listing mode, the format string lets us specify how many
columns to display. E.g., for 3 columns:
"half 3 type name | size | perm"
However, parse_panel_size() reads this digit only when `panel->list_type ==
list_brief`. We remove this check.
Incidentally, the assignment there to `panel->brief_cols` isn't needed. In
list_brief mode, `panel->brief_cols` is already set.
We also fix a related problem in the mouse handler: it erroneously assumes
`panel->list_cols > 1` happens only in list_brief mode.
(These bugs were introduced in commit fb474bc1c157.)
Signed-off-by: Mooffie <mooffie@gmail.com>
We introduce a mechanism by which tests can easily access configure-time
parameters (like @PERL@, @AWK@, ...).
It works by "sourcing" a file named config.sh (residing in the build tree):
. "$MC_TEST_EXTFS_CONFIG_SH"
$PERL -e 'print "hello"'
(Although config.sh has a shell syntax, Perl and Python programs too can
benefit from it, because it can be sourced into an .env_vars file and the
values exported from there.)
Of course, one can also use the traditional method, of *.in files listed in
configure.ac, but the mechanism introduced here is a more comfortable approach.
Signed-off-by: Mooffie <mooffie@gmail.com>