/[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 1041 by astrand, Tue Jan 24 12:25:49 2006 UTC
# Line 92  extern BOOL g_rdpsnd; Line 92  extern BOOL g_rdpsnd;
92  #define PROP_MOTIF_WM_HINTS_ELEMENTS    5  #define PROP_MOTIF_WM_HINTS_ELEMENTS    5
93  typedef struct  typedef struct
94  {  {
95          uint32 flags;          unsigned long flags;
96          uint32 functions;          unsigned long functions;
97          uint32 decorations;          unsigned long decorations;
98          sint32 inputMode;          long inputMode;
99          uint32 status;          unsigned long status;
100  }  }
101  PropMotifWmHints;  PropMotifWmHints;
102    
# Line 802  translate24to32(const uint8 * data, uint Line 802  translate24to32(const uint8 * data, uint
802  #else  #else
803                  REPEAT4                  REPEAT4
804                  (                  (
805                          *((uint32 *) out) = *((uint32 *) data);                   /* Only read 3 bytes. Reading 4 bytes means reading beyond buffer. */
806                          out += 4;                   *((uint32 *) out) = *((uint16 *) data) + (*((uint8 *) data + 2) << 16);
807                          data += 3;                   out += 4;
808                     data += 3;
809                  )                  )
810  #endif  #endif
811                  /* *INDENT-ON* */                  /* *INDENT-ON* */
# Line 2445  ui_draw_text(uint8 font, uint8 flags, ui Line 2446  ui_draw_text(uint8 font, uint8 flags, ui
2446                  switch (text[i])                  switch (text[i])
2447                  {                  {
2448                          case 0xff:                          case 0xff:
2449                                    /* At least two bytes needs to follow */
2450                                  if (i + 3 > length)                                  if (i + 3 > length)
2451                                  {                                  {
2452                                          /* short command, skip */                                          warning("Skipping short 0xff command:");
2453                                            for (j = 0; j < length; j++)
2454                                                    fprintf(stderr, "%02x ", text[j]);
2455                                            fprintf(stderr, "\n");
2456                                          i = length = 0;                                          i = length = 0;
2457                                          break;                                          break;
2458                                  }                                  }
# Line 2460  ui_draw_text(uint8 font, uint8 flags, ui Line 2465  ui_draw_text(uint8 font, uint8 flags, ui
2465                                  break;                                  break;
2466    
2467                          case 0xfe:                          case 0xfe:
2468                                  if (i + 3 > length)                                  /* At least one byte needs to follow */
2469                                    if (i + 2 > length)
2470                                  {                                  {
2471                                          /* short command, skip */                                          warning("Skipping short 0xfe command:");
2472                                            for (j = 0; j < length; j++)
2473                                                    fprintf(stderr, "%02x ", text[j]);
2474                                            fprintf(stderr, "\n");
2475                                          i = length = 0;                                          i = length = 0;
2476                                          break;                                          break;
2477                                  }                                  }
2478                                  entry = cache_get_text(text[i + 1]);                                  entry = cache_get_text(text[i + 1]);
2479                                  if (entry->data != NULL)                                  if (entry->data != NULL)
2480                                  {                                  {
2481                                          if ((((uint8 *) (entry->data))[1] ==                                          if ((((uint8 *) (entry->data))[1] == 0)
2482                                               0) && (!(flags & TEXT2_IMPLICIT_X)))                                              && (!(flags & TEXT2_IMPLICIT_X)) && (i + 2 < length))
2483                                          {                                          {
2484                                                  if (flags & TEXT2_VERTICAL)                                                  if (flags & TEXT2_VERTICAL)
2485                                                          y += text[i + 2];                                                          y += text[i + 2];
# Line 2480  ui_draw_text(uint8 font, uint8 flags, ui Line 2489  ui_draw_text(uint8 font, uint8 flags, ui
2489                                          for (j = 0; j < entry->size; j++)                                          for (j = 0; j < entry->size; j++)
2490                                                  DO_GLYPH(((uint8 *) (entry->data)), j);                                                  DO_GLYPH(((uint8 *) (entry->data)), j);
2491                                  }                                  }
2492                                  i += 3;                                  if (i + 2 < length)
2493                                            i += 3;
2494                                    else
2495                                            i += 2;
2496                                  length -= i;                                  length -= i;
2497                                  /* this will move pointer from start to first character after FE command */                                  /* this will move pointer from start to first character after FE command */
2498                                  text = &(text[i]);                                  text = &(text[i]);

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

  ViewVC Help
Powered by ViewVC 1.1.26