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
Pavel Roskin
689c3fb9ac
Replace "Can't" with "Cannot" everywhere.
2001-08-14 00:55:34 +00:00
Pavel Roskin
f952acf1f8
* utilunix.c (mc_doublepopen): Use _exit() instead of exit()
...
and don't close any unrelated file descriptors. Explicitly
close inhandle.
2001-07-16 23:34:56 +00:00
Pavel Roskin
5fd1f032f3
* utilunix.c (uid_cache): Make static.
...
(gid_cache): Likewise.
(init_uid_gid_cache): Remove.
* main.c (setup_post): Don't call init_uid_gid_cache().
2001-07-14 06:13:29 +00:00
Pavel Roskin
d1b3fc6002
* utilunix.c (canonicalize_pathname): Don't handle PATH_SEP
...
after backslash in a special way.
2001-07-13 21:21:41 +00:00
Pavel Roskin
521a886013
* utilunix.c (init_my_statfs): Move this ...
...
* util.c (my_statfs): ... and this ...
* mountlist.c: ... here.
* util.h: Move mountlist-related declarations ...
* mountlist.h: ... here.
* info.c: Include mountlist.h.
2001-06-18 22:24:04 +00:00
Pavel Roskin
e828211662
Updated address of Free Software Foundation
2000-08-22 22:50:00 +00:00
Pavel Machek
7c13fd5558
Cleanup from Andrew.
2000-04-18 08:58:42 +00:00
Miguel de Icaza
5d2a84f00d
1999-04-13 Miguel de Icaza <miguel@nuclecu.unam.mx>
...
* utilunix.c (my_system): Set up default signal handlers for childs.
1999-04-13 19:37:45 +00:00
Miguel de Icaza
256467b407
Do not popup a window if it fails to mount the device.
...
Reported by Tim Janik.
Miguel.
1999-03-18 18:43:52 +00:00
Miguel de Icaza
307ad5a44d
1999-03-11 Miguel de Icaza <miguel@nuclecu.unam.mx>
...
* utilunix.c (g_readlink): Fixed two bugs spotted by Morten
Wellinder. Boy, Morten has such a good eye!
1999-03-11 18:43:11 +00:00
Miguel de Icaza
7684a17cd3
Typo fix
1999-03-11 02:01:22 +00:00
Miguel de Icaza
0559c128f7
1999-03-10 Miguel de Icaza <miguel@nuclecu.unam.mx>
...
* gdialogs.c: Support ui->ctx to be NULL, as file.c will set this
to NULL for background operations.
1999-03-10 Miguel de Icaza <miguel@nuclecu.unam.mx>
* utilunix.c (g_readlink): New function. Wraps all the nonsense
of readlink into a nice routine.
* filegui.c: Support ui->ctx to be NULL, as file.c will set this
to NULL for background operations.
* background.c (do_background): Handle EINTR in dup2.
1999-03-11 02:00:12 +00:00
Timur Bakeyev
86ede6c1ca
setuid vs. setreuid
...
Sun Feb 14 02:59:09 1999 Timur Bakeyev <mc@bat.ru>
* utilunix.c (my_system): Fix the order of preferenses, as setuid
more desirable on BSD systems. Terminate execl[p]() with NULL, as
this is formally correct.
1999-02-14 00:05:53 +00:00
Norbert Warmuth
c087495fb8
Fri Feb 12 06:36:58 1999 Norbert Warmuth <nwarmuth@privat.circular.de>
...
* src/utilunix.c (my_system): Compilation fix: on systems without
setreuid use setuid.
1999-02-12 05:37:46 +00:00
Timur Bakeyev
a39568367e
Glibing..... (2)
...
Wed Jan 27 03:17:44 1999 Timur Bakeyev <mc@bat.ru>
* Converted memory managment to Glib. Now we use g_new()/g_malloc()/
g_strdup()/g_free() routings. Also, copy_strings() replaced by
g_strconcat(), strcasecmp() -> g_strcasecmp(),and sprintf() by
g_snprintf().
* Some sequences of malloc()/sprintf() changed to g_strdup_printf().
* mad.[ch]: Modified, to work with new GLib's memory managment. Fixed
a missing #undef for tempnam, which caused dead loop. Add several new
functions to emulate GLib memory managment.
*main.c, mad.[ch]: Add a new switch "-M", which allows to redirect MAD
messages to the file.
* util.[ch], utilunix.c: Modified, deleted our variants of strcasecmp()
and strdup() - we have g_ equivalences. Remove get_full_name() - it is
similar to concat_dir_and_file(). Some other tricks with g_* functions.
* global.h: Modified, extended. Now it is main memory mangment include -
i.e. all inclusions of <stdlib.h>, <malloc.h>, <glib.h>, "fs.h", "mem.h",
"util.h" and "mad.h" done there. This elimanates problem with proper or-
der of #include's.
* All around the source - changed order of #include's, most of them gone
to global.h (see above), minor changes, like "0" -> NULL in string func-
tions.
1999-01-27 01:08:30 +00:00
Pavel Roskin
5e0a240dd2
MC now uses egrep found in PATH rather than in standard directories.
...
Minor fix to complie MC without VFS.
1998-10-01 17:48:03 +00:00
Pavel Machek
7d12623b27
Cleaned up some warnings.
1998-09-18 14:28:07 +00:00
Pavel Machek
3d0a91d4a8
Added vfs_uid for use by libvfs.so users (rpc.nfsd)
...
Added single file filesystem (sfs)
Added vfs_flags so library users can disable selected filesystems
Minor shuffling of functions so garbage collection works for library
1998-08-25 16:00:16 +00:00
Miguel de Icaza
7a7f7a3d85
Integration of Pavel Machek's vfs code split and vfs syntax change.
...
The VFS code can now be used by other applications (if you compile the
libvfs.a target and link against this).
Syntax has changes internally from the url-like syntax to a new syntax
that does not have ambiguities. A default conversor for the new syntax
will be provided in the future, also dealing with the user ~/.mc/ext files
is currently in a non-optimal state.
Keep an eye on this mailing list.
Miguel.
1998-05-26 00:53:24 +00:00
Norbert Warmuth
ac7d5df664
Sun May 24 02:45:03 1998 Norbert Warmuth <k3190@fh-sw.de>
...
* utilunix.c, util.h (errno_dir_not_empty): deleted
Sat May 23 22:29:57 1998 Norbert Warmuth <k3190@fh-sw.de>
* file.c (check_dir_is_empty): New function which takes a path and
returns -1 on error, 1 if there are no entries besides "." and
".." in the directory path points to, 0 else. This function
actually opens and reads the directory and doesn't do tricks we
used to do with rmdir.
* file.c (erase_dir, erase_dir_iff_empty): Use check_dir_is_empty
to detect non empty directories. The old code tried to remove the
directory and decided on errno whether the failure of rmdir was
caused by a non empty directory or whether there was a different
error.
Unfortunatly not every filesystem sets errno to EDIRNOTEMPTY if
you try to delete a non empty directory. Namely the linux user
space nfs server sets errno to EIO, Suns nfs server sets it to
EEXIST and the AIX nfs server sets it to ??? (Steve reported
problems on AIX so I guess AIX sets errno to a value we currently
don't check).
1998-05-24 01:29:36 +00:00
Miguel de Icaza
c457d7dd96
Pass2 of the QNX port of mc from Tamasi Gyorgy
1998-05-20 02:19:17 +00:00
Miguel de Icaza
c752ec9d97
Reorgranized the script execution code to fix a race condition that
...
only happened in the GNOME code (as the execution of anything from
the file manager in the GNOME version is done in background).
Miguel.
1998-04-24 01:08:06 +00:00
Miguel de Icaza
0f31fb67d0
Fixes 80% of the bugs reported by Elliot on his last email.
...
This does not fix some major "problems", which require some bigger
changes to the program.
Miguel.
1998-04-17 00:21:53 +00:00
Miguel de Icaza
61850dc7db
Fix: include the x.h file to get utilunix.c to compile corrctly -mig
1998-04-08 17:56:47 +00:00
Miguel de Icaza
30252eccf8
Fixes, fixes, fixes, fixes, fixes.
...
Thanks DrMike for the detailed listing of problems.
Miguel.
1998-04-07 19:08:31 +00:00
Miguel de Icaza
ac70e34d02
MC goes Internationallsls./gmc Spanish translation almost complete -mig
1998-03-25 05:16:00 +00:00
Miguel de Icaza
4dd40872d9
1998-03-10 Federico Mena Quintero <federico@nuclecu.unam.mx>
...
* gtools.c (message): Added return NULL. This needs to be fixed.
(translate_gdk_keysym_to_curses): FIXME: Replace KEY_BACKTAB by '\t'
while KEY_BACKTAB is added somewhere else.
(translate_gdk_keysym_to_curses): return -1 as last resort.
* glayout.c (get_current_index): Add g_assert_not_reached() for
fatal case.
* gmenu.c (menubar_new): Cast g_menubar to unsigned long.
* gwidget.c (x_create_input): Cast entry to GTK_OBJECT.
* gkey.c (find_select_closure_callback): Fix = -> == typo.
1998-03-10 Federico Mena Quintero <federico@nuclecu.unam.mx>
* xslint.c (getch): Added missing "return".
* utilunix.c (init_groups): Added parentheses around
assignment/truth value.
* boxes.c: #include <stdlib.h>
* screen.c (string_inode): Cast fe->buf.st_ino to long to be
consistent with sprintf format.
* main.c (handle_args): Added parentheses around assignment/truth value.
1998-03-10 21:10:30 +00:00
Miguel de Icaza
158aeb9c72
Sync the src tree -mig
1998-03-05 20:06:15 +00:00
Miguel de Icaza
eb6b3842ab
Initial revision
1998-02-27 04:54:42 +00:00