This repository was archived by the owner on Mar 28, 2024. It is now read-only.
Commit b5bc797
committed
Pass errret to setupterm
The setupterm(3) manual states:
If errret is not null, then setupterm returns OK or ERR and stores a
status value in the integer pointed to by errret.
...
If errret is null, setupterm prints an error message upon finding an
error and exits.
Since less(1) passes NULL, it will not return on error but instead
terminate the program.
Checking the returned value against ERR requires including curses.h
which causes a naming conflict with the existing beep function.
Therefore kept the condition as is.
The error message is borrowed from setupterm when errret is NULL and
does currently not distinguish between error code 0 and -1.1 parent ba28d35 commit b5bc797
1 file changed
+8
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
273 | 273 | | |
274 | 274 | | |
275 | 275 | | |
| 276 | + | |
276 | 277 | | |
277 | 278 | | |
278 | 279 | | |
| |||
281 | 282 | | |
282 | 283 | | |
283 | 284 | | |
284 | | - | |
285 | | - | |
| 285 | + | |
| 286 | + | |
| 287 | + | |
| 288 | + | |
| 289 | + | |
| 290 | + | |
| 291 | + | |
286 | 292 | | |
287 | 293 | | |
288 | 294 | | |
| |||
0 commit comments