Details

[Home]

Issue of the Standard # S0319

Brief

The ripoffline() call above five calls limit returns -1

Detailed Description

LSB 3.1 refers to SUSv2 (The Single UNIX Specification, Version 2) for the description of the libncurses functions. According to the specification of ripoffline() function "up to five lines can be ripped off" and "calls to ripoffline() above this limit have no effect but report success".
But the following code shows that ripoffline() from ncurses-5.4 does not report success on sixth call. The retun value will be -1 and it means error.

#include <stdio.h> #include <curses.h> int init(WINDOW *win, int columns) { return 1; } int main(int argc, char* argv[]) { printf("%d\n", ripoffline(1, init)); printf("%d\n", ripoffline(1, init)); printf("%d\n", ripoffline(1, init)); printf("%d\n", ripoffline(1, init)); printf("%d\n", ripoffline(1, init)); printf("%d\n", ripoffline(1, init)); return 0; } But in ncurses man pages it is declared that "ripoffline returns an error if the maximum number of ripped-off lines exceeds the maximum (NRIPS = 5).
So the function works according to man pages but not the LSB standard.

Problem location(s) in the standard

Linux Standard Base Core Specification 3.1, Chapter 14. Utility Libraries, 14.5. Interfaces for libncurses.

Possible solutions

Correction of LSB standard

References

No references to this problem found

Accepted

LSB Bugzilla, 1632

Status

Fixed in LSB 4.0

[Home]