projects
/
fw
/
sdcc
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
fixed 64 bit hosts
[fw/sdcc]
/
device
/
lib
/
_fs2schar.c
1
#include <float.h>
2
3
/* convert float to signed char */
4
signed char __fs2schar (float f) {
5
signed long sl=__fs2slong(f);
6
if (sl>=CHAR_MAX)
7
return CHAR_MAX;
8
if (sl<=CHAR_MIN)
9
return -CHAR_MIN;
10
return sl;
11
}