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

Peter Dalgaard p.dalgaard at biostat.ku.dk
Tue Apr 7 18:58:40 CEST 2009


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



More information about the R-devel mailing list