[PATCH 3/3] refactor: rename *_private_libs to *_libs_private
Oneric
oneric at oneric.de
Fri Oct 15 20:31:17 UTC 2021
This brings the function and variable names in line with
parse_libs_private and the names used for the variables and
functions of the Requires.privat and Cflags.private fields.
---
main.c | 4 ++--
parse.c | 8 ++++----
parse.h | 2 +-
pkg.c | 16 ++++++++--------
pkg.h | 4 ++--
5 files changed, 17 insertions(+), 17 deletions(-)
diff --git a/main.c b/main.c
index 7bc560e..1ca3347 100644
--- a/main.c
+++ b/main.c
@@ -616,12 +616,12 @@ main (int argc, char **argv)
if (want_static_lib_list)
{
- enable_private_libs();
+ enable_libs_private();
enable_cflags_private();
}
else
{
- disable_private_libs();
+ disable_libs_private();
disable_cflags_private();
}
diff --git a/parse.c b/parse.c
index 39a63cd..75e016e 100644
--- a/parse.c
+++ b/parse.c
@@ -964,7 +964,7 @@ parse_url (Package *pkg, const char *str, const char *path)
static void
parse_line (Package *pkg, const char *untrimmed, const char *path,
- gboolean ignore_requires, gboolean ignore_private_libs,
+ gboolean ignore_requires, gboolean ignore_libs_private,
gboolean ignore_requires_private, gboolean ignore_cflags_private)
{
char *str;
@@ -1022,7 +1022,7 @@ parse_line (Package *pkg, const char *untrimmed, const char *path,
}
else if (strcmp (tag, "Libs.private") == 0)
{
- if (!ignore_private_libs)
+ if (!ignore_libs_private)
parse_libs_private (pkg, p, path);
}
else if (strcmp (tag, "Libs") == 0)
@@ -1152,7 +1152,7 @@ parse_line (Package *pkg, const char *untrimmed, const char *path,
Package*
parse_package_file (const char *key, const char *path,
gboolean ignore_requires,
- gboolean ignore_private_libs,
+ gboolean ignore_libs_private,
gboolean ignore_requires_private,
gboolean ignore_cflags_private)
{
@@ -1198,7 +1198,7 @@ parse_package_file (const char *key, const char *path,
{
one_line = TRUE;
- parse_line (pkg, str->str, path, ignore_requires, ignore_private_libs,
+ parse_line (pkg, str->str, path, ignore_requires, ignore_libs_private,
ignore_requires_private, ignore_cflags_private);
g_string_truncate (str, 0);
diff --git a/parse.h b/parse.h
index 6135a4e..93a3f95 100644
--- a/parse.h
+++ b/parse.h
@@ -24,7 +24,7 @@
Package *parse_package_file (const char *key, const char *path,
gboolean ignore_requires,
- gboolean ignore_private_libs,
+ gboolean ignore_libs_private,
gboolean ignore_requires_private,
gboolean ignore_cflags_private);
diff --git a/pkg.c b/pkg.c
index 202c944..193b5f9 100644
--- a/pkg.c
+++ b/pkg.c
@@ -49,7 +49,7 @@ static GList *search_dirs = NULL;
gboolean disable_uninstalled = FALSE;
gboolean ignore_requires = FALSE;
gboolean ignore_requires_private = TRUE;
-gboolean ignore_private_libs = TRUE;
+gboolean ignore_libs_private = TRUE;
gboolean ignore_cflags_private = TRUE;
void
@@ -301,7 +301,7 @@ internal_get_package (const char *name, gboolean warn)
debug_spew ("Reading '%s' from file '%s'\n", name, location);
pkg = parse_package_file (key, location, ignore_requires,
- ignore_private_libs, ignore_requires_private,
+ ignore_libs_private, ignore_requires_private,
ignore_cflags_private);
g_free (key);
@@ -952,7 +952,7 @@ packages_get_flags (GList *pkgs, FlagType flags)
}
if (flags & LIBS_L)
{
- cur = get_multi_merged (pkgs, LIBS_L, TRUE, !ignore_private_libs);
+ cur = get_multi_merged (pkgs, LIBS_L, TRUE, !ignore_libs_private);
debug_spew ("adding LIBS_L string \"%s\"\n", cur);
g_string_append (str, cur);
g_free (cur);
@@ -960,7 +960,7 @@ packages_get_flags (GList *pkgs, FlagType flags)
if (flags & (LIBS_OTHER | LIBS_l))
{
cur = get_multi_merged (pkgs, flags & (LIBS_OTHER | LIBS_l), FALSE,
- !ignore_private_libs);
+ !ignore_libs_private);
debug_spew ("adding LIBS_OTHER | LIBS_l string \"%s\"\n", cur);
g_string_append (str, cur);
g_free (cur);
@@ -1215,15 +1215,15 @@ print_package_list (void)
}
void
-enable_private_libs(void)
+enable_libs_private(void)
{
- ignore_private_libs = FALSE;
+ ignore_libs_private = FALSE;
}
void
-disable_private_libs(void)
+disable_libs_private(void)
{
- ignore_private_libs = TRUE;
+ ignore_libs_private = TRUE;
}
void
diff --git a/pkg.h b/pkg.h
index 09dd255..cc08e50 100644
--- a/pkg.h
+++ b/pkg.h
@@ -117,8 +117,8 @@ void verbose_error (const char *format, ...);
gboolean name_ends_in_uninstalled (const char *str);
-void enable_private_libs(void);
-void disable_private_libs(void);
+void enable_libs_private(void);
+void disable_libs_private(void);
void enable_requires(void);
void disable_requires(void);
void enable_requires_private(void);
--
2.30.2
More information about the pkg-config
mailing list