tools.h 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  1. /***************************************************************************
  2. * tools.h
  3. *
  4. * Mon Apr 18 15:04:11 2005
  5. * Copyright 2005 Benjamin Ducke
  6. ****************************************************************************/
  7. /*
  8. * This program is free software; you can redistribute it and/or modify
  9. * it under the terms of the GNU General Public License as published by
  10. * the Free Software Foundation; either version 2 of the License, or
  11. * (at your option) any later version.
  12. *
  13. * This program 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
  16. * GNU Library General Public License for more details.
  17. *
  18. * You should have received a copy of the GNU General Public License
  19. * along with this program; if not, write to the Free Software
  20. * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
  21. */
  22. #ifndef _TOOLS_H
  23. #define _TOOLS_H
  24. char *basename(char *path);
  25. void mkdir_s(char *pathname, char *mode);
  26. int chop(char *string);
  27. int insert_str(char *str, int pos, char **strarr);
  28. int delete_str(int pos, char **strarr);
  29. int find_pos(char *str, char **strarr, int start);
  30. void dump_str(FILE * f, char **strarr);
  31. void get_package_name(char *path, char *name);
  32. char *nc_fgets(char *s, int size, FILE * stream);
  33. char *nc_fgets_nb(char *s, int size, FILE * stream);
  34. char *nc_fgets_html(char *s, int size, FILE * stream);
  35. void dump_ascii(char *file, char *heading);
  36. void dump_plain(char *file, char *tmpfile);
  37. void dump_html(char *file, char *tmpfile);
  38. void list_binaries(char *package);
  39. int binaries_exist(char *package, char *binaries);
  40. int check_filetype(char *file);
  41. void wget_extension(char *url);
  42. void su(char *gisbase, char *cmd);
  43. int vercmp(int major, int minor, int revision, int major2, int minor2,
  44. int revision2);
  45. #endif /* _TOOLS_H */