or changed rxvt behaviour to make it more compatible to xterm (usually
xfree86's xterm).
+2.8 Thu Apr 8 22:44:36 CEST 2004
+ - replace PF_LOCAL by PF_UNIX (portability).
+ - try to detect -lnsl and -lsocket (portability).
+ - fix some minor bugs.
+
2.7 Mon Apr 5 02:11:15 CEST 2004
- this version should now work fine with TERM=xterm.
- don't leave the X or rxvtd sockets open in child processes.
-COMMENT(-- $Id: versioninfo.yo,v 1.11 2004-04-05 15:54:23 pcg Exp $ --)
+COMMENT(-- $Id: versioninfo.yo,v 1.12 2004-04-08 20:34:43 pcg Exp $ --)
DEFINEMACRO(RXVTNAME)(0)
(rxvt)
DEFINEMACRO(RXVTDATE)(0)
/*--------------------------------*-C-*---------------------------------*
- * File: command.c
+ * File: command.C
*----------------------------------------------------------------------*
*
* All portions of code are copyright by their respective author/s.
#ifdef USE_XIM
IMSendSpot ();
#endif
-
}
display->flush ();
{
ssize_t n = cmdbuf_endp - cmdbuf_ptr;
+ if (CBUFSIZ == n)
+ {
+ rxvt_warn ("pty_fill on full buffer, draining input, continuing.\n");
+ n = 0;
+ }
+
memmove (cmdbuf_base, cmdbuf_ptr, n);
cmdbuf_ptr = cmdbuf_base;
cmdbuf_endp = cmdbuf_ptr + n;
if (revents & EVENT_WRITE)
tt_write (0, 0);
else if (revents & EVENT_READ)
- {
- // loop, but don't allow a single term to monopolize us
- // the number of loops is fully arbitrary, and thus wrong
- while (pty_fill ())
- {
- if (!seen_input)
- {
- seen_input = 1;
- /* once we know the shell is running, send the screen size. Again! */
- // I don't know why, btw.
- tt_winch ();
- }
-
- if (cmd_parse ())
- break;
- }
- }
+ // loop, but don't allow a single term to monopolize us
+ while (pty_fill ())
+ if (cmd_parse ())
+ break;
}
#ifdef POINTER_BLANK
|| ev.xclient.data.l[0] == DndLink))
{
/* Get Dnd data */
- Atom ActualType;
- int ActualFormat;
- unsigned char *data;
- unsigned long Size, RemainingBytes;
+ Atom ActualType;
+ int ActualFormat;
+ unsigned char *data;
+ unsigned long Size, RemainingBytes;
XGetWindowProperty (display->display, display->root,
xa[XA_DNDSELECTION],
XA_CUT_BUFFER0, XA_STRING,
8, PropModeReplace,
data, STRLEN (data));
+ XFree (data);
selection_paste (display->root, XA_CUT_BUFFER0, True);
XSetInputFocus (display->display, display->root, RevertToNone, CurrentTime);
}
else
{
have_pixmap = 1;
- rootpixmap = * ((Pixmap *)prop);
+ rootpixmap = *(Pixmap *)prop;
XFree (prop);
}
if (ch == NOCHAR) // TODO: improve
break;
- if (!IS_CONTROL (ch) || ch == '\t' || ch == '\n' || ch == '\r')
+ if (!IS_CONTROL (ch) || ch == C0_LF || ch == C0_CR || ch == C0_HT)
{
/* Read a text string from the input buffer */
unicode_t buf[UBUFSIZ];
seq_begin = cmdbuf_ptr;
ch = next_char ();
- if (ch == NOCHAR || (IS_CONTROL (ch) && ch != '\t' && ch != '\n' && ch != '\r'))
+ if (ch == NOCHAR || (IS_CONTROL (ch) && ch != C0_LF && ch != C0_CR && ch != C0_HT))
break;
*str++ = ch;
- if (ch == '\n')
+ if (ch == C0_LF)
{
nlines++;
refresh_count++;
{
if ((Options & Opt_jumpScroll) && refresh_limit < REFRESH_PERIOD)
refresh_limit++;
-
- scr_refresh (refresh_type);
+ else
+ scr_refresh (refresh_type);
}
}
/* 8.3.87: NEXT LINE */
case C1_NEL: /* ESC E */
{
- unicode_t nlcr[] = { L'\n', L'\r' };
+ unicode_t nlcr[] = { C0_LF, C0_CR };
scr_add_lines (nlcr, 1, 2);
}
break;
/*----------------------------------------------------------------------*/
/*
* get input up until STRING TERMINATOR (or BEL)
- * ends_how is terminator used. returned input must be free ()d
+ * ends_how is terminator used. returned input must be free()'d
*/
unsigned char *
rxvt_term::get_to_st (unicode_t &ends_how)
seen_esc = 1;
continue;
}
- else if (ch == '\t')
+ else if (ch == C0_HT)
ch = ' '; /* translate '\t' to space */
- else if (ch < 0x20 && (ch != 0x0a && ch != 0x0d))
+ else if (ch < 0x20 && (ch != C0_LF && ch != C0_CR))
return NULL; /* other control character - exit */
if (n >= sizeof (string) - 1)
case 5:
rendset = 1, rendstyle = RS_Blink;
break;
+ //case 6: // scoansi light background
case 7:
rendset = 1, rendstyle = RS_RVid;
break;
case 8:
// invisible. NYI
break;
+ //case 10: // scoansi acs off
+ //case 11: // scoansi acs on
+ //case 12: // scoansi acs on, |0x80
+ case 21: // disable bold, blink and invis (some terminals use this)
+ rendset = 0, rendstyle = RS_Bold | RS_Blink;
+ break;
case 22:
rendset = 0, rendstyle = RS_Bold;
break;
}
/*}}} */
-/*{{{ process Rob Nation's own graphics mode sequences */
+/*{{{ (do not) process Rob Nation's own graphics mode sequences */
void
rxvt_term::process_graphics ()
{
-/*--------------------------------*-C-*---------------------------------*;
+/*--------------------------------*-C-*---------------------------------*
* File: defaultfont.C
*----------------------------------------------------------------------*
* Copyright (c) 2003-2004 Marc Lehmann <pcg@goof.com>
+/*--------------------------------*-C-*---------------------------------*
+ * File: encoding.C
+ *----------------------------------------------------------------------*
+ *
+ * All portions of code are copyright by their respective author/s.
+ * Copyright (c) 2003-2004 Marc Lehmann <pcg@goof.com>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ *----------------------------------------------------------------------*/
+
#include "../config.h"
#include "encoding.h"
/*--------------------------------*-C-*---------------------------------*
- * File: init.c
+ * File: init.C
*----------------------------------------------------------------------*
*
* All portions of code are copyright by their respective author/s.
/*--------------------------------*-C-*---------------------------------*
- * File: logging.c
+ * File: logging.C
*----------------------------------------------------------------------*
*
* All portions of code are copyright by their respective author/s.
* - extensive modifications
* Copyright (c) 1999 D J Hawkey Jr <hawkeyd@visi.com>
* - lastlog support
+ * Copyright (c) 2004 Marc Lehmann <pcg@goof.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
-/*--------------------------------*-C-*---------------------------------*;
- * File: main.c
+/*--------------------------------*-C-*---------------------------------*
+ * File: main.C
*----------------------------------------------------------------------*
*
* All portions of code are copyright by their respective author/s.
/*--------------------------------*-C-*---------------------------------*
- * File: menubar.c
+ * File: menubar.C
*----------------------------------------------------------------------*
*
* Copyright (c) 1997,1998 mj olesen <olesen@me.QueensU.CA>
+ * Copyright (c) 2004 Marc Lehmann <pcg@goof.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
/*--------------------------------*-C-*---------------------------------*
- * File: misc.c
+ * File: misc.C
*----------------------------------------------------------------------*
*
* All portions of code are copyright by their respective author/s.
/*--------------------------------*-C-*---------------------------------*
- * File: netdisp.c
+ * File: netdisp.C
*----------------------------------------------------------------------*
*
* All portions of code are copyright by their respective author/s.
/*--------------------------------*-C-*---------------------------------*
- * File: ptytty.c
+ * File: ptytty.C
*----------------------------------------------------------------------*
*
* All portions of code are copyright by their respective author/s.
* Copyright (c) 1999-2001 Geoff Wing <gcw@pobox.com>
+ * Copyright (c) 2004 Marc Lehmann <pcg@goof.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
+/*--------------------------------*-C-*---------------------------------*
+ * File: rxvt.C
+ *----------------------------------------------------------------------*
+ *
+ * All portions of code are copyright by their respective author/s.
+ * Copyright (c) 2003-2004 Marc Lehmann <pcg@goof.com>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ *----------------------------------------------------------------------*/
+
#include "../config.h"
#include "rxvt.h"
-/*----------------------------------------------------------------------*/
-/* main () */
int
main (int argc, const char *const *argv)
try
{
return EXIT_FAILURE;
}
+
+/*--------------------------------*-C-*---------------------------------*
+ * File: rxvtc.C
+ *----------------------------------------------------------------------*
+ *
+ * All portions of code are copyright by their respective author/s.
+ * Copyright (c) 2003-2004 Marc Lehmann <pcg@goof.com>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ *----------------------------------------------------------------------*/
+
#include "../config.h"
#include "rxvtdaemon.h"
client::client ()
{
- if ((fd = socket (PF_LOCAL, SOCK_STREAM, 0)) < 0)
+ if ((fd = socket (PF_UNIX, SOCK_STREAM, 0)) < 0)
{
perror ("unable to create communications socket");
exit (EXIT_FAILURE);
+/*--------------------------------*-C-*---------------------------------*
+ * File: rxvtcolor.C
+ *----------------------------------------------------------------------*
+ *
+ * All portions of code are copyright by their respective author/s.
+ * Copyright (c) 2003-2004 Marc Lehmann <pcg@goof.com>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ *----------------------------------------------------------------------*/
+
#include "../config.h"
#include <rxvt.h>
#include <rxvtcolor.h>
+/*--------------------------------*-C-*---------------------------------*
+ * File: rxvtd.C
+ *----------------------------------------------------------------------*
+ *
+ * All portions of code are copyright by their respective author/s.
+ * Copyright (c) 2003-2004 Marc Lehmann <pcg@goof.com>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ *----------------------------------------------------------------------*/
+
#include "../config.h"
#include "rxvt.h"
#include "rxvtdaemon.h"
unix_listener::unix_listener (const char *sockname)
: accept_ev (this, &unix_listener::accept_cb)
{
- if ((fd = socket (PF_LOCAL, SOCK_STREAM, 0)) < 0)
+ if ((fd = socket (PF_UNIX, SOCK_STREAM, 0)) < 0)
{
perror ("unable to create listening socket");
exit (EXIT_FAILURE);
+/*--------------------------------*-C-*---------------------------------*
+ * File: rxvtdaemon.C
+ *----------------------------------------------------------------------*
+ *
+ * All portions of code are copyright by their respective author/s.
+ * Copyright (c) 2003-2004 Marc Lehmann <pcg@goof.com>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ *----------------------------------------------------------------------*/
+
#include <stdint.h>
#include <cstdlib>
#include <cstring>
+/*--------------------------------*-C-*---------------------------------*
+ * File: salloc.C
+ *----------------------------------------------------------------------*
+ *
+ * All portions of code are copyright by their respective author/s.
+ * Copyright (c) 2003-2004 Marc Lehmann <pcg@goof.com>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ *----------------------------------------------------------------------*/
+
#include "salloc.h"
#define SALLOC_BLOCK 65536 // size of basic block to allocate
/*--------------------------------*-C-*--------------------------------------*
- * File: screen.c
+ * File: screen.C
*---------------------------------------------------------------------------*
*
* Copyright (c) 1997-2001 Geoff Wing <gcw@pobox.com>
s->s_charset = s->charset;
s->s_charset_char = charsets[s->charset];
break;
+
case RESTORE:
want_refresh = 1;
s->cur.row = s->s_cur.row;
if (c < 0x20)
switch (c)
{
- case '\t':
+ case C0_HT:
scr_tab (1);
continue;
- case '\n':
+ case C0_LF:
if (screen.tlen[row] != -1) /* XXX: think about this */
MAX_IT (screen.tlen[row], screen.cur.col);
srp = screen.rend[row]; /* _must_ refresh */
continue;
- case '\r':
+ case C0_CR:
if (screen.tlen[row] != -1) /* XXX: think about this */
MAX_IT (screen.tlen[row], screen.cur.col);
rxvt_term::scr_backspace ()
{
want_refresh = 1;
+
if (screen.cur.col == 0)
{
if (screen.cur.row > 0)
}
else if ((screen.flags & Screen_WrapNext) == 0)
scr_gotorc (0, -1, RELATIVE);
+
screen.flags &= ~Screen_WrapNext;
}
D_SCREEN ((stderr, "rxvt_scr_gotorc (r:%s%d,c:%s%d): from (r:%d,c:%d)", (relative & R_RELATIVE ? "+" : ""), row, (relative & C_RELATIVE ? "+" : ""), col, screen.cur.row, screen.cur.col));
- screen.cur.col = ((relative & C_RELATIVE) ? (screen.cur.col + col)
- : col);
+ screen.cur.col = relative & C_RELATIVE ? screen.cur.col + col : col;
MAX_IT (screen.cur.col, 0);
MIN_IT (screen.cur.col, (int32_t)TermWin.ncol - 1);
void
rxvt_term::scr_index (enum page_dirn direction)
{
- int dirn;
+ int dirn;
want_refresh = 1;
dirn = ((direction == UP) ? 1 : -1);
rxvt_term::scr_cursor_visible (int mode)
{
want_refresh = 1;
+
if (mode)
screen.flags |= Screen_VisibleCursor;
else
want_refresh = 1;
num_scr -= (TermWin.view_start - oldviewstart);
}
+
return (int) (TermWin.view_start - oldviewstart);
}
MEMCPY (ds, data + i, n);
for (j = 0; j < n; j++)
- if (ds[j] == '\n')
- ds[j] = '\r';
+ if (ds[j] == C0_LF)
+ ds[j] = C0_CR;
tt_write (ds, (int)n);
}
}
if (screen.tlen[row] != -1 && row != end_row)
- new_selection_text[ofs++] = L'\n';
+ new_selection_text[ofs++] = C0_LF;
}
if (end_col != selection.end.col)
- new_selection_text[ofs++] = L'\n';
+ new_selection_text[ofs++] = C0_LF;
new_selection_text[ofs] = 0;
void
rxvt_term::selection_extend_colrow (int32_t col, int32_t row, int button3, int buttonpress, int clickchange)
{
- int16_t ncol = TermWin.ncol;
- int end_col;
- row_col_t pos;
+ int16_t ncol = TermWin.ncol;
+ int end_col;
+ row_col_t pos;
enum {
LEFT, RIGHT
} closeto = RIGHT;
/*--------------------------------*-C-*---------------------------------*
- * File: scrollbar-next.c
+ * File: scrollbar-next.C
*----------------------------------------------------------------------*
*
* Copyright (c) 1997,1998 mj olesen <olesen@me.QueensU.CA>
* Copyright (c) 1998 Alfredo K. Kojima <kojima@windowmaker.org>
* - N*XTstep like scrollbars
* Copyright (c) 1999-2001 Geoff Wing <gcw@pobox.com>
+ * Copyright (c) 2004 Marc Lehmann <pcg@goof.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
/*----------------------------------------------------------------------*
- * File: scrollbar-plain.c
+ * File: scrollbar-plain.C
*----------------------------------------------------------------------*
*
* Copyright (c) 1997,1998 mj olesen <olesen@me.QueensU.CA>
* Copyright (c) 1999-2001 Geoff Wing <gcw@pobox.com>
+ * Copyright (c) 2004 Marc Lehmann <pcg@goof.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
/*--------------------------------*-C-*---------------------------------*
- * File: scrollbar-rxvt.c
+ * File: scrollbar-rxvt.C
*----------------------------------------------------------------------*
*
* Copyright (c) 1997,1998 mj olesen <olesen@me.QueensU.CA>
* Copyright (c) 1999-2001 Geoff Wing <gcw@pobox.com>
+ * Copyright (c) 2004 Marc Lehmann <pcg@goof.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
/*--------------------------------*-C-*---------------------------------*
- * File: scrollbar-xterm.c
+ * File: scrollbar-xterm.C
*----------------------------------------------------------------------*
*
* Copyright (c) 1997,1998 mj olesen <olesen@me.QueensU.CA>
* Copyright (c) 1999-2001 Geoff Wing <gcw@pobox.com>
+ * Copyright (c) 2004 Marc Lehmann <pcg@goof.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
/*--------------------------------*-C-*---------------------------------*
- * File: scrollbar.c
+ * File: scrollbar.C
*----------------------------------------------------------------------*
*
* Copyright (c) 1997,1998 mj olesen <olesen@me.QueensU.CA>
* Copyright (c) 1998 Alfredo K. Kojima <kojima@windowmaker.org>
* - N*XTstep like scrollbars
* Copyright (c) 1999-2001 Geoff Wing <gcw@pobox.com>
+ * Copyright (c) 2004 Marc Lehmann <pcg@goof.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
/*--------------------------------*-C-*---------------------------------*
- * File: strings.c
+ * File: strings.C
*----------------------------------------------------------------------*
- * $Id: strings.C,v 1.5 2004-02-13 12:16:21 pcg Exp $
*
* All portions of code are copyright by their respective author/s.
* Copyright (c) 1997-2001 Geoff Wing <gcw@pobox.com>
+ * Copyright (c) 2004 Marc Lehmann <pcg@goof.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
-#define VERSION "2.7"
-#define VSTRING "20700"
-#define DATE "2004-04-05"
-#define LSMDATE "05APR04"
-#define LIBVERSION "2:7:0"
+#define VERSION "2.8"
+#define VSTRING "20800"
+#define DATE "2004-04-08"
+#define LSMDATE "08APR04"
+#define LIBVERSION "2:8:0"
/*--------------------------------*-C-*---------------------------------*
- * File: xdefaults.c
+ * File: xdefaults.C
*----------------------------------------------------------------------*
- * $Id: xdefaults.C,v 1.23 2004-04-02 18:00:01 pcg Exp $
*
* All portions of code are copyright by their respective author/s.
* Copyright (c) 1994 Robert Nation <nation@rocket.sanders.lockheed.com>
* - original version
* Copyright (c) 1997,1998 mj olesen <olesen@me.queensu.ca>
+ * Copyright (c) 2003-2004 Marc Lehmann <pcg@goof.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
/*--------------------------------*-C-*---------------------------------*
- * File: xpm.c
+ * File: xpm.C
*----------------------------------------------------------------------*
- * $Id: xpm.C,v 1.11 2004-04-02 20:41:01 pcg Exp $
*
* All portions of code are copyright by their respective author/s.
* Copyright (c) 1997 Carsten Haitzler <raster@zip.com.au>