diff options
| author | Glenn Morris | 2010-10-08 18:15:15 -0700 |
|---|---|---|
| committer | Glenn Morris | 2010-10-08 18:15:15 -0700 |
| commit | 3fb78d1f3341032d7bca0d4f6c708fb90d80a7ed (patch) | |
| tree | e48839b08ca753ca7a3d1949bae608a59ec9cf2b | |
| parent | ea274122d5d221b4d74435c22a48083550ad43c5 (diff) | |
| download | emacs-3fb78d1f3341032d7bca0d4f6c708fb90d80a7ed.tar.gz emacs-3fb78d1f3341032d7bca0d4f6c708fb90d80a7ed.zip | |
Remove lib-src/b2m.c and b2m.pl.
Emacs does not use Babyl files since 23.1, and you can use M-x unrmail.
* msdos/mainmake.v2 (install): Remove b2m.
* lisp/emacs-lisp/authors.el (authors-valid-file-names): Add b2m.c.
* lib-src/b2m.c, lib-src/b2m.pl: Remove files.
* lib-src/Makefile.in (INSTALLABLES): Remove b2m.
* lib-src/makefile.w32-in ($(BLD)/b2m.$(O)): Remove.
* doc/emacs/ack.texi (Acknowledgments): No more b2m.c.
* admin/quick-install-emacs (PUBLIC_LIBSRC_BINARIES): Remove b2m.
* INSTALL, make-dist: Remove references to b2m.
* Makefile.in (MAN_PAGES): Remove b2m.1.
| -rw-r--r-- | ChangeLog | 5 | ||||
| -rw-r--r-- | INSTALL | 10 | ||||
| -rw-r--r-- | Makefile.in | 2 | ||||
| -rw-r--r-- | admin/ChangeLog | 4 | ||||
| -rwxr-xr-x | admin/quick-install-emacs | 4 | ||||
| -rw-r--r-- | doc/emacs/ChangeLog | 2 | ||||
| -rw-r--r-- | doc/emacs/ack.texi | 8 | ||||
| -rw-r--r-- | lib-src/ChangeLog | 6 | ||||
| -rw-r--r-- | lib-src/Makefile.in | 9 | ||||
| -rw-r--r-- | lib-src/b2m.c | 318 | ||||
| -rw-r--r-- | lib-src/b2m.pl | 158 | ||||
| -rw-r--r-- | lib-src/makefile.w32-in | 6 | ||||
| -rw-r--r-- | lisp/ChangeLog | 2 | ||||
| -rw-r--r-- | lisp/emacs-lisp/authors.el | 2 | ||||
| -rwxr-xr-x | make-dist | 3 | ||||
| -rw-r--r-- | msdos/ChangeLog | 4 | ||||
| -rw-r--r-- | msdos/mainmake.v2 | 3 |
17 files changed, 36 insertions, 510 deletions
| @@ -1,3 +1,8 @@ | |||
| 1 | 2010-10-09 Glenn Morris <rgm@gnu.org> | ||
| 2 | |||
| 3 | * INSTALL, make-dist: Remove references to b2m. | ||
| 4 | * Makefile.in (MAN_PAGES): Remove b2m.1. | ||
| 5 | |||
| 1 | 2010-10-05 Glenn Morris <rgm@gnu.org> | 6 | 2010-10-05 Glenn Morris <rgm@gnu.org> |
| 2 | 7 | ||
| 3 | * .dir-locals.el: The Emacs convention is sentence-end-double-space. | 8 | * .dir-locals.el: The Emacs convention is sentence-end-double-space. |
| @@ -460,7 +460,7 @@ installed locations, with `make install'. By default, Emacs's files | |||
| 460 | are installed in the following directories: | 460 | are installed in the following directories: |
| 461 | 461 | ||
| 462 | `/usr/local/bin' holds the executable programs users normally run - | 462 | `/usr/local/bin' holds the executable programs users normally run - |
| 463 | `emacs', `etags', `ctags', `b2m', `emacsclient', | 463 | `emacs', `etags', `ctags', `emacsclient', |
| 464 | `grep-changelog', and `rcs-checkin'. | 464 | `grep-changelog', and `rcs-checkin'. |
| 465 | 465 | ||
| 466 | `/usr/local/share/emacs/VERSION/lisp' holds the Emacs Lisp library; | 466 | `/usr/local/share/emacs/VERSION/lisp' holds the Emacs Lisp library; |
| @@ -705,7 +705,7 @@ in `./lib-src' to their final destinations, as selected in `./src/epaths.h'. | |||
| 705 | Strictly speaking, not all of the executables in `./lib-src' need be copied. | 705 | Strictly speaking, not all of the executables in `./lib-src' need be copied. |
| 706 | - The programs `fakemail', `hexl', `movemail', `profile', `rcs2log', | 706 | - The programs `fakemail', `hexl', `movemail', `profile', `rcs2log', |
| 707 | and `vcdiff' are used by Emacs; they do need to be copied. | 707 | and `vcdiff' are used by Emacs; they do need to be copied. |
| 708 | - The programs `etags', `ctags', `emacsclient', `b2m', and `rcs-checkin' | 708 | - The programs `etags', `ctags', `emacsclient', and `rcs-checkin' |
| 709 | are intended to be run by users; they are handled below. | 709 | are intended to be run by users; they are handled below. |
| 710 | - The programs `make-docfile' and `test-distrib' were | 710 | - The programs `make-docfile' and `test-distrib' were |
| 711 | used in building Emacs, and are not needed any more. | 711 | used in building Emacs, and are not needed any more. |
| @@ -727,9 +727,9 @@ of installing different versions. | |||
| 727 | 727 | ||
| 728 | You can delete `./src/temacs'. | 728 | You can delete `./src/temacs'. |
| 729 | 729 | ||
| 730 | 4) Copy the programs `b2m', `emacsclient', `ctags', `etags', and | 730 | 4) Copy the programs `emacsclient', `ctags', `etags', and `rcs-checkin' |
| 731 | `rcs-checkin' from `./lib-src' to `/usr/local/bin'. These programs are | 731 | from `./lib-src' to `/usr/local/bin'. These programs are intended for |
| 732 | intended for users to run. | 732 | users to run. |
| 733 | 733 | ||
| 734 | 5) Copy the man pages in `./doc/man' into the appropriate man directory. | 734 | 5) Copy the man pages in `./doc/man' into the appropriate man directory. |
| 735 | 735 | ||
diff --git a/Makefile.in b/Makefile.in index d7e08a2328f..5466193a7f1 100644 --- a/Makefile.in +++ b/Makefile.in | |||
| @@ -125,7 +125,7 @@ libexecdir=@libexecdir@ | |||
| 125 | # (and they contain cross-references that expect them to be there). | 125 | # (and they contain cross-references that expect them to be there). |
| 126 | mandir=@mandir@ | 126 | mandir=@mandir@ |
| 127 | man1dir=$(mandir)/man1 | 127 | man1dir=$(mandir)/man1 |
| 128 | MAN_PAGES=b2m.1 ctags.1 ebrowse.1 emacs.1 emacsclient.1 etags.1 \ | 128 | MAN_PAGES=ctags.1 ebrowse.1 emacs.1 emacsclient.1 etags.1 \ |
| 129 | grep-changelog.1 rcs-checkin.1 | 129 | grep-changelog.1 rcs-checkin.1 |
| 130 | 130 | ||
| 131 | # Where to install and expect the info files describing Emacs. In the | 131 | # Where to install and expect the info files describing Emacs. In the |
diff --git a/admin/ChangeLog b/admin/ChangeLog index d3bc51bd9f6..d3ca3a19dd4 100644 --- a/admin/ChangeLog +++ b/admin/ChangeLog | |||
| @@ -1,3 +1,7 @@ | |||
| 1 | 2010-10-09 Glenn Morris <rgm@gnu.org> | ||
| 2 | |||
| 3 | * quick-install-emacs (PUBLIC_LIBSRC_BINARIES): Remove b2m. | ||
| 4 | |||
| 1 | 2010-09-05 Juanma Barranquero <lekktu@gmail.com> | 5 | 2010-09-05 Juanma Barranquero <lekktu@gmail.com> |
| 2 | 6 | ||
| 3 | * unidata/BidiMirroring.txt: Update from | 7 | * unidata/BidiMirroring.txt: Update from |
diff --git a/admin/quick-install-emacs b/admin/quick-install-emacs index 39b200b5102..24972e655b6 100755 --- a/admin/quick-install-emacs +++ b/admin/quick-install-emacs | |||
| @@ -28,7 +28,7 @@ | |||
| 28 | ## install emacs very often. See the --help output for more details. | 28 | ## install emacs very often. See the --help output for more details. |
| 29 | 29 | ||
| 30 | 30 | ||
| 31 | PUBLIC_LIBSRC_BINARIES='b2m emacsclient etags ctags ebrowse' | 31 | PUBLIC_LIBSRC_BINARIES='emacsclient etags ctags ebrowse' |
| 32 | PUBLIC_LIBSRC_SCRIPTS='grep-changelog rcs-checkin' | 32 | PUBLIC_LIBSRC_SCRIPTS='grep-changelog rcs-checkin' |
| 33 | 33 | ||
| 34 | AVOID="CVS -DIC README COPYING ChangeLog ~ [.]orig$ [.]rej$ Makefile$ Makefile.in$ makefile$ makefile.w32-in$ stamp-subdir [.]cvsignore [.]arch-ids [{]arch[}] [.][cho]$ make-docfile testfile test-distrib" | 34 | AVOID="CVS -DIC README COPYING ChangeLog ~ [.]orig$ [.]rej$ Makefile$ Makefile.in$ makefile$ makefile.w32-in$ stamp-subdir [.]cvsignore [.]arch-ids [{]arch[}] [.][cho]$ make-docfile testfile test-distrib" |
| @@ -374,5 +374,3 @@ END { | |||
| 374 | done | 374 | done |
| 375 | 375 | ||
| 376 | ) | eval $EXEC | 376 | ) | eval $EXEC |
| 377 | |||
| 378 | # arch-tag: 9322b572-9755-4cf7-a67a-21e6505f1477 | ||
diff --git a/doc/emacs/ChangeLog b/doc/emacs/ChangeLog index b0d129c4497..a7ddef1b209 100644 --- a/doc/emacs/ChangeLog +++ b/doc/emacs/ChangeLog | |||
| @@ -1,5 +1,7 @@ | |||
| 1 | 2010-10-09 Glenn Morris <rgm@gnu.org> | 1 | 2010-10-09 Glenn Morris <rgm@gnu.org> |
| 2 | 2 | ||
| 3 | * ack.texi (Acknowledgments): No more b2m.c. | ||
| 4 | |||
| 3 | * Makefile.in (.PHONY): Declare info, dvi, pdf, dist. | 5 | * Makefile.in (.PHONY): Declare info, dvi, pdf, dist. |
| 4 | (emacs): Remove rule. | 6 | (emacs): Remove rule. |
| 5 | (dist): No need to deal with the emacs rule any more. | 7 | (dist): No need to deal with the emacs rule any more. |
diff --git a/doc/emacs/ack.texi b/doc/emacs/ack.texi index 7277a395ff4..3b22392b12e 100644 --- a/doc/emacs/ack.texi +++ b/doc/emacs/ack.texi | |||
| @@ -1321,10 +1321,6 @@ Directory Client; and @code{eshell}, a command shell implemented | |||
| 1321 | entirely in Emacs Lisp. He also contributed to Org mode (q.v.@:). | 1321 | entirely in Emacs Lisp. He also contributed to Org mode (q.v.@:). |
| 1322 | 1322 | ||
| 1323 | @item | 1323 | @item |
| 1324 | Ed Wilkinson wrote @file{b2m.c}, a program to convert mail files from | ||
| 1325 | RMAIL format to Unix @code{mbox} format. | ||
| 1326 | |||
| 1327 | @item | ||
| 1328 | Mike Williams wrote @file{mouse-sel.el}, providing enhanced mouse | 1324 | Mike Williams wrote @file{mouse-sel.el}, providing enhanced mouse |
| 1329 | selection; and @file{thingatpt.el}, a library of functions for finding | 1325 | selection; and @file{thingatpt.el}, a library of functions for finding |
| 1330 | the ``thing'' (word, line, s-expression) containing point. | 1326 | the ``thing'' (word, line, s-expression) containing point. |
| @@ -1418,7 +1414,3 @@ Detlev Zundel wrote @file{re-builder.el}, a package for building regexps | |||
| 1418 | with visual feedback. | 1414 | with visual feedback. |
| 1419 | 1415 | ||
| 1420 | @end itemize | 1416 | @end itemize |
| 1421 | |||
| 1422 | @ignore | ||
| 1423 | arch-tag: bb1d0fa4-0240-4992-b5d4-8602d1e3d4ba | ||
| 1424 | @end ignore | ||
diff --git a/lib-src/ChangeLog b/lib-src/ChangeLog index 50528a4508c..10c93238edd 100644 --- a/lib-src/ChangeLog +++ b/lib-src/ChangeLog | |||
| @@ -1,3 +1,9 @@ | |||
| 1 | 2010-10-09 Glenn Morris <rgm@gnu.org> | ||
| 2 | |||
| 3 | * b2m.c, b2m.pl: Remove files. | ||
| 4 | * Makefile.in (INSTALLABLES): Remove b2m. | ||
| 5 | * makefile.w32-in ($(BLD)/b2m.$(O)): Remove. | ||
| 6 | |||
| 1 | 2010-10-08 Glenn Morris <rgm@gnu.org> | 7 | 2010-10-08 Glenn Morris <rgm@gnu.org> |
| 2 | 8 | ||
| 3 | * emacsclient.c (set_local_socket) [DARWIN_OS]: Try as a fall-back | 9 | * emacsclient.c (set_local_socket) [DARWIN_OS]: Try as a fall-back |
diff --git a/lib-src/Makefile.in b/lib-src/Makefile.in index 44b31fbb3ac..fda0ccaf3ed 100644 --- a/lib-src/Makefile.in +++ b/lib-src/Makefile.in | |||
| @@ -1,6 +1,7 @@ | |||
| 1 | # Makefile for lib-src subdirectory in GNU Emacs. | 1 | # Makefile for lib-src subdirectory in GNU Emacs. |
| 2 | # Copyright (C) 1985, 1987, 1988, 1993, 1994, 2001, 2002, 2003, 2004, | 2 | # Copyright (C) 1985, 1987, 1988, 1993, 1994, 2001, 2002, 2003, 2004, |
| 3 | # 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. | 3 | # 2005, 2006, 2007, 2008, 2009, 2010 |
| 4 | # Free Software Foundation, Inc. | ||
| 4 | 5 | ||
| 5 | # This file is part of GNU Emacs. | 6 | # This file is part of GNU Emacs. |
| 6 | 7 | ||
| @@ -111,7 +112,7 @@ INSTALL_STRIP = | |||
| 111 | 112 | ||
| 112 | # Things that a user might actually run, which should be installed in bindir. | 113 | # Things that a user might actually run, which should be installed in bindir. |
| 113 | INSTALLABLES = etags${EXEEXT} ctags${EXEEXT} emacsclient${EXEEXT} \ | 114 | INSTALLABLES = etags${EXEEXT} ctags${EXEEXT} emacsclient${EXEEXT} \ |
| 114 | b2m${EXEEXT} ebrowse${EXEEXT} | 115 | ebrowse${EXEEXT} |
| 115 | 116 | ||
| 116 | INSTALLABLE_SCRIPTS = rcs-checkin grep-changelog | 117 | INSTALLABLE_SCRIPTS = rcs-checkin grep-changelog |
| 117 | STAMP_INST_SCRIPTS = stamp-rcs-checkin stamp-grep-changelog | 118 | STAMP_INST_SCRIPTS = stamp-rcs-checkin stamp-grep-changelog |
| @@ -359,10 +360,6 @@ digest-doc${EXEEXT}: ${srcdir}/digest-doc.c | |||
| 359 | sorted-doc${EXEEXT}: ${srcdir}/sorted-doc.c | 360 | sorted-doc${EXEEXT}: ${srcdir}/sorted-doc.c |
| 360 | $(CC) ${ALL_CFLAGS} ${srcdir}/sorted-doc.c $(LOADLIBES) -o sorted-doc | 361 | $(CC) ${ALL_CFLAGS} ${srcdir}/sorted-doc.c $(LOADLIBES) -o sorted-doc |
| 361 | 362 | ||
| 362 | b2m${EXEEXT}: ${srcdir}/b2m.c ../src/config.h $(GETOPTDEPS) | ||
| 363 | $(CC) ${ALL_CFLAGS} ${srcdir}/b2m.c -DVERSION="\"${version}\"" \ | ||
| 364 | $(GETOPTOBJS) $(LOADLIBES) -o b2m | ||
| 365 | |||
| 366 | movemail${EXEEXT}: movemail.o pop.o $(GETOPTDEPS) | 363 | movemail${EXEEXT}: movemail.o pop.o $(GETOPTDEPS) |
| 367 | $(CC) ${LINK_CFLAGS} ${MOVE_FLAGS} movemail.o pop.o \ | 364 | $(CC) ${LINK_CFLAGS} ${MOVE_FLAGS} movemail.o pop.o \ |
| 368 | $(GETOPTOBJS) $(LOADLIBES) $(LIBS_MOVE) -o movemail | 365 | $(GETOPTOBJS) $(LOADLIBES) $(LIBS_MOVE) -o movemail |
diff --git a/lib-src/b2m.c b/lib-src/b2m.c deleted file mode 100644 index 803d75e233c..00000000000 --- a/lib-src/b2m.c +++ /dev/null | |||
| @@ -1,318 +0,0 @@ | |||
| 1 | /* | ||
| 2 | * b2m - a filter for Babyl -> Unix mail files | ||
| 3 | * The copyright on this file has been disclaimed. | ||
| 4 | * | ||
| 5 | * usage: b2m < babyl > mailbox | ||
| 6 | * | ||
| 7 | * I find this useful whenever I have to use a | ||
| 8 | * system which - shock horror! - doesn't run | ||
| 9 | * GNU Emacs. At least now I can read all my | ||
| 10 | * GNU Emacs Babyl format mail files! | ||
| 11 | * | ||
| 12 | * it's not much but it's free! | ||
| 13 | * | ||
| 14 | * Ed Wilkinson | ||
| 15 | * E.Wilkinson@massey.ac.nz | ||
| 16 | * Mon Nov 7 15:54:06 PDT 1988 | ||
| 17 | */ | ||
| 18 | |||
| 19 | /* Made conformant to the GNU coding standards January, 1995 | ||
| 20 | by Francesco Potorti` <pot@cnuce.cnr.it>. */ | ||
| 21 | |||
| 22 | #ifdef HAVE_CONFIG_H | ||
| 23 | #include <config.h> | ||
| 24 | /* On some systems, Emacs defines static as nothing for the sake | ||
| 25 | of unexec. We don't want that here since we don't use unexec. */ | ||
| 26 | #undef static | ||
| 27 | #endif | ||
| 28 | |||
| 29 | #include <stdio.h> | ||
| 30 | #include <time.h> | ||
| 31 | #include <sys/types.h> | ||
| 32 | #include <getopt.h> | ||
| 33 | #ifdef MSDOS | ||
| 34 | #include <fcntl.h> | ||
| 35 | #endif | ||
| 36 | |||
| 37 | #undef TRUE | ||
| 38 | #define TRUE 1 | ||
| 39 | #undef FALSE | ||
| 40 | #define FALSE 0 | ||
| 41 | |||
| 42 | #define streq(s,t) (strcmp (s, t) == 0) | ||
| 43 | #define strneq(s,t,n) (strncmp (s, t, n) == 0) | ||
| 44 | |||
| 45 | typedef int logical; | ||
| 46 | |||
| 47 | #define TM_YEAR_BASE 1900 | ||
| 48 | |||
| 49 | /* Nonzero if TM_YEAR is a struct tm's tm_year value that causes | ||
| 50 | asctime to have well-defined behavior. */ | ||
| 51 | #ifndef TM_YEAR_IN_ASCTIME_RANGE | ||
| 52 | # define TM_YEAR_IN_ASCTIME_RANGE(tm_year) \ | ||
| 53 | (1000 - TM_YEAR_BASE <= (tm_year) && (tm_year) <= 9999 - TM_YEAR_BASE) | ||
| 54 | #endif | ||
| 55 | |||
| 56 | /* | ||
| 57 | * A `struct linebuffer' is a structure which holds a line of text. | ||
| 58 | * `readline' reads a line from a stream into a linebuffer and works | ||
| 59 | * regardless of the length of the line. | ||
| 60 | */ | ||
| 61 | struct linebuffer | ||
| 62 | { | ||
| 63 | long size; | ||
| 64 | char *buffer; | ||
| 65 | }; | ||
| 66 | |||
| 67 | extern char *strtok(char *, const char *); | ||
| 68 | |||
| 69 | long *xmalloc (unsigned int size); | ||
| 70 | long *xrealloc (char *ptr, unsigned int size); | ||
| 71 | char *concat (const char *s1, const char *s2, const char *s3); | ||
| 72 | long readline (struct linebuffer *linebuffer, register FILE *stream); | ||
| 73 | void fatal (const char *message) NO_RETURN; | ||
| 74 | |||
| 75 | /* | ||
| 76 | * xnew -- allocate storage. SYNOPSIS: Type *xnew (int n, Type); | ||
| 77 | */ | ||
| 78 | #define xnew(n, Type) ((Type *) xmalloc ((n) * sizeof (Type))) | ||
| 79 | |||
| 80 | |||
| 81 | |||
| 82 | char *progname; | ||
| 83 | |||
| 84 | struct option longopts[] = | ||
| 85 | { | ||
| 86 | { "help", no_argument, NULL, 'h' }, | ||
| 87 | { "version", no_argument, NULL, 'V' }, | ||
| 88 | { 0 } | ||
| 89 | }; | ||
| 90 | |||
| 91 | extern int optind; | ||
| 92 | |||
| 93 | int | ||
| 94 | main (int argc, char **argv) | ||
| 95 | { | ||
| 96 | logical labels_saved, printing, header, first, last_was_blank_line; | ||
| 97 | time_t ltoday; | ||
| 98 | struct tm *tm; | ||
| 99 | char *labels, *p, *today; | ||
| 100 | struct linebuffer data; | ||
| 101 | |||
| 102 | #ifdef MSDOS | ||
| 103 | _fmode = O_BINARY; /* all of files are treated as binary files */ | ||
| 104 | #if __DJGPP__ > 1 | ||
| 105 | if (!isatty (fileno (stdout))) | ||
| 106 | setmode (fileno (stdout), O_BINARY); | ||
| 107 | if (!isatty (fileno (stdin))) | ||
| 108 | setmode (fileno (stdin), O_BINARY); | ||
| 109 | #else /* not __DJGPP__ > 1 */ | ||
| 110 | (stdout)->_flag &= ~_IOTEXT; | ||
| 111 | (stdin)->_flag &= ~_IOTEXT; | ||
| 112 | #endif /* not __DJGPP__ > 1 */ | ||
| 113 | #endif | ||
| 114 | progname = argv[0]; | ||
| 115 | |||
| 116 | while (1) | ||
| 117 | { | ||
| 118 | int opt = getopt_long (argc, argv, "hV", longopts, 0); | ||
| 119 | if (opt == EOF) | ||
| 120 | break; | ||
| 121 | |||
| 122 | switch (opt) | ||
| 123 | { | ||
| 124 | case 'V': | ||
| 125 | printf ("%s (GNU Emacs %s)\n", "b2m", VERSION); | ||
| 126 | puts ("b2m is in the public domain."); | ||
| 127 | exit (EXIT_SUCCESS); | ||
| 128 | |||
| 129 | case 'h': | ||
| 130 | fprintf (stderr, "Usage: %s <babylmailbox >unixmailbox\n", progname); | ||
| 131 | exit (EXIT_SUCCESS); | ||
| 132 | } | ||
| 133 | } | ||
| 134 | |||
| 135 | if (optind != argc) | ||
| 136 | { | ||
| 137 | fprintf (stderr, "Usage: %s <babylmailbox >unixmailbox\n", progname); | ||
| 138 | exit (EXIT_SUCCESS); | ||
| 139 | } | ||
| 140 | |||
| 141 | labels_saved = printing = header = last_was_blank_line = FALSE; | ||
| 142 | first = TRUE; | ||
| 143 | ltoday = time (0); | ||
| 144 | /* Convert to a string, checking for out-of-range time stamps. | ||
| 145 | Don't use 'ctime', as that might dump core if the hardware clock | ||
| 146 | is set to a bizarre value. */ | ||
| 147 | tm = localtime (<oday); | ||
| 148 | if (! (tm && TM_YEAR_IN_ASCTIME_RANGE (tm->tm_year) | ||
| 149 | && (today = asctime (tm)))) | ||
| 150 | fatal ("current time is out of range"); | ||
| 151 | data.size = 200; | ||
| 152 | data.buffer = xnew (200, char); | ||
| 153 | |||
| 154 | if (readline (&data, stdin) == 0 | ||
| 155 | || !strneq (data.buffer, "BABYL OPTIONS:", 14)) | ||
| 156 | fatal ("standard input is not a Babyl mailfile."); | ||
| 157 | |||
| 158 | while (readline (&data, stdin) > 0) | ||
| 159 | { | ||
| 160 | if (streq (data.buffer, "*** EOOH ***") && !printing) | ||
| 161 | { | ||
| 162 | printing = header = TRUE; | ||
| 163 | printf ("From \"Babyl to mail by %s\" %s", progname, today); | ||
| 164 | continue; | ||
| 165 | } | ||
| 166 | |||
| 167 | if (data.buffer[0] == '\037') | ||
| 168 | { | ||
| 169 | if (data.buffer[1] == '\0') | ||
| 170 | continue; | ||
| 171 | else if (data.buffer[1] == '\f') | ||
| 172 | { | ||
| 173 | static char babyl[] = "X-Babyl-Labels: "; | ||
| 174 | if (first) | ||
| 175 | first = FALSE; | ||
| 176 | else if (! last_was_blank_line) | ||
| 177 | puts(""); | ||
| 178 | /* Save labels. */ | ||
| 179 | readline (&data, stdin); | ||
| 180 | p = strtok (data.buffer, " ,\r\n\t"); | ||
| 181 | labels = babyl; | ||
| 182 | |||
| 183 | while ((p = strtok (NULL, " ,\r\n\t"))) | ||
| 184 | labels = concat (labels, p, ", "); | ||
| 185 | |||
| 186 | p = &labels[strlen (labels) - 2]; | ||
| 187 | if (*p == ',') | ||
| 188 | *p = '\0'; | ||
| 189 | printing = header = FALSE; | ||
| 190 | labels_saved = TRUE; | ||
| 191 | continue; | ||
| 192 | } | ||
| 193 | } | ||
| 194 | |||
| 195 | if ((data.buffer[0] == '\0') && header) | ||
| 196 | { | ||
| 197 | header = FALSE; | ||
| 198 | if (labels_saved) | ||
| 199 | puts (labels); | ||
| 200 | } | ||
| 201 | |||
| 202 | if (printing) | ||
| 203 | { | ||
| 204 | puts (data.buffer); | ||
| 205 | if (data.buffer[0] == '\0') | ||
| 206 | last_was_blank_line = TRUE; | ||
| 207 | else | ||
| 208 | last_was_blank_line = FALSE; | ||
| 209 | } | ||
| 210 | } | ||
| 211 | |||
| 212 | return EXIT_SUCCESS; | ||
| 213 | } | ||
| 214 | |||
| 215 | |||
| 216 | |||
| 217 | /* | ||
| 218 | * Return a newly-allocated string whose contents | ||
| 219 | * concatenate those of s1, s2, s3. | ||
| 220 | */ | ||
| 221 | char * | ||
| 222 | concat (const char *s1, const char *s2, const char *s3) | ||
| 223 | { | ||
| 224 | int len1 = strlen (s1), len2 = strlen (s2), len3 = strlen (s3); | ||
| 225 | char *result = xnew (len1 + len2 + len3 + 1, char); | ||
| 226 | |||
| 227 | strcpy (result, s1); | ||
| 228 | strcpy (result + len1, s2); | ||
| 229 | strcpy (result + len1 + len2, s3); | ||
| 230 | result[len1 + len2 + len3] = '\0'; | ||
| 231 | |||
| 232 | return result; | ||
| 233 | } | ||
| 234 | |||
| 235 | /* | ||
| 236 | * Read a line of text from `stream' into `linebuffer'. | ||
| 237 | * Return the number of characters read from `stream', | ||
| 238 | * which is the length of the line including the newline, if any. | ||
| 239 | */ | ||
| 240 | long | ||
| 241 | readline (struct linebuffer *linebuffer, register FILE *stream) | ||
| 242 | { | ||
| 243 | char *buffer = linebuffer->buffer; | ||
| 244 | register char *p = linebuffer->buffer; | ||
| 245 | register char *pend; | ||
| 246 | int chars_deleted; | ||
| 247 | |||
| 248 | pend = p + linebuffer->size; /* Separate to avoid 386/IX compiler bug. */ | ||
| 249 | |||
| 250 | while (1) | ||
| 251 | { | ||
| 252 | register int c = getc (stream); | ||
| 253 | if (p == pend) | ||
| 254 | { | ||
| 255 | linebuffer->size *= 2; | ||
| 256 | buffer = (char *) xrealloc (buffer, linebuffer->size); | ||
| 257 | p += buffer - linebuffer->buffer; | ||
| 258 | pend = buffer + linebuffer->size; | ||
| 259 | linebuffer->buffer = buffer; | ||
| 260 | } | ||
| 261 | if (c == EOF) | ||
| 262 | { | ||
| 263 | *p = '\0'; | ||
| 264 | chars_deleted = 0; | ||
| 265 | break; | ||
| 266 | } | ||
| 267 | if (c == '\n') | ||
| 268 | { | ||
| 269 | if (p > buffer && p[-1] == '\r') | ||
| 270 | { | ||
| 271 | *--p = '\0'; | ||
| 272 | chars_deleted = 2; | ||
| 273 | } | ||
| 274 | else | ||
| 275 | { | ||
| 276 | *p = '\0'; | ||
| 277 | chars_deleted = 1; | ||
| 278 | } | ||
| 279 | break; | ||
| 280 | } | ||
| 281 | *p++ = c; | ||
| 282 | } | ||
| 283 | |||
| 284 | return (p - buffer + chars_deleted); | ||
| 285 | } | ||
| 286 | |||
| 287 | /* | ||
| 288 | * Like malloc but get fatal error if memory is exhausted. | ||
| 289 | */ | ||
| 290 | long * | ||
| 291 | xmalloc (unsigned int size) | ||
| 292 | { | ||
| 293 | long *result = (long *) malloc (size); | ||
| 294 | if (result == NULL) | ||
| 295 | fatal ("virtual memory exhausted"); | ||
| 296 | return result; | ||
| 297 | } | ||
| 298 | |||
| 299 | long * | ||
| 300 | xrealloc (char *ptr, unsigned int size) | ||
| 301 | { | ||
| 302 | long *result = (long *) realloc (ptr, size); | ||
| 303 | if (result == NULL) | ||
| 304 | fatal ("virtual memory exhausted"); | ||
| 305 | return result; | ||
| 306 | } | ||
| 307 | |||
| 308 | void | ||
| 309 | fatal (const char *message) | ||
| 310 | { | ||
| 311 | fprintf (stderr, "%s: %s\n", progname, message); | ||
| 312 | exit (EXIT_FAILURE); | ||
| 313 | } | ||
| 314 | |||
| 315 | /* arch-tag: 5a3ad2af-a802-408f-83cc-e7cf5e98653e | ||
| 316 | (do not change this comment) */ | ||
| 317 | |||
| 318 | /* b2m.c ends here */ | ||
diff --git a/lib-src/b2m.pl b/lib-src/b2m.pl deleted file mode 100644 index d3c47f61545..00000000000 --- a/lib-src/b2m.pl +++ /dev/null | |||
| @@ -1,158 +0,0 @@ | |||
| 1 | #!/usr/bin/perl | ||
| 2 | |||
| 3 | # b2m.pl - Script to convert a Babyl file to an mbox file | ||
| 4 | |||
| 5 | # Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 | ||
| 6 | # Free Software Foundation, Inc. | ||
| 7 | |||
| 8 | # Maintainer: Jonathan Kamens <jik@kamens.brookline.ma.us> | ||
| 9 | |||
| 10 | # This program is free software: you can redistribute it and/or modify | ||
| 11 | # it under the terms of the GNU General Public License as published by | ||
| 12 | # the Free Software Foundation, either version 3 of the License, or | ||
| 13 | # (at your option) any later version. | ||
| 14 | |||
| 15 | # This program is distributed in the hope that it will be useful, | ||
| 16 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 17 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 18 | # GNU General Public License for more details. | ||
| 19 | |||
| 20 | # You should have received a copy of the GNU General Public License | ||
| 21 | # along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
| 22 | |||
| 23 | |||
| 24 | # Requires CPAN modules: MailTools (for Mail::Address), TimeDate (for | ||
| 25 | # Date::Parse). | ||
| 26 | |||
| 27 | use warnings; | ||
| 28 | use strict; | ||
| 29 | use File::Basename; | ||
| 30 | use Getopt::Long; | ||
| 31 | use Mail::Address; | ||
| 32 | use Date::Parse; | ||
| 33 | |||
| 34 | my($whoami) = basename $0; | ||
| 35 | my($version) = '$Revision$'; | ||
| 36 | my($usage) = "Usage: $whoami [--help] [--version] [--[no]full-headers] [Babyl-file] | ||
| 37 | \tBy default, full headers are printed.\n"; | ||
| 38 | |||
| 39 | my($opt_help, $opt_version); | ||
| 40 | my($opt_full_headers) = 1; | ||
| 41 | |||
| 42 | die $usage if (! GetOptions( | ||
| 43 | 'help' => \$opt_help, | ||
| 44 | 'version' => \$opt_version, | ||
| 45 | 'full-headers!' => \$opt_full_headers, | ||
| 46 | )); | ||
| 47 | |||
| 48 | if ($opt_help) { | ||
| 49 | print $usage; | ||
| 50 | exit; | ||
| 51 | } | ||
| 52 | elsif ($opt_version) { | ||
| 53 | print "$whoami version: $version\n"; | ||
| 54 | exit; | ||
| 55 | } | ||
| 56 | |||
| 57 | die $usage if (@ARGV > 1); | ||
| 58 | |||
| 59 | $/ = "\n\037"; | ||
| 60 | |||
| 61 | if (<> !~ /^BABYL OPTIONS:/) { | ||
| 62 | die "$whoami: $ARGV is not a Babyl file\n$usage"; | ||
| 63 | } | ||
| 64 | |||
| 65 | while (<>) { | ||
| 66 | my($msg_num) = $. - 1; | ||
| 67 | my($labels, $pruned, $full_header, $header); | ||
| 68 | my($from_line, $from_addr); | ||
| 69 | my($time); | ||
| 70 | |||
| 71 | # This will strip the initial form feed, any whitespace that may | ||
| 72 | # be following it, and then a newline | ||
| 73 | s/^\s+//; | ||
| 74 | # This will strip the ^_ off of the end of the message | ||
| 75 | s/\037$//; | ||
| 76 | |||
| 77 | if (! s/(.*)\n//) { | ||
| 78 | malformatted: | ||
| 79 | warn "$whoami: message $msg_num in $ARGV is malformatted\n"; | ||
| 80 | next; | ||
| 81 | } | ||
| 82 | $labels = $1; | ||
| 83 | |||
| 84 | # Strip the integer indicating whether the header is pruned | ||
| 85 | $labels =~ s/^(\d+)[,\s]*//; | ||
| 86 | $pruned = $1; | ||
| 87 | |||
| 88 | s/(?:((?:.+\n)+)\n*)?\*\*\* EOOH \*\*\*\n+// || goto malformatted; | ||
| 89 | $full_header = $1; | ||
| 90 | |||
| 91 | if (s/((?:.+\n)+)\n+//) { | ||
| 92 | $header = $1; | ||
| 93 | } | ||
| 94 | else { | ||
| 95 | # Message has no body | ||
| 96 | $header = $_; | ||
| 97 | $_ = ''; | ||
| 98 | } | ||
| 99 | |||
| 100 | # "$pruned eq '0'" is different from "! $pruned". We want to make | ||
| 101 | # sure that we found a valid label line which explicitly indicated | ||
| 102 | # that the header was not pruned. | ||
| 103 | if ((! $full_header) || ($pruned eq '0')) { | ||
| 104 | $full_header = $header; | ||
| 105 | } | ||
| 106 | |||
| 107 | # End message with two newlines (some mbox parsers require a blank | ||
| 108 | # line before the next "From " line). | ||
| 109 | s/\s+$/\n\n/; | ||
| 110 | |||
| 111 | # Quote "^From " | ||
| 112 | s/(^|\n)From /$1>From /g; | ||
| 113 | |||
| 114 | # Strip extra commas and whitespace from the end | ||
| 115 | $labels =~ s/[,\s]+$//; | ||
| 116 | # Now collapse extra commas and whitespace in the remaining label string | ||
| 117 | $labels =~ s/[,\s]+/, /g; | ||
| 118 | |||
| 119 | foreach my $rmail_header qw(summary-line x-coding-system) { | ||
| 120 | $full_header =~ s/(^|\n)$rmail_header:.*\n/$1/i; | ||
| 121 | } | ||
| 122 | |||
| 123 | if ($full_header =~ s/(^|\n)mail-from:\s*(From .*)\n/$1/i) { | ||
| 124 | ($from_line = $2) =~ s/\s*$/\n/; | ||
| 125 | } | ||
| 126 | else { | ||
| 127 | foreach my $addr_header qw(return-path from really-from sender) { | ||
| 128 | if ($full_header =~ /(?:^|\n)$addr_header:\s*(.*\n(?:\B.*\n)*)/i) { | ||
| 129 | my($addr) = Mail::Address->parse($1); | ||
| 130 | $from_addr = $addr->address($addr); | ||
| 131 | last; | ||
| 132 | } | ||
| 133 | } | ||
| 134 | |||
| 135 | if (! $from_addr) { | ||
| 136 | $from_addr = "Babyl_to_mail_by_$whoami\@localhost"; | ||
| 137 | } | ||
| 138 | |||
| 139 | if ($full_header =~ /(?:^|\n)date:\s*(\S.*\S)/i) { | ||
| 140 | $time = str2time($1); | ||
| 141 | } | ||
| 142 | |||
| 143 | if (! $time) { | ||
| 144 | # No Date header or we failed to parse it | ||
| 145 | $time = time; | ||
| 146 | } | ||
| 147 | |||
| 148 | $from_line = "From " . $from_addr . " " . localtime($time) . "\n"; | ||
| 149 | } | ||
| 150 | |||
| 151 | print($from_line, ($opt_full_headers ? $full_header : $header), | ||
| 152 | ($labels ? "X-Babyl-Labels: $labels\n" : ""), "\n", | ||
| 153 | $_) || die "$whoami: error writing to stdout: $!\n"; | ||
| 154 | } | ||
| 155 | |||
| 156 | close(STDOUT) || die "$whoami: Error closing stdout: $!\n"; | ||
| 157 | |||
| 158 | # arch-tag: 8c7c8ab0-721c-46d7-ba3e-139801240aa8 | ||
diff --git a/lib-src/makefile.w32-in b/lib-src/makefile.w32-in index 0ef2e06ec71..25fb499cf3b 100644 --- a/lib-src/makefile.w32-in +++ b/lib-src/makefile.w32-in | |||
| @@ -395,12 +395,6 @@ $(BLD)/alloca.$(O) : \ | |||
| 395 | $(EMACS_ROOT)/src/config.h \ | 395 | $(EMACS_ROOT)/src/config.h \ |
| 396 | $(EMACS_ROOT)/src/blockinput.h | 396 | $(EMACS_ROOT)/src/blockinput.h |
| 397 | 397 | ||
| 398 | $(BLD)/b2m.$(O) : \ | ||
| 399 | $(SRC)/b2m.c \ | ||
| 400 | $(EMACS_ROOT)/src/s/ms-w32.h \ | ||
| 401 | $(EMACS_ROOT)/src/m/intel386.h \ | ||
| 402 | $(EMACS_ROOT)/lib-src/../src/config.h | ||
| 403 | |||
| 404 | $(BLD)/ctags.$(O) : \ | 398 | $(BLD)/ctags.$(O) : \ |
| 405 | $(SRC)/ctags.c \ | 399 | $(SRC)/ctags.c \ |
| 406 | $(EMACS_ROOT)/nt/inc/sys/param.h \ | 400 | $(EMACS_ROOT)/nt/inc/sys/param.h \ |
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index c7bdda088f2..56de335de6f 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,5 +1,7 @@ | |||
| 1 | 2010-10-09 Glenn Morris <rgm@gnu.org> | 1 | 2010-10-09 Glenn Morris <rgm@gnu.org> |
| 2 | 2 | ||
| 3 | * emacs-lisp/authors.el (authors-valid-file-names): Add b2m.c. | ||
| 4 | |||
| 3 | * net/browse-url.el: Don't require thingatpt, term, dired, | 5 | * net/browse-url.el: Don't require thingatpt, term, dired, |
| 4 | executable, or w3-auto when compiling. | 6 | executable, or w3-auto when compiling. |
| 5 | (dired-get-filename, term-char-mode, term-send-down, term-send-string): | 7 | (dired-get-filename, term-char-mode, term-send-down, term-send-string): |
diff --git a/lisp/emacs-lisp/authors.el b/lisp/emacs-lisp/authors.el index 3bfa076d71c..248a2cf1312 100644 --- a/lisp/emacs-lisp/authors.el +++ b/lisp/emacs-lisp/authors.el | |||
| @@ -507,6 +507,7 @@ Changes to files in this list are not listed.") | |||
| 507 | "ymakefile" | 507 | "ymakefile" |
| 508 | "permute-index" "index.perm" | 508 | "permute-index" "index.perm" |
| 509 | "ibmrs6000.inp" | 509 | "ibmrs6000.inp" |
| 510 | "b2m.c" | ||
| 510 | "emacs.ico" | 511 | "emacs.ico" |
| 511 | "emacs21.ico" | 512 | "emacs21.ico" |
| 512 | "LPF" "LEDIT" "OTHER.EMACSES" | 513 | "LPF" "LEDIT" "OTHER.EMACSES" |
| @@ -1027,5 +1028,4 @@ the Emacs source tree, from which to build the file." | |||
| 1027 | 1028 | ||
| 1028 | (provide 'authors) | 1029 | (provide 'authors) |
| 1029 | 1030 | ||
| 1030 | ;; arch-tag: 659d5900-5ff2-43b0-954c-a315cc1e4dc1 | ||
| 1031 | ;;; authors.el ends here | 1031 | ;;; authors.el ends here |
| @@ -480,7 +480,7 @@ echo "Making links to \`lib-src'" | |||
| 480 | (cd lib-src | 480 | (cd lib-src |
| 481 | ln [a-zA-Z]*.[chmy] ../${tempdir}/lib-src | 481 | ln [a-zA-Z]*.[chmy] ../${tempdir}/lib-src |
| 482 | ln ChangeLog Makefile.in README testfile vcdiff ../${tempdir}/lib-src | 482 | ln ChangeLog Makefile.in README testfile vcdiff ../${tempdir}/lib-src |
| 483 | ln b2m.pl grep-changelog rcs2log rcs-checkin ../${tempdir}/lib-src | 483 | ln grep-changelog rcs2log rcs-checkin ../${tempdir}/lib-src |
| 484 | ln makefile.w32-in ../${tempdir}/lib-src | 484 | ln makefile.w32-in ../${tempdir}/lib-src |
| 485 | ## If we ended up with a symlink, or if we did not get anything | 485 | ## If we ended up with a symlink, or if we did not get anything |
| 486 | ## due to a cross-device symlink, copy the file. | 486 | ## due to a cross-device symlink, copy the file. |
| @@ -769,5 +769,4 @@ else | |||
| 769 | rm -rf ${tempparent} | 769 | rm -rf ${tempparent} |
| 770 | fi | 770 | fi |
| 771 | 771 | ||
| 772 | # arch-tag: 26e3eb50-a394-4ab2-82b2-d8e5af500de7 | ||
| 773 | ### make-dist ends here | 772 | ### make-dist ends here |
diff --git a/msdos/ChangeLog b/msdos/ChangeLog index 844f8af4efd..e54d8ec640f 100644 --- a/msdos/ChangeLog +++ b/msdos/ChangeLog | |||
| @@ -1,3 +1,7 @@ | |||
| 1 | 2010-10-09 Glenn Morris <rgm@gnu.org> | ||
| 2 | |||
| 3 | * mainmake.v2 (install): Remove b2m. | ||
| 4 | |||
| 1 | 2010-10-02 Eli Zaretskii <eliz@gnu.org> | 5 | 2010-10-02 Eli Zaretskii <eliz@gnu.org> |
| 2 | 6 | ||
| 3 | * mainmake.v2 (TAGS tags): Use `find' to filter out loaddefs | 7 | * mainmake.v2 (TAGS tags): Use `find' to filter out loaddefs |
diff --git a/msdos/mainmake.v2 b/msdos/mainmake.v2 index 15476c1468a..8965f746a6d 100644 --- a/msdos/mainmake.v2 +++ b/msdos/mainmake.v2 | |||
| @@ -129,7 +129,7 @@ emacs misc lispref lispintro: FRC | |||
| 129 | install: all | 129 | install: all |
| 130 | if not exist bin\nul md bin | 130 | if not exist bin\nul md bin |
| 131 | cd lib-src | 131 | cd lib-src |
| 132 | command.com /c >/dev/null for %p in (hexl etags ctags b2m ebrowse) do\ | 132 | command.com /c >/dev/null for %p in (hexl etags ctags ebrowse) do\ |
| 133 | if exist %p.exe mv -f %p.exe ../bin | 133 | if exist %p.exe mv -f %p.exe ../bin |
| 134 | if exist fns.el update fns.el ../bin/fns.el | 134 | if exist fns.el update fns.el ../bin/fns.el |
| 135 | cd .. | 135 | cd .. |
| @@ -287,4 +287,3 @@ bootstrap: bootstrap-clean FRC | |||
| 287 | command.com /e:2048 /c config msdos | 287 | command.com /e:2048 /c config msdos |
| 288 | $(MAKE) $(MFLAGS) info all | 288 | $(MAKE) $(MFLAGS) info all |
| 289 | 289 | ||
| 290 | # arch-tag: 6fee5130-4c53-46c6-93d3-d0ea852298b9 | ||