C

Introduction

Yes, no site dedicated to UNIX/Linux would be complete without a voyage out to C. On this page, you will find various C programs I have written for various things. Some of the programs may segfault, some may crash, others may work perfectly. I give no guarantees. I am providing this code as it may be useful to *somebody*.

Some of the programs are just re-implementations of UNIX commands, usually just incorporating a sub-set of the functionality, and serving to bolster my knowledge of certain parts of the OS and utilising various system calls. I.e. I've used these programs to learn more about the UNIX libraries and C generally. Your milage may therefore vary. There are also programs here that I use to do certain things regularly, and these programs were written to do a task quickly and cleanly.

One thing that most of these programs lack in their early versions is solid checking of memory allocation (i.e. I don't bother checking for the pointer returned being a null pointer). This kind of robustness will be added in later releases, but these are just pieces of code that do a job for me - use at your own risk!

Enough of the Preamble, where's the code?

ZBMenu A menu based login shell. This link is to the project page itself
p_ind A versatile progress indicator that is best called from scripts. Includes a sample script.
getconf Retrieves NAME=VALUE pairs from a configuration file.
passwd_info Query the /etc/passwd file for current user or specified user.
my_ls A rough implementation of the ls command. Supports the -l, -a, -A, -i and -d options
uname My version of uname. Supports -a, -s, -r, -n, -v, -m options.

Valid CSS!

Valid HTML 4.01!