[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Patch to anna for choosing retriever



* Martin Sjögren 

| tis 2002-08-27 klockan 21.18 skrev Tollef Fog Heen:
| > * Martin Sjögren 
| > 
| > | I "volunteered" (:p) to hack in some support in anna for choosing which
| > | retriever to use. Seeing as my sister too is called Anna, I felt
| > | qualified enough for this ;) Attached is a patch. Seeing as I don't
| > | trust myself with proofreading and testing my own code, I'd be happy if
| > | someone could look it over.
| > 
| > Looks ok, as you write: could use some error handling.
| 
| Yes, but I'm not sure how to go about it. Return NULL and let the caller
| deal with it? There's a general lack of error handling elsewhere too.

Something like that, I guess.

| "If a function be advertised to return an error code in the event of
| difficulties, thou shalt check for that code, yea, even though the
| checks triple the size of thy code and produce aches in thy typing
| fingers, for if thou thinkest "it cannot happen to me," the gods shall
| surely punish thee for thy arrogance."
| 
| comes to mind ;)

we can't afford tripling the code size, but else I agree.

| > Also, I severly dislike hard coding string lengths, so I changed that
| > into strlens.
| 
| Works for me. As I said, I went by a precedent in other places. I'm of a
| mind to change the str + N things in the package file parsing to using
| strchr(str, ' ')+1 instead though, that would get rid of the problem.

that could be useful, yes.

-- 
Tollef Fog Heen                                                        ,''`.
UNIX is user friendly, it's just picky about who its friends are      : :' :
                                                                      `. `' 
                                                                        `-  



Reply to: