forked from ariadne/pkgconf
pkg: parse_file is now pkg_new_from_file
parent
d07e41c3f9
commit
db6d0e2309
2
parse.c
2
parse.c
|
@ -320,7 +320,7 @@ pkg_dependency_parse(pkg_t *pkg, const char *depends)
|
|||
* Parse a .pc file into a pkg_t object structure.
|
||||
*/
|
||||
pkg_t *
|
||||
parse_file(const char *filename, FILE *f)
|
||||
pkg_new_from_file(const char *filename, FILE *f)
|
||||
{
|
||||
pkg_t *pkg;
|
||||
char readbuf[BUFSIZ];
|
||||
|
|
10
pkg.c
10
pkg.c
|
@ -142,7 +142,7 @@ pkg_find(const char *name, unsigned int flags)
|
|||
if (str_has_suffix(name, PKG_CONFIG_EXT))
|
||||
{
|
||||
if ((f = fopen(name, "r")) != NULL)
|
||||
return parse_file(name, f);
|
||||
return pkg_new_from_file(name, f);
|
||||
}
|
||||
|
||||
/* PKG_CONFIG_PATH has to take precedence */
|
||||
|
@ -158,7 +158,7 @@ pkg_find(const char *name, unsigned int flags)
|
|||
|
||||
if (!(flags & PKGF_NO_UNINSTALLED) && (f = fopen(uninst_locbuf, "r")) != NULL)
|
||||
{
|
||||
pkg = parse_file(locbuf, f);
|
||||
pkg = pkg_new_from_file(locbuf, f);
|
||||
pkg->uninstalled = true;
|
||||
|
||||
goto out;
|
||||
|
@ -166,7 +166,7 @@ pkg_find(const char *name, unsigned int flags)
|
|||
|
||||
if ((f = fopen(locbuf, "r")) != NULL)
|
||||
{
|
||||
pkg = parse_file(locbuf, f);
|
||||
pkg = pkg_new_from_file(locbuf, f);
|
||||
goto out;
|
||||
}
|
||||
|
||||
|
@ -190,7 +190,7 @@ pkg_find(const char *name, unsigned int flags)
|
|||
|
||||
if (!(flags & PKGF_NO_UNINSTALLED) && (f = fopen(uninst_locbuf, "r")) != NULL)
|
||||
{
|
||||
pkg_t *pkg = parse_file(locbuf, f);
|
||||
pkg_t *pkg = pkg_new_from_file(locbuf, f);
|
||||
pkg->uninstalled = true;
|
||||
|
||||
goto out;
|
||||
|
@ -198,7 +198,7 @@ pkg_find(const char *name, unsigned int flags)
|
|||
|
||||
if ((f = fopen(locbuf, "r")) != NULL)
|
||||
{
|
||||
pkg = parse_file(locbuf, f);
|
||||
pkg = pkg_new_from_file(locbuf, f);
|
||||
goto out;
|
||||
}
|
||||
|
||||
|
|
2
pkg.h
2
pkg.h
|
@ -144,7 +144,7 @@ pkg_t *pkg_verify_dependency(pkg_dependency_t *pkgdep, unsigned int flags, unsig
|
|||
const char *pkg_get_comparator(pkg_dependency_t *pkgdep);
|
||||
|
||||
/* parse.c */
|
||||
pkg_t *parse_file(const char *path, FILE *f);
|
||||
pkg_t *pkg_new_from_file(const char *path, FILE *f);
|
||||
pkg_dependency_t *pkg_dependency_parse(pkg_t *pkg, const char *depends);
|
||||
pkg_dependency_t *pkg_dependency_append(pkg_dependency_t *head, pkg_dependency_t *tail);
|
||||
void pkg_dependency_free(pkg_dependency_t *head);
|
||||
|
|
Loading…
Reference in New Issue