Some useful functions of c.  Many of them are borrowed from some famous open resource software.