GRASS Programmer's Manual
6.4.2(2012)
|
00001 00002 /*************************************************************************** 00003 * tools.h 00004 * 00005 * Mon Apr 18 15:04:11 2005 00006 * Copyright 2005 Benjamin Ducke 00007 ****************************************************************************/ 00008 00009 /* 00010 * This program is free software; you can redistribute it and/or modify 00011 * it under the terms of the GNU General Public License as published by 00012 * the Free Software Foundation; either version 2 of the License, or 00013 * (at your option) any later version. 00014 * 00015 * This program is distributed in the hope that it will be useful, 00016 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00017 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00018 * GNU Library General Public License for more details. 00019 * 00020 * You should have received a copy of the GNU General Public License 00021 * along with this program; if not, write to the Free Software 00022 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 00023 */ 00024 00025 #ifndef _TOOLS_H 00026 #define _TOOLS_H 00027 00028 char *basename(char *path); 00029 00030 void mkdir_s(char *pathname, char *mode); 00031 00032 int chop(char *string); 00033 00034 int insert_str(char *str, int pos, char **strarr); 00035 00036 int delete_str(int pos, char **strarr); 00037 00038 int find_pos(char *str, char **strarr, int start); 00039 00040 void dump_str(FILE * f, char **strarr); 00041 00042 void get_package_name(char *path, char *name); 00043 00044 char *nc_fgets(char *s, int size, FILE * stream); 00045 00046 char *nc_fgets_nb(char *s, int size, FILE * stream); 00047 00048 char *nc_fgets_html(char *s, int size, FILE * stream); 00049 00050 void dump_ascii(char *file, char *heading); 00051 00052 void dump_plain(char *file, char *tmpfile); 00053 00054 void dump_html(char *file, char *tmpfile); 00055 00056 void list_binaries(char *package); 00057 00058 int binaries_exist(char *package, char *binaries); 00059 00060 int check_filetype(char *file); 00061 00062 void wget_extension(char *url); 00063 00064 void su(char *gisbase, char *cmd); 00065 00066 int vercmp(int major, int minor, int revision, int major2, int minor2, 00067 int revision2); 00068 00069 #endif /* _TOOLS_H */