aboutsummaryrefslogtreecommitdiff
path: root/coreutils/md5sum.c
diff options
context:
space:
mode:
authorMark Whitley <markw@lineo.com>2000-12-07 19:56:48 +0000
committerMark Whitley <markw@lineo.com>2000-12-07 19:56:48 +0000
commitf57c944e09417edcbcd69f2b01b937cadef39db2 (patch)
treea55822621d54bd82c54e272fa986e45698fea0f1 /coreutils/md5sum.c
parent7b5c16ebe5f1b057603cf1c0b0187be418725c42 (diff)
downloadbusybox-w32-f57c944e09417edcbcd69f2b01b937cadef39db2.tar.gz
busybox-w32-f57c944e09417edcbcd69f2b01b937cadef39db2.tar.bz2
busybox-w32-f57c944e09417edcbcd69f2b01b937cadef39db2.zip
Changed names of functions in utility.c and all affected files, to make
compliant with the style guide. Everybody rebuild your tags file!
Diffstat (limited to 'coreutils/md5sum.c')
-rw-r--r--coreutils/md5sum.c36
1 files changed, 18 insertions, 18 deletions
diff --git a/coreutils/md5sum.c b/coreutils/md5sum.c
index 84e037a61..57fac7450 100644
--- a/coreutils/md5sum.c
+++ b/coreutils/md5sum.c
@@ -651,13 +651,13 @@ static int md5_file(const char *filename,
651 } else { 651 } else {
652 fp = fopen(filename, OPENOPTS(binary)); 652 fp = fopen(filename, OPENOPTS(binary));
653 if (fp == NULL) { 653 if (fp == NULL) {
654 errorMsg("%s: %s\n", filename, strerror(errno)); 654 error_msg("%s: %s\n", filename, strerror(errno));
655 return FALSE; 655 return FALSE;
656 } 656 }
657 } 657 }
658 658
659 if (md5_stream(fp, md5_result)) { 659 if (md5_stream(fp, md5_result)) {
660 errorMsg("%s: %s\n", filename, strerror(errno)); 660 error_msg("%s: %s\n", filename, strerror(errno));
661 661
662 if (fp != stdin) 662 if (fp != stdin)
663 fclose(fp); 663 fclose(fp);
@@ -665,7 +665,7 @@ static int md5_file(const char *filename,
665 } 665 }
666 666
667 if (fp != stdin && fclose(fp) == EOF) { 667 if (fp != stdin && fclose(fp) == EOF) {
668 errorMsg("%s: %s\n", filename, strerror(errno)); 668 error_msg("%s: %s\n", filename, strerror(errno));
669 return FALSE; 669 return FALSE;
670 } 670 }
671 671
@@ -689,7 +689,7 @@ static int md5_check(const char *checkfile_name)
689 } else { 689 } else {
690 checkfile_stream = fopen(checkfile_name, "r"); 690 checkfile_stream = fopen(checkfile_name, "r");
691 if (checkfile_stream == NULL) { 691 if (checkfile_stream == NULL) {
692 errorMsg("%s: %s\n", checkfile_name, strerror(errno)); 692 error_msg("%s: %s\n", checkfile_name, strerror(errno));
693 return FALSE; 693 return FALSE;
694 } 694 }
695 } 695 }
@@ -722,7 +722,7 @@ static int md5_check(const char *checkfile_name)
722 if (split_3(line, line_length, &md5num, &binary, &filename) 722 if (split_3(line, line_length, &md5num, &binary, &filename)
723 || !hex_digits(md5num)) { 723 || !hex_digits(md5num)) {
724 if (warn) { 724 if (warn) {
725 errorMsg("%s: %lu: improperly formatted MD5 checksum line\n", 725 error_msg("%s: %lu: improperly formatted MD5 checksum line\n",
726 checkfile_name, (unsigned long) line_number); 726 checkfile_name, (unsigned long) line_number);
727 } 727 }
728 } else { 728 } else {
@@ -770,18 +770,18 @@ static int md5_check(const char *checkfile_name)
770 free(line); 770 free(line);
771 771
772 if (ferror(checkfile_stream)) { 772 if (ferror(checkfile_stream)) {
773 errorMsg("%s: read error\n", checkfile_name); /* */ 773 error_msg("%s: read error\n", checkfile_name); /* */
774 return FALSE; 774 return FALSE;
775 } 775 }
776 776
777 if (checkfile_stream != stdin && fclose(checkfile_stream) == EOF) { 777 if (checkfile_stream != stdin && fclose(checkfile_stream) == EOF) {
778 errorMsg("md5sum: %s: %s\n", checkfile_name, strerror(errno)); 778 error_msg("md5sum: %s: %s\n", checkfile_name, strerror(errno));
779 return FALSE; 779 return FALSE;
780 } 780 }
781 781
782 if (n_properly_formated_lines == 0) { 782 if (n_properly_formated_lines == 0) {
783 /* Warn if no tests are found. */ 783 /* Warn if no tests are found. */
784 errorMsg("%s: no properly formatted MD5 checksum lines found\n", 784 error_msg("%s: no properly formatted MD5 checksum lines found\n",
785 checkfile_name); 785 checkfile_name);
786 return FALSE; 786 return FALSE;
787 } else { 787 } else {
@@ -790,13 +790,13 @@ static int md5_check(const char *checkfile_name)
790 - n_open_or_read_failures); 790 - n_open_or_read_failures);
791 791
792 if (n_open_or_read_failures > 0) { 792 if (n_open_or_read_failures > 0) {
793 errorMsg("WARNING: %d of %d listed files could not be read\n", 793 error_msg("WARNING: %d of %d listed files could not be read\n",
794 n_open_or_read_failures, n_properly_formated_lines); 794 n_open_or_read_failures, n_properly_formated_lines);
795 return FALSE; 795 return FALSE;
796 } 796 }
797 797
798 if (n_mismatched_checksums > 0) { 798 if (n_mismatched_checksums > 0) {
799 errorMsg("WARNING: %d of %d computed checksums did NOT match\n", 799 error_msg("WARNING: %d of %d computed checksums did NOT match\n",
800 n_mismatched_checksums, n_computed_checkums); 800 n_mismatched_checksums, n_computed_checkums);
801 return FALSE; 801 return FALSE;
802 } 802 }
@@ -861,22 +861,22 @@ int md5sum_main(int argc,
861 } 861 }
862 862
863 if (file_type_specified && do_check) { 863 if (file_type_specified && do_check) {
864 errorMsg("the -b and -t options are meaningless when verifying checksums\n"); 864 error_msg("the -b and -t options are meaningless when verifying checksums\n");
865 return EXIT_FAILURE; 865 return EXIT_FAILURE;
866 } 866 }
867 867
868 if (n_strings > 0 && do_check) { 868 if (n_strings > 0 && do_check) {
869 errorMsg("the -g and -c options are mutually exclusive\n"); 869 error_msg("the -g and -c options are mutually exclusive\n");
870 return EXIT_FAILURE; 870 return EXIT_FAILURE;
871 } 871 }
872 872
873 if (status_only && !do_check) { 873 if (status_only && !do_check) {
874 errorMsg("the -s option is meaningful only when verifying checksums\n"); 874 error_msg("the -s option is meaningful only when verifying checksums\n");
875 return EXIT_FAILURE; 875 return EXIT_FAILURE;
876 } 876 }
877 877
878 if (warn && !do_check) { 878 if (warn && !do_check) {
879 errorMsg("the -w option is meaningful only when verifying checksums\n"); 879 error_msg("the -w option is meaningful only when verifying checksums\n");
880 return EXIT_FAILURE; 880 return EXIT_FAILURE;
881 } 881 }
882 882
@@ -884,7 +884,7 @@ int md5sum_main(int argc,
884 size_t i; 884 size_t i;
885 885
886 if (optind < argc) { 886 if (optind < argc) {
887 errorMsg("no files may be specified when using -g\n"); 887 error_msg("no files may be specified when using -g\n");
888 return EXIT_FAILURE; 888 return EXIT_FAILURE;
889 } 889 }
890 for (i = 0; i < n_strings; ++i) { 890 for (i = 0; i < n_strings; ++i) {
@@ -898,7 +898,7 @@ int md5sum_main(int argc,
898 } 898 }
899 } else if (do_check) { 899 } else if (do_check) {
900 if (optind + 1 < argc) { 900 if (optind + 1 < argc) {
901 errorMsg("only one argument may be specified when using -c\n"); 901 error_msg("only one argument may be specified when using -c\n");
902 } 902 }
903 903
904 err = md5_check ((optind == argc) ? "-" : argv[optind]); 904 err = md5_check ((optind == argc) ? "-" : argv[optind]);
@@ -951,12 +951,12 @@ int md5sum_main(int argc,
951 } 951 }
952 952
953 if (fclose (stdout) == EOF) { 953 if (fclose (stdout) == EOF) {
954 errorMsg("write error\n"); 954 error_msg("write error\n");
955 return EXIT_FAILURE; 955 return EXIT_FAILURE;
956 } 956 }
957 957
958 if (have_read_stdin && fclose (stdin) == EOF) { 958 if (have_read_stdin && fclose (stdin) == EOF) {
959 errorMsg("standard input\n"); 959 error_msg("standard input\n");
960 return EXIT_FAILURE; 960 return EXIT_FAILURE;
961 } 961 }
962 962