Pascal Terjan
5dd45b0652
Add a test for caca_flip
пре 1 недеља
Pascal Terjan
fb77acff9b
Prevent undefined behaviour in overflow check
Fixes #86
пре 4 месеци
Steve Lhomme
d78bdde484
canvas: use GetCurrentProcessId() on Windows
getpid() or _getpid() are not available in UWP builds [1] but we can use
GetCurrentProcessId() instead.
[1] https://learn.microsoft.com/en-us/cpp/cppcx/crt-functions-not-supported-in-universal-windows-platform-apps#unsupported-crt-functions
пре 3 година
Steve Lhomme
43a0870bbb
win32: use CreateFile2 when compiling for Win8+
The API is always available in Win8+ even in UWP builds, unlike CreateFileW.
The API is pretty much the same. CONOUT is also supported [1].
[1] https://learn.microsoft.com/en-us/windows/win32/api/fileapi/nf-fileapi-createfile2#consoles
пре 3 година
Steve Lhomme
3b4670c82c
win32: use ANSI calls explicitly
If the environment forces the UNICODE define it will use the wrong call.
пре 3 година
Steve Lhomme
ceed13243b
win32: don't redefine GetCurrentConsoleFont with mingw-w64
It's already defined properly.
пре 3 година
Steve Lhomme
93b558f26b
win32: don't for _WIN32_WINNT to Win2K
If the system allows newer API's we should downversion it.
пре 3 година
Sam Hocevar
f42aa68fc7
Fix GL and X11 drivers in visibility mode
Patch courtesy of Jakub Bogusz.
пре 4 година
Sam Hocevar
bd2cff9e94
Rename some internal functions with _caca prefix to avoid confusion when we export them
пре 4 година
Sam Hocevar
a18e28d43e
Update copyright information and changelog
пре 4 година
Sam Hocevar
96ff990d5e
Better sanity checks when creating 2D buffers ( Closes #43 )
пре 4 година
Sam Hocevar
a15ba999d5
Add a comment in the SVG exporter to explain buffer size
пре 4 година
Sam Hocevar
5957d69900
Upgrade autoconf scripts
пре 4 година
Sam Hocevar
b4b4a473cd
Fix off-by-one memory read in binary canvas import ( fixes #56 , #58 )
пре 4 година
Sam Hocevar
ac56185be2
Fix off-by-one memory read in ANSI import ( fixes #55 , #58 )
пре 4 година
Sam Hocevar
ab04483ee1
Fix buffer overflows in TGA and troff exports (addresses #53 , #54 )
These were all caused by sprintf() appending a null char that was not actually used.
Fixes CVE-2021-30498 and CVE-2021-30499.
пре 4 година
Sam Hocevar
c807fbb878
Clean up Visual Studio build files
пре 4 година
Sam Hocevar
e4968ba6e9
Fix a problem in the caca_resize() overflow detection and add several unit tests.
пре 5 година
Sam Hocevar
46b4ea7cea
canvas: fix an integer overflow in caca_resize().
Fixes : #52 (CVE-2021-3410)
пре 5 година
Sam Hocevar
1022d97496
dither: fix integer multiplication overflow that caused crashes.
Fixes : #38 (CVE-2018-20546)
Fixes : #39 (CVE-2018-20547)
пре 7 година
Sam Hocevar
84bd155087
dither: fix integer overflows that were causing a division by zero.
Fixes : #36 (CVE-2018-20544)
пре 7 година
Sam Hocevar
f1267fbd3c
Fix copyright headers so that the testsuite passes again.
пре 8 година
Yury Gribov
726ede6491
Hide private symbols (issue #33 ).
пре 8 година
Sam Hocevar
5f0ec215f8
Remove legacy code from 10 years ago.
пре 8 година
Bastian Maerkisch
eebfb1eb65
Bold/italic attribute support for export to svg
пре 8 година
Bastian Maerkisch
68b9dcac92
slang driver: enable utf8 auto-detection
The slang internal auto-detection of utf8 is only executed by a call to
SLutf8_enable(-1).
пре 8 година
Sam Hocevar
319ab6a989
Only fail the check-copyright test if more than 10 files are affected.
пре 10 година
Pascal Terjan
02445fc305
Add some missing breaks (thanks coverity)
пре 10 година
alxf
20f3a39e01
Fix header copyright.
пре 10 година
alxf
c1ee309d79
Fix a bug into the autorepeat trigger.
- Only affect slang/ncurses.
пре 10 година
Sam Hocevar
558812d3fe
Update copyright information.
пре 10 година
Sam Hocevar
d33e961dc9
Only declare weak symbols if the runtime doesn’t have them. Fixes #8 .
пре 10 година
Sam Hocevar
cdfba0133b
Revert setlocale() effect as soon as possible. Closes #12 .
The Xlib and ncurses libraries query the LC_CTYPE locale value to guess
the usable character set. If the calling program did not call setlocale(),
that character set will be severely limited. Extensive Unicode support
is a reasonable libcaca user expectation.
The locale is restored as soon as possible, once the window or terminal
have been initialised. Unfortunately, the effect of setlocale() is process-
wide, and may affect other threads. This is now documented.
Note also that both Xlib and ncurses ignore the effects of uselocale()
which would have been the thread-safe solution to this problem.
пре 10 година
Sam Hocevar
8757e80e43
Try to make Travis-CI tests pass on OS X.
пре 10 година
Sam Hocevar
cc4640f1a0
Fix a bug in check-copyright.
пре 10 година
Sam Hocevar
9b14aa4d05
Move many build files to the build subdirectory.
пре 10 година
Sam Hocevar
2f1ca4a550
Refactor a few things in the makefiles.
This fixes the path to source files in some unit tests and allows
to get rid of a few duplicate lines.
пре 10 година
Sam Hocevar
5b50cfa59c
test: refactor a lot of test suite related stuff.
пре 11 година
Sam Hocevar
d3c5bce620
misc: fix unit test failures.
пре 11 година
Sam Hocevar
55f85166e5
x11: replace deprecated XKeycodeToKeysym() with XLookupKeysym().
пре 11 година
artygus
239b223fff
x11 driver: handle errors caused by missing locales
пре 11 година
Sam Hocevar
44317430a1
misc: some source code cleanup.
пре 12 година
Sam Hocevar
a836967426
attr: fix a very old bug in caca_attr_to_ansi_fg.
пре 13 година
Sam Hocevar
2731717bee
codec: add import code for .BIN binary ANSI files.
пре 13 година
Sam Hocevar
298edbc8bd
codec: fix \t handling in the text importer.
пре 13 година
Alex Foulon
237f946a2e
Fixed character attribute in ncurses driver.
пре 13 година
Alex Foulon
34d172f0f2
Fixed typo in driver/x11.c.
пре 13 година
Sam Hocevar
f32c24a10d
build: fix the WTFPL homepage and copyright information.
пре 13 година
Sam Hocevar
75fd8cd06f
win32: improvements to the Win32 driver by Bastian Märkisch <bmaerkisch@web.de>:
- Save and correctly restore console input mode, ie. do not
change settings of the original console.
- Fix hiding of cursor.
- Free console again if the driver actually created a new one.
- Default canvas size is current window size.
- Base calculation on current font.
- Properly handle press and release events of up to 5 mouse buttons.
- Map right mouse button to button #3 . This is a change in behaviour,
which is desirable for cross-platform codes.
- Generate two click events for double mouse clicks.
- Mouse wheel support, creates button press events. Button numbers
are identical to X11 mappings.
- Handle window buffer resize events.
пре 13 година
Sam Hocevar
97c26b9bbb
string: avoid an infinite loop with some invalid UTF-8 sequences, and add a
unit test for the problem. Bug found by Bastian Märkisch <bmaerkisch@web.de>.
пре 13 година