Extended Char Intro: Use getwc in example (Bug 25626)

Message ID 502f1736-4604-1d7b-e4a7-234ad38820e9@redhat.com
State Committed
Commit b8de7980c06d97f36cdf4fe0871be7ec8ca58073
Headers

Commit Message

Carlos O'Donell March 5, 2020, 2:26 a.m. UTC
  Tested by building the pdf with make pdf and reading the
section to ensure it makes sense.

OK for master?

8< --- 8< --- 8<
In the "Extended Char Intro" the example incorrectly uses a function
called wgetc which doesn't exist.  The example is corrected to use
getwc, which is correct for the use in this case.

Reported-by: Toomas Rosin <toomas@rosin.ee>
---
 manual/charset.texi | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
  

Comments

Florian Weimer March 5, 2020, 6:30 a.m. UTC | #1
* Carlos O'Donell:

> diff --git a/manual/charset.texi b/manual/charset.texi
> index f6a980f6cb..9fd0166115 100644
> --- a/manual/charset.texi
> +++ b/manual/charset.texi
> @@ -186,7 +186,7 @@ are used:
>  @{
>    wint_t c;
>    @dots{}
> -  while ((c = wgetc (fp)) != WEOF)
> +  while ((c = getwc (fp)) != WEOF)
>      @dots{}
>  @}
>  @end smallexample

Okay.
  
Carlos O'Donell March 21, 2020, 2:47 a.m. UTC | #2
On 3/5/20 1:30 AM, Florian Weimer wrote:
> * Carlos O'Donell:
> 
>> diff --git a/manual/charset.texi b/manual/charset.texi
>> index f6a980f6cb..9fd0166115 100644
>> --- a/manual/charset.texi
>> +++ b/manual/charset.texi
>> @@ -186,7 +186,7 @@ are used:
>>  @{
>>    wint_t c;
>>    @dots{}
>> -  while ((c = wgetc (fp)) != WEOF)
>> +  while ((c = getwc (fp)) != WEOF)
>>      @dots{}
>>  @}
>>  @end smallexample
> 
> Okay.
> 

Pushed.
  

Patch

diff --git a/manual/charset.texi b/manual/charset.texi
index f6a980f6cb..9fd0166115 100644
--- a/manual/charset.texi
+++ b/manual/charset.texi
@@ -186,7 +186,7 @@  are used:
 @{
   wint_t c;
   @dots{}
-  while ((c = wgetc (fp)) != WEOF)
+  while ((c = getwc (fp)) != WEOF)
     @dots{}
 @}
 @end smallexample