Re: [nail-devel] New headline specifiers
Brought to you by:
gritter
From: MJ R. <mj...@ph...> - 2007-02-11 16:33:52
|
Gunnar Ritter <gu...@ac...> wrote: > MJ Ray <mj...@ph...> wrote: > > I spend bloody ages trying to decipher a comment-free chunk of cmd1.c > > code and all I get is rudeness in return? Sod that for a game of > > soldiers. > > Hey, you are the one who wants to have that feature > in mailx, not me. Also, you are the one who called > your code a hack. No, I wanted a similar feature (%I) and you asked me to code this one. Now I have this feature in my mailx and I'll have no problem maintaining it as a one-distribution patch until something similar appears. > All I insist is that you solve a problem such that > it also helps other people who have similar wishes, > and that you deliver code as good as you can. If > you speak of it as a hack, you clearly missed the > latter. I am willing to review and integrate your > code but not until it is ready in your own opinion. If it was not ready for review in my opinion, I would not have mailed it. However, I know it will contain errors, because the mailx code is underdocumented ye olde worlde C which is about as old as I am: a very different style of C to that which I learnt. I feel it's rudeness calling hacks useless and unreal. That first public draft is a hack, but I think it's a useful hack. > Regarding comments, people who write C code should > be able to read C code. So I find most of the comments > in your patch superfluous since what they state is > obvious from the code anyway. They're signposts for people who follow me. Names like B and fp are not descriptive. The comments may be stating the obvious to someone who knows the code, but road signs state the obvious to someone who knows the road but I'd still put road signs when I built a road. > > I've declared a fbuf > > too instead. I'm not sending a new patch yet because I still don't > > know what indent settings will avoid getting flamed. I don't see how > > the formatting of the last patch differs from existing code apart from > > omitted spaces around one of the = signs. > > See, you found one point yourself. There are more > missing spaces. Also, you are using C++/C99 comments. > Code should not exceed 80 character columns, and > there should be no more than one statement on a line > unless there is a very special reason for that. The reason was that i and pf must keep step, else the code that follows could go very odd. If you disagree, hitting enter is fairly easy. Anyway, the above tells me what not to do, but doesn't say what I should do. Are there any positive instructions besides reading the whole current code base? [...] > > > > and B, added fpp and I don't understand why I don't need to > > > > decrease subjlen. > > > > > > Who said that? Do it. > > > > When I do it, the subject ends well before the right end of the line. > > Is that the intended behaviour? > > No, of course not, there must be some bug then. There must be, but I can't tell where from for sure. Could it be from subjlen decreasing in the preceding for (fp = fmt; *fp; fp++) loop? > Btw, ac_alloc() implies ac_free(), otherwise you > try to free() something you got from alloca(). Thanks. Regards, -- MJ Ray - see/vidu http://mjr.towers.org.uk/email.html Somerset, England. Work/Laborejo: http://www.ttllp.co.uk/ IRC/Jabber/SIP: on request/peteble. |