1. 01 Jan, 2019 1 commit
  2. 01 Jan, 2018 1 commit
  3. 13 Sep, 2017 1 commit
    • Paul Eggert's avatar
      Prefer HTTPS to FTP and HTTP in documentation · bc511a64
      Paul Eggert authored
      Most of this change is to boilerplate commentary such as license URLs.
      This change was prompted by ftp://ftp.gnu.org's going-away party,
      planned for November.  Change these FTP URLs to https://ftp.gnu.org
      instead.  Make similar changes for URLs to other organizations moving
      away from FTP.  Also, change HTTP to HTTPS for URLs to gnu.org and
      fsf.org when this works, as this will further help defend against
      man-in-the-middle attacks (for this part I omitted the MS-DOS and
      MS-Windows sources and the test tarballs to keep the workload down).
      HTTPS is not fully working to lists.gnu.org so I left those URLs alone
      for now.
      bc511a64
  4. 01 Jan, 2017 1 commit
  5. 10 Mar, 2016 1 commit
    • Paul Eggert's avatar
      Rework C source files to avoid ^( · 7352c6c6
      Paul Eggert authored
      Work around Bug#22884 by rewording comments and strings to avoid ‘(’
      at the start of a line unless it starts a function.  This change
      is a short-term hack; in the longer run we plan to fix cc-mode’s
      performance for C files that have ‘(’ at the start of a line in a
      comment or string.
      7352c6c6
  6. 01 Jan, 2016 1 commit
  7. 21 Oct, 2015 1 commit
    • Paul Eggert's avatar
      Include-file cleanup for src directory · 63cfb75f
      Paul Eggert authored
      Omit ‘#include "foo.h"’ unless the file needs foo.h (Bug#21707).
      In a few cases, add ‘#include "foo.h"’ if the file needs foo.h
      but does not include it directly.  As a general rule, a source
      file should include foo.h if it needs the interfaces that foo.h
      defines.
      * src/alloc.c: Don’t include process.h.  Include dispextern.h,
      systime.h.
      * src/atimer.c: Don’t include blockinput.h.
      * src/buffer.c: Include coding.h, systime.h.  Don’t include
      keyboard.h, coding.h.
      * src/callint.c: Don’t include commands.h, keymap.h.
      * src/callproc.c: Don’t include character.h, ccl.h, composite.h,
      systty.h, termhooks.h.
      * src/casetab.c: Don’t include character.h.
      * src/category.c: Don’t include charset.h, keymap.h.
      * src/ccl.h: Don’t include character.h.
      * src/character.c: Don’t include charset.h.
      * src/charset.c: Don’t include disptab.h.
      * src/chartab.c: Don’t include ccl.h.
      * src/cm.c: Don’t include frame.h, termhooks.h.
      * src/cmds.c: Don’t include window.h, dispextern.h.
      * src/coding.c: Don’t include window.h, frame.h.
      * src/composite.c: Include composite.h.  Don’t include window.h,
      font.h.
      * src/data.c: Don’t include syssignal.h, termhooks.h, font.h.
      * src/dbusbind.c: Don’t include frame.h.
      * src/decompress.c: Don’t include character.h.
      * src/dired.c: Don’t include character.h, commands.h, charset.h.
      * src/dispnew.c: Don’t include character.h, indent.h, intervals.h,
      process.h, timespec.h.  Include systime.h.
      * src/doc.c: Include coding.h.  Don’t include keyboard.h.
      * src/editfns.c: Include composite.h.  Don’t include frame.h.
      * src/emacs.c: Include fcntl.h, coding.h.  Don’t include
      commands.h, systty.h..
      * src/fileio.c: Don’t include intervals.h, dispextern.h.
      Include composite.h.
      * src/filelock.c: Don’t include character.h, systime.h.
      * src/fns.c: Don’t include time.h, commands.h, keyboard.h,
      keymap.h, frame.h, blockinput.h, xterm.h.  Include composite.h.
      * src/font.c: Include termhooks.h.
      * src/font.h: Don’t include ccl.h, frame.h.  Add forward decls of
      struct composition_it, struct face, struct glyph_string.
      * src/fontset.c: Don’t include buffer.h, ccl.h, keyboard.h,
      intervals.h, window.h, termhooks.h.
      * src/frame.c: Don’t include character.h, commands.h, font.h.
      * src/frame.h: Don’t include dispextern.h.
      * src/fringe.c: Don’t include character.h.
      * src/ftcrfont.c: Don’t include dispextern.h, frame.h,
      character.h, charset.h, fontset.h.
      * src/ftfont.c: Don’t include frame.h, blockinput.h, coding.h,
      fontset.h.
      * src/ftxfont.c: Don’t include dispextern.h, character.h,
      charset.h, fontset.h.
      * src/gfilenotify.c: Don’t include frame.h, process.h.
      * src/gtkutil.c: Include dispextern.h, frame.h, systime.h.
      Don’t include syssignal.h, buffer.h, charset.h, font.h.
      * src/gtkutil.h: Don’t include frame.h.
      * src/image.c: Include fcntl.h and stdio.h instead of sysstdio.h.
      Don’t include character.h.
      * src/indent.c: Don’t include keyboard.h, termchar.h.
      * src/inotify.c: Don’t include character.h, frame.h.
      * src/insdel.c: Include composite.h.  Don’t include blockinput.h.
      * src/intervals.c: Don’t include character.h, keyboard.h.
      * src/intervals.h: Don’t include dispextern.h, composite.h.
      * src/keyboard.c: Don’t include sysstdio.h, disptab.h, puresize.h.
      Include coding.h.
      * src/keyboard.h: Don’t incldue systime.h.
      * src/keymap.c: Don’t include charset.h, frame.h.
      * src/lread.c: Include dispextern.h and systime.h.
      Don’t include frame.h.  Include systime.h.
      * src/macros.c: Don’t include commands.h, character.h, buffer.h.
      * src/menu.c: Include character.h, coding.h.  Don’t include
      dispextern.h.
      * src/menu.h: Don’t include systime.h.
      * src/minibuf.c: Don’t include commands.h, dispextern.h, syntax.h,
      intervals.h, termhooks.h.
      * src/print.c: Include coding.h.  Don’t include keyboard.h,
      window.h, dispextern.h, termchar.h, termhooks.h, font.h.
      Add forward decl of struct terminal.
      * src/process.c: Don’t include termhooks.h, commands.h,
      dispextern.h, composite.h.
      * src/region-cache.c: Don’t include character.h.
      * src/scroll.c: Don’t include keyboard.h, window.h.
      * src/search.c: Don’t include category.h, commands.h.
      * src/sound.c: Don’t include dispextern.h.
      * src/syntax.c: Don’t include command.h, keymap.h.
      * src/sysdep.c: Don’t include window.h, dispextern.h.
      * src/systime.h: Use ‘#ifdef emacs’, not ‘#ifdef EMACS_LISP_H’,
      * src/term.c: Don’t include systty.h, intervals.h, xterm.h.
      * src/terminal.c: Include character.h.
      Don’t include charset.h, coding.h.
      * src/textprop.c: Don’t include character.h.
      * src/undo.c: Don’t include character.h, commands.h, window.h.
      * src/unexsol.c: Don’t include character.h, charset.h.
      * src/widget.c: Include widget.h.  Don’t include keyboard.h,
      window.h, dispextern.h, blockinput.h, character.h, font.h.
      * src/widgetprv.h: Don’t include widget.h.
      * src/window.c: Don’t include character.h, menu.h, intervals.h.
      * src/xdisp.c: Include composite.h, systime.h.  Don’t include
      macros.h, process.h.
      * src/xfaces.c: Don’t include charset.h, keyboard.h, termhooks.h,
      intervals.h.
      * src/xfns.c: Don’t include menu.h, character.h, intervals.h,
      epaths.h, fontset.h, systime.h, atimer.h, termchar.h.
      * src/xfont.c: Don’t include dispextern.h, fontset.h, ccl.h.
      * src/xftfont.c: Don’t include dispextern.h, character.h, fontset.h.
      * src/xgselect.c: Don’t include timespec.h, frame.h.
      Include systime.h.
      * src/xgselect.h: Don’t include time.h.
      Use a forward decl to struct timespec instead.
      * src/xmenu.c: Don’t include keymap.h, character.h, charset.h,
      dispextern.h.  Include systime.h.
      * src/xml.c: Don’t include character.h.
      * src/xrdb.c [USE_MOTIF]: Don’t include keyboard.h.
      * src/xselect.c: Don’t include dispextern.h, character.h,
      buffer.h, process.h.
      * src/xsmfns.c: Don’t include systime.h, sysselect.h.
      * src/xterm.c: Don’t include syssignal.h, charset.h, disptab.h,
      intervals.h process.h, keymap.h, xgselect.h.  Include composite.h.
      63cfb75f
  8. 27 Aug, 2015 1 commit
    • Paul Eggert's avatar
      Assume GC_MARK_STACK == GC_MAKE_GCPROS_NOOPS · 60d1b187
      Paul Eggert authored
      This removes the need for GCPRO1 etc.  Suggested by Stefan Monnier in:
      http://lists.gnu.org/archive/html/emacs-devel/2015-08/msg00918.html
      * doc/lispref/internals.texi (Writing Emacs Primitives):
      * etc/NEWS:
      Document the change.
      * src/alloc.c (gcprolist, dump_zombies, MAX_ZOMBIES, zombies)
      (nzombies, ngcs, avg_zombies, max_live, max_zombies, avg_live)
      (Fgc_status, check_gcpros, relocatable_string_data_p, gc-precise):
      * src/bytecode.c (mark_byte_stack) [BYTE_MARK_STACK]:
      * src/eval.c (gcpro_level) [DEBUG_GCPRO]:
      * src/lisp.h (struct handler.gcpro, struct gcpro, GC_MARK_STACK)
      (GC_USE_GCPROS_AS_BEFORE, GC_MAKE_GCPROS_NOOPS)
      (GC_MARK_STACK_CHECK_GCPROS, GC_USE_GCPROS_CHECK_ZOMBIES)
      (BYTE_MARK_STACK, GCPRO1, GCPRO2, GCPRO3, GCPRO4, GCPRO5, GCPRO6)
      (GCPRO7, UNGCPRO, RETURN_UNGCPRO):
      Remove.  All uses removed.  The code now assumes
      GC_MARK_STACK == GC_MAKE_GCPROS_NOOPS.
      * src/bytecode.c (relocate_byte_stack):
      Rename from unmark_byte_stack, since it now only relocates.
      All callers changed.
      * src/frame.c (make_frame): Add an IF_LINT to pacify GCC 5.2
      with GCPROs removed.
      * src/systime.h: Use EMACS_LISP_H as the canary instead of GCPRO1.
      * test/automated/finalizer-tests.el (finalizer-basic)
      (finalizer-circular-reference, finalizer-cross-reference)
      (finalizer-error):
      * test/automated/generator-tests.el (cps-test-iter-close-finalizer):
      Remove tests, as they depend on gc-precise.
      60d1b187
  9. 26 Jul, 2015 1 commit
    • Paul Eggert's avatar
      New optional ZONE arg for format-time-string etc. · af32fa95
      Paul Eggert authored
      This simplifies time conversions in other time zones.
      It also prevents display-time-world tampering with TZ (Bug#21020).
      * admin/admin.el (add-release-logs):
      Use improved add-log-time-format API.
      * admin/merge-gnulib (GNULIB_MODULES): Add time_rz, timegm.
      (GNULIB_TOOL_FLAGS): Avoid flexmember, setenv, unsetenv.
      * configure.ac (tzalloc): Remove test for this, since
      Emacs no longer uses HAVE_TZALLOC directly.
      * doc/lispref/os.texi (Time of Day, Time Conversion)
      (Time Parsing):
      * etc/NEWS: Document the new behavior.
      Merge from gnulib, incorporating:
      2015-07-25 strftime: fix newly-introduced bug on Solaris
      2015-07-23 fprintftime, strftime: use timezone_t args
      * lib/gnulib.mk, m4/gnulib-comp.m4: Regenerate.
      * lib/strftime.c, lib/strftime.h, lib/time.in.h, m4/sys_time_h.m4:
      * m4/time_h.m4:
      Update from gnulib.
      * lib/time_rz.c, lib/timegm.c, m4/time_rz.m4, m4/timegm.m4:
      New files from gnulib.
      * lisp/time-stamp.el (time-stamp-string):
      * lisp/time.el (display-time-world-list)
      (display-time-world-display):
      Use new API, with time zone arg.
      * lisp/time.el (display-time-world-display):
      Fix race when current-time advances while we're running.
      * lisp/vc/add-log.el (add-log-iso8601-time-zone)
      (add-log-iso8601-time-string): Accept optional time zone arg.
      * lisp/vc/add-log.el (add-change-log-entry):
      * lisp/vc/log-edit.el (log-edit-changelog-ours-p): Use new arg.
      * nt/gnulib.mk: Propagate lib/gnulib.mk changes here.
      Add rules for the time module, since they're now needed
      for tzalloc etc.
      * src/conf_post.h (getenv_TZ, setenv_TZ): New macros.
      (emacs_getenv_TZ, emacs_setenv_TZ): New decls.
      * src/editfns.c: Include errno.h.
      (set_time_zone_rule): Omit unnecessary forward decl.
      (initial_tz): Remove, replacing with ...
      (local_tz, wall_clock_tz, utc_tz): New static vars and constants.
      (tzeqlen): New constant; prefer it to (sizeof "TZ=" - 1).
      (emacs_localtime_rz, emacs_mktime_z, xtzalloc, xtzfree)
      (tzlookup): New static functions.
      (init_editfns): New arg DUMPING.  All uses changed.
      (init_editfns): Omit most initialization if dumping, not if
      !initialized.  Initialize wall_clock_tz and local_tz.
      (emacs_nmemftime, format_time_string): Time zone argument can now
      be any time zone, not just a boolean for UTC or local time.  All
      callers changed.
      (Fformat_time_string, Fencode_time, Fcurrent_time_string)
      (Fcurrent_time_zone): New optional arg ZONE.
      (Fdecode_time, Fset_time_zone_rule): ZONE arg can now also take
      the same form as with the other new additions.
      (decode_time_zone): Remove; no longer needed.
      (tzvalbuf): Now file-scope.
      (emacs_getenv_TZ, emacs_setenv_TZ): New functions.
      (syms_of_editfns): Define Qwall.
      * src/editfns.c (mktime_z) [!HAVE_TZALLOC]:
      * src/systime.h (mktime_z, timezone_t, tzalloc, tzfree)
      [!HAVE_TZALLOC]:
      Remove; now supplied by gnulib.
      * src/emacs.c (main):
      * src/lisp.h (init_editfns): Adjust to init_editfns API change.
      af32fa95
  10. 13 Mar, 2015 1 commit
  11. 09 Feb, 2015 1 commit
    • Paul Eggert's avatar
      Better distinguish infinite from invalid times · fd6f7d14
      Paul Eggert authored
      * editfns.c (check_time_validity): New function.
      (decode_time_components): Return int, not bool.
      Return -1 (not 0) if the time is out of range.
      All callers changed.
      (lisp_time_struct, lisp_seconds_argument): Distinguish better
      between time overflow and invalid time values.
      fd6f7d14
  12. 01 Jan, 2015 2 commits
  13. 17 Nov, 2014 1 commit
    • Paul Eggert's avatar
      Improve time stamp handling, and be more consistent about it. · 0921dbc3
      Paul Eggert authored
      This implements a suggestion made in:
      http://lists.gnu.org/archive/html/emacs-devel/2014-10/msg00587.html
      Among other things, this means timer.el no longer needs to
      autoload the time-date module.
      * doc/lispref/os.texi (Time of Day, Time Conversion, Time Parsing)
      (Processor Run Time, Time Calculations):
      Document the new behavior, plus be clearer about the old behavior.
      (Idle Timers): Take advantage of new functionality.
      * etc/NEWS: Document the changes.
      * lisp/allout-widgets.el (allout-elapsed-time-seconds): Doc fix.
      * lisp/arc-mode.el (archive-ar-summarize):
      * lisp/calendar/time-date.el (seconds-to-time, days-to-time, time-since):
      * lisp/emacs-lisp/timer.el (timer-relative-time, timer-event-handler)
      (run-at-time, with-timeout-suspend, with-timeout-unsuspend):
      * lisp/net/tramp.el (tramp-time-less-p, tramp-time-subtract):
      * lisp/proced.el (proced-time-lessp):
      * lisp/timezone.el (timezone-time-from-absolute):
      * lisp/type-break.el (type-break-schedule, type-break-time-sum):
      Simplify by using new functionality.
      * lisp/calendar/cal-dst.el (calendar-next-time-zone-transition):
      Do not return time values in obsolete and undocumented (HI . LO)
      format; use (HI LO) instead.
      * lisp/calendar/time-date.el (with-decoded-time-value):
      Treat 'nil' as current time.  This is mostly for XEmacs.
      (encode-time-value, with-decoded-time-value): Obsolete.
      (time-add, time-subtract, time-less-p): Use no-op autoloads, for
      XEmacs.  Define only if XEmacs, as they're now C builtins in Emacs.
      * lisp/ldefs-boot.el: Update to match new time-date.el
      * lisp/proced.el: Do not require time-date.
      * src/editfns.c (invalid_time): New function.
      Use it instead of 'error ("Invalid time specification")'.
      (time_add, time_subtract, time_arith, Ftime_add, Ftime_less_p)
      (decode_float_time, lisp_to_timespec, lisp_time_struct):
      New functions.
      (make_time_tail, make_time): Remove.  All uses changed to use
      new functions or plain list4i.
      (disassemble_lisp_time): Return effective length if successful.
      Check that LOW is an integer, if it's combined with other components.
      (decode_time_components): Decode into struct lisp_time, not
      struct timespec, so that we can support a wide set of times
      regardless of whether time_t is signed.  Decode plain numbers
      as seconds since the Epoch, and nil as the current time.
      (lisp_time_argument, lisp_seconds_argument, Ffloat_time):
      Reimplement in terms of new functions.
      (Fencode_time): Just use list2i.
      (syms_of_editfns): Add time-add, time-subtract, time-less-p.
      * src/keyboard.c (decode_timer): Don't allow the new formats (floating
      point or nil) in timers.
      * src/systime.h (LO_TIME_BITS): New constant.  Use it everywhere in
      place of the magic number '16'.
      (struct lisp_time): New type.
      (decode_time_components): Use it.
      (lisp_to_timespec): New decl.
      0921dbc3
  14. 12 Oct, 2014 1 commit
    • Paul Eggert's avatar
      Fix putenv race conditions with undefined behavior. · 4c4c5b91
      Paul Eggert authored
      Do all putenv calls before Emacs creates any threads.
      Use a safer way to modify the TZ environment variable in the
      presence of multiple threads.  For further thread-safety,
      prefer localtime_r and gmtime_r to localtime and gmtime,
      and prefer struct tm's tm_gmtoff (if available) to calling
      both localtime_r and gmtime_r.
      * configure.ac (LOCALTIME_CACHE): Remove.
      We needn't worry about SunOS 4 any more; Sun dropped support in 2003.
      All uses of LOCALTIME_CACHE removed.  This simplifies the fix.
      (tzalloc): Add check for this function.
      * admin/merge-gnulib (GNULIB_MODULES): Add time_r, since Emacs now
      calls localtime_r and gmtime_r directly.
      * src/dbusbind.c (Fdbus__init_bus): Move xputenv call from here ...
      (init_dbusbind): ... to this new function.
      * src/emacs.c (main) [HAVE_DBUS]: Call it before creating threads.
      * src/xterm.c (x_term_init): Move xputenv call from here ...
      (init_xterm): ... to this new function.
      * src/emacs.c (main) [USE_GTK]: Call it before creating threads.
      * src/editfns.c (HAVE_TM_GMTOFF): Default to false.
      (dump_tz_string): New constant.
      (init_editfns): Use it.  This centralizes the dump_tz stuff.
      Call set_time_zone_rule here, so that its xputenv is done
      before Emacs goes multithreaded.
      (mktime_z) [!HAVE_TZALLOC]: New function, which is typically
      thread-safe enough for Emacs.
      (format_time_string, Fdecode_time, Fcurrent_time_string)
      (Fcurrent_time_zone):
      Prefer localtime_r and gmtime_r, which are more thread-safe, to
      localtime and gmtime.  Remove now-unnecessary calls to block_input.
      (tm_gmtoff): New static function.
      (Fdecode_time, Fcurrent_time_zone): Use it.
      (Fencode_time): Use mktime_z, for better thread-safety.
      (set_time_zone_rule): Now static.  Rewrite to be mostly thread-safe,
      i.e., not quite thread-safe but good enough for Emacs typical usage.
      Do not reclaim storage that is in the environment; let it leak.
      Always call tzset, since localtime_r does not.
      * src/emacs.c (dump_tz, Fdump_emacs) [HAVE_TZSET]: Remove dump_tz stuff.
      This is now done in init_editfns.
      * src/systime.h (mktime_z, timezone_t, tzalloc, tzfree) [!HAVE_TZALLOC]:
      New macros and declarations, for platforms lacking tzalloc & friends.
      
      Fixes: debbugs:8705
      4c4c5b91
  15. 24 Sep, 2014 2 commits
    • Paul Eggert's avatar
      Avoid signed integer overflow when converting Time to ptrdiff_t. · 203a9eb0
      Paul Eggert authored
      * keyboard.c (INPUT_EVENT_POS_MAX, INPUT_EVENT_POS_MIN):
      New macros.
      (position_to_Time, Time_to_position): New functions.
      (gen_help_event, kbd_buffer_get_event): Use them.
      * systime.h (Time) [emacs && !HAVE_X_WINDOWS]:
      Go back to plain 'unsigned long', so that 'Time' is the same
      for both X and non-X builds; this is less likely to cause surprise.
      * termhooks.h: Remove compile-time check that Time and ptrdiff_t
      are the same size; this is no longer required.
      203a9eb0
    • Eli Zaretskii's avatar
      Fix fallout on MinGW64 from the previous commit. · d4dfe4ea
      Eli Zaretskii authored
       src/systime.h (Time): Define as size_t, to be consistent with 64-bit
       Windows builds, where 'long' is a 32-bit type.
       src/w32inevt.h (w32_console_mouse_position): Update the argument
       types to use 'Time'.
       src/w32term.c (w32_mouse_position)
       (x_horizontal_scroll_bar_report_motion)
       (x_scroll_bar_report_motion): Update the argument types to use
       'Time'.
      d4dfe4ea
  16. 01 Jan, 2014 1 commit
  17. 14 Dec, 2013 1 commit
    • Paul Eggert's avatar
      Use bool for boolean, focusing on headers. · 96c06863
      Paul Eggert authored
      * configure.ac (PTY_OPEN, GC_MARK_SECONDARY_STACK):
      Use bool for boolean.
      * lib-src/emacsclient.c, lib-src/etags.c, lib-src/hexl.c (FALSE, TRUE):
      Remove.  All uses replaced with uncapitalized version.
      * lib-src/emacsclient.c (message):
      * lib-src/etags.c (make_tag, pfnote, consider_token, make_C_tag, lang_names):
      * lib-src/hexl.c (un_flag, iso_flag, endian):
      * lib-src/pop.c (pop_debug, pop_open, pop_multi_first, pop_multi_next)
      (pop_trash):
      Use bool for boolean.
      * lib-src/etags.c (bool): Remove.
      * lib-src/etags.c (globals, members, declarations, no_line_directive)
      (no_duplicates): Use 'int' for boolean values that getopt requires
      to be 'int'.  Formerly, these were 'bool' and 'bool' was 'int',
      but we can no longer rely on this implementation.
      * lib-src/pop.h (struct _popserver): Use bool_bf for boolean bit-fields.
      * lwlib/xlwmenuP.h (XlwMenu_part): Use bool_bf for boolean bit-fields.
      * src/atimer.h, src/lisp.h, src/syssignal.h, src/syswait.h, src/unexelf.c:
      No need to include <stdbool.h>, since conf_post.h does it now.
      * src/buffer.h (BUF_COMPUTE_UNCHANGED, DECODE_POSITION)
      (BUFFER_CHECK_INDIRECTION, GET_OVERLAYS_AT, PER_BUFFER_VALUE_P)
      (SET_PER_BUFFER_VALUE_P):
      * src/ccl.c, src/ccl.h (setup_ccl_program):
      * src/ccl.h (CHECK_CCL_PROGRAM):
      * src/character.h (MAKE_CHAR_UNIBYTE, CHECK_CHARACTER_CAR)
      (CHECK_CHARACTER_CDR, CHAR_STRING_ADVANCE, NEXT_CHAR_BOUNDARY)
      (PREV_CHAR_BOUNDARY, FETCH_STRING_CHAR_ADVANCE)
      (FETCH_STRING_CHAR_AS_MULTIBYTE_ADVANCE)
      (FETCH_STRING_CHAR_ADVANCE_NO_CHECK, FETCH_CHAR_ADVANCE)
      (FETCH_CHAR_ADVANCE_NO_CHECK, INC_POS, DEC_POS, INC_BOTH)
      (DEC_BOTH, BUF_INC_POS, BUF_DEC_POS):
      * src/charset.h (CHECK_CHARSET, CHECK_CHARSET_GET_ID)
      (CHECK_CHARSET_GET_ATTR, CHECK_CHARSET_GET_CHARSET)
      (CHARSET_FAST_MAP_SET):
      * src/coding.c (decode_coding_ccl, encode_coding_ccl):
      * src/coding.h (CHECK_CODING_SYSTEM, CHECK_CODING_SYSTEM_GET_SPEC)
      (CHECK_CODING_SYSTEM_GET_ID, SJIS_TO_JIS, SJIS_TO_JIS2)
      (JIS_TO_SJIS, JIS_TO_SJIS2, ENCODE_FILE, DECODE_FILE)
      (ENCODE_SYSTEM, DECODE_SYSTEM, ENCODE_UTF_8)
      (decode_coding_c_string):
      * src/composite.h (COMPOSITION_DECODE_REFS, COMPOSITION_DECODE_RULE):
      * src/conf_post.h (has_attribute):
      * src/dispextern.h (trace_redisplay_p):
      (INC_TEXT_POS, DEC_TEXT_POS, SET_GLYPH_FROM_GLYPH_CODE)
      (SET_CHAR_GLYPH, SET_CHAR_GLYPH_FROM_GLYPH)
      (SET_GLYPH_FROM_CHAR_GLYPH):
      (WINDOW_WANTS_MODELINE_P, WINDOW_WANTS_HEADER_LINE_P)
      (FACE_SUITABLE_FOR_ASCII_CHAR_P, FACE_SUITABLE_FOR_CHAR_P)
      (PRODUCE_GLYPHS, reset_mouse_highlight, in_display_vector_p)
      (cursor_in_mouse_face_p):
      * src/dispnew.c (adjust_glyph_matrix, clear_glyph_matrix_rows)
      (blank_row, prepare_desired_row)
      (build_frame_matrix_from_leaf_window, make_current)
      (mirror_make_current, mirrored_line_dance, mirror_line_dance)
      (update_window, scrolling_window, update_frame_line):
      * src/disptab.h (GLYPH_FOLLOW_ALIASES):
      * src/editfns.c (Fformat):
      * src/font.h (FONT_WEIGHT_SYMBOLIC, FONT_SLANT_SYMBOLIC)
      (FONT_WIDTH_SYMBOLIC, FONT_WEIGHT_FOR_FACE, FONT_SLANT_FOR_FACE)
      (FONT_WIDTH_FOR_FACE, FONT_WEIGHT_NAME_NUMERIC)
      (FONT_SLANT_NAME_NUMERIC, FONT_WIDTH_NAME_NUMERIC)
      (FONT_SET_STYLE, CHECK_FONT, CHECK_FONT_SPEC, CHECK_FONT_ENTITY)
      (CHECK_FONT_OBJECT, CHECK_FONT_GET_OBJECT, FONT_ADD_LOG)
      (FONT_DEFERRED_LOG):
      * src/frame.h (FRAME_W32_P, FRAME_MSDOS_P, FRAME_WINDOW_P):
      (FRAME_EXTERNAL_TOOL_BAR, FRAME_EXTERNAL_MENU_BAR, FOR_EACH_FRAME)
      (FRAME_MOUSE_UPDATE):
      * src/fringe.c (Fdefine_fringe_bitmap):
      * src/image.c (x_create_bitmap_from_data, x_create_bitmap_mask)
      (x_create_bitmap_from_xpm_data, xpm_load_image):
      * src/intervals.h (INTERVAL_HAS_PARENT, INTERVAL_PARENT)
      (set_interval_parent, RESET_INTERVAL, COPY_INTERVAL_CACHE)
      (MERGE_INTERVAL_CACHE):
      * src/keymap.h (KEYMAPP):
      * src/lisp.h (eassert, USE_LSB_TAG, CHECK_LISP_OBJECT_TYPE)
      (STRING_SET_UNIBYTE, STRING_SET_MULTIBYTE, DEFSYM, PSEUDOVECTORP)
      (CHECK_RANGED_INTEGER, CHECK_TYPE_RANGED_INTEGER)
      (CHECK_NUMBER_COERCE_MARKER, CHECK_NUMBER_OR_FLOAT_COERCE_MARKER)
      (DEFVAR_LISP, DEFVAR_LISP_NOPRO, DEFVAR_BOOL, DEFVAR_INT)
      (DEFVAR_BUFFER_DEFAULTS, DEFVAR_KBOARD, QUIT)
      (RETURN_UNGCPRO, USE_SAFE_ALLOCA, SAFE_NALLOCA, SAFE_FREE)
      (SAFE_ALLOCA_LISP, FOR_EACH_ALIST_VALUE, functionp):
      * src/syntax.h (SYNTAX_ENTRY, SYNTAX_WITH_FLAGS, SYNTAX)
      (UPDATE_SYNTAX_TABLE_FORWARD, UPDATE_SYNTAX_TABLE_BACKWARD)
      (SETUP_BUFFER_SYNTAX_TABLE):
      * src/systime.h (timespec_valid_p):
      * src/term.c (save_and_enable_current_matrix):
      * src/window.h (WINDOW_MENU_BAR_P, WINDOW_TOOL_BAR_P):
      * src/xdisp.c (in_display_vector_p, display_tool_bar_line)
      (redisplay_internal, try_window_reusing_current_matrix)
      (sync_frame_with_window_matrix_rows, try_window_id)
      (display_menu_bar, display_tty_menu_item, display_mode_line)
      (coords_in_mouse_face_p, cursor_in_mouse_face_p):
      * src/xmenu.c (xmenu_show):
      * src/xterm.c (use_xim, x_term_init):
      * src/xterm.h (XSync, GTK_CHECK_VERSION, use_xim, SET_SCROLL_BAR_X_WIDGET)
      (struct x_bitmap_record):
      Use bool for booleans.
      * src/ccl.c (struct buffer_text):
      * src/ccl.h (struct ccl_program):
      * src/charset.h (struct charset):
      * src/cm.h (struct cm):
      * src/coding.h (struct iso_2022_spec, struct coding_system):
      * src/dispextern.h (struct glyph, struct glyph_matrix, struct glyph_row)
      (struct glyph_string, struct face, struct face_cache)
      (struct bidi_string_data, struct bidi_it)
      (struct draw_fringe_bitmap_params, struct it, Mouse_HLInfo)
      (struct image):
      * src/editfns.c (Fformat):
      * src/frame.h (struct frame):
      * src/fringe.c (struct fringe_bitmap):
      * src/intervals.h (struct interval):
      * src/keyboard.h (struct kboard):
      * src/lisp.h (struct Lisp_Symbol, struct Lisp_Misc_Any, struct Lisp_Marker)
      (struct Lisp_Overlay, struct Lisp_Save_Value, struct Lisp_Free)
      (struct Lisp_Buffer_Local_Value, union specbinding):
      * src/macfont.m (struct macfont_info):
      * src/process.h (struct Lisp_Process):
      * src/termchar.h (struct tty_display_info):
      * src/window.h (struct window):
      * src/xterm.h (struct x_output):
      Use bool_bf for boolean bit-fields.
      * src/ccl.c (setup_ccl_program): Now returns bool instead of -1 or 0.
      All callers changed.
      * src/ccl.h (struct ccl_program): Remove unused members private_state,
      src_multibyte, dst_multibyte, cr_consumed, suppress_error,
      eight_bit_control.
      (struct ccl_spec): Remove unused members cr_carryover,
      eight_bit_carryover.
      * src/conf_post.h: Include <stdbool.h>.
      (bool_bf): New type.
      * src/dispextern.h (TRACE, PREPARE_FACE_FOR_DISPLAY):
      * src/interval.h (RESET_INTERVAL, COPY_INTERVAL_CACHE, MERGE_INTERVAL_CACHE)
      Surround statement macro with proper 'do { ... } while (false)' brackets.
      (SET_MATRIX_ROW_ENABLED_P): Assume 2nd arg is bool.
      (PRODUCE_GLYPHS): Simplify use of boolean.
      * src/fileio.c (Fcopy_file):
      If I is an integer, prefer 'if (I != 0)' to 'if (I)'.
      * src/lisp.h (UNGCPRO): Return void, not int.
      (FOR_EACH_TAIL): Use void expression, not int expression.
      * src/region-cache.c: Reindent.
      * src/region-cache.h: Copy comments from region-cache.c, to fix
      incorrect remarks about booleans.
      96c06863
  18. 20 Sep, 2013 1 commit
    • Paul Eggert's avatar
      A simpler, centralized INLINE. · 00382e8b
      Paul Eggert authored
      * lib-src/profile.c (INLINE): New macro.
      (SYSTIME_INLINE): Remove.
      * src/conf_post.h (INLINE): Define only if not already defined.
      This allows us to use a single INLINE, defined by one file
      per executable.
      * src/emacs.c (INLINE): Define it.
      Also, include category.h, charset.h, composite.h, dispextern.h,
      syntax.h, systime.h, so that their INLINE definitions are expanded
      properly for Emacs.
      * src/blockinput.h, src/keyboard.c (BLOCKINPUT_INLINE):
      * src/buffer.h, src/buffer.c (BUFFER_INLINE):
      * src/category.h, src/category.c (CATEGORY_INLINE):
      * src/character.h, src/character.c (CHARACTER_INLINE):
      * src/charset.h, src/charset.c (CHARSET_INLINE):
      * src/composite.h, src/composite.c (COMPOSITE_INLINE):
      * src/dispextern.h, src/dispnew.c (DISPEXTERN_INLINE):
      * src/frame.h, src/frame.c (FRAME_INLINE):
      * src/intervals.h, src/intervals.c (INTERVALS_INLINE):
      * src/keyboard.h, src/keyboard.c (KEYBOARD_INLINE):
      * src/lisp.h, src/alloc.c (LISP_INLINE):
      * src/process.h, src/process.c (PROCESS_INLINE):
      * src/syntax.h, src/syntax.c (SYNTAX_INLINE):
      * src/systime.h, src/sysdep.c (SYSTIME_INLINE):
      * src/termhooks.h, src/terminal.h (TERMHOOKS_INLINE):
      * src/window.h, src/window.c (WINDOW_INLINE):
      Remove.  All uses replaced with INLINE.
      00382e8b
  19. 27 Aug, 2013 1 commit
    • Paul Eggert's avatar
      Simplify EMACS_TIME-related code. · 43aac990
      Paul Eggert authored
      This portability layer is no longer needed, since Emacs has been
      using struct timespec as a portability layer for some time.
      Merge from gnulib, incorporating:
      2013-08-27 timespec: new convenience constants and function
      * src/atimer.h, src/buffer.h, src/dispextern.h, src/xgselect.h:
      Include <time.h> rather than "systime.h"; that's all that's needed now.
      * src/dispnew.c: Include <timespec.h> rather than "systime.h";
      that's all that's needed now.
      * src/systime.h (EMACS_TIME): Remove.  All uses changed to struct timespec.
      (EMACS_TIME_RESOLUTION): Remove.  All uses changed to
      TIMESPEC_RESOLUTION.
      (LOG10_EMACS_TIME_RESOLUTION): Remove.  All uses changed to
      LOG10_TIMESPEC_RESOLUTION.
      (EMACS_SECS, emacs_secs_addr): Remove.  All uses changed to tv_sec.
      (EMACS_NSECS): Remove.  All uses changed to tv_nsec.
      (make_emacs_time): Remove.  All used changed to make_timespec.
      (invalid_timespec): Rename from invalid_emacs_time.  All uses changed.
      (current_timespec): Rename from current_emacs_time.  All uses changed.
      (add_emacs_time): Remove.  All uses changed to timespec_add.
      (sub_emacs_time): Remove.  All uses change dot timespec_sub.
      (EMACS_TIME_SIGN): Remove.  All uses changed to timespec_sign.
      (timespec_valid_p): Rename from EMACS_TIME_VALID_P.  All uses changed.
      (EMACS_TIME_FROM_DOUBLE): Remove.  All uses changed to dtotimespec.
      (EMACS_TIME_TO_DOUBLE): Remove.  All uses changed to timespectod.
      (current_timespec): Rename from current_emacs_time.  All uses changed.
      (EMACS_TIME_EQ, EMACS_TIME_LT, EMACS_TIME_LE): Remove.  All uses
      changed to timespec_cmp.
      * src/xgselect.c: Include <timespec.h>, since our .h files don't.
      43aac990
  20. 10 Jul, 2013 1 commit
    • Paul Eggert's avatar
      Timestamp fixes for undo. · 954b166e
      Paul Eggert authored
      * doc/lispref/text.texi (Undo):
      Document (t . 0) and (t . -1) in buffer-undo-list.
      * etc/NEWS: Changes to visited-file-modtime, set-visited-file-modtime.
      * lisp/files.el (clear-visited-file-modtime): Move here from fileio.c.
      * src/atimer.c (schedule_atimer):
      * src/fileio.c (Ffile_newer_than_file_p):
      Minor cleanup: use EMACS_TIME_LT so that we can remove EMACS_TIME_GT.
      * src/buffer.c (buffer-undo-list): Document (t . 0) and (t . -1).
      * src/fileio.c (Fclear_visited_file_modtime): Move to lisp/files.el.
      (syms_of_fileio): Remove Sclear_visited_file_name.
      (Fvisited_file_modtime): Return -1, not (-1 ...), when the visited
      file doesn't exist; this avoids an ambiguity with negative timestamps.
      (Fset_visited_file_modtime): Accept -1 and 0 as time-list arg.
      * src/systime.h (make_emacs_time, invalid_emacs_time):
      Don't assume struct timespec layout; POSIX doesn't guarantee it.
      (EMACS_TIME_NE, EMACS_TIME_GT, EMACS_TIME_GE): Remove.
      * src/undo.c (record_first_change): Push (visited-file-modtime) onto
      undo list rather than reimplementing it by hand, incorrectly.
      
      Fixes: debbugs:14824
      954b166e
  21. 27 Apr, 2013 1 commit
  22. 24 Mar, 2013 1 commit
    • Andreas Schwab's avatar
      Reorder conditions that are written backwards · 908589fd
      Andreas Schwab authored
      * alloc.c (xpalloc, Fgarbage_collect): Reorder conditions that are
      written backwards.
      * blockinput.h (input_blocked_p): Likewise.
      * bytecode.c (exec_byte_code): Likewise.
      * callproc.c (call_process_kill, call_process_cleanup)
      (Fcall_process): Likewise.
      * ccl.c (ccl_driver, resolve_symbol_ccl_program)
      (Fccl_execute_on_string): Likewise.
      * character.c (string_escape_byte8): Likewise.
      * charset.c (read_hex): Likewise.
      * cm.c (calccost): Likewise.
      * data.c (cons_to_unsigned): Likewise.
      * dired.c (directory_files_internal, file_name_completion):
      Likewise.
      * dispnew.c (scrolling_window, update_frame_1, Fsleep_for)
      (sit_for): Likewise.
      * doc.c (Fsubstitute_command_keys): Likewise.
      * doprnt.c (doprnt): Likewise.
      * editfns.c (hi_time, decode_time_components, Fformat): Likewise.
      * emacsgtkfixed.c: Likewise.
      * fileio.c (file_offset, Fwrite_region): Likewise.
      * floatfns.c (Fexpt, fmod_float): Likewise.
      * fns.c (larger_vector, make_hash_table, Fmake_hash_table):
      Likewise.
      * font.c (font_intern_prop): Likewise.
      * frame.c (x_set_alpha): Likewise.
      * gtkutil.c (get_utf8_string): Likewise.
      * indent.c (check_display_width): Likewise.
      * intervals.c (create_root_interval, rotate_right, rotate_left)
      (split_interval_right, split_interval_left)
      (adjust_intervals_for_insertion, delete_node)
      (interval_deletion_adjustment, adjust_intervals_for_deletion)
      (merge_interval_right, merge_interval_left, copy_intervals)
      (set_intervals_multibyte_1): Likewise.
      * keyboard.c (gobble_input, append_tool_bar_item): Likewise.
      * keymap.c (Fkey_description): Likewise.
      * lisp.h (FIXNUM_OVERFLOW_P, vcopy): Likewise.
      * lread.c (openp, read_integer, read1, string_to_number):
      Likewise.
      * menu.c (ensure_menu_items): Likewise.
      * minibuf.c (read_minibuf_noninteractive): Likewise.
      * print.c (printchar, strout): Likewise.
      * process.c (create_process, Faccept_process_output)
      (wait_reading_process_output, read_process_output, send_process)
      (wait_reading_process_output): Likewise.
      * profiler.c (make_log, handle_profiler_signal): Likewise.
      * regex.c (re_exec): Likewise.
      * regex.h: Likewise.
      * search.c (looking_at_1, Freplace_match): Likewise.
      * sysdep.c (get_child_status, procfs_ttyname)
      (procfs_get_total_memory): Likewise.
      * systime.h (EMACS_TIME_VALID_P): Likewise.
      * term.c (dissociate_if_controlling_tty): Likewise.
      * window.c (get_phys_cursor_glyph): Likewise.
      * xdisp.c (init_iterator, redisplay_internal, redisplay_window)
      (try_window_reusing_current_matrix, try_window_id, pint2hrstr):
      Likewise.
      * xfns.c (Fx_window_property): Likewise.
      * xmenu.c (set_frame_menubar): Likewise.
      * xselect.c (x_get_window_property, x_handle_dnd_message):
      Likewise.
      * xsmfns.c (smc_save_yourself_CB): Likewise.
      * xterm.c (x_scroll_bar_set_handle): Likewise.
      908589fd
  23. 01 Jan, 2013 1 commit
  24. 02 Sep, 2012 1 commit
    • Paul Eggert's avatar
      * doc.c, editfns.c, insdel.c, intervals.c: Use bool for boolean. · a08d4ba7
      Paul Eggert authored
      * doc.c (read_bytecode_char, get_doc_string, reread_doc_file)
      (Fdocumentation, Fdocumentation_property, Fsnarf_documentation)
      (Fsubstitute_command_keys):
      * editfns.c (region_limit, find_field, Fconstrain_to_field)
      (save_excursion_save, save_excursion_restore)
      (disassemble_lisp_time, decode_time_components, emacs_nmemftime)
      (format_time_string, general_insert_function)
      (make_buffer_string, make_buffer_string_both)
      (Fsubst_char_in_region, Ftranslate_region_internal, Fformat):
      * insdel.c (check_markers, gap_left, adjust_markers_for_insert)
      (copy_text, insert_1, insert_1_both, insert_from_string)
      (insert_from_string_before_markers, insert_from_string_1)
      (insert_from_buffer, insert_from_buffer_1, replace_range)
      (replace_range_2, del_range_1, del_range_byte, del_range_both)
      (del_range_2, modify_region):
      * intervals.c (intervals_equal, balance_possible_root_interval)
      (adjust_intervals_for_insertion, merge_properties_sticky)
      (graft_intervals_into_buffer, lookup_char_property)
      (adjust_for_invis_intang, set_point_both)
      (get_property_and_range, compare_string_intervals)
      (set_intervals_multibyte_1, set_intervals_multibyte):
      * keyboard.c (decode_timer):
      Use bool for boolean.
      * intervals.h, lisp.h, systime.h: Reflect above API changes.
      * editfns.c (struct info): Use 1-bit unsigned bitfields for booleans.
      a08d4ba7
  25. 14 Aug, 2012 1 commit
  26. 02 Aug, 2012 1 commit
    • Paul Eggert's avatar
      Use C99-style 'extern inline' if available. · f162bcc3
      Paul Eggert authored
      * lib-src/profile.c (SYSTIME_INLINE): Define.
      * nt/config.nt: Sync with autogen/config.in.
      (_GL_INLINE, _GL_EXTERN_INLINE, _GL_INLINE_HEADER_BEGIN)
      (_GL_INLINE_HEADER_END): New macros.
      * src/buffer.h (BUFFER_INLINE):
      * src/category.h (CATEGORY_INLINE):
      * src/character.h (CHARACTER_INLINE):
      * src/charset.h (CHARSET_INLINE):
      * src/composite.h (COMPOSITE_INLINE):
      * src/dispextern.h (DISPEXTERN_INLINE):
      * src/lisp.h (LISP_INLINE):
      * src/systime.h (SYSTIME_INLINE):
      New macro, replacing 'static inline' in this header.
      * src/buffer.h, src/category.h, src/character.h, src/charset.h:
      * src/composite.h, src/dispextern.h, lisp.h, systime.h:
      Use INLINE_HEADER_BEGIN, INLINE_HEADER_END.
      * src/alloc.c (LISP_INLINE):
      * src/buffer.c (BUFFER_INLINE):
      * src/category.c (CATEGORY_INLINE):
      * src/character.c (CHARACTER_INLINE):
      * src/charset.c (CHARSET_INLINE):
      * src/composite.c (COMPOSITE_INLINE):
      * src/dispnew.c (DISPEXTERN_INLINE):
      * src/sysdep.c (SYSTIME_INLINE):
      Define to EXTERN_INLINE, so that the corresponding functions
      are compiled into code.
      * src/conf_post.h (INLINE, EXTERN_INLINE, INLINE_HEADER_BEGIN)
      (INLINE_HEADER_END): New macros.
      * src/lisp.h (PSEUDOVECTOR_FLAG): Now a macro as well as a constant,
      since it's used in non-static inline functions now.
      f162bcc3
  27. 14 Jul, 2012 1 commit
  28. 10 Jul, 2012 1 commit
    • Paul Eggert's avatar
      EMACS_TIME simplification (Bug#11875). · e9a9ae03
      Paul Eggert authored
      This replaces macros (which typically do not work in GDB)
      with functions, typedefs and enums, making the code easier to debug.
      The functional style also makes code easier to read and maintain.
      * lib-src/profile.c (TV2): Remove no-longer-needed static var.
      * src/systime.h: Include <sys/time.h> on all hosts, not just if
      WINDOWSNT, since 'struct timeval' is needed in general.
      (EMACS_TIME): Now a typedef, not a macro.
      (EMACS_TIME_RESOLUTION, LOG10_EMACS_TIME_RESOLUTION): Now constants,
      not macros.
      (EMACS_SECS, EMACS_NSECS, EMACS_TIME_SIGN, EMACS_TIME_VALID_P)
      (EMACS_TIME_FROM_DOUBLE, EMACS_TIME_TO_DOUBLE, EMACS_TIME_EQ)
      (EMACS_TIME_NE, EMACS_TIME_GT, EMACS_TIME_GE, EMACS_TIME_LT)
      (EMACS_TIME_LE): Now functions, not macros.
      (EMACS_SET_SECS, EMACS_SET_NSECS, EMACS_SET_SECS_NSECS)
      (EMACS_SET_USECS, EMACS_SET_SECS_USECS): Remove these macros,
      which are not functions.  All uses rewritten to use:
      (make_emacs_time): New function.
      (EMACS_SECS_ADDR, EMACS_SET_INVALID_TIME, EMACS_GET_TIME)
      (EMACS_ADD_TIME, EMACS_SUB_TIME): Remove these macros, which are
      not functions.  All uses rewritten to use the following, respectively:
      (emacs_secs_addr, invalid_emacs_time, get_emacs_time)
      (add_emacs_time, sub_emacs_time): New functions.
      * src/atimer.c: Don't include <sys/time.h>,	as "systime.h" does this.
      * src/fileio.c (Fcopy_file):
      * src/xterm.c (XTflash): Get the current time closer to when it's used.
      * src/makefile.w32-in ($(BLD)/atimer.$(O)): Update dependencies.
      e9a9ae03
  29. 08 Jul, 2012 1 commit
  30. 07 Jul, 2012 1 commit
    • Paul Eggert's avatar
      Do not require float-time's arg to fit in time_t (Bug#11825). · 31571fd7
      Paul Eggert authored
      This works better on hosts where time_t is unsigned, and where
      float-time is applied to the (negative) difference between two times.
      * editfns.c (decode_time_components): Last arg is now double *,
      not int *, and means to store all the result as a double, without
      worrying about whether the seconds part fits in time_t.
      All callers changed.
      (lisp_time_argument): Remove last int * arg, as it's no longer needed.
      All callers changed.
      (Ffloat_time): Do not fail merely because the specified time falls
      outside of time_t range.
      31571fd7
  31. 24 Jun, 2012 1 commit
    • Eli Zaretskii's avatar
      Improve port of struct timespec to MS-Windows. · 696056c2
      Eli Zaretskii authored
       lib/makefile.w32-in ($(BLD)/dtotimespec.$(O)):
       ($(BLD)/timespec-add.$(O)):
       ($(BLD)/timespec-sub.$(O)): Don't depend on
       $(EMACS_ROOT)/nt/inc/sys/time.h.
       lib/stat-time.h:
       lib/timespec.h:
       lib/utimens.h: Revert last change.
       src/makefile.w32-in (TIMESPEC_H): Remove nt/inc/sys/time.h.
       (SYSTIME_H): Add nt/inc/sys/time.h.
       src/systime.h [WINDOWSNT]: Include sys/time.h.
       src/s/ms-w32.h (struct timespec): Definition moved from
       nt/inc/sys/time.h.  Suggested by Paul Eggert <eggert@cs.ucla.edu>.
       nt/inc/sys/time.h (struct timespec): Don't define it here, it is
       now defined in src/s/ms-w32.h.
      
      Fixes: debbugs:9000
      696056c2
  32. 22 Jun, 2012 1 commit
  33. 11 Jan, 2012 1 commit
  34. 05 Jan, 2012 1 commit
  35. 20 Oct, 2011 1 commit
    • Paul Eggert's avatar
      Time zone name fixes for non-ASCII locales (Bug#641, Bug#9794) · 7da0b018
      Paul Eggert authored
      * configure.in (AC_STRUCT_TM, AC_STRUCT_TIMEZONE, HAVE_TM_GMTOFF):
      Remove; no longer needed, now that we defer to strftime for time
      zone names.
      * src/editfns.c: Rewrite current-time-zone so that it invokes
      the equivalent of (format-time-string "%Z") to get the time zone name.
      This fixes a bug when the time zone name contains characters that
      need converting from the system time locale to Emacs internal format.
      This fixes a shortcoming that I introduced in my 1999-10-19 patch:
      that patch fixed format-time-string to do the conversion, but
      I forgot to fix current-time-zone.
      (format_time_string): New function, containing most of
      what Fformat_time_string used to contain.
      (Fformat_time_string): Rewrite in terms of format_time_string.
      This doesn't change this function's behavior.
      (current-time-zone): Rewrite to use format_time_string.
      This fixes the bug reported by Michael Schierl in
      <http://lists.gnu.org/archive/html/emacs-devel/2007-06/msg00334.html>.
      Jason Rumney's 2007-06-07 change worked around this bug, but
      didn't fix it.
      * src/systime.h (tzname, timezone): Remove no-longer-used declarations.
      7da0b018
  36. 20 May, 2011 1 commit
  37. 12 May, 2011 1 commit
    • Paul Eggert's avatar
      Be more systematic about user-interface timestamps. · 08dc5ae6
      Paul Eggert authored
      Before, the code sometimes used 'Time', sometimes 'unsigned long',
      and sometimes 'EMACS_UINT', to represent these timestamps.  This
      change causes it to use 'Time' uniformly, as that's what X uses.
      This makes the code easier to follow, and makes it easier to catch
      integer overflow bugs such as Bug#8664.
      * frame.c (Fmouse_position, Fmouse_pixel_position):
      Use Time, not unsigned long, for user-interface timestamps.
      * keyboard.c (last_event_timestamp, kbd_buffer_get_event): Likewise.
      (button_down_time, make_lispy_position, make_lispy_movement): Likewise.
      * keyboard.h (last_event_timestamp): Likewise.
      * menu.c (Fx_popup_menu) [!HAVE_X_WINDOWS]: Likewise.
      * menu.h (xmenu_show): Likewise.
      * term.c (term_mouse_position): Likewise.
      * termhooks.h (struct input_event.timestamp): Likewise.
      (struct terminal.mouse_position_hook): Likewise.
      * xmenu.c (create_and_show_popup_menu, xmenu_show): Likewise.
      * xterm.c (XTmouse_position, x_scroll_bar_report_motion): Likewise.
      * systime.h (Time): New decl.  Pull it in from <X11/X.h> if
      HAVE_X_WINDOWS, otherwise define it as unsigned long, which is
      what it was before.
      * menu.h, termhooks.h: Include "systime.h", for Time.
      08dc5ae6
  38. 11 Mar, 2011 1 commit