aboutsummaryrefslogtreecommitdiffstats
path: root/convert-to-enclosed.c
blob: 8127b2f6174f3acf6008f9e243636dd6908829b7 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
/* See LICENSE file for copyright and license details. */
#include "common.h"

USAGE("[-n | -p]");


int
main(int argc, char *argv[])
{
	int negative = 0;

	ARGBEGIN {
	case 'n': negative = 1; break;
	case 'p': negative = 0; break;
	default:
		usage();
	} ARGEND;
	if (argc)
		usage();

	return convert(negative ? &libcharconv_enclosed_negative : &libcharconv_enclosed_positive);
}