ubinos
ubiclib.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2009 Sung Ho Park
3  Contact: ubinos.org@gmail.com
4 
5  This file is part of the itf_ubinos component of the Ubinos.
6 
7  GNU General Public License Usage
8  This file may be used under the terms of the GNU
9  General Public License version 3.0 as published by the Free Software
10  Foundation and appearing in the file license_gpl3.txt included in the
11  packaging of this file. Please review the following information to
12  ensure the GNU General Public License version 3.0 requirements will be
13  met: http://www.gnu.org/copyleft/gpl.html.
14 
15  GNU Lesser General Public License Usage
16  Alternatively, this file may be used under the terms of the GNU Lesser
17  General Public License version 2.1 as published by the Free Software
18  Foundation and appearing in the file license_lgpl.txt included in the
19  packaging of this file. Please review the following information to
20  ensure the GNU Lesser General Public License version 2.1 requirements
21  will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
22 
23  Commercial Usage
24  Alternatively, licensees holding valid commercial licenses may
25  use this file in accordance with the commercial license agreement
26  provided with the software or, alternatively, in accordance with the
27  terms contained in a written agreement between you and rightful owner.
28  */
29 
30 #ifndef UBICLIB_H_
31 #define UBICLIB_H_
32 
33 #ifdef __cplusplus
34 extern "C"
35 {
36 #endif
37 
46 #include <ubinos_config.h>
47 #include <ubinos/type.h>
48 
60 int ubiclib_comp_init(void);
61 
71 int ubiclib_comp_init_reent(void);
72 
86 char * itoa(int value, char * buf, int max);
87 
101 char * itoah(int value, char * buf, int max);
102 
110 int htobi(int value);
111 
125 char * uitoa(unsigned int value, char * buf, int max);
126 
140 char * uitoa_nosocheck(unsigned int value, char * buf, int max);
141 
155 char * uitoah(unsigned int value, char * buf, int max);
156 
170 char * uitoah_nosocheck(unsigned int value, char * buf, int max);
171 
179 unsigned int htobui(unsigned int value);
180 
188 int ahtoi(const char * buf);
189 
197 long ahtol(const char * buf);
198 
206 unsigned int atoui(const char * buf);
207 
215 unsigned long atoul(const char * buf);
216 
224 unsigned int ahtoui(const char * buf);
225 
233 unsigned long ahtoul(const char * buf);
234 
235 #undef toupper
236 #undef tolower
237 
245 int toupper(int c);
246 
254 int tolower(int c);
255 
257 #define max(a,b) ((a) > (b) ? (a) : (b))
258 
260 #define min(a,b) ((a) < (b) ? (a) : (b))
261 
274 int memset0(void * dst, size_t num);
275 
285 unsigned int uipow(unsigned int x, unsigned int y);
286 
297 unsigned int uidiv_ceil(register unsigned int x, register unsigned int d);
298 
307 unsigned int uilzc(register unsigned int x);
308 
317 unsigned int uilsb(register unsigned int x);
318 
327 unsigned int uilog2_ceil(register unsigned int x);
328 
337 unsigned int uilog2_floor(register unsigned int x);
338 
347 unsigned int uinlp2(register unsigned int x);
348 
357 unsigned int uienlp2(register unsigned int x);
358 
367 unsigned int uimsb(register unsigned int x);
368 
377 unsigned int uiones(register unsigned int x);
378 
379 #include <ubinos/ubiclib/logm.h>
380 #include <ubinos/ubiclib/bitmap.h>
381 #include <ubinos/ubiclib/cirbuf.h>
382 #include <ubinos/ubiclib/dlist.h>
383 #include <ubinos/ubiclib/edlist.h>
384 #include <ubinos/ubiclib/heap.h>
385 #include <ubinos/ubiclib/list.h>
386 #include <ubinos/ubiclib/stdlib.h>
387 #include <ubinos/ubiclib/cli.h>
388 
389 #ifdef __cplusplus
390 }
391 #endif
392 
393 #endif /* UBICLIB_H_ */
cirbuf.h
ubiclib circular buffer API
uitoah
char * uitoah(unsigned int value, char *buf, int max)
bitmap.h
ubiclib bitmap API
ahtol
long ahtol(const char *buf)
dlist.h
ubiclib double linked list API
ahtoul
unsigned long ahtoul(const char *buf)
uimsb
unsigned int uimsb(register unsigned int x)
uilzc
unsigned int uilzc(register unsigned int x)
uitoa
char * uitoa(unsigned int value, char *buf, int max)
tolower
int tolower(int c)
type.h
ubinos basic data type
max
#define max(a, b)
Definition: ubiclib.h:257
atoui
unsigned int atoui(const char *buf)
uiones
unsigned int uiones(register unsigned int x)
uilog2_ceil
unsigned int uilog2_ceil(register unsigned int x)
uitoah_nosocheck
char * uitoah_nosocheck(unsigned int value, char *buf, int max)
uitoa_nosocheck
char * uitoa_nosocheck(unsigned int value, char *buf, int max)
htobi
int htobi(int value)
uinlp2
unsigned int uinlp2(register unsigned int x)
itoah
char * itoah(int value, char *buf, int max)
ubiclib_comp_init_reent
int ubiclib_comp_init_reent(void)
itoa
char * itoa(int value, char *buf, int max)
uipow
unsigned int uipow(unsigned int x, unsigned int y)
uienlp2
unsigned int uienlp2(register unsigned int x)
memset0
int memset0(void *dst, size_t num)
ahtoui
unsigned int ahtoui(const char *buf)
edlist.h
ubiclib embedded double linked list API
htobui
unsigned int htobui(unsigned int value)
ahtoi
int ahtoi(const char *buf)
cli.h
ubiclib command line interface API
logm.h
ubiclib (Ubinos C Library) 컴포넌트 로그 메세지 인터페이스
atoul
unsigned long atoul(const char *buf)
uidiv_ceil
unsigned int uidiv_ceil(register unsigned int x, register unsigned int d)
uilog2_floor
unsigned int uilog2_floor(register unsigned int x)
stdlib.h
stdlib (Standard Library) API
list.h
ubiclib list API
toupper
int toupper(int c)
uilsb
unsigned int uilsb(register unsigned int x)
heap.h
ubiclib heap API
ubiclib_comp_init
int ubiclib_comp_init(void)