home *** CD-ROM | disk | FTP | other *** search
/ InfoMagic Source Code 1993 July / THE_SOURCE_CODE_CD_ROM.iso / X / mit / lib / Xmu / FToCback.c < prev    next >
Encoding:
C/C++ Source or Header  |  1990-07-15  |  1.3 KB  |  37 lines

  1. /* static char rcsid[] =
  2.     "$XConsortium: FToCback.c,v 1.2 90/07/15 16:18:34 rws Exp $"; */
  3.  
  4. /* 
  5.  * Copyright 1988 by the Massachusetts Institute of Technology
  6.  *
  7.  * Permission to use, copy, modify, and distribute this software and its
  8.  * documentation for any purpose and without fee is hereby granted, provided 
  9.  * that the above copyright notice appear in all copies and that both that 
  10.  * copyright notice and this permission notice appear in supporting 
  11.  * documentation, and that the name of M.I.T. not be used in advertising
  12.  * or publicity pertaining to distribution of the software without specific, 
  13.  * written prior permission. M.I.T. makes no representations about the 
  14.  * suitability of this software for any purpose.  It is provided "as is"
  15.  * without express or implied warranty.
  16.  *
  17.  */
  18.  
  19. #include    <X11/Intrinsic.h>
  20.  
  21. /* ARGSUSED */
  22. void
  23. XmuCvtFunctionToCallback(args, num_args, fromVal, toVal)
  24.     XrmValue    *args;        /* unused */
  25.     Cardinal    *num_args;    /* unused */
  26.     XrmValuePtr fromVal;
  27.     XrmValuePtr toVal;
  28. {
  29.     static XtCallbackRec callback[2]; /* K&R: initialized to NULL */
  30.     static XtCallbackList callback_list = callback;
  31.  
  32.     callback[0].callback = *(XtCallbackProc *)fromVal->addr;
  33.  
  34.     toVal->size = sizeof(XtCallbackList);
  35.     toVal->addr = (caddr_t)&callback_list;
  36. }
  37.