Julien ÉLIE | 3 Jul 2007 14:41
Favicon

Reply or Printf?

Hi,

I was looking at the code of « nnrpd/group.c ».
I have a little question (perhaps stupid) but I wonder
what the difference is between the use of Reply()
and Printf() in the code.

For instance, there is
  Printf("%d No group specified\r\n", NNTP_FAIL_XGTITLE);
and
  Reply("%s %s\r\n", NOSUCHGROUP, group);

Are they interchangeable?
Or is there a best practice in INN coding style?

And, another question, when will NNTP_FAIL_XGTITLE be changed
in the code to NNTP_FAIL_AUTHINFO_BAD?
(the first occurrence in « group.c » does not seem to
be related to ANU-News)

--

-- 
Julien ÉLIE

« Videt non te diu. »

Julien ÉLIE | 4 Jul 2007 14:48
Favicon

Bootstrapping INN

Hi,

I am trying to bootstrap INN 2.5 but there is a
problem with:

make[1]: entrant dans le répertoire « /home/news/snapshots/svn/trunk/innfeed »
bison -y -d configfile.y
mv y.tab.h config_y.h
mv y.tab.c config_y.c
: configfile.l
mv lex.yy.c config_l.c
mv: ne peut évaluer `lex.yy.c': Aucun fichier ou répertoire de ce type
make[1]: *** [config_l.c] Erreur 1

In innfeed/Makefile:

config_l.c: configfile.l
        $(LEX) $?
        mv lex.yy.c config_l.c

And in config.log, I have:

LEX=':'

Is it normal (on a Debian Etch) or should something be fixed
in the Makefile?

--

-- 
Julien

(Continue reading)

Julien ÉLIE | 5 Jul 2007 09:31
Favicon

Test suite & MANIFEST

Hi,

I tried to use the test suite yesterday but some tests
are broken.  Here is how to fix them.

By the way, would it be possible to regenerate the
MANIFEST file?  At least two files are missing:
tests/data/etc/inn-bfx.conf
tests/data/etc/inntdx.conf

tests/overview/overview-t.c
---------------------------

 <at>  <at>  -120,7 +120,7  <at>  <at> 
 static bool
 overview_init(void)
 {
-    system("/bin/rm -r ov-tmp");
+    system("/bin/rm -rf ov-tmp");
     if (mkdir("ov-tmp", 0755))
         sysdie("Cannot mkdir ov-tmp");
     if (strcmp(innconf->ovmethod, "buffindexed") == 0)

tests/overview/xref-t.c
-----------------------

 <at>  <at>  -48,6 +48,7  <at>  <at> 
     system("/bin/rm -rf ov-tmp");
     if (mkdir("ov-tmp", 0755))
         sysdie("Cannot mkdir ov-tmp");
(Continue reading)

Julien ÉLIE | 18 Jul 2007 16:13
Favicon

Re: Test suite & MANIFEST

Answering to myself:
> By the way, would it be possible to regenerate the
> MANIFEST file?  At least two files are missing:
> tests/data/etc/inn-bfx.conf
> tests/data/etc/inn-tdx.conf

The problem is in the support/mkmanifest perl script.
In fact, there is an exclusion for "inn-*".
It should be ("inn-*.gz") or ("inn-CURRENT-*" and "inn-STABLE-*").

--

-- 
Julien ÉLIE

« Je ne suis ni pour ni contre, bien au contraire ! » (Coluche) 

Julien ÉLIE | 18 Jul 2007 16:19
Favicon

Re: Bootstrapping INN

Answering again to myself:
> I am trying to bootstrap INN 2.5 but there is a problem with:
>
> make[1]: entrant dans le répertoire « /home/news/snapshots/svn/trunk/innfeed »
> bison -y -d configfile.y
> mv y.tab.h config_y.h
> mv y.tab.c config_y.c
> : configfile.l
 ^^^

> And in config.log, I have:
>
> LEX=':'
>
>
> Is it normal (on a Debian Etch) or should something be fixed
> in the Makefile?

In fact, autoconf puts ':' instead of '' in programs.m4 (AC_PROG_LEX),
which triggered that error.
I only had to install flex to get rid of it.

So, no problem now.  The bootstrapping works very well.
Sorry for the disturbance.

--

-- 
Julien ÉLIE

« J'aurais pu faire forêt comble. » (Astérix) 

(Continue reading)

Julien ÉLIE | 18 Jul 2007 16:38
Favicon

POD documentation

Hi,

Just to let you know that I am currently converting to POD the existing storage.conf
documentation.  I shall update it meanwhile (especially with the information
discussed in news.software.nntp regarding the use of "!" and " <at> " which does not differ
from the usual uwildmat patterns).
I hope nobody is currently working on that.  Afterwards, I'll go on converting some
other ngroff files, so please tell me if you are already working on POD documentation.

By the way, I have two little questions:

* is there a preferred use between (for instance) "B<ctlinnd>" and "ctlinnd(8)" in
  the middle of a sentence?

* should it be written "if set to true" or "if set to C<true>"? (I see both of them in
  the current documentation -- and more generally, should C<> be more extensively used?)

--

-- 
Julien ÉLIE

« Le rire est une chose sérieuse avec laquelle il ne faut pas plaisanter. » (Raymond Devos) 

Peter Corlett | 18 Jul 2007 18:05
Picon

Re: POD documentation

On Wed, Jul 18, 2007 at 04:38:37PM +0200, Julien ÉLIE wrote:
[...]
> * is there a preferred use between (for instance) "B<ctlinnd>" and
> "ctlinnd(8)" in the middle of a sentence?

What's wrong with L<ctlinnd> to explicitly indicate it's a man page to the
POD reader, instead of leaving it to guess?

Russ Allbery | 18 Jul 2007 19:24
Picon
Favicon
Gravatar

Re: POD documentation

Peter Corlett <abuse <at> cabal.org.uk> writes:
> On Wed, Jul 18, 2007 at 04:38:37PM +0200, Julien ÉLIE wrote:
> [...]
>> * is there a preferred use between (for instance) "B<ctlinnd>" and
>> "ctlinnd(8)" in the middle of a sentence?

> What's wrong with L<ctlinnd> to explicitly indicate it's a man page to the
> POD reader, instead of leaving it to guess?

Because that doesn't include the section (which is required to create a
valid link) and doesn't tell POD that it's a link to a man page as opposed
to some other piece of POD documentation.

L<ctlinnd(8)> is fine, but it should be equivalent to ctlinnd(8) (although
that's somewhat controversial, and I don't mind if people want to add the
L<> for clarity).

--

-- 
Russ Allbery (rra <at> stanford.edu)             <http://www.eyrie.org/~eagle/>

    Please send questions to the list rather than mailing me directly.
     <http://www.eyrie.org/~eagle/faqs/questions.html> explains why.

Russ Allbery | 18 Jul 2007 19:22
Picon
Favicon
Gravatar

Re: POD documentation

Julien ÉLIE <julien <at> trigofacile.com> writes:

> By the way, I have two little questions:

> * is there a preferred use between (for instance) "B<ctlinnd>" and
>   "ctlinnd(8)" in the middle of a sentence?

Use B<ctlinnd> for general references to the ctlinnd program.  Use
ctlinnd(8) for specific references to the man page.  ctlinnd(8) gets a lot
of markup and I find it distracting for every reference to a program to be
a link to a man page.  People are generally able to go find the man page
if they have a specific question, and the link isn't useful unless
something about the text specifically points the user to go look at that
page.

> * should it be written "if set to true" or "if set to C<true>"? (I see
>   both of them in the current documentation -- and more generally, should
>   C<> be more extensively used?)

I usually try to use C<> for specific text and specific values, including
numbers (although I'm bad about always remembering to use it for numbers).
It shouldn't be used for general concepts.  In this case, "if set to true"
is usually talking about the general concept of a true value, given that
INN supports literal values of C<true>, C<on>, and C<1> that all mean the
same thing as the concept of true.  So I probably wouldn't use C<> there.

--

-- 
Russ Allbery (rra <at> stanford.edu)             <http://www.eyrie.org/~eagle/>

    Please send questions to the list rather than mailing me directly.
(Continue reading)

Julien ÉLIE | 18 Jul 2007 20:18
Favicon

Re: POD documentation

En réponse à Russ Allbery :
> Use B<ctlinnd> for general references to the ctlinnd program.  Use
> ctlinnd(8) for specific references to the man page.  ctlinnd(8) gets a lot
> of markup and I find it distracting for every reference to a program to be
> a link to a man page.

You're right.  It is most of the time enough to use B<ctlinnd>.

> I usually try to use C<> for specific text and specific values, including
> numbers (although I'm bad about always remembering to use it for numbers).
> It shouldn't be used for general concepts.

Got it.  Thanks.

--

-- 
Julien ÉLIE

« J'ai un copain, il est pilote d'essai... Enfin, il ne l'est pas encore ;
  pour l'instant, il essaie d'être pilote ! » (Raymond Devos) 


Gmane