bug-gawk
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[bug-gawk] Possible errata in pdf version 4.2


From: bamber ward
Subject: [bug-gawk] Possible errata in pdf version 4.2
Date: Wed, 2 Jan 2019 15:00:33 +0000

~/gawk/prog-> gawk --version

GNU Awk 4.1.3, API: 1.1 (GNU MPFR 3.1.4, GNU MP 6.1.0)

Copyright (C) 1989, 1991-2015 Free Software Foundation.



In the pdf version of the manual ( version 4.2) there appears to be a
problem

with getpwent() and getgrent() in Chapter 10. Both functions return the
same result each time.

I give details for getpwent() only. In the call to getpwent() , after

_pw_init() _pw_count is 0 so the same result is returned each time. Should
the function be defined as follows:



      function getpwent()

       {

           _pw_init()

           while (_pw_count < _pw_total)

              {print _pw_bycount[++_pw_count]} # I always use braces

          return ""

}

I am probably missing something because if the function is defined this way
then endpwent() is no longer needed.



In 12.3 Caution there appears to be a typo i.e “noone”



I have ubuntu 16.4. In the Chapter 13 , everthing works fine for guide.awk
but the final translations are not made. I have unset LANGUAGE  but this
not alter matters. Perhaps you could suggest workarounds ( if any exist )
for this in future editions.This topic comes up fairly regularly in the
ubuntu forums.



 In 16.7.4 should -i inplace be -i inplace.awk for the Command Line
examples ?


reply via email to

[Prev in Thread] Current Thread [Next in Thread]