06.08.2013 Views

pSOSystem System Calls - Read

pSOSystem System Calls - Read

pSOSystem System Calls - Read

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

pREPC+ <strong>System</strong> <strong>Calls</strong> strncpy<br />

strncpy Copies characters from one string to another.<br />

#include <br />

char *strncpy(<br />

char *s1, /* destination string */<br />

const char *s2, /* source string */<br />

size_t n /* source length */<br />

)<br />

Description<br />

Arguments<br />

Return Value<br />

Error Codes<br />

Notes<br />

This function copies up to n characters from one string (s2) to another string (s1). If<br />

the length of the source string is less than the specified number of characters, null<br />

characters are copied into the destination string until the specified number have<br />

been written. If the length of the source string is greater than or equal to the<br />

specified number of characters, no null characters are appended to s1.<br />

s1 Points to the destination string.<br />

s2 Points to the source string.<br />

n Specifies the number of characters write.<br />

This function returns the value of s1.<br />

Refer to Appendix B.<br />

Callable From<br />

■ Task<br />

■ ISR<br />

<strong>pSO<strong>System</strong></strong> <strong>System</strong> <strong>Calls</strong> 3-159<br />

3

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!