Fri Oct 4 21:17:42 2002 Michael Jennings (mej)
LibAST 0.5 is now required to build Eterm. Hope everyone updated. By the way, this fixes that old font-starts-with-a-hyphen bug along with some compiler warnings the resulted from a change in the way the ASSERT() macro worked. SVN revision: 6407
This commit is contained in:
parent
dc6687b670
commit
6b461d5434
|
@ -4799,3 +4799,10 @@ Sun Sep 29 21:48:10 2002 Michael Jennings (mej)
|
||||||
Fixed Debian Bug #155960. WM_COMMAND was being set improperly because
|
Fixed Debian Bug #155960. WM_COMMAND was being set improperly because
|
||||||
equals signs in the arg list were being NUL'd out for no reason.
|
equals signs in the arg list were being NUL'd out for no reason.
|
||||||
----------------------------------------------------------------------
|
----------------------------------------------------------------------
|
||||||
|
Fri Oct 4 21:17:42 2002 Michael Jennings (mej)
|
||||||
|
|
||||||
|
LibAST 0.5 is now required to build Eterm. Hope everyone updated. By
|
||||||
|
the way, this fixes that old font-starts-with-a-hyphen bug along with
|
||||||
|
some compiler warnings the resulted from a change in the way the
|
||||||
|
ASSERT() macro worked.
|
||||||
|
----------------------------------------------------------------------
|
||||||
|
|
11
configure.in
11
configure.in
|
@ -475,18 +475,19 @@ AM_CONDITIONAL(HAVE_MMX, test "x$HAVE_MMX" = "xyes")
|
||||||
dnl#
|
dnl#
|
||||||
dnl# LibAST
|
dnl# LibAST
|
||||||
dnl#
|
dnl#
|
||||||
|
LIBAST_MIN=5
|
||||||
AC_CHECK_PROG(LIBAST_CONFIG, libast-config, libast-config, false)
|
AC_CHECK_PROG(LIBAST_CONFIG, libast-config, libast-config, false)
|
||||||
if test "$LIBAST_CONFIG" = "false"; then
|
if test "$LIBAST_CONFIG" = "false"; then
|
||||||
FOUND_LIBAST=0
|
FOUND_LIBAST=0
|
||||||
else
|
else
|
||||||
FOUND_LIBAST=1
|
FOUND_LIBAST=`$LIBAST_CONFIG --version | awk -F. '{print $2}'`
|
||||||
CPPFLAGS="$CPPFLAGS `$LIBAST_CONFIG --cppflags`"
|
CPPFLAGS="$CPPFLAGS `$LIBAST_CONFIG --cppflags`"
|
||||||
LDFLAGS="$LDFLAGS `$LIBAST_CONFIG --ldflags`"
|
LDFLAGS="$LDFLAGS `$LIBAST_CONFIG --ldflags`"
|
||||||
fi
|
fi
|
||||||
AC_CHECK_LIB(ast, libast_malloc, FOUND_LIBAST=1, FOUND_LIBAST=0, $GRLIBS)
|
AC_CHECK_LIB(ast, libast_malloc, , FOUND_LIBAST=0, $GRLIBS)
|
||||||
|
|
||||||
if test "$FOUND_LIBAST" -ne "1"; then
|
if test "$FOUND_LIBAST" -lt "$LIBAST_MIN"; then
|
||||||
echo "ERROR: You need the LibAST package to build Eterm. If you already have it,";
|
echo "ERROR: You need LibAST 0.$LIBAST_MIN or higher to build Eterm. If you already have it,";
|
||||||
echo " you may have it installed in a strange place, or you may need to run";
|
echo " you may have it installed in a strange place, or you may need to run";
|
||||||
echo " /sbin/ldconfig. If you don't have it, I can download it for you.";
|
echo " /sbin/ldconfig. If you don't have it, I can download it for you.";
|
||||||
echo " Shall I retrieve and build LibAST now (y/n)?";
|
echo " Shall I retrieve and build LibAST now (y/n)?";
|
||||||
|
@ -507,7 +508,7 @@ if test "$FOUND_LIBAST" -ne "1"; then
|
||||||
test "$LIBAST_CONFIG" = "false" && FOUND_LIBAST=0
|
test "$LIBAST_CONFIG" = "false" && FOUND_LIBAST=0
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
if test "$FOUND_LIBAST" -eq "1"; then
|
if test "$FOUND_LIBAST" -ge "$LIBAST_MIN"; then
|
||||||
if test ! -z "$LIBAST_CONFIG"; then
|
if test ! -z "$LIBAST_CONFIG"; then
|
||||||
GRLIBS="-last $GRLIBS"
|
GRLIBS="-last $GRLIBS"
|
||||||
AC_DEFINE(HAVE_LIBAST)
|
AC_DEFINE(HAVE_LIBAST)
|
||||||
|
|
|
@ -1734,7 +1734,7 @@ create_fontset(const char *font1, const char *font2)
|
||||||
int mc;
|
int mc;
|
||||||
const char fs_base[] = ",-misc-fixed-*-r-*-*-*-120-*-*-*-*-*-*,*";
|
const char fs_base[] = ",-misc-fixed-*-r-*-*-*-120-*-*-*-*-*-*,*";
|
||||||
|
|
||||||
ASSERT(font1 != NULL);
|
ASSERT_RVAL(font1 != NULL, (XFontSet) 0);
|
||||||
|
|
||||||
if (font2) {
|
if (font2) {
|
||||||
fontname = MALLOC(strlen(font1) + strlen(font2) + sizeof(fs_base) + 2);
|
fontname = MALLOC(strlen(font1) + strlen(font2) + sizeof(fs_base) + 2);
|
||||||
|
|
|
@ -170,7 +170,7 @@ event_win_is_mywin(register event_dispatcher_data_t *data, Window win)
|
||||||
|
|
||||||
register unsigned short i;
|
register unsigned short i;
|
||||||
|
|
||||||
ASSERT(data != NULL);
|
ASSERT_RVAL(data != NULL, 0);
|
||||||
|
|
||||||
for (i = 0; i < data->num_my_windows; i++) {
|
for (i = 0; i < data->num_my_windows; i++) {
|
||||||
if (data->my_windows[i] == win) {
|
if (data->my_windows[i] == win) {
|
||||||
|
@ -186,7 +186,7 @@ event_win_is_parent(register event_dispatcher_data_t *data, Window win)
|
||||||
|
|
||||||
register unsigned short i;
|
register unsigned short i;
|
||||||
|
|
||||||
ASSERT(data != NULL);
|
ASSERT_RVAL(data != NULL, 0);
|
||||||
|
|
||||||
for (i = 0; i < data->num_my_parents; i++) {
|
for (i = 0; i < data->num_my_parents; i++) {
|
||||||
if (data->my_parents[i] == win) {
|
if (data->my_parents[i] == win) {
|
||||||
|
|
|
@ -271,10 +271,6 @@ inline void *memmove(void *, const void *, size_t);
|
||||||
# define SB_WIDTH 10
|
# define SB_WIDTH 10
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef MENUBAR_MAX
|
|
||||||
# define MENUBAR_MAX 0
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef SAVELINES
|
#ifndef SAVELINES
|
||||||
# define SAVELINES 256
|
# define SAVELINES 256
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -728,7 +728,7 @@ parse_font_fx(const char *line)
|
||||||
unsigned char which, n;
|
unsigned char which, n;
|
||||||
Pixel p;
|
Pixel p;
|
||||||
|
|
||||||
ASSERT(line != NULL);
|
ASSERT_RVAL(line != NULL, 0);
|
||||||
|
|
||||||
n = num_words(line);
|
n = num_words(line);
|
||||||
|
|
||||||
|
|
986
src/options.c
986
src/options.c
File diff suppressed because it is too large
Load Diff
|
@ -28,20 +28,6 @@
|
||||||
#include <X11/Intrinsic.h> /* Xlib, Xutil, Xresource, Xfuncproto */
|
#include <X11/Intrinsic.h> /* Xlib, Xutil, Xresource, Xfuncproto */
|
||||||
|
|
||||||
/************ Macros and Definitions ************/
|
/************ Macros and Definitions ************/
|
||||||
#define OPT_BOOLEAN 0x0001
|
|
||||||
#define OPT_INTEGER 0x0002
|
|
||||||
#define OPT_STRING 0x0004
|
|
||||||
#define OPT_ARGUMENT 0x0008
|
|
||||||
|
|
||||||
#define OPT_STR(s, l, d, p) { s, l, "(str) " d, OPT_STRING, (const char **) p, 0, 0 }
|
|
||||||
#define OPT_INT(s, l, d, p) { s, l, "(int) " d, OPT_INTEGER, (const int *) p, 0, 0 }
|
|
||||||
#define OPT_BOOL(s, l, d, v, m) { s, l, "(bool) " d, OPT_BOOLEAN, NULL, v, m }
|
|
||||||
#define OPT_LONG(l, d, p) { 0, l, "(str) " d, OPT_STRING, (const char **) p, 0, 0 }
|
|
||||||
#define OPT_ARGS(s, l, d, p) { s, l, "(str) " d, OPT_ARGUMENT, (const char ***) p, 0, 0 }
|
|
||||||
#define OPT_BLONG(l, d, v, m) { 0, l, "(bool) " d, OPT_BOOLEAN, NULL, v, m }
|
|
||||||
#define OPT_ILONG(l, d, p) { 0, l, "(int) " d, OPT_INTEGER, (const int *) p, 0, 0 }
|
|
||||||
#define optList_numoptions() (sizeof(optList)/sizeof(optList[0]))
|
|
||||||
|
|
||||||
# define Opt_console (1LU << 0)
|
# define Opt_console (1LU << 0)
|
||||||
# define Opt_login_shell (1LU << 1)
|
# define Opt_login_shell (1LU << 1)
|
||||||
# define Opt_iconic (1LU << 2)
|
# define Opt_iconic (1LU << 2)
|
||||||
|
@ -85,18 +71,6 @@
|
||||||
#define PARSE_TRY_NO_THEME ((unsigned char) 0x04)
|
#define PARSE_TRY_NO_THEME ((unsigned char) 0x04)
|
||||||
#define PARSE_TRY_ALL ((unsigned char) 0x07)
|
#define PARSE_TRY_ALL ((unsigned char) 0x07)
|
||||||
|
|
||||||
/* This defines how many mistakes to allow before giving up
|
|
||||||
and printing the usage -- mej */
|
|
||||||
#define BAD_THRESHOLD 3
|
|
||||||
#define CHECK_BAD() do { \
|
|
||||||
if (++bad_opts >= BAD_THRESHOLD) { \
|
|
||||||
print_error("Error threshold exceeded, giving up.\n"); \
|
|
||||||
usage(); \
|
|
||||||
} else { \
|
|
||||||
print_error("Attempting to continue, but strange things may happen.\n"); \
|
|
||||||
} \
|
|
||||||
} while(0)
|
|
||||||
|
|
||||||
#define to_keysym(p,s) do { KeySym sym; \
|
#define to_keysym(p,s) do { KeySym sym; \
|
||||||
if (s && ((sym = XStringToKeysym(s)) != 0)) *p = sym; \
|
if (s && ((sym = XStringToKeysym(s)) != 0)) *p = sym; \
|
||||||
} while (0)
|
} while (0)
|
||||||
|
@ -166,9 +140,8 @@ extern KeySym ks_smallfont;
|
||||||
_XFUNCPROTOBEGIN
|
_XFUNCPROTOBEGIN
|
||||||
|
|
||||||
unsigned long num_words(const char *str);
|
unsigned long num_words(const char *str);
|
||||||
extern void get_initial_options(int, char **);
|
|
||||||
extern void get_options(int, char **);
|
|
||||||
extern char *conf_parse_theme(char **theme, char *conf_name, unsigned char fallback);
|
extern char *conf_parse_theme(char **theme, char *conf_name, unsigned char fallback);
|
||||||
|
extern void init_libast(void);
|
||||||
extern void init_defaults(void);
|
extern void init_defaults(void);
|
||||||
extern void post_parse(void);
|
extern void post_parse(void);
|
||||||
unsigned char save_config(char *, unsigned char);
|
unsigned char save_config(char *, unsigned char);
|
||||||
|
|
|
@ -34,6 +34,7 @@ static const char cvs_ident[] = "$Id$";
|
||||||
#include <signal.h>
|
#include <signal.h>
|
||||||
|
|
||||||
#include "command.h"
|
#include "command.h"
|
||||||
|
#include "menus.h"
|
||||||
#include "options.h"
|
#include "options.h"
|
||||||
#include "pixmap.h"
|
#include "pixmap.h"
|
||||||
#include "screen.h"
|
#include "screen.h"
|
||||||
|
@ -73,7 +74,7 @@ static eterm_script_handler_t script_handlers[] = {
|
||||||
};
|
};
|
||||||
static size_t handler_count = sizeof(script_handlers) / sizeof(eterm_script_handler_t);
|
static size_t handler_count = sizeof(script_handlers) / sizeof(eterm_script_handler_t);
|
||||||
|
|
||||||
#if 0
|
#if UNUSED_BLOCK
|
||||||
void
|
void
|
||||||
eterm_handle_winop(char *action)
|
eterm_handle_winop(char *action)
|
||||||
{
|
{
|
||||||
|
|
|
@ -91,9 +91,7 @@ eterm_bootstrap(int argc, char *argv[])
|
||||||
|
|
||||||
PABLO_START_TRACING();
|
PABLO_START_TRACING();
|
||||||
getcwd(initial_dir, PATH_MAX);
|
getcwd(initial_dir, PATH_MAX);
|
||||||
|
init_libast();
|
||||||
libast_set_program_name(PACKAGE);
|
|
||||||
libast_set_program_version(VERSION);
|
|
||||||
|
|
||||||
/* Open display, get options/resources and create the window */
|
/* Open display, get options/resources and create the window */
|
||||||
if (getenv("DISPLAY") == NULL) {
|
if (getenv("DISPLAY") == NULL) {
|
||||||
|
@ -104,7 +102,7 @@ eterm_bootstrap(int argc, char *argv[])
|
||||||
|
|
||||||
/* This MUST be called before any other Xlib functions */
|
/* This MUST be called before any other Xlib functions */
|
||||||
|
|
||||||
get_initial_options(argc, argv);
|
spifopt_parse(argc, argv);
|
||||||
init_defaults();
|
init_defaults();
|
||||||
|
|
||||||
#ifdef NEED_LINUX_HACK
|
#ifdef NEED_LINUX_HACK
|
||||||
|
@ -189,7 +187,7 @@ eterm_bootstrap(int argc, char *argv[])
|
||||||
D_OPTIONS(("New rs_path set to \"%s\"\n", rs_path));
|
D_OPTIONS(("New rs_path set to \"%s\"\n", rs_path));
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
get_options(argc, argv);
|
spifopt_parse(argc, argv);
|
||||||
D_UTMP(("Saved real uid/gid = [ %d, %d ] effective uid/gid = [ %d, %d ]\n", my_ruid, my_rgid, my_euid, my_egid));
|
D_UTMP(("Saved real uid/gid = [ %d, %d ] effective uid/gid = [ %d, %d ]\n", my_ruid, my_rgid, my_euid, my_egid));
|
||||||
D_UTMP(("Now running with real uid/gid = [ %d, %d ] effective uid/gid = [ %d, %d ]\n", getuid(), getgid(), geteuid(), getegid()));
|
D_UTMP(("Now running with real uid/gid = [ %d, %d ] effective uid/gid = [ %d, %d ]\n", getuid(), getgid(), geteuid(), getegid()));
|
||||||
|
|
||||||
|
@ -216,8 +214,6 @@ eterm_bootstrap(int argc, char *argv[])
|
||||||
post_parse();
|
post_parse();
|
||||||
|
|
||||||
#ifdef PREFER_24BIT
|
#ifdef PREFER_24BIT
|
||||||
cmap = DefaultColormap(Xdisplay, Xscreen);
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* If depth is not 24, look for a 24bit visual.
|
* If depth is not 24, look for a 24bit visual.
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -1 +0,0 @@
|
||||||
timestamp
|
|
Loading…
Reference in New Issue