From 64d36db5f45db15997c6a3987d6f4b0ce147df27 Mon Sep 17 00:00:00 2001 From: Dan McGee Date: Sun, 3 Jun 2007 23:57:38 -0400 Subject: 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 --- lib/libalpm/md5driver.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'lib/libalpm/md5driver.c') diff --git a/lib/libalpm/md5driver.c b/lib/libalpm/md5driver.c index 80b90564..e2821bf0 100644 --- a/lib/libalpm/md5driver.c +++ b/lib/libalpm/md5driver.c @@ -41,6 +41,20 @@ documentation and/or software. #define MDUpdate _alpm_MD5Update #define MDFinal _alpm_MD5Final +/** Get the md5 sum of file. + * @param name name of the file + * @return the checksum on success, NULL on error + * @addtogroup alpm_misc + */ +char SYMEXPORT *alpm_get_md5sum(char *name) +{ + ALPM_LOG_FUNC; + + ASSERT(name != NULL, return(NULL)); + + return(_alpm_MDFile(name)); +} + char* _alpm_MDFile(char *filename) { FILE *file; -- cgit v1.2.3-24-g4f1b