]> ncurses.scripts.mit.edu Git - ncurses.git/commitdiff
ncurses 5.6 - patch 20080419
authorThomas E. Dickey <dickey@invisible-island.net>
Sat, 19 Apr 2008 23:51:44 +0000 (23:51 +0000)
committerThomas E. Dickey <dickey@invisible-island.net>
Sat, 19 Apr 2008 23:51:44 +0000 (23:51 +0000)
+ add screen.rxvt terminfo entry -TD
+ modify tic -f option to format spaces as \s to prevent them from
  being lost when that is read back in unformatted strings.
+ improve test/ditto.c, using a "talk"-style layout.

NEWS
dist.mk
misc/terminfo.src
progs/dump_entry.c
test/ditto.c

diff --git a/NEWS b/NEWS
index a80efd0cf2581fc685b26f1f64db9163e0898fae..0a2f4b81ea03005c8e7c7d4f202134096ce6966c 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -25,7 +25,7 @@
 -- sale, use or other dealings in this Software without prior written        --
 -- authorization.                                                            --
 -------------------------------------------------------------------------------
 -- sale, use or other dealings in this Software without prior written        --
 -- authorization.                                                            --
 -------------------------------------------------------------------------------
--- $Id: NEWS,v 1.1225 2008/04/12 19:41:26 tom Exp $
+-- $Id: NEWS,v 1.1228 2008/04/19 23:03:52 tom Exp $
 -------------------------------------------------------------------------------
 
 This is a log of changes that ncurses has gone through since Zeyd started
 -------------------------------------------------------------------------------
 
 This is a log of changes that ncurses has gone through since Zeyd started
@@ -45,6 +45,12 @@ See the AUTHORS file for the corresponding full names.
 Changes through 1.9.9e did not credit all contributions;
 it is not possible to add this information.
 
 Changes through 1.9.9e did not credit all contributions;
 it is not possible to add this information.
 
+20080419
+       + add screen.rxvt terminfo entry -TD
+       + modify tic -f option to format spaces as \s to prevent them from
+         being lost when that is read back in unformatted strings.
+       + improve test/ditto.c, using a "talk"-style layout.
+
 20080412
        + change test/ditto.c to use openpty() and xterm.
        + add locks for copywin(), dupwin(), overlap(), overlay() on their
 20080412
        + change test/ditto.c to use openpty() and xterm.
        + add locks for copywin(), dupwin(), overlap(), overlay() on their
@@ -70,8 +76,8 @@ it is not possible to add this information.
          e.g., on aix when using CC=powerpc-ibm-aix5.3.0.0-gcc
          (report/patch by Michael Haubenwallner).
        + override OBJEXT to "lo" when building with libtool, to work on
          e.g., on aix when using CC=powerpc-ibm-aix5.3.0.0-gcc
          (report/patch by Michael Haubenwallner).
        + override OBJEXT to "lo" when building with libtool, to work on
-         platforms such as AIX where libtool supports only static libraries
-         (report/patch by Michael Haubenwallner).
+         platforms such as AIX where libtool may use a different suffix for
+         the object files than ".o" (report/patch by Michael Haubenwallner).
        + add configure --with-pthread option, for building with the POSIX
          thread library.
 
        + add configure --with-pthread option, for building with the POSIX
          thread library.
 
diff --git a/dist.mk b/dist.mk
index 3e0bf28c032037a89e220eaeaee9b22db0ac6734..d2923b7e8bdc0f4af43a3a18ab8e8f2acd6a1d2d 100644 (file)
--- a/dist.mk
+++ b/dist.mk
@@ -25,7 +25,7 @@
 # use or other dealings in this Software without prior written               #
 # authorization.                                                             #
 ##############################################################################
 # use or other dealings in this Software without prior written               #
 # authorization.                                                             #
 ##############################################################################
-# $Id: dist.mk,v 1.638 2008/04/12 15:47:44 tom Exp $
+# $Id: dist.mk,v 1.639 2008/04/19 16:27:47 tom Exp $
 # Makefile for creating ncurses distributions.
 #
 # This only needs to be used directly as a makefile by developers, but
 # Makefile for creating ncurses distributions.
 #
 # This only needs to be used directly as a makefile by developers, but
@@ -37,7 +37,7 @@ SHELL = /bin/sh
 # These define the major/minor/patch versions of ncurses.
 NCURSES_MAJOR = 5
 NCURSES_MINOR = 6
 # These define the major/minor/patch versions of ncurses.
 NCURSES_MAJOR = 5
 NCURSES_MINOR = 6
-NCURSES_PATCH = 20080412
+NCURSES_PATCH = 20080419
 
 # We don't append the patch to the version, since this only applies to releases
 VERSION = $(NCURSES_MAJOR).$(NCURSES_MINOR)
 
 # We don't append the patch to the version, since this only applies to releases
 VERSION = $(NCURSES_MAJOR).$(NCURSES_MINOR)
index 8d905fc4cf850e82d3d08fed8896f12e6d3a6387..e86848f29bbe2bf9ffe422daedd801f4e858b493 100644 (file)
@@ -6,8 +6,8 @@
 # Report bugs and new terminal descriptions to
 #      bug-ncurses@gnu.org
 #
 # Report bugs and new terminal descriptions to
 #      bug-ncurses@gnu.org
 #
-#      $Revision: 1.326 $
-#      $Date: 2007/11/12 00:22:07 $
+#      $Revision: 1.327 $
+#      $Date: 2008/04/19 22:51:50 $
 #
 # The original header is preserved below for reference.  It is noted that there
 # is a "newer" version which differs in some cosmetic details (but actually
 #
 # The original header is preserved below for reference.  It is noted that there
 # is a "newer" version which differs in some cosmetic details (but actually
@@ -4391,6 +4391,13 @@ screen.teraterm|disable ncv in teraterm,
        ncv#127,
        acsc=+\020\,\021-\030.^Y0\333`\004a\261f\370g\361h\260i\316j\331k\277l\332m\300n\305o~p\304q\304r\304s_t\303u\264v\301w\302x\263y\363z\362{\343|\330}\234~\376,
        use=screen,
        ncv#127,
        acsc=+\020\,\021-\030.^Y0\333`\004a\261f\370g\361h\260i\316j\331k\277l\332m\300n\305o~p\304q\304r\304s_t\303u\264v\301w\302x\263y\363z\362{\343|\330}\234~\376,
        use=screen,
+# Other terminals
+screen.rxvt|screen in rxvt,
+       bw,
+       cvvis@, flash@, kcub1=\EOD, kcud1=\EOB, kcuf1=\EOC,
+       kcuu1=\EOA, kf1=\EOP, kf2=\EOQ, kf3=\EOR, kf4=\EOS,
+       use=vt100+enq, use=rxvt+pcfkeys, use=vt220+keypad,
+       use=screen,
 # fix the backspace key
 screen.linux|screen in linux console,
        bw,
 # fix the backspace key
 screen.linux|screen in linux console,
        bw,
@@ -21661,6 +21668,9 @@ v3220|LANPAR Vision II model 3220/3221/3222,
 #      * add xterm+app, xterm+noapp, from xterm #230 -TD
 #      * add/use xterm+pce2 from xterm #230, in xterm+pcfkeys -TD
 #
 #      * add xterm+app, xterm+noapp, from xterm #230 -TD
 #      * add/use xterm+pce2 from xterm #230, in xterm+pcfkeys -TD
 #
+# 2007-04-19
+#      * add screen.rxvt -TD
+#
 # The following sets edit modes for GNU EMACS.
 # Local Variables:
 # fill-prefix:"\t"
 # The following sets edit modes for GNU EMACS.
 # Local Variables:
 # fill-prefix:"\t"
index 6320f3c1cf9f85e2dccc83ba2100e34dedf38ead..eeee5dbb6a04d64dc8a6672fa1f78595bd83f55c 100644 (file)
@@ -1,5 +1,5 @@
 /****************************************************************************
 /****************************************************************************
- * Copyright (c) 1998-2006,2007 Free Software Foundation, Inc.              *
+ * Copyright (c) 1998-2007,2008 Free Software Foundation, Inc.              *
  *                                                                          *
  * Permission is hereby granted, free of charge, to any person obtaining a  *
  * copy of this software and associated documentation files (the            *
  *                                                                          *
  * Permission is hereby granted, free of charge, to any person obtaining a  *
  * copy of this software and associated documentation files (the            *
@@ -39,7 +39,7 @@
 #include "termsort.c"          /* this C file is generated */
 #include <parametrized.h>      /* so is this */
 
 #include "termsort.c"          /* this C file is generated */
 #include <parametrized.h>      /* so is this */
 
-MODULE_ID("$Id: dump_entry.c,v 1.81 2007/08/25 20:05:35 tom Exp $")
+MODULE_ID("$Id: dump_entry.c,v 1.82 2008/04/19 22:27:04 tom Exp $")
 
 #define INDENT                 8
 #define DISCARD(string) string = ABSENT_STRING
 
 #define INDENT                 8
 #define DISCARD(string) string = ABSENT_STRING
@@ -539,6 +539,10 @@ fmt_complex(char *src, int level)
            params = FALSE;
            percent = FALSE;
            break;
            params = FALSE;
            percent = FALSE;
            break;
+       case ' ':
+           strncpy_DYN(&tmpbuf, "\\s", 2);
+           ++src;
+           continue;
        default:
            percent = FALSE;
            break;
        default:
            percent = FALSE;
            break;
index 34ef6a532e5c1928c67e2f0a6c0e98ddc6671962..17a883dd75751dab4e952d015ae0cf130ec41cc6 100644 (file)
@@ -29,7 +29,7 @@
 /*
  * Author: Thomas E. Dickey <dickey@clark.net> 1998
  *
 /*
  * Author: Thomas E. Dickey <dickey@clark.net> 1998
  *
- * $Id: ditto.c,v 1.19 2008/04/12 23:37:32 tom Exp $
+ * $Id: ditto.c,v 1.21 2008/04/19 20:08:45 tom Exp $
  *
  * The program illustrates how to set up multiple screens from a single
  * program.  Invoke the program by specifying another terminal on the same
  *
  * The program illustrates how to set up multiple screens from a single
  * program.  Invoke the program by specifying another terminal on the same
@@ -48,8 +48,16 @@ typedef struct {
     FILE *input;
     FILE *output;
     SCREEN *screen;
     FILE *input;
     FILE *output;
     SCREEN *screen;
+    WINDOW **windows;
 } DITTO;
 
 } DITTO;
 
+typedef struct {
+    int value;                 /* the actual data */
+    int source;                        /* which screen did data come from */
+    int target;                        /* which screen is data going to */
+    DITTO *ditto;
+} DDATA;
+
 static void
 failed(const char *s)
 {
 static void
 failed(const char *s)
 {
@@ -113,26 +121,34 @@ close_screen(SCREEN *sp GCC_UNUSED, void *arg GCC_UNUSED)
 }
 
 static int
 }
 
 static int
-read_screen(SCREEN *sp GCC_UNUSED, void *arg GCC_UNUSED)
+read_screen(SCREEN *sp GCC_UNUSED, void *arg)
 {
 {
-    return getch();
+    DDATA *data = (DDATA *) arg;
+    WINDOW *win = data->ditto[data->source].windows[data->source];
+
+    return wgetch(win);
 }
 
 static int
 write_screen(SCREEN *sp GCC_UNUSED, void *arg GCC_UNUSED)
 {
 }
 
 static int
 write_screen(SCREEN *sp GCC_UNUSED, void *arg GCC_UNUSED)
 {
-    addstr((char *) arg);
-    refresh();
+    DDATA *data = (DDATA *) arg;
+    WINDOW *win = data->ditto[data->target].windows[data->source];
+
+    waddch(win, data->value);
+    wnoutrefresh(win);
+    doupdate();
     return OK;
 }
 
 static void
     return OK;
 }
 
 static void
-show_ditto(DITTO * data, int count, char *msg)
+show_ditto(DITTO * data, int count, DDATA * ddata)
 {
     int n;
 
     for (n = 0; n < count; n++) {
 {
     int n;
 
     for (n = 0; n < count; n++) {
-       USING_SCREEN(data[n].screen, write_screen, (void *) msg);
+       ddata->target = n;
+       USING_SCREEN(data[n].screen, write_screen, (void *) ddata);
     }
 }
 
     }
 }
 
@@ -140,7 +156,7 @@ int
 main(int argc GCC_UNUSED,
      char *argv[]GCC_UNUSED)
 {
 main(int argc GCC_UNUSED,
      char *argv[]GCC_UNUSED)
 {
-    int j;
+    int j, k;
     int count;
     DITTO *data;
 
     int count;
     DITTO *data;
 
@@ -162,15 +178,38 @@ main(int argc GCC_UNUSED,
      * Set up the screens.
      */
     for (j = 0; j < argc; j++) {
      * Set up the screens.
      */
     for (j = 0; j < argc; j++) {
+       int high, wide;
+
        data[j].screen = newterm((char *) 0,    /* assume $TERM is the same */
                                 data[j].output,
                                 data[j].input);
        data[j].screen = newterm((char *) 0,    /* assume $TERM is the same */
                                 data[j].output,
                                 data[j].input);
+
        if (data[j].screen == 0)
            failed("newterm");
        cbreak();
        noecho();
        scrollok(stdscr, TRUE);
        nodelay(stdscr, TRUE);
        if (data[j].screen == 0)
            failed("newterm");
        cbreak();
        noecho();
        scrollok(stdscr, TRUE);
        nodelay(stdscr, TRUE);
+       box(stdscr, 0, 0);
+
+       data[j].windows = typeCalloc(WINDOW *, argc);
+
+       high = (LINES - 2) / argc;
+       wide = (COLS - 2);
+       for (k = 0; k < argc; ++k) {
+           WINDOW *outer = newwin(high, wide, 1 + (high * k), 1);
+           WINDOW *inner = derwin(outer, high - 2, wide - 2, 1, 1);
+
+           box(outer, 0, 0);
+           mvwaddstr(outer, 0, 2, argv[k]);
+           wnoutrefresh(outer);
+
+           scrollok(inner, TRUE);
+           nodelay(inner, TRUE);
+
+           data[j].windows[k] = inner;
+       }
+       doupdate();
     }
 
     /*
     }
 
     /*
@@ -178,19 +217,24 @@ main(int argc GCC_UNUSED,
      * of the screens.
      */
     for (count = 0;; ++count) {
      * of the screens.
      */
     for (count = 0;; ++count) {
-       char message[80];
+       DDATA ddata;
        int ch;
        int which = (count % argc);
 
        napms(20);
        int ch;
        int which = (count % argc);
 
        napms(20);
-       ch = USING_SCREEN(data[which].screen, read_screen, 0);
+
+       ddata.source = which;
+       ddata.ditto = data;
+
+       ch = USING_SCREEN(data[which].screen, read_screen, &ddata);
        if (ch == ERR) {
            continue;
        }
        if (ch == CTRL('D'))
            break;
        if (ch == ERR) {
            continue;
        }
        if (ch == CTRL('D'))
            break;
-       sprintf(message, "from[%d:%d] '%c' (%#x)\n", count, which, ch, ch);
-       show_ditto(data, argc, message);
+
+       ddata.value = ch;
+       show_ditto(data, argc, &ddata);
     }
 
     /*
     }
 
     /*
@@ -199,6 +243,11 @@ main(int argc GCC_UNUSED,
     for (j = argc - 1; j >= 0; j--) {
        USING_SCREEN(data[j].screen, close_screen, 0);
        fprintf(data[j].output, "**Closed\r\n");
     for (j = argc - 1; j >= 0; j--) {
        USING_SCREEN(data[j].screen, close_screen, 0);
        fprintf(data[j].output, "**Closed\r\n");
+
+       /*
+        * Closing before a delscreen() helps ncurses determine that there
+        * is no valid output buffer, and can remove the setbuf() data.
+        */
        fflush(data[j].output);
        fclose(data[j].output);
        delscreen(data[j].screen);
        fflush(data[j].output);
        fclose(data[j].output);
        delscreen(data[j].screen);