Commit Graph

23 Commits (master)

Author SHA1 Message Date
Christoph Lohmann 8fe4f9e733 Simplify reloading, remove lines.
Thanks Bob for the suggestion!
2020-12-20 19:20:40 +01:00
Christoph Lohmann 0ebd046cc4 Move to sigaction. Raise SIGWINCH on HUP for ncurses.
Thanks Bob for the sigaction suggestion!
2020-12-20 17:20:03 +01:00
Christoph Lohmann 6649dc02de Include string.h for memset.
Thanks Bob!
2020-12-20 16:35:03 +01:00
Christoph Lohmann 59a8c7e4ae Raise SIGWINCH in SIGHUP, so refresh is safe in ncurses. 2020-12-20 16:34:20 +01:00
Hiltjo Posthuma b455270d0e add a few common keybinds: ^D, SPACE and ^L
Signed-off-by: Christoph Lohmann <20h@r-36.net>
2020-12-20 16:06:58 +01:00
Hiltjo Posthuma 4749f13de5 exit(0) on success, non-zero if an error occurred or signal was received
Signed-off-by: Christoph Lohmann <20h@r-36.net>
2020-12-20 16:06:58 +01:00
Hiltjo Posthuma 79fcfa10f4 print the exact amount of mmap'd data
It could read past the mmap'd region (not using the NUL terminator).

Signed-off-by: Christoph Lohmann <20h@r-36.net>
2020-12-20 16:06:58 +01:00
Hiltjo Posthuma e53298ab1f add support for SIGWINCH / window resize
Signed-off-by: Christoph Lohmann <20h@r-36.net>
2020-12-20 16:06:58 +01:00
Hiltjo Posthuma c8f895266f sort includes
Signed-off-by: Christoph Lohmann <20h@r-36.net>
2020-12-20 16:06:58 +01:00
Christoph Lohmann b0efd23c24 Do not mmap all slides at the beginning to scale better.
Without mmaping all slides at the beginning, catpoint scales better
and the whole internal algorithms are simplified.
2020-12-20 15:25:52 +01:00
Christoph Lohmann 5672cc0e59 Massive refactoring for features (SIGHUP, variable names).
* Now the global variable names are easier to use.
* Only the global variables are used.
* A new loadcurrentslide() function is used for SIGHUP.
	* This allows slideshows to be programmed using SIGHUP.
	* Thanks Bob for the suggestion!
2020-12-20 14:57:45 +01:00
Christoph Lohmann a4f575be61 Signal handler needs to have int for signal number. 2020-12-20 14:41:04 +01:00
Christoph Lohmann 626219d14e Arguments to cleanup are not needed. 2020-12-20 14:40:03 +01:00
Christoph Lohmann 6837d1b5e6 Change license header to current state.
Thanks Bob for noticing!
2020-12-20 14:38:14 +01:00
Christoph Lohmann 8ef598d0d6 Remove duplicate SIGINT signal call.
Thanks Bob!
2020-12-20 14:37:26 +01:00
Christoph Lohmann c19639a4ed Handle errors on munmap. It can fail too. 2020-12-20 14:34:51 +01:00
Christoph Lohmann 9d56979ded Add reload function to catpoint.
Thanks to Karchnu <karchnu@karchnu.fr> for the initial patch!
2020-12-20 11:44:12 +01:00
Ekkie 7f4f527303 Stat each file and mmap(3) only as much as is really needed
Signed-off-by: Christoph Lohmann <20h@r-36.net>
2020-05-04 12:50:07 +02:00
Christoph Lohmann 78504360bf Fix whitespace issues. 2018-07-08 14:59:13 +02:00
KatolaZ 62d8733dfb patch signal handlers for catpoint
As subject says. Avoid to garble the terminal on an exit due to
signal. Quite straightforward ;)

HND

KatolaZ

--
[ ~.,_  Enzo Nicosia aka KatolaZ - Devuan -- Freaknet Medialab  ]
[     "+.  katolaz [at] freaknet.org --- katolaz [at] yahoo.it  ]
[       @)   http://kalos.mine.nu ---  Devuan GNU + Linux User  ]
[     @@)  http://maths.qmul.ac.uk/~vnicosia --  GPG: 0B5F062F  ]
[ (@@@)  Twitter: @KatolaZ - skype: katolaz -- github: KatolaZ  ]

Signed-off-by: Christoph Lohmann <20h@r-36.net>
2018-07-08 14:58:38 +02:00
Christoph Lohmann 1f8cc28431 Add support for Logitech USB remote presenter (powerpoint shortcuts). 2017-03-04 16:49:33 +01:00
Christoph Lohmann b36909615c Make Pos1 work. 2017-02-26 17:21:51 +01:00
Christoph Lohmann b95ee9c3f7 Initial commit. 2015-08-27 23:54:58 +02:00