xref: /openbsd/regress/lib/libc/getcap/getcaptest.c (revision 09467b48)
1 /*	$OpenBSD: getcaptest.c,v 1.1 2006/03/10 05:28:57 ray Exp $	*/
2 
3 /*
4  * Written by Raymond Lai <ray@cyth.net>.
5  * Public domain.
6  */
7 
8 #include <stdio.h>
9 #include <stdlib.h>
10 
11 int
12 main(int argc, char *argv[])
13 {
14 	char *buf, *db_array[2];
15 
16 	if (argc != 2)
17 		return (1);
18 
19 	db_array[0] = argv[1];
20 	db_array[1] = NULL;
21 
22 	while (cgetnext(&buf, db_array) > 0)
23 		puts(buf);
24 
25 	return (0);
26 }
27