Commit Graph

127 Commits

Author SHA1 Message Date
Michael Jennings 5d475d0105 src/*.c, Eterm.spec: Various build fixes
Several changes here to make it build on RHEL/CentOS 8:
 - Replace outdated MEMSET() macro with (g)libc memset()
 - Update Release field to use `git describe` just like LibAST
 - Fix `make distcheck` by adding an uninstall-hook for src/gdb.scr
 - At long last, remove the ancient RPM %changelog content
 - Fix incompatibility with my traditional choices for CFLAGS
   (-O0 -g3) and modern RHEL security/hardening goop which, due to
   being implemented in the GCC optimizer, is rendered non-functional
   by building with -O0!
 - Rename backgrounds tarball so that it doesn't have the Eterm
   version in its name since, shockingly, it never changes based on
   the version of Eterm!
2020-02-28 17:06:54 -07:00
Boris Faure 4b35c31087 fix infinite loop while closing file descriptor when too many available 2014-07-29 20:32:47 +02:00
Michael Jennings e096c4df0f Tue Mar 15 23:03:57 2011 mej
Fix for CVE-2011-0409 (CERT VU#285156), a use-after-free error in the
XIM code.  This only affects versions where XIM support is compiled in
(which it is by default).  There are no known exploits for this bug,
but it is theoretically exploitable.  Thanks to Jonathan Brossard and
the team at Toucan System for responsibly disclosing this
vulnerability and to CERT for assisting with coordination and
disclosure.
----------------------------------------------------------------------


SVN revision: 59413
2011-05-15 21:19:59 +00:00
Lucas De Marchi 369e95c1df Revert and re-apply badnull patch
Revert previous patch generated by badnull.cocci script, and apply the new one.
The main difference is that assert and assert-like functions are not touched
anymore.




SVN revision: 51650
2010-08-26 01:34:13 +00:00
Michael Jennings d3bb74d029 Revert coccinelle changes.
Using !! instead of != NULL results in significantly and unacceptably
less readable code, and I refuse to accept those changes.
Unfortunately, since they were all done at once, I have to revert the
whole thing.  Oh well. :(


SVN revision: 51583
2010-08-23 17:55:09 +00:00
Lucas De Marchi 3f375e63e2 Convert (hopefully) all comparisons to NULL
Apply badzero.cocci, badnull.coci and badnull2.cocci

This should convert all cases where there's a comparison to NULL to simpler
forms. This patch applies the following transformations:

code before patch               ||code after patch
===============================================================

return a == NULL;                 return !a;

return a != NULL;                 return !!a;

func(a == NULL);                  func(!a);

func(a != NULL);                  func(!!a);

b = a == NULL;                    b = !a;

b = a != NULL;                    b = !!a;

b = a == NULL ? c : d;            b = !a ? c : d;

b = a != NULL ? c : d;            b = a ? c : d;


other cases:

a == NULL                         !a
a != NULL                         a




SVN revision: 51487
2010-08-21 13:52:25 +00:00
Michael Jennings 42a135456a Sun Oct 25 12:36:01 2009 Michael Jennings (mej)
Patch for FreeBSD UNIX98 pty support from Ed Schouten <ed@80386.nl>.
----------------------------------------------------------------------


SVN revision: 43281
2009-10-25 20:30:06 +00:00
Michael Jennings c6ff25f5f1 Sun Oct 25 12:29:32 2009 Michael Jennings (mej)
Re-enable SIGPIPE after fork() for child processes who might not
re-enable it on their own.
----------------------------------------------------------------------


SVN revision: 43280
2009-10-25 20:23:24 +00:00
Michael Jennings f5e3dbacf6 Tue Jan 6 01:08:47 2009 Michael Jennings (mej)
Update copyright dates and fix a bad license.
----------------------------------------------------------------------


SVN revision: 38480
2009-01-06 09:08:48 +00:00
Michael Jennings e53c4775f6 Tue Jan 6 01:03:35 2009 Michael Jennings (mej)
Prevent blank Escreen buttonbar on startup.
----------------------------------------------------------------------


SVN revision: 38479
2009-01-06 09:03:36 +00:00
Michael Jennings 0261bd001b Mon Jan 5 23:50:28 2009 Michael Jennings (mej)
Remove fontset fallbacks.  I think this might help speed up the load
time slowness some people are seeing.  Let's find out.
----------------------------------------------------------------------


SVN revision: 38477
2009-01-06 07:51:15 +00:00
Michael Jennings 9a7cd3adac Tue Dec 16 22:03:54 2008 Michael Jennings (mej)
Fix compile errors related to the removal of unnecessary typecasting
macros.
----------------------------------------------------------------------


SVN revision: 38171
2008-12-17 06:04:15 +00:00
Michael Jennings 3df02b2205 Wed May 14 12:42:51 2008 Michael Jennings (mej)
Patch from Kim Woelders <kim@woelders.dk>:

    There is a race problem with Eterm during startup related to the
    shell LINES/COLUMNS env vars.

    If the WM changes the window size (e.g. due to saved settings)
    before mapping the window, sometimes the shell will set LINES and
    COLUMNS according to the old/incorrect size and sometimes to the
    new/correct size, depending on wheter the call to tt_winsize() at
    command.c line 2322 (by the shell child process) or the
    tt_resize() (by the Eterm process) due to the ConfigureNotify
    caused by the resize (or WM ICCCM ConfigureNotify) operation
    happens first.

The call in question was added by Azundris for Escreen.  So far
Escreen seems to be behaving properly with this patch applied, but all
my Eterm windows (Escreen and otherwise) are pre-sized with -g anyway.
So I'm going to keep my eye on it for awhile.  In case of trouble,
change the "#if 0" to "#ifdef ESCREEN" to revert to previous behavior
when in Escreen mode.  Normal operation should not require the call in
question.
----------------------------------------------------------------------


SVN revision: 34568
2008-05-14 19:49:22 +00:00
Michael Jennings 3ccf45d5af Wed Oct 18 13:35:18 2006 Michael Jennings (mej)
Fixed a typo and some logic errors in libscream located by Mike
Frysinger <vapier@gentoo.org>.
----------------------------------------------------------------------


SVN revision: 26691
2006-10-18 17:36:10 +00:00
Michael Jennings edf3577888 Fri Aug 18 13:41:14 2006 Michael Jennings (mej)
Addressed licensing concerns.
----------------------------------------------------------------------


SVN revision: 24877
2006-08-18 17:41:19 +00:00
Michael Jennings 6c1e5b3b6c Fri May 19 16:46:02 2006 Michael Jennings (mej)
Fixed a problem that's been bugging me for ages:  Instead of a
hard-coded delay, wait until we can connect to the ssh forwarding port
before starting the Escreen session via ssh.

Add usleep() to system() wait so as to not peg the CPU while sitting
and spinning.
----------------------------------------------------------------------


SVN revision: 22752
2006-05-19 20:45:42 +00:00
Michael Jennings 7537403997 Mon Feb 13 14:51:56 2006 Michael Jennings (mej)
Update to libast 0.6+ API.
----------------------------------------------------------------------


SVN revision: 20440
2006-02-13 19:52:45 +00:00
Michael Jennings fccdc9bb52 Mon Feb 6 17:15:49 2006 Michael Jennings (mej)
DragonFly BSD fixes from Joerg Sonnenberger <joerg@britannica.bec.de>.

Also some type mismatch fixes.
----------------------------------------------------------------------


SVN revision: 20313
2006-02-06 22:16:50 +00:00
Michael Jennings e39e3f1ce9 Wed Jan 4 03:44:04 2006 Michael Jennings (mej)
X resource tracking/debugging support.
----------------------------------------------------------------------


SVN revision: 19520
2006-01-04 08:44:14 +00:00
Michael Jennings 0ceb458457 Tue Aug 16 10:48:12 2005 Michael Jennings (mej)
Applied a fix from benny@sweetfactory.org for a typo in keysym
handling.

Fixed percent signs in menu files thanks to Yasufumi Haga
<yasufumi.haga@nifty.com>.

Fixed E IPC version check to work with old and new schemes.
----------------------------------------------------------------------


SVN revision: 16213
2005-08-16 14:50:49 +00:00
Michael Jennings 302d5b7363 Mon Apr 25 15:34:49 2005 Michael Jennings (mej)
Added --enable-escreen-fx flag to ./configure to enable/disable the
Escreen startup effects (bosconian, matrix, etc.).

Fixed some warnings.
----------------------------------------------------------------------


SVN revision: 14359
2005-04-25 19:37:23 +00:00
Michael Jennings 6657911db3 Mon Apr 18 21:49:08 2005 Michael Jennings (mej)
Re-indent code.
----------------------------------------------------------------------


SVN revision: 14229
2005-04-19 01:57:24 +00:00
Michael Jennings 2cbc7871a7 Mon Dec 20 14:42:00 2004 Michael Jennings (mej)
Oops, let's not jump into that just yet.
----------------------------------------------------------------------


SVN revision: 12527
2004-12-20 19:42:17 +00:00
Michael Jennings 3c059ee512 Mon Dec 20 14:31:33 2004 Michael Jennings (mej)
Okay, so my first problem was that I didn't pay close enough attention
to the iconv_open() man page and got the parameter order wrong.  Duh.
Thanks to Sytse Wielinga <s.b.wielinga@student.utwente.nl> for
noticing that.

kwo suggested using XmbDrawString(), but that causes font problems I'm
not ready to diagnose just yet.
----------------------------------------------------------------------


SVN revision: 12526
2004-12-20 19:37:04 +00:00
swielinga 11356eeb96 Fixed the obvious errors in this UTF-8 code. It doesn't produce gibberish
anymore, though it doesn't appear to be multilingual heaven just quite yet.


SVN revision: 12501
2004-12-18 19:04:12 +00:00
Michael Jennings d7f979b78b Fri Dec 17 16:35:31 2004 Michael Jennings (mej)
Another attempt (and failure) at UTF-8 support.  Disabled until
someone can help me out.

If you know iconv(), please have a look at the FIXME_BLOCK starting at
line 3509 of src/command.c.
----------------------------------------------------------------------


SVN revision: 12495
2004-12-17 21:37:39 +00:00
Michael Jennings 19cae1a53d Tue Dec 14 17:22:23 2004 Michael Jennings (mej)
The benefits of being a passenger on a long road trip...  The
beginnings of EWMH opacity (a la xcompmgr) support and (hopefully)
UTF-8 support.  Both as yet untested.
----------------------------------------------------------------------


SVN revision: 12471
2004-12-14 23:24:33 +00:00
Michael Jennings 6bc3bad36b Thu Mar 11 09:07:13 2004 Michael Jennings (mej)
Fixed window sizing race condition noted by Virgil <virgil@yak.net>.


SVN revision: 9323
2004-03-11 13:59:44 +00:00
Michael Jennings 7e4994ae05 Wed Jan 7 15:08:24 2004 Michael Jennings (mej)
Disable build-time check for screen.


SVN revision: 8297
2004-01-07 20:08:42 +00:00
Michael Jennings 243e65e5a2 Sun Aug 24 11:07:54 2003 Michael Jennings (mej)
I redid the options variables and constants to try and make things
more standardized, and to make room for future toggles as well.  This
should make David Lloyd a bit happier, 'cause now we can get his patch
in here. :)

Hopefully I didn't break anything....


SVN revision: 7370
2003-08-24 15:09:32 +00:00
Michael Jennings 0784d8336b Thu Aug 21 23:51:12 2003 Michael Jennings (mej)
Oops, that wasn't *quite* what I had in mind....


SVN revision: 7362
2003-08-22 03:52:02 +00:00
Michael Jennings 6b43700de1 Thu Aug 21 23:18:23 2003 Michael Jennings (mej)
A few cosmetic changes to the source code, and a fix for Debian Bug
#176274 reported by Gerhard Tonn <GerhardTonn@gammatau.de>.


SVN revision: 7361
2003-08-22 03:19:43 +00:00
Michael Jennings df078dd652 Sun Mar 2 23:40:39 2003 Michael Jennings (mej)
Fixed a bug with foreground/background color change pointed out by
Thomas <arnognul@tiscali.se>.

Also added support for all the other OSC color change sequences (at
least those for the colors that Eterm uses).  The sequences are of
the form "\e];n;color[;color[...]]\a", where n is between 10 and 19.
You can specify up to (20 - n) semicolon-separated colors representing
the following attributes in order:  foreground, background, cursor,
mouse pointer, mouse pointer background (*), Tek foreground (*), Tek
background (*), highlight color (*), bold color, and underline color.
Attributes marked with a (*) are ignored by Eterm and may be left
empty, but their trailing semicolons must be present for xterm
compatibility.

For example, to set a white foreground, black background, yellow text
cursor, green mouse cursor, #ffaa00 for bold, and cyan for underline,
you could use either of the following:

echo -e "\e]10;white;black;yellow;green;;;;;#ffaa00;cyan\007"

 or

echo -e "\e]10;white\007"
echo -e "\e]11;black\007"
echo -e "\e]12;yellow\007"
echo -e "\e]13;green\007"
echo -e "\e]18;#ffaa00\007"
echo -e "\e]19;cyan\007"

Note that the setting of bold and underline colors using 18 and 19 are
Eterm extensions.


SVN revision: 6739
2003-03-03 04:53:35 +00:00
Michael Jennings 675bf268aa Wed Nov 27 15:17:04 2002 Michael Jennings (mej)
Same as yesterday, only this time I'm *actually* going to fix the
problem. >:I  I should really read more carefully.

While I was at it, I fixed some bad uses of BEG_STRCASECMP().


SVN revision: 6467
2002-11-27 20:18:24 +00:00
Michael Jennings 28dcf32708 Tue Nov 26 17:51:34 2002 Michael Jennings (mej)
I need my Escreen sessions to be able to beep, so let's allow that.


SVN revision: 6466
2002-11-26 22:52:22 +00:00
Michael Jennings 6d1597926e Mon Nov 18 12:28:43 2002 Michael Jennings (mej)
Remove acinclude.m4 now that libast.m4 has all that stuff in it.

Hopefully improve exit handling.

Change "export TERM=vt100" to the portable "TERM=vt100; export TERM"
syntax.


SVN revision: 6452
2002-11-18 17:30:06 +00:00
Michael Jennings 3f5cf1fccc Thu Oct 24 23:54:46 2002 Michael Jennings (mej)
Added bbar_dock and bbar_font directives to escreen context so that
users can alter the dock location and font of the Escreen buttonbar.

This should be it for feature additions and last-minute code changes.
I need to update the docs, but that's about it.


SVN revision: 6433
2002-10-25 03:57:17 +00:00
Michael Jennings d86a345768 Tue Oct 22 23:02:28 2002 Michael Jennings (mej)
Allow users to customize the Escreen current/active display colors.

Don't display the Escreen button if there's no Escreen menu defined.


SVN revision: 6432
2002-10-23 03:03:27 +00:00
Michael Jennings a74ae94c5a Sun Oct 13 00:57:37 2002 Michael Jennings (mej)
Moved "Escreen" menu to the new Escreen theme so it's no longer
hard-coded.

Added interactive prompting to search() script routine.

Changed dialog() routine to exec_dialog() and added editing of its
command line.

Added msgbox() script routine to display a message and wait for a
keypress.

Fixed a memory leak in the menu_dialog() function.  Also cleaned up
its event handling.

Added comments to the script routines that were missing them.

Make sure we exit cleanly if our window is destroyed.

Fixed the missing menus in the Escreen theme.  You'll still get an
error message when it loads, but I'm not that worried about it.


SVN revision: 6421
2002-10-13 05:03:47 +00:00
Michael Jennings ea06545d9e Mon Oct 7 22:16:38 2002 Michael Jennings (mej)
This should clean up and consolidate the size-setting and reporting to
eliminate the discrepencies sometimes seen in Escreen mode when
coupled, for example, with --buttonbar 0.  Azundris spotted this ages
ago, and I've been putting off fixing it.  But it should be all
straightened out now.


SVN revision: 6416
2002-10-08 02:18:09 +00:00
Michael Jennings 6b461d5434 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
2002-10-05 01:19:41 +00:00
Michael Jennings ba78b88603 Thu Jul 11 20:39:28 2002 Michael Jennings (mej)
Addition to last fix.  Also, we're going to specify error messages
that *should* be shown and ignore others, not show all but a select
few.  This helps with the status line issue.


SVN revision: 6338
2002-07-12 00:44:42 +00:00
Michael Jennings 0db3598235 Wed Jul 3 13:49:27 2002 Michael Jennings (mej)
Fixed a bug in libscream that caused remote screen sessions to be
resumed with, e.g., "-e ^Uu_" instead of "-e ^Uu".

Applied a bug fix from Bill Allombert <allomber@math.u-bordeaux.fr>
where I was using the wrong variable for loading the icon file from
disk.

Also fixed a problem where PrintScreen would cause Eterm to exit.
Pointed out by Laurence J. Lane <ljlane@debian.org>.


SVN revision: 6336
2002-07-03 17:55:48 +00:00
Michael Jennings 224817eb24 Fri Jun 28 16:40:55 2002 Michael Jennings (mej)
Additional twin stuff, plus a bug fix for dragging Escreen buttons.


SVN revision: 6334
2002-06-28 20:44:40 +00:00
Michael Jennings d0cbe0001c Wed Jun 26 23:14:20 2002 Michael Jennings (mej)
Bug-hunting....


SVN revision: 6331
2002-06-27 03:17:45 +00:00
Michael Jennings ec34068f82 Wed Jun 26 16:58:14 2002 Michael Jennings (mej)
Latest Escreen stuff from Azundris, including work on twin support
(twin.sourceforge.net).


SVN revision: 6330
2002-06-26 21:02:12 +00:00
Michael Jennings 7a1154f3d3 Tue Jun 18 16:24:03 2002 Michael Jennings (mej)
Fixed the flickering of the buttonbar caused by Escreen updates.

Also fixed the deselecting of the current button on redraw.


SVN revision: 6324
2002-06-18 20:27:41 +00:00
Michael Jennings 4e84d0f65b Fri Jun 14 09:05:49 2002 Michael Jennings (mej)
This should fix the bug Creepy spotted where the buttonbar event
initialization was crashing.


SVN revision: 6323
2002-06-14 13:06:34 +00:00
Michael Jennings 4e93b984de Fri Jun 14 01:40:50 2002 Michael Jennings (mej)
Fixed a couple bugs, trying to track down some others.


SVN revision: 6321
2002-06-14 05:41:23 +00:00
Michael Jennings b8c1785c39 Sat Jun 8 12:46:44 2002 Michael Jennings (mej)
My own Escreen updates, primarily for devoting a dedicated buttonbar
to Escreen's use.  This keeps Escreen from trodding on your existing
buttonbar, if you have one.  It's hard-coded to bottom-dock right
now; we'll look at configuration later. :-)


SVN revision: 6308
2002-06-08 16:50:38 +00:00