chiark / gitweb /
README: Update copyright date
[subdirmk.git] / example / lib / t / toytest.c
1 /*
2  * subdirmk - example code
3  *  Copyright 2019 Mark Wooding
4  * SPDX-License-Identifier: LGPL-2.0-or-later
5  * There is NO WARRANTY.
6  */
7
8 #include <stdio.h>
9 #include <stdlib.h>
10 #include <string.h>
11
12 #include "toylib.h"
13
14 int main(void)
15 {
16   const char *p;
17
18   p = greeting();
19   if (STRNCMP(p, !=, "Hello", 5)) {
20     fprintf(stderr, "greeting `%s' has bad salutation\n", p);
21     exit(1);
22   }
23   printf("all ok\n");
24   return (0);
25 }