Remove redundant header inclusions

and clean up some whitespace
This commit is contained in:
Matthias Clasen 2010-09-03 19:49:34 -04:00
parent 9b3fb41a5e
commit ebcdbd9555
2 changed files with 46 additions and 44 deletions

View File

@ -22,9 +22,11 @@
#include <string.h> #include <string.h>
#include "glibconfig.h"
#include "gchecksum.h" #include "gchecksum.h"
#include "glib.h"
#include "gmem.h"
#include "gtestutils.h"
#include "gtypes.h"
#include "glibintl.h" #include "glibintl.h"
@ -209,8 +211,8 @@ md5_sum_init (Md5sum *md5)
* blocks the data and converts bytes into longwords for this routine. * blocks the data and converts bytes into longwords for this routine.
*/ */
static void static void
md5_transform (guint32 buf[4], md5_transform (guint32 buf[4],
guint32 const in[16]) guint32 const in[16])
{ {
register guint32 a, b, c, d; register guint32 a, b, c, d;
@ -222,7 +224,7 @@ md5_transform (guint32 buf[4],
/* This is the central step in the MD5 algorithm. */ /* This is the central step in the MD5 algorithm. */
#define md5_step(f, w, x, y, z, data, s) \ #define md5_step(f, w, x, y, z, data, s) \
( w += f (x, y, z) + data, w = w << s | w >> (32 - s), w += x ) ( w += f (x, y, z) + data, w = w << s | w >> (32 - s), w += x )
a = buf[0]; a = buf[0];
b = buf[1]; b = buf[1];

View File

@ -60,26 +60,26 @@ typedef enum {
*/ */
typedef struct _GChecksum GChecksum; typedef struct _GChecksum GChecksum;
gssize g_checksum_type_get_length (GChecksumType checksum_type); gssize g_checksum_type_get_length (GChecksumType checksum_type);
GChecksum * g_checksum_new (GChecksumType checksum_type); GChecksum * g_checksum_new (GChecksumType checksum_type);
void g_checksum_reset (GChecksum *checksum); void g_checksum_reset (GChecksum *checksum);
GChecksum * g_checksum_copy (const GChecksum *checksum); GChecksum * g_checksum_copy (const GChecksum *checksum);
void g_checksum_free (GChecksum *checksum); void g_checksum_free (GChecksum *checksum);
void g_checksum_update (GChecksum *checksum, void g_checksum_update (GChecksum *checksum,
const guchar *data, const guchar *data,
gssize length); gssize length);
G_CONST_RETURN gchar *g_checksum_get_string (GChecksum *checksum); G_CONST_RETURN gchar *g_checksum_get_string (GChecksum *checksum);
void g_checksum_get_digest (GChecksum *checksum, void g_checksum_get_digest (GChecksum *checksum,
guint8 *buffer, guint8 *buffer,
gsize *digest_len); gsize *digest_len);
gchar *g_compute_checksum_for_data (GChecksumType checksum_type, gchar *g_compute_checksum_for_data (GChecksumType checksum_type,
const guchar *data, const guchar *data,
gsize length); gsize length);
gchar *g_compute_checksum_for_string (GChecksumType checksum_type, gchar *g_compute_checksum_for_string (GChecksumType checksum_type,
const gchar *str, const gchar *str,
gssize length); gssize length);
G_END_DECLS G_END_DECLS