1
0
Fork 0
forked from auxolotl/templates
auxolotl-templates/c/main.c
2024-05-06 23:40:01 +02:00

17 lines
395 B
C

#include <stdlib.h>
#include <unistd.h>
#define lengthof(sstr) (sizeof (sstr) / sizeof *(sstr))
#define sstr_len(sstr) (lengthof(sstr) - 1)
#define sstr_unpack(sstr) (sstr), (sstr_len(sstr))
static const char GREETING[] = "hello, world!\n";
int main(void)
{
return (
write(STDOUT_FILENO, sstr_unpack(GREETING))
== sstr_len(GREETING)
) ? EXIT_SUCCESS : EXIT_FAILURE;
}