blob: 8aa38654b887ec4a4beba584d3d8495ab5215ee2 [file] [log] [blame]
Lev Walkin79f54952004-08-13 16:58:19 +00001#ifndef ASN1C_COMPAT_H
2#define ASN1C_COMPAT_H
3
Lev Walkin4b102252004-08-19 13:29:18 +00004/*
5 * Open the arbitrary file by its base name and extension.
Lev Walkin4604d032005-03-04 08:52:50 +00006 * If opt_tmpname is given, a temporary file will be created and
7 * its name returned in (*opt_tmpname).
8 * The (*opt_tmpname) should then be subsequently freed by free(3).
Lev Walkin4b102252004-08-19 13:29:18 +00009 */
Lev Walkin4604d032005-03-04 08:52:50 +000010FILE *asn1c_open_file(const char *base_part, const char *extension,
11 char **opt_tmpname);
Lev Walkin4b102252004-08-19 13:29:18 +000012
13/*
14 * Obtain base name and directory name of a path.
15 * Some systems have them in <libgen.h> as dirname(3) and basename(3).
16 */
Lev Walkin79f54952004-08-13 16:58:19 +000017char *a1c_basename(const char *path);
18char *a1c_dirname(const char *path);
19
20#endif /* ASN1C_COMPAT_H */