(The strip generator automatically removed the apostrophe in the title of this strip I made.)
No explanation as far as I can tell on who owns the copyright in the source material or the derivative works.
strlen returns a size_t but *printf functions returns int's;str* cpy,cat returns a pointer to the destination, which is useless;strncat can returns things that are not strings (because not NUL-terminated);int return type problem: snprintf[1]. Why ? because:
m_strcpy(dest, dlen, src) copies src into dest like its brother strcat, but in a buffer of size dlen, and returns in fact, src length, la snprintf. And if you do m_strcpy(dest, -1, src) it does not breaks, so that I can use it without needing to check if my virtual result length overflowed or not. With those functions it's just obvious how to build new ones with exactly the same semantics.
For those who wonder, yes I've forked mutt the hard way, and am trying to deobfuscate its code (I was shocked to see how bad it was given how I like mutt as a MUA). And here what you see is that this string API semantics is very easy to use, is safe, and extendable. For example, in that patch, rfc822_write_address and rfc822_write_address_single that did had the bad property to truncate the result without any way for the caller to know that now use the usual snprintf semantics for no pain at all.
with those API no need to care about the ending '\0', or about off-by-ones, you always speak of buffer sizes, and when your current virtual write position in the buffer is pos, you just need to call pos += your_strXXX(buf + pos, buflen - pos, ...) and you'll be safe. If you want to know if a realloc is needed, you just have to verify if pos >= buflen, the same as what you have to do for snprintf.
I really wonder why such API are not common in the C world, I see way to much code using the usual C string functions that just are a PITA.
Enrico's note: do we have anything in Debian that we can install and just does that?Here are the answers: Sven Mueller writes:
Well, Enrico, a tool I really grew fond of, which auto-configures X on Debian systems is xdebconfigurator, it lacks being auto-run on each system start, which I consider a feature on normal systems, but for your proposed usage (i.e. a portable USB-storage based Debian system), it would certainly be the right thing. Essentially, it never failed on me. Except for VMware virtual machines, where all it did wrong was that it proposed too high resolutions which resulted from my dual-screen Windows setup I ran VMware on. You might want to give it a try.Tollef Fog Heen writes:
I added the support in casper for doing this almost a year ago and it has saved me lots of debugging time. Booting the live CD that way is almost as fast as booting an installed system. If you couple this with using the persistent storage support in casper, you can get the configure-on-boot support together with persistency. In a later update, slh is quited saying that xresprobe doesn't work on AMD64. This is wrong, I wrote that support based on code by Matthew Garret a little more than nine months ago. I wouldn't recommend incorporating it in new-written code, but rather use libx86And finally, Marco Amadori writes:
Without needing to look for tools external to Debian, there is already the
Debian Live software in sid: live-package, that creates a live system, and
casper, that generates an initramfs that can configure a Debian system on the
fly.
So far there is no hard disk target for live-package, but the "Iso" target
can already do the job quite well. At boot time, Casper's initramfs scans
all the block devices, so it works also for USB keys and hard drives.
To obtain a hard drive image, you just need to invoke "make-live" with the
options to have the required software, then copy the content of the iso (or
of the directory ./debian-live/binary) on a partition and install the
boot loader.
This is what the future "HD" target of live-package will do; so far it can
only build ISO and Netboot images.
xmodmap -e 'remove mod4 = Super_L' xmodmap -e 'remove mod4 = Hyper_L'UPDATE: This will be fixed in xterm #223, since Thomas Dickey agreed it was a bug. Next, I discovered that emacs didn't recognize the sequence produced after that fix. It didn't recognize C-next or A-next either. So I added this to my .emacs:
; Key magic. Emacs nor terminfo normally have bindings for these. ; The meta binding in particular takes a bit of X magic also; see ; the xmodmap call in /.xsession. (define-key function-key-map "\e[6;5~" '[C-next]) (define-key function-key-map "\e[6;9~" '[M-next]) (define-key function-key-map "\e[6;3~" '[A-next]) (define-key function-key-map "\e[5;5~" '[C-prior]) (define-key function-key-map "\e[5;9~" '[M-prior]) (define-key function-key-map "\e[5;3~" '[A-prior])That really should be conditionalized on the terminal type, but I didn't want to mess with it any more. And now it works. Woohoo!
when a prominent DD gets busy in his personal life, we don't say that his personal life is trying to kill Debian. Similarly, when a prominent DD gets hired somewhere and gets very busy and he doesn't have as much time for Debian, we don't say that the employer is trying to kill Debian.Going to work for on a Debian derivative is a bit different from going away from Debian to spend time as a new father/mother, or working as a MSCE, or whatever. If things are done right (by the employee, by Debian, by the employer), work spent on Debian derivatives can benefit both Debian and the derivative. I believe this even happens in many cases. One other point: Looking at the whole Dunc Tank debate, I guess hiring some people to work on Debian directly (which is just what I might do if I had spare cash in large amounts) wouldn't necessarily improve matters a lot, it'd just shift the debate (ah, he's trying to buy Debian...). Myself, I'm not entirely sure if the existence of Ubuntu is good or bad for Debian. More attention to .deb-based distributions is a good thing, certainly (I was astonished to see in a local bookshop that Ubuntu and SuSE were the only boxed Linux versions you can buy. No Fedora, nor Mandrake, nor Xandros or any of the others.) OTOH it would certainly be nice if more people would use (and then report bugs and start to help fixing them) Debian itself. But I can't see this happening anytime soon with our community as it is now. And then there's the 'it's good enough for us' and 'we don't want no steenking newbies' lines of thought. While I don't agree with the first one, I admit that finding a compromise between a newbie-friendly and gadget filled system for desktop use and a rock-stable professional tool is not easy. Two different sets of install CDs might be worth a try.
I have some questions about this group, BELUG, who did the article, I gather. There is no info on the site to be more informed. Anyone in the Seattle LUG know anything about this new group in Bellevue, 5 mins. from Bill Gates' house?
...
I don't like to be a cynic, and maybe they are a Linux user group, but if so, maybe the Seattle LUG can give them a hand.
Q: Why does BELUG dislike Microsoft?
A: That is a complete misunderstanding. BELUG does not dislike Microsoft. Microsoft is our neighbor, and many of our friends and relatives work there. Both Microsoft's headquarters and Bill Gates' house are located just minutes away, and Microsoft's world sales headquarters is currently under construction nearly adjacent to BELUG's meeting location. BELUG merely believes in friendly competition and that competition can benefit everyone, including Microsoft. This is what a free market economy and the American system is (supposed to be) all about, and this is what has helped make the U.S. a great country.
Next.