From dad186a0714c1f32178f6d4b844f9f07e4fef30b Mon Sep 17 00:00:00 2001 From: Aoran Zeng Date: Mon, 4 Sep 2023 14:55:38 +0800 Subject: [PATCH] Add two put --- test_xy.c | 5 ++++- xy.h | 4 +++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/test_xy.c b/test_xy.c index d8c5c8e..d293f27 100644 --- a/test_xy.c +++ b/test_xy.c @@ -2,7 +2,7 @@ * File : test_xy.c * Authors : Aoran Zeng * 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, "屈身守分,", "以待天时,", "不可与命争也")); diff --git a/xy.h b/xy.h index 6a742ce..977c711 100644 --- a/xy.h +++ b/xy.h @@ -2,7 +2,7 @@ * File : xy.h * Authors : Aoran Zeng * 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]))