summaryrefslogtreecommitdiff
path: root/libmej
diff options
context:
space:
mode:
authorMichael Jennings <mej@kainx.org>2000-02-11 00:25:07 +0000
committerMichael Jennings <mej@kainx.org>2000-02-11 00:25:07 +0000
commit42fde9c99d5c8c8e51f4175d1069179efdf5154c (patch)
tree2c4db682de44aa701b02302ce9e03981fc709e52 /libmej
parent9a0e0ce8fc220060ad02cb8779bf04a529c5c896 (diff)
downloadeterm-42fde9c99d5c8c8e51f4175d1069179efdf5154c.tar.gz
Thu Feb 10 15:10:01 PST 2000 Michael Jennings <mej@eterm.org>
This is the first public availability of the work thus far on Eterm 0.9.1. There's quite a bit of new stuff here. * Added scrollbar thumb support. * Completely redid the terminfo/termcap stuff. The terminfo file is now compiled (by tic) and installed by default (unless you specify --without-terminfo). The config files still say xterm, though, because some programs (like SLang and GNU mc) use the silly algorithm of "Is $TERM set to xterm?" to detect mouse reporting support in a terminal. =P But if you don't ever use xterm, you can use Eterm's termcap and just name it "xterm" instead. Thanks to Marius Gedminas <mgedmin@takas.lt> for his patch that started this whole revamp. * Added the kEsetroot script for KDE users from Dax Games <dgames@isoc.net>. * You can now configure the Home and End emulation via --with-home= and --with-end= options to configure. The --with-terminfo option is also new, and --enable-xim is now the default. * Added a new image state, disabled, for when Eterm loses focus. This is supported by all widgets (well, all those that could possibly be on screen when Eterm lost focus), even the background image. So you could actually have all your images darken on focus out and restore to normal on focus in. * Widget colors formerly dealt with as colors (menu text color, scrollbar color, etc.) are now handled by the imageclasses. Each image state can have a foreground and background color defined. The current exception is the background image; I hope to add that later. The foreground is the text color and the background is the object color (for solid color mode). So menu text color is set by the menu imageclass. And again, for unfocused colors, use the disabled state of the imageclass. * Proportionally-spaced fonts are now handled much better. They are still forced into evenly-spaced columns (it's a terminal for crying out loud!) but at least you don't end up with Eterm's wider than your screen. :-) * Home on refresh is gone, as is home on echo. It's now much simpler. There are two options: home on output, and home on input, the former being a combination of echo and refresh. Also, keypresses that don't necessarily have corresonding output can trigger a home on input, like Ctrl-End or whatever...ones that don't have special meaning. Credit to Darren Stuart Embry <dse@louisville.edu> for pointing out this issue and the one with "m-" in font names. * I finally got around to re-merging the new parser stuff from my work on the Not Game. Closed up some old potential behavior quirks with theme parsing. * Added a new escape sequence to fork-and-exec a program. Also added a scrollback search capability to highlight all occurances of a string in your scrollback buffer. Use the new "Etsearch" utility to access it. "Etsearch string" to search for a string, then "Etsearch" by itself to reset the highlighting. * And of course, the biggie. Eterm now supports a completely- customizeable buttonbar. Not a menubar, a buttonbar. It can have an arbitrary number of buttons, and each button can perform an action, just like a menuitem. So a button could bring up a menu (like a menubar) or launch a program (like a launchbar) or perform an operation (like a toolbar). Each button can have an icon, text, or both. And you can have buttons left- or right-justified in the buttonbar. You will eventually be able to have an arbitrary number of buttonbars, but I'm still working on that. As with any change this big, things could very easily be broken. So beware. :-) I have tested this myself, and everything seems to work, but I can't test every possibility. Let me know if you find anything that's broken, and enjoy! SVN revision: 2048
Diffstat (limited to 'libmej')
-rw-r--r--libmej/mem.h8
-rw-r--r--libmej/strings.c2
2 files changed, 5 insertions, 5 deletions
diff --git a/libmej/mem.h b/libmej/mem.h
index b3ad013..6e826d9 100644
--- a/libmej/mem.h
+++ b/libmej/mem.h
@@ -42,12 +42,12 @@ typedef struct memrec_struct {
# define MALLOC(sz) malloc(sz)
# define CALLOC(type,n) calloc((n),(sizeof(type)))
# define REALLOC(mem,sz) realloc((mem), (sz))
-# define FREE(ptr) do { free(ptr); ptr = NULL; } while (0)
+# define FREE(ptr) do { free(ptr); (ptr) = NULL; } while (0)
#elif (DEBUG >= DEBUG_MALLOC)
-# define MALLOC(sz) Malloc(__FILE__, __LINE__, sz)
+# define MALLOC(sz) Malloc(__FILE__, __LINE__, (sz))
# define CALLOC(type,n) Calloc(__FILE__, __LINE__, (n),(sizeof(type)))
# define REALLOC(mem,sz) Realloc(#mem, __FILE__, __LINE__, (mem),(sz))
-# define FREE(ptr) do { Free(#ptr, __FILE__, __LINE__, ptr); ptr = NULL; } while (0)
+# define FREE(ptr) do { Free(#ptr, __FILE__, __LINE__, (ptr)); (ptr) = NULL; } while (0)
# define MALLOC_MOD 25
# define REALLOC_MOD 25
# define CALLOC_MOD 25
@@ -56,7 +56,7 @@ typedef struct memrec_struct {
# define MALLOC(sz) malloc(sz)
# define CALLOC(type,n) calloc((n),(sizeof(type)))
# define REALLOC(mem,sz) ((sz) ? ((mem) ? (realloc((mem), (sz))) : (malloc(sz))) : ((mem) ? (free(mem)) : (NULL)))
-# define FREE(ptr) do { free(ptr); ptr = NULL; } while (0)
+# define FREE(ptr) do { free(ptr); (ptr) = NULL; } while (0)
#endif
extern char *SafeStr(char *, unsigned short);
diff --git a/libmej/strings.c b/libmej/strings.c
index 3f6ff5e..7aaaad3 100644
--- a/libmej/strings.c
+++ b/libmej/strings.c
@@ -83,7 +83,7 @@ usleep(unsigned long usec)
/***** Not needed ******
#ifndef HAVE_NANOSLEEP
-inline void
+__inline__ void
nanosleep(unsigned long nsec) {
usleep(nsec / 1000);
}