Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

48 lines
1.9 KiB

  1. /*-----------------------------------------------------------------------------
  2. Microsoft FUSION
  3. Microsoft Confidential
  4. Copyright (c) Microsoft Corporation. All Rights Reserved.
  5. @doc external
  6. @module fusionpreprocessorpaste.h
  7. @owner JayKrell
  8. -----------------------------------------------------------------------------*/
  9. #if !defined(VS_COMMON_INC_FUSION_PREPROCESSORPASTE_H_INCLUDED_) // {
  10. #define VS_COMMON_INC_FUSION_PREPROCESSORPASTE_H_INCLUDED_
  11. /*#pragma once ends up in .rgi, which is bad, so do not do it*/
  12. #define FusionpPrivatePreprocessorPaste(x, y) x ## y
  13. /*-----------------------------------------------------------------------------
  14. Name: FusionpPreprocessorPaste2, FusionpPreprocessorPaste3, etc.
  15. @macro
  16. These macros paste together n tokens, where n is in the name of the macro.
  17. A level of evaluation is inserted as well.
  18. define A 1
  19. define B 2
  20. FusionpPreprocessorPaste2(A, B) -> 12
  21. @owner JayKrell
  22. -----------------------------------------------------------------------------*/
  23. // These are synonyms.
  24. #define FusionpPreprocessorPaste(x, y) FusionpPrivatePreprocessorPaste(x, y)
  25. #define FusionpPreprocessorPaste2(x, y) FusionpPrivatePreprocessorPaste(x, y)
  26. #define FusionpPreprocessorPaste3(x, y, z) FusionpPreprocessorPaste(FusionpPreprocessorPaste(x, y), z)
  27. #define FusionpPreprocessorPaste4(w, x, y, z) FusionpPreprocessorPaste(FusionpPreprocessorPaste3(w, x, y), z)
  28. #define FusionpPreprocessorPaste5(v, w, x, y, z) FusionpPreprocessorPaste(FusionpPreprocessorPaste4(v, w, x, y), z)
  29. #define FusionpPreprocessorPaste6(u, v, w, x, y, z) FusionpPreprocessorPaste(FusionpPreprocessorPaste5(u, v, w, x, y), z)
  30. #define FusionpPreprocessorPaste15(a1,a2,a3,a4,a5,a6,a7,a8,a9,a,b,c,d,e,f) \
  31. FusionpPreprocessorPaste3 \
  32. ( \
  33. FusionpPreprocessorPaste5(a1,a2,a3,a4,a5), \
  34. FusionpPreprocessorPaste5(a6,a7,a8,a9,a), \
  35. FusionpPreprocessorPaste5(b,c,d,e,f) \
  36. )
  37. #endif // }