[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Lynx-dev] UTF-8 MS Windows

From: Thomas Dickey
Subject: Re: [Lynx-dev] UTF-8 MS Windows
Date: Wed, 21 May 2014 08:03:08 -0400
User-agent: Mutt/1.5.20 (2009-06-14)

On Wed, May 21, 2014 at 12:22:39PM +0200, Gisle Vanem wrote:
> "Thomas Dickey" <address@hidden> wrote:
> >say, but for windows, it's buried in the dll information (the wide-character
> >pdcurses.dll is 118784 bytes, while the non-wide one is a few hundred bytes
> >shorter).  The installers that I built last year use the wide-character 
> >pdcurses.
> I have not tried this option. But using SLang 2.2.4 (build with
> -D_UNICODE + -DUNOCODE) and the same in lynx all hell breaks loose.

That's expected behavior: no one's provided any patches for slang for several 
(I made my position clear enough about ten years ago: I'll accept and maintain 
which use slang, but I will not develop new code using slang).

> E.g.:
>  src/LYUtils.c(7782) : warning C4133: 'function' : incompatible types - from 
> 'const char *' to 'LPCWSTR'
>  src/LYUtils.c(7822) : warning C4133: 'return' : incompatible types - from 
> 'LPTSTR' to 'char *'
> The MS-convention (as we all know?) is that LPTSTR etc. maps to 'char *'
> or 'wchar_t *' depending on ASCII (default) or UNICODE. But the
> lynx-sources can never accept building with '-DUNICODE' because of
> such errors shown above.

However, lynx doesn't use that - it relies on the pdcurses or ncurses library
to do this.

(see makefile.msc, which defines WIDE_CURSES, for a starting point)
> So using TCHAR/LPTSTR etc. in the sources has no point as-is. The good
> news is that it won't be so difficult to fix AFAICS. I have
> identified these files with ASCII/UNICODE errors/warnings:
>  # err/warn    file:
>  -------------------------
>   7            src/LYExtern.c    1            src/LYMain.c         1
> src/LYMainLoop.c  13            src/LYUtils.c
>   2            lib/dirent.c
>   4            WWW/Library/Implementation/HTFile.c    4
> WWW/Library/Implementation/HTTCP.c   2
> WWW/Library/Implementation/HTDOS.c
> Btw. line 7782 of LYUtils.c is:
>     lstrcpy((LPTSTR) pLogData, szBuffer);
> So I'm not sure what the "official" way to support wide-chars in Lynx/Win32
> is.
> --gv

Thomas E. Dickey <address@hidden>

Attachment: signature.asc
Description: Digital signature

reply via email to

[Prev in Thread] Current Thread [Next in Thread]