summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJason Woodward2019-07-28 15:06:58 +0000
committerJason Woodward2019-07-28 19:45:21 +0000
commit7c3b5f020f48992b2f80caf18549bab12eb3c0cd (patch)
tree2bdb02c4023c59ee7055153c10bfdaedf3eae89b
parent8addb033b68647a91f12e043b90d6fe268d6db30 (diff)
downloadslapt-src-slapt_vector.tar.gz
update naming convention for data structuresslapt_vector
s/slapt_pkg_into_t/slapt_pkg_t/g s/slapt_free_pkg/slapt_pkg_t_free/g s/slapt_init_pkg/slapt_pkg_t_init/g s/slapt_rc_config/slapt_config_t/ s/slapt_init_config/slapt_config_t_init/g s/slapt_read_rc_config/slapt_config_t_read/g s/slapt_free_rc_config/slapt_config_t_free/g s/slapt_free_source/slapt_source_t_free/g s/slapt_init_source/slapt_source_t_init/g s/slapt_write_rc_config/slapt_config_t_write/g s/slapt_init_regex/slapt_regex_t_init/g s/slapt_execute_regex/slapt_regex_t_execute/g s/slapt_regex_extract_match/slapt_regex_t_extract_match/g s/slapt_free_regex/slapt_regex_t_free/g
-rw-r--r--src/main.c2
-rw-r--r--src/source.c24
2 files changed, 13 insertions, 13 deletions
diff --git a/src/main.c b/src/main.c
index 916c23a..c33a381 100644
--- a/src/main.c
+++ b/src/main.c
@@ -309,7 +309,7 @@ int main(int argc, char *argv[])
}
} else if (action == UPGRADE_OPT) {
/* for each entry in 'installed' see if it's available as a slackbuild */
- slapt_vector_t_foreach(slapt_pkg_info_t *, pkg, installed) {
+ slapt_vector_t_foreach(slapt_pkg_t *, pkg, installed) {
slapt_vector_t *matches = slapt_vector_t_search(remote_sbs, sb_compare_pkg_to_name, pkg->name);
if (!matches) {
continue;
diff --git a/src/source.c b/src/source.c
index e4c67aa..822cad8 100644
--- a/src/source.c
+++ b/src/source.c
@@ -172,7 +172,7 @@ void slapt_src_slackbuild_free(slapt_src_slackbuild *sb)
int slapt_src_update_slackbuild_cache(slapt_src_config *config)
{
int rval = 0;
- slapt_rc_config *slapt_config = slapt_init_config();
+ slapt_config_t *slapt_config = slapt_config_t_init();
slapt_vector_t *slackbuilds = slapt_vector_t_init((slapt_vector_t_free_function)slapt_src_slackbuild_free);
slapt_vector_t_foreach(const char *, url, config->sources) {
@@ -240,7 +240,7 @@ int slapt_src_update_slackbuild_cache(slapt_src_config *config)
}
slapt_src_write_slackbuilds_to_file(slackbuilds, SLAPT_SRC_DATA_FILE);
- slapt_free_rc_config(slapt_config);
+ slapt_config_t_free(slapt_config);
slapt_vector_t_free(slackbuilds);
return rval;
}
@@ -476,7 +476,7 @@ static char *add_part_to_url(char *url, char *part)
int slapt_src_fetch_slackbuild(slapt_src_config *config, slapt_src_slackbuild *sb)
{
slapt_vector_t *download_parts = NULL, *md5sum_parts = NULL;
- slapt_rc_config *slapt_config = slapt_init_config();
+ slapt_config_t *slapt_config = slapt_config_t_init();
char *sb_location = add_part_to_url(sb->sb_source_url, sb->location);
/* need to mkdir and chdir to sb->location */
@@ -592,7 +592,7 @@ int slapt_src_fetch_slackbuild(slapt_src_config *config, slapt_src_slackbuild *s
if (md5sum_parts != NULL)
slapt_vector_t_free(md5sum_parts);
- slapt_free_rc_config(slapt_config);
+ slapt_config_t_free(slapt_config);
free(sb_location);
/* go back */
@@ -618,7 +618,7 @@ static char *_get_pkg_filename(const char *version, const char *pkgtag)
exit(EXIT_FAILURE);
}
- if ((pkg_regex = slapt_init_regex(SLAPT_PKG_PARSE_REGEX)) == NULL) {
+ if ((pkg_regex = slapt_regex_t_init(SLAPT_PKG_PARSE_REGEX)) == NULL) {
exit(EXIT_FAILURE);
}
@@ -632,7 +632,7 @@ static char *_get_pkg_filename(const char *version, const char *pkgtag)
if (!S_ISREG(stat_buf.st_mode))
continue;
- slapt_execute_regex(pkg_regex, file->d_name);
+ slapt_regex_t_execute(pkg_regex, file->d_name);
if (pkg_regex->reg_return != 0)
continue;
@@ -652,7 +652,7 @@ static char *_get_pkg_filename(const char *version, const char *pkgtag)
}
closedir(d);
- slapt_free_regex(pkg_regex);
+ slapt_regex_t_free(pkg_regex);
return filename;
}
@@ -955,7 +955,7 @@ slapt_vector_t *slapt_src_search_slackbuild_cache(slapt_vector_t *remote_sbs, sl
slapt_vector_t *sbs = slapt_vector_t_init(NULL);
slapt_vector_t_foreach(char *, sb_name, names) {
- slapt_regex_t *search_regex = slapt_init_regex(sb_name);
+ slapt_regex_t *search_regex = slapt_regex_t_init(sb_name);
if (search_regex == NULL)
continue;
@@ -967,14 +967,14 @@ slapt_vector_t *slapt_src_search_slackbuild_cache(slapt_vector_t *remote_sbs, sl
continue;
}
- slapt_execute_regex(search_regex, remote_sb->name);
+ slapt_regex_t_execute(search_regex, remote_sb->name);
name_r = search_regex->reg_return;
- slapt_execute_regex(search_regex, remote_sb->location);
+ slapt_regex_t_execute(search_regex, remote_sb->location);
version_r = search_regex->reg_return;
if (remote_sb->short_desc != NULL) {
- slapt_execute_regex(search_regex, remote_sb->short_desc);
+ slapt_regex_t_execute(search_regex, remote_sb->short_desc);
short_desc_r = search_regex->reg_return;
}
@@ -982,7 +982,7 @@ slapt_vector_t *slapt_src_search_slackbuild_cache(slapt_vector_t *remote_sbs, sl
slapt_vector_t_add(sbs, remote_sb);
}
- slapt_free_regex(search_regex);
+ slapt_regex_t_free(search_regex);
}
return sbs;