crt

package module
v2.0.0-alpha.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 26, 2019 License: BSD-3-Clause Imports: 20 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

View Source
var CAPI = map[string]struct{}{}/* 132 elements not displayed */
View Source
var Xstderr = &stderr

Keep these outside of the var block otherwise go generate will miss them.

View Source
var Xstdin = &stdin
View Source
var Xstdout = &stdout

Functions

func Bool32

func Bool32(b bool) int32

func Bool64

func Bool64(b bool) int64

func GoString

func GoString(s Intptr) string

func Start

func Start(main func(*TLS, int32, Intptr) int32)

func VaFloat64

func VaFloat64(app Intptr) float64

func VaInt32

func VaInt32(app Intptr) int32

func VaInt64

func VaInt64(app Intptr) int64

func X_IO_putc

func X_IO_putc(t *TLS, c int32, fp Intptr) int32

int _IO_putc(int c, _IO_FILE *fp);

func X__assert_fail

func X__assert_fail(t *TLS, assertion, file Intptr, line int32, function Intptr)

void __assert_fail(const char * assertion, const char * file, unsigned int line, const char * function);

func Xabort

func Xabort(t *TLS)

void abort(void);

func Xaccess

func Xaccess(t *TLS, pathname Intptr, mode int32) int32

int access(const char *pathname, int mode);

func Xacos

func Xacos(t *TLS, x float64) float64

double acos(double x);

func Xasin

func Xasin(t *TLS, x float64) float64

double asin(double x);

func Xatan

func Xatan(t *TLS, x float64) float64

double atan(double x);

func Xatan2

func Xatan2(t *TLS, x, y float64) float64

double atan2(double y, double x);

func Xatoi

func Xatoi(t *TLS, nptr Intptr) int32

int atoi(const char *nptr);

func Xatol

func Xatol(t *TLS, nptr Intptr) (r long)

long atol(const char *nptr);

func Xbacktrace

func Xbacktrace(t *TLS, buf Intptr, size int32) int32

int backtrace(void **buffer, int size);

func Xceil

func Xceil(t *TLS, x float64) float64

double ceil(double x);

func Xchdir

func Xchdir(t *TLS, path Intptr) int32

int chdir(const char *path);

func Xchmod

func Xchmod(t *TLS, pathname Intptr, mode int32) int32

int chmod(const char *pathname, mode_t mode)

func Xclose

func Xclose(t *TLS, fd int32) int32

int close(int fd);

func Xclosedir

func Xclosedir(t *TLS, dir Intptr) int32

int closedir(DIR *dirp);

func Xcos

func Xcos(t *TLS, x float64) float64

double cos(double x);

func Xcosf

func Xcosf(t *TLS, x float32) float32

float cosf(float x);

func Xcosh

func Xcosh(t *TLS, x float64) float64

double cosh(double x);

func Xdlclose

func Xdlclose(t *TLS, handle Intptr) int32

int dlclose(void *handle);

func Xexit

func Xexit(t *TLS, status int32)

void exit(int status);

func Xexp

func Xexp(t *TLS, x float64) float64

double exp(double x);

func Xfabs

func Xfabs(t *TLS, x float64) float64

double fabs(double x);

func Xfabsf

func Xfabsf(t *TLS, x float32) float32

float fabs(float x);

func Xfchmod

func Xfchmod(t *TLS, fd, mode int32) int32

int fchmod(int fd, mode_t mode);

func Xfchown

func Xfchown(t *TLS, fd, owner, grout int32) int32

int fchown(int fd, uid_t owner, gid_t group);

func Xfclose

func Xfclose(t *TLS, stream Intptr) int32

int fclose(FILE *stream);

func Xfcntl

func Xfcntl(t *TLS, fd, cmd int32, args uintptr) int32

int fcntl(int fd, int cmd, ... /* arg */ );

func Xfflush

func Xfflush(t *TLS, stream Intptr) int32

int fflush(FILE *stream);

func Xfgetc

func Xfgetc(t *TLS, stream Intptr) int32

int fgetc(FILE *stream);

func Xfloor

func Xfloor(t *TLS, x float64) float64

double floor(double x);

func Xfmod

func Xfmod(t *TLS, x, y float64) float64

double fmod(double x, double y);

func Xfprintf

func Xfprintf(t *TLS, stream, format Intptr, args uintptr) int32

int fprintf(FILE *stream, const char *format, ...);

func Xfputc

func Xfputc(t *TLS, c int32, stream Intptr) int32

int fputc(int c, FILE *stream);

func Xfputs

func Xfputs(t *TLS, s, stream Intptr) int32

int fputs(const char *s, FILE *stream);

func Xfree

func Xfree(t *TLS, ptr Intptr)

void free(void *ptr);

func Xfseek

func Xfseek(t *TLS, stream Intptr, offset long, whence int32) int32

int fseek(FILE *stream, long offset, int whence);

func Xfstat64

func Xfstat64(t *TLS, fd int32, statbuf Intptr) int32

int fstat(int fd, struct stat *statbuf);

func Xfsync

func Xfsync(t *TLS, fd int32) int32

int fsync(int fd);

func Xftell

func Xftell(t *TLS, stream Intptr) long

long ftell(FILE *stream);

func Xftruncate64

func Xftruncate64(t *TLS, fd int32, length int64) int32

int ftruncate(int fd, off_t length);

func Xgeteuid

func Xgeteuid(t *TLS) int32

uid_t geteuid(void);

func Xgetpid

func Xgetpid(t *TLS) int32

pid_t getpid(void);

func Xgetrusage

func Xgetrusage(t *TLS, who int32, usage Intptr) int32

int getrusage(int who, struct rusage *usage);

func Xgettimeofday

func Xgettimeofday(t *TLS, tv, tz Intptr) int32

int gettimeofday(struct timeval *tv, struct timezone *tz);

func Xgetuid

func Xgetuid(t *TLS) int32

uid_t getuid(void);

func Xisatty

func Xisatty(t *TLS, fd int32) int32

int isatty(int fd);

func Xlog

func Xlog(t *TLS, x float64) float64

double log(double x);

func Xlog10

func Xlog10(t *TLS, x float64) float64

double log10(double x);

func Xlseek64

func Xlseek64(t *TLS, fd int32, offset int64, whence int32) int64

off64_t lseek64(int fd, off64_t offset, int whence);

func Xlstat64

func Xlstat64(t *TLS, pathname, stat Intptr) int32

int lstat(const char *pathname, struct stat *statbuf);

func Xmemcmp

func Xmemcmp(t *TLS, s1, s2, n Intptr) int32

int memcmp(const void *s1, const void *s2, size_t n);

func Xmkdir

func Xmkdir(t *TLS, path Intptr, mode int32) int32

int mkdir(const char *path, mode_t mode);

func Xmunmap

func Xmunmap(t *TLS, addr, length Intptr) int32

int munmap(void *addr, size_t length);

func Xopen64

func Xopen64(t *TLS, pathname Intptr, flags int32, args uintptr) int32

int open(const char *pathname, int flags, ...);

func Xpclose

func Xpclose(t *TLS, stream Intptr) int32

int pclose(FILE *stream);

func Xperror

func Xperror(t *TLS, s Intptr)

void perror(const char *s);

func Xpow

func Xpow(t *TLS, x, y float64) float64

double pow(double x, double y);

func Xprintf

func Xprintf(t *TLS, s Intptr, args uintptr) int32

int printf(const char *format, ...);

func Xputchar

func Xputchar(t *TLS, c int32) int32

int putchar(int c);

func Xputs

func Xputs(t *TLS, s Intptr) int32

int puts(const char *s);

func Xqsort

func Xqsort(t *TLS, base, nmemb, size, compar Intptr)

void qsort(void *base, size_t nmemb, size_t size, int (*compar)(const void *, const void *));

func Xraise

func Xraise(t *TLS, sig int32) int32

int raise(int sig);

func Xrand

func Xrand(t *TLS) int32

int rand(void);

func Xrewind

func Xrewind(t *TLS, stream Intptr)

void rewind(FILE *stream);

func Xrmdir

func Xrmdir(t *TLS, pathname Intptr) int32

int rmdir(const char *pathname);

func Xround

func Xround(t *TLS, x float64) float64

double round(double x);

func Xsetvbuf

func Xsetvbuf(t *TLS, stream, buf Intptr, mode int32, size Intptr) int32

int setvbuf(FILE *stream, char *buf, int mode, size_t size);

func Xsin

func Xsin(t *TLS, x float64) float64

double sin(double x);

func Xsinf

func Xsinf(t *TLS, x float32) float32

float sinf(float x);

func Xsinh

func Xsinh(t *TLS, x float64) float64

double sinh(double x);

func Xsleep

func Xsleep(t *TLS, seconds int32) int32

unsigned int sleep(unsigned int seconds);

func Xsprintf

func Xsprintf(t *TLS, str, format Intptr, args uintptr) (r int32)

int sprintf(char *str, const char *format, ...);

func Xsqrt

func Xsqrt(t *TLS, x float64) float64

double sqrt(double x);

func Xstat64

func Xstat64(t *TLS, pathname, stat Intptr) int32

int stat(const char *pathname, struct stat *statbuf);

func Xstrcmp

func Xstrcmp(t *TLS, s1, s2 Intptr) int32

int strcmp(const char *s1, const char *s2)

func Xstrncmp

func Xstrncmp(t *TLS, s1, s2, n Intptr) int32

int strncmp(const char *s1, const char *s2, size_t n)

func Xstrtol

func Xstrtol(t *TLS, nptr, endptr Intptr, base int32) long

long int strtol(const char *nptr, char **endptr, int base);

func Xsymlink(t *TLS, target, linkpath Intptr) int32

int symlink(const char *target, const char *linkpath);

func Xsysconf

func Xsysconf(t *TLS, name int32) long

long sysconf(int name);

func Xsystem

func Xsystem(t *TLS, command Intptr) int32

int system(const char *command);

func Xtan

func Xtan(t *TLS, x float64) float64

double tan(double x);

func Xtanh

func Xtanh(t *TLS, x float64) float64

double tanh(double x);

func Xtolower

func Xtolower(t *TLS, c int32) int32

int tolower(int c);

func Xtoupper

func Xtoupper(t *TLS, c int32) int32

int toupper(int c);

func Xunlink(t *TLS, pathname Intptr) int32

int unlink(const char *pathname);

func Xusleep

func Xusleep(t *TLS, usec int32) int32

int usleep(useconds_t usec);

func Xutimes

func Xutimes(t *TLS, filename, times Intptr) int32

int utimes(const char *filename, const struct timeval times[2]);

func Xvfprintf

func Xvfprintf(t *TLS, stream, format, ap Intptr) int32

int vfprintf(FILE *stream, const char *format, va_list ap);

func Xvprintf

func Xvprintf(t *TLS, s, ap Intptr) int32

int vprintf(const char *format, va_list ap);

Types

type Intptr

type Intptr = int64

func CString

func CString(s string) (Intptr, error)

func X__ctype_b_loc

func X__ctype_b_loc(t *TLS) Intptr

func X__errno_location

func X__errno_location(t *TLS) Intptr

int * __errno_location(void);

func Xcalloc

func Xcalloc(t *TLS, n, size Intptr) Intptr

void *calloc(size_t nmemb, size_t size);

func Xdlerror

func Xdlerror(t *TLS) Intptr

char *dlerror(void);

func Xdlopen

func Xdlopen(t *TLS, filename Intptr, flags int32) Intptr

void *dlopen(const char *filename, int flags);

func Xdlsym

func Xdlsym(t *TLS, handle, symbol Intptr) Intptr

void *dlsym(void *handle, const char *symbol);

func Xfgets

func Xfgets(t *TLS, s Intptr, size int32, stream Intptr) Intptr

char *fgets(char *s, int size, FILE *stream);

func Xfopen

func Xfopen(t *TLS, pathname, mode Intptr) Intptr

FILE *fopen(const char *pathname, const char *mode);

func Xfopen64

func Xfopen64(t *TLS, pathname, mode Intptr) Intptr

FILE *fopen64(const char *pathname, const char *mode);

func Xfread

func Xfread(t *TLS, ptr, size, nmemb, stream Intptr) Intptr

size_t fread(void *ptr, size_t size, size_t nmemb, FILE *stream);

func Xfwrite

func Xfwrite(t *TLS, ptr, size, nmemb, stream Intptr) Intptr

size_t fwrite(const void *ptr, size_t size, size_t nmemb, FILE *stream);

func Xgetcwd

func Xgetcwd(t *TLS, buf, size Intptr) Intptr

char *getcwd(char *buf, size_t size);

func Xgetenv

func Xgetenv(t *TLS, name Intptr) Intptr

char *getenv(const char *name);

func Xgetpwuid

func Xgetpwuid(t *TLS, uid int32) Intptr

struct passwd *getpwuid(uid_t uid);

func Xlocaltime

func Xlocaltime(t *TLS, timep Intptr) Intptr

struct tm *localtime(const time_t *timep);

func Xmalloc

func Xmalloc(t *TLS, size Intptr) Intptr

void *malloc(size_t size);

func Xmemcpy

func Xmemcpy(t *TLS, dest, src, n Intptr) (r Intptr)

void *memcpy(void *dest, const void *src, size_t n);

func Xmemmove

func Xmemmove(t *TLS, dest, src, n Intptr) Intptr

void *memmove(void *dest, const void *src, size_t n);

func Xmemset

func Xmemset(t *TLS, s Intptr, c int32, n Intptr) Intptr

void *memset(void *s, int c, size_t n)

func Xmmap64

func Xmmap64(t *TLS, addr, length Intptr, prot, flags, fd int32, offset int64) Intptr

void *mmap(void *addr, size_t length, int prot, int flags, int fd, off_t offset);

func Xopendir

func Xopendir(t *TLS, dir Intptr) Intptr

DIR *opendir(const char *name);

func Xpopen

func Xpopen(t *TLS, command, typ Intptr) Intptr

FILE *popen(const char *command, const char *type);

func Xread

func Xread(t *TLS, fd int32, buf, count Intptr) Intptr

ssize_t read(int fd, void *buf, size_t count);

func Xreaddir64

func Xreaddir64(t *TLS, dir Intptr) Intptr

struct dirent *readdir(DIR *dirp);

func Xreadlink(t *TLS, path, buf, bufsize Intptr) Intptr

ssize_t readlink(const char *restrict path, char *restrict buf, size_t bufsize);

func Xrealloc

func Xrealloc(t *TLS, ptr, size Intptr) Intptr

void *realloc(void *ptr, size_t size);

func Xsignal

func Xsignal(t *TLS, signum int32, handler Intptr) Intptr

sighandler_t signal(int signum, sighandler_t handler);

func Xstrcat

func Xstrcat(t *TLS, dest, src Intptr) Intptr

char *strcat(char *dest, const char *src)

func Xstrchr

func Xstrchr(t *TLS, s Intptr, c int32) Intptr

char *strchr(const char *s, int c)

func Xstrcpy

func Xstrcpy(t *TLS, dest, src Intptr) Intptr

char *strcpy(char *dest, const char *src)

func Xstrcspn

func Xstrcspn(t *TLS, s, reject Intptr) (r Intptr)

size_t strcspn(const char *s, const char *reject);

func Xstrdup

func Xstrdup(t *TLS, s Intptr) Intptr

char *strdup(const char *s);

func Xstrerror

func Xstrerror(t *TLS, errnum int32) Intptr

char *strerror(int errnum);

func Xstrlen

func Xstrlen(t *TLS, s Intptr) Intptr

size_t strlen(const char *s)

func Xstrncpy

func Xstrncpy(t *TLS, dest, src, n Intptr) Intptr

char *strncpy(char *dest, const char *src, size_t n)

func Xstrrchr

func Xstrrchr(t *TLS, s Intptr, c int32) Intptr

char *strrchr(const char *s, int c)

func Xstrstr

func Xstrstr(t *TLS, haystack, needle Intptr) Intptr

char *strstr(const char *haystack, const char *needle);

func Xtime

func Xtime(t *TLS, tloc Intptr) Intptr

time_t time(time_t *tloc);

func Xwrite

func Xwrite(t *TLS, fd int32, buf, count Intptr) Intptr

ssize_t write(int fd, const void *buf, size_t count);

type RawMem

type RawMem [1<<50 - 1]byte

type TLS

type TLS struct {
	ID int32
	// contains filtered or unexported fields
}

func NewTLS

func NewTLS() *TLS

func (*TLS) Alloc

func (t *TLS) Alloc(n int) (r uintptr)

func (*TLS) DynAlloc

func (t *TLS) DynAlloc(a *[]uintptr, n uintptr) uintptr

func (*TLS) Free

func (t *TLS) Free(n int)

func (*TLS) FreeList

func (t *TLS) FreeList(a []uintptr)

Directories

Path Synopsis
libc
pwd

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL