From ba60fea9a5d2c2a355a6963f5ce6d6de4d735351 Mon Sep 17 00:00:00 2001 From: William McBrine Date: Fri, 6 Jan 2006 08:43:27 +0000 Subject: [PATCH] Corrected return value for is_linetouched() and is_wintouched(), int -> bool. --- curses.h | 6 ++-- pdcurses/touch.c | 71 ++++++++++++++++++++++++++---------------------- 2 files changed, 41 insertions(+), 36 deletions(-) diff --git a/curses.h b/curses.h index 6f0c8be7..5830fbf6 100644 --- a/curses.h +++ b/curses.h @@ -18,7 +18,7 @@ *************************************************************************** */ /* -$Id: curses.h,v 1.70 2006/01/04 09:17:35 wmcbrine Exp $ +$Id: curses.h,v 1.71 2006/01/06 08:43:27 wmcbrine Exp $ */ /* *---------------------------------------------------------------------- @@ -1607,8 +1607,8 @@ WINDOW* PDC_CDECL initscr Args(( void )); WINDOW* PDC_CDECL Xinitscr Args(( int, char ** )); #endif int PDC_CDECL intrflush Args(( WINDOW*, bool )); -int PDC_CDECL is_linetouched Args((WINDOW *,int)); -int PDC_CDECL is_wintouched Args((WINDOW *)); +bool PDC_CDECL is_linetouched Args((WINDOW *,int)); +bool PDC_CDECL is_wintouched Args((WINDOW *)); char* PDC_CDECL keyname Args(( int )); char PDC_CDECL killchar Args(( void )); char* PDC_CDECL longname Args(( void )); diff --git a/pdcurses/touch.c b/pdcurses/touch.c index e30203c9..61641aaa 100644 --- a/pdcurses/touch.c +++ b/pdcurses/touch.c @@ -19,7 +19,7 @@ */ #define CURSES_LIBRARY 1 #ifdef HAVE_CONFIG_H -# include +# include #endif #include @@ -38,7 +38,7 @@ #endif #ifdef PDCDEBUG -char *rcsid_touch = "$Id: touch.c,v 1.2 2006/01/03 07:34:43 wmcbrine Exp $"; +char *rcsid_touch = "$Id: touch.c,v 1.3 2006/01/06 08:43:26 wmcbrine Exp $"; #endif /*man-start********************************************************************* @@ -46,43 +46,43 @@ char *rcsid_touch = "$Id: touch.c,v 1.2 2006/01/03 07:34:43 wmcbrine Exp $"; Name: touch Synopsis: - int touchwin(WINDOW *win); - int touchline(WINDOW *win, int start,int count); - int untouchwin(WINDOW *win); - int wtouchln(WINDOW *win, int y, int n, int changed); - int is_linetouched(WINDOW *win,int line); - int is_wintouched(WINDOW *win); + int touchwin(WINDOW *win); + int touchline(WINDOW *win, int start, int count); + int untouchwin(WINDOW *win); + int wtouchln(WINDOW *win, int y, int n, int changed); + bool is_linetouched(WINDOW *win, int line); + bool is_wintouched(WINDOW *win); X/Open Description: - The touchwin() and touchline() functions throw away all optimisation - information about which parts of the window have been touched, - by pretending that the entire window has been drawn on. - This is sometimes necessary when using overlapping - windows, since a change to one window will affect the other window, - but the records of which lines have been changed in the other - window will not reflect the change. + The touchwin() and touchline() functions throw away all + optimisation information about which parts of the window have + been touched, by pretending that the entire window has been + drawn on. This is sometimes necessary when using overlapping + windows, since a change to one window will affect the other + window, but the records of which lines have been changed in the + other window will not reflect the change. - The untouchwin() routine marks all lines in the window as unchanged - since the last call to wrefresh(). + The untouchwin() routine marks all lines in the window as + unchanged since the last call to wrefresh(). - The wtouchln() routine makes n lines in the window, starting at - line y, look as if they have (changed=1) or have not (changed=0) - been changed since the last call to wrefresh(). + The wtouchln() routine makes n lines in the window, starting at + line y, look as if they have (changed=1) or have not (changed=0) + been changed since the last call to wrefresh(). - The is_linetouched() routine returns TRUE if the specified line - in the specified window has been changed since the last call to - wrefresh(). If the line has not changed, FALSE is returned. + The is_linetouched() routine returns TRUE if the specified line + in the specified window has been changed since the last call to + wrefresh(). If the line has not changed, FALSE is returned. - The is_wintouched() routine returns TRUE if the specified window - has been changed since the last call to wrefresh(). If the window - has not changed, FALSE is returned. + The is_wintouched() routine returns TRUE if the specified window + has been changed since the last call to wrefresh(). If the + window has not changed, FALSE is returned. X/Open Return Value: - All functions return OK on success and ERR on error except - is_wintouched() and is_linetouched(). + All functions return OK on success and ERR on error except + is_wintouched() and is_linetouched(). X/Open Errors: - No errors are defined for this function. + No errors are defined for this function. Portability X/Open BSD SYS V Dec '88 @@ -118,6 +118,7 @@ WINDOW *win; } return( OK ); } + /***********************************************************************/ #ifdef HAVE_PROTO int PDC_CDECL touchline(WINDOW *win, int start,int count) @@ -145,6 +146,7 @@ int count; } return( OK ); } + /***********************************************************************/ #ifdef HAVE_PROTO int PDC_CDECL untouchwin(WINDOW *win) @@ -168,6 +170,7 @@ WINDOW *win; } return(OK); } + /***********************************************************************/ #ifdef HAVE_PROTO int PDC_CDECL wtouchln(WINDOW *win, int y, int n, int changed) @@ -205,11 +208,12 @@ int changed; } return( OK ); } + /***********************************************************************/ #ifdef HAVE_PROTO -int PDC_CDECL is_linetouched(WINDOW *win,int line) +bool PDC_CDECL is_linetouched(WINDOW *win,int line) #else -int PDC_CDECL is_linetouched(win,line) +bool PDC_CDECL is_linetouched(win,line) WINDOW *win; int line; #endif @@ -226,11 +230,12 @@ int line; return(TRUE); return(FALSE); } + /***********************************************************************/ #ifdef HAVE_PROTO -int PDC_CDECL is_wintouched(WINDOW *win) +bool PDC_CDECL is_wintouched(WINDOW *win) #else -int PDC_CDECL is_wintouched(win) +bool PDC_CDECL is_wintouched(win) WINDOW *win; #endif /***********************************************************************/