]> ncurses.scripts.mit.edu Git - ncurses.git/commitdiff
ncurses 5.7 - patch 20091024
authorThomas E. Dickey <dickey@invisible-island.net>
Sun, 25 Oct 2009 01:06:00 +0000 (01:06 +0000)
committerThomas E. Dickey <dickey@invisible-island.net>
Sun, 25 Oct 2009 01:06:00 +0000 (01:06 +0000)
+ quiet some pedantic gcc warnings.
+ modify _nc_wgetch() to check for a -1 in the fifo, e.g., after a
  SIGWINCH, and discard that value, to avoid confusing application
  (patch by Eygene Ryabinkin, FreeBSD bin/136223).

125 files changed:
NEWS
dist.mk
form/frm_driver.c
ncurses/base/MKlib_gen.sh
ncurses/base/define_key.c
ncurses/base/key_defined.c
ncurses/base/keybound.c
ncurses/base/keyok.c
ncurses/base/legacy_coding.c
ncurses/base/lib_addch.c
ncurses/base/lib_addstr.c
ncurses/base/lib_beep.c
ncurses/base/lib_bkgd.c
ncurses/base/lib_box.c
ncurses/base/lib_chgat.c
ncurses/base/lib_clear.c
ncurses/base/lib_clearok.c
ncurses/base/lib_clrbot.c
ncurses/base/lib_clreol.c
ncurses/base/lib_color.c
ncurses/base/lib_colorset.c
ncurses/base/lib_delch.c
ncurses/base/lib_delwin.c
ncurses/base/lib_dft_fgbg.c
ncurses/base/lib_echo.c
ncurses/base/lib_endwin.c
ncurses/base/lib_erase.c
ncurses/base/lib_flash.c
ncurses/base/lib_getch.c
ncurses/base/lib_getstr.c
ncurses/base/lib_hline.c
ncurses/base/lib_immedok.c
ncurses/base/lib_inchstr.c
ncurses/base/lib_insch.c
ncurses/base/lib_insdel.c
ncurses/base/lib_insnstr.c
ncurses/base/lib_instr.c
ncurses/base/lib_leaveok.c
ncurses/base/lib_mouse.c
ncurses/base/lib_move.c
ncurses/base/lib_mvwin.c
ncurses/base/lib_newterm.c
ncurses/base/lib_newwin.c
ncurses/base/lib_nl.c
ncurses/base/lib_overlay.c
ncurses/base/lib_pad.c
ncurses/base/lib_printw.c
ncurses/base/lib_redrawln.c
ncurses/base/lib_refresh.c
ncurses/base/lib_restart.c
ncurses/base/lib_scanw.c
ncurses/base/lib_screen.c
ncurses/base/lib_scroll.c
ncurses/base/lib_scrollok.c
ncurses/base/lib_scrreg.c
ncurses/base/lib_set_term.c
ncurses/base/lib_slk.c
ncurses/base/lib_slkatr_set.c
ncurses/base/lib_slkatrof.c
ncurses/base/lib_slkatron.c
ncurses/base/lib_slkatrset.c
ncurses/base/lib_slkattr.c
ncurses/base/lib_slkclear.c
ncurses/base/lib_slkcolor.c
ncurses/base/lib_slkinit.c
ncurses/base/lib_slklab.c
ncurses/base/lib_slkrefr.c
ncurses/base/lib_slkset.c
ncurses/base/lib_slktouch.c
ncurses/base/lib_touch.c
ncurses/base/lib_ungetch.c
ncurses/base/lib_vline.c
ncurses/base/lib_wattroff.c
ncurses/base/lib_wattron.c
ncurses/base/lib_winch.c
ncurses/base/lib_window.c
ncurses/base/resizeterm.c
ncurses/base/tries.c
ncurses/base/use_window.c
ncurses/base/wresize.c
ncurses/curses.priv.h
ncurses/tinfo/add_tries.c
ncurses/tinfo/lib_baudrate.c
ncurses/tinfo/lib_cur_term.c
ncurses/tinfo/lib_has_cap.c
ncurses/tinfo/lib_kernel.c
ncurses/tinfo/lib_options.c
ncurses/tinfo/lib_raw.c
ncurses/tinfo/lib_setup.c
ncurses/tinfo/lib_termcap.c
ncurses/tinfo/lib_termname.c
ncurses/tinfo/lib_ti.c
ncurses/tinfo/lib_tputs.c
ncurses/tinfo/lib_ttyflags.c
ncurses/tinfo/use_screen.c
ncurses/trace/lib_trace.c
ncurses/trace/trace_tries.c
ncurses/tty/hardscroll.c
ncurses/tty/lib_mvcur.c
ncurses/tty/lib_vidattr.c
ncurses/tty/tty_update.c
ncurses/widechar/lib_add_wch.c
ncurses/widechar/lib_box_set.c
ncurses/widechar/lib_cchar.c
ncurses/widechar/lib_get_wch.c
ncurses/widechar/lib_get_wstr.c
ncurses/widechar/lib_hline_set.c
ncurses/widechar/lib_in_wch.c
ncurses/widechar/lib_in_wchnstr.c
ncurses/widechar/lib_ins_wch.c
ncurses/widechar/lib_inwstr.c
ncurses/widechar/lib_pecho_wchar.c
ncurses/widechar/lib_unget_wch.c
ncurses/widechar/lib_vline_set.c
test/blue.c
test/bs.c
test/chgat.c
test/clip_printw.c
test/demo_menus.c
test/ditto.c
test/ncurses.c
test/railroad.c
test/test.priv.h
test/test_opaque.c
test/view.c

diff --git a/NEWS b/NEWS
index f79ffcccf0efbd6c7c3155d779cf6410b330f251..b807da1457140f76b3d6499b1535b36f426978b9 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -25,7 +25,7 @@
 -- sale, use or other dealings in this Software without prior written        --
 -- authorization.                                                            --
 -------------------------------------------------------------------------------
--- $Id: NEWS,v 1.1450 2009/10/17 12:41:17 tom Exp $
+-- $Id: NEWS,v 1.1452 2009/10/24 20:34:42 tom Exp $
 -------------------------------------------------------------------------------
 
 This is a log of changes that ncurses has gone through since Zeyd started
@@ -45,6 +45,12 @@ See the AUTHORS file for the corresponding full names.
 Changes through 1.9.9e did not credit all contributions;
 it is not possible to add this information.
 
+20091024
+       + quiet some pedantic gcc warnings.
+       + modify _nc_wgetch() to check for a -1 in the fifo, e.g., after a
+         SIGWINCH, and discard that value, to avoid confusing application
+         (patch by Eygene Ryabinkin, FreeBSD bin/136223).
+
 20091017
        + modify handling of $PKG_CONFIG_LIBDIR to use only the first item in
          a possibly colon-separated list (Debian #550716).
diff --git a/dist.mk b/dist.mk
index bf7f5542486688ef03ad68718cb993ff6ce38127..9352670e6702144df053cf9b706043a74ddc1629 100644 (file)
--- a/dist.mk
+++ b/dist.mk
@@ -25,7 +25,7 @@
 # use or other dealings in this Software without prior written               #
 # authorization.                                                             #
 ##############################################################################
-# $Id: dist.mk,v 1.726 2009/10/17 11:31:45 tom Exp $
+# $Id: dist.mk,v 1.727 2009/10/24 17:18:03 tom Exp $
 # Makefile for creating ncurses distributions.
 #
 # This only needs to be used directly as a makefile by developers, but
@@ -37,7 +37,7 @@ SHELL = /bin/sh
 # These define the major/minor/patch versions of ncurses.
 NCURSES_MAJOR = 5
 NCURSES_MINOR = 7
-NCURSES_PATCH = 20091017
+NCURSES_PATCH = 20091024
 
 # We don't append the patch to the version, since this only applies to releases
 VERSION = $(NCURSES_MAJOR).$(NCURSES_MINOR)
index 4847149ea34f157a3e1cec4dd268c535b1e21df6..1ee4c796d5cf85568abffe2382ae34d6fc3068be 100644 (file)
@@ -32,7 +32,7 @@
 
 #include "form.priv.h"
 
-MODULE_ID("$Id: frm_driver.c,v 1.91 2009/10/10 16:17:01 tom Exp $")
+MODULE_ID("$Id: frm_driver.c,v 1.93 2009/10/24 23:23:32 tom Exp $")
 
 /*----------------------------------------------------------------------------
   This is the core module of the form library. It contains the majority
@@ -663,7 +663,7 @@ Field_Grown(FIELD *field, int amount)
 
          result = TRUE;        /* allow sharing of recovery on failure */
 
-         T((T_CREATE("fieldcell %p"), newbuf));
+         T((T_CREATE("fieldcell %p"), (void *)newbuf));
          field->buf = newbuf;
          for (i = 0; i <= field->nbuf; i++)
            {
@@ -752,7 +752,7 @@ Field_Grown(FIELD *field, int amount)
 static int
 Field_encloses(FIELD *field, int ry, int rx)
 {
-  T((T_CALLED("Field_encloses(%p)"), field));
+  T((T_CALLED("Field_encloses(%p)"), (void *)field));
   if (field != 0
       && field->frow <= ry
       && (field->frow + field->rows) > ry
@@ -825,7 +825,7 @@ _nc_Refresh_Current_Field(FORM *form)
   WINDOW *formwin;
   FIELD *field;
 
-  T((T_CALLED("_nc_Refresh_Current_Field(%p)"), form));
+  T((T_CALLED("_nc_Refresh_Current_Field(%p)"), (void *)form));
 
   if (!form)
     RETURN(E_BAD_ARGUMENT);
@@ -1201,7 +1201,7 @@ _nc_Synchronize_Attributes(FIELD *field)
   int res = E_OK;
   WINDOW *formwin;
 
-  T((T_CALLED("_nc_Synchronize_Attributes(%p)"), field));
+  T((T_CALLED("_nc_Synchronize_Attributes(%p)"), (void *)field));
 
   if (!field)
     returnCode(E_BAD_ARGUMENT);
@@ -1268,7 +1268,7 @@ _nc_Synchronize_Options(FIELD *field, Field_Options newopts)
   FORM *form;
   int res = E_OK;
 
-  T((T_CALLED("_nc_Synchronize_Options(%p,%#x)"), field, newopts));
+  T((T_CALLED("_nc_Synchronize_Options(%p,%#x)"), (void *)field, newopts));
 
   if (!field)
     returnCode(E_BAD_ARGUMENT);
@@ -1369,7 +1369,7 @@ _nc_Set_Current_Field(FORM *form, FIELD *newfield)
   FIELD *field;
   WINDOW *new_window;
 
-  T((T_CALLED("_nc_Set_Current_Field(%p,%p)"), form, newfield));
+  T((T_CALLED("_nc_Set_Current_Field(%p,%p)"), (void *)form, (void *)newfield));
 
   if (!form || !newfield || !form->current || (newfield->form != form))
     returnCode(E_BAD_ARGUMENT);
@@ -1476,7 +1476,7 @@ IFN_Next_Character(FORM *form)
   FIELD *field = form->current;
   int step = myWCWIDTH(form->w, form->currow, form->curcol);
 
-  T((T_CALLED("IFN_Next_Character(%p)"), form));
+  T((T_CALLED("IFN_Next_Character(%p)"), (void *)form));
   if ((form->curcol += step) == field->dcols)
     {
       if ((++(form->currow)) == field->drows)
@@ -1518,7 +1518,7 @@ IFN_Previous_Character(FORM *form)
   int amount = myWCWIDTH(form->w, form->currow, form->curcol - 1);
   int oldcol = form->curcol;
 
-  T((T_CALLED("IFN_Previous_Character(%p)"), form));
+  T((T_CALLED("IFN_Previous_Character(%p)"), (void *)form));
   if ((form->curcol -= amount) < 0)
     {
       if ((--(form->currow)) < 0)
@@ -1546,7 +1546,7 @@ IFN_Next_Line(FORM *form)
 {
   FIELD *field = form->current;
 
-  T((T_CALLED("IFN_Next_Line(%p)"), form));
+  T((T_CALLED("IFN_Next_Line(%p)"), (void *)form));
   if ((++(form->currow)) == field->drows)
     {
 #if GROW_IF_NAVIGATE
@@ -1572,7 +1572,7 @@ IFN_Next_Line(FORM *form)
 static int
 IFN_Previous_Line(FORM *form)
 {
-  T((T_CALLED("IFN_Previous_Line(%p)"), form));
+  T((T_CALLED("IFN_Previous_Line(%p)"), (void *)form));
   if ((--(form->currow)) < 0)
     {
       form->currow++;
@@ -1599,7 +1599,7 @@ IFN_Next_Word(FORM *form)
   FIELD_CELL *s;
   FIELD_CELL *t;
 
-  T((T_CALLED("IFN_Next_Word(%p)"), form));
+  T((T_CALLED("IFN_Next_Word(%p)"), (void *)form));
 
   /* We really need access to the data, so we have to synchronize */
   Synchronize_Buffer(form);
@@ -1642,7 +1642,7 @@ IFN_Previous_Word(FORM *form)
   FIELD_CELL *t;
   bool again = FALSE;
 
-  T((T_CALLED("IFN_Previous_Word(%p)"), form));
+  T((T_CALLED("IFN_Previous_Word(%p)"), (void *)form));
 
   /* We really need access to the data, so we have to synchronize */
   Synchronize_Buffer(form);
@@ -1692,7 +1692,7 @@ IFN_Beginning_Of_Field(FORM *form)
 {
   FIELD *field = form->current;
 
-  T((T_CALLED("IFN_Beginning_Of_Field(%p)"), form));
+  T((T_CALLED("IFN_Beginning_Of_Field(%p)"), (void *)form));
   Synchronize_Buffer(form);
   Adjust_Cursor_Position(form,
                         Get_Start_Of_Data(field->buf, Buffer_Length(field)));
@@ -1716,7 +1716,7 @@ IFN_End_Of_Field(FORM *form)
   FIELD *field = form->current;
   FIELD_CELL *pos;
 
-  T((T_CALLED("IFN_End_Of_Field(%p)"), form));
+  T((T_CALLED("IFN_End_Of_Field(%p)"), (void *)form));
   Synchronize_Buffer(form);
   pos = After_End_Of_Data(field->buf, Buffer_Length(field));
   if (pos == (field->buf + Buffer_Length(field)))
@@ -1739,7 +1739,7 @@ IFN_Beginning_Of_Line(FORM *form)
 {
   FIELD *field = form->current;
 
-  T((T_CALLED("IFN_Beginning_Of_Line(%p)"), form));
+  T((T_CALLED("IFN_Beginning_Of_Line(%p)"), (void *)form));
   Synchronize_Buffer(form);
   Adjust_Cursor_Position(form,
                         Get_Start_Of_Data(Address_Of_Current_Row_In_Buffer(form),
@@ -1765,7 +1765,7 @@ IFN_End_Of_Line(FORM *form)
   FIELD_CELL *pos;
   FIELD_CELL *bp;
 
-  T((T_CALLED("IFN_End_Of_Line(%p)"), form));
+  T((T_CALLED("IFN_End_Of_Line(%p)"), (void *)form));
   Synchronize_Buffer(form);
   bp = Address_Of_Current_Row_In_Buffer(form);
   pos = After_End_Of_Data(bp, field->dcols);
@@ -1791,7 +1791,7 @@ IFN_Left_Character(FORM *form)
   int amount = myWCWIDTH(form->w, form->currow, form->curcol - 1);
   int oldcol = form->curcol;
 
-  T((T_CALLED("IFN_Left_Character(%p)"), form));
+  T((T_CALLED("IFN_Left_Character(%p)"), (void *)form));
   if ((form->curcol -= amount) < 0)
     {
       form->curcol = oldcol;
@@ -1816,7 +1816,7 @@ IFN_Right_Character(FORM *form)
   int amount = myWCWIDTH(form->w, form->currow, form->curcol);
   int oldcol = form->curcol;
 
-  T((T_CALLED("IFN_Right_Character(%p)"), form));
+  T((T_CALLED("IFN_Right_Character(%p)"), (void *)form));
   if ((form->curcol += amount) >= form->current->dcols)
     {
 #if GROW_IF_NAVIGATE
@@ -1844,7 +1844,7 @@ IFN_Right_Character(FORM *form)
 static int
 IFN_Up_Character(FORM *form)
 {
-  T((T_CALLED("IFN_Up_Character(%p)"), form));
+  T((T_CALLED("IFN_Up_Character(%p)"), (void *)form));
   if ((--(form->currow)) < 0)
     {
       form->currow++;
@@ -1868,7 +1868,7 @@ IFN_Down_Character(FORM *form)
 {
   FIELD *field = form->current;
 
-  T((T_CALLED("IFN_Down_Character(%p)"), form));
+  T((T_CALLED("IFN_Down_Character(%p)"), (void *)form));
   if ((++(form->currow)) == field->drows)
     {
 #if GROW_IF_NAVIGATE
@@ -1977,7 +1977,7 @@ Vertical_Scrolling(int (*const fct) (FORM *), FORM *form)
 static int
 VSC_Scroll_Line_Forward(FORM *form)
 {
-  T((T_CALLED("VSC_Scroll_Line_Forward(%p)"), form));
+  T((T_CALLED("VSC_Scroll_Line_Forward(%p)"), (void *)form));
   returnCode(VSC_Generic(form, 1));
 }
 
@@ -1993,7 +1993,7 @@ VSC_Scroll_Line_Forward(FORM *form)
 static int
 VSC_Scroll_Line_Backward(FORM *form)
 {
-  T((T_CALLED("VSC_Scroll_Line_Backward(%p)"), form));
+  T((T_CALLED("VSC_Scroll_Line_Backward(%p)"), (void *)form));
   returnCode(VSC_Generic(form, -1));
 }
 
@@ -2009,7 +2009,7 @@ VSC_Scroll_Line_Backward(FORM *form)
 static int
 VSC_Scroll_Page_Forward(FORM *form)
 {
-  T((T_CALLED("VSC_Scroll_Page_Forward(%p)"), form));
+  T((T_CALLED("VSC_Scroll_Page_Forward(%p)"), (void *)form));
   returnCode(VSC_Generic(form, form->current->rows));
 }
 
@@ -2025,7 +2025,7 @@ VSC_Scroll_Page_Forward(FORM *form)
 static int
 VSC_Scroll_Half_Page_Forward(FORM *form)
 {
-  T((T_CALLED("VSC_Scroll_Half_Page_Forward(%p)"), form));
+  T((T_CALLED("VSC_Scroll_Half_Page_Forward(%p)"), (void *)form));
   returnCode(VSC_Generic(form, (form->current->rows + 1) / 2));
 }
 
@@ -2041,7 +2041,7 @@ VSC_Scroll_Half_Page_Forward(FORM *form)
 static int
 VSC_Scroll_Page_Backward(FORM *form)
 {
-  T((T_CALLED("VSC_Scroll_Page_Backward(%p)"), form));
+  T((T_CALLED("VSC_Scroll_Page_Backward(%p)"), (void *)form));
   returnCode(VSC_Generic(form, -(form->current->rows)));
 }
 
@@ -2057,7 +2057,7 @@ VSC_Scroll_Page_Backward(FORM *form)
 static int
 VSC_Scroll_Half_Page_Backward(FORM *form)
 {
-  T((T_CALLED("VSC_Scroll_Half_Page_Backward(%p)"), form));
+  T((T_CALLED("VSC_Scroll_Half_Page_Backward(%p)"), (void *)form));
   returnCode(VSC_Generic(form, -((form->current->rows + 1) / 2)));
 }
 /*----------------------------------------------------------------------------
@@ -2151,7 +2151,7 @@ Horizontal_Scrolling(int (*const fct) (FORM *), FORM *form)
 static int
 HSC_Scroll_Char_Forward(FORM *form)
 {
-  T((T_CALLED("HSC_Scroll_Char_Forward(%p)"), form));
+  T((T_CALLED("HSC_Scroll_Char_Forward(%p)"), (void *)form));
   returnCode(HSC_Generic(form, 1));
 }
 
@@ -2167,7 +2167,7 @@ HSC_Scroll_Char_Forward(FORM *form)
 static int
 HSC_Scroll_Char_Backward(FORM *form)
 {
-  T((T_CALLED("HSC_Scroll_Char_Backward(%p)"), form));
+  T((T_CALLED("HSC_Scroll_Char_Backward(%p)"), (void *)form));
   returnCode(HSC_Generic(form, -1));
 }
 
@@ -2183,7 +2183,7 @@ HSC_Scroll_Char_Backward(FORM *form)
 static int
 HSC_Horizontal_Line_Forward(FORM *form)
 {
-  T((T_CALLED("HSC_Horizontal_Line_Forward(%p)"), form));
+  T((T_CALLED("HSC_Horizontal_Line_Forward(%p)"), (void *)form));
   returnCode(HSC_Generic(form, form->current->cols));
 }
 
@@ -2199,7 +2199,7 @@ HSC_Horizontal_Line_Forward(FORM *form)
 static int
 HSC_Horizontal_Half_Line_Forward(FORM *form)
 {
-  T((T_CALLED("HSC_Horizontal_Half_Line_Forward(%p)"), form));
+  T((T_CALLED("HSC_Horizontal_Half_Line_Forward(%p)"), (void *)form));
   returnCode(HSC_Generic(form, (form->current->cols + 1) / 2));
 }
 
@@ -2215,7 +2215,7 @@ HSC_Horizontal_Half_Line_Forward(FORM *form)
 static int
 HSC_Horizontal_Line_Backward(FORM *form)
 {
-  T((T_CALLED("HSC_Horizontal_Line_Backward(%p)"), form));
+  T((T_CALLED("HSC_Horizontal_Line_Backward(%p)"), (void *)form));
   returnCode(HSC_Generic(form, -(form->current->cols)));
 }
 
@@ -2231,7 +2231,7 @@ HSC_Horizontal_Line_Backward(FORM *form)
 static int
 HSC_Horizontal_Half_Line_Backward(FORM *form)
 {
-  T((T_CALLED("HSC_Horizontal_Half_Line_Backward(%p)"), form));
+  T((T_CALLED("HSC_Horizontal_Half_Line_Backward(%p)"), (void *)form));
   returnCode(HSC_Generic(form, -((form->current->cols + 1) / 2)));
 }
 
@@ -2527,7 +2527,7 @@ FE_New_Line(FORM *form)
   FIELD_CELL *bp, *t;
   bool Last_Row = ((field->drows - 1) == form->currow);
 
-  T((T_CALLED("FE_New_Line(%p)"), form));
+  T((T_CALLED("FE_New_Line(%p)"), (void *)form));
   if (form->status & _OVLMODE)
     {
       if (Last_Row &&
@@ -2610,7 +2610,7 @@ FE_Insert_Character(FORM *form)
   FIELD *field = form->current;
   int result = E_REQUEST_DENIED;
 
-  T((T_CALLED("FE_Insert_Character(%p)"), form));
+  T((T_CALLED("FE_Insert_Character(%p)"), (void *)form));
   if (Check_Char(field->type, (int)C_BLANK, (TypeArgument *)(field->arg)))
     {
       bool There_Is_Room = Is_There_Room_For_A_Char_In_Line(form);
@@ -2645,7 +2645,7 @@ FE_Insert_Line(FORM *form)
   FIELD *field = form->current;
   int result = E_REQUEST_DENIED;
 
-  T((T_CALLED("FE_Insert_Line(%p)"), form));
+  T((T_CALLED("FE_Insert_Line(%p)"), (void *)form));
   if (Check_Char(field->type, (int)C_BLANK, (TypeArgument *)(field->arg)))
     {
       bool Maybe_Done = (form->currow != (field->drows - 1)) &&
@@ -2678,7 +2678,7 @@ FE_Insert_Line(FORM *form)
 static int
 FE_Delete_Character(FORM *form)
 {
-  T((T_CALLED("FE_Delete_Character(%p)"), form));
+  T((T_CALLED("FE_Delete_Character(%p)"), (void *)form));
   DeleteChar(form);
   returnCode(E_OK);
 }
@@ -2701,7 +2701,7 @@ FE_Delete_Previous(FORM *form)
 {
   FIELD *field = form->current;
 
-  T((T_CALLED("FE_Delete_Previous(%p)"), form));
+  T((T_CALLED("FE_Delete_Previous(%p)"), (void *)form));
   if (First_Position_In_Current_Field(form))
     returnCode(E_REQUEST_DENIED);
 
@@ -2769,7 +2769,7 @@ FE_Delete_Previous(FORM *form)
 static int
 FE_Delete_Line(FORM *form)
 {
-  T((T_CALLED("FE_Delete_Line(%p)"), form));
+  T((T_CALLED("FE_Delete_Line(%p)"), (void *)form));
   form->curcol = 0;
   wdeleteln(form->w);
   returnCode(E_OK);
@@ -2793,7 +2793,7 @@ FE_Delete_Word(FORM *form)
   FIELD_CELL *cp = bp + form->curcol;
   FIELD_CELL *s;
 
-  T((T_CALLED("FE_Delete_Word(%p)"), form));
+  T((T_CALLED("FE_Delete_Word(%p)"), (void *)form));
   Synchronize_Buffer(form);
   if (ISBLANK(*cp))
     returnCode(E_REQUEST_DENIED);      /* not in word */
@@ -2827,7 +2827,7 @@ FE_Delete_Word(FORM *form)
 static int
 FE_Clear_To_End_Of_Line(FORM *form)
 {
-  T((T_CALLED("FE_Clear_To_End_Of_Line(%p)"), form));
+  T((T_CALLED("FE_Clear_To_End_Of_Line(%p)"), (void *)form));
   wmove(form->w, form->currow, form->curcol);
   wclrtoeol(form->w);
   returnCode(E_OK);
@@ -2844,7 +2844,7 @@ FE_Clear_To_End_Of_Line(FORM *form)
 static int
 FE_Clear_To_End_Of_Field(FORM *form)
 {
-  T((T_CALLED("FE_Clear_To_End_Of_Field(%p)"), form));
+  T((T_CALLED("FE_Clear_To_End_Of_Field(%p)"), (void *)form));
   wmove(form->w, form->currow, form->curcol);
   wclrtobot(form->w);
   returnCode(E_OK);
@@ -2861,7 +2861,7 @@ FE_Clear_To_End_Of_Field(FORM *form)
 static int
 FE_Clear_Field(FORM *form)
 {
-  T((T_CALLED("FE_Clear_Field(%p)"), form));
+  T((T_CALLED("FE_Clear_Field(%p)"), (void *)form));
   form->currow = form->curcol = 0;
   werase(form->w);
   returnCode(E_OK);
@@ -2885,7 +2885,7 @@ FE_Clear_Field(FORM *form)
 static int
 EM_Overlay_Mode(FORM *form)
 {
-  T((T_CALLED("EM_Overlay_Mode(%p)"), form));
+  T((T_CALLED("EM_Overlay_Mode(%p)"), (void *)form));
   form->status |= _OVLMODE;
   returnCode(E_OK);
 }
@@ -2901,7 +2901,7 @@ EM_Overlay_Mode(FORM *form)
 static int
 EM_Insert_Mode(FORM *form)
 {
-  T((T_CALLED("EM_Insert_Mode(%p)"), form));
+  T((T_CALLED("EM_Insert_Mode(%p)"), (void *)form));
   form->status &= ~_OVLMODE;
   returnCode(E_OK);
 }
@@ -3001,7 +3001,7 @@ CR_Next_Choice(FORM *form)
 {
   FIELD *field = form->current;
 
-  T((T_CALLED("CR_Next_Choice(%p)"), form));
+  T((T_CALLED("CR_Next_Choice(%p)"), (void *)form));
   Synchronize_Buffer(form);
   returnCode((Next_Choice(field->type, field, (TypeArgument *)(field->arg)))
             ? E_OK
@@ -3022,7 +3022,7 @@ CR_Previous_Choice(FORM *form)
 {
   FIELD *field = form->current;
 
-  T((T_CALLED("CR_Previous_Choice(%p)"), form));
+  T((T_CALLED("CR_Previous_Choice(%p)"), (void *)form));
   Synchronize_Buffer(form);
   returnCode((Previous_Choice(field->type, field, (TypeArgument *)(field->arg)))
             ? E_OK
@@ -3132,7 +3132,7 @@ _nc_Internal_Validation(FORM *form)
 static int
 FV_Validation(FORM *form)
 {
-  T((T_CALLED("FV_Validation(%p)"), form));
+  T((T_CALLED("FV_Validation(%p)"), (void *)form));
   if (_nc_Internal_Validation(form))
     returnCode(E_OK);
   else
@@ -3510,7 +3510,7 @@ Inter_Field_Navigation(int (*const fct) (FORM *), FORM *form)
 static int
 FN_Next_Field(FORM *form)
 {
-  T((T_CALLED("FN_Next_Field(%p)"), form));
+  T((T_CALLED("FN_Next_Field(%p)"), (void *)form));
   returnCode(_nc_Set_Current_Field(form,
                                   Next_Field_On_Page(form->current)));
 }
@@ -3528,7 +3528,7 @@ FN_Next_Field(FORM *form)
 static int
 FN_Previous_Field(FORM *form)
 {
-  T((T_CALLED("FN_Previous_Field(%p)"), form));
+  T((T_CALLED("FN_Previous_Field(%p)"), (void *)form));
   returnCode(_nc_Set_Current_Field(form,
                                   Previous_Field_On_Page(form->current)));
 }
@@ -3545,7 +3545,7 @@ FN_Previous_Field(FORM *form)
 static int
 FN_First_Field(FORM *form)
 {
-  T((T_CALLED("FN_First_Field(%p)"), form));
+  T((T_CALLED("FN_First_Field(%p)"), (void *)form));
   returnCode(_nc_Set_Current_Field(form,
                                   Next_Field_On_Page(form->field[form->page[form->curpage].pmax])));
 }
@@ -3562,7 +3562,7 @@ FN_First_Field(FORM *form)
 static int
 FN_Last_Field(FORM *form)
 {
-  T((T_CALLED("FN_Last_Field(%p)"), form));
+  T((T_CALLED("FN_Last_Field(%p)"), (void *)form));
   returnCode(
              _nc_Set_Current_Field(form,
                                    Previous_Field_On_Page(form->field[form->page[form->curpage].pmin])));
@@ -3581,7 +3581,7 @@ FN_Last_Field(FORM *form)
 static int
 FN_Sorted_Next_Field(FORM *form)
 {
-  T((T_CALLED("FN_Sorted_Next_Field(%p)"), form));
+  T((T_CALLED("FN_Sorted_Next_Field(%p)"), (void *)form));
   returnCode(_nc_Set_Current_Field(form,
                                   Sorted_Next_Field(form->current)));
 }
@@ -3599,7 +3599,7 @@ FN_Sorted_Next_Field(FORM *form)
 static int
 FN_Sorted_Previous_Field(FORM *form)
 {
-  T((T_CALLED("FN_Sorted_Previous_Field(%p)"), form));
+  T((T_CALLED("FN_Sorted_Previous_Field(%p)"), (void *)form));
   returnCode(_nc_Set_Current_Field(form,
                                   Sorted_Previous_Field(form->current)));
 }
@@ -3617,7 +3617,7 @@ FN_Sorted_Previous_Field(FORM *form)
 static int
 FN_Sorted_First_Field(FORM *form)
 {
-  T((T_CALLED("FN_Sorted_First_Field(%p)"), form));
+  T((T_CALLED("FN_Sorted_First_Field(%p)"), (void *)form));
   returnCode(_nc_Set_Current_Field(form,
                                   Sorted_Next_Field(form->field[form->page[form->curpage].smax])));
 }
@@ -3635,7 +3635,7 @@ FN_Sorted_First_Field(FORM *form)
 static int
 FN_Sorted_Last_Field(FORM *form)
 {
-  T((T_CALLED("FN_Sorted_Last_Field(%p)"), form));
+  T((T_CALLED("FN_Sorted_Last_Field(%p)"), (void *)form));
   returnCode(_nc_Set_Current_Field(form,
                                   Sorted_Previous_Field(form->field[form->page[form->curpage].smin])));
 }
@@ -3653,7 +3653,7 @@ FN_Sorted_Last_Field(FORM *form)
 static int
 FN_Left_Field(FORM *form)
 {
-  T((T_CALLED("FN_Left_Field(%p)"), form));
+  T((T_CALLED("FN_Left_Field(%p)"), (void *)form));
   returnCode(_nc_Set_Current_Field(form,
                                   Left_Neighbor_Field(form->current)));
 }
@@ -3671,7 +3671,7 @@ FN_Left_Field(FORM *form)
 static int
 FN_Right_Field(FORM *form)
 {
-  T((T_CALLED("FN_Right_Field(%p)"), form));
+  T((T_CALLED("FN_Right_Field(%p)"), (void *)form));
   returnCode(_nc_Set_Current_Field(form,
                                   Right_Neighbor_Field(form->current)));
 }
@@ -3691,7 +3691,7 @@ FN_Right_Field(FORM *form)
 static int
 FN_Up_Field(FORM *form)
 {
-  T((T_CALLED("FN_Up_Field(%p)"), form));
+  T((T_CALLED("FN_Up_Field(%p)"), (void *)form));
   returnCode(_nc_Set_Current_Field(form,
                                   Upper_Neighbor_Field(form->current)));
 }
@@ -3711,7 +3711,7 @@ FN_Up_Field(FORM *form)
 static int
 FN_Down_Field(FORM *form)
 {
-  T((T_CALLED("FN_Down_Field(%p)"), form));
+  T((T_CALLED("FN_Down_Field(%p)"), (void *)form));
   returnCode(_nc_Set_Current_Field(form,
                                   Down_Neighbor_Field(form->current)));
 }
@@ -3855,7 +3855,7 @@ Page_Navigation(int (*const fct) (FORM *), FORM *form)
 static int
 PN_Next_Page(FORM *form)
 {
-  T((T_CALLED("PN_Next_Page(%p)"), form));
+  T((T_CALLED("PN_Next_Page(%p)"), (void *)form));
   returnCode(_nc_Set_Form_Page(form, Next_Page_Number(form), (FIELD *)0));
 }
 
@@ -3871,7 +3871,7 @@ PN_Next_Page(FORM *form)
 static int
 PN_Previous_Page(FORM *form)
 {
-  T((T_CALLED("PN_Previous_Page(%p)"), form));
+  T((T_CALLED("PN_Previous_Page(%p)"), (void *)form));
   returnCode(_nc_Set_Form_Page(form, Previous_Page_Number(form), (FIELD *)0));
 }
 
@@ -3887,7 +3887,7 @@ PN_Previous_Page(FORM *form)
 static int
 PN_First_Page(FORM *form)
 {
-  T((T_CALLED("PN_First_Page(%p)"), form));
+  T((T_CALLED("PN_First_Page(%p)"), (void *)form));
   returnCode(_nc_Set_Form_Page(form, 0, (FIELD *)0));
 }
 
@@ -3903,7 +3903,7 @@ PN_First_Page(FORM *form)
 static int
 PN_Last_Page(FORM *form)
 {
-  T((T_CALLED("PN_Last_Page(%p)"), form));
+  T((T_CALLED("PN_Last_Page(%p)"), (void *)form));
   returnCode(_nc_Set_Form_Page(form, form->maxpage - 1, (FIELD *)0));
 }
 
@@ -3932,7 +3932,7 @@ Data_Entry(FORM *form, int c)
   FIELD *field = form->current;
   int result = E_REQUEST_DENIED;
 
-  T((T_CALLED("Data_Entry(%p,%s)"), form, _tracechtype((chtype)c)));
+  T((T_CALLED("Data_Entry(%p,%s)"), (void *)form, _tracechtype((chtype)c)));
   if ((field->opts & O_EDIT)
 #if FIX_FORM_INACTIVE_BUG
       && (field->opts & O_ACTIVE)
@@ -4133,7 +4133,7 @@ form_driver(FORM *form, int c)
   const Binding_Info *BI = (Binding_Info *) 0;
   int res = E_UNKNOWN_COMMAND;
 
-  T((T_CALLED("form_driver(%p,%d)"), form, c));
+  T((T_CALLED("form_driver(%p,%d)"), (void *)form, c));
 
   if (!form)
     RETURN(E_BAD_ARGUMENT);
@@ -4330,7 +4330,7 @@ set_field_buffer(FIELD *field, int buffer, const char *value)
   FIELD_CELL *widevalue = 0;
 #endif
 
-  T((T_CALLED("set_field_buffer(%p,%d,%s)"), field, buffer, _nc_visbuf(value)));
+  T((T_CALLED("set_field_buffer(%p,%d,%s)"), (void *)field, buffer, _nc_visbuf(value)));
 
   if (!field || !value || ((buffer < 0) || (buffer > field->nbuf)))
     RETURN(E_BAD_ARGUMENT);
@@ -4438,7 +4438,7 @@ field_buffer(const FIELD *field, int buffer)
 {
   char *result = 0;
 
-  T((T_CALLED("field_buffer(%p,%d)"), field, buffer));
+  T((T_CALLED("field_buffer(%p,%d)"), (const void *)field, buffer));
 
   if (field && (buffer >= 0) && (buffer <= field->nbuf))
     {
@@ -4484,22 +4484,6 @@ field_buffer(const FIELD *field, int buffer)
 
 #if USE_WIDEC_SUPPORT
 
-/* FIXME: see lib_get_wch.c */
-#if HAVE_MBTOWC && HAVE_MBLEN
-#define reset_mbytes(state) mblen(NULL, 0), mbtowc(NULL, NULL, 0)
-#define count_mbytes(buffer,length,state) mblen(buffer,length)
-#define trans_mbytes(wch,buffer,length,state) \
-       (int) mbtowc(&wch, buffer, length)
-#elif HAVE_MBRTOWC && HAVE_MBRLEN
-#define NEED_STATE
-#define reset_mbytes(state) init_mb(state)
-#define count_mbytes(buffer,length,state) mbrlen(buffer,length,&state)
-#define trans_mbytes(wch,buffer,length,state) \
-       (int) mbrtowc(&wch, buffer, length, &state)
-#else
-make an error
-#endif
-
 /*---------------------------------------------------------------------------
 | Convert a multibyte string to a wide-character string.  The result must be
 | freed by the caller.
@@ -4514,7 +4498,7 @@ _nc_Widen_String(char *source, int *lengthp)
   int pass;
   int status;
 
-#ifdef NEED_STATE
+#ifndef state_unused
   mbstate_t state;
 #endif
 
@@ -4533,7 +4517,7 @@ _nc_Widen_String(char *source, int *lengthp)
 
              source[passed + tries] = 0;
              reset_mbytes(state);
-             status = trans_mbytes(wch, source + passed, tries, state);
+             status = check_mbytes(wch, source + passed, tries, state);
              source[passed + tries] = (char)save;
 
              if (status > 0)
index 3171ed3fa8a5eedc485185c7ae4825f70eb47f58..4f3d38e3bd3fe2418a736a541f748a5d33f8aeed 100755 (executable)
@@ -2,10 +2,10 @@
 #
 # MKlib_gen.sh -- generate sources from curses.h macro definitions
 #
-# ($Id: MKlib_gen.sh,v 1.35 2008/11/16 00:19:59 juergen Exp $)
+# ($Id: MKlib_gen.sh,v 1.36 2009/10/24 20:34:05 tom Exp $)
 #
 ##############################################################################
-# Copyright (c) 1998-2007,2008 Free Software Foundation, Inc.                #
+# Copyright (c) 1998-2008,2009 Free Software Foundation, Inc.                #
 #                                                                            #
 # Permission is hereby granted, free of charge, to any person obtaining a    #
 # copy of this software and associated documentation files (the "Software"), #
@@ -289,8 +289,10 @@ $0 !~ /^P_/ {
                                        call = call "%s"
                                        comma = comma "_nc_visbuf2(" num ","
                                        pointer = 0;
-                               } else
+                               } else {
                                        call = call "%p"
+                                       comma = comma "(const void *)"
+                               }
                        } else if (argcount != 0) {
                                if ( argtype == "int" || argtype == "short" ) {
                                        call = call "%d"
index d2ebd6ef5a3997dc4b53f9e43f86f13c975e9d0c..5fdce79fec5bac1f0ea9f3c65e0bfaafcd0bd56c 100644 (file)
 
 #include <curses.priv.h>
 
-MODULE_ID("$Id: define_key.c,v 1.17 2009/05/09 18:30:16 tom Exp $")
+MODULE_ID("$Id: define_key.c,v 1.18 2009/10/24 22:15:47 tom Exp $")
 
 NCURSES_EXPORT(int)
 NCURSES_SP_NAME(define_key) (NCURSES_SP_DCLx const char *str, int keycode)
 {
     int code = ERR;
 
-    T((T_CALLED("define_key(%p, %s,%d)"), SP_PARM, _nc_visbuf(str), keycode));
+    T((T_CALLED("define_key(%p, %s,%d)"), (void *) SP_PARM, _nc_visbuf(str), keycode));
     if (SP_PARM == 0 || !HasTInfoTerminal(SP_PARM)) {
        code = ERR;
     } else if (keycode > 0) {
index f8f2346614bf7ee8d5680825e00a0d9859bf8146..ef987a5484d561bc87647b80852bfb710b1347de 100644 (file)
@@ -32,7 +32,7 @@
 
 #include <curses.priv.h>
 
-MODULE_ID("$Id: key_defined.c,v 1.8 2009/02/21 16:24:26 tom Exp $")
+MODULE_ID("$Id: key_defined.c,v 1.9 2009/10/24 22:15:47 tom Exp $")
 
 static int
 find_definition(TRIES * tree, const char *str)
@@ -69,7 +69,7 @@ NCURSES_SP_NAME(key_defined) (NCURSES_SP_DCLx const char *str)
 {
     int code = ERR;
 
-    T((T_CALLED("key_defined(%p, %s)"), SP_PARM, _nc_visbuf(str)));
+    T((T_CALLED("key_defined(%p, %s)"), (void *) SP_PARM, _nc_visbuf(str)));
     if (SP_PARM != 0 && str != 0) {
        code = find_definition(SP_PARM->_keytry, str);
     }
index 70936359b44f6250a674da2ff26b3fa979e334d2..65e6bfc636202c190bdc1de2a11929fb4615efb0 100644 (file)
@@ -33,7 +33,7 @@
 
 #include <curses.priv.h>
 
-MODULE_ID("$Id: keybound.c,v 1.9 2009/02/21 16:32:34 tom Exp $")
+MODULE_ID("$Id: keybound.c,v 1.10 2009/10/24 22:15:47 tom Exp $")
 
 /*
  * Returns the count'th string definition which is associated with the
@@ -44,7 +44,7 @@ NCURSES_SP_NAME(keybound) (NCURSES_SP_DCLx int code, int count)
 {
     char *result = 0;
 
-    T((T_CALLED("keybound(%p, %d,%d)"), SP_PARM, code, count));
+    T((T_CALLED("keybound(%p, %d,%d)"), (void *) SP_PARM, code, count));
     if (SP_PARM != 0 && code >= 0) {
        result = _nc_expand_try(SP_PARM->_keytry, (unsigned) code, &count, 0);
     }
index ed00ba75956001b8fcb49252213904082292558d..0eacf49263001aa9c2b7388860605c8ad7d91baf 100644 (file)
@@ -33,7 +33,7 @@
 
 #include <curses.priv.h>
 
-MODULE_ID("$Id: keyok.c,v 1.9 2009/06/06 19:24:57 tom Exp $")
+MODULE_ID("$Id: keyok.c,v 1.10 2009/10/24 22:15:47 tom Exp $")
 
 /*
  * Enable (or disable) ncurses' interpretation of a keycode by adding (or
@@ -50,7 +50,7 @@ NCURSES_SP_NAME(keyok) (NCURSES_SP_DCLx int c, bool flag)
 {
     int code = ERR;
 
-    T((T_CALLED("keyok(%p, %d,%d)"), SP_PARM, c, flag));
+    T((T_CALLED("keyok(%p, %d,%d)"), (void *) SP_PARM, c, flag));
 #ifdef USE_TERM_DRIVER
     code = CallDriver_2(sp, kyOk, c, flag);
 #else
index b347cea7d06f22ccef1abced130bc59f83967ce5..d8c80208c6a90d1ec8ce3c4f59829c4b0258567e 100644 (file)
 
 #include <curses.priv.h>
 
-MODULE_ID("$Id: legacy_coding.c,v 1.4 2009/02/21 16:16:38 tom Exp $")
+MODULE_ID("$Id: legacy_coding.c,v 1.5 2009/10/24 22:15:00 tom Exp $")
 
 NCURSES_EXPORT(int)
 NCURSES_SP_NAME(use_legacy_coding) (NCURSES_SP_DCLx int level)
 {
     int result = ERR;
 
-    T((T_CALLED("use_legacy_coding(%p,%d)"), SP_PARM, level));
+    T((T_CALLED("use_legacy_coding(%p,%d)"), (void *) SP_PARM, level));
     if (level >= 0 && level <= 2 && SP_PARM != 0) {
        result = SP_PARM->_legacy_coding;
        SP_PARM->_legacy_coding = level;
index 27a1fb0fba5c39ef5447b3d1426bcf9997174323..e104e10840c9073ed409bdfcd2970137d6860bef 100644 (file)
@@ -36,7 +36,7 @@
 #include <curses.priv.h>
 #include <ctype.h>
 
-MODULE_ID("$Id: lib_addch.c,v 1.121 2009/08/04 00:20:09 tom Exp $")
+MODULE_ID("$Id: lib_addch.c,v 1.122 2009/10/24 22:49:16 tom Exp $")
 
 static const NCURSES_CH_T blankchar = NewChar(BLANK_TEXT);
 
@@ -539,7 +539,7 @@ waddch(WINDOW *win, const chtype ch)
     NCURSES_CH_T wch;
     SetChar2(wch, ch);
 
-    TR(TRACE_VIRTPUT | TRACE_CCALLS, (T_CALLED("waddch(%p, %s)"), win,
+    TR(TRACE_VIRTPUT | TRACE_CCALLS, (T_CALLED("waddch(%p, %s)"), (void *) win,
                                      _tracechtype(ch)));
 
     if (win && (waddch_nosync(win, wch) != ERR)) {
@@ -558,7 +558,8 @@ wechochar(WINDOW *win, const chtype ch)
     NCURSES_CH_T wch;
     SetChar2(wch, ch);
 
-    TR(TRACE_VIRTPUT | TRACE_CCALLS, (T_CALLED("wechochar(%p, %s)"), win,
+    TR(TRACE_VIRTPUT | TRACE_CCALLS, (T_CALLED("wechochar(%p, %s)"),
+                                     (void *) win,
                                      _tracechtype(ch)));
 
     if (win && (waddch_nosync(win, wch) != ERR)) {
index 4e3a040cf032d94ea71d8b1422496ff5219bcee9..d8190e45652e0fa592caa2c392fd1d790b809945 100644 (file)
@@ -1,5 +1,5 @@
 /****************************************************************************
- * Copyright (c) 1998-2006,2007 Free Software Foundation, Inc.              *
+ * Copyright (c) 1998-2007,2009 Free Software Foundation, Inc.              *
  *                                                                          *
  * Permission is hereby granted, free of charge, to any person obtaining a  *
  * copy of this software and associated documentation files (the            *
@@ -44,7 +44,7 @@
 
 #include <curses.priv.h>
 
-MODULE_ID("$Id: lib_addstr.c,v 1.48 2007/10/13 19:56:57 tom Exp $")
+MODULE_ID("$Id: lib_addstr.c,v 1.50 2009/10/24 23:24:03 tom Exp $")
 
 NCURSES_EXPORT(int)
 waddnstr(WINDOW *win, const char *astr, int n)
@@ -52,7 +52,7 @@ waddnstr(WINDOW *win, const char *astr, int n)
     const char *str = astr;
     int code = ERR;
 
-    T((T_CALLED("waddnstr(%p,%s,%d)"), win, _nc_visbufn(astr, n), n));
+    T((T_CALLED("waddnstr(%p,%s,%d)"), (void *) win, _nc_visbufn(astr, n), n));
 
     if (win && (str != 0)) {
        TR(TRACE_VIRTPUT | TRACE_ATTRS,
@@ -85,7 +85,7 @@ waddchnstr(WINDOW *win, const chtype *astr, int n)
     int i;
     struct ldat *line;
 
-    T((T_CALLED("waddchnstr(%p,%p,%d)"), win, astr, n));
+    T((T_CALLED("waddchnstr(%p,%p,%d)"), (void *) win, (const void *) astr, n));
 
     if (!win)
        returnCode(ERR);
@@ -135,7 +135,10 @@ wadd_wchnstr(WINDOW *win, const cchar_t *astr, int n)
     struct ldat *line;
     int i, j, start, len, end;
 
-    T((T_CALLED("wadd_wchnstr(%p,%s,%d)"), win, _nc_viscbuf(astr, n), n));
+    T((T_CALLED("wadd_wchnstr(%p,%s,%d)"),
+       (void *) win,
+       _nc_viscbuf(astr, n),
+       n));
 
     if (!win)
        returnCode(ERR);
@@ -217,7 +220,7 @@ waddnwstr(WINDOW *win, const wchar_t *str, int n)
 {
     int code = ERR;
 
-    T((T_CALLED("waddnwstr(%p,%s,%d)"), win, _nc_viswbufn(str, n), n));
+    T((T_CALLED("waddnwstr(%p,%s,%d)"), (void *) win, _nc_viswbufn(str, n), n));
 
     if (win && (str != 0)) {
        TR(TRACE_VIRTPUT | TRACE_ATTRS,
index 0bad4c1699ccf29bea3929870f42af635590b204..9d7f7fd96f013e307d76f0ee0bf669ad04a0e6df 100644 (file)
@@ -46,7 +46,7 @@
 #define CUR SP_TERMTYPE
 #endif
 
-MODULE_ID("$Id: lib_beep.c,v 1.14 2009/05/23 19:33:20 tom Exp $")
+MODULE_ID("$Id: lib_beep.c,v 1.15 2009/10/24 22:02:14 tom Exp $")
 
 /*
  *     beep()
@@ -61,7 +61,7 @@ NCURSES_SP_NAME(beep) (NCURSES_SP_DCL0)
 {
     int res = ERR;
 
-    T((T_CALLED("beep(%p)"), SP_PARM));
+    T((T_CALLED("beep(%p)"), (void *) SP_PARM));
 
 #ifdef USE_TERM_DRIVER
     if (SP_PARM != 0)
index 306e09b6d223ff170fd5c3143331598ce98249a3..f790ee9df59b85578c739eadebb22433e017b4bf 100644 (file)
@@ -36,7 +36,7 @@
 
 #include <curses.priv.h>
 
-MODULE_ID("$Id: lib_bkgd.c,v 1.37 2009/08/29 19:02:25 tom Exp $")
+MODULE_ID("$Id: lib_bkgd.c,v 1.38 2009/10/24 22:02:14 tom Exp $")
 
 /*
  * Set the window's background information.
@@ -48,7 +48,7 @@ static NCURSES_INLINE void
 #endif
 wbkgrndset(WINDOW *win, const ARG_CH_T ch)
 {
-    T((T_CALLED("wbkgdset(%p,%s)"), win, _tracech_t(ch)));
+    T((T_CALLED("wbkgdset(%p,%s)"), (void *) win, _tracech_t(ch)));
 
     if (win) {
        attr_t off = AttrOf(win->_nc_bkgd);
@@ -120,7 +120,7 @@ wbkgrnd(WINDOW *win, const ARG_CH_T ch)
     int x, y;
     NCURSES_CH_T new_bkgd = CHDEREF(ch);
 
-    T((T_CALLED("wbkgd(%p,%s)"), win, _tracech_t(ch)));
+    T((T_CALLED("wbkgd(%p,%s)"), (void *) win, _tracech_t(ch)));
 
     if (win) {
        NCURSES_CH_T old_bkgrnd;
index d6cfc6cfe09cbbe57f7a1b5f7de00fc04e4151f0..06ae284f4b74edb8ea3bf61b17056c895e11d819 100644 (file)
@@ -1,5 +1,5 @@
 /****************************************************************************
- * Copyright (c) 1998-2002,2005 Free Software Foundation, Inc.              *
+ * Copyright (c) 1998-2005,2009 Free Software Foundation, Inc.              *
  *                                                                          *
  * Permission is hereby granted, free of charge, to any person obtaining a  *
  * copy of this software and associated documentation files (the            *
@@ -42,7 +42,7 @@
 
 #include <curses.priv.h>
 
-MODULE_ID("$Id: lib_box.c,v 1.22 2005/11/26 15:39:42 tom Exp $")
+MODULE_ID("$Id: lib_box.c,v 1.23 2009/10/24 22:33:46 tom Exp $")
 
 #if USE_WIDEC_SUPPORT
 static NCURSES_INLINE chtype
@@ -70,7 +70,7 @@ wborder(WINDOW *win,
     chtype wls, wrs, wts, wbs, wtl, wtr, wbl, wbr;
 
     T((T_CALLED("wborder(%p,%s,%s,%s,%s,%s,%s,%s,%s)"),
-       win,
+       (void *) win,
        _tracechtype2(1, ls),
        _tracechtype2(2, rs),
        _tracechtype2(3, ts),
index 89eefa7e82feb24e643b6320d2cfd5d0abae4d01..f8a2bfd85d08f223f22f2c50d36d5f8b7dd3180f 100644 (file)
@@ -1,5 +1,5 @@
 /****************************************************************************
- * Copyright (c) 1998-2005,2006 Free Software Foundation, Inc.              *
+ * Copyright (c) 1998-2006,2009 Free Software Foundation, Inc.              *
  *                                                                          *
  * Permission is hereby granted, free of charge, to any person obtaining a  *
  * copy of this software and associated documentation files (the            *
 
 #include <curses.priv.h>
 
-MODULE_ID("$Id: lib_chgat.c,v 1.7 2006/07/15 22:07:11 tom Exp $")
+MODULE_ID("$Id: lib_chgat.c,v 1.8 2009/10/24 22:33:37 tom Exp $")
 
 NCURSES_EXPORT(int)
 wchgat(WINDOW *win, int n, attr_t attr, short color, const void *opts GCC_UNUSED)
 {
     int i;
 
-    T((T_CALLED("wchgat(%p,%d,%s,%d)"), win, n, _traceattr(attr), color));
+    T((T_CALLED("wchgat(%p,%d,%s,%d)"), (void *) win, n, _traceattr(attr), color));
 
     if (win) {
        struct ldat *line = &(win->_line[win->_cury]);
index e0b4edf9e2245ae3b61347dce432aaaf867d2cf2..008744ccbabb7fc0fb859211c9b7ff38e8b3a031 100644 (file)
@@ -1,5 +1,5 @@
 /****************************************************************************
- * Copyright (c) 1998,2000 Free Software Foundation, Inc.                   *
+ * Copyright (c) 1998-2000,2009 Free Software Foundation, Inc.              *
  *                                                                          *
  * Permission is hereby granted, free of charge, to any person obtaining a  *
  * copy of this software and associated documentation files (the            *
 
 #include <curses.priv.h>
 
-MODULE_ID("$Id: lib_clear.c,v 1.7 2000/12/10 02:43:26 tom Exp $")
+MODULE_ID("$Id: lib_clear.c,v 1.8 2009/10/24 22:33:29 tom Exp $")
 
 NCURSES_EXPORT(int)
 wclear(WINDOW *win)
 {
     int code = ERR;
 
-    T((T_CALLED("wclear(%p)"), win));
+    T((T_CALLED("wclear(%p)"), (void *) win));
 
     if ((code = werase(win)) != ERR)
        win->_clear = TRUE;
index 9b56bd1ec63aa73ab8697b428101239cb0b6a301..ffc7d02dc0ff8d39920726972ac84145ce87a12e 100644 (file)
@@ -1,5 +1,5 @@
 /****************************************************************************
- * Copyright (c) 1998,2000 Free Software Foundation, Inc.                   *
+ * Copyright (c) 1998-2000,2009 Free Software Foundation, Inc.              *
  *                                                                          *
  * Permission is hereby granted, free of charge, to any person obtaining a  *
  * copy of this software and associated documentation files (the            *
 
 #include <curses.priv.h>
 
-MODULE_ID("$Id: lib_clearok.c,v 1.4 2000/12/10 02:43:26 tom Exp $")
+MODULE_ID("$Id: lib_clearok.c,v 1.5 2009/10/24 22:34:53 tom Exp $")
 
 NCURSES_EXPORT(int)
 clearok(WINDOW *win, bool flag)
 {
-    T((T_CALLED("clearok(%p,%d)"), win, flag));
+    T((T_CALLED("clearok(%p,%d)"), (void *) win, flag));
 
     if (win) {
        win->_clear = flag;
index df196e815f82a0c1125195150476c3c54c76abb2..cbf2206d558156d69946d60dc01ce229081b49a6 100644 (file)
@@ -1,5 +1,5 @@
 /****************************************************************************
- * Copyright (c) 1998-2001,2006 Free Software Foundation, Inc.              *
+ * Copyright (c) 1998-2006,2009 Free Software Foundation, Inc.              *
  *                                                                          *
  * Permission is hereby granted, free of charge, to any person obtaining a  *
  * copy of this software and associated documentation files (the            *
 
 #include <curses.priv.h>
 
-MODULE_ID("$Id: lib_clrbot.c,v 1.20 2006/10/14 20:43:31 tom Exp $")
+MODULE_ID("$Id: lib_clrbot.c,v 1.21 2009/10/24 22:33:19 tom Exp $")
 
 NCURSES_EXPORT(int)
 wclrtobot(WINDOW *win)
 {
     int code = ERR;
 
-    T((T_CALLED("wclrtobot(%p)"), win));
+    T((T_CALLED("wclrtobot(%p)"), (void *) win));
 
     if (win) {
        NCURSES_SIZE_T y;
index c46ebd93a33232729ad735f31d2d7d3609d85335..7aff84b35a426884acdc6f4cc510e82afe745546 100644 (file)
@@ -1,5 +1,5 @@
 /****************************************************************************
- * Copyright (c) 1998,1999,2000,2001 Free Software Foundation, Inc.         *
+ * Copyright (c) 1998-2001,2009 Free Software Foundation, Inc.              *
  *                                                                          *
  * Permission is hereby granted, free of charge, to any person obtaining a  *
  * copy of this software and associated documentation files (the            *
 
 #include <curses.priv.h>
 
-MODULE_ID("$Id: lib_clreol.c,v 1.21 2001/12/19 01:06:04 tom Exp $")
+MODULE_ID("$Id: lib_clreol.c,v 1.22 2009/10/24 22:33:06 tom Exp $")
 
 NCURSES_EXPORT(int)
 wclrtoeol(WINDOW *win)
 {
     int code = ERR;
 
-    T((T_CALLED("wclrtoeol(%p)"), win));
+    T((T_CALLED("wclrtoeol(%p)"), (void *) win));
 
     if (win) {
        NCURSES_CH_T blank;
index 42f5ea7fc03b7cba6a1f00ef763399f598aa32ba..1f1e25f38b295b09ac9facf9868f710ddc58a6a9 100644 (file)
@@ -45,7 +45,7 @@
 #define CUR SP_TERMTYPE
 #endif
 
-MODULE_ID("$Id: lib_color.c,v 1.95 2009/08/22 19:04:36 tom Exp $")
+MODULE_ID("$Id: lib_color.c,v 1.96 2009/10/24 22:50:51 tom Exp $")
 
 #ifdef USE_TERM_DRIVER
 #define CanChange      InfoOf(SP_PARM).canchange
@@ -281,7 +281,7 @@ NCURSES_SP_NAME(_nc_reset_colors) (NCURSES_SP_DCL0)
 {
     int result = FALSE;
 
-    T((T_CALLED("_nc_reset_colors(%p)"), SP_PARM));
+    T((T_CALLED("_nc_reset_colors(%p)"), (void *) SP_PARM));
     if (SP_PARM->_color_defs > 0)
        SP_PARM->_color_defs = -(SP_PARM->_color_defs);
     if (reset_color_pair(NCURSES_SP_ARG))
@@ -313,7 +313,7 @@ NCURSES_SP_NAME(start_color) (NCURSES_SP_DCL0)
     int result = ERR;
     int maxpairs = 0, maxcolors = 0;
 
-    T((T_CALLED("start_color(%p)"), SP_PARM));
+    T((T_CALLED("start_color(%p)"), (void *) SP_PARM));
 
     if (SP_PARM == 0) {
        result = ERR;
@@ -429,7 +429,7 @@ NCURSES_SP_NAME(init_pair) (NCURSES_SP_DCLx short pair, short f, short b)
     colorpair_t previous;
     int maxcolors;
 
-    T((T_CALLED("init_pair(%p,%d,%d,%d)"), SP_PARM, pair, f, b));
+    T((T_CALLED("init_pair(%p,%d,%d,%d)"), (void *) SP_PARM, pair, f, b));
 
     if (!ValidPair(pair))
        returnCode(ERR);
@@ -572,7 +572,10 @@ NCURSES_SP_NAME(init_color) (NCURSES_SP_DCLx
     int result = ERR;
     int maxcolors;
 
-    T((T_CALLED("init_color(%p,%d,%d,%d,%d)"), SP_PARM, color, r, g, b));
+    T((T_CALLED("init_color(%p,%d,%d,%d,%d)"),
+       (void *) SP_PARM,
+       color,
+       r, g, b));
 
     if (SP_PARM == 0)
        returnCode(result);
@@ -624,7 +627,7 @@ init_color(short color, short r, short g, short b)
 NCURSES_EXPORT(bool)
 NCURSES_SP_NAME(can_change_color) (NCURSES_SP_DCL)
 {
-    T((T_CALLED("can_change_color(%p)"), SP_PARM));
+    T((T_CALLED("can_change_color(%p)"), (void *) SP_PARM));
     returnCode((CanChange != 0) ? TRUE : FALSE);
 }
 
@@ -670,7 +673,12 @@ NCURSES_SP_NAME(color_content) (NCURSES_SP_DCLx
     int result = ERR;
     int maxcolors;
 
-    T((T_CALLED("color_content(%p,%d,%p,%p,%p)"), SP_PARM, color, r, g, b));
+    T((T_CALLED("color_content(%p,%d,%p,%p,%p)"),
+       (void *) SP_PARM,
+       color,
+       (void *) r,
+       (void *) g,
+       (void *) b));
 
     if (SP_PARM == 0)
        returnCode(result);
@@ -712,7 +720,11 @@ NCURSES_SP_NAME(pair_content) (NCURSES_SP_DCLx
 {
     int result;
 
-    T((T_CALLED("pair_content(%p,%d,%p,%p)"), SP_PARM, pair, f, b));
+    T((T_CALLED("pair_content(%p,%d,%p,%p)"),
+       (void *) SP_PARM,
+       pair,
+       (void *) f,
+       (void *) b));
 
     if (!ValidPair(pair)) {
        result = ERR;
@@ -732,7 +744,10 @@ NCURSES_SP_NAME(pair_content) (NCURSES_SP_DCLx
        if (b)
            *b = bg;
 
-       TR(TRACE_ATTRS, ("...pair_content(%p,%d,%d,%d)", SP_PARM, pair, fg, bg));
+       TR(TRACE_ATTRS, ("...pair_content(%p,%d,%d,%d)",
+                        (void *) SP_PARM,
+                        pair,
+                        fg, bg));
        result = OK;
     }
     returnCode(result);
index 831efdc8ecd3c6f3f1e2085ae3ada3e935ab894e..6210a0e8a8f9cd9f1514058a97eb9b989ec15fe6 100644 (file)
 #include <curses.priv.h>
 #include <ctype.h>
 
-MODULE_ID("$Id: lib_colorset.c,v 1.12 2009/01/25 00:44:40 tom Exp $")
+MODULE_ID("$Id: lib_colorset.c,v 1.13 2009/10/24 22:02:14 tom Exp $")
 
 NCURSES_EXPORT(int)
 wcolor_set(WINDOW *win, short color_pair_number, void *opts)
 {
     int code = ERR;
 
-    T((T_CALLED("wcolor_set(%p,%d)"), win, color_pair_number));
+    T((T_CALLED("wcolor_set(%p,%d)"), (void *) win, color_pair_number));
     if (win
        && !opts
        && (SP != 0)
index 0c30f2d93c1ba49f1102dfb42a23128a6bb54a44..64c9da73edf85f0d67a3d4591698f7840e36c3c4 100644 (file)
@@ -1,5 +1,5 @@
 /****************************************************************************
- * Copyright (c) 1998,2000,2001 Free Software Foundation, Inc.              *
+ * Copyright (c) 1998-2001,2009 Free Software Foundation, Inc.              *
  *                                                                          *
  * Permission is hereby granted, free of charge, to any person obtaining a  *
  * copy of this software and associated documentation files (the            *
 
 #include <curses.priv.h>
 
-MODULE_ID("$Id: lib_delch.c,v 1.12 2001/12/19 01:06:09 tom Exp $")
+MODULE_ID("$Id: lib_delch.c,v 1.13 2009/10/24 22:32:47 tom Exp $")
 
 NCURSES_EXPORT(int)
 wdelch(WINDOW *win)
 {
     int code = ERR;
 
-    T((T_CALLED("wdelch(%p)"), win));
+    T((T_CALLED("wdelch(%p)"), (void *) win));
 
     if (win) {
        NCURSES_CH_T blank = win->_nc_bkgd;
index 59fa3f772d2afb9e9cd5a6608bae881b09aad2b5..4bb536ca86adc82319f39549d4c6833937832498 100644 (file)
@@ -42,7 +42,7 @@
 
 #include <curses.priv.h>
 
-MODULE_ID("$Id: lib_delwin.c,v 1.19 2009/05/23 19:56:55 tom Exp $")
+MODULE_ID("$Id: lib_delwin.c,v 1.20 2009/10/24 22:02:14 tom Exp $")
 
 static bool
 cannot_delete(WINDOW *win)
@@ -70,7 +70,7 @@ delwin(WINDOW *win)
 {
     int result = ERR;
 
-    T((T_CALLED("delwin(%p)"), win));
+    T((T_CALLED("delwin(%p)"), (void *) win));
 
     if (_nc_try_global(curses) == 0) {
        if (win == 0
index b72c0b9422f2bfbdde62a39a91869fde5ab432bb..4bb9fc2774a969a67b2a2848e8842f4664a2d9bc 100644 (file)
@@ -37,7 +37,7 @@
 #define CUR SP_TERMTYPE
 #endif
 
-MODULE_ID("$Id: lib_dft_fgbg.c,v 1.24 2009/05/30 20:00:00 tom Exp $")
+MODULE_ID("$Id: lib_dft_fgbg.c,v 1.25 2009/10/24 22:15:00 tom Exp $")
 
 /*
  * Modify the behavior of color-pair 0 so that the library doesn't assume that
@@ -46,7 +46,7 @@ MODULE_ID("$Id: lib_dft_fgbg.c,v 1.24 2009/05/30 20:00:00 tom Exp $")
 NCURSES_EXPORT(int)
 NCURSES_SP_NAME(use_default_colors) (NCURSES_SP_DCL0)
 {
-    T((T_CALLED("use_default_colors(%p)"), SP_PARM));
+    T((T_CALLED("use_default_colors(%p)"), (void *) SP_PARM));
     returnCode(NCURSES_SP_NAME(assume_default_colors) (NCURSES_SP_ARGx -1, -1));
 }
 
@@ -67,7 +67,7 @@ NCURSES_SP_NAME(assume_default_colors) (NCURSES_SP_DCLx int fg, int bg)
 {
     int code = ERR;
 
-    T((T_CALLED("assume_default_colors(%p,%d,%d)"), SP_PARM, fg, bg));
+    T((T_CALLED("assume_default_colors(%p,%d,%d)"), (void *) SP_PARM, fg, bg));
 #ifdef USE_TERM_DRIVER
     if (sp != 0)
        code = CallDriver_2(sp, defaultcolors, fg, bg);
index c2cdfc9b2a1c13576b059019a850cbf1daf83ba0..9e1d3c2657417d1ae4683141416497f8b1d3388a 100644 (file)
 
 #include <curses.priv.h>
 
-MODULE_ID("$Id: lib_echo.c,v 1.7 2009/02/21 20:20:40 tom Exp $")
+MODULE_ID("$Id: lib_echo.c,v 1.8 2009/10/24 22:02:14 tom Exp $")
 
 NCURSES_EXPORT(int)
 NCURSES_SP_NAME(echo) (NCURSES_SP_DCL0)
 {
-    T((T_CALLED("echo(%p)"), SP_PARM));
+    T((T_CALLED("echo(%p)"), (void *) SP_PARM));
     if (0 == SP_PARM)
        returnCode(ERR);
     SP_PARM->_echo = TRUE;
@@ -67,7 +67,7 @@ echo(void)
 NCURSES_EXPORT(int)
 NCURSES_SP_NAME(noecho) (NCURSES_SP_DCL0)
 {
-    T((T_CALLED("noecho(%p)"), SP_PARM));
+    T((T_CALLED("noecho(%p)"), (void *) SP_PARM));
     if (0 == SP_PARM)
        returnCode(ERR);
     SP_PARM->_echo = FALSE;
index 3b552daeff2d0c36c50a496252a2ecefaead3661..4596d07496332ea45e7acc7bdaf314b91f402302 100644 (file)
 
 #include <curses.priv.h>
 
-MODULE_ID("$Id: lib_endwin.c,v 1.21 2009/07/04 18:35:43 tom Exp $")
+MODULE_ID("$Id: lib_endwin.c,v 1.22 2009/10/24 22:02:14 tom Exp $")
 
 NCURSES_EXPORT(int)
 NCURSES_SP_NAME(endwin) (NCURSES_SP_DCL0)
 {
     int code = ERR;
 
-    T((T_CALLED("endwin(%p)"), SP_PARM));
+    T((T_CALLED("endwin(%p)"), (void *) SP_PARM));
 
     if (SP_PARM) {
 #ifdef USE_TERM_DRIVER
index 2566e8b39820a260c0ff0f271d3d0189e0f14a0a..bbf10ef81b9295d55accf7006c6ba741496c61a3 100644 (file)
@@ -1,5 +1,5 @@
 /****************************************************************************
- * Copyright (c) 1998,2000,2001 Free Software Foundation, Inc.              *
+ * Copyright (c) 1998-2005,2009 Free Software Foundation, Inc.              *
  *                                                                          *
  * Permission is hereby granted, free of charge, to any person obtaining a  *
  * copy of this software and associated documentation files (the            *
@@ -41,7 +41,7 @@
 
 #include <curses.priv.h>
 
-MODULE_ID("$Id: lib_erase.c,v 1.16 2005/10/30 00:36:36 tom Exp $")
+MODULE_ID("$Id: lib_erase.c,v 1.17 2009/10/24 22:32:29 tom Exp $")
 
 NCURSES_EXPORT(int)
 werase(WINDOW *win)
@@ -51,7 +51,7 @@ werase(WINDOW *win)
     NCURSES_CH_T blank;
     NCURSES_CH_T *sp, *end, *start;
 
-    T((T_CALLED("werase(%p)"), win));
+    T((T_CALLED("werase(%p)"), (void *) win));
 
     if (win) {
        blank = win->_nc_bkgd;
index 8fbf91cf3a540afe1c46019125d1cdd062b43ef1..03f11d923b6de3a539495fbd7c4d6dd15dac84d0 100644 (file)
@@ -46,7 +46,7 @@
 #define CUR SP_TERMTYPE
 #endif
 
-MODULE_ID("$Id: lib_flash.c,v 1.10 2009/05/23 19:37:09 tom Exp $")
+MODULE_ID("$Id: lib_flash.c,v 1.11 2009/10/24 22:02:14 tom Exp $")
 
 /*
  *     flash()
@@ -61,7 +61,7 @@ NCURSES_SP_NAME(flash) (NCURSES_SP_DCL0)
 {
     int res = ERR;
 
-    T((T_CALLED("flash(%p)"), SP_PARM));
+    T((T_CALLED("flash(%p)"), (void *) SP_PARM));
 #ifdef USE_TERM_DRIVER
     if (SP_PARM != 0)
        res = CallDriver_1(SP_PARM, doBeepOrFlash, FALSE);
index cdc965fec5e0b4518e9a477ebd0094c86c51c2c0..f6520c068edc2dff613007b05723c373954a13cb 100644 (file)
@@ -42,7 +42,7 @@
 
 #include <curses.priv.h>
 
-MODULE_ID("$Id: lib_getch.c,v 1.107 2009/08/15 20:41:24 Clemens.Ladisch Exp $")
+MODULE_ID("$Id: lib_getch.c,v 1.109 2009/10/24 21:58:34 tom Exp $")
 
 #include <fifo_defs.h>
 
@@ -380,7 +380,7 @@ _nc_wgetch(WINDOW *win,
     long event_delay = -1;
 #endif
 
-    T((T_CALLED("_nc_wgetch(%p)"), win));
+    T((T_CALLED("_nc_wgetch(%p)"), (void *) win));
 
     *result = 0;
 
@@ -536,6 +536,12 @@ _nc_wgetch(WINDOW *win,
            /* resizeterm can push KEY_RESIZE */
            if (cooked_key_in_fifo()) {
                *result = fifo_pull(sp);
+               /*
+                * Get the ERR from queue -- it is from WINCH,
+                * so we should take it out, the "error" is handled.
+                */
+               if (fifo_peek(sp) == -1)
+                   fifo_pull(sp);
                returnCode(*result >= KEY_MIN ? KEY_CODE_YES : OK);
            }
        }
@@ -612,7 +618,7 @@ wgetch(WINDOW *win)
     int code;
     unsigned long value;
 
-    T((T_CALLED("wgetch(%p)"), win));
+    T((T_CALLED("wgetch(%p)"), (void *) win));
     code = _nc_wgetch(win,
                      &value,
                      _nc_use_meta(win)
@@ -686,7 +692,7 @@ kgetch(SCREEN *sp EVENTLIST_2nd(_nc_eventlist * evl))
            break;
        }
        TR(TRACE_IEVENT, ("ptr=%p, ch=%d, value=%d",
-                         ptr, ptr->ch, ptr->value));
+                         (void *) ptr, ptr->ch, ptr->value));
 
        if (ptr->value != 0) {  /* sequence terminated */
            TR(TRACE_IEVENT, ("end of sequence"));
index 0a71db5134f9c37f9b56517a98006973b639ceac..21d8baa05c8be0968bb80b1730a8ba637cb2d7b8 100644 (file)
@@ -40,7 +40,7 @@
 
 #include <curses.priv.h>
 
-MODULE_ID("$Id: lib_getstr.c,v 1.28 2009/05/09 17:02:41 tom Exp $")
+MODULE_ID("$Id: lib_getstr.c,v 1.29 2009/10/24 21:59:02 tom Exp $")
 
 /*
  * This wipes out the last character, no matter whether it was a tab, control
@@ -83,7 +83,7 @@ wgetnstr_events(WINDOW *win,
     int ch;
     int y, x;
 
-    T((T_CALLED("wgetnstr(%p,%p, %d)"), win, str, maxlen));
+    T((T_CALLED("wgetnstr(%p,%p,%d)"), (void *) win, (void *) str, maxlen));
 
     if (!win)
        returnCode(ERR);
index 2ef2cc585e100d2beb55c7c155ed34043bb569e6..0ff2d5bdb6df7d9ce1586a9a2f94f4e38dc71737 100644 (file)
@@ -1,5 +1,5 @@
 /****************************************************************************
- * Copyright (c) 1998-2001,2006 Free Software Foundation, Inc.              *
+ * Copyright (c) 1998-2006,2009 Free Software Foundation, Inc.              *
  *                                                                          *
  * Permission is hereby granted, free of charge, to any person obtaining a  *
  * copy of this software and associated documentation files (the            *
@@ -40,7 +40,7 @@
 
 #include <curses.priv.h>
 
-MODULE_ID("$Id: lib_hline.c,v 1.11 2006/03/11 21:52:27 tom Exp $")
+MODULE_ID("$Id: lib_hline.c,v 1.12 2009/10/24 22:31:53 tom Exp $")
 
 NCURSES_EXPORT(int)
 whline(WINDOW *win, chtype ch, int n)
@@ -49,7 +49,7 @@ whline(WINDOW *win, chtype ch, int n)
     NCURSES_SIZE_T start;
     NCURSES_SIZE_T end;
 
-    T((T_CALLED("whline(%p,%s,%d)"), win, _tracechtype(ch), n));
+    T((T_CALLED("whline(%p,%s,%d)"), (void *) win, _tracechtype(ch), n));
 
     if (win) {
        struct ldat *line = &(win->_line[win->_cury]);
index 87988b66f1a325858504eb8e8675663162015f72..d51b60a3085759a208a842d82933a678cd206812 100644 (file)
@@ -1,5 +1,5 @@
 /****************************************************************************
- * Copyright (c) 1998,2000 Free Software Foundation, Inc.                   *
+ * Copyright (c) 1998-2000,2009 Free Software Foundation, Inc.              *
  *                                                                          *
  * Permission is hereby granted, free of charge, to any person obtaining a  *
  * copy of this software and associated documentation files (the            *
 
 #include <curses.priv.h>
 
-MODULE_ID("$Id: lib_immedok.c,v 1.4 2000/12/10 02:43:27 tom Exp $")
+MODULE_ID("$Id: lib_immedok.c,v 1.5 2009/10/24 22:32:11 tom Exp $")
 
 NCURSES_EXPORT(void)
 immedok(WINDOW *win, bool flag)
 {
-    T((T_CALLED("immedok(%p,%d)"), win, flag));
+    T((T_CALLED("immedok(%p,%d)"), (void *) win, flag));
 
     if (win)
        win->_immed = flag;
index 6ff01687826eb09709f5c856174439ac8ec22340..884ea51fdb3bc8f0d4a21e825b464b6041b657d8 100644 (file)
@@ -1,5 +1,5 @@
 /****************************************************************************
- * Copyright (c) 1998,2000,2001 Free Software Foundation, Inc.              *
+ * Copyright (c) 1998-2001,2009 Free Software Foundation, Inc.              *
  *                                                                          *
  * Permission is hereby granted, free of charge, to any person obtaining a  *
  * copy of this software and associated documentation files (the            *
 
 #include <curses.priv.h>
 
-MODULE_ID("$Id: lib_inchstr.c,v 1.10 2001/06/02 23:37:58 skimo Exp $")
+MODULE_ID("$Id: lib_inchstr.c,v 1.11 2009/10/24 22:49:33 tom Exp $")
 
 NCURSES_EXPORT(int)
-winchnstr(WINDOW *win, chtype * str, int n)
+winchnstr(WINDOW *win, chtype *str, int n)
 {
     int i = 0;
 
-    T((T_CALLED("winchnstr(%p,%p,%d)"), win, str, n));
+    T((T_CALLED("winchnstr(%p,%p,%d)"), (void *) win, (void *) str, n));
 
     if (!str)
        returnCode(0);
index 583a1990b1d6d414c7906b92bf42d07963cf042a..e21ec02bc84f30d5b2821d453a66ed9f47c305a1 100644 (file)
@@ -43,7 +43,7 @@
 #include <curses.priv.h>
 #include <ctype.h>
 
-MODULE_ID("$Id: lib_insch.c,v 1.31 2009/09/12 18:11:55 tom Exp $")
+MODULE_ID("$Id: lib_insch.c,v 1.32 2009/10/24 22:04:35 tom Exp $")
 
 /*
  * Insert the given character, updating the current location to simplify
@@ -153,7 +153,7 @@ winsch(WINDOW *win, chtype c)
     NCURSES_SIZE_T ox;
     int code = ERR;
 
-    T((T_CALLED("winsch(%p, %s)"), win, _tracechtype(c)));
+    T((T_CALLED("winsch(%p, %s)"), (void *) win, _tracechtype(c)));
 
     if (win != 0) {
        oy = win->_cury;
index 342c6541f95f7e213890ee12977cfbbb99f4517b..8f51bbed484446682770747aff657375e340d378 100644 (file)
@@ -1,5 +1,5 @@
 /****************************************************************************
- * Copyright (c) 1998-2001,2003 Free Software Foundation, Inc.              *
+ * Copyright (c) 1998-2003,2009 Free Software Foundation, Inc.              *
  *                                                                          *
  * Permission is hereby granted, free of charge, to any person obtaining a  *
  * copy of this software and associated documentation files (the            *
 
 #include <curses.priv.h>
 
-MODULE_ID("$Id: lib_insdel.c,v 1.12 2003/07/26 22:40:06 tom Exp $")
+MODULE_ID("$Id: lib_insdel.c,v 1.13 2009/10/24 22:34:41 tom Exp $")
 
 NCURSES_EXPORT(int)
 winsdelln(WINDOW *win, int n)
 {
     int code = ERR;
 
-    T((T_CALLED("winsdelln(%p,%d)"), win, n));
+    T((T_CALLED("winsdelln(%p,%d)"), (void *) win, n));
 
     if (win) {
        if (n != 0) {
index 16d945952b37fa1927dbf695b6d69ddd76d54731..ce03e64be0020b5a0b1b186a9c87e413af781b0c 100644 (file)
@@ -40,7 +40,7 @@
 #include <curses.priv.h>
 #include <ctype.h>
 
-MODULE_ID("$Id: lib_insnstr.c,v 1.2 2009/05/30 14:53:49 tom Exp $")
+MODULE_ID("$Id: lib_insnstr.c,v 1.3 2009/10/24 22:04:35 tom Exp $")
 
 NCURSES_EXPORT(int)
 winsnstr(WINDOW *win, const char *s, int n)
@@ -51,7 +51,7 @@ winsnstr(WINDOW *win, const char *s, int n)
     const unsigned char *str = (const unsigned char *) s;
     const unsigned char *cp;
 
-    T((T_CALLED("winsnstr(%p,%s,%d)"), win, _nc_visbufn(s, n), n));
+    T((T_CALLED("winsnstr(%p,%s,%d)"), (void *) win, _nc_visbufn(s, n), n));
 
     if (win != 0 && str != 0) {
        SCREEN *sp = _nc_screen_of(win);
index 3fb29490ad0638f1025a6271ac22c516122cdef0..e6d1a739c94f47023e8966678f654fe2d7689214 100644 (file)
@@ -1,5 +1,5 @@
 /****************************************************************************
- * Copyright (c) 1998-2005,2007 Free Software Foundation, Inc.              *
+ * Copyright (c) 1998-2007,2009 Free Software Foundation, Inc.              *
  *                                                                          *
  * Permission is hereby granted, free of charge, to any person obtaining a  *
  * copy of this software and associated documentation files (the            *
 
 #include <curses.priv.h>
 
-MODULE_ID("$Id: lib_instr.c,v 1.16 2007/07/21 20:18:10 tom Exp $")
+MODULE_ID("$Id: lib_instr.c,v 1.17 2009/10/24 22:55:45 tom Exp $")
 
 NCURSES_EXPORT(int)
 winnstr(WINDOW *win, char *str, int n)
 {
     int i = 0, row, col;
 
-    T((T_CALLED("winnstr(%p,%p,%d)"), win, str, n));
+    T((T_CALLED("winnstr(%p,%p,%d)"), (void *) win, str, n));
 
     if (!str)
        returnCode(0);
@@ -79,18 +79,18 @@ winnstr(WINDOW *win, char *str, int n)
 
                        init_mb(state);
                        n3 = wcstombs(0, wch, 0);
-                       if (isEILSEQ(n3) || (n3 == 0)) {
-                           ;
-                       } else if ((int) (n3 + i) > n) {
-                           done = TRUE;
-                       } else if ((tmp = typeCalloc(char, n3 + 10)) == 0) {
-                           done = TRUE;
-                       } else {
-                           init_mb(state);
-                           wcstombs(tmp, wch, n3);
-                           for (i3 = 0; i3 < n3; ++i3)
-                               str[i++] = tmp[i3];
-                           free(tmp);
+                       if (!isEILSEQ(n3) && (n3 != 0)) {
+                           if (((int) n3 + i) > n) {
+                               done = TRUE;
+                           } else if ((tmp = typeCalloc(char, n3 + 10)) == 0) {
+                               done = TRUE;
+                           } else {
+                               init_mb(state);
+                               wcstombs(tmp, wch, n3);
+                               for (i3 = 0; i3 < n3; ++i3)
+                                   str[i++] = tmp[i3];
+                               free(tmp);
+                           }
                        }
                    }
                    free(wch);
index 17d095d0f8c8e8987cba7f997d83057baa3208ba..e6995f85cb4d843f152e17cfb540036c5cd07ac1 100644 (file)
@@ -1,5 +1,5 @@
 /****************************************************************************
- * Copyright (c) 1998,2000 Free Software Foundation, Inc.                   *
+ * Copyright (c) 1998-2000,2009 Free Software Foundation, Inc.              *
  *                                                                          *
  * Permission is hereby granted, free of charge, to any person obtaining a  *
  * copy of this software and associated documentation files (the            *
 
 #include <curses.priv.h>
 
-MODULE_ID("$Id: lib_leaveok.c,v 1.5 2000/12/10 02:43:27 tom Exp $")
+MODULE_ID("$Id: lib_leaveok.c,v 1.6 2009/10/24 22:34:23 tom Exp $")
 
 NCURSES_EXPORT(int)
 leaveok(WINDOW *win, bool flag)
 {
-    T((T_CALLED("leaveok(%p,%d)"), win, flag));
+    T((T_CALLED("leaveok(%p,%d)"), (void *) win, flag));
 
     if (win) {
        win->_leaveok = flag;
index cd760dc0d506adebe193bd9c0fb325f561247981..4034c9a77726247e3a0c02afec8c5bb692c960db 100644 (file)
@@ -84,7 +84,7 @@
 #define CUR SP_TERMTYPE
 #endif
 
-MODULE_ID("$Id: lib_mouse.c,v 1.108 2009/07/04 19:51:08 tom Exp $")
+MODULE_ID("$Id: lib_mouse.c,v 1.110 2009/10/24 23:21:31 tom Exp $")
 
 #include <tic.h>
 
@@ -1286,7 +1286,7 @@ _nc_mouse_resume(SCREEN *sp)
 NCURSES_EXPORT(int)
 NCURSES_SP_NAME(getmouse) (NCURSES_SP_DCLx MEVENT * aevent)
 {
-    T((T_CALLED("getmouse(%p,%p)"), SP_PARM, aevent));
+    T((T_CALLED("getmouse(%p,%p)"), (void *) SP_PARM, (void *) aevent));
 
     if ((aevent != 0) && (SP_PARM != 0) && (SP_PARM->_mouse_type != M_NONE)) {
        MEVENT *eventp = SP_PARM->_mouse_eventp;
@@ -1320,7 +1320,7 @@ NCURSES_SP_NAME(ungetmouse) (NCURSES_SP_DCLx MEVENT * aevent)
 {
     int result = ERR;
 
-    T((T_CALLED("ungetmouse(%p,%p)"), SP_PARM, aevent));
+    T((T_CALLED("ungetmouse(%p,%p)"), (void *) SP_PARM, (void *) aevent));
 
     if (aevent != 0 && SP_PARM != 0) {
        MEVENT *eventp = SP_PARM->_mouse_eventp;
@@ -1352,7 +1352,10 @@ NCURSES_SP_NAME(mousemask) (NCURSES_SP_DCLx mmask_t newmask, mmask_t * oldmask)
 {
     mmask_t result = 0;
 
-    T((T_CALLED("mousemask(%p,%#lx,%p)"), SP_PARM, (unsigned long) newmask, oldmask));
+    T((T_CALLED("mousemask(%p,%#lx,%p)"),
+       (void *) SP_PARM,
+       (unsigned long) newmask,
+       (void *) oldmask));
 
     if (SP_PARM != 0) {
        if (oldmask)
@@ -1395,7 +1398,7 @@ wenclose(const WINDOW *win, int y, int x)
 {
     bool result = FALSE;
 
-    T((T_CALLED("wenclose(%p,%d,%d)"), win, y, x));
+    T((T_CALLED("wenclose(%p,%d,%d)"), (const void *) win, y, x));
 
     if (win != 0) {
        y -= win->_yoffset;
@@ -1413,7 +1416,7 @@ NCURSES_SP_NAME(mouseinterval) (NCURSES_SP_DCLx int maxclick)
 {
     int oldval;
 
-    T((T_CALLED("mouseinterval(%p,%d)"), SP_PARM, maxclick));
+    T((T_CALLED("mouseinterval(%p,%d)"), (void *) SP_PARM, maxclick));
 
     if (SP_PARM != 0) {
        oldval = SP_PARM->_maxclick;
@@ -1461,7 +1464,11 @@ wmouse_trafo(const WINDOW *win, int *pY, int *pX, bool to_screen)
 {
     bool result = FALSE;
 
-    T((T_CALLED("wmouse_trafo(%p,%p,%p,%d)"), win, pY, pX, to_screen));
+    T((T_CALLED("wmouse_trafo(%p,%p,%p,%d)"),
+       (const void *) win,
+       (void *) pY,
+       (void *) pX,
+       to_screen));
 
     if (win && pY && pX) {
        int y = *pY;
index 652c44d7b7181816d18d50f83d126130e43cf969..488b195d15a3c3f44be611c104dbb2064257bb9a 100644 (file)
@@ -1,5 +1,5 @@
 /****************************************************************************
- * Copyright (c) 1998-2000,2004 Free Software Foundation, Inc.              *
+ * Copyright (c) 1998-2004,2009 Free Software Foundation, Inc.              *
  *                                                                          *
  * Permission is hereby granted, free of charge, to any person obtaining a  *
  * copy of this software and associated documentation files (the            *
 
 #include <curses.priv.h>
 
-MODULE_ID("$Id: lib_move.c,v 1.12 2004/12/04 21:50:07 tom Exp $")
+MODULE_ID("$Id: lib_move.c,v 1.13 2009/10/24 22:34:07 tom Exp $")
 
 NCURSES_EXPORT(int)
 wmove(WINDOW *win, int y, int x)
 {
-    T((T_CALLED("wmove(%p,%d,%d)"), win, y, x));
+    T((T_CALLED("wmove(%p,%d,%d)"), (void *) win, y, x));
 
     if (LEGALYX(win, y, x)) {
        win->_curx = (NCURSES_SIZE_T) x;
index 8b2f816b998286b3d4bc741e8fedd21d454f794d..37963e40be76ca2ab256cd48fb174572081dadee 100644 (file)
@@ -42,7 +42,7 @@
 
 #include <curses.priv.h>
 
-MODULE_ID("$Id: lib_mvwin.c,v 1.16 2009/06/06 20:25:07 tom Exp $")
+MODULE_ID("$Id: lib_mvwin.c,v 1.17 2009/10/24 22:05:03 tom Exp $")
 
 NCURSES_EXPORT(int)
 mvwin(WINDOW *win, int by, int bx)
@@ -51,7 +51,7 @@ mvwin(WINDOW *win, int by, int bx)
     SCREEN *sp = _nc_screen_of(win);
 #endif
 
-    T((T_CALLED("mvwin(%p,%d,%d)"), win, by, bx));
+    T((T_CALLED("mvwin(%p,%d,%d)"), (void *) win, by, bx));
 
     if (!win || (win->_flags & _ISPAD))
        returnCode(ERR);
index 9e1649de4ac6fa6ada3c69808012da84aba70d0d..1579c28096fb4a97bce4bc1d86543e06f5cff0ea 100644 (file)
@@ -52,7 +52,7 @@
 
 #include <tic.h>
 
-MODULE_ID("$Id: lib_newterm.c,v 1.81 2009/09/27 00:34:05 tom Exp $")
+MODULE_ID("$Id: lib_newterm.c,v 1.82 2009/10/24 22:52:04 tom Exp $")
 
 #ifdef USE_TERM_DRIVER
 #define NumLabels      InfoOf(SP_PARM).numlabels
@@ -110,7 +110,7 @@ NCURSES_EXPORT(void)
 NCURSES_SP_NAME(filter) (NCURSES_SP_DCL0)
 {
     START_TRACE();
-    T((T_CALLED("filter(%p)"), SP_PARM));
+    T((T_CALLED("filter(%p)"), (void *) SP_PARM));
 #if NCURSES_SP_FUNCS
     if (IsPreScreen(SP_PARM)) {
        SP_PARM->_filtered = TRUE;
@@ -141,7 +141,7 @@ NCURSES_EXPORT(void)
 NCURSES_SP_NAME(nofilter) (NCURSES_SP_DCL0)
 {
     START_TRACE();
-    T((T_CALLED("nofilter(%p)"), SP_PARM));
+    T((T_CALLED("nofilter(%p)"), (void *) SP_PARM));
 #if NCURSES_SP_FUNCS
     if (IsPreScreen(SP_PARM)) {
        SP_PARM->_filtered = FALSE;
@@ -183,7 +183,11 @@ NCURSES_SP_NAME(newterm) (NCURSES_SP_DCLx
     TERMINAL *new_term = 0;
 
     START_TRACE();
-    T((T_CALLED("newterm(%p, \"%s\", %p,%p)"), SP_PARM, name, ofp, ifp));
+    T((T_CALLED("newterm(%p, \"%s\", %p,%p)"),
+       (void *) SP_PARM,
+       name,
+       (void *) ofp,
+       (void *) ifp));
 
 #if NCURSES_SP_FUNCS
     assert(SP_PARM != 0);
index 3ab466ab9575871b00f809561c51b4255469d603..ddbb3da71547a5914ba3c476ed381936abaf9007 100644 (file)
@@ -43,7 +43,7 @@
 #include <curses.priv.h>
 #include <stddef.h>
 
-MODULE_ID("$Id: lib_newwin.c,v 1.60 2009/09/06 16:32:48 tom Exp $")
+MODULE_ID("$Id: lib_newwin.c,v 1.61 2009/10/24 22:05:55 tom Exp $")
 
 #define window_is(name) ((sp)->_##name == win)
 
@@ -98,7 +98,7 @@ _nc_freewin(WINDOW *win)
     SCREEN *sp = _nc_screen_of(win);   /* pretend this is parameter */
 #endif
 
-    T((T_CALLED("_nc_freewin(%p)"), win));
+    T((T_CALLED("_nc_freewin(%p)"), (void *) win));
 
     if (win != 0) {
        if (_nc_nonsp_try_global(curses) == 0) {
@@ -119,7 +119,7 @@ _nc_freewin(WINDOW *win)
                    free(p);
 
                    result = OK;
-                   T(("...deleted win=%p", win));
+                   T(("...deleted win=%p", (void *) win));
                    break;
                }
                q = p;
@@ -138,7 +138,7 @@ NCURSES_SP_NAME(newwin) (NCURSES_SP_DCLx
     NCURSES_CH_T *ptr;
     int i;
 
-    T((T_CALLED("newwin(%p, %d,%d,%d,%d)"), SP_PARM, num_lines, num_columns,
+    T((T_CALLED("newwin(%p, %d,%d,%d,%d)"), (void *) SP_PARM, num_lines, num_columns,
        begy, begx));
 
     if (begy < 0 || begx < 0 || num_lines < 0 || num_columns < 0)
@@ -192,7 +192,7 @@ derwin(WINDOW *orig, int num_lines, int num_columns, int begy, int begx)
     SCREEN *sp = _nc_screen_of(orig);
 #endif
 
-    T((T_CALLED("derwin(%p,%d,%d,%d,%d)"), orig, num_lines, num_columns,
+    T((T_CALLED("derwin(%p,%d,%d,%d,%d)"), (void *) orig, num_lines, num_columns,
        begy, begx));
 
     /*
@@ -235,7 +235,7 @@ derwin(WINDOW *orig, int num_lines, int num_columns, int begy, int begx)
 NCURSES_EXPORT(WINDOW *)
 subwin(WINDOW *w, int l, int c, int y, int x)
 {
-    T((T_CALLED("subwin(%p, %d, %d, %d, %d)"), w, l, c, y, x));
+    T((T_CALLED("subwin(%p, %d, %d, %d, %d)"), (void *) w, l, c, y, x));
     T(("parent has begy = %ld, begx = %ld", (long) w->_begy, (long) w->_begx));
 
     returnWin(derwin(w, l, c, y - w->_begy, x - w->_begx));
@@ -262,7 +262,7 @@ NCURSES_SP_NAME(_nc_makenew) (NCURSES_SP_DCLx
     bool is_padwin = (flags & _ISPAD);
 
     T((T_CALLED("_nc_makenew(%p,%d,%d,%d,%d)"),
-       SP_PARM, num_lines, num_columns, begy, begx));
+       (void *) SP_PARM, num_lines, num_columns, begy, begx));
 
     if (SP_PARM == 0)
        returnWin(0);
@@ -360,7 +360,7 @@ NCURSES_SP_NAME(_nc_makenew) (NCURSES_SP_DCLx
     wp->screen = SP_PARM;
     WindowList(SP_PARM) = wp;
 
-    T((T_CREATE("window %p"), win));
+    T((T_CREATE("window %p"), (void *) win));
 
     _nc_nonsp_unlock_global(curses);
     returnWin(win);
index 28c1848cb6bf1d8be35718f1646edab5ac2c8141..34254871c985918c9b31d7b044f79b597c7788af 100644 (file)
@@ -44,7 +44,7 @@
 
 #include <curses.priv.h>
 
-MODULE_ID("$Id: lib_nl.c,v 1.11 2009/07/04 00:25:53 tom Exp $")
+MODULE_ID("$Id: lib_nl.c,v 1.12 2009/10/24 22:05:55 tom Exp $")
 
 #ifdef __EMX__
 #include <io.h>
@@ -53,7 +53,7 @@ MODULE_ID("$Id: lib_nl.c,v 1.11 2009/07/04 00:25:53 tom Exp $")
 NCURSES_EXPORT(int)
 NCURSES_SP_NAME(nl) (NCURSES_SP_DCL0)
 {
-    T((T_CALLED("nl(%p)"), SP_PARM));
+    T((T_CALLED("nl(%p)"), (void *) SP_PARM));
     if (0 == SP_PARM)
        returnCode(ERR);
     SP_PARM->_nl = TRUE;
@@ -75,7 +75,7 @@ nl(void)
 NCURSES_EXPORT(int)
 NCURSES_SP_NAME(nonl) (NCURSES_SP_DCL0)
 {
-    T((T_CALLED("nonl(%p)"), SP_PARM));
+    T((T_CALLED("nonl(%p)"), (void *) SP_PARM));
     if (0 == SP_PARM)
        returnCode(ERR);
     SP_PARM->_nl = FALSE;
index 669e8e72c07f94841d74ca04d13dfc8f2b2a1f69..bfb817bc310833782222362024d067de4fa917b4 100644 (file)
@@ -1,5 +1,5 @@
 /****************************************************************************
- * Copyright (c) 1998-2007,2008 Free Software Foundation, Inc.              *
+ * Copyright (c) 1998-2008,2009 Free Software Foundation, Inc.              *
  *                                                                          *
  * Permission is hereby granted, free of charge, to any person obtaining a  *
  * copy of this software and associated documentation files (the            *
@@ -40,7 +40,7 @@
 
 #include <curses.priv.h>
 
-MODULE_ID("$Id: lib_overlay.c,v 1.27 2008/06/07 23:30:34 tom Exp $")
+MODULE_ID("$Id: lib_overlay.c,v 1.29 2009/10/24 23:21:31 tom Exp $")
 
 static int
 overlap(const WINDOW *const src, WINDOW *const dst, int const flag)
@@ -52,7 +52,7 @@ overlap(const WINDOW *const src, WINDOW *const dst, int const flag)
     int dminrow, dmincol;
     int dmaxrow, dmaxcol;
 
-    T((T_CALLED("overlap(%p,%p,%d)"), src, dst, flag));
+    T((T_CALLED("overlap(%p,%p,%d)"), (const void *) src, (void *) dst, flag));
 
     if (src != 0 && dst != 0) {
        _nc_lock_global(curses);
@@ -110,7 +110,7 @@ overlap(const WINDOW *const src, WINDOW *const dst, int const flag)
 NCURSES_EXPORT(int)
 overlay(const WINDOW *win1, WINDOW *win2)
 {
-    T((T_CALLED("overlay(%p,%p)"), win1, win2));
+    T((T_CALLED("overlay(%p,%p)"), (const void *) win1, (void *) win2));
     returnCode(overlap(win1, win2, TRUE));
 }
 
@@ -127,7 +127,7 @@ overlay(const WINDOW *win1, WINDOW *win2)
 NCURSES_EXPORT(int)
 overwrite(const WINDOW *win1, WINDOW *win2)
 {
-    T((T_CALLED("overwrite(%p,%p)"), win1, win2));
+    T((T_CALLED("overwrite(%p,%p)"), (const void *) win1, (void *) win2));
     returnCode(overlap(win1, win2, FALSE));
 }
 
@@ -145,7 +145,11 @@ copywin(const WINDOW *src, WINDOW *dst,
     attr_t mask;
 
     T((T_CALLED("copywin(%p, %p, %d, %d, %d, %d, %d, %d, %d)"),
-       src, dst, sminrow, smincol, dminrow, dmincol, dmaxrow, dmaxcol, over));
+       (const void *) src,
+       (void *) dst,
+       sminrow, smincol,
+       dminrow, dmincol,
+       dmaxrow, dmaxcol, over));
 
     if (src && dst) {
        _nc_lock_global(curses);
index ccd3ad7efd89eaf2a403fd5191e569360db35fd7..c5bd6c4fca2ebcf63756d19b024032d2ea1ca0c1 100644 (file)
@@ -42,7 +42,7 @@
 
 #include <curses.priv.h>
 
-MODULE_ID("$Id: lib_pad.c,v 1.44 2009/07/04 19:45:20 tom Exp $")
+MODULE_ID("$Id: lib_pad.c,v 1.45 2009/10/24 22:07:03 tom Exp $")
 
 NCURSES_EXPORT(WINDOW *)
 NCURSES_SP_NAME(newpad) (NCURSES_SP_DCLx int l, int c)
@@ -51,7 +51,7 @@ NCURSES_SP_NAME(newpad) (NCURSES_SP_DCLx int l, int c)
     NCURSES_CH_T *ptr;
     int i;
 
-    T((T_CALLED("newpad(%p,%d, %d)"), SP_PARM, l, c));
+    T((T_CALLED("newpad(%p,%d, %d)"), (void *) SP_PARM, l, c));
 
     if (l <= 0 || c <= 0)
        returnWin(0);
@@ -140,7 +140,7 @@ pnoutrefresh(WINDOW *win,
 #endif
 
     T((T_CALLED("pnoutrefresh(%p, %d, %d, %d, %d, %d, %d)"),
-       win, pminrow, pmincol, sminrow, smincol, smaxrow, smaxcol));
+       (void *) win, pminrow, pmincol, sminrow, smincol, smaxrow, smaxcol));
 
     if (win == 0)
        returnCode(ERR);
@@ -320,7 +320,7 @@ pnoutrefresh(WINDOW *win,
 NCURSES_EXPORT(int)
 pechochar(WINDOW *pad, const chtype ch)
 {
-    T((T_CALLED("pechochar(%p, %s)"), pad, _tracechtype(ch)));
+    T((T_CALLED("pechochar(%p, %s)"), (void *) pad, _tracechtype(ch)));
 
     if (pad == 0)
        returnCode(ERR);
index cb43b2f5b7bf4f2f22dbaac866d573f0c07b7d2b..963181d9a49437e45f541baabefc44c7ccc2f593 100644 (file)
@@ -39,7 +39,7 @@
 
 #include <curses.priv.h>
 
-MODULE_ID("$Id: lib_printw.c,v 1.19 2009/04/18 18:45:55 tom Exp $")
+MODULE_ID("$Id: lib_printw.c,v 1.20 2009/10/24 22:07:03 tom Exp $")
 
 NCURSES_EXPORT(int)
 printw(const char *fmt,...)
@@ -70,7 +70,7 @@ wprintw(WINDOW *win, const char *fmt,...)
 #ifdef TRACE
     va_start(argp, fmt);
     T((T_CALLED("wprintw(%p,%s%s)"),
-       win, _nc_visbuf(fmt), _nc_varargs(fmt, argp)));
+       (void *) win, _nc_visbuf(fmt), _nc_varargs(fmt, argp)));
     va_end(argp);
 #endif
 
@@ -111,7 +111,7 @@ mvwprintw(WINDOW *win, int y, int x, const char *fmt,...)
 #ifdef TRACE
     va_start(argp, fmt);
     T((T_CALLED("mvwprintw(%d,%d,%p,%s%s)"),
-       y, x, win, _nc_visbuf(fmt), _nc_varargs(fmt, argp)));
+       y, x, (void *) win, _nc_visbuf(fmt), _nc_varargs(fmt, argp)));
     va_end(argp);
 #endif
 
@@ -132,7 +132,7 @@ vwprintw(WINDOW *win, const char *fmt, va_list argp)
     SCREEN *sp = _nc_screen_of(win);
 #endif
 
-    T((T_CALLED("vwprintw(%p,%s,va_list)"), win, _nc_visbuf(fmt)));
+    T((T_CALLED("vwprintw(%p,%s,va_list)"), (void *) win, _nc_visbuf(fmt)));
 
     buf = NCURSES_SP_NAME(_nc_printf_string) (NCURSES_SP_ARGx fmt, argp);
     if (buf != 0) {
index b04a488ba554bdf8914fbc15140b54d6f70eebd0..17f00ca85b425ba10b968be0720ede307e096bd6 100644 (file)
@@ -39,7 +39,7 @@
 
 #include <curses.priv.h>
 
-MODULE_ID("$Id: lib_redrawln.c,v 1.13 2009/04/18 18:46:00 tom Exp $")
+MODULE_ID("$Id: lib_redrawln.c,v 1.14 2009/10/24 22:08:32 tom Exp $")
 
 NCURSES_EXPORT(int)
 wredrawln(WINDOW *win, int beg, int num)
@@ -49,7 +49,7 @@ wredrawln(WINDOW *win, int beg, int num)
     size_t len;
     SCREEN *sp;
 
-    T((T_CALLED("wredrawln(%p,%d,%d)"), win, beg, num));
+    T((T_CALLED("wredrawln(%p,%d,%d)"), (void *) win, beg, num));
 
     if (win == 0)
        returnCode(ERR);
index 25b9b40a0fe932607100748b9df0ad50ce137d94..01d363f43fde63cccdcfd128589e0ba0b0459857 100644 (file)
@@ -42,7 +42,7 @@
 
 #include <curses.priv.h>
 
-MODULE_ID("$Id: lib_refresh.c,v 1.42 2009/06/06 20:27:39 tom Exp $")
+MODULE_ID("$Id: lib_refresh.c,v 1.43 2009/10/24 22:08:32 tom Exp $")
 
 NCURSES_EXPORT(int)
 wrefresh(WINDOW *win)
@@ -52,7 +52,7 @@ wrefresh(WINDOW *win)
     SCREEN *SP_PARM = _nc_screen_of(win);
 #endif
 
-    T((T_CALLED("wrefresh(%p)"), win));
+    T((T_CALLED("wrefresh(%p)"), (void *) win));
 
     if (win == 0) {
        code = ERR;
@@ -89,7 +89,7 @@ wnoutrefresh(WINDOW *win)
     SCREEN *SP_PARM = _nc_screen_of(win);
 #endif
 
-    T((T_CALLED("wnoutrefresh(%p)"), win));
+    T((T_CALLED("wnoutrefresh(%p)"), (void *) win));
 #ifdef TRACE
     if (USE_TRACEF(TRACE_UPDATE)) {
        _tracedump("...win", win);
index 5be5c08372940b617ee56ef7136bcb60669b4883..b28cfd1f2ffdc322cc9e19ed4645a716b86a571b 100644 (file)
@@ -45,7 +45,7 @@
 #define _POSIX_SOURCE
 #endif
 
-MODULE_ID("$Id: lib_restart.c,v 1.12 2009/08/30 17:59:13 tom Exp $")
+MODULE_ID("$Id: lib_restart.c,v 1.13 2009/10/24 22:47:43 tom Exp $")
 
 NCURSES_EXPORT(int)
 NCURSES_SP_NAME(restartterm) (NCURSES_SP_DCLx
@@ -58,7 +58,11 @@ NCURSES_SP_NAME(restartterm) (NCURSES_SP_DCLx
     TERMINAL *new_term;
 #endif
 
-    T((T_CALLED("restartterm(%p,%s,%d,%p)"), SP_PARM, termp, filenum, errret));
+    T((T_CALLED("restartterm(%p,%s,%d,%p)"),
+       (void *) SP_PARM,
+       termp,
+       filenum,
+       (void *) errret));
 
     if (TINFO_SETUP_TERM(&new_term, termp, filenum, errret, FALSE) != OK) {
        result = ERR;
index b8a5a227a1a9929a8be2232ee754c17ac46d84e9..a8621e63e17273d1cd8c71d5742a436f36e11cb8 100644 (file)
@@ -1,5 +1,5 @@
 /****************************************************************************
- * Copyright (c) 1998,2000,2001 Free Software Foundation, Inc.              *
+ * Copyright (c) 1998-2001,2009 Free Software Foundation, Inc.              *
  *                                                                          *
  * Permission is hereby granted, free of charge, to any person obtaining a  *
  * copy of this software and associated documentation files (the            *
@@ -40,7 +40,7 @@
 
 #include <curses.priv.h>
 
-MODULE_ID("$Id: lib_scanw.c,v 1.11 2001/06/30 23:39:41 tom Exp $")
+MODULE_ID("$Id: lib_scanw.c,v 1.12 2009/10/24 22:35:14 tom Exp $")
 
 NCURSES_EXPORT(int)
 vwscanw(WINDOW *win, NCURSES_CONST char *fmt, va_list argp)
@@ -73,7 +73,7 @@ wscanw(WINDOW *win, NCURSES_CONST char *fmt,...)
     int code;
     va_list ap;
 
-    T(("wscanw(%p,\"%s\",...) called", win, fmt));
+    T(("wscanw(%p,\"%s\",...) called", (void *) win, fmt));
 
     va_start(ap, fmt);
     code = vwscanw(win, fmt, ap);
index 34af68a3e4a94fde729a53692261a27e576743b9..27212b790611f8cba68c17d462d2851675cc75a9 100644 (file)
@@ -39,7 +39,7 @@
 #define CUR SP_TERMTYPE
 #endif
 
-MODULE_ID("$Id: lib_screen.c,v 1.37 2009/10/10 19:37:07 tom Exp $")
+MODULE_ID("$Id: lib_screen.c,v 1.38 2009/10/24 22:08:55 tom Exp $")
 
 #define MAX_SIZE 0x3fff                /* 16k is big enough for a window or pad */
 
@@ -49,7 +49,7 @@ NCURSES_SP_NAME(getwin) (NCURSES_SP_DCLx FILE *filep)
     WINDOW tmp, *nwin;
     int n;
 
-    T((T_CALLED("getwin(%p)"), filep));
+    T((T_CALLED("getwin(%p)"), (void *) filep));
 
     clearerr(filep);
     if (fread(&tmp, 1, sizeof(WINDOW), filep) < sizeof(WINDOW)
@@ -135,7 +135,7 @@ putwin(WINDOW *win, FILE *filep)
     int code = ERR;
     int n;
 
-    T((T_CALLED("putwin(%p,%p)"), win, filep));
+    T((T_CALLED("putwin(%p,%p)"), (void *) win, (void *) filep));
 
     if (win != 0) {
        size_t len = (size_t) (win->_maxx + 1);
@@ -162,7 +162,7 @@ NCURSES_SP_NAME(scr_restore) (NCURSES_SP_DCLx const char *file)
 {
     FILE *fp = 0;
 
-    T((T_CALLED("scr_restore(%p,%s)"), SP_PARM, _nc_visbuf(file)));
+    T((T_CALLED("scr_restore(%p,%s)"), (void *) SP_PARM, _nc_visbuf(file)));
 
     if (_nc_access(file, R_OK) < 0
        || (fp = fopen(file, "rb")) == 0) {
@@ -209,7 +209,7 @@ NCURSES_SP_NAME(scr_init) (NCURSES_SP_DCLx const char *file)
     FILE *fp = 0;
     int code = ERR;
 
-    T((T_CALLED("scr_init(%p,%s)"), SP_PARM, _nc_visbuf(file)));
+    T((T_CALLED("scr_init(%p,%s)"), (void *) SP_PARM, _nc_visbuf(file)));
 
     if (SP_PARM != 0 &&
 #ifdef USE_TERM_DRIVER
@@ -243,7 +243,7 @@ scr_init(const char *file)
 NCURSES_EXPORT(int)
 NCURSES_SP_NAME(scr_set) (NCURSES_SP_DCLx const char *file)
 {
-    T((T_CALLED("scr_set(%p,%s)"), SP_PARM, _nc_visbuf(file)));
+    T((T_CALLED("scr_set(%p,%s)"), (void *) SP_PARM, _nc_visbuf(file)));
 
     if (NCURSES_SP_NAME(scr_init) (NCURSES_SP_ARGx file) == ERR) {
        returnCode(ERR);
index ac85bd55ea1d50f773e4c1b57350fa1d3b50277d..454ad5b0c9628ab76568b3d30c17425ffa678476 100644 (file)
@@ -1,5 +1,5 @@
 /****************************************************************************
- * Copyright (c) 1998-2004,2006 Free Software Foundation, Inc.              *
+ * Copyright (c) 1998-2006,2009 Free Software Foundation, Inc.              *
  *                                                                          *
  * Permission is hereby granted, free of charge, to any person obtaining a  *
  * copy of this software and associated documentation files (the            *
@@ -43,7 +43,7 @@
 
 #include <curses.priv.h>
 
-MODULE_ID("$Id: lib_scroll.c,v 1.26 2006/10/14 20:46:08 tom Exp $")
+MODULE_ID("$Id: lib_scroll.c,v 1.27 2009/10/24 22:35:45 tom Exp $")
 
 NCURSES_EXPORT(void)
 _nc_scroll_window(WINDOW *win,
@@ -58,7 +58,7 @@ _nc_scroll_window(WINDOW *win,
     size_t to_copy = (size_t) (sizeof(NCURSES_CH_T) * (win->_maxx + 1));
 
     TR(TRACE_MOVE, ("_nc_scroll_window(%p, %d, %ld, %ld)",
-                   win, n, (long) top, (long) bottom));
+                   (void *) win, n, (long) top, (long) bottom));
 
     if (top < 0
        || bottom < top
@@ -135,7 +135,7 @@ _nc_scroll_window(WINDOW *win,
 NCURSES_EXPORT(int)
 wscrl(WINDOW *win, int n)
 {
-    T((T_CALLED("wscrl(%p,%d)"), win, n));
+    T((T_CALLED("wscrl(%p,%d)"), (void *) win, n));
 
     if (!win || !win->_scroll) {
        TR(TRACE_MOVE, ("...scrollok is false"));
index f6b30259be733cee0d86193bc2dde82eecb6688b..6a698a368da28091f065e9e030427f3259763bfb 100644 (file)
@@ -1,5 +1,5 @@
 /****************************************************************************
- * Copyright (c) 1998,2000 Free Software Foundation, Inc.                   *
+ * Copyright (c) 1998-2000,2009 Free Software Foundation, Inc.              *
  *                                                                          *
  * Permission is hereby granted, free of charge, to any person obtaining a  *
  * copy of this software and associated documentation files (the            *
 
 #include <curses.priv.h>
 
-MODULE_ID("$Id: lib_scrollok.c,v 1.4 2000/12/10 02:43:27 tom Exp $")
+MODULE_ID("$Id: lib_scrollok.c,v 1.5 2009/10/24 22:35:38 tom Exp $")
 
 NCURSES_EXPORT(int)
 scrollok(WINDOW *win, bool flag)
 {
-    T((T_CALLED("scrollok(%p,%d)"), win, flag));
+    T((T_CALLED("scrollok(%p,%d)"), (void *) win, flag));
 
     if (win) {
        win->_scroll = flag;
index c85d60f1164d819b17ede0955dd70ee6f82fa338..546fbc183a3c3cb9b173e971f73be1035bbd16ae 100644 (file)
@@ -1,5 +1,5 @@
 /****************************************************************************
- * Copyright (c) 1998,2000 Free Software Foundation, Inc.                   *
+ * Copyright (c) 1998-2000,2009 Free Software Foundation, Inc.              *
  *                                                                          *
  * Permission is hereby granted, free of charge, to any person obtaining a  *
  * copy of this software and associated documentation files (the            *
 
 #include <curses.priv.h>
 
-MODULE_ID("$Id: lib_scrreg.c,v 1.10 2000/12/10 02:43:27 tom Exp $")
+MODULE_ID("$Id: lib_scrreg.c,v 1.11 2009/10/24 22:35:28 tom Exp $")
 
 NCURSES_EXPORT(int)
 wsetscrreg(WINDOW *win, int top, int bottom)
 {
-    T((T_CALLED("wsetscrreg(%p,%d,%d)"), win, top, bottom));
+    T((T_CALLED("wsetscrreg(%p,%d,%d)"), (void *) win, top, bottom));
 
     if (win &&
        top >= 0 && top <= win->_maxy &&
index 49752fd71e31330635f5f13141f3f409a0d02053..7429e2aa23ad9aa0cf2a16bca13ab944b5ace5ca 100644 (file)
@@ -47,7 +47,7 @@
 #define CUR SP_TERMTYPE
 #endif
 
-MODULE_ID("$Id: lib_set_term.c,v 1.128 2009/09/27 14:21:25 tom Exp $")
+MODULE_ID("$Id: lib_set_term.c,v 1.129 2009/10/24 22:09:47 tom Exp $")
 
 #ifdef USE_TERM_DRIVER
 #define MaxColors      InfoOf(sp).maxcolors
@@ -63,7 +63,7 @@ set_term(SCREEN *screenp)
     SCREEN *oldSP;
     SCREEN *newSP;
 
-    T((T_CALLED("set_term(%p)"), screenp));
+    T((T_CALLED("set_term(%p)"), (void *) screenp));
 
     _nc_lock_global(curses);
 
@@ -93,7 +93,7 @@ set_term(SCREEN *screenp)
 
     _nc_unlock_global(curses);
 
-    T((T_RETURN("%p"), oldSP));
+    T((T_RETURN("%p"), (void *) oldSP));
     return (oldSP);
 }
 
@@ -136,7 +136,7 @@ delscreen(SCREEN *sp)
 {
     int i;
 
-    T((T_CALLED("delscreen(%p)"), sp));
+    T((T_CALLED("delscreen(%p)"), (void *) sp));
 
     _nc_lock_global(curses);
     if (delink_screen(sp)) {
@@ -327,7 +327,7 @@ NCURSES_SP_NAME(_nc_setupscreen) (
 #endif
 
     T((T_CALLED("_nc_setupscreen(%d, %d, %p, %d, %d)"),
-       slines, scolumns, output, filtered, slk_format));
+       slines, scolumns, (void *) output, filtered, slk_format));
 
     assert(CURRENT_SCREEN == 0);       /* has been reset in newterm() ! */
 
@@ -359,7 +359,7 @@ NCURSES_SP_NAME(_nc_setupscreen) (
        returnCode(ERR);
     }
 
-    T(("created SP %p", SP));
+    T(("created SP %p", (void *) SP));
 
     sp = SP;                   /* fixup so SET_LINES and SET_COLS works */
     sp->_next_screen = _nc_screen_chain;
@@ -751,7 +751,7 @@ NCURSES_SP_NAME(_nc_ripoffline) (NCURSES_SP_DCLx
     int code = ERR;
 
     START_TRACE();
-    T((T_CALLED("ripoffline(%p,%d,%p)"), SP_PARM, line, init));
+    T((T_CALLED("ripoffline(%p,%d,%p)"), (void *) SP_PARM, line, (void *) init));
 
     if (SP_PARM != 0 && SP_PARM->_prescreen) {
        if (line == 0) {
index d0407cec483d749d227a92956b05017ed6983185..9cd3a55cd085f543aaeb9baf3c0447bf54964778 100644 (file)
@@ -47,7 +47,7 @@
 #define CUR SP_TERMTYPE
 #endif
 
-MODULE_ID("$Id: lib_slk.c,v 1.42 2009/08/15 23:05:02 tom Exp $")
+MODULE_ID("$Id: lib_slk.c,v 1.43 2009/10/24 22:12:21 tom Exp $")
 
 #ifdef USE_TERM_DRIVER
 #define NumLabels    InfoOf(SP_PARM).numlabels
@@ -231,7 +231,7 @@ _nc_slk_initialize(WINDOW *stwin, int cols)
 NCURSES_EXPORT(int)
 NCURSES_SP_NAME(slk_restore) (NCURSES_SP_DCL0)
 {
-    T((T_CALLED("slk_restore(%p)"), SP_PARM));
+    T((T_CALLED("slk_restore(%p)"), (void *) SP_PARM));
 
     if (0 == SP_PARM)
        returnCode(ERR);
index f9ac4951128fab26f38516fef54024a35d99c107..bd5f539672a7747d681d522d2aec3162ae755331 100644 (file)
@@ -38,7 +38,7 @@
  */
 #include <curses.priv.h>
 
-MODULE_ID("$Id: lib_slkatr_set.c,v 1.13 2009/02/21 17:20:17 tom Exp $")
+MODULE_ID("$Id: lib_slkatr_set.c,v 1.14 2009/10/24 22:47:03 tom Exp $")
 
 NCURSES_EXPORT(int)
 NCURSES_SP_NAME(slk_attr_set) (NCURSES_SP_DCLx
@@ -48,7 +48,10 @@ NCURSES_SP_NAME(slk_attr_set) (NCURSES_SP_DCLx
 {
     int code = ERR;
 
-    T((T_CALLED("slk_attr_set(%p,%s,%d)"), SP_PARM, _traceattr(attr), color_pair_number));
+    T((T_CALLED("slk_attr_set(%p,%s,%d)"),
+       (void *) SP_PARM,
+       _traceattr(attr),
+       color_pair_number));
 
     if (SP_PARM != 0
        && SP_PARM->_slk != 0
index 274f963f42d83d7f1924af7bee0bee9a840bb427..bb980ab812cf79ec33dbfccd302779e0bea492af 100644 (file)
  */
 #include <curses.priv.h>
 
-MODULE_ID("$Id: lib_slkatrof.c,v 1.10 2009/02/21 17:35:28 tom Exp $")
+MODULE_ID("$Id: lib_slkatrof.c,v 1.11 2009/10/24 22:12:21 tom Exp $")
 
 NCURSES_EXPORT(int)
 NCURSES_SP_NAME(slk_attroff) (NCURSES_SP_DCLx const chtype attr)
 {
-    T((T_CALLED("slk_attroff(%p,%s)"), SP_PARM, _traceattr(attr)));
+    T((T_CALLED("slk_attroff(%p,%s)"), (void *) SP_PARM, _traceattr(attr)));
 
     if (SP_PARM != 0 && SP_PARM->_slk != 0) {
        TR(TRACE_ATTRS, ("... current %s", _tracech_t(CHREF(SP_PARM->_slk->attr))));
index 4734ce5ff255195641f93191901d01e748e8670b..00e5df3931df86a9547f4e28c14c30a49db0836b 100644 (file)
  */
 #include <curses.priv.h>
 
-MODULE_ID("$Id: lib_slkatron.c,v 1.10 2009/02/21 18:16:04 tom Exp $")
+MODULE_ID("$Id: lib_slkatron.c,v 1.11 2009/10/24 22:12:21 tom Exp $")
 
 NCURSES_EXPORT(int)
 NCURSES_SP_NAME(slk_attron) (NCURSES_SP_DCLx const chtype attr)
 {
-    T((T_CALLED("slk_attron(%p,%s)"), SP_PARM, _traceattr(attr)));
+    T((T_CALLED("slk_attron(%p,%s)"), (void *) SP_PARM, _traceattr(attr)));
 
     if (SP_PARM != 0 && SP_PARM->_slk != 0) {
        TR(TRACE_ATTRS, ("... current %s", _tracech_t(CHREF(SP_PARM->_slk->attr))));
index e33747e7bdb4466e60e8f9e0f4571e9a09f37ae8..544b8d0faab7f66c14a56fa993f86344a7900356 100644 (file)
  */
 #include <curses.priv.h>
 
-MODULE_ID("$Id: lib_slkatrset.c,v 1.9 2009/02/21 17:49:07 tom Exp $")
+MODULE_ID("$Id: lib_slkatrset.c,v 1.10 2009/10/24 22:12:21 tom Exp $")
 
 NCURSES_EXPORT(int)
 NCURSES_SP_NAME(slk_attrset) (NCURSES_SP_DCLx const chtype attr)
 {
-    T((T_CALLED("slk_attrset(%p,%s)"), SP_PARM, _traceattr(attr)));
+    T((T_CALLED("slk_attrset(%p,%s)"), (void *) SP_PARM, _traceattr(attr)));
 
     if (SP_PARM != 0 && SP_PARM->_slk != 0) {
        SetAttr(SP_PARM->_slk->attr, attr);
index 2e254da4a36ec11be06e2fdbc22680c767fb58a4..34aab2fbdf8c4225baf34a00f3aa08b1d63cca44 100644 (file)
  */
 #include <curses.priv.h>
 
-MODULE_ID("$Id: lib_slkattr.c,v 1.8 2009/02/21 17:48:14 tom Exp $")
+MODULE_ID("$Id: lib_slkattr.c,v 1.9 2009/10/24 22:12:21 tom Exp $")
 
 NCURSES_EXPORT(attr_t)
 NCURSES_SP_NAME(slk_attr) (NCURSES_SP_DCL0)
 {
-    T((T_CALLED("slk_attr(%p)"), SP_PARM));
+    T((T_CALLED("slk_attr(%p)"), (void *) SP_PARM));
 
     if (SP_PARM != 0 && SP_PARM->_slk != 0) {
        attr_t result = AttrOf(SP_PARM->_slk->attr) & ALL_BUT_COLOR;
index 54d5781618f4ad00e86c5334e571c9d81b604833..ff4fe28c5184afae716e26b2dc6f09521a7103fd 100644 (file)
  */
 #include <curses.priv.h>
 
-MODULE_ID("$Id: lib_slkclear.c,v 1.12 2009/02/21 17:47:14 tom Exp $")
+MODULE_ID("$Id: lib_slkclear.c,v 1.13 2009/10/24 22:12:21 tom Exp $")
 
 NCURSES_EXPORT(int)
 NCURSES_SP_NAME(slk_clear) (NCURSES_SP_DCL0)
 {
     int rc = ERR;
 
-    T((T_CALLED("slk_clear(%p)"), SP_PARM));
+    T((T_CALLED("slk_clear(%p)"), (void *) SP_PARM));
 
     if (SP_PARM != 0 && SP_PARM->_slk != 0) {
        SP_PARM->_slk->hidden = TRUE;
index 17550bd13c81e2e221ae0388d1453982b21d8ea5..c1211bcb884a32cf8f4b0197f5d595eded2f139f 100644 (file)
  */
 #include <curses.priv.h>
 
-MODULE_ID("$Id: lib_slkcolor.c,v 1.15 2009/02/21 16:59:50 tom Exp $")
+MODULE_ID("$Id: lib_slkcolor.c,v 1.16 2009/10/24 22:12:21 tom Exp $")
 
 NCURSES_EXPORT(int)
 NCURSES_SP_NAME(slk_color) (NCURSES_SP_DCLx short color_pair_number)
 {
     int code = ERR;
 
-    T((T_CALLED("slk_color(%p,%d)"), SP_PARM, color_pair_number));
+    T((T_CALLED("slk_color(%p,%d)"), (void *) SP_PARM, color_pair_number));
 
     if (SP_PARM != 0
        && SP_PARM->_slk != 0
index e7fa1221eb02819ec6a2648e0545eba4714767d0..f856a5744cf5bf13619fe33bc0afd0bce0d4a728 100644 (file)
@@ -40,7 +40,7 @@
  */
 #include <curses.priv.h>
 
-MODULE_ID("$Id: lib_slkinit.c,v 1.11 2009/05/23 23:32:57 tom Exp $")
+MODULE_ID("$Id: lib_slkinit.c,v 1.12 2009/10/24 22:12:21 tom Exp $")
 
 #ifdef USE_SP_RIPOFF
 #define SoftkeyFormat SP_PARM->slk_format
@@ -53,7 +53,7 @@ NCURSES_SP_NAME(slk_init) (NCURSES_SP_DCLx int format)
 {
     int code = ERR;
 
-    T((T_CALLED("slk_init(%p,%d)"), SP_PARM, format));
+    T((T_CALLED("slk_init(%p,%d)"), (void *) SP_PARM, format));
 
     if (format >= 0
        && format <= 3
index 85bb8cbdce44ae14b33850d9d81fa7872661af55..d0b2a230796a6671d4f696238d739f25a20e16df 100644 (file)
  */
 #include <curses.priv.h>
 
-MODULE_ID("$Id: lib_slklab.c,v 1.9 2009/02/21 18:48:42 tom Exp $")
+MODULE_ID("$Id: lib_slklab.c,v 1.10 2009/10/24 22:12:21 tom Exp $")
 
 NCURSES_EXPORT(char *)
 NCURSES_SP_NAME(slk_label) (NCURSES_SP_DCLx int n)
 {
-    T((T_CALLED("slk_label(%p,%d)"), SP_PARM, n));
+    T((T_CALLED("slk_label(%p,%d)"), (void *) SP_PARM, n));
 
     if (SP_PARM == 0 || SP_PARM->_slk == 0 || n < 1 || n > SP_PARM->_slk->labcnt)
        returnPtr(0);
index 01540f0f30b2d21905ee64c92872342d8ed8a468..167da9cd57a2638f38070548e5758bf59eff1317 100644 (file)
@@ -43,7 +43,7 @@
 #define CUR SP_TERMTYPE
 #endif
 
-MODULE_ID("$Id: lib_slkrefr.c,v 1.24 2009/08/29 18:43:13 tom Exp $")
+MODULE_ID("$Id: lib_slkrefr.c,v 1.25 2009/10/24 22:12:21 tom Exp $")
 
 #ifdef USE_TERM_DRIVER
 #define NumLabels    InfoOf(SP_PARM).numlabels
@@ -144,7 +144,7 @@ slk_intern_refresh(SCREEN *sp)
 NCURSES_EXPORT(int)
 NCURSES_SP_NAME(slk_noutrefresh) (NCURSES_SP_DCL0)
 {
-    T((T_CALLED("slk_noutrefresh(%p)"), SP_PARM));
+    T((T_CALLED("slk_noutrefresh(%p)"), (void *) SP_PARM));
 
     if (SP_PARM == 0 || SP_PARM->_slk == 0)
        returnCode(ERR);
@@ -169,7 +169,7 @@ slk_noutrefresh(void)
 NCURSES_EXPORT(int)
 NCURSES_SP_NAME(slk_refresh) (NCURSES_SP_DCL0)
 {
-    T((T_CALLED("slk_refresh(%p)"), SP_PARM));
+    T((T_CALLED("slk_refresh(%p)"), (void *) SP_PARM));
 
     if (SP_PARM == 0 || SP_PARM->_slk == 0)
        returnCode(ERR);
index fa09bbf5a5ed9501f9a5185bd28a22d453094404..eba9f8166731fdb9ad7173dd11997e7a742e2483 100644 (file)
@@ -44,7 +44,7 @@
 #endif
 #endif
 
-MODULE_ID("$Id: lib_slkset.c,v 1.19 2009/02/21 17:34:06 tom Exp $")
+MODULE_ID("$Id: lib_slkset.c,v 1.20 2009/10/24 22:12:21 tom Exp $")
 
 NCURSES_EXPORT(int)
 NCURSES_SP_NAME(slk_set) (NCURSES_SP_DCLx int i, const char *astr, int format)
@@ -57,7 +57,7 @@ NCURSES_SP_NAME(slk_set) (NCURSES_SP_DCLx int i, const char *astr, int format)
     const char *str = astr;
     const char *p;
 
-    T((T_CALLED("slk_set(%p, %d, \"%s\", %d)"), SP_PARM, i, str, format));
+    T((T_CALLED("slk_set(%p, %d, \"%s\", %d)"), (void *) SP_PARM, i, str, format));
 
     if (SP_PARM == 0
        || (slk = SP_PARM->_slk) == 0
index d27207ffc149c0a56d43dcc3011df0414f3ae331..ba77fd2375b7a162aab327545e5cc6da824fe0d2 100644 (file)
  */
 #include <curses.priv.h>
 
-MODULE_ID("$Id: lib_slktouch.c,v 1.7 2009/02/21 17:42:59 tom Exp $")
+MODULE_ID("$Id: lib_slktouch.c,v 1.8 2009/10/24 22:12:21 tom Exp $")
 
 NCURSES_EXPORT(int)
 NCURSES_SP_NAME(slk_touch) (NCURSES_SP_DCL0)
 {
-    T((T_CALLED("slk_touch(%p)"), SP_PARM));
+    T((T_CALLED("slk_touch(%p)"), (void *) SP_PARM));
 
     if (SP_PARM == 0 || SP_PARM->_slk == 0)
        returnCode(ERR);
index 2ac21f2e0d1f34b01a81a48613ec32e8245cea14..3f8771a839fd3e2e1706251a18a3c0e256d0322a 100644 (file)
@@ -1,5 +1,5 @@
 /****************************************************************************
- * Copyright (c) 1998,2000 Free Software Foundation, Inc.                   *
+ * Copyright (c) 1998-2000,2009 Free Software Foundation, Inc.              *
  *                                                                          *
  * Permission is hereby granted, free of charge, to any person obtaining a  *
  * copy of this software and associated documentation files (the            *
 
 #include <curses.priv.h>
 
-MODULE_ID("$Id: lib_touch.c,v 1.9 2000/12/10 02:43:27 tom Exp $")
+MODULE_ID("$Id: lib_touch.c,v 1.10 2009/10/24 22:36:29 tom Exp $")
 
 NCURSES_EXPORT(bool)
 is_linetouched(WINDOW *win, int line)
 {
-    T((T_CALLED("is_linetouched(%p,%d)"), win, line));
+    T((T_CALLED("is_linetouched(%p,%d)"), (void *) win, line));
 
     /* XSI doesn't define any error */
     if (!win || (line > win->_maxy) || (line < 0))
@@ -62,7 +62,7 @@ is_wintouched(WINDOW *win)
 {
     int i;
 
-    T((T_CALLED("is_wintouched(%p)"), win));
+    T((T_CALLED("is_wintouched(%p)"), (void *) win));
 
     if (win)
        for (i = 0; i <= win->_maxy; i++)
@@ -76,7 +76,7 @@ wtouchln(WINDOW *win, int y, int n, int changed)
 {
     int i;
 
-    T((T_CALLED("wtouchln(%p,%d,%d,%d)"), win, y, n, changed));
+    T((T_CALLED("wtouchln(%p,%d,%d,%d)"), (void *) win, y, n, changed));
 
     if (!win || (n < 0) || (y < 0) || (y > win->_maxy))
        returnCode(ERR);
index 54a8998fbbb3f6d4b53c4028d7c88c3d030a5477..63a14cff7594b0fbcbf612eb24fae6e0658c7361 100644 (file)
@@ -42,7 +42,7 @@
 
 #include <curses.priv.h>
 
-MODULE_ID("$Id: lib_ungetch.c,v 1.13 2009/04/18 20:30:12 tom Exp $")
+MODULE_ID("$Id: lib_ungetch.c,v 1.14 2009/10/24 22:12:21 tom Exp $")
 
 #include <fifo_defs.h>
 
@@ -62,7 +62,7 @@ safe_ungetch(SCREEN *sp, int ch)
 {
     int rc = ERR;
 
-    T((T_CALLED("ungetch(%p,%s)"), sp, _nc_tracechar(sp, ch)));
+    T((T_CALLED("ungetch(%p,%s)"), (void *) sp, _nc_tracechar(sp, ch)));
 
     if (tail != -1) {
        if (head == -1) {
index 1a2537e7eb6a13a0a998ff116fd714ccf7300f16..a396e082457c298500053af824fd33ce5d54abc5 100644 (file)
@@ -1,5 +1,5 @@
 /****************************************************************************
- * Copyright (c) 1998-2001,2006 Free Software Foundation, Inc.              *
+ * Copyright (c) 1998-2006,2009 Free Software Foundation, Inc.              *
  *                                                                          *
  * Permission is hereby granted, free of charge, to any person obtaining a  *
  * copy of this software and associated documentation files (the            *
@@ -40,7 +40,7 @@
 
 #include <curses.priv.h>
 
-MODULE_ID("$Id: lib_vline.c,v 1.10 2006/03/11 21:52:19 tom Exp $")
+MODULE_ID("$Id: lib_vline.c,v 1.11 2009/10/24 22:36:15 tom Exp $")
 
 NCURSES_EXPORT(int)
 wvline(WINDOW *win, chtype ch, int n)
@@ -49,7 +49,7 @@ wvline(WINDOW *win, chtype ch, int n)
     NCURSES_SIZE_T row, col;
     NCURSES_SIZE_T end;
 
-    T((T_CALLED("wvline(%p,%s,%d)"), win, _tracechtype(ch), n));
+    T((T_CALLED("wvline(%p,%s,%d)"), (void *) win, _tracechtype(ch), n));
 
     if (win) {
        NCURSES_CH_T wch;
index bf2020e060278385dda73b2822d6fbfe8de920a2..fff0b395f1d8c3a3852d6d6f95617eca714a4a69 100644 (file)
@@ -1,5 +1,5 @@
 /****************************************************************************
- * Copyright (c) 1998-2005,2006 Free Software Foundation, Inc.              *
+ * Copyright (c) 1998-2006,2009 Free Software Foundation, Inc.              *
  *                                                                          *
  * Permission is hereby granted, free of charge, to any person obtaining a  *
  * copy of this software and associated documentation files (the            *
 #include <curses.priv.h>
 #include <ctype.h>
 
-MODULE_ID("$Id: lib_wattroff.c,v 1.9 2006/05/27 19:30:33 tom Exp $")
+MODULE_ID("$Id: lib_wattroff.c,v 1.10 2009/10/24 22:36:08 tom Exp $")
 
 NCURSES_EXPORT(int)
 wattr_off(WINDOW *win, attr_t at, void *opts GCC_UNUSED)
 {
-    T((T_CALLED("wattr_off(%p,%s)"), win, _traceattr(at)));
+    T((T_CALLED("wattr_off(%p,%s)"), (void *) win, _traceattr(at)));
     if (win) {
        T(("... current %s (%d)",
           _traceattr(WINDOW_ATTRS(win)),
index 2e17d965e94a95af3b9c11deb1f9b167a35162c8..611feaa31685469bcaf4c5bcf01fb30741ab94b9 100644 (file)
@@ -1,5 +1,5 @@
 /****************************************************************************
- * Copyright (c) 1998-2005,2006 Free Software Foundation, Inc.              *
+ * Copyright (c) 1998-2006,2009 Free Software Foundation, Inc.              *
  *                                                                          *
  * Permission is hereby granted, free of charge, to any person obtaining a  *
  * copy of this software and associated documentation files (the            *
 #include <curses.priv.h>
 #include <ctype.h>
 
-MODULE_ID("$Id: lib_wattron.c,v 1.9 2006/05/27 19:30:46 tom Exp $")
+MODULE_ID("$Id: lib_wattron.c,v 1.10 2009/10/24 22:36:01 tom Exp $")
 
 NCURSES_EXPORT(int)
 wattr_on(WINDOW *win, attr_t at, void *opts GCC_UNUSED)
 {
-    T((T_CALLED("wattr_on(%p,%s)"), win, _traceattr(at)));
+    T((T_CALLED("wattr_on(%p,%s)"), (void *) win, _traceattr(at)));
     if (win != 0) {
        T(("... current %s (%d)",
           _traceattr(WINDOW_ATTRS(win)),
index 5fb3f9e3aaf67dbe54d29be65623cbc4fbc995a3..43c614593100433c70861ab696ff2f46ed1aff1e 100644 (file)
@@ -1,5 +1,5 @@
 /****************************************************************************
- * Copyright (c) 1998,2000,2001 Free Software Foundation, Inc.              *
+ * Copyright (c) 1998-2001,2009 Free Software Foundation, Inc.              *
  *                                                                          *
  * Permission is hereby granted, free of charge, to any person obtaining a  *
  * copy of this software and associated documentation files (the            *
 
 #include <curses.priv.h>
 
-MODULE_ID("$Id: lib_winch.c,v 1.6 2008/11/16 00:19:59 juergen Exp $")
+MODULE_ID("$Id: lib_winch.c,v 1.7 2009/10/24 22:35:54 tom Exp $")
 
 NCURSES_EXPORT(chtype)
 winch(WINDOW *win)
 {
-    T((T_CALLED("winch(%p)"), win));
+    T((T_CALLED("winch(%p)"), (void *) win));
     if (win != 0) {
        returnChtype(CharOf(win->_line[win->_cury].text[win->_curx]) |
                     AttrOf(win->_line[win->_cury].text[win->_curx]));
index 2261a1f056ecff7334ddd336467c1f2fb755b9d7..c740ea13d798f02d55189d7fe368d7350868b99e 100644 (file)
@@ -39,7 +39,7 @@
 
 #include <curses.priv.h>
 
-MODULE_ID("$Id: lib_window.c,v 1.26 2009/04/18 18:46:09 tom Exp $")
+MODULE_ID("$Id: lib_window.c,v 1.27 2009/10/24 22:12:46 tom Exp $")
 
 NCURSES_EXPORT(void)
 _nc_synchook(WINDOW *win)
@@ -58,7 +58,7 @@ mvderwin(WINDOW *win, int y, int x)
     WINDOW *orig;
     int i;
 
-    T((T_CALLED("mvderwin(%p,%d,%d)"), win, y, x));
+    T((T_CALLED("mvderwin(%p,%d,%d)"), (void *) win, y, x));
 
     if (win && (orig = win->_parent)) {
        if (win->_parx == x && win->_pary == y)
@@ -82,7 +82,7 @@ NCURSES_EXPORT(int)
 syncok(WINDOW *win, bool bf)
 /* enable/disable automatic wsyncup() on each change to window */
 {
-    T((T_CALLED("syncok(%p,%d)"), win, bf));
+    T((T_CALLED("syncok(%p,%d)"), (void *) win, bf));
 
     if (win) {
        win->_sync = bf;
@@ -98,7 +98,7 @@ wsyncup(WINDOW *win)
 {
     WINDOW *wp;
 
-    T((T_CALLED("wsyncup(%p)"), win));
+    T((T_CALLED("wsyncup(%p)"), (void *) win));
     if (win && win->_parent) {
        for (wp = win; wp->_parent; wp = wp->_parent) {
            int y;
@@ -128,7 +128,7 @@ wsyncdown(WINDOW *win)
 /* mark changed every cell in win that is changed in any of its ancestors */
 /* Rewritten by J. Pfeifer, 1-Apr-96 (don't even think that...)           */
 {
-    T((T_CALLED("wsyncdown(%p)"), win));
+    T((T_CALLED("wsyncdown(%p)"), (void *) win));
 
     if (win && win->_parent) {
        WINDOW *pp = win->_parent;
@@ -167,7 +167,7 @@ wcursyncup(WINDOW *win)
 {
     WINDOW *wp;
 
-    T((T_CALLED("wcursyncup(%p)"), win));
+    T((T_CALLED("wcursyncup(%p)"), (void *) win));
     for (wp = win; wp && wp->_parent; wp = wp->_parent) {
        wmove(wp->_parent, wp->_pary + wp->_cury, wp->_parx + wp->_curx);
     }
@@ -182,7 +182,7 @@ dupwin(WINDOW *win)
     size_t linesize;
     int i;
 
-    T((T_CALLED("dupwin(%p)"), win));
+    T((T_CALLED("dupwin(%p)"), (void *) win));
 
     if (win != 0) {
 #if NCURSES_SP_FUNCS
index 5ec3df6b35e4bf78ae810fe4315ffe1787d49fa7..3db35fadb1777cc0b76f9c524e5bd38ac71d1156 100644 (file)
@@ -45,7 +45,7 @@
 #define CUR SP_TERMTYPE
 #endif
 
-MODULE_ID("$Id: resizeterm.c,v 1.41 2009/08/30 16:18:58 tom Exp $")
+MODULE_ID("$Id: resizeterm.c,v 1.42 2009/10/24 20:38:43 tom Exp $")
 
 /*
  * If we're trying to be reentrant, do not want any local statics.
@@ -71,13 +71,13 @@ show_window_sizes(const char *name)
 
     _nc_lock_global(curses);
     for (each_screen(sp)) {
-       _tracef("%s resizing: %p: %2d x %2d (%2d x %2d)", name, sp,
+       _tracef("%s resizing: %p: %2d x %2d (%2d x %2d)", name, (void *) sp,
                *(ptrLines(sp)),
                *(ptrCols(sp)),
                screen_lines(sp), screen_columns(sp));
        for (each_window(sp, wp)) {
            _tracef("  window %p is %2ld x %2ld at %2ld,%2ld",
-                   &(wp->win),
+                   (void *) &(wp->win),
                    (long) wp->win._maxy + 1,
                    (long) wp->win._maxx + 1,
                    (long) wp->win._begy,
@@ -95,7 +95,7 @@ show_window_sizes(const char *name)
 NCURSES_EXPORT(bool)
 NCURSES_SP_NAME(is_term_resized) (NCURSES_SP_DCLx int ToLines, int ToCols)
 {
-    T((T_CALLED("is_term_resized(%p, %d, %d)"), SP_PARM, ToLines, ToCols));
+    T((T_CALLED("is_term_resized(%p, %d, %d)"), (void *) SP_PARM, ToLines, ToCols));
     returnCode(ToLines > 0
               && ToCols > 0
               && (ToLines != screen_lines(SP_PARM)
@@ -214,7 +214,7 @@ adjust_window(WINDOW *win, int ToLines, int ToCols, int stolen EXTRA_DCLS)
     ripoff_t *rop = ripped_window(win);
 
     T((T_CALLED("adjust_window(%p,%d,%d)%s depth %d/%d currently %ldx%ld at %ld,%ld"),
-       win, ToLines, ToCols,
+       (void *) win, ToLines, ToCols,
        (rop != 0) ? " (rip)" : "",
        parent_depth(win),
        child_depth(win),
@@ -226,7 +226,7 @@ adjust_window(WINDOW *win, int ToLines, int ToCols, int stolen EXTRA_DCLS)
         * If it is a ripped-off window at the bottom of the screen, simply
         * move it to the same relative position.
         */
-       win->_begy = ToLines - ripped_bottom(win) - 0 - win->_yoffset;
+       win->_begy = (NCURSES_SIZE_T) (ToLines - ripped_bottom(win) - 0 - win->_yoffset);
        if (rop->hook == _nc_slk_initialize)
            _nc_format_slks(
 #if NCURSES_SP_FUNCS
@@ -238,7 +238,7 @@ adjust_window(WINDOW *win, int ToLines, int ToCols, int stolen EXTRA_DCLS)
         * If it is below the bottom of the new screen, move up by the same
         * amount that the screen shrank.
         */
-       win->_begy += (ToLines - CurLines);
+       win->_begy = (NCURSES_SIZE_T) (win->_begy + (ToLines - CurLines));
     } else {
        if (myLines == (CurLines - stolen)
            && ToLines != CurLines) {
@@ -275,7 +275,7 @@ decrease_size(NCURSES_SP_DCLx int ToLines, int ToCols, int stolen EXTRA_DCLS)
     int depth = 0;
     WINDOWLIST *wp;
 
-    T((T_CALLED("decrease_size(%p, %d, %d)"), SP_PARM, ToLines, ToCols));
+    T((T_CALLED("decrease_size(%p, %d, %d)"), (void *) SP_PARM, ToLines, ToCols));
 
     do {
        found = FALSE;
@@ -309,7 +309,7 @@ increase_size(NCURSES_SP_DCLx int ToLines, int ToCols, int stolen EXTRA_DCLS)
     int depth = 0;
     WINDOWLIST *wp;
 
-    T((T_CALLED("increase_size(%p, %d, %d)"), SP_PARM, ToLines, ToCols));
+    T((T_CALLED("increase_size(%p, %d, %d)"), (void *) SP_PARM, ToLines, ToCols));
 
     do {
        found = FALSE;
@@ -343,9 +343,9 @@ NCURSES_SP_NAME(resize_term) (NCURSES_SP_DCLx int ToLines, int ToCols)
     int was_stolen;
 
     T((T_CALLED("resize_term(%p,%d,%d) old(%d,%d)"),
-       SP_PARM, ToLines, ToCols,
-       SP_PARM == 0 ? -1 : screen_lines(SP_PARM),
-       SP_PARM == 0 ? -1 : screen_columns(SP_PARM)));
+       (void *) SP_PARM, ToLines, ToCols,
+       (SP_PARM == 0) ? -1 : screen_lines(SP_PARM),
+       (SP_PARM == 0) ? -1 : screen_columns(SP_PARM)));
 
     if (SP_PARM == 0) {
        returnCode(ERR);
@@ -383,17 +383,17 @@ NCURSES_SP_NAME(resize_term) (NCURSES_SP_DCLx int ToLines, int ToCols)
            decrease_size(NCURSES_SP_ARGx ToLines, ToCols, was_stolen EXTRA_ARGS);
        }
 
-       screen_lines(SP_PARM) = ToLines;
-       screen_columns(SP_PARM) = ToCols;
+       screen_lines(SP_PARM) = (NCURSES_SIZE_T) ToLines;
+       screen_columns(SP_PARM) = (NCURSES_SIZE_T) ToCols;
 
 #ifdef USE_TERM_DRIVER
        CallDriver_2(SP_PARM, setsize, ToLines, ToCols);
 #else
-       lines = ToLines;
-       columns = ToCols;
+       lines = (NCURSES_SIZE_T) ToLines;
+       columns = (NCURSES_SIZE_T) ToCols;
 #endif
 
-       SP_PARM->_lines_avail = ToLines - was_stolen;
+       SP_PARM->_lines_avail = (NCURSES_SIZE_T) (ToLines - was_stolen);
 
        if (SP_PARM->oldhash) {
            FreeAndNull(SP_PARM->oldhash);
@@ -449,8 +449,9 @@ NCURSES_SP_NAME(resizeterm) (NCURSES_SP_DCLx int ToLines, int ToCols)
     int result = ERR;
 
     T((T_CALLED("resizeterm(%p, %d,%d) old(%d,%d)"),
-       SP_PARM, ToLines, ToCols,
-       SP_PARM == 0 ? -1 : screen_lines(SP_PARM), screen_columns(SP_PARM)));
+       (void *) SP_PARM, ToLines, ToCols,
+       (SP_PARM == 0) ? -1 : screen_lines(SP_PARM),
+       screen_columns(SP_PARM)));
 
     if (SP_PARM != 0) {
        result = OK;
index 402bd2f7aa0d84c7c56ff3232073be4ed5ce5686..6bbe6de5ed9eff65e22617c1fdba3a89c212cfc4 100644 (file)
@@ -1,5 +1,5 @@
 /****************************************************************************
- * Copyright (c) 1998-2007,2008 Free Software Foundation, Inc.              *
+ * Copyright (c) 1998-2008,2009 Free Software Foundation, Inc.              *
  *                                                                          *
  * Permission is hereby granted, free of charge, to any person obtaining a  *
  * copy of this software and associated documentation files (the            *
@@ -39,7 +39,7 @@
 
 #include <curses.priv.h>
 
-MODULE_ID("$Id: tries.c,v 1.28 2008/11/16 00:19:59 juergen Exp $")
+MODULE_ID("$Id: tries.c,v 1.29 2009/10/24 22:39:11 tom Exp $")
 
 /*
  * Expand a keycode into the string that it corresponds to, returning null if
@@ -89,7 +89,7 @@ _nc_expand_try(TRIES * tree, unsigned code, int *count, size_t len)
 NCURSES_EXPORT(int)
 _nc_remove_key(TRIES ** tree, unsigned code)
 {
-    T((T_CALLED("_nc_remove_key(%p,%d)"), tree, code));
+    T((T_CALLED("_nc_remove_key(%p,%d)"), (void *) tree, code));
 
     if (code == 0)
        returnCode(FALSE);
@@ -121,7 +121,7 @@ _nc_remove_key(TRIES ** tree, unsigned code)
 NCURSES_EXPORT(int)
 _nc_remove_string(TRIES ** tree, const char *string)
 {
-    T((T_CALLED("_nc_remove_string(%p,%s)"), tree, _nc_visbuf(string)));
+    T((T_CALLED("_nc_remove_string(%p,%s)"), (void *) tree, _nc_visbuf(string)));
 
     if (string == 0 || *string == 0)
        returnCode(FALSE);
index f6408c37928e75fcbd4cfe9bad750fa4d4f8a3c3..8eb733919848ae7e835978a7c6fd746a8f532c49 100644 (file)
@@ -1,5 +1,5 @@
 /****************************************************************************
- * Copyright (c) 2007,2008 Free Software Foundation, Inc.                   *
+ * Copyright (c) 2007-2008,2009 Free Software Foundation, Inc.              *
  *                                                                          *
  * Permission is hereby granted, free of charge, to any person obtaining a  *
  * copy of this software and associated documentation files (the            *
 
 #include <curses.priv.h>
 
-MODULE_ID("$Id: use_window.c,v 1.8 2008/06/07 14:13:46 tom Exp $")
+MODULE_ID("$Id: use_window.c,v 1.9 2009/10/24 22:40:24 tom Exp $")
 
 NCURSES_EXPORT(int)
 use_window(WINDOW *win, NCURSES_WINDOW_CB func, void *data)
 {
     int code = OK;
 
-    T((T_CALLED("use_window(%p,%p,%p)"), win, func, data));
+    T((T_CALLED("use_window(%p,%p,%p)"), (void *) win, func, data));
     _nc_lock_global(curses);
     code = func(win, data);
     _nc_unlock_global(curses);
index e441b669d7c6b2bcf68616d78ea78b986c9a2008..d5ce3974e278b0cab85edd147ca2a354a8c55012 100644 (file)
@@ -33,7 +33,7 @@
 
 #include <curses.priv.h>
 
-MODULE_ID("$Id: wresize.c,v 1.31 2009/05/23 19:50:16 tom Exp $")
+MODULE_ID("$Id: wresize.c,v 1.32 2009/10/24 22:15:00 tom Exp $")
 
 static int
 cleanup_lines(struct ldat *data, int length)
@@ -97,7 +97,7 @@ wresize(WINDOW *win, int ToLines, int ToCols)
     struct ldat *new_lines = 0;
 
 #ifdef TRACE
-    T((T_CALLED("wresize(%p,%d,%d)"), win, ToLines, ToCols));
+    T((T_CALLED("wresize(%p,%d,%d)"), (void *) win, ToLines, ToCols));
     if (win) {
        TR(TRACE_UPDATE, ("...beg (%ld, %ld), max(%ld,%ld), reg(%ld,%ld)",
                          (long) win->_begy, (long) win->_begx,
index f0e9f767fab03074c886a421a3bc8e32ae020280..256c6f98e19fd5a8107a05c6927f336ec00cb5b8 100644 (file)
@@ -35,7 +35,7 @@
 
 
 /*
- * $Id: curses.priv.h,v 1.439 2009/09/26 22:25:35 tom Exp $
+ * $Id: curses.priv.h,v 1.441 2009/10/24 20:29:56 tom Exp $
  *
  *     curses.priv.h
  *
@@ -1257,7 +1257,7 @@ extern NCURSES_EXPORT_VAR(SIG_ATOMIC_T) _nc_have_sigwinch;
                                        putc(PUTC_ch,b);                            \
                                    break;                                          \
                                }                                                   \
-                               fwrite(PUTC_buf, (unsigned) PUTC_n, 1, b);          \
+                               IGNORE_RC(fwrite(PUTC_buf, (unsigned) PUTC_n, 1, b)); \
                            }                                                       \
                            COUNT_OUTCHARS(PUTC_i);                                 \
                        } } } while (0)
@@ -1500,6 +1500,15 @@ extern NCURSES_EXPORT(const char *) _nc_viscbuf (const NCURSES_CH_T *, int);
 
 #endif /* TRACE/!TRACE */
 
+/*
+ * Workaround for defective implementation of gcc attribute warn_unused_result
+ */
+#if defined(__GNUC__) && defined(_FORTIFY_SOURCE)
+#define IGNORE_RC(func) errno = func
+#else
+#define IGNORE_RC(func) (void) func
+#endif /* gcc workarounds */
+
 /*
  * Return-codes for tgetent() and friends.
  */
@@ -1833,6 +1842,26 @@ extern NCURSES_EXPORT(int) _nc_eventlist_timeout(_nc_eventlist *);
 #define wgetnstr_events(win, str, maxlen, evl) wgetnstr(win, str, maxlen)
 #endif
 
+/*
+ * Wide-character macros to hide some platform-differences.
+ */
+#if USE_WIDEC_SUPPORT
+#if HAVE_MBTOWC && HAVE_MBLEN
+#define reset_mbytes(state) IGNORE_RC(mblen(NULL, 0)), IGNORE_RC(mbtowc(NULL, NULL, 0))
+#define count_mbytes(buffer,length,state) mblen(buffer,length)
+#define check_mbytes(wch,buffer,length,state) \
+       (int) mbtowc(&wch, buffer, length)
+#define state_unused
+#elif HAVE_MBRTOWC && HAVE_MBRLEN
+#define reset_mbytes(state) init_mb(state)
+#define count_mbytes(buffer,length,state) mbrlen(buffer,length,&state)
+#define check_mbytes(wch,buffer,length,state) \
+       (int) mbrtowc(&wch, buffer, length, &state)
+#else
+make an error
+#endif
+#endif
+
 /*
  * Not everyone has vsscanf(), but we'd like to use it for scanw().
  */
index 455d142edc8eefab94eb1122503c848da4a7acaa..fb6dd5c53befb68d311d4ebccd01dd63e5d41424 100644 (file)
@@ -1,5 +1,5 @@
 /****************************************************************************
- * Copyright (c) 1998-2005,2006 Free Software Foundation, Inc.              *
+ * Copyright (c) 1998-2006,2009 Free Software Foundation, Inc.              *
  *                                                                          *
  * Permission is hereby granted, free of charge, to any person obtaining a  *
  * copy of this software and associated documentation files (the            *
@@ -39,7 +39,7 @@
 
 #include <curses.priv.h>
 
-MODULE_ID("$Id: add_tries.c,v 1.8 2006/12/30 23:15:26 tom Exp $")
+MODULE_ID("$Id: add_tries.c,v 1.9 2009/10/24 22:41:36 tom Exp $")
 
 #define SET_TRY(dst,src) if ((dst->ch = *src++) == 128) dst->ch = '\0'
 #define CMP_TRY(a,b) ((a)? (a == b) : (b == 128))
@@ -50,7 +50,8 @@ _nc_add_to_try(TRIES ** tree, const char *str, unsigned code)
     TRIES *ptr, *savedptr;
     unsigned const char *txt = (unsigned const char *) str;
 
-    T((T_CALLED("_nc_add_to_try(%p, %s, %u)"), *tree, _nc_visbuf(str), code));
+    T((T_CALLED("_nc_add_to_try(%p, %s, %u)"),
+       (void *) *tree, _nc_visbuf(str), code));
     if (txt == 0 || *txt == '\0' || code == 0)
        returnCode(ERR);
 
index f80303e0e41ab9afcefe36d6fef5b5b4bed5b64c..854442a943a3bc8745274fc37deb6acf4c4b22a2 100644 (file)
@@ -79,7 +79,7 @@
 #undef USE_OLD_TTY
 #endif /* USE_OLD_TTY */
 
-MODULE_ID("$Id: lib_baudrate.c,v 1.29 2009/02/21 17:22:13 tom Exp $")
+MODULE_ID("$Id: lib_baudrate.c,v 1.30 2009/10/24 22:15:00 tom Exp $")
 
 /*
  *     int
@@ -198,7 +198,7 @@ NCURSES_SP_NAME(baudrate) (NCURSES_SP_DCL0)
 {
     int result;
 
-    T((T_CALLED("baudrate(%p)"), SP_PARM));
+    T((T_CALLED("baudrate(%p)"), (void *) SP_PARM));
 
     /*
      * In debugging, allow the environment symbol to override when we're
index 7607d74e9ec1ae2008bbf71adfb48412d3403d86..8c933b23c4d7a9477f90299df5d47f5a26098973 100644 (file)
@@ -40,7 +40,7 @@
 #include <term_entry.h>                /* TTY, cur_term */
 #include <termcap.h>           /* ospeed */
 
-MODULE_ID("$Id: lib_cur_term.c,v 1.27 2009/09/13 14:40:05 tom Exp $")
+MODULE_ID("$Id: lib_cur_term.c,v 1.28 2009/10/24 22:15:00 tom Exp $")
 
 #undef CUR
 #define CUR termp->type.
@@ -82,7 +82,7 @@ NCURSES_SP_NAME(set_curterm) (NCURSES_SP_DCLx TERMINAL * termp)
 {
     TERMINAL *oldterm;
 
-    T((T_CALLED("set_curterm(%p)"), termp));
+    T((T_CALLED("set_curterm(%p)"), (void *) termp));
 
     _nc_lock_global(curses);
     oldterm = cur_term;
@@ -110,7 +110,7 @@ NCURSES_SP_NAME(set_curterm) (NCURSES_SP_DCLx TERMINAL * termp)
     }
     _nc_unlock_global(curses);
 
-    T((T_RETURN("%p"), oldterm));
+    T((T_RETURN("%p"), (void *) oldterm));
     return (oldterm);
 }
 
@@ -127,7 +127,7 @@ NCURSES_SP_NAME(del_curterm) (NCURSES_SP_DCLx TERMINAL * termp)
 {
     int rc = ERR;
 
-    T((T_CALLED("del_curterm(%p, %p)"), SP_PARM, termp));
+    T((T_CALLED("del_curterm(%p, %p)"), (void *) SP_PARM, (void *) termp));
 
     if (termp != 0) {
 #ifdef USE_TERM_DRIVER
index f5af76cff08c2e2d629e05bfff18b7a63c7b30ef..d1b9b8d966dab60d567e5486cfe98d884d0a543a 100644 (file)
 #define CUR SP_TERMTYPE
 #endif
 
-MODULE_ID("$Id: lib_has_cap.c,v 1.8 2009/05/10 00:53:52 tom Exp $")
+MODULE_ID("$Id: lib_has_cap.c,v 1.9 2009/10/24 22:15:47 tom Exp $")
 
 NCURSES_EXPORT(bool)
 NCURSES_SP_NAME(has_ic) (NCURSES_SP_DCL0)
 {
     bool code = FALSE;
 
-    T((T_CALLED("has_ic(%p)"), SP_PARM));
+    T((T_CALLED("has_ic(%p)"), (void *) SP_PARM));
 
     if (IsValidTIScreen(SP_PARM) && IsTermInfo(SP_PARM)) {
        code = ((insert_character || parm_ich
@@ -76,7 +76,7 @@ NCURSES_EXPORT(bool)
 NCURSES_SP_NAME(has_il) (NCURSES_SP_DCL0)
 {
     bool code = FALSE;
-    T((T_CALLED("has_il(%p)"), SP_PARM));
+    T((T_CALLED("has_il(%p)"), (void *) SP_PARM));
     if (IsValidTIScreen(SP_PARM) && IsTermInfo(SP_PARM)) {
        code = ((insert_line || parm_insert_line)
                && (delete_line || parm_delete_line)) ? TRUE : FALSE;
index 558b20730dc17d84a01982dbce54e412104cedd3..8b4433ae2c230a1e2c4d65684da1d5d39a281ad0 100644 (file)
@@ -48,7 +48,7 @@
 
 #include <curses.priv.h>
 
-MODULE_ID("$Id: lib_kernel.c,v 1.27 2009/06/06 21:25:50 tom Exp $")
+MODULE_ID("$Id: lib_kernel.c,v 1.28 2009/10/24 22:15:47 tom Exp $")
 
 static int
 _nc_vdisable(void)
@@ -84,7 +84,7 @@ NCURSES_SP_NAME(erasechar) (NCURSES_SP_DCL0)
     int result = ERR;
     TERMINAL *termp = TerminalOf(SP_PARM);
 
-    T((T_CALLED("erasechar(%p)"), SP_PARM));
+    T((T_CALLED("erasechar(%p)"), (void *) SP_PARM));
 
     if (termp != 0) {
 #ifdef TERMIOS
@@ -119,7 +119,7 @@ NCURSES_SP_NAME(killchar) (NCURSES_SP_DCL0)
     int result = ERR;
     TERMINAL *termp = TerminalOf(SP_PARM);
 
-    T((T_CALLED("killchar(%p)"), SP_PARM));
+    T((T_CALLED("killchar(%p)"), (void *) SP_PARM));
 
     if (termp != 0) {
 #ifdef TERMIOS
@@ -153,7 +153,7 @@ NCURSES_SP_NAME(flushinp) (NCURSES_SP_DCL0)
 {
     TERMINAL *termp = TerminalOf(SP_PARM);
 
-    T((T_CALLED("flushinp(%p)"), SP_PARM));
+    T((T_CALLED("flushinp(%p)"), (void *) SP_PARM));
 
     if (termp != 0) {
 #ifdef TERMIOS
index 5aaef4684f6ac599b25a0dadb9e0a72f8cbe5205..654bf940aa1f9fc8940dc13798a02456d2419772 100644 (file)
 #define CUR SP_TERMTYPE
 #endif
 
-MODULE_ID("$Id: lib_options.c,v 1.70 2009/08/16 14:16:38 tom Exp $")
+MODULE_ID("$Id: lib_options.c,v 1.71 2009/10/24 21:56:15 tom Exp $")
 
 NCURSES_EXPORT(int)
 idlok(WINDOW *win, bool flag)
 {
     int res = ERR;
-    T((T_CALLED("idlok(%p,%d)"), win, flag));
+    T((T_CALLED("idlok(%p,%d)"), (void *) win, flag));
 
     if (win) {
        SCREEN *sp = _nc_screen_of(win);
@@ -69,7 +69,7 @@ idlok(WINDOW *win, bool flag)
 NCURSES_EXPORT(void)
 idcok(WINDOW *win, bool flag)
 {
-    T((T_CALLED("idcok(%p,%d)"), win, flag));
+    T((T_CALLED("idcok(%p,%d)"), (void *) win, flag));
 
     if (win) {
        SCREEN *sp = _nc_screen_of(win);
@@ -81,7 +81,7 @@ idcok(WINDOW *win, bool flag)
 NCURSES_EXPORT(int)
 NCURSES_SP_NAME(halfdelay) (NCURSES_SP_DCLx int t)
 {
-    T((T_CALLED("halfdelay(%p,%d)"), SP_PARM, t));
+    T((T_CALLED("halfdelay(%p,%d)"), (void *) SP_PARM, t));
 
     if (t < 1 || t > 255 || !IsValidTIScreen(SP_PARM))
        returnCode(ERR);
@@ -102,7 +102,7 @@ halfdelay(int t)
 NCURSES_EXPORT(int)
 nodelay(WINDOW *win, bool flag)
 {
-    T((T_CALLED("nodelay(%p,%d)"), win, flag));
+    T((T_CALLED("nodelay(%p,%d)"), (void *) win, flag));
 
     if (win) {
        if (flag == TRUE)
@@ -117,7 +117,7 @@ nodelay(WINDOW *win, bool flag)
 NCURSES_EXPORT(int)
 notimeout(WINDOW *win, bool f)
 {
-    T((T_CALLED("notimeout(%p,%d)"), win, f));
+    T((T_CALLED("notimeout(%p,%d)"), (void *) win, f));
 
     if (win) {
        win->_notimeout = f;
@@ -129,7 +129,7 @@ notimeout(WINDOW *win, bool f)
 NCURSES_EXPORT(void)
 wtimeout(WINDOW *win, int delay)
 {
-    T((T_CALLED("wtimeout(%p,%d)"), win, delay));
+    T((T_CALLED("wtimeout(%p,%d)"), (void *) win, delay));
 
     if (win) {
        win->_delay = delay;
@@ -140,7 +140,7 @@ wtimeout(WINDOW *win, int delay)
 NCURSES_EXPORT(int)
 keypad(WINDOW *win, bool flag)
 {
-    T((T_CALLED("keypad(%p,%d)"), win, flag));
+    T((T_CALLED("keypad(%p,%d)"), (void *) win, flag));
 
     if (win) {
        win->_use_keypad = flag;
@@ -156,7 +156,7 @@ meta(WINDOW *win GCC_UNUSED, bool flag)
     SCREEN *sp = (win == 0) ? CURRENT_SCREEN : _nc_screen_of(win);
 
     /* Ok, we stay relaxed and don't signal an error if win is NULL */
-    T((T_CALLED("meta(%p,%d)"), win, flag));
+    T((T_CALLED("meta(%p,%d)"), (void *) win, flag));
 
     /* Ok, we stay relaxed and don't signal an error if win is NULL */
 
@@ -188,7 +188,7 @@ NCURSES_EXPORT(int)
 NCURSES_SP_NAME(curs_set) (NCURSES_SP_DCLx int vis)
 {
     int code = ERR;
-    T((T_CALLED("curs_set(%p,%d)"), SP_PARM, vis));
+    T((T_CALLED("curs_set(%p,%d)"), (void *) SP_PARM, vis));
 
     if (SP_PARM != 0 && vis >= 0 && vis <= 2) {
        int cursor = SP_PARM->_cursor;
@@ -235,7 +235,7 @@ curs_set(int vis)
 NCURSES_EXPORT(int)
 NCURSES_SP_NAME(typeahead) (NCURSES_SP_DCLx int fd)
 {
-    T((T_CALLED("typeahead(%p, %d)"), SP_PARM, fd));
+    T((T_CALLED("typeahead(%p, %d)"), (void *) SP_PARM, fd));
     if (IsValidTIScreen(SP_PARM)) {
        SP_PARM->_checkfd = fd;
        returnCode(OK);
@@ -283,7 +283,7 @@ TINFO_HAS_KEY(SCREEN *sp, int keycode)
 NCURSES_EXPORT(int)
 NCURSES_SP_NAME(has_key) (NCURSES_SP_DCLx int keycode)
 {
-    T((T_CALLED("has_key(%p,%d)"), SP_PARM, keycode));
+    T((T_CALLED("has_key(%p,%d)"), (void *) SP_PARM, keycode));
     returnCode(SP != 0 ? has_key_internal(keycode, SP_PARM->_keytry) : FALSE);
 }
 
index aea5df54813f272cbfab36c468ca19a4f351459e..7f67a7525e7da4b372d71f2ca6671e62e28ccf3b 100644 (file)
@@ -49,7 +49,7 @@
 
 #include <curses.priv.h>
 
-MODULE_ID("$Id: lib_raw.c,v 1.17 2009/08/01 23:11:02 tom Exp $")
+MODULE_ID("$Id: lib_raw.c,v 1.18 2009/10/24 21:56:15 tom Exp $")
 
 #if SVR4_TERMIO && !defined(_POSIX_SOURCE)
 #define _POSIX_SOURCE
@@ -82,7 +82,7 @@ NCURSES_SP_NAME(raw) (NCURSES_SP_DCL0)
     int result = ERR;
     TERMINAL *termp;
 
-    T((T_CALLED("raw(%p)"), SP_PARM));
+    T((T_CALLED("raw(%p)"), (void *) SP_PARM));
     if ((termp = TerminalOf(SP_PARM)) != 0) {
        TTY buf;
 
@@ -123,7 +123,7 @@ NCURSES_SP_NAME(cbreak) (NCURSES_SP_DCL0)
     int result = ERR;
     TERMINAL *termp;
 
-    T((T_CALLED("cbreak(%p)"), SP_PARM));
+    T((T_CALLED("cbreak(%p)"), (void *) SP_PARM));
     if ((termp = TerminalOf(SP_PARM)) != 0) {
        TTY buf;
 
@@ -168,7 +168,7 @@ NCURSES_SP_NAME(qiflush) (NCURSES_SP_DCL0)
     int result = ERR;
     TERMINAL *termp;
 
-    T((T_CALLED("qiflush(%p)"), SP_PARM));
+    T((T_CALLED("qiflush(%p)"), (void *) SP_PARM));
     if ((termp = TerminalOf(SP_PARM)) != 0) {
        TTY buf;
 
@@ -201,7 +201,7 @@ NCURSES_SP_NAME(noraw) (NCURSES_SP_DCL0)
     int result = ERR;
     TERMINAL *termp;
 
-    T((T_CALLED("noraw(%p)"), SP_PARM));
+    T((T_CALLED("noraw(%p)"), (void *) SP_PARM));
     if ((termp = TerminalOf(SP_PARM)) != 0) {
        TTY buf;
 
@@ -241,7 +241,7 @@ NCURSES_SP_NAME(nocbreak) (NCURSES_SP_DCL0)
     int result = ERR;
     TERMINAL *termp;
 
-    T((T_CALLED("nocbreak(%p)"), SP_PARM));
+    T((T_CALLED("nocbreak(%p)"), (void *) SP_PARM));
     if ((termp = TerminalOf(SP_PARM)) != 0) {
        TTY buf;
 
@@ -279,7 +279,7 @@ NCURSES_SP_NAME(noqiflush) (NCURSES_SP_DCL0)
     int result = ERR;
     TERMINAL *termp;
 
-    T((T_CALLED("noqiflush(%p)"), SP_PARM));
+    T((T_CALLED("noqiflush(%p)"), (void *) SP_PARM));
     if ((termp = TerminalOf(SP_PARM)) != 0) {
        TTY buf;
 
@@ -319,7 +319,7 @@ NCURSES_SP_NAME(intrflush) (NCURSES_SP_DCLx WINDOW *win GCC_UNUSED, bool flag)
     int result = ERR;
     TERMINAL *termp;
 
-    T((T_CALLED("intrflush(%p,%d)"), SP_PARM, flag));
+    T((T_CALLED("intrflush(%p,%d)"), (void *) SP_PARM, flag));
     if (SP_PARM == 0)
        returnCode(ERR);
 
index 1cc367cd4c4e62c6b40b503a31282d1cf32d7a16..891a1012c0180a9ac141df6122185904eba23c58 100644 (file)
@@ -52,7 +52,7 @@
 #include <locale.h>
 #endif
 
-MODULE_ID("$Id: lib_setup.c,v 1.119 2009/09/05 20:10:02 tom Exp $")
+MODULE_ID("$Id: lib_setup.c,v 1.120 2009/10/24 21:56:15 tom Exp $")
 
 /****************************************************************************
  *
@@ -224,7 +224,7 @@ _nc_handle_sigwinch(SCREEN *sp)
 NCURSES_EXPORT(void)
 NCURSES_SP_NAME(use_env) (NCURSES_SP_DCLx bool f)
 {
-    T((T_CALLED("use_env(%p,%d)"), SP_PARM, (int) f));
+    T((T_CALLED("use_env(%p,%d)"), (void *) SP_PARM, (int) f));
 #if NCURSES_SP_FUNCS
     if (IsPreScreen(SP_PARM)) {
        SP_PARM->_use_env = f;
@@ -602,7 +602,7 @@ TINFO_SETUP_TERM(TERMINAL ** tp,
        termp = *tp;
 #else
     termp = cur_term;
-    T((T_CALLED("setupterm(%s,%d,%p)"), _nc_visbuf(tname), Filedes, errret));
+    T((T_CALLED("setupterm(%s,%d,%p)"), _nc_visbuf(tname), Filedes, (void *) errret));
 #endif
 
     if (tname == 0) {
index 92cd451b878d9e492e2457eff4f6ee0961878073..893d117d3d28f1778bec1d27ca29ad3d58442f55 100644 (file)
@@ -50,7 +50,7 @@
 #define CUR SP_TERMTYPE
 #endif
 
-MODULE_ID("$Id: lib_termcap.c,v 1.70 2009/08/30 17:16:00 tom Exp $")
+MODULE_ID("$Id: lib_termcap.c,v 1.71 2009/10/24 21:56:58 tom Exp $")
 
 NCURSES_EXPORT_VAR(char *) UP = 0;
 NCURSES_EXPORT_VAR(char *) BC = 0;
@@ -226,7 +226,7 @@ NCURSES_SP_NAME(tgetflag) (NCURSES_SP_DCLx NCURSES_CONST char *id)
     int result = 0;            /* Solaris returns zero for missing flag */
     int i, j;
 
-    T((T_CALLED("tgetflag(%p, %s)"), SP_PARM, id));
+    T((T_CALLED("tgetflag(%p, %s)"), (void *) SP_PARM, id));
     if (HasTInfoTerminal(SP_PARM)) {
        TERMTYPE *tp = &(TerminalOf(SP_PARM)->type);
        struct name_table_entry const *entry_ptr;
@@ -278,7 +278,7 @@ NCURSES_SP_NAME(tgetnum) (NCURSES_SP_DCLx NCURSES_CONST char *id)
     int result = ABSENT_NUMERIC;
     int i, j;
 
-    T((T_CALLED("tgetnum(%p, %s)"), SP_PARM, id));
+    T((T_CALLED("tgetnum(%p, %s)"), (void *) SP_PARM, id));
     if (HasTInfoTerminal(SP_PARM)) {
        TERMTYPE *tp = &(TerminalOf(SP_PARM)->type);
        struct name_table_entry const *entry_ptr;
@@ -330,7 +330,7 @@ NCURSES_SP_NAME(tgetstr) (NCURSES_SP_DCLx NCURSES_CONST char *id, char **area)
     char *result = NULL;
     int i, j;
 
-    T((T_CALLED("tgetstr(%s,%p)"), id, area));
+    T((T_CALLED("tgetstr(%s,%p)"), id, (void *) area));
     if (HasTInfoTerminal(SP_PARM)) {
        TERMTYPE *tp = &(TerminalOf(SP_PARM)->type);
        struct name_table_entry const *entry_ptr;
index 9163c7cd68a2f01e055bde87e67626173c1c6a4e..e3f6827ee018cd2e225e955897323c9c3110480d 100644 (file)
 
 #include <curses.priv.h>
 
-MODULE_ID("$Id: lib_termname.c,v 1.11 2009/02/21 16:37:12 tom Exp $")
+MODULE_ID("$Id: lib_termname.c,v 1.12 2009/10/24 21:56:58 tom Exp $")
 
 NCURSES_EXPORT(char *)
 NCURSES_SP_NAME(termname) (NCURSES_SP_DCL0)
 {
     char *name = 0;
 
-    T((T_CALLED("termname(%p)"), SP_PARM));
+    T((T_CALLED("termname(%p)"), (void *) SP_PARM));
 
 #if NCURSES_SP_FUNCS
     if (TerminalOf(SP_PARM) != 0) {
index 6c94772a481923b63f7f7ee99ce824aa98872e09..bc618cd5623792ae66d34ca2ea885ec0091d6d53 100644 (file)
@@ -37,7 +37,7 @@
 #include <term_entry.h>
 #include <tic.h>
 
-MODULE_ID("$Id: lib_ti.c,v 1.27 2009/07/28 22:03:36 tom Exp $")
+MODULE_ID("$Id: lib_ti.c,v 1.28 2009/10/24 21:56:58 tom Exp $")
 
 #if 0
 static bool
@@ -56,7 +56,7 @@ NCURSES_SP_NAME(tigetflag) (NCURSES_SP_DCLx NCURSES_CONST char *str)
     int result = ABSENT_BOOLEAN;
     int i, j;
 
-    T((T_CALLED("tigetflag(%p, %s)"), SP_PARM, str));
+    T((T_CALLED("tigetflag(%p, %s)"), (void *) SP_PARM, str));
 
     if (HasTInfoTerminal(SP_PARM)) {
        TERMTYPE *tp = &(TerminalOf(SP_PARM)->type);
@@ -101,7 +101,7 @@ NCURSES_SP_NAME(tigetnum) (NCURSES_SP_DCLx NCURSES_CONST char *str)
     int i, j;
     int result = CANCELLED_NUMERIC;    /* Solaris returns a -1 on error */
 
-    T((T_CALLED("tigetnum(%p, %s)"), SP_PARM, str));
+    T((T_CALLED("tigetnum(%p, %s)"), (void *) SP_PARM, str));
 
     if (HasTInfoTerminal(SP_PARM)) {
        TERMTYPE *tp = &(TerminalOf(SP_PARM)->type);
@@ -148,7 +148,7 @@ NCURSES_SP_NAME(tigetstr) (NCURSES_SP_DCLx NCURSES_CONST char *str)
     char *result = CANCELLED_STRING;
     int i, j;
 
-    T((T_CALLED("tigetstr(%p, %s)"), SP_PARM, str));
+    T((T_CALLED("tigetstr(%p, %s)"), (void *) SP_PARM, str));
 
     if (HasTInfoTerminal(SP_PARM)) {
        TERMTYPE *tp = &(TerminalOf(SP_PARM)->type);
index 9d859527f4439c5bbf44dabc19fd8a139e38f9ce..35f4817486bfc09dede9ada20b6ce2ab069fbdd7 100644 (file)
@@ -51,7 +51,7 @@
 #include <termcap.h>           /* ospeed */
 #include <tic.h>
 
-MODULE_ID("$Id: lib_tputs.c,v 1.78 2009/10/10 16:01:42 tom Exp $")
+MODULE_ID("$Id: lib_tputs.c,v 1.79 2009/10/24 21:56:58 tom Exp $")
 
 NCURSES_EXPORT_VAR(char) PC = 0;              /* used by termcap library */
 NCURSES_EXPORT_VAR(NCURSES_OSPEED) ospeed = 0;        /* used by termcap library */
@@ -83,7 +83,7 @@ static NCURSES_SP_OUTC my_outch = NCURSES_SP_NAME(_nc_outch);
 NCURSES_EXPORT(int)
 NCURSES_SP_NAME(delay_output) (NCURSES_SP_DCLx int ms)
 {
-    T((T_CALLED("delay_output(%p,%d)"), SP_PARM, ms));
+    T((T_CALLED("delay_output(%p,%d)"), (void *) SP_PARM, ms));
 
     if (!HasTInfoTerminal(SP_PARM))
        returnCode(ERR);
@@ -213,7 +213,7 @@ NCURSES_SP_NAME(tputs) (NCURSES_SP_DCLx
        if (outc == NCURSES_SP_NAME(_nc_outch))
            (void) strcpy(addrbuf, "_nc_outch");
        else
-           (void) sprintf(addrbuf, "%p", outc);
+           (void) sprintf(addrbuf, "%p", (void *) outc);
        if (_nc_tputs_trace) {
            _tracef("tputs(%s = %s, %d, %s) called", _nc_tputs_trace,
                    _nc_visbuf(string), affcnt, addrbuf);
index 17b13b2d0c6324f2e3a7d91c86570ad7a852b85e..d0d582513806dd9deb6fa9a59a403504df84ad6f 100644 (file)
@@ -41,7 +41,7 @@
 #define CUR SP_TERMTYPE
 #endif
 
-MODULE_ID("$Id: lib_ttyflags.c,v 1.25 2009/06/06 19:10:05 tom Exp $")
+MODULE_ID("$Id: lib_ttyflags.c,v 1.26 2009/10/24 22:15:47 tom Exp $")
 
 NCURSES_EXPORT(int)
 NCURSES_SP_NAME(_nc_get_tty_mode) (NCURSES_SP_DCLx TTY * buf)
@@ -137,7 +137,7 @@ NCURSES_SP_NAME(def_shell_mode) (NCURSES_SP_DCL0)
     int rc = ERR;
     TERMINAL *termp = TerminalOf(SP_PARM);
 
-    T((T_CALLED("def_shell_mode(%p)"), SP_PARM));
+    T((T_CALLED("def_shell_mode(%p)"), (void *) SP_PARM));
 
     if (termp != 0) {
 #ifdef USE_TERM_DRIVER
@@ -175,7 +175,7 @@ NCURSES_SP_NAME(def_prog_mode) (NCURSES_SP_DCL0)
     int rc = ERR;
     TERMINAL *termp = TerminalOf(SP_PARM);
 
-    T((T_CALLED("def_prog_mode(%p)"), SP_PARM));
+    T((T_CALLED("def_prog_mode(%p)"), (void *) SP_PARM));
 
     if (termp != 0) {
 #ifdef USE_TERM_DRIVER
@@ -211,7 +211,7 @@ NCURSES_SP_NAME(reset_prog_mode) (NCURSES_SP_DCL0)
     int rc = ERR;
     TERMINAL *termp = TerminalOf(SP_PARM);
 
-    T((T_CALLED("reset_prog_mode(%p)"), SP_PARM));
+    T((T_CALLED("reset_prog_mode(%p)"), (void *) SP_PARM));
 
     if (termp != 0) {
 #ifdef USE_TERM_DRIVER
@@ -244,7 +244,7 @@ NCURSES_SP_NAME(reset_shell_mode) (NCURSES_SP_DCL0)
     int rc = ERR;
     TERMINAL *termp = TerminalOf(SP_PARM);
 
-    T((T_CALLED("reset_shell_mode(%p)"), SP_PARM));
+    T((T_CALLED("reset_shell_mode(%p)"), (void *) SP_PARM));
 
     if (termp != 0) {
 #ifdef USE_TERM_DRIVER
@@ -293,7 +293,7 @@ saved_tty(NCURSES_SP_DCL0)
 NCURSES_EXPORT(int)
 NCURSES_SP_NAME(savetty) (NCURSES_SP_DCL0)
 {
-    T((T_CALLED("savetty(%p)"), SP_PARM));
+    T((T_CALLED("savetty(%p)"), (void *) SP_PARM));
     returnCode(NCURSES_SP_NAME(_nc_get_tty_mode) (NCURSES_SP_ARGx saved_tty(NCURSES_SP_ARG)));
 }
 
@@ -308,7 +308,7 @@ savetty(void)
 NCURSES_EXPORT(int)
 NCURSES_SP_NAME(resetty) (NCURSES_SP_DCL0)
 {
-    T((T_CALLED("resetty(%p)"), SP_PARM));
+    T((T_CALLED("resetty(%p)"), (void *) SP_PARM));
     returnCode(NCURSES_SP_NAME(_nc_set_tty_mode) (NCURSES_SP_ARGx saved_tty(NCURSES_SP_ARG)));
 }
 
index 3b3f7361d91699623e700f7dcb48905fc7c69e42..6a0297cebd5181fa6819ea76c72b0f0b54eb3bd9 100644 (file)
@@ -1,5 +1,5 @@
 /****************************************************************************
- * Copyright (c) 2007,2008 Free Software Foundation, Inc.                   *
+ * Copyright (c) 2007-2008,2009 Free Software Foundation, Inc.              *
  *                                                                          *
  * Permission is hereby granted, free of charge, to any person obtaining a  *
  * copy of this software and associated documentation files (the            *
@@ -32,7 +32,7 @@
 
 #include <curses.priv.h>
 
-MODULE_ID("$Id: use_screen.c,v 1.7 2008/11/16 00:19:59 juergen Exp $")
+MODULE_ID("$Id: use_screen.c,v 1.8 2009/10/24 22:40:20 tom Exp $")
 
 NCURSES_EXPORT(int)
 use_screen(SCREEN *screen, NCURSES_SCREEN_CB func, void *data)
@@ -40,7 +40,7 @@ use_screen(SCREEN *screen, NCURSES_SCREEN_CB func, void *data)
     SCREEN *save_SP;
     int code = OK;
 
-    T((T_CALLED("use_screen(%p,%p,%p)"), screen, func, data));
+    T((T_CALLED("use_screen(%p,%p,%p)"), (void *) screen, func, (void *) data));
 
     /*
      * FIXME - add a flag so a given thread can check if _it_ has already
index 0c733cd8307cd076e4e4032509e60559e1b40db8..799d3afc156c7ad40de5cab757e30bb8ed9d7a1a 100644 (file)
@@ -47,7 +47,7 @@
 
 #include <ctype.h>
 
-MODULE_ID("$Id: lib_trace.c,v 1.72 2009/02/28 20:37:37 tom Exp $")
+MODULE_ID("$Id: lib_trace.c,v 1.73 2009/10/24 21:56:58 tom Exp $")
 
 NCURSES_EXPORT_VAR(unsigned) _nc_tracing = 0; /* always define this */
 
@@ -272,7 +272,7 @@ _nc_retrace_void_ptr(void *code)
 NCURSES_EXPORT(SCREEN *)
 _nc_retrace_sp(SCREEN *code)
 {
-    T((T_RETURN("%p"), code));
+    T((T_RETURN("%p"), (void *) code));
     return code;
 }
 
@@ -280,7 +280,7 @@ _nc_retrace_sp(SCREEN *code)
 NCURSES_EXPORT(WINDOW *)
 _nc_retrace_win(WINDOW *code)
 {
-    T((T_RETURN("%p"), code));
+    T((T_RETURN("%p"), (void *) code));
     return code;
 }
 
index ad19fb785eda2ff22412e637def6048adc187d8e..c4274643c5e56fc5cb1d31f70f6683deb38aaf14 100644 (file)
@@ -35,7 +35,7 @@
 
 #include <curses.priv.h>
 
-MODULE_ID("$Id: trace_tries.c,v 1.14 2009/03/28 20:44:01 tom Exp $")
+MODULE_ID("$Id: trace_tries.c,v 1.15 2009/10/24 22:15:47 tom Exp $")
 
 #ifdef TRACE
 #define my_buffer _nc_globals.tracetry_buf
@@ -67,9 +67,9 @@ NCURSES_EXPORT(void)
 _nc_trace_tries(TRIES * tree)
 {
     my_buffer = typeMalloc(unsigned char, my_length = 80);
-    _tracef("BEGIN tries %p", tree);
+    _tracef("BEGIN tries %p", (void *) tree);
     recur_tries(tree, 0);
-    _tracef(". . . tries %p", tree);
+    _tracef(". . . tries %p", (void *) tree);
     free(my_buffer);
 }
 
index af0b66c42b933c1527ba5e1d6c38c5133fbf7074..a270a27cb4d8fbf59e6410e3af327ad7c535405e 100644 (file)
@@ -147,7 +147,7 @@ AUTHOR
 
 #include <curses.priv.h>
 
-MODULE_ID("$Id: hardscroll.c,v 1.43 2009/04/18 21:41:30 tom Exp $")
+MODULE_ID("$Id: hardscroll.c,v 1.44 2009/10/24 21:57:38 tom Exp $")
 
 #if defined(SCROLLDEBUG) || defined(HASHDEBUG)
 
@@ -188,7 +188,7 @@ NCURSES_SP_NAME(_nc_scroll_optimize) (NCURSES_SP_DCL0)
     int i;
     int start, end, shift;
 
-    TR(TRACE_ICALLS, (T_CALLED("_nc_scroll_optimize(%p)"), SP_PARM));
+    TR(TRACE_ICALLS, (T_CALLED("_nc_scroll_optimize(%p)"), (void *) SP_PARM));
 
 #if !defined(SCROLLDEBUG) && !defined(HASHDEBUG)
 #if USE_HASHMAP
index 2b6ea7aefec766c34cb71a8fc4baabb9ae7dfb8f..9cecc5dbfef0003021c143573fc19fd732b358d3 100644 (file)
 #define CUR SP_TERMTYPE
 #endif
 
-MODULE_ID("$Id: lib_mvcur.c,v 1.121 2009/08/30 16:52:00 tom Exp $")
+MODULE_ID("$Id: lib_mvcur.c,v 1.122 2009/10/24 22:05:03 tom Exp $")
 
 #define WANT_CHAR(sp, y, x) (sp)->_newscr->_line[y].text[x]    /* desired state */
 
@@ -950,7 +950,7 @@ TINFO_MVCUR(NCURSES_SP_DCLx int yold, int xold, int ynew, int xnew)
     int code;
 
     TR(TRACE_CALLS | TRACE_MOVE, (T_CALLED("_nc_tinfo_mvcur(%p,%d,%d,%d,%d)"),
-                                 SP_PARM, yold, xold, ynew, xnew));
+                                 (void *) SP_PARM, yold, xold, ynew, xnew));
 
     if (SP_PARM == 0) {
        code = ERR;
index d2a8264ac4c8a5b9ff279f0f88614ce9d17af9e6..6158dbd4471e9b864e04d5c1ce7b605445876735 100644 (file)
@@ -69,7 +69,7 @@
 #define CUR SP_TERMTYPE
 #endif
 
-MODULE_ID("$Id: lib_vidattr.c,v 1.58 2009/08/15 22:12:01 tom Exp $")
+MODULE_ID("$Id: lib_vidattr.c,v 1.59 2009/10/24 22:12:21 tom Exp $")
 
 #define doPut(mode) \
        TPUTS_TRACE(#mode); \
@@ -113,7 +113,7 @@ NCURSES_SP_NAME(vidputs) (NCURSES_SP_DCLx
 
     newmode &= A_ATTRIBUTES;
 
-    T((T_CALLED("vidputs(%p,%s)"), SP_PARM, _traceattr(newmode)));
+    T((T_CALLED("vidputs(%p,%s)"), (void *) SP_PARM, _traceattr(newmode)));
 
     if (!IsTermInfo(SP_PARM))
        returnCode(ERR);
@@ -319,7 +319,7 @@ vidputs(chtype newmode, NCURSES_OUTC outc)
 NCURSES_EXPORT(int)
 NCURSES_SP_NAME(vidattr) (NCURSES_SP_DCLx chtype newmode)
 {
-    T((T_CALLED("vidattr(%p,%s)"), SP_PARM, _traceattr(newmode)));
+    T((T_CALLED("vidattr(%p,%s)"), (void *) SP_PARM, _traceattr(newmode)));
     returnCode(NCURSES_SP_NAME(vidputs) (NCURSES_SP_ARGx
                                         newmode,
                                         NCURSES_SP_NAME(_nc_outch)));
@@ -338,7 +338,7 @@ NCURSES_SP_NAME(termattrs) (NCURSES_SP_DCL0)
 {
     chtype attrs = A_NORMAL;
 
-    T((T_CALLED("termattrs(%p)"), SP_PARM));
+    T((T_CALLED("termattrs(%p)"), (void *) SP_PARM));
 #ifdef USE_TERM_DRIVER
     if (HasTerminal(SP_PARM))
        attrs = CallDriver(SP_PARM, conattr);
index 20c971c292c0df03ee3bc531fc9cd2856622ab9d..02ec46264f31cee511affe38ae93d9cd0d62cbe4 100644 (file)
@@ -82,7 +82,7 @@
 
 #include <ctype.h>
 
-MODULE_ID("$Id: tty_update.c,v 1.260 2009/09/26 18:14:44 tom Exp $")
+MODULE_ID("$Id: tty_update.c,v 1.262 2009/10/24 23:21:31 tom Exp $")
 
 /*
  * This define controls the line-breakout optimization.  Every once in a
@@ -193,7 +193,7 @@ static NCURSES_INLINE void
 GoTo(NCURSES_SP_DCLx int const row, int const col)
 {
     TR(TRACE_MOVE, ("GoTo(%p, %d, %d) from (%d, %d)",
-                   SP_PARM, row, col, SP_PARM->_cursrow, SP_PARM->_curscol));
+                   (void *) SP_PARM, row, col, SP_PARM->_cursrow, SP_PARM->_curscol));
 
     position_check(SP_PARM, SP_PARM->_cursrow, SP_PARM->_curscol, "GoTo");
 
@@ -628,7 +628,10 @@ PutRange(NCURSES_SP_DCLx
     int i, j, same;
 
     TR(TRACE_CHARPUT, ("PutRange(%p, %p, %p, %d, %d, %d)",
-                      SP_PARM, otext, ntext, row, first, last));
+                      (void *) SP_PARM,
+                      (const void *) otext,
+                      (const void *) ntext,
+                      row, first, last));
 
     if (otext != ntext
        && (last - first + 1) > SP_PARM->_inline_cost) {
@@ -670,7 +673,7 @@ TINFO_DOUPDATE(NCURSES_SP_DCL0)
     struct tms before, after;
 #endif /* USE_TRACE_TIMES */
 
-    T((T_CALLED("_nc_tinfo:doupdate(%p)"), SP_PARM));
+    T((T_CALLED("_nc_tinfo:doupdate(%p)"), (void *) SP_PARM));
 
 #if !USE_REENTRANT
     /*
@@ -1224,7 +1227,7 @@ TransformLine(NCURSES_SP_DCLx int const lineno)
     int n;
     bool attrchanged = FALSE;
 
-    TR(TRACE_UPDATE, (T_CALLED("TransformLine(%p, %d)"), SP_PARM, lineno));
+    TR(TRACE_UPDATE, (T_CALLED("TransformLine(%p, %d)"), (void *) SP_PARM, lineno));
 
     /* copy new hash value to old one */
     if (SP_PARM->oldhash && SP_PARM->newhash)
@@ -1623,7 +1626,9 @@ ClearScreen(NCURSES_SP_DCLx NCURSES_CH_T blank)
 static void
 InsStr(NCURSES_SP_DCLx NCURSES_CH_T * line, int count)
 {
-    TR(TRACE_UPDATE, ("InsStr(%p, %p,%d) called", SP_PARM, line, count));
+    TR(TRACE_UPDATE, ("InsStr(%p, %p,%d) called",
+                     (void *) SP_PARM,
+                     (void *) line, count));
 
     /* Prefer parm_ich as it has the smallest cost - no need to shift
      * the whole line on each character. */
@@ -1682,7 +1687,7 @@ DelChar(NCURSES_SP_DCLx int count)
     int n;
 
     TR(TRACE_UPDATE, ("DelChar(%p, %d) called, position = (%ld,%ld)",
-                     SP_PARM, count,
+                     (void *) SP_PARM, count,
                      (long) NewScreen(SP_PARM)->_cury,
                      (long) NewScreen(SP_PARM)->_curx));
 
@@ -1939,7 +1944,8 @@ NCURSES_SP_NAME(_nc_scrolln) (NCURSES_SP_DCLx
     bool cursor_saved = FALSE;
     int res;
 
-    TR(TRACE_MOVE, ("_nc_scrolln(%p, %d, %d, %d, %d)", SP_PARM, n, top, bot, maxy));
+    TR(TRACE_MOVE, ("_nc_scrolln(%p, %d, %d, %d, %d)",
+                   (void *) SP_PARM, n, top, bot, maxy));
 
     if (!IsValidScreen(SP_PARM))
        return (ERR);
index 4d79114c9db14c09cd310d1ea2264412c2b4d24c..04847e4e08bbe647f530d621b8bd30544324420d 100644 (file)
@@ -39,7 +39,7 @@
 #include <wctype.h>
 #endif
 
-MODULE_ID("$Id: lib_add_wch.c,v 1.8 2009/07/25 14:38:01 tom Exp $")
+MODULE_ID("$Id: lib_add_wch.c,v 1.9 2009/10/24 22:45:42 tom Exp $")
 
 /* clone/adapt lib_addch.c */
 static const cchar_t blankchar = NewChar(BLANK_TEXT);
@@ -415,7 +415,8 @@ wadd_wch(WINDOW *win, const cchar_t *wch)
 {
     int code = ERR;
 
-    TR(TRACE_VIRTPUT | TRACE_CCALLS, (T_CALLED("wadd_wch(%p, %s)"), win,
+    TR(TRACE_VIRTPUT | TRACE_CCALLS, (T_CALLED("wadd_wch(%p, %s)"),
+                                     (void *) win,
                                      _tracecchar_t(wch)));
 
     if (win && (wadd_wch_nosync(win, *wch) != ERR)) {
@@ -432,7 +433,8 @@ wecho_wchar(WINDOW *win, const cchar_t *wch)
 {
     int code = ERR;
 
-    TR(TRACE_VIRTPUT | TRACE_CCALLS, (T_CALLED("wechochar(%p, %s)"), win,
+    TR(TRACE_VIRTPUT | TRACE_CCALLS, (T_CALLED("wechochar(%p, %s)"),
+                                     (void *) win,
                                      _tracecchar_t(wch)));
 
     if (win && (wadd_wch_nosync(win, *wch) != ERR)) {
index 35fce46d8d408420ecf0ad06876ef2a39695611b..585c94963b0f3ab8e3dfca2c5f8bcc75e129de1a 100644 (file)
@@ -1,5 +1,5 @@
 /****************************************************************************
- * Copyright (c) 2002 Free Software Foundation, Inc.                        *
+ * Copyright (c) 2002-2003,2009 Free Software Foundation, Inc.              *
  *                                                                          *
  * Permission is hereby granted, free of charge, to any person obtaining a  *
  * copy of this software and associated documentation files (the            *
@@ -39,7 +39,7 @@
 
 #include <curses.priv.h>
 
-MODULE_ID("$Id: lib_box_set.c,v 1.4 2003/12/06 18:02:13 tom Exp $")
+MODULE_ID("$Id: lib_box_set.c,v 1.5 2009/10/24 22:36:56 tom Exp $")
 
 NCURSES_EXPORT(int)
 wborder_set(WINDOW *win,
@@ -53,7 +53,7 @@ wborder_set(WINDOW *win,
     NCURSES_CH_T wls, wrs, wts, wbs, wtl, wtr, wbl, wbr;
 
     T((T_CALLED("wborder(%p,%s,%s,%s,%s,%s,%s,%s,%s)"),
-       win,
+       (void *) win,
        _tracech_t2(1, ls),
        _tracech_t2(2, rs),
        _tracech_t2(3, ts),
index 28413f432f4a64b66332f1527fc325caa12b5579..478f284ce86c639f050af7a0f5548a5e15efe86d 100644 (file)
@@ -35,7 +35,7 @@
 
 #include <curses.priv.h>
 
-MODULE_ID("$Id: lib_cchar.c,v 1.14 2009/07/18 15:20:42 tom Exp $")
+MODULE_ID("$Id: lib_cchar.c,v 1.16 2009/10/24 23:21:31 tom Exp $")
 
 /* 
  * The SuSv2 description leaves some room for interpretation.  We'll assume wch
@@ -55,7 +55,7 @@ setcchar(cchar_t *wcval,
     int code = OK;
 
     TR(TRACE_CCALLS, (T_CALLED("setcchar(%p,%s,%lu,%d,%p)"),
-                     wcval, _nc_viswbuf(wch),
+                     (void *) wcval, _nc_viswbuf(wch),
                      (unsigned long) attrs, color_pair, opts));
 
     len = wcslen(wch);
@@ -104,7 +104,11 @@ getcchar(const cchar_t *wcval,
     int code = ERR;
 
     TR(TRACE_CCALLS, (T_CALLED("getcchar(%p,%p,%p,%p,%p)"),
-                     wcval, wch, attrs, color_pair, opts));
+                     (const void *) wcval,
+                     (void *) wch,
+                     (void *) attrs,
+                     (void *) color_pair,
+                     opts));
 
     if (opts == NULL) {
        len = (wp = wmemchr(wcval->chars, L'\0', CCHARW_MAX))
index c6ab927748faffa9d83a5e41f9ab8ca93fcd46da..fa024d2ccb047903ce7a4c0c0e838bef1735f269 100644 (file)
 #include <curses.priv.h>
 #include <ctype.h>
 
-MODULE_ID("$Id: lib_get_wch.c,v 1.18 2009/04/18 22:41:33 tom Exp $")
-
-#if HAVE_MBTOWC && HAVE_MBLEN
-#define reset_mbytes(state) mblen(NULL, 0), mbtowc(NULL, NULL, 0)
-#define count_mbytes(buffer,length,state) mblen(buffer,length)
-#define check_mbytes(wch,buffer,length,state) \
-       (int) mbtowc(&wch, buffer, length)
-#define state_unused
-#elif HAVE_MBRTOWC && HAVE_MBRLEN
-#define reset_mbytes(state) init_mb(state)
-#define count_mbytes(buffer,length,state) mbrlen(buffer,length,&state)
-#define check_mbytes(wch,buffer,length,state) \
-       (int) mbrtowc(&wch, buffer, length, &state)
-#else
-make an error
-#endif
+MODULE_ID("$Id: lib_get_wch.c,v 1.20 2009/10/24 22:42:25 tom Exp $")
 
 NCURSES_EXPORT(int)
 wget_wch(WINDOW *win, wint_t *result)
@@ -71,7 +56,7 @@ wget_wch(WINDOW *win, wint_t *result)
     mbstate_t state;
 #endif
 
-    T((T_CALLED("wget_wch(%p)"), win));
+    T((T_CALLED("wget_wch(%p)"), (void *) win));
 
     /*
      * We can get a stream of single-byte characters and KEY_xxx codes from
@@ -95,12 +80,12 @@ wget_wch(WINDOW *win, wint_t *result)
                 * whether the improvement would be worth the effort.
                 */
                if (count != 0) {
-                   safe_ungetch (SP_PARM, (int) value);
+                   safe_ungetch(SP_PARM, (int) value);
                    code = ERR;
                }
                break;
            } else if (count + 1 >= sizeof(buffer)) {
-               safe_ungetch (SP_PARM, (int) value);
+               safe_ungetch(SP_PARM, (int) value);
                code = ERR;
                break;
            } else {
@@ -111,7 +96,7 @@ wget_wch(WINDOW *win, wint_t *result)
                    reset_mbytes(state);
                    if (check_mbytes(wch, buffer, count, state) != status) {
                        code = ERR;     /* the two calls should match */
-                       safe_ungetch (SP_PARM, (int) value);
+                       safe_ungetch(SP_PARM, (int) value);
                    }
                    value = wch;
                    break;
index bbfbbbd24c2dbb6a06e0a449a345592e6b7f72e6..0b450211b2c3255c385b054e3099f483f88daf02 100644 (file)
@@ -1,5 +1,5 @@
 /****************************************************************************
- * Copyright (c) 2002-2004,2008 Free Software Foundation, Inc.              *
+ * Copyright (c) 2002-2008,2009 Free Software Foundation, Inc.              *
  *                                                                          *
  * Permission is hereby granted, free of charge, to any person obtaining a  *
  * copy of this software and associated documentation files (the            *
@@ -39,7 +39,7 @@
 
 #include <curses.priv.h>
 
-MODULE_ID("$Id: lib_get_wstr.c,v 1.11 2008/11/16 00:19:59 juergen Exp $")
+MODULE_ID("$Id: lib_get_wstr.c,v 1.12 2009/10/24 22:38:11 tom Exp $")
 
 static int
 wadd_wint(WINDOW *win, wint_t *src)
@@ -95,7 +95,7 @@ wgetn_wstr(WINDOW *win, wint_t *str, int maxlen)
     wint_t ch;
     int y, x, code;
 
-    T((T_CALLED("wgetn_wstr(%p,%p, %d)"), win, str, maxlen));
+    T((T_CALLED("wgetn_wstr(%p,%p, %d)"), (void *) win, (void *) str, maxlen));
 
     if (!win)
        returnCode(ERR);
index 43175de83464a033974b6d2d5bfffb99546b5662..4bd77fa4face6fb508f9579f4c4b2be3deb184df 100644 (file)
@@ -1,5 +1,5 @@
 /****************************************************************************
- * Copyright (c) 2002 Free Software Foundation, Inc.                        *
+ * Copyright (c) 2002,2009 Free Software Foundation, Inc.                   *
  *                                                                          *
  * Permission is hereby granted, free of charge, to any person obtaining a  *
  * copy of this software and associated documentation files (the            *
 
 #include <curses.priv.h>
 
-MODULE_ID("$Id: lib_hline_set.c,v 1.2 2002/03/23 21:35:34 tom Exp $")
+MODULE_ID("$Id: lib_hline_set.c,v 1.3 2009/10/24 22:42:50 tom Exp $")
 
 NCURSES_EXPORT(int)
-whline_set(WINDOW *win, const cchar_t * ch, int n)
+whline_set(WINDOW *win, const cchar_t *ch, int n)
 {
     int code = ERR;
     NCURSES_SIZE_T start;
     NCURSES_SIZE_T end;
 
-    T((T_CALLED("whline_set(%p,%s,%d)"), win, _tracecchar_t(ch), n));
+    T((T_CALLED("whline_set(%p,%s,%d)"), (void *) win, _tracecchar_t(ch), n));
 
     if (win) {
        struct ldat *line = &(win->_line[win->_cury]);
index 5cd92e382de4f3a5d5a329a5cda5dd9e5987b8ed..b2396508ba2516dc6f7a099496364c36112125da 100644 (file)
@@ -1,5 +1,5 @@
 /****************************************************************************
- * Copyright (c) 2002-2004,2006 Free Software Foundation, Inc.              *
+ * Copyright (c) 2002-2006,2009 Free Software Foundation, Inc.              *
  *                                                                          *
  * Permission is hereby granted, free of charge, to any person obtaining a  *
  * copy of this software and associated documentation files (the            *
@@ -39,7 +39,7 @@
 
 #include <curses.priv.h>
 
-MODULE_ID("$Id: lib_in_wch.c,v 1.4 2006/09/03 15:41:22 tom Exp $")
+MODULE_ID("$Id: lib_in_wch.c,v 1.5 2009/10/24 22:37:55 tom Exp $")
 
 NCURSES_EXPORT(int)
 win_wch(WINDOW *win, cchar_t *wcval)
@@ -47,7 +47,7 @@ win_wch(WINDOW *win, cchar_t *wcval)
     int row, col;
     int code = OK;
 
-    TR(TRACE_CCALLS, (T_CALLED("win_wch(%p,%p)"), win, wcval));
+    TR(TRACE_CCALLS, (T_CALLED("win_wch(%p,%p)"), (void *) win, (void *) wcval));
     if (win != 0
        && wcval != 0) {
        getyx(win, row, col);
index e9f0646ea66ab27efe7a8626f19da12e60060860..57cc2ca6e73f4e1305a9e688ed82db7ecaf790c5 100644 (file)
@@ -1,5 +1,5 @@
 /****************************************************************************
- * Copyright (c) 2002-2004-2007 Free Software Foundation, Inc.              *
+ * Copyright (c) 2002-2007,2009 Free Software Foundation, Inc.              *
  *                                                                          *
  * Permission is hereby granted, free of charge, to any person obtaining a  *
  * copy of this software and associated documentation files (the            *
 
 #include <curses.priv.h>
 
-MODULE_ID("$Id: lib_in_wchnstr.c,v 1.7 2007/02/11 01:00:00 tom Exp $")
+MODULE_ID("$Id: lib_in_wchnstr.c,v 1.8 2009/10/24 22:37:48 tom Exp $")
 
 NCURSES_EXPORT(int)
 win_wchnstr(WINDOW *win, cchar_t *wchstr, int n)
 {
     int code = OK;
 
-    T((T_CALLED("win_wchnstr(%p,%p,%d)"), win, wchstr, n));
+    T((T_CALLED("win_wchnstr(%p,%p,%d)"), (void *) win, (void *) wchstr, n));
     if (win != 0
        && wchstr != 0) {
        NCURSES_CH_T *src;
index ae3302c4c33527b8f2f787f856a9456276c9ecd0..e44f091b639f71fecbd565e0e469da2f708f95c7 100644 (file)
@@ -39,7 +39,7 @@
 
 #include <curses.priv.h>
 
-MODULE_ID("$Id: lib_ins_wch.c,v 1.10 2009/09/12 18:07:23 tom Exp $")
+MODULE_ID("$Id: lib_ins_wch.c,v 1.11 2009/10/24 22:43:14 tom Exp $")
 
 /*
  * Insert the given character, updating the current location to simplify
@@ -81,7 +81,7 @@ wins_wch(WINDOW *win, const cchar_t *wch)
     NCURSES_SIZE_T ox;
     int code = ERR;
 
-    T((T_CALLED("wins_wch(%p, %s)"), win, _tracecchar_t(wch)));
+    T((T_CALLED("wins_wch(%p, %s)"), (void *) win, _tracecchar_t(wch)));
 
     if (win != 0) {
        oy = win->_cury;
@@ -104,7 +104,8 @@ wins_nwstr(WINDOW *win, const wchar_t *wstr, int n)
     NCURSES_SIZE_T ox;
     const wchar_t *cp;
 
-    T((T_CALLED("wins_nwstr(%p,%s,%d)"), win, _nc_viswbufn(wstr, n), n));
+    T((T_CALLED("wins_nwstr(%p,%s,%d)"),
+       (void *) win, _nc_viswbufn(wstr, n), n));
 
     if (win != 0
        && wstr != 0) {
index 2207a5f5d19f5d09a28f96c09285295f61edbbf4..4cf7182ae06179cb9c84690d6c33746ff14a3f5a 100644 (file)
@@ -1,5 +1,5 @@
 /****************************************************************************
- * Copyright (c) 2002,2004 Free Software Foundation, Inc.                   *
+ * Copyright (c) 2002-2004,2009 Free Software Foundation, Inc.              *
  *                                                                          *
  * Permission is hereby granted, free of charge, to any person obtaining a  *
  * copy of this software and associated documentation files (the            *
@@ -39,7 +39,7 @@
 
 #include <curses.priv.h>
 
-MODULE_ID("$Id: lib_inwstr.c,v 1.4 2004/10/23 20:41:28 tom Exp $")
+MODULE_ID("$Id: lib_inwstr.c,v 1.5 2009/10/24 22:37:29 tom Exp $")
 
 NCURSES_EXPORT(int)
 winnwstr(WINDOW *win, wchar_t *wstr, int n)
@@ -50,7 +50,7 @@ winnwstr(WINDOW *win, wchar_t *wstr, int n)
     cchar_t *text;
     wchar_t wch;
 
-    T((T_CALLED("winnwstr(%p,%p,%d)"), win, wstr, n));
+    T((T_CALLED("winnwstr(%p,%p,%d)"), (void *) win, (void *) wstr, n));
     if (wstr != 0) {
        if (win) {
            getyx(win, row, col);
@@ -93,7 +93,7 @@ NCURSES_EXPORT(int)
 winwstr(WINDOW *win, wchar_t *wstr)
 {
     int result = OK;
-    T((T_CALLED("winwstr(%p,%p)"), win, wstr));
+    T((T_CALLED("winwstr(%p,%p)"), (void *) win, (void *) wstr));
     if (winnwstr(win, wstr, CCHARW_MAX * (win->_maxx - win->_curx + 1)) == ERR)
        result = ERR;
     returnCode(result);
index e61277574311bbf7cf83918c2207ea22e09677b9..b6da7a8656986e40deb6f9c91224da4eae86e84a 100644 (file)
@@ -1,5 +1,5 @@
 /****************************************************************************
- * Copyright (c) 2004 Free Software Foundation, Inc.                        *
+ * Copyright (c) 2004,2009 Free Software Foundation, Inc.                   *
  *                                                                          *
  * Permission is hereby granted, free of charge, to any person obtaining a  *
  * copy of this software and associated documentation files (the            *
 
 #include <curses.priv.h>
 
-MODULE_ID("$Id: lib_pecho_wchar.c,v 1.1 2004/01/03 21:42:01 tom Exp $")
+MODULE_ID("$Id: lib_pecho_wchar.c,v 1.2 2009/10/24 22:43:32 tom Exp $")
 
 NCURSES_EXPORT(int)
-pecho_wchar(WINDOW *pad, const cchar_t * wch)
+pecho_wchar(WINDOW *pad, const cchar_t *wch)
 {
-    T((T_CALLED("pecho_wchar(%p, %s)"), pad, _tracech_t(wch)));
+    T((T_CALLED("pecho_wchar(%p, %s)"), (void *) pad, _tracech_t(wch)));
 
     if (pad == 0)
        returnCode(ERR);
index d17e618ccf47fc9ad9660f1d09c83475cc8f7986..e18a2960fae896db32bc5e86f24f082285cd23b1 100644 (file)
@@ -39,7 +39,7 @@
 
 #include <curses.priv.h>
 
-MODULE_ID("$Id: lib_unget_wch.c,v 1.12 2009/10/10 20:01:13 tom Exp $")
+MODULE_ID("$Id: lib_unget_wch.c,v 1.13 2009/10/24 21:52:49 tom Exp $")
 
 /*
  * Wrapper for wcrtomb() which obtains the length needed for the given
@@ -55,13 +55,13 @@ _nc_wcrtomb(char *target, wchar_t source, mbstate_t * state)
        const wchar_t *tempp = temp;
        temp[0] = source;
        temp[1] = 0;
-       result = wcsrtombs(NULL, &tempp, 0, state);
+       result = (int) wcsrtombs(NULL, &tempp, 0, state);
     } else {
-       result = wcrtomb(target, source, state);
+       result = (int) wcrtomb(target, source, state);
     }
     if (!isEILSEQ(result) && (result == 0))
        result = 1;
-    return result;
+    return (size_t) result;
 }
 
 NCURSES_EXPORT(int)
@@ -72,7 +72,7 @@ NCURSES_SP_NAME(unget_wch) (NCURSES_SP_DCLx const wchar_t wch)
     size_t length;
     int n;
 
-    T((T_CALLED("unget_wch(%p, %#lx)"), SP_PARM, (unsigned long) wch));
+    T((T_CALLED("unget_wch(%p, %#lx)"), (void *) SP_PARM, (unsigned long) wch));
 
     init_mb(state);
     length = _nc_wcrtomb(0, wch, &state);
@@ -83,10 +83,12 @@ NCURSES_SP_NAME(unget_wch) (NCURSES_SP_DCLx const wchar_t wch)
 
        if ((string = (char *) malloc(length)) != 0) {
            init_mb(state);
-           wcrtomb(string, wch, &state);
+           /* ignore the result, since we already validated the character */
+           IGNORE_RC((int) wcrtomb(string, wch, &state));
 
            for (n = (int) (length - 1); n >= 0; --n) {
-               if (NCURSES_SP_NAME(ungetch) (NCURSES_SP_ARGx UChar(string[n])) != OK) {
+               if (NCURSES_SP_NAME(ungetch) (NCURSES_SP_ARGx
+                   UChar(string[n])) !=OK) {
                    result = ERR;
                    break;
                }
index af42df1f24abaa5537c9eed496d73f1a0284689d..aacc00e33be975f08b1b007690a7ec253c54b099 100644 (file)
@@ -1,5 +1,5 @@
 /****************************************************************************
- * Copyright (c) 2002 Free Software Foundation, Inc.                        *
+ * Copyright (c) 2002,2009 Free Software Foundation, Inc.                   *
  *                                                                          *
  * Permission is hereby granted, free of charge, to any person obtaining a  *
  * copy of this software and associated documentation files (the            *
 
 #include <curses.priv.h>
 
-MODULE_ID("$Id: lib_vline_set.c,v 1.2 2002/03/23 21:36:01 tom Exp $")
+MODULE_ID("$Id: lib_vline_set.c,v 1.3 2009/10/24 22:43:43 tom Exp $")
 
 NCURSES_EXPORT(int)
-wvline_set(WINDOW *win, const cchar_t * ch, int n)
+wvline_set(WINDOW *win, const cchar_t *ch, int n)
 {
     int code = ERR;
     NCURSES_SIZE_T row, col;
     NCURSES_SIZE_T end;
 
-    T((T_CALLED("wvline(%p,%s,%d)"), win, _tracecchar_t(ch), n));
+    T((T_CALLED("wvline(%p,%s,%d)"), (void *) win, _tracecchar_t(ch), n));
 
     if (win) {
        NCURSES_CH_T wch;
index a798c9d50f579a99d56bf1ef5394adaa8eb409bb..dfe6abf1b426d8d711e1ecbaf54170d36f1be17e 100644 (file)
@@ -40,7 +40,7 @@
  * results, use the ncurses(3) library.  On non-Intel machines, SVr4 curses is
  * just as good.
  *
- * $Id: blue.c,v 1.32 2009/10/10 16:16:46 tom Exp $
+ * $Id: blue.c,v 1.33 2009/10/24 21:03:35 tom Exp $
  */
 
 #include <test.priv.h>
@@ -300,7 +300,7 @@ play_game(void)
                if (selection[i] != NOCARD) {
                    move(BASEROW + (selection[i] / GRID_WIDTH) * 2 + 3,
                         (selection[i] % GRID_WIDTH) * 5);
-                   (void) printw("   %c ", (char) (*lp++ = 'a' + i));
+                   (void) printw("   %c ", (*lp++ = (char) ('a' + i)));
                }
            };
            *lp = '\0';
index c68d470f9a8a7b498ba7abdd81ff12ffe3b2e464..b9a28836a5d72d623943f1ef228538d8e251584b 100644 (file)
--- a/test/bs.c
+++ b/test/bs.c
@@ -34,7 +34,7 @@
  * v2.0 featuring strict ANSI/POSIX conformance, November 1993.
  * v2.1 with ncurses mouse support, September 1995
  *
- * $Id: bs.c,v 1.49 2009/10/10 16:01:41 tom Exp $
+ * $Id: bs.c,v 1.50 2009/10/24 21:24:24 tom Exp $
  */
 
 #include <test.priv.h>
@@ -952,7 +952,8 @@ cpufire(int x, int y)
     bool hit, sunk;
     ship_t *ss = NULL;
 
-    hits[COMPUTER][x][y] = (char) (hit = (board[PLAYER][x][y])) ? MARK_HIT : MARK_MISS;
+    hit = board[PLAYER][x][y] ? MARK_HIT : MARK_MISS;
+    hits[COMPUTER][x][y] = (char) hit;
     (void) mvprintw(PROMPTLINE, 0,
                    "I shoot at %c%d. I %s!", y + 'A', x, hit ? "hit" :
                    "miss");
@@ -1129,7 +1130,7 @@ playagain(void)
        ++cpuwon;
     else
        ++plywon;
-    j = 18 + strlen(name);
+    j = 18 + (int) strlen(name);
     if (plywon >= 10)
        ++j;
     if (cpuwon >= 10)
index bd30535c1b54bda4f10c4c7d9429c895c52f1408..aee178e16947fbfc4888f10c04c559ed8c53f211 100644 (file)
@@ -26,7 +26,7 @@
  * authorization.                                                           *
  ****************************************************************************/
 /*
- * $Id: chgat.c,v 1.9 2009/07/15 23:21:04 tom Exp $
+ * $Id: chgat.c,v 1.10 2009/10/24 21:32:57 tom Exp $
  *
  * test-driver for chgat/wchgat/mvchgat/mvwchgat
  */
@@ -47,7 +47,7 @@
 typedef struct {
     unsigned c;
     unsigned v;
-    int pair;
+    short pair;
     unsigned attr;
     int count;
     int ch;
@@ -60,12 +60,12 @@ typedef struct {
 } STATUS;
 
 static const char *
-color_params(unsigned state, int *pair)
+color_params(unsigned state, short *pair)
 {
     /* *INDENT-OFF* */
     static struct {
-       int pair;
-       int fg, bg;
+       short pair;
+       short fg, bg;
        const char *msg;
     } table[] = {
        { 0, COLOR_DEFAULT, COLOR_DEFAULT, "default" },
index c90cc85910ee1370a3bc8a7d34c854d88a0abed7..272da7b409c7f801e2f5919b5891106a6b5e39fb 100644 (file)
@@ -26,7 +26,7 @@
  * authorization.                                                           *
  ****************************************************************************/
 /*
- * $Id: clip_printw.c,v 1.4 2009/08/29 19:00:44 tom Exp $
+ * $Id: clip_printw.c,v 1.5 2009/10/24 21:02:55 tom Exp $
  *
  * demonstrate how to use printw without wrapping.
  */
@@ -337,7 +337,7 @@ test_clipping(WINDOW *win)
            }
            if ((buffer = typeMalloc(char, need)) != 0) {
                for (j = 0; j < need; ++j) {
-                   buffer[j] = 'A' + (j % 26);
+                   buffer[j] = (char) ('A' + (j % 26));
                }
                buffer[need - 1] = '\0';
                st.status = clip_wprintw(win, fmt, '[', buffer, ']');
index 4d553e2ea73c98947085f4a5fe02a0bab6057ecd..90caf821b712754edbc32204d92fec878d361d5c 100644 (file)
@@ -1,5 +1,5 @@
 /****************************************************************************
- * Copyright (c) 2005-2007,2008 Free Software Foundation, Inc.              *
+ * Copyright (c) 2005-2008,2009 Free Software Foundation, Inc.              *
  *                                                                          *
  * Permission is hereby granted, free of charge, to any person obtaining a  *
  * copy of this software and associated documentation files (the            *
@@ -26,7 +26,7 @@
  * authorization.                                                           *
  ****************************************************************************/
 /*
- * $Id: demo_menus.c,v 1.28 2008/08/23 20:31:54 tom Exp $
+ * $Id: demo_menus.c,v 1.29 2009/10/24 21:19:27 tom Exp $
  *
  * Demonstrate a variety of functions from the menu library.
  * Thomas Dickey - 2005/4/9
@@ -260,13 +260,13 @@ menu_destroy(MENU * m)
 {
     int count;
 
-    Trace(("menu_destroy %p", m));
+    Trace(("menu_destroy %p", (void *) m));
     if (m != 0) {
        ITEM **items = menu_items(m);
        const char *blob = 0;
 
        count = item_count(m);
-       Trace(("menu_destroy %p count %d", m, count));
+       Trace(("menu_destroy %p count %d", (void *) m, count));
        if ((count > 0) && (m == mpSelect)) {
            blob = item_name(*items);
        }
@@ -368,7 +368,9 @@ build_select_menu(MenuNo number, char *filename)
            CONST_MENUS char **list = typeCalloc(CONST_MENUS char *, size + 1);
 
            items = typeCalloc(ITEM *, size + 1);
-           Trace(("build_select_menu blob=%p, items=%p", blob, items));
+           Trace(("build_select_menu blob=%p, items=%p",
+                  (void *) blob,
+                  (void *) items));
            if (blob != 0 && list != 0) {
                FILE *fp = fopen(filename, "r");
                if (fp != 0) {
index 93fbe02805cb91cf1a3c06ca9005ec1550d25a31..387f7077f757303fccce7f27aa3b100616b620ea 100644 (file)
@@ -1,5 +1,5 @@
 /****************************************************************************
- * Copyright (c) 1998-2007,2008 Free Software Foundation, Inc.              *
+ * Copyright (c) 1998-2008,2009 Free Software Foundation, Inc.              *
  *                                                                          *
  * Permission is hereby granted, free of charge, to any person obtaining a  *
  * copy of this software and associated documentation files (the            *
@@ -29,7 +29,7 @@
 /*
  * Author: Thomas E. Dickey (1998-on)
  *
- * $Id: ditto.c,v 1.34 2009/07/17 00:07:25 tom Exp $
+ * $Id: ditto.c,v 1.35 2009/10/24 21:33:24 tom Exp $
  *
  * The program illustrates how to set up multiple screens from a single
  * program.
@@ -43,7 +43,6 @@
  */
 #include <test.priv.h>
 #include <sys/stat.h>
-#include <errno.h>
 
 #ifdef USE_PTHREADS
 #include <pthread.h>
@@ -379,7 +378,7 @@ main(int argc, char *argv[])
 
     if (argc <= 1)
        usage();
-    
+
     if ((data = typeCalloc(DITTO, (size_t) argc)) == 0)
        failed("calloc data");
 
index f351122cfa9e40081b9ac2a55471c69db9e270d8..200ea15cead445553b71e50c014e8db272cc3112 100644 (file)
@@ -40,7 +40,7 @@ AUTHOR
    Author: Eric S. Raymond <esr@snark.thyrsus.com> 1993
            Thomas E. Dickey (beginning revision 1.27 in 1996).
 
-$Id: ncurses.c,v 1.347 2009/10/03 22:01:56 tom Exp $
+$Id: ncurses.c,v 1.349 2009/10/24 21:28:36 tom Exp $
 
 ***************************************************************************/
 
@@ -121,22 +121,22 @@ extern unsigned _nc_tracing;
 #if HAVE_WCSRTOMBS
 #define count_wchars(src, len, state)      wcsrtombs(0,   &src, len, state)
 #define trans_wchars(dst, src, len, state) wcsrtombs(dst, &src, len, state)
-#define reset_wchars(state) memset(&state, 0, sizeof(state))
+#define reset_wchars(state) init_mb(state)
 #elif HAVE_WCSTOMBS && HAVE_MBTOWC && HAVE_MBLEN
 #define count_wchars(src, len, state)      wcstombs(0,   src, len)
 #define trans_wchars(dst, src, len, state) wcstombs(dst, src, len)
-#define reset_wchars(state) mblen(NULL, 0), mbtowc(NULL, NULL, 0)
+#define reset_wchars(state) IGNORE_RC(mblen(NULL, 0)), IGNORE_RC(mbtowc(NULL, NULL, 0))
 #define state_unused
 #endif
 
 #if HAVE_MBSRTOWCS
 #define count_mbytes(src, len, state)      mbsrtowcs(0,   &src, len, state)
 #define trans_mbytes(dst, src, len, state) mbsrtowcs(dst, &src, len, state)
-#define reset_mbytes(state) memset(&state, 0, sizeof(state))
+#define reset_mbytes(state) init_mb(state)
 #elif HAVE_MBSTOWCS && HAVE_MBTOWC && HAVE_MBLEN
 #define count_mbytes(src, len, state)      mbstowcs(0,   src, len)
 #define trans_mbytes(dst, src, len, state) mbstowcs(dst, src, len)
-#define reset_mbytes(state) mblen(NULL, 0), mbtowc(NULL, NULL, 0)
+#define reset_mbytes(state) IGNORE_RC(mblen(NULL, 0)), IGNORE_RC(mbtowc(NULL, NULL, 0))
 #define state_unused
 #endif
 
@@ -6470,7 +6470,7 @@ rip_footer(WINDOW *win, int cols)
     wbkgd(win, A_REVERSE);
     werase(win);
     wmove(win, 0, 0);
-    wprintw(win, "footer: window %p, %d columns", win, cols);
+    wprintw(win, "footer: window %p, %d columns", (void *) win, cols);
     wnoutrefresh(win);
     return OK;
 }
@@ -6481,7 +6481,7 @@ rip_header(WINDOW *win, int cols)
     wbkgd(win, A_REVERSE);
     werase(win);
     wmove(win, 0, 0);
-    wprintw(win, "header: window %p, %d columns", win, cols);
+    wprintw(win, "header: window %p, %d columns", (void *) win, cols);
     wnoutrefresh(win);
     return OK;
 }
index 696ae73afbed9ea763aff03213cea03d1ba5a047..973ec46a38de5879730ac805247e7999148d46f8 100644 (file)
@@ -29,7 +29,7 @@
 /*
  * Author: Thomas E. Dickey - 2000
  *
- * $Id: railroad.c,v 1.18 2009/10/10 16:14:42 tom Exp $
+ * $Id: railroad.c,v 1.19 2009/10/24 21:37:56 tom Exp $
  *
  * A simple demo of the termcap interface.
  */
@@ -58,13 +58,17 @@ static bool interrupted = FALSE;
 static int
 outc(TPUTS_ARG c)
 {
+    int rc = OK;
+
     if (interrupted) {
        char tmp = (char) c;
-       write(STDOUT_FILENO, &tmp, 1);
+       if (write(STDOUT_FILENO, &tmp, 1) == -1)
+           rc = ERR;
     } else {
-       putc(c, stdout);
+       if (putc(c, stdout) == EOF)
+           rc = ERR;
     }
-    return 0;
+    return rc;
 }
 
 static void
index 50b6effbb383783f2e9f20c1820b8503ee61b9eb..f856f618f0bd87aa28c0b0104eed912d1e095258 100644 (file)
@@ -29,7 +29,7 @@
 /****************************************************************************
  *  Author: Thomas E. Dickey                    1996-on                     *
  ****************************************************************************/
-/* $Id: test.priv.h,v 1.91 2009/07/18 12:19:23 tom Exp $ */
+/* $Id: test.priv.h,v 1.93 2009/10/24 21:30:13 tom Exp $ */
 
 #ifndef __TEST_PRIV_H
 #define __TEST_PRIV_H 1
 #include <stdarg.h>
 #include <string.h>
 #include <sys/types.h>
+#include <errno.h>
 
 #if HAVE_UNISTD_H
 #include <unistd.h>
@@ -643,6 +644,15 @@ typedef int (*NCURSES_SCREEN_CB)(SCREEN *, void *);
 #define USE_TRACE 0
 #endif
 
+/*
+ * Workaround for defective implementation of gcc attribute warn_unused_result
+ */
+#if defined(__GNUC__) && defined(_FORTIFY_SOURCE)
+#define IGNORE_RC(func) errno = func
+#else
+#define IGNORE_RC(func) (void) func
+#endif /* gcc workarounds */
+
 #define init_mb(state) memset(&state, 0, sizeof(state))
 
 #endif /* __TEST_PRIV_H */
index 6ae2689e61eb59e4fc238271103e1ba6050fbde2..6ec75fa11a20602c6c85cf5b1a9d177aa6a12460 100644 (file)
@@ -26,7 +26,7 @@
  * authorization.                                                           *
  ****************************************************************************/
 /*
- * $Id: test_opaque.c,v 1.8 2009/08/29 19:02:25 tom Exp $
+ * $Id: test_opaque.c,v 1.9 2009/10/24 21:21:29 tom Exp $
  *
  * Author: Thomas E Dickey
  *
@@ -231,7 +231,7 @@ show_opaque(WINDOW *stswin, WINDOW *txtwin, bool before, int active)
 
     show_keyword(stswin, n, active, "wgetparent");
     to_result(stswin, n, TRUE);
-    wprintw(stswin, "%p", wgetparent(txtwin));
+    wprintw(stswin, "%p", (void *) wgetparent(txtwin));
 
     ++n;
     show_keyword(stswin, n, active, "wgetscrreg");
index d6de0d0a3985938657c774edc29fd3f2317b850f..5b52e9807696c9a5f02ccd6ccdf2a73f2817f3a8 100644 (file)
@@ -50,7 +50,7 @@
  * scroll operation worked, and the refresh() code only had to do a
  * partial repaint.
  *
- * $Id: view.c,v 1.75 2009/07/19 00:34:07 tom Exp $
+ * $Id: view.c,v 1.76 2009/10/24 21:26:38 tom Exp $
  */
 
 #include <test.priv.h>
@@ -83,7 +83,7 @@
 
 #if USE_WIDEC_SUPPORT
 #if HAVE_MBTOWC && HAVE_MBLEN
-#define reset_mbytes(state) mblen(NULL, 0), mbtowc(NULL, NULL, 0)
+#define reset_mbytes(state) IGNORE_RC(mblen(NULL, 0)), IGNORE_RC(mbtowc(NULL, NULL, 0))
 #define count_mbytes(buffer,length,state) mblen(buffer,length)
 #define check_mbytes(wch,buffer,length,state) \
        (int) mbtowc(&wch, buffer, length)