Mail Archives: djgpp-workers/2005/01/06/17:12:06
> Date: Thu, 06 Jan 2005 00:16:24 -0700
> From: Brian Inglis <Brian DOT Inglis AT SystematicSw DOT ab DOT ca>
>
> Here's a patch to src/libc/ansi/ctime.c, src/libc/ansi/ctime.txh,
> and include/libc/stubs.h to add POSIX thread safe functions
> asctime_r(), ctime_r(), gmtime_r(), and localtime_r().
Thanks.
> +++ src/libc/ansi/time/ctime.txh 6 Jan 2005 07:00:19 -0000
> @@ -13,6 +13,7 @@ char *ctime(const time_t *cal);
> This function returns an ASCII representation of the time in @var{cal}.
> This is equivalent to @code{asctime(localtime(cal))}. @xref{asctime}.
> @xref{localtime}.
> +@xref{ctime_r}.
Why did you add this 3rd cross-reference? The other two are there
because ctime is explained in terms of calling those two functions;
by contrast, ctime_r is not mentioned anywhere in the text.
If you wanted a ``see-also'' type of reference, that is okay, but
please add some text that would explain why you think it is useful for
the reader to look there. In other words, give the readers enough
information to decide whether they want to read about the referenced
function.
> +This is equivalent to @code{asctime_r(localtime_r(cal,&tm), buf)},
> +where @var{tm} is automatically/dynamically allocated.
This text is confusing wrt the "&tm" part. I suggest to reword like
this:
This is equivalent to @code{asctime_r(localtime_r(cal,&tm), buf)},
where @var{tm} is a variable of the type @code{struct tm}.
> +@xref{asctime_r}.
> +@xref{localtime_r}.
> +@xref{ctime}.
See above about the 3rd xref.
> +This function returns an ASCII representation,
> +as generated by @ref{asctime},
> +of the broken down calendar time from @var{tptr},
I'd advise against such ``clever'' uses of @ref (they look awkard in
Info and simply wrong in the printed copy of the manual). Instead,
say something like
This function returns an ASCII representation of the broken down
calendar time from @var{tptr}, which is identical to the one
generated by @code{asctime} (@pxref{asctime}),
> +See @ref{gmtime}, for the description of @code{struct tm}.
"See @ref" is exactly equivalent to "@xref", so please use the latter
here. (Yes, I know that "See @ref" is used elsewhere in the manual;
feel free to fix those other places as well, if you have time and
energy.)
Thanks again for working on this.
- Raw text -