Commit Graph

1606 Commits

Author SHA1 Message Date
nick black
355ea6d3d7
Allow EGCpools up to 1GB #425 2020-04-15 23:49:10 -04:00
nick black
43c8b9fdb6 ncpp: drop USE_FFMPEG guards #488 2020-04-15 22:20:34 -04:00
nick black
c6aa99afba eliminate infinite loop in mathtext PoC 2020-04-15 16:53:56 -04:00
nick black
f356af418b
Scrolling: cell_release() cleared rows #482 2020-04-15 16:46:15 -04:00
nick black
a4e1d68786
Add ExhaustPool unit test #482 2020-04-15 16:36:17 -04:00
nick black
3ddb1d3166
EGCPool: early realloc failure is not a hard fail
We do proactive reallocations of the EGCPool once we get
to 90% capacity, to avoid expensive exhaustive searches. When
we're over half the maximum size, though, this will fail. We
shouldn't treat that as a hard failure, but instead proceed on
to the search. This lets us hit the full 32MB EGCPool size #486.
2020-04-15 16:33:22 -04:00
nick black
08e769f989
rasterize: don't emit 0-byte write()s #482 2020-04-15 13:27:15 -04:00
nick black
453629462b
CHANGELOG: add note about Notcurses::render() return value change #484 2020-04-15 12:50:48 -04:00
nick black
ffdee735cb
Tetris: update to reflect ncpp render() return value inversion #484 2020-04-15 12:49:37 -04:00
nick black
a0669974ff
ncplane_putstr_yx(): don't map 0 to -1 #485 2020-04-15 12:32:27 -04:00
Marek Habersack
64eeb95f1e [C++] Optionally enable throwing exceptions on errors
Nick prefers error handling based on exceptions in all cases, while I
prefer to save exception handling for truly exceptional situations -
function parameter validation and class constructor. However, there's no
need to not support both approaches, to be chosen at the discretion of
the developer.

NCPP follows RAII and all classes throw exceptions from their
constructors in case they cannot initialize properly. Likewise,
functions taking pointers that are required validate them and throw
exceptions whenever the requirement isn't met.

This commit goes one step further in that it enables optional validation
of notcurses function return values and throwing an
exception (`ncpp::call_error`) should the function signal an error. This
is disabled by default but it can be enabled by defining the
`NCPP_EXCEPTIONS_PLEASE` macro (preferably on the command line or
before *each* inclusion of any NCPP headers).

Out of necessity, this breaks the ABI (plus I found a handful of minor
issues in the code), but I think it's worth having this support in
place.
2020-04-15 12:10:14 -04:00
nick black
a5a2b5646a add PoC scroller #443 2020-04-15 11:37:57 -04:00
nick black
327c9cba78 Scrolling! all unit tests work #443 2020-04-15 11:37:57 -04:00
nick black
b385feef8f zero out newly-scrolled lines #443 2020-04-15 11:37:57 -04:00
nick black
646bcf3db2 finish out ScrollingOffBottom test #443 2020-04-15 11:37:57 -04:00
nick black
40067c0ccd interpret logical plane line via scrolled_row() #443 2020-04-15 11:37:57 -04:00
nick black
40fd887012 New unit test for scrolling ScrollingOffBottom #443 2020-04-15 11:37:57 -04:00
nick black
ad9828e808 add ScrollingBoxen unit test 2020-04-15 11:37:57 -04:00
nick black
062caf0dfd Doxygen: use recommended logo size 2020-04-15 11:37:57 -04:00
nick black
d6ba4b35a6
fedora: don't provoke 'installed but unpackaged' bah 2020-04-14 12:34:07 -04:00
nick black
d1360e891b
fedora: don't install notcurses-view man page 2020-04-14 12:27:00 -04:00
nick black
43fafb1a61
fedora: don't install notcurses-tester man page 2020-04-14 12:25:26 -04:00
nick black
d98f89c167
check channels in WidePlaneAtopNarrow test #475 2020-04-14 10:50:53 -04:00
nick black
87136c37d3
flesh out two more Wide+Narrow tests #475 2020-04-14 10:39:38 -04:00
nick black
a7d9220f21 cell_load(): recycle when possible #473 2020-04-14 10:07:33 -04:00
nick black
45b821645a Only left sides of wide glyphs are 2 columns
At various places in rendering and rasterizing, we advance two
columns upon encountering a wide glyph. When dealing with a
single plane, this is always correct, because we're always
hitting the first column of the multicolumn glyph. Once multiple
planes are brought into play, though, we can very much hit the
second column of said glyph, in which case we mustn't advance
two columns, but only one. Resolves #474 by way of #475. w00t!
2020-04-14 05:17:16 -04:00
nick black
05cdd1514b pull in PlaneStompsWideGlyph from render.cc 2020-04-14 05:17:16 -04:00
nick black
1c41705d99 flesh out NarrowPlaneAtopWide unit test #475 2020-04-14 05:17:16 -04:00
nick black
295ae0a8d0
extract wide glyph unit tests into their own file #475 2020-04-13 23:12:10 -04:00
nick black
c934c7be49
colons in output 2020-04-13 20:43:09 -04:00
nick black
bd08712a0e
highcon: hoist out loop for great speedup #468 2020-04-13 18:39:25 -04:00
nick black
14184e8dbb
summary: use colons rather than slashes for emit:elide 2020-04-13 18:30:20 -04:00
nick black
6cbca20d0a
add 1.3.0 release to README 2020-04-13 15:10:19 -04:00
nick black
b0fc654444 Check that cell is not wide right in render #362 2020-04-12 07:07:02 -04:00
nick black
b0aa6b9a7f simplify wide handling in putc_yx #362 2020-04-12 07:07:02 -04:00
nick black
e6a80ab98d Strip down OverWide unit test 2020-04-12 07:07:02 -04:00
nick black
d26b111f35 new unit test Ncplane::OverWide #362 2020-04-12 07:07:02 -04:00
nick black
b4cf4f3a0d
CMake: supply -fkeep-inline-functions for notcurses 2020-04-12 02:01:56 -04:00
nick black
86e225dc4c prep for 1.3.0 #460 2020-04-11 22:00:34 -04:00
Marek Habersack
28976dfef2 [C++] Sync API changes
Been a while, but here goes, sync to the latest API changes.

Added:

  * Direct:   cursor_{up,left,right,down} (`ncdirect_cursor_{up,left,right,down}`)
  * Plane: constructors to use `ncplane_bound`
  * Plane: reparent (`ncplane_reparent`)
  * Plot: definition of `default_options`

Changed:

  * Plane (breaking): the `*gradient*` functions now return `int`
  * Plane (breaking): `polyfill` returns `int`
  * Plane (breaking): `stain` returns `int`
  * Plane (breaking): `blit_bgrx` takes `const void*` for `data`
  * Plane (breaking): `blit_rgba` takes `const void*` for `data`
  * Plot: `plot_optons` -> `ncplot_options`
  * Plot (breaking): `{add,set}_sample` now return `bool`
2020-04-11 20:44:25 -04:00
nick black
55195b8ed0 fedora: use python_sitearch, install all python #462 2020-04-11 02:05:44 -04:00
nick black
9c9011c4cd fedora: really fix python #462 2020-04-11 02:02:04 -04:00
nick black
e222f213af
fedora: see if we can't apply the arch fix 2020-04-11 13:53:33 -04:00
nick black
2c4f17bc65
keep a copy of our arch PKGBUILD 2020-04-11 13:48:04 -04:00
nick black
24a9343b0b
prep for 1.2.9 2020-04-11 12:39:54 -04:00
nick black
bd226960d9
fedoraspec: just list header directories 2020-04-11 12:28:43 -04:00
nick black
4a56b7935f
rpmspec: s/srcname/name/g 2020-04-11 12:25:22 -04:00
nick black
5008f3513f
rpmspec: strip quotation marks 2020-04-11 12:24:03 -04:00
nick black
c6494382d9
Fedora specfile: list directories, use wildcards 2020-04-11 12:17:15 -04:00
nick black
8fdf3d393a
Fedora specfile: Incorporate A Iwicki's feedback
Split out the python demo and wrappers into their own package,
python3-notcurses. Make an archful dependency for the devel
package to the main library. Comment up test disabling.
2020-04-11 12:10:44 -04:00