Commit Graph

52 Commits

Author SHA1 Message Date
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 35aa47461b * sfs.c: Don't use flag EXECUTE_SETUID because it's being
removed as insecure and EXECUTE_WAIT because it has no effect.
* extfs.c: Likewise.
2002-08-19 23:20:03 +00:00
Pavel Roskin cf8ab0de99 * extfs.c (s_readdir): Simplify.
* direntry.c (vfs_s_readdir): Use vfs_dirent.
* mcfs.c (mcfs_readdir): Likewise.
* smbfs.c (smbfs_readdir): Likewise.
* undelfs.c (undelfs_readdir): Use vfs_dirent and
compute_namelen().
2002-08-15 21:15:17 +00:00
Pavel Roskin 37f335b8c0 * vfs.h: Introduce union vfs_dirent to ensure that we have
enough space for the filename.
* extfs.c (s_readdir): Use vfs_dirent.  Avoid strcpy().
2002-08-15 20:29:34 +00:00
Pavel Roskin 8b8d7de7ca * direntry.c (vfs_s_readdir): Use compute_namelen().
* extfs.c (s_readdir): Likewise.
* mcfs.c (mcfs_readdir): Likewise.
* smbfs.c (smbfs_readdir): Likewise.
2002-08-15 19:38:17 +00:00
Pavel Roskin 6f3a7c8029 * direntry.c (vfs_s_open): Don't pass O_LINEAR to open() -
this flag is for VFS only, and causes side effects in Cygwin.
* extfs.c (extfs_open): Likewise.
* sfs.c (sfs_open): Likewise.
Reported by Pavel Tsekov <ptsekov@gmx.net>
2002-07-10 17:56:27 +00:00
Pavel Roskin 6ecbdd05ab * extfs.c (extfs_fill_names): Generate filename#vfsname/dir
instead of #vfsname/filename/dir.  Use PATH_SEP_STR.
2002-07-03 15:54:01 +00:00
Pavel Roskin 4408c4e091 * extfs.c (extfs_open): Only create a new entry if it has not
been found and O_CREAT is set.  Consider file as changed only
if it has been successfully created.
(extfs_getlocalcopy): Open file only for reading.  This prevents
marking file as changed.  Actually use the has_changed argument.
Reported by Nerijus Baliunas <nerijus@users.sourceforge.net>
2002-02-19 21:32:24 +00:00
Pavel Roskin e6a07c778a * extfs.c (extfs_init): Internationalize error message, it's
already in sfs.c.
2001-08-16 20:43:47 +00:00
Pavel Roskin 4b54385dc6 * extfs.h: Move private structures ...
* extfs.c: ... here.
2001-08-07 23:54:35 +00:00
Pavel Roskin 5c7d2296ca * extfs.h (struct entry): Remove unused `has_changed' field.
It's only written but never read.
(struct inode): Likewise.
* extfs.c: All dependencies changed.
(extfs_open): Mark file as changed if it's open for writing.
2001-08-07 22:47:02 +00:00
Pavel Roskin a1532469cd * extfs.c (extfs_init) [GTK]: Use mc_home instead of LIBDIR.
From Ludovic Drolez <ludovic.drolez@freealter.com>.
2001-07-20 14:50:30 +00:00
Pavel Roskin c100281180 * extfs.c: Include contents of shared_tar_ext.c - it's no
longer shared.
* shared_tar_ext.c: Remove.
* Make-mc.in (VFSSRCS): Remove shared_tar_ext.c.
2001-07-10 14:19:11 +00:00
Pavel Roskin 5da3b42969 * ftpfs.c: Declare functions without declarations static. Don't
omit `void' in declarations.
* cpio.c: Likewise.
* direntry.c: Likewise.
* extfs.c: Likewise.
* mcfs.c: Likewise.
* tar.c: Likewise.
* vfs.c: Likewise.
* vfs.h: Likewise.
* mcserv.c: Likewise. Remove unused functions.
2001-06-14 20:08:27 +00:00
Pavel Roskin 6fe51516de * cpio.c (vfs_cpiofs_ops): Use short name for the filesystem.
This avoids creating long filenames in dirent.c when the "name"
field is used.
* extfs.c (vfs_extfs_ops): Likewise.
* fish.c (vfs_fish_ops): Likewise.
* ftpfs.c (vfs_ftpfs_ops): Likewise.
* local.c (vfs_local_ops): Likewise.
(vfs_nil_ops): Likewise.
* mcfs.c (vfs_mcfs_ops): Likewise.
* sfs.c (vfs_sfs_ops): Likewise.
* tar.c (vfs_tarfs_ops): Likewise.
* undelfs.c (vfs_undelfs_ops): Likewise.
2001-06-11 21:58:58 +00:00
Pavel Roskin bea09b932d * src/ext.c (exec_extension): Use mc_mkstemps().
* src/user.c (execute_menu_command): Use mc_mkstemps().
* src/util.c (mc_mkstemps): New function - safely create and
open temporary file. Return the handle and the name.
* src/util.h: Declarations for init_tmpdir() and mc_mkstemps().
Define TMPDIR_DEFAULT and SCRIPT_SUFFIX.
* vfs/direntry.c (vfs_s_open): Use mc_mkstemps. Create and close
temporary file to reserve its name on the filesystem.
(vfs_s_retrieve_file): Use mc_mkstemps().
(g_tempnam): Remove.
* vfs/extfs.c (extfs_open): Use mc_mkstemps().
* vfs/sfs.c (redirect): Likewise.
* vfs/shared_ftp_fish.c (_get_file_entry): Likewise.
(retrieve_file): Likewise.
* vfs/vfs.c (mc_def_getlocalcopy): Likewise.
* vfs/xdirentry.h: Remove declaration of g_tempnam().
2001-05-21 16:21:07 +00:00
Pavel Roskin 447597a790 * vfs.h: Include sys/timeb.h if it's present. Include time.h and
sys/time.h as recommended by Autoconf documentation.
* cpio.c: Remove all time-related includes - they are in vfs.h.
* extfs.c: Likewise.
* ftpfs.c: Likewise.
* mcfs.c: Likewise.
* mcserv.c: Likewise.
* tar.c: Likewise.
* util-alone.c: Likewise.
* vfs.c: Likewise. Include xdirentry.h.
2001-02-20 16:55:58 +00:00
Pavel Roskin cde914f99a * extfs.c: Include xdirentry.h. Undefine ERRNOR before
redefining it.
2001-02-20 16:24:49 +00:00
Pavel Machek 55e56a1426 Fixes from Roland: we may not g_free() strdup-ed text. 2000-10-31 15:43:49 +00:00
Pavel Roskin e828211662 Updated address of Free Software Foundation 2000-08-22 22:50:00 +00:00
Pavel Machek b028dbad2e Small cleanup in extfs.c 2000-01-13 15:15:42 +00:00
Pavel Machek 0de889ce6f Applied changes by "Andrew V. Samoilov" <sav@bcs.zp.ua>
Fixed files with names like "1900" (or broken them other way), minor
coding style fixes.
2000-01-05 14:13:57 +00:00
Pavel Machek 1139602a9b Return value is needed for mc_[un]getlocalcopy. 1999-11-11 14:23:40 +00:00
Norbert Warmuth 2b862fe4f1 Wed Apr 21 21:47:15 1999 Norbert Warmuth <nwarmuth@privat.circular.de>
* src/ext.c (exec_extension): Use tempnam instead of tmpnam (AIX doesn't
like the lattern when compiled with -mthreads).

* src/user.c (execute_menu_command): ditto.


Wed Apr 21 22:04:30 1999  Norbert Warmuth  <nwarmuth@privat.circular.de>

* gtkedit/editcmd.c (edit_save_file): MAD knows about tempnam, no
need to fool it by strdup'ing the return value of tempnam.


Wed Apr 21 21:59:50 1999  Norbert Warmuth  <nwarmuth@privat.circular.de>

* vfs/extfs.c (extfs_open): tempnam returns a malloced string, no need
to strdup it

(various places): use free instead of g_free to free string returned
by tempnam.
1999-04-22 04:36:11 +00:00
Miguel de Icaza e67b78b16c 1999-04-18 Miguel de Icaza <miguel@nuclecu.unam.mx>
* extfs.c (get_path_from_entry): Fix a crash here.
1999-04-19 03:33:56 +00:00
Andrew T. Veliath 9e7e543cef src/
* main.c (_do_panel_cd): If we are using GNOME, and the panel is a
	desktop panel, open up a new panel for the contents.

gnome/
	* gdesktop.c (create_panel_from_desktop): Assign selected_index
	when we find the last selected icon.
	(desktop_icon_info_open): Desktop directory open case moved to
	main.c to handle both general and action cd commands.

vfs/
	* extfs.c (extfs_unlink):
	(extfs_mkdir):
	(extfs_rmdir):
	(remove_entry): New functions.
	(vfs_extfs_ops): Add unlink, mkdir and rmdir functions to table.
	Add descriptions for these to the extfs README.
1999-04-13 02:05:15 +00:00
Miguel de Icaza b3bb157ad5 These are a bunch of changes to fix CORBA and session management. They
are almost complete (i.e. to handle all nitty gritty cases), but they
seem to be working OK right now.  SM should be much more stable now.
Please tell me if you find any weird behavior - Federico

1999-03-30  Federico Mena Quintero  <federico@nuclecu.unam.mx>

	* gdesktop-icon.c (desktop_icon_realize): Remove the
	WM_CLIENT_LEADER property from icon windows so that window
	managers will not store SM information for them.

	* gnome-open-dialog.c: Added missing #includes.

	* gdesktop-init.c (desktop_init_at): Removed an unused variable.

	* gdesktop.h: Added some missing prototypes.

	* gmain.h: Added some missing prototypes.

	* Makefile.in: Added gsession.[ch] to the list of sources.

	* gmain.c (create_panels): Consider whether we have a CORBA server
	and session management.

	* gdesktop.c: #include "gdesktop-init.h"
	* gdesktop.c: Added a missing cast to GNOME_DIALOG.

	* gmain.c (create_panels): Removed the run_desktop global
	variable.

	* glayout.c (create_container): Set the wmclass of the panel to
	include its unique ID.

	* gsession.[ch]: New file with the functions that deal with
	session management.

	* glayout.c (gnome_exit): Use session_set_restart().

	* gcorba.c (corba_init): Now returns an int with an error value.
	(corba_init_server): Initialize the server properly.
	Fixed all the object implementation code.
	(corba_create_window): New function used to create a window with
	the CORBA server.

	* gmain.c (gnome_check_super_user): Now the check for running as
	root is done here.  There should be no GUI code in src/.

1999-03-30  Federico Mena Quintero  <federico@nuclecu.unam.mx>

	* dlg.c (dlg_run_done): Do not call the callback of a NULL current
	widget.

	* setup.h: Added missing prototype for setup_init().

	* filegui.c (check_progress_buttons): Added a missing return
	value.

	* dlg.c (remove_widget): Added a missing return value.

	* main.c: Removed the global directory_list variable.
	Removed the main_corba_register_server() function.

	* main.h: Removed the global run_desktop variable.

	* panel.h: Now the panel structure has a unique numerical ID used
	for session management.

	* screen.c (panel_new): Maintain a unique ID for each panel.

	* main.c (maybe_display_linksdir): Handle display of the desktop
	init dir here.
	(main): Call gnome_check_super_user().
	(init_corba_with_args): Call corba_init_server().

	* main.c (init_corba_with_args): Do CORBA initialization here.  Also
	removed the global force_activation option.

1999-03-30  Federico Mena Quintero  <federico@nuclecu.unam.mx>

	* vfs.c (vfs_add_current_stamps): Only do stamping of the panels
	if they exist.

	* mcserv.c: #include <sys/wait.h>
	(get_client): Put `#ifdef __EMX__' around an otherwise-unused
	variable.

	* utilvfs.c (vfs_split_url): Fix NULL <-> 0 confusion when
	comparing characters.

	* ftpfs.c (retrieve_dir): Removed unused variable dot_dot_found.

	* extfs.c (extfs_init): Assign `key' to c, not `&key'.
1999-03-30 06:09:56 +00:00
Miguel de Icaza ff1a8f6a3b Ok, I am finally back.
Basically, I had to setup an ssh tunnel to be able to use CVS.  After
5 hours trying to get the damn thing to cvs update it was clear to me
why the .es people do not like to use the gnome cvs.

We really need a tunnel for .es hackers (as they have excellent connectivity
to the rest of Europe, they are just routed trough a 2 byte link to the US).

1999-03-22  Miguel de Icaza  <miguel@nuclecu.unam.mx>

	* treestore.c (process_special_dirs): Free memory here.

	Fix test: Skip only "." and "..", before it could skip "?.".

1999-03-22  David Martin <dmartina@mailexcite.com>

	* wtools.c (real_input_dialog_help): Do a strncmp with the lenght
	of th same translated "Password:" string.

1999-03-22  Miguel de Icaza  <miguel@nuclecu.unam.mx>

	* glayout.c (create_new_menu_from): closedir after running.

1999-03-20  Miguel de Icaza  <miguel@nuclecu.unam.mx>

	* gnome-file-property-dialog.c (apply_metadata_change): Fix the
	test for setting the icon.  It was being done incorrectly and thus
	it was never possible to change the icon.

	* glayout.c (gnome_launch_mime_editor): Add mime-type-edit command
	to the menu: this launches mime-type-capplet

1999-03-22  David Martin <dmartina@mailexcite.com>

	* ftpfs.c: Internationalize the messages that are displayed as
	hints.

1999-03-22  Miguel de Icaza  <miguel@nuclecu.unam.mx>

	* extfs.c (extfs_init): Fix the code here:  If the key is empty or
	only contains a new line, C would be pointing into an invalid location.
1999-03-24 12:16:52 +00:00
Timur Bakeyev e57da1f7b3 Glibing....
Wed Jan 27 03:09:48 1999  Timur I. Bakeyev <mc@bat.ru>

	* All around the source: Changed copy_strings() to g_strconcat(). Modi-
	fy last parameter in concat_dir_and_file() to "" - to prevent stack from
	disbalancing.
1999-01-27 00:49:11 +00:00
Timur Bakeyev bf81009392 Actually commit all my changers. Fear :> 1999-01-20 22:01:11 +00:00
Miguel de Icaza cd88fbdf91 Missed this file 1999-01-11 03:49:18 +00:00
Miguel de Icaza 8f2327ecdb 1999-01-02 Miguel de Icaza <miguel@nuclecu.unam.mx>
* gmetadata.c (gmeta_get_icon_pos): Fixed the memory leak here.

	* gicon.c (gicon_get_icon_for_file): Actually return a value
	here.

Editor fixes, vfs warning fixes;
1999-01-02 07:46:20 +00:00
Pavel Machek 965880696c Security (inspired by Norbert Warmuth): make /tmp files 0600 and
create them with O_EXCL for sfs and extfs.
1998-12-15 15:57:39 +00:00
Pavel Machek 37e364fe67 BIG changes: tar now uses brand-new direntry.c. Hope it does not hurt
too much.
1998-10-23 08:26:25 +00:00
Pavel Machek 176dc1f70d static's added, do_reget hack removed 1998-10-12 22:07:53 +00:00
Pavel Machek 136006707c Fixed cursor positioning so that it does not call any vfs code, few
statics added to vfs layer, no longer use '0' in place of NULL.
1998-09-29 16:01:16 +00:00
Pavel Machek a92e6f3ea8 Changed license to LGPL, added passing of vfs * (acting as self), so
we can do OOP-like trics.
1998-09-27 19:27:58 +00:00
Pavel Machek ee12728d7d /#ssh: and /#rsh: aliases, ERRNOR() macro 1998-09-18 11:02:04 +00:00
Pavel Roskin f931d6b5d4 Some piece of memory was freed twice.
Minor clean-up for gcc -Wall.
1998-09-18 09:40:34 +00:00
Pavel Machek f45e5aa3fc Adding fish, cleanups, and small updates everywhere to support fish. 1998-09-13 10:40:43 +00:00
Pavel Machek 436eedd6d4 Unneccessary code removal 1998-08-31 10:05:42 +00:00
Pavel Roskin fe579d66f3 extfs.c didn't compile because of error in extfs_open()
sfs was not even mentioned in makefiles
1998-08-27 18:51:20 +00:00
Miguel de Icaza 77c27f6130 Make program relocatable trough MCHOME variable, patch from Ludovic Drolez 1998-08-26 20:23:10 +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
Pavel Machek c57c593179 Modified code to use tempnam() instead of tmpnam(), fixed tempnam() to use NULL instead of 0. 1998-06-17 16:42:53 +00:00
Pavel Machek a3e64fbc8f Fixed typo. 1998-06-11 10:10:05 +00:00
Norbert Warmuth 39ad0b489a Thu May 28 16:42:31 1998 Pavel Machek <pavel@bug.mj.gts.cz>
* extfs.c, shared.c, tar.c: I changed semantics in my previous
	patch - _get_path() now modifies strings passed to it. I thought
	that I were carefull enough not to introduce bugs. You guessed it -
	I was not. [Many tar_ and extfs_ functions modify strings passed
	to them, but as they are only called from vfs layer, it does not
	matter much.]
	So I renamed function to alert everyone that semantics changed.

	Fixed bugs in timestamping (and segfaults) when you entered tar
	inside zip file or similar.

	* vfs.c (mc_open): Die if the filesystem doesn't support open
1998-05-31 20:12:35 +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 097fe43280 I improved the movement keys of the internal viewer a little bit.
Now in wrap mode the End key and cursor up key behave much better
(e.g. when viewing binary files with lots of wrapped lines).
It's not perfekt but it's better than it used to be.



Tue Apr 28 06:52:24 1998  Norbert Warmuth  <k3190@fh-sw.de>

* gnome/gcmd.c (gnome_open_terminal): Changed my_system(1,...) to
my_system(EXECUTE_AS_SHELL,...)


Tue Apr 28 06:06:03 1998  Norbert Warmuth  <k3190@fh-sw.de>

* vfs/extfs.c (extfs_open, extfs_close): Changed my_system(1,...)
to my_system(EXECUTE_AS_SHELL,...), this fixes the broken copyin and
copyout in 4.1.32.


Tue Apr 28 06:11:08 1998  Norbert Warmuth  <k3190@fh-sw.de>

* view.c (toggle_wrap_mode, toggle_hex_mode): Force recalculation
of bottom_first (we mustn't use an already calculated and cached
value because it is invalid for the new mode and the End key would
not move to the end of the file).

* configure.in: Renamed the option `--with-our-slang' to
`--with-included-slang' (this one looks better because we also
have an `--with-included-gettext').
Make the option `--with-ext2undel' recognice a given path.

* cmd.c (view_file_at_line): In plain view (F13) set the default
magic flag to zero in order to view the file content unprocessed
(esp. don't uncompress files if they are compressed). The
view_simple_cmd got broken when the default magic flag in view.c
was changed from 0 to 1.

* view.c (do_view_init, goto_line): Set wrap mode temporary off
to make goto line number work, i.e. `line number' now always means
line number in file and not line number on screen (in wrap mode
one long line wrapped once is displayed in two lines on the screen).
That's important when the viewer is invoked from the find file
dialog to display even in wrap mode approxiamtly the part of the
file where we found the content we searched for.

(move_forward2): In wrap mode lines were sometimes counted wrong
causing cursor up to move more than one line.

(move_backward2): Fixed the movement in wrap mode.

(change_viewer): Always re-init viewer when we have a filename,
i. e. if the viewer is invoked with simple_view_cmd then we can switch
with the F8 key between unprocessed file content und uncompressed
file content.
(view_init): re-init view also when magic flag was altered
1998-04-28 14:19:48 +00:00
Miguel de Icaza 3b2ad8a238 Lots of prototypes added, warnings removed -miguel 1998-04-17 00:59:58 +00:00