diff options
author | Darin Adler <darin@src.gnome.org> | 2001-01-05 02:03:34 +0000 |
---|---|---|
committer | Darin Adler <darin@src.gnome.org> | 2001-01-05 02:03:34 +0000 |
commit | 47b25905a00ccf16630c8e0987f8e8b4a4d238c0 (patch) | |
tree | b3eaef06ac54b715c8fa6f3571950676a8076d49 /components/services/trilobite | |
parent | f3af9f5462ef546d5b50f58cd910533e98b25c6b (diff) | |
download | nautilus-47b25905a00ccf16630c8e0987f8e8b4a4d238c0.tar.gz |
Some FIXME cleanup.
* components/help/converters/gnome-db2html2/sect-elements.c:
(sect_article_end_element), (sect_inlinegraphic_start_element):
* components/help/converters/gnome-db2html2/toc-elements.c:
(toc_sect_end_element):
* components/mozilla/mozilla-events.cpp:
* components/mozilla/nautilus-mozilla-content-view.c:
(make_full_uri_from_relative), (eazel_services_scheme_translate):
* components/music/nautilus-music-view.c:
(nautilus_music_view_initialize),
(music_view_set_selected_song_title), (reset_playtime),
(play_status_display), (slider_moved_callback),
(add_play_controls):
* components/notes/nautilus-notes.c: (notes_load_metainfo):
* components/services/install/lib/eazel-install-logic.c:
(eazel_install_check_for_file_conflicts),
(eazel_install_do_transaction_all_files_check),
(eazel_install_prune_packages_helper),
(eazel_install_check_existing_packages):
* libnautilus-extensions/nautilus-string.c: (nautilus_strcmp),
(nautilus_strcasecmp), (nautilus_strcmp_case_breaks_ties),
(nautilus_strcoll), (nautilus_str_is_equal),
(nautilus_istr_is_equal), (nautilus_strcmp_compare_func),
(nautilus_strcoll_compare_func),
(nautilus_strcasecmp_compare_func):
* src/file-manager/fm-directory-view.c: (open_location):
* src/nautilus-first-time-druid.c: (make_anti_aliased_label),
(make_hbox_user_level_radio_button), (set_up_user_level_page):
Added bug numbers to FIXMEs. At one point Josh made some bugs for
FIXMEs but never got around to checking in the bug numbers in the
source code. And I wrote one bug report.
* components/music/nautilus-music-view.c:
(nautilus_music_view_initialize): Removed a fixed FIXME. Also got
rid of a hard-coded constant and took excess spaces out of some
string constants.
* components/services/install/lib/eazel-install-object.c:
(eazel_install_emit_dependency_check_default): Changed a FIXME
into a non-FIXME comment, now the the bug is fixed.
* components/services/install/lib/eazel-package-system-rpm3.c:
(rpm_packagedata_fill_from_file): Removed an incorrect bug number
from a FIXME.
* components/services/install/nautilus-view/nautilus-service-install-view.h:
* components/services/install/nautilus-view/nautilus-service-install-view.c:
(nautilus_service_install_installing): Removed the FIXME from a
comment that's about how a bug was fixed.
* components/services/trilobite/libtrilobite/trilobite-md5-tools.h:
* components/services/trilobite/libtrilobite/trilobite-md5-tools.c:
* docs/style-guide.html:
Removed FIXME and corrected misunderstanding about whether use of
the guchar typedef is recommended in Nautilus coding style.
* libnautilus-extensions/nautilus-gdk-font-extensions.h:
* libnautilus-extensions/nautilus-gdk-font-extensions.c:
Removed misguided use of const in here. Gdk and Gtk object types
just aren't suitable for const, and you end up doing type casts
that defeat the purpose.
* src/nautilus-window-manage-views.c: (load_underway_callback):
Remove a FIXME for a fixed bug.
Diffstat (limited to 'components/services/trilobite')
-rw-r--r-- | components/services/trilobite/libtrilobite/trilobite-md5-tools.c | 24 | ||||
-rw-r--r-- | components/services/trilobite/libtrilobite/trilobite-md5-tools.h | 19 |
2 files changed, 18 insertions, 25 deletions
diff --git a/components/services/trilobite/libtrilobite/trilobite-md5-tools.c b/components/services/trilobite/libtrilobite/trilobite-md5-tools.c index dcee501da..ebb19add8 100644 --- a/components/services/trilobite/libtrilobite/trilobite-md5-tools.c +++ b/components/services/trilobite/libtrilobite/trilobite-md5-tools.c @@ -45,7 +45,7 @@ static union _endian { int i; char b[4]; } *_endian = (union _endian *)&_ie; * Note: this code is harmless on little-endian machines. */ static void -_byte_reverse (unsigned char *buf, guint32 longs) +_byte_reverse (guchar *buf, guint32 longs) { guint32 t; do { @@ -92,7 +92,7 @@ md5_init (MD5Context *ctx) * of bytes. Use this to progressively construct an md5 hash. **/ static void -md5_update (MD5Context *ctx, const unsigned char *buf, guint32 len) +md5_update (MD5Context *ctx, const guchar *buf, guint32 len) { guint32 t; @@ -108,7 +108,7 @@ md5_update (MD5Context *ctx, const unsigned char *buf, guint32 len) /* Handle any leading odd-sized chunks */ if (t) { - unsigned char *p = (unsigned char *) ctx->in + t; + guchar *p = (guchar *) ctx->in + t; t = 64 - t; if (len < t) { @@ -154,10 +154,10 @@ md5_update (MD5Context *ctx, const unsigned char *buf, guint32 len) * copy the final md5 hash to a bufer **/ static void -md5_final (MD5Context *ctx, unsigned char digest[16]) +md5_final (MD5Context *ctx, guchar digest[16]) { guint32 count; - unsigned char *p; + guchar *p; /* Compute number of bytes mod 64 */ count = (ctx->bits[0] >> 3) & 0x3F; @@ -193,7 +193,7 @@ md5_final (MD5Context *ctx, unsigned char digest[16]) md5_transform (ctx->buf, (guint32 *) ctx->in); if (ctx->doByteReverse) - _byte_reverse ((unsigned char *) ctx->buf, 4); + _byte_reverse ((guchar *) ctx->buf, 4); memcpy (digest, ctx->buf, 16); } @@ -314,7 +314,7 @@ md5_transform (guint32 buf[4], const guint32 in[16]) * the 16 bytes buffer @digest . **/ void -trilobite_md5_get_digest (const char *buffer, int buffer_size, unsigned char digest[16]) +trilobite_md5_get_digest (const char *buffer, int buffer_size, guchar digest[16]) { MD5Context ctx; @@ -334,10 +334,10 @@ trilobite_md5_get_digest (const char *buffer, int buffer_size, unsigned char dig * the 16 bytes buffer @digest . **/ void -trilobite_md5_get_digest_from_file (const char *filename, unsigned char digest[16]) +trilobite_md5_get_digest_from_file (const char *filename, guchar digest[16]) { MD5Context ctx; - unsigned char tmp_buf[1024]; + guchar tmp_buf[1024]; int nb_bytes_read; FILE *fp; @@ -352,7 +352,7 @@ trilobite_md5_get_digest_from_file (const char *filename, unsigned char digest[1 return; } - while ((nb_bytes_read = fread (tmp_buf, sizeof (unsigned char), 1024, fp)) > 0) + while ((nb_bytes_read = fread (tmp_buf, sizeof (guchar), 1024, fp)) > 0) md5_update (&ctx, tmp_buf, nb_bytes_read); if (ferror(fp)) { @@ -391,7 +391,7 @@ trilobite_md5_get_digest_from_md5_string (const char *md5string, } const char * -trilobite_md5_get_string_from_md5_digest (const unsigned char md5[16]) +trilobite_md5_get_string_from_md5_digest (const guchar md5[16]) { static char *str = NULL; int cnt; @@ -414,7 +414,7 @@ trilobite_md5_get_string_from_md5_digest (const unsigned char md5[16]) int main (int argc, char **argv) { - unsigned char digest[16]; + guchar digest[16]; int i; trilobite_md5_get_digest_from_file (argv[1], digest); diff --git a/components/services/trilobite/libtrilobite/trilobite-md5-tools.h b/components/services/trilobite/libtrilobite/trilobite-md5-tools.h index 31d6add2e..92e02bcc5 100644 --- a/components/services/trilobite/libtrilobite/trilobite-md5-tools.h +++ b/components/services/trilobite/libtrilobite/trilobite-md5-tools.h @@ -28,28 +28,21 @@ #include <glib.h> -/* FIXME: bugzilla.eazel.com 2851 - darins styleguide says not to use - evil glib types. Check if guchar is - "blacklisted" - http://cvs.gnome.org/lxr/source/nautilus/docs/style-guide.html -*/ typedef struct { guint32 buf[4]; guint32 bits[2]; - unsigned char in[64]; + guchar in[64]; int doByteReverse; } MD5Context ; -void trilobite_md5_get_digest (const char *buffer, int buffer_size, unsigned char digest[16]); -void trilobite_md5_get_digest_from_file (const char *filename, unsigned char digest[16]); +void trilobite_md5_get_digest (const char *buffer, int buffer_size, guchar digest[16]); +void trilobite_md5_get_digest_from_file (const char *filename, guchar digest[16]); /* Converts a 32 char hex'ified md5 to a 16 byte md5 digest */ -void trilobite_md5_get_digest_from_md5_string (const char *md5string, unsigned char pmd5[16]); +void trilobite_md5_get_digest_from_md5_string (const char *md5string, guchar pmd5[16]); /* Converts a 16 byte md5 digest to a 32 char hex'ified */ -const char *trilobite_md5_get_string_from_md5_digest (const unsigned char md5[16]); - -#endif /* TRILOBITE_MD5_TOOLS_H */ +const char *trilobite_md5_get_string_from_md5_digest (const guchar md5[16]); +#endif /* TRILOBITE_MD5_TOOLS_H */ |