comparison src/emacs.c @ 107414:929a106309b7

Remove obsolete code in emacs.c that chooses a bug reporting address. * emacs.c (USAGE4): Hard-code bug address. (REPORT_EMACS_BUG_ADDRESS, REPORT_EMACS_BUG_PRETEST_ADDRESS): Remove. (bug_reporting_address): Remove. (main): Don't call bug_reporting_address.
author Glenn Morris <rgm@gnu.org>
date Wed, 17 Mar 2010 23:27:55 -0700
parents db05908c4fc1
children 3447e262f426
comparison
equal deleted inserted replaced
107413:a21a1c5668d6 107414:929a106309b7
343 abbreviation for a --option.\n\ 343 abbreviation for a --option.\n\
344 \n\ 344 \n\
345 Various environment variables and window system resources also affect\n\ 345 Various environment variables and window system resources also affect\n\
346 Emacs' operation. See the main documentation.\n\ 346 Emacs' operation. See the main documentation.\n\
347 \n\ 347 \n\
348 Report bugs to %s. First, please see the Bugs\n\ 348 Report bugs to bug-gnu-emacs@gnu.org. First, please see the Bugs\n\
349 section of the Emacs manual or the file BUGS.\n" 349 section of the Emacs manual or the file BUGS.\n"
350 350
351 351
352 /* Signal code for the fatal signal that was received. */ 352 /* Signal code for the fatal signal that was received. */
353 int fatal_error_code; 353 int fatal_error_code;
742 } 742 }
743 743
744 void (*__malloc_initialize_hook) () = malloc_initialize_hook; 744 void (*__malloc_initialize_hook) () = malloc_initialize_hook;
745 745
746 #endif /* DOUG_LEA_MALLOC */ 746 #endif /* DOUG_LEA_MALLOC */
747
748
749 #define REPORT_EMACS_BUG_ADDRESS "bug-gnu-emacs@gnu.org"
750 #define REPORT_EMACS_BUG_PRETEST_ADDRESS "bug-gnu-emacs@gnu.org"
751
752 /* This function is used to determine an address to which bug report should
753 be sent. */
754
755 char *
756 bug_reporting_address ()
757 {
758 int count = 0;
759 Lisp_Object temp;
760 char *string;
761
762 temp = Fsymbol_value (intern ("emacs-version"));
763
764 /* When `emacs-version' is invalid, use normal address. */
765 if (!STRINGP(temp))
766 return REPORT_EMACS_BUG_ADDRESS;
767
768 string = SDATA (temp);
769
770 /* Count dots in `emacs-version'. */
771 while (*string)
772 {
773 if (*string == '.')
774 count++;
775 string++;
776 }
777
778 /* When `emacs-version' has at least three dots, it is development or
779 pretest version of Emacs. */
780 return count >= 3 ? REPORT_EMACS_BUG_PRETEST_ADDRESS : REPORT_EMACS_BUG_ADDRESS;
781 }
782 747
783 748
784 /* ARGSUSED */ 749 /* ARGSUSED */
785 int 750 int
786 main (int argc, char **argv) 751 main (int argc, char **argv)
1080 /* Handle the --help option, which gives a usage message. */ 1045 /* Handle the --help option, which gives a usage message. */
1081 if (argmatch (argv, argc, "-help", "--help", 3, NULL, &skip_args)) 1046 if (argmatch (argv, argc, "-help", "--help", 3, NULL, &skip_args))
1082 { 1047 {
1083 printf (USAGE1, argv[0], USAGE2); 1048 printf (USAGE1, argv[0], USAGE2);
1084 printf (USAGE3); 1049 printf (USAGE3);
1085 printf (USAGE4, bug_reporting_address ()); 1050 printf (USAGE4);
1086 exit (0); 1051 exit (0);
1087 } 1052 }
1088 1053
1089 if (argmatch (argv, argc, "-daemon", "--daemon", 5, NULL, &skip_args) 1054 if (argmatch (argv, argc, "-daemon", "--daemon", 5, NULL, &skip_args)
1090 || argmatch (argv, argc, "-daemon", "--daemon", 5, &dname_arg, &skip_args)) 1055 || argmatch (argv, argc, "-daemon", "--daemon", 5, &dname_arg, &skip_args))