aboutsummaryrefslogtreecommitdiff
blob: 91507e035dacb8d965d94a6ac15e2138962278f1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#define FUNC access
#define SFUNC "access"
#define FUNC_STR "\"%s\", %x"
#define FUNC_IMP file, mode
#define ARG_CNT 2
#define ARG_USE "<file> <mode>"

#define process_args() \
	s = argv[i++]; \
	const char *file = f_get_file(s); \
	\
	s = argv[i++]; \
	int mode = 0; \
	if (strchr(s, 'r')) mode |= R_OK; \
	if (strchr(s, 'w')) mode |= W_OK; \
	if (strchr(s, 'x')) mode |= X_OK; \
	if (strchr(s, 'f')) mode  = F_OK;

#include "test-skel-0.c"