File tree Expand file tree Collapse file tree 1 file changed +15
-0
lines changed
Expand file tree Collapse file tree 1 file changed +15
-0
lines changed Original file line number Diff line number Diff line change 3131#include <string.h>
3232#include <unistd.h>
3333
34+ #if defined(__STDC__ ) && __STDC_VERSION__ >= 202311
35+ #define XY_Dreprecate_This (msg ) [[deprecated(msg)]]
36+ #elif defined(__GNUC__ ) || defined(__clang__ )
37+ #define XY_Deprecate_This (msg ) __attribute__((deprecated(msg)))
38+ #elif defined(_MSC_VER )
39+ #define XY_Deprecate_This (msg ) __declspec(deprecated(msg))
40+ #else
41+ #define XY_Deprecate_This (msg )
42+ #endif
43+
44+
3445/* Global */
3546bool xy_enable_color = true;
3647
@@ -74,9 +85,13 @@ bool xy_enable_color = true;
7485 #define xy_useutf8 ()
7586#endif
7687
88+ XY_Deprecate_This ("Not use anymore" )
7789void putf (double n ) { printf ("%f\n" , n ); }
90+ XY_Deprecate_This ("Not use anymore" )
7891void puti (long long n ) { printf ("%lld\n" , n ); }
92+ XY_Deprecate_This ("Not use anymore" )
7993void putb (bool n ) { if (n ) puts ("true" ); else puts ("false" ); }
94+
8095void print (const char * s ) { printf ("%s" , s ); }
8196void println (const char * s ) { printf ("%s\n" , s ); }
8297void say (const char * s ) { printf ("%s\n" , s ); }
You can’t perform that action at this time.
0 commit comments