home *** CD-ROM | disk | FTP | other *** search
/ Power-Programmierung / CD1.mdf / magazine / drdobbs / ddjcompr / urban / sendbits.c < prev    next >
C/C++ Source or Header  |  1991-04-29  |  482b  |  36 lines

  1. send_bits() {
  2.   unsigned int bit;
  3.   if(((high^low)&0x8000)==0) {
  4. #ifndef UN
  5.     send_bit(bit=(high&0x8000));
  6. #endif
  7.     shift_bits();
  8. #ifndef UN
  9.     while(k>0) {
  10.       send_bit(bit==0);
  11.       --k;
  12.     }
  13. #endif
  14.     while(((high^low)&0x8000)==0) {
  15. #ifndef UN
  16.       send_bit(high&0x8000);
  17. #endif
  18.       shift_bits();
  19.     }
  20.   }
  21.   while((low&0x4000)&&((high&0x4000)==0)) {
  22.     shift_bits();
  23. #ifdef UN
  24.     apoint^=0x8000;
  25. #else
  26.     ++k;
  27. #endif
  28.     low&=0x7fff;
  29.     high|=0x8000;
  30.   }
  31. }
  32.  
  33.  
  34.  
  35.  
  36.