From 88fc60c9ed2407c7d5b929b109729b4a3e40259f Mon Sep 17 00:00:00 2001 From: Patrick McDermott Date: Wed, 17 May 2023 12:20:19 -0400 Subject: opk: Read specials file --- (limited to 'src/opk.c') diff --git a/src/opk.c b/src/opk.c index 5619bc5..178db6c 100644 --- a/src/opk.c +++ b/src/opk.c @@ -19,6 +19,7 @@ #include #include "defs.h" +#include "specials.h" #include "opk.h" #include "opk/opk.h" @@ -39,6 +40,7 @@ opkg_opk_opk_init(void) opk->list_control = 0; opk->list_data = 0; opk->control_dir = NULL; + opk->specials = NULL; opk->previously_printed = 0; return opk; @@ -117,6 +119,15 @@ opkg_opk_opk_data_dir(struct opkg_opk_opk *opk, const char *dir) return OPKG_OPK_OK; } +int +opkg_opk_opk_specials_read(struct opkg_opk_opk *opk, const char *file_name) +{ + if (opkg_opk_specials_read(file_name, &opk->specials) != OPKG_OPK_OK) { + return OPKG_OPK_ERROR; + } + return OPKG_OPK_OK; +} + void opkg_opk_opk_free(struct opkg_opk_opk *opk) { @@ -132,5 +143,6 @@ opkg_opk_opk_free(struct opkg_opk_opk *opk) opk->print_data_head = opk->print_data_head->next; free(name); } + opkg_opk_specials_free(opk->specials); free(opk); } -- cgit v0.9.1