diff options
author | Natanael Copa <ncopa@alpinelinux.org> | 2010-03-05 08:13:25 +0000 |
---|---|---|
committer | Natanael Copa <ncopa@alpinelinux.org> | 2010-06-11 07:02:18 +0000 |
commit | 3ec82a5a420fc00d38ad7dded819525a91533652 (patch) | |
tree | 84016128e65001e4aed1d45a1402b2fb2375c385 /src/apk_print.h | |
parent | 60b537e356dfcd0ed9a3516152c6a170912efcef (diff) | |
download | apk-tools-3ec82a5a420fc00d38ad7dded819525a91533652.tar.gz apk-tools-3ec82a5a420fc00d38ad7dded819525a91533652.tar.bz2 apk-tools-3ec82a5a420fc00d38ad7dded819525a91533652.tar.xz apk-tools-3ec82a5a420fc00d38ad7dded819525a91533652.zip |
First steps for libapk
Diffstat (limited to 'src/apk_print.h')
-rw-r--r-- | src/apk_print.h | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/src/apk_print.h b/src/apk_print.h new file mode 100644 index 0000000..fdbab11 --- /dev/null +++ b/src/apk_print.h @@ -0,0 +1,27 @@ +/* apk_state.h - Alpine Package Keeper (APK) + * + * Copyright (C) 2005-2008 Natanael Copa <n@tanael.org> + * Copyright (C) 2008 Timo Teräs <timo.teras@iki.fi> + * All rights reserved. + * + * This program is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 as published + * by the Free Software Foundation. See http://www.gnu.org/ for details. + */ + +#ifndef APK_PRINT_H +#define APK_PRINT_H + +#include "apk_blob.h" + +#define apk_error(args...) do { apk_log("ERROR: ", args); } while (0) +#define apk_warning(args...) do { if (apk_verbosity > 0) { apk_log("WARNING: ", args); } } while (0) +#define apk_message(args...) do { if (apk_verbosity > 0) { apk_log(NULL, args); } } while (0) + +void apk_log(const char *prefix, const char *format, ...); +const char *apk_error_str(int error); + +int apk_print_indented(struct apk_indent *i, apk_blob_t blob); +void apk_print_indented_words(struct apk_indent *i, const char *text); + +#endif |