From ef7c98ea3fa79e4591f4c9688429d177febd66c8 Mon Sep 17 00:00:00 2001 From: William McBrine Date: Thu, 12 Jan 2006 06:56:25 +0000 Subject: [PATCH] string.h was freely included in many modules, so it seems pointless to ifdef it in others. (I could've gone the other way with this -- adding the ifdef where absent -- but I don't know what it would achieve. More support for those hypothetical pre-ANSI compilers?) --- curses.h | 23 +---------------------- os2/pdcsetsc.c | 7 ++----- pdcurses/addchstr.c | 7 ++----- pdcurses/color.c | 7 ++----- pdcurses/insstr.c | 7 ++----- pdcurses/kernel.c | 6 ++---- pdcurses/mouse.c | 7 ++----- pdcurses/pdcutil.c | 14 ++++++-------- pdcurses/pdcwin.c | 6 ++---- pdcurses/refresh.c | 4 ++-- 10 files changed, 23 insertions(+), 65 deletions(-) diff --git a/curses.h b/curses.h index 835c7c4b..3c10c251 100644 --- a/curses.h +++ b/curses.h @@ -18,7 +18,7 @@ *************************************************************************** */ /* -$Id: curses.h,v 1.73 2006/01/12 06:45:43 wmcbrine Exp $ +$Id: curses.h,v 1.74 2006/01/12 06:56:25 wmcbrine Exp $ */ /* *---------------------------------------------------------------------- @@ -232,9 +232,6 @@ PDCurses portable platform definitions list: # ifndef HAVE_STDARG_H # define HAVE_STDARG_H /* have */ # endif -# ifndef HAVE_STRING_H -# define HAVE_STRING_H -# endif # ifndef HAVE_MEMMOVE # define HAVE_MEMMOVE /* have memmove() */ # endif @@ -409,9 +406,6 @@ PDCurses portable platform definitions list: # ifndef HAVE_STDARG_H # define HAVE_STDARG_H /* have */ # endif -# ifndef HAVE_STRING_H -# define HAVE_STRING_H -# endif # ifndef HAVE_LIMITS_H # define HAVE_LIMITS_H /* have */ # endif @@ -458,9 +452,6 @@ PDCurses portable platform definitions list: # ifndef HAVE_STDARG_H # define HAVE_STDARG_H /* have */ # endif -# ifndef HAVE_STRING_H -# define HAVE_STRING_H -# endif # ifndef HAVE_LIMITS_H # define HAVE_LIMITS_H /* have */ # endif @@ -511,9 +502,6 @@ PDCurses portable platform definitions list: # ifndef HAVE_STDARG_H # define HAVE_STDARG_H /* have */ # endif -# ifndef HAVE_STRING_H -# define HAVE_STRING_H -# endif # ifndef HAVE_UNISTD_H # define HAVE_UNISTD_H /* have */ # endif @@ -545,9 +533,6 @@ PDCurses portable platform definitions list: # ifndef HAVE_LIMITS_H # define HAVE_LIMITS_H /* have */ # endif -# ifndef HAVE_STRING_H /* have */ -# define HAVE_STRING_H -# endif # ifndef HAVE_MEMORY_H # define HAVE_MEMORY_H /* have */ # endif @@ -579,9 +564,6 @@ PDCurses portable platform definitions list: # ifndef HAVE_LIMITS_H # define HAVE_LIMITS_H /* have */ # endif -# ifndef HAVE_STRING_H /* have */ -# define HAVE_STRING_H -# endif # ifndef HAVE_MEMORY_H # define HAVE_MEMORY_H /* have */ # endif @@ -666,9 +648,6 @@ PDCurses portable platform definitions list: # ifndef HAVE_STDARG_H # define HAVE_STDARG_H /* have */ # endif -# ifndef HAVE_STRING_H -# define HAVE_STRING_H -# endif # ifndef HAVE_MEMMOVE # define HAVE_MEMMOVE /* have memmove() */ # endif diff --git a/os2/pdcsetsc.c b/os2/pdcsetsc.c index 2f063b45..47b307f5 100644 --- a/os2/pdcsetsc.c +++ b/os2/pdcsetsc.c @@ -22,13 +22,10 @@ # include #endif #include - -#ifdef HAVE_STRING_H -# include -#endif +#include #ifdef PDCDEBUG -char *rcsid_PDCsetsc = "$Id: pdcsetsc.c,v 1.7 2006/01/08 11:53:42 wmcbrine Exp $"; +char *rcsid_PDCsetsc = "$Id: pdcsetsc.c,v 1.8 2006/01/12 06:56:25 wmcbrine Exp $"; #endif /*man-start********************************************************************* diff --git a/pdcurses/addchstr.c b/pdcurses/addchstr.c index 49eb2d63..3c63191e 100644 --- a/pdcurses/addchstr.c +++ b/pdcurses/addchstr.c @@ -22,10 +22,7 @@ # include #endif #include - -#ifdef HAVE_STRING_H -# include -#endif +#include /* undefine any macros for functions defined in this module */ #undef addchstr @@ -44,7 +41,7 @@ #endif #ifdef PDCDEBUG -char *rcsid_addchstr = "$Id: addchstr.c,v 1.8 2006/01/06 10:32:16 wmcbrine Exp $"; +char *rcsid_addchstr = "$Id: addchstr.c,v 1.9 2006/01/12 06:56:25 wmcbrine Exp $"; #endif /*man-start********************************************************************* diff --git a/pdcurses/color.c b/pdcurses/color.c index 3b3e3a95..b349f002 100644 --- a/pdcurses/color.c +++ b/pdcurses/color.c @@ -22,10 +22,7 @@ # include #endif #include - -#ifdef HAVE_STRING_H -# include -#endif +#include /* undefine any macros for functions defined in this module */ #undef start_color @@ -48,7 +45,7 @@ static void PDC_init_pair(); #endif #ifdef PDCDEBUG -char *rcsid_color = "$Id: color.c,v 1.16 2006/01/04 13:39:34 wmcbrine Exp $"; +char *rcsid_color = "$Id: color.c,v 1.17 2006/01/12 06:56:25 wmcbrine Exp $"; #endif /*man-start********************************************************************* diff --git a/pdcurses/insstr.c b/pdcurses/insstr.c index 5b9dda6b..c113cae0 100644 --- a/pdcurses/insstr.c +++ b/pdcurses/insstr.c @@ -22,10 +22,7 @@ # include #endif #include - -#ifdef HAVE_STRING_H -# include -#endif +#include /* undefine any macros for functions defined in this module */ #undef insstr @@ -46,7 +43,7 @@ #endif #ifdef PDCDEBUG -char *rcsid_insstr = "$Id: insstr.c,v 1.6 2006/01/06 10:32:16 wmcbrine Exp $"; +char *rcsid_insstr = "$Id: insstr.c,v 1.7 2006/01/12 06:56:25 wmcbrine Exp $"; #endif /*man-start********************************************************************* diff --git a/pdcurses/kernel.c b/pdcurses/kernel.c index 282207f9..cc6186b5 100644 --- a/pdcurses/kernel.c +++ b/pdcurses/kernel.c @@ -26,9 +26,7 @@ #endif #include -#ifdef HAVE_STRING_H -# include -#endif +#include #ifdef HAVE_MEMORY_H # include @@ -80,7 +78,7 @@ #endif #ifdef PDCDEBUG -char *rcsid_kernel = "$Id: kernel.c,v 1.20 2006/01/06 10:32:16 wmcbrine Exp $"; +char *rcsid_kernel = "$Id: kernel.c,v 1.21 2006/01/12 06:56:25 wmcbrine Exp $"; #endif RIPPEDOFFLINE linesripped[5]; diff --git a/pdcurses/mouse.c b/pdcurses/mouse.c index 0a9a0028..016ae167 100644 --- a/pdcurses/mouse.c +++ b/pdcurses/mouse.c @@ -22,10 +22,7 @@ # include #endif #include - -#ifdef HAVE_STRING_H -# include -#endif +#include /* undefine any macros for functions defined in this module */ #undef mouse_set @@ -42,7 +39,7 @@ #endif #ifdef PDCDEBUG -char *rcsid_mouse = "$Id: mouse.c,v 1.4 2006/01/06 10:32:16 wmcbrine Exp $"; +char *rcsid_mouse = "$Id: mouse.c,v 1.5 2006/01/12 06:56:25 wmcbrine Exp $"; #endif /*man-start********************************************************************* diff --git a/pdcurses/pdcutil.c b/pdcurses/pdcutil.c index e301b516..3f4fdaac 100644 --- a/pdcurses/pdcutil.c +++ b/pdcurses/pdcutil.c @@ -31,22 +31,20 @@ #include #ifdef HAVE_LIMITS_H -# include +# include #endif -#ifdef HAVE_STRING_H -# include -#endif +#include #if defined(HAVE_STDARG_H) && defined(HAVE_PROTO) -# include -# define HAVE_STDARG_H_HAVE_PROTO +# include +# define HAVE_STDARG_H_HAVE_PROTO #else -# include +# include #endif #ifdef PDCDEBUG -char *rcsid_PDCutil = "$Id: pdcutil.c,v 1.12 2006/01/06 10:32:16 wmcbrine Exp $"; +char *rcsid_PDCutil = "$Id: pdcutil.c,v 1.13 2006/01/12 06:56:25 wmcbrine Exp $"; #endif /*man-start********************************************************************* diff --git a/pdcurses/pdcwin.c b/pdcurses/pdcwin.c index 6de1b6d3..744ae314 100644 --- a/pdcurses/pdcwin.c +++ b/pdcurses/pdcwin.c @@ -27,16 +27,14 @@ # include #endif -#ifdef HAVE_STRING_H -# include -#endif +#include #ifndef HAVE_MEMMOVE # define memmove PDC_memmove #endif #ifdef PDCDEBUG -char *rcsid_PDCwin = "$Id: pdcwin.c,v 1.11 2006/01/06 10:32:16 wmcbrine Exp $"; +char *rcsid_PDCwin = "$Id: pdcwin.c,v 1.12 2006/01/12 06:56:25 wmcbrine Exp $"; #endif /*man-start********************************************************************* diff --git a/pdcurses/refresh.c b/pdcurses/refresh.c index db5392fb..c5ed5181 100644 --- a/pdcurses/refresh.c +++ b/pdcurses/refresh.c @@ -26,7 +26,7 @@ #include #ifdef HAVE_MEMORY_H -#include +# include #endif /* undefine any macros for functions defined in this module */ @@ -48,7 +48,7 @@ #endif #ifdef PDCDEBUG -char *rcsid_refresh = "$Id: refresh.c,v 1.7 2006/01/12 06:45:43 wmcbrine Exp $"; +char *rcsid_refresh = "$Id: refresh.c,v 1.8 2006/01/12 06:56:25 wmcbrine Exp $"; #endif /*man-start*********************************************************************