From: Stephen Leake <stephen_leake@stephe-leake.org>
To: emacs-devel@gnu.org
Subject: Re: updating macuvs.h?
Date: Wed, 14 Jan 2015 14:43:46 -0600 [thread overview]
Message-ID: <85a91l6qkd.fsf@stephe-leake.org> (raw)
In-Reply-To: <83d26i3u1r.fsf@gnu.org> (Eli Zaretskii's message of "Wed, 14 Jan 2015 05:44:32 +0200")
Eli Zaretskii <eliz@gnu.org> writes:
>> From: Stephen Leake <stephen_leake@stephe-leake.org>
>> Date: Tue, 13 Jan 2015 14:58:58 -0600
>>
>> I just did 'git pull' on master, and recompiled, on Windows with msys2
>> mingw64. Now git status shows 'src/macuvs.h' as changed. It has DOS line
>> endings instead of Unix; no other changes.
>
> This most probably means some of the tools involved in producing that
> file are not MSYS programs, but native Windows (MinGW) programs. MSYS
> programs behave Posix-like and produce Unix-style EOLs. Finds those
> tools and replace them by their MSYS namesakes, and the problem will
> go away.
I think this is the makefile line that produces that file (from
admin/unidata/Makefile):
${top_srcdir}/src/macuvs.h: ${srcdir}/uvs.el ${srcdir}/IVD_Sequences.txt | \
${srcdir}/uvs.elc
$(AM_V_GEN)${emacs} -L ${srcdir} -l uvs \
--eval '(uvs-print-table-ivd (unmsys--file-name "${srcdir}/IVD_Sequences.txt") "Adobe-Japan1")' \
> $@
This runs Emacs, which is a native MinGW program at this point. I don't
think we want to build an MSYS version just for this :).
That invokes this fuction (in admin/unidata/uvs.el):
(defun uvs-print-table-ivd (filename collection-id
&optional sequence-id-to-glyph-func)
"Print a C array definition of a UVS table for IVD Sequences.
FILENAME specifies the IVD Sequences file. COLLECTION-ID is a
string specifying the identifier of the collection to
extract (e.g., \"Adobe-Japan1\"). SEQUENCE-ID-TO-GLYPH-FUNC is a
function to convert an identifier string of the sequence to a
glyph number, and nil means to convert \"CID\\+[0-9]+\" to the
corresponding number."
(or sequence-id-to-glyph-func
(setq sequence-id-to-glyph-func
(lambda (sequence-id)
(string-match "\\`CID\\+\\([[:digit:]]+\\)\\'" sequence-id)
(string-to-number (match-string 1 sequence-id)))))
(let ((uvs-alist
(with-temp-buffer
(insert-file-contents filename)
(uvs-alist-from-ivd collection-id
sequence-id-to-glyph-func))))
(princ "/* Automatically generated by uvs.el. */\n")
(princ
(format "static const unsigned char mac_uvs_table_%s_bytes[] =\n {\n"
(replace-regexp-in-string "[^_[:alnum:]]" "_"
(downcase collection-id))))
(with-temp-buffer
(set-buffer-multibyte nil)
(uvs-insert-alist-as-bytes uvs-alist)
(uvs-dump))
(princ " };\n")))
`uvs-dump' uses `terpri' to insert the newline; that inserts "\n". So this
needs a `set-buffer-file-coding-system'?
I don't see where the buffer is actually written to the file.
On the other hand, why has no other MinGW builder seen this before?
--
-- Stephe
next prev parent reply other threads:[~2015-01-14 20:43 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-01-13 20:58 updating macuvs.h? Stephen Leake
2015-01-13 21:11 ` Paul Eggert
2015-01-14 3:44 ` Eli Zaretskii
2015-01-14 20:43 ` Stephen Leake [this message]
2015-01-15 3:48 ` Eli Zaretskii
2015-01-15 15:56 ` Eli Zaretskii
2015-01-16 19:57 ` Stephen Leake
2015-01-16 20:21 ` Eli Zaretskii
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=85a91l6qkd.fsf@stephe-leake.org \
--to=stephen_leake@stephe-leake.org \
--cc=emacs-devel@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.