GRASS Programmer's Manual  6.5.svn(2014)-r66266
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
tools.c File Reference
#include "globals.h"
Include dependency graph for tools.c:

Go to the source code of this file.

Functions

char * basename (char *path)
 
void mkdir_s (char *pathname, char *mode)
 
int chop (char *string)
 
int insert_str (char *str, int pos, char **strarr)
 
int delete_str (int pos, char **strarr)
 
int find_pos (char *str, char **strarr, int start)
 
void dump_str (FILE *f, char **strarr)
 
void get_package_name (char *path, char *name)
 
char * nc_fgets (char *s, int size, FILE *stream)
 
char * nc_fgets_html (char *s, int size, FILE *stream)
 
int is_text (char *s)
 
char * nc_fgets_nb (char *s, int size, FILE *stream)
 
void dump_ascii (char *file, char *heading)
 
void dump_plain (char *file, char *tmpfile)
 
void dump_html (char *file, char *tmpfile)
 
void list_binaries (char *package)
 
int binaries_exist (char *package, char *binaries)
 
int check_filetype (char *myfile)
 
void wget_extension (char *url)
 
void su (char *gisbase, char *cmd)
 
int vercmp (int major, int minor, int revision, int major2, int minor2, int revision2)
 

Function Documentation

char* basename ( char *  path)
int binaries_exist ( char *  package,
char *  binaries 
)

Definition at line 690 of file tools.c.

References MAXSTR, NULL, opendir(), readdir(), sprintf(), and stat.

Referenced by main().

int check_filetype ( char *  myfile)

Definition at line 737 of file tools.c.

References NULL.

Referenced by unpack_extension().

int chop ( char *  string)

Definition at line 86 of file tools.c.

Referenced by dump_html(), get_package_name(), and new_item().

int delete_str ( int  pos,
char **  strarr 
)
void dump_ascii ( char *  file,
char *  heading 
)

Definition at line 539 of file tools.c.

References fclose(), MAXSTR, nc_fgets_html(), and NULL.

Referenced by list_extensions(), query_extension(), show_details(), and show_license().

void dump_html ( char *  file,
char *  tmpfile 
)

Definition at line 597 of file tools.c.

References chop(), ERR_DUMP_PLAIN_TXT, errno, exit_db(), fclose(), fd, is_text(), MAXSTR, nc_fgets(), NULL, print_error(), and sprintf().

Referenced by bin_install(), and source_install().

void dump_plain ( char *  file,
char *  tmpfile 
)

Definition at line 563 of file tools.c.

References ERR_DUMP_PLAIN_TXT, errno, exit_db(), fclose(), MAXSTR, nc_fgets(), NULL, and print_error().

Referenced by test_install().

void dump_str ( FILE *  f,
char **  strarr 
)

Definition at line 258 of file tools.c.

References NULL.

int find_pos ( char *  str,
char **  strarr,
int  start 
)
void get_package_name ( char *  path,
char *  name 
)

Definition at line 273 of file tools.c.

References chop(), ERR_INVALID_EXT, fclose(), file, MAXSTR, nc_fgets_nb(), NULL, print_error(), and sprintf().

Referenced by check_extension(), and main().

int insert_str ( char *  str,
int  pos,
char **  strarr 
)
int is_text ( char *  s)

Definition at line 474 of file tools.c.

Referenced by dump_html(), and nc_fgets_nb().

void list_binaries ( char *  package)

Definition at line 642 of file tools.c.

References MAXSTR, NULL, opendir(), readdir(), sprintf(), and stat.

Referenced by query_extension().

void mkdir_s ( char *  pathname,
char *  mode 
)

Definition at line 73 of file tools.c.

References sprintf().

Referenced by unpack_extension().

char* nc_fgets ( char *  s,
int  size,
FILE *  stream 
)

Definition at line 307 of file tools.c.

References free(), malloc(), MAXSTR, nc_fgets(), NULL, and sprintf().

Referenced by dump_html(), dump_plain(), and nc_fgets().

char* nc_fgets_html ( char *  s,
int  size,
FILE *  stream 
)

Definition at line 339 of file tools.c.

References free(), malloc(), MAXSTR, nc_fgets_html(), NULL, tools::pos, dialogs::s, and sprintf().

Referenced by dump_ascii(), and nc_fgets_html().

void su ( char *  gisbase,
char *  cmd 
)
int vercmp ( int  major,
int  minor,
int  revision,
int  major2,
int  minor2,
int  revision2 
)

Definition at line 832 of file tools.c.

Referenced by check_dependencies(), and register_extension().

void wget_extension ( char *  url)

Definition at line 766 of file tools.c.

References ERR_DOWNLOAD, MAXSTR, print_done(), print_error(), sprintf(), and VERBOSE.

Referenced by main().