From 6b8be706c08f547d17949f2f72783375bbb8b14c Mon Sep 17 00:00:00 2001 From: Carsten Schoenert Date: Fri, 29 Nov 2013 14:19:15 -0500 Subject: libopkg: cleanup inside the public header files No functional changes! Just a cleanup like whitespaces, blank lines, tabs and reformating lines longer 76 characters. Also adding the missed comments at the closing bracket from the #ifndef HEADER_FOO_H ... #endif loop. This helps to identify the associated preprocessor elements like theay already exits in some files. Signed-off-by: Carsten Schoenert Signed-off-by: Paul Barker --- (limited to 'libopkg/pkg.h') diff --git a/libopkg/pkg.h b/libopkg/pkg.h index 744dd9f..1e3dd3f 100644 --- a/libopkg/pkg.h +++ b/libopkg/pkg.h @@ -34,7 +34,6 @@ extern "C" { struct opkg_conf; - #define ARRAY_SIZE(array) sizeof(array) / sizeof((array)[0]) /* I think "Size" is currently the shortest field name */ @@ -65,6 +64,7 @@ enum pkg_state_flag SF_LAST_STATE_FLAG }; typedef enum pkg_state_flag pkg_state_flag_t; + #define SF_NONVOLATILE_FLAGS (SF_HOLD|SF_NOPRUNE|SF_PREFER|SF_OBSOLETE|SF_USER) enum pkg_state_status @@ -164,8 +164,8 @@ struct pkg char *tmp_unpack_dir; char *md5sum; char *sha256sum; - unsigned long size; /* in bytes */ - unsigned long installed_size; /* in bytes */ + unsigned long size; /* in bytes */ + unsigned long installed_size; /* in bytes */ char *priority; char *source; conffile_list_t conffiles; @@ -173,17 +173,19 @@ struct pkg /* As pointer for lazy evaluation */ str_list_t *installed_files; /* XXX: CLEANUP: I'd like to perhaps come up with a better - mechanism to avoid the problem here, (which is that the - installed_files list was being freed from an inner loop while - still being used within an outer loop. */ + mechanism to avoid the problem here, (which is that the + installed_files list was being freed from an inner loop while + still being used within an outer loop. */ int installed_files_ref_cnt; int essential; int arch_priority; -/* Adding this flag, to "force" opkg to choose a "provided_by_hand" package, if there are multiple choice */ + /* Adding this flag, to "force" opkg to choose a "provided_by_hand" + * package, if there are multiple choice */ int provided_by_hand; /* this flag specifies whether the package was installed to satisfy another - * package's dependancies */ + * package's dependancies + */ int auto_installed; }; @@ -233,4 +235,4 @@ int pkg_write_changed_filelists(void); } #endif -#endif +#endif /* PKG_H */ -- cgit v0.9.1