dvbcfg_common.h 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. /*
  2. * dvbcfg - support for linuxtv configuration files
  3. * common functions
  4. *
  5. * Copyright (C) 2006 Christoph Pfister <christophpfister@gmail.com>
  6. * Copyright (C) 2005 Andrew de Quincey <adq_dvb@lidskialf.net>
  7. *
  8. * This library is free software; you can redistribute it and/or
  9. * modify it under the terms of the GNU Lesser General Public
  10. * License as published by the Free Software Foundation; either
  11. * version 2.1 of the License, or (at your option) any later version.
  12. *
  13. * This library is distributed in the hope that it will be useful,
  14. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  15. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  16. * Lesser General Public License for more details.
  17. *
  18. * You should have received a copy of the GNU Lesser General Public
  19. * License along with this library; if not, write to the Free Software
  20. * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
  21. */
  22. #ifndef DVBCFG_COMMON_H
  23. #define DVBCFG_COMMON_H 1
  24. struct dvbcfg_setting {
  25. const char *name;
  26. unsigned int value;
  27. };
  28. extern int dvbcfg_parse_int(char **text, char *tokens);
  29. extern int dvbcfg_parse_char(char **text, char *tokens);
  30. extern int dvbcfg_parse_setting(char **text, char *tokens, const struct dvbcfg_setting *settings);
  31. extern void dvbcfg_parse_string(char **text, char *tokens, char *dest, unsigned long size);
  32. extern const char *dvbcfg_lookup_setting(unsigned int setting, const struct dvbcfg_setting *settings);
  33. #endif