/SDL8bit/src/video/Xext/Xv/Xvlibint.h

https://github.com/bodhi/OpenTTD · C Header · 77 lines · 30 code · 7 blank · 40 comment · 2 complexity · 977d72edc717bd8238365d19fe003726 MD5 · raw file

  1. /***********************************************************
  2. Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts,
  3. and the Massachusetts Institute of Technology, Cambridge, Massachusetts.
  4. All Rights Reserved
  5. Permission to use, copy, modify, and distribute this software and its
  6. documentation for any purpose and without fee is hereby granted,
  7. provided that the above copyright notice appear in all copies and that
  8. both that copyright notice and this permission notice appear in
  9. supporting documentation, and that the names of Digital or MIT not be
  10. used in advertising or publicity pertaining to distribution of the
  11. software without specific, written prior permission.
  12. DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
  13. ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
  14. DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
  15. ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
  16. WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
  17. ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
  18. SOFTWARE.
  19. ******************************************************************/
  20. /* $XFree86: xc/lib/Xv/Xvlibint.h,v 1.5 2001/07/25 15:04:53 dawes Exp $ */
  21. #ifndef XVLIBINT_H
  22. #define XVLIBINT_H
  23. /*
  24. ** File:
  25. **
  26. ** Xvlibint.h --- Xv library internal header file
  27. **
  28. ** Author:
  29. **
  30. ** David Carver (Digital Workstation Engineering/Project Athena)
  31. **
  32. ** Revisions:
  33. **
  34. ** 01.24.91 Carver
  35. ** - version 1.4 upgrade
  36. **
  37. */
  38. #define NEED_REPLIES
  39. #include <X11/Xlibint.h>
  40. #include "../extensions/Xvproto.h"
  41. #include "../extensions/Xvlib.h"
  42. #if !defined(UNIXCPP)
  43. #define XvGetReq(name, req) \
  44. WORD64ALIGN\
  45. if ((dpy->bufptr + SIZEOF(xv##name##Req)) > dpy->bufmax)\
  46. _XFlush(dpy);\
  47. req = (xv##name##Req *)(dpy->last_req = dpy->bufptr);\
  48. req->reqType = info->codes->major_opcode;\
  49. req->xvReqType = xv_##name; \
  50. req->length = (SIZEOF(xv##name##Req))>>2;\
  51. dpy->bufptr += SIZEOF(xv##name##Req);\
  52. dpy->request++
  53. #else /* non-ANSI C uses empty comment instead of "##" for token concatenation */
  54. #define XvGetReq(name, req) \
  55. WORD64ALIGN\
  56. if ((dpy->bufptr + SIZEOF(xv/**/name/**/Req)) > dpy->bufmax)\
  57. _XFlush(dpy);\
  58. req = (xv/**/name/**/Req *)(dpy->last_req = dpy->bufptr);\
  59. req->reqType = info->codes->major_opcode;\
  60. req->xvReqType = xv_/**/name;\
  61. req->length = (SIZEOF(xv/**/name/**/Req))>>2;\
  62. dpy->bufptr += SIZEOF(xv/**/name/**/Req);\
  63. dpy->request++
  64. #endif
  65. #endif /* XVLIBINT_H */
  66. /* vi: set ts=4 sw=4 expandtab: */