Blame


1 8951cb19 2022-07-01 op /*
2 8951cb19 2022-07-01 op * Copyright (c) 2015 Ingo Schwarze <schwarze@openbsd.org>
3 8951cb19 2022-07-01 op *
4 8951cb19 2022-07-01 op * Permission to use, copy, modify, and distribute this software for any
5 8951cb19 2022-07-01 op * purpose with or without fee is hereby granted, provided that the above
6 8951cb19 2022-07-01 op * copyright notice and this permission notice appear in all copies.
7 8951cb19 2022-07-01 op *
8 8951cb19 2022-07-01 op * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
9 8951cb19 2022-07-01 op * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
10 8951cb19 2022-07-01 op * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
11 8951cb19 2022-07-01 op * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
12 8951cb19 2022-07-01 op * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
13 8951cb19 2022-07-01 op * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
14 8951cb19 2022-07-01 op * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
15 8951cb19 2022-07-01 op */
16 8951cb19 2022-07-01 op
17 8951cb19 2022-07-01 op #include <err.h>
18 8951cb19 2022-07-01 op #include <errno.h>
19 8951cb19 2022-07-01 op
20 8951cb19 2022-07-01 op int
21 8951cb19 2022-07-01 op main(void)
22 8951cb19 2022-07-01 op {
23 8951cb19 2022-07-01 op warnx("%d. warnx", 1);
24 8951cb19 2022-07-01 op warnc(ENOENT, "%d. warn", ENOENT);
25 8951cb19 2022-07-01 op warn("%d. warn", 2);
26 8951cb19 2022-07-01 op err(0, "%d. err", 3);
27 8951cb19 2022-07-01 op errx(0, "%d. err", 3);
28 8951cb19 2022-07-01 op errc(0, ENOENT, "%d. err", 3);
29 8951cb19 2022-07-01 op /* NOTREACHED */
30 8951cb19 2022-07-01 op return 1;
31 8951cb19 2022-07-01 op }