Guest User

Untitled

a guest
May 23rd, 2018
76
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.75 KB | None | 0 0
  1. #include <stdlib.h>
  2.  
  3. /**
  4. * WARNING: Use these with caution as they are dangerous and easy to break!
  5. * NEVER:
  6. * place a dpl_cr_return* inside another switch statement
  7. * place two or more dpl_cr_return* statements on the same line
  8. */
  9. #define dpl_cr_begin static int __cr_line = 0; switch(__cr_line) { case 0:
  10. #define dpl_cr_finish(n) } return (n)
  11. #define dpl_cr_finish_void } return
  12.  
  13. #define dpl_cr_return(z) \
  14. do { \
  15. __cr_line = __LINE__; \
  16. return (z); \
  17. case __LINE__:; \
  18. } while (0)
  19.  
  20. #define dpl_cr_return_void \
  21. do { \
  22. __cr_line = __LINE__; \
  23. return; \
  24. case __LINE__:; \
  25. } while (0)
Add Comment
Please, Sign In to add comment