1
0

query_dump.c 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. #include "private.h"
  2. #include "lub/dump.h"
  3. /*-------------------------------------------------------- */
  4. void konf_query_dump(konf_query_t *this)
  5. {
  6. const char *op;
  7. lub_dump_printf("query(%p)\n", this);
  8. lub_dump_indent();
  9. switch (this->op) {
  10. case KONF_QUERY_OP_SET:
  11. op = "SET";
  12. break;
  13. case KONF_QUERY_OP_UNSET:
  14. op = "UNSET";
  15. break;
  16. case KONF_QUERY_OP_DUMP:
  17. op = "DUMP";
  18. break;
  19. case KONF_QUERY_OP_OK:
  20. op = "OK";
  21. break;
  22. case KONF_QUERY_OP_ERROR:
  23. op = "ERROR";
  24. break;
  25. case KONF_QUERY_OP_STREAM:
  26. op = "STREAM";
  27. break;
  28. default:
  29. op = "UNKNOWN";
  30. break;
  31. }
  32. lub_dump_printf("operation : %s\n", op);
  33. lub_dump_printf("pattern : %s\n", this->pattern);
  34. lub_dump_printf("priority : %u\n", this->priority);
  35. lub_dump_printf("sequence : %u\n", this->seq);
  36. lub_dump_printf("seq_num : %u\n", this->seq_num);
  37. lub_dump_printf("line : %s\n", this->line);
  38. lub_dump_printf("path : %s\n", this->path);
  39. lub_dump_printf("pwdc : %u\n", this->pwdc);
  40. lub_dump_printf("splitter : %s\n", this->splitter ? "true" : "false");
  41. lub_dump_printf("unique : %s\n", this->unique ? "true" : "false");
  42. lub_dump_undent();
  43. }