Fix errors in the manpage

Author: Chris Taylor <ctaylor@debian.org>
Date: 20FEB2010
--- a/doc/socat.1
+++ b/doc/socat.1
@@ -7,9 +7,9 @@ socat \- Multipurpose relay (SOcket CAT)
 .SH "SYNOPSIS"
 \f(CWsocat [options] <address-chain> <address-chain>\fP
 .br 
-\f(CWsocat -V\fP
+\f(CWsocat \-V\fP
 .br 
-\f(CWsocat -h[h[h]] | -?[?[?]]\fP
+\f(CWsocat \-h[h[h]] | \-?[?[?]]\fP
 .br 
 \f(CWfilan\fP
 .br 
@@ -27,7 +27,7 @@ be used for many different purposes\&.
 .PP 
 \fBFilan\fP is a utility that prints information about its active file
 descriptors to stdout\&. It has been written for debugging \fBsocat\fP, but might be
-useful for other purposes too\&. Use the -h option to find more infos\&.
+useful for other purposes too\&. Use the \-h option to find more infos\&.
 .PP 
 \fBProcan\fP is a utility that prints information about process parameters to
 stdout\&. It has been written to better understand 
@@ -72,11 +72,11 @@ Print version and available feature info
 Print a help text to stdout describing command line options and available address
 types, and exit\&.
 .IP "\fB\f(CW-hh | -??\fP\fP"
-Like -h, plus a list of the short names of all available address options\&. Some options are
+Like \-h, plus a list of the short names of all available address options\&. Some options are
 platform dependend, so this output is helpful for checking the particular
 implementation\&. 
 .IP "\fB\f(CW-hhh | -???\fP\fP"
-Like -hh, plus a list of all available address option names\&.
+Like \-hh, plus a list of all available address option names\&.
 .IP "\fB\f(CW-d\fP\fP"
 Without this option, only fatal and error messages are generated; applying
 this option also prints warning messages\&. See DIAGNOSTICS
@@ -91,7 +91,7 @@ messages\&.
 .IP "\fB\f(CW-D\fP\fP"
 Logs information about file descriptors before starting the transfer phase\&.
 .IP "\fB\f(CW-ly[<facility>]\fP\fP"
-Writes messages to syslog instead of stderr; severity as defined with -d
+Writes messages to syslog instead of stderr; severity as defined with \-d
 option\&. With optional <facility>, the syslog type can
 be selected, default is "daemon"\&. 
 .IP "\fB\f(CW-lf\fP\fP\f(CW <logfile>\fP"
@@ -223,7 +223,7 @@ specification (number or service name)\&
 Some keywords are overloaded with multiple \fIaddress forms\fP that may differ in
 the following properties: Endpoint or inter address; number of
 parameters; supported transfer directions on the left side\&. To see all
-address forms available invoke socat with option -h\&. The first
+address forms available invoke socat with option \-h\&. The first
 set of <tt>rwb</tt> flags describes the transfer directions on the address\&'s
 left side (read, write, and bidirectional, as seen by this address)\&. The second
 set describes the required direction on the right side; empty means it is an
@@ -232,7 +232,7 @@ endpoint address form\&.
 When parsing the addresses within an address chain \fBsocat\fP takes care of the
 data transfer directions between consecutive addresses\&. For the first address
 the directions are bidirectional per default, or unidirectional when when
-option -u or -U is used\&. For the following
+option \-u or \-U is used\&. For the following
 addresses, the required directions are derived from the right side directions
 of the left neighbor\&.
 .PP 
@@ -243,7 +243,7 @@ separated by \&'=\&'\&. Option keywords
 For filtering the options that are useful with an address
 type, each option is member of one option group\&. For
 each address type there is a set of option groups allowed\&. Only options
-belonging to one of these address groups may be used (except with option -g)\&. 
+belonging to one of these address groups may be used (except with option \-g)\&.
 .PP 
 Address specifications following the above schema are also called \fIsingle\fP
 address specifications\&.
@@ -772,7 +772,7 @@ Option groups: FD,SOCKET,IP6,SCTP,CHILD,
 Listens on <port> [TCP service] and accepts a
 TCP/IP connection\&. The IP version is 4 or the one specified with
 address option pf, \fBsocat\fP option
-(-4, -6), or environment variable SOCAT_DEFAULT_LISTEN_IP\&.
+(\-4, \-6), or environment variable SOCAT_DEFAULT_LISTEN_IP\&.
 Note that opening
 this address usually blocks until a client connects\&.
 .br 
@@ -821,7 +821,7 @@ components\&.
 .br 
 Please note that you can - beyond the options of the specified groups - also
 use options of higher level protocols when you apply \fBsocat\fP option
--g\&.
+\-g\&.
 .br 
 Option groups: FD,SOCKET,CHILD,RETRY
 .br 
@@ -848,7 +848,7 @@ components\&.
 .br 
 Please note that you can - beyond the options of the specified groups - also
 use options of higher level protocols when you apply \fBsocat\fP option
--g\&.
+\-g\&.
 .br 
 Option groups: FD,SOCKET,RANGE
 .br 
@@ -876,7 +876,7 @@ sa_family and (BSD) sa_len components\&.
 .br 
 Please note that you can - beyond the options of the specified groups - also
 use options of higher level protocols when you apply \fBsocat\fP option
--g\&.
+\-g\&.
 .br 
 Option groups: FD,SOCKET,LISTEN,RANGE,CHILD,RETRY
 .br 
@@ -1108,7 +1108,7 @@ Option groups: FD,SOCKET,IP6,TCP,RETRY
 Listens on <port> [TCP service] and accepts a
 TCP/IP connection\&. The IP version is 4 or the one specified with
 address option pf, \fBsocat\fP option
-(-4, -6), or environment variable SOCAT_DEFAULT_LISTEN_IP\&.
+(\-4, \-6), or environment variable SOCAT_DEFAULT_LISTEN_IP\&.
 Note that opening
 this address usually blocks until a client connects\&.
 .br 
@@ -1445,7 +1445,7 @@ TCP-LISTEN
 .IP "\fB\f(CWUNIX-SENDTO:<filename>\fP\fP"
 Communicates with the specified peer socket, defined by [<filename>] assuming it is a UNIX domain datagram socket\&.
 It sends packets to and receives packets from that peer socket only\&.
-Please note that it might be neccessary to bind the
+Please note that it might be necessary to bind the
 local socket to an address (e\&.g\&. \f(CW/tmp/sock1\fP, which must not exist
 before)\&.
 This address type works well with \fBsocat\fP UNIX-RECVFROM and UNIX-RECV address
@@ -1540,7 +1540,7 @@ applied to every address type; e\&.g\&.,
 will fail\&. To catch most useless combinations as early as in the open phase,
 the concept of \fIoption groups\fP was introduced\&. Each option belongs to one
 or more option groups\&. Options can be used only with address types that support
-at least one of their option groups (but see option -g)\&.
+at least one of their option groups (but see option \-g)\&.
 .PP 
 Address options have data types that their values must conform to\&. 
 Every address option consists of just a keyword or a keyword followed by
@@ -1603,7 +1603,7 @@ Because all current \fBsocat\fP address
 options may be applied to any address\&. 
 .br 
 Note: Some of these options are also member of another option group, that
-provides an other, non-fd based mechanism\&.
+provides another, non-fd based mechanism\&.
 For these options, it depends on the actual address type and its option groups 
 which mechanism is used\&. The second, non-fd based mechanism is prioritized\&.
 .IP "\fB\f(CWcloexec=<bool>\fP\fP"
@@ -1788,7 +1788,7 @@ terminates the socket even if it is shar
 long as there are still links from other processes\&.
 .br 
 Similarly, when an address of type EXEC or SYSTEM is ended, \fBsocat\fP usually
-will explicitely kill the sub process\&. With this option, it will just close
+will explicitly kill the sub process\&. With this option, it will just close
 the file descriptors\&.
 .IP "\fB\f(CWshut-none\fP\fP"
 Changes the (address dependent) method of shutting down the write part of a
@@ -1812,7 +1812,7 @@ shut-null\&.
 .IP "\fB\f(CWioctl-void=<request>\fP\fP"
 Calls \f(CWioctl()\fP with the request value as second argument and NULL as
 third argument\&. This option allows to utilize ioctls that are not
-explicitely implemented in socat\&.
+explicitly implemented in socat\&.
 .IP "\fB\f(CWioctl-int=<reqeust>:<value>\fP\fP"
 Calls \f(CWioctl()\fP with the request value as second argument and the integer
 value as third argument\&.
@@ -2092,7 +2092,7 @@ Converts the default line termination ch
 Note: \fBsocat\fP simply strips all CR characters\&.
 .IP "\fB\f(CWignoreeof\fP\fP"
 When EOF occurs on this channel, \fBsocat\fP ignores it and tries to read more
-data (like "tail -f") (example)\&.
+data (like "tail \-f") (example)\&.
 .IP "\fB\f(CWreadbytes=<bytes>\fP\fP"
 \fBsocat\fP reads only so many bytes from this address (the address provides
 only so many bytes for transfer and pretends to be at EOF afterwards)\&.
@@ -2626,7 +2626,7 @@ it cannot be applied to a part of a dual
 .IP o 
 the first \fBsocat\fP address cannot be OPENSSL or READLINE
 .IP o 
-\fBsocat\fP options -b, -t, -D, -l, -v, -x become useless
+\fBsocat\fP options \-b, \-t, \-D, \-l, \-v, \-x become useless
 .IP o 
 for both addresses, options ignoreeof, cr, and crnl become useless
 .IP o 
@@ -2693,7 +2693,7 @@ these options apply to the pty by the ch
 Disconnects the terminal\&.
 .IP "\fB\f(CWb19200\fP\fP"
 Sets the serial line speed to 19200 baud\&. Some other rates are possible; use
-something like \f(CWsocat -hh |grep \&' b[1-9]\&'\fP to find all speeds supported by
+something like \f(CWsocat \-hh |grep \&' b[1-9]\&'\fP to find all speeds supported by
 your implementation\&.
 .br 
 Note: On some operating systems, these options may not be
@@ -3207,14 +3207,14 @@ close the relay with ^D or abort it with
 .IP 
 \.LP
 \.nf
-\fBsocat -d -d READLINE,history=$HOME/.http_history \\ 
+\fBsocat \-d \-d READLINE,history=$HOME/.http_history \\
 TCP4:www.domain.org:www,crnl\fP
 \.fi
 .IP 
 this is similar to the previous example, but you can edit the current line in a
 bash like manner (READLINE) and use the
 history file \&.http_history; \fBsocat\fP prints messages about
-progress (-d -d)\&. The  port is specified by service name
+progress (\-d \-d)\&. The  port is specified by service name
 (www), and correct network line termination characters
 (crnl) instead of NL are used\&.
 .IP 
@@ -3229,7 +3229,7 @@ a econd connection\&.
 .IP 
 \.LP
 \.nf
-\fBsocat -d -d -lmlocal2 \\ 
+\fBsocat \-d \-d \-lmlocal2 \\
 TCP4-LISTEN:80,bind=myaddr1,reuseaddr,fork,su=nobody,range=10.0.0.0/8 \\ 
 TCP4:www.domain.org:80,bind=myaddr2\fP
 \.fi
@@ -3246,7 +3246,7 @@ nobody after forking; it only permits co
 (range); due to reuseaddr, it
 allows immediate restart after master process\&'s termination, even if some child
 sockets are not completely shut down\&.
-With -lmlocal2, \fBsocat\fP logs to stderr until successfully
+With \-lmlocal2, \fBsocat\fP logs to stderr until successfully
 reaching the accept loop\&. Further logging is directed to syslog with facility
 local2\&.
 .IP 
@@ -3323,18 +3323,18 @@ session with a given set of addresses an
 
 .IP 
 this is an example for unidirectional data transfer
-(-u)\&. \fBSocat\fP transfers data 
+(\-u)\&. \fBSocat\fP transfers data
 from file /tmp/readdata (implicit address GOPEN), starting
 at its current end (seek-end=0 lets \fBsocat\fP start 
 reading at current end of file; use seek=0 or no
-seek option to first read the existing data) in a "tail -f" like mode
+seek option to first read the existing data) in a "tail \-f" like mode
 (ignoreeof)\&. The "file" 
 might also be a listening UNIX domain socket (do not use a seek option then)\&. 
 .IP 
 \.LP
 \.nf
 \fB(sleep 5; echo PASSWORD; sleep 5; echo ls; sleep 1) | 
-socat - EXEC:'ssh -l user server',pty,setsid,ctty\fP
+socat - EXEC:'ssh \-l user server',pty,setsid,ctty\fP
 \.fi
 .IP 
 EXEC\&'utes an ssh session to server\&. Uses a pty for communication between \fBsocat\fP and
@@ -3344,7 +3344,7 @@ a new process group (setsid), so ssh acc
 .IP 
 \.LP
 \.nf
-\fBsocat -u TCP4-LISTEN:3334,reuseaddr,fork \\ 
+\fBsocat \-u TCP4-LISTEN:3334,reuseaddr,fork \\
 OPEN:/tmp/in.log,creat,append\fP
 \.fi
 .IP 
@@ -3431,7 +3431,7 @@ connection, invokes a shell\&. This shel
 connected to the TCP socket (nofork)\&.  The shell starts filan and lets it print the socket addresses to
 stderr (your terminal window)\&.
 .IP 
-.IP "\fB\f(CWecho -e "\e0\e14\e0\e0\ec" |socat -u - file:/usr/bin/squid\&.exe,seek=0x00074420\fP\fP"
+.IP "\fB\f(CWecho -e \(dq\e0\e14\e0\e0\ec\(dq |socat -u - file:/usr/bin/squid\&.exe,seek=0x00074420\fP\fP"
 
 .IP 
 functions as primitive binary editor: it writes the 4 bytes 000 014 000 000 to
@@ -3459,8 +3459,9 @@ connection)\&.
 sends a broadcast to the network 192\&.168\&.1\&.0/24 and receives the replies of the
 timeservers there\&. Ignores NTP packets from hosts outside this network\&.
 .IP 
-.IP "\fB\f(CWsocat - SOCKET-DATAGRAM:2:2:17:x007bxc0a80100x0000000000000000,bind=x007bx00000000x0000000000000000,setsockopt-int=1:6:1,range=x0000xc0a80100x0000000000000000:x0000xffffff00x0000000000000000\fP\fP"
-
+.ad l
+.IP "\fB\f(CWsocat - SOCKET-DATAGRAM:2:2:17:x007bxc0a80100x0000000000000000,b\%ind=x007bx00000000x0000000000000000,setsockopt-int=1:6:1,r\%ange=x0000xc0a80100x0000000000000000:x0000xffffff00x0000000000000000\fP\fP"
+.na
 .IP 
 is semantically equivalent to the previous
 example, but all parameters are
@@ -3503,9 +3504,10 @@ be able to work on a synchronous line th
 \fBsocat\fP creates a PTY to make pppd happy, binds to the network
 interface \f(CWhdlc0\fP, and can transfer data between
 both devices\&. Use pppd on device \f(CW/var/run/ppp\fP then\&.
-.IP 
-.IP "\fB\f(CWsocat -T 1 -d -d TCP-L:10081,reuseaddr,fork,crlf SYSTEM:"echo -e \e"\e\e\e"HTTP/1\&.0 200 OK\e\e\enDocumentType: text/plain\e\e\en\e\e\endate: \e$\e(date\e)\e\e\enserver:\e$SOCAT_SOCKADDR:\e$SOCAT_SOCKPORT\e\e\enclient: \e$SOCAT_PEERADDR:\e$SOCAT_PEERPORT\e\e\en\e\e\e"\e"; cat; echo -e \e"\e\e\e"\e\e\en\e\e\e"\e""\fP\fP"
-
+.IP
+.ad l
+.IP "\fB\f(CWsocat -T 1 -d -d TCP-L:10081,reuseaddr,fork,crlf SYSTEM:\(dqecho -e \e\(dq\e\e\e\(dqHTTP/1\&.0 200 OK\e\e\enDocumentType: text/plain\e\e\en\e\e\endate: \e$\e(date\e)\e\e\enserver:\e$SOCAT_SOCKADDR:\e$SOCAT_SOCKPORT\e\e\enclient: \e$SOCAT_PEERADDR:\e$SOCAT_PEERPORT\e\e\en\e\e\e\(dq\e\(dq; cat; echo -e \e\(dq\e\e\e\(dq\e\e\en\e\e\e\(dq\e\(dq\(dq \fP\fP"
+.na
 .IP 
 creates a simple HTTP echo server: each HTTP client that connects gets a valid
 HTTP reply that contains information about the client address and port as it is
@@ -3538,7 +3540,7 @@ IPv6\&.
 .PP 
 \fBSocat\fP uses a logging mechanism that allows to filter messages by severity\&. The
 severities provided are more or less compatible to the appropriate syslog
-priority\&. With one or up to four occurrences of the -d command line option, the
+priority\&. With one or up to four occurrences of the \-d command line option, the
 lowest priority of messages that are issued can be selected\&. Each message
 contains a single uppercase character specifying the messages severity (one of
 F, E, W, N, I, or D)
@@ -3547,7 +3549,7 @@ F, E, W, N, I, or D)
 Conditions that require unconditional and immediate program termination\&.
 .IP "ERROR:"
 Conditions that prevent proper program processing\&. Usually the
-program is terminated (see option -s)\&.
+program is terminated (see option \-s)\&.
 .IP "WARNING:"
 Something did not function correctly or is in a state where
 correct further processing cannot be guaranteed, but might be possible\&.
@@ -3583,13 +3585,13 @@ variables are set by \fBsocat\fP for use
 .PP 
 In the output variables beginning with "SOCAT" this prefix is actually replaced
 by the upper case name of the executable or the value of option
--lp\&.
+\-lp\&.
 .PP 
 .IP "\fBSOCAT_DEFAULT_LISTEN_IP\fP (input)"
 (Values 4 or 6) Sets the IP version to
 be used for listen, recv, and recvfrom addresses if no
 pf (protocol-family) option is given\&. Is
-overridden by \fBsocat\fP options -4 or -6\&.
+overridden by \fBsocat\fP options \-4 or \-6\&.
 .IP 
 .IP "\fBSOCAT_PREFERRED_RESOLVE_IP\fP (input)"
 (Values 0, 4, or 6) Sets the IP
@@ -3701,7 +3703,7 @@ where address option ipv6-recvtclass is
 .IP 
 .IP "\fBHOSTNAME\fP (input)"
 Is used to determine the hostname for logging (see
--lh)\&.
+\-lh)\&.
 .IP 
 .IP "\fBLOGNAME\fP (input)"
 Is used as name for the socks client user name if no
@@ -3760,11 +3762,11 @@ over socks\&.
 .PP 
 Address option ftruncate without value uses default 1 instead of 0\&.
 .PP 
-Verbose modes (-x and/or -v) display line termination characters inconsistently
+Verbose modes (\-x and/or \-v) display line termination characters inconsistently
 when address options cr or crnl are used: They show the data \fIafter\fP
 conversion in either direction\&.
 .PP 
-The data transfer blocksize setting (-b) is ignored with address readline\&.
+The data transfer blocksize setting (\-b) is ignored with address readline\&.
 .PP 
 Send bug reports to <socat@dest-unreach\&.org>
 .PP 
