Mercurial > hg > xemacs-beta
changeset 1347:8d350b095c21
[xemacs-hg @ 2003-03-09 12:59:36 by ben]
oops, C++ bites again
widget.texi: Fix Turnbull typos.
config.inc.samp: Note that relative directories are a no-no in BUILD_DIR and
SOURCE_DIR. Use paths relative to $(MAKEROOT) instead.
file-coding.c: Fix up internal magic-cookie code to also check for
`;;;###coding system', already handled by the (redundant)
code in files.el.
regex.c: Fix problem with ordering of initializations and statements -- OK in
C++, not in C.
search.c: Indentation.
author | ben |
---|---|
date | Sun, 09 Mar 2003 12:59:45 +0000 |
parents | 01c57eb70ae9 |
children | 31b70e3e9ce7 |
files | man/ChangeLog man/widget.texi nt/ChangeLog nt/config.inc.samp src/ChangeLog src/file-coding.c src/regex.c src/search.c |
diffstat | 8 files changed, 95 insertions(+), 32 deletions(-) [+] |
line wrap: on
line diff
--- a/man/ChangeLog Sun Mar 09 02:27:46 2003 +0000 +++ b/man/ChangeLog Sun Mar 09 12:59:45 2003 +0000 @@ -1,3 +1,8 @@ +2003-03-09 Ben Wing <ben@xemacs.org> + + * widget.texi (Defining New Widgets): + Fix Turnbull typos. + 2003-03-02 Stephen Turnbull <stephen@xemacs.org> * widget.texi (Defining New Widgets):
--- a/man/widget.texi Sun Mar 09 02:27:46 2003 +0000 +++ b/man/widget.texi Sun Mar 09 12:59:45 2003 +0000 @@ -1533,18 +1533,18 @@ @defun widget-create-child-and-convert parent type &rest args As a child of @var{parent}, create a widget with type @var{type} and -value @var{value}. @type{type} is copied, and the @code{:widget-contvert} +value @var{value}. @var{type} is copied, and the @code{:widget-contvert} method is applied to the optional keyword arguments from @var{args}. @end defun @defun widget-create-child parent type As a child of @var{parent}, create a widget with type @var{type}. -@type{type} is copied, but no conversion method is applied. +@var{type} is copied, but no conversion method is applied. @end defun @defun widget-create-child-value parent type value As a child of @var{parent}, create a widget with type @var{type} and -value @var{value}. @type{type} is copied, but no conversion method is +value @var{value}. @var{type} is copied, but no conversion method is applied. @end defun
--- a/nt/ChangeLog Sun Mar 09 02:27:46 2003 +0000 +++ b/nt/ChangeLog Sun Mar 09 12:59:45 2003 +0000 @@ -1,3 +1,9 @@ +2003-03-09 Ben Wing <ben@xemacs.org> + + * config.inc.samp (COMPFACE_DIR): + Note that relative directories are a no-no in BUILD_DIR and + SOURCE_DIR. Use paths relative to $(MAKEROOT) instead. + 2003-03-06 Ben Wing <ben@xemacs.org> * xemacs.mak (INFO): New.
--- a/nt/config.inc.samp Sun Mar 09 02:27:46 2003 +0000 +++ b/nt/config.inc.samp Sun Mar 09 12:59:45 2003 +0000 @@ -92,6 +92,10 @@ # have only one version of config.inc, and have to manually change it for # each different build. +# NOTE: These cannot be relative paths. If you want the source and build to +# be relatives of each other, use $(MAKEROOT) to refer to the root of the +# current tree -- that's one level up from where xemacs.mak is located. + # SOURCE_DIR=c:\src\xemacs\working # BUILD_DIR=c:\src\xemacs\msbuilds\working
--- a/src/ChangeLog Sun Mar 09 02:27:46 2003 +0000 +++ b/src/ChangeLog Sun Mar 09 12:59:45 2003 +0000 @@ -1,3 +1,20 @@ +2003-03-09 Ben Wing <ben@xemacs.org> + + * file-coding.c: + * file-coding.c (snarf_coding_system): + * file-coding.c (look_for_coding_system_magic_cookie): + * file-coding.c (vars_of_file_coding): + Fix up internal magic-cookie code to also check for + `;;;###coding system', already handled by the (redundant) + code in files.el. + + * regex.c (re_match_2_internal): + Fix problem with ordering of initializations and statements -- OK in + C++, not in C. + + * search.c (fast_string_match): + Indentation. + 2003-03-06 Ben Wing <ben@xemacs.org> * Makefile.in.in (build-the-mofo):
--- a/src/file-coding.c Sun Mar 09 02:27:46 2003 +0000 +++ b/src/file-coding.c Sun Mar 09 12:59:45 2003 +0000 @@ -481,6 +481,8 @@ Lisp_Object Qcanonicalize_after_coding; +Lisp_Object QScoding_system_cookie; + /* This is used to convert autodetected coding systems into existing systems. For example, the chain undecided->convert-eol-autodetect may have its separate parts detected as mswindows-multibyte and @@ -3751,6 +3753,38 @@ } } +/* Look for a coding system in the string (skipping over leading + blanks). If found, return it, otherwise nil. */ + +static Lisp_Object +snarf_coding_system (const Ibyte *p, Bytecount len) +{ + Bytecount n; + Ibyte *name; + + while (*p == ' ' || *p == '\t') p++, len--; + len = min (len, 1000); + name = alloca_ibytes (len + 1); + memcpy (name, p, len); + name[len] = '\0'; + + /* Get coding system name */ + /* Characters valid in a MIME charset name (rfc 1521), + and in a Lisp symbol name. */ + n = qxestrspn (name, + "ABCDEFGHIJKLMNOPQRSTUVWXYZ" + "abcdefghijklmnopqrstuvwxyz" + "0123456789" + "!$%&*+-.^_{|}~"); + if (n > 0) + { + name[n] = '\0'; + return find_coding_system_for_text_file (intern_int (name), 0); + } + + return Qnil; +} + /* Given a seekable read stream and potential coding system and EOL type as specified, do any autodetection that is called for. If the coding system and/or EOL type are not `autodetect', they will be left @@ -3772,10 +3806,12 @@ return Qnil; } +/* #### This duplicates code in `find-coding-system-magic-cookie-in-file' + in files.el. Look into combining them. */ + static Lisp_Object look_for_coding_system_magic_cookie (const UExtbyte *data, Bytecount len) { - Lisp_Object coding_system = Qnil; const UExtbyte *p; const UExtbyte *scan_end; @@ -3810,30 +3846,8 @@ *(p-1) == '\t' || *(p-1) == ';'))) { - Bytecount n; - Ibyte *name; - p += LENGTH ("coding:"); - while (*p == ' ' || *p == '\t') p++; - name = alloca_ibytes (suffix - p + 1); - memcpy (name, p, suffix - p); - name[suffix - p] = '\0'; - - /* Get coding system name */ - /* Characters valid in a MIME charset name (rfc 1521), - and in a Lisp symbol name. */ - n = qxestrspn (name, - "ABCDEFGHIJKLMNOPQRSTUVWXYZ" - "abcdefghijklmnopqrstuvwxyz" - "0123456789" - "!$%&*+-.^_{|}~"); - if (n > 0) - { - name[n] = '\0'; - coding_system = - find_coding_system_for_text_file (intern_int (name), - 0); - } + return snarf_coding_system (p, suffix - p); break; } break; @@ -3841,7 +3855,19 @@ break; } - return coding_system; + /* Look for initial ;;;###coding system */ + + { + Bytecount ind = fast_string_match (QScoding_system_cookie, + data, Qnil, 0, len, 0, ERROR_ME_NOT, + 1); + if (ind >= 0) + return + snarf_coding_system (data + ind + LENGTH (";;;###coding system: "), + len - ind - LENGTH (";;;###coding system: ")); + } + + return Qnil; } static Lisp_Object @@ -4756,6 +4782,9 @@ /* We always have file-coding support */ Fprovide (intern ("file-coding")); + QScoding_system_cookie = build_string (";;;###coding system: "); + staticpro (&QScoding_system_cookie); + #ifdef HAVE_DEFAULT_EOL_DETECTION /* WARNING: The existing categories are intimately tied to the function `coding-system-category' in coding.el. If you change a category, or
--- a/src/regex.c Sun Mar 09 02:27:46 2003 +0000 +++ b/src/regex.c Sun Mar 09 12:59:45 2003 +0000 @@ -6131,9 +6131,11 @@ re_char *dtmp = POS_AFTER_GAP_UNSAFE (d); Ichar emch = itext_ichar_fmt (dtmp, fmt, lispobj); int tempres; +#ifdef emacs + Charxpos charpos = offset_to_charxpos (lispobj, PTR_TO_OFFSET (d)); +#endif BEGIN_REGEX_MALLOC_OK (); #ifdef emacs - Charxpos charpos = offset_to_charxpos (lispobj, PTR_TO_OFFSET (d)); UPDATE_SYNTAX_CACHE (scache, charpos); #endif tempres = (SYNTAX_FROM_CACHE (scache, emch) != Sword); @@ -6174,13 +6176,13 @@ re_char *dtmp; Ichar emch; int tempres; - BEGIN_REGEX_MALLOC_OK (); #ifdef emacs Charxpos charpos = offset_to_charxpos (lispobj, PTR_TO_OFFSET (d)); + BEGIN_REGEX_MALLOC_OK (); UPDATE_SYNTAX_CACHE (scache, charpos); -#endif END_REGEX_MALLOC_OK (); RE_MATCH_RELOCATE_MOVEABLE_DATA_POINTERS (); +#endif dtmp = POS_BEFORE_GAP_UNSAFE (d); DEC_IBYTEPTR_FMT (dtmp, fmt); emch = itext_ichar_fmt (dtmp, fmt, lispobj);
--- a/src/search.c Sun Mar 09 02:27:46 2003 +0000 +++ b/src/search.c Sun Mar 09 12:59:45 2003 +0000 @@ -496,7 +496,7 @@ This does not clobber the match data. */ Bytecount -fast_string_match (Lisp_Object regexp, const Ibyte *nonreloc, +fast_string_match (Lisp_Object regexp, const Ibyte *nonreloc, Lisp_Object reloc, Bytecount offset, Bytecount length, int case_fold_search, Error_Behavior errb, int no_quit)