parse_util.h 1.0 KB

123456789101112131415161718192021222324252627282930
  1. /* parse_util.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 PARSE_UTIL_H
  14. #define PARSE_UTIL_H
  15. int is_field(const char *type, const char *line);
  16. char *parse_simple(const char *type, const char *line);
  17. char **parse_list(const char *raw, unsigned int *count, const char sep,
  18. int skip_field);
  19. typedef int (*parse_line_t) (void *, const char *, uint);
  20. int parse_from_stream_nomalloc(parse_line_t parse_line, void *item, FILE * fp,
  21. uint mask, char **buf0, size_t buf0len);
  22. #endif