up next MJSulib
C functions for utility programs

Reference Manual

Note: manpages that fall into several categories are listed in all categories that apply.


Overview

mjsu
the MJSulib API

The command-line, and what to do with it...

getflags
collect flag arguments from command-line
usage
print formatted usage message and exit
whatami
return the name of the calling process

String Utilities

cpystr
copy multiple strings
strtos
convert numeric string to short integer, with range-checking
str_dup
duplicate a string onto the heap
vec_buy
create or extend a vector of strings
vec_dup
duplicate a vector of strings
vec_free
deallocate a vector of strings

Portable Hashing

rtw_short_hash, rtw_long_hash, rtw_longlong_hash, strhash
compute integer hash value of a sequence of bytes

Formatted Notice Messages

errorverror
display formatted error notification and exit
remarkvremark
display formatted informational notification
usage
display formatted usage notification and exit
warningvwarning
display formatted warning notification
notifier
install callback function to display notification-messages

Programmer-Friendly Memory Allocation

mem_buy
(re)allocate storage space on the heap, optionally failing hard
mem_free
deallocate storage space on the heap, returning a sentinel
str_dup
duplicate a string onto the heap
vec_buy
create or extend a vector of strings
vec_dup
duplicate a vector of strings
vec_free
deallocate a vector of strings

Byte-Order Conversion

lstol
convert 32-bit quantum from LSB-first into native byte-order
lstos
convert 16-bit quantum from LSB-first into native byte-order
ltols
convert 32-bit quantum from native into LSB-first byte-order
stols
convert 16-bit quantum from native into LSB-first byte-order

Bitmaps

mbm
format of MBITMAP files and structures
mbm_bitsmbm_clrmbm_clrbmbm_revmbm_revbmbm_setmbm_setbmbm_tstb
bitmap manipulations
mbm_load
load a bitmap from a file
mbm_memmbm_buymbm_free
allocate or deallocate bitmaps on the heap
mbm_save
save a bitmap into a file
mbm_sizembm_heightmbm_width
return the height or width of a bitmap

Pattern-Matching

amatch
look for anchored match of regular expression
match
match a regular expression
pattern
build a regular expression pattern

up next [this site powered by m4] home mail me