noegg.c 477 B

12345678910111213141516171819202122232425262728293031323334
  1. #ifndef __stdlib_h__
  2. #include <stdlib.h>
  3. #endif
  4. // #include "compat/snprintf.c"
  5. static void nputlog(char *s, ...)
  6. {
  7. }
  8. char *newsplit(char **rest)
  9. {
  10. register char *o, *r;
  11. if (!rest)
  12. return *rest = "";
  13. o = *rest;
  14. while (*o == ' ')
  15. o++;
  16. r = o;
  17. while (*o && (*o != ' '))
  18. o++;
  19. if (*o)
  20. *o++ = 0;
  21. *rest = o;
  22. return r;
  23. }
  24. static void fatal(char *s, int x)
  25. {
  26. putlog(LOG_MISC, "*", "%s", s);
  27. exit(EXIT_FAILURE);
  28. }