Package libowfat-devel

Development files for libowfat (Static library only)

http://www.fefe.de/libowfat/

This package contains libraries and header files for
developing applications that use libowfat.

Library Functions (Section 3)
array
An allocated array variable keeps track of
array_allocate
array_allocate makes sure that enough bytes are allocated in x for at least pos+1 objects of type t. (The size of t must be positive; otherwise the effects are...
array_bytes
array_bytes returns the number of initialized bytes in x, without regard to t. If x is unallocated, array_length and array_bytes return 0.
array_cat
array_cat appends y to x; i.e., it changes x, allocating more space if necessary, so that the initialized bytes in x are the previously initialized bytes in x...
array_cat0
array_cat0 appends a 0-byte to the array x. array_cat0 handles failure in the same way as array_cat.
array_catb
array_catb appends the bytes y[0], y[1], ..., y[len-1] to the array x. It handles failure in the same way as array_cat.
array_cate
array_cate is like array_cat, but uses only byte positions pos through stop-1 in y. It fails if pos negative, or if stop is smaller than pos, or if the number...
array_cats
array_cats appends the contents of the 0-terminated string y, not including the terminating 0 byte, to the array x. array_cats handles failure in the same way...
array_cats0
array_cats0 appends the contents of the 0-terminated string y, including the terminating 0 byte, to the array x. array_cats0 handles failure in the same way as...
array_equal
array_equal returns nonzero if x and y have the same contents: i.e.,
array_fail
If x is allocated, array_fail frees the region that x points to, and switches x to have failed. If x is unallocated, array_fail simply switches x to have...
array_get
array_get is similar to array_allocate, but it does not allocate any extra bytes, and it does not initialize any extra bytes. It returns 0 if x is unallocated...
array_length
array_length returns the number of initialized bytes in x, divided by the size of t. In other words, array_get will succeed for positions 0 through...
array_reset
If x is allocated, array_reset frees the region that x points to, and switches x to being unallocated. If x x has failed, array_reset simply switches x to being...
array_start
array_start is the same as array_get with pos equal to 0.
array_trunc
array_trunc is the same as array_truncate with len equal to 0.
array_truncate
array_truncate reduces the number of initialized bytes in x to exactly len*sizeof(t). If the number of initialized bytes was already this small (or smaller)...
buffer
buffer.h provides a generic buffer interface that can be used for read and write buffering. Buffers must be initialized with buffer_init. A buffer can only be...
buffer_close
buffer_close close the file associated with the buffer and frees/unmaps the memory associated with the buffer if buffer_init_free or buffer_mmapread were used.
buffer_feed
If the string is nonempty, buffer_feed returns the length of the string. If the string is empty, buffer_feed uses the read operation to feed data into the...
buffer_flush
buffer_flush feeds a string d[0], d[1], ..., d[dlen-1] to the write operation by calling op(fd,d,dlen) If op successfully handles one or more bytes at the...
buffer_fromarray
buffer_fromarray makes a virtual read buffer from an array. The buffer reading functions will be able to read until the end of the data in the array, then...
buffer_frombuf
buffer_frombuf makes a virtual read buffer from a raw memory area. The buffer reading functions will be able to read until the end of the data in the memory...
buffer_fromsa
buffer_fromsa makes a virtual read buffer from a stralloc. The buffer reading functions will be able to read until the end of the data in the stralloc, then...
buffer_get
Normally buffer_get copies data to x[0], x[1], ..., x[len-1] from the beginning of a string stored in preallocated space; removes these len bytes from the...
buffer_getc
buffer_getc(b,x) is similar to buffer_get(b,x,1).
buffer_getline
buffer_getline copies data from b to x[0], x[1], ..., x[len-1] until len bytes have been copied or a new-line character ('\n') is encountered. That character is...
buffer_getline_sa
buffer_getline_sa appends data from the b to sa until a '\n' is found, NOT overwriting the previous content of sa. The new-line is also appended to sa. If...
buffer_getn
buffer_getn copies data to x[0], x[1], ..., x[len-1] from the buffer, calling buffer_feed as needed, and returns len. If a read error occurs, buffer_getn...
buffer_getnewline_sa
buffer_getnewline_sa copies data from the b to sa until a '\n' is found, overwriting the previous content of sa. The new-line is also appended to sa. If reading...
buffer_get_new_token_sa
buffer_get_new_token_sa copies data from the b to sa until one of the delimiters in charset is found, overwriting the previous content of sa. That delimiter is...
buffer_get_new_token_sa_pred
buffer_get_token_sa_pred copies data from b to sa until predicate(sa) returns 1 or -1. If predicate returns 1 once a '\n' was read, that new-line character is...
buffer_get_token
buffer_get_token copies data from b to x[0], x[1], ..., x[len-1] until len bytes have been copied or one of charset[0], charset[1], ..., charset[setlen] equals...
buffer_get_token_pred
buffer_get_token_pred copies data from b to x[0], x[1], ..., x[len-1] until len bytes have been read or predicate called on the destination string returns...
buffer_get_token_sa
buffer_get_token_sa appends data from the b to sa until one of the delimiters in charset is found, NOT overwriting the previous content of sa. That delimiter is...
buffer_get_token_sa_pred
buffer_get_token_sa_pred appends data from b to sa until predicate(sa) returns 1 or -1. If predicate returns 1 once a '\n' was read, that new-line character is...
buffer_init
buffer_init prepares b to store a string in y[0], y[1], ..., y[ylen-1]. Initially the string is empty. buffer_init also prepares b to use the read/write...
buffer_init_free
buffer_init_free is like buffer_init except that the memory (y is marked to be freed by buffer_close().
buffer_mmapread
buffer_mmapread opens filename for reading and fills b so that the contents of the file can be read from it. Using mmap is more efficient than reading through a...
buffer_peek
buffer_peek returns a pointer to the first byte of the string in the buffer.
buffer_put
buffer_put writes len bytes from x to b. The difference to buffer_putalign is that, when there isn't enough space for new data, buffer_put calls buffer_flush...
buffer_put8long
buffer_put8long is similar to passing the result of fmt_8long to buffer_put.
buffer_putalign
buffer_putalign is similar to buffer_put. The difference to buffer_put is that, when there isn't enough space for new data, buffer_put calls buffer_flush before...
buffer_puterror
buffer_puterror is equivalent to calling buffer_puterror2 with errno.
buffer_puterror2
buffer_puterror2 writes the error message corresponding to the error number in errnum to the buffer (e.g. "No such file or directory" for ENOENT).
buffer_putflush
buffer_putflush is similar to calling buffer_put(b,x,len) and then buffer_flush(b).
buffer_putlong
buffer_putlong is similar to passing the result of fmt_long to buffer_put.
buffer_putlonglong
buffer_putlonglong is equivalent to passing the result of fmt_longlong to buffer_put.
buffer_putm
buffer_putm is like buffer_puts, but it can be passed more than one string.
buffer_putnlflush
buffer_putnlflush writes a single ASCII new-line character ('\n') to b and calls buffer_flush(b).
buffer_puts
buffer_puts is like buffer_put with len determined as the number of bytes before the first \0 in x. The difference to buffer_putsalign is that, when there isn't...
buffer_putsa
buffer_putsa is equivalent to buffer_put(b,x.s,x.len).
buffer_putsaflush
buffer_putsaflush is equivalent to buffer_putflush(b,x.s,x.len).
buffer_putsalign
buffer_putsalign is like buffer_putalign with len determined as the number of bytes before the first \0 in x.
buffer_putsflush
buffer_putsflush is like buffer_putflush with len determined as the number of bytes before the first \0 in x.
buffer_putspace
buffer_putspace writes a single ASCII space character to b.
buffer_putulong
buffer_putulong is similar to passing the result of fmt_ulong to buffer_put.
buffer_putulonglong
buffer_putulonglong is equivalent to passing the result of fmt_ulonglong to buffer_put.
buffer_putxlong
buffer_putxlong is similar to passing the result of fmt_xlong to buffer_put.
buffer_seek
buffer_seek removes r bytes from the beginning of the string. r must be at most the current length of the string.
buffer_tosa
buffer_tosa makes a virtual write buffer from a stralloc. The buffer writing functions will append data to the stralloc until the stralloc fails to allocate...
byte_chr
byte_chr returns the smallest integer i between 0 and len-1 inclusive such that one[i] equals needle. If no such integer exists, byte_chr returns len. byte_chr...
byte_copy
byte_copy copies in[0] to out[0], in[1] to out[1], etc., and finally in[len-1] to out[len-1].
byte_copyr
byte_copyr copies in[len-1] to out[len-1], in[len-2] to out[len-2], etc., and in[0] to out[0].
byte_diff
byte_diff returns negative, 0, or positive, depending on whether the string one[0], one[1], ..., one[len-1] is lexicographically smaller than, equal to, or...
byte_equal
byte_equal returns 1 if the strings are equal, 0 otherwise. When the strings are different, byte_equal does not read bytes past the first difference.
byte_rchr
byte_chr returns the largest integer i between 0 and len-1 inclusive such that one[i] equals needle. If no such integer exists, byte_chr returns len. byte_rchr...
byte_zero
byte_zero sets out[0], out[1], ..., out[len-1] to 0.
case_diffb
case_diffb is similar to byte_diff. The difference is that for the comparison 'A' == 'a', 'B' == 'b', ..., 'Z' == 'z'.
case_diffs
case_diffs is similar to str_diff. The difference is that for the comparison 'A' == 'a', 'B' == 'b', ..., 'Z' == 'z'.
case_lowerb
case_lowerb converts each 'A' to 'a', 'B' to 'b', ..., 'Z' to 'z' in s[0], s[1], ..., s[len].
case_lowers
case_lowers converts each 'A' to 'a', 'B' to 'b', ..., 'Z' to 'z' for each character in s until the first \0.
case_starts
case_starts returns 1 if b is a prefix of a, 0 otherwise. For this comparison, 'A' == 'a', 'B' == 'b', ..., 'Z' == 'z'.
cdb_datalen
cdb_datalen returns the length of the data associated with the last key you looked up with cdb_find or cdb_findnext. Use cdb_datapos to get the position of the...
cdb_datapos
cdb_datapos returns the position of the data associated with the last key you looked up using cdb_find or cdb_findnext. Use cdb_datalen to get the length of the...
cdb_find
cdb_find looks for key. If cdb_find returns 0, the database does not contain that key; stop. If cdb_find returns -1, there was a read error; abort. cdb_datalen...
cdb_firstkey
cdb_firstkey finds the physically first record in the constant database. You can use cdb_datapos or cdb_keypos to get position and cdb_datalen and cdb_keylen to...
cdb_free
cdb_free removes any memory mapping that cdb_init might have established. It will not close the file descriptor that you passed to cdb_init or attempt to call...
cdb_init
cdb_init places information about fd into a struct cdb variable c. fd has to be a seekable file previously opened for reading. On systems that support mmap...
cdb_keylen
cdb_keylen returns the length of the key cdb_firstkey or cdb_nextkey found. Use cdb_keypos to get the position of the key.
cdb_keypos
cdb_keypos returns the position of the key cdb_firstkey or cdb_nextkey found. Use cdb_keylen to get the length of the key.
cdb_nextkey
cdb_nextkey finds the next physical record in the constant database. You can use cdb_datapos or cdb_keypos to get position and cdb_datalen and cdb_keylen to get...
cdb_read
cdb_read reads len bytes starting at position from c to buf. You can use cdb_datapos or cdb_keypos to get position and cdb_datalen and cdb_keylen to get len...
cdb_successor
cdb_successor finds the record that follows key. If key is NULL, cdb_successor finds the first record. NOTE! The database must not contain keys with more than...
critbit0_allprefixed
critbit0_allprefixed calls the handle function on all members of cb that start with prefix. It passes arg as second argument to handle. If handle returns 0, the...
critbit0_clear
critbit0_clear deletes all keys in cb and frees all memory associated with it.
critbit0_contains
critbit0_contains looks up the given string in the critbit0 tree. If str is in cb, critbit0_contains returns 1. Otherwise it returns 0.
critbit0_delete
critbit0_delete attempts to delete a string from a critbit0 tree. If str is in cb, critbit0_delete removes it and returns 1. If str is not in cb...
critbit0_insert
critbit0_insert attempts to insert a string into a critbit0 tree. For this it does not insert a copy of the pointer but makes a copy of the whole string. If str...
dns_ip4
dns_ip4 looks up 4-byte IP addresses for the fully-qualified domain name in fqdn. It puts the concatenation of the IP addresses into out and returns 0. If the...
dns_ip4_packet
dns_ip4_packet is a low-level component of dns_ip4, designed to support asynchronous DNS lookups. It reads a DNS packet of length len from buf, extracts IP...
dns_ip4_qualify
dns_ip4_qualify feeds the name udn through qualification and looks up 4-byte IP addresses for the result. It puts the fully qualified domain name into fqdn...
dns_ip6
dns_ip6 looks up 16-byte IPv6 addresses for the fully-qualified domain name in fqdn. It puts the concatenation of the IPv6 addresses into out and returns 0. If...
dns_ip6_packet
dns_ip6_packet is a low-level component of dns_ip6, designed to support asynchronous DNS lookups. It reads a DNS packet of length len from buf, extracts IPv4...
dns_ip6_qualify
dns_ip6_qualify feeds the name udn through qualification and looks up 16-byte IPv6 addresses for the result. It puts the fully qualified domain name into fqdn...
dns_mx
dns_mx looks up MX records for the fully-qualified domain name in fqdn. It puts the MX records into out and returns 0. Each MX record is a two-byte MX distance...
dns_mx_packet
dns_mx_packet is a low-level component of dns_mx, designed to support asynchronous DNS lookups. It reads a DNS packet of length len from buf, extracts the MX...
dns_name4
dns_name4 looks up the domain name for the 4-byte IP address in ip. It puts the (first) domain name into out and returns 0. If the relevant in-addr.arpa domain...
dns_name4_domain
dns_name4_domain is a low-level component of dns_name4. It converts an IP address such as 1.2.3.4 into a domain name such as 4.3.2.1.in-addr.arpa and places the...
dns_name6
dns_name6 looks up the domain name for the 16-byte IPv6 address in ip. It puts the (first) domain name into out and returns 0. If the relevant ip6.arpa domain...
dns_name6_domain
dns_name6_domain is a low-level component of dns_name6. It converts an IP address such as 4321:0:1:2:3:4:567:89ab into a domain name such as...
dns_name_packet
dns_name_packet is a low-level component of dns_name4, designed to support asynchronous DNS lookups. It reads a DNS packet of length len from buf, extracts the...
dns_txt
dns_txt looks up TXT records for the fully-qualified domain name in fqdn. It puts the concatenation of the TXT records into out and returns 0. If the domain...
dns_txt_packet
dns_txt_packet is a low-level component of dns_txt, designed to support asynchronous DNS lookups. It reads a DNS packet of length len from buf, extracts the TXT...
fmt_8long
fmt_8long writes an ASCII representation ('0' to '7', base 8) of source to dest and returns the number of bytes written. fmt_8long does not append \0. If dest...
fmt_asn1derlength
fmt_asn1derlength encodes an unsigned integer using the ASN.1 DER for encoding tag lengths. This can take from 1 byte (0-0x7f) up to sizeof(source)+1 bytes. If...
fmt_asn1dertag
fmt_asn1dertag encodes an unsigned integer using the ASN.1 DER for encoding tag. This takes one byte for every 7 bits in the number. If dest equals FMT_LEN...
fmt_double
fmt_double writes an ASCII representation ('0' to '9', base 10) of d to dest and returns the number of bytes written. No more than maxlen bytes will be written...
fmt_fill
fmt_fill appends padlen-srclen spaces (if that number is positive) to dest (which holds srclen bytes). It truncates the output only if the length would exceed...
fmt_httpdate
fmt_httpdate writes a date in ASCII representation as the HTTP protocol defines it: "Sun, 06 Nov 1994 08:49:37 GMT". fmt_httpdate does not append \0. If dest...
fmt_human
fmt_human writes a human readable ASCII representation of source to dest and returns the number of bytes written. The result resembles the file size output of...
fmt_humank
fmt_humank writes a human readable ASCII representation of source to dest and returns the number of bytes written. The result resembles the file size output of...
fmt_ip4
fmt_ip4 formats an IPv4 number in dotted-decimal ASCII representation from ip and writes the result into dest. It returns the number of bytes written. If dest...
fmt_ip6
fmt_ip6 formats an IPv6 number in ASCII representation from ip and writes the result into dest. It returns the number of bytes written. fmt_ip6 will apply "::"...
fmt_ip6c
fmt_ip6c formats an IPv6 number in ASCII representation from ip and writes the result into dest. It returns the number of bytes written. fmt_ip6c will apply...
fmt_ip6_flat
fmt_ip6_flat formats an IPv6 number in a flat ASCII representation from ip and writes the result into dest. It returns the number of bytes written (always 32)...
fmt_ip6if
fmt_ip6if formats an IPv6 number in ASCII representation from ip and writes the result into dest. It returns the number of bytes written. fmt_ip6if will apply...
fmt_ip6ifc
fmt_ip6ifc formats an IPv6 number in ASCII representation from ip and writes the result into dest. It returns the number of bytes written. fmt_ip6ifc will apply...
fmt_long
fmt_long writes an ASCII representation ('-' and '0' to '9', base 10) of source to dest and returns the number of bytes written. fmt_long does not append \0. If...
fmt_longlong
fmt_longlong writes an ASCII representation ('-' and '0' to '9', base 10) of source to dest and returns the number of bytes written. fmt_longlong does not...
fmt_minus
fmt_minus writes '-' if source is negative, nothing otherwise. It returns the number of bytes written. fmt_minus does not append \0. If dest equals FMT_LEN...
fmt_pad
fmt_pad writes padlen-srclen spaces (if that number is positive) and then srclen characters from source. It truncates the output only if the length would exceed...
fmt_plusminus
fmt_plusminus writes '-' to dest if source is negative, '+' if source is positive, nothing otherwise. It returns the number of bytes written. fmt_plusminus does...
fmt_str
fmt_str copies all leading nonzero bytes from source to dest and returns the number of bytes it copied. fmt_str does not append \0. If dest equals FMT_LEN (i.e...
fmt_strm
fmt_strm copies all leading nonzero bytes from source and following function arguments to dest and returns the number of bytes it copied. fmt_strm does not...
fmt_strn
fmt_str copies at most maxlen leading nonzero bytes from source to dest and returns the number of bytes it copied. fmt_str does not append \0. If dest equals...
fmt_uint
fmt_uint writes an ASCII representation ('0' to '9', base 10) of source to dest and returns the number of bytes written. fmt_uint does not append \0. If dest...
fmt_uint0
fmt_uint0 writes an ASCII representation ('0' to '9', base 10) of source to dest and returns the number of bytes written. The output is padded with '0'-bytes...
fmt_ulong
fmt_ulong writes an ASCII representation ('0' to '9', base 10) of source to dest and returns the number of bytes written. fmt_ulong does not append \0. If dest...
fmt_ulong0
fmt_ulong0 writes an ASCII representation ('0' to '9', base 10) of source to dest and returns the number of bytes written. The output is padded with '0'-bytes...
fmt_ulonglong
fmt_ulonglong writes an ASCII representation ('0' to '9', base 10) of source to dest and returns the number of bytes written. fmt_ulonglong does not append \0...
fmt_utf8
fmt_utf8 encodes a 31-bit unsigned integer using the UTF-8 rules. This can take from 1 byte (0-0x7f) up to 5 bytes (0x4000000-0x7fffffff). Values larger than...
fmt_xlong
fmt_xlong writes an ASCII representation ('0' to '9' and 'a' to 'f', base 16) of source to dest and returns the number of bytes written. fmt_xlong does not...
fmt_xlonglong
fmt_xlonglong writes an ASCII representation ('0' to '9' and 'a' to 'f', base 16) of source to dest and returns the number of bytes written. fmt_xlonglong does...
iarray_allocate
iarray_allocate is similar to iarray_get, but if the requested element is not in the array, the array will be resized. If the resize fails, iarray_allocate...
iarray_free
iarray_free frees the iarray and all elements in it. Using the array during or after iarray_free results in undefined behavior.
iarray_get
iarray_get is similar to iarray_allocate, but it only works if the element has previously been allocated. If the element in the iarray is not there, this...
iarray_init
iarray_init initializes an iarray so that it can hold elements of size elemsize. iarray_init does not actually allocate anything, so it can not fail.
imult16
imult16 does c=a*b and returns 1. In case of an integer overflow, imult16 leaves c alone and returns 0.
imult32
imult32 does c=a*b and returns 1. In case of an integer overflow, imult32 leaves c alone and returns 0.
imult64
imult64 does c=a*b and returns 1. In case of an integer overflow, imult64 leaves c alone and returns 0.
io_appendfile
io_appendfile sets d to the number of a new descriptor writing to the end of the disk file named s, and returns 1. If the file does not exist, it will be...
iob_addbuf
iob_addbuf schedules n bytes starting at buf to be written with the I/O batch b. Use iob_addbuf_free if you want the buffer to be deallocated automatically by...
iob_addbuf_free
iob_addbuf_free schedules n bytes starting at buf to be written with the I/O batch b. The buffer will automatically be deallocated by iob_reset.
iob_addfile
iob_addfile schedules n bytes from the file descriptor fd starting at offset off to be written with the I/O batch b. You may not close fd before iob_send...
iob_addfile_close
iob_addfile_close schedules n bytes from the file descriptor fd starting at offset off to be written with the I/O batch b. You may not close fd before iob_send...
iob_adds
iob_adds schedules the ASCIIZ C string s to be written with the I/O batch b. Use iob_adds if you want the string to be deallocated automatically by iob_reset.
iob_adds_free
iob_adds_free schedules the ASCIIZ C string s to be written with the I/O batch b. iob_reset will deallocate the string automatically.
iob_bytesleft
iob_bytesleft returns the number of bytes that still need to be sent in this IO batch. If you just want to see whether you need to call iob_send again, there is...
iob_free
iob_free frees all resources associated with b. Calling iob_free is equivalent to calling iob_reset and free.
io_block
io_block puts UNIX descriptor fd into “blocking mode.” File descriptors are normally in blocking mode, except if they come from accept() or io_accept() and the...
iob_new
iob_new creates a new I/O batch with enough space allocated for hint_entries entries (buffers or files). This is purely a performance hint, if you are unsure...
iob_prefetch
iob_prefetch makes sure the next n bytes are in memory. This is useful when serving large files over the network concurrently. Prefetching the data can then...
iob_reset
iob_free empties the list of transactions in an I/O batch. Files added with iob_addfile_close are closed, and buffer added with iob_addbuf_free of iob_adds_free...
iob_send
iob_send sends the (rest of) b over the socket s. iob_send returns the number of bytes written, 0 if there were no more bytes to be written in the batch, -1 for...
iob_write
iob_write sends the (rest of) b through the callback cb, passing s as first argument. cb is expected to behave like io_trywrite(2). This interface is intended...
io_canread
io_canread returns the next file descriptor that can be read from. You have to have used io_wantread() on the file descriptor earlier, and you have to have...
io_canwrite
io_canwrite returns the next file descriptor that can be written to. You have to have used io_wantwrite() on the file descriptor earlier, and you have to have...
io_check
io_check is like io_waituntil() with a deadline of now.
io_close
io_close eliminates the descriptor numbered fd. This usually does not mean eliminating the object that the descriptor is talking to. (For example, if a...
io_closeonexec
io_closeonexec marks a file descriptor non-inheritable. It will be automatically closed if the process executes a different one. The descriptor will not be...
io_createfile
io_createfile sets d to the number of a new descriptor writing to the disk file named s, and returns 1. If s already existed, it is truncated to length 0...
io_dontwantread
io_dontwantread tells the next io_wait() that you don't want to read from this descriptor for now. Call io_wantread() again if you change your mind. You have to...
io_dontwantwrite
io_dontwantwrite tells the next io_wait() that you don't want to write to this descriptor for now. Call io_wantwrite() again if you change your mind. You have...
io_eagain
If io_wait() said that you can read from a descriptor, you try to read from it, and you get EAGAIN, you need to tell io_wait(). This is important for edge...
io_fd
If you want to use io_canread() and io_canwrite() on a descriptor, you have to use io_wait() on it first, and io_wait() has to know which descriptors you are...
io_fd_canwrite
io_fd_canwrite is just like io_fd, except that it assumes the descriptor is writable, which may save a syscall or two. This assumption is true in most cases...
io_fd_flags
prepare descriptor for io_wait
io_finishandshutdown
io_finishandshutdown deallocates the internal data structures of io_wait(). This only makes sense if you run your program in a malloc checker and want to...
io_getcookie
io_getcookie retrieves a cookie (pointer to some anonymous data structure you associated with this descriptor). Use io_setcookie(3) to associate a cookie with a...
io_nonblock
io_nonblock puts UNIX descriptor fd into “non-blocking mode.” Calling io_nonblock(fd) before io_fd(fd) makes io_tryread and io_trywrite faster and more...
io_passfd
io_passfd transfers the file descriptor fd over the Unix Domain socket sock. This works much like dup(2), only that the copy of the descriptor appears not in...
iopause
iopause checks for file descriptor readability or writability as specified by x[0].fd, x[0].events, x[1].fd, x[1].events, ..., x[len-1].fd, x[len-1].events. If...
io_pipe
io_pipe creates a new UNIX “pipe.” The pipe can receive data and provide data; any bytes written to the pipe can then be read from the pipe in the same order. A...
io_readfile
io_readfile sets d to the number of a new descriptor reading from the disk file named s, and returns 1. If something goes wrong, io_readfile sets errno to...
io_readwritefile
io_readwritefile sets d to the number of a new descriptor reading from and writing to the disk file named s, and returns 1. The file needs to exist. If...
io_receivefd
io_receivefd receives a file descriptor from the Unix Domain socket sock. You can send a descriptor using io_passfd(3). io_receivefd returns -1 on error or the...
io_sendfile
io_sendfile sends data from a file to a socket. This function tries to do this in a way that allows high quality operating systems to do zero-copy TCP (serving...
io_setcookie
io_setcookie associates a cookie (pointer to some anonymous data structure) with this descriptor. Only one cookie can be associated with a descriptor. Use...
io_socketpair
io_socketpair creates a new UNIX socket pair and writes both descriptors to d. The socket pair works much like a pipe, but it is bidirectional (i.e. both...
io_timeout
The io library keeps track of an optional “timeout” for each descriptor. The timeout is a specific moment in time, stored in a tai6464 variable. io_timeout(d,t)...
io_timeouted
io_timeouted returns the next file descriptor that is past it's deadline. If no descriptors are past their deadlines, it returns -1. After io_timeouted()...
io_tryread
io_tryread tries to read len bytes of data from descriptor fd into buf[0], buf[1], ..., buf[len-1]. (The effects are undefined if len is 0 or smaller.)
io_tryreadtimeout
io_tryreadtimeout is identical to io_tryread, with the following exception: if
io_trywrite
io_trywrite tries to write len bytes of data from buf[0], buf[1], ..., buf[len-1] to descriptor fd. (The effects are undefined if len is 0 or smaller.)
io_trywritetimeout
io_trywritetimeout is identical to io_trywrite, with the following exception: if
io_wait
io_wait() checks the descriptors that the program is interested in to see whether any of them are ready. If none of them are ready, io_wait() tries to pause...
io_waitread
io_waitread tries to read len bytes of data from descriptor fd into buf[0], buf[1], ..., buf[len-1]. (The effects are undefined if len is 0 or smaller.)
io_waituntil
io_waituntil(t) is like io_wait() but does not wait (noticeably) past time t.
io_wantread
io_wantread tells the next io_wait() that you want to read from this descriptor. Call io_dontwantread() again if you change your mind. The next time you call...
io_wantwrite
io_wantwrite tells the next io_wait() that you want to write to this descriptor. Call io_dontwantwrite() again if you change your mind. The next time you call...
mmap_private
mmap_private opens filename for reading and writing, maps the whole file into memory, closes the file, writes the length of the file to filesize and returns a...
mmap_read
mmap_read opens filename for reading, maps the whole file into memory, closes the file, writes the length of the file to filesize and returns a pointer to the...
mmap_shared
mmap_shared opens filename for reading and writing, maps the whole file into memory, closes the file, writes the length of the file to filesize and returns a...
mmap_unmap
mmap_unmap removes a memory mapping established by mmap_read, mmap_private or mmap_shared.
ndelay_off
ndelay_off puts a file descriptor in blocking mode. Reading from and writing to blocking network sockets, FIFOs or device files will possibly not return...
ndelay_on
ndelay_on puts a file descriptor in non-blocking mode. Reading from and writing to non-blocking network sockets, FIFOs or device files will return immediately...
open_append
open_append opens the file filename for appending write-only use and returns the file handle. If it does not exist, it will be created with mode 0600. If there...
open_excl
open_excl opens the file filename for writing and returns the file handle. The file may not exist before the call to open_excl. The file will be created with...
open_read
open_read opens the file filename for reading and returns the file handle. If there was an error opening the file, open_read returns -1 and sets errno...
openreadclose
openreadclose opens the file filename for reading and reads the whole content into the stralloc sa. The file is read in chunks of bufsize bytes size. If...
open_rw
open_rw opens the file filename for reading and writing use and returns the file handle. If the file does not exist, it will be created with mode 0644. If there...
open_trunc
open_trunc opens the file filename for write-only use and returns the file handle. If the file exists, it will be truncated to zero bytes length. If it does not...
open_write
open_write opens the file filename for write-only use and returns the file handle. If the file does not exist, it will be created with mode 0644. If there was...
range_arrayinbuf
range_arrayinbuf checks that the array starting at arraystart consisting of elements members of size membersize each starts and ends within the buffer...
range_bufinbuf
range_bufinbuf checks that the buffer buf2[0..len2-1] lies entirely in buf1[0..len1]. If the buffer is 0-terminated and you don't know the length beforehand...
rangecheck
rangecheck.h provides several routines for range checking pointers. These routines are meant for code that has to validate the syntax and semantics of buffers...
range_ptrinbuf
range_ptrinbuf checks if ptr points to buf[0..len-1].
range_str2inbuf
range_str2inbuf checks that the zero terminated UTF-16-string starting at string starts and ends within the buffer buf[0..len-1]. If the string is not...
range_str4inbuf
range_str4inbuf checks that the zero terminated UTF-32-string starting at string starts and ends within the buffer buf[0..len-1]. If the string is not...
range_strinbuf
range_strinbuf checks that the ASCIIZ-string starting at stringstart starts and ends within the buffer buf[0..len-1]. If the string is not 0-terminated but the...
range_validbuf
range_validbuf does some basic plausibility checks on the buffer buf[0..len-1].
readclose
readclose reads the whole content into the stralloc sa. The file is read in chunks of bufsize bytes size. If everything worked fine, readclose returns 0. On...
readclose_append
readclose_append reads the whole content into the stralloc sa, appending it to the existing content. The file is read in chunks of bufsize bytes size. If...
scan_8int
scan_8int parses an unsigned integer in octal ASCII representation from src and writes the result into dest. It returns the number of bytes read from src.
scan_8long
scan_8long parses an unsigned long integer in octal ASCII representation from src and writes the result into dest. It returns the number of bytes read from src.
scan_8short
scan_8short parses an unsigned short integer in octal ASCII representation from src and writes the result into dest. It returns the number of bytes read from...
scan_asn1derlength
scan_asn1derlength decodes an unsigned integer in ASN.1 DER length encoding from a memory area holding binary data. It writes the decode value in dest and...
scan_asn1derlengthvalue
scan_asn1derlengthvalue decodes an unsigned integer in ASN.1 DER length encoding from a memory area holding binary data. It writes the decode value in dest and...
scan_asn1dertag
scan_asn1dertag decodes an unsigned integer in ASN.1 DER tag encoding from a memory area holding binary data. It writes the decode value in dest and returns the...
scan_charsetnskip
scan_charsetnskip returns the length of the maximum prefix of src that consists solely of characters that occur in charset (up to and not including the \0). src...
scan_double
scan_double parses a floating point number in decimal ASCII representation from src and writes the result into dest. It returns the number of bytes read from...
scan_httpdate
scan_httpdate parses a date as defined in the HTTP standard into a time_t. It returns the number of bytes read from src (0 for parse error). The only supported...
scan_int
scan_int parses an integer in decimal ASCII representation from src and writes the result into dest. It returns the number of bytes read from src.
scan_ip4
scan_ip4 parses an IPv4 number in dotted-decimal ASCII representation from src and writes the result into ip. It returns the number of bytes read from src or 0...
scan_ip6
scan_ip6 parses an IPv6 number in RFC1884 ASCII representation from src and writes the result into ip. It returns the number of bytes read from src or 0 if the...
scan_ip6_flat
scan_ip6_flat parses an IPv6 number in flat ASCII representation from src and writes the result into ip. It returns the number of bytes read from src or 0 if...
scan_ip6if
scan_ip6if parses an IPv6 number in RFC1884 ASCII representation from src and writes the result into ip. If the IPv6 number is followed by the percent sign...
scan_long
scan_long parses a long integer in decimal ASCII representation from src and writes the result into dest. It returns the number of bytes read from src.
scan_longlong
scan_longlong parses a long long integer in decimal ASCII representation from src and writes the result into dest. It returns the number of bytes read from src.
scan_noncharsetnskip
scan_noncharsetnskip returns the length of the maximum prefix of src that consists solely of characters that do not occur in charset (up to and not including...
scan_nonwhitenskip
scan_nonwhitenskip returns the length of the maximum prefix of src that consists solely of non-whitespace characters as defined by !isspace. Normally, this is...
scan_plusminus
scan_plusminus parses an ASCII '+' or '-' sign from src, sets dest 1 or -1, respectively, and returns 1. If neither is found, '+' is assumed and 0 is returned.
scan_short
scan_short parses a short integer in decimal ASCII representation from src and writes the result into dest. It returns the number of bytes read from src.
scan_uint
scan_uint parses an unsigned integer in decimal ASCII representation from src and writes the result into dest. It returns the number of bytes read from src.
scan_ulong
scan_ulong parses an unsigned long integer in decimal ASCII representation from src and writes the result into dest. It returns the number of bytes read from...
scan_ulonglong
scan_ulonglong parses an unsigned long long integer in decimal ASCII representation from src and writes the result into dest. It returns the number of bytes...
scan_ushort
scan_ushort parses an unsigned short integer in decimal ASCII representation from src and writes the result into dest. It returns the number of bytes read from...
scan_utf8
scan_utf8 decodes an unsigned integer in UTF-8 encoding from a memory area holding binary data. It writes the decode value in dest and returns the number of...
scan_whitenskip
scan_whitenskip returns the length of the maximum prefix of src that consists solely of whitespace characters as defined by isspace. Normally, this is ' '...
scan_xint
scan_xint parses an unsigned integer in hexadecimal ASCII representation from src and writes the result into dest. It returns the number of bytes read from src.
scan_xlong
scan_xlong parses an unsigned long integer in hexadecimal ASCII representation from src and writes the result into dest. It returns the number of bytes read...
scan_xlonglong
scan_xlonglong parses an unsigned long long integer in hexadecimal ASCII representation from src and writes the result into dest. It returns the number of bytes...
scan_xshort
scan_xshort parses an unsigned short integer in hexadecimal ASCII representation from src and writes the result into dest. It returns the number of bytes read...
socket_accept4
When a TCP connection arrives on a listening TCP socket s, the socket becomes readable. socket_accept4 accepts the connection. It sets ip and port to the client...
socket_accept6
When a TCP connection arrives on a listening TCP socket s, the socket becomes readable. socket_accept6 accepts the connection. It sets ip and port to the client...
socket_bind4
socket_bind4 sets the local IP address and TCP/UDP port of a TCP/UDP socket s to ip and port respectively. If the IP address is 0.0.0.0, the operating system...
socket_bind4_reuse
socket_bind4_reuse sets the local IP address and TCP/UDP port of a TCP/UDP socket s to ip and port respectively. If the IP address is 0.0.0.0, the operating...
socket_bind6
socket_bind6 sets the local IP address and TCP/UDP port of a TCP/UDP socket s to ip and port respectively. If the IP address is ::, the operating system chooses...
socket_bind6_reuse
socket_bind6_reuse sets the local IP address and TCP/UDP port of a TCP/UDP socket s to ip and port respectively. If the IP address is ::, the operating system...
socket_broadcast
socket_broadcast sets UDP socket s to broadcast mode. socket_send4 and socket_send6 will fail to send packets to the broadcast address unless socket_broadcast...
socket_connect4
socket_connect4 attempts to make a connection from TCP socket s to TCP port port on IP address ip. socket_connect4 may return
socket_connect6
socket_connect6 attempts to make a connection from TCP socket s to TCP port port on IP address ip. The meaning of scope_id is dependent on the implementation...
socket_connected
socket_connected returns 1 if s is a socket and a connection is established, 0 otherwise.
socket_fastopen
socket_fastopen enables TCP Fast Open support on a server-side TCP socket. Call this before socket_listen(). If the platform does not support this...
socket_fastopen_connect4
socket_fastopen_connect4 attempts to make a connection from TCP socket s to TCP port port on IP address ip. If that succeeds, it attempts to send len bytes from...
socket_fastopen_connect6
socket_fastopen_connect6 attempts to make a connection from TCP socket s to TCP port port on IP address ip. If that succeeds, it attempts to send len bytes from...
socket_getifidx
socket_getifidx returns the interface number for a symbolic network interface name (like "eth0" on Linux, for example). The interface number can be used as...
socket_getifname
socket_getifname returns the symbolic interface name for a network interface number. The returned char* is a static buffer in the libc. If you query the named...
socket_listen
socket_listen prepares TCP socket s to accept TCP connections. It allows a backlog of approximately n TCP SYNs. (On systems supporting SYN cookies, the backlog...
socket_local4
socket_local4 returns the local IP address and port for the UDP or TCP socket s and writes the IP address to ip and the port to port. If something goes wrong...
socket_local6
socket_local6 returns the local IPv6 address, port and scope ID for the UDP or TCP socket s and writes the IPv6 address to ip, the port to port and the scope ID...
socket_mchopcount6
socket_mchopcount6 sets the maximum hop count of outgoing multicast packets on the socket s. Each router decrements the packet hop count by one and discards the...
socket_mcjoin4
socket_mcjoin4 joins the IPv4 multicast group groupip on interface. If something goes wrong, socket_mcjoin4 returns -1, setting errno appropriately.
socket_mcjoin6
socket_mcjoin6 joins the IPv6 multicast group groupip on interface. If something goes wrong, socket_mcjoin6 returns -1, setting errno appropriately.
socket_mcleave4
socket_mcleave4 leaves the IPv4 multicast group groupip. If something goes wrong, socket_mcleave4 returns -1, setting errno appropriately.
socket_mcleave6
socket_mcleave6 leaves the IPv6 multicast group groupip. If something goes wrong, socket_mcleave6 returns -1, setting errno appropriately.
socket_mcloop4
socket_mcloop4 activates multicast loopback for the socket s if loop is non-zero, and deactivates it otherwise. If loopback is activated, packets sent on this...
socket_mcloop6
socket_mcloop6 activates multicast loopback for the socket s if loop is non-zero, and deactivates it otherwise. If loopback is activated, packets sent on this...
socket_mcttl4
socket_mcttl4 sets the TTL of outgoing multicast packets on the socket s. Each router decrements the packet TTL by one and discards the packet if the TTL...
socket_quickack
socket_quickack switches TCP Quick ACK mode on (value=1) or off (value=0). If the platform does not support this functionality, returns -1 and sets errno to...
socket_recv4
socket_recv4 receives up to len bytes starting at buf from a UDP datagram coming in on the socket s. It writes the UDP port to port and the IP address to ip...
socket_recv6
socket_recv6 receives up to len bytes starting at buf from a UDP datagram coming in on the socket s. It writes the UDP port to port and the IP address to ip...
socket_remote4
socket_remote4 returns the remote IP address and port for the UDP or TCP socket s and writes the IP address to ip and the port to port. If something goes wrong...
socket_remote6
socket_remote6 returns the remote IPv6 address, port and scope ID for the UDP or TCP socket s and writes the IPv6 address to ip, the port to port and the scope...
socket_sctp4
socket_sctp4 creates a non-blocking SCTP/IP stream socket and returns a file descriptor pointing to that socket. If something goes wrong, socket_sctp4 returns...
socket_sctp4b
socket_sctp4b creates a blocking SCTP/IP stream socket and returns a file descriptor pointing to that socket. If something goes wrong, socket_sctp4b returns -1...
socket_sctp6
socket_sctp6 creates a non-blocking IPv6 SCTP/IP stream socket and returns a file descriptor pointing to that socket. If something goes wrong, socket_sctp6...
socket_sctp6b
socket_sctp6b creates a blocking IPv6 SCTP/IP stream socket and returns a file descriptor pointing to that socket. If something goes wrong, socket_sctp6b...
socket_send4
socket_send4 sends len bytes starting at buf in a UDP datagram over the socket s to UDP port port on IP address ip. You can call socket_send4 without calling...
socket_send6
socket_send6 sends len bytes starting at buf in a UDP datagram over the socket s to UDP port port on IP address ip. You can call socket_send6 without calling...
socket_tcp4
socket_tcp4 creates a non-blocking TCP/IP stream socket and returns a file descriptor pointing to that socket. If something goes wrong, socket_tcp4 returns -1...
socket_tcp4b
socket_tcp4b creates a blocking TCP/IP stream socket and returns a file descriptor pointing to that socket. If something goes wrong, socket_tcp4b returns -1...
socket_tcp6
socket_tcp6 creates a non-blocking IPv6 TCP/IP stream socket and returns a file descriptor pointing to that socket. If something goes wrong, socket_tcp6 returns...
socket_tcp6b
socket_tcp6b creates a blocking IPv6 TCP/IP stream socket and returns a file descriptor pointing to that socket. If something goes wrong, socket_tcp6b returns...
socket_udp4
socket_udp4 creates a non-blocking UDP/IP datagram socket and returns a file descriptor pointing to that socket. If something goes wrong, socket_udp4 returns...
socket_udp6
socket_udp6 creates a non-blocking UDP/IP datagram socket and returns a file descriptor pointing to that socket. If something goes wrong, socket_udp6 returns...
stralloc_0
stralloc_0 appends \0 to a stralloc. It is a shortcut for stralloc_append(sa,"").
stralloc_append
stralloc_append appends the byte from *buf to the string stored in sa, allocating space if necessary, and returns 1. If it runs out of memory, stralloc_append...
stralloc_cat
stralloc_cat appends the string stored in safrom to sa. It is the same as stralloc_catb(&sato, safrom.s, safrom.len). safrom must already be allocated. The data...
stralloc_catb
stralloc_catb adds the string buf[0], buf[1], ... buf[len-1] to the end of the string stored in sa, allocating space if necessary, and returns 1. If sa is...
stralloc_catlong0
stralloc_catlong0 converts in to a string using fmt_long0 and appends the result to sa, allocating memory as necessary. If there was a memory allocation...
stralloc_catm
stralloc_catm appends \0-terminated strings from s... to the end of the string stored in sa, allocating space if necessary, and returns 1. If sa is unallocated...
stralloc_cats
stralloc_cats appends a \0-terminated string from buf to the end of the string stored in sa, allocating space if necessary, and returns 1. If sa is unallocated...
stralloc_catulong0
stralloc_catulong0 converts in to a string using fmt_ulong0 and appends the result to sa, allocating memory as necessary. If there was a memory allocation...
stralloc_chomp
stralloc_chomp removes trailing CRLF, CR or LF from sa and returns the number of removed characters (i.e. 0, 1 or 2).
stralloc_chop
stralloc_chop removes the last char in the stralloc (if it is empty, stralloc_chop does nothing and returns -1). This character is cast to unsigned char and...
stralloc_copy
stralloc_copy copies the string stored in safrom into sa. It is the same as stralloc_copyb(&sato, safrom.s, safrom.len). safrom must already be allocated. The...
stralloc_copyb
stralloc_copyb makes sure that sa has enough space allocated to hold len bytes. Then it copies the first len bytes from buf into the stralloc. The data that sa...
stralloc_copym
stralloc_copym copies \0-terminated strings from s... to sa, allocating space if necessary, and returns 1. If there is data in the sa, it is cleared first. If...
stralloc_copys
stralloc_copys copies a \0-terminated string from buf into sa, without the \0. It is the same as stralloc_copyb(&sa, buf, str_len(buf)). The data that sa...
stralloc_diff
stralloc_diff returns negative, 0, or positive, depending on whether a is lexicographically smaller than, equal to, or greater than the string b.
stralloc_diffs
stralloc_diffs returns negative, 0, or positive, depending on whether the \0-terminated string in a, without the terminating \0, is lexicographically smaller...
stralloc_free
stralloc_free returns the storage associated with sa to the system. Afterwards, the stralloc is unallocated.
stralloc_init
stralloc_init initializes a stralloc to the empty string. It does not free any memory previously associated with a stralloc. Use stralloc_free(3) for that. If...
stralloc_ready
stralloc_ready makes sure that sa has enough space allocated to hold len bytes: If sa is not allocated, stralloc_ready allocates at least len bytes of space...
stralloc_readyplus
stralloc_readyplus makes sure that sa has enough space allocated to hold an additional len bytes: If sa is not allocated, stralloc_ready allocates at least len...
stralloc_starts
stralloc_starts returns 1 if the \0-terminated string in in, without the terminating \0, is a prefix of the string stored in sa. Otherwise it returns 0. sa must...
stralloc_zero
stralloc_zero sets the length of the stralloc to 0.
str_chr
str_chr returns the index of the first occurrance of needle or \0 in string.
str_copy
str_copy copies the leading bytes of in to out up to and including the first occurrance of \0. str_copy returns the number of bytes copied.
str_diff
str_diff returns negative, 0, or positive, depending on whether the string a[0], a[1], ..., a[n]=='\0' is lexicographically smaller than, equal to, or greater...
str_diffn
str_diffn returns negative, 0, or positive, depending on whether the string a[0], a[1], ..., a[n]=='\0' is lexicographically smaller than, equal to, or greater...
str_equal
str_equal returns nonzero if a and b match up to and including the first occurrance of \0. If the strings are different, str_equal does not read bytes past the...
str_len
str_len returns the index of the first occurrance of \0 in string.
str_rchr
str_rchr returns the index of the last occurrance of needle or the first occurrance of \0 in string.
str_start
str_start returns 1 if b is a prefix of a, 0 otherwise.
taia_add
taia_add adds a to b and writes the result to t. The inputs and output may overlap.
taia_addsec
taia_addsec adds secs seconds to s and writes the result to t. The inputs and output may overlap.
taia_approx
taia_approx returns a double-precision approximation of t. The result of taia_approx is always nonnegative.
tai_add
tai_add adds a to b and writes the result to t. The inputs and output may overlap.
taia_frac
taia_frac returns a double-precision approximation to the fraction part of t. The result of taia_frac is always nonnegative.
taia_less
taia_less returns 1 if a is less than b, 0 otherwise.
taia_now
taia_now puts the current time into t. More precisely: tai_now puts into t its best guess as to the TAI64NA label for the 1-attosecond interval that contains...
taia_pack
taia_pack converts a TAI64NA label from internal format in t to external TAI64NA format in buf. See http://cr.yp.to/libtai/tai64.html
tai_approx
tai_approx returns a double-precision approximation of t. The result of tai_approx is always nonnegative.
taia_sub
taia_sub subtracts b from a and writes the result to t. The inputs and output may overlap.
taia_tai
taia_tai places into sec the integer part of t. If t contains a TAI64NA label then sec will contain the corresponding TAI64 label.
taia_uint
taia_uint converts secs into a struct taia (setting the fractional part to zero).
taia_unpack
taia_unpack converts a TAI64NA label from external TAI64NA format in buf to internal format in t.
tai_less
tai_less returns 1 if a is less than b, 0 otherwise.
tai_now
tai_now puts the current time into t. More precisely: tai_now puts into t its best guess as to the TAI64 label for the 1-second interval that contains the...
tai_pack
tai_pack converts a TAI64 label from internal format in t to external TAI64 format in buf. See http://cr.yp.to/libtai/tai64.html
tai_sub
tai_sub subtracts b from a and writes the result to t. The inputs and output may overlap.
tai_unpack
tai_unpack converts a TAI64 label from external TAI64 format in buf to internal format in t.
uint16_pack
uint16 is a 16-bit unsigned integer type, normally either unsigned int or unsigned long. uint16_pack portably writes a uint16 u to s in little-endian byte...
uint16_pack_big
uint16 is a 16-bit unsigned integer type, normally either unsigned int or unsigned long. uint16_pack_big portably writes a uint16 u to s in big-endian (i.e...
uint16_read
uint16 is a 16-bit unsigned integer type, normally either unsigned int or unsigned long. uint16_read portably reads a uint16 as stored on a little-endian...
uint16_read_big
uint16 is a 16-bit unsigned integer type, normally either unsigned int or unsigned long. uint16_read_big portably reads a uint16 as stored on a big-endian...
uint16_unpack
uint16 is a 16-bit unsigned integer type, normally either unsigned int or unsigned long. uint16_unpack portably reads a uint16 as stored on a little-endian...
uint16_unpack_big
uint16 is a 16-bit unsigned integer type, normally either unsigned int or unsigned long. uint16_unpack_big portably reads a uint16 as stored on a big-endian...
uint32_pack
uint32 is a 32-bit unsigned integer type, normally either unsigned int or unsigned long. uint32_pack portably writes a uint32 u to s in little-endian byte...
uint32_pack_big
uint32 is a 32-bit unsigned integer type, normally either unsigned int or unsigned long. uint32_pack_big portably writes a uint32 u to s in big-endian (i.e...
uint32_read
uint32 is a 32-bit unsigned integer type, normally either unsigned int or unsigned long. uint32_read portably reads a uint32 as stored on a little-endian...
uint32_read_big
uint32 is a 32-bit unsigned integer type, normally either unsigned int or unsigned long. uint32_read_big portably reads a uint32 as stored on a big-endian...
uint32_unpack
uint32 is a 32-bit unsigned integer type, normally either unsigned int or unsigned long. uint32_unpack portably reads a uint32 as stored on a little-endian...
uint32_unpack_big
uint32 is a 32-bit unsigned integer type, normally either unsigned int or unsigned long. uint32_unpack_big portably reads a uint32 as stored on a big-endian...
uint64_pack
uint64 is a 64-bit unsigned integer type. uint64_pack portably writes a uint64 u to s in little-endian byte order.
uint64_pack_big
uint64 is a 64-bit unsigned integer type. uint64_pack_big portably writes a uint64 u to s in big-endian (i.e. network) byte order.
uint64_read
uint64 is a 64-bit unsigned integer type. uint64_read portably reads a uint64 as stored on a little-endian architecture from s and returns it.
uint64_read_big
uint64 is a 64-bit unsigned integer type. uint64_read_big portably reads a uint64 as stored on a big-endian architecture from s and returns it.
uint64_unpack
uint64 is a 64-bit unsigned integer type. uint64_unpack portably reads a uint64 as stored on a little-endian architecture from s and writes it into u in the...
uint64_unpack_big
uint64 is a 64-bit unsigned integer type. uint64_unpack_big portably reads a uint64 as stored on a big-endian architecture (i.e. in network byte order) from s...
umult16
umult16 does c=a*b and returns 1. In case of an integer overflow, umult16 leaves c alone and returns 0.
umult32
umult32 does c=a*b and returns 1. In case of an integer overflow, umult32 leaves c alone and returns 0.
umult64
umult64 does c=a*b and returns 1. In case of an integer overflow, umult64 leaves c alone and returns 0.