X-Git-Url: https://ncurses.scripts.mit.edu/?p=ncurses.git;a=blobdiff_plain;f=ncurses%2Fbase%2Flib_pad.c;h=b87498b500cd89173bfa3abf5e1880cd8fdcc2d7;hp=ccd3ad7efd89eaf2a403fd5191e569360db35fd7;hb=687aeec3e382083652c3bb2e94fb6d3bf101a1f9;hpb=5b7f4de105080e2a715b0564ede4bb7eb6767659 diff --git a/ncurses/base/lib_pad.c b/ncurses/base/lib_pad.c index ccd3ad7e..b87498b5 100644 --- a/ncurses/base/lib_pad.c +++ b/ncurses/base/lib_pad.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (c) 1998-2006,2009 Free Software Foundation, Inc. * + * Copyright (c) 1998-2009,2010 Free Software Foundation, Inc. * * * * Permission is hereby granted, free of charge, to any person obtaining a * * copy of this software and associated documentation files (the * @@ -42,7 +42,7 @@ #include -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.46 2010/04/24 23:50:45 tom Exp $") NCURSES_EXPORT(WINDOW *) NCURSES_SP_NAME(newpad) (NCURSES_SP_DCLx int l, int c) @@ -51,7 +51,7 @@ NCURSES_SP_NAME(newpad) (NCURSES_SP_DCLx int l, int c) NCURSES_CH_T *ptr; int i; - T((T_CALLED("newpad(%p,%d, %d)"), SP_PARM, l, c)); + T((T_CALLED("newpad(%p,%d, %d)"), (void *) SP_PARM, l, c)); if (l <= 0 || c <= 0) returnWin(0); @@ -127,10 +127,10 @@ pnoutrefresh(WINDOW *win, int smaxrow, int smaxcol) { - NCURSES_SIZE_T i, j; - NCURSES_SIZE_T m, n; - NCURSES_SIZE_T pmaxrow; - NCURSES_SIZE_T pmaxcol; + int i, j; + int m, n; + int pmaxrow; + int pmaxcol; SCREEN *sp; #if USE_SCROLL_HINTS @@ -140,7 +140,7 @@ pnoutrefresh(WINDOW *win, #endif T((T_CALLED("pnoutrefresh(%p, %d, %d, %d, %d, %d, %d)"), - win, pminrow, pmincol, sminrow, smincol, smaxrow, smaxcol)); + (void *) win, pminrow, pmincol, sminrow, smincol, smaxrow, smaxcol)); if (win == 0) returnCode(ERR); @@ -279,8 +279,8 @@ pnoutrefresh(WINDOW *win, win->_line[i].oldindex = _NEWINDEX; #endif - win->_begx = smincol; - win->_begy = sminrow; + win->_begx = (NCURSES_SIZE_T) smincol; + win->_begy = (NCURSES_SIZE_T) sminrow; if (win->_clear) { win->_clear = FALSE; @@ -296,8 +296,10 @@ pnoutrefresh(WINDOW *win, && win->_curx >= pmincol && win->_cury <= pmaxrow && win->_curx <= pmaxcol) { - NewScreen(sp)->_cury = win->_cury - pminrow + win->_begy + win->_yoffset; - NewScreen(sp)->_curx = win->_curx - pmincol + win->_begx; + NewScreen(sp)->_cury = (NCURSES_SIZE_T) (win->_cury - pminrow + + win->_begy + win->_yoffset); + NewScreen(sp)->_curx = (NCURSES_SIZE_T) (win->_curx - pmincol + + win->_begx); } NewScreen(sp)->_leaveok = win->_leaveok; win->_flags &= ~_HASMOVED; @@ -307,12 +309,12 @@ pnoutrefresh(WINDOW *win, * We will use this on subsequent calls to this function to derive * values to stuff into 'oldindex[]' -- for scrolling optimization. */ - win->_pad._pad_y = pminrow; - win->_pad._pad_x = pmincol; - win->_pad._pad_top = sminrow; - win->_pad._pad_left = smincol; - win->_pad._pad_bottom = smaxrow; - win->_pad._pad_right = smaxcol; + win->_pad._pad_y = (NCURSES_SIZE_T) pminrow; + win->_pad._pad_x = (NCURSES_SIZE_T) pmincol; + win->_pad._pad_top = (NCURSES_SIZE_T) sminrow; + win->_pad._pad_left = (NCURSES_SIZE_T) smincol; + win->_pad._pad_bottom = (NCURSES_SIZE_T) smaxrow; + win->_pad._pad_right = (NCURSES_SIZE_T) smaxcol; returnCode(OK); } @@ -320,7 +322,7 @@ pnoutrefresh(WINDOW *win, NCURSES_EXPORT(int) pechochar(WINDOW *pad, const chtype ch) { - T((T_CALLED("pechochar(%p, %s)"), pad, _tracechtype(ch))); + T((T_CALLED("pechochar(%p, %s)"), (void *) pad, _tracechtype(ch))); if (pad == 0) returnCode(ERR);