/[rdesktop]/sourceforge.net/branches/seamlessrdp-branch/rdesktop/xwin.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/branches/seamlessrdp-branch/rdesktop/xwin.c

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

revision 1022 by jsorg71, Thu Sep 29 03:34:33 2005 UTC revision 1029 by astrand, Fri Nov 18 22:46:38 2005 UTC
# Line 2445  ui_draw_text(uint8 font, uint8 flags, ui Line 2445  ui_draw_text(uint8 font, uint8 flags, ui
2445                  switch (text[i])                  switch (text[i])
2446                  {                  {
2447                          case 0xff:                          case 0xff:
2448                                  if (i + 2 < length)                                  if (i + 3 > length)
                                         cache_put_text(text[i + 1], text, text[i + 2]);  
                                 else  
2449                                  {                                  {
2450                                          error("this shouldn't be happening\n");                                          /* short command, skip */
2451                                          exit(1);                                          i = length = 0;
2452                                            break;
2453                                  }                                  }
2454                                    cache_put_text(text[i + 1], text, text[i + 2]);
2455                                    i += 3;
2456                                    length -= i;
2457                                  /* this will move pointer from start to first character after FF command */                                  /* this will move pointer from start to first character after FF command */
2458                                  length -= i + 3;                                  text = &(text[i]);
                                 text = &(text[i + 3]);  
2459                                  i = 0;                                  i = 0;
2460                                  break;                                  break;
2461    
2462                          case 0xfe:                          case 0xfe:
2463                                    if (i + 3 > length)
2464                                    {
2465                                            /* short command, skip */
2466                                            i = length = 0;
2467                                            break;
2468                                    }
2469                                  entry = cache_get_text(text[i + 1]);                                  entry = cache_get_text(text[i + 1]);
2470                                  if (entry != NULL)                                  if (entry != NULL)
2471                                  {                                  {
# Line 2473  ui_draw_text(uint8 font, uint8 flags, ui Line 2480  ui_draw_text(uint8 font, uint8 flags, ui
2480                                          for (j = 0; j < entry->size; j++)                                          for (j = 0; j < entry->size; j++)
2481                                                  DO_GLYPH(((uint8 *) (entry->data)), j);                                                  DO_GLYPH(((uint8 *) (entry->data)), j);
2482                                  }                                  }
2483                                  if (i + 2 < length)                                  i += 3;
                                         i += 3;  
                                 else  
                                         i += 2;  
2484                                  length -= i;                                  length -= i;
2485                                  /* this will move pointer from start to first character after FE command */                                  /* this will move pointer from start to first character after FE command */
2486                                  text = &(text[i]);                                  text = &(text[i]);

Legend:
Removed from v.1022  
changed lines
  Added in v.1029

  ViewVC Help
Powered by ViewVC 1.1.26