home *** CD-ROM | disk | FTP | other *** search
/ Fresh Fish 8 / FreshFishVol8-CD1.bin / gnu / src / diffs / libcurses-8.3.diffs < prev    next >
Encoding:
Text File  |  1995-01-21  |  112.8 KB  |  4,573 lines

  1. diff -rc --new-file libcurses-8.3/EXAMPLES/Makefile.in /gnu/src/amiga/libcurses-8.3/EXAMPLES/Makefile.in
  2. *** libcurses-8.3/EXAMPLES/Makefile.in    Thu Jan  1 00:00:00 1970
  3. --- /gnu/src/amiga/libcurses-8.3/EXAMPLES/Makefile.in    Thu Jan 12 09:00:52 1995
  4. ***************
  5. *** 0 ****
  6. --- 1,48 ----
  7. + #### Start of system configuration section. ####
  8. + srcdir =    @srcdir@
  9. + VPATH =        @srcdir@
  10. + # Common prefix for machine-independent installed files.
  11. + prefix =    @prefix@
  12. + # Common prefix for machine-dependent installed files.
  13. + exec_prefix =    @exec_prefix@
  14. + bindir =    $(exec_prefix)/bin
  15. + libdir =    $(exec_prefix)/lib
  16. + incdir =    $(exec_prefix)/include
  17. + INSTALL =    @INSTALL@
  18. + INSTALL_DATA =    @INSTALL_DATA@
  19. + CC =        @CC@
  20. + CFLAGS =    @CFLAGS@
  21. + RANLIB =    @RANLIB@
  22. + #### End system configuration section ####
  23. + #DEBUG =    -DDBUG
  24. + #DEBUGLIB =    -ldbug
  25. + OTHER_CFLAGS =    -I$(srcdir) $(DEBUG)
  26. + ALL_CFLAGS =    $(OTHER_CFLAGS) $(CFLAGS)
  27. + LIBS =        ../libcurses.a -ltermcap $(DEBUGLIB)
  28. + .c.o:
  29. +         $(CC) -c $(ALL_CFLAGS) $<
  30. + all :        ex1
  31. + ex1.o :        ex1.c ../curses.h
  32. + ex1 :        ex1.o ../libcurses.a
  33. +         $(CC) -o ex1 ex1.o $(LIBS)
  34. + clean:
  35. +         rm -f *! *~
  36. + clobber:    clean
  37. +         rm -f ex1 ex1.o
  38. diff -rc --new-file libcurses-8.3/EXAMPLES/ex1.c /gnu/src/amiga/libcurses-8.3/EXAMPLES/ex1.c
  39. *** libcurses-8.3/EXAMPLES/ex1.c    Fri Jun  4 17:39:36 1993
  40. --- /gnu/src/amiga/libcurses-8.3/EXAMPLES/ex1.c    Thu Jan 12 09:14:52 1995
  41. ***************
  42. *** 45,58 ****
  43.   #include <curses.h>
  44.   #include <stdio.h>
  45.   #include <signal.h>
  46.   
  47.   #define YSIZE 10 
  48.   #define XSIZE 20
  49.   
  50.   int quit();
  51.   
  52. ! main()
  53.   {
  54.       int i, j, c;
  55.       size_t len;
  56. --- 45,60 ----
  57.   #include <curses.h>
  58.   #include <stdio.h>
  59.   #include <signal.h>
  60. ! #include <dbug.h>
  61.   
  62.   #define YSIZE 10 
  63.   #define XSIZE 20
  64.   
  65.   int quit();
  66.   
  67. ! main(argc, argv)
  68. ! int argc;
  69. ! char *argv[];
  70.   {
  71.       int i, j, c;
  72.       size_t len;
  73. ***************
  74. *** 60,65 ****
  75. --- 62,69 ----
  76.       FILE *fp;
  77.       char *s;
  78.   
  79. +     if (argc == 2) DBUG_PUSH (&(argv[1][2]));
  80.       initscr();            /* Always call initscr() first */
  81.       signal(SIGINT, quit);        /* Make sure wou have a 'cleanup' fn */
  82.       crmode();            /* We want cbreak mode */
  83. ***************
  84. *** 72,77 ****
  85. --- 76,82 ----
  86.   
  87.       standout();
  88.       move(0,0);
  89. +     wrefresh (curscr);
  90.       while (1) {
  91.           c = getchar();
  92.           switch(c) {
  93. diff -rc --new-file libcurses-8.3/Makefile /gnu/src/amiga/libcurses-8.3/Makefile
  94. *** libcurses-8.3/Makefile    Sun Jan  2 14:21:24 1994
  95. --- /gnu/src/amiga/libcurses-8.3/Makefile    Thu Jan  1 00:00:00 1970
  96. ***************
  97. *** 1,20 ****
  98. - #    @(#)Makefile    8.2 (Berkeley) 1/2/94
  99. - CFLAGS+=#-DTFILE=\"/dev/ttyp0\"
  100. - CFLAGS+=-D_CURSES_PRIVATE -I${.CURDIR}
  101. - LIB=    curses
  102. - SRCS=    addbytes.c addch.c addnstr.c box.c clear.c clrtobot.c clrtoeol.c \
  103. -     cr_put.c ctrace.c cur_hash.c curses.c delch.c deleteln.c delwin.c \
  104. -     erase.c fullname.c getch.c getstr.c id_subwins.c idlok.c initscr.c \
  105. -     insch.c insertln.c longname.c move.c mvwin.c newwin.c overlay.c \
  106. -     overwrite.c printw.c putchar.c refresh.c scanw.c scroll.c setterm.c \
  107. -     standout.c toucholap.c touchwin.c tscroll.c tstp.c tty.c unctrl.c
  108. - MAN3=    curses.0
  109. - beforeinstall:
  110. -     -cd ${.CURDIR}; cmp -s curses.h ${DESTDIR}/usr/include/curses.h > \
  111. -         /dev/null 2>&1 || \
  112. -         install -c -o ${BINOWN} -g ${BINGRP} -m 444 curses.h \
  113. -         ${DESTDIR}/usr/include
  114. - .include <bsd.lib.mk>
  115. --- 0 ----
  116. diff -rc --new-file libcurses-8.3/Makefile.in /gnu/src/amiga/libcurses-8.3/Makefile.in
  117. *** libcurses-8.3/Makefile.in    Thu Jan  1 00:00:00 1970
  118. --- /gnu/src/amiga/libcurses-8.3/Makefile.in    Thu Jan 12 09:16:46 1995
  119. ***************
  120. *** 0 ****
  121. --- 1,69 ----
  122. + #### Start of system configuration section. ####
  123. + srcdir =    @srcdir@
  124. + VPATH =        @srcdir@
  125. + # Common prefix for machine-independent installed files.
  126. + prefix =    @prefix@
  127. + # Common prefix for machine-dependent installed files.
  128. + exec_prefix =    @exec_prefix@
  129. + bindir =    $(exec_prefix)/bin
  130. + libdir =    $(exec_prefix)/lib
  131. + incdir =    $(exec_prefix)/include
  132. + INSTALL =    @INSTALL@
  133. + INSTALL_DATA =    @INSTALL_DATA@
  134. + CC =        @CC@
  135. + CFLAGS =    @CFLAGS@
  136. + RANLIB =    @RANLIB@
  137. + #### End system configuration section ####
  138. + AR =        ar
  139. + LIB =        libcurses.a
  140. + MAN3 =        curses.0
  141. + MAKE =        make
  142. + #DEBUG =    -DDBUG
  143. + OTHER_CFLAGS =    -D_CURSES_PRIVATE $(DEBUG) -I$(srcdir)
  144. + ALL_CFLAGS =    $(OTHER_CFLAGS) $(CFLAGS)
  145. + SRCS =        addbytes.c addch.c addnstr.c box.c clear.c clrtobot.c \
  146. +         clrtoeol.c cr_put.c ctrace.c cur_hash.c curses.c delch.c \
  147. +         deleteln.c delwin.c erase.c fullname.c getch.c getstr.c \
  148. +         id_subwins.c idlok.c initscr.c insch.c insertln.c \
  149. +         longname.c move.c mvwin.c newwin.c overlay.c overwrite.c \
  150. +         printw.c putchar.c refresh.c scanw.c scroll.c setterm.c \
  151. +         standout.c toucholap.c touchwin.c tscroll.c tstp.c tty.c \
  152. +         unctrl.c
  153. + OBJS =        $(SRCS:.c=.o)
  154. + .c.o:
  155. +         $(CC) -c $(ALL_CFLAGS) $<
  156. + all :        $(LIB)
  157. +         (cd EXAMPLES; $(MAKE) all)
  158. + $(LIB) :    $(OBJS)
  159. +         rm -f $@
  160. +         $(AR) cr $@ $(OBJS)
  161. +         $(RANLIB) $@
  162. + install :    $(LIB)
  163. +         $(INSTALL_DATA) $(LIB) $(libdir)/libcurses.a
  164. +         $(INSTALL_DATA) $(srcdir)/curses.h $(incdir)/curses.h
  165. + clean:
  166. +         rm -f *! *~
  167. +         (cd EXAMPLES; $(MAKE) clean)
  168. + clobber:    clean
  169. +         rm -f $(LIB)
  170. +         (cd EXAMPLES; $(MAKE) clobber)
  171. diff -rc --new-file libcurses-8.3/addbytes.c /gnu/src/amiga/libcurses-8.3/addbytes.c
  172. *** libcurses-8.3/addbytes.c    Sat Mar 19 15:29:58 1994
  173. --- /gnu/src/amiga/libcurses-8.3/addbytes.c    Wed Jan 11 16:13:43 1995
  174. ***************
  175. *** 56,81 ****
  176.       char stand;
  177.       __LINE *lp;
  178.   
  179.       SYNCH_IN;
  180.   
  181. - #ifdef DEBUG
  182. -     __CTRACE("ADDBYTES('%c') at (%d, %d)\n", c, y, x);
  183. - #endif
  184.       while (count--) {
  185.           c = *bytes++;
  186.           switch (c) {
  187.           case '\t':
  188.               SYNCH_OUT;
  189.               if (waddbytes(win, blanks, 8 - (x % 8)) == ERR)
  190. !                 return (ERR);
  191.               SYNCH_IN;
  192.               break;
  193.   
  194.           default:
  195. - #ifdef DEBUG
  196. -     __CTRACE("ADDBYTES(%0.2o, %d, %d)\n", win, y, x);
  197. - #endif
  198. -             
  199.               lp = win->lines[y];
  200.               if (lp->flags & __ISPASTEOL) {
  201.                   lp->flags &= ~__ISPASTEOL;
  202. --- 56,78 ----
  203.       char stand;
  204.       __LINE *lp;
  205.   
  206. +     DBUG_ENTER ("waddbytes");
  207. +     DBUG_PRINT ("addbytes", ("add %d characters to window", count));
  208. +     DBUG_PRINT ("addbytes", ("standout flag is %d", so));
  209.       SYNCH_IN;
  210.   
  211.       while (count--) {
  212.           c = *bytes++;
  213. +         DBUG_PRINT ("waddbytes", ("add '%c' at (%d, %d)", c, y, x));
  214.           switch (c) {
  215.           case '\t':
  216.               SYNCH_OUT;
  217.               if (waddbytes(win, blanks, 8 - (x % 8)) == ERR)
  218. !                 DBUG_RETURN (ERR);
  219.               SYNCH_IN;
  220.               break;
  221.   
  222.           default:
  223.               lp = win->lines[y];
  224.               if (lp->flags & __ISPASTEOL) {
  225.                   lp->flags &= ~__ISPASTEOL;
  226. ***************
  227. *** 87,93 ****
  228.                           lp = win->lines[y];
  229.                               x = 0;
  230.                       } else
  231. !                         return (ERR);
  232.                   } else {
  233.                       y++;
  234.                       lp = win->lines[y];
  235. --- 84,90 ----
  236.                           lp = win->lines[y];
  237.                               x = 0;
  238.                       } else
  239. !                         DBUG_RETURN (ERR);
  240.                   } else {
  241.                       y++;
  242.                       lp = win->lines[y];
  243. ***************
  244. *** 100,109 ****
  245.               stand = '\0';
  246.               if (win->flags & __WSTANDOUT || so)
  247.                   stand |= __STANDOUT;
  248. ! #ifdef DEBUG
  249. !     __CTRACE("ADDBYTES: 1: y = %d, x = %d, firstch = %d, lastch = %d\n",
  250. !         y, x, *win->lines[y]->firstchp, *win->lines[y]->lastchp);
  251. ! #endif
  252.               if (lp->line[x].ch != c || 
  253.                   !(lp->line[x].attr & stand)) {
  254.                   newx = x + win->ch_off;
  255. --- 97,104 ----
  256.               stand = '\0';
  257.               if (win->flags & __WSTANDOUT || so)
  258.                   stand |= __STANDOUT;
  259. !             DBUG_PRINT ("waddbytes", ("ADDBYTES: 1: y = %d, x = %d, firstch = %d, lastch = %d",
  260. !                           y, x, *win->lines[y]->firstchp, *win->lines[y]->lastchp));
  261.               if (lp->line[x].ch != c || 
  262.                   !(lp->line[x].attr & stand)) {
  263.                   newx = x + win->ch_off;
  264. ***************
  265. *** 115,126 ****
  266.                       *lp->firstchp = newx;
  267.                   else if (newx > *lp->lastchp)
  268.                       *lp->lastchp = newx;
  269. ! #ifdef DEBUG
  270. !     __CTRACE("ADDBYTES: change gives f/l: %d/%d [%d/%d]\n",
  271. !         *lp->firstchp, *lp->lastchp,
  272. !         *lp->firstchp - win->ch_off,
  273. !         *lp->lastchp - win->ch_off);
  274. ! #endif
  275.               }
  276.               lp->line[x].ch = c;
  277.               if (stand)
  278. --- 110,119 ----
  279.                       *lp->firstchp = newx;
  280.                   else if (newx > *lp->lastchp)
  281.                       *lp->lastchp = newx;
  282. !                 DBUG_PRINT ("waddbytes", ("ADDBYTES: change gives f/l: %d/%d [%d/%d]",
  283. !                               *lp->firstchp, *lp->lastchp,
  284. !                               *lp->firstchp - win->ch_off,
  285. !                               *lp->lastchp - win->ch_off));
  286.               }
  287.               lp->line[x].ch = c;
  288.               if (stand)
  289. ***************
  290. *** 131,140 ****
  291.                   lp->flags |= __ISPASTEOL;
  292.               else
  293.                   x++;
  294. ! #ifdef DEBUG
  295. !     __CTRACE("ADDBYTES: 2: y = %d, x = %d, firstch = %d, lastch = %d\n",
  296. !         y, x, *win->lines[y]->firstchp, *win->lines[y]->lastchp);
  297. ! #endif
  298.               break;
  299.           case '\n':
  300.               SYNCH_OUT;
  301. --- 124,131 ----
  302.                   lp->flags |= __ISPASTEOL;
  303.               else
  304.                   x++;
  305. !             DBUG_PRINT ("waddbytes", ("ADDBYTES: 2: y = %d, x = %d, firstch = %d, lastch = %d",
  306. !                           y, x, *win->lines[y]->firstchp, *win->lines[y]->lastchp));
  307.               break;
  308.           case '\n':
  309.               SYNCH_OUT;
  310. ***************
  311. *** 153,157 ****
  312.           }
  313.       }
  314.       SYNCH_OUT;
  315. !     return (OK);
  316.   }
  317. --- 144,148 ----
  318.           }
  319.       }
  320.       SYNCH_OUT;
  321. !     DBUG_RETURN (OK);
  322.   }
  323. diff -rc --new-file libcurses-8.3/addch.c /gnu/src/amiga/libcurses-8.3/addch.c
  324. *** libcurses-8.3/addch.c    Fri Jun 11 13:45:34 1993
  325. --- /gnu/src/amiga/libcurses-8.3/addch.c    Wed Jan 11 16:40:44 1995
  326. ***************
  327. *** 48,57 ****
  328.       int ch;
  329.   {
  330.       __LDATA buf;
  331.   
  332.       buf.ch = ch;
  333.       buf.attr = 0;
  334. !     return (__waddch(win, &buf));
  335.   }
  336.   
  337.   int
  338. --- 48,60 ----
  339.       int ch;
  340.   {
  341.       __LDATA buf;
  342. +     int status;
  343.   
  344. +     DBUG_ENTER ("waddch");
  345.       buf.ch = ch;
  346.       buf.attr = 0;
  347. !     status = __waddch(win, &buf);
  348. !     DBUG_RETURN (status);
  349.   }
  350.   
  351.   int
  352. ***************
  353. *** 60,66 ****
  354.       __LDATA *dp;
  355.   {
  356.       char buf[2];
  357.   
  358.       buf[0] = dp->ch;
  359. !     return (__waddbytes(win, buf, 1, dp->attr & __STANDOUT));
  360.   }
  361. --- 63,72 ----
  362.       __LDATA *dp;
  363.   {
  364.       char buf[2];
  365. +     int status;
  366.   
  367. +     DBUG_ENTER ("__waddch");
  368.       buf[0] = dp->ch;
  369. !     status = __waddbytes(win, buf, 1, dp->attr & __STANDOUT);
  370. !     DBUG_RETURN (status);
  371.   }
  372. diff -rc --new-file libcurses-8.3/addnstr.c /gnu/src/amiga/libcurses-8.3/addnstr.c
  373. *** libcurses-8.3/addnstr.c    Fri Jun 11 13:45:34 1993
  374. --- /gnu/src/amiga/libcurses-8.3/addnstr.c    Wed Jan 11 16:41:29 1995
  375. ***************
  376. *** 52,61 ****
  377.   {
  378.       size_t len;
  379.       const char *p;
  380.   
  381.       if (n > 0)
  382.           for (p = s, len = 0; n-- && *p++; ++len);
  383.       else
  384.           len = strlen(s);
  385. !     return (waddbytes(win, s, len));
  386.   }
  387. --- 52,64 ----
  388.   {
  389.       size_t len;
  390.       const char *p;
  391. +     int status;
  392.   
  393. +     DBUG_ENTER ("waddnstr");
  394.       if (n > 0)
  395.           for (p = s, len = 0; n-- && *p++; ++len);
  396.       else
  397.           len = strlen(s);
  398. !     status = waddbytes(win, s, len);
  399. !     DBUG_RETURN (status);
  400.   }
  401. diff -rc --new-file libcurses-8.3/box.c /gnu/src/amiga/libcurses-8.3/box.c
  402. *** libcurses-8.3/box.c    Fri Jun 11 13:45:34 1993
  403. --- /gnu/src/amiga/libcurses-8.3/box.c    Wed Jan 11 16:42:02 1995
  404. ***************
  405. *** 50,55 ****
  406. --- 50,56 ----
  407.       register int endy, endx, i;
  408.       register __LDATA *fp, *lp;
  409.   
  410. +     DBUG_ENTER ("box");
  411.       endx = win->maxx;
  412.       endy = win->maxy - 1;
  413.       fp = win->lines[0]->line;
  414. ***************
  415. *** 74,78 ****
  416.           lp[endx].attr &= ~__STANDOUT;
  417.       }
  418.       __touchwin(win);
  419. !     return (OK);
  420.   }
  421. --- 75,79 ----
  422.           lp[endx].attr &= ~__STANDOUT;
  423.       }
  424.       __touchwin(win);
  425. !     DBUG_RETURN (OK);
  426.   }
  427. diff -rc --new-file libcurses-8.3/clear.c /gnu/src/amiga/libcurses-8.3/clear.c
  428. *** libcurses-8.3/clear.c    Fri Jun 11 13:45:34 1993
  429. --- /gnu/src/amiga/libcurses-8.3/clear.c    Wed Jan 11 16:42:32 1995
  430. ***************
  431. *** 45,53 ****
  432.   wclear(win)
  433.       register WINDOW *win;
  434.   {
  435.       if (werase(win) == OK) {
  436.           win->flags |= __CLEAROK;
  437. !         return (OK);
  438.       }
  439. !     return (ERR);
  440.   }
  441. --- 45,54 ----
  442.   wclear(win)
  443.       register WINDOW *win;
  444.   {
  445. +     DBUG_ENTER ("wclear");
  446.       if (werase(win) == OK) {
  447.           win->flags |= __CLEAROK;
  448. !         DBUG_RETURN (OK);
  449.       }
  450. !     DBUG_RETURN (ERR);
  451.   }
  452. diff -rc --new-file libcurses-8.3/clrtobot.c /gnu/src/amiga/libcurses-8.3/clrtobot.c
  453. *** libcurses-8.3/clrtobot.c    Fri Jun 11 13:45:34 1993
  454. --- /gnu/src/amiga/libcurses-8.3/clrtobot.c    Wed Jan 11 16:43:06 1995
  455. ***************
  456. *** 48,53 ****
  457. --- 48,54 ----
  458.       register int minx, startx, starty, y;
  459.       register __LDATA *sp, *end, *maxx;
  460.   
  461. +     DBUG_ENTER ("wclrtobot");
  462.       if (win->lines[win->cury]->flags & __ISPASTEOL) {
  463.           starty = win->cury + 1;
  464.           startx = 0;
  465. ***************
  466. *** 71,75 ****
  467.                       0);
  468.           startx = 0;
  469.       }
  470. !     return (OK);
  471.   }
  472. --- 72,76 ----
  473.                       0);
  474.           startx = 0;
  475.       }
  476. !     DBUG_RETURN (OK);
  477.   }
  478. diff -rc --new-file libcurses-8.3/clrtoeol.c /gnu/src/amiga/libcurses-8.3/clrtoeol.c
  479. *** libcurses-8.3/clrtoeol.c    Fri Jun 11 13:45:34 1993
  480. --- /gnu/src/amiga/libcurses-8.3/clrtoeol.c    Wed Jan 11 16:43:59 1995
  481. ***************
  482. *** 47,53 ****
  483. --- 47,55 ----
  484.   {
  485.       register int minx, x, y;
  486.       register __LDATA *end, *maxx, *sp;
  487. +     int status;
  488.   
  489. +     DBUG_ENTER ("wclrtoeol");
  490.       y = win->cury;
  491.       x = win->curx;
  492.       if (win->lines[y]->flags & __ISPASTEOL) {
  493. ***************
  494. *** 55,61 ****
  495.               y++;
  496.               x = 0;
  497.           } else
  498. !             return (OK);
  499.       }
  500.       end = &win->lines[y]->line[win->maxx];
  501.       minx = -1;
  502. --- 57,63 ----
  503.               y++;
  504.               x = 0;
  505.           } else
  506. !             DBUG_RETURN (OK);
  507.       }
  508.       end = &win->lines[y]->line[win->maxx];
  509.       minx = -1;
  510. ***************
  511. *** 68,80 ****
  512.               sp->ch = ' ';
  513.               sp->attr = 0;
  514.           }
  515. ! #ifdef DEBUG
  516. !     __CTRACE("CLRTOEOL: minx = %d, maxx = %d, firstch = %d, lastch = %d\n",
  517.           minx, maxx - win->lines[y]->line, *win->lines[y]->firstchp, 
  518. !         *win->lines[y]->lastchp);
  519. ! #endif
  520.       /* Update firstch and lastch for the line. */
  521. !     return (__touchline(win, y, x, win->maxx - 1, 0));
  522.   }
  523.   
  524.   
  525. --- 70,81 ----
  526.               sp->ch = ' ';
  527.               sp->attr = 0;
  528.           }
  529. !     DBUG_PRINT ("wclrtoeol", ("CLRTOEOL: minx = %d, maxx = %d, firstch = %d, lastch = %d",
  530.           minx, maxx - win->lines[y]->line, *win->lines[y]->firstchp, 
  531. !         *win->lines[y]->lastchp));
  532.       /* Update firstch and lastch for the line. */
  533. !     status = __touchline(win, y, x, win->maxx - 1, 0);
  534. !     DBUG_RETURN (status);
  535.   }
  536.   
  537.   
  538. diff -rc --new-file libcurses-8.3/configure /gnu/src/amiga/libcurses-8.3/configure
  539. *** libcurses-8.3/configure    Thu Jan  1 00:00:00 1970
  540. --- /gnu/src/amiga/libcurses-8.3/configure    Wed Jan 11 10:35:14 1995
  541. ***************
  542. *** 0 ****
  543. --- 1,855 ----
  544. + #!/bin/sh
  545. + # Guess values for system-dependent variables and create Makefiles.
  546. + # Generated automatically using autoconf version 2.1 
  547. + # Copyright (C) 1992, 1993, 1994 Free Software Foundation, Inc.
  548. + #
  549. + # This configure script is free software; the Free Software Foundation
  550. + # gives unlimited permission to copy, distribute and modify it.
  551. + # Defaults:
  552. + ac_help=
  553. + ac_default_prefix=/gnu
  554. + # Any additions from configure.in:
  555. + # Initialize some variables set by options.
  556. + # The variables have the same names as the options, with
  557. + # dashes changed to underlines.
  558. + build=NONE
  559. + cache_file=./config.cache
  560. + exec_prefix=NONE
  561. + host=NONE
  562. + no_create=
  563. + nonopt=NONE
  564. + no_recursion=
  565. + prefix=NONE
  566. + program_prefix=NONE
  567. + program_suffix=NONE
  568. + program_transform_name=s,x,x,
  569. + silent=
  570. + site=
  571. + srcdir=
  572. + target=NONE
  573. + verbose=
  574. + x_includes=NONE
  575. + x_libraries=NONE
  576. + # Initialize some other variables.
  577. + subdirs=
  578. + ac_prev=
  579. + for ac_option
  580. + do
  581. +   # If the previous option needs an argument, assign it.
  582. +   if test -n "$ac_prev"; then
  583. +     eval "$ac_prev=\$ac_option"
  584. +     ac_prev=
  585. +     continue
  586. +   fi
  587. +   case "$ac_option" in
  588. +   -*=*) ac_optarg=`/bin/echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
  589. +   *) ac_optarg= ;;
  590. +   esac
  591. +   # Accept the important Cygnus configure options, so we can diagnose typos.
  592. +   case "$ac_option" in
  593. +   -build | --build | --buil | --bui | --bu | --b)
  594. +     ac_prev=build ;;
  595. +   -build=* | --build=* | --buil=* | --bui=* | --bu=* | --b=*)
  596. +     build="$ac_optarg" ;;
  597. +   -cache-file | --cache-file | --cache-fil | --cache-fi \
  598. +   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
  599. +     ac_prev=cache_file ;;
  600. +   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
  601. +   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
  602. +     cache_file="$ac_optarg" ;;
  603. +   -disable-* | --disable-*)
  604. +     ac_feature=`/bin/echo $ac_option|sed -e 's/-*disable-//'`
  605. +     # Reject names that are not valid shell variable names.
  606. +     if test -n "`/bin/echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
  607. +       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
  608. +     fi
  609. +     ac_feature=`/bin/echo $ac_feature| sed 's/-/_/g'`
  610. +     eval "enable_${ac_feature}=no" ;;
  611. +   -enable-* | --enable-*)
  612. +     ac_feature=`/bin/echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
  613. +     # Reject names that are not valid shell variable names.
  614. +     if test -n "`/bin/echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
  615. +       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
  616. +     fi
  617. +     ac_feature=`/bin/echo $ac_feature| sed 's/-/_/g'`
  618. +     case "$ac_option" in
  619. +       *=*) ;;
  620. +       *) ac_optarg=yes ;;
  621. +     esac
  622. +     eval "enable_${ac_feature}='$ac_optarg'" ;;
  623. +   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
  624. +   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
  625. +   | --exec | --exe | --ex)
  626. +     ac_prev=exec_prefix ;;
  627. +   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
  628. +   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
  629. +   | --exec=* | --exe=* | --ex=*)
  630. +     exec_prefix="$ac_optarg" ;;
  631. +   -gas | --gas | --ga | --g)
  632. +     # Obsolete; use --with-gas.
  633. +     with_gas=yes ;;
  634. +   -help | --help | --hel | --he)
  635. +     # Omit some internal or obsolete options to make the list less imposing.
  636. +     # This message is too long to be a string in the A/UX 3.1 sh.
  637. +     cat << EOF
  638. + Usage: configure [options] [host]
  639. + Options: [defaults in brackets after descriptions]
  640. + Configuration:
  641. +   --cache-file=FILE       cache test results in FILE
  642. +   --help                  print this message
  643. +   --no-create             do not create output files
  644. +   --quiet, --silent       do not print \`checking...' messages
  645. +   --version               print the version of autoconf that created configure
  646. + Directory and file names:
  647. +   --prefix=PREFIX         install architecture-independent files in PREFIX
  648. +                           [$ac_default_prefix]
  649. +   --exec-prefix=PREFIX    install architecture-dependent files in PREFIX
  650. +                           [same as prefix]
  651. +   --srcdir=DIR            find the sources in DIR [configure dir or ..]
  652. +   --program-prefix=PREFIX prepend PREFIX to installed program names
  653. +   --program-suffix=SUFFIX append SUFFIX to installed program names
  654. +   --program-transform-name=PROGRAM run sed PROGRAM on installed program names
  655. + Host type:
  656. +   --build=BUILD           configure for building on BUILD [BUILD=HOST]
  657. +   --host=HOST             configure for HOST [guessed]
  658. +   --target=TARGET         configure for TARGET [TARGET=HOST]
  659. + Features and packages:
  660. +   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
  661. +   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
  662. +   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
  663. +   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
  664. +   --x-includes=DIR        X include files are in DIR
  665. +   --x-libraries=DIR       X library files are in DIR
  666. + --enable and --with options recognized:$ac_help
  667. + EOF
  668. +     exit 0 ;;
  669. +   -host | --host | --hos | --ho)
  670. +     ac_prev=host ;;
  671. +   -host=* | --host=* | --hos=* | --ho=*)
  672. +     host="$ac_optarg" ;;
  673. +   -nfp | --nfp | --nf)
  674. +     # Obsolete; use --without-fp.
  675. +     with_fp=no ;;
  676. +   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
  677. +   | --no-cr | --no-c)
  678. +     no_create=yes ;;
  679. +   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
  680. +   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
  681. +     no_recursion=yes ;;
  682. +   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
  683. +     ac_prev=prefix ;;
  684. +   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
  685. +     prefix="$ac_optarg" ;;
  686. +   -program-prefix | --program-prefix | --program-prefi | --program-pref \
  687. +   | --program-pre | --program-pr | --program-p)
  688. +     ac_prev=program_prefix ;;
  689. +   -program-prefix=* | --program-prefix=* | --program-prefi=* \
  690. +   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
  691. +     program_prefix="$ac_optarg" ;;
  692. +   -program-suffix | --program-suffix | --program-suffi | --program-suff \
  693. +   | --program-suf | --program-su | --program-s)
  694. +     ac_prev=program_suffix ;;
  695. +   -program-suffix=* | --program-suffix=* | --program-suffi=* \
  696. +   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
  697. +     program_suffix="$ac_optarg" ;;
  698. +   -program-transform-name | --program-transform-name \
  699. +   | --program-transform-nam | --program-transform-na \
  700. +   | --program-transform-n | --program-transform- \
  701. +   | --program-transform | --program-transfor \
  702. +   | --program-transfo | --program-transf \
  703. +   | --program-trans | --program-tran \
  704. +   | --progr-tra | --program-tr | --program-t)
  705. +     ac_prev=program_transform_name ;;
  706. +   -program-transform-name=* | --program-transform-name=* \
  707. +   | --program-transform-nam=* | --program-transform-na=* \
  708. +   | --program-transform-n=* | --program-transform-=* \
  709. +   | --program-transform=* | --program-transfor=* \
  710. +   | --program-transfo=* | --program-transf=* \
  711. +   | --program-trans=* | --program-tran=* \
  712. +   | --progr-tra=* | --program-tr=* | --program-t=*)
  713. +     program_transform_name="$ac_optarg" ;;
  714. +   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
  715. +   | -silent | --silent | --silen | --sile | --sil)
  716. +     silent=yes ;;
  717. +   -site | --site | --sit)
  718. +     ac_prev=site ;;
  719. +   -site=* | --site=* | --sit=*)
  720. +     site="$ac_optarg" ;;
  721. +   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
  722. +     ac_prev=srcdir ;;
  723. +   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
  724. +     srcdir="$ac_optarg" ;;
  725. +   -target | --target | --targe | --targ | --tar | --ta | --t)
  726. +     ac_prev=target ;;
  727. +   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
  728. +     target="$ac_optarg" ;;
  729. +   -v | -verbose | --verbose | --verbos | --verbo | --verb)
  730. +     verbose=yes ;;
  731. +   -version | --version | --versio | --versi | --vers)
  732. +     echo "configure generated by autoconf version 2.1"
  733. +     exit 0 ;;
  734. +   -with-* | --with-*)
  735. +     ac_package=`/bin/echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
  736. +     # Reject names that are not valid shell variable names.
  737. +     if test -n "`/bin/echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
  738. +       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
  739. +     fi
  740. +     ac_package=`/bin/echo $ac_package| sed 's/-/_/g'`
  741. +     case "$ac_option" in
  742. +       *=*) ;;
  743. +       *) ac_optarg=yes ;;
  744. +     esac
  745. +     eval "with_${ac_package}='$ac_optarg'" ;;
  746. +   -without-* | --without-*)
  747. +     ac_package=`/bin/echo $ac_option|sed -e 's/-*without-//'`
  748. +     # Reject names that are not valid shell variable names.
  749. +     if test -n "`/bin/echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
  750. +       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
  751. +     fi
  752. +     ac_package=`/bin/echo $ac_package| sed 's/-/_/g'`
  753. +     eval "with_${ac_package}=no" ;;
  754. +   --x)
  755. +     # Obsolete; use --with-x.
  756. +     with_x=yes ;;
  757. +   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
  758. +   | --x-incl | --x-inc | --x-in | --x-i)
  759. +     ac_prev=x_includes ;;
  760. +   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
  761. +   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
  762. +     x_includes="$ac_optarg" ;;
  763. +   -x-libraries | --x-libraries | --x-librarie | --x-librari \
  764. +   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
  765. +     ac_prev=x_libraries ;;
  766. +   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
  767. +   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
  768. +     x_libraries="$ac_optarg" ;;
  769. +   -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
  770. +     ;;
  771. +   *) 
  772. +     if test -n "`/bin/echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
  773. +       echo "configure: warning: $ac_option: invalid host type" 1>&2
  774. +     fi
  775. +     if test "x$nonopt" != xNONE; then
  776. +       { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
  777. +     fi
  778. +     nonopt="$ac_option"
  779. +     ;;
  780. +   esac
  781. + done
  782. + if test -n "$ac_prev"; then
  783. +   { echo "configure: error: missing argument to --`/bin/echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
  784. + fi
  785. + trap 'rm -fr conftest* confdefs* core $ac_clean_files; exit 1' 1 2 15
  786. + # File descriptor usage:
  787. + # 0 unused; standard input
  788. + # 1 file creation
  789. + # 2 errors and warnings
  790. + # 3 unused; some systems may open it to /dev/tty
  791. + # 4 checking for... messages and results
  792. + # 5 compiler messages saved in config.log
  793. + if test "$silent" = yes; then
  794. +   exec 4>/dev/null
  795. + else
  796. +   exec 4>&1
  797. + fi
  798. + exec 5>./config.log
  799. + echo "\
  800. + This file contains any messages produced by compilers while
  801. + running configure, to aid debugging if configure makes a mistake.
  802. + " 1>&5
  803. + # Strip out --no-create and --no-recursion so they do not pile up.
  804. + # Also quote any args containing shell metacharacters.
  805. + ac_configure_args=
  806. + for ac_arg
  807. + do
  808. +   case "$ac_arg" in
  809. +   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
  810. +   | --no-cr | --no-c) ;;
  811. +   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
  812. +   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
  813. +   *" "*|*"    "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
  814. +   ac_configure_args="$ac_configure_args '$ac_arg'" ;;
  815. +   *) ac_configure_args="$ac_configure_args $ac_arg" ;;
  816. +   esac
  817. + done
  818. + # NLS nuisances.
  819. + # Only set LANG and LC_ALL to C if already set.
  820. + # These must not be set unconditionally because not all systems understand
  821. + # e.g. LANG=C (notably SCO).
  822. + if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
  823. + if test "${LANG+set}"   = set; then LANG=C;   export LANG;   fi
  824. + # confdefs.h avoids OS command line length limits that DEFS can exceed.
  825. + rm -rf conftest* confdefs.h
  826. + # AIX cpp loses on an empty file, so make sure it contains at least a newline.
  827. + /bin/echo > confdefs.h
  828. + # A filename unique to this package, relative to the directory that
  829. + # configure is in, which we can look for to find out if srcdir is correct.
  830. + ac_unique_file=curses.h
  831. + # Find the source files, if location was not specified.
  832. + if test -z "$srcdir"; then
  833. +   ac_srcdir_defaulted=yes
  834. +   # Try the directory containing this script, then its parent.
  835. +   ac_prog=$0
  836. +   ac_confdir=`/bin/echo $ac_prog|sed 's%/[^/][^/]*$%%'`
  837. +   test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
  838. +   srcdir=$ac_confdir
  839. +   if test ! -r $srcdir/$ac_unique_file; then
  840. +     srcdir=..
  841. +   fi
  842. + else
  843. +   ac_srcdir_defaulted=no
  844. + fi
  845. + if test ! -r $srcdir/$ac_unique_file; then
  846. +   if test "$ac_srcdir_defaulted" = yes; then
  847. +     { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
  848. +   else
  849. +     { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
  850. +   fi
  851. + fi
  852. + srcdir=`/bin/echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
  853. + # Prefer explicitly selected file to automatically selected ones.
  854. + if test -z "$CONFIG_SITE"; then
  855. +   if test "x$prefix" != xNONE; then
  856. +     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
  857. +   else
  858. +     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
  859. +   fi
  860. + fi
  861. + for ac_site_file in $CONFIG_SITE; do
  862. +   if test -r "$ac_site_file"; then
  863. +     echo "loading site script $ac_site_file"
  864. +     . "$ac_site_file"
  865. +   fi
  866. + done
  867. + if test -r "$cache_file"; then
  868. +   echo "loading cache $cache_file"
  869. +   . $cache_file
  870. + else
  871. +   echo "creating cache $cache_file"
  872. +   > $cache_file
  873. + fi
  874. + ac_ext=c
  875. + # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
  876. + ac_cpp='$CPP $CPPFLAGS'
  877. + ac_compile='${CC-cc} $CFLAGS $CPPFLAGS conftest.$ac_ext -c 1>&5 2>&5'
  878. + ac_link='${CC-cc} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext -o conftest $LIBS 1>&5 2>&5'
  879. + if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
  880. +   # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
  881. +   if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
  882. +     ac_n= ac_c='
  883. + ' ac_t='    '
  884. +   else
  885. +     ac_n=-n ac_c= ac_t=
  886. +   fi
  887. + else
  888. +   ac_n= ac_c='\c' ac_t=
  889. + fi
  890. + # Extract the first word of "gcc", so it can be a program name with args.
  891. + set dummy gcc; ac_word=$2
  892. + /bin/echo $ac_n "checking for $ac_word""... $ac_c" 1>&4
  893. + if eval "test \"`echo '${'ac_cv_prog_CC'+set}'`\" = set"; then
  894. +   /bin/echo $ac_n "(cached) $ac_c" 1>&4
  895. + else
  896. +   if test -n "$CC"; then
  897. +   ac_cv_prog_CC="$CC" # Let the user override the test.
  898. + else
  899. +   IFS="${IFS=     }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
  900. +   for ac_dir in $PATH; do
  901. +     test -z "$ac_dir" && ac_dir=.
  902. +     if test -f $ac_dir/$ac_word; then
  903. +       ac_cv_prog_CC="gcc"
  904. +       break
  905. +     fi
  906. +   done
  907. +   IFS="$ac_save_ifs"
  908. +   test -z "$ac_cv_prog_CC" && ac_cv_prog_CC="cc"
  909. + fi
  910. + fi
  911. + CC="$ac_cv_prog_CC"
  912. + if test -n "$CC"; then
  913. +   /bin/echo "$ac_t""$CC" 1>&4
  914. + else
  915. +   /bin/echo "$ac_t""no" 1>&4
  916. + fi
  917. + /bin/echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&4
  918. + if eval "test \"`echo '${'ac_cv_prog_gcc'+set}'`\" = set"; then
  919. +   /bin/echo $ac_n "(cached) $ac_c" 1>&4
  920. + else
  921. +   cat > conftest.c <<EOF
  922. + #ifdef __GNUC__
  923. +   yes;
  924. + #endif
  925. + EOF
  926. + if ${CC-cc} -E conftest.c 2>&5 | egrep yes >/dev/null 2>&1; then
  927. +   ac_cv_prog_gcc=yes
  928. + else
  929. +   ac_cv_prog_gcc=no
  930. + fi
  931. + fi
  932. + /bin/echo "$ac_t""$ac_cv_prog_gcc" 1>&4
  933. + if test $ac_cv_prog_gcc = yes; then
  934. +   GCC=yes
  935. +   if test "${CFLAGS+set}" != set; then
  936. +     /bin/echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&4
  937. + if eval "test \"`echo '${'ac_cv_prog_gcc_g'+set}'`\" = set"; then
  938. +   /bin/echo $ac_n "(cached) $ac_c" 1>&4
  939. + else
  940. +   echo 'void f(){}' > conftest.c
  941. + if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
  942. +   ac_cv_prog_gcc_g=yes
  943. + else
  944. +   ac_cv_prog_gcc_g=no
  945. + fi
  946. + rm -f conftest*
  947. + fi
  948. +     /bin/echo "$ac_t""$ac_cv_prog_gcc_g" 1>&4
  949. +     if test $ac_cv_prog_gcc_g = yes; then
  950. +       # Amiga hack - suppress automatically using -g for now
  951. +       # Also default to using -O2
  952. +       CFLAGS="-O2"
  953. +     else
  954. +       CFLAGS="-O2"
  955. +     fi
  956. +   fi
  957. + else
  958. +   GCC=
  959. +   test "${CFLAGS+set}" = set || CFLAGS="-g"
  960. + fi
  961. + /bin/echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&4
  962. + # On Suns, sometimes $CPP names a directory.
  963. + if test -n "$CPP" && test -d "$CPP"; then
  964. +   CPP=
  965. + fi
  966. + if test -z "$CPP"; then
  967. + if eval "test \"`echo '${'ac_cv_prog_CPP'+set}'`\" = set"; then
  968. +   /bin/echo $ac_n "(cached) $ac_c" 1>&4
  969. + else
  970. +     # This must be in double quotes, not single quotes, because CPP may get
  971. +   # substituted into the Makefile and "${CC-cc}" will confuse make.
  972. +   CPP="${CC-cc} -E"
  973. +   # On the NeXT, cc -E runs the code through the compiler's parser,
  974. +   # not just through cpp.
  975. +   cat > conftest.$ac_ext <<EOF
  976. + #line 492 "configure"
  977. + #include "confdefs.h"
  978. + #include <assert.h>
  979. + Syntax Error
  980. + EOF
  981. + eval "$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  982. + ac_err=`grep -v '^ *+' conftest.out`
  983. + if test -z "$ac_err"; then
  984. +   :
  985. + else
  986. +   /bin/echo "$ac_err" >&5
  987. +   rm -rf conftest*
  988. +   CPP="${CC-cc} -E -traditional-cpp"
  989. +   cat > conftest.$ac_ext <<EOF
  990. + #line 506 "configure"
  991. + #include "confdefs.h"
  992. + #include <assert.h>
  993. + Syntax Error
  994. + EOF
  995. + eval "$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  996. + ac_err=`grep -v '^ *+' conftest.out`
  997. + if test -z "$ac_err"; then
  998. +   :
  999. + else
  1000. +   /bin/echo "$ac_err" >&5
  1001. +   rm -rf conftest*
  1002. +   CPP=/lib/cpp
  1003. + fi
  1004. + rm -f conftest*
  1005. + fi
  1006. + rm -f conftest*
  1007. +   ac_cv_prog_CPP="$CPP"
  1008. + fi
  1009. + fi
  1010. + CPP="$ac_cv_prog_CPP"
  1011. + /bin/echo "$ac_t""$CPP" 1>&4
  1012. + if test $ac_cv_prog_gcc = yes; then
  1013. +   /bin/echo $ac_n "checking whether ${CC-cc} needs -traditional""... $ac_c" 1>&4
  1014. + if eval "test \"`echo '${'ac_cv_prog_gcc_traditional'+set}'`\" = set"; then
  1015. +   /bin/echo $ac_n "(cached) $ac_c" 1>&4
  1016. + else
  1017. +     ac_pattern="Autoconf.*'x'"
  1018. +   cat > conftest.$ac_ext <<EOF
  1019. + #line 536 "configure"
  1020. + #include "confdefs.h"
  1021. + #include <sgtty.h>
  1022. + Autoconf TIOCGETP
  1023. + EOF
  1024. + if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  1025. +   egrep "$ac_pattern" >/dev/null 2>&1; then
  1026. +   rm -rf conftest*
  1027. +   ac_cv_prog_gcc_traditional=yes
  1028. + else
  1029. +   rm -rf conftest*
  1030. +   ac_cv_prog_gcc_traditional=no
  1031. + fi
  1032. + rm -f conftest*
  1033. +   if test $ac_cv_prog_gcc_traditional = no; then
  1034. +     cat > conftest.$ac_ext <<EOF
  1035. + #line 554 "configure"
  1036. + #include "confdefs.h"
  1037. + #include <termio.h>
  1038. + Autoconf TCGETA
  1039. + EOF
  1040. + if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  1041. +   egrep "$ac_pattern" >/dev/null 2>&1; then
  1042. +   rm -rf conftest*
  1043. +   ac_cv_prog_gcc_traditional=yes
  1044. + fi
  1045. + rm -f conftest*
  1046. +   fi
  1047. + fi
  1048. +   /bin/echo "$ac_t""$ac_cv_prog_gcc_traditional" 1>&4
  1049. +   if test $ac_cv_prog_gcc_traditional = yes; then
  1050. +     CC="$CC -traditional"
  1051. +   fi
  1052. + fi
  1053. + ac_aux_dir=
  1054. + for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
  1055. +   if test -f $ac_dir/install-sh; then
  1056. +     ac_aux_dir=$ac_dir
  1057. +     ac_install_sh="$ac_aux_dir/install-sh -c"
  1058. +     break
  1059. +   elif test -f $ac_dir/install.sh; then
  1060. +     ac_aux_dir=$ac_dir
  1061. +     ac_install_sh="$ac_aux_dir/install.sh -c"
  1062. +     break
  1063. +   fi
  1064. + done
  1065. + if test -z "$ac_aux_dir"; then
  1066. +   { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; }
  1067. + fi
  1068. + ac_config_guess=$ac_aux_dir/config.guess
  1069. + ac_config_sub=$ac_aux_dir/config.sub
  1070. + ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
  1071. + # Find a good install program.  We prefer a C program (faster),
  1072. + # so one script is as good as another.  But avoid the broken or
  1073. + # incompatible versions:
  1074. + # SysV /etc/install, /usr/sbin/install
  1075. + # SunOS /usr/etc/install
  1076. + # IRIX /sbin/install
  1077. + # AIX /bin/install
  1078. + # AFS /usr/afsws/bin/install, which mishandles nonexistent args
  1079. + # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
  1080. + # ./install, which can be erroneously created by make from ./install.sh.
  1081. + /bin/echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&4
  1082. + if test -z "$INSTALL"; then
  1083. + if eval "test \"`echo '${'ac_cv_path_install'+set}'`\" = set"; then
  1084. +   /bin/echo $ac_n "(cached) $ac_c" 1>&4
  1085. + else
  1086. +     IFS="${IFS=     }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
  1087. +   for ac_dir in $PATH; do
  1088. +     case "$ac_dir" in
  1089. +     ''|.|/gnu/etc) ;;
  1090. +     *)
  1091. +       # OSF1 and SCO ODT 3.0 have their own names for install.
  1092. +       for ac_prog in ginstall installbsd scoinst install; do
  1093. +         if test -f $ac_dir/$ac_prog; then
  1094. +       if test $ac_prog = install &&
  1095. +             grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
  1096. +         # AIX install.  It has an incompatible calling convention.
  1097. +         # OSF/1 installbsd also uses dspmsg, but is usable.
  1098. +         :
  1099. +       else
  1100. +         ac_cv_path_install="$ac_dir/$ac_prog -c"
  1101. +         break 2
  1102. +       fi
  1103. +     fi
  1104. +       done
  1105. +       ;;
  1106. +     esac
  1107. +   done
  1108. +   IFS="$ac_save_ifs"
  1109. +   # As a last resort, use the slow shell script.
  1110. +   test -z "$ac_cv_path_install" && ac_cv_path_install="$ac_install_sh"
  1111. + fi
  1112. +   INSTALL="$ac_cv_path_install"
  1113. + fi
  1114. + /bin/echo "$ac_t""$INSTALL" 1>&4
  1115. + # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
  1116. + # It thinks the first close brace ends the variable substitution.
  1117. + test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
  1118. + test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
  1119. + # Extract the first word of "ranlib", so it can be a program name with args.
  1120. + set dummy ranlib; ac_word=$2
  1121. + /bin/echo $ac_n "checking for $ac_word""... $ac_c" 1>&4
  1122. + if eval "test \"`echo '${'ac_cv_prog_RANLIB'+set}'`\" = set"; then
  1123. +   /bin/echo $ac_n "(cached) $ac_c" 1>&4
  1124. + else
  1125. +   if test -n "$RANLIB"; then
  1126. +   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
  1127. + else
  1128. +   IFS="${IFS=     }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
  1129. +   for ac_dir in $PATH; do
  1130. +     test -z "$ac_dir" && ac_dir=.
  1131. +     if test -f $ac_dir/$ac_word; then
  1132. +       ac_cv_prog_RANLIB="ranlib"
  1133. +       break
  1134. +     fi
  1135. +   done
  1136. +   IFS="$ac_save_ifs"
  1137. +   test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
  1138. + fi
  1139. + fi
  1140. + RANLIB="$ac_cv_prog_RANLIB"
  1141. + if test -n "$RANLIB"; then
  1142. +   /bin/echo "$ac_t""$RANLIB" 1>&4
  1143. + else
  1144. +   /bin/echo "$ac_t""no" 1>&4
  1145. + fi
  1146. + trap '' 1 2 15
  1147. + if test -w $cache_file; then
  1148. + echo "updating cache $cache_file"
  1149. + cat > $cache_file <<\EOF
  1150. + # This file is a shell script that caches the results of configure
  1151. + # tests run on this system so they can be shared between configure
  1152. + # scripts and configure runs.  It is not useful on other systems.
  1153. + # If it contains results you don't want to keep, you may remove or edit it.
  1154. + #
  1155. + # By default, configure uses ./config.cache as the cache file,
  1156. + # creating it if it does not exist already.  You can give configure
  1157. + # the --cache-file=FILE option to use a different cache file; that is
  1158. + # what configure does when it calls configure scripts in
  1159. + # subdirectories, so they share the cache.
  1160. + # Giving --cache-file=/dev/null disables caching, for debugging configure.
  1161. + # config.status only pays attention to the cache file if you give it the
  1162. + # --recheck option to rerun configure.
  1163. + #
  1164. + EOF
  1165. + # Ultrix sh set writes to stderr and can't be redirected directly.
  1166. + (set) 2>&1 |
  1167. +   sed -n "s/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/: \${\1='\2'}/p" \
  1168. +   >> $cache_file
  1169. + else
  1170. + echo "not updating unwritable cache $cache_file"
  1171. + fi
  1172. + trap 'rm -fr conftest* confdefs* core $ac_clean_files; exit 1' 1 2 15
  1173. + test "x$prefix" = xNONE && prefix=$ac_default_prefix
  1174. + # Let make expand exec_prefix.
  1175. + test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
  1176. + # Any assignment to VPATH causes Sun make to only execute
  1177. + # the first set of double-colon rules, so remove it if not needed.
  1178. + # If there is a colon in the path, we need to keep it.
  1179. + if test "x$srcdir" = x.; then
  1180. +   ac_vpsub='/^[     ]*VPATH[     ]*=[^:]*$/d'
  1181. + fi
  1182. + trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
  1183. + # Transform confdefs.h into DEFS.
  1184. + # Protect against shell expansion while executing Makefile rules.
  1185. + # Protect against Makefile macro expansion.
  1186. + cat > conftest.defs <<\EOF
  1187. + s%#define \([A-Za-z_][A-Za-z0-9_]*\) \(.*\)%-D\1=\2%g
  1188. + s%[     `~#$^&*(){}\\|;'"<>?]%\\&%g
  1189. + s%\[%\\&%g
  1190. + s%\]%\\&%g
  1191. + s%\$%$$%g
  1192. + EOF
  1193. + DEFS=`sed -f conftest.defs confdefs.h | tr '\012' ' '`
  1194. + rm -f conftest.defs
  1195. + # Without the "./", some shells look in PATH for config.status.
  1196. + : ${CONFIG_STATUS=./config.status}
  1197. + echo creating $CONFIG_STATUS
  1198. + # Some systems, like AmigaDOS, won't allow you to remove a script that is
  1199. + # being executed, so just move it out of the way instead.
  1200. + if test -f $CONFIG_STATUS; then mv $CONFIG_STATUS $CONFIG_STATUS.old; else true; fi
  1201. + cat > $CONFIG_STATUS <<EOF
  1202. + #!/bin/sh
  1203. + # Generated automatically by configure.
  1204. + # Run this file to recreate the current configuration.
  1205. + # This directory was configured as follows,
  1206. + # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
  1207. + #
  1208. + # $0 $ac_configure_args
  1209. + #
  1210. + # Compiler output produced by configure, useful for debugging
  1211. + # configure, is in ./config.log if it exists.
  1212. + ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
  1213. + for ac_option
  1214. + do
  1215. +   case "\$ac_option" in
  1216. +   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
  1217. +     echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
  1218. +     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
  1219. +   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
  1220. +     /bin/echo "$CONFIG_STATUS generated by autoconf version 2.1"
  1221. +     exit 0 ;;
  1222. +   -help | --help | --hel | --he | --h)
  1223. +     echo "\$ac_cs_usage"; exit 0 ;;
  1224. +   *) echo "\$ac_cs_usage"; exit 1 ;;
  1225. +   esac
  1226. + done
  1227. + ac_given_srcdir=$srcdir
  1228. + ac_given_INSTALL="$INSTALL"
  1229. + trap 'rm -f Makefile EXAMPLES/Makefile; exit 1' 1 2 15
  1230. + # Protect against being on the right side of a sed subst in config.status. 
  1231. + sed 's/%@/@@/; s/@%/@@/; s/%g$/@g/; /@g$/s/[\\\\&%]/\\\\&/g; 
  1232. +  s/@@/%@/; s/@@/@%/; s/@g$/%g/' > conftest.subs <<\CEOF
  1233. + $ac_vpsub
  1234. + $extrasub
  1235. + s%@CFLAGS@%$CFLAGS%g
  1236. + s%@CPPFLAGS@%$CPPFLAGS%g
  1237. + s%@CXXFLAGS@%$CXXFLAGS%g
  1238. + s%@DEFS@%$DEFS%g
  1239. + s%@LDFLAGS@%$LDFLAGS%g
  1240. + s%@LIBS@%$LIBS%g
  1241. + s%@exec_prefix@%$exec_prefix%g
  1242. + s%@prefix@%$prefix%g
  1243. + s%@program_transform_name@%$program_transform_name%g
  1244. + s%@CC@%$CC%g
  1245. + s%@CPP@%$CPP%g
  1246. + s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
  1247. + s%@INSTALL_DATA@%$INSTALL_DATA%g
  1248. + s%@RANLIB@%$RANLIB%g
  1249. + CEOF
  1250. + EOF
  1251. + cat >> $CONFIG_STATUS <<EOF
  1252. + CONFIG_FILES=\${CONFIG_FILES-"Makefile EXAMPLES/Makefile"}
  1253. + EOF
  1254. + cat >> $CONFIG_STATUS <<\EOF
  1255. + for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
  1256. +   # Support "outfile[:infile]", defaulting infile="outfile.in".
  1257. +   case "$ac_file" in
  1258. +   *:*) ac_file_in=`/bin/echo "$ac_file"|sed 's%.*:%%'`
  1259. +        ac_file=`/bin/echo "$ac_file"|sed 's%:.*%%'` ;;
  1260. +   *) ac_file_in="${ac_file}.in" ;;
  1261. +   esac
  1262. +   # Adjust relative srcdir, etc. for subdirectories.
  1263. +   # Remove last slash and all that follows it.  Not all systems have dirname.
  1264. +   ac_dir=`/bin/echo $ac_file|sed 's%/[^/][^/]*$%%'`
  1265. +   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
  1266. +     # The file is in a subdirectory.
  1267. +     test ! -d "$ac_dir" && mkdir "$ac_dir"
  1268. +     ac_dir_suffix="/$ac_dir"
  1269. +     # A "../" for each directory in $ac_dir_suffix.
  1270. +     ac_dots=`/bin/echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
  1271. +   else
  1272. +     ac_dir_suffix= ac_dots=
  1273. +   fi
  1274. +   case "$ac_given_srcdir" in
  1275. +   .)  srcdir=.
  1276. +       if test -z "$ac_dots"; then top_srcdir=.
  1277. +       else top_srcdir=`/bin/echo $ac_dots|sed 's%/$%%'`; fi ;;
  1278. +   /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
  1279. +   *) # Relative path.
  1280. +     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
  1281. +     top_srcdir="$ac_dots$ac_given_srcdir" ;;
  1282. +   esac
  1283. +   case "$ac_given_INSTALL" in
  1284. +   [/$]*) INSTALL="$ac_given_INSTALL" ;;
  1285. +   *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
  1286. +   esac
  1287. +   echo creating "$ac_file"
  1288. +   rm -f "$ac_file"
  1289. +   configure_input="Generated automatically from `/bin/echo $ac_file_in|sed 's%.*/%%'` by configure."
  1290. +   case "$ac_file" in
  1291. +   *Makefile*) ac_comsub="1i\\
  1292. + # $configure_input" ;;
  1293. +   *) ac_comsub= ;;
  1294. +   esac
  1295. +   sed -e "$ac_comsub
  1296. + s%@configure_input@%$configure_input%g
  1297. + s%@srcdir@%$srcdir%g
  1298. + s%@top_srcdir@%$top_srcdir%g
  1299. + s%@INSTALL@%$INSTALL%g
  1300. + " -f conftest.subs $ac_given_srcdir/$ac_file_in > $ac_file
  1301. + fi; done
  1302. + rm -f conftest.subs
  1303. + exit 0
  1304. + EOF
  1305. + chmod +x $CONFIG_STATUS
  1306. + rm -fr confdefs* $ac_clean_files
  1307. + test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS
  1308. diff -rc --new-file libcurses-8.3/configure.in /gnu/src/amiga/libcurses-8.3/configure.in
  1309. *** libcurses-8.3/configure.in    Thu Jan  1 00:00:00 1970
  1310. --- /gnu/src/amiga/libcurses-8.3/configure.in    Wed Jan 11 10:34:35 1995
  1311. ***************
  1312. *** 0 ****
  1313. --- 1,9 ----
  1314. + dnl Process this file with autoconf to produce a configure script.
  1315. + AC_INIT(curses.h)
  1316. + AC_PROG_CC
  1317. + AC_GCC_TRADITIONAL
  1318. + AC_PROG_INSTALL
  1319. + AC_PROG_RANLIB
  1320. + AC_OUTPUT(Makefile EXAMPLES/Makefile)
  1321. diff -rc --new-file libcurses-8.3/cr_put.c /gnu/src/amiga/libcurses-8.3/cr_put.c
  1322. *** libcurses-8.3/cr_put.c    Sun Jan  9 16:40:54 1994
  1323. --- /gnu/src/amiga/libcurses-8.3/cr_put.c    Wed Jan 11 17:24:10 1995
  1324. ***************
  1325. *** 51,57 ****
  1326.   mvcur(ly, lx, y, x)
  1327.       int ly, lx, y, x;
  1328.   {
  1329. !     return (__mvcur(ly, lx, y, x, 0));
  1330.   }
  1331.   
  1332.   static void    fgoto __P((int));
  1333. --- 51,61 ----
  1334.   mvcur(ly, lx, y, x)
  1335.       int ly, lx, y, x;
  1336.   {
  1337. !     int status;
  1338. !     DBUG_ENTER ("mvcur");
  1339. !     status = __mvcur(ly, lx, y, x, 0);
  1340. !     DBUG_RETURN (status);
  1341.   }
  1342.   
  1343.   static void    fgoto __P((int));
  1344. ***************
  1345. *** 70,85 ****
  1346.   __mvcur(ly, lx, y, x, in_refresh)
  1347.       int ly, lx, y, x, in_refresh;
  1348.   {
  1349. ! #ifdef DEBUG
  1350. !     __CTRACE("mvcur: moving cursor from (%d, %d) to (%d, %d)\n",
  1351. !         ly, lx, y, x);
  1352. ! #endif
  1353.       destcol = x;
  1354.       destline = y;
  1355.       outcol = lx;
  1356.       outline = ly;
  1357.       fgoto(in_refresh);
  1358. !     return (OK);
  1359.   }    
  1360.           
  1361.   static void
  1362. --- 74,88 ----
  1363.   __mvcur(ly, lx, y, x, in_refresh)
  1364.       int ly, lx, y, x, in_refresh;
  1365.   {
  1366. !     DBUG_ENTER ("mvcur");
  1367. !     DBUG_PRINT ("mvcur", ("moving cursor from (%d, %d) to (%d, %d)",
  1368. !         ly, lx, y, x));
  1369.       destcol = x;
  1370.       destline = y;
  1371.       outcol = lx;
  1372.       outline = ly;
  1373.       fgoto(in_refresh);
  1374. !     DBUG_RETURN (OK);
  1375.   }    
  1376.           
  1377.   static void
  1378. ***************
  1379. *** 89,94 ****
  1380. --- 92,98 ----
  1381.       register int c, l;
  1382.       register char *cgp;
  1383.   
  1384. +     DBUG_ENTER ("fgoto");
  1385.       if (destcol >= COLS) {
  1386.           destline += destcol / COLS;
  1387.           destcol %= COLS;
  1388. ***************
  1389. *** 171,176 ****
  1390. --- 175,181 ----
  1391.           plod(0, in_refresh);
  1392.       outline = destline;
  1393.       outcol = destcol;
  1394. +     DBUG_VOID_RETURN;
  1395.   }
  1396.   /*
  1397.    * Move (slowly) to destination.
  1398. ***************
  1399. *** 185,194 ****
  1400. --- 190,201 ----
  1401.   plodput(c)
  1402.       int c;
  1403.   {
  1404. +     DBUG_ENTER ("plodput");
  1405.       if (plodflg)
  1406.           --plodcnt;
  1407.       else
  1408.           putchar(c);
  1409. +     DBUG_VOID_RETURN;
  1410.   }
  1411.   
  1412.   static int
  1413. ***************
  1414. *** 197,202 ****
  1415. --- 204,210 ----
  1416.   {
  1417.       register int i, j, k, soutcol, soutline;
  1418.   
  1419. +     DBUG_ENTER ("plod");
  1420.       plodcnt = plodflg = cnt;
  1421.       soutcol = outcol;
  1422.       soutline = outline;
  1423. ***************
  1424. *** 260,266 ****
  1425.       } else
  1426.           /* No home and no up means it's impossible. */
  1427.           if (!UP && destline < outline)
  1428. !             return (-1);
  1429.       if (GT)
  1430.           i = destcol % HARDTABS + destcol / HARDTABS;
  1431.       else
  1432. --- 268,274 ----
  1433.       } else
  1434.           /* No home and no up means it's impossible. */
  1435.           if (!UP && destline < outline)
  1436. !             DBUG_RETURN (-1);
  1437.       if (GT)
  1438.           i = destcol % HARDTABS + destcol / HARDTABS;
  1439.       else
  1440. ***************
  1441. *** 408,414 ****
  1442.           outcol = soutcol;
  1443.           outline = soutline;
  1444.       }
  1445. !     return (plodcnt);
  1446.   }
  1447.   
  1448.   /*
  1449. --- 416,422 ----
  1450.           outcol = soutcol;
  1451.           outline = soutline;
  1452.       }
  1453. !     DBUG_RETURN (plodcnt);
  1454.   }
  1455.   
  1456.   /*
  1457. ***************
  1458. *** 422,431 ****
  1459.   {
  1460.       int offset;
  1461.   
  1462.       if (col >= COLS) {
  1463.           offset = COLS * (col / COLS);
  1464.           col -= offset;
  1465.       } else
  1466.           offset = 0;
  1467. !     return (col + ts - (col % ts) + offset);
  1468.   }
  1469. --- 430,440 ----
  1470.   {
  1471.       int offset;
  1472.   
  1473. +     DBUG_ENTER ("tabcol");
  1474.       if (col >= COLS) {
  1475.           offset = COLS * (col / COLS);
  1476.           col -= offset;
  1477.       } else
  1478.           offset = 0;
  1479. !     DBUG_RETURN (col + ts - (col % ts) + offset);
  1480.   }
  1481. diff -rc --new-file libcurses-8.3/cur_hash.c /gnu/src/amiga/libcurses-8.3/cur_hash.c
  1482. *** libcurses-8.3/cur_hash.c    Sun Jan  2 14:23:28 1994
  1483. --- /gnu/src/amiga/libcurses-8.3/cur_hash.c    Wed Jan 11 17:45:14 1995
  1484. ***************
  1485. *** 58,62 ****
  1486.                   }
  1487.           i++;
  1488.       }
  1489. !         return h;
  1490.   }
  1491. --- 58,62 ----
  1492.                   }
  1493.           i++;
  1494.       }
  1495. !         return (h);
  1496.   }
  1497. diff -rc --new-file libcurses-8.3/curses.c /gnu/src/amiga/libcurses-8.3/curses.c
  1498. *** libcurses-8.3/curses.c    Sun Jan  2 14:24:42 1994
  1499. --- /gnu/src/amiga/libcurses-8.3/curses.c    Wed Jan 11 09:21:03 1995
  1500. ***************
  1501. *** 68,74 ****
  1502.   int     COLS;                /* Columns on the screen. */
  1503.   int     LINES;                /* Lines on the screen. */
  1504.   int     My_term = 0;            /* Use Def_term regardless. */
  1505. ! char    *Def_term = "unknown";        /* Default terminal type. */
  1506.   char     GT;                /* Gtty indicates tabs. */
  1507.   char     NONL;                /* Term can't hack LF doing a CR. */
  1508.   char     UPPERCASE;            /* Terminal is uppercase only. */
  1509. --- 68,74 ----
  1510.   int     COLS;                /* Columns on the screen. */
  1511.   int     LINES;                /* Lines on the screen. */
  1512.   int     My_term = 0;            /* Use Def_term regardless. */
  1513. ! char    *Def_term = "amiga";        /* Default terminal type. */
  1514.   char     GT;                /* Gtty indicates tabs. */
  1515.   char     NONL;                /* Term can't hack LF doing a CR. */
  1516.   char     UPPERCASE;            /* Terminal is uppercase only. */
  1517. diff -rc --new-file libcurses-8.3/curses.h /gnu/src/amiga/libcurses-8.3/curses.h
  1518. *** libcurses-8.3/curses.h    Sun Jan  2 14:25:32 1994
  1519. --- /gnu/src/amiga/libcurses-8.3/curses.h    Wed Jan 11 15:04:31 1995
  1520. ***************
  1521. *** 37,42 ****
  1522. --- 37,43 ----
  1523.   #define    _CURSES_H_
  1524.   
  1525.   #include <stdio.h>
  1526. + #include <sys/types.h>
  1527.   
  1528.   /*
  1529.    * The following #defines and #includes are present for backward
  1530. ***************
  1531. *** 269,276 ****
  1532.   int     touchline __P((WINDOW *, int, int, int));
  1533.   int     touchoverlap __P((WINDOW *, WINDOW *));
  1534.   int     touchwin __P((WINDOW *));
  1535. ! int      vwprintw __P((WINDOW *, const char *, _BSD_VA_LIST_));
  1536. ! int      vwscanw __P((WINDOW *, const char *, _BSD_VA_LIST_));
  1537.   int     waddch __P((WINDOW *, int));
  1538.   int     waddnstr __P((WINDOW *, const char *, int));
  1539.   int     wclear __P((WINDOW *));
  1540. --- 270,279 ----
  1541.   int     touchline __P((WINDOW *, int, int, int));
  1542.   int     touchoverlap __P((WINDOW *, WINDOW *));
  1543.   int     touchwin __P((WINDOW *));
  1544. ! #if 0    /* FIXME */
  1545. ! int      vwprintw __P((WINDOW *, const char *, _VA_LIST_));
  1546. ! int      vwscanw __P((WINDOW *, const char *, _VA_LIST_));
  1547. ! #endif
  1548.   int     waddch __P((WINDOW *, int));
  1549.   int     waddnstr __P((WINDOW *, const char *, int));
  1550.   int     wclear __P((WINDOW *));
  1551. ***************
  1552. *** 289,295 ****
  1553.   int     wscanw __P((WINDOW *, const char *, ...));
  1554.   char    *wstandend __P((WINDOW *));
  1555.   char    *wstandout __P((WINDOW *));
  1556. ! int     vwprintw __P((WINDOW *, const char *, _BSD_VA_LIST_));
  1557.   
  1558.   /* Private functions that are needed for user programs prototypes. */
  1559.   void     __cputchar __P((int));
  1560. --- 292,300 ----
  1561.   int     wscanw __P((WINDOW *, const char *, ...));
  1562.   char    *wstandend __P((WINDOW *));
  1563.   char    *wstandout __P((WINDOW *));
  1564. ! #if 0    /* FIXME */
  1565. ! int     vwprintw __P((WINDOW *, const char *, _VA_LIST_));
  1566. ! #endif
  1567.   
  1568.   /* Private functions that are needed for user programs prototypes. */
  1569.   void     __cputchar __P((int));
  1570. ***************
  1571. *** 297,302 ****
  1572. --- 302,308 ----
  1573.   
  1574.   /* Private functions. */
  1575.   #ifdef _CURSES_PRIVATE
  1576. + #include <dbug.h>
  1577.   void     __CTRACE __P((const char *, ...));
  1578.   u_int     __hash __P((char *, int));
  1579.   void     __id_subwins __P((WINDOW *));
  1580. diff -rc --new-file libcurses-8.3/delch.c /gnu/src/amiga/libcurses-8.3/delch.c
  1581. *** libcurses-8.3/delch.c    Fri Jun  4 17:47:58 1993
  1582. --- /gnu/src/amiga/libcurses-8.3/delch.c    Wed Jan 11 16:47:20 1995
  1583. ***************
  1584. *** 48,53 ****
  1585. --- 48,54 ----
  1586.   {
  1587.       register __LDATA *end, *temp1, *temp2;
  1588.   
  1589. +     DBUG_ENTER ("wdelch");
  1590.       end = &win->lines[win->cury]->line[win->maxx - 1];
  1591.       temp1 = &win->lines[win->cury]->line[win->curx];
  1592.       temp2 = temp1 + 1;
  1593. ***************
  1594. *** 58,62 ****
  1595.       temp1->ch = ' ';
  1596.       temp1->attr = 0;
  1597.       __touchline(win, win->cury, win->curx, win->maxx - 1, 0);
  1598. !     return (OK);
  1599.   }
  1600. --- 59,63 ----
  1601.       temp1->ch = ' ';
  1602.       temp1->attr = 0;
  1603.       __touchline(win, win->cury, win->curx, win->maxx - 1, 0);
  1604. !     DBUG_RETURN (OK);
  1605.   }
  1606. diff -rc --new-file libcurses-8.3/deleteln.c /gnu/src/amiga/libcurses-8.3/deleteln.c
  1607. *** libcurses-8.3/deleteln.c    Fri Jun  4 17:48:02 1993
  1608. --- /gnu/src/amiga/libcurses-8.3/deleteln.c    Wed Jan 11 16:47:48 1995
  1609. ***************
  1610. *** 49,57 ****
  1611.       register int y, i;
  1612.       register __LINE *temp;
  1613.   
  1614. ! #ifdef DEBUG
  1615. !     __CTRACE("deleteln: (%0.2o)\n", win);
  1616. ! #endif
  1617.       temp = win->lines[win->cury];
  1618.       for (y = win->cury; y < win->maxy - 1; y++) {
  1619.           win->lines[y]->flags &= ~__ISPASTEOL;
  1620. --- 49,56 ----
  1621.       register int y, i;
  1622.       register __LINE *temp;
  1623.   
  1624. !     DBUG_ENTER ("wdeleteln");
  1625. !     DBUG_PRINT ("wdeleteln", ("(%0.2o)", win));
  1626.       temp = win->lines[win->cury];
  1627.       for (y = win->cury; y < win->maxy - 1; y++) {
  1628.           win->lines[y]->flags &= ~__ISPASTEOL;
  1629. ***************
  1630. *** 77,81 ****
  1631.       __touchline(win, y, 0, win->maxx - 1, 0);
  1632.       if (win->orig == NULL)
  1633.           __id_subwins(win);
  1634. !     return (OK);
  1635.   }
  1636. --- 76,80 ----
  1637.       __touchline(win, y, 0, win->maxx - 1, 0);
  1638.       if (win->orig == NULL)
  1639.           __id_subwins(win);
  1640. !     DBUG_RETURN (OK);
  1641.   }
  1642. diff -rc --new-file libcurses-8.3/delwin.c /gnu/src/amiga/libcurses-8.3/delwin.c
  1643. *** libcurses-8.3/delwin.c    Fri Jun  4 17:48:08 1993
  1644. --- /gnu/src/amiga/libcurses-8.3/delwin.c    Wed Jan 11 16:48:11 1995
  1645. ***************
  1646. *** 49,54 ****
  1647. --- 49,55 ----
  1648.   
  1649.       register WINDOW *wp, *np;
  1650.   
  1651. +     DBUG_ENTER ("delwin");
  1652.       if (win->orig == NULL) {
  1653.           /*
  1654.            * If we are the original window, delete the space for all
  1655. ***************
  1656. *** 75,79 ****
  1657.           wp->nextp = win->nextp;
  1658.       }
  1659.       free(win);
  1660. !     return (OK);
  1661.   }
  1662. --- 76,80 ----
  1663.           wp->nextp = win->nextp;
  1664.       }
  1665.       free(win);
  1666. !     DBUG_RETURN (OK);
  1667.   }
  1668. diff -rc --new-file libcurses-8.3/erase.c /gnu/src/amiga/libcurses-8.3/erase.c
  1669. *** libcurses-8.3/erase.c    Fri Jun  4 17:48:12 1993
  1670. --- /gnu/src/amiga/libcurses-8.3/erase.c    Wed Jan 11 16:48:36 1995
  1671. ***************
  1672. *** 49,57 ****
  1673.       register int minx, y;
  1674.       register __LDATA *sp, *end, *start, *maxx;
  1675.   
  1676. ! #ifdef DEBUG
  1677. !     __CTRACE("werase: (%0.2o)\n", win);
  1678. ! #endif
  1679.       for (y = 0; y < win->maxy; y++) {
  1680.           minx = -1;
  1681.           start = win->lines[y]->line;
  1682. --- 49,56 ----
  1683.       register int minx, y;
  1684.       register __LDATA *sp, *end, *start, *maxx;
  1685.   
  1686. !     DBUG_ENTER ("werase");
  1687. !     DBUG_PRINT ("werase", ("werase: (%0.2o)", win));
  1688.       for (y = 0; y < win->maxy; y++) {
  1689.           minx = -1;
  1690.           start = win->lines[y]->line;
  1691. ***************
  1692. *** 68,72 ****
  1693.               __touchline(win, y, minx, maxx - win->lines[y]->line,
  1694.                  0);
  1695.       }
  1696. !     return (OK);
  1697.   }
  1698. --- 67,71 ----
  1699.               __touchline(win, y, minx, maxx - win->lines[y]->line,
  1700.                  0);
  1701.       }
  1702. !     DBUG_RETURN (OK);
  1703.   }
  1704. diff -rc --new-file libcurses-8.3/fullname.c /gnu/src/amiga/libcurses-8.3/fullname.c
  1705. *** libcurses-8.3/fullname.c    Fri Jun  4 17:48:16 1993
  1706. --- /gnu/src/amiga/libcurses-8.3/fullname.c    Wed Jan 11 17:35:24 1995
  1707. ***************
  1708. *** 35,40 ****
  1709. --- 35,43 ----
  1710.   static char sccsid[] = "@(#)fullname.c    8.1 (Berkeley) 6/4/93";
  1711.   #endif    /* not lint */
  1712.   
  1713. + #include <stdio.h>
  1714. + #include <dbug.h>
  1715.   /*
  1716.    * fullname --
  1717.    *    This routine fills in "def" with the full name of the terminal.
  1718. ***************
  1719. *** 46,51 ****
  1720. --- 49,55 ----
  1721.   {
  1722.       register char *cp;
  1723.   
  1724. +     DBUG_ENTER ("fullname");
  1725.       *def = '\0';        /* In case no name. */
  1726.   
  1727.       while (*bp && *bp != ':') {
  1728. ***************
  1729. *** 56,60 ****
  1730.           if (*bp == '|')
  1731.               bp++;        /* Skip over '|' if that is case. */
  1732.       }
  1733. !     return (def);
  1734.   }
  1735. --- 60,64 ----
  1736.           if (*bp == '|')
  1737.               bp++;        /* Skip over '|' if that is case. */
  1738.       }
  1739. !     DBUG_RETURN (def);
  1740.   }
  1741. diff -rc --new-file libcurses-8.3/getch.c /gnu/src/amiga/libcurses-8.3/getch.c
  1742. *** libcurses-8.3/getch.c    Fri Jun  4 17:48:20 1993
  1743. --- /gnu/src/amiga/libcurses-8.3/getch.c    Wed Jan 11 16:49:22 1995
  1744. ***************
  1745. *** 47,59 ****
  1746.   {
  1747.       register int inp, weset;
  1748.   
  1749.       if (!(win->flags & __SCROLLOK) && (win->flags & __FULLWIN)
  1750.           && win->curx == win->maxx - 1 && win->cury == win->maxy - 1)
  1751. !         return (ERR);
  1752. ! #ifdef DEBUG
  1753. !     __CTRACE("wgetch: __echoit = %d, __rawmode = %d\n",
  1754. !         __echoit, __rawmode);
  1755. ! #endif
  1756.       if (__echoit && !__rawmode) {
  1757.           cbreak();
  1758.           weset = 1;
  1759. --- 47,58 ----
  1760.   {
  1761.       register int inp, weset;
  1762.   
  1763. +     DBUG_ENTER ("wgetch");
  1764.       if (!(win->flags & __SCROLLOK) && (win->flags & __FULLWIN)
  1765.           && win->curx == win->maxx - 1 && win->cury == win->maxy - 1)
  1766. !         DBUG_RETURN (ERR);
  1767. !     DBUG_PRINT ("wgetch", ("__echoit = %d, __rawmode = %d",
  1768. !         __echoit, __rawmode));
  1769.       if (__echoit && !__rawmode) {
  1770.           cbreak();
  1771.           weset = 1;
  1772. ***************
  1773. *** 61,69 ****
  1774.           weset = 0;
  1775.   
  1776.       inp = getchar();
  1777. ! #ifdef DEBUG
  1778. !     __CTRACE("wgetch got '%s'\n", unctrl(inp));
  1779. ! #endif
  1780.       if (__echoit) {
  1781.           mvwaddch(curscr,
  1782.               win->cury + win->begy, win->curx + win->begx, inp);
  1783. --- 60,66 ----
  1784.           weset = 0;
  1785.   
  1786.       inp = getchar();
  1787. !     DBUG_PRINT ("wgetch", ("got '%s'", unctrl(inp)));
  1788.       if (__echoit) {
  1789.           mvwaddch(curscr,
  1790.               win->cury + win->begy, win->curx + win->begx, inp);
  1791. ***************
  1792. *** 71,75 ****
  1793.       }
  1794.       if (weset)
  1795.           nocbreak();
  1796. !     return (inp);
  1797.   }
  1798. --- 68,72 ----
  1799.       }
  1800.       if (weset)
  1801.           nocbreak();
  1802. !     DBUG_RETURN (inp);
  1803.   }
  1804. diff -rc --new-file libcurses-8.3/getstr.c /gnu/src/amiga/libcurses-8.3/getstr.c
  1805. *** libcurses-8.3/getstr.c    Fri Jun  4 17:48:24 1993
  1806. --- /gnu/src/amiga/libcurses-8.3/getstr.c    Wed Jan 11 16:49:49 1995
  1807. ***************
  1808. *** 46,57 ****
  1809.       register WINDOW *win;
  1810.       register char *str;
  1811.   {
  1812.       while ((*str = wgetch(win)) != ERR && *str != '\n')
  1813.           str++;
  1814.       if (*str == ERR) {
  1815.           *str = '\0';
  1816. !         return (ERR);
  1817.       }
  1818.       *str = '\0';
  1819. !     return (OK);
  1820.   }
  1821. --- 46,58 ----
  1822.       register WINDOW *win;
  1823.       register char *str;
  1824.   {
  1825. +     DBUG_ENTER ("wgetstr");
  1826.       while ((*str = wgetch(win)) != ERR && *str != '\n')
  1827.           str++;
  1828.       if (*str == ERR) {
  1829.           *str = '\0';
  1830. !         DBUG_RETURN (ERR);
  1831.       }
  1832.       *str = '\0';
  1833. !     DBUG_RETURN (OK);
  1834.   }
  1835. diff -rc --new-file libcurses-8.3/id_subwins.c /gnu/src/amiga/libcurses-8.3/id_subwins.c
  1836. *** libcurses-8.3/id_subwins.c    Fri Jun  4 17:48:32 1993
  1837. --- /gnu/src/amiga/libcurses-8.3/id_subwins.c    Wed Jan 11 16:50:14 1995
  1838. ***************
  1839. *** 48,53 ****
  1840. --- 48,54 ----
  1841.       register WINDOW *win;
  1842.       register int oy, realy, y;
  1843.   
  1844. +     DBUG_ENTER ("__id_subwins");
  1845.       realy = orig->begy + orig->cury;
  1846.       for (win = orig->nextp; win != orig; win = win->nextp) {
  1847.           /*
  1848. ***************
  1849. *** 62,65 ****
  1850. --- 63,67 ----
  1851.               win->lines[y]->line = 
  1852.                   &orig->lines[oy]->line[win->ch_off];
  1853.       }
  1854. +     DBUG_VOID_RETURN;
  1855.   }
  1856. diff -rc --new-file libcurses-8.3/idlok.c /gnu/src/amiga/libcurses-8.3/idlok.c
  1857. *** libcurses-8.3/idlok.c    Fri Jun  4 17:48:36 1993
  1858. --- /gnu/src/amiga/libcurses-8.3/idlok.c    Wed Jan 11 16:50:40 1995
  1859. ***************
  1860. *** 47,54 ****
  1861. --- 47,56 ----
  1862.       WINDOW *win;
  1863.       int bf;
  1864.   {
  1865. +     DBUG_ENTER ("idlok");
  1866.       if (bf)
  1867.           win->flags |= __IDLINE;
  1868.       else
  1869.           win->flags &= ~__IDLINE;
  1870. +     DBUG_VOID_RETURN;
  1871.   }
  1872. diff -rc --new-file libcurses-8.3/initscr.c /gnu/src/amiga/libcurses-8.3/initscr.c
  1873. *** libcurses-8.3/initscr.c    Mon Jun  7 01:09:16 1993
  1874. --- /gnu/src/amiga/libcurses-8.3/initscr.c    Wed Jan 11 19:19:34 1995
  1875. ***************
  1876. *** 48,61 ****
  1877.   {
  1878.       register char *sp;
  1879.   
  1880. ! #ifdef DEBUG
  1881. !     __CTRACE("initscr\n");
  1882. ! #endif
  1883.       __echoit = 1;
  1884.           __pfast = __rawmode = __noqch = 0;
  1885.   
  1886.       if (gettmode() == ERR)
  1887. !         return (NULL);
  1888.   
  1889.       /*
  1890.        * If My_term is set, or can't find a terminal in the environment,
  1891. --- 48,63 ----
  1892.   {
  1893.       register char *sp;
  1894.   
  1895. !     DBUG_ENTER ("initscr");
  1896. !     DBUG_PRINT ("setup", ("initialize the current and standard screen"));
  1897. !     sp = getenv ("DBUG_CURSES");
  1898. !     if (sp != NULL) DBUG_PUSH (sp);
  1899.       __echoit = 1;
  1900.           __pfast = __rawmode = __noqch = 0;
  1901.   
  1902.       if (gettmode() == ERR)
  1903. !         DBUG_RETURN (NULL);
  1904.   
  1905.       /*
  1906.        * If My_term is set, or can't find a terminal in the environment,
  1907. ***************
  1908. *** 63,94 ****
  1909.        */
  1910.       if (My_term || (sp = getenv("TERM")) == NULL)
  1911.           sp = Def_term;
  1912.       if (setterm(sp) == ERR)
  1913. !         return (NULL);
  1914.   
  1915.       /* Need either homing or cursor motion for refreshes */
  1916.       if (!HO && !CM) 
  1917. !         return (NULL);
  1918.   
  1919.       if (curscr != NULL)
  1920.           delwin(curscr);
  1921.       if ((curscr = newwin(LINES, COLS, 0, 0)) == ERR)
  1922. !         return (NULL);
  1923.       clearok(curscr, 1);
  1924.   
  1925.       if (stdscr != NULL)
  1926.           delwin(stdscr);
  1927.       if ((stdscr = newwin(LINES, COLS, 0, 0)) == ERR) {
  1928.           delwin(curscr);
  1929. !         return (NULL);
  1930.       }
  1931.   
  1932.       __set_stophandler();
  1933.   
  1934. - #ifdef DEBUG
  1935. -     __CTRACE("initscr: LINES = %d, COLS = %d\n", LINES, COLS);
  1936. - #endif
  1937.       __startwin();
  1938.   
  1939. !     return (stdscr);
  1940.   }
  1941. --- 65,94 ----
  1942.        */
  1943.       if (My_term || (sp = getenv("TERM")) == NULL)
  1944.           sp = Def_term;
  1945. +     DBUG_PRINT ("term", ("use TERM '%s'", sp));
  1946.       if (setterm(sp) == ERR)
  1947. !         DBUG_RETURN (NULL);
  1948.   
  1949.       /* Need either homing or cursor motion for refreshes */
  1950.       if (!HO && !CM) 
  1951. !         DBUG_RETURN (NULL);
  1952.   
  1953.       if (curscr != NULL)
  1954.           delwin(curscr);
  1955.       if ((curscr = newwin(LINES, COLS, 0, 0)) == ERR)
  1956. !         DBUG_RETURN (NULL);
  1957.       clearok(curscr, 1);
  1958.   
  1959.       if (stdscr != NULL)
  1960.           delwin(stdscr);
  1961.       if ((stdscr = newwin(LINES, COLS, 0, 0)) == ERR) {
  1962.           delwin(curscr);
  1963. !         DBUG_RETURN (NULL);
  1964.       }
  1965.   
  1966.       __set_stophandler();
  1967.   
  1968.       __startwin();
  1969.   
  1970. !     DBUG_RETURN (stdscr);
  1971.   }
  1972. diff -rc --new-file libcurses-8.3/insch.c /gnu/src/amiga/libcurses-8.3/insch.c
  1973. *** libcurses-8.3/insch.c    Fri Jun  4 17:48:42 1993
  1974. --- /gnu/src/amiga/libcurses-8.3/insch.c    Wed Jan 11 16:51:36 1995
  1975. ***************
  1976. *** 50,55 ****
  1977. --- 50,56 ----
  1978.   
  1979.       register __LDATA *end, *temp1, *temp2;
  1980.   
  1981. +     DBUG_ENTER ("winsch");
  1982.       end = &win->lines[win->cury]->line[win->curx];
  1983.       temp1 = &win->lines[win->cury]->line[win->maxx - 1];
  1984.       temp2 = temp1 - 1;
  1985. ***************
  1986. *** 68,73 ****
  1987.               scroll(win);
  1988.               win->cury--;
  1989.           } else
  1990. !             return (ERR);
  1991. !     return (OK);
  1992.   }
  1993. --- 69,74 ----
  1994.               scroll(win);
  1995.               win->cury--;
  1996.           } else
  1997. !             DBUG_RETURN (ERR);
  1998. !     DBUG_RETURN (OK);
  1999.   }
  2000. diff -rc --new-file libcurses-8.3/insertln.c /gnu/src/amiga/libcurses-8.3/insertln.c
  2001. *** libcurses-8.3/insertln.c    Fri Jun  4 17:48:44 1993
  2002. --- /gnu/src/amiga/libcurses-8.3/insertln.c    Wed Jan 11 16:52:04 1995
  2003. ***************
  2004. *** 50,58 ****
  2005.       register int y, i;
  2006.       register __LINE *temp;
  2007.   
  2008. ! #ifdef DEBUG
  2009. !     __CTRACE("insertln: (%0.2o)\n", win);
  2010. ! #endif
  2011.       if (win->orig == NULL)
  2012.           temp = win->lines[win->maxy - 1];
  2013.       for (y = win->maxy - 1; y > win->cury; --y) {
  2014. --- 50,57 ----
  2015.       register int y, i;
  2016.       register __LINE *temp;
  2017.   
  2018. !     DBUG_ENTER ("winsert");
  2019. !     DBUG_PRINT ("winsertln", ("(%0.2o)", win));
  2020.       if (win->orig == NULL)
  2021.           temp = win->lines[win->maxy - 1];
  2022.       for (y = win->maxy - 1; y > win->cury; --y) {
  2023. ***************
  2024. *** 77,81 ****
  2025.       __touchline(win, y, 0, win->maxx - 1, 0);
  2026.       if (win->orig == NULL)
  2027.           __id_subwins(win);
  2028. !     return (OK);
  2029.   }
  2030. --- 76,80 ----
  2031.       __touchline(win, y, 0, win->maxx - 1, 0);
  2032.       if (win->orig == NULL)
  2033.           __id_subwins(win);
  2034. !     DBUG_RETURN (OK);
  2035.   }
  2036. diff -rc --new-file libcurses-8.3/install.sh /gnu/src/amiga/libcurses-8.3/install.sh
  2037. *** libcurses-8.3/install.sh    Thu Jan  1 00:00:00 1970
  2038. --- /gnu/src/amiga/libcurses-8.3/install.sh    Wed Jan 11 09:35:54 1995
  2039. ***************
  2040. *** 0 ****
  2041. --- 1,119 ----
  2042. + #!/bin/sh
  2043. + #
  2044. + # install - install a program, script, or datafile
  2045. + # This comes from X11R5; it is not part of GNU.
  2046. + #
  2047. + # $XConsortium: install.sh,v 1.2 89/12/18 14:47:22 jim Exp $
  2048. + #
  2049. + # This script is compatible with the BSD install script, but was written
  2050. + # from scratch.
  2051. + #
  2052. + # set DOITPROG to echo to test this script
  2053. + # Don't use :- since 4.3BSD and earlier shells don't like it.
  2054. + doit="${DOITPROG-}"
  2055. + # put in absolute paths if you don't have them in your path; or use env. vars.
  2056. + mvprog="${MVPROG-mv}"
  2057. + cpprog="${CPPROG-cp}"
  2058. + chmodprog="${CHMODPROG-chmod}"
  2059. + chownprog="${CHOWNPROG-chown}"
  2060. + chgrpprog="${CHGRPPROG-chgrp}"
  2061. + stripprog="${STRIPPROG-strip}"
  2062. + rmprog="${RMPROG-rm}"
  2063. + instcmd="$mvprog"
  2064. + chmodcmd=""
  2065. + chowncmd=""
  2066. + chgrpcmd=""
  2067. + stripcmd=""
  2068. + rmcmd="$rmprog -f"
  2069. + mvcmd="$mvprog"
  2070. + src=""
  2071. + dst=""
  2072. + while [ x"$1" != x ]; do
  2073. +     case $1 in
  2074. +     -c) instcmd="$cpprog"
  2075. +         shift
  2076. +         continue;;
  2077. +     -m) chmodcmd="$chmodprog $2"
  2078. +         shift
  2079. +         shift
  2080. +         continue;;
  2081. +     -o) chowncmd="$chownprog $2"
  2082. +         shift
  2083. +         shift
  2084. +         continue;;
  2085. +     -g) chgrpcmd="$chgrpprog $2"
  2086. +         shift
  2087. +         shift
  2088. +         continue;;
  2089. +     -s) stripcmd="$stripprog"
  2090. +         shift
  2091. +         continue;;
  2092. +     *)  if [ x"$src" = x ]
  2093. +         then
  2094. +         src=$1
  2095. +         else
  2096. +         dst=$1
  2097. +         fi
  2098. +         shift
  2099. +         continue;;
  2100. +     esac
  2101. + done
  2102. + if [ x"$src" = x ]
  2103. + then
  2104. +     echo "install:  no input file specified"
  2105. +     exit 1
  2106. + fi
  2107. + if [ x"$dst" = x ]
  2108. + then
  2109. +     echo "install:  no destination specified"
  2110. +     exit 1
  2111. + fi
  2112. + # If destination is a directory, append the input filename; if your system
  2113. + # does not like double slashes in filenames, you may need to add some logic
  2114. + if [ -d $dst ]
  2115. + then
  2116. +     dst="$dst"/`basename $src`
  2117. + fi
  2118. + # Make a temp file name in the proper directory.
  2119. + dstdir=`dirname $dst`
  2120. + dsttmp=$dstdir/#inst.$$#
  2121. + # Move or copy the file name to the temp name
  2122. + $doit $instcmd $src $dsttmp
  2123. + # and set any options; do chmod last to preserve setuid bits
  2124. + if [ x"$chowncmd" != x ]; then $doit $chowncmd $dsttmp; fi
  2125. + if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dsttmp; fi
  2126. + if [ x"$stripcmd" != x ]; then $doit $stripcmd $dsttmp; fi
  2127. + if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dsttmp; fi
  2128. + # Now rename the file to the real destination.
  2129. + $doit $rmcmd $dst
  2130. + $doit $mvcmd $dsttmp $dst
  2131. + exit 0
  2132. diff -rc --new-file libcurses-8.3/longname.c /gnu/src/amiga/libcurses-8.3/longname.c
  2133. *** libcurses-8.3/longname.c    Fri Jun  4 17:48:48 1993
  2134. --- /gnu/src/amiga/libcurses-8.3/longname.c    Wed Jan 11 17:33:59 1995
  2135. ***************
  2136. *** 35,40 ****
  2137. --- 35,43 ----
  2138.   static char sccsid[] = "@(#)longname.c    8.1 (Berkeley) 6/4/93";
  2139.   #endif    /* not lint */
  2140.   
  2141. + #include <stdio.h>
  2142. + #include <dbug.h>
  2143.   /*
  2144.    * longname --
  2145.    *    Fill in "def" with the long name of the terminal.
  2146. ***************
  2147. *** 45,50 ****
  2148. --- 48,54 ----
  2149.   {
  2150.       register char *cp;
  2151.   
  2152. +     DBUG_ENTER ("longname");
  2153.       while (*bp && *bp != ':' && *bp != '|')
  2154.           bp++;
  2155.       if (*bp == '|') {
  2156. ***************
  2157. *** 52,56 ****
  2158.               *cp++ = *bp++;
  2159.           *cp = '\0';
  2160.       }
  2161. !     return (def);
  2162.   }
  2163. --- 56,60 ----
  2164.               *cp++ = *bp++;
  2165.           *cp = '\0';
  2166.       }
  2167. !     DBUG_RETURN (def);
  2168.   }
  2169. diff -rc --new-file libcurses-8.3/move.c /gnu/src/amiga/libcurses-8.3/move.c
  2170. *** libcurses-8.3/move.c    Fri Jun  4 17:48:50 1993
  2171. --- /gnu/src/amiga/libcurses-8.3/move.c    Wed Jan 11 16:16:27 1995
  2172. ***************
  2173. *** 47,62 ****
  2174.       register int y, x;
  2175.   {
  2176.   
  2177. ! #ifdef DEBUG
  2178. !     __CTRACE("wmove: (%d, %d)\n", y, x);
  2179. ! #endif
  2180.       if (x < 0 || y < 0)
  2181. !         return (ERR);
  2182.       if (x >= win->maxx || y >= win->maxy)
  2183. !         return (ERR);
  2184.       win->curx = x;
  2185.       win->lines[win->cury]->flags &= ~__ISPASTEOL;
  2186.       win->cury = y;
  2187.       win->lines[y]->flags &= ~__ISPASTEOL;
  2188. !     return (OK);
  2189.   }
  2190. --- 47,64 ----
  2191.       register int y, x;
  2192.   {
  2193.   
  2194. !     DBUG_ENTER ("wmove");
  2195. !     DBUG_PRINT ("wmove", ("move cursor to (%d, %d); max is (%d, %d)",
  2196. !                   y, x, win->maxy, win->maxx));
  2197.       if (x < 0 || y < 0)
  2198. !         DBUG_RETURN (ERR);
  2199.       if (x >= win->maxx || y >= win->maxy)
  2200. !         DBUG_RETURN (ERR);
  2201.       win->curx = x;
  2202.       win->lines[win->cury]->flags &= ~__ISPASTEOL;
  2203.       win->cury = y;
  2204.       win->lines[y]->flags &= ~__ISPASTEOL;
  2205. !     DBUG_PRINT ("wmove", ("current position is (%d, %d)",
  2206. !                   win->cury, win->curx));
  2207. !     DBUG_RETURN (OK);
  2208.   }
  2209. diff -rc --new-file libcurses-8.3/mvwin.c /gnu/src/amiga/libcurses-8.3/mvwin.c
  2210. *** libcurses-8.3/mvwin.c    Fri Jun  4 17:48:56 1993
  2211. --- /gnu/src/amiga/libcurses-8.3/mvwin.c    Wed Jan 11 16:53:04 1995
  2212. ***************
  2213. *** 49,56 ****
  2214.       register WINDOW *orig;
  2215.       register int dy, dx;
  2216.   
  2217.       if (by + win->maxy > LINES || bx + win->maxx > COLS)
  2218. !         return (ERR);
  2219.       dy = by - win->begy;
  2220.       dx = bx - win->begx;
  2221.       orig = win->orig;
  2222. --- 49,57 ----
  2223.       register WINDOW *orig;
  2224.       register int dy, dx;
  2225.   
  2226. +     DBUG_ENTER ("mvwin");
  2227.       if (by + win->maxy > LINES || bx + win->maxx > COLS)
  2228. !         DBUG_RETURN (ERR);
  2229.       dy = by - win->begy;
  2230.       dx = bx - win->begx;
  2231.       orig = win->orig;
  2232. ***************
  2233. *** 64,77 ****
  2234.           } while (win != orig);
  2235.       } else {
  2236.           if (by < orig->begy || win->maxy + dy > orig->maxy)
  2237. !             return (ERR);
  2238.           if (bx < orig->begx || win->maxx + dx > orig->maxx)
  2239. !             return (ERR);
  2240.           win->begy = by;
  2241.           win->begx = bx;
  2242.           __swflags(win);
  2243.           __set_subwin(orig, win);
  2244.       }
  2245.       __touchwin(win);
  2246. !     return (OK);
  2247.   }
  2248. --- 65,78 ----
  2249.           } while (win != orig);
  2250.       } else {
  2251.           if (by < orig->begy || win->maxy + dy > orig->maxy)
  2252. !             DBUG_RETURN (ERR);
  2253.           if (bx < orig->begx || win->maxx + dx > orig->maxx)
  2254. !             DBUG_RETURN (ERR);
  2255.           win->begy = by;
  2256.           win->begx = bx;
  2257.           __swflags(win);
  2258.           __set_subwin(orig, win);
  2259.       }
  2260.       __touchwin(win);
  2261. !     DBUG_RETURN (OK);
  2262.   }
  2263. diff -rc --new-file libcurses-8.3/newwin.c /gnu/src/amiga/libcurses-8.3/newwin.c
  2264. *** libcurses-8.3/newwin.c    Tue Jul 20 08:24:14 1993
  2265. --- /gnu/src/amiga/libcurses-8.3/newwin.c    Wed Jan 11 18:52:01 1995
  2266. ***************
  2267. *** 57,77 ****
  2268.       register int  i, j;
  2269.       register __LDATA *sp;
  2270.   
  2271.       if (nl == 0)
  2272.           nl = LINES - by;
  2273.       if (nc == 0)
  2274.           nc = COLS - bx;
  2275.   
  2276.       if ((win = __makenew(nl, nc, by, bx, 0)) == NULL)
  2277. !         return (NULL);
  2278.   
  2279.       win->nextp = win;
  2280.       win->ch_off = 0;
  2281.       win->orig = NULL;
  2282.   
  2283. ! #ifdef DEBUG
  2284. !     __CTRACE("newwin: win->ch_off = %d\n", win->ch_off);
  2285. ! #endif
  2286.   
  2287.       for (i = 0; i < nl; i++) {
  2288.           lp = win->lines[i];
  2289. --- 57,78 ----
  2290.       register int  i, j;
  2291.       register __LDATA *sp;
  2292.   
  2293. +     DBUG_ENTER ("newwin");
  2294. +     DBUG_PRINT ("newwin", ("new window %d lines, %d cols at (%d,%d)",
  2295. +                    nl, nc, by, bx));
  2296.       if (nl == 0)
  2297.           nl = LINES - by;
  2298.       if (nc == 0)
  2299.           nc = COLS - bx;
  2300.   
  2301.       if ((win = __makenew(nl, nc, by, bx, 0)) == NULL)
  2302. !         DBUG_RETURN (NULL);
  2303.   
  2304.       win->nextp = win;
  2305.       win->ch_off = 0;
  2306.       win->orig = NULL;
  2307.   
  2308. !     DBUG_PRINT ("newwin", ("win->ch_off = %d", win->ch_off));
  2309.   
  2310.       for (i = 0; i < nl; i++) {
  2311.           lp = win->lines[i];
  2312. ***************
  2313. *** 82,88 ****
  2314.           }
  2315.           lp->hash = __hash((char *) lp->line, nc * __LDATASIZE);
  2316.       }
  2317. !     return (win);
  2318.   }
  2319.   
  2320.   WINDOW *
  2321. --- 83,89 ----
  2322.           }
  2323.           lp->hash = __hash((char *) lp->line, nc * __LDATASIZE);
  2324.       }
  2325. !     DBUG_RETURN (win);
  2326.   }
  2327.   
  2328.   WINDOW *
  2329. ***************
  2330. *** 94,113 ****
  2331.       __LINE *lp;
  2332.       register WINDOW *win;
  2333.   
  2334.       /* Make sure window fits inside the original one. */
  2335. ! #ifdef    DEBUG
  2336. !     __CTRACE("subwin: (%0.2o, %d, %d, %d, %d)\n", orig, nl, nc, by, bx);
  2337. ! #endif
  2338.       if (by < orig->begy || bx < orig->begx
  2339.           || by + nl > orig->maxy + orig->begy
  2340.           || bx + nc > orig->maxx + orig->begx)
  2341. !         return (NULL);
  2342.       if (nl == 0)
  2343.           nl = orig->maxy + orig->begy - by;
  2344.       if (nc == 0)
  2345.           nc = orig->maxx + orig->begx - bx;
  2346.       if ((win = __makenew(nl, nc, by, bx, 1)) == NULL)
  2347. !         return (NULL);
  2348.       win->nextp = orig->nextp;
  2349.       orig->nextp = win;
  2350.       win->orig = orig;
  2351. --- 95,113 ----
  2352.       __LINE *lp;
  2353.       register WINDOW *win;
  2354.   
  2355. +     DBUG_ENTER ("subwin");
  2356.       /* Make sure window fits inside the original one. */
  2357. !     DBUG_PRINT ("subwin", ("(%0.2o, %d, %d, %d, %d)", orig, nl, nc, by, bx));
  2358.       if (by < orig->begy || bx < orig->begx
  2359.           || by + nl > orig->maxy + orig->begy
  2360.           || bx + nc > orig->maxx + orig->begx)
  2361. !         DBUG_RETURN (NULL);
  2362.       if (nl == 0)
  2363.           nl = orig->maxy + orig->begy - by;
  2364.       if (nc == 0)
  2365.           nc = orig->maxx + orig->begx - bx;
  2366.       if ((win = __makenew(nl, nc, by, bx, 1)) == NULL)
  2367. !         DBUG_RETURN (NULL);
  2368.       win->nextp = orig->nextp;
  2369.       orig->nextp = win;
  2370.       win->orig = orig;
  2371. ***************
  2372. *** 116,122 ****
  2373.       for (lp = win->lspace, i = 0; i < win->maxy; i++, lp++)
  2374.           lp->flags = 0;
  2375.       __set_subwin(orig, win);
  2376. !     return (win);
  2377.   }
  2378.   
  2379.   /*
  2380. --- 116,122 ----
  2381.       for (lp = win->lspace, i = 0; i < win->maxy; i++, lp++)
  2382.           lp->flags = 0;
  2383.       __set_subwin(orig, win);
  2384. !     DBUG_RETURN (win);
  2385.   }
  2386.   
  2387.   /*
  2388. ***************
  2389. *** 129,134 ****
  2390. --- 129,135 ----
  2391.       int i;
  2392.       __LINE *lp, *olp;
  2393.   
  2394. +     DBUG_ENTER ("__set_subwin");
  2395.       win->ch_off = win->begx - orig->begx;
  2396.       /*  Point line pointers to line space. */
  2397.       for (lp = win->lspace, i = 0; i < win->maxy; i++, lp++) {
  2398. ***************
  2399. *** 140,148 ****
  2400.           lp->hash = __hash((char *) lp->line, win->maxx * __LDATASIZE);
  2401.       }
  2402.   
  2403. ! #ifdef DEBUG
  2404. !     __CTRACE("__set_subwin: win->ch_off = %d\n", win->ch_off);
  2405. ! #endif
  2406.   }
  2407.   
  2408.   /*
  2409. --- 141,148 ----
  2410.           lp->hash = __hash((char *) lp->line, win->maxx * __LDATASIZE);
  2411.       }
  2412.   
  2413. !     DBUG_PRINT ("set_subwin", ("win->ch_off = %d", win->ch_off));
  2414. !     DBUG_VOID_RETURN;
  2415.   }
  2416.   
  2417.   /*
  2418. ***************
  2419. *** 158,184 ****
  2420.       register __LINE *lp;
  2421.       int i;
  2422.       
  2423. ! #ifdef    DEBUG
  2424. !     __CTRACE("makenew: (%d, %d, %d, %d)\n", nl, nc, by, bx);
  2425. ! #endif
  2426.       if ((win = malloc(sizeof(*win))) == NULL)
  2427. !         return (NULL);
  2428. ! #ifdef DEBUG
  2429. !     __CTRACE("makenew: nl = %d\n", nl);
  2430. ! #endif
  2431.       /* 
  2432.        * Set up line pointer array and line space.
  2433.        */
  2434.       if ((win->lines = malloc (nl * sizeof(__LINE *))) == NULL) {
  2435.           free(win);
  2436. !         return NULL;
  2437.       }
  2438.       if ((win->lspace = malloc (nl * sizeof(__LINE))) == NULL) {
  2439.           free (win);
  2440.           free (win->lines);
  2441. !         return NULL;
  2442.       }
  2443.   
  2444.       /* Don't allocate window and line space if it's a subwindow */
  2445. --- 158,179 ----
  2446.       register __LINE *lp;
  2447.       int i;
  2448.       
  2449. !     DBUG_ENTER ("__makenew");
  2450. !     DBUG_PRINT ("window", ("set up new window buffer, %d lines by %d cols at (%d,%d)",
  2451. !                    nl, nc, by, bx));
  2452.       if ((win = malloc(sizeof(*win))) == NULL)
  2453. !         DBUG_RETURN (NULL);
  2454.       /* 
  2455.        * Set up line pointer array and line space.
  2456.        */
  2457.       if ((win->lines = malloc (nl * sizeof(__LINE *))) == NULL) {
  2458.           free(win);
  2459. !         DBUG_RETURN (NULL);
  2460.       }
  2461.       if ((win->lspace = malloc (nl * sizeof(__LINE))) == NULL) {
  2462.           free (win);
  2463.           free (win->lines);
  2464. !         DBUG_RETURN (NULL);
  2465.       }
  2466.   
  2467.       /* Don't allocate window and line space if it's a subwindow */
  2468. ***************
  2469. *** 191,197 ****
  2470.               free(win->lines);
  2471.               free(win->lspace);
  2472.               free(win);
  2473. !             return NULL;
  2474.           }
  2475.           
  2476.           /*
  2477. --- 186,192 ----
  2478.               free(win->lines);
  2479.               free(win->lspace);
  2480.               free(win);
  2481. !             DBUG_RETURN (NULL);
  2482.           }
  2483.           
  2484.           /*
  2485. ***************
  2486. *** 207,215 ****
  2487.               lp->lastch = 0;
  2488.           }
  2489.       }
  2490. - #ifdef DEBUG
  2491. -     __CTRACE("makenew: nc = %d\n", nc);
  2492. - #endif
  2493.       win->cury = win->curx = 0;
  2494.       win->maxy = nl;
  2495.       win->maxx = nc;
  2496. --- 202,207 ----
  2497. ***************
  2498. *** 218,237 ****
  2499.       win->begx = bx;
  2500.       win->flags = 0;
  2501.       __swflags(win);
  2502. ! #ifdef DEBUG
  2503. !     __CTRACE("makenew: win->flags = %0.2o\n", win->flags);
  2504. !     __CTRACE("makenew: win->maxy = %d\n", win->maxy);
  2505. !     __CTRACE("makenew: win->maxx = %d\n", win->maxx);
  2506. !     __CTRACE("makenew: win->begy = %d\n", win->begy);
  2507. !     __CTRACE("makenew: win->begx = %d\n", win->begx);
  2508. ! #endif
  2509. !     return (win);
  2510.   }
  2511.   
  2512.   void
  2513.   __swflags(win)
  2514.       register WINDOW *win;
  2515.   {
  2516.       win->flags &= 
  2517.           ~(__ENDLINE | __FULLLINE | __FULLWIN | __SCROLLWIN | __LEAVEOK);
  2518.       if (win->begx + win->maxx == COLS) {
  2519. --- 210,227 ----
  2520.       win->begx = bx;
  2521.       win->flags = 0;
  2522.       __swflags(win);
  2523. !     DBUG_PRINT ("makenew", ("win->flags = %0.2o", win->flags));
  2524. !     DBUG_PRINT ("window", ("window is (%d,%d) to (%d,%d) inclusive",
  2525. !                    win->begy, win->begx, win->begy + win->maxy - 1,
  2526. !                    win->begx + win->maxx - 1));
  2527. !     DBUG_RETURN (win);
  2528.   }
  2529.   
  2530.   void
  2531.   __swflags(win)
  2532.       register WINDOW *win;
  2533.   {
  2534. +     DBUG_ENTER ("__swflags");
  2535.       win->flags &= 
  2536.           ~(__ENDLINE | __FULLLINE | __FULLWIN | __SCROLLWIN | __LEAVEOK);
  2537.       if (win->begx + win->maxx == COLS) {
  2538. ***************
  2539. *** 245,248 ****
  2540. --- 235,239 ----
  2541.           if (win->begy + win->maxy == LINES)
  2542.               win->flags |= __SCROLLWIN;
  2543.       }
  2544. +     DBUG_VOID_RETURN;
  2545.   }
  2546. diff -rc --new-file libcurses-8.3/overlay.c /gnu/src/amiga/libcurses-8.3/overlay.c
  2547. *** libcurses-8.3/overlay.c    Fri Jun  4 17:49:02 1993
  2548. --- /gnu/src/amiga/libcurses-8.3/overlay.c    Wed Jan 11 16:55:39 1995
  2549. ***************
  2550. *** 50,68 ****
  2551.       register int x, y, y1, y2, endy, endx, starty, startx;
  2552.       register __LDATA *sp, *end;
  2553.   
  2554. ! #ifdef DEBUG
  2555. !     __CTRACE("overlay: (%0.2o, %0.2o);\n", win1, win2);
  2556. ! #endif
  2557.       starty = max(win1->begy, win2->begy);
  2558.       startx = max(win1->begx, win2->begx);
  2559.       endy = min(win1->maxy + win1->begy, win2->maxy + win2->begx);
  2560.       endx = min(win1->maxx + win1->begx, win2->maxx + win2->begx);
  2561. ! #ifdef DEBUG
  2562. !     __CTRACE("overlay: from (%d,%d) to (%d,%d)\n",
  2563. !         starty, startx, endy, endx);
  2564. ! #endif
  2565.       if (starty >= endy || startx >= endx)
  2566. !         return (OK);
  2567.       y1 = starty - win1->begy;
  2568.       y2 = starty - win2->begy;
  2569.       for (y = starty; y < endy; y++, y1++, y2++) {
  2570. --- 50,65 ----
  2571.       register int x, y, y1, y2, endy, endx, starty, startx;
  2572.       register __LDATA *sp, *end;
  2573.   
  2574. !     DBUG_ENTER ("overlay");
  2575. !     DBUG_PRINT ("overlay", ("(%0.2o, %0.2o)", win1, win2));
  2576.       starty = max(win1->begy, win2->begy);
  2577.       startx = max(win1->begx, win2->begx);
  2578.       endy = min(win1->maxy + win1->begy, win2->maxy + win2->begx);
  2579.       endx = min(win1->maxx + win1->begx, win2->maxx + win2->begx);
  2580. !     DBUG_PRINT ("overlay", ("from (%d,%d) to (%d,%d)",
  2581. !         starty, startx, endy, endx));
  2582.       if (starty >= endy || startx >= endx)
  2583. !         DBUG_RETURN (OK);
  2584.       y1 = starty - win1->begy;
  2585.       y2 = starty - win2->begy;
  2586.       for (y = starty; y < endy; y++, y1++, y2++) {
  2587. ***************
  2588. *** 77,81 ****
  2589.               x++;
  2590.           }
  2591.       }
  2592. !     return (OK);
  2593.   }
  2594. --- 74,78 ----
  2595.               x++;
  2596.           }
  2597.       }
  2598. !     DBUG_RETURN (OK);
  2599.   }
  2600. diff -rc --new-file libcurses-8.3/overwrite.c /gnu/src/amiga/libcurses-8.3/overwrite.c
  2601. *** libcurses-8.3/overwrite.c    Fri Jun  4 17:49:08 1993
  2602. --- /gnu/src/amiga/libcurses-8.3/overwrite.c    Wed Jan 11 16:56:10 1995
  2603. ***************
  2604. *** 49,67 ****
  2605.   {
  2606.       register int x, y, endy, endx, starty, startx;
  2607.   
  2608. ! #ifdef DEBUG
  2609. !     __CTRACE("overwrite: (%0.2o, %0.2o);\n", win1, win2);
  2610. ! #endif
  2611.       starty = max(win1->begy, win2->begy);
  2612.       startx = max(win1->begx, win2->begx);
  2613.       endy = min(win1->maxy + win1->begy, win2->maxy + win2->begx);
  2614.       endx = min(win1->maxx + win1->begx, win2->maxx + win2->begx);
  2615.       if (starty >= endy || startx >= endx)
  2616. !         return (OK);
  2617. ! #ifdef DEBUG
  2618. !     __CTRACE("overwrite: from (%d, %d) to (%d, %d)\n",
  2619. !         starty, startx, endy, endx);
  2620. ! #endif
  2621.       x = endx - startx;
  2622.       for (y = starty; y < endy; y++) {
  2623.           (void)memcpy(
  2624. --- 49,64 ----
  2625.   {
  2626.       register int x, y, endy, endx, starty, startx;
  2627.   
  2628. !     DBUG_ENTER ("overwrite");
  2629. !     DBUG_PRINT ("overwrite", ("(%0.2o, %0.2o)", win1, win2));
  2630.       starty = max(win1->begy, win2->begy);
  2631.       startx = max(win1->begx, win2->begx);
  2632.       endy = min(win1->maxy + win1->begy, win2->maxy + win2->begx);
  2633.       endx = min(win1->maxx + win1->begx, win2->maxx + win2->begx);
  2634.       if (starty >= endy || startx >= endx)
  2635. !         DBUG_RETURN (OK);
  2636. !     DBUG_PRINT ("overwrite", ("from (%d, %d) to (%d, %d)",
  2637. !         starty, startx, endy, endx));
  2638.       x = endx - startx;
  2639.       for (y = starty; y < endy; y++) {
  2640.           (void)memcpy(
  2641. ***************
  2642. *** 71,75 ****
  2643.           __touchline(win2, y, startx - win2->begx, endx - win2->begx,
  2644.               0);
  2645.       }
  2646. !     return (OK);
  2647.   }
  2648. --- 68,72 ----
  2649.           __touchline(win2, y, startx - win2->begx, endx - win2->begx,
  2650.               0);
  2651.       }
  2652. !     DBUG_RETURN (OK);
  2653.   }
  2654. diff -rc --new-file libcurses-8.3/printw.c /gnu/src/amiga/libcurses-8.3/printw.c
  2655. *** libcurses-8.3/printw.c    Sun Jan  2 14:26:50 1994
  2656. --- /gnu/src/amiga/libcurses-8.3/printw.c    Wed Jan 11 16:59:12 1995
  2657. ***************
  2658. *** 68,73 ****
  2659. --- 68,74 ----
  2660.       va_list ap;
  2661.       int ret;
  2662.   
  2663. +     DBUG_ENTER ("printw");
  2664.   #ifdef __STDC__
  2665.       va_start(ap, fmt);
  2666.   #else
  2667. ***************
  2668. *** 75,81 ****
  2669.   #endif
  2670.       ret = vwprintw(stdscr, fmt, ap);
  2671.       va_end(ap);
  2672. !     return (ret);
  2673.   }
  2674.   
  2675.   /*
  2676. --- 76,82 ----
  2677.   #endif
  2678.       ret = vwprintw(stdscr, fmt, ap);
  2679.       va_end(ap);
  2680. !     DBUG_RETURN (ret);
  2681.   }
  2682.   
  2683.   /*
  2684. ***************
  2685. *** 95,100 ****
  2686. --- 96,102 ----
  2687.       va_list ap;
  2688.       int ret;
  2689.   
  2690. +     DBUG_ENTER ("wprintw");
  2691.   #ifdef __STDC__
  2692.       va_start(ap, fmt);
  2693.   #else
  2694. ***************
  2695. *** 102,108 ****
  2696.   #endif
  2697.       ret = vwprintw(win, fmt, ap);
  2698.       va_end(ap);
  2699. !     return (ret);
  2700.   }
  2701.   
  2702.   /*
  2703. --- 104,110 ----
  2704.   #endif
  2705.       ret = vwprintw(win, fmt, ap);
  2706.       va_end(ap);
  2707. !     DBUG_RETURN (ret);
  2708.   }
  2709.   
  2710.   /*
  2711. ***************
  2712. *** 123,138 ****
  2713.       va_list ap;
  2714.       int ret;
  2715.   
  2716.   #ifdef __STDC__
  2717.       va_start(ap, fmt);
  2718.   #else
  2719.       va_start(ap);
  2720.   #endif
  2721.       if (move(y, x) != OK)
  2722. !         return (ERR);
  2723.       ret = vwprintw(stdscr, fmt, ap);
  2724.       va_end(ap);
  2725. !     return (ret);
  2726.   }
  2727.   
  2728.   int
  2729. --- 125,141 ----
  2730.       va_list ap;
  2731.       int ret;
  2732.   
  2733. +     DBUG_ENTER ("mvprintw");
  2734.   #ifdef __STDC__
  2735.       va_start(ap, fmt);
  2736.   #else
  2737.       va_start(ap);
  2738.   #endif
  2739.       if (move(y, x) != OK)
  2740. !         DBUG_RETURN (ERR);
  2741.       ret = vwprintw(stdscr, fmt, ap);
  2742.       va_end(ap);
  2743. !     DBUG_RETURN (ret);
  2744.   }
  2745.   
  2746.   int
  2747. ***************
  2748. *** 150,166 ****
  2749.       va_list ap;
  2750.       int ret;
  2751.   
  2752.   #ifdef __STDC__
  2753.       va_start(ap, fmt);
  2754.   #else
  2755.       va_start(ap);
  2756.   #endif
  2757.       if (wmove(win, y, x) != OK)
  2758. !         return (ERR);
  2759.   
  2760.       ret = vwprintw(win, fmt, ap);
  2761.       va_end(ap);
  2762. !     return (ret);
  2763.   }
  2764.   
  2765.   /*
  2766. --- 153,170 ----
  2767.       va_list ap;
  2768.       int ret;
  2769.   
  2770. +     DBUG_ENTER ("mvwprintw");
  2771.   #ifdef __STDC__
  2772.       va_start(ap, fmt);
  2773.   #else
  2774.       va_start(ap);
  2775.   #endif
  2776.       if (wmove(win, y, x) != OK)
  2777. !         DBUG_RETURN (ERR);
  2778.   
  2779.       ret = vwprintw(win, fmt, ap);
  2780.       va_end(ap);
  2781. !     DBUG_RETURN (ret);
  2782.   }
  2783.   
  2784.   /*
  2785. ***************
  2786. *** 175,184 ****
  2787.       register WINDOW *win;
  2788.       register int c;
  2789.   
  2790.       for (c = n, win = cookie; --c >= 0;)
  2791.           if (waddch(win, *buf++) == ERR)
  2792. !             return (-1);
  2793. !     return (n);
  2794.   }
  2795.   
  2796.   /*
  2797. --- 179,189 ----
  2798.       register WINDOW *win;
  2799.       register int c;
  2800.   
  2801. +     DBUG_ENTER ("__winwrite");
  2802.       for (c = n, win = cookie; --c >= 0;)
  2803.           if (waddch(win, *buf++) == ERR)
  2804. !             DBUG_RETURN (-1);
  2805. !     DBUG_RETURN (n);
  2806.   }
  2807.   
  2808.   /*
  2809. ***************
  2810. *** 192,200 ****
  2811.       va_list ap;
  2812.   {
  2813.       FILE *f;
  2814.   
  2815.       if ((f = funopen(win, NULL, __winwrite, NULL, NULL)) == NULL)
  2816. !         return (ERR);
  2817.       (void)vfprintf(f, fmt, ap);
  2818. !     return (fclose(f) ? ERR : OK);
  2819.   }
  2820. --- 197,208 ----
  2821.       va_list ap;
  2822.   {
  2823.       FILE *f;
  2824. +     int ret;
  2825.   
  2826. +     DBUG_ENTER ("vwprintw");
  2827.       if ((f = funopen(win, NULL, __winwrite, NULL, NULL)) == NULL)
  2828. !         DBUG_RETURN (ERR);
  2829.       (void)vfprintf(f, fmt, ap);
  2830. !     ret = fclose(f) ? ERR : OK;
  2831. !     DBUG_RETURN (ret);
  2832.   }
  2833. diff -rc --new-file libcurses-8.3/putchar.c /gnu/src/amiga/libcurses-8.3/putchar.c
  2834. *** libcurses-8.3/putchar.c    Fri Jun  4 17:49:14 1993
  2835. --- /gnu/src/amiga/libcurses-8.3/putchar.c    Wed Jan 11 16:59:46 1995
  2836. ***************
  2837. *** 41,49 ****
  2838.   __cputchar(ch)
  2839.       int ch;
  2840.   {
  2841. ! #ifdef DEBUG
  2842. !     __CTRACE("__cputchar: %s\n", unctrl(ch));
  2843. ! #endif
  2844.       (void)putchar(ch);
  2845.   }
  2846. --- 41,48 ----
  2847.   __cputchar(ch)
  2848.       int ch;
  2849.   {
  2850. !     DBUG_ENTER ("__cputchar");
  2851. !     DBUG_PRINT ("cputchar", ("%s", unctrl(ch)));
  2852.       (void)putchar(ch);
  2853. +     DBUG_VOID_RETURN;
  2854.   }
  2855. diff -rc --new-file libcurses-8.3/refresh.c /gnu/src/amiga/libcurses-8.3/refresh.c
  2856. *** libcurses-8.3/refresh.c    Tue Jul 20 08:24:22 1993
  2857. --- /gnu/src/amiga/libcurses-8.3/refresh.c    Wed Jan 11 18:06:04 1995
  2858. ***************
  2859. *** 48,54 ****
  2860.   
  2861.   /*
  2862.    * wrefresh --
  2863. !  *    Make the current screen look like "win" over the area coverd by
  2864.    *    win.
  2865.    */
  2866.   int
  2867. --- 48,54 ----
  2868.   
  2869.   /*
  2870.    * wrefresh --
  2871. !  *    Make the current screen look like "win" over the area covered by
  2872.    *    win.
  2873.    */
  2874.   int
  2875. ***************
  2876. *** 60,65 ****
  2877. --- 60,72 ----
  2878.       register short wy;
  2879.       int dnum;
  2880.       
  2881. +     DBUG_ENTER ("wrefresh");
  2882. +     DBUG_PRINT ("wrefresh", ("update screen to match window (%d,%d) to (%d,%d)",
  2883. +                  win->begy, win->begx, win->maxy, win->maxx));
  2884. +     DBUG_PRINT ("wrefresh", ("current position in window is (%d,%d)",
  2885. +                  win->cury, win->curx));
  2886. +     DBUG_PRINT ("wrefresh", ("current position in screen is (%d,%d)",
  2887. +                  curscr->cury, curscr->curx));
  2888.       /* Initialize loop parameters. */
  2889.       ly = curscr->cury;
  2890.       lx = curscr->curx;
  2891. ***************
  2892. *** 95,104 ****
  2893.           if (!curwin)
  2894.               werase(curscr);
  2895.       }
  2896. ! #ifdef DEBUG
  2897. !     __CTRACE("wrefresh: (%0.2o): curwin = %d\n", win, curwin);
  2898. !     __CTRACE("wrefresh: \tfirstch\tlastch\n");
  2899. ! #endif
  2900.   
  2901.   #ifndef NOQCH
  2902.       if ((win->flags & __FULLWIN) && !curwin) {
  2903. --- 102,109 ----
  2904.           if (!curwin)
  2905.               werase(curscr);
  2906.       }
  2907. !     DBUG_PRINT ("wrefresh", ("(%0.2o): curwin = %d", win, curwin));
  2908. !     DBUG_PRINT ("wrefresh", ("\tfirstch\tlastch"));
  2909.   
  2910.   #ifndef NOQCH
  2911.       if ((win->flags & __FULLWIN) && !curwin) {
  2912. ***************
  2913. *** 144,158 ****
  2914.   #endif /* DEBUG */
  2915.   
  2916.       for (wy = 0; wy < win->maxy; wy++) {
  2917. ! #ifdef DEBUG
  2918. !         __CTRACE("%d\t%d\t%d\n",
  2919. !             wy, *win->lines[wy]->firstchp, *win->lines[wy]->lastchp);
  2920. ! #endif
  2921.           if (!curwin)
  2922.               curscr->lines[wy]->hash = win->lines[wy]->hash;
  2923.           if (win->lines[wy]->flags & (__ISDIRTY | __FORCEPAINT)) {
  2924.               if (makech(win, wy) == ERR)
  2925. !                 return (ERR);
  2926.               else {
  2927.                   if (*win->lines[wy]->firstchp >= win->ch_off)
  2928.                       *win->lines[wy]->firstchp = win->maxx +
  2929. --- 149,162 ----
  2930.   #endif /* DEBUG */
  2931.   
  2932.       for (wy = 0; wy < win->maxy; wy++) {
  2933. !         DBUG_PRINT ("wrefresh", ("update window line at y offset %d", wy));
  2934. !         DBUG_PRINT ("wrefresh", ("change pointers mark x offsets %d to %d",
  2935. !                      *win->lines[wy]->firstchp, *win->lines[wy]->lastchp));
  2936.           if (!curwin)
  2937.               curscr->lines[wy]->hash = win->lines[wy]->hash;
  2938.           if (win->lines[wy]->flags & (__ISDIRTY | __FORCEPAINT)) {
  2939.               if (makech(win, wy) == ERR)
  2940. !                 DBUG_RETURN (ERR);
  2941.               else {
  2942.                   if (*win->lines[wy]->firstchp >= win->ch_off)
  2943.                       *win->lines[wy]->firstchp = win->maxx +
  2944. ***************
  2945. *** 162,170 ****
  2946.                       *win->lines[wy]->lastchp = win->ch_off;
  2947.                   if (*win->lines[wy]->lastchp < 
  2948.                       *win->lines[wy]->firstchp) {
  2949. ! #ifdef DEBUG
  2950. !                     __CTRACE("wrefresh: line %d notdirty \n", wy);
  2951. ! #endif
  2952.                       win->lines[wy]->flags &= ~__ISDIRTY;
  2953.                   }
  2954.               }
  2955. --- 166,172 ----
  2956.                       *win->lines[wy]->lastchp = win->ch_off;
  2957.                   if (*win->lines[wy]->lastchp < 
  2958.                       *win->lines[wy]->firstchp) {
  2959. !                     DBUG_PRINT ("wrefresh", ("line %d notdirty", wy));
  2960.                       win->lines[wy]->flags &= ~__ISDIRTY;
  2961.                   }
  2962.               }
  2963. ***************
  2964. *** 176,184 ****
  2965.   #endif
  2966.       }
  2967.       
  2968. ! #ifdef DEBUG
  2969. !     __CTRACE("refresh: ly=%d, lx=%d\n", ly, lx);
  2970. ! #endif
  2971.   
  2972.       if (win == curscr)
  2973.           domvcur(ly, lx, win->cury, win->curx);
  2974. --- 178,184 ----
  2975.   #endif
  2976.       }
  2977.       
  2978. !     DBUG_PRINT ("refresh", ("ly=%d, lx=%d", ly, lx));
  2979.   
  2980.       if (win == curscr)
  2981.           domvcur(ly, lx, win->cury, win->curx);
  2982. ***************
  2983. *** 202,210 ****
  2984.           }
  2985.       }
  2986.       retval = OK;
  2987.       (void)fflush(stdout);
  2988. !     return (retval);
  2989.   }
  2990.   
  2991.   /*
  2992. --- 202,210 ----
  2993.           }
  2994.       }
  2995.       retval = OK;
  2996. !     DBUG_PRINT ("flush", ("flush stdout"));
  2997.       (void)fflush(stdout);
  2998. !     DBUG_RETURN (retval);
  2999.   }
  3000.   
  3001.   /*
  3002. ***************
  3003. *** 223,228 ****
  3004. --- 223,230 ----
  3005.       u_int force;
  3006.       char *ce;
  3007.   
  3008. +     DBUG_ENTER ("makech");
  3009. +     DBUG_PRINT ("screen", ("make a change on the screen"));
  3010.       /* Is the cursor still on the end of the last line? */
  3011.       if (wy > 0 && win->lines[wy - 1]->flags & __ISPASTEOL) {
  3012.           domvcur(ly, lx, ly + 1, 0);
  3013. ***************
  3014. *** 233,242 ****
  3015.       if (wx < 0)
  3016.           wx = 0;
  3017.       else if (wx >= win->maxx)
  3018. !         return (OK);
  3019.       lch = *win->lines[wy]->lastchp - win->ch_off;
  3020.       if (lch < 0)
  3021. !         return (OK);
  3022.       else if (lch >= (int) win->maxx)
  3023.           lch = win->maxx - 1;
  3024.       y = wy + win->begy;
  3025. --- 235,244 ----
  3026.       if (wx < 0)
  3027.           wx = 0;
  3028.       else if (wx >= win->maxx)
  3029. !         DBUG_RETURN (OK);
  3030.       lch = *win->lines[wy]->lastchp - win->ch_off;
  3031.       if (lch < 0)
  3032. !         DBUG_RETURN (OK);
  3033.       else if (lch >= (int) win->maxx)
  3034.           lch = win->maxx - 1;
  3035.       y = wy + win->begy;
  3036. ***************
  3037. *** 285,294 ****
  3038.           }
  3039.           domvcur(ly, lx, y, wx + win->begx);
  3040.   
  3041. ! #ifdef DEBUG
  3042. !         __CTRACE("makech: 1: wx = %d, ly= %d, lx = %d, newy = %d, newx = %d, force =%d\n", 
  3043. !             wx, ly, lx, y, wx + win->begx, force);
  3044. ! #endif
  3045.           ly = y;
  3046.           lx = wx + win->begx;
  3047.           while ((force || memcmp(nsp, csp, sizeof(__LDATA)) != 0) 
  3048. --- 287,294 ----
  3049.           }
  3050.           domvcur(ly, lx, y, wx + win->begx);
  3051.   
  3052. !         DBUG_PRINT ("makech", ("1: wx = %d, ly= %d, lx = %d, newy = %d, newx = %d, force =%d", 
  3053. !             wx, ly, lx, y, wx + win->begx, force));
  3054.           ly = y;
  3055.           lx = wx + win->begx;
  3056.           while ((force || memcmp(nsp, csp, sizeof(__LDATA)) != 0) 
  3057. ***************
  3058. *** 303,317 ****
  3059.                           break;
  3060.                   clsp = cep - curscr->lines[wy]->line - 
  3061.                          win->begx * __LDATASIZE;
  3062. ! #ifdef DEBUG
  3063. !             __CTRACE("makech: clsp = %d, nlsp = %d\n", clsp, nlsp);
  3064. ! #endif
  3065.                   if ((clsp - nlsp >= strlen(CE) 
  3066.                       && clsp < win->maxx * __LDATASIZE) ||
  3067.                       wy == win->maxy - 1) {
  3068. ! #ifdef DEBUG
  3069. !                     __CTRACE("makech: using CE\n");
  3070. ! #endif
  3071.                       tputs(CE, 0, __cputchar);
  3072.                       lx = wx + win->begx;
  3073.                       while (wx++ <= clsp) {
  3074. --- 303,313 ----
  3075.                           break;
  3076.                   clsp = cep - curscr->lines[wy]->line - 
  3077.                          win->begx * __LDATASIZE;
  3078. !             DBUG_PRINT ("makech", ("clsp = %d, nlsp = %d", clsp, nlsp));
  3079.                   if ((clsp - nlsp >= strlen(CE) 
  3080.                       && clsp < win->maxx * __LDATASIZE) ||
  3081.                       wy == win->maxy - 1) {
  3082. !                     DBUG_PRINT ("makech", ("using CE"));
  3083.                       tputs(CE, 0, __cputchar);
  3084.                       lx = wx + win->begx;
  3085.                       while (wx++ <= clsp) {
  3086. ***************
  3087. *** 319,325 ****
  3088.                           csp->attr = 0;
  3089.                           csp++;
  3090.                       }
  3091. !                     return (OK);
  3092.                   }
  3093.                   ce = NULL;
  3094.               }
  3095. --- 315,321 ----
  3096.                           csp->attr = 0;
  3097.                           csp++;
  3098.                       }
  3099. !                     DBUG_RETURN (OK);
  3100.                   }
  3101.                   ce = NULL;
  3102.               }
  3103. ***************
  3104. *** 361,367 ****
  3105.                       }
  3106.                       ly = win->begy + win->maxy - 1;
  3107.                       lx = win->begx + win->maxx - 1;
  3108. !                     return (OK);
  3109.                   } 
  3110.               if (wx < win->maxx || wy < win->maxy - 1 || 
  3111.                   !(win->flags & __SCROLLWIN)) {
  3112. --- 357,363 ----
  3113.                       }
  3114.                       ly = win->begy + win->maxy - 1;
  3115.                       lx = win->begx + win->maxx - 1;
  3116. !                     DBUG_RETURN (OK);
  3117.                   } 
  3118.               if (wx < win->maxx || wy < win->maxy - 1 || 
  3119.                   !(win->flags & __SCROLLWIN)) {
  3120. ***************
  3121. *** 372,388 ****
  3122.                   } else 
  3123.                       putchar(nsp->ch);
  3124.               }
  3125. ! #ifdef DEBUG
  3126. !             __CTRACE("makech: putchar(%c)\n", nsp->ch & 0177);
  3127. ! #endif
  3128.               if (UC && (nsp->attr & __STANDOUT)) {
  3129.                   putchar('\b');
  3130.                   tputs(UC, 0, __cputchar);
  3131.               }
  3132.               nsp++;
  3133. ! #ifdef DEBUG
  3134. !         __CTRACE("makech: 2: wx = %d, lx = %d\n", wx, lx);
  3135. ! #endif
  3136.           }
  3137.           if (lx == wx + win->begx)    /* If no change. */
  3138.               break;
  3139. --- 368,380 ----
  3140.                   } else 
  3141.                       putchar(nsp->ch);
  3142.               }
  3143. !             DBUG_PRINT ("makech", ("putchar(%c)", nsp->ch & 0177));
  3144.               if (UC && (nsp->attr & __STANDOUT)) {
  3145.                   putchar('\b');
  3146.                   tputs(UC, 0, __cputchar);
  3147.               }
  3148.               nsp++;
  3149. !         DBUG_PRINT ("makech", ("2: wx = %d, lx = %d", wx, lx));
  3150.           }
  3151.           if (lx == wx + win->begx)    /* If no change. */
  3152.               break;
  3153. ***************
  3154. *** 394,404 ****
  3155.               lx = win->maxx + win->begx - 1;
  3156.           }
  3157.   
  3158. ! #ifdef DEBUG
  3159. !         __CTRACE("makech: 3: wx = %d, lx = %d\n", wx, lx);
  3160. ! #endif
  3161.       }
  3162. !     return (OK);
  3163.   }
  3164.   
  3165.   /*
  3166. --- 386,394 ----
  3167.               lx = win->maxx + win->begx - 1;
  3168.           }
  3169.   
  3170. !         DBUG_PRINT ("makech", ("3: wx = %d, lx = %d", wx, lx));
  3171.       }
  3172. !     DBUG_RETURN (OK);
  3173.   }
  3174.   
  3175.   /*
  3176. ***************
  3177. *** 409,420 ****
  3178. --- 399,412 ----
  3179.   domvcur(oy, ox, ny, nx)
  3180.       int oy, ox, ny, nx;
  3181.   {
  3182. +     DBUG_ENTER ("domvcur");
  3183.       if (curscr->flags & __WSTANDOUT && !MS) {
  3184.           tputs(SE, 0, __cputchar);
  3185.           curscr->flags &= ~__WSTANDOUT;
  3186.       }
  3187.   
  3188.       __mvcur(oy, ox, ny, nx, 1);
  3189. +     DBUG_VOID_RETURN;
  3190.   }
  3191.   
  3192.   /*
  3193. ***************
  3194. *** 435,440 ****
  3195. --- 427,433 ----
  3196.       __LDATA buf[1024];
  3197.       u_int blank_hash;
  3198.   
  3199. +     DBUG_ENTER ("quickch");
  3200.       /* 
  3201.        * Find how many lines from the top of the screen are unchanged.
  3202.        */
  3203. ***************
  3204. *** 468,474 ****
  3205.        * but it looks better.
  3206.        */
  3207.       if (bot < win->maxy - 1)
  3208. !         return;
  3209.   #endif /* NO_JERKINESS */
  3210.   
  3211.       /*
  3212. --- 461,467 ----
  3213.        * but it looks better.
  3214.        */
  3215.       if (bot < win->maxy - 1)
  3216. !         DBUG_VOID_RETURN;
  3217.   #endif /* NO_JERKINESS */
  3218.   
  3219.       /*
  3220. ***************
  3221. *** 503,514 ****
  3222.    done:
  3223.       /* Did not find anything */
  3224.       if (bsize < THRESH)    
  3225. !         return;
  3226.   
  3227. ! #ifdef DEBUG
  3228. !     __CTRACE("quickch:bsize=%d,starts=%d,startw=%d,curw=%d,curs=%d,top=%d,bot=%d\n", 
  3229. !         bsize, starts, startw, curw, curs, top, bot);
  3230. ! #endif
  3231.   
  3232.       /* 
  3233.        * Make sure that there is no overlap between the bottom and top 
  3234. --- 496,505 ----
  3235.    done:
  3236.       /* Did not find anything */
  3237.       if (bsize < THRESH)    
  3238. !         DBUG_VOID_RETURN;
  3239.   
  3240. !     DBUG_PRINT ("quickch", ("bsize=%d,starts=%d,startw=%d,curw=%d,curs=%d,top=%d,bot=%d", 
  3241. !         bsize, starts, startw, curw, curs, top, bot));
  3242.   
  3243.       /* 
  3244.        * Make sure that there is no overlap between the bottom and top 
  3245. ***************
  3246. *** 597,611 ****
  3247.           curscr->lines[target] = tmp1;
  3248.           /* Mark block as clean and blank out scrolled lines. */
  3249.           clp = curscr->lines[target];
  3250. ! #ifdef DEBUG
  3251. !         __CTRACE("quickch: n=%d startw=%d curw=%d i = %d target=%d ",
  3252. !             n, startw, curw, i, target);
  3253. ! #endif
  3254.           if ((target >= startw && target < curw) || target < top 
  3255.               || target > bot) {
  3256. ! #ifdef DEBUG
  3257. !             __CTRACE("-- notdirty");
  3258. ! #endif
  3259.               win->lines[target]->flags &= ~__ISDIRTY;
  3260.           } else if ((n > 0 && target >= top && target < top + n) ||
  3261.                      (n < 0 && target <= bot && target > bot + n)) {
  3262. --- 588,598 ----
  3263.           curscr->lines[target] = tmp1;
  3264.           /* Mark block as clean and blank out scrolled lines. */
  3265.           clp = curscr->lines[target];
  3266. !         DBUG_PRINT ("quickch", ("n=%d startw=%d curw=%d i = %d target=%d",
  3267. !             n, startw, curw, i, target));
  3268.           if ((target >= startw && target < curw) || target < top 
  3269.               || target > bot) {
  3270. !             DBUG_PRINT ("quickch", ("-- notdirty"));
  3271.               win->lines[target]->flags &= ~__ISDIRTY;
  3272.           } else if ((n > 0 && target >= top && target < top + n) ||
  3273.                      (n < 0 && target <= bot && target > bot + n)) {
  3274. ***************
  3275. *** 613,633 ****
  3276.                   buf, win->maxx * __LDATASIZE) !=0) {
  3277.                   (void)memcpy(clp->line,  buf,
  3278.                       win->maxx * __LDATASIZE);
  3279. ! #ifdef DEBUG
  3280. !                 __CTRACE("-- blanked out: dirty");
  3281. ! #endif
  3282.                   clp->hash = blank_hash;
  3283.                   __touchline(win, target, 0, win->maxx - 1, 0);
  3284.               } else {
  3285.                   __touchline(win, target, 0, win->maxx - 1, 0);
  3286. ! #ifdef DEBUG
  3287. !                 __CTRACE(" -- blank line already: dirty");
  3288. ! #endif
  3289.               }
  3290.           } else {
  3291. ! #ifdef DEBUG
  3292. !             __CTRACE(" -- dirty");
  3293. ! #endif
  3294.               __touchline(win, target, 0, win->maxx - 1, 0);
  3295.           }
  3296.   #ifdef DEBUG
  3297. --- 600,614 ----
  3298.                   buf, win->maxx * __LDATASIZE) !=0) {
  3299.                   (void)memcpy(clp->line,  buf,
  3300.                       win->maxx * __LDATASIZE);
  3301. !                 DBUG_PRINT ("quickch", ("-- blanked out: dirty"));
  3302.                   clp->hash = blank_hash;
  3303.                   __touchline(win, target, 0, win->maxx - 1, 0);
  3304.               } else {
  3305.                   __touchline(win, target, 0, win->maxx - 1, 0);
  3306. !                 DBUG_PRINT ("quickch", (" -- blank line already: dirty"));
  3307.               }
  3308.           } else {
  3309. !             DBUG_PRINT ("quickch", (" -- dirty"));
  3310.               __touchline(win, target, 0, win->maxx - 1, 0);
  3311.           }
  3312.   #ifdef DEBUG
  3313. ***************
  3314. *** 667,672 ****
  3315. --- 648,654 ----
  3316.           for (wp = win->nextp; wp != win; wp = wp->nextp)
  3317.               __set_subwin(win, wp);
  3318.       }
  3319. +     DBUG_VOID_RETURN;
  3320.   }
  3321.   
  3322.   /*
  3323. ***************
  3324. *** 679,684 ****
  3325. --- 661,667 ----
  3326.   {
  3327.       int i, oy, ox, n;
  3328.   
  3329. +     DBUG_ENTER ("scrolln");
  3330.       oy = curscr->cury;
  3331.       ox = curscr->curx;
  3332.       n = starts - startw;
  3333. ***************
  3334. *** 720,723 ****
  3335. --- 703,707 ----
  3336.                   tputs(al, 0, __cputchar);
  3337.           __mvcur(top, 0, oy, ox, 1);
  3338.       }        
  3339. +     DBUG_VOID_RETURN;
  3340.   }
  3341. diff -rc --new-file libcurses-8.3/scanw.c /gnu/src/amiga/libcurses-8.3/scanw.c
  3342. *** libcurses-8.3/scanw.c    Tue Oct  5 10:20:54 1993
  3343. --- /gnu/src/amiga/libcurses-8.3/scanw.c    Wed Jan 11 17:28:39 1995
  3344. ***************
  3345. *** 63,68 ****
  3346. --- 63,69 ----
  3347.       va_list ap;
  3348.       int ret;
  3349.   
  3350. +     DBUG_ENTER ("scanw");
  3351.   #ifdef __STDC__
  3352.       va_start(ap, fmt);
  3353.   #else
  3354. ***************
  3355. *** 70,76 ****
  3356.   #endif
  3357.       ret = vwscanw(stdscr, fmt, ap);
  3358.       va_end(ap);
  3359. !     return (ret);
  3360.   }
  3361.   
  3362.   /*
  3363. --- 71,77 ----
  3364.   #endif
  3365.       ret = vwscanw(stdscr, fmt, ap);
  3366.       va_end(ap);
  3367. !     DBUG_RETURN (ret);
  3368.   }
  3369.   
  3370.   /*
  3371. ***************
  3372. *** 90,95 ****
  3373. --- 91,97 ----
  3374.       va_list ap;
  3375.       int ret;
  3376.   
  3377. +     DBUG_ENTER ("wscanw");
  3378.   #ifdef __STDC__
  3379.       va_start(ap, fmt);
  3380.   #else
  3381. ***************
  3382. *** 97,103 ****
  3383.   #endif
  3384.       ret = vwscanw(win, fmt, ap);
  3385.       va_end(ap);
  3386. !     return (ret);
  3387.   }
  3388.   
  3389.   /*
  3390. --- 99,105 ----
  3391.   #endif
  3392.       ret = vwscanw(win, fmt, ap);
  3393.       va_end(ap);
  3394. !     DBUG_RETURN (ret);
  3395.   }
  3396.   
  3397.   /*
  3398. ***************
  3399. *** 118,125 ****
  3400.       va_list ap;
  3401.       int ret;
  3402.   
  3403.       if (move(y, x) != OK)
  3404. !         return (ERR);
  3405.   #ifdef __STDC__
  3406.       va_start(ap, fmt);
  3407.   #else
  3408. --- 120,128 ----
  3409.       va_list ap;
  3410.       int ret;
  3411.   
  3412. +     DBUG_ENTER ("mvscanw");
  3413.       if (move(y, x) != OK)
  3414. !         DBUG_RETURN (ERR);
  3415.   #ifdef __STDC__
  3416.       va_start(ap, fmt);
  3417.   #else
  3418. ***************
  3419. *** 127,133 ****
  3420.   #endif
  3421.       ret = vwscanw(stdscr, fmt, ap);
  3422.       va_end(ap);
  3423. !     return (ret);
  3424.   }
  3425.   
  3426.   int
  3427. --- 130,136 ----
  3428.   #endif
  3429.       ret = vwscanw(stdscr, fmt, ap);
  3430.       va_end(ap);
  3431. !     DBUG_RETURN (ret);
  3432.   }
  3433.   
  3434.   int
  3435. ***************
  3436. *** 145,152 ****
  3437.       va_list ap;
  3438.       int ret;
  3439.   
  3440.       if (move(y, x) != OK)
  3441. !         return (ERR);
  3442.   #ifdef __STDC__
  3443.       va_start(ap, fmt);
  3444.   #else
  3445. --- 148,156 ----
  3446.       va_list ap;
  3447.       int ret;
  3448.   
  3449. +     DBUG_ENTER ("mvwscanw");
  3450.       if (move(y, x) != OK)
  3451. !         DBUG_RETURN (ERR);
  3452.   #ifdef __STDC__
  3453.       va_start(ap, fmt);
  3454.   #else
  3455. ***************
  3456. *** 154,160 ****
  3457.   #endif
  3458.       ret = vwscanw(win, fmt, ap);
  3459.       va_end(ap);
  3460. !     return (ret);
  3461.   }
  3462.   
  3463.   /*
  3464. --- 158,164 ----
  3465.   #endif
  3466.       ret = vwscanw(win, fmt, ap);
  3467.       va_end(ap);
  3468. !     DBUG_RETURN (ret);
  3469.   }
  3470.   
  3471.   /*
  3472. ***************
  3473. *** 169,175 ****
  3474.   {
  3475.   
  3476.       char buf[1024];
  3477.   
  3478. !     return (wgetstr(win, buf) == OK ?
  3479.           vsscanf(buf, fmt, ap) : ERR);
  3480.   }
  3481. --- 173,182 ----
  3482.   {
  3483.   
  3484.       char buf[1024];
  3485. +     int ret;
  3486.   
  3487. !     DBUG_ENTER ("vwscanw");
  3488. !     ret = (wgetstr(win, buf) == OK ?
  3489.           vsscanf(buf, fmt, ap) : ERR);
  3490. +     DBUG_RETURN (ret);
  3491.   }
  3492. diff -rc --new-file libcurses-8.3/scroll.c /gnu/src/amiga/libcurses-8.3/scroll.c
  3493. *** libcurses-8.3/scroll.c    Sun Jan  9 16:40:54 1994
  3494. --- /gnu/src/amiga/libcurses-8.3/scroll.c    Wed Jan 11 17:02:42 1995
  3495. ***************
  3496. *** 47,58 ****
  3497.   {
  3498.       register int oy, ox;
  3499.   
  3500. ! #ifdef DEBUG
  3501. !     __CTRACE("scroll: (%0.2o)\n", win);
  3502. ! #endif
  3503.   
  3504.       if (!(win->flags & __SCROLLOK))
  3505. !         return (ERR);
  3506.   
  3507.       getyx(win, oy, ox);
  3508.       wmove(win, 0, 0);
  3509. --- 47,57 ----
  3510.   {
  3511.       register int oy, ox;
  3512.   
  3513. !     DBUG_ENTER ("scroll");
  3514. !     DBUG_PRINT ("scroll", ("(%0.2o)", win));
  3515.   
  3516.       if (!(win->flags & __SCROLLOK))
  3517. !         DBUG_RETURN (ERR);
  3518.   
  3519.       getyx(win, oy, ox);
  3520.       wmove(win, 0, 0);
  3521. ***************
  3522. *** 63,71 ****
  3523.           putchar('\n');
  3524.           if (!NONL)
  3525.               win->curx = 0;
  3526. ! #ifdef DEBUG
  3527. !         __CTRACE("scroll: win == curscr\n");
  3528. ! #endif
  3529.       }
  3530. !     return (OK);
  3531.   }
  3532. --- 62,68 ----
  3533.           putchar('\n');
  3534.           if (!NONL)
  3535.               win->curx = 0;
  3536. !         DBUG_PRINT ("scroll", ("win == curscr"));
  3537.       }
  3538. !     DBUG_RETURN (OK);
  3539.   }
  3540. diff -rc --new-file libcurses-8.3/setterm.c /gnu/src/amiga/libcurses-8.3/setterm.c
  3541. *** libcurses-8.3/setterm.c    Sun Jan  2 14:28:26 1994
  3542. --- /gnu/src/amiga/libcurses-8.3/setterm.c    Wed Jan 11 18:23:08 1995
  3543. ***************
  3544. *** 88,97 ****
  3545.       struct winsize win;
  3546.       char *p;
  3547.   
  3548. ! #ifdef DEBUG
  3549. !     __CTRACE("setterm: (\"%s\")\nLINES = %d, COLS = %d\n",
  3550. !         type, LINES, COLS);
  3551. ! #endif
  3552.       if (type[0] == '\0')
  3553.           type = "xx";
  3554.       unknown = 0;
  3555. --- 88,96 ----
  3556.       struct winsize win;
  3557.       char *p;
  3558.   
  3559. !     DBUG_ENTER ("setterm");
  3560. !     DBUG_PRINT ("setterm", ("(\"%s\") LINES = %d, COLS = %d",
  3561. !         type, LINES, COLS));
  3562.       if (type[0] == '\0')
  3563.           type = "xx";
  3564.       unknown = 0;
  3565. ***************
  3566. *** 99,116 ****
  3567.           unknown++;
  3568.           strcpy(genbuf, "xx|dumb:");
  3569.       }
  3570. ! #ifdef DEBUG
  3571. !     __CTRACE("setterm: tty = %s\n", type);
  3572. ! #endif
  3573.   
  3574.       /* Try TIOCGWINSZ, and, if it fails, the termcap entry. */
  3575.       if (ioctl(STDERR_FILENO, TIOCGWINSZ, &win) != -1 &&
  3576.           win.ws_row != 0 && win.ws_col != 0) {
  3577.           LINES = win.ws_row;
  3578.           COLS = win.ws_col;
  3579.       }  else {
  3580.           LINES = tgetnum("li");
  3581.           COLS = tgetnum("co");
  3582.       }
  3583.   
  3584.       /* POSIX 1003.2 requires that the environment override. */
  3585. --- 98,115 ----
  3586.           unknown++;
  3587.           strcpy(genbuf, "xx|dumb:");
  3588.       }
  3589. !     DBUG_PRINT ("setterm", ("tty = %s", type));
  3590.   
  3591.       /* Try TIOCGWINSZ, and, if it fails, the termcap entry. */
  3592.       if (ioctl(STDERR_FILENO, TIOCGWINSZ, &win) != -1 &&
  3593.           win.ws_row != 0 && win.ws_col != 0) {
  3594.           LINES = win.ws_row;
  3595.           COLS = win.ws_col;
  3596. +         DBUG_PRINT ("size", ("from TIOCGWINSZ, LINES=%d, COLS=%d", LINES, COLS));
  3597.       }  else {
  3598.           LINES = tgetnum("li");
  3599.           COLS = tgetnum("co");
  3600. +         DBUG_PRINT ("size", ("from termcap, LINES=%d, COLS=%d", LINES, COLS));
  3601.       }
  3602.   
  3603.       /* POSIX 1003.2 requires that the environment override. */
  3604. ***************
  3605. *** 118,133 ****
  3606.           LINES = strtol(p, NULL, 10);
  3607.       if ((p = getenv("COLUMNS")) != NULL)
  3608.           COLS = strtol(p, NULL, 10);
  3609.   
  3610.       /*
  3611.        * Want cols > 4, otherwise things will fail.
  3612.        */
  3613.       if (COLS <= 4)
  3614. !         return (ERR);
  3615.   
  3616. - #ifdef DEBUG
  3617. -     __CTRACE("setterm: LINES = %d, COLS = %d\n", LINES, COLS);
  3618. - #endif
  3619.       aoftspace = tspace;
  3620.       zap();            /* Get terminal description. */
  3621.   
  3622. --- 117,130 ----
  3623.           LINES = strtol(p, NULL, 10);
  3624.       if ((p = getenv("COLUMNS")) != NULL)
  3625.           COLS = strtol(p, NULL, 10);
  3626. +     DBUG_PRINT ("size", ("after getenv(), LINES=%d, COLS=%d", LINES, COLS));
  3627.   
  3628.       /*
  3629.        * Want cols > 4, otherwise things will fail.
  3630.        */
  3631.       if (COLS <= 4)
  3632. !         DBUG_RETURN (ERR);
  3633.   
  3634.       aoftspace = tspace;
  3635.       zap();            /* Get terminal description. */
  3636.   
  3637. ***************
  3638. *** 151,161 ****
  3639.       PC = _PC ? _PC[0] : 0;
  3640.       aoftspace = tspace;
  3641.       ttytype = longname(genbuf, __ttytype);
  3642.       if ((!AL && !al) || (!DL && !dl))
  3643.           __noqch = 1;
  3644.   
  3645. !     return (unknown ? ERR : OK);
  3646.   }
  3647.   
  3648.   /*
  3649. --- 148,158 ----
  3650.       PC = _PC ? _PC[0] : 0;
  3651.       aoftspace = tspace;
  3652.       ttytype = longname(genbuf, __ttytype);
  3653. !     DBUG_PRINT ("ttytype", ("ttytype = '%s'", ttytype ? ttytype : "<NULL>"));
  3654.       if ((!AL && !al) || (!DL && !dl))
  3655.           __noqch = 1;
  3656.   
  3657. !     DBUG_RETURN (unknown ? ERR : OK);
  3658.   }
  3659.   
  3660.   /*
  3661. ***************
  3662. *** 171,176 ****
  3663. --- 168,175 ----
  3664.   #ifdef DEBUG
  3665.       register char    *cp;
  3666.   #endif
  3667. +     DBUG_ENTER ("zap");
  3668.       tmp[2] = '\0';
  3669.   
  3670.       namp = "ambsdaeohcinmimsncnsosulxbxnxtxsxx";
  3671. ***************
  3672. *** 179,187 ****
  3673.           *tmp = *namp;
  3674.           *(tmp + 1) = *(namp + 1);
  3675.           *(*fp++) = tgetflag(tmp);
  3676. ! #ifdef DEBUG
  3677. !         __CTRACE("2.2s = %s\n", namp, *fp[-1] ? "TRUE" : "FALSE");
  3678. ! #endif
  3679.           namp += 2;
  3680.           
  3681.       } while (*namp);
  3682. --- 178,184 ----
  3683.           *tmp = *namp;
  3684.           *(tmp + 1) = *(namp + 1);
  3685.           *(*fp++) = tgetflag(tmp);
  3686. !         DBUG_PRINT ("zap", ("2.2%s = %s", namp, *fp[-1] ? "TRUE" : "FALSE"));
  3687.           namp += 2;
  3688.           
  3689.       } while (*namp);
  3690. ***************
  3691. *** 213,218 ****
  3692. --- 210,216 ----
  3693.               SE = UE;
  3694.           }
  3695.       }
  3696. +     DBUG_VOID_RETURN;
  3697.   }
  3698.   
  3699.   /*
  3700. ***************
  3701. *** 223,227 ****
  3702.   getcap(name)
  3703.       char *name;
  3704.   {
  3705. !     return (tgetstr(name, &aoftspace));
  3706.   }
  3707. --- 221,231 ----
  3708.   getcap(name)
  3709.       char *name;
  3710.   {
  3711. !     char *ret;
  3712. !     DBUG_ENTER ("getcap");
  3713. !     DBUG_PRINT ("termcap", ("get capability '%s'", name));
  3714. !     ret = tgetstr(name, &aoftspace);
  3715. !     DBUG_PRINT ("termcap", ("got '%s'", ret));
  3716. !     DBUG_RETURN (ret);
  3717.   }
  3718. diff -rc --new-file libcurses-8.3/standout.c /gnu/src/amiga/libcurses-8.3/standout.c
  3719. *** libcurses-8.3/standout.c    Fri Jun  4 17:49:32 1993
  3720. --- /gnu/src/amiga/libcurses-8.3/standout.c    Wed Jan 11 17:06:13 1995
  3721. ***************
  3722. *** 45,55 ****
  3723.   wstandout(win)
  3724.       register WINDOW *win;
  3725.   {
  3726.       if (!SO && !UC)
  3727. !         return (0);
  3728.   
  3729.       win->flags |= __WSTANDOUT;
  3730. !     return (SO ? SO : UC);
  3731.   }
  3732.   
  3733.   /*
  3734. --- 45,56 ----
  3735.   wstandout(win)
  3736.       register WINDOW *win;
  3737.   {
  3738. +     DBUG_ENTER ("wstandout");
  3739.       if (!SO && !UC)
  3740. !         DBUG_RETURN (0);
  3741.   
  3742.       win->flags |= __WSTANDOUT;
  3743. !     DBUG_RETURN (SO ? SO : UC);
  3744.   }
  3745.   
  3746.   /*
  3747. ***************
  3748. *** 60,68 ****
  3749.   wstandend(win)
  3750.       register WINDOW *win;
  3751.   {
  3752.       if (!SO && !UC)
  3753. !         return (0);
  3754.   
  3755.       win->flags &= ~__WSTANDOUT;
  3756. !     return (SE ? SE : UC);
  3757.   }
  3758. --- 61,70 ----
  3759.   wstandend(win)
  3760.       register WINDOW *win;
  3761.   {
  3762. +     DBUG_ENTER ("wstandend");
  3763.       if (!SO && !UC)
  3764. !         DBUG_RETURN (0);
  3765.   
  3766.       win->flags &= ~__WSTANDOUT;
  3767. !     DBUG_RETURN (SE ? SE : UC);
  3768.   }
  3769. diff -rc --new-file libcurses-8.3/toucholap.c /gnu/src/amiga/libcurses-8.3/toucholap.c
  3770. *** libcurses-8.3/toucholap.c    Fri Jun  4 17:49:38 1993
  3771. --- /gnu/src/amiga/libcurses-8.3/toucholap.c    Wed Jan 11 17:06:42 1995
  3772. ***************
  3773. *** 47,77 ****
  3774.   {
  3775.       register int y, endy, endx, starty, startx;
  3776.   
  3777. ! #ifdef DEBUG
  3778. !     __CTRACE("touchoverlap: (%0.2o, %0.2o);\n", win1, win2);
  3779. ! #endif
  3780.       starty = max(win1->begy, win2->begy);
  3781.       startx = max(win1->begx, win2->begx);
  3782.       endy = min(win1->maxy + win1->begy, win2->maxy + win2->begx);
  3783.       endx = min(win1->maxx + win1->begx, win2->maxx + win2->begx);
  3784. ! #ifdef DEBUG
  3785. !     __CTRACE("touchoverlap: from (%d,%d) to (%d,%d)\n",
  3786. !         starty, startx, endy, endx);
  3787. !     __CTRACE("touchoverlap: win1 (%d,%d) to (%d,%d)\n",
  3788.           win1->begy, win1->begx, win1->begy + win1->maxy,
  3789. !         win1->begx + win1->maxx);
  3790. !     __CTRACE("touchoverlap: win2 (%d,%d) to (%d,%d)\n",
  3791.           win2->begy, win2->begx, win2->begy + win2->maxy,
  3792. !         win2->begx + win2->maxx);
  3793. ! #endif
  3794.       if (starty >= endy || startx >= endx)
  3795. !         return (OK);
  3796.       starty -= win2->begy;
  3797.       startx -= win2->begx;
  3798.       endy -= win2->begy;
  3799.       endx -= win2->begx;
  3800.       for (--endx, y = starty; y < endy; y++)
  3801.           __touchline(win2, y, startx, endx, 0);
  3802. !     return (OK);
  3803.   }
  3804.   
  3805. --- 47,74 ----
  3806.   {
  3807.       register int y, endy, endx, starty, startx;
  3808.   
  3809. !     DBUG_ENTER ("touchoverlap");
  3810. !     DBUG_PRINT ("touchoverlap", ("(%0.2o, %0.2o)", win1, win2));
  3811.       starty = max(win1->begy, win2->begy);
  3812.       startx = max(win1->begx, win2->begx);
  3813.       endy = min(win1->maxy + win1->begy, win2->maxy + win2->begx);
  3814.       endx = min(win1->maxx + win1->begx, win2->maxx + win2->begx);
  3815. !     DBUG_PRINT ("touchoverlap", ("from (%d,%d) to (%d,%d)",
  3816. !         starty, startx, endy, endx));
  3817. !     DBUG_PRINT ("touchoverlap", ("win1 (%d,%d) to (%d,%d)",
  3818.           win1->begy, win1->begx, win1->begy + win1->maxy,
  3819. !         win1->begx + win1->maxx));
  3820. !     DBUG_PRINT ("touchoverlap", ("win2 (%d,%d) to (%d,%d)",
  3821.           win2->begy, win2->begx, win2->begy + win2->maxy,
  3822. !         win2->begx + win2->maxx));
  3823.       if (starty >= endy || startx >= endx)
  3824. !         DBUG_RETURN (OK);
  3825.       starty -= win2->begy;
  3826.       startx -= win2->begx;
  3827.       endy -= win2->begy;
  3828.       endx -= win2->begx;
  3829.       for (--endx, y = starty; y < endy; y++)
  3830.           __touchline(win2, y, startx, endx, 0);
  3831. !     DBUG_RETURN (OK);
  3832.   }
  3833.   
  3834. diff -rc --new-file libcurses-8.3/touchwin.c /gnu/src/amiga/libcurses-8.3/touchwin.c
  3835. *** libcurses-8.3/touchwin.c    Fri Jun  4 17:49:40 1993
  3836. --- /gnu/src/amiga/libcurses-8.3/touchwin.c    Wed Jan 11 17:08:36 1995
  3837. ***************
  3838. *** 47,53 ****
  3839.       WINDOW *win;
  3840.       register int y, sx, ex;
  3841.   {
  3842. !     return (__touchline(win, y, sx, ex, 1));
  3843.   }
  3844.   
  3845.   
  3846. --- 47,57 ----
  3847.       WINDOW *win;
  3848.       register int y, sx, ex;
  3849.   {
  3850. !     int ret;
  3851. !     DBUG_ENTER ("touchline");
  3852. !     ret = __touchline(win, y, sx, ex, 1);
  3853. !     DBUG_RETURN (ret);
  3854.   }
  3855.   
  3856.   
  3857. ***************
  3858. *** 61,73 ****
  3859.   {
  3860.       register int y, maxy;
  3861.   
  3862. ! #ifdef DEBUG
  3863. !     __CTRACE("touchwin: (%0.2o)\n", win);
  3864. ! #endif
  3865.       maxy = win->maxy;
  3866.       for (y = 0; y < maxy; y++)
  3867.           __touchline(win, y, 0, win->maxx - 1, 1);
  3868. !     return (OK);
  3869.   }
  3870.   
  3871.   
  3872. --- 65,76 ----
  3873.   {
  3874.       register int y, maxy;
  3875.   
  3876. !     DBUG_ENTER ("touchwin");
  3877. !     DBUG_PRINT ("touchwin", ("(%0.2o)", win));
  3878.       maxy = win->maxy;
  3879.       for (y = 0; y < maxy; y++)
  3880.           __touchline(win, y, 0, win->maxx - 1, 1);
  3881. !     DBUG_RETURN (OK);
  3882.   }
  3883.   
  3884.   
  3885. ***************
  3886. *** 77,89 ****
  3887.   {
  3888.       register int y, maxy;
  3889.   
  3890. ! #ifdef DEBUG
  3891. !     __CTRACE("touchwin: (%0.2o)\n", win);
  3892. ! #endif
  3893.       maxy = win->maxy;
  3894.       for (y = 0; y < maxy; y++)
  3895.           __touchline(win, y, 0, win->maxx - 1, 0);
  3896. !     return (OK);
  3897.   }
  3898.   
  3899.   int
  3900. --- 80,91 ----
  3901.   {
  3902.       register int y, maxy;
  3903.   
  3904. !     DBUG_ENTER ("__touchwin");
  3905. !     DBUG_PRINT ("touchwin", ("(%0.2o)", win));
  3906.       maxy = win->maxy;
  3907.       for (y = 0; y < maxy; y++)
  3908.           __touchline(win, y, 0, win->maxx - 1, 0);
  3909. !     DBUG_RETURN (OK);
  3910.   }
  3911.   
  3912.   int
  3913. ***************
  3914. *** 92,102 ****
  3915.       register int y, sx, ex;
  3916.       int force;
  3917.   {
  3918. ! #ifdef DEBUG
  3919. !     __CTRACE("touchline: (%0.2o, %d, %d, %d, %d)\n", win, y, sx, ex, force);
  3920. !     __CTRACE("touchline: first = %d, last = %d\n",
  3921. !         *win->lines[y]->firstchp, *win->lines[y]->lastchp);
  3922. ! #endif
  3923.       if (force)
  3924.           win->lines[y]->flags |= __FORCEPAINT;
  3925.       sx += win->ch_off;
  3926. --- 94,103 ----
  3927.       register int y, sx, ex;
  3928.       int force;
  3929.   {
  3930. !     DBUG_ENTER ("__touchline");
  3931. !     DBUG_PRINT ("touchline", ("(%0.2o, %d, %d, %d, %d)", win, y, sx, ex, force));
  3932. !     DBUG_PRINT ("touchline", ("first = %d, last = %d",
  3933. !         *win->lines[y]->firstchp, *win->lines[y]->lastchp));
  3934.       if (force)
  3935.           win->lines[y]->flags |= __FORCEPAINT;
  3936.       sx += win->ch_off;
  3937. ***************
  3938. *** 111,121 ****
  3939.           if (*win->lines[y]->lastchp < ex)
  3940.               *win->lines[y]->lastchp = ex;
  3941.       }
  3942. ! #ifdef DEBUG
  3943. !     __CTRACE("touchline: first = %d, last = %d\n",
  3944. !         *win->lines[y]->firstchp, *win->lines[y]->lastchp);
  3945. ! #endif
  3946. !     return (OK);
  3947.   }
  3948.   
  3949.   
  3950. --- 112,120 ----
  3951.           if (*win->lines[y]->lastchp < ex)
  3952.               *win->lines[y]->lastchp = ex;
  3953.       }
  3954. !     DBUG_PRINT ("touchline", ("first = %d, last = %d",
  3955. !         *win->lines[y]->firstchp, *win->lines[y]->lastchp));
  3956. !     DBUG_RETURN (OK);
  3957.   }
  3958.   
  3959.   
  3960. diff -rc --new-file libcurses-8.3/tscroll.c /gnu/src/amiga/libcurses-8.3/tscroll.c
  3961. *** libcurses-8.3/tscroll.c    Fri Apr 15 10:45:44 1994
  3962. --- /gnu/src/amiga/libcurses-8.3/tscroll.c    Wed Jan 11 17:10:47 1995
  3963. ***************
  3964. *** 69,74 ****
  3965. --- 69,75 ----
  3966.       int c;
  3967.       char *dp;
  3968.   
  3969. +     DBUG_ENTER ("__tscroll");
  3970.       if (cap == NULL)
  3971.           goto err;
  3972.       for (dp = result; (c = *cap++) != '\0';) {
  3973. ***************
  3974. *** 132,138 ****
  3975.           }
  3976.       }
  3977.       *dp = '\0';
  3978. !     return (result);
  3979.   
  3980. ! err:    return("curses: __tscroll failed");
  3981.   }
  3982. --- 133,139 ----
  3983.           }
  3984.       }
  3985.       *dp = '\0';
  3986. !     DBUG_RETURN (result);
  3987.   
  3988. ! err:    DBUG_RETURN("curses: __tscroll failed");
  3989.   }
  3990. diff -rc --new-file libcurses-8.3/tstp.c /gnu/src/amiga/libcurses-8.3/tstp.c
  3991. *** libcurses-8.3/tstp.c    Sun Jan  2 14:29:28 1994
  3992. --- /gnu/src/amiga/libcurses-8.3/tstp.c    Wed Jan 11 17:12:09 1995
  3993. ***************
  3994. *** 53,61 ****
  3995.       struct termios save;
  3996.       sigset_t oset, set;
  3997.   
  3998.       /* Get the current terminal state (which the user may have changed). */
  3999.       if (tcgetattr(STDIN_FILENO, &save))
  4000. !         return;
  4001.   
  4002.       /*
  4003.        * Block window change and timer signals.  The latter is because
  4004. --- 53,62 ----
  4005.       struct termios save;
  4006.       sigset_t oset, set;
  4007.   
  4008. +     DBUG_ENTER ("__stop_signal_handler");
  4009.       /* Get the current terminal state (which the user may have changed). */
  4010.       if (tcgetattr(STDIN_FILENO, &save))
  4011. !         DBUG_VOID_RETURN;
  4012.   
  4013.       /*
  4014.        * Block window change and timer signals.  The latter is because
  4015. ***************
  4016. *** 101,106 ****
  4017. --- 102,108 ----
  4018.   
  4019.       /* Reset the signals. */
  4020.       (void)sigprocmask(SIG_SETMASK, &oset, NULL);
  4021. +     DBUG_VOID_RETURN;
  4022.   }
  4023.   
  4024.   static void (*otstpfn)() = SIG_DFL;
  4025. ***************
  4026. *** 111,117 ****
  4027. --- 113,121 ----
  4028.   void
  4029.   __set_stophandler()
  4030.   {
  4031. +     DBUG_ENTER ("__set_stophandler");
  4032.       otstpfn = signal(SIGTSTP, __stop_signal_handler);
  4033. +     DBUG_VOID_RETURN;
  4034.   }
  4035.   
  4036.   /*
  4037. ***************
  4038. *** 120,124 ****
  4039. --- 124,130 ----
  4040.   void
  4041.   __restore_stophandler()
  4042.   {
  4043. +     DBUG_ENTER ("__restore_stophandler");
  4044.       (void)signal(SIGTSTP, otstpfn);
  4045. +     DBUG_VOID_RETURN;
  4046.   }
  4047. diff -rc --new-file libcurses-8.3/tty.c /gnu/src/amiga/libcurses-8.3/tty.c
  4048. *** libcurses-8.3/tty.c    Sun Jan  2 14:30:06 1994
  4049. --- /gnu/src/amiga/libcurses-8.3/tty.c    Wed Jan 11 17:31:15 1995
  4050. ***************
  4051. *** 73,82 ****
  4052.   int
  4053.   gettmode()
  4054.   {
  4055.       useraw = 0;
  4056. -     
  4057.       if (tcgetattr(STDIN_FILENO, &__orig_termios))
  4058. !         return (ERR);
  4059.   
  4060.       __baset = __orig_termios;
  4061.       __baset.c_oflag &= ~OXTABS;
  4062. --- 73,84 ----
  4063.   int
  4064.   gettmode()
  4065.   {
  4066. +     int ret;
  4067. +     DBUG_ENTER ("gettmode");
  4068.       useraw = 0;
  4069.       if (tcgetattr(STDIN_FILENO, &__orig_termios))
  4070. !         DBUG_RETURN (ERR);
  4071.   
  4072.       __baset = __orig_termios;
  4073.       __baset.c_oflag &= ~OXTABS;
  4074. ***************
  4075. *** 116,190 ****
  4076.       }
  4077.   
  4078.       curt = &__baset;
  4079. !     return (tcsetattr(STDIN_FILENO, __tcaction ?
  4080.           TCSASOFT | TCSADRAIN : TCSADRAIN, curt) ? ERR : OK);
  4081.   }
  4082.   
  4083.   int
  4084.   raw()
  4085.   {
  4086.       useraw = __pfast = __rawmode = 1;
  4087.       curt = &rawt;
  4088. !     return (tcsetattr(STDIN_FILENO, __tcaction ?
  4089.           TCSASOFT | TCSADRAIN : TCSADRAIN, curt));
  4090.   }
  4091.   
  4092.   int
  4093.   noraw()
  4094.   {
  4095.       useraw = __pfast = __rawmode = 0;
  4096.       curt = &__baset;
  4097. !     return (tcsetattr(STDIN_FILENO, __tcaction ?
  4098.           TCSASOFT | TCSADRAIN : TCSADRAIN, curt));
  4099.   }
  4100.   
  4101.   int
  4102.   cbreak()
  4103.   {
  4104.   
  4105.       __rawmode = 1;
  4106.       curt = useraw ? &rawt : &cbreakt;
  4107. !     return (tcsetattr(STDIN_FILENO, __tcaction ?
  4108.           TCSASOFT | TCSADRAIN : TCSADRAIN, curt));
  4109.   }
  4110.   
  4111.   int
  4112.   nocbreak()
  4113.   {
  4114.   
  4115.       __rawmode = 0;
  4116.       curt = useraw ? &rawt : &__baset;
  4117. !     return (tcsetattr(STDIN_FILENO, __tcaction ?
  4118.           TCSASOFT | TCSADRAIN : TCSADRAIN, curt));
  4119.   }
  4120.       
  4121.   int
  4122.   echo()
  4123.   {
  4124.       rawt.c_lflag |= ECHO;
  4125.       cbreakt.c_lflag |= ECHO;
  4126.       __baset.c_lflag |= ECHO;
  4127.       
  4128.       __echoit = 1;
  4129. !     return (tcsetattr(STDIN_FILENO, __tcaction ?
  4130.           TCSASOFT | TCSADRAIN : TCSADRAIN, curt));
  4131.   }
  4132.   
  4133.   int
  4134.   noecho()
  4135.   {
  4136.       rawt.c_lflag &= ~ECHO;
  4137.       cbreakt.c_lflag &= ~ECHO;
  4138.       __baset.c_lflag &= ~ECHO;
  4139.       
  4140.       __echoit = 0;
  4141. !     return (tcsetattr(STDIN_FILENO, __tcaction ?
  4142.           TCSASOFT | TCSADRAIN : TCSADRAIN, curt));
  4143.   }
  4144.   
  4145.   int
  4146.   nl()
  4147.   {
  4148.       rawt.c_iflag |= ICRNL;
  4149.       rawt.c_oflag |= ONLCR;
  4150.       cbreakt.c_iflag |= ICRNL;
  4151. --- 118,218 ----
  4152.       }
  4153.   
  4154.       curt = &__baset;
  4155. !     ret = (tcsetattr(STDIN_FILENO, __tcaction ?
  4156.           TCSASOFT | TCSADRAIN : TCSADRAIN, curt) ? ERR : OK);
  4157. +     DBUG_RETURN (ret);
  4158.   }
  4159.   
  4160.   int
  4161.   raw()
  4162.   {
  4163. +     int ret;
  4164. +     DBUG_ENTER ("raw");
  4165.       useraw = __pfast = __rawmode = 1;
  4166.       curt = &rawt;
  4167. !     ret = (tcsetattr(STDIN_FILENO, __tcaction ?
  4168.           TCSASOFT | TCSADRAIN : TCSADRAIN, curt));
  4169. +     DBUG_RETURN (ret);
  4170.   }
  4171.   
  4172.   int
  4173.   noraw()
  4174.   {
  4175. +     int ret;
  4176. +     DBUG_ENTER ("noraw");
  4177.       useraw = __pfast = __rawmode = 0;
  4178.       curt = &__baset;
  4179. !     ret = (tcsetattr(STDIN_FILENO, __tcaction ?
  4180.           TCSASOFT | TCSADRAIN : TCSADRAIN, curt));
  4181. +     DBUG_RETURN (ret);
  4182.   }
  4183.   
  4184.   int
  4185.   cbreak()
  4186.   {
  4187. +     int ret;
  4188.   
  4189. +     DBUG_ENTER ("cbreak");
  4190.       __rawmode = 1;
  4191.       curt = useraw ? &rawt : &cbreakt;
  4192. !     ret = (tcsetattr(STDIN_FILENO, __tcaction ?
  4193.           TCSASOFT | TCSADRAIN : TCSADRAIN, curt));
  4194. +     DBUG_RETURN (ret);
  4195.   }
  4196.   
  4197.   int
  4198.   nocbreak()
  4199.   {
  4200. +     int ret;
  4201.   
  4202. +     DBUG_ENTER ("nocbreak");
  4203.       __rawmode = 0;
  4204.       curt = useraw ? &rawt : &__baset;
  4205. !     ret = (tcsetattr(STDIN_FILENO, __tcaction ?
  4206.           TCSASOFT | TCSADRAIN : TCSADRAIN, curt));
  4207. +     DBUG_RETURN (ret);
  4208.   }
  4209.       
  4210.   int
  4211.   echo()
  4212.   {
  4213. +     int ret;
  4214. +     DBUG_ENTER ("echo");
  4215.       rawt.c_lflag |= ECHO;
  4216.       cbreakt.c_lflag |= ECHO;
  4217.       __baset.c_lflag |= ECHO;
  4218.       
  4219.       __echoit = 1;
  4220. !     ret = (tcsetattr(STDIN_FILENO, __tcaction ?
  4221.           TCSASOFT | TCSADRAIN : TCSADRAIN, curt));
  4222. +     DBUG_RETURN (ret);
  4223.   }
  4224.   
  4225.   int
  4226.   noecho()
  4227.   {
  4228. +     int ret;
  4229. +     DBUG_ENTER ("noecho");
  4230.       rawt.c_lflag &= ~ECHO;
  4231.       cbreakt.c_lflag &= ~ECHO;
  4232.       __baset.c_lflag &= ~ECHO;
  4233.       
  4234.       __echoit = 0;
  4235. !     ret = (tcsetattr(STDIN_FILENO, __tcaction ?
  4236.           TCSASOFT | TCSADRAIN : TCSADRAIN, curt));
  4237. +     DBUG_RETURN (ret);
  4238.   }
  4239.   
  4240.   int
  4241.   nl()
  4242.   {
  4243. +     int ret;
  4244. +     DBUG_ENTER ("nl");
  4245.       rawt.c_iflag |= ICRNL;
  4246.       rawt.c_oflag |= ONLCR;
  4247.       cbreakt.c_iflag |= ICRNL;
  4248. ***************
  4249. *** 193,205 ****
  4250.       __baset.c_oflag |= ONLCR;
  4251.   
  4252.       __pfast = __rawmode;
  4253. !     return (tcsetattr(STDIN_FILENO, __tcaction ?
  4254.           TCSASOFT | TCSADRAIN : TCSADRAIN, curt));
  4255.   }
  4256.   
  4257.   int
  4258.   nonl()
  4259.   {
  4260.       rawt.c_iflag &= ~ICRNL;
  4261.       rawt.c_oflag &= ~ONLCR;
  4262.       cbreakt.c_iflag &= ~ICRNL;
  4263. --- 221,237 ----
  4264.       __baset.c_oflag |= ONLCR;
  4265.   
  4266.       __pfast = __rawmode;
  4267. !     ret = (tcsetattr(STDIN_FILENO, __tcaction ?
  4268.           TCSASOFT | TCSADRAIN : TCSADRAIN, curt));
  4269. +     DBUG_RETURN (ret);
  4270.   }
  4271.   
  4272.   int
  4273.   nonl()
  4274.   {
  4275. +     int ret;
  4276. +     DBUG_ENTER ("nonl");
  4277.       rawt.c_iflag &= ~ICRNL;
  4278.       rawt.c_oflag &= ~ONLCR;
  4279.       cbreakt.c_iflag &= ~ICRNL;
  4280. ***************
  4281. *** 208,230 ****
  4282.       __baset.c_oflag &= ~ONLCR;
  4283.   
  4284.       __pfast = 1;
  4285. !     return (tcsetattr(STDIN_FILENO, __tcaction ?
  4286.           TCSASOFT | TCSADRAIN : TCSADRAIN, curt));
  4287.   }
  4288.   
  4289.   void
  4290.   __startwin()
  4291.   {
  4292.       (void)fflush(stdout);
  4293.       (void)setvbuf(stdout, NULL, _IOFBF, 0);
  4294.   
  4295.       tputs(TI, 0, __cputchar);
  4296.       tputs(VS, 0, __cputchar);
  4297.   }
  4298.   
  4299.   int
  4300.   endwin()
  4301.   {
  4302.       __restore_stophandler();
  4303.   
  4304.       if (curscr != NULL) {
  4305. --- 240,268 ----
  4306.       __baset.c_oflag &= ~ONLCR;
  4307.   
  4308.       __pfast = 1;
  4309. !     ret = (tcsetattr(STDIN_FILENO, __tcaction ?
  4310.           TCSASOFT | TCSADRAIN : TCSADRAIN, curt));
  4311. +     DBUG_RETURN (ret);
  4312.   }
  4313.   
  4314.   void
  4315.   __startwin()
  4316.   {
  4317. +     DBUG_ENTER ("__startwin");
  4318.       (void)fflush(stdout);
  4319.       (void)setvbuf(stdout, NULL, _IOFBF, 0);
  4320.   
  4321.       tputs(TI, 0, __cputchar);
  4322.       tputs(VS, 0, __cputchar);
  4323. +     DBUG_VOID_RETURN;
  4324.   }
  4325.   
  4326.   int
  4327.   endwin()
  4328.   {
  4329. +     int ret;
  4330. +     DBUG_ENTER ("endwin");
  4331.       __restore_stophandler();
  4332.   
  4333.       if (curscr != NULL) {
  4334. ***************
  4335. *** 240,247 ****
  4336.       (void)fflush(stdout);
  4337.       (void)setvbuf(stdout, NULL, _IOLBF, 0);
  4338.   
  4339. !     return (tcsetattr(STDIN_FILENO, __tcaction ?
  4340.           TCSASOFT | TCSADRAIN : TCSADRAIN, &__orig_termios));
  4341.   }
  4342.   
  4343.   /*
  4344. --- 278,286 ----
  4345.       (void)fflush(stdout);
  4346.       (void)setvbuf(stdout, NULL, _IOLBF, 0);
  4347.   
  4348. !     ret = (tcsetattr(STDIN_FILENO, __tcaction ?
  4349.           TCSASOFT | TCSADRAIN : TCSADRAIN, &__orig_termios));
  4350. +     DBUG_RETURN (ret);
  4351.   }
  4352.   
  4353.   /*
  4354. ***************
  4355. *** 253,264 ****
  4356.   int
  4357.   savetty()
  4358.   {
  4359. !     return (tcgetattr(STDIN_FILENO, &savedtty));
  4360.   }
  4361.   
  4362.   int
  4363.   resetty()
  4364.   {
  4365. !     return (tcsetattr(STDIN_FILENO, __tcaction ?
  4366.           TCSASOFT | TCSADRAIN : TCSADRAIN, &savedtty));
  4367.   }
  4368. --- 292,311 ----
  4369.   int
  4370.   savetty()
  4371.   {
  4372. !     int ret;
  4373. !     DBUG_ENTER ("savetty");
  4374. !     ret = (tcgetattr(STDIN_FILENO, &savedtty));
  4375. !     DBUG_RETURN (ret);
  4376.   }
  4377.   
  4378.   int
  4379.   resetty()
  4380.   {
  4381. !     int ret;
  4382. !     DBUG_ENTER ("resetty");
  4383. !     ret = (tcsetattr(STDIN_FILENO, __tcaction ?
  4384.           TCSASOFT | TCSADRAIN : TCSADRAIN, &savedtty));
  4385. +     DBUG_RETURN (ret);
  4386.   }
  4387.