summaryrefslogtreecommitdiff
path: root/pkgtools/p5-pkgsrc-Dewey/files/Dewey.xs
blob: daaea89ca8b270504e6171b5fccc69f5acebd5b6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
#include "EXTERN.h"
#include "perl.h"
#include "XSUB.h"

#include <lib/dewey.h>

MODULE = pkgsrc::Dewey		PACKAGE = pkgsrc::Dewey		

int
dewey_match(pattern, package)
	const char *	pattern
	const char *	package
    PROTOTYPE: $;$
    OUTPUT:
	RETVAL

int
dewey_cmp(lhs, op, rhs)
	const char *	lhs
	const char *	op
	const char *	rhs
    PROTOTYPE: $;$;$
    INIT:
	int opi;
    CODE:
	if (dewey_mktest(&opi, op) < 0)
		RETVAL = -1;
	else
		RETVAL = dewey_cmp(lhs, opi, rhs);
    OUTPUT:
	RETVAL