Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
TESH: msg to s4u - act 1
[simgrid.git] / include / xbt / file.h
1 /* Copyright (c) 2007-2015. The SimGrid Team.
2  * All rights reserved.                                                     */
3
4 /* This program is free software; you can redistribute it and/or modify it
5  * under the terms of the license (GNU LGPL) which comes with this package. */
6
7 #ifndef XBT_FILE_H
8 #define XBT_FILE_H
9
10 #include <stdint.h> /* ssize_t */
11 #include <stdarg.h>             /* va_* */
12 #include <stdio.h>  /* FILE */
13 #include <stdlib.h> /* size_t, ssize_t */
14 #include "xbt/misc.h"
15 #include "xbt/dynar.h"
16 #include "xbt/dict.h"
17 #include "simgrid_config.h"     /* FILE for getline */
18
19 SG_BEGIN_DECL()
20
21 /** @defgroup XBT_file File manipulation functions
22  *  @ingroup XBT_misc
23  *
24  * This module redefine some quite classical functions such as xbt_getline() or xbt_dirname() for the platforms
25  * lacking them.
26  * @{
27  */
28 /* Our own implementation of getline, mainly useful on the platforms not enjoying this function */
29 XBT_PUBLIC(ssize_t) xbt_getline(char **lineptr, size_t * n, FILE * stream);
30
31 /* Our own implementation of dirname, that does not exist on windows */
32 XBT_PUBLIC(char *) xbt_dirname(const char *path);
33 XBT_PUBLIC(char *) xbt_basename(const char *path);
34
35 /**@}*/
36
37 SG_END_DECL()
38 #endif                          /* XBT_FILE_H */