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

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

revision 1030 by astrand, Wed Nov 23 12:49:37 2005 UTC revision 1031 by astrand, Wed Nov 23 13:26:29 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                                    /* At least two bytes needs to follow */
2449                                  if (i + 3 > length)                                  if (i + 3 > length)
2450                                  {                                  {
2451                                          /* short command, skip */                                          warning("Skipping short 0xff command:");
2452                                            for (j = 0; j < length; j++)
2453                                                    fprintf(stderr, "%02x ", text[j]);
2454                                            fprintf(stderr, "\n");
2455                                          i = length = 0;                                          i = length = 0;
2456                                          break;                                          break;
2457                                  }                                  }
# Line 2460  ui_draw_text(uint8 font, uint8 flags, ui Line 2464  ui_draw_text(uint8 font, uint8 flags, ui
2464                                  break;                                  break;
2465    
2466                          case 0xfe:                          case 0xfe:
2467                                  if (i + 3 > length)                                  /* At least one byte needs to follow */
2468                                    if (i + 2 > length)
2469                                  {                                  {
2470                                          /* short command, skip */                                          warning("Skipping short 0xfe command:");
2471                                            for (j = 0; j < length; j++)
2472                                                    fprintf(stderr, "%02x ", text[j]);
2473                                            fprintf(stderr, "\n");
2474                                          i = length = 0;                                          i = length = 0;
2475                                          break;                                          break;
2476                                  }                                  }
2477                                  entry = cache_get_text(text[i + 1]);                                  entry = cache_get_text(text[i + 1]);
2478                                  if (entry->data != NULL)                                  if (entry->data != NULL)
2479                                  {                                  {
2480                                          if ((((uint8 *) (entry->data))[1] ==                                          if ((((uint8 *) (entry->data))[1] == 0)
2481                                               0) && (!(flags & TEXT2_IMPLICIT_X)))                                              && (!(flags & TEXT2_IMPLICIT_X)) && (i + 2 < length))
2482                                          {                                          {
2483                                                  if (flags & TEXT2_VERTICAL)                                                  if (flags & TEXT2_VERTICAL)
2484                                                          y += text[i + 2];                                                          y += text[i + 2];
# Line 2480  ui_draw_text(uint8 font, uint8 flags, ui Line 2488  ui_draw_text(uint8 font, uint8 flags, ui
2488                                          for (j = 0; j < entry->size; j++)                                          for (j = 0; j < entry->size; j++)
2489                                                  DO_GLYPH(((uint8 *) (entry->data)), j);                                                  DO_GLYPH(((uint8 *) (entry->data)), j);
2490                                  }                                  }
2491                                  i += 3;                                  if (i + 2 < length)
2492                                            i += 3;
2493                                    else
2494                                            i += 2;
2495                                  length -= i;                                  length -= i;
2496                                  /* this will move pointer from start to first character after FE command */                                  /* this will move pointer from start to first character after FE command */
2497                                  text = &(text[i]);                                  text = &(text[i]);

Legend:
Removed from v.1030  
changed lines
  Added in v.1031

  ViewVC Help
Powered by ViewVC 1.1.26