]> ncurses.scripts.mit.edu Git - ncurses.git/blobdiff - include/nc_string.h
ncurses 6.2 - patch 20211009
[ncurses.git] / include / nc_string.h
index ce7ccb1280ef11cc3eeb3b66828750bc04f56da2..546aa0695ba0279c80dc57270a0905389cfa8526 100644 (file)
@@ -1,5 +1,6 @@
 /****************************************************************************
- * Copyright (c) 2012-2013,2016 Free Software Foundation, Inc.              *
+ * Copyright 2020,2021 Thomas E. Dickey                                     *
+ * Copyright 2012-2013,2016 Free Software Foundation, Inc.                  *
  *                                                                          *
  * Permission is hereby granted, free of charge, to any person obtaining a  *
  * copy of this software and associated documentation files (the            *
@@ -40,7 +41,7 @@
 #endif
 
 /*
- * $Id: nc_string.h,v 1.7 2016/09/10 19:57:15 tom Exp $
+ * $Id: nc_string.h,v 1.9 2021/04/25 00:10:43 tom Exp $
  *
  * String-hacks.  Use these macros to stifle warnings on (presumably) correct
  * uses of strcat, strcpy and sprintf.
 #endif
 
 #if USE_STRING_HACKS && HAVE_SNPRINTF
+#ifdef __cplusplus
 #define _nc_SPRINTF             NCURSES_VOID snprintf
+#else
+#define _nc_SPRINTF             NCURSES_VOID (snprintf)
+#endif
 #define _nc_SLIMIT(n)           NCURSES_CAST(size_t,n),
 #else
 #define _nc_SPRINTF             NCURSES_VOID sprintf