Code/Resource
Windows Develop
Linux-Unix program
Internet-Socket-Network
Web Server
Browser Client
Ftp Server
Ftp Client
Browser Plugins
Proxy Server
Email Server
Email Client
WEB Mail
Firewall-Security
Telnet Server
Telnet Client
ICQ-IM-Chat
Search Engine
Sniffer Package capture
Remote Control
xml-soap-webservice
P2P
WEB(ASP,PHP,...)
TCP/IP Stack
SNMP
Grid Computing
SilverLight
DNS
Cluster Service
Network Security
Communication-Mobile
Game Program
Editor
Multimedia program
Graph program
Compiler program
Compress-Decompress algrithms
Crypt_Decrypt algrithms
Mathimatics-Numerical algorithms
MultiLanguage
Disk/Storage
Java Develop
assembly language
Applications
Other systems
Database system
Embeded-SCM Develop
FlashMX/Flex
source in ebook
Delphi VCL
OS Develop
MiddleWare
MPI
MacOS develop
LabView
ELanguage
Software/Tools
E-Books
Artical/Document
strncat.c
Package: vxwork_src.rar [view]
Upload User: nvosite88
Upload Date: 2007-01-17
Package Size: 4983k
Code Size: 1k
Category:
VxWorks
Development Platform:
C/C++
- /* strncat.c - file for string */
- /* Copyright 1992-1993 Wind River Systems, Inc. */
- /*
- modification history
- --------------------
- 01c,25feb93,jdi documentation cleanup for 5.1.
- 01b,20sep92,smb documentation additions
- 01a,08jul92,smb written and documented.
- */
- /*
- DESCRIPTION
- INCLUDE FILES: string.h
- SEE ALSO: American National Standard X3.159-1989
- NOMANUAL
- */
- #include "vxWorks.h"
- #include "string.h"
- /*******************************************************************************
- *
- * strncat - concatenate characters from one string to another (ANSI)
- *
- * This routine appends up to <n> characters from string <src> to the
- * end of string <dst>.
- *
- * INCLUDE FILES: string.h
- *
- * RETURNS: A pointer to the null-terminated string <s1>.
- */
- char * strncat
- (
- char * dst, /* string to append to */
- const char * src, /* string to append */
- size_t n /* max no. of characters to append */
- )
- {
- if (n != 0)
- {
- char *d = dst;
- while (*d++ != EOS) /* find end of string */
- ;
- d--; /* rewind back of EOS */
- while (((*d++ = *src++) != EOS) && (--n > 0))
- ;
- if (n == 0)
- *d = EOS; /* NULL terminate string */
- }
- return (dst);
- }