OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [rtos/] [ecos-3.0/] [packages/] [language/] [c/] [libc/] [time/] [current/] [include/] [timeutil.h] - Blame information for rev 786

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 786 skrzyp
#ifndef CYGONCE_LIBC_TIME_TIMEUTIL_H
2
#define CYGONCE_LIBC_TIME_TIMEUTIL_H
3
//========================================================================
4
//
5
//      timeutil.h
6
//
7
//      ISO C date and time implementation support functions
8
//
9
//========================================================================
10
// ####ECOSGPLCOPYRIGHTBEGIN####                                            
11
// -------------------------------------------                              
12
// This file is part of eCos, the Embedded Configurable Operating System.   
13
// Copyright (C) 1998, 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
14
//
15
// eCos is free software; you can redistribute it and/or modify it under    
16
// the terms of the GNU General Public License as published by the Free     
17
// Software Foundation; either version 2 or (at your option) any later      
18
// version.                                                                 
19
//
20
// eCos is distributed in the hope that it will be useful, but WITHOUT      
21
// ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or    
22
// FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License    
23
// for more details.                                                        
24
//
25
// You should have received a copy of the GNU General Public License        
26
// along with eCos; if not, write to the Free Software Foundation, Inc.,    
27
// 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.            
28
//
29
// As a special exception, if other files instantiate templates or use      
30
// macros or inline functions from this file, or you compile this file      
31
// and link it with other works to produce a work based on this file,       
32
// this file does not by itself cause the resulting work to be covered by   
33
// the GNU General Public License. However the source code for this file    
34
// must still be made available in accordance with section (3) of the GNU   
35
// General Public License v2.                                               
36
//
37
// This exception does not invalidate any other reasons why a work based    
38
// on this file might be covered by the GNU General Public License.         
39
// -------------------------------------------                              
40
// ####ECOSGPLCOPYRIGHTEND####                                              
41
//========================================================================
42
//#####DESCRIPTIONBEGIN####
43
//
44
// Author(s):    jlarmour
45
// Contributors: jlarmour
46
// Date:         1999-03-03
47
// Purpose:      Provide declarations for support functions used by the
48
//               ISO C date and time implementation
49
// Description:   
50
// Usage:        #include <cyg/libc/time/timeutil.h>
51
//
52
//####DESCRIPTIONEND####
53
//
54
//========================================================================
55
 
56
// INCLUDES
57
 
58
#include <cyg/infra/cyg_type.h>    // Common type definitions and support
59
 
60
#ifdef __cplusplus
61
extern "C" {
62
#endif
63
 
64
// GLOBALS
65
 
66
// Strings of the days and month names
67
// FIXME: should comment out "const" in multi-dimensional arrays until
68
// PR 19440 is fixed
69
extern const char cyg_libc_time_day_name[7][10];
70
extern const cyg_uint8 cyg_libc_time_day_name_len[7];
71
extern const char cyg_libc_time_month_name[12][10];
72
extern const cyg_uint8 cyg_libc_time_month_name_len[12];
73
 
74
// number of days in each month, defined for normal and leap years
75
extern const cyg_uint8 cyg_libc_time_month_lengths[2][12];
76
 
77
 
78
// FUNCTION PROTOTYPES
79
 
80
////////////////////////////////////////
81
// cyg_libc_time_normalize_structtm() //
82
////////////////////////////////////////
83
//
84
// cyg_libc_time_normalize_structtm() will adjust the fields of a struct tm
85
// so that they are within the normal ranges expected.
86
// tm_wday, tm_yday, and tm_isdst are ignored
87
 
88
extern void
89
cyg_libc_time_normalize_structtm( struct tm *__timeptr );
90
 
91
//////////////////////////
92
// cyg_libc_time_itoa() //
93
//////////////////////////
94
//
95
// This converts num to a string and puts it into s padding with
96
// "0"'s if padzero is set, or spaces otherwise if necessary.
97
// The number of chars written to s is returned
98
//
99
 
100
extern cyg_ucount8
101
cyg_libc_time_itoa( cyg_uint8 *__s, cyg_int32 __num, cyg_uint8 __width,
102
                    cyg_bool __padzero );
103
 
104
#ifdef __cplusplus
105
} // extern "C"
106
#endif
107
 
108
#endif // CYGONCE_LIBC_TIME_TIMEUTIL_H multiple inclusion protection
109
 
110
// EOF timeutil.h

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.