3 #ifndef RUDIMENTS_NODE_H 4 #define RUDIMENTS_NODE_H 6 #include <rudiments/charstring.h> 7 #include <rudiments/stdio.h> 13 int32_t node_compare(
char *value1,
char *value2) {
18 int32_t node_compare(
const char *value1,
const char *value2) {
23 int32_t node_compare(
const unsigned char *value1,
24 const unsigned char *value2) {
29 int32_t node_compare(
unsigned char *value1,
unsigned char *value2) {
34 int32_t node_compare(
char value1,
char value2) {
37 }
else if (value1==value2) {
45 int32_t node_compare(int16_t value1, int16_t value2) {
48 }
else if (value1==value2) {
56 int32_t node_compare(int32_t value1, int32_t value2) {
59 }
else if (value1==value2) {
67 int32_t node_compare(int64_t value1, int64_t value2) {
70 }
else if (value1==value2) {
78 int32_t node_compare(
unsigned char value1,
unsigned char value2) {
81 }
else if (value1==value2) {
89 int32_t node_compare(uint16_t value1, uint16_t value2) {
92 }
else if (value1==value2) {
100 int32_t node_compare(uint32_t value1, uint32_t value2) {
103 }
else if (value1==value2) {
111 int32_t node_compare(uint64_t value1, uint64_t value2) {
114 }
else if (value1==value2) {
122 int32_t node_compare(
float value1,
float value2) {
125 }
else if (value1==value2) {
133 int32_t node_compare(
double value1,
double value2) {
136 }
else if (value1==value2) {
144 int32_t node_compare(
long double value1,
long double value2) {
147 }
else if (value1==value2) {
155 int32_t node_compare(
void *value1,
void *value2) {
158 }
else if (value1==value2) {
166 void node_print(
const char *value) {
167 stdoutput.
printf(
"%s",value);
171 void node_print(
char *value) {
172 stdoutput.
printf(
"%s",value);
176 void node_print(
char value) {
177 stdoutput.
printf(
"%c",value);
181 void node_print(int16_t value) {
182 stdoutput.
printf(
"%hd",value);
186 void node_print(int32_t value) {
187 stdoutput.
printf(
"%d",(
int)value);
191 void node_print(int64_t value) {
192 #ifdef RUDIMENTS_HAVE_LONG_LONG 193 stdoutput.
printf(
"%lld",(
long long)value);
195 stdoutput.
printf(
"%ld",(
long)value);
200 void node_print(
unsigned const char *value) {
201 stdoutput.
printf(
"%s",value);
205 void node_print(
unsigned char *value) {
206 stdoutput.
printf(
"%s",value);
210 void node_print(
unsigned char value) {
211 stdoutput.
printf(
"%c",value);
215 void node_print(uint16_t value) {
216 stdoutput.
printf(
"%hd",value);
220 void node_print(uint32_t value) {
221 stdoutput.
printf(
"%d",(
unsigned int)value);
225 void node_print(uint64_t value) {
226 #ifdef RUDIMENTS_HAVE_LONG_LONG 227 stdoutput.
printf(
"%lld",(
unsigned long long)value);
229 stdoutput.
printf(
"%ld",(
unsigned long)value);
234 void node_print(
float value) {
235 stdoutput.
printf(
"%f",value);
239 void node_print(
double value) {
240 stdoutput.
printf(
"%f",value);
244 void node_print(
long double value) {
245 stdoutput.
printf(
"%Lf",value);
249 void node_print(
void *value) {
250 stdoutput.
printf(
"%08x",value);
size_t printf(const char *format,...)
static int32_t compare(const char *str1, const char *str2)