[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

11. Portability Problems

This chapter is devoted to the description of the (hopefully very few) problems that could arise when porting ne to other flavours of UN*X.

The fact that only POSIX calls have been used (see section Motivations and Design) should guarantee that on POSIX-compliant systems a recompilation should suffice. Unfortunately, terminfo has not been standardized by IEEE, so that different calls could be available. The necessary calls are setupterm(), tparm() and tputs(). The other terminfo functions are never used.

If terminfo is not available, the source files `info2cap.c' and `info2cap.h' map terminfo calls on termcap calls. The complete GNU termcap sources are distributed with ne, so no library at all is needed to use them. You just have to compile using one of the options explained in the `makefile' and in the `README'. Should you need comprehensive information on GNU termcap, you can find the distribution files on any ftp site that distributes the GNU archives. I should note that the GNU termcap manual is definitely the best manual ever written about terminal databases.

There are, however, some details that are not specified by POSIX, or are specified with insufficient precision. The places of the source where such details come to the light are evidenced by the `PORTABILITY PROBLEM' string, which is followed by a complete explanation of the problem.

For instance, there is no standard way of printing extended ASCII characters (i.e., characters whose code is smaller than 32 or greater than 126). On many system, these characters have to be filtered and replaced with something printable: the default behaviour is to add 64 to all characters under 32 (so that control characters will translate to the respective letter) and to visualize all characters between 126 and 160 as a question mark (this works particularly well with ISO Latin 1). If your system has a more powerful display, you may want to change the de_control() function defined in `term.c' that takes a character variable as an argument, and transforms it into a printable character.

Note that it is certainly possible that some system features not standardized by POSIX interfere with ne's use of the I/O stream. Such problems should be dealt with locally by using the system facilities rather than by horribly #ifdef'ing the source code. An example is given in Hints and Tricks.


[ << ] [ >> ]           [Top] [Contents] [Index] [ ? ]

This document was generated by Sebastiano Vigna on September, 1 2005 using texi2html 1.76.