1. 24 May, 2020 1 commit
    • Eli Zaretskii's avatar
      Fix rare assertion violations in 'etags' · 0195809b
      Eli Zaretskii authored
      * lib-src/etags.c (pfnote): Instead of raising an assertion when
      we get an empty tag name, return immediately.  (Bug#41465)
      
      * test/manual/etags/ETAGS.good_1:
      * test/manual/etags/ETAGS.good_2:
      * test/manual/etags/ETAGS.good_3:
      * test/manual/etags/ETAGS.good_4:
      * test/manual/etags/ETAGS.good_5:
      * test/manual/etags/ETAGS.good_6: Adapt to latest changes in
      etags.
      0195809b
  2. 23 May, 2020 1 commit
  3. 04 Mar, 2020 1 commit
    • Paul Eggert's avatar
      Pacify GCC 9.2.1 20190927 -O3 · dc3006cf
      Paul Eggert authored
      Original problem report by N. Jackson in:
      https://lists.gnu.org/r/emacs-devel/2020-03/msg00047.html
      I found some other warnings when I used gcc, and fixed them
      with this patch.
      * lib-src/etags.c: Include verify.h.
      (xnmalloc, xnrealloc): Tell the compiler that NITEMS is
      nononnegative and ITEM_SIZE is positive.
      * src/conf_post.h (__has_attribute_returns_nonnull)
      (ATTRIBUTE_RETURNS_NONNULL): New macros.
      * src/editfns.c (Fuser_full_name): Don’t assume Fuser_login_name
      returns non-nil.
      * src/intervals.c (rotate_right, rotate_left, update_interval):
      * src/intervals.h (LENGTH, LEFT_TOTAL_LENGTH, RIGHT_TOTAL_LENGTH):
      Use TOTAL_LENGTH0 or equivalent on intervals that might be null.
      * src/intervals.h (TOTAL_LENGTH): Assume arg is nonnull.
      (TOTAL_LENGTH0): New macro, with the old TOTAL_LENGTH meaning.
      (make_interval, split_interval_right): Add ATTRIBUTE_RETURNS_NONNULL.
      * src/pdumper.c (dump_check_dump_off): Now returns void, since
      no caller uses the return value.  Redo assert to pacify GCC.
      (decode_emacs_reloc): Add a seemingly-random eassume to pacify GCC.
      Ugly, and I suspect due to a bug in GCC.
      dc3006cf
  4. 01 Jan, 2020 1 commit
  5. 10 Dec, 2019 2 commits
  6. 26 Nov, 2019 1 commit
    • Paul Eggert's avatar
      etags: remove some arbitrary limits · cffa5703
      Paul Eggert authored
      etags had undefined behavior if input files, lines, tags, etc.,
      had more than INT_MAX bytes.  Clean up the usage of integer types
      to fix the overflow errors I found.
      * admin/merge-gnulib (GNULIB_MODULES): Add mempcpy.
      * lib-src/etags.c: Include inttypes.h, intprops.h.
      (memcpyz): New function.  Use it to simplify several occurrences
      of memcpy followed by storing a trailing '\0'.
      (xnew): Use xnmalloc, to catch overflow on integer multiplication.
      (xrnew): Change last arg to multiplier.  The type is not needed.
      All callers changed.
      (node, lineno, charno, linecharno, invalidcharno, make_tag):
      (pfnote, add_node, number_len, C_symtype, lbz, Makefile_targets)
      (readline):
      Use intmax_t for line numbers and character positions, instead of
      int or long.
      (linebuffer, make_tag, pfnote, total_size_of_entries, put_entry)
      (in_word_set, C_symtype, token, cstack, pushclass_above):
      (popclass_above, write_classname, consider_token, C_entries)
      (Ruby_functions, Makefile_targets, Lua_functions, TeX_commands)
      (TeX_decode_env, erlang_func, erlang_attribute, erlang_atom)
      (substitute, regex_tag_multiline, nocase_tail, readline_interval)
      (readline, savenstr, concat, etags_getcwd, relative_filename)
      (linebuffer_setlen):
      Use ptrdiff_t for object sizes, instead of int or long or unsigned
      or size_t.
      (write_classname, C_entries):
      Avoid sprintf, as the result could exceed INT_MAX bytes
      and then behavior goes haywire.
      (main): Use int, instead of unsigned, for argv counts.
      (get_language_from_filename): Use bool for boolean.
      (Ruby_functions): Prefer strcpy to memcpy when copying "=".
      (linebuffer_setlen): Use ‘if’ instead of ‘while’.
      (memory_full, xnmalloc, xnrealloc): New functions.
      (xmalloc): Use memory_full, and take a ptrdiff_t instead of a size_t.
      (xrealloc): Remove; no longer needed.
      * lib/gnulib.mk.in, m4/gnulib-comp.m4: Regenerate.
      * lib/mempcpy.c, m4/mempcpy.m4: New files, copied from Gnulib.
      cffa5703
  7. 31 Aug, 2019 1 commit
    • Paul Eggert's avatar
      Check instead of relying on NOTREACHED · 77910055
      Paul Eggert authored
      NOTREACHED was designed for traditional lint decades ago,
      and _Noreturn now normally subsumes its function.
      In the one case in Emacs where NORETURN might help and _Noreturn does
      not, check for NOTREACHED instead of assuming it.
      * lib-src/etags.c (main):
      * src/xterm.c (x_connection_closed):
      Remove NOTREACHED after a call to a _Noreturn function, as NOTREACHED
      is no longer needed there.  Also, one of the NOTREACHEDs was
      misplaced, which defeated traditional lint checking anyway.
      * lib-src/pop.c (pop_getline): Redo so as to not need NOTREACHED.
      * src/emacs.c (main): Use eassume (false) rather than NOTREACHED,
      so that running with ENABLE_CHECKING catches any internal error
      causing the toplevel Frecursive_edit to return.
      77910055
  8. 25 Jun, 2019 2 commits
    • Paul Eggert's avatar
      Avoid some strlen work, primarily via strnlen · d7c68362
      Paul Eggert authored
      * admin/merge-gnulib (GNULIB_MODULES): Add strnlen.
      * lib-src/etags.c (find_entries):
      * src/emacs.c (main):
      * src/nsmenu.m (parseKeyEquiv:):
      * src/nsterm.m (ns_xlfd_to_fontname):
      * src/term.c (vfatal):
      Prefer !*X to !strlen (X).
      * lib-src/etags.c (pfnote, add_regex):
      * lib-src/pop.c (pop_open):
      * lib-src/update-game-score.c (main):
      * lwlib/lwlib.c (lw_separator_p):
      * src/doprnt.c (doprnt):
      * src/emacs.c (main):
      * src/inotify.c (inotifyevent_to_event):
      * src/keyboard.c (menu_separator_name_p, parse_tool_bar_item):
      * src/sysdep.c (get_current_dir_name_or_unreachable):
      * src/xdisp.c (store_mode_line_string):
      Use strnlen to avoid unnecessary work with strlen.
      * lib-src/etags.c (Prolog_functions, prolog_pr)
      (Erlang_functions, erlang_func):
      Prefer ptrdiff_t to size_t when either will do.
      (prolog_pr, erlang_func): New arg LASTLEN, to avoid
      unnecessary strlen call. All callers changed.
      * lib/gnulib.mk.in, m4/gnulib-comp.m4: Regenerate.
      * lib/strnlen.c, m4/strnlen.m4: New files, copied from Gnulib.
      * lwlib/lwlib.c (lw_separator_p):
      * src/json.c (json_has_prefix):
      Use strncmp to avoid unecessary work with strlen + memcmp.
      * src/process.c (set_socket_option): Use SBYTES instead of strlen.
      d7c68362
    • David Hull's avatar
      etags: Fix handling of quoted symbol names in Erlang · f0151e17
      David Hull authored
      * lib-src/etags.c (erlang_attribute): Fix handling of quoted
      symbol names in Erlang (bug#24960).
      f0151e17
  9. 24 Jun, 2019 2 commits
  10. 20 Jun, 2019 1 commit
    • Paul Eggert's avatar
      Simplify lib-src version printing · b6af2792
      Paul Eggert authored
      * lib-src/Makefile.in (etags_cflags): Remove.
      All uses replaced by a simple ‘-o $@’.
      (ebrowse${EXEEXT}, emacsclient${EXEEXT}, emacsclientw${EXEEXT}):
      Omit -DVERSION= option.
      * lib-src/ebrowse.c (VERSION):
      * lib-src/emacsclient.c (VERSION):
      * lib-src/etags.c (EMACS_NAME, VERSION): Remove.
      All uses replaced by PACKAGE_NAME and PACKAGE_VERSION.
      * lib-src/ebrowse.c (version):
      * lib-src/etags.c (print_version):
      Use fputs to output the version info, since that’s fputs_unlocked.
      * lib-src/etags.c (PROGRAM_NAME): New macro.
      (print_version): Use it.
      b6af2792
  11. 23 May, 2019 1 commit
    • Paul Eggert's avatar
      Avoid backslash-newline-newline in source code · 54244364
      Paul Eggert authored
      * etc/refcards/Makefile (PDF_FRENCH):
      * lib-src/etags.c (LOOP_ON_INPUT_LINES):
      * lisp/dabbrev.el (dabbrev-check-other-buffers):
      * lisp/org/org-id.el (org-id-link-to-org-use-id):
      * lisp/org/org.el (org-support-shift-select, org-file-apps):
      * src/alloc.c (CHECK_ALLOCATED_AND_LIVE)
      (CHECK_ALLOCATED_AND_LIVE_SYMBOL):
      * src/frame.h (FRAME_PIXEL_WIDTH_TO_TEXT_COLS):
      * src/regex-emacs.c (PREFETCH_NOLIMIT):
      * src/window.h (WINDOW_BUFFER):
      Remove backslash-newline that immediately precedes another
      newline, as this is not the usual style and is confusing.
      54244364
  12. 03 May, 2019 1 commit
    • Paul Eggert's avatar
      Simplify use of NDEBUG in etags.c · 6caf9be6
      Paul Eggert authored
      * lib-src/etags.c [!DEBUG]: Do not define NDEBUG,
      as that’s conf_post.h’s job now.
      [NDEBUG]: Do not redefine ‘assert’, as that works around
      ancient bugs (e.g., sunos4 pcc) that don’t matter any more,
      as can be seen that other Emacs source files that successfully
      use assert.h without this workaround.
      6caf9be6
  13. 01 Jan, 2019 1 commit
  14. 12 Aug, 2018 1 commit
    • Paul Eggert's avatar
      Make mini-gmp safe for --enable-gcc-warnings · d966f8d2
      Paul Eggert authored
      * configure.ac (GMP_OBJ): When building mini-gmp, compile
      mini-gmp-emacs.c, not mini-gmp.c.
      * lib-src/etags.c (NDEBUG): Don't attempt to redefine, in
      case the builder compiles with -DNDEBUG.
      * src/conf_post.h (NDEBUG) [!ENABLE_CHECKING && !NDEBUG]: Define.
      This avoids bloat in mini-gmp-emacs.o.
      * src/mini-gmp-emacs.c: New file, which pacifies --enable-gcc-warnings.
      d966f8d2
  15. 06 Aug, 2018 2 commits
    • Paul Eggert's avatar
      Use Gnulib regex for lib-src · d904cc83
      Paul Eggert authored
      Emacs regular expressions forked from everyone else long ago.
      This makes it official and should allow simplification later.
      etags.c now uses the glibc regex API, falling back on a
      Gnulib-supplied substitute lib/regex.c if necessary.
      Emacs proper now uses its own regular expression module.
      Although this patch may look dauntingly large, most of it
      was generated automatically by admin/merge-gnulib
      and contains an exact copy of the glibc regex source,
      and the by-hand changes do not grow the Emacs source code.
      * admin/merge-gnulib (GNULIB_MODULES): Add regex.
      (AVOIDED_MODULES): Add btowc, langinfo, lock, mbrtowc, mbsinit,
      nl_langinfo, wchar, wcrtomb, wctype-h.
      * lib-src/Makefile.in (regex-emacs.o): Remove; Gnulib does it now.
      (etags_deps, etags_libs): Remove regex-emacs.o.
      * lib-src/etags.c: Go back to including regex.h.
      (add_regex): Use unsigned char translation array,
      since glibc regex requires that.
      * lib/Makefile.in (not_emacs_OBJECTS, for_emacs_OBJECTS): New macros.
      (libegnu_a_OBJECTS): Use them, to avoid building e-regex.o.
      * lib/gnulib.mk.in, m4/gnulib-comp.m4: Regenerate.
      * lib/regcomp.c, lib/regex.c, lib/regex.h, lib/regex_internal.c:
      * lib/regex_internal.h, lib/regexec.c, m4/builtin-expect.m4:
      * m4/eealloc.m4, m4/glibc21.m4, m4/mbstate_t.m4, m4/regex.m4:
      New files, copied from Gnulib.
      * src/regex-emacs.h, src/conf_post.h:
      (RE_TRANSLATE_TYPE, RE_TRANSLATE, RE_TRANSLATE_P):
      Move from src/conf_post.h to src/regex-emacs.h,
      so that they don’t interfere with compiling lib/regex.c.
      d904cc83
    • Paul Eggert's avatar
      Rename src/regex.c to src/regex-emacs.c. · e5652268
      Paul Eggert authored
      This is in preparation for using Gnulib regex for etags,
      to avoid collisions in include directives.
      * src/regex-emacs.c: Rename from src/regex.c.
      * src/regex-emacs.h: Rename from src/regex.h.  All uses changed.
      * test/src/regex-emacs-tests.el: Rename from test/src/regex-tests.el.
      e5652268
  16. 28 Apr, 2018 1 commit
    • Paul Eggert's avatar
      Port --enable-gcc-warnings to GCC 8 · 8c3215e7
      Paul Eggert authored
      * configure.ac: Do not use GCC 8’s new -Wcast-align flag.
      * lib-src/ebrowse.c (xmalloc):
      * lib-src/emacsclient.c (xmalloc, xstrdup):
      * lib-src/etags.c (xmalloc):
      * lib-src/make-docfile.c (xmalloc):
      * lib-src/movemail.c (xmalloc):
      * src/dispnew.c (new_glyph_pool):
      * src/regex.c (xmalloc):
      * src/term.c (tty_menu_create):
      * src/tparam.h (tparam):
      Use ATTRIBUTE_MALLOC.  Also see GCC bug 85562.
      * lib-src/emacsclient.c (fail):
      Do not dereference a null pointer.
      * src/frame.c (delete_frame):
      Add a decl with UNINIT to work around GCC bug 85563.
      * src/menu.h (finish_menu_items):
      Do not use attribute const.
      * src/regex.c (analyze_first): Use FALLTHROUGH, not a comment.
      8c3215e7
  17. 11 Jan, 2018 1 commit
    • Eli Zaretskii's avatar
      Teach etags new interpreters for some languages · 7ba75b96
      Eli Zaretskii authored
      * lib-src/etags.c (Erlang_interpreters, Lua_interpreters)
      (Prolog_interpreters, Python_interpreters, Ruby_interpreters): New
      static variables.
      (lang_names): Use them to set interpreters for Erlang, Lua,
      Prolog, Python, and Ruby.
      (find_entries): Support "/usr/bin/env FOO" form of specifying an
      interpreter.
      
      * test/manual/etags/perl-src/htlmify-cystic: Modify the has-bang
      line to test the "env FOO" interpreter spec.  (Bug#30075)
      * test/manual/etags/ETAGS.good_1:
      * test/manual/etags/ETAGS.good_2:
      * test/manual/etags/ETAGS.good_3:
      * test/manual/etags/ETAGS.good_4:
      * test/manual/etags/ETAGS.good_5:
      * test/manual/etags/ETAGS.good_6: Adapt to latest changes in test
      files.
      7ba75b96
  18. 01 Jan, 2018 1 commit
  19. 15 Oct, 2017 1 commit
    • Eli Zaretskii's avatar
      Avoid compilation warnings in optimized builds · 325dfdae
      Eli Zaretskii authored
      * src/process.c (Fmake_network_process):
      * src/image.c (xbm_scan, gif_load):
      * src/fileio.c (Frename_file):
      * src/data.c (Fmake_local_variable):
      * src/buffer.c (fix_start_end_in_overlays):
      * lib-src/etags.c (process_file_name): Mark variables with UNINIT
      to avoid compiler warnings in optimized builds.
      325dfdae
  20. 16 Sep, 2017 1 commit
  21. 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
  22. 11 Sep, 2017 1 commit
  23. 10 Sep, 2017 2 commits
  24. 09 Sep, 2017 2 commits
    • Paul Eggert's avatar
      Improve --enable-gcc-warnings for MinGW64 · d6312354
      Paul Eggert authored
      This partially reverts my 2016-05-30 patch.  Apparently MinGW64
      still requires pacifications that GCC 7.1.1 x86-64 (Fedora 26)
      does not.  Also, pacify tparam.c, which isn’t used on Fedora.
      * lib-src/etags.c (process_file_name, TeX_commands):
      * src/buffer.c (fix_overlays_before):
      * src/data.c (Fmake_variable_buffer_local, cons_to_unsigned)
      (cons_to_signed):
      * src/editfns.c (Ftranslate_region_internal):
      Prefer UNINIT to some stray value, as this simplifies
      code-reading later.
      * src/eval.c (CACHEABLE): New macro.
      (internal_lisp_condition_case): Use it.
      * src/tparam.c (tparam1): Use FALLTHROUGH to pacify GCC.
      d6312354
    • Eli Zaretskii's avatar
      Fix compilation warnings in MinGW64 build using GCC 7 · 2b84c166
      Eli Zaretskii authored
      Reported by Richard Copley <rcopley@gmail.com>.
      * src/w32heap.c (init_heap): Declare enable_lfh only for
      mingw.org's MinGW build.
      
      * src/w32console.c (w32con_write_glyphs):
      * src/unexw32.c (get_section_info, COPY_CHUNK, unexec): Fix some
      mismatches of data type vs format spec.
      
      * src/w32fns.c (compute_tip_xy):
      * src/w32proc.c (stop_timer_thread):
      * src/w32notify.c (remove_watch):
      * src/eval.c (internal_lisp_condition_case):
      * src/editfns.c (Ftranslate_region_internal):
      * src/data.c (Fmake_variable_buffer_local, cons_to_unsigned)
      (cons_to_signed):
      * src/buffer.c (fix_overlays_before): Initialize variables to
      avoid compiler warnings.
      
      * lib-src/etags.c (TeX_commands, process_file_name): Initialize
      variables to avoid compilation warnings.
      2b84c166
  25. 17 Aug, 2017 1 commit
    • Eli Zaretskii's avatar
      Fix the MS-Windows build · 2cfb32bf
      Eli Zaretskii authored
      * nt/gnulib-cfg.mk (OMIT_GNULIB_MODULE_open): Omit Gnulib module
      'open'.
      
      * lib-src/etags.c (O_CLOEXEC) [WINDOWSNT]: Restore definition.
      2cfb32bf
  26. 16 Aug, 2017 1 commit
    • Paul Eggert's avatar
      Merge from Gnulib; use ‘open’ for O_CLOEXEC · 794c3cd3
      Paul Eggert authored
      This incorporates:
      2017-08-15 renameat: ensure declaration in <stdio.h> on NetBSD
      2017-08-15 extensions: enable NetBSD specific extensions
      2017-08-14 open: support O_CLOEXEC
      2017-08-13 reallocarray: new module
      * admin/merge-gnulib (AVOIDED_MODULES): Remove ‘open’, since
      it now supports O_CLOEXEC and this simplifies Emacs.
      * build-aux/config.guess, lib/fcntl.in.h, lib/stdio.in.h:
      * lib/stdlib.in.h, m4/extensions.m4, m4/stdlib_h.m4:
      Copy from Gnulib.
      * lib/cloexec.c, lib/cloexec.h, lib/open.c:
      * m4/mode_t.m4, m4/open-cloexec.m4, m4/open.m4:
      New files, copied from Gnulib.
      * lib/gnulib.mk.in, m4/gnulib-comp.m4: Regenerate.
      * lib-src/etags.c (O_CLOEXEC) [WINDOWSNT]:
      Remove, as Gnulib does this for us.
      * src/filelock.c (create_lock_file):
      * src/sysdep.c (emacs_open, emacs_pipe):
      Don’t worry about O_CLOEXEC == 0, as Gnulib no longer sets it to 0.
      794c3cd3
  27. 08 Jul, 2017 1 commit
    • Alexander Gramiak's avatar
      Support '=' in Scheme and Lisp tags in 'etags' · 42cdb686
      Alexander Gramiak authored
      * lib-src/etags.c (get_lispy_tag): New function.
      (L_getit, Scheme_functions): Use get_lispy_tag (Bug#5624).
      * test/manual/etags/CTAGS.good:
      * test/manual/etags/ETAGS.good_1:
      * test/manual/etags/ETAGS.good_2:
      * test/manual/etags/ETAGS.good_3:
      * test/manual/etags/ETAGS.good_4:
      * test/manual/etags/ETAGS.good_5:
      * test/manual/etags/ETAGS.good_6:
      * test/manual/etags/Makefile:
      * test/manual/etags/el-src/TAGTEST.EL: Update tests.
      * test/manual/etags/scm-src/test.scm: New tests for Scheme.
      42cdb686
  28. 22 Jun, 2017 1 commit
    • Paul Eggert's avatar
      Use unlocked stdio more systematically · f6ef15cf
      Paul Eggert authored
      This can improve performance significantly on stdio-bottlenecked code.
      E.g., make-docfile is 3x faster on my Fedora 25 x86-64 desktop.
      * admin/merge-gnulib (GNULIB_MODULES): Add unlocked-io.
      * lib-src/ebrowse.c, lib-src/emacsclient.c, lib-src/etags.c:
      * lib-src/hexl.c, lib-src/make-docfile.c, lib-src/movemail.c:
      * lib-src/profile.c, lib-src/update-game-score.c:
      Include unlocked-io.h instead of stdio.h, since these programs are
      single-threaded.
      * lib/gnulib.mk.in, m4/gnulib-comp.m4: Regenerate.
      * lib/unlocked-io.h, m4/unlocked-io.m4: New files, copied from Gnulib.
      * src/charset.c, src/cm.c, src/emacs.c, src/image.c, src/keyboard.c:
      * src/lread.c, src/term.c:
      Include sysstdio.h, possibly instead of stdio.h, to define
      the unlocked functions if the system does not provide them.
      * src/charset.c, src/lread.c (getc_unlocked):
      Remove, since sysstdio.h now defines it if needed.
      * src/cm.c (cmputc, cmcheckmagic):
      * src/dispnew.c (update_frame, update_frame_with_menu)
      (update_frame_1, Fsend_string_to_terminal, Fding, bitch_at_user):
      * src/emacs.c (main, Fdump_emacs):
      * src/fileio.c (Fdo_auto_save, Fset_binary_mode):
      * src/image.c (slurp_file, png_read_from_file, png_load_body)
      (our_stdio_fill_input_buffer):
      * src/keyboard.c (record_char, kbd_buffer_get_event, handle_interrupt):
      * src/lread.c (readbyte_from_file):
      * src/minibuf.c (read_minibuf_noninteractive):
      * src/print.c (printchar_to_stream, strout)
      (Fredirect_debugging_output):
      * src/sysdep.c (reset_sys_modes, procfs_ttyname)
      (procfs_get_total_memory):
      * src/term.c (tty_ring_bell, tty_send_additional_strings)
      (tty_set_terminal_modes, tty_reset_terminal_modes)
      (tty_update_end, tty_clear_end_of_line, tty_write_glyphs)
      (tty_write_glyphs_with_face, tty_insert_glyphs)
      (tty_menu_activate):
      * src/xfaces.c (Fx_load_color_file):
      Use unlocked stdio when it should be safe.
      * src/sysstdio.h (clearerr_unlocked, feof_unlocked, ferror_unlocked)
      (fflush_unlocked, fgets_unlocked, fputc_unlocked, fputs_unlocked)
      (fread_unlocked, fwrite_unlocked, getc_unlocked, getchar_unlocked)
      (putc_unlocked, putchar_unloced): Provide substitutes if not declared.
      f6ef15cf
  29. 16 May, 2017 1 commit
    • Paul Eggert's avatar
      Merge with gnulib, pacifying GCC 7 · 2e1bebe2
      Paul Eggert authored
      This incorporates:
      2017-05-16 manywarnings: update for GCC 7
      2017-05-15 sys_select: Avoid "was expanded before it was required"
      * configure.ac (nw): Suppress GCC 7’s new -Wduplicated-branches and
      -Wformat-overflow=2 options, due to too many false alarms.
      * doc/misc/texinfo.tex, lib/strftime.c, m4/manywarnings.m4:
      Copy from gnulib.
      * m4/gnulib-comp.m4: Regenerate.
      * src/coding.c (decode_coding_iso_2022):
      Fix bug uncovered by -Wimplicit-fallthrough.
      * src/conf_post.h (FALLTHROUGH): New macro.
      Use it to mark all switch cases that fall through.
      * src/editfns.c (styled_format): Use !, not ~, on bool.
      * src/gtkutil.c (xg_check_special_colors):
      When using sprintf, don’t trust Gtk to output colors in [0, 1] range.
      (xg_update_scrollbar_pos): Avoid use of possibly-uninitialized bool;
      this bug was actually caught by Clang.
      * src/search.c (boyer_moore):
      Tell GCC that CHAR_BASE, if nonzero, must be a non-ASCII character.
      * src/xterm.c (x_draw_glyphless_glyph_string_foreground):
      Tell GCC that glyph->u.glyphless.ch must be a character.
      2e1bebe2
  30. 12 Mar, 2017 1 commit
    • Eli Zaretskii's avatar
      Teach etags to process ENUM_BF correctly · f0836259
      Eli Zaretskii authored
      * lib-src/etags.c (sym_type): New enumeration value st_C_enum_bf.
      (hash): Regenerated values for asso_values[] array.
      (in_word_set): Update values of TOTAL_KEYWORDS and
      MAX_HASH_VALUE.  Add "ENUM_BF" to the wordlist[] array.
      (in_enum_bf): New file-global variable.
      (consider_token): Skip ENUM_BF if not in a macro definition.
      (C_entries): Reset the in_enum_bf flag when past its closing
      parenthesis.
      
      * test/manual/etags/ETAGS.good_1:
      * test/manual/etags/ETAGS.good_2:
      * test/manual/etags/ETAGS.good_3:
      * test/manual/etags/ETAGS.good_4:
      * test/manual/etags/ETAGS.good_5:
      * test/manual/etags/ETAGS.good_6:
      * test/manual/etags/CTAGS.good: Adapt to changes in etags.
      f0836259
  31. 23 Feb, 2017 1 commit
    • Paul Eggert's avatar
      Merge from gnulib · 7204577b
      Paul Eggert authored
      This incorporates:
      2017-02-16 xbinary-io: rename from xsetmode
      2017-02-15 xsetmode: new module
      * lib-src/etags.c (main):
      * lib-src/hexl.c (main):
      * src/emacs.c (main) [MSDOS]:
      Prefer set_binary_mode to the obsolescent SET_BINARY.
      * lib/binary-io.c, lib/binary-io.h: Copy from gnulib.
      7204577b
  32. 01 Jan, 2017 1 commit
  33. 01 Dec, 2016 1 commit
    • Helmut Eller's avatar
      Forth related improvements for etags · bb8e3827
      Helmut Eller authored
      Generate correct tags names for things like "(foo)".
      Previously "(foo" created.
      
      Fix a bug where a tag for "-bar" was created when encountering things
      like "create-bar".
      
      Recognize more words from the Forth-2012 Standard.
      
      * lib-src/etags.c (Forth_words): Check for whitespace after defining
      words.  Create tag with make_tag instead of get_tag to avoid notiname
      which isn't appropriate for Forth.
      
      * test/manual/etags/forth-src/test-forth.fth: Add some test cases.
      * test/manual/etags/ETAGS.good_1:
      * test/manual/etags/ETAGS.good_2:
      * test/manual/etags/ETAGS.good_3:
      * test/manual/etags/ETAGS.good_4:
      * test/manual/etags/ETAGS.good_5:
      * test/manual/etags/ETAGS.good_6:
      * test/manual/etags/CTAGS.good: Adapt to the changes in etags.c and
      new test cases.
      bb8e3827
  34. 26 Nov, 2016 1 commit
    • Paul Eggert's avatar
      Port build to gcc -fcheck-pointer-bounds · d2d4b074
      Paul Eggert authored
      This does not let Emacs run, just build.
      * lib-src/etags.c (main):
      * lib-src/profile.c (main):
      Use return, not exit.
      * src/bytecode.c (BYTE_CODE_THREADED) [__CHKP__]:
      Do not define, as -fcheck-pointer-bounds is incompatible with taking
      addresses of labels.
      * src/menu.c (Fx_popup_dialog): Use eassume, not eassert,
      to pacify gcc -fcheck-pointer-bounds -Wnull-dereference.
      d2d4b074