/[rdesktop]/sourceforge.net/trunk/rdesktop/mppc.c
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Diff of /sourceforge.net/trunk/rdesktop/mppc.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 689 by n-ki, Tue May 4 09:48:45 2004 UTC revision 717 by astrand, Thu Jun 17 09:42:58 2004 UTC
# Line 59  int Line 59  int
59  mppc_expand(uint8 * data, uint32 clen, uint8 ctype, uint32 * roff, uint32 * rlen)  mppc_expand(uint8 * data, uint32 clen, uint8 ctype, uint32 * roff, uint32 * rlen)
60  {  {
61          int k, walker_len = 0, walker;          int k, walker_len = 0, walker;
62          int i = 0;          uint32 i = 0;
63          int next_offset, match_off;          int next_offset, match_off;
64          int match_len;          int match_len;
65          int old_offset, match_bits;          int old_offset, match_bits;
66    
67          signed char *dict = &(g_mppc_dict.hist);          uint8 *dict = g_mppc_dict.hist;
68    
69          if ((ctype & RDP_MPPC_COMPRESSED) == 0)          if ((ctype & RDP_MPPC_COMPRESSED) == 0)
70          {          {
# Line 279  mppc_expand(uint8 * data, uint32 clen, u Line 279  mppc_expand(uint8 * data, uint32 clen, u
279    
280                          match_bits = match_len;                          match_bits = match_len;
281                          match_len =                          match_len =
282                                  walker >> 32 - match_bits & ~(-1 << match_bits) | 1 << match_bits;                                  ((walker >> (32 - match_bits)) & (~(-1 << match_bits))) | (1 <<
283                                                                                               match_bits);
284                          walker <<= match_bits;                          walker <<= match_bits;
285                          walker_len -= match_bits;                          walker_len -= match_bits;
286                  }                  }
# Line 288  mppc_expand(uint8 * data, uint32 clen, u Line 289  mppc_expand(uint8 * data, uint32 clen, u
289                          return -1;                          return -1;
290                  }                  }
291                  /* memory areas can overlap - meaning we can't use memXXX functions */                  /* memory areas can overlap - meaning we can't use memXXX functions */
292                  k = next_offset - match_off & (RDP_MPPC_DICT_SIZE - 1);                  k = (next_offset - match_off) & (RDP_MPPC_DICT_SIZE - 1);
293                  do                  do
294                  {                  {
295                          dict[next_offset++] = dict[k++];                          dict[next_offset++] = dict[k++];

Legend:
Removed from v.689  
changed lines
  Added in v.717

  ViewVC Help
Powered by ViewVC 1.1.26