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
Andrew V. Samoilov
9e174e05f6
* utilunix.c (close_error_pipe): Use "%s" in message () to
...
prevent possible crash.
(check_error_pipe): Likewise.
2002-07-01 19:08:44 +00:00
Pavel Roskin
6c67d1918c
* utilunix.c (canonicalize_pathname) [__QNX__]: Fix detection
...
of Qnet names. Disable support of Qnet names under QNX Netrino.
Reported by Maurizio Rossi <MRossi@system-group.it>
2002-02-18 22:31:56 +00:00
Pavel Roskin
2b7cf88d85
* global.h: Include unix.h under "classical" QNX.
...
* subshell.c: Don't include unix.h.
* utilunix.c: Likewise.
2002-02-18 21:54:27 +00:00
Pavel Roskin
5d27f706bd
* utilunix.c (init_groups): Don't return prematurely if the
...
primary group cannot be found (it can happen on Cygwin).
2001-12-18 20:00:27 +00:00
Pavel Roskin
f2e38b2c3a
* textconf.h: Get rid of all PORT_HAS_*. Adjust all users.
...
Continued eliminating GNOME code.
2001-09-16 01:10:09 +00:00
Pavel Roskin
13e92aca94
* layout.c: Use HAVE_TERMIOS_H and HAVE_SYS_IOCTL_H more
...
consistently.
* mouse.c: Likewise.
* subshell.c: Likewise.
* win.c: Likewise.
* util.c: Remove unused includes.
2001-09-11 02:18:02 +00:00
Pavel Roskin
c11389facb
* global.h: Include io.h, pwd.h, grp.h and utime.h. Adjust all
...
sources not to include them and to include global.h at the right
place.
2001-09-07 17:52:19 +00:00
Pavel Roskin
a8ef641beb
* x.h: Remove. Adjust all users. Make sure that global.h is
...
included instead. Don't include sys/param.h unconditionally -
rely on global.h taking care of it.
* Makefile.in: Remove x.h.
2001-09-03 05:07:40 +00:00
Timur Bakeyev
043e782496
2001-08-31 23:14:21 Timur Bakeyev <mc@bat.ru>
...
* utilunix.c: init_groups(), destroy_groups(), get_user_permissions()
rewritten to use GTree structure and functions. Add new static helper
functions mc_gid_compare() and mc_gid_destroy().
* util.h: Removed deprecated structure user_in_groups.
* screen.c: Fixed typo in format report error string.
2001-08-31 23:14:21 Timur Bakeyev <mc@bat.ru>
* utilunix.c: get_user_rights() renamed into get_user_permissions().
delete_groups() renamed into destroy_groups().
* util.h: Likewise.
* screen.c: Likewise.
* main.c: Likewise.
2001-09-01 13:47:34 +00:00