This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Mg3a - a version of Mg2a developed on Cygwin


On Feb 23 20:36, Bengt Larsson wrote:
> Andrew Schulman wrote:
> >> Why not ITP it as an official package?
> >
> >It will need a license.  Right now there's no license information anywhere
> >in the tarball AFAICT.
> >
> >Is the code in Mg3a taken from Emacs?  If so, you need to include the GPL
> >in your tarball.
> 
> No, it was taken from Mg2a, which was public domain. See the README in
> the orig/ directory. The orig directory is referred to in the README in
> the source directory.
> 
> README:
> "The original README and documents are in orig/. The
> extensions as well as the original, with some exceptions mentioned in
> the original README, are in the public domain. "
> 
> orig/README:
> "Mg 2a README  May 15, 1988
> 
> Mg (mg) is a Public Domain EMACS style editor."
> 
> This is perhaps not perfect disclosure, but it is there. (I did miss
> wcwidth.c, but it says:
> 
> " * Markus Kuhn -- 2007-05-26 (Unicode 5.0)
>  *
>  * Permission to use, copy, modify, and distribute this software
>  * for any purpose and without fee is hereby granted. The author
>  * disclaims all warranties with regard to this software.
> "

Just a hint:

When on Cygwin, you might better use Cygwin's(*) wcwidth function.  It's
based on the same code from Markus Kuhn, but it interacts with the
setlocale function to make sure that the width returned for the CJK
ambiguous width characters makes sense in the given locale.  Plus, it
supports a Cygwin-specific locale modifier '@cjknarrow' which allows the
user to modify this behaviour.  When using your own wcwidth, you're
giving up on this feature.

Better yet, convert wide chars to wide strings and use the wcswidth
function.  In contrast to wcwidth, it can also handle surrogate pairs.


Corinna


(*) Actually newlib's wcwidth.

-- 
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Project Co-Leader          cygwin AT cygwin DOT com
Red Hat

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]