更新 6.0s1.h

This commit is contained in:
rabix 2024-06-07 09:38:33 +08:00
parent 693fa9e5f6
commit 80463fd688
1 changed files with 11 additions and 11 deletions

22
6.0s1.h
View File

@ -18,8 +18,8 @@ typedef char s1_char;
# ifndef S1_6_0_H_IMPL
# include <stdio.h>
# include <stdlib.h>
# include <stdio.h>
# include <stdlib.h>
// 1. assert
void s1_assert(int value, const char *reason, struct s1_location loc) {
@ -58,10 +58,10 @@ void write_char(s1_char value, struct s1_location loc) {
s1_assert(rc != EOF, "Error: write_char", loc);
}
#define write_int(value) write_int(value, S1_LOC())
#define write_long(value) write_long(value, S1_LOC())
#define write_double(value) write_double(value, S1_LOC())
#define write_char(value) write_char(value, S1_LOC())
# define write_int(value) write_int(value, S1_LOC())
# define write_long(value) write_long(value, S1_LOC())
# define write_double(value) write_double(value, S1_LOC())
# define write_char(value) write_char(value, S1_LOC())
s1_int read_int(struct s1_location loc) {
s1_int value = 0;
@ -106,11 +106,11 @@ void read_pnl(struct s1_location loc) {
}
#define read_int() read_int(S1_LOC())
#define read_long() read_long(S1_LOC())
#define read_double() read_double(S1_LOC())
#define read_char() read_char(S1_LOC())
#define read_pnl() read_pnl(S1_LOC())
# define read_int() read_int(S1_LOC())
# define read_long() read_long(S1_LOC())
# define read_double() read_double(S1_LOC())
# define read_char() read_char(S1_LOC())
# define read_pnl() read_pnl(S1_LOC())
# endif