Microchip Technology XC8 Standard Compiler (Workstation) SW006021-1 SW006021-1 ユーザーズマニュアル

製品コード
SW006021-1
ページ / 518
MPLAB
®
 XC8 C Compiler User’s Guide
DS52053B-page 372
 2012 Microchip Technology Inc.
TIME 
Synopsis
#include <time.h>
 
time_t time (time_t * t)
Description
This function is not provided as it is dependent on the target system supplying the cur-
rent time. This function will be user implemented. When implemented, this function 
should return the current time in seconds since 00:00:00 on Jan 1, 1970. If the argu-
ment 
t
 is not equal to NULL, the same value is stored into the object pointed to by 
t
.
Example
#include <stdio.h>
#include <time.h>
void
main (void)
{
    time_t clock;
    time(&clock);
    printf("%s", ctime(&clock));
}
See Also
ctime()
, gmtime(), localtime(), asctime()
Return Value
This routine when implemented will return the current time in seconds since 00:00:00 
on Jan 1, 1970.
Note
The 
time()
 routine is not supplied, if required the user will have to implement this 
routine to the specifications outlined above.
TOLOWER, TOUPPER, TOASCII 
Synopsis
#include <ctype.h>
 
char toupper (int c)
char tolower (int c)
char toascii (int c)
Description
The 
toupper()
 function converts its lower case alphabetic argument to upper case, the 
tolower()
 routine performs the reverse conversion and the 
toascii()
 macro returns 
a result that is guaranteed in the range 0-0177. The functions 
toupper()
 and 
tolower()
 return their arguments if it is not an alphabetic character.