query_dump.c 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  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_printf("depth : %d\n", this->depth);
  43. lub_dump_undent();
  44. }