Commit Graph

37 Commits

Author SHA1 Message Date
Andrew Borodin
5a5a8bd3c0 Reorganization of key and window management functions. 2009-08-12 21:23:12 +04:00
Sergei Trofimovich
f050f5e686 fixed compiler hints: -Wwrite-strings option helped a lot
Some crufty ugly APIs (slang stuff, putenv) now have explicit (char*) casts.

Signed-off-by: Sergei Trofimovich <slyfox@inbox.ru>
2009-07-17 12:00:03 +03:00
Andrew Borodin
26852546b7 vfs/gc.c src/widget.c: removed unneeded #include's.
vfs/vfs-impl.h src/background.h src/charsets.c
src/esc.h src/file.h src/execute.c src/vfsdummy.h: fixed missed #include's.
src/cons.saver.c: include <config.h> unconditionally.
src/complete.c:: fixed #include's.
src/win.h src/win.c: removed unneeded #include's;
check_movement_keys(): fixed type of returned value.
2009-06-18 21:07:10 +04:00
Mikhail S. Pobolovets
08469a001e Some fixups with wrongly highlighted words
Signed-off-by: Mikhail S. Pobolovets <styx.mp@gmail.com>
2009-02-10 16:07:59 +02:00
Mikhail S. Pobolovets
758ab591d8 Simple doxygen description for files in src directory.
Mostly \file and \brief tag added.

Signed-off-by: Mikhail S. Pobolovets <styx.mp@gmail.com>
2009-02-10 16:07:59 +02:00
Patrick Winnertz
3b8f37b99e Moved some functions out of mhl into src/util.c
This commit moves the mhl_str_concat_dir_and_file back into src/util.c whitout changing atm the functionality.

Please note that this is an incomplete fix and needs to be partially enhanced in order to keep the full functionality with glib.

Signed-off-by: Patrick Winnertz <winnie@debian.org>
2009-02-06 11:17:03 +01:00
Enrico Weigelt, metux IT service
54d6ec88dc replaced buggy concat_dir_and_file() by mhl_str_dir_plus_file() 2009-01-31 16:51:58 +01:00
Pavel Tsekov
7ad6feae42 * src/achown.c: Update copyright notice.
* src/chmod.c: Likewise.
* src/chown.c: Likewise.
* src/cmd.c: Likewise.
* src/color.c: Likewise.
* src/command.c: Likewise.
* src/cons.handler.c: Likewise.
* src/cons.saver.c: Likewise.
* src/dialog.c: Likewise.
* src/dir.c: Likewise.
* src/help.c: Likewise.
* src/info.c: Likewise.
* src/man2hlp.c: Likewise.
* src/menu.c: Likewise.
* src/mouse.c: Likewise.
* src/option.c: Likewise.
* src/profile.c: Likewise.
* src/screen.c: Likewise.
* src/setup.c: Likewise.
* src/subshell.c: Likewise.
* src/user.c: Likewise.
* src/win.c: Likewise.
* vfs/sfs.c: Likewise.
* vfs/tcputil.c: Likewise.
2007-09-26 10:22:25 +00:00
Pavel Tsekov
979282dc40 * src/cons.saver.c [HAVE_CONFIG_H]: Include config.h . 2006-02-21 14:02:11 +00:00
Pavel Roskin
1f60f44145 Update postal address of Free Software Foundation. 2005-05-27 03:35:10 +00:00
Roland Illig
fc85bdba7e * *.c: Reordered header inclusion. 2005-02-08 09:04:03 +00:00
Roland Illig
fe6f6ab57e * cons.saver.c (die): Declare as "static" to avoid gcc warning.
(send_contents): Likewise.
2004-10-21 23:08:28 +00:00
Andrew V. Samoilov
919aa12d7d * cons.saver.c: Partly rewritten cons.saver.c. 2004-10-05 07:14:09 +00:00
Pavel Roskin
ff82223a35 Remove references to the archaic "linux" preprocessor definition.
Only __linux__ should be used.
2003-02-27 05:09:35 +00:00
Pavel Roskin
b8f676ec41 * cons.saver.c: Use SEEK_SET instead of 0 in lseek().
* view.c: Likewise.
2002-07-29 21:18:51 +00:00
Pavel Roskin
7bab33656b * cons.saver.c: Eliminate some global variables. Further
cleanup.  Make sure that console_fd is always closed.
2002-07-29 05:59:07 +00:00
Pavel Roskin
edebd94750 * cons.saver.c: Remove support for Linux kernels before 2.0.
Massive cleanup.
(send_contents): Remove incorrect optimization - restore even
empty lines because they may be touched by the viewer.
From Denis Vlasenko <vda_unique@iname.com>
2002-07-28 08:52:27 +00:00
Pavel Roskin
d816549ab9 * cons.saver.c: Define LINUX_CONS_SAVER_C so that some parts
of cons.saver.h can be omitted.
* cons.saver.h: Declare nothing but constants if
LINUX_CONS_SAVER_C is defined.
2001-11-29 20:28:48 +00:00
Pavel Roskin
91a799e3c0 * cons.saver.c: New variable console_minor. Eliminate variables
len and vcs_name.
(check_file): Set console_minor to the minor device number of
the console. Disallow /dev/tty0.
(detect_console): Don't parse tty_name, instead make sure that
it corresponds to console_minor. Check console first. Fallback
to /dev/vcc/a* if /dev/vcsa* cannot be opened.
(save_console): Use console_minor.
(restore_console): Likewise.
2001-07-06 19:24:27 +00:00
Pavel Roskin
a44f9422d2 * cons.saver.c (check_file): Eliminate using text messages to
indicate errors. Improve debug messages.
(detect_console): Likewise.
(main): Adjust call to detect_console.
2001-07-06 17:49:27 +00:00
Pavel Roskin
bec643d103 * achown.c: Eliminate untyped declarations.
* boxes.c: Likewise.
* cons.saver.c: Likewise.
* hotlist.c: Likewise.
* panelize.c: Likewise.
* rxvt.c: Likewise.
* main.c: Likewise. Make undeclared functions static.
* treestore.c: Make undeclared functions static.
* view.c: Likewise.
* widget.c: Likewise.
2001-06-14 22:33:00 +00:00
Pavel Roskin
b504500f49 * text.c [HAVE_X]: Remove useless #error.
* cons.saver.c: Indent #error to hide it from old compilers.
2001-06-14 15:59:52 +00:00
Pavel Roskin
c4c5f40a87 * cons.saver.c: Make all functions except main() static.
* mfmt.c (omain): Remove, it's unused.
2001-06-07 19:28:03 +00:00
Andrew V. Samoilov
1cc4f6be7a * cons.saver.c (check_file): close fd on error. There was a bug, which
allowed luser to write '\0' char to any symlinkable file in Linux
system which don't ensure that fd's 0, 1, and 2 are open on startup
of a SUID/SGID binary.

Based on patch from bugtrack by Maurycy Prodeus <z33d@ETH-SECURITY.NET>.
2000-11-16 17:09:08 +00:00
Pavel Roskin
e828211662 Updated address of Free Software Foundation 2000-08-22 22:50:00 +00:00
Pavel Machek
ce6e42f45a Support linux with devfs 2000-06-16 11:40:23 +00:00
Pavel Machek
bfe05cff74 Make cons.saver runable by non-root users. 1999-05-12 11:48:11 +00:00
Miguel de Icaza
606c833f93 1999-04-05 Federico Mena Quintero <federico@nuclecu.unam.mx>
* cons.saver.c (main): dup2() may be interrupted; take this into
	account.  Do we need to fcntl() stderr, or is it enough to close()
	it before recreating it?
1999-04-05 20:18:16 +00:00
Miguel de Icaza
430894d530 Pass two at the fix 1999-01-27 02:20:28 +00:00
Miguel de Icaza
09d44c9f4e 1999-01-26 Miguel de Icaza <miguel@nuclecu.unam.mx>
* cons.saver.c: Removed glib from the suid app
1999-01-27 01:40:33 +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
Miguel de Icaza
301e7fbfc3 Many changes:
- Beginning of the CORBA support for the file manager.
	- Tk and XView code dropped.

Miguel
1998-12-02 23:44:06 +00:00
Miguel de Icaza
b20b135eba Define stderr_fd 1998-12-01 05:06:15 +00:00
Miguel de Icaza
90007df586 Further checks 1998-11-26 23:47:38 +00:00
Miguel de Icaza
c387c466ee 1998-11-26 Miguel de Icaza <miguel@nuclecu.unam.mx>
* cons.saver.c (main): Make sure stderr is always valid.
1998-11-26 23:44:45 +00:00
Miguel de Icaza
7ca312db48 Jakub's fix to cons.saver 1998-10-01 16:42:33 +00:00
Miguel de Icaza
eb6b3842ab Initial revision 1998-02-27 04:54:42 +00:00