This is the mail archive of the mailing list for the GCC project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

libiberty documentation

I've started poking at adding documentation for libiberty, starting
with a chunk written by Phil Edwards.  Drawing on some techniques we
use for BFD and DJGPP, I'm thinking of embedding the documentation
within the source files.  No surprise, they already have some.
However, the built-in docs are not texinfo.  Is there some standard
here?  Is there any reason not to switch the in-docs to texinfo?  I'm
thinking of files like this example (with the @node line munged by a
script that builds the *.texi files).  Comments?

/* memcpy (the standard C function)
   This function is in the public domain.  */

@node memcpy, updates

@subheading Syntax

#include <string.h>

void *memcpy(void *dest, const void *src, int num);
@end example

@subheading Description

This function copies @var{num} bytes from @var{source} to @var{dest}.
It assumes that the source and destination regions don't overlap; if you
need to copy overlapping regions, use @code{memmove} instead.

@subheading Return Value


#include <ansidecl.h>
#ifdef __STDC__
#include <stddef.h>
#define size_t unsigned long

DEFUN(memcpy, (out, in, length), PTR out AND const PTR in AND size_t length)
    bcopy(in, out, length);
    return out;

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]