etc.c 755 B

1234567891011121314151617181920212223242526
  1. #include "etc.h"
  2. #include <stdio.h>
  3. #include <stdlib.h>
  4. /*===========================================================================*/
  5. /* エラ〖借妄 */
  6. /*===========================================================================*/
  7. int Wonx_Error(char * funcname, char * message)
  8. {
  9. fprintf(stderr, "%s(): %s\n", funcname, message);
  10. exit (1);
  11. }
  12. /*===========================================================================*/
  13. /* "true", "false" の矢机误を手す */
  14. /*===========================================================================*/
  15. char * true_false(int b)
  16. {
  17. char * s[] = {"false", "true"};
  18. b = b ? 1 : 0;
  19. return (s[b]);
  20. }