diff options
| author | Kenichi Handa | 2011-05-19 09:37:36 +0900 |
|---|---|---|
| committer | Kenichi Handa | 2011-05-19 09:37:36 +0900 |
| commit | 23373930daa192623bfda56960ccb04b2703fbe5 (patch) | |
| tree | 4350ad7774b3d4dc6f2ccf0e6343b505582e0112 | |
| parent | a28d4396018e48479916fd624e2371aa1f75e6e7 (diff) | |
| parent | 627abcddd1c45a07d58b9c0cbfd6bb62caf256a9 (diff) | |
| download | emacs-23373930daa192623bfda56960ccb04b2703fbe5.tar.gz emacs-23373930daa192623bfda56960ccb04b2703fbe5.zip | |
merge trunk
63 files changed, 1064 insertions, 1891 deletions
| @@ -1,3 +1,12 @@ | |||
| 1 | 2011-05-17 Paul Eggert <eggert@cs.ucla.edu> | ||
| 2 | |||
| 3 | * lib/gnulib.mk: | ||
| 4 | * lib/intprops.h: | ||
| 5 | * lib/unistd.in.h: | ||
| 6 | * m4/inttypes.m4: | ||
| 7 | * m4/stdint.m4: | ||
| 8 | * m4/unistd_h.m4: Sync from gnulib. | ||
| 9 | |||
| 1 | 2011-05-14 Glenn Morris <rgm@gnu.org> | 10 | 2011-05-14 Glenn Morris <rgm@gnu.org> |
| 2 | 11 | ||
| 3 | * configure.in: Treat failure to find an X toolkit the same way we treat | 12 | * configure.in: Treat failure to find an X toolkit the same way we treat |
| @@ -705,8 +705,8 @@ directory of the Emacs distribution. | |||
| 705 | in `./lib-src' to their final destinations, as selected in `./src/epaths.h'. | 705 | in `./lib-src' to their final destinations, as selected in `./src/epaths.h'. |
| 706 | 706 | ||
| 707 | Strictly speaking, not all of the executables in `./lib-src' need be copied. | 707 | Strictly speaking, not all of the executables in `./lib-src' need be copied. |
| 708 | - The programs `fakemail', `hexl', `movemail', `profile', `rcs2log', | 708 | - The programs `hexl', `movemail', `profile', `rcs2log', and `vcdiff' |
| 709 | and `vcdiff' are used by Emacs; they do need to be copied. | 709 | are used by Emacs; they do need to be copied. |
| 710 | - The programs `etags', `ctags', `emacsclient', and `rcs-checkin' | 710 | - The programs `etags', `ctags', `emacsclient', and `rcs-checkin' |
| 711 | are intended to be run by users; they are handled below. | 711 | are intended to be run by users; they are handled below. |
| 712 | - The programs `make-docfile' and `test-distrib' were | 712 | - The programs `make-docfile' and `test-distrib' were |
diff --git a/autogen/Makefile.in b/autogen/Makefile.in index 16b2aeb92a0..b8b06d5ffd5 100644 --- a/autogen/Makefile.in +++ b/autogen/Makefile.in | |||
| @@ -48,7 +48,6 @@ host_triplet = @host@ | |||
| 48 | DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \ | 48 | DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \ |
| 49 | $(srcdir)/gnulib.mk COPYING | 49 | $(srcdir)/gnulib.mk COPYING |
| 50 | @gl_GNULIB_ENABLED_be453cec5eecf5731a274f2de7f2db36_TRUE@am__append_1 = gettext.h | 50 | @gl_GNULIB_ENABLED_be453cec5eecf5731a274f2de7f2db36_TRUE@am__append_1 = gettext.h |
| 51 | @gl_GNULIB_ENABLED_verify_TRUE@am__append_2 = verify.h | ||
| 52 | subdir = lib | 51 | subdir = lib |
| 53 | ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 | 52 | ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 |
| 54 | am__aclocal_m4_deps = $(top_srcdir)/m4/00gnulib.m4 \ | 53 | am__aclocal_m4_deps = $(top_srcdir)/m4/00gnulib.m4 \ |
| @@ -83,10 +82,10 @@ ARFLAGS = cru | |||
| 83 | libgnu_a_AR = $(AR) $(ARFLAGS) | 82 | libgnu_a_AR = $(AR) $(ARFLAGS) |
| 84 | am__DEPENDENCIES_1 = | 83 | am__DEPENDENCIES_1 = |
| 85 | am__libgnu_a_SOURCES_DIST = allocator.c careadlinkat.c dtoastr.c \ | 84 | am__libgnu_a_SOURCES_DIST = allocator.c careadlinkat.c dtoastr.c \ |
| 86 | gettext.h ignore-value.h verify.h | 85 | gettext.h |
| 87 | am__objects_1 = | 86 | am__objects_1 = |
| 88 | am_libgnu_a_OBJECTS = allocator.$(OBJEXT) careadlinkat.$(OBJEXT) \ | 87 | am_libgnu_a_OBJECTS = allocator.$(OBJEXT) careadlinkat.$(OBJEXT) \ |
| 89 | dtoastr.$(OBJEXT) $(am__objects_1) $(am__objects_1) | 88 | dtoastr.$(OBJEXT) $(am__objects_1) |
| 90 | libgnu_a_OBJECTS = $(am_libgnu_a_OBJECTS) | 89 | libgnu_a_OBJECTS = $(am_libgnu_a_OBJECTS) |
| 91 | depcomp = $(SHELL) $(top_srcdir)/depcomp | 90 | depcomp = $(SHELL) $(top_srcdir)/depcomp |
| 92 | am__depfiles_maybe = depfiles | 91 | am__depfiles_maybe = depfiles |
| @@ -208,6 +207,7 @@ GNULIB_GETS = @GNULIB_GETS@ | |||
| 208 | GNULIB_GETSUBOPT = @GNULIB_GETSUBOPT@ | 207 | GNULIB_GETSUBOPT = @GNULIB_GETSUBOPT@ |
| 209 | GNULIB_GETUSERSHELL = @GNULIB_GETUSERSHELL@ | 208 | GNULIB_GETUSERSHELL = @GNULIB_GETUSERSHELL@ |
| 210 | GNULIB_GRANTPT = @GNULIB_GRANTPT@ | 209 | GNULIB_GRANTPT = @GNULIB_GRANTPT@ |
| 210 | GNULIB_GROUP_MEMBER = @GNULIB_GROUP_MEMBER@ | ||
| 211 | GNULIB_IMAXABS = @GNULIB_IMAXABS@ | 211 | GNULIB_IMAXABS = @GNULIB_IMAXABS@ |
| 212 | GNULIB_IMAXDIV = @GNULIB_IMAXDIV@ | 212 | GNULIB_IMAXDIV = @GNULIB_IMAXDIV@ |
| 213 | GNULIB_LCHMOD = @GNULIB_LCHMOD@ | 213 | GNULIB_LCHMOD = @GNULIB_LCHMOD@ |
| @@ -354,6 +354,7 @@ HAVE_GETOPT_H = @HAVE_GETOPT_H@ | |||
| 354 | HAVE_GETPAGESIZE = @HAVE_GETPAGESIZE@ | 354 | HAVE_GETPAGESIZE = @HAVE_GETPAGESIZE@ |
| 355 | HAVE_GETSUBOPT = @HAVE_GETSUBOPT@ | 355 | HAVE_GETSUBOPT = @HAVE_GETSUBOPT@ |
| 356 | HAVE_GRANTPT = @HAVE_GRANTPT@ | 356 | HAVE_GRANTPT = @HAVE_GRANTPT@ |
| 357 | HAVE_GROUP_MEMBER = @HAVE_GROUP_MEMBER@ | ||
| 357 | HAVE_INTTYPES_H = @HAVE_INTTYPES_H@ | 358 | HAVE_INTTYPES_H = @HAVE_INTTYPES_H@ |
| 358 | HAVE_LCHMOD = @HAVE_LCHMOD@ | 359 | HAVE_LCHMOD = @HAVE_LCHMOD@ |
| 359 | HAVE_LCHOWN = @HAVE_LCHOWN@ | 360 | HAVE_LCHOWN = @HAVE_LCHOWN@ |
| @@ -737,13 +738,13 @@ BUILT_SOURCES = arg-nonnull.h c++defs.h $(GETOPT_H) inttypes.h \ | |||
| 737 | EXTRA_DIST = allocator.h $(top_srcdir)/./arg-nonnull.h \ | 738 | EXTRA_DIST = allocator.h $(top_srcdir)/./arg-nonnull.h \ |
| 738 | $(top_srcdir)/./c++defs.h careadlinkat.h md5.c md5.h dosname.h \ | 739 | $(top_srcdir)/./c++defs.h careadlinkat.h md5.c md5.h dosname.h \ |
| 739 | ftoastr.c ftoastr.h filemode.c filemode.h getloadavg.c \ | 740 | ftoastr.c ftoastr.h filemode.c filemode.h getloadavg.c \ |
| 740 | getopt.c getopt.in.h getopt1.c getopt_int.h intprops.h \ | 741 | getopt.c getopt.in.h getopt1.c getopt_int.h ignore-value.h \ |
| 741 | inttypes.in.h lstat.c mktime-internal.h mktime.c readlink.c \ | 742 | intprops.h inttypes.in.h lstat.c mktime-internal.h mktime.c \ |
| 742 | stat.c stdarg.in.h stdbool.in.h stddef.in.h stdint.in.h \ | 743 | readlink.c stat.c stdarg.in.h stdbool.in.h stddef.in.h \ |
| 743 | stdio.in.h stdlib.in.h strftime.c strftime.h strtol.c \ | 744 | stdint.in.h stdio.in.h stdlib.in.h strftime.c strftime.h \ |
| 744 | strtoul.c strtoull.c strtoimax.c strtoumax.c symlink.c \ | 745 | strtol.c strtoul.c strtoull.c strtoimax.c strtoumax.c \ |
| 745 | sys_stat.in.h time.in.h time_r.c unistd.in.h \ | 746 | symlink.c sys_stat.in.h time.in.h time_r.c unistd.in.h \ |
| 746 | $(top_srcdir)/./warn-on-use.h | 747 | verify.h $(top_srcdir)/./warn-on-use.h |
| 747 | MOSTLYCLEANDIRS = sys | 748 | MOSTLYCLEANDIRS = sys |
| 748 | MOSTLYCLEANFILES = core *.stackdump arg-nonnull.h arg-nonnull.h-t \ | 749 | MOSTLYCLEANFILES = core *.stackdump arg-nonnull.h arg-nonnull.h-t \ |
| 749 | c++defs.h c++defs.h-t getopt.h getopt.h-t inttypes.h \ | 750 | c++defs.h c++defs.h-t getopt.h getopt.h-t inttypes.h \ |
| @@ -754,7 +755,7 @@ MOSTLYCLEANFILES = core *.stackdump arg-nonnull.h arg-nonnull.h-t \ | |||
| 754 | noinst_LIBRARIES = libgnu.a | 755 | noinst_LIBRARIES = libgnu.a |
| 755 | DEFAULT_INCLUDES = -I. -I../src -I$(top_srcdir)/src | 756 | DEFAULT_INCLUDES = -I. -I../src -I$(top_srcdir)/src |
| 756 | libgnu_a_SOURCES = allocator.c careadlinkat.c dtoastr.c \ | 757 | libgnu_a_SOURCES = allocator.c careadlinkat.c dtoastr.c \ |
| 757 | $(am__append_1) ignore-value.h $(am__append_2) | 758 | $(am__append_1) |
| 758 | libgnu_a_LIBADD = $(gl_LIBOBJS) | 759 | libgnu_a_LIBADD = $(gl_LIBOBJS) |
| 759 | libgnu_a_DEPENDENCIES = $(gl_LIBOBJS) | 760 | libgnu_a_DEPENDENCIES = $(gl_LIBOBJS) |
| 760 | EXTRA_libgnu_a_SOURCES = md5.c ftoastr.c filemode.c getloadavg.c \ | 761 | EXTRA_libgnu_a_SOURCES = md5.c ftoastr.c filemode.c getloadavg.c \ |
| @@ -1499,6 +1500,7 @@ unistd.h: unistd.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H | |||
| 1499 | -e 's|@''GNULIB_GETLOGIN_R''@|$(GNULIB_GETLOGIN_R)|g' \ | 1500 | -e 's|@''GNULIB_GETLOGIN_R''@|$(GNULIB_GETLOGIN_R)|g' \ |
| 1500 | -e 's|@''GNULIB_GETPAGESIZE''@|$(GNULIB_GETPAGESIZE)|g' \ | 1501 | -e 's|@''GNULIB_GETPAGESIZE''@|$(GNULIB_GETPAGESIZE)|g' \ |
| 1501 | -e 's|@''GNULIB_GETUSERSHELL''@|$(GNULIB_GETUSERSHELL)|g' \ | 1502 | -e 's|@''GNULIB_GETUSERSHELL''@|$(GNULIB_GETUSERSHELL)|g' \ |
| 1503 | -e 's|@''GNULIB_GROUP_MEMBER''@|$(GNULIB_GROUP_MEMBER)|g' \ | ||
| 1502 | -e 's|@''GNULIB_LCHOWN''@|$(GNULIB_LCHOWN)|g' \ | 1504 | -e 's|@''GNULIB_LCHOWN''@|$(GNULIB_LCHOWN)|g' \ |
| 1503 | -e 's|@''GNULIB_LINK''@|$(GNULIB_LINK)|g' \ | 1505 | -e 's|@''GNULIB_LINK''@|$(GNULIB_LINK)|g' \ |
| 1504 | -e 's|@''GNULIB_LINKAT''@|$(GNULIB_LINKAT)|g' \ | 1506 | -e 's|@''GNULIB_LINKAT''@|$(GNULIB_LINKAT)|g' \ |
| @@ -1537,6 +1539,7 @@ unistd.h: unistd.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H | |||
| 1537 | -e 's|@''HAVE_GETHOSTNAME''@|$(HAVE_GETHOSTNAME)|g' \ | 1539 | -e 's|@''HAVE_GETHOSTNAME''@|$(HAVE_GETHOSTNAME)|g' \ |
| 1538 | -e 's|@''HAVE_GETLOGIN''@|$(HAVE_GETLOGIN)|g' \ | 1540 | -e 's|@''HAVE_GETLOGIN''@|$(HAVE_GETLOGIN)|g' \ |
| 1539 | -e 's|@''HAVE_GETPAGESIZE''@|$(HAVE_GETPAGESIZE)|g' \ | 1541 | -e 's|@''HAVE_GETPAGESIZE''@|$(HAVE_GETPAGESIZE)|g' \ |
| 1542 | -e 's|@''HAVE_GROUP_MEMBER''@|$(HAVE_GROUP_MEMBER)|g' \ | ||
| 1540 | -e 's|@''HAVE_LCHOWN''@|$(HAVE_LCHOWN)|g' \ | 1543 | -e 's|@''HAVE_LCHOWN''@|$(HAVE_LCHOWN)|g' \ |
| 1541 | -e 's|@''HAVE_LINK''@|$(HAVE_LINK)|g' \ | 1544 | -e 's|@''HAVE_LINK''@|$(HAVE_LINK)|g' \ |
| 1542 | -e 's|@''HAVE_LINKAT''@|$(HAVE_LINKAT)|g' \ | 1545 | -e 's|@''HAVE_LINKAT''@|$(HAVE_LINKAT)|g' \ |
diff --git a/autogen/configure b/autogen/configure index e4edf2851ae..b3051c9558e 100755 --- a/autogen/configure +++ b/autogen/configure | |||
| @@ -947,6 +947,7 @@ HAVE_PIPE | |||
| 947 | HAVE_LINKAT | 947 | HAVE_LINKAT |
| 948 | HAVE_LINK | 948 | HAVE_LINK |
| 949 | HAVE_LCHOWN | 949 | HAVE_LCHOWN |
| 950 | HAVE_GROUP_MEMBER | ||
| 950 | HAVE_GETPAGESIZE | 951 | HAVE_GETPAGESIZE |
| 951 | HAVE_GETLOGIN | 952 | HAVE_GETLOGIN |
| 952 | HAVE_GETHOSTNAME | 953 | HAVE_GETHOSTNAME |
| @@ -984,6 +985,7 @@ GNULIB_LSEEK | |||
| 984 | GNULIB_LINKAT | 985 | GNULIB_LINKAT |
| 985 | GNULIB_LINK | 986 | GNULIB_LINK |
| 986 | GNULIB_LCHOWN | 987 | GNULIB_LCHOWN |
| 988 | GNULIB_GROUP_MEMBER | ||
| 987 | GNULIB_GETUSERSHELL | 989 | GNULIB_GETUSERSHELL |
| 988 | GNULIB_GETPAGESIZE | 990 | GNULIB_GETPAGESIZE |
| 989 | GNULIB_GETLOGIN_R | 991 | GNULIB_GETLOGIN_R |
| @@ -14390,6 +14392,7 @@ _ACEOF | |||
| 14390 | GNULIB_GETLOGIN_R=0; | 14392 | GNULIB_GETLOGIN_R=0; |
| 14391 | GNULIB_GETPAGESIZE=0; | 14393 | GNULIB_GETPAGESIZE=0; |
| 14392 | GNULIB_GETUSERSHELL=0; | 14394 | GNULIB_GETUSERSHELL=0; |
| 14395 | GNULIB_GROUP_MEMBER=0; | ||
| 14393 | GNULIB_LCHOWN=0; | 14396 | GNULIB_LCHOWN=0; |
| 14394 | GNULIB_LINK=0; | 14397 | GNULIB_LINK=0; |
| 14395 | GNULIB_LINKAT=0; | 14398 | GNULIB_LINKAT=0; |
| @@ -14427,6 +14430,7 @@ _ACEOF | |||
| 14427 | HAVE_GETHOSTNAME=1; | 14430 | HAVE_GETHOSTNAME=1; |
| 14428 | HAVE_GETLOGIN=1; | 14431 | HAVE_GETLOGIN=1; |
| 14429 | HAVE_GETPAGESIZE=1; | 14432 | HAVE_GETPAGESIZE=1; |
| 14433 | HAVE_GROUP_MEMBER=1; | ||
| 14430 | HAVE_LCHOWN=1; | 14434 | HAVE_LCHOWN=1; |
| 14431 | HAVE_LINK=1; | 14435 | HAVE_LINK=1; |
| 14432 | HAVE_LINKAT=1; | 14436 | HAVE_LINKAT=1; |
| @@ -15923,6 +15927,81 @@ fi | |||
| 15923 | UINT64_MAX_EQ_ULONG_MAX='defined _LP64'; | 15927 | UINT64_MAX_EQ_ULONG_MAX='defined _LP64'; |
| 15924 | 15928 | ||
| 15925 | 15929 | ||
| 15930 | |||
| 15931 | |||
| 15932 | |||
| 15933 | |||
| 15934 | |||
| 15935 | |||
| 15936 | |||
| 15937 | |||
| 15938 | |||
| 15939 | |||
| 15940 | |||
| 15941 | |||
| 15942 | |||
| 15943 | if test $gl_cv_have_include_next = yes; then | ||
| 15944 | gl_cv_next_inttypes_h='<'inttypes.h'>' | ||
| 15945 | else | ||
| 15946 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <inttypes.h>" >&5 | ||
| 15947 | $as_echo_n "checking absolute name of <inttypes.h>... " >&6; } | ||
| 15948 | if test "${gl_cv_next_inttypes_h+set}" = set; then : | ||
| 15949 | $as_echo_n "(cached) " >&6 | ||
| 15950 | else | ||
| 15951 | |||
| 15952 | if test $ac_cv_header_inttypes_h = yes; then | ||
| 15953 | |||
| 15954 | |||
| 15955 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | ||
| 15956 | /* end confdefs.h. */ | ||
| 15957 | #include <inttypes.h> | ||
| 15958 | |||
| 15959 | _ACEOF | ||
| 15960 | case "$host_os" in | ||
| 15961 | aix*) gl_absname_cpp="$ac_cpp -C" ;; | ||
| 15962 | *) gl_absname_cpp="$ac_cpp" ;; | ||
| 15963 | esac | ||
| 15964 | gl_cv_next_inttypes_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | | ||
| 15965 | sed -n '\#/inttypes.h#{ | ||
| 15966 | s#.*"\(.*/inttypes.h\)".*#\1# | ||
| 15967 | s#^/[^/]#//&# | ||
| 15968 | p | ||
| 15969 | q | ||
| 15970 | }'`'"' | ||
| 15971 | else | ||
| 15972 | gl_cv_next_inttypes_h='<'inttypes.h'>' | ||
| 15973 | fi | ||
| 15974 | |||
| 15975 | |||
| 15976 | fi | ||
| 15977 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_inttypes_h" >&5 | ||
| 15978 | $as_echo "$gl_cv_next_inttypes_h" >&6; } | ||
| 15979 | fi | ||
| 15980 | NEXT_INTTYPES_H=$gl_cv_next_inttypes_h | ||
| 15981 | |||
| 15982 | if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then | ||
| 15983 | # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next' | ||
| 15984 | gl_next_as_first_directive='<'inttypes.h'>' | ||
| 15985 | else | ||
| 15986 | # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' | ||
| 15987 | gl_next_as_first_directive=$gl_cv_next_inttypes_h | ||
| 15988 | fi | ||
| 15989 | NEXT_AS_FIRST_DIRECTIVE_INTTYPES_H=$gl_next_as_first_directive | ||
| 15990 | |||
| 15991 | |||
| 15992 | |||
| 15993 | |||
| 15994 | |||
| 15995 | |||
| 15996 | |||
| 15997 | |||
| 15998 | $as_echo "#define GL_TRIGGER_STDC_LIMIT_MACROS 1" >>confdefs.h | ||
| 15999 | |||
| 16000 | |||
| 16001 | |||
| 16002 | |||
| 16003 | |||
| 16004 | |||
| 15926 | GNULIB_FCHMODAT=0; | 16005 | GNULIB_FCHMODAT=0; |
| 15927 | GNULIB_FSTATAT=0; | 16006 | GNULIB_FSTATAT=0; |
| 15928 | GNULIB_FUTIMENS=0; | 16007 | GNULIB_FUTIMENS=0; |
| @@ -17214,80 +17293,6 @@ fi | |||
| 17214 | 17293 | ||
| 17215 | 17294 | ||
| 17216 | 17295 | ||
| 17217 | |||
| 17218 | |||
| 17219 | |||
| 17220 | |||
| 17221 | |||
| 17222 | |||
| 17223 | |||
| 17224 | |||
| 17225 | |||
| 17226 | |||
| 17227 | if test $gl_cv_have_include_next = yes; then | ||
| 17228 | gl_cv_next_inttypes_h='<'inttypes.h'>' | ||
| 17229 | else | ||
| 17230 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <inttypes.h>" >&5 | ||
| 17231 | $as_echo_n "checking absolute name of <inttypes.h>... " >&6; } | ||
| 17232 | if test "${gl_cv_next_inttypes_h+set}" = set; then : | ||
| 17233 | $as_echo_n "(cached) " >&6 | ||
| 17234 | else | ||
| 17235 | |||
| 17236 | if test $ac_cv_header_inttypes_h = yes; then | ||
| 17237 | |||
| 17238 | |||
| 17239 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | ||
| 17240 | /* end confdefs.h. */ | ||
| 17241 | #include <inttypes.h> | ||
| 17242 | |||
| 17243 | _ACEOF | ||
| 17244 | case "$host_os" in | ||
| 17245 | aix*) gl_absname_cpp="$ac_cpp -C" ;; | ||
| 17246 | *) gl_absname_cpp="$ac_cpp" ;; | ||
| 17247 | esac | ||
| 17248 | gl_cv_next_inttypes_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | | ||
| 17249 | sed -n '\#/inttypes.h#{ | ||
| 17250 | s#.*"\(.*/inttypes.h\)".*#\1# | ||
| 17251 | s#^/[^/]#//&# | ||
| 17252 | p | ||
| 17253 | q | ||
| 17254 | }'`'"' | ||
| 17255 | else | ||
| 17256 | gl_cv_next_inttypes_h='<'inttypes.h'>' | ||
| 17257 | fi | ||
| 17258 | |||
| 17259 | |||
| 17260 | fi | ||
| 17261 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_inttypes_h" >&5 | ||
| 17262 | $as_echo "$gl_cv_next_inttypes_h" >&6; } | ||
| 17263 | fi | ||
| 17264 | NEXT_INTTYPES_H=$gl_cv_next_inttypes_h | ||
| 17265 | |||
| 17266 | if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then | ||
| 17267 | # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next' | ||
| 17268 | gl_next_as_first_directive='<'inttypes.h'>' | ||
| 17269 | else | ||
| 17270 | # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' | ||
| 17271 | gl_next_as_first_directive=$gl_cv_next_inttypes_h | ||
| 17272 | fi | ||
| 17273 | NEXT_AS_FIRST_DIRECTIVE_INTTYPES_H=$gl_next_as_first_directive | ||
| 17274 | |||
| 17275 | |||
| 17276 | |||
| 17277 | |||
| 17278 | |||
| 17279 | |||
| 17280 | |||
| 17281 | |||
| 17282 | $as_echo "#define GL_TRIGGER_STDC_LIMIT_MACROS 1" >>confdefs.h | ||
| 17283 | |||
| 17284 | |||
| 17285 | |||
| 17286 | |||
| 17287 | |||
| 17288 | |||
| 17289 | |||
| 17290 | |||
| 17291 | if test $ac_cv_func_lstat = yes; then | 17296 | if test $ac_cv_func_lstat = yes; then |
| 17292 | 17297 | ||
| 17293 | if test $ac_cv_func_lstat_dereferences_slashed_symlink = no; then | 17298 | if test $ac_cv_func_lstat_dereferences_slashed_symlink = no; then |
| @@ -18076,717 +18081,6 @@ $as_echo "$gl_cv_next_stddef_h" >&6; } | |||
| 18076 | 18081 | ||
| 18077 | 18082 | ||
| 18078 | 18083 | ||
| 18079 | if test $ac_cv_type_long_long_int = yes; then | ||
| 18080 | HAVE_LONG_LONG_INT=1 | ||
| 18081 | else | ||
| 18082 | HAVE_LONG_LONG_INT=0 | ||
| 18083 | fi | ||
| 18084 | |||
| 18085 | |||
| 18086 | if test $ac_cv_type_unsigned_long_long_int = yes; then | ||
| 18087 | HAVE_UNSIGNED_LONG_LONG_INT=1 | ||
| 18088 | else | ||
| 18089 | HAVE_UNSIGNED_LONG_LONG_INT=0 | ||
| 18090 | fi | ||
| 18091 | |||
| 18092 | |||
| 18093 | |||
| 18094 | if test $ac_cv_header_wchar_h = yes; then | ||
| 18095 | HAVE_WCHAR_H=1 | ||
| 18096 | else | ||
| 18097 | HAVE_WCHAR_H=0 | ||
| 18098 | fi | ||
| 18099 | |||
| 18100 | |||
| 18101 | if test $ac_cv_header_inttypes_h = yes; then | ||
| 18102 | HAVE_INTTYPES_H=1 | ||
| 18103 | else | ||
| 18104 | HAVE_INTTYPES_H=0 | ||
| 18105 | fi | ||
| 18106 | |||
| 18107 | |||
| 18108 | if test $ac_cv_header_sys_types_h = yes; then | ||
| 18109 | HAVE_SYS_TYPES_H=1 | ||
| 18110 | else | ||
| 18111 | HAVE_SYS_TYPES_H=0 | ||
| 18112 | fi | ||
| 18113 | |||
| 18114 | |||
| 18115 | |||
| 18116 | |||
| 18117 | |||
| 18118 | |||
| 18119 | |||
| 18120 | |||
| 18121 | |||
| 18122 | |||
| 18123 | |||
| 18124 | if test $gl_cv_have_include_next = yes; then | ||
| 18125 | gl_cv_next_stdint_h='<'stdint.h'>' | ||
| 18126 | else | ||
| 18127 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <stdint.h>" >&5 | ||
| 18128 | $as_echo_n "checking absolute name of <stdint.h>... " >&6; } | ||
| 18129 | if test "${gl_cv_next_stdint_h+set}" = set; then : | ||
| 18130 | $as_echo_n "(cached) " >&6 | ||
| 18131 | else | ||
| 18132 | |||
| 18133 | if test $ac_cv_header_stdint_h = yes; then | ||
| 18134 | |||
| 18135 | |||
| 18136 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | ||
| 18137 | /* end confdefs.h. */ | ||
| 18138 | #include <stdint.h> | ||
| 18139 | |||
| 18140 | _ACEOF | ||
| 18141 | case "$host_os" in | ||
| 18142 | aix*) gl_absname_cpp="$ac_cpp -C" ;; | ||
| 18143 | *) gl_absname_cpp="$ac_cpp" ;; | ||
| 18144 | esac | ||
| 18145 | gl_cv_next_stdint_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | | ||
| 18146 | sed -n '\#/stdint.h#{ | ||
| 18147 | s#.*"\(.*/stdint.h\)".*#\1# | ||
| 18148 | s#^/[^/]#//&# | ||
| 18149 | p | ||
| 18150 | q | ||
| 18151 | }'`'"' | ||
| 18152 | else | ||
| 18153 | gl_cv_next_stdint_h='<'stdint.h'>' | ||
| 18154 | fi | ||
| 18155 | |||
| 18156 | |||
| 18157 | fi | ||
| 18158 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stdint_h" >&5 | ||
| 18159 | $as_echo "$gl_cv_next_stdint_h" >&6; } | ||
| 18160 | fi | ||
| 18161 | NEXT_STDINT_H=$gl_cv_next_stdint_h | ||
| 18162 | |||
| 18163 | if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then | ||
| 18164 | # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next' | ||
| 18165 | gl_next_as_first_directive='<'stdint.h'>' | ||
| 18166 | else | ||
| 18167 | # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' | ||
| 18168 | gl_next_as_first_directive=$gl_cv_next_stdint_h | ||
| 18169 | fi | ||
| 18170 | NEXT_AS_FIRST_DIRECTIVE_STDINT_H=$gl_next_as_first_directive | ||
| 18171 | |||
| 18172 | |||
| 18173 | |||
| 18174 | |||
| 18175 | if test $ac_cv_header_stdint_h = yes; then | ||
| 18176 | HAVE_STDINT_H=1 | ||
| 18177 | else | ||
| 18178 | HAVE_STDINT_H=0 | ||
| 18179 | fi | ||
| 18180 | |||
| 18181 | |||
| 18182 | if test $ac_cv_header_stdint_h = yes; then | ||
| 18183 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stdint.h conforms to C99" >&5 | ||
| 18184 | $as_echo_n "checking whether stdint.h conforms to C99... " >&6; } | ||
| 18185 | if test "${gl_cv_header_working_stdint_h+set}" = set; then : | ||
| 18186 | $as_echo_n "(cached) " >&6 | ||
| 18187 | else | ||
| 18188 | gl_cv_header_working_stdint_h=no | ||
| 18189 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | ||
| 18190 | /* end confdefs.h. */ | ||
| 18191 | |||
| 18192 | |||
| 18193 | #define __STDC_LIMIT_MACROS 1 /* to make it work also in C++ mode */ | ||
| 18194 | #define __STDC_CONSTANT_MACROS 1 /* to make it work also in C++ mode */ | ||
| 18195 | #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1 /* work if build isn't clean */ | ||
| 18196 | #include <stdint.h> | ||
| 18197 | /* Dragonfly defines WCHAR_MIN, WCHAR_MAX only in <wchar.h>. */ | ||
| 18198 | #if !(defined WCHAR_MIN && defined WCHAR_MAX) | ||
| 18199 | #error "WCHAR_MIN, WCHAR_MAX not defined in <stdint.h>" | ||
| 18200 | #endif | ||
| 18201 | |||
| 18202 | |||
| 18203 | /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be | ||
| 18204 | included before <wchar.h>. */ | ||
| 18205 | #include <stddef.h> | ||
| 18206 | #include <signal.h> | ||
| 18207 | #if HAVE_WCHAR_H | ||
| 18208 | # include <stdio.h> | ||
| 18209 | # include <time.h> | ||
| 18210 | # include <wchar.h> | ||
| 18211 | #endif | ||
| 18212 | |||
| 18213 | |||
| 18214 | #ifdef INT8_MAX | ||
| 18215 | int8_t a1 = INT8_MAX; | ||
| 18216 | int8_t a1min = INT8_MIN; | ||
| 18217 | #endif | ||
| 18218 | #ifdef INT16_MAX | ||
| 18219 | int16_t a2 = INT16_MAX; | ||
| 18220 | int16_t a2min = INT16_MIN; | ||
| 18221 | #endif | ||
| 18222 | #ifdef INT32_MAX | ||
| 18223 | int32_t a3 = INT32_MAX; | ||
| 18224 | int32_t a3min = INT32_MIN; | ||
| 18225 | #endif | ||
| 18226 | #ifdef INT64_MAX | ||
| 18227 | int64_t a4 = INT64_MAX; | ||
| 18228 | int64_t a4min = INT64_MIN; | ||
| 18229 | #endif | ||
| 18230 | #ifdef UINT8_MAX | ||
| 18231 | uint8_t b1 = UINT8_MAX; | ||
| 18232 | #else | ||
| 18233 | typedef int b1[(unsigned char) -1 != 255 ? 1 : -1]; | ||
| 18234 | #endif | ||
| 18235 | #ifdef UINT16_MAX | ||
| 18236 | uint16_t b2 = UINT16_MAX; | ||
| 18237 | #endif | ||
| 18238 | #ifdef UINT32_MAX | ||
| 18239 | uint32_t b3 = UINT32_MAX; | ||
| 18240 | #endif | ||
| 18241 | #ifdef UINT64_MAX | ||
| 18242 | uint64_t b4 = UINT64_MAX; | ||
| 18243 | #endif | ||
| 18244 | int_least8_t c1 = INT8_C (0x7f); | ||
| 18245 | int_least8_t c1max = INT_LEAST8_MAX; | ||
| 18246 | int_least8_t c1min = INT_LEAST8_MIN; | ||
| 18247 | int_least16_t c2 = INT16_C (0x7fff); | ||
| 18248 | int_least16_t c2max = INT_LEAST16_MAX; | ||
| 18249 | int_least16_t c2min = INT_LEAST16_MIN; | ||
| 18250 | int_least32_t c3 = INT32_C (0x7fffffff); | ||
| 18251 | int_least32_t c3max = INT_LEAST32_MAX; | ||
| 18252 | int_least32_t c3min = INT_LEAST32_MIN; | ||
| 18253 | int_least64_t c4 = INT64_C (0x7fffffffffffffff); | ||
| 18254 | int_least64_t c4max = INT_LEAST64_MAX; | ||
| 18255 | int_least64_t c4min = INT_LEAST64_MIN; | ||
| 18256 | uint_least8_t d1 = UINT8_C (0xff); | ||
| 18257 | uint_least8_t d1max = UINT_LEAST8_MAX; | ||
| 18258 | uint_least16_t d2 = UINT16_C (0xffff); | ||
| 18259 | uint_least16_t d2max = UINT_LEAST16_MAX; | ||
| 18260 | uint_least32_t d3 = UINT32_C (0xffffffff); | ||
| 18261 | uint_least32_t d3max = UINT_LEAST32_MAX; | ||
| 18262 | uint_least64_t d4 = UINT64_C (0xffffffffffffffff); | ||
| 18263 | uint_least64_t d4max = UINT_LEAST64_MAX; | ||
| 18264 | int_fast8_t e1 = INT_FAST8_MAX; | ||
| 18265 | int_fast8_t e1min = INT_FAST8_MIN; | ||
| 18266 | int_fast16_t e2 = INT_FAST16_MAX; | ||
| 18267 | int_fast16_t e2min = INT_FAST16_MIN; | ||
| 18268 | int_fast32_t e3 = INT_FAST32_MAX; | ||
| 18269 | int_fast32_t e3min = INT_FAST32_MIN; | ||
| 18270 | int_fast64_t e4 = INT_FAST64_MAX; | ||
| 18271 | int_fast64_t e4min = INT_FAST64_MIN; | ||
| 18272 | uint_fast8_t f1 = UINT_FAST8_MAX; | ||
| 18273 | uint_fast16_t f2 = UINT_FAST16_MAX; | ||
| 18274 | uint_fast32_t f3 = UINT_FAST32_MAX; | ||
| 18275 | uint_fast64_t f4 = UINT_FAST64_MAX; | ||
| 18276 | #ifdef INTPTR_MAX | ||
| 18277 | intptr_t g = INTPTR_MAX; | ||
| 18278 | intptr_t gmin = INTPTR_MIN; | ||
| 18279 | #endif | ||
| 18280 | #ifdef UINTPTR_MAX | ||
| 18281 | uintptr_t h = UINTPTR_MAX; | ||
| 18282 | #endif | ||
| 18283 | intmax_t i = INTMAX_MAX; | ||
| 18284 | uintmax_t j = UINTMAX_MAX; | ||
| 18285 | |||
| 18286 | #include <limits.h> /* for CHAR_BIT */ | ||
| 18287 | #define TYPE_MINIMUM(t) \ | ||
| 18288 | ((t) ((t) 0 < (t) -1 ? (t) 0 : ~ TYPE_MAXIMUM (t))) | ||
| 18289 | #define TYPE_MAXIMUM(t) \ | ||
| 18290 | ((t) ((t) 0 < (t) -1 \ | ||
| 18291 | ? (t) -1 \ | ||
| 18292 | : ((((t) 1 << (sizeof (t) * CHAR_BIT - 2)) - 1) * 2 + 1))) | ||
| 18293 | struct s { | ||
| 18294 | int check_PTRDIFF: | ||
| 18295 | PTRDIFF_MIN == TYPE_MINIMUM (ptrdiff_t) | ||
| 18296 | && PTRDIFF_MAX == TYPE_MAXIMUM (ptrdiff_t) | ||
| 18297 | ? 1 : -1; | ||
| 18298 | /* Detect bug in FreeBSD 6.0 / ia64. */ | ||
| 18299 | int check_SIG_ATOMIC: | ||
| 18300 | SIG_ATOMIC_MIN == TYPE_MINIMUM (sig_atomic_t) | ||
| 18301 | && SIG_ATOMIC_MAX == TYPE_MAXIMUM (sig_atomic_t) | ||
| 18302 | ? 1 : -1; | ||
| 18303 | int check_SIZE: SIZE_MAX == TYPE_MAXIMUM (size_t) ? 1 : -1; | ||
| 18304 | int check_WCHAR: | ||
| 18305 | WCHAR_MIN == TYPE_MINIMUM (wchar_t) | ||
| 18306 | && WCHAR_MAX == TYPE_MAXIMUM (wchar_t) | ||
| 18307 | ? 1 : -1; | ||
| 18308 | /* Detect bug in mingw. */ | ||
| 18309 | int check_WINT: | ||
| 18310 | WINT_MIN == TYPE_MINIMUM (wint_t) | ||
| 18311 | && WINT_MAX == TYPE_MAXIMUM (wint_t) | ||
| 18312 | ? 1 : -1; | ||
| 18313 | |||
| 18314 | /* Detect bugs in glibc 2.4 and Solaris 10 stdint.h, among others. */ | ||
| 18315 | int check_UINT8_C: | ||
| 18316 | (-1 < UINT8_C (0)) == (-1 < (uint_least8_t) 0) ? 1 : -1; | ||
| 18317 | int check_UINT16_C: | ||
| 18318 | (-1 < UINT16_C (0)) == (-1 < (uint_least16_t) 0) ? 1 : -1; | ||
| 18319 | |||
| 18320 | /* Detect bugs in OpenBSD 3.9 stdint.h. */ | ||
| 18321 | #ifdef UINT8_MAX | ||
| 18322 | int check_uint8: (uint8_t) -1 == UINT8_MAX ? 1 : -1; | ||
| 18323 | #endif | ||
| 18324 | #ifdef UINT16_MAX | ||
| 18325 | int check_uint16: (uint16_t) -1 == UINT16_MAX ? 1 : -1; | ||
| 18326 | #endif | ||
| 18327 | #ifdef UINT32_MAX | ||
| 18328 | int check_uint32: (uint32_t) -1 == UINT32_MAX ? 1 : -1; | ||
| 18329 | #endif | ||
| 18330 | #ifdef UINT64_MAX | ||
| 18331 | int check_uint64: (uint64_t) -1 == UINT64_MAX ? 1 : -1; | ||
| 18332 | #endif | ||
| 18333 | int check_uint_least8: (uint_least8_t) -1 == UINT_LEAST8_MAX ? 1 : -1; | ||
| 18334 | int check_uint_least16: (uint_least16_t) -1 == UINT_LEAST16_MAX ? 1 : -1; | ||
| 18335 | int check_uint_least32: (uint_least32_t) -1 == UINT_LEAST32_MAX ? 1 : -1; | ||
| 18336 | int check_uint_least64: (uint_least64_t) -1 == UINT_LEAST64_MAX ? 1 : -1; | ||
| 18337 | int check_uint_fast8: (uint_fast8_t) -1 == UINT_FAST8_MAX ? 1 : -1; | ||
| 18338 | int check_uint_fast16: (uint_fast16_t) -1 == UINT_FAST16_MAX ? 1 : -1; | ||
| 18339 | int check_uint_fast32: (uint_fast32_t) -1 == UINT_FAST32_MAX ? 1 : -1; | ||
| 18340 | int check_uint_fast64: (uint_fast64_t) -1 == UINT_FAST64_MAX ? 1 : -1; | ||
| 18341 | int check_uintptr: (uintptr_t) -1 == UINTPTR_MAX ? 1 : -1; | ||
| 18342 | int check_uintmax: (uintmax_t) -1 == UINTMAX_MAX ? 1 : -1; | ||
| 18343 | int check_size: (size_t) -1 == SIZE_MAX ? 1 : -1; | ||
| 18344 | }; | ||
| 18345 | |||
| 18346 | int | ||
| 18347 | main () | ||
| 18348 | { | ||
| 18349 | |||
| 18350 | ; | ||
| 18351 | return 0; | ||
| 18352 | } | ||
| 18353 | _ACEOF | ||
| 18354 | if ac_fn_c_try_compile "$LINENO"; then : | ||
| 18355 | if test "$cross_compiling" = yes; then : | ||
| 18356 | gl_cv_header_working_stdint_h=yes | ||
| 18357 | |||
| 18358 | else | ||
| 18359 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | ||
| 18360 | /* end confdefs.h. */ | ||
| 18361 | |||
| 18362 | |||
| 18363 | #define __STDC_LIMIT_MACROS 1 /* to make it work also in C++ mode */ | ||
| 18364 | #define __STDC_CONSTANT_MACROS 1 /* to make it work also in C++ mode */ | ||
| 18365 | #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1 /* work if build isn't clean */ | ||
| 18366 | #include <stdint.h> | ||
| 18367 | |||
| 18368 | |||
| 18369 | /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be | ||
| 18370 | included before <wchar.h>. */ | ||
| 18371 | #include <stddef.h> | ||
| 18372 | #include <signal.h> | ||
| 18373 | #if HAVE_WCHAR_H | ||
| 18374 | # include <stdio.h> | ||
| 18375 | # include <time.h> | ||
| 18376 | # include <wchar.h> | ||
| 18377 | #endif | ||
| 18378 | |||
| 18379 | |||
| 18380 | #include <stdio.h> | ||
| 18381 | #include <string.h> | ||
| 18382 | #define MVAL(macro) MVAL1(macro) | ||
| 18383 | #define MVAL1(expression) #expression | ||
| 18384 | static const char *macro_values[] = | ||
| 18385 | { | ||
| 18386 | #ifdef INT8_MAX | ||
| 18387 | MVAL (INT8_MAX), | ||
| 18388 | #endif | ||
| 18389 | #ifdef INT16_MAX | ||
| 18390 | MVAL (INT16_MAX), | ||
| 18391 | #endif | ||
| 18392 | #ifdef INT32_MAX | ||
| 18393 | MVAL (INT32_MAX), | ||
| 18394 | #endif | ||
| 18395 | #ifdef INT64_MAX | ||
| 18396 | MVAL (INT64_MAX), | ||
| 18397 | #endif | ||
| 18398 | #ifdef UINT8_MAX | ||
| 18399 | MVAL (UINT8_MAX), | ||
| 18400 | #endif | ||
| 18401 | #ifdef UINT16_MAX | ||
| 18402 | MVAL (UINT16_MAX), | ||
| 18403 | #endif | ||
| 18404 | #ifdef UINT32_MAX | ||
| 18405 | MVAL (UINT32_MAX), | ||
| 18406 | #endif | ||
| 18407 | #ifdef UINT64_MAX | ||
| 18408 | MVAL (UINT64_MAX), | ||
| 18409 | #endif | ||
| 18410 | NULL | ||
| 18411 | }; | ||
| 18412 | |||
| 18413 | int | ||
| 18414 | main () | ||
| 18415 | { | ||
| 18416 | |||
| 18417 | const char **mv; | ||
| 18418 | for (mv = macro_values; *mv != NULL; mv++) | ||
| 18419 | { | ||
| 18420 | const char *value = *mv; | ||
| 18421 | /* Test whether it looks like a cast expression. */ | ||
| 18422 | if (strncmp (value, "((unsigned int)"/*)*/, 15) == 0 | ||
| 18423 | || strncmp (value, "((unsigned short)"/*)*/, 17) == 0 | ||
| 18424 | || strncmp (value, "((unsigned char)"/*)*/, 16) == 0 | ||
| 18425 | || strncmp (value, "((int)"/*)*/, 6) == 0 | ||
| 18426 | || strncmp (value, "((signed short)"/*)*/, 15) == 0 | ||
| 18427 | || strncmp (value, "((signed char)"/*)*/, 14) == 0) | ||
| 18428 | return mv - macro_values + 1; | ||
| 18429 | } | ||
| 18430 | return 0; | ||
| 18431 | |||
| 18432 | ; | ||
| 18433 | return 0; | ||
| 18434 | } | ||
| 18435 | _ACEOF | ||
| 18436 | if ac_fn_c_try_run "$LINENO"; then : | ||
| 18437 | gl_cv_header_working_stdint_h=yes | ||
| 18438 | fi | ||
| 18439 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ | ||
| 18440 | conftest.$ac_objext conftest.beam conftest.$ac_ext | ||
| 18441 | fi | ||
| 18442 | |||
| 18443 | |||
| 18444 | fi | ||
| 18445 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | ||
| 18446 | |||
| 18447 | fi | ||
| 18448 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_working_stdint_h" >&5 | ||
| 18449 | $as_echo "$gl_cv_header_working_stdint_h" >&6; } | ||
| 18450 | fi | ||
| 18451 | if test "$gl_cv_header_working_stdint_h" = yes; then | ||
| 18452 | STDINT_H= | ||
| 18453 | else | ||
| 18454 | for ac_header in sys/inttypes.h sys/bitypes.h | ||
| 18455 | do : | ||
| 18456 | as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` | ||
| 18457 | ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" | ||
| 18458 | eval as_val=\$$as_ac_Header | ||
| 18459 | if test "x$as_val" = x""yes; then : | ||
| 18460 | cat >>confdefs.h <<_ACEOF | ||
| 18461 | #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 | ||
| 18462 | _ACEOF | ||
| 18463 | |||
| 18464 | fi | ||
| 18465 | |||
| 18466 | done | ||
| 18467 | |||
| 18468 | if test $ac_cv_header_sys_inttypes_h = yes; then | ||
| 18469 | HAVE_SYS_INTTYPES_H=1 | ||
| 18470 | else | ||
| 18471 | HAVE_SYS_INTTYPES_H=0 | ||
| 18472 | fi | ||
| 18473 | |||
| 18474 | if test $ac_cv_header_sys_bitypes_h = yes; then | ||
| 18475 | HAVE_SYS_BITYPES_H=1 | ||
| 18476 | else | ||
| 18477 | HAVE_SYS_BITYPES_H=0 | ||
| 18478 | fi | ||
| 18479 | |||
| 18480 | |||
| 18481 | |||
| 18482 | |||
| 18483 | if test $APPLE_UNIVERSAL_BUILD = 0; then | ||
| 18484 | |||
| 18485 | |||
| 18486 | for gltype in ptrdiff_t size_t ; do | ||
| 18487 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for bit size of $gltype" >&5 | ||
| 18488 | $as_echo_n "checking for bit size of $gltype... " >&6; } | ||
| 18489 | if { as_var=gl_cv_bitsizeof_${gltype}; eval "test \"\${$as_var+set}\" = set"; }; then : | ||
| 18490 | $as_echo_n "(cached) " >&6 | ||
| 18491 | else | ||
| 18492 | if ac_fn_c_compute_int "$LINENO" "sizeof ($gltype) * CHAR_BIT" "result" " | ||
| 18493 | /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be | ||
| 18494 | included before <wchar.h>. */ | ||
| 18495 | #include <stddef.h> | ||
| 18496 | #include <signal.h> | ||
| 18497 | #if HAVE_WCHAR_H | ||
| 18498 | # include <stdio.h> | ||
| 18499 | # include <time.h> | ||
| 18500 | # include <wchar.h> | ||
| 18501 | #endif | ||
| 18502 | |||
| 18503 | #include <limits.h>"; then : | ||
| 18504 | |||
| 18505 | else | ||
| 18506 | result=unknown | ||
| 18507 | fi | ||
| 18508 | |||
| 18509 | eval gl_cv_bitsizeof_${gltype}=\$result | ||
| 18510 | |||
| 18511 | fi | ||
| 18512 | eval ac_res=\$gl_cv_bitsizeof_${gltype} | ||
| 18513 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 | ||
| 18514 | $as_echo "$ac_res" >&6; } | ||
| 18515 | eval result=\$gl_cv_bitsizeof_${gltype} | ||
| 18516 | if test $result = unknown; then | ||
| 18517 | result=0 | ||
| 18518 | fi | ||
| 18519 | GLTYPE=`echo "$gltype" | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'` | ||
| 18520 | cat >>confdefs.h <<_ACEOF | ||
| 18521 | #define BITSIZEOF_${GLTYPE} $result | ||
| 18522 | _ACEOF | ||
| 18523 | |||
| 18524 | eval BITSIZEOF_${GLTYPE}=\$result | ||
| 18525 | done | ||
| 18526 | |||
| 18527 | |||
| 18528 | fi | ||
| 18529 | |||
| 18530 | |||
| 18531 | for gltype in sig_atomic_t wchar_t wint_t ; do | ||
| 18532 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for bit size of $gltype" >&5 | ||
| 18533 | $as_echo_n "checking for bit size of $gltype... " >&6; } | ||
| 18534 | if { as_var=gl_cv_bitsizeof_${gltype}; eval "test \"\${$as_var+set}\" = set"; }; then : | ||
| 18535 | $as_echo_n "(cached) " >&6 | ||
| 18536 | else | ||
| 18537 | if ac_fn_c_compute_int "$LINENO" "sizeof ($gltype) * CHAR_BIT" "result" " | ||
| 18538 | /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be | ||
| 18539 | included before <wchar.h>. */ | ||
| 18540 | #include <stddef.h> | ||
| 18541 | #include <signal.h> | ||
| 18542 | #if HAVE_WCHAR_H | ||
| 18543 | # include <stdio.h> | ||
| 18544 | # include <time.h> | ||
| 18545 | # include <wchar.h> | ||
| 18546 | #endif | ||
| 18547 | |||
| 18548 | #include <limits.h>"; then : | ||
| 18549 | |||
| 18550 | else | ||
| 18551 | result=unknown | ||
| 18552 | fi | ||
| 18553 | |||
| 18554 | eval gl_cv_bitsizeof_${gltype}=\$result | ||
| 18555 | |||
| 18556 | fi | ||
| 18557 | eval ac_res=\$gl_cv_bitsizeof_${gltype} | ||
| 18558 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 | ||
| 18559 | $as_echo "$ac_res" >&6; } | ||
| 18560 | eval result=\$gl_cv_bitsizeof_${gltype} | ||
| 18561 | if test $result = unknown; then | ||
| 18562 | result=0 | ||
| 18563 | fi | ||
| 18564 | GLTYPE=`echo "$gltype" | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'` | ||
| 18565 | cat >>confdefs.h <<_ACEOF | ||
| 18566 | #define BITSIZEOF_${GLTYPE} $result | ||
| 18567 | _ACEOF | ||
| 18568 | |||
| 18569 | eval BITSIZEOF_${GLTYPE}=\$result | ||
| 18570 | done | ||
| 18571 | |||
| 18572 | |||
| 18573 | |||
| 18574 | |||
| 18575 | for gltype in sig_atomic_t wchar_t wint_t ; do | ||
| 18576 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gltype is signed" >&5 | ||
| 18577 | $as_echo_n "checking whether $gltype is signed... " >&6; } | ||
| 18578 | if { as_var=gl_cv_type_${gltype}_signed; eval "test \"\${$as_var+set}\" = set"; }; then : | ||
| 18579 | $as_echo_n "(cached) " >&6 | ||
| 18580 | else | ||
| 18581 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | ||
| 18582 | /* end confdefs.h. */ | ||
| 18583 | |||
| 18584 | /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be | ||
| 18585 | included before <wchar.h>. */ | ||
| 18586 | #include <stddef.h> | ||
| 18587 | #include <signal.h> | ||
| 18588 | #if HAVE_WCHAR_H | ||
| 18589 | # include <stdio.h> | ||
| 18590 | # include <time.h> | ||
| 18591 | # include <wchar.h> | ||
| 18592 | #endif | ||
| 18593 | |||
| 18594 | int verify[2 * (($gltype) -1 < ($gltype) 0) - 1]; | ||
| 18595 | int | ||
| 18596 | main () | ||
| 18597 | { | ||
| 18598 | |||
| 18599 | ; | ||
| 18600 | return 0; | ||
| 18601 | } | ||
| 18602 | _ACEOF | ||
| 18603 | if ac_fn_c_try_compile "$LINENO"; then : | ||
| 18604 | result=yes | ||
| 18605 | else | ||
| 18606 | result=no | ||
| 18607 | fi | ||
| 18608 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | ||
| 18609 | eval gl_cv_type_${gltype}_signed=\$result | ||
| 18610 | |||
| 18611 | fi | ||
| 18612 | eval ac_res=\$gl_cv_type_${gltype}_signed | ||
| 18613 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 | ||
| 18614 | $as_echo "$ac_res" >&6; } | ||
| 18615 | eval result=\$gl_cv_type_${gltype}_signed | ||
| 18616 | GLTYPE=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'` | ||
| 18617 | if test "$result" = yes; then | ||
| 18618 | cat >>confdefs.h <<_ACEOF | ||
| 18619 | #define HAVE_SIGNED_${GLTYPE} 1 | ||
| 18620 | _ACEOF | ||
| 18621 | |||
| 18622 | eval HAVE_SIGNED_${GLTYPE}=1 | ||
| 18623 | else | ||
| 18624 | eval HAVE_SIGNED_${GLTYPE}=0 | ||
| 18625 | fi | ||
| 18626 | done | ||
| 18627 | |||
| 18628 | |||
| 18629 | gl_cv_type_ptrdiff_t_signed=yes | ||
| 18630 | gl_cv_type_size_t_signed=no | ||
| 18631 | if test $APPLE_UNIVERSAL_BUILD = 0; then | ||
| 18632 | |||
| 18633 | |||
| 18634 | for gltype in ptrdiff_t size_t ; do | ||
| 18635 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $gltype integer literal suffix" >&5 | ||
| 18636 | $as_echo_n "checking for $gltype integer literal suffix... " >&6; } | ||
| 18637 | if { as_var=gl_cv_type_${gltype}_suffix; eval "test \"\${$as_var+set}\" = set"; }; then : | ||
| 18638 | $as_echo_n "(cached) " >&6 | ||
| 18639 | else | ||
| 18640 | eval gl_cv_type_${gltype}_suffix=no | ||
| 18641 | eval result=\$gl_cv_type_${gltype}_signed | ||
| 18642 | if test "$result" = yes; then | ||
| 18643 | glsufu= | ||
| 18644 | else | ||
| 18645 | glsufu=u | ||
| 18646 | fi | ||
| 18647 | for glsuf in "$glsufu" ${glsufu}l ${glsufu}ll ${glsufu}i64; do | ||
| 18648 | case $glsuf in | ||
| 18649 | '') gltype1='int';; | ||
| 18650 | l) gltype1='long int';; | ||
| 18651 | ll) gltype1='long long int';; | ||
| 18652 | i64) gltype1='__int64';; | ||
| 18653 | u) gltype1='unsigned int';; | ||
| 18654 | ul) gltype1='unsigned long int';; | ||
| 18655 | ull) gltype1='unsigned long long int';; | ||
| 18656 | ui64)gltype1='unsigned __int64';; | ||
| 18657 | esac | ||
| 18658 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | ||
| 18659 | /* end confdefs.h. */ | ||
| 18660 | |||
| 18661 | /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be | ||
| 18662 | included before <wchar.h>. */ | ||
| 18663 | #include <stddef.h> | ||
| 18664 | #include <signal.h> | ||
| 18665 | #if HAVE_WCHAR_H | ||
| 18666 | # include <stdio.h> | ||
| 18667 | # include <time.h> | ||
| 18668 | # include <wchar.h> | ||
| 18669 | #endif | ||
| 18670 | |||
| 18671 | extern $gltype foo; | ||
| 18672 | extern $gltype1 foo; | ||
| 18673 | int | ||
| 18674 | main () | ||
| 18675 | { | ||
| 18676 | |||
| 18677 | ; | ||
| 18678 | return 0; | ||
| 18679 | } | ||
| 18680 | _ACEOF | ||
| 18681 | if ac_fn_c_try_compile "$LINENO"; then : | ||
| 18682 | eval gl_cv_type_${gltype}_suffix=\$glsuf | ||
| 18683 | fi | ||
| 18684 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | ||
| 18685 | eval result=\$gl_cv_type_${gltype}_suffix | ||
| 18686 | test "$result" != no && break | ||
| 18687 | done | ||
| 18688 | fi | ||
| 18689 | eval ac_res=\$gl_cv_type_${gltype}_suffix | ||
| 18690 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 | ||
| 18691 | $as_echo "$ac_res" >&6; } | ||
| 18692 | GLTYPE=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'` | ||
| 18693 | eval result=\$gl_cv_type_${gltype}_suffix | ||
| 18694 | test "$result" = no && result= | ||
| 18695 | eval ${GLTYPE}_SUFFIX=\$result | ||
| 18696 | cat >>confdefs.h <<_ACEOF | ||
| 18697 | #define ${GLTYPE}_SUFFIX $result | ||
| 18698 | _ACEOF | ||
| 18699 | |||
| 18700 | done | ||
| 18701 | |||
| 18702 | |||
| 18703 | fi | ||
| 18704 | |||
| 18705 | |||
| 18706 | for gltype in sig_atomic_t wchar_t wint_t ; do | ||
| 18707 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $gltype integer literal suffix" >&5 | ||
| 18708 | $as_echo_n "checking for $gltype integer literal suffix... " >&6; } | ||
| 18709 | if { as_var=gl_cv_type_${gltype}_suffix; eval "test \"\${$as_var+set}\" = set"; }; then : | ||
| 18710 | $as_echo_n "(cached) " >&6 | ||
| 18711 | else | ||
| 18712 | eval gl_cv_type_${gltype}_suffix=no | ||
| 18713 | eval result=\$gl_cv_type_${gltype}_signed | ||
| 18714 | if test "$result" = yes; then | ||
| 18715 | glsufu= | ||
| 18716 | else | ||
| 18717 | glsufu=u | ||
| 18718 | fi | ||
| 18719 | for glsuf in "$glsufu" ${glsufu}l ${glsufu}ll ${glsufu}i64; do | ||
| 18720 | case $glsuf in | ||
| 18721 | '') gltype1='int';; | ||
| 18722 | l) gltype1='long int';; | ||
| 18723 | ll) gltype1='long long int';; | ||
| 18724 | i64) gltype1='__int64';; | ||
| 18725 | u) gltype1='unsigned int';; | ||
| 18726 | ul) gltype1='unsigned long int';; | ||
| 18727 | ull) gltype1='unsigned long long int';; | ||
| 18728 | ui64)gltype1='unsigned __int64';; | ||
| 18729 | esac | ||
| 18730 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | ||
| 18731 | /* end confdefs.h. */ | ||
| 18732 | |||
| 18733 | /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be | ||
| 18734 | included before <wchar.h>. */ | ||
| 18735 | #include <stddef.h> | ||
| 18736 | #include <signal.h> | ||
| 18737 | #if HAVE_WCHAR_H | ||
| 18738 | # include <stdio.h> | ||
| 18739 | # include <time.h> | ||
| 18740 | # include <wchar.h> | ||
| 18741 | #endif | ||
| 18742 | |||
| 18743 | extern $gltype foo; | ||
| 18744 | extern $gltype1 foo; | ||
| 18745 | int | ||
| 18746 | main () | ||
| 18747 | { | ||
| 18748 | |||
| 18749 | ; | ||
| 18750 | return 0; | ||
| 18751 | } | ||
| 18752 | _ACEOF | ||
| 18753 | if ac_fn_c_try_compile "$LINENO"; then : | ||
| 18754 | eval gl_cv_type_${gltype}_suffix=\$glsuf | ||
| 18755 | fi | ||
| 18756 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | ||
| 18757 | eval result=\$gl_cv_type_${gltype}_suffix | ||
| 18758 | test "$result" != no && break | ||
| 18759 | done | ||
| 18760 | fi | ||
| 18761 | eval ac_res=\$gl_cv_type_${gltype}_suffix | ||
| 18762 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 | ||
| 18763 | $as_echo "$ac_res" >&6; } | ||
| 18764 | GLTYPE=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'` | ||
| 18765 | eval result=\$gl_cv_type_${gltype}_suffix | ||
| 18766 | test "$result" = no && result= | ||
| 18767 | eval ${GLTYPE}_SUFFIX=\$result | ||
| 18768 | cat >>confdefs.h <<_ACEOF | ||
| 18769 | #define ${GLTYPE}_SUFFIX $result | ||
| 18770 | _ACEOF | ||
| 18771 | |||
| 18772 | done | ||
| 18773 | |||
| 18774 | |||
| 18775 | |||
| 18776 | STDINT_H=stdint.h | ||
| 18777 | fi | ||
| 18778 | |||
| 18779 | if test -n "$STDINT_H"; then | ||
| 18780 | GL_GENERATE_STDINT_H_TRUE= | ||
| 18781 | GL_GENERATE_STDINT_H_FALSE='#' | ||
| 18782 | else | ||
| 18783 | GL_GENERATE_STDINT_H_TRUE='#' | ||
| 18784 | GL_GENERATE_STDINT_H_FALSE= | ||
| 18785 | fi | ||
| 18786 | |||
| 18787 | |||
| 18788 | |||
| 18789 | |||
| 18790 | 18084 | ||
| 18791 | 18085 | ||
| 18792 | 18086 | ||
| @@ -21778,10 +21072,6 @@ if test -z "${GL_GENERATE_STDDEF_H_TRUE}" && test -z "${GL_GENERATE_STDDEF_H_FAL | |||
| 21778 | as_fn_error "conditional \"GL_GENERATE_STDDEF_H\" was never defined. | 21072 | as_fn_error "conditional \"GL_GENERATE_STDDEF_H\" was never defined. |
| 21779 | Usually this means the macro was only invoked conditionally." "$LINENO" 5 | 21073 | Usually this means the macro was only invoked conditionally." "$LINENO" 5 |
| 21780 | fi | 21074 | fi |
| 21781 | if test -z "${GL_GENERATE_STDINT_H_TRUE}" && test -z "${GL_GENERATE_STDINT_H_FALSE}"; then | ||
| 21782 | as_fn_error "conditional \"GL_GENERATE_STDINT_H\" was never defined. | ||
| 21783 | Usually this means the macro was only invoked conditionally." "$LINENO" 5 | ||
| 21784 | fi | ||
| 21785 | if test -z "${gl_GNULIB_ENABLED_dosname_TRUE}" && test -z "${gl_GNULIB_ENABLED_dosname_FALSE}"; then | 21075 | if test -z "${gl_GNULIB_ENABLED_dosname_TRUE}" && test -z "${gl_GNULIB_ENABLED_dosname_FALSE}"; then |
| 21786 | as_fn_error "conditional \"gl_GNULIB_ENABLED_dosname\" was never defined. | 21076 | as_fn_error "conditional \"gl_GNULIB_ENABLED_dosname\" was never defined. |
| 21787 | Usually this means the macro was only invoked conditionally." "$LINENO" 5 | 21077 | Usually this means the macro was only invoked conditionally." "$LINENO" 5 |
diff --git a/doc/emacs/ChangeLog b/doc/emacs/ChangeLog index ec0e3b51a01..1f236ef4206 100644 --- a/doc/emacs/ChangeLog +++ b/doc/emacs/ChangeLog | |||
| @@ -1,3 +1,7 @@ | |||
| 1 | 2011-05-18 Glenn Morris <rgm@gnu.org> | ||
| 2 | |||
| 3 | * ack.texi (Acknowledgments): Remove fakemail.c. | ||
| 4 | |||
| 1 | 2011-05-17 Chong Yidong <cyd@stupidchicken.com> | 5 | 2011-05-17 Chong Yidong <cyd@stupidchicken.com> |
| 2 | 6 | ||
| 3 | Fixes for fitting text into 7x9 printed manual. | 7 | Fixes for fitting text into 7x9 printed manual. |
diff --git a/doc/emacs/ack.texi b/doc/emacs/ack.texi index debe7149cb5..e554c71703f 100644 --- a/doc/emacs/ack.texi +++ b/doc/emacs/ack.texi | |||
| @@ -1016,7 +1016,7 @@ Markus Rost wrote @file{cus-test.el}, a testing framework for customize. | |||
| 1016 | 1016 | ||
| 1017 | @item | 1017 | @item |
| 1018 | Guillermo J.@: Rozas wrote @file{scheme.el}, a mode for editing Scheme and | 1018 | Guillermo J.@: Rozas wrote @file{scheme.el}, a mode for editing Scheme and |
| 1019 | DSSSL code, and @file{fakemail.c}, an interface to the System V mailer. | 1019 | DSSSL code. |
| 1020 | 1020 | ||
| 1021 | @item | 1021 | @item |
| 1022 | Ivar Rummelhoff wrote @file{winner.el}, which records recent window | 1022 | Ivar Rummelhoff wrote @file{winner.el}, which records recent window |
diff --git a/doc/misc/ChangeLog b/doc/misc/ChangeLog index 8376dbaa7ca..917ebf0d675 100644 --- a/doc/misc/ChangeLog +++ b/doc/misc/ChangeLog | |||
| @@ -1,3 +1,14 @@ | |||
| 1 | 2011-05-18 Teodor Zlatanov <tzz@lifelogs.com> | ||
| 2 | |||
| 3 | * gnus.texi (Gnus Registry Setup): Rename from "Setup". | ||
| 4 | (Store custom flags and keywords): Mention | ||
| 5 | `gnus-registry-user-format-function-M' and | ||
| 6 | `gnus-registry-user-format-function-M2'. | ||
| 7 | |||
| 8 | 2011-05-17 Paul Eggert <eggert@cs.ucla.edu> | ||
| 9 | |||
| 10 | * texinfo.tex: Sync from gnulib, version 2011-05-11.16. | ||
| 11 | |||
| 1 | 2011-05-17 Glenn Morris <rgm@gnu.org> | 12 | 2011-05-17 Glenn Morris <rgm@gnu.org> |
| 2 | 13 | ||
| 3 | * gnus.texi (Face): Fix typo. | 14 | * gnus.texi (Face): Fix typo. |
diff --git a/doc/misc/gnus.texi b/doc/misc/gnus.texi index 931a9bedb39..a6b79237f08 100644 --- a/doc/misc/gnus.texi +++ b/doc/misc/gnus.texi | |||
| @@ -25906,15 +25906,15 @@ of all messages matching a particular set of criteria. | |||
| 25906 | @end enumerate | 25906 | @end enumerate |
| 25907 | 25907 | ||
| 25908 | @menu | 25908 | @menu |
| 25909 | * Setup:: | 25909 | * Gnus Registry Setup:: |
| 25910 | * Fancy splitting to parent:: | 25910 | * Fancy splitting to parent:: |
| 25911 | * Registry Article Refer Method:: | 25911 | * Registry Article Refer Method:: |
| 25912 | * Store custom flags and keywords:: | 25912 | * Store custom flags and keywords:: |
| 25913 | * Store arbitrary data:: | 25913 | * Store arbitrary data:: |
| 25914 | @end menu | 25914 | @end menu |
| 25915 | 25915 | ||
| 25916 | @node Setup | 25916 | @node Gnus Registry Setup |
| 25917 | @subsection Setup | 25917 | @subsection Gnus Registry Setup |
| 25918 | 25918 | ||
| 25919 | Fortunately, setting up the Gnus registry is pretty easy: | 25919 | Fortunately, setting up the Gnus registry is pretty easy: |
| 25920 | 25920 | ||
| @@ -26086,6 +26086,21 @@ Call this function to mark an article with a custom registry mark. It | |||
| 26086 | will offer the available marks for completion. | 26086 | will offer the available marks for completion. |
| 26087 | @end defun | 26087 | @end defun |
| 26088 | 26088 | ||
| 26089 | You can use @code{defalias} to install a summary line formatting | ||
| 26090 | function that will show the registry marks. There are two flavors of | ||
| 26091 | this function, either showing the marks as single characters, using | ||
| 26092 | their @code{:char} property, or showing the marks as full strings. | ||
| 26093 | |||
| 26094 | @lisp | ||
| 26095 | ;; show the marks as single characters (see the :char property in | ||
| 26096 | ;; `gnus-registry-marks'): | ||
| 26097 | ;; (defalias 'gnus-user-format-function-M 'gnus-registry-user-format-function-M) | ||
| 26098 | |||
| 26099 | ;; show the marks by name (see `gnus-registry-marks'): | ||
| 26100 | ;; (defalias 'gnus-user-format-function-M 'gnus-registry-user-format-function-M2) | ||
| 26101 | @end lisp | ||
| 26102 | |||
| 26103 | |||
| 26089 | @node Store arbitrary data | 26104 | @node Store arbitrary data |
| 26090 | @subsection Store arbitrary data | 26105 | @subsection Store arbitrary data |
| 26091 | 26106 | ||
diff --git a/doc/misc/texinfo.tex b/doc/misc/texinfo.tex index 9f64511ea28..47837c938c8 100644 --- a/doc/misc/texinfo.tex +++ b/doc/misc/texinfo.tex | |||
| @@ -3,7 +3,7 @@ | |||
| 3 | % Load plain if necessary, i.e., if running under initex. | 3 | % Load plain if necessary, i.e., if running under initex. |
| 4 | \expandafter\ifx\csname fmtname\endcsname\relax\input plain\fi | 4 | \expandafter\ifx\csname fmtname\endcsname\relax\input plain\fi |
| 5 | % | 5 | % |
| 6 | \def\texinfoversion{2011-03-25.11} | 6 | \def\texinfoversion{2011-05-11.16} |
| 7 | % | 7 | % |
| 8 | % Copyright 1985, 1986, 1988, 1990, 1991, 1992, 1993, 1994, 1995, | 8 | % Copyright 1985, 1986, 1988, 1990, 1991, 1992, 1993, 1994, 1995, |
| 9 | % 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, | 9 | % 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, |
| @@ -8424,7 +8424,7 @@ directory should work if nowhere else does.} | |||
| 8424 | % | 8424 | % |
| 8425 | % Latin1 (ISO-8859-1) character definitions. | 8425 | % Latin1 (ISO-8859-1) character definitions. |
| 8426 | \def\latonechardefs{% | 8426 | \def\latonechardefs{% |
| 8427 | \gdef^^a0{~} | 8427 | \gdef^^a0{\tie} |
| 8428 | \gdef^^a1{\exclamdown} | 8428 | \gdef^^a1{\exclamdown} |
| 8429 | \gdef^^a2{\missingcharmsg{CENT SIGN}} | 8429 | \gdef^^a2{\missingcharmsg{CENT SIGN}} |
| 8430 | \gdef^^a3{{\pounds}} | 8430 | \gdef^^a3{{\pounds}} |
| @@ -8546,7 +8546,7 @@ directory should work if nowhere else does.} | |||
| 8546 | 8546 | ||
| 8547 | % Latin2 (ISO-8859-2) character definitions. | 8547 | % Latin2 (ISO-8859-2) character definitions. |
| 8548 | \def\lattwochardefs{% | 8548 | \def\lattwochardefs{% |
| 8549 | \gdef^^a0{~} | 8549 | \gdef^^a0{\tie} |
| 8550 | \gdef^^a1{\ogonek{A}} | 8550 | \gdef^^a1{\ogonek{A}} |
| 8551 | \gdef^^a2{\u{}} | 8551 | \gdef^^a2{\u{}} |
| 8552 | \gdef^^a3{\L} | 8552 | \gdef^^a3{\L} |
| @@ -9395,6 +9395,8 @@ directory should work if nowhere else does.} | |||
| 9395 | 9395 | ||
| 9396 | \message{and turning on texinfo input format.} | 9396 | \message{and turning on texinfo input format.} |
| 9397 | 9397 | ||
| 9398 | \def^^L{\par} % remove \outer, so ^L can appear in an @comment | ||
| 9399 | |||
| 9398 | % DEL is a comment character, in case @c does not suffice. | 9400 | % DEL is a comment character, in case @c does not suffice. |
| 9399 | \catcode`\^^? = 14 | 9401 | \catcode`\^^? = 14 |
| 9400 | 9402 | ||
| @@ -278,6 +278,10 @@ to enable a minor-mode is deprecated. Instead, use "eval: (minor-mode)". | |||
| 278 | ** The standalone programs lib-src/digest-doc and sorted-doc have been | 278 | ** The standalone programs lib-src/digest-doc and sorted-doc have been |
| 279 | replaced with Lisp commands `doc-file-to-man' and `doc-file-to-info'. | 279 | replaced with Lisp commands `doc-file-to-man' and `doc-file-to-info'. |
| 280 | 280 | ||
| 281 | --- | ||
| 282 | ** The standalone program `fakemail' has been removed. | ||
| 283 | If you need it, feedmail.el ought to provide a superset of the functionality. | ||
| 284 | |||
| 281 | ** The variable `focus-follows-mouse' now always defaults to nil. | 285 | ** The variable `focus-follows-mouse' now always defaults to nil. |
| 282 | 286 | ||
| 283 | 287 | ||
| @@ -473,6 +477,10 @@ See the variable `appt-warning-time-regexp'. | |||
| 473 | *** New function `diary-hebrew-birthday'. | 477 | *** New function `diary-hebrew-birthday'. |
| 474 | 478 | ||
| 475 | --- | 479 | --- |
| 480 | *** Elements of `calendar-day-abbrev-array' and `calendar-month-abbrev-array' | ||
| 481 | may no longer be nil, but must all be strings. | ||
| 482 | |||
| 483 | --- | ||
| 476 | *** The obsolete (since Emacs 22.1) method of enabling the appt package | 484 | *** The obsolete (since Emacs 22.1) method of enabling the appt package |
| 477 | by adding appt-make-list to diary-hook has been removed. Use appt-activate. | 485 | by adding appt-make-list to diary-hook has been removed. Use appt-activate. |
| 478 | 486 | ||
diff --git a/lib-src/ChangeLog b/lib-src/ChangeLog index c4a2df5bdbf..27dc3a14d48 100644 --- a/lib-src/ChangeLog +++ b/lib-src/ChangeLog | |||
| @@ -1,3 +1,11 @@ | |||
| 1 | 2011-05-18 Glenn Morris <rgm@gnu.org> | ||
| 2 | |||
| 3 | * fakemail.c: Remove file. | ||
| 4 | * makefile.w32-in ($(BLD)/fakemail.exe, fakemail) | ||
| 5 | ($(BLD)/fakemail.$(O)): Remove. | ||
| 6 | * Makefile.in (UTILITIES): Remove fakemail${EXEEXT}. | ||
| 7 | (fakemail${EXEEXT}): Remove rule. | ||
| 8 | |||
| 1 | 2011-04-24 Teodor Zlatanov <tzz@lifelogs.com> | 9 | 2011-04-24 Teodor Zlatanov <tzz@lifelogs.com> |
| 2 | 10 | ||
| 3 | * makefile.w32-in (obj): Add gnutls.o. | 11 | * makefile.w32-in (obj): Add gnutls.o. |
diff --git a/lib-src/Makefile.in b/lib-src/Makefile.in index 36366a4d2e7..1c2018dbbc9 100644 --- a/lib-src/Makefile.in +++ b/lib-src/Makefile.in | |||
| @@ -117,8 +117,8 @@ STAMP_INST_SCRIPTS = stamp-rcs-checkin stamp-grep-changelog | |||
| 117 | 117 | ||
| 118 | # Things that Emacs runs internally, or during the build process, | 118 | # Things that Emacs runs internally, or during the build process, |
| 119 | # which should not be installed in bindir. | 119 | # which should not be installed in bindir. |
| 120 | UTILITIES = profile${EXEEXT} movemail${EXEEXT} fakemail${EXEEXT} \ | 120 | UTILITIES = profile${EXEEXT} movemail${EXEEXT} hexl${EXEEXT} \ |
| 121 | hexl${EXEEXT} update-game-score${EXEEXT} | 121 | update-game-score${EXEEXT} |
| 122 | 122 | ||
| 123 | DONT_INSTALL= test-distrib${EXEEXT} make-docfile${EXEEXT} | 123 | DONT_INSTALL= test-distrib${EXEEXT} make-docfile${EXEEXT} |
| 124 | 124 | ||
| @@ -353,9 +353,6 @@ 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 ../src/config.h | ||
| 357 | $(CC) ${ALL_CFLAGS} ${srcdir}/fakemail.c $(LOADLIBES) -o fakemail | ||
| 358 | |||
| 359 | emacsclient${EXEEXT}: ${srcdir}/emacsclient.c ../src/config.h | 356 | emacsclient${EXEEXT}: ${srcdir}/emacsclient.c ../src/config.h |
| 360 | $(CC) ${ALL_CFLAGS} ${srcdir}/emacsclient.c \ | 357 | $(CC) ${ALL_CFLAGS} ${srcdir}/emacsclient.c \ |
| 361 | -DVERSION="\"${version}\"" \ | 358 | -DVERSION="\"${version}\"" \ |
diff --git a/lib-src/fakemail.c b/lib-src/fakemail.c deleted file mode 100644 index 435512125ff..00000000000 --- a/lib-src/fakemail.c +++ /dev/null | |||
| @@ -1,744 +0,0 @@ | |||
| 1 | /* sendmail-like interface to /bin/mail for system V, | ||
| 2 | Copyright (C) 1985, 1994, 1999, 2001-2011 Free Software Foundation, Inc. | ||
| 3 | |||
| 4 | Author: Bill Rozas <jinx@martigny.ai.mit.edu> | ||
| 5 | (according to ack.texi) | ||
| 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 | |||
| 23 | #define _XOPEN_SOURCE 500 /* for cuserid */ | ||
| 24 | |||
| 25 | #ifdef HAVE_CONFIG_H | ||
| 26 | #include <config.h> | ||
| 27 | #endif | ||
| 28 | |||
| 29 | #if defined (BSD_SYSTEM) && !defined (USE_FAKEMAIL) | ||
| 30 | /* This program isnot used in BSD, so just avoid loader complaints. */ | ||
| 31 | int | ||
| 32 | main (void) | ||
| 33 | { | ||
| 34 | return 0; | ||
| 35 | } | ||
| 36 | #else /* not BSD 4.2 (or newer) */ | ||
| 37 | #ifdef MSDOS | ||
| 38 | int | ||
| 39 | main () | ||
| 40 | { | ||
| 41 | return 0; | ||
| 42 | } | ||
| 43 | #else /* not MSDOS */ | ||
| 44 | /* This conditional contains all the rest of the file. */ | ||
| 45 | |||
| 46 | /* These are defined in config in some versions. */ | ||
| 47 | |||
| 48 | #ifdef static | ||
| 49 | #undef static | ||
| 50 | #endif | ||
| 51 | |||
| 52 | #ifdef WINDOWSNT | ||
| 53 | #include "ntlib.h" | ||
| 54 | #endif | ||
| 55 | |||
| 56 | #include <stdio.h> | ||
| 57 | #include <string.h> | ||
| 58 | #include <ctype.h> | ||
| 59 | #include <time.h> | ||
| 60 | #include <pwd.h> | ||
| 61 | #include <stdlib.h> | ||
| 62 | |||
| 63 | /* This is to declare cuserid. */ | ||
| 64 | #include <unistd.h> | ||
| 65 | |||
| 66 | /* Type definitions */ | ||
| 67 | |||
| 68 | #define boolean int | ||
| 69 | #define true 1 | ||
| 70 | #define false 0 | ||
| 71 | |||
| 72 | #define TM_YEAR_BASE 1900 | ||
| 73 | |||
| 74 | /* Nonzero if TM_YEAR is a struct tm's tm_year value that causes | ||
| 75 | asctime to have well-defined behavior. */ | ||
| 76 | #ifndef TM_YEAR_IN_ASCTIME_RANGE | ||
| 77 | # define TM_YEAR_IN_ASCTIME_RANGE(tm_year) \ | ||
| 78 | (1000 - TM_YEAR_BASE <= (tm_year) && (tm_year) <= 9999 - TM_YEAR_BASE) | ||
| 79 | #endif | ||
| 80 | |||
| 81 | /* Various lists */ | ||
| 82 | |||
| 83 | struct line_record | ||
| 84 | { | ||
| 85 | char *string; | ||
| 86 | struct line_record *continuation; | ||
| 87 | }; | ||
| 88 | typedef struct line_record *line_list; | ||
| 89 | |||
| 90 | struct header_record | ||
| 91 | { | ||
| 92 | line_list text; | ||
| 93 | struct header_record *next; | ||
| 94 | struct header_record *previous; | ||
| 95 | }; | ||
| 96 | typedef struct header_record *header; | ||
| 97 | |||
| 98 | struct stream_record | ||
| 99 | { | ||
| 100 | FILE *handle; | ||
| 101 | int (*action)(FILE *); | ||
| 102 | struct stream_record *rest_streams; | ||
| 103 | }; | ||
| 104 | typedef struct stream_record *stream_list; | ||
| 105 | |||
| 106 | /* A `struct linebuffer' is a structure which holds a line of text. | ||
| 107 | * `readline' reads a line from a stream into a linebuffer | ||
| 108 | * and works regardless of the length of the line. | ||
| 109 | */ | ||
| 110 | |||
| 111 | struct linebuffer | ||
| 112 | { | ||
| 113 | long size; | ||
| 114 | char *buffer; | ||
| 115 | }; | ||
| 116 | |||
| 117 | struct linebuffer lb; | ||
| 118 | |||
| 119 | #define new_list() \ | ||
| 120 | ((line_list) xmalloc (sizeof (struct line_record))) | ||
| 121 | #define new_header() \ | ||
| 122 | ((header) xmalloc (sizeof (struct header_record))) | ||
| 123 | #define new_stream() \ | ||
| 124 | ((stream_list) xmalloc (sizeof (struct stream_record))) | ||
| 125 | #define alloc_string(nchars) \ | ||
| 126 | ((char *) xmalloc ((nchars) + 1)) | ||
| 127 | |||
| 128 | /* Global declarations */ | ||
| 129 | |||
| 130 | #define BUFLEN 1024 | ||
| 131 | #define KEYWORD_SIZE 256 | ||
| 132 | #define FROM_PREFIX "From" | ||
| 133 | #define MY_NAME "fakemail" | ||
| 134 | #define NIL ((line_list) NULL) | ||
| 135 | #define INITIAL_LINE_SIZE 200 | ||
| 136 | |||
| 137 | #ifndef MAIL_PROGRAM_NAME | ||
| 138 | #define MAIL_PROGRAM_NAME "/bin/mail" | ||
| 139 | #endif | ||
| 140 | |||
| 141 | static const char *my_name; | ||
| 142 | static char *the_date; | ||
| 143 | static char *the_user; | ||
| 144 | static line_list file_preface; | ||
| 145 | static stream_list the_streams; | ||
| 146 | static boolean no_problems = true; | ||
| 147 | |||
| 148 | static void fatal (const char *s1) NO_RETURN; | ||
| 149 | |||
| 150 | #ifdef CURRENT_USER | ||
| 151 | static struct passwd *my_entry; | ||
| 152 | #define cuserid(s) \ | ||
| 153 | (my_entry = getpwuid (((int) geteuid ())), \ | ||
| 154 | my_entry->pw_name) | ||
| 155 | #endif | ||
| 156 | |||
| 157 | /* Utilities */ | ||
| 158 | |||
| 159 | /* Print error message. `s1' is printf control string, `s2' is arg for it. */ | ||
| 160 | |||
| 161 | static void | ||
| 162 | error (const char *s1, const char *s2) | ||
| 163 | { | ||
| 164 | printf ("%s: ", my_name); | ||
| 165 | printf (s1, s2); | ||
| 166 | printf ("\n"); | ||
| 167 | no_problems = false; | ||
| 168 | } | ||
| 169 | |||
| 170 | /* Print error message and exit. */ | ||
| 171 | |||
| 172 | static void | ||
| 173 | fatal (const char *s1) | ||
| 174 | { | ||
| 175 | error ("%s", s1); | ||
| 176 | exit (EXIT_FAILURE); | ||
| 177 | } | ||
| 178 | |||
| 179 | /* Like malloc but get fatal error if memory is exhausted. */ | ||
| 180 | |||
| 181 | static void * | ||
| 182 | xmalloc (size_t size) | ||
| 183 | { | ||
| 184 | void *result = malloc (size); | ||
| 185 | if (! result) | ||
| 186 | fatal ("virtual memory exhausted"); | ||
| 187 | return result; | ||
| 188 | } | ||
| 189 | |||
| 190 | static void * | ||
| 191 | xrealloc (void *ptr, size_t size) | ||
| 192 | { | ||
| 193 | void *result = realloc (ptr, size); | ||
| 194 | if (! result) | ||
| 195 | fatal ("virtual memory exhausted"); | ||
| 196 | return result; | ||
| 197 | } | ||
| 198 | |||
| 199 | /* Initialize a linebuffer for use */ | ||
| 200 | |||
| 201 | static void | ||
| 202 | init_linebuffer (struct linebuffer *linebuffer) | ||
| 203 | { | ||
| 204 | linebuffer->size = INITIAL_LINE_SIZE; | ||
| 205 | linebuffer->buffer = ((char *) xmalloc (INITIAL_LINE_SIZE)); | ||
| 206 | } | ||
| 207 | |||
| 208 | /* Read a line of text from `stream' into `linebuffer'. | ||
| 209 | Return the length of the line. */ | ||
| 210 | |||
| 211 | static long | ||
| 212 | readline (struct linebuffer *linebuffer, FILE *stream) | ||
| 213 | { | ||
| 214 | char *buffer = linebuffer->buffer; | ||
| 215 | char *p = linebuffer->buffer; | ||
| 216 | char *end = p + linebuffer->size; | ||
| 217 | |||
| 218 | while (true) | ||
| 219 | { | ||
| 220 | int c = getc (stream); | ||
| 221 | if (p == end) | ||
| 222 | { | ||
| 223 | linebuffer->size *= 2; | ||
| 224 | buffer = (char *) xrealloc (buffer, linebuffer->size); | ||
| 225 | p = buffer + (p - linebuffer->buffer); | ||
| 226 | end = buffer + linebuffer->size; | ||
| 227 | linebuffer->buffer = buffer; | ||
| 228 | } | ||
| 229 | if (c < 0 || c == '\n') | ||
| 230 | { | ||
| 231 | *p = 0; | ||
| 232 | break; | ||
| 233 | } | ||
| 234 | *p++ = c; | ||
| 235 | } | ||
| 236 | |||
| 237 | return p - buffer; | ||
| 238 | } | ||
| 239 | |||
| 240 | /* Extract a colon-terminated keyword from the string FIELD. | ||
| 241 | Return that keyword as a string stored in a static buffer. | ||
| 242 | Store the address of the rest of the string into *REST. | ||
| 243 | |||
| 244 | If there is no keyword, return NULL and don't alter *REST. */ | ||
| 245 | |||
| 246 | static char * | ||
| 247 | get_keyword (register char *field, char **rest) | ||
| 248 | { | ||
| 249 | static char keyword[KEYWORD_SIZE]; | ||
| 250 | register char *ptr; | ||
| 251 | register int c; | ||
| 252 | |||
| 253 | ptr = &keyword[0]; | ||
| 254 | c = (unsigned char) *field++; | ||
| 255 | if (isspace (c) || c == ':') | ||
| 256 | return ((char *) NULL); | ||
| 257 | *ptr++ = (islower (c) ? toupper (c) : c); | ||
| 258 | while (((c = (unsigned char) *field++) != ':') && ! isspace (c)) | ||
| 259 | *ptr++ = (islower (c) ? toupper (c) : c); | ||
| 260 | *ptr++ = '\0'; | ||
| 261 | while (isspace (c)) | ||
| 262 | c = (unsigned char) *field++; | ||
| 263 | if (c != ':') | ||
| 264 | return ((char *) NULL); | ||
| 265 | *rest = field; | ||
| 266 | return &keyword[0]; | ||
| 267 | } | ||
| 268 | |||
| 269 | /* Nonzero if the string FIELD starts with a colon-terminated keyword. */ | ||
| 270 | |||
| 271 | static boolean | ||
| 272 | has_keyword (char *field) | ||
| 273 | { | ||
| 274 | char *ignored; | ||
| 275 | return (get_keyword (field, &ignored) != ((char *) NULL)); | ||
| 276 | } | ||
| 277 | |||
| 278 | /* Store the string FIELD, followed by any lines in THE_LIST, | ||
| 279 | into the buffer WHERE. | ||
| 280 | Concatenate lines, putting just a space between them. | ||
| 281 | Delete everything contained in parentheses. | ||
| 282 | When a recipient name contains <...>, we discard | ||
| 283 | everything except what is inside the <...>. | ||
| 284 | |||
| 285 | We don't pay attention to overflowing WHERE; | ||
| 286 | the caller has to make it big enough. */ | ||
| 287 | |||
| 288 | static char * | ||
| 289 | add_field (line_list the_list, register char *field, register char *where) | ||
| 290 | { | ||
| 291 | register char c; | ||
| 292 | while (true) | ||
| 293 | { | ||
| 294 | char *this_recipient_where; | ||
| 295 | int in_quotes = 0; | ||
| 296 | |||
| 297 | *where++ = ' '; | ||
| 298 | this_recipient_where = where; | ||
| 299 | |||
| 300 | while ((c = *field++) != '\0') | ||
| 301 | { | ||
| 302 | if (c == '\\') | ||
| 303 | *where++ = c; | ||
| 304 | else if (c == '"') | ||
| 305 | { | ||
| 306 | in_quotes = ! in_quotes; | ||
| 307 | *where++ = c; | ||
| 308 | } | ||
| 309 | else if (in_quotes) | ||
| 310 | *where++ = c; | ||
| 311 | else if (c == '(') | ||
| 312 | { | ||
| 313 | while (*field && *field != ')') ++field; | ||
| 314 | if (! (*field++)) break; /* no close */ | ||
| 315 | continue; | ||
| 316 | } | ||
| 317 | else if (c == ',') | ||
| 318 | { | ||
| 319 | *where++ = ' '; | ||
| 320 | /* When we get to the end of one recipient, | ||
| 321 | don't discard it if the next one has <...>. */ | ||
| 322 | this_recipient_where = where; | ||
| 323 | } | ||
| 324 | else if (c == '<') | ||
| 325 | /* Discard everything we got before the `<'. */ | ||
| 326 | where = this_recipient_where; | ||
| 327 | else if (c == '>') | ||
| 328 | /* Discard the rest of this name that follows the `>'. */ | ||
| 329 | { | ||
| 330 | while (*field && *field != ',') ++field; | ||
| 331 | if (! (*field++)) break; /* no comma */ | ||
| 332 | continue; | ||
| 333 | } | ||
| 334 | else | ||
| 335 | *where++ = c; | ||
| 336 | } | ||
| 337 | if (the_list == NIL) break; | ||
| 338 | field = the_list->string; | ||
| 339 | the_list = the_list->continuation; | ||
| 340 | } | ||
| 341 | return where; | ||
| 342 | } | ||
| 343 | |||
| 344 | static line_list | ||
| 345 | make_file_preface (void) | ||
| 346 | { | ||
| 347 | char *the_string, *temp; | ||
| 348 | long idiotic_interface; | ||
| 349 | struct tm *tm; | ||
| 350 | long prefix_length; | ||
| 351 | long user_length; | ||
| 352 | long date_length; | ||
| 353 | line_list result; | ||
| 354 | |||
| 355 | prefix_length = strlen (FROM_PREFIX); | ||
| 356 | time (&idiotic_interface); | ||
| 357 | /* Convert to a string, checking for out-of-range time stamps. | ||
| 358 | Don't use 'ctime', as that might dump core if the hardware clock | ||
| 359 | is set to a bizarre value. */ | ||
| 360 | tm = localtime (&idiotic_interface); | ||
| 361 | if (! (tm && TM_YEAR_IN_ASCTIME_RANGE (tm->tm_year) | ||
| 362 | && (the_date = asctime (tm)))) | ||
| 363 | fatal ("current time is out of range"); | ||
| 364 | /* the_date has an unwanted newline at the end */ | ||
| 365 | date_length = strlen (the_date) - 1; | ||
| 366 | the_date[date_length] = '\0'; | ||
| 367 | temp = cuserid ((char *) NULL); | ||
| 368 | user_length = strlen (temp); | ||
| 369 | the_user = alloc_string (user_length + 1); | ||
| 370 | strcpy (the_user, temp); | ||
| 371 | the_string = alloc_string (3 + prefix_length | ||
| 372 | + user_length | ||
| 373 | + date_length); | ||
| 374 | temp = the_string; | ||
| 375 | strcpy (temp, FROM_PREFIX); | ||
| 376 | temp = &temp[prefix_length]; | ||
| 377 | *temp++ = ' '; | ||
| 378 | strcpy (temp, the_user); | ||
| 379 | temp = &temp[user_length]; | ||
| 380 | *temp++ = ' '; | ||
| 381 | strcpy (temp, the_date); | ||
| 382 | result = new_list (); | ||
| 383 | result->string = the_string; | ||
| 384 | result->continuation = ((line_list) NULL); | ||
| 385 | return result; | ||
| 386 | } | ||
| 387 | |||
| 388 | static void | ||
| 389 | write_line_list (register line_list the_list, FILE *the_stream) | ||
| 390 | { | ||
| 391 | for ( ; | ||
| 392 | the_list != ((line_list) NULL) ; | ||
| 393 | the_list = the_list->continuation) | ||
| 394 | { | ||
| 395 | fputs (the_list->string, the_stream); | ||
| 396 | putc ('\n', the_stream); | ||
| 397 | } | ||
| 398 | return; | ||
| 399 | } | ||
| 400 | |||
| 401 | static int | ||
| 402 | close_the_streams (void) | ||
| 403 | { | ||
| 404 | register stream_list rem; | ||
| 405 | for (rem = the_streams; | ||
| 406 | rem != ((stream_list) NULL); | ||
| 407 | rem = rem->rest_streams) | ||
| 408 | if (no_problems && (*rem->action) (rem->handle) != 0) | ||
| 409 | error ("output error", NULL); | ||
| 410 | the_streams = ((stream_list) NULL); | ||
| 411 | return (no_problems ? EXIT_SUCCESS : EXIT_FAILURE); | ||
| 412 | } | ||
| 413 | |||
| 414 | static void | ||
| 415 | add_a_stream (FILE *the_stream, int (*closing_action) (FILE *)) | ||
| 416 | { | ||
| 417 | stream_list old = the_streams; | ||
| 418 | the_streams = new_stream (); | ||
| 419 | the_streams->handle = the_stream; | ||
| 420 | the_streams->action = closing_action; | ||
| 421 | the_streams->rest_streams = old; | ||
| 422 | return; | ||
| 423 | } | ||
| 424 | |||
| 425 | static int | ||
| 426 | my_fclose (FILE *the_file) | ||
| 427 | { | ||
| 428 | putc ('\n', the_file); | ||
| 429 | fflush (the_file); | ||
| 430 | if (ferror (the_file)) | ||
| 431 | return EOF; | ||
| 432 | return fclose (the_file); | ||
| 433 | } | ||
| 434 | |||
| 435 | static boolean | ||
| 436 | open_a_file (char *name) | ||
| 437 | { | ||
| 438 | FILE *the_stream = fopen (name, "a"); | ||
| 439 | if (the_stream != ((FILE *) NULL)) | ||
| 440 | { | ||
| 441 | add_a_stream (the_stream, my_fclose); | ||
| 442 | if (the_user == ((char *) NULL)) | ||
| 443 | file_preface = make_file_preface (); | ||
| 444 | write_line_list (file_preface, the_stream); | ||
| 445 | return true; | ||
| 446 | } | ||
| 447 | return false; | ||
| 448 | } | ||
| 449 | |||
| 450 | static void | ||
| 451 | put_string (char *s) | ||
| 452 | { | ||
| 453 | register stream_list rem; | ||
| 454 | for (rem = the_streams; | ||
| 455 | rem != ((stream_list) NULL); | ||
| 456 | rem = rem->rest_streams) | ||
| 457 | fputs (s, rem->handle); | ||
| 458 | return; | ||
| 459 | } | ||
| 460 | |||
| 461 | static void | ||
| 462 | put_line (const char *string) | ||
| 463 | { | ||
| 464 | register stream_list rem; | ||
| 465 | for (rem = the_streams; | ||
| 466 | rem != ((stream_list) NULL); | ||
| 467 | rem = rem->rest_streams) | ||
| 468 | { | ||
| 469 | const char *s = string; | ||
| 470 | int column = 0; | ||
| 471 | |||
| 472 | /* Divide STRING into lines. */ | ||
| 473 | while (*s != 0) | ||
| 474 | { | ||
| 475 | const char *breakpos; | ||
| 476 | |||
| 477 | /* Find the last char that fits. */ | ||
| 478 | for (breakpos = s; *breakpos && column < 78; ++breakpos) | ||
| 479 | { | ||
| 480 | if (*breakpos == '\t') | ||
| 481 | column += 8; | ||
| 482 | else | ||
| 483 | column++; | ||
| 484 | } | ||
| 485 | /* If we didn't reach end of line, break the line. */ | ||
| 486 | if (*breakpos) | ||
| 487 | { | ||
| 488 | /* Back up to just after the last comma that fits. */ | ||
| 489 | while (breakpos != s && breakpos[-1] != ',') --breakpos; | ||
| 490 | |||
| 491 | if (breakpos == s) | ||
| 492 | { | ||
| 493 | /* If no comma fits, move past the first address anyway. */ | ||
| 494 | while (*breakpos != 0 && *breakpos != ',') ++breakpos; | ||
| 495 | if (*breakpos != 0) | ||
| 496 | /* Include the comma after it. */ | ||
| 497 | ++breakpos; | ||
| 498 | } | ||
| 499 | } | ||
| 500 | /* Output that much, then break the line. */ | ||
| 501 | fwrite (s, 1, breakpos - s, rem->handle); | ||
| 502 | column = 8; | ||
| 503 | |||
| 504 | /* Skip whitespace and prepare to print more addresses. */ | ||
| 505 | s = breakpos; | ||
| 506 | while (*s == ' ' || *s == '\t') ++s; | ||
| 507 | if (*s != 0) | ||
| 508 | fputs ("\n\t", rem->handle); | ||
| 509 | } | ||
| 510 | putc ('\n', rem->handle); | ||
| 511 | } | ||
| 512 | return; | ||
| 513 | } | ||
| 514 | |||
| 515 | #define mail_error error | ||
| 516 | |||
| 517 | /* Handle an FCC field. FIELD is the text of the first line (after | ||
| 518 | the header name), and THE_LIST holds the continuation lines if any. | ||
| 519 | Call open_a_file for each file. */ | ||
| 520 | |||
| 521 | static void | ||
| 522 | setup_files (register line_list the_list, register char *field) | ||
| 523 | { | ||
| 524 | register char *start; | ||
| 525 | register char c; | ||
| 526 | while (true) | ||
| 527 | { | ||
| 528 | while (((c = *field) != '\0') | ||
| 529 | && (c == ' ' | ||
| 530 | || c == '\t' | ||
| 531 | || c == ',')) | ||
| 532 | field += 1; | ||
| 533 | if (c != '\0') | ||
| 534 | { | ||
| 535 | start = field; | ||
| 536 | while (((c = *field) != '\0') | ||
| 537 | && c != ' ' | ||
| 538 | && c != '\t' | ||
| 539 | && c != ',') | ||
| 540 | field += 1; | ||
| 541 | *field = '\0'; | ||
| 542 | if (!open_a_file (start)) | ||
| 543 | mail_error ("Could not open file %s", start); | ||
| 544 | *field = c; | ||
| 545 | if (c != '\0') continue; | ||
| 546 | } | ||
| 547 | if (the_list == ((line_list) NULL)) | ||
| 548 | return; | ||
| 549 | field = the_list->string; | ||
| 550 | the_list = the_list->continuation; | ||
| 551 | } | ||
| 552 | } | ||
| 553 | |||
| 554 | /* Compute the total size of all recipient names stored in THE_HEADER. | ||
| 555 | The result says how big to make the buffer to pass to parse_header. */ | ||
| 556 | |||
| 557 | static int | ||
| 558 | args_size (header the_header) | ||
| 559 | { | ||
| 560 | register header old = the_header; | ||
| 561 | register line_list rem; | ||
| 562 | register int size = 0; | ||
| 563 | do | ||
| 564 | { | ||
| 565 | char *field; | ||
| 566 | register char *keyword = get_keyword (the_header->text->string, &field); | ||
| 567 | if ((strcmp (keyword, "TO") == 0) | ||
| 568 | || (strcmp (keyword, "CC") == 0) | ||
| 569 | || (strcmp (keyword, "BCC") == 0)) | ||
| 570 | { | ||
| 571 | size += 1 + strlen (field); | ||
| 572 | for (rem = the_header->text->continuation; | ||
| 573 | rem != NIL; | ||
| 574 | rem = rem->continuation) | ||
| 575 | size += 1 + strlen (rem->string); | ||
| 576 | } | ||
| 577 | the_header = the_header->next; | ||
| 578 | } while (the_header != old); | ||
| 579 | return size; | ||
| 580 | } | ||
| 581 | |||
| 582 | /* Scan the header described by the lists THE_HEADER, | ||
| 583 | and put all recipient names into the buffer WHERE. | ||
| 584 | Precede each recipient name with a space. | ||
| 585 | |||
| 586 | Also, if the header has any FCC fields, call setup_files for each one. */ | ||
| 587 | |||
| 588 | static void | ||
| 589 | parse_header (header the_header, register char *where) | ||
| 590 | { | ||
| 591 | register header old = the_header; | ||
| 592 | do | ||
| 593 | { | ||
| 594 | char *field; | ||
| 595 | register char *keyword = get_keyword (the_header->text->string, &field); | ||
| 596 | if (strcmp (keyword, "TO") == 0) | ||
| 597 | where = add_field (the_header->text->continuation, field, where); | ||
| 598 | else if (strcmp (keyword, "CC") == 0) | ||
| 599 | where = add_field (the_header->text->continuation, field, where); | ||
| 600 | else if (strcmp (keyword, "BCC") == 0) | ||
| 601 | { | ||
| 602 | where = add_field (the_header->text->continuation, field, where); | ||
| 603 | the_header->previous->next = the_header->next; | ||
| 604 | the_header->next->previous = the_header->previous; | ||
| 605 | } | ||
| 606 | else if (strcmp (keyword, "FCC") == 0) | ||
| 607 | setup_files (the_header->text->continuation, field); | ||
| 608 | the_header = the_header->next; | ||
| 609 | } while (the_header != old); | ||
| 610 | *where = '\0'; | ||
| 611 | return; | ||
| 612 | } | ||
| 613 | |||
| 614 | /* Read lines from the input until we get a blank line. | ||
| 615 | Create a list of `header' objects, one for each header field, | ||
| 616 | each of which points to a list of `line_list' objects, | ||
| 617 | one for each line in that field. | ||
| 618 | Continuation lines are grouped in the headers they continue. */ | ||
| 619 | |||
| 620 | static header | ||
| 621 | read_header (void) | ||
| 622 | { | ||
| 623 | register header the_header = ((header) NULL); | ||
| 624 | register line_list *next_line = ((line_list *) NULL); | ||
| 625 | |||
| 626 | init_linebuffer (&lb); | ||
| 627 | |||
| 628 | do | ||
| 629 | { | ||
| 630 | long length; | ||
| 631 | register char *line; | ||
| 632 | |||
| 633 | readline (&lb, stdin); | ||
| 634 | line = lb.buffer; | ||
| 635 | length = strlen (line); | ||
| 636 | if (length == 0) break; | ||
| 637 | |||
| 638 | if (has_keyword (line)) | ||
| 639 | { | ||
| 640 | register header old = the_header; | ||
| 641 | the_header = new_header (); | ||
| 642 | if (old == ((header) NULL)) | ||
| 643 | { | ||
| 644 | the_header->next = the_header; | ||
| 645 | the_header->previous = the_header; | ||
| 646 | } | ||
| 647 | else | ||
| 648 | { | ||
| 649 | the_header->previous = old; | ||
| 650 | the_header->next = old->next; | ||
| 651 | old->next = the_header; | ||
| 652 | } | ||
| 653 | next_line = &(the_header->text); | ||
| 654 | } | ||
| 655 | |||
| 656 | if (next_line == ((line_list *) NULL)) | ||
| 657 | { | ||
| 658 | /* Not a valid header */ | ||
| 659 | exit (EXIT_FAILURE); | ||
| 660 | } | ||
| 661 | *next_line = new_list (); | ||
| 662 | (*next_line)->string = alloc_string (length); | ||
| 663 | strcpy (((*next_line)->string), line); | ||
| 664 | next_line = &((*next_line)->continuation); | ||
| 665 | *next_line = NIL; | ||
| 666 | |||
| 667 | } while (true); | ||
| 668 | |||
| 669 | if (! the_header) | ||
| 670 | fatal ("input message has no header"); | ||
| 671 | return the_header->next; | ||
| 672 | } | ||
| 673 | |||
| 674 | static void | ||
| 675 | write_header (header the_header) | ||
| 676 | { | ||
| 677 | register header old = the_header; | ||
| 678 | do | ||
| 679 | { | ||
| 680 | register line_list the_list; | ||
| 681 | for (the_list = the_header->text; | ||
| 682 | the_list != NIL; | ||
| 683 | the_list = the_list->continuation) | ||
| 684 | put_line (the_list->string); | ||
| 685 | the_header = the_header->next; | ||
| 686 | } while (the_header != old); | ||
| 687 | put_line (""); | ||
| 688 | return; | ||
| 689 | } | ||
| 690 | |||
| 691 | int | ||
| 692 | main (int argc, char **argv) | ||
| 693 | { | ||
| 694 | char *command_line; | ||
| 695 | header the_header; | ||
| 696 | long name_length; | ||
| 697 | const char *mail_program_name; | ||
| 698 | char buf[BUFLEN + 1]; | ||
| 699 | register int size; | ||
| 700 | FILE *the_pipe; | ||
| 701 | |||
| 702 | mail_program_name = getenv ("FAKEMAILER"); | ||
| 703 | if (!(mail_program_name && *mail_program_name)) | ||
| 704 | mail_program_name = MAIL_PROGRAM_NAME; | ||
| 705 | name_length = strlen (mail_program_name); | ||
| 706 | |||
| 707 | my_name = MY_NAME; | ||
| 708 | the_streams = ((stream_list) NULL); | ||
| 709 | the_date = ((char *) NULL); | ||
| 710 | the_user = ((char *) NULL); | ||
| 711 | |||
| 712 | the_header = read_header (); | ||
| 713 | command_line = alloc_string (name_length + args_size (the_header)); | ||
| 714 | strcpy (command_line, mail_program_name); | ||
| 715 | parse_header (the_header, &command_line[name_length]); | ||
| 716 | |||
| 717 | the_pipe = popen (command_line, "w"); | ||
| 718 | if (the_pipe == ((FILE *) NULL)) | ||
| 719 | fatal ("cannot open pipe to real mailer"); | ||
| 720 | |||
| 721 | add_a_stream (the_pipe, pclose); | ||
| 722 | |||
| 723 | write_header (the_header); | ||
| 724 | |||
| 725 | /* Dump the message itself */ | ||
| 726 | |||
| 727 | while (!feof (stdin)) | ||
| 728 | { | ||
| 729 | size = fread (buf, 1, BUFLEN, stdin); | ||
| 730 | buf[size] = '\0'; | ||
| 731 | put_string (buf); | ||
| 732 | } | ||
| 733 | |||
| 734 | if (no_problems && (ferror (stdin) || fclose (stdin) != 0)) | ||
| 735 | error ("input error", NULL); | ||
| 736 | |||
| 737 | exit (close_the_streams ()); | ||
| 738 | } | ||
| 739 | |||
| 740 | #endif /* not MSDOS */ | ||
| 741 | #endif /* not BSD 4.2 (or newer) */ | ||
| 742 | |||
| 743 | |||
| 744 | /* fakemail.c ends here */ | ||
diff --git a/lib-src/makefile.w32-in b/lib-src/makefile.w32-in index 38d453d5259..0e203d18bd2 100644 --- a/lib-src/makefile.w32-in +++ b/lib-src/makefile.w32-in | |||
| @@ -31,8 +31,6 @@ $(BLD)/make-docfile.exe: $(BLD)/make-docfile.$(O) $(BLD)/ntlib.$(O) | |||
| 31 | $(LINK) $(LINK_OUT)$@ $(LINK_FLAGS) $(BLD)/make-docfile.$(O) $(BLD)/ntlib.$(O) $(LIBS) | 31 | $(LINK) $(LINK_OUT)$@ $(LINK_FLAGS) $(BLD)/make-docfile.$(O) $(BLD)/ntlib.$(O) $(LIBS) |
| 32 | $(BLD)/hexl.exe: $(BLD)/hexl.$(O) | 32 | $(BLD)/hexl.exe: $(BLD)/hexl.$(O) |
| 33 | $(LINK) $(LINK_OUT)$@ $(LINK_FLAGS) $(BLD)/hexl.$(O) $(LIBS) | 33 | $(LINK) $(LINK_OUT)$@ $(LINK_FLAGS) $(BLD)/hexl.$(O) $(LIBS) |
| 34 | $(BLD)/fakemail.exe: $(BLD)/fakemail.$(O) $(BLD)/ntlib.$(O) | ||
| 35 | $(LINK) $(LINK_OUT)$@ $(LINK_FLAGS) $(BLD)/fakemail.$(O) $(BLD)/ntlib.$(O) $(LIBS) | ||
| 36 | $(BLD)/test-distrib.exe: $(BLD)/test-distrib.$(O) | 34 | $(BLD)/test-distrib.exe: $(BLD)/test-distrib.$(O) |
| 37 | $(LINK) $(LINK_OUT)$@ $(LINK_FLAGS) $(BLD)/test-distrib.$(O) $(LIBS) | 35 | $(LINK) $(LINK_OUT)$@ $(LINK_FLAGS) $(BLD)/test-distrib.$(O) $(LIBS) |
| 38 | 36 | ||
| @@ -42,7 +40,6 @@ etags: stamp_BLD $(BLD)/etags.exe | |||
| 42 | ebrowse: stamp_BLD $(BLD)/ebrowse.exe | 40 | ebrowse: stamp_BLD $(BLD)/ebrowse.exe |
| 43 | hexl: stamp_BLD $(BLD)/hexl.exe | 41 | hexl: stamp_BLD $(BLD)/hexl.exe |
| 44 | movemail: stamp_BLD $(BLD)/movemail.exe | 42 | movemail: stamp_BLD $(BLD)/movemail.exe |
| 45 | fakemail: stamp_BLD $(BLD)/fakemail.exe | ||
| 46 | emacsclient: stamp_BLD $(BLD)/emacsclient.exe $(BLD)/emacsclientw.exe | 43 | emacsclient: stamp_BLD $(BLD)/emacsclient.exe $(BLD)/emacsclientw.exe |
| 47 | 44 | ||
| 48 | test-distrib: stamp_BLD $(BLD)/test-distrib.exe | 45 | test-distrib: stamp_BLD $(BLD)/test-distrib.exe |
| @@ -406,14 +403,6 @@ $(BLD)/etags.$(O) : \ | |||
| 406 | $(SRC)/ntlib.h \ | 403 | $(SRC)/ntlib.h \ |
| 407 | $(EMACS_ROOT)/lib/getopt.h | 404 | $(EMACS_ROOT)/lib/getopt.h |
| 408 | 405 | ||
| 409 | $(BLD)/fakemail.$(O) : \ | ||
| 410 | $(SRC)/fakemail.c \ | ||
| 411 | $(SRC)/ntlib.h \ | ||
| 412 | $(EMACS_ROOT)/src/s/ms-w32.h \ | ||
| 413 | $(EMACS_ROOT)/src/m/intel386.h \ | ||
| 414 | $(EMACS_ROOT)/lib-src/../src/config.h \ | ||
| 415 | $(EMACS_ROOT)/nt/inc/pwd.h | ||
| 416 | |||
| 417 | $(BLD)/getdate.$(O) : \ | 406 | $(BLD)/getdate.$(O) : \ |
| 418 | $(SRC)/getdate.c \ | 407 | $(SRC)/getdate.c \ |
| 419 | $(EMACS_ROOT)/src/s/ms-w32.h \ | 408 | $(EMACS_ROOT)/src/s/ms-w32.h \ |
| @@ -483,7 +472,7 @@ $(BLD)/timer.$(O) : \ | |||
| 483 | # The following dependencies are for supporting parallel builds, where | 472 | # The following dependencies are for supporting parallel builds, where |
| 484 | # we must make sure $(BLD) exists before any compilation starts. | 473 | # we must make sure $(BLD) exists before any compilation starts. |
| 485 | # | 474 | # |
| 486 | $(BLD)/make-docfile.$(O) $(BLD)/hexl.$(O) $(BLD)/fakemail.$(O): stamp_BLD | 475 | $(BLD)/make-docfile.$(O) $(BLD)/hexl.$(O): stamp_BLD |
| 487 | 476 | ||
| 488 | $(BLD)/test-distrib.$(O) $(MOVEMAILOBJS): stamp_BLD | 477 | $(BLD)/test-distrib.$(O) $(MOVEMAILOBJS): stamp_BLD |
| 489 | 478 | ||
diff --git a/lib/gnulib.mk b/lib/gnulib.mk index 1466e430a4c..495e6918a45 100644 --- a/lib/gnulib.mk +++ b/lib/gnulib.mk | |||
| @@ -167,7 +167,8 @@ endif | |||
| 167 | 167 | ||
| 168 | ## begin gnulib module ignore-value | 168 | ## begin gnulib module ignore-value |
| 169 | 169 | ||
| 170 | libgnu_a_SOURCES += ignore-value.h | 170 | |
| 171 | EXTRA_DIST += ignore-value.h | ||
| 171 | 172 | ||
| 172 | ## end gnulib module ignore-value | 173 | ## end gnulib module ignore-value |
| 173 | 174 | ||
| @@ -779,6 +780,7 @@ unistd.h: unistd.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H | |||
| 779 | -e 's|@''GNULIB_GETLOGIN_R''@|$(GNULIB_GETLOGIN_R)|g' \ | 780 | -e 's|@''GNULIB_GETLOGIN_R''@|$(GNULIB_GETLOGIN_R)|g' \ |
| 780 | -e 's|@''GNULIB_GETPAGESIZE''@|$(GNULIB_GETPAGESIZE)|g' \ | 781 | -e 's|@''GNULIB_GETPAGESIZE''@|$(GNULIB_GETPAGESIZE)|g' \ |
| 781 | -e 's|@''GNULIB_GETUSERSHELL''@|$(GNULIB_GETUSERSHELL)|g' \ | 782 | -e 's|@''GNULIB_GETUSERSHELL''@|$(GNULIB_GETUSERSHELL)|g' \ |
| 783 | -e 's|@''GNULIB_GROUP_MEMBER''@|$(GNULIB_GROUP_MEMBER)|g' \ | ||
| 782 | -e 's|@''GNULIB_LCHOWN''@|$(GNULIB_LCHOWN)|g' \ | 784 | -e 's|@''GNULIB_LCHOWN''@|$(GNULIB_LCHOWN)|g' \ |
| 783 | -e 's|@''GNULIB_LINK''@|$(GNULIB_LINK)|g' \ | 785 | -e 's|@''GNULIB_LINK''@|$(GNULIB_LINK)|g' \ |
| 784 | -e 's|@''GNULIB_LINKAT''@|$(GNULIB_LINKAT)|g' \ | 786 | -e 's|@''GNULIB_LINKAT''@|$(GNULIB_LINKAT)|g' \ |
| @@ -817,6 +819,7 @@ unistd.h: unistd.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H | |||
| 817 | -e 's|@''HAVE_GETHOSTNAME''@|$(HAVE_GETHOSTNAME)|g' \ | 819 | -e 's|@''HAVE_GETHOSTNAME''@|$(HAVE_GETHOSTNAME)|g' \ |
| 818 | -e 's|@''HAVE_GETLOGIN''@|$(HAVE_GETLOGIN)|g' \ | 820 | -e 's|@''HAVE_GETLOGIN''@|$(HAVE_GETLOGIN)|g' \ |
| 819 | -e 's|@''HAVE_GETPAGESIZE''@|$(HAVE_GETPAGESIZE)|g' \ | 821 | -e 's|@''HAVE_GETPAGESIZE''@|$(HAVE_GETPAGESIZE)|g' \ |
| 822 | -e 's|@''HAVE_GROUP_MEMBER''@|$(HAVE_GROUP_MEMBER)|g' \ | ||
| 820 | -e 's|@''HAVE_LCHOWN''@|$(HAVE_LCHOWN)|g' \ | 823 | -e 's|@''HAVE_LCHOWN''@|$(HAVE_LCHOWN)|g' \ |
| 821 | -e 's|@''HAVE_LINK''@|$(HAVE_LINK)|g' \ | 824 | -e 's|@''HAVE_LINK''@|$(HAVE_LINK)|g' \ |
| 822 | -e 's|@''HAVE_LINKAT''@|$(HAVE_LINKAT)|g' \ | 825 | -e 's|@''HAVE_LINKAT''@|$(HAVE_LINKAT)|g' \ |
| @@ -883,9 +886,10 @@ EXTRA_DIST += unistd.in.h | |||
| 883 | ## begin gnulib module verify | 886 | ## begin gnulib module verify |
| 884 | 887 | ||
| 885 | if gl_GNULIB_ENABLED_verify | 888 | if gl_GNULIB_ENABLED_verify |
| 886 | libgnu_a_SOURCES += verify.h | ||
| 887 | 889 | ||
| 888 | endif | 890 | endif |
| 891 | EXTRA_DIST += verify.h | ||
| 892 | |||
| 889 | ## end gnulib module verify | 893 | ## end gnulib module verify |
| 890 | 894 | ||
| 891 | ## begin gnulib module warn-on-use | 895 | ## begin gnulib module warn-on-use |
diff --git a/lib/intprops.h b/lib/intprops.h index 58b1b3fbf44..a84bd6af531 100644 --- a/lib/intprops.h +++ b/lib/intprops.h | |||
| @@ -17,70 +17,298 @@ | |||
| 17 | 17 | ||
| 18 | /* Written by Paul Eggert. */ | 18 | /* Written by Paul Eggert. */ |
| 19 | 19 | ||
| 20 | #ifndef GL_INTPROPS_H | 20 | #ifndef _GL_INTPROPS_H |
| 21 | # define GL_INTPROPS_H | 21 | #define _GL_INTPROPS_H |
| 22 | 22 | ||
| 23 | # include <limits.h> | 23 | #include <limits.h> |
| 24 | |||
| 25 | /* Return a integer value, converted to the same type as the integer | ||
| 26 | expression E after integer type promotion. V is the unconverted value. | ||
| 27 | E should not have side effects. */ | ||
| 28 | #define _GL_INT_CONVERT(e, v) ((e) - (e) + (v)) | ||
| 24 | 29 | ||
| 25 | /* The extra casts in the following macros work around compiler bugs, | 30 | /* The extra casts in the following macros work around compiler bugs, |
| 26 | e.g., in Cray C 5.0.3.0. */ | 31 | e.g., in Cray C 5.0.3.0. */ |
| 27 | 32 | ||
| 28 | /* True if the arithmetic type T is an integer type. bool counts as | 33 | /* True if the arithmetic type T is an integer type. bool counts as |
| 29 | an integer. */ | 34 | an integer. */ |
| 30 | # define TYPE_IS_INTEGER(t) ((t) 1.5 == 1) | 35 | #define TYPE_IS_INTEGER(t) ((t) 1.5 == 1) |
| 31 | 36 | ||
| 32 | /* True if negative values of the signed integer type T use two's | 37 | /* True if negative values of the signed integer type T use two's |
| 33 | complement, ones' complement, or signed magnitude representation, | 38 | complement, ones' complement, or signed magnitude representation, |
| 34 | respectively. Much GNU code assumes two's complement, but some | 39 | respectively. Much GNU code assumes two's complement, but some |
| 35 | people like to be portable to all possible C hosts. */ | 40 | people like to be portable to all possible C hosts. */ |
| 36 | # define TYPE_TWOS_COMPLEMENT(t) ((t) ~ (t) 0 == (t) -1) | 41 | #define TYPE_TWOS_COMPLEMENT(t) ((t) ~ (t) 0 == (t) -1) |
| 37 | # define TYPE_ONES_COMPLEMENT(t) ((t) ~ (t) 0 == 0) | 42 | #define TYPE_ONES_COMPLEMENT(t) ((t) ~ (t) 0 == 0) |
| 38 | # define TYPE_SIGNED_MAGNITUDE(t) ((t) ~ (t) 0 < (t) -1) | 43 | #define TYPE_SIGNED_MAGNITUDE(t) ((t) ~ (t) 0 < (t) -1) |
| 44 | |||
| 45 | /* True if the signed integer expression E uses two's complement. */ | ||
| 46 | #define _GL_INT_TWOS_COMPLEMENT(e) (~ _GL_INT_CONVERT (e, 0) == -1) | ||
| 39 | 47 | ||
| 40 | /* True if the arithmetic type T is signed. */ | 48 | /* True if the arithmetic type T is signed. */ |
| 41 | # define TYPE_SIGNED(t) (! ((t) 0 < (t) -1)) | 49 | #define TYPE_SIGNED(t) (! ((t) 0 < (t) -1)) |
| 50 | |||
| 51 | /* Return 1 if the integer expression E, after integer promotion, has | ||
| 52 | a signed type. E should not have side effects. */ | ||
| 53 | #define _GL_INT_SIGNED(e) (_GL_INT_CONVERT (e, -1) < 0) | ||
| 42 | 54 | ||
| 43 | /* The maximum and minimum values for the integer type T. These | 55 | |
| 56 | /* Minimum and maximum values for integer types and expressions. These | ||
| 44 | macros have undefined behavior if T is signed and has padding bits. | 57 | macros have undefined behavior if T is signed and has padding bits. |
| 45 | If this is a problem for you, please let us know how to fix it for | 58 | If this is a problem for you, please let us know how to fix it for |
| 46 | your host. */ | 59 | your host. */ |
| 47 | # define TYPE_MINIMUM(t) \ | 60 | |
| 48 | ((t) (! TYPE_SIGNED (t) \ | 61 | /* The maximum and minimum values for the integer type T. */ |
| 49 | ? (t) 0 \ | 62 | #define TYPE_MINIMUM(t) \ |
| 50 | : TYPE_SIGNED_MAGNITUDE (t) \ | 63 | ((t) (! TYPE_SIGNED (t) \ |
| 51 | ? ~ (t) 0 \ | 64 | ? (t) 0 \ |
| 65 | : TYPE_SIGNED_MAGNITUDE (t) \ | ||
| 66 | ? ~ (t) 0 \ | ||
| 52 | : ~ TYPE_MAXIMUM (t))) | 67 | : ~ TYPE_MAXIMUM (t))) |
| 53 | # define TYPE_MAXIMUM(t) \ | 68 | #define TYPE_MAXIMUM(t) \ |
| 54 | ((t) (! TYPE_SIGNED (t) \ | 69 | ((t) (! TYPE_SIGNED (t) \ |
| 55 | ? (t) -1 \ | 70 | ? (t) -1 \ |
| 56 | : ((((t) 1 << (sizeof (t) * CHAR_BIT - 2)) - 1) * 2 + 1))) | 71 | : ((((t) 1 << (sizeof (t) * CHAR_BIT - 2)) - 1) * 2 + 1))) |
| 57 | 72 | ||
| 58 | /* Return zero if T can be determined to be an unsigned type. | 73 | /* The maximum and minimum values for the type of the expression E, |
| 59 | Otherwise, return 1. | 74 | after integer promotion. E should not have side effects. */ |
| 60 | When compiling with GCC, INT_STRLEN_BOUND uses this macro to obtain a | 75 | #define _GL_INT_MINIMUM(e) \ |
| 61 | tighter bound. Otherwise, it overestimates the true bound by one byte | 76 | (_GL_INT_SIGNED (e) \ |
| 62 | when applied to unsigned types of size 2, 4, 16, ... bytes. | 77 | ? - _GL_INT_TWOS_COMPLEMENT (e) - _GL_SIGNED_INT_MAXIMUM (e) \ |
| 63 | The symbol signed_type_or_expr__ is private to this header file. */ | 78 | : _GL_INT_CONVERT (e, 0)) |
| 64 | # if __GNUC__ >= 2 | 79 | #define _GL_INT_MAXIMUM(e) \ |
| 65 | # define signed_type_or_expr__(t) TYPE_SIGNED (__typeof__ (t)) | 80 | (_GL_INT_SIGNED (e) \ |
| 66 | # else | 81 | ? _GL_SIGNED_INT_MAXIMUM (e) \ |
| 67 | # define signed_type_or_expr__(t) 1 | 82 | : _GL_INT_CONVERT (e, -1)) |
| 68 | # endif | 83 | #define _GL_SIGNED_INT_MAXIMUM(e) \ |
| 84 | (((_GL_INT_CONVERT (e, 1) << (sizeof ((e) + 0) * CHAR_BIT - 2)) - 1) * 2 + 1) | ||
| 85 | |||
| 86 | |||
| 87 | /* Return 1 if the __typeof__ keyword works. This could be done by | ||
| 88 | 'configure', but for now it's easier to do it by hand. */ | ||
| 89 | #if 2 <= __GNUC__ || 0x5110 <= __SUNPRO_C | ||
| 90 | # define _GL_HAVE___TYPEOF__ 1 | ||
| 91 | #else | ||
| 92 | # define _GL_HAVE___TYPEOF__ 0 | ||
| 93 | #endif | ||
| 94 | |||
| 95 | /* Return 1 if the integer type or expression T might be signed. Return 0 | ||
| 96 | if it is definitely unsigned. This macro does not evaluate its argument, | ||
| 97 | and expands to an integer constant expression. */ | ||
| 98 | #if _GL_HAVE___TYPEOF__ | ||
| 99 | # define _GL_SIGNED_TYPE_OR_EXPR(t) TYPE_SIGNED (__typeof__ (t)) | ||
| 100 | #else | ||
| 101 | # define _GL_SIGNED_TYPE_OR_EXPR(t) 1 | ||
| 102 | #endif | ||
| 69 | 103 | ||
| 70 | /* Bound on length of the string representing an unsigned integer | 104 | /* Bound on length of the string representing an unsigned integer |
| 71 | value representable in B bits. log10 (2.0) < 146/485. The | 105 | value representable in B bits. log10 (2.0) < 146/485. The |
| 72 | smallest value of B where this bound is not tight is 2621. */ | 106 | smallest value of B where this bound is not tight is 2621. */ |
| 73 | # define INT_BITS_STRLEN_BOUND(b) (((b) * 146 + 484) / 485) | 107 | #define INT_BITS_STRLEN_BOUND(b) (((b) * 146 + 484) / 485) |
| 74 | 108 | ||
| 75 | /* Bound on length of the string representing an integer type or expression T. | 109 | /* Bound on length of the string representing an integer type or expression T. |
| 76 | Subtract 1 for the sign bit if T is signed, and then add 1 more for | 110 | Subtract 1 for the sign bit if T is signed, and then add 1 more for |
| 77 | a minus sign if needed. */ | 111 | a minus sign if needed. |
| 78 | # define INT_STRLEN_BOUND(t) \ | 112 | |
| 79 | (INT_BITS_STRLEN_BOUND (sizeof (t) * CHAR_BIT - signed_type_or_expr__ (t)) \ | 113 | Because _GL_SIGNED_TYPE_OR_EXPR sometimes returns 0 when its argument is |
| 80 | + signed_type_or_expr__ (t)) | 114 | signed, this macro may overestimate the true bound by one byte when |
| 115 | applied to unsigned types of size 2, 4, 16, ... bytes. */ | ||
| 116 | #define INT_STRLEN_BOUND(t) \ | ||
| 117 | (INT_BITS_STRLEN_BOUND (sizeof (t) * CHAR_BIT \ | ||
| 118 | - _GL_SIGNED_TYPE_OR_EXPR (t)) \ | ||
| 119 | + _GL_SIGNED_TYPE_OR_EXPR (t)) | ||
| 81 | 120 | ||
| 82 | /* Bound on buffer size needed to represent an integer type or expression T, | 121 | /* Bound on buffer size needed to represent an integer type or expression T, |
| 83 | including the terminating null. */ | 122 | including the terminating null. */ |
| 84 | # define INT_BUFSIZE_BOUND(t) (INT_STRLEN_BOUND (t) + 1) | 123 | #define INT_BUFSIZE_BOUND(t) (INT_STRLEN_BOUND (t) + 1) |
| 124 | |||
| 125 | |||
| 126 | /* Range overflow checks. | ||
| 127 | |||
| 128 | The INT_<op>_RANGE_OVERFLOW macros return 1 if the corresponding C | ||
| 129 | operators might not yield numerically correct answers due to | ||
| 130 | arithmetic overflow. They do not rely on undefined or | ||
| 131 | implementation-defined behavior. Their implementations are simple | ||
| 132 | and straightforward, but they are a bit harder to use than the | ||
| 133 | INT_<op>_OVERFLOW macros described below. | ||
| 134 | |||
| 135 | Example usage: | ||
| 136 | |||
| 137 | long int i = ...; | ||
| 138 | long int j = ...; | ||
| 139 | if (INT_MULTIPLY_RANGE_OVERFLOW (i, j, LONG_MIN, LONG_MAX)) | ||
| 140 | printf ("multiply would overflow"); | ||
| 141 | else | ||
| 142 | printf ("product is %ld", i * j); | ||
| 143 | |||
| 144 | Restrictions on *_RANGE_OVERFLOW macros: | ||
| 145 | |||
| 146 | These macros do not check for all possible numerical problems or | ||
| 147 | undefined or unspecified behavior: they do not check for division | ||
| 148 | by zero, for bad shift counts, or for shifting negative numbers. | ||
| 149 | |||
| 150 | These macros may evaluate their arguments zero or multiple times, | ||
| 151 | so the arguments should not have side effects. The arithmetic | ||
| 152 | arguments (including the MIN and MAX arguments) must be of the same | ||
| 153 | integer type after the usual arithmetic conversions, and the type | ||
| 154 | must have minimum value MIN and maximum MAX. Unsigned types should | ||
| 155 | use a zero MIN of the proper type. | ||
| 156 | |||
| 157 | These macros are tuned for constant MIN and MAX. For commutative | ||
| 158 | operations such as A + B, they are also tuned for constant B. */ | ||
| 159 | |||
| 160 | /* Return 1 if A + B would overflow in [MIN,MAX] arithmetic. | ||
| 161 | See above for restrictions. */ | ||
| 162 | #define INT_ADD_RANGE_OVERFLOW(a, b, min, max) \ | ||
| 163 | ((b) < 0 \ | ||
| 164 | ? (a) < (min) - (b) \ | ||
| 165 | : (max) - (b) < (a)) | ||
| 166 | |||
| 167 | /* Return 1 if A - B would overflow in [MIN,MAX] arithmetic. | ||
| 168 | See above for restrictions. */ | ||
| 169 | #define INT_SUBTRACT_RANGE_OVERFLOW(a, b, min, max) \ | ||
| 170 | ((b) < 0 \ | ||
| 171 | ? (max) + (b) < (a) \ | ||
| 172 | : (a) < (min) + (b)) | ||
| 173 | |||
| 174 | /* Return 1 if - A would overflow in [MIN,MAX] arithmetic. | ||
| 175 | See above for restrictions. */ | ||
| 176 | #define INT_NEGATE_RANGE_OVERFLOW(a, min, max) \ | ||
| 177 | ((min) < 0 \ | ||
| 178 | ? (a) < - (max) \ | ||
| 179 | : 0 < (a)) | ||
| 180 | |||
| 181 | /* Return 1 if A * B would overflow in [MIN,MAX] arithmetic. | ||
| 182 | See above for restrictions. */ | ||
| 183 | #define INT_MULTIPLY_RANGE_OVERFLOW(a, b, min, max) \ | ||
| 184 | ((b) < 0 \ | ||
| 185 | ? ((a) < 0 \ | ||
| 186 | ? (a) < (max) / (b) \ | ||
| 187 | : (b) < -1 && (min) / (b) < (a)) \ | ||
| 188 | : (0 < (b) \ | ||
| 189 | && ((a) < 0 \ | ||
| 190 | ? (a) < (min) / (b) \ | ||
| 191 | : (max) / (b) < (a)))) | ||
| 192 | |||
| 193 | /* Return 1 if A / B would overflow in [MIN,MAX] arithmetic. | ||
| 194 | See above for restrictions. Do not check for division by zero. */ | ||
| 195 | #define INT_DIVIDE_RANGE_OVERFLOW(a, b, min, max) \ | ||
| 196 | ((min) < 0 && (b) == -1 && (a) < - (max)) | ||
| 197 | |||
| 198 | /* Return 1 if A % B would overflow in [MIN,MAX] arithmetic. | ||
| 199 | See above for restrictions. Do not check for division by zero. | ||
| 200 | Mathematically, % should never overflow, but on x86-like hosts | ||
| 201 | INT_MIN % -1 traps, and the C standard permits this, so treat this | ||
| 202 | as an overflow too. */ | ||
| 203 | #define INT_REMAINDER_RANGE_OVERFLOW(a, b, min, max) \ | ||
| 204 | INT_DIVIDE_RANGE_OVERFLOW (a, b, min, max) | ||
| 205 | |||
| 206 | /* Return 1 if A << B would overflow in [MIN,MAX] arithmetic. | ||
| 207 | See above for restrictions. Here, MIN and MAX are for A only, and B need | ||
| 208 | not be of the same type as the other arguments. The C standard says that | ||
| 209 | behavior is undefined for shifts unless 0 <= B < wordwidth, and that when | ||
| 210 | A is negative then A << B has undefined behavior and A >> B has | ||
| 211 | implementation-defined behavior, but do not check these other | ||
| 212 | restrictions. */ | ||
| 213 | #define INT_LEFT_SHIFT_RANGE_OVERFLOW(a, b, min, max) \ | ||
| 214 | ((a) < 0 \ | ||
| 215 | ? (a) < (min) >> (b) \ | ||
| 216 | : (max) >> (b) < (a)) | ||
| 217 | |||
| 218 | |||
| 219 | /* The _GL*_OVERFLOW macros have the same restrictions as the | ||
| 220 | *_RANGE_OVERFLOW macros, except that they do not assume that operands | ||
| 221 | (e.g., A and B) have the same type as MIN and MAX. Instead, they assume | ||
| 222 | that the result (e.g., A + B) has that type. */ | ||
| 223 | #define _GL_ADD_OVERFLOW(a, b, min, max) \ | ||
| 224 | ((min) < 0 ? INT_ADD_RANGE_OVERFLOW (a, b, min, max) \ | ||
| 225 | : (a) < 0 ? (b) <= (a) + (b) \ | ||
| 226 | : (b) < 0 ? (a) <= (a) + (b) \ | ||
| 227 | : (a) + (b) < (b)) | ||
| 228 | #define _GL_SUBTRACT_OVERFLOW(a, b, min, max) \ | ||
| 229 | ((min) < 0 ? INT_SUBTRACT_RANGE_OVERFLOW (a, b, min, max) \ | ||
| 230 | : (a) < 0 ? 1 \ | ||
| 231 | : (b) < 0 ? (a) - (b) <= (a) \ | ||
| 232 | : (a) < (b)) | ||
| 233 | #define _GL_MULTIPLY_OVERFLOW(a, b, min, max) \ | ||
| 234 | (((min) == 0 && (((a) < 0 && 0 < (b)) || ((b) < 0 && 0 < (a)))) \ | ||
| 235 | || INT_MULTIPLY_RANGE_OVERFLOW (a, b, min, max)) | ||
| 236 | #define _GL_DIVIDE_OVERFLOW(a, b, min, max) \ | ||
| 237 | ((min) < 0 ? (b) == _GL_INT_CONVERT (min, -1) && (a) < - (max) \ | ||
| 238 | : (a) < 0 ? (b) <= (a) + (b) - 1 \ | ||
| 239 | : (b) < 0 && (a) + (b) <= (a)) | ||
| 240 | #define _GL_REMAINDER_OVERFLOW(a, b, min, max) \ | ||
| 241 | ((min) < 0 ? (b) == _GL_INT_CONVERT (min, -1) && (a) < - (max) \ | ||
| 242 | : (a) < 0 ? (a) % (b) != ((max) - (b) + 1) % (b) \ | ||
| 243 | : (b) < 0 && ! _GL_UNSIGNED_NEG_MULTIPLE (a, b, max)) | ||
| 244 | |||
| 245 | /* Return a nonzero value if A is a mathematical multiple of B, where | ||
| 246 | A is unsigned, B is negative, and MAX is the maximum value of A's | ||
| 247 | type. A's type must be the same as (A % B)'s type. Normally (A % | ||
| 248 | -B == 0) suffices, but things get tricky if -B would overflow. */ | ||
| 249 | #define _GL_UNSIGNED_NEG_MULTIPLE(a, b, max) \ | ||
| 250 | (((b) < -_GL_SIGNED_INT_MAXIMUM (b) \ | ||
| 251 | ? (_GL_SIGNED_INT_MAXIMUM (b) == (max) \ | ||
| 252 | ? (a) \ | ||
| 253 | : (a) % (_GL_INT_CONVERT (a, _GL_SIGNED_INT_MAXIMUM (b)) + 1)) \ | ||
| 254 | : (a) % - (b)) \ | ||
| 255 | == 0) | ||
| 256 | |||
| 257 | |||
| 258 | /* Integer overflow checks. | ||
| 259 | |||
| 260 | The INT_<op>_OVERFLOW macros return 1 if the corresponding C operators | ||
| 261 | might not yield numerically correct answers due to arithmetic overflow. | ||
| 262 | They work correctly on all known practical hosts, and do not rely | ||
| 263 | on undefined behavior due to signed arithmetic overflow. | ||
| 264 | |||
| 265 | Example usage: | ||
| 266 | |||
| 267 | long int i = ...; | ||
| 268 | long int j = ...; | ||
| 269 | if (INT_MULTIPLY_OVERFLOW (i, j)) | ||
| 270 | printf ("multiply would overflow"); | ||
| 271 | else | ||
| 272 | printf ("product is %ld", i * j); | ||
| 273 | |||
| 274 | These macros do not check for all possible numerical problems or | ||
| 275 | undefined or unspecified behavior: they do not check for division | ||
| 276 | by zero, for bad shift counts, or for shifting negative numbers. | ||
| 277 | |||
| 278 | These macros may evaluate their arguments zero or multiple times, so the | ||
| 279 | arguments should not have side effects. | ||
| 280 | |||
| 281 | These macros are tuned for their last argument being a constant. | ||
| 282 | |||
| 283 | Return 1 if the integer expressions A * B, A - B, -A, A * B, A / B, | ||
| 284 | A % B, and A << B would overflow, respectively. */ | ||
| 285 | |||
| 286 | #define INT_ADD_OVERFLOW(a, b) \ | ||
| 287 | _GL_BINARY_OP_OVERFLOW (a, b, _GL_ADD_OVERFLOW) | ||
| 288 | #define INT_SUBTRACT_OVERFLOW(a, b) \ | ||
| 289 | _GL_BINARY_OP_OVERFLOW (a, b, _GL_SUBTRACT_OVERFLOW) | ||
| 290 | #define INT_NEGATE_OVERFLOW(a) \ | ||
| 291 | INT_NEGATE_RANGE_OVERFLOW (a, _GL_INT_MINIMUM (a), _GL_INT_MAXIMUM (a)) | ||
| 292 | #define INT_MULTIPLY_OVERFLOW(a, b) \ | ||
| 293 | _GL_BINARY_OP_OVERFLOW (a, b, _GL_MULTIPLY_OVERFLOW) | ||
| 294 | #define INT_DIVIDE_OVERFLOW(a, b) \ | ||
| 295 | _GL_BINARY_OP_OVERFLOW (a, b, _GL_DIVIDE_OVERFLOW) | ||
| 296 | #define INT_REMAINDER_OVERFLOW(a, b) \ | ||
| 297 | _GL_BINARY_OP_OVERFLOW (a, b, _GL_REMAINDER_OVERFLOW) | ||
| 298 | #define INT_LEFT_SHIFT_OVERFLOW(a, b) \ | ||
| 299 | INT_LEFT_SHIFT_RANGE_OVERFLOW (a, b, \ | ||
| 300 | _GL_INT_MINIMUM (a), _GL_INT_MAXIMUM (a)) | ||
| 301 | |||
| 302 | /* Return 1 if the expression A <op> B would overflow, | ||
| 303 | where OP_RESULT_OVERFLOW (A, B, MIN, MAX) does the actual test, | ||
| 304 | assuming MIN and MAX are the minimum and maximum for the result type. | ||
| 305 | |||
| 306 | This macro assumes that A | B is a valid integer if both A and B are, | ||
| 307 | which is true of all known practical hosts. If this is a problem | ||
| 308 | for you, please let us know how to fix it for your host. */ | ||
| 309 | #define _GL_BINARY_OP_OVERFLOW(a, b, op_result_overflow) \ | ||
| 310 | op_result_overflow (a, b, \ | ||
| 311 | _GL_INT_MINIMUM ((a) | (b)), \ | ||
| 312 | _GL_INT_MAXIMUM ((a) | (b))) | ||
| 85 | 313 | ||
| 86 | #endif /* GL_INTPROPS_H */ | 314 | #endif /* _GL_INTPROPS_H */ |
diff --git a/lib/unistd.in.h b/lib/unistd.in.h index 3b58d0f42a5..59dd5709877 100644 --- a/lib/unistd.in.h +++ b/lib/unistd.in.h | |||
| @@ -871,6 +871,22 @@ _GL_WARN_ON_USE (endusershell, "endusershell is unportable - " | |||
| 871 | #endif | 871 | #endif |
| 872 | 872 | ||
| 873 | 873 | ||
| 874 | #if @GNULIB_GROUP_MEMBER@ | ||
| 875 | /* Determine whether group id is in calling user's group list. */ | ||
| 876 | # if !@HAVE_GROUP_MEMBER@ | ||
| 877 | _GL_FUNCDECL_SYS (group_member, int, (gid_t gid)); | ||
| 878 | # endif | ||
| 879 | _GL_CXXALIAS_SYS (group_member, int, (gid_t gid)); | ||
| 880 | _GL_CXXALIASWARN (group_member); | ||
| 881 | #elif defined GNULIB_POSIXCHECK | ||
| 882 | # undef group_member | ||
| 883 | # if HAVE_RAW_DECL_GROUP_MEMBER | ||
| 884 | _GL_WARN_ON_USE (group_member, "group_member is unportable - " | ||
| 885 | "use gnulib module group-member for portability"); | ||
| 886 | # endif | ||
| 887 | #endif | ||
| 888 | |||
| 889 | |||
| 874 | #if @GNULIB_LCHOWN@ | 890 | #if @GNULIB_LCHOWN@ |
| 875 | /* Change the owner of FILE to UID (if UID is not -1) and the group of FILE | 891 | /* Change the owner of FILE to UID (if UID is not -1) and the group of FILE |
| 876 | to GID (if GID is not -1). Do not follow symbolic links. | 892 | to GID (if GID is not -1). Do not follow symbolic links. |
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 844fcaad833..15bd4b190b2 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,42 @@ | |||
| 1 | 2011-05-18 Michael Albinus <michael.albinus@gmx.de> | ||
| 2 | |||
| 3 | * net/tramp.el (tramp-process-actions): Set "first-password-request" | ||
| 4 | property for the correct connection in case of multihops. | ||
| 5 | |||
| 6 | 2011-05-18 Glenn Morris <rgm@gnu.org> | ||
| 7 | |||
| 8 | * emacs-lisp/authors.el (authors-fixed-entries): Remove fakemail.c. | ||
| 9 | * mail/sendmail.el (sendmail-program): Fall back to just "sendmail". | ||
| 10 | |||
| 11 | Rationalize calendar handling of day and month abbrev-arrays. | ||
| 12 | * calendar/calendar.el (calendar-customized-p): New function. | ||
| 13 | (calendar-abbrev-construct, calendar-make-alist): Change what it does. | ||
| 14 | (calendar-day-name-array, calendar-month-name-array): Doc fix. | ||
| 15 | Add :set function. | ||
| 16 | (calendar-abbrev-length, calendar-day-abbrev-array) | ||
| 17 | (calendar-month-abbrev-array): Make defcustoms, with appropriate :set. | ||
| 18 | (calendar-day-abbrev-array, calendar-month-abbrev-array): | ||
| 19 | Elements may no longer be nil. | ||
| 20 | (calendar-day-name, calendar-month-name): | ||
| 21 | Update for changed nature of abbrev arrays. | ||
| 22 | * calendar/diary-lib.el (diary-name-pattern): | ||
| 23 | Update for changed nature of abbrev arrays. | ||
| 24 | (diary-mark-entries-1): Update calendar-make-alist calls. | ||
| 25 | (diary-font-lock-date-forms): Doc fix for changed abbrev arrays. | ||
| 26 | * calendar/cal-html.el (cal-html-day-abbrev-array): | ||
| 27 | Simply inherit from calendar-day-abbrev-array. | ||
| 28 | |||
| 29 | 2011-05-17 Stefan Monnier <monnier@iro.umontreal.ca> | ||
| 30 | |||
| 31 | * progmodes/grep.el (grep-mode): Disable default | ||
| 32 | compilation-directory-matcher setting (bug#8684). | ||
| 33 | |||
| 34 | 2011-05-17 Michael Albinus <michael.albinus@gmx.de> | ||
| 35 | |||
| 36 | * net/tramp.el (tramp-handle-insert-file-contents): Use "dd" | ||
| 37 | instead of "head" and "tail". There were problems with SunOS 5.9, | ||
| 38 | and it performs better. | ||
| 39 | |||
| 1 | 2011-05-17 Glenn Morris <rgm@gnu.org> | 40 | 2011-05-17 Glenn Morris <rgm@gnu.org> |
| 2 | 41 | ||
| 3 | * mail/mail-utils.el (mail-dont-reply-to): Silence compiler. | 42 | * mail/mail-utils.el (mail-dont-reply-to): Silence compiler. |
| @@ -75,7 +114,7 @@ | |||
| 75 | (feedmail-debug-sit-for, feedmail-queue-express-hook): New options. | 114 | (feedmail-debug-sit-for, feedmail-queue-express-hook): New options. |
| 76 | (feedmail-sender-line, feedmail-from-line) | 115 | (feedmail-sender-line, feedmail-from-line) |
| 77 | (feedmail-fiddle-headers-upwardly, feedmail-enable-spray) | 116 | (feedmail-fiddle-headers-upwardly, feedmail-enable-spray) |
| 78 | (feedmail-spray-this-address, ) | 117 | (feedmail-spray-this-address) |
| 79 | (feedmail-spray-address-fiddle-plex-list) | 118 | (feedmail-spray-address-fiddle-plex-list) |
| 80 | (feedmail-queue-use-send-time-for-date) | 119 | (feedmail-queue-use-send-time-for-date) |
| 81 | (feedmail-queue-use-send-time-for-message-id) | 120 | (feedmail-queue-use-send-time-for-message-id) |
| @@ -160,20 +199,20 @@ | |||
| 160 | 199 | ||
| 161 | 2011-05-13 Ulf Jasper <ulf.jasper@web.de> | 200 | 2011-05-13 Ulf Jasper <ulf.jasper@web.de> |
| 162 | 201 | ||
| 163 | * net/newst-treeview.el (newsticker-treeview-face): Changed default | 202 | * net/newst-treeview.el (newsticker-treeview-face): Change default |
| 164 | family from helvetica to sans. | 203 | family from helvetica to sans. |
| 165 | (newsticker-treeview-tool-bar-map): Moved tool-bar icons to | 204 | (newsticker-treeview-tool-bar-map): Move tool-bar icons to |
| 166 | etc/images/newsticker. | 205 | etc/images/newsticker. |
| 167 | 206 | ||
| 168 | * net/newst-reader.el (newsticker-feed-face): Changed default | 207 | * net/newst-reader.el (newsticker-feed-face): Change default |
| 169 | family from helvetica to sans. | 208 | family from helvetica to sans. |
| 170 | 209 | ||
| 171 | * net/newst-plainview.el (newsticker-new-item-face) | 210 | * net/newst-plainview.el (newsticker-new-item-face) |
| 172 | (newsticker-old-item-face, newsticker-immortal-item-face) | 211 | (newsticker-old-item-face, newsticker-immortal-item-face) |
| 173 | (newsticker-obsolete-item-face, newsticker-date-face) | 212 | (newsticker-obsolete-item-face, newsticker-date-face) |
| 174 | (newsticker-statistics-face): Changed default family from | 213 | (newsticker-statistics-face): Change default family from |
| 175 | helvetica to sans. | 214 | helvetica to sans. |
| 176 | (newsticker--plainview-tool-bar-map): Moved tool-bar icons to | 215 | (newsticker--plainview-tool-bar-map): Move tool-bar icons to |
| 177 | etc/images/newsticker. | 216 | etc/images/newsticker. |
| 178 | 217 | ||
| 179 | * net/newst-backend.el (newsticker--do-run-auto-mark-filter), | 218 | * net/newst-backend.el (newsticker--do-run-auto-mark-filter), |
| @@ -304,7 +343,7 @@ | |||
| 304 | * textmodes/reftex-dcr.el (reftex-view-crossref): at at -> at a | 343 | * textmodes/reftex-dcr.el (reftex-view-crossref): at at -> at a |
| 305 | 344 | ||
| 306 | 2011-05-10 Glenn Morris <rgm@gnu.org> | 345 | 2011-05-10 Glenn Morris <rgm@gnu.org> |
| 307 | Stefan Monnier <monnier@iro.umontreal.ca> | 346 | Stefan Monnier <monnier@iro.umontreal.ca> |
| 308 | 347 | ||
| 309 | * files.el (hack-one-local-variable-eval-safep): | 348 | * files.el (hack-one-local-variable-eval-safep): |
| 310 | Consider "eval: (foo-mode)" to be safe. (Bug#8613) | 349 | Consider "eval: (foo-mode)" to be safe. (Bug#8613) |
diff --git a/lisp/calendar/cal-html.el b/lisp/calendar/cal-html.el index bcc19ccda0b..580b953170c 100644 --- a/lisp/calendar/cal-html.el +++ b/lisp/calendar/cal-html.el | |||
| @@ -54,11 +54,16 @@ | |||
| 54 | :type 'integer | 54 | :type 'integer |
| 55 | :group 'calendar-html) | 55 | :group 'calendar-html) |
| 56 | 56 | ||
| 57 | (defcustom cal-html-day-abbrev-array | 57 | (defcustom cal-html-day-abbrev-array calendar-day-abbrev-array |
| 58 | (calendar-abbrev-construct calendar-day-abbrev-array | ||
| 59 | calendar-day-name-array) | ||
| 60 | "Array of seven strings for abbreviated day names (starting with Sunday)." | 58 | "Array of seven strings for abbreviated day names (starting with Sunday)." |
| 61 | :type '(vector string string string string string string string) | 59 | :set-after '(calendar-day-abbrev-array) |
| 60 | :type '(vector (string :tag "Sun") | ||
| 61 | (string :tag "Mon") | ||
| 62 | (string :tag "Tue") | ||
| 63 | (string :tag "Wed") | ||
| 64 | (string :tag "Thu") | ||
| 65 | (string :tag "Fri") | ||
| 66 | (string :tag "Sat")) | ||
| 62 | :group 'calendar-html) | 67 | :group 'calendar-html) |
| 63 | 68 | ||
| 64 | (defcustom cal-html-css-default | 69 | (defcustom cal-html-css-default |
diff --git a/lisp/calendar/calendar.el b/lisp/calendar/calendar.el index e81eb554458..fa19d1ffe14 100644 --- a/lisp/calendar/calendar.el +++ b/lisp/calendar/calendar.el | |||
| @@ -2034,18 +2034,40 @@ is a string to insert in the minibuffer before reading." | |||
| 2034 | value)) | 2034 | value)) |
| 2035 | 2035 | ||
| 2036 | 2036 | ||
| 2037 | (defvar calendar-abbrev-length 3 | 2037 | (defun calendar-customized-p (symbol) |
| 2038 | "*Length of abbreviations to be used for day and month names. | 2038 | "Return non-nil if SYMBOL has been customized." |
| 2039 | See also `calendar-day-abbrev-array' and `calendar-month-abbrev-array'.") | 2039 | (and (default-boundp symbol) |
| 2040 | (let ((standard (get symbol 'standard-value))) | ||
| 2041 | (and standard | ||
| 2042 | (not (equal (eval (car standard)) (default-value symbol))))))) | ||
| 2043 | |||
| 2044 | (defun calendar-abbrev-construct (full) | ||
| 2045 | "From sequence FULL, return a vector of abbreviations. | ||
| 2046 | Each abbreviation is no longer than `calendar-abbrev-length' characters." | ||
| 2047 | (apply 'vector (mapcar | ||
| 2048 | (lambda (f) | ||
| 2049 | (substring f 0 (min calendar-abbrev-length (length f)))) | ||
| 2050 | full))) | ||
| 2040 | 2051 | ||
| 2041 | ;; FIXME does it have to start from Sunday? | ||
| 2042 | (defcustom calendar-day-name-array | 2052 | (defcustom calendar-day-name-array |
| 2043 | ["Sunday" "Monday" "Tuesday" "Wednesday" "Thursday" "Friday" "Saturday"] | 2053 | ["Sunday" "Monday" "Tuesday" "Wednesday" "Thursday" "Friday" "Saturday"] |
| 2044 | "Array of capitalized strings giving, in order, the day names. | 2054 | "Array of capitalized strings giving, in order from Sunday, the day names. |
| 2045 | The first two characters of each string will be used to head the | 2055 | The first two characters of each string will be used to head the |
| 2046 | day columns in the calendar. See also the variable | 2056 | day columns in the calendar. |
| 2047 | `calendar-day-abbrev-array'." | 2057 | If you change this without using customize after the calendar has loaded, |
| 2058 | then you may also want to change `calendar-day-abbrev-array'." | ||
| 2048 | :group 'calendar | 2059 | :group 'calendar |
| 2060 | :initialize 'custom-initialize-default | ||
| 2061 | :set (lambda (symbol value) | ||
| 2062 | (let ((dcustomized (calendar-customized-p 'calendar-day-abbrev-array)) | ||
| 2063 | (hcustomized (calendar-customized-p 'cal-html-day-abbrev-array))) | ||
| 2064 | (set symbol value) | ||
| 2065 | (or dcustomized | ||
| 2066 | (setq calendar-day-abbrev-array | ||
| 2067 | (calendar-abbrev-construct calendar-day-name-array))) | ||
| 2068 | (and (not hcustomized) | ||
| 2069 | (boundp 'cal-html-day-abbrev-array) | ||
| 2070 | (setq cal-html-day-abbrev-array calendar-day-abbrev-array)))) | ||
| 2049 | :type '(vector (string :tag "Sunday") | 2071 | :type '(vector (string :tag "Sunday") |
| 2050 | (string :tag "Monday") | 2072 | (string :tag "Monday") |
| 2051 | (string :tag "Tuesday") | 2073 | (string :tag "Tuesday") |
| @@ -2054,23 +2076,74 @@ day columns in the calendar. See also the variable | |||
| 2054 | (string :tag "Friday") | 2076 | (string :tag "Friday") |
| 2055 | (string :tag "Saturday"))) | 2077 | (string :tag "Saturday"))) |
| 2056 | 2078 | ||
| 2057 | (defvar calendar-day-abbrev-array | 2079 | (defcustom calendar-abbrev-length 3 |
| 2058 | [nil nil nil nil nil nil nil] | 2080 | "Default length of abbreviations to use for day and month names. |
| 2059 | "*Array of capitalized strings giving the abbreviated day names. | 2081 | If you change this without using customize after the calendar has loaded, |
| 2082 | then you may also want to change `calendar-day-abbrev-array' and | ||
| 2083 | `calendar-month-abbrev-array'." | ||
| 2084 | :group 'calendar | ||
| 2085 | :initialize 'custom-initialize-default | ||
| 2086 | :set (lambda (symbol value) | ||
| 2087 | (let ((dcustomized (calendar-customized-p 'calendar-day-abbrev-array)) | ||
| 2088 | (mcustomized (calendar-customized-p | ||
| 2089 | 'calendar-month-abbrev-array)) | ||
| 2090 | (hcustomized (calendar-customized-p 'cal-html-day-abbrev-array))) | ||
| 2091 | (set symbol value) | ||
| 2092 | (or dcustomized | ||
| 2093 | (setq calendar-day-abbrev-array | ||
| 2094 | (calendar-abbrev-construct calendar-day-name-array))) | ||
| 2095 | (or mcustomized | ||
| 2096 | (setq calendar-month-abbrev-array | ||
| 2097 | (calendar-abbrev-construct calendar-month-name-array))) | ||
| 2098 | (and (not hcustomized) | ||
| 2099 | (boundp 'cal-html-day-abbrev-array) | ||
| 2100 | (setq cal-html-day-abbrev-array calendar-day-abbrev-array)))) | ||
| 2101 | :type 'integer) | ||
| 2102 | |||
| 2103 | (defcustom calendar-day-abbrev-array | ||
| 2104 | (calendar-abbrev-construct calendar-day-name-array) | ||
| 2105 | "Array of capitalized strings giving the abbreviated day names. | ||
| 2060 | The order should be the same as that of the full names specified | 2106 | The order should be the same as that of the full names specified |
| 2061 | in `calendar-day-name-array'. These abbreviations may be used | 2107 | in `calendar-day-name-array'. These abbreviations may be used |
| 2062 | instead of the full names in the diary file. Do not include a | 2108 | instead of the full names in the diary file. Do not include a |
| 2063 | trailing `.' in the strings specified in this variable, though | 2109 | trailing `.' in the strings specified in this variable, though |
| 2064 | you may use such in the diary file. If any element of this array | 2110 | you may use such in the diary file. By default, each string is |
| 2065 | is nil, then the abbreviation will be constructed as the first | 2111 | the first `calendar-abbrev-length' characters of the corresponding |
| 2066 | `calendar-abbrev-length' characters of the corresponding full name.") | 2112 | full name." |
| 2113 | :group 'calendar | ||
| 2114 | :initialize 'custom-initialize-default | ||
| 2115 | :set-after '(calendar-abbrev-length calendar-day-name-array) | ||
| 2116 | :set (lambda (symbol value) | ||
| 2117 | (let ((hcustomized (calendar-customized-p 'cal-html-day-abbrev-array))) | ||
| 2118 | (set symbol value) | ||
| 2119 | (and (not hcustomized) | ||
| 2120 | (boundp 'cal-html-day-abbrev-array) | ||
| 2121 | (setq cal-html-day-abbrev-array calendar-day-abbrev-array)))) | ||
| 2122 | :type '(vector (string :tag "Sun") | ||
| 2123 | (string :tag "Mon") | ||
| 2124 | (string :tag "Tue") | ||
| 2125 | (string :tag "Wed") | ||
| 2126 | (string :tag "Thu") | ||
| 2127 | (string :tag "Fri") | ||
| 2128 | (string :tag "Sat")) | ||
| 2129 | ;; Made defcustom, changed defaults from nil nil... | ||
| 2130 | :version "24.1") | ||
| 2067 | 2131 | ||
| 2068 | (defcustom calendar-month-name-array | 2132 | (defcustom calendar-month-name-array |
| 2069 | ["January" "February" "March" "April" "May" "June" | 2133 | ["January" "February" "March" "April" "May" "June" |
| 2070 | "July" "August" "September" "October" "November" "December"] | 2134 | "July" "August" "September" "October" "November" "December"] |
| 2071 | "Array of capitalized strings giving, in order, the month names. | 2135 | "Array of capitalized strings giving, in order, the month names. |
| 2072 | See also the variable `calendar-month-abbrev-array'." | 2136 | If you change this without using customize after the calendar has loaded, |
| 2137 | then you may also want to change `calendar-month-abbrev-array'." | ||
| 2073 | :group 'calendar | 2138 | :group 'calendar |
| 2139 | :initialize 'custom-initialize-default | ||
| 2140 | :set (lambda (symbol value) | ||
| 2141 | (let ((mcustomized (calendar-customized-p | ||
| 2142 | 'calendar-month-abbrev-array))) | ||
| 2143 | (set symbol value) | ||
| 2144 | (or mcustomized | ||
| 2145 | (setq calendar-month-abbrev-array | ||
| 2146 | (calendar-abbrev-construct calendar-month-name-array))))) | ||
| 2074 | :type '(vector (string :tag "January") | 2147 | :type '(vector (string :tag "January") |
| 2075 | (string :tag "February") | 2148 | (string :tag "February") |
| 2076 | (string :tag "March") | 2149 | (string :tag "March") |
| @@ -2084,46 +2157,54 @@ See also the variable `calendar-month-abbrev-array'." | |||
| 2084 | (string :tag "November") | 2157 | (string :tag "November") |
| 2085 | (string :tag "December"))) | 2158 | (string :tag "December"))) |
| 2086 | 2159 | ||
| 2087 | (defvar calendar-month-abbrev-array | 2160 | (defcustom calendar-month-abbrev-array |
| 2088 | [nil nil nil nil nil nil nil nil nil nil nil nil] | 2161 | (calendar-abbrev-construct calendar-month-name-array) |
| 2089 | "*Array of capitalized strings giving the abbreviated month names. | 2162 | "Array of capitalized strings giving the abbreviated month names. |
| 2090 | The order should be the same as that of the full names specified | 2163 | The order should be the same as that of the full names specified |
| 2091 | in `calendar-month-name-array'. These abbreviations are used in | 2164 | in `calendar-month-name-array'. These abbreviations are used in |
| 2092 | the calendar menu entries, and can also be used in the diary | 2165 | the calendar menu entries, and can also be used in the diary |
| 2093 | file. Do not include a trailing `.' in the strings specified in | 2166 | file. Do not include a trailing `.' in the strings specified in |
| 2094 | this variable, though you may use such in the diary file. If any | 2167 | this variable, though you may use such in the diary file. By |
| 2095 | element of this array is nil, then the abbreviation will be | 2168 | default, each string is the first ``calendar-abbrev-length' |
| 2096 | constructed as the first `calendar-abbrev-length' characters of the | 2169 | characters of the corresponding full name." |
| 2097 | corresponding full name.") | 2170 | :group 'calendar |
| 2098 | 2171 | :set-after '(calendar-abbrev-length calendar-month-name-array) | |
| 2099 | (defun calendar-make-alist (sequence &optional start-index filter abbrevs) | 2172 | :type '(vector (string :tag "Jan") |
| 2100 | "Make an assoc list corresponding to SEQUENCE. | 2173 | (string :tag "Feb") |
| 2101 | Each element of sequence will be associated with an integer, starting | 2174 | (string :tag "Mar") |
| 2102 | from 1, or from START-INDEX if that is non-nil. If a sequence ABBREVS | 2175 | (string :tag "Apr") |
| 2103 | is supplied, the function `calendar-abbrev-construct' is used to | 2176 | (string :tag "May") |
| 2104 | construct abbreviations corresponding to the elements in SEQUENCE. | 2177 | (string :tag "Jun") |
| 2105 | Each abbreviation is entered into the alist with the same | 2178 | (string :tag "Jul") |
| 2106 | association index as the full name it represents. | 2179 | (string :tag "Aug") |
| 2107 | If FILTER is provided, apply it to each key in the alist." | 2180 | (string :tag "Sep") |
| 2108 | (let ((index 0) | 2181 | (string :tag "Oct") |
| 2109 | (offset (or start-index 1)) | 2182 | (string :tag "Nov") |
| 2110 | (aseq (if abbrevs (calendar-abbrev-construct abbrevs sequence))) | 2183 | (string :tag "Dec")) |
| 2111 | (aseqp (if abbrevs (calendar-abbrev-construct abbrevs sequence | 2184 | ;; Made defcustom, changed defaults from nil nil... |
| 2112 | 'period))) | 2185 | :version "24.1") |
| 2113 | alist elem) | 2186 | |
| 2114 | (dotimes (i (length sequence) (reverse alist)) | 2187 | (defun calendar-make-alist (sequence &optional start-index filter |
| 2115 | (setq index (+ i offset) | 2188 | &rest sequences) |
| 2116 | elem (elt sequence i) | 2189 | "Return an association list corresponding to SEQUENCE. |
| 2117 | alist | 2190 | Associates each element of SEQUENCE with an incremented integer, |
| 2118 | (cons (cons (if filter (funcall filter elem) elem) index) alist)) | 2191 | starting from START-INDEX (default 1). Applies the function FILTER, |
| 2119 | (if aseq | 2192 | if provided, to each key in the alist. Repeats the process, with |
| 2120 | (setq elem (elt aseq i) | 2193 | indices starting from START-INDEX each time, for any remaining |
| 2121 | alist (cons (cons (if filter (funcall filter elem) elem) | 2194 | arguments SEQUENCES." |
| 2122 | index) alist))) | 2195 | (or start-index (setq start-index 1)) |
| 2123 | (if aseqp | 2196 | (let (index alist) |
| 2124 | (setq elem (elt aseqp i) | 2197 | (mapc (lambda (seq) |
| 2125 | alist (cons (cons (if filter (funcall filter elem) elem) | 2198 | (setq index start-index) |
| 2126 | index) alist)))))) | 2199 | (mapc (lambda (elem) |
| 2200 | (setq alist (cons | ||
| 2201 | (cons (if filter (funcall filter elem) elem) | ||
| 2202 | index) | ||
| 2203 | alist) | ||
| 2204 | index (1+ index))) | ||
| 2205 | seq)) | ||
| 2206 | (append (list sequence) sequences)) | ||
| 2207 | (reverse alist))) | ||
| 2127 | 2208 | ||
| 2128 | (defun calendar-read-date (&optional noday) | 2209 | (defun calendar-read-date (&optional noday) |
| 2129 | "Prompt for Gregorian date. Return a list (month day year). | 2210 | "Prompt for Gregorian date. Return a list (month day year). |
| @@ -2162,23 +2243,6 @@ Negative years are interpreted as years BC; -1 being 1 BC, and so on." | |||
| 2162 | (+ (* 12 (- yr2 yr1)) | 2243 | (+ (* 12 (- yr2 yr1)) |
| 2163 | (- mon2 mon1))) | 2244 | (- mon2 mon1))) |
| 2164 | 2245 | ||
| 2165 | (defun calendar-abbrev-construct (abbrev full &optional period) | ||
| 2166 | "Internal calendar function to return a complete abbreviation array. | ||
| 2167 | ABBREV is an array of abbreviations, FULL the corresponding array | ||
| 2168 | of full names. The return value is the ABBREV array, with any nil | ||
| 2169 | elements replaced by the first three characters taken from the | ||
| 2170 | corresponding element of FULL. If optional argument PERIOD is non-nil, | ||
| 2171 | each element returned has a final `.' character." | ||
| 2172 | (let (elem array name) | ||
| 2173 | (dotimes (i (length full)) | ||
| 2174 | (setq name (aref full i) | ||
| 2175 | elem (or (aref abbrev i) | ||
| 2176 | (substring name 0 | ||
| 2177 | (min calendar-abbrev-length (length name)))) | ||
| 2178 | elem (format "%s%s" elem (if period "." "")) | ||
| 2179 | array (append array (list elem)))) | ||
| 2180 | (vconcat array))) | ||
| 2181 | |||
| 2182 | (defvar calendar-font-lock-keywords | 2246 | (defvar calendar-font-lock-keywords |
| 2183 | `((,(concat (regexp-opt (mapcar 'identity calendar-month-name-array) t) | 2247 | `((,(concat (regexp-opt (mapcar 'identity calendar-month-name-array) t) |
| 2184 | " -?[0-9]+") | 2248 | " -?[0-9]+") |
| @@ -2204,10 +2268,7 @@ be an integer in the range 0 to 6 corresponding to the day of the | |||
| 2204 | week. Day names are taken from the variable `calendar-day-name-array', | 2268 | week. Day names are taken from the variable `calendar-day-name-array', |
| 2205 | unless the optional argument ABBREV is non-nil, in which case | 2269 | unless the optional argument ABBREV is non-nil, in which case |
| 2206 | the variable `calendar-day-abbrev-array' is used." | 2270 | the variable `calendar-day-abbrev-array' is used." |
| 2207 | (aref (if abbrev | 2271 | (aref (if abbrev calendar-day-abbrev-array calendar-day-name-array) |
| 2208 | (calendar-abbrev-construct calendar-day-abbrev-array | ||
| 2209 | calendar-day-name-array) | ||
| 2210 | calendar-day-name-array) | ||
| 2211 | (if absolute date (calendar-day-of-week date)))) | 2272 | (if absolute date (calendar-day-of-week date)))) |
| 2212 | 2273 | ||
| 2213 | (defun calendar-month-name (month &optional abbrev) | 2274 | (defun calendar-month-name (month &optional abbrev) |
| @@ -2216,10 +2277,7 @@ Months are numbered from one. Month names are taken from the | |||
| 2216 | variable `calendar-month-name-array', unless the optional | 2277 | variable `calendar-month-name-array', unless the optional |
| 2217 | argument ABBREV is non-nil, in which case | 2278 | argument ABBREV is non-nil, in which case |
| 2218 | `calendar-month-abbrev-array' is used." | 2279 | `calendar-month-abbrev-array' is used." |
| 2219 | (aref (if abbrev | 2280 | (aref (if abbrev calendar-month-abbrev-array calendar-month-name-array) |
| 2220 | (calendar-abbrev-construct calendar-month-abbrev-array | ||
| 2221 | calendar-month-name-array) | ||
| 2222 | calendar-month-name-array) | ||
| 2223 | (1- month))) | 2281 | (1- month))) |
| 2224 | 2282 | ||
| 2225 | (defun calendar-day-of-week (date) | 2283 | (defun calendar-day-of-week (date) |
diff --git a/lisp/calendar/diary-lib.el b/lisp/calendar/diary-lib.el index 62da7579d50..f21247e9c93 100644 --- a/lisp/calendar/diary-lib.el +++ b/lisp/calendar/diary-lib.el | |||
| @@ -1250,19 +1250,15 @@ should ensure that all relevant variables are set. | |||
| 1250 | 1250 | ||
| 1251 | (defun diary-name-pattern (string-array &optional abbrev-array paren) | 1251 | (defun diary-name-pattern (string-array &optional abbrev-array paren) |
| 1252 | "Return a regexp matching the strings in the array STRING-ARRAY. | 1252 | "Return a regexp matching the strings in the array STRING-ARRAY. |
| 1253 | If the optional argument ABBREV-ARRAY is present, then the function | 1253 | If the optional argument ABBREV-ARRAY is present, the regexp |
| 1254 | `calendar-abbrev-construct' is used to construct abbreviations from the | 1254 | also matches the supplied abbreviations, with or without final `.' |
| 1255 | two supplied arrays. The returned regexp will then also match these | 1255 | characters. If the optional argument PAREN is non-nil, surrounds |
| 1256 | abbreviations, with or without final `.' characters. If the optional | 1256 | the regexp with parentheses." |
| 1257 | argument PAREN is non-nil, the regexp is surrounded by parentheses." | ||
| 1258 | (regexp-opt (append string-array | 1257 | (regexp-opt (append string-array |
| 1258 | abbrev-array | ||
| 1259 | (if abbrev-array | 1259 | (if abbrev-array |
| 1260 | (calendar-abbrev-construct abbrev-array | 1260 | (mapcar (lambda (e) (format "%s." e)) |
| 1261 | string-array)) | 1261 | abbrev-array)) |
| 1262 | (if abbrev-array | ||
| 1263 | (calendar-abbrev-construct abbrev-array | ||
| 1264 | string-array | ||
| 1265 | 'period)) | ||
| 1266 | nil) | 1262 | nil) |
| 1267 | paren)) | 1263 | paren)) |
| 1268 | 1264 | ||
| @@ -1363,7 +1359,11 @@ function that converts absolute dates to dates of the appropriate type. " | |||
| 1363 | (cdr (assoc-string dd-name | 1359 | (cdr (assoc-string dd-name |
| 1364 | (calendar-make-alist | 1360 | (calendar-make-alist |
| 1365 | calendar-day-name-array | 1361 | calendar-day-name-array |
| 1366 | 0 nil calendar-day-abbrev-array) t)) marks) | 1362 | 0 nil calendar-day-abbrev-array |
| 1363 | (mapcar (lambda (e) | ||
| 1364 | (format "%s." e)) | ||
| 1365 | calendar-day-abbrev-array)) | ||
| 1366 | t)) marks) | ||
| 1367 | (if mm-name | 1367 | (if mm-name |
| 1368 | (setq mm | 1368 | (setq mm |
| 1369 | (if (string-equal mm-name "*") 0 | 1369 | (if (string-equal mm-name "*") 0 |
| @@ -1372,7 +1372,11 @@ function that converts absolute dates to dates of the appropriate type. " | |||
| 1372 | (if months (calendar-make-alist months) | 1372 | (if months (calendar-make-alist months) |
| 1373 | (calendar-make-alist | 1373 | (calendar-make-alist |
| 1374 | calendar-month-name-array | 1374 | calendar-month-name-array |
| 1375 | 1 nil calendar-month-abbrev-array)) t))))) | 1375 | 1 nil calendar-month-abbrev-array |
| 1376 | (mapcar (lambda (e) | ||
| 1377 | (format "%s." e)) | ||
| 1378 | calendar-month-abbrev-array))) | ||
| 1379 | t))))) | ||
| 1376 | (funcall markfunc mm dd yy marks)))))))) | 1380 | (funcall markfunc mm dd yy marks)))))))) |
| 1377 | 1381 | ||
| 1378 | ;;;###cal-autoload | 1382 | ;;;###cal-autoload |
| @@ -2307,11 +2311,10 @@ Prefix argument ARG makes the entry nonmarking." | |||
| 2307 | 2311 | ||
| 2308 | (defun diary-font-lock-date-forms (month-array &optional symbol abbrev-array) | 2312 | (defun diary-font-lock-date-forms (month-array &optional symbol abbrev-array) |
| 2309 | "Create font-lock patterns for `diary-date-forms' using MONTH-ARRAY. | 2313 | "Create font-lock patterns for `diary-date-forms' using MONTH-ARRAY. |
| 2310 | If given, optional SYMBOL must be a prefix to entries. | 2314 | If given, optional SYMBOL must be a prefix to entries. If |
| 2311 | If optional ABBREV-ARRAY is present, the abbreviations constructed | 2315 | optional ABBREV-ARRAY is present, also matches the abbreviations |
| 2312 | from this array by the function `calendar-abbrev-construct' are | 2316 | from this array (with or without a final `.'), in addition to the |
| 2313 | matched (with or without a final `.'), in addition to the full month | 2317 | full month names." |
| 2314 | names." | ||
| 2315 | (let ((dayname (diary-name-pattern calendar-day-name-array | 2318 | (let ((dayname (diary-name-pattern calendar-day-name-array |
| 2316 | calendar-day-abbrev-array t)) | 2319 | calendar-day-abbrev-array t)) |
| 2317 | (monthname (format "\\(%s\\|\\*\\)" | 2320 | (monthname (format "\\(%s\\|\\*\\)" |
diff --git a/lisp/emacs-lisp/authors.el b/lisp/emacs-lisp/authors.el index 163af883334..596b32f24c3 100644 --- a/lisp/emacs-lisp/authors.el +++ b/lisp/emacs-lisp/authors.el | |||
| @@ -437,7 +437,7 @@ Changes to files in this list are not listed.") | |||
| 437 | ;; No longer distributed. | 437 | ;; No longer distributed. |
| 438 | ;;; "vmspaths.h" "build.com" "compile.com" "kepteditor.com" "precomp.com" | 438 | ;;; "vmspaths.h" "build.com" "compile.com" "kepteditor.com" "precomp.com" |
| 439 | ;;; "vmsproc.el" :wrote "logout.com" "mailemacs.com") | 439 | ;;; "vmsproc.el" :wrote "logout.com" "mailemacs.com") |
| 440 | ("Guillermo J. Rozas" :wrote "fakemail.c") | 440 | ;;; ("Guillermo J. Rozas" :wrote "fakemail.c") |
| 441 | ("Wolfgang Rupprecht" :changed "lisp-mode.el" "loadup.el" | 441 | ("Wolfgang Rupprecht" :changed "lisp-mode.el" "loadup.el" |
| 442 | "sort.el" "alloc.c" "callint.c" | 442 | "sort.el" "alloc.c" "callint.c" |
| 443 | ;; config.in renamed from config.h.in; ecrt0.c from crt0.c. | 443 | ;; config.in renamed from config.h.in; ecrt0.c from crt0.c. |
diff --git a/lisp/gnus/ChangeLog b/lisp/gnus/ChangeLog index 068093159e3..66f30f03eff 100644 --- a/lisp/gnus/ChangeLog +++ b/lisp/gnus/ChangeLog | |||
| @@ -1,3 +1,13 @@ | |||
| 1 | 2011-05-18 Teodor Zlatanov <tzz@lifelogs.com> | ||
| 2 | |||
| 3 | * gnus-registry.el (gnus-registry-user-format-function-M): | ||
| 4 | Use `mapconcat'. | ||
| 5 | (gnus-registry-user-format-function-M2): Use to see the full text of | ||
| 6 | the marks. Make "," the mark text separator. | ||
| 7 | |||
| 8 | * nntp.el (nntp-send-authinfo): Use the "force" token for NNTP | ||
| 9 | authentication with auth-source. | ||
| 10 | |||
| 1 | 2011-05-17 Glenn Morris <rgm@gnu.org> | 11 | 2011-05-17 Glenn Morris <rgm@gnu.org> |
| 2 | 12 | ||
| 3 | * gnus-group.el (gnus-import-other-newsrc-file): | 13 | * gnus-group.el (gnus-import-other-newsrc-file): |
diff --git a/lisp/gnus/gnus-registry.el b/lisp/gnus/gnus-registry.el index 25d84b11d41..e0efbaf4f30 100644 --- a/lisp/gnus/gnus-registry.el +++ b/lisp/gnus/gnus-registry.el | |||
| @@ -57,6 +57,16 @@ | |||
| 57 | ;; You should also consider using the nnregistry backend to look up | 57 | ;; You should also consider using the nnregistry backend to look up |
| 58 | ;; articles. See the Gnus manual for more information. | 58 | ;; articles. See the Gnus manual for more information. |
| 59 | 59 | ||
| 60 | ;; Finally, you can put %uM in your summary line format to show the | ||
| 61 | ;; registry marks if you do this: | ||
| 62 | |||
| 63 | ;; show the marks as single characters (see the :char property in | ||
| 64 | ;; `gnus-registry-marks'): | ||
| 65 | ;; (defalias 'gnus-user-format-function-M 'gnus-registry-user-format-function-M) | ||
| 66 | |||
| 67 | ;; show the marks by name (see `gnus-registry-marks'): | ||
| 68 | ;; (defalias 'gnus-user-format-function-M 'gnus-registry-user-format-function-M2) | ||
| 69 | |||
| 60 | ;; TODO: | 70 | ;; TODO: |
| 61 | 71 | ||
| 62 | ;; - get the correct group on spool actions | 72 | ;; - get the correct group on spool actions |
| @@ -887,22 +897,26 @@ Uses `gnus-registry-marks' to find what shortcuts to install." | |||
| 887 | nil | 897 | nil |
| 888 | (cons "Registry Marks" gnus-registry-misc-menus)))))) | 898 | (cons "Registry Marks" gnus-registry-misc-menus)))))) |
| 889 | 899 | ||
| 890 | ;;; use like this: | 900 | ;; use like this: |
| 891 | ;;; (defalias 'gnus-user-format-function-M | 901 | ;; (defalias 'gnus-user-format-function-M 'gnus-registry-user-format-function-M) |
| 892 | ;;; 'gnus-registry-user-format-function-M) | ||
| 893 | (defun gnus-registry-user-format-function-M (headers) | 902 | (defun gnus-registry-user-format-function-M (headers) |
| 903 | "Show the marks for an article by the :char property" | ||
| 904 | (let* ((id (mail-header-message-id headers)) | ||
| 905 | (marks (when id (gnus-registry-get-id-key id 'mark)))) | ||
| 906 | (mapconcat (lambda (mark) | ||
| 907 | (plist-get | ||
| 908 | (cdr-safe | ||
| 909 | (assoc mark gnus-registry-marks)) | ||
| 910 | :char)) | ||
| 911 | marks ""))) | ||
| 912 | |||
| 913 | ;; use like this: | ||
| 914 | ;; (defalias 'gnus-user-format-function-M 'gnus-registry-user-format-function-M2) | ||
| 915 | (defun gnus-registry-user-format-function-M2 (headers) | ||
| 916 | "Show the marks for an article by name" | ||
| 894 | (let* ((id (mail-header-message-id headers)) | 917 | (let* ((id (mail-header-message-id headers)) |
| 895 | (marks (when id (gnus-registry-get-id-key id 'mark)))) | 918 | (marks (when id (gnus-registry-get-id-key id 'mark)))) |
| 896 | (apply 'concat (mapcar (lambda (mark) | 919 | (mapconcat (lambda (mark) (symbol-name mark)) marks ","))) |
| 897 | (let ((c | ||
| 898 | (plist-get | ||
| 899 | (cdr-safe | ||
| 900 | (assoc mark gnus-registry-marks)) | ||
| 901 | :char))) | ||
| 902 | (if c | ||
| 903 | (list c) | ||
| 904 | nil))) | ||
| 905 | marks)))) | ||
| 906 | 920 | ||
| 907 | (defun gnus-registry-read-mark () | 921 | (defun gnus-registry-read-mark () |
| 908 | "Read a mark name from the user with completion." | 922 | "Read a mark name from the user with completion." |
diff --git a/lisp/gnus/nntp.el b/lisp/gnus/nntp.el index cdd12abbc06..a8ffc6576ca 100644 --- a/lisp/gnus/nntp.el +++ b/lisp/gnus/nntp.el | |||
| @@ -1227,17 +1227,20 @@ If SEND-IF-FORCE, only send authinfo to the server if the | |||
| 1227 | (require 'netrc) | 1227 | (require 'netrc) |
| 1228 | (let* ((list (netrc-parse nntp-authinfo-file)) | 1228 | (let* ((list (netrc-parse nntp-authinfo-file)) |
| 1229 | (alist (netrc-machine list nntp-address "nntp")) | 1229 | (alist (netrc-machine list nntp-address "nntp")) |
| 1230 | (force (or (netrc-get alist "force") nntp-authinfo-force)) | ||
| 1231 | (auth-info | 1230 | (auth-info |
| 1232 | (nth 0 (auth-source-search :max 1 | 1231 | (nth 0 (auth-source-search :max 1 |
| 1233 | ;; TODO: allow the virtual server name too | 1232 | ;; TODO: allow the virtual server name too |
| 1234 | :host nntp-address | 1233 | :host nntp-address |
| 1235 | :port '("119" "nntp")))) | 1234 | :port '("119" "nntp")))) |
| 1236 | (auth-user (plist-get auth-info :user)) | 1235 | (auth-user (plist-get auth-info :user)) |
| 1236 | (auth-force (plist-get auth-info :force)) | ||
| 1237 | (auth-passwd (plist-get auth-info :secret)) | 1237 | (auth-passwd (plist-get auth-info :secret)) |
| 1238 | (auth-passwd (if (functionp auth-passwd) | 1238 | (auth-passwd (if (functionp auth-passwd) |
| 1239 | (funcall auth-passwd) | 1239 | (funcall auth-passwd) |
| 1240 | auth-passwd)) | 1240 | auth-passwd)) |
| 1241 | (force (or (netrc-get alist "force") | ||
| 1242 | nntp-authinfo-force | ||
| 1243 | auth-force)) | ||
| 1241 | (user (or | 1244 | (user (or |
| 1242 | ;; this is preferred to netrc-* | 1245 | ;; this is preferred to netrc-* |
| 1243 | auth-user | 1246 | auth-user |
diff --git a/lisp/mail/feedmail.el b/lisp/mail/feedmail.el index 3ef8a6c4955..b86bdb178f6 100644 --- a/lisp/mail/feedmail.el +++ b/lisp/mail/feedmail.el | |||
| @@ -13,9 +13,8 @@ | |||
| 13 | ;; A replacement for parts of Emacs' sendmail.el (specifically, | 13 | ;; A replacement for parts of Emacs' sendmail.el (specifically, |
| 14 | ;; it's what handles your outgoing mail after you hit C-c C-c in mail | 14 | ;; it's what handles your outgoing mail after you hit C-c C-c in mail |
| 15 | ;; mode). See below for a list of additional features, including the | 15 | ;; mode). See below for a list of additional features, including the |
| 16 | ;; ability to queue messages for later sending. If you are using | 16 | ;; ability to queue messages for later sending. This replaces |
| 17 | ;; fakemail as a subprocess, you can switch to feedmail and eliminate | 17 | ;; the standalone fakemail program that used to be distributed with Emacs. |
| 18 | ;; the use of fakemail. | ||
| 19 | 18 | ||
| 20 | ;; feedmail works with recent versions of Emacs (20.x series) and | 19 | ;; feedmail works with recent versions of Emacs (20.x series) and |
| 21 | ;; XEmacs (tested with 20.4 and later betas). It probably no longer | 20 | ;; XEmacs (tested with 20.4 and later betas). It probably no longer |
| @@ -90,12 +89,11 @@ | |||
| 90 | ;; This code does in elisp a superset of the stuff that used to be done | 89 | ;; This code does in elisp a superset of the stuff that used to be done |
| 91 | ;; by the separate program "fakemail" for processing outbound email. | 90 | ;; by the separate program "fakemail" for processing outbound email. |
| 92 | ;; In other words, it takes over after you hit "C-c C-c" in mail mode. | 91 | ;; In other words, it takes over after you hit "C-c C-c" in mail mode. |
| 93 | ;; By appropriate setting of options, you can still use "fakemail", | 92 | ;; By appropriate setting of options, you can even revert to sendmail |
| 94 | ;; or you can even revert to sendmail (which is not too popular | 93 | ;; (which is not too popular locally). See the variables at the top |
| 95 | ;; locally). See the variables at the top of the elisp for how to | 94 | ;; of the elisp for how to achieve these effects (there are more |
| 96 | ;; achieve these effects (there are more features than in this bullet | 95 | ;; features than in this bullet list, so trolling through the variable |
| 97 | ;; list, so trolling through the variable and function doc strings may | 96 | ;; and function doc strings may be worth your while): |
| 98 | ;; be worth your while): | ||
| 99 | ;; | 97 | ;; |
| 100 | ;; --- you can park outgoing messages into a disk-based queue and | 98 | ;; --- you can park outgoing messages into a disk-based queue and |
| 101 | ;; stimulate sending them all later (handy for laptop users); | 99 | ;; stimulate sending them all later (handy for laptop users); |
diff --git a/lisp/mail/sendmail.el b/lisp/mail/sendmail.el index ed4270d484c..bbb02d7b978 100644 --- a/lisp/mail/sendmail.el +++ b/lisp/mail/sendmail.el | |||
| @@ -48,9 +48,9 @@ | |||
| 48 | ((file-exists-p "/usr/sbin/sendmail") "/usr/sbin/sendmail") | 48 | ((file-exists-p "/usr/sbin/sendmail") "/usr/sbin/sendmail") |
| 49 | ((file-exists-p "/usr/lib/sendmail") "/usr/lib/sendmail") | 49 | ((file-exists-p "/usr/lib/sendmail") "/usr/lib/sendmail") |
| 50 | ((file-exists-p "/usr/ucblib/sendmail") "/usr/ucblib/sendmail") | 50 | ((file-exists-p "/usr/ucblib/sendmail") "/usr/ucblib/sendmail") |
| 51 | (t "fakemail"))) ; in lib-src, to interface to /bin/mail | 51 | (t "sendmail"))) |
| 52 | "Program used to send messages." | 52 | "Program used to send messages." |
| 53 | :version "24.1" ; added executable-find | 53 | :version "24.1" ; add executable-find, remove fakemail |
| 54 | :group 'mail | 54 | :group 'mail |
| 55 | :type 'file) | 55 | :type 'file) |
| 56 | 56 | ||
diff --git a/lisp/net/tramp.el b/lisp/net/tramp.el index 693e082ecc8..537ccf6da6a 100644 --- a/lisp/net/tramp.el +++ b/lisp/net/tramp.el | |||
| @@ -2838,16 +2838,16 @@ User is always nil." | |||
| 2838 | v | 2838 | v |
| 2839 | (cond | 2839 | (cond |
| 2840 | ((and beg end) | 2840 | ((and beg end) |
| 2841 | (format "tail -c +%d %s | head -c +%d >%s" | 2841 | (format "dd bs=1 skip=%d if=%s count=%d of=%s" |
| 2842 | (1+ beg) (tramp-shell-quote-argument localname) | 2842 | beg (tramp-shell-quote-argument localname) |
| 2843 | (- end beg) remote-copy)) | 2843 | (- end beg) remote-copy)) |
| 2844 | (beg | 2844 | (beg |
| 2845 | (format "tail -c +%d %s >%s" | 2845 | (format "dd bs=1 skip=%d if=%s of=%s" |
| 2846 | (1+ beg) (tramp-shell-quote-argument localname) | 2846 | beg (tramp-shell-quote-argument localname) |
| 2847 | remote-copy)) | 2847 | remote-copy)) |
| 2848 | (end | 2848 | (end |
| 2849 | (format "head -c +%d %s >%s" | 2849 | (format "dd bs=1 count=%d if=%s of=%s" |
| 2850 | (1+ end) (tramp-shell-quote-argument localname) | 2850 | end (tramp-shell-quote-argument localname) |
| 2851 | remote-copy))))) | 2851 | remote-copy))))) |
| 2852 | 2852 | ||
| 2853 | ;; `insert-file-contents-literally' takes care to avoid | 2853 | ;; `insert-file-contents-literally' takes care to avoid |
| @@ -3105,8 +3105,13 @@ set, is the starting point of the region to be deleted in the | |||
| 3105 | connection buffer." | 3105 | connection buffer." |
| 3106 | ;; Preserve message for `progress-reporter'. | 3106 | ;; Preserve message for `progress-reporter'. |
| 3107 | (tramp-compat-with-temp-message "" | 3107 | (tramp-compat-with-temp-message "" |
| 3108 | ;; Enable auth-source and password-cache. | 3108 | ;; Enable auth-source and password-cache. We must use |
| 3109 | (tramp-set-connection-property vec "first-password-request" t) | 3109 | ;; tramp-current-* variables in case we have several hops. |
| 3110 | (tramp-set-connection-property | ||
| 3111 | (tramp-dissect-file-name | ||
| 3112 | (tramp-make-tramp-file-name | ||
| 3113 | tramp-current-method tramp-current-user tramp-current-host "")) | ||
| 3114 | "first-password-request" t) | ||
| 3110 | (save-restriction | 3115 | (save-restriction |
| 3111 | (let (exit) | 3116 | (let (exit) |
| 3112 | (while (not exit) | 3117 | (while (not exit) |
| @@ -3544,16 +3549,16 @@ Invokes `password-read' if available, `read-passwd' else." | |||
| 3544 | ;; Try with Tramp's current method. | 3549 | ;; Try with Tramp's current method. |
| 3545 | (if (fboundp 'auth-source-search) | 3550 | (if (fboundp 'auth-source-search) |
| 3546 | (setq auth-info | 3551 | (setq auth-info |
| 3547 | (tramp-compat-funcall | 3552 | (tramp-compat-funcall |
| 3548 | 'auth-source-search | 3553 | 'auth-source-search |
| 3549 | :max 1 | 3554 | :max 1 |
| 3550 | :user (or tramp-current-user t) | 3555 | :user (or tramp-current-user t) |
| 3551 | :host tramp-current-host | 3556 | :host tramp-current-host |
| 3552 | :port tramp-current-method) | 3557 | :port tramp-current-method) |
| 3553 | auth-passwd (plist-get (nth 0 auth-info) :secret) | 3558 | auth-passwd (plist-get (nth 0 auth-info) :secret) |
| 3554 | auth-passwd (if (functionp auth-passwd) | 3559 | auth-passwd (if (functionp auth-passwd) |
| 3555 | (funcall auth-passwd) | 3560 | (funcall auth-passwd) |
| 3556 | auth-passwd)) | 3561 | auth-passwd)) |
| 3557 | (tramp-compat-funcall | 3562 | (tramp-compat-funcall |
| 3558 | 'auth-source-user-or-password | 3563 | 'auth-source-user-or-password |
| 3559 | "password" tramp-current-host tramp-current-method))) | 3564 | "password" tramp-current-host tramp-current-method))) |
diff --git a/lisp/progmodes/grep.el b/lisp/progmodes/grep.el index 143220ad28a..3b819a149b2 100644 --- a/lisp/progmodes/grep.el +++ b/lisp/progmodes/grep.el | |||
| @@ -698,6 +698,7 @@ This function is called from `compilation-filter-hook'." | |||
| 698 | grep-hit-face) | 698 | grep-hit-face) |
| 699 | (set (make-local-variable 'compilation-error-regexp-alist) | 699 | (set (make-local-variable 'compilation-error-regexp-alist) |
| 700 | grep-regexp-alist) | 700 | grep-regexp-alist) |
| 701 | (set (make-local-variable 'compilation-directory-matcher) nil) | ||
| 701 | (set (make-local-variable 'compilation-process-setup-function) | 702 | (set (make-local-variable 'compilation-process-setup-function) |
| 702 | 'grep-process-setup) | 703 | 'grep-process-setup) |
| 703 | (set (make-local-variable 'compilation-disable-input) t) | 704 | (set (make-local-variable 'compilation-disable-input) t) |
diff --git a/m4/inttypes.m4 b/m4/inttypes.m4 index 1e81990bda2..cc027a417fa 100644 --- a/m4/inttypes.m4 +++ b/m4/inttypes.m4 | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | # inttypes.m4 serial 23 | 1 | # inttypes.m4 serial 24 |
| 2 | dnl Copyright (C) 2006-2011 Free Software Foundation, Inc. | 2 | dnl Copyright (C) 2006-2011 Free Software Foundation, Inc. |
| 3 | dnl This file is free software; the Free Software Foundation | 3 | dnl This file is free software; the Free Software Foundation |
| 4 | dnl gives unlimited permission to copy and/or distribute it, | 4 | dnl gives unlimited permission to copy and/or distribute it, |
| @@ -13,7 +13,7 @@ AC_DEFUN([gl_INTTYPES_H], | |||
| 13 | gl_INTTYPES_PRI_SCN | 13 | gl_INTTYPES_PRI_SCN |
| 14 | ]) | 14 | ]) |
| 15 | 15 | ||
| 16 | AC_DEFUN([gl_INTTYPES_INCOMPLETE], | 16 | AC_DEFUN_ONCE([gl_INTTYPES_INCOMPLETE], |
| 17 | [ | 17 | [ |
| 18 | AC_REQUIRE([gl_STDINT_H]) | 18 | AC_REQUIRE([gl_STDINT_H]) |
| 19 | AC_CHECK_HEADERS_ONCE([inttypes.h]) | 19 | AC_CHECK_HEADERS_ONCE([inttypes.h]) |
diff --git a/m4/stdint.m4 b/m4/stdint.m4 index dff37fe1bf9..c75e95722a5 100644 --- a/m4/stdint.m4 +++ b/m4/stdint.m4 | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | # stdint.m4 serial 40 | 1 | # stdint.m4 serial 41 |
| 2 | dnl Copyright (C) 2001-2011 Free Software Foundation, Inc. | 2 | dnl Copyright (C) 2001-2011 Free Software Foundation, Inc. |
| 3 | dnl This file is free software; the Free Software Foundation | 3 | dnl This file is free software; the Free Software Foundation |
| 4 | dnl gives unlimited permission to copy and/or distribute it, | 4 | dnl gives unlimited permission to copy and/or distribute it, |
| @@ -7,7 +7,7 @@ dnl with or without modifications, as long as this notice is preserved. | |||
| 7 | dnl From Paul Eggert and Bruno Haible. | 7 | dnl From Paul Eggert and Bruno Haible. |
| 8 | dnl Test whether <stdint.h> is supported or must be substituted. | 8 | dnl Test whether <stdint.h> is supported or must be substituted. |
| 9 | 9 | ||
| 10 | AC_DEFUN([gl_STDINT_H], | 10 | AC_DEFUN_ONCE([gl_STDINT_H], |
| 11 | [ | 11 | [ |
| 12 | AC_PREREQ([2.59])dnl | 12 | AC_PREREQ([2.59])dnl |
| 13 | 13 | ||
diff --git a/m4/unistd_h.m4 b/m4/unistd_h.m4 index eeb3360b058..fb6fe077265 100644 --- a/m4/unistd_h.m4 +++ b/m4/unistd_h.m4 | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | # unistd_h.m4 serial 55 | 1 | # unistd_h.m4 serial 56 |
| 2 | dnl Copyright (C) 2006-2011 Free Software Foundation, Inc. | 2 | dnl Copyright (C) 2006-2011 Free Software Foundation, Inc. |
| 3 | dnl This file is free software; the Free Software Foundation | 3 | dnl This file is free software; the Free Software Foundation |
| 4 | dnl gives unlimited permission to copy and/or distribute it, | 4 | dnl gives unlimited permission to copy and/or distribute it, |
| @@ -36,8 +36,8 @@ AC_DEFUN([gl_UNISTD_H], | |||
| 36 | ]], [chown dup2 dup3 environ euidaccess faccessat fchdir fchownat | 36 | ]], [chown dup2 dup3 environ euidaccess faccessat fchdir fchownat |
| 37 | fsync ftruncate getcwd getdomainname getdtablesize getgroups | 37 | fsync ftruncate getcwd getdomainname getdtablesize getgroups |
| 38 | gethostname getlogin getlogin_r getpagesize getusershell setusershell | 38 | gethostname getlogin getlogin_r getpagesize getusershell setusershell |
| 39 | endusershell lchown link linkat lseek pipe pipe2 pread pwrite readlink | 39 | endusershell group_member lchown link linkat lseek pipe pipe2 pread pwrite |
| 40 | readlinkat rmdir sleep symlink symlinkat ttyname_r unlink unlinkat | 40 | readlink readlinkat rmdir sleep symlink symlinkat ttyname_r unlink unlinkat |
| 41 | usleep]) | 41 | usleep]) |
| 42 | ]) | 42 | ]) |
| 43 | 43 | ||
| @@ -72,6 +72,7 @@ AC_DEFUN([gl_UNISTD_H_DEFAULTS], | |||
| 72 | GNULIB_GETLOGIN_R=0; AC_SUBST([GNULIB_GETLOGIN_R]) | 72 | GNULIB_GETLOGIN_R=0; AC_SUBST([GNULIB_GETLOGIN_R]) |
| 73 | GNULIB_GETPAGESIZE=0; AC_SUBST([GNULIB_GETPAGESIZE]) | 73 | GNULIB_GETPAGESIZE=0; AC_SUBST([GNULIB_GETPAGESIZE]) |
| 74 | GNULIB_GETUSERSHELL=0; AC_SUBST([GNULIB_GETUSERSHELL]) | 74 | GNULIB_GETUSERSHELL=0; AC_SUBST([GNULIB_GETUSERSHELL]) |
| 75 | GNULIB_GROUP_MEMBER=0; AC_SUBST([GNULIB_GROUP_MEMBER]) | ||
| 75 | GNULIB_LCHOWN=0; AC_SUBST([GNULIB_LCHOWN]) | 76 | GNULIB_LCHOWN=0; AC_SUBST([GNULIB_LCHOWN]) |
| 76 | GNULIB_LINK=0; AC_SUBST([GNULIB_LINK]) | 77 | GNULIB_LINK=0; AC_SUBST([GNULIB_LINK]) |
| 77 | GNULIB_LINKAT=0; AC_SUBST([GNULIB_LINKAT]) | 78 | GNULIB_LINKAT=0; AC_SUBST([GNULIB_LINKAT]) |
| @@ -110,6 +111,7 @@ AC_DEFUN([gl_UNISTD_H_DEFAULTS], | |||
| 110 | HAVE_GETHOSTNAME=1; AC_SUBST([HAVE_GETHOSTNAME]) | 111 | HAVE_GETHOSTNAME=1; AC_SUBST([HAVE_GETHOSTNAME]) |
| 111 | HAVE_GETLOGIN=1; AC_SUBST([HAVE_GETLOGIN]) | 112 | HAVE_GETLOGIN=1; AC_SUBST([HAVE_GETLOGIN]) |
| 112 | HAVE_GETPAGESIZE=1; AC_SUBST([HAVE_GETPAGESIZE]) | 113 | HAVE_GETPAGESIZE=1; AC_SUBST([HAVE_GETPAGESIZE]) |
| 114 | HAVE_GROUP_MEMBER=1; AC_SUBST([HAVE_GROUP_MEMBER]) | ||
| 113 | HAVE_LCHOWN=1; AC_SUBST([HAVE_LCHOWN]) | 115 | HAVE_LCHOWN=1; AC_SUBST([HAVE_LCHOWN]) |
| 114 | HAVE_LINK=1; AC_SUBST([HAVE_LINK]) | 116 | HAVE_LINK=1; AC_SUBST([HAVE_LINK]) |
| 115 | HAVE_LINKAT=1; AC_SUBST([HAVE_LINKAT]) | 117 | HAVE_LINKAT=1; AC_SUBST([HAVE_LINKAT]) |
diff --git a/nt/ChangeLog b/nt/ChangeLog index 6de2b15fced..7198ba767cb 100644 --- a/nt/ChangeLog +++ b/nt/ChangeLog | |||
| @@ -1,3 +1,7 @@ | |||
| 1 | 2011-05-17 Eli Zaretskii <eliz@gnu.org> | ||
| 2 | |||
| 3 | * README.W32: Add information about GnuTLS libraries. | ||
| 4 | |||
| 1 | 2011-05-09 Eli Zaretskii <eliz@gnu.org> | 5 | 2011-05-09 Eli Zaretskii <eliz@gnu.org> |
| 2 | 6 | ||
| 3 | * config.nt [_MSC_VER] (va_copy): Replacement for the MS compiler. | 7 | * config.nt [_MSC_VER] (va_copy): Replacement for the MS compiler. |
diff --git a/nt/README.W32 b/nt/README.W32 index 4e26ef1c8d7..4a3f7c41e9e 100644 --- a/nt/README.W32 +++ b/nt/README.W32 | |||
| @@ -147,6 +147,15 @@ See the end of the file for license conditions. | |||
| 147 | unreliable under Windows. See nt/INSTALL in the src distribution if | 147 | unreliable under Windows. See nt/INSTALL in the src distribution if |
| 148 | you wish to compile Emacs with SVG support. | 148 | you wish to compile Emacs with SVG support. |
| 149 | 149 | ||
| 150 | * GnuTLS support | ||
| 151 | |||
| 152 | In order to support GnuTLS at runtime, Emacs must be able to find | ||
| 153 | the relevant DLLs during startup; failure to do so is not an error, | ||
| 154 | but GnuTLS won't be available to the running session. | ||
| 155 | |||
| 156 | You can get pre-built binaries (including any required DLL and the | ||
| 157 | gnutls.h file) and an installer at http://josefsson.org/gnutls4win/. | ||
| 158 | |||
| 150 | * Uninstalling Emacs | 159 | * Uninstalling Emacs |
| 151 | 160 | ||
| 152 | If you should need to uninstall Emacs, simply delete all the files | 161 | If you should need to uninstall Emacs, simply delete all the files |
diff --git a/src/ChangeLog b/src/ChangeLog index fd6f42acb91..372bf383fb8 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -4,6 +4,114 @@ | |||
| 4 | (BACKWARD_CHAR): Wrap the arg STOP by parenthesis. | 4 | (BACKWARD_CHAR): Wrap the arg STOP by parenthesis. |
| 5 | (find_automatic_composition): Mostly rewrite for efficiency. | 5 | (find_automatic_composition): Mostly rewrite for efficiency. |
| 6 | 6 | ||
| 7 | 2011-05-18 Juanma Barranquero <lekktu@gmail.com> | ||
| 8 | |||
| 9 | * makefile.w32-in: Update dependencies. | ||
| 10 | |||
| 11 | 2011-05-18 Christoph Scholtes <cschol2112@googlemail.com> | ||
| 12 | |||
| 13 | * menu.c: Include limits.h (fixes the MS-Windows build broken by | ||
| 14 | revision 104625). | ||
| 15 | |||
| 16 | 2011-05-18 Paul Eggert <eggert@cs.ucla.edu> | ||
| 17 | |||
| 18 | Fix some integer overflow issues, such as string length overflow. | ||
| 19 | |||
| 20 | * insdel.c (count_size_as_multibyte): Check for string overflow. | ||
| 21 | |||
| 22 | * character.c (lisp_string_width): Check for string overflow. | ||
| 23 | Use EMACS_INT, not int, for string indexes and lengths; in | ||
| 24 | particular, 2nd arg is now EMACS_INT, not int. Do not crash if | ||
| 25 | the resulting string length overflows an EMACS_INT; instead, | ||
| 26 | report a string overflow if no precision given. When checking for | ||
| 27 | precision exhaustion, use a check that cannot possibly have | ||
| 28 | integer overflow. (Bug#8675) | ||
| 29 | * character.h (lisp_string_width): Adjust to new signature. | ||
| 30 | |||
| 31 | * alloc.c (string_overflow): New function. | ||
| 32 | (Fmake_string): Use it. This doesn't change behavior, but saves | ||
| 33 | a few bytes and will simplify future changes. | ||
| 34 | * character.c (string_escape_byte8): Likewise. | ||
| 35 | * lisp.h (string_overflow): New decl. | ||
| 36 | |||
| 37 | Fixups, following up to the user-interface timestamp change. | ||
| 38 | * nsterm.m (last_mouse_movement_time, ns_mouse_position): Use Time | ||
| 39 | for UI timestamps, instead of unsigned long. | ||
| 40 | * msdos.c (mouse_get_pos): Likewise. | ||
| 41 | * w32inevt.c (movement_time, w32_console_mouse_position): Likewise. | ||
| 42 | * w32gui.h (Time): Define by including "systime.h" rather than by | ||
| 43 | declaring it ourselves. (Bug#8664) | ||
| 44 | |||
| 45 | * dispextern.h (struct image): Don't assume time_t <= unsigned long. | ||
| 46 | * image.c (clear_image_cache): Likewise. | ||
| 47 | |||
| 48 | * term.c (term_mouse_position): Don't assume time_t wraparound. | ||
| 49 | |||
| 50 | Be more systematic about user-interface timestamps. | ||
| 51 | Before, the code sometimes used 'Time', sometimes 'unsigned long', | ||
| 52 | and sometimes 'EMACS_UINT', to represent these timestamps. This | ||
| 53 | change causes it to use 'Time' uniformly, as that's what X uses. | ||
| 54 | This makes the code easier to follow, and makes it easier to catch | ||
| 55 | integer overflow bugs such as Bug#8664. | ||
| 56 | * frame.c (Fmouse_position, Fmouse_pixel_position): | ||
| 57 | Use Time, not unsigned long, for user-interface timestamps. | ||
| 58 | * keyboard.c (last_event_timestamp, kbd_buffer_get_event): Likewise. | ||
| 59 | (button_down_time, make_lispy_position, make_lispy_movement): Likewise. | ||
| 60 | * keyboard.h (last_event_timestamp): Likewise. | ||
| 61 | * menu.c (Fx_popup_menu) [!HAVE_X_WINDOWS]: Likewise. | ||
| 62 | * menu.h (xmenu_show): Likewise. | ||
| 63 | * term.c (term_mouse_position): Likewise. | ||
| 64 | * termhooks.h (struct input_event.timestamp): Likewise. | ||
| 65 | (struct terminal.mouse_position_hook): Likewise. | ||
| 66 | * xmenu.c (create_and_show_popup_menu, xmenu_show): Likewise. | ||
| 67 | * xterm.c (XTmouse_position, x_scroll_bar_report_motion): Likewise. | ||
| 68 | * systime.h (Time): New decl. Pull it in from <X11/X.h> if | ||
| 69 | HAVE_X_WINDOWS, otherwise define it as unsigned long, which is | ||
| 70 | what it was before. | ||
| 71 | * menu.h, termhooks.h: Include "systime.h", for Time. | ||
| 72 | |||
| 73 | * keyboard.c (make_lispy_event): Fix problem in integer overflow. | ||
| 74 | Don't assume that the difference between two unsigned long values | ||
| 75 | can fit into an integer. At this point, we know button_down_time | ||
| 76 | <= event->timestamp, so the difference must be nonnegative, so | ||
| 77 | there's no need to cast the result if double-click-time is | ||
| 78 | nonnegative, as it should be; check that it's nonnegative, just in | ||
| 79 | case. This bug is triggered when events are more than 2**31 ms | ||
| 80 | apart (about 25 days). (Bug#8664) | ||
| 81 | |||
| 82 | * xselect.c (last_event_timestamp): Remove duplicate decl. | ||
| 83 | (x_own_selection): Remove needless cast to unsigned long. | ||
| 84 | |||
| 85 | * xmenu.c (set_frame_menubar): Use int, not EMACS_UINT, for indexes | ||
| 86 | that always fit in int. Use a sentinel instead of a counter, to | ||
| 87 | avoid a temp and to allay GCC's concerns about possible int overflow. | ||
| 88 | * frame.h (struct frame): Use int for menu_bar_items_used | ||
| 89 | instead of EMACS_INT, since it always fits in int. | ||
| 90 | |||
| 91 | * menu.c (grow_menu_items): Check for int overflow. | ||
| 92 | |||
| 93 | * xmenu.c (set_frame_menubar): Don't mishandle vectors with no nils. | ||
| 94 | |||
| 95 | * xterm.c: Use EMACS_INT for Emacs modifiers, and int for X modifiers. | ||
| 96 | Before, the code was not consistent. These values cannot exceed | ||
| 97 | 2**31 - 1 so there's no need to make them unsigned. | ||
| 98 | (x_x_to_emacs_modifiers): Accept int and return EMACS_INT. | ||
| 99 | (x_emacs_to_x_modifiers): Accept EMACS_INT and return int. | ||
| 100 | (x_x_to_emacs_modifiers, x_emacs_to_x_modifiers): Reject non-integers | ||
| 101 | as modifiers. | ||
| 102 | * xterm.h (x_x_to_emacs_modifiers): Adjust to signature change. | ||
| 103 | |||
| 104 | * lisp.h (XINT) [USE_LISP_UNION_TYPE]: Cast to EMACS_INT. | ||
| 105 | (XUINT) [USE_LISP_UNION_TYPE]: Cast to EMACS_UINT. | ||
| 106 | Otherwise, GCC 4.6.0 warns about printf (pI, XINT (...)), | ||
| 107 | presumably because the widths might not match. | ||
| 108 | |||
| 109 | * window.c (size_window): Avoid needless test at loop start. | ||
| 110 | |||
| 111 | 2011-05-18 Courtney Bane <emacs-bugs-7626@cbane.org> (tiny change) | ||
| 112 | |||
| 113 | * term.c (Fresume_tty): Restore hooks before reinitializing (bug#8687). | ||
| 114 | |||
| 7 | 2011-05-12 Drew Adams <drew.adams@oracle.com> | 115 | 2011-05-12 Drew Adams <drew.adams@oracle.com> |
| 8 | 116 | ||
| 9 | * textprop.c (Fprevious_single_char_property_change): Doc fix (bug#8655). | 117 | * textprop.c (Fprevious_single_char_property_change): Doc fix (bug#8655). |
| @@ -14,8 +122,8 @@ | |||
| 14 | `width' to `bar_area_x' and `bar_area_width', respectively. | 122 | `width' to `bar_area_x' and `bar_area_width', respectively. |
| 15 | (x_scroll_run): Take account of fringe background extension. | 123 | (x_scroll_run): Take account of fringe background extension. |
| 16 | 124 | ||
| 17 | * xterm.c (x_draw_fringe_bitmap) [USE_TOOLKIT_SCROLL_BARS]: Rename | 125 | * xterm.c (x_draw_fringe_bitmap) [USE_TOOLKIT_SCROLL_BARS]: |
| 18 | local vars `left' and `width' to `bar_area_x' and | 126 | Rename local vars `left' and `width' to `bar_area_x' and |
| 19 | `bar_area_width', respectively. | 127 | `bar_area_width', respectively. |
| 20 | (x_scroll_run) [USE_TOOLKIT_SCROLL_BARS]: Take account of fringe | 128 | (x_scroll_run) [USE_TOOLKIT_SCROLL_BARS]: Take account of fringe |
| 21 | background extension. | 129 | background extension. |
| @@ -132,8 +240,8 @@ | |||
| 132 | * dbusbind.c: Do not use XPNTR on a value that may be an integer. | 240 | * dbusbind.c: Do not use XPNTR on a value that may be an integer. |
| 133 | Reported by Stefan Monnier in | 241 | Reported by Stefan Monnier in |
| 134 | <http://lists.gnu.org/archive/html/emacs-devel/2011-04/msg00919.html>. | 242 | <http://lists.gnu.org/archive/html/emacs-devel/2011-04/msg00919.html>. |
| 135 | (xd_remove_watch, Fdbus_init_bus, xd_read_queued_messages): Use | 243 | (xd_remove_watch, Fdbus_init_bus, xd_read_queued_messages): |
| 136 | SYMBOLP-guarded XSYMBOL, not XPNTR. | 244 | Use SYMBOLP-guarded XSYMBOL, not XPNTR. |
| 137 | 245 | ||
| 138 | * lisp.h (EMACS_INTPTR): Remove. All uses changed to intptr_t. | 246 | * lisp.h (EMACS_INTPTR): Remove. All uses changed to intptr_t. |
| 139 | (EMACS_UINTPTR): Likewise, with uintptr_t. | 247 | (EMACS_UINTPTR): Likewise, with uintptr_t. |
| @@ -319,8 +427,8 @@ | |||
| 319 | * callproc.c: Indentation fixup. | 427 | * callproc.c: Indentation fixup. |
| 320 | 428 | ||
| 321 | * sysdep.c (wait_for_termination_1): Make static. | 429 | * sysdep.c (wait_for_termination_1): Make static. |
| 322 | (wait_for_termination, interruptible_wait_for_termination): Move | 430 | (wait_for_termination, interruptible_wait_for_termination): |
| 323 | after wait_for_termination_1. | 431 | Move after wait_for_termination_1. |
| 324 | 432 | ||
| 325 | 2011-05-01 Lars Magne Ingebrigtsen <larsi@gnus.org> | 433 | 2011-05-01 Lars Magne Ingebrigtsen <larsi@gnus.org> |
| 326 | 434 | ||
| @@ -436,8 +544,8 @@ | |||
| 436 | (emacs_gnutls_write): Don't use uninitialized rtnval if nbyte <= 0. | 544 | (emacs_gnutls_write): Don't use uninitialized rtnval if nbyte <= 0. |
| 437 | 545 | ||
| 438 | * lisp.h: Fix a problem with aliasing and vector headers. (Bug#8546) | 546 | * lisp.h: Fix a problem with aliasing and vector headers. (Bug#8546) |
| 439 | GCC 4.6.0 optimizes based on type-based alias analysis. For | 547 | GCC 4.6.0 optimizes based on type-based alias analysis. |
| 440 | example, if b is of type struct buffer * and v of type struct | 548 | For example, if b is of type struct buffer * and v of type struct |
| 441 | Lisp_Vector *, then gcc -O2 was incorrectly assuming that &b->size | 549 | Lisp_Vector *, then gcc -O2 was incorrectly assuming that &b->size |
| 442 | != &v->size, and therefore "v->size = 1; b->size = 2; return | 550 | != &v->size, and therefore "v->size = 1; b->size = 2; return |
| 443 | v->size;" must therefore return 1. This assumption is incorrect | 551 | v->size;" must therefore return 1. This assumption is incorrect |
| @@ -457,8 +565,8 @@ | |||
| 457 | (XSETPSEUDOVECTOR): Rewrite in terms of XSETTYPED_PSEUDOVECTOR. | 565 | (XSETPSEUDOVECTOR): Rewrite in terms of XSETTYPED_PSEUDOVECTOR. |
| 458 | (XSETSUBR): Rewrite in terms of XSETTYPED_PSEUDOVECTOR and XSIZE, | 566 | (XSETSUBR): Rewrite in terms of XSETTYPED_PSEUDOVECTOR and XSIZE, |
| 459 | since Lisp_Subr is a special case (no "next" field). | 567 | since Lisp_Subr is a special case (no "next" field). |
| 460 | (ASIZE): Now uses header.size rather than size. All | 568 | (ASIZE): Now uses header.size rather than size. |
| 461 | previous uses of XVECTOR (foo)->size replaced to use this macro, | 569 | All previous uses of XVECTOR (foo)->size replaced to use this macro, |
| 462 | to avoid the hassle of writing XVECTOR (foo)->header.size. | 570 | to avoid the hassle of writing XVECTOR (foo)->header.size. |
| 463 | (struct vectorlike_header): New type. | 571 | (struct vectorlike_header): New type. |
| 464 | (TYPED_PSEUDOVECTORP): New macro, also specifying the C type of the | 572 | (TYPED_PSEUDOVECTORP): New macro, also specifying the C type of the |
| @@ -507,7 +615,7 @@ | |||
| 507 | Break out the floating-point parsing into a new | 615 | Break out the floating-point parsing into a new |
| 508 | function string_to_number, so that Fstring_to_number parses | 616 | function string_to_number, so that Fstring_to_number parses |
| 509 | floating point numbers consistently with the Lisp reader. | 617 | floating point numbers consistently with the Lisp reader. |
| 510 | (digit_to_number): Moved here from data.c. Make it static inline. | 618 | (digit_to_number): Move here from data.c. Make it static inline. |
| 511 | (E_CHAR, EXP_INT): Remove, replacing with ... | 619 | (E_CHAR, EXP_INT): Remove, replacing with ... |
| 512 | (E_EXP): New macro, to solve the "1.0e+" problem mentioned below. | 620 | (E_EXP): New macro, to solve the "1.0e+" problem mentioned below. |
| 513 | (string_to_number): New function, replacing isfloat_string. | 621 | (string_to_number): New function, replacing isfloat_string. |
| @@ -744,8 +852,8 @@ | |||
| 744 | Fix doprnt so it could be used again safely in `verror'. (Bug#8435) | 852 | Fix doprnt so it could be used again safely in `verror'. (Bug#8435) |
| 745 | * doprnt.c: Include limits.h. | 853 | * doprnt.c: Include limits.h. |
| 746 | (SIZE_MAX): New macro. | 854 | (SIZE_MAX): New macro. |
| 747 | (doprnt): Return a size_t value. 2nd arg is now size_t. Many | 855 | (doprnt): Return a size_t value. 2nd arg is now size_t. |
| 748 | local variables are now size_t instead of int or unsigned. | 856 | Many local variables are now size_t instead of int or unsigned. |
| 749 | Improve overflow protection. Support `l' modifier for integer | 857 | Improve overflow protection. Support `l' modifier for integer |
| 750 | conversions. Support %l conversion. Don't assume an EMACS_INT | 858 | conversions. Support %l conversion. Don't assume an EMACS_INT |
| 751 | argument for integer conversions and for %c. | 859 | argument for integer conversions and for %c. |
| @@ -946,8 +1054,8 @@ | |||
| 946 | 1054 | ||
| 947 | * syntax.c (update_syntax_table): Declare 2nd argument EMACS_INT. | 1055 | * syntax.c (update_syntax_table): Declare 2nd argument EMACS_INT. |
| 948 | 1056 | ||
| 949 | * textprop.c (verify_interval_modification, interval_of): Declare | 1057 | * textprop.c (verify_interval_modification, interval_of): |
| 950 | arguments EMACS_INT. | 1058 | Declare arguments EMACS_INT. |
| 951 | 1059 | ||
| 952 | * intervals.c (adjust_intervals_for_insertion): Declare arguments | 1060 | * intervals.c (adjust_intervals_for_insertion): Declare arguments |
| 953 | EMACS_INT. | 1061 | EMACS_INT. |
| @@ -1198,8 +1306,8 @@ | |||
| 1198 | (free_realized_fontset) #if-0 the body, which does nothing. | 1306 | (free_realized_fontset) #if-0 the body, which does nothing. |
| 1199 | (face_suitable_for_char_p): #if-0, as it's never called. | 1307 | (face_suitable_for_char_p): #if-0, as it's never called. |
| 1200 | * fontset.h (face_suitable_for_char_p): Remove decl. | 1308 | * fontset.h (face_suitable_for_char_p): Remove decl. |
| 1201 | * xfaces.c (face_at_string_position): Use | 1309 | * xfaces.c (face_at_string_position): |
| 1202 | FACE_SUITABLE_FOR_ASCII_CHAR_P, not FACE_SUITABLE_FOR_CHAR_P, | 1310 | Use FACE_SUITABLE_FOR_ASCII_CHAR_P, not FACE_SUITABLE_FOR_CHAR_P, |
| 1203 | since 0 is always ASCII. | 1311 | since 0 is always ASCII. |
| 1204 | 1312 | ||
| 1205 | * fns.c (weak_hash_tables): Now static. | 1313 | * fns.c (weak_hash_tables): Now static. |
| @@ -1308,8 +1416,8 @@ | |||
| 1308 | (last_point_position_window): Remove decls. | 1416 | (last_point_position_window): Remove decls. |
| 1309 | * keyboard.c: Make these variables static. | 1417 | * keyboard.c: Make these variables static. |
| 1310 | 1418 | ||
| 1311 | * coding.h (coding, code_convert_region, encode_coding_gap): Remove | 1419 | * coding.h (coding, code_convert_region, encode_coding_gap): |
| 1312 | decls. | 1420 | Remove decls. |
| 1313 | * coding.c (Vsjis_coding_system, Vbig5_coding_system): | 1421 | * coding.c (Vsjis_coding_system, Vbig5_coding_system): |
| 1314 | (iso_code_class, detect_coding, code_convert_region): Now static. | 1422 | (iso_code_class, detect_coding, code_convert_region): Now static. |
| 1315 | (encode_coding_gap): Remove; unused. | 1423 | (encode_coding_gap): Remove; unused. |
| @@ -1340,7 +1448,7 @@ | |||
| 1340 | exported only to the debugger. | 1448 | exported only to the debugger. |
| 1341 | 1449 | ||
| 1342 | * atimer.c (alarm_signal_handler, run_all_atimers): Now static. | 1450 | * atimer.c (alarm_signal_handler, run_all_atimers): Now static. |
| 1343 | * atimer.h (run_all_atimers): Removed; not exported. | 1451 | * atimer.h (run_all_atimers): Remove; not exported. |
| 1344 | 1452 | ||
| 1345 | font.c: Make copy_font_spec and merge_font_spec ordinary C functions. | 1453 | font.c: Make copy_font_spec and merge_font_spec ordinary C functions. |
| 1346 | * font.c (copy_font_spec): Rename from Fcopy_font_spec, since it | 1454 | * font.c (copy_font_spec): Rename from Fcopy_font_spec, since it |
| @@ -1595,8 +1703,8 @@ | |||
| 1595 | 1703 | ||
| 1596 | 2011-04-09 Chong Yidong <cyd@stupidchicken.com> | 1704 | 2011-04-09 Chong Yidong <cyd@stupidchicken.com> |
| 1597 | 1705 | ||
| 1598 | * ftfont.c (get_adstyle_property, ftfont_pattern_entity): Use | 1706 | * ftfont.c (get_adstyle_property, ftfont_pattern_entity): |
| 1599 | unsigned char, to match FcChar8 type definition. | 1707 | Use unsigned char, to match FcChar8 type definition. |
| 1600 | 1708 | ||
| 1601 | * xterm.c (handle_one_xevent): | 1709 | * xterm.c (handle_one_xevent): |
| 1602 | * xmenu.c (create_and_show_popup_menu): | 1710 | * xmenu.c (create_and_show_popup_menu): |
| @@ -1669,8 +1777,8 @@ | |||
| 1669 | 1777 | ||
| 1670 | 2011-04-06 Chong Yidong <cyd@stupidchicken.com> | 1778 | 2011-04-06 Chong Yidong <cyd@stupidchicken.com> |
| 1671 | 1779 | ||
| 1672 | * process.c (Flist_processes): Removed to Lisp. | 1780 | * process.c (Flist_processes): Remove to Lisp. |
| 1673 | (list_processes_1): Deleted. | 1781 | (list_processes_1): Delete. |
| 1674 | 1782 | ||
| 1675 | 2011-04-06 Eli Zaretskii <eliz@gnu.org> | 1783 | 2011-04-06 Eli Zaretskii <eliz@gnu.org> |
| 1676 | 1784 | ||
| @@ -1928,8 +2036,8 @@ | |||
| 1928 | * callint.c (Fcall_interactively): Preserve lexical-binding mode for | 2036 | * callint.c (Fcall_interactively): Preserve lexical-binding mode for |
| 1929 | interactive spec. | 2037 | interactive spec. |
| 1930 | 2038 | ||
| 1931 | * bytecode.c (Bstack_ref, Bstack_set, Bstack_set2, BdiscardN): New | 2039 | * bytecode.c (Bstack_ref, Bstack_set, Bstack_set2, BdiscardN): |
| 1932 | byte-codes. | 2040 | New byte-codes. |
| 1933 | (exec_byte_code): New function extracted from Fbyte_code to handle new | 2041 | (exec_byte_code): New function extracted from Fbyte_code to handle new |
| 1934 | calling convention for byte-code-functions. Add new byte-codes. | 2042 | calling convention for byte-code-functions. Add new byte-codes. |
| 1935 | 2043 | ||
| @@ -1944,8 +2052,8 @@ | |||
| 1944 | 2011-03-31 Eli Zaretskii <eliz@gnu.org> | 2052 | 2011-03-31 Eli Zaretskii <eliz@gnu.org> |
| 1945 | 2053 | ||
| 1946 | * xdisp.c (SCROLL_LIMIT): New macro. | 2054 | * xdisp.c (SCROLL_LIMIT): New macro. |
| 1947 | (try_scrolling): Use it when setting scroll_limit. Limit | 2055 | (try_scrolling): Use it when setting scroll_limit. |
| 1948 | scrolling to 100 screen lines. | 2056 | Limit scrolling to 100 screen lines. |
| 1949 | (redisplay_window): Even when falling back on "recentering", | 2057 | (redisplay_window): Even when falling back on "recentering", |
| 1950 | position point in the window according to scroll-conservatively, | 2058 | position point in the window according to scroll-conservatively, |
| 1951 | scroll-margin, and scroll-*-aggressively variables. (Bug#6671) | 2059 | scroll-margin, and scroll-*-aggressively variables. (Bug#6671) |
diff --git a/src/alloc.c b/src/alloc.c index 0bce83bfae7..71ab54bcab5 100644 --- a/src/alloc.c +++ b/src/alloc.c | |||
| @@ -2174,6 +2174,11 @@ compact_small_strings (void) | |||
| 2174 | current_sblock = tb; | 2174 | current_sblock = tb; |
| 2175 | } | 2175 | } |
| 2176 | 2176 | ||
| 2177 | void | ||
| 2178 | string_overflow (void) | ||
| 2179 | { | ||
| 2180 | error ("Maximum string size exceeded"); | ||
| 2181 | } | ||
| 2177 | 2182 | ||
| 2178 | DEFUN ("make-string", Fmake_string, Smake_string, 2, 2, 0, | 2183 | DEFUN ("make-string", Fmake_string, Smake_string, 2, 2, 0, |
| 2179 | doc: /* Return a newly created string of length LENGTH, with INIT in each element. | 2184 | doc: /* Return a newly created string of length LENGTH, with INIT in each element. |
| @@ -2206,7 +2211,7 @@ INIT must be an integer that represents a character. */) | |||
| 2206 | EMACS_INT string_len = XINT (length); | 2211 | EMACS_INT string_len = XINT (length); |
| 2207 | 2212 | ||
| 2208 | if (string_len > MOST_POSITIVE_FIXNUM / len) | 2213 | if (string_len > MOST_POSITIVE_FIXNUM / len) |
| 2209 | error ("Maximum string size exceeded"); | 2214 | string_overflow (); |
| 2210 | nbytes = len * string_len; | 2215 | nbytes = len * string_len; |
| 2211 | val = make_uninit_multibyte_string (string_len, nbytes); | 2216 | val = make_uninit_multibyte_string (string_len, nbytes); |
| 2212 | p = SDATA (val); | 2217 | p = SDATA (val); |
diff --git a/src/character.c b/src/character.c index 64ea2625abb..b9595f97ec7 100644 --- a/src/character.c +++ b/src/character.c | |||
| @@ -35,6 +35,7 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | |||
| 35 | 35 | ||
| 36 | #include <sys/types.h> | 36 | #include <sys/types.h> |
| 37 | #include <setjmp.h> | 37 | #include <setjmp.h> |
| 38 | #include <intprops.h> | ||
| 38 | #include "lisp.h" | 39 | #include "lisp.h" |
| 39 | #include "character.h" | 40 | #include "character.h" |
| 40 | #include "buffer.h" | 41 | #include "buffer.h" |
| @@ -404,7 +405,7 @@ strwidth (const char *str, EMACS_INT len) | |||
| 404 | in *NCHARS and *NBYTES respectively. */ | 405 | in *NCHARS and *NBYTES respectively. */ |
| 405 | 406 | ||
| 406 | EMACS_INT | 407 | EMACS_INT |
| 407 | lisp_string_width (Lisp_Object string, int precision, | 408 | lisp_string_width (Lisp_Object string, EMACS_INT precision, |
| 408 | EMACS_INT *nchars, EMACS_INT *nbytes) | 409 | EMACS_INT *nchars, EMACS_INT *nbytes) |
| 409 | { | 410 | { |
| 410 | EMACS_INT len = SCHARS (string); | 411 | EMACS_INT len = SCHARS (string); |
| @@ -419,7 +420,7 @@ lisp_string_width (Lisp_Object string, int precision, | |||
| 419 | 420 | ||
| 420 | while (i < len) | 421 | while (i < len) |
| 421 | { | 422 | { |
| 422 | int chars, bytes, thiswidth; | 423 | EMACS_INT chars, bytes, thiswidth; |
| 423 | Lisp_Object val; | 424 | Lisp_Object val; |
| 424 | int cmp_id; | 425 | int cmp_id; |
| 425 | EMACS_INT ignore, end; | 426 | EMACS_INT ignore, end; |
| @@ -437,7 +438,11 @@ lisp_string_width (Lisp_Object string, int precision, | |||
| 437 | int c; | 438 | int c; |
| 438 | 439 | ||
| 439 | if (multibyte) | 440 | if (multibyte) |
| 440 | c = STRING_CHAR_AND_LENGTH (str + i_byte, bytes); | 441 | { |
| 442 | int cbytes; | ||
| 443 | c = STRING_CHAR_AND_LENGTH (str + i_byte, cbytes); | ||
| 444 | bytes = cbytes; | ||
| 445 | } | ||
| 441 | else | 446 | else |
| 442 | c = str[i_byte], bytes = 1; | 447 | c = str[i_byte], bytes = 1; |
| 443 | chars = 1; | 448 | chars = 1; |
| @@ -455,8 +460,14 @@ lisp_string_width (Lisp_Object string, int precision, | |||
| 455 | } | 460 | } |
| 456 | } | 461 | } |
| 457 | 462 | ||
| 458 | if (precision > 0 | 463 | if (precision <= 0) |
| 459 | && (width + thiswidth > precision)) | 464 | { |
| 465 | #ifdef emacs | ||
| 466 | if (INT_ADD_OVERFLOW (width, thiswidth)) | ||
| 467 | string_overflow (); | ||
| 468 | #endif | ||
| 469 | } | ||
| 470 | else if (precision - width < thiswidth) | ||
| 460 | { | 471 | { |
| 461 | *nchars = i; | 472 | *nchars = i; |
| 462 | *nbytes = i_byte; | 473 | *nbytes = i_byte; |
| @@ -465,7 +476,7 @@ lisp_string_width (Lisp_Object string, int precision, | |||
| 465 | i += chars; | 476 | i += chars; |
| 466 | i_byte += bytes; | 477 | i_byte += bytes; |
| 467 | width += thiswidth; | 478 | width += thiswidth; |
| 468 | } | 479 | } |
| 469 | 480 | ||
| 470 | if (precision > 0) | 481 | if (precision > 0) |
| 471 | { | 482 | { |
| @@ -672,7 +683,7 @@ parse_str_to_multibyte (const unsigned char *str, EMACS_INT len) | |||
| 672 | } | 683 | } |
| 673 | 684 | ||
| 674 | 685 | ||
| 675 | /* Convert unibyte text at STR of NBYTES bytes to a multibyte text | 686 | /* Convert unibyte text at STR of BYTES bytes to a multibyte text |
| 676 | that contains the same single-byte characters. It actually | 687 | that contains the same single-byte characters. It actually |
| 677 | converts all 8-bit characters to multibyte forms. It is assured | 688 | converts all 8-bit characters to multibyte forms. It is assured |
| 678 | that we can use LEN bytes at STR as a work area and that is | 689 | that we can use LEN bytes at STR as a work area and that is |
| @@ -823,7 +834,7 @@ string_escape_byte8 (Lisp_Object string) | |||
| 823 | { | 834 | { |
| 824 | if ((MOST_POSITIVE_FIXNUM - nchars) / 3 < byte8_count | 835 | if ((MOST_POSITIVE_FIXNUM - nchars) / 3 < byte8_count |
| 825 | || (MOST_POSITIVE_FIXNUM - nbytes) / 2 < byte8_count) | 836 | || (MOST_POSITIVE_FIXNUM - nbytes) / 2 < byte8_count) |
| 826 | error ("Maximum string size exceeded"); | 837 | string_overflow (); |
| 827 | 838 | ||
| 828 | /* Convert 2-byte sequence of byte8 chars to 4-byte octal. */ | 839 | /* Convert 2-byte sequence of byte8 chars to 4-byte octal. */ |
| 829 | val = make_uninit_multibyte_string (nchars + byte8_count * 3, | 840 | val = make_uninit_multibyte_string (nchars + byte8_count * 3, |
| @@ -832,7 +843,8 @@ string_escape_byte8 (Lisp_Object string) | |||
| 832 | else | 843 | else |
| 833 | { | 844 | { |
| 834 | if ((MOST_POSITIVE_FIXNUM - nchars) / 3 < byte8_count) | 845 | if ((MOST_POSITIVE_FIXNUM - nchars) / 3 < byte8_count) |
| 835 | error ("Maximum string size exceeded"); | 846 | string_overflow (); |
| 847 | |||
| 836 | /* Convert 1-byte sequence of byte8 chars to 4-byte octal. */ | 848 | /* Convert 1-byte sequence of byte8 chars to 4-byte octal. */ |
| 837 | val = make_uninit_string (nbytes + byte8_count * 3); | 849 | val = make_uninit_string (nbytes + byte8_count * 3); |
| 838 | } | 850 | } |
diff --git a/src/character.h b/src/character.h index 864882db7f6..5877d145d9e 100644 --- a/src/character.h +++ b/src/character.h | |||
| @@ -612,7 +612,7 @@ extern EMACS_INT str_to_unibyte (const unsigned char *, unsigned char *, | |||
| 612 | extern EMACS_INT strwidth (const char *, EMACS_INT); | 612 | extern EMACS_INT strwidth (const char *, EMACS_INT); |
| 613 | extern EMACS_INT c_string_width (const unsigned char *, EMACS_INT, int, | 613 | extern EMACS_INT c_string_width (const unsigned char *, EMACS_INT, int, |
| 614 | EMACS_INT *, EMACS_INT *); | 614 | EMACS_INT *, EMACS_INT *); |
| 615 | extern EMACS_INT lisp_string_width (Lisp_Object, int, | 615 | extern EMACS_INT lisp_string_width (Lisp_Object, EMACS_INT, |
| 616 | EMACS_INT *, EMACS_INT *); | 616 | EMACS_INT *, EMACS_INT *); |
| 617 | 617 | ||
| 618 | extern Lisp_Object Qcharacterp; | 618 | extern Lisp_Object Qcharacterp; |
diff --git a/src/dispextern.h b/src/dispextern.h index 72e23e6642a..77c45cf2fc6 100644 --- a/src/dispextern.h +++ b/src/dispextern.h | |||
| @@ -2709,7 +2709,7 @@ struct image | |||
| 2709 | { | 2709 | { |
| 2710 | /* The time in seconds at which the image was last displayed. Set | 2710 | /* The time in seconds at which the image was last displayed. Set |
| 2711 | in prepare_image_for_display. */ | 2711 | in prepare_image_for_display. */ |
| 2712 | unsigned long timestamp; | 2712 | time_t timestamp; |
| 2713 | 2713 | ||
| 2714 | /* Pixmaps of the image. */ | 2714 | /* Pixmaps of the image. */ |
| 2715 | Pixmap pixmap, mask; | 2715 | Pixmap pixmap, mask; |
| @@ -457,10 +457,10 @@ concat (size_t nargs, Lisp_Object *args, | |||
| 457 | Lisp_Object prev; | 457 | Lisp_Object prev; |
| 458 | int some_multibyte; | 458 | int some_multibyte; |
| 459 | /* When we make a multibyte string, we can't copy text properties | 459 | /* When we make a multibyte string, we can't copy text properties |
| 460 | while concatinating each string because the length of resulting | 460 | while concatenating each string because the length of resulting |
| 461 | string can't be decided until we finish the whole concatination. | 461 | string can't be decided until we finish the whole concatenation. |
| 462 | So, we record strings that have text properties to be copied | 462 | So, we record strings that have text properties to be copied |
| 463 | here, and copy the text properties after the concatination. */ | 463 | here, and copy the text properties after the concatenation. */ |
| 464 | struct textprop_rec *textprops = NULL; | 464 | struct textprop_rec *textprops = NULL; |
| 465 | /* Number of elements in textprops. */ | 465 | /* Number of elements in textprops. */ |
| 466 | int num_textprops = 0; | 466 | int num_textprops = 0; |
| @@ -704,7 +704,7 @@ concat (size_t nargs, Lisp_Object *args, | |||
| 704 | make_number (0), | 704 | make_number (0), |
| 705 | make_number (SCHARS (this)), | 705 | make_number (SCHARS (this)), |
| 706 | Qnil); | 706 | Qnil); |
| 707 | /* If successive arguments have properites, be sure that the | 707 | /* If successive arguments have properties, be sure that the |
| 708 | value of `composition' property be the copy. */ | 708 | value of `composition' property be the copy. */ |
| 709 | if (last_to_end == textprops[argnum].to) | 709 | if (last_to_end == textprops[argnum].to) |
| 710 | make_composition_value_copy (props); | 710 | make_composition_value_copy (props); |
| @@ -2076,7 +2076,7 @@ internal_equal (register Lisp_Object o1, register Lisp_Object o2, int depth, int | |||
| 2076 | return compare_window_configurations (o1, o2, 0); | 2076 | return compare_window_configurations (o1, o2, 0); |
| 2077 | 2077 | ||
| 2078 | /* Aside from them, only true vectors, char-tables, compiled | 2078 | /* Aside from them, only true vectors, char-tables, compiled |
| 2079 | functions, and fonts (font-spec, font-entity, font-ojbect) | 2079 | functions, and fonts (font-spec, font-entity, font-object) |
| 2080 | are sensible to compare, so eliminate the others now. */ | 2080 | are sensible to compare, so eliminate the others now. */ |
| 2081 | if (size & PSEUDOVECTOR_FLAG) | 2081 | if (size & PSEUDOVECTOR_FLAG) |
| 2082 | { | 2082 | { |
| @@ -2782,7 +2782,7 @@ ITEM should be one of the following: | |||
| 2782 | `months', returning a 12-element vector of month names (locale items MON_n); | 2782 | `months', returning a 12-element vector of month names (locale items MON_n); |
| 2783 | 2783 | ||
| 2784 | `paper', returning a list (WIDTH HEIGHT) for the default paper size, | 2784 | `paper', returning a list (WIDTH HEIGHT) for the default paper size, |
| 2785 | both measured in milimeters (locale items PAPER_WIDTH, PAPER_HEIGHT). | 2785 | both measured in millimeters (locale items PAPER_WIDTH, PAPER_HEIGHT). |
| 2786 | 2786 | ||
| 2787 | If the system can't provide such information through a call to | 2787 | If the system can't provide such information through a call to |
| 2788 | `nl_langinfo', or if ITEM isn't from the list above, return nil. | 2788 | `nl_langinfo', or if ITEM isn't from the list above, return nil. |
diff --git a/src/frame.c b/src/frame.c index b106c568e48..ce92a83b86c 100644 --- a/src/frame.c +++ b/src/frame.c | |||
| @@ -1631,7 +1631,7 @@ and returns whatever that function returns. */) | |||
| 1631 | enum scroll_bar_part party_dummy; | 1631 | enum scroll_bar_part party_dummy; |
| 1632 | Lisp_Object x, y, retval; | 1632 | Lisp_Object x, y, retval; |
| 1633 | int col, row; | 1633 | int col, row; |
| 1634 | unsigned long long_dummy; | 1634 | Time long_dummy; |
| 1635 | struct gcpro gcpro1; | 1635 | struct gcpro gcpro1; |
| 1636 | 1636 | ||
| 1637 | f = SELECTED_FRAME (); | 1637 | f = SELECTED_FRAME (); |
| @@ -1676,7 +1676,7 @@ and nil for X and Y. */) | |||
| 1676 | Lisp_Object lispy_dummy; | 1676 | Lisp_Object lispy_dummy; |
| 1677 | enum scroll_bar_part party_dummy; | 1677 | enum scroll_bar_part party_dummy; |
| 1678 | Lisp_Object x, y; | 1678 | Lisp_Object x, y; |
| 1679 | unsigned long long_dummy; | 1679 | Time long_dummy; |
| 1680 | 1680 | ||
| 1681 | f = SELECTED_FRAME (); | 1681 | f = SELECTED_FRAME (); |
| 1682 | x = y = Qnil; | 1682 | x = y = Qnil; |
diff --git a/src/frame.h b/src/frame.h index e73370340f1..db57b1be980 100644 --- a/src/frame.h +++ b/src/frame.h | |||
| @@ -192,7 +192,7 @@ struct frame | |||
| 192 | struct face_cache *face_cache; | 192 | struct face_cache *face_cache; |
| 193 | 193 | ||
| 194 | /* Number of elements in `menu_bar_vector' that have meaningful data. */ | 194 | /* Number of elements in `menu_bar_vector' that have meaningful data. */ |
| 195 | EMACS_INT menu_bar_items_used; | 195 | int menu_bar_items_used; |
| 196 | 196 | ||
| 197 | /* A buffer to hold the frame's name. We can't use the Lisp | 197 | /* A buffer to hold the frame's name. We can't use the Lisp |
| 198 | string's pointer (`name', above) because it might get relocated. */ | 198 | string's pointer (`name', above) because it might get relocated. */ |
diff --git a/src/image.c b/src/image.c index 23da03b6264..2562d79a782 100644 --- a/src/image.c +++ b/src/image.c | |||
| @@ -1523,7 +1523,7 @@ clear_image_cache (struct frame *f, Lisp_Object filter) | |||
| 1523 | { | 1523 | { |
| 1524 | /* Free cache based on timestamp. */ | 1524 | /* Free cache based on timestamp. */ |
| 1525 | EMACS_TIME t; | 1525 | EMACS_TIME t; |
| 1526 | unsigned long old; | 1526 | time_t old; |
| 1527 | int delay, nimages = 0; | 1527 | int delay, nimages = 0; |
| 1528 | 1528 | ||
| 1529 | for (i = 0; i < c->used; ++i) | 1529 | for (i = 0; i < c->used; ++i) |
diff --git a/src/insdel.c b/src/insdel.c index 2662858c2a1..de9e8aa570a 100644 --- a/src/insdel.c +++ b/src/insdel.c | |||
| @@ -20,6 +20,9 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | |||
| 20 | 20 | ||
| 21 | #include <config.h> | 21 | #include <config.h> |
| 22 | #include <setjmp.h> | 22 | #include <setjmp.h> |
| 23 | |||
| 24 | #include <intprops.h> | ||
| 25 | |||
| 23 | #include "lisp.h" | 26 | #include "lisp.h" |
| 24 | #include "intervals.h" | 27 | #include "intervals.h" |
| 25 | #include "buffer.h" | 28 | #include "buffer.h" |
| @@ -581,14 +584,19 @@ count_size_as_multibyte (const unsigned char *ptr, EMACS_INT nbytes) | |||
| 581 | for (i = 0; i < nbytes; i++) | 584 | for (i = 0; i < nbytes; i++) |
| 582 | { | 585 | { |
| 583 | unsigned int c = *ptr++; | 586 | unsigned int c = *ptr++; |
| 587 | int n; | ||
| 584 | 588 | ||
| 585 | if (ASCII_CHAR_P (c)) | 589 | if (ASCII_CHAR_P (c)) |
| 586 | outgoing_nbytes++; | 590 | n = 1; |
| 587 | else | 591 | else |
| 588 | { | 592 | { |
| 589 | c = BYTE8_TO_CHAR (c); | 593 | c = BYTE8_TO_CHAR (c); |
| 590 | outgoing_nbytes += CHAR_BYTES (c); | 594 | n = CHAR_BYTES (c); |
| 591 | } | 595 | } |
| 596 | |||
| 597 | if (INT_ADD_OVERFLOW (outgoing_nbytes, n)) | ||
| 598 | string_overflow (); | ||
| 599 | outgoing_nbytes += n; | ||
| 592 | } | 600 | } |
| 593 | 601 | ||
| 594 | return outgoing_nbytes; | 602 | return outgoing_nbytes; |
diff --git a/src/keyboard.c b/src/keyboard.c index a94456fce2e..c471a91ebfb 100644 --- a/src/keyboard.c +++ b/src/keyboard.c | |||
| @@ -238,7 +238,7 @@ Lisp_Object internal_last_event_frame; | |||
| 238 | 238 | ||
| 239 | /* The timestamp of the last input event we received from the X server. | 239 | /* The timestamp of the last input event we received from the X server. |
| 240 | X Windows wants this for selection ownership. */ | 240 | X Windows wants this for selection ownership. */ |
| 241 | unsigned long last_event_timestamp; | 241 | Time last_event_timestamp; |
| 242 | 242 | ||
| 243 | static Lisp_Object Qx_set_selection, Qhandle_switch_frame; | 243 | static Lisp_Object Qx_set_selection, Qhandle_switch_frame; |
| 244 | Lisp_Object QPRIMARY; | 244 | Lisp_Object QPRIMARY; |
| @@ -4085,7 +4085,7 @@ kbd_buffer_get_event (KBOARD **kbp, | |||
| 4085 | Lisp_Object bar_window; | 4085 | Lisp_Object bar_window; |
| 4086 | enum scroll_bar_part part; | 4086 | enum scroll_bar_part part; |
| 4087 | Lisp_Object x, y; | 4087 | Lisp_Object x, y; |
| 4088 | unsigned long t; | 4088 | Time t; |
| 4089 | 4089 | ||
| 4090 | *kbp = current_kboard; | 4090 | *kbp = current_kboard; |
| 4091 | /* Note that this uses F to determine which terminal to look at. | 4091 | /* Note that this uses F to determine which terminal to look at. |
| @@ -5088,7 +5088,7 @@ static Lisp_Object button_down_location; | |||
| 5088 | static int last_mouse_button; | 5088 | static int last_mouse_button; |
| 5089 | static int last_mouse_x; | 5089 | static int last_mouse_x; |
| 5090 | static int last_mouse_y; | 5090 | static int last_mouse_y; |
| 5091 | static unsigned long button_down_time; | 5091 | static Time button_down_time; |
| 5092 | 5092 | ||
| 5093 | /* The number of clicks in this multiple-click. */ | 5093 | /* The number of clicks in this multiple-click. */ |
| 5094 | 5094 | ||
| @@ -5099,7 +5099,7 @@ static int double_click_count; | |||
| 5099 | 5099 | ||
| 5100 | static Lisp_Object | 5100 | static Lisp_Object |
| 5101 | make_lispy_position (struct frame *f, Lisp_Object x, Lisp_Object y, | 5101 | make_lispy_position (struct frame *f, Lisp_Object x, Lisp_Object y, |
| 5102 | unsigned long t) | 5102 | Time t) |
| 5103 | { | 5103 | { |
| 5104 | enum window_part part; | 5104 | enum window_part part; |
| 5105 | Lisp_Object posn = Qnil; | 5105 | Lisp_Object posn = Qnil; |
| @@ -5556,9 +5556,9 @@ make_lispy_event (struct input_event *event) | |||
| 5556 | && (eabs (XINT (event->y) - last_mouse_y) <= fuzz) | 5556 | && (eabs (XINT (event->y) - last_mouse_y) <= fuzz) |
| 5557 | && button_down_time != 0 | 5557 | && button_down_time != 0 |
| 5558 | && (EQ (Vdouble_click_time, Qt) | 5558 | && (EQ (Vdouble_click_time, Qt) |
| 5559 | || (INTEGERP (Vdouble_click_time) | 5559 | || (NATNUMP (Vdouble_click_time) |
| 5560 | && ((int)(event->timestamp - button_down_time) | 5560 | && (event->timestamp - button_down_time |
| 5561 | < XINT (Vdouble_click_time))))); | 5561 | < XFASTINT (Vdouble_click_time))))); |
| 5562 | } | 5562 | } |
| 5563 | 5563 | ||
| 5564 | last_mouse_button = button; | 5564 | last_mouse_button = button; |
| @@ -5742,9 +5742,9 @@ make_lispy_event (struct input_event *event) | |||
| 5742 | && (eabs (XINT (event->y) - last_mouse_y) <= fuzz) | 5742 | && (eabs (XINT (event->y) - last_mouse_y) <= fuzz) |
| 5743 | && button_down_time != 0 | 5743 | && button_down_time != 0 |
| 5744 | && (EQ (Vdouble_click_time, Qt) | 5744 | && (EQ (Vdouble_click_time, Qt) |
| 5745 | || (INTEGERP (Vdouble_click_time) | 5745 | || (NATNUMP (Vdouble_click_time) |
| 5746 | && ((int)(event->timestamp - button_down_time) | 5746 | && (event->timestamp - button_down_time |
| 5747 | < XINT (Vdouble_click_time))))); | 5747 | < XFASTINT (Vdouble_click_time))))); |
| 5748 | if (is_double) | 5748 | if (is_double) |
| 5749 | { | 5749 | { |
| 5750 | double_click_count++; | 5750 | double_click_count++; |
| @@ -5987,7 +5987,7 @@ make_lispy_event (struct input_event *event) | |||
| 5987 | 5987 | ||
| 5988 | static Lisp_Object | 5988 | static Lisp_Object |
| 5989 | make_lispy_movement (FRAME_PTR frame, Lisp_Object bar_window, enum scroll_bar_part part, | 5989 | make_lispy_movement (FRAME_PTR frame, Lisp_Object bar_window, enum scroll_bar_part part, |
| 5990 | Lisp_Object x, Lisp_Object y, unsigned long t) | 5990 | Lisp_Object x, Lisp_Object y, Time t) |
| 5991 | { | 5991 | { |
| 5992 | /* Is it a scroll bar movement? */ | 5992 | /* Is it a scroll bar movement? */ |
| 5993 | if (frame && ! NILP (bar_window)) | 5993 | if (frame && ! NILP (bar_window)) |
diff --git a/src/keyboard.h b/src/keyboard.h index 1f5cbd23639..802c99edb5e 100644 --- a/src/keyboard.h +++ b/src/keyboard.h | |||
| @@ -16,7 +16,7 @@ GNU General Public License for more details. | |||
| 16 | You should have received a copy of the GNU General Public License | 16 | 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 "systime.h" /* for EMACS_TIME */ | 19 | #include "systime.h" /* for EMACS_TIME, Time */ |
| 20 | #include "coding.h" /* for ENCODE_UTF_8 and ENCODE_SYSTEM */ | 20 | #include "coding.h" /* for ENCODE_UTF_8 and ENCODE_SYSTEM */ |
| 21 | 21 | ||
| 22 | /* Lisp fields in struct keyboard are hidden from most code and accessed | 22 | /* Lisp fields in struct keyboard are hidden from most code and accessed |
| @@ -459,7 +459,7 @@ extern Lisp_Object Qevent_symbol_element_mask; | |||
| 459 | 459 | ||
| 460 | /* The timestamp of the last input event we received from the X server. | 460 | /* The timestamp of the last input event we received from the X server. |
| 461 | X Windows wants this for selection ownership. */ | 461 | X Windows wants this for selection ownership. */ |
| 462 | extern unsigned long last_event_timestamp; | 462 | extern Time last_event_timestamp; |
| 463 | 463 | ||
| 464 | extern int quit_char; | 464 | extern int quit_char; |
| 465 | 465 | ||
diff --git a/src/lisp.h b/src/lisp.h index 66f5c962be8..b6bf2bdb502 100644 --- a/src/lisp.h +++ b/src/lisp.h | |||
| @@ -470,8 +470,8 @@ enum pvec_type | |||
| 470 | 470 | ||
| 471 | #define XHASH(a) ((a).i) | 471 | #define XHASH(a) ((a).i) |
| 472 | #define XTYPE(a) ((enum Lisp_Type) (a).u.type) | 472 | #define XTYPE(a) ((enum Lisp_Type) (a).u.type) |
| 473 | #define XINT(a) ((a).s.val) | 473 | #define XINT(a) ((EMACS_INT) (a).s.val) |
| 474 | #define XUINT(a) ((a).u.val) | 474 | #define XUINT(a) ((EMACS_UINT) (a).u.val) |
| 475 | 475 | ||
| 476 | #ifdef USE_LSB_TAG | 476 | #ifdef USE_LSB_TAG |
| 477 | 477 | ||
| @@ -2710,6 +2710,7 @@ EXFUN (Fmake_vector, 2); | |||
| 2710 | EXFUN (Fvector, MANY); | 2710 | EXFUN (Fvector, MANY); |
| 2711 | EXFUN (Fmake_symbol, 1); | 2711 | EXFUN (Fmake_symbol, 1); |
| 2712 | EXFUN (Fmake_marker, 0); | 2712 | EXFUN (Fmake_marker, 0); |
| 2713 | extern void string_overflow (void) NO_RETURN; | ||
| 2713 | EXFUN (Fmake_string, 2); | 2714 | EXFUN (Fmake_string, 2); |
| 2714 | extern Lisp_Object build_string (const char *); | 2715 | extern Lisp_Object build_string (const char *); |
| 2715 | extern Lisp_Object make_string (const char *, EMACS_INT); | 2716 | extern Lisp_Object make_string (const char *, EMACS_INT); |
diff --git a/src/makefile.w32-in b/src/makefile.w32-in index e19a19645f9..71c4fa4c0ac 100644 --- a/src/makefile.w32-in +++ b/src/makefile.w32-in | |||
| @@ -397,6 +397,7 @@ PROCESS_H = $(SRC)/process.h \ | |||
| 397 | $(BLD)/alloc.$(O) : \ | 397 | $(BLD)/alloc.$(O) : \ |
| 398 | $(SRC)/alloc.c \ | 398 | $(SRC)/alloc.c \ |
| 399 | $(CONFIG_H) \ | 399 | $(CONFIG_H) \ |
| 400 | $(EMACS_ROOT)/nt/inc/unistd.h \ | ||
| 400 | $(EMACS_ROOT)/nt/inc/sys/time.h \ | 401 | $(EMACS_ROOT)/nt/inc/sys/time.h \ |
| 401 | $(LISP_H) \ | 402 | $(LISP_H) \ |
| 402 | $(PROCESS_H) \ | 403 | $(PROCESS_H) \ |
| @@ -432,12 +433,14 @@ $(BLD)/atimer.$(O) : \ | |||
| 432 | $(BLD)/bidi.$(O) : \ | 433 | $(BLD)/bidi.$(O) : \ |
| 433 | $(SRC)/bidi.c \ | 434 | $(SRC)/bidi.c \ |
| 434 | $(CONFIG_H) \ | 435 | $(CONFIG_H) \ |
| 436 | $(EMACS_ROOT)/nt/inc/sys/time.h \ | ||
| 435 | $(LISP_H) \ | 437 | $(LISP_H) \ |
| 436 | $(SRC)/bidimirror.h \ | 438 | $(SRC)/bidimirror.h \ |
| 437 | $(SRC)/biditype.h \ | 439 | $(SRC)/biditype.h \ |
| 438 | $(SRC)/buffer.h \ | 440 | $(SRC)/buffer.h \ |
| 439 | $(SRC)/character.h \ | 441 | $(SRC)/character.h \ |
| 440 | $(SRC)/dispextern.h \ | 442 | $(SRC)/dispextern.h \ |
| 443 | $(SRC)/systime.h \ | ||
| 441 | $(SRC)/w32gui.h | 444 | $(SRC)/w32gui.h |
| 442 | 445 | ||
| 443 | $(BLD)/buffer.$(O) : \ | 446 | $(BLD)/buffer.$(O) : \ |
| @@ -468,11 +471,13 @@ $(BLD)/buffer.$(O) : \ | |||
| 468 | $(BLD)/bytecode.$(O) : \ | 471 | $(BLD)/bytecode.$(O) : \ |
| 469 | $(SRC)/bytecode.c \ | 472 | $(SRC)/bytecode.c \ |
| 470 | $(CONFIG_H) \ | 473 | $(CONFIG_H) \ |
| 474 | $(EMACS_ROOT)/nt/inc/sys/time.h \ | ||
| 471 | $(LISP_H) \ | 475 | $(LISP_H) \ |
| 472 | $(SRC)/buffer.h \ | 476 | $(SRC)/buffer.h \ |
| 473 | $(SRC)/character.h \ | 477 | $(SRC)/character.h \ |
| 474 | $(SRC)/dispextern.h \ | 478 | $(SRC)/dispextern.h \ |
| 475 | $(SRC)/syntax.h \ | 479 | $(SRC)/syntax.h \ |
| 480 | $(SRC)/systime.h \ | ||
| 476 | $(SRC)/w32gui.h \ | 481 | $(SRC)/w32gui.h \ |
| 477 | $(SRC)/window.h | 482 | $(SRC)/window.h |
| 478 | 483 | ||
| @@ -496,6 +501,7 @@ $(BLD)/callint.$(O) : \ | |||
| 496 | $(BLD)/callproc.$(O) : \ | 501 | $(BLD)/callproc.$(O) : \ |
| 497 | $(SRC)/callproc.c \ | 502 | $(SRC)/callproc.c \ |
| 498 | $(CONFIG_H) \ | 503 | $(CONFIG_H) \ |
| 504 | $(EMACS_ROOT)/nt/inc/unistd.h \ | ||
| 499 | $(EMACS_ROOT)/nt/inc/sys/file.h \ | 505 | $(EMACS_ROOT)/nt/inc/sys/file.h \ |
| 500 | $(EMACS_ROOT)/nt/inc/sys/ioctl.h \ | 506 | $(EMACS_ROOT)/nt/inc/sys/ioctl.h \ |
| 501 | $(EMACS_ROOT)/nt/inc/sys/time.h \ | 507 | $(EMACS_ROOT)/nt/inc/sys/time.h \ |
| @@ -560,6 +566,7 @@ $(BLD)/ccl.$(O) : \ | |||
| 560 | $(BLD)/character.$(O) : \ | 566 | $(BLD)/character.$(O) : \ |
| 561 | $(SRC)/character.c \ | 567 | $(SRC)/character.c \ |
| 562 | $(CONFIG_H) \ | 568 | $(CONFIG_H) \ |
| 569 | $(EMACS_ROOT)/lib/intprops.h \ | ||
| 563 | $(LISP_H) \ | 570 | $(LISP_H) \ |
| 564 | $(SRC)/buffer.h \ | 571 | $(SRC)/buffer.h \ |
| 565 | $(SRC)/character.h \ | 572 | $(SRC)/character.h \ |
| @@ -609,6 +616,7 @@ $(BLD)/cmds.$(O) : \ | |||
| 609 | $(BLD)/coding.$(O) : \ | 616 | $(BLD)/coding.$(O) : \ |
| 610 | $(SRC)/coding.c \ | 617 | $(SRC)/coding.c \ |
| 611 | $(CONFIG_H) \ | 618 | $(CONFIG_H) \ |
| 619 | $(EMACS_ROOT)/nt/inc/sys/time.h \ | ||
| 612 | $(LISP_H) \ | 620 | $(LISP_H) \ |
| 613 | $(SRC)/buffer.h \ | 621 | $(SRC)/buffer.h \ |
| 614 | $(SRC)/ccl.h \ | 622 | $(SRC)/ccl.h \ |
| @@ -618,6 +626,7 @@ $(BLD)/coding.$(O) : \ | |||
| 618 | $(SRC)/composite.h \ | 626 | $(SRC)/composite.h \ |
| 619 | $(SRC)/dispextern.h \ | 627 | $(SRC)/dispextern.h \ |
| 620 | $(SRC)/frame.h \ | 628 | $(SRC)/frame.h \ |
| 629 | $(SRC)/systime.h \ | ||
| 621 | $(SRC)/termhooks.h \ | 630 | $(SRC)/termhooks.h \ |
| 622 | $(SRC)/w32gui.h \ | 631 | $(SRC)/w32gui.h \ |
| 623 | $(SRC)/window.h | 632 | $(SRC)/window.h |
| @@ -625,6 +634,7 @@ $(BLD)/coding.$(O) : \ | |||
| 625 | $(BLD)/composite.$(O) : \ | 634 | $(BLD)/composite.$(O) : \ |
| 626 | $(SRC)/composite.c \ | 635 | $(SRC)/composite.c \ |
| 627 | $(CONFIG_H) \ | 636 | $(CONFIG_H) \ |
| 637 | $(EMACS_ROOT)/nt/inc/sys/time.h \ | ||
| 628 | $(LISP_H) \ | 638 | $(LISP_H) \ |
| 629 | $(SRC)/buffer.h \ | 639 | $(SRC)/buffer.h \ |
| 630 | $(SRC)/ccl.h \ | 640 | $(SRC)/ccl.h \ |
| @@ -635,6 +645,7 @@ $(BLD)/composite.$(O) : \ | |||
| 635 | $(SRC)/font.h \ | 645 | $(SRC)/font.h \ |
| 636 | $(SRC)/frame.h \ | 646 | $(SRC)/frame.h \ |
| 637 | $(SRC)/intervals.h \ | 647 | $(SRC)/intervals.h \ |
| 648 | $(SRC)/systime.h \ | ||
| 638 | $(SRC)/termhooks.h \ | 649 | $(SRC)/termhooks.h \ |
| 639 | $(SRC)/w32gui.h \ | 650 | $(SRC)/w32gui.h \ |
| 640 | $(SRC)/window.h | 651 | $(SRC)/window.h |
| @@ -684,6 +695,7 @@ $(BLD)/dired.$(O) : \ | |||
| 684 | $(BLD)/dispnew.$(O) : \ | 695 | $(BLD)/dispnew.$(O) : \ |
| 685 | $(SRC)/dispnew.c \ | 696 | $(SRC)/dispnew.c \ |
| 686 | $(CONFIG_H) \ | 697 | $(CONFIG_H) \ |
| 698 | $(EMACS_ROOT)/nt/inc/unistd.h \ | ||
| 687 | $(EMACS_ROOT)/nt/inc/sys/time.h \ | 699 | $(EMACS_ROOT)/nt/inc/sys/time.h \ |
| 688 | $(LISP_H) \ | 700 | $(LISP_H) \ |
| 689 | $(PROCESS_H) \ | 701 | $(PROCESS_H) \ |
| @@ -758,6 +770,7 @@ $(BLD)/editfns.$(O) : \ | |||
| 758 | $(BLD)/emacs.$(O) : \ | 770 | $(BLD)/emacs.$(O) : \ |
| 759 | $(SRC)/emacs.c \ | 771 | $(SRC)/emacs.c \ |
| 760 | $(CONFIG_H) \ | 772 | $(CONFIG_H) \ |
| 773 | $(EMACS_ROOT)/nt/inc/unistd.h \ | ||
| 761 | $(EMACS_ROOT)/nt/inc/sys/file.h \ | 774 | $(EMACS_ROOT)/nt/inc/sys/file.h \ |
| 762 | $(EMACS_ROOT)/nt/inc/sys/ioctl.h \ | 775 | $(EMACS_ROOT)/nt/inc/sys/ioctl.h \ |
| 763 | $(EMACS_ROOT)/nt/inc/sys/time.h \ | 776 | $(EMACS_ROOT)/nt/inc/sys/time.h \ |
| @@ -873,6 +886,7 @@ $(BLD)/fns.$(O) : \ | |||
| 873 | $(BLD)/font.$(O) : \ | 886 | $(BLD)/font.$(O) : \ |
| 874 | $(SRC)/font.c \ | 887 | $(SRC)/font.c \ |
| 875 | $(CONFIG_H) \ | 888 | $(CONFIG_H) \ |
| 889 | $(EMACS_ROOT)/nt/inc/sys/time.h \ | ||
| 876 | $(LISP_H) \ | 890 | $(LISP_H) \ |
| 877 | $(SRC)/buffer.h \ | 891 | $(SRC)/buffer.h \ |
| 878 | $(SRC)/ccl.h \ | 892 | $(SRC)/ccl.h \ |
| @@ -883,6 +897,7 @@ $(BLD)/font.$(O) : \ | |||
| 883 | $(SRC)/font.h \ | 897 | $(SRC)/font.h \ |
| 884 | $(SRC)/fontset.h \ | 898 | $(SRC)/fontset.h \ |
| 885 | $(SRC)/frame.h \ | 899 | $(SRC)/frame.h \ |
| 900 | $(SRC)/systime.h \ | ||
| 886 | $(SRC)/w32gui.h \ | 901 | $(SRC)/w32gui.h \ |
| 887 | $(SRC)/w32term.h \ | 902 | $(SRC)/w32term.h \ |
| 888 | $(SRC)/window.h | 903 | $(SRC)/window.h |
| @@ -961,6 +976,7 @@ $(BLD)/gmalloc.$(O) : \ | |||
| 961 | $(BLD)/gnutls.$(O) : \ | 976 | $(BLD)/gnutls.$(O) : \ |
| 962 | $(SRC)/gnutls.c \ | 977 | $(SRC)/gnutls.c \ |
| 963 | $(CONFIG_H) \ | 978 | $(CONFIG_H) \ |
| 979 | $(EMACS_ROOT)/nt/inc/unistd.h \ | ||
| 964 | $(LISP_H) \ | 980 | $(LISP_H) \ |
| 965 | $(PROCESS_H) \ | 981 | $(PROCESS_H) \ |
| 966 | $(SRC)/w32.h | 982 | $(SRC)/w32.h |
| @@ -1015,6 +1031,7 @@ $(BLD)/insdel.$(O) : \ | |||
| 1015 | $(SRC)/insdel.c \ | 1031 | $(SRC)/insdel.c \ |
| 1016 | $(CONFIG_H) \ | 1032 | $(CONFIG_H) \ |
| 1017 | $(EMACS_ROOT)/nt/inc/sys/time.h \ | 1033 | $(EMACS_ROOT)/nt/inc/sys/time.h \ |
| 1034 | $(EMACS_ROOT)/lib/intprops.h \ | ||
| 1018 | $(LISP_H) \ | 1035 | $(LISP_H) \ |
| 1019 | $(SRC)/atimer.h \ | 1036 | $(SRC)/atimer.h \ |
| 1020 | $(SRC)/blockinput.h \ | 1037 | $(SRC)/blockinput.h \ |
| @@ -1048,6 +1065,7 @@ $(BLD)/intervals.$(O) : \ | |||
| 1048 | $(BLD)/keyboard.$(O) : \ | 1065 | $(BLD)/keyboard.$(O) : \ |
| 1049 | $(SRC)/keyboard.c \ | 1066 | $(SRC)/keyboard.c \ |
| 1050 | $(CONFIG_H) \ | 1067 | $(CONFIG_H) \ |
| 1068 | $(EMACS_ROOT)/nt/inc/unistd.h \ | ||
| 1051 | $(EMACS_ROOT)/nt/inc/sys/ioctl.h \ | 1069 | $(EMACS_ROOT)/nt/inc/sys/ioctl.h \ |
| 1052 | $(EMACS_ROOT)/nt/inc/sys/time.h \ | 1070 | $(EMACS_ROOT)/nt/inc/sys/time.h \ |
| 1053 | $(LISP_H) \ | 1071 | $(LISP_H) \ |
| @@ -1198,6 +1216,7 @@ $(BLD)/w32.$(O) : \ | |||
| 1198 | $(CONFIG_H) \ | 1216 | $(CONFIG_H) \ |
| 1199 | $(EMACS_ROOT)/nt/inc/grp.h \ | 1217 | $(EMACS_ROOT)/nt/inc/grp.h \ |
| 1200 | $(EMACS_ROOT)/nt/inc/pwd.h \ | 1218 | $(EMACS_ROOT)/nt/inc/pwd.h \ |
| 1219 | $(EMACS_ROOT)/nt/inc/unistd.h \ | ||
| 1201 | $(EMACS_ROOT)/nt/inc/sys/file.h \ | 1220 | $(EMACS_ROOT)/nt/inc/sys/file.h \ |
| 1202 | $(EMACS_ROOT)/nt/inc/sys/socket.h \ | 1221 | $(EMACS_ROOT)/nt/inc/sys/socket.h \ |
| 1203 | $(EMACS_ROOT)/nt/inc/sys/time.h \ | 1222 | $(EMACS_ROOT)/nt/inc/sys/time.h \ |
| @@ -1243,6 +1262,7 @@ $(BLD)/w32proc.$(O) : \ | |||
| 1243 | $(CONFIG_H) \ | 1262 | $(CONFIG_H) \ |
| 1244 | $(EMACS_ROOT)/nt/inc/langinfo.h \ | 1263 | $(EMACS_ROOT)/nt/inc/langinfo.h \ |
| 1245 | $(EMACS_ROOT)/nt/inc/nl_types.h \ | 1264 | $(EMACS_ROOT)/nt/inc/nl_types.h \ |
| 1265 | $(EMACS_ROOT)/nt/inc/unistd.h \ | ||
| 1246 | $(EMACS_ROOT)/nt/inc/sys/file.h \ | 1266 | $(EMACS_ROOT)/nt/inc/sys/file.h \ |
| 1247 | $(EMACS_ROOT)/nt/inc/sys/time.h \ | 1267 | $(EMACS_ROOT)/nt/inc/sys/time.h \ |
| 1248 | $(LISP_H) \ | 1268 | $(LISP_H) \ |
| @@ -1262,6 +1282,7 @@ $(BLD)/w32proc.$(O) : \ | |||
| 1262 | $(BLD)/w32console.$(O) : \ | 1282 | $(BLD)/w32console.$(O) : \ |
| 1263 | $(SRC)/w32console.c \ | 1283 | $(SRC)/w32console.c \ |
| 1264 | $(CONFIG_H) \ | 1284 | $(CONFIG_H) \ |
| 1285 | $(EMACS_ROOT)/nt/inc/sys/time.h \ | ||
| 1265 | $(LISP_H) \ | 1286 | $(LISP_H) \ |
| 1266 | $(SRC)/character.h \ | 1287 | $(SRC)/character.h \ |
| 1267 | $(SRC)/coding.h \ | 1288 | $(SRC)/coding.h \ |
| @@ -1269,6 +1290,7 @@ $(BLD)/w32console.$(O) : \ | |||
| 1269 | $(SRC)/dispextern.h \ | 1290 | $(SRC)/dispextern.h \ |
| 1270 | $(SRC)/disptab.h \ | 1291 | $(SRC)/disptab.h \ |
| 1271 | $(SRC)/frame.h \ | 1292 | $(SRC)/frame.h \ |
| 1293 | $(SRC)/systime.h \ | ||
| 1272 | $(SRC)/termchar.h \ | 1294 | $(SRC)/termchar.h \ |
| 1273 | $(SRC)/termhooks.h \ | 1295 | $(SRC)/termhooks.h \ |
| 1274 | $(SRC)/w32gui.h \ | 1296 | $(SRC)/w32gui.h \ |
| @@ -1277,6 +1299,7 @@ $(BLD)/w32console.$(O) : \ | |||
| 1277 | $(BLD)/print.$(O) : \ | 1299 | $(BLD)/print.$(O) : \ |
| 1278 | $(SRC)/print.c \ | 1300 | $(SRC)/print.c \ |
| 1279 | $(CONFIG_H) \ | 1301 | $(CONFIG_H) \ |
| 1302 | $(EMACS_ROOT)/nt/inc/unistd.h \ | ||
| 1280 | $(EMACS_ROOT)/nt/inc/sys/time.h \ | 1303 | $(EMACS_ROOT)/nt/inc/sys/time.h \ |
| 1281 | $(EMACS_ROOT)/lib/ftoastr.h \ | 1304 | $(EMACS_ROOT)/lib/ftoastr.h \ |
| 1282 | $(EMACS_ROOT)/lib/intprops.h \ | 1305 | $(EMACS_ROOT)/lib/intprops.h \ |
| @@ -1305,6 +1328,7 @@ $(BLD)/process.$(O) : \ | |||
| 1305 | $(SRC)/process.c \ | 1328 | $(SRC)/process.c \ |
| 1306 | $(CONFIG_H) \ | 1329 | $(CONFIG_H) \ |
| 1307 | $(EMACS_ROOT)/nt/inc/netdb.h \ | 1330 | $(EMACS_ROOT)/nt/inc/netdb.h \ |
| 1331 | $(EMACS_ROOT)/nt/inc/unistd.h \ | ||
| 1308 | $(EMACS_ROOT)/nt/inc/arpa/inet.h \ | 1332 | $(EMACS_ROOT)/nt/inc/arpa/inet.h \ |
| 1309 | $(EMACS_ROOT)/nt/inc/netinet/in.h \ | 1333 | $(EMACS_ROOT)/nt/inc/netinet/in.h \ |
| 1310 | $(EMACS_ROOT)/nt/inc/sys/file.h \ | 1334 | $(EMACS_ROOT)/nt/inc/sys/file.h \ |
| @@ -1414,6 +1438,7 @@ $(BLD)/sound.$(O) : \ | |||
| 1414 | $(BLD)/syntax.$(O) : \ | 1438 | $(BLD)/syntax.$(O) : \ |
| 1415 | $(SRC)/syntax.c \ | 1439 | $(SRC)/syntax.c \ |
| 1416 | $(CONFIG_H) \ | 1440 | $(CONFIG_H) \ |
| 1441 | $(EMACS_ROOT)/nt/inc/sys/time.h \ | ||
| 1417 | $(LISP_H) \ | 1442 | $(LISP_H) \ |
| 1418 | $(SRC)/buffer.h \ | 1443 | $(SRC)/buffer.h \ |
| 1419 | $(SRC)/category.h \ | 1444 | $(SRC)/category.h \ |
| @@ -1425,6 +1450,7 @@ $(BLD)/syntax.$(O) : \ | |||
| 1425 | $(SRC)/keymap.h \ | 1450 | $(SRC)/keymap.h \ |
| 1426 | $(SRC)/regex.h \ | 1451 | $(SRC)/regex.h \ |
| 1427 | $(SRC)/syntax.h \ | 1452 | $(SRC)/syntax.h \ |
| 1453 | $(SRC)/systime.h \ | ||
| 1428 | $(SRC)/w32gui.h | 1454 | $(SRC)/w32gui.h |
| 1429 | 1455 | ||
| 1430 | $(BLD)/sysdep.$(O) : \ | 1456 | $(BLD)/sysdep.$(O) : \ |
| @@ -1433,6 +1459,7 @@ $(BLD)/sysdep.$(O) : \ | |||
| 1433 | $(EMACS_ROOT)/nt/inc/grp.h \ | 1459 | $(EMACS_ROOT)/nt/inc/grp.h \ |
| 1434 | $(EMACS_ROOT)/nt/inc/netdb.h \ | 1460 | $(EMACS_ROOT)/nt/inc/netdb.h \ |
| 1435 | $(EMACS_ROOT)/nt/inc/pwd.h \ | 1461 | $(EMACS_ROOT)/nt/inc/pwd.h \ |
| 1462 | $(EMACS_ROOT)/nt/inc/unistd.h \ | ||
| 1436 | $(EMACS_ROOT)/nt/inc/sys/file.h \ | 1463 | $(EMACS_ROOT)/nt/inc/sys/file.h \ |
| 1437 | $(EMACS_ROOT)/nt/inc/sys/ioctl.h \ | 1464 | $(EMACS_ROOT)/nt/inc/sys/ioctl.h \ |
| 1438 | $(EMACS_ROOT)/nt/inc/sys/socket.h \ | 1465 | $(EMACS_ROOT)/nt/inc/sys/socket.h \ |
| @@ -1513,11 +1540,13 @@ $(BLD)/terminal.$(O) : \ | |||
| 1513 | $(BLD)/textprop.$(O) : \ | 1540 | $(BLD)/textprop.$(O) : \ |
| 1514 | $(SRC)/textprop.c \ | 1541 | $(SRC)/textprop.c \ |
| 1515 | $(CONFIG_H) \ | 1542 | $(CONFIG_H) \ |
| 1543 | $(EMACS_ROOT)/nt/inc/sys/time.h \ | ||
| 1516 | $(LISP_H) \ | 1544 | $(LISP_H) \ |
| 1517 | $(SRC)/buffer.h \ | 1545 | $(SRC)/buffer.h \ |
| 1518 | $(SRC)/composite.h \ | 1546 | $(SRC)/composite.h \ |
| 1519 | $(SRC)/dispextern.h \ | 1547 | $(SRC)/dispextern.h \ |
| 1520 | $(SRC)/intervals.h \ | 1548 | $(SRC)/intervals.h \ |
| 1549 | $(SRC)/systime.h \ | ||
| 1521 | $(SRC)/w32gui.h \ | 1550 | $(SRC)/w32gui.h \ |
| 1522 | $(SRC)/window.h | 1551 | $(SRC)/window.h |
| 1523 | 1552 | ||
| @@ -1530,10 +1559,12 @@ $(BLD)/tparam.$(O) : \ | |||
| 1530 | $(BLD)/undo.$(O) : \ | 1559 | $(BLD)/undo.$(O) : \ |
| 1531 | $(SRC)/undo.c \ | 1560 | $(SRC)/undo.c \ |
| 1532 | $(CONFIG_H) \ | 1561 | $(CONFIG_H) \ |
| 1562 | $(EMACS_ROOT)/nt/inc/sys/time.h \ | ||
| 1533 | $(LISP_H) \ | 1563 | $(LISP_H) \ |
| 1534 | $(SRC)/buffer.h \ | 1564 | $(SRC)/buffer.h \ |
| 1535 | $(SRC)/commands.h \ | 1565 | $(SRC)/commands.h \ |
| 1536 | $(SRC)/dispextern.h \ | 1566 | $(SRC)/dispextern.h \ |
| 1567 | $(SRC)/systime.h \ | ||
| 1537 | $(SRC)/w32gui.h \ | 1568 | $(SRC)/w32gui.h \ |
| 1538 | $(SRC)/window.h | 1569 | $(SRC)/window.h |
| 1539 | 1570 | ||
| @@ -1577,6 +1608,7 @@ $(BLD)/window.$(O) : \ | |||
| 1577 | $(BLD)/xdisp.$(O) : \ | 1608 | $(BLD)/xdisp.$(O) : \ |
| 1578 | $(SRC)/xdisp.c \ | 1609 | $(SRC)/xdisp.c \ |
| 1579 | $(CONFIG_H) \ | 1610 | $(CONFIG_H) \ |
| 1611 | $(EMACS_ROOT)/nt/inc/unistd.h \ | ||
| 1580 | $(EMACS_ROOT)/nt/inc/sys/time.h \ | 1612 | $(EMACS_ROOT)/nt/inc/sys/time.h \ |
| 1581 | $(LISP_H) \ | 1613 | $(LISP_H) \ |
| 1582 | $(PROCESS_H) \ | 1614 | $(PROCESS_H) \ |
| @@ -1689,6 +1721,7 @@ $(BLD)/w32menu.$(O) : \ | |||
| 1689 | $(BLD)/w32term.$(O) : \ | 1721 | $(BLD)/w32term.$(O) : \ |
| 1690 | $(SRC)/w32term.c \ | 1722 | $(SRC)/w32term.c \ |
| 1691 | $(CONFIG_H) \ | 1723 | $(CONFIG_H) \ |
| 1724 | $(EMACS_ROOT)/nt/inc/unistd.h \ | ||
| 1692 | $(EMACS_ROOT)/nt/inc/sys/ioctl.h \ | 1725 | $(EMACS_ROOT)/nt/inc/sys/ioctl.h \ |
| 1693 | $(EMACS_ROOT)/nt/inc/sys/time.h \ | 1726 | $(EMACS_ROOT)/nt/inc/sys/time.h \ |
| 1694 | $(LISP_H) \ | 1727 | $(LISP_H) \ |
| @@ -1768,6 +1801,7 @@ $(BLD)/w32xfns.$(O) : \ | |||
| 1768 | $(BLD)/w32font.$(O) : \ | 1801 | $(BLD)/w32font.$(O) : \ |
| 1769 | $(SRC)/w32font.c \ | 1802 | $(SRC)/w32font.c \ |
| 1770 | $(CONFIG_H) \ | 1803 | $(CONFIG_H) \ |
| 1804 | $(EMACS_ROOT)/nt/inc/sys/time.h \ | ||
| 1771 | $(LISP_H) \ | 1805 | $(LISP_H) \ |
| 1772 | $(SRC)/ccl.h \ | 1806 | $(SRC)/ccl.h \ |
| 1773 | $(SRC)/character.h \ | 1807 | $(SRC)/character.h \ |
| @@ -1778,6 +1812,7 @@ $(BLD)/w32font.$(O) : \ | |||
| 1778 | $(SRC)/font.h \ | 1812 | $(SRC)/font.h \ |
| 1779 | $(SRC)/fontset.h \ | 1813 | $(SRC)/fontset.h \ |
| 1780 | $(SRC)/frame.h \ | 1814 | $(SRC)/frame.h \ |
| 1815 | $(SRC)/systime.h \ | ||
| 1781 | $(SRC)/w32font.h \ | 1816 | $(SRC)/w32font.h \ |
| 1782 | $(SRC)/w32gui.h \ | 1817 | $(SRC)/w32gui.h \ |
| 1783 | $(SRC)/w32term.h | 1818 | $(SRC)/w32term.h |
| @@ -1785,6 +1820,7 @@ $(BLD)/w32font.$(O) : \ | |||
| 1785 | $(BLD)/w32uniscribe.$(O) : \ | 1820 | $(BLD)/w32uniscribe.$(O) : \ |
| 1786 | $(SRC)/w32uniscribe.c \ | 1821 | $(SRC)/w32uniscribe.c \ |
| 1787 | $(CONFIG_H) \ | 1822 | $(CONFIG_H) \ |
| 1823 | $(EMACS_ROOT)/nt/inc/sys/time.h \ | ||
| 1788 | $(LISP_H) \ | 1824 | $(LISP_H) \ |
| 1789 | $(SRC)/ccl.h \ | 1825 | $(SRC)/ccl.h \ |
| 1790 | $(SRC)/character.h \ | 1826 | $(SRC)/character.h \ |
| @@ -1794,6 +1830,7 @@ $(BLD)/w32uniscribe.$(O) : \ | |||
| 1794 | $(SRC)/font.h \ | 1830 | $(SRC)/font.h \ |
| 1795 | $(SRC)/fontset.h \ | 1831 | $(SRC)/fontset.h \ |
| 1796 | $(SRC)/frame.h \ | 1832 | $(SRC)/frame.h \ |
| 1833 | $(SRC)/systime.h \ | ||
| 1797 | $(SRC)/w32font.h \ | 1834 | $(SRC)/w32font.h \ |
| 1798 | $(SRC)/w32gui.h \ | 1835 | $(SRC)/w32gui.h \ |
| 1799 | $(SRC)/w32term.h | 1836 | $(SRC)/w32term.h |
diff --git a/src/menu.c b/src/menu.c index 7a3edcb6f4f..e4338f349f6 100644 --- a/src/menu.c +++ b/src/menu.c | |||
| @@ -21,6 +21,7 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | |||
| 21 | #include <config.h> | 21 | #include <config.h> |
| 22 | #include <stdio.h> | 22 | #include <stdio.h> |
| 23 | #include <setjmp.h> | 23 | #include <setjmp.h> |
| 24 | #include <limits.h> /* for INT_MAX */ | ||
| 24 | 25 | ||
| 25 | #include "lisp.h" | 26 | #include "lisp.h" |
| 26 | #include "keyboard.h" | 27 | #include "keyboard.h" |
| @@ -176,6 +177,8 @@ save_menu_items (void) | |||
| 176 | static void | 177 | static void |
| 177 | grow_menu_items (void) | 178 | grow_menu_items (void) |
| 178 | { | 179 | { |
| 180 | if ((INT_MAX - MENU_ITEMS_PANE_LENGTH) / 2 < menu_items_allocated) | ||
| 181 | memory_full (); | ||
| 179 | menu_items_allocated *= 2; | 182 | menu_items_allocated *= 2; |
| 180 | menu_items = larger_vector (menu_items, menu_items_allocated, Qnil); | 183 | menu_items = larger_vector (menu_items, menu_items_allocated, Qnil); |
| 181 | } | 184 | } |
| @@ -1145,13 +1148,13 @@ no quit occurs and `x-popup-menu' returns nil. */) | |||
| 1145 | #else /* not HAVE_X_WINDOWS */ | 1148 | #else /* not HAVE_X_WINDOWS */ |
| 1146 | Lisp_Object bar_window; | 1149 | Lisp_Object bar_window; |
| 1147 | enum scroll_bar_part part; | 1150 | enum scroll_bar_part part; |
| 1148 | unsigned long time; | 1151 | Time time; |
| 1149 | void (*mouse_position_hook) (struct frame **, int, | 1152 | void (*mouse_position_hook) (struct frame **, int, |
| 1150 | Lisp_Object *, | 1153 | Lisp_Object *, |
| 1151 | enum scroll_bar_part *, | 1154 | enum scroll_bar_part *, |
| 1152 | Lisp_Object *, | 1155 | Lisp_Object *, |
| 1153 | Lisp_Object *, | 1156 | Lisp_Object *, |
| 1154 | unsigned long *) = | 1157 | Time *) = |
| 1155 | FRAME_TERMINAL (new_f)->mouse_position_hook; | 1158 | FRAME_TERMINAL (new_f)->mouse_position_hook; |
| 1156 | 1159 | ||
| 1157 | if (mouse_position_hook) | 1160 | if (mouse_position_hook) |
diff --git a/src/menu.h b/src/menu.h index c3978dae8eb..451401b42d5 100644 --- a/src/menu.h +++ b/src/menu.h | |||
| @@ -19,6 +19,8 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | |||
| 19 | #ifndef MENU_H | 19 | #ifndef MENU_H |
| 20 | #define MENU_H | 20 | #define MENU_H |
| 21 | 21 | ||
| 22 | #include "systime.h" /* for Time */ | ||
| 23 | |||
| 22 | extern void x_set_menu_bar_lines (struct frame *f, | 24 | extern void x_set_menu_bar_lines (struct frame *f, |
| 23 | Lisp_Object value, | 25 | Lisp_Object value, |
| 24 | Lisp_Object oldval); | 26 | Lisp_Object oldval); |
| @@ -48,6 +50,5 @@ extern Lisp_Object w32_menu_show (FRAME_PTR, int, int, int, int, | |||
| 48 | extern Lisp_Object ns_menu_show (FRAME_PTR, int, int, int, int, | 50 | extern Lisp_Object ns_menu_show (FRAME_PTR, int, int, int, int, |
| 49 | Lisp_Object, const char **); | 51 | Lisp_Object, const char **); |
| 50 | extern Lisp_Object xmenu_show (FRAME_PTR, int, int, int, int, | 52 | extern Lisp_Object xmenu_show (FRAME_PTR, int, int, int, int, |
| 51 | Lisp_Object, const char **, EMACS_UINT); | 53 | Lisp_Object, const char **, Time); |
| 52 | #endif /* MENU_H */ | 54 | #endif /* MENU_H */ |
| 53 | |||
diff --git a/src/msdos.c b/src/msdos.c index 3dc586e42f5..73804df55cc 100644 --- a/src/msdos.c +++ b/src/msdos.c | |||
| @@ -287,7 +287,7 @@ mouse_button_depressed (int b, int *xp, int *yp) | |||
| 287 | void | 287 | void |
| 288 | mouse_get_pos (FRAME_PTR *f, int insist, Lisp_Object *bar_window, | 288 | mouse_get_pos (FRAME_PTR *f, int insist, Lisp_Object *bar_window, |
| 289 | enum scroll_bar_part *part, Lisp_Object *x, Lisp_Object *y, | 289 | enum scroll_bar_part *part, Lisp_Object *x, Lisp_Object *y, |
| 290 | unsigned long *time) | 290 | Time *time) |
| 291 | { | 291 | { |
| 292 | int ix, iy; | 292 | int ix, iy; |
| 293 | Lisp_Object frame, tail; | 293 | Lisp_Object frame, tail; |
diff --git a/src/nsterm.m b/src/nsterm.m index c4756dc83cd..ac9c44a57a9 100644 --- a/src/nsterm.m +++ b/src/nsterm.m | |||
| @@ -158,7 +158,7 @@ long context_menu_value = 0; | |||
| 158 | /* display update */ | 158 | /* display update */ |
| 159 | NSPoint last_mouse_motion_position; | 159 | NSPoint last_mouse_motion_position; |
| 160 | static NSRect last_mouse_glyph; | 160 | static NSRect last_mouse_glyph; |
| 161 | static unsigned long last_mouse_movement_time = 0; | 161 | static Time last_mouse_movement_time = 0; |
| 162 | static Lisp_Object last_mouse_motion_frame; | 162 | static Lisp_Object last_mouse_motion_frame; |
| 163 | static EmacsScroller *last_mouse_scroll_bar = nil; | 163 | static EmacsScroller *last_mouse_scroll_bar = nil; |
| 164 | static struct frame *ns_updating_frame; | 164 | static struct frame *ns_updating_frame; |
| @@ -1789,7 +1789,7 @@ note_mouse_movement (struct frame *frame, float x, float y) | |||
| 1789 | static void | 1789 | static void |
| 1790 | ns_mouse_position (struct frame **fp, int insist, Lisp_Object *bar_window, | 1790 | ns_mouse_position (struct frame **fp, int insist, Lisp_Object *bar_window, |
| 1791 | enum scroll_bar_part *part, Lisp_Object *x, Lisp_Object *y, | 1791 | enum scroll_bar_part *part, Lisp_Object *x, Lisp_Object *y, |
| 1792 | unsigned long *time) | 1792 | Time *time) |
| 1793 | /* -------------------------------------------------------------------------- | 1793 | /* -------------------------------------------------------------------------- |
| 1794 | External (hook): inform emacs about mouse position and hit parts. | 1794 | External (hook): inform emacs about mouse position and hit parts. |
| 1795 | If a scrollbar is being dragged, set bar_window, part, x, y, time. | 1795 | If a scrollbar is being dragged, set bar_window, part, x, y, time. |
| @@ -6531,5 +6531,3 @@ baseline level. The default value is nil. */); | |||
| 6531 | /* Tell emacs about this window system. */ | 6531 | /* Tell emacs about this window system. */ |
| 6532 | Fprovide (intern ("ns"), Qnil); | 6532 | Fprovide (intern ("ns"), Qnil); |
| 6533 | } | 6533 | } |
| 6534 | |||
| 6535 | |||
diff --git a/src/systime.h b/src/systime.h index cb1ea230f7d..db43b26dc5e 100644 --- a/src/systime.h +++ b/src/systime.h | |||
| @@ -30,6 +30,12 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | |||
| 30 | #endif | 30 | #endif |
| 31 | #endif | 31 | #endif |
| 32 | 32 | ||
| 33 | #ifdef HAVE_X_WINDOWS | ||
| 34 | # include <X11/X.h> | ||
| 35 | #else | ||
| 36 | typedef unsigned long Time; | ||
| 37 | #endif | ||
| 38 | |||
| 33 | #ifdef HAVE_TZNAME | 39 | #ifdef HAVE_TZNAME |
| 34 | #ifndef tzname /* For SGI. */ | 40 | #ifndef tzname /* For SGI. */ |
| 35 | extern char *tzname[]; /* RS6000 and others want it this way. */ | 41 | extern char *tzname[]; /* RS6000 and others want it this way. */ |
diff --git a/src/term.c b/src/term.c index c68228cc51a..9205719b5f4 100644 --- a/src/term.c +++ b/src/term.c | |||
| @@ -2595,6 +2595,7 @@ frame's terminal). */) | |||
| 2595 | FRAME_SET_VISIBLE (XFRAME (t->display_info.tty->top_frame), 1); | 2595 | FRAME_SET_VISIBLE (XFRAME (t->display_info.tty->top_frame), 1); |
| 2596 | } | 2596 | } |
| 2597 | 2597 | ||
| 2598 | set_tty_hooks (t); | ||
| 2598 | init_sys_modes (t->display_info.tty); | 2599 | init_sys_modes (t->display_info.tty); |
| 2599 | 2600 | ||
| 2600 | { | 2601 | { |
| @@ -2698,9 +2699,10 @@ term_mouse_movement (FRAME_PTR frame, Gpm_Event *event) | |||
| 2698 | static void | 2699 | static void |
| 2699 | term_mouse_position (FRAME_PTR *fp, int insist, Lisp_Object *bar_window, | 2700 | term_mouse_position (FRAME_PTR *fp, int insist, Lisp_Object *bar_window, |
| 2700 | enum scroll_bar_part *part, Lisp_Object *x, | 2701 | enum scroll_bar_part *part, Lisp_Object *x, |
| 2701 | Lisp_Object *y, unsigned long *timeptr) | 2702 | Lisp_Object *y, Time *timeptr) |
| 2702 | { | 2703 | { |
| 2703 | struct timeval now; | 2704 | struct timeval now; |
| 2705 | Time sec, usec; | ||
| 2704 | 2706 | ||
| 2705 | *fp = SELECTED_FRAME (); | 2707 | *fp = SELECTED_FRAME (); |
| 2706 | (*fp)->mouse_moved = 0; | 2708 | (*fp)->mouse_moved = 0; |
| @@ -2711,7 +2713,9 @@ term_mouse_position (FRAME_PTR *fp, int insist, Lisp_Object *bar_window, | |||
| 2711 | XSETINT (*x, last_mouse_x); | 2713 | XSETINT (*x, last_mouse_x); |
| 2712 | XSETINT (*y, last_mouse_y); | 2714 | XSETINT (*y, last_mouse_y); |
| 2713 | gettimeofday(&now, 0); | 2715 | gettimeofday(&now, 0); |
| 2714 | *timeptr = (now.tv_sec * 1000) + (now.tv_usec / 1000); | 2716 | sec = now.tv_sec; |
| 2717 | usec = now.tv_usec; | ||
| 2718 | *timeptr = (sec * 1000) + (usec / 1000); | ||
| 2715 | } | 2719 | } |
| 2716 | 2720 | ||
| 2717 | /* Prepare a mouse-event in *RESULT for placement in the input queue. | 2721 | /* Prepare a mouse-event in *RESULT for placement in the input queue. |
diff --git a/src/termhooks.h b/src/termhooks.h index 3a49b49aede..34e1364effd 100644 --- a/src/termhooks.h +++ b/src/termhooks.h | |||
| @@ -20,6 +20,8 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | |||
| 20 | 20 | ||
| 21 | /* Miscellanea. */ | 21 | /* Miscellanea. */ |
| 22 | 22 | ||
| 23 | #include "systime.h" /* for Time */ | ||
| 24 | |||
| 23 | struct glyph; | 25 | struct glyph; |
| 24 | struct frame; | 26 | struct frame; |
| 25 | 27 | ||
| @@ -233,7 +235,7 @@ struct input_event | |||
| 233 | int modifiers; /* See enum below for interpretation. */ | 235 | int modifiers; /* See enum below for interpretation. */ |
| 234 | 236 | ||
| 235 | Lisp_Object x, y; | 237 | Lisp_Object x, y; |
| 236 | unsigned long timestamp; | 238 | Time timestamp; |
| 237 | 239 | ||
| 238 | /* This is padding just to put the frame_or_window field | 240 | /* This is padding just to put the frame_or_window field |
| 239 | past the size of struct selection_input_event. */ | 241 | past the size of struct selection_input_event. */ |
| @@ -463,7 +465,7 @@ struct terminal | |||
| 463 | enum scroll_bar_part *part, | 465 | enum scroll_bar_part *part, |
| 464 | Lisp_Object *x, | 466 | Lisp_Object *x, |
| 465 | Lisp_Object *y, | 467 | Lisp_Object *y, |
| 466 | unsigned long *); | 468 | Time *); |
| 467 | 469 | ||
| 468 | /* The window system handling code should set this if the mouse has | 470 | /* The window system handling code should set this if the mouse has |
| 469 | moved since the last call to the mouse_position_hook. Calling that | 471 | moved since the last call to the mouse_position_hook. Calling that |
diff --git a/src/w32gui.h b/src/w32gui.h index 936709af181..2ba9cb53e22 100644 --- a/src/w32gui.h +++ b/src/w32gui.h | |||
| @@ -20,6 +20,8 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | |||
| 20 | #define EMACS_W32GUI_H | 20 | #define EMACS_W32GUI_H |
| 21 | #include <windows.h> | 21 | #include <windows.h> |
| 22 | 22 | ||
| 23 | #include "systime.h" /* for Time */ | ||
| 24 | |||
| 23 | /* Local memory management for menus. */ | 25 | /* Local memory management for menus. */ |
| 24 | #define local_heap (GetProcessHeap ()) | 26 | #define local_heap (GetProcessHeap ()) |
| 25 | #define local_alloc(n) (HeapAlloc (local_heap, HEAP_ZERO_MEMORY, (n))) | 27 | #define local_alloc(n) (HeapAlloc (local_heap, HEAP_ZERO_MEMORY, (n))) |
| @@ -47,7 +49,6 @@ typedef char * XrmDatabase; | |||
| 47 | 49 | ||
| 48 | typedef XGCValues * GC; | 50 | typedef XGCValues * GC; |
| 49 | typedef COLORREF Color; | 51 | typedef COLORREF Color; |
| 50 | typedef DWORD Time; | ||
| 51 | typedef HWND Window; | 52 | typedef HWND Window; |
| 52 | typedef HDC Display; /* HDC so it doesn't conflict with xpm lib. */ | 53 | typedef HDC Display; /* HDC so it doesn't conflict with xpm lib. */ |
| 53 | typedef HCURSOR Cursor; | 54 | typedef HCURSOR Cursor; |
| @@ -147,4 +148,3 @@ typedef struct { | |||
| 147 | 148 | ||
| 148 | 149 | ||
| 149 | #endif /* EMACS_W32GUI_H */ | 150 | #endif /* EMACS_W32GUI_H */ |
| 150 | |||
diff --git a/src/w32inevt.c b/src/w32inevt.c index 465f5ccb70f..fddde61663f 100644 --- a/src/w32inevt.c +++ b/src/w32inevt.c | |||
| @@ -45,7 +45,7 @@ extern HANDLE keyboard_handle; | |||
| 45 | 45 | ||
| 46 | /* Info for last mouse motion */ | 46 | /* Info for last mouse motion */ |
| 47 | static COORD movement_pos; | 47 | static COORD movement_pos; |
| 48 | static DWORD movement_time; | 48 | static Time movement_time; |
| 49 | 49 | ||
| 50 | /* from w32fns.c */ | 50 | /* from w32fns.c */ |
| 51 | extern unsigned int map_keypad_keys (unsigned int, unsigned int); | 51 | extern unsigned int map_keypad_keys (unsigned int, unsigned int); |
| @@ -544,7 +544,7 @@ w32_console_mouse_position (FRAME_PTR *f, | |||
| 544 | enum scroll_bar_part *part, | 544 | enum scroll_bar_part *part, |
| 545 | Lisp_Object *x, | 545 | Lisp_Object *x, |
| 546 | Lisp_Object *y, | 546 | Lisp_Object *y, |
| 547 | unsigned long *time) | 547 | Time *time) |
| 548 | { | 548 | { |
| 549 | BLOCK_INPUT; | 549 | BLOCK_INPUT; |
| 550 | 550 | ||
| @@ -756,4 +756,3 @@ w32_console_read_socket (struct terminal *terminal, | |||
| 756 | UNBLOCK_INPUT; | 756 | UNBLOCK_INPUT; |
| 757 | return ret; | 757 | return ret; |
| 758 | } | 758 | } |
| 759 | |||
diff --git a/src/w32menu.c b/src/w32menu.c index ca763b553cf..e2f6de7f0c8 100644 --- a/src/w32menu.c +++ b/src/w32menu.c | |||
| @@ -146,7 +146,7 @@ otherwise it is "Question". */) | |||
| 146 | FRAME_PTR new_f = SELECTED_FRAME (); | 146 | FRAME_PTR new_f = SELECTED_FRAME (); |
| 147 | Lisp_Object bar_window; | 147 | Lisp_Object bar_window; |
| 148 | enum scroll_bar_part part; | 148 | enum scroll_bar_part part; |
| 149 | unsigned long time; | 149 | Time time; |
| 150 | Lisp_Object x, y; | 150 | Lisp_Object x, y; |
| 151 | 151 | ||
| 152 | (*mouse_position_hook) (&new_f, 1, &bar_window, &part, &x, &y, &time); | 152 | (*mouse_position_hook) (&new_f, 1, &bar_window, &part, &x, &y, &time); |
diff --git a/src/window.c b/src/window.c index 4dbee41c5f4..bc9f31e03e8 100644 --- a/src/window.c +++ b/src/window.c | |||
| @@ -3094,11 +3094,14 @@ size_window (Lisp_Object window, int size, int width_p, int nodelete_p, int firs | |||
| 3094 | Lisp_Object last_child; | 3094 | Lisp_Object last_child; |
| 3095 | int child_size; | 3095 | int child_size; |
| 3096 | 3096 | ||
| 3097 | for (child = *forward; !NILP (child); child = c->next) | 3097 | child = *forward; |
| 3098 | do | ||
| 3098 | { | 3099 | { |
| 3099 | c = XWINDOW (child); | 3100 | c = XWINDOW (child); |
| 3100 | last_child = child; | 3101 | last_child = child; |
| 3102 | child = c->next; | ||
| 3101 | } | 3103 | } |
| 3104 | while (!NILP (child)); | ||
| 3102 | 3105 | ||
| 3103 | child_size = WINDOW_TOTAL_SIZE (c, width_p); | 3106 | child_size = WINDOW_TOTAL_SIZE (c, width_p); |
| 3104 | size_window (last_child, size - old_size + child_size, | 3107 | size_window (last_child, size - old_size + child_size, |
diff --git a/src/xmenu.c b/src/xmenu.c index 2a4359fa84a..7d7515a8f25 100644 --- a/src/xmenu.c +++ b/src/xmenu.c | |||
| @@ -240,7 +240,7 @@ for instance using the window manager, then this produces a quit and | |||
| 240 | FRAME_PTR new_f = SELECTED_FRAME (); | 240 | FRAME_PTR new_f = SELECTED_FRAME (); |
| 241 | Lisp_Object bar_window; | 241 | Lisp_Object bar_window; |
| 242 | enum scroll_bar_part part; | 242 | enum scroll_bar_part part; |
| 243 | unsigned long time; | 243 | Time time; |
| 244 | Lisp_Object x, y; | 244 | Lisp_Object x, y; |
| 245 | 245 | ||
| 246 | (*mouse_position_hook) (&new_f, 1, &bar_window, &part, &x, &y, &time); | 246 | (*mouse_position_hook) (&new_f, 1, &bar_window, &part, &x, &y, &time); |
| @@ -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 | EMACS_UINT i, last_i = 0; | 925 | int i; |
| 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 | ||
| @@ -966,7 +966,7 @@ set_frame_menubar (FRAME_PTR f, int first_time, int deep_p) | |||
| 966 | Lisp_Object *previous_items | 966 | Lisp_Object *previous_items |
| 967 | = (Lisp_Object *) alloca (previous_menu_items_used | 967 | = (Lisp_Object *) alloca (previous_menu_items_used |
| 968 | * sizeof (Lisp_Object)); | 968 | * sizeof (Lisp_Object)); |
| 969 | EMACS_UINT subitems; | 969 | int subitems; |
| 970 | 970 | ||
| 971 | /* If we are making a new widget, its contents are empty, | 971 | /* If we are making a new widget, its contents are empty, |
| 972 | do always reinitialize them. */ | 972 | do always reinitialize them. */ |
| @@ -1012,7 +1012,7 @@ set_frame_menubar (FRAME_PTR f, int first_time, int deep_p) | |||
| 1012 | menu_items = f->menu_bar_vector; | 1012 | menu_items = f->menu_bar_vector; |
| 1013 | menu_items_allocated = VECTORP (menu_items) ? ASIZE (menu_items) : 0; | 1013 | menu_items_allocated = VECTORP (menu_items) ? ASIZE (menu_items) : 0; |
| 1014 | subitems = ASIZE (items) / 4; | 1014 | subitems = ASIZE (items) / 4; |
| 1015 | submenu_start = (int *) alloca (subitems * sizeof (int)); | 1015 | submenu_start = (int *) alloca ((subitems + 1) * sizeof (int)); |
| 1016 | submenu_end = (int *) alloca (subitems * sizeof (int)); | 1016 | submenu_end = (int *) alloca (subitems * sizeof (int)); |
| 1017 | submenu_n_panes = (int *) alloca (subitems * sizeof (int)); | 1017 | submenu_n_panes = (int *) alloca (subitems * sizeof (int)); |
| 1018 | submenu_top_level_items = (int *) alloca (subitems * sizeof (int)); | 1018 | submenu_top_level_items = (int *) alloca (subitems * sizeof (int)); |
| @@ -1021,8 +1021,6 @@ set_frame_menubar (FRAME_PTR f, int first_time, int deep_p) | |||
| 1021 | { | 1021 | { |
| 1022 | Lisp_Object key, string, maps; | 1022 | Lisp_Object key, string, maps; |
| 1023 | 1023 | ||
| 1024 | last_i = i; | ||
| 1025 | |||
| 1026 | key = XVECTOR (items)->contents[4 * i]; | 1024 | key = XVECTOR (items)->contents[4 * i]; |
| 1027 | string = XVECTOR (items)->contents[4 * i + 1]; | 1025 | string = XVECTOR (items)->contents[4 * i + 1]; |
| 1028 | maps = XVECTOR (items)->contents[4 * i + 2]; | 1026 | maps = XVECTOR (items)->contents[4 * i + 2]; |
| @@ -1039,6 +1037,7 @@ set_frame_menubar (FRAME_PTR f, int first_time, int deep_p) | |||
| 1039 | submenu_end[i] = menu_items_used; | 1037 | submenu_end[i] = menu_items_used; |
| 1040 | } | 1038 | } |
| 1041 | 1039 | ||
| 1040 | submenu_start[i] = -1; | ||
| 1042 | finish_menu_items (); | 1041 | finish_menu_items (); |
| 1043 | 1042 | ||
| 1044 | /* Convert menu_items into widget_value trees | 1043 | /* Convert menu_items into widget_value trees |
| @@ -1052,7 +1051,7 @@ set_frame_menubar (FRAME_PTR f, int first_time, int deep_p) | |||
| 1052 | wv->help = Qnil; | 1051 | wv->help = Qnil; |
| 1053 | first_wv = wv; | 1052 | first_wv = wv; |
| 1054 | 1053 | ||
| 1055 | for (i = 0; i < last_i; i++) | 1054 | for (i = 0; 0 <= submenu_start[i]; i++) |
| 1056 | { | 1055 | { |
| 1057 | menu_items_n_panes = submenu_n_panes[i]; | 1056 | menu_items_n_panes = submenu_n_panes[i]; |
| 1058 | wv = digest_single_submenu (submenu_start[i], submenu_end[i], | 1057 | wv = digest_single_submenu (submenu_start[i], submenu_end[i], |
| @@ -1421,7 +1420,8 @@ pop_down_menu (Lisp_Object arg) | |||
| 1421 | menu pops down. | 1420 | menu pops down. |
| 1422 | menu_item_selection will be set to the selection. */ | 1421 | menu_item_selection will be set to the selection. */ |
| 1423 | static void | 1422 | static void |
| 1424 | create_and_show_popup_menu (FRAME_PTR f, widget_value *first_wv, int x, int y, int for_click, EMACS_UINT timestamp) | 1423 | create_and_show_popup_menu (FRAME_PTR f, widget_value *first_wv, int x, int y, |
| 1424 | int for_click, Time timestamp) | ||
| 1425 | { | 1425 | { |
| 1426 | int i; | 1426 | int i; |
| 1427 | GtkWidget *menu; | 1427 | GtkWidget *menu; |
| @@ -1465,7 +1465,7 @@ create_and_show_popup_menu (FRAME_PTR f, widget_value *first_wv, int x, int y, i | |||
| 1465 | gtk_widget_show_all (menu); | 1465 | gtk_widget_show_all (menu); |
| 1466 | 1466 | ||
| 1467 | gtk_menu_popup (GTK_MENU (menu), 0, 0, pos_func, &popup_x_y, i, | 1467 | gtk_menu_popup (GTK_MENU (menu), 0, 0, pos_func, &popup_x_y, i, |
| 1468 | timestamp > 0 ? timestamp : gtk_get_current_event_time()); | 1468 | timestamp ? timestamp : gtk_get_current_event_time ()); |
| 1469 | 1469 | ||
| 1470 | record_unwind_protect (pop_down_menu, make_save_value (menu, 0)); | 1470 | record_unwind_protect (pop_down_menu, make_save_value (menu, 0)); |
| 1471 | 1471 | ||
| @@ -1525,7 +1525,7 @@ pop_down_menu (Lisp_Object arg) | |||
| 1525 | menu_item_selection will be set to the selection. */ | 1525 | menu_item_selection will be set to the selection. */ |
| 1526 | static void | 1526 | static void |
| 1527 | create_and_show_popup_menu (FRAME_PTR f, widget_value *first_wv, | 1527 | create_and_show_popup_menu (FRAME_PTR f, widget_value *first_wv, |
| 1528 | int x, int y, int for_click, EMACS_UINT timestamp) | 1528 | int x, int y, int for_click, Time timestamp) |
| 1529 | { | 1529 | { |
| 1530 | int i; | 1530 | int i; |
| 1531 | Arg av[2]; | 1531 | Arg av[2]; |
| @@ -1599,7 +1599,7 @@ create_and_show_popup_menu (FRAME_PTR f, widget_value *first_wv, | |||
| 1599 | 1599 | ||
| 1600 | Lisp_Object | 1600 | Lisp_Object |
| 1601 | xmenu_show (FRAME_PTR f, int x, int y, int for_click, int keymaps, | 1601 | xmenu_show (FRAME_PTR f, int x, int y, int for_click, int keymaps, |
| 1602 | Lisp_Object title, const char **error_name, EMACS_UINT timestamp) | 1602 | Lisp_Object title, const char **error_name, Time timestamp) |
| 1603 | { | 1603 | { |
| 1604 | int i; | 1604 | int i; |
| 1605 | widget_value *wv, *save_wv = 0, *first_wv = 0, *prev_wv = 0; | 1605 | widget_value *wv, *save_wv = 0, *first_wv = 0, *prev_wv = 0; |
| @@ -2242,7 +2242,7 @@ pop_down_menu (Lisp_Object arg) | |||
| 2242 | 2242 | ||
| 2243 | Lisp_Object | 2243 | Lisp_Object |
| 2244 | xmenu_show (FRAME_PTR f, int x, int y, int for_click, int keymaps, | 2244 | xmenu_show (FRAME_PTR f, int x, int y, int for_click, int keymaps, |
| 2245 | Lisp_Object title, const char **error_name, EMACS_UINT timestamp) | 2245 | Lisp_Object title, const char **error_name, Time timestamp) |
| 2246 | { | 2246 | { |
| 2247 | Window root; | 2247 | Window root; |
| 2248 | XMenu *menu; | 2248 | XMenu *menu; |
diff --git a/src/xselect.c b/src/xselect.c index f11fc40fce8..3ddd4c54b49 100644 --- a/src/xselect.c +++ b/src/xselect.c | |||
| @@ -121,10 +121,6 @@ static Lisp_Object Qforeign_selection; | |||
| 121 | 121 | ||
| 122 | #define SELECTION_QUANTUM(dpy) ((XMaxRequestSize(dpy) << 2) - 100) | 122 | #define SELECTION_QUANTUM(dpy) ((XMaxRequestSize(dpy) << 2) - 100) |
| 123 | 123 | ||
| 124 | /* The timestamp of the last input event Emacs received from the X server. */ | ||
| 125 | /* Defined in keyboard.c. */ | ||
| 126 | extern unsigned long last_event_timestamp; | ||
| 127 | |||
| 128 | /* This is an association list whose elements are of the form | 124 | /* This is an association list whose elements are of the form |
| 129 | ( SELECTION-NAME SELECTION-VALUE SELECTION-TIMESTAMP FRAME) | 125 | ( SELECTION-NAME SELECTION-VALUE SELECTION-TIMESTAMP FRAME) |
| 130 | SELECTION-NAME is a lisp symbol, whose name is the name of an X Atom. | 126 | SELECTION-NAME is a lisp symbol, whose name is the name of an X Atom. |
| @@ -356,7 +352,7 @@ x_own_selection (Lisp_Object selection_name, Lisp_Object selection_value) | |||
| 356 | Lisp_Object selection_data; | 352 | Lisp_Object selection_data; |
| 357 | Lisp_Object prev_value; | 353 | Lisp_Object prev_value; |
| 358 | 354 | ||
| 359 | selection_time = long_to_cons ((unsigned long) timestamp); | 355 | selection_time = long_to_cons (timestamp); |
| 360 | selection_data = list4 (selection_name, selection_value, | 356 | selection_data = list4 (selection_name, selection_value, |
| 361 | selection_time, selected_frame); | 357 | selection_time, selected_frame); |
| 362 | prev_value = assq_no_quit (selection_name, Vselection_alist); | 358 | prev_value = assq_no_quit (selection_name, Vselection_alist); |
diff --git a/src/xterm.c b/src/xterm.c index 2352f51cfb7..64030a3151d 100644 --- a/src/xterm.c +++ b/src/xterm.c | |||
| @@ -342,7 +342,7 @@ static struct scroll_bar *x_window_to_scroll_bar (Display *, Window); | |||
| 342 | static void x_scroll_bar_report_motion (struct frame **, Lisp_Object *, | 342 | static void x_scroll_bar_report_motion (struct frame **, Lisp_Object *, |
| 343 | enum scroll_bar_part *, | 343 | enum scroll_bar_part *, |
| 344 | Lisp_Object *, Lisp_Object *, | 344 | Lisp_Object *, Lisp_Object *, |
| 345 | unsigned long *); | 345 | Time *); |
| 346 | static void x_handle_net_wm_state (struct frame *, XPropertyEvent *); | 346 | static void x_handle_net_wm_state (struct frame *, XPropertyEvent *); |
| 347 | static void x_check_fullscreen (struct frame *); | 347 | static void x_check_fullscreen (struct frame *); |
| 348 | static void x_check_expected_move (struct frame *, int, int); | 348 | static void x_check_expected_move (struct frame *, int, int); |
| @@ -3637,23 +3637,23 @@ x_find_modifier_meanings (struct x_display_info *dpyinfo) | |||
| 3637 | /* Convert between the modifier bits X uses and the modifier bits | 3637 | /* Convert between the modifier bits X uses and the modifier bits |
| 3638 | Emacs uses. */ | 3638 | Emacs uses. */ |
| 3639 | 3639 | ||
| 3640 | unsigned int | 3640 | EMACS_INT |
| 3641 | x_x_to_emacs_modifiers (struct x_display_info *dpyinfo, unsigned int state) | 3641 | x_x_to_emacs_modifiers (struct x_display_info *dpyinfo, int state) |
| 3642 | { | 3642 | { |
| 3643 | EMACS_UINT mod_meta = meta_modifier; | 3643 | EMACS_INT mod_meta = meta_modifier; |
| 3644 | EMACS_UINT mod_alt = alt_modifier; | 3644 | EMACS_INT mod_alt = alt_modifier; |
| 3645 | EMACS_UINT mod_hyper = hyper_modifier; | 3645 | EMACS_INT mod_hyper = hyper_modifier; |
| 3646 | EMACS_UINT mod_super = super_modifier; | 3646 | EMACS_INT mod_super = super_modifier; |
| 3647 | Lisp_Object tem; | 3647 | Lisp_Object tem; |
| 3648 | 3648 | ||
| 3649 | tem = Fget (Vx_alt_keysym, Qmodifier_value); | 3649 | tem = Fget (Vx_alt_keysym, Qmodifier_value); |
| 3650 | if (! EQ (tem, Qnil)) mod_alt = XUINT (tem); | 3650 | if (INTEGERP (tem)) mod_alt = XINT (tem); |
| 3651 | tem = Fget (Vx_meta_keysym, Qmodifier_value); | 3651 | tem = Fget (Vx_meta_keysym, Qmodifier_value); |
| 3652 | if (! EQ (tem, Qnil)) mod_meta = XUINT (tem); | 3652 | if (INTEGERP (tem)) mod_meta = XINT (tem); |
| 3653 | tem = Fget (Vx_hyper_keysym, Qmodifier_value); | 3653 | tem = Fget (Vx_hyper_keysym, Qmodifier_value); |
| 3654 | if (! EQ (tem, Qnil)) mod_hyper = XUINT (tem); | 3654 | if (INTEGERP (tem)) mod_hyper = XINT (tem); |
| 3655 | tem = Fget (Vx_super_keysym, Qmodifier_value); | 3655 | tem = Fget (Vx_super_keysym, Qmodifier_value); |
| 3656 | if (! EQ (tem, Qnil)) mod_super = XUINT (tem); | 3656 | if (INTEGERP (tem)) mod_super = XINT (tem); |
| 3657 | 3657 | ||
| 3658 | 3658 | ||
| 3659 | return ( ((state & (ShiftMask | dpyinfo->shift_lock_mask)) ? shift_modifier : 0) | 3659 | return ( ((state & (ShiftMask | dpyinfo->shift_lock_mask)) ? shift_modifier : 0) |
| @@ -3664,24 +3664,24 @@ x_x_to_emacs_modifiers (struct x_display_info *dpyinfo, unsigned int state) | |||
| 3664 | | ((state & dpyinfo->hyper_mod_mask) ? mod_hyper : 0)); | 3664 | | ((state & dpyinfo->hyper_mod_mask) ? mod_hyper : 0)); |
| 3665 | } | 3665 | } |
| 3666 | 3666 | ||
| 3667 | static unsigned int | 3667 | static int |
| 3668 | x_emacs_to_x_modifiers (struct x_display_info *dpyinfo, unsigned int state) | 3668 | x_emacs_to_x_modifiers (struct x_display_info *dpyinfo, EMACS_INT state) |
| 3669 | { | 3669 | { |
| 3670 | EMACS_UINT mod_meta = meta_modifier; | 3670 | int mod_meta = meta_modifier; |
| 3671 | EMACS_UINT mod_alt = alt_modifier; | 3671 | int mod_alt = alt_modifier; |
| 3672 | EMACS_UINT mod_hyper = hyper_modifier; | 3672 | int mod_hyper = hyper_modifier; |
| 3673 | EMACS_UINT mod_super = super_modifier; | 3673 | int mod_super = super_modifier; |
| 3674 | 3674 | ||
| 3675 | Lisp_Object tem; | 3675 | Lisp_Object tem; |
| 3676 | 3676 | ||
| 3677 | tem = Fget (Vx_alt_keysym, Qmodifier_value); | 3677 | tem = Fget (Vx_alt_keysym, Qmodifier_value); |
| 3678 | if (! EQ (tem, Qnil)) mod_alt = XUINT (tem); | 3678 | if (INTEGERP (tem)) mod_alt = XINT (tem); |
| 3679 | tem = Fget (Vx_meta_keysym, Qmodifier_value); | 3679 | tem = Fget (Vx_meta_keysym, Qmodifier_value); |
| 3680 | if (! EQ (tem, Qnil)) mod_meta = XUINT (tem); | 3680 | if (INTEGERP (tem)) mod_meta = XINT (tem); |
| 3681 | tem = Fget (Vx_hyper_keysym, Qmodifier_value); | 3681 | tem = Fget (Vx_hyper_keysym, Qmodifier_value); |
| 3682 | if (! EQ (tem, Qnil)) mod_hyper = XUINT (tem); | 3682 | if (INTEGERP (tem)) mod_hyper = XINT (tem); |
| 3683 | tem = Fget (Vx_super_keysym, Qmodifier_value); | 3683 | tem = Fget (Vx_super_keysym, Qmodifier_value); |
| 3684 | if (! EQ (tem, Qnil)) mod_super = XUINT (tem); | 3684 | if (INTEGERP (tem)) mod_super = XINT (tem); |
| 3685 | 3685 | ||
| 3686 | 3686 | ||
| 3687 | return ( ((state & mod_alt) ? dpyinfo->alt_mod_mask : 0) | 3687 | return ( ((state & mod_alt) ? dpyinfo->alt_mod_mask : 0) |
| @@ -3827,7 +3827,7 @@ redo_mouse_highlight (void) | |||
| 3827 | static void | 3827 | static void |
| 3828 | XTmouse_position (FRAME_PTR *fp, int insist, Lisp_Object *bar_window, | 3828 | XTmouse_position (FRAME_PTR *fp, int insist, Lisp_Object *bar_window, |
| 3829 | enum scroll_bar_part *part, Lisp_Object *x, Lisp_Object *y, | 3829 | enum scroll_bar_part *part, Lisp_Object *x, Lisp_Object *y, |
| 3830 | long unsigned int *timestamp) | 3830 | Time *timestamp) |
| 3831 | { | 3831 | { |
| 3832 | FRAME_PTR f1; | 3832 | FRAME_PTR f1; |
| 3833 | 3833 | ||
| @@ -5562,7 +5562,7 @@ x_scroll_bar_note_movement (struct scroll_bar *bar, XEvent *event) | |||
| 5562 | static void | 5562 | static void |
| 5563 | x_scroll_bar_report_motion (FRAME_PTR *fp, Lisp_Object *bar_window, | 5563 | x_scroll_bar_report_motion (FRAME_PTR *fp, Lisp_Object *bar_window, |
| 5564 | enum scroll_bar_part *part, Lisp_Object *x, | 5564 | enum scroll_bar_part *part, Lisp_Object *x, |
| 5565 | Lisp_Object *y, long unsigned int *timestamp) | 5565 | Lisp_Object *y, Time *timestamp) |
| 5566 | { | 5566 | { |
| 5567 | struct scroll_bar *bar = XSCROLL_BAR (last_mouse_scroll_bar); | 5567 | struct scroll_bar *bar = XSCROLL_BAR (last_mouse_scroll_bar); |
| 5568 | Window w = bar->x_window; | 5568 | Window w = bar->x_window; |
diff --git a/src/xterm.h b/src/xterm.h index fbd638fe73b..1b90b6d8ff4 100644 --- a/src/xterm.h +++ b/src/xterm.h | |||
| @@ -989,8 +989,7 @@ extern void x_mouse_leave (struct x_display_info *); | |||
| 989 | #ifdef USE_X_TOOLKIT | 989 | #ifdef USE_X_TOOLKIT |
| 990 | extern int x_dispatch_event (XEvent *, Display *); | 990 | extern int x_dispatch_event (XEvent *, Display *); |
| 991 | #endif | 991 | #endif |
| 992 | extern unsigned int x_x_to_emacs_modifiers (struct x_display_info *, | 992 | extern EMACS_INT x_x_to_emacs_modifiers (struct x_display_info *, int); |
| 993 | unsigned); | ||
| 994 | extern int x_display_pixel_height (struct x_display_info *); | 993 | extern int x_display_pixel_height (struct x_display_info *); |
| 995 | extern int x_display_pixel_width (struct x_display_info *); | 994 | extern int x_display_pixel_width (struct x_display_info *); |
| 996 | 995 | ||