summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/opk/read.c46
1 files changed, 23 insertions, 23 deletions
diff --git a/src/opk/read.c b/src/opk/read.c
index 3bbb128..a076dae 100644
--- a/src/opk/read.c
+++ b/src/opk/read.c
@@ -31,7 +31,7 @@
#include "opk.h"
static int
-_opkg_opk_opk_file_read(void *user_data, char **buffer, size_t *size)
+_opkg_opk_opk_read_file(void *user_data, char **buffer, size_t *size)
{
struct opkg_opk_opk *opk = user_data;
@@ -48,7 +48,7 @@ _opkg_opk_opk_file_read(void *user_data, char **buffer, size_t *size)
}
static int
-_opkg_opk_opk_init_inner(struct opkg_opk_opk *opk)
+_opkg_opk_opk_read_init_inner(struct opkg_opk_opk *opk)
{
/* Initialize inner gzip decompressor. */
opk->inner_gzip = opkg_opk_gzip_init_read(
@@ -71,14 +71,14 @@ _opkg_opk_opk_init_inner(struct opkg_opk_opk *opk)
}
static void
-_opkg_opk_opk_free_inner(struct opkg_opk_opk *opk)
+_opkg_opk_opk_read_free_inner(struct opkg_opk_opk *opk)
{
opkg_opk_ustar_free(opk->inner_ustar);
opkg_opk_gzip_free(opk->inner_gzip);
}
static int
-_opkg_opk_opk_check_name(const char *member_name,
+_opkg_opk_opk_read_check_name(const char *member_name,
struct _opkg_opk_opk_seek_name **head,
struct _opkg_opk_opk_seek_name **tail)
{
@@ -150,7 +150,7 @@ _opkg_opk_opk_read_control(struct opkg_opk_opk *opk)
return OPKG_OPK_OK;
}
- if (_opkg_opk_opk_init_inner(opk) != OPKG_OPK_OK) {
+ if (_opkg_opk_opk_read_init_inner(opk) != OPKG_OPK_OK) {
if (opk->control_dir != NULL) {
free(path);
}
@@ -174,7 +174,7 @@ _opkg_opk_opk_read_control(struct opkg_opk_opk *opk)
if (sprintf(path, "%s/%s", opk->control_dir,
member->name) <= 0) {
free(member);
- _opkg_opk_opk_free_inner(opk);
+ _opkg_opk_opk_read_free_inner(opk);
free(path);
return OPKG_OPK_ERROR;
}
@@ -183,7 +183,7 @@ _opkg_opk_opk_read_control(struct opkg_opk_opk *opk)
fputs(_("Error: Failed to extract control file"
"\n"), stderr);
free(member);
- _opkg_opk_opk_free_inner(opk);
+ _opkg_opk_opk_read_free_inner(opk);
free(path);
return OPKG_OPK_ERROR;
}
@@ -195,7 +195,7 @@ _opkg_opk_opk_read_control(struct opkg_opk_opk *opk)
}
if (opk->print_control_head != NULL &&
- _opkg_opk_opk_check_name(member->name,
+ _opkg_opk_opk_read_check_name(member->name,
&opk->print_control_head,
&opk->print_control_tail) ==
OPKG_OPK_OK) {
@@ -215,7 +215,7 @@ _opkg_opk_opk_read_control(struct opkg_opk_opk *opk)
size) {
fputs(_("Error: Failed to print control file\n")
, stderr);
- _opkg_opk_opk_free_inner(opk);
+ _opkg_opk_opk_read_free_inner(opk);
if (opk->control_dir != NULL) {
free(path);
}
@@ -225,7 +225,7 @@ _opkg_opk_opk_read_control(struct opkg_opk_opk *opk)
fp) != size) {
fputs(_("Error: Failed to write control file\n")
, stderr);
- _opkg_opk_opk_free_inner(opk);
+ _opkg_opk_opk_read_free_inner(opk);
free(path);
return OPKG_OPK_ERROR;
}
@@ -233,7 +233,7 @@ _opkg_opk_opk_read_control(struct opkg_opk_opk *opk)
if (ret_read == OPKG_OPK_ERROR) {
fputs(_("Error: Failed to read control file\n"),
stderr);
- _opkg_opk_opk_free_inner(opk);
+ _opkg_opk_opk_read_free_inner(opk);
if (opk->control_dir != NULL) {
free(path);
}
@@ -244,7 +244,7 @@ _opkg_opk_opk_read_control(struct opkg_opk_opk *opk)
/* Close file for extraction. */
if (opk->control_dir != NULL) {
if (fclose(fp) != 0) {
- _opkg_opk_opk_free_inner(opk);
+ _opkg_opk_opk_read_free_inner(opk);
free(path);
return OPKG_OPK_ERROR;
}
@@ -256,7 +256,7 @@ _opkg_opk_opk_read_control(struct opkg_opk_opk *opk)
}
if (ret_list == OPKG_OPK_ERROR) {
fputs(_("Error: Failed to list control files\n"), stderr);
- _opkg_opk_opk_free_inner(opk);
+ _opkg_opk_opk_read_free_inner(opk);
return OPKG_OPK_ERROR;
}
@@ -267,11 +267,11 @@ _opkg_opk_opk_read_control(struct opkg_opk_opk *opk)
fprintf(stderr, _("Error: Failed to find control file "
"\"%s\"\n"), seek_name->name);
}
- _opkg_opk_opk_free_inner(opk);
+ _opkg_opk_opk_read_free_inner(opk);
return OPKG_OPK_ERROR;
}
- _opkg_opk_opk_free_inner(opk);
+ _opkg_opk_opk_read_free_inner(opk);
return OPKG_OPK_OK;
}
@@ -303,7 +303,7 @@ _opkg_opk_opk_read_data(struct opkg_opk_opk *opk)
return OPKG_OPK_OK;
}
- if (_opkg_opk_opk_init_inner(opk) != OPKG_OPK_OK) {
+ if (_opkg_opk_opk_read_init_inner(opk) != OPKG_OPK_OK) {
return OPKG_OPK_ERROR;
}
@@ -342,7 +342,7 @@ _opkg_opk_opk_read_data(struct opkg_opk_opk *opk)
}
continue;
}
- if (_opkg_opk_opk_check_name(member->name,
+ if (_opkg_opk_opk_read_check_name(member->name,
&opk->print_data_head,
&opk->print_data_tail) !=
OPKG_OPK_OK) {
@@ -364,21 +364,21 @@ _opkg_opk_opk_read_data(struct opkg_opk_opk *opk)
if (fwrite(buffer, 1, size, stdout) != size) {
fputs(_("Error: Failed to print data file\n")
, stderr);
- _opkg_opk_opk_free_inner(opk);
+ _opkg_opk_opk_read_free_inner(opk);
return OPKG_OPK_ERROR;
}
}
if (ret_read == OPKG_OPK_ERROR) {
fputs(_("Error: Failed to read data file\n"),
stderr);
- _opkg_opk_opk_free_inner(opk);
+ _opkg_opk_opk_read_free_inner(opk);
return OPKG_OPK_ERROR;
}
opk->previously_printed = 1;
}
if (ret == OPKG_OPK_ERROR) {
fputs(_("Error: Failed to list data files\n"), stderr);
- _opkg_opk_opk_free_inner(opk);
+ _opkg_opk_opk_read_free_inner(opk);
return OPKG_OPK_ERROR;
}
if (tail != NULL) {
@@ -386,7 +386,7 @@ _opkg_opk_opk_read_data(struct opkg_opk_opk *opk)
}
if (opk->list_data == 0) {
- _opkg_opk_opk_free_inner(opk);
+ _opkg_opk_opk_read_free_inner(opk);
return OPKG_OPK_OK;
}
@@ -451,7 +451,7 @@ _opkg_opk_opk_read_data(struct opkg_opk_opk *opk)
opk->previously_printed = 1;
- _opkg_opk_opk_free_inner(opk);
+ _opkg_opk_opk_read_free_inner(opk);
return ret;
}
@@ -476,7 +476,7 @@ opkg_opk_opk_read(struct opkg_opk_opk *opk, const char *file_name)
}
/* Initialize outer gzip decompressor. */
- opk->outer_gzip = opkg_opk_gzip_init_read(&_opkg_opk_opk_file_read,
+ opk->outer_gzip = opkg_opk_gzip_init_read(&_opkg_opk_opk_read_file,
opk);
if (opk->outer_gzip == NULL) {
fputs(_("Error: Failed to initialize\n"), stderr);