1 #include <stdio.h>
2 #include <errno.h>
3 
4 #include <mkc_errc.h>
5 #include <mkc_progname.h>
6 
7 static const char bad_filename[] = "/bad/file.txt";
8 
main(int argc,char ** argv)9 int main (int argc, char **argv)
10 {
11 	setprogname("prog");
12 
13 	FILE *fd = fopen(bad_filename, "r");
14 	if (!fd)
15 		errc(15, errno, "Cannot open file %s", bad_filename);
16 
17 	return 0;
18 }
19