chiark
/
gitweb
/
~ian
/
subdirmk.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
Interface: Rename Perdir to Suffix; provide Prefix
[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
*/
6
7
#include <stdio.h>
8
#include <stdlib.h>
9
#include <string.h>
10
11
#include "toylib.h"
12
13
int main(void)
14
{
15
const char *p;
16
17
p = greeting();
18
if (STRNCMP(p, !=, "Hello", 5)) {
19
fprintf(stderr, "greeting `%s' has bad salutation\n", p);
20
exit(1);
21
}
22
printf("all ok\n");
23
return (0);
24
}