projects
/
vg.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
64 bit fract function
[vg.git]
/
vg_binstr.h
diff --git
a/vg_binstr.h
b/vg_binstr.h
index da41ce041a74881a01c9b63409ba6cc5a853f591..d6bfb83b40cff72b75352226a89b9c816d851800 100644
(file)
--- a/
vg_binstr.h
+++ b/
vg_binstr.h
@@
-12,8
+12,7
@@
static void vg_str_bin( const void *txt, void *bin, int size )
const u8 *src = txt;
u8 *dst = bin;
const u8 *src = txt;
u8 *dst = bin;
- for( u32 i=0; i<size/2; i++ )
- {
+ for( u32 i=0; i<size/2; i++ ){
dst[i] = (src[i*2+0]-VG_BINSTR_BASECHAR);
dst[i] |= (src[i*2+1]-VG_BINSTR_BASECHAR)<<4u;
}
dst[i] = (src[i*2+0]-VG_BINSTR_BASECHAR);
dst[i] |= (src[i*2+1]-VG_BINSTR_BASECHAR)<<4u;
}
@@
-24,8
+23,7
@@
static void vg_bin_str( const void *bin, void *txt, u32 size )
u8 *dst = txt;
const u8 *src = bin;
u8 *dst = txt;
const u8 *src = bin;
- for( u32 i=0; i<size; i++ )
- {
+ for( u32 i=0; i<size; i++ ){
dst[i*2+0] = VG_BINSTR_BASECHAR + ((src[i] ) & 0xf);
dst[i*2+1] = VG_BINSTR_BASECHAR + ((src[i]>>4u) & 0xf);
}
dst[i*2+0] = VG_BINSTR_BASECHAR + ((src[i] ) & 0xf);
dst[i*2+1] = VG_BINSTR_BASECHAR + ((src[i]>>4u) & 0xf);
}