home *** CD-ROM | disk | FTP | other *** search
/ The World of Computer Software / World_Of_Computer_Software-02-385-Vol-1of3.iso / x / xibm.zip / mpel / mpelIO.c < prev    next >
C/C++ Source or Header  |  1992-02-11  |  4KB  |  126 lines

  1. /*
  2.  * Copyright IBM Corporation 1987,1988,1989
  3.  *
  4.  * All Rights Reserved
  5.  *
  6.  * Permission to use, copy, modify, and distribute this software and its
  7.  * documentation for any purpose and without fee is hereby granted,
  8.  * provided that the above copyright notice appear in all copies and that 
  9.  * both that copyright notice and this permission notice appear in
  10.  * supporting documentation, and that the name of IBM not be
  11.  * used in advertising or publicity pertaining to distribution of the
  12.  * software without specific, written prior permission.
  13.  *
  14.  * IBM DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
  15.  * ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
  16.  * IBM BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
  17.  * ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
  18.  * WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
  19.  * ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
  20.  * SOFTWARE.
  21.  *
  22. */
  23. /***********************************************************
  24.         Copyright IBM Corporation 1987,1988
  25.  
  26.                       All Rights Reserved
  27.  
  28. Permission to use, copy, modify, and distribute this software and its 
  29. documentation for any purpose and without fee is hereby granted, 
  30. provided that the above copyright notice appear in all copies and that
  31. both that copyright notice and this permission notice appear in 
  32. supporting documentation, and that the name of IBM not be
  33. used in advertising or publicity pertaining to distribution of the
  34. software without specific, written prior permission.  
  35.  
  36. IBM DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
  37. ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
  38. IBM BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
  39. ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
  40. WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
  41. ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
  42. SOFTWARE.
  43.  
  44. ******************************************************************/
  45.  
  46. /* $Header: /afs/athena.mit.edu/astaff/project/x11r5/src/athena/ibm/mpel/RCS/mpelIO.c,v 5.1 1992/02/12 00:35:45 jfc Exp $ */
  47. /* $Source: /afs/athena.mit.edu/astaff/project/x11r5/src/athena/ibm/mpel/RCS/mpelIO.c,v $ */
  48.  
  49. #ifndef lint
  50. static char *rcsid = "$Id: mpelIO.c,v 5.1 1992/02/12 00:35:45 jfc Exp $";
  51. #endif
  52.  
  53. #include "X.h"
  54. #include "Xproto.h"
  55. #include "scrnintstr.h"
  56. #include "cursorstr.h"
  57. #include "pixmapstr.h"
  58. #include "miscstruct.h"
  59. #include "colormapst.h"
  60. #include "windowstr.h"
  61. #include "resource.h"
  62. #include "font.h"
  63.  
  64. #include "OScompiler.h"
  65. #include "OScursor.h"
  66.  
  67. #include "ibmScreen.h"
  68.  
  69. #include "ibmTrace.h"
  70.  
  71. /* Global Variable */
  72. extern ScreenRec mpelScreenRec;
  73.  
  74. int mpelFontPrivateIndex;
  75.  
  76. #if defined(AIXrt) && !defined(__HIGHC__)
  77. extern void mpelDataInit();
  78. #endif
  79.  
  80. /***==================================================================***/
  81.  
  82. /*ARGSUSED*/
  83. Bool
  84. mpelScreenInit( index, pScreen, argc, argv )
  85. register const int index;
  86. register ScreenPtr const pScreen;
  87. register int const argc;        /* these two may NOT be changed */
  88. register char * const * const argv;
  89. {
  90.     static int been_here = 0;
  91.  
  92.     TRACE( ( "mpelScreenInit(index=%d,pScreen=0x%x,argc=%d,argv=0x%x)\n",
  93.         index, pScreen, argc, argv ) );
  94.  
  95.     if (!been_here) {
  96.         if (ibmScreenFD(index) == -1) {
  97.         ErrorF( "mpel file descriptor is invalid\nExiting.\n" );
  98.         exit(1);
  99.         /*NOTREACHED*/
  100.         }
  101.         mpelLoaduCode();
  102. #if defined(AIXrt) && !defined(__HIGHC__)
  103.         mpelDataInit();
  104. #endif
  105.         been_here = TRUE;
  106.     }
  107.     ppcCommonScreenInit(pScreen, index, &mpelScreenRec);
  108.     mpelCursorInit(index);
  109.     mpelInitPlaneMask();
  110.     mpelFontPrivateIndex = AllocateFontPrivateIndex();
  111.     return 1;
  112. }
  113.  
  114. /***==================================================================***/
  115.  
  116. /*ARGSUSED*/
  117. Bool
  118. mpelScreenClose( index, pScreen )
  119.     register int    index;
  120.     register ScreenPtr    pScreen;
  121. {
  122.     TRACE( ( "mpelScreenClose(index=%d,pScreen=0x%x)\n", index, pScreen ) );
  123.  
  124.     return TRUE;
  125. }
  126.