Functions
utils.c File Reference
#include <string.h>
#include <errno.h>
#include "csm_all.h"
Include dependency graph for utils.c:

Go to the source code of this file.

Functions

void my_basename (const char *file, char *dest)
void my_basename_no_suffix (const char *file, char *dest)
void my_no_suffix (const char *file, char *dest)
char * my_strdup (const char *s)
FILE * open_file (const char *filename, const char *mode)
FILE * open_file_for_reading (const char *filename)
FILE * open_file_for_writing (const char *filename)

Function Documentation

void my_basename ( const char *  file,
char *  dest 
)

Definition at line 32 of file utils.c.

void my_basename_no_suffix ( const char *  file,
char *  dest 
)

Definition at line 40 of file utils.c.

void my_no_suffix ( const char *  file,
char *  dest 
)

Definition at line 52 of file utils.c.

char* my_strdup ( const char *  s)

Our version of strdup.

Definition at line 61 of file utils.c.

FILE * open_file ( const char *  filename,
const char *  mode 
)

Wraps around fopen and provides error message.

Definition at line 10 of file utils.c.

FILE* open_file_for_reading ( const char *  filename)

Tries to open a file for reading; if filename == "-" or "stdin", returns standard input. An error message is printed in case of error.

Definition at line 19 of file utils.c.

FILE* open_file_for_writing ( const char *  filename)

Tries to open a file for reading; if filename == "-" | "stdout", returns standard output. If it's "stderr" same. An error message is printed in case of error.

Definition at line 25 of file utils.c.



csm
Author(s): Andrea Censi
autogenerated on Fri May 17 2019 02:28:33