Skip to content

Conversation

@edorig
Copy link
Contributor

@edorig edorig commented Apr 27, 2023

In libhtmlw/HTMLamp.h I had created the array AmpEscapes[] from a file entities.json from W3C. Looking at the warnings produced by the compilation of NCSA Mosaic, I have recently realized that some of the HTML entities like
⫋︀ corresponded to a pair of unicode characters. This was simply causing a warning from GCC about excess
data in the array definition. I have replaced some entities with single character codes, and commented out the ones for which I could not find a single character approximation. This eliminates the GCC warnings, and corrects some misrepresentations of a few entities.

Besides this change, the other changes are

  1. support for files compressed with bzip2 and xz in libwww2/HTCompressed.[ch]
  2. modified ifdefs in linux to use aplay for sound files, mpv for video, and display instead of xv for images.

edorig added 12 commits April 9, 2022 15:53
HTMLformat.c, HTMLtable.c: The Motif 2.x XmStringDraw can display UTF-8 characters.
gui.c, gui-dialog.c: replace XmStringCreateSimple with XmStringCreateLocalized
xresources.h: use ISO 10646-1 fonts
HTMLamp.h: more complete list of HTML 4 entities
HTMLparse.c: replace an HTML entity &#nnn; or &name; by the appropriate UTF-8 sequence.
Remove commented out code
Fix indentation
ifdef debug fprintf's in HTMLparse.c
HTFile.h: defined the macros
HTFile.c: parse the .xz and .bz2 extensions
HTMIME.c: partial treatment of MIME types associated with .xz and .bz2 files
HTCompressed.c: comment that the code will return if the file is .bz2 or .xz
Calling shell scripts instead of the actual executable does not work
HTCompressed.c: Added some code to decompress bzip2 and xz compressed files
xresources.h: added resources for bzip2 and xz decompression program
prefs.[ch] : added some preferences for bunzip xz --decompress programs
HTInit.c: use aplay to play sound files if on Linux
Add more convenient defaults in HTInit.c for linux (display for images; aplay for sound; mpv for video)
…ers.

In HTMLamp.h, only the first character was retained, leading to incorrect display of
entities such as ∼⃒
Pairs of Unicode characters have been replaced by a single character when possible.
The other entities are commented out.
readPNG.c: replace png_set_dither with png_set_quantize
Makefile.linux: add flag -lz muldefs to ldflags
HTMLamp.h: correct definitions for NotSubset and NotSuperset HTML entities
@clausecker
Copy link
Collaborator

I'm sorry for not having looked at this before, I honestly kind of forgot this existed. @alandipert, maybe you could just give commit rights to the submitter?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants