diff options
| author | Miles Bader <miles@gnu.org> | 2006-06-07 18:05:10 +0000 |
|---|---|---|
| committer | Miles Bader <miles@gnu.org> | 2006-06-07 18:05:10 +0000 |
| commit | b883cdb2fefa8ea9c3b0d82eba7a9ee792f871bb (patch) | |
| tree | de3804210a8cd955e0d3b9abc15679480930bc82 /lib-src | |
| parent | 885b7d0991bd4b4b8f4bd1d3cd21c18a697bbce2 (diff) | |
| parent | 26c9afc3239e18b03537faaea33e3e82e28099e6 (diff) | |
Merge from emacs--devo--0
Patches applied:
* emacs--devo--0 (patch 285-296)
- Update from CVS
- Merge from gnus--rel--5.10
- Update from CVS: admin/FOR-RELEASE: Update refcard section.
* gnus--rel--5.10 (patch 102-104)
- Update from CVS
Revision: emacs@sv.gnu.org/emacs--unicode--0--patch-64
Diffstat (limited to 'lib-src')
| -rw-r--r-- | lib-src/ChangeLog | 33 | ||||
| -rw-r--r-- | lib-src/digest-doc.c | 11 | ||||
| -rw-r--r-- | lib-src/ebrowse.c | 22 | ||||
| -rw-r--r-- | lib-src/leditcfns.c | 21 | ||||
| -rw-r--r-- | lib-src/makefile.w32-in | 29 | ||||
| -rw-r--r-- | lib-src/pop.c | 9 | ||||
| -rw-r--r-- | lib-src/sorted-doc.c | 14 |
7 files changed, 100 insertions, 39 deletions
diff --git a/lib-src/ChangeLog b/lib-src/ChangeLog index 16c4e538939..557d8a2d492 100644 --- a/lib-src/ChangeLog +++ b/lib-src/ChangeLog @@ -1,3 +1,36 @@ +2006-06-04 Masatake YAMATO <jet@gyve.org> + + * ebrowse.c (main): Exit with EXIT_FAILURE if BROWSE file + doesn't exist, is not seekable, not is failed in ftall. + +2006-06-03 Eli Zaretskii <eliz@gnu.org> + + * makefile.w32-in (ALL): Add sorted-doc and digest-doc. + ($(BLD)/sorted-doc.exe, $(BLD)/digest-doc.exe) + ($(BLD)/test-distrib.exe): New targets. + (sorted-doc, digest-doc, test-distrib): New targets. + (install): Install sorted-doc.exe and digest-doc.exe. + ($(BLD)/sorted-doc.$(O)): Update dependencies. + + * digest-doc.c [DOS_NT] <top level>: Include fcntl.h and io.h. + (main) [DOS_NT]: Switch stdin to binary mode, if it is not a + terminal device. + + * sorted-doc.c [DOS_NT] <top level>: Include fcntl.h and io.h. + [WINDOWSNT] <top level>: Don't redeclare malloc. + (main) [DOS_NT]: Switch stdin to binary mode, if it is not a + terminal device. + (main): Initialize bp, to avoid compiler warnings + + * makefile.w32-in: Delete traces of leditcfns.c. + + * leditcfns.c: Remove file. + +2006-05-23 Francesco Potort,Al(B <pot@gnu.org> + + * pop.c (pop_open, socket_connection, KPOP_SERVICE): Added + comments explaining why the "kpop" service is never used. + 2006-05-13 Eli Zaretskii <eliz@gnu.org> * makefile.w32-in (lisp1): Add fringe.elc. diff --git a/lib-src/digest-doc.c b/lib-src/digest-doc.c index 7b5a9677e7c..7787d422e39 100644 --- a/lib-src/digest-doc.c +++ b/lib-src/digest-doc.c @@ -26,12 +26,23 @@ #include <stdio.h> +#ifdef DOS_NT +#include <fcntl.h> /* for O_BINARY */ +#include <io.h> /* for setmode */ +#endif + int main () { register int ch; register int notfirst = 0; +#ifdef DOS_NT + /* DOC is a binary file. */ + if (!isatty (fileno (stdin))) + setmode (fileno (stdin), O_BINARY); +#endif + printf (".TL\n"); printf ("Command Summary for GNU Emacs\n"); printf (".AU\nRichard M. Stallman\n"); diff --git a/lib-src/ebrowse.c b/lib-src/ebrowse.c index 94fa9114d23..398dd10896e 100644 --- a/lib-src/ebrowse.c +++ b/lib-src/ebrowse.c @@ -3909,17 +3909,31 @@ main (argc, argv) fp = fopen (out_filename, "r"); if (fp == NULL) - yyerror ("file `%s' must exist for --append", out_filename); + { + yyerror ("file `%s' must exist for --append", out_filename); + exit (EXIT_FAILURE); + } rc = fseek (fp, 0, SEEK_END); if (rc == -1) - yyerror ("error seeking in file `%s'", out_filename); + { + yyerror ("error seeking in file `%s'", out_filename); + exit (EXIT_FAILURE); + } rc = ftell (fp); if (rc == -1) - yyerror ("error getting size of file `%s'", out_filename); + { + yyerror ("error getting size of file `%s'", out_filename); + exit (EXIT_FAILURE); + } + else if (rc == 0) - yyerror ("file `%s' is empty", out_filename); + { + yyerror ("file `%s' is empty", out_filename); + /* It may be ok to use an empty file for appending. + exit (EXIT_FAILURE); */ + } fclose (fp); } diff --git a/lib-src/leditcfns.c b/lib-src/leditcfns.c deleted file mode 100644 index 239db1cd1fa..00000000000 --- a/lib-src/leditcfns.c +++ /dev/null @@ -1,21 +0,0 @@ -#include <sgtty.h> -#include <signal.h> -#define STRLEN 100 -static char str[STRLEN+1] = "%?emacs"; /* extra char for the null */ - -switch_to_proc(){ - char *ptr = str; - while (*ptr) ioctl(0, TIOCSTI, ptr++); - ioctl(0, TIOCSTI, "\n"); - kill(getpid(), SIGTSTP); - } - -set_proc_str(ptr) char *ptr; { - if (strlen(ptr) <= STRLEN) - strcpy(str, ptr); - else - printf("string too long for set-proc-str: %s\n", ptr); - } - -/* arch-tag: eb7ae804-0d6e-4077-ab42-7173821410c3 - (do not change this comment) */ diff --git a/lib-src/makefile.w32-in b/lib-src/makefile.w32-in index c145e47f197..f941e862514 100644 --- a/lib-src/makefile.w32-in +++ b/lib-src/makefile.w32-in @@ -20,7 +20,7 @@ # Boston, MA 02110-1301, USA. # -ALL = make-docfile hexl ctags etags movemail ebrowse +ALL = make-docfile hexl ctags etags movemail ebrowse sorted-doc digest-doc .PHONY: $(ALL) @@ -30,15 +30,10 @@ LOCAL_FLAGS = -DWINDOWSNT -DDOS_NT -DSTDC_HEADERS=1 -DNO_LDAV=1 \ # don't know what (if) to do with these yet... # -# $(BLD)/sorted-doc.exe \ -# $(BLD)/env.exe \ # $(BLD)/server.exe \ # $(BLD)/emacstool.exe \ -# $(BLD)/leditcfns.exe \ # $(BLD)/emacsclient.exe \ # $(BLD)/cvtmail.exe \ -# $(BLD)/digest-doc.exe \ -# $(BLD)/test-distrib.exe \ LIBS = $(BASE_LIBS) $(ADVAPI32) @@ -48,6 +43,12 @@ $(BLD)/hexl.exe: $(BLD)/hexl.$(O) $(LINK) $(LINK_OUT)$@ $(LINK_FLAGS) $(BLD)/hexl.$(O) $(LIBS) $(BLD)/fakemail.exe: $(BLD)/fakemail.$(O) $(BLD)/ntlib.$(O) $(LINK) $(LINK_OUT)$@ $(LINK_FLAGS) $(BLD)/fakemail.$(O) $(BLD)/ntlib.$(O) $(LIBS) +$(BLD)/sorted-doc.exe: $(BLD)/sorted-doc.$(O) + $(LINK) $(LINK_OUT)$@ $(LINK_FLAGS) $(BLD)/sorted-doc.$(O) $(LIBS) +$(BLD)/digest-doc.exe: $(BLD)/digest-doc.$(O) + $(LINK) $(LINK_OUT)$@ $(LINK_FLAGS) $(BLD)/digest-doc.$(O) $(LIBS) +$(BLD)/test-distrib.exe: $(BLD)/test-distrib.$(O) + $(LINK) $(LINK_OUT)$@ $(LINK_FLAGS) $(BLD)/test-distrib.$(O) $(LIBS) make-docfile: $(BLD) $(BLD)/make-docfile.exe ctags: $(BLD) $(BLD)/ctags.exe @@ -56,6 +57,11 @@ ebrowse: $(BLD) $(BLD)/ebrowse.exe hexl: $(BLD) $(BLD)/hexl.exe movemail: $(BLD) $(BLD)/movemail.exe fakemail: $(BLD) $(BLD)/fakemail.exe +sorted-doc: $(BLD) $(BLD)/sorted-doc.exe +digest-doc: $(BLD) $(BLD)/digest-doc.exe + +test-distrib: $(BLD) $(BLD)/test-distrib.exe + "$(BLD)/test-distrib.exe" "$(SRC)/testfile" GETOPTOBJS = $(BLD)/getopt.$(O) $(BLD)/getopt1.$(O) GETOPTDEPS = $(GETOPTOBJS) getopt.h @@ -114,15 +120,11 @@ $(BLD)/ctags.$(O): ctags.c # # don't know what to do with these yet... # -# $(BLD)/sorted-doc.exe: $(BLD)/sorted-doc.$(O) # $(BLD)/yow.exe: $(BLD)/yow.$(O) # $(BLD)/emacstool.exe: $(BLD)/emacstool.$(O) -# $(BLD)/leditcfns.exe: $(BLD)/leditcfns.$(O) # $(BLD)/server.exe: $(BLD)/server.$(O) # $(BLD)/cvtmail.exe: $(BLD)/cvtmail.$(O) -# $(BLD)/digest-doc.exe: $(BLD)/digest-doc.$(O) # $(BLD)/emacsclient.exe: $(BLD)/emacsclient.$(O) -# $(BLD)/test-distrib.exe: $(BLD)/test-distrib.$(O) # # From ..\src\Makefile.in @@ -283,6 +285,8 @@ install: $(INSTALL_FILES) $(CP) $(BLD)/ctags.exe $(INSTALL_DIR)/bin $(CP) $(BLD)/hexl.exe $(INSTALL_DIR)/bin $(CP) $(BLD)/movemail.exe $(INSTALL_DIR)/bin + $(CP) $(BLD)/sorted-doc.exe $(INSTALL_DIR)/bin + $(CP) $(BLD)/digest-doc.exe $(INSTALL_DIR)/bin - mkdir "$(INSTALL_DIR)/etc" $(CP) $(DOC) $(INSTALL_DIR)/etc @@ -438,7 +442,10 @@ $(BLD)/qsort.$(O) : \ $(SRC)/qsort.c $(BLD)/sorted-doc.$(O) : \ - $(SRC)/sorted-doc.c + $(SRC)/sorted-doc.c \ + $(EMACS_ROOT)/src/s/ms-w32.h \ + $(EMACS_ROOT)/src/m/intel386.h \ + $(EMACS_ROOT)/src/config.h \ $(BLD)/tcp.$(O) : \ $(SRC)/tcp.c diff --git a/lib-src/pop.c b/lib-src/pop.c index 7d6bcc5cdc9..5dcbf2d2483 100644 --- a/lib-src/pop.c +++ b/lib-src/pop.c @@ -135,7 +135,7 @@ static char *find_crlf __P((char *, int)); #define KPOP_PORT 1109 #define POP_SERVICE "pop3" /* we don't want the POP2 port! */ #ifdef KERBEROS -#define KPOP_SERVICE "kpop" +#define KPOP_SERVICE "kpop" /* never used: look for 20060515 to see why */ #endif char pop_error[ERROR_MAX]; @@ -264,10 +264,11 @@ pop_open (host, username, password, flags) return (0); } } - if (password) + if (password) /* always true, detected 20060515 */ flags |= POP_NO_KERBEROS; else - password = username; + password = username; /* dead code, detected 20060515 */ + /** "kpop" service is never used: look for 20060515 to see why **/ sock = socket_connection (host, flags); if (sock == -1) @@ -1047,6 +1048,7 @@ socket_connection (host, flags) bzero ((char *) &addr, sizeof (addr)); addr.sin_family = AF_INET; + /** "kpop" service is never used: look for 20060515 to see why **/ #ifdef KERBEROS service = (flags & POP_NO_KERBEROS) ? POP_SERVICE : KPOP_SERVICE; #else @@ -1073,6 +1075,7 @@ socket_connection (host, flags) } else { + /** "kpop" service is never used: look for 20060515 to see why **/ #ifdef KERBEROS addr.sin_port = htons ((flags & POP_NO_KERBEROS) ? POP_PORT : KPOP_PORT); diff --git a/lib-src/sorted-doc.c b/lib-src/sorted-doc.c index 0a06aa2c984..a8b2d441f9a 100644 --- a/lib-src/sorted-doc.c +++ b/lib-src/sorted-doc.c @@ -29,9 +29,15 @@ #include <stdio.h> #include <ctype.h> +#ifdef DOS_NT +#include <fcntl.h> /* for O_BINARY */ +#include <io.h> /* for setmode */ +#endif #ifndef HAVE_STDLIB_H /* config.h includes stdlib. */ +#ifndef WINDOWSNT /* src/s/ms-w32.h includes stdlib.h */ extern char *malloc (); #endif +#endif #define NUL '\0' #define MARKER '\037' @@ -134,6 +140,14 @@ main () DOCSTR *docs = NULL; /* chain of allocated DOCSTRS */ char buf[512]; /* line buffer */ +#ifdef DOS_NT + /* DOC is a binary file. */ + if (!isatty (fileno (stdin))) + setmode (fileno (stdin), O_BINARY); +#endif + + bp = buf; + while (1) /* process one char at a time */ { /* this char from the DOCSTR file */ |
