Added yasm_get_include_dir() function.

svn path=/branches/multiarch/; revision=1934
multiarch
paulbarker 17 years ago
parent 5e9f538bb3
commit 44a777ca7c
  1. 17
      libyasm/file.c
  2. 4
      libyasm/file.h

@ -518,6 +518,23 @@ yasm_delete_include_paths(void)
STAILQ_INIT(&incpaths);
}
const char *
yasm_get_include_dir(void **iter)
{
incpath *p = (incpath *)*iter;
if (!p)
p = STAILQ_FIRST(&incpaths);
else
p = STAILQ_NEXT(p, link);
*iter = p;
if (p)
return p->path;
else
return NULL;
}
void
yasm_add_include_path(const char *path)
{

@ -210,6 +210,10 @@ char *yasm__combpath_win(const char *from, const char *to);
*/
void yasm_delete_include_paths(void);
/** Iterate through include paths.
*/
const char * yasm_get_include_dir(void **iter)
/** Add an include path for use by yasm_fopen_include().
* If path is relative, it is treated by yasm_fopen_include() as relative to
* the current working directory.

Loading…
Cancel
Save