Record of some of the computer tech I deal with so that it's documented at least somewhere.

Sunday 26 August 2007

Starting C programming on Debian

# apt-get install glibc-doc manpages-dev libc6-dev gcc

20 minutes and I dislike it already

I'll get my head round it but I'd rather not. Just seems there's a few toys to play with.

Linux programmers seem to fall into the same traps - conditional compilation is a favourite.

I hate this :
http://libdv.cvs.sourceforge.net/libdv/libdv/playdv/playdv.c?view=markup
:283 int munmap_unaligned(dv_mmap_region_t *mmap_region, int no_mmap)
:284 {
:285 if (no_mmap) {
:286 return 0;
:287 } else {
:288 return(munmap(mmap_region->map_start,mmap_region->map_length));
:289 }
:290 } /* munmap_unaligned */

When I was reading the source code, the function name made it look like munmap was being used even though it isn't. I call that magic.

The whole mmap thing really screws around with what the code is actually doing. How much better something like echo /home/maht/somefile.avi > /dev/mmapper
playdv /mmaps/home/maht/somefile.avi
would be, they forgot the user should be in control.

and extra spaces, they bug me func( a ) I mean, ffs why bother, it makes it look wrong!
No one types h e l l o w o r l d to make it easier to fkin read. Hmm they might but they would be wrong, so very wrong.

2 comments:

Anonymous said...

$ apt-get install build-essential

works too, you also get the autojunk for free :)

Matt said...

Thanks but I had build-essential already, it doesn't have the c-lib man pages