basedir = ..
thisdir = src
-# for developers: the following debug options may be used
-# -DDEBUG_CMD -DDEBUG_MAIN -DDEBUG_RESOURCES
-# -DDEBUG_SEARCH_PATH -DDEBUG_SIZE -DDEBUG_TTY -DDEBUG_TTYMODE
-# -DDEBUG_KEYBOARD -DDEBUG_STRICT
-DEBUG=-DDEBUG_STRICT @DEBUG@
+DEBUG=-DDEBUG_STRICT
first_rule: all
dummy:
int ctrl, meta, shft, len;
unsigned int newlen;
KeySym keysym;
-#ifdef DEBUG_CMD
- static int debug_key = 1; /* accessible by a debugger only */
-#endif
int valid_keysym;
char kbuf[KBUFSZ];
tt_write (&ch, 1);
}
-#if defined(DEBUG_CMD)
- /* Display keyboard buffer contents */
- unsigned char *p;
- int i;
-
- fprintf (stderr, "key 0x%04X [%d]: `", (unsigned int)keysym, len);
- for (i = 0, p = kbuf; i < len; i++, p++)
- fprintf (stderr, (*p >= ' ' && *p < '\177' ? "%c" : "\\%03o"), *p);
- fprintf (stderr, "'\n");
-#endif /* DEBUG_CMD */
tt_write (kbuf, (unsigned int)len);
}
/*}}} */
if (arg[p] == -1)
arg[p] = ndef;
-#ifdef DEBUG_CMD
- fprintf (stderr, "CSI ");
- for (p = 0; p < nargs; p++)
- fprintf (stderr, "%d%s", arg[p], p < nargs - 1 ? ";" : "");
- fprintf (stderr, "%c\n", ch);
-#endif
-
/*
* private mode handling
*/
keymap.swap (sorted_keymap);
-#if defined (DEBUG_STRICT) || defined (DEBUG_KEYBOARD)
+#ifdef DEBUG_STRICT
// check for invariants
for (i = 0; i < KEYSYM_HASH_BUDGETS; ++i)
{
void
sig_term (sig_watcher &w)
{
-#ifdef DEBUG_CMD
- rxvt_warn ("caught signal %d, exiting.\n", w.signum);
-#endif
rxvt_emergency_cleanup ();
signal (w.signum, SIG_DFL);
kill (getpid (), w.signum);
unsigned int max_width, max_height;
dDisp;
- D_SIZE ((stderr, "< Cols/Rows: %3d x %3d ; Width/Height: %4d x %4d",
- ncol, nrow, szHint.width, szHint.height));
-
szHint.flags = PMinSize | PResizeInc | PBaseSize | PWinGravity;
szHint.win_gravity = NorthWestGravity;
/* szHint.min_aspect.x = szHint.min_aspect.y = 1; */
ncol = width / fwidth;
nrow = height / fheight;
- D_SIZE ((stderr, "> Cols/Rows: %3d x %3d ; Width/Height: %4d x %4d",
- ncol, nrow, szHint.width,
- szHint.height));
- return;
}
/*----------------------------------------------------------------------*/
if (! ((p = XSetLocaleModifiers (modifiers)) && *p))
return false;
- D_MAIN ((stderr, "rxvt_IM_get_IC ()"));
input_method = display->get_xim (locale, modifiers);
if (input_method == NULL)
return false;
if (input_style & XIMPreeditArea)
IMSetStatusPosition ();
- D_MAIN ((stderr, "rxvt_IM_get_IC () - successful connection"));
return true;
}
im_destroy ();
- D_MAIN ((stderr, "rxvt_IMInstantiateCallback ()"));
if (Input_Context)
return;
* file searching
*/
-/* #define DEBUG_SEARCH_PATH */
-
#ifdef XPM_BACKGROUND
/*
* search for FILE in the current working directory, and within the
*
* FILE is either semi-colon or zero terminated
*/
-char *
+char *
rxvt_File_search_path (const char *pathlist, const char *file, const char *ext) NOTHROW
{
int maxpath, len;
else
len = strlen (file);
-#ifdef DEBUG_SEARCH_PATH
- getcwd (name, sizeof (name));
- fprintf (stderr, "pwd: \"%s\"\n", name);
- fprintf (stderr, "find: \"%.*s\"\n", len, file);
-#endif
-
/* leave room for an extra '/' and trailing '\0' */
maxpath = sizeof (name) - (len + (ext ? strlen (ext) : 0) + 2);
if (maxpath <= 0)
return NULL;
}
-char *
+char *
rxvt_File_find (const char *file, const char *ext, const char *path) NOTHROW
{
char *f;
f = rxvt_File_search_path (path, file, ext);
-#ifdef DEBUG_SEARCH_PATH
- if (f)
- fprintf (stderr, "found: \"%s\"\n", f);
-#endif
-
return f;
}
#endif
# define XPMClearArea(a, b, c, d, e, f, g)
#endif
-#ifdef DEBUG_CMD
-# define D_CMD(x) fprintf x ; fputc('\n', stderr)
-#else
-# define D_CMD(x)
-#endif
-#ifdef DEBUG_INIT
-# define D_INIT(x) fprintf x ; fputc('\n', stderr)
-#else
-# define D_INIT(x)
-#endif
-#ifdef DEBUG_MAIN
-# define D_MAIN(x) fprintf x ; fputc('\n', stderr)
-#else
-# define D_MAIN(x)
-#endif
-#ifdef DEBUG_SIZE
-# define D_SIZE(x) fprintf x ; fputc('\n', stderr)
-#else
-# define D_SIZE(x)
-#endif
-
typedef callback1<void, const char *> log_callback;
typedef callback1<int, int> getfd_callback;
0,
pix_colors[Color_fg],
pix_colors[Color_border]);
-#ifdef DEBUG_X
- XStoreName (display->display, scrollBar.win, "scrollbar");
-#endif
XDefineCursor (display->display, scrollBar.win, leftptr_cursor);
XSelectInput (display->display, scrollBar.win,
#define Optflag_Boolean 0x80000000UL
#define Optflag_mask 0x3fffffffUL
-/* #define DEBUG_RESOURCES */
-
/*{{{ monolithic option/resource structure: */
/*
* `string' options MUST have a usage argument
const char *flag, *opt;
opt = argv[i];
-#ifdef DEBUG_RESOURCES
- fprintf (stderr, "argv[%d] = %s: ", i, opt);
-#endif
+
if (*opt == '-')
{
flag = On;
}
else
{ /* boolean value */
-#ifdef DEBUG_RESOURCES
- fprintf (stderr, "boolean (%s,%s) = %s\n",
- optList[entry].opt, optList[entry].kw, flag);
-#endif
set_option (optList[entry].flag & Optflag_mask, flag == On);
if (optList[entry].doff != -1)