5 KRK_Function(S_ISBLK) {
7 if (!
krk_parseArgs(
"i",(
const char*[]){
"mode"},&mode))
return NONE_VAL();
8 return INTEGER_VAL(S_ISBLK(mode));
10 KRK_Function(S_ISCHR) {
12 if (!
krk_parseArgs(
"i",(
const char*[]){
"mode"},&mode))
return NONE_VAL();
13 return INTEGER_VAL(S_ISCHR(mode));
15 KRK_Function(S_ISDIR) {
17 if (!
krk_parseArgs(
"i",(
const char*[]){
"mode"},&mode))
return NONE_VAL();
18 return INTEGER_VAL(S_ISDIR(mode));
20 KRK_Function(S_ISFIFO) {
22 if (!
krk_parseArgs(
"i",(
const char*[]){
"mode"},&mode))
return NONE_VAL();
23 return INTEGER_VAL(S_ISFIFO(mode));
25 KRK_Function(S_ISREG) {
27 if (!
krk_parseArgs(
"i",(
const char*[]){
"mode"},&mode))
return NONE_VAL();
28 return INTEGER_VAL(S_ISREG(mode));
31 KRK_Function(S_ISLNK) {
33 if (!
krk_parseArgs(
"i",(
const char*[]){
"mode"},&mode))
return NONE_VAL();
34 return INTEGER_VAL(S_ISLNK(mode));
36 KRK_Function(S_ISSOCK) {
38 if (!
krk_parseArgs(
"i",(
const char*[]){
"mode"},&mode))
return NONE_VAL();
39 return INTEGER_VAL(S_ISSOCK(mode));
44 KRK_DOC(module,
"@brief Functions to check results from @ref stat calls.");
46 BIND_FUNC(module,S_ISBLK);
47 BIND_FUNC(module,S_ISCHR);
48 BIND_FUNC(module,S_ISDIR);
49 BIND_FUNC(module,S_ISFIFO);
50 BIND_FUNC(module,S_ISREG);
52 BIND_FUNC(module,S_ISLNK);
53 BIND_FUNC(module,S_ISSOCK);
Utilities for creating native bindings.
#define krk_parseArgs(f, n,...)
Parse arguments to a function while accepting keyword arguments.
#define KRK_DOC(thing, text)
Attach documentation to a thing of various types.
Core API for the bytecode virtual machine.