Clog.c 591 B

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. #include "stdinc.h"
  2. #include "9.h"
  3. /*
  4. * Dummy for now.
  5. */
  6. int
  7. consPrint(char* fmt, ...)
  8. {
  9. int len;
  10. va_list args;
  11. char buf[ERRMAX];
  12. /*
  13. * To do:
  14. * This will be integrated with logging and become 'print'.
  15. */
  16. va_start(args, fmt);
  17. len = vsnprint(buf, sizeof(buf), fmt, args);
  18. va_end(args);
  19. return consWrite(buf, len);
  20. }
  21. int
  22. consVPrint(char* fmt, va_list args)
  23. {
  24. int len;
  25. char buf[ERRMAX];
  26. /*
  27. * To do:
  28. * This will be integrated with logging and become
  29. * something else ('vprint'?).
  30. */
  31. len = vsnprint(buf, sizeof(buf), fmt, args);
  32. return consWrite(buf, len);
  33. }