Pascal Terjan
02445fc305
Add some missing breaks (thanks coverity)
pirms 8 gadiem
Sam Hocevar
44317430a1
misc: some source code cleanup.
pirms 10 gadiem
Sam Hocevar
2731717bee
codec: add import code for .BIN binary ANSI files.
pirms 11 gadiem
Sam Hocevar
298edbc8bd
codec: fix \t handling in the text importer.
pirms 11 gadiem
Sam Hocevar
f32c24a10d
build: fix the WTFPL homepage and copyright information.
pirms 12 gadiem
Sam Hocevar
a09f027727
Add the copyright unit test and update copyright information everywhere.
pirms 15 gadiem
Sam Hocevar
107ff4b815
Large source code cleanup, getting rid of spaces, tabs, and svn keywords.
pirms 15 gadiem
Sam Hocevar
1edad92edc
Simpler and more accurate troff colour selection.
pirms 15 gadiem
Pascal Terjan
c73ff6d51d
* Always draw all background in troff output, on beginning of lines too
pirms 15 gadiem
Sam Hocevar
3584efdf4b
Fix the source code to reduce testsuite errors.
pirms 15 gadiem
Pascal Terjan
a2fff59c1e
* Always draw all background in troff output
pirms 15 gadiem
Pascal Terjan
f8a477f2ab
* Map colors to the ones known by groff, defining mines don't work
pirms 15 gadiem
Pascal Terjan
c7ec6a0e94
* Improve a bit troff export
pirms 15 gadiem
Pascal Terjan
1c669cd86b
* Add experimental troff export
pirms 15 gadiem
Sam Hocevar
308c203f4a
Fix Win32 cross-build by removing one level of aliasing.
pirms 15 gadiem
Sam Hocevar
644ee4a78a
Coding style: remove tabs and trailing spaces.
pirms 15 gadiem
Pascal Terjan
ac9b1074b4
Fix limits settings in area export
pirms 15 gadiem
Sam Hocevar
d3ef2bbecd
Add caca_export_area_to_memory() to export only a selected part of the
current canvas. This is useful to export dirty rectangles. Accordingly,
add caca_import_area_from_memory() and caca_import_area_from_file().
pirms 15 gadiem
Sam Hocevar
11428406c1
Split import.c and export.c to create a new text.c codec file in order
to keep source files under 1,000 lines of code.
pirms 15 gadiem
Pascal Terjan
d1db2df568
Revert r3478
pirms 15 gadiem
Pascal Terjan
33f2264bcd
Import/export dirty rectangles
pirms 15 gadiem
Sam Hocevar
fc193a4b99
Fix a few implicit cast related warnings on VC++.
pirms 15 gadiem
Sam Hocevar
af3c74e915
import.c: when importing ANSI or UTF-8 files, treat ^L as a canvas
frame separator. Not extremely robust yet.
pirms 15 gadiem
Sam Hocevar
7b25d39e63
Apparently \033 is more common than \x1b for ESC. Use the former in our
code for clarity.
pirms 15 gadiem
Ben Wiley Sittler
07d9dcc348
preserve column alignment better by breaking cells at spaces; preserve
readability of fullwidth characters better by not placing cell
boundaries between them unneccessarily
pirms 16 gadiem
Ben Wiley Sittler
e434549a4d
force a column alignment after each column containing a fullwidth character.
pirms 16 gadiem
Ben Wiley Sittler
d32f8eb7f8
fix foreground-color and quoting bugs in the "html" exporter; also,
the output is now labelled as XHTML 1.0 Strict, since it does conform
to that DTD. also removed spurious cellpadding and cellspacing from
<div /> markup. also handle non-characters by conversion to
replacement character, and handle more control characters by
conversion to no-break space. finally, switch from to the
equivalent   so that a non-validating XML parser (which is most
of them) can correctly parse this document.
pirms 16 gadiem
Ben Wiley Sittler
e8756c7c46
do not split a fullwidth character in the middle. yes, in some
degenerate cases this will lead to incorrectly-displayed tables. i
don't yet have a solution.
pirms 16 gadiem
Ben Wiley Sittler
567ae29030
do not expand tabs here. instead, importers need to understand '\t'
and fill the canvas up to the tab stop with it. once that works,
support will be added here (treating it as space.) also, fewer columns
are now generated. apparently generating a minimal number of them
fixes a bunch of the table-layout bugs.
pirms 16 gadiem
Ben Wiley Sittler
afcad730a8
some unicode characters could overflow the buffer; handle more control
characters and non-unicode codepoints when generating HTML.
pirms 16 gadiem
Ben Wiley Sittler
f4b036ef09
optimization: when the canvas is only a single line, we can always
optimize by merging cells
pirms 16 gadiem
Ben Wiley Sittler
86a512cf34
work around table layout bugs by ensuring that if there are multiple
cells on any row of the table then the very first row does not use the
cell-merging optimization; this appears to fix the last of the table
layout bugs seen in truecolor.php; also fix the foreground and
background color bugs seen in truecolor.php.
pirms 16 gadiem
Ben Wiley Sittler
ef3b597946
add a <table summary="..." /> attribute so screenreader software does not
get hopelessly lost.
pirms 16 gadiem
Ben Wiley Sittler
cb49816e2e
use a single table cell for adjacent attribute runs provided the background color will be the same; this allows us to avoid special stylesheets for our example programs
pirms 16 gadiem
Ben Wiley Sittler
8cc4c277b3
output valid XHTML (it's valid HTML3 too); note that this drops the COLS=... attribute on the table, but that had previously been calculated incorrectly anyhow so i doubt it mattered
pirms 16 gadiem
Ben Wiley Sittler
e6e8418523
fix table border, colors, and quoting of <, ", ', and > in html3 output
pirms 16 gadiem
Ben Wiley Sittler
7273a9dbf2
correctly account for tabs in html3 export
pirms 16 gadiem
Sam Hocevar
e1562a8d46
libcaca: move codecs and import/export functions into subdirectories.
pirms 16 gadiem