chiark
/
gitweb
/
~ian
/
subdirmk.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
1fc5f796da4d1220c9fea40d20e7d4c346454d24
[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
}