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
asctime.c
Package: vxwork_src.rar [view]
Upload User: nvosite88
Upload Date: 2007-01-17
Package Size: 4983k
Code Size: 2k
Category:
VxWorks
Development Platform:
C/C++
- /* asctime.c - asctime file for time.h */
- /* Copyright 1992-1999 Wind River Systems, Inc. */
- /*
- modification history
- --------------------
- 01d,12mar99,p_m Fixed SPR 8225 by putting asctime output in uppercase.
- 01c,05feb93,jdi documentation cleanup for 5.1.
- 01b,20sep92,smb documentation additions
- 01a,25jul92,smb written.
- */
- /*
- DESCRIPTION
- INCLUDE FILE: time.h
- SEE ALSO: American National Standard X3.159-1989
- NOMANUAL
- */
- #include "vxWorks.h"
- #include "time.h"
- #include "private/timeP.h"
- /****************************************************************************
- *
- * asctime - convert broken-down time into a string (ANSI)
- *
- * This routine converts the broken-down time pointed to by <timeptr> into a
- * string of the form:
- * .CS
- * SUN SEP 16 01:03:52 1973ene0
- * .CE
- *
- * INCLUDE FILES: time.h
- *
- * RETURNS: A pointer to the created string.
- */
- char * asctime
- (
- const struct tm *timeptr /* broken-down time */
- )
- {
- size_t len = sizeof (ASCBUF);
- static char asctimeBuf [sizeof (ASCBUF)];
- asctime_r (timeptr, asctimeBuf, &len);
- return (asctimeBuf);
- }
- /****************************************************************************
- *
- * asctime_r - convert broken-down time into a string (POSIX)
- *
- * This routine converts the broken-down time pointed to by <timeptr> into a
- * string of the form:
- * .CS
- * SUN SEP 16 01:03:52 1973ene0
- * .CE
- * The string is copied to <asctimeBuf>.
- *
- * This routine is the POSIX re-entrant version of asctime().
- *
- * INCLUDE FILES: time.h
- *
- * RETURNS: The size of the created string.
- */
- int asctime_r
- (
- const struct tm *timeptr, /* broken-down time */
- char * asctimeBuf, /* buffer to contain string */
- size_t * buflen /* size of buffer */
- )
- {
- size_t size;
- size = strftime (asctimeBuf,
- *buflen,
- "%a %b %d %H:%M:%S %Yn",
- timeptr);
- return ((int) size);
- }