utils.h
Go to the documentation of this file.
00001 #ifndef H_SM_UTILS
00002 #define H_SM_UTILS
00003 
00004 #include <stdio.h>
00005 
00008 FILE * open_file_for_reading(const char*filename);
00009 
00013 FILE * open_file_for_writing(const char*filename);
00014 
00015 /* Could you believe there isn't a portable implementation of these? */
00016 
00017 /* TODO: switch for windows */
00018 #define DIR_SEPARATOR '/' 
00019 
00020 /*  "dir/base.suf" -> "base.suf" */
00021 void my_basename(const char *file, char*dest);
00022 /*  "dir/base.suf" -> "base" */
00023 void my_basename_no_suffix(const char *file, char*dest);
00024 /*  "dir/base.suf" -> "dir/base" */
00025 void my_no_suffix(const char *file, char*dest);
00026 
00027 char * my_strdup(const char *s);
00028 
00029 #endif


csm
Author(s): Andrea Censi
autogenerated on Mon Jan 16 2017 03:48:29