utility.h 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. #ifndef VSF_UTILITY_H
  2. #define VSF_UTILITY_H
  3. struct mystr;
  4. /* die()
  5. * PURPOSE
  6. * Terminate execution of the process, due to an abnormal (but non-bug)
  7. * situation.
  8. * PARAMETERS
  9. * p_text - text string describing why the process is exiting
  10. */
  11. void die(const char* p_text);
  12. /* die2()
  13. * PURPOSE
  14. * Terminate execution of the process, due to an abnormal (but non-bug)
  15. * situation.
  16. * PARAMETERS
  17. * p_text1 - text string describing why the process is exiting
  18. * p_text2 - text to safely concatenate to p_text1
  19. */
  20. void die2(const char* p_text1, const char* p_text2);
  21. /* bug()
  22. * PURPOSE
  23. * Terminate execution of the process, due to a suspected bug, trying to emit
  24. * the reason this happened down the network in FTP response format.
  25. * PARAMETERS
  26. * p_text - text string describing what bug trap has triggered
  27. * */
  28. void bug(const char* p_text);
  29. /* vsf_exit()
  30. * PURPOSE
  31. * Terminate execution of the process, writing out the specified text string
  32. * in the process.
  33. * PARAMETERS
  34. * p_text - text string describing why the process is exiting
  35. */
  36. void vsf_exit(const char* p_text);
  37. #endif