linux-man.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Nicholas Mc Guire <der.herr-kA1LtwSENNE@public.gmane.org>
To: "Michael Kerrisk (man-pages)"
	<mtk.manpages-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Cc: linux-man-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: Re: [PATCH] getdirentries: Add a simple example rather than just referencing
Date: Mon, 14 Dec 2015 10:48:41 +0000	[thread overview]
Message-ID: <20151214104841.GA21533@osadl.at> (raw)
In-Reply-To: <566B1B6B.9010904-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>

On Fri, Dec 11, 2015 at 07:52:27PM +0100, Michael Kerrisk (man-pages) wrote:
> Hello Nicholas,
> 
> On 11/10/2015 12:13 PM, Nicholas Mc Guire wrote:
> > The manpage of getdirentries basically just repeats the limited information
> > from dirent.h and does not explain the content of the returned buffer.
> 
> Agreed that an example in the page would be helpful.
> 
> > Further it refers the reader to "the Linux library source code for details", 
> > which is not really that helpful - a simple example including the need to
> > check available fields, and showing that the returned buffer contains 
> > struct direntries would simplify things.
> 
> There's a number of problems with the example program, starting with
> 
> $ cc -Wall  h.c
> h.c: In function ?main?:
> h.c:31:17: warning: format ?%llu? expects argument of type ?long long unsigned int?, but argument 3 has type ?int? [-Wformat=]
>                  );
> 
> Also, the program won't compile at all if _DIRENT_HAVE_D_TYPE happens 
> to be undefined.
> 
> There's also a rendering issue for the code when placed into a man page:
> the backslashes must be doubled (e.g., "\\n")
>
thanks for the feedback - looks like this needs some rework - will go 
fix things up and try a second - hopefully more useful version.

thx!
hofrat
--
To unsubscribe from this list: send the line "unsubscribe linux-man" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

      parent reply	other threads:[~2015-12-14 10:48 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-11-10 11:13 [PATCH] getdirentries: Add a simple example rather than just referencing Nicholas Mc Guire
     [not found] ` <1447153987-1742-1-git-send-email-der.herr-kA1LtwSENNE@public.gmane.org>
2015-12-11 18:52   ` Michael Kerrisk (man-pages)
     [not found]     ` <566B1B6B.9010904-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2015-12-14 10:48       ` Nicholas Mc Guire [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20151214104841.GA21533@osadl.at \
    --to=der.herr-ka1ltwsenne@public.gmane.org \
    --cc=linux-man-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=mtk.manpages-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).