Idris2/support/c/idris_support.h

28 lines
627 B
C
Raw Normal View History

#pragma once
2020-05-18 16:51:10 +03:00
// Return non-zero if the pointer is null
2022-09-21 13:13:15 +03:00
int idris2_isNull(void *);
// Returns a NULL
void *idris2_getNull();
2020-05-18 16:51:10 +03:00
// Convert a Ptr String intro a String, assuming the string has been checked
// to be non-null
2022-09-21 13:13:15 +03:00
char *idris2_getString(void *p);
2020-05-18 16:51:10 +03:00
int idris2_getErrno();
2022-09-21 13:13:15 +03:00
char *idris2_strerror(int errnum);
2020-05-18 16:51:10 +03:00
2022-09-21 13:13:15 +03:00
char *idris2_getStr();
void idris2_putStr(char *f);
2020-05-18 16:51:10 +03:00
void idris2_sleep(int sec);
void idris2_usleep(int usec);
int idris2_time();
2021-05-17 16:07:53 +03:00
int idris2_getArgCount();
void idris2_setArgs(int argc, char *argv[]);
2022-09-21 13:13:15 +03:00
char *idris2_getArg(int n);
char *idris2_getEnvPair(int i);
2020-05-18 16:51:10 +03:00
2021-05-25 18:45:46 +03:00
int idris2_getPID();
long idris2_getNProcessors();