Steve's C Programming Stuff

Linux Stuff

http://www.google.com/linux
Google's view of the Kernel Traffic List
Indiana EDU's Archive
KernelTrap

I am not a C programmer. Well, I'm not a professional C programmer. I'm much better than I was when I first wrote this page, and I really ought to update this whole section, if only I had any time.

PLEASE NOTE: This page is very, very out of date.

However, I do like CGI programming, and don't speak Perl, either. I did some CGI in Perl back in 97, but didn't like it too much. So I like sh and C for CGI.

Had a discussion with a stranger, recently, who was having trouble with Grub. It seemed pretty logical that most of us have 1-4 OSes installed on a PC; it shouldn't be that difficult, but Grub is a bit tricky to the uninitiated. So I set off to create a tool which would read your partitions, see what FS's they had, and suggest some grub config files (maybe even install grub) - see how far I've got at /code/c/grub. I'm having a bit of trouble with Extended partitions. It probably doesn't help that I've no SCSI Linux boxes to play with, and don't really know what kind of situations I could come across. The code as-is seems to display partitions 1-4 okay, but doesn't deal with partitions within extended partitions.
Naturally, once the reading-in of the machine's configuration is sorted, I'm happy enough with Grub to come up with some config files for it, but first, I want to learn about partition tables a little more. DataRescue.com was very useful for getting some initial information. The current aim is: x86 Linux/IDE boxes. Then extend to SCSI, then other architectures shouldn't be too difficult (assuming they use IDE/SCSI).

I've been working on the OpenOffice.org file format recently - my findings, which you may find useful, I have started documenting at /c/openoffice.org/.

So here we have a copy of Eugene Eric Kim's cgihtml library. Personally, I have used it and found it useful for forms programming, including the upload of files from client to hosting server via HTML forms. Not too many libraries seem to be bothered with doing that bit, but December 1999 I needed something which could.

I don't know about you, but I like prototyping ideas and layouts of CGI-generated pages using the bourne(again) shell. If you're like that, too, you will have found, no doubt, that decoding CGI-encoded parameters (my.cgi?name=Steve%20Parker) is a pain, using sed excessively. So there are also a couple of good utilities here which I wrote quickly and badly in C to take away the pain. These are hex2char.c and hex2env.c, read more about them, and download them, from hex2X.shtml.

I'm trying to add more to this page: we've got wrap, which is a very simple wordwrap; I just wrote it when I was hacking HTML and wasted a lot of time making it easier to use in my favourite editor (vi).

There's something else, too - forget what. It's all in /code/c.
Quick note: If you're compiling with Gcc on Solaris and get the message:
ld: fatal: file crt1.o: open failed: No such file or directory
Then you need to install the SUNWarc and SUNWarcr packages. Other useful but not-necessarily obvious packages include SUNWhea and SUNWbinutils.