c

package
v0.9.7 Latest Latest
Warning

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

Go to latest
Published: Aug 31, 2024 License: Apache-2.0 Imports: 2 Imported by: 13

Documentation

Index

Constants

View Source
const (
	LLGoPackage = "decl"
)

Variables

This section is empty.

Functions

func Advance

func Advance[PtrT any, I integer](ptr PtrT, offset I) PtrT

llgo:link Advance llgo.advance

func AllocaNew added in v0.9.0

func AllocaNew[T any]() *T

TODO(xsw): llgo:link AllocaNew llgo.allocaNew

func Exit added in v0.7.0

func Exit(Int)

func Fread added in v0.9.7

func Fread(data Pointer, size, count uintptr, fp FilePtr) uintptr

func Free added in v0.8.6

func Free(ptr Pointer)

func Fwrite added in v0.8.5

func Fwrite(data Pointer, size, count uintptr, fp FilePtr) uintptr

func GoString added in v0.8.9

func GoString(cstr *Char, __llgo_va_list ...any) string

GoString converts a C string to a Go string. TODO(xsw): any => int

func Index added in v0.7.0

func Index[T any, I integer](ptr *T, offset I) T

llgo:link Index llgo.index

func Perror added in v0.9.1

func Perror(s *Char)

func Qsort

func Qsort(base Pointer, count, elem uintptr, compar func(a, b Pointer) Int)

func Siglongjmp added in v0.8.7

func Siglongjmp(jb Pointer, retval Int)

func Strlen added in v0.8.9

func Strlen(s *Char) uintptr

func Unreachable

func Unreachable()

Types

type Char

type Char = int8
var Argv **Char
var Optarg *Char

func AllocaCStr

func AllocaCStr(s string) *Char

func AllocaCStrs added in v0.9.1

func AllocaCStrs(strs []string, endWithNil bool) **Char

func GoStringData added in v0.7.0

func GoStringData(string) *Char

func Str

func Str(string) *Char

func Strcat added in v0.8.9

func Strcat(dst, src *Char) *Char

func Strchr added in v0.8.9

func Strchr(s *Char, c Int) *Char

func Strcpy added in v0.8.9

func Strcpy(dst, src *Char) *Char

func Strdup added in v0.8.9

func Strdup(s *Char) *Char

func Strerror added in v0.8.9

func Strerror(errnum Int) *Char

func Strncat added in v0.8.9

func Strncat(dst, src *Char, n uintptr) *Char

func Strncpy added in v0.8.9

func Strncpy(dst, src *Char, n uintptr) *Char

func Strndup added in v0.8.9

func Strndup(s *Char, n uintptr) *Char

func Strrchr added in v0.8.9

func Strrchr(s *Char, c Int) *Char

func Strstr added in v0.8.9

func Strstr(s1, s2 *Char) *Char

func Strtok added in v0.8.9

func Strtok(s, delim *Char) *Char

type Double added in v0.8.3

type Double = float64

type FilePtr

type FilePtr = unsafe.Pointer
var Stderr FilePtr
var Stdin FilePtr
var Stdout FilePtr

func Fopen added in v0.9.1

func Fopen(c *Char, mod *Char) FilePtr

type Float added in v0.7.0

type Float = float32

type Int

type Int C.int
var Argc Int
var Opterr Int
var Optind Int
var Optopt Int

func Atoi added in v0.8.7

func Atoi(s *Char) Int

func Fclose added in v0.9.1

func Fclose(fp FilePtr) Int

func Fflush added in v0.8.6

func Fflush(fp FilePtr) Int

func Fprintf

func Fprintf(fp FilePtr, format *Char, __llgo_va_list ...any) Int

func Fputc added in v0.8.5

func Fputc(c Int, fp FilePtr) Int

func Fputs added in v0.8.6

func Fputs(s *Char, fp FilePtr) Int

func Getopt added in v0.7.0

func Getopt(argc Int, argv **Char, optstring *Char) Int

func GetoptLong added in v0.7.0

func GetoptLong(argc Int, argv **Char, optstring *Char, longopts *Option, longindex *Int) Int

func GetoptLongOnly added in v0.7.0

func GetoptLongOnly(argc Int, argv **Char, optstring *Char, longopts *Option, longindex *Int) Int

func Memcmp added in v0.8.9

func Memcmp(s1, s2 Pointer, n uintptr) Int

func Printf

func Printf(format *Char, __llgo_va_list ...any) Int

func Rand

func Rand() Int

func Sigsetjmp added in v0.8.7

func Sigsetjmp(jb Pointer, savemask Int) Int

func Snprintf added in v0.8.9

func Snprintf(s *Char, n uintptr, format *Char, __llgo_va_list ...any) Int

func Sprintf added in v0.8.9

func Sprintf(s *Char, format *Char, __llgo_va_list ...any) Int

func Strcmp added in v0.8.9

func Strcmp(s1, s2 *Char) Int

func Strncmp added in v0.8.9

func Strncmp(s1, s2 *Char, n uintptr) Int

func Usleep added in v0.8.6

func Usleep(useconds Uint) Int

func Vsnprintf added in v0.8.9

func Vsnprintf(s *Char, n uintptr, format *Char, ap Pointer) Int

type Long added in v0.8.2

type Long C.long

type LongLong added in v0.8.2

type LongLong C.longlong

type Option added in v0.7.0

type Option struct {
	Name   *Char
	HasArg Int
	Flag   *Int
	Val    Int
}

type Pointer

type Pointer = unsafe.Pointer

func Alloca

func Alloca(size uintptr) Pointer

func AllocaSigjmpBuf added in v0.8.7

func AllocaSigjmpBuf() Pointer

func Calloc added in v0.9.5

func Calloc(num uintptr, size uintptr) Pointer

func Func added in v0.8.9

func Func(any) Pointer

func GoDeferData added in v0.8.8

func GoDeferData() Pointer

func Malloc

func Malloc(size uintptr) Pointer

func Memchr added in v0.8.9

func Memchr(s Pointer, c Int, n uintptr) Pointer

func Memcpy

func Memcpy(dst, src Pointer, n uintptr) Pointer

func Memmove added in v0.8.8

func Memmove(dst, src Pointer, n uintptr) Pointer

func Memset

func Memset(s Pointer, c Int, n uintptr) Pointer

type Uint added in v0.7.0

type Uint C.uint

type Ulong added in v0.8.2

type Ulong C.ulong

type UlongLong added in v0.8.2

type UlongLong C.ulonglong

type Void added in v0.9.3

type Void = [0]byte

Jump to

Keyboard shortcuts

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