Re: [ekhtml-devel] FIX: WIN32 Compilation
Brought to you by:
jick
|
From: Jon T. <jt...@p0...> - 2003-03-06 19:08:17
|
Excellent, thanks for the patches.
Ideally I'd like to centralize these defines, so I don't
have to change them in multiple locations when a release
occurs. Any way that these #s can be gleaned from the
configure.in and this file autogenerated?
-- Jon
On Thursday, March 6, 2003, at 05:25 AM, Mladen Turk wrote:
> Hi all,
>
> Here are some changes that enables compiling on WIN32.
>
> 1. Use the ekhtml_config.hw (like APR's apr.hw, etc...)
>
> Since there isn't autoconf on WIN32 here is a file that can be copied
> to
> ekhtml_config.h during building of mktables. I'm using VC7 so didn't
> supply
> the patch for .dsp's. So here it is:
>
> /* ekhtml_config.hw
> This file is in the public domain.
>
> Descriptive text for the C preprocessor macros that
> the distributed Autoconf macros can define.
> No software package will use all of them; autoheader copies the ones
> your configure.in uses into your configuration header file
> templates.
>
> The entries are in sort -df order: alphabetical, case insensitive,
> ignoring punctuation (such as underscores). Although this order
> can split up related entries, it makes it easier to check whether
> a given entry is in the file.
>
> Leave the following blank line there!! Autoheader needs it. */
>
> #define EKHTML_HASH_BITS 32
> #define EKHTML_VER_BUGFIX 0
> #define EKHTML_VER_MAJOR 3
> #define EKHTML_VER_MINOR 3
>
> #ifdef _MSC_VER
> #define inline __inline
> #endif
>
>
> 2. Runtime fixes for mktables debug builds:
>
> Assertion in msvcrt caused by the fact that all the
> characters larger then 127 are transformed to negative integer values.
> So the mktables fails.
> Simple casting to unsigned char resolves that.
>
>
> RCS file: /cvsroot/ekhtml/ekhtml/src/ekhtml_mktables.c,v
> retrieving revision 1.2
> diff -u -3 -r1.2 ekhtml_mktables.c
> --- ekhtml_mktables.c 22 Sep 2002 04:49:57 -0000 1.2
> +++ ekhtml_mktables.c 6 Mar 2003 13:15:09 -0000
> @@ -46,13 +46,13 @@
>
> /* valid_tagname: Character map for a tagname AFTER the first letter
> */
> static EKHTML_CHARMAP_TYPE valid_tagname(char in){
> - if(in == '-' || in == '.' || isdigit(in) || isalpha(in))
> + if(in == '-' || in == '.' || isdigit((unsigned char)in) ||
> isalpha((unsigned char)in))
> return 1;
> return 0;
> }
>
> static EKHTML_CHARMAP_TYPE valid_whitespace(char in){
> - return isspace(in) ? 1 : 0;
> + return isspace((unsigned char)in) ? 1 : 0;
> }
>
> /* attribute name AFTER the first character */
> @@ -75,13 +75,13 @@
> }
>
> static EKHTML_CHARMAP_TYPE valid_begattrname(char in){
> - return (isalpha(in) || in == '_') ? 1 : 0;
> + return (isalpha((unsigned char)in) || in == '_') ? 1 : 0;
> }
>
> static EKHTML_CHARMAP_TYPE ekhtml_state(char in){
> if(in == '/')
> return EKHTML_STATE_ENDTAG;
> - if(isalpha(in))
> + if(isalpha((unsigned char)in))
> return EKHTML_STATE_STARTTAG;
> if(in == '!')
> return EKHTML_STATE_NONE; /* Must be determined by caller */
>
>
>
> MT.
>
>
>
> -------------------------------------------------------
> This SF.net email is sponsored by: Etnus, makers of TotalView, The
> debugger
> for complex code. Debugging C/C++ programs can leave you feeling lost
> and
> disoriented. TotalView can help you find your way. Available on major
> UNIX
> and Linux platforms. Try it free. www.etnus.com
> _______________________________________________
> ekhtml-devel mailing list
> ekh...@li...
> https://lists.sourceforge.net/lists/listinfo/ekhtml-devel
>
|