From ffd03521a3e504bf106959b8b3811fae6147a159 Mon Sep 17 00:00:00 2001 From: realraum Date: Wed, 1 Feb 2012 23:25:43 +0000 Subject: [PATCH] =?utf8?q?added=20parameter=20to=20compress=20to=20skip=C3=BC?= =?utf8?q?=20length=20output?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- rf433rcv/pc/compress.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) 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); } -- 1.7.10.4