1 /* pkg_vec.h - the opkg package management system 2 3 Steven M. Ayer 4 5 Copyright (C) 2002 Compaq Computer Corporation 6 7 This program is free software; you can redistribute it and/or 8 modify it under the terms of the GNU General Public License as 9 published by the Free Software Foundation; either version 2, or (at 10 your option) any later version. 11 12 This program is distributed in the hope that it will be useful, but 13 WITHOUT ANY WARRANTY; without even the implied warranty of 14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 15 General Public License for more details. 16 */ 17 18 #ifndef PKG_VEC_H 19 #define PKG_VEC_H 20 21 typedef struct pkg pkg_t; 22 typedef struct abstract_pkg abstract_pkg_t; 23 typedef struct pkg_vec pkg_vec_t; 24 typedef struct abstract_pkg_vec abstract_pkg_vec_t; 25 26 #include "opkg_conf.h" 27 28 struct pkg_vec { 29 pkg_t **pkgs; 30 unsigned int len; 31 }; 32 33 struct abstract_pkg_vec { 34 abstract_pkg_t **pkgs; 35 unsigned int len; 36 }; 37 38 pkg_vec_t *pkg_vec_alloc(void); 39 void pkg_vec_free(pkg_vec_t * vec); 40 41 void pkg_vec_insert_merge(pkg_vec_t * vec, pkg_t * pkg, int set_status); 42 void pkg_vec_insert(pkg_vec_t * vec, const pkg_t * pkg); 43 int pkg_vec_contains(pkg_vec_t * vec, pkg_t * apkg); 44 45 typedef int (*compare_fcn_t) (const void *, const void *); 46 void pkg_vec_sort(pkg_vec_t * vec, compare_fcn_t compar); 47 48 int pkg_vec_clear_marks(pkg_vec_t * vec); 49 int pkg_vec_mark_if_matches(pkg_vec_t * vec, const char *pattern); 50 51 abstract_pkg_vec_t *abstract_pkg_vec_alloc(void); 52 void abstract_pkg_vec_free(abstract_pkg_vec_t * vec); 53 void abstract_pkg_vec_insert(abstract_pkg_vec_t * vec, abstract_pkg_t * pkg); 54 abstract_pkg_t *abstract_pkg_vec_get(abstract_pkg_vec_t * vec, int i); 55 int abstract_pkg_vec_contains(abstract_pkg_vec_t * vec, abstract_pkg_t * apkg); 56 void abstract_pkg_vec_sort(abstract_pkg_vec_t * vec, compare_fcn_t compar); 57 58 int pkg_compare_names(const void *p1, const void *p2); 59 #endif 60
This page was automatically generated by LXR 0.3.1. • OpenWrt