| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This was inspired by commit e65c3079c65595d95749348366af9811fafff062,
which fixed a bug where the C name for a symbol disagreed with the
symbol name itself. Fix other instances of disagreements that I found.
Although this doesn’t fix a bug, it should make code easier to follow.
The remaining disagreements are idiosyncratic: Qminus, Qplus,
Qsans__serif, Qbackquote, Qcomma, Qcomma_at, Qcomma_dot.
All uses changed.
* src/alloc.c (QAutomatic_GC): Rename from Qautomatic_gc.
* src/dbusbind.c (QCsystem): Rename from QCdbus_system_bus.
(QCsession): Rename from QCdbus_session_bus.
(QCtimeout): Rename from QCdbus_timeout.
(QCbyte): Rename from QCdbus_type_byte.
(QCboolean): Rename from QCdbus_type_boolean.
(QCint16): Rename from QCdbus_type_int16.
(QCuint16): Rename from QCdbus_type_uint16.
(QCint32): Rename from QCdbus_type_int32.
(QCuint32): Rename from QCdbus_type_uint32.
(QCint64): Rename from QCdbus_type_int64.
(QCuint64): Rename from QCdbus_type_uint64.
(QCdouble): Rename from QCdbus_type_double.
(QCstring): Rename from QCdbus_type_string.
(QCobject_path): Rename from QCdbus_type_object_path.
(QCsignature): Rename from QCdbus_type_signature.
(QCunix_fd): Rename from QCdbus_type_unix_fd.
(QCarray): Rename from QCdbus_type_array.
(QCvariant): Rename from QCdbus_type_variant.
(QCstruct): Rename from QCdbus_type_struct.
(QCdict_entry): Rename from QCdbus_type_dict_entry.
(QCserial): Rename from QCdbus_registered_serial.
(QCmethod): Rename from QCdbus_registered_method.
(QCsignal): Rename from QCdbus_registered_signal.
* src/emacs-module.c (Qinternal__module_call):
Rename from Qinternal_module_call.
* src/frame.c (Qwindow__pixel_to_total):
Rename from Qwindow_pixel_to_total.
* src/gnutls.c (QChostname): Rename from QCgnutls_bootprop_hostname.
(QCpriority): Rename from QCgnutls_bootprop_priority.
(QCtrustfiles): Rename from QCgnutls_bootprop_trustfiles.
(QCkeylist): Rename from QCgnutls_bootprop_keylist.
(QCcrlfiles): Rename from QCgnutls_bootprop_crlfiles.
(QCmin_prime_bits): Rename from QCgnutls_bootprop_min_prime_bits.
(QCloglevel): Rename from QCgnutls_bootprop_loglevel.
(QCcomplete_negotiation): Rename from QCgnutls_complete_negotiation.
(QCverify_flags): Rename from QCgnutls_bootprop_verify_flags.
(QCverify_error): Rename from QCgnutls_bootprop_verify_error.
* src/w32fns.c (Qfont_parameter): Rename from Qfont_param.
(Qgnutls): Rename from Qgnutls_dll.
(Qlibxml2): Rename from Qlibxml2_dll.
(Qzlib): Rename from Qzlib_dll.
* src/w32select.c (Qutf_16le_dos): Rename from QUNICODE.
* src/window.c (Qwindow__resize_root_window):
Rename from Qwindow_resize_root_window.
(Qwindow__resize_root_window_vertically):
Rename from Qwindow_resize_root_window_vertically.
(Qwindow__sanitize_window_sizes):
Rename from Qwindow_sanitize_window_sizes.
(Qwindow__pixel_to_total): Rename from Qwindow_pixel_to_total.
* src/xdisp.c (Qredisplay_internal_xC_functionx):
Rename from Qredisplay_internal.
* src/xfns.c (Qfont_parameter): Rename from Qfont_param.
* src/xselect.c (Q_EMACS_TMP_): Rename from QEMACS_TMP.
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
| |
Run admin/update-copyright.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Remove DEFSYMs that aren't used at the C level. Also:
* src/decompress.c (Qzlib_dll):
* src/font.c (Qunicode_sip):
* src/frame.c (Qtip_frame):
* src/ftfont.c (Qserif):
* src/gnutls.c (Qgnutls_dll):
* src/xml.c (Qlibxml2_dll):
Move from here ...
* src/w32fns.c (syms_of_w32fns): ... to here,
as these are used only on MS-Windows.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The attribute doesn't help performance significantly, and the
warning seems to be more trouble than it's worth. See the thread at:
http://lists.gnu.org/archive/html/emacs-devel/2015-01/msg00361.html
* configure.ac (WERROR_CFLAGS): Don't use -Wsuggest-attribute=const.
* lib-src/make-docfile.c (write_globals):
Remove special hack for Fnext_read_file_uses_dialog_p.
* src/decompress.c (Fzlib_available_p):
* src/gnutls.c (Fgnutls_available_p):
* src/gtkutil.h (xg_uses_old_file_dialog):
* src/xdisp.c (Ftool_bar_height):
* src/xmenu.c (popup_activated):
No longer const, since it's not const on at lest some
configurations, and we shouldn't lie to the compiler.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* lib-src/make-docfile.c (struct global): New field 'flags'.
(DEFUN_noreturn, DEFUN_const): New enum bitfields.
(add_global): Now return pointer to global.
(write_globals): Add _Noreturn and ATTRIBUTE_CONST attributes
if requested by global's flags.
(stream_match): New function.
(scan_c_stream): Recognize 'attributes:' of DEFUN.
* src/callint.c (Finteractive):
* src/character.c (Fcharacterp, Fmax_char):
* src.data.c (Feq, Fnull, Fconsp, Fatom, Flistp, Fnlistp, Fsymbolp)
(Fstringp, Fchar_or_string_p, Fintegerp, Fnatnump, Fnumberp)
(Ffloatp, Fbyteorder):
* src/decompress.c (Fzlib_available_p):
* src/fns.c (Fidentity):
* src/frame.c (Fframe_windows_min_size):
* src/gnutls.c (Fgnutls_error_p, Fgnutls_available_p):
* src/window.c (Fwindow__sanitize_window_sizes):
* src/xdisp.c (Ftool_bar_height):
* src/xfaces.c (Fface_attribute_relative_p): Add const attribute.
* src/emacs.c (Fkill_emacs):
* src/eval.c (Fthrow):
* src/keyboard.c (Ftop_level, Fexit_recursive_edit)
(Fabor_recursive_edit): Add noreturn attribute.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Fixes Bug#15880.
This patch also makes Q constants (e.g., Qnil) constant addresses
from the C point of view.
* make-docfile.c: Revamp to generate table of symbols, too.
Include <stdbool.h>.
(xstrdup): New function.
(main): Don't process the same file twice.
(SYMBOL): New constant in enum global_type.
(struct symbol): Turn 'value' member into a union, either v.value
for int or v.svalue for string. All uses changed.
(add_global): New arg svalue, which overrides value, so that globals
can have a string value.
(close_emacs_global): New arg num_symbols; all uses changed.
Output lispsym decl.
(write_globals): Output symbol globals too. Output more
ATTRIBUTE_CONST, now that Qnil etc. are C constants.
Output defsym_name table.
(scan_c_file): Move most of guts into ...
(scan_c_stream): ... new function. Scan for DEFSYMs and
record symbols found. Don't read past EOF if file doesn't
end in newline.
* alloc.c, bidi.c, buffer.c, bytecode.c, callint.c, casefiddle:
* casetab.c, category.c, ccl.c, charset.c, chartab.c, cmds.c, coding.c:
* composite.c, data.c, dbusbind.c, decompress.c, dired.c, dispnew.c:
* doc.c, editfns.c, emacs.c, eval.c, fileio.c, fns.c, font.c, fontset.c:
* frame.c, fringe.c, ftfont.c, ftxfont.c, gfilenotify.c, gnutls.c:
* image.c, inotify.c, insdel.c, keyboard.c, keymap.c, lread.c:
* macfont.m, macros.c, minibuf.c, nsfns.m, nsfont.m, nsimage.m:
* nsmenu.m, nsselect.m, nsterm.m, print.c, process.c, profiler.c:
* search.c, sound.c, syntax.c, term.c, terminal.c, textprop.c, undo.c:
* window.c, xdisp.c, xfaces.c, xfns.c, xftfont.c, xmenu.c, xml.c:
* xselect.c, xsettings.c, xterm.c:
Remove Q vars that represent symbols (e.g., Qnil, Qt, Qemacs).
These names are now defined automatically by make-docfile.
* alloc.c (init_symbol): New function.
(Fmake_symbol): Use it.
(c_symbol_p): New function.
(valid_lisp_object_p, purecopy): Use it.
* alloc.c (marked_pinned_symbols):
Use make_lisp_symbol instead of make_lisp_ptr.
(garbage_collect_1): Mark lispsym symbols.
(CHECK_ALLOCATED_AND_LIVE_SYMBOL): New macro.
(mark_object): Use it.
(sweep_symbols): Sweep lispsym symbols.
(symbol_uses_obj): New function.
(which_symbols): Use it. Work for lispsym symbols, too.
(init_alloc_once): Initialize Vpurify_flag here; no need to wait,
since Qt's address is already known now.
(syms_of_alloc): Add lispsym count to symbols_consed.
* buffer.c (init_buffer_once): Compare to Qnil, not to make_number (0),
when testing whether storage is all bits zero.
* dispextern (struct image_type):
* font.c (font_property_table):
* frame.c (struct frame_parm_table, frame_parms):
* keyboard.c (scroll_bar_parts, struct event_head):
* xdisp.c (struct props):
Use XSYMBOL_INIT (Qfoo) and struct Lisp_Symbol * rather than &Qfoo and
Lisp_Object *, since Qfoo is no longer an object whose address can be
taken. All uses changed.
* eval.c (run_hook): New function. Most uses of Frun_hooks changed to
use it, so that they no longer need to take the address of a Lisp sym.
(syms_of_eval): Don't use DEFSYM on Vrun_hooks, as it's a variable.
* frame.c (syms_of_frame): Add defsyms for the frame_parms table.
* keyboard.c (syms_of_keyboard): Don't DEFSYM Qmenu_bar here.
DEFSYM Qdeactivate_mark before the corresponding var.
* keymap.c (syms_of_keymap): Use DEFSYM for Qmenu_bar and Qmode_line
instead of interning their symbols; this avoids duplicates.
(LISP_INITIALLY, TAG_PTR)
(DEFINE_LISP_SYMBOL_BEGIN, DEFINE_LISP_SYMBOL_END, XSYMBOL_INIT):
New macros.
(LISP_INITIALLY_ZERO): Use it.
(enum symbol_interned, enum symbol_redirect, struct Lisp_Symbol)
(EXFUN, DEFUN_ARGS_MANY, DEFUN_ARGS_UNEVALLED, DEFUN_ARGS_*):
Move decls up, to avoid forward uses. Include globals.h earlier, too.
(make_lisp_symbol): New function.
(XSETSYMBOL): Use it.
(DEFSYM): Now just a placeholder for make-docfile.
* lread.c (DEFINE_SYMBOLS): Define, for globals.h.
(intern_sym): New function, with body taken from old intern_driver.
(intern_driver): Use it. Last arg is now Lisp integer, not ptrdiff_t.
All uses changed.
(define_symbol): New function.
(init_obarray): Define the C symbols taken from lispsym.
Use plain DEFSYM for Qt and Qnil.
* syntax.c (init_syntax_once): No need to worry about
Qchar_table_extra_slots.
|
|
|
|
| |
Run admin/update-copyright.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* decompress.c, gnutls.c, image.c, xml.c:
If WINDOWSNT, use '#define FOO fn_FOO' to wrap dll functions,
rather than the inverse when not WINDOWSNT. This isolates the
fn_* business into the WINDOWSNT-specific section of the code,
which makes it easier to maintain the generic code.
* decompress.c (DEF_ZLIB_FN, LOAD_ZLIB_FN):
* gnutls.c (DEF_GNUTLS_FN, LOAD_GNUTLS_FN):
* image.c (DEF_IMGLIB_FN, LOAD_IMGLIB_FN):
* xml.c (DEF_XML2_FN, LOAD_XML2_FN):
Remove. All uses replaced by DEF_DLL_FN.
* w32.h (DEF_DLL_FN, LOAD_DLL_FN): New macros.
|
|
|
|
|
|
|
|
|
| |
src/decompress.c (init_zlib_functions): Move the message about zlib
being unavailable from here...
(Fzlib_decompress_region): ...to here.
lisp/url/url-http.el (url-http-create-request): Recheck zlib availability
on windows-nt each time it might be required.
|
| |
|
|
|
|
|
|
|
|
|
| |
insert_from_gap doesn't always move point, we can't use PT as
the position where the partially decompressed data ends, and
should count how may bytes was produced so far.
* decompress.c (struct decompress_unwind_data): Add nbytes member.
(unwind_decompress): Really delete partially uncompressed data.
(Fzlib_decompress_region): Take decompressed data size into account.
|
|
|
|
|
|
| |
src/decompress.c (Fzlib_available_p) [WINDOWSNT]: Update the value
of zlib_initialized according to the results of calling
init_zlib_functions.
|
| |
|
| |
|
|
|
|
|
|
|
| |
(Fzlib_decompress_region): Don't bother verifying
that avail_out <= UINT_MAX, as that was confusing.
Mention the restriction in a comment instead.
Prefer 'int' to 'ptrdiff_t' when 'int' is wide enough.
|
|
|
|
|
| |
src/decompress.c (Fzlib_decompress_region) [WINDOWSNT]: Return Qnil
if loading zlib failed.
|
| |
|
|
|
|
|
|
|
|
| |
configure.ac (HAVE_ZLIB): Don't use -lz on MinGW.
src/decompress.c <zlib_initialized> [WINDOWSNT]: New static variable.
(Fzlib_decompress_region) [WINDOWSNT]: Call init_zlib_functions if
not yet initialized.
|
|
|
|
| |
Also support zlib-format compression.
|
|
|
|
|
|
| |
* configure.ac (HAVE_ZLIB): Don't assume zlib is linked if PNG is.
* src/decompress.c (fn_inflateInit2) [!WINDOWSNT]:
Don't assume presence of fn_inflateInit2_ zlib internal function.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
configure.ac (LIBZ): Comment on w32 peculiarities regarding LIBZ.
src/decompress.c [WINDOWSNT]: Include windows.h and w32.h.
(DEF_ZLIB_FN, LOAD_ZLIB_FN) [WINDOWSNT]: New macros. Use them to
define static variables that are pointers to zlib functions to be
dynamically loaded.
(init_zlib_functions) [WINDOWSNT]: New function.
(fn_inflateInit2_, fn_inflate, fn_inflateEnd, fn_inflateInit2):
New macros.
(Fdecompress_gzipped_region, unwind_decompress): Use the fn_*
macros instead of invoking the zlib functions directly.
(syms_of_decompress): DEFSYM Qzlib_dll. Staticpro
Szlib_available_p.
lisp/term/w32-win.el (dynamic-library-alist): Add DLLs for zlib.
|
|
|
|
|
|
|
|
|
|
| |
Tune a bit. Reindent as per usual Emacs style.
(BUFFER_SIZE): Remove.
(Fdecompress_gzipped_region): Do not mishandle input buffers with
more than UINT_MAX bytes. Decompress into the gap instead of into
an auto buffer, as this should avoid copying. Return nil if
'inflate' returns Z_NEED_DICT, as we have no dictionary. Do not
set immediate_quit; we shouldn't trust zlib code that much.
|
|
|
|
|
| |
* decompress.c (Fdecompress_gzipped_region): Respect all zlib
errors, and really move the gap to where we want it.
|
|
This adds a new file, src/decompress.c, as well as tests for the
presence of -lz.
|