From: realraum Date: Wed, 1 Feb 2012 23:25:43 +0000 (+0000) Subject: added parameter to compress to skipĆ¼ length output X-Git-Url: https://git.realraum.at/?a=commitdiff_plain;h=ffd03521a3e504bf106959b8b3811fae6147a159;p=svn42.git added parameter to compress to skipĆ¼ length output --- diff --git a/rf433rcv/pc/compress.c b/rf433rcv/pc/compress.c index 41f85aa..1858a2e 100644 --- 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); }