projects
/
svn42.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
424193c
)
added parameter to compress to skipĆ¼ length output
author
realraum
<realraum@realraum.at>
Wed, 1 Feb 2012 23:25:43 +0000
(23:25 +0000)
committer
realraum
<realraum@realraum.at>
Wed, 1 Feb 2012 23:25:43 +0000
(23:25 +0000)
rf433rcv/pc/compress.c
patch
|
blob
|
history
diff --git
a/rf433rcv/pc/compress.c
b/rf433rcv/pc/compress.c
index
41f85aa
..
1858a2e
100644
(file)
--- a/
rf433rcv/pc/compress.c
+++ b/
rf433rcv/pc/compress.c
@@
-4,7
+4,7
@@
#define MAX_RAM 502
-void main()
+void main(int argc, char ** argv )
{
unsigned char input[MAX_RAM*8+1];
unsigned char output[MAX_RAM];
@@
-29,6
+29,7
@@
void main()
output[i/8] |= 1<< (i%8);
}
len_net=htons(len);
- write(1,&len_net,sizeof(len_net));
+ if (argc==1)
+ write(1,&len_net,sizeof(len_net));
write(1,output, (len%8)?len/8+1:len/8);
}