コード例 #1
0
void MFNHashTypePlain::createLookupBitmaps() {
    trace_printf("MFNHashTypePlain::createLookupBitmaps()\n");
    
    // This involves creating bitmaps based on the provided hashes.
    // If the hash is big endian, they will be reversed compared to the hash.
    
    // Create bitmaps a (8kb and 128mb)
    if (this->hashLengthBytes >= 4) {
        static_printf("Creating bitmaps for word 0/a\n");
        this->create8kbBitmap(0, this->activeHashesProcessed, this->sharedBitmap8kb_a);
        this->create128mbBitmap(0, this->activeHashesProcessed, this->globalBitmap128mb_a);
    }
    if (this->hashLengthBytes >= 8) {
        static_printf("Creating bitmaps for word 1/b\n");
        this->create8kbBitmap(1, this->activeHashesProcessed, this->sharedBitmap8kb_b);
        this->create128mbBitmap(1, this->activeHashesProcessed, this->globalBitmap128mb_b);
    }
    if (this->hashLengthBytes >= 12) {
        static_printf("Creating bitmaps for word 2/c\n");
        this->create8kbBitmap(2, this->activeHashesProcessed, this->sharedBitmap8kb_c);
        this->create128mbBitmap(2, this->activeHashesProcessed, this->globalBitmap128mb_c);
    }
    if (this->hashLengthBytes >= 16) {
        static_printf("Creating bitmaps for word 3/d\n");
        this->create8kbBitmap(3, this->activeHashesProcessed, this->sharedBitmap8kb_d);
        this->create128mbBitmap(3, this->activeHashesProcessed, this->globalBitmap128mb_d);
    }
    
}
コード例 #2
0
ファイル: type.c プロジェクト: manasdas17/nvc
const char *type_pp_minify(type_t t, minify_fn_t fn)
{
   assert(t != NULL);

   switch (type_kind(t)) {
   case T_FUNC:
   case T_PROC:
      {
         char *buf = get_fmt_buf(256);
         static_printf_begin(buf, 256);

         const char *fname = (*fn)(istr(type_ident(t)));

         static_printf(buf, "%s(", fname);
         const int nparams = type_params(t);
         for (int i = 0; i < nparams; i++)
            static_printf(buf, "%s%s",
                          (i == 0 ? "" : ", "),
                          (*fn)(istr(type_ident(type_param(t, i)))));
         static_printf(buf, ")");
         if (type_kind(t) == T_FUNC)
            static_printf(buf, " return %s",
                          (*fn)(istr(type_ident(type_result(t)))));

         return buf;
      }

   default:
      return (*fn)(istr(type_ident(t)));
   }
}
コード例 #3
0
void MFNHashTypePlain::copyHashesIntoDeviceFormat() {
    trace_printf("MFNHashTypePlain::copyHashesIntoDeviceFormat()\n");

    uint64_t hashIndex;

    /** Convert the processed hashlist into a single vector suited to copying
     * to the GPUs.  This will be the same for CUDA and OpenCL (and can be
     * used by the CPU as well.
     */

    // Reserve the right amount of space in the main vector - number of elements * hashlength
    this->activeHashesProcessedDeviceformat.resize(
            this->activeHashesProcessed.size() * this->hashLengthBytes);

    for (hashIndex = 0; hashIndex < this->activeHashesProcessed.size(); hashIndex++) {
        memcpy(&this->activeHashesProcessedDeviceformat[hashIndex * this->hashLengthBytes],
                &this->activeHashesProcessed[hashIndex][0], this->hashLengthBytes);
    }

    static_printf("Created common hash array of %d bytes.\n", this->activeHashesProcessedDeviceformat.size());

    if (0) {
        for (hashIndex = 0; hashIndex < this->activeHashesProcessed.size(); hashIndex++) {
            for (int j = 0; j < this->hashLengthBytes; j++) {
                printf("%02x", this->activeHashesProcessedDeviceformat[hashIndex * this->hashLengthBytes + j]);
            }
            printf("\n");
        }
    }
    
}
コード例 #4
0
ファイル: gdkmain-win32.c プロジェクト: batman52/dingux-code
gchar *
_gdk_win32_window_state_to_string (GdkWindowState state)
{
  gchar buf[100];
  gchar *bufp = buf;
  gchar *s = "";

  buf[0] = '\0';

#define BIT(x)						\
  if (state & GDK_WINDOW_STATE_ ## x)			\
    (bufp += sprintf (bufp, "%s" #x, s), s = "|")

  /* For clarity, also show the complement of WITHDRAWN, i.e. "MAPPED" */
  if (!(state & GDK_WINDOW_STATE_WITHDRAWN))
    (bufp += sprintf (bufp, "MAPPED"), s = "|");

  BIT (WITHDRAWN);
  BIT (ICONIFIED);
  BIT (MAXIMIZED);
  BIT (STICKY);
#undef BIT

  return static_printf ("%s", buf);  
}
コード例 #5
0
ファイル: gdkmain-win32.c プロジェクト: batman52/dingux-code
gchar *
_gdk_win32_gcvalues_mask_to_string (GdkGCValuesMask mask)
{
  gchar buf[400];
  gchar *bufp = buf;
  gchar *s = "";

  buf[0] = '\0';

#define BIT(x) 						\
  if (mask & GDK_GC_##x) 				\
    (bufp += g_sprintf (bufp, "%s" #x, s), s = "|")

  BIT (FOREGROUND);
  BIT (BACKGROUND);
  BIT (FONT);
  BIT (FUNCTION);
  BIT (FILL);
  BIT (TILE);
  BIT (STIPPLE);
  BIT (CLIP_MASK);
  BIT (SUBWINDOW);
  BIT (TS_X_ORIGIN);
  BIT (TS_Y_ORIGIN);
  BIT (CLIP_X_ORIGIN);
  BIT (CLIP_Y_ORIGIN);
  BIT (EXPOSURES);
  BIT (LINE_WIDTH);
  BIT (LINE_STYLE);
  BIT (CAP_STYLE);
  BIT (JOIN_STYLE);
#undef BIT

  return static_printf ("%s", buf);  
}
コード例 #6
0
ファイル: gdkmain-win32.c プロジェクト: Aridna/gtk2
gchar *
_gdk_win32_window_pos_bits_to_string (UINT flags)
{
  gchar buf[1000];
  gchar *bufp = buf;
  gchar *s = "";

  buf[0] = '\0';

#define BIT(x)						\
  if (flags & SWP_ ## x)				\
    (bufp += sprintf (bufp, "%s" #x, s), s = "|")

  BIT (DRAWFRAME);
  BIT (FRAMECHANGED);
  BIT (HIDEWINDOW);
  BIT (NOACTIVATE);
  BIT (NOCOPYBITS);
  BIT (NOMOVE);
  BIT (NOSIZE);
  BIT (NOREDRAW);
  BIT (NOZORDER);
  BIT (SHOWWINDOW);
  BIT (NOOWNERZORDER);
  BIT (NOSENDCHANGING);
  BIT (DEFERERASE);
  BIT (ASYNCWINDOWPOS);
#undef BIT

  return static_printf ("%s", buf);  
}
コード例 #7
0
ファイル: gdkmain-win32.c プロジェクト: batman52/dingux-code
gchar *
_gdk_win32_gdkrectangle_to_string (const GdkRectangle *rect)
{
  return static_printf ("%dx%d@%+d%+d",
			rect->width, rect->height,
			rect->x, rect->y);
}
コード例 #8
0
ファイル: gdkmain-win32.c プロジェクト: batman52/dingux-code
gchar *
_gdk_win32_function_to_string (GdkFunction function)
{
  switch (function)
    {
#define CASE(x) case GDK_##x: return #x
    CASE (COPY);
    CASE (INVERT);
    CASE (XOR);
    CASE (CLEAR);
    CASE (AND);
    CASE (AND_REVERSE);
    CASE (AND_INVERT);
    CASE (NOOP);
    CASE (OR);
    CASE (EQUIV);
    CASE (OR_REVERSE);
    CASE (COPY_INVERT);
    CASE (OR_INVERT);
    CASE (NAND);
    CASE (SET);
#undef CASE
    default: return static_printf ("illegal_%d", function);
    }
  /* NOTREACHED */
  return NULL; 
}
コード例 #9
0
ファイル: gdkmain-win32.c プロジェクト: batman52/dingux-code
gchar *
_gdk_win32_rect_to_string (const RECT *rect)
{
  return static_printf ("%ldx%ld@%+ld%+ld",
			(rect->right - rect->left), (rect->bottom - rect->top),
			rect->left, rect->top);
}
コード例 #10
0
ファイル: gdkmain-win32.c プロジェクト: batman52/dingux-code
gchar *
_gdk_win32_color_to_string (const GdkColor *color)
{
  return static_printf ("(%.04x,%.04x,%.04x):%.06x",
			color->red, color->green,
			color->blue, color->pixel);
}
コード例 #11
0
ファイル: gdkmain-win32.c プロジェクト: batman52/dingux-code
gchar *
_gdk_win32_rop2_to_string (int rop2)
{
  switch (rop2)
    {
#define CASE(x) case R2_##x: return #x
      CASE (BLACK);
      CASE (COPYPEN);
      CASE (MASKNOTPEN);
      CASE (MASKPEN);
      CASE (MASKPENNOT);
      CASE (MERGENOTPEN);
      CASE (MERGEPEN);
      CASE (MERGEPENNOT);
      CASE (NOP);
      CASE (NOT);
      CASE (NOTCOPYPEN);
      CASE (NOTMASKPEN);
      CASE (NOTMERGEPEN);
      CASE (NOTXORPEN);
      CASE (WHITE);
      CASE (XORPEN);
#undef CASE
    default: return static_printf ("illegal_%x", rop2);
    }
  /* NOTREACHED */
  return NULL;
}
コード例 #12
0
ファイル: gdkmain-win32.c プロジェクト: batman52/dingux-code
gchar *
_gdk_win32_gdkregion_to_string (const GdkRegion *rgn)
{
  return static_printf ("%dx%d@%+d%+d",
			(rgn->extents.x2 - rgn->extents.x1),
			(rgn->extents.y2 - rgn->extents.y1),
			rgn->extents.x1, rgn->extents.y1);
}
コード例 #13
0
ファイル: gdkmain-win32.c プロジェクト: batman52/dingux-code
gchar *
_gdk_win32_cf_to_string (UINT format)
{
  char buf[100];

  switch (format)
    {
#define CASE(x) case CF_##x: return "CF_" #x
      CASE (BITMAP);
      CASE (DIB);
#ifdef CF_DIBV5
      CASE (DIBV5);
#endif
      CASE (DIF);
      CASE (DSPBITMAP);
      CASE (DSPENHMETAFILE);
      CASE (DSPMETAFILEPICT);
      CASE (DSPTEXT);
      CASE (ENHMETAFILE);
      CASE (HDROP);
      CASE (LOCALE);
      CASE (METAFILEPICT);
      CASE (OEMTEXT);
      CASE (OWNERDISPLAY);
      CASE (PALETTE);
      CASE (PENDATA);
      CASE (RIFF);
      CASE (SYLK);
      CASE (TEXT);
      CASE (WAVE);
      CASE (TIFF);
      CASE (UNICODETEXT);
    default:
      if (format >= CF_GDIOBJFIRST &&
	  format <= CF_GDIOBJLAST)
	return static_printf ("CF_GDIOBJ%d", format - CF_GDIOBJFIRST);
      if (format >= CF_PRIVATEFIRST &&
	  format <= CF_PRIVATELAST)
	return static_printf ("CF_PRIVATE%d", format - CF_PRIVATEFIRST);
      if (GetClipboardFormatName (format, buf, sizeof (buf)))
	return static_printf ("'%s'", buf);
      else
	return static_printf ("unk-%#lx", format);
    }
}
コード例 #14
0
ファイル: gdkmain-win32.c プロジェクト: batman52/dingux-code
gchar *
_gdk_win32_key_to_string (LONG lParam)
{
  char buf[100];
  gchar *keyname_utf8;

  if (GetKeyNameText (lParam, buf, sizeof (buf)) &&
      (keyname_utf8 = g_locale_to_utf8 (buf, -1, NULL, NULL, NULL)) != NULL)
    {
      gchar *retval = static_printf ("%s", keyname_utf8);

      g_free (keyname_utf8);

      return retval;
    }

  return static_printf ("unk-%#lx", lParam);
}
コード例 #15
0
ファイル: gdkmain-win32.c プロジェクト: batman52/dingux-code
gchar *
_gdk_win32_pstype_to_string (DWORD pen_style)
{
  switch (pen_style & PS_TYPE_MASK)
    {
    case PS_GEOMETRIC: return "GEOMETRIC";
    case PS_COSMETIC: return "COSMETIC";
    default: return static_printf ("illegal_%d", pen_style & PS_TYPE_MASK);
    }
  /* NOTREACHED */
  return NULL;
}
コード例 #16
0
ファイル: gdkmain-win32.c プロジェクト: batman52/dingux-code
gchar *
_gdk_win32_drawable_description (GdkDrawable *d)
{
  gint width, height, depth;

  gdk_drawable_get_size (d, &width, &height);
  depth = gdk_drawable_get_depth (d);

  return static_printf
    ("%s:%p:%dx%dx%d",
     G_OBJECT_TYPE_NAME (d),
     GDK_DRAWABLE_HANDLE (d),
     width, height, depth);
}
コード例 #17
0
ファイル: gdkmain-win32.c プロジェクト: batman52/dingux-code
gchar *
_gdk_win32_line_style_to_string (GdkLineStyle line_style)
{
  switch (line_style)
    {
#define CASE(x) case GDK_LINE_##x: return #x
    CASE(SOLID);
    CASE(ON_OFF_DASH);  
    CASE(DOUBLE_DASH);  
#undef CASE
    default: return static_printf ("illegal_%d", line_style);
    }
  /* NOTREACHED */
  return NULL; 
}
コード例 #18
0
ファイル: gdkmain-win32.c プロジェクト: batman52/dingux-code
gchar *
_gdk_win32_psjoin_to_string (DWORD pen_style)
{
  switch (pen_style & PS_JOIN_MASK)
    {
#define CASE(x) case PS_JOIN_##x: return #x
      CASE (ROUND);
      CASE (BEVEL);
      CASE (MITER);
#undef CASE
    default: return static_printf ("illegal_%d", pen_style & PS_JOIN_MASK);
    }
  /* NOTREACHED */
  return NULL;
}
コード例 #19
0
ファイル: gdkmain-win32.c プロジェクト: batman52/dingux-code
gchar *
_gdk_win32_psendcap_to_string (DWORD pen_style)
{
  switch (pen_style & PS_ENDCAP_MASK)
    {
#define CASE(x) case PS_ENDCAP_##x: return #x
      CASE (ROUND);
      CASE (SQUARE);
      CASE (FLAT);
#undef CASE
    default: return static_printf ("illegal_%d", pen_style & PS_ENDCAP_MASK);
    }
  /* NOTREACHED */
  return NULL;
}
コード例 #20
0
ファイル: gdkmain-win32.c プロジェクト: batman52/dingux-code
gchar *
_gdk_win32_join_style_to_string (GdkJoinStyle join_style)
{
  switch (join_style)
    {
#define CASE(x) case GDK_JOIN_##x: return #x
    CASE (MITER);
    CASE (ROUND);
    CASE (BEVEL);
#undef CASE
    default: return static_printf ("illegal_%d", join_style);
    }
  /* NOTREACHED */
  return NULL; 
}
コード例 #21
0
ファイル: gdkmain-win32.c プロジェクト: batman52/dingux-code
gchar *
_gdk_win32_cap_style_to_string (GdkCapStyle cap_style)
{
  switch (cap_style)
    {
#define CASE(x) case GDK_CAP_##x: return #x
    CASE (NOT_LAST);
    CASE (BUTT);
    CASE (ROUND);
    CASE (PROJECTING);
#undef CASE
    default: return static_printf ("illegal_%d", cap_style);
    }
  /* NOTREACHED */
  return NULL;
}
コード例 #22
0
ファイル: gdkmain-win32.c プロジェクト: batman52/dingux-code
gchar *
_gdk_win32_fill_style_to_string (GdkFill fill)
{
  switch (fill)
    {
#define CASE(x) case GDK_##x: return #x
    CASE (SOLID);
    CASE (TILED);
    CASE (STIPPLED);
    CASE (OPAQUE_STIPPLED);
#undef CASE
    default: return static_printf ("illegal_%d", fill);
    }
  /* NOTREACHED */
  return NULL;
}
コード例 #23
0
ファイル: gdkmain-win32.c プロジェクト: Aridna/gtk2
gchar *
_gdk_win32_window_exstyle_to_string (LONG style)
{
  gchar buf[1000];
  gchar *bufp = buf;
  gchar *s = "";

  buf[0] = '\0';

#define BIT(x)						\
  if (style & WS_EX_ ## x)				\
    (bufp += sprintf (bufp, "%s" #x, s), s = "|")

  /* Note that many of the WS_EX_* macros are in face several bits.
   * Handle just the individual bits here. Sort as in w32api's
   * winuser.h.
   */
  BIT (ACCEPTFILES);
  BIT (APPWINDOW);
  BIT (CLIENTEDGE);
#ifndef WS_EX_COMPOSITED
#  define WS_EX_COMPOSITED 0x02000000L
#endif
  BIT (COMPOSITED);
  BIT (CONTEXTHELP);
  BIT (CONTROLPARENT);
  BIT (DLGMODALFRAME);
  BIT (LAYERED);
  BIT (LAYOUTRTL);
  BIT (LEFTSCROLLBAR);
  BIT (MDICHILD);
  BIT (NOACTIVATE);
  BIT (NOINHERITLAYOUT);
  BIT (NOPARENTNOTIFY);
  BIT (RIGHT);
  BIT (RTLREADING);
  BIT (STATICEDGE);
  BIT (TOOLWINDOW);
  BIT (TOPMOST);
  BIT (TRANSPARENT);
  BIT (WINDOWEDGE);
#undef BIT

  return static_printf ("%s", buf);  
}
コード例 #24
0
ファイル: gdkmain-win32.c プロジェクト: batman52/dingux-code
gchar *
_gdk_win32_lbstyle_to_string (UINT brush_style)
{
  switch (brush_style)
    {
#define CASE(x) case BS_##x: return #x
      CASE (DIBPATTERN);
      CASE (DIBPATTERNPT);
      CASE (HATCHED);
      CASE (HOLLOW);
      CASE (PATTERN);
      CASE (SOLID);
#undef CASE
    default: return static_printf ("illegal_%d", brush_style);
    }
  /* NOTREACHED */
  return NULL;
}
コード例 #25
0
ファイル: gdkmain-win32.c プロジェクト: Aridna/gtk2
gchar *
_gdk_win32_drag_protocol_to_string (GdkDragProtocol protocol)
{
  switch (protocol)
    {
#define CASE(x) case GDK_DRAG_PROTO_##x: return #x
      CASE (MOTIF);
      CASE (XDND);
      CASE (ROOTWIN);
      CASE (NONE);
      CASE (WIN32_DROPFILES);
      CASE (OLE2);
      CASE (LOCAL);
#undef CASE
    default: return static_printf ("illegal_%d", protocol);
    }
  /* NOTREACHED */
  return NULL; 
}
コード例 #26
0
ファイル: gdkmain-win32.c プロジェクト: batman52/dingux-code
gchar *
_gdk_win32_data_to_string (const guchar *data,
			   int           nbytes)
{
  GString *s = g_string_new ("");
  int i;
  gchar *retval;

  for (i = 0; i < nbytes; i++)
    if (data[i] >=' ' && data[i] <= '~')
      g_string_append_printf (s, "%c  ", data[i]);
    else
      g_string_append_printf (s, "%02X ", data[i]);

  retval = static_printf ("%s", s->str);
  g_string_free (s, TRUE);

  return retval;
}
コード例 #27
0
ファイル: gdkmain-win32.c プロジェクト: Aridna/gtk2
gchar *
_gdk_win32_window_style_to_string (LONG style)
{
  gchar buf[1000];
  gchar *bufp = buf;
  gchar *s = "";

  buf[0] = '\0';

#define BIT(x)						\
  if (style & WS_ ## x)					\
    (bufp += sprintf (bufp, "%s" #x, s), s = "|")

  /* Note that many of the WS_* macros are in face several bits.
   * Handle just the individual bits here. Sort as in w32api's
   * winuser.h.
   */
  BIT (BORDER);
  BIT (CHILD);
  BIT (CLIPCHILDREN);
  BIT (CLIPSIBLINGS);
  BIT (DISABLED);
  BIT (DLGFRAME);
  BIT (GROUP);
  BIT (HSCROLL);
  BIT (ICONIC);
  BIT (MAXIMIZE);
  BIT (MAXIMIZEBOX);
  BIT (MINIMIZE);
  BIT (MINIMIZEBOX);
  BIT (POPUP);
  BIT (SIZEBOX);
  BIT (SYSMENU);
  BIT (TABSTOP);
  BIT (THICKFRAME);
  BIT (VISIBLE);
  BIT (VSCROLL);
#undef BIT

  return static_printf ("%s", buf);  
}
コード例 #28
0
ファイル: gdkmain-win32.c プロジェクト: batman52/dingux-code
gchar *
_gdk_win32_psstyle_to_string (DWORD pen_style)
{
  switch (pen_style & PS_STYLE_MASK)
    {
#define CASE(x) case PS_##x: return #x
      CASE (ALTERNATE);
      CASE (SOLID);
      CASE (DASH);
      CASE (DOT);
      CASE (DASHDOT);
      CASE (DASHDOTDOT);
      CASE (NULL);
      CASE (USERSTYLE);
      CASE (INSIDEFRAME);
#undef CASE
    default: return static_printf ("illegal_%d", pen_style & PS_STYLE_MASK);
    }
  /* NOTREACHED */
  return NULL;
}
コード例 #29
0
ファイル: gdkmain-win32.c プロジェクト: Aridna/gtk2
gchar *
_gdk_win32_drag_action_to_string (GdkDragAction actions)
{
  gchar buf[100];
  gchar *bufp = buf;
  gchar *s = "";

  buf[0] = '\0';

#define BIT(x)						\
  if (actions & GDK_ACTION_ ## x)				\
    (bufp += sprintf (bufp, "%s" #x, s), s = "|")

  BIT (DEFAULT);
  BIT (COPY);
  BIT (MOVE);
  BIT (LINK);
  BIT (PRIVATE);
  BIT (ASK);
#undef BIT

  return static_printf ("%s", buf);  
}
コード例 #30
0
ファイル: gdkmain-win32.c プロジェクト: batman52/dingux-code
gchar *
_gdk_win32_message_to_string (UINT msg)
{
  switch (msg)
    {
#define CASE(x) case x: return #x
      CASE (WM_NULL);
      CASE (WM_CREATE);
      CASE (WM_DESTROY);
      CASE (WM_MOVE);
      CASE (WM_SIZE);
      CASE (WM_ACTIVATE);
      CASE (WM_SETFOCUS);
      CASE (WM_KILLFOCUS);
      CASE (WM_ENABLE);
      CASE (WM_SETREDRAW);
      CASE (WM_SETTEXT);
      CASE (WM_GETTEXT);
      CASE (WM_GETTEXTLENGTH);
      CASE (WM_PAINT);
      CASE (WM_CLOSE);
      CASE (WM_QUERYENDSESSION);
      CASE (WM_QUERYOPEN);
      CASE (WM_ENDSESSION);
      CASE (WM_QUIT);
      CASE (WM_ERASEBKGND);
      CASE (WM_SYSCOLORCHANGE);
      CASE (WM_SHOWWINDOW);
      CASE (WM_WININICHANGE);
      CASE (WM_DEVMODECHANGE);
      CASE (WM_ACTIVATEAPP);
      CASE (WM_FONTCHANGE);
      CASE (WM_TIMECHANGE);
      CASE (WM_CANCELMODE);
      CASE (WM_SETCURSOR);
      CASE (WM_MOUSEACTIVATE);
      CASE (WM_CHILDACTIVATE);
      CASE (WM_QUEUESYNC);
      CASE (WM_GETMINMAXINFO);
      CASE (WM_PAINTICON);
      CASE (WM_ICONERASEBKGND);
      CASE (WM_NEXTDLGCTL);
      CASE (WM_SPOOLERSTATUS);
      CASE (WM_DRAWITEM);
      CASE (WM_MEASUREITEM);
      CASE (WM_DELETEITEM);
      CASE (WM_VKEYTOITEM);
      CASE (WM_CHARTOITEM);
      CASE (WM_SETFONT);
      CASE (WM_GETFONT);
      CASE (WM_SETHOTKEY);
      CASE (WM_GETHOTKEY);
      CASE (WM_QUERYDRAGICON);
      CASE (WM_COMPAREITEM);
      CASE (WM_GETOBJECT);
      CASE (WM_COMPACTING);
      CASE (WM_WINDOWPOSCHANGING);
      CASE (WM_WINDOWPOSCHANGED);
      CASE (WM_POWER);
      CASE (WM_COPYDATA);
      CASE (WM_CANCELJOURNAL);
      CASE (WM_NOTIFY);
      CASE (WM_INPUTLANGCHANGEREQUEST);
      CASE (WM_INPUTLANGCHANGE);
      CASE (WM_TCARD);
      CASE (WM_HELP);
      CASE (WM_USERCHANGED);
      CASE (WM_NOTIFYFORMAT);
      CASE (WM_CONTEXTMENU);
      CASE (WM_STYLECHANGING);
      CASE (WM_STYLECHANGED);
      CASE (WM_DISPLAYCHANGE);
      CASE (WM_GETICON);
      CASE (WM_SETICON);
      CASE (WM_NCCREATE);
      CASE (WM_NCDESTROY);
      CASE (WM_NCCALCSIZE);
      CASE (WM_NCHITTEST);
      CASE (WM_NCPAINT);
      CASE (WM_NCACTIVATE);
      CASE (WM_GETDLGCODE);
      CASE (WM_SYNCPAINT);
      CASE (WM_NCMOUSEMOVE);
      CASE (WM_NCLBUTTONDOWN);
      CASE (WM_NCLBUTTONUP);
      CASE (WM_NCLBUTTONDBLCLK);
      CASE (WM_NCRBUTTONDOWN);
      CASE (WM_NCRBUTTONUP);
      CASE (WM_NCRBUTTONDBLCLK);
      CASE (WM_NCMBUTTONDOWN);
      CASE (WM_NCMBUTTONUP);
      CASE (WM_NCMBUTTONDBLCLK);
      CASE (WM_NCXBUTTONDOWN);
      CASE (WM_NCXBUTTONUP);
      CASE (WM_NCXBUTTONDBLCLK);
      CASE (WM_KEYDOWN);
      CASE (WM_KEYUP);
      CASE (WM_CHAR);
      CASE (WM_DEADCHAR);
      CASE (WM_SYSKEYDOWN);
      CASE (WM_SYSKEYUP);
      CASE (WM_SYSCHAR);
      CASE (WM_SYSDEADCHAR);
      CASE (WM_KEYLAST);
      CASE (WM_IME_STARTCOMPOSITION);
      CASE (WM_IME_ENDCOMPOSITION);
      CASE (WM_IME_COMPOSITION);
      CASE (WM_INITDIALOG);
      CASE (WM_COMMAND);
      CASE (WM_SYSCOMMAND);
      CASE (WM_TIMER);
      CASE (WM_HSCROLL);
      CASE (WM_VSCROLL);
      CASE (WM_INITMENU);
      CASE (WM_INITMENUPOPUP);
      CASE (WM_MENUSELECT);
      CASE (WM_MENUCHAR);
      CASE (WM_ENTERIDLE);
      CASE (WM_MENURBUTTONUP);
      CASE (WM_MENUDRAG);
      CASE (WM_MENUGETOBJECT);
      CASE (WM_UNINITMENUPOPUP);
      CASE (WM_MENUCOMMAND);
      CASE (WM_CHANGEUISTATE);
      CASE (WM_UPDATEUISTATE);
      CASE (WM_QUERYUISTATE);
      CASE (WM_CTLCOLORMSGBOX);
      CASE (WM_CTLCOLOREDIT);
      CASE (WM_CTLCOLORLISTBOX);
      CASE (WM_CTLCOLORBTN);
      CASE (WM_CTLCOLORDLG);
      CASE (WM_CTLCOLORSCROLLBAR);
      CASE (WM_CTLCOLORSTATIC);
      CASE (WM_MOUSEMOVE);
      CASE (WM_LBUTTONDOWN);
      CASE (WM_LBUTTONUP);
      CASE (WM_LBUTTONDBLCLK);
      CASE (WM_RBUTTONDOWN);
      CASE (WM_RBUTTONUP);
      CASE (WM_RBUTTONDBLCLK);
      CASE (WM_MBUTTONDOWN);
      CASE (WM_MBUTTONUP);
      CASE (WM_MBUTTONDBLCLK);
      CASE (WM_MOUSEWHEEL);
      CASE (WM_XBUTTONDOWN);
      CASE (WM_XBUTTONUP);
      CASE (WM_XBUTTONDBLCLK);
      CASE (WM_PARENTNOTIFY);
      CASE (WM_ENTERMENULOOP);
      CASE (WM_EXITMENULOOP);
      CASE (WM_NEXTMENU);
      CASE (WM_SIZING);
      CASE (WM_CAPTURECHANGED);
      CASE (WM_MOVING);
      CASE (WM_POWERBROADCAST);
      CASE (WM_DEVICECHANGE);
      CASE (WM_MDICREATE);
      CASE (WM_MDIDESTROY);
      CASE (WM_MDIACTIVATE);
      CASE (WM_MDIRESTORE);
      CASE (WM_MDINEXT);
      CASE (WM_MDIMAXIMIZE);
      CASE (WM_MDITILE);
      CASE (WM_MDICASCADE);
      CASE (WM_MDIICONARRANGE);
      CASE (WM_MDIGETACTIVE);
      CASE (WM_MDISETMENU);
      CASE (WM_ENTERSIZEMOVE);
      CASE (WM_EXITSIZEMOVE);
      CASE (WM_DROPFILES);
      CASE (WM_MDIREFRESHMENU);
      CASE (WM_IME_SETCONTEXT);
      CASE (WM_IME_NOTIFY);
      CASE (WM_IME_CONTROL);
      CASE (WM_IME_COMPOSITIONFULL);
      CASE (WM_IME_SELECT);
      CASE (WM_IME_CHAR);
      CASE (WM_IME_REQUEST);
      CASE (WM_IME_KEYDOWN);
      CASE (WM_IME_KEYUP);
      CASE (WM_MOUSEHOVER);
      CASE (WM_MOUSELEAVE);
      CASE (WM_NCMOUSEHOVER);
      CASE (WM_NCMOUSELEAVE);
      CASE (WM_CUT);
      CASE (WM_COPY);
      CASE (WM_PASTE);
      CASE (WM_CLEAR);
      CASE (WM_UNDO);
      CASE (WM_RENDERFORMAT);
      CASE (WM_RENDERALLFORMATS);
      CASE (WM_DESTROYCLIPBOARD);
      CASE (WM_DRAWCLIPBOARD);
      CASE (WM_PAINTCLIPBOARD);
      CASE (WM_VSCROLLCLIPBOARD);
      CASE (WM_SIZECLIPBOARD);
      CASE (WM_ASKCBFORMATNAME);
      CASE (WM_CHANGECBCHAIN);
      CASE (WM_HSCROLLCLIPBOARD);
      CASE (WM_QUERYNEWPALETTE);
      CASE (WM_PALETTEISCHANGING);
      CASE (WM_PALETTECHANGED);
      CASE (WM_HOTKEY);
      CASE (WM_PRINT);
      CASE (WM_PRINTCLIENT);
      CASE (WM_APPCOMMAND);
      CASE (WM_HANDHELDFIRST);
      CASE (WM_HANDHELDLAST);
      CASE (WM_AFXFIRST);
      CASE (WM_AFXLAST);
      CASE (WM_PENWINFIRST);
      CASE (WM_PENWINLAST);
      CASE (WM_APP);
#ifdef HAVE_WINTAB
      CASE (WT_PACKET);
      CASE (WT_CSRCHANGE);
      CASE (WT_PROXIMITY);
#endif
#undef CASE
    default:
      if (msg >= WM_HANDHELDFIRST && msg <= WM_HANDHELDLAST)
	return static_printf ("WM_HANDHELDFIRST+%d", msg - WM_HANDHELDFIRST);
      else if (msg >= WM_AFXFIRST && msg <= WM_AFXLAST)
	return static_printf ("WM_AFXFIRST+%d", msg - WM_AFXFIRST);
      else if (msg >= WM_PENWINFIRST && msg <= WM_PENWINLAST)
	return static_printf ("WM_PENWINFIRST+%d", msg - WM_PENWINFIRST);
      else if (msg >= WM_USER && msg <= 0x7FFF)
	return static_printf ("WM_USER+%d", msg - WM_USER);
      else if (msg >= 0xC000 && msg <= 0xFFFF)
	return static_printf ("reg-%#x", msg);
      else
	return static_printf ("unk-%#x", msg);
    }
  /* NOTREACHED */
  return NULL;
}