utils.h
Go to the documentation of this file.
1 #ifndef H_SM_UTILS
2 #define H_SM_UTILS
3 
4 #include <stdio.h>
5 
8 FILE * open_file_for_reading(const char*filename);
9 
13 FILE * open_file_for_writing(const char*filename);
14 
15 /* Could you believe there isn't a portable implementation of these? */
16 
17 /* TODO: switch for windows */
18 #define DIR_SEPARATOR '/'
19 
20 /* "dir/base.suf" -> "base.suf" */
21 void my_basename(const char *file, char*dest);
22 /* "dir/base.suf" -> "base" */
23 void my_basename_no_suffix(const char *file, char*dest);
24 /* "dir/base.suf" -> "dir/base" */
25 void my_no_suffix(const char *file, char*dest);
26 
27 char * my_strdup(const char *s);
28 
29 #endif
void my_no_suffix(const char *file, char *dest)
Definition: utils.c:52
FILE * open_file_for_writing(const char *filename)
Definition: utils.c:25
char * my_strdup(const char *s)
Definition: utils.c:61
void my_basename_no_suffix(const char *file, char *dest)
Definition: utils.c:40
void my_basename(const char *file, char *dest)
Definition: utils.c:32
FILE * open_file_for_reading(const char *filename)
Definition: utils.c:19


csm
Author(s): Andrea Censi
autogenerated on Tue May 11 2021 02:18:23