summaryrefslogtreecommitdiff
path: root/lib/libalpm/sha1.c
diff options
context:
space:
mode:
authorDan McGee <dan@archlinux.org>2007-06-03 23:57:38 -0400
committerDan McGee <dan@archlinux.org>2007-06-04 22:52:04 -0400
commit64d36db5f45db15997c6a3987d6f4b0ce147df27 (patch)
treed18340215958e82d4a9a30ec491d5ee2219645ba /lib/libalpm/sha1.c
parente0afe6e94a71a6aeb964e9624c2df4f4a2821704 (diff)
Move functions out of alpm.c to where they belong
alpm.h is the only "publically viewable" file, so there is no reason to have functions in alpm.c that belong in package.c, db.c, etc. Move the functions where they belong and leave only the library init functions in alpm.c. Signed-off-by: Dan McGee <dan@archlinux.org>
Diffstat (limited to 'lib/libalpm/sha1.c')
-rw-r--r--lib/libalpm/sha1.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/lib/libalpm/sha1.c b/lib/libalpm/sha1.c
index 5f47ebb8..1adf067b 100644
--- a/lib/libalpm/sha1.c
+++ b/lib/libalpm/sha1.c
@@ -381,6 +381,19 @@ These notices must be retained in any copies of any part of this
documentation and/or software.
*/
+/** Get the sha1 sum of file.
+ * @param name name of the file
+ * @return the checksum on success, NULL on error
+ * @addtogroup alpm_misc
+ */
+char SYMEXPORT *alpm_get_sha1sum(char *name)
+{
+ ALPM_LOG_FUNC;
+
+ ASSERT(name != NULL, return(NULL));
+
+ return(_alpm_SHAFile(name));
+}
char* _alpm_SHAFile(char *filename) {
FILE *file;