mc/src/global.h
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

48 lines
840 B
C

#ifndef __GLOBAL_H
#define __GLOBAL_H
#include <stdlib.h> /* for free() and other usefull routins */
#include "fs.h"
#include <glib.h>
#include "mem.h"
#include "util.h"
#include "mad.h"
extern char *home_dir;
#ifdef min
#undef min
#endif
#ifdef max
#undef max
#endif
#define min(x, y) ((x) > (y) ? (y) : (x))
#define max(x, y) ((x) > (y) ? (x) : (y))
/* Just for keeping Your's brains from invention a proper size of the buffer :-) */
#define BUF_10K 10240L
#define BUF_8K 8192L
#define BUF_4K 4096L
#define BUF_1K 1024L
#define BUF_LARGE BUF_1K
#define BUF_MEDIUM 512
#define BUF_SMALL 128
#define BUF_TINY 64
void refresh_screen (void *);
/* AIX compiler doesn't understand '\e' */
#define ESC_CHAR '\033'
#define ESC_STR "\033"
#ifdef USE_BSD_CURSES
# define xgetch x_getch
#else
# define xgetch getch
#endif
#endif