From p.dalgaard at biostat.ku.dk  Tue Apr  7 18:58:40 2009
From: p.dalgaard at biostat.ku.dk (Peter Dalgaard)
Date: Tue, 07 Apr 2009 18:58:40 +0200
Subject: [Rd] typo in R-ints.texi's description of P_ macro
In-Reply-To: <77EB52C6DD32BA4D87471DCD70C8D700FCDEA4@NA-PA-VBE03.na.tibco.com>
References: <77EB52C6DD32BA4D87471DCD70C8D700FCDEA4@NA-PA-VBE03.na.tibco.com>
Message-ID: <49DB8640.8090704@biostat.ku.dk>

William Dunlap wrote:
> I think there are some missing words in "R Internals"'s description of
> the P_ macro.
> It currently has "A macro as a wrapper for ngettext", which I think
> ought to be
> something like "The macro P_ may be used as a wrapper for ngettext".
> 
> The following patch also makes the 2 alternate definitions of P_ have
> the same argument names,
> StringS and StringP.  Expanding the S and P to Singular and Plural,
> would be more descriptive. 
> 
> Bill Dunlap
> TIBCO Software Inc - Spotfire Division
> wdunlap tibco.com 
> 
> 
> Index: doc/manual/R-ints.texi
> ===================================================================
> --- doc/manual/R-ints.texi      (revision 48294)
> +++ doc/manual/R-ints.texi      (working copy)
> @@ -2149,17 +2149,18 @@
>  @noindent
>  from @file{src/main/errors.c}.
> 
> -A macro
> +The @code{P_} macro
> 
>  @example
>  #ifdef ENABLE_NLS
>  #define P_(StringS, StringP, N) ngettext (StringS, StringP, N)
>  #else
> -#define P_(String, StringP, N) (N > 1 ? StringP: String)
> +#define P_(StringS, StringP, N) (N > 1 ? StringP: StringS)
>  #endif
>  @end example
> 
>  @noindent
> +may be used
>  as a wrapper for @code{ngettext}: however in some cases the preferred
>  approach has been to conditionalize (on @code{ENABLE_NLS}) code using
>  @code{ngettext}.
> 

OK, committed.

-- 
    O__  ---- Peter Dalgaard             ?ster Farimagsgade 5, Entr.B
   c/ /'_ --- Dept. of Biostatistics     PO Box 2099, 1014 Cph. K
  (*) \(*) -- University of Copenhagen   Denmark      Ph:  (+45) 35327918
~~~~~~~~~~ - (p.dalgaard at biostat.ku.dk)              FAX: (+45) 35327907



[Rd] typo in R-ints.texi's description of P_ macro
Peter Dalgaard