File: ne_11.html

package info (click to toggle)
ne 1.38-1
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 3,164 kB
  • ctags: 2,701
  • sloc: ansic: 16,620; perl: 380; makefile: 137; sh: 10
file content (107 lines) | stat: -rw-r--r-- 5,784 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
<HTML>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<!-- Created on September, 27  2004 by texi2html 1.64 -->
<!-- 
Written by: Lionel Cons <Lionel.Cons@cern.ch> (original author)
            Karl Berry  <karl@freefriends.org>
            Olaf Bachmann <obachman@mathematik.uni-kl.de>
            and many others.
Maintained by: Olaf Bachmann <obachman@mathematik.uni-kl.de>
Send bugs and suggestions to <texi2html@mathematik.uni-kl.de>
 
-->
<HEAD>
<TITLE><CODE>ne</CODE>'s manual: Portability Problems</TITLE>

<META NAME="description" CONTENT="<CODE>ne</CODE>'s manual: Portability Problems">
<META NAME="keywords" CONTENT="<CODE>ne</CODE>'s manual: Portability Problems">
<META NAME="resource-type" CONTENT="document">
<META NAME="distribution" CONTENT="global">
<META NAME="Generator" CONTENT="texi2html 1.64">

</HEAD>

<BODY LANG="" BGCOLOR="#FFFFFF" TEXT="#000000" LINK="#0000FF" VLINK="#800080" ALINK="#FF0000">

<A NAME="SEC181"></A>
<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="ne_10.html#SEC180"> &lt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="ne_12.html#SEC182"> &gt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="ne_2.html#SEC2"> &lt;&lt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="ne.html#SEC_Top"> Up </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="ne_12.html#SEC182"> &gt;&gt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="ne.html#SEC_Top">Top</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="ne_toc.html#SEC_Contents">Contents</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="ne_13.html#SEC183">Index</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="ne_abt.html#SEC_About"> ? </A>]</TD>
</TR></TABLE>
<H1> 11. Portability Problems </H1>
<!--docid::SEC181::-->
<P>

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

The fact that only POSIX calls have been used (see section <A HREF="ne_7.html#SEC177">7. Motivations and Design</A>) should guarantee that on POSIX-compliant systems a
recompilation should suffice. Unfortunately, <CODE>terminfo</CODE> has not
been standardized by IEEE, so that different calls could be
available. The necessary calls are <CODE>setupterm()</CODE>, <CODE>tparm()</CODE>
and <CODE>tputs()</CODE>. The other <CODE>terminfo</CODE> functions are never used.
</P><P>

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

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 <SAMP>`PORTABILITY PROBLEM'</SAMP>
string, which is followed by a complete explanation of the problem.
</P><P>

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 <CODE>de_control()</CODE> function defined in
<TT>`term.c'</TT> that takes a character variable as an argument, and transforms
it into a printable character.
</P><P>

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

<A NAME="Acknowledgments"></A>
<HR SIZE="6">
<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="ne_2.html#SEC2"> &lt;&lt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="ne_12.html#SEC182"> &gt;&gt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="ne.html#SEC_Top">Top</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="ne_toc.html#SEC_Contents">Contents</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="ne_13.html#SEC183">Index</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="ne_abt.html#SEC_About"> ? </A>]</TD>
</TR></TABLE>
<BR>  
<FONT SIZE="-1">
This document was generated
by <I>Sebastiano Vigna</I> on <I>September, 27  2004</I>
using <A HREF="http://www.mathematik.uni-kl.de/~obachman/Texi2html
"><I>texi2html</I></A>

</BODY>
</HTML>