+ 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).
-- 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
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).
# 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
# 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)
#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
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++)
{
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
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);
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);
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);
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);
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)
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)
{
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
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++;
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);
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);
{
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)));
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)))
{
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),
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);
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;
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
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++;
{
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
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));
}
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));
}
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));
}
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));
}
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)));
}
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)));
}
/*----------------------------------------------------------------------------
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));
}
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));
}
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));
}
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));
}
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)));
}
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)));
}
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 &&
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);
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)) &&
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);
}
{
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);
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);
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 */
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);
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);
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);
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);
}
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);
}
{
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
{
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
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
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)));
}
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)));
}
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])));
}
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])));
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)));
}
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)));
}
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])));
}
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])));
}
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)));
}
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)));
}
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)));
}
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)));
}
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));
}
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));
}
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));
}
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));
}
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)
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);
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);
{
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))
{
#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.
int pass;
int status;
-#ifdef NEED_STATE
+#ifndef state_unused
mbstate_t state;
#endif
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)
#
# 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"), #
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"
#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) {
#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)
{
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);
}
#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
{
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);
}
#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
{
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
#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;
#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);
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)) {
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)) {
/****************************************************************************
- * 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 *
#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)
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,
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);
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);
{
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,
#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()
{
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)
#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.
#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);
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;
/****************************************************************************
- * 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 *
#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
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),
/****************************************************************************
- * 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]);
/****************************************************************************
- * 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;
/****************************************************************************
- * 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;
/****************************************************************************
- * 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;
/****************************************************************************
- * 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;
#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
{
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))
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;
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);
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);
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);
}
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);
{
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;
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);
#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)
/****************************************************************************
- * 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;
#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)
{
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
#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
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));
}
{
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);
#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;
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;
#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
/****************************************************************************
- * 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 *
#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)
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;
#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()
{
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);
#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>
long event_delay = -1;
#endif
- T((T_CALLED("_nc_wgetch(%p)"), win));
+ T((T_CALLED("_nc_wgetch(%p)"), (void *) win));
*result = 0;
/* 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);
}
}
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)
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"));
#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
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);
/****************************************************************************
- * 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_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)
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]);
/****************************************************************************
- * 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;
/****************************************************************************
- * 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);
#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
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;
/****************************************************************************
- * 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) {
#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)
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);
/****************************************************************************
- * 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);
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);
/****************************************************************************
- * 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;
#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>
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;
{
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;
{
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)
{
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;
{
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;
{
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;
/****************************************************************************
- * 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;
#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)
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);
#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
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;
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;
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);
#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)
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) {
free(p);
result = OK;
- T(("...deleted win=%p", win));
+ T(("...deleted win=%p", (void *) win));
break;
}
q = p;
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)
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));
/*
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));
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);
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);
#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>
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;
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;
/****************************************************************************
- * 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 *
#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)
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);
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));
}
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));
}
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);
#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)
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);
#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);
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);
#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,...)
#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
#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
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) {
#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)
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);
#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)
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;
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);
#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
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;
/****************************************************************************
- * 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_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)
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);
#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 */
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)
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);
{
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) {
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
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);
/****************************************************************************
- * 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 *
#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,
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
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"));
/****************************************************************************
- * 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;
/****************************************************************************
- * 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 &&
#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
SCREEN *oldSP;
SCREEN *newSP;
- T((T_CALLED("set_term(%p)"), screenp));
+ T((T_CALLED("set_term(%p)"), (void *) screenp));
_nc_lock_global(curses);
_nc_unlock_global(curses);
- T((T_RETURN("%p"), oldSP));
+ T((T_RETURN("%p"), (void *) oldSP));
return (oldSP);
}
{
int i;
- T((T_CALLED("delscreen(%p)"), sp));
+ T((T_CALLED("delscreen(%p)"), (void *) sp));
_nc_lock_global(curses);
if (delink_screen(sp)) {
#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() ! */
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;
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) {
#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
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);
*/
#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
{
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
*/
#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))));
*/
#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))));
*/
#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);
*/
#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;
*/
#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;
*/
#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
*/
#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
{
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
*/
#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);
#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
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);
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);
#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)
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
*/
#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);
/****************************************************************************
- * 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))
{
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++)
{
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);
#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>
{
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) {
/****************************************************************************
- * 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_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)
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;
/****************************************************************************
- * 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)),
/****************************************************************************
- * 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)),
/****************************************************************************
- * 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]));
#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)
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)
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;
{
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;
/* 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;
{
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);
}
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
#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.
_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,
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)
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),
* 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
* 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) {
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;
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;
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);
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);
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;
/****************************************************************************
- * 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 *
#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
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);
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);
/****************************************************************************
- * 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);
#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)
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,
/*
- * $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
*
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)
#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.
*/
#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().
*/
/****************************************************************************
- * 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: 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))
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);
#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
{
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
#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.
{
TERMINAL *oldterm;
- T((T_CALLED("set_curterm(%p)"), termp));
+ T((T_CALLED("set_curterm(%p)"), (void *) termp));
_nc_lock_global(curses);
oldterm = cur_term;
}
_nc_unlock_global(curses);
- T((T_RETURN("%p"), oldterm));
+ T((T_RETURN("%p"), (void *) oldterm));
return (oldterm);
}
{
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
#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
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;
#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)
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
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
{
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
#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);
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);
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);
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)
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;
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;
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;
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 */
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;
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);
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);
}
#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
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;
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;
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;
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;
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;
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;
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);
#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 $")
/****************************************************************************
*
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;
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) {
#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;
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;
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;
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;
#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) {
#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
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);
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);
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);
#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 */
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);
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);
#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)
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
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
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
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
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)));
}
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)));
}
/****************************************************************************
- * 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_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)
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
#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 */
NCURSES_EXPORT(SCREEN *)
_nc_retrace_sp(SCREEN *code)
{
- T((T_RETURN("%p"), code));
+ T((T_RETURN("%p"), (void *) code));
return code;
}
NCURSES_EXPORT(WINDOW *)
_nc_retrace_win(WINDOW *code)
{
- T((T_RETURN("%p"), code));
+ T((T_RETURN("%p"), (void *) code));
return code;
}
#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
_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);
}
#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)
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
#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 */
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;
#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); \
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);
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)));
{
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);
#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
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");
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) {
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
/*
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)
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. */
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));
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);
#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);
{
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)) {
{
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)) {
/****************************************************************************
- * 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 *
#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,
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),
#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
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);
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))
#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)
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
* 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 {
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;
/****************************************************************************
- * 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 *
#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)
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);
/****************************************************************************
- * 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]);
/****************************************************************************
- * 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 *
#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)
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);
/****************************************************************************
- * 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;
#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
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;
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) {
/****************************************************************************
- * 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 *
#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)
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);
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);
/****************************************************************************
- * 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);
#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
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)
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);
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;
}
/****************************************************************************
- * 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;
* 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>
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';
* 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>
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");
++cpuwon;
else
++plywon;
- j = 18 + strlen(name);
+ j = 18 + (int) strlen(name);
if (plywon >= 10)
++j;
if (cpuwon >= 10)
* 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
*/
typedef struct {
unsigned c;
unsigned v;
- int pair;
+ short pair;
unsigned attr;
int count;
int ch;
} 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" },
* 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.
*/
}
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, ']');
/****************************************************************************
- * 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 *
* 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
{
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);
}
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) {
/****************************************************************************
- * 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 *
/*
* 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.
*/
#include <test.priv.h>
#include <sys/stat.h>
-#include <errno.h>
#ifdef USE_PTHREADS
#include <pthread.h>
if (argc <= 1)
usage();
-
+
if ((data = typeCalloc(DITTO, (size_t) argc)) == 0)
failed("calloc data");
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 $
***************************************************************************/
#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
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;
}
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;
}
/*
* 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.
*/
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
/****************************************************************************
* 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>
#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 */
* 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
*
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");
* 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>
#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)