From 1b4dd15614ef047ed91796b5ffa8f9102461d218 Mon Sep 17 00:00:00 2001 From: Joachim Nilsson Date: Wed, 17 Jun 2015 23:10:50 +0200 Subject: [PATCH] Document helper macros. Signed-off-by: Joachim Nilsson --- README.md | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) diff --git a/README.md b/README.md index a9068e5..8cc221c 100644 --- a/README.md +++ b/README.md @@ -4,6 +4,41 @@ Libite, or `-lite`, is a light-weight library of utility functions and missing C library functions. +Helper Macros +------------- + +- `blkdev(dev)` + +Create block device + +- `chardev(dev)` + +Create character device + +- `erase(path)` + + Erase file/directory with `remove()`. Errors on stderr + +- `makedir(path)` + + Create directory, like `mkdir()`. Errors on stderr + +- `makefifo(path)` + + Create a FIFO, like `mkfifo()`. Errors on stderr + +- `touch(path)` + + Create a file, or update mtime. Errors on stderr + +- `S_ISEXEC(mode_t m)` + +Mysteriously missing from GLIBC + +- `UNUSED(var)` + +Shorter and more readable version of `var __attribute__ ((unused))` + Generic Functions -----------------