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

  man pages->Tru64 Unix man pages -> copystr (9r)              



NAME    [Toc]    [Back]

       copystr  -  General:  Copies  a  null-terminated character
       string with a specified limit

SYNOPSIS    [Toc]    [Back]

       int copystr(
               char *s1,
               char *s2,
               u_int maxlength,
               u_int *ncopiedaddr );

ARGUMENTS    [Toc]    [Back]

       Specifies a pointer to a string (an  array  of  characters
       terminated by a null character).  Specifies a pointer to a
       buffer of at least maxlength  characters.   Specifies  the
       maximum  number  of  characters  to  copy.   Specifies the
       address of an integer to  receive  the  number  of  copied

DESCRIPTION    [Toc]    [Back]

       The copystr routine copies string s1 to the buffer pointed
       to by s2. The routine stops after copying a null character
       or  after  copying  maxlength  characters, whichever comes
       first. The s2 buffer is not padded with null characters to

       The  copystr  routine  returns  the  number  of characters
       copied in the location pointed  to  by  ncopiedaddr.  Note
       that the character size is 1 byte.

RETURN VALUES    [Toc]    [Back]

       Upon  successful  completion,  copystr returns the value 0
       (zero). Otherwise, it can return the following error:  The
       string  length,  s1, exceeds the maximum number of characters,

SEE ALSO    [Toc]    [Back]

       Routines: bcopy(9r), blkclr(9r), ovbcopy(9r),  strcpy(9r),

[ Back ]
 Similar pages
Name OS Title
strcpy Tru64 General: Copies a null-terminated character string
copyoutstr Tru64 General: Copies a null-terminated string from a kernel address space to a user address space
copyinstr Tru64 General: Copies a null-terminated string from a user address space to a kernel address space
strcmp Tru64 General: Compares two null-terminated character strings
ovbcopy Tru64 General: Copies a byte string with a specified limit
bcopy Tru64 General: Copies a series of bytes with a specified limit
repeat IRIX Concatenates several copies of a string
wcsrtombs NetBSD converts a wide character string to a multibyte character string (restartable)
mbsrtowcs NetBSD converts a multibyte character string to a wide character string (restartable)
copy_to_phys Tru64 General: Copies data from a virtual address to a physical address
Copyright © 2004-2005 DeniX Solutions SRL
newsletter delivery service