Add two put

This commit is contained in:
Aoran Zeng 2023-09-04 14:55:38 +08:00
parent 545c8e17f4
commit dad186a071
2 changed files with 7 additions and 2 deletions

View File

@ -2,7 +2,7 @@
* File : test_xy.c
* Authors : Aoran Zeng <ccmywish@qq.com>
* Created on : <2023-08-30>
* Last modified : <2023-09-03>
* Last modified : <2023-09-04>
*
* test_xy:
*
@ -15,6 +15,9 @@ int
main (int argc, char const *argv[])
{
xy_useutf8();
puti(3);
double dbl = 3.1415;
putf(dbl);
puts(xy_2strjoin("Xi", "'an"));
puts(xy_strjoin (2, "Xi", "'an"));
puts(xy_strjoin(3, "屈身守分,", "以待天时,", "不可与命争也"));

4
xy.h
View File

@ -2,7 +2,7 @@
* File : xy.h
* Authors : Aoran Zeng <ccmywish@qq.com>
* Created on : <2023-08-28>
* Last modified : <2023-09-03>
* Last modified : <2023-09-04>
*
* xy:
*
@ -69,6 +69,8 @@
#endif
#define putf(n) printf("%f\n", n)
#define puti(n) printf("%d\n", n)
#define xy_arylen(x) (sizeof(x) / sizeof(x[0]))