Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
convert svn logs into ChangeLog (up to r7858 for now)
[simgrid.git] / tools / tesh2 / include / getpath.h
1 #ifndef __GETPATH_H\r
2 #define __GETPATH_H\r
3 \r \r\r
4 #ifdef __cplusplus\r
5 extern "C" {
6   \r
7 #endif  /* \r */
8   \r
9 /* getpath th     --    get the path of the file name specified by the first parameter\r
10  *                                              of the function and store the path in its second parmater.\r
11  *                                              the function returns the length of the path of the file.                                 \r
12  *\r
13  * param file_name              The file name to get the path\r
14  * param path                   The address of the path of the file\r
15  * \r
16  * return                               If successful, the function returns the len of the path.\r
17  *                                              Otherwise the function returns -1 and sets errno to indicate\r
18  *                                              the error.\r
19  *\r
20  * errors\r
21  *\r
22  *                                              [ENOENT]        the file name specified as parameter does not exist.\r
23  *                              \r
24  *                                              [ENOMEM]        because this function use calloc, errno can be set with\r
25  *                                                                      this error code.                                \r
26  *\r
27  */ \r
28   int \r getpath(const char *file_name, char **path);
29   \r\r
30 /* translatepath   --   path translation\r
31  *\r
32  * param totranslate    The path to translate.\r
33  * param transled               The address of the translated path.\r
34  *\r
35  * return                               If successful the function returns the len of the translated path.\r
36  *                                              0therwise the function returns -1 and sets the global variable errno\r
37  *                                              to indicate the error.\r
38  *\r
39  * errors                               [ENOTDIR]       the path to translate is not a directory.\r
40  \r
41  *                                              [ENOMEM]        because this function use calloc, errno can be set with\r
42  *                                                                      this error code.                                \r
43  */ \r
44   int \r translatepath(const char *totranslate, char **translated);
45   \r\r
46 #ifdef __cplusplus\r
47\r
48 #endif  /* \r */
49 \r\r
50 #endif  /* !__GETPATH_H */\r