Mercurial > hg > xemacs-beta
changeset 5199:49e931565616
merge
| author | Ben Wing <ben@xemacs.org> |
|---|---|
| date | Mon, 12 Apr 2010 00:53:18 -0500 |
| parents | bc3ede8f29a8 (diff) c87ec061e8cc (current diff) |
| children | 70ed8a0d8da8 |
| files | src/ChangeLog |
| diffstat | 7 files changed, 429 insertions(+), 110 deletions(-) [+] |
line wrap: on
line diff
--- a/CHANGES-beta Fri Apr 09 14:51:11 2010 +0200 +++ b/CHANGES-beta Mon Apr 12 00:53:18 2010 -0500 @@ -2,26 +2,50 @@ by Ben Wing: -debugging: +Debugging (Lisp level): -- make objects consistently print a UID, with a separate number space per object type -- add variable `debug-soe' for debugging stack-of-extents code in extents.c +-- add variable debug-regexps for debugging regexp code, takes list of areas + to show info about -- correctly note pdumped objects in memory-usage stats returned by `garbage-collect' and `object-memory-usage-stats'. -- make VDB debugging functions (e.g. `test-segfault', which causes an immediate crash!) conditional on `--with-debug' -- rename `debug-xemacs-searches' -> `debug-searches' +-- rename `xft-debug-level' -> `debug-xft' +-- rename `debug-x-objects' -> `debug-x-fonts' -- Turn on "compiled-function annotation hack" so that compiled-function objects print the function they are assigned to -- Resurrect byte-metering code when --with-debug; enable with variables `byte-code-meter', `byte-metering-on' -- Add more checks for invalid byte code; when a byte-code-related crash occurs, output the last 100 instructions processed - -documentation: +-- Improved memory-usage mechanism -- removal of `*-memory-usage' in favor + of generalized `object-memory-usage'; `show-memory-usage' and + `show-object-memory-usage-stats' show, in addition to regular object usage, + associated non-Lisp usage as well as ancillary Lisp object usage; + `garbage-collect' and `object-memory-usage-stats' return information on + storage overhead, associated non-Lisp usage and ancillary Lisp usage + +Lisp documentation: -- fix to `previous/next-single[-char]-property-change' +-- Document the keywords to the various sequence/list functions: + reduce, fill, replace, remove*, remove-if, remove-if-not, delete*, + delete-if, delete-if-not, remove-duplicates, delete-duplicates, + substitute, substitute-if, substitute-if-not, nsubstitute, + nsubstitute-if, nsubstitute-if-not, find, find-if, find-if-not, + position, position-if, position-if-not, count, count-if, count-if-not, + mismatch, search, sort*, stable-sort, merge, member*, member-if, + member-if-not, assoc*, assoc-if, assoc-if-not, rassoc*, rassoc-if, + rassoc-if-not, union, nunion, intersection, nintersection, + set-difference, nset-difference, set-exclusive-or, nset-exclusive-or, + subsetp, subst-if, subst-if-not, nsubst, nsubst-if, nsubst-if-not, + sublis, nsublis, tree-equal, cl-tree-equal-rec, pushnew, adjoin, subst +-- fix so that Common-Lisp argument lists get properly displayed in + function documentation Lisp API: @@ -38,56 +62,300 @@ -- In `scan-lists' and friends, when an error occurs, return a `scan-error' along with two arguments specifying the range in which the error occurred, for GNU compatibility - -Internals: +-- Functions for dealing with conditional compilation of code depending on + presence or absence of features: + -- error-unless-tests-match -- signal an error unless a test expression + matches when file is compiled and loaded + -- byte-compile-file-being-compiled -- return name of file being + byte-compiled + -- compiled-if, compiled-when -- like `if' or `when' but test is evaluated + at compile time +-- Functions for doing stable set operations + -- stable-union, stable-intersection + +Internals: Lisp objects -- reduce lcrecord header size from 3 words to 2 -- major change to the way Lisp objects are defined and declared; introduce a cleaner surface-layer API that eliminates references to "lrecords" and "lcrecords", and uses "frob-block object" in place of "basic object"/ - "simple object"/etc. + "simple object"/etc.: + + Renamed: + + ALLOC_LCRECORD_TYPE -> ALLOC_NORMAL_LISP_OBJECT (returns a Lisp object + rather than a pointer) + ALLOCATE_FIXED_TYPE_AND_SET_IMPL -> ALLOC_FROB_BLOCK_LISP_OBJECT + BASIC_ALLOC_LCRECORD -> ALLOC_SIZED_LISP_OBJECT + DEFINE_LRECORD_IMPLEMENTATION -> DEFINE_*_LISP_OBJECT + DEFINE_LRECORD_SEQUENCE_IMPLEMENTATION -> DEFINE_*SIZABLE_*LISP_OBJECT + DEFINE_LRECORD_*IMPLEMENTATION_WITH_PROPS -> DEFINE_*LISP_OBJECT, and + use OBJECT_HAS_METHOD() for the getprop, etc. methods + DEFINE_BASIC_LRECORD_IMPLEMENTATION -> DEFINE_*FROB_BLOCK_LISP_OBJECT + DEFINE_DUMPABLE_*/DEFINE_NODUMP_* instead of a 0 or 1 dumpable flag + DEFINE_*INTERNAL_* for "internal" Lisp objects (shouldn't escape + to Lisp) + DEFINE_EXTERNAL_* -> DEFINE_MODULE_* + MAKE_LRECORD_IMPLEMENTATION -> MAKE_LISP_OBJECT + MAKE_EXTERNAL_LRECORD_IMPLEMENTATION -> MAKE_MODULE_LISP_OBJECT + DECLARE_LRECORD -> DECLARE_LISP_OBJECT + INIT_LRECORD_IMPLEMENTATION -> INIT_LISP_OBJECT + LCRECORD_HEADER -> NORMAL_LISP_OBJECT_HEADER + alloc_lrecord -> alloc_sized_lrecord (since it takes a size) + printing_unreadable_object -> printing_unreadable_object_fmt + printing_unreadable_lcrecord -> printing_unreadable_lisp_object + + New: + + lisp_object_storage_size() -- storage used for Lisp object including + overhead + LISP_OBJECT_UID() -- UID of Lisp object + zero_sized_lisp_object() -- zero out a Lisp object of variable size + zero_nonsized_lisp_object() -- zero out a Lisp object of fixed size + free_normal_lisp_object() -- free a non-frob-block Lisp object + LISP_OBJECT_FROB_BLOCK_P() -- return whether a Lisp object is a + frob-block object + IF_OLD_GC, IF_NEW_GC -- simplify declaration of Lisp objects w.r.t. NEW-GC + when a finalizer may exist in one but not the + other + + Eliminated: + + free_lrecord() + FREE_LISP_OBJECT(): + Use free_normal_lisp_object() + + old_zero_lcrecord() + old_zero_sized_lcrecord() + ZERO_LISP_OBJECT() + zero_lrecord(): + Use zero_sized_lisp_object(), zero_nonsized_lisp_object() + + copy_lrecord() + copy_sized_lrecord() + old_copy_lcrecord() + old_copy_sized_lcrecord() + COPY_SIZED_LISP_OBJECT() + COPY_SIZED_LCRECORD() + COPY_LISP_OBJECT(): + Use copy_lisp_object() + + LISP_OBJECT_STORAGE_SIZE(): + Use lisp_object_storage_size() + -- new disksave method for Lisp objects, separated out from the finalize method +-- new, non-static way of initializing Lisp object methods; used for disksave, + getprop, putprop, remprop, object_plist, various memory-usage methods: + OBJECT_HAS_METHOD(), OBJECT_HAS_PROPERTY(), etc. -- Lisp objects now must specify a print method; use either internal_object_printer() or external_object_printer() as a default -- equal method for Lisp objects has new `foldcase' param, to implement case-folding comparison ala `equalp' --- various changes to frame-geometry macros in frame-impl.h, gutter.h, etc., - and frame-sizing code in frame.c --- Major rewrite, updated documentation to dynarr functions and macros --- Major updates to internals manual and long comments in C files: - frame geometry, specifier authors, MS-Windows compilation flags, xlike - mechanism, ... +-- Each type of Lisp object has separate UID space +-- Redo and generalize memory-usage mechanism, add memory-usage methods for + various objects; the following objects now have memory-usage methods: + buffers, case tables, hash tables, frames, charsets, scrollbar instances, + specifiers, windows, window mirrors -- Rename LISP_TO_VOID -> STORE_LISP_IN_VOID, VOID_TO_LISP -> GET_LISP_FROM_VOID; add STORE_VOID_IN_LISP, GET_VOID_FROM_LISP +-- Other renames: + XD_LISP_OBJECT_BLOCK_PTR -> XD_INLINE_LISP_OBJECT_BLOCK_PTR +-- Other new functions and macros: + lisp_object_memory_usage() -- memory usage of Lisp object, including + associated non-Lisp usage and ancillary Lisp + usage + tree_memory_usage() -- memory usage of a tree of conses and/or vectors + SAFE_LIST_LOOP_* -- loop over a possibly invalid list without signalling + an error + listn() -- variable-argument list creation, number of arguments specified + listu() -- variable-argument list creation, terminated with Qunbound + +-- Make the first lrecord type have value 1 not 0 so that attempts to + interpret 0'd memory as a Lisp object will fail more obviously + +Internals: Arrays and Tables + +-- Major rewrite, updated documentation to dynarr functions and macros + + Rename: + + Dynarr_add_lisp_string -> Dynarr_add_ext_lisp_string + Dynarr_set_length -> Dynarr_set_lengthr ("restricted") + Dynarr_increment -> Dynarr_incrementr + Dynarr_resize_if -> Dynarr_resize_to_add + + New functions: + + Dynarr_elsize = dy->elsize_ + Dynarr_set_length(): Set length, resizing as necessary + Dynarr_set_length_and_zero(): Set length, resizing as necessary, + zeroing out new elements + Dynarr_increase_length(), Dynarr_increase_length_and_zero(): + Optimization of Dynarr_set_length(), Dynarr_set_length_and_zero() + when size is known to increase + Dynarr_resize_to_fit(): Resize as necessary to fit a given length. + Dynarr_set(): Set element at a given position, increasing length + as necessary and setting any newly created positions to 0 + ERROR_CHECK_DYNARR, dynarr_checking_assert() + +-- Extracted and generalized gap array code from extents.c to array.c +-- Rewrite range tables to use gap arrays; redo put_range_table() so it's + O(log n) when adding a localized range + +Internals: Misc + +-- Collect allocation-statistics code in one place +-- if (...) ABORT (); --> assert (); +-- various changes to frame-geometry macros in frame-impl.h, gutter.h, etc., + and frame-sizing code in frame.c: + -- TOP_BORDER, BOTTOM_BORDER, etc. -> TOP_EDGE, BOTTOM_EDGE, etc. + -- GUTTER_POS_LOOP -> EDGE_POS_LOOP + -- hardcoded use of '4' -> NUM_EDGES + -- default_face_height_and_width -> default_face_width_and_height, with + arguments reversed + -- width/height arguments reversed in the following, to put width first: + -- default_face_font_info + -- default_face_height_and_width (see above) + -- check_frame_size + -- frame_size_valid_p (made into a static function) + -- change_frame_size and + -- change_frame_size_1 + -- FRAME_BORDER_* -> FRAME_INTERNAL_BORDER_* + -- new FRAME_INTERNAL_BORDER_SIZE(), FRAME_REAL_TOOLBAR_BOUNDS() + -- pixel_to_char_size -> pixel_to_frame_unit_size + -- char_to_pixel_size -> frame_unit_to_pixel_size + -- pixel_to_real_char_size -> pixel_to_char_size + -- char_to_real_pixel_size -> char_to_pixel_size + -- Eliminate old round_size_to_char, because it didn't really + do anything differently from round_size_to_real_char() + -- round_size_to_real_char -> round_size_to_char; any places that + called the old round_size_to_char should just call the new one. +-- Major updates to internals manual and long comments in C files: + frame geometry, specifier authors, MS-Windows compilation flags, xlike + mechanism, magic symbols, lrecords, NEW-GC, dynarrs, ... +-- Major reworking of DFC macros e.g. EXTERNAL_TO_C_STRING renamed to + EXTERNAL_TO_ITEXT; make them return their values when possible rather + than storing into a named variable: + + EXTERNAL_TO_C_STRING -> EXTERNAL_TO_ITEXT + EXTERNAL_TO_C_STRING_MALLOC -> EXTERNAL_TO_ITEXT_MALLOC + SIZED_EXTERNAL_TO_C_STRING -> SIZED_EXTERNAL_TO_ITEXT + SIZED_EXTERNAL_TO_C_STRING_MALLOC -> SIZED_EXTERNAL_TO_ITEXT_MALLOC + C_STRING_TO_EXTERNAL -> ITEXT_TO_EXTERNAL + C_STRING_TO_EXTERNAL_MALLOC -> ITEXT_TO_EXTERNAL_MALLOC + LISP_STRING_TO_EXTERNAL + LISP_STRING_TO_EXTERNAL_MALLOC + LISP_STRING_TO_TSTR + C_STRING_TO_TSTR -> ITEXT_TO_TSTR + TSTR_TO_C_STRING -> TSTR_TO_ITEXT + + The following four still return their values through parameters, + since they have more than one value to return: + + C_STRING_TO_SIZED_EXTERNAL -> ITEXT_TO_SIZED_EXTERNAL + LISP_STRING_TO_SIZED_EXTERNAL + C_STRING_TO_SIZED_EXTERNAL_MALLOC -> ITEXT_TO_SIZED_EXTERNAL_MALLOC + LISP_STRING_TO_SIZED_EXTERNAL_MALLOC + +-- Eliminate unused second argument to xfree() +-- Whenever xfree() a structure field, set the field to 0 afterwards, to + protect against double free or possible attempt to interpret the field + later on +-- Move `equalp' to C +-- Rename `enum font_specifier_matchspec_stages': + initial -> STAGE_INITIAL + final -> STAGE_FINAL + impossible -> NUM_MATCHSPEC_STAGES +-- Rename: + PROCESSING_X_CODE -> THIS_IS_X + PROCESSING_GTK_CODE -> THIS_IS_GTK +-- Rename: + write_c_string -> write_cistring + build_intstring -> build_istring + build_string -> build_cistring + build_ext_string -> build_extstring + make_ext_string -> make_extstring + buffer_insert_c_string -> buffer_insert_ascstring + intern_int -> intern_istring +-- Lots of cleanup of (not-yet-working) message translation code +-- Lots of Mule-izing: + -- change raw `char *' to some characterized type to indicate the + semantics properly + -- change all occurrences of Qnative to some more specific encoding + -- create new encodings: + -- Qtime_function_encoding + Qtime_zone_encoding + Quser_name_encoding + Qerror_message_encoding + Qjpeg_error_message_encoding + Qtooltalk_encoding + Qgtk_encoding + Qx_error_message_encoding +-- Major unification of X and GTK redisplay code into "xlike" code, creation + of "xlike" mechanism +-- Rename: + LOCAL_TO_WIN32_FILE_FORMAT -> LOCAL_FILE_FORMAT_TO_INTERNAL_MSWIN + WIN32_TO_LOCAL_FILE_FORMAT -> INTERNAL_MSWIN_TO_LOCAL_FILE_FORMAT + LOCAL_FILE_FORMAT_TO_TSTR -> LISP_LOCAL_FILE_FORMAT_TO_TSTR. + LOCAL_FILE_FORMAT_MAYBE_URL_TO_TSTR -> LISP_LOCAL_FILE_FORMAT_MAYBE_URL_TO_TSTR + Create new LOCAL_FILE_FORMAT_TO_TSTR +-- Redo the code in code-init.el that initializes coding-system defaults +-- separate HAVE_XFT into HAVE_XFT and USE_XFT, to facilitate compiling + simultaneously with X and GTK + +File Additions, Deletions, Renames, etc. + -- Convert various source files to UTF-8 -- File renames: select-common.h -> select-xlike-inc.c xgccache.{ch} -> gccache-x.{ch} toolbar-common.{ch} -> toolbar-xlike.{ch} + objects*.{ch} -> fontcolor*.{ch} + dynarr.c -> array.c -- New files: bytecode-ops.h sysgtk.h, sysgdkx.h keymap-buttons.h, keymap-slots.h -- Deleted files: event-gtk.h --- Major reworking of DFC macros e.g. EXTERNAL_TO_C_STRING renamed to - EXTERNAL_TO_ITEXT; make them return their values when possible rather - than storing into a named variable --- Eliminate unused second argument to xfree() --- separate HAVE_XFT into HAVE_XFT and USE_XFT, to facilitate compiling - simultaneously with X and GTK --- Move `equalp' to C - -Testing: - --- Move test-harness.el to Lisp directory +-- File moves: + moved test-harness.el to Lisp directory + moved etc/gdbinit.in to src/.gdbinit.in.in + +Internals: Debugging + +-- New function debug_out_lisp() -- printf-like formatting for Lisp objects, + debug output +-- Expand the KKCC backtrace mechanism -- new functions: + kkcc_short_backtrace() + kkcc_short_backtrace_full() + kkcc_detailed_backtrace() + kkcc_detailed_backtrace_full() +-- Make print code even more careful about checking for bad memory, + bad object types, circular objects, etc. +-- When --with-debug, set `debug-on-error' so we get an abort to debugger + upon Lisp error Building: -- Fix `--quick-build' so full rebuilds don't happen when changes are made to files like lisp.h, config.h that are included by all C files -- Fix C++ build on Cygwin when configured with --have-database +-- Always insert a coding-system cookie in autoload files, fixing problems + when default coding system is UTF-8, as under Cygwin +-- Redo compile warning system, turn on a number of warnings that had + mistakenly gotten turned off +-- Fix so that builds properly under gcc v4, g++ v4 +-- Make `--with-error-checking' be the same as `--with-error-checking=all' +-- Expand documentation of `--with-debug' +-- Use -export-all-symbols instead of broken -export-dynamic on Cygwin/MinGW +-- Add fix-perms target to correct permissions on executable/non-exec files +-- rename all instances of --enable-FOO to --with-FOO. +-- Fix make-mswin-unicode.pl so that it can work with Cygwin w32api headers + as well as actual VC++ headers +-- make-msgfile.lex: Long documentation on what should be done if we ever want + message translation to work. User-Visible Bug Fixes: @@ -104,6 +372,11 @@ -- Fix a crash in frame creation due to lack of call to reset_glyph_cachels() -- Fix long-standing bug: searching for Control-1 chars didn't work -- Turn on `load-ignore-out-of-date-elc-files' by default +-- Fix crash in event-TTY code when reading an event non-interactively +-- Use UTF-8 consistently as encoding default under Cygwin 1.7 +-- Fix broken code in computing fastmap for [^...] regexps under Mule +-- Fix display-table entries for error-octet characters so they display + as originally intended by Aidan Kehoe:
--- a/ChangeLog Fri Apr 09 14:51:11 2010 +0200 +++ b/ChangeLog Mon Apr 12 00:53:18 2010 -0500 @@ -1,3 +1,9 @@ +2010-04-09 Ben Wing <ben@xemacs.org> + + * CHANGES-beta: + Update with my changes to the trunk since the release of 21.5.29 + in 2009 up through April 9, 2010. + 2010-04-02 Aidan Kehoe <kehoea@parhasard.net> * CHANGES-beta:
--- a/src/ChangeLog Fri Apr 09 14:51:11 2010 +0200 +++ b/src/ChangeLog Mon Apr 12 00:53:18 2010 -0500 @@ -1,3 +1,34 @@ +2010-04-09 Ben Wing <ben@xemacs.org> + + * fileio.c (check_writable): + * fileio.c (Fdo_auto_save): + * redisplay-xlike-inc.c (separate_textual_runs_nomule): + * redisplay-xlike-inc.c (separate_textual_runs_xft_nomule): + * redisplay-xlike-inc.c (separate_textual_runs_xft_mule): + * redisplay-xlike-inc.c (separate_textual_runs_mule): + * redisplay-xlike-inc.c (XLIKE_output_string): + * redisplay-xlike-inc.c (XLIKE_output_vertical_divider): + * redisplay.c (create_text_block): + * redisplay.c (regenerate_window): + * redisplay.c (redisplay_window): + * redisplay.c (redisplay_device): + * redisplay.c (window_line_number): + * redisplay.c (point_would_be_visible): + * redisplay.c (compute_display_line_dynarr_usage): + * specifier.c (prune_specifiers): + * specifier.c (finalize_specifier): + * specifier.c (make_magic_specifier): + * specifier.c (charset_matches_specifier_tag_set_p): + * specifier.c (Fdefine_specifier_tag): + * specifier.c (setup_device_initial_specifier_tags): + * specifier.c (bodily_specifier): + * specifier.c (add_spec_to_ghost_specifier): + * specifier.c (remove_ghost_specifier): + * specifier.c (set_specifier_fallback): + * specifier.c (specifier_instance_from_inst_list): + * specifier.c (set_specifier_caching): + Fix coding style to correspond to GNU standard. + 2010-04-09 Didier Verna <didier@xemacs.org> * fontcolor-xlike-inc.c (DEBUG_FONTS2):
--- a/src/fileio.c Fri Apr 09 14:51:11 2010 +0200 +++ b/src/fileio.c Mon Apr 12 00:53:18 2010 -0500 @@ -2322,7 +2322,7 @@ GENERIC_MAPPING genericMapping; DWORD accessMask; PRIVILEGE_SET PrivilegeSet; - DWORD dwPrivSetSize = sizeof( PRIVILEGE_SET ); + DWORD dwPrivSetSize = sizeof ( PRIVILEGE_SET ); BOOL fAccessGranted = FALSE; DWORD dwAccessAllowed; Extbyte *fnameext; @@ -2330,48 +2330,57 @@ LOCAL_FILE_FORMAT_TO_TSTR (filename, fnameext); // First check for a normal file with the old-style readonly bit - attributes = qxeGetFileAttributes(fnameext); - if (FILE_ATTRIBUTE_READONLY == (attributes & (FILE_ATTRIBUTE_DIRECTORY|FILE_ATTRIBUTE_READONLY))) + attributes = qxeGetFileAttributes (fnameext); + if (FILE_ATTRIBUTE_READONLY == + (attributes & (FILE_ATTRIBUTE_DIRECTORY|FILE_ATTRIBUTE_READONLY))) return 0; /* Win32 prototype lacks const. */ - error = qxeGetNamedSecurityInfo(fnameext, SE_FILE_OBJECT, - DACL_SECURITY_INFORMATION|GROUP_SECURITY_INFORMATION|OWNER_SECURITY_INFORMATION, - &psidOwner, &psidGroup, &pDacl, &pSacl, &pDesc); - if(error != ERROR_SUCCESS) { // FAT? - attributes = qxeGetFileAttributes(fnameext); - return (attributes & FILE_ATTRIBUTE_DIRECTORY) || (0 == (attributes & FILE_ATTRIBUTE_READONLY)); - } + error = qxeGetNamedSecurityInfo (fnameext, SE_FILE_OBJECT, + DACL_SECURITY_INFORMATION| + GROUP_SECURITY_INFORMATION| + OWNER_SECURITY_INFORMATION, + &psidOwner, &psidGroup, &pDacl, &pSacl, + &pDesc); + if (error != ERROR_SUCCESS) + { // FAT? + attributes = qxeGetFileAttributes (fnameext); + return (attributes & FILE_ATTRIBUTE_DIRECTORY) || + (0 == (attributes & FILE_ATTRIBUTE_READONLY)); + } genericMapping.GenericRead = FILE_GENERIC_READ; genericMapping.GenericWrite = FILE_GENERIC_WRITE; genericMapping.GenericExecute = FILE_GENERIC_EXECUTE; genericMapping.GenericAll = FILE_ALL_ACCESS; - if(!ImpersonateSelf(SecurityDelegation)) { - return 0; - } - if(!OpenThreadToken(GetCurrentThread(), TOKEN_ALL_ACCESS, TRUE, &tokenHandle)) { - return 0; - } + if (!ImpersonateSelf (SecurityDelegation)) + { + return 0; + } + if (!OpenThreadToken (GetCurrentThread(), TOKEN_ALL_ACCESS, TRUE, + &tokenHandle)) + { + return 0; + } accessMask = GENERIC_WRITE; - MapGenericMask(&accessMask, &genericMapping); - - if(!AccessCheck(pDesc, tokenHandle, accessMask, &genericMapping, + MapGenericMask (&accessMask, &genericMapping); + + if (!AccessCheck(pDesc, tokenHandle, accessMask, &genericMapping, &PrivilegeSet, // receives privileges used in check &dwPrivSetSize, // size of PrivilegeSet buffer &dwAccessAllowed, // receives mask of allowed access rights &fAccessGranted)) { - CloseHandle(tokenHandle); + CloseHandle (tokenHandle); RevertToSelf(); - LocalFree(pDesc); + LocalFree (pDesc); return 0; } - CloseHandle(tokenHandle); + CloseHandle (tokenHandle); RevertToSelf(); - LocalFree(pDesc); + LocalFree (pDesc); return fAccessGranted == TRUE; #elif defined (HAVE_EACCESS) return (qxe_eaccess (filename, W_OK) >= 0); @@ -2959,7 +2968,7 @@ RETURN_UNGCPRO (Fsignal (Qfile_error, - list2 (build_msg_string("not a regular file"), + list2 (build_msg_string ("not a regular file"), filename))); } } @@ -4261,7 +4270,7 @@ auto_saved++; /* Handler killed their own buffer! */ - if (!BUFFER_LIVE_P(b)) + if (!BUFFER_LIVE_P (b)) continue; b->auto_save_modified = BUF_MODIFF (b);
--- a/src/redisplay-xlike-inc.c Fri Apr 09 14:51:11 2010 +0200 +++ b/src/redisplay-xlike-inc.c Mon Apr 12 00:53:18 2010 -0500 @@ -182,7 +182,7 @@ separate_textual_runs_nomule (unsigned char *text_storage, struct textual_run *run_storage, const Ichar *str, Charcount len, - struct face_cachel *UNUSED(cachel)) + struct face_cachel *UNUSED (cachel)) { if (!len) return 0; @@ -212,7 +212,7 @@ separate_textual_runs_xft_nomule (unsigned char *text_storage, struct textual_run *run_storage, const Ichar *str, Charcount len, - struct face_cachel *UNUSED(cachel)) + struct face_cachel *UNUSED (cachel)) { int i; if (!len) @@ -226,7 +226,7 @@ for (i = 0; i < len; i++) { *(XftChar16 *)text_storage = str[i]; - text_storage += sizeof(XftChar16); + text_storage += sizeof (XftChar16); } return 1; } @@ -237,7 +237,7 @@ separate_textual_runs_xft_mule (unsigned char *text_storage, struct textual_run *run_storage, const Ichar *str, Charcount len, - struct face_cachel *UNUSED(cachel)) + struct face_cachel *UNUSED (cachel)) { Lisp_Object prev_charset = Qunbound; int runs_so_far = 0, i; @@ -250,8 +250,8 @@ for (i = 0; i < len; i++) { Ichar ch = str[i]; - Lisp_Object charset = ichar_charset(ch); - int ucs = ichar_to_unicode(ch); + Lisp_Object charset = ichar_charset (ch); + int ucs = ichar_to_unicode (ch); /* If UCS is less than zero or greater than 0xFFFF, set ucs2 to REPLACMENT CHARACTER. */ @@ -270,7 +270,7 @@ } *(XftChar16 *)text_storage = ucs; - text_storage += sizeof(XftChar16); + text_storage += sizeof (XftChar16); } if (runs_so_far) @@ -335,7 +335,7 @@ These flags are almost mutually exclusive, but we're sloppy about resetting "shadowed" flags. So the flags must be checked in the proper order in computing byte1 and byte2, below. */ - charset_leading_byte = XCHARSET_LEADING_BYTE(charset); + charset_leading_byte = XCHARSET_LEADING_BYTE (charset); translate_to_ucs_2 = bit_vector_bit (FACE_CACHEL_FONT_FINAL_STAGE (cachel), charset_leading_byte - MIN_LEADING_BYTE); @@ -384,7 +384,7 @@ /* Must check flags in this order. See comment above. */ if (translate_to_ucs_2) { - int ucs = ichar_to_unicode(ch); + int ucs = ichar_to_unicode (ch); /* If UCS is less than zero or greater than 0xFFFF, set ucs2 to REPLACMENT CHARACTER. */ ucs = (ucs & ~0xFFFF) ? 0xFFFD : ucs; @@ -1225,8 +1225,8 @@ clip_end - clip_start, height }; XUnionRectWithRegion (&clip_box, clip_reg, clip_reg); - XftDrawSetClip(xftDraw, clip_reg); - XDestroyRegion(clip_reg); + XftDrawSetClip (xftDraw, clip_reg); + XDestroyRegion (clip_reg); } if (!bgc) @@ -1248,19 +1248,19 @@ struct textual_run *run = &runs[i]; int rect_width = x_text_width_single_run (f, cachel, run); #ifndef USE_XFTTEXTENTS_TO_AVOID_FONT_DROPPINGS - int rect_height = FONT_INSTANCE_ASCENT(fi) - + FONT_INSTANCE_DESCENT(fi) + 1; + int rect_height = FONT_INSTANCE_ASCENT (fi) + + FONT_INSTANCE_DESCENT (fi) + 1; #else - int rect_height = FONT_INSTANCE_ASCENT(fi) - + FONT_INSTANCE_DESCENT(fi); + int rect_height = FONT_INSTANCE_ASCENT (fi) + + FONT_INSTANCE_DESCENT (fi); XGlyphInfo gi; if (run->dimension == 2) { XftTextExtents16 (dpy, - FONT_INSTANCE_X_XFTFONT(fi), + FONT_INSTANCE_X_XFTFONT (fi), (XftChar16 *) run->ptr, run->len, &gi); } else { XftTextExtents8 (dpy, - FONT_INSTANCE_X_XFTFONT(fi), + FONT_INSTANCE_X_XFTFONT (fi), run->ptr, run->len, &gi); } rect_height = rect_height > gi.height @@ -1453,13 +1453,13 @@ cursor_width, height }; XUnionRectWithRegion (&clip_box, clip_reg, clip_reg); - XftDrawSetClip(xftDraw, clip_reg); - XDestroyRegion(clip_reg); + XftDrawSetClip (xftDraw, clip_reg); + XDestroyRegion (clip_reg); } { /* draw background rectangle & draw text */ - int rect_height = FONT_INSTANCE_ASCENT(fi) - + FONT_INSTANCE_DESCENT(fi); - int rect_width = x_text_width_single_run(f, cachel, &runs[i]); + int rect_height = FONT_INSTANCE_ASCENT (fi) + + FONT_INSTANCE_DESCENT (fi); + int rect_width = x_text_width_single_run (f, cachel, &runs[i]); XftColor xft_color; xft_color = XFT_FROB_LISP_COLOR (cursor_cachel->background, 0); @@ -1475,7 +1475,7 @@ (XftChar16 *) runs[i].ptr, runs[i].len); } - XftDrawSetClip(xftDraw, 0); + XftDrawSetClip (xftDraw, 0); } else /* core font, not Xft */ #endif /* USE_XFT */ @@ -1772,7 +1772,7 @@ Draw a vertical divider down the right side of the given window. ****************************************************************************/ static void -XLIKE_output_vertical_divider (struct window *w, int USED_IF_X(clear)) +XLIKE_output_vertical_divider (struct window *w, int USED_IF_X (clear)) { struct frame *f = XFRAME (w->frame); struct device *d = XDEVICE (f->device);
--- a/src/redisplay.c Fri Apr 09 14:51:11 2010 +0200 +++ b/src/redisplay.c Mon Apr 12 00:53:18 2010 -0500 @@ -2223,9 +2223,9 @@ else if (MINI_WINDOW_P (w) && !active_minibuffer) data.cursor_type = NO_CURSOR; else if (w == XWINDOW (FRAME_SELECTED_WINDOW (f)) && - EQ(DEVICE_CONSOLE(d), Vselected_console) && - d == XDEVICE(CONSOLE_SELECTED_DEVICE(XCONSOLE(DEVICE_CONSOLE(d))))&& - f == XFRAME(DEVICE_SELECTED_FRAME(d))) + EQ (DEVICE_CONSOLE (d), Vselected_console) && + d == XDEVICE (CONSOLE_SELECTED_DEVICE (XCONSOLE (DEVICE_CONSOLE (d))))&& + f == XFRAME (DEVICE_SELECTED_FRAME (d))) { data.byte_cursor_charpos = BYTE_BUF_PT (b); data.cursor_type = CURSOR_ON; @@ -5519,10 +5519,10 @@ Lisp_Object string; prop = Dynarr_new (prop_block); - string = concat2(Vminibuf_preprompt, Vminibuf_prompt); + string = concat2 (Vminibuf_preprompt, Vminibuf_prompt); pb.type = PROP_MINIBUF_PROMPT; - pb.data.p_string.str = XSTRING_DATA(string); - pb.data.p_string.len = XSTRING_LENGTH(string); + pb.data.p_string.str = XSTRING_DATA (string); + pb.data.p_string.len = XSTRING_LENGTH (string); Dynarr_add (prop, pb); } else @@ -6261,9 +6261,9 @@ selected_in_its_frame = (w == XWINDOW (FRAME_SELECTED_WINDOW (f))); selected_globally = selected_in_its_frame && - EQ(DEVICE_CONSOLE(d), Vselected_console) && - XDEVICE(CONSOLE_SELECTED_DEVICE(XCONSOLE(DEVICE_CONSOLE(d)))) == d && - XFRAME(DEVICE_SELECTED_FRAME(d)) == f; + EQ (DEVICE_CONSOLE (d), Vselected_console) && + XDEVICE (CONSOLE_SELECTED_DEVICE (XCONSOLE (DEVICE_CONSOLE (d)))) == d && + XFRAME (DEVICE_SELECTED_FRAME (d)) == f; if (skip_selected && selected_in_its_frame) return; @@ -7069,7 +7069,7 @@ if (FRAME_REPAINT_P (f)) { - if (CLASS_REDISPLAY_FLAGS_CHANGEDP(f)) + if (CLASS_REDISPLAY_FLAGS_CHANGEDP (f)) { int preempted = redisplay_frame (f, 1); if (preempted) @@ -7243,10 +7243,10 @@ fail if DEVICE_SELECTED_FRAME == Qnil (since w->frame cannot be). This can occur when the frame title is computed really early */ Charbpos pos = - ((EQ(DEVICE_SELECTED_FRAME(d), w->frame) && - (w == XWINDOW (FRAME_SELECTED_WINDOW (device_selected_frame(d)))) && - EQ(DEVICE_CONSOLE(d), Vselected_console) && - XDEVICE(CONSOLE_SELECTED_DEVICE(XCONSOLE(DEVICE_CONSOLE(d)))) == d ) + ((EQ (DEVICE_SELECTED_FRAME (d), w->frame) && + (w == XWINDOW (FRAME_SELECTED_WINDOW (device_selected_frame (d)))) && + EQ (DEVICE_CONSOLE (d), Vselected_console) && + XDEVICE (CONSOLE_SELECTED_DEVICE (XCONSOLE (DEVICE_CONSOLE (d)))) == d ) ? BUF_PT (b) : marker_position (w->pointm[type])); EMACS_INT line; @@ -7988,7 +7988,7 @@ int partially) { struct buffer *b = XBUFFER (w->buffer); - int pixpos = -WINDOW_TEXT_TOP_CLIP(w); + int pixpos = -WINDOW_TEXT_TOP_CLIP (w); int bottom = WINDOW_TEXT_HEIGHT (w); int start_elt; @@ -9709,7 +9709,7 @@ for (i = 0; i < Dynarr_largest (dyn); i++) { struct display_line *dl = &Dynarr_at (dyn, i); - total += compute_display_block_dynarr_usage(dl->display_blocks, ustats); + total += compute_display_block_dynarr_usage (dl->display_blocks, ustats); total += compute_glyph_block_dynarr_usage (dl->left_glyphs, ustats); total += compute_glyph_block_dynarr_usage (dl->right_glyphs, ustats); }
--- a/src/specifier.c Fri Apr 09 14:51:11 2010 +0200 +++ b/src/specifier.c Mon Apr 12 00:53:18 2010 -0500 @@ -257,9 +257,9 @@ Lisp_Specifier* sp = XSPECIFIER (rest); /* A bit of assertion that we're removing both parts of the magic one altogether */ - assert (!MAGIC_SPECIFIER_P(sp) - || (BODILY_SPECIFIER_P(sp) && marked_p (sp->fallback)) - || (GHOST_SPECIFIER_P(sp) && marked_p (sp->magic_parent))); + assert (!MAGIC_SPECIFIER_P (sp) + || (BODILY_SPECIFIER_P (sp) && marked_p (sp->fallback)) + || (GHOST_SPECIFIER_P (sp) && marked_p (sp->magic_parent))); /* This specifier is garbage. Remove it from the list. */ if (NILP (prev)) Vall_specifiers = sp->next_specifier; @@ -310,7 +310,7 @@ finalize_specifier (Lisp_Object obj) { Lisp_Specifier *sp = XSPECIFIER (obj); - if (!GHOST_SPECIFIER_P(sp) && sp->caching) + if (!GHOST_SPECIFIER_P (sp) && sp->caching) { xfree (sp->caching); sp->caching = 0; @@ -558,9 +558,9 @@ UNGCPRO; /* Connect guys together */ - XSPECIFIER(bodily)->magic_parent = Qt; - XSPECIFIER(bodily)->fallback = ghost; - XSPECIFIER(ghost)->magic_parent = bodily; + XSPECIFIER (bodily)->magic_parent = Qt; + XSPECIFIER (bodily)->fallback = ghost; + XSPECIFIER (ghost)->magic_parent = bodily; return bodily; } @@ -981,7 +981,7 @@ Lisp_Object rest; int res = 0; - assert(stage < NUM_MATCHSPEC_STAGES); + assert (stage < NUM_MATCHSPEC_STAGES); LIST_LOOP (rest, tag_set) { @@ -1253,7 +1253,7 @@ } } - return define_specifier_tag(tag, device_predicate, charset_predicate); + return define_specifier_tag (tag, device_predicate, charset_predicate); } /* Called at device-creation time to initialize the user-defined @@ -1276,11 +1276,11 @@ for (rest = Vuser_defined_tags, rest2 = DEVICE_USER_DEFINED_TAGS (d); !NILP (rest); rest = XCDR (rest), rest2 = XCDR (rest2)) { - GET_LIST_LENGTH(XCAR(rest), list_len); - - assert(3 == list_len); - - device_predicate = XCADR(XCAR (rest)); + GET_LIST_LENGTH (XCAR(rest), list_len); + + assert (3 == list_len); + + device_predicate = XCADR (XCAR (rest)); if (NILP (device_predicate)) { @@ -1641,7 +1641,7 @@ bodily_specifier (Lisp_Object spec) { return (GHOST_SPECIFIER_P (XSPECIFIER (spec)) - ? XSPECIFIER(spec)->magic_parent : spec); + ? XSPECIFIER (spec)->magic_parent : spec); } /* Signal error if (specifier SPEC is read-only. @@ -2319,7 +2319,7 @@ Lisp_Object how_to_add) { int depth = unlock_ghost_specifiers_protected (); - Fadd_spec_to_specifier (XSPECIFIER(specifier)->fallback, + Fadd_spec_to_specifier (XSPECIFIER (specifier)->fallback, instantiator, locale, tag_set, how_to_add); unbind_to (depth); } @@ -2517,7 +2517,7 @@ Lisp_Object tag_set, Lisp_Object exact_p) { int depth = unlock_ghost_specifiers_protected (); - Fremove_specifier (XSPECIFIER(specifier)->fallback, + Fremove_specifier (XSPECIFIER (specifier)->fallback, locale, tag_set, exact_p); unbind_to (depth); } @@ -2705,7 +2705,7 @@ if (SPECIFIERP (fallback)) assert (EQ (Fspecifier_type (specifier), Fspecifier_type (fallback))); if (BODILY_SPECIFIER_P (sp)) - GHOST_SPECIFIER(sp)->fallback = fallback; + GHOST_SPECIFIER (sp)->fallback = fallback; else sp->fallback = fallback; /* call the after-change method */ @@ -2795,14 +2795,14 @@ FROB (initial, STAGE_INITIAL) else FROB (final, STAGE_FINAL) - else assert(0); + else assert (0); #undef FROB } } #endif /* MULE */ - LIST_LOOP(rest, inst_list) + LIST_LOOP (rest, inst_list) { Lisp_Object tagged_inst = XCAR (rest); Lisp_Object tag_set = XCAR (tagged_inst); @@ -2816,7 +2816,7 @@ val = XCDR (tagged_inst); the_instantiator = val; - if (!NILP(charset) && + if (!NILP (charset) && !(charset_matches_specifier_tag_set_p (charset, tag_set, stage))) { ++respected_charsets; @@ -3392,7 +3392,7 @@ sp->caching->always_recompute = always_recompute; Vcached_specifiers = Fcons (specifier, Vcached_specifiers); if (BODILY_SPECIFIER_P (sp)) - GHOST_SPECIFIER(sp)->caching = sp->caching; + GHOST_SPECIFIER (sp)->caching = sp->caching; recompute_cached_specifier_everywhere (specifier); }
