darwin

package
v0.13.5 Latest Latest
Warning

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

Go to latest
Published: Jul 2, 2017 License: MIT Imports: 6 Imported by: 0

Documentation

Overview

Package darwin contains low-level functions for the Darwin (macOS) operating system.

Index

Constants

View Source
const (
	CTYPE_A   = 0x00000100 // Alpha
	CTYPE_C   = 0x00000200 // Control
	CTYPE_D   = 0x00000400 // Digit
	CTYPE_G   = 0x00000800 // Graph
	CTYPE_L   = 0x00001000 // Lower
	CTYPE_P   = 0x00002000 // Punct
	CTYPE_S   = 0x00004000 // Space
	CTYPE_U   = 0x00008000 // Upper
	CTYPE_X   = 0x00010000 // X digit
	CTYPE_B   = 0x00020000 // Blank
	CTYPE_R   = 0x00040000 // Print
	CTYPE_I   = 0x00080000 // Ideogram
	CTYPE_T   = 0x00100000 // Special
	CTYPE_Q   = 0x00200000 // Phonogram
	CTYPE_SW0 = 0x20000000 // 0 width character
	CTYPE_SW1 = 0x40000000 // 1 width character
	CTYPE_SW2 = 0x80000000 // 2 width character
	CTYPE_SW3 = 0xc0000000 // 3 width character
)

Apple defines a bunch of magic values for the type of character, see https://opensource.apple.com/source/Libc/Libc-320/include/ctype.h.auto.html

These are provided as values for method that take _f parameter.

Variables

This section is empty.

Functions

func AssertRtn

func AssertRtn(functionName, filePath []byte, lineNumber int, expression []byte) bool

func BSwap32 added in v0.9.0

func BSwap32(a uint32) uint32

I'm not sure which header file this actually comes from?

func BSwap64 added in v0.9.0

func BSwap64(a uint64) uint64

I'm not sure which header file this actually comes from?

func BuiltinExpect

func BuiltinExpect(a, b int) int

func Fabs

func Fabs(x float64) float64

func Fabsf

func Fabsf(x float32) float32

func Fabsl

func Fabsl(x float64) float64

func Inf

func Inf() float64

func Inff

func Inff() float32

func Infl

func Infl() float64

func IsType added in v0.9.0

func IsType(_c Darwin_ct_rune_t, _f uint32) uint32

IsType replaces __istype(). It should not be strictly necessary but the real __istype() refers to internal darwin state (_DefaultRuneLocale) that is difficult to translate. So for now we will replace it but this could be removed in the future.

There may be multiple bit masks. And yes, I'm sure there is a much better way to handle this, so if you know one please consider putting in a PR :)

func NaN added in v0.13.0

func NaN(s []byte) float64

func Putchar added in v0.9.0

func Putchar(character int)

Types

type C__mbstate_t

type C__mbstate_t int64

FIXME: These are wrong.

type Darwin_ct_rune_t added in v0.9.0

type Darwin_ct_rune_t int

__darwin_ct_rune_t

func IsCType added in v0.9.0

__darwin_ct_rune_t __isctype(__darwin_ct_rune_t, uint32)

func MaskRune added in v0.9.0

func MaskRune(_c Darwin_ct_rune_t, _f uint32) Darwin_ct_rune_t

I have no idea what MaskRune is supposed to do. It is provided internally by darwin.

func ToLower added in v0.9.0

func ToUpper added in v0.9.0

type Double2

type Double2 struct {
	Sinval float64
	Cosval float64
}

func SincosStret

func SincosStret(x float64) Double2

func SincospiStret

func SincospiStret(x float64) Double2

type Float2

type Float2 struct {
	Sinval float32
	Cosval float32
}

func SincosfStret

func SincosfStret(x float32) Float2

func SincospifStret

func SincospifStret(x float32) Float2

Jump to

Keyboard shortcuts

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