*nix Documentation Project
·  Home
 +   man pages
·  Linux HOWTOs
·  FreeBSD Tips
·  *niX Forums

  man pages->IRIX man pages -> copylist (3g)              


copylist(3G)							  copylist(3G)

NAME    [Toc]    [Back]

     copylist -	copy a file into memory

SYNOPSIS    [Toc]    [Back]

     cc	[flag ...] file	...  -lgen [library ...]

     #include <libgen.h>

     char *copylist (const char	*filenm<b>, off_t *szptr<b>);

DESCRIPTION    [Toc]    [Back]

     copylist copies a list of items from a file into freshly allocated
     memory, replacing new-lines with null characters.	It expects two
     arguments:	a pointer filenm to the	name of	the file to be copied, and a
     pointer szptr to a	variable where the size	of the file will be stored.

     Upon success, copylist returns a pointer to the memory allocated.
     Otherwise it returns NULL if it has trouble finding the file, calling
     malloc, or	opening	the file.

EXAMPLES    [Toc]    [Back]

     /*	read "file" into buf */
     off_t size;
     char *buf;
     buf = copylist("file", &size);
     for (i = 0; i < size; i++)

SEE ALSO    [Toc]    [Back]


									PPPPaaaaggggeeee 1111
[ Back ]
 Similar pages
Name OS Title
scp OpenBSD secure copy (remote file copy program)
scp FreeBSD secure copy (remote file copy program)
memmove Linux copy memory area
memccpy Linux copy memory area
memcpy Linux copy memory area
pmap_copy_page FreeBSD copy physical memory pages
pmap_copy FreeBSD copy physical memory pages
efi_cp HP-UX copy to or from EFI file
rcp HP-UX remote file copy
cpio IRIX copy file archives in and out
Copyright © 2004-2005 DeniX Solutions SRL
newsletter delivery service