Commit Graph

88 Commits

Author SHA1 Message Date
Leonard den Ottolander
772c2600b9 * utilunix.c (mc_tmpdir): Check that tmpdir is correctly initialized. 2005-07-27 15:03:24 +00:00
Roland Illig
c22e826761 Updated German translation. 2005-07-22 21:16:50 +00:00
Pavel Roskin
1f60f44145 Update postal address of Free Software Foundation. 2005-05-27 03:35:10 +00:00
Roland Illig
6407873f69 * cons.handler.c: Marked unused parameters.
* dir.c: Likewise.
	* find.c: Likewise.
	* help.c: Likewise.
	* layout.c: Likewise.
	* mountlist.c: Likewise.
	* popt.c: Likewise.
	* poptconfig.c: Likewise.
	* popthelp.c: Likewise.
	* regex.c: Likewise.
	* subshell.c: Likewise.
	* tree.c: Likewise.
	* util.c: Likewise.
	* utilunix.c: Likewise.
	* widget.c: Likewise.
	* wtools.c: Likewise.
2005-02-08 22:33:52 +00:00
Roland Illig
fc85bdba7e * *.c: Reordered header inclusion. 2005-02-08 09:04:03 +00:00
Andrew V. Samoilov
711f268786 * utilunix.c (mc_realpath) [USE_SYSTEM_REALPATH]: Use realpath(). 2005-02-02 18:28:49 +00:00
Andrew V. Samoilov
172cead7fb * utilunix.c (init_groups): Use glib memory allocation functions. 2005-02-01 12:04:05 +00:00
Miguel de Icaza
324f4c5644 2005-01-29 Miguel de Icaza <miguel@novell.com>
* utilunix.c (init_groups): Added support for getgrouplist patch
	from Stefan Gohmann <gohmann@univention.de>.

2005-01-29  Miguel de Icaza  <miguel@novell.com>

	* configure.ac: Check for getgrouplist API call.
2005-01-30 05:06:13 +00:00
Andrew V. Samoilov
d332606fd5 * subshell.c (do_subshell_chdir): Use mc_realpath() to fix tcsh's
problem with symlink.
        * utilunix.c: Add function mc_realpath(). Is the BSD version of
        realpath(3).
        * util.h: Add mc_realpath() declaration.
2005-01-13 19:37:46 +00:00
Roland Illig
612e8238c9 * utilunix.c (mc_tmpdir): Use putenv(3) instead of setenv(3) if
the latter is not available. Needed for Solaris.
2004-11-01 12:03:45 +00:00
Roland Illig
11f8d4e2ea * utilunix.c (mc_tmpdir): Convert uid to unsigned long for
pathname of the temporary directory.
2004-10-23 12:55:35 +00:00
Roland Illig
3716da314b * utilunix.c (mc_tmpdir): Convert uid to int for pathname
of the temporary directory.

	From Pavel Tsekov <ptsekov gmx net>.
2004-10-23 07:18:48 +00:00
Roland Illig
d3774b9d94 * utilunix.c (close_error_pipe): Fixed possible invalid memory access
(three lines below).
2004-10-11 21:53:30 +00:00
Andrew V. Samoilov
68a7c1dfab * boxes.c (configure_vfs): g_free handles NULL argument too,
no need for the comparison.
        * cmd.c (set_panel_filter_to): Likewise.
            (do_link): Likewise.
            (quick_cd_cmd): Likewise.
        * color.c (done_colors): Likewise.
        * dialog.c (destroy_dlg): Likewise.
        * dir.c (alloc_dir_copy): Likewise.
        * ext.c (flush_extension_file): Likewise.
        * file.c (copy_file_file): Likewise.
            (panel_operate): Likewise.
        * hotlist.c (remove_group): Likewise.
            (remove_from_hotlist): Likewise.
            (done_hotlist): Likewise.
        * main.c (main): Likewise.
        * setup.c (panel_load_setup): Likewise.
        * tree.c (tree_destroy): Likewise.
            (show_tree): Likewise.
        * user.c (user_menu_cmd): Likewise.
        * utilunix.c (i_cache_add): Likewise.
            (putenv): Likewise.
        * view.c (view_done): Likewise.
            (regexp_search): Likewise.
            (normal_search): Likewise.
            (change_viewer): Likewise.
        * widget.c (label_set_text): Likewise.
            (set_label_text): Likewise.
2004-09-24 22:22:35 +00:00
Roland Illig
11842a375f 2004-09-24 Roland Illig <roland.illig@gmx.de>
* boxes.c: Replaced NULL with (char *) NULL. Likewise for 0, where
	NULL was meant.
	* cmd.c: Likewise.
	* dialog.c: Likewise.
	* ext.c: Likewise.
	* file.c: Likewise.
	* find.c: Likewise.
	* hotlist.c: Likewise.
	* learn.c: Likewise.
	* main.c: Likewise.
	* screen.c: Likewise.
	* setup.c: Likewise.
	* treestore.c: Likewise.
	* user.c: Likewise.
	* util.c: Likewise.
	* utilunix.c: Likewise.
	* view.c: Likewise.
	* widget.c: Likewise.
	* wtools.c: Likewise.
2004-09-24 15:05:28 +00:00
Roland Illig
e0f5d6e37f * cons.handler.c (handle_console_linux): Replaced NULL with
(char *) NULL in call to execl.
	* subshell.c (init_subshell_child): Likewise.
	* utilunix.c (my_system): Likewise.

	From patches from the OpenBSD ports collection.
2004-09-24 14:02:39 +00:00
Roland Illig
9c334b4dd8 * achown.c: Added const qualifiers and const_cast.
* background.c: likewise.
	* boxes.c: likewise.
	* file.c: likewise.
	* filegui.c: likewise.
	* find.c: likewise.
	* hotlist.c: likewise.
	* info.c: likewise.
	* layout.c: likewise.
	* myslang.h: likewise.
	* option.c: likewise.
	* user.c: likewise.
	* util.c: likewise.
	* utilunix.c: likewise.
	* view.c: likewise.
	* widget.c: likewise.
2004-09-19 15:55:58 +00:00
Andrew V. Samoilov
8919656440 * utilunix.c (tilde_expand): Fix extra slash in result from tilde_expand() for ~<user>/dir. 2004-09-14 17:23:16 +00:00
Roland Illig
17714fd8d9 * Code cleanup: Added const qualifier for variables and
function declarations where possible. No functional changes.
2004-08-29 23:20:01 +00:00
Andrew V. Samoilov
6ca233ecea * utilunix.c (tilde_expand): Use more suitable function
g_strndup, instead sequence g_malloc, strncpy, name[len] = '\0'
2004-08-20 21:28:05 +00:00
Andrew V. Samoilov
fecb161283 x.c (mc_tmpdir): Fix typos in comment.
Set MC_TMPDIR environment variable for vfs scripts.
        Clear error after successful test of mc temp dir.
2004-08-18 20:34:01 +00:00
Andrew V. Samoilov
72488a9d6c mc_tmpdir: Check return value of getpwuid() for NULL. 2004-08-17 18:45:47 +00:00
Pavel Roskin
291f976b13 * utilunix.c (canonicalize_pathname): Add support for UNC paths. 2004-01-24 00:17:34 +00:00
Pavel Roskin
4ced5086ac * utilunix.c (canonicalize_pathname): Return void to make it
clear that the conversion is done in place.  Adjust all callers.
2004-01-23 23:53:37 +00:00
Pavel Roskin
e30307ea4a * utilunix.c (tilde_expand): Correct last fix, simplify code.
Reported by David Sterba <dave@jikos.cz>
2003-11-28 15:23:19 +00:00
Pavel Roskin
42da92333f * utilunix.c (tilde_expand): Preserve tilde if the username
could not be found.  Don't ever return NULL.  Change callers not
to check for NULL.
2003-11-27 09:45:22 +00:00
Pavel Roskin
083d26f3c8 * view.c (free_file): Don't use check_error_pipe(), display
error messages in close_error_pipe().
* utilunix.c (check_error_pipe): Remove, it's unused.
2003-11-07 21:15:47 +00:00
Pavel Roskin
036d1d4602 * fsusage.c: Merge ...
* mountlist.c: ... here.  These files are closely related.  Move
some defines from extraconf.h here.
* fsusage.h: Remove.
* Makefile.am: Remove fsusage.c and fsusage.h.
2003-10-29 08:12:44 +00:00
Pavel Roskin
ffddff51ea * utilunix.c: Move mc_doublepopen() and mc_doublepclose() ...
* ext.c: ... where they are used.
2003-10-27 21:51:48 +00:00
Pavel Roskin
e4f7714ab1 * execute.c: New file with all functions for execution and
toggling panels not specific to subshell.
* execute.h: Corresponding header.
* Makefile.am: Adjust for the above.
2003-06-22 09:17:46 +00:00
Pavel Roskin
5b2bd08768 * configure.in: Remove test for SCO UNIX. Remove all references
to SCO_FLAVOR everywhere.  SCO flavor is rather unsavory now.
2003-06-18 04:47:17 +00:00
Pavel Roskin
cf432c1d8a * utilunix.c (canonicalize_pathname): Clean rewrite from
scratch.  The old implementation had memory problems with "/.."
and didn't actually strip the leading "./" from path.  Remove
support for obsolete Qnet paths.
2003-03-10 06:52:57 +00:00
Pavel Roskin
0f70a1c7ea * utilunix.c (destroy_groups): Revert last change, it doesn't
work with glib-1.2.x.
2003-02-21 16:32:32 +00:00
Pavel Roskin
30aeb24388 * util.c (list_append_unique): Free removed links.
* utilunix.c (destroy_groups): Use g_tree_foreach() instead of
obsolete g_tree_traverse().
2003-02-19 00:42:04 +00:00
Pavel Roskin
881ee01385 Comment fixes. 2003-02-11 16:57:45 +00:00
Pavel Roskin
541abac5c3 * utilunix.c (mc_tmpdir): Check temporary directory more
carefully.  Report problems and ask user to acknowledge them.
2002-12-26 14:47:46 +00:00
Pavel Roskin
5aeb6c2422 * dialog.c (struct Refresh): Make opaque.
* dialog.h: Move all stuff unrelated to dialog.c ...
* wtools.h: ... here.  Adjust all users.
2002-11-14 07:25:18 +00:00
Andrew V. Samoilov
499aa8c24f * utilunix.c (mc_tmpdir): Make directory only if not exists.
Use strncpy() instead of g_snprintf() - there can be printf()
pattern(s) in the $TMPDIR.
2002-10-22 11:21:40 +00:00
Pavel Roskin
d3f0a2f61b Remove spaces around "Error" and "Warning" together with their translations.
Also remove spaces from "Quit" and "Search", but leave alone the
translations, that already have them without spaces.
2002-10-21 04:13:49 +00:00
Pavel Roskin
69dd1ca00c * utilunix.c (mc_tmpdir): Don't exit if the temporary directory
cannot be created - it should be possible to run mc on read-only
filesystems.  Try to chmod() the temporary directory.
2002-10-20 08:34:31 +00:00
Pavel Roskin
c785d4195b * global.h: Move fcntl.h inclusion here. Define O_BINARY.
* mountlist.c: Remove more includes already handled in global.h.
2002-09-23 06:43:22 +00:00
Pavel Roskin
485b40ac2a * utilunix.c (mc_tmpdir): New function that returns temporary
directory for mc.
* util.c (mc_mkstemps): Use mc_tmpdir().
* main.c (main): Call mc_tmpdir().
2002-09-11 04:58:24 +00:00
Pavel Roskin
8568fc50d9 * Make-alone.am: Get rid of all standalone code, it has been
unmaintained for years.
2002-09-10 21:48:49 +00:00
Pavel Roskin
f5a762b7a8 * user.c (expand_format): Remove support for error file in the
editor.
* utilunix.c (close_error_pipe): Fix the condition when nothing
needs to be dislayed.
2002-08-24 17:25:27 +00:00
Pavel Roskin
40136e5f74 * utilunix.c (check_error_pipe): Check error_pipe[0], not
stdout.  From Pavel Tsekov <ptsekov@gmx.net>
2002-08-24 16:03:23 +00:00
Pavel Roskin
9860f07fc9 * util.h: Remove unused and dangerous flags for my_system():
EXECUTE_TEMPFILE, EXECUTE_SETUID and EXECUTE_WAIT.
* utilunix.c: Corresponding adjustments.
* ext.c: Don't use EXECUTE_TEMPFILE, it has no effect.
2002-08-19 23:41:21 +00:00
Pavel Roskin
6c7e1a46c8 * util.c: Remove unused functions.
* utilunix.c: Likewise.
* util.h: Update to match.
2002-07-29 23:12:31 +00:00
Pavel Roskin
0d360dca23 Remove irrelevant comment. 2002-07-29 22:14:16 +00:00
Pavel Roskin
18c160fefa * utilunix.c (canonicalize_pathname): Don't extend empty path
to "." - it can corrupt memory.
2002-07-26 21:51:16 +00:00
Pavel Roskin
129df509f9 * utilunix.c: Cast argument for GUINT_TO_POINTER to int to fix
warnings on Cygwin.
2002-07-10 23:27:36 +00:00