Skip to content
Snippets Groups Projects
Commit daa71b23 authored by Eric Vidal's avatar Eric Vidal :speech_balloon:
Browse files

pass to the new format of resolve file. Note: this function should dissappear

parent 9d650c75
No related branches found
No related tags found
No related merge requests found
......@@ -29,15 +29,15 @@ int module_in_cmdline(genalloc *gares, resolve_service_t *res, char const *dir)
log_flow() ;
int e = 0 ;
stralloc tmp = STRALLOC_ZERO ;
/* stralloc tmp = STRALLOC_ZERO ;
size_t pos = 0 ;
resolve_wrapper_t_ref wres = resolve_set_struct(DATA_SERVICE, res) ;
if (!resolve_append(gares,wres)) goto err ;
if (res->contents)
if (res->dependencies.depends)
{
if (!sastr_clean_string(&tmp,res->sa.s + res->contents))
if (!sastr_clean_string(&tmp,res->sa.s + res->dependencies.depends))
goto err ;
}
for (; pos < tmp.len ; pos += strlen(tmp.s + pos) + 1)
......@@ -55,5 +55,5 @@ int module_in_cmdline(genalloc *gares, resolve_service_t *res, char const *dir)
err:
free(wres) ;
stralloc_free(&tmp) ;
return e ;
*/ return e ;
}
......@@ -49,9 +49,9 @@ int module_search_service(char const *src, genalloc *gares, char const *name,uin
{
char *dname = list.s + pos ;
if (!resolve_read(wres,src,dname)) goto err ;
if (res.type == TYPE_MODULE && res.contents)
if (res.type == TYPE_MODULE && res.dependencies.depends)
{
if (!sastr_clean_string(&tmp,res.sa.s + res.contents)) goto err ;
if (!sastr_clean_string(&tmp,res.sa.s + res.dependencies.depends)) goto err ;
for (deps = 0 ; deps < tmp.len ; deps += strlen(tmp.s + deps) + 1)
{
if (!strcmp(name,tmp.s + deps))
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment