chiark / gitweb /
yes, remove the debugging printfs
authorian <ian>
Wed, 5 Jan 2005 18:19:31 +0000 (18:19 +0000)
committerian <ian>
Wed, 5 Jan 2005 18:19:31 +0000 (18:19 +0000)
hostside/nmra.c

index dc9faa4b023efd12da07af12bad1d20c178a95fb..e6697daee387a60108c0857556bfd277dbed6343 100644 (file)
@@ -1,7 +1,6 @@
 /**/
 
 #include <assert.h>
-#include <stdio.h>
 
 #include "hostside.h"
 
@@ -17,11 +16,9 @@ void xmit_nmra_raw(const Byte *nmra_packet, int length) {
   working_qty= 15;   /*  are some data bits to encode, rest are clear. */
   /* we start with the 14-bit preamble and the packet start bit */
   for (;;) {
-fprintf(stderr,"l=%d w=%08x q=%-2d",length,working,working_qty);
     assert(working_qty >= 0);
     if (working_qty < 7) {
       if (length > 0) {
-fprintf(stderr," nmra=%02x",*nmra_packet);
        /* plonk new data bits just to right of old data bits */
        length--;
        newbits= *nmra_packet++;
@@ -29,22 +26,17 @@ fprintf(stderr," nmra=%02x",*nmra_packet);
        newbits |= !length; /* 9 bits, bottom one is `end of packet' */
        working |= (newbits << (7-working_qty));
        working_qty += 9;
-fprintf(stderr," nmra\n");
-continue;
       } else if (!working_qty) {
        /* all done */
-fprintf(stderr," alldone\n");
        break;
       } else {
        /* pad with exactly enough 1 bits to make up the encoded byte */
        working |= 0xffU << (8-working_qty);
        working_qty= 7;
-fprintf(stderr," pad\n");
       }
     }
     assert(encp < encoded + COMMAND_ENCODED_MAX);
     *encp++= (working >> 9) & 0x7f; /* top 7 bits, right-justified */
-fprintf(stderr," enc=%02x\n", encp[-1]);
     working <<= 7;
     working_qty -= 7;
   }