pkg_parse.h 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. /* pkg_parse.h - the opkg package management system
  2. Steven M. Ayer
  3. Copyright (C) 2002 Compaq Computer Corporation
  4. This program is free software; you can redistribute it and/or
  5. modify it under the terms of the GNU General Public License as
  6. published by the Free Software Foundation; either version 2, or (at
  7. your option) any later version.
  8. This program is distributed in the hope that it will be useful, but
  9. WITHOUT ANY WARRANTY; without even the implied warranty of
  10. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  11. General Public License for more details.
  12. */
  13. #ifndef PKG_PARSE_H
  14. #define PKG_PARSE_H
  15. #include "pkg.h"
  16. int parse_version(pkg_t * pkg, const char *raw);
  17. int pkg_parse_from_stream(pkg_t * pkg, FILE * fp, uint mask);
  18. int pkg_parse_line(void *ptr, char *line, uint mask);
  19. #define EXCESSIVE_LINE_LEN (4096 << 8)
  20. /* package field mask */
  21. #define PFM_ALTERNATIVES (1 << 1)
  22. #define PFM_ARCHITECTURE (1 << 2)
  23. #define PFM_AUTO_INSTALLED (1 << 3)
  24. #define PFM_CONFFILES (1 << 4)
  25. #define PFM_CONFLICTS (1 << 5)
  26. #define PFM_DESCRIPTION (1 << 6)
  27. #define PFM_DEPENDS (1 << 7)
  28. #define PFM_ESSENTIAL (1 << 8)
  29. #define PFM_FILENAME (1 << 9)
  30. #define PFM_INSTALLED_SIZE (1 << 10)
  31. #define PFM_INSTALLED_TIME (1 << 11)
  32. #define PFM_MD5SUM (1 << 12)
  33. #define PFM_MAINTAINER (1 << 13)
  34. #define PFM_PACKAGE (1 << 14)
  35. #define PFM_PRIORITY (1 << 15)
  36. #define PFM_PROVIDES (1 << 16)
  37. #define PFM_PRE_DEPENDS (1 << 17)
  38. #define PFM_RECOMMENDS (1 << 18)
  39. #define PFM_REPLACES (1 << 19)
  40. #define PFM_SECTION (1 << 20)
  41. #define PFM_SHA256SUM (1 << 21)
  42. #define PFM_SIZE (1 << 22)
  43. #define PFM_SOURCE (1 << 23)
  44. #define PFM_STATUS (1 << 24)
  45. #define PFM_SUGGESTS (1 << 25)
  46. #define PFM_TAGS (1 << 26)
  47. #define PFM_VERSION (1 << 27)
  48. #define PFM_ABIVERSION (1 << 28)
  49. #define PFM_ALL (~(uint)0)
  50. #endif