You can not select more than 25 topics Topics must start with a chinese character,a letter or number, can include dashes ('-') and can be up to 35 characters long.

printbuf.h 796 B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. /*
  2. * $Id: printbuf.h,v 1.4 2006/01/26 02:16:28 mclark Exp $
  3. *
  4. * Copyright (c) 2004, 2005 Metaparadigm Pte. Ltd.
  5. * Michael Clark <michael@metaparadigm.com>
  6. *
  7. * This library is free software; you can redistribute it and/or modify
  8. * it under the terms of the MIT license. See COPYING for details.
  9. *
  10. */
  11. #ifndef _printbuf_h_
  12. #define _printbuf_h_
  13. #ifdef __cplusplus
  14. extern "C" {
  15. #endif
  16. #undef PRINTBUF_DEBUG
  17. struct printbuf {
  18. char *buf;
  19. int bpos;
  20. int size;
  21. };
  22. extern struct printbuf*
  23. printbuf_new(void);
  24. extern int
  25. printbuf_memappend(struct printbuf *p, const char *buf, int size);
  26. extern int
  27. sprintbuf(struct printbuf *p, const char *msg, ...);
  28. extern void
  29. printbuf_reset(struct printbuf *p);
  30. extern void
  31. printbuf_free(struct printbuf *p);
  32. #ifdef __cplusplus
  33. }
  34. #endif
  35. #endif

No Description

Contributors (1)