diff options
| author | Stefan Monnier | 2011-03-31 00:24:03 -0400 |
|---|---|---|
| committer | Stefan Monnier | 2011-03-31 00:24:03 -0400 |
| commit | 40d83b412f584cc02e68d4eac8fd5e6eb769e2fe (patch) | |
| tree | b56f27a7e6d75a8c1fd27b00179a27b5efea0a32 | |
| parent | f488fb6528738131ef41859e1f04125f2e50efce (diff) | |
| parent | 44f230aa043ebb222aa0876b44d70484d5dd38db (diff) | |
| download | emacs-40d83b412f584cc02e68d4eac8fd5e6eb769e2fe.tar.gz emacs-40d83b412f584cc02e68d4eac8fd5e6eb769e2fe.zip | |
Merge from trunk
170 files changed, 5695 insertions, 2650 deletions
diff --git a/.gitignore b/.gitignore index 57537b8a503..21702f7cd07 100644 --- a/.gitignore +++ b/.gitignore | |||
| @@ -1,3 +1,13 @@ | |||
| 1 | configure | ||
| 2 | aclocal.m4 | ||
| 3 | compile | ||
| 4 | config.guess | ||
| 5 | config.sub | ||
| 6 | depcomp | ||
| 7 | install-sh | ||
| 8 | missing | ||
| 9 | lib/Makefile.in | ||
| 10 | src/config.in | ||
| 1 | autom4te.cache | 11 | autom4te.cache |
| 2 | makefile | 12 | makefile |
| 3 | *~ | 13 | *~ |
| @@ -5,5 +15,3 @@ makefile | |||
| 5 | 15 | ||
| 6 | /bin/ | 16 | /bin/ |
| 7 | /site-lisp/ | 17 | /site-lisp/ |
| 8 | |||
| 9 | # arch-tag: 75cd3c50-1875-4814-8360-190f7de38302 | ||
| @@ -1,3 +1,71 @@ | |||
| 1 | 2011-03-28 Glenn Morris <rgm@gnu.org> | ||
| 2 | |||
| 3 | * autogen/update_autogen: Pass -f to autoreconf. | ||
| 4 | |||
| 5 | * autogen.sh (get_version): Discard "not found" lines. | ||
| 6 | (check_version): Respect $AUTOCONF etc environment variables. | ||
| 7 | |||
| 8 | 2011-03-27 Glenn Morris <rgm@gnu.org> | ||
| 9 | |||
| 10 | * configure.in (AC_TYPE_SIGNAL): Remove obsolete macro. | ||
| 11 | (AH_BOTTOM): Do not define SIGTYPE. | ||
| 12 | |||
| 13 | 2011-03-26 Glenn Morris <rgm@gnu.org> | ||
| 14 | |||
| 15 | * configure.in: Replace obsolete macros AC_TRY_COMPILE, AC_TRY_LINK, | ||
| 16 | AC_TRY_RUN with AC_COMPILE_IFELSE, AC_LINK_IFELSE, AC_RUN_IFELSE. | ||
| 17 | |||
| 18 | 2011-03-25 Andreas Schwab <schwab@linux-m68k.org> | ||
| 19 | |||
| 20 | * autogen/update_autogen: Remove useless function keyword. | ||
| 21 | |||
| 22 | 2011-03-25 Eli Zaretskii <eliz@gnu.org> | ||
| 23 | |||
| 24 | * config.bat: Generate src/config.h and lib/Makefile from | ||
| 25 | autogen/config.in and autogen/Makefile.in. | ||
| 26 | |||
| 27 | 2011-03-25 Glenn Morris <rgm@gnu.org> | ||
| 28 | |||
| 29 | * compile, config.guess, config.sub, depcomp, install-sh, missing: | ||
| 30 | Remove; autoreconf can supply them. | ||
| 31 | * Makefile.in (sync-from-gnulib): Don't sync config.sub, | ||
| 32 | config.guess, install-sh. Pass -i to autoreconf. | ||
| 33 | * autogen/update_autogen (genfiles): Add compile, config.guess, | ||
| 34 | config.sub, depcomp, install-sh, missing. Pass -i to autoreconf. | ||
| 35 | Discard non-error output from autoreconf in -q case. | ||
| 36 | * autogen/compile, autogen/config.guess, autogen/config.sub: | ||
| 37 | * autogen/depcomp, autogen/install-sh, autogen/missing: New. | ||
| 38 | * autogen/copy_autogen: Add compile, config.guess, config.sub, depcomp, | ||
| 39 | install-sh, missing. | ||
| 40 | |||
| 41 | 2011-03-23 Glenn Morris <rgm@gnu.org> | ||
| 42 | |||
| 43 | * autogen/update_autogen: Fix typo. | ||
| 44 | (msg): Remove function; use `exec' instead. | ||
| 45 | |||
| 46 | * Makefile.in (mkdir): Use `install-sh -d' instead of mkinstalldirs. | ||
| 47 | (sync-from-gnulib): Don't sync mkinstalldirs. | ||
| 48 | * make-dist: Don't distribute mkinstalldirs. | ||
| 49 | |||
| 50 | 2011-03-23 Paul Eggert <eggert@cs.ucla.edu> | ||
| 51 | |||
| 52 | Fix more problems found by GCC 4.5.2's static checks. | ||
| 53 | * Makefile.in (GNULIB_MODULES): Add socklen. | ||
| 54 | * configure.in: Do not check for sys/socket.h, since socklen does that. | ||
| 55 | * m4/socklen.m4: New automatically-generated file, from gnulib. | ||
| 56 | |||
| 57 | fakemail: Remove dependency on ignore-value. | ||
| 58 | * Makefile.in (GNULIB_MODULES): Add stdio. | ||
| 59 | * lib/stdio.in.h, m4/stdio_h.m4: New files, automatically | ||
| 60 | imported from gnulib. | ||
| 61 | * .bzrignore: Add lib/stdio.h. | ||
| 62 | |||
| 63 | 2011-03-22 Glenn Morris <rgm@gnu.org> | ||
| 64 | |||
| 65 | * autogen/copy_autogen: Work from ./ or ../. | ||
| 66 | Fix time-stamps. | ||
| 67 | * autogen.sh: Doc fix. | ||
| 68 | |||
| 1 | 2011-03-20 Glenn Morris <rgm@gnu.org> | 69 | 2011-03-20 Glenn Morris <rgm@gnu.org> |
| 2 | 70 | ||
| 3 | * autogen/: New directory, to be excluded from releases. | 71 | * autogen/: New directory, to be excluded from releases. |
diff --git a/INSTALL.BZR b/INSTALL.BZR index 3859e3cd4fc..93229ec7a79 100644 --- a/INSTALL.BZR +++ b/INSTALL.BZR | |||
| @@ -17,11 +17,11 @@ The `autogen.sh' script can help you figure out if you have the | |||
| 17 | necessary tools. | 17 | necessary tools. |
| 18 | 18 | ||
| 19 | The first time you build, there are a couple of extra steps. | 19 | The first time you build, there are a couple of extra steps. |
| 20 | First, generate the `configure' script: | 20 | First, generate the `configure' script and some related files: |
| 21 | 21 | ||
| 22 | $ ./autogen.sh | 22 | $ ./autogen.sh |
| 23 | 23 | ||
| 24 | (or you can just run `autoreconf -I m4'). | 24 | (or you can just run `autoreconf -i -I m4'). |
| 25 | 25 | ||
| 26 | You can then configure your build (use `./configure --help' to see | 26 | You can then configure your build (use `./configure --help' to see |
| 27 | options you can set): | 27 | options you can set): |
diff --git a/Makefile.in b/Makefile.in index 19267f82121..699589c6920 100644 --- a/Makefile.in +++ b/Makefile.in | |||
| @@ -332,7 +332,8 @@ DOS_gnulib_comp.m4 = gl-comp.m4 | |||
| 332 | # as per $(gnulib_srcdir)/DEPENDENCIES. | 332 | # as per $(gnulib_srcdir)/DEPENDENCIES. |
| 333 | GNULIB_MODULES = \ | 333 | GNULIB_MODULES = \ |
| 334 | crypto/md5 dtoastr filemode getloadavg getopt-gnu \ | 334 | crypto/md5 dtoastr filemode getloadavg getopt-gnu \ |
| 335 | ignore-value intprops lstat mktime readlink strftime symlink sys_stat | 335 | ignore-value intprops lstat mktime readlink \ |
| 336 | socklen stdio strftime symlink sys_stat | ||
| 336 | GNULIB_TOOL_FLAGS = \ | 337 | GNULIB_TOOL_FLAGS = \ |
| 337 | --import --no-changelog --no-vc-files --makefile-name=gnulib.mk | 338 | --import --no-changelog --no-vc-files --makefile-name=gnulib.mk |
| 338 | sync-from-gnulib: $(gnulib_srcdir) | 339 | sync-from-gnulib: $(gnulib_srcdir) |
| @@ -343,13 +344,9 @@ sync-from-gnulib: $(gnulib_srcdir) | |||
| 343 | cd $(srcdir)/m4 && mv gnulib-comp.m4 $(DOS_gnulib_comp.m4) | 344 | cd $(srcdir)/m4 && mv gnulib-comp.m4 $(DOS_gnulib_comp.m4) |
| 344 | cp $(gnulib_srcdir)/build-aux/texinfo.tex $(srcdir)/doc/misc | 345 | cp $(gnulib_srcdir)/build-aux/texinfo.tex $(srcdir)/doc/misc |
| 345 | cp \ | 346 | cp \ |
| 346 | $(gnulib_srcdir)/build-aux/config.sub \ | ||
| 347 | $(gnulib_srcdir)/build-aux/config.guess \ | ||
| 348 | $(gnulib_srcdir)/build-aux/install-sh \ | ||
| 349 | $(gnulib_srcdir)/build-aux/mkinstalldirs \ | ||
| 350 | $(gnulib_srcdir)/build-aux/move-if-change \ | 347 | $(gnulib_srcdir)/build-aux/move-if-change \ |
| 351 | $(srcdir) | 348 | $(srcdir) |
| 352 | cd $(srcdir) && autoreconf -I m4 | 349 | cd $(srcdir) && autoreconf -i -I m4 |
| 353 | .PHONY: sync-from-gnulib | 350 | .PHONY: sync-from-gnulib |
| 354 | 351 | ||
| 355 | # These targets should be "${SUBDIR} without `src'". | 352 | # These targets should be "${SUBDIR} without `src'". |
| @@ -677,7 +674,7 @@ install-strip: | |||
| 677 | 674 | ||
| 678 | ### Build all the directories we're going to install Emacs in. Since | 675 | ### Build all the directories we're going to install Emacs in. Since |
| 679 | ### we may be creating several layers of directories (for example, | 676 | ### we may be creating several layers of directories (for example, |
| 680 | ### /usr/local/lib/emacs/19.0/mips-dec-ultrix4.2), we use mkinstalldirs | 677 | ### /usr/local/lib/emacs/19.0/mips-dec-ultrix4.2), we use install-sh -d |
| 681 | ### instead of mkdir. Not all systems' mkdir programs have the `-p' flag. | 678 | ### instead of mkdir. Not all systems' mkdir programs have the `-p' flag. |
| 682 | ### We set the umask so that any created directories are world-readable. | 679 | ### We set the umask so that any created directories are world-readable. |
| 683 | ### FIXME it would be good to warn about non-standard permissions of | 680 | ### FIXME it would be good to warn about non-standard permissions of |
| @@ -691,7 +688,7 @@ mkdir: FRC | |||
| 691 | done ; \ | 688 | done ; \ |
| 692 | icondirs=`echo "$${icondirs}" | sed 's,$(srcdir)/etc/images/icons,$(DESTDIR)${icondir},g'` ; \ | 689 | icondirs=`echo "$${icondirs}" | sed 's,$(srcdir)/etc/images/icons,$(DESTDIR)${icondir},g'` ; \ |
| 693 | umask 022 ; \ | 690 | umask 022 ; \ |
| 694 | $(srcdir)/mkinstalldirs $(DESTDIR)${datadir} ${COPYDESTS} \ | 691 | $(srcdir)/install-sh -d $(DESTDIR)${datadir} ${COPYDESTS} \ |
| 695 | $(DESTDIR)${infodir} $(DESTDIR)${man1dir} \ | 692 | $(DESTDIR)${infodir} $(DESTDIR)${man1dir} \ |
| 696 | $(DESTDIR)${bindir} $(DESTDIR)${docdir} $(DESTDIR)${libexecdir} \ | 693 | $(DESTDIR)${bindir} $(DESTDIR)${docdir} $(DESTDIR)${libexecdir} \ |
| 697 | $(DESTDIR)${datadir}/emacs/site-lisp \ | 694 | $(DESTDIR)${datadir}/emacs/site-lisp \ |
diff --git a/admin/CPP-DEFINES b/admin/CPP-DEFINES index dae6202b4e4..7f6a18f7d54 100644 --- a/admin/CPP-DEFINES +++ b/admin/CPP-DEFINES | |||
| @@ -58,7 +58,6 @@ HAVE_TERMIOS | |||
| 58 | INTERRUPT_INPUT | 58 | INTERRUPT_INPUT |
| 59 | NARROWPROTO | 59 | NARROWPROTO |
| 60 | SEPCHAR | 60 | SEPCHAR |
| 61 | SIGTYPE | ||
| 62 | SYSTEM_TYPE | 61 | SYSTEM_TYPE |
| 63 | 62 | ||
| 64 | ** Machine specific macros, decribed in detail in src/m/template.h | 63 | ** Machine specific macros, decribed in detail in src/m/template.h |
| @@ -238,7 +237,6 @@ SIGNALS_VIA_CHARACTERS | |||
| 238 | SIGPIPE | 237 | SIGPIPE |
| 239 | SIGQUIT | 238 | SIGQUIT |
| 240 | SIGTRAP | 239 | SIGTRAP |
| 241 | SIGTYPE | ||
| 242 | SOLARIS2 | 240 | SOLARIS2 |
| 243 | STDC_HEADERS | 241 | STDC_HEADERS |
| 244 | SYSTEM_PURESIZE_EXTRA | 242 | SYSTEM_PURESIZE_EXTRA |
diff --git a/admin/make-tarball.txt b/admin/make-tarball.txt index 9c47d6e1fa2..1af20326543 100644 --- a/admin/make-tarball.txt +++ b/admin/make-tarball.txt | |||
| @@ -29,9 +29,12 @@ For each step, check for possible errors. | |||
| 29 | when preparing a major Emacs release, or branching for it.) | 29 | when preparing a major Emacs release, or branching for it.) |
| 30 | 30 | ||
| 31 | 5. Edit configure.in so that maintainer-mode is off by default. | 31 | 5. Edit configure.in so that maintainer-mode is off by default. |
| 32 | (FIXME - need to find a better way of dealing with this). | 32 | (FIXME - need to find a better way of dealing with this. |
| 33 | Or maybe it's fine and indeed correct to leave it on? | ||
| 34 | See http://lists.gnu.org/archive/html/emacs-devel/2011-03/msg00859.html | ||
| 35 | and subsequent.) | ||
| 33 | 36 | ||
| 34 | autoreconf -I m4 --force | 37 | autoreconf -i -I m4 --force |
| 35 | make bootstrap | 38 | make bootstrap |
| 36 | 39 | ||
| 37 | 6. Commit etc/AUTHORS, all the files changed by M-x set-version, and | 40 | 6. Commit etc/AUTHORS, all the files changed by M-x set-version, and |
diff --git a/admin/notes/bzr b/admin/notes/bzr index db9e6e0dcda..5600c9badb0 100644 --- a/admin/notes/bzr +++ b/admin/notes/bzr | |||
| @@ -65,23 +65,22 @@ removes a file, then remove the corresponding files by hand. | |||
| 65 | The following description uses bound branches, presumably it works in | 65 | The following description uses bound branches, presumably it works in |
| 66 | a similar way with unbound ones. | 66 | a similar way with unbound ones. |
| 67 | 67 | ||
| 68 | 0) (First time only) Get the bzr changelog_merge plugin: | 68 | 0) (First time only) Get the bzr changelog_merge plugin |
| 69 | (this will be included by default in bzr 2.4 onwards): | ||
| 69 | 70 | ||
| 70 | cd ~/.bazaar/plugins | 71 | cd ~/.bazaar/plugins |
| 71 | bzr branch lp:bzr-changelog-merge | 72 | # The following is an improved version of: lp:bzr-changelog-merge |
| 73 | bzr branch lp:~spiv/bzr-changelog-merge/non-head-edits-723968 | ||
| 72 | mv bzr-changelog-merge changelog_merge | 74 | mv bzr-changelog-merge changelog_merge |
| 73 | 75 | ||
| 74 | This will make merging ChangeLogs a lot smoother. It merges new | 76 | This should make merging ChangeLogs smoother. It merges new entries |
| 75 | entries to the top of the file, rather than trying to fit them in | 77 | to the top of the file, rather than trying to fit them in mid-way |
| 76 | mid-way through. | 78 | through. Newer versions of the plugin should also be able to deal |
| 79 | with changes to *old* ChangeLog entries, that should not be floated to | ||
| 80 | the head of the file (see launchpad#723968). | ||
| 77 | 81 | ||
| 78 | Sigh. This plugin has a drawback. People often like to edit older | 82 | Maybe the default Emacs behavior without this plugin is better, |
| 79 | ChangeLog entries, not at the head of the file. Frequently they do | 83 | though, it's not clear yet. |
| 80 | this in the same commit as making new entries. Using this plugin | ||
| 81 | will merge ALL changed entries (including older ones) to the top of | ||
| 82 | the destination file. | ||
| 83 | |||
| 84 | Maybe the default Emacs behavior without this plugin is better, I dunno. | ||
| 85 | 84 | ||
| 86 | 1) Get clean, up-to-date copies of the emacs-23 and trunk branches. | 85 | 1) Get clean, up-to-date copies of the emacs-23 and trunk branches. |
| 87 | Check for any uncommitted changes with bzr status. | 86 | Check for any uncommitted changes with bzr status. |
diff --git a/admin/notes/copyright b/admin/notes/copyright index 54d97adaf1c..39eb003a07d 100644 --- a/admin/notes/copyright +++ b/admin/notes/copyright | |||
| @@ -120,7 +120,10 @@ or even ChangeLogs, for older changes. People often installed changes | |||
| 120 | from others, without recording the true authorship. | 120 | from others, without recording the true authorship. |
| 121 | 121 | ||
| 122 | [For reference, most of these points were established via email with | 122 | [For reference, most of these points were established via email with |
| 123 | rms, 2007/1, "Copyright years".] | 123 | rms, 2007/1, "Copyright years". |
| 124 | |||
| 125 | In March 2011, information on some files no longer included was removed. | ||
| 126 | Consult older versions of this document if interested.] | ||
| 124 | 127 | ||
| 125 | 128 | ||
| 126 | lisp/version.el # emacs-copyright | 129 | lisp/version.el # emacs-copyright |
| @@ -143,20 +146,9 @@ lib/Makefile.in | |||
| 143 | install-sh | 146 | install-sh |
| 144 | - this file is copyright MIT, which is OK. Leave the copyright alone. | 147 | - this file is copyright MIT, which is OK. Leave the copyright alone. |
| 145 | 148 | ||
| 146 | mkinstalldirs | ||
| 147 | src/m/news-r6.h | ||
| 148 | public domain, leave alone. | ||
| 149 | |||
| 150 | etc/refcards/*.tex | 149 | etc/refcards/*.tex |
| 151 | also update the \def\year macro for the latest year. | 150 | also update the \def\year macro for the latest year. |
| 152 | 151 | ||
| 153 | etc/BABYL, ms-kermit | ||
| 154 | no notices (see below). | ||
| 155 | |||
| 156 | etc/emacs.csh | ||
| 157 | - written by Michael DeCorte, who has no assignment. But trivial | ||
| 158 | enough to not need license. | ||
| 159 | |||
| 160 | etc/future-bug | 152 | etc/future-bug |
| 161 | - doesn't need a humorless disclaimer, because Karl Fogel says we | 153 | - doesn't need a humorless disclaimer, because Karl Fogel says we |
| 162 | can consider it part of Emacs, and he has a blanker disclaimer for | 154 | can consider it part of Emacs, and he has a blanker disclaimer for |
| @@ -389,9 +381,9 @@ Makefile.in does now. | |||
| 389 | src/gmalloc.c | 381 | src/gmalloc.c |
| 390 | - contains numerous copyrights from the GNU C library. Leave them alone. | 382 | - contains numerous copyrights from the GNU C library. Leave them alone. |
| 391 | 383 | ||
| 392 | src/acldef.h, chpdef.h, ndir.h | 384 | src/ndir.h |
| 393 | - see comments below. These files are OK to be released with Emacs | 385 | - see comments below. This file is OK to be released with Emacs |
| 394 | 22, but we may want to revisit them afterwards. | 386 | 22, but we may want to revisit it afterwards. |
| 395 | 387 | ||
| 396 | 388 | ||
| 397 | ** Some notes on resolved issues, for historical information only | 389 | ** Some notes on resolved issues, for historical information only |
| @@ -402,15 +394,6 @@ which year, I can probably tell you which.) Either way, we have papers | |||
| 402 | for it." It was present in Emacs-16.56 (15-jul-85). rms: "Then I | 394 | for it." It was present in Emacs-16.56 (15-jul-85). rms: "Then I |
| 403 | conclude it was written by me." | 395 | conclude it was written by me." |
| 404 | 396 | ||
| 405 | etc/ulimit.hack | ||
| 406 | Very obsolete file removed March 2007. Doesn't say who the author | ||
| 407 | is, but web-search suggests Karl Kleinpaste, who has no Emacs | ||
| 408 | assignment. Trivial anyway. | ||
| 409 | http://groups.google.com/group/comp.unix.shell/browse_thread/thread/bf3df496994\ | ||
| 410 | 9f1df/7e5922c67b3a98fb | ||
| 411 | http://groups.google.com/group/comp.unix.questions/msg/cc7e49cacfd1ccb4 | ||
| 412 | (original 1987 source) | ||
| 413 | |||
| 414 | lisp/term/README | 397 | lisp/term/README |
| 415 | - had no copyright notice till Feb 2007. ChangeLog.3 suggests it was | 398 | - had no copyright notice till Feb 2007. ChangeLog.3 suggests it was |
| 416 | written by Eric Raymond. When asked by rms on 14 Feb 2007 he said: | 399 | written by Eric Raymond. When asked by rms on 14 Feb 2007 he said: |
| @@ -431,20 +414,6 @@ src/unexhp9k800.c | |||
| 431 | HP. So this file is public domain. | 414 | HP. So this file is public domain. |
| 432 | 415 | ||
| 433 | 416 | ||
| 434 | K Rodgers changes | ||
| 435 | It was pointed out that K Rodgers only had assigments for VC and | ||
| 436 | ps-print, but had changed several other files. We tried to contact | ||
| 437 | him for a general assignment, but he proved uncommunicative (despite | ||
| 438 | initially indicating to rms he would sign an assignment). As a result, his | ||
| 439 | changes were removed and/or rewritten independently. For details, see | ||
| 440 | threads: | ||
| 441 | http://lists.gnu.org/archive/html/emacs-devel/2007-04/msg00225.html | ||
| 442 | http://lists.gnu.org/archive/html/emacs-devel/2007-04/msg00257.html | ||
| 443 | |||
| 444 | But then an assignment arrived before the release of Emacs 22: | ||
| 445 | http://lists.gnu.org/archive/html/emacs-devel/2007-04/msg01427.html | ||
| 446 | |||
| 447 | |||
| 448 | lisp/progmodes/python.el | 417 | lisp/progmodes/python.el |
| 449 | Dave Love alerted us to a potential legal problem: | 418 | Dave Love alerted us to a potential legal problem: |
| 450 | http://lists.gnu.org/archive/html/emacs-pretest-bug/2007-04/msg00459.html | 419 | http://lists.gnu.org/archive/html/emacs-pretest-bug/2007-04/msg00459.html |
| @@ -460,14 +429,8 @@ http://lists.gnu.org/archive/html/emacs-devel/2007-05/msg00466.html | |||
| 460 | admin/check-doc-strings | 429 | admin/check-doc-strings |
| 461 | File says it's in the public domain, but that might not make it so. | 430 | File says it's in the public domain, but that might not make it so. |
| 462 | 431 | ||
| 463 | etc/BABYL | ||
| 464 | File written long ago by authors with no assignment. Keep them | ||
| 465 | without notices for now, try and contact authors if possible. Be | ||
| 466 | ready to remove these files if the authors ever object. | ||
| 467 | |||
| 468 | etc/ms-kermit | ||
| 469 | etc/e/eterm-color.ti | 432 | etc/e/eterm-color.ti |
| 470 | src/acldef.h, chpdef.h, ndir.h | 433 | src/ndir.h |
| 471 | On legal advice from Matt Norwood, the following comment was added | 434 | On legal advice from Matt Norwood, the following comment was added |
| 472 | to these files in Feb/Mar 2007: | 435 | to these files in Feb/Mar 2007: |
| 473 | 436 | ||
| @@ -480,25 +443,8 @@ src/acldef.h, chpdef.h, ndir.h | |||
| 480 | and possibly add a list of all authors who have changed these files. | 443 | and possibly add a list of all authors who have changed these files. |
| 481 | (details in email from Matt Norwood to rms, 2007/02/03). | 444 | (details in email from Matt Norwood to rms, 2007/02/03). |
| 482 | 445 | ||
| 483 | etc/ms-7bkermit | 446 | src/s/aix3-2.h, hpux8.h, hpux9.h, irix5-0.h, netbsd.h, usg5-4-2.h |
| 484 | Says it was written by Andy Lowry and Joel Spolsky. No entry for | 447 | [note some of these have since been merged into other files] |
| 485 | either in copyright.list. NB this file is not "constrained" like | ||
| 486 | ms-kermit (rms: "We know it isn't. A comment at the front says it has | ||
| 487 | other bindings which might be handy."). File removed March 2007. | ||
| 488 | Re-add if clear up status at some point. | ||
| 489 | |||
| 490 | etc/Xkeymap.txt | ||
| 491 | No info on author. File removed March 2007. rms: "It says it is | ||
| 492 | RLK's way of remapping his keyboard, so it is not constrained. I think | ||
| 493 | it was written by RLK. Let's delete it; if we contact RLK again, we | ||
| 494 | can put it back." Actually, RLK == Robert Krawitz has an Emacs | ||
| 495 | assignment. So this could be restored if it is still useful, but Jan Djärv | ||
| 496 | says it is obsolete: | ||
| 497 | <http://lists.gnu.org/archive/html/emacs-devel/2007-03/msg00673.html> | ||
| 498 | |||
| 499 | src/m/mips4.h, news-risc.h, pmax.h | ||
| 500 | src/s/aix3-2.h, bsd386.h, hpux8.h, hpux9.h, irix4-0.h, irix5-0.h, | ||
| 501 | netbsd.h, sol2-3.h, usg5-4-2.h | ||
| 502 | - all these (not obviously trivial) files were missing copyrights | 448 | - all these (not obviously trivial) files were missing copyrights |
| 503 | till Feb 2007, when FSF copyright was added. Matt Norwood advised: | 449 | till Feb 2007, when FSF copyright was added. Matt Norwood advised: |
| 504 | 450 | ||
| @@ -513,22 +459,6 @@ netbsd.h, sol2-3.h, usg5-4-2.h | |||
| 513 | 459 | ||
| 514 | Here is my (rgm) take on the details of the above files: | 460 | Here is my (rgm) take on the details of the above files: |
| 515 | 461 | ||
| 516 | mips4.h | ||
| 517 | might be trivial? started trivial, been added to in tiny changes by | ||
| 518 | those with FSF assignment, often result of email suggestions by others. | ||
| 519 | |||
| 520 | news-risc.h | ||
| 521 | started trivial. Grown by tiny additions, plus chunk | ||
| 522 | from mips.h, which was and is Copyright FSF | ||
| 523 | |||
| 524 | pmax.h | ||
| 525 | started trivial. grown in tiny changes, except for maybe Jim Wilson's | ||
| 526 | comment. | ||
| 527 | |||
| 528 | ? irix4-0.h | ||
| 529 | I would say started non-trivial (1992, rms). only tiny changes since | ||
| 530 | installed. | ||
| 531 | |||
| 532 | ? irix5-0.h | 462 | ? irix5-0.h |
| 533 | I would say started non-trivial (1993, jimb, heavily based | 463 | I would say started non-trivial (1993, jimb, heavily based |
| 534 | on irix4-0.h). A few borderline non-tiny changes since. | 464 | on irix4-0.h). A few borderline non-tiny changes since. |
| @@ -537,11 +467,7 @@ usg5-4-2.h | |||
| 537 | started non-trivial, but was heavily based on usg5-4.h, which was and is | 467 | started non-trivial, but was heavily based on usg5-4.h, which was and is |
| 538 | copyright FSF. only tiny changes since installed. | 468 | copyright FSF. only tiny changes since installed. |
| 539 | 469 | ||
| 540 | sol2-3.h | 470 | aix3-2.h, hpux8.h, hpux9.h, netbsd.h |
| 541 | started trivial. only non-tiny change (1994) incorporated code from | ||
| 542 | usg5-4.h, which was and is copyright FSF. | ||
| 543 | |||
| 544 | aix3-2.h, bsd386.h, hpux8.h, hpux9.h, netbsd.h | ||
| 545 | started trivial, grown in tiny changes. | 471 | started trivial, grown in tiny changes. |
| 546 | 472 | ||
| 547 | netbsd.h: | 473 | netbsd.h: |
| @@ -556,8 +482,8 @@ Someone might want to tweak the copyright years (for dates before | |||
| 556 | Note: erring on the side of caution, I also added notices to some | 482 | Note: erring on the side of caution, I also added notices to some |
| 557 | files I thought might be considered non-trivial (if one includes | 483 | files I thought might be considered non-trivial (if one includes |
| 558 | comment) in s/: | 484 | comment) in s/: |
| 559 | aix4-1.h hpux10.h irix6-0.h irix6-5.h | 485 | aix4-1.h hpux10.h irix6-5.h |
| 560 | ptx4.h sol2.h | 486 | sol2.h |
| 561 | 487 | ||
| 562 | (everything with > 30 non-blank lines, which at least is _some_ kind of | 488 | (everything with > 30 non-blank lines, which at least is _some_ kind of |
| 563 | system) | 489 | system) |
diff --git a/autogen.sh b/autogen.sh index a56b8d77826..d15817d0596 100755 --- a/autogen.sh +++ b/autogen.sh | |||
| @@ -30,6 +30,7 @@ | |||
| 30 | ### Code: | 30 | ### Code: |
| 31 | 31 | ||
| 32 | ## Tools we need: | 32 | ## Tools we need: |
| 33 | ## Note that we respect the values of AUTOCONF etc, like autoreconf does. | ||
| 33 | progs="autoconf automake" | 34 | progs="autoconf automake" |
| 34 | 35 | ||
| 35 | ## Minimum versions we need: | 36 | ## Minimum versions we need: |
| @@ -46,7 +47,8 @@ automake_min=1.11 | |||
| 46 | ## Also note that we do not handle micro versions. | 47 | ## Also note that we do not handle micro versions. |
| 47 | get_version () | 48 | get_version () |
| 48 | { | 49 | { |
| 49 | $1 --version 2>&1 | sed -n '1 s/.* \([1-9][0-9\.]*\).*/\1/p' | 50 | ## Remove eg "./autogen.sh: line 50: autoconf: command not found". |
| 51 | $1 --version 2>&1 | sed -e '/not found/d' -n -e '1 s/.* \([1-9][0-9\.]*\).*/\1/p' | ||
| 50 | } | 52 | } |
| 51 | 53 | ||
| 52 | ## $1 = version string, eg "2.59" | 54 | ## $1 = version string, eg "2.59" |
| @@ -71,7 +73,14 @@ minor_version () | |||
| 71 | ## Return 3 for unexpected error (eg failed to parse version). | 73 | ## Return 3 for unexpected error (eg failed to parse version). |
| 72 | check_version () | 74 | check_version () |
| 73 | { | 75 | { |
| 74 | have_version=`get_version $1` | 76 | ## Respect eg $AUTOMAKE if it is set, like autoreconf does. |
| 77 | uprog=`echo $1 | sed 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` | ||
| 78 | |||
| 79 | eval uprog=\$${uprog} | ||
| 80 | |||
| 81 | [ x"$uprog" = x ] && uprog=$1 | ||
| 82 | |||
| 83 | have_version=`get_version $uprog` | ||
| 75 | 84 | ||
| 76 | [ x"$have_version" = x ] && return 1 | 85 | [ x"$have_version" = x ] && return 1 |
| 77 | 86 | ||
| @@ -177,14 +186,14 @@ this script. | |||
| 177 | If you know that the required versions are in your PATH, but this | 186 | If you know that the required versions are in your PATH, but this |
| 178 | script has made an error, then you can simply run | 187 | script has made an error, then you can simply run |
| 179 | 188 | ||
| 180 | autoreconf -I m4 | 189 | autoreconf -i -I m4 |
| 181 | 190 | ||
| 182 | instead of this script. | 191 | instead of this script. |
| 183 | 192 | ||
| 184 | If all else fails, you can try using the pre-built versions of the | 193 | If all else fails, you can try using the pre-built versions of the |
| 185 | generated files by doing: | 194 | generated files by doing: |
| 186 | 195 | ||
| 187 | cd autogen && ./copy_autogen | 196 | ./autogen/copy_autogen |
| 188 | 197 | ||
| 189 | This is not recommended - see the comments in \`copy_autogen'. | 198 | This is not recommended - see the comments in \`copy_autogen'. |
| 190 | 199 | ||
| @@ -198,7 +207,7 @@ echo "Your system has the required tools, running autoreconf..." | |||
| 198 | 207 | ||
| 199 | 208 | ||
| 200 | ## Let autoreconf figure out what, if anything, needs doing. | 209 | ## Let autoreconf figure out what, if anything, needs doing. |
| 201 | autoreconf -I m4 || exit $? | 210 | autoreconf -i -I m4 || exit $? |
| 202 | 211 | ||
| 203 | echo "You can now run \`./configure'." | 212 | echo "You can now run \`./configure'." |
| 204 | 213 | ||
diff --git a/autogen/Makefile.in b/autogen/Makefile.in index 502b3dbb927..88be88ad08f 100644 --- a/autogen/Makefile.in +++ b/autogen/Makefile.in | |||
| @@ -24,7 +24,7 @@ | |||
| 24 | # the same distribution terms as the rest of that program. | 24 | # the same distribution terms as the rest of that program. |
| 25 | # | 25 | # |
| 26 | # Generated by gnulib-tool. | 26 | # Generated by gnulib-tool. |
| 27 | # Reproduce by: gnulib-tool --import --dir=. --lib=libgnu --source-base=lib --m4-base=m4 --doc-base=doc --tests-base=tests --aux-dir=. --makefile-name=gnulib.mk --no-libtool --macro-prefix=gl --no-vc-files crypto/md5 dtoastr filemode getloadavg getopt-gnu ignore-value intprops lstat mktime readlink strftime symlink sys_stat | 27 | # Reproduce by: gnulib-tool --import --dir=. --lib=libgnu --source-base=lib --m4-base=m4 --doc-base=doc --tests-base=tests --aux-dir=. --makefile-name=gnulib.mk --no-libtool --macro-prefix=gl --no-vc-files crypto/md5 dtoastr filemode getloadavg getopt-gnu ignore-value intprops lstat mktime readlink socklen stdio strftime symlink sys_stat |
| 28 | 28 | ||
| 29 | VPATH = @srcdir@ | 29 | VPATH = @srcdir@ |
| 30 | pkgdatadir = $(datadir)/@PACKAGE@ | 30 | pkgdatadir = $(datadir)/@PACKAGE@ |
| @@ -57,9 +57,10 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/00gnulib.m4 \ | |||
| 57 | $(top_srcdir)/m4/include_next.m4 $(top_srcdir)/m4/longlong.m4 \ | 57 | $(top_srcdir)/m4/include_next.m4 $(top_srcdir)/m4/longlong.m4 \ |
| 58 | $(top_srcdir)/m4/lstat.m4 $(top_srcdir)/m4/md5.m4 \ | 58 | $(top_srcdir)/m4/lstat.m4 $(top_srcdir)/m4/md5.m4 \ |
| 59 | $(top_srcdir)/m4/mktime.m4 $(top_srcdir)/m4/multiarch.m4 \ | 59 | $(top_srcdir)/m4/mktime.m4 $(top_srcdir)/m4/multiarch.m4 \ |
| 60 | $(top_srcdir)/m4/readlink.m4 $(top_srcdir)/m4/st_dm_mode.m4 \ | 60 | $(top_srcdir)/m4/readlink.m4 $(top_srcdir)/m4/socklen.m4 \ |
| 61 | $(top_srcdir)/m4/stat.m4 $(top_srcdir)/m4/stdbool.m4 \ | 61 | $(top_srcdir)/m4/st_dm_mode.m4 $(top_srcdir)/m4/stat.m4 \ |
| 62 | $(top_srcdir)/m4/stddef_h.m4 $(top_srcdir)/m4/stdint.m4 \ | 62 | $(top_srcdir)/m4/stdbool.m4 $(top_srcdir)/m4/stddef_h.m4 \ |
| 63 | $(top_srcdir)/m4/stdint.m4 $(top_srcdir)/m4/stdio_h.m4 \ | ||
| 63 | $(top_srcdir)/m4/stdlib_h.m4 $(top_srcdir)/m4/strftime.m4 \ | 64 | $(top_srcdir)/m4/stdlib_h.m4 $(top_srcdir)/m4/strftime.m4 \ |
| 64 | $(top_srcdir)/m4/symlink.m4 $(top_srcdir)/m4/sys_stat_h.m4 \ | 65 | $(top_srcdir)/m4/symlink.m4 $(top_srcdir)/m4/sys_stat_h.m4 \ |
| 65 | $(top_srcdir)/m4/time_h.m4 $(top_srcdir)/m4/time_r.m4 \ | 66 | $(top_srcdir)/m4/time_h.m4 $(top_srcdir)/m4/time_r.m4 \ |
| @@ -67,7 +68,7 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/00gnulib.m4 \ | |||
| 67 | $(top_srcdir)/m4/wchar_t.m4 $(top_srcdir)/configure.in | 68 | $(top_srcdir)/m4/wchar_t.m4 $(top_srcdir)/configure.in |
| 68 | am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ | 69 | am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ |
| 69 | $(ACLOCAL_M4) | 70 | $(ACLOCAL_M4) |
| 70 | mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs | 71 | mkinstalldirs = $(install_sh) -d |
| 71 | CONFIG_HEADER = $(top_builddir)/src/config.h | 72 | CONFIG_HEADER = $(top_builddir)/src/config.h |
| 72 | CONFIG_CLEAN_FILES = | 73 | CONFIG_CLEAN_FILES = |
| 73 | CONFIG_CLEAN_VPATH_FILES = | 74 | CONFIG_CLEAN_VPATH_FILES = |
| @@ -150,6 +151,7 @@ GNULIB_CALLOC_POSIX = @GNULIB_CALLOC_POSIX@ | |||
| 150 | GNULIB_CANONICALIZE_FILE_NAME = @GNULIB_CANONICALIZE_FILE_NAME@ | 151 | GNULIB_CANONICALIZE_FILE_NAME = @GNULIB_CANONICALIZE_FILE_NAME@ |
| 151 | GNULIB_CHOWN = @GNULIB_CHOWN@ | 152 | GNULIB_CHOWN = @GNULIB_CHOWN@ |
| 152 | GNULIB_CLOSE = @GNULIB_CLOSE@ | 153 | GNULIB_CLOSE = @GNULIB_CLOSE@ |
| 154 | GNULIB_DPRINTF = @GNULIB_DPRINTF@ | ||
| 153 | GNULIB_DUP2 = @GNULIB_DUP2@ | 155 | GNULIB_DUP2 = @GNULIB_DUP2@ |
| 154 | GNULIB_DUP3 = @GNULIB_DUP3@ | 156 | GNULIB_DUP3 = @GNULIB_DUP3@ |
| 155 | GNULIB_ENVIRON = @GNULIB_ENVIRON@ | 157 | GNULIB_ENVIRON = @GNULIB_ENVIRON@ |
| @@ -158,15 +160,31 @@ GNULIB_FACCESSAT = @GNULIB_FACCESSAT@ | |||
| 158 | GNULIB_FCHDIR = @GNULIB_FCHDIR@ | 160 | GNULIB_FCHDIR = @GNULIB_FCHDIR@ |
| 159 | GNULIB_FCHMODAT = @GNULIB_FCHMODAT@ | 161 | GNULIB_FCHMODAT = @GNULIB_FCHMODAT@ |
| 160 | GNULIB_FCHOWNAT = @GNULIB_FCHOWNAT@ | 162 | GNULIB_FCHOWNAT = @GNULIB_FCHOWNAT@ |
| 163 | GNULIB_FCLOSE = @GNULIB_FCLOSE@ | ||
| 164 | GNULIB_FFLUSH = @GNULIB_FFLUSH@ | ||
| 165 | GNULIB_FOPEN = @GNULIB_FOPEN@ | ||
| 166 | GNULIB_FPRINTF = @GNULIB_FPRINTF@ | ||
| 167 | GNULIB_FPRINTF_POSIX = @GNULIB_FPRINTF_POSIX@ | ||
| 168 | GNULIB_FPURGE = @GNULIB_FPURGE@ | ||
| 169 | GNULIB_FPUTC = @GNULIB_FPUTC@ | ||
| 170 | GNULIB_FPUTS = @GNULIB_FPUTS@ | ||
| 171 | GNULIB_FREOPEN = @GNULIB_FREOPEN@ | ||
| 172 | GNULIB_FSEEK = @GNULIB_FSEEK@ | ||
| 173 | GNULIB_FSEEKO = @GNULIB_FSEEKO@ | ||
| 161 | GNULIB_FSTATAT = @GNULIB_FSTATAT@ | 174 | GNULIB_FSTATAT = @GNULIB_FSTATAT@ |
| 162 | GNULIB_FSYNC = @GNULIB_FSYNC@ | 175 | GNULIB_FSYNC = @GNULIB_FSYNC@ |
| 176 | GNULIB_FTELL = @GNULIB_FTELL@ | ||
| 177 | GNULIB_FTELLO = @GNULIB_FTELLO@ | ||
| 163 | GNULIB_FTRUNCATE = @GNULIB_FTRUNCATE@ | 178 | GNULIB_FTRUNCATE = @GNULIB_FTRUNCATE@ |
| 164 | GNULIB_FUTIMENS = @GNULIB_FUTIMENS@ | 179 | GNULIB_FUTIMENS = @GNULIB_FUTIMENS@ |
| 180 | GNULIB_FWRITE = @GNULIB_FWRITE@ | ||
| 165 | GNULIB_GETCWD = @GNULIB_GETCWD@ | 181 | GNULIB_GETCWD = @GNULIB_GETCWD@ |
| 182 | GNULIB_GETDELIM = @GNULIB_GETDELIM@ | ||
| 166 | GNULIB_GETDOMAINNAME = @GNULIB_GETDOMAINNAME@ | 183 | GNULIB_GETDOMAINNAME = @GNULIB_GETDOMAINNAME@ |
| 167 | GNULIB_GETDTABLESIZE = @GNULIB_GETDTABLESIZE@ | 184 | GNULIB_GETDTABLESIZE = @GNULIB_GETDTABLESIZE@ |
| 168 | GNULIB_GETGROUPS = @GNULIB_GETGROUPS@ | 185 | GNULIB_GETGROUPS = @GNULIB_GETGROUPS@ |
| 169 | GNULIB_GETHOSTNAME = @GNULIB_GETHOSTNAME@ | 186 | GNULIB_GETHOSTNAME = @GNULIB_GETHOSTNAME@ |
| 187 | GNULIB_GETLINE = @GNULIB_GETLINE@ | ||
| 170 | GNULIB_GETLOADAVG = @GNULIB_GETLOADAVG@ | 188 | GNULIB_GETLOADAVG = @GNULIB_GETLOADAVG@ |
| 171 | GNULIB_GETLOGIN = @GNULIB_GETLOGIN@ | 189 | GNULIB_GETLOGIN = @GNULIB_GETLOGIN@ |
| 172 | GNULIB_GETLOGIN_R = @GNULIB_GETLOGIN_R@ | 190 | GNULIB_GETLOGIN_R = @GNULIB_GETLOGIN_R@ |
| @@ -194,22 +212,37 @@ GNULIB_MKSTEMP = @GNULIB_MKSTEMP@ | |||
| 194 | GNULIB_MKSTEMPS = @GNULIB_MKSTEMPS@ | 212 | GNULIB_MKSTEMPS = @GNULIB_MKSTEMPS@ |
| 195 | GNULIB_MKTIME = @GNULIB_MKTIME@ | 213 | GNULIB_MKTIME = @GNULIB_MKTIME@ |
| 196 | GNULIB_NANOSLEEP = @GNULIB_NANOSLEEP@ | 214 | GNULIB_NANOSLEEP = @GNULIB_NANOSLEEP@ |
| 215 | GNULIB_OBSTACK_PRINTF = @GNULIB_OBSTACK_PRINTF@ | ||
| 216 | GNULIB_OBSTACK_PRINTF_POSIX = @GNULIB_OBSTACK_PRINTF_POSIX@ | ||
| 217 | GNULIB_PERROR = @GNULIB_PERROR@ | ||
| 197 | GNULIB_PIPE = @GNULIB_PIPE@ | 218 | GNULIB_PIPE = @GNULIB_PIPE@ |
| 198 | GNULIB_PIPE2 = @GNULIB_PIPE2@ | 219 | GNULIB_PIPE2 = @GNULIB_PIPE2@ |
| 220 | GNULIB_POPEN = @GNULIB_POPEN@ | ||
| 199 | GNULIB_PREAD = @GNULIB_PREAD@ | 221 | GNULIB_PREAD = @GNULIB_PREAD@ |
| 222 | GNULIB_PRINTF = @GNULIB_PRINTF@ | ||
| 223 | GNULIB_PRINTF_POSIX = @GNULIB_PRINTF_POSIX@ | ||
| 200 | GNULIB_PTSNAME = @GNULIB_PTSNAME@ | 224 | GNULIB_PTSNAME = @GNULIB_PTSNAME@ |
| 225 | GNULIB_PUTC = @GNULIB_PUTC@ | ||
| 226 | GNULIB_PUTCHAR = @GNULIB_PUTCHAR@ | ||
| 201 | GNULIB_PUTENV = @GNULIB_PUTENV@ | 227 | GNULIB_PUTENV = @GNULIB_PUTENV@ |
| 228 | GNULIB_PUTS = @GNULIB_PUTS@ | ||
| 202 | GNULIB_PWRITE = @GNULIB_PWRITE@ | 229 | GNULIB_PWRITE = @GNULIB_PWRITE@ |
| 203 | GNULIB_RANDOM_R = @GNULIB_RANDOM_R@ | 230 | GNULIB_RANDOM_R = @GNULIB_RANDOM_R@ |
| 204 | GNULIB_READLINK = @GNULIB_READLINK@ | 231 | GNULIB_READLINK = @GNULIB_READLINK@ |
| 205 | GNULIB_READLINKAT = @GNULIB_READLINKAT@ | 232 | GNULIB_READLINKAT = @GNULIB_READLINKAT@ |
| 206 | GNULIB_REALLOC_POSIX = @GNULIB_REALLOC_POSIX@ | 233 | GNULIB_REALLOC_POSIX = @GNULIB_REALLOC_POSIX@ |
| 207 | GNULIB_REALPATH = @GNULIB_REALPATH@ | 234 | GNULIB_REALPATH = @GNULIB_REALPATH@ |
| 235 | GNULIB_REMOVE = @GNULIB_REMOVE@ | ||
| 236 | GNULIB_RENAME = @GNULIB_RENAME@ | ||
| 237 | GNULIB_RENAMEAT = @GNULIB_RENAMEAT@ | ||
| 208 | GNULIB_RMDIR = @GNULIB_RMDIR@ | 238 | GNULIB_RMDIR = @GNULIB_RMDIR@ |
| 209 | GNULIB_RPMATCH = @GNULIB_RPMATCH@ | 239 | GNULIB_RPMATCH = @GNULIB_RPMATCH@ |
| 210 | GNULIB_SETENV = @GNULIB_SETENV@ | 240 | GNULIB_SETENV = @GNULIB_SETENV@ |
| 211 | GNULIB_SLEEP = @GNULIB_SLEEP@ | 241 | GNULIB_SLEEP = @GNULIB_SLEEP@ |
| 242 | GNULIB_SNPRINTF = @GNULIB_SNPRINTF@ | ||
| 243 | GNULIB_SPRINTF_POSIX = @GNULIB_SPRINTF_POSIX@ | ||
| 212 | GNULIB_STAT = @GNULIB_STAT@ | 244 | GNULIB_STAT = @GNULIB_STAT@ |
| 245 | GNULIB_STDIO_H_SIGPIPE = @GNULIB_STDIO_H_SIGPIPE@ | ||
| 213 | GNULIB_STRPTIME = @GNULIB_STRPTIME@ | 246 | GNULIB_STRPTIME = @GNULIB_STRPTIME@ |
| 214 | GNULIB_STRTOD = @GNULIB_STRTOD@ | 247 | GNULIB_STRTOD = @GNULIB_STRTOD@ |
| 215 | GNULIB_STRTOLL = @GNULIB_STRTOLL@ | 248 | GNULIB_STRTOLL = @GNULIB_STRTOLL@ |
| @@ -219,6 +252,7 @@ GNULIB_SYMLINKAT = @GNULIB_SYMLINKAT@ | |||
| 219 | GNULIB_SYSTEM_POSIX = @GNULIB_SYSTEM_POSIX@ | 252 | GNULIB_SYSTEM_POSIX = @GNULIB_SYSTEM_POSIX@ |
| 220 | GNULIB_TIMEGM = @GNULIB_TIMEGM@ | 253 | GNULIB_TIMEGM = @GNULIB_TIMEGM@ |
| 221 | GNULIB_TIME_R = @GNULIB_TIME_R@ | 254 | GNULIB_TIME_R = @GNULIB_TIME_R@ |
| 255 | GNULIB_TMPFILE = @GNULIB_TMPFILE@ | ||
| 222 | GNULIB_TTYNAME_R = @GNULIB_TTYNAME_R@ | 256 | GNULIB_TTYNAME_R = @GNULIB_TTYNAME_R@ |
| 223 | GNULIB_UNISTD_H_GETOPT = @GNULIB_UNISTD_H_GETOPT@ | 257 | GNULIB_UNISTD_H_GETOPT = @GNULIB_UNISTD_H_GETOPT@ |
| 224 | GNULIB_UNISTD_H_SIGPIPE = @GNULIB_UNISTD_H_SIGPIPE@ | 258 | GNULIB_UNISTD_H_SIGPIPE = @GNULIB_UNISTD_H_SIGPIPE@ |
| @@ -228,6 +262,14 @@ GNULIB_UNLOCKPT = @GNULIB_UNLOCKPT@ | |||
| 228 | GNULIB_UNSETENV = @GNULIB_UNSETENV@ | 262 | GNULIB_UNSETENV = @GNULIB_UNSETENV@ |
| 229 | GNULIB_USLEEP = @GNULIB_USLEEP@ | 263 | GNULIB_USLEEP = @GNULIB_USLEEP@ |
| 230 | GNULIB_UTIMENSAT = @GNULIB_UTIMENSAT@ | 264 | GNULIB_UTIMENSAT = @GNULIB_UTIMENSAT@ |
| 265 | GNULIB_VASPRINTF = @GNULIB_VASPRINTF@ | ||
| 266 | GNULIB_VDPRINTF = @GNULIB_VDPRINTF@ | ||
| 267 | GNULIB_VFPRINTF = @GNULIB_VFPRINTF@ | ||
| 268 | GNULIB_VFPRINTF_POSIX = @GNULIB_VFPRINTF_POSIX@ | ||
| 269 | GNULIB_VPRINTF = @GNULIB_VPRINTF@ | ||
| 270 | GNULIB_VPRINTF_POSIX = @GNULIB_VPRINTF_POSIX@ | ||
| 271 | GNULIB_VSNPRINTF = @GNULIB_VSNPRINTF@ | ||
| 272 | GNULIB_VSPRINTF_POSIX = @GNULIB_VSPRINTF_POSIX@ | ||
| 231 | GNULIB_WCTOMB = @GNULIB_WCTOMB@ | 273 | GNULIB_WCTOMB = @GNULIB_WCTOMB@ |
| 232 | GNULIB_WRITE = @GNULIB_WRITE@ | 274 | GNULIB_WRITE = @GNULIB_WRITE@ |
| 233 | GNULIB__EXIT = @GNULIB__EXIT@ | 275 | GNULIB__EXIT = @GNULIB__EXIT@ |
| @@ -243,15 +285,24 @@ HAVE_CANONICALIZE_FILE_NAME = @HAVE_CANONICALIZE_FILE_NAME@ | |||
| 243 | HAVE_CHOWN = @HAVE_CHOWN@ | 285 | HAVE_CHOWN = @HAVE_CHOWN@ |
| 244 | HAVE_DECL_ENVIRON = @HAVE_DECL_ENVIRON@ | 286 | HAVE_DECL_ENVIRON = @HAVE_DECL_ENVIRON@ |
| 245 | HAVE_DECL_FCHDIR = @HAVE_DECL_FCHDIR@ | 287 | HAVE_DECL_FCHDIR = @HAVE_DECL_FCHDIR@ |
| 288 | HAVE_DECL_FPURGE = @HAVE_DECL_FPURGE@ | ||
| 289 | HAVE_DECL_FSEEKO = @HAVE_DECL_FSEEKO@ | ||
| 290 | HAVE_DECL_FTELLO = @HAVE_DECL_FTELLO@ | ||
| 291 | HAVE_DECL_GETDELIM = @HAVE_DECL_GETDELIM@ | ||
| 246 | HAVE_DECL_GETDOMAINNAME = @HAVE_DECL_GETDOMAINNAME@ | 292 | HAVE_DECL_GETDOMAINNAME = @HAVE_DECL_GETDOMAINNAME@ |
| 293 | HAVE_DECL_GETLINE = @HAVE_DECL_GETLINE@ | ||
| 247 | HAVE_DECL_GETLOADAVG = @HAVE_DECL_GETLOADAVG@ | 294 | HAVE_DECL_GETLOADAVG = @HAVE_DECL_GETLOADAVG@ |
| 248 | HAVE_DECL_GETLOGIN_R = @HAVE_DECL_GETLOGIN_R@ | 295 | HAVE_DECL_GETLOGIN_R = @HAVE_DECL_GETLOGIN_R@ |
| 249 | HAVE_DECL_GETPAGESIZE = @HAVE_DECL_GETPAGESIZE@ | 296 | HAVE_DECL_GETPAGESIZE = @HAVE_DECL_GETPAGESIZE@ |
| 250 | HAVE_DECL_GETUSERSHELL = @HAVE_DECL_GETUSERSHELL@ | 297 | HAVE_DECL_GETUSERSHELL = @HAVE_DECL_GETUSERSHELL@ |
| 251 | HAVE_DECL_LOCALTIME_R = @HAVE_DECL_LOCALTIME_R@ | 298 | HAVE_DECL_LOCALTIME_R = @HAVE_DECL_LOCALTIME_R@ |
| 299 | HAVE_DECL_OBSTACK_PRINTF = @HAVE_DECL_OBSTACK_PRINTF@ | ||
| 252 | HAVE_DECL_SETENV = @HAVE_DECL_SETENV@ | 300 | HAVE_DECL_SETENV = @HAVE_DECL_SETENV@ |
| 301 | HAVE_DECL_SNPRINTF = @HAVE_DECL_SNPRINTF@ | ||
| 253 | HAVE_DECL_TTYNAME_R = @HAVE_DECL_TTYNAME_R@ | 302 | HAVE_DECL_TTYNAME_R = @HAVE_DECL_TTYNAME_R@ |
| 254 | HAVE_DECL_UNSETENV = @HAVE_DECL_UNSETENV@ | 303 | HAVE_DECL_UNSETENV = @HAVE_DECL_UNSETENV@ |
| 304 | HAVE_DECL_VSNPRINTF = @HAVE_DECL_VSNPRINTF@ | ||
| 305 | HAVE_DPRINTF = @HAVE_DPRINTF@ | ||
| 255 | HAVE_DUP2 = @HAVE_DUP2@ | 306 | HAVE_DUP2 = @HAVE_DUP2@ |
| 256 | HAVE_DUP3 = @HAVE_DUP3@ | 307 | HAVE_DUP3 = @HAVE_DUP3@ |
| 257 | HAVE_EUIDACCESS = @HAVE_EUIDACCESS@ | 308 | HAVE_EUIDACCESS = @HAVE_EUIDACCESS@ |
| @@ -259,8 +310,10 @@ HAVE_FACCESSAT = @HAVE_FACCESSAT@ | |||
| 259 | HAVE_FCHDIR = @HAVE_FCHDIR@ | 310 | HAVE_FCHDIR = @HAVE_FCHDIR@ |
| 260 | HAVE_FCHMODAT = @HAVE_FCHMODAT@ | 311 | HAVE_FCHMODAT = @HAVE_FCHMODAT@ |
| 261 | HAVE_FCHOWNAT = @HAVE_FCHOWNAT@ | 312 | HAVE_FCHOWNAT = @HAVE_FCHOWNAT@ |
| 313 | HAVE_FSEEKO = @HAVE_FSEEKO@ | ||
| 262 | HAVE_FSTATAT = @HAVE_FSTATAT@ | 314 | HAVE_FSTATAT = @HAVE_FSTATAT@ |
| 263 | HAVE_FSYNC = @HAVE_FSYNC@ | 315 | HAVE_FSYNC = @HAVE_FSYNC@ |
| 316 | HAVE_FTELLO = @HAVE_FTELLO@ | ||
| 264 | HAVE_FTRUNCATE = @HAVE_FTRUNCATE@ | 317 | HAVE_FTRUNCATE = @HAVE_FTRUNCATE@ |
| 265 | HAVE_FUTIMENS = @HAVE_FUTIMENS@ | 318 | HAVE_FUTIMENS = @HAVE_FUTIMENS@ |
| 266 | HAVE_GETDTABLESIZE = @HAVE_GETDTABLESIZE@ | 319 | HAVE_GETDTABLESIZE = @HAVE_GETDTABLESIZE@ |
| @@ -301,6 +354,7 @@ HAVE_RANDOM_R = @HAVE_RANDOM_R@ | |||
| 301 | HAVE_READLINK = @HAVE_READLINK@ | 354 | HAVE_READLINK = @HAVE_READLINK@ |
| 302 | HAVE_READLINKAT = @HAVE_READLINKAT@ | 355 | HAVE_READLINKAT = @HAVE_READLINKAT@ |
| 303 | HAVE_REALPATH = @HAVE_REALPATH@ | 356 | HAVE_REALPATH = @HAVE_REALPATH@ |
| 357 | HAVE_RENAMEAT = @HAVE_RENAMEAT@ | ||
| 304 | HAVE_RPMATCH = @HAVE_RPMATCH@ | 358 | HAVE_RPMATCH = @HAVE_RPMATCH@ |
| 305 | HAVE_SETENV = @HAVE_SETENV@ | 359 | HAVE_SETENV = @HAVE_SETENV@ |
| 306 | HAVE_SIGNED_SIG_ATOMIC_T = @HAVE_SIGNED_SIG_ATOMIC_T@ | 360 | HAVE_SIGNED_SIG_ATOMIC_T = @HAVE_SIGNED_SIG_ATOMIC_T@ |
| @@ -327,6 +381,8 @@ HAVE_UNLOCKPT = @HAVE_UNLOCKPT@ | |||
| 327 | HAVE_UNSIGNED_LONG_LONG_INT = @HAVE_UNSIGNED_LONG_LONG_INT@ | 381 | HAVE_UNSIGNED_LONG_LONG_INT = @HAVE_UNSIGNED_LONG_LONG_INT@ |
| 328 | HAVE_USLEEP = @HAVE_USLEEP@ | 382 | HAVE_USLEEP = @HAVE_USLEEP@ |
| 329 | HAVE_UTIMENSAT = @HAVE_UTIMENSAT@ | 383 | HAVE_UTIMENSAT = @HAVE_UTIMENSAT@ |
| 384 | HAVE_VASPRINTF = @HAVE_VASPRINTF@ | ||
| 385 | HAVE_VDPRINTF = @HAVE_VDPRINTF@ | ||
| 330 | HAVE_WCHAR_H = @HAVE_WCHAR_H@ | 386 | HAVE_WCHAR_H = @HAVE_WCHAR_H@ |
| 331 | HAVE_WCHAR_T = @HAVE_WCHAR_T@ | 387 | HAVE_WCHAR_T = @HAVE_WCHAR_T@ |
| 332 | HAVE_XSERVER = @HAVE_XSERVER@ | 388 | HAVE_XSERVER = @HAVE_XSERVER@ |
| @@ -397,6 +453,7 @@ M_FILE = @M_FILE@ | |||
| 397 | NEXT_AS_FIRST_DIRECTIVE_GETOPT_H = @NEXT_AS_FIRST_DIRECTIVE_GETOPT_H@ | 453 | NEXT_AS_FIRST_DIRECTIVE_GETOPT_H = @NEXT_AS_FIRST_DIRECTIVE_GETOPT_H@ |
| 398 | NEXT_AS_FIRST_DIRECTIVE_STDDEF_H = @NEXT_AS_FIRST_DIRECTIVE_STDDEF_H@ | 454 | NEXT_AS_FIRST_DIRECTIVE_STDDEF_H = @NEXT_AS_FIRST_DIRECTIVE_STDDEF_H@ |
| 399 | NEXT_AS_FIRST_DIRECTIVE_STDINT_H = @NEXT_AS_FIRST_DIRECTIVE_STDINT_H@ | 455 | NEXT_AS_FIRST_DIRECTIVE_STDINT_H = @NEXT_AS_FIRST_DIRECTIVE_STDINT_H@ |
| 456 | NEXT_AS_FIRST_DIRECTIVE_STDIO_H = @NEXT_AS_FIRST_DIRECTIVE_STDIO_H@ | ||
| 400 | NEXT_AS_FIRST_DIRECTIVE_STDLIB_H = @NEXT_AS_FIRST_DIRECTIVE_STDLIB_H@ | 457 | NEXT_AS_FIRST_DIRECTIVE_STDLIB_H = @NEXT_AS_FIRST_DIRECTIVE_STDLIB_H@ |
| 401 | NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H@ | 458 | NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H@ |
| 402 | NEXT_AS_FIRST_DIRECTIVE_TIME_H = @NEXT_AS_FIRST_DIRECTIVE_TIME_H@ | 459 | NEXT_AS_FIRST_DIRECTIVE_TIME_H = @NEXT_AS_FIRST_DIRECTIVE_TIME_H@ |
| @@ -404,6 +461,7 @@ NEXT_AS_FIRST_DIRECTIVE_UNISTD_H = @NEXT_AS_FIRST_DIRECTIVE_UNISTD_H@ | |||
| 404 | NEXT_GETOPT_H = @NEXT_GETOPT_H@ | 461 | NEXT_GETOPT_H = @NEXT_GETOPT_H@ |
| 405 | NEXT_STDDEF_H = @NEXT_STDDEF_H@ | 462 | NEXT_STDDEF_H = @NEXT_STDDEF_H@ |
| 406 | NEXT_STDINT_H = @NEXT_STDINT_H@ | 463 | NEXT_STDINT_H = @NEXT_STDINT_H@ |
| 464 | NEXT_STDIO_H = @NEXT_STDIO_H@ | ||
| 407 | NEXT_STDLIB_H = @NEXT_STDLIB_H@ | 465 | NEXT_STDLIB_H = @NEXT_STDLIB_H@ |
| 408 | NEXT_SYS_STAT_H = @NEXT_SYS_STAT_H@ | 466 | NEXT_SYS_STAT_H = @NEXT_SYS_STAT_H@ |
| 409 | NEXT_TIME_H = @NEXT_TIME_H@ | 467 | NEXT_TIME_H = @NEXT_TIME_H@ |
| @@ -438,15 +496,28 @@ REPLACE_CALLOC = @REPLACE_CALLOC@ | |||
| 438 | REPLACE_CANONICALIZE_FILE_NAME = @REPLACE_CANONICALIZE_FILE_NAME@ | 496 | REPLACE_CANONICALIZE_FILE_NAME = @REPLACE_CANONICALIZE_FILE_NAME@ |
| 439 | REPLACE_CHOWN = @REPLACE_CHOWN@ | 497 | REPLACE_CHOWN = @REPLACE_CHOWN@ |
| 440 | REPLACE_CLOSE = @REPLACE_CLOSE@ | 498 | REPLACE_CLOSE = @REPLACE_CLOSE@ |
| 499 | REPLACE_DPRINTF = @REPLACE_DPRINTF@ | ||
| 441 | REPLACE_DUP = @REPLACE_DUP@ | 500 | REPLACE_DUP = @REPLACE_DUP@ |
| 442 | REPLACE_DUP2 = @REPLACE_DUP2@ | 501 | REPLACE_DUP2 = @REPLACE_DUP2@ |
| 443 | REPLACE_FCHOWNAT = @REPLACE_FCHOWNAT@ | 502 | REPLACE_FCHOWNAT = @REPLACE_FCHOWNAT@ |
| 503 | REPLACE_FCLOSE = @REPLACE_FCLOSE@ | ||
| 504 | REPLACE_FFLUSH = @REPLACE_FFLUSH@ | ||
| 505 | REPLACE_FOPEN = @REPLACE_FOPEN@ | ||
| 506 | REPLACE_FPRINTF = @REPLACE_FPRINTF@ | ||
| 507 | REPLACE_FPURGE = @REPLACE_FPURGE@ | ||
| 508 | REPLACE_FREOPEN = @REPLACE_FREOPEN@ | ||
| 509 | REPLACE_FSEEK = @REPLACE_FSEEK@ | ||
| 510 | REPLACE_FSEEKO = @REPLACE_FSEEKO@ | ||
| 444 | REPLACE_FSTAT = @REPLACE_FSTAT@ | 511 | REPLACE_FSTAT = @REPLACE_FSTAT@ |
| 445 | REPLACE_FSTATAT = @REPLACE_FSTATAT@ | 512 | REPLACE_FSTATAT = @REPLACE_FSTATAT@ |
| 513 | REPLACE_FTELL = @REPLACE_FTELL@ | ||
| 514 | REPLACE_FTELLO = @REPLACE_FTELLO@ | ||
| 446 | REPLACE_FUTIMENS = @REPLACE_FUTIMENS@ | 515 | REPLACE_FUTIMENS = @REPLACE_FUTIMENS@ |
| 447 | REPLACE_GETCWD = @REPLACE_GETCWD@ | 516 | REPLACE_GETCWD = @REPLACE_GETCWD@ |
| 517 | REPLACE_GETDELIM = @REPLACE_GETDELIM@ | ||
| 448 | REPLACE_GETDOMAINNAME = @REPLACE_GETDOMAINNAME@ | 518 | REPLACE_GETDOMAINNAME = @REPLACE_GETDOMAINNAME@ |
| 449 | REPLACE_GETGROUPS = @REPLACE_GETGROUPS@ | 519 | REPLACE_GETGROUPS = @REPLACE_GETGROUPS@ |
| 520 | REPLACE_GETLINE = @REPLACE_GETLINE@ | ||
| 450 | REPLACE_GETLOGIN_R = @REPLACE_GETLOGIN_R@ | 521 | REPLACE_GETLOGIN_R = @REPLACE_GETLOGIN_R@ |
| 451 | REPLACE_GETPAGESIZE = @REPLACE_GETPAGESIZE@ | 522 | REPLACE_GETPAGESIZE = @REPLACE_GETPAGESIZE@ |
| 452 | REPLACE_LCHOWN = @REPLACE_LCHOWN@ | 523 | REPLACE_LCHOWN = @REPLACE_LCHOWN@ |
| @@ -464,25 +535,42 @@ REPLACE_MKSTEMP = @REPLACE_MKSTEMP@ | |||
| 464 | REPLACE_MKTIME = @REPLACE_MKTIME@ | 535 | REPLACE_MKTIME = @REPLACE_MKTIME@ |
| 465 | REPLACE_NANOSLEEP = @REPLACE_NANOSLEEP@ | 536 | REPLACE_NANOSLEEP = @REPLACE_NANOSLEEP@ |
| 466 | REPLACE_NULL = @REPLACE_NULL@ | 537 | REPLACE_NULL = @REPLACE_NULL@ |
| 538 | REPLACE_OBSTACK_PRINTF = @REPLACE_OBSTACK_PRINTF@ | ||
| 539 | REPLACE_PERROR = @REPLACE_PERROR@ | ||
| 540 | REPLACE_POPEN = @REPLACE_POPEN@ | ||
| 467 | REPLACE_PREAD = @REPLACE_PREAD@ | 541 | REPLACE_PREAD = @REPLACE_PREAD@ |
| 542 | REPLACE_PRINTF = @REPLACE_PRINTF@ | ||
| 468 | REPLACE_PUTENV = @REPLACE_PUTENV@ | 543 | REPLACE_PUTENV = @REPLACE_PUTENV@ |
| 469 | REPLACE_PWRITE = @REPLACE_PWRITE@ | 544 | REPLACE_PWRITE = @REPLACE_PWRITE@ |
| 470 | REPLACE_READLINK = @REPLACE_READLINK@ | 545 | REPLACE_READLINK = @REPLACE_READLINK@ |
| 471 | REPLACE_REALLOC = @REPLACE_REALLOC@ | 546 | REPLACE_REALLOC = @REPLACE_REALLOC@ |
| 472 | REPLACE_REALPATH = @REPLACE_REALPATH@ | 547 | REPLACE_REALPATH = @REPLACE_REALPATH@ |
| 548 | REPLACE_REMOVE = @REPLACE_REMOVE@ | ||
| 549 | REPLACE_RENAME = @REPLACE_RENAME@ | ||
| 550 | REPLACE_RENAMEAT = @REPLACE_RENAMEAT@ | ||
| 473 | REPLACE_RMDIR = @REPLACE_RMDIR@ | 551 | REPLACE_RMDIR = @REPLACE_RMDIR@ |
| 474 | REPLACE_SETENV = @REPLACE_SETENV@ | 552 | REPLACE_SETENV = @REPLACE_SETENV@ |
| 475 | REPLACE_SLEEP = @REPLACE_SLEEP@ | 553 | REPLACE_SLEEP = @REPLACE_SLEEP@ |
| 554 | REPLACE_SNPRINTF = @REPLACE_SNPRINTF@ | ||
| 555 | REPLACE_SPRINTF = @REPLACE_SPRINTF@ | ||
| 476 | REPLACE_STAT = @REPLACE_STAT@ | 556 | REPLACE_STAT = @REPLACE_STAT@ |
| 557 | REPLACE_STDIO_WRITE_FUNCS = @REPLACE_STDIO_WRITE_FUNCS@ | ||
| 477 | REPLACE_STRTOD = @REPLACE_STRTOD@ | 558 | REPLACE_STRTOD = @REPLACE_STRTOD@ |
| 478 | REPLACE_SYMLINK = @REPLACE_SYMLINK@ | 559 | REPLACE_SYMLINK = @REPLACE_SYMLINK@ |
| 479 | REPLACE_TIMEGM = @REPLACE_TIMEGM@ | 560 | REPLACE_TIMEGM = @REPLACE_TIMEGM@ |
| 561 | REPLACE_TMPFILE = @REPLACE_TMPFILE@ | ||
| 480 | REPLACE_TTYNAME_R = @REPLACE_TTYNAME_R@ | 562 | REPLACE_TTYNAME_R = @REPLACE_TTYNAME_R@ |
| 481 | REPLACE_UNLINK = @REPLACE_UNLINK@ | 563 | REPLACE_UNLINK = @REPLACE_UNLINK@ |
| 482 | REPLACE_UNLINKAT = @REPLACE_UNLINKAT@ | 564 | REPLACE_UNLINKAT = @REPLACE_UNLINKAT@ |
| 483 | REPLACE_UNSETENV = @REPLACE_UNSETENV@ | 565 | REPLACE_UNSETENV = @REPLACE_UNSETENV@ |
| 484 | REPLACE_USLEEP = @REPLACE_USLEEP@ | 566 | REPLACE_USLEEP = @REPLACE_USLEEP@ |
| 485 | REPLACE_UTIMENSAT = @REPLACE_UTIMENSAT@ | 567 | REPLACE_UTIMENSAT = @REPLACE_UTIMENSAT@ |
| 568 | REPLACE_VASPRINTF = @REPLACE_VASPRINTF@ | ||
| 569 | REPLACE_VDPRINTF = @REPLACE_VDPRINTF@ | ||
| 570 | REPLACE_VFPRINTF = @REPLACE_VFPRINTF@ | ||
| 571 | REPLACE_VPRINTF = @REPLACE_VPRINTF@ | ||
| 572 | REPLACE_VSNPRINTF = @REPLACE_VSNPRINTF@ | ||
| 573 | REPLACE_VSPRINTF = @REPLACE_VSPRINTF@ | ||
| 486 | REPLACE_WCTOMB = @REPLACE_WCTOMB@ | 574 | REPLACE_WCTOMB = @REPLACE_WCTOMB@ |
| 487 | REPLACE_WRITE = @REPLACE_WRITE@ | 575 | REPLACE_WRITE = @REPLACE_WRITE@ |
| 488 | RSVG_CFLAGS = @RSVG_CFLAGS@ | 576 | RSVG_CFLAGS = @RSVG_CFLAGS@ |
| @@ -601,21 +689,22 @@ x_default_search_path = @x_default_search_path@ | |||
| 601 | # present in all Makefile.am that need it. This is ensured by the applicability | 689 | # present in all Makefile.am that need it. This is ensured by the applicability |
| 602 | # 'all' defined above. | 690 | # 'all' defined above. |
| 603 | BUILT_SOURCES = arg-nonnull.h c++defs.h $(GETOPT_H) $(STDBOOL_H) \ | 691 | BUILT_SOURCES = arg-nonnull.h c++defs.h $(GETOPT_H) $(STDBOOL_H) \ |
| 604 | $(STDDEF_H) $(STDINT_H) stdlib.h sys/stat.h time.h unistd.h \ | 692 | $(STDDEF_H) $(STDINT_H) stdio.h stdlib.h sys/stat.h time.h \ |
| 605 | warn-on-use.h | 693 | unistd.h warn-on-use.h |
| 606 | EXTRA_DIST = $(top_srcdir)/./arg-nonnull.h $(top_srcdir)/./c++defs.h \ | 694 | EXTRA_DIST = $(top_srcdir)/./arg-nonnull.h $(top_srcdir)/./c++defs.h \ |
| 607 | md5.c md5.h dosname.h ftoastr.c ftoastr.h filemode.c \ | 695 | md5.c md5.h dosname.h ftoastr.c ftoastr.h filemode.c \ |
| 608 | filemode.h getloadavg.c getopt.c getopt.in.h getopt1.c \ | 696 | filemode.h getloadavg.c getopt.c getopt.in.h getopt1.c \ |
| 609 | getopt_int.h intprops.h lstat.c mktime-internal.h mktime.c \ | 697 | getopt_int.h intprops.h lstat.c mktime-internal.h mktime.c \ |
| 610 | readlink.c stat.c stdbool.in.h stddef.in.h stdint.in.h \ | 698 | readlink.c stat.c stdbool.in.h stddef.in.h stdint.in.h \ |
| 611 | stdlib.in.h strftime.c strftime.h symlink.c sys_stat.in.h \ | 699 | stdio.in.h stdlib.in.h strftime.c strftime.h symlink.c \ |
| 612 | time.in.h time_r.c unistd.in.h $(top_srcdir)/./warn-on-use.h | 700 | sys_stat.in.h time.in.h time_r.c unistd.in.h \ |
| 701 | $(top_srcdir)/./warn-on-use.h | ||
| 613 | MOSTLYCLEANDIRS = sys | 702 | MOSTLYCLEANDIRS = sys |
| 614 | MOSTLYCLEANFILES = core *.stackdump arg-nonnull.h arg-nonnull.h-t \ | 703 | MOSTLYCLEANFILES = core *.stackdump arg-nonnull.h arg-nonnull.h-t \ |
| 615 | c++defs.h c++defs.h-t getopt.h getopt.h-t stdbool.h \ | 704 | c++defs.h c++defs.h-t getopt.h getopt.h-t stdbool.h \ |
| 616 | stdbool.h-t stddef.h stddef.h-t stdint.h stdint.h-t stdlib.h \ | 705 | stdbool.h-t stddef.h stddef.h-t stdint.h stdint.h-t stdio.h \ |
| 617 | stdlib.h-t sys/stat.h sys/stat.h-t time.h time.h-t unistd.h \ | 706 | stdio.h-t stdlib.h stdlib.h-t sys/stat.h sys/stat.h-t time.h \ |
| 618 | unistd.h-t warn-on-use.h warn-on-use.h-t | 707 | time.h-t unistd.h unistd.h-t warn-on-use.h warn-on-use.h-t |
| 619 | noinst_LIBRARIES = libgnu.a | 708 | noinst_LIBRARIES = libgnu.a |
| 620 | DEFAULT_INCLUDES = -I. -I../src -I$(top_srcdir)/src | 709 | DEFAULT_INCLUDES = -I. -I../src -I$(top_srcdir)/src |
| 621 | libgnu_a_SOURCES = dtoastr.c gettext.h ignore-value.h | 710 | libgnu_a_SOURCES = dtoastr.c gettext.h ignore-value.h |
| @@ -996,6 +1085,108 @@ stdint.h: stdint.in.h | |||
| 996 | } > $@-t && \ | 1085 | } > $@-t && \ |
| 997 | mv $@-t $@ | 1086 | mv $@-t $@ |
| 998 | 1087 | ||
| 1088 | # We need the following in order to create <stdio.h> when the system | ||
| 1089 | # doesn't have one that works with the given compiler. | ||
| 1090 | stdio.h: stdio.in.h $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H) | ||
| 1091 | $(AM_V_GEN)rm -f $@-t $@ && \ | ||
| 1092 | { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \ | ||
| 1093 | sed -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ | ||
| 1094 | -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ | ||
| 1095 | -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ | ||
| 1096 | -e 's|@''NEXT_STDIO_H''@|$(NEXT_STDIO_H)|g' \ | ||
| 1097 | -e 's|@''GNULIB_DPRINTF''@|$(GNULIB_DPRINTF)|g' \ | ||
| 1098 | -e 's|@''GNULIB_FCLOSE''@|$(GNULIB_FCLOSE)|g' \ | ||
| 1099 | -e 's|@''GNULIB_FFLUSH''@|$(GNULIB_FFLUSH)|g' \ | ||
| 1100 | -e 's|@''GNULIB_FOPEN''@|$(GNULIB_FOPEN)|g' \ | ||
| 1101 | -e 's|@''GNULIB_FPRINTF''@|$(GNULIB_FPRINTF)|g' \ | ||
| 1102 | -e 's|@''GNULIB_FPRINTF_POSIX''@|$(GNULIB_FPRINTF_POSIX)|g' \ | ||
| 1103 | -e 's|@''GNULIB_FPURGE''@|$(GNULIB_FPURGE)|g' \ | ||
| 1104 | -e 's|@''GNULIB_FPUTC''@|$(GNULIB_FPUTC)|g' \ | ||
| 1105 | -e 's|@''GNULIB_FPUTS''@|$(GNULIB_FPUTS)|g' \ | ||
| 1106 | -e 's|@''GNULIB_FREOPEN''@|$(GNULIB_FREOPEN)|g' \ | ||
| 1107 | -e 's|@''GNULIB_FSEEK''@|$(GNULIB_FSEEK)|g' \ | ||
| 1108 | -e 's|@''GNULIB_FSEEKO''@|$(GNULIB_FSEEKO)|g' \ | ||
| 1109 | -e 's|@''GNULIB_FTELL''@|$(GNULIB_FTELL)|g' \ | ||
| 1110 | -e 's|@''GNULIB_FTELLO''@|$(GNULIB_FTELLO)|g' \ | ||
| 1111 | -e 's|@''GNULIB_FWRITE''@|$(GNULIB_FWRITE)|g' \ | ||
| 1112 | -e 's|@''GNULIB_GETDELIM''@|$(GNULIB_GETDELIM)|g' \ | ||
| 1113 | -e 's|@''GNULIB_GETLINE''@|$(GNULIB_GETLINE)|g' \ | ||
| 1114 | -e 's|@''GNULIB_OBSTACK_PRINTF''@|$(GNULIB_OBSTACK_PRINTF)|g' \ | ||
| 1115 | -e 's|@''GNULIB_OBSTACK_PRINTF_POSIX''@|$(GNULIB_OBSTACK_PRINTF_POSIX)|g' \ | ||
| 1116 | -e 's|@''GNULIB_PERROR''@|$(GNULIB_PERROR)|g' \ | ||
| 1117 | -e 's|@''GNULIB_POPEN''@|$(GNULIB_POPEN)|g' \ | ||
| 1118 | -e 's|@''GNULIB_PRINTF''@|$(GNULIB_PRINTF)|g' \ | ||
| 1119 | -e 's|@''GNULIB_PRINTF_POSIX''@|$(GNULIB_PRINTF_POSIX)|g' \ | ||
| 1120 | -e 's|@''GNULIB_PUTC''@|$(GNULIB_PUTC)|g' \ | ||
| 1121 | -e 's|@''GNULIB_PUTCHAR''@|$(GNULIB_PUTCHAR)|g' \ | ||
| 1122 | -e 's|@''GNULIB_PUTS''@|$(GNULIB_PUTS)|g' \ | ||
| 1123 | -e 's|@''GNULIB_REMOVE''@|$(GNULIB_REMOVE)|g' \ | ||
| 1124 | -e 's|@''GNULIB_RENAME''@|$(GNULIB_RENAME)|g' \ | ||
| 1125 | -e 's|@''GNULIB_RENAMEAT''@|$(GNULIB_RENAMEAT)|g' \ | ||
| 1126 | -e 's|@''GNULIB_SNPRINTF''@|$(GNULIB_SNPRINTF)|g' \ | ||
| 1127 | -e 's|@''GNULIB_SPRINTF_POSIX''@|$(GNULIB_SPRINTF_POSIX)|g' \ | ||
| 1128 | -e 's|@''GNULIB_STDIO_H_SIGPIPE''@|$(GNULIB_STDIO_H_SIGPIPE)|g' \ | ||
| 1129 | -e 's|@''GNULIB_TMPFILE''@|$(GNULIB_TMPFILE)|g' \ | ||
| 1130 | -e 's|@''GNULIB_VASPRINTF''@|$(GNULIB_VASPRINTF)|g' \ | ||
| 1131 | -e 's|@''GNULIB_VDPRINTF''@|$(GNULIB_VDPRINTF)|g' \ | ||
| 1132 | -e 's|@''GNULIB_VFPRINTF''@|$(GNULIB_VFPRINTF)|g' \ | ||
| 1133 | -e 's|@''GNULIB_VFPRINTF_POSIX''@|$(GNULIB_VFPRINTF_POSIX)|g' \ | ||
| 1134 | -e 's|@''GNULIB_VPRINTF''@|$(GNULIB_VPRINTF)|g' \ | ||
| 1135 | -e 's|@''GNULIB_VPRINTF_POSIX''@|$(GNULIB_VPRINTF_POSIX)|g' \ | ||
| 1136 | -e 's|@''GNULIB_VSNPRINTF''@|$(GNULIB_VSNPRINTF)|g' \ | ||
| 1137 | -e 's|@''GNULIB_VSPRINTF_POSIX''@|$(GNULIB_VSPRINTF_POSIX)|g' \ | ||
| 1138 | < $(srcdir)/stdio.in.h | \ | ||
| 1139 | sed -e 's|@''HAVE_DECL_FPURGE''@|$(HAVE_DECL_FPURGE)|g' \ | ||
| 1140 | -e 's|@''HAVE_DECL_FSEEKO''@|$(HAVE_DECL_FSEEKO)|g' \ | ||
| 1141 | -e 's|@''HAVE_DECL_FTELLO''@|$(HAVE_DECL_FTELLO)|g' \ | ||
| 1142 | -e 's|@''HAVE_DECL_GETDELIM''@|$(HAVE_DECL_GETDELIM)|g' \ | ||
| 1143 | -e 's|@''HAVE_DECL_GETLINE''@|$(HAVE_DECL_GETLINE)|g' \ | ||
| 1144 | -e 's|@''HAVE_DECL_OBSTACK_PRINTF''@|$(HAVE_DECL_OBSTACK_PRINTF)|g' \ | ||
| 1145 | -e 's|@''HAVE_DECL_SNPRINTF''@|$(HAVE_DECL_SNPRINTF)|g' \ | ||
| 1146 | -e 's|@''HAVE_DECL_VSNPRINTF''@|$(HAVE_DECL_VSNPRINTF)|g' \ | ||
| 1147 | -e 's|@''HAVE_DPRINTF''@|$(HAVE_DPRINTF)|g' \ | ||
| 1148 | -e 's|@''HAVE_FSEEKO''@|$(HAVE_FSEEKO)|g' \ | ||
| 1149 | -e 's|@''HAVE_FTELLO''@|$(HAVE_FTELLO)|g' \ | ||
| 1150 | -e 's|@''HAVE_RENAMEAT''@|$(HAVE_RENAMEAT)|g' \ | ||
| 1151 | -e 's|@''HAVE_VASPRINTF''@|$(HAVE_VASPRINTF)|g' \ | ||
| 1152 | -e 's|@''HAVE_VDPRINTF''@|$(HAVE_VDPRINTF)|g' \ | ||
| 1153 | -e 's|@''REPLACE_DPRINTF''@|$(REPLACE_DPRINTF)|g' \ | ||
| 1154 | -e 's|@''REPLACE_FCLOSE''@|$(REPLACE_FCLOSE)|g' \ | ||
| 1155 | -e 's|@''REPLACE_FFLUSH''@|$(REPLACE_FFLUSH)|g' \ | ||
| 1156 | -e 's|@''REPLACE_FOPEN''@|$(REPLACE_FOPEN)|g' \ | ||
| 1157 | -e 's|@''REPLACE_FPRINTF''@|$(REPLACE_FPRINTF)|g' \ | ||
| 1158 | -e 's|@''REPLACE_FPURGE''@|$(REPLACE_FPURGE)|g' \ | ||
| 1159 | -e 's|@''REPLACE_FREOPEN''@|$(REPLACE_FREOPEN)|g' \ | ||
| 1160 | -e 's|@''REPLACE_FSEEK''@|$(REPLACE_FSEEK)|g' \ | ||
| 1161 | -e 's|@''REPLACE_FSEEKO''@|$(REPLACE_FSEEKO)|g' \ | ||
| 1162 | -e 's|@''REPLACE_FTELL''@|$(REPLACE_FTELL)|g' \ | ||
| 1163 | -e 's|@''REPLACE_FTELLO''@|$(REPLACE_FTELLO)|g' \ | ||
| 1164 | -e 's|@''REPLACE_GETDELIM''@|$(REPLACE_GETDELIM)|g' \ | ||
| 1165 | -e 's|@''REPLACE_GETLINE''@|$(REPLACE_GETLINE)|g' \ | ||
| 1166 | -e 's|@''REPLACE_OBSTACK_PRINTF''@|$(REPLACE_OBSTACK_PRINTF)|g' \ | ||
| 1167 | -e 's|@''REPLACE_PERROR''@|$(REPLACE_PERROR)|g' \ | ||
| 1168 | -e 's|@''REPLACE_POPEN''@|$(REPLACE_POPEN)|g' \ | ||
| 1169 | -e 's|@''REPLACE_PRINTF''@|$(REPLACE_PRINTF)|g' \ | ||
| 1170 | -e 's|@''REPLACE_REMOVE''@|$(REPLACE_REMOVE)|g' \ | ||
| 1171 | -e 's|@''REPLACE_RENAME''@|$(REPLACE_RENAME)|g' \ | ||
| 1172 | -e 's|@''REPLACE_RENAMEAT''@|$(REPLACE_RENAMEAT)|g' \ | ||
| 1173 | -e 's|@''REPLACE_SNPRINTF''@|$(REPLACE_SNPRINTF)|g' \ | ||
| 1174 | -e 's|@''REPLACE_SPRINTF''@|$(REPLACE_SPRINTF)|g' \ | ||
| 1175 | -e 's|@''REPLACE_STDIO_WRITE_FUNCS''@|$(REPLACE_STDIO_WRITE_FUNCS)|g' \ | ||
| 1176 | -e 's|@''REPLACE_TMPFILE''@|$(REPLACE_TMPFILE)|g' \ | ||
| 1177 | -e 's|@''REPLACE_VASPRINTF''@|$(REPLACE_VASPRINTF)|g' \ | ||
| 1178 | -e 's|@''REPLACE_VDPRINTF''@|$(REPLACE_VDPRINTF)|g' \ | ||
| 1179 | -e 's|@''REPLACE_VFPRINTF''@|$(REPLACE_VFPRINTF)|g' \ | ||
| 1180 | -e 's|@''REPLACE_VPRINTF''@|$(REPLACE_VPRINTF)|g' \ | ||
| 1181 | -e 's|@''REPLACE_VSNPRINTF''@|$(REPLACE_VSNPRINTF)|g' \ | ||
| 1182 | -e 's|@''REPLACE_VSPRINTF''@|$(REPLACE_VSPRINTF)|g' \ | ||
| 1183 | -e 's|@''ASM_SYMBOL_PREFIX''@|$(ASM_SYMBOL_PREFIX)|g' \ | ||
| 1184 | -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \ | ||
| 1185 | -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \ | ||
| 1186 | -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)'; \ | ||
| 1187 | } > $@-t && \ | ||
| 1188 | mv $@-t $@ | ||
| 1189 | |||
| 999 | # We need the following in order to create <stdlib.h> when the system | 1190 | # We need the following in order to create <stdlib.h> when the system |
| 1000 | # doesn't have one that works with the given compiler. | 1191 | # doesn't have one that works with the given compiler. |
| 1001 | stdlib.h: stdlib.in.h $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H) | 1192 | stdlib.h: stdlib.in.h $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H) |
diff --git a/autogen/README b/autogen/README index a16dc93c48a..fd574c41cd6 100644 --- a/autogen/README +++ b/autogen/README | |||
| @@ -7,6 +7,12 @@ configure ../ autoconf | |||
| 7 | config.in ../src autoheader * also used by MSDOS bzr build | 7 | config.in ../src autoheader * also used by MSDOS bzr build |
| 8 | aclocal.m4 ../ aclocal | 8 | aclocal.m4 ../ aclocal |
| 9 | Makefile.in ../lib automake | 9 | Makefile.in ../lib automake |
| 10 | compile ../ automake | ||
| 11 | config.guess ../ automake | ||
| 12 | config.sub ../ automake | ||
| 13 | depcomp ../ automake | ||
| 14 | install-sh ../ automake | ||
| 15 | missing ../ automake | ||
| 10 | 16 | ||
| 11 | There are also some scripts: | 17 | There are also some scripts: |
| 12 | 18 | ||
diff --git a/autogen/aclocal.m4 b/autogen/aclocal.m4 index 963faafb453..f23562235df 100644 --- a/autogen/aclocal.m4 +++ b/autogen/aclocal.m4 | |||
| @@ -999,11 +999,13 @@ m4_include([m4/md5.m4]) | |||
| 999 | m4_include([m4/mktime.m4]) | 999 | m4_include([m4/mktime.m4]) |
| 1000 | m4_include([m4/multiarch.m4]) | 1000 | m4_include([m4/multiarch.m4]) |
| 1001 | m4_include([m4/readlink.m4]) | 1001 | m4_include([m4/readlink.m4]) |
| 1002 | m4_include([m4/socklen.m4]) | ||
| 1002 | m4_include([m4/st_dm_mode.m4]) | 1003 | m4_include([m4/st_dm_mode.m4]) |
| 1003 | m4_include([m4/stat.m4]) | 1004 | m4_include([m4/stat.m4]) |
| 1004 | m4_include([m4/stdbool.m4]) | 1005 | m4_include([m4/stdbool.m4]) |
| 1005 | m4_include([m4/stddef_h.m4]) | 1006 | m4_include([m4/stddef_h.m4]) |
| 1006 | m4_include([m4/stdint.m4]) | 1007 | m4_include([m4/stdint.m4]) |
| 1008 | m4_include([m4/stdio_h.m4]) | ||
| 1007 | m4_include([m4/stdlib_h.m4]) | 1009 | m4_include([m4/stdlib_h.m4]) |
| 1008 | m4_include([m4/strftime.m4]) | 1010 | m4_include([m4/strftime.m4]) |
| 1009 | m4_include([m4/symlink.m4]) | 1011 | m4_include([m4/symlink.m4]) |
diff --git a/compile b/autogen/compile index c0096a7b563..c0096a7b563 100755 --- a/compile +++ b/autogen/compile | |||
diff --git a/config.guess b/autogen/config.guess index 187cd54edd2..e3a2116a7dc 100755 --- a/config.guess +++ b/autogen/config.guess | |||
| @@ -1,10 +1,10 @@ | |||
| 1 | #! /bin/sh | 1 | #! /bin/sh |
| 2 | # Attempt to guess a canonical system name. | 2 | # Attempt to guess a canonical system name. |
| 3 | # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, | 3 | # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, |
| 4 | # 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, | 4 | # 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 |
| 5 | # 2011 Free Software Foundation, Inc. | 5 | # Free Software Foundation, Inc. |
| 6 | 6 | ||
| 7 | timestamp='2011-02-02' | 7 | timestamp='2009-06-10' |
| 8 | 8 | ||
| 9 | # This file is free software; you can redistribute it and/or modify it | 9 | # This file is free software; you can redistribute it and/or modify it |
| 10 | # under the terms of the GNU General Public License as published by | 10 | # under the terms of the GNU General Public License as published by |
| @@ -27,16 +27,16 @@ timestamp='2011-02-02' | |||
| 27 | # the same distribution terms that you use for the rest of that program. | 27 | # the same distribution terms that you use for the rest of that program. |
| 28 | 28 | ||
| 29 | 29 | ||
| 30 | # Originally written by Per Bothner. Please send patches (context | 30 | # Originally written by Per Bothner <per@bothner.com>. |
| 31 | # diff format) to <config-patches@gnu.org> and include a ChangeLog | 31 | # Please send patches to <config-patches@gnu.org>. Submit a context |
| 32 | # entry. | 32 | # diff and a properly formatted ChangeLog entry. |
| 33 | # | 33 | # |
| 34 | # This script attempts to guess a canonical system name similar to | 34 | # This script attempts to guess a canonical system name similar to |
| 35 | # config.sub. If it succeeds, it prints the system name on stdout, and | 35 | # config.sub. If it succeeds, it prints the system name on stdout, and |
| 36 | # exits with 0. Otherwise, it exits with 1. | 36 | # exits with 0. Otherwise, it exits with 1. |
| 37 | # | 37 | # |
| 38 | # You can get the latest version of this script from: | 38 | # The plan is that this can be called by configure scripts if you |
| 39 | # http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD | 39 | # don't specify an explicit build system type. |
| 40 | 40 | ||
| 41 | me=`echo "$0" | sed -e 's,.*/,,'` | 41 | me=`echo "$0" | sed -e 's,.*/,,'` |
| 42 | 42 | ||
| @@ -56,9 +56,8 @@ version="\ | |||
| 56 | GNU config.guess ($timestamp) | 56 | GNU config.guess ($timestamp) |
| 57 | 57 | ||
| 58 | Originally written by Per Bothner. | 58 | Originally written by Per Bothner. |
| 59 | Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, | 59 | Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, |
| 60 | 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free | 60 | 2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. |
| 61 | Software Foundation, Inc. | ||
| 62 | 61 | ||
| 63 | This is free software; see the source for copying conditions. There is NO | 62 | This is free software; see the source for copying conditions. There is NO |
| 64 | warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." | 63 | warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." |
| @@ -181,7 +180,7 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in | |||
| 181 | fi | 180 | fi |
| 182 | ;; | 181 | ;; |
| 183 | *) | 182 | *) |
| 184 | os=netbsd | 183 | os=netbsd |
| 185 | ;; | 184 | ;; |
| 186 | esac | 185 | esac |
| 187 | # The OS release | 186 | # The OS release |
| @@ -224,7 +223,7 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in | |||
| 224 | UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'` | 223 | UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'` |
| 225 | ;; | 224 | ;; |
| 226 | *5.*) | 225 | *5.*) |
| 227 | UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'` | 226 | UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'` |
| 228 | ;; | 227 | ;; |
| 229 | esac | 228 | esac |
| 230 | # According to Compaq, /usr/sbin/psrinfo has been available on | 229 | # According to Compaq, /usr/sbin/psrinfo has been available on |
| @@ -270,10 +269,7 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in | |||
| 270 | # A Xn.n version is an unreleased experimental baselevel. | 269 | # A Xn.n version is an unreleased experimental baselevel. |
| 271 | # 1.2 uses "1.2" for uname -r. | 270 | # 1.2 uses "1.2" for uname -r. |
| 272 | echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` | 271 | echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` |
| 273 | # Reset EXIT trap before exiting to avoid spurious non-zero exit code. | 272 | exit ;; |
| 274 | exitcode=$? | ||
| 275 | trap '' 0 | ||
| 276 | exit $exitcode ;; | ||
| 277 | Alpha\ *:Windows_NT*:*) | 273 | Alpha\ *:Windows_NT*:*) |
| 278 | # How do we know it's Interix rather than the generic POSIX subsystem? | 274 | # How do we know it's Interix rather than the generic POSIX subsystem? |
| 279 | # Should we change UNAME_MACHINE based on the output of uname instead | 275 | # Should we change UNAME_MACHINE based on the output of uname instead |
| @@ -299,7 +295,7 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in | |||
| 299 | echo s390-ibm-zvmoe | 295 | echo s390-ibm-zvmoe |
| 300 | exit ;; | 296 | exit ;; |
| 301 | *:OS400:*:*) | 297 | *:OS400:*:*) |
| 302 | echo powerpc-ibm-os400 | 298 | echo powerpc-ibm-os400 |
| 303 | exit ;; | 299 | exit ;; |
| 304 | arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) | 300 | arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) |
| 305 | echo arm-acorn-riscix${UNAME_RELEASE} | 301 | echo arm-acorn-riscix${UNAME_RELEASE} |
| @@ -337,9 +333,6 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in | |||
| 337 | sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*) | 333 | sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*) |
| 338 | echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` | 334 | echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` |
| 339 | exit ;; | 335 | exit ;; |
| 340 | i86pc:AuroraUX:5.*:* | i86xen:AuroraUX:5.*:*) | ||
| 341 | echo i386-pc-auroraux${UNAME_RELEASE} | ||
| 342 | exit ;; | ||
| 343 | i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*) | 336 | i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*) |
| 344 | eval $set_cc_for_build | 337 | eval $set_cc_for_build |
| 345 | SUN_ARCH="i386" | 338 | SUN_ARCH="i386" |
| @@ -398,23 +391,23 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in | |||
| 398 | # MiNT. But MiNT is downward compatible to TOS, so this should | 391 | # MiNT. But MiNT is downward compatible to TOS, so this should |
| 399 | # be no problem. | 392 | # be no problem. |
| 400 | atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*) | 393 | atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*) |
| 401 | echo m68k-atari-mint${UNAME_RELEASE} | 394 | echo m68k-atari-mint${UNAME_RELEASE} |
| 402 | exit ;; | 395 | exit ;; |
| 403 | atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*) | 396 | atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*) |
| 404 | echo m68k-atari-mint${UNAME_RELEASE} | 397 | echo m68k-atari-mint${UNAME_RELEASE} |
| 405 | exit ;; | 398 | exit ;; |
| 406 | *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*) | 399 | *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*) |
| 407 | echo m68k-atari-mint${UNAME_RELEASE} | 400 | echo m68k-atari-mint${UNAME_RELEASE} |
| 408 | exit ;; | 401 | exit ;; |
| 409 | milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*) | 402 | milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*) |
| 410 | echo m68k-milan-mint${UNAME_RELEASE} | 403 | echo m68k-milan-mint${UNAME_RELEASE} |
| 411 | exit ;; | 404 | exit ;; |
| 412 | hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*) | 405 | hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*) |
| 413 | echo m68k-hades-mint${UNAME_RELEASE} | 406 | echo m68k-hades-mint${UNAME_RELEASE} |
| 414 | exit ;; | 407 | exit ;; |
| 415 | *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*) | 408 | *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*) |
| 416 | echo m68k-unknown-mint${UNAME_RELEASE} | 409 | echo m68k-unknown-mint${UNAME_RELEASE} |
| 417 | exit ;; | 410 | exit ;; |
| 418 | m68k:machten:*:*) | 411 | m68k:machten:*:*) |
| 419 | echo m68k-apple-machten${UNAME_RELEASE} | 412 | echo m68k-apple-machten${UNAME_RELEASE} |
| 420 | exit ;; | 413 | exit ;; |
| @@ -484,8 +477,8 @@ EOF | |||
| 484 | echo m88k-motorola-sysv3 | 477 | echo m88k-motorola-sysv3 |
| 485 | exit ;; | 478 | exit ;; |
| 486 | AViiON:dgux:*:*) | 479 | AViiON:dgux:*:*) |
| 487 | # DG/UX returns AViiON for all architectures | 480 | # DG/UX returns AViiON for all architectures |
| 488 | UNAME_PROCESSOR=`/usr/bin/uname -p` | 481 | UNAME_PROCESSOR=`/usr/bin/uname -p` |
| 489 | if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ] | 482 | if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ] |
| 490 | then | 483 | then |
| 491 | if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \ | 484 | if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \ |
| @@ -498,7 +491,7 @@ EOF | |||
| 498 | else | 491 | else |
| 499 | echo i586-dg-dgux${UNAME_RELEASE} | 492 | echo i586-dg-dgux${UNAME_RELEASE} |
| 500 | fi | 493 | fi |
| 501 | exit ;; | 494 | exit ;; |
| 502 | M88*:DolphinOS:*:*) # DolphinOS (SVR3) | 495 | M88*:DolphinOS:*:*) # DolphinOS (SVR3) |
| 503 | echo m88k-dolphin-sysv3 | 496 | echo m88k-dolphin-sysv3 |
| 504 | exit ;; | 497 | exit ;; |
| @@ -555,7 +548,7 @@ EOF | |||
| 555 | echo rs6000-ibm-aix3.2 | 548 | echo rs6000-ibm-aix3.2 |
| 556 | fi | 549 | fi |
| 557 | exit ;; | 550 | exit ;; |
| 558 | *:AIX:*:[4567]) | 551 | *:AIX:*:[456]) |
| 559 | IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'` | 552 | IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'` |
| 560 | if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then | 553 | if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then |
| 561 | IBM_ARCH=rs6000 | 554 | IBM_ARCH=rs6000 |
| @@ -598,52 +591,52 @@ EOF | |||
| 598 | 9000/[678][0-9][0-9]) | 591 | 9000/[678][0-9][0-9]) |
| 599 | if [ -x /usr/bin/getconf ]; then | 592 | if [ -x /usr/bin/getconf ]; then |
| 600 | sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null` | 593 | sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null` |
| 601 | sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null` | 594 | sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null` |
| 602 | case "${sc_cpu_version}" in | 595 | case "${sc_cpu_version}" in |
| 603 | 523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0 | 596 | 523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0 |
| 604 | 528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1 | 597 | 528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1 |
| 605 | 532) # CPU_PA_RISC2_0 | 598 | 532) # CPU_PA_RISC2_0 |
| 606 | case "${sc_kernel_bits}" in | 599 | case "${sc_kernel_bits}" in |
| 607 | 32) HP_ARCH="hppa2.0n" ;; | 600 | 32) HP_ARCH="hppa2.0n" ;; |
| 608 | 64) HP_ARCH="hppa2.0w" ;; | 601 | 64) HP_ARCH="hppa2.0w" ;; |
| 609 | '') HP_ARCH="hppa2.0" ;; # HP-UX 10.20 | 602 | '') HP_ARCH="hppa2.0" ;; # HP-UX 10.20 |
| 610 | esac ;; | 603 | esac ;; |
| 611 | esac | 604 | esac |
| 612 | fi | 605 | fi |
| 613 | if [ "${HP_ARCH}" = "" ]; then | 606 | if [ "${HP_ARCH}" = "" ]; then |
| 614 | eval $set_cc_for_build | 607 | eval $set_cc_for_build |
| 615 | sed 's/^ //' << EOF >$dummy.c | 608 | sed 's/^ //' << EOF >$dummy.c |
| 616 | 609 | ||
| 617 | #define _HPUX_SOURCE | 610 | #define _HPUX_SOURCE |
| 618 | #include <stdlib.h> | 611 | #include <stdlib.h> |
| 619 | #include <unistd.h> | 612 | #include <unistd.h> |
| 620 | 613 | ||
| 621 | int main () | 614 | int main () |
| 622 | { | 615 | { |
| 623 | #if defined(_SC_KERNEL_BITS) | 616 | #if defined(_SC_KERNEL_BITS) |
| 624 | long bits = sysconf(_SC_KERNEL_BITS); | 617 | long bits = sysconf(_SC_KERNEL_BITS); |
| 625 | #endif | 618 | #endif |
| 626 | long cpu = sysconf (_SC_CPU_VERSION); | 619 | long cpu = sysconf (_SC_CPU_VERSION); |
| 627 | 620 | ||
| 628 | switch (cpu) | 621 | switch (cpu) |
| 629 | { | 622 | { |
| 630 | case CPU_PA_RISC1_0: puts ("hppa1.0"); break; | 623 | case CPU_PA_RISC1_0: puts ("hppa1.0"); break; |
| 631 | case CPU_PA_RISC1_1: puts ("hppa1.1"); break; | 624 | case CPU_PA_RISC1_1: puts ("hppa1.1"); break; |
| 632 | case CPU_PA_RISC2_0: | 625 | case CPU_PA_RISC2_0: |
| 633 | #if defined(_SC_KERNEL_BITS) | 626 | #if defined(_SC_KERNEL_BITS) |
| 634 | switch (bits) | 627 | switch (bits) |
| 635 | { | 628 | { |
| 636 | case 64: puts ("hppa2.0w"); break; | 629 | case 64: puts ("hppa2.0w"); break; |
| 637 | case 32: puts ("hppa2.0n"); break; | 630 | case 32: puts ("hppa2.0n"); break; |
| 638 | default: puts ("hppa2.0"); break; | 631 | default: puts ("hppa2.0"); break; |
| 639 | } break; | 632 | } break; |
| 640 | #else /* !defined(_SC_KERNEL_BITS) */ | 633 | #else /* !defined(_SC_KERNEL_BITS) */ |
| 641 | puts ("hppa2.0"); break; | 634 | puts ("hppa2.0"); break; |
| 642 | #endif | 635 | #endif |
| 643 | default: puts ("hppa1.0"); break; | 636 | default: puts ("hppa1.0"); break; |
| 644 | } | 637 | } |
| 645 | exit (0); | 638 | exit (0); |
| 646 | } | 639 | } |
| 647 | EOF | 640 | EOF |
| 648 | (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy` | 641 | (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy` |
| 649 | test -z "$HP_ARCH" && HP_ARCH=hppa | 642 | test -z "$HP_ARCH" && HP_ARCH=hppa |
| @@ -734,22 +727,22 @@ EOF | |||
| 734 | exit ;; | 727 | exit ;; |
| 735 | C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*) | 728 | C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*) |
| 736 | echo c1-convex-bsd | 729 | echo c1-convex-bsd |
| 737 | exit ;; | 730 | exit ;; |
| 738 | C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*) | 731 | C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*) |
| 739 | if getsysinfo -f scalar_acc | 732 | if getsysinfo -f scalar_acc |
| 740 | then echo c32-convex-bsd | 733 | then echo c32-convex-bsd |
| 741 | else echo c2-convex-bsd | 734 | else echo c2-convex-bsd |
| 742 | fi | 735 | fi |
| 743 | exit ;; | 736 | exit ;; |
| 744 | C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*) | 737 | C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*) |
| 745 | echo c34-convex-bsd | 738 | echo c34-convex-bsd |
| 746 | exit ;; | 739 | exit ;; |
| 747 | C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*) | 740 | C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*) |
| 748 | echo c38-convex-bsd | 741 | echo c38-convex-bsd |
| 749 | exit ;; | 742 | exit ;; |
| 750 | C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*) | 743 | C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*) |
| 751 | echo c4-convex-bsd | 744 | echo c4-convex-bsd |
| 752 | exit ;; | 745 | exit ;; |
| 753 | CRAY*Y-MP:*:*:*) | 746 | CRAY*Y-MP:*:*:*) |
| 754 | echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' | 747 | echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' |
| 755 | exit ;; | 748 | exit ;; |
| @@ -773,14 +766,14 @@ EOF | |||
| 773 | exit ;; | 766 | exit ;; |
| 774 | F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*) | 767 | F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*) |
| 775 | FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` | 768 | FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` |
| 776 | FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` | 769 | FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` |
| 777 | FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'` | 770 | FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'` |
| 778 | echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" | 771 | echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" |
| 779 | exit ;; | 772 | exit ;; |
| 780 | 5000:UNIX_System_V:4.*:*) | 773 | 5000:UNIX_System_V:4.*:*) |
| 781 | FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` | 774 | FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` |
| 782 | FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'` | 775 | FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'` |
| 783 | echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" | 776 | echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" |
| 784 | exit ;; | 777 | exit ;; |
| 785 | i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*) | 778 | i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*) |
| 786 | echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE} | 779 | echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE} |
| @@ -808,18 +801,18 @@ EOF | |||
| 808 | echo ${UNAME_MACHINE}-pc-mingw32 | 801 | echo ${UNAME_MACHINE}-pc-mingw32 |
| 809 | exit ;; | 802 | exit ;; |
| 810 | i*:windows32*:*) | 803 | i*:windows32*:*) |
| 811 | # uname -m includes "-pc" on this system. | 804 | # uname -m includes "-pc" on this system. |
| 812 | echo ${UNAME_MACHINE}-mingw32 | 805 | echo ${UNAME_MACHINE}-mingw32 |
| 813 | exit ;; | 806 | exit ;; |
| 814 | i*:PW*:*) | 807 | i*:PW*:*) |
| 815 | echo ${UNAME_MACHINE}-pc-pw32 | 808 | echo ${UNAME_MACHINE}-pc-pw32 |
| 816 | exit ;; | 809 | exit ;; |
| 817 | *:Interix*:*) | 810 | *:Interix*:[3456]*) |
| 818 | case ${UNAME_MACHINE} in | 811 | case ${UNAME_MACHINE} in |
| 819 | x86) | 812 | x86) |
| 820 | echo i586-pc-interix${UNAME_RELEASE} | 813 | echo i586-pc-interix${UNAME_RELEASE} |
| 821 | exit ;; | 814 | exit ;; |
| 822 | authenticamd | genuineintel | EM64T) | 815 | EM64T | authenticamd | genuineintel) |
| 823 | echo x86_64-unknown-interix${UNAME_RELEASE} | 816 | echo x86_64-unknown-interix${UNAME_RELEASE} |
| 824 | exit ;; | 817 | exit ;; |
| 825 | IA64) | 818 | IA64) |
| @@ -861,20 +854,6 @@ EOF | |||
| 861 | i*86:Minix:*:*) | 854 | i*86:Minix:*:*) |
| 862 | echo ${UNAME_MACHINE}-pc-minix | 855 | echo ${UNAME_MACHINE}-pc-minix |
| 863 | exit ;; | 856 | exit ;; |
| 864 | alpha:Linux:*:*) | ||
| 865 | case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in | ||
| 866 | EV5) UNAME_MACHINE=alphaev5 ;; | ||
| 867 | EV56) UNAME_MACHINE=alphaev56 ;; | ||
| 868 | PCA56) UNAME_MACHINE=alphapca56 ;; | ||
| 869 | PCA57) UNAME_MACHINE=alphapca56 ;; | ||
| 870 | EV6) UNAME_MACHINE=alphaev6 ;; | ||
| 871 | EV67) UNAME_MACHINE=alphaev67 ;; | ||
| 872 | EV68*) UNAME_MACHINE=alphaev68 ;; | ||
| 873 | esac | ||
| 874 | objdump --private-headers /bin/sh | grep -q ld.so.1 | ||
| 875 | if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi | ||
| 876 | echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC} | ||
| 877 | exit ;; | ||
| 878 | arm*:Linux:*:*) | 857 | arm*:Linux:*:*) |
| 879 | eval $set_cc_for_build | 858 | eval $set_cc_for_build |
| 880 | if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \ | 859 | if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \ |
| @@ -895,18 +874,7 @@ EOF | |||
| 895 | echo crisv32-axis-linux-gnu | 874 | echo crisv32-axis-linux-gnu |
| 896 | exit ;; | 875 | exit ;; |
| 897 | frv:Linux:*:*) | 876 | frv:Linux:*:*) |
| 898 | echo frv-unknown-linux-gnu | 877 | echo frv-unknown-linux-gnu |
| 899 | exit ;; | ||
| 900 | i*86:Linux:*:*) | ||
| 901 | LIBC=gnu | ||
| 902 | eval $set_cc_for_build | ||
| 903 | sed 's/^ //' << EOF >$dummy.c | ||
| 904 | #ifdef __dietlibc__ | ||
| 905 | LIBC=dietlibc | ||
| 906 | #endif | ||
| 907 | EOF | ||
| 908 | eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC'` | ||
| 909 | echo "${UNAME_MACHINE}-pc-linux-${LIBC}" | ||
| 910 | exit ;; | 878 | exit ;; |
| 911 | ia64:Linux:*:*) | 879 | ia64:Linux:*:*) |
| 912 | echo ${UNAME_MACHINE}-unknown-linux-gnu | 880 | echo ${UNAME_MACHINE}-unknown-linux-gnu |
| @@ -933,18 +901,39 @@ EOF | |||
| 933 | #endif | 901 | #endif |
| 934 | #endif | 902 | #endif |
| 935 | EOF | 903 | EOF |
| 936 | eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^CPU'` | 904 | eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n ' |
| 905 | /^CPU/{ | ||
| 906 | s: ::g | ||
| 907 | p | ||
| 908 | }'`" | ||
| 937 | test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; } | 909 | test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; } |
| 938 | ;; | 910 | ;; |
| 939 | or32:Linux:*:*) | 911 | or32:Linux:*:*) |
| 940 | echo or32-unknown-linux-gnu | 912 | echo or32-unknown-linux-gnu |
| 941 | exit ;; | 913 | exit ;; |
| 914 | ppc:Linux:*:*) | ||
| 915 | echo powerpc-unknown-linux-gnu | ||
| 916 | exit ;; | ||
| 917 | ppc64:Linux:*:*) | ||
| 918 | echo powerpc64-unknown-linux-gnu | ||
| 919 | exit ;; | ||
| 920 | alpha:Linux:*:*) | ||
| 921 | case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in | ||
| 922 | EV5) UNAME_MACHINE=alphaev5 ;; | ||
| 923 | EV56) UNAME_MACHINE=alphaev56 ;; | ||
| 924 | PCA56) UNAME_MACHINE=alphapca56 ;; | ||
| 925 | PCA57) UNAME_MACHINE=alphapca56 ;; | ||
| 926 | EV6) UNAME_MACHINE=alphaev6 ;; | ||
| 927 | EV67) UNAME_MACHINE=alphaev67 ;; | ||
| 928 | EV68*) UNAME_MACHINE=alphaev68 ;; | ||
| 929 | esac | ||
| 930 | objdump --private-headers /bin/sh | grep -q ld.so.1 | ||
| 931 | if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi | ||
| 932 | echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC} | ||
| 933 | exit ;; | ||
| 942 | padre:Linux:*:*) | 934 | padre:Linux:*:*) |
| 943 | echo sparc-unknown-linux-gnu | 935 | echo sparc-unknown-linux-gnu |
| 944 | exit ;; | 936 | exit ;; |
| 945 | parisc64:Linux:*:* | hppa64:Linux:*:*) | ||
| 946 | echo hppa64-unknown-linux-gnu | ||
| 947 | exit ;; | ||
| 948 | parisc:Linux:*:* | hppa:Linux:*:*) | 937 | parisc:Linux:*:* | hppa:Linux:*:*) |
| 949 | # Look for CPU level | 938 | # Look for CPU level |
| 950 | case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in | 939 | case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in |
| @@ -953,17 +942,14 @@ EOF | |||
| 953 | *) echo hppa-unknown-linux-gnu ;; | 942 | *) echo hppa-unknown-linux-gnu ;; |
| 954 | esac | 943 | esac |
| 955 | exit ;; | 944 | exit ;; |
| 956 | ppc64:Linux:*:*) | 945 | parisc64:Linux:*:* | hppa64:Linux:*:*) |
| 957 | echo powerpc64-unknown-linux-gnu | 946 | echo hppa64-unknown-linux-gnu |
| 958 | exit ;; | ||
| 959 | ppc:Linux:*:*) | ||
| 960 | echo powerpc-unknown-linux-gnu | ||
| 961 | exit ;; | 947 | exit ;; |
| 962 | s390:Linux:*:* | s390x:Linux:*:*) | 948 | s390:Linux:*:* | s390x:Linux:*:*) |
| 963 | echo ${UNAME_MACHINE}-ibm-linux | 949 | echo ${UNAME_MACHINE}-ibm-linux |
| 964 | exit ;; | 950 | exit ;; |
| 965 | sh64*:Linux:*:*) | 951 | sh64*:Linux:*:*) |
| 966 | echo ${UNAME_MACHINE}-unknown-linux-gnu | 952 | echo ${UNAME_MACHINE}-unknown-linux-gnu |
| 967 | exit ;; | 953 | exit ;; |
| 968 | sh*:Linux:*:*) | 954 | sh*:Linux:*:*) |
| 969 | echo ${UNAME_MACHINE}-unknown-linux-gnu | 955 | echo ${UNAME_MACHINE}-unknown-linux-gnu |
| @@ -971,9 +957,6 @@ EOF | |||
| 971 | sparc:Linux:*:* | sparc64:Linux:*:*) | 957 | sparc:Linux:*:* | sparc64:Linux:*:*) |
| 972 | echo ${UNAME_MACHINE}-unknown-linux-gnu | 958 | echo ${UNAME_MACHINE}-unknown-linux-gnu |
| 973 | exit ;; | 959 | exit ;; |
| 974 | tile*:Linux:*:*) | ||
| 975 | echo ${UNAME_MACHINE}-tilera-linux-gnu | ||
| 976 | exit ;; | ||
| 977 | vax:Linux:*:*) | 960 | vax:Linux:*:*) |
| 978 | echo ${UNAME_MACHINE}-dec-linux-gnu | 961 | echo ${UNAME_MACHINE}-dec-linux-gnu |
| 979 | exit ;; | 962 | exit ;; |
| @@ -981,8 +964,60 @@ EOF | |||
| 981 | echo x86_64-unknown-linux-gnu | 964 | echo x86_64-unknown-linux-gnu |
| 982 | exit ;; | 965 | exit ;; |
| 983 | xtensa*:Linux:*:*) | 966 | xtensa*:Linux:*:*) |
| 984 | echo ${UNAME_MACHINE}-unknown-linux-gnu | 967 | echo ${UNAME_MACHINE}-unknown-linux-gnu |
| 985 | exit ;; | 968 | exit ;; |
| 969 | i*86:Linux:*:*) | ||
| 970 | # The BFD linker knows what the default object file format is, so | ||
| 971 | # first see if it will tell us. cd to the root directory to prevent | ||
| 972 | # problems with other programs or directories called `ld' in the path. | ||
| 973 | # Set LC_ALL=C to ensure ld outputs messages in English. | ||
| 974 | ld_supported_targets=`cd /; LC_ALL=C ld --help 2>&1 \ | ||
| 975 | | sed -ne '/supported targets:/!d | ||
| 976 | s/[ ][ ]*/ /g | ||
| 977 | s/.*supported targets: *// | ||
| 978 | s/ .*// | ||
| 979 | p'` | ||
| 980 | case "$ld_supported_targets" in | ||
| 981 | elf32-i386) | ||
| 982 | TENTATIVE="${UNAME_MACHINE}-pc-linux-gnu" | ||
| 983 | ;; | ||
| 984 | esac | ||
| 985 | # Determine whether the default compiler is a.out or elf | ||
| 986 | eval $set_cc_for_build | ||
| 987 | sed 's/^ //' << EOF >$dummy.c | ||
| 988 | #include <features.h> | ||
| 989 | #ifdef __ELF__ | ||
| 990 | # ifdef __GLIBC__ | ||
| 991 | # if __GLIBC__ >= 2 | ||
| 992 | LIBC=gnu | ||
| 993 | # else | ||
| 994 | LIBC=gnulibc1 | ||
| 995 | # endif | ||
| 996 | # else | ||
| 997 | LIBC=gnulibc1 | ||
| 998 | # endif | ||
| 999 | #else | ||
| 1000 | #if defined(__INTEL_COMPILER) || defined(__PGI) || defined(__SUNPRO_C) || defined(__SUNPRO_CC) | ||
| 1001 | LIBC=gnu | ||
| 1002 | #else | ||
| 1003 | LIBC=gnuaout | ||
| 1004 | #endif | ||
| 1005 | #endif | ||
| 1006 | #ifdef __dietlibc__ | ||
| 1007 | LIBC=dietlibc | ||
| 1008 | #endif | ||
| 1009 | EOF | ||
| 1010 | eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n ' | ||
| 1011 | /^LIBC/{ | ||
| 1012 | s: ::g | ||
| 1013 | p | ||
| 1014 | }'`" | ||
| 1015 | test x"${LIBC}" != x && { | ||
| 1016 | echo "${UNAME_MACHINE}-pc-linux-${LIBC}" | ||
| 1017 | exit | ||
| 1018 | } | ||
| 1019 | test x"${TENTATIVE}" != x && { echo "${TENTATIVE}"; exit; } | ||
| 1020 | ;; | ||
| 986 | i*86:DYNIX/ptx:4*:*) | 1021 | i*86:DYNIX/ptx:4*:*) |
| 987 | # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. | 1022 | # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. |
| 988 | # earlier versions are messed up and put the nodename in both | 1023 | # earlier versions are messed up and put the nodename in both |
| @@ -990,11 +1025,11 @@ EOF | |||
| 990 | echo i386-sequent-sysv4 | 1025 | echo i386-sequent-sysv4 |
| 991 | exit ;; | 1026 | exit ;; |
| 992 | i*86:UNIX_SV:4.2MP:2.*) | 1027 | i*86:UNIX_SV:4.2MP:2.*) |
| 993 | # Unixware is an offshoot of SVR4, but it has its own version | 1028 | # Unixware is an offshoot of SVR4, but it has its own version |
| 994 | # number series starting with 2... | 1029 | # number series starting with 2... |
| 995 | # I am not positive that other SVR4 systems won't match this, | 1030 | # I am not positive that other SVR4 systems won't match this, |
| 996 | # I just have to hope. -- rms. | 1031 | # I just have to hope. -- rms. |
| 997 | # Use sysv4.2uw... so that sysv4* matches it. | 1032 | # Use sysv4.2uw... so that sysv4* matches it. |
| 998 | echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION} | 1033 | echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION} |
| 999 | exit ;; | 1034 | exit ;; |
| 1000 | i*86:OS/2:*:*) | 1035 | i*86:OS/2:*:*) |
| @@ -1026,7 +1061,7 @@ EOF | |||
| 1026 | fi | 1061 | fi |
| 1027 | exit ;; | 1062 | exit ;; |
| 1028 | i*86:*:5:[678]*) | 1063 | i*86:*:5:[678]*) |
| 1029 | # UnixWare 7.x, OpenUNIX and OpenServer 6. | 1064 | # UnixWare 7.x, OpenUNIX and OpenServer 6. |
| 1030 | case `/bin/uname -X | grep "^Machine"` in | 1065 | case `/bin/uname -X | grep "^Machine"` in |
| 1031 | *486*) UNAME_MACHINE=i486 ;; | 1066 | *486*) UNAME_MACHINE=i486 ;; |
| 1032 | *Pentium) UNAME_MACHINE=i586 ;; | 1067 | *Pentium) UNAME_MACHINE=i586 ;; |
| @@ -1054,13 +1089,13 @@ EOF | |||
| 1054 | exit ;; | 1089 | exit ;; |
| 1055 | pc:*:*:*) | 1090 | pc:*:*:*) |
| 1056 | # Left here for compatibility: | 1091 | # Left here for compatibility: |
| 1057 | # uname -m prints for DJGPP always 'pc', but it prints nothing about | 1092 | # uname -m prints for DJGPP always 'pc', but it prints nothing about |
| 1058 | # the processor, so we play safe by assuming i586. | 1093 | # the processor, so we play safe by assuming i586. |
| 1059 | # Note: whatever this is, it MUST be the same as what config.sub | 1094 | # Note: whatever this is, it MUST be the same as what config.sub |
| 1060 | # prints for the "djgpp" host, or else GDB configury will decide that | 1095 | # prints for the "djgpp" host, or else GDB configury will decide that |
| 1061 | # this is a cross-build. | 1096 | # this is a cross-build. |
| 1062 | echo i586-pc-msdosdjgpp | 1097 | echo i586-pc-msdosdjgpp |
| 1063 | exit ;; | 1098 | exit ;; |
| 1064 | Intel:Mach:3*:*) | 1099 | Intel:Mach:3*:*) |
| 1065 | echo i386-pc-mach3 | 1100 | echo i386-pc-mach3 |
| 1066 | exit ;; | 1101 | exit ;; |
| @@ -1095,8 +1130,8 @@ EOF | |||
| 1095 | /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ | 1130 | /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ |
| 1096 | && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;; | 1131 | && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;; |
| 1097 | 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*) | 1132 | 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*) |
| 1098 | /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ | 1133 | /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ |
| 1099 | && { echo i486-ncr-sysv4; exit; } ;; | 1134 | && { echo i486-ncr-sysv4; exit; } ;; |
| 1100 | NCR*:*:4.2:* | MPRAS*:*:4.2:*) | 1135 | NCR*:*:4.2:* | MPRAS*:*:4.2:*) |
| 1101 | OS_REL='.3' | 1136 | OS_REL='.3' |
| 1102 | test -r /etc/.relid \ | 1137 | test -r /etc/.relid \ |
| @@ -1139,10 +1174,10 @@ EOF | |||
| 1139 | echo ns32k-sni-sysv | 1174 | echo ns32k-sni-sysv |
| 1140 | fi | 1175 | fi |
| 1141 | exit ;; | 1176 | exit ;; |
| 1142 | PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort | 1177 | PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort |
| 1143 | # says <Richard.M.Bartel@ccMail.Census.GOV> | 1178 | # says <Richard.M.Bartel@ccMail.Census.GOV> |
| 1144 | echo i586-unisys-sysv4 | 1179 | echo i586-unisys-sysv4 |
| 1145 | exit ;; | 1180 | exit ;; |
| 1146 | *:UNIX_System_V:4*:FTX*) | 1181 | *:UNIX_System_V:4*:FTX*) |
| 1147 | # From Gerald Hewes <hewes@openmarket.com>. | 1182 | # From Gerald Hewes <hewes@openmarket.com>. |
| 1148 | # How about differentiating between stratus architectures? -djm | 1183 | # How about differentiating between stratus architectures? -djm |
| @@ -1168,11 +1203,11 @@ EOF | |||
| 1168 | exit ;; | 1203 | exit ;; |
| 1169 | R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*) | 1204 | R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*) |
| 1170 | if [ -d /usr/nec ]; then | 1205 | if [ -d /usr/nec ]; then |
| 1171 | echo mips-nec-sysv${UNAME_RELEASE} | 1206 | echo mips-nec-sysv${UNAME_RELEASE} |
| 1172 | else | 1207 | else |
| 1173 | echo mips-unknown-sysv${UNAME_RELEASE} | 1208 | echo mips-unknown-sysv${UNAME_RELEASE} |
| 1174 | fi | 1209 | fi |
| 1175 | exit ;; | 1210 | exit ;; |
| 1176 | BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only. | 1211 | BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only. |
| 1177 | echo powerpc-be-beos | 1212 | echo powerpc-be-beos |
| 1178 | exit ;; | 1213 | exit ;; |
| @@ -1212,16 +1247,6 @@ EOF | |||
| 1212 | *:Darwin:*:*) | 1247 | *:Darwin:*:*) |
| 1213 | UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown | 1248 | UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown |
| 1214 | case $UNAME_PROCESSOR in | 1249 | case $UNAME_PROCESSOR in |
| 1215 | i386) | ||
| 1216 | eval $set_cc_for_build | ||
| 1217 | if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then | ||
| 1218 | if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \ | ||
| 1219 | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \ | ||
| 1220 | grep IS_64BIT_ARCH >/dev/null | ||
| 1221 | then | ||
| 1222 | UNAME_PROCESSOR="x86_64" | ||
| 1223 | fi | ||
| 1224 | fi ;; | ||
| 1225 | unknown) UNAME_PROCESSOR=powerpc ;; | 1250 | unknown) UNAME_PROCESSOR=powerpc ;; |
| 1226 | esac | 1251 | esac |
| 1227 | echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE} | 1252 | echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE} |
| @@ -1237,9 +1262,6 @@ EOF | |||
| 1237 | *:QNX:*:4*) | 1262 | *:QNX:*:4*) |
| 1238 | echo i386-pc-qnx | 1263 | echo i386-pc-qnx |
| 1239 | exit ;; | 1264 | exit ;; |
| 1240 | NEO-?:NONSTOP_KERNEL:*:*) | ||
| 1241 | echo neo-tandem-nsk${UNAME_RELEASE} | ||
| 1242 | exit ;; | ||
| 1243 | NSE-?:NONSTOP_KERNEL:*:*) | 1265 | NSE-?:NONSTOP_KERNEL:*:*) |
| 1244 | echo nse-tandem-nsk${UNAME_RELEASE} | 1266 | echo nse-tandem-nsk${UNAME_RELEASE} |
| 1245 | exit ;; | 1267 | exit ;; |
| @@ -1285,13 +1307,13 @@ EOF | |||
| 1285 | echo pdp10-unknown-its | 1307 | echo pdp10-unknown-its |
| 1286 | exit ;; | 1308 | exit ;; |
| 1287 | SEI:*:*:SEIUX) | 1309 | SEI:*:*:SEIUX) |
| 1288 | echo mips-sei-seiux${UNAME_RELEASE} | 1310 | echo mips-sei-seiux${UNAME_RELEASE} |
| 1289 | exit ;; | 1311 | exit ;; |
| 1290 | *:DragonFly:*:*) | 1312 | *:DragonFly:*:*) |
| 1291 | echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` | 1313 | echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` |
| 1292 | exit ;; | 1314 | exit ;; |
| 1293 | *:*VMS:*:*) | 1315 | *:*VMS:*:*) |
| 1294 | UNAME_MACHINE=`(uname -p) 2>/dev/null` | 1316 | UNAME_MACHINE=`(uname -p) 2>/dev/null` |
| 1295 | case "${UNAME_MACHINE}" in | 1317 | case "${UNAME_MACHINE}" in |
| 1296 | A*) echo alpha-dec-vms ; exit ;; | 1318 | A*) echo alpha-dec-vms ; exit ;; |
| 1297 | I*) echo ia64-dec-vms ; exit ;; | 1319 | I*) echo ia64-dec-vms ; exit ;; |
| @@ -1331,11 +1353,11 @@ main () | |||
| 1331 | #include <sys/param.h> | 1353 | #include <sys/param.h> |
| 1332 | printf ("m68k-sony-newsos%s\n", | 1354 | printf ("m68k-sony-newsos%s\n", |
| 1333 | #ifdef NEWSOS4 | 1355 | #ifdef NEWSOS4 |
| 1334 | "4" | 1356 | "4" |
| 1335 | #else | 1357 | #else |
| 1336 | "" | 1358 | "" |
| 1337 | #endif | 1359 | #endif |
| 1338 | ); exit (0); | 1360 | ); exit (0); |
| 1339 | #endif | 1361 | #endif |
| 1340 | #endif | 1362 | #endif |
| 1341 | 1363 | ||
diff --git a/autogen/config.in b/autogen/config.in index 8889213b781..57ff5f45e0c 100644 --- a/autogen/config.in +++ b/autogen/config.in | |||
| @@ -833,6 +833,9 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | |||
| 833 | /* Define to 1 if `vfork' works. */ | 833 | /* Define to 1 if `vfork' works. */ |
| 834 | #undef HAVE_WORKING_VFORK | 834 | #undef HAVE_WORKING_VFORK |
| 835 | 835 | ||
| 836 | /* Define to 1 if you have the <ws2tcpip.h> header file. */ | ||
| 837 | #undef HAVE_WS2TCPIP_H | ||
| 838 | |||
| 836 | /* Define to 1 if you want to use version 11 of X windows. Otherwise, Emacs | 839 | /* Define to 1 if you want to use version 11 of X windows. Otherwise, Emacs |
| 837 | expects to use version 10. */ | 840 | expects to use version 10. */ |
| 838 | #undef HAVE_X11 | 841 | #undef HAVE_X11 |
| @@ -996,9 +999,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | |||
| 996 | slash */ | 999 | slash */ |
| 997 | #undef REPLACE_FUNC_STAT_FILE | 1000 | #undef REPLACE_FUNC_STAT_FILE |
| 998 | 1001 | ||
| 999 | /* Define as the return type of signal handlers (`int' or `void'). */ | ||
| 1000 | #undef RETSIGTYPE | ||
| 1001 | |||
| 1002 | /* Define to l, ll, u, ul, ull, etc., as suitable for constants of type | 1002 | /* Define to l, ll, u, ul, ull, etc., as suitable for constants of type |
| 1003 | 'sig_atomic_t'. */ | 1003 | 'sig_atomic_t'. */ |
| 1004 | #undef SIG_ATOMIC_T_SUFFIX | 1004 | #undef SIG_ATOMIC_T_SUFFIX |
| @@ -1206,6 +1206,9 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | |||
| 1206 | # define __restrict__ | 1206 | # define __restrict__ |
| 1207 | #endif | 1207 | #endif |
| 1208 | 1208 | ||
| 1209 | /* type to use in place of socklen_t if not defined */ | ||
| 1210 | #undef socklen_t | ||
| 1211 | |||
| 1209 | /* Define to any substitute for sys_siglist. */ | 1212 | /* Define to any substitute for sys_siglist. */ |
| 1210 | #undef sys_siglist | 1213 | #undef sys_siglist |
| 1211 | 1214 | ||
| @@ -1268,11 +1271,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | |||
| 1268 | # define SYSTEM_PURESIZE_EXTRA 30000 | 1271 | # define SYSTEM_PURESIZE_EXTRA 30000 |
| 1269 | #endif | 1272 | #endif |
| 1270 | 1273 | ||
| 1271 | /* SIGTYPE is the macro we actually use. */ | ||
| 1272 | #ifndef SIGTYPE | ||
| 1273 | #define SIGTYPE RETSIGTYPE | ||
| 1274 | #endif | ||
| 1275 | |||
| 1276 | #ifdef emacs /* Don't do this for lib-src. */ | 1274 | #ifdef emacs /* Don't do this for lib-src. */ |
| 1277 | /* Tell regex.c to use a type compatible with Emacs. */ | 1275 | /* Tell regex.c to use a type compatible with Emacs. */ |
| 1278 | #define RE_TRANSLATE_TYPE Lisp_Object | 1276 | #define RE_TRANSLATE_TYPE Lisp_Object |
diff --git a/config.sub b/autogen/config.sub index 0ef29b072ed..eb0389a693f 100755 --- a/config.sub +++ b/autogen/config.sub | |||
| @@ -1,10 +1,10 @@ | |||
| 1 | #! /bin/sh | 1 | #! /bin/sh |
| 2 | # Configuration validation subroutine script. | 2 | # Configuration validation subroutine script. |
| 3 | # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, | 3 | # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, |
| 4 | # 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, | 4 | # 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 |
| 5 | # 2011 Free Software Foundation, Inc. | 5 | # Free Software Foundation, Inc. |
| 6 | 6 | ||
| 7 | timestamp='2011-02-24' | 7 | timestamp='2009-06-11' |
| 8 | 8 | ||
| 9 | # This file is (in principle) common to ALL GNU software. | 9 | # This file is (in principle) common to ALL GNU software. |
| 10 | # The presence of a machine in this file suggests that SOME GNU software | 10 | # The presence of a machine in this file suggests that SOME GNU software |
| @@ -32,16 +32,13 @@ timestamp='2011-02-24' | |||
| 32 | 32 | ||
| 33 | 33 | ||
| 34 | # Please send patches to <config-patches@gnu.org>. Submit a context | 34 | # Please send patches to <config-patches@gnu.org>. Submit a context |
| 35 | # diff and a properly formatted GNU ChangeLog entry. | 35 | # diff and a properly formatted ChangeLog entry. |
| 36 | # | 36 | # |
| 37 | # Configuration subroutine to validate and canonicalize a configuration type. | 37 | # Configuration subroutine to validate and canonicalize a configuration type. |
| 38 | # Supply the specified configuration type as an argument. | 38 | # Supply the specified configuration type as an argument. |
| 39 | # If it is invalid, we print an error message on stderr and exit with code 1. | 39 | # If it is invalid, we print an error message on stderr and exit with code 1. |
| 40 | # Otherwise, we print the canonical config type on stdout and succeed. | 40 | # Otherwise, we print the canonical config type on stdout and succeed. |
| 41 | 41 | ||
| 42 | # You can get the latest version of this script from: | ||
| 43 | # http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD | ||
| 44 | |||
| 45 | # This file is supposed to be the same for all GNU packages | 42 | # This file is supposed to be the same for all GNU packages |
| 46 | # and recognize all the CPU types, system types and aliases | 43 | # and recognize all the CPU types, system types and aliases |
| 47 | # that are meaningful with *any* GNU software. | 44 | # that are meaningful with *any* GNU software. |
| @@ -75,9 +72,8 @@ Report bugs and patches to <config-patches@gnu.org>." | |||
| 75 | version="\ | 72 | version="\ |
| 76 | GNU config.sub ($timestamp) | 73 | GNU config.sub ($timestamp) |
| 77 | 74 | ||
| 78 | Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, | 75 | Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, |
| 79 | 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free | 76 | 2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. |
| 80 | Software Foundation, Inc. | ||
| 81 | 77 | ||
| 82 | This is free software; see the source for copying conditions. There is NO | 78 | This is free software; see the source for copying conditions. There is NO |
| 83 | warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." | 79 | warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." |
| @@ -124,9 +120,8 @@ esac | |||
| 124 | # Here we must recognize all the valid KERNEL-OS combinations. | 120 | # Here we must recognize all the valid KERNEL-OS combinations. |
| 125 | maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'` | 121 | maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'` |
| 126 | case $maybe_os in | 122 | case $maybe_os in |
| 127 | nto-qnx* | linux-gnu* | linux-android* | linux-dietlibc | linux-newlib* | \ | 123 | nto-qnx* | linux-gnu* | linux-dietlibc | linux-newlib* | linux-uclibc* | \ |
| 128 | linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | \ | 124 | uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* | \ |
| 129 | knetbsd*-gnu* | netbsd*-gnu* | \ | ||
| 130 | kopensolaris*-gnu* | \ | 125 | kopensolaris*-gnu* | \ |
| 131 | storm-chaos* | os2-emx* | rtmk-nova*) | 126 | storm-chaos* | os2-emx* | rtmk-nova*) |
| 132 | os=-$maybe_os | 127 | os=-$maybe_os |
| @@ -154,12 +149,12 @@ case $os in | |||
| 154 | -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\ | 149 | -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\ |
| 155 | -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \ | 150 | -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \ |
| 156 | -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \ | 151 | -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \ |
| 157 | -apple | -axis | -knuth | -cray | -microblaze) | 152 | -apple | -axis | -knuth | -cray) |
| 158 | os= | 153 | os= |
| 159 | basic_machine=$1 | 154 | basic_machine=$1 |
| 160 | ;; | 155 | ;; |
| 161 | -bluegene*) | 156 | -bluegene*) |
| 162 | os=-cnk | 157 | os=-cnk |
| 163 | ;; | 158 | ;; |
| 164 | -sim | -cisco | -oki | -wec | -winbond) | 159 | -sim | -cisco | -oki | -wec | -winbond) |
| 165 | os= | 160 | os= |
| @@ -175,10 +170,10 @@ case $os in | |||
| 175 | os=-chorusos | 170 | os=-chorusos |
| 176 | basic_machine=$1 | 171 | basic_machine=$1 |
| 177 | ;; | 172 | ;; |
| 178 | -chorusrdb) | 173 | -chorusrdb) |
| 179 | os=-chorusrdb | 174 | os=-chorusrdb |
| 180 | basic_machine=$1 | 175 | basic_machine=$1 |
| 181 | ;; | 176 | ;; |
| 182 | -hiux*) | 177 | -hiux*) |
| 183 | os=-hiuxwe2 | 178 | os=-hiuxwe2 |
| 184 | ;; | 179 | ;; |
| @@ -283,38 +278,26 @@ case $basic_machine in | |||
| 283 | | moxie \ | 278 | | moxie \ |
| 284 | | mt \ | 279 | | mt \ |
| 285 | | msp430 \ | 280 | | msp430 \ |
| 286 | | nds32 | nds32le | nds32be \ | ||
| 287 | | nios | nios2 \ | 281 | | nios | nios2 \ |
| 288 | | ns16k | ns32k \ | 282 | | ns16k | ns32k \ |
| 289 | | or32 \ | 283 | | or32 \ |
| 290 | | pdp10 | pdp11 | pj | pjl \ | 284 | | pdp10 | pdp11 | pj | pjl \ |
| 291 | | powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \ | 285 | | powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \ |
| 292 | | pyramid \ | 286 | | pyramid \ |
| 293 | | rx \ | ||
| 294 | | score \ | 287 | | score \ |
| 295 | | sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \ | 288 | | sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \ |
| 296 | | sh64 | sh64le \ | 289 | | sh64 | sh64le \ |
| 297 | | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \ | 290 | | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \ |
| 298 | | sparcv8 | sparcv9 | sparcv9b | sparcv9v \ | 291 | | sparcv8 | sparcv9 | sparcv9b | sparcv9v \ |
| 299 | | spu | strongarm \ | 292 | | spu | strongarm \ |
| 300 | | tahoe | thumb | tic4x | tic54x | tic55x | tic6x | tic80 | tron \ | 293 | | tahoe | thumb | tic4x | tic80 | tron \ |
| 301 | | ubicom32 \ | ||
| 302 | | v850 | v850e \ | 294 | | v850 | v850e \ |
| 303 | | we32k \ | 295 | | we32k \ |
| 304 | | x86 | xc16x | xscale | xscalee[bl] | xstormy16 | xtensa \ | 296 | | x86 | xc16x | xscale | xscalee[bl] | xstormy16 | xtensa \ |
| 305 | | z8k | z80) | 297 | | z8k | z80) |
| 306 | basic_machine=$basic_machine-unknown | 298 | basic_machine=$basic_machine-unknown |
| 307 | ;; | 299 | ;; |
| 308 | c54x) | 300 | m6811 | m68hc11 | m6812 | m68hc12) |
| 309 | basic_machine=tic54x-unknown | ||
| 310 | ;; | ||
| 311 | c55x) | ||
| 312 | basic_machine=tic55x-unknown | ||
| 313 | ;; | ||
| 314 | c6x) | ||
| 315 | basic_machine=tic6x-unknown | ||
| 316 | ;; | ||
| 317 | m6811 | m68hc11 | m6812 | m68hc12 | picochip) | ||
| 318 | # Motorola 68HC11/12. | 301 | # Motorola 68HC11/12. |
| 319 | basic_machine=$basic_machine-unknown | 302 | basic_machine=$basic_machine-unknown |
| 320 | os=-none | 303 | os=-none |
| @@ -345,7 +328,7 @@ case $basic_machine in | |||
| 345 | | arm-* | armbe-* | armle-* | armeb-* | armv*-* \ | 328 | | arm-* | armbe-* | armle-* | armeb-* | armv*-* \ |
| 346 | | avr-* | avr32-* \ | 329 | | avr-* | avr32-* \ |
| 347 | | bfin-* | bs2000-* \ | 330 | | bfin-* | bs2000-* \ |
| 348 | | c[123]* | c30-* | [cjt]90-* | c4x-* \ | 331 | | c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \ |
| 349 | | clipper-* | craynv-* | cydra-* \ | 332 | | clipper-* | craynv-* | cydra-* \ |
| 350 | | d10v-* | d30v-* | dlx-* \ | 333 | | d10v-* | d30v-* | dlx-* \ |
| 351 | | elxsi-* \ | 334 | | elxsi-* \ |
| @@ -357,7 +340,7 @@ case $basic_machine in | |||
| 357 | | lm32-* \ | 340 | | lm32-* \ |
| 358 | | m32c-* | m32r-* | m32rle-* \ | 341 | | m32c-* | m32r-* | m32rle-* \ |
| 359 | | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \ | 342 | | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \ |
| 360 | | m88110-* | m88k-* | maxq-* | mcore-* | metag-* | microblaze-* \ | 343 | | m88110-* | m88k-* | maxq-* | mcore-* | metag-* \ |
| 361 | | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \ | 344 | | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \ |
| 362 | | mips16-* \ | 345 | | mips16-* \ |
| 363 | | mips64-* | mips64el-* \ | 346 | | mips64-* | mips64el-* \ |
| @@ -379,24 +362,21 @@ case $basic_machine in | |||
| 379 | | mmix-* \ | 362 | | mmix-* \ |
| 380 | | mt-* \ | 363 | | mt-* \ |
| 381 | | msp430-* \ | 364 | | msp430-* \ |
| 382 | | nds32-* | nds32le-* | nds32be-* \ | ||
| 383 | | nios-* | nios2-* \ | 365 | | nios-* | nios2-* \ |
| 384 | | none-* | np1-* | ns16k-* | ns32k-* \ | 366 | | none-* | np1-* | ns16k-* | ns32k-* \ |
| 385 | | orion-* \ | 367 | | orion-* \ |
| 386 | | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \ | 368 | | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \ |
| 387 | | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \ | 369 | | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \ |
| 388 | | pyramid-* \ | 370 | | pyramid-* \ |
| 389 | | romp-* | rs6000-* | rx-* \ | 371 | | romp-* | rs6000-* \ |
| 390 | | sh-* | sh[1234]-* | sh[24]a-* | sh[24]aeb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \ | 372 | | sh-* | sh[1234]-* | sh[24]a-* | sh[24]aeb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \ |
| 391 | | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \ | 373 | | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \ |
| 392 | | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \ | 374 | | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \ |
| 393 | | sparclite-* \ | 375 | | sparclite-* \ |
| 394 | | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | strongarm-* | sv1-* | sx?-* \ | 376 | | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | strongarm-* | sv1-* | sx?-* \ |
| 395 | | tahoe-* | thumb-* \ | 377 | | tahoe-* | thumb-* \ |
| 396 | | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \ | 378 | | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* | tile-* \ |
| 397 | | tile-* | tilegx-* \ | ||
| 398 | | tron-* \ | 379 | | tron-* \ |
| 399 | | ubicom32-* \ | ||
| 400 | | v850-* | v850e-* | vax-* \ | 380 | | v850-* | v850e-* | vax-* \ |
| 401 | | we32k-* \ | 381 | | we32k-* \ |
| 402 | | x86-* | x86_64-* | xc16x-* | xps100-* | xscale-* | xscalee[bl]-* \ | 382 | | x86-* | x86_64-* | xc16x-* | xps100-* | xscale-* | xscalee[bl]-* \ |
| @@ -424,7 +404,7 @@ case $basic_machine in | |||
| 424 | basic_machine=a29k-amd | 404 | basic_machine=a29k-amd |
| 425 | os=-udi | 405 | os=-udi |
| 426 | ;; | 406 | ;; |
| 427 | abacus) | 407 | abacus) |
| 428 | basic_machine=abacus-unknown | 408 | basic_machine=abacus-unknown |
| 429 | ;; | 409 | ;; |
| 430 | adobe68k) | 410 | adobe68k) |
| @@ -494,20 +474,11 @@ case $basic_machine in | |||
| 494 | basic_machine=powerpc-ibm | 474 | basic_machine=powerpc-ibm |
| 495 | os=-cnk | 475 | os=-cnk |
| 496 | ;; | 476 | ;; |
| 497 | c54x-*) | ||
| 498 | basic_machine=tic54x-`echo $basic_machine | sed 's/^[^-]*-//'` | ||
| 499 | ;; | ||
| 500 | c55x-*) | ||
| 501 | basic_machine=tic55x-`echo $basic_machine | sed 's/^[^-]*-//'` | ||
| 502 | ;; | ||
| 503 | c6x-*) | ||
| 504 | basic_machine=tic6x-`echo $basic_machine | sed 's/^[^-]*-//'` | ||
| 505 | ;; | ||
| 506 | c90) | 477 | c90) |
| 507 | basic_machine=c90-cray | 478 | basic_machine=c90-cray |
| 508 | os=-unicos | 479 | os=-unicos |
| 509 | ;; | 480 | ;; |
| 510 | cegcc) | 481 | cegcc) |
| 511 | basic_machine=arm-unknown | 482 | basic_machine=arm-unknown |
| 512 | os=-cegcc | 483 | os=-cegcc |
| 513 | ;; | 484 | ;; |
| @@ -539,7 +510,7 @@ case $basic_machine in | |||
| 539 | basic_machine=craynv-cray | 510 | basic_machine=craynv-cray |
| 540 | os=-unicosmp | 511 | os=-unicosmp |
| 541 | ;; | 512 | ;; |
| 542 | cr16 | cr16-*) | 513 | cr16) |
| 543 | basic_machine=cr16-unknown | 514 | basic_machine=cr16-unknown |
| 544 | os=-elf | 515 | os=-elf |
| 545 | ;; | 516 | ;; |
| @@ -755,9 +726,6 @@ case $basic_machine in | |||
| 755 | basic_machine=ns32k-utek | 726 | basic_machine=ns32k-utek |
| 756 | os=-sysv | 727 | os=-sysv |
| 757 | ;; | 728 | ;; |
| 758 | microblaze) | ||
| 759 | basic_machine=microblaze-xilinx | ||
| 760 | ;; | ||
| 761 | mingw32) | 729 | mingw32) |
| 762 | basic_machine=i386-pc | 730 | basic_machine=i386-pc |
| 763 | os=-mingw32 | 731 | os=-mingw32 |
| @@ -862,12 +830,6 @@ case $basic_machine in | |||
| 862 | np1) | 830 | np1) |
| 863 | basic_machine=np1-gould | 831 | basic_machine=np1-gould |
| 864 | ;; | 832 | ;; |
| 865 | neo-tandem) | ||
| 866 | basic_machine=neo-tandem | ||
| 867 | ;; | ||
| 868 | nse-tandem) | ||
| 869 | basic_machine=nse-tandem | ||
| 870 | ;; | ||
| 871 | nsr-tandem) | 833 | nsr-tandem) |
| 872 | basic_machine=nsr-tandem | 834 | basic_machine=nsr-tandem |
| 873 | ;; | 835 | ;; |
| @@ -1102,10 +1064,17 @@ case $basic_machine in | |||
| 1102 | basic_machine=t90-cray | 1064 | basic_machine=t90-cray |
| 1103 | os=-unicos | 1065 | os=-unicos |
| 1104 | ;; | 1066 | ;; |
| 1105 | # This must be matched before tile*. | 1067 | tic54x | c54x*) |
| 1106 | tilegx*) | 1068 | basic_machine=tic54x-unknown |
| 1107 | basic_machine=tilegx-unknown | 1069 | os=-coff |
| 1108 | os=-linux-gnu | 1070 | ;; |
| 1071 | tic55x | c55x*) | ||
| 1072 | basic_machine=tic55x-unknown | ||
| 1073 | os=-coff | ||
| 1074 | ;; | ||
| 1075 | tic6x | c6x*) | ||
| 1076 | basic_machine=tic6x-unknown | ||
| 1077 | os=-coff | ||
| 1109 | ;; | 1078 | ;; |
| 1110 | tile*) | 1079 | tile*) |
| 1111 | basic_machine=tile-unknown | 1080 | basic_machine=tile-unknown |
| @@ -1275,12 +1244,9 @@ esac | |||
| 1275 | if [ x"$os" != x"" ] | 1244 | if [ x"$os" != x"" ] |
| 1276 | then | 1245 | then |
| 1277 | case $os in | 1246 | case $os in |
| 1278 | # First match some system type aliases | 1247 | # First match some system type aliases |
| 1279 | # that might get confused with valid system types. | 1248 | # that might get confused with valid system types. |
| 1280 | # -solaris* is a basic system type, with this one exception. | 1249 | # -solaris* is a basic system type, with this one exception. |
| 1281 | -auroraux) | ||
| 1282 | os=-auroraux | ||
| 1283 | ;; | ||
| 1284 | -solaris1 | -solaris1.*) | 1250 | -solaris1 | -solaris1.*) |
| 1285 | os=`echo $os | sed -e 's|solaris1|sunos4|'` | 1251 | os=`echo $os | sed -e 's|solaris1|sunos4|'` |
| 1286 | ;; | 1252 | ;; |
| @@ -1302,8 +1268,8 @@ case $os in | |||
| 1302 | # -sysv* is not here because it comes later, after sysvr4. | 1268 | # -sysv* is not here because it comes later, after sysvr4. |
| 1303 | -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \ | 1269 | -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \ |
| 1304 | | -*vms* | -sco* | -esix* | -isc* | -aix* | -cnk* | -sunos | -sunos[34]*\ | 1270 | | -*vms* | -sco* | -esix* | -isc* | -aix* | -cnk* | -sunos | -sunos[34]*\ |
| 1305 | | -hpux* | -unos* | -osf* | -luna* | -dgux* | -auroraux* | -solaris* \ | 1271 | | -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \ |
| 1306 | | -sym* | -kopensolaris* \ | 1272 | | -kopensolaris* \ |
| 1307 | | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \ | 1273 | | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \ |
| 1308 | | -aos* | -aros* \ | 1274 | | -aos* | -aros* \ |
| 1309 | | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \ | 1275 | | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \ |
| @@ -1316,8 +1282,7 @@ case $os in | |||
| 1316 | | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \ | 1282 | | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \ |
| 1317 | | -chorusos* | -chorusrdb* | -cegcc* \ | 1283 | | -chorusos* | -chorusrdb* | -cegcc* \ |
| 1318 | | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ | 1284 | | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ |
| 1319 | | -mingw32* | -linux-gnu* | -linux-android* \ | 1285 | | -mingw32* | -linux-gnu* | -linux-newlib* | -linux-uclibc* \ |
| 1320 | | -linux-newlib* | -linux-uclibc* \ | ||
| 1321 | | -uxpv* | -beos* | -mpeix* | -udk* \ | 1286 | | -uxpv* | -beos* | -mpeix* | -udk* \ |
| 1322 | | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \ | 1287 | | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \ |
| 1323 | | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \ | 1288 | | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \ |
| @@ -1325,7 +1290,7 @@ case $os in | |||
| 1325 | | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \ | 1290 | | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \ |
| 1326 | | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \ | 1291 | | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \ |
| 1327 | | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \ | 1292 | | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \ |
| 1328 | | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es*) | 1293 | | -skyos* | -haiku* | -rdos* | -toppers* | -drops*) |
| 1329 | # Remember, each alternative MUST END IN *, to match a version number. | 1294 | # Remember, each alternative MUST END IN *, to match a version number. |
| 1330 | ;; | 1295 | ;; |
| 1331 | -qnx*) | 1296 | -qnx*) |
| @@ -1364,7 +1329,7 @@ case $os in | |||
| 1364 | -opened*) | 1329 | -opened*) |
| 1365 | os=-openedition | 1330 | os=-openedition |
| 1366 | ;; | 1331 | ;; |
| 1367 | -os400*) | 1332 | -os400*) |
| 1368 | os=-os400 | 1333 | os=-os400 |
| 1369 | ;; | 1334 | ;; |
| 1370 | -wince*) | 1335 | -wince*) |
| @@ -1413,7 +1378,7 @@ case $os in | |||
| 1413 | -sinix*) | 1378 | -sinix*) |
| 1414 | os=-sysv4 | 1379 | os=-sysv4 |
| 1415 | ;; | 1380 | ;; |
| 1416 | -tpf*) | 1381 | -tpf*) |
| 1417 | os=-tpf | 1382 | os=-tpf |
| 1418 | ;; | 1383 | ;; |
| 1419 | -triton*) | 1384 | -triton*) |
| @@ -1458,8 +1423,6 @@ case $os in | |||
| 1458 | -dicos*) | 1423 | -dicos*) |
| 1459 | os=-dicos | 1424 | os=-dicos |
| 1460 | ;; | 1425 | ;; |
| 1461 | -nacl*) | ||
| 1462 | ;; | ||
| 1463 | -none) | 1426 | -none) |
| 1464 | ;; | 1427 | ;; |
| 1465 | *) | 1428 | *) |
| @@ -1482,10 +1445,10 @@ else | |||
| 1482 | # system, and we'll never get to this point. | 1445 | # system, and we'll never get to this point. |
| 1483 | 1446 | ||
| 1484 | case $basic_machine in | 1447 | case $basic_machine in |
| 1485 | score-*) | 1448 | score-*) |
| 1486 | os=-elf | 1449 | os=-elf |
| 1487 | ;; | 1450 | ;; |
| 1488 | spu-*) | 1451 | spu-*) |
| 1489 | os=-elf | 1452 | os=-elf |
| 1490 | ;; | 1453 | ;; |
| 1491 | *-acorn) | 1454 | *-acorn) |
| @@ -1497,17 +1460,8 @@ case $basic_machine in | |||
| 1497 | arm*-semi) | 1460 | arm*-semi) |
| 1498 | os=-aout | 1461 | os=-aout |
| 1499 | ;; | 1462 | ;; |
| 1500 | c4x-* | tic4x-*) | 1463 | c4x-* | tic4x-*) |
| 1501 | os=-coff | 1464 | os=-coff |
| 1502 | ;; | ||
| 1503 | tic54x-*) | ||
| 1504 | os=-coff | ||
| 1505 | ;; | ||
| 1506 | tic55x-*) | ||
| 1507 | os=-coff | ||
| 1508 | ;; | ||
| 1509 | tic6x-*) | ||
| 1510 | os=-coff | ||
| 1511 | ;; | 1465 | ;; |
| 1512 | # This must come before the *-dec entry. | 1466 | # This must come before the *-dec entry. |
| 1513 | pdp10-*) | 1467 | pdp10-*) |
| @@ -1534,7 +1488,7 @@ case $basic_machine in | |||
| 1534 | m68*-cisco) | 1488 | m68*-cisco) |
| 1535 | os=-aout | 1489 | os=-aout |
| 1536 | ;; | 1490 | ;; |
| 1537 | mep-*) | 1491 | mep-*) |
| 1538 | os=-elf | 1492 | os=-elf |
| 1539 | ;; | 1493 | ;; |
| 1540 | mips*-cisco) | 1494 | mips*-cisco) |
| @@ -1561,7 +1515,7 @@ case $basic_machine in | |||
| 1561 | *-ibm) | 1515 | *-ibm) |
| 1562 | os=-aix | 1516 | os=-aix |
| 1563 | ;; | 1517 | ;; |
| 1564 | *-knuth) | 1518 | *-knuth) |
| 1565 | os=-mmixware | 1519 | os=-mmixware |
| 1566 | ;; | 1520 | ;; |
| 1567 | *-wec) | 1521 | *-wec) |
diff --git a/autogen/configure b/autogen/configure index 4c45db1badd..94c65d62ccd 100755 --- a/autogen/configure +++ b/autogen/configure | |||
| @@ -673,6 +673,93 @@ NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H | |||
| 673 | NEXT_SYS_STAT_H | 673 | NEXT_SYS_STAT_H |
| 674 | NEXT_AS_FIRST_DIRECTIVE_STDLIB_H | 674 | NEXT_AS_FIRST_DIRECTIVE_STDLIB_H |
| 675 | NEXT_STDLIB_H | 675 | NEXT_STDLIB_H |
| 676 | NEXT_AS_FIRST_DIRECTIVE_STDIO_H | ||
| 677 | NEXT_STDIO_H | ||
| 678 | REPLACE_VSPRINTF | ||
| 679 | REPLACE_VSNPRINTF | ||
| 680 | REPLACE_VPRINTF | ||
| 681 | REPLACE_VFPRINTF | ||
| 682 | REPLACE_VDPRINTF | ||
| 683 | REPLACE_VASPRINTF | ||
| 684 | REPLACE_TMPFILE | ||
| 685 | REPLACE_STDIO_WRITE_FUNCS | ||
| 686 | REPLACE_SPRINTF | ||
| 687 | REPLACE_SNPRINTF | ||
| 688 | REPLACE_RENAMEAT | ||
| 689 | REPLACE_RENAME | ||
| 690 | REPLACE_REMOVE | ||
| 691 | REPLACE_PRINTF | ||
| 692 | REPLACE_POPEN | ||
| 693 | REPLACE_PERROR | ||
| 694 | REPLACE_OBSTACK_PRINTF | ||
| 695 | REPLACE_GETLINE | ||
| 696 | REPLACE_GETDELIM | ||
| 697 | REPLACE_FTELLO | ||
| 698 | REPLACE_FTELL | ||
| 699 | REPLACE_FSEEKO | ||
| 700 | REPLACE_FSEEK | ||
| 701 | REPLACE_FREOPEN | ||
| 702 | REPLACE_FPURGE | ||
| 703 | REPLACE_FPRINTF | ||
| 704 | REPLACE_FOPEN | ||
| 705 | REPLACE_FFLUSH | ||
| 706 | REPLACE_FCLOSE | ||
| 707 | REPLACE_DPRINTF | ||
| 708 | HAVE_VDPRINTF | ||
| 709 | HAVE_VASPRINTF | ||
| 710 | HAVE_RENAMEAT | ||
| 711 | HAVE_FTELLO | ||
| 712 | HAVE_FSEEKO | ||
| 713 | HAVE_DPRINTF | ||
| 714 | HAVE_DECL_VSNPRINTF | ||
| 715 | HAVE_DECL_SNPRINTF | ||
| 716 | HAVE_DECL_OBSTACK_PRINTF | ||
| 717 | HAVE_DECL_GETLINE | ||
| 718 | HAVE_DECL_GETDELIM | ||
| 719 | HAVE_DECL_FTELLO | ||
| 720 | HAVE_DECL_FSEEKO | ||
| 721 | HAVE_DECL_FPURGE | ||
| 722 | GNULIB_VSPRINTF_POSIX | ||
| 723 | GNULIB_VSNPRINTF | ||
| 724 | GNULIB_VPRINTF_POSIX | ||
| 725 | GNULIB_VPRINTF | ||
| 726 | GNULIB_VFPRINTF_POSIX | ||
| 727 | GNULIB_VFPRINTF | ||
| 728 | GNULIB_VDPRINTF | ||
| 729 | GNULIB_VASPRINTF | ||
| 730 | GNULIB_TMPFILE | ||
| 731 | GNULIB_STDIO_H_SIGPIPE | ||
| 732 | GNULIB_SPRINTF_POSIX | ||
| 733 | GNULIB_SNPRINTF | ||
| 734 | GNULIB_RENAMEAT | ||
| 735 | GNULIB_RENAME | ||
| 736 | GNULIB_REMOVE | ||
| 737 | GNULIB_PUTS | ||
| 738 | GNULIB_PUTCHAR | ||
| 739 | GNULIB_PUTC | ||
| 740 | GNULIB_PRINTF_POSIX | ||
| 741 | GNULIB_PRINTF | ||
| 742 | GNULIB_POPEN | ||
| 743 | GNULIB_PERROR | ||
| 744 | GNULIB_OBSTACK_PRINTF_POSIX | ||
| 745 | GNULIB_OBSTACK_PRINTF | ||
| 746 | GNULIB_GETLINE | ||
| 747 | GNULIB_GETDELIM | ||
| 748 | GNULIB_FWRITE | ||
| 749 | GNULIB_FTELLO | ||
| 750 | GNULIB_FTELL | ||
| 751 | GNULIB_FSEEKO | ||
| 752 | GNULIB_FSEEK | ||
| 753 | GNULIB_FREOPEN | ||
| 754 | GNULIB_FPUTS | ||
| 755 | GNULIB_FPUTC | ||
| 756 | GNULIB_FPURGE | ||
| 757 | GNULIB_FPRINTF_POSIX | ||
| 758 | GNULIB_FPRINTF | ||
| 759 | GNULIB_FOPEN | ||
| 760 | GNULIB_FFLUSH | ||
| 761 | GNULIB_FCLOSE | ||
| 762 | GNULIB_DPRINTF | ||
| 676 | STDINT_H | 763 | STDINT_H |
| 677 | WINT_T_SUFFIX | 764 | WINT_T_SUFFIX |
| 678 | WCHAR_T_SUFFIX | 765 | WCHAR_T_SUFFIX |
| @@ -2943,6 +3030,7 @@ as_fn_append ac_header_list " getopt.h" | |||
| 2943 | as_fn_append ac_func_list " lstat" | 3030 | as_fn_append ac_func_list " lstat" |
| 2944 | as_fn_append ac_func_list " alarm" | 3031 | as_fn_append ac_func_list " alarm" |
| 2945 | as_fn_append ac_func_list " readlink" | 3032 | as_fn_append ac_func_list " readlink" |
| 3033 | as_fn_append ac_header_list " sys/socket.h" | ||
| 2946 | as_fn_append ac_header_list " wchar.h" | 3034 | as_fn_append ac_header_list " wchar.h" |
| 2947 | as_fn_append ac_header_list " stdint.h" | 3035 | as_fn_append ac_header_list " stdint.h" |
| 2948 | as_fn_append ac_func_list " tzset" | 3036 | as_fn_append ac_func_list " tzset" |
| @@ -6120,10 +6208,12 @@ $as_echo "$ac_cv_safe_to_define___extensions__" >&6; } | |||
| 6120 | # Code from module mktime: | 6208 | # Code from module mktime: |
| 6121 | # Code from module multiarch: | 6209 | # Code from module multiarch: |
| 6122 | # Code from module readlink: | 6210 | # Code from module readlink: |
| 6211 | # Code from module socklen: | ||
| 6123 | # Code from module stat: | 6212 | # Code from module stat: |
| 6124 | # Code from module stdbool: | 6213 | # Code from module stdbool: |
| 6125 | # Code from module stddef: | 6214 | # Code from module stddef: |
| 6126 | # Code from module stdint: | 6215 | # Code from module stdint: |
| 6216 | # Code from module stdio: | ||
| 6127 | # Code from module stdlib: | 6217 | # Code from module stdlib: |
| 6128 | # Code from module strftime: | 6218 | # Code from module strftime: |
| 6129 | # Code from module symlink: | 6219 | # Code from module symlink: |
| @@ -7809,40 +7899,6 @@ $as_echo "#define HAVE_STRUCT_UTIMBUF 1" >>confdefs.h | |||
| 7809 | 7899 | ||
| 7810 | fi | 7900 | fi |
| 7811 | 7901 | ||
| 7812 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking return type of signal handlers" >&5 | ||
| 7813 | $as_echo_n "checking return type of signal handlers... " >&6; } | ||
| 7814 | if test "${ac_cv_type_signal+set}" = set; then : | ||
| 7815 | $as_echo_n "(cached) " >&6 | ||
| 7816 | else | ||
| 7817 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | ||
| 7818 | /* end confdefs.h. */ | ||
| 7819 | #include <sys/types.h> | ||
| 7820 | #include <signal.h> | ||
| 7821 | |||
| 7822 | int | ||
| 7823 | main () | ||
| 7824 | { | ||
| 7825 | return *(signal (0, 0)) (0) == 1; | ||
| 7826 | ; | ||
| 7827 | return 0; | ||
| 7828 | } | ||
| 7829 | _ACEOF | ||
| 7830 | if ac_fn_c_try_compile "$LINENO"; then : | ||
| 7831 | ac_cv_type_signal=int | ||
| 7832 | else | ||
| 7833 | ac_cv_type_signal=void | ||
| 7834 | fi | ||
| 7835 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | ||
| 7836 | fi | ||
| 7837 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_signal" >&5 | ||
| 7838 | $as_echo "$ac_cv_type_signal" >&6; } | ||
| 7839 | |||
| 7840 | cat >>confdefs.h <<_ACEOF | ||
| 7841 | #define RETSIGTYPE $ac_cv_type_signal | ||
| 7842 | _ACEOF | ||
| 7843 | |||
| 7844 | |||
| 7845 | |||
| 7846 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for speed_t" >&5 | 7902 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for speed_t" >&5 |
| 7847 | $as_echo_n "checking for speed_t... " >&6; } | 7903 | $as_echo_n "checking for speed_t... " >&6; } |
| 7848 | if test "${emacs_cv_speed_t+set}" = set; then : | 7904 | if test "${emacs_cv_speed_t+set}" = set; then : |
| @@ -7947,18 +8003,6 @@ $as_echo "#define NO_MATHERR 1" >>confdefs.h | |||
| 7947 | 8003 | ||
| 7948 | fi | 8004 | fi |
| 7949 | 8005 | ||
| 7950 | for ac_header in sys/socket.h | ||
| 7951 | do : | ||
| 7952 | ac_fn_c_check_header_mongrel "$LINENO" "sys/socket.h" "ac_cv_header_sys_socket_h" "$ac_includes_default" | ||
| 7953 | if test "x$ac_cv_header_sys_socket_h" = x""yes; then : | ||
| 7954 | cat >>confdefs.h <<_ACEOF | ||
| 7955 | #define HAVE_SYS_SOCKET_H 1 | ||
| 7956 | _ACEOF | ||
| 7957 | |||
| 7958 | fi | ||
| 7959 | |||
| 7960 | done | ||
| 7961 | |||
| 7962 | for ac_header in net/if.h | 8006 | for ac_header in net/if.h |
| 7963 | do : | 8007 | do : |
| 7964 | ac_fn_c_check_header_compile "$LINENO" "net/if.h" "ac_cv_header_net_if_h" "$ac_includes_default | 8008 | ac_fn_c_check_header_compile "$LINENO" "net/if.h" "ac_cv_header_net_if_h" "$ac_includes_default |
| @@ -8667,7 +8711,7 @@ $as_echo "$ac_enable_autodepend" >&6; } | |||
| 8667 | DEPFLAGS='-MMD -MF ${DEPDIR}/$*.d' | 8711 | DEPFLAGS='-MMD -MF ${DEPDIR}/$*.d' |
| 8668 | ## In parallel builds, another make might create depdir between | 8712 | ## In parallel builds, another make might create depdir between |
| 8669 | ## the first test and mkdir, so stick another test on the end. | 8713 | ## the first test and mkdir, so stick another test on the end. |
| 8670 | ## Or use mkinstalldirs? mkdir -p is not portable. | 8714 | ## Or use install-sh -d? mkdir -p is not portable. |
| 8671 | MKDEPDIR='test -d ${DEPDIR} || mkdir ${DEPDIR} || test -d ${DEPDIR}' | 8715 | MKDEPDIR='test -d ${DEPDIR} || mkdir ${DEPDIR} || test -d ${DEPDIR}' |
| 8672 | deps_frag=autodeps.mk | 8716 | deps_frag=autodeps.mk |
| 8673 | fi | 8717 | fi |
| @@ -14761,6 +14805,24 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |||
| 14761 | 14805 | ||
| 14762 | 14806 | ||
| 14763 | 14807 | ||
| 14808 | |||
| 14809 | |||
| 14810 | |||
| 14811 | if test $ac_cv_header_sys_socket_h = no; then | ||
| 14812 | for ac_header in ws2tcpip.h | ||
| 14813 | do : | ||
| 14814 | ac_fn_c_check_header_mongrel "$LINENO" "ws2tcpip.h" "ac_cv_header_ws2tcpip_h" "$ac_includes_default" | ||
| 14815 | if test "x$ac_cv_header_ws2tcpip_h" = x""yes; then : | ||
| 14816 | cat >>confdefs.h <<_ACEOF | ||
| 14817 | #define HAVE_WS2TCPIP_H 1 | ||
| 14818 | _ACEOF | ||
| 14819 | |||
| 14820 | fi | ||
| 14821 | |||
| 14822 | done | ||
| 14823 | |||
| 14824 | fi | ||
| 14825 | |||
| 14764 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for stdbool.h that conforms to C99" >&5 | 14826 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for stdbool.h that conforms to C99" >&5 |
| 14765 | $as_echo_n "checking for stdbool.h that conforms to C99... " >&6; } | 14827 | $as_echo_n "checking for stdbool.h that conforms to C99... " >&6; } |
| 14766 | if test "${ac_cv_header_stdbool_h+set}" = set; then : | 14828 | if test "${ac_cv_header_stdbool_h+set}" = set; then : |
| @@ -15008,6 +15070,93 @@ $as_echo "#define HAVE_LONG_LONG_INT 1" >>confdefs.h | |||
| 15008 | 15070 | ||
| 15009 | 15071 | ||
| 15010 | 15072 | ||
| 15073 | GNULIB_DPRINTF=0; | ||
| 15074 | GNULIB_FCLOSE=0; | ||
| 15075 | GNULIB_FFLUSH=0; | ||
| 15076 | GNULIB_FOPEN=0; | ||
| 15077 | GNULIB_FPRINTF=0; | ||
| 15078 | GNULIB_FPRINTF_POSIX=0; | ||
| 15079 | GNULIB_FPURGE=0; | ||
| 15080 | GNULIB_FPUTC=0; | ||
| 15081 | GNULIB_FPUTS=0; | ||
| 15082 | GNULIB_FREOPEN=0; | ||
| 15083 | GNULIB_FSEEK=0; | ||
| 15084 | GNULIB_FSEEKO=0; | ||
| 15085 | GNULIB_FTELL=0; | ||
| 15086 | GNULIB_FTELLO=0; | ||
| 15087 | GNULIB_FWRITE=0; | ||
| 15088 | GNULIB_GETDELIM=0; | ||
| 15089 | GNULIB_GETLINE=0; | ||
| 15090 | GNULIB_OBSTACK_PRINTF=0; | ||
| 15091 | GNULIB_OBSTACK_PRINTF_POSIX=0; | ||
| 15092 | GNULIB_PERROR=0; | ||
| 15093 | GNULIB_POPEN=0; | ||
| 15094 | GNULIB_PRINTF=0; | ||
| 15095 | GNULIB_PRINTF_POSIX=0; | ||
| 15096 | GNULIB_PUTC=0; | ||
| 15097 | GNULIB_PUTCHAR=0; | ||
| 15098 | GNULIB_PUTS=0; | ||
| 15099 | GNULIB_REMOVE=0; | ||
| 15100 | GNULIB_RENAME=0; | ||
| 15101 | GNULIB_RENAMEAT=0; | ||
| 15102 | GNULIB_SNPRINTF=0; | ||
| 15103 | GNULIB_SPRINTF_POSIX=0; | ||
| 15104 | GNULIB_STDIO_H_SIGPIPE=0; | ||
| 15105 | GNULIB_TMPFILE=0; | ||
| 15106 | GNULIB_VASPRINTF=0; | ||
| 15107 | GNULIB_VDPRINTF=0; | ||
| 15108 | GNULIB_VFPRINTF=0; | ||
| 15109 | GNULIB_VFPRINTF_POSIX=0; | ||
| 15110 | GNULIB_VPRINTF=0; | ||
| 15111 | GNULIB_VPRINTF_POSIX=0; | ||
| 15112 | GNULIB_VSNPRINTF=0; | ||
| 15113 | GNULIB_VSPRINTF_POSIX=0; | ||
| 15114 | HAVE_DECL_FPURGE=1; | ||
| 15115 | HAVE_DECL_FSEEKO=1; | ||
| 15116 | HAVE_DECL_FTELLO=1; | ||
| 15117 | HAVE_DECL_GETDELIM=1; | ||
| 15118 | HAVE_DECL_GETLINE=1; | ||
| 15119 | HAVE_DECL_OBSTACK_PRINTF=1; | ||
| 15120 | HAVE_DECL_SNPRINTF=1; | ||
| 15121 | HAVE_DECL_VSNPRINTF=1; | ||
| 15122 | HAVE_DPRINTF=1; | ||
| 15123 | HAVE_FSEEKO=1; | ||
| 15124 | HAVE_FTELLO=1; | ||
| 15125 | HAVE_RENAMEAT=1; | ||
| 15126 | HAVE_VASPRINTF=1; | ||
| 15127 | HAVE_VDPRINTF=1; | ||
| 15128 | REPLACE_DPRINTF=0; | ||
| 15129 | REPLACE_FCLOSE=0; | ||
| 15130 | REPLACE_FFLUSH=0; | ||
| 15131 | REPLACE_FOPEN=0; | ||
| 15132 | REPLACE_FPRINTF=0; | ||
| 15133 | REPLACE_FPURGE=0; | ||
| 15134 | REPLACE_FREOPEN=0; | ||
| 15135 | REPLACE_FSEEK=0; | ||
| 15136 | REPLACE_FSEEKO=0; | ||
| 15137 | REPLACE_FTELL=0; | ||
| 15138 | REPLACE_FTELLO=0; | ||
| 15139 | REPLACE_GETDELIM=0; | ||
| 15140 | REPLACE_GETLINE=0; | ||
| 15141 | REPLACE_OBSTACK_PRINTF=0; | ||
| 15142 | REPLACE_PERROR=0; | ||
| 15143 | REPLACE_POPEN=0; | ||
| 15144 | REPLACE_PRINTF=0; | ||
| 15145 | REPLACE_REMOVE=0; | ||
| 15146 | REPLACE_RENAME=0; | ||
| 15147 | REPLACE_RENAMEAT=0; | ||
| 15148 | REPLACE_SNPRINTF=0; | ||
| 15149 | REPLACE_SPRINTF=0; | ||
| 15150 | REPLACE_STDIO_WRITE_FUNCS=0; | ||
| 15151 | REPLACE_TMPFILE=0; | ||
| 15152 | REPLACE_VASPRINTF=0; | ||
| 15153 | REPLACE_VDPRINTF=0; | ||
| 15154 | REPLACE_VFPRINTF=0; | ||
| 15155 | REPLACE_VPRINTF=0; | ||
| 15156 | REPLACE_VSNPRINTF=0; | ||
| 15157 | REPLACE_VSPRINTF=0; | ||
| 15158 | |||
| 15159 | |||
| 15011 | ac_fn_c_check_member "$LINENO" "struct tm" "tm_gmtoff" "ac_cv_member_struct_tm_tm_gmtoff" "#include <time.h> | 15160 | ac_fn_c_check_member "$LINENO" "struct tm" "tm_gmtoff" "ac_cv_member_struct_tm_tm_gmtoff" "#include <time.h> |
| 15012 | " | 15161 | " |
| 15013 | if test "x$ac_cv_member_struct_tm_tm_gmtoff" = x""yes; then : | 15162 | if test "x$ac_cv_member_struct_tm_tm_gmtoff" = x""yes; then : |
| @@ -16333,6 +16482,70 @@ $as_echo "#define READLINK_TRAILING_SLASH_BUG 1" >>confdefs.h | |||
| 16333 | 16482 | ||
| 16334 | 16483 | ||
| 16335 | 16484 | ||
| 16485 | # Code from module socklen: | ||
| 16486 | ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" " | ||
| 16487 | /* <sys/types.h> is not needed according to POSIX, but the | ||
| 16488 | <sys/socket.h> in i386-unknown-freebsd4.10 and | ||
| 16489 | powerpc-apple-darwin5.5 required it. */ | ||
| 16490 | #include <sys/types.h> | ||
| 16491 | #if HAVE_SYS_SOCKET_H | ||
| 16492 | # include <sys/socket.h> | ||
| 16493 | #elif HAVE_WS2TCPIP_H | ||
| 16494 | # include <ws2tcpip.h> | ||
| 16495 | #endif | ||
| 16496 | |||
| 16497 | " | ||
| 16498 | if test "x$ac_cv_type_socklen_t" = x""yes; then : | ||
| 16499 | |||
| 16500 | else | ||
| 16501 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for socklen_t equivalent" >&5 | ||
| 16502 | $as_echo_n "checking for socklen_t equivalent... " >&6; } | ||
| 16503 | if test "${gl_cv_socklen_t_equiv+set}" = set; then : | ||
| 16504 | $as_echo_n "(cached) " >&6 | ||
| 16505 | else | ||
| 16506 | # Systems have either "struct sockaddr *" or | ||
| 16507 | # "void *" as the second argument to getpeername | ||
| 16508 | gl_cv_socklen_t_equiv= | ||
| 16509 | for arg2 in "struct sockaddr" void; do | ||
| 16510 | for t in int size_t "unsigned int" "long int" "unsigned long int"; do | ||
| 16511 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | ||
| 16512 | /* end confdefs.h. */ | ||
| 16513 | #include <sys/types.h> | ||
| 16514 | #include <sys/socket.h> | ||
| 16515 | |||
| 16516 | int getpeername (int, $arg2 *, $t *); | ||
| 16517 | int | ||
| 16518 | main () | ||
| 16519 | { | ||
| 16520 | $t len; | ||
| 16521 | getpeername (0, 0, &len); | ||
| 16522 | ; | ||
| 16523 | return 0; | ||
| 16524 | } | ||
| 16525 | _ACEOF | ||
| 16526 | if ac_fn_c_try_compile "$LINENO"; then : | ||
| 16527 | gl_cv_socklen_t_equiv="$t" | ||
| 16528 | fi | ||
| 16529 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | ||
| 16530 | test "$gl_cv_socklen_t_equiv" != "" && break | ||
| 16531 | done | ||
| 16532 | test "$gl_cv_socklen_t_equiv" != "" && break | ||
| 16533 | done | ||
| 16534 | |||
| 16535 | fi | ||
| 16536 | |||
| 16537 | if test "$gl_cv_socklen_t_equiv" = ""; then | ||
| 16538 | as_fn_error "Cannot find a type to use in place of socklen_t" "$LINENO" 5 | ||
| 16539 | fi | ||
| 16540 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_socklen_t_equiv" >&5 | ||
| 16541 | $as_echo "$gl_cv_socklen_t_equiv" >&6; } | ||
| 16542 | |||
| 16543 | cat >>confdefs.h <<_ACEOF | ||
| 16544 | #define socklen_t $gl_cv_socklen_t_equiv | ||
| 16545 | _ACEOF | ||
| 16546 | |||
| 16547 | fi | ||
| 16548 | |||
| 16336 | # Code from module stat: | 16549 | # Code from module stat: |
| 16337 | 16550 | ||
| 16338 | 16551 | ||
| @@ -17272,6 +17485,77 @@ _ACEOF | |||
| 17272 | fi | 17485 | fi |
| 17273 | 17486 | ||
| 17274 | 17487 | ||
| 17488 | # Code from module stdio: | ||
| 17489 | |||
| 17490 | |||
| 17491 | |||
| 17492 | |||
| 17493 | |||
| 17494 | |||
| 17495 | |||
| 17496 | |||
| 17497 | |||
| 17498 | |||
| 17499 | |||
| 17500 | if test $gl_cv_have_include_next = yes; then | ||
| 17501 | gl_cv_next_stdio_h='<'stdio.h'>' | ||
| 17502 | else | ||
| 17503 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <stdio.h>" >&5 | ||
| 17504 | $as_echo_n "checking absolute name of <stdio.h>... " >&6; } | ||
| 17505 | if test "${gl_cv_next_stdio_h+set}" = set; then : | ||
| 17506 | $as_echo_n "(cached) " >&6 | ||
| 17507 | else | ||
| 17508 | |||
| 17509 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | ||
| 17510 | /* end confdefs.h. */ | ||
| 17511 | #include <stdio.h> | ||
| 17512 | |||
| 17513 | _ACEOF | ||
| 17514 | case "$host_os" in | ||
| 17515 | aix*) gl_absname_cpp="$ac_cpp -C" ;; | ||
| 17516 | *) gl_absname_cpp="$ac_cpp" ;; | ||
| 17517 | esac | ||
| 17518 | gl_cv_next_stdio_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | | ||
| 17519 | sed -n '\#/stdio.h#{ | ||
| 17520 | s#.*"\(.*/stdio.h\)".*#\1# | ||
| 17521 | s#^/[^/]#//&# | ||
| 17522 | p | ||
| 17523 | q | ||
| 17524 | }'`'"' | ||
| 17525 | |||
| 17526 | |||
| 17527 | fi | ||
| 17528 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stdio_h" >&5 | ||
| 17529 | $as_echo "$gl_cv_next_stdio_h" >&6; } | ||
| 17530 | fi | ||
| 17531 | NEXT_STDIO_H=$gl_cv_next_stdio_h | ||
| 17532 | |||
| 17533 | if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then | ||
| 17534 | # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next' | ||
| 17535 | gl_next_as_first_directive='<'stdio.h'>' | ||
| 17536 | else | ||
| 17537 | # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' | ||
| 17538 | gl_next_as_first_directive=$gl_cv_next_stdio_h | ||
| 17539 | fi | ||
| 17540 | NEXT_AS_FIRST_DIRECTIVE_STDIO_H=$gl_next_as_first_directive | ||
| 17541 | |||
| 17542 | |||
| 17543 | |||
| 17544 | |||
| 17545 | GNULIB_FPRINTF=1 | ||
| 17546 | GNULIB_PRINTF=1 | ||
| 17547 | GNULIB_VFPRINTF=1 | ||
| 17548 | GNULIB_VPRINTF=1 | ||
| 17549 | GNULIB_FPUTC=1 | ||
| 17550 | GNULIB_PUTC=1 | ||
| 17551 | GNULIB_PUTCHAR=1 | ||
| 17552 | GNULIB_FPUTS=1 | ||
| 17553 | GNULIB_PUTS=1 | ||
| 17554 | GNULIB_FWRITE=1 | ||
| 17555 | |||
| 17556 | |||
| 17557 | |||
| 17558 | |||
| 17275 | # Code from module stdlib: | 17559 | # Code from module stdlib: |
| 17276 | 17560 | ||
| 17277 | 17561 | ||
diff --git a/autogen/copy_autogen b/autogen/copy_autogen index 4abdbd87c0f..a0daf9f02e5 100755 --- a/autogen/copy_autogen +++ b/autogen/copy_autogen | |||
| @@ -8,12 +8,18 @@ | |||
| 8 | ## regenerate configure and will fail if you do not have the required | 8 | ## regenerate configure and will fail if you do not have the required |
| 9 | ## tools. You will have to run this script again. | 9 | ## tools. You will have to run this script again. |
| 10 | 10 | ||
| 11 | test -d autogen && cd autogen | ||
| 12 | |||
| 11 | if test ! -e config.in; then | 13 | if test ! -e config.in; then |
| 12 | echo "You must run this script from the autogen/ directory." | 14 | echo "Cannot find autogen/ directory." |
| 13 | exit 1 | 15 | exit 1 |
| 14 | fi | 16 | fi |
| 15 | 17 | ||
| 16 | cp configure aclocal.m4 ../ | 18 | ## Order implied by top-level Makefile's rules, for time-stamps. |
| 19 | cp compile config.guess config.sub depcomp install-sh missing ../ | ||
| 20 | cp aclocal.m4 ../ | ||
| 21 | cp configure ../ | ||
| 22 | touch ../src/stamp-h.in | ||
| 17 | cp config.in ../src/ | 23 | cp config.in ../src/ |
| 18 | cp Makefile.in ../lib/ | 24 | cp Makefile.in ../lib/ |
| 19 | 25 | ||
diff --git a/depcomp b/autogen/depcomp index df8eea7e4ce..df8eea7e4ce 100755 --- a/depcomp +++ b/autogen/depcomp | |||
diff --git a/install-sh b/autogen/install-sh index a9244eb0786..6781b987bdb 100755 --- a/install-sh +++ b/autogen/install-sh | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | #!/bin/sh | 1 | #!/bin/sh |
| 2 | # install - install a program, script, or datafile | 2 | # install - install a program, script, or datafile |
| 3 | 3 | ||
| 4 | scriptversion=2011-01-19.21; # UTC | 4 | scriptversion=2009-04-28.21; # UTC |
| 5 | 5 | ||
| 6 | # This originates from X11R5 (mit/util/scripts/install.sh), which was | 6 | # This originates from X11R5 (mit/util/scripts/install.sh), which was |
| 7 | # later released in X11R6 (xc/config/util/install.sh) with the | 7 | # later released in X11R6 (xc/config/util/install.sh) with the |
| @@ -156,10 +156,6 @@ while test $# -ne 0; do | |||
| 156 | -s) stripcmd=$stripprog;; | 156 | -s) stripcmd=$stripprog;; |
| 157 | 157 | ||
| 158 | -t) dst_arg=$2 | 158 | -t) dst_arg=$2 |
| 159 | # Protect names problematic for `test' and other utilities. | ||
| 160 | case $dst_arg in | ||
| 161 | -* | [=\(\)!]) dst_arg=./$dst_arg;; | ||
| 162 | esac | ||
| 163 | shift;; | 159 | shift;; |
| 164 | 160 | ||
| 165 | -T) no_target_directory=true;; | 161 | -T) no_target_directory=true;; |
| @@ -190,10 +186,6 @@ if test $# -ne 0 && test -z "$dir_arg$dst_arg"; then | |||
| 190 | fi | 186 | fi |
| 191 | shift # arg | 187 | shift # arg |
| 192 | dst_arg=$arg | 188 | dst_arg=$arg |
| 193 | # Protect names problematic for `test' and other utilities. | ||
| 194 | case $dst_arg in | ||
| 195 | -* | [=\(\)!]) dst_arg=./$dst_arg;; | ||
| 196 | esac | ||
| 197 | done | 189 | done |
| 198 | fi | 190 | fi |
| 199 | 191 | ||
| @@ -208,11 +200,7 @@ if test $# -eq 0; then | |||
| 208 | fi | 200 | fi |
| 209 | 201 | ||
| 210 | if test -z "$dir_arg"; then | 202 | if test -z "$dir_arg"; then |
| 211 | do_exit='(exit $ret); exit $ret' | 203 | trap '(exit $?); exit' 1 2 13 15 |
| 212 | trap "ret=129; $do_exit" 1 | ||
| 213 | trap "ret=130; $do_exit" 2 | ||
| 214 | trap "ret=141; $do_exit" 13 | ||
| 215 | trap "ret=143; $do_exit" 15 | ||
| 216 | 204 | ||
| 217 | # Set umask so as not to create temps with too-generous modes. | 205 | # Set umask so as not to create temps with too-generous modes. |
| 218 | # However, 'strip' requires both read and write access to temps. | 206 | # However, 'strip' requires both read and write access to temps. |
| @@ -240,9 +228,9 @@ fi | |||
| 240 | 228 | ||
| 241 | for src | 229 | for src |
| 242 | do | 230 | do |
| 243 | # Protect names problematic for `test' and other utilities. | 231 | # Protect names starting with `-'. |
| 244 | case $src in | 232 | case $src in |
| 245 | -* | [=\(\)!]) src=./$src;; | 233 | -*) src=./$src;; |
| 246 | esac | 234 | esac |
| 247 | 235 | ||
| 248 | if test -n "$dir_arg"; then | 236 | if test -n "$dir_arg"; then |
| @@ -264,7 +252,12 @@ do | |||
| 264 | echo "$0: no destination specified." >&2 | 252 | echo "$0: no destination specified." >&2 |
| 265 | exit 1 | 253 | exit 1 |
| 266 | fi | 254 | fi |
| 255 | |||
| 267 | dst=$dst_arg | 256 | dst=$dst_arg |
| 257 | # Protect names starting with `-'. | ||
| 258 | case $dst in | ||
| 259 | -*) dst=./$dst;; | ||
| 260 | esac | ||
| 268 | 261 | ||
| 269 | # If destination is a directory, append the input filename; won't work | 262 | # If destination is a directory, append the input filename; won't work |
| 270 | # if double slashes aren't ignored. | 263 | # if double slashes aren't ignored. |
| @@ -392,7 +385,7 @@ do | |||
| 392 | 385 | ||
| 393 | case $dstdir in | 386 | case $dstdir in |
| 394 | /*) prefix='/';; | 387 | /*) prefix='/';; |
| 395 | [-=\(\)!]*) prefix='./';; | 388 | -*) prefix='./';; |
| 396 | *) prefix='';; | 389 | *) prefix='';; |
| 397 | esac | 390 | esac |
| 398 | 391 | ||
| @@ -410,7 +403,7 @@ do | |||
| 410 | 403 | ||
| 411 | for d | 404 | for d |
| 412 | do | 405 | do |
| 413 | test X"$d" = X && continue | 406 | test -z "$d" && continue |
| 414 | 407 | ||
| 415 | prefix=$prefix$d | 408 | prefix=$prefix$d |
| 416 | if test -d "$prefix"; then | 409 | if test -d "$prefix"; then |
diff --git a/missing b/autogen/missing index 28055d2ae6f..28055d2ae6f 100755 --- a/missing +++ b/autogen/missing | |||
diff --git a/autogen/update_autogen b/autogen/update_autogen index 0b26dd27d2b..b2a6d0b42a4 100755 --- a/autogen/update_autogen +++ b/autogen/update_autogen | |||
| @@ -28,7 +28,7 @@ | |||
| 28 | 28 | ||
| 29 | ### Code: | 29 | ### Code: |
| 30 | 30 | ||
| 31 | function die () # write error to stderr and exit | 31 | die () # write error to stderr and exit |
| 32 | { | 32 | { |
| 33 | [ $# -gt 0 ] && echo "$PN: $@" >&2 | 33 | [ $# -gt 0 ] && echo "$PN: $@" >&2 |
| 34 | exit 1 | 34 | exit 1 |
| @@ -45,7 +45,7 @@ cd ../ | |||
| 45 | [ -d autogen ] || die "Could not locate autogen directory" | 45 | [ -d autogen ] || die "Could not locate autogen directory" |
| 46 | 46 | ||
| 47 | 47 | ||
| 48 | function usage () | 48 | usage () |
| 49 | { | 49 | { |
| 50 | cat 1>&2 <<EOF | 50 | cat 1>&2 <<EOF |
| 51 | Usage: ${PN} [-f] [-c] [-q] | 51 | Usage: ${PN} [-f] [-c] [-q] |
| @@ -68,7 +68,7 @@ quiet= | |||
| 68 | 68 | ||
| 69 | ## Parameters. | 69 | ## Parameters. |
| 70 | sources="configure.in lib/Makefile.am" | 70 | sources="configure.in lib/Makefile.am" |
| 71 | genfiles="configure aclocal.m4 src/config.in lib/Makefile.in" | 71 | genfiles="configure aclocal.m4 src/config.in lib/Makefile.in compile config.guess config.sub depcomp install-sh missing" |
| 72 | 72 | ||
| 73 | for g in $genfiles; do | 73 | for g in $genfiles; do |
| 74 | basegen="$basegen ${g##*/}" | 74 | basegen="$basegen ${g##*/}" |
| @@ -104,14 +104,10 @@ OPTIND=1 | |||
| 104 | [ $# -eq 0 ] || die "Wrong number of arguments" | 104 | [ $# -eq 0 ] || die "Wrong number of arguments" |
| 105 | 105 | ||
| 106 | 106 | ||
| 107 | function msg () | 107 | [ "$quiet" ] && exec 1> /dev/null |
| 108 | { | ||
| 109 | [ "$quiet" ] && return 0 | ||
| 110 | echo "$@" | ||
| 111 | } # function msg | ||
| 112 | 108 | ||
| 113 | 109 | ||
| 114 | msg "Running bzr status..." | 110 | echo "Running bzr status..." |
| 115 | 111 | ||
| 116 | bzr status -S $sources >| $tempfile || die "bzr status error for sources" | 112 | bzr status -S $sources >| $tempfile || die "bzr status error for sources" |
| 117 | 113 | ||
| @@ -119,7 +115,7 @@ while read stat file; do | |||
| 119 | 115 | ||
| 120 | case $stat in | 116 | case $stat in |
| 121 | M) | 117 | M) |
| 122 | msg "Locally modified: $file" | 118 | echo "Locally modified: $file" |
| 123 | [ "$force" ] || die "There are local modifications" | 119 | [ "$force" ] || die "There are local modifications" |
| 124 | ;; | 120 | ;; |
| 125 | 121 | ||
| @@ -128,9 +124,20 @@ while read stat file; do | |||
| 128 | done < $tempfile | 124 | done < $tempfile |
| 129 | 125 | ||
| 130 | 126 | ||
| 131 | msg "Running autoreconf..." | 127 | echo "Running autoreconf..." |
| 128 | |||
| 129 | autoreconf -f -i -I m4 2>| $tempfile | ||
| 130 | |||
| 131 | retval=$? | ||
| 132 | 132 | ||
| 133 | autoreconf -I m4 || die "autoreconf error" | 133 | ## Annoyingly, autoreconf puts the "installing `./foo' messages on stderr. |
| 134 | if [ "$quiet" ]; then | ||
| 135 | grep -v 'installing `\.' $tempfile 1>&2 | ||
| 136 | else | ||
| 137 | cat "$tempfile" 1>&2 | ||
| 138 | fi | ||
| 139 | |||
| 140 | [ $retval -ne 0 ] && die "autoreconf error" | ||
| 134 | 141 | ||
| 135 | 142 | ||
| 136 | cp $genfiles autogen/ | 143 | cp $genfiles autogen/ |
| @@ -138,6 +145,7 @@ cp $genfiles autogen/ | |||
| 138 | 145 | ||
| 139 | cd autogen | 146 | cd autogen |
| 140 | 147 | ||
| 148 | echo "Checking status of generated files..." | ||
| 141 | 149 | ||
| 142 | bzr status -S $basegen >| $tempfile || \ | 150 | bzr status -S $basegen >| $tempfile || \ |
| 143 | die "bzr status error for generated files" | 151 | die "bzr status error for generated files" |
| @@ -155,28 +163,25 @@ done < $tempfile | |||
| 155 | 163 | ||
| 156 | 164 | ||
| 157 | [ "$modified" ] || { | 165 | [ "$modified" ] || { |
| 158 | msg "No files were modified" | 166 | echo "No files were modified" |
| 159 | exit 0 | 167 | exit 0 |
| 160 | } | 168 | } |
| 161 | 169 | ||
| 162 | msg "Modified file(s): $modified" | 170 | echo "Modified file(s): $modified" |
| 163 | 171 | ||
| 164 | [ "$commit" ] || exit 0 | 172 | [ "$commit" ] || exit 0 |
| 165 | 173 | ||
| 166 | 174 | ||
| 167 | msg "Committing..." | 175 | echo "Committing..." |
| 168 | 176 | ||
| 169 | ## bzr status output is annoyingly always relative to top-level, not PWD. | 177 | ## bzr status output is annoyingly always relative to top-level, not PWD. |
| 170 | cd ../ | 178 | cd ../ |
| 171 | 179 | ||
| 172 | opt= | 180 | bzr commit -m "Auto-commit of generated files." $modified || \ |
| 173 | [ "$quiet" ] || opt=-q | ||
| 174 | |||
| 175 | bzr commit $opt -m "Auto-commit of generated files." $modified || \ | ||
| 176 | die "bzr commit error" | 181 | die "bzr commit error" |
| 177 | 182 | ||
| 178 | 183 | ||
| 179 | msg "Committed files: $modified" | 184 | echo "Committed files: $modified" |
| 180 | 185 | ||
| 181 | exit | 186 | exit |
| 182 | 187 | ||
diff --git a/config.bat b/config.bat index 4288f6537e6..e480a4b9bc8 100644 --- a/config.bat +++ b/config.bat | |||
| @@ -156,9 +156,9 @@ rm -f epaths.tmp | |||
| 156 | 156 | ||
| 157 | rem Create "config.h" | 157 | rem Create "config.h" |
| 158 | rm -f config.h2 config.tmp | 158 | rm -f config.h2 config.tmp |
| 159 | sed -e '' config.in > config.tmp | 159 | sed -e '' ../autogen/config.in > config.tmp |
| 160 | if "%X11%" == "" goto src4 | 160 | if "%X11%" == "" goto src4 |
| 161 | sed -f ../msdos/sed2x.inp <config.in >config.tmp | 161 | sed -f ../msdos/sed2x.inp < ..\autogen\config.in > config.tmp |
| 162 | :src4 | 162 | :src4 |
| 163 | sed -f ../msdos/sed2v2.inp <config.tmp >config.h2 | 163 | sed -f ../msdos/sed2v2.inp <config.tmp >config.h2 |
| 164 | Rem See if DECL_ALIGN can be supported with this GCC | 164 | Rem See if DECL_ALIGN can be supported with this GCC |
| @@ -283,11 +283,12 @@ If Exist getopt.in.h update getopt.in.h getopt.in-h | |||
| 283 | If Exist stdbool.in.h update stdbool.in.h stdbool.in-h | 283 | If Exist stdbool.in.h update stdbool.in.h stdbool.in-h |
| 284 | If Exist stddef.in.h update stddef.in.h stddef.in-h | 284 | If Exist stddef.in.h update stddef.in.h stddef.in-h |
| 285 | If Exist stdint.in.h update stdint.in.h stdint.in-h | 285 | If Exist stdint.in.h update stdint.in.h stdint.in-h |
| 286 | If Exist stdio.in.h update stdio.in.h stdio.in-h | ||
| 286 | If Exist stdlib.in.h update stdlib.in.h stdlib.in-h | 287 | If Exist stdlib.in.h update stdlib.in.h stdlib.in-h |
| 287 | If Exist sys_stat.in.h update sys_stat.in.h sys_stat.in-h | 288 | If Exist sys_stat.in.h update sys_stat.in.h sys_stat.in-h |
| 288 | If Exist time.in.h update time.in.h time.in-h | 289 | If Exist time.in.h update time.in.h time.in-h |
| 289 | If Exist unistd.in.h update unistd.in.h unistd.in-h | 290 | If Exist unistd.in.h update unistd.in.h unistd.in-h |
| 290 | sed -f ../msdos/sedlibcf.inp < Makefile.in > makefile.tmp | 291 | sed -f ../msdos/sedlibcf.inp < ..\autogen\Makefile.in > makefile.tmp |
| 291 | sed -f ../msdos/sedlibmk.inp < makefile.tmp > Makefile | 292 | sed -f ../msdos/sedlibmk.inp < makefile.tmp > Makefile |
| 292 | rm -f makefile.tmp | 293 | rm -f makefile.tmp |
| 293 | Rem Create .Po files for new files in lib/ | 294 | Rem Create .Po files for new files in lib/ |
diff --git a/configure.in b/configure.in index b38aa976259..77deef8dba5 100644 --- a/configure.in +++ b/configure.in | |||
| @@ -664,11 +664,11 @@ if test x"$GCC" != xyes && test x"$emacs_check_sunpro_c" = xyes && \ | |||
| 664 | test x"$CPP" = x; then | 664 | test x"$CPP" = x; then |
| 665 | AC_MSG_CHECKING([whether we are using a Sun C compiler]) | 665 | AC_MSG_CHECKING([whether we are using a Sun C compiler]) |
| 666 | AC_CACHE_VAL(emacs_cv_sunpro_c, | 666 | AC_CACHE_VAL(emacs_cv_sunpro_c, |
| 667 | [AC_TRY_LINK([], | 667 | [AC_LINK_IFELSE([AC_LANG_PROGRAM([[]], |
| 668 | [#ifndef __SUNPRO_C | 668 | [[#ifndef __SUNPRO_C |
| 669 | fail; | 669 | fail; |
| 670 | #endif | 670 | #endif |
| 671 | ], emacs_cv_sunpro_c=yes, emacs_cv_sunpro_c=no)]) | 671 | ]])], emacs_cv_sunpro_c=yes, emacs_cv_sunpro_c=no)]) |
| 672 | AC_MSG_RESULT($emacs_cv_sunpro_c) | 672 | AC_MSG_RESULT($emacs_cv_sunpro_c) |
| 673 | 673 | ||
| 674 | if test x"$emacs_cv_sunpro_c" = xyes; then | 674 | if test x"$emacs_cv_sunpro_c" = xyes; then |
| @@ -703,7 +703,7 @@ fi | |||
| 703 | AC_MSG_CHECKING([whether gcc understands -Wdeclaration-after-statement]) | 703 | AC_MSG_CHECKING([whether gcc understands -Wdeclaration-after-statement]) |
| 704 | SAVE_CFLAGS="$CFLAGS" | 704 | SAVE_CFLAGS="$CFLAGS" |
| 705 | CFLAGS="$CFLAGS -Wdeclaration-after-statement" | 705 | CFLAGS="$CFLAGS -Wdeclaration-after-statement" |
| 706 | AC_TRY_COMPILE([], [], has_option=yes, has_option=no,) | 706 | AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[]])], has_option=yes, has_option=no) |
| 707 | if test $has_option = yes; then | 707 | if test $has_option = yes; then |
| 708 | C_WARNINGS_SWITCH="-Wdeclaration-after-statement $C_WARNINGS_SWITCH" | 708 | C_WARNINGS_SWITCH="-Wdeclaration-after-statement $C_WARNINGS_SWITCH" |
| 709 | fi | 709 | fi |
| @@ -717,7 +717,7 @@ unset SAVE_CFLAGS | |||
| 717 | AC_MSG_CHECKING([whether gcc understands -Wold-style-definition]) | 717 | AC_MSG_CHECKING([whether gcc understands -Wold-style-definition]) |
| 718 | SAVE_CFLAGS="$CFLAGS" | 718 | SAVE_CFLAGS="$CFLAGS" |
| 719 | CFLAGS="$CFLAGS -Wold-style-definition" | 719 | CFLAGS="$CFLAGS -Wold-style-definition" |
| 720 | AC_TRY_COMPILE([], [], has_option=yes, has_option=no,) | 720 | AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[]])], has_option=yes, has_option=no) |
| 721 | if test $has_option = yes; then | 721 | if test $has_option = yes; then |
| 722 | C_WARNINGS_SWITCH="-Wold-style-definition $C_WARNINGS_SWITCH" | 722 | C_WARNINGS_SWITCH="-Wold-style-definition $C_WARNINGS_SWITCH" |
| 723 | fi | 723 | fi |
| @@ -730,7 +730,7 @@ unset SAVE_CFLAGS | |||
| 730 | AC_MSG_CHECKING([whether gcc understands -Wimplicit-function-declaration]) | 730 | AC_MSG_CHECKING([whether gcc understands -Wimplicit-function-declaration]) |
| 731 | SAVE_CFLAGS="$CFLAGS" | 731 | SAVE_CFLAGS="$CFLAGS" |
| 732 | CFLAGS="$CFLAGS -Wimplicit-function-declaration" | 732 | CFLAGS="$CFLAGS -Wimplicit-function-declaration" |
| 733 | AC_TRY_COMPILE([], [], has_option=yes, has_option=no,) | 733 | AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[]])], has_option=yes, has_option=no) |
| 734 | if test $has_option = yes; then | 734 | if test $has_option = yes; then |
| 735 | C_WARNINGS_SWITCH="-Wimplicit-function-declaration $C_WARNINGS_SWITCH" | 735 | C_WARNINGS_SWITCH="-Wimplicit-function-declaration $C_WARNINGS_SWITCH" |
| 736 | fi | 736 | fi |
| @@ -1137,12 +1137,12 @@ if test "${with_sound}" != "no"; then | |||
| 1137 | SAVE_LDFLAGS="$LDFLAGS" | 1137 | SAVE_LDFLAGS="$LDFLAGS" |
| 1138 | CFLAGS="$ALSA_CFLAGS $CFLAGS" | 1138 | CFLAGS="$ALSA_CFLAGS $CFLAGS" |
| 1139 | LDFLAGS="$ALSA_LIBS $LDFLAGS" | 1139 | LDFLAGS="$ALSA_LIBS $LDFLAGS" |
| 1140 | AC_TRY_COMPILE([#include <asoundlib.h>], [snd_lib_error_set_handler (0);], | 1140 | AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <asoundlib.h>]], [[snd_lib_error_set_handler (0);]])], |
| 1141 | emacs_alsa_normal=yes, | 1141 | emacs_alsa_normal=yes, |
| 1142 | emacs_alsa_normal=no) | 1142 | emacs_alsa_normal=no) |
| 1143 | if test "$emacs_alsa_normal" != yes; then | 1143 | if test "$emacs_alsa_normal" != yes; then |
| 1144 | AC_TRY_COMPILE([#include <alsa/asoundlib.h>], | 1144 | AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <alsa/asoundlib.h>]], |
| 1145 | [snd_lib_error_set_handler (0);], | 1145 | [[snd_lib_error_set_handler (0);]])], |
| 1146 | emacs_alsa_subdir=yes, | 1146 | emacs_alsa_subdir=yes, |
| 1147 | emacs_alsa_subdir=no) | 1147 | emacs_alsa_subdir=no) |
| 1148 | if test "$emacs_alsa_subdir" != yes; then | 1148 | if test "$emacs_alsa_subdir" != yes; then |
| @@ -1181,7 +1181,7 @@ AC_CHECK_HEADERS(sys/select.h sys/time.h unistd.h utime.h \ | |||
| 1181 | sys/utsname.h pwd.h utmp.h dirent.h util.h) | 1181 | sys/utsname.h pwd.h utmp.h dirent.h util.h) |
| 1182 | 1182 | ||
| 1183 | AC_MSG_CHECKING(if personality LINUX32 can be set) | 1183 | AC_MSG_CHECKING(if personality LINUX32 can be set) |
| 1184 | AC_TRY_COMPILE([#include <sys/personality.h>], [personality (PER_LINUX32)], | 1184 | AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <sys/personality.h>]], [[personality (PER_LINUX32)]])], |
| 1185 | emacs_cv_personality_linux32=yes, | 1185 | emacs_cv_personality_linux32=yes, |
| 1186 | emacs_cv_personality_linux32=no) | 1186 | emacs_cv_personality_linux32=no) |
| 1187 | AC_MSG_RESULT($emacs_cv_personality_linux32) | 1187 | AC_MSG_RESULT($emacs_cv_personality_linux32) |
| @@ -1209,7 +1209,7 @@ AC_HEADER_SYS_WAIT | |||
| 1209 | 1209 | ||
| 1210 | dnl Some systems have utime.h but don't declare the struct anyplace. | 1210 | dnl Some systems have utime.h but don't declare the struct anyplace. |
| 1211 | AC_CACHE_CHECK(for struct utimbuf, emacs_cv_struct_utimbuf, | 1211 | AC_CACHE_CHECK(for struct utimbuf, emacs_cv_struct_utimbuf, |
| 1212 | AC_TRY_COMPILE([#ifdef TIME_WITH_SYS_TIME | 1212 | AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#ifdef TIME_WITH_SYS_TIME |
| 1213 | #include <sys/time.h> | 1213 | #include <sys/time.h> |
| 1214 | #include <time.h> | 1214 | #include <time.h> |
| 1215 | #else | 1215 | #else |
| @@ -1221,18 +1221,15 @@ AC_TRY_COMPILE([#ifdef TIME_WITH_SYS_TIME | |||
| 1221 | #endif | 1221 | #endif |
| 1222 | #ifdef HAVE_UTIME_H | 1222 | #ifdef HAVE_UTIME_H |
| 1223 | #include <utime.h> | 1223 | #include <utime.h> |
| 1224 | #endif], [static struct utimbuf x; x.actime = x.modtime;], | 1224 | #endif]], [[static struct utimbuf x; x.actime = x.modtime;]])], |
| 1225 | emacs_cv_struct_utimbuf=yes, emacs_cv_struct_utimbuf=no)) | 1225 | emacs_cv_struct_utimbuf=yes, emacs_cv_struct_utimbuf=no)) |
| 1226 | if test $emacs_cv_struct_utimbuf = yes; then | 1226 | if test $emacs_cv_struct_utimbuf = yes; then |
| 1227 | AC_DEFINE(HAVE_STRUCT_UTIMBUF, 1, [Define to 1 if `struct utimbuf' is declared by <utime.h>.]) | 1227 | AC_DEFINE(HAVE_STRUCT_UTIMBUF, 1, [Define to 1 if `struct utimbuf' is declared by <utime.h>.]) |
| 1228 | fi | 1228 | fi |
| 1229 | 1229 | ||
| 1230 | dnl checks for typedefs | ||
| 1231 | AC_TYPE_SIGNAL | ||
| 1232 | |||
| 1233 | dnl Check for speed_t typedef. | 1230 | dnl Check for speed_t typedef. |
| 1234 | AC_CACHE_CHECK(for speed_t, emacs_cv_speed_t, | 1231 | AC_CACHE_CHECK(for speed_t, emacs_cv_speed_t, |
| 1235 | [AC_TRY_COMPILE([#include <termios.h>], [speed_t x = 1;], | 1232 | [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <termios.h>]], [[speed_t x = 1;]])], |
| 1236 | emacs_cv_speed_t=yes, emacs_cv_speed_t=no)]) | 1233 | emacs_cv_speed_t=yes, emacs_cv_speed_t=no)]) |
| 1237 | if test $emacs_cv_speed_t = yes; then | 1234 | if test $emacs_cv_speed_t = yes; then |
| 1238 | AC_DEFINE(HAVE_SPEED_T, 1, | 1235 | AC_DEFINE(HAVE_SPEED_T, 1, |
| @@ -1240,7 +1237,7 @@ if test $emacs_cv_speed_t = yes; then | |||
| 1240 | fi | 1237 | fi |
| 1241 | 1238 | ||
| 1242 | AC_CACHE_CHECK(for struct timeval, emacs_cv_struct_timeval, | 1239 | AC_CACHE_CHECK(for struct timeval, emacs_cv_struct_timeval, |
| 1243 | AC_TRY_COMPILE([#ifdef TIME_WITH_SYS_TIME | 1240 | AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#ifdef TIME_WITH_SYS_TIME |
| 1244 | #include <sys/time.h> | 1241 | #include <sys/time.h> |
| 1245 | #include <time.h> | 1242 | #include <time.h> |
| 1246 | #else | 1243 | #else |
| @@ -1249,7 +1246,7 @@ AC_TRY_COMPILE([#ifdef TIME_WITH_SYS_TIME | |||
| 1249 | #else | 1246 | #else |
| 1250 | #include <time.h> | 1247 | #include <time.h> |
| 1251 | #endif | 1248 | #endif |
| 1252 | #endif], [static struct timeval x; x.tv_sec = x.tv_usec;], | 1249 | #endif]], [[static struct timeval x; x.tv_sec = x.tv_usec;]])], |
| 1253 | emacs_cv_struct_timeval=yes, emacs_cv_struct_timeval=no)) | 1250 | emacs_cv_struct_timeval=yes, emacs_cv_struct_timeval=no)) |
| 1254 | HAVE_TIMEVAL=$emacs_cv_struct_timeval | 1251 | HAVE_TIMEVAL=$emacs_cv_struct_timeval |
| 1255 | if test $emacs_cv_struct_timeval = yes; then | 1252 | if test $emacs_cv_struct_timeval = yes; then |
| @@ -1257,15 +1254,14 @@ if test $emacs_cv_struct_timeval = yes; then | |||
| 1257 | fi | 1254 | fi |
| 1258 | 1255 | ||
| 1259 | AC_CACHE_CHECK(for struct exception, emacs_cv_struct_exception, | 1256 | AC_CACHE_CHECK(for struct exception, emacs_cv_struct_exception, |
| 1260 | AC_TRY_COMPILE([#include <math.h>], | 1257 | AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <math.h>]], |
| 1261 | [static struct exception x; x.arg1 = x.arg2 = x.retval; x.name = ""; x.type = 1;], | 1258 | [[static struct exception x; x.arg1 = x.arg2 = x.retval; x.name = ""; x.type = 1;]])], |
| 1262 | emacs_cv_struct_exception=yes, emacs_cv_struct_exception=no)) | 1259 | emacs_cv_struct_exception=yes, emacs_cv_struct_exception=no)) |
| 1263 | HAVE_EXCEPTION=$emacs_cv_struct_exception | 1260 | HAVE_EXCEPTION=$emacs_cv_struct_exception |
| 1264 | if test $emacs_cv_struct_exception != yes; then | 1261 | if test $emacs_cv_struct_exception != yes; then |
| 1265 | AC_DEFINE(NO_MATHERR, 1, [Define to 1 if you don't have struct exception in math.h.]) | 1262 | AC_DEFINE(NO_MATHERR, 1, [Define to 1 if you don't have struct exception in math.h.]) |
| 1266 | fi | 1263 | fi |
| 1267 | 1264 | ||
| 1268 | AC_CHECK_HEADERS(sys/socket.h) | ||
| 1269 | AC_CHECK_HEADERS(net/if.h, , , [AC_INCLUDES_DEFAULT | 1265 | AC_CHECK_HEADERS(net/if.h, , , [AC_INCLUDES_DEFAULT |
| 1270 | #if HAVE_SYS_SOCKET_H | 1266 | #if HAVE_SYS_SOCKET_H |
| 1271 | #include <sys/socket.h> | 1267 | #include <sys/socket.h> |
| @@ -1302,7 +1298,7 @@ dnl This isn't useful because we can't turn on use of `inline' unless | |||
| 1302 | dnl the compiler groks `extern inline'. | 1298 | dnl the compiler groks `extern inline'. |
| 1303 | dnl AC_C_INLINE | 1299 | dnl AC_C_INLINE |
| 1304 | AC_CACHE_CHECK([for void * support], emacs_cv_void_star, | 1300 | AC_CACHE_CHECK([for void * support], emacs_cv_void_star, |
| 1305 | [AC_TRY_COMPILE(, [void * foo;], | 1301 | [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([], [[void * foo;]])], |
| 1306 | emacs_cv_void_star=yes, emacs_cv_void_star=no)]) | 1302 | emacs_cv_void_star=yes, emacs_cv_void_star=no)]) |
| 1307 | if test $emacs_cv_void_star = yes; then | 1303 | if test $emacs_cv_void_star = yes; then |
| 1308 | AC_DEFINE(POINTER_TYPE, void) | 1304 | AC_DEFINE(POINTER_TYPE, void) |
| @@ -1350,7 +1346,7 @@ if test "$GCC" = yes && test "$ac_enable_autodepend" = yes; then | |||
| 1350 | AC_MSG_CHECKING([whether gcc understands -MMD -MF]) | 1346 | AC_MSG_CHECKING([whether gcc understands -MMD -MF]) |
| 1351 | SAVE_CFLAGS="$CFLAGS" | 1347 | SAVE_CFLAGS="$CFLAGS" |
| 1352 | CFLAGS="$CFLAGS -MMD -MF deps.d" | 1348 | CFLAGS="$CFLAGS -MMD -MF deps.d" |
| 1353 | AC_TRY_COMPILE([], [], , ac_enable_autodepend=no) | 1349 | AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[]])], , ac_enable_autodepend=no) |
| 1354 | CFLAGS="$SAVE_CFLAGS" | 1350 | CFLAGS="$SAVE_CFLAGS" |
| 1355 | test -f deps.d || ac_enable_autodepend=no | 1351 | test -f deps.d || ac_enable_autodepend=no |
| 1356 | rm -rf deps.d | 1352 | rm -rf deps.d |
| @@ -1360,7 +1356,7 @@ if test "$GCC" = yes && test "$ac_enable_autodepend" = yes; then | |||
| 1360 | DEPFLAGS='-MMD -MF ${DEPDIR}/$*.d' | 1356 | DEPFLAGS='-MMD -MF ${DEPDIR}/$*.d' |
| 1361 | ## In parallel builds, another make might create depdir between | 1357 | ## In parallel builds, another make might create depdir between |
| 1362 | ## the first test and mkdir, so stick another test on the end. | 1358 | ## the first test and mkdir, so stick another test on the end. |
| 1363 | ## Or use mkinstalldirs? mkdir -p is not portable. | 1359 | ## Or use install-sh -d? mkdir -p is not portable. |
| 1364 | MKDEPDIR='test -d ${DEPDIR} || mkdir ${DEPDIR} || test -d ${DEPDIR}' | 1360 | MKDEPDIR='test -d ${DEPDIR} || mkdir ${DEPDIR} || test -d ${DEPDIR}' |
| 1365 | deps_frag=autodeps.mk | 1361 | deps_frag=autodeps.mk |
| 1366 | fi | 1362 | fi |
| @@ -1583,7 +1579,7 @@ AC_CHECK_FUNC(malloc_get_state, ,doug_lea_malloc=no) | |||
| 1583 | AC_CHECK_FUNC(malloc_set_state, ,doug_lea_malloc=no) | 1579 | AC_CHECK_FUNC(malloc_set_state, ,doug_lea_malloc=no) |
| 1584 | AC_CACHE_CHECK(whether __after_morecore_hook exists, | 1580 | AC_CACHE_CHECK(whether __after_morecore_hook exists, |
| 1585 | emacs_cv_var___after_morecore_hook, | 1581 | emacs_cv_var___after_morecore_hook, |
| 1586 | [AC_TRY_LINK([extern void (* __after_morecore_hook)();],[__after_morecore_hook = 0], | 1582 | [AC_LINK_IFELSE([AC_LANG_PROGRAM([[extern void (* __after_morecore_hook)();]],[[__after_morecore_hook = 0]])], |
| 1587 | emacs_cv_var___after_morecore_hook=yes, | 1583 | emacs_cv_var___after_morecore_hook=yes, |
| 1588 | emacs_cv_var___after_morecore_hook=no)]) | 1584 | emacs_cv_var___after_morecore_hook=no)]) |
| 1589 | if test $emacs_cv_var___after_morecore_hook = no; then | 1585 | if test $emacs_cv_var___after_morecore_hook = no; then |
| @@ -1681,7 +1677,7 @@ aix*) | |||
| 1681 | esac | 1677 | esac |
| 1682 | 1678 | ||
| 1683 | LDFLAGS=$LDFLAGS\ $gdb_cv_bigtoc | 1679 | LDFLAGS=$LDFLAGS\ $gdb_cv_bigtoc |
| 1684 | AC_TRY_LINK([], [int i;], [], [gdb_cv_bigtoc=]) | 1680 | AC_LINK_IFELSE([AC_LANG_PROGRAM([[]], [[int i;]])], [], [gdb_cv_bigtoc=]) |
| 1685 | ]) | 1681 | ]) |
| 1686 | ;; | 1682 | ;; |
| 1687 | esac | 1683 | esac |
| @@ -1711,8 +1707,8 @@ if test "${HAVE_X11}" = "yes"; then | |||
| 1711 | 1707 | ||
| 1712 | if test "${opsys}" = "gnu-linux"; then | 1708 | if test "${opsys}" = "gnu-linux"; then |
| 1713 | AC_MSG_CHECKING(whether X on GNU/Linux needs -b to link) | 1709 | AC_MSG_CHECKING(whether X on GNU/Linux needs -b to link) |
| 1714 | AC_TRY_LINK([], | 1710 | AC_LINK_IFELSE([AC_LANG_PROGRAM([[]], |
| 1715 | [XOpenDisplay ("foo");], | 1711 | [[XOpenDisplay ("foo");]])], |
| 1716 | [xlinux_first_failure=no], | 1712 | [xlinux_first_failure=no], |
| 1717 | [xlinux_first_failure=yes]) | 1713 | [xlinux_first_failure=yes]) |
| 1718 | if test "${xlinux_first_failure}" = "yes"; then | 1714 | if test "${xlinux_first_failure}" = "yes"; then |
| @@ -1724,8 +1720,8 @@ if test "${HAVE_X11}" = "yes"; then | |||
| 1724 | C_SWITCH_X_SITE="$C_SWITCH_X_SITE -b i486-linuxaout" | 1720 | C_SWITCH_X_SITE="$C_SWITCH_X_SITE -b i486-linuxaout" |
| 1725 | CPPFLAGS="$CPPFLAGS -b i486-linuxaout" | 1721 | CPPFLAGS="$CPPFLAGS -b i486-linuxaout" |
| 1726 | LIBS="$LIBS -b i486-linuxaout" | 1722 | LIBS="$LIBS -b i486-linuxaout" |
| 1727 | AC_TRY_LINK([], | 1723 | AC_LINK_IFELSE([AC_LANG_PROGRAM([[]], |
| 1728 | [XOpenDisplay ("foo");], | 1724 | [[XOpenDisplay ("foo");]])], |
| 1729 | [xlinux_second_failure=no], | 1725 | [xlinux_second_failure=no], |
| 1730 | [xlinux_second_failure=yes]) | 1726 | [xlinux_second_failure=yes]) |
| 1731 | if test "${xlinux_second_failure}" = "yes"; then | 1727 | if test "${xlinux_second_failure}" = "yes"; then |
| @@ -1747,9 +1743,9 @@ if test "${HAVE_X11}" = "yes"; then | |||
| 1747 | # Reportedly, some broken Solaris systems have XKBlib.h but are missing | 1743 | # Reportedly, some broken Solaris systems have XKBlib.h but are missing |
| 1748 | # header files included from there. | 1744 | # header files included from there. |
| 1749 | AC_MSG_CHECKING(for Xkb) | 1745 | AC_MSG_CHECKING(for Xkb) |
| 1750 | AC_TRY_LINK([#include <X11/Xlib.h> | 1746 | AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <X11/Xlib.h> |
| 1751 | #include <X11/XKBlib.h>], | 1747 | #include <X11/XKBlib.h>]], |
| 1752 | [XkbDescPtr kb = XkbGetKeyboard (0, XkbAllComponentsMask, XkbUseCoreKbd);], | 1748 | [[XkbDescPtr kb = XkbGetKeyboard (0, XkbAllComponentsMask, XkbUseCoreKbd);]])], |
| 1753 | emacs_xkb=yes, emacs_xkb=no) | 1749 | emacs_xkb=yes, emacs_xkb=no) |
| 1754 | AC_MSG_RESULT($emacs_xkb) | 1750 | AC_MSG_RESULT($emacs_xkb) |
| 1755 | if test $emacs_xkb = yes; then | 1751 | if test $emacs_xkb = yes; then |
| @@ -1763,11 +1759,11 @@ fi | |||
| 1763 | if test "${window_system}" = "x11"; then | 1759 | if test "${window_system}" = "x11"; then |
| 1764 | AC_MSG_CHECKING(X11 version 6) | 1760 | AC_MSG_CHECKING(X11 version 6) |
| 1765 | AC_CACHE_VAL(emacs_cv_x11_version_6, | 1761 | AC_CACHE_VAL(emacs_cv_x11_version_6, |
| 1766 | [AC_TRY_LINK([#include <X11/Xlib.h>], | 1762 | [AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <X11/Xlib.h>]], |
| 1767 | [#if XlibSpecificationRelease < 6 | 1763 | [[#if XlibSpecificationRelease < 6 |
| 1768 | fail; | 1764 | fail; |
| 1769 | #endif | 1765 | #endif |
| 1770 | ], emacs_cv_x11_version_6=yes, emacs_cv_x11_version_6=no)]) | 1766 | ]])], emacs_cv_x11_version_6=yes, emacs_cv_x11_version_6=no)]) |
| 1771 | if test $emacs_cv_x11_version_6 = yes; then | 1767 | if test $emacs_cv_x11_version_6 = yes; then |
| 1772 | AC_MSG_RESULT(6 or newer) | 1768 | AC_MSG_RESULT(6 or newer) |
| 1773 | AC_DEFINE(HAVE_X11R6, 1, | 1769 | AC_DEFINE(HAVE_X11R6, 1, |
| @@ -1990,10 +1986,10 @@ if test x"${USE_X_TOOLKIT}" = xmaybe || test x"${USE_X_TOOLKIT}" = xLUCID; then | |||
| 1990 | if test "$with_xaw3d" != no; then | 1986 | if test "$with_xaw3d" != no; then |
| 1991 | AC_MSG_CHECKING(for xaw3d) | 1987 | AC_MSG_CHECKING(for xaw3d) |
| 1992 | AC_CACHE_VAL(emacs_cv_xaw3d, | 1988 | AC_CACHE_VAL(emacs_cv_xaw3d, |
| 1993 | [AC_TRY_LINK([ | 1989 | [AC_LINK_IFELSE([AC_LANG_PROGRAM([[ |
| 1994 | #include <X11/Intrinsic.h> | 1990 | #include <X11/Intrinsic.h> |
| 1995 | #include <X11/Xaw3d/Simple.h>], | 1991 | #include <X11/Xaw3d/Simple.h>]], |
| 1996 | [], | 1992 | [[]])], |
| 1997 | [AC_CHECK_LIB(Xaw3d, XawScrollbarSetThumb, | 1993 | [AC_CHECK_LIB(Xaw3d, XawScrollbarSetThumb, |
| 1998 | emacs_cv_xaw3d=yes, emacs_cv_xaw3d=no)], | 1994 | emacs_cv_xaw3d=yes, emacs_cv_xaw3d=no)], |
| 1999 | emacs_cv_xaw3d=no)]) | 1995 | emacs_cv_xaw3d=no)]) |
| @@ -2011,10 +2007,10 @@ if test x"${USE_X_TOOLKIT}" = xmaybe || test x"${USE_X_TOOLKIT}" = xLUCID; then | |||
| 2011 | AC_MSG_RESULT(no) | 2007 | AC_MSG_RESULT(no) |
| 2012 | AC_MSG_CHECKING(for libXaw) | 2008 | AC_MSG_CHECKING(for libXaw) |
| 2013 | AC_CACHE_VAL(emacs_cv_xaw, | 2009 | AC_CACHE_VAL(emacs_cv_xaw, |
| 2014 | [AC_TRY_LINK([ | 2010 | [AC_LINK_IFELSE([AC_LANG_PROGRAM([[ |
| 2015 | #include <X11/Intrinsic.h> | 2011 | #include <X11/Intrinsic.h> |
| 2016 | #include <X11/Xaw/Simple.h>], | 2012 | #include <X11/Xaw/Simple.h>]], |
| 2017 | [], | 2013 | [[]])], |
| 2018 | emacs_cv_xaw=yes, | 2014 | emacs_cv_xaw=yes, |
| 2019 | emacs_cv_xaw=no)]) | 2015 | emacs_cv_xaw=no)]) |
| 2020 | if test $emacs_cv_xaw = yes; then | 2016 | if test $emacs_cv_xaw = yes; then |
| @@ -2036,11 +2032,11 @@ LIBXTR6= | |||
| 2036 | if test "${USE_X_TOOLKIT}" != "none"; then | 2032 | if test "${USE_X_TOOLKIT}" != "none"; then |
| 2037 | AC_MSG_CHECKING(X11 toolkit version) | 2033 | AC_MSG_CHECKING(X11 toolkit version) |
| 2038 | AC_CACHE_VAL(emacs_cv_x11_toolkit_version_6, | 2034 | AC_CACHE_VAL(emacs_cv_x11_toolkit_version_6, |
| 2039 | [AC_TRY_LINK([#include <X11/Intrinsic.h>], | 2035 | [AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <X11/Intrinsic.h>]], |
| 2040 | [#if XtSpecificationRelease < 6 | 2036 | [[#if XtSpecificationRelease < 6 |
| 2041 | fail; | 2037 | fail; |
| 2042 | #endif | 2038 | #endif |
| 2043 | ], emacs_cv_x11_toolkit_version_6=yes, emacs_cv_x11_toolkit_version_6=no)]) | 2039 | ]])], emacs_cv_x11_toolkit_version_6=yes, emacs_cv_x11_toolkit_version_6=no)]) |
| 2044 | HAVE_X11XTR6=$emacs_cv_x11_toolkit_version_6 | 2040 | HAVE_X11XTR6=$emacs_cv_x11_toolkit_version_6 |
| 2045 | if test $emacs_cv_x11_toolkit_version_6 = yes; then | 2041 | if test $emacs_cv_x11_toolkit_version_6 = yes; then |
| 2046 | AC_MSG_RESULT(6 or newer) | 2042 | AC_MSG_RESULT(6 or newer) |
| @@ -2089,12 +2085,12 @@ fi | |||
| 2089 | LIBXP= | 2085 | LIBXP= |
| 2090 | if test "${USE_X_TOOLKIT}" = "MOTIF"; then | 2086 | if test "${USE_X_TOOLKIT}" = "MOTIF"; then |
| 2091 | AC_CACHE_CHECK(for Motif version 2.1, emacs_cv_motif_version_2_1, | 2087 | AC_CACHE_CHECK(for Motif version 2.1, emacs_cv_motif_version_2_1, |
| 2092 | [AC_TRY_COMPILE([#include <Xm/Xm.h>], | 2088 | [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <Xm/Xm.h>]], |
| 2093 | [#if XmVERSION > 2 || (XmVERSION == 2 && XmREVISION >= 1) | 2089 | [[#if XmVERSION > 2 || (XmVERSION == 2 && XmREVISION >= 1) |
| 2094 | int x = 5; | 2090 | int x = 5; |
| 2095 | #else | 2091 | #else |
| 2096 | Motif version prior to 2.1. | 2092 | Motif version prior to 2.1. |
| 2097 | #endif], | 2093 | #endif]])], |
| 2098 | emacs_cv_motif_version_2_1=yes, emacs_cv_motif_version_2_1=no)]) | 2094 | emacs_cv_motif_version_2_1=yes, emacs_cv_motif_version_2_1=no)]) |
| 2099 | if test $emacs_cv_motif_version_2_1 = yes; then | 2095 | if test $emacs_cv_motif_version_2_1 = yes; then |
| 2100 | AC_CHECK_LIB(Xp, XpCreateContext, LIBXP=-lXp) | 2096 | AC_CHECK_LIB(Xp, XpCreateContext, LIBXP=-lXp) |
| @@ -2107,8 +2103,8 @@ Motif version prior to 2.1. | |||
| 2107 | OLD_CFLAGS=$CFLAGS | 2103 | OLD_CFLAGS=$CFLAGS |
| 2108 | CPPFLAGS="-I/usr/X11R6/LessTif/Motif1.2/include $CPPFLAGS" | 2104 | CPPFLAGS="-I/usr/X11R6/LessTif/Motif1.2/include $CPPFLAGS" |
| 2109 | CFLAGS="-I/usr/X11R6/LessTif/Motif1.2/include $CFLAGS" | 2105 | CFLAGS="-I/usr/X11R6/LessTif/Motif1.2/include $CFLAGS" |
| 2110 | [AC_TRY_COMPILE([#include </usr/X11R6/LessTif/Motif1.2/include/Xm/Xm.h>], | 2106 | [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include </usr/X11R6/LessTif/Motif1.2/include/Xm/Xm.h>]], |
| 2111 | [int x = 5;], | 2107 | [[int x = 5;]])], |
| 2112 | emacs_cv_lesstif=yes, emacs_cv_lesstif=no)]) | 2108 | emacs_cv_lesstif=yes, emacs_cv_lesstif=no)]) |
| 2113 | if test $emacs_cv_lesstif = yes; then | 2109 | if test $emacs_cv_lesstif = yes; then |
| 2114 | # Make sure this -I option remains in CPPFLAGS after it is set | 2110 | # Make sure this -I option remains in CPPFLAGS after it is set |
| @@ -2152,10 +2148,10 @@ if test "${with_toolkit_scroll_bars}" != "no"; then | |||
| 2152 | fi | 2148 | fi |
| 2153 | 2149 | ||
| 2154 | dnl See if XIM is available. | 2150 | dnl See if XIM is available. |
| 2155 | AC_TRY_COMPILE([ | 2151 | AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ |
| 2156 | #include <X11/Xlib.h> | 2152 | #include <X11/Xlib.h> |
| 2157 | #include <X11/Xresource.h>], | 2153 | #include <X11/Xresource.h>]], |
| 2158 | [XIMProc callback;], | 2154 | [[XIMProc callback;]])], |
| 2159 | [HAVE_XIM=yes | 2155 | [HAVE_XIM=yes |
| 2160 | AC_DEFINE(HAVE_XIM, 1, [Define to 1 if XIM is available])], | 2156 | AC_DEFINE(HAVE_XIM, 1, [Define to 1 if XIM is available])], |
| 2161 | HAVE_XIM=no) | 2157 | HAVE_XIM=no) |
| @@ -2173,10 +2169,10 @@ if test "${HAVE_XIM}" != "no"; then | |||
| 2173 | if test "$GCC" = yes; then | 2169 | if test "$GCC" = yes; then |
| 2174 | CFLAGS="$CFLAGS --pedantic-errors" | 2170 | CFLAGS="$CFLAGS --pedantic-errors" |
| 2175 | fi | 2171 | fi |
| 2176 | AC_TRY_COMPILE([ | 2172 | AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ |
| 2177 | #include <X11/Xlib.h> | 2173 | #include <X11/Xlib.h> |
| 2178 | #include <X11/Xresource.h>], | 2174 | #include <X11/Xresource.h>]], |
| 2179 | [Display *display; | 2175 | [[Display *display; |
| 2180 | XrmDatabase db; | 2176 | XrmDatabase db; |
| 2181 | char *res_name; | 2177 | char *res_name; |
| 2182 | char *res_class; | 2178 | char *res_class; |
| @@ -2189,7 +2185,7 @@ extern Bool XRegisterIMInstantiateCallback(Display*, XrmDatabase, char*, | |||
| 2189 | char*, XIMProc, XPointer*); | 2185 | char*, XIMProc, XPointer*); |
| 2190 | #endif | 2186 | #endif |
| 2191 | (void)XRegisterIMInstantiateCallback(display, db, res_name, res_class, callback, | 2187 | (void)XRegisterIMInstantiateCallback(display, db, res_name, res_class, callback, |
| 2192 | client_data);], | 2188 | client_data);]])], |
| 2193 | [emacs_cv_arg6_star=yes]) | 2189 | [emacs_cv_arg6_star=yes]) |
| 2194 | AH_TEMPLATE(XRegisterIMInstantiateCallback_arg6, | 2190 | AH_TEMPLATE(XRegisterIMInstantiateCallback_arg6, |
| 2195 | [Define to the type of the 6th arg of XRegisterIMInstantiateCallback, | 2191 | [Define to the type of the 6th arg of XRegisterIMInstantiateCallback, |
| @@ -2541,8 +2537,8 @@ AC_SUBST(LIBXML2_CFLAGS) | |||
| 2541 | # If netdb.h doesn't declare h_errno, we must declare it by hand. | 2537 | # If netdb.h doesn't declare h_errno, we must declare it by hand. |
| 2542 | AC_CACHE_CHECK(whether netdb declares h_errno, | 2538 | AC_CACHE_CHECK(whether netdb declares h_errno, |
| 2543 | emacs_cv_netdb_declares_h_errno, | 2539 | emacs_cv_netdb_declares_h_errno, |
| 2544 | [AC_TRY_LINK([#include <netdb.h>], | 2540 | [AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <netdb.h>]], |
| 2545 | [return h_errno;], | 2541 | [[return h_errno;]])], |
| 2546 | emacs_cv_netdb_declares_h_errno=yes, emacs_cv_netdb_declares_h_errno=no)]) | 2542 | emacs_cv_netdb_declares_h_errno=yes, emacs_cv_netdb_declares_h_errno=no)]) |
| 2547 | if test $emacs_cv_netdb_declares_h_errno = yes; then | 2543 | if test $emacs_cv_netdb_declares_h_errno = yes; then |
| 2548 | AC_DEFINE(HAVE_H_ERRNO, 1, [Define to 1 if netdb.h declares h_errno.]) | 2544 | AC_DEFINE(HAVE_H_ERRNO, 1, [Define to 1 if netdb.h declares h_errno.]) |
| @@ -2723,11 +2719,11 @@ case "$opsys" in | |||
| 2723 | freebsd) | 2719 | freebsd) |
| 2724 | AC_MSG_CHECKING([whether FreeBSD is new enough to use terminfo]) | 2720 | AC_MSG_CHECKING([whether FreeBSD is new enough to use terminfo]) |
| 2725 | AC_CACHE_VAL(emacs_cv_freebsd_terminfo, | 2721 | AC_CACHE_VAL(emacs_cv_freebsd_terminfo, |
| 2726 | [AC_TRY_LINK([#include <osreldate.h>], | 2722 | [AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <osreldate.h>]], |
| 2727 | [#if __FreeBSD_version < 400000 | 2723 | [[#if __FreeBSD_version < 400000 |
| 2728 | fail; | 2724 | fail; |
| 2729 | #endif | 2725 | #endif |
| 2730 | ], emacs_cv_freebsd_terminfo=yes, emacs_cv_freebsd_terminfo=no)]) | 2726 | ]])], emacs_cv_freebsd_terminfo=yes, emacs_cv_freebsd_terminfo=no)]) |
| 2731 | 2727 | ||
| 2732 | AC_MSG_RESULT($emacs_cv_freebsd_terminfo) | 2728 | AC_MSG_RESULT($emacs_cv_freebsd_terminfo) |
| 2733 | 2729 | ||
| @@ -2777,19 +2773,19 @@ AC_SUBST(TERMCAP_OBJ) | |||
| 2777 | 2773 | ||
| 2778 | # Do we have res_init, for detecting changes in /etc/resolv.conf? | 2774 | # Do we have res_init, for detecting changes in /etc/resolv.conf? |
| 2779 | resolv=no | 2775 | resolv=no |
| 2780 | AC_TRY_LINK([#include <netinet/in.h> | 2776 | AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <netinet/in.h> |
| 2781 | #include <arpa/nameser.h> | 2777 | #include <arpa/nameser.h> |
| 2782 | #include <resolv.h>], | 2778 | #include <resolv.h>]], |
| 2783 | [return res_init();], | 2779 | [[return res_init();]])], |
| 2784 | have_res_init=yes, have_res_init=no) | 2780 | have_res_init=yes, have_res_init=no) |
| 2785 | if test "$have_res_init" = no; then | 2781 | if test "$have_res_init" = no; then |
| 2786 | OLIBS="$LIBS" | 2782 | OLIBS="$LIBS" |
| 2787 | LIBS="$LIBS -lresolv" | 2783 | LIBS="$LIBS -lresolv" |
| 2788 | AC_MSG_CHECKING(for res_init with -lresolv) | 2784 | AC_MSG_CHECKING(for res_init with -lresolv) |
| 2789 | AC_TRY_LINK([#include <netinet/in.h> | 2785 | AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <netinet/in.h> |
| 2790 | #include <arpa/nameser.h> | 2786 | #include <arpa/nameser.h> |
| 2791 | #include <resolv.h>], | 2787 | #include <resolv.h>]], |
| 2792 | [return res_init();], | 2788 | [[return res_init();]])], |
| 2793 | have_res_init=yes, have_res_init=no) | 2789 | have_res_init=yes, have_res_init=no) |
| 2794 | AC_MSG_RESULT($have_res_init) | 2790 | AC_MSG_RESULT($have_res_init) |
| 2795 | if test "$have_res_init" = yes ; then | 2791 | if test "$have_res_init" = yes ; then |
| @@ -2925,7 +2921,7 @@ AC_CHECK_LIB(intl, dgettext) | |||
| 2925 | AC_MSG_CHECKING(whether localtime caches TZ) | 2921 | AC_MSG_CHECKING(whether localtime caches TZ) |
| 2926 | AC_CACHE_VAL(emacs_cv_localtime_cache, | 2922 | AC_CACHE_VAL(emacs_cv_localtime_cache, |
| 2927 | [if test x$ac_cv_func_tzset = xyes; then | 2923 | [if test x$ac_cv_func_tzset = xyes; then |
| 2928 | AC_TRY_RUN([#include <time.h> | 2924 | AC_RUN_IFELSE([AC_LANG_SOURCE([[#include <time.h> |
| 2929 | char TZ_GMT0[] = "TZ=GMT0"; | 2925 | char TZ_GMT0[] = "TZ=GMT0"; |
| 2930 | char TZ_PST8[] = "TZ=PST8"; | 2926 | char TZ_PST8[] = "TZ=PST8"; |
| 2931 | main() | 2927 | main() |
| @@ -2945,7 +2941,7 @@ main() | |||
| 2945 | if (localtime (&now)->tm_hour != hour_unset) | 2941 | if (localtime (&now)->tm_hour != hour_unset) |
| 2946 | exit (1); | 2942 | exit (1); |
| 2947 | exit (0); | 2943 | exit (0); |
| 2948 | }], emacs_cv_localtime_cache=no, emacs_cv_localtime_cache=yes, | 2944 | }]])], emacs_cv_localtime_cache=no, emacs_cv_localtime_cache=yes, |
| 2949 | [# If we have tzset, assume the worst when cross-compiling. | 2945 | [# If we have tzset, assume the worst when cross-compiling. |
| 2950 | emacs_cv_localtime_cache=yes]) | 2946 | emacs_cv_localtime_cache=yes]) |
| 2951 | else | 2947 | else |
| @@ -2964,7 +2960,7 @@ if test "x$HAVE_TIMEVAL" = xyes; then | |||
| 2964 | if test $ac_cv_func_gettimeofday = yes; then | 2960 | if test $ac_cv_func_gettimeofday = yes; then |
| 2965 | AC_CACHE_CHECK(whether gettimeofday can accept two arguments, | 2961 | AC_CACHE_CHECK(whether gettimeofday can accept two arguments, |
| 2966 | emacs_cv_gettimeofday_two_arguments, | 2962 | emacs_cv_gettimeofday_two_arguments, |
| 2967 | [AC_TRY_COMPILE([ | 2963 | [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ |
| 2968 | #ifdef TIME_WITH_SYS_TIME | 2964 | #ifdef TIME_WITH_SYS_TIME |
| 2969 | #include <sys/time.h> | 2965 | #include <sys/time.h> |
| 2970 | #include <time.h> | 2966 | #include <time.h> |
| @@ -2974,9 +2970,9 @@ if test "x$HAVE_TIMEVAL" = xyes; then | |||
| 2974 | #else | 2970 | #else |
| 2975 | #include <time.h> | 2971 | #include <time.h> |
| 2976 | #endif | 2972 | #endif |
| 2977 | #endif], | 2973 | #endif]], |
| 2978 | [struct timeval time; | 2974 | [[struct timeval time; |
| 2979 | gettimeofday (&time, 0);], | 2975 | gettimeofday (&time, 0);]])], |
| 2980 | emacs_cv_gettimeofday_two_arguments=yes, | 2976 | emacs_cv_gettimeofday_two_arguments=yes, |
| 2981 | emacs_cv_gettimeofday_two_arguments=no)]) | 2977 | emacs_cv_gettimeofday_two_arguments=no)]) |
| 2982 | if test $emacs_cv_gettimeofday_two_arguments = no; then | 2978 | if test $emacs_cv_gettimeofday_two_arguments = no; then |
| @@ -3017,8 +3013,8 @@ AC_FUNC_FORK | |||
| 3017 | 3013 | ||
| 3018 | dnl Adapted from Haible's version. | 3014 | dnl Adapted from Haible's version. |
| 3019 | AC_CACHE_CHECK([for nl_langinfo and CODESET], emacs_cv_langinfo_codeset, | 3015 | AC_CACHE_CHECK([for nl_langinfo and CODESET], emacs_cv_langinfo_codeset, |
| 3020 | [AC_TRY_LINK([#include <langinfo.h>], | 3016 | [AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <langinfo.h>]], |
| 3021 | [char* cs = nl_langinfo(CODESET);], | 3017 | [[char* cs = nl_langinfo(CODESET);]])], |
| 3022 | emacs_cv_langinfo_codeset=yes, | 3018 | emacs_cv_langinfo_codeset=yes, |
| 3023 | emacs_cv_langinfo_codeset=no) | 3019 | emacs_cv_langinfo_codeset=no) |
| 3024 | ]) | 3020 | ]) |
| @@ -3032,7 +3028,7 @@ AC_CHECK_TYPES(size_t) | |||
| 3032 | AC_TYPE_MBSTATE_T | 3028 | AC_TYPE_MBSTATE_T |
| 3033 | 3029 | ||
| 3034 | AC_CACHE_CHECK([for C restricted array declarations], emacs_cv_c_restrict_arr, | 3030 | AC_CACHE_CHECK([for C restricted array declarations], emacs_cv_c_restrict_arr, |
| 3035 | [AC_TRY_COMPILE([void fred (int x[__restrict]);], [], | 3031 | [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[void fred (int x[__restrict]);]], [[]])], |
| 3036 | emacs_cv_c_restrict_arr=yes, emacs_cv_c_restrict_arr=no)]) | 3032 | emacs_cv_c_restrict_arr=yes, emacs_cv_c_restrict_arr=no)]) |
| 3037 | if test "$emacs_cv_c_restrict_arr" = yes; then | 3033 | if test "$emacs_cv_c_restrict_arr" = yes; then |
| 3038 | AC_DEFINE(__restrict_arr, __restrict, | 3034 | AC_DEFINE(__restrict_arr, __restrict, |
| @@ -3494,11 +3490,6 @@ AH_BOTTOM([ | |||
| 3494 | # define SYSTEM_PURESIZE_EXTRA 30000 | 3490 | # define SYSTEM_PURESIZE_EXTRA 30000 |
| 3495 | #endif | 3491 | #endif |
| 3496 | 3492 | ||
| 3497 | /* SIGTYPE is the macro we actually use. */ | ||
| 3498 | #ifndef SIGTYPE | ||
| 3499 | #define SIGTYPE RETSIGTYPE | ||
| 3500 | #endif | ||
| 3501 | |||
| 3502 | #ifdef emacs /* Don't do this for lib-src. */ | 3493 | #ifdef emacs /* Don't do this for lib-src. */ |
| 3503 | /* Tell regex.c to use a type compatible with Emacs. */ | 3494 | /* Tell regex.c to use a type compatible with Emacs. */ |
| 3504 | #define RE_TRANSLATE_TYPE Lisp_Object | 3495 | #define RE_TRANSLATE_TYPE Lisp_Object |
diff --git a/doc/emacs/Makefile.in b/doc/emacs/Makefile.in index ae142dba6e6..aca17ce817d 100644 --- a/doc/emacs/Makefile.in +++ b/doc/emacs/Makefile.in | |||
| @@ -111,7 +111,7 @@ EMACSSOURCES= \ | |||
| 111 | 111 | ||
| 112 | ## This seems pointless. The info/ directory exists in both the | 112 | ## This seems pointless. The info/ directory exists in both the |
| 113 | ## repository and the release tarfiles. We do not use any | 113 | ## repository and the release tarfiles. We do not use any |
| 114 | ## equivalent of mkdir -p/mkinstalldirs, so this is not a general | 114 | ## equivalent of mkdir -p/install-sh -d, so this is not a general |
| 115 | ## solution anyway. The second test -d is for parallel builds. | 115 | ## solution anyway. The second test -d is for parallel builds. |
| 116 | mkinfodir = @test -d ${infodir} || mkdir ${infodir} || test -d ${infodir} | 116 | mkinfodir = @test -d ${infodir} || mkdir ${infodir} || test -d ${infodir} |
| 117 | 117 | ||
diff --git a/doc/lispref/ChangeLog.trunk b/doc/lispref/ChangeLog.trunk index c705aae4934..1eb3cfa2556 100644 --- a/doc/lispref/ChangeLog.trunk +++ b/doc/lispref/ChangeLog.trunk | |||
| @@ -1,3 +1,8 @@ | |||
| 1 | 2011-03-28 Stefan Monnier <monnier@iro.umontreal.ca> | ||
| 2 | |||
| 3 | * commands.texi (Command Overview): post-command-hook is not reset to | ||
| 4 | nil any more. | ||
| 5 | |||
| 1 | 2011-03-19 Stefan Monnier <monnier@iro.umontreal.ca> | 6 | 2011-03-19 Stefan Monnier <monnier@iro.umontreal.ca> |
| 2 | 7 | ||
| 3 | * strings.texi (String Conversion): Don't mention | 8 | * strings.texi (String Conversion): Don't mention |
diff --git a/doc/lispref/commands.texi b/doc/lispref/commands.texi index 4f8d554a68b..eb42ddb11a4 100644 --- a/doc/lispref/commands.texi +++ b/doc/lispref/commands.texi | |||
| @@ -91,8 +91,9 @@ and also when the command loop is first entered. At that time, | |||
| 91 | 91 | ||
| 92 | Quitting is suppressed while running @code{pre-command-hook} and | 92 | Quitting is suppressed while running @code{pre-command-hook} and |
| 93 | @code{post-command-hook}. If an error happens while executing one of | 93 | @code{post-command-hook}. If an error happens while executing one of |
| 94 | these hooks, it terminates execution of the hook, and clears the hook | 94 | these hooks, it does not terminate execution of the hook; instead |
| 95 | variable to @code{nil} so as to prevent an infinite loop of errors. | 95 | the error is silenced and the function in which the error occurred |
| 96 | is removed from the hook. | ||
| 96 | 97 | ||
| 97 | A request coming into the Emacs server (@pxref{Emacs Server,,, | 98 | A request coming into the Emacs server (@pxref{Emacs Server,,, |
| 98 | emacs, The GNU Emacs Manual}) runs these two hooks just as a keyboard | 99 | emacs, The GNU Emacs Manual}) runs these two hooks just as a keyboard |
diff --git a/doc/misc/ChangeLog b/doc/misc/ChangeLog index 50f0e4e45b9..1c29d2598a8 100644 --- a/doc/misc/ChangeLog +++ b/doc/misc/ChangeLog | |||
| @@ -1,3 +1,7 @@ | |||
| 1 | 2011-03-19 Antoine Levitt <antoine.levitt@gmail.com> | ||
| 2 | |||
| 3 | * gnus.texi (Listing Groups): Document gnus-group-list-ticked | ||
| 4 | |||
| 1 | 2011-03-17 Jay Belanger <jay.p.belanger@gmail.com> | 5 | 2011-03-17 Jay Belanger <jay.p.belanger@gmail.com> |
| 2 | 6 | ||
| 3 | * calc.texi (Logarithmic Units): Update the function names. | 7 | * calc.texi (Logarithmic Units): Update the function names. |
diff --git a/doc/misc/gnus.texi b/doc/misc/gnus.texi index b55452cfa82..9771392f0cc 100644 --- a/doc/misc/gnus.texi +++ b/doc/misc/gnus.texi | |||
| @@ -3320,6 +3320,11 @@ List all groups with cached articles (@code{gnus-group-list-cached}). | |||
| 3320 | @findex gnus-group-list-dormant | 3320 | @findex gnus-group-list-dormant |
| 3321 | List all groups with dormant articles (@code{gnus-group-list-dormant}). | 3321 | List all groups with dormant articles (@code{gnus-group-list-dormant}). |
| 3322 | 3322 | ||
| 3323 | @item A ! | ||
| 3324 | @kindex A ! (Group) | ||
| 3325 | @findex gnus-group-list-ticked | ||
| 3326 | List all groups with ticked articles (@code{gnus-group-list-ticked}). | ||
| 3327 | |||
| 3323 | @item A / | 3328 | @item A / |
| 3324 | @kindex A / (Group) | 3329 | @kindex A / (Group) |
| 3325 | @findex gnus-group-list-limit | 3330 | @findex gnus-group-list-limit |
diff --git a/etc/ChangeLog b/etc/ChangeLog index 53cd307e3cc..b4a3d6d6ae7 100644 --- a/etc/ChangeLog +++ b/etc/ChangeLog | |||
| @@ -1,3 +1,7 @@ | |||
| 1 | 2011-03-22 Sebastian Hermida <sebas00@gmail.com> | ||
| 2 | |||
| 3 | * themes/misterioso-theme.el: New file. | ||
| 4 | |||
| 1 | 2011-03-16 Juanma Barranquero <lekktu@gmail.com> | 5 | 2011-03-16 Juanma Barranquero <lekktu@gmail.com> |
| 2 | 6 | ||
| 3 | * NEWS: Document warning about _emacs. | 7 | * NEWS: Document warning about _emacs. |
| @@ -162,6 +162,9 @@ cannot be encoded by the `terminal-coding-system'. | |||
| 162 | 162 | ||
| 163 | ** On graphical displays, the mode-line no longer ends in dashes. | 163 | ** On graphical displays, the mode-line no longer ends in dashes. |
| 164 | 164 | ||
| 165 | ** On Nextstep/OSX, the menu bar can be hidden by customizing | ||
| 166 | ns-auto-hide-menu-bar. | ||
| 167 | |||
| 165 | ** Basic SELinux support has been added. | 168 | ** Basic SELinux support has been added. |
| 166 | This requires Emacs to be linked with libselinux at build time. | 169 | This requires Emacs to be linked with libselinux at build time. |
| 167 | 170 | ||
| @@ -745,7 +748,13 @@ sc.el, x-menu.el, rnews.el, rnewspost.el | |||
| 745 | 748 | ||
| 746 | * Lisp changes in Emacs 24.1 | 749 | * Lisp changes in Emacs 24.1 |
| 747 | 750 | ||
| 751 | ** pre/post-command-hook are not reset to nil upon error. | ||
| 752 | Instead, the offending function is removed. | ||
| 753 | |||
| 754 | ** New low-level function run-hook-wrapped. | ||
| 755 | |||
| 748 | ** byte-compile-disable-print-circle is obsolete. | 756 | ** byte-compile-disable-print-circle is obsolete. |
| 757 | ** deferred-action-list and deferred-action-function are obsolete. | ||
| 749 | ** Removed the stack-trace-on-error variable. | 758 | ** Removed the stack-trace-on-error variable. |
| 750 | Also the debugger can now "continue" from an error, which means it will jump | 759 | Also the debugger can now "continue" from an error, which means it will jump |
| 751 | to the error handler as if the debugger had not been invoked instead of | 760 | to the error handler as if the debugger had not been invoked instead of |
diff --git a/etc/themes/misterioso-theme.el b/etc/themes/misterioso-theme.el new file mode 100644 index 00000000000..864d31d9b09 --- /dev/null +++ b/etc/themes/misterioso-theme.el | |||
| @@ -0,0 +1,110 @@ | |||
| 1 | ;;; misterioso-theme.el --- Custom face theme for Emacs | ||
| 2 | |||
| 3 | ;; Copyright (C) 2011 Free Software Foundation, Inc. | ||
| 4 | |||
| 5 | ;; Author: Sebastian Hermida | ||
| 6 | |||
| 7 | ;; This file is part of GNU Emacs. | ||
| 8 | |||
| 9 | ;; GNU Emacs is free software: you can redistribute it and/or modify | ||
| 10 | ;; it under the terms of the GNU General Public License as published by | ||
| 11 | ;; the Free Software Foundation, either version 3 of the License, or | ||
| 12 | ;; (at your option) any later version. | ||
| 13 | |||
| 14 | ;; GNU Emacs is distributed in the hope that it will be useful, | ||
| 15 | ;; but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 16 | ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 17 | ;; GNU General Public License for more details. | ||
| 18 | |||
| 19 | ;; You should have received a copy of the GNU General Public License | ||
| 20 | ;; along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. | ||
| 21 | |||
| 22 | ;;; Code: | ||
| 23 | |||
| 24 | (deftheme misterioso | ||
| 25 | "Theme for faces, using light colors on a dark gray background.") | ||
| 26 | |||
| 27 | (let ((class '((class color) (min-colors 89)))) | ||
| 28 | |||
| 29 | (custom-theme-set-faces | ||
| 30 | 'misterioso | ||
| 31 | ;; Ensure sufficient contrast on 256-color xterms. | ||
| 32 | `(default ((((class color) (min-colors 4096)) | ||
| 33 | (:background "#2d3743" :foreground "#e1e1e0")) | ||
| 34 | (,class | ||
| 35 | (:background "#3a3a3a" :foreground "#e1e1e0")))) | ||
| 36 | `(cursor ((,class (:background "#415160" :foreground "#415160")))) | ||
| 37 | ;; Highlighting faces | ||
| 38 | `(fringe ((,class (:background "#2e3748")))) | ||
| 39 | `(highlight ((,class (:background "#338f86" :foreground "#e1e1e0")))) | ||
| 40 | `(region ((,class (:background "#2d4948" :foreground "#e1e1e0")))) | ||
| 41 | `(isearch ((,class (:background "#fcffad" :foreground "#000000")))) | ||
| 42 | `(lazy-highlight ((,class (:background "#338f86")))) | ||
| 43 | `(trailing-whitespace ((,class (:background "#ff4242")))) | ||
| 44 | ;; Mode line faces | ||
| 45 | `(mode-line ((,class (:background "#212931" :foreground "#eeeeec")))) | ||
| 46 | `(mode-line-inactive | ||
| 47 | ((,class (:background "#878787" :foreground "#eeeeec")))) | ||
| 48 | `(header-line ((,class (:background "#e5e5e5" :foreground "#333333")))) | ||
| 49 | ;; Escape and prompt faces | ||
| 50 | `(minibuffer-prompt ((,class (:foreground "#729fcf" :weight bold)))) | ||
| 51 | ;; Font lock faces | ||
| 52 | `(font-lock-builtin-face ((,class (:foreground "#23d7d7")))) | ||
| 53 | `(font-lock-comment-face ((,class (:foreground "#74af68")))) | ||
| 54 | `(font-lock-constant-face ((,class (:foreground "#008b8b")))) | ||
| 55 | `(font-lock-function-name-face | ||
| 56 | ((,class (:foreground "#00ede1" :weight bold)))) | ||
| 57 | `(font-lock-keyword-face ((,class (:foreground "#ffad29" :weight bold)))) | ||
| 58 | `(font-lock-string-face ((,class (:foreground "#e67128")))) | ||
| 59 | `(font-lock-type-face ((,class (:foreground "#34cae2")))) | ||
| 60 | `(font-lock-variable-name-face ((,class (:foreground "#dbdb95")))) | ||
| 61 | `(font-lock-warning-face ((,class (:foreground "#ff4242" :weight bold)))) | ||
| 62 | ;; Buttons and links | ||
| 63 | `(button ((,class (:underline t)))) | ||
| 64 | `(link ((,class (:foreground "#59e9ff" :underline t)))) | ||
| 65 | `(link-visited ((,class (:foreground "#ed74cd" :underline t)))) | ||
| 66 | ;; Gnus faces | ||
| 67 | `(gnus-group-news-1 ((,class (:foreground "#ff4242" :weight bold)))) | ||
| 68 | `(gnus-group-news-1-low ((,class (:foreground "#ff4242")))) | ||
| 69 | `(gnus-group-news-2 ((,class (:foreground "#00ede1" :weight bold)))) | ||
| 70 | `(gnus-group-news-2-low ((,class (:foreground "#00ede1")))) | ||
| 71 | `(gnus-group-news-3 ((,class (:foreground "#23d7d7" :weight bold)))) | ||
| 72 | `(gnus-group-news-3-low ((,class (:foreground "#23d7d7")))) | ||
| 73 | `(gnus-group-news-4 ((,class (:foreground "#74af68" :weight bold)))) | ||
| 74 | `(gnus-group-news-4-low ((,class (:foreground "#74af68")))) | ||
| 75 | `(gnus-group-news-5 ((,class (:foreground "#dbdb95" :weight bold)))) | ||
| 76 | `(gnus-group-news-5-low ((,class (:foreground "#dbdb95")))) | ||
| 77 | `(gnus-group-news-low ((,class (:foreground "#008b8b")))) | ||
| 78 | `(gnus-group-mail-1 ((,class (:foreground "#ff4242" :weight bold)))) | ||
| 79 | `(gnus-group-mail-1-low ((,class (:foreground "#ff4242")))) | ||
| 80 | `(gnus-group-mail-2 ((,class (:foreground "#00ede1" :weight bold)))) | ||
| 81 | `(gnus-group-mail-2-low ((,class (:foreground "#00ede1")))) | ||
| 82 | `(gnus-group-mail-3 ((,class (:foreground "#23d7d7" :weight bold)))) | ||
| 83 | `(gnus-group-mail-3-low ((,class (:foreground "#23d7d7")))) | ||
| 84 | `(gnus-group-mail-low ((,class (:foreground "#008b8b")))) | ||
| 85 | `(gnus-header-content ((,class (:weight normal :foreground "#ffad29")))) | ||
| 86 | `(gnus-header-from ((,class (:foreground "#e67128" :weight bold)))) | ||
| 87 | `(gnus-header-subject ((,class (:foreground "#dbdb95")))) | ||
| 88 | `(gnus-header-name ((,class (:foreground "#00ede1")))) | ||
| 89 | `(gnus-header-newsgroups ((,class (:foreground "#e67128")))) | ||
| 90 | ;; Message faces | ||
| 91 | `(message-header-name ((,class (:foreground "#ffad29" :weight bold)))) | ||
| 92 | `(message-header-cc ((,class (:foreground "#e67128")))) | ||
| 93 | `(message-header-other ((,class (:foreground "#e67128")))) | ||
| 94 | `(message-header-subject ((,class (:foreground "#dbdb95")))) | ||
| 95 | `(message-header-to ((,class (:foreground "#00ede1")))) | ||
| 96 | `(message-cited-text ((,class (:foreground "#74af68")))) | ||
| 97 | `(message-separator ((,class (:foreground "#23d7d7")))))) | ||
| 98 | |||
| 99 | (custom-theme-set-variables | ||
| 100 | 'misterioso | ||
| 101 | '(ansi-color-names-vector ["#2d3743" "#ff4242" "#74af68" "#dbdb95" | ||
| 102 | "#34cae2" "#008b8b" "#00ede1" "#e1e1e0"])) | ||
| 103 | |||
| 104 | (provide-theme 'misterioso) | ||
| 105 | |||
| 106 | ;; Local Variables: | ||
| 107 | ;; no-byte-compile: t | ||
| 108 | ;; End: | ||
| 109 | |||
| 110 | ;;; misterioso-theme.el ends here | ||
diff --git a/leim/ChangeLog b/leim/ChangeLog index 7334fa991c9..08da90c2aa8 100644 --- a/leim/ChangeLog +++ b/leim/ChangeLog | |||
| @@ -1,3 +1,7 @@ | |||
| 1 | 2011-03-23 Glenn Morris <rgm@gnu.org> | ||
| 2 | |||
| 3 | * Makefile.in (install): Use `install-sh -d' rather than mkinstalldirs. | ||
| 4 | |||
| 1 | 2011-02-28 Juanma Barranquero <lekktu@gmail.com> | 5 | 2011-02-28 Juanma Barranquero <lekktu@gmail.com> |
| 2 | 6 | ||
| 3 | * quail/ethiopic.el ("ethiopic"): Fix tpo in docstring. | 7 | * quail/ethiopic.el ("ethiopic"): Fix tpo in docstring. |
diff --git a/leim/Makefile.in b/leim/Makefile.in index 8c2baadf15f..531f0481f7a 100644 --- a/leim/Makefile.in +++ b/leim/Makefile.in | |||
| @@ -220,7 +220,7 @@ MV_DIRS = for i in $$dir; do rm -fr `basename "$$i"` ; mv "$$i" . ; done | |||
| 220 | 220 | ||
| 221 | install: all | 221 | install: all |
| 222 | if [ ! -d ${INSTALLDIR} ] ; then \ | 222 | if [ ! -d ${INSTALLDIR} ] ; then \ |
| 223 | umask 022; ${srcdir}/../mkinstalldirs ${INSTALLDIR}; \ | 223 | umask 022; ${srcdir}/../install-sh -d ${INSTALLDIR}; \ |
| 224 | else true; fi | 224 | else true; fi |
| 225 | if [ x`(cd ${INSTALLDIR} && /bin/pwd)` != x`(/bin/pwd)` ] ; then \ | 225 | if [ x`(cd ${INSTALLDIR} && /bin/pwd)` != x`(/bin/pwd)` ] ; then \ |
| 226 | rm -f ${INSTALLDIR}/leim-list.el; \ | 226 | rm -f ${INSTALLDIR}/leim-list.el; \ |
diff --git a/lib-src/ChangeLog b/lib-src/ChangeLog index bd1a84cf0b9..5007995e14e 100644 --- a/lib-src/ChangeLog +++ b/lib-src/ChangeLog | |||
| @@ -1,3 +1,51 @@ | |||
| 1 | 2011-03-30 Paul Eggert <eggert@cs.ucla.edu> | ||
| 2 | |||
| 3 | Fix a problem found by GCC 4.6.0's static checks. | ||
| 4 | * etags.c (just_read_file): Remove dummy variable and simplify. | ||
| 5 | |||
| 6 | 2011-03-27 Glenn Morris <rgm@gnu.org> | ||
| 7 | |||
| 8 | * emacsclient.c: Replace SIGTYPE with void. | ||
| 9 | |||
| 10 | 2011-03-23 Juanma Barranquero <lekktu@gmail.com> | ||
| 11 | |||
| 12 | * ntlib.c: Include <ctype.h>. | ||
| 13 | |||
| 14 | 2011-03-23 Glenn Morris <rgm@gnu.org> | ||
| 15 | |||
| 16 | * Makefile.in ($(DESTDIR)${archlibdir}): | ||
| 17 | Use `install-sh -d' rather than mkinstalldirs. | ||
| 18 | |||
| 19 | 2011-03-23 Paul Eggert <eggert@cs.ucla.edu> | ||
| 20 | |||
| 21 | * ebrowse.c: Use size_t, not int, for sizes. | ||
| 22 | This avoids a warning with gcc -Wstrict-overflow, and works | ||
| 23 | better for very large objects. | ||
| 24 | (inbuffer_size): Now size_t. All uses changed. | ||
| 25 | (xmalloc, xrealloc, operator_name, process_file): Use size_t for | ||
| 26 | sizes. Don't bother testing whether a size_t value can be negative. | ||
| 27 | |||
| 28 | * etags.c (Ada_funcs): Redo slightly to avoid overflow warning. | ||
| 29 | |||
| 30 | etags: In Prolog functions, don't assume int fits in size_t. | ||
| 31 | This avoids a warning with gcc -Wstrict-overflow. | ||
| 32 | * etags.c (Prolog_functions, prolog_pr, prolog_atom): Use size_t, | ||
| 33 | not int, to store sizes. | ||
| 34 | (prolog_atom): Return 0, not -1, on error. All callers changed. | ||
| 35 | |||
| 36 | update-game-score: fix bug with -r | ||
| 37 | * update-game-score.c (main): Don't set 'scores' to garbage when | ||
| 38 | -r is specified and scorecount != MAX_SCORES (Bug#8310). This bug | ||
| 39 | was introduced in the 2002-04-10 change, and was found with gcc | ||
| 40 | -Wstrict-overflow (GCC 4.5.2, x86-64). | ||
| 41 | |||
| 42 | fakemail: Remove dependency on ignore-value. | ||
| 43 | This undoes some of the recent fakemail-related changes. | ||
| 44 | It is made possible due to recent changes to gnulib's stdio module. | ||
| 45 | * Makefile.in (fakemail${EXEEXT}): Do not depend on ignore-value.h. | ||
| 46 | * fakemail.c: Do not include ignore-value.h. | ||
| 47 | (put_line): Do not use ignore_value. | ||
| 48 | |||
| 1 | 2011-03-03 Drake Wilson <drake@begriffli.ch> (tiny change) | 49 | 2011-03-03 Drake Wilson <drake@begriffli.ch> (tiny change) |
| 2 | 50 | ||
| 3 | * emacsclient.c (longopts): Add quiet. | 51 | * emacsclient.c (longopts): Add quiet. |
diff --git a/lib-src/Makefile.in b/lib-src/Makefile.in index d622233efb4..36366a4d2e7 100644 --- a/lib-src/Makefile.in +++ b/lib-src/Makefile.in | |||
| @@ -235,13 +235,13 @@ maybe-blessmail: $(BLESSMAIL_TARGET) | |||
| 235 | $(DESTDIR)${archlibdir}: all | 235 | $(DESTDIR)${archlibdir}: all |
| 236 | @echo | 236 | @echo |
| 237 | @echo "Installing utilities run internally by Emacs." | 237 | @echo "Installing utilities run internally by Emacs." |
| 238 | umask 022; $(top_srcdir)/mkinstalldirs $(DESTDIR)${archlibdir} | 238 | umask 022; $(top_srcdir)/install-sh -d $(DESTDIR)${archlibdir} |
| 239 | if [ `(cd $(DESTDIR)${archlibdir} && /bin/pwd)` != `/bin/pwd` ]; then \ | 239 | if [ `(cd $(DESTDIR)${archlibdir} && /bin/pwd)` != `/bin/pwd` ]; then \ |
| 240 | for file in ${UTILITIES}; do \ | 240 | for file in ${UTILITIES}; do \ |
| 241 | $(INSTALL_PROGRAM) $(INSTALL_STRIP) $$file $(DESTDIR)${archlibdir}/$$file ; \ | 241 | $(INSTALL_PROGRAM) $(INSTALL_STRIP) $$file $(DESTDIR)${archlibdir}/$$file ; \ |
| 242 | done ; \ | 242 | done ; \ |
| 243 | fi | 243 | fi |
| 244 | umask 022; $(top_srcdir)/mkinstalldirs $(DESTDIR)${gamedir}; \ | 244 | umask 022; $(top_srcdir)/install-sh -d $(DESTDIR)${gamedir}; \ |
| 245 | touch $(DESTDIR)${gamedir}/snake-scores; \ | 245 | touch $(DESTDIR)${gamedir}/snake-scores; \ |
| 246 | touch $(DESTDIR)${gamedir}/tetris-scores | 246 | touch $(DESTDIR)${gamedir}/tetris-scores |
| 247 | -if chown ${gameuser} $(DESTDIR)${archlibdir}/update-game-score && chmod u+s $(DESTDIR)${archlibdir}/update-game-score; then \ | 247 | -if chown ${gameuser} $(DESTDIR)${archlibdir}/update-game-score && chmod u+s $(DESTDIR)${archlibdir}/update-game-score; then \ |
| @@ -353,7 +353,7 @@ movemail.o: ${srcdir}/movemail.c ../src/config.h | |||
| 353 | pop.o: ${srcdir}/pop.c ${srcdir}/../lib/min-max.h ../src/config.h | 353 | pop.o: ${srcdir}/pop.c ${srcdir}/../lib/min-max.h ../src/config.h |
| 354 | $(CC) -c ${CPP_CFLAGS} ${MOVE_FLAGS} ${srcdir}/pop.c | 354 | $(CC) -c ${CPP_CFLAGS} ${MOVE_FLAGS} ${srcdir}/pop.c |
| 355 | 355 | ||
| 356 | fakemail${EXEEXT}: ${srcdir}/fakemail.c ${srcdir}/../lib/ignore-value.h ../src/config.h | 356 | fakemail${EXEEXT}: ${srcdir}/fakemail.c ../src/config.h |
| 357 | $(CC) ${ALL_CFLAGS} ${srcdir}/fakemail.c $(LOADLIBES) -o fakemail | 357 | $(CC) ${ALL_CFLAGS} ${srcdir}/fakemail.c $(LOADLIBES) -o fakemail |
| 358 | 358 | ||
| 359 | emacsclient${EXEEXT}: ${srcdir}/emacsclient.c ../src/config.h | 359 | emacsclient${EXEEXT}: ${srcdir}/emacsclient.c ../src/config.h |
diff --git a/lib-src/ebrowse.c b/lib-src/ebrowse.c index 113b6fdfe40..7871a804997 100644 --- a/lib-src/ebrowse.c +++ b/lib-src/ebrowse.c | |||
| @@ -378,7 +378,7 @@ int max_regexp = 50; | |||
| 378 | 378 | ||
| 379 | char *inbuffer; | 379 | char *inbuffer; |
| 380 | char *in; | 380 | char *in; |
| 381 | int inbuffer_size; | 381 | size_t inbuffer_size; |
| 382 | 382 | ||
| 383 | /* Return the current buffer position in the input file. */ | 383 | /* Return the current buffer position in the input file. */ |
| 384 | 384 | ||
| @@ -492,7 +492,7 @@ yyerror (const char *format, const char *s) | |||
| 492 | available. */ | 492 | available. */ |
| 493 | 493 | ||
| 494 | static void * | 494 | static void * |
| 495 | xmalloc (int nbytes) | 495 | xmalloc (size_t nbytes) |
| 496 | { | 496 | { |
| 497 | void *p = malloc (nbytes); | 497 | void *p = malloc (nbytes); |
| 498 | if (p == NULL) | 498 | if (p == NULL) |
| @@ -507,7 +507,7 @@ xmalloc (int nbytes) | |||
| 507 | /* Like realloc but print an error and exit if out of memory. */ | 507 | /* Like realloc but print an error and exit if out of memory. */ |
| 508 | 508 | ||
| 509 | static void * | 509 | static void * |
| 510 | xrealloc (void *p, int sz) | 510 | xrealloc (void *p, size_t sz) |
| 511 | { | 511 | { |
| 512 | p = realloc (p, sz); | 512 | p = realloc (p, sz); |
| 513 | if (p == NULL) | 513 | if (p == NULL) |
| @@ -2792,10 +2792,10 @@ parse_classname (void) | |||
| 2792 | static char * | 2792 | static char * |
| 2793 | operator_name (int *sc) | 2793 | operator_name (int *sc) |
| 2794 | { | 2794 | { |
| 2795 | static int id_size = 0; | 2795 | static size_t id_size = 0; |
| 2796 | static char *id = NULL; | 2796 | static char *id = NULL; |
| 2797 | const char *s; | 2797 | const char *s; |
| 2798 | int len; | 2798 | size_t len; |
| 2799 | 2799 | ||
| 2800 | MATCH (); | 2800 | MATCH (); |
| 2801 | 2801 | ||
| @@ -2811,7 +2811,7 @@ operator_name (int *sc) | |||
| 2811 | len = strlen (s) + 10; | 2811 | len = strlen (s) + 10; |
| 2812 | if (len > id_size) | 2812 | if (len > id_size) |
| 2813 | { | 2813 | { |
| 2814 | int new_size = max (len, 2 * id_size); | 2814 | size_t new_size = max (len, 2 * id_size); |
| 2815 | id = (char *) xrealloc (id, new_size); | 2815 | id = (char *) xrealloc (id, new_size); |
| 2816 | id_size = new_size; | 2816 | id_size = new_size; |
| 2817 | } | 2817 | } |
| @@ -2832,7 +2832,7 @@ operator_name (int *sc) | |||
| 2832 | } | 2832 | } |
| 2833 | else | 2833 | else |
| 2834 | { | 2834 | { |
| 2835 | int tokens_matched = 0; | 2835 | size_t tokens_matched = 0; |
| 2836 | 2836 | ||
| 2837 | len = 20; | 2837 | len = 20; |
| 2838 | if (len > id_size) | 2838 | if (len > id_size) |
| @@ -2853,7 +2853,7 @@ operator_name (int *sc) | |||
| 2853 | len += strlen (s) + 2; | 2853 | len += strlen (s) + 2; |
| 2854 | if (len > id_size) | 2854 | if (len > id_size) |
| 2855 | { | 2855 | { |
| 2856 | int new_size = max (len, 2 * id_size); | 2856 | size_t new_size = max (len, 2 * id_size); |
| 2857 | id = (char *) xrealloc (id, new_size); | 2857 | id = (char *) xrealloc (id, new_size); |
| 2858 | id_size = new_size; | 2858 | id_size = new_size; |
| 2859 | } | 2859 | } |
| @@ -3550,7 +3550,7 @@ process_file (char *file) | |||
| 3550 | fp = open_file (file); | 3550 | fp = open_file (file); |
| 3551 | if (fp) | 3551 | if (fp) |
| 3552 | { | 3552 | { |
| 3553 | int nread, nbytes; | 3553 | size_t nread, nbytes; |
| 3554 | 3554 | ||
| 3555 | /* Give a progress indication if needed. */ | 3555 | /* Give a progress indication if needed. */ |
| 3556 | if (f_very_verbose) | 3556 | if (f_very_verbose) |
| @@ -3574,12 +3574,10 @@ process_file (char *file) | |||
| 3574 | } | 3574 | } |
| 3575 | 3575 | ||
| 3576 | nbytes = fread (inbuffer + nread, 1, READ_CHUNK_SIZE, fp); | 3576 | nbytes = fread (inbuffer + nread, 1, READ_CHUNK_SIZE, fp); |
| 3577 | if (nbytes <= 0) | 3577 | if (nbytes == 0) |
| 3578 | break; | 3578 | break; |
| 3579 | nread += nbytes; | 3579 | nread += nbytes; |
| 3580 | } | 3580 | } |
| 3581 | if (nread < 0) | ||
| 3582 | nread = 0; | ||
| 3583 | inbuffer[nread] = '\0'; | 3581 | inbuffer[nread] = '\0'; |
| 3584 | 3582 | ||
| 3585 | /* Reinitialize scanner and parser for the new input file. */ | 3583 | /* Reinitialize scanner and parser for the new input file. */ |
diff --git a/lib-src/emacsclient.c b/lib-src/emacsclient.c index abc9aee37c1..737a8d88586 100644 --- a/lib-src/emacsclient.c +++ b/lib-src/emacsclient.c | |||
| @@ -1116,7 +1116,7 @@ socket_status (char *name) | |||
| 1116 | /* A signal handler that passes the signal to the Emacs process. | 1116 | /* A signal handler that passes the signal to the Emacs process. |
| 1117 | Useful for SIGWINCH. */ | 1117 | Useful for SIGWINCH. */ |
| 1118 | 1118 | ||
| 1119 | static SIGTYPE | 1119 | static void |
| 1120 | pass_signal_to_emacs (int signalnum) | 1120 | pass_signal_to_emacs (int signalnum) |
| 1121 | { | 1121 | { |
| 1122 | int old_errno = errno; | 1122 | int old_errno = errno; |
| @@ -1131,7 +1131,7 @@ pass_signal_to_emacs (int signalnum) | |||
| 1131 | /* Signal handler for SIGCONT; notify the Emacs process that it can | 1131 | /* Signal handler for SIGCONT; notify the Emacs process that it can |
| 1132 | now resume our tty frame. */ | 1132 | now resume our tty frame. */ |
| 1133 | 1133 | ||
| 1134 | static SIGTYPE | 1134 | static void |
| 1135 | handle_sigcont (int signalnum) | 1135 | handle_sigcont (int signalnum) |
| 1136 | { | 1136 | { |
| 1137 | int old_errno = errno; | 1137 | int old_errno = errno; |
| @@ -1157,7 +1157,7 @@ handle_sigcont (int signalnum) | |||
| 1157 | reality, we may get a SIGTSTP on C-z. Handling this signal and | 1157 | reality, we may get a SIGTSTP on C-z. Handling this signal and |
| 1158 | notifying Emacs about it should get things under control again. */ | 1158 | notifying Emacs about it should get things under control again. */ |
| 1159 | 1159 | ||
| 1160 | static SIGTYPE | 1160 | static void |
| 1161 | handle_sigtstp (int signalnum) | 1161 | handle_sigtstp (int signalnum) |
| 1162 | { | 1162 | { |
| 1163 | int old_errno = errno; | 1163 | int old_errno = errno; |
diff --git a/lib-src/etags.c b/lib-src/etags.c index 385e4cc9721..a2cdf26abc7 100644 --- a/lib-src/etags.c +++ b/lib-src/etags.c | |||
| @@ -3978,10 +3978,8 @@ Yacc_entries (FILE *inf) | |||
| 3978 | static void | 3978 | static void |
| 3979 | just_read_file (FILE *inf) | 3979 | just_read_file (FILE *inf) |
| 3980 | { | 3980 | { |
| 3981 | register char *dummy; | 3981 | while (!feof (inf)) |
| 3982 | 3982 | readline (&lb, inf); | |
| 3983 | LOOP_ON_INPUT_LINES (inf, lb, dummy) | ||
| 3984 | continue; | ||
| 3985 | } | 3983 | } |
| 3986 | 3984 | ||
| 3987 | 3985 | ||
| @@ -4198,7 +4196,7 @@ Ada_funcs (FILE *inf) | |||
| 4198 | /* Skip a string i.e. "abcd". */ | 4196 | /* Skip a string i.e. "abcd". */ |
| 4199 | if (inquote || (*dbp == '"')) | 4197 | if (inquote || (*dbp == '"')) |
| 4200 | { | 4198 | { |
| 4201 | dbp = etags_strchr ((inquote) ? dbp : dbp+1, '"'); | 4199 | dbp = etags_strchr (dbp + !inquote, '"'); |
| 4202 | if (dbp != NULL) | 4200 | if (dbp != NULL) |
| 4203 | { | 4201 | { |
| 4204 | inquote = FALSE; | 4202 | inquote = FALSE; |
| @@ -5254,16 +5252,16 @@ HTML_labels (FILE *inf) | |||
| 5254 | * Original code by Sunichirou Sugou (1989) | 5252 | * Original code by Sunichirou Sugou (1989) |
| 5255 | * Rewritten by Anders Lindgren (1996) | 5253 | * Rewritten by Anders Lindgren (1996) |
| 5256 | */ | 5254 | */ |
| 5257 | static int prolog_pr (char *, char *); | 5255 | static size_t prolog_pr (char *, char *); |
| 5258 | static void prolog_skip_comment (linebuffer *, FILE *); | 5256 | static void prolog_skip_comment (linebuffer *, FILE *); |
| 5259 | static int prolog_atom (char *, int); | 5257 | static size_t prolog_atom (char *, size_t); |
| 5260 | 5258 | ||
| 5261 | static void | 5259 | static void |
| 5262 | Prolog_functions (FILE *inf) | 5260 | Prolog_functions (FILE *inf) |
| 5263 | { | 5261 | { |
| 5264 | char *cp, *last; | 5262 | char *cp, *last; |
| 5265 | int len; | 5263 | size_t len; |
| 5266 | int allocated; | 5264 | size_t allocated; |
| 5267 | 5265 | ||
| 5268 | allocated = 0; | 5266 | allocated = 0; |
| 5269 | len = 0; | 5267 | len = 0; |
| @@ -5320,16 +5318,16 @@ prolog_skip_comment (linebuffer *plb, FILE *inf) | |||
| 5320 | * Return the size of the name of the predicate or rule, or 0 if no | 5318 | * Return the size of the name of the predicate or rule, or 0 if no |
| 5321 | * header was found. | 5319 | * header was found. |
| 5322 | */ | 5320 | */ |
| 5323 | static int | 5321 | static size_t |
| 5324 | prolog_pr (char *s, char *last) | 5322 | prolog_pr (char *s, char *last) |
| 5325 | 5323 | ||
| 5326 | /* Name of last clause. */ | 5324 | /* Name of last clause. */ |
| 5327 | { | 5325 | { |
| 5328 | int pos; | 5326 | size_t pos; |
| 5329 | int len; | 5327 | size_t len; |
| 5330 | 5328 | ||
| 5331 | pos = prolog_atom (s, 0); | 5329 | pos = prolog_atom (s, 0); |
| 5332 | if (pos < 1) | 5330 | if (! pos) |
| 5333 | return 0; | 5331 | return 0; |
| 5334 | 5332 | ||
| 5335 | len = pos; | 5333 | len = pos; |
| @@ -5339,7 +5337,7 @@ prolog_pr (char *s, char *last) | |||
| 5339 | || (s[pos] == '(' && (pos += 1)) | 5337 | || (s[pos] == '(' && (pos += 1)) |
| 5340 | || (s[pos] == ':' && s[pos + 1] == '-' && (pos += 2))) | 5338 | || (s[pos] == ':' && s[pos + 1] == '-' && (pos += 2))) |
| 5341 | && (last == NULL /* save only the first clause */ | 5339 | && (last == NULL /* save only the first clause */ |
| 5342 | || len != (int)strlen (last) | 5340 | || len != strlen (last) |
| 5343 | || !strneq (s, last, len))) | 5341 | || !strneq (s, last, len))) |
| 5344 | { | 5342 | { |
| 5345 | make_tag (s, len, TRUE, s, pos, lineno, linecharno); | 5343 | make_tag (s, len, TRUE, s, pos, lineno, linecharno); |
| @@ -5351,17 +5349,17 @@ prolog_pr (char *s, char *last) | |||
| 5351 | 5349 | ||
| 5352 | /* | 5350 | /* |
| 5353 | * Consume a Prolog atom. | 5351 | * Consume a Prolog atom. |
| 5354 | * Return the number of bytes consumed, or -1 if there was an error. | 5352 | * Return the number of bytes consumed, or 0 if there was an error. |
| 5355 | * | 5353 | * |
| 5356 | * A prolog atom, in this context, could be one of: | 5354 | * A prolog atom, in this context, could be one of: |
| 5357 | * - An alphanumeric sequence, starting with a lower case letter. | 5355 | * - An alphanumeric sequence, starting with a lower case letter. |
| 5358 | * - A quoted arbitrary string. Single quotes can escape themselves. | 5356 | * - A quoted arbitrary string. Single quotes can escape themselves. |
| 5359 | * Backslash quotes everything. | 5357 | * Backslash quotes everything. |
| 5360 | */ | 5358 | */ |
| 5361 | static int | 5359 | static size_t |
| 5362 | prolog_atom (char *s, int pos) | 5360 | prolog_atom (char *s, size_t pos) |
| 5363 | { | 5361 | { |
| 5364 | int origpos; | 5362 | size_t origpos; |
| 5365 | 5363 | ||
| 5366 | origpos = pos; | 5364 | origpos = pos; |
| 5367 | 5365 | ||
| @@ -5390,11 +5388,11 @@ prolog_atom (char *s, int pos) | |||
| 5390 | } | 5388 | } |
| 5391 | else if (s[pos] == '\0') | 5389 | else if (s[pos] == '\0') |
| 5392 | /* Multiline quoted atoms are ignored. */ | 5390 | /* Multiline quoted atoms are ignored. */ |
| 5393 | return -1; | 5391 | return 0; |
| 5394 | else if (s[pos] == '\\') | 5392 | else if (s[pos] == '\\') |
| 5395 | { | 5393 | { |
| 5396 | if (s[pos+1] == '\0') | 5394 | if (s[pos+1] == '\0') |
| 5397 | return -1; | 5395 | return 0; |
| 5398 | pos += 2; | 5396 | pos += 2; |
| 5399 | } | 5397 | } |
| 5400 | else | 5398 | else |
| @@ -5403,7 +5401,7 @@ prolog_atom (char *s, int pos) | |||
| 5403 | return pos - origpos; | 5401 | return pos - origpos; |
| 5404 | } | 5402 | } |
| 5405 | else | 5403 | else |
| 5406 | return -1; | 5404 | return 0; |
| 5407 | } | 5405 | } |
| 5408 | 5406 | ||
| 5409 | 5407 | ||
diff --git a/lib-src/fakemail.c b/lib-src/fakemail.c index 780a104b405..940d6219425 100644 --- a/lib-src/fakemail.c +++ b/lib-src/fakemail.c | |||
| @@ -62,8 +62,6 @@ main () | |||
| 62 | 62 | ||
| 63 | /* This is to declare cuserid. */ | 63 | /* This is to declare cuserid. */ |
| 64 | #include <unistd.h> | 64 | #include <unistd.h> |
| 65 | |||
| 66 | #include <ignore-value.h> | ||
| 67 | 65 | ||
| 68 | /* Type definitions */ | 66 | /* Type definitions */ |
| 69 | 67 | ||
| @@ -500,7 +498,7 @@ put_line (const char *string) | |||
| 500 | } | 498 | } |
| 501 | } | 499 | } |
| 502 | /* Output that much, then break the line. */ | 500 | /* Output that much, then break the line. */ |
| 503 | ignore_value (fwrite (s, 1, breakpos - s, rem->handle)); | 501 | fwrite (s, 1, breakpos - s, rem->handle); |
| 504 | column = 8; | 502 | column = 8; |
| 505 | 503 | ||
| 506 | /* Skip whitespace and prepare to print more addresses. */ | 504 | /* Skip whitespace and prepare to print more addresses. */ |
diff --git a/lib-src/ntlib.c b/lib-src/ntlib.c index 0ecd4177d2c..83f653f3ea3 100644 --- a/lib-src/ntlib.c +++ b/lib-src/ntlib.c | |||
| @@ -28,6 +28,7 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. | |||
| 28 | #include <sys/types.h> | 28 | #include <sys/types.h> |
| 29 | #include <sys/stat.h> | 29 | #include <sys/stat.h> |
| 30 | #include <errno.h> | 30 | #include <errno.h> |
| 31 | #include <ctype.h> | ||
| 31 | 32 | ||
| 32 | #include "ntlib.h" | 33 | #include "ntlib.h" |
| 33 | 34 | ||
diff --git a/lib-src/update-game-score.c b/lib-src/update-game-score.c index 70b79a64f91..e95e2ce259d 100644 --- a/lib-src/update-game-score.c +++ b/lib-src/update-game-score.c | |||
| @@ -242,13 +242,15 @@ main (int argc, char **argv) | |||
| 242 | push_score (&scores, &scorecount, newscore, user_id, newdata); | 242 | push_score (&scores, &scorecount, newscore, user_id, newdata); |
| 243 | sort_scores (scores, scorecount, reverse); | 243 | sort_scores (scores, scorecount, reverse); |
| 244 | /* Limit the number of scores. If we're using reverse sorting, then | 244 | /* Limit the number of scores. If we're using reverse sorting, then |
| 245 | we should increment the beginning of the array, to skip over the | 245 | also increment the beginning of the array, to skip over the |
| 246 | *smallest* scores. Otherwise, we just decrement the number of | 246 | *smallest* scores. Otherwise, just decrementing the number of |
| 247 | scores, since the smallest will be at the end. */ | 247 | scores suffices, since the smallest is at the end. */ |
| 248 | if (scorecount > MAX_SCORES) | 248 | if (scorecount > MAX_SCORES) |
| 249 | scorecount -= (scorecount - MAX_SCORES); | 249 | { |
| 250 | if (reverse) | 250 | if (reverse) |
| 251 | scores += (scorecount - MAX_SCORES); | 251 | scores += (scorecount - MAX_SCORES); |
| 252 | scorecount = MAX_SCORES; | ||
| 253 | } | ||
| 252 | if (write_scores (scorefile, scores, scorecount) < 0) | 254 | if (write_scores (scorefile, scores, scorecount) < 0) |
| 253 | { | 255 | { |
| 254 | unlock_file (scorefile, lockstate); | 256 | unlock_file (scorefile, lockstate); |
diff --git a/lib/gnulib.mk b/lib/gnulib.mk index cd6a1d00c15..030f95b7a68 100644 --- a/lib/gnulib.mk +++ b/lib/gnulib.mk | |||
| @@ -9,7 +9,7 @@ | |||
| 9 | # the same distribution terms as the rest of that program. | 9 | # the same distribution terms as the rest of that program. |
| 10 | # | 10 | # |
| 11 | # Generated by gnulib-tool. | 11 | # Generated by gnulib-tool. |
| 12 | # Reproduce by: gnulib-tool --import --dir=. --lib=libgnu --source-base=lib --m4-base=m4 --doc-base=doc --tests-base=tests --aux-dir=. --makefile-name=gnulib.mk --no-libtool --macro-prefix=gl --no-vc-files crypto/md5 dtoastr filemode getloadavg getopt-gnu ignore-value intprops lstat mktime readlink strftime symlink sys_stat | 12 | # Reproduce by: gnulib-tool --import --dir=. --lib=libgnu --source-base=lib --m4-base=m4 --doc-base=doc --tests-base=tests --aux-dir=. --makefile-name=gnulib.mk --no-libtool --macro-prefix=gl --no-vc-files crypto/md5 dtoastr filemode getloadavg getopt-gnu ignore-value intprops lstat mktime readlink socklen stdio strftime symlink sys_stat |
| 13 | 13 | ||
| 14 | 14 | ||
| 15 | MOSTLYCLEANFILES += core *.stackdump | 15 | MOSTLYCLEANFILES += core *.stackdump |
| @@ -280,6 +280,117 @@ EXTRA_DIST += stdint.in.h | |||
| 280 | 280 | ||
| 281 | ## end gnulib module stdint | 281 | ## end gnulib module stdint |
| 282 | 282 | ||
| 283 | ## begin gnulib module stdio | ||
| 284 | |||
| 285 | BUILT_SOURCES += stdio.h | ||
| 286 | |||
| 287 | # We need the following in order to create <stdio.h> when the system | ||
| 288 | # doesn't have one that works with the given compiler. | ||
| 289 | stdio.h: stdio.in.h $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H) | ||
| 290 | $(AM_V_GEN)rm -f $@-t $@ && \ | ||
| 291 | { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \ | ||
| 292 | sed -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ | ||
| 293 | -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ | ||
| 294 | -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ | ||
| 295 | -e 's|@''NEXT_STDIO_H''@|$(NEXT_STDIO_H)|g' \ | ||
| 296 | -e 's|@''GNULIB_DPRINTF''@|$(GNULIB_DPRINTF)|g' \ | ||
| 297 | -e 's|@''GNULIB_FCLOSE''@|$(GNULIB_FCLOSE)|g' \ | ||
| 298 | -e 's|@''GNULIB_FFLUSH''@|$(GNULIB_FFLUSH)|g' \ | ||
| 299 | -e 's|@''GNULIB_FOPEN''@|$(GNULIB_FOPEN)|g' \ | ||
| 300 | -e 's|@''GNULIB_FPRINTF''@|$(GNULIB_FPRINTF)|g' \ | ||
| 301 | -e 's|@''GNULIB_FPRINTF_POSIX''@|$(GNULIB_FPRINTF_POSIX)|g' \ | ||
| 302 | -e 's|@''GNULIB_FPURGE''@|$(GNULIB_FPURGE)|g' \ | ||
| 303 | -e 's|@''GNULIB_FPUTC''@|$(GNULIB_FPUTC)|g' \ | ||
| 304 | -e 's|@''GNULIB_FPUTS''@|$(GNULIB_FPUTS)|g' \ | ||
| 305 | -e 's|@''GNULIB_FREOPEN''@|$(GNULIB_FREOPEN)|g' \ | ||
| 306 | -e 's|@''GNULIB_FSEEK''@|$(GNULIB_FSEEK)|g' \ | ||
| 307 | -e 's|@''GNULIB_FSEEKO''@|$(GNULIB_FSEEKO)|g' \ | ||
| 308 | -e 's|@''GNULIB_FTELL''@|$(GNULIB_FTELL)|g' \ | ||
| 309 | -e 's|@''GNULIB_FTELLO''@|$(GNULIB_FTELLO)|g' \ | ||
| 310 | -e 's|@''GNULIB_FWRITE''@|$(GNULIB_FWRITE)|g' \ | ||
| 311 | -e 's|@''GNULIB_GETDELIM''@|$(GNULIB_GETDELIM)|g' \ | ||
| 312 | -e 's|@''GNULIB_GETLINE''@|$(GNULIB_GETLINE)|g' \ | ||
| 313 | -e 's|@''GNULIB_OBSTACK_PRINTF''@|$(GNULIB_OBSTACK_PRINTF)|g' \ | ||
| 314 | -e 's|@''GNULIB_OBSTACK_PRINTF_POSIX''@|$(GNULIB_OBSTACK_PRINTF_POSIX)|g' \ | ||
| 315 | -e 's|@''GNULIB_PERROR''@|$(GNULIB_PERROR)|g' \ | ||
| 316 | -e 's|@''GNULIB_POPEN''@|$(GNULIB_POPEN)|g' \ | ||
| 317 | -e 's|@''GNULIB_PRINTF''@|$(GNULIB_PRINTF)|g' \ | ||
| 318 | -e 's|@''GNULIB_PRINTF_POSIX''@|$(GNULIB_PRINTF_POSIX)|g' \ | ||
| 319 | -e 's|@''GNULIB_PUTC''@|$(GNULIB_PUTC)|g' \ | ||
| 320 | -e 's|@''GNULIB_PUTCHAR''@|$(GNULIB_PUTCHAR)|g' \ | ||
| 321 | -e 's|@''GNULIB_PUTS''@|$(GNULIB_PUTS)|g' \ | ||
| 322 | -e 's|@''GNULIB_REMOVE''@|$(GNULIB_REMOVE)|g' \ | ||
| 323 | -e 's|@''GNULIB_RENAME''@|$(GNULIB_RENAME)|g' \ | ||
| 324 | -e 's|@''GNULIB_RENAMEAT''@|$(GNULIB_RENAMEAT)|g' \ | ||
| 325 | -e 's|@''GNULIB_SNPRINTF''@|$(GNULIB_SNPRINTF)|g' \ | ||
| 326 | -e 's|@''GNULIB_SPRINTF_POSIX''@|$(GNULIB_SPRINTF_POSIX)|g' \ | ||
| 327 | -e 's|@''GNULIB_STDIO_H_SIGPIPE''@|$(GNULIB_STDIO_H_SIGPIPE)|g' \ | ||
| 328 | -e 's|@''GNULIB_TMPFILE''@|$(GNULIB_TMPFILE)|g' \ | ||
| 329 | -e 's|@''GNULIB_VASPRINTF''@|$(GNULIB_VASPRINTF)|g' \ | ||
| 330 | -e 's|@''GNULIB_VDPRINTF''@|$(GNULIB_VDPRINTF)|g' \ | ||
| 331 | -e 's|@''GNULIB_VFPRINTF''@|$(GNULIB_VFPRINTF)|g' \ | ||
| 332 | -e 's|@''GNULIB_VFPRINTF_POSIX''@|$(GNULIB_VFPRINTF_POSIX)|g' \ | ||
| 333 | -e 's|@''GNULIB_VPRINTF''@|$(GNULIB_VPRINTF)|g' \ | ||
| 334 | -e 's|@''GNULIB_VPRINTF_POSIX''@|$(GNULIB_VPRINTF_POSIX)|g' \ | ||
| 335 | -e 's|@''GNULIB_VSNPRINTF''@|$(GNULIB_VSNPRINTF)|g' \ | ||
| 336 | -e 's|@''GNULIB_VSPRINTF_POSIX''@|$(GNULIB_VSPRINTF_POSIX)|g' \ | ||
| 337 | < $(srcdir)/stdio.in.h | \ | ||
| 338 | sed -e 's|@''HAVE_DECL_FPURGE''@|$(HAVE_DECL_FPURGE)|g' \ | ||
| 339 | -e 's|@''HAVE_DECL_FSEEKO''@|$(HAVE_DECL_FSEEKO)|g' \ | ||
| 340 | -e 's|@''HAVE_DECL_FTELLO''@|$(HAVE_DECL_FTELLO)|g' \ | ||
| 341 | -e 's|@''HAVE_DECL_GETDELIM''@|$(HAVE_DECL_GETDELIM)|g' \ | ||
| 342 | -e 's|@''HAVE_DECL_GETLINE''@|$(HAVE_DECL_GETLINE)|g' \ | ||
| 343 | -e 's|@''HAVE_DECL_OBSTACK_PRINTF''@|$(HAVE_DECL_OBSTACK_PRINTF)|g' \ | ||
| 344 | -e 's|@''HAVE_DECL_SNPRINTF''@|$(HAVE_DECL_SNPRINTF)|g' \ | ||
| 345 | -e 's|@''HAVE_DECL_VSNPRINTF''@|$(HAVE_DECL_VSNPRINTF)|g' \ | ||
| 346 | -e 's|@''HAVE_DPRINTF''@|$(HAVE_DPRINTF)|g' \ | ||
| 347 | -e 's|@''HAVE_FSEEKO''@|$(HAVE_FSEEKO)|g' \ | ||
| 348 | -e 's|@''HAVE_FTELLO''@|$(HAVE_FTELLO)|g' \ | ||
| 349 | -e 's|@''HAVE_RENAMEAT''@|$(HAVE_RENAMEAT)|g' \ | ||
| 350 | -e 's|@''HAVE_VASPRINTF''@|$(HAVE_VASPRINTF)|g' \ | ||
| 351 | -e 's|@''HAVE_VDPRINTF''@|$(HAVE_VDPRINTF)|g' \ | ||
| 352 | -e 's|@''REPLACE_DPRINTF''@|$(REPLACE_DPRINTF)|g' \ | ||
| 353 | -e 's|@''REPLACE_FCLOSE''@|$(REPLACE_FCLOSE)|g' \ | ||
| 354 | -e 's|@''REPLACE_FFLUSH''@|$(REPLACE_FFLUSH)|g' \ | ||
| 355 | -e 's|@''REPLACE_FOPEN''@|$(REPLACE_FOPEN)|g' \ | ||
| 356 | -e 's|@''REPLACE_FPRINTF''@|$(REPLACE_FPRINTF)|g' \ | ||
| 357 | -e 's|@''REPLACE_FPURGE''@|$(REPLACE_FPURGE)|g' \ | ||
| 358 | -e 's|@''REPLACE_FREOPEN''@|$(REPLACE_FREOPEN)|g' \ | ||
| 359 | -e 's|@''REPLACE_FSEEK''@|$(REPLACE_FSEEK)|g' \ | ||
| 360 | -e 's|@''REPLACE_FSEEKO''@|$(REPLACE_FSEEKO)|g' \ | ||
| 361 | -e 's|@''REPLACE_FTELL''@|$(REPLACE_FTELL)|g' \ | ||
| 362 | -e 's|@''REPLACE_FTELLO''@|$(REPLACE_FTELLO)|g' \ | ||
| 363 | -e 's|@''REPLACE_GETDELIM''@|$(REPLACE_GETDELIM)|g' \ | ||
| 364 | -e 's|@''REPLACE_GETLINE''@|$(REPLACE_GETLINE)|g' \ | ||
| 365 | -e 's|@''REPLACE_OBSTACK_PRINTF''@|$(REPLACE_OBSTACK_PRINTF)|g' \ | ||
| 366 | -e 's|@''REPLACE_PERROR''@|$(REPLACE_PERROR)|g' \ | ||
| 367 | -e 's|@''REPLACE_POPEN''@|$(REPLACE_POPEN)|g' \ | ||
| 368 | -e 's|@''REPLACE_PRINTF''@|$(REPLACE_PRINTF)|g' \ | ||
| 369 | -e 's|@''REPLACE_REMOVE''@|$(REPLACE_REMOVE)|g' \ | ||
| 370 | -e 's|@''REPLACE_RENAME''@|$(REPLACE_RENAME)|g' \ | ||
| 371 | -e 's|@''REPLACE_RENAMEAT''@|$(REPLACE_RENAMEAT)|g' \ | ||
| 372 | -e 's|@''REPLACE_SNPRINTF''@|$(REPLACE_SNPRINTF)|g' \ | ||
| 373 | -e 's|@''REPLACE_SPRINTF''@|$(REPLACE_SPRINTF)|g' \ | ||
| 374 | -e 's|@''REPLACE_STDIO_WRITE_FUNCS''@|$(REPLACE_STDIO_WRITE_FUNCS)|g' \ | ||
| 375 | -e 's|@''REPLACE_TMPFILE''@|$(REPLACE_TMPFILE)|g' \ | ||
| 376 | -e 's|@''REPLACE_VASPRINTF''@|$(REPLACE_VASPRINTF)|g' \ | ||
| 377 | -e 's|@''REPLACE_VDPRINTF''@|$(REPLACE_VDPRINTF)|g' \ | ||
| 378 | -e 's|@''REPLACE_VFPRINTF''@|$(REPLACE_VFPRINTF)|g' \ | ||
| 379 | -e 's|@''REPLACE_VPRINTF''@|$(REPLACE_VPRINTF)|g' \ | ||
| 380 | -e 's|@''REPLACE_VSNPRINTF''@|$(REPLACE_VSNPRINTF)|g' \ | ||
| 381 | -e 's|@''REPLACE_VSPRINTF''@|$(REPLACE_VSPRINTF)|g' \ | ||
| 382 | -e 's|@''ASM_SYMBOL_PREFIX''@|$(ASM_SYMBOL_PREFIX)|g' \ | ||
| 383 | -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \ | ||
| 384 | -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \ | ||
| 385 | -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)'; \ | ||
| 386 | } > $@-t && \ | ||
| 387 | mv $@-t $@ | ||
| 388 | MOSTLYCLEANFILES += stdio.h stdio.h-t | ||
| 389 | |||
| 390 | EXTRA_DIST += stdio.in.h | ||
| 391 | |||
| 392 | ## end gnulib module stdio | ||
| 393 | |||
| 283 | ## begin gnulib module stdlib | 394 | ## begin gnulib module stdlib |
| 284 | 395 | ||
| 285 | BUILT_SOURCES += stdlib.h | 396 | BUILT_SOURCES += stdlib.h |
diff --git a/lib/stdio.in.h b/lib/stdio.in.h new file mode 100644 index 00000000000..dd31ce29ed1 --- /dev/null +++ b/lib/stdio.in.h | |||
| @@ -0,0 +1,1119 @@ | |||
| 1 | /* A GNU-like <stdio.h>. | ||
| 2 | |||
| 3 | Copyright (C) 2004, 2007-2011 Free Software Foundation, Inc. | ||
| 4 | |||
| 5 | This program is free software; you can redistribute it and/or modify | ||
| 6 | it under the terms of the GNU General Public License as published by | ||
| 7 | the Free Software Foundation; either version 3, or (at your option) | ||
| 8 | any later version. | ||
| 9 | |||
| 10 | This program is distributed in the hope that it will be useful, | ||
| 11 | but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 13 | GNU General Public License for more details. | ||
| 14 | |||
| 15 | You should have received a copy of the GNU General Public License | ||
| 16 | along with this program; if not, write to the Free Software Foundation, | ||
| 17 | Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ | ||
| 18 | |||
| 19 | #if __GNUC__ >= 3 | ||
| 20 | @PRAGMA_SYSTEM_HEADER@ | ||
| 21 | #endif | ||
| 22 | @PRAGMA_COLUMNS@ | ||
| 23 | |||
| 24 | #if defined __need_FILE || defined __need___FILE || defined _GL_ALREADY_INCLUDING_STDIO_H | ||
| 25 | /* Special invocation convention: | ||
| 26 | - Inside glibc header files. | ||
| 27 | - On OSF/1 5.1 we have a sequence of nested includes | ||
| 28 | <stdio.h> -> <getopt.h> -> <ctype.h> -> <sys/localedef.h> -> | ||
| 29 | <sys/lc_core.h> -> <nl_types.h> -> <mesg.h> -> <stdio.h>. | ||
| 30 | In this situation, the functions are not yet declared, therefore we cannot | ||
| 31 | provide the C++ aliases. */ | ||
| 32 | |||
| 33 | #@INCLUDE_NEXT@ @NEXT_STDIO_H@ | ||
| 34 | |||
| 35 | #else | ||
| 36 | /* Normal invocation convention. */ | ||
| 37 | |||
| 38 | #ifndef _GL_STDIO_H | ||
| 39 | |||
| 40 | #define _GL_ALREADY_INCLUDING_STDIO_H | ||
| 41 | |||
| 42 | /* The include_next requires a split double-inclusion guard. */ | ||
| 43 | #@INCLUDE_NEXT@ @NEXT_STDIO_H@ | ||
| 44 | |||
| 45 | #undef _GL_ALREADY_INCLUDING_STDIO_H | ||
| 46 | |||
| 47 | #ifndef _GL_STDIO_H | ||
| 48 | #define _GL_STDIO_H | ||
| 49 | |||
| 50 | /* Get va_list. Needed on many systems, including glibc 2.8. */ | ||
| 51 | #include <stdarg.h> | ||
| 52 | |||
| 53 | #include <stddef.h> | ||
| 54 | |||
| 55 | /* Get off_t and ssize_t. Needed on many systems, including glibc 2.8 | ||
| 56 | and eglibc 2.11.2. */ | ||
| 57 | #include <sys/types.h> | ||
| 58 | |||
| 59 | /* The __attribute__ feature is available in gcc versions 2.5 and later. | ||
| 60 | The __-protected variants of the attributes 'format' and 'printf' are | ||
| 61 | accepted by gcc versions 2.6.4 (effectively 2.7) and later. | ||
| 62 | We enable _GL_ATTRIBUTE_FORMAT only if these are supported too, because | ||
| 63 | gnulib and libintl do '#define printf __printf__' when they override | ||
| 64 | the 'printf' function. */ | ||
| 65 | #if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 7) | ||
| 66 | # define _GL_ATTRIBUTE_FORMAT(spec) __attribute__ ((__format__ spec)) | ||
| 67 | #else | ||
| 68 | # define _GL_ATTRIBUTE_FORMAT(spec) /* empty */ | ||
| 69 | #endif | ||
| 70 | #define _GL_ATTRIBUTE_FORMAT_PRINTF(formatstring_parameter, first_argument) \ | ||
| 71 | _GL_ATTRIBUTE_FORMAT ((__printf__, formatstring_parameter, first_argument)) | ||
| 72 | |||
| 73 | /* Solaris 10 declares renameat in <unistd.h>, not in <stdio.h>. */ | ||
| 74 | /* But in any case avoid namespace pollution on glibc systems. */ | ||
| 75 | #if (@GNULIB_RENAMEAT@ || defined GNULIB_POSIXCHECK) && defined __sun \ | ||
| 76 | && ! defined __GLIBC__ | ||
| 77 | # include <unistd.h> | ||
| 78 | #endif | ||
| 79 | |||
| 80 | |||
| 81 | /* The definitions of _GL_FUNCDECL_RPL etc. are copied here. */ | ||
| 82 | |||
| 83 | /* The definition of _GL_ARG_NONNULL is copied here. */ | ||
| 84 | |||
| 85 | /* The definition of _GL_WARN_ON_USE is copied here. */ | ||
| 86 | |||
| 87 | /* Macros for stringification. */ | ||
| 88 | #define _GL_STDIO_STRINGIZE(token) #token | ||
| 89 | #define _GL_STDIO_MACROEXPAND_AND_STRINGIZE(token) _GL_STDIO_STRINGIZE(token) | ||
| 90 | |||
| 91 | |||
| 92 | #if @GNULIB_DPRINTF@ | ||
| 93 | # if @REPLACE_DPRINTF@ | ||
| 94 | # if !(defined __cplusplus && defined GNULIB_NAMESPACE) | ||
| 95 | # define dprintf rpl_dprintf | ||
| 96 | # endif | ||
| 97 | _GL_FUNCDECL_RPL (dprintf, int, (int fd, const char *format, ...) | ||
| 98 | _GL_ATTRIBUTE_FORMAT_PRINTF (2, 3) | ||
| 99 | _GL_ARG_NONNULL ((2))); | ||
| 100 | _GL_CXXALIAS_RPL (dprintf, int, (int fd, const char *format, ...)); | ||
| 101 | # else | ||
| 102 | # if !@HAVE_DPRINTF@ | ||
| 103 | _GL_FUNCDECL_SYS (dprintf, int, (int fd, const char *format, ...) | ||
| 104 | _GL_ATTRIBUTE_FORMAT_PRINTF (2, 3) | ||
| 105 | _GL_ARG_NONNULL ((2))); | ||
| 106 | # endif | ||
| 107 | _GL_CXXALIAS_SYS (dprintf, int, (int fd, const char *format, ...)); | ||
| 108 | # endif | ||
| 109 | _GL_CXXALIASWARN (dprintf); | ||
| 110 | #elif defined GNULIB_POSIXCHECK | ||
| 111 | # undef dprintf | ||
| 112 | # if HAVE_RAW_DECL_DPRINTF | ||
| 113 | _GL_WARN_ON_USE (dprintf, "dprintf is unportable - " | ||
| 114 | "use gnulib module dprintf for portability"); | ||
| 115 | # endif | ||
| 116 | #endif | ||
| 117 | |||
| 118 | #if @GNULIB_FCLOSE@ | ||
| 119 | /* Close STREAM and its underlying file descriptor. */ | ||
| 120 | # if @REPLACE_FCLOSE@ | ||
| 121 | # if !(defined __cplusplus && defined GNULIB_NAMESPACE) | ||
| 122 | # define fclose rpl_fclose | ||
| 123 | # endif | ||
| 124 | _GL_FUNCDECL_RPL (fclose, int, (FILE *stream) _GL_ARG_NONNULL ((1))); | ||
| 125 | _GL_CXXALIAS_RPL (fclose, int, (FILE *stream)); | ||
| 126 | # else | ||
| 127 | _GL_CXXALIAS_SYS (fclose, int, (FILE *stream)); | ||
| 128 | # endif | ||
| 129 | _GL_CXXALIASWARN (fclose); | ||
| 130 | #elif defined GNULIB_POSIXCHECK | ||
| 131 | # undef fclose | ||
| 132 | /* Assume fclose is always declared. */ | ||
| 133 | _GL_WARN_ON_USE (fclose, "fclose is not always POSIX compliant - " | ||
| 134 | "use gnulib module fclose for portable POSIX compliance"); | ||
| 135 | #endif | ||
| 136 | |||
| 137 | #if @GNULIB_FFLUSH@ | ||
| 138 | /* Flush all pending data on STREAM according to POSIX rules. Both | ||
| 139 | output and seekable input streams are supported. | ||
| 140 | Note! LOSS OF DATA can occur if fflush is applied on an input stream | ||
| 141 | that is _not_seekable_ or on an update stream that is _not_seekable_ | ||
| 142 | and in which the most recent operation was input. Seekability can | ||
| 143 | be tested with lseek(fileno(fp),0,SEEK_CUR). */ | ||
| 144 | # if @REPLACE_FFLUSH@ | ||
| 145 | # if !(defined __cplusplus && defined GNULIB_NAMESPACE) | ||
| 146 | # define fflush rpl_fflush | ||
| 147 | # endif | ||
| 148 | _GL_FUNCDECL_RPL (fflush, int, (FILE *gl_stream)); | ||
| 149 | _GL_CXXALIAS_RPL (fflush, int, (FILE *gl_stream)); | ||
| 150 | # else | ||
| 151 | _GL_CXXALIAS_SYS (fflush, int, (FILE *gl_stream)); | ||
| 152 | # endif | ||
| 153 | _GL_CXXALIASWARN (fflush); | ||
| 154 | #elif defined GNULIB_POSIXCHECK | ||
| 155 | # undef fflush | ||
| 156 | /* Assume fflush is always declared. */ | ||
| 157 | _GL_WARN_ON_USE (fflush, "fflush is not always POSIX compliant - " | ||
| 158 | "use gnulib module fflush for portable POSIX compliance"); | ||
| 159 | #endif | ||
| 160 | |||
| 161 | /* It is very rare that the developer ever has full control of stdin, | ||
| 162 | so any use of gets warrants an unconditional warning. Assume it is | ||
| 163 | always declared, since it is required by C89. */ | ||
| 164 | #undef gets | ||
| 165 | _GL_WARN_ON_USE (gets, "gets is a security hole - use fgets instead"); | ||
| 166 | |||
| 167 | #if @GNULIB_FOPEN@ | ||
| 168 | # if @REPLACE_FOPEN@ | ||
| 169 | # if !(defined __cplusplus && defined GNULIB_NAMESPACE) | ||
| 170 | # undef fopen | ||
| 171 | # define fopen rpl_fopen | ||
| 172 | # endif | ||
| 173 | _GL_FUNCDECL_RPL (fopen, FILE *, (const char *filename, const char *mode) | ||
| 174 | _GL_ARG_NONNULL ((1, 2))); | ||
| 175 | _GL_CXXALIAS_RPL (fopen, FILE *, (const char *filename, const char *mode)); | ||
| 176 | # else | ||
| 177 | _GL_CXXALIAS_SYS (fopen, FILE *, (const char *filename, const char *mode)); | ||
| 178 | # endif | ||
| 179 | _GL_CXXALIASWARN (fopen); | ||
| 180 | #elif defined GNULIB_POSIXCHECK | ||
| 181 | # undef fopen | ||
| 182 | /* Assume fopen is always declared. */ | ||
| 183 | _GL_WARN_ON_USE (fopen, "fopen on Win32 platforms is not POSIX compatible - " | ||
| 184 | "use gnulib module fopen for portability"); | ||
| 185 | #endif | ||
| 186 | |||
| 187 | #if @GNULIB_FPRINTF_POSIX@ || @GNULIB_FPRINTF@ | ||
| 188 | # if (@GNULIB_FPRINTF_POSIX@ && @REPLACE_FPRINTF@) \ | ||
| 189 | || (@GNULIB_FPRINTF@ && @REPLACE_STDIO_WRITE_FUNCS@ && @GNULIB_STDIO_H_SIGPIPE@) | ||
| 190 | # if !(defined __cplusplus && defined GNULIB_NAMESPACE) | ||
| 191 | # define fprintf rpl_fprintf | ||
| 192 | # endif | ||
| 193 | # define GNULIB_overrides_fprintf 1 | ||
| 194 | _GL_FUNCDECL_RPL (fprintf, int, (FILE *fp, const char *format, ...) | ||
| 195 | _GL_ATTRIBUTE_FORMAT_PRINTF (2, 3) | ||
| 196 | _GL_ARG_NONNULL ((1, 2))); | ||
| 197 | _GL_CXXALIAS_RPL (fprintf, int, (FILE *fp, const char *format, ...)); | ||
| 198 | # else | ||
| 199 | _GL_CXXALIAS_SYS (fprintf, int, (FILE *fp, const char *format, ...)); | ||
| 200 | # endif | ||
| 201 | _GL_CXXALIASWARN (fprintf); | ||
| 202 | #endif | ||
| 203 | #if !@GNULIB_FPRINTF_POSIX@ && defined GNULIB_POSIXCHECK | ||
| 204 | # if !GNULIB_overrides_fprintf | ||
| 205 | # undef fprintf | ||
| 206 | # endif | ||
| 207 | /* Assume fprintf is always declared. */ | ||
| 208 | _GL_WARN_ON_USE (fprintf, "fprintf is not always POSIX compliant - " | ||
| 209 | "use gnulib module fprintf-posix for portable " | ||
| 210 | "POSIX compliance"); | ||
| 211 | #endif | ||
| 212 | |||
| 213 | #if @GNULIB_FPURGE@ | ||
| 214 | /* Discard all pending buffered I/O data on STREAM. | ||
| 215 | STREAM must not be wide-character oriented. | ||
| 216 | When discarding pending output, the file position is set back to where it | ||
| 217 | was before the write calls. When discarding pending input, the file | ||
| 218 | position is advanced to match the end of the previously read input. | ||
| 219 | Return 0 if successful. Upon error, return -1 and set errno. */ | ||
| 220 | # if @REPLACE_FPURGE@ | ||
| 221 | # if !(defined __cplusplus && defined GNULIB_NAMESPACE) | ||
| 222 | # define fpurge rpl_fpurge | ||
| 223 | # endif | ||
| 224 | _GL_FUNCDECL_RPL (fpurge, int, (FILE *gl_stream) _GL_ARG_NONNULL ((1))); | ||
| 225 | _GL_CXXALIAS_RPL (fpurge, int, (FILE *gl_stream)); | ||
| 226 | # else | ||
| 227 | # if !@HAVE_DECL_FPURGE@ | ||
| 228 | _GL_FUNCDECL_SYS (fpurge, int, (FILE *gl_stream) _GL_ARG_NONNULL ((1))); | ||
| 229 | # endif | ||
| 230 | _GL_CXXALIAS_SYS (fpurge, int, (FILE *gl_stream)); | ||
| 231 | # endif | ||
| 232 | _GL_CXXALIASWARN (fpurge); | ||
| 233 | #elif defined GNULIB_POSIXCHECK | ||
| 234 | # undef fpurge | ||
| 235 | # if HAVE_RAW_DECL_FPURGE | ||
| 236 | _GL_WARN_ON_USE (fpurge, "fpurge is not always present - " | ||
| 237 | "use gnulib module fpurge for portability"); | ||
| 238 | # endif | ||
| 239 | #endif | ||
| 240 | |||
| 241 | #if @GNULIB_FPUTC@ | ||
| 242 | # if @REPLACE_STDIO_WRITE_FUNCS@ && @GNULIB_STDIO_H_SIGPIPE@ | ||
| 243 | # if !(defined __cplusplus && defined GNULIB_NAMESPACE) | ||
| 244 | # undef fputc | ||
| 245 | # define fputc rpl_fputc | ||
| 246 | # endif | ||
| 247 | _GL_FUNCDECL_RPL (fputc, int, (int c, FILE *stream) _GL_ARG_NONNULL ((2))); | ||
| 248 | _GL_CXXALIAS_RPL (fputc, int, (int c, FILE *stream)); | ||
| 249 | # else | ||
| 250 | _GL_CXXALIAS_SYS (fputc, int, (int c, FILE *stream)); | ||
| 251 | # endif | ||
| 252 | _GL_CXXALIASWARN (fputc); | ||
| 253 | #endif | ||
| 254 | |||
| 255 | #if @GNULIB_FPUTS@ | ||
| 256 | # if @REPLACE_STDIO_WRITE_FUNCS@ && @GNULIB_STDIO_H_SIGPIPE@ | ||
| 257 | # if !(defined __cplusplus && defined GNULIB_NAMESPACE) | ||
| 258 | # undef fputs | ||
| 259 | # define fputs rpl_fputs | ||
| 260 | # endif | ||
| 261 | _GL_FUNCDECL_RPL (fputs, int, (const char *string, FILE *stream) | ||
| 262 | _GL_ARG_NONNULL ((1, 2))); | ||
| 263 | _GL_CXXALIAS_RPL (fputs, int, (const char *string, FILE *stream)); | ||
| 264 | # else | ||
| 265 | _GL_CXXALIAS_SYS (fputs, int, (const char *string, FILE *stream)); | ||
| 266 | # endif | ||
| 267 | _GL_CXXALIASWARN (fputs); | ||
| 268 | #endif | ||
| 269 | |||
| 270 | #if @GNULIB_FREOPEN@ | ||
| 271 | # if @REPLACE_FREOPEN@ | ||
| 272 | # if !(defined __cplusplus && defined GNULIB_NAMESPACE) | ||
| 273 | # undef freopen | ||
| 274 | # define freopen rpl_freopen | ||
| 275 | # endif | ||
| 276 | _GL_FUNCDECL_RPL (freopen, FILE *, | ||
| 277 | (const char *filename, const char *mode, FILE *stream) | ||
| 278 | _GL_ARG_NONNULL ((2, 3))); | ||
| 279 | _GL_CXXALIAS_RPL (freopen, FILE *, | ||
| 280 | (const char *filename, const char *mode, FILE *stream)); | ||
| 281 | # else | ||
| 282 | _GL_CXXALIAS_SYS (freopen, FILE *, | ||
| 283 | (const char *filename, const char *mode, FILE *stream)); | ||
| 284 | # endif | ||
| 285 | _GL_CXXALIASWARN (freopen); | ||
| 286 | #elif defined GNULIB_POSIXCHECK | ||
| 287 | # undef freopen | ||
| 288 | /* Assume freopen is always declared. */ | ||
| 289 | _GL_WARN_ON_USE (freopen, | ||
| 290 | "freopen on Win32 platforms is not POSIX compatible - " | ||
| 291 | "use gnulib module freopen for portability"); | ||
| 292 | #endif | ||
| 293 | |||
| 294 | |||
| 295 | /* Set up the following warnings, based on which modules are in use. | ||
| 296 | GNU Coding Standards discourage the use of fseek, since it imposes | ||
| 297 | an arbitrary limitation on some 32-bit hosts. Remember that the | ||
| 298 | fseek module depends on the fseeko module, so we only have three | ||
| 299 | cases to consider: | ||
| 300 | |||
| 301 | 1. The developer is not using either module. Issue a warning under | ||
| 302 | GNULIB_POSIXCHECK for both functions, to remind them that both | ||
| 303 | functions have bugs on some systems. _GL_NO_LARGE_FILES has no | ||
| 304 | impact on this warning. | ||
| 305 | |||
| 306 | 2. The developer is using both modules. They may be unaware of the | ||
| 307 | arbitrary limitations of fseek, so issue a warning under | ||
| 308 | GNULIB_POSIXCHECK. On the other hand, they may be using both | ||
| 309 | modules intentionally, so the developer can define | ||
| 310 | _GL_NO_LARGE_FILES in the compilation units where the use of fseek | ||
| 311 | is safe, to silence the warning. | ||
| 312 | |||
| 313 | 3. The developer is using the fseeko module, but not fseek. Gnulib | ||
| 314 | guarantees that fseek will still work around platform bugs in that | ||
| 315 | case, but we presume that the developer is aware of the pitfalls of | ||
| 316 | fseek and was trying to avoid it, so issue a warning even when | ||
| 317 | GNULIB_POSIXCHECK is undefined. Again, _GL_NO_LARGE_FILES can be | ||
| 318 | defined to silence the warning in particular compilation units. | ||
| 319 | In C++ compilations with GNULIB_NAMESPACE, in order to avoid that | ||
| 320 | fseek gets defined as a macro, it is recommended that the developer | ||
| 321 | uses the fseek module, even if he is not calling the fseek function. | ||
| 322 | |||
| 323 | Most gnulib clients that perform stream operations should fall into | ||
| 324 | category 3. */ | ||
| 325 | |||
| 326 | #if @GNULIB_FSEEK@ | ||
| 327 | # if defined GNULIB_POSIXCHECK && !defined _GL_NO_LARGE_FILES | ||
| 328 | # define _GL_FSEEK_WARN /* Category 2, above. */ | ||
| 329 | # undef fseek | ||
| 330 | # endif | ||
| 331 | # if @REPLACE_FSEEK@ | ||
| 332 | # if !(defined __cplusplus && defined GNULIB_NAMESPACE) | ||
| 333 | # undef fseek | ||
| 334 | # define fseek rpl_fseek | ||
| 335 | # endif | ||
| 336 | _GL_FUNCDECL_RPL (fseek, int, (FILE *fp, long offset, int whence) | ||
| 337 | _GL_ARG_NONNULL ((1))); | ||
| 338 | _GL_CXXALIAS_RPL (fseek, int, (FILE *fp, long offset, int whence)); | ||
| 339 | # else | ||
| 340 | _GL_CXXALIAS_SYS (fseek, int, (FILE *fp, long offset, int whence)); | ||
| 341 | # endif | ||
| 342 | _GL_CXXALIASWARN (fseek); | ||
| 343 | #endif | ||
| 344 | |||
| 345 | #if @GNULIB_FSEEKO@ | ||
| 346 | # if !@GNULIB_FSEEK@ && !defined _GL_NO_LARGE_FILES | ||
| 347 | # define _GL_FSEEK_WARN /* Category 3, above. */ | ||
| 348 | # undef fseek | ||
| 349 | # endif | ||
| 350 | # if @REPLACE_FSEEKO@ | ||
| 351 | /* Provide an fseeko function that is aware of a preceding fflush(), and which | ||
| 352 | detects pipes. */ | ||
| 353 | # if !(defined __cplusplus && defined GNULIB_NAMESPACE) | ||
| 354 | # undef fseeko | ||
| 355 | # define fseeko rpl_fseeko | ||
| 356 | # endif | ||
| 357 | _GL_FUNCDECL_RPL (fseeko, int, (FILE *fp, off_t offset, int whence) | ||
| 358 | _GL_ARG_NONNULL ((1))); | ||
| 359 | _GL_CXXALIAS_RPL (fseeko, int, (FILE *fp, off_t offset, int whence)); | ||
| 360 | # else | ||
| 361 | # if ! @HAVE_DECL_FSEEKO@ | ||
| 362 | _GL_FUNCDECL_SYS (fseeko, int, (FILE *fp, off_t offset, int whence) | ||
| 363 | _GL_ARG_NONNULL ((1))); | ||
| 364 | # endif | ||
| 365 | _GL_CXXALIAS_SYS (fseeko, int, (FILE *fp, off_t offset, int whence)); | ||
| 366 | # endif | ||
| 367 | _GL_CXXALIASWARN (fseeko); | ||
| 368 | # if (@REPLACE_FSEEKO@ || !@HAVE_FSEEKO@) && !@GNULIB_FSEEK@ | ||
| 369 | /* Provide an fseek function that is consistent with fseeko. */ | ||
| 370 | /* In order to avoid that fseek gets defined as a macro here, the | ||
| 371 | developer can request the 'fseek' module. */ | ||
| 372 | # if !GNULIB_defined_fseek_function | ||
| 373 | # undef fseek | ||
| 374 | # define fseek rpl_fseek | ||
| 375 | static inline int _GL_ARG_NONNULL ((1)) | ||
| 376 | rpl_fseek (FILE *fp, long offset, int whence) | ||
| 377 | { | ||
| 378 | # if @REPLACE_FSEEKO@ | ||
| 379 | return rpl_fseeko (fp, offset, whence); | ||
| 380 | # else | ||
| 381 | return fseeko (fp, offset, whence); | ||
| 382 | # endif | ||
| 383 | } | ||
| 384 | # define GNULIB_defined_fseek_function 1 | ||
| 385 | # endif | ||
| 386 | # endif | ||
| 387 | #elif defined GNULIB_POSIXCHECK | ||
| 388 | # define _GL_FSEEK_WARN /* Category 1, above. */ | ||
| 389 | # undef fseek | ||
| 390 | # undef fseeko | ||
| 391 | # if HAVE_RAW_DECL_FSEEKO | ||
| 392 | _GL_WARN_ON_USE (fseeko, "fseeko is unportable - " | ||
| 393 | "use gnulib module fseeko for portability"); | ||
| 394 | # endif | ||
| 395 | #endif | ||
| 396 | |||
| 397 | #ifdef _GL_FSEEK_WARN | ||
| 398 | # undef _GL_FSEEK_WARN | ||
| 399 | /* Here, either fseek is undefined (but C89 guarantees that it is | ||
| 400 | declared), or it is defined as rpl_fseek (declared above). */ | ||
| 401 | _GL_WARN_ON_USE (fseek, "fseek cannot handle files larger than 4 GB " | ||
| 402 | "on 32-bit platforms - " | ||
| 403 | "use fseeko function for handling of large files"); | ||
| 404 | #endif | ||
| 405 | |||
| 406 | |||
| 407 | /* ftell, ftello. See the comments on fseek/fseeko. */ | ||
| 408 | |||
| 409 | #if @GNULIB_FTELL@ | ||
| 410 | # if defined GNULIB_POSIXCHECK && !defined _GL_NO_LARGE_FILES | ||
| 411 | # define _GL_FTELL_WARN /* Category 2, above. */ | ||
| 412 | # undef ftell | ||
| 413 | # endif | ||
| 414 | # if @REPLACE_FTELL@ | ||
| 415 | # if !(defined __cplusplus && defined GNULIB_NAMESPACE) | ||
| 416 | # undef ftell | ||
| 417 | # define ftell rpl_ftell | ||
| 418 | # endif | ||
| 419 | _GL_FUNCDECL_RPL (ftell, long, (FILE *fp) _GL_ARG_NONNULL ((1))); | ||
| 420 | _GL_CXXALIAS_RPL (ftell, long, (FILE *fp)); | ||
| 421 | # else | ||
| 422 | _GL_CXXALIAS_SYS (ftell, long, (FILE *fp)); | ||
| 423 | # endif | ||
| 424 | _GL_CXXALIASWARN (ftell); | ||
| 425 | #endif | ||
| 426 | |||
| 427 | #if @GNULIB_FTELLO@ | ||
| 428 | # if !@GNULIB_FTELL@ && !defined _GL_NO_LARGE_FILES | ||
| 429 | # define _GL_FTELL_WARN /* Category 3, above. */ | ||
| 430 | # undef ftell | ||
| 431 | # endif | ||
| 432 | # if @REPLACE_FTELLO@ | ||
| 433 | # if !(defined __cplusplus && defined GNULIB_NAMESPACE) | ||
| 434 | # undef ftello | ||
| 435 | # define ftello rpl_ftello | ||
| 436 | # endif | ||
| 437 | _GL_FUNCDECL_RPL (ftello, off_t, (FILE *fp) _GL_ARG_NONNULL ((1))); | ||
| 438 | _GL_CXXALIAS_RPL (ftello, off_t, (FILE *fp)); | ||
| 439 | # else | ||
| 440 | # if ! @HAVE_DECL_FTELLO@ | ||
| 441 | _GL_FUNCDECL_SYS (ftello, off_t, (FILE *fp) _GL_ARG_NONNULL ((1))); | ||
| 442 | # endif | ||
| 443 | _GL_CXXALIAS_SYS (ftello, off_t, (FILE *fp)); | ||
| 444 | # endif | ||
| 445 | _GL_CXXALIASWARN (ftello); | ||
| 446 | # if (@REPLACE_FTELLO@ || !@HAVE_FTELLO@) && !@GNULIB_FTELL@ | ||
| 447 | /* Provide an ftell function that is consistent with ftello. */ | ||
| 448 | /* In order to avoid that ftell gets defined as a macro here, the | ||
| 449 | developer can request the 'ftell' module. */ | ||
| 450 | # if !GNULIB_defined_ftell_function | ||
| 451 | # undef ftell | ||
| 452 | # define ftell rpl_ftell | ||
| 453 | static inline long _GL_ARG_NONNULL ((1)) | ||
| 454 | rpl_ftell (FILE *f) | ||
| 455 | { | ||
| 456 | # if @REPLACE_FTELLO@ | ||
| 457 | return rpl_ftello (f); | ||
| 458 | # else | ||
| 459 | return ftello (f); | ||
| 460 | # endif | ||
| 461 | } | ||
| 462 | # define GNULIB_defined_ftell_function 1 | ||
| 463 | # endif | ||
| 464 | # endif | ||
| 465 | #elif defined GNULIB_POSIXCHECK | ||
| 466 | # define _GL_FTELL_WARN /* Category 1, above. */ | ||
| 467 | # undef ftell | ||
| 468 | # undef ftello | ||
| 469 | # if HAVE_RAW_DECL_FTELLO | ||
| 470 | _GL_WARN_ON_USE (ftello, "ftello is unportable - " | ||
| 471 | "use gnulib module ftello for portability"); | ||
| 472 | # endif | ||
| 473 | #endif | ||
| 474 | |||
| 475 | #ifdef _GL_FTELL_WARN | ||
| 476 | # undef _GL_FTELL_WARN | ||
| 477 | /* Here, either ftell is undefined (but C89 guarantees that it is | ||
| 478 | declared), or it is defined as rpl_ftell (declared above). */ | ||
| 479 | _GL_WARN_ON_USE (ftell, "ftell cannot handle files larger than 4 GB " | ||
| 480 | "on 32-bit platforms - " | ||
| 481 | "use ftello function for handling of large files"); | ||
| 482 | #endif | ||
| 483 | |||
| 484 | |||
| 485 | #if @GNULIB_FWRITE@ | ||
| 486 | # if @REPLACE_STDIO_WRITE_FUNCS@ && @GNULIB_STDIO_H_SIGPIPE@ | ||
| 487 | # if !(defined __cplusplus && defined GNULIB_NAMESPACE) | ||
| 488 | # undef fwrite | ||
| 489 | # define fwrite rpl_fwrite | ||
| 490 | # endif | ||
| 491 | _GL_FUNCDECL_RPL (fwrite, size_t, | ||
| 492 | (const void *ptr, size_t s, size_t n, FILE *stream) | ||
| 493 | _GL_ARG_NONNULL ((1, 4))); | ||
| 494 | _GL_CXXALIAS_RPL (fwrite, size_t, | ||
| 495 | (const void *ptr, size_t s, size_t n, FILE *stream)); | ||
| 496 | # else | ||
| 497 | _GL_CXXALIAS_SYS (fwrite, size_t, | ||
| 498 | (const void *ptr, size_t s, size_t n, FILE *stream)); | ||
| 499 | |||
| 500 | /* Work around glibc bug 11959 | ||
| 501 | <http://sources.redhat.com/bugzilla/show_bug.cgi?id=11959>, | ||
| 502 | which sometimes causes an unwanted diagnostic for fwrite calls. | ||
| 503 | This affects only function declaration attributes, so it's not | ||
| 504 | needed for C++. */ | ||
| 505 | # if !defined __cplusplus && 0 < __USE_FORTIFY_LEVEL | ||
| 506 | static inline size_t _GL_ARG_NONNULL ((1, 4)) | ||
| 507 | rpl_fwrite (const void *ptr, size_t s, size_t n, FILE *stream) | ||
| 508 | { | ||
| 509 | size_t r = fwrite (ptr, s, n, stream); | ||
| 510 | (void) r; | ||
| 511 | return r; | ||
| 512 | } | ||
| 513 | # undef fwrite | ||
| 514 | # define fwrite rpl_fwrite | ||
| 515 | # endif | ||
| 516 | # endif | ||
| 517 | _GL_CXXALIASWARN (fwrite); | ||
| 518 | #endif | ||
| 519 | |||
| 520 | #if @GNULIB_GETDELIM@ | ||
| 521 | /* Read input, up to (and including) the next occurrence of DELIMITER, from | ||
| 522 | STREAM, store it in *LINEPTR (and NUL-terminate it). | ||
| 523 | *LINEPTR is a pointer returned from malloc (or NULL), pointing to *LINESIZE | ||
| 524 | bytes of space. It is realloc'd as necessary. | ||
| 525 | Return the number of bytes read and stored at *LINEPTR (not including the | ||
| 526 | NUL terminator), or -1 on error or EOF. */ | ||
| 527 | # if @REPLACE_GETDELIM@ | ||
| 528 | # if !(defined __cplusplus && defined GNULIB_NAMESPACE) | ||
| 529 | # undef getdelim | ||
| 530 | # define getdelim rpl_getdelim | ||
| 531 | # endif | ||
| 532 | _GL_FUNCDECL_RPL (getdelim, ssize_t, | ||
| 533 | (char **lineptr, size_t *linesize, int delimiter, | ||
| 534 | FILE *stream) | ||
| 535 | _GL_ARG_NONNULL ((1, 2, 4))); | ||
| 536 | _GL_CXXALIAS_RPL (getdelim, ssize_t, | ||
| 537 | (char **lineptr, size_t *linesize, int delimiter, | ||
| 538 | FILE *stream)); | ||
| 539 | # else | ||
| 540 | # if !@HAVE_DECL_GETDELIM@ | ||
| 541 | _GL_FUNCDECL_SYS (getdelim, ssize_t, | ||
| 542 | (char **lineptr, size_t *linesize, int delimiter, | ||
| 543 | FILE *stream) | ||
| 544 | _GL_ARG_NONNULL ((1, 2, 4))); | ||
| 545 | # endif | ||
| 546 | _GL_CXXALIAS_SYS (getdelim, ssize_t, | ||
| 547 | (char **lineptr, size_t *linesize, int delimiter, | ||
| 548 | FILE *stream)); | ||
| 549 | # endif | ||
| 550 | _GL_CXXALIASWARN (getdelim); | ||
| 551 | #elif defined GNULIB_POSIXCHECK | ||
| 552 | # undef getdelim | ||
| 553 | # if HAVE_RAW_DECL_GETDELIM | ||
| 554 | _GL_WARN_ON_USE (getdelim, "getdelim is unportable - " | ||
| 555 | "use gnulib module getdelim for portability"); | ||
| 556 | # endif | ||
| 557 | #endif | ||
| 558 | |||
| 559 | #if @GNULIB_GETLINE@ | ||
| 560 | /* Read a line, up to (and including) the next newline, from STREAM, store it | ||
| 561 | in *LINEPTR (and NUL-terminate it). | ||
| 562 | *LINEPTR is a pointer returned from malloc (or NULL), pointing to *LINESIZE | ||
| 563 | bytes of space. It is realloc'd as necessary. | ||
| 564 | Return the number of bytes read and stored at *LINEPTR (not including the | ||
| 565 | NUL terminator), or -1 on error or EOF. */ | ||
| 566 | # if @REPLACE_GETLINE@ | ||
| 567 | # if !(defined __cplusplus && defined GNULIB_NAMESPACE) | ||
| 568 | # undef getline | ||
| 569 | # define getline rpl_getline | ||
| 570 | # endif | ||
| 571 | _GL_FUNCDECL_RPL (getline, ssize_t, | ||
| 572 | (char **lineptr, size_t *linesize, FILE *stream) | ||
| 573 | _GL_ARG_NONNULL ((1, 2, 3))); | ||
| 574 | _GL_CXXALIAS_RPL (getline, ssize_t, | ||
| 575 | (char **lineptr, size_t *linesize, FILE *stream)); | ||
| 576 | # else | ||
| 577 | # if !@HAVE_DECL_GETLINE@ | ||
| 578 | _GL_FUNCDECL_SYS (getline, ssize_t, | ||
| 579 | (char **lineptr, size_t *linesize, FILE *stream) | ||
| 580 | _GL_ARG_NONNULL ((1, 2, 3))); | ||
| 581 | # endif | ||
| 582 | _GL_CXXALIAS_SYS (getline, ssize_t, | ||
| 583 | (char **lineptr, size_t *linesize, FILE *stream)); | ||
| 584 | # endif | ||
| 585 | # if @HAVE_DECL_GETLINE@ | ||
| 586 | _GL_CXXALIASWARN (getline); | ||
| 587 | # endif | ||
| 588 | #elif defined GNULIB_POSIXCHECK | ||
| 589 | # undef getline | ||
| 590 | # if HAVE_RAW_DECL_GETLINE | ||
| 591 | _GL_WARN_ON_USE (getline, "getline is unportable - " | ||
| 592 | "use gnulib module getline for portability"); | ||
| 593 | # endif | ||
| 594 | #endif | ||
| 595 | |||
| 596 | #if @GNULIB_OBSTACK_PRINTF@ || @GNULIB_OBSTACK_PRINTF_POSIX@ | ||
| 597 | struct obstack; | ||
| 598 | /* Grow an obstack with formatted output. Return the number of | ||
| 599 | bytes added to OBS. No trailing nul byte is added, and the | ||
| 600 | object should be closed with obstack_finish before use. Upon | ||
| 601 | memory allocation error, call obstack_alloc_failed_handler. Upon | ||
| 602 | other error, return -1. */ | ||
| 603 | # if @REPLACE_OBSTACK_PRINTF@ | ||
| 604 | # if !(defined __cplusplus && defined GNULIB_NAMESPACE) | ||
| 605 | # define obstack_printf rpl_obstack_printf | ||
| 606 | # endif | ||
| 607 | _GL_FUNCDECL_RPL (obstack_printf, int, | ||
| 608 | (struct obstack *obs, const char *format, ...) | ||
| 609 | _GL_ATTRIBUTE_FORMAT_PRINTF (2, 3) | ||
| 610 | _GL_ARG_NONNULL ((1, 2))); | ||
| 611 | _GL_CXXALIAS_RPL (obstack_printf, int, | ||
| 612 | (struct obstack *obs, const char *format, ...)); | ||
| 613 | # else | ||
| 614 | # if !@HAVE_DECL_OBSTACK_PRINTF@ | ||
| 615 | _GL_FUNCDECL_SYS (obstack_printf, int, | ||
| 616 | (struct obstack *obs, const char *format, ...) | ||
| 617 | _GL_ATTRIBUTE_FORMAT_PRINTF (2, 3) | ||
| 618 | _GL_ARG_NONNULL ((1, 2))); | ||
| 619 | # endif | ||
| 620 | _GL_CXXALIAS_SYS (obstack_printf, int, | ||
| 621 | (struct obstack *obs, const char *format, ...)); | ||
| 622 | # endif | ||
| 623 | _GL_CXXALIASWARN (obstack_printf); | ||
| 624 | # if @REPLACE_OBSTACK_PRINTF@ | ||
| 625 | # if !(defined __cplusplus && defined GNULIB_NAMESPACE) | ||
| 626 | # define obstack_vprintf rpl_obstack_vprintf | ||
| 627 | # endif | ||
| 628 | _GL_FUNCDECL_RPL (obstack_vprintf, int, | ||
| 629 | (struct obstack *obs, const char *format, va_list args) | ||
| 630 | _GL_ATTRIBUTE_FORMAT_PRINTF (2, 0) | ||
| 631 | _GL_ARG_NONNULL ((1, 2))); | ||
| 632 | _GL_CXXALIAS_RPL (obstack_vprintf, int, | ||
| 633 | (struct obstack *obs, const char *format, va_list args)); | ||
| 634 | # else | ||
| 635 | # if !@HAVE_DECL_OBSTACK_PRINTF@ | ||
| 636 | _GL_FUNCDECL_SYS (obstack_vprintf, int, | ||
| 637 | (struct obstack *obs, const char *format, va_list args) | ||
| 638 | _GL_ATTRIBUTE_FORMAT_PRINTF (2, 0) | ||
| 639 | _GL_ARG_NONNULL ((1, 2))); | ||
| 640 | # endif | ||
| 641 | _GL_CXXALIAS_SYS (obstack_vprintf, int, | ||
| 642 | (struct obstack *obs, const char *format, va_list args)); | ||
| 643 | # endif | ||
| 644 | _GL_CXXALIASWARN (obstack_vprintf); | ||
| 645 | #endif | ||
| 646 | |||
| 647 | #if @GNULIB_PERROR@ | ||
| 648 | /* Print a message to standard error, describing the value of ERRNO, | ||
| 649 | (if STRING is not NULL and not empty) prefixed with STRING and ": ", | ||
| 650 | and terminated with a newline. */ | ||
| 651 | # if @REPLACE_PERROR@ | ||
| 652 | # if !(defined __cplusplus && defined GNULIB_NAMESPACE) | ||
| 653 | # define perror rpl_perror | ||
| 654 | # endif | ||
| 655 | _GL_FUNCDECL_RPL (perror, void, (const char *string)); | ||
| 656 | _GL_CXXALIAS_RPL (perror, void, (const char *string)); | ||
| 657 | # else | ||
| 658 | _GL_CXXALIAS_SYS (perror, void, (const char *string)); | ||
| 659 | # endif | ||
| 660 | _GL_CXXALIASWARN (perror); | ||
| 661 | #elif defined GNULIB_POSIXCHECK | ||
| 662 | # undef perror | ||
| 663 | /* Assume perror is always declared. */ | ||
| 664 | _GL_WARN_ON_USE (perror, "perror is not always POSIX compliant - " | ||
| 665 | "use gnulib module perror for portability"); | ||
| 666 | #endif | ||
| 667 | |||
| 668 | #if @GNULIB_POPEN@ | ||
| 669 | # if @REPLACE_POPEN@ | ||
| 670 | # if !(defined __cplusplus && defined GNULIB_NAMESPACE) | ||
| 671 | # undef popen | ||
| 672 | # define popen rpl_popen | ||
| 673 | # endif | ||
| 674 | _GL_FUNCDECL_RPL (popen, FILE *, (const char *cmd, const char *mode) | ||
| 675 | _GL_ARG_NONNULL ((1, 2))); | ||
| 676 | _GL_CXXALIAS_RPL (popen, FILE *, (const char *cmd, const char *mode)); | ||
| 677 | # else | ||
| 678 | _GL_CXXALIAS_SYS (popen, FILE *, (const char *cmd, const char *mode)); | ||
| 679 | # endif | ||
| 680 | _GL_CXXALIASWARN (popen); | ||
| 681 | #elif defined GNULIB_POSIXCHECK | ||
| 682 | # undef popen | ||
| 683 | # if HAVE_RAW_DECL_POPEN | ||
| 684 | _GL_WARN_ON_USE (popen, "popen is buggy on some platforms - " | ||
| 685 | "use gnulib module popen or pipe for more portability"); | ||
| 686 | # endif | ||
| 687 | #endif | ||
| 688 | |||
| 689 | #if @GNULIB_PRINTF_POSIX@ || @GNULIB_PRINTF@ | ||
| 690 | # if (@GNULIB_PRINTF_POSIX@ && @REPLACE_PRINTF@) \ | ||
| 691 | || (@GNULIB_PRINTF@ && @REPLACE_STDIO_WRITE_FUNCS@ && @GNULIB_STDIO_H_SIGPIPE@) | ||
| 692 | # if defined __GNUC__ | ||
| 693 | # if !(defined __cplusplus && defined GNULIB_NAMESPACE) | ||
| 694 | /* Don't break __attribute__((format(printf,M,N))). */ | ||
| 695 | # define printf __printf__ | ||
| 696 | # endif | ||
| 697 | _GL_FUNCDECL_RPL_1 (__printf__, int, | ||
| 698 | (const char *format, ...) | ||
| 699 | __asm__ (@ASM_SYMBOL_PREFIX@ | ||
| 700 | _GL_STDIO_MACROEXPAND_AND_STRINGIZE(rpl_printf)) | ||
| 701 | _GL_ATTRIBUTE_FORMAT_PRINTF (1, 2) | ||
| 702 | _GL_ARG_NONNULL ((1))); | ||
| 703 | _GL_CXXALIAS_RPL_1 (printf, __printf__, int, (const char *format, ...)); | ||
| 704 | # else | ||
| 705 | # if !(defined __cplusplus && defined GNULIB_NAMESPACE) | ||
| 706 | # define printf rpl_printf | ||
| 707 | # endif | ||
| 708 | _GL_FUNCDECL_RPL (printf, int, | ||
| 709 | (const char *format, ...) | ||
| 710 | _GL_ATTRIBUTE_FORMAT_PRINTF (1, 2) | ||
| 711 | _GL_ARG_NONNULL ((1))); | ||
| 712 | _GL_CXXALIAS_RPL (printf, int, (const char *format, ...)); | ||
| 713 | # endif | ||
| 714 | # define GNULIB_overrides_printf 1 | ||
| 715 | # else | ||
| 716 | _GL_CXXALIAS_SYS (printf, int, (const char *format, ...)); | ||
| 717 | # endif | ||
| 718 | _GL_CXXALIASWARN (printf); | ||
| 719 | #endif | ||
| 720 | #if !@GNULIB_PRINTF_POSIX@ && defined GNULIB_POSIXCHECK | ||
| 721 | # if !GNULIB_overrides_printf | ||
| 722 | # undef printf | ||
| 723 | # endif | ||
| 724 | /* Assume printf is always declared. */ | ||
| 725 | _GL_WARN_ON_USE (printf, "printf is not always POSIX compliant - " | ||
| 726 | "use gnulib module printf-posix for portable " | ||
| 727 | "POSIX compliance"); | ||
| 728 | #endif | ||
| 729 | |||
| 730 | #if @GNULIB_PUTC@ | ||
| 731 | # if @REPLACE_STDIO_WRITE_FUNCS@ && @GNULIB_STDIO_H_SIGPIPE@ | ||
| 732 | # if !(defined __cplusplus && defined GNULIB_NAMESPACE) | ||
| 733 | # undef putc | ||
| 734 | # define putc rpl_fputc | ||
| 735 | # endif | ||
| 736 | _GL_FUNCDECL_RPL (fputc, int, (int c, FILE *stream) _GL_ARG_NONNULL ((2))); | ||
| 737 | _GL_CXXALIAS_RPL_1 (putc, rpl_fputc, int, (int c, FILE *stream)); | ||
| 738 | # else | ||
| 739 | _GL_CXXALIAS_SYS (putc, int, (int c, FILE *stream)); | ||
| 740 | # endif | ||
| 741 | _GL_CXXALIASWARN (putc); | ||
| 742 | #endif | ||
| 743 | |||
| 744 | #if @GNULIB_PUTCHAR@ | ||
| 745 | # if @REPLACE_STDIO_WRITE_FUNCS@ && @GNULIB_STDIO_H_SIGPIPE@ | ||
| 746 | # if !(defined __cplusplus && defined GNULIB_NAMESPACE) | ||
| 747 | # undef putchar | ||
| 748 | # define putchar rpl_putchar | ||
| 749 | # endif | ||
| 750 | _GL_FUNCDECL_RPL (putchar, int, (int c)); | ||
| 751 | _GL_CXXALIAS_RPL (putchar, int, (int c)); | ||
| 752 | # else | ||
| 753 | _GL_CXXALIAS_SYS (putchar, int, (int c)); | ||
| 754 | # endif | ||
| 755 | _GL_CXXALIASWARN (putchar); | ||
| 756 | #endif | ||
| 757 | |||
| 758 | #if @GNULIB_PUTS@ | ||
| 759 | # if @REPLACE_STDIO_WRITE_FUNCS@ && @GNULIB_STDIO_H_SIGPIPE@ | ||
| 760 | # if !(defined __cplusplus && defined GNULIB_NAMESPACE) | ||
| 761 | # undef puts | ||
| 762 | # define puts rpl_puts | ||
| 763 | # endif | ||
| 764 | _GL_FUNCDECL_RPL (puts, int, (const char *string) _GL_ARG_NONNULL ((1))); | ||
| 765 | _GL_CXXALIAS_RPL (puts, int, (const char *string)); | ||
| 766 | # else | ||
| 767 | _GL_CXXALIAS_SYS (puts, int, (const char *string)); | ||
| 768 | # endif | ||
| 769 | _GL_CXXALIASWARN (puts); | ||
| 770 | #endif | ||
| 771 | |||
| 772 | #if @GNULIB_REMOVE@ | ||
| 773 | # if @REPLACE_REMOVE@ | ||
| 774 | # if !(defined __cplusplus && defined GNULIB_NAMESPACE) | ||
| 775 | # undef remove | ||
| 776 | # define remove rpl_remove | ||
| 777 | # endif | ||
| 778 | _GL_FUNCDECL_RPL (remove, int, (const char *name) _GL_ARG_NONNULL ((1))); | ||
| 779 | _GL_CXXALIAS_RPL (remove, int, (const char *name)); | ||
| 780 | # else | ||
| 781 | _GL_CXXALIAS_SYS (remove, int, (const char *name)); | ||
| 782 | # endif | ||
| 783 | _GL_CXXALIASWARN (remove); | ||
| 784 | #elif defined GNULIB_POSIXCHECK | ||
| 785 | # undef remove | ||
| 786 | /* Assume remove is always declared. */ | ||
| 787 | _GL_WARN_ON_USE (remove, "remove cannot handle directories on some platforms - " | ||
| 788 | "use gnulib module remove for more portability"); | ||
| 789 | #endif | ||
| 790 | |||
| 791 | #if @GNULIB_RENAME@ | ||
| 792 | # if @REPLACE_RENAME@ | ||
| 793 | # if !(defined __cplusplus && defined GNULIB_NAMESPACE) | ||
| 794 | # undef rename | ||
| 795 | # define rename rpl_rename | ||
| 796 | # endif | ||
| 797 | _GL_FUNCDECL_RPL (rename, int, | ||
| 798 | (const char *old_filename, const char *new_filename) | ||
| 799 | _GL_ARG_NONNULL ((1, 2))); | ||
| 800 | _GL_CXXALIAS_RPL (rename, int, | ||
| 801 | (const char *old_filename, const char *new_filename)); | ||
| 802 | # else | ||
| 803 | _GL_CXXALIAS_SYS (rename, int, | ||
| 804 | (const char *old_filename, const char *new_filename)); | ||
| 805 | # endif | ||
| 806 | _GL_CXXALIASWARN (rename); | ||
| 807 | #elif defined GNULIB_POSIXCHECK | ||
| 808 | # undef rename | ||
| 809 | /* Assume rename is always declared. */ | ||
| 810 | _GL_WARN_ON_USE (rename, "rename is buggy on some platforms - " | ||
| 811 | "use gnulib module rename for more portability"); | ||
| 812 | #endif | ||
| 813 | |||
| 814 | #if @GNULIB_RENAMEAT@ | ||
| 815 | # if @REPLACE_RENAMEAT@ | ||
| 816 | # if !(defined __cplusplus && defined GNULIB_NAMESPACE) | ||
| 817 | # undef renameat | ||
| 818 | # define renameat rpl_renameat | ||
| 819 | # endif | ||
| 820 | _GL_FUNCDECL_RPL (renameat, int, | ||
| 821 | (int fd1, char const *file1, int fd2, char const *file2) | ||
| 822 | _GL_ARG_NONNULL ((2, 4))); | ||
| 823 | _GL_CXXALIAS_RPL (renameat, int, | ||
| 824 | (int fd1, char const *file1, int fd2, char const *file2)); | ||
| 825 | # else | ||
| 826 | # if !@HAVE_RENAMEAT@ | ||
| 827 | _GL_FUNCDECL_SYS (renameat, int, | ||
| 828 | (int fd1, char const *file1, int fd2, char const *file2) | ||
| 829 | _GL_ARG_NONNULL ((2, 4))); | ||
| 830 | # endif | ||
| 831 | _GL_CXXALIAS_SYS (renameat, int, | ||
| 832 | (int fd1, char const *file1, int fd2, char const *file2)); | ||
| 833 | # endif | ||
| 834 | _GL_CXXALIASWARN (renameat); | ||
| 835 | #elif defined GNULIB_POSIXCHECK | ||
| 836 | # undef renameat | ||
| 837 | # if HAVE_RAW_DECL_RENAMEAT | ||
| 838 | _GL_WARN_ON_USE (renameat, "renameat is not portable - " | ||
| 839 | "use gnulib module renameat for portability"); | ||
| 840 | # endif | ||
| 841 | #endif | ||
| 842 | |||
| 843 | #if @GNULIB_SNPRINTF@ | ||
| 844 | # if @REPLACE_SNPRINTF@ | ||
| 845 | # if !(defined __cplusplus && defined GNULIB_NAMESPACE) | ||
| 846 | # define snprintf rpl_snprintf | ||
| 847 | # endif | ||
| 848 | _GL_FUNCDECL_RPL (snprintf, int, | ||
| 849 | (char *str, size_t size, const char *format, ...) | ||
| 850 | _GL_ATTRIBUTE_FORMAT_PRINTF (3, 4) | ||
| 851 | _GL_ARG_NONNULL ((3))); | ||
| 852 | _GL_CXXALIAS_RPL (snprintf, int, | ||
| 853 | (char *str, size_t size, const char *format, ...)); | ||
| 854 | # else | ||
| 855 | # if !@HAVE_DECL_SNPRINTF@ | ||
| 856 | _GL_FUNCDECL_SYS (snprintf, int, | ||
| 857 | (char *str, size_t size, const char *format, ...) | ||
| 858 | _GL_ATTRIBUTE_FORMAT_PRINTF (3, 4) | ||
| 859 | _GL_ARG_NONNULL ((3))); | ||
| 860 | # endif | ||
| 861 | _GL_CXXALIAS_SYS (snprintf, int, | ||
| 862 | (char *str, size_t size, const char *format, ...)); | ||
| 863 | # endif | ||
| 864 | _GL_CXXALIASWARN (snprintf); | ||
| 865 | #elif defined GNULIB_POSIXCHECK | ||
| 866 | # undef snprintf | ||
| 867 | # if HAVE_RAW_DECL_SNPRINTF | ||
| 868 | _GL_WARN_ON_USE (snprintf, "snprintf is unportable - " | ||
| 869 | "use gnulib module snprintf for portability"); | ||
| 870 | # endif | ||
| 871 | #endif | ||
| 872 | |||
| 873 | /* Some people would argue that sprintf should be handled like gets | ||
| 874 | (for example, OpenBSD issues a link warning for both functions), | ||
| 875 | since both can cause security holes due to buffer overruns. | ||
| 876 | However, we believe that sprintf can be used safely, and is more | ||
| 877 | efficient than snprintf in those safe cases; and as proof of our | ||
| 878 | belief, we use sprintf in several gnulib modules. So this header | ||
| 879 | intentionally avoids adding a warning to sprintf except when | ||
| 880 | GNULIB_POSIXCHECK is defined. */ | ||
| 881 | |||
| 882 | #if @GNULIB_SPRINTF_POSIX@ | ||
| 883 | # if @REPLACE_SPRINTF@ | ||
| 884 | # if !(defined __cplusplus && defined GNULIB_NAMESPACE) | ||
| 885 | # define sprintf rpl_sprintf | ||
| 886 | # endif | ||
| 887 | _GL_FUNCDECL_RPL (sprintf, int, (char *str, const char *format, ...) | ||
| 888 | _GL_ATTRIBUTE_FORMAT_PRINTF (2, 3) | ||
| 889 | _GL_ARG_NONNULL ((1, 2))); | ||
| 890 | _GL_CXXALIAS_RPL (sprintf, int, (char *str, const char *format, ...)); | ||
| 891 | # else | ||
| 892 | _GL_CXXALIAS_SYS (sprintf, int, (char *str, const char *format, ...)); | ||
| 893 | # endif | ||
| 894 | _GL_CXXALIASWARN (sprintf); | ||
| 895 | #elif defined GNULIB_POSIXCHECK | ||
| 896 | # undef sprintf | ||
| 897 | /* Assume sprintf is always declared. */ | ||
| 898 | _GL_WARN_ON_USE (sprintf, "sprintf is not always POSIX compliant - " | ||
| 899 | "use gnulib module sprintf-posix for portable " | ||
| 900 | "POSIX compliance"); | ||
| 901 | #endif | ||
| 902 | |||
| 903 | #if @GNULIB_TMPFILE@ | ||
| 904 | # if @REPLACE_TMPFILE@ | ||
| 905 | # if !(defined __cplusplus && defined GNULIB_NAMESPACE) | ||
| 906 | # define tmpfile rpl_tmpfile | ||
| 907 | # endif | ||
| 908 | _GL_FUNCDECL_RPL (tmpfile, FILE *, (void)); | ||
| 909 | _GL_CXXALIAS_RPL (tmpfile, FILE *, (void)); | ||
| 910 | # else | ||
| 911 | _GL_CXXALIAS_SYS (tmpfile, FILE *, (void)); | ||
| 912 | # endif | ||
| 913 | _GL_CXXALIASWARN (tmpfile); | ||
| 914 | #elif defined GNULIB_POSIXCHECK | ||
| 915 | # undef tmpfile | ||
| 916 | # if HAVE_RAW_DECL_TMPFILE | ||
| 917 | _GL_WARN_ON_USE (tmpfile, "tmpfile is not usable on mingw - " | ||
| 918 | "use gnulib module tmpfile for portability"); | ||
| 919 | # endif | ||
| 920 | #endif | ||
| 921 | |||
| 922 | #if @GNULIB_VASPRINTF@ | ||
| 923 | /* Write formatted output to a string dynamically allocated with malloc(). | ||
| 924 | If the memory allocation succeeds, store the address of the string in | ||
| 925 | *RESULT and return the number of resulting bytes, excluding the trailing | ||
| 926 | NUL. Upon memory allocation error, or some other error, return -1. */ | ||
| 927 | # if @REPLACE_VASPRINTF@ | ||
| 928 | # if !(defined __cplusplus && defined GNULIB_NAMESPACE) | ||
| 929 | # define asprintf rpl_asprintf | ||
| 930 | # endif | ||
| 931 | _GL_FUNCDECL_RPL (asprintf, int, | ||
| 932 | (char **result, const char *format, ...) | ||
| 933 | _GL_ATTRIBUTE_FORMAT_PRINTF (2, 3) | ||
| 934 | _GL_ARG_NONNULL ((1, 2))); | ||
| 935 | _GL_CXXALIAS_RPL (asprintf, int, | ||
| 936 | (char **result, const char *format, ...)); | ||
| 937 | # else | ||
| 938 | # if !@HAVE_VASPRINTF@ | ||
| 939 | _GL_FUNCDECL_SYS (asprintf, int, | ||
| 940 | (char **result, const char *format, ...) | ||
| 941 | _GL_ATTRIBUTE_FORMAT_PRINTF (2, 3) | ||
| 942 | _GL_ARG_NONNULL ((1, 2))); | ||
| 943 | # endif | ||
| 944 | _GL_CXXALIAS_SYS (asprintf, int, | ||
| 945 | (char **result, const char *format, ...)); | ||
| 946 | # endif | ||
| 947 | _GL_CXXALIASWARN (asprintf); | ||
| 948 | # if @REPLACE_VASPRINTF@ | ||
| 949 | # if !(defined __cplusplus && defined GNULIB_NAMESPACE) | ||
| 950 | # define vasprintf rpl_vasprintf | ||
| 951 | # endif | ||
| 952 | _GL_FUNCDECL_RPL (vasprintf, int, | ||
| 953 | (char **result, const char *format, va_list args) | ||
| 954 | _GL_ATTRIBUTE_FORMAT_PRINTF (2, 0) | ||
| 955 | _GL_ARG_NONNULL ((1, 2))); | ||
| 956 | _GL_CXXALIAS_RPL (vasprintf, int, | ||
| 957 | (char **result, const char *format, va_list args)); | ||
| 958 | # else | ||
| 959 | # if !@HAVE_VASPRINTF@ | ||
| 960 | _GL_FUNCDECL_SYS (vasprintf, int, | ||
| 961 | (char **result, const char *format, va_list args) | ||
| 962 | _GL_ATTRIBUTE_FORMAT_PRINTF (2, 0) | ||
| 963 | _GL_ARG_NONNULL ((1, 2))); | ||
| 964 | # endif | ||
| 965 | _GL_CXXALIAS_SYS (vasprintf, int, | ||
| 966 | (char **result, const char *format, va_list args)); | ||
| 967 | # endif | ||
| 968 | _GL_CXXALIASWARN (vasprintf); | ||
| 969 | #endif | ||
| 970 | |||
| 971 | #if @GNULIB_VDPRINTF@ | ||
| 972 | # if @REPLACE_VDPRINTF@ | ||
| 973 | # if !(defined __cplusplus && defined GNULIB_NAMESPACE) | ||
| 974 | # define vdprintf rpl_vdprintf | ||
| 975 | # endif | ||
| 976 | _GL_FUNCDECL_RPL (vdprintf, int, (int fd, const char *format, va_list args) | ||
| 977 | _GL_ATTRIBUTE_FORMAT_PRINTF (2, 0) | ||
| 978 | _GL_ARG_NONNULL ((2))); | ||
| 979 | _GL_CXXALIAS_RPL (vdprintf, int, (int fd, const char *format, va_list args)); | ||
| 980 | # else | ||
| 981 | # if !@HAVE_VDPRINTF@ | ||
| 982 | _GL_FUNCDECL_SYS (vdprintf, int, (int fd, const char *format, va_list args) | ||
| 983 | _GL_ATTRIBUTE_FORMAT_PRINTF (2, 0) | ||
| 984 | _GL_ARG_NONNULL ((2))); | ||
| 985 | # endif | ||
| 986 | /* Need to cast, because on Solaris, the third parameter will likely be | ||
| 987 | __va_list args. */ | ||
| 988 | _GL_CXXALIAS_SYS_CAST (vdprintf, int, | ||
| 989 | (int fd, const char *format, va_list args)); | ||
| 990 | # endif | ||
| 991 | _GL_CXXALIASWARN (vdprintf); | ||
| 992 | #elif defined GNULIB_POSIXCHECK | ||
| 993 | # undef vdprintf | ||
| 994 | # if HAVE_RAW_DECL_VDPRINTF | ||
| 995 | _GL_WARN_ON_USE (vdprintf, "vdprintf is unportable - " | ||
| 996 | "use gnulib module vdprintf for portability"); | ||
| 997 | # endif | ||
| 998 | #endif | ||
| 999 | |||
| 1000 | #if @GNULIB_VFPRINTF_POSIX@ || @GNULIB_VFPRINTF@ | ||
| 1001 | # if (@GNULIB_VFPRINTF_POSIX@ && @REPLACE_VFPRINTF@) \ | ||
| 1002 | || (@GNULIB_VFPRINTF@ && @REPLACE_STDIO_WRITE_FUNCS@ && @GNULIB_STDIO_H_SIGPIPE@) | ||
| 1003 | # if !(defined __cplusplus && defined GNULIB_NAMESPACE) | ||
| 1004 | # define vfprintf rpl_vfprintf | ||
| 1005 | # endif | ||
| 1006 | # define GNULIB_overrides_vfprintf 1 | ||
| 1007 | _GL_FUNCDECL_RPL (vfprintf, int, (FILE *fp, const char *format, va_list args) | ||
| 1008 | _GL_ATTRIBUTE_FORMAT_PRINTF (2, 0) | ||
| 1009 | _GL_ARG_NONNULL ((1, 2))); | ||
| 1010 | _GL_CXXALIAS_RPL (vfprintf, int, (FILE *fp, const char *format, va_list args)); | ||
| 1011 | # else | ||
| 1012 | /* Need to cast, because on Solaris, the third parameter is | ||
| 1013 | __va_list args | ||
| 1014 | and GCC's fixincludes did not change this to __gnuc_va_list. */ | ||
| 1015 | _GL_CXXALIAS_SYS_CAST (vfprintf, int, | ||
| 1016 | (FILE *fp, const char *format, va_list args)); | ||
| 1017 | # endif | ||
| 1018 | _GL_CXXALIASWARN (vfprintf); | ||
| 1019 | #endif | ||
| 1020 | #if !@GNULIB_VFPRINTF_POSIX@ && defined GNULIB_POSIXCHECK | ||
| 1021 | # if !GNULIB_overrides_vfprintf | ||
| 1022 | # undef vfprintf | ||
| 1023 | # endif | ||
| 1024 | /* Assume vfprintf is always declared. */ | ||
| 1025 | _GL_WARN_ON_USE (vfprintf, "vfprintf is not always POSIX compliant - " | ||
| 1026 | "use gnulib module vfprintf-posix for portable " | ||
| 1027 | "POSIX compliance"); | ||
| 1028 | #endif | ||
| 1029 | |||
| 1030 | #if @GNULIB_VPRINTF_POSIX@ || @GNULIB_VPRINTF@ | ||
| 1031 | # if (@GNULIB_VPRINTF_POSIX@ && @REPLACE_VPRINTF@) \ | ||
| 1032 | || (@GNULIB_VPRINTF@ && @REPLACE_STDIO_WRITE_FUNCS@ && @GNULIB_STDIO_H_SIGPIPE@) | ||
| 1033 | # if !(defined __cplusplus && defined GNULIB_NAMESPACE) | ||
| 1034 | # define vprintf rpl_vprintf | ||
| 1035 | # endif | ||
| 1036 | # define GNULIB_overrides_vprintf 1 | ||
| 1037 | _GL_FUNCDECL_RPL (vprintf, int, (const char *format, va_list args) | ||
| 1038 | _GL_ATTRIBUTE_FORMAT_PRINTF (1, 0) | ||
| 1039 | _GL_ARG_NONNULL ((1))); | ||
| 1040 | _GL_CXXALIAS_RPL (vprintf, int, (const char *format, va_list args)); | ||
| 1041 | # else | ||
| 1042 | /* Need to cast, because on Solaris, the second parameter is | ||
| 1043 | __va_list args | ||
| 1044 | and GCC's fixincludes did not change this to __gnuc_va_list. */ | ||
| 1045 | _GL_CXXALIAS_SYS_CAST (vprintf, int, (const char *format, va_list args)); | ||
| 1046 | # endif | ||
| 1047 | _GL_CXXALIASWARN (vprintf); | ||
| 1048 | #endif | ||
| 1049 | #if !@GNULIB_VPRINTF_POSIX@ && defined GNULIB_POSIXCHECK | ||
| 1050 | # if !GNULIB_overrides_vprintf | ||
| 1051 | # undef vprintf | ||
| 1052 | # endif | ||
| 1053 | /* Assume vprintf is always declared. */ | ||
| 1054 | _GL_WARN_ON_USE (vprintf, "vprintf is not always POSIX compliant - " | ||
| 1055 | "use gnulib module vprintf-posix for portable " | ||
| 1056 | "POSIX compliance"); | ||
| 1057 | #endif | ||
| 1058 | |||
| 1059 | #if @GNULIB_VSNPRINTF@ | ||
| 1060 | # if @REPLACE_VSNPRINTF@ | ||
| 1061 | # if !(defined __cplusplus && defined GNULIB_NAMESPACE) | ||
| 1062 | # define vsnprintf rpl_vsnprintf | ||
| 1063 | # endif | ||
| 1064 | _GL_FUNCDECL_RPL (vsnprintf, int, | ||
| 1065 | (char *str, size_t size, const char *format, va_list args) | ||
| 1066 | _GL_ATTRIBUTE_FORMAT_PRINTF (3, 0) | ||
| 1067 | _GL_ARG_NONNULL ((3))); | ||
| 1068 | _GL_CXXALIAS_RPL (vsnprintf, int, | ||
| 1069 | (char *str, size_t size, const char *format, va_list args)); | ||
| 1070 | # else | ||
| 1071 | # if !@HAVE_DECL_VSNPRINTF@ | ||
| 1072 | _GL_FUNCDECL_SYS (vsnprintf, int, | ||
| 1073 | (char *str, size_t size, const char *format, va_list args) | ||
| 1074 | _GL_ATTRIBUTE_FORMAT_PRINTF (3, 0) | ||
| 1075 | _GL_ARG_NONNULL ((3))); | ||
| 1076 | # endif | ||
| 1077 | _GL_CXXALIAS_SYS (vsnprintf, int, | ||
| 1078 | (char *str, size_t size, const char *format, va_list args)); | ||
| 1079 | # endif | ||
| 1080 | _GL_CXXALIASWARN (vsnprintf); | ||
| 1081 | #elif defined GNULIB_POSIXCHECK | ||
| 1082 | # undef vsnprintf | ||
| 1083 | # if HAVE_RAW_DECL_VSNPRINTF | ||
| 1084 | _GL_WARN_ON_USE (vsnprintf, "vsnprintf is unportable - " | ||
| 1085 | "use gnulib module vsnprintf for portability"); | ||
| 1086 | # endif | ||
| 1087 | #endif | ||
| 1088 | |||
| 1089 | #if @GNULIB_VSPRINTF_POSIX@ | ||
| 1090 | # if @REPLACE_VSPRINTF@ | ||
| 1091 | # if !(defined __cplusplus && defined GNULIB_NAMESPACE) | ||
| 1092 | # define vsprintf rpl_vsprintf | ||
| 1093 | # endif | ||
| 1094 | _GL_FUNCDECL_RPL (vsprintf, int, | ||
| 1095 | (char *str, const char *format, va_list args) | ||
| 1096 | _GL_ATTRIBUTE_FORMAT_PRINTF (2, 0) | ||
| 1097 | _GL_ARG_NONNULL ((1, 2))); | ||
| 1098 | _GL_CXXALIAS_RPL (vsprintf, int, | ||
| 1099 | (char *str, const char *format, va_list args)); | ||
| 1100 | # else | ||
| 1101 | /* Need to cast, because on Solaris, the third parameter is | ||
| 1102 | __va_list args | ||
| 1103 | and GCC's fixincludes did not change this to __gnuc_va_list. */ | ||
| 1104 | _GL_CXXALIAS_SYS_CAST (vsprintf, int, | ||
| 1105 | (char *str, const char *format, va_list args)); | ||
| 1106 | # endif | ||
| 1107 | _GL_CXXALIASWARN (vsprintf); | ||
| 1108 | #elif defined GNULIB_POSIXCHECK | ||
| 1109 | # undef vsprintf | ||
| 1110 | /* Assume vsprintf is always declared. */ | ||
| 1111 | _GL_WARN_ON_USE (vsprintf, "vsprintf is not always POSIX compliant - " | ||
| 1112 | "use gnulib module vsprintf-posix for portable " | ||
| 1113 | "POSIX compliance"); | ||
| 1114 | #endif | ||
| 1115 | |||
| 1116 | |||
| 1117 | #endif /* _GL_STDIO_H */ | ||
| 1118 | #endif /* _GL_STDIO_H */ | ||
| 1119 | #endif | ||
diff --git a/lib/strftime.c b/lib/strftime.c index 0a02b507744..acebc9adfad 100644 --- a/lib/strftime.c +++ b/lib/strftime.c | |||
| @@ -172,15 +172,16 @@ extern char *tzname[]; | |||
| 172 | #define add(n, f) \ | 172 | #define add(n, f) \ |
| 173 | do \ | 173 | do \ |
| 174 | { \ | 174 | { \ |
| 175 | int _n = (n); \ | 175 | size_t _n = (n); \ |
| 176 | int _delta = width - _n; \ | 176 | size_t _w = (width < 0 ? 0 : width); \ |
| 177 | int _incr = _n + (_delta > 0 ? _delta : 0); \ | 177 | size_t _incr = _n < _w ? _w : _n; \ |
| 178 | if ((size_t) _incr >= maxsize - i) \ | 178 | if (_incr >= maxsize - i) \ |
| 179 | return 0; \ | 179 | return 0; \ |
| 180 | if (p) \ | 180 | if (p) \ |
| 181 | { \ | 181 | { \ |
| 182 | if (digits == 0 && _delta > 0) \ | 182 | if (digits == 0 && _n < _w) \ |
| 183 | { \ | 183 | { \ |
| 184 | size_t _delta = width - _n; \ | ||
| 184 | if (pad == L_('0')) \ | 185 | if (pad == L_('0')) \ |
| 185 | memset_zero (p, _delta); \ | 186 | memset_zero (p, _delta); \ |
| 186 | else \ | 187 | else \ |
diff --git a/lisp/ChangeLog.trunk b/lisp/ChangeLog.trunk index d087982edee..7ce8b62b333 100644 --- a/lisp/ChangeLog.trunk +++ b/lisp/ChangeLog.trunk | |||
| @@ -1,3 +1,154 @@ | |||
| 1 | 2011-03-30 Leo Liu <sdl.web@gmail.com> | ||
| 2 | |||
| 3 | * abbrev.el (abbrev-edit-save-to-file, abbrev-edit-save-buffer): | ||
| 4 | New commands. | ||
| 5 | (edit-abbrevs-map): Bind them here. | ||
| 6 | (write-abbrev-file): New optinal arg VERBOSE. (Bug#5937) | ||
| 7 | |||
| 8 | 2011-03-29 Ken Manheimer <ken.manheimer@gmail.com> | ||
| 9 | |||
| 10 | * allout.el (allout-hide-by-annotation, allout-flag-region): | ||
| 11 | Reduce possibility of overlay leakage by making them volatile. | ||
| 12 | |||
| 13 | * allout-widgets.el (allout-widgets-tally): Define as nil so the | ||
| 14 | hash is not shared between buffers. Mode initialization is | ||
| 15 | responsible for giving it a useful starting value. | ||
| 16 | (allout-item-span): Reduce possibility of overlay leakage by | ||
| 17 | making them volatile. | ||
| 18 | (allout-widgets-count-buttons-in-region): Add diagnostic function | ||
| 19 | for tracking down button overlay leaks. | ||
| 20 | |||
| 21 | 2011-03-29 Leo Liu <sdl.web@gmail.com> | ||
| 22 | |||
| 23 | * ido.el (ido-read-internal): Use the default history var | ||
| 24 | minibuffer-history if no HISTORY is specified. | ||
| 25 | |||
| 26 | 2011-03-28 Brian T. Sniffen <bsniffen@akamai.com> (tiny change) | ||
| 27 | |||
| 28 | * net/imap.el (imap-shell-open, imap-process-connection-type): Use | ||
| 29 | imap-process-connection-type for 'shell' streams as well as | ||
| 30 | Kerberos, SSL, other subprocesses. | ||
| 31 | |||
| 32 | 2011-03-28 Leo Liu <sdl.web@gmail.com> | ||
| 33 | |||
| 34 | * abbrev.el (abbrev-table-empty-p): New function. | ||
| 35 | (prepare-abbrev-list-buffer): Place empty abbrev tables after | ||
| 36 | nonempty ones. (Bug#5937) | ||
| 37 | |||
| 38 | 2011-03-27 Jan Djärv <jan.h.d@swipnet.se> | ||
| 39 | |||
| 40 | * cus-start.el (all): Add boolean ns-auto-hide-menu-bar. | ||
| 41 | |||
| 42 | 2011-03-27 Leo Liu <sdl.web@gmail.com> | ||
| 43 | |||
| 44 | * ansi-color.el (ansi-color-names-vector): Allow cons cell value | ||
| 45 | for foreground and background colors. | ||
| 46 | (ansi-color-make-color-map): Adapt. | ||
| 47 | |||
| 48 | 2011-03-25 Leo Liu <sdl.web@gmail.com> | ||
| 49 | |||
| 50 | * midnight.el (midnight-time-float): Remove. Note it calculates | ||
| 51 | the microsecond component incorrectly and seconds-to-time does the | ||
| 52 | same job. | ||
| 53 | Remove redundant (require 'timer). | ||
| 54 | |||
| 55 | * ido.el (ido-read-internal): Simplify with read-from-minibuffer. | ||
| 56 | (ido-completions): Remove unused arguments. (Bug#8329) | ||
| 57 | |||
| 58 | 2011-03-24 Stefan Monnier <monnier@iro.umontreal.ca> | ||
| 59 | |||
| 60 | * minibuffer.el (completion--flush-all-sorted-completions): | ||
| 61 | Remove itself from hook. | ||
| 62 | (completion-at-point): Let the functions perform the completion | ||
| 63 | immediately and return nil or t. | ||
| 64 | * comint.el (comint-dynamic-complete-functions): Now identical to | ||
| 65 | completion-at-point-functions. | ||
| 66 | (comint-dynamic-list-input-ring): Remove unused var `index'. | ||
| 67 | (comint--match-partial-filename, comint--unquote&expand-filename): | ||
| 68 | New funs, split from comint-match-partial-filename. | ||
| 69 | (comint-dynamic-complete): Use completion-at-point. | ||
| 70 | (comint-dynamic-complete-filename): Use comint--match-partial-filename. | ||
| 71 | |||
| 72 | 2011-03-24 Drew Adams <drew.adams@oracle.com> | ||
| 73 | |||
| 74 | * thingatpt.el: Support `defun'. | ||
| 75 | |||
| 76 | 2011-03-23 Leo Liu <sdl.web@gmail.com> | ||
| 77 | |||
| 78 | * abbrevlist.el: Move to obsolete/abbrevlist.el. | ||
| 79 | |||
| 80 | * help-mode.el (help-mode-finish): Tweak regexp. | ||
| 81 | |||
| 82 | 2011-03-23 Glenn Morris <rgm@gnu.org> | ||
| 83 | |||
| 84 | * eshell/esh-opt.el (eshell-eval-using-options): | ||
| 85 | Do not bind unused local variable `eshell-option-stub'. | ||
| 86 | |||
| 87 | * progmodes/gdb-mi.el (gdb): Fix typo in previous change. | ||
| 88 | |||
| 89 | 2011-03-22 Juanma Barranquero <lekktu@gmail.com> | ||
| 90 | |||
| 91 | * emacs-lisp/derived.el (define-derived-mode): Wrap declaration of | ||
| 92 | keymap variable in `with-no-warnings' to avoid a warning when the | ||
| 93 | keymap has been already `defconst'ed. | ||
| 94 | |||
| 95 | 2011-03-22 Leo Liu <sdl.web@gmail.com> | ||
| 96 | |||
| 97 | * abbrev.el (write-abbrev-file): Use utf-8 for writing if it can | ||
| 98 | encode all chars in abbrevs; otherwise use emacs-mule or | ||
| 99 | utf-8-emacs. (Bug#8308) | ||
| 100 | |||
| 101 | 2011-03-22 Juanma Barranquero <lekktu@gmail.com> | ||
| 102 | |||
| 103 | * simple.el (backward-delete-char-untabify): | ||
| 104 | Avoid warning about using `delete-backward-char'. | ||
| 105 | |||
| 106 | * image.el (image-type-file-name-regexps): Make it variable. | ||
| 107 | `imagemagick-register-types' modifies it, and the user may want | ||
| 108 | to add new extensions for known image types. | ||
| 109 | (imagemagick-register-types): Throw error if not using ImageMagick. | ||
| 110 | |||
| 111 | 2011-03-22 Leo Liu <sdl.web@gmail.com> | ||
| 112 | |||
| 113 | * net/rcirc.el (rcirc-completion-at-point): Return nil if point is | ||
| 114 | located before rcirc-prompt-end-marker. | ||
| 115 | (rcirc-complete): Error if point is not after rcirc prompt. | ||
| 116 | Handle the case when table is nil. | ||
| 117 | (rcirc-user-authenticated): Define to fix compiler warning. | ||
| 118 | |||
| 119 | 2011-03-22 Chong Yidong <cyd@stupidchicken.com> | ||
| 120 | |||
| 121 | * custom.el (custom--inhibit-theme-enable): Make it affect only | ||
| 122 | custom-theme-set-variables and custom-theme-set-faces. | ||
| 123 | (provide-theme): Ignore custom--inhibit-theme-enable. | ||
| 124 | (load-theme): Enable the theme explicitly if NO-ENABLE is non-nil. | ||
| 125 | (custom-enabling-themes): Delete variable. | ||
| 126 | (enable-theme): Accept only loaded themes as arguments. | ||
| 127 | Ignore the special custom-enabled-themes variable. | ||
| 128 | (custom-enabled-themes): Forbid themes from setting this. | ||
| 129 | Eliminate use of custom-enabling-themes. | ||
| 130 | (custom-push-theme): Quote "changed" custom var entry. | ||
| 131 | |||
| 132 | 2011-03-21 Leo Liu <sdl.web@gmail.com> | ||
| 133 | |||
| 134 | * ido.el (ido-read-internal): Add ido-selected to history instead | ||
| 135 | of user input. | ||
| 136 | |||
| 137 | 2011-03-21 Stefan Monnier <monnier@iro.umontreal.ca> | ||
| 138 | |||
| 139 | * subr.el (deferred-action-list, deferred-action-function): | ||
| 140 | Mark obsolete. | ||
| 141 | |||
| 142 | 2011-03-21 Leo Liu <sdl.web@gmail.com> | ||
| 143 | |||
| 144 | * vc/log-view.el: Remove (require 'wid-edit), not needed after the | ||
| 145 | change on 2011-02-13 (bug#8309). | ||
| 146 | |||
| 147 | * minibuffer.el (read-file-name-function): Change default value. | ||
| 148 | (read-file-name--defaults): Rename from read-file-name-defaults. | ||
| 149 | (read-file-name-default): Rename from read-file-name. | ||
| 150 | (read-file-name): Call read-file-name-function. | ||
| 151 | |||
| 1 | 2011-03-21 Glenn Morris <rgm@gnu.org> | 152 | 2011-03-21 Glenn Morris <rgm@gnu.org> |
| 2 | 153 | ||
| 3 | * eshell/esh-opt.el (eshell-eval-using-options, eshell-process-args): | 154 | * eshell/esh-opt.el (eshell-eval-using-options, eshell-process-args): |
| @@ -310,8 +461,8 @@ | |||
| 310 | 461 | ||
| 311 | 2011-03-09 Michael Albinus <michael.albinus@gmx.de> | 462 | 2011-03-09 Michael Albinus <michael.albinus@gmx.de> |
| 312 | 463 | ||
| 313 | * net/tramp-sh.el (tramp-do-copy-or-rename-file-out-of-band): Do | 464 | * net/tramp-sh.el (tramp-do-copy-or-rename-file-out-of-band): |
| 314 | not use `tramp-file-name-port', because this returns also | 465 | Do not use `tramp-file-name-port', because this returns also |
| 315 | `tramp-default-port'. | 466 | `tramp-default-port'. |
| 316 | 467 | ||
| 317 | 2011-03-09 Deniz Dogan <deniz.a.m.dogan@gmail.com> | 468 | 2011-03-09 Deniz Dogan <deniz.a.m.dogan@gmail.com> |
| @@ -340,8 +491,8 @@ | |||
| 340 | * emacs-lisp/package.el (package-tar-file-info): Handle also | 491 | * emacs-lisp/package.el (package-tar-file-info): Handle also |
| 341 | remote files. | 492 | remote files. |
| 342 | 493 | ||
| 343 | * emacs-lisp/package-x.el (package-upload-buffer-internal): Use | 494 | * emacs-lisp/package-x.el (package-upload-buffer-internal): |
| 344 | `equal' for upload base check. | 495 | Use `equal' for upload base check. |
| 345 | 496 | ||
| 346 | 2011-03-08 Arni Magnusson <arnima@hafro.is> (tiny change) | 497 | 2011-03-08 Arni Magnusson <arnima@hafro.is> (tiny change) |
| 347 | 498 | ||
| @@ -670,9 +821,9 @@ | |||
| 670 | 2011-03-03 Christian Ohler <ohler@gnu.org> | 821 | 2011-03-03 Christian Ohler <ohler@gnu.org> |
| 671 | 822 | ||
| 672 | * emacs-lisp/ert.el (ert--explain-equal): New function. | 823 | * emacs-lisp/ert.el (ert--explain-equal): New function. |
| 673 | (ert--explain-equal-rec): Renamed from `ert--explain-not-equal'. | 824 | (ert--explain-equal-rec): Rename from `ert--explain-not-equal'. |
| 674 | All callers changed. | 825 | All callers changed. |
| 675 | (ert--explain-equal-including-properties): Renamed from | 826 | (ert--explain-equal-including-properties): Rename from |
| 676 | `ert--explain-not-equal-including-properties'. All callers | 827 | `ert--explain-not-equal-including-properties'. All callers |
| 677 | changed. | 828 | changed. |
| 678 | 829 | ||
| @@ -8195,8 +8346,8 @@ | |||
| 8195 | 8346 | ||
| 8196 | Sync with Tramp 2.1.19. | 8347 | Sync with Tramp 2.1.19. |
| 8197 | 8348 | ||
| 8198 | * net/tramp-gvfs.el (tramp-gvfs-handle-write-region): Protect | 8349 | * net/tramp-gvfs.el (tramp-gvfs-handle-write-region): |
| 8199 | deleting tmpfile. | 8350 | Protect deleting tmpfile. |
| 8200 | (tramp-gvfs-maybe-open-connection): Use `tramp-compat-funcall'. | 8351 | (tramp-gvfs-maybe-open-connection): Use `tramp-compat-funcall'. |
| 8201 | 8352 | ||
| 8202 | * net/tramp.el (tramp-handle-expand-file-name) | 8353 | * net/tramp.el (tramp-handle-expand-file-name) |
| @@ -10474,8 +10625,8 @@ | |||
| 10474 | * net/tramp-ftp.el (tramp-ftp-file-name-handler): | 10625 | * net/tramp-ftp.el (tramp-ftp-file-name-handler): |
| 10475 | Use `delete-file' instead of `tramp-compat-delete-file'. | 10626 | Use `delete-file' instead of `tramp-compat-delete-file'. |
| 10476 | 10627 | ||
| 10477 | * net/tramp-gvfs.el (tramp-gvfs-handle-write-region): Use | 10628 | * net/tramp-gvfs.el (tramp-gvfs-handle-write-region): |
| 10478 | `delete-file' instead of `tramp-compat-delete-file'. | 10629 | Use `delete-file' instead of `tramp-compat-delete-file'. |
| 10479 | 10630 | ||
| 10480 | * net/tramp-imap.el (tramp-imap-do-copy-or-rename-file): | 10631 | * net/tramp-imap.el (tramp-imap-do-copy-or-rename-file): |
| 10481 | Use `delete-file' instead of `tramp-compat-delete-file'. | 10632 | Use `delete-file' instead of `tramp-compat-delete-file'. |
diff --git a/lisp/abbrev.el b/lisp/abbrev.el index 3844391a180..b2cd2064da2 100644 --- a/lisp/abbrev.el +++ b/lisp/abbrev.el | |||
| @@ -65,7 +65,8 @@ abbreviation causes it to expand and be replaced by its expansion." | |||
| 65 | 65 | ||
| 66 | (defvar edit-abbrevs-map | 66 | (defvar edit-abbrevs-map |
| 67 | (let ((map (make-sparse-keymap))) | 67 | (let ((map (make-sparse-keymap))) |
| 68 | (define-key map "\C-x\C-s" 'edit-abbrevs-redefine) | 68 | (define-key map "\C-x\C-s" 'abbrev-edit-save-buffer) |
| 69 | (define-key map "\C-x\C-w" 'abbrev-edit-save-to-file) | ||
| 69 | (define-key map "\C-c\C-c" 'edit-abbrevs-redefine) | 70 | (define-key map "\C-c\C-c" 'edit-abbrevs-redefine) |
| 70 | map) | 71 | map) |
| 71 | "Keymap used in `edit-abbrevs'.") | 72 | "Keymap used in `edit-abbrevs'.") |
| @@ -123,8 +124,13 @@ Otherwise display all abbrevs." | |||
| 123 | (if local | 124 | (if local |
| 124 | (insert-abbrev-table-description | 125 | (insert-abbrev-table-description |
| 125 | (abbrev-table-name local-table) t) | 126 | (abbrev-table-name local-table) t) |
| 126 | (dolist (table abbrev-table-name-list) | 127 | (let (empty-tables) |
| 127 | (insert-abbrev-table-description table t))) | 128 | (dolist (table abbrev-table-name-list) |
| 129 | (if (abbrev-table-empty-p (symbol-value table)) | ||
| 130 | (push table empty-tables) | ||
| 131 | (insert-abbrev-table-description table t))) | ||
| 132 | (dolist (table (nreverse empty-tables)) | ||
| 133 | (insert-abbrev-table-description table t)))) | ||
| 128 | (goto-char (point-min)) | 134 | (goto-char (point-min)) |
| 129 | (set-buffer-modified-p nil) | 135 | (set-buffer-modified-p nil) |
| 130 | (edit-abbrevs-mode) | 136 | (edit-abbrevs-mode) |
| @@ -211,13 +217,15 @@ Does not display any message." | |||
| 211 | ;(interactive "fRead abbrev file: ") | 217 | ;(interactive "fRead abbrev file: ") |
| 212 | (read-abbrev-file file t)) | 218 | (read-abbrev-file file t)) |
| 213 | 219 | ||
| 214 | (defun write-abbrev-file (&optional file) | 220 | (defun write-abbrev-file (&optional file verbose) |
| 215 | "Write all user-level abbrev definitions to a file of Lisp code. | 221 | "Write all user-level abbrev definitions to a file of Lisp code. |
| 216 | This does not include system abbrevs; it includes only the abbrev tables | 222 | This does not include system abbrevs; it includes only the abbrev tables |
| 217 | listed in listed in `abbrev-table-name-list'. | 223 | listed in listed in `abbrev-table-name-list'. |
| 218 | The file written can be loaded in another session to define the same abbrevs. | 224 | The file written can be loaded in another session to define the same abbrevs. |
| 219 | The argument FILE is the file name to write. If omitted or nil, the file | 225 | The argument FILE is the file name to write. If omitted or nil, the file |
| 220 | specified in `abbrev-file-name' is used." | 226 | specified in `abbrev-file-name' is used. |
| 227 | If VERBOSE is non-nil, display a message indicating where abbrevs | ||
| 228 | have been saved." | ||
| 221 | (interactive | 229 | (interactive |
| 222 | (list | 230 | (list |
| 223 | (read-file-name "Write abbrev file: " | 231 | (read-file-name "Write abbrev file: " |
| @@ -225,21 +233,47 @@ specified in `abbrev-file-name' is used." | |||
| 225 | abbrev-file-name))) | 233 | abbrev-file-name))) |
| 226 | (or (and file (> (length file) 0)) | 234 | (or (and file (> (length file) 0)) |
| 227 | (setq file abbrev-file-name)) | 235 | (setq file abbrev-file-name)) |
| 228 | (let ((coding-system-for-write 'emacs-mule)) | 236 | (let ((coding-system-for-write 'utf-8)) |
| 229 | (with-temp-file file | 237 | (with-temp-buffer |
| 230 | (insert ";;-*-coding: emacs-mule;-*-\n") | ||
| 231 | (dolist (table | 238 | (dolist (table |
| 232 | ;; We sort the table in order to ease the automatic | 239 | ;; We sort the table in order to ease the automatic |
| 233 | ;; merging of different versions of the user's abbrevs | 240 | ;; merging of different versions of the user's abbrevs |
| 234 | ;; file. This is useful, for example, for when the | 241 | ;; file. This is useful, for example, for when the |
| 235 | ;; user keeps their home directory in a revision | 242 | ;; user keeps their home directory in a revision |
| 236 | ;; control system, and is therefore keeping multiple | 243 | ;; control system, and is therefore keeping multiple |
| 237 | ;; slightly-differing copies loosely synchronized. | 244 | ;; slightly-differing copies loosely synchronized. |
| 238 | (sort (copy-sequence abbrev-table-name-list) | 245 | (sort (copy-sequence abbrev-table-name-list) |
| 239 | (lambda (s1 s2) | 246 | (lambda (s1 s2) |
| 240 | (string< (symbol-name s1) | 247 | (string< (symbol-name s1) |
| 241 | (symbol-name s2))))) | 248 | (symbol-name s2))))) |
| 242 | (insert-abbrev-table-description table nil))))) | 249 | (insert-abbrev-table-description table nil)) |
| 250 | (when (unencodable-char-position (point-min) (point-max) 'utf-8) | ||
| 251 | (setq coding-system-for-write | ||
| 252 | (if (> emacs-major-version 24) | ||
| 253 | 'utf-8-emacs | ||
| 254 | ;; For compatibility with Emacs 22 (See Bug#8308) | ||
| 255 | 'emacs-mule))) | ||
| 256 | (goto-char (point-min)) | ||
| 257 | (insert (format ";;-*-coding: %s;-*-\n" coding-system-for-write)) | ||
| 258 | (write-region nil nil file nil (and (not verbose) 0))))) | ||
| 259 | |||
| 260 | (defun abbrev-edit-save-to-file (file) | ||
| 261 | "Save all user-level abbrev definitions in current buffer to FILE." | ||
| 262 | (interactive | ||
| 263 | (list (read-file-name "Save abbrevs to file: " | ||
| 264 | (file-name-directory | ||
| 265 | (expand-file-name abbrev-file-name)) | ||
| 266 | abbrev-file-name))) | ||
| 267 | (edit-abbrevs-redefine) | ||
| 268 | (write-abbrev-file file t)) | ||
| 269 | |||
| 270 | (defun abbrev-edit-save-buffer () | ||
| 271 | "Save all user-level abbrev definitions in current buffer. | ||
| 272 | The saved abbrevs are written to the file specified by | ||
| 273 | `abbrev-file-name'." | ||
| 274 | (interactive) | ||
| 275 | (abbrev-edit-save-to-file abbrev-file-name)) | ||
| 276 | |||
| 243 | 277 | ||
| 244 | (defun add-mode-abbrev (arg) | 278 | (defun add-mode-abbrev (arg) |
| 245 | "Define mode-specific abbrev for last word(s) before point. | 279 | "Define mode-specific abbrev for last word(s) before point. |
| @@ -412,6 +446,19 @@ PROPS is a list of properties." | |||
| 412 | (and (vectorp object) | 446 | (and (vectorp object) |
| 413 | (numberp (abbrev-table-get object :abbrev-table-modiff)))) | 447 | (numberp (abbrev-table-get object :abbrev-table-modiff)))) |
| 414 | 448 | ||
| 449 | (defun abbrev-table-empty-p (object &optional ignore-system) | ||
| 450 | "Return nil if there are no abbrev symbols in OBJECT. | ||
| 451 | If IGNORE-SYSTEM is non-nil, system definitions are ignored." | ||
| 452 | (unless (abbrev-table-p object) | ||
| 453 | (error "Non abbrev table object")) | ||
| 454 | (not (catch 'some | ||
| 455 | (mapatoms (lambda (abbrev) | ||
| 456 | (unless (or (zerop (length (symbol-name abbrev))) | ||
| 457 | (and ignore-system | ||
| 458 | (abbrev-get abbrev :system))) | ||
| 459 | (throw 'some t))) | ||
| 460 | object)))) | ||
| 461 | |||
| 415 | (defvar global-abbrev-table (make-abbrev-table) | 462 | (defvar global-abbrev-table (make-abbrev-table) |
| 416 | "The abbrev table whose abbrevs affect all buffers. | 463 | "The abbrev table whose abbrevs affect all buffers. |
| 417 | Each buffer may also have a local abbrev table. | 464 | Each buffer may also have a local abbrev table. |
diff --git a/lisp/allout-widgets.el b/lisp/allout-widgets.el index 47f181ab76b..ae4265bda1f 100644 --- a/lisp/allout-widgets.el +++ b/lisp/allout-widgets.el | |||
| @@ -238,7 +238,7 @@ buffer, and tracking increases as new widgets are added and | |||
| 238 | decreases as obsolete widgets are garbage collected." | 238 | decreases as obsolete widgets are garbage collected." |
| 239 | :type 'boolean | 239 | :type 'boolean |
| 240 | :group 'allout-widgets-developer) | 240 | :group 'allout-widgets-developer) |
| 241 | (defvar allout-widgets-tally (make-hash-table :test 'eq :weakness 'key) | 241 | (defvar allout-widgets-tally nil |
| 242 | "Hash-table of existing allout widgets, for debugging. | 242 | "Hash-table of existing allout widgets, for debugging. |
| 243 | 243 | ||
| 244 | Table is maintained iff `allout-widgets-maintain-tally' is non-nil. | 244 | Table is maintained iff `allout-widgets-maintain-tally' is non-nil. |
| @@ -2100,6 +2100,7 @@ previously established or is not moved." | |||
| 2100 | (cond ((not overlay) (when start | 2100 | (cond ((not overlay) (when start |
| 2101 | (setq overlay (make-overlay start end nil t nil)) | 2101 | (setq overlay (make-overlay start end nil t nil)) |
| 2102 | (overlay-put overlay 'button item-widget) | 2102 | (overlay-put overlay 'button item-widget) |
| 2103 | (overlay-put overlay 'evaporate t) | ||
| 2103 | (widget-put item-widget :span-overlay overlay) | 2104 | (widget-put item-widget :span-overlay overlay) |
| 2104 | t)) | 2105 | t)) |
| 2105 | ;; report: | 2106 | ;; report: |
| @@ -2343,6 +2344,19 @@ The elements of LIST are not copied, just the list structure itself." | |||
| 2343 | (while (consp list) (push (pop list) res)) | 2344 | (while (consp list) (push (pop list) res)) |
| 2344 | (prog1 (nreverse res) (setcdr res list))) | 2345 | (prog1 (nreverse res) (setcdr res list))) |
| 2345 | (car list))) | 2346 | (car list))) |
| 2347 | ;;;_ . allout-widgets-count-buttons-in-region (start end) | ||
| 2348 | (defun allout-widgets-count-buttons-in-region (start end) | ||
| 2349 | "Debugging/diagnostic tool - count overlays with 'button' property in region." | ||
| 2350 | (interactive "r") | ||
| 2351 | (setq start (or start (point-min)) | ||
| 2352 | end (or end (point-max))) | ||
| 2353 | (if (> start end) (let ((interim start)) (setq start end end interim))) | ||
| 2354 | (let ((button-overlays (delq nil | ||
| 2355 | (mapcar (function (lambda (o) | ||
| 2356 | (if (overlay-get o 'button) | ||
| 2357 | o))) | ||
| 2358 | (overlays-in start end))))) | ||
| 2359 | (length button-overlays))) | ||
| 2346 | 2360 | ||
| 2347 | ;;;_ : Run unit tests: | 2361 | ;;;_ : Run unit tests: |
| 2348 | (defun allout-widgets-run-unit-tests () | 2362 | (defun allout-widgets-run-unit-tests () |
diff --git a/lisp/allout.el b/lisp/allout.el index 3fb8ed7ccd5..736ec42718b 100644 --- a/lisp/allout.el +++ b/lisp/allout.el | |||
| @@ -4489,8 +4489,9 @@ Topic exposure is marked with text-properties, to be used by | |||
| 4489 | ;; advance to just after end of this annotation: | 4489 | ;; advance to just after end of this annotation: |
| 4490 | (setq next (allout-next-single-char-property-change | 4490 | (setq next (allout-next-single-char-property-change |
| 4491 | (point) 'allout-was-hidden nil end)) | 4491 | (point) 'allout-was-hidden nil end)) |
| 4492 | (overlay-put (make-overlay prev next nil 'front-advance) | 4492 | (let ((o (make-overlay prev next nil 'front-advance))) |
| 4493 | 'category 'allout-exposure-category) | 4493 | (overlay-put o 'category 'allout-exposure-category) |
| 4494 | (overlay-put o 'evaporate t)) | ||
| 4494 | (allout-deannotate-hidden prev next) | 4495 | (allout-deannotate-hidden prev next) |
| 4495 | (setq prev next) | 4496 | (setq prev next) |
| 4496 | (if next (goto-char next))))) | 4497 | (if next (goto-char next))))) |
diff --git a/lisp/ansi-color.el b/lisp/ansi-color.el index 2b43940c1bd..ff7edf40dcb 100644 --- a/lisp/ansi-color.el +++ b/lisp/ansi-color.el | |||
| @@ -132,8 +132,18 @@ Parameter Color | |||
| 132 | 37 47 white | 132 | 37 47 white |
| 133 | 133 | ||
| 134 | This vector is used by `ansi-color-make-color-map' to create a color | 134 | This vector is used by `ansi-color-make-color-map' to create a color |
| 135 | map. This color map is stored in the variable `ansi-color-map'." | 135 | map. This color map is stored in the variable `ansi-color-map'. |
| 136 | :type '(vector string string string string string string string string) | 136 | |
| 137 | Each element may also be a cons cell where the car and cdr specify the | ||
| 138 | foreground and background colors, respectively." | ||
| 139 | :type '(vector (choice color (cons color color)) | ||
| 140 | (choice color (cons color color)) | ||
| 141 | (choice color (cons color color)) | ||
| 142 | (choice color (cons color color)) | ||
| 143 | (choice color (cons color color)) | ||
| 144 | (choice color (cons color color)) | ||
| 145 | (choice color (cons color color)) | ||
| 146 | (choice color (cons color color))) | ||
| 137 | :set 'ansi-color-map-update | 147 | :set 'ansi-color-map-update |
| 138 | :initialize 'custom-initialize-default | 148 | :initialize 'custom-initialize-default |
| 139 | :group 'ansi-colors) | 149 | :group 'ansi-colors) |
| @@ -528,7 +538,8 @@ The face definitions are based upon the variables | |||
| 528 | (mapc | 538 | (mapc |
| 529 | (function (lambda (e) | 539 | (function (lambda (e) |
| 530 | (aset ansi-color-map index | 540 | (aset ansi-color-map index |
| 531 | (ansi-color-make-face 'foreground e)) | 541 | (ansi-color-make-face 'foreground |
| 542 | (if (consp e) (car e) e))) | ||
| 532 | (setq index (1+ index)) )) | 543 | (setq index (1+ index)) )) |
| 533 | ansi-color-names-vector) | 544 | ansi-color-names-vector) |
| 534 | ;; background attributes | 545 | ;; background attributes |
| @@ -536,7 +547,8 @@ The face definitions are based upon the variables | |||
| 536 | (mapc | 547 | (mapc |
| 537 | (function (lambda (e) | 548 | (function (lambda (e) |
| 538 | (aset ansi-color-map index | 549 | (aset ansi-color-map index |
| 539 | (ansi-color-make-face 'background e)) | 550 | (ansi-color-make-face 'background |
| 551 | (if (consp e) (cdr e) e))) | ||
| 540 | (setq index (1+ index)) )) | 552 | (setq index (1+ index)) )) |
| 541 | ansi-color-names-vector) | 553 | ansi-color-names-vector) |
| 542 | ansi-color-map)) | 554 | ansi-color-map)) |
diff --git a/lisp/comint.el b/lisp/comint.el index 711ebce20a3..c9d2108f132 100644 --- a/lisp/comint.el +++ b/lisp/comint.el | |||
| @@ -368,7 +368,7 @@ text matching `comint-prompt-regexp', depending on the value of | |||
| 368 | (defvar comint-dynamic-complete-functions | 368 | (defvar comint-dynamic-complete-functions |
| 369 | '(comint-replace-by-expanded-history comint-dynamic-complete-filename) | 369 | '(comint-replace-by-expanded-history comint-dynamic-complete-filename) |
| 370 | "List of functions called to perform completion. | 370 | "List of functions called to perform completion. |
| 371 | Functions should return non-nil if completion was performed. | 371 | Works like `completion-at-point-functions'. |
| 372 | See also `comint-dynamic-complete'. | 372 | See also `comint-dynamic-complete'. |
| 373 | 373 | ||
| 374 | This is a good thing to set in mode hooks.") | 374 | This is a good thing to set in mode hooks.") |
| @@ -1008,7 +1008,6 @@ See also `comint-read-input-ring'." | |||
| 1008 | (message "No history") | 1008 | (message "No history") |
| 1009 | (let ((history nil) | 1009 | (let ((history nil) |
| 1010 | (history-buffer " *Input History*") | 1010 | (history-buffer " *Input History*") |
| 1011 | (index (1- (ring-length comint-input-ring))) | ||
| 1012 | (conf (current-window-configuration))) | 1011 | (conf (current-window-configuration))) |
| 1013 | ;; We have to build up a list ourselves from the ring vector. | 1012 | ;; We have to build up a list ourselves from the ring vector. |
| 1014 | (dotimes (index (ring-length comint-input-ring)) | 1013 | (dotimes (index (ring-length comint-input-ring)) |
| @@ -2946,13 +2945,22 @@ interpreter (e.g., the percent notation of cmd.exe on NT)." | |||
| 2946 | (setq name (replace-match env-var-val t t name)))))) | 2945 | (setq name (replace-match env-var-val t t name)))))) |
| 2947 | name)) | 2946 | name)) |
| 2948 | 2947 | ||
| 2948 | (defun comint--match-partial-filename () | ||
| 2949 | "Return the filename at point as-is, or nil if none is found. | ||
| 2950 | See `comint-word'." | ||
| 2951 | (comint-word comint-file-name-chars)) | ||
| 2952 | |||
| 2953 | (defun comint--unquote&expand-filename (filename) | ||
| 2954 | ;; FIXME: The code below does unquote-then-expand which means that "\\$HOME" | ||
| 2955 | ;; gets expanded to the same as "$HOME" | ||
| 2956 | (comint-substitute-in-file-name | ||
| 2957 | (comint-unquote-filename filename))) | ||
| 2958 | |||
| 2949 | (defun comint-match-partial-filename () | 2959 | (defun comint-match-partial-filename () |
| 2950 | "Return the filename at point, or nil if none is found. | 2960 | "Return the unquoted&expanded filename at point, or nil if none is found. |
| 2951 | Environment variables are substituted. See `comint-word'." | 2961 | Environment variables are substituted. See `comint-word'." |
| 2952 | (let ((filename (comint-word comint-file-name-chars))) | 2962 | (let ((filename (comint--match-partial-filename))) |
| 2953 | (and filename (comint-substitute-in-file-name | 2963 | (and filename (comint--unquote&expand-filename filename)))) |
| 2954 | (comint-unquote-filename filename))))) | ||
| 2955 | |||
| 2956 | 2964 | ||
| 2957 | (defun comint-quote-filename (filename) | 2965 | (defun comint-quote-filename (filename) |
| 2958 | "Return FILENAME with magic characters quoted. | 2966 | "Return FILENAME with magic characters quoted. |
| @@ -2987,13 +2995,13 @@ Calls the functions in `comint-dynamic-complete-functions' to perform | |||
| 2987 | completion until a function returns non-nil, at which point completion is | 2995 | completion until a function returns non-nil, at which point completion is |
| 2988 | assumed to have occurred." | 2996 | assumed to have occurred." |
| 2989 | (interactive) | 2997 | (interactive) |
| 2990 | (run-hook-with-args-until-success 'comint-dynamic-complete-functions)) | 2998 | (let ((completion-at-point-functions comint-dynamic-complete-functions)) |
| 2999 | (completion-at-point))) | ||
| 2991 | 3000 | ||
| 2992 | 3001 | ||
| 2993 | (defun comint-dynamic-complete-filename () | 3002 | (defun comint-dynamic-complete-filename () |
| 2994 | "Dynamically complete the filename at point. | 3003 | "Dynamically complete the filename at point. |
| 2995 | Completes if after a filename. See `comint-match-partial-filename' and | 3004 | Completes if after a filename. |
| 2996 | `comint-dynamic-complete-as-filename'. | ||
| 2997 | This function is similar to `comint-replace-by-expanded-filename', except that | 3005 | This function is similar to `comint-replace-by-expanded-filename', except that |
| 2998 | it won't change parts of the filename already entered in the buffer; it just | 3006 | it won't change parts of the filename already entered in the buffer; it just |
| 2999 | adds completion characters to the end of the filename. A completions listing | 3007 | adds completion characters to the end of the filename. A completions listing |
| @@ -3005,7 +3013,7 @@ completions listing is dependent on the value of `comint-completion-autolist'. | |||
| 3005 | 3013 | ||
| 3006 | Returns t if successful." | 3014 | Returns t if successful." |
| 3007 | (interactive) | 3015 | (interactive) |
| 3008 | (when (comint-match-partial-filename) | 3016 | (when (comint--match-partial-filename) |
| 3009 | (unless (window-minibuffer-p (selected-window)) | 3017 | (unless (window-minibuffer-p (selected-window)) |
| 3010 | (message "Completing file name...")) | 3018 | (message "Completing file name...")) |
| 3011 | (comint-dynamic-complete-as-filename))) | 3019 | (comint-dynamic-complete-as-filename))) |
| @@ -3021,18 +3029,12 @@ See `comint-dynamic-complete-filename'. Returns t if successful." | |||
| 3021 | ;;(file-name-handler-alist nil) | 3029 | ;;(file-name-handler-alist nil) |
| 3022 | (minibuffer-p (window-minibuffer-p (selected-window))) | 3030 | (minibuffer-p (window-minibuffer-p (selected-window))) |
| 3023 | (success t) | 3031 | (success t) |
| 3024 | (dirsuffix (cond ((not comint-completion-addsuffix) | 3032 | (dirsuffix (cond ((not comint-completion-addsuffix) "") |
| 3025 | "") | 3033 | ((not (consp comint-completion-addsuffix)) "/") |
| 3026 | ((not (consp comint-completion-addsuffix)) | 3034 | (t (car comint-completion-addsuffix)))) |
| 3027 | "/") | 3035 | (filesuffix (cond ((not comint-completion-addsuffix) "") |
| 3028 | (t | 3036 | ((not (consp comint-completion-addsuffix)) " ") |
| 3029 | (car comint-completion-addsuffix)))) | 3037 | (t (cdr comint-completion-addsuffix)))) |
| 3030 | (filesuffix (cond ((not comint-completion-addsuffix) | ||
| 3031 | "") | ||
| 3032 | ((not (consp comint-completion-addsuffix)) | ||
| 3033 | " ") | ||
| 3034 | (t | ||
| 3035 | (cdr comint-completion-addsuffix)))) | ||
| 3036 | (filename (comint-match-partial-filename)) | 3038 | (filename (comint-match-partial-filename)) |
| 3037 | (filename-beg (if filename (match-beginning 0) (point))) | 3039 | (filename-beg (if filename (match-beginning 0) (point))) |
| 3038 | (filename-end (if filename (match-end 0) (point))) | 3040 | (filename-end (if filename (match-end 0) (point))) |
diff --git a/lisp/cus-start.el b/lisp/cus-start.el index 788731e4dbc..1188d37150a 100644 --- a/lisp/cus-start.el +++ b/lisp/cus-start.el | |||
| @@ -356,6 +356,7 @@ Leaving \"Default\" unchecked is equivalent with specifying a default of | |||
| 356 | (const alt) (const hyper) | 356 | (const alt) (const hyper) |
| 357 | (const super)) "23.1") | 357 | (const super)) "23.1") |
| 358 | (ns-antialias-text ns boolean "23.1") | 358 | (ns-antialias-text ns boolean "23.1") |
| 359 | (ns-auto-hide-menu-bar ns boolean "24.0") | ||
| 359 | ;; process.c | 360 | ;; process.c |
| 360 | (delete-exited-processes processes-basics boolean) | 361 | (delete-exited-processes processes-basics boolean) |
| 361 | ;; syntax.c | 362 | ;; syntax.c |
diff --git a/lisp/custom.el b/lisp/custom.el index d9bb4f954bc..5b5592698d8 100644 --- a/lisp/custom.el +++ b/lisp/custom.el | |||
| @@ -852,10 +852,10 @@ See `custom-known-themes' for a list of known themes." | |||
| 852 | ;; theme is later disabled. | 852 | ;; theme is later disabled. |
| 853 | (cond ((and (eq prop 'theme-value) | 853 | (cond ((and (eq prop 'theme-value) |
| 854 | (boundp symbol)) | 854 | (boundp symbol)) |
| 855 | (let ((sv (get symbol 'standard-value))) | 855 | (let ((sv (get symbol 'standard-value)) |
| 856 | (unless (and sv | 856 | (val (symbol-value symbol))) |
| 857 | (equal (eval (car sv)) (symbol-value symbol))) | 857 | (unless (and sv (equal (eval (car sv)) val)) |
| 858 | (setq old (list (list 'changed (symbol-value symbol))))))) | 858 | (setq old `((changed ,(custom-quote val))))))) |
| 859 | ((and (facep symbol) | 859 | ((and (facep symbol) |
| 860 | (not (face-attr-match-p | 860 | (not (face-attr-match-p |
| 861 | symbol | 861 | symbol |
| @@ -1084,10 +1084,10 @@ name." | |||
| 1084 | :version "24.1") | 1084 | :version "24.1") |
| 1085 | 1085 | ||
| 1086 | (defvar custom--inhibit-theme-enable nil | 1086 | (defvar custom--inhibit-theme-enable nil |
| 1087 | "If non-nil, loading a theme does not enable it. | 1087 | "Whether the custom-theme-set-* functions act immediately. |
| 1088 | This internal variable is set by `load-theme' when its NO-ENABLE | 1088 | If nil, `custom-theme-set-variables' and `custom-theme-set-faces' |
| 1089 | argument is non-nil, and it affects `custom-theme-set-variables', | 1089 | change the current values of the given variable or face. If |
| 1090 | `custom-theme-set-faces', and `provide-theme'." ) | 1090 | non-nil, they just make a record of the theme settings.") |
| 1091 | 1091 | ||
| 1092 | (defun provide-theme (theme) | 1092 | (defun provide-theme (theme) |
| 1093 | "Indicate that this file provides THEME. | 1093 | "Indicate that this file provides THEME. |
| @@ -1097,15 +1097,7 @@ property `theme-feature' (which is usually a symbol created by | |||
| 1097 | (unless (custom-theme-name-valid-p theme) | 1097 | (unless (custom-theme-name-valid-p theme) |
| 1098 | (error "Custom theme cannot be named %S" theme)) | 1098 | (error "Custom theme cannot be named %S" theme)) |
| 1099 | (custom-check-theme theme) | 1099 | (custom-check-theme theme) |
| 1100 | (provide (get theme 'theme-feature)) | 1100 | (provide (get theme 'theme-feature))) |
| 1101 | (unless custom--inhibit-theme-enable | ||
| 1102 | ;; By default, loading a theme also enables it. | ||
| 1103 | (push theme custom-enabled-themes) | ||
| 1104 | ;; `user' must always be the highest-precedence enabled theme. | ||
| 1105 | ;; Make that remain true. (This has the effect of making user | ||
| 1106 | ;; settings override the ones just loaded, too.) | ||
| 1107 | (let ((custom-enabling-themes t)) | ||
| 1108 | (enable-theme 'user)))) | ||
| 1109 | 1101 | ||
| 1110 | (defcustom custom-safe-themes '(default) | 1102 | (defcustom custom-safe-themes '(default) |
| 1111 | "List of themes that are considered safe to load. | 1103 | "List of themes that are considered safe to load. |
| @@ -1157,9 +1149,11 @@ Return t if THEME was successfully loaded, nil otherwise." | |||
| 1157 | (expand-file-name "themes/" data-directory))) | 1149 | (expand-file-name "themes/" data-directory))) |
| 1158 | (member hash custom-safe-themes) | 1150 | (member hash custom-safe-themes) |
| 1159 | (custom-theme-load-confirm hash)) | 1151 | (custom-theme-load-confirm hash)) |
| 1160 | (let ((custom--inhibit-theme-enable no-enable)) | 1152 | (let ((custom--inhibit-theme-enable t)) |
| 1161 | (eval-buffer) | 1153 | (eval-buffer)) |
| 1162 | t))))) | 1154 | (unless no-enable |
| 1155 | (enable-theme theme)) | ||
| 1156 | t)))) | ||
| 1163 | 1157 | ||
| 1164 | (defun custom-theme-load-confirm (hash) | 1158 | (defun custom-theme-load-confirm (hash) |
| 1165 | "Query the user about loading a Custom theme that may not be safe. | 1159 | "Query the user about loading a Custom theme that may not be safe. |
| @@ -1238,68 +1232,70 @@ NAME should be a symbol." | |||
| 1238 | 1232 | ||
| 1239 | ;;; Enabling and disabling loaded themes. | 1233 | ;;; Enabling and disabling loaded themes. |
| 1240 | 1234 | ||
| 1241 | (defvar custom-enabling-themes nil) | ||
| 1242 | |||
| 1243 | (defun enable-theme (theme) | 1235 | (defun enable-theme (theme) |
| 1244 | "Reenable all variable and face settings defined by THEME. | 1236 | "Reenable all variable and face settings defined by THEME. |
| 1245 | The newly enabled theme gets the highest precedence (after `user'). | 1237 | THEME should be either `user', or a theme loaded via `load-theme'. |
| 1246 | If it is already enabled, just give it highest precedence (after `user'). | 1238 | After this function completes, THEME will have the highest |
| 1247 | 1239 | precedence (after `user')." | |
| 1248 | If THEME does not specify any theme settings, this tries to load | ||
| 1249 | the theme from its theme file, by calling `load-theme'." | ||
| 1250 | (interactive (list (intern | 1240 | (interactive (list (intern |
| 1251 | (completing-read | 1241 | (completing-read |
| 1252 | "Enable custom theme: " | 1242 | "Enable custom theme: " |
| 1253 | obarray (lambda (sym) (get sym 'theme-settings)))))) | 1243 | obarray (lambda (sym) (get sym 'theme-settings)) t)))) |
| 1254 | (if (not (custom-theme-p theme)) | 1244 | (if (not (custom-theme-p theme)) |
| 1255 | (load-theme theme) | 1245 | (error "Undefined Custom theme %s" theme)) |
| 1256 | ;; This could use a bit of optimization -- cyd | 1246 | (let ((settings (get theme 'theme-settings))) |
| 1257 | (let ((settings (get theme 'theme-settings))) | 1247 | ;; Loop through theme settings, recalculating vars/faces. |
| 1258 | (dolist (s settings) | 1248 | (dolist (s settings) |
| 1259 | (let* ((prop (car s)) | 1249 | (let* ((prop (car s)) |
| 1260 | (symbol (cadr s)) | 1250 | (symbol (cadr s)) |
| 1261 | (spec-list (get symbol prop))) | 1251 | (spec-list (get symbol prop))) |
| 1262 | (put symbol prop (cons (cddr s) (assq-delete-all theme spec-list))) | 1252 | (put symbol prop (cons (cddr s) (assq-delete-all theme spec-list))) |
| 1263 | (if (eq prop 'theme-value) | 1253 | (cond |
| 1264 | (custom-theme-recalc-variable symbol) | 1254 | ((eq prop 'theme-face) |
| 1265 | (custom-theme-recalc-face symbol))))) | 1255 | (custom-theme-recalc-face symbol)) |
| 1266 | (unless (eq theme 'user) | 1256 | ((eq prop 'theme-value) |
| 1267 | (setq custom-enabled-themes | 1257 | ;; Don't change `custom-enabled-themes'; that's special. |
| 1268 | (cons theme (delq theme custom-enabled-themes))) | 1258 | (unless (eq symbol 'custom-enabled-themes) |
| 1269 | (unless custom-enabling-themes | 1259 | (custom-theme-recalc-variable symbol))))))) |
| 1270 | (enable-theme 'user))))) | 1260 | (unless (eq theme 'user) |
| 1261 | (setq custom-enabled-themes | ||
| 1262 | (cons theme (delq theme custom-enabled-themes))) | ||
| 1263 | ;; Give the `user' theme the highest priority. | ||
| 1264 | (enable-theme 'user))) | ||
| 1271 | 1265 | ||
| 1272 | (defcustom custom-enabled-themes nil | 1266 | (defcustom custom-enabled-themes nil |
| 1273 | "List of enabled Custom Themes, highest precedence first. | 1267 | "List of enabled Custom Themes, highest precedence first. |
| 1268 | This list does not include the `user' theme, which is set by | ||
| 1269 | Customize and always takes precedence over other Custom Themes. | ||
| 1274 | 1270 | ||
| 1275 | This does not include the `user' theme, which is set by Customize, | 1271 | This variable cannot be defined inside a Custom theme; there, it |
| 1276 | and always takes precedence over other Custom Themes." | 1272 | is simply ignored." |
| 1277 | :group 'customize | 1273 | :group 'customize |
| 1278 | :type '(repeat symbol) | 1274 | :type '(repeat symbol) |
| 1279 | :set-after '(custom-theme-directory custom-theme-load-path | 1275 | :set-after '(custom-theme-directory custom-theme-load-path |
| 1280 | custom-safe-themes) | 1276 | custom-safe-themes) |
| 1281 | :risky t | 1277 | :risky t |
| 1282 | :set (lambda (symbol themes) | 1278 | :set (lambda (symbol themes) |
| 1283 | ;; Avoid an infinite loop when custom-enabled-themes is | 1279 | (let (failures) |
| 1284 | ;; defined in a theme (e.g. `user'). Enabling the theme sets | 1280 | (setq themes (delq 'user (delete-dups themes))) |
| 1285 | ;; custom-enabled-themes, which enables the theme... | 1281 | ;; Disable all themes not in THEMES. |
| 1286 | (unless custom-enabling-themes | 1282 | (if (boundp symbol) |
| 1287 | (let ((custom-enabling-themes t) failures) | 1283 | (dolist (theme (symbol-value symbol)) |
| 1288 | (setq themes (delq 'user (delete-dups themes))) | 1284 | (if (not (memq theme themes)) |
| 1289 | (if (boundp symbol) | 1285 | (disable-theme theme)))) |
| 1290 | (dolist (theme (symbol-value symbol)) | 1286 | ;; Call `enable-theme' or `load-theme' on each of THEMES. |
| 1291 | (if (not (memq theme themes)) | 1287 | (dolist (theme (reverse themes)) |
| 1292 | (disable-theme theme)))) | 1288 | (condition-case nil |
| 1293 | (dolist (theme (reverse themes)) | 1289 | (if (custom-theme-p theme) |
| 1294 | (condition-case nil | 1290 | (enable-theme theme) |
| 1295 | (enable-theme theme) | 1291 | (load-theme theme)) |
| 1296 | (error (progn (push theme failures) | 1292 | (error (setq failures (cons theme failures) |
| 1297 | (setq themes (delq theme themes)))))) | 1293 | themes (delq theme themes))))) |
| 1298 | (enable-theme 'user) | 1294 | (enable-theme 'user) |
| 1299 | (custom-set-default symbol themes) | 1295 | (custom-set-default symbol themes) |
| 1300 | (if failures | 1296 | (if failures |
| 1301 | (message "Failed to enable themes: %s" | 1297 | (message "Failed to enable theme: %s" |
| 1302 | (mapconcat 'symbol-name failures " "))))))) | 1298 | (mapconcat 'symbol-name failures ", ")))))) |
| 1303 | 1299 | ||
| 1304 | (defsubst custom-theme-enabled-p (theme) | 1300 | (defsubst custom-theme-enabled-p (theme) |
| 1305 | "Return non-nil if THEME is enabled." | 1301 | "Return non-nil if THEME is enabled." |
diff --git a/lisp/emacs-lisp/derived.el b/lisp/emacs-lisp/derived.el index 425a77ee77f..1db98ac39c8 100644 --- a/lisp/emacs-lisp/derived.el +++ b/lisp/emacs-lisp/derived.el | |||
| @@ -201,7 +201,7 @@ No problems result if this variable is not bound. | |||
| 201 | name)))) | 201 | name)))) |
| 202 | (unless (boundp ',map) | 202 | (unless (boundp ',map) |
| 203 | (put ',map 'definition-name ',child)) | 203 | (put ',map 'definition-name ',child)) |
| 204 | (defvar ,map (make-sparse-keymap)) | 204 | (with-no-warnings (defvar ,map (make-sparse-keymap))) |
| 205 | (unless (get ',map 'variable-documentation) | 205 | (unless (get ',map 'variable-documentation) |
| 206 | (put ',map 'variable-documentation | 206 | (put ',map 'variable-documentation |
| 207 | (purecopy ,(format "Keymap for `%s'." child)))) | 207 | (purecopy ,(format "Keymap for `%s'." child)))) |
diff --git a/lisp/eshell/esh-opt.el b/lisp/eshell/esh-opt.el index a9e8f11c39a..91d3cac198a 100644 --- a/lisp/eshell/esh-opt.el +++ b/lisp/eshell/esh-opt.el | |||
| @@ -102,10 +102,9 @@ interned variable `args' (created using a `let' form)." | |||
| 102 | macro-args | 102 | macro-args |
| 103 | (list 'eshell-stringify-list | 103 | (list 'eshell-stringify-list |
| 104 | (list 'eshell-flatten-list macro-args))))) | 104 | (list 'eshell-flatten-list macro-args))))) |
| 105 | (let ,(append (mapcar (lambda (opt) | 105 | (let ,(append (delq nil (mapcar (lambda (opt) |
| 106 | (or (and (listp opt) (nth 3 opt)) | 106 | (and (listp opt) (nth 3 opt))) |
| 107 | 'eshell-option-stub)) | 107 | (cadr options))) |
| 108 | (cadr options)) | ||
| 109 | '(usage-msg last-value ext-command args)) | 108 | '(usage-msg last-value ext-command args)) |
| 110 | (eshell-do-opt ,name ,options (quote ,body-forms))))) | 109 | (eshell-do-opt ,name ,options (quote ,body-forms))))) |
| 111 | 110 | ||
diff --git a/lisp/gnus/ChangeLog b/lisp/gnus/ChangeLog index 7eca03bd93b..51169f7b9df 100644 --- a/lisp/gnus/ChangeLog +++ b/lisp/gnus/ChangeLog | |||
| @@ -1,3 +1,137 @@ | |||
| 1 | 2011-03-30 Chong Yidong <cyd@stupidchicken.com> | ||
| 2 | |||
| 3 | * proto-stream.el (open-protocol-stream): Bring back `network' type. | ||
| 4 | Make this the default type. | ||
| 5 | (proto-stream-open-plain): Rename from proto-stream-open-default. | ||
| 6 | (open-protocol-stream, proto-stream-open-starttls) | ||
| 7 | (proto-stream-open-tls, proto-stream-open-shell): Replace `default' | ||
| 8 | with `plain'. | ||
| 9 | |||
| 10 | * nnimap.el (nnimap-stream, nnimap-open-connection-1): Accept `network' | ||
| 11 | value. | ||
| 12 | |||
| 13 | * nntp.el (nntp-open-connection-function): Document the fact that some | ||
| 14 | values are not functions but are instead handled specially. Recognize | ||
| 15 | nntp-open-plain-stream value. | ||
| 16 | (nntp-open-connection): Recognize that value. | ||
| 17 | |||
| 18 | 2011-03-29 Lars Magne Ingebrigtsen <larsi@gnus.org> | ||
| 19 | |||
| 20 | * gssapi.el (open-gssapi-stream): Remove the last mentions of the IMAP | ||
| 21 | stuff. | ||
| 22 | |||
| 23 | * gnus-score.el (gnus-score-string): Fix calling convention of | ||
| 24 | `gnus-simplify-buffer-fuzzy' after last patches. | ||
| 25 | |||
| 26 | * gnus-sum.el (gnus-update-marks): Don't send any marks updates to the | ||
| 27 | server for articles we didn't get any headers for. This is a sanity | ||
| 28 | check. | ||
| 29 | |||
| 30 | 2011-03-29 Michael Welsh Duggan <md5i@md5i.com> | ||
| 31 | |||
| 32 | * nnimap.el (nnimap-open-connection-1): Is the login responds with a | ||
| 33 | new CAPABILITY, use it. | ||
| 34 | |||
| 35 | 2011-03-29 Lars Magne Ingebrigtsen <larsi@gnus.org> | ||
| 36 | |||
| 37 | * gnus-agent.el (gnus-agent-fetch-headers): Don't message if we're not | ||
| 38 | downloading anything. | ||
| 39 | |||
| 40 | * gnus.el (gnus-splash-svg-color-symbols): Removed superfluous `and'. | ||
| 41 | |||
| 42 | 2011-03-29 Adam Sjøgren <asjo@koldfront.dk> | ||
| 43 | |||
| 44 | * gnus.el (gnus-group-startup-message): Prefer svg file and replace | ||
| 45 | colors. | ||
| 46 | (gnus-splash-svg-color-symbols): New function. | ||
| 47 | |||
| 48 | 2011-03-29 Lars Magne Ingebrigtsen <larsi@gnus.org> | ||
| 49 | |||
| 50 | * gnus-sum.el (gnus-simplify-buffer-fuzzy): Take the regexp explicitly | ||
| 51 | instead of using the global gnus-simplify-subject-fuzzy-regexp. | ||
| 52 | (gnus-simplify-subject-fuzzy): Use the local | ||
| 53 | gnus-simplify-subject-fuzzy-regex instead of the global one. This | ||
| 54 | makes using this variable in group parameters work. | ||
| 55 | |||
| 56 | 2011-03-29 Teodor Zlatanov <tzz@lifelogs.com> | ||
| 57 | |||
| 58 | * gnus-registry.el (gnus-registry-unfollowed-groups): Add | ||
| 59 | "archive:sent" to the unfollowed group regex (for the recent Gnus | ||
| 60 | archive:sent-YYYY-MM-DD groups). | ||
| 61 | (gnus-registry-split-fancy-with-parent): Bail out early in sender | ||
| 62 | tracking if there are more than `gnus-registry-max-track-groups' | ||
| 63 | matches. | ||
| 64 | |||
| 65 | 2011-03-29 Stefan Monnier <monnier@iro.umontreal.ca> | ||
| 66 | |||
| 67 | * message.el (message--yank-original-internal): New function to do the | ||
| 68 | insertion cleanly inside eval in `message-yank-original'. | ||
| 69 | (message-yank-original): Use it. | ||
| 70 | |||
| 71 | 2011-03-29 Julien Danjou <julien@danjou.info> | ||
| 72 | |||
| 73 | * mm-view.el (mm-display-inline-fontify): Use `set-normal-mode' with | ||
| 74 | local variables disabled rather than `normal-mode'. | ||
| 75 | |||
| 76 | 2011-03-26 Chong Yidong <cyd@stupidchicken.com> | ||
| 77 | |||
| 78 | * proto-stream.el: Changes preparatory to merging open-protocol-stream | ||
| 79 | with open-network-stream. | ||
| 80 | (proto-stream-always-use-starttls): Option removed. | ||
| 81 | (open-protocol-stream): Return a process object by default. Provide a | ||
| 82 | new parameter :return-list specifying a list-type return value, which | ||
| 83 | now has the form (PROP . PLIST) instead of a fixed-length list. Change | ||
| 84 | :type `network' to `try-starttls', and `network-only' to `default'. | ||
| 85 | Make `default' the default, for compatibility with open-network-stream. | ||
| 86 | Handle the no-parameter case exactly as open-network-stream, with no | ||
| 87 | additional stream processing. Search plists using plist-get. | ||
| 88 | Explicitly add :end-of-commend parameter if it is missing. | ||
| 89 | (proto-stream-open-default): Renamed from | ||
| 90 | proto-stream-open-network-only. Return 'default as the type. | ||
| 91 | (proto-stream-open-starttls): Rename from proto-stream-open-network. | ||
| 92 | Use plist-get. Don't return `tls' as the type if STARTTLS negotiation | ||
| 93 | failed. Always return a list with a (possibly dead) process as the | ||
| 94 | first element, for compatibility with open-network-stream. | ||
| 95 | (proto-stream-open-tls): Use plist-get. Always return a list. | ||
| 96 | (proto-stream-open-shell): Return `default' as connection type. | ||
| 97 | (proto-stream-capability-open): Use plist-get. | ||
| 98 | (proto-stream-eoc): Function deleted. | ||
| 99 | |||
| 100 | * nnimap.el (nnimap-stream, nnimap-open-connection) | ||
| 101 | (nnimap-open-connection-1): Handle renaming of :type parameter for | ||
| 102 | open-protocol-stream. | ||
| 103 | (nnimap-open-connection-1): Pass a :return-list parameter | ||
| 104 | open-protocol-stream to obtain a list return value. Parse this list | ||
| 105 | using plist-get. | ||
| 106 | |||
| 107 | * nntp.el (nntp-open-connection): Handle renaming of :type parameter | ||
| 108 | for open-protocol-stream. Accept open-protocol-stream return value | ||
| 109 | that is a subprocess object instead of a list. Handle the case of a | ||
| 110 | dead returned process. | ||
| 111 | |||
| 112 | 2011-03-25 Teodor Zlatanov <tzz@lifelogs.com> | ||
| 113 | |||
| 114 | * mm-util.el (mm-handle-filename): Move to mm-decode.el (bug#8330). | ||
| 115 | |||
| 116 | * mm-decode.el (mm-handle-filename): Move from mm-util.el (bug#8330). | ||
| 117 | |||
| 118 | 2011-03-21 Julien Danjou <julien@danjou.info> | ||
| 119 | |||
| 120 | * mm-view.el (mm-display-inline-fontify): Make mode optional, and call | ||
| 121 | normal-mode if not set. Set temp buffer unmodified to avoid kill-buffer | ||
| 122 | query. | ||
| 123 | (mm-inline-text): Render normal text with fontification whenever | ||
| 124 | possible. | ||
| 125 | |||
| 126 | * gnus-sum.el (gnus-summary-save-parts-1): | ||
| 127 | * gnus-art.el (gnus-article-browse-html-save-cid-content) | ||
| 128 | (gnus-article-browse-html-parts, gnus-mime-delete-part) | ||
| 129 | (gnus-mime-copy-part, gnus-mime-inline-part, gnus-insert-mime-button): | ||
| 130 | Use `mm-handle-filename'. | ||
| 131 | |||
| 132 | * mm-util.el (mm-handle-filename): New function, return the filename of | ||
| 133 | an handle. | ||
| 134 | |||
| 1 | 2011-03-18 Julien Danjou <julien@danjou.info> | 135 | 2011-03-18 Julien Danjou <julien@danjou.info> |
| 2 | 136 | ||
| 3 | * gnus-util.el (gnus-buffer-live-p): Simplify gnus-buffer-live-p. | 137 | * gnus-util.el (gnus-buffer-live-p): Simplify gnus-buffer-live-p. |
diff --git a/lisp/gnus/gnus-agent.el b/lisp/gnus/gnus-agent.el index 989488c0995..52fbe9da11f 100644 --- a/lisp/gnus/gnus-agent.el +++ b/lisp/gnus/gnus-agent.el | |||
| @@ -1925,9 +1925,10 @@ article numbers will be returned." | |||
| 1925 | (setq articles (gnus-list-range-intersection | 1925 | (setq articles (gnus-list-range-intersection |
| 1926 | articles (list (cons low high))))))) | 1926 | articles (list (cons low high))))))) |
| 1927 | 1927 | ||
| 1928 | (gnus-message | 1928 | (when articles |
| 1929 | 10 "gnus-agent-fetch-headers: undownloaded articles are '%s'" | 1929 | (gnus-message |
| 1930 | (gnus-compress-sequence articles t)) | 1930 | 10 "gnus-agent-fetch-headers: undownloaded articles are '%s'" |
| 1931 | (gnus-compress-sequence articles t))) | ||
| 1931 | 1932 | ||
| 1932 | (with-current-buffer nntp-server-buffer | 1933 | (with-current-buffer nntp-server-buffer |
| 1933 | (if articles | 1934 | (if articles |
diff --git a/lisp/gnus/gnus-art.el b/lisp/gnus/gnus-art.el index 7c7e0531926..97677988f0a 100644 --- a/lisp/gnus/gnus-art.el +++ b/lisp/gnus/gnus-art.el | |||
| @@ -2811,14 +2811,11 @@ Return file name." | |||
| 2811 | ((equal (concat "<" cid ">") (mm-handle-id handle)) | 2811 | ((equal (concat "<" cid ">") (mm-handle-id handle)) |
| 2812 | (setq file | 2812 | (setq file |
| 2813 | (expand-file-name | 2813 | (expand-file-name |
| 2814 | (or (mail-content-type-get | 2814 | (or (mm-handle-filename handle) |
| 2815 | (mm-handle-disposition handle) 'filename) | 2815 | (concat |
| 2816 | (mail-content-type-get | 2816 | (make-temp-name "cid") |
| 2817 | (setq type (mm-handle-type handle)) 'name) | 2817 | (car (rassoc (car (mm-handle-type handle)) mailcap-mime-extensions)))) |
| 2818 | (concat | 2818 | directory)) |
| 2819 | (make-temp-name "cid") | ||
| 2820 | (car (rassoc (car type) mailcap-mime-extensions)))) | ||
| 2821 | directory)) | ||
| 2822 | (mm-save-part-to-file handle file) | 2819 | (mm-save-part-to-file handle file) |
| 2823 | (throw 'found file)))))))) | 2820 | (throw 'found file)))))))) |
| 2824 | 2821 | ||
| @@ -2835,10 +2832,7 @@ message header will be added to the bodies of the \"text/html\" parts." | |||
| 2835 | ((or (equal (car (setq type (mm-handle-type handle))) "text/html") | 2832 | ((or (equal (car (setq type (mm-handle-type handle))) "text/html") |
| 2836 | (and (equal (car type) "message/external-body") | 2833 | (and (equal (car type) "message/external-body") |
| 2837 | (or header | 2834 | (or header |
| 2838 | (setq file (or (mail-content-type-get type 'name) | 2835 | (setq file (mm-handle-filename handle))) |
| 2839 | (mail-content-type-get | ||
| 2840 | (mm-handle-disposition handle) | ||
| 2841 | 'filename)))) | ||
| 2842 | (or (mm-handle-cache handle) | 2836 | (or (mm-handle-cache handle) |
| 2843 | (condition-case code | 2837 | (condition-case code |
| 2844 | (progn (mm-extern-cache-contents handle) t) | 2838 | (progn (mm-extern-cache-contents handle) t) |
| @@ -5043,14 +5037,11 @@ Deleting parts may malfunction or destroy the article; continue? ")) | |||
| 5043 | (let* ((data (get-text-property (point) 'gnus-data)) | 5037 | (let* ((data (get-text-property (point) 'gnus-data)) |
| 5044 | (id (get-text-property (point) 'gnus-part)) | 5038 | (id (get-text-property (point) 'gnus-part)) |
| 5045 | (handles gnus-article-mime-handles) | 5039 | (handles gnus-article-mime-handles) |
| 5046 | (none "(none)") | ||
| 5047 | (description | 5040 | (description |
| 5048 | (let ((desc (mm-handle-description data))) | 5041 | (let ((desc (mm-handle-description data))) |
| 5049 | (when desc | 5042 | (when desc |
| 5050 | (mail-decode-encoded-word-string desc)))) | 5043 | (mail-decode-encoded-word-string desc)))) |
| 5051 | (filename | 5044 | (filename (or (mm-handle-filename (mm-handle-disposition data)) "(none)")) |
| 5052 | (or (mail-content-type-get (mm-handle-disposition data) 'filename) | ||
| 5053 | none)) | ||
| 5054 | (type (mm-handle-media-type data))) | 5045 | (type (mm-handle-media-type data))) |
| 5055 | (unless data | 5046 | (unless data |
| 5056 | (error "No MIME part under point")) | 5047 | (error "No MIME part under point")) |
| @@ -5168,10 +5159,7 @@ are decompressed." | |||
| 5168 | (unless handle | 5159 | (unless handle |
| 5169 | (setq handle (get-text-property (point) 'gnus-data))) | 5160 | (setq handle (get-text-property (point) 'gnus-data))) |
| 5170 | (when handle | 5161 | (when handle |
| 5171 | (let ((filename (or (mail-content-type-get (mm-handle-type handle) | 5162 | (let ((filename (mm-handle-filename handle)) |
| 5172 | 'name) | ||
| 5173 | (mail-content-type-get (mm-handle-disposition handle) | ||
| 5174 | 'filename))) | ||
| 5175 | contents dont-decode charset coding-system) | 5163 | contents dont-decode charset coding-system) |
| 5176 | (mm-with-unibyte-buffer | 5164 | (mm-with-unibyte-buffer |
| 5177 | (mm-insert-part handle) | 5165 | (mm-insert-part handle) |
| @@ -5261,12 +5249,7 @@ Compressed files like .gz and .bz2 are decompressed." | |||
| 5261 | (mm-with-unibyte-buffer | 5249 | (mm-with-unibyte-buffer |
| 5262 | (mm-insert-part handle) | 5250 | (mm-insert-part handle) |
| 5263 | (setq contents | 5251 | (setq contents |
| 5264 | (or (mm-decompress-buffer | 5252 | (or (mm-decompress-buffer (mm-handle-filename handle) nil t) |
| 5265 | (or (mail-content-type-get (mm-handle-type handle) | ||
| 5266 | 'name) | ||
| 5267 | (mail-content-type-get (mm-handle-disposition handle) | ||
| 5268 | 'filename)) | ||
| 5269 | nil t) | ||
| 5270 | (buffer-string)))) | 5253 | (buffer-string)))) |
| 5271 | (cond | 5254 | (cond |
| 5272 | ((not arg) | 5255 | ((not arg) |
| @@ -5671,8 +5654,7 @@ all parts." | |||
| 5671 | 5654 | ||
| 5672 | (defun gnus-insert-mime-button (handle gnus-tmp-id &optional displayed) | 5655 | (defun gnus-insert-mime-button (handle gnus-tmp-id &optional displayed) |
| 5673 | (let ((gnus-tmp-name | 5656 | (let ((gnus-tmp-name |
| 5674 | (or (mail-content-type-get (mm-handle-type handle) 'name) | 5657 | (or (mm-handle-filename handle) |
| 5675 | (mail-content-type-get (mm-handle-disposition handle) 'filename) | ||
| 5676 | (mail-content-type-get (mm-handle-type handle) 'url) | 5658 | (mail-content-type-get (mm-handle-type handle) 'url) |
| 5677 | "")) | 5659 | "")) |
| 5678 | (gnus-tmp-type (mm-handle-media-type handle)) | 5660 | (gnus-tmp-type (mm-handle-media-type handle)) |
diff --git a/lisp/gnus/gnus-registry.el b/lisp/gnus/gnus-registry.el index cef173ce1ec..db3cc06e9aa 100644 --- a/lisp/gnus/gnus-registry.el +++ b/lisp/gnus/gnus-registry.el | |||
| @@ -124,7 +124,7 @@ display." | |||
| 124 | :type 'symbol) | 124 | :type 'symbol) |
| 125 | 125 | ||
| 126 | (defcustom gnus-registry-unfollowed-groups | 126 | (defcustom gnus-registry-unfollowed-groups |
| 127 | '("delayed$" "drafts$" "queue$" "INBOX$" "^nnmairix:") | 127 | '("delayed$" "drafts$" "queue$" "INBOX$" "^nnmairix:" "archive") |
| 128 | "List of groups that gnus-registry-split-fancy-with-parent won't return. | 128 | "List of groups that gnus-registry-split-fancy-with-parent won't return. |
| 129 | The group names are matched, they don't have to be fully | 129 | The group names are matched, they don't have to be fully |
| 130 | qualified. This parameter tells the Registry 'never split a | 130 | qualified. This parameter tells the Registry 'never split a |
| @@ -541,24 +541,26 @@ See the Info node `(gnus)Fancy Mail Splitting' for more details." | |||
| 541 | user-mail-address))) | 541 | user-mail-address))) |
| 542 | (maphash | 542 | (maphash |
| 543 | (lambda (key value) | 543 | (lambda (key value) |
| 544 | (let ((this-sender (cdr | 544 | ;; don't use more than gnus-registry-max-track-groups |
| 545 | (gnus-registry-fetch-extra key 'sender))) | 545 | (when (< (length found-full) gnus-registry-max-track-groups) |
| 546 | matches) | 546 | (let ((this-sender |
| 547 | (when (and this-sender | 547 | (cdr (gnus-registry-fetch-extra key 'sender))) |
| 548 | (equal sender this-sender)) | 548 | matches) |
| 549 | (let ((groups (gnus-registry-fetch-groups | 549 | (when (and this-sender |
| 550 | key | 550 | (equal sender this-sender)) |
| 551 | gnus-registry-max-track-groups))) | 551 | (let ((groups (gnus-registry-fetch-groups |
| 552 | (dolist (group groups) | 552 | key |
| 553 | (when (and group (gnus-registry-follow-group-p group)) | 553 | gnus-registry-max-track-groups))) |
| 554 | (push group found-full) | 554 | (dolist (group groups) |
| 555 | (setq found (append (list group) (delete group found)))))) | 555 | (when (and group (gnus-registry-follow-group-p group)) |
| 556 | (push key matches) | 556 | (push group found-full) |
| 557 | (gnus-message | 557 | (setq found (append (list group) (delete group found)))))) |
| 558 | ;; raise level of messaging if gnus-registry-track-extra | 558 | (push key matches) |
| 559 | (if gnus-registry-track-extra 7 9) | 559 | (gnus-message |
| 560 | "%s (extra tracking) traced sender %s to groups %s (keys %s)" | 560 | ;; raise level of messaging if gnus-registry-track-extra |
| 561 | log-agent sender found matches)))) | 561 | (if gnus-registry-track-extra 7 9) |
| 562 | "%s (extra tracking) traced sender %s to groups %s (keys %s)" | ||
| 563 | log-agent sender found matches))))) | ||
| 562 | gnus-registry-hashtb) | 564 | gnus-registry-hashtb) |
| 563 | ;; filter the found groups and return them | 565 | ;; filter the found groups and return them |
| 564 | ;; the found groups are NOT the full groups | 566 | ;; the found groups are NOT the full groups |
diff --git a/lisp/gnus/gnus-score.el b/lisp/gnus/gnus-score.el index e376b7a7b6e..9bbfbfb057e 100644 --- a/lisp/gnus/gnus-score.el +++ b/lisp/gnus/gnus-score.el | |||
| @@ -2151,7 +2151,7 @@ score in `gnus-newsgroup-scored' by SCORE." | |||
| 2151 | ;; Find fuzzy matches. | 2151 | ;; Find fuzzy matches. |
| 2152 | (when fuzzies | 2152 | (when fuzzies |
| 2153 | ;; Simplify the entire buffer for easy matching. | 2153 | ;; Simplify the entire buffer for easy matching. |
| 2154 | (gnus-simplify-buffer-fuzzy) | 2154 | (gnus-simplify-buffer-fuzzy gnus-simplify-subject-fuzzy-regexp) |
| 2155 | (while (setq kill (cadaar fuzzies)) | 2155 | (while (setq kill (cadaar fuzzies)) |
| 2156 | (let* ((match (nth 0 kill)) | 2156 | (let* ((match (nth 0 kill)) |
| 2157 | (type (nth 3 kill)) | 2157 | (type (nth 3 kill)) |
diff --git a/lisp/gnus/gnus-sum.el b/lisp/gnus/gnus-sum.el index 29a98b7d11d..91dc6fb9595 100644 --- a/lisp/gnus/gnus-sum.el +++ b/lisp/gnus/gnus-sum.el | |||
| @@ -1734,7 +1734,7 @@ If RE-ONLY is non-nil, strip leading `Re:'s only." | |||
| 1734 | (while (re-search-forward regexp nil t) | 1734 | (while (re-search-forward regexp nil t) |
| 1735 | (replace-match (or newtext "")))) | 1735 | (replace-match (or newtext "")))) |
| 1736 | 1736 | ||
| 1737 | (defun gnus-simplify-buffer-fuzzy () | 1737 | (defun gnus-simplify-buffer-fuzzy (regexp) |
| 1738 | "Simplify string in the buffer fuzzily. | 1738 | "Simplify string in the buffer fuzzily. |
| 1739 | The string in the accessible portion of the current buffer is simplified. | 1739 | The string in the accessible portion of the current buffer is simplified. |
| 1740 | It is assumed to be a single-line subject. | 1740 | It is assumed to be a single-line subject. |
| @@ -1748,11 +1748,10 @@ matter is removed. Additional things can be deleted by setting | |||
| 1748 | (while (not (eq modified-tick (buffer-modified-tick))) | 1748 | (while (not (eq modified-tick (buffer-modified-tick))) |
| 1749 | (setq modified-tick (buffer-modified-tick)) | 1749 | (setq modified-tick (buffer-modified-tick)) |
| 1750 | (cond | 1750 | (cond |
| 1751 | ((listp gnus-simplify-subject-fuzzy-regexp) | 1751 | ((listp regexp) |
| 1752 | (mapc 'gnus-simplify-buffer-fuzzy-step | 1752 | (mapc 'gnus-simplify-buffer-fuzzy-step regexp)) |
| 1753 | gnus-simplify-subject-fuzzy-regexp)) | 1753 | (regexp |
| 1754 | (gnus-simplify-subject-fuzzy-regexp | 1754 | (gnus-simplify-buffer-fuzzy-step regexp))) |
| 1755 | (gnus-simplify-buffer-fuzzy-step gnus-simplify-subject-fuzzy-regexp))) | ||
| 1756 | (gnus-simplify-buffer-fuzzy-step "^ *\\[[-+?*!][-+?*!]\\] *") | 1755 | (gnus-simplify-buffer-fuzzy-step "^ *\\[[-+?*!][-+?*!]\\] *") |
| 1757 | (gnus-simplify-buffer-fuzzy-step | 1756 | (gnus-simplify-buffer-fuzzy-step |
| 1758 | "^ *\\(re\\|fw\\|fwd\\)[[{(^0-9]*[])}]?[:;] *") | 1757 | "^ *\\(re\\|fw\\|fwd\\)[[{(^0-9]*[])}]?[:;] *") |
| @@ -1767,15 +1766,16 @@ matter is removed. Additional things can be deleted by setting | |||
| 1767 | "Simplify a subject string fuzzily. | 1766 | "Simplify a subject string fuzzily. |
| 1768 | See `gnus-simplify-buffer-fuzzy' for details." | 1767 | See `gnus-simplify-buffer-fuzzy' for details." |
| 1769 | (save-excursion | 1768 | (save-excursion |
| 1770 | (gnus-set-work-buffer) | 1769 | (let ((regexp gnus-simplify-subject-fuzzy-regexp)) |
| 1771 | (let ((case-fold-search t)) | 1770 | (gnus-set-work-buffer) |
| 1772 | ;; Remove uninteresting prefixes. | 1771 | (let ((case-fold-search t)) |
| 1773 | (when (and gnus-simplify-ignored-prefixes | 1772 | ;; Remove uninteresting prefixes. |
| 1774 | (string-match gnus-simplify-ignored-prefixes subject)) | 1773 | (when (and gnus-simplify-ignored-prefixes |
| 1775 | (setq subject (substring subject (match-end 0)))) | 1774 | (string-match gnus-simplify-ignored-prefixes subject)) |
| 1776 | (insert subject) | 1775 | (setq subject (substring subject (match-end 0)))) |
| 1777 | (inline (gnus-simplify-buffer-fuzzy)) | 1776 | (insert subject) |
| 1778 | (buffer-string)))) | 1777 | (inline (gnus-simplify-buffer-fuzzy regexp)) |
| 1778 | (buffer-string))))) | ||
| 1779 | 1779 | ||
| 1780 | (defsubst gnus-simplify-subject-fully (subject) | 1780 | (defsubst gnus-simplify-subject-fully (subject) |
| 1781 | "Simplify a subject string according to `gnus-summary-gather-subject-limit'." | 1781 | "Simplify a subject string according to `gnus-summary-gather-subject-limit'." |
| @@ -6068,14 +6068,23 @@ If SELECT-ARTICLES, only select those articles from GROUP." | |||
| 6068 | 'request-set-mark gnus-newsgroup-name) | 6068 | 'request-set-mark gnus-newsgroup-name) |
| 6069 | (not (gnus-article-unpropagatable-p (cdr type)))) | 6069 | (not (gnus-article-unpropagatable-p (cdr type)))) |
| 6070 | (let* ((old (cdr (assq (cdr type) (gnus-info-marks info)))) | 6070 | (let* ((old (cdr (assq (cdr type) (gnus-info-marks info)))) |
| 6071 | (del (gnus-remove-from-range (gnus-copy-sequence old) list)) | 6071 | ;; Don't do anything about marks for articles we |
| 6072 | (add (gnus-remove-from-range | 6072 | ;; didn't actually get any headers for. |
| 6073 | (gnus-copy-sequence list) old))) | 6073 | (existing (gnus-compress-sequence gnus-newsgroup-articles)) |
| 6074 | (del | ||
| 6075 | (gnus-sorted-range-intersection | ||
| 6076 | existing | ||
| 6077 | (gnus-remove-from-range (gnus-copy-sequence old) list))) | ||
| 6078 | (add | ||
| 6079 | (gnus-sorted-range-intersection | ||
| 6080 | existing | ||
| 6081 | (gnus-remove-from-range | ||
| 6082 | (gnus-copy-sequence list) old)))) | ||
| 6074 | (when add | 6083 | (when add |
| 6075 | (push (list add 'add (list (cdr type))) delta-marks)) | 6084 | (push (list add 'add (list (cdr type))) delta-marks)) |
| 6076 | (when del | 6085 | (when del |
| 6077 | ;; Don't delete marks from outside the active range. This | 6086 | ;; Don't delete marks from outside the active range. |
| 6078 | ;; shouldn't happen, but is a sanity check. | 6087 | ;; This shouldn't happen, but is a sanity check. |
| 6079 | (setq del (gnus-sorted-range-intersection | 6088 | (setq del (gnus-sorted-range-intersection |
| 6080 | (gnus-active gnus-newsgroup-name) del)) | 6089 | (gnus-active gnus-newsgroup-name) del)) |
| 6081 | (push (list del 'del (list (cdr type))) delta-marks)))) | 6090 | (push (list del 'del (list (cdr type))) delta-marks)))) |
| @@ -12142,10 +12151,7 @@ If REVERSE, save parts that do not match TYPE." | |||
| 12142 | mm-file-name-rewrite-functions | 12151 | mm-file-name-rewrite-functions |
| 12143 | (file-name-nondirectory | 12152 | (file-name-nondirectory |
| 12144 | (or | 12153 | (or |
| 12145 | (mail-content-type-get | 12154 | (mm-handle-filename handle) |
| 12146 | (mm-handle-disposition handle) 'filename) | ||
| 12147 | (mail-content-type-get | ||
| 12148 | (mm-handle-type handle) 'name) | ||
| 12149 | (format "%s.%d.%d" gnus-newsgroup-name | 12155 | (format "%s.%d.%d" gnus-newsgroup-name |
| 12150 | (cdr gnus-article-current) | 12156 | (cdr gnus-article-current) |
| 12151 | gnus-summary-save-parts-counter)))) | 12157 | gnus-summary-save-parts-counter)))) |
diff --git a/lisp/gnus/gnus.el b/lisp/gnus/gnus.el index 57d085a0380..d4ecd89db92 100644 --- a/lisp/gnus/gnus.el +++ b/lisp/gnus/gnus.el | |||
| @@ -1043,12 +1043,15 @@ be set in `.emacs' instead." | |||
| 1043 | ((boundp 'image-load-path) | 1043 | ((boundp 'image-load-path) |
| 1044 | (symbol-value 'image-load-path)) | 1044 | (symbol-value 'image-load-path)) |
| 1045 | (t load-path))) | 1045 | (t load-path))) |
| 1046 | (image (find-image | 1046 | (image (gnus-splash-svg-color-symbols (find-image |
| 1047 | `((:type xpm :file "gnus.xpm" | 1047 | `((:type svg :file "gnus.svg" |
| 1048 | :color-symbols | ||
| 1049 | (("#bf9900" . ,(car gnus-logo-colors)) | ||
| 1050 | ("#ffcc00" . ,(cadr gnus-logo-colors)))) | ||
| 1051 | (:type xpm :file "gnus.xpm" | ||
| 1048 | :color-symbols | 1052 | :color-symbols |
| 1049 | (("thing" . ,(car gnus-logo-colors)) | 1053 | (("thing" . ,(car gnus-logo-colors)) |
| 1050 | ("shadow" . ,(cadr gnus-logo-colors)))) | 1054 | ("shadow" . ,(cadr gnus-logo-colors)))) |
| 1051 | (:type svg :file "gnus.svg") | ||
| 1052 | (:type png :file "gnus.png") | 1055 | (:type png :file "gnus.png") |
| 1053 | (:type pbm :file "gnus.pbm" | 1056 | (:type pbm :file "gnus.pbm" |
| 1054 | ;; Account for the pbm's background. | 1057 | ;; Account for the pbm's background. |
| @@ -1057,7 +1060,7 @@ be set in `.emacs' instead." | |||
| 1057 | (:type xbm :file "gnus.xbm" | 1060 | (:type xbm :file "gnus.xbm" |
| 1058 | ;; Account for the xbm's background. | 1061 | ;; Account for the xbm's background. |
| 1059 | :background ,(face-foreground 'gnus-splash) | 1062 | :background ,(face-foreground 'gnus-splash) |
| 1060 | :foreground ,(face-background 'default)))))) | 1063 | :foreground ,(face-background 'default))))))) |
| 1061 | (when image | 1064 | (when image |
| 1062 | (let ((size (image-size image))) | 1065 | (let ((size (image-size image))) |
| 1063 | (insert-char ?\n (max 0 (round (- (window-height) | 1066 | (insert-char ?\n (max 0 (round (- (window-height) |
| @@ -1103,6 +1106,20 @@ be set in `.emacs' instead." | |||
| 1103 | (setq mode-line-buffer-identification (concat " " gnus-version)) | 1106 | (setq mode-line-buffer-identification (concat " " gnus-version)) |
| 1104 | (set-buffer-modified-p t))) | 1107 | (set-buffer-modified-p t))) |
| 1105 | 1108 | ||
| 1109 | (defun gnus-splash-svg-color-symbols (list) | ||
| 1110 | "Do color-symbol search-and-replace in svg file" | ||
| 1111 | (let ((type (plist-get (cdr list) :type)) | ||
| 1112 | (file (plist-get (cdr list) :file)) | ||
| 1113 | (color-symbols (plist-get (cdr list) :color-symbols))) | ||
| 1114 | (if (string= type "svg") | ||
| 1115 | (let ((data (with-temp-buffer (insert-file file) (buffer-string)))) | ||
| 1116 | (mapc (lambda (rule) | ||
| 1117 | (setq data (replace-regexp-in-string | ||
| 1118 | (concat "fill:" (car rule)) | ||
| 1119 | (concat "fill:" (cdr rule)) data))) color-symbols) | ||
| 1120 | (cons (car list) (list :type type :data data))) | ||
| 1121 | list))) | ||
| 1122 | |||
| 1106 | (eval-when (load) | 1123 | (eval-when (load) |
| 1107 | (let ((command (format "%s" this-command))) | 1124 | (let ((command (format "%s" this-command))) |
| 1108 | (when (string-match "gnus" command) | 1125 | (when (string-match "gnus" command) |
diff --git a/lisp/gnus/gssapi.el b/lisp/gnus/gssapi.el index 3765fb84ee8..e96c23b14ac 100644 --- a/lisp/gnus/gssapi.el +++ b/lisp/gnus/gssapi.el | |||
| @@ -33,14 +33,14 @@ | |||
| 33 | "--authentication-id %l") | 33 | "--authentication-id %l") |
| 34 | "imtest -m gssapi -u %l -p %p %s") | 34 | "imtest -m gssapi -u %l -p %p %s") |
| 35 | "List of strings containing commands for GSSAPI (krb5) authentication. | 35 | "List of strings containing commands for GSSAPI (krb5) authentication. |
| 36 | %s is replaced with server hostname, %p with port to connect to, and | 36 | %s is replaced with server hostname, %p with port to connect to, |
| 37 | %l with the value of `imap-default-user'. The program should accept | 37 | and %l with the user name. The program should accept commands on |
| 38 | IMAP commands on stdin and return responses to stdout. Each entry in | 38 | stdin and return responses to stdout. Each entry in the list is |
| 39 | the list is tried until a successful connection is made." | 39 | tried until a successful connection is made." |
| 40 | :group 'network | 40 | :group 'network |
| 41 | :type '(repeat string)) | 41 | :type '(repeat string)) |
| 42 | 42 | ||
| 43 | (defun open-gssapi-stream (name buffer server port) | 43 | (defun open-gssapi-stream (name buffer server port user) |
| 44 | (let ((cmds gssapi-program) | 44 | (let ((cmds gssapi-program) |
| 45 | cmd done) | 45 | cmd done) |
| 46 | (with-current-buffer buffer | 46 | (with-current-buffer buffer |
| @@ -57,7 +57,7 @@ the list is tried until a successful connection is made." | |||
| 57 | (format-spec-make | 57 | (format-spec-make |
| 58 | ?s server | 58 | ?s server |
| 59 | ?p (number-to-string port) | 59 | ?p (number-to-string port) |
| 60 | ?l imap-default-user)))) | 60 | ?l user)))) |
| 61 | response) | 61 | response) |
| 62 | (when process | 62 | (when process |
| 63 | (while (and (memq (process-status process) '(open run)) | 63 | (while (and (memq (process-status process) '(open run)) |
| @@ -92,7 +92,7 @@ the list is tried until a successful connection is made." | |||
| 92 | (accept-process-output process 1) | 92 | (accept-process-output process 1) |
| 93 | (sit-for 1)) | 93 | (sit-for 1)) |
| 94 | (erase-buffer) | 94 | (erase-buffer) |
| 95 | (message "GSSAPI IMAP connection: %s" (or response "failed")) | 95 | (message "GSSAPI connection: %s" (or response "failed")) |
| 96 | (if (and response (let ((case-fold-search nil)) | 96 | (if (and response (let ((case-fold-search nil)) |
| 97 | (not (string-match "failed" response)))) | 97 | (not (string-match "failed" response)))) |
| 98 | (setq done process) | 98 | (setq done process) |
diff --git a/lisp/gnus/message.el b/lisp/gnus/message.el index bb9215aca7c..6d9fd712c33 100644 --- a/lisp/gnus/message.el +++ b/lisp/gnus/message.el | |||
| @@ -3712,22 +3712,9 @@ To use this automatically, you may add this function to | |||
| 3712 | (while (re-search-forward citexp nil t) | 3712 | (while (re-search-forward citexp nil t) |
| 3713 | (replace-match (if remove "" "\n")))))) | 3713 | (replace-match (if remove "" "\n")))))) |
| 3714 | 3714 | ||
| 3715 | (defun message-yank-original (&optional arg) | 3715 | (defun message--yank-original-internal (arg) |
| 3716 | "Insert the message being replied to, if any. | ||
| 3717 | Puts point before the text and mark after. | ||
| 3718 | Normally indents each nonblank line ARG spaces (default 3). However, | ||
| 3719 | if `message-yank-prefix' is non-nil, insert that prefix on each line. | ||
| 3720 | |||
| 3721 | This function uses `message-cite-function' to do the actual citing. | ||
| 3722 | |||
| 3723 | Just \\[universal-argument] as argument means don't indent, insert no | ||
| 3724 | prefix, and don't delete any headers." | ||
| 3725 | (interactive "P") | ||
| 3726 | (let ((modified (buffer-modified-p)) | 3716 | (let ((modified (buffer-modified-p)) |
| 3727 | body-text) | 3717 | body-text) |
| 3728 | ;; eval the let forms contained in message-cite-style | ||
| 3729 | (eval | ||
| 3730 | `(let ,message-cite-style | ||
| 3731 | (when (and message-reply-buffer | 3718 | (when (and message-reply-buffer |
| 3732 | message-cite-function) | 3719 | message-cite-function) |
| 3733 | (when (equal message-cite-reply-position 'above) | 3720 | (when (equal message-cite-reply-position 'above) |
| @@ -3767,7 +3754,23 @@ prefix, and don't delete any headers." | |||
| 3767 | ;; Add a `message-setup-very-last-hook' here? | 3754 | ;; Add a `message-setup-very-last-hook' here? |
| 3768 | ;; Add `gnus-article-highlight-citation' here? | 3755 | ;; Add `gnus-article-highlight-citation' here? |
| 3769 | (unless modified | 3756 | (unless modified |
| 3770 | (setq message-checksum (message-checksum)))))))) | 3757 | (setq message-checksum (message-checksum)))))) |
| 3758 | |||
| 3759 | (defun message-yank-original (&optional arg) | ||
| 3760 | "Insert the message being replied to, if any. | ||
| 3761 | Puts point before the text and mark after. | ||
| 3762 | Normally indents each nonblank line ARG spaces (default 3). However, | ||
| 3763 | if `message-yank-prefix' is non-nil, insert that prefix on each line. | ||
| 3764 | |||
| 3765 | This function uses `message-cite-function' to do the actual citing. | ||
| 3766 | |||
| 3767 | Just \\[universal-argument] as argument means don't indent, insert no | ||
| 3768 | prefix, and don't delete any headers." | ||
| 3769 | (interactive "P") | ||
| 3770 | ;; eval the let forms contained in message-cite-style | ||
| 3771 | (eval | ||
| 3772 | `(let ,message-cite-style | ||
| 3773 | (message--yank-original-internal ',arg)))) | ||
| 3771 | 3774 | ||
| 3772 | (defun message-yank-buffer (buffer) | 3775 | (defun message-yank-buffer (buffer) |
| 3773 | "Insert BUFFER into the current buffer and quote it." | 3776 | "Insert BUFFER into the current buffer and quote it." |
diff --git a/lisp/gnus/mm-decode.el b/lisp/gnus/mm-decode.el index 3909e12186f..f543920446b 100644 --- a/lisp/gnus/mm-decode.el +++ b/lisp/gnus/mm-decode.el | |||
| @@ -1744,6 +1744,13 @@ If RECURSIVE, search recursively." | |||
| 1744 | (delete-region ,(point-min-marker) | 1744 | (delete-region ,(point-min-marker) |
| 1745 | ,(point-max-marker)))))))) | 1745 | ,(point-max-marker)))))))) |
| 1746 | 1746 | ||
| 1747 | (defun mm-handle-filename (handle) | ||
| 1748 | "Return filename of HANDLE if any." | ||
| 1749 | (or (mail-content-type-get (mm-handle-type handle) | ||
| 1750 | 'name) | ||
| 1751 | (mail-content-type-get (mm-handle-disposition handle) | ||
| 1752 | 'filename))) | ||
| 1753 | |||
| 1747 | (provide 'mm-decode) | 1754 | (provide 'mm-decode) |
| 1748 | 1755 | ||
| 1749 | ;;; mm-decode.el ends here | 1756 | ;;; mm-decode.el ends here |
diff --git a/lisp/gnus/mm-view.el b/lisp/gnus/mm-view.el index d63d20239dc..abd78b8de02 100644 --- a/lisp/gnus/mm-view.el +++ b/lisp/gnus/mm-view.el | |||
| @@ -455,7 +455,7 @@ | |||
| 455 | (narrow-to-region (point) (point)) | 455 | (narrow-to-region (point) (point)) |
| 456 | (mm-insert-part handle) | 456 | (mm-insert-part handle) |
| 457 | (goto-char (point-max))) | 457 | (goto-char (point-max))) |
| 458 | (insert (mm-decode-string (mm-get-part handle) charset))) | 458 | (mm-display-inline-fontify handle)) |
| 459 | (when (and mm-fill-flowed | 459 | (when (and mm-fill-flowed |
| 460 | (equal type "plain") | 460 | (equal type "plain") |
| 461 | (equal (cdr (assoc 'format (mm-handle-type handle))) | 461 | (equal (cdr (assoc 'format (mm-handle-type handle))) |
| @@ -565,15 +565,16 @@ | |||
| 565 | (face-property 'default prop) (current-buffer)))) | 565 | (face-property 'default prop) (current-buffer)))) |
| 566 | (delete-region ,(point-min-marker) ,(point-max-marker))))))))) | 566 | (delete-region ,(point-min-marker) ,(point-max-marker))))))))) |
| 567 | 567 | ||
| 568 | (defun mm-display-inline-fontify (handle mode) | 568 | (defun mm-display-inline-fontify (handle &optional mode) |
| 569 | "Insert HANDLE inline fontifying with MODE. | ||
| 570 | If MODE is not set, try to find mode automatically." | ||
| 569 | (let ((charset (mail-content-type-get (mm-handle-type handle) 'charset)) | 571 | (let ((charset (mail-content-type-get (mm-handle-type handle) 'charset)) |
| 570 | text coding-system) | 572 | text coding-system) |
| 571 | (unless (eq charset 'gnus-decoded) | 573 | (unless (eq charset 'gnus-decoded) |
| 572 | (mm-with-unibyte-buffer | 574 | (mm-with-unibyte-buffer |
| 573 | (mm-insert-part handle) | 575 | (mm-insert-part handle) |
| 574 | (mm-decompress-buffer | 576 | (mm-decompress-buffer |
| 575 | (or (mail-content-type-get (mm-handle-disposition handle) 'name) | 577 | (mm-handle-filename handle) |
| 576 | (mail-content-type-get (mm-handle-disposition handle) 'filename)) | ||
| 577 | t t) | 578 | t t) |
| 578 | (unless charset | 579 | (unless charset |
| 579 | (setq coding-system (mm-find-buffer-file-coding-system))) | 580 | (setq coding-system (mm-find-buffer-file-coding-system))) |
| @@ -601,7 +602,11 @@ | |||
| 601 | (font-lock-support-mode nil) | 602 | (font-lock-support-mode nil) |
| 602 | ;; I find font-lock a bit too verbose. | 603 | ;; I find font-lock a bit too verbose. |
| 603 | (font-lock-verbose nil)) | 604 | (font-lock-verbose nil)) |
| 604 | (funcall mode) | 605 | (setq buffer-file-name (mm-handle-filename handle)) |
| 606 | (set (make-local-variable 'enable-local-variables) nil) | ||
| 607 | (if mode | ||
| 608 | (funcall mode) | ||
| 609 | (set-auto-mode)) | ||
| 605 | ;; The mode function might have already turned on font-lock. | 610 | ;; The mode function might have already turned on font-lock. |
| 606 | (unless (symbol-value 'font-lock-mode) | 611 | (unless (symbol-value 'font-lock-mode) |
| 607 | (font-lock-fontify-buffer))) | 612 | (font-lock-fontify-buffer))) |
| @@ -614,6 +619,9 @@ | |||
| 614 | nil) | 619 | nil) |
| 615 | nil nil nil nil nil 'text-prop)) | 620 | nil nil nil nil nil 'text-prop)) |
| 616 | (setq text (buffer-string)) | 621 | (setq text (buffer-string)) |
| 622 | ;; Set buffer unmodified to avoid confirmation when killing the | ||
| 623 | ;; buffer. | ||
| 624 | (set-buffer-modified-p nil) | ||
| 617 | (kill-buffer (current-buffer))) | 625 | (kill-buffer (current-buffer))) |
| 618 | (mm-insert-inline handle text))) | 626 | (mm-insert-inline handle text))) |
| 619 | 627 | ||
diff --git a/lisp/gnus/nnimap.el b/lisp/gnus/nnimap.el index bcbe7b678d5..fa09c7ff165 100644 --- a/lisp/gnus/nnimap.el +++ b/lisp/gnus/nnimap.el | |||
| @@ -61,10 +61,12 @@ If nnimap-stream is `ssl', this will default to `imaps'. If not, | |||
| 61 | it will default to `imap'.") | 61 | it will default to `imap'.") |
| 62 | 62 | ||
| 63 | (defvoo nnimap-stream 'undecided | 63 | (defvoo nnimap-stream 'undecided |
| 64 | "How nnimap will talk to the IMAP server. | 64 | "How nnimap talks to the IMAP server. |
| 65 | Values are `ssl', `network', `network-only, `starttls' or | 65 | The value should be either `undecided', `ssl' or `tls', |
| 66 | `shell'. The default is to try `ssl' first, and then | 66 | `network', `starttls', `plain', or `shell'. |
| 67 | `network'.") | 67 | |
| 68 | If the value is `undecided', nnimap tries `ssl' first, then falls | ||
| 69 | back on `network'.") | ||
| 68 | 70 | ||
| 69 | (defvoo nnimap-shell-program (if (boundp 'imap-shell-program) | 71 | (defvoo nnimap-shell-program (if (boundp 'imap-shell-program) |
| 70 | (if (listp imap-shell-program) | 72 | (if (listp imap-shell-program) |
| @@ -339,9 +341,7 @@ textual parts.") | |||
| 339 | (port nil) | 341 | (port nil) |
| 340 | (ports | 342 | (ports |
| 341 | (cond | 343 | (cond |
| 342 | ((or (eq nnimap-stream 'network) | 344 | ((memq nnimap-stream '(network plain starttls)) |
| 343 | (eq nnimap-stream 'network-only) | ||
| 344 | (eq nnimap-stream 'starttls)) | ||
| 345 | (nnheader-message 7 "Opening connection to %s..." | 345 | (nnheader-message 7 "Opening connection to %s..." |
| 346 | nnimap-address) | 346 | nnimap-address) |
| 347 | '("imap" "143")) | 347 | '("imap" "143")) |
| @@ -355,21 +355,28 @@ textual parts.") | |||
| 355 | '("imaps" "imap" "993" "143")) | 355 | '("imaps" "imap" "993" "143")) |
| 356 | (t | 356 | (t |
| 357 | (error "Unknown stream type: %s" nnimap-stream)))) | 357 | (error "Unknown stream type: %s" nnimap-stream)))) |
| 358 | (proto-stream-always-use-starttls t) | ||
| 359 | login-result credentials) | 358 | login-result credentials) |
| 360 | (when nnimap-server-port | 359 | (when nnimap-server-port |
| 361 | (push nnimap-server-port ports)) | 360 | (push nnimap-server-port ports)) |
| 362 | (destructuring-bind (stream greeting capabilities stream-type) | 361 | (let* ((stream-list |
| 363 | (open-protocol-stream | 362 | (open-protocol-stream |
| 364 | "*nnimap*" (current-buffer) nnimap-address (car ports) | 363 | "*nnimap*" (current-buffer) nnimap-address (car ports) |
| 365 | :type nnimap-stream | 364 | :type nnimap-stream |
| 366 | :shell-command nnimap-shell-program | 365 | :return-list t |
| 367 | :capability-command "1 CAPABILITY\r\n" | 366 | :shell-command nnimap-shell-program |
| 368 | :success " OK " | 367 | :capability-command "1 CAPABILITY\r\n" |
| 369 | :starttls-function | 368 | :success " OK " |
| 370 | (lambda (capabilities) | 369 | :starttls-function |
| 371 | (when (gnus-string-match-p "STARTTLS" capabilities) | 370 | (lambda (capabilities) |
| 372 | "1 STARTTLS\r\n"))) | 371 | (when (gnus-string-match-p "STARTTLS" capabilities) |
| 372 | "1 STARTTLS\r\n")))) | ||
| 373 | (stream (car stream-list)) | ||
| 374 | (props (cdr stream-list)) | ||
| 375 | (greeting (plist-get props :greeting)) | ||
| 376 | (capabilities (plist-get props :capabilities)) | ||
| 377 | (stream-type (plist-get props :type))) | ||
| 378 | (when (and stream (not (memq (process-status stream) '(open run)))) | ||
| 379 | (setq stream nil)) | ||
| 373 | (setf (nnimap-process nnimap-object) stream) | 380 | (setf (nnimap-process nnimap-object) stream) |
| 374 | (setf (nnimap-stream-type nnimap-object) stream-type) | 381 | (setf (nnimap-stream-type nnimap-object) stream-type) |
| 375 | (if (not stream) | 382 | (if (not stream) |
| @@ -403,11 +410,18 @@ textual parts.") | |||
| 403 | (setq login-result | 410 | (setq login-result |
| 404 | (nnimap-login (car credentials) (cadr credentials)))) | 411 | (nnimap-login (car credentials) (cadr credentials)))) |
| 405 | (if (car login-result) | 412 | (if (car login-result) |
| 406 | ;; save the credentials if a save function exists | 413 | (progn |
| 414 | ;; Save the credentials if a save function exists | ||
| 407 | ;; (such a function will only be passed if a new | 415 | ;; (such a function will only be passed if a new |
| 408 | ;; token was created) | 416 | ;; token was created). |
| 409 | (when (functionp (nth 2 credentials)) | 417 | (when (functionp (nth 2 credentials)) |
| 410 | (funcall (nth 2 credentials))) | 418 | (funcall (nth 2 credentials))) |
| 419 | ;; See if CAPABILITY is set as part of login | ||
| 420 | ;; response. | ||
| 421 | (dolist (response (cddr login-result)) | ||
| 422 | (when (string= "CAPABILITY" (upcase (car response))) | ||
| 423 | (setf (nnimap-capabilities nnimap-object) | ||
| 424 | (mapcar #'upcase (cdr response)))))) | ||
| 411 | ;; If the login failed, then forget the credentials | 425 | ;; If the login failed, then forget the credentials |
| 412 | ;; that are now possibly cached. | 426 | ;; that are now possibly cached. |
| 413 | (dolist (host (list (nnoo-current-server 'nnimap) | 427 | (dolist (host (list (nnoo-current-server 'nnimap) |
diff --git a/lisp/gnus/nntp.el b/lisp/gnus/nntp.el index 66a6365cb3b..fa765e17463 100644 --- a/lisp/gnus/nntp.el +++ b/lisp/gnus/nntp.el | |||
| @@ -76,27 +76,27 @@ to innd, you could say something like: | |||
| 76 | You probably don't want to do that, though.") | 76 | You probably don't want to do that, though.") |
| 77 | 77 | ||
| 78 | (defvoo nntp-open-connection-function 'nntp-open-network-stream | 78 | (defvoo nntp-open-connection-function 'nntp-open-network-stream |
| 79 | "*Function used for connecting to a remote system. | 79 | "Method for connecting to a remote system. |
| 80 | It will be called with the buffer to output in as argument. | 80 | It should be a function, which is called with the output buffer |
| 81 | 81 | as its single argument, or one of the following special values: | |
| 82 | Currently, five such functions are provided (please refer to their | 82 | |
| 83 | respective doc string for more information), three of them establishing | 83 | - `nntp-open-network-stream' specifies a network connection, |
| 84 | direct connections to the nntp server, and two of them using an indirect | 84 | upgrading to a TLS connection via STARTTLS if possible. |
| 85 | host. | 85 | - `nntp-open-plain-stream' specifies an unencrypted network |
| 86 | 86 | connection (no STARTTLS upgrade is attempted). | |
| 87 | Direct connections: | 87 | - `nntp-open-ssl-stream' or `nntp-open-tls-stream' specify a TLS |
| 88 | - `nntp-open-network-stream' (the default), | 88 | network connection. |
| 89 | - `network-only' (the same as the above, but don't do automatic | 89 | |
| 90 | STARTTLS upgrades). | 90 | Apart from the above special values, valid functions are as |
| 91 | - `nntp-open-ssl-stream', | 91 | follows; please refer to their respective doc string for more |
| 92 | - `nntp-open-tls-stream', | 92 | information. |
| 93 | - `nntp-open-netcat-stream'. | 93 | For direct connections: |
| 94 | - `nntp-open-telnet-stream'. | 94 | - `nntp-open-netcat-stream' |
| 95 | 95 | - `nntp-open-telnet-stream' | |
| 96 | Indirect connections: | 96 | For indirect connections: |
| 97 | - `nntp-open-via-rlogin-and-netcat', | 97 | - `nntp-open-via-rlogin-and-netcat' |
| 98 | - `nntp-open-via-rlogin-and-telnet', | 98 | - `nntp-open-via-rlogin-and-telnet' |
| 99 | - `nntp-open-via-telnet-and-telnet'.") | 99 | - `nntp-open-via-telnet-and-telnet'") |
| 100 | 100 | ||
| 101 | (defvoo nntp-never-echoes-commands nil | 101 | (defvoo nntp-never-echoes-commands nil |
| 102 | "*Non-nil means the nntp server never echoes commands. | 102 | "*Non-nil means the nntp server never echoes commands. |
| @@ -1340,25 +1340,25 @@ password contained in '~/.nntp-authinfo'." | |||
| 1340 | (let ((coding-system-for-read nntp-coding-system-for-read) | 1340 | (let ((coding-system-for-read nntp-coding-system-for-read) |
| 1341 | (coding-system-for-write nntp-coding-system-for-write) | 1341 | (coding-system-for-write nntp-coding-system-for-write) |
| 1342 | (map '((nntp-open-network-stream network) | 1342 | (map '((nntp-open-network-stream network) |
| 1343 | (network-only network-only) | 1343 | (network-only plain) ; compat |
| 1344 | (nntp-open-plain-stream plain) | ||
| 1344 | (nntp-open-ssl-stream tls) | 1345 | (nntp-open-ssl-stream tls) |
| 1345 | (nntp-open-tls-stream tls)))) | 1346 | (nntp-open-tls-stream tls)))) |
| 1346 | (if (assoc nntp-open-connection-function map) | 1347 | (if (assoc nntp-open-connection-function map) |
| 1347 | (car (open-protocol-stream | 1348 | (open-protocol-stream |
| 1348 | "nntpd" pbuffer nntp-address nntp-port-number | 1349 | "nntpd" pbuffer nntp-address nntp-port-number |
| 1349 | :type (cadr | 1350 | :type (cadr (assoc nntp-open-connection-function map)) |
| 1350 | (assoc nntp-open-connection-function map)) | 1351 | :end-of-command "^\\([2345]\\|[.]\\).*\n" |
| 1351 | :end-of-command "^\\([2345]\\|[.]\\).*\n" | 1352 | :capability-command "CAPABILITIES\r\n" |
| 1352 | :capability-command "CAPABILITIES\r\n" | 1353 | :success "^3" |
| 1353 | :success "^3" | 1354 | :starttls-function |
| 1354 | :starttls-function | 1355 | (lambda (capabilities) |
| 1355 | (lambda (capabilities) | 1356 | (if (not (string-match "STARTTLS" capabilities)) |
| 1356 | (if (not (string-match "STARTTLS" capabilities)) | 1357 | nil |
| 1357 | nil | 1358 | "STARTTLS\r\n"))) |
| 1358 | "STARTTLS\r\n")))) | ||
| 1359 | (funcall nntp-open-connection-function pbuffer))) | 1359 | (funcall nntp-open-connection-function pbuffer))) |
| 1360 | (error | 1360 | (error |
| 1361 | (nnheader-report 'nntp "%s" err)) | 1361 | (nnheader-report 'nntp ">>> %s" err)) |
| 1362 | (quit | 1362 | (quit |
| 1363 | (message "Quit opening connection to %s" nntp-address) | 1363 | (message "Quit opening connection to %s" nntp-address) |
| 1364 | (nntp-kill-buffer pbuffer) | 1364 | (nntp-kill-buffer pbuffer) |
| @@ -1366,6 +1366,9 @@ password contained in '~/.nntp-authinfo'." | |||
| 1366 | nil)))) | 1366 | nil)))) |
| 1367 | (when timer | 1367 | (when timer |
| 1368 | (nnheader-cancel-timer timer)) | 1368 | (nnheader-cancel-timer timer)) |
| 1369 | (when (and process | ||
| 1370 | (not (memq (process-status process) '(open run)))) | ||
| 1371 | (setq process nil)) | ||
| 1369 | (unless process | 1372 | (unless process |
| 1370 | (nntp-kill-buffer pbuffer)) | 1373 | (nntp-kill-buffer pbuffer)) |
| 1371 | (when (and (buffer-name pbuffer) | 1374 | (when (and (buffer-name pbuffer) |
diff --git a/lisp/gnus/proto-stream.el b/lisp/gnus/proto-stream.el index fdf2abfea05..45cc974e7a9 100644 --- a/lisp/gnus/proto-stream.el +++ b/lisp/gnus/proto-stream.el | |||
| @@ -48,171 +48,162 @@ | |||
| 48 | 48 | ||
| 49 | ;;; Code: | 49 | ;;; Code: |
| 50 | 50 | ||
| 51 | (eval-when-compile | ||
| 52 | (require 'cl)) | ||
| 53 | (require 'tls) | 51 | (require 'tls) |
| 54 | (require 'starttls) | 52 | (require 'starttls) |
| 55 | (require 'format-spec) | ||
| 56 | |||
| 57 | (defcustom proto-stream-always-use-starttls (fboundp 'open-gnutls-stream) | ||
| 58 | "If non-nil, always try to upgrade network connections with STARTTLS." | ||
| 59 | :version "24.1" | ||
| 60 | :type 'boolean | ||
| 61 | :group 'comm) | ||
| 62 | 53 | ||
| 63 | (declare-function gnutls-negotiate "gnutls" | 54 | (declare-function gnutls-negotiate "gnutls" |
| 64 | (proc type &optional priority-string trustfiles keyfiles)) | 55 | (proc type &optional priority-string trustfiles keyfiles)) |
| 65 | 56 | ||
| 66 | ;;;###autoload | 57 | ;;;###autoload |
| 67 | (defun open-protocol-stream (name buffer host service &rest parameters) | 58 | (defun open-protocol-stream (name buffer host service &rest parameters) |
| 68 | "Open a network stream to HOST, upgrading to STARTTLS if possible. | 59 | "Open a network stream to HOST, possibly with encryption. |
| 69 | The first four parameters have the same meaning as in | 60 | Normally, return a network process object; with a non-nil |
| 70 | `open-network-stream'. The function returns a list where the | 61 | :return-list parameter, return a list instead (see below). |
| 71 | first element is the stream, the second element is the greeting | 62 | |
| 72 | the server replied with after connecting, and the third element | 63 | The first four parameters, NAME, BUFFER, HOST, and SERVICE, have |
| 73 | is a string representing the capabilities of the server (if any). | 64 | the same meanings as in `open-network-stream'. The remaining |
| 74 | 65 | PARAMETERS should be a sequence of keywords and values: | |
| 75 | The PARAMETERS is a keyword list that can have the following | 66 | |
| 76 | values: | 67 | :type specifies the connection type, one of the following: |
| 77 | 68 | nil or `network' | |
| 78 | :type -- either `network', `network-only, `tls', `shell' or | 69 | -- Begin with an ordinary network connection, and if |
| 79 | `starttls'. If omitted, the default is `network'. `network' | 70 | the parameters :success and :capability-command |
| 80 | will be opportunistically upgraded to STARTTLS if both the server | 71 | are also supplied, try to upgrade to an encrypted |
| 81 | and Emacs supports it. If you don't want STARTTLS upgrades, use | 72 | connection via STARTTLS. Even if that |
| 82 | `network-only'. | 73 | fails (e.g. if HOST does not support TLS), retain |
| 83 | 74 | an unencrypted connection. | |
| 84 | :end-of-command -- a regexp saying what the end of a command is. | 75 | `plain' -- An ordinary, unencrypted network connection. |
| 85 | This defaults to \"\\n\". | 76 | `starttls' -- Begin with an ordinary connection, and try |
| 86 | 77 | upgrading via STARTTLS. If that fails for any | |
| 87 | :success -- a regexp saying whether the STARTTLS command was | 78 | reason, drop the connection; in that case the |
| 88 | successful or not. For instance, for NNTP this is \"^3\". | 79 | returned object is a killed process. |
| 89 | 80 | `tls' -- A TLS connection. | |
| 90 | :capability-command -- a string representing the command used to | 81 | `ssl' -- Equivalent to `tls'. |
| 91 | query server for capabilities. For instance, for IMAP this is | 82 | `shell' -- A shell connection. |
| 92 | \"1 CAPABILITY\\r\\n\". | 83 | |
| 93 | 84 | :return-list specifies this function's return value. | |
| 94 | :starttls-function -- a function that takes one parameter, which | 85 | If omitted or nil, return a process object. A non-nil means to |
| 95 | is the response to the capaibility command. It should return nil | 86 | return (PROC . PROPS), where PROC is a process object and PROPS |
| 96 | if it turns out that the server doesn't support STARTTLS, or the | 87 | is a plist of connection properties, with these keywords: |
| 97 | command to switch on STARTTLS otherwise. | 88 | :greeting -- the greeting returned by HOST (a string), or nil. |
| 98 | 89 | :capabilities -- a string representing HOST's capabilities, | |
| 99 | The return value from this function is a four-element list, where | 90 | or nil if none could be found. |
| 100 | the first element is the stream (if connection was successful); | 91 | :type -- the resulting connection type; `plain' (unencrypted) |
| 101 | the second element is the \"greeting\", i. e., the string the | 92 | or `tls' (TLS-encrypted). |
| 102 | server sent over on initial contact; the third element is the | 93 | |
| 103 | capability string; and the fourth element is either `network' or | 94 | :end-of-command specifies a regexp matching the end of a command. |
| 104 | `tls', depending on whether the connection ended up being | 95 | If non-nil, it defaults to \"\\n\". |
| 105 | encrypted or not." | 96 | |
| 106 | (let ((type (or (cadr (memq :type parameters)) 'network))) | 97 | :success specifies a regexp matching a message indicating a |
| 107 | (cond | 98 | successful STARTTLS negotiation. For instance, the default |
| 108 | ((eq type 'starttls) | 99 | should be \"^3\" for an NNTP connection. |
| 109 | (setq type 'network)) | 100 | |
| 110 | ((eq type 'ssl) | 101 | :capability-command specifies a command used to query the HOST |
| 111 | (setq type 'tls))) | 102 | for its capabilities. For instance, for IMAP this should be |
| 112 | (let ((open-result | 103 | \"1 CAPABILITY\\r\\n\". |
| 113 | (funcall (intern (format "proto-stream-open-%s" type) obarray) | 104 | |
| 114 | name buffer host service parameters))) | 105 | :starttls-function specifies a function for handling STARTTLS. |
| 115 | (if (null open-result) | 106 | This function should take one parameter, the response to the |
| 116 | (list nil nil nil type) | 107 | capability command, and should return the command to switch on |
| 117 | (let ((stream (car open-result))) | 108 | STARTTLS if the server supports STARTTLS, and nil otherwise." |
| 118 | (list (and stream | 109 | (let ((type (plist-get parameters :type)) |
| 119 | (memq (process-status stream) | 110 | (return-list (plist-get parameters :return-list))) |
| 120 | '(open run)) | 111 | (if (and (not return-list) |
| 121 | stream) | 112 | (or (eq type 'plain) |
| 122 | (nth 1 open-result) | 113 | (and (memq type '(nil network)) |
| 123 | (nth 2 open-result) | 114 | (not (and (plist-get parameters :success) |
| 124 | (nth 3 open-result))))))) | 115 | (plist-get parameters :capability-command)))))) |
| 125 | 116 | ;; The simplest case is equivalent to `open-network-stream'. | |
| 126 | (defun proto-stream-open-network-only (name buffer host service parameters) | 117 | (open-network-stream name buffer host service) |
| 118 | ;; For everything else, refer to proto-stream-open-*. | ||
| 119 | (unless (plist-get parameters :end-of-command) | ||
| 120 | (setq parameters (append '(:end-of-command "\r\n") parameters))) | ||
| 121 | (let* ((connection-function | ||
| 122 | (cond | ||
| 123 | ((eq type 'plain) 'proto-stream-open-plain) | ||
| 124 | ((memq type '(nil network starttls)) | ||
| 125 | 'proto-stream-open-starttls) | ||
| 126 | ((memq type '(tls ssl)) 'proto-stream-open-tls) | ||
| 127 | ((eq type 'shell) 'proto-stream-open-shell) | ||
| 128 | (t (error "Invalid connection type %s" type)))) | ||
| 129 | (result (funcall connection-function | ||
| 130 | name buffer host service parameters))) | ||
| 131 | (if return-list | ||
| 132 | (list (car result) | ||
| 133 | :greeting (nth 1 result) | ||
| 134 | :capabilities (nth 2 result) | ||
| 135 | :type (nth 3 result)) | ||
| 136 | (car result)))))) | ||
| 137 | |||
| 138 | (defun proto-stream-open-plain (name buffer host service parameters) | ||
| 127 | (let ((start (with-current-buffer buffer (point))) | 139 | (let ((start (with-current-buffer buffer (point))) |
| 128 | (stream (open-network-stream name buffer host service))) | 140 | (stream (open-network-stream name buffer host service))) |
| 129 | (list stream | 141 | (list stream |
| 130 | (proto-stream-get-response | 142 | (proto-stream-get-response stream start |
| 131 | stream start (proto-stream-eoc parameters)) | 143 | (plist-get parameters :end-of-command)) |
| 132 | nil | 144 | nil |
| 133 | 'network))) | 145 | 'plain))) |
| 134 | 146 | ||
| 135 | (defun proto-stream-open-network (name buffer host service parameters) | 147 | (defun proto-stream-open-starttls (name buffer host service parameters) |
| 136 | (let* ((start (with-current-buffer buffer (point))) | 148 | (let* ((start (with-current-buffer buffer (point))) |
| 149 | (require-tls (eq (plist-get parameters :type) 'starttls)) | ||
| 150 | (starttls-function (plist-get parameters :starttls-function)) | ||
| 151 | (success-string (plist-get parameters :success)) | ||
| 152 | (capability-command (plist-get parameters :capability-command)) | ||
| 153 | (eoc (plist-get parameters :end-of-command)) | ||
| 154 | ;; Return (STREAM GREETING CAPABILITIES RESULTING-TYPE) | ||
| 137 | (stream (open-network-stream name buffer host service)) | 155 | (stream (open-network-stream name buffer host service)) |
| 138 | (capability-command (cadr (memq :capability-command parameters))) | ||
| 139 | (eoc (proto-stream-eoc parameters)) | ||
| 140 | (type (cadr (memq :type parameters))) | ||
| 141 | (greeting (proto-stream-get-response stream start eoc)) | 156 | (greeting (proto-stream-get-response stream start eoc)) |
| 142 | success) | 157 | (capabilities (when capability-command |
| 143 | (if (not capability-command) | 158 | (proto-stream-command stream |
| 144 | (list stream greeting nil 'network) | 159 | capability-command eoc))) |
| 145 | (let* ((capabilities | 160 | (resulting-type 'plain) |
| 146 | (proto-stream-command stream capability-command eoc)) | 161 | starttls-command) |
| 147 | (starttls-command | 162 | |
| 148 | (funcall (cadr (memq :starttls-function parameters)) | 163 | ;; If we have STARTTLS support, try to upgrade the connection. |
| 149 | capabilities))) | 164 | (when (and (or (fboundp 'open-gnutls-stream) |
| 150 | (cond | 165 | (executable-find "gnutls-cli")) |
| 151 | ;; If this server doesn't support STARTTLS, but we have | 166 | capabilities success-string starttls-function |
| 152 | ;; requested it explicitly, then close the connection and | 167 | (setq starttls-command |
| 153 | ;; return nil. | 168 | (funcall starttls-function capabilities))) |
| 154 | ((or (not starttls-command) | 169 | ;; If using external STARTTLS, drop this connection and start |
| 155 | (and (not (eq type 'starttls)) | 170 | ;; anew with `starttls-open-stream'. |
| 156 | (not proto-stream-always-use-starttls))) | 171 | (unless (fboundp 'open-gnutls-stream) |
| 157 | (if (eq type 'starttls) | 172 | (delete-process stream) |
| 158 | (progn | 173 | (setq start (with-current-buffer buffer (point-max))) |
| 159 | (delete-process stream) | 174 | (let* ((starttls-use-gnutls t) |
| 160 | nil) | 175 | (starttls-extra-arguments |
| 161 | ;; Otherwise, just return this plain network connection. | 176 | (if require-tls |
| 162 | (list stream greeting capabilities 'network))) | 177 | starttls-extra-arguments |
| 163 | ;; We have some kind of STARTTLS support, so we try to | 178 | ;; For opportunistic TLS upgrades, we don't really |
| 164 | ;; upgrade the connection opportunistically. | 179 | ;; care about the identity of the peer. |
| 165 | ((or (fboundp 'open-gnutls-stream) | 180 | (cons "--insecure" starttls-extra-arguments)))) |
| 166 | (executable-find "gnutls-cli")) | 181 | (setq stream (starttls-open-stream name buffer host service))) |
| 167 | (unless (fboundp 'open-gnutls-stream) | 182 | (proto-stream-get-response stream start eoc)) |
| 168 | (delete-process stream) | 183 | (when (string-match success-string |
| 169 | (setq start (with-current-buffer buffer (point-max))) | 184 | (proto-stream-command stream starttls-command eoc)) |
| 170 | (let* ((starttls-use-gnutls t) | 185 | ;; The server said it was OK to begin STARTTLS negotiations. |
| 171 | (starttls-extra-arguments | 186 | (if (fboundp 'open-gnutls-stream) |
| 172 | (if (not (eq type 'starttls)) | 187 | (gnutls-negotiate stream nil) |
| 173 | ;; When doing opportunistic TLS upgrades we | 188 | (unless (starttls-negotiate stream) |
| 174 | ;; don't really care about the identity of the | 189 | (delete-process stream))) |
| 175 | ;; peer. | 190 | (if (memq (process-status stream) '(open run)) |
| 176 | (cons "--insecure" starttls-extra-arguments) | 191 | (setq resulting-type 'tls) |
| 177 | starttls-extra-arguments))) | 192 | ;; We didn't successfully negotiate STARTTLS; if TLS |
| 178 | (setq stream (starttls-open-stream name buffer host service))) | 193 | ;; isn't demanded, reopen an unencrypted connection. |
| 179 | (proto-stream-get-response stream start eoc)) | 194 | (unless require-tls |
| 180 | (if (not | 195 | (setq stream (open-network-stream name buffer host service)) |
| 181 | (string-match | 196 | (proto-stream-get-response stream start eoc))) |
| 182 | (cadr (memq :success parameters)) | 197 | ;; Re-get the capabilities, which may have now changed. |
| 183 | (proto-stream-command stream starttls-command eoc))) | 198 | (setq capabilities |
| 184 | ;; We got an error back from the STARTTLS command. | 199 | (proto-stream-command stream capability-command eoc)))) |
| 185 | (progn | 200 | |
| 186 | (if (eq type 'starttls) | 201 | ;; If TLS is mandatory, close the connection if it's unencrypted. |
| 187 | (progn | 202 | (and require-tls |
| 188 | (delete-process stream) | 203 | (eq resulting-type 'plain) |
| 189 | nil) | 204 | (delete-process stream)) |
| 190 | (list stream greeting capabilities 'network))) | 205 | ;; Return value: |
| 191 | ;; The server said it was OK to start doing STARTTLS negotiations. | 206 | (list stream greeting capabilities resulting-type))) |
| 192 | (if (fboundp 'open-gnutls-stream) | ||
| 193 | (gnutls-negotiate stream nil) | ||
| 194 | (unless (starttls-negotiate stream) | ||
| 195 | (delete-process stream) | ||
| 196 | (setq stream nil))) | ||
| 197 | (when (or (null stream) | ||
| 198 | (not (memq (process-status stream) | ||
| 199 | '(open run)))) | ||
| 200 | ;; It didn't successfully negotiate STARTTLS, so we reopen | ||
| 201 | ;; the connection. | ||
| 202 | (setq stream (open-network-stream name buffer host service)) | ||
| 203 | (proto-stream-get-response stream start eoc)) | ||
| 204 | ;; Re-get the capabilities, since they may have changed | ||
| 205 | ;; after switching to TLS. | ||
| 206 | (list stream greeting | ||
| 207 | (proto-stream-command stream capability-command eoc) 'tls))) | ||
| 208 | ;; We don't have STARTTLS support available, but the caller | ||
| 209 | ;; requested a STARTTLS connection, so we give up. | ||
| 210 | ((eq (cadr (memq :type parameters)) 'starttls) | ||
| 211 | (delete-process stream) | ||
| 212 | nil) | ||
| 213 | ;; Fall back on using a plain network stream. | ||
| 214 | (t | ||
| 215 | (list stream greeting capabilities 'network))))))) | ||
| 216 | 207 | ||
| 217 | (defun proto-stream-command (stream command eoc) | 208 | (defun proto-stream-command (stream command eoc) |
| 218 | (let ((start (with-current-buffer (process-buffer stream) (point-max)))) | 209 | (let ((start (with-current-buffer (process-buffer stream) (point-max)))) |
| @@ -241,47 +232,43 @@ encrypted or not." | |||
| 241 | (funcall (if (fboundp 'open-gnutls-stream) | 232 | (funcall (if (fboundp 'open-gnutls-stream) |
| 242 | 'open-gnutls-stream | 233 | 'open-gnutls-stream |
| 243 | 'open-tls-stream) | 234 | 'open-tls-stream) |
| 244 | name buffer host service))) | 235 | name buffer host service)) |
| 236 | (eoc (plist-get parameters :end-of-command))) | ||
| 245 | (if (null stream) | 237 | (if (null stream) |
| 246 | nil | 238 | (list nil nil nil 'plain) |
| 247 | ;; If we're using tls.el, we have to delete the output from | 239 | ;; If we're using tls.el, we have to delete the output from |
| 248 | ;; openssl/gnutls-cli. | 240 | ;; openssl/gnutls-cli. |
| 249 | (unless (fboundp 'open-gnutls-stream) | 241 | (unless (fboundp 'open-gnutls-stream) |
| 250 | (proto-stream-get-response | 242 | (proto-stream-get-response stream start eoc) |
| 251 | stream start (proto-stream-eoc parameters)) | ||
| 252 | (goto-char (point-min)) | 243 | (goto-char (point-min)) |
| 253 | (when (re-search-forward (proto-stream-eoc parameters) nil t) | 244 | (when (re-search-forward eoc nil t) |
| 254 | (goto-char (match-beginning 0)) | 245 | (goto-char (match-beginning 0)) |
| 255 | (delete-region (point-min) (line-beginning-position)))) | 246 | (delete-region (point-min) (line-beginning-position)))) |
| 256 | (proto-stream-capability-open start stream parameters 'tls))))) | 247 | (proto-stream-capability-open start stream parameters 'tls))))) |
| 257 | 248 | ||
| 258 | (defun proto-stream-open-shell (name buffer host service parameters) | 249 | (defun proto-stream-open-shell (name buffer host service parameters) |
| 250 | (require 'format-spec) | ||
| 259 | (proto-stream-capability-open | 251 | (proto-stream-capability-open |
| 260 | (with-current-buffer buffer (point)) | 252 | (with-current-buffer buffer (point)) |
| 261 | (let ((process-connection-type nil)) | 253 | (let ((process-connection-type nil)) |
| 262 | (start-process name buffer shell-file-name | 254 | (start-process name buffer shell-file-name |
| 263 | shell-command-switch | 255 | shell-command-switch |
| 264 | (format-spec | 256 | (format-spec |
| 265 | (cadr (memq :shell-command parameters)) | 257 | (plist-get parameters :shell-command) |
| 266 | (format-spec-make | 258 | (format-spec-make |
| 267 | ?s host | 259 | ?s host |
| 268 | ?p service)))) | 260 | ?p service)))) |
| 269 | parameters 'network)) | 261 | parameters 'plain)) |
| 270 | 262 | ||
| 271 | (defun proto-stream-capability-open (start stream parameters stream-type) | 263 | (defun proto-stream-capability-open (start stream parameters stream-type) |
| 272 | (let ((capability-command (cadr (memq :capability-command parameters))) | 264 | (let* ((capability-command (plist-get parameters :capability-command)) |
| 273 | (greeting (proto-stream-get-response | 265 | (eoc (plist-get parameters :end-of-command)) |
| 274 | stream start (proto-stream-eoc parameters)))) | 266 | (greeting (proto-stream-get-response stream start eoc))) |
| 275 | (list stream greeting | 267 | (list stream greeting |
| 276 | (and capability-command | 268 | (and capability-command |
| 277 | (proto-stream-command | 269 | (proto-stream-command stream capability-command eoc)) |
| 278 | stream capability-command (proto-stream-eoc parameters))) | ||
| 279 | stream-type))) | 270 | stream-type))) |
| 280 | 271 | ||
| 281 | (defun proto-stream-eoc (parameters) | ||
| 282 | (or (cadr (memq :end-of-command parameters)) | ||
| 283 | "\r\n")) | ||
| 284 | |||
| 285 | (provide 'proto-stream) | 272 | (provide 'proto-stream) |
| 286 | 273 | ||
| 287 | ;;; proto-stream.el ends here | 274 | ;;; proto-stream.el ends here |
diff --git a/lisp/help-mode.el b/lisp/help-mode.el index 51d18235e1b..005358e3c7d 100644 --- a/lisp/help-mode.el +++ b/lisp/help-mode.el | |||
| @@ -330,7 +330,7 @@ Commands: | |||
| 330 | (save-excursion | 330 | (save-excursion |
| 331 | (goto-char (point-min)) | 331 | (goto-char (point-min)) |
| 332 | (let ((inhibit-read-only t)) | 332 | (let ((inhibit-read-only t)) |
| 333 | (when (re-search-forward "^This \\w+ is advised.$" nil t) | 333 | (when (re-search-forward "^This [^[:space:]]+ is advised.$" nil t) |
| 334 | (put-text-property (match-beginning 0) | 334 | (put-text-property (match-beginning 0) |
| 335 | (match-end 0) | 335 | (match-end 0) |
| 336 | 'face 'font-lock-warning-face)))) | 336 | 'face 'font-lock-warning-face)))) |
diff --git a/lisp/ido.el b/lisp/ido.el index 2a5c7cf2f0e..0ce83d9b88c 100644 --- a/lisp/ido.el +++ b/lisp/ido.el | |||
| @@ -1964,31 +1964,24 @@ If INITIAL is non-nil, it specifies the initial input string." | |||
| 1964 | (ido-set-matches) | 1964 | (ido-set-matches) |
| 1965 | (if (and ido-matches (eq ido-try-merged-list 'auto)) | 1965 | (if (and ido-matches (eq ido-try-merged-list 'auto)) |
| 1966 | (setq ido-try-merged-list t)) | 1966 | (setq ido-try-merged-list t)) |
| 1967 | (let | 1967 | (let ((max-mini-window-height (or ido-max-window-height |
| 1968 | ((minibuffer-local-completion-map | 1968 | (and (boundp 'max-mini-window-height) |
| 1969 | (if (memq ido-cur-item '(file dir)) | 1969 | max-mini-window-height))) |
| 1970 | minibuffer-local-completion-map | ||
| 1971 | ido-completion-map)) | ||
| 1972 | (minibuffer-local-filename-completion-map | ||
| 1973 | (if (memq ido-cur-item '(file dir)) | ||
| 1974 | ido-completion-map | ||
| 1975 | minibuffer-local-filename-completion-map)) | ||
| 1976 | (max-mini-window-height (or ido-max-window-height | ||
| 1977 | (and (boundp 'max-mini-window-height) max-mini-window-height))) | ||
| 1978 | (ido-completing-read t) | 1970 | (ido-completing-read t) |
| 1979 | (ido-require-match require-match) | 1971 | (ido-require-match require-match) |
| 1980 | (ido-use-mycompletion-depth (1+ (minibuffer-depth))) | 1972 | (ido-use-mycompletion-depth (1+ (minibuffer-depth))) |
| 1981 | (show-paren-mode nil)) | 1973 | (show-paren-mode nil) |
| 1974 | ;; Postpone history adding till later | ||
| 1975 | (history-add-new-input nil)) | ||
| 1982 | ;; prompt the user for the file name | 1976 | ;; prompt the user for the file name |
| 1983 | (setq ido-exit nil) | 1977 | (setq ido-exit nil) |
| 1984 | (setq ido-final-text | 1978 | (setq ido-final-text |
| 1985 | (catch 'ido | 1979 | (catch 'ido |
| 1986 | (completing-read-default | 1980 | (read-from-minibuffer (ido-make-prompt item prompt) |
| 1987 | (ido-make-prompt item prompt) | 1981 | (prog1 ido-text-init |
| 1988 | '(("dummy" . 1)) nil nil ; table predicate require-match | 1982 | (setq ido-text-init nil)) |
| 1989 | (prog1 ido-text-init (setq ido-text-init nil)) ;initial-contents | 1983 | ido-completion-map nil history)))) |
| 1990 | history)))) | 1984 | (ido-trace "read-from-minibuffer" ido-final-text) |
| 1991 | (ido-trace "completing-read" ido-final-text) | ||
| 1992 | (if (get-buffer ido-completion-buffer) | 1985 | (if (get-buffer ido-completion-buffer) |
| 1993 | (kill-buffer ido-completion-buffer)) | 1986 | (kill-buffer ido-completion-buffer)) |
| 1994 | 1987 | ||
| @@ -2158,6 +2151,7 @@ If INITIAL is non-nil, it specifies the initial input string." | |||
| 2158 | 2151 | ||
| 2159 | (t | 2152 | (t |
| 2160 | (setq done t)))))) | 2153 | (setq done t)))))) |
| 2154 | (add-to-history (or history 'minibuffer-history) ido-selected) | ||
| 2161 | ido-selected)) | 2155 | ido-selected)) |
| 2162 | 2156 | ||
| 2163 | (defun ido-edit-input () | 2157 | (defun ido-edit-input () |
| @@ -4491,17 +4485,13 @@ For details of keybindings, see `ido-find-file'." | |||
| 4491 | 4485 | ||
| 4492 | ;; Insert the match-status information: | 4486 | ;; Insert the match-status information: |
| 4493 | (ido-set-common-completion) | 4487 | (ido-set-common-completion) |
| 4494 | (let ((inf (ido-completions | 4488 | (let ((inf (ido-completions contents))) |
| 4495 | contents | ||
| 4496 | minibuffer-completion-table | ||
| 4497 | minibuffer-completion-predicate | ||
| 4498 | (not minibuffer-completion-confirm)))) | ||
| 4499 | (setq ido-show-confirm-message nil) | 4489 | (setq ido-show-confirm-message nil) |
| 4500 | (ido-trace "inf" inf) | 4490 | (ido-trace "inf" inf) |
| 4501 | (insert inf)) | 4491 | (insert inf)) |
| 4502 | )))) | 4492 | )))) |
| 4503 | 4493 | ||
| 4504 | (defun ido-completions (name candidates predicate require-match) | 4494 | (defun ido-completions (name) |
| 4505 | ;; Return the string that is displayed after the user's text. | 4495 | ;; Return the string that is displayed after the user's text. |
| 4506 | ;; Modified from `icomplete-completions'. | 4496 | ;; Modified from `icomplete-completions'. |
| 4507 | 4497 | ||
diff --git a/lisp/image.el b/lisp/image.el index 627d4c69e44..3b90ac46bd1 100644 --- a/lisp/image.el +++ b/lisp/image.el | |||
| @@ -60,7 +60,7 @@ IMAGE-TYPE must be a pair (PREDICATE . TYPE). PREDICATE is called | |||
| 60 | with one argument, a string containing the image data. If PREDICATE returns | 60 | with one argument, a string containing the image data. If PREDICATE returns |
| 61 | a non-nil value, TYPE is the image's type.") | 61 | a non-nil value, TYPE is the image's type.") |
| 62 | 62 | ||
| 63 | (defconst image-type-file-name-regexps | 63 | (defvar image-type-file-name-regexps |
| 64 | '(("\\.png\\'" . png) | 64 | '(("\\.png\\'" . png) |
| 65 | ("\\.gif\\'" . gif) | 65 | ("\\.gif\\'" . gif) |
| 66 | ("\\.jpe?g\\'" . jpeg) | 66 | ("\\.jpe?g\\'" . jpeg) |
| @@ -710,17 +710,19 @@ shall be displayed." | |||
| 710 | ;;;###autoload | 710 | ;;;###autoload |
| 711 | (defun imagemagick-register-types () | 711 | (defun imagemagick-register-types () |
| 712 | "Register the file types that ImageMagick is able to handle." | 712 | "Register the file types that ImageMagick is able to handle." |
| 713 | (let ((im-types (imagemagick-types))) | 713 | (if (fboundp 'imagemagick-types) |
| 714 | (dolist (im-inhibit imagemagick-types-inhibit) | 714 | (let ((im-types (imagemagick-types))) |
| 715 | (setq im-types (remove im-inhibit im-types))) | 715 | (dolist (im-inhibit imagemagick-types-inhibit) |
| 716 | (dolist (im-type im-types) | 716 | (setq im-types (remove im-inhibit im-types))) |
| 717 | (let ((extension (downcase (symbol-name im-type)))) | 717 | (dolist (im-type im-types) |
| 718 | (push | 718 | (let ((extension (downcase (symbol-name im-type)))) |
| 719 | (cons (concat "\\." extension "\\'") 'image-mode) | 719 | (push |
| 720 | auto-mode-alist) | 720 | (cons (concat "\\." extension "\\'") 'image-mode) |
| 721 | (push | 721 | auto-mode-alist) |
| 722 | (cons (concat "\\." extension "\\'") 'imagemagick) | 722 | (push |
| 723 | image-type-file-name-regexps))))) | 723 | (cons (concat "\\." extension "\\'") 'imagemagick) |
| 724 | image-type-file-name-regexps)))) | ||
| 725 | (error "Emacs was not built with ImageMagick support"))) | ||
| 724 | 726 | ||
| 725 | (provide 'image) | 727 | (provide 'image) |
| 726 | 728 | ||
diff --git a/lisp/midnight.el b/lisp/midnight.el index 9a6b162e986..762bc5445ba 100644 --- a/lisp/midnight.el +++ b/lisp/midnight.el | |||
| @@ -39,8 +39,6 @@ | |||
| 39 | (eval-when-compile | 39 | (eval-when-compile |
| 40 | (require 'cl)) | 40 | (require 'cl)) |
| 41 | 41 | ||
| 42 | (require 'timer) | ||
| 43 | |||
| 44 | (defgroup midnight nil | 42 | (defgroup midnight nil |
| 45 | "Run something every day at midnight." | 43 | "Run something every day at midnight." |
| 46 | :group 'calendar | 44 | :group 'calendar |
| @@ -66,12 +64,6 @@ call `cancel-timer' or `timer-activate' on `midnight-timer' instead." | |||
| 66 | 64 | ||
| 67 | ;;; time conversion | 65 | ;;; time conversion |
| 68 | 66 | ||
| 69 | (defun midnight-time-float (num) | ||
| 70 | "Convert the float number of seconds since epoch to the list of 3 integers." | ||
| 71 | (let* ((div (ash 1 16)) (1st (floor num div))) | ||
| 72 | (list 1st (floor (- num (* (float div) 1st))) | ||
| 73 | (round (* 10000000 (mod num 1)))))) | ||
| 74 | |||
| 75 | (defun midnight-buffer-display-time (&optional buffer) | 67 | (defun midnight-buffer-display-time (&optional buffer) |
| 76 | "Return the time-stamp of BUFFER, or current buffer, as float." | 68 | "Return the time-stamp of BUFFER, or current buffer, as float." |
| 77 | (with-current-buffer (or buffer (current-buffer)) | 69 | (with-current-buffer (or buffer (current-buffer)) |
diff --git a/lisp/minibuffer.el b/lisp/minibuffer.el index 4a2deb6b3bf..9d304ca8156 100644 --- a/lisp/minibuffer.el +++ b/lisp/minibuffer.el | |||
| @@ -682,6 +682,8 @@ scroll the window of possible completions." | |||
| 682 | (t t))))) | 682 | (t t))))) |
| 683 | 683 | ||
| 684 | (defun completion--flush-all-sorted-completions (&rest _ignore) | 684 | (defun completion--flush-all-sorted-completions (&rest _ignore) |
| 685 | (remove-hook 'after-change-functions | ||
| 686 | 'completion--flush-all-sorted-completions t) | ||
| 685 | (setq completion-cycling nil) | 687 | (setq completion-cycling nil) |
| 686 | (setq completion-all-sorted-completions nil)) | 688 | (setq completion-all-sorted-completions nil)) |
| 687 | 689 | ||
| @@ -1236,6 +1238,8 @@ Point needs to be somewhere between START and END." | |||
| 1236 | (assert (<= start (point)) (<= (point) end)) | 1238 | (assert (<= start (point)) (<= (point) end)) |
| 1237 | ;; FIXME: undisplay the *Completions* buffer once the completion is done. | 1239 | ;; FIXME: undisplay the *Completions* buffer once the completion is done. |
| 1238 | (with-wrapper-hook | 1240 | (with-wrapper-hook |
| 1241 | ;; FIXME: Maybe we should use this hook to provide a "display | ||
| 1242 | ;; completions" operation as well. | ||
| 1239 | completion-in-region-functions (start end collection predicate) | 1243 | completion-in-region-functions (start end collection predicate) |
| 1240 | (let ((minibuffer-completion-table collection) | 1244 | (let ((minibuffer-completion-table collection) |
| 1241 | (minibuffer-completion-predicate predicate) | 1245 | (minibuffer-completion-predicate predicate) |
| @@ -1247,7 +1251,9 @@ Point needs to be somewhere between START and END." | |||
| 1247 | 1251 | ||
| 1248 | (defvar completion-at-point-functions '(tags-completion-at-point-function) | 1252 | (defvar completion-at-point-functions '(tags-completion-at-point-function) |
| 1249 | "Special hook to find the completion table for the thing at point. | 1253 | "Special hook to find the completion table for the thing at point. |
| 1250 | It is called without any argument and should return either nil, | 1254 | Each function on this hook is called in turns without any argument and should |
| 1255 | return either nil to mean that it is not applicable at point, | ||
| 1256 | or t to mean that it already performed completion (discouraged), | ||
| 1251 | or a function of no argument to perform completion (discouraged), | 1257 | or a function of no argument to perform completion (discouraged), |
| 1252 | or a list of the form (START END COLLECTION &rest PROPS) where | 1258 | or a list of the form (START END COLLECTION &rest PROPS) where |
| 1253 | START and END delimit the entity to complete and should include point, | 1259 | START and END delimit the entity to complete and should include point, |
| @@ -1265,7 +1271,7 @@ The completion method is determined by `completion-at-point-functions'." | |||
| 1265 | 'completion-at-point-functions))) | 1271 | 'completion-at-point-functions))) |
| 1266 | (cond | 1272 | (cond |
| 1267 | ((functionp res) (funcall res)) | 1273 | ((functionp res) (funcall res)) |
| 1268 | (res | 1274 | ((consp res) |
| 1269 | (let* ((plist (nthcdr 3 res)) | 1275 | (let* ((plist (nthcdr 3 res)) |
| 1270 | (start (nth 0 res)) | 1276 | (start (nth 0 res)) |
| 1271 | (end (nth 1 res)) | 1277 | (end (nth 1 res)) |
| @@ -1273,7 +1279,8 @@ The completion method is determined by `completion-at-point-functions'." | |||
| 1273 | (or (plist-get plist :annotation-function) | 1279 | (or (plist-get plist :annotation-function) |
| 1274 | completion-annotate-function))) | 1280 | completion-annotate-function))) |
| 1275 | (completion-in-region start end (nth 2 res) | 1281 | (completion-in-region start end (nth 2 res) |
| 1276 | (plist-get plist :predicate))))))) | 1282 | (plist-get plist :predicate)))) |
| 1283 | (res)))) ;Maybe completion already happened and the function returned t. | ||
| 1277 | 1284 | ||
| 1278 | ;;; Key bindings. | 1285 | ;;; Key bindings. |
| 1279 | 1286 | ||
| @@ -1480,8 +1487,9 @@ except that it passes the file name through `substitute-in-file-name'." | |||
| 1480 | 'completion--file-name-table) | 1487 | 'completion--file-name-table) |
| 1481 | "Internal subroutine for `read-file-name'. Do not call this.") | 1488 | "Internal subroutine for `read-file-name'. Do not call this.") |
| 1482 | 1489 | ||
| 1483 | (defvar read-file-name-function nil | 1490 | (defvar read-file-name-function 'read-file-name-default |
| 1484 | "If this is non-nil, `read-file-name' does its work by calling this function.") | 1491 | "The function called by `read-file-name' to do its work. |
| 1492 | It should accept the same arguments as `read-file-name'.") | ||
| 1485 | 1493 | ||
| 1486 | (defcustom read-file-name-completion-ignore-case | 1494 | (defcustom read-file-name-completion-ignore-case |
| 1487 | (if (memq system-type '(ms-dos windows-nt darwin cygwin)) | 1495 | (if (memq system-type '(ms-dos windows-nt darwin cygwin)) |
| @@ -1519,7 +1527,7 @@ such as making the current buffer visit no file in the case of | |||
| 1519 | (declare-function x-file-dialog "xfns.c" | 1527 | (declare-function x-file-dialog "xfns.c" |
| 1520 | (prompt dir &optional default-filename mustmatch only-dir-p)) | 1528 | (prompt dir &optional default-filename mustmatch only-dir-p)) |
| 1521 | 1529 | ||
| 1522 | (defun read-file-name-defaults (&optional dir initial) | 1530 | (defun read-file-name--defaults (&optional dir initial) |
| 1523 | (let ((default | 1531 | (let ((default |
| 1524 | (cond | 1532 | (cond |
| 1525 | ;; With non-nil `initial', use `dir' as the first default. | 1533 | ;; With non-nil `initial', use `dir' as the first default. |
| @@ -1586,6 +1594,12 @@ treated as equivalent to nil. | |||
| 1586 | 1594 | ||
| 1587 | See also `read-file-name-completion-ignore-case' | 1595 | See also `read-file-name-completion-ignore-case' |
| 1588 | and `read-file-name-function'." | 1596 | and `read-file-name-function'." |
| 1597 | (funcall (or read-file-name-function #'read-file-name-default) | ||
| 1598 | prompt dir default-filename mustmatch initial predicate)) | ||
| 1599 | |||
| 1600 | (defun read-file-name-default (prompt &optional dir default-filename mustmatch initial predicate) | ||
| 1601 | "Default method for reading file names. | ||
| 1602 | See `read-file-name' for the meaning of the arguments." | ||
| 1589 | (unless dir (setq dir default-directory)) | 1603 | (unless dir (setq dir default-directory)) |
| 1590 | (unless (file-name-absolute-p dir) (setq dir (expand-file-name dir))) | 1604 | (unless (file-name-absolute-p dir) (setq dir (expand-file-name dir))) |
| 1591 | (unless default-filename | 1605 | (unless default-filename |
| @@ -1607,9 +1621,6 @@ and `read-file-name-function'." | |||
| 1607 | (minibuffer--double-dollars dir))) | 1621 | (minibuffer--double-dollars dir))) |
| 1608 | (initial (cons (minibuffer--double-dollars initial) 0))))) | 1622 | (initial (cons (minibuffer--double-dollars initial) 0))))) |
| 1609 | 1623 | ||
| 1610 | (if read-file-name-function | ||
| 1611 | (funcall read-file-name-function | ||
| 1612 | prompt dir default-filename mustmatch initial predicate) | ||
| 1613 | (let ((completion-ignore-case read-file-name-completion-ignore-case) | 1624 | (let ((completion-ignore-case read-file-name-completion-ignore-case) |
| 1614 | (minibuffer-completing-file-name t) | 1625 | (minibuffer-completing-file-name t) |
| 1615 | (pred (or predicate 'file-exists-p)) | 1626 | (pred (or predicate 'file-exists-p)) |
| @@ -1645,7 +1656,7 @@ and `read-file-name-function'." | |||
| 1645 | (lambda () | 1656 | (lambda () |
| 1646 | (with-current-buffer | 1657 | (with-current-buffer |
| 1647 | (window-buffer (minibuffer-selected-window)) | 1658 | (window-buffer (minibuffer-selected-window)) |
| 1648 | (read-file-name-defaults dir initial))))) | 1659 | (read-file-name--defaults dir initial))))) |
| 1649 | (completing-read prompt 'read-file-name-internal | 1660 | (completing-read prompt 'read-file-name-internal |
| 1650 | pred mustmatch insdef | 1661 | pred mustmatch insdef |
| 1651 | 'file-name-history default-filename))) | 1662 | 'file-name-history default-filename))) |
| @@ -1719,7 +1730,7 @@ and `read-file-name-function'." | |||
| 1719 | (if history-delete-duplicates | 1730 | (if history-delete-duplicates |
| 1720 | (delete val1 file-name-history) | 1731 | (delete val1 file-name-history) |
| 1721 | file-name-history))))))) | 1732 | file-name-history))))))) |
| 1722 | val))))) | 1733 | val)))) |
| 1723 | 1734 | ||
| 1724 | (defun internal-complete-buffer-except (&optional buffer) | 1735 | (defun internal-complete-buffer-except (&optional buffer) |
| 1725 | "Perform completion on all buffers excluding BUFFER. | 1736 | "Perform completion on all buffers excluding BUFFER. |
diff --git a/lisp/net/imap.el b/lisp/net/imap.el index 6d80b97fd23..f4af03f100f 100644 --- a/lisp/net/imap.el +++ b/lisp/net/imap.el | |||
| @@ -211,7 +211,7 @@ until a successful connection is made." | |||
| 211 | :type '(repeat string)) | 211 | :type '(repeat string)) |
| 212 | 212 | ||
| 213 | (defcustom imap-process-connection-type nil | 213 | (defcustom imap-process-connection-type nil |
| 214 | "*Value for `process-connection-type' to use for Kerberos4, GSSAPI and SSL. | 214 | "*Value for `process-connection-type' to use for Kerberos4, GSSAPI, shell, and SSL. |
| 215 | The `process-connection-type' variable controls the type of device | 215 | The `process-connection-type' variable controls the type of device |
| 216 | used to communicate with subprocesses. Values are nil to use a | 216 | used to communicate with subprocesses. Values are nil to use a |
| 217 | pipe, or t or `pty' to use a pty. The value has no effect if the | 217 | pipe, or t or `pty' to use a pty. The value has no effect if the |
| @@ -770,6 +770,7 @@ sure of changing the value of `foo'." | |||
| 770 | (let* ((port (or port imap-default-port)) | 770 | (let* ((port (or port imap-default-port)) |
| 771 | (coding-system-for-read imap-coding-system-for-read) | 771 | (coding-system-for-read imap-coding-system-for-read) |
| 772 | (coding-system-for-write imap-coding-system-for-write) | 772 | (coding-system-for-write imap-coding-system-for-write) |
| 773 | (process-connection-type imap-process-connection-type) | ||
| 773 | (process (start-process | 774 | (process (start-process |
| 774 | name buffer shell-file-name shell-command-switch | 775 | name buffer shell-file-name shell-command-switch |
| 775 | (format-spec | 776 | (format-spec |
diff --git a/lisp/net/rcirc.el b/lisp/net/rcirc.el index 71aa0dd22bc..eb4ad01ecd7 100644 --- a/lisp/net/rcirc.el +++ b/lisp/net/rcirc.el | |||
| @@ -491,6 +491,7 @@ If ARG is non-nil, instead prompt for connection parameters." | |||
| 491 | (defvar rcirc-server nil) ; server provided by server | 491 | (defvar rcirc-server nil) ; server provided by server |
| 492 | (defvar rcirc-server-name nil) ; server name given by 001 response | 492 | (defvar rcirc-server-name nil) ; server name given by 001 response |
| 493 | (defvar rcirc-timeout-timer nil) | 493 | (defvar rcirc-timeout-timer nil) |
| 494 | (defvar rcirc-user-authenticated nil) | ||
| 494 | (defvar rcirc-user-disconnect nil) | 495 | (defvar rcirc-user-disconnect nil) |
| 495 | (defvar rcirc-connecting nil) | 496 | (defvar rcirc-connecting nil) |
| 496 | (defvar rcirc-process nil) | 497 | (defvar rcirc-process nil) |
| @@ -828,18 +829,21 @@ The list is updated automatically by `defun-rcirc-command'.") | |||
| 828 | 829 | ||
| 829 | (defun rcirc-completion-at-point () | 830 | (defun rcirc-completion-at-point () |
| 830 | "Function used for `completion-at-point-functions' in `rcirc-mode'." | 831 | "Function used for `completion-at-point-functions' in `rcirc-mode'." |
| 831 | (let* ((beg (save-excursion | 832 | (and (rcirc-looking-at-input) |
| 832 | (if (re-search-backward " " rcirc-prompt-end-marker t) | 833 | (let* ((beg (save-excursion |
| 833 | (1+ (point)) | 834 | (if (re-search-backward " " rcirc-prompt-end-marker t) |
| 834 | rcirc-prompt-end-marker))) | 835 | (1+ (point)) |
| 835 | (table (if (and (= beg rcirc-prompt-end-marker) | 836 | rcirc-prompt-end-marker))) |
| 836 | (eq (char-after beg) ?/)) | 837 | (table (if (and (= beg rcirc-prompt-end-marker) |
| 837 | (delete-dups | 838 | (eq (char-after beg) ?/)) |
| 838 | (nconc | 839 | (delete-dups |
| 839 | (sort (copy-sequence rcirc-client-commands) 'string-lessp) | 840 | (nconc (sort (copy-sequence rcirc-client-commands) |
| 840 | (sort (copy-sequence rcirc-server-commands) 'string-lessp))) | 841 | 'string-lessp) |
| 841 | (rcirc-channel-nicks (rcirc-buffer-process) rcirc-target)))) | 842 | (sort (copy-sequence rcirc-server-commands) |
| 842 | (list beg (point) table))) | 843 | 'string-lessp))) |
| 844 | (rcirc-channel-nicks (rcirc-buffer-process) | ||
| 845 | rcirc-target)))) | ||
| 846 | (list beg (point) table)))) | ||
| 843 | 847 | ||
| 844 | (defvar rcirc-completions nil) | 848 | (defvar rcirc-completions nil) |
| 845 | (defvar rcirc-completion-start nil) | 849 | (defvar rcirc-completion-start nil) |
| @@ -848,6 +852,8 @@ The list is updated automatically by `defun-rcirc-command'.") | |||
| 848 | "Cycle through completions from list of nicks in channel or IRC commands. | 852 | "Cycle through completions from list of nicks in channel or IRC commands. |
| 849 | IRC command completion is performed only if '/' is the first input char." | 853 | IRC command completion is performed only if '/' is the first input char." |
| 850 | (interactive) | 854 | (interactive) |
| 855 | (unless (rcirc-looking-at-input) | ||
| 856 | (error "Point not located after rcirc prompt")) | ||
| 851 | (if (eq last-command this-command) | 857 | (if (eq last-command this-command) |
| 852 | (setq rcirc-completions | 858 | (setq rcirc-completions |
| 853 | (append (cdr rcirc-completions) (list (car rcirc-completions)))) | 859 | (append (cdr rcirc-completions) (list (car rcirc-completions)))) |
| @@ -855,9 +861,10 @@ IRC command completion is performed only if '/' is the first input char." | |||
| 855 | (table (rcirc-completion-at-point))) | 861 | (table (rcirc-completion-at-point))) |
| 856 | (setq rcirc-completion-start (car table)) | 862 | (setq rcirc-completion-start (car table)) |
| 857 | (setq rcirc-completions | 863 | (setq rcirc-completions |
| 858 | (all-completions (buffer-substring rcirc-completion-start | 864 | (and rcirc-completion-start |
| 859 | (cadr table)) | 865 | (all-completions (buffer-substring rcirc-completion-start |
| 860 | (nth 2 table))))) | 866 | (cadr table)) |
| 867 | (nth 2 table)))))) | ||
| 861 | (let ((completion (car rcirc-completions))) | 868 | (let ((completion (car rcirc-completions))) |
| 862 | (when completion | 869 | (when completion |
| 863 | (delete-region rcirc-completion-start (point)) | 870 | (delete-region rcirc-completion-start (point)) |
diff --git a/lisp/abbrevlist.el b/lisp/obsolete/abbrevlist.el index 79080780005..55940dfc1ce 100644 --- a/lisp/abbrevlist.el +++ b/lisp/obsolete/abbrevlist.el | |||
| @@ -6,6 +6,7 @@ | |||
| 6 | ;; Maintainer: FSF | 6 | ;; Maintainer: FSF |
| 7 | ;; Keywords: abbrev | 7 | ;; Keywords: abbrev |
| 8 | ;; Package: emacs | 8 | ;; Package: emacs |
| 9 | ;; Obsolete-since: 24.1 | ||
| 9 | 10 | ||
| 10 | ;; This file is part of GNU Emacs. | 11 | ;; This file is part of GNU Emacs. |
| 11 | 12 | ||
diff --git a/lisp/progmodes/gdb-mi.el b/lisp/progmodes/gdb-mi.el index ab315f9eefd..6aece579d5d 100644 --- a/lisp/progmodes/gdb-mi.el +++ b/lisp/progmodes/gdb-mi.el | |||
| @@ -648,7 +648,7 @@ detailed description of this mode. | |||
| 648 | (set (make-local-variable 'gud-minor-mode) 'gdbmi) | 648 | (set (make-local-variable 'gud-minor-mode) 'gdbmi) |
| 649 | (setq comint-input-sender 'gdb-send) | 649 | (setq comint-input-sender 'gdb-send) |
| 650 | (when (ring-empty-p comint-input-ring) ; cf shell-mode | 650 | (when (ring-empty-p comint-input-ring) ; cf shell-mode |
| 651 | (let ((hfile (expand-file-name (or (getenv "GBDHISTFILE") | 651 | (let ((hfile (expand-file-name (or (getenv "GDBHISTFILE") |
| 652 | (if (eq system-type 'ms-dos) | 652 | (if (eq system-type 'ms-dos) |
| 653 | "_gdb_history" | 653 | "_gdb_history" |
| 654 | ".gdb_history")))) | 654 | ".gdb_history")))) |
diff --git a/lisp/simple.el b/lisp/simple.el index e4c742b56f4..a414fc77a39 100644 --- a/lisp/simple.el +++ b/lisp/simple.el | |||
| @@ -3346,16 +3346,16 @@ and KILLP is t if a prefix arg was specified." | |||
| 3346 | (delete-char 1))) | 3346 | (delete-char 1))) |
| 3347 | (forward-char -1) | 3347 | (forward-char -1) |
| 3348 | (setq count (1- count)))))) | 3348 | (setq count (1- count)))))) |
| 3349 | (delete-backward-char | 3349 | (let* ((skip (cond ((eq backward-delete-char-untabify-method 'hungry) " \t") |
| 3350 | (let ((skip (cond ((eq backward-delete-char-untabify-method 'hungry) " \t") | ||
| 3351 | ((eq backward-delete-char-untabify-method 'all) | 3350 | ((eq backward-delete-char-untabify-method 'all) |
| 3352 | " \t\n\r")))) | 3351 | " \t\n\r"))) |
| 3353 | (if skip | 3352 | (n (if skip |
| 3354 | (let ((wh (- (point) (save-excursion (skip-chars-backward skip) | 3353 | (let ((wh (- (point) (save-excursion (skip-chars-backward skip) |
| 3355 | (point))))) | 3354 | (point))))) |
| 3356 | (+ arg (if (zerop wh) 0 (1- wh)))) | 3355 | (+ arg (if (zerop wh) 0 (1- wh)))) |
| 3357 | arg)) | 3356 | arg))) |
| 3358 | killp)) | 3357 | ;; Avoid warning about delete-backward-char |
| 3358 | (with-no-warnings (delete-backward-char n killp)))) | ||
| 3359 | 3359 | ||
| 3360 | (defun zap-to-char (arg char) | 3360 | (defun zap-to-char (arg char) |
| 3361 | "Kill up to and including ARGth occurrence of CHAR. | 3361 | "Kill up to and including ARGth occurrence of CHAR. |
diff --git a/lisp/subr.el b/lisp/subr.el index 205828b4169..e6e0c62e0b4 100644 --- a/lisp/subr.el +++ b/lisp/subr.el | |||
| @@ -1122,6 +1122,8 @@ is converted into a string by expressing it in decimal." | |||
| 1122 | 1122 | ||
| 1123 | (make-obsolete-variable 'define-key-rebound-commands nil "23.2") | 1123 | (make-obsolete-variable 'define-key-rebound-commands nil "23.2") |
| 1124 | (make-obsolete-variable 'redisplay-end-trigger-functions 'jit-lock-register "23.1") | 1124 | (make-obsolete-variable 'redisplay-end-trigger-functions 'jit-lock-register "23.1") |
| 1125 | (make-obsolete-variable 'deferred-action-list 'post-command-hook "24.1") | ||
| 1126 | (make-obsolete-variable 'deferred-action-function 'post-command-hook "24.1") | ||
| 1125 | (make-obsolete 'window-redisplay-end-trigger nil "23.1") | 1127 | (make-obsolete 'window-redisplay-end-trigger nil "23.1") |
| 1126 | (make-obsolete 'set-window-redisplay-end-trigger nil "23.1") | 1128 | (make-obsolete 'set-window-redisplay-end-trigger nil "23.1") |
| 1127 | 1129 | ||
diff --git a/lisp/thingatpt.el b/lisp/thingatpt.el index 020faa197cd..a56c3e4d501 100644 --- a/lisp/thingatpt.el +++ b/lisp/thingatpt.el | |||
| @@ -207,6 +207,12 @@ a symbol as a valid THING." | |||
| 207 | (cons opoint end)))) | 207 | (cons opoint end)))) |
| 208 | (error nil))))) | 208 | (error nil))))) |
| 209 | 209 | ||
| 210 | ;; Defuns | ||
| 211 | |||
| 212 | (put 'defun 'beginning-op 'beginning-of-defun) | ||
| 213 | (put 'defun 'end-op 'end-of-defun) | ||
| 214 | (put 'defun 'forward-op 'end-of-defun) | ||
| 215 | |||
| 210 | ;; Filenames and URLs www.com/foo%32bar | 216 | ;; Filenames and URLs www.com/foo%32bar |
| 211 | 217 | ||
| 212 | (defvar thing-at-point-file-name-chars "-~/[:alnum:]_.${}#%,:" | 218 | (defvar thing-at-point-file-name-chars "-~/[:alnum:]_.${}#%,:" |
diff --git a/lisp/vc/log-view.el b/lisp/vc/log-view.el index d9a06c8a401..9f6ad19fdb1 100644 --- a/lisp/vc/log-view.el +++ b/lisp/vc/log-view.el | |||
| @@ -122,9 +122,6 @@ | |||
| 122 | :group 'pcl-cvs | 122 | :group 'pcl-cvs |
| 123 | :prefix "log-view-") | 123 | :prefix "log-view-") |
| 124 | 124 | ||
| 125 | ;; Needed because log-view-mode-map inherits from widget-keymap. (Bug#5311) | ||
| 126 | (require 'wid-edit) | ||
| 127 | |||
| 128 | (easy-mmode-defmap log-view-mode-map | 125 | (easy-mmode-defmap log-view-mode-map |
| 129 | '( | 126 | '( |
| 130 | ;; FIXME: (copy-keymap special-mode-map) instead | 127 | ;; FIXME: (copy-keymap special-mode-map) instead |
diff --git a/m4/gl-comp.m4 b/m4/gl-comp.m4 index 8bf5a64a5f9..af3cae75abb 100644 --- a/m4/gl-comp.m4 +++ b/m4/gl-comp.m4 | |||
| @@ -45,10 +45,12 @@ AC_DEFUN([gl_EARLY], | |||
| 45 | # Code from module mktime: | 45 | # Code from module mktime: |
| 46 | # Code from module multiarch: | 46 | # Code from module multiarch: |
| 47 | # Code from module readlink: | 47 | # Code from module readlink: |
| 48 | # Code from module socklen: | ||
| 48 | # Code from module stat: | 49 | # Code from module stat: |
| 49 | # Code from module stdbool: | 50 | # Code from module stdbool: |
| 50 | # Code from module stddef: | 51 | # Code from module stddef: |
| 51 | # Code from module stdint: | 52 | # Code from module stdint: |
| 53 | # Code from module stdio: | ||
| 52 | # Code from module stdlib: | 54 | # Code from module stdlib: |
| 53 | # Code from module strftime: | 55 | # Code from module strftime: |
| 54 | # Code from module symlink: | 56 | # Code from module symlink: |
| @@ -111,6 +113,8 @@ AC_DEFUN([gl_INIT], | |||
| 111 | # Code from module readlink: | 113 | # Code from module readlink: |
| 112 | gl_FUNC_READLINK | 114 | gl_FUNC_READLINK |
| 113 | gl_UNISTD_MODULE_INDICATOR([readlink]) | 115 | gl_UNISTD_MODULE_INDICATOR([readlink]) |
| 116 | # Code from module socklen: | ||
| 117 | gl_TYPE_SOCKLEN_T | ||
| 114 | # Code from module stat: | 118 | # Code from module stat: |
| 115 | gl_FUNC_STAT | 119 | gl_FUNC_STAT |
| 116 | gl_SYS_STAT_MODULE_INDICATOR([stat]) | 120 | gl_SYS_STAT_MODULE_INDICATOR([stat]) |
| @@ -120,6 +124,8 @@ AC_DEFUN([gl_INIT], | |||
| 120 | gl_STDDEF_H | 124 | gl_STDDEF_H |
| 121 | # Code from module stdint: | 125 | # Code from module stdint: |
| 122 | gl_STDINT_H | 126 | gl_STDINT_H |
| 127 | # Code from module stdio: | ||
| 128 | gl_STDIO_H | ||
| 123 | # Code from module stdlib: | 129 | # Code from module stdlib: |
| 124 | gl_STDLIB_H | 130 | gl_STDLIB_H |
| 125 | # Code from module strftime: | 131 | # Code from module strftime: |
| @@ -305,6 +311,7 @@ AC_DEFUN([gl_FILE_LIST], [ | |||
| 305 | lib/stdbool.in.h | 311 | lib/stdbool.in.h |
| 306 | lib/stddef.in.h | 312 | lib/stddef.in.h |
| 307 | lib/stdint.in.h | 313 | lib/stdint.in.h |
| 314 | lib/stdio.in.h | ||
| 308 | lib/stdlib.in.h | 315 | lib/stdlib.in.h |
| 309 | lib/strftime.c | 316 | lib/strftime.c |
| 310 | lib/strftime.h | 317 | lib/strftime.h |
| @@ -327,11 +334,13 @@ AC_DEFUN([gl_FILE_LIST], [ | |||
| 327 | m4/mktime.m4 | 334 | m4/mktime.m4 |
| 328 | m4/multiarch.m4 | 335 | m4/multiarch.m4 |
| 329 | m4/readlink.m4 | 336 | m4/readlink.m4 |
| 337 | m4/socklen.m4 | ||
| 330 | m4/st_dm_mode.m4 | 338 | m4/st_dm_mode.m4 |
| 331 | m4/stat.m4 | 339 | m4/stat.m4 |
| 332 | m4/stdbool.m4 | 340 | m4/stdbool.m4 |
| 333 | m4/stddef_h.m4 | 341 | m4/stddef_h.m4 |
| 334 | m4/stdint.m4 | 342 | m4/stdint.m4 |
| 343 | m4/stdio_h.m4 | ||
| 335 | m4/stdlib_h.m4 | 344 | m4/stdlib_h.m4 |
| 336 | m4/strftime.m4 | 345 | m4/strftime.m4 |
| 337 | m4/symlink.m4 | 346 | m4/symlink.m4 |
diff --git a/m4/socklen.m4 b/m4/socklen.m4 new file mode 100644 index 00000000000..44751544485 --- /dev/null +++ b/m4/socklen.m4 | |||
| @@ -0,0 +1,77 @@ | |||
| 1 | # socklen.m4 serial 10 | ||
| 2 | dnl Copyright (C) 2005-2007, 2009-2011 Free Software Foundation, Inc. | ||
| 3 | dnl This file is free software; the Free Software Foundation | ||
| 4 | dnl gives unlimited permission to copy and/or distribute it, | ||
| 5 | dnl with or without modifications, as long as this notice is preserved. | ||
| 6 | |||
| 7 | dnl From Albert Chin, Windows fixes from Simon Josefsson. | ||
| 8 | |||
| 9 | dnl Check for socklen_t: historically on BSD it is an int, and in | ||
| 10 | dnl POSIX 1g it is a type of its own, but some platforms use different | ||
| 11 | dnl types for the argument to getsockopt, getpeername, etc.: | ||
| 12 | dnl HP-UX 10.20, IRIX 6.5, OSF/1 4.0, Interix 3.5, BeOS. | ||
| 13 | dnl So we have to test to find something that will work. | ||
| 14 | |||
| 15 | AC_DEFUN([gl_TYPE_SOCKLEN_T], | ||
| 16 | [AC_REQUIRE([gl_CHECK_SOCKET_HEADERS])dnl | ||
| 17 | AC_CHECK_TYPE([socklen_t], , | ||
| 18 | [AC_MSG_CHECKING([for socklen_t equivalent]) | ||
| 19 | AC_CACHE_VAL([gl_cv_socklen_t_equiv], | ||
| 20 | [# Systems have either "struct sockaddr *" or | ||
| 21 | # "void *" as the second argument to getpeername | ||
| 22 | gl_cv_socklen_t_equiv= | ||
| 23 | for arg2 in "struct sockaddr" void; do | ||
| 24 | for t in int size_t "unsigned int" "long int" "unsigned long int"; do | ||
| 25 | AC_COMPILE_IFELSE([AC_LANG_PROGRAM( | ||
| 26 | [[#include <sys/types.h> | ||
| 27 | #include <sys/socket.h> | ||
| 28 | |||
| 29 | int getpeername (int, $arg2 *, $t *);]], | ||
| 30 | [[$t len; | ||
| 31 | getpeername (0, 0, &len);]])], | ||
| 32 | [gl_cv_socklen_t_equiv="$t"]) | ||
| 33 | test "$gl_cv_socklen_t_equiv" != "" && break | ||
| 34 | done | ||
| 35 | test "$gl_cv_socklen_t_equiv" != "" && break | ||
| 36 | done | ||
| 37 | ]) | ||
| 38 | if test "$gl_cv_socklen_t_equiv" = ""; then | ||
| 39 | AC_MSG_ERROR([Cannot find a type to use in place of socklen_t]) | ||
| 40 | fi | ||
| 41 | AC_MSG_RESULT([$gl_cv_socklen_t_equiv]) | ||
| 42 | AC_DEFINE_UNQUOTED([socklen_t], [$gl_cv_socklen_t_equiv], | ||
| 43 | [type to use in place of socklen_t if not defined])], | ||
| 44 | [gl_SOCKET_HEADERS])]) | ||
| 45 | |||
| 46 | dnl On mingw32, socklen_t is in ws2tcpip.h ('int'), so we try to find | ||
| 47 | dnl it there too. But on Cygwin, wc2tcpip.h must not be included. Users | ||
| 48 | dnl of this module should use the same include pattern as gl_SOCKET_HEADERS. | ||
| 49 | dnl When you change this macro, keep also in sync: | ||
| 50 | dnl - gl_CHECK_SOCKET_HEADERS, | ||
| 51 | dnl - the Include section of modules/socklen. | ||
| 52 | AC_DEFUN([gl_SOCKET_HEADERS], | ||
| 53 | [ | ||
| 54 | /* <sys/types.h> is not needed according to POSIX, but the | ||
| 55 | <sys/socket.h> in i386-unknown-freebsd4.10 and | ||
| 56 | powerpc-apple-darwin5.5 required it. */ | ||
| 57 | #include <sys/types.h> | ||
| 58 | #if HAVE_SYS_SOCKET_H | ||
| 59 | # include <sys/socket.h> | ||
| 60 | #elif HAVE_WS2TCPIP_H | ||
| 61 | # include <ws2tcpip.h> | ||
| 62 | #endif | ||
| 63 | ]) | ||
| 64 | |||
| 65 | dnl Tests for the existence of the header for socket facilities. | ||
| 66 | dnl Defines the C macros HAVE_SYS_SOCKET_H, HAVE_WS2TCPIP_H. | ||
| 67 | dnl This macro must match gl_SOCKET_HEADERS. | ||
| 68 | AC_DEFUN([gl_CHECK_SOCKET_HEADERS], | ||
| 69 | [AC_CHECK_HEADERS_ONCE([sys/socket.h]) | ||
| 70 | if test $ac_cv_header_sys_socket_h = no; then | ||
| 71 | dnl We cannot use AC_CHECK_HEADERS_ONCE here, because that would make | ||
| 72 | dnl the check for those headers unconditional; yet cygwin reports | ||
| 73 | dnl that the headers are present but cannot be compiled (since on | ||
| 74 | dnl cygwin, all socket information should come from sys/socket.h). | ||
| 75 | AC_CHECK_HEADERS([ws2tcpip.h]) | ||
| 76 | fi | ||
| 77 | ]) | ||
diff --git a/m4/stdio_h.m4 b/m4/stdio_h.m4 new file mode 100644 index 00000000000..7f3ae56295f --- /dev/null +++ b/m4/stdio_h.m4 | |||
| @@ -0,0 +1,140 @@ | |||
| 1 | # stdio_h.m4 serial 33 | ||
| 2 | dnl Copyright (C) 2007-2011 Free Software Foundation, Inc. | ||
| 3 | dnl This file is free software; the Free Software Foundation | ||
| 4 | dnl gives unlimited permission to copy and/or distribute it, | ||
| 5 | dnl with or without modifications, as long as this notice is preserved. | ||
| 6 | |||
| 7 | AC_DEFUN([gl_STDIO_H], | ||
| 8 | [ | ||
| 9 | AC_REQUIRE([gl_STDIO_H_DEFAULTS]) | ||
| 10 | AC_REQUIRE([AC_C_INLINE]) | ||
| 11 | gl_NEXT_HEADERS([stdio.h]) | ||
| 12 | dnl No need to create extra modules for these functions. Everyone who uses | ||
| 13 | dnl <stdio.h> likely needs them. | ||
| 14 | GNULIB_FPRINTF=1 | ||
| 15 | GNULIB_PRINTF=1 | ||
| 16 | GNULIB_VFPRINTF=1 | ||
| 17 | GNULIB_VPRINTF=1 | ||
| 18 | GNULIB_FPUTC=1 | ||
| 19 | GNULIB_PUTC=1 | ||
| 20 | GNULIB_PUTCHAR=1 | ||
| 21 | GNULIB_FPUTS=1 | ||
| 22 | GNULIB_PUTS=1 | ||
| 23 | GNULIB_FWRITE=1 | ||
| 24 | dnl This ifdef is just an optimization, to avoid performing a configure | ||
| 25 | dnl check whose result is not used. It does not make the test of | ||
| 26 | dnl GNULIB_STDIO_H_SIGPIPE or GNULIB_SIGPIPE redundant. | ||
| 27 | m4_ifdef([gl_SIGNAL_SIGPIPE], [ | ||
| 28 | gl_SIGNAL_SIGPIPE | ||
| 29 | if test $gl_cv_header_signal_h_SIGPIPE != yes; then | ||
| 30 | REPLACE_STDIO_WRITE_FUNCS=1 | ||
| 31 | AC_LIBOBJ([stdio-write]) | ||
| 32 | fi | ||
| 33 | ]) | ||
| 34 | |||
| 35 | dnl Check for declarations of anything we want to poison if the | ||
| 36 | dnl corresponding gnulib module is not in use, and which is not | ||
| 37 | dnl guaranteed by C89. | ||
| 38 | gl_WARN_ON_USE_PREPARE([[#include <stdio.h> | ||
| 39 | ]], [dprintf fpurge fseeko ftello getdelim getline popen renameat | ||
| 40 | snprintf tmpfile vdprintf vsnprintf]) | ||
| 41 | ]) | ||
| 42 | |||
| 43 | AC_DEFUN([gl_STDIO_MODULE_INDICATOR], | ||
| 44 | [ | ||
| 45 | dnl Use AC_REQUIRE here, so that the default settings are expanded once only. | ||
| 46 | AC_REQUIRE([gl_STDIO_H_DEFAULTS]) | ||
| 47 | gl_MODULE_INDICATOR_SET_VARIABLE([$1]) | ||
| 48 | dnl Define it also as a C macro, for the benefit of the unit tests. | ||
| 49 | gl_MODULE_INDICATOR_FOR_TESTS([$1]) | ||
| 50 | ]) | ||
| 51 | |||
| 52 | AC_DEFUN([gl_STDIO_H_DEFAULTS], | ||
| 53 | [ | ||
| 54 | GNULIB_DPRINTF=0; AC_SUBST([GNULIB_DPRINTF]) | ||
| 55 | GNULIB_FCLOSE=0; AC_SUBST([GNULIB_FCLOSE]) | ||
| 56 | GNULIB_FFLUSH=0; AC_SUBST([GNULIB_FFLUSH]) | ||
| 57 | GNULIB_FOPEN=0; AC_SUBST([GNULIB_FOPEN]) | ||
| 58 | GNULIB_FPRINTF=0; AC_SUBST([GNULIB_FPRINTF]) | ||
| 59 | GNULIB_FPRINTF_POSIX=0; AC_SUBST([GNULIB_FPRINTF_POSIX]) | ||
| 60 | GNULIB_FPURGE=0; AC_SUBST([GNULIB_FPURGE]) | ||
| 61 | GNULIB_FPUTC=0; AC_SUBST([GNULIB_FPUTC]) | ||
| 62 | GNULIB_FPUTS=0; AC_SUBST([GNULIB_FPUTS]) | ||
| 63 | GNULIB_FREOPEN=0; AC_SUBST([GNULIB_FREOPEN]) | ||
| 64 | GNULIB_FSEEK=0; AC_SUBST([GNULIB_FSEEK]) | ||
| 65 | GNULIB_FSEEKO=0; AC_SUBST([GNULIB_FSEEKO]) | ||
| 66 | GNULIB_FTELL=0; AC_SUBST([GNULIB_FTELL]) | ||
| 67 | GNULIB_FTELLO=0; AC_SUBST([GNULIB_FTELLO]) | ||
| 68 | GNULIB_FWRITE=0; AC_SUBST([GNULIB_FWRITE]) | ||
| 69 | GNULIB_GETDELIM=0; AC_SUBST([GNULIB_GETDELIM]) | ||
| 70 | GNULIB_GETLINE=0; AC_SUBST([GNULIB_GETLINE]) | ||
| 71 | GNULIB_OBSTACK_PRINTF=0; AC_SUBST([GNULIB_OBSTACK_PRINTF]) | ||
| 72 | GNULIB_OBSTACK_PRINTF_POSIX=0; AC_SUBST([GNULIB_OBSTACK_PRINTF_POSIX]) | ||
| 73 | GNULIB_PERROR=0; AC_SUBST([GNULIB_PERROR]) | ||
| 74 | GNULIB_POPEN=0; AC_SUBST([GNULIB_POPEN]) | ||
| 75 | GNULIB_PRINTF=0; AC_SUBST([GNULIB_PRINTF]) | ||
| 76 | GNULIB_PRINTF_POSIX=0; AC_SUBST([GNULIB_PRINTF_POSIX]) | ||
| 77 | GNULIB_PUTC=0; AC_SUBST([GNULIB_PUTC]) | ||
| 78 | GNULIB_PUTCHAR=0; AC_SUBST([GNULIB_PUTCHAR]) | ||
| 79 | GNULIB_PUTS=0; AC_SUBST([GNULIB_PUTS]) | ||
| 80 | GNULIB_REMOVE=0; AC_SUBST([GNULIB_REMOVE]) | ||
| 81 | GNULIB_RENAME=0; AC_SUBST([GNULIB_RENAME]) | ||
| 82 | GNULIB_RENAMEAT=0; AC_SUBST([GNULIB_RENAMEAT]) | ||
| 83 | GNULIB_SNPRINTF=0; AC_SUBST([GNULIB_SNPRINTF]) | ||
| 84 | GNULIB_SPRINTF_POSIX=0; AC_SUBST([GNULIB_SPRINTF_POSIX]) | ||
| 85 | GNULIB_STDIO_H_SIGPIPE=0; AC_SUBST([GNULIB_STDIO_H_SIGPIPE]) | ||
| 86 | GNULIB_TMPFILE=0; AC_SUBST([GNULIB_TMPFILE]) | ||
| 87 | GNULIB_VASPRINTF=0; AC_SUBST([GNULIB_VASPRINTF]) | ||
| 88 | GNULIB_VDPRINTF=0; AC_SUBST([GNULIB_VDPRINTF]) | ||
| 89 | GNULIB_VFPRINTF=0; AC_SUBST([GNULIB_VFPRINTF]) | ||
| 90 | GNULIB_VFPRINTF_POSIX=0; AC_SUBST([GNULIB_VFPRINTF_POSIX]) | ||
| 91 | GNULIB_VPRINTF=0; AC_SUBST([GNULIB_VPRINTF]) | ||
| 92 | GNULIB_VPRINTF_POSIX=0; AC_SUBST([GNULIB_VPRINTF_POSIX]) | ||
| 93 | GNULIB_VSNPRINTF=0; AC_SUBST([GNULIB_VSNPRINTF]) | ||
| 94 | GNULIB_VSPRINTF_POSIX=0; AC_SUBST([GNULIB_VSPRINTF_POSIX]) | ||
| 95 | dnl Assume proper GNU behavior unless another module says otherwise. | ||
| 96 | HAVE_DECL_FPURGE=1; AC_SUBST([HAVE_DECL_FPURGE]) | ||
| 97 | HAVE_DECL_FSEEKO=1; AC_SUBST([HAVE_DECL_FSEEKO]) | ||
| 98 | HAVE_DECL_FTELLO=1; AC_SUBST([HAVE_DECL_FTELLO]) | ||
| 99 | HAVE_DECL_GETDELIM=1; AC_SUBST([HAVE_DECL_GETDELIM]) | ||
| 100 | HAVE_DECL_GETLINE=1; AC_SUBST([HAVE_DECL_GETLINE]) | ||
| 101 | HAVE_DECL_OBSTACK_PRINTF=1; AC_SUBST([HAVE_DECL_OBSTACK_PRINTF]) | ||
| 102 | HAVE_DECL_SNPRINTF=1; AC_SUBST([HAVE_DECL_SNPRINTF]) | ||
| 103 | HAVE_DECL_VSNPRINTF=1; AC_SUBST([HAVE_DECL_VSNPRINTF]) | ||
| 104 | HAVE_DPRINTF=1; AC_SUBST([HAVE_DPRINTF]) | ||
| 105 | HAVE_FSEEKO=1; AC_SUBST([HAVE_FSEEKO]) | ||
| 106 | HAVE_FTELLO=1; AC_SUBST([HAVE_FTELLO]) | ||
| 107 | HAVE_RENAMEAT=1; AC_SUBST([HAVE_RENAMEAT]) | ||
| 108 | HAVE_VASPRINTF=1; AC_SUBST([HAVE_VASPRINTF]) | ||
| 109 | HAVE_VDPRINTF=1; AC_SUBST([HAVE_VDPRINTF]) | ||
| 110 | REPLACE_DPRINTF=0; AC_SUBST([REPLACE_DPRINTF]) | ||
| 111 | REPLACE_FCLOSE=0; AC_SUBST([REPLACE_FCLOSE]) | ||
| 112 | REPLACE_FFLUSH=0; AC_SUBST([REPLACE_FFLUSH]) | ||
| 113 | REPLACE_FOPEN=0; AC_SUBST([REPLACE_FOPEN]) | ||
| 114 | REPLACE_FPRINTF=0; AC_SUBST([REPLACE_FPRINTF]) | ||
| 115 | REPLACE_FPURGE=0; AC_SUBST([REPLACE_FPURGE]) | ||
| 116 | REPLACE_FREOPEN=0; AC_SUBST([REPLACE_FREOPEN]) | ||
| 117 | REPLACE_FSEEK=0; AC_SUBST([REPLACE_FSEEK]) | ||
| 118 | REPLACE_FSEEKO=0; AC_SUBST([REPLACE_FSEEKO]) | ||
| 119 | REPLACE_FTELL=0; AC_SUBST([REPLACE_FTELL]) | ||
| 120 | REPLACE_FTELLO=0; AC_SUBST([REPLACE_FTELLO]) | ||
| 121 | REPLACE_GETDELIM=0; AC_SUBST([REPLACE_GETDELIM]) | ||
| 122 | REPLACE_GETLINE=0; AC_SUBST([REPLACE_GETLINE]) | ||
| 123 | REPLACE_OBSTACK_PRINTF=0; AC_SUBST([REPLACE_OBSTACK_PRINTF]) | ||
| 124 | REPLACE_PERROR=0; AC_SUBST([REPLACE_PERROR]) | ||
| 125 | REPLACE_POPEN=0; AC_SUBST([REPLACE_POPEN]) | ||
| 126 | REPLACE_PRINTF=0; AC_SUBST([REPLACE_PRINTF]) | ||
| 127 | REPLACE_REMOVE=0; AC_SUBST([REPLACE_REMOVE]) | ||
| 128 | REPLACE_RENAME=0; AC_SUBST([REPLACE_RENAME]) | ||
| 129 | REPLACE_RENAMEAT=0; AC_SUBST([REPLACE_RENAMEAT]) | ||
| 130 | REPLACE_SNPRINTF=0; AC_SUBST([REPLACE_SNPRINTF]) | ||
| 131 | REPLACE_SPRINTF=0; AC_SUBST([REPLACE_SPRINTF]) | ||
| 132 | REPLACE_STDIO_WRITE_FUNCS=0; AC_SUBST([REPLACE_STDIO_WRITE_FUNCS]) | ||
| 133 | REPLACE_TMPFILE=0; AC_SUBST([REPLACE_TMPFILE]) | ||
| 134 | REPLACE_VASPRINTF=0; AC_SUBST([REPLACE_VASPRINTF]) | ||
| 135 | REPLACE_VDPRINTF=0; AC_SUBST([REPLACE_VDPRINTF]) | ||
| 136 | REPLACE_VFPRINTF=0; AC_SUBST([REPLACE_VFPRINTF]) | ||
| 137 | REPLACE_VPRINTF=0; AC_SUBST([REPLACE_VPRINTF]) | ||
| 138 | REPLACE_VSNPRINTF=0; AC_SUBST([REPLACE_VSNPRINTF]) | ||
| 139 | REPLACE_VSPRINTF=0; AC_SUBST([REPLACE_VSPRINTF]) | ||
| 140 | ]) | ||
| @@ -286,7 +286,7 @@ echo "Making links to top-level files" | |||
| 286 | ln INSTALL README BUGS move-if-change ${tempdir} | 286 | ln INSTALL README BUGS move-if-change ${tempdir} |
| 287 | ln ChangeLog Makefile.in configure configure.in ${tempdir} | 287 | ln ChangeLog Makefile.in configure configure.in ${tempdir} |
| 288 | ln config.bat make-dist update-subdirs vpath.sed .dir-locals.el ${tempdir} | 288 | ln config.bat make-dist update-subdirs vpath.sed .dir-locals.el ${tempdir} |
| 289 | ln mkinstalldirs config.sub config.guess install-sh ${tempdir} | 289 | ln config.sub config.guess install-sh ${tempdir} |
| 290 | ln aclocal.m4 ${tempdir} | 290 | ln aclocal.m4 ${tempdir} |
| 291 | ln compile depcomp missing ${tempdir} | 291 | ln compile depcomp missing ${tempdir} |
| 292 | ln arg-nonnull.h c++defs.h warn-on-use.h ${tempdir} | 292 | ln arg-nonnull.h c++defs.h warn-on-use.h ${tempdir} |
diff --git a/mkinstalldirs b/mkinstalldirs deleted file mode 100755 index 4191a45dbd7..00000000000 --- a/mkinstalldirs +++ /dev/null | |||
| @@ -1,162 +0,0 @@ | |||
| 1 | #! /bin/sh | ||
| 2 | # mkinstalldirs --- make directory hierarchy | ||
| 3 | |||
| 4 | scriptversion=2009-04-28.21; # UTC | ||
| 5 | |||
| 6 | # Original author: Noah Friedman <friedman@prep.ai.mit.edu> | ||
| 7 | # Created: 1993-05-16 | ||
| 8 | # Public domain. | ||
| 9 | # | ||
| 10 | # This file is maintained in Automake, please report | ||
| 11 | # bugs to <bug-automake@gnu.org> or send patches to | ||
| 12 | # <automake-patches@gnu.org>. | ||
| 13 | |||
| 14 | nl=' | ||
| 15 | ' | ||
| 16 | IFS=" "" $nl" | ||
| 17 | errstatus=0 | ||
| 18 | dirmode= | ||
| 19 | |||
| 20 | usage="\ | ||
| 21 | Usage: mkinstalldirs [-h] [--help] [--version] [-m MODE] DIR ... | ||
| 22 | |||
| 23 | Create each directory DIR (with mode MODE, if specified), including all | ||
| 24 | leading file name components. | ||
| 25 | |||
| 26 | Report bugs to <bug-automake@gnu.org>." | ||
| 27 | |||
| 28 | # process command line arguments | ||
| 29 | while test $# -gt 0 ; do | ||
| 30 | case $1 in | ||
| 31 | -h | --help | --h*) # -h for help | ||
| 32 | echo "$usage" | ||
| 33 | exit $? | ||
| 34 | ;; | ||
| 35 | -m) # -m PERM arg | ||
| 36 | shift | ||
| 37 | test $# -eq 0 && { echo "$usage" 1>&2; exit 1; } | ||
| 38 | dirmode=$1 | ||
| 39 | shift | ||
| 40 | ;; | ||
| 41 | --version) | ||
| 42 | echo "$0 $scriptversion" | ||
| 43 | exit $? | ||
| 44 | ;; | ||
| 45 | --) # stop option processing | ||
| 46 | shift | ||
| 47 | break | ||
| 48 | ;; | ||
| 49 | -*) # unknown option | ||
| 50 | echo "$usage" 1>&2 | ||
| 51 | exit 1 | ||
| 52 | ;; | ||
| 53 | *) # first non-opt arg | ||
| 54 | break | ||
| 55 | ;; | ||
| 56 | esac | ||
| 57 | done | ||
| 58 | |||
| 59 | for file | ||
| 60 | do | ||
| 61 | if test -d "$file"; then | ||
| 62 | shift | ||
| 63 | else | ||
| 64 | break | ||
| 65 | fi | ||
| 66 | done | ||
| 67 | |||
| 68 | case $# in | ||
| 69 | 0) exit 0 ;; | ||
| 70 | esac | ||
| 71 | |||
| 72 | # Solaris 8's mkdir -p isn't thread-safe. If you mkdir -p a/b and | ||
| 73 | # mkdir -p a/c at the same time, both will detect that a is missing, | ||
| 74 | # one will create a, then the other will try to create a and die with | ||
| 75 | # a "File exists" error. This is a problem when calling mkinstalldirs | ||
| 76 | # from a parallel make. We use --version in the probe to restrict | ||
| 77 | # ourselves to GNU mkdir, which is thread-safe. | ||
| 78 | case $dirmode in | ||
| 79 | '') | ||
| 80 | if mkdir -p --version . >/dev/null 2>&1 && test ! -d ./--version; then | ||
| 81 | echo "mkdir -p -- $*" | ||
| 82 | exec mkdir -p -- "$@" | ||
| 83 | else | ||
| 84 | # On NextStep and OpenStep, the `mkdir' command does not | ||
| 85 | # recognize any option. It will interpret all options as | ||
| 86 | # directories to create, and then abort because `.' already | ||
| 87 | # exists. | ||
| 88 | test -d ./-p && rmdir ./-p | ||
| 89 | test -d ./--version && rmdir ./--version | ||
| 90 | fi | ||
| 91 | ;; | ||
| 92 | *) | ||
| 93 | if mkdir -m "$dirmode" -p --version . >/dev/null 2>&1 && | ||
| 94 | test ! -d ./--version; then | ||
| 95 | echo "mkdir -m $dirmode -p -- $*" | ||
| 96 | exec mkdir -m "$dirmode" -p -- "$@" | ||
| 97 | else | ||
| 98 | # Clean up after NextStep and OpenStep mkdir. | ||
| 99 | for d in ./-m ./-p ./--version "./$dirmode"; | ||
| 100 | do | ||
| 101 | test -d $d && rmdir $d | ||
| 102 | done | ||
| 103 | fi | ||
| 104 | ;; | ||
| 105 | esac | ||
| 106 | |||
| 107 | for file | ||
| 108 | do | ||
| 109 | case $file in | ||
| 110 | /*) pathcomp=/ ;; | ||
| 111 | *) pathcomp= ;; | ||
| 112 | esac | ||
| 113 | oIFS=$IFS | ||
| 114 | IFS=/ | ||
| 115 | set fnord $file | ||
| 116 | shift | ||
| 117 | IFS=$oIFS | ||
| 118 | |||
| 119 | for d | ||
| 120 | do | ||
| 121 | test "x$d" = x && continue | ||
| 122 | |||
| 123 | pathcomp=$pathcomp$d | ||
| 124 | case $pathcomp in | ||
| 125 | -*) pathcomp=./$pathcomp ;; | ||
| 126 | esac | ||
| 127 | |||
| 128 | if test ! -d "$pathcomp"; then | ||
| 129 | echo "mkdir $pathcomp" | ||
| 130 | |||
| 131 | mkdir "$pathcomp" || lasterr=$? | ||
| 132 | |||
| 133 | if test ! -d "$pathcomp"; then | ||
| 134 | errstatus=$lasterr | ||
| 135 | else | ||
| 136 | if test ! -z "$dirmode"; then | ||
| 137 | echo "chmod $dirmode $pathcomp" | ||
| 138 | lasterr= | ||
| 139 | chmod "$dirmode" "$pathcomp" || lasterr=$? | ||
| 140 | |||
| 141 | if test ! -z "$lasterr"; then | ||
| 142 | errstatus=$lasterr | ||
| 143 | fi | ||
| 144 | fi | ||
| 145 | fi | ||
| 146 | fi | ||
| 147 | |||
| 148 | pathcomp=$pathcomp/ | ||
| 149 | done | ||
| 150 | done | ||
| 151 | |||
| 152 | exit $errstatus | ||
| 153 | |||
| 154 | # Local Variables: | ||
| 155 | # mode: shell-script | ||
| 156 | # sh-indentation: 2 | ||
| 157 | # eval: (add-hook 'write-file-hooks 'time-stamp) | ||
| 158 | # time-stamp-start: "scriptversion=" | ||
| 159 | # time-stamp-format: "%:y-%02m-%02d.%02H" | ||
| 160 | # time-stamp-time-zone: "UTC" | ||
| 161 | # time-stamp-end: "; # UTC" | ||
| 162 | # End: | ||
diff --git a/msdos/ChangeLog b/msdos/ChangeLog index 1891d79da43..4a2534ebf84 100644 --- a/msdos/ChangeLog +++ b/msdos/ChangeLog | |||
| @@ -1,3 +1,10 @@ | |||
| 1 | 2011-03-25 Eli Zaretskii <eliz@gnu.org> | ||
| 2 | |||
| 3 | * sedlibmk.inp: Adapt to addition of the gnulib stdio module. | ||
| 4 | Add a description of what needs to be done when a new gnulib | ||
| 5 | module is added. | ||
| 6 | (MKDIR_P): Fix replacement command. | ||
| 7 | |||
| 1 | 2011-02-26 Eli Zaretskii <eliz@gnu.org> | 8 | 2011-02-26 Eli Zaretskii <eliz@gnu.org> |
| 2 | 9 | ||
| 3 | * sedlibmk.inp (BITSIZEOF_PTRDIFF_T, BITSIZEOF_SIG_ATOMIC_T) | 10 | * sedlibmk.inp (BITSIZEOF_PTRDIFF_T, BITSIZEOF_SIG_ATOMIC_T) |
diff --git a/msdos/sedlibmk.inp b/msdos/sedlibmk.inp index b71aef985a9..d7af3681ef9 100644 --- a/msdos/sedlibmk.inp +++ b/msdos/sedlibmk.inp | |||
| @@ -16,6 +16,81 @@ | |||
| 16 | # | 16 | # |
| 17 | # ---------------------------------------------------------------------- | 17 | # ---------------------------------------------------------------------- |
| 18 | # | 18 | # |
| 19 | # Checklist to add a new gnulib module: | ||
| 20 | # | ||
| 21 | # . If the module includes source files that need to be compiled, add | ||
| 22 | # the corresponding .o file names to the list that gets assigned to | ||
| 23 | # the gl_LIBOBJS variable. | ||
| 24 | # | ||
| 25 | # . If the module defines functions that need to replace DJGPP | ||
| 26 | # functions, edit the appropriate REPLACE_foo variables to 1; | ||
| 27 | # otherwise edit them to zero: | ||
| 28 | # | ||
| 29 | # /^REPLACE_CALLOC *=/s/@REPLACE_CALLOC@/0/ | ||
| 30 | # | ||
| 31 | # . If the module is a header or adds headers, edit the corresponding | ||
| 32 | # variable to either an empty value or to the name of the header. | ||
| 33 | # Examples: | ||
| 34 | # | ||
| 35 | # /^STDINT_H *=/s/@[^@\n]*@/stdint.h/ -- stdint.h is needed | ||
| 36 | # /^STDDEF_H *=/s/@[^@\n]*@// -- stddef.h is not needed | ||
| 37 | # | ||
| 38 | # . Also edit the NEXT_foo and NEXT_AS_FIRST_DIRECTIVE_foo_H variable | ||
| 39 | # as appropriately: to an empty value if the gnulib header is not | ||
| 40 | # used, and to the corresponding DJGPP header name otherwise. | ||
| 41 | # Examples: | ||
| 42 | # | ||
| 43 | # /^NEXT_STDDEF_H *=/s/@[^@\n]*@// | ||
| 44 | # /^NEXT_STDINT_H *=/s/@[^@\n]*@/<stdint.h>/ | ||
| 45 | # /^NEXT_AS_FIRST_DIRECTIVE_GETOPT_H *=/s/@[^@\n]*@/<getopt.h>/ | ||
| 46 | # /^NEXT_AS_FIRST_DIRECTIVE_STDDEF_H *=/s/@[^@\n]*@// | ||
| 47 | # | ||
| 48 | # . Note that some gnulib headers cannot be left unused: those for | ||
| 49 | # which there's no corresponding foo_H variable in | ||
| 50 | # autogen/Makefile.in (example: stdio.h). For these the "not | ||
| 51 | # needed" path is not applicable. | ||
| 52 | # | ||
| 53 | # . If the header is needed, edit all the variables it uses as | ||
| 54 | # appropriate. In general, if DJGPP has the corresponding feature, | ||
| 55 | # the value of the corresponding HAVE_foo should be set to what | ||
| 56 | # DJGPP has, and the corresponding GNULIB_foo variable should be | ||
| 57 | # edited to zero. If the feature is not available, the HAVE_foo | ||
| 58 | # variable should be edited to zero and the corresponding | ||
| 59 | # GNULIB_foo variable should be edited to 1 if the gnulib | ||
| 60 | # replacement can work for DJGPP (a rare phenomenon), zero | ||
| 61 | # otherwise. | ||
| 62 | # | ||
| 63 | # . Some gnulib header files have more complex recipes in | ||
| 64 | # autogen/Makefile.in than others. The tell-tale sign of such a | ||
| 65 | # recipe is that the input redirection from the .in.h file is not | ||
| 66 | # present at the end of the command, like this: | ||
| 67 | # | ||
| 68 | # -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)'; \ | ||
| 69 | # } > $@-t && \ | ||
| 70 | # mv $@-t $@ | ||
| 71 | # | ||
| 72 | # as opposed to this: | ||
| 73 | # | ||
| 74 | # -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)' \ | ||
| 75 | # < $(srcdir)/sys_stat.in.h; \ | ||
| 76 | # } > $@-t && \ | ||
| 77 | # mv $@-t $@ | ||
| 78 | # | ||
| 79 | # For those recipes that do _not_ have redirection at the end of | ||
| 80 | # the command, add a block of Sed commands like this: | ||
| 81 | # | ||
| 82 | # /^stdio\.h:/,/^ [ ]*mv /{ | ||
| 83 | # s/'\; \\ *$/' >> $@-t/ | ||
| 84 | # } | ||
| 85 | # | ||
| 86 | # The following Awk script is useful for editing portions of | ||
| 87 | # autogen/Makefile.in into Sed commands that define the corresponding | ||
| 88 | # variables to zero (which is what is required in the absolute | ||
| 89 | # majority of cases): | ||
| 90 | # | ||
| 91 | # { printf "/^%s *=/s/%s/0/\n",$1,$3} | ||
| 92 | # | ||
| 93 | # ---------------------------------------------------------------------- | ||
| 19 | # Replace @..@ constants. | 94 | # Replace @..@ constants. |
| 20 | /^\# @configure_input@/s!@configure_input@!lib/Makefile. Generated from Makefile.in by config.bat! | 95 | /^\# @configure_input@/s!@configure_input@!lib/Makefile. Generated from Makefile.in by config.bat! |
| 21 | /^@SET_MAKE@$/s/@SET_MAKE@// | 96 | /^@SET_MAKE@$/s/@SET_MAKE@// |
| @@ -64,6 +139,7 @@ am__cd = cd | |||
| 64 | /^GNULIB_CANONICALIZE_FILE_NAME *=/s/@GNULIB_CANONICALIZE_FILE_NAME@/0/ | 139 | /^GNULIB_CANONICALIZE_FILE_NAME *=/s/@GNULIB_CANONICALIZE_FILE_NAME@/0/ |
| 65 | /^GNULIB_CHOWN *=/s/@GNULIB_CHOWN@/0/ | 140 | /^GNULIB_CHOWN *=/s/@GNULIB_CHOWN@/0/ |
| 66 | /^GNULIB_CLOSE *=/s/@GNULIB_CLOSE@/0/ | 141 | /^GNULIB_CLOSE *=/s/@GNULIB_CLOSE@/0/ |
| 142 | /^GNULIB_DPRINTF *=/s/@GNULIB_DPRINTF@/0/ | ||
| 67 | /^GNULIB_DUP2 *=/s/@GNULIB_DUP2@/0/ | 143 | /^GNULIB_DUP2 *=/s/@GNULIB_DUP2@/0/ |
| 68 | /^GNULIB_DUP3 *=/s/@GNULIB_DUP3@/1/ | 144 | /^GNULIB_DUP3 *=/s/@GNULIB_DUP3@/1/ |
| 69 | /^GNULIB_ENVIRON *=/s/@GNULIB_ENVIRON@/0/ | 145 | /^GNULIB_ENVIRON *=/s/@GNULIB_ENVIRON@/0/ |
| @@ -72,15 +148,31 @@ am__cd = cd | |||
| 72 | /^GNULIB_FCHDIR *=/s/@GNULIB_FCHDIR@/0/ | 148 | /^GNULIB_FCHDIR *=/s/@GNULIB_FCHDIR@/0/ |
| 73 | /^GNULIB_FCHOWNAT *=/s/@GNULIB_FCHOWNAT@/0/ | 149 | /^GNULIB_FCHOWNAT *=/s/@GNULIB_FCHOWNAT@/0/ |
| 74 | /^GNULIB_FCHMODAT *=/s/@GNULIB_FCHMODAT@/0/ | 150 | /^GNULIB_FCHMODAT *=/s/@GNULIB_FCHMODAT@/0/ |
| 151 | /^GNULIB_FCLOSE *=/s/@GNULIB_FCLOSE@/0/ | ||
| 152 | /^GNULIB_FFLUSH *=/s/@GNULIB_FFLUSH@/0/ | ||
| 153 | /^GNULIB_FOPEN *=/s/@GNULIB_FOPEN@/0/ | ||
| 154 | /^GNULIB_FPRINTF *=/s/@GNULIB_FPRINTF@/0/ | ||
| 155 | /^GNULIB_FPRINTF_POSIX *=/s/@GNULIB_FPRINTF_POSIX@/0/ | ||
| 156 | /^GNULIB_FPURGE *=/s/@GNULIB_FPURGE@/0/ | ||
| 157 | /^GNULIB_FPUTC *=/s/@GNULIB_FPUTC@/0/ | ||
| 158 | /^GNULIB_FPUTS *=/s/@GNULIB_FPUTS@/0/ | ||
| 159 | /^GNULIB_FREOPEN *=/s/@GNULIB_FREOPEN@/0/ | ||
| 160 | /^GNULIB_FSEEK *=/s/@GNULIB_FSEEK@/0/ | ||
| 161 | /^GNULIB_FSEEKO *=/s/@GNULIB_FSEEKO@/0/ | ||
| 75 | /^GNULIB_FSTATAT *=/s/@GNULIB_FSTATAT@/0/ | 162 | /^GNULIB_FSTATAT *=/s/@GNULIB_FSTATAT@/0/ |
| 76 | /^GNULIB_FSYNC *=/s/@GNULIB_FSYNC@/0/ | 163 | /^GNULIB_FSYNC *=/s/@GNULIB_FSYNC@/0/ |
| 164 | /^GNULIB_FTELL *=/s/@GNULIB_FTELL@/0/ | ||
| 165 | /^GNULIB_FTELLO *=/s/@GNULIB_FTELLO@/0/ | ||
| 77 | /^GNULIB_FTRUNCATE *=/s/@GNULIB_FTRUNCATE@/0/ | 166 | /^GNULIB_FTRUNCATE *=/s/@GNULIB_FTRUNCATE@/0/ |
| 78 | /^GNULIB_FUTIMENS *=/s/@GNULIB_FUTIMENS@/0/ | 167 | /^GNULIB_FUTIMENS *=/s/@GNULIB_FUTIMENS@/0/ |
| 168 | /^GNULIB_FWRITE *=/s/@GNULIB_FWRITE@/0/ | ||
| 79 | /^GNULIB_GETCWD *=/s/@GNULIB_GETCWD@/0/ | 169 | /^GNULIB_GETCWD *=/s/@GNULIB_GETCWD@/0/ |
| 170 | /^GNULIB_GETDELIM *=/s/@GNULIB_GETDELIM@/0/ | ||
| 80 | /^GNULIB_GETDOMAINNAME *=/s/@GNULIB_GETDOMAINNAME@/0/ | 171 | /^GNULIB_GETDOMAINNAME *=/s/@GNULIB_GETDOMAINNAME@/0/ |
| 81 | /^GNULIB_GETDTABLESIZE *=/s/@GNULIB_GETDTABLESIZE@/0/ | 172 | /^GNULIB_GETDTABLESIZE *=/s/@GNULIB_GETDTABLESIZE@/0/ |
| 82 | /^GNULIB_GETGROUPS *=/s/@GNULIB_GETGROUPS@/0/ | 173 | /^GNULIB_GETGROUPS *=/s/@GNULIB_GETGROUPS@/0/ |
| 83 | /^GNULIB_GETHOSTNAME *=/s/@GNULIB_GETHOSTNAME@/0/ | 174 | /^GNULIB_GETHOSTNAME *=/s/@GNULIB_GETHOSTNAME@/0/ |
| 175 | /^GNULIB_GETLINE *=/s/@GNULIB_GETLINE@/0/ | ||
| 84 | /^GNULIB_GETLOADAVG *=/s/@GNULIB_GETLOADAVG@/1/ | 176 | /^GNULIB_GETLOADAVG *=/s/@GNULIB_GETLOADAVG@/1/ |
| 85 | /^GNULIB_GETLOGIN *=/s/@GNULIB_GETLOGIN@/0/ | 177 | /^GNULIB_GETLOGIN *=/s/@GNULIB_GETLOGIN@/0/ |
| 86 | /^GNULIB_GETLOGIN_R *=/s/@GNULIB_GETLOGIN_R@/0/ | 178 | /^GNULIB_GETLOGIN_R *=/s/@GNULIB_GETLOGIN_R@/0/ |
| @@ -108,22 +200,37 @@ am__cd = cd | |||
| 108 | /^GNULIB_MKSTEMPS *=/s/@GNULIB_MKSTEMPS@/0/ | 200 | /^GNULIB_MKSTEMPS *=/s/@GNULIB_MKSTEMPS@/0/ |
| 109 | /^GNULIB_MKTIME *=/s/@GNULIB_MKTIME@/0/ | 201 | /^GNULIB_MKTIME *=/s/@GNULIB_MKTIME@/0/ |
| 110 | /^GNULIB_NANOSLEEP *=/s/@GNULIB_NANOSLEEP@/0/ | 202 | /^GNULIB_NANOSLEEP *=/s/@GNULIB_NANOSLEEP@/0/ |
| 203 | /^GNULIB_OBSTACK_PRINTF *=/s/@GNULIB_OBSTACK_PRINTF@/0/ | ||
| 204 | /^GNULIB_OBSTACK_PRINTF_POSIX *=/s/@GNULIB_OBSTACK_PRINTF_POSIX@/0/ | ||
| 205 | /^GNULIB_PERROR *=/s/@GNULIB_PERROR@/0/ | ||
| 111 | /^GNULIB_PIPE *=/s/@GNULIB_PIPE@/0/ | 206 | /^GNULIB_PIPE *=/s/@GNULIB_PIPE@/0/ |
| 112 | /^GNULIB_PIPE2 *=/s/@GNULIB_PIPE2@/0/ | 207 | /^GNULIB_PIPE2 *=/s/@GNULIB_PIPE2@/0/ |
| 208 | /^GNULIB_POPEN *=/s/@GNULIB_POPEN@/0/ | ||
| 113 | /^GNULIB_PREAD *=/s/@GNULIB_PREAD@/0/ | 209 | /^GNULIB_PREAD *=/s/@GNULIB_PREAD@/0/ |
| 210 | /^GNULIB_PRINTF *=/s/@GNULIB_PRINTF@/0/ | ||
| 211 | /^GNULIB_PRINTF_POSIX *=/s/@GNULIB_PRINTF_POSIX@/0/ | ||
| 114 | /^GNULIB_PTSNAME *=/s/@GNULIB_PTSNAME@/0/ | 212 | /^GNULIB_PTSNAME *=/s/@GNULIB_PTSNAME@/0/ |
| 213 | /^GNULIB_PUTC *=/s/@GNULIB_PUTC@/0/ | ||
| 214 | /^GNULIB_PUTCHAR *=/s/@GNULIB_PUTCHAR@/0/ | ||
| 115 | /^GNULIB_PUTENV *=/s/@GNULIB_PUTENV@/0/ | 215 | /^GNULIB_PUTENV *=/s/@GNULIB_PUTENV@/0/ |
| 216 | /^GNULIB_PUTS *=/s/@GNULIB_PUTS@/0/ | ||
| 116 | /^GNULIB_PWRITE *=/s/@GNULIB_PWRITE@/0/ | 217 | /^GNULIB_PWRITE *=/s/@GNULIB_PWRITE@/0/ |
| 117 | /^GNULIB_RANDOM_R *=/s/@GNULIB_RANDOM_R@/0/ | 218 | /^GNULIB_RANDOM_R *=/s/@GNULIB_RANDOM_R@/0/ |
| 118 | /^GNULIB_READLINK *=/s/@GNULIB_READLINK@/0/ | 219 | /^GNULIB_READLINK *=/s/@GNULIB_READLINK@/0/ |
| 119 | /^GNULIB_READLINKAT *=/s/@GNULIB_READLINKAT@/0/ | 220 | /^GNULIB_READLINKAT *=/s/@GNULIB_READLINKAT@/0/ |
| 120 | /^GNULIB_REALLOC_POSIX *=/s/@GNULIB_REALLOC_POSIX@/0/ | 221 | /^GNULIB_REALLOC_POSIX *=/s/@GNULIB_REALLOC_POSIX@/0/ |
| 121 | /^GNULIB_REALPATH *=/s/@GNULIB_REALPATH@/0/ | 222 | /^GNULIB_REALPATH *=/s/@GNULIB_REALPATH@/0/ |
| 223 | /^GNULIB_REMOVE *=/s/@GNULIB_REMOVE@/0/ | ||
| 224 | /^GNULIB_RENAME *=/s/@GNULIB_RENAME@/0/ | ||
| 225 | /^GNULIB_RENAMEAT *=/s/@GNULIB_RENAMEAT@/0/ | ||
| 122 | /^GNULIB_RMDIR *=/s/@GNULIB_RMDIR@/0/ | 226 | /^GNULIB_RMDIR *=/s/@GNULIB_RMDIR@/0/ |
| 123 | /^GNULIB_RPMATCH *=/s/@GNULIB_RPMATCH@/0/ | 227 | /^GNULIB_RPMATCH *=/s/@GNULIB_RPMATCH@/0/ |
| 124 | /^GNULIB_SETENV *=/s/@GNULIB_SETENV@/0/ | 228 | /^GNULIB_SETENV *=/s/@GNULIB_SETENV@/0/ |
| 125 | /^GNULIB_SLEEP *=/s/@GNULIB_SLEEP@/0/ | 229 | /^GNULIB_SLEEP *=/s/@GNULIB_SLEEP@/0/ |
| 230 | /^GNULIB_SNPRINTF *=/s/@GNULIB_SNPRINTF@/0/ | ||
| 231 | /^GNULIB_SPRINTF_POSIX *=/s/@GNULIB_SPRINTF_POSIX@/0/ | ||
| 126 | /^GNULIB_STAT *=/s/@GNULIB_STAT@/0/ | 232 | /^GNULIB_STAT *=/s/@GNULIB_STAT@/0/ |
| 233 | /^GNULIB_STDIO_H_SIGPIPE *=/s/@GNULIB_STDIO_H_SIGPIPE@/0/ | ||
| 127 | /^GNULIB_STRPTIME *=/s/@GNULIB_STRPTIME@/0/ | 234 | /^GNULIB_STRPTIME *=/s/@GNULIB_STRPTIME@/0/ |
| 128 | /^GNULIB_STRTOD *=/s/@GNULIB_STRTOD@/0/ | 235 | /^GNULIB_STRTOD *=/s/@GNULIB_STRTOD@/0/ |
| 129 | /^GNULIB_STRTOLL *=/s/@GNULIB_STRTOLL@/0/ | 236 | /^GNULIB_STRTOLL *=/s/@GNULIB_STRTOLL@/0/ |
| @@ -133,6 +240,7 @@ am__cd = cd | |||
| 133 | /^GNULIB_SYSTEM_POSIX *=/s/@GNULIB_SYSTEM_POSIX@/0/ | 240 | /^GNULIB_SYSTEM_POSIX *=/s/@GNULIB_SYSTEM_POSIX@/0/ |
| 134 | /^GNULIB_TIMEGM *=/s/@GNULIB_TIMEGM@/0/ | 241 | /^GNULIB_TIMEGM *=/s/@GNULIB_TIMEGM@/0/ |
| 135 | /^GNULIB_TIME_R *=/s/@GNULIB_TIME_R@/1/ | 242 | /^GNULIB_TIME_R *=/s/@GNULIB_TIME_R@/1/ |
| 243 | /^GNULIB_TMPFILE *=/s/@GNULIB_TMPFILE@/0/ | ||
| 136 | /^GNULIB_TTYNAME_R *=/s/@GNULIB_TTYNAME_R@/0/ | 244 | /^GNULIB_TTYNAME_R *=/s/@GNULIB_TTYNAME_R@/0/ |
| 137 | /^GNULIB_UNISTD_H_GETOPT *=/s/@GNULIB_UNISTD_H_GETOPT@/1/ | 245 | /^GNULIB_UNISTD_H_GETOPT *=/s/@GNULIB_UNISTD_H_GETOPT@/1/ |
| 138 | /^GNULIB_UNISTD_H_SIGPIPE *=/s/@GNULIB_UNISTD_H_SIGPIPE@/0/ | 246 | /^GNULIB_UNISTD_H_SIGPIPE *=/s/@GNULIB_UNISTD_H_SIGPIPE@/0/ |
| @@ -142,6 +250,14 @@ am__cd = cd | |||
| 142 | /^GNULIB_UNSETENV *=/s/@GNULIB_UNSETENV@/1/ | 250 | /^GNULIB_UNSETENV *=/s/@GNULIB_UNSETENV@/1/ |
| 143 | /^GNULIB_USLEEP *=/s/@GNULIB_USLEEP@/0/ | 251 | /^GNULIB_USLEEP *=/s/@GNULIB_USLEEP@/0/ |
| 144 | /^GNULIB_UTIMENSAT *=/s/@GNULIB_UTIMENSAT@/0/ | 252 | /^GNULIB_UTIMENSAT *=/s/@GNULIB_UTIMENSAT@/0/ |
| 253 | /^GNULIB_VASPRINTF *=/s/@GNULIB_VASPRINTF@/0/ | ||
| 254 | /^GNULIB_VDPRINTF *=/s/@GNULIB_VDPRINTF@/0/ | ||
| 255 | /^GNULIB_VFPRINTF *=/s/@GNULIB_VFPRINTF@/0/ | ||
| 256 | /^GNULIB_VFPRINTF_POSIX *=/s/@GNULIB_VFPRINTF_POSIX@/0/ | ||
| 257 | /^GNULIB_VPRINTF *=/s/@GNULIB_VPRINTF@/0/ | ||
| 258 | /^GNULIB_VPRINTF_POSIX *=/s/@GNULIB_VPRINTF_POSIX@/0/ | ||
| 259 | /^GNULIB_VSNPRINTF *=/s/@GNULIB_VSNPRINTF@/0/ | ||
| 260 | /^GNULIB_VSPRINTF_POSIX *=/s/@GNULIB_VSPRINTF_POSIX@/0/ | ||
| 145 | /^GNULIB_WCTOMB *=/s/@GNULIB_WCTOMB@/0/ | 261 | /^GNULIB_WCTOMB *=/s/@GNULIB_WCTOMB@/0/ |
| 146 | /^GNULIB_WRITE *=/s/@GNULIB_WRITE@/0/ | 262 | /^GNULIB_WRITE *=/s/@GNULIB_WRITE@/0/ |
| 147 | /^GNULIB__EXIT *=/s/@GNULIB__EXIT@/0/ | 263 | /^GNULIB__EXIT *=/s/@GNULIB__EXIT@/0/ |
| @@ -150,15 +266,24 @@ am__cd = cd | |||
| 150 | /^HAVE_CHOWN *=/s/@HAVE_CHOWN@/1/ | 266 | /^HAVE_CHOWN *=/s/@HAVE_CHOWN@/1/ |
| 151 | /^HAVE_DECL_ENVIRON *=/s/@HAVE_DECL_ENVIRON@/1/ | 267 | /^HAVE_DECL_ENVIRON *=/s/@HAVE_DECL_ENVIRON@/1/ |
| 152 | /^HAVE_DECL_FCHDIR *=/s/@HAVE_DECL_FCHDIR@/0/ | 268 | /^HAVE_DECL_FCHDIR *=/s/@HAVE_DECL_FCHDIR@/0/ |
| 269 | /^HAVE_DECL_FPURGE *=/s/@HAVE_DECL_FPURGE@// | ||
| 270 | /^HAVE_DECL_FSEEKO *=/s/@HAVE_DECL_FSEEKO@/0/ | ||
| 271 | /^HAVE_DECL_FTELLO *=/s/@HAVE_DECL_FTELLO@/0/ | ||
| 272 | /^HAVE_DECL_GETDELIM *=/s/@HAVE_DECL_GETDELIM@/0/ | ||
| 153 | /^HAVE_DECL_GETDOMAINNAME *=/s/@HAVE_DECL_GETDOMAINNAME@/0/ | 273 | /^HAVE_DECL_GETDOMAINNAME *=/s/@HAVE_DECL_GETDOMAINNAME@/0/ |
| 274 | /^HAVE_DECL_GETLINE *=/s/@HAVE_DECL_GETLINE@/0/ | ||
| 154 | /^HAVE_DECL_GETLOADAVG *=/s/@HAVE_DECL_GETLOADAVG@/0/ | 275 | /^HAVE_DECL_GETLOADAVG *=/s/@HAVE_DECL_GETLOADAVG@/0/ |
| 155 | /^HAVE_DECL_GETLOGIN_R *=/s/@HAVE_DECL_GETLOGIN_R@/0/ | 276 | /^HAVE_DECL_GETLOGIN_R *=/s/@HAVE_DECL_GETLOGIN_R@/0/ |
| 156 | /^HAVE_DECL_GETPAGESIZE *=/s/@HAVE_DECL_GETPAGESIZE@/1/ | 277 | /^HAVE_DECL_GETPAGESIZE *=/s/@HAVE_DECL_GETPAGESIZE@/1/ |
| 157 | /^HAVE_DECL_GETUSERSHELL *=/s/@HAVE_DECL_GETUSERSHELL@/0/ | 278 | /^HAVE_DECL_GETUSERSHELL *=/s/@HAVE_DECL_GETUSERSHELL@/0/ |
| 158 | /^HAVE_DECL_LOCALTIME_R *=/s/@HAVE_DECL_LOCALTIME_R@/0/ | 279 | /^HAVE_DECL_LOCALTIME_R *=/s/@HAVE_DECL_LOCALTIME_R@/0/ |
| 280 | /^HAVE_DECL_OBSTACK_PRINTF *=/s/@HAVE_DECL_OBSTACK_PRINTF@/0/ | ||
| 159 | /^HAVE_DECL_SETENV *=/s/@HAVE_DECL_SETENV@/1/ | 281 | /^HAVE_DECL_SETENV *=/s/@HAVE_DECL_SETENV@/1/ |
| 282 | /^HAVE_DECL_SNPRINTF *=/s/@HAVE_DECL_SNPRINTF@/0/ | ||
| 160 | /^HAVE_DECL_TTYNAME_R *=/s/@HAVE_DECL_TTYNAME_R@/0/ | 283 | /^HAVE_DECL_TTYNAME_R *=/s/@HAVE_DECL_TTYNAME_R@/0/ |
| 161 | /^HAVE_DECL_UNSETENV *=/s/@HAVE_DECL_UNSETENV@/0/ | 284 | /^HAVE_DECL_UNSETENV *=/s/@HAVE_DECL_UNSETENV@/0/ |
| 285 | /^HAVE_DECL_VSNPRINTF *=/s/@HAVE_DECL_VSNPRINTF@/0/ | ||
| 286 | /^HAVE_DPRINTF *=/s/@HAVE_DPRINTF@/0/ | ||
| 162 | /^HAVE_DUP2 *=/s/@HAVE_DUP2@/1/ | 287 | /^HAVE_DUP2 *=/s/@HAVE_DUP2@/1/ |
| 163 | /^HAVE_DUP3 *=/s/@HAVE_DUP3@/0/ | 288 | /^HAVE_DUP3 *=/s/@HAVE_DUP3@/0/ |
| 164 | /^HAVE_EUIDACCESS *=/s/@HAVE_EUIDACCESS@/0/ | 289 | /^HAVE_EUIDACCESS *=/s/@HAVE_EUIDACCESS@/0/ |
| @@ -166,8 +291,10 @@ am__cd = cd | |||
| 166 | /^HAVE_FCHDIR *=/s/@HAVE_FCHDIR@/0/ | 291 | /^HAVE_FCHDIR *=/s/@HAVE_FCHDIR@/0/ |
| 167 | /^HAVE_FCHMODAT *=/s/@HAVE_FCHMODAT@/0/ | 292 | /^HAVE_FCHMODAT *=/s/@HAVE_FCHMODAT@/0/ |
| 168 | /^HAVE_FCHOWNAT *=/s/@HAVE_FCHOWNAT@/0/ | 293 | /^HAVE_FCHOWNAT *=/s/@HAVE_FCHOWNAT@/0/ |
| 294 | /^HAVE_FSEEKO *=/s/@HAVE_FSEEKO@/0/ | ||
| 169 | /^HAVE_FSTATAT *=/s/@HAVE_FSTATAT@/0/ | 295 | /^HAVE_FSTATAT *=/s/@HAVE_FSTATAT@/0/ |
| 170 | /^HAVE_FSYNC *=/s/@HAVE_FSYNC@/1/ | 296 | /^HAVE_FSYNC *=/s/@HAVE_FSYNC@/1/ |
| 297 | /^HAVE_FTELLO *=/s/@HAVE_FTELLO@/0/ | ||
| 171 | /^HAVE_FTRUNCATE *=/s/@HAVE_FTRUNCATE@/1/ | 298 | /^HAVE_FTRUNCATE *=/s/@HAVE_FTRUNCATE@/1/ |
| 172 | /^HAVE_FUTIMENS *=/s/@HAVE_FUTIMENS@/0/ | 299 | /^HAVE_FUTIMENS *=/s/@HAVE_FUTIMENS@/0/ |
| 173 | /^HAVE_GETDTABLESIZE *=/s/@HAVE_GETDTABLESIZE@/0/ | 300 | /^HAVE_GETDTABLESIZE *=/s/@HAVE_GETDTABLESIZE@/0/ |
| @@ -208,6 +335,7 @@ am__cd = cd | |||
| 208 | /^HAVE_READLINK *=/s/@HAVE_READLINK@/0/ | 335 | /^HAVE_READLINK *=/s/@HAVE_READLINK@/0/ |
| 209 | /^HAVE_READLINKAT *=/s/@HAVE_READLINKAT@/0/ | 336 | /^HAVE_READLINKAT *=/s/@HAVE_READLINKAT@/0/ |
| 210 | /^HAVE_REALPATH *=/s/@HAVE_REALPATH@/0/ | 337 | /^HAVE_REALPATH *=/s/@HAVE_REALPATH@/0/ |
| 338 | /^HAVE_RENAMEAT *=/s/@HAVE_RENAMEAT@/0/ | ||
| 211 | /^HAVE_RPMATCH *=/s/@HAVE_RPMATCH@/0/ | 339 | /^HAVE_RPMATCH *=/s/@HAVE_RPMATCH@/0/ |
| 212 | /^HAVE_SETENV *=/s/@HAVE_SETENV@/1/ | 340 | /^HAVE_SETENV *=/s/@HAVE_SETENV@/1/ |
| 213 | /^HAVE_SIGNED_SIG_ATOMIC_T *=/s/@HAVE_SIGNED_SIG_ATOMIC_T@/1/ | 341 | /^HAVE_SIGNED_SIG_ATOMIC_T *=/s/@HAVE_SIGNED_SIG_ATOMIC_T@/1/ |
| @@ -234,6 +362,8 @@ am__cd = cd | |||
| 234 | /^HAVE_UNSIGNED_LONG_LONG_INT *=/s/@HAVE_UNSIGNED_LONG_LONG_INT@/1/ | 362 | /^HAVE_UNSIGNED_LONG_LONG_INT *=/s/@HAVE_UNSIGNED_LONG_LONG_INT@/1/ |
| 235 | /^HAVE_USLEEP *=/s/@HAVE_USLEEP@/1/ | 363 | /^HAVE_USLEEP *=/s/@HAVE_USLEEP@/1/ |
| 236 | /^HAVE_UTIMENSAT *=/s/@HAVE_UTIMENSAT@/0/ | 364 | /^HAVE_UTIMENSAT *=/s/@HAVE_UTIMENSAT@/0/ |
| 365 | /^HAVE_VASPRINTF *=/s/@HAVE_VASPRINTF@/0/ | ||
| 366 | /^HAVE_VDPRINTF *=/s/@HAVE_VDPRINTF@/0/ | ||
| 237 | /^HAVE_WCHAR_H *=/s/@HAVE_WCHAR_H@/1/ | 367 | /^HAVE_WCHAR_H *=/s/@HAVE_WCHAR_H@/1/ |
| 238 | /^HAVE_WCHAR_T *=/s/@HAVE_WCHAR_T@/1/ | 368 | /^HAVE_WCHAR_T *=/s/@HAVE_WCHAR_T@/1/ |
| 239 | /^HAVE_XSERVER *=/s/@HAVE_XSERVER@/0/ | 369 | /^HAVE_XSERVER *=/s/@HAVE_XSERVER@/0/ |
| @@ -250,12 +380,14 @@ am__cd = cd | |||
| 250 | /^NEXT_AS_FIRST_DIRECTIVE_GETOPT_H *=/s/@[^@\n]*@/<getopt.h>/ | 380 | /^NEXT_AS_FIRST_DIRECTIVE_GETOPT_H *=/s/@[^@\n]*@/<getopt.h>/ |
| 251 | /^NEXT_AS_FIRST_DIRECTIVE_STDDEF_H *=/s/@[^@\n]*@// | 381 | /^NEXT_AS_FIRST_DIRECTIVE_STDDEF_H *=/s/@[^@\n]*@// |
| 252 | /^NEXT_AS_FIRST_DIRECTIVE_STDINT_H *=/s/@[^@\n]*@/<stdint.h>/ | 382 | /^NEXT_AS_FIRST_DIRECTIVE_STDINT_H *=/s/@[^@\n]*@/<stdint.h>/ |
| 383 | /^NEXT_AS_FIRST_DIRECTIVE_STDIO_H *=/s/@[^@\n]*@/<stdio.h>/ | ||
| 253 | /^NEXT_AS_FIRST_DIRECTIVE_STDLIB_H *=/s/@[^@\n]*@/<stdlib.h>/ | 384 | /^NEXT_AS_FIRST_DIRECTIVE_STDLIB_H *=/s/@[^@\n]*@/<stdlib.h>/ |
| 254 | /^NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H *=/s!@[^@\n]*@!<sys/stat.h>! | 385 | /^NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H *=/s!@[^@\n]*@!<sys/stat.h>! |
| 255 | /^NEXT_AS_FIRST_DIRECTIVE_TIME_H *=/s/@[^@\n]*@/<time.h>/ | 386 | /^NEXT_AS_FIRST_DIRECTIVE_TIME_H *=/s/@[^@\n]*@/<time.h>/ |
| 256 | /^NEXT_AS_FIRST_DIRECTIVE_UNISTD_H *=/s/@[^@\n]*@/<unistd.h>/ | 387 | /^NEXT_AS_FIRST_DIRECTIVE_UNISTD_H *=/s/@[^@\n]*@/<unistd.h>/ |
| 257 | /^NEXT_GETOPT_H *=/s/@[^@\n]*@/<getopt.h>/ | 388 | /^NEXT_GETOPT_H *=/s/@[^@\n]*@/<getopt.h>/ |
| 258 | /^NEXT_STDDEF_H *=/s/@[^@\n]*@// | 389 | /^NEXT_STDDEF_H *=/s/@[^@\n]*@// |
| 390 | /^NEXT_STDIO_H *=/s/@[^@\n]*@/<stdio.h>/ | ||
| 259 | /^NEXT_STDINT_H *=/s/@[^@\n]*@/<stdint.h>/ | 391 | /^NEXT_STDINT_H *=/s/@[^@\n]*@/<stdint.h>/ |
| 260 | /^NEXT_STDLIB_H *=/s/@[^@\n]*@/<stdlib.h>/ | 392 | /^NEXT_STDLIB_H *=/s/@[^@\n]*@/<stdlib.h>/ |
| 261 | /^NEXT_SYS_STAT_H *=/s!@[^@\n]*@!<sys/stat.h>! | 393 | /^NEXT_SYS_STAT_H *=/s!@[^@\n]*@!<sys/stat.h>! |
| @@ -270,13 +402,27 @@ am__cd = cd | |||
| 270 | /^REPLACE_CANONICALIZE_FILE_NAME *=/s/@REPLACE_CANONICALIZE_FILE_NAME@/0/ | 402 | /^REPLACE_CANONICALIZE_FILE_NAME *=/s/@REPLACE_CANONICALIZE_FILE_NAME@/0/ |
| 271 | /^REPLACE_CHOWN *=/s/@REPLACE_CHOWN@/0/ | 403 | /^REPLACE_CHOWN *=/s/@REPLACE_CHOWN@/0/ |
| 272 | /^REPLACE_CLOSE *=/s/@REPLACE_CLOSE@/0/ | 404 | /^REPLACE_CLOSE *=/s/@REPLACE_CLOSE@/0/ |
| 405 | /^REPLACE_DPRINTF *=/s/@REPLACE_DPRINTF@/0/ | ||
| 273 | /^REPLACE_DUP *=/s/@REPLACE_DUP@/0/ | 406 | /^REPLACE_DUP *=/s/@REPLACE_DUP@/0/ |
| 274 | /^REPLACE_DUP2 *=/s/@REPLACE_DUP2@/0/ | 407 | /^REPLACE_DUP2 *=/s/@REPLACE_DUP2@/0/ |
| 275 | /^REPLACE_FCHOWNAT *=/s/@REPLACE_FCHOWNAT@/0/ | 408 | /^REPLACE_FCHOWNAT *=/s/@REPLACE_FCHOWNAT@/0/ |
| 409 | /^REPLACE_FCLOSE *=/s/@REPLACE_FCLOSE@/0/ | ||
| 410 | /^REPLACE_FFLUSH *=/s/@REPLACE_FFLUSH@/0/ | ||
| 411 | /^REPLACE_FOPEN *=/s/@REPLACE_FOPEN@/0/ | ||
| 412 | /^REPLACE_FPRINTF *=/s/@REPLACE_FPRINTF@/0/ | ||
| 413 | /^REPLACE_FPURGE *=/s/@REPLACE_FPURGE@/0/ | ||
| 414 | /^REPLACE_FREOPEN *=/s/@REPLACE_FREOPEN@/0/ | ||
| 415 | /^REPLACE_FSEEK *=/s/@REPLACE_FSEEK@/0/ | ||
| 416 | /^REPLACE_FSEEKO *=/s/@REPLACE_FSEEKO@/0/ | ||
| 276 | /^REPLACE_FSTAT *=/s/@REPLACE_FSTAT@/0/ | 417 | /^REPLACE_FSTAT *=/s/@REPLACE_FSTAT@/0/ |
| 418 | /^REPLACE_FSTATAT *=/s/@REPLACE_FSTATAT@/0/ | ||
| 419 | /^REPLACE_FTELL *=/s/@REPLACE_FTELL@/0/ | ||
| 420 | /^REPLACE_FTELLO *=/s/@REPLACE_FTELLO@/0/ | ||
| 277 | /^REPLACE_GETCWD *=/s/@REPLACE_GETCWD@/0/ | 421 | /^REPLACE_GETCWD *=/s/@REPLACE_GETCWD@/0/ |
| 422 | /^REPLACE_GETDELIM *=/s/@REPLACE_GETDELIM@/0/ | ||
| 278 | /^REPLACE_GETDOMAINNAME *=/s/@REPLACE_GETDOMAINNAME@/0/ | 423 | /^REPLACE_GETDOMAINNAME *=/s/@REPLACE_GETDOMAINNAME@/0/ |
| 279 | /^REPLACE_GETGROUPS *=/s/@REPLACE_GETGROUPS@/0/ | 424 | /^REPLACE_GETGROUPS *=/s/@REPLACE_GETGROUPS@/0/ |
| 425 | /^REPLACE_GETLINE *=/s/@REPLACE_GETLINE@/0/ | ||
| 280 | /^REPLACE_GETLOGIN_R *=/s/@REPLACE_GETLOGIN_R@/0/ | 426 | /^REPLACE_GETLOGIN_R *=/s/@REPLACE_GETLOGIN_R@/0/ |
| 281 | /^REPLACE_GETPAGESIZE *=/s/@REPLACE_GETPAGESIZE@/0/ | 427 | /^REPLACE_GETPAGESIZE *=/s/@REPLACE_GETPAGESIZE@/0/ |
| 282 | /^REPLACE_LCHOWN *=/s/@REPLACE_LCHOWN@/0/ | 428 | /^REPLACE_LCHOWN *=/s/@REPLACE_LCHOWN@/0/ |
| @@ -294,25 +440,42 @@ am__cd = cd | |||
| 294 | /^REPLACE_MKTIME *=/s/@REPLACE_MKTIME@/0/ | 440 | /^REPLACE_MKTIME *=/s/@REPLACE_MKTIME@/0/ |
| 295 | /^REPLACE_NANOSLEEP *=/s/@REPLACE_NANOSLEEP@/0/ | 441 | /^REPLACE_NANOSLEEP *=/s/@REPLACE_NANOSLEEP@/0/ |
| 296 | /^REPLACE_NULL *=/s/@REPLACE_NULL@/0/ | 442 | /^REPLACE_NULL *=/s/@REPLACE_NULL@/0/ |
| 443 | /^REPLACE_OBSTACK_PRINTF *=/s/@REPLACE_OBSTACK_PRINTF@/0/ | ||
| 444 | /^REPLACE_PERROR *=/s/@REPLACE_PERROR@/0/ | ||
| 445 | /^REPLACE_POPEN *=/s/@REPLACE_POPEN@/0/ | ||
| 297 | /^REPLACE_PREAD *=/s/@REPLACE_PREAD@/0/ | 446 | /^REPLACE_PREAD *=/s/@REPLACE_PREAD@/0/ |
| 447 | /^REPLACE_PRINTF *=/s/@REPLACE_PRINTF@/0/ | ||
| 298 | /^REPLACE_PUTENV *=/s/@REPLACE_PUTENV@/0/ | 448 | /^REPLACE_PUTENV *=/s/@REPLACE_PUTENV@/0/ |
| 299 | /^REPLACE_PWRITE *=/s/@REPLACE_PWRITE@/0/ | 449 | /^REPLACE_PWRITE *=/s/@REPLACE_PWRITE@/0/ |
| 300 | /^REPLACE_READLINK *=/s/@REPLACE_READLINK@/0/ | 450 | /^REPLACE_READLINK *=/s/@REPLACE_READLINK@/0/ |
| 301 | /^REPLACE_REALLOC *=/s/@REPLACE_REALLOC@/0/ | 451 | /^REPLACE_REALLOC *=/s/@REPLACE_REALLOC@/0/ |
| 302 | /^REPLACE_REALPATH *=/s/@REPLACE_REALPATH@/0/ | 452 | /^REPLACE_REALPATH *=/s/@REPLACE_REALPATH@/0/ |
| 453 | /^REPLACE_REMOVE *=/s/@REPLACE_REMOVE@/0/ | ||
| 454 | /^REPLACE_RENAME *=/s/@REPLACE_RENAME@/0/ | ||
| 455 | /^REPLACE_RENAMEAT *=/s/@REPLACE_RENAMEAT@/0/ | ||
| 303 | /^REPLACE_RMDIR *=/s/@REPLACE_RMDIR@/0/ | 456 | /^REPLACE_RMDIR *=/s/@REPLACE_RMDIR@/0/ |
| 304 | /^REPLACE_SETENV *=/s/@REPLACE_SETENV@/0/ | 457 | /^REPLACE_SETENV *=/s/@REPLACE_SETENV@/0/ |
| 305 | /^REPLACE_SLEEP *=/s/@REPLACE_SLEEP@/0/ | 458 | /^REPLACE_SLEEP *=/s/@REPLACE_SLEEP@/0/ |
| 459 | /^REPLACE_SNPRINTF *=/s/@REPLACE_SNPRINTF@/0/ | ||
| 460 | /^REPLACE_SPRINTF *=/s/@REPLACE_SPRINTF@/0/ | ||
| 306 | /^REPLACE_STAT *=/s/@REPLACE_STAT@/0/ | 461 | /^REPLACE_STAT *=/s/@REPLACE_STAT@/0/ |
| 462 | /^REPLACE_STDIO_WRITE_FUNCS *=/s/@REPLACE_STDIO_WRITE_FUNCS@/0/ | ||
| 307 | /^REPLACE_STRTOD *=/s/@REPLACE_STRTOD@/0/ | 463 | /^REPLACE_STRTOD *=/s/@REPLACE_STRTOD@/0/ |
| 308 | /^REPLACE_SYMLINK *=/s/@REPLACE_SYMLINK@/0/ | 464 | /^REPLACE_SYMLINK *=/s/@REPLACE_SYMLINK@/0/ |
| 309 | /^REPLACE_TIMEGM *=/s/@REPLACE_TIMEGM@/0/ | 465 | /^REPLACE_TIMEGM *=/s/@REPLACE_TIMEGM@/0/ |
| 466 | /^REPLACE_TMPFILE *=/s/@REPLACE_TMPFILE@/0/ | ||
| 310 | /^REPLACE_TTYNAME_R *=/s/@REPLACE_TTYNAME_R@/0/ | 467 | /^REPLACE_TTYNAME_R *=/s/@REPLACE_TTYNAME_R@/0/ |
| 311 | /^REPLACE_UNLINK *=/s/@REPLACE_UNLINK@/0/ | 468 | /^REPLACE_UNLINK *=/s/@REPLACE_UNLINK@/0/ |
| 312 | /^REPLACE_UNLINKAT *=/s/@REPLACE_UNLINKAT@/0/ | 469 | /^REPLACE_UNLINKAT *=/s/@REPLACE_UNLINKAT@/0/ |
| 313 | /^REPLACE_UNSETENV *=/s/@REPLACE_UNSETENV@/0/ | 470 | /^REPLACE_UNSETENV *=/s/@REPLACE_UNSETENV@/0/ |
| 314 | /^REPLACE_USLEEP *=/s/@REPLACE_USLEEP@/0/ | 471 | /^REPLACE_USLEEP *=/s/@REPLACE_USLEEP@/0/ |
| 315 | /^REPLACE_UTIMENSAT *=/s/@REPLACE_UTIMENSAT@/0/ | 472 | /^REPLACE_UTIMENSAT *=/s/@REPLACE_UTIMENSAT@/0/ |
| 473 | /^REPLACE_VASPRINTF *=/s/@REPLACE_VASPRINTF@/0/ | ||
| 474 | /^REPLACE_VDPRINTF *=/s/@REPLACE_VDPRINTF@/0/ | ||
| 475 | /^REPLACE_VFPRINTF *=/s/@REPLACE_VFPRINTF@/0/ | ||
| 476 | /^REPLACE_VPRINTF *=/s/@REPLACE_VPRINTF@/0/ | ||
| 477 | /^REPLACE_VSNPRINTF *=/s/@REPLACE_VSNPRINTF@/0/ | ||
| 478 | /^REPLACE_VSPRINTF *=/s/@REPLACE_VSPRINTF@/0/ | ||
| 316 | /^REPLACE_WCTOMB *=/s/@REPLACE_WCTOMB@/0/ | 479 | /^REPLACE_WCTOMB *=/s/@REPLACE_WCTOMB@/0/ |
| 317 | /^REPLACE_WRITE *=/s/@REPLACE_WRITE@/0/ | 480 | /^REPLACE_WRITE *=/s/@REPLACE_WRITE@/0/ |
| 318 | /^SIG_ATOMIC_T_SUFFIX *=/s/@SIG_ATOMIC_T_SUFFIX@// | 481 | /^SIG_ATOMIC_T_SUFFIX *=/s/@SIG_ATOMIC_T_SUFFIX@// |
| @@ -368,10 +531,13 @@ s/^ [ ]*{ echo \(.*\) && \\/ djecho \1 > $@-t/ | |||
| 368 | s/ \&\& \\ *$// | 531 | s/ \&\& \\ *$// |
| 369 | s/\.in-h\; *\\$/.in-h >> $@-t/ | 532 | s/\.in-h\; *\\$/.in-h >> $@-t/ |
| 370 | /^ [ ]*} /d | 533 | /^ [ ]*} /d |
| 534 | /^stdio\.h:/,/^ [ ]*mv /{ | ||
| 535 | s/'\; \\ *$/' >> $@-t/ | ||
| 536 | } | ||
| 371 | /^stdlib\.h:/,/^ [ ]*mv /{ | 537 | /^stdlib\.h:/,/^ [ ]*mv /{ |
| 372 | s/'\; \\ *$/' >> $@-t/ | 538 | s/'\; \\ *$/' >> $@-t/ |
| 373 | } | 539 | } |
| 374 | /^unistd\.h:/,/^ [ ]*mv /{ | 540 | /^unistd\.h:/,/^ [ ]*mv /{ |
| 375 | s/'\; \\ *$/' >> $@-t/ | 541 | s/'\; \\ *$/' >> $@-t/ |
| 376 | } | 542 | } |
| 377 | s!\$(MKDIR_P)[ ][ ]*sys!command.com /c "if not exist sys\stat.h md sys"! | 543 | s!\$(MKDIR_P)[ ][ ]*sys!command.com /c "if not exist sys\\stat.h md sys"! |
diff --git a/nt/ChangeLog b/nt/ChangeLog index e55fc52a487..a0603fd7c26 100644 --- a/nt/ChangeLog +++ b/nt/ChangeLog | |||
| @@ -1,3 +1,18 @@ | |||
| 1 | 2011-03-27 Glenn Morris <rgm@gnu.org> | ||
| 2 | |||
| 3 | * config.nt: Remove RETSIGTYPE, SIGTYPE (identical to void). | ||
| 4 | |||
| 5 | 2011-03-25 Juanma Barranquero <lekktu@gmail.com> | ||
| 6 | |||
| 7 | * addpm.c (main): Remove unused variable `retval'. | ||
| 8 | |||
| 9 | * preprep.c (main): Remove unused variable `ptr'. | ||
| 10 | |||
| 11 | 2011-03-23 Juanma Barranquero <lekktu@gmail.com> | ||
| 12 | |||
| 13 | * cmdproxy.c: Include <ctype.h>. | ||
| 14 | (make_absolute): Remove unused variable `i'. | ||
| 15 | |||
| 1 | 2011-02-27 Eli Zaretskii <eliz@gnu.org> | 16 | 2011-02-27 Eli Zaretskii <eliz@gnu.org> |
| 2 | 17 | ||
| 3 | * inc/unistd.h (readlink, symlink): Declare prototypes. | 18 | * inc/unistd.h (readlink, symlink): Declare prototypes. |
diff --git a/nt/addpm.c b/nt/addpm.c index c2cd1a07abc..d7919d36f80 100644 --- a/nt/addpm.c +++ b/nt/addpm.c | |||
| @@ -274,8 +274,6 @@ main (int argc, char *argv[]) | |||
| 274 | { | 274 | { |
| 275 | if (strlen (start_folder) < (MAX_PATH - 20)) | 275 | if (strlen (start_folder) < (MAX_PATH - 20)) |
| 276 | { | 276 | { |
| 277 | BOOL retval; | ||
| 278 | |||
| 279 | strcat (start_folder, "\\Gnu Emacs"); | 277 | strcat (start_folder, "\\Gnu Emacs"); |
| 280 | if (CreateDirectory (start_folder, NULL) | 278 | if (CreateDirectory (start_folder, NULL) |
| 281 | || GetLastError () == ERROR_ALREADY_EXISTS) | 279 | || GetLastError () == ERROR_ALREADY_EXISTS) |
| @@ -307,8 +305,6 @@ main (int argc, char *argv[]) | |||
| 307 | /* Ensure there is enough room for "...\GNU Emacs\Emacs.lnk". */ | 305 | /* Ensure there is enough room for "...\GNU Emacs\Emacs.lnk". */ |
| 308 | if (strlen (start_folder) < (MAX_PATH - 20)) | 306 | if (strlen (start_folder) < (MAX_PATH - 20)) |
| 309 | { | 307 | { |
| 310 | BOOL retval; | ||
| 311 | |||
| 312 | strcat (start_folder, "\\Gnu Emacs"); | 308 | strcat (start_folder, "\\Gnu Emacs"); |
| 313 | if (CreateDirectory (start_folder, NULL) | 309 | if (CreateDirectory (start_folder, NULL) |
| 314 | || GetLastError () == ERROR_ALREADY_EXISTS) | 310 | || GetLastError () == ERROR_ALREADY_EXISTS) |
diff --git a/nt/cmdproxy.c b/nt/cmdproxy.c index 9a98e1e5034..b9572570c5f 100644 --- a/nt/cmdproxy.c +++ b/nt/cmdproxy.c | |||
| @@ -33,6 +33,7 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | |||
| 33 | #include <malloc.h> /* alloca */ | 33 | #include <malloc.h> /* alloca */ |
| 34 | #include <stdlib.h> /* getenv */ | 34 | #include <stdlib.h> /* getenv */ |
| 35 | #include <string.h> /* strlen */ | 35 | #include <string.h> /* strlen */ |
| 36 | #include <ctype.h> /* isspace, isalpha */ | ||
| 36 | 37 | ||
| 37 | /* We don't want to include stdio.h because we are already duplicating | 38 | /* We don't want to include stdio.h because we are already duplicating |
| 38 | lots of it here */ | 39 | lots of it here */ |
| @@ -251,7 +252,6 @@ make_absolute (const char *prog) | |||
| 251 | char curdir[MAX_PATH]; | 252 | char curdir[MAX_PATH]; |
| 252 | char *p, *path; | 253 | char *p, *path; |
| 253 | const char *fname; | 254 | const char *fname; |
| 254 | int i; | ||
| 255 | 255 | ||
| 256 | /* At least partial absolute path specified; search there. */ | 256 | /* At least partial absolute path specified; search there. */ |
| 257 | if ((isalpha (prog[0]) && prog[1] == ':') || | 257 | if ((isalpha (prog[0]) && prog[1] == ':') || |
diff --git a/nt/config.nt b/nt/config.nt index 26fbc1c67c5..1d9a5faaf2c 100644 --- a/nt/config.nt +++ b/nt/config.nt | |||
| @@ -393,15 +393,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | |||
| 393 | #undef STACK_DIRECTION | 393 | #undef STACK_DIRECTION |
| 394 | #endif | 394 | #endif |
| 395 | 395 | ||
| 396 | /* Define the return type of signal handlers if the s-xxx file | ||
| 397 | did not already do so. */ | ||
| 398 | #define RETSIGTYPE void | ||
| 399 | |||
| 400 | /* SIGTYPE is the macro we actually use. */ | ||
| 401 | #ifndef SIGTYPE | ||
| 402 | #define SIGTYPE RETSIGTYPE | ||
| 403 | #endif | ||
| 404 | |||
| 405 | #ifdef emacs /* Don't do this for lib-src. */ | 396 | #ifdef emacs /* Don't do this for lib-src. */ |
| 406 | /* Tell regex.c to use a type compatible with Emacs. */ | 397 | /* Tell regex.c to use a type compatible with Emacs. */ |
| 407 | #define RE_TRANSLATE_TYPE Lisp_Object | 398 | #define RE_TRANSLATE_TYPE Lisp_Object |
diff --git a/nt/preprep.c b/nt/preprep.c index 513ad14e966..6b764afdeab 100644 --- a/nt/preprep.c +++ b/nt/preprep.c | |||
| @@ -765,7 +765,6 @@ main (int argc, char **argv) | |||
| 765 | PIMAGE_NT_HEADERS nt_header; | 765 | PIMAGE_NT_HEADERS nt_header; |
| 766 | file_data in_file, out_file; | 766 | file_data in_file, out_file; |
| 767 | char out_filename[MAX_PATH], in_filename[MAX_PATH]; | 767 | char out_filename[MAX_PATH], in_filename[MAX_PATH]; |
| 768 | const char *ptr; | ||
| 769 | 768 | ||
| 770 | strcpy (in_filename, argv[1]); | 769 | strcpy (in_filename, argv[1]); |
| 771 | strcpy (out_filename, argv[2]); | 770 | strcpy (out_filename, argv[2]); |
diff --git a/src/ChangeLog.trunk b/src/ChangeLog.trunk index 6fa2d821565..a6623803a6e 100644 --- a/src/ChangeLog.trunk +++ b/src/ChangeLog.trunk | |||
| @@ -1,3 +1,431 @@ | |||
| 1 | 2011-03-30 Stefan Monnier <monnier@iro.umontreal.ca> | ||
| 2 | |||
| 3 | * eval.c (struct backtrace): Don't cheat with negative numbers, but do | ||
| 4 | steal a few bits to be more compact. | ||
| 5 | (interactive_p, Fbacktrace, Fbacktrace_frame, mark_backtrace): | ||
| 6 | Remove unneeded casts. | ||
| 7 | |||
| 8 | * bytecode.c (Fbyte_code): CAR and CDR can GC. | ||
| 9 | |||
| 10 | 2011-03-30 Zachary Kanfer <zkanfer@gmail.com> (tiny change) | ||
| 11 | |||
| 12 | * keyboard.c (Fexecute_extended_command): Do log the "suggest key | ||
| 13 | binding" message (bug#7967). | ||
| 14 | |||
| 15 | 2011-03-30 Paul Eggert <eggert@cs.ucla.edu> | ||
| 16 | |||
| 17 | Fix more problems found by GCC 4.6.0's static checks. | ||
| 18 | |||
| 19 | * unexelf.c (unexec) [! (defined _SYSTYPE_SYSV || defined __sgi)]: | ||
| 20 | Remove unused local var. | ||
| 21 | |||
| 22 | * editfns.c (Fmessage_box): Remove unused local var. | ||
| 23 | |||
| 24 | * xdisp.c (try_window_reusing_current_matrix, x_produce_glyphs): | ||
| 25 | (note_mode_line_or_margin_highlight, note_mouse_highlight): | ||
| 26 | Omit unused local vars. | ||
| 27 | * window.c (shrink_windows): Omit unused local var. | ||
| 28 | * menu.c (digest_single_submenu): Omit unused local var. | ||
| 29 | * dispnew.c (update_window) [PERIODIC_PREEMPTION_CHECKING]: | ||
| 30 | Omit unused local var. | ||
| 31 | |||
| 32 | * keyboard.c (parse_modifiers_uncached, parse_modifiers): | ||
| 33 | Don't assume string length fits in int. | ||
| 34 | (keyremap_step, read_key_sequence): Use size_t for sizes. | ||
| 35 | (read_key_sequence): Don't check last_real_key_start redundantly. | ||
| 36 | |||
| 37 | * callproc.c (Fcall_process, Fcall_process_region): Use SAFE_ALLOCA | ||
| 38 | instead of alloca (Bug#8344). | ||
| 39 | |||
| 40 | * eval.c (Fbacktrace): Don't assume nargs fits in int. | ||
| 41 | (Fbacktrace_frame): Don't assume nframes fits in int. | ||
| 42 | |||
| 43 | * syntax.c (scan_sexps_forward): Avoid pointer wraparound. | ||
| 44 | |||
| 45 | * xterm.c (x_make_frame_visible, same_x_server): Redo to avoid overflow | ||
| 46 | concerns. | ||
| 47 | |||
| 48 | * term.c (produce_glyphless_glyph): Remove unnecessary test. | ||
| 49 | |||
| 50 | * cm.c (calccost): Turn while-do into do-while, for clarity. | ||
| 51 | |||
| 52 | * keyboard.c (syms_of_keyboard): Use the same style as later | ||
| 53 | in this function when indexing through an array. This also | ||
| 54 | works around GCC bug 48267. | ||
| 55 | |||
| 56 | * image.c (tiff_load): Fix off-by-one image count (Bug#8336). | ||
| 57 | |||
| 58 | * xselect.c (x_check_property_data): Return correct size (Bug#8335). | ||
| 59 | |||
| 60 | * chartab.c (sub_char_table_ref_and_range): Redo for slight | ||
| 61 | efficiency gain, and to bypass a gcc -Wstrict-overflow warning. | ||
| 62 | |||
| 63 | * keyboard.c, keyboard.h (num_input_events): Now size_t. | ||
| 64 | This avoids undefined behavior on integer overflow, and is a bit | ||
| 65 | more convenient anyway since it is compared to a size_t variable. | ||
| 66 | |||
| 67 | Variadic C functions now count arguments with size_t, not int. | ||
| 68 | This avoids an unnecessary limitation on 64-bit machines, which | ||
| 69 | caused (substring ...) to crash on large vectors (Bug#8344). | ||
| 70 | * lisp.h (struct Lisp_Subr.function.aMANY): Now takes size_t, not int. | ||
| 71 | (DEFUN_ARGS_MANY, internal_condition_case_n, safe_call): Likewise. | ||
| 72 | All variadic functions and their callers changed accordingly. | ||
| 73 | (struct gcpro.nvars): Now size_t, not int. All uses changed. | ||
| 74 | * data.c (arith_driver, float_arith_driver): Likewise. | ||
| 75 | * editfns.c (general_insert_function): Likewise. | ||
| 76 | * eval.c (struct backtrace.nargs, interactive_p) | ||
| 77 | (internal_condition_case_n, run_hook_with_args, apply_lambda) | ||
| 78 | (funcall_lambda, mark_backtrace): Likewise. | ||
| 79 | * fns.c (concat): Likewise. | ||
| 80 | * frame.c (x_set_frame_parameters): Likewise. | ||
| 81 | * fns.c (get_key_arg): Now accepts and returns size_t, and returns | ||
| 82 | 0 if not found, not -1. All callers changed. | ||
| 83 | |||
| 84 | * alloc.c (garbage_collect): Don't assume stack size fits in int. | ||
| 85 | (stack_copy_size): Now size_t, not int. | ||
| 86 | (stack_copy, stack_copy_size): Define only if MAX_SAVE_STACK > 0. | ||
| 87 | |||
| 88 | 2011-03-28 Juanma Barranquero <lekktu@gmail.com> | ||
| 89 | |||
| 90 | * coding.c (encode_designation_at_bol): Remove parameter `charbuf_end', | ||
| 91 | unused since 2002-03-01T01:17:24Z!handa@m17n.org and 2008-02-01T16:01:31Z!miles@gnu.org. | ||
| 92 | All callers changed. | ||
| 93 | |||
| 94 | * lisp.h (multibyte_char_to_unibyte): | ||
| 95 | * character.c (multibyte_char_to_unibyte): Remove parameter `rev_tbl', | ||
| 96 | unused since 2002-03-01T01:16:34Z!handa@m17n.org and 2008-02-01T16:01:31Z!miles@gnu.org. | ||
| 97 | * character.h (CHAR_TO_BYTE8): | ||
| 98 | * cmds.c (internal_self_insert): | ||
| 99 | * editfns.c (general_insert_function): | ||
| 100 | * keymap.c (push_key_description): | ||
| 101 | * search.c (Freplace_match): | ||
| 102 | * xdisp.c (message_dolog, set_message_1): All callers changed. | ||
| 103 | |||
| 104 | 2011-03-28 Stefan Monnier <monnier@iro.umontreal.ca> | ||
| 105 | |||
| 106 | * keyboard.c (safe_run_hook_funcall): New function. | ||
| 107 | (safe_run_hooks_1, safe_run_hooks_error, safe_run_hooks): On error, | ||
| 108 | don't set the hook to nil, but remove the offending function instead. | ||
| 109 | (Qcommand_hook_internal): Remove, unused. | ||
| 110 | (syms_of_keyboard): Don't initialize Qcommand_hook_internal nor define | ||
| 111 | Vcommand_hook_internal. | ||
| 112 | |||
| 113 | * eval.c (enum run_hooks_condition): Remove. | ||
| 114 | (funcall_nil, funcall_not): New functions. | ||
| 115 | (run_hook_with_args): Call each function through a `funcall' argument. | ||
| 116 | Remove `cond' argument, now redundant. | ||
| 117 | (Frun_hooks, Frun_hook_with_args, Frun_hook_with_args_until_success) | ||
| 118 | (Frun_hook_with_args_until_failure): Adjust accordingly. | ||
| 119 | (run_hook_wrapped_funcall, Frun_hook_wrapped): New functions. | ||
| 120 | |||
| 121 | 2011-03-28 Juanma Barranquero <lekktu@gmail.com> | ||
| 122 | |||
| 123 | * dispextern.h (string_buffer_position): Remove declaration. | ||
| 124 | |||
| 125 | * print.c (strout): Remove parameter `multibyte', unused since | ||
| 126 | 1999-08-21T19:30:21Z!gerd@gnu.org. All callers changed. | ||
| 127 | |||
| 128 | * search.c (boyer_moore): Remove parameters `len', `pos' and `lim', | ||
| 129 | never used since function introduction in 1998-02-08T21:33:56Z!rms@gnu.org. | ||
| 130 | All callers changed. | ||
| 131 | |||
| 132 | * w32.c (_wsa_errlist): Use braces for struct initializers. | ||
| 133 | |||
| 134 | * xdisp.c (string_buffer_position_lim): Remove parameter `w', | ||
| 135 | never used since function introduction in 2001-03-09T18:41:50Z!gerd@gnu.org. | ||
| 136 | All callers changed. | ||
| 137 | (string_buffer_position): Likewise. Also, make static (it's never | ||
| 138 | used outside xdisp.c). | ||
| 139 | (cursor_row_p): Remove parameter `w', unused since | ||
| 140 | 2000-10-17T16:08:57Z!gerd@gnu.org. All callers changed. | ||
| 141 | (decode_mode_spec): Remove parameter `precision', introduced during | ||
| 142 | Gerd Moellmann's rewrite at 1999-07-21T21:43:52Z!gerd@gnu.org, but never used. | ||
| 143 | All callers changed. | ||
| 144 | |||
| 145 | 2011-03-27 Jan Djärv <jan.h.d@swipnet.se> | ||
| 146 | |||
| 147 | * nsterm.m (syms_of_nsterm): Use doc: for ns-auto-hide-menu-bar. | ||
| 148 | |||
| 149 | 2011-03-27 Anders Lindgren <andlind@gmail.com> | ||
| 150 | |||
| 151 | * nsterm.m (ns_menu_bar_is_hidden): New variable. | ||
| 152 | (ns_constrain_all_frames, ns_menu_bar_should_be_hidden) | ||
| 153 | (ns_update_auto_hide_menu_bar): New functions. | ||
| 154 | (ns_update_begin): Call ns_update_auto_hide_menu_bar. | ||
| 155 | (applicationDidBecomeActive): Call ns_update_auto_hide_menu_bar and | ||
| 156 | ns_constrain_all_frames. | ||
| 157 | (constrainFrameRect): Return at once if ns_menu_bar_should_be_hidden. | ||
| 158 | (syms_of_nsterm): DEFVAR ns-auto-hide-menu-bar, init to Qnil. | ||
| 159 | |||
| 160 | 2011-03-27 Jan Djärv <jan.h.d@swipnet.se> | ||
| 161 | |||
| 162 | * nsmenu.m (runDialogAt): Remove argument to timer_check. | ||
| 163 | |||
| 164 | 2011-03-27 Glenn Morris <rgm@gnu.org> | ||
| 165 | |||
| 166 | * syssignal.h: Replace RETSIGTYPE with void. | ||
| 167 | * atimer.c, data.c, dispnew.c, emacs.c, floatfns.c, keyboard.c: | ||
| 168 | * keyboard.h, lisp.h, process.c, sysdep.c, xterm.c: | ||
| 169 | Replace SIGTYPE with void everywhere. | ||
| 170 | * s/usg5-4-common.h (SIGTYPE): Remove definition. | ||
| 171 | * s/template.h (SIGTYPE): Remove commented out definition. | ||
| 172 | |||
| 173 | 2011-03-26 Eli Zaretskii <eliz@gnu.org> | ||
| 174 | |||
| 175 | * xdisp.c (redisplay_window): Don't check buffer's clip_changed | ||
| 176 | flag as a prerequisite for invoking try_scrolling. (Bug#6671) | ||
| 177 | |||
| 178 | 2011-03-26 Juanma Barranquero <lekktu@gmail.com> | ||
| 179 | |||
| 180 | * w32.c (read_unc_volume): Use parameter `henum', instead of | ||
| 181 | global variable `wget_enum_handle'. | ||
| 182 | |||
| 183 | * keymap.c (describe_vector): Remove parameters `indices' and | ||
| 184 | `char_table_depth', unused since 2002-03-01T01:43:26Z!handa@m17n.org. | ||
| 185 | (describe_map, Fdescribe_vector): Adjust calls to `describe_vector'. | ||
| 186 | |||
| 187 | * keyboard.h (timer_check, show_help_echo): Remove unused parameters. | ||
| 188 | |||
| 189 | * keyboard.c (timer_check): Remove parameter `do_it_now', | ||
| 190 | unused since 1996-04-12T06:01:29Z!rms@gnu.org. | ||
| 191 | (show_help_echo): Remove parameter `ok_to_overwrite_keystroke_echo', | ||
| 192 | unused since 2008-04-19T19:30:53Z!monnier@iro.umontreal.ca. | ||
| 193 | |||
| 194 | * keyboard.c (read_char): | ||
| 195 | * w32menu.c (w32_menu_display_help): | ||
| 196 | * xmenu.c (show_help_event, menu_help_callback): | ||
| 197 | Adjust calls to `show_help_echo'. | ||
| 198 | |||
| 199 | * gtkutil.c (xg_maybe_add_timer): | ||
| 200 | * keyboard.c (readable_events): | ||
| 201 | * process.c (wait_reading_process_output): | ||
| 202 | * xmenu.c (x_menu_wait_for_event): Adjust calls to `timer_check'. | ||
| 203 | |||
| 204 | * insdel.c (adjust_markers_gap_motion): | ||
| 205 | Remove; no-op since 1998-01-02T21:29:48Z!rms@gnu.org. | ||
| 206 | (gap_left, gap_right): Don't call it. | ||
| 207 | |||
| 208 | 2011-03-25 Chong Yidong <cyd@stupidchicken.com> | ||
| 209 | |||
| 210 | * xdisp.c (handle_fontified_prop): Discard changes to clip_changed | ||
| 211 | incurred during fontification. | ||
| 212 | |||
| 213 | 2011-03-25 Juanma Barranquero <lekktu@gmail.com> | ||
| 214 | |||
| 215 | * buffer.c (defvar_per_buffer): Remove unused parameter `doc'. | ||
| 216 | (DEFVAR_PER_BUFFER): Don't pass it. | ||
| 217 | |||
| 218 | * dispnew.c (row_equal_p, add_row_entry): Remove unused parameter `w'. | ||
| 219 | (scrolling_window): Don't pass it. | ||
| 220 | |||
| 221 | 2011-03-25 Juanma Barranquero <lekktu@gmail.com> | ||
| 222 | |||
| 223 | * dispextern.h (glyph_matric): Use #if GLYPH_DEBUG, not #ifdef. | ||
| 224 | |||
| 225 | * fileio.c (check_executable) [DOS_NT]: Remove unused variables `len' | ||
| 226 | and `suffix'. | ||
| 227 | (Fset_file_selinux_context) [HAVE_LIBSELINUX]: Move here declaration | ||
| 228 | of variables specific to SELinux and computation of `encoded_absname'. | ||
| 229 | |||
| 230 | * image.c (XPutPixel): Remove unused variable `height'. | ||
| 231 | |||
| 232 | * keyboard.c (make_lispy_event): Remove unused variable `hpos'. | ||
| 233 | |||
| 234 | * unexw32.c (get_section_info): Remove unused variable `section'. | ||
| 235 | |||
| 236 | * w32.c (stat): Remove unused variables `drive_root' and `devtype'. | ||
| 237 | (system_process_attributes): Remove unused variable `sess'. | ||
| 238 | (sys_read): Remove unused variable `err'. | ||
| 239 | |||
| 240 | * w32fns.c (top): Wrap variables with #if GLYPH_DEBUG, not #ifdef. | ||
| 241 | (w32_wnd_proc): Remove unused variable `isdead'. | ||
| 242 | (unwind_create_frame): Use #if GLYPH_DEBUG, not #ifdef. | ||
| 243 | (Fx_server_max_request_size): Remove unused variable `dpyinfo'. | ||
| 244 | (x_create_tip_frame): Remove unused variable `tem'. | ||
| 245 | |||
| 246 | * w32inevt.c (w32_console_read_socket): | ||
| 247 | Remove unused variable `no_events'. | ||
| 248 | |||
| 249 | * w32term.c (x_draw_composite_glyph_string_foreground): | ||
| 250 | Remove unused variable `width'. | ||
| 251 | |||
| 252 | 2011-03-24 Juanma Barranquero <lekktu@gmail.com> | ||
| 253 | |||
| 254 | * w32term.c (x_set_glyph_string_clipping): | ||
| 255 | Don't pass uninitialized region to CombineRgn. | ||
| 256 | |||
| 257 | 2011-03-23 Juanma Barranquero <lekktu@gmail.com> | ||
| 258 | |||
| 259 | * w32fns.c (x_set_menu_bar_lines): Remove unused variable `olines'. | ||
| 260 | (w32_wnd_proc): Pass NULL to Windows API, not uninitialized buffer. | ||
| 261 | (Fx_close_connection): Remove unused variable `i'. | ||
| 262 | |||
| 263 | * w32font.c (w32font_draw): Return number of glyphs. | ||
| 264 | (w32font_open_internal): Remove unused variable `i'. | ||
| 265 | (w32font_driver): Add missing initializer. | ||
| 266 | |||
| 267 | * w32menu.c (utf8to16): Remove unused variable `utf16'. | ||
| 268 | (fill_in_menu): Remove unused variable `items_added'. | ||
| 269 | |||
| 270 | * w32term.c (last_mouse_press_frame): Remove static global variable. | ||
| 271 | (w32_clip_to_row): Remove unused variable `f'. | ||
| 272 | (x_delete_terminal): Remove unused variable `i'. | ||
| 273 | |||
| 274 | * w32uniscribe.c (uniscribe_shape): Remove unused variable `nclusters'. | ||
| 275 | (NOTHING): Remove unused static global variable. | ||
| 276 | (uniscribe_check_otf): Remove unused variable `table'. | ||
| 277 | (uniscribe_font_driver): Add missing initializers. | ||
| 278 | |||
| 279 | 2011-03-23 Julien Danjou <julien@danjou.info> | ||
| 280 | |||
| 281 | * term.c (Fsuspend_tty, Fresume_tty): | ||
| 282 | * minibuf.c (read_minibuf, run_exit_minibuf_hook): | ||
| 283 | * window.c (temp_output_buffer_show): | ||
| 284 | * insdel.c (signal_before_change): | ||
| 285 | * frame.c (Fhandle_switch_frame): | ||
| 286 | * fileio.c (Fdo_auto_save): | ||
| 287 | * emacs.c (Fkill_emacs): | ||
| 288 | * editfns.c (save_excursion_restore): | ||
| 289 | * cmds.c (internal_self_insert): | ||
| 290 | * callint.c (Fcall_interactively): | ||
| 291 | * buffer.c (Fkill_all_local_variables): | ||
| 292 | * keyboard.c (Fcommand_execute, Fsuspend_emacs, safe_run_hooks_1): | ||
| 293 | Use Frun_hooks. | ||
| 294 | (command_loop_1): Use Frun_hooks. Call safe_run_hooks | ||
| 295 | unconditionnaly since it does the check itself. | ||
| 296 | |||
| 297 | 2011-03-23 Paul Eggert <eggert@cs.ucla.edu> | ||
| 298 | |||
| 299 | Fix more problems found by GCC 4.5.2's static checks. | ||
| 300 | |||
| 301 | * coding.c (encode_coding_raw_text): Avoid unnecessary test | ||
| 302 | the first time through the loop, since we know p0 < p1 then. | ||
| 303 | This also avoids a gcc -Wstrict-overflow warning. | ||
| 304 | |||
| 305 | * lisp.h (SAFE_ALLOCA, SAFE_ALLOCA_LISP): Avoid 'int' overflow | ||
| 306 | leading to a memory leak, possible in functions like | ||
| 307 | load_charset_map_from_file that can allocate an unbounded number | ||
| 308 | of objects (Bug#8318). | ||
| 309 | |||
| 310 | * xmenu.c (set_frame_menubar): Use EMACS_UINT, not int, for indexes | ||
| 311 | that could (at least in theory) be that large. | ||
| 312 | |||
| 313 | * xdisp.c (message_log_check_duplicate): Return unsigned long, not int. | ||
| 314 | This is less likely to overflow, and avoids undefined behavior if | ||
| 315 | overflow does occur. All callers changed. Use strtoul to scan | ||
| 316 | for the unsigned long integer. | ||
| 317 | (pint2hrstr): Simplify and tune code slightly. | ||
| 318 | This also avoids a (bogus) GCC warning with gcc -Wstrict-overflow. | ||
| 319 | |||
| 320 | * scroll.c (do_scrolling): Work around GCC bug 48228. | ||
| 321 | See <http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48228>. | ||
| 322 | |||
| 323 | * frame.c (Fmodify_frame_parameters): Simplify loop counter. | ||
| 324 | This also avoids a warning with gcc -Wstrict-overflow. | ||
| 325 | (validate_x_resource_name): Simplify count usage. | ||
| 326 | This also avoids a warning with gcc -Wstrict-overflow. | ||
| 327 | |||
| 328 | * fileio.c (Fcopy_file): Report error if fchown or fchmod | ||
| 329 | fail (Bug#8306). | ||
| 330 | |||
| 331 | * emacs.c (Fdaemon_initialized): Do not ignore I/O errors (Bug#8303). | ||
| 332 | |||
| 333 | * process.c (Fmake_network_process): Use socklen_t, not int, | ||
| 334 | where POSIX says socklen_t is required in portable programs. | ||
| 335 | This fixes a porting bug on hosts like 64-bit HP-UX, where | ||
| 336 | socklen_t is wider than int (Bug#8277). | ||
| 337 | (Fmake_network_process, server_accept_connection): | ||
| 338 | (wait_reading_process_output, read_process_output): | ||
| 339 | Likewise. | ||
| 340 | |||
| 341 | * process.c: Rename or move locals to avoid shadowing. | ||
| 342 | (list_processes_1, Fmake_network_process): | ||
| 343 | (read_process_output_error_handler, exec_sentinel_error_handler): | ||
| 344 | Rename or move locals. | ||
| 345 | (Fmake_network_process): Define label "retry_connect" only if needed. | ||
| 346 | (Fnetwork_interface_info): Fix pointer signedness. | ||
| 347 | (process_send_signal): Add cast to avoid pointer signedness problem. | ||
| 348 | (FIRST_PROC_DESC, IF_NON_BLOCKING_CONNECT): Remove unused macros. | ||
| 349 | (create_process): Use 'volatile' to avoid vfork clobbering (Bug#8298). | ||
| 350 | |||
| 351 | Make tparam.h and terminfo.c consistent. | ||
| 352 | * cm.c (tputs, tgoto, BC, UP): Remove extern decls. | ||
| 353 | Include tparam.h instead, since it declares them. | ||
| 354 | * cm.h (PC): Remove extern decl; tparam.h now does this. | ||
| 355 | * deps.mk (cm.o, terminfo.o): Depend on tparam.h. | ||
| 356 | * terminfo.c: Include tparam.h, to check interfaces. | ||
| 357 | (tparm): Make 1st arg a const pointer in decl. Put it at top level. | ||
| 358 | (tparam): Adjust signature to match interface in tparam.h; | ||
| 359 | this removes some undefined behavior. Check that outstring and len | ||
| 360 | are zero, which they always are with Emacs. | ||
| 361 | * tparam.h (PC, BC, UP): New extern decls. | ||
| 362 | |||
| 363 | * xftfont.c (xftfont_shape): Now static, and defined only if needed. | ||
| 364 | (xftfont_open): Rename locals to avoid shadowing. | ||
| 365 | |||
| 366 | * ftfont.c (ftfont_resolve_generic_family): Fix pointer signedness. | ||
| 367 | (ftfont_otf_capability, ftfont_shape): Omit decls if not needed. | ||
| 368 | (OTF_TAG_SYM): Omit macro if not needed. | ||
| 369 | (ftfont_list): Remove unused local. | ||
| 370 | (get_adstyle_property, ftfont_pattern_entity): | ||
| 371 | (ftfont_lookup_cache, ftfont_open, ftfont_anchor_point): | ||
| 372 | Rename locals to avoid shadowing. | ||
| 373 | |||
| 374 | * xfont.c (xfont_list_family): Mark var as initialized. | ||
| 375 | |||
| 376 | * xml.c (make_dom): Now static. | ||
| 377 | |||
| 378 | * composite.c (composition_compute_stop_pos): Rename local to | ||
| 379 | avoid shadowing. | ||
| 380 | (composition_reseat_it): Remove unused locals. | ||
| 381 | (find_automatic_composition, composition_adjust_point): Likewise. | ||
| 382 | (composition_update_it): Mark var as initialized. | ||
| 383 | (find_automatic_composition): Mark vars as initialized, | ||
| 384 | with a FIXME (Bug#8290). | ||
| 385 | |||
| 386 | character.h: Rename locals to avoid shadowing. | ||
| 387 | * character.h (PREV_CHAR_BOUNDARY, FETCH_STRING_CHAR_ADVANCE): | ||
| 388 | (FETCH_STRING_CHAR_AS_MULTIBYTE_ADVANCE, FETCH_CHAR_ADVANCE): | ||
| 389 | (FETCH_CHAR_ADVANCE_NO_CHECK, INC_POS, DEC_POS, BUF_INC_POS): | ||
| 390 | (BUF_DEC_POS): Be more systematic about renaming local temporaries | ||
| 391 | to avoid shadowing. | ||
| 392 | |||
| 393 | * textprop.c (property_change_between_p): Remove; unused. | ||
| 394 | |||
| 395 | * intervals.c (interval_start_pos): Now static. | ||
| 396 | |||
| 397 | * intervals.h (CHECK_TOTAL_LENGTH): Avoid empty "else". | ||
| 398 | |||
| 399 | * atimer.c (start_atimer, append_atimer_lists, set_alarm): | ||
| 400 | Rename locals to avoid shadowing. | ||
| 401 | |||
| 402 | * sound.c (wav_play, au_play, Fplay_sound_internal): | ||
| 403 | Fix pointer signedness. | ||
| 404 | (alsa_choose_format): Remove unused local var. | ||
| 405 | (wav_play): Initialize a variable to 0, to prevent undefined | ||
| 406 | behavior (Bug#8278). | ||
| 407 | |||
| 408 | * region-cache.c (insert_cache_boundary): Redo var to avoid shadowing. | ||
| 409 | |||
| 410 | * region-cache.h (pp_cache): New decl, for gcc -Wmissing-prototypes. | ||
| 411 | |||
| 412 | * callproc.c (Fcall_process): Use 'volatile' to avoid vfork | ||
| 413 | clobbering (Bug#8298). | ||
| 414 | * sysdep.c (sys_subshell): Likewise. | ||
| 415 | Previously, the sys_subshell 'volatile' was incorrectly IF_LINTted out. | ||
| 416 | |||
| 417 | * lisp.h (child_setup): Now NO_RETURN unless DOS_NT. | ||
| 418 | This should get cleaned up, so that child_setup has the | ||
| 419 | same signature on all platforms. | ||
| 420 | |||
| 421 | * callproc.c (call_process_cleanup): Now static. | ||
| 422 | (relocate_fd): Rename locals to avoid shadowing. | ||
| 423 | |||
| 424 | 2011-03-22 Chong Yidong <cyd@stupidchicken.com> | ||
| 425 | |||
| 426 | * xterm.c (x_clear_frame): Remove XClearWindow call. This appears | ||
| 427 | not to be necessary, and produces flickering. | ||
| 428 | |||
| 1 | 2011-03-20 Glenn Morris <rgm@gnu.org> | 429 | 2011-03-20 Glenn Morris <rgm@gnu.org> |
| 2 | 430 | ||
| 3 | * config.in: Remove file. | 431 | * config.in: Remove file. |
| @@ -138,8 +566,8 @@ | |||
| 138 | gcc -Wbad-function-cast warning. | 566 | gcc -Wbad-function-cast warning. |
| 139 | (default_value, arithcompare, arith_driver, arith_error): Now static. | 567 | (default_value, arithcompare, arith_driver, arith_error): Now static. |
| 140 | (store_symval_forwarding): Rename local to avoid shadowing. | 568 | (store_symval_forwarding): Rename local to avoid shadowing. |
| 141 | (Fmake_variable_buffer_local, Fmake_local_variable): Mark | 569 | (Fmake_variable_buffer_local, Fmake_local_variable): |
| 142 | variables as initialized. | 570 | Mark variables as initialized. |
| 143 | (do_blv_forwarding, do_symval_forwarding): Remove; unused. | 571 | (do_blv_forwarding, do_symval_forwarding): Remove; unused. |
| 144 | 572 | ||
| 145 | * alloc.c (check_cons_list): Do not define unless GC_CHECK_CONS_LIST. | 573 | * alloc.c (check_cons_list): Do not define unless GC_CHECK_CONS_LIST. |
| @@ -393,8 +821,8 @@ | |||
| 393 | (BUF_PT_BYTE): Rewrite to handle indirect buffers (Bug#8219). | 821 | (BUF_PT_BYTE): Rewrite to handle indirect buffers (Bug#8219). |
| 394 | These macros can no longer be used for assignment. | 822 | These macros can no longer be used for assignment. |
| 395 | 823 | ||
| 396 | * buffer.c (Fget_buffer_create, Fmake_indirect_buffer): Assign | 824 | * buffer.c (Fget_buffer_create, Fmake_indirect_buffer): |
| 397 | struct members directly, instead of using BUF_BEGV etc. | 825 | Assign struct members directly, instead of using BUF_BEGV etc. |
| 398 | (record_buffer_markers, fetch_buffer_markers): New functions for | 826 | (record_buffer_markers, fetch_buffer_markers): New functions for |
| 399 | recording and fetching special buffer markers. | 827 | recording and fetching special buffer markers. |
| 400 | (set_buffer_internal_1, set_buffer_temp): Use them. | 828 | (set_buffer_internal_1, set_buffer_temp): Use them. |
| @@ -515,8 +943,8 @@ | |||
| 515 | * term.c (encode_terminal_code): Now external again, used by | 943 | * term.c (encode_terminal_code): Now external again, used by |
| 516 | w32console.c and msdos.c. | 944 | w32console.c and msdos.c. |
| 517 | 945 | ||
| 518 | * makefile.w32-in ($(BLD)/term.$(O), ($(BLD)/tparam.$(O)): Depend | 946 | * makefile.w32-in ($(BLD)/term.$(O), ($(BLD)/tparam.$(O)): |
| 519 | on $(SRC)/tparam.h, see 2011-03-11T07:24:21Z!eggert@cs.ucla.edu. | 947 | Depend on $(SRC)/tparam.h, see 2011-03-11T07:24:21Z!eggert@cs.ucla.edu. |
| 520 | 948 | ||
| 521 | 2011-03-11 Paul Eggert <eggert@cs.ucla.edu> | 949 | 2011-03-11 Paul Eggert <eggert@cs.ucla.edu> |
| 522 | 950 | ||
| @@ -580,8 +1008,8 @@ | |||
| 580 | (x_delete_glyphs, x_ins_del_lines): Mark with NO_RETURN. | 1008 | (x_delete_glyphs, x_ins_del_lines): Mark with NO_RETURN. |
| 581 | (x_connection_closed): Tell GCC not to suggest NO_RETURN. | 1009 | (x_connection_closed): Tell GCC not to suggest NO_RETURN. |
| 582 | 1010 | ||
| 583 | * xfaces.c (clear_face_cache, Fx_list_fonts, Fface_font): Rename | 1011 | * xfaces.c (clear_face_cache, Fx_list_fonts, Fface_font): |
| 584 | or move locals to avoid shadowing. | 1012 | Rename or move locals to avoid shadowing. |
| 585 | (tty_defined_color, merge_face_heights): Now static. | 1013 | (tty_defined_color, merge_face_heights): Now static. |
| 586 | (free_realized_faces_for_fontset): Remove; not used. | 1014 | (free_realized_faces_for_fontset): Remove; not used. |
| 587 | (Fx_list_fonts): Mark variable that gcc -Wuninitialized | 1015 | (Fx_list_fonts): Mark variable that gcc -Wuninitialized |
| @@ -739,12 +1167,12 @@ | |||
| 739 | (xg_prepare_tooltip, xg_hide_tooltip): Call gdk_window_get_screen. | 1167 | (xg_prepare_tooltip, xg_hide_tooltip): Call gdk_window_get_screen. |
| 740 | (xg_prepare_tooltip, create_dialog, menubar_map_cb) | 1168 | (xg_prepare_tooltip, create_dialog, menubar_map_cb) |
| 741 | (xg_update_frame_menubar, xg_tool_bar_detach_callback) | 1169 | (xg_update_frame_menubar, xg_tool_bar_detach_callback) |
| 742 | (xg_tool_bar_attach_callback, xg_update_tool_bar_sizes): Call | 1170 | (xg_tool_bar_attach_callback, xg_update_tool_bar_sizes): |
| 743 | gtk_widget_get_preferred_size. | 1171 | Call gtk_widget_get_preferred_size. |
| 744 | (xg_frame_resized): gdk_window_get_geometry only takes 5 | 1172 | (xg_frame_resized): gdk_window_get_geometry only takes 5 |
| 745 | parameters. | 1173 | parameters. |
| 746 | (xg_win_to_widget, xg_event_is_for_menubar): Call | 1174 | (xg_win_to_widget, xg_event_is_for_menubar): |
| 747 | gdk_x11_window_lookup_for_display. | 1175 | Call gdk_x11_window_lookup_for_display. |
| 748 | (xg_set_widget_bg): New function. | 1176 | (xg_set_widget_bg): New function. |
| 749 | (delete_cb): New function. | 1177 | (delete_cb): New function. |
| 750 | (xg_create_frame_widgets): connect delete-event to delete_cb. | 1178 | (xg_create_frame_widgets): connect delete-event to delete_cb. |
| @@ -840,7 +1268,7 @@ | |||
| 840 | (produce_glyphless_glyph): Make a pointer "const" | 1268 | (produce_glyphless_glyph): Make a pointer "const" |
| 841 | since it might point to immutable storage. | 1269 | since it might point to immutable storage. |
| 842 | (update_window_cursor): Now static, since it's not used elsewhere. | 1270 | (update_window_cursor): Now static, since it's not used elsewhere. |
| 843 | (SKIP_GLYPHS): Removed unused macro. | 1271 | (SKIP_GLYPHS): Remove unused macro. |
| 844 | 1272 | ||
| 845 | 2011-03-06 Michael Shields <shields@msrl.com> (tiny change) | 1273 | 2011-03-06 Michael Shields <shields@msrl.com> (tiny change) |
| 846 | 1274 | ||
| @@ -7337,7 +7765,7 @@ | |||
| 7337 | * xterm.c (x_send_scroll_bar_event, SET_SAVED_MENU_EVENT) | 7765 | * xterm.c (x_send_scroll_bar_event, SET_SAVED_MENU_EVENT) |
| 7338 | (handle_one_xevent, x_check_errors, xim_initialize, x_term_init): | 7766 | (handle_one_xevent, x_check_errors, xim_initialize, x_term_init): |
| 7339 | Likewise. | 7767 | Likewise. |
| 7340 | * character.h (BCOPY_SHORT): Removed. | 7768 | * character.h (BCOPY_SHORT): Remove. |
| 7341 | * config.in: Regenerate. | 7769 | * config.in: Regenerate. |
| 7342 | * dispnew.c (safe_bcopy): Only define as dummy if PROFILING. | 7770 | * dispnew.c (safe_bcopy): Only define as dummy if PROFILING. |
| 7343 | * emacs.c (main) [PROFILING]: Don't declare | 7771 | * emacs.c (main) [PROFILING]: Don't declare |
| @@ -10342,8 +10770,8 @@ | |||
| 10342 | (POSIX_SIGNALS): Do not define. | 10770 | (POSIX_SIGNALS): Do not define. |
| 10343 | 10771 | ||
| 10344 | Remove support for old UNIX System V systems. | 10772 | Remove support for old UNIX System V systems. |
| 10345 | * s/unixware.h: Add the contents of s/usg-5-4-2.h. | 10773 | * s/unixware.h: Add the contents of s/usg5-4-2.h. |
| 10346 | * s/usg-5-4-2.h: Remove. | 10774 | * s/usg5-4-2.h: Remove. |
| 10347 | 10775 | ||
| 10348 | Remove support for Solaris on PPC and for old versions. | 10776 | Remove support for Solaris on PPC and for old versions. |
| 10349 | * s/sol2-6.h: Add the contents of s/sol-2.3.h, s/sol-2.4.h, s/sol-2.5.h. | 10777 | * s/sol2-6.h: Add the contents of s/sol-2.3.h, s/sol-2.4.h, s/sol-2.5.h. |
| @@ -19126,7 +19554,7 @@ | |||
| 19126 | Set xftfont_info->ft_size. Don't unlock the face. Check BDF | 19554 | Set xftfont_info->ft_size. Don't unlock the face. Check BDF |
| 19127 | properties if appropriate. | 19555 | properties if appropriate. |
| 19128 | (xftfont_close): Unlock the face. | 19556 | (xftfont_close): Unlock the face. |
| 19129 | (xftfont_anchor_point, xftfont_shape): Deleted. | 19557 | (xftfont_anchor_point, xftfont_shape): Delete. |
| 19130 | (syms_of_xftfont): Don't set members anchor_point and shape of | 19558 | (syms_of_xftfont): Don't set members anchor_point and shape of |
| 19131 | xftfont_driver. | 19559 | xftfont_driver. |
| 19132 | 19560 | ||
| @@ -21031,7 +21459,7 @@ | |||
| 21031 | Delete externs. | 21459 | Delete externs. |
| 21032 | (fontset_from_font_name): Extern it. | 21460 | (fontset_from_font_name): Extern it. |
| 21033 | (FS_LOAD_FONT, FONT_INFO_ID, FONT_INFO_FROM_ID) | 21461 | (FS_LOAD_FONT, FONT_INFO_ID, FONT_INFO_FROM_ID) |
| 21034 | (FONT_INFO_FROM_FACE): Deleted. | 21462 | (FONT_INFO_FROM_FACE): Delete. |
| 21035 | (face_for_font): Adjust prototype. | 21463 | (face_for_font): Adjust prototype. |
| 21036 | 21464 | ||
| 21037 | * fontset.c: Throughout the file, delete all USE_FONT_BACKEND | 21465 | * fontset.c: Throughout the file, delete all USE_FONT_BACKEND |
| @@ -21048,7 +21476,7 @@ | |||
| 21048 | (fontset_compare_rfontdef): New function. | 21476 | (fontset_compare_rfontdef): New function. |
| 21049 | (reorder_font_vector): Remove the argument CHARSET-ID. Sort | 21477 | (reorder_font_vector): Remove the argument CHARSET-ID. Sort |
| 21050 | rfont-defs by qsort. Adjusted for the change of font-group vector. | 21478 | rfont-defs by qsort. Adjusted for the change of font-group vector. |
| 21051 | (load_font_get_repertory): Deleted. | 21479 | (load_font_get_repertory): Delete. |
| 21052 | (fontset_find_font): Use new macros to ref/set elements of | 21480 | (fontset_find_font): Use new macros to ref/set elements of |
| 21053 | font-def and rfont-def. | 21481 | font-def and rfont-def. |
| 21054 | (fontset_font): Fix the timing of remembering that no font for C. | 21482 | (fontset_font): Fix the timing of remembering that no font for C. |
| @@ -21064,11 +21492,11 @@ | |||
| 21064 | font-def. | 21492 | font-def. |
| 21065 | (Fnew_fontset): Use font_unparse_xlfd to generate | 21493 | (Fnew_fontset): Use font_unparse_xlfd to generate |
| 21066 | FONTSET_ASCII (fontset). | 21494 | FONTSET_ASCII (fontset). |
| 21067 | (new_fontset_from_font_name): Deleted. | 21495 | (new_fontset_from_font_name): Delete. |
| 21068 | (fontset_from_font): Rename from new_fontset_from_font. Check if | 21496 | (fontset_from_font): Rename from new_fontset_from_font. Check if |
| 21069 | a fontset is already created for the font. FIx updating of | 21497 | a fontset is already created for the font. FIx updating of |
| 21070 | Vfontset_alias_alist. | 21498 | Vfontset_alias_alist. |
| 21071 | (fontset_ascii_font): Deleted. | 21499 | (fontset_ascii_font): Delete. |
| 21072 | (Ffont_info): Adjust for the format change of font-spec. | 21500 | (Ffont_info): Adjust for the format change of font-spec. |
| 21073 | (Finternal_char_font): Likewise. | 21501 | (Finternal_char_font): Likewise. |
| 21074 | (Ffontset_info): Likewise. | 21502 | (Ffontset_info): Likewise. |
| @@ -21096,7 +21524,7 @@ | |||
| 21096 | (ftfont_list): Return a list, not vector. | 21524 | (ftfont_list): Return a list, not vector. |
| 21097 | (ftfont_match): Use ftfont_spec_pattern to get a pattern. | 21525 | (ftfont_match): Use ftfont_spec_pattern to get a pattern. |
| 21098 | (ftfont_list_family): Don't downcase names. | 21526 | (ftfont_list_family): Don't downcase names. |
| 21099 | (ftfont_free_entity): Deleted. | 21527 | (ftfont_free_entity): Delete. |
| 21100 | (ftfont_open): Return a font-object. Adjusted for the change of | 21528 | (ftfont_open): Return a font-object. Adjusted for the change of |
| 21101 | struct font. Get underline_thickness and underline_position from | 21529 | struct font. Get underline_thickness and underline_position from |
| 21102 | font property. Don't update dpyinfo->smallest_font_height and | 21530 | font property. Don't update dpyinfo->smallest_font_height and |
| @@ -21148,13 +21576,13 @@ | |||
| 21148 | (QCfoundry, QCadstyle, QCregistry, QCspacing, QCsize, QCavgwidth) | 21576 | (QCfoundry, QCadstyle, QCregistry, QCspacing, QCsize, QCavgwidth) |
| 21149 | (Qp): Extern them. | 21577 | (Qp): Extern them. |
| 21150 | (clear_font_table, load_face_font, xlfd_lookup_field_contents): | 21578 | (clear_font_table, load_face_font, xlfd_lookup_field_contents): |
| 21151 | Deleted. | 21579 | Delete. |
| 21152 | (struct font_name): Deleted. | 21580 | (struct font_name): Delete. |
| 21153 | (xlfd_numeric_value, xlfd_symbolic_value): Deleted. | 21581 | (xlfd_numeric_value, xlfd_symbolic_value): Delete. |
| 21154 | (compare_fonts_by_sort_order): New function. | 21582 | (compare_fonts_by_sort_order): New function. |
| 21155 | (xlfd_numeric_slant, xlfd_symbolic_slant, xlfd_numeric_weight) | 21583 | (xlfd_numeric_slant, xlfd_symbolic_slant, xlfd_numeric_weight) |
| 21156 | (xlfd_symbolic_weight, xlfd_numeric_swidth, xlfd_symbolic_swidth): | 21584 | (xlfd_symbolic_weight, xlfd_numeric_swidth, xlfd_symbolic_swidth): |
| 21157 | Deleted. | 21585 | Delete. |
| 21158 | (Fx_family_fonts): Use font_list_entities, and sort fonts by | 21586 | (Fx_family_fonts): Use font_list_entities, and sort fonts by |
| 21159 | compare_fonts_by_sort_order. | 21587 | compare_fonts_by_sort_order. |
| 21160 | (Fx_font_family_list): Call Ffont_family_list. | 21588 | (Fx_font_family_list): Call Ffont_family_list. |
| @@ -21167,9 +21595,9 @@ | |||
| 21167 | (free_font_names, sort_fonts, x_face_list_fonts) | 21595 | (free_font_names, sort_fonts, x_face_list_fonts) |
| 21168 | (face_font_available_p, sorted_font_list, cmp_font_names) | 21596 | (face_font_available_p, sorted_font_list, cmp_font_names) |
| 21169 | (font_list_1, concat_font_list, font_list, remove_duplicates): | 21597 | (font_list_1, concat_font_list, font_list, remove_duplicates): |
| 21170 | Deleted. | 21598 | Delete. |
| 21171 | (Fx_list_fonts): Use Ffont_list. | 21599 | (Fx_list_fonts): Use Ffont_list. |
| 21172 | (LFACE_AVGWIDTH): Deleted. | 21600 | (LFACE_AVGWIDTH): Delete. |
| 21173 | (check_lface_attrs): Don't check LFACE_AVGWIDTH. Check LFACE_FONT | 21601 | (check_lface_attrs): Don't check LFACE_AVGWIDTH. Check LFACE_FONT |
| 21174 | by FONTP. | 21602 | by FONTP. |
| 21175 | (lface_fully_specified_p): Don't check LFACE_AVGWIDTH. | 21603 | (lface_fully_specified_p): Don't check LFACE_AVGWIDTH. |
| @@ -21191,7 +21619,7 @@ | |||
| 21191 | (Fface_font): Get a font name from font->props[FONT_NAME_INDEX]. | 21619 | (Fface_font): Get a font name from font->props[FONT_NAME_INDEX]. |
| 21192 | (lface_same_font_attributes_p): Don't check LFACE_AVGWIDTH. | 21620 | (lface_same_font_attributes_p): Don't check LFACE_AVGWIDTH. |
| 21193 | Compare fonts by EQ. | 21621 | Compare fonts by EQ. |
| 21194 | (lookup_non_ascii_face): Deleted. | 21622 | (lookup_non_ascii_face): Delete. |
| 21195 | (face_for_font): The 2nd argument changed. | 21623 | (face_for_font): The 2nd argument changed. |
| 21196 | (x_supports_face_attributes_p): Don't check LFACE_AVGWIDTH. | 21624 | (x_supports_face_attributes_p): Don't check LFACE_AVGWIDTH. |
| 21197 | Check atomic font properties by case insensitive. | 21625 | Check atomic font properties by case insensitive. |
| @@ -21214,7 +21642,7 @@ | |||
| 21214 | 21642 | ||
| 21215 | * xfont.c: Include <stdlib.h> and "ccl.h". | 21643 | * xfont.c: Include <stdlib.h> and "ccl.h". |
| 21216 | (struct xfont_info): New structure. | 21644 | (struct xfont_info): New structure. |
| 21217 | (xfont_query_font): Deleted. | 21645 | (xfont_query_font): Delete. |
| 21218 | (xfont_find_ccl_program): Rename from x_find_ccl_program and | 21646 | (xfont_find_ccl_program): Rename from x_find_ccl_program and |
| 21219 | moved from xterm.c. | 21647 | moved from xterm.c. |
| 21220 | (xfont_driver): Adjust for the change of struct font_driver. | 21648 | (xfont_driver): Adjust for the change of struct font_driver. |
| @@ -21230,7 +21658,7 @@ | |||
| 21230 | dpyinfo->smallest_char_width. | 21658 | dpyinfo->smallest_char_width. |
| 21231 | (xfont_close): Don't free struct font. | 21659 | (xfont_close): Don't free struct font. |
| 21232 | (xfont_prepare_face): Adjust for the change of struct font. | 21660 | (xfont_prepare_face): Adjust for the change of struct font. |
| 21233 | (xfont_done_face): Deleted. | 21661 | (xfont_done_face): Delete. |
| 21234 | (xfont_has_char): Adjust for the change of struct font. | 21662 | (xfont_has_char): Adjust for the change of struct font. |
| 21235 | (xfont_encode_char, xfont_draw): Likewise. | 21663 | (xfont_encode_char, xfont_draw): Likewise. |
| 21236 | (xfont_check): New function. | 21664 | (xfont_check): New function. |
| @@ -21260,7 +21688,7 @@ | |||
| 21260 | * xterm.c: Throughout the file, delete all USE_FONT_BACKEND | 21688 | * xterm.c: Throughout the file, delete all USE_FONT_BACKEND |
| 21261 | conditionals. Don't check enable_font_backend. Delete all codes | 21689 | conditionals. Don't check enable_font_backend. Delete all codes |
| 21262 | used only when USE_FONT_BACKEND is not defined. Don't include ccl.h. | 21690 | used only when USE_FONT_BACKEND is not defined. Don't include ccl.h. |
| 21263 | (x_per_char_metric, x_encode_char): Deleted. | 21691 | (x_per_char_metric, x_encode_char): Delete. |
| 21264 | (x_set_cursor_gc, x_set_mouse_face_gc): Don't set GCFont. | 21692 | (x_set_cursor_gc, x_set_mouse_face_gc): Don't set GCFont. |
| 21265 | (x_compute_glyph_string_overhangs): Adjust for the change of | 21693 | (x_compute_glyph_string_overhangs): Adjust for the change of |
| 21266 | `struct face'. | 21694 | `struct face'. |
| @@ -21269,10 +21697,10 @@ | |||
| 21269 | (x_draw_glyph_string): Likewise. Use font->underline_position and | 21697 | (x_draw_glyph_string): Likewise. Use font->underline_position and |
| 21270 | font->underline_thickness. | 21698 | font->underline_thickness. |
| 21271 | (x_new_font): Rename from x_new_fontset2. | 21699 | (x_new_font): Rename from x_new_fontset2. |
| 21272 | (x_new_fontset, x_get_font_info, x_list_fonts): Deleted. | 21700 | (x_new_fontset, x_get_font_info, x_list_fonts): Delete. |
| 21273 | (x_check_font): Call `check' method of a font driver. | 21701 | (x_check_font): Call `check' method of a font driver. |
| 21274 | (x_font_min_bounds, x_compute_min_glyph_bounds, x_load_font) | 21702 | (x_font_min_bounds, x_compute_min_glyph_bounds, x_load_font) |
| 21275 | (x_query_font, x_get_font_repertory): Deleted. | 21703 | (x_query_font, x_get_font_repertory): Delete. |
| 21276 | (x_find_ccl_program): Rename and moved to xfont.c. | 21704 | (x_find_ccl_program): Rename and moved to xfont.c. |
| 21277 | (x_redisplay_interface): Adjust for the change of `struct | 21705 | (x_redisplay_interface): Adjust for the change of `struct |
| 21278 | redisplay_interface'. | 21706 | redisplay_interface'. |
diff --git a/src/alloc.c b/src/alloc.c index 0ca702fe0cd..07f1caae46b 100644 --- a/src/alloc.c +++ b/src/alloc.c | |||
| @@ -254,8 +254,10 @@ const char *pending_malloc_warning; | |||
| 254 | 254 | ||
| 255 | /* Buffer in which we save a copy of the C stack at each GC. */ | 255 | /* Buffer in which we save a copy of the C stack at each GC. */ |
| 256 | 256 | ||
| 257 | #if MAX_SAVE_STACK > 0 | ||
| 257 | static char *stack_copy; | 258 | static char *stack_copy; |
| 258 | static int stack_copy_size; | 259 | static size_t stack_copy_size; |
| 260 | #endif | ||
| 259 | 261 | ||
| 260 | /* Non-zero means ignore malloc warnings. Set during initialization. | 262 | /* Non-zero means ignore malloc warnings. Set during initialization. |
| 261 | Currently not used. */ | 263 | Currently not used. */ |
| @@ -2705,7 +2707,7 @@ DEFUN ("list", Flist, Slist, 0, MANY, 0, | |||
| 2705 | doc: /* Return a newly created list with specified arguments as elements. | 2707 | doc: /* Return a newly created list with specified arguments as elements. |
| 2706 | Any number of arguments, even zero arguments, are allowed. | 2708 | Any number of arguments, even zero arguments, are allowed. |
| 2707 | usage: (list &rest OBJECTS) */) | 2709 | usage: (list &rest OBJECTS) */) |
| 2708 | (int nargs, register Lisp_Object *args) | 2710 | (size_t nargs, register Lisp_Object *args) |
| 2709 | { | 2711 | { |
| 2710 | register Lisp_Object val; | 2712 | register Lisp_Object val; |
| 2711 | val = Qnil; | 2713 | val = Qnil; |
| @@ -2921,10 +2923,10 @@ DEFUN ("vector", Fvector, Svector, 0, MANY, 0, | |||
| 2921 | doc: /* Return a newly created vector with specified arguments as elements. | 2923 | doc: /* Return a newly created vector with specified arguments as elements. |
| 2922 | Any number of arguments, even zero arguments, are allowed. | 2924 | Any number of arguments, even zero arguments, are allowed. |
| 2923 | usage: (vector &rest OBJECTS) */) | 2925 | usage: (vector &rest OBJECTS) */) |
| 2924 | (register int nargs, Lisp_Object *args) | 2926 | (register size_t nargs, Lisp_Object *args) |
| 2925 | { | 2927 | { |
| 2926 | register Lisp_Object len, val; | 2928 | register Lisp_Object len, val; |
| 2927 | register int i; | 2929 | register size_t i; |
| 2928 | register struct Lisp_Vector *p; | 2930 | register struct Lisp_Vector *p; |
| 2929 | 2931 | ||
| 2930 | XSETFASTINT (len, nargs); | 2932 | XSETFASTINT (len, nargs); |
| @@ -2952,10 +2954,10 @@ argument to catch the left-over arguments. If such an integer is used, the | |||
| 2952 | arguments will not be dynamically bound but will be instead pushed on the | 2954 | arguments will not be dynamically bound but will be instead pushed on the |
| 2953 | stack before executing the byte-code. | 2955 | stack before executing the byte-code. |
| 2954 | usage: (make-byte-code ARGLIST BYTE-CODE CONSTANTS DEPTH &optional DOCSTRING INTERACTIVE-SPEC &rest ELEMENTS) */) | 2956 | usage: (make-byte-code ARGLIST BYTE-CODE CONSTANTS DEPTH &optional DOCSTRING INTERACTIVE-SPEC &rest ELEMENTS) */) |
| 2955 | (register int nargs, Lisp_Object *args) | 2957 | (register size_t nargs, Lisp_Object *args) |
| 2956 | { | 2958 | { |
| 2957 | register Lisp_Object len, val; | 2959 | register Lisp_Object len, val; |
| 2958 | register int i; | 2960 | register size_t i; |
| 2959 | register struct Lisp_Vector *p; | 2961 | register struct Lisp_Vector *p; |
| 2960 | 2962 | ||
| 2961 | XSETFASTINT (len, nargs); | 2963 | XSETFASTINT (len, nargs); |
| @@ -4238,7 +4240,7 @@ static void | |||
| 4238 | check_gcpros (void) | 4240 | check_gcpros (void) |
| 4239 | { | 4241 | { |
| 4240 | struct gcpro *p; | 4242 | struct gcpro *p; |
| 4241 | int i; | 4243 | size_t i; |
| 4242 | 4244 | ||
| 4243 | for (p = gcprolist; p; p = p->next) | 4245 | for (p = gcprolist; p; p = p->next) |
| 4244 | for (i = 0; i < p->nvars; ++i) | 4246 | for (i = 0; i < p->nvars; ++i) |
| @@ -4847,7 +4849,7 @@ returns nil, because real GC can't be done. */) | |||
| 4847 | { | 4849 | { |
| 4848 | register struct specbinding *bind; | 4850 | register struct specbinding *bind; |
| 4849 | char stack_top_variable; | 4851 | char stack_top_variable; |
| 4850 | register int i; | 4852 | register size_t i; |
| 4851 | int message_p; | 4853 | int message_p; |
| 4852 | Lisp_Object total[8]; | 4854 | Lisp_Object total[8]; |
| 4853 | int count = SPECPDL_INDEX (); | 4855 | int count = SPECPDL_INDEX (); |
| @@ -4913,21 +4915,26 @@ returns nil, because real GC can't be done. */) | |||
| 4913 | #if MAX_SAVE_STACK > 0 | 4915 | #if MAX_SAVE_STACK > 0 |
| 4914 | if (NILP (Vpurify_flag)) | 4916 | if (NILP (Vpurify_flag)) |
| 4915 | { | 4917 | { |
| 4916 | i = &stack_top_variable - stack_bottom; | 4918 | char *stack; |
| 4917 | if (i < 0) i = -i; | 4919 | size_t stack_size; |
| 4918 | if (i < MAX_SAVE_STACK) | 4920 | if (&stack_top_variable < stack_bottom) |
| 4919 | { | 4921 | { |
| 4920 | if (stack_copy == 0) | 4922 | stack = &stack_top_variable; |
| 4921 | stack_copy = (char *) xmalloc (stack_copy_size = i); | 4923 | stack_size = stack_bottom - &stack_top_variable; |
| 4922 | else if (stack_copy_size < i) | 4924 | } |
| 4923 | stack_copy = (char *) xrealloc (stack_copy, (stack_copy_size = i)); | 4925 | else |
| 4924 | if (stack_copy) | 4926 | { |
| 4927 | stack = stack_bottom; | ||
| 4928 | stack_size = &stack_top_variable - stack_bottom; | ||
| 4929 | } | ||
| 4930 | if (stack_size <= MAX_SAVE_STACK) | ||
| 4931 | { | ||
| 4932 | if (stack_copy_size < stack_size) | ||
| 4925 | { | 4933 | { |
| 4926 | if ((EMACS_INT) (&stack_top_variable - stack_bottom) > 0) | 4934 | stack_copy = (char *) xrealloc (stack_copy, stack_size); |
| 4927 | memcpy (stack_copy, stack_bottom, i); | 4935 | stack_copy_size = stack_size; |
| 4928 | else | ||
| 4929 | memcpy (stack_copy, &stack_top_variable, i); | ||
| 4930 | } | 4936 | } |
| 4937 | memcpy (stack_copy, stack, stack_size); | ||
| 4931 | } | 4938 | } |
| 4932 | } | 4939 | } |
| 4933 | #endif /* MAX_SAVE_STACK > 0 */ | 4940 | #endif /* MAX_SAVE_STACK > 0 */ |
diff --git a/src/atimer.c b/src/atimer.c index 309a4eaee4f..b947ea59ccd 100644 --- a/src/atimer.c +++ b/src/atimer.c | |||
| @@ -64,7 +64,7 @@ static void set_alarm (void); | |||
| 64 | static void schedule_atimer (struct atimer *); | 64 | static void schedule_atimer (struct atimer *); |
| 65 | static struct atimer *append_atimer_lists (struct atimer *, | 65 | static struct atimer *append_atimer_lists (struct atimer *, |
| 66 | struct atimer *); | 66 | struct atimer *); |
| 67 | SIGTYPE alarm_signal_handler (int signo); | 67 | void alarm_signal_handler (int signo); |
| 68 | 68 | ||
| 69 | 69 | ||
| 70 | /* Start a new atimer of type TYPE. TIME specifies when the timer is | 70 | /* Start a new atimer of type TYPE. TIME specifies when the timer is |
| @@ -86,7 +86,7 @@ SIGTYPE alarm_signal_handler (int signo); | |||
| 86 | to cancel_atimer; don't free it yourself. */ | 86 | to cancel_atimer; don't free it yourself. */ |
| 87 | 87 | ||
| 88 | struct atimer * | 88 | struct atimer * |
| 89 | start_atimer (enum atimer_type type, EMACS_TIME time, atimer_callback fn, | 89 | start_atimer (enum atimer_type type, EMACS_TIME timestamp, atimer_callback fn, |
| 90 | void *client_data) | 90 | void *client_data) |
| 91 | { | 91 | { |
| 92 | struct atimer *t; | 92 | struct atimer *t; |
| @@ -94,10 +94,10 @@ start_atimer (enum atimer_type type, EMACS_TIME time, atimer_callback fn, | |||
| 94 | /* Round TIME up to the next full second if we don't have | 94 | /* Round TIME up to the next full second if we don't have |
| 95 | itimers. */ | 95 | itimers. */ |
| 96 | #ifndef HAVE_SETITIMER | 96 | #ifndef HAVE_SETITIMER |
| 97 | if (EMACS_USECS (time) != 0) | 97 | if (EMACS_USECS (timestamp) != 0) |
| 98 | { | 98 | { |
| 99 | EMACS_SET_USECS (time, 0); | 99 | EMACS_SET_USECS (timestamp, 0); |
| 100 | EMACS_SET_SECS (time, EMACS_SECS (time) + 1); | 100 | EMACS_SET_SECS (timestamp, EMACS_SECS (timestamp) + 1); |
| 101 | } | 101 | } |
| 102 | #endif /* not HAVE_SETITIMER */ | 102 | #endif /* not HAVE_SETITIMER */ |
| 103 | 103 | ||
| @@ -123,18 +123,18 @@ start_atimer (enum atimer_type type, EMACS_TIME time, atimer_callback fn, | |||
| 123 | switch (type) | 123 | switch (type) |
| 124 | { | 124 | { |
| 125 | case ATIMER_ABSOLUTE: | 125 | case ATIMER_ABSOLUTE: |
| 126 | t->expiration = time; | 126 | t->expiration = timestamp; |
| 127 | break; | 127 | break; |
| 128 | 128 | ||
| 129 | case ATIMER_RELATIVE: | 129 | case ATIMER_RELATIVE: |
| 130 | EMACS_GET_TIME (t->expiration); | 130 | EMACS_GET_TIME (t->expiration); |
| 131 | EMACS_ADD_TIME (t->expiration, t->expiration, time); | 131 | EMACS_ADD_TIME (t->expiration, t->expiration, timestamp); |
| 132 | break; | 132 | break; |
| 133 | 133 | ||
| 134 | case ATIMER_CONTINUOUS: | 134 | case ATIMER_CONTINUOUS: |
| 135 | EMACS_GET_TIME (t->expiration); | 135 | EMACS_GET_TIME (t->expiration); |
| 136 | EMACS_ADD_TIME (t->expiration, t->expiration, time); | 136 | EMACS_ADD_TIME (t->expiration, t->expiration, timestamp); |
| 137 | t->interval = time; | 137 | t->interval = timestamp; |
| 138 | break; | 138 | break; |
| 139 | } | 139 | } |
| 140 | 140 | ||
| @@ -187,24 +187,24 @@ cancel_atimer (struct atimer *timer) | |||
| 187 | } | 187 | } |
| 188 | 188 | ||
| 189 | 189 | ||
| 190 | /* Append two lists of atimers LIST1 and LIST2 and return the | 190 | /* Append two lists of atimers LIST_1 and LIST_2 and return the |
| 191 | result list. */ | 191 | result list. */ |
| 192 | 192 | ||
| 193 | static struct atimer * | 193 | static struct atimer * |
| 194 | append_atimer_lists (struct atimer *list1, struct atimer *list2) | 194 | append_atimer_lists (struct atimer *list_1, struct atimer *list_2) |
| 195 | { | 195 | { |
| 196 | if (list1 == NULL) | 196 | if (list_1 == NULL) |
| 197 | return list2; | 197 | return list_2; |
| 198 | else if (list2 == NULL) | 198 | else if (list_2 == NULL) |
| 199 | return list1; | 199 | return list_1; |
| 200 | else | 200 | else |
| 201 | { | 201 | { |
| 202 | struct atimer *p; | 202 | struct atimer *p; |
| 203 | 203 | ||
| 204 | for (p = list1; p->next; p = p->next) | 204 | for (p = list_1; p->next; p = p->next) |
| 205 | ; | 205 | ; |
| 206 | p->next = list2; | 206 | p->next = list_2; |
| 207 | return list1; | 207 | return list_1; |
| 208 | } | 208 | } |
| 209 | } | 209 | } |
| 210 | 210 | ||
| @@ -287,28 +287,28 @@ set_alarm (void) | |||
| 287 | { | 287 | { |
| 288 | if (atimers) | 288 | if (atimers) |
| 289 | { | 289 | { |
| 290 | EMACS_TIME now, time; | 290 | EMACS_TIME now, timestamp; |
| 291 | #ifdef HAVE_SETITIMER | 291 | #ifdef HAVE_SETITIMER |
| 292 | struct itimerval it; | 292 | struct itimerval it; |
| 293 | #endif | 293 | #endif |
| 294 | 294 | ||
| 295 | /* Determine s/us till the next timer is ripe. */ | 295 | /* Determine s/us till the next timer is ripe. */ |
| 296 | EMACS_GET_TIME (now); | 296 | EMACS_GET_TIME (now); |
| 297 | EMACS_SUB_TIME (time, atimers->expiration, now); | 297 | EMACS_SUB_TIME (timestamp, atimers->expiration, now); |
| 298 | 298 | ||
| 299 | #ifdef HAVE_SETITIMER | 299 | #ifdef HAVE_SETITIMER |
| 300 | /* Don't set the interval to 0; this disables the timer. */ | 300 | /* Don't set the interval to 0; this disables the timer. */ |
| 301 | if (EMACS_TIME_LE (atimers->expiration, now)) | 301 | if (EMACS_TIME_LE (atimers->expiration, now)) |
| 302 | { | 302 | { |
| 303 | EMACS_SET_SECS (time, 0); | 303 | EMACS_SET_SECS (timestamp, 0); |
| 304 | EMACS_SET_USECS (time, 1000); | 304 | EMACS_SET_USECS (timestamp, 1000); |
| 305 | } | 305 | } |
| 306 | 306 | ||
| 307 | memset (&it, 0, sizeof it); | 307 | memset (&it, 0, sizeof it); |
| 308 | it.it_value = time; | 308 | it.it_value = timestamp; |
| 309 | setitimer (ITIMER_REAL, &it, 0); | 309 | setitimer (ITIMER_REAL, &it, 0); |
| 310 | #else /* not HAVE_SETITIMER */ | 310 | #else /* not HAVE_SETITIMER */ |
| 311 | alarm (max (EMACS_SECS (time), 1)); | 311 | alarm (max (EMACS_SECS (timestamp), 1)); |
| 312 | #endif /* not HAVE_SETITIMER */ | 312 | #endif /* not HAVE_SETITIMER */ |
| 313 | } | 313 | } |
| 314 | } | 314 | } |
| @@ -388,7 +388,7 @@ run_timers (void) | |||
| 388 | /* Signal handler for SIGALRM. SIGNO is the signal number, i.e. | 388 | /* Signal handler for SIGALRM. SIGNO is the signal number, i.e. |
| 389 | SIGALRM. */ | 389 | SIGALRM. */ |
| 390 | 390 | ||
| 391 | SIGTYPE | 391 | void |
| 392 | alarm_signal_handler (int signo) | 392 | alarm_signal_handler (int signo) |
| 393 | { | 393 | { |
| 394 | #ifndef SYNC_INPUT | 394 | #ifndef SYNC_INPUT |
| @@ -442,4 +442,3 @@ init_atimer (void) | |||
| 442 | /* pending_signals is initialized in init_keyboard.*/ | 442 | /* pending_signals is initialized in init_keyboard.*/ |
| 443 | signal (SIGALRM, alarm_signal_handler); | 443 | signal (SIGALRM, alarm_signal_handler); |
| 444 | } | 444 | } |
| 445 | |||
diff --git a/src/buffer.c b/src/buffer.c index d301e7f14f9..cdcd2ccecff 100644 --- a/src/buffer.c +++ b/src/buffer.c | |||
| @@ -2520,8 +2520,7 @@ The first thing this function does is run | |||
| 2520 | the normal hook `change-major-mode-hook'. */) | 2520 | the normal hook `change-major-mode-hook'. */) |
| 2521 | (void) | 2521 | (void) |
| 2522 | { | 2522 | { |
| 2523 | if (!NILP (Vrun_hooks)) | 2523 | Frun_hooks (1, &Qchange_major_mode_hook); |
| 2524 | call1 (Vrun_hooks, Qchange_major_mode_hook); | ||
| 2525 | 2524 | ||
| 2526 | /* Make sure none of the bindings in local_var_alist | 2525 | /* Make sure none of the bindings in local_var_alist |
| 2527 | remain swapped in, in their symbols. */ | 2526 | remain swapped in, in their symbols. */ |
| @@ -5225,12 +5224,12 @@ init_buffer (void) | |||
| 5225 | #define DEFVAR_PER_BUFFER(lname, vname, type, doc) \ | 5224 | #define DEFVAR_PER_BUFFER(lname, vname, type, doc) \ |
| 5226 | do { \ | 5225 | do { \ |
| 5227 | static struct Lisp_Buffer_Objfwd bo_fwd; \ | 5226 | static struct Lisp_Buffer_Objfwd bo_fwd; \ |
| 5228 | defvar_per_buffer (&bo_fwd, lname, vname, type, 0); \ | 5227 | defvar_per_buffer (&bo_fwd, lname, vname, type); \ |
| 5229 | } while (0) | 5228 | } while (0) |
| 5230 | 5229 | ||
| 5231 | static void | 5230 | static void |
| 5232 | defvar_per_buffer (struct Lisp_Buffer_Objfwd *bo_fwd, const char *namestring, | 5231 | defvar_per_buffer (struct Lisp_Buffer_Objfwd *bo_fwd, const char *namestring, |
| 5233 | Lisp_Object *address, Lisp_Object type, char *doc) | 5232 | Lisp_Object *address, Lisp_Object type) |
| 5234 | { | 5233 | { |
| 5235 | struct Lisp_Symbol *sym; | 5234 | struct Lisp_Symbol *sym; |
| 5236 | int offset; | 5235 | int offset; |
diff --git a/src/bytecode.c b/src/bytecode.c index d887668dd39..01ae8055ebf 100644 --- a/src/bytecode.c +++ b/src/bytecode.c | |||
| @@ -425,7 +425,7 @@ according to which any remaining arguments are pushed on the stack | |||
| 425 | before executing BYTESTR. | 425 | before executing BYTESTR. |
| 426 | 426 | ||
| 427 | usage: (byte-code BYTESTR VECTOR MAXDEP &optional ARGS-TEMPLATE &rest ARGS) */) | 427 | usage: (byte-code BYTESTR VECTOR MAXDEP &optional ARGS-TEMPLATE &rest ARGS) */) |
| 428 | (int nargs, Lisp_Object *args) | 428 | (size_t nargs, Lisp_Object *args) |
| 429 | { | 429 | { |
| 430 | Lisp_Object args_tmpl = nargs >= 4 ? args[3] : Qnil; | 430 | Lisp_Object args_tmpl = nargs >= 4 ? args[3] : Qnil; |
| 431 | int pnargs = nargs >= 4 ? nargs - 4 : 0; | 431 | int pnargs = nargs >= 4 ? nargs - 4 : 0; |
| @@ -631,7 +631,16 @@ exec_byte_code (Lisp_Object bytestr, Lisp_Object vector, Lisp_Object maxdepth, | |||
| 631 | { | 631 | { |
| 632 | Lisp_Object v1; | 632 | Lisp_Object v1; |
| 633 | v1 = TOP; | 633 | v1 = TOP; |
| 634 | TOP = CAR (v1); | 634 | if (CONSP (v1)) |
| 635 | TOP = XCAR (v1); | ||
| 636 | else if (NILP (v1)) | ||
| 637 | TOP = Qnil; | ||
| 638 | else | ||
| 639 | { | ||
| 640 | BEFORE_POTENTIAL_GC (); | ||
| 641 | wrong_type_argument (Qlistp, v1); | ||
| 642 | AFTER_POTENTIAL_GC (); | ||
| 643 | } | ||
| 635 | break; | 644 | break; |
| 636 | } | 645 | } |
| 637 | 646 | ||
| @@ -657,7 +666,17 @@ exec_byte_code (Lisp_Object bytestr, Lisp_Object vector, Lisp_Object maxdepth, | |||
| 657 | { | 666 | { |
| 658 | Lisp_Object v1; | 667 | Lisp_Object v1; |
| 659 | v1 = TOP; | 668 | v1 = TOP; |
| 660 | TOP = CDR (v1); | 669 | if (CONSP (v1)) |
| 670 | TOP = XCDR (v1); | ||
| 671 | else if (NILP (v1)) | ||
| 672 | TOP = Qnil; | ||
| 673 | else | ||
| 674 | { | ||
| 675 | BEFORE_POTENTIAL_GC (); | ||
| 676 | wrong_type_argument (Qlistp, v1); | ||
| 677 | AFTER_POTENTIAL_GC (); | ||
| 678 | } | ||
| 679 | break; | ||
| 661 | break; | 680 | break; |
| 662 | } | 681 | } |
| 663 | 682 | ||
| @@ -994,13 +1013,13 @@ exec_byte_code (Lisp_Object bytestr, Lisp_Object vector, Lisp_Object maxdepth, | |||
| 994 | v1 = POP; | 1013 | v1 = POP; |
| 995 | v2 = TOP; | 1014 | v2 = TOP; |
| 996 | CHECK_NUMBER (v2); | 1015 | CHECK_NUMBER (v2); |
| 997 | AFTER_POTENTIAL_GC (); | ||
| 998 | op = XINT (v2); | 1016 | op = XINT (v2); |
| 999 | immediate_quit = 1; | 1017 | immediate_quit = 1; |
| 1000 | while (--op >= 0 && CONSP (v1)) | 1018 | while (--op >= 0 && CONSP (v1)) |
| 1001 | v1 = XCDR (v1); | 1019 | v1 = XCDR (v1); |
| 1002 | immediate_quit = 0; | 1020 | immediate_quit = 0; |
| 1003 | TOP = CAR (v1); | 1021 | TOP = CAR (v1); |
| 1022 | AFTER_POTENTIAL_GC (); | ||
| 1004 | break; | 1023 | break; |
| 1005 | } | 1024 | } |
| 1006 | 1025 | ||
diff --git a/src/callint.c b/src/callint.c index 3c520742e27..489fa392e46 100644 --- a/src/callint.c +++ b/src/callint.c | |||
| @@ -269,8 +269,9 @@ invoke it. If KEYS is omitted or nil, the return value of | |||
| 269 | recorded as a call to the function named callint_argfuns[varies[i]]. */ | 269 | recorded as a call to the function named callint_argfuns[varies[i]]. */ |
| 270 | int *varies; | 270 | int *varies; |
| 271 | 271 | ||
| 272 | register int i, j; | 272 | register size_t i, j; |
| 273 | int count, foo; | 273 | size_t count; |
| 274 | int foo; | ||
| 274 | char prompt1[100]; | 275 | char prompt1[100]; |
| 275 | char *tem1; | 276 | char *tem1; |
| 276 | int arg_from_tty = 0; | 277 | int arg_from_tty = 0; |
| @@ -430,8 +431,7 @@ invoke it. If KEYS is omitted or nil, the return value of | |||
| 430 | error ("Attempt to select inactive minibuffer window"); | 431 | error ("Attempt to select inactive minibuffer window"); |
| 431 | 432 | ||
| 432 | /* If the current buffer wants to clean up, let it. */ | 433 | /* If the current buffer wants to clean up, let it. */ |
| 433 | if (!NILP (Vmouse_leave_buffer_hook)) | 434 | Frun_hooks (1, &Qmouse_leave_buffer_hook); |
| 434 | call1 (Vrun_hooks, Qmouse_leave_buffer_hook); | ||
| 435 | 435 | ||
| 436 | Fselect_window (w, Qnil); | 436 | Fselect_window (w, Qnil); |
| 437 | } | 437 | } |
diff --git a/src/callproc.c b/src/callproc.c index c53a92bbaf8..eb2a2268fe1 100644 --- a/src/callproc.c +++ b/src/callproc.c | |||
| @@ -107,7 +107,7 @@ call_process_kill (Lisp_Object fdpid) | |||
| 107 | return Qnil; | 107 | return Qnil; |
| 108 | } | 108 | } |
| 109 | 109 | ||
| 110 | Lisp_Object | 110 | static Lisp_Object |
| 111 | call_process_cleanup (Lisp_Object arg) | 111 | call_process_cleanup (Lisp_Object arg) |
| 112 | { | 112 | { |
| 113 | Lisp_Object fdpid = Fcdr (arg); | 113 | Lisp_Object fdpid = Fcdr (arg); |
| @@ -177,10 +177,10 @@ and returns a numeric exit status or a signal description string. | |||
| 177 | If you quit, the process is killed with SIGINT, or SIGKILL if you quit again. | 177 | If you quit, the process is killed with SIGINT, or SIGKILL if you quit again. |
| 178 | 178 | ||
| 179 | usage: (call-process PROGRAM &optional INFILE BUFFER DISPLAY &rest ARGS) */) | 179 | usage: (call-process PROGRAM &optional INFILE BUFFER DISPLAY &rest ARGS) */) |
| 180 | (int nargs, register Lisp_Object *args) | 180 | (size_t nargs, register Lisp_Object *args) |
| 181 | { | 181 | { |
| 182 | Lisp_Object infile, buffer, current_dir, path; | 182 | Lisp_Object infile, buffer, current_dir, path; |
| 183 | int display_p; | 183 | volatile int display_p_volatile; |
| 184 | int fd[2]; | 184 | int fd[2]; |
| 185 | int filefd; | 185 | int filefd; |
| 186 | register int pid; | 186 | register int pid; |
| @@ -189,7 +189,9 @@ usage: (call-process PROGRAM &optional INFILE BUFFER DISPLAY &rest ARGS) */) | |||
| 189 | char buf[CALLPROC_BUFFER_SIZE_MAX]; | 189 | char buf[CALLPROC_BUFFER_SIZE_MAX]; |
| 190 | int bufsize = CALLPROC_BUFFER_SIZE_MIN; | 190 | int bufsize = CALLPROC_BUFFER_SIZE_MIN; |
| 191 | int count = SPECPDL_INDEX (); | 191 | int count = SPECPDL_INDEX (); |
| 192 | volatile USE_SAFE_ALLOCA; | ||
| 192 | 193 | ||
| 194 | const unsigned char **volatile new_argv_volatile; | ||
| 193 | register const unsigned char **new_argv; | 195 | register const unsigned char **new_argv; |
| 194 | /* File to use for stderr in the child. | 196 | /* File to use for stderr in the child. |
| 195 | t means use same as standard output. */ | 197 | t means use same as standard output. */ |
| @@ -220,7 +222,7 @@ usage: (call-process PROGRAM &optional INFILE BUFFER DISPLAY &rest ARGS) */) | |||
| 220 | /* Decide the coding-system for giving arguments. */ | 222 | /* Decide the coding-system for giving arguments. */ |
| 221 | { | 223 | { |
| 222 | Lisp_Object val, *args2; | 224 | Lisp_Object val, *args2; |
| 223 | int i; | 225 | size_t i; |
| 224 | 226 | ||
| 225 | /* If arguments are supplied, we may have to encode them. */ | 227 | /* If arguments are supplied, we may have to encode them. */ |
| 226 | if (nargs >= 5) | 228 | if (nargs >= 5) |
| @@ -241,7 +243,7 @@ usage: (call-process PROGRAM &optional INFILE BUFFER DISPLAY &rest ARGS) */) | |||
| 241 | val = Qraw_text; | 243 | val = Qraw_text; |
| 242 | else | 244 | else |
| 243 | { | 245 | { |
| 244 | args2 = (Lisp_Object *) alloca ((nargs + 1) * sizeof *args2); | 246 | SAFE_ALLOCA (args2, Lisp_Object *, (nargs + 1) * sizeof *args2); |
| 245 | args2[0] = Qcall_process; | 247 | args2[0] = Qcall_process; |
| 246 | for (i = 0; i < nargs; i++) args2[i + 1] = args[i]; | 248 | for (i = 0; i < nargs; i++) args2[i + 1] = args[i]; |
| 247 | coding_systems = Ffind_operation_coding_system (nargs + 1, args2); | 249 | coding_systems = Ffind_operation_coding_system (nargs + 1, args2); |
| @@ -343,7 +345,7 @@ usage: (call-process PROGRAM &optional INFILE BUFFER DISPLAY &rest ARGS) */) | |||
| 343 | UNGCPRO; | 345 | UNGCPRO; |
| 344 | } | 346 | } |
| 345 | 347 | ||
| 346 | display_p = INTERACTIVE && nargs >= 4 && !NILP (args[3]); | 348 | display_p_volatile = INTERACTIVE && nargs >= 4 && !NILP (args[3]); |
| 347 | 349 | ||
| 348 | filefd = emacs_open (SSDATA (infile), O_RDONLY, 0); | 350 | filefd = emacs_open (SSDATA (infile), O_RDONLY, 0); |
| 349 | if (filefd < 0) | 351 | if (filefd < 0) |
| @@ -371,11 +373,12 @@ usage: (call-process PROGRAM &optional INFILE BUFFER DISPLAY &rest ARGS) */) | |||
| 371 | && SREF (path, 1) == ':') | 373 | && SREF (path, 1) == ':') |
| 372 | path = Fsubstring (path, make_number (2), Qnil); | 374 | path = Fsubstring (path, make_number (2), Qnil); |
| 373 | 375 | ||
| 374 | new_argv = (const unsigned char **) | 376 | SAFE_ALLOCA (new_argv, const unsigned char **, |
| 375 | alloca (max (2, nargs - 2) * sizeof (char *)); | 377 | (nargs > 4 ? nargs - 2 : 2) * sizeof *new_argv); |
| 378 | new_argv_volatile = new_argv; | ||
| 376 | if (nargs > 4) | 379 | if (nargs > 4) |
| 377 | { | 380 | { |
| 378 | register int i; | 381 | register size_t i; |
| 379 | struct gcpro gcpro1, gcpro2, gcpro3, gcpro4, gcpro5; | 382 | struct gcpro gcpro1, gcpro2, gcpro3, gcpro4, gcpro5; |
| 380 | 383 | ||
| 381 | GCPRO5 (infile, buffer, current_dir, path, error_file); | 384 | GCPRO5 (infile, buffer, current_dir, path, error_file); |
| @@ -542,6 +545,8 @@ usage: (call-process PROGRAM &optional INFILE BUFFER DISPLAY &rest ARGS) */) | |||
| 542 | 545 | ||
| 543 | pid = vfork (); | 546 | pid = vfork (); |
| 544 | 547 | ||
| 548 | new_argv = new_argv_volatile; | ||
| 549 | |||
| 545 | if (pid == 0) | 550 | if (pid == 0) |
| 546 | { | 551 | { |
| 547 | if (fd[0] >= 0) | 552 | if (fd[0] >= 0) |
| @@ -640,9 +645,9 @@ usage: (call-process PROGRAM &optional INFILE BUFFER DISPLAY &rest ARGS) */) | |||
| 640 | { | 645 | { |
| 641 | if (EQ (coding_systems, Qt)) | 646 | if (EQ (coding_systems, Qt)) |
| 642 | { | 647 | { |
| 643 | int i; | 648 | size_t i; |
| 644 | 649 | ||
| 645 | args2 = (Lisp_Object *) alloca ((nargs + 1) * sizeof *args2); | 650 | SAFE_ALLOCA (args2, Lisp_Object *, (nargs + 1) * sizeof *args2); |
| 646 | args2[0] = Qcall_process; | 651 | args2[0] = Qcall_process; |
| 647 | for (i = 0; i < nargs; i++) args2[i + 1] = args[i]; | 652 | for (i = 0; i < nargs; i++) args2[i + 1] = args[i]; |
| 648 | coding_systems | 653 | coding_systems |
| @@ -673,6 +678,7 @@ usage: (call-process PROGRAM &optional INFILE BUFFER DISPLAY &rest ARGS) */) | |||
| 673 | int first = 1; | 678 | int first = 1; |
| 674 | EMACS_INT total_read = 0; | 679 | EMACS_INT total_read = 0; |
| 675 | int carryover = 0; | 680 | int carryover = 0; |
| 681 | int display_p = display_p_volatile; | ||
| 676 | int display_on_the_fly = display_p; | 682 | int display_on_the_fly = display_p; |
| 677 | struct coding_system saved_coding; | 683 | struct coding_system saved_coding; |
| 678 | 684 | ||
| @@ -805,6 +811,7 @@ usage: (call-process PROGRAM &optional INFILE BUFFER DISPLAY &rest ARGS) */) | |||
| 805 | when exiting. */ | 811 | when exiting. */ |
| 806 | call_process_exited = 1; | 812 | call_process_exited = 1; |
| 807 | 813 | ||
| 814 | SAFE_FREE (); | ||
| 808 | unbind_to (count, Qnil); | 815 | unbind_to (count, Qnil); |
| 809 | 816 | ||
| 810 | if (synch_process_termsig) | 817 | if (synch_process_termsig) |
| @@ -860,7 +867,7 @@ and returns a numeric exit status or a signal description string. | |||
| 860 | If you quit, the process is killed with SIGINT, or SIGKILL if you quit again. | 867 | If you quit, the process is killed with SIGINT, or SIGKILL if you quit again. |
| 861 | 868 | ||
| 862 | usage: (call-process-region START END PROGRAM &optional DELETE BUFFER DISPLAY &rest ARGS) */) | 869 | usage: (call-process-region START END PROGRAM &optional DELETE BUFFER DISPLAY &rest ARGS) */) |
| 863 | (int nargs, register Lisp_Object *args) | 870 | (size_t nargs, register Lisp_Object *args) |
| 864 | { | 871 | { |
| 865 | struct gcpro gcpro1; | 872 | struct gcpro gcpro1; |
| 866 | Lisp_Object filename_string; | 873 | Lisp_Object filename_string; |
| @@ -869,7 +876,7 @@ usage: (call-process-region START END PROGRAM &optional DELETE BUFFER DISPLAY &r | |||
| 869 | /* Qt denotes we have not yet called Ffind_operation_coding_system. */ | 876 | /* Qt denotes we have not yet called Ffind_operation_coding_system. */ |
| 870 | Lisp_Object coding_systems; | 877 | Lisp_Object coding_systems; |
| 871 | Lisp_Object val, *args2; | 878 | Lisp_Object val, *args2; |
| 872 | int i; | 879 | size_t i; |
| 873 | char *tempfile; | 880 | char *tempfile; |
| 874 | Lisp_Object tmpdir, pattern; | 881 | Lisp_Object tmpdir, pattern; |
| 875 | 882 | ||
| @@ -893,30 +900,35 @@ usage: (call-process-region START END PROGRAM &optional DELETE BUFFER DISPLAY &r | |||
| 893 | #endif | 900 | #endif |
| 894 | } | 901 | } |
| 895 | 902 | ||
| 896 | pattern = Fexpand_file_name (Vtemp_file_name_pattern, tmpdir); | 903 | { |
| 897 | tempfile = (char *) alloca (SBYTES (pattern) + 1); | 904 | USE_SAFE_ALLOCA; |
| 898 | memcpy (tempfile, SDATA (pattern), SBYTES (pattern) + 1); | 905 | pattern = Fexpand_file_name (Vtemp_file_name_pattern, tmpdir); |
| 899 | coding_systems = Qt; | 906 | SAFE_ALLOCA (tempfile, char *, SBYTES (pattern) + 1); |
| 907 | memcpy (tempfile, SDATA (pattern), SBYTES (pattern) + 1); | ||
| 908 | coding_systems = Qt; | ||
| 900 | 909 | ||
| 901 | #ifdef HAVE_MKSTEMP | 910 | #ifdef HAVE_MKSTEMP |
| 902 | { | 911 | { |
| 903 | int fd; | 912 | int fd; |
| 904 | 913 | ||
| 905 | BLOCK_INPUT; | 914 | BLOCK_INPUT; |
| 906 | fd = mkstemp (tempfile); | 915 | fd = mkstemp (tempfile); |
| 907 | UNBLOCK_INPUT; | 916 | UNBLOCK_INPUT; |
| 908 | if (fd == -1) | 917 | if (fd == -1) |
| 909 | report_file_error ("Failed to open temporary file", | 918 | report_file_error ("Failed to open temporary file", |
| 910 | Fcons (Vtemp_file_name_pattern, Qnil)); | 919 | Fcons (Vtemp_file_name_pattern, Qnil)); |
| 911 | else | 920 | else |
| 912 | close (fd); | 921 | close (fd); |
| 913 | } | 922 | } |
| 914 | #else | 923 | #else |
| 915 | mktemp (tempfile); | 924 | mktemp (tempfile); |
| 916 | #endif | 925 | #endif |
| 917 | 926 | ||
| 918 | filename_string = build_string (tempfile); | 927 | filename_string = build_string (tempfile); |
| 919 | GCPRO1 (filename_string); | 928 | GCPRO1 (filename_string); |
| 929 | SAFE_FREE (); | ||
| 930 | } | ||
| 931 | |||
| 920 | start = args[0]; | 932 | start = args[0]; |
| 921 | end = args[1]; | 933 | end = args[1]; |
| 922 | /* Decide coding-system of the contents of the temporary file. */ | 934 | /* Decide coding-system of the contents of the temporary file. */ |
| @@ -926,11 +938,13 @@ usage: (call-process-region START END PROGRAM &optional DELETE BUFFER DISPLAY &r | |||
| 926 | val = Qraw_text; | 938 | val = Qraw_text; |
| 927 | else | 939 | else |
| 928 | { | 940 | { |
| 929 | args2 = (Lisp_Object *) alloca ((nargs + 1) * sizeof *args2); | 941 | USE_SAFE_ALLOCA; |
| 942 | SAFE_ALLOCA (args2, Lisp_Object *, (nargs + 1) * sizeof *args2); | ||
| 930 | args2[0] = Qcall_process_region; | 943 | args2[0] = Qcall_process_region; |
| 931 | for (i = 0; i < nargs; i++) args2[i + 1] = args[i]; | 944 | for (i = 0; i < nargs; i++) args2[i + 1] = args[i]; |
| 932 | coding_systems = Ffind_operation_coding_system (nargs + 1, args2); | 945 | coding_systems = Ffind_operation_coding_system (nargs + 1, args2); |
| 933 | val = CONSP (coding_systems) ? XCDR (coding_systems) : Qnil; | 946 | val = CONSP (coding_systems) ? XCDR (coding_systems) : Qnil; |
| 947 | SAFE_FREE (); | ||
| 934 | } | 948 | } |
| 935 | val = complement_process_encoding_system (val); | 949 | val = complement_process_encoding_system (val); |
| 936 | 950 | ||
| @@ -1272,12 +1286,12 @@ relocate_fd (int fd, int minfd) | |||
| 1272 | #endif | 1286 | #endif |
| 1273 | if (new == -1) | 1287 | if (new == -1) |
| 1274 | { | 1288 | { |
| 1275 | const char *message1 = "Error while setting up child: "; | 1289 | const char *message_1 = "Error while setting up child: "; |
| 1276 | const char *errmessage = strerror (errno); | 1290 | const char *errmessage = strerror (errno); |
| 1277 | const char *message2 = "\n"; | 1291 | const char *message_2 = "\n"; |
| 1278 | emacs_write (2, message1, strlen (message1)); | 1292 | emacs_write (2, message_1, strlen (message_1)); |
| 1279 | emacs_write (2, errmessage, strlen (errmessage)); | 1293 | emacs_write (2, errmessage, strlen (errmessage)); |
| 1280 | emacs_write (2, message2, strlen (message2)); | 1294 | emacs_write (2, message_2, strlen (message_2)); |
| 1281 | _exit (1); | 1295 | _exit (1); |
| 1282 | } | 1296 | } |
| 1283 | emacs_close (fd); | 1297 | emacs_close (fd); |
diff --git a/src/character.c b/src/character.c index fdaf22f04f8..bac9f6af81e 100644 --- a/src/character.c +++ b/src/character.c | |||
| @@ -232,13 +232,10 @@ translate_char (Lisp_Object table, int c) | |||
| 232 | } | 232 | } |
| 233 | 233 | ||
| 234 | /* Convert ASCII or 8-bit character C to unibyte. If C is none of | 234 | /* Convert ASCII or 8-bit character C to unibyte. If C is none of |
| 235 | them, return (C & 0xFF). | 235 | them, return (C & 0xFF). */ |
| 236 | |||
| 237 | The argument REV_TBL is now ignored. It will be removed in the | ||
| 238 | future. */ | ||
| 239 | 236 | ||
| 240 | int | 237 | int |
| 241 | multibyte_char_to_unibyte (int c, Lisp_Object rev_tbl) | 238 | multibyte_char_to_unibyte (int c) |
| 242 | { | 239 | { |
| 243 | if (c < 0x80) | 240 | if (c < 0x80) |
| 244 | return c; | 241 | return c; |
| @@ -893,9 +890,10 @@ DEFUN ("string", Fstring, Sstring, 0, MANY, 0, | |||
| 893 | doc: /* | 890 | doc: /* |
| 894 | Concatenate all the argument characters and make the result a string. | 891 | Concatenate all the argument characters and make the result a string. |
| 895 | usage: (string &rest CHARACTERS) */) | 892 | usage: (string &rest CHARACTERS) */) |
| 896 | (int n, Lisp_Object *args) | 893 | (size_t n, Lisp_Object *args) |
| 897 | { | 894 | { |
| 898 | int i, c; | 895 | size_t i; |
| 896 | int c; | ||
| 899 | unsigned char *buf, *p; | 897 | unsigned char *buf, *p; |
| 900 | Lisp_Object str; | 898 | Lisp_Object str; |
| 901 | USE_SAFE_ALLOCA; | 899 | USE_SAFE_ALLOCA; |
| @@ -918,9 +916,10 @@ usage: (string &rest CHARACTERS) */) | |||
| 918 | DEFUN ("unibyte-string", Funibyte_string, Sunibyte_string, 0, MANY, 0, | 916 | DEFUN ("unibyte-string", Funibyte_string, Sunibyte_string, 0, MANY, 0, |
| 919 | doc: /* Concatenate all the argument bytes and make the result a unibyte string. | 917 | doc: /* Concatenate all the argument bytes and make the result a unibyte string. |
| 920 | usage: (unibyte-string &rest BYTES) */) | 918 | usage: (unibyte-string &rest BYTES) */) |
| 921 | (int n, Lisp_Object *args) | 919 | (size_t n, Lisp_Object *args) |
| 922 | { | 920 | { |
| 923 | int i, c; | 921 | size_t i; |
| 922 | int c; | ||
| 924 | unsigned char *buf, *p; | 923 | unsigned char *buf, *p; |
| 925 | Lisp_Object str; | 924 | Lisp_Object str; |
| 926 | USE_SAFE_ALLOCA; | 925 | USE_SAFE_ALLOCA; |
diff --git a/src/character.h b/src/character.h index 4c468e14d2c..7a75ac186fa 100644 --- a/src/character.h +++ b/src/character.h | |||
| @@ -69,7 +69,7 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | |||
| 69 | #define CHAR_TO_BYTE8(c) \ | 69 | #define CHAR_TO_BYTE8(c) \ |
| 70 | (CHAR_BYTE8_P (c) \ | 70 | (CHAR_BYTE8_P (c) \ |
| 71 | ? (c) - 0x3FFF00 \ | 71 | ? (c) - 0x3FFF00 \ |
| 72 | : multibyte_char_to_unibyte (c, Qnil)) | 72 | : multibyte_char_to_unibyte (c)) |
| 73 | 73 | ||
| 74 | /* Return the raw 8-bit byte for character C, | 74 | /* Return the raw 8-bit byte for character C, |
| 75 | or -1 if C doesn't correspond to a byte. */ | 75 | or -1 if C doesn't correspond to a byte. */ |
| @@ -278,11 +278,11 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | |||
| 278 | do { \ | 278 | do { \ |
| 279 | if ((p) > (limit)) \ | 279 | if ((p) > (limit)) \ |
| 280 | { \ | 280 | { \ |
| 281 | const unsigned char *pcb = (p); \ | 281 | const unsigned char *chp = (p); \ |
| 282 | do { \ | 282 | do { \ |
| 283 | pcb--; \ | 283 | chp--; \ |
| 284 | } while (pcb >= limit && ! CHAR_HEAD_P (*pcb)); \ | 284 | } while (chp >= limit && ! CHAR_HEAD_P (*chp)); \ |
| 285 | (p) = (BYTES_BY_CHAR_HEAD (*pcb) == (p) - pcb) ? pcb : (p) - 1; \ | 285 | (p) = (BYTES_BY_CHAR_HEAD (*chp) == (p) - chp) ? chp : (p) - 1; \ |
| 286 | } \ | 286 | } \ |
| 287 | } while (0) | 287 | } while (0) |
| 288 | 288 | ||
| @@ -353,11 +353,11 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | |||
| 353 | CHARIDX++; \ | 353 | CHARIDX++; \ |
| 354 | if (STRING_MULTIBYTE (STRING)) \ | 354 | if (STRING_MULTIBYTE (STRING)) \ |
| 355 | { \ | 355 | { \ |
| 356 | unsigned char *string_ptr = &SDATA (STRING)[BYTEIDX]; \ | 356 | unsigned char *chp = &SDATA (STRING)[BYTEIDX]; \ |
| 357 | int string_len; \ | 357 | int chlen; \ |
| 358 | \ | 358 | \ |
| 359 | OUTPUT = STRING_CHAR_AND_LENGTH (string_ptr, string_len); \ | 359 | OUTPUT = STRING_CHAR_AND_LENGTH (chp, chlen); \ |
| 360 | BYTEIDX += string_len; \ | 360 | BYTEIDX += chlen; \ |
| 361 | } \ | 361 | } \ |
| 362 | else \ | 362 | else \ |
| 363 | { \ | 363 | { \ |
| @@ -376,11 +376,11 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | |||
| 376 | CHARIDX++; \ | 376 | CHARIDX++; \ |
| 377 | if (STRING_MULTIBYTE (STRING)) \ | 377 | if (STRING_MULTIBYTE (STRING)) \ |
| 378 | { \ | 378 | { \ |
| 379 | unsigned char *ptr = &SDATA (STRING)[BYTEIDX]; \ | 379 | unsigned char *chp = &SDATA (STRING)[BYTEIDX]; \ |
| 380 | int ptrlen; \ | 380 | int chlen; \ |
| 381 | \ | 381 | \ |
| 382 | OUTPUT = STRING_CHAR_AND_LENGTH (ptr, ptrlen); \ | 382 | OUTPUT = STRING_CHAR_AND_LENGTH (chp, chlen); \ |
| 383 | BYTEIDX += ptrlen; \ | 383 | BYTEIDX += chlen; \ |
| 384 | } \ | 384 | } \ |
| 385 | else \ | 385 | else \ |
| 386 | { \ | 386 | { \ |
| @@ -416,11 +416,11 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | |||
| 416 | CHARIDX++; \ | 416 | CHARIDX++; \ |
| 417 | if (!NILP (BVAR (current_buffer, enable_multibyte_characters))) \ | 417 | if (!NILP (BVAR (current_buffer, enable_multibyte_characters))) \ |
| 418 | { \ | 418 | { \ |
| 419 | unsigned char *ptr = BYTE_POS_ADDR (BYTEIDX); \ | 419 | unsigned char *chp = BYTE_POS_ADDR (BYTEIDX); \ |
| 420 | int string_len; \ | 420 | int chlen; \ |
| 421 | \ | 421 | \ |
| 422 | OUTPUT= STRING_CHAR_AND_LENGTH (ptr, string_len); \ | 422 | OUTPUT= STRING_CHAR_AND_LENGTH (chp, chlen); \ |
| 423 | BYTEIDX += string_len; \ | 423 | BYTEIDX += chlen; \ |
| 424 | } \ | 424 | } \ |
| 425 | else \ | 425 | else \ |
| 426 | { \ | 426 | { \ |
| @@ -436,11 +436,11 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | |||
| 436 | #define FETCH_CHAR_ADVANCE_NO_CHECK(OUTPUT, CHARIDX, BYTEIDX) \ | 436 | #define FETCH_CHAR_ADVANCE_NO_CHECK(OUTPUT, CHARIDX, BYTEIDX) \ |
| 437 | do \ | 437 | do \ |
| 438 | { \ | 438 | { \ |
| 439 | unsigned char *ptr = BYTE_POS_ADDR (BYTEIDX); \ | 439 | unsigned char *chp = BYTE_POS_ADDR (BYTEIDX); \ |
| 440 | int len; \ | 440 | int chlen; \ |
| 441 | \ | 441 | \ |
| 442 | OUTPUT = STRING_CHAR_AND_LENGTH (ptr, len); \ | 442 | OUTPUT = STRING_CHAR_AND_LENGTH (chp, chlen); \ |
| 443 | BYTEIDX += len; \ | 443 | BYTEIDX += chlen; \ |
| 444 | CHARIDX++; \ | 444 | CHARIDX++; \ |
| 445 | } \ | 445 | } \ |
| 446 | while (0) | 446 | while (0) |
| @@ -451,8 +451,8 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | |||
| 451 | 451 | ||
| 452 | #define INC_POS(pos_byte) \ | 452 | #define INC_POS(pos_byte) \ |
| 453 | do { \ | 453 | do { \ |
| 454 | unsigned char *ptr = BYTE_POS_ADDR (pos_byte); \ | 454 | unsigned char *chp = BYTE_POS_ADDR (pos_byte); \ |
| 455 | pos_byte += BYTES_BY_CHAR_HEAD (*ptr); \ | 455 | pos_byte += BYTES_BY_CHAR_HEAD (*chp); \ |
| 456 | } while (0) | 456 | } while (0) |
| 457 | 457 | ||
| 458 | 458 | ||
| @@ -461,16 +461,16 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | |||
| 461 | 461 | ||
| 462 | #define DEC_POS(pos_byte) \ | 462 | #define DEC_POS(pos_byte) \ |
| 463 | do { \ | 463 | do { \ |
| 464 | unsigned char *ptr; \ | 464 | unsigned char *chp; \ |
| 465 | \ | 465 | \ |
| 466 | pos_byte--; \ | 466 | pos_byte--; \ |
| 467 | if (pos_byte < GPT_BYTE) \ | 467 | if (pos_byte < GPT_BYTE) \ |
| 468 | ptr = BEG_ADDR + pos_byte - BEG_BYTE; \ | 468 | chp = BEG_ADDR + pos_byte - BEG_BYTE; \ |
| 469 | else \ | 469 | else \ |
| 470 | ptr = BEG_ADDR + GAP_SIZE + pos_byte - BEG_BYTE; \ | 470 | chp = BEG_ADDR + GAP_SIZE + pos_byte - BEG_BYTE; \ |
| 471 | while (!CHAR_HEAD_P (*ptr)) \ | 471 | while (!CHAR_HEAD_P (*chp)) \ |
| 472 | { \ | 472 | { \ |
| 473 | ptr--; \ | 473 | chp--; \ |
| 474 | pos_byte--; \ | 474 | pos_byte--; \ |
| 475 | } \ | 475 | } \ |
| 476 | } while (0) | 476 | } while (0) |
| @@ -510,8 +510,8 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | |||
| 510 | 510 | ||
| 511 | #define BUF_INC_POS(buf, pos_byte) \ | 511 | #define BUF_INC_POS(buf, pos_byte) \ |
| 512 | do { \ | 512 | do { \ |
| 513 | unsigned char *bbp = BUF_BYTE_ADDRESS (buf, pos_byte); \ | 513 | unsigned char *chp = BUF_BYTE_ADDRESS (buf, pos_byte); \ |
| 514 | pos_byte += BYTES_BY_CHAR_HEAD (*bbp); \ | 514 | pos_byte += BYTES_BY_CHAR_HEAD (*chp); \ |
| 515 | } while (0) | 515 | } while (0) |
| 516 | 516 | ||
| 517 | 517 | ||
| @@ -520,15 +520,15 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | |||
| 520 | 520 | ||
| 521 | #define BUF_DEC_POS(buf, pos_byte) \ | 521 | #define BUF_DEC_POS(buf, pos_byte) \ |
| 522 | do { \ | 522 | do { \ |
| 523 | unsigned char *p; \ | 523 | unsigned char *chp; \ |
| 524 | pos_byte--; \ | 524 | pos_byte--; \ |
| 525 | if (pos_byte < BUF_GPT_BYTE (buf)) \ | 525 | if (pos_byte < BUF_GPT_BYTE (buf)) \ |
| 526 | p = BUF_BEG_ADDR (buf) + pos_byte - BEG_BYTE; \ | 526 | chp = BUF_BEG_ADDR (buf) + pos_byte - BEG_BYTE; \ |
| 527 | else \ | 527 | else \ |
| 528 | p = BUF_BEG_ADDR (buf) + BUF_GAP_SIZE (buf) + pos_byte - BEG_BYTE;\ | 528 | chp = BUF_BEG_ADDR (buf) + BUF_GAP_SIZE (buf) + pos_byte - BEG_BYTE;\ |
| 529 | while (!CHAR_HEAD_P (*p)) \ | 529 | while (!CHAR_HEAD_P (*chp)) \ |
| 530 | { \ | 530 | { \ |
| 531 | p--; \ | 531 | chp--; \ |
| 532 | pos_byte--; \ | 532 | pos_byte--; \ |
| 533 | } \ | 533 | } \ |
| 534 | } while (0) | 534 | } while (0) |
diff --git a/src/charset.c b/src/charset.c index d82b29ae44b..32836d459f3 100644 --- a/src/charset.c +++ b/src/charset.c | |||
| @@ -845,7 +845,7 @@ DEFUN ("define-charset-internal", Fdefine_charset_internal, | |||
| 845 | Sdefine_charset_internal, charset_arg_max, MANY, 0, | 845 | Sdefine_charset_internal, charset_arg_max, MANY, 0, |
| 846 | doc: /* For internal use only. | 846 | doc: /* For internal use only. |
| 847 | usage: (define-charset-internal ...) */) | 847 | usage: (define-charset-internal ...) */) |
| 848 | (int nargs, Lisp_Object *args) | 848 | (size_t nargs, Lisp_Object *args) |
| 849 | { | 849 | { |
| 850 | /* Charset attr vector. */ | 850 | /* Charset attr vector. */ |
| 851 | Lisp_Object attrs; | 851 | Lisp_Object attrs; |
| @@ -2171,11 +2171,12 @@ DEFUN ("set-charset-priority", Fset_charset_priority, Sset_charset_priority, | |||
| 2171 | 1, MANY, 0, | 2171 | 1, MANY, 0, |
| 2172 | doc: /* Assign higher priority to the charsets given as arguments. | 2172 | doc: /* Assign higher priority to the charsets given as arguments. |
| 2173 | usage: (set-charset-priority &rest charsets) */) | 2173 | usage: (set-charset-priority &rest charsets) */) |
| 2174 | (int nargs, Lisp_Object *args) | 2174 | (size_t nargs, Lisp_Object *args) |
| 2175 | { | 2175 | { |
| 2176 | Lisp_Object new_head, old_list, arglist[2]; | 2176 | Lisp_Object new_head, old_list, arglist[2]; |
| 2177 | Lisp_Object list_2022, list_emacs_mule; | 2177 | Lisp_Object list_2022, list_emacs_mule; |
| 2178 | int i, id; | 2178 | size_t i; |
| 2179 | int id; | ||
| 2179 | 2180 | ||
| 2180 | old_list = Fcopy_sequence (Vcharset_ordered_list); | 2181 | old_list = Fcopy_sequence (Vcharset_ordered_list); |
| 2181 | new_head = Qnil; | 2182 | new_head = Qnil; |
diff --git a/src/chartab.c b/src/chartab.c index 85aa5932ac3..9ad182131e9 100644 --- a/src/chartab.c +++ b/src/chartab.c | |||
| @@ -215,7 +215,6 @@ sub_char_table_ref_and_range (Lisp_Object table, int c, int *from, int *to, Lisp | |||
| 215 | struct Lisp_Sub_Char_Table *tbl = XSUB_CHAR_TABLE (table); | 215 | struct Lisp_Sub_Char_Table *tbl = XSUB_CHAR_TABLE (table); |
| 216 | int depth = XINT (tbl->depth); | 216 | int depth = XINT (tbl->depth); |
| 217 | int min_char = XINT (tbl->min_char); | 217 | int min_char = XINT (tbl->min_char); |
| 218 | int max_char = min_char + chartab_chars[depth - 1] - 1; | ||
| 219 | int chartab_idx = CHARTAB_IDX (c, depth, min_char), idx; | 218 | int chartab_idx = CHARTAB_IDX (c, depth, min_char), idx; |
| 220 | Lisp_Object val; | 219 | Lisp_Object val; |
| 221 | 220 | ||
| @@ -244,8 +243,9 @@ sub_char_table_ref_and_range (Lisp_Object table, int c, int *from, int *to, Lisp | |||
| 244 | break; | 243 | break; |
| 245 | } | 244 | } |
| 246 | } | 245 | } |
| 247 | while ((c = min_char + (chartab_idx + 1) * chartab_chars[depth]) <= max_char | 246 | while (((c = (chartab_idx + 1) * chartab_chars[depth]) |
| 248 | && *to >= c) | 247 | < chartab_chars[depth - 1]) |
| 248 | && (c += min_char) <= *to) | ||
| 249 | { | 249 | { |
| 250 | Lisp_Object this_val; | 250 | Lisp_Object this_val; |
| 251 | 251 | ||
| @@ -27,19 +27,11 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | |||
| 27 | #include "cm.h" | 27 | #include "cm.h" |
| 28 | #include "termhooks.h" | 28 | #include "termhooks.h" |
| 29 | #include "termchar.h" | 29 | #include "termchar.h" |
| 30 | 30 | #include "tparam.h" | |
| 31 | |||
| 32 | /* For now, don't try to include termcap.h. On some systems, | ||
| 33 | configure finds a non-standard termcap.h that the main build | ||
| 34 | won't find. */ | ||
| 35 | extern void tputs (const char *, int, int (*)(int)); | ||
| 36 | extern char *tgoto (const char *, int, int); | ||
| 37 | 31 | ||
| 38 | #define BIG 9999 /* 9999 good on VAXen. For 16 bit machines | 32 | #define BIG 9999 /* 9999 good on VAXen. For 16 bit machines |
| 39 | use about 2000.... */ | 33 | use about 2000.... */ |
| 40 | 34 | ||
| 41 | extern char *BC, *UP; | ||
| 42 | |||
| 43 | int cost; /* sums up costs */ | 35 | int cost; /* sums up costs */ |
| 44 | 36 | ||
| 45 | /* ARGSUSED */ | 37 | /* ARGSUSED */ |
| @@ -222,8 +214,9 @@ calccost (struct tty_display_info *tty, | |||
| 222 | } | 214 | } |
| 223 | totalcost = c * deltay; | 215 | totalcost = c * deltay; |
| 224 | if (doit) | 216 | if (doit) |
| 225 | while (--deltay >= 0) | 217 | do |
| 226 | emacs_tputs (tty, p, 1, cmputc); | 218 | emacs_tputs (tty, p, 1, cmputc); |
| 219 | while (0 < --deltay); | ||
| 227 | x: | 220 | x: |
| 228 | if ((deltax = dstx - srcx) == 0) | 221 | if ((deltax = dstx - srcx) == 0) |
| 229 | goto done; | 222 | goto done; |
| @@ -304,8 +297,9 @@ fail: | |||
| 304 | } | 297 | } |
| 305 | totalcost += c * deltax; | 298 | totalcost += c * deltax; |
| 306 | if (doit) | 299 | if (doit) |
| 307 | while (--deltax >= 0) | 300 | do |
| 308 | emacs_tputs (tty, p, 1, cmputc); | 301 | emacs_tputs (tty, p, 1, cmputc); |
| 302 | while (0 < --deltax); | ||
| 309 | done: | 303 | done: |
| 310 | return totalcost; | 304 | return totalcost; |
| 311 | } | 305 | } |
| @@ -96,8 +96,6 @@ struct cm | |||
| 96 | int cc_vabs; | 96 | int cc_vabs; |
| 97 | }; | 97 | }; |
| 98 | 98 | ||
| 99 | extern char PC; /* Pad character */ | ||
| 100 | |||
| 101 | /* Shorthand */ | 99 | /* Shorthand */ |
| 102 | #ifndef NoCMShortHand | 100 | #ifndef NoCMShortHand |
| 103 | #define curY(tty) (tty)->Wcm->cm_curY | 101 | #define curY(tty) (tty)->Wcm->cm_curY |
diff --git a/src/cmds.c b/src/cmds.c index fa1ac5028ae..1cf7ff24fec 100644 --- a/src/cmds.c +++ b/src/cmds.c | |||
| @@ -352,7 +352,7 @@ internal_self_insert (int c, EMACS_INT n) | |||
| 352 | { | 352 | { |
| 353 | str[0] = (SINGLE_BYTE_CHAR_P (c) | 353 | str[0] = (SINGLE_BYTE_CHAR_P (c) |
| 354 | ? c | 354 | ? c |
| 355 | : multibyte_char_to_unibyte (c, Qnil)); | 355 | : multibyte_char_to_unibyte (c)); |
| 356 | len = 1; | 356 | len = 1; |
| 357 | } | 357 | } |
| 358 | if (!NILP (overwrite) | 358 | if (!NILP (overwrite) |
| @@ -501,7 +501,7 @@ internal_self_insert (int c, EMACS_INT n) | |||
| 501 | } | 501 | } |
| 502 | 502 | ||
| 503 | /* Run hooks for electric keys. */ | 503 | /* Run hooks for electric keys. */ |
| 504 | call1 (Vrun_hooks, Qpost_self_insert_hook); | 504 | Frun_hooks (1, &Qpost_self_insert_hook); |
| 505 | 505 | ||
| 506 | return hairy; | 506 | return hairy; |
| 507 | } | 507 | } |
diff --git a/src/coding.c b/src/coding.c index 0c2836c19f6..9e28a1c9f9b 100644 --- a/src/coding.c +++ b/src/coding.c | |||
| @@ -853,8 +853,7 @@ static unsigned char *alloc_destination (struct coding_system *, | |||
| 853 | EMACS_INT, unsigned char *); | 853 | EMACS_INT, unsigned char *); |
| 854 | static void setup_iso_safe_charsets (Lisp_Object); | 854 | static void setup_iso_safe_charsets (Lisp_Object); |
| 855 | static unsigned char *encode_designation_at_bol (struct coding_system *, | 855 | static unsigned char *encode_designation_at_bol (struct coding_system *, |
| 856 | int *, int *, | 856 | int *, unsigned char *); |
| 857 | unsigned char *); | ||
| 858 | static int detect_eol (const unsigned char *, | 857 | static int detect_eol (const unsigned char *, |
| 859 | EMACS_INT, enum coding_category); | 858 | EMACS_INT, enum coding_category); |
| 860 | static Lisp_Object adjust_coding_eol_type (struct coding_system *, int); | 859 | static Lisp_Object adjust_coding_eol_type (struct coding_system *, int); |
| @@ -4299,7 +4298,7 @@ encode_invocation_designation (struct charset *charset, | |||
| 4299 | 4298 | ||
| 4300 | static unsigned char * | 4299 | static unsigned char * |
| 4301 | encode_designation_at_bol (struct coding_system *coding, int *charbuf, | 4300 | encode_designation_at_bol (struct coding_system *coding, int *charbuf, |
| 4302 | int *charbuf_end, unsigned char *dst) | 4301 | unsigned char *dst) |
| 4303 | { | 4302 | { |
| 4304 | struct charset *charset; | 4303 | struct charset *charset; |
| 4305 | /* Table of charsets to be designated to each graphic register. */ | 4304 | /* Table of charsets to be designated to each graphic register. */ |
| @@ -4390,7 +4389,7 @@ encode_coding_iso_2022 (struct coding_system *coding) | |||
| 4390 | unsigned char *dst_prev = dst; | 4389 | unsigned char *dst_prev = dst; |
| 4391 | 4390 | ||
| 4392 | /* We have to produce designation sequences if any now. */ | 4391 | /* We have to produce designation sequences if any now. */ |
| 4393 | dst = encode_designation_at_bol (coding, charbuf, charbuf_end, dst); | 4392 | dst = encode_designation_at_bol (coding, charbuf, dst); |
| 4394 | bol_designation = 0; | 4393 | bol_designation = 0; |
| 4395 | /* We are sure that designation sequences are all ASCII bytes. */ | 4394 | /* We are sure that designation sequences are all ASCII bytes. */ |
| 4396 | produced_chars += dst - dst_prev; | 4395 | produced_chars += dst - dst_prev; |
| @@ -5266,11 +5265,12 @@ encode_coding_raw_text (struct coding_system *coding) | |||
| 5266 | unsigned char str[MAX_MULTIBYTE_LENGTH], *p0 = str, *p1 = str; | 5265 | unsigned char str[MAX_MULTIBYTE_LENGTH], *p0 = str, *p1 = str; |
| 5267 | 5266 | ||
| 5268 | CHAR_STRING_ADVANCE (c, p1); | 5267 | CHAR_STRING_ADVANCE (c, p1); |
| 5269 | while (p0 < p1) | 5268 | do |
| 5270 | { | 5269 | { |
| 5271 | EMIT_ONE_BYTE (*p0); | 5270 | EMIT_ONE_BYTE (*p0); |
| 5272 | p0++; | 5271 | p0++; |
| 5273 | } | 5272 | } |
| 5273 | while (p0 < p1); | ||
| 5274 | } | 5274 | } |
| 5275 | } | 5275 | } |
| 5276 | else | 5276 | else |
| @@ -9299,7 +9299,7 @@ function to call for FILENAME, that function should examine the | |||
| 9299 | contents of BUFFER instead of reading the file. | 9299 | contents of BUFFER instead of reading the file. |
| 9300 | 9300 | ||
| 9301 | usage: (find-operation-coding-system OPERATION ARGUMENTS...) */) | 9301 | usage: (find-operation-coding-system OPERATION ARGUMENTS...) */) |
| 9302 | (int nargs, Lisp_Object *args) | 9302 | (size_t nargs, Lisp_Object *args) |
| 9303 | { | 9303 | { |
| 9304 | Lisp_Object operation, target_idx, target, val; | 9304 | Lisp_Object operation, target_idx, target, val; |
| 9305 | register Lisp_Object chain; | 9305 | register Lisp_Object chain; |
| @@ -9308,17 +9308,17 @@ usage: (find-operation-coding-system OPERATION ARGUMENTS...) */) | |||
| 9308 | error ("Too few arguments"); | 9308 | error ("Too few arguments"); |
| 9309 | operation = args[0]; | 9309 | operation = args[0]; |
| 9310 | if (!SYMBOLP (operation) | 9310 | if (!SYMBOLP (operation) |
| 9311 | || !INTEGERP (target_idx = Fget (operation, Qtarget_idx))) | 9311 | || !NATNUMP (target_idx = Fget (operation, Qtarget_idx))) |
| 9312 | error ("Invalid first argument"); | 9312 | error ("Invalid first argument"); |
| 9313 | if (nargs < 1 + XINT (target_idx)) | 9313 | if (nargs < 1 + XFASTINT (target_idx)) |
| 9314 | error ("Too few arguments for operation: %s", | 9314 | error ("Too few arguments for operation: %s", |
| 9315 | SDATA (SYMBOL_NAME (operation))); | 9315 | SDATA (SYMBOL_NAME (operation))); |
| 9316 | target = args[XINT (target_idx) + 1]; | 9316 | target = args[XFASTINT (target_idx) + 1]; |
| 9317 | if (!(STRINGP (target) | 9317 | if (!(STRINGP (target) |
| 9318 | || (EQ (operation, Qinsert_file_contents) && CONSP (target) | 9318 | || (EQ (operation, Qinsert_file_contents) && CONSP (target) |
| 9319 | && STRINGP (XCAR (target)) && BUFFERP (XCDR (target))) | 9319 | && STRINGP (XCAR (target)) && BUFFERP (XCDR (target))) |
| 9320 | || (EQ (operation, Qopen_network_stream) && INTEGERP (target)))) | 9320 | || (EQ (operation, Qopen_network_stream) && INTEGERP (target)))) |
| 9321 | error ("Invalid %dth argument", XINT (target_idx) + 1); | 9321 | error ("Invalid %dth argument", XFASTINT (target_idx) + 1); |
| 9322 | if (CONSP (target)) | 9322 | if (CONSP (target)) |
| 9323 | target = XCAR (target); | 9323 | target = XCAR (target); |
| 9324 | 9324 | ||
| @@ -9375,9 +9375,9 @@ If multiple coding systems belong to the same category, | |||
| 9375 | all but the first one are ignored. | 9375 | all but the first one are ignored. |
| 9376 | 9376 | ||
| 9377 | usage: (set-coding-system-priority &rest coding-systems) */) | 9377 | usage: (set-coding-system-priority &rest coding-systems) */) |
| 9378 | (int nargs, Lisp_Object *args) | 9378 | (size_t nargs, Lisp_Object *args) |
| 9379 | { | 9379 | { |
| 9380 | int i, j; | 9380 | size_t i, j; |
| 9381 | int changed[coding_category_max]; | 9381 | int changed[coding_category_max]; |
| 9382 | enum coding_category priorities[coding_category_max]; | 9382 | enum coding_category priorities[coding_category_max]; |
| 9383 | 9383 | ||
| @@ -9420,7 +9420,7 @@ usage: (set-coding-system-priority &rest coding-systems) */) | |||
| 9420 | 9420 | ||
| 9421 | /* Update `coding-category-list'. */ | 9421 | /* Update `coding-category-list'. */ |
| 9422 | Vcoding_category_list = Qnil; | 9422 | Vcoding_category_list = Qnil; |
| 9423 | for (i = coding_category_max - 1; i >= 0; i--) | 9423 | for (i = coding_category_max; i-- > 0; ) |
| 9424 | Vcoding_category_list | 9424 | Vcoding_category_list |
| 9425 | = Fcons (AREF (Vcoding_category_table, priorities[i]), | 9425 | = Fcons (AREF (Vcoding_category_table, priorities[i]), |
| 9426 | Vcoding_category_list); | 9426 | Vcoding_category_list); |
| @@ -9481,7 +9481,7 @@ DEFUN ("define-coding-system-internal", Fdefine_coding_system_internal, | |||
| 9481 | Sdefine_coding_system_internal, coding_arg_max, MANY, 0, | 9481 | Sdefine_coding_system_internal, coding_arg_max, MANY, 0, |
| 9482 | doc: /* For internal use only. | 9482 | doc: /* For internal use only. |
| 9483 | usage: (define-coding-system-internal ...) */) | 9483 | usage: (define-coding-system-internal ...) */) |
| 9484 | (int nargs, Lisp_Object *args) | 9484 | (size_t nargs, Lisp_Object *args) |
| 9485 | { | 9485 | { |
| 9486 | Lisp_Object name; | 9486 | Lisp_Object name; |
| 9487 | Lisp_Object spec_vec; /* [ ATTRS ALIASE EOL_TYPE ] */ | 9487 | Lisp_Object spec_vec; /* [ ATTRS ALIASE EOL_TYPE ] */ |
diff --git a/src/composite.c b/src/composite.c index 0b0602bf283..bc5644a4612 100644 --- a/src/composite.c +++ b/src/composite.c | |||
| @@ -1115,7 +1115,7 @@ composition_compute_stop_pos (struct composition_it *cmp_it, EMACS_INT charpos, | |||
| 1115 | if (! NILP (val)) | 1115 | if (! NILP (val)) |
| 1116 | { | 1116 | { |
| 1117 | Lisp_Object elt; | 1117 | Lisp_Object elt; |
| 1118 | int ridx, back, len; | 1118 | int ridx, back, blen; |
| 1119 | 1119 | ||
| 1120 | for (ridx = 0; CONSP (val); val = XCDR (val), ridx++) | 1120 | for (ridx = 0; CONSP (val); val = XCDR (val), ridx++) |
| 1121 | { | 1121 | { |
| @@ -1132,17 +1132,17 @@ composition_compute_stop_pos (struct composition_it *cmp_it, EMACS_INT charpos, | |||
| 1132 | bpos = (NILP (string) ? CHAR_TO_BYTE (cpos) | 1132 | bpos = (NILP (string) ? CHAR_TO_BYTE (cpos) |
| 1133 | : string_char_to_byte (string, cpos)); | 1133 | : string_char_to_byte (string, cpos)); |
| 1134 | if (STRINGP (AREF (elt, 0))) | 1134 | if (STRINGP (AREF (elt, 0))) |
| 1135 | len = fast_looking_at (AREF (elt, 0), cpos, bpos, | 1135 | blen = fast_looking_at (AREF (elt, 0), cpos, bpos, |
| 1136 | start + 1, limit, string); | 1136 | start + 1, limit, string); |
| 1137 | else | 1137 | else |
| 1138 | len = 1; | 1138 | blen = 1; |
| 1139 | if (len > 0) | 1139 | if (blen > 0) |
| 1140 | { | 1140 | { |
| 1141 | /* Make CPOS point to the last character of | 1141 | /* Make CPOS point to the last character of |
| 1142 | match. Note that LEN is byte-length. */ | 1142 | match. Note that BLEN is byte-length. */ |
| 1143 | if (len > 1) | 1143 | if (blen > 1) |
| 1144 | { | 1144 | { |
| 1145 | bpos += len; | 1145 | bpos += blen; |
| 1146 | if (NILP (string)) | 1146 | if (NILP (string)) |
| 1147 | cpos = BYTE_TO_CHAR (bpos) - 1; | 1147 | cpos = BYTE_TO_CHAR (bpos) - 1; |
| 1148 | else | 1148 | else |
| @@ -1248,8 +1248,8 @@ composition_reseat_it (struct composition_it *cmp_it, EMACS_INT charpos, EMACS_I | |||
| 1248 | else if (w) | 1248 | else if (w) |
| 1249 | { | 1249 | { |
| 1250 | Lisp_Object lgstring = Qnil; | 1250 | Lisp_Object lgstring = Qnil; |
| 1251 | Lisp_Object val, elt, re; | 1251 | Lisp_Object val, elt; |
| 1252 | int len, i; | 1252 | int i; |
| 1253 | 1253 | ||
| 1254 | val = CHAR_TABLE_REF (Vcomposition_function_table, cmp_it->ch); | 1254 | val = CHAR_TABLE_REF (Vcomposition_function_table, cmp_it->ch); |
| 1255 | for (i = 0; i < cmp_it->rule_idx; i++, val = XCDR (val)); | 1255 | for (i = 0; i < cmp_it->rule_idx; i++, val = XCDR (val)); |
| @@ -1364,7 +1364,7 @@ composition_reseat_it (struct composition_it *cmp_it, EMACS_INT charpos, EMACS_I | |||
| 1364 | int | 1364 | int |
| 1365 | composition_update_it (struct composition_it *cmp_it, EMACS_INT charpos, EMACS_INT bytepos, Lisp_Object string) | 1365 | composition_update_it (struct composition_it *cmp_it, EMACS_INT charpos, EMACS_INT bytepos, Lisp_Object string) |
| 1366 | { | 1366 | { |
| 1367 | int i, c; | 1367 | int i, c IF_LINT (= 0); |
| 1368 | 1368 | ||
| 1369 | if (cmp_it->ch < 0) | 1369 | if (cmp_it->ch < 0) |
| 1370 | { | 1370 | { |
| @@ -1489,9 +1489,14 @@ find_automatic_composition (EMACS_INT pos, EMACS_INT limit, EMACS_INT *start, EM | |||
| 1489 | EMACS_INT head, tail, stop; | 1489 | EMACS_INT head, tail, stop; |
| 1490 | /* Limit to check a composition after POS. */ | 1490 | /* Limit to check a composition after POS. */ |
| 1491 | EMACS_INT fore_check_limit; | 1491 | EMACS_INT fore_check_limit; |
| 1492 | struct position_record orig, cur, check, prev; | 1492 | struct position_record orig, cur; |
| 1493 | |||
| 1494 | /* FIXME: It's not obvious whether these two variables need initialization. | ||
| 1495 | If they do, please supply initial values. | ||
| 1496 | If not, please remove this comment. */ | ||
| 1497 | struct position_record check IF_LINT (= {0}), prev IF_LINT (= {0}); | ||
| 1498 | |||
| 1493 | Lisp_Object check_val, val, elt; | 1499 | Lisp_Object check_val, val, elt; |
| 1494 | int check_lookback; | ||
| 1495 | int c; | 1500 | int c; |
| 1496 | Lisp_Object window; | 1501 | Lisp_Object window; |
| 1497 | struct window *w; | 1502 | struct window *w; |
| @@ -1657,7 +1662,7 @@ find_automatic_composition (EMACS_INT pos, EMACS_INT limit, EMACS_INT *start, EM | |||
| 1657 | EMACS_INT | 1662 | EMACS_INT |
| 1658 | composition_adjust_point (EMACS_INT last_pt, EMACS_INT new_pt) | 1663 | composition_adjust_point (EMACS_INT last_pt, EMACS_INT new_pt) |
| 1659 | { | 1664 | { |
| 1660 | EMACS_INT charpos, bytepos, startpos, beg, end, pos; | 1665 | EMACS_INT beg, end; |
| 1661 | Lisp_Object val; | 1666 | Lisp_Object val; |
| 1662 | int i; | 1667 | int i; |
| 1663 | 1668 | ||
| @@ -2032,4 +2037,3 @@ See also the documentation of `auto-composition-mode'. */); | |||
| 2032 | defsubr (&Sfind_composition_internal); | 2037 | defsubr (&Sfind_composition_internal); |
| 2033 | defsubr (&Scomposition_get_gstring); | 2038 | defsubr (&Scomposition_get_gstring); |
| 2034 | } | 2039 | } |
| 2035 | |||
diff --git a/src/data.c b/src/data.c index e5c485f5322..4b9d2ec0387 100644 --- a/src/data.c +++ b/src/data.c | |||
| @@ -2476,13 +2476,13 @@ enum arithop | |||
| 2476 | Amin | 2476 | Amin |
| 2477 | }; | 2477 | }; |
| 2478 | 2478 | ||
| 2479 | static Lisp_Object float_arith_driver (double, int, enum arithop, | 2479 | static Lisp_Object float_arith_driver (double, size_t, enum arithop, |
| 2480 | int, Lisp_Object *); | 2480 | size_t, Lisp_Object *); |
| 2481 | static Lisp_Object | 2481 | static Lisp_Object |
| 2482 | arith_driver (enum arithop code, int nargs, register Lisp_Object *args) | 2482 | arith_driver (enum arithop code, size_t nargs, register Lisp_Object *args) |
| 2483 | { | 2483 | { |
| 2484 | register Lisp_Object val; | 2484 | register Lisp_Object val; |
| 2485 | register int argnum; | 2485 | register size_t argnum; |
| 2486 | register EMACS_INT accum = 0; | 2486 | register EMACS_INT accum = 0; |
| 2487 | register EMACS_INT next; | 2487 | register EMACS_INT next; |
| 2488 | 2488 | ||
| @@ -2564,7 +2564,8 @@ arith_driver (enum arithop code, int nargs, register Lisp_Object *args) | |||
| 2564 | #define isnan(x) ((x) != (x)) | 2564 | #define isnan(x) ((x) != (x)) |
| 2565 | 2565 | ||
| 2566 | static Lisp_Object | 2566 | static Lisp_Object |
| 2567 | float_arith_driver (double accum, register int argnum, enum arithop code, int nargs, register Lisp_Object *args) | 2567 | float_arith_driver (double accum, register size_t argnum, enum arithop code, |
| 2568 | size_t nargs, register Lisp_Object *args) | ||
| 2568 | { | 2569 | { |
| 2569 | register Lisp_Object val; | 2570 | register Lisp_Object val; |
| 2570 | double next; | 2571 | double next; |
| @@ -2626,7 +2627,7 @@ float_arith_driver (double accum, register int argnum, enum arithop code, int na | |||
| 2626 | DEFUN ("+", Fplus, Splus, 0, MANY, 0, | 2627 | DEFUN ("+", Fplus, Splus, 0, MANY, 0, |
| 2627 | doc: /* Return sum of any number of arguments, which are numbers or markers. | 2628 | doc: /* Return sum of any number of arguments, which are numbers or markers. |
| 2628 | usage: (+ &rest NUMBERS-OR-MARKERS) */) | 2629 | usage: (+ &rest NUMBERS-OR-MARKERS) */) |
| 2629 | (int nargs, Lisp_Object *args) | 2630 | (size_t nargs, Lisp_Object *args) |
| 2630 | { | 2631 | { |
| 2631 | return arith_driver (Aadd, nargs, args); | 2632 | return arith_driver (Aadd, nargs, args); |
| 2632 | } | 2633 | } |
| @@ -2636,7 +2637,7 @@ DEFUN ("-", Fminus, Sminus, 0, MANY, 0, | |||
| 2636 | With one arg, negates it. With more than one arg, | 2637 | With one arg, negates it. With more than one arg, |
| 2637 | subtracts all but the first from the first. | 2638 | subtracts all but the first from the first. |
| 2638 | usage: (- &optional NUMBER-OR-MARKER &rest MORE-NUMBERS-OR-MARKERS) */) | 2639 | usage: (- &optional NUMBER-OR-MARKER &rest MORE-NUMBERS-OR-MARKERS) */) |
| 2639 | (int nargs, Lisp_Object *args) | 2640 | (size_t nargs, Lisp_Object *args) |
| 2640 | { | 2641 | { |
| 2641 | return arith_driver (Asub, nargs, args); | 2642 | return arith_driver (Asub, nargs, args); |
| 2642 | } | 2643 | } |
| @@ -2644,7 +2645,7 @@ usage: (- &optional NUMBER-OR-MARKER &rest MORE-NUMBERS-OR-MARKERS) */) | |||
| 2644 | DEFUN ("*", Ftimes, Stimes, 0, MANY, 0, | 2645 | DEFUN ("*", Ftimes, Stimes, 0, MANY, 0, |
| 2645 | doc: /* Return product of any number of arguments, which are numbers or markers. | 2646 | doc: /* Return product of any number of arguments, which are numbers or markers. |
| 2646 | usage: (* &rest NUMBERS-OR-MARKERS) */) | 2647 | usage: (* &rest NUMBERS-OR-MARKERS) */) |
| 2647 | (int nargs, Lisp_Object *args) | 2648 | (size_t nargs, Lisp_Object *args) |
| 2648 | { | 2649 | { |
| 2649 | return arith_driver (Amult, nargs, args); | 2650 | return arith_driver (Amult, nargs, args); |
| 2650 | } | 2651 | } |
| @@ -2653,9 +2654,9 @@ DEFUN ("/", Fquo, Squo, 2, MANY, 0, | |||
| 2653 | doc: /* Return first argument divided by all the remaining arguments. | 2654 | doc: /* Return first argument divided by all the remaining arguments. |
| 2654 | The arguments must be numbers or markers. | 2655 | The arguments must be numbers or markers. |
| 2655 | usage: (/ DIVIDEND DIVISOR &rest DIVISORS) */) | 2656 | usage: (/ DIVIDEND DIVISOR &rest DIVISORS) */) |
| 2656 | (int nargs, Lisp_Object *args) | 2657 | (size_t nargs, Lisp_Object *args) |
| 2657 | { | 2658 | { |
| 2658 | int argnum; | 2659 | size_t argnum; |
| 2659 | for (argnum = 2; argnum < nargs; argnum++) | 2660 | for (argnum = 2; argnum < nargs; argnum++) |
| 2660 | if (FLOATP (args[argnum])) | 2661 | if (FLOATP (args[argnum])) |
| 2661 | return float_arith_driver (0, 0, Adiv, nargs, args); | 2662 | return float_arith_driver (0, 0, Adiv, nargs, args); |
| @@ -2737,7 +2738,7 @@ DEFUN ("max", Fmax, Smax, 1, MANY, 0, | |||
| 2737 | doc: /* Return largest of all the arguments (which must be numbers or markers). | 2738 | doc: /* Return largest of all the arguments (which must be numbers or markers). |
| 2738 | The value is always a number; markers are converted to numbers. | 2739 | The value is always a number; markers are converted to numbers. |
| 2739 | usage: (max NUMBER-OR-MARKER &rest NUMBERS-OR-MARKERS) */) | 2740 | usage: (max NUMBER-OR-MARKER &rest NUMBERS-OR-MARKERS) */) |
| 2740 | (int nargs, Lisp_Object *args) | 2741 | (size_t nargs, Lisp_Object *args) |
| 2741 | { | 2742 | { |
| 2742 | return arith_driver (Amax, nargs, args); | 2743 | return arith_driver (Amax, nargs, args); |
| 2743 | } | 2744 | } |
| @@ -2746,7 +2747,7 @@ DEFUN ("min", Fmin, Smin, 1, MANY, 0, | |||
| 2746 | doc: /* Return smallest of all the arguments (which must be numbers or markers). | 2747 | doc: /* Return smallest of all the arguments (which must be numbers or markers). |
| 2747 | The value is always a number; markers are converted to numbers. | 2748 | The value is always a number; markers are converted to numbers. |
| 2748 | usage: (min NUMBER-OR-MARKER &rest NUMBERS-OR-MARKERS) */) | 2749 | usage: (min NUMBER-OR-MARKER &rest NUMBERS-OR-MARKERS) */) |
| 2749 | (int nargs, Lisp_Object *args) | 2750 | (size_t nargs, Lisp_Object *args) |
| 2750 | { | 2751 | { |
| 2751 | return arith_driver (Amin, nargs, args); | 2752 | return arith_driver (Amin, nargs, args); |
| 2752 | } | 2753 | } |
| @@ -2755,7 +2756,7 @@ DEFUN ("logand", Flogand, Slogand, 0, MANY, 0, | |||
| 2755 | doc: /* Return bitwise-and of all the arguments. | 2756 | doc: /* Return bitwise-and of all the arguments. |
| 2756 | Arguments may be integers, or markers converted to integers. | 2757 | Arguments may be integers, or markers converted to integers. |
| 2757 | usage: (logand &rest INTS-OR-MARKERS) */) | 2758 | usage: (logand &rest INTS-OR-MARKERS) */) |
| 2758 | (int nargs, Lisp_Object *args) | 2759 | (size_t nargs, Lisp_Object *args) |
| 2759 | { | 2760 | { |
| 2760 | return arith_driver (Alogand, nargs, args); | 2761 | return arith_driver (Alogand, nargs, args); |
| 2761 | } | 2762 | } |
| @@ -2764,7 +2765,7 @@ DEFUN ("logior", Flogior, Slogior, 0, MANY, 0, | |||
| 2764 | doc: /* Return bitwise-or of all the arguments. | 2765 | doc: /* Return bitwise-or of all the arguments. |
| 2765 | Arguments may be integers, or markers converted to integers. | 2766 | Arguments may be integers, or markers converted to integers. |
| 2766 | usage: (logior &rest INTS-OR-MARKERS) */) | 2767 | usage: (logior &rest INTS-OR-MARKERS) */) |
| 2767 | (int nargs, Lisp_Object *args) | 2768 | (size_t nargs, Lisp_Object *args) |
| 2768 | { | 2769 | { |
| 2769 | return arith_driver (Alogior, nargs, args); | 2770 | return arith_driver (Alogior, nargs, args); |
| 2770 | } | 2771 | } |
| @@ -2773,7 +2774,7 @@ DEFUN ("logxor", Flogxor, Slogxor, 0, MANY, 0, | |||
| 2773 | doc: /* Return bitwise-exclusive-or of all the arguments. | 2774 | doc: /* Return bitwise-exclusive-or of all the arguments. |
| 2774 | Arguments may be integers, or markers converted to integers. | 2775 | Arguments may be integers, or markers converted to integers. |
| 2775 | usage: (logxor &rest INTS-OR-MARKERS) */) | 2776 | usage: (logxor &rest INTS-OR-MARKERS) */) |
| 2776 | (int nargs, Lisp_Object *args) | 2777 | (size_t nargs, Lisp_Object *args) |
| 2777 | { | 2778 | { |
| 2778 | return arith_driver (Alogxor, nargs, args); | 2779 | return arith_driver (Alogxor, nargs, args); |
| 2779 | } | 2780 | } |
| @@ -3302,7 +3303,7 @@ syms_of_data (void) | |||
| 3302 | XSYMBOL (intern_c_string ("most-negative-fixnum"))->constant = 1; | 3303 | XSYMBOL (intern_c_string ("most-negative-fixnum"))->constant = 1; |
| 3303 | } | 3304 | } |
| 3304 | 3305 | ||
| 3305 | static SIGTYPE | 3306 | static void |
| 3306 | arith_error (int signo) | 3307 | arith_error (int signo) |
| 3307 | { | 3308 | { |
| 3308 | sigsetmask (SIGEMPTYMASK); | 3309 | sigsetmask (SIGEMPTYMASK); |
diff --git a/src/dbusbind.c b/src/dbusbind.c index 2c8de20a4d4..8a6870555d0 100644 --- a/src/dbusbind.c +++ b/src/dbusbind.c | |||
| @@ -1051,7 +1051,7 @@ object is returned instead of a list containing this single Lisp object. | |||
| 1051 | => "i686" | 1051 | => "i686" |
| 1052 | 1052 | ||
| 1053 | usage: (dbus-call-method BUS SERVICE PATH INTERFACE METHOD &optional :timeout TIMEOUT &rest ARGS) */) | 1053 | usage: (dbus-call-method BUS SERVICE PATH INTERFACE METHOD &optional :timeout TIMEOUT &rest ARGS) */) |
| 1054 | (int nargs, register Lisp_Object *args) | 1054 | (size_t nargs, register Lisp_Object *args) |
| 1055 | { | 1055 | { |
| 1056 | Lisp_Object bus, service, path, interface, method; | 1056 | Lisp_Object bus, service, path, interface, method; |
| 1057 | Lisp_Object result; | 1057 | Lisp_Object result; |
| @@ -1063,7 +1063,7 @@ usage: (dbus-call-method BUS SERVICE PATH INTERFACE METHOD &optional :timeout TI | |||
| 1063 | DBusError derror; | 1063 | DBusError derror; |
| 1064 | unsigned int dtype; | 1064 | unsigned int dtype; |
| 1065 | int timeout = -1; | 1065 | int timeout = -1; |
| 1066 | int i = 5; | 1066 | size_t i = 5; |
| 1067 | char signature[DBUS_MAXIMUM_SIGNATURE_LENGTH]; | 1067 | char signature[DBUS_MAXIMUM_SIGNATURE_LENGTH]; |
| 1068 | 1068 | ||
| 1069 | /* Check parameters. */ | 1069 | /* Check parameters. */ |
| @@ -1116,7 +1116,7 @@ usage: (dbus-call-method BUS SERVICE PATH INTERFACE METHOD &optional :timeout TI | |||
| 1116 | { | 1116 | { |
| 1117 | XD_DEBUG_VALID_LISP_OBJECT_P (args[i]); | 1117 | XD_DEBUG_VALID_LISP_OBJECT_P (args[i]); |
| 1118 | XD_DEBUG_VALID_LISP_OBJECT_P (args[i+1]); | 1118 | XD_DEBUG_VALID_LISP_OBJECT_P (args[i+1]); |
| 1119 | XD_DEBUG_MESSAGE ("Parameter%d %s %s", i-4, | 1119 | XD_DEBUG_MESSAGE ("Parameter%lu %s %s", (unsigned long) (i-4), |
| 1120 | SDATA (format2 ("%s", args[i], Qnil)), | 1120 | SDATA (format2 ("%s", args[i], Qnil)), |
| 1121 | SDATA (format2 ("%s", args[i+1], Qnil))); | 1121 | SDATA (format2 ("%s", args[i+1], Qnil))); |
| 1122 | ++i; | 1122 | ++i; |
| @@ -1124,7 +1124,7 @@ usage: (dbus-call-method BUS SERVICE PATH INTERFACE METHOD &optional :timeout TI | |||
| 1124 | else | 1124 | else |
| 1125 | { | 1125 | { |
| 1126 | XD_DEBUG_VALID_LISP_OBJECT_P (args[i]); | 1126 | XD_DEBUG_VALID_LISP_OBJECT_P (args[i]); |
| 1127 | XD_DEBUG_MESSAGE ("Parameter%d %s", i-4, | 1127 | XD_DEBUG_MESSAGE ("Parameter%lu %s", (unsigned long) (i-4), |
| 1128 | SDATA (format2 ("%s", args[i], Qnil))); | 1128 | SDATA (format2 ("%s", args[i], Qnil))); |
| 1129 | } | 1129 | } |
| 1130 | 1130 | ||
| @@ -1233,7 +1233,7 @@ Example: | |||
| 1233 | -| i686 | 1233 | -| i686 |
| 1234 | 1234 | ||
| 1235 | usage: (dbus-call-method-asynchronously BUS SERVICE PATH INTERFACE METHOD HANDLER &optional :timeout TIMEOUT &rest ARGS) */) | 1235 | usage: (dbus-call-method-asynchronously BUS SERVICE PATH INTERFACE METHOD HANDLER &optional :timeout TIMEOUT &rest ARGS) */) |
| 1236 | (int nargs, register Lisp_Object *args) | 1236 | (size_t nargs, register Lisp_Object *args) |
| 1237 | { | 1237 | { |
| 1238 | Lisp_Object bus, service, path, interface, method, handler; | 1238 | Lisp_Object bus, service, path, interface, method, handler; |
| 1239 | Lisp_Object result; | 1239 | Lisp_Object result; |
| @@ -1243,7 +1243,7 @@ usage: (dbus-call-method-asynchronously BUS SERVICE PATH INTERFACE METHOD HANDLE | |||
| 1243 | DBusMessageIter iter; | 1243 | DBusMessageIter iter; |
| 1244 | unsigned int dtype; | 1244 | unsigned int dtype; |
| 1245 | int timeout = -1; | 1245 | int timeout = -1; |
| 1246 | int i = 6; | 1246 | size_t i = 6; |
| 1247 | char signature[DBUS_MAXIMUM_SIGNATURE_LENGTH]; | 1247 | char signature[DBUS_MAXIMUM_SIGNATURE_LENGTH]; |
| 1248 | 1248 | ||
| 1249 | /* Check parameters. */ | 1249 | /* Check parameters. */ |
| @@ -1298,7 +1298,7 @@ usage: (dbus-call-method-asynchronously BUS SERVICE PATH INTERFACE METHOD HANDLE | |||
| 1298 | { | 1298 | { |
| 1299 | XD_DEBUG_VALID_LISP_OBJECT_P (args[i]); | 1299 | XD_DEBUG_VALID_LISP_OBJECT_P (args[i]); |
| 1300 | XD_DEBUG_VALID_LISP_OBJECT_P (args[i+1]); | 1300 | XD_DEBUG_VALID_LISP_OBJECT_P (args[i+1]); |
| 1301 | XD_DEBUG_MESSAGE ("Parameter%d %s %s", i-4, | 1301 | XD_DEBUG_MESSAGE ("Parameter%lu %s %s", (unsigned long) (i-4), |
| 1302 | SDATA (format2 ("%s", args[i], Qnil)), | 1302 | SDATA (format2 ("%s", args[i], Qnil)), |
| 1303 | SDATA (format2 ("%s", args[i+1], Qnil))); | 1303 | SDATA (format2 ("%s", args[i+1], Qnil))); |
| 1304 | ++i; | 1304 | ++i; |
| @@ -1306,7 +1306,7 @@ usage: (dbus-call-method-asynchronously BUS SERVICE PATH INTERFACE METHOD HANDLE | |||
| 1306 | else | 1306 | else |
| 1307 | { | 1307 | { |
| 1308 | XD_DEBUG_VALID_LISP_OBJECT_P (args[i]); | 1308 | XD_DEBUG_VALID_LISP_OBJECT_P (args[i]); |
| 1309 | XD_DEBUG_MESSAGE ("Parameter%d %s", i-4, | 1309 | XD_DEBUG_MESSAGE ("Parameter%lu %s", (unsigned long) (i - 4), |
| 1310 | SDATA (format2 ("%s", args[i], Qnil))); | 1310 | SDATA (format2 ("%s", args[i], Qnil))); |
| 1311 | } | 1311 | } |
| 1312 | 1312 | ||
| @@ -1357,7 +1357,7 @@ DEFUN ("dbus-method-return-internal", Fdbus_method_return_internal, | |||
| 1357 | This is an internal function, it shall not be used outside dbus.el. | 1357 | This is an internal function, it shall not be used outside dbus.el. |
| 1358 | 1358 | ||
| 1359 | usage: (dbus-method-return-internal BUS SERIAL SERVICE &rest ARGS) */) | 1359 | usage: (dbus-method-return-internal BUS SERIAL SERVICE &rest ARGS) */) |
| 1360 | (int nargs, register Lisp_Object *args) | 1360 | (size_t nargs, register Lisp_Object *args) |
| 1361 | { | 1361 | { |
| 1362 | Lisp_Object bus, serial, service; | 1362 | Lisp_Object bus, serial, service; |
| 1363 | struct gcpro gcpro1, gcpro2, gcpro3; | 1363 | struct gcpro gcpro1, gcpro2, gcpro3; |
| @@ -1365,7 +1365,7 @@ usage: (dbus-method-return-internal BUS SERIAL SERVICE &rest ARGS) */) | |||
| 1365 | DBusMessage *dmessage; | 1365 | DBusMessage *dmessage; |
| 1366 | DBusMessageIter iter; | 1366 | DBusMessageIter iter; |
| 1367 | unsigned int dtype; | 1367 | unsigned int dtype; |
| 1368 | int i; | 1368 | size_t i; |
| 1369 | char signature[DBUS_MAXIMUM_SIGNATURE_LENGTH]; | 1369 | char signature[DBUS_MAXIMUM_SIGNATURE_LENGTH]; |
| 1370 | 1370 | ||
| 1371 | /* Check parameters. */ | 1371 | /* Check parameters. */ |
| @@ -1405,7 +1405,7 @@ usage: (dbus-method-return-internal BUS SERIAL SERVICE &rest ARGS) */) | |||
| 1405 | { | 1405 | { |
| 1406 | XD_DEBUG_VALID_LISP_OBJECT_P (args[i]); | 1406 | XD_DEBUG_VALID_LISP_OBJECT_P (args[i]); |
| 1407 | XD_DEBUG_VALID_LISP_OBJECT_P (args[i+1]); | 1407 | XD_DEBUG_VALID_LISP_OBJECT_P (args[i+1]); |
| 1408 | XD_DEBUG_MESSAGE ("Parameter%d %s %s", i-2, | 1408 | XD_DEBUG_MESSAGE ("Parameter%lu %s %s", (unsigned long) (i-2), |
| 1409 | SDATA (format2 ("%s", args[i], Qnil)), | 1409 | SDATA (format2 ("%s", args[i], Qnil)), |
| 1410 | SDATA (format2 ("%s", args[i+1], Qnil))); | 1410 | SDATA (format2 ("%s", args[i+1], Qnil))); |
| 1411 | ++i; | 1411 | ++i; |
| @@ -1413,7 +1413,7 @@ usage: (dbus-method-return-internal BUS SERIAL SERVICE &rest ARGS) */) | |||
| 1413 | else | 1413 | else |
| 1414 | { | 1414 | { |
| 1415 | XD_DEBUG_VALID_LISP_OBJECT_P (args[i]); | 1415 | XD_DEBUG_VALID_LISP_OBJECT_P (args[i]); |
| 1416 | XD_DEBUG_MESSAGE ("Parameter%d %s", i-2, | 1416 | XD_DEBUG_MESSAGE ("Parameter%lu %s", (unsigned long) (i-2), |
| 1417 | SDATA (format2 ("%s", args[i], Qnil))); | 1417 | SDATA (format2 ("%s", args[i], Qnil))); |
| 1418 | } | 1418 | } |
| 1419 | 1419 | ||
| @@ -1445,7 +1445,7 @@ DEFUN ("dbus-method-error-internal", Fdbus_method_error_internal, | |||
| 1445 | This is an internal function, it shall not be used outside dbus.el. | 1445 | This is an internal function, it shall not be used outside dbus.el. |
| 1446 | 1446 | ||
| 1447 | usage: (dbus-method-error-internal BUS SERIAL SERVICE &rest ARGS) */) | 1447 | usage: (dbus-method-error-internal BUS SERIAL SERVICE &rest ARGS) */) |
| 1448 | (int nargs, register Lisp_Object *args) | 1448 | (size_t nargs, register Lisp_Object *args) |
| 1449 | { | 1449 | { |
| 1450 | Lisp_Object bus, serial, service; | 1450 | Lisp_Object bus, serial, service; |
| 1451 | struct gcpro gcpro1, gcpro2, gcpro3; | 1451 | struct gcpro gcpro1, gcpro2, gcpro3; |
| @@ -1453,7 +1453,7 @@ usage: (dbus-method-error-internal BUS SERIAL SERVICE &rest ARGS) */) | |||
| 1453 | DBusMessage *dmessage; | 1453 | DBusMessage *dmessage; |
| 1454 | DBusMessageIter iter; | 1454 | DBusMessageIter iter; |
| 1455 | unsigned int dtype; | 1455 | unsigned int dtype; |
| 1456 | int i; | 1456 | size_t i; |
| 1457 | char signature[DBUS_MAXIMUM_SIGNATURE_LENGTH]; | 1457 | char signature[DBUS_MAXIMUM_SIGNATURE_LENGTH]; |
| 1458 | 1458 | ||
| 1459 | /* Check parameters. */ | 1459 | /* Check parameters. */ |
| @@ -1494,7 +1494,7 @@ usage: (dbus-method-error-internal BUS SERIAL SERVICE &rest ARGS) */) | |||
| 1494 | { | 1494 | { |
| 1495 | XD_DEBUG_VALID_LISP_OBJECT_P (args[i]); | 1495 | XD_DEBUG_VALID_LISP_OBJECT_P (args[i]); |
| 1496 | XD_DEBUG_VALID_LISP_OBJECT_P (args[i+1]); | 1496 | XD_DEBUG_VALID_LISP_OBJECT_P (args[i+1]); |
| 1497 | XD_DEBUG_MESSAGE ("Parameter%d %s %s", i-2, | 1497 | XD_DEBUG_MESSAGE ("Parameter%lu %s %s", (unsigned long) (i-2), |
| 1498 | SDATA (format2 ("%s", args[i], Qnil)), | 1498 | SDATA (format2 ("%s", args[i], Qnil)), |
| 1499 | SDATA (format2 ("%s", args[i+1], Qnil))); | 1499 | SDATA (format2 ("%s", args[i+1], Qnil))); |
| 1500 | ++i; | 1500 | ++i; |
| @@ -1502,7 +1502,7 @@ usage: (dbus-method-error-internal BUS SERIAL SERVICE &rest ARGS) */) | |||
| 1502 | else | 1502 | else |
| 1503 | { | 1503 | { |
| 1504 | XD_DEBUG_VALID_LISP_OBJECT_P (args[i]); | 1504 | XD_DEBUG_VALID_LISP_OBJECT_P (args[i]); |
| 1505 | XD_DEBUG_MESSAGE ("Parameter%d %s", i-2, | 1505 | XD_DEBUG_MESSAGE ("Parameter%lu %s", (unsigned long) (i-2), |
| 1506 | SDATA (format2 ("%s", args[i], Qnil))); | 1506 | SDATA (format2 ("%s", args[i], Qnil))); |
| 1507 | } | 1507 | } |
| 1508 | 1508 | ||
| @@ -1557,7 +1557,7 @@ Example: | |||
| 1557 | "org.gnu.Emacs.FileManager" "FileModified" "/home/albinus/.emacs") | 1557 | "org.gnu.Emacs.FileManager" "FileModified" "/home/albinus/.emacs") |
| 1558 | 1558 | ||
| 1559 | usage: (dbus-send-signal BUS SERVICE PATH INTERFACE SIGNAL &rest ARGS) */) | 1559 | usage: (dbus-send-signal BUS SERVICE PATH INTERFACE SIGNAL &rest ARGS) */) |
| 1560 | (int nargs, register Lisp_Object *args) | 1560 | (size_t nargs, register Lisp_Object *args) |
| 1561 | { | 1561 | { |
| 1562 | Lisp_Object bus, service, path, interface, signal; | 1562 | Lisp_Object bus, service, path, interface, signal; |
| 1563 | struct gcpro gcpro1, gcpro2, gcpro3, gcpro4, gcpro5; | 1563 | struct gcpro gcpro1, gcpro2, gcpro3, gcpro4, gcpro5; |
| @@ -1565,7 +1565,7 @@ usage: (dbus-send-signal BUS SERVICE PATH INTERFACE SIGNAL &rest ARGS) */) | |||
| 1565 | DBusMessage *dmessage; | 1565 | DBusMessage *dmessage; |
| 1566 | DBusMessageIter iter; | 1566 | DBusMessageIter iter; |
| 1567 | unsigned int dtype; | 1567 | unsigned int dtype; |
| 1568 | int i; | 1568 | size_t i; |
| 1569 | char signature[DBUS_MAXIMUM_SIGNATURE_LENGTH]; | 1569 | char signature[DBUS_MAXIMUM_SIGNATURE_LENGTH]; |
| 1570 | 1570 | ||
| 1571 | /* Check parameters. */ | 1571 | /* Check parameters. */ |
| @@ -1609,7 +1609,7 @@ usage: (dbus-send-signal BUS SERVICE PATH INTERFACE SIGNAL &rest ARGS) */) | |||
| 1609 | { | 1609 | { |
| 1610 | XD_DEBUG_VALID_LISP_OBJECT_P (args[i]); | 1610 | XD_DEBUG_VALID_LISP_OBJECT_P (args[i]); |
| 1611 | XD_DEBUG_VALID_LISP_OBJECT_P (args[i+1]); | 1611 | XD_DEBUG_VALID_LISP_OBJECT_P (args[i+1]); |
| 1612 | XD_DEBUG_MESSAGE ("Parameter%d %s %s", i-4, | 1612 | XD_DEBUG_MESSAGE ("Parameter%lu %s %s", (unsigned long) (i-4), |
| 1613 | SDATA (format2 ("%s", args[i], Qnil)), | 1613 | SDATA (format2 ("%s", args[i], Qnil)), |
| 1614 | SDATA (format2 ("%s", args[i+1], Qnil))); | 1614 | SDATA (format2 ("%s", args[i+1], Qnil))); |
| 1615 | ++i; | 1615 | ++i; |
| @@ -1617,7 +1617,7 @@ usage: (dbus-send-signal BUS SERVICE PATH INTERFACE SIGNAL &rest ARGS) */) | |||
| 1617 | else | 1617 | else |
| 1618 | { | 1618 | { |
| 1619 | XD_DEBUG_VALID_LISP_OBJECT_P (args[i]); | 1619 | XD_DEBUG_VALID_LISP_OBJECT_P (args[i]); |
| 1620 | XD_DEBUG_MESSAGE ("Parameter%d %s", i-4, | 1620 | XD_DEBUG_MESSAGE ("Parameter%lu %s", (unsigned long) (i-4), |
| 1621 | SDATA (format2 ("%s", args[i], Qnil))); | 1621 | SDATA (format2 ("%s", args[i], Qnil))); |
| 1622 | } | 1622 | } |
| 1623 | 1623 | ||
| @@ -1885,11 +1885,11 @@ Example: | |||
| 1885 | => :already-owner. | 1885 | => :already-owner. |
| 1886 | 1886 | ||
| 1887 | usage: (dbus-register-service BUS SERVICE &rest FLAGS) */) | 1887 | usage: (dbus-register-service BUS SERVICE &rest FLAGS) */) |
| 1888 | (int nargs, register Lisp_Object *args) | 1888 | (size_t nargs, register Lisp_Object *args) |
| 1889 | { | 1889 | { |
| 1890 | Lisp_Object bus, service; | 1890 | Lisp_Object bus, service; |
| 1891 | DBusConnection *connection; | 1891 | DBusConnection *connection; |
| 1892 | unsigned int i; | 1892 | size_t i; |
| 1893 | unsigned int value; | 1893 | unsigned int value; |
| 1894 | unsigned int flags = 0; | 1894 | unsigned int flags = 0; |
| 1895 | int result; | 1895 | int result; |
| @@ -1985,13 +1985,13 @@ INTERFACE, SIGNAL and HANDLER must not be nil. Example: | |||
| 1985 | `dbus-unregister-object' for removing the registration. | 1985 | `dbus-unregister-object' for removing the registration. |
| 1986 | 1986 | ||
| 1987 | usage: (dbus-register-signal BUS SERVICE PATH INTERFACE SIGNAL HANDLER &rest ARGS) */) | 1987 | usage: (dbus-register-signal BUS SERVICE PATH INTERFACE SIGNAL HANDLER &rest ARGS) */) |
| 1988 | (int nargs, register Lisp_Object *args) | 1988 | (size_t nargs, register Lisp_Object *args) |
| 1989 | { | 1989 | { |
| 1990 | Lisp_Object bus, service, path, interface, signal, handler; | 1990 | Lisp_Object bus, service, path, interface, signal, handler; |
| 1991 | struct gcpro gcpro1, gcpro2, gcpro3, gcpro4, gcpro5, gcpro6; | 1991 | struct gcpro gcpro1, gcpro2, gcpro3, gcpro4, gcpro5, gcpro6; |
| 1992 | Lisp_Object uname, key, key1, value; | 1992 | Lisp_Object uname, key, key1, value; |
| 1993 | DBusConnection *connection; | 1993 | DBusConnection *connection; |
| 1994 | int i; | 1994 | size_t i; |
| 1995 | char rule[DBUS_MAXIMUM_MATCH_RULE_LENGTH]; | 1995 | char rule[DBUS_MAXIMUM_MATCH_RULE_LENGTH]; |
| 1996 | char x[DBUS_MAXIMUM_MATCH_RULE_LENGTH]; | 1996 | char x[DBUS_MAXIMUM_MATCH_RULE_LENGTH]; |
| 1997 | DBusError derror; | 1997 | DBusError derror; |
| @@ -2061,7 +2061,8 @@ usage: (dbus-register-signal BUS SERVICE PATH INTERFACE SIGNAL HANDLER &rest ARG | |||
| 2061 | if (!NILP (args[i])) | 2061 | if (!NILP (args[i])) |
| 2062 | { | 2062 | { |
| 2063 | CHECK_STRING (args[i]); | 2063 | CHECK_STRING (args[i]); |
| 2064 | sprintf (x, ",arg%d='%s'", i-6, SDATA (args[i])); | 2064 | sprintf (x, ",arg%lu='%s'", (unsigned long) (i-6), |
| 2065 | SDATA (args[i])); | ||
| 2065 | strcat (rule, x); | 2066 | strcat (rule, x); |
| 2066 | } | 2067 | } |
| 2067 | 2068 | ||
diff --git a/src/deps.mk b/src/deps.mk index 35754dfa7de..d84e80dca44 100644 --- a/src/deps.mk +++ b/src/deps.mk | |||
| @@ -65,7 +65,7 @@ coding.o: coding.c coding.h ccl.h buffer.h character.h charset.h composite.h \ | |||
| 65 | window.h dispextern.h msdos.h frame.h termhooks.h \ | 65 | window.h dispextern.h msdos.h frame.h termhooks.h \ |
| 66 | lisp.h globals.h $(config_h) | 66 | lisp.h globals.h $(config_h) |
| 67 | cm.o: cm.c frame.h cm.h termhooks.h termchar.h dispextern.h msdos.h \ | 67 | cm.o: cm.c frame.h cm.h termhooks.h termchar.h dispextern.h msdos.h \ |
| 68 | lisp.h globals.h $(config_h) | 68 | tparam.h lisp.h globals.h $(config_h) |
| 69 | cmds.o: cmds.c syntax.h buffer.h character.h commands.h window.h lisp.h \ | 69 | cmds.o: cmds.c syntax.h buffer.h character.h commands.h window.h lisp.h \ |
| 70 | globals.h $(config_h) msdos.h dispextern.h keyboard.h keymap.h systime.h \ | 70 | globals.h $(config_h) msdos.h dispextern.h keyboard.h keymap.h systime.h \ |
| 71 | coding.h frame.h composite.h | 71 | coding.h frame.h composite.h |
| @@ -196,7 +196,7 @@ termcap.o: termcap.c lisp.h tparam.h msdos.h $(config_h) | |||
| 196 | terminal.o: terminal.c frame.h termchar.h termhooks.h charset.h coding.h \ | 196 | terminal.o: terminal.c frame.h termchar.h termhooks.h charset.h coding.h \ |
| 197 | keyboard.h lisp.h globals.h $(config_h) dispextern.h composite.h systime.h \ | 197 | keyboard.h lisp.h globals.h $(config_h) dispextern.h composite.h systime.h \ |
| 198 | msdos.h | 198 | msdos.h |
| 199 | terminfo.o: terminfo.c lisp.h globals.h $(config_h) | 199 | terminfo.o: terminfo.c tparam.h lisp.h globals.h $(config_h) |
| 200 | tparam.o: tparam.c tparam.h lisp.h $(config_h) | 200 | tparam.o: tparam.c tparam.h lisp.h $(config_h) |
| 201 | undo.o: undo.c buffer.h commands.h window.h dispextern.h msdos.h \ | 201 | undo.o: undo.c buffer.h commands.h window.h dispextern.h msdos.h \ |
| 202 | lisp.h globals.h $(config_h) | 202 | lisp.h globals.h $(config_h) |
diff --git a/src/dispextern.h b/src/dispextern.h index 9843dfd1fcd..17a9bc39fb2 100644 --- a/src/dispextern.h +++ b/src/dispextern.h | |||
| @@ -662,7 +662,7 @@ struct glyph_matrix | |||
| 662 | line. */ | 662 | line. */ |
| 663 | unsigned header_line_p : 1; | 663 | unsigned header_line_p : 1; |
| 664 | 664 | ||
| 665 | #ifdef GLYPH_DEBUG | 665 | #if GLYPH_DEBUG |
| 666 | /* A string identifying the method used to display the matrix. */ | 666 | /* A string identifying the method used to display the matrix. */ |
| 667 | char method[512]; | 667 | char method[512]; |
| 668 | #endif | 668 | #endif |
| @@ -2953,8 +2953,6 @@ extern int bidi_mirror_char (int); | |||
| 2953 | struct glyph_row *row_containing_pos (struct window *, EMACS_INT, | 2953 | struct glyph_row *row_containing_pos (struct window *, EMACS_INT, |
| 2954 | struct glyph_row *, | 2954 | struct glyph_row *, |
| 2955 | struct glyph_row *, int); | 2955 | struct glyph_row *, int); |
| 2956 | EMACS_INT string_buffer_position (struct window *, Lisp_Object, | ||
| 2957 | EMACS_INT); | ||
| 2958 | int line_bottom_y (struct it *); | 2956 | int line_bottom_y (struct it *); |
| 2959 | int display_prop_intangible_p (Lisp_Object); | 2957 | int display_prop_intangible_p (Lisp_Object); |
| 2960 | void resize_echo_area_exactly (void); | 2958 | void resize_echo_area_exactly (void); |
diff --git a/src/dispnew.c b/src/dispnew.c index 1408bea2fc6..3a78845fa56 100644 --- a/src/dispnew.c +++ b/src/dispnew.c | |||
| @@ -1297,13 +1297,11 @@ line_draw_cost (struct glyph_matrix *matrix, int vpos) | |||
| 1297 | 1297 | ||
| 1298 | 1298 | ||
| 1299 | /* Test two glyph rows A and B for equality. Value is non-zero if A | 1299 | /* Test two glyph rows A and B for equality. Value is non-zero if A |
| 1300 | and B have equal contents. W is the window to which the glyphs | 1300 | and B have equal contents. MOUSE_FACE_P non-zero means compare the |
| 1301 | rows A and B belong. It is needed here to test for partial row | 1301 | mouse_face_p flags of A and B, too. */ |
| 1302 | visibility. MOUSE_FACE_P non-zero means compare the mouse_face_p | ||
| 1303 | flags of A and B, too. */ | ||
| 1304 | 1302 | ||
| 1305 | static INLINE int | 1303 | static INLINE int |
| 1306 | row_equal_p (struct window *w, struct glyph_row *a, struct glyph_row *b, int mouse_face_p) | 1304 | row_equal_p (struct glyph_row *a, struct glyph_row *b, int mouse_face_p) |
| 1307 | { | 1305 | { |
| 1308 | if (a == b) | 1306 | if (a == b) |
| 1309 | return 1; | 1307 | return 1; |
| @@ -3592,7 +3590,10 @@ update_window (struct window *w, int force_p) | |||
| 3592 | struct glyph_row *row, *end; | 3590 | struct glyph_row *row, *end; |
| 3593 | struct glyph_row *mode_line_row; | 3591 | struct glyph_row *mode_line_row; |
| 3594 | struct glyph_row *header_line_row; | 3592 | struct glyph_row *header_line_row; |
| 3595 | int yb, changed_p = 0, mouse_face_overwritten_p = 0, n_updated; | 3593 | int yb, changed_p = 0, mouse_face_overwritten_p = 0; |
| 3594 | #if ! PERIODIC_PREEMPTION_CHECKING | ||
| 3595 | int n_updated = 0; | ||
| 3596 | #endif | ||
| 3596 | 3597 | ||
| 3597 | rif->update_window_begin_hook (w); | 3598 | rif->update_window_begin_hook (w); |
| 3598 | yb = window_text_bottom_y (w); | 3599 | yb = window_text_bottom_y (w); |
| @@ -3645,7 +3646,7 @@ update_window (struct window *w, int force_p) | |||
| 3645 | } | 3646 | } |
| 3646 | 3647 | ||
| 3647 | /* Update the rest of the lines. */ | 3648 | /* Update the rest of the lines. */ |
| 3648 | for (n_updated = 0; row < end && (force_p || !input_pending); ++row) | 3649 | for (; row < end && (force_p || !input_pending); ++row) |
| 3649 | if (row->enabled_p) | 3650 | if (row->enabled_p) |
| 3650 | { | 3651 | { |
| 3651 | int vpos = MATRIX_ROW_VPOS (row, desired_matrix); | 3652 | int vpos = MATRIX_ROW_VPOS (row, desired_matrix); |
| @@ -4251,17 +4252,16 @@ static int runs_size; | |||
| 4251 | 4252 | ||
| 4252 | static struct run **runs; | 4253 | static struct run **runs; |
| 4253 | 4254 | ||
| 4254 | /* Add glyph row ROW to the scrolling hash table during the scrolling | 4255 | /* Add glyph row ROW to the scrolling hash table. */ |
| 4255 | of window W. */ | ||
| 4256 | 4256 | ||
| 4257 | static INLINE struct row_entry * | 4257 | static INLINE struct row_entry * |
| 4258 | add_row_entry (struct window *w, struct glyph_row *row) | 4258 | add_row_entry (struct glyph_row *row) |
| 4259 | { | 4259 | { |
| 4260 | struct row_entry *entry; | 4260 | struct row_entry *entry; |
| 4261 | int i = row->hash % row_table_size; | 4261 | int i = row->hash % row_table_size; |
| 4262 | 4262 | ||
| 4263 | entry = row_table[i]; | 4263 | entry = row_table[i]; |
| 4264 | while (entry && !row_equal_p (w, entry->row, row, 1)) | 4264 | while (entry && !row_equal_p (entry->row, row, 1)) |
| 4265 | entry = entry->next; | 4265 | entry = entry->next; |
| 4266 | 4266 | ||
| 4267 | if (entry == NULL) | 4267 | if (entry == NULL) |
| @@ -4328,7 +4328,7 @@ scrolling_window (struct window *w, int header_line_p) | |||
| 4328 | && c->y == d->y | 4328 | && c->y == d->y |
| 4329 | && MATRIX_ROW_BOTTOM_Y (c) <= yb | 4329 | && MATRIX_ROW_BOTTOM_Y (c) <= yb |
| 4330 | && MATRIX_ROW_BOTTOM_Y (d) <= yb | 4330 | && MATRIX_ROW_BOTTOM_Y (d) <= yb |
| 4331 | && row_equal_p (w, c, d, 1)) | 4331 | && row_equal_p (c, d, 1)) |
| 4332 | { | 4332 | { |
| 4333 | assign_row (c, d); | 4333 | assign_row (c, d); |
| 4334 | d->enabled_p = 0; | 4334 | d->enabled_p = 0; |
| @@ -4381,8 +4381,7 @@ scrolling_window (struct window *w, int header_line_p) | |||
| 4381 | && (MATRIX_ROW (current_matrix, i - 1)->y | 4381 | && (MATRIX_ROW (current_matrix, i - 1)->y |
| 4382 | == MATRIX_ROW (desired_matrix, j - 1)->y) | 4382 | == MATRIX_ROW (desired_matrix, j - 1)->y) |
| 4383 | && !MATRIX_ROW (desired_matrix, j - 1)->redraw_fringe_bitmaps_p | 4383 | && !MATRIX_ROW (desired_matrix, j - 1)->redraw_fringe_bitmaps_p |
| 4384 | && row_equal_p (w, | 4384 | && row_equal_p (MATRIX_ROW (desired_matrix, i - 1), |
| 4385 | MATRIX_ROW (desired_matrix, i - 1), | ||
| 4386 | MATRIX_ROW (current_matrix, j - 1), 1)) | 4385 | MATRIX_ROW (current_matrix, j - 1), 1)) |
| 4387 | --i, --j; | 4386 | --i, --j; |
| 4388 | last_new = i; | 4387 | last_new = i; |
| @@ -4443,7 +4442,7 @@ scrolling_window (struct window *w, int header_line_p) | |||
| 4443 | { | 4442 | { |
| 4444 | if (MATRIX_ROW (current_matrix, i)->enabled_p) | 4443 | if (MATRIX_ROW (current_matrix, i)->enabled_p) |
| 4445 | { | 4444 | { |
| 4446 | entry = add_row_entry (w, MATRIX_ROW (current_matrix, i)); | 4445 | entry = add_row_entry (MATRIX_ROW (current_matrix, i)); |
| 4447 | old_lines[i] = entry; | 4446 | old_lines[i] = entry; |
| 4448 | ++entry->old_uses; | 4447 | ++entry->old_uses; |
| 4449 | } | 4448 | } |
| @@ -4454,7 +4453,7 @@ scrolling_window (struct window *w, int header_line_p) | |||
| 4454 | for (i = first_new; i < last_new; ++i) | 4453 | for (i = first_new; i < last_new; ++i) |
| 4455 | { | 4454 | { |
| 4456 | xassert (MATRIX_ROW_ENABLED_P (desired_matrix, i)); | 4455 | xassert (MATRIX_ROW_ENABLED_P (desired_matrix, i)); |
| 4457 | entry = add_row_entry (w, MATRIX_ROW (desired_matrix, i)); | 4456 | entry = add_row_entry (MATRIX_ROW (desired_matrix, i)); |
| 4458 | ++entry->new_uses; | 4457 | ++entry->new_uses; |
| 4459 | entry->new_line_number = i; | 4458 | entry->new_line_number = i; |
| 4460 | new_lines[i] = entry; | 4459 | new_lines[i] = entry; |
| @@ -5570,7 +5569,7 @@ marginal_area_string (struct window *w, enum window_part part, | |||
| 5570 | 5569 | ||
| 5571 | #ifdef SIGWINCH | 5570 | #ifdef SIGWINCH |
| 5572 | 5571 | ||
| 5573 | static SIGTYPE | 5572 | static void |
| 5574 | window_change_signal (int signalnum) /* If we don't have an argument, */ | 5573 | window_change_signal (int signalnum) /* If we don't have an argument, */ |
| 5575 | /* some compilers complain in signal calls. */ | 5574 | /* some compilers complain in signal calls. */ |
| 5576 | { | 5575 | { |
diff --git a/src/editfns.c b/src/editfns.c index 1f98ff040b3..d0f1df694d5 100644 --- a/src/editfns.c +++ b/src/editfns.c | |||
| @@ -101,7 +101,7 @@ static void general_insert_function (void (*) (const char *, EMACS_INT), | |||
| 101 | void (*) (Lisp_Object, EMACS_INT, | 101 | void (*) (Lisp_Object, EMACS_INT, |
| 102 | EMACS_INT, EMACS_INT, | 102 | EMACS_INT, EMACS_INT, |
| 103 | EMACS_INT, int), | 103 | EMACS_INT, int), |
| 104 | int, int, Lisp_Object *); | 104 | int, size_t, Lisp_Object *); |
| 105 | static Lisp_Object subst_char_in_region_unwind (Lisp_Object); | 105 | static Lisp_Object subst_char_in_region_unwind (Lisp_Object); |
| 106 | static Lisp_Object subst_char_in_region_unwind_1 (Lisp_Object); | 106 | static Lisp_Object subst_char_in_region_unwind_1 (Lisp_Object); |
| 107 | static void transpose_markers (EMACS_INT, EMACS_INT, EMACS_INT, EMACS_INT, | 107 | static void transpose_markers (EMACS_INT, EMACS_INT, EMACS_INT, EMACS_INT, |
| @@ -928,18 +928,21 @@ save_excursion_restore (Lisp_Object info) | |||
| 928 | tem1 = BVAR (current_buffer, mark_active); | 928 | tem1 = BVAR (current_buffer, mark_active); |
| 929 | BVAR (current_buffer, mark_active) = tem; | 929 | BVAR (current_buffer, mark_active) = tem; |
| 930 | 930 | ||
| 931 | if (!NILP (Vrun_hooks)) | 931 | /* If mark is active now, and either was not active |
| 932 | or was at a different place, run the activate hook. */ | ||
| 933 | if (! NILP (tem)) | ||
| 932 | { | 934 | { |
| 933 | /* If mark is active now, and either was not active | 935 | if (! EQ (omark, nmark)) |
| 934 | or was at a different place, run the activate hook. */ | 936 | { |
| 935 | if (! NILP (BVAR (current_buffer, mark_active))) | 937 | tem = intern ("activate-mark-hook"); |
| 936 | { | 938 | Frun_hooks (1, &tem); |
| 937 | if (! EQ (omark, nmark)) | 939 | } |
| 938 | call1 (Vrun_hooks, intern ("activate-mark-hook")); | 940 | } |
| 939 | } | 941 | /* If mark has ceased to be active, run deactivate hook. */ |
| 940 | /* If mark has ceased to be active, run deactivate hook. */ | 942 | else if (! NILP (tem1)) |
| 941 | else if (! NILP (tem1)) | 943 | { |
| 942 | call1 (Vrun_hooks, intern ("deactivate-mark-hook")); | 944 | tem = intern ("deactivate-mark-hook"); |
| 945 | Frun_hooks (1, &tem); | ||
| 943 | } | 946 | } |
| 944 | 947 | ||
| 945 | /* If buffer was visible in a window, and a different window was | 948 | /* If buffer was visible in a window, and a different window was |
| @@ -1868,7 +1871,7 @@ Years before 1970 are not guaranteed to work. On some systems, | |||
| 1868 | year values as low as 1901 do work. | 1871 | year values as low as 1901 do work. |
| 1869 | 1872 | ||
| 1870 | usage: (encode-time SECOND MINUTE HOUR DAY MONTH YEAR &optional ZONE) */) | 1873 | usage: (encode-time SECOND MINUTE HOUR DAY MONTH YEAR &optional ZONE) */) |
| 1871 | (int nargs, register Lisp_Object *args) | 1874 | (size_t nargs, register Lisp_Object *args) |
| 1872 | { | 1875 | { |
| 1873 | time_t value; | 1876 | time_t value; |
| 1874 | struct tm tm; | 1877 | struct tm tm; |
| @@ -2204,9 +2207,9 @@ general_insert_function (void (*insert_func) | |||
| 2204 | void (*insert_from_string_func) | 2207 | void (*insert_from_string_func) |
| 2205 | (Lisp_Object, EMACS_INT, EMACS_INT, | 2208 | (Lisp_Object, EMACS_INT, EMACS_INT, |
| 2206 | EMACS_INT, EMACS_INT, int), | 2209 | EMACS_INT, EMACS_INT, int), |
| 2207 | int inherit, int nargs, Lisp_Object *args) | 2210 | int inherit, size_t nargs, Lisp_Object *args) |
| 2208 | { | 2211 | { |
| 2209 | register int argnum; | 2212 | register size_t argnum; |
| 2210 | register Lisp_Object val; | 2213 | register Lisp_Object val; |
| 2211 | 2214 | ||
| 2212 | for (argnum = 0; argnum < nargs; argnum++) | 2215 | for (argnum = 0; argnum < nargs; argnum++) |
| @@ -2223,7 +2226,7 @@ general_insert_function (void (*insert_func) | |||
| 2223 | { | 2226 | { |
| 2224 | str[0] = (ASCII_CHAR_P (XINT (val)) | 2227 | str[0] = (ASCII_CHAR_P (XINT (val)) |
| 2225 | ? XINT (val) | 2228 | ? XINT (val) |
| 2226 | : multibyte_char_to_unibyte (XINT (val), Qnil)); | 2229 | : multibyte_char_to_unibyte (XINT (val))); |
| 2227 | len = 1; | 2230 | len = 1; |
| 2228 | } | 2231 | } |
| 2229 | (*insert_func) ((char *) str, len); | 2232 | (*insert_func) ((char *) str, len); |
| @@ -2269,7 +2272,7 @@ buffer; to accomplish this, apply `string-as-multibyte' to the string | |||
| 2269 | and insert the result. | 2272 | and insert the result. |
| 2270 | 2273 | ||
| 2271 | usage: (insert &rest ARGS) */) | 2274 | usage: (insert &rest ARGS) */) |
| 2272 | (int nargs, register Lisp_Object *args) | 2275 | (size_t nargs, register Lisp_Object *args) |
| 2273 | { | 2276 | { |
| 2274 | general_insert_function (insert, insert_from_string, 0, nargs, args); | 2277 | general_insert_function (insert, insert_from_string, 0, nargs, args); |
| 2275 | return Qnil; | 2278 | return Qnil; |
| @@ -2288,7 +2291,7 @@ If the current buffer is unibyte, multibyte strings are converted | |||
| 2288 | to unibyte for insertion. | 2291 | to unibyte for insertion. |
| 2289 | 2292 | ||
| 2290 | usage: (insert-and-inherit &rest ARGS) */) | 2293 | usage: (insert-and-inherit &rest ARGS) */) |
| 2291 | (int nargs, register Lisp_Object *args) | 2294 | (size_t nargs, register Lisp_Object *args) |
| 2292 | { | 2295 | { |
| 2293 | general_insert_function (insert_and_inherit, insert_from_string, 1, | 2296 | general_insert_function (insert_and_inherit, insert_from_string, 1, |
| 2294 | nargs, args); | 2297 | nargs, args); |
| @@ -2305,7 +2308,7 @@ If the current buffer is unibyte, multibyte strings are converted | |||
| 2305 | to unibyte for insertion. | 2308 | to unibyte for insertion. |
| 2306 | 2309 | ||
| 2307 | usage: (insert-before-markers &rest ARGS) */) | 2310 | usage: (insert-before-markers &rest ARGS) */) |
| 2308 | (int nargs, register Lisp_Object *args) | 2311 | (size_t nargs, register Lisp_Object *args) |
| 2309 | { | 2312 | { |
| 2310 | general_insert_function (insert_before_markers, | 2313 | general_insert_function (insert_before_markers, |
| 2311 | insert_from_string_before_markers, 0, | 2314 | insert_from_string_before_markers, 0, |
| @@ -2324,7 +2327,7 @@ If the current buffer is unibyte, multibyte strings are converted | |||
| 2324 | to unibyte for insertion. | 2327 | to unibyte for insertion. |
| 2325 | 2328 | ||
| 2326 | usage: (insert-before-markers-and-inherit &rest ARGS) */) | 2329 | usage: (insert-before-markers-and-inherit &rest ARGS) */) |
| 2327 | (int nargs, register Lisp_Object *args) | 2330 | (size_t nargs, register Lisp_Object *args) |
| 2328 | { | 2331 | { |
| 2329 | general_insert_function (insert_before_markers_and_inherit, | 2332 | general_insert_function (insert_before_markers_and_inherit, |
| 2330 | insert_from_string_before_markers, 1, | 2333 | insert_from_string_before_markers, 1, |
| @@ -3396,7 +3399,7 @@ any existing message; this lets the minibuffer contents show. See | |||
| 3396 | also `current-message'. | 3399 | also `current-message'. |
| 3397 | 3400 | ||
| 3398 | usage: (message FORMAT-STRING &rest ARGS) */) | 3401 | usage: (message FORMAT-STRING &rest ARGS) */) |
| 3399 | (int nargs, Lisp_Object *args) | 3402 | (size_t nargs, Lisp_Object *args) |
| 3400 | { | 3403 | { |
| 3401 | if (NILP (args[0]) | 3404 | if (NILP (args[0]) |
| 3402 | || (STRINGP (args[0]) | 3405 | || (STRINGP (args[0]) |
| @@ -3424,7 +3427,7 @@ If the first argument is nil or the empty string, clear any existing | |||
| 3424 | message; let the minibuffer contents show. | 3427 | message; let the minibuffer contents show. |
| 3425 | 3428 | ||
| 3426 | usage: (message-box FORMAT-STRING &rest ARGS) */) | 3429 | usage: (message-box FORMAT-STRING &rest ARGS) */) |
| 3427 | (int nargs, Lisp_Object *args) | 3430 | (size_t nargs, Lisp_Object *args) |
| 3428 | { | 3431 | { |
| 3429 | if (NILP (args[0])) | 3432 | if (NILP (args[0])) |
| 3430 | { | 3433 | { |
| @@ -3441,12 +3444,12 @@ usage: (message-box FORMAT-STRING &rest ARGS) */) | |||
| 3441 | if (FRAME_WINDOW_P (XFRAME (selected_frame)) | 3444 | if (FRAME_WINDOW_P (XFRAME (selected_frame)) |
| 3442 | || FRAME_MSDOS_P (XFRAME (selected_frame))) | 3445 | || FRAME_MSDOS_P (XFRAME (selected_frame))) |
| 3443 | { | 3446 | { |
| 3444 | Lisp_Object pane, menu, obj; | 3447 | Lisp_Object pane, menu; |
| 3445 | struct gcpro gcpro1; | 3448 | struct gcpro gcpro1; |
| 3446 | pane = Fcons (Fcons (build_string ("OK"), Qt), Qnil); | 3449 | pane = Fcons (Fcons (build_string ("OK"), Qt), Qnil); |
| 3447 | GCPRO1 (pane); | 3450 | GCPRO1 (pane); |
| 3448 | menu = Fcons (val, pane); | 3451 | menu = Fcons (val, pane); |
| 3449 | obj = Fx_popup_dialog (Qt, menu, Qt); | 3452 | Fx_popup_dialog (Qt, menu, Qt); |
| 3450 | UNGCPRO; | 3453 | UNGCPRO; |
| 3451 | return val; | 3454 | return val; |
| 3452 | } | 3455 | } |
| @@ -3481,7 +3484,7 @@ If the first argument is nil or the empty string, clear any existing | |||
| 3481 | message; let the minibuffer contents show. | 3484 | message; let the minibuffer contents show. |
| 3482 | 3485 | ||
| 3483 | usage: (message-or-box FORMAT-STRING &rest ARGS) */) | 3486 | usage: (message-or-box FORMAT-STRING &rest ARGS) */) |
| 3484 | (int nargs, Lisp_Object *args) | 3487 | (size_t nargs, Lisp_Object *args) |
| 3485 | { | 3488 | { |
| 3486 | #ifdef HAVE_MENUS | 3489 | #ifdef HAVE_MENUS |
| 3487 | if ((NILP (last_nonmenu_event) || CONSP (last_nonmenu_event)) | 3490 | if ((NILP (last_nonmenu_event) || CONSP (last_nonmenu_event)) |
| @@ -3505,14 +3508,14 @@ First argument is the string to copy. | |||
| 3505 | Remaining arguments form a sequence of PROPERTY VALUE pairs for text | 3508 | Remaining arguments form a sequence of PROPERTY VALUE pairs for text |
| 3506 | properties to add to the result. | 3509 | properties to add to the result. |
| 3507 | usage: (propertize STRING &rest PROPERTIES) */) | 3510 | usage: (propertize STRING &rest PROPERTIES) */) |
| 3508 | (int nargs, Lisp_Object *args) | 3511 | (size_t nargs, Lisp_Object *args) |
| 3509 | { | 3512 | { |
| 3510 | Lisp_Object properties, string; | 3513 | Lisp_Object properties, string; |
| 3511 | struct gcpro gcpro1, gcpro2; | 3514 | struct gcpro gcpro1, gcpro2; |
| 3512 | int i; | 3515 | size_t i; |
| 3513 | 3516 | ||
| 3514 | /* Number of args must be odd. */ | 3517 | /* Number of args must be odd. */ |
| 3515 | if ((nargs & 1) == 0 || nargs < 1) | 3518 | if ((nargs & 1) == 0) |
| 3516 | error ("Wrong number of arguments"); | 3519 | error ("Wrong number of arguments"); |
| 3517 | 3520 | ||
| 3518 | properties = string = Qnil; | 3521 | properties = string = Qnil; |
| @@ -3587,10 +3590,10 @@ decimal point itself is omitted. For %s and %S, the precision | |||
| 3587 | specifier truncates the string to the given width. | 3590 | specifier truncates the string to the given width. |
| 3588 | 3591 | ||
| 3589 | usage: (format STRING &rest OBJECTS) */) | 3592 | usage: (format STRING &rest OBJECTS) */) |
| 3590 | (int nargs, register Lisp_Object *args) | 3593 | (size_t nargs, register Lisp_Object *args) |
| 3591 | { | 3594 | { |
| 3592 | register int n; /* The number of the next arg to substitute */ | 3595 | register size_t n; /* The number of the next arg to substitute */ |
| 3593 | register EMACS_INT total; /* An estimate of the final length */ | 3596 | register size_t total; /* An estimate of the final length */ |
| 3594 | char *buf, *p; | 3597 | char *buf, *p; |
| 3595 | register char *format, *end, *format_start; | 3598 | register char *format, *end, *format_start; |
| 3596 | int nchars; | 3599 | int nchars; |
| @@ -3666,8 +3669,8 @@ usage: (format STRING &rest OBJECTS) */) | |||
| 3666 | 3669 | ||
| 3667 | /* Allocate the info and discarded tables. */ | 3670 | /* Allocate the info and discarded tables. */ |
| 3668 | { | 3671 | { |
| 3669 | int nbytes = (nargs+1) * sizeof *info; | 3672 | size_t nbytes = (nargs+1) * sizeof *info; |
| 3670 | int i; | 3673 | size_t i; |
| 3671 | if (!info) | 3674 | if (!info) |
| 3672 | info = (struct info *) alloca (nbytes); | 3675 | info = (struct info *) alloca (nbytes); |
| 3673 | memset (info, 0, nbytes); | 3676 | memset (info, 0, nbytes); |
diff --git a/src/emacs.c b/src/emacs.c index 052f22ea622..6bdd2550ed1 100644 --- a/src/emacs.c +++ b/src/emacs.c | |||
| @@ -308,7 +308,7 @@ pthread_t main_thread; | |||
| 308 | 308 | ||
| 309 | 309 | ||
| 310 | /* Handle bus errors, invalid instruction, etc. */ | 310 | /* Handle bus errors, invalid instruction, etc. */ |
| 311 | SIGTYPE | 311 | void |
| 312 | fatal_error_signal (int sig) | 312 | fatal_error_signal (int sig) |
| 313 | { | 313 | { |
| 314 | SIGNAL_THREAD_CHECK (sig); | 314 | SIGNAL_THREAD_CHECK (sig); |
| @@ -345,7 +345,7 @@ fatal_error_signal (int sig) | |||
| 345 | #ifdef SIGDANGER | 345 | #ifdef SIGDANGER |
| 346 | 346 | ||
| 347 | /* Handler for SIGDANGER. */ | 347 | /* Handler for SIGDANGER. */ |
| 348 | SIGTYPE | 348 | void |
| 349 | memory_warning_signal (sig) | 349 | memory_warning_signal (sig) |
| 350 | int sig; | 350 | int sig; |
| 351 | { | 351 | { |
| @@ -1972,14 +1972,15 @@ all of which are called before Emacs is actually killed. */) | |||
| 1972 | (Lisp_Object arg) | 1972 | (Lisp_Object arg) |
| 1973 | { | 1973 | { |
| 1974 | struct gcpro gcpro1; | 1974 | struct gcpro gcpro1; |
| 1975 | Lisp_Object hook; | ||
| 1975 | 1976 | ||
| 1976 | GCPRO1 (arg); | 1977 | GCPRO1 (arg); |
| 1977 | 1978 | ||
| 1978 | if (feof (stdin)) | 1979 | if (feof (stdin)) |
| 1979 | arg = Qt; | 1980 | arg = Qt; |
| 1980 | 1981 | ||
| 1981 | if (!NILP (Vrun_hooks)) | 1982 | hook = intern ("kill-emacs-hook"); |
| 1982 | call1 (Vrun_hooks, intern ("kill-emacs-hook")); | 1983 | Frun_hooks (1, &hook); |
| 1983 | 1984 | ||
| 1984 | UNGCPRO; | 1985 | UNGCPRO; |
| 1985 | 1986 | ||
| @@ -2312,6 +2313,7 @@ from the parent process and its tty file descriptors. */) | |||
| 2312 | (void) | 2313 | (void) |
| 2313 | { | 2314 | { |
| 2314 | int nfd; | 2315 | int nfd; |
| 2316 | int err = 0; | ||
| 2315 | 2317 | ||
| 2316 | if (!IS_DAEMON) | 2318 | if (!IS_DAEMON) |
| 2317 | error ("This function can only be called if emacs is run as a daemon"); | 2319 | error ("This function can only be called if emacs is run as a daemon"); |
| @@ -2324,10 +2326,11 @@ from the parent process and its tty file descriptors. */) | |||
| 2324 | 2326 | ||
| 2325 | /* Get rid of stdin, stdout and stderr. */ | 2327 | /* Get rid of stdin, stdout and stderr. */ |
| 2326 | nfd = open ("/dev/null", O_RDWR); | 2328 | nfd = open ("/dev/null", O_RDWR); |
| 2327 | dup2 (nfd, 0); | 2329 | err |= nfd < 0; |
| 2328 | dup2 (nfd, 1); | 2330 | err |= dup2 (nfd, 0) < 0; |
| 2329 | dup2 (nfd, 2); | 2331 | err |= dup2 (nfd, 1) < 0; |
| 2330 | close (nfd); | 2332 | err |= dup2 (nfd, 2) < 0; |
| 2333 | err |= close (nfd) != 0; | ||
| 2331 | 2334 | ||
| 2332 | /* Closing the pipe will notify the parent that it can exit. | 2335 | /* Closing the pipe will notify the parent that it can exit. |
| 2333 | FIXME: In case some other process inherited the pipe, closing it here | 2336 | FIXME: In case some other process inherited the pipe, closing it here |
| @@ -2336,10 +2339,13 @@ from the parent process and its tty file descriptors. */) | |||
| 2336 | Instead, we should probably close the pipe in start-process and | 2339 | Instead, we should probably close the pipe in start-process and |
| 2337 | call-process to make sure the pipe is never inherited by | 2340 | call-process to make sure the pipe is never inherited by |
| 2338 | subprocesses. */ | 2341 | subprocesses. */ |
| 2339 | write (daemon_pipe[1], "\n", 1); | 2342 | err |= write (daemon_pipe[1], "\n", 1) < 0; |
| 2340 | close (daemon_pipe[1]); | 2343 | err |= close (daemon_pipe[1]) != 0; |
| 2341 | /* Set it to an invalid value so we know we've already run this function. */ | 2344 | /* Set it to an invalid value so we know we've already run this function. */ |
| 2342 | daemon_pipe[1] = -1; | 2345 | daemon_pipe[1] = -1; |
| 2346 | |||
| 2347 | if (err) | ||
| 2348 | error ("I/O error during daemon initialization"); | ||
| 2343 | return Qt; | 2349 | return Qt; |
| 2344 | } | 2350 | } |
| 2345 | 2351 | ||
diff --git a/src/eval.c b/src/eval.c index c22e7d3f571..9f90e6df4b5 100644 --- a/src/eval.c +++ b/src/eval.c | |||
| @@ -30,24 +30,28 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | |||
| 30 | #include "xterm.h" | 30 | #include "xterm.h" |
| 31 | #endif | 31 | #endif |
| 32 | 32 | ||
| 33 | /* This definition is duplicated in alloc.c and keyboard.c */ | 33 | /* This definition is duplicated in alloc.c and keyboard.c. */ |
| 34 | /* Putting it in lisp.h makes cc bomb out! */ | 34 | /* Putting it in lisp.h makes cc bomb out! */ |
| 35 | 35 | ||
| 36 | struct backtrace | 36 | struct backtrace |
| 37 | { | 37 | { |
| 38 | struct backtrace *next; | 38 | struct backtrace *next; |
| 39 | Lisp_Object *function; | 39 | Lisp_Object *function; |
| 40 | Lisp_Object *args; /* Points to vector of args. */ | 40 | Lisp_Object *args; /* Points to vector of args. */ |
| 41 | int nargs; /* Length of vector. | 41 | #define NARGS_BITS (BITS_PER_INT - 2) |
| 42 | If nargs is UNEVALLED, args points to slot holding | 42 | /* Let's not use size_t because we want to allow negative values (for |
| 43 | list of unevalled args */ | 43 | UNEVALLED). Also let's steal 2 bits so we save a word (or more for |
| 44 | char evalargs; | 44 | alignment). In any case I doubt Emacs would survive a function call with |
| 45 | /* Nonzero means call value of debugger when done with this operation. */ | 45 | more than 500M arguments. */ |
| 46 | char debug_on_exit; | 46 | int nargs : NARGS_BITS; /* Length of vector. |
| 47 | If nargs is UNEVALLED, args points | ||
| 48 | to slot holding list of unevalled args. */ | ||
| 49 | char evalargs : 1; | ||
| 50 | /* Nonzero means call value of debugger when done with this operation. */ | ||
| 51 | char debug_on_exit : 1; | ||
| 47 | }; | 52 | }; |
| 48 | 53 | ||
| 49 | struct backtrace *backtrace_list; | 54 | struct backtrace *backtrace_list; |
| 50 | |||
| 51 | struct catchtag *catchlist; | 55 | struct catchtag *catchlist; |
| 52 | 56 | ||
| 53 | #ifdef DEBUG_GCPRO | 57 | #ifdef DEBUG_GCPRO |
| @@ -114,7 +118,7 @@ Lisp_Object Vsignaling_function; | |||
| 114 | int handling_signal; | 118 | int handling_signal; |
| 115 | 119 | ||
| 116 | static Lisp_Object apply_lambda (Lisp_Object fun, Lisp_Object args); | 120 | static Lisp_Object apply_lambda (Lisp_Object fun, Lisp_Object args); |
| 117 | static Lisp_Object funcall_lambda (Lisp_Object, int, Lisp_Object *); | 121 | static Lisp_Object funcall_lambda (Lisp_Object, size_t, Lisp_Object *); |
| 118 | static void unwind_to_catch (struct catchtag *, Lisp_Object) NO_RETURN; | 122 | static void unwind_to_catch (struct catchtag *, Lisp_Object) NO_RETURN; |
| 119 | static int interactive_p (int); | 123 | static int interactive_p (int); |
| 120 | 124 | ||
| @@ -148,7 +152,7 @@ init_eval (void) | |||
| 148 | when_entered_debugger = -1; | 152 | when_entered_debugger = -1; |
| 149 | } | 153 | } |
| 150 | 154 | ||
| 151 | /* unwind-protect function used by call_debugger. */ | 155 | /* Unwind-protect function used by call_debugger. */ |
| 152 | 156 | ||
| 153 | static Lisp_Object | 157 | static Lisp_Object |
| 154 | restore_stack_limits (Lisp_Object data) | 158 | restore_stack_limits (Lisp_Object data) |
| @@ -578,7 +582,7 @@ interactive_p (int exclude_subrs_p) | |||
| 578 | || btp->nargs == UNEVALLED)) | 582 | || btp->nargs == UNEVALLED)) |
| 579 | btp = btp->next; | 583 | btp = btp->next; |
| 580 | 584 | ||
| 581 | /* btp now points at the frame of the innermost function that isn't | 585 | /* `btp' now points at the frame of the innermost function that isn't |
| 582 | a special form, ignoring frames for Finteractive_p and/or | 586 | a special form, ignoring frames for Finteractive_p and/or |
| 583 | Fbytecode at the top. If this frame is for a built-in function | 587 | Fbytecode at the top. If this frame is for a built-in function |
| 584 | (such as load or eval-region) return nil. */ | 588 | (such as load or eval-region) return nil. */ |
| @@ -586,7 +590,7 @@ interactive_p (int exclude_subrs_p) | |||
| 586 | if (exclude_subrs_p && SUBRP (fun)) | 590 | if (exclude_subrs_p && SUBRP (fun)) |
| 587 | return 0; | 591 | return 0; |
| 588 | 592 | ||
| 589 | /* btp points to the frame of a Lisp function that called interactive-p. | 593 | /* `btp' points to the frame of a Lisp function that called interactive-p. |
| 590 | Return t if that function was called interactively. */ | 594 | Return t if that function was called interactively. */ |
| 591 | if (btp && btp->next && EQ (*btp->next->function, Qcall_interactively)) | 595 | if (btp && btp->next && EQ (*btp->next->function, Qcall_interactively)) |
| 592 | return 1; | 596 | return 1; |
| @@ -1028,17 +1032,17 @@ usage: (let VARLIST BODY...) */) | |||
| 1028 | Lisp_Object *temps, tem, lexenv; | 1032 | Lisp_Object *temps, tem, lexenv; |
| 1029 | register Lisp_Object elt, varlist; | 1033 | register Lisp_Object elt, varlist; |
| 1030 | int count = SPECPDL_INDEX (); | 1034 | int count = SPECPDL_INDEX (); |
| 1031 | register int argnum; | 1035 | register size_t argnum; |
| 1032 | struct gcpro gcpro1, gcpro2; | 1036 | struct gcpro gcpro1, gcpro2; |
| 1033 | USE_SAFE_ALLOCA; | 1037 | USE_SAFE_ALLOCA; |
| 1034 | 1038 | ||
| 1035 | varlist = Fcar (args); | 1039 | varlist = Fcar (args); |
| 1036 | 1040 | ||
| 1037 | /* Make space to hold the values to give the bound variables */ | 1041 | /* Make space to hold the values to give the bound variables. */ |
| 1038 | elt = Flength (varlist); | 1042 | elt = Flength (varlist); |
| 1039 | SAFE_ALLOCA_LISP (temps, XFASTINT (elt)); | 1043 | SAFE_ALLOCA_LISP (temps, XFASTINT (elt)); |
| 1040 | 1044 | ||
| 1041 | /* Compute the values and store them in `temps' */ | 1045 | /* Compute the values and store them in `temps'. */ |
| 1042 | 1046 | ||
| 1043 | GCPRO2 (args, *temps); | 1047 | GCPRO2 (args, *temps); |
| 1044 | gcpro2.nvars = 0; | 1048 | gcpro2.nvars = 0; |
| @@ -1155,7 +1159,7 @@ definitions to shadow the loaded ones for use in file byte-compilation. */) | |||
| 1155 | /* SYM is not mentioned in ENVIRONMENT. | 1159 | /* SYM is not mentioned in ENVIRONMENT. |
| 1156 | Look at its function definition. */ | 1160 | Look at its function definition. */ |
| 1157 | if (EQ (def, Qunbound) || !CONSP (def)) | 1161 | if (EQ (def, Qunbound) || !CONSP (def)) |
| 1158 | /* Not defined or definition not suitable */ | 1162 | /* Not defined or definition not suitable. */ |
| 1159 | break; | 1163 | break; |
| 1160 | if (EQ (XCAR (def), Qautoload)) | 1164 | if (EQ (XCAR (def), Qautoload)) |
| 1161 | { | 1165 | { |
| @@ -1296,10 +1300,7 @@ unwind_to_catch (struct catchtag *catch, Lisp_Object value) | |||
| 1296 | byte_stack_list = catch->byte_stack; | 1300 | byte_stack_list = catch->byte_stack; |
| 1297 | gcprolist = catch->gcpro; | 1301 | gcprolist = catch->gcpro; |
| 1298 | #ifdef DEBUG_GCPRO | 1302 | #ifdef DEBUG_GCPRO |
| 1299 | if (gcprolist != 0) | 1303 | gcpro_level = gcprolist ? gcprolist->level + 1 : gcpro_level = 0; |
| 1300 | gcpro_level = gcprolist->level + 1; | ||
| 1301 | else | ||
| 1302 | gcpro_level = 0; | ||
| 1303 | #endif | 1304 | #endif |
| 1304 | backtrace_list = catch->backlist; | 1305 | backtrace_list = catch->backlist; |
| 1305 | lisp_eval_depth = catch->lisp_eval_depth; | 1306 | lisp_eval_depth = catch->lisp_eval_depth; |
| @@ -1594,8 +1595,8 @@ internal_condition_case_2 (Lisp_Object (*bfun) (Lisp_Object, Lisp_Object), | |||
| 1594 | and ARGS as second argument. */ | 1595 | and ARGS as second argument. */ |
| 1595 | 1596 | ||
| 1596 | Lisp_Object | 1597 | Lisp_Object |
| 1597 | internal_condition_case_n (Lisp_Object (*bfun) (int, Lisp_Object*), | 1598 | internal_condition_case_n (Lisp_Object (*bfun) (size_t, Lisp_Object *), |
| 1598 | int nargs, | 1599 | size_t nargs, |
| 1599 | Lisp_Object *args, | 1600 | Lisp_Object *args, |
| 1600 | Lisp_Object handlers, | 1601 | Lisp_Object handlers, |
| 1601 | Lisp_Object (*hfun) (Lisp_Object)) | 1602 | Lisp_Object (*hfun) (Lisp_Object)) |
| @@ -1907,7 +1908,7 @@ maybe_call_debugger (Lisp_Object conditions, Lisp_Object sig, Lisp_Object data) | |||
| 1907 | ? debug_on_quit | 1908 | ? debug_on_quit |
| 1908 | : wants_debugger (Vdebug_on_error, conditions)) | 1909 | : wants_debugger (Vdebug_on_error, conditions)) |
| 1909 | && ! skip_debugger (conditions, combined_data) | 1910 | && ! skip_debugger (conditions, combined_data) |
| 1910 | /* rms: what's this for? */ | 1911 | /* RMS: What's this for? */ |
| 1911 | && when_entered_debugger < num_nonmacro_input_events) | 1912 | && when_entered_debugger < num_nonmacro_input_events) |
| 1912 | { | 1913 | { |
| 1913 | call_debugger (Fcons (Qerror, Fcons (combined_data, Qnil))); | 1914 | call_debugger (Fcons (Qerror, Fcons (combined_data, Qnil))); |
| @@ -1974,7 +1975,7 @@ find_handler_clause (Lisp_Object handlers, Lisp_Object conditions, | |||
| 1974 | } | 1975 | } |
| 1975 | 1976 | ||
| 1976 | 1977 | ||
| 1977 | /* dump an error message; called like vprintf */ | 1978 | /* Dump an error message; called like vprintf. */ |
| 1978 | void | 1979 | void |
| 1979 | verror (const char *m, va_list ap) | 1980 | verror (const char *m, va_list ap) |
| 1980 | { | 1981 | { |
| @@ -2011,7 +2012,7 @@ verror (const char *m, va_list ap) | |||
| 2011 | } | 2012 | } |
| 2012 | 2013 | ||
| 2013 | 2014 | ||
| 2014 | /* dump an error message; called like printf */ | 2015 | /* Dump an error message; called like printf. */ |
| 2015 | 2016 | ||
| 2016 | /* VARARGS 1 */ | 2017 | /* VARARGS 1 */ |
| 2017 | void | 2018 | void |
| @@ -2109,7 +2110,7 @@ this does nothing and returns nil. */) | |||
| 2109 | CHECK_SYMBOL (function); | 2110 | CHECK_SYMBOL (function); |
| 2110 | CHECK_STRING (file); | 2111 | CHECK_STRING (file); |
| 2111 | 2112 | ||
| 2112 | /* If function is defined and not as an autoload, don't override */ | 2113 | /* If function is defined and not as an autoload, don't override. */ |
| 2113 | if (!EQ (XSYMBOL (function)->function, Qunbound) | 2114 | if (!EQ (XSYMBOL (function)->function, Qunbound) |
| 2114 | && !(CONSP (XSYMBOL (function)->function) | 2115 | && !(CONSP (XSYMBOL (function)->function) |
| 2115 | && EQ (XCAR (XSYMBOL (function)->function), Qautoload))) | 2116 | && EQ (XCAR (XSYMBOL (function)->function), Qautoload))) |
| @@ -2269,7 +2270,7 @@ eval_sub (Lisp_Object form) | |||
| 2269 | 2270 | ||
| 2270 | backtrace.next = backtrace_list; | 2271 | backtrace.next = backtrace_list; |
| 2271 | backtrace_list = &backtrace; | 2272 | backtrace_list = &backtrace; |
| 2272 | backtrace.function = &original_fun; /* This also protects them from gc */ | 2273 | backtrace.function = &original_fun; /* This also protects them from gc. */ |
| 2273 | backtrace.args = &original_args; | 2274 | backtrace.args = &original_args; |
| 2274 | backtrace.nargs = UNEVALLED; | 2275 | backtrace.nargs = UNEVALLED; |
| 2275 | backtrace.evalargs = 1; | 2276 | backtrace.evalargs = 1; |
| @@ -2279,7 +2280,7 @@ eval_sub (Lisp_Object form) | |||
| 2279 | do_debug_on_call (Qt); | 2280 | do_debug_on_call (Qt); |
| 2280 | 2281 | ||
| 2281 | /* At this point, only original_fun and original_args | 2282 | /* At this point, only original_fun and original_args |
| 2282 | have values that will be used below */ | 2283 | have values that will be used below. */ |
| 2283 | retry: | 2284 | retry: |
| 2284 | 2285 | ||
| 2285 | /* Optimize for no indirection. */ | 2286 | /* Optimize for no indirection. */ |
| @@ -2300,8 +2301,9 @@ eval_sub (Lisp_Object form) | |||
| 2300 | 2301 | ||
| 2301 | CHECK_CONS_LIST (); | 2302 | CHECK_CONS_LIST (); |
| 2302 | 2303 | ||
| 2303 | if (XINT (numargs) < XSUBR (fun)->min_args || | 2304 | if (XINT (numargs) < XSUBR (fun)->min_args |
| 2304 | (XSUBR (fun)->max_args >= 0 && XSUBR (fun)->max_args < XINT (numargs))) | 2305 | || (XSUBR (fun)->max_args >= 0 |
| 2306 | && XSUBR (fun)->max_args < XINT (numargs))) | ||
| 2305 | xsignal2 (Qwrong_number_of_arguments, original_fun, numargs); | 2307 | xsignal2 (Qwrong_number_of_arguments, original_fun, numargs); |
| 2306 | 2308 | ||
| 2307 | else if (XSUBR (fun)->max_args == UNEVALLED) | 2309 | else if (XSUBR (fun)->max_args == UNEVALLED) |
| @@ -2311,9 +2313,9 @@ eval_sub (Lisp_Object form) | |||
| 2311 | } | 2313 | } |
| 2312 | else if (XSUBR (fun)->max_args == MANY) | 2314 | else if (XSUBR (fun)->max_args == MANY) |
| 2313 | { | 2315 | { |
| 2314 | /* Pass a vector of evaluated arguments */ | 2316 | /* Pass a vector of evaluated arguments. */ |
| 2315 | Lisp_Object *vals; | 2317 | Lisp_Object *vals; |
| 2316 | register int argnum = 0; | 2318 | register size_t argnum = 0; |
| 2317 | USE_SAFE_ALLOCA; | 2319 | USE_SAFE_ALLOCA; |
| 2318 | 2320 | ||
| 2319 | SAFE_ALLOCA_LISP (vals, XINT (numargs)); | 2321 | SAFE_ALLOCA_LISP (vals, XINT (numargs)); |
| @@ -2443,9 +2445,9 @@ DEFUN ("apply", Fapply, Sapply, 2, MANY, 0, | |||
| 2443 | Then return the value FUNCTION returns. | 2445 | Then return the value FUNCTION returns. |
| 2444 | Thus, (apply '+ 1 2 '(3 4)) returns 10. | 2446 | Thus, (apply '+ 1 2 '(3 4)) returns 10. |
| 2445 | usage: (apply FUNCTION &rest ARGUMENTS) */) | 2447 | usage: (apply FUNCTION &rest ARGUMENTS) */) |
| 2446 | (int nargs, Lisp_Object *args) | 2448 | (size_t nargs, Lisp_Object *args) |
| 2447 | { | 2449 | { |
| 2448 | register int i, numargs; | 2450 | register size_t i, numargs; |
| 2449 | register Lisp_Object spread_arg; | 2451 | register Lisp_Object spread_arg; |
| 2450 | register Lisp_Object *funcall_args; | 2452 | register Lisp_Object *funcall_args; |
| 2451 | Lisp_Object fun, retval; | 2453 | Lisp_Object fun, retval; |
| @@ -2475,7 +2477,7 @@ usage: (apply FUNCTION &rest ARGUMENTS) */) | |||
| 2475 | fun = indirect_function (fun); | 2477 | fun = indirect_function (fun); |
| 2476 | if (EQ (fun, Qunbound)) | 2478 | if (EQ (fun, Qunbound)) |
| 2477 | { | 2479 | { |
| 2478 | /* Let funcall get the error */ | 2480 | /* Let funcall get the error. */ |
| 2479 | fun = args[0]; | 2481 | fun = args[0]; |
| 2480 | goto funcall; | 2482 | goto funcall; |
| 2481 | } | 2483 | } |
| @@ -2484,11 +2486,11 @@ usage: (apply FUNCTION &rest ARGUMENTS) */) | |||
| 2484 | { | 2486 | { |
| 2485 | if (numargs < XSUBR (fun)->min_args | 2487 | if (numargs < XSUBR (fun)->min_args |
| 2486 | || (XSUBR (fun)->max_args >= 0 && XSUBR (fun)->max_args < numargs)) | 2488 | || (XSUBR (fun)->max_args >= 0 && XSUBR (fun)->max_args < numargs)) |
| 2487 | goto funcall; /* Let funcall get the error */ | 2489 | goto funcall; /* Let funcall get the error. */ |
| 2488 | else if (XSUBR (fun)->max_args > numargs) | 2490 | else if (XSUBR (fun)->max_args >= 0 && XSUBR (fun)->max_args > numargs) |
| 2489 | { | 2491 | { |
| 2490 | /* Avoid making funcall cons up a yet another new vector of arguments | 2492 | /* Avoid making funcall cons up a yet another new vector of arguments |
| 2491 | by explicitly supplying nil's for optional values */ | 2493 | by explicitly supplying nil's for optional values. */ |
| 2492 | SAFE_ALLOCA_LISP (funcall_args, 1 + XSUBR (fun)->max_args); | 2494 | SAFE_ALLOCA_LISP (funcall_args, 1 + XSUBR (fun)->max_args); |
| 2493 | for (i = numargs; i < XSUBR (fun)->max_args;) | 2495 | for (i = numargs; i < XSUBR (fun)->max_args;) |
| 2494 | funcall_args[++i] = Qnil; | 2496 | funcall_args[++i] = Qnil; |
| @@ -2526,9 +2528,12 @@ usage: (apply FUNCTION &rest ARGUMENTS) */) | |||
| 2526 | 2528 | ||
| 2527 | /* Run hook variables in various ways. */ | 2529 | /* Run hook variables in various ways. */ |
| 2528 | 2530 | ||
| 2529 | enum run_hooks_condition {to_completion, until_success, until_failure}; | 2531 | static Lisp_Object |
| 2530 | static Lisp_Object run_hook_with_args (int, Lisp_Object *, | 2532 | funcall_nil (size_t nargs, Lisp_Object *args) |
| 2531 | enum run_hooks_condition); | 2533 | { |
| 2534 | Ffuncall (nargs, args); | ||
| 2535 | return Qnil; | ||
| 2536 | } | ||
| 2532 | 2537 | ||
| 2533 | DEFUN ("run-hooks", Frun_hooks, Srun_hooks, 0, MANY, 0, | 2538 | DEFUN ("run-hooks", Frun_hooks, Srun_hooks, 0, MANY, 0, |
| 2534 | doc: /* Run each hook in HOOKS. | 2539 | doc: /* Run each hook in HOOKS. |
| @@ -2545,15 +2550,15 @@ hook; they should use `run-mode-hooks' instead. | |||
| 2545 | Do not use `make-local-variable' to make a hook variable buffer-local. | 2550 | Do not use `make-local-variable' to make a hook variable buffer-local. |
| 2546 | Instead, use `add-hook' and specify t for the LOCAL argument. | 2551 | Instead, use `add-hook' and specify t for the LOCAL argument. |
| 2547 | usage: (run-hooks &rest HOOKS) */) | 2552 | usage: (run-hooks &rest HOOKS) */) |
| 2548 | (int nargs, Lisp_Object *args) | 2553 | (size_t nargs, Lisp_Object *args) |
| 2549 | { | 2554 | { |
| 2550 | Lisp_Object hook[1]; | 2555 | Lisp_Object hook[1]; |
| 2551 | register int i; | 2556 | register size_t i; |
| 2552 | 2557 | ||
| 2553 | for (i = 0; i < nargs; i++) | 2558 | for (i = 0; i < nargs; i++) |
| 2554 | { | 2559 | { |
| 2555 | hook[0] = args[i]; | 2560 | hook[0] = args[i]; |
| 2556 | run_hook_with_args (1, hook, to_completion); | 2561 | run_hook_with_args (1, hook, funcall_nil); |
| 2557 | } | 2562 | } |
| 2558 | 2563 | ||
| 2559 | return Qnil; | 2564 | return Qnil; |
| @@ -2574,9 +2579,9 @@ as that may change. | |||
| 2574 | Do not use `make-local-variable' to make a hook variable buffer-local. | 2579 | Do not use `make-local-variable' to make a hook variable buffer-local. |
| 2575 | Instead, use `add-hook' and specify t for the LOCAL argument. | 2580 | Instead, use `add-hook' and specify t for the LOCAL argument. |
| 2576 | usage: (run-hook-with-args HOOK &rest ARGS) */) | 2581 | usage: (run-hook-with-args HOOK &rest ARGS) */) |
| 2577 | (int nargs, Lisp_Object *args) | 2582 | (size_t nargs, Lisp_Object *args) |
| 2578 | { | 2583 | { |
| 2579 | return run_hook_with_args (nargs, args, to_completion); | 2584 | return run_hook_with_args (nargs, args, funcall_nil); |
| 2580 | } | 2585 | } |
| 2581 | 2586 | ||
| 2582 | DEFUN ("run-hook-with-args-until-success", Frun_hook_with_args_until_success, | 2587 | DEFUN ("run-hook-with-args-until-success", Frun_hook_with_args_until_success, |
| @@ -2594,9 +2599,15 @@ However, if they all return nil, we return nil. | |||
| 2594 | Do not use `make-local-variable' to make a hook variable buffer-local. | 2599 | Do not use `make-local-variable' to make a hook variable buffer-local. |
| 2595 | Instead, use `add-hook' and specify t for the LOCAL argument. | 2600 | Instead, use `add-hook' and specify t for the LOCAL argument. |
| 2596 | usage: (run-hook-with-args-until-success HOOK &rest ARGS) */) | 2601 | usage: (run-hook-with-args-until-success HOOK &rest ARGS) */) |
| 2597 | (int nargs, Lisp_Object *args) | 2602 | (size_t nargs, Lisp_Object *args) |
| 2598 | { | 2603 | { |
| 2599 | return run_hook_with_args (nargs, args, until_success); | 2604 | return run_hook_with_args (nargs, args, Ffuncall); |
| 2605 | } | ||
| 2606 | |||
| 2607 | static Lisp_Object | ||
| 2608 | funcall_not (size_t nargs, Lisp_Object *args) | ||
| 2609 | { | ||
| 2610 | return NILP (Ffuncall (nargs, args)) ? Qt : Qnil; | ||
| 2600 | } | 2611 | } |
| 2601 | 2612 | ||
| 2602 | DEFUN ("run-hook-with-args-until-failure", Frun_hook_with_args_until_failure, | 2613 | DEFUN ("run-hook-with-args-until-failure", Frun_hook_with_args_until_failure, |
| @@ -2613,23 +2624,47 @@ Then we return nil. However, if they all return non-nil, we return non-nil. | |||
| 2613 | Do not use `make-local-variable' to make a hook variable buffer-local. | 2624 | Do not use `make-local-variable' to make a hook variable buffer-local. |
| 2614 | Instead, use `add-hook' and specify t for the LOCAL argument. | 2625 | Instead, use `add-hook' and specify t for the LOCAL argument. |
| 2615 | usage: (run-hook-with-args-until-failure HOOK &rest ARGS) */) | 2626 | usage: (run-hook-with-args-until-failure HOOK &rest ARGS) */) |
| 2616 | (int nargs, Lisp_Object *args) | 2627 | (size_t nargs, Lisp_Object *args) |
| 2617 | { | 2628 | { |
| 2618 | return run_hook_with_args (nargs, args, until_failure); | 2629 | return NILP (run_hook_with_args (nargs, args, funcall_not)) ? Qt : Qnil; |
| 2630 | } | ||
| 2631 | |||
| 2632 | static Lisp_Object | ||
| 2633 | run_hook_wrapped_funcall (size_t nargs, Lisp_Object *args) | ||
| 2634 | { | ||
| 2635 | Lisp_Object tmp = args[0], ret; | ||
| 2636 | args[0] = args[1]; | ||
| 2637 | args[1] = tmp; | ||
| 2638 | ret = Ffuncall (nargs, args); | ||
| 2639 | args[1] = args[0]; | ||
| 2640 | args[0] = tmp; | ||
| 2641 | return ret; | ||
| 2642 | } | ||
| 2643 | |||
| 2644 | DEFUN ("run-hook-wrapped", Frun_hook_wrapped, Srun_hook_wrapped, 2, MANY, 0, | ||
| 2645 | doc: /* Run HOOK, passing each function through WRAP-FUNCTION. | ||
| 2646 | I.e. instead of calling each function FUN directly with arguments ARGS, | ||
| 2647 | it calls WRAP-FUNCTION with arguments FUN and ARGS. | ||
| 2648 | As soon as a call to WRAP-FUNCTION returns non-nil, `run-hook-wrapped' | ||
| 2649 | aborts and returns that value. | ||
| 2650 | usage: (run-hook-wrapped HOOK WRAP-FUNCTION &rest ARGS) */) | ||
| 2651 | (size_t nargs, Lisp_Object *args) | ||
| 2652 | { | ||
| 2653 | return run_hook_with_args (nargs, args, run_hook_wrapped_funcall); | ||
| 2619 | } | 2654 | } |
| 2620 | 2655 | ||
| 2621 | /* ARGS[0] should be a hook symbol. | 2656 | /* ARGS[0] should be a hook symbol. |
| 2622 | Call each of the functions in the hook value, passing each of them | 2657 | Call each of the functions in the hook value, passing each of them |
| 2623 | as arguments all the rest of ARGS (all NARGS - 1 elements). | 2658 | as arguments all the rest of ARGS (all NARGS - 1 elements). |
| 2624 | COND specifies a condition to test after each call | 2659 | FUNCALL specifies how to call each function on the hook. |
| 2625 | to decide whether to stop. | ||
| 2626 | The caller (or its caller, etc) must gcpro all of ARGS, | 2660 | The caller (or its caller, etc) must gcpro all of ARGS, |
| 2627 | except that it isn't necessary to gcpro ARGS[0]. */ | 2661 | except that it isn't necessary to gcpro ARGS[0]. */ |
| 2628 | 2662 | ||
| 2629 | static Lisp_Object | 2663 | Lisp_Object |
| 2630 | run_hook_with_args (int nargs, Lisp_Object *args, enum run_hooks_condition cond) | 2664 | run_hook_with_args (size_t nargs, Lisp_Object *args, |
| 2665 | Lisp_Object (*funcall) (size_t nargs, Lisp_Object *args)) | ||
| 2631 | { | 2666 | { |
| 2632 | Lisp_Object sym, val, ret; | 2667 | Lisp_Object sym, val, ret = Qnil; |
| 2633 | struct gcpro gcpro1, gcpro2, gcpro3; | 2668 | struct gcpro gcpro1, gcpro2, gcpro3; |
| 2634 | 2669 | ||
| 2635 | /* If we are dying or still initializing, | 2670 | /* If we are dying or still initializing, |
| @@ -2639,14 +2674,13 @@ run_hook_with_args (int nargs, Lisp_Object *args, enum run_hooks_condition cond) | |||
| 2639 | 2674 | ||
| 2640 | sym = args[0]; | 2675 | sym = args[0]; |
| 2641 | val = find_symbol_value (sym); | 2676 | val = find_symbol_value (sym); |
| 2642 | ret = (cond == until_failure ? Qt : Qnil); | ||
| 2643 | 2677 | ||
| 2644 | if (EQ (val, Qunbound) || NILP (val)) | 2678 | if (EQ (val, Qunbound) || NILP (val)) |
| 2645 | return ret; | 2679 | return ret; |
| 2646 | else if (!CONSP (val) || EQ (XCAR (val), Qlambda)) | 2680 | else if (!CONSP (val) || EQ (XCAR (val), Qlambda)) |
| 2647 | { | 2681 | { |
| 2648 | args[0] = val; | 2682 | args[0] = val; |
| 2649 | return Ffuncall (nargs, args); | 2683 | return funcall (nargs, args); |
| 2650 | } | 2684 | } |
| 2651 | else | 2685 | else |
| 2652 | { | 2686 | { |
| @@ -2654,9 +2688,7 @@ run_hook_with_args (int nargs, Lisp_Object *args, enum run_hooks_condition cond) | |||
| 2654 | GCPRO3 (sym, val, global_vals); | 2688 | GCPRO3 (sym, val, global_vals); |
| 2655 | 2689 | ||
| 2656 | for (; | 2690 | for (; |
| 2657 | CONSP (val) && ((cond == to_completion) | 2691 | CONSP (val) && NILP (ret); |
| 2658 | || (cond == until_success ? NILP (ret) | ||
| 2659 | : !NILP (ret))); | ||
| 2660 | val = XCDR (val)) | 2692 | val = XCDR (val)) |
| 2661 | { | 2693 | { |
| 2662 | if (EQ (XCAR (val), Qt)) | 2694 | if (EQ (XCAR (val), Qt)) |
| @@ -2669,30 +2701,26 @@ run_hook_with_args (int nargs, Lisp_Object *args, enum run_hooks_condition cond) | |||
| 2669 | if (!CONSP (global_vals) || EQ (XCAR (global_vals), Qlambda)) | 2701 | if (!CONSP (global_vals) || EQ (XCAR (global_vals), Qlambda)) |
| 2670 | { | 2702 | { |
| 2671 | args[0] = global_vals; | 2703 | args[0] = global_vals; |
| 2672 | ret = Ffuncall (nargs, args); | 2704 | ret = funcall (nargs, args); |
| 2673 | } | 2705 | } |
| 2674 | else | 2706 | else |
| 2675 | { | 2707 | { |
| 2676 | for (; | 2708 | for (; |
| 2677 | (CONSP (global_vals) | 2709 | CONSP (global_vals) && NILP (ret); |
| 2678 | && (cond == to_completion | ||
| 2679 | || (cond == until_success | ||
| 2680 | ? NILP (ret) | ||
| 2681 | : !NILP (ret)))); | ||
| 2682 | global_vals = XCDR (global_vals)) | 2710 | global_vals = XCDR (global_vals)) |
| 2683 | { | 2711 | { |
| 2684 | args[0] = XCAR (global_vals); | 2712 | args[0] = XCAR (global_vals); |
| 2685 | /* In a global value, t should not occur. If it does, we | 2713 | /* In a global value, t should not occur. If it does, we |
| 2686 | must ignore it to avoid an endless loop. */ | 2714 | must ignore it to avoid an endless loop. */ |
| 2687 | if (!EQ (args[0], Qt)) | 2715 | if (!EQ (args[0], Qt)) |
| 2688 | ret = Ffuncall (nargs, args); | 2716 | ret = funcall (nargs, args); |
| 2689 | } | 2717 | } |
| 2690 | } | 2718 | } |
| 2691 | } | 2719 | } |
| 2692 | else | 2720 | else |
| 2693 | { | 2721 | { |
| 2694 | args[0] = XCAR (val); | 2722 | args[0] = XCAR (val); |
| 2695 | ret = Ffuncall (nargs, args); | 2723 | ret = funcall (nargs, args); |
| 2696 | } | 2724 | } |
| 2697 | } | 2725 | } |
| 2698 | 2726 | ||
| @@ -2714,7 +2742,7 @@ run_hook_with_args_2 (Lisp_Object hook, Lisp_Object arg1, Lisp_Object arg2) | |||
| 2714 | Frun_hook_with_args (3, temp); | 2742 | Frun_hook_with_args (3, temp); |
| 2715 | } | 2743 | } |
| 2716 | 2744 | ||
| 2717 | /* Apply fn to arg */ | 2745 | /* Apply fn to arg. */ |
| 2718 | Lisp_Object | 2746 | Lisp_Object |
| 2719 | apply1 (Lisp_Object fn, Lisp_Object arg) | 2747 | apply1 (Lisp_Object fn, Lisp_Object arg) |
| 2720 | { | 2748 | { |
| @@ -2733,7 +2761,7 @@ apply1 (Lisp_Object fn, Lisp_Object arg) | |||
| 2733 | } | 2761 | } |
| 2734 | } | 2762 | } |
| 2735 | 2763 | ||
| 2736 | /* Call function fn on no arguments */ | 2764 | /* Call function fn on no arguments. */ |
| 2737 | Lisp_Object | 2765 | Lisp_Object |
| 2738 | call0 (Lisp_Object fn) | 2766 | call0 (Lisp_Object fn) |
| 2739 | { | 2767 | { |
| @@ -2743,7 +2771,7 @@ call0 (Lisp_Object fn) | |||
| 2743 | RETURN_UNGCPRO (Ffuncall (1, &fn)); | 2771 | RETURN_UNGCPRO (Ffuncall (1, &fn)); |
| 2744 | } | 2772 | } |
| 2745 | 2773 | ||
| 2746 | /* Call function fn with 1 argument arg1 */ | 2774 | /* Call function fn with 1 argument arg1. */ |
| 2747 | /* ARGSUSED */ | 2775 | /* ARGSUSED */ |
| 2748 | Lisp_Object | 2776 | Lisp_Object |
| 2749 | call1 (Lisp_Object fn, Lisp_Object arg1) | 2777 | call1 (Lisp_Object fn, Lisp_Object arg1) |
| @@ -2758,7 +2786,7 @@ call1 (Lisp_Object fn, Lisp_Object arg1) | |||
| 2758 | RETURN_UNGCPRO (Ffuncall (2, args)); | 2786 | RETURN_UNGCPRO (Ffuncall (2, args)); |
| 2759 | } | 2787 | } |
| 2760 | 2788 | ||
| 2761 | /* Call function fn with 2 arguments arg1, arg2 */ | 2789 | /* Call function fn with 2 arguments arg1, arg2. */ |
| 2762 | /* ARGSUSED */ | 2790 | /* ARGSUSED */ |
| 2763 | Lisp_Object | 2791 | Lisp_Object |
| 2764 | call2 (Lisp_Object fn, Lisp_Object arg1, Lisp_Object arg2) | 2792 | call2 (Lisp_Object fn, Lisp_Object arg1, Lisp_Object arg2) |
| @@ -2773,7 +2801,7 @@ call2 (Lisp_Object fn, Lisp_Object arg1, Lisp_Object arg2) | |||
| 2773 | RETURN_UNGCPRO (Ffuncall (3, args)); | 2801 | RETURN_UNGCPRO (Ffuncall (3, args)); |
| 2774 | } | 2802 | } |
| 2775 | 2803 | ||
| 2776 | /* Call function fn with 3 arguments arg1, arg2, arg3 */ | 2804 | /* Call function fn with 3 arguments arg1, arg2, arg3. */ |
| 2777 | /* ARGSUSED */ | 2805 | /* ARGSUSED */ |
| 2778 | Lisp_Object | 2806 | Lisp_Object |
| 2779 | call3 (Lisp_Object fn, Lisp_Object arg1, Lisp_Object arg2, Lisp_Object arg3) | 2807 | call3 (Lisp_Object fn, Lisp_Object arg1, Lisp_Object arg2, Lisp_Object arg3) |
| @@ -2789,7 +2817,7 @@ call3 (Lisp_Object fn, Lisp_Object arg1, Lisp_Object arg2, Lisp_Object arg3) | |||
| 2789 | RETURN_UNGCPRO (Ffuncall (4, args)); | 2817 | RETURN_UNGCPRO (Ffuncall (4, args)); |
| 2790 | } | 2818 | } |
| 2791 | 2819 | ||
| 2792 | /* Call function fn with 4 arguments arg1, arg2, arg3, arg4 */ | 2820 | /* Call function fn with 4 arguments arg1, arg2, arg3, arg4. */ |
| 2793 | /* ARGSUSED */ | 2821 | /* ARGSUSED */ |
| 2794 | Lisp_Object | 2822 | Lisp_Object |
| 2795 | call4 (Lisp_Object fn, Lisp_Object arg1, Lisp_Object arg2, Lisp_Object arg3, | 2823 | call4 (Lisp_Object fn, Lisp_Object arg1, Lisp_Object arg2, Lisp_Object arg3, |
| @@ -2807,7 +2835,7 @@ call4 (Lisp_Object fn, Lisp_Object arg1, Lisp_Object arg2, Lisp_Object arg3, | |||
| 2807 | RETURN_UNGCPRO (Ffuncall (5, args)); | 2835 | RETURN_UNGCPRO (Ffuncall (5, args)); |
| 2808 | } | 2836 | } |
| 2809 | 2837 | ||
| 2810 | /* Call function fn with 5 arguments arg1, arg2, arg3, arg4, arg5 */ | 2838 | /* Call function fn with 5 arguments arg1, arg2, arg3, arg4, arg5. */ |
| 2811 | /* ARGSUSED */ | 2839 | /* ARGSUSED */ |
| 2812 | Lisp_Object | 2840 | Lisp_Object |
| 2813 | call5 (Lisp_Object fn, Lisp_Object arg1, Lisp_Object arg2, Lisp_Object arg3, | 2841 | call5 (Lisp_Object fn, Lisp_Object arg1, Lisp_Object arg2, Lisp_Object arg3, |
| @@ -2826,7 +2854,7 @@ call5 (Lisp_Object fn, Lisp_Object arg1, Lisp_Object arg2, Lisp_Object arg3, | |||
| 2826 | RETURN_UNGCPRO (Ffuncall (6, args)); | 2854 | RETURN_UNGCPRO (Ffuncall (6, args)); |
| 2827 | } | 2855 | } |
| 2828 | 2856 | ||
| 2829 | /* Call function fn with 6 arguments arg1, arg2, arg3, arg4, arg5, arg6 */ | 2857 | /* Call function fn with 6 arguments arg1, arg2, arg3, arg4, arg5, arg6. */ |
| 2830 | /* ARGSUSED */ | 2858 | /* ARGSUSED */ |
| 2831 | Lisp_Object | 2859 | Lisp_Object |
| 2832 | call6 (Lisp_Object fn, Lisp_Object arg1, Lisp_Object arg2, Lisp_Object arg3, | 2860 | call6 (Lisp_Object fn, Lisp_Object arg1, Lisp_Object arg2, Lisp_Object arg3, |
| @@ -2846,7 +2874,7 @@ call6 (Lisp_Object fn, Lisp_Object arg1, Lisp_Object arg2, Lisp_Object arg3, | |||
| 2846 | RETURN_UNGCPRO (Ffuncall (7, args)); | 2874 | RETURN_UNGCPRO (Ffuncall (7, args)); |
| 2847 | } | 2875 | } |
| 2848 | 2876 | ||
| 2849 | /* Call function fn with 7 arguments arg1, arg2, arg3, arg4, arg5, arg6, arg7 */ | 2877 | /* Call function fn with 7 arguments arg1, arg2, arg3, arg4, arg5, arg6, arg7. */ |
| 2850 | /* ARGSUSED */ | 2878 | /* ARGSUSED */ |
| 2851 | Lisp_Object | 2879 | Lisp_Object |
| 2852 | call7 (Lisp_Object fn, Lisp_Object arg1, Lisp_Object arg2, Lisp_Object arg3, | 2880 | call7 (Lisp_Object fn, Lisp_Object arg1, Lisp_Object arg2, Lisp_Object arg3, |
| @@ -2907,16 +2935,16 @@ DEFUN ("funcall", Ffuncall, Sfuncall, 1, MANY, 0, | |||
| 2907 | Return the value that function returns. | 2935 | Return the value that function returns. |
| 2908 | Thus, (funcall 'cons 'x 'y) returns (x . y). | 2936 | Thus, (funcall 'cons 'x 'y) returns (x . y). |
| 2909 | usage: (funcall FUNCTION &rest ARGUMENTS) */) | 2937 | usage: (funcall FUNCTION &rest ARGUMENTS) */) |
| 2910 | (int nargs, Lisp_Object *args) | 2938 | (size_t nargs, Lisp_Object *args) |
| 2911 | { | 2939 | { |
| 2912 | Lisp_Object fun, original_fun; | 2940 | Lisp_Object fun, original_fun; |
| 2913 | Lisp_Object funcar; | 2941 | Lisp_Object funcar; |
| 2914 | int numargs = nargs - 1; | 2942 | size_t numargs = nargs - 1; |
| 2915 | Lisp_Object lisp_numargs; | 2943 | Lisp_Object lisp_numargs; |
| 2916 | Lisp_Object val; | 2944 | Lisp_Object val; |
| 2917 | struct backtrace backtrace; | 2945 | struct backtrace backtrace; |
| 2918 | register Lisp_Object *internal_args; | 2946 | register Lisp_Object *internal_args; |
| 2919 | register int i; | 2947 | register size_t i; |
| 2920 | 2948 | ||
| 2921 | QUIT; | 2949 | QUIT; |
| 2922 | if ((consing_since_gc > gc_cons_threshold | 2950 | if ((consing_since_gc > gc_cons_threshold |
| @@ -3070,21 +3098,21 @@ static Lisp_Object | |||
| 3070 | apply_lambda (Lisp_Object fun, Lisp_Object args) | 3098 | apply_lambda (Lisp_Object fun, Lisp_Object args) |
| 3071 | { | 3099 | { |
| 3072 | Lisp_Object args_left; | 3100 | Lisp_Object args_left; |
| 3073 | Lisp_Object numargs; | 3101 | size_t numargs; |
| 3074 | register Lisp_Object *arg_vector; | 3102 | register Lisp_Object *arg_vector; |
| 3075 | struct gcpro gcpro1, gcpro2, gcpro3; | 3103 | struct gcpro gcpro1, gcpro2, gcpro3; |
| 3076 | register int i; | 3104 | register size_t i; |
| 3077 | register Lisp_Object tem; | 3105 | register Lisp_Object tem; |
| 3078 | USE_SAFE_ALLOCA; | 3106 | USE_SAFE_ALLOCA; |
| 3079 | 3107 | ||
| 3080 | numargs = Flength (args); | 3108 | numargs = XINT (Flength (args)); |
| 3081 | SAFE_ALLOCA_LISP (arg_vector, XINT (numargs)); | 3109 | SAFE_ALLOCA_LISP (arg_vector, numargs); |
| 3082 | args_left = args; | 3110 | args_left = args; |
| 3083 | 3111 | ||
| 3084 | GCPRO3 (*arg_vector, args_left, fun); | 3112 | GCPRO3 (*arg_vector, args_left, fun); |
| 3085 | gcpro1.nvars = 0; | 3113 | gcpro1.nvars = 0; |
| 3086 | 3114 | ||
| 3087 | for (i = 0; i < XINT (numargs);) | 3115 | for (i = 0; i < numargs; ) |
| 3088 | { | 3116 | { |
| 3089 | tem = Fcar (args_left), args_left = Fcdr (args_left); | 3117 | tem = Fcar (args_left), args_left = Fcdr (args_left); |
| 3090 | tem = eval_sub (tem); | 3118 | tem = eval_sub (tem); |
| @@ -3097,7 +3125,7 @@ apply_lambda (Lisp_Object fun, Lisp_Object args) | |||
| 3097 | backtrace_list->args = arg_vector; | 3125 | backtrace_list->args = arg_vector; |
| 3098 | backtrace_list->nargs = i; | 3126 | backtrace_list->nargs = i; |
| 3099 | backtrace_list->evalargs = 0; | 3127 | backtrace_list->evalargs = 0; |
| 3100 | tem = funcall_lambda (fun, XINT (numargs), arg_vector); | 3128 | tem = funcall_lambda (fun, numargs, arg_vector); |
| 3101 | 3129 | ||
| 3102 | /* Do the debug-on-exit now, while arg_vector still exists. */ | 3130 | /* Do the debug-on-exit now, while arg_vector still exists. */ |
| 3103 | if (backtrace_list->debug_on_exit) | 3131 | if (backtrace_list->debug_on_exit) |
| @@ -3113,12 +3141,13 @@ apply_lambda (Lisp_Object fun, Lisp_Object args) | |||
| 3113 | FUN must be either a lambda-expression or a compiled-code object. */ | 3141 | FUN must be either a lambda-expression or a compiled-code object. */ |
| 3114 | 3142 | ||
| 3115 | static Lisp_Object | 3143 | static Lisp_Object |
| 3116 | funcall_lambda (Lisp_Object fun, int nargs, | 3144 | funcall_lambda (Lisp_Object fun, size_t nargs, |
| 3117 | register Lisp_Object *arg_vector) | 3145 | register Lisp_Object *arg_vector) |
| 3118 | { | 3146 | { |
| 3119 | Lisp_Object val, syms_left, next, lexenv; | 3147 | Lisp_Object val, syms_left, next, lexenv; |
| 3120 | int count = SPECPDL_INDEX (); | 3148 | int count = SPECPDL_INDEX (); |
| 3121 | int i, optional, rest; | 3149 | size_t i; |
| 3150 | int optional, rest; | ||
| 3122 | 3151 | ||
| 3123 | if (CONSP (fun)) | 3152 | if (CONSP (fun)) |
| 3124 | { | 3153 | { |
| @@ -3270,7 +3299,7 @@ grow_specpdl (void) | |||
| 3270 | specpdl_ptr = specpdl + count; | 3299 | specpdl_ptr = specpdl + count; |
| 3271 | } | 3300 | } |
| 3272 | 3301 | ||
| 3273 | /* specpdl_ptr->symbol is a field which describes which variable is | 3302 | /* `specpdl_ptr->symbol' is a field which describes which variable is |
| 3274 | let-bound, so it can be properly undone when we unbind_to. | 3303 | let-bound, so it can be properly undone when we unbind_to. |
| 3275 | It can have the following two shapes: | 3304 | It can have the following two shapes: |
| 3276 | - SYMBOL : if it's a plain symbol, it means that we have let-bound | 3305 | - SYMBOL : if it's a plain symbol, it means that we have let-bound |
| @@ -3500,7 +3529,6 @@ Output stream used is value of `standard-output'. */) | |||
| 3500 | (void) | 3529 | (void) |
| 3501 | { | 3530 | { |
| 3502 | register struct backtrace *backlist = backtrace_list; | 3531 | register struct backtrace *backlist = backtrace_list; |
| 3503 | register int i; | ||
| 3504 | Lisp_Object tail; | 3532 | Lisp_Object tail; |
| 3505 | Lisp_Object tem; | 3533 | Lisp_Object tem; |
| 3506 | struct gcpro gcpro1; | 3534 | struct gcpro gcpro1; |
| @@ -3523,13 +3551,14 @@ Output stream used is value of `standard-output'. */) | |||
| 3523 | else | 3551 | else |
| 3524 | { | 3552 | { |
| 3525 | tem = *backlist->function; | 3553 | tem = *backlist->function; |
| 3526 | Fprin1 (tem, Qnil); /* This can QUIT */ | 3554 | Fprin1 (tem, Qnil); /* This can QUIT. */ |
| 3527 | write_string ("(", -1); | 3555 | write_string ("(", -1); |
| 3528 | if (backlist->nargs == MANY) | 3556 | if (backlist->nargs == MANY) |
| 3529 | { | 3557 | { /* FIXME: Can this happen? */ |
| 3558 | int i; | ||
| 3530 | for (tail = *backlist->args, i = 0; | 3559 | for (tail = *backlist->args, i = 0; |
| 3531 | !NILP (tail); | 3560 | !NILP (tail); |
| 3532 | tail = Fcdr (tail), i++) | 3561 | tail = Fcdr (tail), i = 1) |
| 3533 | { | 3562 | { |
| 3534 | if (i) write_string (" ", -1); | 3563 | if (i) write_string (" ", -1); |
| 3535 | Fprin1 (Fcar (tail), Qnil); | 3564 | Fprin1 (Fcar (tail), Qnil); |
| @@ -3537,6 +3566,7 @@ Output stream used is value of `standard-output'. */) | |||
| 3537 | } | 3566 | } |
| 3538 | else | 3567 | else |
| 3539 | { | 3568 | { |
| 3569 | size_t i; | ||
| 3540 | for (i = 0; i < backlist->nargs; i++) | 3570 | for (i = 0; i < backlist->nargs; i++) |
| 3541 | { | 3571 | { |
| 3542 | if (i) write_string (" ", -1); | 3572 | if (i) write_string (" ", -1); |
| @@ -3566,7 +3596,7 @@ If NFRAMES is more than the number of frames, the value is nil. */) | |||
| 3566 | (Lisp_Object nframes) | 3596 | (Lisp_Object nframes) |
| 3567 | { | 3597 | { |
| 3568 | register struct backtrace *backlist = backtrace_list; | 3598 | register struct backtrace *backlist = backtrace_list; |
| 3569 | register int i; | 3599 | register EMACS_INT i; |
| 3570 | Lisp_Object tem; | 3600 | Lisp_Object tem; |
| 3571 | 3601 | ||
| 3572 | CHECK_NATNUM (nframes); | 3602 | CHECK_NATNUM (nframes); |
| @@ -3581,7 +3611,7 @@ If NFRAMES is more than the number of frames, the value is nil. */) | |||
| 3581 | return Fcons (Qnil, Fcons (*backlist->function, *backlist->args)); | 3611 | return Fcons (Qnil, Fcons (*backlist->function, *backlist->args)); |
| 3582 | else | 3612 | else |
| 3583 | { | 3613 | { |
| 3584 | if (backlist->nargs == MANY) | 3614 | if (backlist->nargs == MANY) /* FIXME: Can this happen? */ |
| 3585 | tem = *backlist->args; | 3615 | tem = *backlist->args; |
| 3586 | else | 3616 | else |
| 3587 | tem = Flist (backlist->nargs, backlist->args); | 3617 | tem = Flist (backlist->nargs, backlist->args); |
| @@ -3595,17 +3625,18 @@ void | |||
| 3595 | mark_backtrace (void) | 3625 | mark_backtrace (void) |
| 3596 | { | 3626 | { |
| 3597 | register struct backtrace *backlist; | 3627 | register struct backtrace *backlist; |
| 3598 | register int i; | 3628 | register size_t i; |
| 3599 | 3629 | ||
| 3600 | for (backlist = backtrace_list; backlist; backlist = backlist->next) | 3630 | for (backlist = backtrace_list; backlist; backlist = backlist->next) |
| 3601 | { | 3631 | { |
| 3602 | mark_object (*backlist->function); | 3632 | mark_object (*backlist->function); |
| 3603 | 3633 | ||
| 3604 | if (backlist->nargs == UNEVALLED || backlist->nargs == MANY) | 3634 | if (backlist->nargs == UNEVALLED |
| 3605 | i = 0; | 3635 | || backlist->nargs == MANY) /* FIXME: Can this happen? */ |
| 3636 | i = 1; | ||
| 3606 | else | 3637 | else |
| 3607 | i = backlist->nargs - 1; | 3638 | i = backlist->nargs; |
| 3608 | for (; i >= 0; i--) | 3639 | while (i--) |
| 3609 | mark_object (backlist->args[i]); | 3640 | mark_object (backlist->args[i]); |
| 3610 | } | 3641 | } |
| 3611 | } | 3642 | } |
| @@ -3820,6 +3851,7 @@ alist of active lexical bindings. */); | |||
| 3820 | defsubr (&Srun_hook_with_args); | 3851 | defsubr (&Srun_hook_with_args); |
| 3821 | defsubr (&Srun_hook_with_args_until_success); | 3852 | defsubr (&Srun_hook_with_args_until_success); |
| 3822 | defsubr (&Srun_hook_with_args_until_failure); | 3853 | defsubr (&Srun_hook_with_args_until_failure); |
| 3854 | defsubr (&Srun_hook_wrapped); | ||
| 3823 | defsubr (&Sfetch_bytecode); | 3855 | defsubr (&Sfetch_bytecode); |
| 3824 | defsubr (&Sbacktrace_debug); | 3856 | defsubr (&Sbacktrace_debug); |
| 3825 | defsubr (&Sbacktrace); | 3857 | defsubr (&Sbacktrace); |
diff --git a/src/fileio.c b/src/fileio.c index 5d33fb93878..85431dfd5b1 100644 --- a/src/fileio.c +++ b/src/fileio.c | |||
| @@ -1951,9 +1951,10 @@ on the system, we copy the SELinux context of FILE to NEWNAME. */) | |||
| 1951 | owner and group. */ | 1951 | owner and group. */ |
| 1952 | if (input_file_statable_p) | 1952 | if (input_file_statable_p) |
| 1953 | { | 1953 | { |
| 1954 | if (! NILP (preserve_uid_gid)) | 1954 | if (!NILP (preserve_uid_gid) && fchown (ofd, st.st_uid, st.st_gid) != 0) |
| 1955 | fchown (ofd, st.st_uid, st.st_gid); | 1955 | report_file_error ("Doing chown", Fcons (newname, Qnil)); |
| 1956 | fchmod (ofd, st.st_mode & 07777); | 1956 | if (fchmod (ofd, st.st_mode & 07777) != 0) |
| 1957 | report_file_error ("Doing chmod", Fcons (newname, Qnil)); | ||
| 1957 | } | 1958 | } |
| 1958 | #endif /* not MSDOS */ | 1959 | #endif /* not MSDOS */ |
| 1959 | 1960 | ||
| @@ -2358,8 +2359,6 @@ static int | |||
| 2358 | check_executable (char *filename) | 2359 | check_executable (char *filename) |
| 2359 | { | 2360 | { |
| 2360 | #ifdef DOS_NT | 2361 | #ifdef DOS_NT |
| 2361 | int len = strlen (filename); | ||
| 2362 | char *suffix; | ||
| 2363 | struct stat st; | 2362 | struct stat st; |
| 2364 | if (stat (filename, &st) < 0) | 2363 | if (stat (filename, &st) < 0) |
| 2365 | return 0; | 2364 | return 0; |
| @@ -2785,13 +2784,14 @@ as a list ("user", "role", "type", "range"). Has no effect if SELinux | |||
| 2785 | is disabled. */) | 2784 | is disabled. */) |
| 2786 | (Lisp_Object filename, Lisp_Object context) | 2785 | (Lisp_Object filename, Lisp_Object context) |
| 2787 | { | 2786 | { |
| 2788 | Lisp_Object absname, encoded_absname; | 2787 | Lisp_Object absname; |
| 2789 | Lisp_Object handler; | 2788 | Lisp_Object handler; |
| 2789 | #if HAVE_LIBSELINUX | ||
| 2790 | Lisp_Object encoded_absname; | ||
| 2790 | Lisp_Object user = CAR_SAFE (context); | 2791 | Lisp_Object user = CAR_SAFE (context); |
| 2791 | Lisp_Object role = CAR_SAFE (CDR_SAFE (context)); | 2792 | Lisp_Object role = CAR_SAFE (CDR_SAFE (context)); |
| 2792 | Lisp_Object type = CAR_SAFE (CDR_SAFE (CDR_SAFE (context))); | 2793 | Lisp_Object type = CAR_SAFE (CDR_SAFE (CDR_SAFE (context))); |
| 2793 | Lisp_Object range = CAR_SAFE (CDR_SAFE (CDR_SAFE (CDR_SAFE (context)))); | 2794 | Lisp_Object range = CAR_SAFE (CDR_SAFE (CDR_SAFE (CDR_SAFE (context)))); |
| 2794 | #if HAVE_LIBSELINUX | ||
| 2795 | security_context_t con; | 2795 | security_context_t con; |
| 2796 | int fail, conlength; | 2796 | int fail, conlength; |
| 2797 | context_t parsed_con; | 2797 | context_t parsed_con; |
| @@ -2805,12 +2805,11 @@ is disabled. */) | |||
| 2805 | if (!NILP (handler)) | 2805 | if (!NILP (handler)) |
| 2806 | return call3 (handler, Qset_file_selinux_context, absname, context); | 2806 | return call3 (handler, Qset_file_selinux_context, absname, context); |
| 2807 | 2807 | ||
| 2808 | encoded_absname = ENCODE_FILE (absname); | ||
| 2809 | |||
| 2810 | #if HAVE_LIBSELINUX | 2808 | #if HAVE_LIBSELINUX |
| 2811 | if (is_selinux_enabled ()) | 2809 | if (is_selinux_enabled ()) |
| 2812 | { | 2810 | { |
| 2813 | /* Get current file context. */ | 2811 | /* Get current file context. */ |
| 2812 | encoded_absname = ENCODE_FILE (absname); | ||
| 2814 | conlength = lgetfilecon (SSDATA (encoded_absname), &con); | 2813 | conlength = lgetfilecon (SSDATA (encoded_absname), &con); |
| 2815 | if (conlength > 0) | 2814 | if (conlength > 0) |
| 2816 | { | 2815 | { |
| @@ -5179,7 +5178,7 @@ A non-nil CURRENT-ONLY argument means save only current buffer. */) | |||
| 5179 | (Lisp_Object no_message, Lisp_Object current_only) | 5178 | (Lisp_Object no_message, Lisp_Object current_only) |
| 5180 | { | 5179 | { |
| 5181 | struct buffer *old = current_buffer, *b; | 5180 | struct buffer *old = current_buffer, *b; |
| 5182 | Lisp_Object tail, buf; | 5181 | Lisp_Object tail, buf, hook; |
| 5183 | int auto_saved = 0; | 5182 | int auto_saved = 0; |
| 5184 | int do_handled_files; | 5183 | int do_handled_files; |
| 5185 | Lisp_Object oquit; | 5184 | Lisp_Object oquit; |
| @@ -5209,8 +5208,8 @@ A non-nil CURRENT-ONLY argument means save only current buffer. */) | |||
| 5209 | /* No GCPRO needed, because (when it matters) all Lisp_Object variables | 5208 | /* No GCPRO needed, because (when it matters) all Lisp_Object variables |
| 5210 | point to non-strings reached from Vbuffer_alist. */ | 5209 | point to non-strings reached from Vbuffer_alist. */ |
| 5211 | 5210 | ||
| 5212 | if (!NILP (Vrun_hooks)) | 5211 | hook = intern ("auto-save-hook"); |
| 5213 | call1 (Vrun_hooks, intern ("auto-save-hook")); | 5212 | Frun_hooks (1, &hook); |
| 5214 | 5213 | ||
| 5215 | if (STRINGP (Vauto_save_list_file_name)) | 5214 | if (STRINGP (Vauto_save_list_file_name)) |
| 5216 | { | 5215 | { |
diff --git a/src/floatfns.c b/src/floatfns.c index bc03509b757..1232fc0afa1 100644 --- a/src/floatfns.c +++ b/src/floatfns.c | |||
| @@ -103,7 +103,7 @@ extern double logb (double); | |||
| 103 | #endif | 103 | #endif |
| 104 | 104 | ||
| 105 | #ifdef FLOAT_CATCH_SIGILL | 105 | #ifdef FLOAT_CATCH_SIGILL |
| 106 | static SIGTYPE float_error (); | 106 | static void float_error (); |
| 107 | #endif | 107 | #endif |
| 108 | 108 | ||
| 109 | /* Nonzero while executing in floating point. | 109 | /* Nonzero while executing in floating point. |
| @@ -126,7 +126,7 @@ static const char *float_error_fn_name; | |||
| 126 | Handle errors which may result in signals or may set errno. | 126 | Handle errors which may result in signals or may set errno. |
| 127 | 127 | ||
| 128 | Note that float_error may be declared to return void, so you can't | 128 | Note that float_error may be declared to return void, so you can't |
| 129 | just cast the zero after the colon to (SIGTYPE) to make the types | 129 | just cast the zero after the colon to (void) to make the types |
| 130 | check properly. */ | 130 | check properly. */ |
| 131 | 131 | ||
| 132 | #ifdef FLOAT_CHECK_ERRNO | 132 | #ifdef FLOAT_CHECK_ERRNO |
| @@ -960,7 +960,7 @@ Rounds the value toward zero. */) | |||
| 960 | } | 960 | } |
| 961 | 961 | ||
| 962 | #ifdef FLOAT_CATCH_SIGILL | 962 | #ifdef FLOAT_CATCH_SIGILL |
| 963 | static SIGTYPE | 963 | static void |
| 964 | float_error (signo) | 964 | float_error (signo) |
| 965 | int signo; | 965 | int signo; |
| 966 | { | 966 | { |
| @@ -348,7 +348,7 @@ Symbols are also allowed; their print names are used instead. */) | |||
| 348 | return i1 < SCHARS (s2) ? Qt : Qnil; | 348 | return i1 < SCHARS (s2) ? Qt : Qnil; |
| 349 | } | 349 | } |
| 350 | 350 | ||
| 351 | static Lisp_Object concat (int nargs, Lisp_Object *args, | 351 | static Lisp_Object concat (size_t nargs, Lisp_Object *args, |
| 352 | enum Lisp_Type target_type, int last_special); | 352 | enum Lisp_Type target_type, int last_special); |
| 353 | 353 | ||
| 354 | /* ARGSUSED */ | 354 | /* ARGSUSED */ |
| @@ -378,7 +378,7 @@ The result is a list whose elements are the elements of all the arguments. | |||
| 378 | Each argument may be a list, vector or string. | 378 | Each argument may be a list, vector or string. |
| 379 | The last argument is not copied, just used as the tail of the new list. | 379 | The last argument is not copied, just used as the tail of the new list. |
| 380 | usage: (append &rest SEQUENCES) */) | 380 | usage: (append &rest SEQUENCES) */) |
| 381 | (int nargs, Lisp_Object *args) | 381 | (size_t nargs, Lisp_Object *args) |
| 382 | { | 382 | { |
| 383 | return concat (nargs, args, Lisp_Cons, 1); | 383 | return concat (nargs, args, Lisp_Cons, 1); |
| 384 | } | 384 | } |
| @@ -388,7 +388,7 @@ DEFUN ("concat", Fconcat, Sconcat, 0, MANY, 0, | |||
| 388 | The result is a string whose elements are the elements of all the arguments. | 388 | The result is a string whose elements are the elements of all the arguments. |
| 389 | Each argument may be a string or a list or vector of characters (integers). | 389 | Each argument may be a string or a list or vector of characters (integers). |
| 390 | usage: (concat &rest SEQUENCES) */) | 390 | usage: (concat &rest SEQUENCES) */) |
| 391 | (int nargs, Lisp_Object *args) | 391 | (size_t nargs, Lisp_Object *args) |
| 392 | { | 392 | { |
| 393 | return concat (nargs, args, Lisp_String, 0); | 393 | return concat (nargs, args, Lisp_String, 0); |
| 394 | } | 394 | } |
| @@ -398,7 +398,7 @@ DEFUN ("vconcat", Fvconcat, Svconcat, 0, MANY, 0, | |||
| 398 | The result is a vector whose elements are the elements of all the arguments. | 398 | The result is a vector whose elements are the elements of all the arguments. |
| 399 | Each argument may be a list, vector or string. | 399 | Each argument may be a list, vector or string. |
| 400 | usage: (vconcat &rest SEQUENCES) */) | 400 | usage: (vconcat &rest SEQUENCES) */) |
| 401 | (int nargs, Lisp_Object *args) | 401 | (size_t nargs, Lisp_Object *args) |
| 402 | { | 402 | { |
| 403 | return concat (nargs, args, Lisp_Vectorlike, 0); | 403 | return concat (nargs, args, Lisp_Vectorlike, 0); |
| 404 | } | 404 | } |
| @@ -446,7 +446,8 @@ struct textprop_rec | |||
| 446 | }; | 446 | }; |
| 447 | 447 | ||
| 448 | static Lisp_Object | 448 | static Lisp_Object |
| 449 | concat (int nargs, Lisp_Object *args, enum Lisp_Type target_type, int last_special) | 449 | concat (size_t nargs, Lisp_Object *args, |
| 450 | enum Lisp_Type target_type, int last_special) | ||
| 450 | { | 451 | { |
| 451 | Lisp_Object val; | 452 | Lisp_Object val; |
| 452 | register Lisp_Object tail; | 453 | register Lisp_Object tail; |
| @@ -455,7 +456,7 @@ concat (int nargs, Lisp_Object *args, enum Lisp_Type target_type, int last_speci | |||
| 455 | EMACS_INT toindex_byte = 0; | 456 | EMACS_INT toindex_byte = 0; |
| 456 | register EMACS_INT result_len; | 457 | register EMACS_INT result_len; |
| 457 | register EMACS_INT result_len_byte; | 458 | register EMACS_INT result_len_byte; |
| 458 | register int argnum; | 459 | register size_t argnum; |
| 459 | Lisp_Object last_tail; | 460 | Lisp_Object last_tail; |
| 460 | Lisp_Object prev; | 461 | Lisp_Object prev; |
| 461 | int some_multibyte; | 462 | int some_multibyte; |
| @@ -2232,9 +2233,9 @@ DEFUN ("nconc", Fnconc, Snconc, 0, MANY, 0, | |||
| 2232 | doc: /* Concatenate any number of lists by altering them. | 2233 | doc: /* Concatenate any number of lists by altering them. |
| 2233 | Only the last argument is not altered, and need not be a list. | 2234 | Only the last argument is not altered, and need not be a list. |
| 2234 | usage: (nconc &rest LISTS) */) | 2235 | usage: (nconc &rest LISTS) */) |
| 2235 | (int nargs, Lisp_Object *args) | 2236 | (size_t nargs, Lisp_Object *args) |
| 2236 | { | 2237 | { |
| 2237 | register int argnum; | 2238 | register size_t argnum; |
| 2238 | register Lisp_Object tail, tem, val; | 2239 | register Lisp_Object tail, tem, val; |
| 2239 | 2240 | ||
| 2240 | val = tail = Qnil; | 2241 | val = tail = Qnil; |
| @@ -2763,7 +2764,7 @@ DEFUN ("widget-apply", Fwidget_apply, Swidget_apply, 2, MANY, 0, | |||
| 2763 | doc: /* Apply the value of WIDGET's PROPERTY to the widget itself. | 2764 | doc: /* Apply the value of WIDGET's PROPERTY to the widget itself. |
| 2764 | ARGS are passed as extra arguments to the function. | 2765 | ARGS are passed as extra arguments to the function. |
| 2765 | usage: (widget-apply WIDGET PROPERTY &rest ARGS) */) | 2766 | usage: (widget-apply WIDGET PROPERTY &rest ARGS) */) |
| 2766 | (int nargs, Lisp_Object *args) | 2767 | (size_t nargs, Lisp_Object *args) |
| 2767 | { | 2768 | { |
| 2768 | /* This function can GC. */ | 2769 | /* This function can GC. */ |
| 2769 | Lisp_Object newargs[3]; | 2770 | Lisp_Object newargs[3]; |
| @@ -3367,7 +3368,7 @@ Lisp_Object Qhash_table_test, Qkey_or_value, Qkey_and_value; | |||
| 3367 | /* Function prototypes. */ | 3368 | /* Function prototypes. */ |
| 3368 | 3369 | ||
| 3369 | static struct Lisp_Hash_Table *check_hash_table (Lisp_Object); | 3370 | static struct Lisp_Hash_Table *check_hash_table (Lisp_Object); |
| 3370 | static int get_key_arg (Lisp_Object, int, Lisp_Object *, char *); | 3371 | static size_t get_key_arg (Lisp_Object, size_t, Lisp_Object *, char *); |
| 3371 | static void maybe_resize_hash_table (struct Lisp_Hash_Table *); | 3372 | static void maybe_resize_hash_table (struct Lisp_Hash_Table *); |
| 3372 | static int cmpfn_eql (struct Lisp_Hash_Table *, Lisp_Object, unsigned, | 3373 | static int cmpfn_eql (struct Lisp_Hash_Table *, Lisp_Object, unsigned, |
| 3373 | Lisp_Object, unsigned); | 3374 | Lisp_Object, unsigned); |
| @@ -3422,27 +3423,23 @@ next_almost_prime (int n) | |||
| 3422 | /* Find KEY in ARGS which has size NARGS. Don't consider indices for | 3423 | /* Find KEY in ARGS which has size NARGS. Don't consider indices for |
| 3423 | which USED[I] is non-zero. If found at index I in ARGS, set | 3424 | which USED[I] is non-zero. If found at index I in ARGS, set |
| 3424 | USED[I] and USED[I + 1] to 1, and return I + 1. Otherwise return | 3425 | USED[I] and USED[I + 1] to 1, and return I + 1. Otherwise return |
| 3425 | -1. This function is used to extract a keyword/argument pair from | 3426 | 0. This function is used to extract a keyword/argument pair from |
| 3426 | a DEFUN parameter list. */ | 3427 | a DEFUN parameter list. */ |
| 3427 | 3428 | ||
| 3428 | static int | 3429 | static size_t |
| 3429 | get_key_arg (Lisp_Object key, int nargs, Lisp_Object *args, char *used) | 3430 | get_key_arg (Lisp_Object key, size_t nargs, Lisp_Object *args, char *used) |
| 3430 | { | 3431 | { |
| 3431 | int i; | 3432 | size_t i; |
| 3432 | |||
| 3433 | for (i = 0; i < nargs - 1; ++i) | ||
| 3434 | if (!used[i] && EQ (args[i], key)) | ||
| 3435 | break; | ||
| 3436 | 3433 | ||
| 3437 | if (i >= nargs - 1) | 3434 | for (i = 1; i < nargs; i++) |
| 3438 | i = -1; | 3435 | if (!used[i - 1] && EQ (args[i - 1], key)) |
| 3439 | else | 3436 | { |
| 3440 | { | 3437 | used[i - 1] = 1; |
| 3441 | used[i++] = 1; | 3438 | used[i] = 1; |
| 3442 | used[i] = 1; | 3439 | return i; |
| 3443 | } | 3440 | } |
| 3444 | 3441 | ||
| 3445 | return i; | 3442 | return 0; |
| 3446 | } | 3443 | } |
| 3447 | 3444 | ||
| 3448 | 3445 | ||
| @@ -4290,12 +4287,12 @@ WEAK. WEAK t is equivalent to `key-and-value'. Default value of WEAK | |||
| 4290 | is nil. | 4287 | is nil. |
| 4291 | 4288 | ||
| 4292 | usage: (make-hash-table &rest KEYWORD-ARGS) */) | 4289 | usage: (make-hash-table &rest KEYWORD-ARGS) */) |
| 4293 | (int nargs, Lisp_Object *args) | 4290 | (size_t nargs, Lisp_Object *args) |
| 4294 | { | 4291 | { |
| 4295 | Lisp_Object test, size, rehash_size, rehash_threshold, weak; | 4292 | Lisp_Object test, size, rehash_size, rehash_threshold, weak; |
| 4296 | Lisp_Object user_test, user_hash; | 4293 | Lisp_Object user_test, user_hash; |
| 4297 | char *used; | 4294 | char *used; |
| 4298 | int i; | 4295 | size_t i; |
| 4299 | 4296 | ||
| 4300 | /* The vector `used' is used to keep track of arguments that | 4297 | /* The vector `used' is used to keep track of arguments that |
| 4301 | have been consumed. */ | 4298 | have been consumed. */ |
| @@ -4304,7 +4301,7 @@ usage: (make-hash-table &rest KEYWORD-ARGS) */) | |||
| 4304 | 4301 | ||
| 4305 | /* See if there's a `:test TEST' among the arguments. */ | 4302 | /* See if there's a `:test TEST' among the arguments. */ |
| 4306 | i = get_key_arg (QCtest, nargs, args, used); | 4303 | i = get_key_arg (QCtest, nargs, args, used); |
| 4307 | test = i < 0 ? Qeql : args[i]; | 4304 | test = i ? args[i] : Qeql; |
| 4308 | if (!EQ (test, Qeq) && !EQ (test, Qeql) && !EQ (test, Qequal)) | 4305 | if (!EQ (test, Qeq) && !EQ (test, Qeql) && !EQ (test, Qequal)) |
| 4309 | { | 4306 | { |
| 4310 | /* See if it is a user-defined test. */ | 4307 | /* See if it is a user-defined test. */ |
| @@ -4321,7 +4318,7 @@ usage: (make-hash-table &rest KEYWORD-ARGS) */) | |||
| 4321 | 4318 | ||
| 4322 | /* See if there's a `:size SIZE' argument. */ | 4319 | /* See if there's a `:size SIZE' argument. */ |
| 4323 | i = get_key_arg (QCsize, nargs, args, used); | 4320 | i = get_key_arg (QCsize, nargs, args, used); |
| 4324 | size = i < 0 ? Qnil : args[i]; | 4321 | size = i ? args[i] : Qnil; |
| 4325 | if (NILP (size)) | 4322 | if (NILP (size)) |
| 4326 | size = make_number (DEFAULT_HASH_SIZE); | 4323 | size = make_number (DEFAULT_HASH_SIZE); |
| 4327 | else if (!INTEGERP (size) || XINT (size) < 0) | 4324 | else if (!INTEGERP (size) || XINT (size) < 0) |
| @@ -4329,7 +4326,7 @@ usage: (make-hash-table &rest KEYWORD-ARGS) */) | |||
| 4329 | 4326 | ||
| 4330 | /* Look for `:rehash-size SIZE'. */ | 4327 | /* Look for `:rehash-size SIZE'. */ |
| 4331 | i = get_key_arg (QCrehash_size, nargs, args, used); | 4328 | i = get_key_arg (QCrehash_size, nargs, args, used); |
| 4332 | rehash_size = i < 0 ? make_float (DEFAULT_REHASH_SIZE) : args[i]; | 4329 | rehash_size = i ? args[i] : make_float (DEFAULT_REHASH_SIZE); |
| 4333 | if (!NUMBERP (rehash_size) | 4330 | if (!NUMBERP (rehash_size) |
| 4334 | || (INTEGERP (rehash_size) && XINT (rehash_size) <= 0) | 4331 | || (INTEGERP (rehash_size) && XINT (rehash_size) <= 0) |
| 4335 | || XFLOATINT (rehash_size) <= 1.0) | 4332 | || XFLOATINT (rehash_size) <= 1.0) |
| @@ -4337,7 +4334,7 @@ usage: (make-hash-table &rest KEYWORD-ARGS) */) | |||
| 4337 | 4334 | ||
| 4338 | /* Look for `:rehash-threshold THRESHOLD'. */ | 4335 | /* Look for `:rehash-threshold THRESHOLD'. */ |
| 4339 | i = get_key_arg (QCrehash_threshold, nargs, args, used); | 4336 | i = get_key_arg (QCrehash_threshold, nargs, args, used); |
| 4340 | rehash_threshold = i < 0 ? make_float (DEFAULT_REHASH_THRESHOLD) : args[i]; | 4337 | rehash_threshold = i ? args[i] : make_float (DEFAULT_REHASH_THRESHOLD); |
| 4341 | if (!FLOATP (rehash_threshold) | 4338 | if (!FLOATP (rehash_threshold) |
| 4342 | || XFLOATINT (rehash_threshold) <= 0.0 | 4339 | || XFLOATINT (rehash_threshold) <= 0.0 |
| 4343 | || XFLOATINT (rehash_threshold) > 1.0) | 4340 | || XFLOATINT (rehash_threshold) > 1.0) |
| @@ -4345,7 +4342,7 @@ usage: (make-hash-table &rest KEYWORD-ARGS) */) | |||
| 4345 | 4342 | ||
| 4346 | /* Look for `:weakness WEAK'. */ | 4343 | /* Look for `:weakness WEAK'. */ |
| 4347 | i = get_key_arg (QCweakness, nargs, args, used); | 4344 | i = get_key_arg (QCweakness, nargs, args, used); |
| 4348 | weak = i < 0 ? Qnil : args[i]; | 4345 | weak = i ? args[i] : Qnil; |
| 4349 | if (EQ (weak, Qt)) | 4346 | if (EQ (weak, Qt)) |
| 4350 | weak = Qkey_and_value; | 4347 | weak = Qkey_and_value; |
| 4351 | if (!NILP (weak) | 4348 | if (!NILP (weak) |
diff --git a/src/font.c b/src/font.c index 9e8b7029c22..6b2e2f2712d 100644 --- a/src/font.c +++ b/src/font.c | |||
| @@ -3831,10 +3831,10 @@ be an OpenType font, and whose GPOS table of `thai' script's default | |||
| 3831 | language system must contain `mark' feature. | 3831 | language system must contain `mark' feature. |
| 3832 | 3832 | ||
| 3833 | usage: (font-spec ARGS...) */) | 3833 | usage: (font-spec ARGS...) */) |
| 3834 | (int nargs, Lisp_Object *args) | 3834 | (size_t nargs, Lisp_Object *args) |
| 3835 | { | 3835 | { |
| 3836 | Lisp_Object spec = font_make_spec (); | 3836 | Lisp_Object spec = font_make_spec (); |
| 3837 | int i; | 3837 | size_t i; |
| 3838 | 3838 | ||
| 3839 | for (i = 0; i < nargs; i += 2) | 3839 | for (i = 0; i < nargs; i += 2) |
| 3840 | { | 3840 | { |
diff --git a/src/frame.c b/src/frame.c index 05938f3e1f0..1b6d36092ae 100644 --- a/src/frame.c +++ b/src/frame.c | |||
| @@ -890,7 +890,7 @@ to that frame. */) | |||
| 890 | { | 890 | { |
| 891 | /* Preserve prefix arg that the command loop just cleared. */ | 891 | /* Preserve prefix arg that the command loop just cleared. */ |
| 892 | KVAR (current_kboard, Vprefix_arg) = Vcurrent_prefix_arg; | 892 | KVAR (current_kboard, Vprefix_arg) = Vcurrent_prefix_arg; |
| 893 | call1 (Vrun_hooks, Qmouse_leave_buffer_hook); | 893 | Frun_hooks (1, &Qmouse_leave_buffer_hook); |
| 894 | return do_switch_frame (event, 0, 0, Qnil); | 894 | return do_switch_frame (event, 0, 0, Qnil); |
| 895 | } | 895 | } |
| 896 | 896 | ||
| @@ -2529,7 +2529,7 @@ use is not recommended. Explicitly check for a frame-parameter instead. */) | |||
| 2529 | } | 2529 | } |
| 2530 | 2530 | ||
| 2531 | /* Now process them in reverse of specified order. */ | 2531 | /* Now process them in reverse of specified order. */ |
| 2532 | for (i--; i >= 0; i--) | 2532 | while (--i >= 0) |
| 2533 | { | 2533 | { |
| 2534 | prop = parms[i]; | 2534 | prop = parms[i]; |
| 2535 | val = values[i]; | 2535 | val = values[i]; |
| @@ -2902,7 +2902,7 @@ x_set_frame_parameters (FRAME_PTR f, Lisp_Object alist) | |||
| 2902 | /* Record in these vectors all the parms specified. */ | 2902 | /* Record in these vectors all the parms specified. */ |
| 2903 | Lisp_Object *parms; | 2903 | Lisp_Object *parms; |
| 2904 | Lisp_Object *values; | 2904 | Lisp_Object *values; |
| 2905 | int i, p; | 2905 | size_t i, p; |
| 2906 | int left_no_change = 0, top_no_change = 0; | 2906 | int left_no_change = 0, top_no_change = 0; |
| 2907 | int icon_left_no_change = 0, icon_top_no_change = 0; | 2907 | int icon_left_no_change = 0, icon_top_no_change = 0; |
| 2908 | int size_changed = 0; | 2908 | int size_changed = 0; |
| @@ -2975,7 +2975,7 @@ x_set_frame_parameters (FRAME_PTR f, Lisp_Object alist) | |||
| 2975 | } | 2975 | } |
| 2976 | 2976 | ||
| 2977 | /* Now process them in reverse of specified order. */ | 2977 | /* Now process them in reverse of specified order. */ |
| 2978 | for (i--; i >= 0; i--) | 2978 | while (i-- != 0) |
| 2979 | { | 2979 | { |
| 2980 | Lisp_Object prop, val; | 2980 | Lisp_Object prop, val; |
| 2981 | 2981 | ||
| @@ -3713,8 +3713,7 @@ validate_x_resource_name (void) | |||
| 3713 | return; | 3713 | return; |
| 3714 | 3714 | ||
| 3715 | /* If name is entirely invalid, or nearly so, use `emacs'. */ | 3715 | /* If name is entirely invalid, or nearly so, use `emacs'. */ |
| 3716 | if (good_count == 0 | 3716 | if (good_count < 2) |
| 3717 | || (good_count == 1 && bad_count > 0)) | ||
| 3718 | { | 3717 | { |
| 3719 | Vx_resource_name = build_string ("emacs"); | 3718 | Vx_resource_name = build_string ("emacs"); |
| 3720 | return; | 3719 | return; |
diff --git a/src/ftfont.c b/src/ftfont.c index db6b29421dc..ad01149106e 100644 --- a/src/ftfont.c +++ b/src/ftfont.c | |||
| @@ -168,11 +168,11 @@ get_adstyle_property (FcPattern *p) | |||
| 168 | for (end = str; *end && *end != ' '; end++); | 168 | for (end = str; *end && *end != ' '; end++); |
| 169 | if (*end) | 169 | if (*end) |
| 170 | { | 170 | { |
| 171 | char *p = alloca (end - str + 1); | 171 | char *newstr = alloca (end - str + 1); |
| 172 | memcpy (p, str, end - str); | 172 | memcpy (newstr, str, end - str); |
| 173 | p[end - str] = '\0'; | 173 | newstr[end - str] = '\0'; |
| 174 | end = p + (end - str); | 174 | end = newstr + (end - str); |
| 175 | str = p; | 175 | str = newstr; |
| 176 | } | 176 | } |
| 177 | if (xstrcasecmp (str, "Regular") == 0 | 177 | if (xstrcasecmp (str, "Regular") == 0 |
| 178 | || xstrcasecmp (str, "Bold") == 0 | 178 | || xstrcasecmp (str, "Bold") == 0 |
| @@ -190,18 +190,18 @@ ftfont_pattern_entity (FcPattern *p, Lisp_Object extra) | |||
| 190 | { | 190 | { |
| 191 | Lisp_Object key, cache, entity; | 191 | Lisp_Object key, cache, entity; |
| 192 | char *file, *str; | 192 | char *file, *str; |
| 193 | int index; | 193 | int idx; |
| 194 | int numeric; | 194 | int numeric; |
| 195 | double dbl; | 195 | double dbl; |
| 196 | FcBool b; | 196 | FcBool b; |
| 197 | 197 | ||
| 198 | if (FcPatternGetString (p, FC_FILE, 0, (FcChar8 **) &file) != FcResultMatch) | 198 | if (FcPatternGetString (p, FC_FILE, 0, (FcChar8 **) &file) != FcResultMatch) |
| 199 | return Qnil; | 199 | return Qnil; |
| 200 | if (FcPatternGetInteger (p, FC_INDEX, 0, &index) != FcResultMatch) | 200 | if (FcPatternGetInteger (p, FC_INDEX, 0, &idx) != FcResultMatch) |
| 201 | return Qnil; | 201 | return Qnil; |
| 202 | 202 | ||
| 203 | key = Fcons (make_unibyte_string ((char *) file, strlen ((char *) file)), | 203 | key = Fcons (make_unibyte_string ((char *) file, strlen ((char *) file)), |
| 204 | make_number (index)); | 204 | make_number (idx)); |
| 205 | cache = ftfont_lookup_cache (key, FTFONT_CACHE_FOR_ENTITY); | 205 | cache = ftfont_lookup_cache (key, FTFONT_CACHE_FOR_ENTITY); |
| 206 | entity = XCAR (cache); | 206 | entity = XCAR (cache); |
| 207 | if (! NILP (entity)) | 207 | if (! NILP (entity)) |
| @@ -265,7 +265,7 @@ ftfont_pattern_entity (FcPattern *p, Lisp_Object extra) | |||
| 265 | 265 | ||
| 266 | ASET (entity, FONT_ADSTYLE_INDEX, get_adstyle_property (p)); | 266 | ASET (entity, FONT_ADSTYLE_INDEX, get_adstyle_property (p)); |
| 267 | if ((ft_library || FT_Init_FreeType (&ft_library) == 0) | 267 | if ((ft_library || FT_Init_FreeType (&ft_library) == 0) |
| 268 | && FT_New_Face (ft_library, file, index, &ft_face) == 0) | 268 | && FT_New_Face (ft_library, file, idx, &ft_face) == 0) |
| 269 | { | 269 | { |
| 270 | BDF_PropertyRec rec; | 270 | BDF_PropertyRec rec; |
| 271 | 271 | ||
| @@ -311,8 +311,9 @@ ftfont_resolve_generic_family (Lisp_Object family, FcPattern *pattern) | |||
| 311 | if (FcPatternGetLangSet (pattern, FC_LANG, 0, &langset) != FcResultMatch) | 311 | if (FcPatternGetLangSet (pattern, FC_LANG, 0, &langset) != FcResultMatch) |
| 312 | { | 312 | { |
| 313 | /* This is to avoid the effect of locale. */ | 313 | /* This is to avoid the effect of locale. */ |
| 314 | static const FcChar8 lang[] = "en"; | ||
| 314 | langset = FcLangSetCreate (); | 315 | langset = FcLangSetCreate (); |
| 315 | FcLangSetAdd (langset, "en"); | 316 | FcLangSetAdd (langset, lang); |
| 316 | FcPatternAddLangSet (pattern, FC_LANG, langset); | 317 | FcPatternAddLangSet (pattern, FC_LANG, langset); |
| 317 | FcLangSetDestroy (langset); | 318 | FcLangSetDestroy (langset); |
| 318 | } | 319 | } |
| @@ -393,14 +394,14 @@ ftfont_lookup_cache (Lisp_Object key, enum ftfont_cache_for cache_for) | |||
| 393 | ? ! cache_data->ft_face : ! cache_data->fc_charset) | 394 | ? ! cache_data->ft_face : ! cache_data->fc_charset) |
| 394 | { | 395 | { |
| 395 | char *filename = SSDATA (XCAR (key)); | 396 | char *filename = SSDATA (XCAR (key)); |
| 396 | int index = XINT (XCDR (key)); | 397 | int idx = XINT (XCDR (key)); |
| 397 | 398 | ||
| 398 | if (cache_for == FTFONT_CACHE_FOR_FACE) | 399 | if (cache_for == FTFONT_CACHE_FOR_FACE) |
| 399 | { | 400 | { |
| 400 | if (! ft_library | 401 | if (! ft_library |
| 401 | && FT_Init_FreeType (&ft_library) != 0) | 402 | && FT_Init_FreeType (&ft_library) != 0) |
| 402 | return Qnil; | 403 | return Qnil; |
| 403 | if (FT_New_Face (ft_library, filename, index, &cache_data->ft_face) | 404 | if (FT_New_Face (ft_library, filename, idx, &cache_data->ft_face) |
| 404 | != 0) | 405 | != 0) |
| 405 | return Qnil; | 406 | return Qnil; |
| 406 | } | 407 | } |
| @@ -412,7 +413,7 @@ ftfont_lookup_cache (Lisp_Object key, enum ftfont_cache_for cache_for) | |||
| 412 | FcCharSet *charset = NULL; | 413 | FcCharSet *charset = NULL; |
| 413 | 414 | ||
| 414 | pat = FcPatternBuild (0, FC_FILE, FcTypeString, (FcChar8 *) filename, | 415 | pat = FcPatternBuild (0, FC_FILE, FcTypeString, (FcChar8 *) filename, |
| 415 | FC_INDEX, FcTypeInteger, index, NULL); | 416 | FC_INDEX, FcTypeInteger, idx, NULL); |
| 416 | if (! pat) | 417 | if (! pat) |
| 417 | goto finish; | 418 | goto finish; |
| 418 | objset = FcObjectSetBuild (FC_CHARSET, FC_STYLE, NULL); | 419 | objset = FcObjectSetBuild (FC_CHARSET, FC_STYLE, NULL); |
| @@ -490,8 +491,12 @@ static int ftfont_get_bitmap (struct font *, unsigned, | |||
| 490 | struct font_bitmap *, int); | 491 | struct font_bitmap *, int); |
| 491 | static int ftfont_anchor_point (struct font *, unsigned, int, | 492 | static int ftfont_anchor_point (struct font *, unsigned, int, |
| 492 | int *, int *); | 493 | int *, int *); |
| 494 | #ifdef HAVE_LIBOTF | ||
| 493 | static Lisp_Object ftfont_otf_capability (struct font *); | 495 | static Lisp_Object ftfont_otf_capability (struct font *); |
| 496 | # ifdef HAVE_M17N_FLT | ||
| 494 | static Lisp_Object ftfont_shape (Lisp_Object); | 497 | static Lisp_Object ftfont_shape (Lisp_Object); |
| 498 | # endif | ||
| 499 | #endif | ||
| 495 | 500 | ||
| 496 | #ifdef HAVE_OTF_GET_VARIATION_GLYPHS | 501 | #ifdef HAVE_OTF_GET_VARIATION_GLYPHS |
| 497 | static int ftfont_variation_glyphs (struct font *, int c, | 502 | static int ftfont_variation_glyphs (struct font *, int c, |
| @@ -618,6 +623,7 @@ struct OpenTypeSpec | |||
| 618 | (P)[4] = '\0'; \ | 623 | (P)[4] = '\0'; \ |
| 619 | } while (0) | 624 | } while (0) |
| 620 | 625 | ||
| 626 | #ifdef HAVE_LIBOTF | ||
| 621 | #define OTF_TAG_SYM(SYM, TAG) \ | 627 | #define OTF_TAG_SYM(SYM, TAG) \ |
| 622 | do { \ | 628 | do { \ |
| 623 | char str[5]; \ | 629 | char str[5]; \ |
| @@ -625,6 +631,7 @@ struct OpenTypeSpec | |||
| 625 | OTF_TAG_STR (TAG, str); \ | 631 | OTF_TAG_STR (TAG, str); \ |
| 626 | (SYM) = font_intern_prop (str, 4, 1); \ | 632 | (SYM) = font_intern_prop (str, 4, 1); \ |
| 627 | } while (0) | 633 | } while (0) |
| 634 | #endif | ||
| 628 | 635 | ||
| 629 | 636 | ||
| 630 | static struct OpenTypeSpec * | 637 | static struct OpenTypeSpec * |
| @@ -864,7 +871,6 @@ ftfont_list (Lisp_Object frame, Lisp_Object spec) | |||
| 864 | FcObjectSet *objset = NULL; | 871 | FcObjectSet *objset = NULL; |
| 865 | FcCharSet *charset; | 872 | FcCharSet *charset; |
| 866 | Lisp_Object chars = Qnil; | 873 | Lisp_Object chars = Qnil; |
| 867 | FcResult result; | ||
| 868 | char otlayout[15]; /* For "otlayout:XXXX" */ | 874 | char otlayout[15]; /* For "otlayout:XXXX" */ |
| 869 | struct OpenTypeSpec *otspec = NULL; | 875 | struct OpenTypeSpec *otspec = NULL; |
| 870 | int spacing = -1; | 876 | int spacing = -1; |
| @@ -1153,7 +1159,7 @@ ftfont_open (FRAME_PTR f, Lisp_Object entity, int pixel_size) | |||
| 1153 | FT_Face ft_face; | 1159 | FT_Face ft_face; |
| 1154 | FT_Size ft_size; | 1160 | FT_Size ft_size; |
| 1155 | FT_UInt size; | 1161 | FT_UInt size; |
| 1156 | Lisp_Object val, filename, index, cache, font_object; | 1162 | Lisp_Object val, filename, idx, cache, font_object; |
| 1157 | int scalable; | 1163 | int scalable; |
| 1158 | int spacing; | 1164 | int spacing; |
| 1159 | char name[256]; | 1165 | char name[256]; |
| @@ -1168,7 +1174,7 @@ ftfont_open (FRAME_PTR f, Lisp_Object entity, int pixel_size) | |||
| 1168 | if (NILP (cache)) | 1174 | if (NILP (cache)) |
| 1169 | return Qnil; | 1175 | return Qnil; |
| 1170 | filename = XCAR (val); | 1176 | filename = XCAR (val); |
| 1171 | index = XCDR (val); | 1177 | idx = XCDR (val); |
| 1172 | val = XCDR (cache); | 1178 | val = XCDR (cache); |
| 1173 | cache_data = XSAVE_VALUE (XCDR (cache))->pointer; | 1179 | cache_data = XSAVE_VALUE (XCDR (cache))->pointer; |
| 1174 | ft_face = cache_data->ft_face; | 1180 | ft_face = cache_data->ft_face; |
| @@ -1210,7 +1216,7 @@ ftfont_open (FRAME_PTR f, Lisp_Object entity, int pixel_size) | |||
| 1210 | font = XFONT_OBJECT (font_object); | 1216 | font = XFONT_OBJECT (font_object); |
| 1211 | ftfont_info = (struct ftfont_info *) font; | 1217 | ftfont_info = (struct ftfont_info *) font; |
| 1212 | ftfont_info->ft_size = ft_face->size; | 1218 | ftfont_info->ft_size = ft_face->size; |
| 1213 | ftfont_info->index = XINT (index); | 1219 | ftfont_info->index = XINT (idx); |
| 1214 | #ifdef HAVE_LIBOTF | 1220 | #ifdef HAVE_LIBOTF |
| 1215 | ftfont_info->maybe_otf = ft_face->face_flags & FT_FACE_FLAG_SFNT; | 1221 | ftfont_info->maybe_otf = ft_face->face_flags & FT_FACE_FLAG_SFNT; |
| 1216 | ftfont_info->otf = NULL; | 1222 | ftfont_info->otf = NULL; |
| @@ -1455,7 +1461,8 @@ ftfont_get_bitmap (struct font *font, unsigned int code, struct font_bitmap *bit | |||
| 1455 | } | 1461 | } |
| 1456 | 1462 | ||
| 1457 | static int | 1463 | static int |
| 1458 | ftfont_anchor_point (struct font *font, unsigned int code, int index, int *x, int *y) | 1464 | ftfont_anchor_point (struct font *font, unsigned int code, int idx, |
| 1465 | int *x, int *y) | ||
| 1459 | { | 1466 | { |
| 1460 | struct ftfont_info *ftfont_info = (struct ftfont_info *) font; | 1467 | struct ftfont_info *ftfont_info = (struct ftfont_info *) font; |
| 1461 | FT_Face ft_face = ftfont_info->ft_size->face; | 1468 | FT_Face ft_face = ftfont_info->ft_size->face; |
| @@ -1466,10 +1473,10 @@ ftfont_anchor_point (struct font *font, unsigned int code, int index, int *x, in | |||
| 1466 | return -1; | 1473 | return -1; |
| 1467 | if (ft_face->glyph->format != FT_GLYPH_FORMAT_OUTLINE) | 1474 | if (ft_face->glyph->format != FT_GLYPH_FORMAT_OUTLINE) |
| 1468 | return -1; | 1475 | return -1; |
| 1469 | if (index >= ft_face->glyph->outline.n_points) | 1476 | if (idx >= ft_face->glyph->outline.n_points) |
| 1470 | return -1; | 1477 | return -1; |
| 1471 | *x = ft_face->glyph->outline.points[index].x; | 1478 | *x = ft_face->glyph->outline.points[idx].x; |
| 1472 | *y = ft_face->glyph->outline.points[index].y; | 1479 | *y = ft_face->glyph->outline.points[idx].y; |
| 1473 | return 0; | 1480 | return 0; |
| 1474 | } | 1481 | } |
| 1475 | 1482 | ||
diff --git a/src/gtkutil.c b/src/gtkutil.c index 754f61e366d..4e5ecce76c7 100644 --- a/src/gtkutil.c +++ b/src/gtkutil.c | |||
| @@ -1555,7 +1555,7 @@ static gboolean | |||
| 1555 | xg_maybe_add_timer (gpointer data) | 1555 | xg_maybe_add_timer (gpointer data) |
| 1556 | { | 1556 | { |
| 1557 | struct xg_dialog_data *dd = (struct xg_dialog_data *) data; | 1557 | struct xg_dialog_data *dd = (struct xg_dialog_data *) data; |
| 1558 | EMACS_TIME next_time = timer_check (1); | 1558 | EMACS_TIME next_time = timer_check (); |
| 1559 | long secs = EMACS_SECS (next_time); | 1559 | long secs = EMACS_SECS (next_time); |
| 1560 | long usecs = EMACS_USECS (next_time); | 1560 | long usecs = EMACS_USECS (next_time); |
| 1561 | 1561 | ||
diff --git a/src/image.c b/src/image.c index 91308c540b5..b37ba398d83 100644 --- a/src/image.c +++ b/src/image.c | |||
| @@ -4483,7 +4483,6 @@ static void | |||
| 4483 | XPutPixel (XImagePtr ximg, int x, int y, COLORREF color) | 4483 | XPutPixel (XImagePtr ximg, int x, int y, COLORREF color) |
| 4484 | { | 4484 | { |
| 4485 | int width = ximg->info.bmiHeader.biWidth; | 4485 | int width = ximg->info.bmiHeader.biWidth; |
| 4486 | int height = ximg->info.bmiHeader.biHeight; | ||
| 4487 | unsigned char * pixel; | 4486 | unsigned char * pixel; |
| 4488 | 4487 | ||
| 4489 | /* True color images. */ | 4488 | /* True color images. */ |
| @@ -6752,7 +6751,7 @@ tiff_load (struct frame *f, struct image *img) | |||
| 6752 | TIFF *tiff; | 6751 | TIFF *tiff; |
| 6753 | int width, height, x, y, count; | 6752 | int width, height, x, y, count; |
| 6754 | uint32 *buf; | 6753 | uint32 *buf; |
| 6755 | int rc, rc2; | 6754 | int rc; |
| 6756 | XImagePtr ximg; | 6755 | XImagePtr ximg; |
| 6757 | tiff_memory_source memsrc; | 6756 | tiff_memory_source memsrc; |
| 6758 | Lisp_Object image; | 6757 | Lisp_Object image; |
| @@ -6840,8 +6839,8 @@ tiff_load (struct frame *f, struct image *img) | |||
| 6840 | rc = fn_TIFFReadRGBAImage (tiff, width, height, buf, 0); | 6839 | rc = fn_TIFFReadRGBAImage (tiff, width, height, buf, 0); |
| 6841 | 6840 | ||
| 6842 | /* Count the number of images in the file. */ | 6841 | /* Count the number of images in the file. */ |
| 6843 | for (count = 1, rc2 = 1; rc2; count++) | 6842 | for (count = 1; fn_TIFFSetDirectory (tiff, count); count++) |
| 6844 | rc2 = fn_TIFFSetDirectory (tiff, count); | 6843 | continue; |
| 6845 | 6844 | ||
| 6846 | if (count > 1) | 6845 | if (count > 1) |
| 6847 | img->data.lisp_val = Fcons (Qcount, | 6846 | img->data.lisp_val = Fcons (Qcount, |
diff --git a/src/insdel.c b/src/insdel.c index ad3460f9a64..4bdcb4bc0b7 100644 --- a/src/insdel.c +++ b/src/insdel.c | |||
| @@ -41,8 +41,6 @@ static void insert_from_buffer_1 (struct buffer *buf, | |||
| 41 | int inherit); | 41 | int inherit); |
| 42 | static void gap_left (EMACS_INT charpos, EMACS_INT bytepos, int newgap); | 42 | static void gap_left (EMACS_INT charpos, EMACS_INT bytepos, int newgap); |
| 43 | static void gap_right (EMACS_INT charpos, EMACS_INT bytepos); | 43 | static void gap_right (EMACS_INT charpos, EMACS_INT bytepos); |
| 44 | static void adjust_markers_gap_motion (EMACS_INT from, EMACS_INT to, | ||
| 45 | EMACS_INT amount); | ||
| 46 | static void adjust_markers_for_insert (EMACS_INT from, EMACS_INT from_byte, | 44 | static void adjust_markers_for_insert (EMACS_INT from, EMACS_INT from_byte, |
| 47 | EMACS_INT to, EMACS_INT to_byte, | 45 | EMACS_INT to, EMACS_INT to_byte, |
| 48 | int before_markers); | 46 | int before_markers); |
| @@ -162,10 +160,9 @@ gap_left (EMACS_INT charpos, EMACS_INT bytepos, int newgap) | |||
| 162 | memmove (to, from, i); | 160 | memmove (to, from, i); |
| 163 | } | 161 | } |
| 164 | 162 | ||
| 165 | /* Adjust markers, and buffer data structure, to put the gap at BYTEPOS. | 163 | /* Adjust buffer data structure, to put the gap at BYTEPOS. |
| 166 | BYTEPOS is where the loop above stopped, which may be what was specified | 164 | BYTEPOS is where the loop above stopped, which may be what |
| 167 | or may be where a quit was detected. */ | 165 | was specified or may be where a quit was detected. */ |
| 168 | adjust_markers_gap_motion (bytepos, GPT_BYTE, GAP_SIZE); | ||
| 169 | GPT_BYTE = bytepos; | 166 | GPT_BYTE = bytepos; |
| 170 | GPT = charpos; | 167 | GPT = charpos; |
| 171 | if (bytepos < charpos) | 168 | if (bytepos < charpos) |
| @@ -217,8 +214,6 @@ gap_right (EMACS_INT charpos, EMACS_INT bytepos) | |||
| 217 | from += i, to += i; | 214 | from += i, to += i; |
| 218 | } | 215 | } |
| 219 | 216 | ||
| 220 | adjust_markers_gap_motion (GPT_BYTE + GAP_SIZE, bytepos + GAP_SIZE, | ||
| 221 | - GAP_SIZE); | ||
| 222 | GPT = charpos; | 217 | GPT = charpos; |
| 223 | GPT_BYTE = bytepos; | 218 | GPT_BYTE = bytepos; |
| 224 | if (bytepos < charpos) | 219 | if (bytepos < charpos) |
| @@ -227,67 +222,6 @@ gap_right (EMACS_INT charpos, EMACS_INT bytepos) | |||
| 227 | QUIT; | 222 | QUIT; |
| 228 | } | 223 | } |
| 229 | 224 | ||
| 230 | /* Add AMOUNT to the byte position of every marker in the current buffer | ||
| 231 | whose current byte position is between FROM (exclusive) and TO (inclusive). | ||
| 232 | |||
| 233 | Also, any markers past the outside of that interval, in the direction | ||
| 234 | of adjustment, are first moved back to the near end of the interval | ||
| 235 | and then adjusted by AMOUNT. | ||
| 236 | |||
| 237 | When the latter adjustment is done, if AMOUNT is negative, | ||
| 238 | we record the adjustment for undo. (This case happens only for | ||
| 239 | deletion.) | ||
| 240 | |||
| 241 | The markers' character positions are not altered, | ||
| 242 | because gap motion does not affect character positions. */ | ||
| 243 | |||
| 244 | int adjust_markers_test; | ||
| 245 | |||
| 246 | static void | ||
| 247 | adjust_markers_gap_motion (EMACS_INT from, EMACS_INT to, EMACS_INT amount) | ||
| 248 | { | ||
| 249 | /* Now that a marker has a bytepos, not counting the gap, | ||
| 250 | nothing needs to be done here. */ | ||
| 251 | #if 0 | ||
| 252 | Lisp_Object marker; | ||
| 253 | register struct Lisp_Marker *m; | ||
| 254 | register EMACS_INT mpos; | ||
| 255 | |||
| 256 | marker = BUF_MARKERS (current_buffer); | ||
| 257 | |||
| 258 | while (!NILP (marker)) | ||
| 259 | { | ||
| 260 | m = XMARKER (marker); | ||
| 261 | mpos = m->bytepos; | ||
| 262 | if (amount > 0) | ||
| 263 | { | ||
| 264 | if (mpos > to && mpos < to + amount) | ||
| 265 | { | ||
| 266 | if (adjust_markers_test) | ||
| 267 | abort (); | ||
| 268 | mpos = to + amount; | ||
| 269 | } | ||
| 270 | } | ||
| 271 | else | ||
| 272 | { | ||
| 273 | /* Here's the case where a marker is inside text being deleted. | ||
| 274 | AMOUNT can be negative for gap motion, too, | ||
| 275 | but then this range contains no markers. */ | ||
| 276 | if (mpos > from + amount && mpos <= from) | ||
| 277 | { | ||
| 278 | if (adjust_markers_test) | ||
| 279 | abort (); | ||
| 280 | mpos = from + amount; | ||
| 281 | } | ||
| 282 | } | ||
| 283 | if (mpos > from && mpos <= to) | ||
| 284 | mpos += amount; | ||
| 285 | m->bufpos = mpos; | ||
| 286 | marker = m->chain; | ||
| 287 | } | ||
| 288 | #endif | ||
| 289 | } | ||
| 290 | |||
| 291 | /* Adjust all markers for a deletion | 225 | /* Adjust all markers for a deletion |
| 292 | whose range in bytes is FROM_BYTE to TO_BYTE. | 226 | whose range in bytes is FROM_BYTE to TO_BYTE. |
| 293 | The range in charpos is FROM to TO. | 227 | The range in charpos is FROM to TO. |
| @@ -2137,14 +2071,14 @@ signal_before_change (EMACS_INT start_int, EMACS_INT end_int, | |||
| 2137 | 2071 | ||
| 2138 | specbind (Qinhibit_modification_hooks, Qt); | 2072 | specbind (Qinhibit_modification_hooks, Qt); |
| 2139 | 2073 | ||
| 2140 | /* If buffer is unmodified, run a special hook for that case. */ | 2074 | /* If buffer is unmodified, run a special hook for that case. The |
| 2075 | check for Vfirst_change_hook is just a minor optimization. */ | ||
| 2141 | if (SAVE_MODIFF >= MODIFF | 2076 | if (SAVE_MODIFF >= MODIFF |
| 2142 | && !NILP (Vfirst_change_hook) | 2077 | && !NILP (Vfirst_change_hook)) |
| 2143 | && !NILP (Vrun_hooks)) | ||
| 2144 | { | 2078 | { |
| 2145 | PRESERVE_VALUE; | 2079 | PRESERVE_VALUE; |
| 2146 | PRESERVE_START_END; | 2080 | PRESERVE_START_END; |
| 2147 | call1 (Vrun_hooks, Qfirst_change_hook); | 2081 | Frun_hooks (1, &Qfirst_change_hook); |
| 2148 | } | 2082 | } |
| 2149 | 2083 | ||
| 2150 | /* Now run the before-change-functions if any. */ | 2084 | /* Now run the before-change-functions if any. */ |
diff --git a/src/intervals.c b/src/intervals.c index 12b2789cc77..351677ad27e 100644 --- a/src/intervals.c +++ b/src/intervals.c | |||
| @@ -586,7 +586,7 @@ split_interval_left (INTERVAL interval, EMACS_INT offset) | |||
| 586 | Don't use this function on an interval which is the child | 586 | Don't use this function on an interval which is the child |
| 587 | of another interval! */ | 587 | of another interval! */ |
| 588 | 588 | ||
| 589 | int | 589 | static int |
| 590 | interval_start_pos (INTERVAL source) | 590 | interval_start_pos (INTERVAL source) |
| 591 | { | 591 | { |
| 592 | Lisp_Object parent; | 592 | Lisp_Object parent; |
| @@ -2559,4 +2559,3 @@ set_intervals_multibyte (int multi_flag) | |||
| 2559 | set_intervals_multibyte_1 (BUF_INTERVALS (current_buffer), multi_flag, | 2559 | set_intervals_multibyte_1 (BUF_INTERVALS (current_buffer), multi_flag, |
| 2560 | BEG, BEG_BYTE, Z, Z_BYTE); | 2560 | BEG, BEG_BYTE, Z, Z_BYTE); |
| 2561 | } | 2561 | } |
| 2562 | |||
diff --git a/src/intervals.h b/src/intervals.h index f6c1c002ce0..d7c34012e1f 100644 --- a/src/intervals.h +++ b/src/intervals.h | |||
| @@ -161,8 +161,13 @@ struct interval | |||
| 161 | (INTERVAL_HAS_PARENT (i) ? INTERVAL_PARENT (i) : 0) | 161 | (INTERVAL_HAS_PARENT (i) ? INTERVAL_PARENT (i) : 0) |
| 162 | 162 | ||
| 163 | /* Abort if interval I's size is negative. */ | 163 | /* Abort if interval I's size is negative. */ |
| 164 | #define CHECK_TOTAL_LENGTH(i) \ | 164 | #define CHECK_TOTAL_LENGTH(i) \ |
| 165 | if ((int) (i)->total_length < 0) abort (); else | 165 | do \ |
| 166 | { \ | ||
| 167 | if ((int) (i)->total_length < 0) \ | ||
| 168 | abort (); \ | ||
| 169 | } \ | ||
| 170 | while (0) | ||
| 166 | 171 | ||
| 167 | /* Reset this interval to its vanilla, or no-property state. */ | 172 | /* Reset this interval to its vanilla, or no-property state. */ |
| 168 | #define RESET_INTERVAL(i) \ | 173 | #define RESET_INTERVAL(i) \ |
| @@ -339,4 +344,3 @@ extern Lisp_Object get_pos_property (Lisp_Object pos, Lisp_Object prop, | |||
| 339 | extern void syms_of_textprop (void); | 344 | extern void syms_of_textprop (void); |
| 340 | 345 | ||
| 341 | #include "composite.h" | 346 | #include "composite.h" |
| 342 | |||
diff --git a/src/keyboard.c b/src/keyboard.c index 63e7573fbe9..d307250b868 100644 --- a/src/keyboard.c +++ b/src/keyboard.c | |||
| @@ -201,8 +201,8 @@ Lisp_Object unread_switch_frame; | |||
| 201 | /* Last size recorded for a current buffer which is not a minibuffer. */ | 201 | /* Last size recorded for a current buffer which is not a minibuffer. */ |
| 202 | static EMACS_INT last_non_minibuf_size; | 202 | static EMACS_INT last_non_minibuf_size; |
| 203 | 203 | ||
| 204 | /* Total number of times read_char has returned. */ | 204 | /* Total number of times read_char has returned, modulo SIZE_MAX + 1. */ |
| 205 | int num_input_events; | 205 | size_t num_input_events; |
| 206 | 206 | ||
| 207 | /* Value of num_nonmacro_input_events as of last auto save. */ | 207 | /* Value of num_nonmacro_input_events as of last auto save. */ |
| 208 | 208 | ||
| @@ -254,7 +254,6 @@ Lisp_Object Qecho_area_clear_hook; | |||
| 254 | /* Hooks to run before and after each command. */ | 254 | /* Hooks to run before and after each command. */ |
| 255 | Lisp_Object Qpre_command_hook; | 255 | Lisp_Object Qpre_command_hook; |
| 256 | Lisp_Object Qpost_command_hook; | 256 | Lisp_Object Qpost_command_hook; |
| 257 | Lisp_Object Qcommand_hook_internal; | ||
| 258 | 257 | ||
| 259 | Lisp_Object Qdeferred_action_function; | 258 | Lisp_Object Qdeferred_action_function; |
| 260 | 259 | ||
| @@ -351,7 +350,7 @@ Lisp_Object Qmenu_bar; | |||
| 351 | Lisp_Object recursive_edit_unwind (Lisp_Object buffer), command_loop (void); | 350 | Lisp_Object recursive_edit_unwind (Lisp_Object buffer), command_loop (void); |
| 352 | Lisp_Object Fthis_command_keys (void); | 351 | Lisp_Object Fthis_command_keys (void); |
| 353 | Lisp_Object Qextended_command_history; | 352 | Lisp_Object Qextended_command_history; |
| 354 | EMACS_TIME timer_check (int do_it_now); | 353 | EMACS_TIME timer_check (void); |
| 355 | 354 | ||
| 356 | static void record_menu_key (Lisp_Object c); | 355 | static void record_menu_key (Lisp_Object c); |
| 357 | static int echo_length (void); | 356 | static int echo_length (void); |
| @@ -434,15 +433,15 @@ static void restore_getcjmp (jmp_buf); | |||
| 434 | static Lisp_Object apply_modifiers (int, Lisp_Object); | 433 | static Lisp_Object apply_modifiers (int, Lisp_Object); |
| 435 | static void clear_event (struct input_event *); | 434 | static void clear_event (struct input_event *); |
| 436 | static Lisp_Object restore_kboard_configuration (Lisp_Object); | 435 | static Lisp_Object restore_kboard_configuration (Lisp_Object); |
| 437 | static SIGTYPE interrupt_signal (int signalnum); | 436 | static void interrupt_signal (int signalnum); |
| 438 | #ifdef SIGIO | 437 | #ifdef SIGIO |
| 439 | static SIGTYPE input_available_signal (int signo); | 438 | static void input_available_signal (int signo); |
| 440 | #endif | 439 | #endif |
| 441 | static void handle_interrupt (void); | 440 | static void handle_interrupt (void); |
| 442 | static void timer_start_idle (void); | 441 | static void timer_start_idle (void); |
| 443 | static void timer_stop_idle (void); | 442 | static void timer_stop_idle (void); |
| 444 | static void timer_resume_idle (void); | 443 | static void timer_resume_idle (void); |
| 445 | static SIGTYPE handle_user_signal (int); | 444 | static void handle_user_signal (int); |
| 446 | static char *find_user_signal_name (int); | 445 | static char *find_user_signal_name (int); |
| 447 | static int store_user_signal_events (void); | 446 | static int store_user_signal_events (void); |
| 448 | 447 | ||
| @@ -1270,7 +1269,7 @@ some_mouse_moved (void) | |||
| 1270 | /* This is the actual command reading loop, | 1269 | /* This is the actual command reading loop, |
| 1271 | sans error-handling encapsulation. */ | 1270 | sans error-handling encapsulation. */ |
| 1272 | 1271 | ||
| 1273 | static int read_key_sequence (Lisp_Object *, int, Lisp_Object, | 1272 | static int read_key_sequence (Lisp_Object *, size_t, Lisp_Object, |
| 1274 | int, int, int); | 1273 | int, int, int); |
| 1275 | void safe_run_hooks (Lisp_Object); | 1274 | void safe_run_hooks (Lisp_Object); |
| 1276 | static void adjust_point_for_property (EMACS_INT, int); | 1275 | static void adjust_point_for_property (EMACS_INT, int); |
| @@ -1492,10 +1491,7 @@ command_loop_1 (void) | |||
| 1492 | 1491 | ||
| 1493 | Vthis_command = cmd; | 1492 | Vthis_command = cmd; |
| 1494 | real_this_command = cmd; | 1493 | real_this_command = cmd; |
| 1495 | /* Note that the value cell will never directly contain nil | 1494 | safe_run_hooks (Qpre_command_hook); |
| 1496 | if the symbol is a local variable. */ | ||
| 1497 | if (!NILP (Vpre_command_hook) && !NILP (Vrun_hooks)) | ||
| 1498 | safe_run_hooks (Qpre_command_hook); | ||
| 1499 | 1495 | ||
| 1500 | already_adjusted = 0; | 1496 | already_adjusted = 0; |
| 1501 | 1497 | ||
| @@ -1541,18 +1537,14 @@ command_loop_1 (void) | |||
| 1541 | } | 1537 | } |
| 1542 | KVAR (current_kboard, Vlast_prefix_arg) = Vcurrent_prefix_arg; | 1538 | KVAR (current_kboard, Vlast_prefix_arg) = Vcurrent_prefix_arg; |
| 1543 | 1539 | ||
| 1544 | /* Note that the value cell will never directly contain nil | 1540 | safe_run_hooks (Qpost_command_hook); |
| 1545 | if the symbol is a local variable. */ | ||
| 1546 | if (!NILP (Vpost_command_hook) && !NILP (Vrun_hooks)) | ||
| 1547 | safe_run_hooks (Qpost_command_hook); | ||
| 1548 | 1541 | ||
| 1549 | /* If displaying a message, resize the echo area window to fit | 1542 | /* If displaying a message, resize the echo area window to fit |
| 1550 | that message's size exactly. */ | 1543 | that message's size exactly. */ |
| 1551 | if (!NILP (echo_area_buffer[0])) | 1544 | if (!NILP (echo_area_buffer[0])) |
| 1552 | resize_echo_area_exactly (); | 1545 | resize_echo_area_exactly (); |
| 1553 | 1546 | ||
| 1554 | if (!NILP (Vdeferred_action_list)) | 1547 | safe_run_hooks (Qdeferred_action_function); |
| 1555 | safe_run_hooks (Qdeferred_action_function); | ||
| 1556 | 1548 | ||
| 1557 | /* If there is a prefix argument, | 1549 | /* If there is a prefix argument, |
| 1558 | 1) We don't want Vlast_command to be ``universal-argument'' | 1550 | 1) We don't want Vlast_command to be ``universal-argument'' |
| @@ -1621,7 +1613,10 @@ command_loop_1 (void) | |||
| 1621 | } | 1613 | } |
| 1622 | 1614 | ||
| 1623 | if (current_buffer != prev_buffer || MODIFF != prev_modiff) | 1615 | if (current_buffer != prev_buffer || MODIFF != prev_modiff) |
| 1624 | call1 (Vrun_hooks, intern ("activate-mark-hook")); | 1616 | { |
| 1617 | Lisp_Object hook = intern ("activate-mark-hook"); | ||
| 1618 | Frun_hooks (1, &hook); | ||
| 1619 | } | ||
| 1625 | } | 1620 | } |
| 1626 | 1621 | ||
| 1627 | Vsaved_region_selection = Qnil; | 1622 | Vsaved_region_selection = Qnil; |
| @@ -1819,22 +1814,63 @@ adjust_point_for_property (EMACS_INT last_pt, int modified) | |||
| 1819 | static Lisp_Object | 1814 | static Lisp_Object |
| 1820 | safe_run_hooks_1 (void) | 1815 | safe_run_hooks_1 (void) |
| 1821 | { | 1816 | { |
| 1822 | if (NILP (Vrun_hooks)) | 1817 | eassert (CONSP (Vinhibit_quit)); |
| 1823 | return Qnil; | 1818 | return call0 (XCDR (Vinhibit_quit)); |
| 1824 | return call1 (Vrun_hooks, Vinhibit_quit); | ||
| 1825 | } | 1819 | } |
| 1826 | 1820 | ||
| 1827 | /* Subroutine for safe_run_hooks: handle an error by clearing out the hook. */ | 1821 | /* Subroutine for safe_run_hooks: handle an error by clearing out the function |
| 1822 | from the hook. */ | ||
| 1823 | |||
| 1824 | static Lisp_Object | ||
| 1825 | safe_run_hooks_error (Lisp_Object error_data) | ||
| 1826 | { | ||
| 1827 | Lisp_Object hook | ||
| 1828 | = CONSP (Vinhibit_quit) ? XCAR (Vinhibit_quit) : Vinhibit_quit; | ||
| 1829 | Lisp_Object fun = CONSP (Vinhibit_quit) ? XCDR (Vinhibit_quit) : Qnil; | ||
| 1830 | Lisp_Object args[4]; | ||
| 1831 | args[0] = build_string ("Error in %s (%s): %s"); | ||
| 1832 | args[1] = hook; | ||
| 1833 | args[2] = fun; | ||
| 1834 | args[3] = error_data; | ||
| 1835 | Fmessage (4, args); | ||
| 1836 | if (SYMBOLP (hook)) | ||
| 1837 | { | ||
| 1838 | Lisp_Object val; | ||
| 1839 | int found = 0; | ||
| 1840 | Lisp_Object newval = Qnil; | ||
| 1841 | for (val = find_symbol_value (hook); CONSP (val); val = XCDR (val)) | ||
| 1842 | if (EQ (fun, XCAR (val))) | ||
| 1843 | found = 1; | ||
| 1844 | else | ||
| 1845 | newval = Fcons (XCAR (val), newval); | ||
| 1846 | if (found) | ||
| 1847 | return Fset (hook, Fnreverse (newval)); | ||
| 1848 | /* Not found in the local part of the hook. Let's look at the global | ||
| 1849 | part. */ | ||
| 1850 | newval = Qnil; | ||
| 1851 | for (val = (NILP (Fdefault_boundp (hook)) ? Qnil | ||
| 1852 | : Fdefault_value (hook)); | ||
| 1853 | CONSP (val); val = XCDR (val)) | ||
| 1854 | if (EQ (fun, XCAR (val))) | ||
| 1855 | found = 1; | ||
| 1856 | else | ||
| 1857 | newval = Fcons (XCAR (val), newval); | ||
| 1858 | if (found) | ||
| 1859 | return Fset_default (hook, Fnreverse (newval)); | ||
| 1860 | } | ||
| 1861 | return Qnil; | ||
| 1862 | } | ||
| 1828 | 1863 | ||
| 1829 | static Lisp_Object | 1864 | static Lisp_Object |
| 1830 | safe_run_hooks_error (Lisp_Object data) | 1865 | safe_run_hook_funcall (size_t nargs, Lisp_Object *args) |
| 1831 | { | 1866 | { |
| 1832 | Lisp_Object args[3]; | 1867 | eassert (nargs == 1); |
| 1833 | args[0] = build_string ("Error in %s: %s"); | 1868 | if (CONSP (Vinhibit_quit)) |
| 1834 | args[1] = Vinhibit_quit; | 1869 | XSETCDR (Vinhibit_quit, args[0]); |
| 1835 | args[2] = data; | 1870 | else |
| 1836 | Fmessage (3, args); | 1871 | Vinhibit_quit = Fcons (Vinhibit_quit, args[0]); |
| 1837 | return Fset (Vinhibit_quit, Qnil); | 1872 | |
| 1873 | return internal_condition_case (safe_run_hooks_1, Qt, safe_run_hooks_error); | ||
| 1838 | } | 1874 | } |
| 1839 | 1875 | ||
| 1840 | /* If we get an error while running the hook, cause the hook variable | 1876 | /* If we get an error while running the hook, cause the hook variable |
| @@ -1844,10 +1880,13 @@ safe_run_hooks_error (Lisp_Object data) | |||
| 1844 | void | 1880 | void |
| 1845 | safe_run_hooks (Lisp_Object hook) | 1881 | safe_run_hooks (Lisp_Object hook) |
| 1846 | { | 1882 | { |
| 1883 | /* FIXME: our `internal_condition_case' does not provide any way to pass data | ||
| 1884 | to its body or to its handlers other than via globals such as | ||
| 1885 | dynamically-bound variables ;-) */ | ||
| 1847 | int count = SPECPDL_INDEX (); | 1886 | int count = SPECPDL_INDEX (); |
| 1848 | specbind (Qinhibit_quit, hook); | 1887 | specbind (Qinhibit_quit, hook); |
| 1849 | 1888 | ||
| 1850 | internal_condition_case (safe_run_hooks_1, Qt, safe_run_hooks_error); | 1889 | run_hook_with_args (1, &hook, safe_run_hook_funcall); |
| 1851 | 1890 | ||
| 1852 | unbind_to (count, Qnil); | 1891 | unbind_to (count, Qnil); |
| 1853 | } | 1892 | } |
| @@ -2074,16 +2113,12 @@ make_ctrl_char (int c) | |||
| 2074 | the `display' property). POS is the position in that string under | 2113 | the `display' property). POS is the position in that string under |
| 2075 | the mouse. | 2114 | the mouse. |
| 2076 | 2115 | ||
| 2077 | OK_TO_OVERWRITE_KEYSTROKE_ECHO non-zero means it's okay if the help | ||
| 2078 | echo overwrites a keystroke echo currently displayed in the echo | ||
| 2079 | area. | ||
| 2080 | |||
| 2081 | Note: this function may only be called with HELP nil or a string | 2116 | Note: this function may only be called with HELP nil or a string |
| 2082 | from X code running asynchronously. */ | 2117 | from X code running asynchronously. */ |
| 2083 | 2118 | ||
| 2084 | void | 2119 | void |
| 2085 | show_help_echo (Lisp_Object help, Lisp_Object window, Lisp_Object object, | 2120 | show_help_echo (Lisp_Object help, Lisp_Object window, Lisp_Object object, |
| 2086 | Lisp_Object pos, int ok_to_overwrite_keystroke_echo) | 2121 | Lisp_Object pos) |
| 2087 | { | 2122 | { |
| 2088 | if (!NILP (help) && !STRINGP (help)) | 2123 | if (!NILP (help) && !STRINGP (help)) |
| 2089 | { | 2124 | { |
| @@ -3013,7 +3048,7 @@ read_char (int commandflag, int nmaps, Lisp_Object *maps, Lisp_Object prev_event | |||
| 3013 | htem = Fcdr (htem); | 3048 | htem = Fcdr (htem); |
| 3014 | position = Fcar (htem); | 3049 | position = Fcar (htem); |
| 3015 | 3050 | ||
| 3016 | show_help_echo (help, window, object, position, 0); | 3051 | show_help_echo (help, window, object, position); |
| 3017 | 3052 | ||
| 3018 | /* We stopped being idle for this event; undo that. */ | 3053 | /* We stopped being idle for this event; undo that. */ |
| 3019 | if (!end_time) | 3054 | if (!end_time) |
| @@ -3315,7 +3350,7 @@ static int | |||
| 3315 | readable_events (int flags) | 3350 | readable_events (int flags) |
| 3316 | { | 3351 | { |
| 3317 | if (flags & READABLE_EVENTS_DO_TIMERS_NOW) | 3352 | if (flags & READABLE_EVENTS_DO_TIMERS_NOW) |
| 3318 | timer_check (1); | 3353 | timer_check (); |
| 3319 | 3354 | ||
| 3320 | /* If the buffer contains only FOCUS_IN_EVENT events, and | 3355 | /* If the buffer contains only FOCUS_IN_EVENT events, and |
| 3321 | READABLE_EVENTS_FILTER_EVENTS is set, report it as empty. */ | 3356 | READABLE_EVENTS_FILTER_EVENTS is set, report it as empty. */ |
| @@ -4389,14 +4424,10 @@ timer_check_2 (void) | |||
| 4389 | Returns the time to wait until the next timer fires. | 4424 | Returns the time to wait until the next timer fires. |
| 4390 | If no timer is active, return -1. | 4425 | If no timer is active, return -1. |
| 4391 | 4426 | ||
| 4392 | As long as any timer is ripe, we run it. | 4427 | As long as any timer is ripe, we run it. */ |
| 4393 | |||
| 4394 | DO_IT_NOW is now ignored. It used to mean that we should | ||
| 4395 | run the timer directly instead of queueing a timer-event. | ||
| 4396 | Now we always run timers directly. */ | ||
| 4397 | 4428 | ||
| 4398 | EMACS_TIME | 4429 | EMACS_TIME |
| 4399 | timer_check (int do_it_now) | 4430 | timer_check (void) |
| 4400 | { | 4431 | { |
| 4401 | EMACS_TIME nexttime; | 4432 | EMACS_TIME nexttime; |
| 4402 | 4433 | ||
| @@ -5405,7 +5436,6 @@ make_lispy_event (struct input_event *event) | |||
| 5405 | && (event->modifiers & down_modifier)) | 5436 | && (event->modifiers & down_modifier)) |
| 5406 | { | 5437 | { |
| 5407 | Lisp_Object items, item; | 5438 | Lisp_Object items, item; |
| 5408 | int hpos; | ||
| 5409 | int i; | 5439 | int i; |
| 5410 | 5440 | ||
| 5411 | /* Find the menu bar item under `column'. */ | 5441 | /* Find the menu bar item under `column'. */ |
| @@ -5974,10 +6004,10 @@ make_lispy_switch_frame (Lisp_Object frame) | |||
| 5974 | This doesn't use any caches. */ | 6004 | This doesn't use any caches. */ |
| 5975 | 6005 | ||
| 5976 | static int | 6006 | static int |
| 5977 | parse_modifiers_uncached (Lisp_Object symbol, int *modifier_end) | 6007 | parse_modifiers_uncached (Lisp_Object symbol, EMACS_INT *modifier_end) |
| 5978 | { | 6008 | { |
| 5979 | Lisp_Object name; | 6009 | Lisp_Object name; |
| 5980 | int i; | 6010 | EMACS_INT i; |
| 5981 | int modifiers; | 6011 | int modifiers; |
| 5982 | 6012 | ||
| 5983 | CHECK_SYMBOL (symbol); | 6013 | CHECK_SYMBOL (symbol); |
| @@ -5987,7 +6017,7 @@ parse_modifiers_uncached (Lisp_Object symbol, int *modifier_end) | |||
| 5987 | 6017 | ||
| 5988 | for (i = 0; i+2 <= SBYTES (name); ) | 6018 | for (i = 0; i+2 <= SBYTES (name); ) |
| 5989 | { | 6019 | { |
| 5990 | int this_mod_end = 0; | 6020 | EMACS_INT this_mod_end = 0; |
| 5991 | int this_mod = 0; | 6021 | int this_mod = 0; |
| 5992 | 6022 | ||
| 5993 | /* See if the name continues with a modifier word. | 6023 | /* See if the name continues with a modifier word. |
| @@ -6184,7 +6214,7 @@ parse_modifiers (Lisp_Object symbol) | |||
| 6184 | return elements; | 6214 | return elements; |
| 6185 | else | 6215 | else |
| 6186 | { | 6216 | { |
| 6187 | int end; | 6217 | EMACS_INT end; |
| 6188 | int modifiers = parse_modifiers_uncached (symbol, &end); | 6218 | int modifiers = parse_modifiers_uncached (symbol, &end); |
| 6189 | Lisp_Object unmodified; | 6219 | Lisp_Object unmodified; |
| 6190 | Lisp_Object mask; | 6220 | Lisp_Object mask; |
| @@ -7097,7 +7127,7 @@ process_pending_signals (void) | |||
| 7097 | #ifdef SIGIO /* for entire page */ | 7127 | #ifdef SIGIO /* for entire page */ |
| 7098 | /* Note SIGIO has been undef'd if FIONREAD is missing. */ | 7128 | /* Note SIGIO has been undef'd if FIONREAD is missing. */ |
| 7099 | 7129 | ||
| 7100 | static SIGTYPE | 7130 | static void |
| 7101 | input_available_signal (int signo) | 7131 | input_available_signal (int signo) |
| 7102 | { | 7132 | { |
| 7103 | /* Must preserve main program's value of errno. */ | 7133 | /* Must preserve main program's value of errno. */ |
| @@ -7175,7 +7205,7 @@ add_user_signal (int sig, const char *name) | |||
| 7175 | signal (sig, handle_user_signal); | 7205 | signal (sig, handle_user_signal); |
| 7176 | } | 7206 | } |
| 7177 | 7207 | ||
| 7178 | static SIGTYPE | 7208 | static void |
| 7179 | handle_user_signal (int sig) | 7209 | handle_user_signal (int sig) |
| 7180 | { | 7210 | { |
| 7181 | int old_errno = errno; | 7211 | int old_errno = errno; |
| @@ -8769,7 +8799,7 @@ access_keymap_keyremap (Lisp_Object map, Lisp_Object key, Lisp_Object prompt, | |||
| 8769 | The return value is non-zero if the remapping actually took place. */ | 8799 | The return value is non-zero if the remapping actually took place. */ |
| 8770 | 8800 | ||
| 8771 | static int | 8801 | static int |
| 8772 | keyremap_step (Lisp_Object *keybuf, int bufsize, volatile keyremap *fkey, | 8802 | keyremap_step (Lisp_Object *keybuf, size_t bufsize, volatile keyremap *fkey, |
| 8773 | int input, int doit, int *diff, Lisp_Object prompt) | 8803 | int input, int doit, int *diff, Lisp_Object prompt) |
| 8774 | { | 8804 | { |
| 8775 | Lisp_Object next, key; | 8805 | Lisp_Object next, key; |
| @@ -8862,7 +8892,7 @@ keyremap_step (Lisp_Object *keybuf, int bufsize, volatile keyremap *fkey, | |||
| 8862 | from the selected window's buffer. */ | 8892 | from the selected window's buffer. */ |
| 8863 | 8893 | ||
| 8864 | static int | 8894 | static int |
| 8865 | read_key_sequence (Lisp_Object *keybuf, int bufsize, Lisp_Object prompt, | 8895 | read_key_sequence (Lisp_Object *keybuf, size_t bufsize, Lisp_Object prompt, |
| 8866 | int dont_downcase_last, int can_return_switch_frame, | 8896 | int dont_downcase_last, int can_return_switch_frame, |
| 8867 | int fix_current_buffer) | 8897 | int fix_current_buffer) |
| 8868 | { | 8898 | { |
| @@ -9380,80 +9410,84 @@ read_key_sequence (Lisp_Object *keybuf, int bufsize, Lisp_Object prompt, | |||
| 9380 | last_real_key_start = t - 1; | 9410 | last_real_key_start = t - 1; |
| 9381 | } | 9411 | } |
| 9382 | 9412 | ||
| 9383 | /* Key sequences beginning with mouse clicks are | 9413 | if (last_real_key_start == 0) |
| 9384 | read using the keymaps in the buffer clicked on, | ||
| 9385 | not the current buffer. If we're at the | ||
| 9386 | beginning of a key sequence, switch buffers. */ | ||
| 9387 | if (last_real_key_start == 0 | ||
| 9388 | && WINDOWP (window) | ||
| 9389 | && BUFFERP (XWINDOW (window)->buffer) | ||
| 9390 | && XBUFFER (XWINDOW (window)->buffer) != current_buffer) | ||
| 9391 | { | 9414 | { |
| 9392 | XVECTOR (raw_keybuf)->contents[raw_keybuf_count++] = key; | 9415 | /* Key sequences beginning with mouse clicks are |
| 9393 | keybuf[t] = key; | 9416 | read using the keymaps in the buffer clicked on, |
| 9394 | mock_input = t + 1; | 9417 | not the current buffer. If we're at the |
| 9395 | 9418 | beginning of a key sequence, switch buffers. */ | |
| 9396 | /* Arrange to go back to the original buffer once we're | 9419 | if (WINDOWP (window) |
| 9397 | done reading the key sequence. Note that we can't | 9420 | && BUFFERP (XWINDOW (window)->buffer) |
| 9398 | use save_excursion_{save,restore} here, because they | 9421 | && XBUFFER (XWINDOW (window)->buffer) != current_buffer) |
| 9399 | save point as well as the current buffer; we don't | 9422 | { |
| 9400 | want to save point, because redisplay may change it, | 9423 | XVECTOR (raw_keybuf)->contents[raw_keybuf_count++] = key; |
| 9401 | to accommodate a Fset_window_start or something. We | 9424 | keybuf[t] = key; |
| 9402 | don't want to do this at the top of the function, | 9425 | mock_input = t + 1; |
| 9403 | because we may get input from a subprocess which | 9426 | |
| 9404 | wants to change the selected window and stuff (say, | 9427 | /* Arrange to go back to the original buffer once we're |
| 9405 | emacsclient). */ | 9428 | done reading the key sequence. Note that we can't |
| 9406 | record_unwind_protect (Fset_buffer, Fcurrent_buffer ()); | 9429 | use save_excursion_{save,restore} here, because they |
| 9407 | 9430 | save point as well as the current buffer; we don't | |
| 9408 | if (! FRAME_LIVE_P (XFRAME (selected_frame))) | 9431 | want to save point, because redisplay may change it, |
| 9409 | Fkill_emacs (Qnil); | 9432 | to accommodate a Fset_window_start or something. We |
| 9410 | set_buffer_internal (XBUFFER (XWINDOW (window)->buffer)); | 9433 | don't want to do this at the top of the function, |
| 9411 | orig_local_map = get_local_map (PT, current_buffer, | 9434 | because we may get input from a subprocess which |
| 9412 | Qlocal_map); | 9435 | wants to change the selected window and stuff (say, |
| 9413 | orig_keymap = get_local_map (PT, current_buffer, Qkeymap); | 9436 | emacsclient). */ |
| 9414 | goto replay_sequence; | 9437 | record_unwind_protect (Fset_buffer, Fcurrent_buffer ()); |
| 9415 | } | 9438 | |
| 9439 | if (! FRAME_LIVE_P (XFRAME (selected_frame))) | ||
| 9440 | Fkill_emacs (Qnil); | ||
| 9441 | set_buffer_internal (XBUFFER (XWINDOW (window)->buffer)); | ||
| 9442 | orig_local_map = get_local_map (PT, current_buffer, | ||
| 9443 | Qlocal_map); | ||
| 9444 | orig_keymap = get_local_map (PT, current_buffer, | ||
| 9445 | Qkeymap); | ||
| 9446 | goto replay_sequence; | ||
| 9447 | } | ||
| 9416 | 9448 | ||
| 9417 | /* For a mouse click, get the local text-property keymap | 9449 | /* For a mouse click, get the local text-property keymap |
| 9418 | of the place clicked on, rather than point. */ | 9450 | of the place clicked on, rather than point. */ |
| 9419 | if (last_real_key_start == 0 | 9451 | if (CONSP (XCDR (key)) |
| 9420 | && CONSP (XCDR (key)) | 9452 | && ! localized_local_map) |
| 9421 | && ! localized_local_map) | 9453 | { |
| 9422 | { | 9454 | Lisp_Object map_here, start, pos; |
| 9423 | Lisp_Object map_here, start, pos; | ||
| 9424 | 9455 | ||
| 9425 | localized_local_map = 1; | 9456 | localized_local_map = 1; |
| 9426 | start = EVENT_START (key); | 9457 | start = EVENT_START (key); |
| 9427 | 9458 | ||
| 9428 | if (CONSP (start) && POSN_INBUFFER_P (start)) | 9459 | if (CONSP (start) && POSN_INBUFFER_P (start)) |
| 9429 | { | ||
| 9430 | pos = POSN_BUFFER_POSN (start); | ||
| 9431 | if (INTEGERP (pos) | ||
| 9432 | && XINT (pos) >= BEGV | ||
| 9433 | && XINT (pos) <= ZV) | ||
| 9434 | { | 9460 | { |
| 9435 | map_here = get_local_map (XINT (pos), | 9461 | pos = POSN_BUFFER_POSN (start); |
| 9436 | current_buffer, Qlocal_map); | 9462 | if (INTEGERP (pos) |
| 9437 | if (!EQ (map_here, orig_local_map)) | 9463 | && XINT (pos) >= BEGV |
| 9464 | && XINT (pos) <= ZV) | ||
| 9438 | { | 9465 | { |
| 9439 | orig_local_map = map_here; | 9466 | map_here = get_local_map (XINT (pos), |
| 9440 | ++localized_local_map; | 9467 | current_buffer, |
| 9441 | } | 9468 | Qlocal_map); |
| 9469 | if (!EQ (map_here, orig_local_map)) | ||
| 9470 | { | ||
| 9471 | orig_local_map = map_here; | ||
| 9472 | ++localized_local_map; | ||
| 9473 | } | ||
| 9442 | 9474 | ||
| 9443 | map_here = get_local_map (XINT (pos), | 9475 | map_here = get_local_map (XINT (pos), |
| 9444 | current_buffer, Qkeymap); | 9476 | current_buffer, |
| 9445 | if (!EQ (map_here, orig_keymap)) | 9477 | Qkeymap); |
| 9446 | { | 9478 | if (!EQ (map_here, orig_keymap)) |
| 9447 | orig_keymap = map_here; | 9479 | { |
| 9448 | ++localized_local_map; | 9480 | orig_keymap = map_here; |
| 9449 | } | 9481 | ++localized_local_map; |
| 9482 | } | ||
| 9450 | 9483 | ||
| 9451 | if (localized_local_map > 1) | 9484 | if (localized_local_map > 1) |
| 9452 | { | 9485 | { |
| 9453 | keybuf[t] = key; | 9486 | keybuf[t] = key; |
| 9454 | mock_input = t + 1; | 9487 | mock_input = t + 1; |
| 9455 | 9488 | ||
| 9456 | goto replay_sequence; | 9489 | goto replay_sequence; |
| 9490 | } | ||
| 9457 | } | 9491 | } |
| 9458 | } | 9492 | } |
| 9459 | } | 9493 | } |
| @@ -10135,11 +10169,11 @@ a special event, so ignore the prefix argument and don't clear it. */) | |||
| 10135 | if (SYMBOLP (cmd)) | 10169 | if (SYMBOLP (cmd)) |
| 10136 | { | 10170 | { |
| 10137 | tem = Fget (cmd, Qdisabled); | 10171 | tem = Fget (cmd, Qdisabled); |
| 10138 | if (!NILP (tem) && !NILP (Vrun_hooks)) | 10172 | if (!NILP (tem)) |
| 10139 | { | 10173 | { |
| 10140 | tem = Fsymbol_value (Qdisabled_command_function); | 10174 | tem = Fsymbol_value (Qdisabled_command_function); |
| 10141 | if (!NILP (tem)) | 10175 | if (!NILP (tem)) |
| 10142 | return call1 (Vrun_hooks, Qdisabled_command_function); | 10176 | return Frun_hooks (1, &Qdisabled_command_function); |
| 10143 | } | 10177 | } |
| 10144 | } | 10178 | } |
| 10145 | 10179 | ||
| @@ -10312,9 +10346,9 @@ give to the command you invoke, if it asks for an argument. */) | |||
| 10312 | sprintf (newmessage, "You can run the command `%s' with %s", | 10346 | sprintf (newmessage, "You can run the command `%s' with %s", |
| 10313 | SDATA (SYMBOL_NAME (function)), | 10347 | SDATA (SYMBOL_NAME (function)), |
| 10314 | SDATA (binding)); | 10348 | SDATA (binding)); |
| 10315 | message2_nolog (newmessage, | 10349 | message2 (newmessage, |
| 10316 | strlen (newmessage), | 10350 | strlen (newmessage), |
| 10317 | STRING_MULTIBYTE (binding)); | 10351 | STRING_MULTIBYTE (binding)); |
| 10318 | if (NUMBERP (Vsuggest_key_bindings)) | 10352 | if (NUMBERP (Vsuggest_key_bindings)) |
| 10319 | waited = sit_for (Vsuggest_key_bindings, 0, 2); | 10353 | waited = sit_for (Vsuggest_key_bindings, 0, 2); |
| 10320 | else | 10354 | else |
| @@ -10623,6 +10657,7 @@ On such systems, Emacs starts a subshell instead of suspending. */) | |||
| 10623 | int old_height, old_width; | 10657 | int old_height, old_width; |
| 10624 | int width, height; | 10658 | int width, height; |
| 10625 | struct gcpro gcpro1; | 10659 | struct gcpro gcpro1; |
| 10660 | Lisp_Object hook; | ||
| 10626 | 10661 | ||
| 10627 | if (tty_list && tty_list->next) | 10662 | if (tty_list && tty_list->next) |
| 10628 | error ("There are other tty frames open; close them before suspending Emacs"); | 10663 | error ("There are other tty frames open; close them before suspending Emacs"); |
| @@ -10631,8 +10666,8 @@ On such systems, Emacs starts a subshell instead of suspending. */) | |||
| 10631 | CHECK_STRING (stuffstring); | 10666 | CHECK_STRING (stuffstring); |
| 10632 | 10667 | ||
| 10633 | /* Run the functions in suspend-hook. */ | 10668 | /* Run the functions in suspend-hook. */ |
| 10634 | if (!NILP (Vrun_hooks)) | 10669 | hook = intern ("suspend-hook"); |
| 10635 | call1 (Vrun_hooks, intern ("suspend-hook")); | 10670 | Frun_hooks (1, &hook); |
| 10636 | 10671 | ||
| 10637 | GCPRO1 (stuffstring); | 10672 | GCPRO1 (stuffstring); |
| 10638 | get_tty_size (fileno (CURTTY ()->input), &old_width, &old_height); | 10673 | get_tty_size (fileno (CURTTY ()->input), &old_width, &old_height); |
| @@ -10656,8 +10691,8 @@ On such systems, Emacs starts a subshell instead of suspending. */) | |||
| 10656 | change_frame_size (SELECTED_FRAME (), height, width, 0, 0, 0); | 10691 | change_frame_size (SELECTED_FRAME (), height, width, 0, 0, 0); |
| 10657 | 10692 | ||
| 10658 | /* Run suspend-resume-hook. */ | 10693 | /* Run suspend-resume-hook. */ |
| 10659 | if (!NILP (Vrun_hooks)) | 10694 | hook = intern ("suspend-resume-hook"); |
| 10660 | call1 (Vrun_hooks, intern ("suspend-resume-hook")); | 10695 | Frun_hooks (1, &hook); |
| 10661 | 10696 | ||
| 10662 | UNGCPRO; | 10697 | UNGCPRO; |
| 10663 | return Qnil; | 10698 | return Qnil; |
| @@ -10732,7 +10767,7 @@ clear_waiting_for_input (void) | |||
| 10732 | SIGINT was generated by C-g, so we call handle_interrupt. | 10767 | SIGINT was generated by C-g, so we call handle_interrupt. |
| 10733 | Otherwise, the handler kills Emacs. */ | 10768 | Otherwise, the handler kills Emacs. */ |
| 10734 | 10769 | ||
| 10735 | static SIGTYPE | 10770 | static void |
| 10736 | interrupt_signal (int signalnum) /* If we don't have an argument, some */ | 10771 | interrupt_signal (int signalnum) /* If we don't have an argument, some */ |
| 10737 | /* compilers complain in signal calls. */ | 10772 | /* compilers complain in signal calls. */ |
| 10738 | { | 10773 | { |
| @@ -11458,9 +11493,6 @@ syms_of_keyboard (void) | |||
| 11458 | Qdeferred_action_function = intern_c_string ("deferred-action-function"); | 11493 | Qdeferred_action_function = intern_c_string ("deferred-action-function"); |
| 11459 | staticpro (&Qdeferred_action_function); | 11494 | staticpro (&Qdeferred_action_function); |
| 11460 | 11495 | ||
| 11461 | Qcommand_hook_internal = intern_c_string ("command-hook-internal"); | ||
| 11462 | staticpro (&Qcommand_hook_internal); | ||
| 11463 | |||
| 11464 | Qfunction_key = intern_c_string ("function-key"); | 11496 | Qfunction_key = intern_c_string ("function-key"); |
| 11465 | staticpro (&Qfunction_key); | 11497 | staticpro (&Qfunction_key); |
| 11466 | Qmouse_click = intern_c_string ("mouse-click"); | 11498 | Qmouse_click = intern_c_string ("mouse-click"); |
| @@ -11580,12 +11612,12 @@ syms_of_keyboard (void) | |||
| 11580 | last_point_position_window = Qnil; | 11612 | last_point_position_window = Qnil; |
| 11581 | 11613 | ||
| 11582 | { | 11614 | { |
| 11583 | const struct event_head *p; | 11615 | int i; |
| 11616 | int len = sizeof (head_table) / sizeof (head_table[0]); | ||
| 11584 | 11617 | ||
| 11585 | for (p = head_table; | 11618 | for (i = 0; i < len; i++) |
| 11586 | p < head_table + (sizeof (head_table) / sizeof (head_table[0])); | ||
| 11587 | p++) | ||
| 11588 | { | 11619 | { |
| 11620 | const struct event_head *p = &head_table[i]; | ||
| 11589 | *p->var = intern_c_string (p->name); | 11621 | *p->var = intern_c_string (p->name); |
| 11590 | staticpro (p->var); | 11622 | staticpro (p->var); |
| 11591 | Fput (*p->var, Qevent_kind, *p->kind); | 11623 | Fput (*p->var, Qevent_kind, *p->kind); |
| @@ -11928,22 +11960,18 @@ Buffer modification stores t in this variable. */); | |||
| 11928 | Qdeactivate_mark = intern_c_string ("deactivate-mark"); | 11960 | Qdeactivate_mark = intern_c_string ("deactivate-mark"); |
| 11929 | staticpro (&Qdeactivate_mark); | 11961 | staticpro (&Qdeactivate_mark); |
| 11930 | 11962 | ||
| 11931 | DEFVAR_LISP ("command-hook-internal", Vcommand_hook_internal, | ||
| 11932 | doc: /* Temporary storage of `pre-command-hook' or `post-command-hook'. */); | ||
| 11933 | Vcommand_hook_internal = Qnil; | ||
| 11934 | |||
| 11935 | DEFVAR_LISP ("pre-command-hook", Vpre_command_hook, | 11963 | DEFVAR_LISP ("pre-command-hook", Vpre_command_hook, |
| 11936 | doc: /* Normal hook run before each command is executed. | 11964 | doc: /* Normal hook run before each command is executed. |
| 11937 | If an unhandled error happens in running this hook, | 11965 | If an unhandled error happens in running this hook, |
| 11938 | the hook value is set to nil, since otherwise the error | 11966 | the function in which the error occurred is unconditionally removed, since |
| 11939 | might happen repeatedly and make Emacs nonfunctional. */); | 11967 | otherwise the error might happen repeatedly and make Emacs nonfunctional. */); |
| 11940 | Vpre_command_hook = Qnil; | 11968 | Vpre_command_hook = Qnil; |
| 11941 | 11969 | ||
| 11942 | DEFVAR_LISP ("post-command-hook", Vpost_command_hook, | 11970 | DEFVAR_LISP ("post-command-hook", Vpost_command_hook, |
| 11943 | doc: /* Normal hook run after each command is executed. | 11971 | doc: /* Normal hook run after each command is executed. |
| 11944 | If an unhandled error happens in running this hook, | 11972 | If an unhandled error happens in running this hook, |
| 11945 | the hook value is set to nil, since otherwise the error | 11973 | the function in which the error occurred is unconditionally removed, since |
| 11946 | might happen repeatedly and make Emacs nonfunctional. */); | 11974 | otherwise the error might happen repeatedly and make Emacs nonfunctional. */); |
| 11947 | Vpost_command_hook = Qnil; | 11975 | Vpost_command_hook = Qnil; |
| 11948 | 11976 | ||
| 11949 | #if 0 | 11977 | #if 0 |
diff --git a/src/keyboard.h b/src/keyboard.h index 00745a09140..72bb821b2eb 100644 --- a/src/keyboard.h +++ b/src/keyboard.h | |||
| @@ -194,8 +194,8 @@ extern KBOARD *all_kboards; | |||
| 194 | /* Nonzero in the single-kboard state, 0 in the any-kboard state. */ | 194 | /* Nonzero in the single-kboard state, 0 in the any-kboard state. */ |
| 195 | extern int single_kboard; | 195 | extern int single_kboard; |
| 196 | 196 | ||
| 197 | /* Total number of times read_char has returned. */ | 197 | /* Total number of times read_char has returned, modulo SIZE_MAX + 1. */ |
| 198 | extern int num_input_events; | 198 | extern size_t num_input_events; |
| 199 | 199 | ||
| 200 | /* Nonzero means polling for input is temporarily suppressed. */ | 200 | /* Nonzero means polling for input is temporarily suppressed. */ |
| 201 | extern int poll_suppress_count; | 201 | extern int poll_suppress_count; |
| @@ -485,7 +485,7 @@ extern void push_frame_kboard (struct frame *); | |||
| 485 | extern void pop_kboard (void); | 485 | extern void pop_kboard (void); |
| 486 | extern void temporarily_switch_to_single_kboard (struct frame *); | 486 | extern void temporarily_switch_to_single_kboard (struct frame *); |
| 487 | extern void record_asynch_buffer_change (void); | 487 | extern void record_asynch_buffer_change (void); |
| 488 | extern SIGTYPE input_poll_signal (int); | 488 | extern void input_poll_signal (int); |
| 489 | extern void start_polling (void); | 489 | extern void start_polling (void); |
| 490 | extern void stop_polling (void); | 490 | extern void stop_polling (void); |
| 491 | extern void set_poll_suppress_count (int); | 491 | extern void set_poll_suppress_count (int); |
| @@ -507,7 +507,7 @@ extern void kbd_buffer_store_event_hold (struct input_event *, | |||
| 507 | extern void kbd_buffer_unget_event (struct input_event *); | 507 | extern void kbd_buffer_unget_event (struct input_event *); |
| 508 | extern void poll_for_input_1 (void); | 508 | extern void poll_for_input_1 (void); |
| 509 | extern void show_help_echo (Lisp_Object, Lisp_Object, Lisp_Object, | 509 | extern void show_help_echo (Lisp_Object, Lisp_Object, Lisp_Object, |
| 510 | Lisp_Object, int); | 510 | Lisp_Object); |
| 511 | extern void gen_help_event (Lisp_Object, Lisp_Object, Lisp_Object, | 511 | extern void gen_help_event (Lisp_Object, Lisp_Object, Lisp_Object, |
| 512 | Lisp_Object, EMACS_INT); | 512 | Lisp_Object, EMACS_INT); |
| 513 | extern void kbd_buffer_store_help_event (Lisp_Object, Lisp_Object); | 513 | extern void kbd_buffer_store_help_event (Lisp_Object, Lisp_Object); |
| @@ -517,7 +517,7 @@ extern void add_user_signal (int, const char *); | |||
| 517 | 517 | ||
| 518 | extern int tty_read_avail_input (struct terminal *, int, | 518 | extern int tty_read_avail_input (struct terminal *, int, |
| 519 | struct input_event *); | 519 | struct input_event *); |
| 520 | extern EMACS_TIME timer_check (int); | 520 | extern EMACS_TIME timer_check (void); |
| 521 | extern void mark_kboards (void); | 521 | extern void mark_kboards (void); |
| 522 | 522 | ||
| 523 | #ifdef WINDOWSNT | 523 | #ifdef WINDOWSNT |
diff --git a/src/keymap.c b/src/keymap.c index 06968a0d944..10000b935aa 100644 --- a/src/keymap.c +++ b/src/keymap.c | |||
| @@ -81,8 +81,7 @@ static void describe_map (Lisp_Object, Lisp_Object, | |||
| 81 | int, Lisp_Object, Lisp_Object*, int, int); | 81 | int, Lisp_Object, Lisp_Object*, int, int); |
| 82 | static void describe_vector (Lisp_Object, Lisp_Object, Lisp_Object, | 82 | static void describe_vector (Lisp_Object, Lisp_Object, Lisp_Object, |
| 83 | void (*) (Lisp_Object, Lisp_Object), int, | 83 | void (*) (Lisp_Object, Lisp_Object), int, |
| 84 | Lisp_Object, Lisp_Object, int *, | 84 | Lisp_Object, Lisp_Object, int, int); |
| 85 | int, int, int); | ||
| 86 | static void silly_event_symbol_error (Lisp_Object); | 85 | static void silly_event_symbol_error (Lisp_Object); |
| 87 | static Lisp_Object get_keyelt (Lisp_Object, int); | 86 | static Lisp_Object get_keyelt (Lisp_Object, int); |
| 88 | 87 | ||
| @@ -2388,7 +2387,7 @@ push_key_description (register unsigned int c, register char *p, int force_multi | |||
| 2388 | /* Now we are sure that C is a valid character code. */ | 2387 | /* Now we are sure that C is a valid character code. */ |
| 2389 | if (NILP (BVAR (current_buffer, enable_multibyte_characters)) | 2388 | if (NILP (BVAR (current_buffer, enable_multibyte_characters)) |
| 2390 | && ! force_multibyte) | 2389 | && ! force_multibyte) |
| 2391 | *p++ = multibyte_char_to_unibyte (c, Qnil); | 2390 | *p++ = multibyte_char_to_unibyte (c); |
| 2392 | else | 2391 | else |
| 2393 | p += CHAR_STRING (c, (unsigned char *) p); | 2392 | p += CHAR_STRING (c, (unsigned char *) p); |
| 2394 | } | 2393 | } |
| @@ -3353,7 +3352,7 @@ describe_map (Lisp_Object map, Lisp_Object prefix, | |||
| 3353 | || CHAR_TABLE_P (XCAR (tail))) | 3352 | || CHAR_TABLE_P (XCAR (tail))) |
| 3354 | describe_vector (XCAR (tail), | 3353 | describe_vector (XCAR (tail), |
| 3355 | prefix, Qnil, elt_describer, partial, shadow, map, | 3354 | prefix, Qnil, elt_describer, partial, shadow, map, |
| 3356 | (int *)0, 0, 1, mention_shadow); | 3355 | 1, mention_shadow); |
| 3357 | else if (CONSP (XCAR (tail))) | 3356 | else if (CONSP (XCAR (tail))) |
| 3358 | { | 3357 | { |
| 3359 | int this_shadowed = 0; | 3358 | int this_shadowed = 0; |
| @@ -3506,7 +3505,7 @@ DESCRIBER is the output function used; nil means use `princ'. */) | |||
| 3506 | specbind (Qstandard_output, Fcurrent_buffer ()); | 3505 | specbind (Qstandard_output, Fcurrent_buffer ()); |
| 3507 | CHECK_VECTOR_OR_CHAR_TABLE (vector); | 3506 | CHECK_VECTOR_OR_CHAR_TABLE (vector); |
| 3508 | describe_vector (vector, Qnil, describer, describe_vector_princ, 0, | 3507 | describe_vector (vector, Qnil, describer, describe_vector_princ, 0, |
| 3509 | Qnil, Qnil, (int *)0, 0, 0, 0); | 3508 | Qnil, Qnil, 0, 0); |
| 3510 | 3509 | ||
| 3511 | return unbind_to (count, Qnil); | 3510 | return unbind_to (count, Qnil); |
| 3512 | } | 3511 | } |
| @@ -3539,9 +3538,6 @@ DESCRIBER is the output function used; nil means use `princ'. */) | |||
| 3539 | 3538 | ||
| 3540 | ARGS is simply passed as the second argument to ELT_DESCRIBER. | 3539 | ARGS is simply passed as the second argument to ELT_DESCRIBER. |
| 3541 | 3540 | ||
| 3542 | INDICES and CHAR_TABLE_DEPTH are ignored. They will be removed in | ||
| 3543 | the near future. | ||
| 3544 | |||
| 3545 | KEYMAP_P is 1 if vector is known to be a keymap, so map ESC to M-. | 3541 | KEYMAP_P is 1 if vector is known to be a keymap, so map ESC to M-. |
| 3546 | 3542 | ||
| 3547 | ARGS is simply passed as the second argument to ELT_DESCRIBER. */ | 3543 | ARGS is simply passed as the second argument to ELT_DESCRIBER. */ |
| @@ -3550,8 +3546,7 @@ static void | |||
| 3550 | describe_vector (Lisp_Object vector, Lisp_Object prefix, Lisp_Object args, | 3546 | describe_vector (Lisp_Object vector, Lisp_Object prefix, Lisp_Object args, |
| 3551 | void (*elt_describer) (Lisp_Object, Lisp_Object), | 3547 | void (*elt_describer) (Lisp_Object, Lisp_Object), |
| 3552 | int partial, Lisp_Object shadow, Lisp_Object entire_map, | 3548 | int partial, Lisp_Object shadow, Lisp_Object entire_map, |
| 3553 | int *indices, int char_table_depth, int keymap_p, | 3549 | int keymap_p, int mention_shadow) |
| 3554 | int mention_shadow) | ||
| 3555 | { | 3550 | { |
| 3556 | Lisp_Object definition; | 3551 | Lisp_Object definition; |
| 3557 | Lisp_Object tem2; | 3552 | Lisp_Object tem2; |
diff --git a/src/lisp.h b/src/lisp.h index 9cbaf24cacf..bd70dcebbdb 100644 --- a/src/lisp.h +++ b/src/lisp.h | |||
| @@ -964,7 +964,7 @@ struct Lisp_Subr | |||
| 964 | Lisp_Object (*a7) (Lisp_Object, Lisp_Object, Lisp_Object, Lisp_Object, Lisp_Object, Lisp_Object, Lisp_Object); | 964 | Lisp_Object (*a7) (Lisp_Object, Lisp_Object, Lisp_Object, Lisp_Object, Lisp_Object, Lisp_Object, Lisp_Object); |
| 965 | Lisp_Object (*a8) (Lisp_Object, Lisp_Object, Lisp_Object, Lisp_Object, Lisp_Object, Lisp_Object, Lisp_Object, Lisp_Object); | 965 | Lisp_Object (*a8) (Lisp_Object, Lisp_Object, Lisp_Object, Lisp_Object, Lisp_Object, Lisp_Object, Lisp_Object, Lisp_Object); |
| 966 | Lisp_Object (*aUNEVALLED) (Lisp_Object args); | 966 | Lisp_Object (*aUNEVALLED) (Lisp_Object args); |
| 967 | Lisp_Object (*aMANY) (int, Lisp_Object *); | 967 | Lisp_Object (*aMANY) (size_t, Lisp_Object *); |
| 968 | } function; | 968 | } function; |
| 969 | short min_args, max_args; | 969 | short min_args, max_args; |
| 970 | const char *symbol_name; | 970 | const char *symbol_name; |
| @@ -1814,7 +1814,7 @@ typedef struct { | |||
| 1814 | 1814 | ||
| 1815 | /* Note that the weird token-substitution semantics of ANSI C makes | 1815 | /* Note that the weird token-substitution semantics of ANSI C makes |
| 1816 | this work for MANY and UNEVALLED. */ | 1816 | this work for MANY and UNEVALLED. */ |
| 1817 | #define DEFUN_ARGS_MANY (int, Lisp_Object *) | 1817 | #define DEFUN_ARGS_MANY (size_t, Lisp_Object *) |
| 1818 | #define DEFUN_ARGS_UNEVALLED (Lisp_Object) | 1818 | #define DEFUN_ARGS_UNEVALLED (Lisp_Object) |
| 1819 | #define DEFUN_ARGS_0 (void) | 1819 | #define DEFUN_ARGS_0 (void) |
| 1820 | #define DEFUN_ARGS_1 (Lisp_Object) | 1820 | #define DEFUN_ARGS_1 (Lisp_Object) |
| @@ -2084,7 +2084,7 @@ struct gcpro | |||
| 2084 | volatile Lisp_Object *var; | 2084 | volatile Lisp_Object *var; |
| 2085 | 2085 | ||
| 2086 | /* Number of consecutive protected variables. */ | 2086 | /* Number of consecutive protected variables. */ |
| 2087 | int nvars; | 2087 | size_t nvars; |
| 2088 | 2088 | ||
| 2089 | #ifdef DEBUG_GCPRO | 2089 | #ifdef DEBUG_GCPRO |
| 2090 | int level; | 2090 | int level; |
| @@ -2283,7 +2283,7 @@ void staticpro (Lisp_Object *); | |||
| 2283 | struct window; | 2283 | struct window; |
| 2284 | struct frame; | 2284 | struct frame; |
| 2285 | 2285 | ||
| 2286 | /* Defined in data.c */ | 2286 | /* Defined in data.c. */ |
| 2287 | extern Lisp_Object Qnil, Qt, Qquote, Qlambda, Qsubr, Qunbound; | 2287 | extern Lisp_Object Qnil, Qt, Qquote, Qlambda, Qsubr, Qunbound; |
| 2288 | extern Lisp_Object Qerror_conditions, Qerror_message, Qtop_level; | 2288 | extern Lisp_Object Qerror_conditions, Qerror_message, Qtop_level; |
| 2289 | extern Lisp_Object Qerror, Qquit, Qwrong_type_argument, Qargs_out_of_range; | 2289 | extern Lisp_Object Qerror, Qquit, Qwrong_type_argument, Qargs_out_of_range; |
| @@ -2408,7 +2408,7 @@ EXFUN (Fchar_width, 1); | |||
| 2408 | EXFUN (Fstring, MANY); | 2408 | EXFUN (Fstring, MANY); |
| 2409 | extern EMACS_INT chars_in_text (const unsigned char *, EMACS_INT); | 2409 | extern EMACS_INT chars_in_text (const unsigned char *, EMACS_INT); |
| 2410 | extern EMACS_INT multibyte_chars_in_text (const unsigned char *, EMACS_INT); | 2410 | extern EMACS_INT multibyte_chars_in_text (const unsigned char *, EMACS_INT); |
| 2411 | extern int multibyte_char_to_unibyte (int, Lisp_Object); | 2411 | extern int multibyte_char_to_unibyte (int); |
| 2412 | extern int multibyte_char_to_unibyte_safe (int); | 2412 | extern int multibyte_char_to_unibyte_safe (int); |
| 2413 | extern void init_character_once (void); | 2413 | extern void init_character_once (void); |
| 2414 | extern void syms_of_character (void); | 2414 | extern void syms_of_character (void); |
| @@ -2817,7 +2817,7 @@ extern void init_obarray (void); | |||
| 2817 | extern void init_lread (void); | 2817 | extern void init_lread (void); |
| 2818 | extern void syms_of_lread (void); | 2818 | extern void syms_of_lread (void); |
| 2819 | 2819 | ||
| 2820 | /* Defined in eval.c */ | 2820 | /* Defined in eval.c. */ |
| 2821 | extern Lisp_Object Qautoload, Qexit, Qinteractive, Qcommandp, Qdefun, Qmacro; | 2821 | extern Lisp_Object Qautoload, Qexit, Qinteractive, Qcommandp, Qdefun, Qmacro; |
| 2822 | extern Lisp_Object Qinhibit_quit, Qclosure; | 2822 | extern Lisp_Object Qinhibit_quit, Qclosure; |
| 2823 | extern Lisp_Object Vautoload_queue; | 2823 | extern Lisp_Object Vautoload_queue; |
| @@ -2835,6 +2835,9 @@ EXFUN (Frun_hooks, MANY); | |||
| 2835 | EXFUN (Frun_hook_with_args, MANY); | 2835 | EXFUN (Frun_hook_with_args, MANY); |
| 2836 | EXFUN (Frun_hook_with_args_until_failure, MANY); | 2836 | EXFUN (Frun_hook_with_args_until_failure, MANY); |
| 2837 | extern void run_hook_with_args_2 (Lisp_Object, Lisp_Object, Lisp_Object); | 2837 | extern void run_hook_with_args_2 (Lisp_Object, Lisp_Object, Lisp_Object); |
| 2838 | extern Lisp_Object run_hook_with_args (size_t nargs, Lisp_Object *args, | ||
| 2839 | Lisp_Object (*funcall) | ||
| 2840 | (size_t nargs, Lisp_Object *args)); | ||
| 2838 | EXFUN (Fprogn, UNEVALLED); | 2841 | EXFUN (Fprogn, UNEVALLED); |
| 2839 | EXFUN (Finteractive_p, 0); | 2842 | EXFUN (Finteractive_p, 0); |
| 2840 | EXFUN (Fthrow, 2) NO_RETURN; | 2843 | EXFUN (Fthrow, 2) NO_RETURN; |
| @@ -2867,7 +2870,7 @@ extern Lisp_Object internal_lisp_condition_case (Lisp_Object, Lisp_Object, Lisp_ | |||
| 2867 | extern Lisp_Object internal_condition_case (Lisp_Object (*) (void), Lisp_Object, Lisp_Object (*) (Lisp_Object)); | 2870 | extern Lisp_Object internal_condition_case (Lisp_Object (*) (void), Lisp_Object, Lisp_Object (*) (Lisp_Object)); |
| 2868 | extern Lisp_Object internal_condition_case_1 (Lisp_Object (*) (Lisp_Object), Lisp_Object, Lisp_Object, Lisp_Object (*) (Lisp_Object)); | 2871 | extern Lisp_Object internal_condition_case_1 (Lisp_Object (*) (Lisp_Object), Lisp_Object, Lisp_Object, Lisp_Object (*) (Lisp_Object)); |
| 2869 | extern Lisp_Object internal_condition_case_2 (Lisp_Object (*) (Lisp_Object, Lisp_Object), Lisp_Object, Lisp_Object, Lisp_Object, Lisp_Object (*) (Lisp_Object)); | 2872 | extern Lisp_Object internal_condition_case_2 (Lisp_Object (*) (Lisp_Object, Lisp_Object), Lisp_Object, Lisp_Object, Lisp_Object, Lisp_Object (*) (Lisp_Object)); |
| 2870 | extern Lisp_Object internal_condition_case_n (Lisp_Object (*) (int, Lisp_Object *), int, Lisp_Object *, Lisp_Object, Lisp_Object (*) (Lisp_Object)); | 2873 | extern Lisp_Object internal_condition_case_n (Lisp_Object (*) (size_t, Lisp_Object *), size_t, Lisp_Object *, Lisp_Object, Lisp_Object (*) (Lisp_Object)); |
| 2871 | extern void specbind (Lisp_Object, Lisp_Object); | 2874 | extern void specbind (Lisp_Object, Lisp_Object); |
| 2872 | extern void record_unwind_protect (Lisp_Object (*) (Lisp_Object), Lisp_Object); | 2875 | extern void record_unwind_protect (Lisp_Object (*) (Lisp_Object), Lisp_Object); |
| 2873 | extern Lisp_Object unbind_to (int, Lisp_Object); | 2876 | extern Lisp_Object unbind_to (int, Lisp_Object); |
| @@ -2877,7 +2880,7 @@ extern void do_autoload (Lisp_Object, Lisp_Object); | |||
| 2877 | extern Lisp_Object un_autoload (Lisp_Object); | 2880 | extern Lisp_Object un_autoload (Lisp_Object); |
| 2878 | EXFUN (Ffetch_bytecode, 1); | 2881 | EXFUN (Ffetch_bytecode, 1); |
| 2879 | extern void init_eval_once (void); | 2882 | extern void init_eval_once (void); |
| 2880 | extern Lisp_Object safe_call (int, Lisp_Object *); | 2883 | extern Lisp_Object safe_call (size_t, Lisp_Object *); |
| 2881 | extern Lisp_Object safe_call1 (Lisp_Object, Lisp_Object); | 2884 | extern Lisp_Object safe_call1 (Lisp_Object, Lisp_Object); |
| 2882 | extern Lisp_Object safe_call2 (Lisp_Object, Lisp_Object, Lisp_Object); | 2885 | extern Lisp_Object safe_call2 (Lisp_Object, Lisp_Object, Lisp_Object); |
| 2883 | extern void init_eval (void); | 2886 | extern void init_eval (void); |
| @@ -3188,7 +3191,7 @@ extern Lisp_Object decode_env_path (const char *, const char *); | |||
| 3188 | extern Lisp_Object empty_unibyte_string, empty_multibyte_string; | 3191 | extern Lisp_Object empty_unibyte_string, empty_multibyte_string; |
| 3189 | extern Lisp_Object Qfile_name_handler_alist; | 3192 | extern Lisp_Object Qfile_name_handler_alist; |
| 3190 | extern void (*fatal_error_signal_hook) (void); | 3193 | extern void (*fatal_error_signal_hook) (void); |
| 3191 | extern SIGTYPE fatal_error_signal (int); | 3194 | extern void fatal_error_signal (int); |
| 3192 | EXFUN (Fkill_emacs, 1) NO_RETURN; | 3195 | EXFUN (Fkill_emacs, 1) NO_RETURN; |
| 3193 | #if HAVE_SETLOCALE | 3196 | #if HAVE_SETLOCALE |
| 3194 | void fixup_locale (void); | 3197 | void fixup_locale (void); |
| @@ -3240,7 +3243,11 @@ extern void syms_of_process (void); | |||
| 3240 | extern void setup_process_coding_systems (Lisp_Object); | 3243 | extern void setup_process_coding_systems (Lisp_Object); |
| 3241 | 3244 | ||
| 3242 | EXFUN (Fcall_process, MANY); | 3245 | EXFUN (Fcall_process, MANY); |
| 3243 | extern int child_setup (int, int, int, char **, int, Lisp_Object); | 3246 | extern int child_setup (int, int, int, char **, int, Lisp_Object) |
| 3247 | #ifndef DOS_NT | ||
| 3248 | NO_RETURN | ||
| 3249 | #endif | ||
| 3250 | ; | ||
| 3244 | extern void init_callproc_1 (void); | 3251 | extern void init_callproc_1 (void); |
| 3245 | extern void init_callproc (void); | 3252 | extern void init_callproc (void); |
| 3246 | extern void set_initial_environment (void); | 3253 | extern void set_initial_environment (void); |
| @@ -3607,7 +3614,7 @@ extern Lisp_Object safe_alloca_unwind (Lisp_Object); | |||
| 3607 | else \ | 3614 | else \ |
| 3608 | { \ | 3615 | { \ |
| 3609 | buf = (type) xmalloc (size); \ | 3616 | buf = (type) xmalloc (size); \ |
| 3610 | sa_must_free++; \ | 3617 | sa_must_free = 1; \ |
| 3611 | record_unwind_protect (safe_alloca_unwind, \ | 3618 | record_unwind_protect (safe_alloca_unwind, \ |
| 3612 | make_save_value (buf, 0)); \ | 3619 | make_save_value (buf, 0)); \ |
| 3613 | } \ | 3620 | } \ |
| @@ -3637,7 +3644,7 @@ extern Lisp_Object safe_alloca_unwind (Lisp_Object); | |||
| 3637 | buf = (Lisp_Object *) xmalloc (size_); \ | 3644 | buf = (Lisp_Object *) xmalloc (size_); \ |
| 3638 | arg_ = make_save_value (buf, nelt); \ | 3645 | arg_ = make_save_value (buf, nelt); \ |
| 3639 | XSAVE_VALUE (arg_)->dogc = 1; \ | 3646 | XSAVE_VALUE (arg_)->dogc = 1; \ |
| 3640 | sa_must_free++; \ | 3647 | sa_must_free = 1; \ |
| 3641 | record_unwind_protect (safe_alloca_unwind, arg_); \ | 3648 | record_unwind_protect (safe_alloca_unwind, arg_); \ |
| 3642 | } \ | 3649 | } \ |
| 3643 | } while (0) | 3650 | } while (0) |
diff --git a/src/menu.c b/src/menu.c index 851f1ac804b..a9098deed7e 100644 --- a/src/menu.c +++ b/src/menu.c | |||
| @@ -662,13 +662,12 @@ digest_single_submenu (int start, int end, int top_level_items) | |||
| 662 | else if (EQ (XVECTOR (menu_items)->contents[i], Qt)) | 662 | else if (EQ (XVECTOR (menu_items)->contents[i], Qt)) |
| 663 | { | 663 | { |
| 664 | /* Create a new pane. */ | 664 | /* Create a new pane. */ |
| 665 | Lisp_Object pane_name, prefix; | 665 | Lisp_Object pane_name; |
| 666 | const char *pane_string; | 666 | const char *pane_string; |
| 667 | 667 | ||
| 668 | panes_seen++; | 668 | panes_seen++; |
| 669 | 669 | ||
| 670 | pane_name = XVECTOR (menu_items)->contents[i + MENU_ITEMS_PANE_NAME]; | 670 | pane_name = XVECTOR (menu_items)->contents[i + MENU_ITEMS_PANE_NAME]; |
| 671 | prefix = XVECTOR (menu_items)->contents[i + MENU_ITEMS_PANE_PREFIX]; | ||
| 672 | 671 | ||
| 673 | #ifdef HAVE_NTGUI | 672 | #ifdef HAVE_NTGUI |
| 674 | if (STRINGP (pane_name)) | 673 | if (STRINGP (pane_name)) |
diff --git a/src/minibuf.c b/src/minibuf.c index 986765ae6fb..4adf665f8f4 100644 --- a/src/minibuf.c +++ b/src/minibuf.c | |||
| @@ -649,12 +649,7 @@ read_minibuf (Lisp_Object map, Lisp_Object initial, Lisp_Object prompt, | |||
| 649 | if (STRINGP (input_method) && !NILP (Ffboundp (Qactivate_input_method))) | 649 | if (STRINGP (input_method) && !NILP (Ffboundp (Qactivate_input_method))) |
| 650 | call1 (Qactivate_input_method, input_method); | 650 | call1 (Qactivate_input_method, input_method); |
| 651 | 651 | ||
| 652 | /* Run our hook, but not if it is empty. | 652 | Frun_hooks (1, &Qminibuffer_setup_hook); |
| 653 | (run-hooks would do nothing if it is empty, | ||
| 654 | but it's important to save time here in the usual case.) */ | ||
| 655 | if (!NILP (Vminibuffer_setup_hook) && !EQ (Vminibuffer_setup_hook, Qunbound) | ||
| 656 | && !NILP (Vrun_hooks)) | ||
| 657 | call1 (Vrun_hooks, Qminibuffer_setup_hook); | ||
| 658 | 653 | ||
| 659 | /* Don't allow the user to undo past this point. */ | 654 | /* Don't allow the user to undo past this point. */ |
| 660 | BVAR (current_buffer, undo_list) = Qnil; | 655 | BVAR (current_buffer, undo_list) = Qnil; |
| @@ -806,10 +801,7 @@ get_minibuffer (int depth) | |||
| 806 | static Lisp_Object | 801 | static Lisp_Object |
| 807 | run_exit_minibuf_hook (Lisp_Object data) | 802 | run_exit_minibuf_hook (Lisp_Object data) |
| 808 | { | 803 | { |
| 809 | if (!NILP (Vminibuffer_exit_hook) && !EQ (Vminibuffer_exit_hook, Qunbound) | 804 | safe_run_hooks (Qminibuffer_exit_hook); |
| 810 | && !NILP (Vrun_hooks)) | ||
| 811 | safe_run_hooks (Qminibuffer_exit_hook); | ||
| 812 | |||
| 813 | return Qnil; | 805 | return Qnil; |
| 814 | } | 806 | } |
| 815 | 807 | ||
diff --git a/src/nsmenu.m b/src/nsmenu.m index e8d4a256906..623c933ce8e 100644 --- a/src/nsmenu.m +++ b/src/nsmenu.m | |||
| @@ -1705,7 +1705,6 @@ void process_dialog (id window, Lisp_Object list) | |||
| 1705 | - (Lisp_Object)runDialogAt: (NSPoint)p | 1705 | - (Lisp_Object)runDialogAt: (NSPoint)p |
| 1706 | { | 1706 | { |
| 1707 | NSInteger ret; | 1707 | NSInteger ret; |
| 1708 | extern EMACS_TIME timer_check (int do_it_now); /* TODO: add to a header */ | ||
| 1709 | 1708 | ||
| 1710 | /* initiate a session that will be ended by pop_down_menu */ | 1709 | /* initiate a session that will be ended by pop_down_menu */ |
| 1711 | popupSession = [NSApp beginModalSessionForWindow: self]; | 1710 | popupSession = [NSApp beginModalSessionForWindow: self]; |
| @@ -1715,7 +1714,7 @@ void process_dialog (id window, Lisp_Object list) | |||
| 1715 | { | 1714 | { |
| 1716 | /* Run this for timers.el, indep of atimers; might not return. | 1715 | /* Run this for timers.el, indep of atimers; might not return. |
| 1717 | TODO: use return value to avoid calling every iteration. */ | 1716 | TODO: use return value to avoid calling every iteration. */ |
| 1718 | timer_check (1); | 1717 | timer_check (); |
| 1719 | [NSThread sleepUntilDate: [NSDate dateWithTimeIntervalSinceNow: 0.1]]; | 1718 | [NSThread sleepUntilDate: [NSDate dateWithTimeIntervalSinceNow: 0.1]]; |
| 1720 | } | 1719 | } |
| 1721 | 1720 | ||
diff --git a/src/nsterm.m b/src/nsterm.m index c7cd411c614..91f0cbba585 100644 --- a/src/nsterm.m +++ b/src/nsterm.m | |||
| @@ -170,6 +170,7 @@ BOOL ns_in_resize = NO; | |||
| 170 | static BOOL ns_fake_keydown = NO; | 170 | static BOOL ns_fake_keydown = NO; |
| 171 | int ns_tmp_flags; /* FIXME */ | 171 | int ns_tmp_flags; /* FIXME */ |
| 172 | struct nsfont_info *ns_tmp_font; /* FIXME */ | 172 | struct nsfont_info *ns_tmp_font; /* FIXME */ |
| 173 | static BOOL ns_menu_bar_is_hidden = NO; | ||
| 173 | /*static int debug_lock = 0; */ | 174 | /*static int debug_lock = 0; */ |
| 174 | 175 | ||
| 175 | /* event loop */ | 176 | /* event loop */ |
| @@ -505,6 +506,118 @@ ns_resize_handle_rect (NSWindow *window) | |||
| 505 | } | 506 | } |
| 506 | 507 | ||
| 507 | 508 | ||
| 509 | // | ||
| 510 | // Window constraining | ||
| 511 | // ------------------- | ||
| 512 | // | ||
| 513 | // To ensure that the windows are not placed under the menu bar, they | ||
| 514 | // are typically moved by the call-back constrainFrameRect. However, | ||
| 515 | // by overriding it, it's possible to inhibit this, leaving the window | ||
| 516 | // in it's original position. | ||
| 517 | // | ||
| 518 | // It's possible to hide the menu bar. However, technically, it's only | ||
| 519 | // possible to hide it when the application is active. To ensure that | ||
| 520 | // this work properly, the menu bar and window constraining are | ||
| 521 | // deferred until the application becomes active. | ||
| 522 | // | ||
| 523 | // Even though it's not possible to manually move a window above the | ||
| 524 | // top of the screen, it is allowed if it's done programmatically, | ||
| 525 | // when the menu is hidden. This allows the editable area to cover the | ||
| 526 | // full screen height. | ||
| 527 | // | ||
| 528 | // Test cases | ||
| 529 | // ---------- | ||
| 530 | // | ||
| 531 | // Use the following extra files: | ||
| 532 | // | ||
| 533 | // init.el: | ||
| 534 | // ;; Hide menu and place frame slightly above the top of the screen. | ||
| 535 | // (setq ns-auto-hide-menu-bar t) | ||
| 536 | // (set-frame-position (selected-frame) 0 -20) | ||
| 537 | // | ||
| 538 | // Test 1: | ||
| 539 | // | ||
| 540 | // emacs -Q -l init.el | ||
| 541 | // | ||
| 542 | // Result: No menu bar, and the title bar should be above the screen. | ||
| 543 | // | ||
| 544 | // Test 2: | ||
| 545 | // | ||
| 546 | // emacs -Q | ||
| 547 | // | ||
| 548 | // Result: Menu bar visible, frame placed immediately below the menu. | ||
| 549 | // | ||
| 550 | |||
| 551 | static void | ||
| 552 | ns_constrain_all_frames (void) | ||
| 553 | { | ||
| 554 | Lisp_Object tail, frame; | ||
| 555 | |||
| 556 | FOR_EACH_FRAME (tail, frame) | ||
| 557 | { | ||
| 558 | struct frame *f = XFRAME (frame); | ||
| 559 | if (FRAME_NS_P (f)) | ||
| 560 | { | ||
| 561 | NSView *view = FRAME_NS_VIEW (f); | ||
| 562 | /* This no-op will trigger the default window placing | ||
| 563 | * constriant system. */ | ||
| 564 | f->output_data.ns->dont_constrain = 0; | ||
| 565 | [[view window] setFrameOrigin:[[view window] frame].origin]; | ||
| 566 | } | ||
| 567 | } | ||
| 568 | } | ||
| 569 | |||
| 570 | |||
| 571 | /* True, if the menu bar should be hidden. */ | ||
| 572 | |||
| 573 | static BOOL | ||
| 574 | ns_menu_bar_should_be_hidden (void) | ||
| 575 | { | ||
| 576 | return !NILP (ns_auto_hide_menu_bar) | ||
| 577 | && [NSApp respondsToSelector:@selector(setPresentationOptions:)]; | ||
| 578 | } | ||
| 579 | |||
| 580 | |||
| 581 | /* Show or hide the menu bar, based on user setting. */ | ||
| 582 | |||
| 583 | static void | ||
| 584 | ns_update_auto_hide_menu_bar (void) | ||
| 585 | { | ||
| 586 | BLOCK_INPUT; | ||
| 587 | |||
| 588 | NSTRACE (ns_update_auto_hide_menu_bar); | ||
| 589 | |||
| 590 | if (NSApp != nil | ||
| 591 | && [NSApp isActive] | ||
| 592 | && [NSApp respondsToSelector:@selector(setPresentationOptions:)]) | ||
| 593 | { | ||
| 594 | // Note, "setPresentationOptions" triggers an error unless the | ||
| 595 | // application is active. | ||
| 596 | BOOL menu_bar_should_be_hidden = ns_menu_bar_should_be_hidden (); | ||
| 597 | |||
| 598 | if (menu_bar_should_be_hidden != ns_menu_bar_is_hidden) | ||
| 599 | { | ||
| 600 | NSApplicationPresentationOptions options | ||
| 601 | = NSApplicationPresentationAutoHideDock; | ||
| 602 | |||
| 603 | if (menu_bar_should_be_hidden) | ||
| 604 | options |= NSApplicationPresentationAutoHideMenuBar; | ||
| 605 | |||
| 606 | [NSApp setPresentationOptions: options]; | ||
| 607 | |||
| 608 | ns_menu_bar_is_hidden = menu_bar_should_be_hidden; | ||
| 609 | |||
| 610 | if (!ns_menu_bar_is_hidden) | ||
| 611 | { | ||
| 612 | ns_constrain_all_frames (); | ||
| 613 | } | ||
| 614 | } | ||
| 615 | } | ||
| 616 | |||
| 617 | UNBLOCK_INPUT; | ||
| 618 | } | ||
| 619 | |||
| 620 | |||
| 508 | static void | 621 | static void |
| 509 | ns_update_begin (struct frame *f) | 622 | ns_update_begin (struct frame *f) |
| 510 | /* -------------------------------------------------------------------------- | 623 | /* -------------------------------------------------------------------------- |
| @@ -515,6 +628,8 @@ ns_update_begin (struct frame *f) | |||
| 515 | NSView *view = FRAME_NS_VIEW (f); | 628 | NSView *view = FRAME_NS_VIEW (f); |
| 516 | NSTRACE (ns_update_begin); | 629 | NSTRACE (ns_update_begin); |
| 517 | 630 | ||
| 631 | ns_update_auto_hide_menu_bar (); | ||
| 632 | |||
| 518 | ns_updating_frame = f; | 633 | ns_updating_frame = f; |
| 519 | [view lockFocus]; | 634 | [view lockFocus]; |
| 520 | 635 | ||
| @@ -4205,7 +4320,13 @@ ns_term_shutdown (int sig) | |||
| 4205 | } | 4320 | } |
| 4206 | - (void)applicationDidBecomeActive: (NSNotification *)notification | 4321 | - (void)applicationDidBecomeActive: (NSNotification *)notification |
| 4207 | { | 4322 | { |
| 4323 | NSTRACE (applicationDidBecomeActive); | ||
| 4324 | |||
| 4208 | //ns_app_active=YES; | 4325 | //ns_app_active=YES; |
| 4326 | |||
| 4327 | ns_update_auto_hide_menu_bar (); | ||
| 4328 | // No constrining takes place when the application is not active. | ||
| 4329 | ns_constrain_all_frames (); | ||
| 4209 | } | 4330 | } |
| 4210 | - (void)applicationDidResignActive: (NSNotification *)notification | 4331 | - (void)applicationDidResignActive: (NSNotification *)notification |
| 4211 | { | 4332 | { |
| @@ -5689,7 +5810,10 @@ ns_term_shutdown (int sig) | |||
| 5689 | /* When making the frame visible for the first time, we want to | 5810 | /* When making the frame visible for the first time, we want to |
| 5690 | constrain. Other times not. */ | 5811 | constrain. Other times not. */ |
| 5691 | struct frame *f = ((EmacsView *)[self delegate])->emacsframe; | 5812 | struct frame *f = ((EmacsView *)[self delegate])->emacsframe; |
| 5692 | if (f->output_data.ns->dont_constrain) | 5813 | NSTRACE (constrainFrameRect); |
| 5814 | |||
| 5815 | if (f->output_data.ns->dont_constrain | ||
| 5816 | || ns_menu_bar_should_be_hidden ()) | ||
| 5693 | return frameRect; | 5817 | return frameRect; |
| 5694 | 5818 | ||
| 5695 | f->output_data.ns->dont_constrain = 1; | 5819 | f->output_data.ns->dont_constrain = 1; |
| @@ -6361,6 +6485,11 @@ allowing it to be used at a lower level for accented character entry."); | |||
| 6361 | staticpro (&last_mouse_motion_frame); | 6485 | staticpro (&last_mouse_motion_frame); |
| 6362 | last_mouse_motion_frame = Qnil; | 6486 | last_mouse_motion_frame = Qnil; |
| 6363 | 6487 | ||
| 6488 | DEFVAR_LISP ("ns-auto-hide-menu-bar", ns_auto_hide_menu_bar, | ||
| 6489 | doc: /* Non-nil means that the menu bar is hidden, but appears when the mouse is near. | ||
| 6490 | Only works on OSX 10.6 or later. */); | ||
| 6491 | ns_auto_hide_menu_bar = Qnil; | ||
| 6492 | |||
| 6364 | /* TODO: move to common code */ | 6493 | /* TODO: move to common code */ |
| 6365 | DEFVAR_LISP ("x-toolkit-scroll-bars", Vx_toolkit_scroll_bars, | 6494 | DEFVAR_LISP ("x-toolkit-scroll-bars", Vx_toolkit_scroll_bars, |
| 6366 | doc: /* If not nil, Emacs uses toolkit scroll bars. */); | 6495 | doc: /* If not nil, Emacs uses toolkit scroll bars. */); |
diff --git a/src/print.c b/src/print.c index b8266422473..17a896bba8d 100644 --- a/src/print.c +++ b/src/print.c | |||
| @@ -273,7 +273,7 @@ printchar (unsigned int ch, Lisp_Object fun) | |||
| 273 | 273 | ||
| 274 | static void | 274 | static void |
| 275 | strout (const char *ptr, EMACS_INT size, EMACS_INT size_byte, | 275 | strout (const char *ptr, EMACS_INT size, EMACS_INT size_byte, |
| 276 | Lisp_Object printcharfun, int multibyte) | 276 | Lisp_Object printcharfun) |
| 277 | { | 277 | { |
| 278 | if (size < 0) | 278 | if (size < 0) |
| 279 | size_byte = size = strlen (ptr); | 279 | size_byte = size = strlen (ptr); |
| @@ -406,16 +406,13 @@ print_string (Lisp_Object string, Lisp_Object printcharfun) | |||
| 406 | SAFE_ALLOCA (buffer, char *, nbytes); | 406 | SAFE_ALLOCA (buffer, char *, nbytes); |
| 407 | memcpy (buffer, SDATA (string), nbytes); | 407 | memcpy (buffer, SDATA (string), nbytes); |
| 408 | 408 | ||
| 409 | strout (buffer, chars, SBYTES (string), | 409 | strout (buffer, chars, SBYTES (string), printcharfun); |
| 410 | printcharfun, STRING_MULTIBYTE (string)); | ||
| 411 | 410 | ||
| 412 | SAFE_FREE (); | 411 | SAFE_FREE (); |
| 413 | } | 412 | } |
| 414 | else | 413 | else |
| 415 | /* No need to copy, since output to print_buffer can't GC. */ | 414 | /* No need to copy, since output to print_buffer can't GC. */ |
| 416 | strout (SSDATA (string), | 415 | strout (SSDATA (string), chars, SBYTES (string), printcharfun); |
| 417 | chars, SBYTES (string), | ||
| 418 | printcharfun, STRING_MULTIBYTE (string)); | ||
| 419 | } | 416 | } |
| 420 | else | 417 | else |
| 421 | { | 418 | { |
| @@ -472,7 +469,7 @@ write_string (const char *data, int size) | |||
| 472 | printcharfun = Vstandard_output; | 469 | printcharfun = Vstandard_output; |
| 473 | 470 | ||
| 474 | PRINTPREPARE; | 471 | PRINTPREPARE; |
| 475 | strout (data, size, size, printcharfun, 0); | 472 | strout (data, size, size, printcharfun); |
| 476 | PRINTFINISH; | 473 | PRINTFINISH; |
| 477 | } | 474 | } |
| 478 | 475 | ||
| @@ -486,7 +483,7 @@ write_string_1 (const char *data, int size, Lisp_Object printcharfun) | |||
| 486 | PRINTDECLARE; | 483 | PRINTDECLARE; |
| 487 | 484 | ||
| 488 | PRINTPREPARE; | 485 | PRINTPREPARE; |
| 489 | strout (data, size, size, printcharfun, 0); | 486 | strout (data, size, size, printcharfun); |
| 490 | PRINTFINISH; | 487 | PRINTFINISH; |
| 491 | } | 488 | } |
| 492 | 489 | ||
| @@ -1351,7 +1348,7 @@ print_object (Lisp_Object obj, register Lisp_Object printcharfun, int escapeflag | |||
| 1351 | if (EQ (obj, being_printed[i])) | 1348 | if (EQ (obj, being_printed[i])) |
| 1352 | { | 1349 | { |
| 1353 | sprintf (buf, "#%d", i); | 1350 | sprintf (buf, "#%d", i); |
| 1354 | strout (buf, -1, -1, printcharfun, 0); | 1351 | strout (buf, -1, -1, printcharfun); |
| 1355 | return; | 1352 | return; |
| 1356 | } | 1353 | } |
| 1357 | being_printed[print_depth] = obj; | 1354 | being_printed[print_depth] = obj; |
| @@ -1367,7 +1364,7 @@ print_object (Lisp_Object obj, register Lisp_Object printcharfun, int escapeflag | |||
| 1367 | { /* Add a prefix #n= if OBJ has not yet been printed; | 1364 | { /* Add a prefix #n= if OBJ has not yet been printed; |
| 1368 | that is, its status field is nil. */ | 1365 | that is, its status field is nil. */ |
| 1369 | sprintf (buf, "#%d=", -n); | 1366 | sprintf (buf, "#%d=", -n); |
| 1370 | strout (buf, -1, -1, printcharfun, 0); | 1367 | strout (buf, -1, -1, printcharfun); |
| 1371 | /* OBJ is going to be printed. Remember that fact. */ | 1368 | /* OBJ is going to be printed. Remember that fact. */ |
| 1372 | Fputhash (obj, make_number (- n), Vprint_number_table); | 1369 | Fputhash (obj, make_number (- n), Vprint_number_table); |
| 1373 | } | 1370 | } |
| @@ -1375,7 +1372,7 @@ print_object (Lisp_Object obj, register Lisp_Object printcharfun, int escapeflag | |||
| 1375 | { | 1372 | { |
| 1376 | /* Just print #n# if OBJ has already been printed. */ | 1373 | /* Just print #n# if OBJ has already been printed. */ |
| 1377 | sprintf (buf, "#%d#", n); | 1374 | sprintf (buf, "#%d#", n); |
| 1378 | strout (buf, -1, -1, printcharfun, 0); | 1375 | strout (buf, -1, -1, printcharfun); |
| 1379 | return; | 1376 | return; |
| 1380 | } | 1377 | } |
| 1381 | } | 1378 | } |
| @@ -1393,7 +1390,7 @@ print_object (Lisp_Object obj, register Lisp_Object printcharfun, int escapeflag | |||
| 1393 | sprintf (buf, "%ld", (long) XINT (obj)); | 1390 | sprintf (buf, "%ld", (long) XINT (obj)); |
| 1394 | else | 1391 | else |
| 1395 | abort (); | 1392 | abort (); |
| 1396 | strout (buf, -1, -1, printcharfun, 0); | 1393 | strout (buf, -1, -1, printcharfun); |
| 1397 | break; | 1394 | break; |
| 1398 | 1395 | ||
| 1399 | case Lisp_Float: | 1396 | case Lisp_Float: |
| @@ -1401,7 +1398,7 @@ print_object (Lisp_Object obj, register Lisp_Object printcharfun, int escapeflag | |||
| 1401 | char pigbuf[FLOAT_TO_STRING_BUFSIZE]; | 1398 | char pigbuf[FLOAT_TO_STRING_BUFSIZE]; |
| 1402 | 1399 | ||
| 1403 | float_to_string (pigbuf, XFLOAT_DATA (obj)); | 1400 | float_to_string (pigbuf, XFLOAT_DATA (obj)); |
| 1404 | strout (pigbuf, -1, -1, printcharfun, 0); | 1401 | strout (pigbuf, -1, -1, printcharfun); |
| 1405 | } | 1402 | } |
| 1406 | break; | 1403 | break; |
| 1407 | 1404 | ||
| @@ -1479,7 +1476,7 @@ print_object (Lisp_Object obj, register Lisp_Object printcharfun, int escapeflag | |||
| 1479 | sprintf (outbuf, "\\x%04x", c); | 1476 | sprintf (outbuf, "\\x%04x", c); |
| 1480 | need_nonhex = 1; | 1477 | need_nonhex = 1; |
| 1481 | } | 1478 | } |
| 1482 | strout (outbuf, -1, -1, printcharfun, 0); | 1479 | strout (outbuf, -1, -1, printcharfun); |
| 1483 | } | 1480 | } |
| 1484 | else if (! multibyte | 1481 | else if (! multibyte |
| 1485 | && SINGLE_BYTE_CHAR_P (c) && ! ASCII_BYTE_P (c) | 1482 | && SINGLE_BYTE_CHAR_P (c) && ! ASCII_BYTE_P (c) |
| @@ -1491,7 +1488,7 @@ print_object (Lisp_Object obj, register Lisp_Object printcharfun, int escapeflag | |||
| 1491 | using octal escapes. */ | 1488 | using octal escapes. */ |
| 1492 | char outbuf[5]; | 1489 | char outbuf[5]; |
| 1493 | sprintf (outbuf, "\\%03o", c); | 1490 | sprintf (outbuf, "\\%03o", c); |
| 1494 | strout (outbuf, -1, -1, printcharfun, 0); | 1491 | strout (outbuf, -1, -1, printcharfun); |
| 1495 | } | 1492 | } |
| 1496 | else | 1493 | else |
| 1497 | { | 1494 | { |
| @@ -1504,7 +1501,7 @@ print_object (Lisp_Object obj, register Lisp_Object printcharfun, int escapeflag | |||
| 1504 | if ((c >= 'a' && c <= 'f') | 1501 | if ((c >= 'a' && c <= 'f') |
| 1505 | || (c >= 'A' && c <= 'F') | 1502 | || (c >= 'A' && c <= 'F') |
| 1506 | || (c >= '0' && c <= '9')) | 1503 | || (c >= '0' && c <= '9')) |
| 1507 | strout ("\\ ", -1, -1, printcharfun, 0); | 1504 | strout ("\\ ", -1, -1, printcharfun); |
| 1508 | } | 1505 | } |
| 1509 | 1506 | ||
| 1510 | if (c == '\"' || c == '\\') | 1507 | if (c == '\"' || c == '\\') |
| @@ -1592,7 +1589,7 @@ print_object (Lisp_Object obj, register Lisp_Object printcharfun, int escapeflag | |||
| 1592 | /* If deeper than spec'd depth, print placeholder. */ | 1589 | /* If deeper than spec'd depth, print placeholder. */ |
| 1593 | if (INTEGERP (Vprint_level) | 1590 | if (INTEGERP (Vprint_level) |
| 1594 | && print_depth > XINT (Vprint_level)) | 1591 | && print_depth > XINT (Vprint_level)) |
| 1595 | strout ("...", -1, -1, printcharfun, 0); | 1592 | strout ("...", -1, -1, printcharfun); |
| 1596 | else if (print_quoted && CONSP (XCDR (obj)) && NILP (XCDR (XCDR (obj))) | 1593 | else if (print_quoted && CONSP (XCDR (obj)) && NILP (XCDR (XCDR (obj))) |
| 1597 | && (EQ (XCAR (obj), Qquote))) | 1594 | && (EQ (XCAR (obj), Qquote))) |
| 1598 | { | 1595 | { |
| @@ -1652,7 +1649,7 @@ print_object (Lisp_Object obj, register Lisp_Object printcharfun, int escapeflag | |||
| 1652 | if (i != 0 && EQ (obj, halftail)) | 1649 | if (i != 0 && EQ (obj, halftail)) |
| 1653 | { | 1650 | { |
| 1654 | sprintf (buf, " . #%d", i / 2); | 1651 | sprintf (buf, " . #%d", i / 2); |
| 1655 | strout (buf, -1, -1, printcharfun, 0); | 1652 | strout (buf, -1, -1, printcharfun); |
| 1656 | goto end_of_list; | 1653 | goto end_of_list; |
| 1657 | } | 1654 | } |
| 1658 | } | 1655 | } |
| @@ -1664,7 +1661,7 @@ print_object (Lisp_Object obj, register Lisp_Object printcharfun, int escapeflag | |||
| 1664 | Lisp_Object num = Fgethash (obj, Vprint_number_table, Qnil); | 1661 | Lisp_Object num = Fgethash (obj, Vprint_number_table, Qnil); |
| 1665 | if (INTEGERP (num)) | 1662 | if (INTEGERP (num)) |
| 1666 | { | 1663 | { |
| 1667 | strout (" . ", 3, 3, printcharfun, 0); | 1664 | strout (" . ", 3, 3, printcharfun); |
| 1668 | print_object (obj, printcharfun, escapeflag); | 1665 | print_object (obj, printcharfun, escapeflag); |
| 1669 | goto end_of_list; | 1666 | goto end_of_list; |
| 1670 | } | 1667 | } |
| @@ -1676,7 +1673,7 @@ print_object (Lisp_Object obj, register Lisp_Object printcharfun, int escapeflag | |||
| 1676 | 1673 | ||
| 1677 | if (print_length && i > print_length) | 1674 | if (print_length && i > print_length) |
| 1678 | { | 1675 | { |
| 1679 | strout ("...", 3, 3, printcharfun, 0); | 1676 | strout ("...", 3, 3, printcharfun); |
| 1680 | goto end_of_list; | 1677 | goto end_of_list; |
| 1681 | } | 1678 | } |
| 1682 | 1679 | ||
| @@ -1691,7 +1688,7 @@ print_object (Lisp_Object obj, register Lisp_Object printcharfun, int escapeflag | |||
| 1691 | /* OBJ non-nil here means it's the end of a dotted list. */ | 1688 | /* OBJ non-nil here means it's the end of a dotted list. */ |
| 1692 | if (!NILP (obj)) | 1689 | if (!NILP (obj)) |
| 1693 | { | 1690 | { |
| 1694 | strout (" . ", 3, 3, printcharfun, 0); | 1691 | strout (" . ", 3, 3, printcharfun); |
| 1695 | print_object (obj, printcharfun, escapeflag); | 1692 | print_object (obj, printcharfun, escapeflag); |
| 1696 | } | 1693 | } |
| 1697 | 1694 | ||
| @@ -1705,7 +1702,7 @@ print_object (Lisp_Object obj, register Lisp_Object printcharfun, int escapeflag | |||
| 1705 | { | 1702 | { |
| 1706 | if (escapeflag) | 1703 | if (escapeflag) |
| 1707 | { | 1704 | { |
| 1708 | strout ("#<process ", -1, -1, printcharfun, 0); | 1705 | strout ("#<process ", -1, -1, printcharfun); |
| 1709 | print_string (XPROCESS (obj)->name, printcharfun); | 1706 | print_string (XPROCESS (obj)->name, printcharfun); |
| 1710 | PRINTCHAR ('>'); | 1707 | PRINTCHAR ('>'); |
| 1711 | } | 1708 | } |
| @@ -1726,7 +1723,7 @@ print_object (Lisp_Object obj, register Lisp_Object printcharfun, int escapeflag | |||
| 1726 | PRINTCHAR ('#'); | 1723 | PRINTCHAR ('#'); |
| 1727 | PRINTCHAR ('&'); | 1724 | PRINTCHAR ('&'); |
| 1728 | sprintf (buf, "%ld", (long) XBOOL_VECTOR (obj)->size); | 1725 | sprintf (buf, "%ld", (long) XBOOL_VECTOR (obj)->size); |
| 1729 | strout (buf, -1, -1, printcharfun, 0); | 1726 | strout (buf, -1, -1, printcharfun); |
| 1730 | PRINTCHAR ('\"'); | 1727 | PRINTCHAR ('\"'); |
| 1731 | 1728 | ||
| 1732 | /* Don't print more characters than the specified maximum. | 1729 | /* Don't print more characters than the specified maximum. |
| @@ -1771,18 +1768,18 @@ print_object (Lisp_Object obj, register Lisp_Object printcharfun, int escapeflag | |||
| 1771 | } | 1768 | } |
| 1772 | else if (SUBRP (obj)) | 1769 | else if (SUBRP (obj)) |
| 1773 | { | 1770 | { |
| 1774 | strout ("#<subr ", -1, -1, printcharfun, 0); | 1771 | strout ("#<subr ", -1, -1, printcharfun); |
| 1775 | strout (XSUBR (obj)->symbol_name, -1, -1, printcharfun, 0); | 1772 | strout (XSUBR (obj)->symbol_name, -1, -1, printcharfun); |
| 1776 | PRINTCHAR ('>'); | 1773 | PRINTCHAR ('>'); |
| 1777 | } | 1774 | } |
| 1778 | else if (WINDOWP (obj)) | 1775 | else if (WINDOWP (obj)) |
| 1779 | { | 1776 | { |
| 1780 | strout ("#<window ", -1, -1, printcharfun, 0); | 1777 | strout ("#<window ", -1, -1, printcharfun); |
| 1781 | sprintf (buf, "%ld", (long) XFASTINT (XWINDOW (obj)->sequence_number)); | 1778 | sprintf (buf, "%ld", (long) XFASTINT (XWINDOW (obj)->sequence_number)); |
| 1782 | strout (buf, -1, -1, printcharfun, 0); | 1779 | strout (buf, -1, -1, printcharfun); |
| 1783 | if (!NILP (XWINDOW (obj)->buffer)) | 1780 | if (!NILP (XWINDOW (obj)->buffer)) |
| 1784 | { | 1781 | { |
| 1785 | strout (" on ", -1, -1, printcharfun, 0); | 1782 | strout (" on ", -1, -1, printcharfun); |
| 1786 | print_string (BVAR (XBUFFER (XWINDOW (obj)->buffer), name), printcharfun); | 1783 | print_string (BVAR (XBUFFER (XWINDOW (obj)->buffer), name), printcharfun); |
| 1787 | } | 1784 | } |
| 1788 | PRINTCHAR ('>'); | 1785 | PRINTCHAR ('>'); |
| @@ -1790,13 +1787,13 @@ print_object (Lisp_Object obj, register Lisp_Object printcharfun, int escapeflag | |||
| 1790 | else if (TERMINALP (obj)) | 1787 | else if (TERMINALP (obj)) |
| 1791 | { | 1788 | { |
| 1792 | struct terminal *t = XTERMINAL (obj); | 1789 | struct terminal *t = XTERMINAL (obj); |
| 1793 | strout ("#<terminal ", -1, -1, printcharfun, 0); | 1790 | strout ("#<terminal ", -1, -1, printcharfun); |
| 1794 | sprintf (buf, "%d", t->id); | 1791 | sprintf (buf, "%d", t->id); |
| 1795 | strout (buf, -1, -1, printcharfun, 0); | 1792 | strout (buf, -1, -1, printcharfun); |
| 1796 | if (t->name) | 1793 | if (t->name) |
| 1797 | { | 1794 | { |
| 1798 | strout (" on ", -1, -1, printcharfun, 0); | 1795 | strout (" on ", -1, -1, printcharfun); |
| 1799 | strout (t->name, -1, -1, printcharfun, 0); | 1796 | strout (t->name, -1, -1, printcharfun); |
| 1800 | } | 1797 | } |
| 1801 | PRINTCHAR ('>'); | 1798 | PRINTCHAR ('>'); |
| 1802 | } | 1799 | } |
| @@ -1806,21 +1803,21 @@ print_object (Lisp_Object obj, register Lisp_Object printcharfun, int escapeflag | |||
| 1806 | int i; | 1803 | int i; |
| 1807 | EMACS_INT real_size, size; | 1804 | EMACS_INT real_size, size; |
| 1808 | #if 0 | 1805 | #if 0 |
| 1809 | strout ("#<hash-table", -1, -1, printcharfun, 0); | 1806 | strout ("#<hash-table", -1, -1, printcharfun); |
| 1810 | if (SYMBOLP (h->test)) | 1807 | if (SYMBOLP (h->test)) |
| 1811 | { | 1808 | { |
| 1812 | PRINTCHAR (' '); | 1809 | PRINTCHAR (' '); |
| 1813 | PRINTCHAR ('\''); | 1810 | PRINTCHAR ('\''); |
| 1814 | strout (SDATA (SYMBOL_NAME (h->test)), -1, -1, printcharfun, 0); | 1811 | strout (SDATA (SYMBOL_NAME (h->test)), -1, -1, printcharfun); |
| 1815 | PRINTCHAR (' '); | 1812 | PRINTCHAR (' '); |
| 1816 | strout (SDATA (SYMBOL_NAME (h->weak)), -1, -1, printcharfun, 0); | 1813 | strout (SDATA (SYMBOL_NAME (h->weak)), -1, -1, printcharfun); |
| 1817 | PRINTCHAR (' '); | 1814 | PRINTCHAR (' '); |
| 1818 | sprintf (buf, "%ld/%ld", (long) h->count, | 1815 | sprintf (buf, "%ld/%ld", (long) h->count, |
| 1819 | (long) XVECTOR (h->next)->size); | 1816 | (long) XVECTOR (h->next)->size); |
| 1820 | strout (buf, -1, -1, printcharfun, 0); | 1817 | strout (buf, -1, -1, printcharfun); |
| 1821 | } | 1818 | } |
| 1822 | sprintf (buf, " 0x%lx", (unsigned long) h); | 1819 | sprintf (buf, " 0x%lx", (unsigned long) h); |
| 1823 | strout (buf, -1, -1, printcharfun, 0); | 1820 | strout (buf, -1, -1, printcharfun); |
| 1824 | PRINTCHAR ('>'); | 1821 | PRINTCHAR ('>'); |
| 1825 | #endif | 1822 | #endif |
| 1826 | /* Implement a readable output, e.g.: | 1823 | /* Implement a readable output, e.g.: |
| @@ -1828,33 +1825,33 @@ print_object (Lisp_Object obj, register Lisp_Object printcharfun, int escapeflag | |||
| 1828 | /* Always print the size. */ | 1825 | /* Always print the size. */ |
| 1829 | sprintf (buf, "#s(hash-table size %ld", | 1826 | sprintf (buf, "#s(hash-table size %ld", |
| 1830 | (long) XVECTOR (h->next)->size); | 1827 | (long) XVECTOR (h->next)->size); |
| 1831 | strout (buf, -1, -1, printcharfun, 0); | 1828 | strout (buf, -1, -1, printcharfun); |
| 1832 | 1829 | ||
| 1833 | if (!NILP (h->test)) | 1830 | if (!NILP (h->test)) |
| 1834 | { | 1831 | { |
| 1835 | strout (" test ", -1, -1, printcharfun, 0); | 1832 | strout (" test ", -1, -1, printcharfun); |
| 1836 | print_object (h->test, printcharfun, escapeflag); | 1833 | print_object (h->test, printcharfun, escapeflag); |
| 1837 | } | 1834 | } |
| 1838 | 1835 | ||
| 1839 | if (!NILP (h->weak)) | 1836 | if (!NILP (h->weak)) |
| 1840 | { | 1837 | { |
| 1841 | strout (" weakness ", -1, -1, printcharfun, 0); | 1838 | strout (" weakness ", -1, -1, printcharfun); |
| 1842 | print_object (h->weak, printcharfun, escapeflag); | 1839 | print_object (h->weak, printcharfun, escapeflag); |
| 1843 | } | 1840 | } |
| 1844 | 1841 | ||
| 1845 | if (!NILP (h->rehash_size)) | 1842 | if (!NILP (h->rehash_size)) |
| 1846 | { | 1843 | { |
| 1847 | strout (" rehash-size ", -1, -1, printcharfun, 0); | 1844 | strout (" rehash-size ", -1, -1, printcharfun); |
| 1848 | print_object (h->rehash_size, printcharfun, escapeflag); | 1845 | print_object (h->rehash_size, printcharfun, escapeflag); |
| 1849 | } | 1846 | } |
| 1850 | 1847 | ||
| 1851 | if (!NILP (h->rehash_threshold)) | 1848 | if (!NILP (h->rehash_threshold)) |
| 1852 | { | 1849 | { |
| 1853 | strout (" rehash-threshold ", -1, -1, printcharfun, 0); | 1850 | strout (" rehash-threshold ", -1, -1, printcharfun); |
| 1854 | print_object (h->rehash_threshold, printcharfun, escapeflag); | 1851 | print_object (h->rehash_threshold, printcharfun, escapeflag); |
| 1855 | } | 1852 | } |
| 1856 | 1853 | ||
| 1857 | strout (" data ", -1, -1, printcharfun, 0); | 1854 | strout (" data ", -1, -1, printcharfun); |
| 1858 | 1855 | ||
| 1859 | /* Print the data here as a plist. */ | 1856 | /* Print the data here as a plist. */ |
| 1860 | real_size = HASH_TABLE_SIZE (h); | 1857 | real_size = HASH_TABLE_SIZE (h); |
| @@ -1876,7 +1873,7 @@ print_object (Lisp_Object obj, register Lisp_Object printcharfun, int escapeflag | |||
| 1876 | } | 1873 | } |
| 1877 | 1874 | ||
| 1878 | if (size < real_size) | 1875 | if (size < real_size) |
| 1879 | strout (" ...", 4, 4, printcharfun, 0); | 1876 | strout (" ...", 4, 4, printcharfun); |
| 1880 | 1877 | ||
| 1881 | PRINTCHAR (')'); | 1878 | PRINTCHAR (')'); |
| 1882 | PRINTCHAR (')'); | 1879 | PRINTCHAR (')'); |
| @@ -1885,10 +1882,10 @@ print_object (Lisp_Object obj, register Lisp_Object printcharfun, int escapeflag | |||
| 1885 | else if (BUFFERP (obj)) | 1882 | else if (BUFFERP (obj)) |
| 1886 | { | 1883 | { |
| 1887 | if (NILP (BVAR (XBUFFER (obj), name))) | 1884 | if (NILP (BVAR (XBUFFER (obj), name))) |
| 1888 | strout ("#<killed buffer>", -1, -1, printcharfun, 0); | 1885 | strout ("#<killed buffer>", -1, -1, printcharfun); |
| 1889 | else if (escapeflag) | 1886 | else if (escapeflag) |
| 1890 | { | 1887 | { |
| 1891 | strout ("#<buffer ", -1, -1, printcharfun, 0); | 1888 | strout ("#<buffer ", -1, -1, printcharfun); |
| 1892 | print_string (BVAR (XBUFFER (obj), name), printcharfun); | 1889 | print_string (BVAR (XBUFFER (obj), name), printcharfun); |
| 1893 | PRINTCHAR ('>'); | 1890 | PRINTCHAR ('>'); |
| 1894 | } | 1891 | } |
| @@ -1897,16 +1894,16 @@ print_object (Lisp_Object obj, register Lisp_Object printcharfun, int escapeflag | |||
| 1897 | } | 1894 | } |
| 1898 | else if (WINDOW_CONFIGURATIONP (obj)) | 1895 | else if (WINDOW_CONFIGURATIONP (obj)) |
| 1899 | { | 1896 | { |
| 1900 | strout ("#<window-configuration>", -1, -1, printcharfun, 0); | 1897 | strout ("#<window-configuration>", -1, -1, printcharfun); |
| 1901 | } | 1898 | } |
| 1902 | else if (FRAMEP (obj)) | 1899 | else if (FRAMEP (obj)) |
| 1903 | { | 1900 | { |
| 1904 | strout ((FRAME_LIVE_P (XFRAME (obj)) | 1901 | strout ((FRAME_LIVE_P (XFRAME (obj)) |
| 1905 | ? "#<frame " : "#<dead frame "), | 1902 | ? "#<frame " : "#<dead frame "), |
| 1906 | -1, -1, printcharfun, 0); | 1903 | -1, -1, printcharfun); |
| 1907 | print_string (XFRAME (obj)->name, printcharfun); | 1904 | print_string (XFRAME (obj)->name, printcharfun); |
| 1908 | sprintf (buf, " 0x%lx", (unsigned long) (XFRAME (obj))); | 1905 | sprintf (buf, " 0x%lx", (unsigned long) (XFRAME (obj))); |
| 1909 | strout (buf, -1, -1, printcharfun, 0); | 1906 | strout (buf, -1, -1, printcharfun); |
| 1910 | PRINTCHAR ('>'); | 1907 | PRINTCHAR ('>'); |
| 1911 | } | 1908 | } |
| 1912 | else if (FONTP (obj)) | 1909 | else if (FONTP (obj)) |
| @@ -1916,9 +1913,9 @@ print_object (Lisp_Object obj, register Lisp_Object printcharfun, int escapeflag | |||
| 1916 | if (! FONT_OBJECT_P (obj)) | 1913 | if (! FONT_OBJECT_P (obj)) |
| 1917 | { | 1914 | { |
| 1918 | if (FONT_SPEC_P (obj)) | 1915 | if (FONT_SPEC_P (obj)) |
| 1919 | strout ("#<font-spec", -1, -1, printcharfun, 0); | 1916 | strout ("#<font-spec", -1, -1, printcharfun); |
| 1920 | else | 1917 | else |
| 1921 | strout ("#<font-entity", -1, -1, printcharfun, 0); | 1918 | strout ("#<font-entity", -1, -1, printcharfun); |
| 1922 | for (i = 0; i < FONT_SPEC_MAX; i++) | 1919 | for (i = 0; i < FONT_SPEC_MAX; i++) |
| 1923 | { | 1920 | { |
| 1924 | PRINTCHAR (' '); | 1921 | PRINTCHAR (' '); |
| @@ -1931,7 +1928,7 @@ print_object (Lisp_Object obj, register Lisp_Object printcharfun, int escapeflag | |||
| 1931 | } | 1928 | } |
| 1932 | else | 1929 | else |
| 1933 | { | 1930 | { |
| 1934 | strout ("#<font-object ", -1, -1, printcharfun, 0); | 1931 | strout ("#<font-object ", -1, -1, printcharfun); |
| 1935 | print_object (AREF (obj, FONT_NAME_INDEX), printcharfun, | 1932 | print_object (AREF (obj, FONT_NAME_INDEX), printcharfun, |
| 1936 | escapeflag); | 1933 | escapeflag); |
| 1937 | } | 1934 | } |
| @@ -1984,7 +1981,7 @@ print_object (Lisp_Object obj, register Lisp_Object printcharfun, int escapeflag | |||
| 1984 | print_object (tem, printcharfun, escapeflag); | 1981 | print_object (tem, printcharfun, escapeflag); |
| 1985 | } | 1982 | } |
| 1986 | if (size < real_size) | 1983 | if (size < real_size) |
| 1987 | strout (" ...", 4, 4, printcharfun, 0); | 1984 | strout (" ...", 4, 4, printcharfun); |
| 1988 | } | 1985 | } |
| 1989 | PRINTCHAR (']'); | 1986 | PRINTCHAR (']'); |
| 1990 | } | 1987 | } |
| @@ -1994,32 +1991,32 @@ print_object (Lisp_Object obj, register Lisp_Object printcharfun, int escapeflag | |||
| 1994 | switch (XMISCTYPE (obj)) | 1991 | switch (XMISCTYPE (obj)) |
| 1995 | { | 1992 | { |
| 1996 | case Lisp_Misc_Marker: | 1993 | case Lisp_Misc_Marker: |
| 1997 | strout ("#<marker ", -1, -1, printcharfun, 0); | 1994 | strout ("#<marker ", -1, -1, printcharfun); |
| 1998 | /* Do you think this is necessary? */ | 1995 | /* Do you think this is necessary? */ |
| 1999 | if (XMARKER (obj)->insertion_type != 0) | 1996 | if (XMARKER (obj)->insertion_type != 0) |
| 2000 | strout ("(moves after insertion) ", -1, -1, printcharfun, 0); | 1997 | strout ("(moves after insertion) ", -1, -1, printcharfun); |
| 2001 | if (! XMARKER (obj)->buffer) | 1998 | if (! XMARKER (obj)->buffer) |
| 2002 | strout ("in no buffer", -1, -1, printcharfun, 0); | 1999 | strout ("in no buffer", -1, -1, printcharfun); |
| 2003 | else | 2000 | else |
| 2004 | { | 2001 | { |
| 2005 | sprintf (buf, "at %ld", (long)marker_position (obj)); | 2002 | sprintf (buf, "at %ld", (long)marker_position (obj)); |
| 2006 | strout (buf, -1, -1, printcharfun, 0); | 2003 | strout (buf, -1, -1, printcharfun); |
| 2007 | strout (" in ", -1, -1, printcharfun, 0); | 2004 | strout (" in ", -1, -1, printcharfun); |
| 2008 | print_string (BVAR (XMARKER (obj)->buffer, name), printcharfun); | 2005 | print_string (BVAR (XMARKER (obj)->buffer, name), printcharfun); |
| 2009 | } | 2006 | } |
| 2010 | PRINTCHAR ('>'); | 2007 | PRINTCHAR ('>'); |
| 2011 | break; | 2008 | break; |
| 2012 | 2009 | ||
| 2013 | case Lisp_Misc_Overlay: | 2010 | case Lisp_Misc_Overlay: |
| 2014 | strout ("#<overlay ", -1, -1, printcharfun, 0); | 2011 | strout ("#<overlay ", -1, -1, printcharfun); |
| 2015 | if (! XMARKER (OVERLAY_START (obj))->buffer) | 2012 | if (! XMARKER (OVERLAY_START (obj))->buffer) |
| 2016 | strout ("in no buffer", -1, -1, printcharfun, 0); | 2013 | strout ("in no buffer", -1, -1, printcharfun); |
| 2017 | else | 2014 | else |
| 2018 | { | 2015 | { |
| 2019 | sprintf (buf, "from %ld to %ld in ", | 2016 | sprintf (buf, "from %ld to %ld in ", |
| 2020 | (long)marker_position (OVERLAY_START (obj)), | 2017 | (long)marker_position (OVERLAY_START (obj)), |
| 2021 | (long)marker_position (OVERLAY_END (obj))); | 2018 | (long)marker_position (OVERLAY_END (obj))); |
| 2022 | strout (buf, -1, -1, printcharfun, 0); | 2019 | strout (buf, -1, -1, printcharfun); |
| 2023 | print_string (BVAR (XMARKER (OVERLAY_START (obj))->buffer, name), | 2020 | print_string (BVAR (XMARKER (OVERLAY_START (obj))->buffer, name), |
| 2024 | printcharfun); | 2021 | printcharfun); |
| 2025 | } | 2022 | } |
| @@ -2029,15 +2026,15 @@ print_object (Lisp_Object obj, register Lisp_Object printcharfun, int escapeflag | |||
| 2029 | /* Remaining cases shouldn't happen in normal usage, but let's print | 2026 | /* Remaining cases shouldn't happen in normal usage, but let's print |
| 2030 | them anyway for the benefit of the debugger. */ | 2027 | them anyway for the benefit of the debugger. */ |
| 2031 | case Lisp_Misc_Free: | 2028 | case Lisp_Misc_Free: |
| 2032 | strout ("#<misc free cell>", -1, -1, printcharfun, 0); | 2029 | strout ("#<misc free cell>", -1, -1, printcharfun); |
| 2033 | break; | 2030 | break; |
| 2034 | 2031 | ||
| 2035 | case Lisp_Misc_Save_Value: | 2032 | case Lisp_Misc_Save_Value: |
| 2036 | strout ("#<save_value ", -1, -1, printcharfun, 0); | 2033 | strout ("#<save_value ", -1, -1, printcharfun); |
| 2037 | sprintf(buf, "ptr=0x%08lx int=%d", | 2034 | sprintf(buf, "ptr=0x%08lx int=%d", |
| 2038 | (unsigned long) XSAVE_VALUE (obj)->pointer, | 2035 | (unsigned long) XSAVE_VALUE (obj)->pointer, |
| 2039 | XSAVE_VALUE (obj)->integer); | 2036 | XSAVE_VALUE (obj)->integer); |
| 2040 | strout (buf, -1, -1, printcharfun, 0); | 2037 | strout (buf, -1, -1, printcharfun); |
| 2041 | PRINTCHAR ('>'); | 2038 | PRINTCHAR ('>'); |
| 2042 | break; | 2039 | break; |
| 2043 | 2040 | ||
| @@ -2051,16 +2048,16 @@ print_object (Lisp_Object obj, register Lisp_Object printcharfun, int escapeflag | |||
| 2051 | { | 2048 | { |
| 2052 | /* We're in trouble if this happens! | 2049 | /* We're in trouble if this happens! |
| 2053 | Probably should just abort () */ | 2050 | Probably should just abort () */ |
| 2054 | strout ("#<EMACS BUG: INVALID DATATYPE ", -1, -1, printcharfun, 0); | 2051 | strout ("#<EMACS BUG: INVALID DATATYPE ", -1, -1, printcharfun); |
| 2055 | if (MISCP (obj)) | 2052 | if (MISCP (obj)) |
| 2056 | sprintf (buf, "(MISC 0x%04x)", (int) XMISCTYPE (obj)); | 2053 | sprintf (buf, "(MISC 0x%04x)", (int) XMISCTYPE (obj)); |
| 2057 | else if (VECTORLIKEP (obj)) | 2054 | else if (VECTORLIKEP (obj)) |
| 2058 | sprintf (buf, "(PVEC 0x%08x)", (int) XVECTOR (obj)->size); | 2055 | sprintf (buf, "(PVEC 0x%08x)", (int) XVECTOR (obj)->size); |
| 2059 | else | 2056 | else |
| 2060 | sprintf (buf, "(0x%02x)", (int) XTYPE (obj)); | 2057 | sprintf (buf, "(0x%02x)", (int) XTYPE (obj)); |
| 2061 | strout (buf, -1, -1, printcharfun, 0); | 2058 | strout (buf, -1, -1, printcharfun); |
| 2062 | strout (" Save your buffers immediately and please report this bug>", | 2059 | strout (" Save your buffers immediately and please report this bug>", |
| 2063 | -1, -1, printcharfun, 0); | 2060 | -1, -1, printcharfun); |
| 2064 | } | 2061 | } |
| 2065 | } | 2062 | } |
| 2066 | 2063 | ||
diff --git a/src/process.c b/src/process.c index c9b420ab2ae..1abfbd3f2a4 100644 --- a/src/process.c +++ b/src/process.c | |||
| @@ -159,9 +159,6 @@ extern Lisp_Object QCfilter; | |||
| 159 | #define SERIALCONN_P(p) (EQ (XPROCESS (p)->type, Qserial)) | 159 | #define SERIALCONN_P(p) (EQ (XPROCESS (p)->type, Qserial)) |
| 160 | #define SERIALCONN1_P(p) (EQ ((p)->type, Qserial)) | 160 | #define SERIALCONN1_P(p) (EQ ((p)->type, Qserial)) |
| 161 | 161 | ||
| 162 | /* Define first descriptor number available for subprocesses. */ | ||
| 163 | #define FIRST_PROC_DESC 3 | ||
| 164 | |||
| 165 | #ifndef HAVE_H_ERRNO | 162 | #ifndef HAVE_H_ERRNO |
| 166 | extern int h_errno; | 163 | extern int h_errno; |
| 167 | #endif | 164 | #endif |
| @@ -278,10 +275,6 @@ static SELECT_TYPE connect_wait_mask; | |||
| 278 | 275 | ||
| 279 | /* Number of bits set in connect_wait_mask. */ | 276 | /* Number of bits set in connect_wait_mask. */ |
| 280 | static int num_pending_connects; | 277 | static int num_pending_connects; |
| 281 | |||
| 282 | #define IF_NON_BLOCKING_CONNECT(s) s | ||
| 283 | #else /* NON_BLOCKING_CONNECT */ | ||
| 284 | #define IF_NON_BLOCKING_CONNECT(s) | ||
| 285 | #endif /* NON_BLOCKING_CONNECT */ | 278 | #endif /* NON_BLOCKING_CONNECT */ |
| 286 | 279 | ||
| 287 | /* The largest descriptor currently in use for a process object. */ | 280 | /* The largest descriptor currently in use for a process object. */ |
| @@ -1250,8 +1243,8 @@ Returns nil if format of ADDRESS is invalid. */) | |||
| 1250 | static Lisp_Object | 1243 | static Lisp_Object |
| 1251 | list_processes_1 (Lisp_Object query_only) | 1244 | list_processes_1 (Lisp_Object query_only) |
| 1252 | { | 1245 | { |
| 1253 | register Lisp_Object tail, tem; | 1246 | register Lisp_Object tail; |
| 1254 | Lisp_Object proc, minspace, tem1; | 1247 | Lisp_Object proc, minspace; |
| 1255 | register struct Lisp_Process *p; | 1248 | register struct Lisp_Process *p; |
| 1256 | char tembuf[300]; | 1249 | char tembuf[300]; |
| 1257 | int w_proc, w_buffer, w_tty; | 1250 | int w_proc, w_buffer, w_tty; |
| @@ -1453,10 +1446,10 @@ list_processes_1 (Lisp_Object query_only) | |||
| 1453 | } | 1446 | } |
| 1454 | else | 1447 | else |
| 1455 | { | 1448 | { |
| 1456 | tem = p->command; | 1449 | Lisp_Object tem = p->command; |
| 1457 | while (1) | 1450 | while (1) |
| 1458 | { | 1451 | { |
| 1459 | tem1 = Fcar (tem); | 1452 | Lisp_Object tem1 = Fcar (tem); |
| 1460 | if (NILP (tem1)) | 1453 | if (NILP (tem1)) |
| 1461 | break; | 1454 | break; |
| 1462 | Finsert (1, &tem1); | 1455 | Finsert (1, &tem1); |
| @@ -1519,11 +1512,11 @@ the command through a shell and redirect one of them using the shell | |||
| 1519 | syntax. | 1512 | syntax. |
| 1520 | 1513 | ||
| 1521 | usage: (start-process NAME BUFFER PROGRAM &rest PROGRAM-ARGS) */) | 1514 | usage: (start-process NAME BUFFER PROGRAM &rest PROGRAM-ARGS) */) |
| 1522 | (int nargs, register Lisp_Object *args) | 1515 | (size_t nargs, register Lisp_Object *args) |
| 1523 | { | 1516 | { |
| 1524 | Lisp_Object buffer, name, program, proc, current_dir, tem; | 1517 | Lisp_Object buffer, name, program, proc, current_dir, tem; |
| 1525 | register unsigned char **new_argv; | 1518 | register unsigned char **new_argv; |
| 1526 | register int i; | 1519 | register size_t i; |
| 1527 | int count = SPECPDL_INDEX (); | 1520 | int count = SPECPDL_INDEX (); |
| 1528 | 1521 | ||
| 1529 | buffer = args[1]; | 1522 | buffer = args[1]; |
| @@ -1729,7 +1722,7 @@ usage: (start-process NAME BUFFER PROGRAM &rest PROGRAM-ARGS) */) | |||
| 1729 | new_argv = (unsigned char **) alloca ((nargs - 1) * sizeof (char *)); | 1722 | new_argv = (unsigned char **) alloca ((nargs - 1) * sizeof (char *)); |
| 1730 | new_argv[nargs - 2] = 0; | 1723 | new_argv[nargs - 2] = 0; |
| 1731 | 1724 | ||
| 1732 | for (i = nargs - 3; i >= 0; i--) | 1725 | for (i = nargs - 2; i-- != 0; ) |
| 1733 | { | 1726 | { |
| 1734 | new_argv[i] = SDATA (XCAR (tem)); | 1727 | new_argv[i] = SDATA (XCAR (tem)); |
| 1735 | tem = XCDR (tem); | 1728 | tem = XCDR (tem); |
| @@ -1919,8 +1912,7 @@ create_process (Lisp_Object process, char **new_argv, Lisp_Object current_dir) | |||
| 1919 | /* child_setup must clobber environ on systems with true vfork. | 1912 | /* child_setup must clobber environ on systems with true vfork. |
| 1920 | Protect it from permanent change. */ | 1913 | Protect it from permanent change. */ |
| 1921 | char **save_environ = environ; | 1914 | char **save_environ = environ; |
| 1922 | 1915 | volatile Lisp_Object encoded_current_dir = ENCODE_FILE (current_dir); | |
| 1923 | current_dir = ENCODE_FILE (current_dir); | ||
| 1924 | 1916 | ||
| 1925 | #ifndef WINDOWSNT | 1917 | #ifndef WINDOWSNT |
| 1926 | pid = vfork (); | 1918 | pid = vfork (); |
| @@ -2061,13 +2053,13 @@ create_process (Lisp_Object process, char **new_argv, Lisp_Object current_dir) | |||
| 2061 | child_setup_tty (xforkout); | 2053 | child_setup_tty (xforkout); |
| 2062 | #ifdef WINDOWSNT | 2054 | #ifdef WINDOWSNT |
| 2063 | pid = child_setup (xforkin, xforkout, xforkout, | 2055 | pid = child_setup (xforkin, xforkout, xforkout, |
| 2064 | new_argv, 1, current_dir); | 2056 | new_argv, 1, encoded_current_dir); |
| 2065 | #else /* not WINDOWSNT */ | 2057 | #else /* not WINDOWSNT */ |
| 2066 | #ifdef FD_CLOEXEC | 2058 | #ifdef FD_CLOEXEC |
| 2067 | emacs_close (wait_child_setup[0]); | 2059 | emacs_close (wait_child_setup[0]); |
| 2068 | #endif | 2060 | #endif |
| 2069 | child_setup (xforkin, xforkout, xforkout, | 2061 | child_setup (xforkin, xforkout, xforkout, |
| 2070 | new_argv, 1, current_dir); | 2062 | new_argv, 1, encoded_current_dir); |
| 2071 | #endif /* not WINDOWSNT */ | 2063 | #endif /* not WINDOWSNT */ |
| 2072 | } | 2064 | } |
| 2073 | environ = save_environ; | 2065 | environ = save_environ; |
| @@ -2689,7 +2681,7 @@ Examples: | |||
| 2689 | \(serial-process-configure :port "\\\\.\\COM13" :bytesize 7) | 2681 | \(serial-process-configure :port "\\\\.\\COM13" :bytesize 7) |
| 2690 | 2682 | ||
| 2691 | usage: (serial-process-configure &rest ARGS) */) | 2683 | usage: (serial-process-configure &rest ARGS) */) |
| 2692 | (int nargs, Lisp_Object *args) | 2684 | (size_t nargs, Lisp_Object *args) |
| 2693 | { | 2685 | { |
| 2694 | struct Lisp_Process *p; | 2686 | struct Lisp_Process *p; |
| 2695 | Lisp_Object contact = Qnil; | 2687 | Lisp_Object contact = Qnil; |
| @@ -2807,7 +2799,7 @@ Examples: | |||
| 2807 | \(make-serial-process :port "/dev/tty.BlueConsole-SPP-1" :speed nil) | 2799 | \(make-serial-process :port "/dev/tty.BlueConsole-SPP-1" :speed nil) |
| 2808 | 2800 | ||
| 2809 | usage: (make-serial-process &rest ARGS) */) | 2801 | usage: (make-serial-process &rest ARGS) */) |
| 2810 | (int nargs, Lisp_Object *args) | 2802 | (size_t nargs, Lisp_Object *args) |
| 2811 | { | 2803 | { |
| 2812 | int fd = -1; | 2804 | int fd = -1; |
| 2813 | Lisp_Object proc, contact, port; | 2805 | Lisp_Object proc, contact, port; |
| @@ -3085,7 +3077,7 @@ The original argument list, modified with the actual connection | |||
| 3085 | information, is available via the `process-contact' function. | 3077 | information, is available via the `process-contact' function. |
| 3086 | 3078 | ||
| 3087 | usage: (make-network-process &rest ARGS) */) | 3079 | usage: (make-network-process &rest ARGS) */) |
| 3088 | (int nargs, Lisp_Object *args) | 3080 | (size_t nargs, Lisp_Object *args) |
| 3089 | { | 3081 | { |
| 3090 | Lisp_Object proc; | 3082 | Lisp_Object proc; |
| 3091 | Lisp_Object contact; | 3083 | Lisp_Object contact; |
| @@ -3401,9 +3393,12 @@ usage: (make-network-process &rest ARGS) */) | |||
| 3401 | 3393 | ||
| 3402 | for (lres = res; lres; lres = lres->ai_next) | 3394 | for (lres = res; lres; lres = lres->ai_next) |
| 3403 | { | 3395 | { |
| 3404 | int optn, optbits; | 3396 | size_t optn; |
| 3397 | int optbits; | ||
| 3405 | 3398 | ||
| 3399 | #ifdef WINDOWSNT | ||
| 3406 | retry_connect: | 3400 | retry_connect: |
| 3401 | #endif | ||
| 3407 | 3402 | ||
| 3408 | s = socket (lres->ai_family, lres->ai_socktype, lres->ai_protocol); | 3403 | s = socket (lres->ai_family, lres->ai_socktype, lres->ai_protocol); |
| 3409 | if (s < 0) | 3404 | if (s < 0) |
| @@ -3467,7 +3462,7 @@ usage: (make-network-process &rest ARGS) */) | |||
| 3467 | if (EQ (service, Qt)) | 3462 | if (EQ (service, Qt)) |
| 3468 | { | 3463 | { |
| 3469 | struct sockaddr_in sa1; | 3464 | struct sockaddr_in sa1; |
| 3470 | int len1 = sizeof (sa1); | 3465 | socklen_t len1 = sizeof (sa1); |
| 3471 | if (getsockname (s, (struct sockaddr *)&sa1, &len1) == 0) | 3466 | if (getsockname (s, (struct sockaddr *)&sa1, &len1) == 0) |
| 3472 | { | 3467 | { |
| 3473 | ((struct sockaddr_in *)(lres->ai_addr))->sin_port = sa1.sin_port; | 3468 | ((struct sockaddr_in *)(lres->ai_addr))->sin_port = sa1.sin_port; |
| @@ -3514,7 +3509,8 @@ usage: (make-network-process &rest ARGS) */) | |||
| 3514 | /* Unlike most other syscalls connect() cannot be called | 3509 | /* Unlike most other syscalls connect() cannot be called |
| 3515 | again. (That would return EALREADY.) The proper way to | 3510 | again. (That would return EALREADY.) The proper way to |
| 3516 | wait for completion is select(). */ | 3511 | wait for completion is select(). */ |
| 3517 | int sc, len; | 3512 | int sc; |
| 3513 | socklen_t len; | ||
| 3518 | SELECT_TYPE fdset; | 3514 | SELECT_TYPE fdset; |
| 3519 | retry_select: | 3515 | retry_select: |
| 3520 | FD_ZERO (&fdset); | 3516 | FD_ZERO (&fdset); |
| @@ -3587,7 +3583,7 @@ usage: (make-network-process &rest ARGS) */) | |||
| 3587 | if (!is_server) | 3583 | if (!is_server) |
| 3588 | { | 3584 | { |
| 3589 | struct sockaddr_in sa1; | 3585 | struct sockaddr_in sa1; |
| 3590 | int len1 = sizeof (sa1); | 3586 | socklen_t len1 = sizeof (sa1); |
| 3591 | if (getsockname (s, (struct sockaddr *)&sa1, &len1) == 0) | 3587 | if (getsockname (s, (struct sockaddr *)&sa1, &len1) == 0) |
| 3592 | contact = Fplist_put (contact, QClocal, | 3588 | contact = Fplist_put (contact, QClocal, |
| 3593 | conv_sockaddr_to_lisp ((struct sockaddr *)&sa1, len1)); | 3589 | conv_sockaddr_to_lisp ((struct sockaddr *)&sa1, len1)); |
| @@ -3705,10 +3701,10 @@ usage: (make-network-process &rest ARGS) */) | |||
| 3705 | 3701 | ||
| 3706 | { | 3702 | { |
| 3707 | /* Setup coding systems for communicating with the network stream. */ | 3703 | /* Setup coding systems for communicating with the network stream. */ |
| 3708 | struct gcpro gcpro1; | 3704 | struct gcpro inner_gcpro1; |
| 3709 | /* Qt denotes we have not yet called Ffind_operation_coding_system. */ | 3705 | /* Qt denotes we have not yet called Ffind_operation_coding_system. */ |
| 3710 | Lisp_Object coding_systems = Qt; | 3706 | Lisp_Object coding_systems = Qt; |
| 3711 | Lisp_Object args[5], val; | 3707 | Lisp_Object fargs[5], val; |
| 3712 | 3708 | ||
| 3713 | if (!NILP (tem)) | 3709 | if (!NILP (tem)) |
| 3714 | { | 3710 | { |
| @@ -3731,11 +3727,11 @@ usage: (make-network-process &rest ARGS) */) | |||
| 3731 | coding_systems = Qnil; | 3727 | coding_systems = Qnil; |
| 3732 | else | 3728 | else |
| 3733 | { | 3729 | { |
| 3734 | args[0] = Qopen_network_stream, args[1] = name, | 3730 | fargs[0] = Qopen_network_stream, fargs[1] = name, |
| 3735 | args[2] = buffer, args[3] = host, args[4] = service; | 3731 | fargs[2] = buffer, fargs[3] = host, fargs[4] = service; |
| 3736 | GCPRO1 (proc); | 3732 | GCPRO1_VAR (proc, inner_gcpro); |
| 3737 | coding_systems = Ffind_operation_coding_system (5, args); | 3733 | coding_systems = Ffind_operation_coding_system (5, fargs); |
| 3738 | UNGCPRO; | 3734 | UNGCPRO_VAR (inner_gcpro); |
| 3739 | } | 3735 | } |
| 3740 | if (CONSP (coding_systems)) | 3736 | if (CONSP (coding_systems)) |
| 3741 | val = XCAR (coding_systems); | 3737 | val = XCAR (coding_systems); |
| @@ -3764,11 +3760,11 @@ usage: (make-network-process &rest ARGS) */) | |||
| 3764 | coding_systems = Qnil; | 3760 | coding_systems = Qnil; |
| 3765 | else | 3761 | else |
| 3766 | { | 3762 | { |
| 3767 | args[0] = Qopen_network_stream, args[1] = name, | 3763 | fargs[0] = Qopen_network_stream, fargs[1] = name, |
| 3768 | args[2] = buffer, args[3] = host, args[4] = service; | 3764 | fargs[2] = buffer, fargs[3] = host, fargs[4] = service; |
| 3769 | GCPRO1 (proc); | 3765 | GCPRO1_VAR (proc, inner_gcpro); |
| 3770 | coding_systems = Ffind_operation_coding_system (5, args); | 3766 | coding_systems = Ffind_operation_coding_system (5, fargs); |
| 3771 | UNGCPRO; | 3767 | UNGCPRO_VAR (inner_gcpro); |
| 3772 | } | 3768 | } |
| 3773 | } | 3769 | } |
| 3774 | if (CONSP (coding_systems)) | 3770 | if (CONSP (coding_systems)) |
| @@ -3948,7 +3944,7 @@ FLAGS is the current flags of the interface. */) | |||
| 3948 | CHECK_STRING (ifname); | 3944 | CHECK_STRING (ifname); |
| 3949 | 3945 | ||
| 3950 | memset (rq.ifr_name, 0, sizeof rq.ifr_name); | 3946 | memset (rq.ifr_name, 0, sizeof rq.ifr_name); |
| 3951 | strncpy (rq.ifr_name, SDATA (ifname), sizeof (rq.ifr_name)); | 3947 | strncpy (rq.ifr_name, SSDATA (ifname), sizeof (rq.ifr_name)); |
| 3952 | 3948 | ||
| 3953 | s = socket (AF_INET, SOCK_STREAM, 0); | 3949 | s = socket (AF_INET, SOCK_STREAM, 0); |
| 3954 | if (s < 0) | 3950 | if (s < 0) |
| @@ -4192,7 +4188,7 @@ server_accept_connection (Lisp_Object server, int channel) | |||
| 4192 | struct sockaddr_un un; | 4188 | struct sockaddr_un un; |
| 4193 | #endif | 4189 | #endif |
| 4194 | } saddr; | 4190 | } saddr; |
| 4195 | int len = sizeof saddr; | 4191 | socklen_t len = sizeof saddr; |
| 4196 | 4192 | ||
| 4197 | s = accept (channel, &saddr.sa, &len); | 4193 | s = accept (channel, &saddr.sa, &len); |
| 4198 | 4194 | ||
| @@ -4553,7 +4549,7 @@ wait_reading_process_output (int time_limit, int microsecs, int read_kbd, | |||
| 4553 | struct buffer *old_buffer = current_buffer; | 4549 | struct buffer *old_buffer = current_buffer; |
| 4554 | Lisp_Object old_window = selected_window; | 4550 | Lisp_Object old_window = selected_window; |
| 4555 | 4551 | ||
| 4556 | timer_delay = timer_check (1); | 4552 | timer_delay = timer_check (); |
| 4557 | 4553 | ||
| 4558 | /* If a timer has run, this might have changed buffers | 4554 | /* If a timer has run, this might have changed buffers |
| 4559 | an alike. Make read_key_sequence aware of that. */ | 4555 | an alike. Make read_key_sequence aware of that. */ |
| @@ -4928,8 +4924,6 @@ wait_reading_process_output (int time_limit, int microsecs, int read_kbd, | |||
| 4928 | d->func (channel, d->data, 0); | 4924 | d->func (channel, d->data, 0); |
| 4929 | } | 4925 | } |
| 4930 | 4926 | ||
| 4931 | /* Really FIRST_PROC_DESC should be 0 on Unix, | ||
| 4932 | but this is safer in the short run. */ | ||
| 4933 | for (channel = 0; channel <= max_process_desc; channel++) | 4927 | for (channel = 0; channel <= max_process_desc; channel++) |
| 4934 | { | 4928 | { |
| 4935 | if (FD_ISSET (channel, &Available) | 4929 | if (FD_ISSET (channel, &Available) |
| @@ -5059,7 +5053,7 @@ wait_reading_process_output (int time_limit, int microsecs, int read_kbd, | |||
| 5059 | /* getsockopt(,,SO_ERROR,,) is said to hang on some systems. | 5053 | /* getsockopt(,,SO_ERROR,,) is said to hang on some systems. |
| 5060 | So only use it on systems where it is known to work. */ | 5054 | So only use it on systems where it is known to work. */ |
| 5061 | { | 5055 | { |
| 5062 | int xlen = sizeof (xerrno); | 5056 | socklen_t xlen = sizeof (xerrno); |
| 5063 | if (getsockopt (channel, SOL_SOCKET, SO_ERROR, &xerrno, &xlen)) | 5057 | if (getsockopt (channel, SOL_SOCKET, SO_ERROR, &xerrno, &xlen)) |
| 5064 | xerrno = errno; | 5058 | xerrno = errno; |
| 5065 | } | 5059 | } |
| @@ -5128,9 +5122,9 @@ read_process_output_call (Lisp_Object fun_and_args) | |||
| 5128 | } | 5122 | } |
| 5129 | 5123 | ||
| 5130 | static Lisp_Object | 5124 | static Lisp_Object |
| 5131 | read_process_output_error_handler (Lisp_Object error) | 5125 | read_process_output_error_handler (Lisp_Object error_val) |
| 5132 | { | 5126 | { |
| 5133 | cmd_error_internal (error, "error in process filter: "); | 5127 | cmd_error_internal (error_val, "error in process filter: "); |
| 5134 | Vinhibit_quit = Qt; | 5128 | Vinhibit_quit = Qt; |
| 5135 | update_echo_area (); | 5129 | update_echo_area (); |
| 5136 | Fsleep_for (make_number (2), Qnil); | 5130 | Fsleep_for (make_number (2), Qnil); |
| @@ -5171,7 +5165,7 @@ read_process_output (Lisp_Object proc, register int channel) | |||
| 5171 | /* We have a working select, so proc_buffered_char is always -1. */ | 5165 | /* We have a working select, so proc_buffered_char is always -1. */ |
| 5172 | if (DATAGRAM_CHAN_P (channel)) | 5166 | if (DATAGRAM_CHAN_P (channel)) |
| 5173 | { | 5167 | { |
| 5174 | int len = datagram_address[channel].len; | 5168 | socklen_t len = datagram_address[channel].len; |
| 5175 | nbytes = recvfrom (channel, chars + carryover, readmax, | 5169 | nbytes = recvfrom (channel, chars + carryover, readmax, |
| 5176 | 0, datagram_address[channel].sa, &len); | 5170 | 0, datagram_address[channel].sa, &len); |
| 5177 | } | 5171 | } |
| @@ -5477,7 +5471,7 @@ read_process_output (Lisp_Object proc, register int channel) | |||
| 5477 | jmp_buf send_process_frame; | 5471 | jmp_buf send_process_frame; |
| 5478 | Lisp_Object process_sent_to; | 5472 | Lisp_Object process_sent_to; |
| 5479 | 5473 | ||
| 5480 | static SIGTYPE | 5474 | static void |
| 5481 | send_process_trap (int ignore) | 5475 | send_process_trap (int ignore) |
| 5482 | { | 5476 | { |
| 5483 | SIGNAL_THREAD_CHECK (SIGPIPE); | 5477 | SIGNAL_THREAD_CHECK (SIGPIPE); |
| @@ -5504,7 +5498,7 @@ send_process (volatile Lisp_Object proc, const char *volatile buf, | |||
| 5504 | EMACS_INT rv; | 5498 | EMACS_INT rv; |
| 5505 | struct coding_system *coding; | 5499 | struct coding_system *coding; |
| 5506 | struct gcpro gcpro1; | 5500 | struct gcpro gcpro1; |
| 5507 | SIGTYPE (*volatile old_sigpipe) (int); | 5501 | void (*volatile old_sigpipe) (int); |
| 5508 | 5502 | ||
| 5509 | GCPRO1 (object); | 5503 | GCPRO1 (object); |
| 5510 | 5504 | ||
| @@ -5626,7 +5620,7 @@ send_process (volatile Lisp_Object proc, const char *volatile buf, | |||
| 5626 | while (this > 0) | 5620 | while (this > 0) |
| 5627 | { | 5621 | { |
| 5628 | int outfd = p->outfd; | 5622 | int outfd = p->outfd; |
| 5629 | old_sigpipe = (SIGTYPE (*) (int)) signal (SIGPIPE, send_process_trap); | 5623 | old_sigpipe = (void (*) (int)) signal (SIGPIPE, send_process_trap); |
| 5630 | #ifdef DATAGRAM_SOCKETS | 5624 | #ifdef DATAGRAM_SOCKETS |
| 5631 | if (DATAGRAM_CHAN_P (outfd)) | 5625 | if (DATAGRAM_CHAN_P (outfd)) |
| 5632 | { | 5626 | { |
| @@ -5925,7 +5919,7 @@ process_send_signal (Lisp_Object process, int signo, Lisp_Object current_group, | |||
| 5925 | 5919 | ||
| 5926 | if (sig_char && *sig_char != CDISABLE) | 5920 | if (sig_char && *sig_char != CDISABLE) |
| 5927 | { | 5921 | { |
| 5928 | send_process (proc, sig_char, 1, Qnil); | 5922 | send_process (proc, (char *) sig_char, 1, Qnil); |
| 5929 | return; | 5923 | return; |
| 5930 | } | 5924 | } |
| 5931 | /* If we can't send the signal with a character, | 5925 | /* If we can't send the signal with a character, |
| @@ -6386,7 +6380,7 @@ process has been transmitted to the serial port. */) | |||
| 6386 | indirectly; if it does, that is a bug */ | 6380 | indirectly; if it does, that is a bug */ |
| 6387 | 6381 | ||
| 6388 | #ifdef SIGCHLD | 6382 | #ifdef SIGCHLD |
| 6389 | static SIGTYPE | 6383 | static void |
| 6390 | sigchld_handler (int signo) | 6384 | sigchld_handler (int signo) |
| 6391 | { | 6385 | { |
| 6392 | int old_errno = errno; | 6386 | int old_errno = errno; |
| @@ -6534,9 +6528,9 @@ exec_sentinel_unwind (Lisp_Object data) | |||
| 6534 | } | 6528 | } |
| 6535 | 6529 | ||
| 6536 | static Lisp_Object | 6530 | static Lisp_Object |
| 6537 | exec_sentinel_error_handler (Lisp_Object error) | 6531 | exec_sentinel_error_handler (Lisp_Object error_val) |
| 6538 | { | 6532 | { |
| 6539 | cmd_error_internal (error, "error in process sentinel: "); | 6533 | cmd_error_internal (error_val, "error in process sentinel: "); |
| 6540 | Vinhibit_quit = Qt; | 6534 | Vinhibit_quit = Qt; |
| 6541 | update_echo_area (); | 6535 | update_echo_area (); |
| 6542 | Fsleep_for (make_number (2), Qnil); | 6536 | Fsleep_for (make_number (2), Qnil); |
| @@ -6953,7 +6947,7 @@ wait_reading_process_output (int time_limit, int microsecs, int read_kbd, | |||
| 6953 | do | 6947 | do |
| 6954 | { | 6948 | { |
| 6955 | int old_timers_run = timers_run; | 6949 | int old_timers_run = timers_run; |
| 6956 | timer_delay = timer_check (1); | 6950 | timer_delay = timer_check (); |
| 6957 | if (timers_run != old_timers_run && do_display) | 6951 | if (timers_run != old_timers_run && do_display) |
| 6958 | /* We must retry, since a timer may have requeued itself | 6952 | /* We must retry, since a timer may have requeued itself |
| 6959 | and that could alter the time delay. */ | 6953 | and that could alter the time delay. */ |
diff --git a/src/region-cache.c b/src/region-cache.c index 1f9b62da9fa..53ce0e9d802 100644 --- a/src/region-cache.c +++ b/src/region-cache.c | |||
| @@ -290,37 +290,37 @@ move_cache_gap (struct region_cache *c, EMACS_INT pos, EMACS_INT min_size) | |||
| 290 | } | 290 | } |
| 291 | 291 | ||
| 292 | 292 | ||
| 293 | /* Insert a new boundary in cache C; it will have cache index INDEX, | 293 | /* Insert a new boundary in cache C; it will have cache index I, |
| 294 | and have the specified POS and VALUE. */ | 294 | and have the specified POS and VALUE. */ |
| 295 | static void | 295 | static void |
| 296 | insert_cache_boundary (struct region_cache *c, EMACS_INT index, EMACS_INT pos, | 296 | insert_cache_boundary (struct region_cache *c, EMACS_INT i, EMACS_INT pos, |
| 297 | int value) | 297 | int value) |
| 298 | { | 298 | { |
| 299 | /* index must be a valid cache index. */ | 299 | /* i must be a valid cache index. */ |
| 300 | if (index < 0 || index > c->cache_len) | 300 | if (i < 0 || i > c->cache_len) |
| 301 | abort (); | 301 | abort (); |
| 302 | 302 | ||
| 303 | /* We must never want to insert something before the dummy first | 303 | /* We must never want to insert something before the dummy first |
| 304 | boundary. */ | 304 | boundary. */ |
| 305 | if (index == 0) | 305 | if (i == 0) |
| 306 | abort (); | 306 | abort (); |
| 307 | 307 | ||
| 308 | /* We must only be inserting things in order. */ | 308 | /* We must only be inserting things in order. */ |
| 309 | if (! (BOUNDARY_POS (c, index-1) < pos | 309 | if (! (BOUNDARY_POS (c, i - 1) < pos |
| 310 | && (index == c->cache_len | 310 | && (i == c->cache_len |
| 311 | || pos < BOUNDARY_POS (c, index)))) | 311 | || pos < BOUNDARY_POS (c, i)))) |
| 312 | abort (); | 312 | abort (); |
| 313 | 313 | ||
| 314 | /* The value must be different from the ones around it. However, we | 314 | /* The value must be different from the ones around it. However, we |
| 315 | temporarily create boundaries that establish the same value as | 315 | temporarily create boundaries that establish the same value as |
| 316 | the subsequent boundary, so we're not going to flag that case. */ | 316 | the subsequent boundary, so we're not going to flag that case. */ |
| 317 | if (BOUNDARY_VALUE (c, index-1) == value) | 317 | if (BOUNDARY_VALUE (c, i - 1) == value) |
| 318 | abort (); | 318 | abort (); |
| 319 | 319 | ||
| 320 | move_cache_gap (c, index, 1); | 320 | move_cache_gap (c, i, 1); |
| 321 | 321 | ||
| 322 | c->boundaries[index].pos = pos - c->buffer_beg; | 322 | c->boundaries[i].pos = pos - c->buffer_beg; |
| 323 | c->boundaries[index].value = value; | 323 | c->boundaries[i].value = value; |
| 324 | c->gap_start++; | 324 | c->gap_start++; |
| 325 | c->gap_len--; | 325 | c->gap_len--; |
| 326 | c->cache_len++; | 326 | c->cache_len++; |
| @@ -808,4 +808,3 @@ pp_cache (struct region_cache *c) | |||
| 808 | fprintf (stderr, "%ld : %d\n", (long)pos, BOUNDARY_VALUE (c, i)); | 808 | fprintf (stderr, "%ld : %d\n", (long)pos, BOUNDARY_VALUE (c, i)); |
| 809 | } | 809 | } |
| 810 | } | 810 | } |
| 811 | |||
diff --git a/src/region-cache.h b/src/region-cache.h index 0da159285e4..8e4336c2885 100644 --- a/src/region-cache.h +++ b/src/region-cache.h | |||
| @@ -111,3 +111,5 @@ extern int region_cache_backward (struct buffer *BUF, | |||
| 111 | EMACS_INT POS, | 111 | EMACS_INT POS, |
| 112 | EMACS_INT *NEXT); | 112 | EMACS_INT *NEXT); |
| 113 | 113 | ||
| 114 | /* For debugging. */ | ||
| 115 | void pp_cache (struct region_cache *); | ||
diff --git a/src/s/template.h b/src/s/template.h index ee5afa81de4..4e0400e99e3 100644 --- a/src/s/template.h +++ b/src/s/template.h | |||
| @@ -77,15 +77,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | |||
| 77 | a file that someone else has modified in his Emacs. */ | 77 | a file that someone else has modified in his Emacs. */ |
| 78 | #define CLASH_DETECTION | 78 | #define CLASH_DETECTION |
| 79 | 79 | ||
| 80 | /* Define this if your operating system declares signal handlers to | ||
| 81 | have a type other than the usual. `The usual' is `void' for ANSI C | ||
| 82 | systems (i.e. when the __STDC__ macro is defined), and `int' for | ||
| 83 | pre-ANSI systems. If you're using GCC on an older system, __STDC__ | ||
| 84 | will be defined, but the system's include files will still say that | ||
| 85 | signal returns int or whatever; in situations like that, define | ||
| 86 | this to be what the system's include files want. */ | ||
| 87 | /* #define SIGTYPE int */ | ||
| 88 | |||
| 89 | /* If the character used to separate elements of the executable path | 80 | /* If the character used to separate elements of the executable path |
| 90 | is not ':', #define this to be the appropriate character constant. */ | 81 | is not ':', #define this to be the appropriate character constant. */ |
| 91 | /* #define SEPCHAR ':' */ | 82 | /* #define SEPCHAR ':' */ |
diff --git a/src/s/usg5-4-common.h b/src/s/usg5-4-common.h index aeedd7f4b15..236f71e3007 100644 --- a/src/s/usg5-4-common.h +++ b/src/s/usg5-4-common.h | |||
| @@ -38,9 +38,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | |||
| 38 | /* The docs for system V/386 suggest v.3 has sigpause, so let's try it. */ | 38 | /* The docs for system V/386 suggest v.3 has sigpause, so let's try it. */ |
| 39 | #define HAVE_SYSV_SIGPAUSE | 39 | #define HAVE_SYSV_SIGPAUSE |
| 40 | 40 | ||
| 41 | /* On USG systems signal handlers return void. */ | ||
| 42 | #define SIGTYPE void | ||
| 43 | |||
| 44 | /* Get FIONREAD from <sys/filio.h>. Get <sys/ttold.h> to get struct tchars. | 41 | /* Get FIONREAD from <sys/filio.h>. Get <sys/ttold.h> to get struct tchars. |
| 45 | But get <termio.h> first to make sure ttold.h doesn't interfere. | 42 | But get <termio.h> first to make sure ttold.h doesn't interfere. |
| 46 | And don't try to use SIGIO yet. */ | 43 | And don't try to use SIGIO yet. */ |
diff --git a/src/scroll.c b/src/scroll.c index 33af18d2090..fcec596daa3 100644 --- a/src/scroll.c +++ b/src/scroll.c | |||
| @@ -239,14 +239,16 @@ calculate_scrolling (FRAME_PTR frame, | |||
| 239 | of lines. */ | 239 | of lines. */ |
| 240 | 240 | ||
| 241 | static void | 241 | static void |
| 242 | do_scrolling (struct frame *frame, struct glyph_matrix *current_matrix, struct matrix_elt *matrix, int window_size, int unchanged_at_top) | 242 | do_scrolling (struct frame *frame, struct glyph_matrix *current_matrix, |
| 243 | struct matrix_elt *matrix, int window_size, | ||
| 244 | int unchanged_at_top) | ||
| 243 | { | 245 | { |
| 244 | struct matrix_elt *p; | 246 | struct matrix_elt *p; |
| 245 | int i, j, k; | 247 | int i, j, k; |
| 246 | 248 | ||
| 247 | /* Set to 1 if we have set a terminal window with | 249 | /* Set to 1 if we have set a terminal window with |
| 248 | set_terminal_window. */ | 250 | set_terminal_window. It's unsigned to work around GCC bug 48228. */ |
| 249 | int terminal_window_p = 0; | 251 | unsigned int terminal_window_p = 0; |
| 250 | 252 | ||
| 251 | /* A queue for line insertions to be done. */ | 253 | /* A queue for line insertions to be done. */ |
| 252 | struct queue { int count, pos; }; | 254 | struct queue { int count, pos; }; |
| @@ -831,7 +833,9 @@ scrolling_1 (FRAME_PTR frame, int window_size, int unchanged_at_top, | |||
| 831 | such a line will have little weight. */ | 833 | such a line will have little weight. */ |
| 832 | 834 | ||
| 833 | int | 835 | int |
| 834 | scrolling_max_lines_saved (int start, int end, int *oldhash, int *newhash, int *cost) | 836 | scrolling_max_lines_saved (int start, int end, |
| 837 | int *oldhash, int *newhash, | ||
| 838 | int *cost) | ||
| 835 | { | 839 | { |
| 836 | struct { int hash; int count; } lines[01000]; | 840 | struct { int hash; int count; } lines[01000]; |
| 837 | register int i, h; | 841 | register int i, h; |
| @@ -920,7 +924,8 @@ scroll_cost (FRAME_PTR frame, int from, int to, int amount) | |||
| 920 | overhead and multiply factor values */ | 924 | overhead and multiply factor values */ |
| 921 | 925 | ||
| 922 | static void | 926 | static void |
| 923 | line_ins_del (FRAME_PTR frame, int ov1, int pf1, int ovn, int pfn, register int *ov, register int *mf) | 927 | line_ins_del (FRAME_PTR frame, int ov1, int pf1, int ovn, int pfn, |
| 928 | register int *ov, register int *mf) | ||
| 924 | { | 929 | { |
| 925 | register EMACS_INT i; | 930 | register EMACS_INT i; |
| 926 | register EMACS_INT frame_lines = FRAME_LINES (frame); | 931 | register EMACS_INT frame_lines = FRAME_LINES (frame); |
diff --git a/src/search.c b/src/search.c index bf93a7fe442..682fa185bbb 100644 --- a/src/search.c +++ b/src/search.c | |||
| @@ -95,10 +95,9 @@ static void save_search_regs (void); | |||
| 95 | static EMACS_INT simple_search (EMACS_INT, unsigned char *, EMACS_INT, | 95 | static EMACS_INT simple_search (EMACS_INT, unsigned char *, EMACS_INT, |
| 96 | EMACS_INT, Lisp_Object, EMACS_INT, EMACS_INT, | 96 | EMACS_INT, Lisp_Object, EMACS_INT, EMACS_INT, |
| 97 | EMACS_INT, EMACS_INT); | 97 | EMACS_INT, EMACS_INT); |
| 98 | static EMACS_INT boyer_moore (EMACS_INT, unsigned char *, EMACS_INT, EMACS_INT, | 98 | static EMACS_INT boyer_moore (EMACS_INT, unsigned char *, EMACS_INT, |
| 99 | Lisp_Object, Lisp_Object, | 99 | Lisp_Object, Lisp_Object, EMACS_INT, |
| 100 | EMACS_INT, EMACS_INT, | 100 | EMACS_INT, int); |
| 101 | EMACS_INT, EMACS_INT, int); | ||
| 102 | static EMACS_INT search_buffer (Lisp_Object, EMACS_INT, EMACS_INT, | 101 | static EMACS_INT search_buffer (Lisp_Object, EMACS_INT, EMACS_INT, |
| 103 | EMACS_INT, EMACS_INT, EMACS_INT, int, | 102 | EMACS_INT, EMACS_INT, EMACS_INT, int, |
| 104 | Lisp_Object, Lisp_Object, int); | 103 | Lisp_Object, Lisp_Object, int); |
| @@ -1416,15 +1415,14 @@ search_buffer (Lisp_Object string, EMACS_INT pos, EMACS_INT pos_byte, | |||
| 1416 | } | 1415 | } |
| 1417 | 1416 | ||
| 1418 | len_byte = pat - patbuf; | 1417 | len_byte = pat - patbuf; |
| 1419 | len = raw_pattern_size; | ||
| 1420 | pat = base_pat = patbuf; | 1418 | pat = base_pat = patbuf; |
| 1421 | 1419 | ||
| 1422 | if (boyer_moore_ok) | 1420 | if (boyer_moore_ok) |
| 1423 | return boyer_moore (n, pat, len, len_byte, trt, inverse_trt, | 1421 | return boyer_moore (n, pat, len_byte, trt, inverse_trt, |
| 1424 | pos, pos_byte, lim, lim_byte, | 1422 | pos_byte, lim_byte, |
| 1425 | char_base); | 1423 | char_base); |
| 1426 | else | 1424 | else |
| 1427 | return simple_search (n, pat, len, len_byte, trt, | 1425 | return simple_search (n, pat, raw_pattern_size, len_byte, trt, |
| 1428 | pos, pos_byte, lim, lim_byte); | 1426 | pos, pos_byte, lim, lim_byte); |
| 1429 | } | 1427 | } |
| 1430 | } | 1428 | } |
| @@ -1636,8 +1634,8 @@ simple_search (EMACS_INT n, unsigned char *pat, | |||
| 1636 | } | 1634 | } |
| 1637 | 1635 | ||
| 1638 | /* Do Boyer-Moore search N times for the string BASE_PAT, | 1636 | /* Do Boyer-Moore search N times for the string BASE_PAT, |
| 1639 | whose length is LEN/LEN_BYTE, | 1637 | whose length is LEN_BYTE, |
| 1640 | from buffer position POS/POS_BYTE until LIM/LIM_BYTE. | 1638 | from buffer position POS_BYTE until LIM_BYTE. |
| 1641 | DIRECTION says which direction we search in. | 1639 | DIRECTION says which direction we search in. |
| 1642 | TRT and INVERSE_TRT are translation tables. | 1640 | TRT and INVERSE_TRT are translation tables. |
| 1643 | Characters in PAT are already translated by TRT. | 1641 | Characters in PAT are already translated by TRT. |
| @@ -1652,10 +1650,10 @@ simple_search (EMACS_INT n, unsigned char *pat, | |||
| 1652 | 1650 | ||
| 1653 | static EMACS_INT | 1651 | static EMACS_INT |
| 1654 | boyer_moore (EMACS_INT n, unsigned char *base_pat, | 1652 | boyer_moore (EMACS_INT n, unsigned char *base_pat, |
| 1655 | EMACS_INT len, EMACS_INT len_byte, | 1653 | EMACS_INT len_byte, |
| 1656 | Lisp_Object trt, Lisp_Object inverse_trt, | 1654 | Lisp_Object trt, Lisp_Object inverse_trt, |
| 1657 | EMACS_INT pos, EMACS_INT pos_byte, | 1655 | EMACS_INT pos_byte, EMACS_INT lim_byte, |
| 1658 | EMACS_INT lim, EMACS_INT lim_byte, int char_base) | 1656 | int char_base) |
| 1659 | { | 1657 | { |
| 1660 | int direction = ((n > 0) ? 1 : -1); | 1658 | int direction = ((n > 0) ? 1 : -1); |
| 1661 | register EMACS_INT dirlen; | 1659 | register EMACS_INT dirlen; |
| @@ -1776,8 +1774,8 @@ boyer_moore (EMACS_INT n, unsigned char *base_pat, | |||
| 1776 | stride_for_teases = BM_tab[j]; | 1774 | stride_for_teases = BM_tab[j]; |
| 1777 | 1775 | ||
| 1778 | BM_tab[j] = dirlen - i; | 1776 | BM_tab[j] = dirlen - i; |
| 1779 | /* A translation table is accompanied by its inverse -- see */ | 1777 | /* A translation table is accompanied by its inverse -- see |
| 1780 | /* comment following downcase_table for details */ | 1778 | comment following downcase_table for details. */ |
| 1781 | if (ch >= 0) | 1779 | if (ch >= 0) |
| 1782 | { | 1780 | { |
| 1783 | int starting_ch = ch; | 1781 | int starting_ch = ch; |
| @@ -2636,11 +2634,8 @@ since only regular expressions have distinguished subexpressions. */) | |||
| 2636 | EMACS_INT substed_alloc_size, substed_len; | 2634 | EMACS_INT substed_alloc_size, substed_len; |
| 2637 | int buf_multibyte = !NILP (BVAR (current_buffer, enable_multibyte_characters)); | 2635 | int buf_multibyte = !NILP (BVAR (current_buffer, enable_multibyte_characters)); |
| 2638 | int str_multibyte = STRING_MULTIBYTE (newtext); | 2636 | int str_multibyte = STRING_MULTIBYTE (newtext); |
| 2639 | Lisp_Object rev_tbl; | ||
| 2640 | int really_changed = 0; | 2637 | int really_changed = 0; |
| 2641 | 2638 | ||
| 2642 | rev_tbl = Qnil; | ||
| 2643 | |||
| 2644 | substed_alloc_size = length * 2 + 100; | 2639 | substed_alloc_size = length * 2 + 100; |
| 2645 | substed = (unsigned char *) xmalloc (substed_alloc_size + 1); | 2640 | substed = (unsigned char *) xmalloc (substed_alloc_size + 1); |
| 2646 | substed_len = 0; | 2641 | substed_len = 0; |
| @@ -2660,7 +2655,7 @@ since only regular expressions have distinguished subexpressions. */) | |||
| 2660 | { | 2655 | { |
| 2661 | FETCH_STRING_CHAR_ADVANCE_NO_CHECK (c, newtext, pos, pos_byte); | 2656 | FETCH_STRING_CHAR_ADVANCE_NO_CHECK (c, newtext, pos, pos_byte); |
| 2662 | if (!buf_multibyte) | 2657 | if (!buf_multibyte) |
| 2663 | c = multibyte_char_to_unibyte (c, rev_tbl); | 2658 | c = multibyte_char_to_unibyte (c); |
| 2664 | } | 2659 | } |
| 2665 | else | 2660 | else |
| 2666 | { | 2661 | { |
| @@ -2683,7 +2678,7 @@ since only regular expressions have distinguished subexpressions. */) | |||
| 2683 | FETCH_STRING_CHAR_ADVANCE_NO_CHECK (c, newtext, | 2678 | FETCH_STRING_CHAR_ADVANCE_NO_CHECK (c, newtext, |
| 2684 | pos, pos_byte); | 2679 | pos, pos_byte); |
| 2685 | if (!buf_multibyte && !ASCII_CHAR_P (c)) | 2680 | if (!buf_multibyte && !ASCII_CHAR_P (c)) |
| 2686 | c = multibyte_char_to_unibyte (c, rev_tbl); | 2681 | c = multibyte_char_to_unibyte (c); |
| 2687 | } | 2682 | } |
| 2688 | else | 2683 | else |
| 2689 | { | 2684 | { |
diff --git a/src/sound.c b/src/sound.c index 3a1668e4903..a2fe7ccc8ce 100644 --- a/src/sound.c +++ b/src/sound.c | |||
| @@ -595,12 +595,12 @@ wav_play (struct sound *s, struct sound_device *sd) | |||
| 595 | files I found so far. If someone feels inclined to implement the | 595 | files I found so far. If someone feels inclined to implement the |
| 596 | whole RIFF-WAVE spec, please do. */ | 596 | whole RIFF-WAVE spec, please do. */ |
| 597 | if (STRINGP (s->data)) | 597 | if (STRINGP (s->data)) |
| 598 | sd->write (sd, SDATA (s->data) + sizeof *header, | 598 | sd->write (sd, SSDATA (s->data) + sizeof *header, |
| 599 | SBYTES (s->data) - sizeof *header); | 599 | SBYTES (s->data) - sizeof *header); |
| 600 | else | 600 | else |
| 601 | { | 601 | { |
| 602 | char *buffer; | 602 | char *buffer; |
| 603 | int nbytes; | 603 | int nbytes = 0; |
| 604 | int blksize = sd->period_size ? sd->period_size (sd) : 2048; | 604 | int blksize = sd->period_size ? sd->period_size (sd) : 2048; |
| 605 | int data_left = header->data_length; | 605 | int data_left = header->data_length; |
| 606 | 606 | ||
| @@ -686,7 +686,7 @@ au_play (struct sound *s, struct sound_device *sd) | |||
| 686 | sd->configure (sd); | 686 | sd->configure (sd); |
| 687 | 687 | ||
| 688 | if (STRINGP (s->data)) | 688 | if (STRINGP (s->data)) |
| 689 | sd->write (sd, SDATA (s->data) + header->data_offset, | 689 | sd->write (sd, SSDATA (s->data) + header->data_offset, |
| 690 | SBYTES (s->data) - header->data_offset); | 690 | SBYTES (s->data) - header->data_offset); |
| 691 | else | 691 | else |
| 692 | { | 692 | { |
| @@ -1104,7 +1104,6 @@ alsa_close (struct sound_device *sd) | |||
| 1104 | static void | 1104 | static void |
| 1105 | alsa_choose_format (struct sound_device *sd, struct sound *s) | 1105 | alsa_choose_format (struct sound_device *sd, struct sound *s) |
| 1106 | { | 1106 | { |
| 1107 | struct alsa_params *p = (struct alsa_params *) sd->data; | ||
| 1108 | if (s->type == RIFF) | 1107 | if (s->type == RIFF) |
| 1109 | { | 1108 | { |
| 1110 | struct wav_header *h = (struct wav_header *) s->header; | 1109 | struct wav_header *h = (struct wav_header *) s->header; |
| @@ -1410,7 +1409,7 @@ Internal use only, use `play-sound' instead. */) | |||
| 1410 | { | 1409 | { |
| 1411 | int len = SCHARS (attrs[SOUND_DEVICE]); | 1410 | int len = SCHARS (attrs[SOUND_DEVICE]); |
| 1412 | current_sound_device->file = (char *) alloca (len + 1); | 1411 | current_sound_device->file = (char *) alloca (len + 1); |
| 1413 | strcpy (current_sound_device->file, SDATA (attrs[SOUND_DEVICE])); | 1412 | strcpy (current_sound_device->file, SSDATA (attrs[SOUND_DEVICE])); |
| 1414 | } | 1413 | } |
| 1415 | 1414 | ||
| 1416 | if (INTEGERP (attrs[SOUND_VOLUME])) | 1415 | if (INTEGERP (attrs[SOUND_VOLUME])) |
| @@ -1498,4 +1497,3 @@ init_sound (void) | |||
| 1498 | } | 1497 | } |
| 1499 | 1498 | ||
| 1500 | #endif /* HAVE_SOUND */ | 1499 | #endif /* HAVE_SOUND */ |
| 1501 | |||
diff --git a/src/syntax.c b/src/syntax.c index c1442c396c1..0a1525b54ea 100644 --- a/src/syntax.c +++ b/src/syntax.c | |||
| @@ -3265,9 +3265,9 @@ do { prev_from = from; \ | |||
| 3265 | = (curlevel == levelstart) ? -1 : (curlevel - 1)->last; | 3265 | = (curlevel == levelstart) ? -1 : (curlevel - 1)->last; |
| 3266 | state.location = from; | 3266 | state.location = from; |
| 3267 | state.levelstarts = Qnil; | 3267 | state.levelstarts = Qnil; |
| 3268 | while (--curlevel >= levelstart) | 3268 | while (curlevel > levelstart) |
| 3269 | state.levelstarts = Fcons (make_number (curlevel->last), | 3269 | state.levelstarts = Fcons (make_number ((--curlevel)->last), |
| 3270 | state.levelstarts); | 3270 | state.levelstarts); |
| 3271 | immediate_quit = 0; | 3271 | immediate_quit = 0; |
| 3272 | 3272 | ||
| 3273 | *stateptr = state; | 3273 | *stateptr = state; |
diff --git a/src/sysdep.c b/src/sysdep.c index 6ef3d88c5c8..1bb400421f0 100644 --- a/src/sysdep.c +++ b/src/sysdep.c | |||
| @@ -449,7 +449,7 @@ child_setup_tty (int out) | |||
| 449 | struct save_signal | 449 | struct save_signal |
| 450 | { | 450 | { |
| 451 | int code; | 451 | int code; |
| 452 | SIGTYPE (*handler) (int); | 452 | void (*handler) (int); |
| 453 | }; | 453 | }; |
| 454 | 454 | ||
| 455 | static void save_signal_handlers (struct save_signal *); | 455 | static void save_signal_handlers (struct save_signal *); |
| @@ -488,7 +488,8 @@ sys_subshell (void) | |||
| 488 | int pid; | 488 | int pid; |
| 489 | struct save_signal saved_handlers[5]; | 489 | struct save_signal saved_handlers[5]; |
| 490 | Lisp_Object dir; | 490 | Lisp_Object dir; |
| 491 | unsigned char * IF_LINT (volatile) str = 0; | 491 | unsigned char *volatile str_volatile = 0; |
| 492 | unsigned char *str; | ||
| 492 | int len; | 493 | int len; |
| 493 | 494 | ||
| 494 | saved_handlers[0].code = SIGINT; | 495 | saved_handlers[0].code = SIGINT; |
| @@ -512,7 +513,7 @@ sys_subshell (void) | |||
| 512 | goto xyzzy; | 513 | goto xyzzy; |
| 513 | 514 | ||
| 514 | dir = expand_and_dir_to_file (Funhandled_file_name_directory (dir), Qnil); | 515 | dir = expand_and_dir_to_file (Funhandled_file_name_directory (dir), Qnil); |
| 515 | str = (unsigned char *) alloca (SCHARS (dir) + 2); | 516 | str_volatile = str = (unsigned char *) alloca (SCHARS (dir) + 2); |
| 516 | len = SCHARS (dir); | 517 | len = SCHARS (dir); |
| 517 | memcpy (str, SDATA (dir), len); | 518 | memcpy (str, SDATA (dir), len); |
| 518 | if (str[len - 1] != '/') str[len++] = '/'; | 519 | if (str[len - 1] != '/') str[len++] = '/'; |
| @@ -544,6 +545,7 @@ sys_subshell (void) | |||
| 544 | sh = "sh"; | 545 | sh = "sh"; |
| 545 | 546 | ||
| 546 | /* Use our buffer's default directory for the subshell. */ | 547 | /* Use our buffer's default directory for the subshell. */ |
| 548 | str = str_volatile; | ||
| 547 | if (str && chdir ((char *) str) != 0) | 549 | if (str && chdir ((char *) str) != 0) |
| 548 | { | 550 | { |
| 549 | #ifndef DOS_NT | 551 | #ifndef DOS_NT |
| @@ -606,7 +608,7 @@ save_signal_handlers (struct save_signal *saved_handlers) | |||
| 606 | while (saved_handlers->code) | 608 | while (saved_handlers->code) |
| 607 | { | 609 | { |
| 608 | saved_handlers->handler | 610 | saved_handlers->handler |
| 609 | = (SIGTYPE (*) (int)) signal (saved_handlers->code, SIG_IGN); | 611 | = (void (*) (int)) signal (saved_handlers->code, SIG_IGN); |
| 610 | saved_handlers++; | 612 | saved_handlers++; |
| 611 | } | 613 | } |
| 612 | } | 614 | } |
diff --git a/src/syssignal.h b/src/syssignal.h index 7b4070322d6..03768168e20 100644 --- a/src/syssignal.h +++ b/src/syssignal.h | |||
| @@ -69,7 +69,7 @@ extern sigset_t sys_sigmask (); | |||
| 69 | 69 | ||
| 70 | /* Whether this is what all systems want or not, this is what | 70 | /* Whether this is what all systems want or not, this is what |
| 71 | appears to be assumed in the source, for example data.c:arith_error. */ | 71 | appears to be assumed in the source, for example data.c:arith_error. */ |
| 72 | typedef RETSIGTYPE (*signal_handler_t) (int); | 72 | typedef void (*signal_handler_t) (int); |
| 73 | 73 | ||
| 74 | signal_handler_t sys_signal (int signal_number, signal_handler_t action); | 74 | signal_handler_t sys_signal (int signal_number, signal_handler_t action); |
| 75 | sigset_t sys_sigblock (sigset_t new_mask); | 75 | sigset_t sys_sigblock (sigset_t new_mask); |
diff --git a/src/term.c b/src/term.c index e84bbe125f8..fc7726298c5 100644 --- a/src/term.c +++ b/src/term.c | |||
| @@ -1952,7 +1952,7 @@ produce_glyphless_glyph (struct it *it, int for_no_font, Lisp_Object acronym) | |||
| 1952 | 1952 | ||
| 1953 | it->pixel_width = len; | 1953 | it->pixel_width = len; |
| 1954 | it->nglyphs = len; | 1954 | it->nglyphs = len; |
| 1955 | if (len > 0 && it->glyph_row) | 1955 | if (it->glyph_row) |
| 1956 | append_glyphless_glyph (it, face_id, str); | 1956 | append_glyphless_glyph (it, face_id, str); |
| 1957 | } | 1957 | } |
| 1958 | 1958 | ||
| @@ -2500,13 +2500,10 @@ A suspended tty may be resumed by calling `resume-tty' on it. */) | |||
| 2500 | /* First run `suspend-tty-functions' and then clean up the tty | 2500 | /* First run `suspend-tty-functions' and then clean up the tty |
| 2501 | state because `suspend-tty-functions' might need to change | 2501 | state because `suspend-tty-functions' might need to change |
| 2502 | the tty state. */ | 2502 | the tty state. */ |
| 2503 | if (!NILP (Vrun_hooks)) | 2503 | Lisp_Object args[2]; |
| 2504 | { | 2504 | args[0] = intern ("suspend-tty-functions"); |
| 2505 | Lisp_Object args[2]; | 2505 | XSETTERMINAL (args[1], t); |
| 2506 | args[0] = intern ("suspend-tty-functions"); | 2506 | Frun_hook_with_args (2, args); |
| 2507 | XSETTERMINAL (args[1], t); | ||
| 2508 | Frun_hook_with_args (2, args); | ||
| 2509 | } | ||
| 2510 | 2507 | ||
| 2511 | reset_sys_modes (t->display_info.tty); | 2508 | reset_sys_modes (t->display_info.tty); |
| 2512 | delete_keyboard_wait_descriptor (fileno (f)); | 2509 | delete_keyboard_wait_descriptor (fileno (f)); |
| @@ -2596,14 +2593,13 @@ frame's terminal). */) | |||
| 2596 | 2593 | ||
| 2597 | init_sys_modes (t->display_info.tty); | 2594 | init_sys_modes (t->display_info.tty); |
| 2598 | 2595 | ||
| 2599 | /* Run `resume-tty-functions'. */ | 2596 | { |
| 2600 | if (!NILP (Vrun_hooks)) | 2597 | /* Run `resume-tty-functions'. */ |
| 2601 | { | 2598 | Lisp_Object args[2]; |
| 2602 | Lisp_Object args[2]; | 2599 | args[0] = intern ("resume-tty-functions"); |
| 2603 | args[0] = intern ("resume-tty-functions"); | 2600 | XSETTERMINAL (args[1], t); |
| 2604 | XSETTERMINAL (args[1], t); | 2601 | Frun_hook_with_args (2, args); |
| 2605 | Frun_hook_with_args (2, args); | 2602 | } |
| 2606 | } | ||
| 2607 | } | 2603 | } |
| 2608 | 2604 | ||
| 2609 | set_tty_hooks (t); | 2605 | set_tty_hooks (t); |
diff --git a/src/terminfo.c b/src/terminfo.c index 905a8edacc7..c0418984efa 100644 --- a/src/terminfo.c +++ b/src/terminfo.c | |||
| @@ -17,6 +17,8 @@ You should have received a copy of the GNU General Public License | |||
| 17 | along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | 17 | along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ |
| 18 | 18 | ||
| 19 | #include <config.h> | 19 | #include <config.h> |
| 20 | #include "tparam.h" | ||
| 21 | |||
| 20 | #include <setjmp.h> | 22 | #include <setjmp.h> |
| 21 | #include "lisp.h" | 23 | #include "lisp.h" |
| 22 | 24 | ||
| @@ -33,18 +35,19 @@ char *UP, *BC, PC; | |||
| 33 | format is different too. | 35 | format is different too. |
| 34 | */ | 36 | */ |
| 35 | 37 | ||
| 38 | extern char *tparm (const char *str, ...); | ||
| 39 | |||
| 40 | |||
| 36 | char * | 41 | char * |
| 37 | tparam (char *string, char *outstring, | 42 | tparam (const char *string, char *outstring, int len, |
| 38 | int len, int arg1, int arg2, int arg3, int arg4, | 43 | int arg1, int arg2, int arg3, int arg4) |
| 39 | int arg5, int arg6, int arg7, int arg8, int arg9) | ||
| 40 | { | 44 | { |
| 41 | char *temp; | 45 | char *temp; |
| 42 | extern char *tparm (char *str, ...); | ||
| 43 | 46 | ||
| 44 | temp = tparm (string, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9); | 47 | /* Emacs always should pass a null OUTSTRING and zero LEN. */ |
| 45 | if (outstring == 0) | 48 | if (outstring || len) |
| 46 | outstring = ((char *) (xmalloc ((strlen (temp)) + 1))); | 49 | abort (); |
| 47 | strcpy (outstring, temp); | ||
| 48 | return outstring; | ||
| 49 | } | ||
| 50 | 50 | ||
| 51 | temp = tparm (string, arg1, arg2, arg3, arg4); | ||
| 52 | return xstrdup (temp); | ||
| 53 | } | ||
diff --git a/src/textprop.c b/src/textprop.c index 5db6033670b..cd89efeb38d 100644 --- a/src/textprop.c +++ b/src/textprop.c | |||
| @@ -974,37 +974,6 @@ past position LIMIT; return LIMIT if nothing is found before LIMIT. */) | |||
| 974 | return make_number (next->position); | 974 | return make_number (next->position); |
| 975 | } | 975 | } |
| 976 | 976 | ||
| 977 | /* Return 1 if there's a change in some property between BEG and END. */ | ||
| 978 | |||
| 979 | int | ||
| 980 | property_change_between_p (EMACS_INT beg, EMACS_INT end) | ||
| 981 | { | ||
| 982 | register INTERVAL i, next; | ||
| 983 | Lisp_Object object, pos; | ||
| 984 | |||
| 985 | XSETBUFFER (object, current_buffer); | ||
| 986 | XSETFASTINT (pos, beg); | ||
| 987 | |||
| 988 | i = validate_interval_range (object, &pos, &pos, soft); | ||
| 989 | if (NULL_INTERVAL_P (i)) | ||
| 990 | return 0; | ||
| 991 | |||
| 992 | next = next_interval (i); | ||
| 993 | while (! NULL_INTERVAL_P (next) && intervals_equal (i, next)) | ||
| 994 | { | ||
| 995 | next = next_interval (next); | ||
| 996 | if (NULL_INTERVAL_P (next)) | ||
| 997 | return 0; | ||
| 998 | if (next->position >= end) | ||
| 999 | return 0; | ||
| 1000 | } | ||
| 1001 | |||
| 1002 | if (NULL_INTERVAL_P (next)) | ||
| 1003 | return 0; | ||
| 1004 | |||
| 1005 | return 1; | ||
| 1006 | } | ||
| 1007 | |||
| 1008 | DEFUN ("next-single-property-change", Fnext_single_property_change, | 977 | DEFUN ("next-single-property-change", Fnext_single_property_change, |
| 1009 | Snext_single_property_change, 2, 4, 0, | 978 | Snext_single_property_change, 2, 4, 0, |
| 1010 | doc: /* Return the position of next property change for a specific property. | 979 | doc: /* Return the position of next property change for a specific property. |
| @@ -2331,4 +2300,3 @@ inherits it if NONSTICKINESS is nil. The `front-sticky' and | |||
| 2331 | /* defsubr (&Serase_text_properties); */ | 2300 | /* defsubr (&Serase_text_properties); */ |
| 2332 | /* defsubr (&Scopy_text_properties); */ | 2301 | /* defsubr (&Scopy_text_properties); */ |
| 2333 | } | 2302 | } |
| 2334 | |||
diff --git a/src/tparam.h b/src/tparam.h index 3cd3e6053cc..dc4cdfaa28c 100644 --- a/src/tparam.h +++ b/src/tparam.h | |||
| @@ -29,3 +29,7 @@ char *tgetstr (const char *, char **); | |||
| 29 | char *tgoto (const char *, int, int); | 29 | char *tgoto (const char *, int, int); |
| 30 | 30 | ||
| 31 | char *tparam (const char *, char *, int, int, int, int, int); | 31 | char *tparam (const char *, char *, int, int, int, int, int); |
| 32 | |||
| 33 | extern char PC; | ||
| 34 | extern char *BC; | ||
| 35 | extern char *UP; | ||
diff --git a/src/unexelf.c b/src/unexelf.c index b58c78501b8..8b45894f853 100644 --- a/src/unexelf.c +++ b/src/unexelf.c | |||
| @@ -651,7 +651,9 @@ unexec (const char *new_name, const char *old_name) | |||
| 651 | int n, nn; | 651 | int n, nn; |
| 652 | int old_bss_index, old_sbss_index, old_plt_index; | 652 | int old_bss_index, old_sbss_index, old_plt_index; |
| 653 | int old_data_index, new_data2_index; | 653 | int old_data_index, new_data2_index; |
| 654 | #if defined _SYSTYPE_SYSV || defined __sgi | ||
| 654 | int old_mdebug_index; | 655 | int old_mdebug_index; |
| 656 | #endif | ||
| 655 | struct stat stat_buf; | 657 | struct stat stat_buf; |
| 656 | int old_file_size; | 658 | int old_file_size; |
| 657 | 659 | ||
| @@ -695,8 +697,10 @@ unexec (const char *new_name, const char *old_name) | |||
| 695 | 697 | ||
| 696 | /* Find the mdebug section, if any. */ | 698 | /* Find the mdebug section, if any. */ |
| 697 | 699 | ||
| 700 | #if defined _SYSTYPE_SYSV || defined __sgi | ||
| 698 | old_mdebug_index = find_section (".mdebug", old_section_names, | 701 | old_mdebug_index = find_section (".mdebug", old_section_names, |
| 699 | old_name, old_file_h, old_section_h, 1); | 702 | old_name, old_file_h, old_section_h, 1); |
| 703 | #endif | ||
| 700 | 704 | ||
| 701 | /* Find the old .bss section. Figure out parameters of the new | 705 | /* Find the old .bss section. Figure out parameters of the new |
| 702 | data2 and bss sections. */ | 706 | data2 and bss sections. */ |
diff --git a/src/unexw32.c b/src/unexw32.c index cd8211d6bee..e03fa6c9b9a 100644 --- a/src/unexw32.c +++ b/src/unexw32.c | |||
| @@ -341,7 +341,6 @@ get_section_info (file_data *p_infile) | |||
| 341 | { | 341 | { |
| 342 | PIMAGE_DOS_HEADER dos_header; | 342 | PIMAGE_DOS_HEADER dos_header; |
| 343 | PIMAGE_NT_HEADERS nt_header; | 343 | PIMAGE_NT_HEADERS nt_header; |
| 344 | PIMAGE_SECTION_HEADER section; | ||
| 345 | int overlap; | 344 | int overlap; |
| 346 | 345 | ||
| 347 | dos_header = (PIMAGE_DOS_HEADER) p_infile->file_base; | 346 | dos_header = (PIMAGE_DOS_HEADER) p_infile->file_base; |
| @@ -1505,6 +1505,7 @@ w32_get_resource (char *key, LPDWORD lpdwtype) | |||
| 1505 | } | 1505 | } |
| 1506 | 1506 | ||
| 1507 | char *get_emacs_configuration (void); | 1507 | char *get_emacs_configuration (void); |
| 1508 | |||
| 1508 | void | 1509 | void |
| 1509 | init_environment (char ** argv) | 1510 | init_environment (char ** argv) |
| 1510 | { | 1511 | { |
| @@ -1591,25 +1592,25 @@ init_environment (char ** argv) | |||
| 1591 | If not, then we can try to default to the appdata directory under the | 1592 | If not, then we can try to default to the appdata directory under the |
| 1592 | user's profile, which is more likely to be writable. */ | 1593 | user's profile, which is more likely to be writable. */ |
| 1593 | if (stat ("C:/.emacs", &ignored) < 0) | 1594 | if (stat ("C:/.emacs", &ignored) < 0) |
| 1594 | { | 1595 | { |
| 1595 | HRESULT profile_result; | 1596 | HRESULT profile_result; |
| 1596 | /* Dynamically load ShGetFolderPath, as it won't exist on versions | 1597 | /* Dynamically load ShGetFolderPath, as it won't exist on versions |
| 1597 | of Windows 95 and NT4 that have not been updated to include | 1598 | of Windows 95 and NT4 that have not been updated to include |
| 1598 | MSIE 5. */ | 1599 | MSIE 5. */ |
| 1599 | ShGetFolderPath_fn get_folder_path; | 1600 | ShGetFolderPath_fn get_folder_path; |
| 1600 | get_folder_path = (ShGetFolderPath_fn) | 1601 | get_folder_path = (ShGetFolderPath_fn) |
| 1601 | GetProcAddress (GetModuleHandle ("shell32.dll"), "SHGetFolderPathA"); | 1602 | GetProcAddress (GetModuleHandle ("shell32.dll"), "SHGetFolderPathA"); |
| 1602 | 1603 | ||
| 1603 | if (get_folder_path != NULL) | 1604 | if (get_folder_path != NULL) |
| 1604 | { | 1605 | { |
| 1605 | profile_result = get_folder_path (NULL, CSIDL_APPDATA, NULL, | 1606 | profile_result = get_folder_path (NULL, CSIDL_APPDATA, NULL, |
| 1606 | 0, default_home); | 1607 | 0, default_home); |
| 1607 | 1608 | ||
| 1608 | /* If we can't get the appdata dir, revert to old behavior. */ | 1609 | /* If we can't get the appdata dir, revert to old behavior. */ |
| 1609 | if (profile_result == S_OK) | 1610 | if (profile_result == S_OK) |
| 1610 | env_vars[0].def_value = default_home; | 1611 | env_vars[0].def_value = default_home; |
| 1611 | } | 1612 | } |
| 1612 | } | 1613 | } |
| 1613 | 1614 | ||
| 1614 | /* Get default locale info and use it for LANG. */ | 1615 | /* Get default locale info and use it for LANG. */ |
| 1615 | if (GetLocaleInfo (LOCALE_USER_DEFAULT, | 1616 | if (GetLocaleInfo (LOCALE_USER_DEFAULT, |
| @@ -2082,42 +2083,42 @@ GetCachedVolumeInformation (char * root_dir) | |||
| 2082 | info = lookup_volume_info (root_dir); | 2083 | info = lookup_volume_info (root_dir); |
| 2083 | 2084 | ||
| 2084 | if (info == NULL || ! VOLINFO_STILL_VALID (root_dir, info)) | 2085 | if (info == NULL || ! VOLINFO_STILL_VALID (root_dir, info)) |
| 2085 | { | 2086 | { |
| 2086 | char name[ 256 ]; | 2087 | char name[ 256 ]; |
| 2087 | DWORD serialnum; | 2088 | DWORD serialnum; |
| 2088 | DWORD maxcomp; | 2089 | DWORD maxcomp; |
| 2089 | DWORD flags; | 2090 | DWORD flags; |
| 2090 | char type[ 256 ]; | 2091 | char type[ 256 ]; |
| 2091 | 2092 | ||
| 2092 | /* Info is not cached, or is stale. */ | 2093 | /* Info is not cached, or is stale. */ |
| 2093 | if (!GetVolumeInformation (root_dir, | 2094 | if (!GetVolumeInformation (root_dir, |
| 2094 | name, sizeof (name), | 2095 | name, sizeof (name), |
| 2095 | &serialnum, | 2096 | &serialnum, |
| 2096 | &maxcomp, | 2097 | &maxcomp, |
| 2097 | &flags, | 2098 | &flags, |
| 2098 | type, sizeof (type))) | 2099 | type, sizeof (type))) |
| 2099 | return NULL; | 2100 | return NULL; |
| 2100 | 2101 | ||
| 2101 | /* Cache the volume information for future use, overwriting existing | 2102 | /* Cache the volume information for future use, overwriting existing |
| 2102 | entry if present. */ | 2103 | entry if present. */ |
| 2103 | if (info == NULL) | 2104 | if (info == NULL) |
| 2104 | { | 2105 | { |
| 2105 | info = (volume_info_data *) xmalloc (sizeof (volume_info_data)); | 2106 | info = (volume_info_data *) xmalloc (sizeof (volume_info_data)); |
| 2106 | add_volume_info (root_dir, info); | 2107 | add_volume_info (root_dir, info); |
| 2107 | } | 2108 | } |
| 2108 | else | 2109 | else |
| 2109 | { | 2110 | { |
| 2110 | xfree (info->name); | 2111 | xfree (info->name); |
| 2111 | xfree (info->type); | 2112 | xfree (info->type); |
| 2112 | } | 2113 | } |
| 2113 | 2114 | ||
| 2114 | info->name = xstrdup (name); | 2115 | info->name = xstrdup (name); |
| 2115 | info->serialnum = serialnum; | 2116 | info->serialnum = serialnum; |
| 2116 | info->maxcomp = maxcomp; | 2117 | info->maxcomp = maxcomp; |
| 2117 | info->flags = flags; | 2118 | info->flags = flags; |
| 2118 | info->type = xstrdup (type); | 2119 | info->type = xstrdup (type); |
| 2119 | info->timestamp = GetTickCount (); | 2120 | info->timestamp = GetTickCount (); |
| 2120 | } | 2121 | } |
| 2121 | 2122 | ||
| 2122 | return info; | 2123 | return info; |
| 2123 | } | 2124 | } |
| @@ -2376,8 +2377,8 @@ readdir (DIR *dirp) | |||
| 2376 | if (wnet_enum_handle != INVALID_HANDLE_VALUE) | 2377 | if (wnet_enum_handle != INVALID_HANDLE_VALUE) |
| 2377 | { | 2378 | { |
| 2378 | if (!read_unc_volume (wnet_enum_handle, | 2379 | if (!read_unc_volume (wnet_enum_handle, |
| 2379 | dir_find_data.cFileName, | 2380 | dir_find_data.cFileName, |
| 2380 | MAX_PATH)) | 2381 | MAX_PATH)) |
| 2381 | return NULL; | 2382 | return NULL; |
| 2382 | } | 2383 | } |
| 2383 | /* If we aren't dir_finding, do a find-first, otherwise do a find-next. */ | 2384 | /* If we aren't dir_finding, do a find-first, otherwise do a find-next. */ |
| @@ -2487,7 +2488,7 @@ read_unc_volume (HANDLE henum, char *readbuf, int size) | |||
| 2487 | 2488 | ||
| 2488 | count = 1; | 2489 | count = 1; |
| 2489 | buffer = alloca (bufsize); | 2490 | buffer = alloca (bufsize); |
| 2490 | result = WNetEnumResource (wnet_enum_handle, &count, buffer, &bufsize); | 2491 | result = WNetEnumResource (henum, &count, buffer, &bufsize); |
| 2491 | if (result != NO_ERROR) | 2492 | if (result != NO_ERROR) |
| 2492 | return NULL; | 2493 | return NULL; |
| 2493 | 2494 | ||
| @@ -3250,8 +3251,6 @@ int | |||
| 3250 | stat (const char * path, struct stat * buf) | 3251 | stat (const char * path, struct stat * buf) |
| 3251 | { | 3252 | { |
| 3252 | char *name, *r; | 3253 | char *name, *r; |
| 3253 | char drive_root[4]; | ||
| 3254 | UINT devtype; | ||
| 3255 | WIN32_FIND_DATA wfd; | 3254 | WIN32_FIND_DATA wfd; |
| 3256 | HANDLE fh; | 3255 | HANDLE fh; |
| 3257 | unsigned __int64 fake_inode; | 3256 | unsigned __int64 fake_inode; |
| @@ -4043,7 +4042,6 @@ system_process_attributes (Lisp_Object pid) | |||
| 4043 | TOKEN_PRIMARY_GROUP group_token; | 4042 | TOKEN_PRIMARY_GROUP group_token; |
| 4044 | unsigned euid; | 4043 | unsigned euid; |
| 4045 | unsigned egid; | 4044 | unsigned egid; |
| 4046 | DWORD sess; | ||
| 4047 | PROCESS_MEMORY_COUNTERS mem; | 4045 | PROCESS_MEMORY_COUNTERS mem; |
| 4048 | PROCESS_MEMORY_COUNTERS_EX mem_ex; | 4046 | PROCESS_MEMORY_COUNTERS_EX mem_ex; |
| 4049 | DWORD minrss, maxrss; | 4047 | DWORD minrss, maxrss; |
| @@ -4520,75 +4518,75 @@ struct { | |||
| 4520 | int errnum; | 4518 | int errnum; |
| 4521 | char * msg; | 4519 | char * msg; |
| 4522 | } _wsa_errlist[] = { | 4520 | } _wsa_errlist[] = { |
| 4523 | WSAEINTR , "Interrupted function call", | 4521 | {WSAEINTR , "Interrupted function call"}, |
| 4524 | WSAEBADF , "Bad file descriptor", | 4522 | {WSAEBADF , "Bad file descriptor"}, |
| 4525 | WSAEACCES , "Permission denied", | 4523 | {WSAEACCES , "Permission denied"}, |
| 4526 | WSAEFAULT , "Bad address", | 4524 | {WSAEFAULT , "Bad address"}, |
| 4527 | WSAEINVAL , "Invalid argument", | 4525 | {WSAEINVAL , "Invalid argument"}, |
| 4528 | WSAEMFILE , "Too many open files", | 4526 | {WSAEMFILE , "Too many open files"}, |
| 4529 | 4527 | ||
| 4530 | WSAEWOULDBLOCK , "Resource temporarily unavailable", | 4528 | {WSAEWOULDBLOCK , "Resource temporarily unavailable"}, |
| 4531 | WSAEINPROGRESS , "Operation now in progress", | 4529 | {WSAEINPROGRESS , "Operation now in progress"}, |
| 4532 | WSAEALREADY , "Operation already in progress", | 4530 | {WSAEALREADY , "Operation already in progress"}, |
| 4533 | WSAENOTSOCK , "Socket operation on non-socket", | 4531 | {WSAENOTSOCK , "Socket operation on non-socket"}, |
| 4534 | WSAEDESTADDRREQ , "Destination address required", | 4532 | {WSAEDESTADDRREQ , "Destination address required"}, |
| 4535 | WSAEMSGSIZE , "Message too long", | 4533 | {WSAEMSGSIZE , "Message too long"}, |
| 4536 | WSAEPROTOTYPE , "Protocol wrong type for socket", | 4534 | {WSAEPROTOTYPE , "Protocol wrong type for socket"}, |
| 4537 | WSAENOPROTOOPT , "Bad protocol option", | 4535 | {WSAENOPROTOOPT , "Bad protocol option"}, |
| 4538 | WSAEPROTONOSUPPORT , "Protocol not supported", | 4536 | {WSAEPROTONOSUPPORT , "Protocol not supported"}, |
| 4539 | WSAESOCKTNOSUPPORT , "Socket type not supported", | 4537 | {WSAESOCKTNOSUPPORT , "Socket type not supported"}, |
| 4540 | WSAEOPNOTSUPP , "Operation not supported", | 4538 | {WSAEOPNOTSUPP , "Operation not supported"}, |
| 4541 | WSAEPFNOSUPPORT , "Protocol family not supported", | 4539 | {WSAEPFNOSUPPORT , "Protocol family not supported"}, |
| 4542 | WSAEAFNOSUPPORT , "Address family not supported by protocol family", | 4540 | {WSAEAFNOSUPPORT , "Address family not supported by protocol family"}, |
| 4543 | WSAEADDRINUSE , "Address already in use", | 4541 | {WSAEADDRINUSE , "Address already in use"}, |
| 4544 | WSAEADDRNOTAVAIL , "Cannot assign requested address", | 4542 | {WSAEADDRNOTAVAIL , "Cannot assign requested address"}, |
| 4545 | WSAENETDOWN , "Network is down", | 4543 | {WSAENETDOWN , "Network is down"}, |
| 4546 | WSAENETUNREACH , "Network is unreachable", | 4544 | {WSAENETUNREACH , "Network is unreachable"}, |
| 4547 | WSAENETRESET , "Network dropped connection on reset", | 4545 | {WSAENETRESET , "Network dropped connection on reset"}, |
| 4548 | WSAECONNABORTED , "Software caused connection abort", | 4546 | {WSAECONNABORTED , "Software caused connection abort"}, |
| 4549 | WSAECONNRESET , "Connection reset by peer", | 4547 | {WSAECONNRESET , "Connection reset by peer"}, |
| 4550 | WSAENOBUFS , "No buffer space available", | 4548 | {WSAENOBUFS , "No buffer space available"}, |
| 4551 | WSAEISCONN , "Socket is already connected", | 4549 | {WSAEISCONN , "Socket is already connected"}, |
| 4552 | WSAENOTCONN , "Socket is not connected", | 4550 | {WSAENOTCONN , "Socket is not connected"}, |
| 4553 | WSAESHUTDOWN , "Cannot send after socket shutdown", | 4551 | {WSAESHUTDOWN , "Cannot send after socket shutdown"}, |
| 4554 | WSAETOOMANYREFS , "Too many references", /* not sure */ | 4552 | {WSAETOOMANYREFS , "Too many references"}, /* not sure */ |
| 4555 | WSAETIMEDOUT , "Connection timed out", | 4553 | {WSAETIMEDOUT , "Connection timed out"}, |
| 4556 | WSAECONNREFUSED , "Connection refused", | 4554 | {WSAECONNREFUSED , "Connection refused"}, |
| 4557 | WSAELOOP , "Network loop", /* not sure */ | 4555 | {WSAELOOP , "Network loop"}, /* not sure */ |
| 4558 | WSAENAMETOOLONG , "Name is too long", | 4556 | {WSAENAMETOOLONG , "Name is too long"}, |
| 4559 | WSAEHOSTDOWN , "Host is down", | 4557 | {WSAEHOSTDOWN , "Host is down"}, |
| 4560 | WSAEHOSTUNREACH , "No route to host", | 4558 | {WSAEHOSTUNREACH , "No route to host"}, |
| 4561 | WSAENOTEMPTY , "Buffer not empty", /* not sure */ | 4559 | {WSAENOTEMPTY , "Buffer not empty"}, /* not sure */ |
| 4562 | WSAEPROCLIM , "Too many processes", | 4560 | {WSAEPROCLIM , "Too many processes"}, |
| 4563 | WSAEUSERS , "Too many users", /* not sure */ | 4561 | {WSAEUSERS , "Too many users"}, /* not sure */ |
| 4564 | WSAEDQUOT , "Double quote in host name", /* really not sure */ | 4562 | {WSAEDQUOT , "Double quote in host name"}, /* really not sure */ |
| 4565 | WSAESTALE , "Data is stale", /* not sure */ | 4563 | {WSAESTALE , "Data is stale"}, /* not sure */ |
| 4566 | WSAEREMOTE , "Remote error", /* not sure */ | 4564 | {WSAEREMOTE , "Remote error"}, /* not sure */ |
| 4567 | 4565 | ||
| 4568 | WSASYSNOTREADY , "Network subsystem is unavailable", | 4566 | {WSASYSNOTREADY , "Network subsystem is unavailable"}, |
| 4569 | WSAVERNOTSUPPORTED , "WINSOCK.DLL version out of range", | 4567 | {WSAVERNOTSUPPORTED , "WINSOCK.DLL version out of range"}, |
| 4570 | WSANOTINITIALISED , "Winsock not initialized successfully", | 4568 | {WSANOTINITIALISED , "Winsock not initialized successfully"}, |
| 4571 | WSAEDISCON , "Graceful shutdown in progress", | 4569 | {WSAEDISCON , "Graceful shutdown in progress"}, |
| 4572 | #ifdef WSAENOMORE | 4570 | #ifdef WSAENOMORE |
| 4573 | WSAENOMORE , "No more operations allowed", /* not sure */ | 4571 | {WSAENOMORE , "No more operations allowed"}, /* not sure */ |
| 4574 | WSAECANCELLED , "Operation cancelled", /* not sure */ | 4572 | {WSAECANCELLED , "Operation cancelled"}, /* not sure */ |
| 4575 | WSAEINVALIDPROCTABLE , "Invalid procedure table from service provider", | 4573 | {WSAEINVALIDPROCTABLE , "Invalid procedure table from service provider"}, |
| 4576 | WSAEINVALIDPROVIDER , "Invalid service provider version number", | 4574 | {WSAEINVALIDPROVIDER , "Invalid service provider version number"}, |
| 4577 | WSAEPROVIDERFAILEDINIT , "Unable to initialize a service provider", | 4575 | {WSAEPROVIDERFAILEDINIT , "Unable to initialize a service provider"}, |
| 4578 | WSASYSCALLFAILURE , "System call failure", | 4576 | {WSASYSCALLFAILURE , "System call failure"}, |
| 4579 | WSASERVICE_NOT_FOUND , "Service not found", /* not sure */ | 4577 | {WSASERVICE_NOT_FOUND , "Service not found"}, /* not sure */ |
| 4580 | WSATYPE_NOT_FOUND , "Class type not found", | 4578 | {WSATYPE_NOT_FOUND , "Class type not found"}, |
| 4581 | WSA_E_NO_MORE , "No more resources available", /* really not sure */ | 4579 | {WSA_E_NO_MORE , "No more resources available"}, /* really not sure */ |
| 4582 | WSA_E_CANCELLED , "Operation already cancelled", /* really not sure */ | 4580 | {WSA_E_CANCELLED , "Operation already cancelled"}, /* really not sure */ |
| 4583 | WSAEREFUSED , "Operation refused", /* not sure */ | 4581 | {WSAEREFUSED , "Operation refused"}, /* not sure */ |
| 4584 | #endif | 4582 | #endif |
| 4585 | 4583 | ||
| 4586 | WSAHOST_NOT_FOUND , "Host not found", | 4584 | {WSAHOST_NOT_FOUND , "Host not found"}, |
| 4587 | WSATRY_AGAIN , "Authoritative host not found during name lookup", | 4585 | {WSATRY_AGAIN , "Authoritative host not found during name lookup"}, |
| 4588 | WSANO_RECOVERY , "Non-recoverable error during name lookup", | 4586 | {WSANO_RECOVERY , "Non-recoverable error during name lookup"}, |
| 4589 | WSANO_DATA , "Valid name, no data record of requested type", | 4587 | {WSANO_DATA , "Valid name, no data record of requested type"}, |
| 4590 | 4588 | ||
| 4591 | -1, NULL | 4589 | {-1, NULL} |
| 4592 | }; | 4590 | }; |
| 4593 | 4591 | ||
| 4594 | char * | 4592 | char * |
| @@ -5408,7 +5406,6 @@ sys_read (int fd, char * buffer, unsigned int count) | |||
| 5408 | { | 5406 | { |
| 5409 | HANDLE hnd = fd_info[fd].hnd; | 5407 | HANDLE hnd = fd_info[fd].hnd; |
| 5410 | OVERLAPPED *ovl = &fd_info[fd].cp->ovl_read; | 5408 | OVERLAPPED *ovl = &fd_info[fd].cp->ovl_read; |
| 5411 | DWORD err = 0; | ||
| 5412 | int rc = 0; | 5409 | int rc = 0; |
| 5413 | COMMTIMEOUTS ct; | 5410 | COMMTIMEOUTS ct; |
| 5414 | 5411 | ||
diff --git a/src/w32fns.c b/src/w32fns.c index 0c899cdceff..821cc671646 100644 --- a/src/w32fns.c +++ b/src/w32fns.c | |||
| @@ -183,7 +183,7 @@ unsigned int msh_mousewheel = 0; | |||
| 183 | #define MENU_FREE_DELAY 1000 | 183 | #define MENU_FREE_DELAY 1000 |
| 184 | static unsigned menu_free_timer = 0; | 184 | static unsigned menu_free_timer = 0; |
| 185 | 185 | ||
| 186 | #ifdef GLYPH_DEBUG | 186 | #if GLYPH_DEBUG |
| 187 | int image_cache_refcount, dpyinfo_refcount; | 187 | int image_cache_refcount, dpyinfo_refcount; |
| 188 | #endif | 188 | #endif |
| 189 | 189 | ||
| @@ -1527,7 +1527,6 @@ void | |||
| 1527 | x_set_menu_bar_lines (struct frame *f, Lisp_Object value, Lisp_Object oldval) | 1527 | x_set_menu_bar_lines (struct frame *f, Lisp_Object value, Lisp_Object oldval) |
| 1528 | { | 1528 | { |
| 1529 | int nlines; | 1529 | int nlines; |
| 1530 | int olines = FRAME_MENU_BAR_LINES (f); | ||
| 1531 | 1530 | ||
| 1532 | /* Right now, menu bars don't work properly in minibuf-only frames; | 1531 | /* Right now, menu bars don't work properly in minibuf-only frames; |
| 1533 | most of the commands try to apply themselves to the minibuffer | 1532 | most of the commands try to apply themselves to the minibuffer |
| @@ -2863,7 +2862,6 @@ w32_wnd_proc (HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam) | |||
| 2863 | base character (ie. translating the base key plus | 2862 | base character (ie. translating the base key plus |
| 2864 | shift modifier). */ | 2863 | shift modifier). */ |
| 2865 | int add; | 2864 | int add; |
| 2866 | int isdead = 0; | ||
| 2867 | KEY_EVENT_RECORD key; | 2865 | KEY_EVENT_RECORD key; |
| 2868 | 2866 | ||
| 2869 | key.bKeyDown = TRUE; | 2867 | key.bKeyDown = TRUE; |
| @@ -2951,7 +2949,7 @@ w32_wnd_proc (HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam) | |||
| 2951 | HIMC context = get_ime_context_fn (hwnd); | 2949 | HIMC context = get_ime_context_fn (hwnd); |
| 2952 | wmsg.dwModifiers = w32_get_key_modifiers (wParam, lParam); | 2950 | wmsg.dwModifiers = w32_get_key_modifiers (wParam, lParam); |
| 2953 | /* Get buffer size. */ | 2951 | /* Get buffer size. */ |
| 2954 | size = get_composition_string_fn (context, GCS_RESULTSTR, buffer, 0); | 2952 | size = get_composition_string_fn (context, GCS_RESULTSTR, NULL, 0); |
| 2955 | buffer = alloca (size); | 2953 | buffer = alloca (size); |
| 2956 | size = get_composition_string_fn (context, GCS_RESULTSTR, | 2954 | size = get_composition_string_fn (context, GCS_RESULTSTR, |
| 2957 | buffer, size); | 2955 | buffer, size); |
| @@ -3981,7 +3979,7 @@ unwind_create_frame (Lisp_Object frame) | |||
| 3981 | /* If frame is ``official'', nothing to do. */ | 3979 | /* If frame is ``official'', nothing to do. */ |
| 3982 | if (!CONSP (Vframe_list) || !EQ (XCAR (Vframe_list), frame)) | 3980 | if (!CONSP (Vframe_list) || !EQ (XCAR (Vframe_list), frame)) |
| 3983 | { | 3981 | { |
| 3984 | #ifdef GLYPH_DEBUG | 3982 | #if GLYPH_DEBUG |
| 3985 | struct w32_display_info *dpyinfo = FRAME_W32_DISPLAY_INFO (f); | 3983 | struct w32_display_info *dpyinfo = FRAME_W32_DISPLAY_INFO (f); |
| 3986 | #endif | 3984 | #endif |
| 3987 | 3985 | ||
| @@ -4522,8 +4520,6 @@ DISPLAY should be either a frame or a display name (a string). | |||
| 4522 | If omitted or nil, that stands for the selected frame's display. */) | 4520 | If omitted or nil, that stands for the selected frame's display. */) |
| 4523 | (Lisp_Object display) | 4521 | (Lisp_Object display) |
| 4524 | { | 4522 | { |
| 4525 | struct w32_display_info *dpyinfo = check_x_display_info (display); | ||
| 4526 | |||
| 4527 | return make_number (1); | 4523 | return make_number (1); |
| 4528 | } | 4524 | } |
| 4529 | 4525 | ||
| @@ -4820,7 +4816,6 @@ If DISPLAY is nil, that stands for the selected frame's display. */) | |||
| 4820 | (Lisp_Object display) | 4816 | (Lisp_Object display) |
| 4821 | { | 4817 | { |
| 4822 | struct w32_display_info *dpyinfo = check_x_display_info (display); | 4818 | struct w32_display_info *dpyinfo = check_x_display_info (display); |
| 4823 | int i; | ||
| 4824 | 4819 | ||
| 4825 | if (dpyinfo->reference_count > 0) | 4820 | if (dpyinfo->reference_count > 0) |
| 4826 | error ("Display still has frames on it"); | 4821 | error ("Display still has frames on it"); |
| @@ -5173,7 +5168,7 @@ x_create_tip_frame (struct w32_display_info *dpyinfo, | |||
| 5173 | Lisp_Object parms, Lisp_Object text) | 5168 | Lisp_Object parms, Lisp_Object text) |
| 5174 | { | 5169 | { |
| 5175 | struct frame *f; | 5170 | struct frame *f; |
| 5176 | Lisp_Object frame, tem; | 5171 | Lisp_Object frame; |
| 5177 | Lisp_Object name; | 5172 | Lisp_Object name; |
| 5178 | long window_prompting = 0; | 5173 | long window_prompting = 0; |
| 5179 | int width, height; | 5174 | int width, height; |
diff --git a/src/w32font.c b/src/w32font.c index 40ff0782b88..d86107bc6d5 100644 --- a/src/w32font.c +++ b/src/w32font.c | |||
| @@ -533,6 +533,7 @@ w32font_draw (struct glyph_string *s, int from, int to, | |||
| 533 | { | 533 | { |
| 534 | UINT options; | 534 | UINT options; |
| 535 | HRGN orig_clip = NULL; | 535 | HRGN orig_clip = NULL; |
| 536 | int len = to - from; | ||
| 536 | struct w32font_info *w32font = (struct w32font_info *) s->font; | 537 | struct w32font_info *w32font = (struct w32font_info *) s->font; |
| 537 | 538 | ||
| 538 | options = w32font->glyph_idx; | 539 | options = w32font->glyph_idx; |
| @@ -581,14 +582,14 @@ w32font_draw (struct glyph_string *s, int from, int to, | |||
| 581 | 582 | ||
| 582 | if (s->padding_p) | 583 | if (s->padding_p) |
| 583 | { | 584 | { |
| 584 | int len = to - from, i; | 585 | int i; |
| 585 | 586 | ||
| 586 | for (i = 0; i < len; i++) | 587 | for (i = 0; i < len; i++) |
| 587 | ExtTextOutW (s->hdc, x + i, y, options, NULL, | 588 | ExtTextOutW (s->hdc, x + i, y, options, NULL, |
| 588 | s->char2b + from + i, 1, NULL); | 589 | s->char2b + from + i, 1, NULL); |
| 589 | } | 590 | } |
| 590 | else | 591 | else |
| 591 | ExtTextOutW (s->hdc, x, y, options, NULL, s->char2b + from, to - from, NULL); | 592 | ExtTextOutW (s->hdc, x, y, options, NULL, s->char2b + from, len, NULL); |
| 592 | 593 | ||
| 593 | /* Restore clip region. */ | 594 | /* Restore clip region. */ |
| 594 | if (s->num_clips > 0) | 595 | if (s->num_clips > 0) |
| @@ -596,6 +597,8 @@ w32font_draw (struct glyph_string *s, int from, int to, | |||
| 596 | 597 | ||
| 597 | if (orig_clip) | 598 | if (orig_clip) |
| 598 | DeleteObject (orig_clip); | 599 | DeleteObject (orig_clip); |
| 600 | |||
| 601 | return len; | ||
| 599 | } | 602 | } |
| 600 | 603 | ||
| 601 | /* w32 implementation of free_entity for font backend. | 604 | /* w32 implementation of free_entity for font backend. |
| @@ -774,7 +777,7 @@ int | |||
| 774 | w32font_open_internal (FRAME_PTR f, Lisp_Object font_entity, | 777 | w32font_open_internal (FRAME_PTR f, Lisp_Object font_entity, |
| 775 | int pixel_size, Lisp_Object font_object) | 778 | int pixel_size, Lisp_Object font_object) |
| 776 | { | 779 | { |
| 777 | int len, size, i; | 780 | int len, size; |
| 778 | LOGFONT logfont; | 781 | LOGFONT logfont; |
| 779 | HDC dc; | 782 | HDC dc; |
| 780 | HFONT hfont, old_font; | 783 | HFONT hfont, old_font; |
| @@ -2418,6 +2421,7 @@ struct font_driver w32font_driver = | |||
| 2418 | NULL, /* check */ | 2421 | NULL, /* check */ |
| 2419 | NULL, /* get_variation_glyphs */ | 2422 | NULL, /* get_variation_glyphs */ |
| 2420 | w32font_filter_properties, | 2423 | w32font_filter_properties, |
| 2424 | NULL, /* cached_font_ok */ | ||
| 2421 | }; | 2425 | }; |
| 2422 | 2426 | ||
| 2423 | 2427 | ||
diff --git a/src/w32inevt.c b/src/w32inevt.c index c4858dea908..465f5ccb70f 100644 --- a/src/w32inevt.c +++ b/src/w32inevt.c | |||
| @@ -677,7 +677,6 @@ w32_console_read_socket (struct terminal *terminal, | |||
| 677 | int expected, | 677 | int expected, |
| 678 | struct input_event *hold_quit) | 678 | struct input_event *hold_quit) |
| 679 | { | 679 | { |
| 680 | BOOL no_events = TRUE; | ||
| 681 | int nev, ret = 0, add; | 680 | int nev, ret = 0, add; |
| 682 | int isdead; | 681 | int isdead; |
| 683 | 682 | ||
diff --git a/src/w32menu.c b/src/w32menu.c index a2e62f24f6a..f092ff87bf2 100644 --- a/src/w32menu.c +++ b/src/w32menu.c | |||
| @@ -1320,7 +1320,6 @@ utf8to16 (unsigned char * src, int len, WCHAR * dest) | |||
| 1320 | { | 1320 | { |
| 1321 | while (len > 0) | 1321 | while (len > 0) |
| 1322 | { | 1322 | { |
| 1323 | int utf16; | ||
| 1324 | if (*src < 0x80) | 1323 | if (*src < 0x80) |
| 1325 | { | 1324 | { |
| 1326 | *dest = (WCHAR) *src; | 1325 | *dest = (WCHAR) *src; |
| @@ -1546,8 +1545,6 @@ add_menu_item (HMENU menu, widget_value *wv, HMENU item) | |||
| 1546 | static int | 1545 | static int |
| 1547 | fill_in_menu (HMENU menu, widget_value *wv) | 1546 | fill_in_menu (HMENU menu, widget_value *wv) |
| 1548 | { | 1547 | { |
| 1549 | int items_added = 0; | ||
| 1550 | |||
| 1551 | for ( ; wv != NULL; wv = wv->next) | 1548 | for ( ; wv != NULL; wv = wv->next) |
| 1552 | { | 1549 | { |
| 1553 | if (wv->contents) | 1550 | if (wv->contents) |
| @@ -1619,7 +1616,7 @@ w32_menu_display_help (HWND owner, HMENU menu, UINT item, UINT flags) | |||
| 1619 | else | 1616 | else |
| 1620 | /* X version has a loop through frames here, which doesn't | 1617 | /* X version has a loop through frames here, which doesn't |
| 1621 | appear to do anything, unless it has some side effect. */ | 1618 | appear to do anything, unless it has some side effect. */ |
| 1622 | show_help_echo (help, Qnil, Qnil, Qnil, 1); | 1619 | show_help_echo (help, Qnil, Qnil, Qnil); |
| 1623 | } | 1620 | } |
| 1624 | } | 1621 | } |
| 1625 | 1622 | ||
diff --git a/src/w32term.c b/src/w32term.c index f31c4e90e77..f6a6ba3e82f 100644 --- a/src/w32term.c +++ b/src/w32term.c | |||
| @@ -160,7 +160,6 @@ int last_scroll_bar_drag_pos; | |||
| 160 | /* Where the mouse was last time we reported a mouse event. */ | 160 | /* Where the mouse was last time we reported a mouse event. */ |
| 161 | static RECT last_mouse_glyph; | 161 | static RECT last_mouse_glyph; |
| 162 | static FRAME_PTR last_mouse_glyph_frame; | 162 | static FRAME_PTR last_mouse_glyph_frame; |
| 163 | static Lisp_Object last_mouse_press_frame; | ||
| 164 | 163 | ||
| 165 | /* The scroll bar in which the last motion event occurred. | 164 | /* The scroll bar in which the last motion event occurred. |
| 166 | 165 | ||
| @@ -1069,16 +1068,12 @@ x_set_glyph_string_clipping (struct glyph_string *s) | |||
| 1069 | w32_set_clip_rectangle (s->hdc, r); | 1068 | w32_set_clip_rectangle (s->hdc, r); |
| 1070 | else if (n > 1) | 1069 | else if (n > 1) |
| 1071 | { | 1070 | { |
| 1072 | HRGN full_clip, clip1, clip2; | 1071 | HRGN clip1 = CreateRectRgnIndirect (r); |
| 1073 | clip1 = CreateRectRgnIndirect (r); | 1072 | HRGN clip2 = CreateRectRgnIndirect (r + 1); |
| 1074 | clip2 = CreateRectRgnIndirect (r + 1); | 1073 | if (CombineRgn (clip1, clip1, clip2, RGN_OR) != ERROR) |
| 1075 | if (CombineRgn (full_clip, clip1, clip2, RGN_OR) != ERROR) | 1074 | SelectClipRgn (s->hdc, clip1); |
| 1076 | { | ||
| 1077 | SelectClipRgn (s->hdc, full_clip); | ||
| 1078 | } | ||
| 1079 | DeleteObject (clip1); | 1075 | DeleteObject (clip1); |
| 1080 | DeleteObject (clip2); | 1076 | DeleteObject (clip2); |
| 1081 | DeleteObject (full_clip); | ||
| 1082 | } | 1077 | } |
| 1083 | s->num_clips = n; | 1078 | s->num_clips = n; |
| 1084 | } | 1079 | } |
| @@ -1294,7 +1289,6 @@ x_draw_composite_glyph_string_foreground (struct glyph_string *s) | |||
| 1294 | else if (! s->first_glyph->u.cmp.automatic) | 1289 | else if (! s->first_glyph->u.cmp.automatic) |
| 1295 | { | 1290 | { |
| 1296 | int y = s->ybase; | 1291 | int y = s->ybase; |
| 1297 | int width = 0; | ||
| 1298 | HFONT old_font; | 1292 | HFONT old_font; |
| 1299 | 1293 | ||
| 1300 | old_font = SelectObject (s->hdc, FONT_HANDLE (font)); | 1294 | old_font = SelectObject (s->hdc, FONT_HANDLE (font)); |
| @@ -4842,7 +4836,6 @@ w32_read_socket (struct terminal *terminal, int expected, | |||
| 4842 | static void | 4836 | static void |
| 4843 | w32_clip_to_row (struct window *w, struct glyph_row *row, int area, HDC hdc) | 4837 | w32_clip_to_row (struct window *w, struct glyph_row *row, int area, HDC hdc) |
| 4844 | { | 4838 | { |
| 4845 | struct frame *f = XFRAME (WINDOW_FRAME (w)); | ||
| 4846 | RECT clip_rect; | 4839 | RECT clip_rect; |
| 4847 | int window_x, window_y, window_width; | 4840 | int window_x, window_y, window_width; |
| 4848 | 4841 | ||
| @@ -6089,7 +6082,6 @@ static void | |||
| 6089 | x_delete_terminal (struct terminal *terminal) | 6082 | x_delete_terminal (struct terminal *terminal) |
| 6090 | { | 6083 | { |
| 6091 | struct w32_display_info *dpyinfo = terminal->display_info.w32; | 6084 | struct w32_display_info *dpyinfo = terminal->display_info.w32; |
| 6092 | int i; | ||
| 6093 | 6085 | ||
| 6094 | /* Protect against recursive calls. delete_frame in | 6086 | /* Protect against recursive calls. delete_frame in |
| 6095 | delete_terminal calls us back when it deletes our last frame. */ | 6087 | delete_terminal calls us back when it deletes our last frame. */ |
diff --git a/src/w32uniscribe.c b/src/w32uniscribe.c index 39d1ee5c851..f6347bb88f7 100644 --- a/src/w32uniscribe.c +++ b/src/w32uniscribe.c | |||
| @@ -320,7 +320,7 @@ uniscribe_shape (Lisp_Object lgstring) | |||
| 320 | } | 320 | } |
| 321 | if (SUCCEEDED (result)) | 321 | if (SUCCEEDED (result)) |
| 322 | { | 322 | { |
| 323 | int j, nclusters, from, to; | 323 | int j, from, to; |
| 324 | 324 | ||
| 325 | from = 0; | 325 | from = 0; |
| 326 | to = from; | 326 | to = from; |
| @@ -629,8 +629,6 @@ add_opentype_font_name_to_list (ENUMLOGFONTEX *logical_font, | |||
| 629 | STR[4] = '\0'; \ | 629 | STR[4] = '\0'; \ |
| 630 | } while (0) | 630 | } while (0) |
| 631 | 631 | ||
| 632 | static char* NOTHING = " "; | ||
| 633 | |||
| 634 | #define SNAME(VAL) SDATA (SYMBOL_NAME (VAL)) | 632 | #define SNAME(VAL) SDATA (SYMBOL_NAME (VAL)) |
| 635 | 633 | ||
| 636 | /* Check if font supports the otf script/language/features specified. | 634 | /* Check if font supports the otf script/language/features specified. |
| @@ -646,7 +644,6 @@ uniscribe_check_otf (LOGFONT *font, Lisp_Object otf_spec) | |||
| 646 | struct frame * f; | 644 | struct frame * f; |
| 647 | HDC context; | 645 | HDC context; |
| 648 | HFONT check_font, old_font; | 646 | HFONT check_font, old_font; |
| 649 | DWORD table; | ||
| 650 | int i, retval = 0; | 647 | int i, retval = 0; |
| 651 | struct gcpro gcpro1; | 648 | struct gcpro gcpro1; |
| 652 | 649 | ||
| @@ -936,7 +933,11 @@ struct font_driver uniscribe_font_driver = | |||
| 936 | NULL, /* otf_drive - use shape instead. */ | 933 | NULL, /* otf_drive - use shape instead. */ |
| 937 | NULL, /* start_for_frame */ | 934 | NULL, /* start_for_frame */ |
| 938 | NULL, /* end_for_frame */ | 935 | NULL, /* end_for_frame */ |
| 939 | uniscribe_shape | 936 | uniscribe_shape, |
| 937 | NULL, /* check */ | ||
| 938 | NULL, /* get_variation_glyphs */ | ||
| 939 | NULL, /* filter_properties */ | ||
| 940 | NULL, /* cached_font_ok */ | ||
| 940 | }; | 941 | }; |
| 941 | 942 | ||
| 942 | /* Note that this should be called at every startup, not just when dumping, | 943 | /* Note that this should be called at every startup, not just when dumping, |
diff --git a/src/window.c b/src/window.c index f35815d757c..4bd533c22ac 100644 --- a/src/window.c +++ b/src/window.c | |||
| @@ -2978,14 +2978,10 @@ shrink_windows (int total, int size, int nchildren, int shrinkable, | |||
| 2978 | while (total_shrink > total_removed) | 2978 | while (total_shrink > total_removed) |
| 2979 | { | 2979 | { |
| 2980 | int nonzero_sizes = 0; | 2980 | int nonzero_sizes = 0; |
| 2981 | int nonzero_idx = -1; | ||
| 2982 | 2981 | ||
| 2983 | for (i = 0; i < nchildren; ++i) | 2982 | for (i = 0; i < nchildren; ++i) |
| 2984 | if (new_sizes[i] > 0) | 2983 | if (new_sizes[i] > 0) |
| 2985 | { | 2984 | ++nonzero_sizes; |
| 2986 | ++nonzero_sizes; | ||
| 2987 | nonzero_idx = i; | ||
| 2988 | } | ||
| 2989 | 2985 | ||
| 2990 | for (i = 0; i < nchildren; ++i) | 2986 | for (i = 0; i < nchildren; ++i) |
| 2991 | if (new_sizes[i] > min_sizes[i]) | 2987 | if (new_sizes[i] > min_sizes[i]) |
| @@ -3689,27 +3685,23 @@ temp_output_buffer_show (register Lisp_Object buf) | |||
| 3689 | 3685 | ||
| 3690 | /* Run temp-buffer-show-hook, with the chosen window selected | 3686 | /* Run temp-buffer-show-hook, with the chosen window selected |
| 3691 | and its buffer current. */ | 3687 | and its buffer current. */ |
| 3692 | 3688 | { | |
| 3693 | if (!NILP (Vrun_hooks) | 3689 | int count = SPECPDL_INDEX (); |
| 3694 | && !NILP (Fboundp (Qtemp_buffer_show_hook)) | 3690 | Lisp_Object prev_window, prev_buffer; |
| 3695 | && !NILP (Fsymbol_value (Qtemp_buffer_show_hook))) | 3691 | prev_window = selected_window; |
| 3696 | { | 3692 | XSETBUFFER (prev_buffer, old); |
| 3697 | int count = SPECPDL_INDEX (); | 3693 | |
| 3698 | Lisp_Object prev_window, prev_buffer; | 3694 | /* Select the window that was chosen, for running the hook. |
| 3699 | prev_window = selected_window; | 3695 | Note: Both Fselect_window and select_window_norecord may |
| 3700 | XSETBUFFER (prev_buffer, old); | 3696 | set-buffer to the buffer displayed in the window, |
| 3701 | 3697 | so we need to save the current buffer. --stef */ | |
| 3702 | /* Select the window that was chosen, for running the hook. | 3698 | record_unwind_protect (Fset_buffer, prev_buffer); |
| 3703 | Note: Both Fselect_window and select_window_norecord may | 3699 | record_unwind_protect (select_window_norecord, prev_window); |
| 3704 | set-buffer to the buffer displayed in the window, | 3700 | Fselect_window (window, Qt); |
| 3705 | so we need to save the current buffer. --stef */ | 3701 | Fset_buffer (w->buffer); |
| 3706 | record_unwind_protect (Fset_buffer, prev_buffer); | 3702 | Frun_hooks (1, &Qtemp_buffer_show_hook); |
| 3707 | record_unwind_protect (select_window_norecord, prev_window); | 3703 | unbind_to (count, Qnil); |
| 3708 | Fselect_window (window, Qt); | 3704 | } |
| 3709 | Fset_buffer (w->buffer); | ||
| 3710 | call1 (Vrun_hooks, Qtemp_buffer_show_hook); | ||
| 3711 | unbind_to (count, Qnil); | ||
| 3712 | } | ||
| 3713 | } | 3705 | } |
| 3714 | } | 3706 | } |
| 3715 | 3707 | ||
diff --git a/src/xdisp.c b/src/xdisp.c index a7955f41e0c..bbbf37b68ac 100644 --- a/src/xdisp.c +++ b/src/xdisp.c | |||
| @@ -754,7 +754,7 @@ static void setup_for_ellipsis (struct it *, int); | |||
| 754 | static void mark_window_display_accurate_1 (struct window *, int); | 754 | static void mark_window_display_accurate_1 (struct window *, int); |
| 755 | static int single_display_spec_string_p (Lisp_Object, Lisp_Object); | 755 | static int single_display_spec_string_p (Lisp_Object, Lisp_Object); |
| 756 | static int display_prop_string_p (Lisp_Object, Lisp_Object); | 756 | static int display_prop_string_p (Lisp_Object, Lisp_Object); |
| 757 | static int cursor_row_p (struct window *, struct glyph_row *); | 757 | static int cursor_row_p (struct glyph_row *); |
| 758 | static int redisplay_mode_lines (Lisp_Object, int); | 758 | static int redisplay_mode_lines (Lisp_Object, int); |
| 759 | static char *decode_mode_spec_coding (Lisp_Object, char *, int); | 759 | static char *decode_mode_spec_coding (Lisp_Object, char *, int); |
| 760 | 760 | ||
| @@ -802,8 +802,8 @@ static int cursor_row_fully_visible_p (struct window *, int, int); | |||
| 802 | static int try_scrolling (Lisp_Object, int, EMACS_INT, EMACS_INT, int, int); | 802 | static int try_scrolling (Lisp_Object, int, EMACS_INT, EMACS_INT, int, int); |
| 803 | static int try_cursor_movement (Lisp_Object, struct text_pos, int *); | 803 | static int try_cursor_movement (Lisp_Object, struct text_pos, int *); |
| 804 | static int trailing_whitespace_p (EMACS_INT); | 804 | static int trailing_whitespace_p (EMACS_INT); |
| 805 | static int message_log_check_duplicate (EMACS_INT, EMACS_INT, | 805 | static unsigned long int message_log_check_duplicate (EMACS_INT, EMACS_INT, |
| 806 | EMACS_INT, EMACS_INT); | 806 | EMACS_INT, EMACS_INT); |
| 807 | static void push_it (struct it *); | 807 | static void push_it (struct it *); |
| 808 | static void pop_it (struct it *); | 808 | static void pop_it (struct it *); |
| 809 | static void sync_frame_with_window_matrix_rows (struct window *); | 809 | static void sync_frame_with_window_matrix_rows (struct window *); |
| @@ -823,8 +823,7 @@ static int display_mode_lines (struct window *); | |||
| 823 | static int display_mode_line (struct window *, enum face_id, Lisp_Object); | 823 | static int display_mode_line (struct window *, enum face_id, Lisp_Object); |
| 824 | static int display_mode_element (struct it *, int, int, int, Lisp_Object, Lisp_Object, int); | 824 | static int display_mode_element (struct it *, int, int, int, Lisp_Object, Lisp_Object, int); |
| 825 | static int store_mode_line_string (const char *, Lisp_Object, int, int, int, Lisp_Object); | 825 | static int store_mode_line_string (const char *, Lisp_Object, int, int, int, Lisp_Object); |
| 826 | static const char *decode_mode_spec (struct window *, int, int, int, | 826 | static const char *decode_mode_spec (struct window *, int, int, Lisp_Object *); |
| 827 | Lisp_Object *); | ||
| 828 | static void display_menu_bar (struct window *); | 827 | static void display_menu_bar (struct window *); |
| 829 | static int display_count_lines (EMACS_INT, EMACS_INT, EMACS_INT, int, | 828 | static int display_count_lines (EMACS_INT, EMACS_INT, EMACS_INT, int, |
| 830 | EMACS_INT *); | 829 | EMACS_INT *); |
| @@ -2181,7 +2180,7 @@ safe_eval_handler (Lisp_Object arg) | |||
| 2181 | redisplay during the evaluation. */ | 2180 | redisplay during the evaluation. */ |
| 2182 | 2181 | ||
| 2183 | Lisp_Object | 2182 | Lisp_Object |
| 2184 | safe_call (int nargs, Lisp_Object *args) | 2183 | safe_call (size_t nargs, Lisp_Object *args) |
| 2185 | { | 2184 | { |
| 2186 | Lisp_Object val; | 2185 | Lisp_Object val; |
| 2187 | 2186 | ||
| @@ -3164,6 +3163,9 @@ handle_fontified_prop (struct it *it) | |||
| 3164 | { | 3163 | { |
| 3165 | int count = SPECPDL_INDEX (); | 3164 | int count = SPECPDL_INDEX (); |
| 3166 | Lisp_Object val; | 3165 | Lisp_Object val; |
| 3166 | struct buffer *obuf = current_buffer; | ||
| 3167 | int begv = BEGV, zv = ZV; | ||
| 3168 | int old_clip_changed = current_buffer->clip_changed; | ||
| 3167 | 3169 | ||
| 3168 | val = Vfontification_functions; | 3170 | val = Vfontification_functions; |
| 3169 | specbind (Qfontification_functions, Qnil); | 3171 | specbind (Qfontification_functions, Qnil); |
| @@ -3209,6 +3211,23 @@ handle_fontified_prop (struct it *it) | |||
| 3209 | 3211 | ||
| 3210 | unbind_to (count, Qnil); | 3212 | unbind_to (count, Qnil); |
| 3211 | 3213 | ||
| 3214 | /* Fontification functions routinely call `save-restriction'. | ||
| 3215 | Normally, this tags clip_changed, which can confuse redisplay | ||
| 3216 | (see discussion in Bug#6671). Since we don't perform any | ||
| 3217 | special handling of fontification changes in the case where | ||
| 3218 | `save-restriction' isn't called, there's no point doing so in | ||
| 3219 | this case either. So, if the buffer's restrictions are | ||
| 3220 | actually left unchanged, reset clip_changed. */ | ||
| 3221 | if (obuf == current_buffer) | ||
| 3222 | { | ||
| 3223 | if (begv == BEGV && zv == ZV) | ||
| 3224 | current_buffer->clip_changed = old_clip_changed; | ||
| 3225 | } | ||
| 3226 | /* There isn't much we can reasonably do to protect against | ||
| 3227 | misbehaving fontification, but here's a fig leaf. */ | ||
| 3228 | else if (!NILP (BVAR (obuf, name))) | ||
| 3229 | set_buffer_internal_1 (obuf); | ||
| 3230 | |||
| 3212 | /* The fontification code may have added/removed text. | 3231 | /* The fontification code may have added/removed text. |
| 3213 | It could do even a lot worse, but let's at least protect against | 3232 | It could do even a lot worse, but let's at least protect against |
| 3214 | the most obvious case where only the text past `pos' gets changed', | 3233 | the most obvious case where only the text past `pos' gets changed', |
| @@ -4400,20 +4419,18 @@ display_prop_string_p (Lisp_Object prop, Lisp_Object string) | |||
| 4400 | return 0; | 4419 | return 0; |
| 4401 | } | 4420 | } |
| 4402 | 4421 | ||
| 4403 | /* Look for STRING in overlays and text properties in W's buffer, | 4422 | /* Look for STRING in overlays and text properties in the current |
| 4404 | between character positions FROM and TO (excluding TO). | 4423 | buffer, between character positions FROM and TO (excluding TO). |
| 4405 | BACK_P non-zero means look back (in this case, TO is supposed to be | 4424 | BACK_P non-zero means look back (in this case, TO is supposed to be |
| 4406 | less than FROM). | 4425 | less than FROM). |
| 4407 | Value is the first character position where STRING was found, or | 4426 | Value is the first character position where STRING was found, or |
| 4408 | zero if it wasn't found before hitting TO. | 4427 | zero if it wasn't found before hitting TO. |
| 4409 | 4428 | ||
| 4410 | W's buffer must be current. | ||
| 4411 | |||
| 4412 | This function may only use code that doesn't eval because it is | 4429 | This function may only use code that doesn't eval because it is |
| 4413 | called asynchronously from note_mouse_highlight. */ | 4430 | called asynchronously from note_mouse_highlight. */ |
| 4414 | 4431 | ||
| 4415 | static EMACS_INT | 4432 | static EMACS_INT |
| 4416 | string_buffer_position_lim (struct window *w, Lisp_Object string, | 4433 | string_buffer_position_lim (Lisp_Object string, |
| 4417 | EMACS_INT from, EMACS_INT to, int back_p) | 4434 | EMACS_INT from, EMACS_INT to, int back_p) |
| 4418 | { | 4435 | { |
| 4419 | Lisp_Object limit, prop, pos; | 4436 | Lisp_Object limit, prop, pos; |
| @@ -4451,27 +4468,25 @@ string_buffer_position_lim (struct window *w, Lisp_Object string, | |||
| 4451 | return found ? XINT (pos) : 0; | 4468 | return found ? XINT (pos) : 0; |
| 4452 | } | 4469 | } |
| 4453 | 4470 | ||
| 4454 | /* Determine which buffer position in W's buffer STRING comes from. | 4471 | /* Determine which buffer position in current buffer STRING comes from. |
| 4455 | AROUND_CHARPOS is an approximate position where it could come from. | 4472 | AROUND_CHARPOS is an approximate position where it could come from. |
| 4456 | Value is the buffer position or 0 if it couldn't be determined. | 4473 | Value is the buffer position or 0 if it couldn't be determined. |
| 4457 | 4474 | ||
| 4458 | W's buffer must be current. | ||
| 4459 | |||
| 4460 | This function is necessary because we don't record buffer positions | 4475 | This function is necessary because we don't record buffer positions |
| 4461 | in glyphs generated from strings (to keep struct glyph small). | 4476 | in glyphs generated from strings (to keep struct glyph small). |
| 4462 | This function may only use code that doesn't eval because it is | 4477 | This function may only use code that doesn't eval because it is |
| 4463 | called asynchronously from note_mouse_highlight. */ | 4478 | called asynchronously from note_mouse_highlight. */ |
| 4464 | 4479 | ||
| 4465 | EMACS_INT | 4480 | static EMACS_INT |
| 4466 | string_buffer_position (struct window *w, Lisp_Object string, EMACS_INT around_charpos) | 4481 | string_buffer_position (Lisp_Object string, EMACS_INT around_charpos) |
| 4467 | { | 4482 | { |
| 4468 | const int MAX_DISTANCE = 1000; | 4483 | const int MAX_DISTANCE = 1000; |
| 4469 | EMACS_INT found = string_buffer_position_lim (w, string, around_charpos, | 4484 | EMACS_INT found = string_buffer_position_lim (string, around_charpos, |
| 4470 | around_charpos + MAX_DISTANCE, | 4485 | around_charpos + MAX_DISTANCE, |
| 4471 | 0); | 4486 | 0); |
| 4472 | 4487 | ||
| 4473 | if (!found) | 4488 | if (!found) |
| 4474 | found = string_buffer_position_lim (w, string, around_charpos, | 4489 | found = string_buffer_position_lim (string, around_charpos, |
| 4475 | around_charpos - MAX_DISTANCE, 1); | 4490 | around_charpos - MAX_DISTANCE, 1); |
| 4476 | return found; | 4491 | return found; |
| 4477 | } | 4492 | } |
| @@ -7947,7 +7962,7 @@ message_dolog (const char *m, EMACS_INT nbytes, int nlflag, int multibyte) | |||
| 7947 | c = string_char_and_length (msg + i, &char_bytes); | 7962 | c = string_char_and_length (msg + i, &char_bytes); |
| 7948 | work[0] = (ASCII_CHAR_P (c) | 7963 | work[0] = (ASCII_CHAR_P (c) |
| 7949 | ? c | 7964 | ? c |
| 7950 | : multibyte_char_to_unibyte (c, Qnil)); | 7965 | : multibyte_char_to_unibyte (c)); |
| 7951 | insert_1_both (work, 1, 1, 1, 0, 0); | 7966 | insert_1_both (work, 1, 1, 1, 0, 0); |
| 7952 | } | 7967 | } |
| 7953 | } | 7968 | } |
| @@ -7973,7 +7988,7 @@ message_dolog (const char *m, EMACS_INT nbytes, int nlflag, int multibyte) | |||
| 7973 | if (nlflag) | 7988 | if (nlflag) |
| 7974 | { | 7989 | { |
| 7975 | EMACS_INT this_bol, this_bol_byte, prev_bol, prev_bol_byte; | 7990 | EMACS_INT this_bol, this_bol_byte, prev_bol, prev_bol_byte; |
| 7976 | int dups; | 7991 | unsigned long int dups; |
| 7977 | insert_1 ("\n", 1, 1, 0, 0); | 7992 | insert_1 ("\n", 1, 1, 0, 0); |
| 7978 | 7993 | ||
| 7979 | scan_newline (Z, Z_BYTE, BEG, BEG_BYTE, -2, 0); | 7994 | scan_newline (Z, Z_BYTE, BEG, BEG_BYTE, -2, 0); |
| @@ -8001,7 +8016,7 @@ message_dolog (const char *m, EMACS_INT nbytes, int nlflag, int multibyte) | |||
| 8001 | 8016 | ||
| 8002 | /* If you change this format, don't forget to also | 8017 | /* If you change this format, don't forget to also |
| 8003 | change message_log_check_duplicate. */ | 8018 | change message_log_check_duplicate. */ |
| 8004 | sprintf (dupstr, " [%d times]", dups); | 8019 | sprintf (dupstr, " [%lu times]", dups); |
| 8005 | duplen = strlen (dupstr); | 8020 | duplen = strlen (dupstr); |
| 8006 | TEMP_SET_PT_BOTH (Z - 1, Z_BYTE - 1); | 8021 | TEMP_SET_PT_BOTH (Z - 1, Z_BYTE - 1); |
| 8007 | insert_1 (dupstr, duplen, 1, 0, 1); | 8022 | insert_1 (dupstr, duplen, 1, 0, 1); |
| @@ -8063,7 +8078,7 @@ message_dolog (const char *m, EMACS_INT nbytes, int nlflag, int multibyte) | |||
| 8063 | Return 0 if different, 1 if the new one should just replace it, or a | 8078 | Return 0 if different, 1 if the new one should just replace it, or a |
| 8064 | value N > 1 if we should also append " [N times]". */ | 8079 | value N > 1 if we should also append " [N times]". */ |
| 8065 | 8080 | ||
| 8066 | static int | 8081 | static unsigned long int |
| 8067 | message_log_check_duplicate (EMACS_INT prev_bol, EMACS_INT prev_bol_byte, | 8082 | message_log_check_duplicate (EMACS_INT prev_bol, EMACS_INT prev_bol_byte, |
| 8068 | EMACS_INT this_bol, EMACS_INT this_bol_byte) | 8083 | EMACS_INT this_bol, EMACS_INT this_bol_byte) |
| 8069 | { | 8084 | { |
| @@ -8085,10 +8100,9 @@ message_log_check_duplicate (EMACS_INT prev_bol, EMACS_INT prev_bol_byte, | |||
| 8085 | return 2; | 8100 | return 2; |
| 8086 | if (*p1++ == ' ' && *p1++ == '[') | 8101 | if (*p1++ == ' ' && *p1++ == '[') |
| 8087 | { | 8102 | { |
| 8088 | int n = 0; | 8103 | char *pend; |
| 8089 | while (*p1 >= '0' && *p1 <= '9') | 8104 | unsigned long int n = strtoul ((char *) p1, &pend, 10); |
| 8090 | n = n * 10 + *p1++ - '0'; | 8105 | if (strncmp (pend, " times]\n", 8) == 0) |
| 8091 | if (strncmp ((char *) p1, " times]\n", 8) == 0) | ||
| 8092 | return n+1; | 8106 | return n+1; |
| 8093 | } | 8107 | } |
| 8094 | return 0; | 8108 | return 0; |
| @@ -9209,7 +9223,7 @@ set_message_1 (EMACS_INT a1, Lisp_Object a2, EMACS_INT nbytes, EMACS_INT multiby | |||
| 9209 | c = string_char_and_length (msg + i, &n); | 9223 | c = string_char_and_length (msg + i, &n); |
| 9210 | work[0] = (ASCII_CHAR_P (c) | 9224 | work[0] = (ASCII_CHAR_P (c) |
| 9211 | ? c | 9225 | ? c |
| 9212 | : multibyte_char_to_unibyte (c, Qnil)); | 9226 | : multibyte_char_to_unibyte (c)); |
| 9213 | insert_1_both (work, 1, 1, 1, 0, 0); | 9227 | insert_1_both (work, 1, 1, 1, 0, 0); |
| 9214 | } | 9228 | } |
| 9215 | } | 9229 | } |
| @@ -12712,7 +12726,7 @@ set_cursor_from_row (struct window *w, struct glyph_row *row, | |||
| 12712 | EMACS_INT tem; | 12726 | EMACS_INT tem; |
| 12713 | 12727 | ||
| 12714 | str = glyph->object; | 12728 | str = glyph->object; |
| 12715 | tem = string_buffer_position_lim (w, str, pos, pos_after, 0); | 12729 | tem = string_buffer_position_lim (str, pos, pos_after, 0); |
| 12716 | if (tem == 0 /* from overlay */ | 12730 | if (tem == 0 /* from overlay */ |
| 12717 | || pos <= tem) | 12731 | || pos <= tem) |
| 12718 | { | 12732 | { |
| @@ -13438,7 +13452,7 @@ try_cursor_movement (Lisp_Object window, struct text_pos startp, int *scroll_ste | |||
| 13438 | && row < w->current_matrix->rows | 13452 | && row < w->current_matrix->rows |
| 13439 | + w->current_matrix->nrows - 1 | 13453 | + w->current_matrix->nrows - 1 |
| 13440 | && MATRIX_ROW_START_CHARPOS (row+1) == PT | 13454 | && MATRIX_ROW_START_CHARPOS (row+1) == PT |
| 13441 | && !cursor_row_p (w, row)) | 13455 | && !cursor_row_p (row)) |
| 13442 | ++row; | 13456 | ++row; |
| 13443 | 13457 | ||
| 13444 | /* If within the scroll margin, scroll. Note that | 13458 | /* If within the scroll margin, scroll. Note that |
| @@ -13490,7 +13504,7 @@ try_cursor_movement (Lisp_Object window, struct text_pos startp, int *scroll_ste | |||
| 13490 | skip forward over overlay strings. */ | 13504 | skip forward over overlay strings. */ |
| 13491 | while (MATRIX_ROW_BOTTOM_Y (row) < last_y | 13505 | while (MATRIX_ROW_BOTTOM_Y (row) < last_y |
| 13492 | && MATRIX_ROW_END_CHARPOS (row) == PT | 13506 | && MATRIX_ROW_END_CHARPOS (row) == PT |
| 13493 | && !cursor_row_p (w, row)) | 13507 | && !cursor_row_p (row)) |
| 13494 | ++row; | 13508 | ++row; |
| 13495 | 13509 | ||
| 13496 | /* If within the scroll margin, scroll. */ | 13510 | /* If within the scroll margin, scroll. */ |
| @@ -13586,7 +13600,7 @@ try_cursor_movement (Lisp_Object window, struct text_pos startp, int *scroll_ste | |||
| 13586 | { | 13600 | { |
| 13587 | if (MATRIX_ROW_START_CHARPOS (row) <= PT | 13601 | if (MATRIX_ROW_START_CHARPOS (row) <= PT |
| 13588 | && PT <= MATRIX_ROW_END_CHARPOS (row) | 13602 | && PT <= MATRIX_ROW_END_CHARPOS (row) |
| 13589 | && cursor_row_p (w, row)) | 13603 | && cursor_row_p (row)) |
| 13590 | rv |= set_cursor_from_row (w, row, w->current_matrix, | 13604 | rv |= set_cursor_from_row (w, row, w->current_matrix, |
| 13591 | 0, 0, 0, 0); | 13605 | 0, 0, 0, 0); |
| 13592 | /* As soon as we've found the first suitable row | 13606 | /* As soon as we've found the first suitable row |
| @@ -13625,7 +13639,7 @@ try_cursor_movement (Lisp_Object window, struct text_pos startp, int *scroll_ste | |||
| 13625 | } | 13639 | } |
| 13626 | while (MATRIX_ROW_BOTTOM_Y (row) < last_y | 13640 | while (MATRIX_ROW_BOTTOM_Y (row) < last_y |
| 13627 | && MATRIX_ROW_START_CHARPOS (row) == PT | 13641 | && MATRIX_ROW_START_CHARPOS (row) == PT |
| 13628 | && cursor_row_p (w, row)); | 13642 | && cursor_row_p (row)); |
| 13629 | } | 13643 | } |
| 13630 | } | 13644 | } |
| 13631 | } | 13645 | } |
| @@ -14157,7 +14171,6 @@ redisplay_window (Lisp_Object window, int just_this_one_p) | |||
| 14157 | || temp_scroll_step | 14171 | || temp_scroll_step |
| 14158 | || NUMBERP (BVAR (current_buffer, scroll_up_aggressively)) | 14172 | || NUMBERP (BVAR (current_buffer, scroll_up_aggressively)) |
| 14159 | || NUMBERP (BVAR (current_buffer, scroll_down_aggressively))) | 14173 | || NUMBERP (BVAR (current_buffer, scroll_down_aggressively))) |
| 14160 | && !current_buffer->clip_changed | ||
| 14161 | && CHARPOS (startp) >= BEGV | 14174 | && CHARPOS (startp) >= BEGV |
| 14162 | && CHARPOS (startp) <= ZV) | 14175 | && CHARPOS (startp) <= ZV) |
| 14163 | { | 14176 | { |
| @@ -14625,8 +14638,6 @@ try_window_reusing_current_matrix (struct window *w) | |||
| 14625 | 14638 | ||
| 14626 | if (CHARPOS (new_start) <= CHARPOS (start)) | 14639 | if (CHARPOS (new_start) <= CHARPOS (start)) |
| 14627 | { | 14640 | { |
| 14628 | int first_row_y; | ||
| 14629 | |||
| 14630 | /* Don't use this method if the display starts with an ellipsis | 14641 | /* Don't use this method if the display starts with an ellipsis |
| 14631 | displayed for invisible text. It's not easy to handle that case | 14642 | displayed for invisible text. It's not easy to handle that case |
| 14632 | below, and it's certainly not worth the effort since this is | 14643 | below, and it's certainly not worth the effort since this is |
| @@ -14641,7 +14652,6 @@ try_window_reusing_current_matrix (struct window *w) | |||
| 14641 | text. Note that it.vpos == 0 if or if not there is a | 14652 | text. Note that it.vpos == 0 if or if not there is a |
| 14642 | header-line; it's not the same as the MATRIX_ROW_VPOS! */ | 14653 | header-line; it's not the same as the MATRIX_ROW_VPOS! */ |
| 14643 | start_display (&it, w, new_start); | 14654 | start_display (&it, w, new_start); |
| 14644 | first_row_y = it.current_y; | ||
| 14645 | w->cursor.vpos = -1; | 14655 | w->cursor.vpos = -1; |
| 14646 | last_text_row = last_reused_text_row = NULL; | 14656 | last_text_row = last_reused_text_row = NULL; |
| 14647 | 14657 | ||
| @@ -16370,7 +16380,7 @@ With ARG, turn tracing on if and only if ARG is positive. */) | |||
| 16370 | DEFUN ("trace-to-stderr", Ftrace_to_stderr, Strace_to_stderr, 1, MANY, "", | 16380 | DEFUN ("trace-to-stderr", Ftrace_to_stderr, Strace_to_stderr, 1, MANY, "", |
| 16371 | doc: /* Like `format', but print result to stderr. | 16381 | doc: /* Like `format', but print result to stderr. |
| 16372 | usage: (trace-to-stderr STRING &rest OBJECTS) */) | 16382 | usage: (trace-to-stderr STRING &rest OBJECTS) */) |
| 16373 | (int nargs, Lisp_Object *args) | 16383 | (size_t nargs, Lisp_Object *args) |
| 16374 | { | 16384 | { |
| 16375 | Lisp_Object s = Fformat (nargs, args); | 16385 | Lisp_Object s = Fformat (nargs, args); |
| 16376 | fprintf (stderr, "%s", SDATA (s)); | 16386 | fprintf (stderr, "%s", SDATA (s)); |
| @@ -16953,11 +16963,11 @@ highlight_trailing_whitespace (struct frame *f, struct glyph_row *row) | |||
| 16953 | } | 16963 | } |
| 16954 | 16964 | ||
| 16955 | 16965 | ||
| 16956 | /* Value is non-zero if glyph row ROW in window W should be | 16966 | /* Value is non-zero if glyph row ROW should be |
| 16957 | used to hold the cursor. */ | 16967 | used to hold the cursor. */ |
| 16958 | 16968 | ||
| 16959 | static int | 16969 | static int |
| 16960 | cursor_row_p (struct window *w, struct glyph_row *row) | 16970 | cursor_row_p (struct glyph_row *row) |
| 16961 | { | 16971 | { |
| 16962 | int result = 1; | 16972 | int result = 1; |
| 16963 | 16973 | ||
| @@ -17870,7 +17880,7 @@ display_line (struct it *it) | |||
| 17870 | && !MATRIX_ROW (it->w->desired_matrix, cvpos)->ends_at_zv_p)) | 17880 | && !MATRIX_ROW (it->w->desired_matrix, cvpos)->ends_at_zv_p)) |
| 17871 | && PT >= MATRIX_ROW_START_CHARPOS (row) | 17881 | && PT >= MATRIX_ROW_START_CHARPOS (row) |
| 17872 | && PT <= MATRIX_ROW_END_CHARPOS (row) | 17882 | && PT <= MATRIX_ROW_END_CHARPOS (row) |
| 17873 | && cursor_row_p (it->w, row)) | 17883 | && cursor_row_p (row)) |
| 17874 | set_cursor_from_row (it->w, row, it->w->desired_matrix, 0, 0, 0, 0); | 17884 | set_cursor_from_row (it->w, row, it->w->desired_matrix, 0, 0, 0, 0); |
| 17875 | 17885 | ||
| 17876 | /* Highlight trailing whitespace. */ | 17886 | /* Highlight trailing whitespace. */ |
| @@ -18522,7 +18532,7 @@ display_mode_element (struct it *it, int depth, int field_width, int precision, | |||
| 18522 | charpos = (STRING_MULTIBYTE (elt) | 18532 | charpos = (STRING_MULTIBYTE (elt) |
| 18523 | ? string_byte_to_char (elt, bytepos) | 18533 | ? string_byte_to_char (elt, bytepos) |
| 18524 | : bytepos); | 18534 | : bytepos); |
| 18525 | spec = decode_mode_spec (it->w, c, field, prec, &string); | 18535 | spec = decode_mode_spec (it->w, c, field, &string); |
| 18526 | multibyte = STRINGP (string) && STRING_MULTIBYTE (string); | 18536 | multibyte = STRINGP (string) && STRING_MULTIBYTE (string); |
| 18527 | 18537 | ||
| 18528 | switch (mode_line_target) | 18538 | switch (mode_line_target) |
| @@ -19007,7 +19017,7 @@ pint2str (register char *buf, register int width, register EMACS_INT d) | |||
| 19007 | 19017 | ||
| 19008 | static const char power_letter[] = | 19018 | static const char power_letter[] = |
| 19009 | { | 19019 | { |
| 19010 | 0, /* not used */ | 19020 | 0, /* no letter */ |
| 19011 | 'k', /* kilo */ | 19021 | 'k', /* kilo */ |
| 19012 | 'M', /* mega */ | 19022 | 'M', /* mega */ |
| 19013 | 'G', /* giga */ | 19023 | 'G', /* giga */ |
| @@ -19089,8 +19099,7 @@ pint2hrstr (char *buf, int width, int d) | |||
| 19089 | p = psuffix = buf + max (width, length); | 19099 | p = psuffix = buf + max (width, length); |
| 19090 | 19100 | ||
| 19091 | /* Print EXPONENT. */ | 19101 | /* Print EXPONENT. */ |
| 19092 | if (exponent) | 19102 | *psuffix++ = power_letter[exponent]; |
| 19093 | *psuffix++ = power_letter[exponent]; | ||
| 19094 | *psuffix = '\0'; | 19103 | *psuffix = '\0'; |
| 19095 | 19104 | ||
| 19096 | /* Print TENTHS. */ | 19105 | /* Print TENTHS. */ |
| @@ -19194,9 +19203,8 @@ decode_mode_spec_coding (Lisp_Object coding_system, register char *buf, int eol_ | |||
| 19194 | } | 19203 | } |
| 19195 | 19204 | ||
| 19196 | /* Return a string for the output of a mode line %-spec for window W, | 19205 | /* Return a string for the output of a mode line %-spec for window W, |
| 19197 | generated by character C. PRECISION >= 0 means don't return a | 19206 | generated by character C. FIELD_WIDTH > 0 means pad the string |
| 19198 | string longer than that value. FIELD_WIDTH > 0 means pad the | 19207 | returned with spaces to that value. Return a Lisp string in |
| 19199 | string returned with spaces to that value. Return a Lisp string in | ||
| 19200 | *STRING if the resulting string is taken from that Lisp string. | 19208 | *STRING if the resulting string is taken from that Lisp string. |
| 19201 | 19209 | ||
| 19202 | Note we operate on the current buffer for most purposes, | 19210 | Note we operate on the current buffer for most purposes, |
| @@ -19206,7 +19214,7 @@ static char lots_of_dashes[] = "------------------------------------------------ | |||
| 19206 | 19214 | ||
| 19207 | static const char * | 19215 | static const char * |
| 19208 | decode_mode_spec (struct window *w, register int c, int field_width, | 19216 | decode_mode_spec (struct window *w, register int c, int field_width, |
| 19209 | int precision, Lisp_Object *string) | 19217 | Lisp_Object *string) |
| 19210 | { | 19218 | { |
| 19211 | Lisp_Object obj; | 19219 | Lisp_Object obj; |
| 19212 | struct frame *f = XFRAME (WINDOW_FRAME (w)); | 19220 | struct frame *f = XFRAME (WINDOW_FRAME (w)); |
| @@ -22740,7 +22748,6 @@ x_produce_glyphs (struct it *it) | |||
| 22740 | int ch = COMPOSITION_GLYPH (cmp, i); | 22748 | int ch = COMPOSITION_GLYPH (cmp, i); |
| 22741 | int face_id; | 22749 | int face_id; |
| 22742 | struct face *this_face; | 22750 | struct face *this_face; |
| 22743 | int this_boff; | ||
| 22744 | 22751 | ||
| 22745 | if (ch == '\t') | 22752 | if (ch == '\t') |
| 22746 | ch = ' '; | 22753 | ch = ' '; |
| @@ -22752,9 +22759,6 @@ x_produce_glyphs (struct it *it) | |||
| 22752 | pcm = NULL; | 22759 | pcm = NULL; |
| 22753 | else | 22760 | else |
| 22754 | { | 22761 | { |
| 22755 | this_boff = font->baseline_offset; | ||
| 22756 | if (font->vertical_centering) | ||
| 22757 | this_boff = VCENTER_BASELINE_OFFSET (font, it->f) - boff; | ||
| 22758 | get_char_face_and_encoding (it->f, ch, face_id, | 22762 | get_char_face_and_encoding (it->f, ch, face_id, |
| 22759 | &char2b, it->multibyte_p, 0); | 22763 | &char2b, it->multibyte_p, 0); |
| 22760 | pcm = get_per_char_metric (it->f, font, &char2b); | 22764 | pcm = get_per_char_metric (it->f, font, &char2b); |
| @@ -24307,7 +24311,7 @@ mouse_face_from_buffer_pos (Lisp_Object window, | |||
| 24307 | END_CHARPOS, or if they come from an overlay. */ | 24311 | END_CHARPOS, or if they come from an overlay. */ |
| 24308 | if (EQ (glyph->object, before_string)) | 24312 | if (EQ (glyph->object, before_string)) |
| 24309 | { | 24313 | { |
| 24310 | pos = string_buffer_position (w, before_string, | 24314 | pos = string_buffer_position (before_string, |
| 24311 | start_charpos); | 24315 | start_charpos); |
| 24312 | /* If pos == 0, it means before_string came from an | 24316 | /* If pos == 0, it means before_string came from an |
| 24313 | overlay, not from a buffer position. */ | 24317 | overlay, not from a buffer position. */ |
| @@ -24316,7 +24320,7 @@ mouse_face_from_buffer_pos (Lisp_Object window, | |||
| 24316 | } | 24320 | } |
| 24317 | else if (EQ (glyph->object, after_string)) | 24321 | else if (EQ (glyph->object, after_string)) |
| 24318 | { | 24322 | { |
| 24319 | pos = string_buffer_position (w, after_string, end_charpos); | 24323 | pos = string_buffer_position (after_string, end_charpos); |
| 24320 | if (!pos || (pos >= start_charpos && pos < end_charpos)) | 24324 | if (!pos || (pos >= start_charpos && pos < end_charpos)) |
| 24321 | break; | 24325 | break; |
| 24322 | } | 24326 | } |
| @@ -24358,7 +24362,7 @@ mouse_face_from_buffer_pos (Lisp_Object window, | |||
| 24358 | END_CHARPOS, or if they come from an overlay. */ | 24362 | END_CHARPOS, or if they come from an overlay. */ |
| 24359 | if (EQ (glyph->object, before_string)) | 24363 | if (EQ (glyph->object, before_string)) |
| 24360 | { | 24364 | { |
| 24361 | pos = string_buffer_position (w, before_string, start_charpos); | 24365 | pos = string_buffer_position (before_string, start_charpos); |
| 24362 | /* If pos == 0, it means before_string came from an | 24366 | /* If pos == 0, it means before_string came from an |
| 24363 | overlay, not from a buffer position. */ | 24367 | overlay, not from a buffer position. */ |
| 24364 | if (!pos || (pos >= start_charpos && pos < end_charpos)) | 24368 | if (!pos || (pos >= start_charpos && pos < end_charpos)) |
| @@ -24366,7 +24370,7 @@ mouse_face_from_buffer_pos (Lisp_Object window, | |||
| 24366 | } | 24370 | } |
| 24367 | else if (EQ (glyph->object, after_string)) | 24371 | else if (EQ (glyph->object, after_string)) |
| 24368 | { | 24372 | { |
| 24369 | pos = string_buffer_position (w, after_string, end_charpos); | 24373 | pos = string_buffer_position (after_string, end_charpos); |
| 24370 | if (!pos || (pos >= start_charpos && pos < end_charpos)) | 24374 | if (!pos || (pos >= start_charpos && pos < end_charpos)) |
| 24371 | break; | 24375 | break; |
| 24372 | } | 24376 | } |
| @@ -24424,13 +24428,13 @@ mouse_face_from_buffer_pos (Lisp_Object window, | |||
| 24424 | END_CHARPOS, or if they come from an overlay. */ | 24428 | END_CHARPOS, or if they come from an overlay. */ |
| 24425 | if (EQ (end->object, before_string)) | 24429 | if (EQ (end->object, before_string)) |
| 24426 | { | 24430 | { |
| 24427 | pos = string_buffer_position (w, before_string, start_charpos); | 24431 | pos = string_buffer_position (before_string, start_charpos); |
| 24428 | if (!pos || (pos >= start_charpos && pos < end_charpos)) | 24432 | if (!pos || (pos >= start_charpos && pos < end_charpos)) |
| 24429 | break; | 24433 | break; |
| 24430 | } | 24434 | } |
| 24431 | else if (EQ (end->object, after_string)) | 24435 | else if (EQ (end->object, after_string)) |
| 24432 | { | 24436 | { |
| 24433 | pos = string_buffer_position (w, after_string, end_charpos); | 24437 | pos = string_buffer_position (after_string, end_charpos); |
| 24434 | if (!pos || (pos >= start_charpos && pos < end_charpos)) | 24438 | if (!pos || (pos >= start_charpos && pos < end_charpos)) |
| 24435 | break; | 24439 | break; |
| 24436 | } | 24440 | } |
| @@ -24474,13 +24478,13 @@ mouse_face_from_buffer_pos (Lisp_Object window, | |||
| 24474 | END_CHARPOS, or if they come from an overlay. */ | 24478 | END_CHARPOS, or if they come from an overlay. */ |
| 24475 | if (EQ (end->object, before_string)) | 24479 | if (EQ (end->object, before_string)) |
| 24476 | { | 24480 | { |
| 24477 | pos = string_buffer_position (w, before_string, start_charpos); | 24481 | pos = string_buffer_position (before_string, start_charpos); |
| 24478 | if (!pos || (pos >= start_charpos && pos < end_charpos)) | 24482 | if (!pos || (pos >= start_charpos && pos < end_charpos)) |
| 24479 | break; | 24483 | break; |
| 24480 | } | 24484 | } |
| 24481 | else if (EQ (end->object, after_string)) | 24485 | else if (EQ (end->object, after_string)) |
| 24482 | { | 24486 | { |
| 24483 | pos = string_buffer_position (w, after_string, end_charpos); | 24487 | pos = string_buffer_position (after_string, end_charpos); |
| 24484 | if (!pos || (pos >= start_charpos && pos < end_charpos)) | 24488 | if (!pos || (pos >= start_charpos && pos < end_charpos)) |
| 24485 | break; | 24489 | break; |
| 24486 | } | 24490 | } |
| @@ -24957,10 +24961,9 @@ note_mode_line_or_margin_highlight (Lisp_Object window, int x, int y, | |||
| 24957 | CONSP (hotspot)) | 24961 | CONSP (hotspot)) |
| 24958 | && (hotspot = XCDR (hotspot), CONSP (hotspot))) | 24962 | && (hotspot = XCDR (hotspot), CONSP (hotspot))) |
| 24959 | { | 24963 | { |
| 24960 | Lisp_Object area_id, plist; | 24964 | Lisp_Object plist; |
| 24961 | 24965 | ||
| 24962 | area_id = XCAR (hotspot); | 24966 | /* Could check XCAR (hotspot) to see if we enter/leave this hot-spot. |
| 24963 | /* Could check AREA_ID to see if we enter/leave this hot-spot. | ||
| 24964 | If so, we could look for mouse-enter, mouse-leave | 24967 | If so, we could look for mouse-enter, mouse-leave |
| 24965 | properties in PLIST (and do something...). */ | 24968 | properties in PLIST (and do something...). */ |
| 24966 | hotspot = XCDR (hotspot); | 24969 | hotspot = XCDR (hotspot); |
| @@ -25295,10 +25298,10 @@ note_mouse_highlight (struct frame *f, int x, int y) | |||
| 25295 | CONSP (hotspot)) | 25298 | CONSP (hotspot)) |
| 25296 | && (hotspot = XCDR (hotspot), CONSP (hotspot))) | 25299 | && (hotspot = XCDR (hotspot), CONSP (hotspot))) |
| 25297 | { | 25300 | { |
| 25298 | Lisp_Object area_id, plist; | 25301 | Lisp_Object plist; |
| 25299 | 25302 | ||
| 25300 | area_id = XCAR (hotspot); | 25303 | /* Could check XCAR (hotspot) to see if we enter/leave |
| 25301 | /* Could check AREA_ID to see if we enter/leave this hot-spot. | 25304 | this hot-spot. |
| 25302 | If so, we could look for mouse-enter, mouse-leave | 25305 | If so, we could look for mouse-enter, mouse-leave |
| 25303 | properties in PLIST (and do something...). */ | 25306 | properties in PLIST (and do something...). */ |
| 25304 | hotspot = XCDR (hotspot); | 25307 | hotspot = XCDR (hotspot); |
| @@ -25464,7 +25467,7 @@ note_mouse_highlight (struct frame *f, int x, int y) | |||
| 25464 | check if the text under it has one. */ | 25467 | check if the text under it has one. */ |
| 25465 | struct glyph_row *r = MATRIX_ROW (w->current_matrix, vpos); | 25468 | struct glyph_row *r = MATRIX_ROW (w->current_matrix, vpos); |
| 25466 | EMACS_INT start = MATRIX_ROW_START_CHARPOS (r); | 25469 | EMACS_INT start = MATRIX_ROW_START_CHARPOS (r); |
| 25467 | pos = string_buffer_position (w, object, start); | 25470 | pos = string_buffer_position (object, start); |
| 25468 | if (pos > 0) | 25471 | if (pos > 0) |
| 25469 | { | 25472 | { |
| 25470 | mouse_face = get_char_property_and_overlay | 25473 | mouse_face = get_char_property_and_overlay |
| @@ -25574,7 +25577,7 @@ note_mouse_highlight (struct frame *f, int x, int y) | |||
| 25574 | struct glyph_row *r | 25577 | struct glyph_row *r |
| 25575 | = MATRIX_ROW (w->current_matrix, vpos); | 25578 | = MATRIX_ROW (w->current_matrix, vpos); |
| 25576 | EMACS_INT start = MATRIX_ROW_START_CHARPOS (r); | 25579 | EMACS_INT start = MATRIX_ROW_START_CHARPOS (r); |
| 25577 | EMACS_INT p = string_buffer_position (w, obj, start); | 25580 | EMACS_INT p = string_buffer_position (obj, start); |
| 25578 | if (p > 0) | 25581 | if (p > 0) |
| 25579 | { | 25582 | { |
| 25580 | help = Fget_char_property (make_number (p), | 25583 | help = Fget_char_property (make_number (p), |
| @@ -25630,7 +25633,7 @@ note_mouse_highlight (struct frame *f, int x, int y) | |||
| 25630 | struct glyph_row *r | 25633 | struct glyph_row *r |
| 25631 | = MATRIX_ROW (w->current_matrix, vpos); | 25634 | = MATRIX_ROW (w->current_matrix, vpos); |
| 25632 | EMACS_INT start = MATRIX_ROW_START_CHARPOS (r); | 25635 | EMACS_INT start = MATRIX_ROW_START_CHARPOS (r); |
| 25633 | EMACS_INT p = string_buffer_position (w, obj, start); | 25636 | EMACS_INT p = string_buffer_position (obj, start); |
| 25634 | if (p > 0) | 25637 | if (p > 0) |
| 25635 | pointer = Fget_char_property (make_number (p), | 25638 | pointer = Fget_char_property (make_number (p), |
| 25636 | Qpointer, w->buffer); | 25639 | Qpointer, w->buffer); |
diff --git a/src/xfont.c b/src/xfont.c index f8aace3663c..3e0fcd2cd75 100644 --- a/src/xfont.c +++ b/src/xfont.c | |||
| @@ -629,7 +629,7 @@ xfont_list_family (Lisp_Object frame) | |||
| 629 | char **names; | 629 | char **names; |
| 630 | int num_fonts, i; | 630 | int num_fonts, i; |
| 631 | Lisp_Object list; | 631 | Lisp_Object list; |
| 632 | char *last_family; | 632 | char *last_family IF_LINT (= 0); |
| 633 | int last_len; | 633 | int last_len; |
| 634 | 634 | ||
| 635 | BLOCK_INPUT; | 635 | BLOCK_INPUT; |
diff --git a/src/xftfont.c b/src/xftfont.c index 695527c4236..c27a4fcf91a 100644 --- a/src/xftfont.c +++ b/src/xftfont.c | |||
| @@ -280,7 +280,7 @@ xftfont_open (FRAME_PTR f, Lisp_Object entity, int pixel_size) | |||
| 280 | { | 280 | { |
| 281 | FcResult result; | 281 | FcResult result; |
| 282 | Display *display = FRAME_X_DISPLAY (f); | 282 | Display *display = FRAME_X_DISPLAY (f); |
| 283 | Lisp_Object val, filename, index, font_object; | 283 | Lisp_Object val, filename, idx, font_object; |
| 284 | FcPattern *pat = NULL, *match; | 284 | FcPattern *pat = NULL, *match; |
| 285 | struct xftfont_info *xftfont_info = NULL; | 285 | struct xftfont_info *xftfont_info = NULL; |
| 286 | struct font *font; | 286 | struct font *font; |
| @@ -298,7 +298,7 @@ xftfont_open (FRAME_PTR f, Lisp_Object entity, int pixel_size) | |||
| 298 | return Qnil; | 298 | return Qnil; |
| 299 | val = XCDR (val); | 299 | val = XCDR (val); |
| 300 | filename = XCAR (val); | 300 | filename = XCAR (val); |
| 301 | index = XCDR (val); | 301 | idx = XCDR (val); |
| 302 | size = XINT (AREF (entity, FONT_SIZE_INDEX)); | 302 | size = XINT (AREF (entity, FONT_SIZE_INDEX)); |
| 303 | if (size == 0) | 303 | if (size == 0) |
| 304 | size = pixel_size; | 304 | size = pixel_size; |
| @@ -335,7 +335,7 @@ xftfont_open (FRAME_PTR f, Lisp_Object entity, int pixel_size) | |||
| 335 | xftfont_add_rendering_parameters (pat, entity); | 335 | xftfont_add_rendering_parameters (pat, entity); |
| 336 | 336 | ||
| 337 | FcPatternAddString (pat, FC_FILE, (FcChar8 *) SDATA (filename)); | 337 | FcPatternAddString (pat, FC_FILE, (FcChar8 *) SDATA (filename)); |
| 338 | FcPatternAddInteger (pat, FC_INDEX, XINT (index)); | 338 | FcPatternAddInteger (pat, FC_INDEX, XINT (idx)); |
| 339 | 339 | ||
| 340 | 340 | ||
| 341 | BLOCK_INPUT; | 341 | BLOCK_INPUT; |
| @@ -409,9 +409,9 @@ xftfont_open (FRAME_PTR f, Lisp_Object entity, int pixel_size) | |||
| 409 | spacing = FC_PROPORTIONAL; | 409 | spacing = FC_PROPORTIONAL; |
| 410 | if (! ascii_printable[0]) | 410 | if (! ascii_printable[0]) |
| 411 | { | 411 | { |
| 412 | int i; | 412 | int ch; |
| 413 | for (i = 0; i < 95; i++) | 413 | for (ch = 0; ch < 95; ch++) |
| 414 | ascii_printable[i] = ' ' + i; | 414 | ascii_printable[ch] = ' ' + ch; |
| 415 | } | 415 | } |
| 416 | BLOCK_INPUT; | 416 | BLOCK_INPUT; |
| 417 | if (spacing != FC_PROPORTIONAL | 417 | if (spacing != FC_PROPORTIONAL |
| @@ -672,7 +672,8 @@ xftfont_draw (struct glyph_string *s, int from, int to, int x, int y, int with_b | |||
| 672 | return len; | 672 | return len; |
| 673 | } | 673 | } |
| 674 | 674 | ||
| 675 | Lisp_Object | 675 | #if defined HAVE_M17N_FLT && defined HAVE_LIBOTF |
| 676 | static Lisp_Object | ||
| 676 | xftfont_shape (Lisp_Object lgstring) | 677 | xftfont_shape (Lisp_Object lgstring) |
| 677 | { | 678 | { |
| 678 | struct font *font; | 679 | struct font *font; |
| @@ -688,6 +689,7 @@ xftfont_shape (Lisp_Object lgstring) | |||
| 688 | XftUnlockFace (xftfont_info->xftfont); | 689 | XftUnlockFace (xftfont_info->xftfont); |
| 689 | return val; | 690 | return val; |
| 690 | } | 691 | } |
| 692 | #endif | ||
| 691 | 693 | ||
| 692 | static int | 694 | static int |
| 693 | xftfont_end_for_frame (FRAME_PTR f) | 695 | xftfont_end_for_frame (FRAME_PTR f) |
diff --git a/src/xmenu.c b/src/xmenu.c index eab7bb03f20..8ecef00c88e 100644 --- a/src/xmenu.c +++ b/src/xmenu.c | |||
| @@ -383,7 +383,7 @@ x_menu_wait_for_event (void *data) | |||
| 383 | #endif | 383 | #endif |
| 384 | ) | 384 | ) |
| 385 | { | 385 | { |
| 386 | EMACS_TIME next_time = timer_check (1), *ntp; | 386 | EMACS_TIME next_time = timer_check (), *ntp; |
| 387 | long secs = EMACS_SECS (next_time); | 387 | long secs = EMACS_SECS (next_time); |
| 388 | long usecs = EMACS_USECS (next_time); | 388 | long usecs = EMACS_USECS (next_time); |
| 389 | SELECT_TYPE read_fds; | 389 | SELECT_TYPE read_fds; |
| @@ -712,7 +712,7 @@ show_help_event (FRAME_PTR f, xt_or_gtk_widget widget, Lisp_Object help) | |||
| 712 | break; | 712 | break; |
| 713 | } | 713 | } |
| 714 | #endif | 714 | #endif |
| 715 | show_help_echo (help, Qnil, Qnil, Qnil, 1); | 715 | show_help_echo (help, Qnil, Qnil, Qnil); |
| 716 | } | 716 | } |
| 717 | } | 717 | } |
| 718 | 718 | ||
| @@ -922,7 +922,7 @@ set_frame_menubar (FRAME_PTR f, int first_time, int deep_p) | |||
| 922 | #endif | 922 | #endif |
| 923 | Lisp_Object items; | 923 | Lisp_Object items; |
| 924 | widget_value *wv, *first_wv, *prev_wv = 0; | 924 | widget_value *wv, *first_wv, *prev_wv = 0; |
| 925 | int i, last_i = 0; | 925 | EMACS_UINT i, last_i = 0; |
| 926 | int *submenu_start, *submenu_end; | 926 | int *submenu_start, *submenu_end; |
| 927 | int *submenu_top_level_items, *submenu_n_panes; | 927 | int *submenu_top_level_items, *submenu_n_panes; |
| 928 | 928 | ||
| @@ -2201,7 +2201,7 @@ menu_help_callback (char *help_string, int pane, int item) | |||
| 2201 | Fcons (pane_name, | 2201 | Fcons (pane_name, |
| 2202 | Fcons (make_number (pane), Qnil))); | 2202 | Fcons (make_number (pane), Qnil))); |
| 2203 | show_help_echo (help_string ? build_string (help_string) : Qnil, | 2203 | show_help_echo (help_string ? build_string (help_string) : Qnil, |
| 2204 | Qnil, menu_object, make_number (item), 1); | 2204 | Qnil, menu_object, make_number (item)); |
| 2205 | } | 2205 | } |
| 2206 | 2206 | ||
| 2207 | static Lisp_Object | 2207 | static Lisp_Object |
| @@ -28,7 +28,8 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | |||
| 28 | #include "lisp.h" | 28 | #include "lisp.h" |
| 29 | #include "buffer.h" | 29 | #include "buffer.h" |
| 30 | 30 | ||
| 31 | Lisp_Object make_dom (xmlNode *node) | 31 | static Lisp_Object |
| 32 | make_dom (xmlNode *node) | ||
| 32 | { | 33 | { |
| 33 | if (node->type == XML_ELEMENT_NODE) | 34 | if (node->type == XML_ELEMENT_NODE) |
| 34 | { | 35 | { |
diff --git a/src/xselect.c b/src/xselect.c index 5254fa96838..451b2a0b13f 100644 --- a/src/xselect.c +++ b/src/xselect.c | |||
| @@ -2190,7 +2190,8 @@ and t is the same as `SECONDARY'. */) | |||
| 2190 | ***********************************************************************/ | 2190 | ***********************************************************************/ |
| 2191 | /* Check that lisp values are of correct type for x_fill_property_data. | 2191 | /* Check that lisp values are of correct type for x_fill_property_data. |
| 2192 | That is, number, string or a cons with two numbers (low and high 16 | 2192 | That is, number, string or a cons with two numbers (low and high 16 |
| 2193 | bit parts of a 32 bit number). */ | 2193 | bit parts of a 32 bit number). Return the number of items in DATA, |
| 2194 | or -1 if there is an error. */ | ||
| 2194 | 2195 | ||
| 2195 | int | 2196 | int |
| 2196 | x_check_property_data (Lisp_Object data) | 2197 | x_check_property_data (Lisp_Object data) |
| @@ -2198,15 +2199,16 @@ x_check_property_data (Lisp_Object data) | |||
| 2198 | Lisp_Object iter; | 2199 | Lisp_Object iter; |
| 2199 | int size = 0; | 2200 | int size = 0; |
| 2200 | 2201 | ||
| 2201 | for (iter = data; CONSP (iter) && size != -1; iter = XCDR (iter), ++size) | 2202 | for (iter = data; CONSP (iter); iter = XCDR (iter)) |
| 2202 | { | 2203 | { |
| 2203 | Lisp_Object o = XCAR (iter); | 2204 | Lisp_Object o = XCAR (iter); |
| 2204 | 2205 | ||
| 2205 | if (! NUMBERP (o) && ! STRINGP (o) && ! CONSP (o)) | 2206 | if (! NUMBERP (o) && ! STRINGP (o) && ! CONSP (o)) |
| 2206 | size = -1; | 2207 | return -1; |
| 2207 | else if (CONSP (o) && | 2208 | else if (CONSP (o) && |
| 2208 | (! NUMBERP (XCAR (o)) || ! NUMBERP (XCDR (o)))) | 2209 | (! NUMBERP (XCAR (o)) || ! NUMBERP (XCDR (o)))) |
| 2209 | size = -1; | 2210 | return -1; |
| 2211 | size++; | ||
| 2210 | } | 2212 | } |
| 2211 | 2213 | ||
| 2212 | return size; | 2214 | return size; |
diff --git a/src/xterm.c b/src/xterm.c index fd7ffd68e62..dc1fd3cbbd1 100644 --- a/src/xterm.c +++ b/src/xterm.c | |||
| @@ -349,7 +349,7 @@ static int handle_one_xevent (struct x_display_info *, XEvent *, | |||
| 349 | int *, struct input_event *); | 349 | int *, struct input_event *); |
| 350 | /* Don't declare this NO_RETURN because we want no | 350 | /* Don't declare this NO_RETURN because we want no |
| 351 | interference with debugging failing X calls. */ | 351 | interference with debugging failing X calls. */ |
| 352 | static SIGTYPE x_connection_closed (Display *, const char *); | 352 | static void x_connection_closed (Display *, const char *); |
| 353 | 353 | ||
| 354 | 354 | ||
| 355 | /* Flush display of frame F, or of all frames if F is null. */ | 355 | /* Flush display of frame F, or of all frames if F is null. */ |
| @@ -2928,10 +2928,14 @@ x_clear_frame (struct frame *f) | |||
| 2928 | /* We don't set the output cursor here because there will always | 2928 | /* We don't set the output cursor here because there will always |
| 2929 | follow an explicit cursor_to. */ | 2929 | follow an explicit cursor_to. */ |
| 2930 | BLOCK_INPUT; | 2930 | BLOCK_INPUT; |
| 2931 | XClearWindow (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f)); | ||
| 2932 | 2931 | ||
| 2933 | /* We have to clear the scroll bars, too. If we have changed | 2932 | /* The following calls have been commented out because they do not |
| 2934 | colors or something like that, then they should be notified. */ | 2933 | seem to accomplish anything, apart from causing flickering during |
| 2934 | window resize. */ | ||
| 2935 | /* XClearWindow (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f)); */ | ||
| 2936 | |||
| 2937 | /* We have to clear the scroll bars. If we have changed colors or | ||
| 2938 | something like that, then they should be notified. */ | ||
| 2935 | x_scroll_bar_clear (f); | 2939 | x_scroll_bar_clear (f); |
| 2936 | 2940 | ||
| 2937 | #if defined (USE_GTK) && defined (USE_TOOLKIT_SCROLL_BARS) | 2941 | #if defined (USE_GTK) && defined (USE_TOOLKIT_SCROLL_BARS) |
| @@ -7646,7 +7650,7 @@ x_trace_wire (void) | |||
| 7646 | SIGPIPE will fail, causing Xlib to invoke the X IO error handler, | 7650 | SIGPIPE will fail, causing Xlib to invoke the X IO error handler, |
| 7647 | which will do the appropriate cleanup for us. */ | 7651 | which will do the appropriate cleanup for us. */ |
| 7648 | 7652 | ||
| 7649 | static SIGTYPE | 7653 | static void |
| 7650 | x_connection_signal (int signalnum) /* If we don't have an argument, */ | 7654 | x_connection_signal (int signalnum) /* If we don't have an argument, */ |
| 7651 | /* some compilers complain in signal calls. */ | 7655 | /* some compilers complain in signal calls. */ |
| 7652 | { | 7656 | { |
| @@ -7669,7 +7673,7 @@ static char *error_msg; | |||
| 7669 | /* Handle the loss of connection to display DPY. ERROR_MESSAGE is | 7673 | /* Handle the loss of connection to display DPY. ERROR_MESSAGE is |
| 7670 | the text of an error message that lead to the connection loss. */ | 7674 | the text of an error message that lead to the connection loss. */ |
| 7671 | 7675 | ||
| 7672 | static SIGTYPE | 7676 | static void |
| 7673 | x_connection_closed (Display *dpy, const char *error_message) | 7677 | x_connection_closed (Display *dpy, const char *error_message) |
| 7674 | { | 7678 | { |
| 7675 | struct x_display_info *dpyinfo = x_display_info_for_display (dpy); | 7679 | struct x_display_info *dpyinfo = x_display_info_for_display (dpy); |
| @@ -9117,7 +9121,7 @@ x_make_frame_visible (struct frame *f) | |||
| 9117 | unknown reason, the call to XtMapWidget is completely ignored. | 9121 | unknown reason, the call to XtMapWidget is completely ignored. |
| 9118 | Mapping the widget a second time works. */ | 9122 | Mapping the widget a second time works. */ |
| 9119 | 9123 | ||
| 9120 | if (!FRAME_VISIBLE_P (f) && --retry_count > 0) | 9124 | if (!FRAME_VISIBLE_P (f) && --retry_count != 0) |
| 9121 | goto retry; | 9125 | goto retry; |
| 9122 | } | 9126 | } |
| 9123 | } | 9127 | } |
| @@ -9722,7 +9726,7 @@ same_x_server (const char *name1, const char *name2) | |||
| 9722 | for (; *name1 != '\0' && *name1 == *name2; name1++, name2++) | 9726 | for (; *name1 != '\0' && *name1 == *name2; name1++, name2++) |
| 9723 | { | 9727 | { |
| 9724 | if (*name1 == ':') | 9728 | if (*name1 == ':') |
| 9725 | seen_colon++; | 9729 | seen_colon = 1; |
| 9726 | if (seen_colon && *name1 == '.') | 9730 | if (seen_colon && *name1 == '.') |
| 9727 | return 1; | 9731 | return 1; |
| 9728 | } | 9732 | } |