1
0
mirror of https://github.com/UzixLS/picocom.git synced 2025-07-19 07:21:18 +03:00

Imported 1.4 source

This commit is contained in:
Nick Patavalis
2010-05-28 00:17:52 +00:00
commit 464e25056f
18 changed files with 5078 additions and 0 deletions

157
CHANGES Normal file
View File

@ -0,0 +1,157 @@
------------------------------------------------------------------------
r35 | npat | 2004-08-13 14:18:38 +0300 (Fri, 13 Aug 2004) | 3 lines
Changed paths:
M /picocom/trunk/Makefile
picocom version 1.4
------------------------------------------------------------------------
r34 | npat | 2004-08-13 14:15:23 +0300 (Fri, 13 Aug 2004) | 4 lines
Changed paths:
M /picocom/trunk/Makefile
Added the "changes" target that generates the CHANGES file from the
svn (version control) commit logs.
------------------------------------------------------------------------
r33 | npat | 2004-08-13 05:48:26 +0300 (Fri, 13 Aug 2004) | 4 lines
Changed paths:
M /picocom/trunk/Makefile
M /picocom/trunk/picocom.8.xml
Converted the manpage sources to use the xmlmp-1.1 DTD, and hence the
xmlmp tools (see http://npat.efault.net/hacks/xmlmp)
------------------------------------------------------------------------
r28 | npat | 2004-08-12 15:17:54 +0300 (Thu, 12 Aug 2004) | 2 lines
Changed paths:
M /picocom/trunk/TODO
Removed stale tasks from TODO. (Now it's empty).
------------------------------------------------------------------------
r27 | npat | 2004-08-12 15:16:03 +0300 (Thu, 12 Aug 2004) | 5 lines
Changed paths:
M /picocom/trunk/CONTRIBUTORS
M /picocom/trunk/picocom.8.xml
Added Julius P. Malkiewicz in the contributors list
Updated documentation to comply with the changes made since r13
------------------------------------------------------------------------
r26 | npat | 2004-08-12 14:45:11 +0300 (Thu, 12 Aug 2004) | 9 lines
Changed paths:
M /picocom/trunk/Makefile
M /picocom/trunk/picocom.c
Added support for UUCP-style locks. Lock handling is compiled-in if
the macro UUCP_LOCK_DIR is defined; if it is, it must contain the name
of the lock directory. Locking can be disabled at runtime using the
"--no<l>ock" option.
UUCP-locks support is based on a patch submitted by Julius
P. Malkiewicz <julius@sonartech.com.au>
------------------------------------------------------------------------
r25 | npat | 2004-08-12 11:55:56 +0300 (Thu, 12 Aug 2004) | 4 lines
Changed paths:
M /picocom/trunk/picocom.c
Implemented th C-\ command, which generates a break sequence. Patch
submitted by Julius P. Malkiewicz <julius@sonartech.com.au>
------------------------------------------------------------------------
r24 | npat | 2004-08-12 11:52:39 +0300 (Thu, 12 Aug 2004) | 5 lines
Changed paths:
M /picocom/trunk/picocom.c
If two escape-characters are sent in a row, the second is
passed-through, and picocom returns to transparrent mode. Patch
submitteb by Julius P. Malkiewicz <julius@sonartech.com.au>
------------------------------------------------------------------------
r23 | npat | 2004-08-12 11:45:57 +0300 (Thu, 12 Aug 2004) | 7 lines
Changed paths:
M /picocom/trunk/term.c
Fixed "term.c" to compile under FreeBSD (and probably other BSDs
also). "term.c" now includes "termios.h" instead of "termio.h" in
non-linux system. Added a declaration for "tioold"---that was
missing---in the non-linux part of the DTR toggling code. Patch
submitted by Julius P. Malkiewicz <julius@sonartech.com.au>
------------------------------------------------------------------------
r12 | npat | 2004-08-11 19:03:48 +0300 (Wed, 11 Aug 2004) | 2 lines
Changed paths:
M /picocom/trunk/CONTRIBUTORS
M /picocom/trunk/Makefile
M /picocom/trunk/README
A /picocom/trunk/picocom.8.xml
Added r1.3
------------------------------------------------------------------------
r10 | npat | 2004-08-11 19:02:35 +0300 (Wed, 11 Aug 2004) | 3 lines
Changed paths:
A /picocom/trunk/CONTRIBUTORS
M /picocom/trunk/Makefile
A /picocom/trunk/TODO
M /picocom/trunk/picocom.c
Added r1.2
------------------------------------------------------------------------
r8 | npat | 2004-08-11 19:01:25 +0300 (Wed, 11 Aug 2004) | 2 lines
Changed paths:
M /picocom/trunk/Makefile
A /picocom/trunk/NEWS
M /picocom/trunk/README
A /picocom/trunk/pcasc
A /picocom/trunk/pcxm
A /picocom/trunk/pcym
A /picocom/trunk/pczm
M /picocom/trunk/picocom.c
Added r1.1
------------------------------------------------------------------------
r6 | npat | 2004-08-11 18:59:25 +0300 (Wed, 11 Aug 2004) | 2 lines
Changed paths:
A /picocom/trunk/LICENSE.txt
A /picocom/trunk/Makefile
A /picocom/trunk/README
A /picocom/trunk/picocom.c
A /picocom/trunk/term.c
A /picocom/trunk/term.h
Imported r1.0 sources
------------------------------------------------------------------------
r1 | svn | 2004-08-11 08:02:59 +0300 (Wed, 11 Aug 2004) | 2 lines
Changed paths:
A /mu0
A /mu0/branches
A /mu0/tags
A /mu0/trunk
A /picocom
A /picocom/branches
A /picocom/tags
A /picocom/trunk
A /ppgplot
A /ppgplot/branches
A /ppgplot/tags
A /ppgplot/trunk
Imported initial projects directory structure.
------------------------------------------------------------------------

11
CONTRIBUTORS Normal file
View File

@ -0,0 +1,11 @@
The following people contributed suggestions, comments, and fixes:
- Oliver Kurth (oku@debian.org) contributed bug fixes and the manual
page for picocm.
- Julius P. Malkiewicz (julius@sonartech.com.au) contributed FreeBSD
portablity fixes, the C-\ command implementation, the UUCP locks
implementation, and other minor fixes

340
LICENSE.txt Normal file
View File

@ -0,0 +1,340 @@
GNU GENERAL PUBLIC LICENSE
Version 2, June 1991
Copyright (C) 1989, 1991 Free Software Foundation, Inc.
59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
Preamble
The licenses for most software are designed to take away your
freedom to share and change it. By contrast, the GNU General Public
License is intended to guarantee your freedom to share and change free
software--to make sure the software is free for all its users. This
General Public License applies to most of the Free Software
Foundation's software and to any other program whose authors commit to
using it. (Some other Free Software Foundation software is covered by
the GNU Library General Public License instead.) You can apply it to
your programs, too.
When we speak of free software, we are referring to freedom, not
price. Our General Public Licenses are designed to make sure that you
have the freedom to distribute copies of free software (and charge for
this service if you wish), that you receive source code or can get it
if you want it, that you can change the software or use pieces of it
in new free programs; and that you know you can do these things.
To protect your rights, we need to make restrictions that forbid
anyone to deny you these rights or to ask you to surrender the rights.
These restrictions translate to certain responsibilities for you if you
distribute copies of the software, or if you modify it.
For example, if you distribute copies of such a program, whether
gratis or for a fee, you must give the recipients all the rights that
you have. You must make sure that they, too, receive or can get the
source code. And you must show them these terms so they know their
rights.
We protect your rights with two steps: (1) copyright the software, and
(2) offer you this license which gives you legal permission to copy,
distribute and/or modify the software.
Also, for each author's protection and ours, we want to make certain
that everyone understands that there is no warranty for this free
software. If the software is modified by someone else and passed on, we
want its recipients to know that what they have is not the original, so
that any problems introduced by others will not reflect on the original
authors' reputations.
Finally, any free program is threatened constantly by software
patents. We wish to avoid the danger that redistributors of a free
program will individually obtain patent licenses, in effect making the
program proprietary. To prevent this, we have made it clear that any
patent must be licensed for everyone's free use or not licensed at all.
The precise terms and conditions for copying, distribution and
modification follow.
GNU GENERAL PUBLIC LICENSE
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
0. This License applies to any program or other work which contains
a notice placed by the copyright holder saying it may be distributed
under the terms of this General Public License. The "Program", below,
refers to any such program or work, and a "work based on the Program"
means either the Program or any derivative work under copyright law:
that is to say, a work containing the Program or a portion of it,
either verbatim or with modifications and/or translated into another
language. (Hereinafter, translation is included without limitation in
the term "modification".) Each licensee is addressed as "you".
Activities other than copying, distribution and modification are not
covered by this License; they are outside its scope. The act of
running the Program is not restricted, and the output from the Program
is covered only if its contents constitute a work based on the
Program (independent of having been made by running the Program).
Whether that is true depends on what the Program does.
1. You may copy and distribute verbatim copies of the Program's
source code as you receive it, in any medium, provided that you
conspicuously and appropriately publish on each copy an appropriate
copyright notice and disclaimer of warranty; keep intact all the
notices that refer to this License and to the absence of any warranty;
and give any other recipients of the Program a copy of this License
along with the Program.
You may charge a fee for the physical act of transferring a copy, and
you may at your option offer warranty protection in exchange for a fee.
2. You may modify your copy or copies of the Program or any portion
of it, thus forming a work based on the Program, and copy and
distribute such modifications or work under the terms of Section 1
above, provided that you also meet all of these conditions:
a) You must cause the modified files to carry prominent notices
stating that you changed the files and the date of any change.
b) You must cause any work that you distribute or publish, that in
whole or in part contains or is derived from the Program or any
part thereof, to be licensed as a whole at no charge to all third
parties under the terms of this License.
c) If the modified program normally reads commands interactively
when run, you must cause it, when started running for such
interactive use in the most ordinary way, to print or display an
announcement including an appropriate copyright notice and a
notice that there is no warranty (or else, saying that you provide
a warranty) and that users may redistribute the program under
these conditions, and telling the user how to view a copy of this
License. (Exception: if the Program itself is interactive but
does not normally print such an announcement, your work based on
the Program is not required to print an announcement.)
These requirements apply to the modified work as a whole. If
identifiable sections of that work are not derived from the Program,
and can be reasonably considered independent and separate works in
themselves, then this License, and its terms, do not apply to those
sections when you distribute them as separate works. But when you
distribute the same sections as part of a whole which is a work based
on the Program, the distribution of the whole must be on the terms of
this License, whose permissions for other licensees extend to the
entire whole, and thus to each and every part regardless of who wrote it.
Thus, it is not the intent of this section to claim rights or contest
your rights to work written entirely by you; rather, the intent is to
exercise the right to control the distribution of derivative or
collective works based on the Program.
In addition, mere aggregation of another work not based on the Program
with the Program (or with a work based on the Program) on a volume of
a storage or distribution medium does not bring the other work under
the scope of this License.
3. You may copy and distribute the Program (or a work based on it,
under Section 2) in object code or executable form under the terms of
Sections 1 and 2 above provided that you also do one of the following:
a) Accompany it with the complete corresponding machine-readable
source code, which must be distributed under the terms of Sections
1 and 2 above on a medium customarily used for software interchange; or,
b) Accompany it with a written offer, valid for at least three
years, to give any third party, for a charge no more than your
cost of physically performing source distribution, a complete
machine-readable copy of the corresponding source code, to be
distributed under the terms of Sections 1 and 2 above on a medium
customarily used for software interchange; or,
c) Accompany it with the information you received as to the offer
to distribute corresponding source code. (This alternative is
allowed only for noncommercial distribution and only if you
received the program in object code or executable form with such
an offer, in accord with Subsection b above.)
The source code for a work means the preferred form of the work for
making modifications to it. For an executable work, complete source
code means all the source code for all modules it contains, plus any
associated interface definition files, plus the scripts used to
control compilation and installation of the executable. However, as a
special exception, the source code distributed need not include
anything that is normally distributed (in either source or binary
form) with the major components (compiler, kernel, and so on) of the
operating system on which the executable runs, unless that component
itself accompanies the executable.
If distribution of executable or object code is made by offering
access to copy from a designated place, then offering equivalent
access to copy the source code from the same place counts as
distribution of the source code, even though third parties are not
compelled to copy the source along with the object code.
4. You may not copy, modify, sublicense, or distribute the Program
except as expressly provided under this License. Any attempt
otherwise to copy, modify, sublicense or distribute the Program is
void, and will automatically terminate your rights under this License.
However, parties who have received copies, or rights, from you under
this License will not have their licenses terminated so long as such
parties remain in full compliance.
5. You are not required to accept this License, since you have not
signed it. However, nothing else grants you permission to modify or
distribute the Program or its derivative works. These actions are
prohibited by law if you do not accept this License. Therefore, by
modifying or distributing the Program (or any work based on the
Program), you indicate your acceptance of this License to do so, and
all its terms and conditions for copying, distributing or modifying
the Program or works based on it.
6. Each time you redistribute the Program (or any work based on the
Program), the recipient automatically receives a license from the
original licensor to copy, distribute or modify the Program subject to
these terms and conditions. You may not impose any further
restrictions on the recipients' exercise of the rights granted herein.
You are not responsible for enforcing compliance by third parties to
this License.
7. If, as a consequence of a court judgment or allegation of patent
infringement or for any other reason (not limited to patent issues),
conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License. If you cannot
distribute so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you
may not distribute the Program at all. For example, if a patent
license would not permit royalty-free redistribution of the Program by
all those who receive copies directly or indirectly through you, then
the only way you could satisfy both it and this License would be to
refrain entirely from distribution of the Program.
If any portion of this section is held invalid or unenforceable under
any particular circumstance, the balance of the section is intended to
apply and the section as a whole is intended to apply in other
circumstances.
It is not the purpose of this section to induce you to infringe any
patents or other property right claims or to contest validity of any
such claims; this section has the sole purpose of protecting the
integrity of the free software distribution system, which is
implemented by public license practices. Many people have made
generous contributions to the wide range of software distributed
through that system in reliance on consistent application of that
system; it is up to the author/donor to decide if he or she is willing
to distribute software through any other system and a licensee cannot
impose that choice.
This section is intended to make thoroughly clear what is believed to
be a consequence of the rest of this License.
8. If the distribution and/or use of the Program is restricted in
certain countries either by patents or by copyrighted interfaces, the
original copyright holder who places the Program under this License
may add an explicit geographical distribution limitation excluding
those countries, so that distribution is permitted only in or among
countries not thus excluded. In such case, this License incorporates
the limitation as if written in the body of this License.
9. The Free Software Foundation may publish revised and/or new versions
of the General Public License from time to time. Such new versions will
be similar in spirit to the present version, but may differ in detail to
address new problems or concerns.
Each version is given a distinguishing version number. If the Program
specifies a version number of this License which applies to it and "any
later version", you have the option of following the terms and conditions
either of that version or of any later version published by the Free
Software Foundation. If the Program does not specify a version number of
this License, you may choose any version ever published by the Free Software
Foundation.
10. If you wish to incorporate parts of the Program into other free
programs whose distribution conditions are different, write to the author
to ask for permission. For software which is copyrighted by the Free
Software Foundation, write to the Free Software Foundation; we sometimes
make exceptions for this. Our decision will be guided by the two goals
of preserving the free status of all derivatives of our free software and
of promoting the sharing and reuse of software generally.
NO WARRANTY
11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
REPAIR OR CORRECTION.
12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
POSSIBILITY OF SUCH DAMAGES.
END OF TERMS AND CONDITIONS
How to Apply These Terms to Your New Programs
If you develop a new program, and you want it to be of the greatest
possible use to the public, the best way to achieve this is to make it
free software which everyone can redistribute and change under these terms.
To do so, attach the following notices to the program. It is safest
to attach them to the start of each source file to most effectively
convey the exclusion of warranty; and each file should have at least
the "copyright" line and a pointer to where the full notice is found.
<one line to give the program's name and a brief idea of what it does.>
Copyright (C) <year> <name of author>
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
Also add information on how to contact you by electronic and paper mail.
If the program is interactive, make it output a short notice like this
when it starts in an interactive mode:
Gnomovision version 69, Copyright (C) year name of author
Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
This is free software, and you are welcome to redistribute it
under certain conditions; type `show c' for details.
The hypothetical commands `show w' and `show c' should show the appropriate
parts of the General Public License. Of course, the commands you use may
be called something other than `show w' and `show c'; they could even be
mouse-clicks or menu items--whatever suits your program.
You should also get your employer (if you work as a programmer) or your
school, if any, to sign a "copyright disclaimer" for the program, if
necessary. Here is a sample; alter the names:
Yoyodyne, Inc., hereby disclaims all copyright interest in the program
`Gnomovision' (which makes passes at compilers) written by James Hacker.
<signature of Ty Coon>, 1 April 1989
Ty Coon, President of Vice
This General Public License does not permit incorporating your program into
proprietary programs. If your program is a subroutine library, you may
consider it more useful to permit linking proprietary applications with the
library. If this is what you want to do, use the GNU Library General
Public License instead of this License.

44
Makefile Normal file
View File

@ -0,0 +1,44 @@
VERSION=1.4
# CC = gcc
CPPFLAGS=-DVERSION_STR=\"$(VERSION)\" -DUUCP_LOCK_DIR=\"/var/lock\"
CFLAGS = -Wall -g
# LD = gcc
LDFLAGS = -g
LDLIBS =
picocom : picocom.o term.o
# $(LD) $(LDFLAGS) -o $@ $+ $(LDLIBS)
picocom.o : picocom.c term.h
term.o : term.c term.h
doc : picocom.8 picocom.8.html picocom.8.ps
changes :
svn log -v . > CHANGES
picocom.8 : picocom.8.xml
xmlmp2man < $< > $@
picocom.8.html : picocom.8.xml
xmlmp2html < $< > $@
picocom.8.ps : picocom.8
groff -mandoc -Tps $< > $@
clean:
rm -f picocom.o term.o
rm -f *~
rm -f \#*\#
distclean: clean
rm -f picocom
realclean: distclean
rm -f picocom.8
rm -f picocom.8.html
rm -f picocom.8.ps
rm -f CHANGES

24
NEWS Normal file
View File

@ -0,0 +1,24 @@
version 1.1
- Added example shell-scripts that start picocom preconfigured for
ASCII, Z-MODEM, Y-MODEM, and X-MODEM file transfers.
- Better signal handling.
- Added the "send" and "receive" commands. They can be used to
transmit and receive files via external programs that implement
the respective protocols (like the programs "sz", "rz", etc).
- Added the "status" command, which shows the currently active
program options, like the current baud rate, the current
flow-control settings, etc. Only options that can be controlled
online are shown.
- Slight code restructuring.
- Minor bug fixes.
version 1.0
- Initial release.

37
README Normal file
View File

@ -0,0 +1,37 @@
picocom
by Nick Patavalis (npat@efault.net)
As its name suggests, [picocom] is a minimal dumb-terminal emulation
program. It is, in principle, very much like minicom, only it's "pico"
instead of "mini"! It was designed to serve as a simple, manual, modem
configuration, testing, and debugging tool. It has also served (quite
well) as a low-tech "terminal-window" to allow operator intervention
in PPP connection scripts (something like the ms-windows "open
terminal window before / after dialing" feature). It could also prove
useful in many other similar tasks. It is ideal for embedded systems
since its memory footprint is minimal (less than 20K, when
stripped). Apart from being a handy little tool, [picocom] source
distribution includes a simple, easy to use, and thoroughly documented
terminal-management library, which could serve other projects as
well. This library hides the termios(3) calls, and provides a less
complex and safer (though certainly less feature-rich)
interface. [picocom] runs on Linux, and with minor modifications it
could run on any Unix system with the termios(3) library.
For a description of picocom's operation, its command line options,
and usage examples, see the manual page included in the source
distribution as "picocom.8", and also html-ized as "picocom.8.html".
People who have contibuted to picocom, by offering feature
implementations, bug-fixes, corrections, and suggestions are listed in
the "CONTRIBUTORS" file.
The latest version of "picocom" can be downloaded from:
http://efault.net/npat/hacks/picocom/
Please feel free to send comments, requests for new features (no
promisses, though!), bug-fixes and rants, to the author's email
address shown at the top of this file.

1
TODO Normal file
View File

@ -0,0 +1 @@

4
pcasc Normal file
View File

@ -0,0 +1,4 @@
#!/bin/sh
exec ./picocom \
--send-cmd="ascii-xfr -sv -l5" \
--receive-cmd="ascii-xfr -rv" "$@"

4
pcxm Normal file
View File

@ -0,0 +1,4 @@
#!/bin/sh
exec picocom \
--send-cmd="sx -vv" \
--receive-cmd="rx -vv" "$@"

4
pcym Normal file
View File

@ -0,0 +1,4 @@
#!/bin/sh
exec picocom \
--send-cmd="sb -vv" \
--receive-cmd="rb -vvv" "$@"

4
pczm Normal file
View File

@ -0,0 +1,4 @@
#!/bin/sh
exec picocom \
--send-cmd="sz -vv -b" \
--receive-cmd="rz -vvv -b" "$@"

214
picocom.8 Normal file
View File

@ -0,0 +1,214 @@
.TH "picocom" "8" "" "" ""
.SH NAME
picocom \- minimal dumb-terminal emulation program
.SH SYNOPSIS
.B picocom [
.I options
.B ]
.I device
.br
.SH DESCRIPTION
As its name suggests,
.B picocom
is a minimal dumb-terminal emulation program. It is, in principle, very much like
.B minicom(1)
, only it's "pico" instead of "mini"! It was designed to serve as a simple, manual, modem configuration, testing, and debugging tool. It has also served (quite well) as a low-tech "terminal-window" to allow operator intervention in PPP connection scripts (something like the ms-windows "open terminal window before / after dialing" feature). It could also prove useful in many other similar tasks.
.br
.sp 0.6v
When
.B picocom
starts it opens the terminal (serial device) given as its non-option argument. Unless the
.I --noinit
option is given, it configures the device to the settings specified by the option-arguments (or to some default settings), and sets it to "raw" mode. If
.I --noinit
is given, the initialization and configuration is skipped; the device is just opened. Following this,
.B picocom
sets the standard-input and standard-output to raw mode. Having done so, it goes in a loop where it listens for input from stdin, or from the serial port. Input from the serial port is copied to the standard output while input from the standard input is copied to the serial port.
.B picocom
also scans its input stream for a user-specified control character, called the "escape character" (being by default "C-a"). If the escape character is seen, then instead of sending it to the serial-device, the program enters "command mode" and waits for the next character (which is called the "function character"). Depending on the value of the function character,
.B picocom
performs one of the operations described in the "Commands" section below.
.br
.sp 0.6v
.SH COMMANDS
Commands are given to
.B picocom
by first keying the "espace character" which by default is "C-a" (see "Options" below on how to change it), and then keying one for the function (command) characters shown here.
.TP 3
.B [escape character]
Send the escape character to the serial port and return to "transparent" mode. This means that if the escape character ("C-a", by default) is typed twice, the program sends the escape character to the serial port, and remains in transparent mode. This is a new behavior implemented in v1.4. Previously picocom used to ignore the escape-character when it was entered as a function character.
.TP 3
.B C-x
Exit the program: if the "--noreset" option was not given then the serial port is reset to its original settings before exiting; if it was given the serial port is not reset.
.TP 3
.B C-q
Quit the program *without* reseting the serial port, regardless of the "--noreset" option.
.TP 3
.B C-p
Pulse the DTR line. Lower it for 1 sec, and then raise it again.
.TP 3
.B C-t
Toggle the DTR line. If DTR is up, then lower it. If it is down, then raise it.
.TP 3
.B C-\e
Generate a break sequence on the serial line. A break sequence is usually generated by marking (driving to logical one) the serial Tx line for an amount of time coresponding to several character durations.
.TP 3
.B C-u
Baud up. Increase the baud-rate. The list of baud-rates stepped-through by this command is: 300, 600, 1200, 2400, 4800, 9600, 19200, 38400, 57600, 115200.
.TP 3
.B C-d
Baud down. Decrease the baud-rate. The list of baud-rates stepped-through by this command is the same as for the "baud-up" command.
.TP 3
.B C-f
Cycle through flow-control settings (RTS/CTS, XON/XOFF, none).
.TP 3
.B C-y
Cycle through parity settings (even, odd, none).
.TP 3
.B C-b
Cycle through databits-number settings (5, 6, 7, 8).
.TP 3
.B C-v
Show program options (like baud rate, data bits, etc). Only the options that can be modified online (through commands) are shown, not those that can only be set at the command-line.
.TP 3
.B C-s
Send (upload) a file (see "Sending and Receiving Files" below)
.TP 3
.B C-r
Receive (download) a file (see "Sending and Receiving Files" below)
.PP
After performing one of the above operations the program leaves the command mode and enters transparent mode. Example: To increase the baud-rate by two steps, you have to type:
.br
.sp 0.6v
C-a, C-u, C-a, C-u
.br
.sp 0.6v
assuming of-course that "C-a" is the escape character.
.br
.sp 0.6v
.SH SENDING AND RECEIVING FILES
.B picocom
can send and receive files over the serial port using external programs that implement the respective protocols. In Linux typical programs for this purpose are:
.IP \(em 3
.B rx(1)
- receive using the X-MODEM protocol
.IP \(em 3
.B rb(1)
- receive using the Y-MODEM protocol
.IP \(em 3
.B rz(1)
- receive using the Z-MODEM protocol
.IP \(em 3
.B sx(1)
- send using the X-MODEM protocol
.IP \(em 3
.B sb(1)
- send using the Y-MODEM protocol
.IP \(em 3
.B sz(1)
- send using the Z-MODEM protocol
.IP \(em 3
.B ascii-xfr(1)
- receive or transmit ASCII files
.PP
The name of, and the command-line options to, the program to be used for transmitting files are given by the "--send-cmd" option. Similarly the program to receive files, and its argumets, are given by the "--receive-cmd" option. For example, in order to start a
.B picocom
session that uses "sz" to transmit files, and "rz" to receive, you have to say something like this:
.br
.sp 0.6v
picocom --send-cmd "sz -vv" --receive-cmd "rz -vv"
.br
.sp 0.6v
During the picocom session, if you key the "send" or "receive" commands (e.g. by pressing C-a, C-s, or C-a, C-r) you will be prompted for a filename. At this prompt you can enter one or more file-names, and any additional arguments to the transmission or reception program. After that, picocom will start the the external program as specified by the "--send-cmd", or "--receive-cmd" option, and with any filenames and additional arguments you may have supplied. The standard input and output of the external program will be connected to the serial port. The standard error of the external program will be connected to the terminal which---while the program is running---will revert to canonical mode. Pressing 'C-c' while the external program is running will prematurely terminate it, and return control to
.B picocom
. Pressing 'C-c' at any other time, has no special effect; the character is normally passed to the serial port.
.br
.sp 0.6v
.SH OPTIONS
.B picocom
accepts the following command-line options
.TP 3
.B --baud | -b
Defines the baud-rate to set the serial-port (terminal) to.
.TP 3
.B --flow | -f
Defines the flow-control mode to set the serial-port to. Must be one of:
.RS 3
.IP \(em 3
\'x' for xon/xoff (software) mode
.IP \(em 3
\'h' for hardware flow control (RTS/CTS)
.IP \(em 3
\'n' for no flow control
.PP
(Default: 'n')
.RE
.TP 3
.B --parity | -p
Defines the parity mode to set the serial-port to. Must be one of:
.RS 3
.IP \(em 3
\'o' for odd parity mode.
.IP \(em 3
\'e' for even parity mode.
.IP \(em 3
\'n' for no parity, mode.
.PP
(Default: 'n')
.RE
.TP 3
.B --databits | -d
Defines the number of data bits in every character. Must be one of: 5, 6, 7, 8
.br
.sp 0.6v
(Default: 8)
.TP 3
.B --esacpe | -e
Defines the character that will make picocom enter command-mode (see description above). If 'x' is given, then C-x will make picocom enter command mode.
.br
.sp 0.6v
(Default: 'a')
.TP 3
.B --noinit | -i
If given,
.B picocom
will not initialize, reset, or otherwise meddle with the serial port at start-up. It will just open it. This is useful, for example, for connecting
.B picocom
to already-connected modems, or already configured ports without terminating the connection, or altering the settings. If required serial port parameters can then be adjusted at run-time by commands.
.TP 3
.B --noreset | -r
If given,
.B picocom
will not *reset* the serial port when exiting. It will just close the filedes and do nothing more. This is useful, for example, for leaving modems connected when exiting
.B picocom
. Regardless whether the "--noreset" option is given the user can exit
.B picocom
using the "Quit" command (instead of "Exit"), which never resets the serial port. If "--noreset" is given then "Quit" and "Exit" behave essentially the same.
.TP 3
.B --nolock | -l
If given,
.B picocom
will *not* attempt to lock the serial port before opening it. Normally picocom attempts to get a UUCP-style lock-file (e.g. "/var/lock/LCK..ttyS0") before opening the port. Failing to do so, results in the program exiting after emitting an error-message. It is possible that your picocom binary is compiled without this option.
.TP 3
.B --send-cmd | -s
Specifies the external program (and any arguments to it) that will be used for transmitting files.
.br
.sp 0.6v
Default: "sz -vv"
.TP 3
.B --receive-cmd | -v
Specifies the external program (and any arguments to it) that will be used for receiving files.
.br
.sp 0.6v
(Default: "rz -vv")
.TP 3
.B --help | -h
Print a short help message describing the command-line options.
.PP
.SH AUTHOR
picocom was written by Nick Patavalis (npat@efault.net)
.br
.sp 0.6v
.SH AVAILABILITY
The latest version of "picocom" can be downloaded from:
.B http://efault.net/npat/hacks/picocom/

495
picocom.8.html Normal file
View File

@ -0,0 +1,495 @@
<html>
<head>
<title>picocom(8)</title>
</head>
<body>
<center><table width="100%"><tr>
<td align="left">picocom(8)</td>
<td align="center"></td>
<td align="right">picocom(8)</td>
</tr></table></center>
<h2>NAME</h2>
<center><table width="90%"><tr><td>
picocom -- minimal dumb-terminal emulation program
</td></tr></table></center>
<h2>SYNOPSIS</h2>
<center><table width="90%"><tr><td>
<ul>
<li><b>
picocom [ <i>options</i> ] <i>device</i>
</b></li>
</ul>
</td></tr></table></center>
<h2>DESCRIPTION</h2>
<center><table width="90%"><tr><td>
<p>
As its name suggests, <b>picocom</b> is a minimal dumb-terminal
emulation program. It is, in principle, very much like
<a href=""><b>minicom</b>(1)</a>, only it's "pico" instead of
"mini"! It was designed to serve as a simple, manual, modem
configuration, testing, and debugging tool. It has also served
(quite well) as a low-tech "terminal-window" to allow operator
intervention in PPP connection scripts (something like the
ms-windows "open terminal window before / after dialing" feature).
It could also prove useful in many other similar tasks.
</p>
<p>
When <b>picocom</b> starts it opens the terminal (serial device)
given as its non-option argument. Unless the <i>--noinit</i>
option is given, it configures the device to the settings
specified by the option-arguments (or to some default settings),
and sets it to "raw" mode. If <i>--noinit</i> is given, the
initialization and configuration is skipped; the device is just
opened. Following this, <b>picocom</b> sets the standard-input and
standard-output to raw mode. Having done so, it goes in a loop
where it listens for input from stdin, or from the serial port.
Input from the serial port is copied to the standard output while
input from the standard input is copied to the serial port. <b>picocom</b>
also scans its input stream for a user-specified control
character, called the "escape character" (being by default "C-a").
If the escape character is seen, then instead of sending it to the
serial-device, the program enters "command mode" and waits for the
next character (which is called the "function character").
Depending on the value of the function character, <b>picocom</b>
performs one of the operations described in the "Commands" section
below.
</p>
</td></tr></table></center>
<h2>COMMANDS</h2>
<center><table width="90%"><tr><td>
<p>
Commands are given to <b>picocom</b> by first keying the "espace
character" which by default is "C-a" (see "Options" below on how
to change it), and then keying one for the function (command)
characters shown here.
</p>
<dl>
<dt><b>
[escape character]
</b></dt>
<dd>
<p>
Send the escape character to the serial port and return to
"transparent" mode. This means that if the escape character
("C-a", by default) is typed twice, the program sends the
escape character to the serial port, and remains in
transparent mode. This is a new behavior implemented in v1.4.
Previously picocom used to ignore the escape-character when it
was entered as a function character.
</p>
</dd>
<dt><b>
C-x
</b></dt>
<dd>
<p>
Exit the program: if the "--noreset" option was not given then
the serial port is reset to its original settings before
exiting; if it was given the serial port is not reset.
</p>
</dd>
<dt><b>
C-q
</b></dt>
<dd>
<p>
Quit the program *without* reseting the serial port,
regardless of the "--noreset" option.
</p>
</dd>
<dt><b>
C-p
</b></dt>
<dd>
<p>
Pulse the DTR line. Lower it for 1 sec, and then raise it
again.
</p>
</dd>
<dt><b>
C-t
</b></dt>
<dd>
<p>
Toggle the DTR line. If DTR is up, then lower it. If it is
down, then raise it.
</p>
</dd>
<dt><b>
C-\e
</b></dt>
<dd>
<p>
Generate a break sequence on the serial line. A break sequence
is usually generated by marking (driving to logical one) the
serial Tx line for an amount of time coresponding to several
character durations.
</p>
</dd>
<dt><b>
C-u
</b></dt>
<dd>
<p>
Baud up. Increase the baud-rate. The list of baud-rates
stepped-through by this command is: 300, 600, 1200, 2400,
4800, 9600, 19200, 38400, 57600, 115200.
</p>
</dd>
<dt><b>
C-d
</b></dt>
<dd>
<p>
Baud down. Decrease the baud-rate. The list of baud-rates
stepped-through by this command is the same as for the
"baud-up" command.
</p>
</dd>
<dt><b>
C-f
</b></dt>
<dd>
<p>
Cycle through flow-control settings (RTS/CTS, XON/XOFF, none).
</p>
</dd>
<dt><b>
C-y
</b></dt>
<dd>
<p>
Cycle through parity settings (even, odd, none).
</p>
</dd>
<dt><b>
C-b
</b></dt>
<dd>
<p>
Cycle through databits-number settings (5, 6, 7, 8).
</p>
</dd>
<dt><b>
C-v
</b></dt>
<dd>
<p>
Show program options (like baud rate, data bits, etc). Only
the options that can be modified online (through commands) are
shown, not those that can only be set at the command-line.
</p>
</dd>
<dt><b>
C-s
</b></dt>
<dd>
<p>
Send (upload) a file (see "Sending and Receiving Files" below)
</p>
</dd>
<dt><b>
C-r
</b></dt>
<dd>
<p>
Receive (download) a file (see "Sending and Receiving Files"
below)
</p>
</dd>
</dl>
<p>
After performing one of the above operations the program leaves
the command mode and enters transparent mode. Example: To increase
the baud-rate by two steps, you have to type:
</p>
<p>
C-a, C-u, C-a, C-u
</p>
<p>
assuming of-course that "C-a" is the escape character.
</p>
</td></tr></table></center>
<h2>SENDING AND RECEIVING FILES</h2>
<center><table width="90%"><tr><td>
<p>
<b>picocom</b> can send and receive files over the serial port
using external programs that implement the respective protocols.
In Linux typical programs for this purpose are:
</p>
<ul>
<li>
<p>
<a href=""><b>rx</b>(1)</a> - receive using the X-MODEM
protocol
</p>
</li>
<li>
<p>
<a href=""><b>rb</b>(1)</a> - receive using the Y-MODEM
protocol
</p>
</li>
<li>
<p>
<a href=""><b>rz</b>(1)</a> - receive using the Z-MODEM
protocol
</p>
</li>
<li>
<p>
<a href=""><b>sx</b>(1)</a> - send using the X-MODEM protocol
</p>
</li>
<li>
<p>
<a href=""><b>sb</b>(1)</a> - send using the Y-MODEM protocol
</p>
</li>
<li>
<p>
<a href=""><b>sz</b>(1)</a> - send using the Z-MODEM protocol
</p>
</li>
<li>
<p>
<a href=""><b>ascii-xfr</b>(1)</a> - receive or transmit ASCII
files
</p>
</li>
</ul>
<p>
The name of, and the command-line options to, the program to be
used for transmitting files are given by the "--send-cmd" option.
Similarly the program to receive files, and its argumets, are
given by the "--receive-cmd" option. For example, in order to
start a <b>picocom</b> session that uses "sz" to transmit files,
and "rz" to receive, you have to say something like this:
</p>
<p>
picocom --send-cmd "sz -vv" --receive-cmd "rz -vv"
</p>
<p>
During the picocom session, if you key the "send" or "receive"
commands (e.g. by pressing C-a, C-s, or C-a, C-r) you will be
prompted for a filename. At this prompt you can enter one or more
file-names, and any additional arguments to the transmission or
reception program. After that, picocom will start the the external
program as specified by the "--send-cmd", or "--receive-cmd"
option, and with any filenames and additional arguments you may
have supplied. The standard input and output of the external
program will be connected to the serial port. The standard error
of the external program will be connected to the terminal
which---while the program is running---will revert to canonical
mode. Pressing 'C-c' while the external program is running will
prematurely terminate it, and return control to <b>picocom</b>.
Pressing 'C-c' at any other time, has no special effect; the
character is normally passed to the serial port.
</p>
</td></tr></table></center>
<h2>OPTIONS</h2>
<center><table width="90%"><tr><td>
<p>
<b>picocom</b> accepts the following command-line options
</p>
<dl>
<dt><b>
--baud | -b
</b></dt>
<dd>
<p>
Defines the baud-rate to set the serial-port (terminal) to.
</p>
</dd>
<dt><b>
--flow | -f
</b></dt>
<dd>
<p>
Defines the flow-control mode to set the serial-port to. Must
be one of:
</p>
<ul>
<li>
<p>
\'x' for xon/xoff (software) mode
</p>
</li>
<li>
<p>
\'h' for hardware flow control (RTS/CTS)
</p>
</li>
<li>
<p>
\'n' for no flow control
</p>
</li>
</ul>
<p>
(Default: 'n')
</p>
</dd>
<dt><b>
--parity | -p
</b></dt>
<dd>
<p>
Defines the parity mode to set the serial-port to. Must be one
of:
</p>
<ul>
<li>
<p>
\'o' for odd parity mode.
</p>
</li>
<li>
<p>
\'e' for even parity mode.
</p>
</li>
<li>
<p>
\'n' for no parity, mode.
</p>
</li>
</ul>
<p>
(Default: 'n')
</p>
</dd>
<dt><b>
--databits | -d
</b></dt>
<dd>
<p>
Defines the number of data bits in every character. Must be
one of: 5, 6, 7, 8
</p>
<p>
(Default: 8)
</p>
</dd>
<dt><b>
--esacpe | -e
</b></dt>
<dd>
<p>
Defines the character that will make picocom enter
command-mode (see description above). If 'x' is given, then
C-x will make picocom enter command mode.
</p>
<p>
(Default: 'a')
</p>
</dd>
<dt><b>
--noinit | -i
</b></dt>
<dd>
<p>
If given, <b>picocom</b> will not initialize, reset, or
otherwise meddle with the serial port at start-up. It will
just open it. This is useful, for example, for connecting <b>picocom</b>
to already-connected modems, or already configured ports
without terminating the connection, or altering the settings.
If required serial port parameters can then be adjusted at
run-time by commands.
</p>
</dd>
<dt><b>
--noreset | -r
</b></dt>
<dd>
<p>
If given, <b>picocom</b> will not *reset* the serial port when
exiting. It will just close the filedes and do nothing more.
This is useful, for example, for leaving modems connected when
exiting <b>picocom</b>. Regardless whether the "--noreset"
option is given the user can exit <b>picocom</b> using the
"Quit" command (instead of "Exit"), which never resets the
serial port. If "--noreset" is given then "Quit" and "Exit"
behave essentially the same.
</p>
</dd>
<dt><b>
--nolock | -l
</b></dt>
<dd>
<p>
If given, <b>picocom</b> will *not* attempt to lock the serial
port before opening it. Normally picocom attempts to get a
UUCP-style lock-file (e.g. "/var/lock/LCK..ttyS0") before
opening the port. Failing to do so, results in the program
exiting after emitting an error-message. It is possible that
your picocom binary is compiled without this option.
</p>
</dd>
<dt><b>
--send-cmd | -s
</b></dt>
<dd>
<p>
Specifies the external program (and any arguments to it) that
will be used for transmitting files.
</p>
<p>
Default: "sz -vv"
</p>
</dd>
<dt><b>
--receive-cmd | -v
</b></dt>
<dd>
<p>
Specifies the external program (and any arguments to it) that
will be used for receiving files.
</p>
<p>
(Default: "rz -vv")
</p>
</dd>
<dt><b>
--help | -h
</b></dt>
<dd>
<p>
Print a short help message describing the command-line
options.
</p>
</dd>
</dl>
</td></tr></table></center>
<h2>AUTHOR</h2>
<center><table width="90%"><tr><td>
<p>
picocom was written by Nick Patavalis (npat@efault.net)
</p>
</td></tr></table></center>
<h2>AVAILABILITY</h2>
<center><table width="90%"><tr><td>
<p>
The latest version of "picocom" can be downloaded from:
<a href="http://efault.net/npat/hacks/picocom/">http://efault.net/npat/hacks/picocom/</a>
</p>
</td></tr></table></center>
<center><table width="100%"><tr>
<td align="left"></td>
<td align="center"></td>
<td align="right">picocom(8)</td>
</tr></table></center>
</body>
</html>

578
picocom.8.ps Normal file
View File

@ -0,0 +1,578 @@
%!PS-Adobe-3.0
%%Creator: groff version 1.18.1
%%CreationDate: Fri Aug 13 14:26:12 2004
%%DocumentNeededResources: font Times-Roman
%%+ font Times-Bold
%%+ font Times-Italic
%%DocumentSuppliedResources: procset grops 1.18 1
%%Pages: 4
%%PageOrder: Ascend
%%Orientation: Portrait
%%EndComments
%%BeginProlog
%%BeginResource: procset grops 1.18 1
/setpacking where{
pop
currentpacking
true setpacking
}if
/grops 120 dict dup begin
/SC 32 def
/A/show load def
/B{0 SC 3 -1 roll widthshow}bind def
/C{0 exch ashow}bind def
/D{0 exch 0 SC 5 2 roll awidthshow}bind def
/E{0 rmoveto show}bind def
/F{0 rmoveto 0 SC 3 -1 roll widthshow}bind def
/G{0 rmoveto 0 exch ashow}bind def
/H{0 rmoveto 0 exch 0 SC 5 2 roll awidthshow}bind def
/I{0 exch rmoveto show}bind def
/J{0 exch rmoveto 0 SC 3 -1 roll widthshow}bind def
/K{0 exch rmoveto 0 exch ashow}bind def
/L{0 exch rmoveto 0 exch 0 SC 5 2 roll awidthshow}bind def
/M{rmoveto show}bind def
/N{rmoveto 0 SC 3 -1 roll widthshow}bind def
/O{rmoveto 0 exch ashow}bind def
/P{rmoveto 0 exch 0 SC 5 2 roll awidthshow}bind def
/Q{moveto show}bind def
/R{moveto 0 SC 3 -1 roll widthshow}bind def
/S{moveto 0 exch ashow}bind def
/T{moveto 0 exch 0 SC 5 2 roll awidthshow}bind def
/SF{
findfont exch
[exch dup 0 exch 0 exch neg 0 0]makefont
dup setfont
[exch/setfont cvx]cvx bind def
}bind def
/MF{
findfont
[5 2 roll
0 3 1 roll
neg 0 0]makefont
dup setfont
[exch/setfont cvx]cvx bind def
}bind def
/level0 0 def
/RES 0 def
/PL 0 def
/LS 0 def
/MANUAL{
statusdict begin/manualfeed true store end
}bind def
/PLG{
gsave newpath clippath pathbbox grestore
exch pop add exch pop
}bind def
/BP{
/level0 save def
1 setlinecap
1 setlinejoin
72 RES div dup scale
LS{
90 rotate
}{
0 PL translate
}ifelse
1 -1 scale
}bind def
/EP{
level0 restore
showpage
}bind def
/DA{
newpath arcn stroke
}bind def
/SN{
transform
.25 sub exch .25 sub exch
round .25 add exch round .25 add exch
itransform
}bind def
/DL{
SN
moveto
SN
lineto stroke
}bind def
/DC{
newpath 0 360 arc closepath
}bind def
/TM matrix def
/DE{
TM currentmatrix pop
translate scale newpath 0 0 .5 0 360 arc closepath
TM setmatrix
}bind def
/RC/rcurveto load def
/RL/rlineto load def
/ST/stroke load def
/MT/moveto load def
/CL/closepath load def
/Fr{
setrgbcolor fill
}bind def
/Fk{
setcmykcolor fill
}bind def
/Fg{
setgray fill
}bind def
/FL/fill load def
/LW/setlinewidth load def
/Cr/setrgbcolor load def
/Ck/setcmykcolor load def
/Cg/setgray load def
/RE{
findfont
dup maxlength 1 index/FontName known not{1 add}if dict begin
{
1 index/FID ne{def}{pop pop}ifelse
}forall
/Encoding exch def
dup/FontName exch def
currentdict end definefont pop
}bind def
/DEFS 0 def
/EBEGIN{
moveto
DEFS begin
}bind def
/EEND/end load def
/CNT 0 def
/level1 0 def
/PBEGIN{
/level1 save def
translate
div 3 1 roll div exch scale
neg exch neg exch translate
0 setgray
0 setlinecap
1 setlinewidth
0 setlinejoin
10 setmiterlimit
[]0 setdash
/setstrokeadjust where{
pop
false setstrokeadjust
}if
/setoverprint where{
pop
false setoverprint
}if
newpath
/CNT countdictstack def
userdict begin
/showpage{}def
}bind def
/PEND{
clear
countdictstack CNT sub{end}repeat
level1 restore
}bind def
end def
/setpacking where{
pop
setpacking
}if
%%EndResource
%%IncludeResource: font Times-Roman
%%IncludeResource: font Times-Bold
%%IncludeResource: font Times-Italic
grops begin/DEFS 1 dict def DEFS begin/u{.001 mul}bind def end/RES 72
def/PL 841.89 def/LS false def/ENC0[/asciicircum/asciitilde/Scaron
/Zcaron/scaron/zcaron/Ydieresis/trademark/quotesingle/Euro/.notdef
/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef
/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef
/.notdef/.notdef/.notdef/space/exclam/quotedbl/numbersign/dollar/percent
/ampersand/quoteright/parenleft/parenright/asterisk/plus/comma/hyphen
/period/slash/zero/one/two/three/four/five/six/seven/eight/nine/colon
/semicolon/less/equal/greater/question/at/A/B/C/D/E/F/G/H/I/J/K/L/M/N/O
/P/Q/R/S/T/U/V/W/X/Y/Z/bracketleft/backslash/bracketright/circumflex
/underscore/quoteleft/a/b/c/d/e/f/g/h/i/j/k/l/m/n/o/p/q/r/s/t/u/v/w/x/y
/z/braceleft/bar/braceright/tilde/.notdef/quotesinglbase/guillemotleft
/guillemotright/bullet/florin/fraction/perthousand/dagger/daggerdbl
/endash/emdash/ff/fi/fl/ffi/ffl/dotlessi/dotlessj/grave/hungarumlaut
/dotaccent/breve/caron/ring/ogonek/quotedblleft/quotedblright/oe/lslash
/quotedblbase/OE/Lslash/.notdef/exclamdown/cent/sterling/currency/yen
/brokenbar/section/dieresis/copyright/ordfeminine/guilsinglleft
/logicalnot/minus/registered/macron/degree/plusminus/twosuperior
/threesuperior/acute/mu/paragraph/periodcentered/cedilla/onesuperior
/ordmasculine/guilsinglright/onequarter/onehalf/threequarters
/questiondown/Agrave/Aacute/Acircumflex/Atilde/Adieresis/Aring/AE
/Ccedilla/Egrave/Eacute/Ecircumflex/Edieresis/Igrave/Iacute/Icircumflex
/Idieresis/Eth/Ntilde/Ograve/Oacute/Ocircumflex/Otilde/Odieresis
/multiply/Oslash/Ugrave/Uacute/Ucircumflex/Udieresis/Yacute/Thorn
/germandbls/agrave/aacute/acircumflex/atilde/adieresis/aring/ae/ccedilla
/egrave/eacute/ecircumflex/edieresis/igrave/iacute/icircumflex/idieresis
/eth/ntilde/ograve/oacute/ocircumflex/otilde/odieresis/divide/oslash
/ugrave/uacute/ucircumflex/udieresis/yacute/thorn/ydieresis]def
/Times-Italic@0 ENC0/Times-Italic RE/Times-Bold@0 ENC0/Times-Bold RE
/Times-Roman@0 ENC0/Times-Roman RE
%%EndProlog
%%Page: 1 1
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@0 SF 373.3
<7069636f636f6d283829207069636f636f6d283829>72 48 R/F1 10.95
/Times-Bold@0 SF -.219<4e41>72 84 S<4d45>.219 E F0<7069636f636f6d20ad20
6d696e696d616c2064756d622d7465726d696e616c20656d756c6174696f6e2070726f67
72616d>108 96 Q F1<53594e4f50534953>72 112.8 Q/F2 10/Times-Bold@0 SF
<7069636f636f6d205b>108 124.8 Q/F3 10/Times-Italic@0 SF<6f7074696f6e73>
2.73 E F2<5d>2.77 E F3<6465>2.85 E<76696365>-.15 E F1
<4445534352495054494f4e>72 141.6 Q F0 1.423
<417320697473206e616d652073756767657374732c>108 153.6 R F2
<7069636f636f6d>3.923 E F0 1.423<69732061206d696e696d616c2064756d622d74
65726d696e616c20656d756c6174696f6e2070726f6772616d2e2049742069732c20696e
207072696e6369706c652c2076>3.923 F<657279>-.15 E .938<6d756368206c696b>
108 165.6 R<65>-.1 E F2<6d696e69636f6d283129>3.438 E F0 3.439<2c6f>3.439
G .939<6e6c7920697427>-3.439 F 3.439<7322>-.55 G .939
<7069636f2220696e7374656164206f6620226d696e6922212049742077>-3.439 F
.939<61732064657369676e656420746f2073657276>-.1 F 3.439<6561>-.15 G
3.439<736173>-3.439 G .939<696d706c652c206d616e75616c2c>-3.439 F .757<6d
6f64656d20636f6e8c6775726174696f6e2c2074657374696e672c20616e6420646562>
108 177.6 R .757
<756767696e6720746f6f6c2e2049742068617320616c736f2073657276>-.2 F .756
<6564202871756974652077656c6c292061732061206c6f>-.15 F .756
<772d7465636820227465726d696e616c2d>-.25 F<77696e646f>108 189.6 Q .865
<772220746f20616c6c6f>-.25 F 3.365<776f>-.25 G .865
<70657261746f7220696e74657276>-3.365 F .865<656e74696f6e20696e2050505020
636f6e6e656374696f6e20736372697074732028736f6d657468696e67206c696b>-.15
F 3.366<6574>-.1 G .866<6865206d732d77696e646f>-3.366 F .866
<777320226f70656e>-.25 F<7465726d696e616c2077696e646f>108 201.6 Q 2.5
<7762>-.25 G<65666f7265202f206166746572206469616c696e672220666561747572
65292e20497420636f756c6420616c736f2070726f>-2.5 E .3 -.15<76652075>-.15
H<736566756c20696e206d616e>.15 E 2.5<796f>-.15 G
<746865722073696d696c6172207461736b732e>-2.5 E<5768656e>108 220.8 Q F2
<7069636f636f6d>3.989 E F0 1.489<737461727473206974206f70656e7320746865
207465726d696e616c202873657269616c206465>3.989 F 1.489<7669636529206769>
-.25 F -.15<7665>-.25 G 3.989<6e61>.15 G 3.988<7369>-3.989 G 1.488
<7473206e6f6e2d6f7074696f6e206172>-3.988 F 1.488
<67756d656e742e20556e6c65737320746865>-.18 F F3<2d2d6e6f696e6974>108.01
232.8 Q F0 1.333<6f7074696f6e206973206769>4.513 F -.15<7665>-.25 G 1.333
<6e2c20697420636f6e8c677572657320746865206465>.15 F 1.333<7669636520746f
207468652073657474696e67732073706563698c656420627920746865206f7074696f6e
2d6172>-.25 F 1.334<67756d656e747320286f7220746f>-.18 F .487
<736f6d6520646566>108 244.8 R .487
<61756c742073657474696e6773292c20616e64207365747320697420746f20227261>
-.1 F .487<7722206d6f64652e204966>-.15 F F3<2d2d6e6f696e6974>2.996 E F0
.486<6973206769>3.666 F -.15<7665>-.25 G .486<6e2c2074686520696e69746961
6c697a6174696f6e20616e6420636f6e8c6775726174696f6e206973>.15 F .667
<736b69707065643b20746865206465>108 256.8 R .667
<76696365206973206a757374206f70656e65642e2046>-.25 F<6f6c6c6f>-.15 E
.667<77696e6720746869732c>-.25 F F2<7069636f636f6d>3.167 E F0 .667<7365
747320746865207374616e646172642d696e70757420616e64207374616e646172642d6f
757470757420746f>3.167 F<7261>108 268.8 Q 3.289<776d>-.15 G .789
<6f64652e204861>-3.289 F .789<76696e6720646f6e6520736f2c20697420676f6573
20696e2061206c6f6f70207768657265206974206c697374656e7320666f7220696e7075
742066726f6d20737464696e2c206f722066726f6d207468652073657269616c20706f72
742e>-.2 F .589<496e7075742066726f6d207468652073657269616c20706f72742069
7320636f7069656420746f20746865207374616e64617264206f7574707574207768696c
6520696e7075742066726f6d20746865207374616e6461726420696e7075742069732063
6f7069656420746f>108 280.8 R .105<7468652073657269616c20706f72742e>108
292.8 R F2<7069636f636f6d>5.105 E F0 .105<616c736f207363616e732069747320
696e7075742073747265616d20666f7220612075736572>2.605 F .105
<2d73706563698c656420636f6e74726f6c20636861726163746572>-.2 F 2.605
<2c63>-.4 G .105<616c6c6564207468652022657363617065>-2.605 F .554
<6368617261637465722220286265696e6720627920646566>108 304.8 R .555<6175
6c742022432d6122292e2049662074686520657363617065206368617261637465722069
73207365656e2c207468656e20696e7374656164206f662073656e64696e672069742074
6f207468652073657269616c2d>-.1 F<6465>108 316.8 Q .179<766963652c207468
652070726f6772616d20656e746572732022636f6d6d616e64206d6f64652220616e6420
77>-.25 F .179<6169747320666f7220746865206e65>-.1 F .178<78742063686172
6163746572202877686963682069732063616c6c656420746865202266756e6374696f6e>
-.15 F 1.572
<63686172616374657222292e20446570656e64696e67206f6e207468652076>108
328.8 R 1.573
<616c7565206f66207468652066756e6374696f6e20636861726163746572>-.25 F<2c>
-.4 E F2<7069636f636f6d>4.073 E F0 1.573
<706572666f726d73206f6e65206f6620746865206f7065726174696f6e73>4.073 F<64
657363726962656420696e207468652022436f6d6d616e6473222073656374696f6e2062
656c6f>108 340.8 Q -.65<772e>-.25 G F1<434f4d4d414e4453>72 364.8 Q F0
1.588<436f6d6d616e647320617265206769>108 376.8 R -.15<7665>-.25 G 4.088
<6e74>.15 G<6f>-4.088 E F2<7069636f636f6d>4.088 E F0 1.588
<6279208c727374206b>4.088 F -.15<6579>-.1 G 1.587<696e672074686520226573
70616365206368617261637465722220776869636820627920646566>.15 F 1.587
<61756c742069732022432d61222028736565>-.1 F .671
<224f7074696f6e73222062656c6f>108 388.8 R 3.171<776f>-.25 G 3.172<6e68>
-3.171 G 1.172 -.25<6f772074>-3.172 H 3.172<6f63>.25 G .672
<68616e6765206974292c20616e64207468656e206b>-3.172 F -.15<6579>-.1 G
.672<696e67206f6e6520666f72207468652066756e6374696f6e2028636f6d6d616e64
2920636861726163746572732073686f>.15 F<776e>-.25 E<686572652e>108 400.8
Q F2<5b657363617065206368617261637465725d>108 417.6 Q F0 1.244<53656e64
20746865206573636170652063686172616374657220746f207468652073657269616c20
706f727420616e642072657475726e20746f20227472616e73706172656e7422206d6f64
652e2054686973206d65616e73207468617420696620746865>123 429.6 R .358
<65736361706520636861726163746572202822432d61222c20627920646566>123
441.6 R .359<61756c74292069732074797065642074776963652c207468652070726f
6772616d2073656e647320746865206573636170652063686172616374657220746f2074
68652073657269616c>-.1 F .054<706f72742c20616e642072656d61696e7320696e20
7472616e73706172656e74206d6f64652e20546869732069732061206e65>123 453.6 R
2.553<7762>-.25 G<656861>-2.553 E .053
<76696f7220696d706c656d656e74656420696e2076312e342e20507265>-.2 F .053
<76696f75736c79207069636f636f6d>-.25 F<7573656420746f2069676e6f72652074
6865206573636170652d636861726163746572207768656e2069742077>123 465.6 Q
<617320656e746572656420617320612066756e6374696f6e20636861726163746572>
-.1 E<2e>-.55 E F2<432d78>108 482.4 Q F0 .567<45786974207468652070726f67
72616d3a2069662074686520222d2d6e6f726573657422206f7074696f6e2077>123
494.4 R .567<6173206e6f74206769>-.1 F -.15<7665>-.25 G 3.067<6e74>.15 G
.567<68656e207468652073657269616c20706f727420697320726573657420746f2069
7473206f726967696e616c207365742d>-3.067 F<74696e6773206265666f72652065>
123 506.4 Q<786974696e673b2069662069742077>-.15 E<6173206769>-.1 E -.15
<7665>-.25 G 2.5<6e74>.15 G
<68652073657269616c20706f7274206973206e6f742072657365742e>-2.5 E F2
<432d71>108 523.2 Q F0<51756974207468652070726f6772616d202a776974686f75
742a207265736574696e67207468652073657269616c20706f72742c207265>123 535.2
Q -.05<6761>-.15 G
<72646c657373206f662074686520222d2d6e6f726573657422206f7074696f6e2e>.05
E F2<432d70>108 552 Q F0<50756c73652074686520445452206c696e652e204c6f>
123 564 Q<77657220697420666f722031207365632c20616e64207468656e2072616973
65206974206167>-.25 E<61696e2e>-.05 E F2<432d74>108 580.8 Q F0 -.8<546f>
123 592.8 S<67676c652074686520445452206c696e652e204966204454522069732075
702c207468656e206c6f>.8 E<7765722069742e20496620697420697320646f>-.25 E
<776e2c207468656e2072616973652069742e>-.25 E F2<432d5c>108 609.6 Q F0
.026<47656e6572617465206120627265616b2073657175656e6365206f6e2074686520
73657269616c206c696e652e204120627265616b2073657175656e636520697320757375
616c6c792067656e657261746564206279206d61726b696e672028647269>123 621.6 R
<76696e67>-.25 E<746f206c6f676963616c206f6e6529207468652073657269616c20
5478206c696e6520666f7220616e20616d6f756e74206f662074696d6520636f72657370
6f6e64696e6720746f207365>123 633.6 Q -.15<7665>-.25 G
<72616c20636861726163746572206475726174696f6e732e>.15 E F2<432d75>108
650.4 Q F0 .601<426175642075702e20496e6372656173652074686520626175642d72
6174652e20546865206c697374206f6620626175642d726174657320737465707065642d
7468726f756768206279207468697320636f6d6d616e642069733a203330302c20363030
2c>123 662.4 R<313230302c20323430302c20343830302c20393630302c2031393230
302c2033383430302c2035373630302c203131353230302e>123 674.4 Q F2<432d64>
108 691.2 Q F0 1.555<4261756420646f>123 703.2 R 1.555<776e2e204465637265
6173652074686520626175642d726174652e20546865206c697374206f6620626175642d
726174657320737465707065642d7468726f756768206279207468697320636f6d6d616e
6420697320746865>-.25 F
<73616d6520617320666f72207468652022626175642d75702220636f6d6d616e642e>
123 715.2 Q<31>535 768 Q 0 Cg EP
%%Page: 2 2
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@0 SF 373.3
<7069636f636f6d283829207069636f636f6d283829>72 48 R/F1 10/Times-Bold@0
SF<432d66>108 84 Q F0<4379636c65207468726f756768208d6f>123 96 Q
<772d636f6e74726f6c2073657474696e6773202852>-.25 E
<54532f4354532c20584f4e2f584f4646>-.6 E 2.5<2c6e>-.8 G<6f6e65292e>-2.5 E
F1<432d79>108 112.8 Q F0
<4379636c65207468726f756768207061726974792073657474696e6773202865>123
124.8 Q -.15<7665>-.25 G<6e2c206f64642c206e6f6e65292e>.15 E F1<432d62>
108 141.6 Q F0<4379636c65207468726f7567682064617461626974732d6e756d6265
722073657474696e67732028352c20362c20372c2038292e>123 153.6 Q F1<432d76>
108 170.4 Q F0<53686f>123 182.4 Q 4.02<7770>-.25 G 1.52
<726f6772616d206f7074696f6e7320286c696b>-4.02 F 4.02<6562>-.1 G 1.521<61
756420726174652c206461746120626974732c20657463292e204f6e6c7920746865206f
7074696f6e7320746861742063616e206265206d6f64698c6564206f6e6c696e65>-4.02
F<287468726f75676820636f6d6d616e647329206172652073686f>123 194.4 Q<776e
2c206e6f742074686f736520746861742063616e206f6e6c792062652073657420617420
74686520636f6d6d616e642d6c696e652e>-.25 E F1<432d73>108 211.2 Q F0<5365
6e64202875706c6f6164292061208c6c652028736565202253656e64696e6720616e6420
5265636569>123 223.2 Q<76696e672046696c6573222062656c6f>-.25 E<7729>-.25
E F1<432d72>108 240 Q F0<5265636569>123 252 Q .3 -.15<76652028>-.25 H
<646f>.15 E<776e6c6f6164292061208c6c652028736565202253656e64696e6720616e
64205265636569>-.25 E<76696e672046696c6573222062656c6f>-.25 E<7729>-.25
E .054<416674657220706572666f726d696e67206f6e65206f66207468652061626f>
108 268.8 R .354 -.15<7665206f>-.15 H .054
<7065726174696f6e73207468652070726f6772616d206c6561>.15 F -.15<7665>-.2
G 2.554<7374>.15 G .054<686520636f6d6d616e64206d6f646520616e6420656e7465
7273207472616e73706172656e74>-2.554 F<6d6f64652e204578616d706c653a2054>
108 280.8 Q 2.5<6f69>-.8 G
<6e6372656173652074686520626175642d72617465206279207477>-2.5 E 2.5<6f73>
-.1 G<746570732c20796f75206861>-2.5 E .3 -.15<76652074>-.2 H 2.5<6f74>
.15 G<7970653a>-2.5 E<432d612c20432d752c20432d612c20432d75>108 300 Q<61
7373756d696e67206f662d636f7572736520746861742022432d61222069732074686520
65736361706520636861726163746572>108 319.2 Q<2e>-.55 E/F2 10.95
/Times-Bold@0 SF<53454e44494e4720414e4420524543454956494e472046494c4553>
72 343.2 Q F1<7069636f636f6d>108 355.2 Q F0 .427
<63616e2073656e6420616e64207265636569>2.926 F .727 -.15<7665208c>-.25 H
.427<6c6573206f>.15 F -.15<7665>-.15 G 2.927<7274>.15 G .427
<68652073657269616c20706f7274207573696e672065>-2.927 F .427<787465726e61
6c2070726f6772616d73207468617420696d706c656d656e742074686520726573706563
2d>-.15 F<7469>108 367.2 Q .3 -.15<76652070>-.25 H<726f746f636f6c732e20
496e204c696e7578207479706963616c2070726f6772616d7320666f7220746869732070
7572706f7365206172653a>.15 E<8a>108 384 Q F1<7278283129>5 E F0 2.5<2d72>
2.5 G<65636569>-2.5 E .3 -.15<76652075>-.25 H
<73696e672074686520582d4d4f44454d2070726f746f636f6c>.15 E<8a>108 400.8 Q
F1<7262283129>5 E F0 2.5<2d72>2.5 G<65636569>-2.5 E .3 -.15<76652075>
-.25 H<73696e67207468652059>.15 E<2d4d4f44454d2070726f746f636f6c>-1.11 E
<8a>108 417.6 Q F1<727a283129>5 E F0 2.5<2d72>2.5 G<65636569>-2.5 E .3
-.15<76652075>-.25 H<73696e6720746865205a2d4d4f44454d2070726f746f636f6c>
.15 E<8a>108 434.4 Q F1<7378283129>5 E F0 2.5<2d73>2.5 G
<656e64207573696e672074686520582d4d4f44454d2070726f746f636f6c>-2.5 E<8a>
108 451.2 Q F1<7362283129>5 E F0 2.5<2d73>2.5 G
<656e64207573696e67207468652059>-2.5 E<2d4d4f44454d2070726f746f636f6c>
-1.11 E<8a>108 468 Q F1<737a283129>5 E F0 2.5<2d73>2.5 G
<656e64207573696e6720746865205a2d4d4f44454d2070726f746f636f6c>-2.5 E<8a>
108 484.8 Q F1<61736369692d786672283129>5 E F0 2.5<2d72>2.5 G<65636569>
-2.5 E .3 -.15<7665206f>-.25 H 2.5<7274>.15 G
<72616e736d6974204153434949208c6c6573>-2.5 E .692<546865206e616d65206f66
2c20616e642074686520636f6d6d616e642d6c696e65206f7074696f6e7320746f2c2074
68652070726f6772616d20746f206265207573656420666f72207472616e736d69747469
6e67208c6c657320617265206769>108 501.6 R -.15<7665>-.25 G 3.191<6e62>.15
G<79>-3.191 E 2.843<74686520222d2d73656e642d636d6422206f7074696f6e2e2053
696d696c61726c79207468652070726f6772616d20746f207265636569>108 513.6 R
3.143 -.15<7665208c>-.25 H 2.843<6c65732c20616e6420697473206172>.15 F
2.844<67756d6574732c20617265206769>-.18 F -.15<7665>-.25 G 5.344<6e62>
.15 G 5.344<7974>-5.344 G<6865>-5.344 E<222d2d7265636569>108 525.6 Q
-.15<7665>-.25 G .118<2d636d6422206f7074696f6e2e2046>.15 F .117
<6f722065>-.15 F .117
<78616d706c652c20696e206f7264657220746f2073746172742061>-.15 F F1
<7069636f636f6d>2.617 E F0 .117<73657373696f6e20746861742075736573202273
7a2220746f207472616e736d6974208c6c65732c20616e64>2.617 F
<22727a2220746f207265636569>108 537.6 Q -.15<7665>-.25 G 2.5<2c79>.15 G
<6f75206861>-2.5 E .3 -.15<76652074>-.2 H 2.5<6f73>.15 G
<617920736f6d657468696e67206c696b>-2.5 E 2.5<6574>-.1 G<6869733a>-2.5 E
<7069636f636f6d202d2d73656e642d636d642022737a202d767622202d2d7265636569>
108 556.8 Q -.15<7665>-.25 G<2d636d642022727a202d767622>.15 E .309<4475
72696e6720746865207069636f636f6d2073657373696f6e2c20696620796f75206b>108
576 R .609 -.15<65792074>-.1 H .309
<6865202273656e6422206f7220227265636569>.15 F -.15<7665>-.25 G 2.809
<2263>.15 G .309<6f6d6d616e64732028652e672e206279207072657373696e672043
2d612c20432d732c206f7220432d>-2.809 F .431<612c20432d722920796f75207769
6c6c2062652070726f6d7074656420666f722061208c6c656e616d652e20417420746869
732070726f6d707420796f752063616e20656e746572206f6e65206f72206d6f7265208c
6c652d6e616d65732c20616e6420616e>108 588 R<79>-.15 E .487
<6164646974696f6e616c206172>108 600 R .487<67756d656e747320746f20746865
207472616e736d697373696f6e206f7220726563657074696f6e2070726f6772616d2e20
416674657220746861742c207069636f636f6d2077696c6c207374617274207468652074
68652065>-.18 F<78746572>-.15 E<2d>-.2 E .403<6e616c2070726f6772616d2061
732073706563698c65642062792074686520222d2d73656e642d636d64222c206f722022
2d2d7265636569>108 612 R -.15<7665>-.25 G .403
<2d636d6422206f7074696f6e2c20616e64207769746820616e>.15 F 2.902<798c>
-.15 G .402<6c656e616d657320616e6420616464692d>-2.902 F 1.195
<74696f6e616c206172>108 624 R 1.195
<67756d656e747320796f75206d6179206861>-.18 F 1.495 -.15<76652073>-.2 H
1.195<7570706c6965642e20546865207374616e6461726420696e70757420616e64206f
7574707574206f66207468652065>.15 F 1.195
<787465726e616c2070726f6772616d2077696c6c206265>-.15 F .851<636f6e6e6563
74656420746f207468652073657269616c20706f72742e20546865207374616e64617264
206572726f72206f66207468652065>108 636 R .851<787465726e616c2070726f6772
616d2077696c6c20626520636f6e6e656374656420746f20746865207465726d696e616c>
-.15 F 1.399<77686963682d2d2d7768696c65207468652070726f6772616d20697320
72756e6e696e672d2d2d77696c6c207265>108 648 R -.15<7665>-.25 G 1.399<7274
20746f2063616e6f6e6963616c206d6f64652e205072657373696e672027432d63272077
68696c65207468652065>.15 F<787465726e616c>-.15 E<70726f6772616d20697320
72756e6e696e672077696c6c207072656d61747572656c79207465726d696e6174652069
742c20616e642072657475726e20636f6e74726f6c20746f>108 660 Q F1
<7069636f636f6d>2.5 E F2<4f5054494f4e53>72 684 Q F1<7069636f636f6d>108
696 Q F0<616363657074732074686520666f6c6c6f>2.5 E
<77696e6720636f6d6d616e642d6c696e65206f7074696f6e73>-.25 E<32>535 768 Q
0 Cg EP
%%Page: 3 3
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@0 SF 373.3
<7069636f636f6d283829207069636f636f6d283829>72 48 R/F1 10/Times-Bold@0
SF<2d2d62617564207c202d62>108 84 Q F0<44658c6e65732074686520626175642d72
61746520746f20736574207468652073657269616c2d706f727420287465726d696e616c
2920746f2e>123 96 Q F1<2d2d8d6f>108 112.8 Q 2.5<777c2d>-.1 G<66>-2.5 E
F0<44658c6e657320746865208d6f>123 124.8 Q<772d636f6e74726f6c206d6f646520
746f20736574207468652073657269616c2d706f727420746f2e204d757374206265206f
6e65206f663a>-.25 E 5<8ab4>123 141.6 S<782720666f7220786f6e2f786f66>-5 E
2.5<6628>-.25 G<736f667477>-2.5 E<61726529206d6f6465>-.1 E 5<8ab4>123
158.4 S<682720666f72206861726477>-5 E<617265208d6f>-.1 E 2.5<7763>-.25 G
<6f6e74726f6c202852>-2.5 E<54532f43545329>-.6 E 5<8ab4>123 175.2 S
<6e2720666f72206e6f208d6f>-5 E 2.5<7763>-.25 G<6f6e74726f6c>-2.5 E
<28446566>123 192 Q<61756c743a20276e2729>-.1 E F1
<2d2d706172697479207c202d70>108 208.8 Q F0<44658c6e65732074686520706172
697479206d6f646520746f20736574207468652073657269616c2d706f727420746f2e20
4d757374206265206f6e65206f663a>123 220.8 Q 5<8ab4>123 237.6 S
<6f2720666f72206f646420706172697479206d6f64652e>-5 E 5<8ab4>123 254.4 S
<652720666f722065>-5 E -.15<7665>-.25 G 2.5<6e70>.15 G
<6172697479206d6f64652e>-2.5 E 5<8ab4>123 271.2 S
<6e2720666f72206e6f20706172697479>-5 E 2.5<2c6d>-.65 G<6f64652e>-2.5 E
<28446566>123 288 Q<61756c743a20276e2729>-.1 E F1
<2d2d6461746162697473207c202d64>108 304.8 Q F0
<44658c6e657320746865206e756d626572206f662064617461206269747320696e2065>
123 316.8 Q -.15<7665>-.25 G<727920636861726163746572>.15 E 2.5<2e4d>
-.55 G<757374206265206f6e65206f663a20352c20362c20372c2038>-2.5 E
<28446566>123 336 Q<61756c743a203829>-.1 E F1
<2d2d657361637065207c202d65>108 352.8 Q F0 1.151
<44658c6e6573207468652063686172616374657220746861742077696c6c206d616b>
123 364.8 R 3.651<6570>-.1 G 1.151<69636f636f6d20656e74657220636f6d6d61
6e642d6d6f64652028736565206465736372697074696f6e2061626f>-3.651 F -.15
<7665>-.15 G 1.15<292e20496620277827206973>.15 F<6769>123 376.8 Q -.15
<7665>-.25 G<6e2c207468656e20432d782077696c6c206d616b>.15 E 2.5<6570>-.1
G<69636f636f6d20656e74657220636f6d6d616e64206d6f64652e>-2.5 E<28446566>
123 396 Q<61756c743a2027612729>-.1 E F1<2d2d6e6f696e6974207c202d69>108
412.8 Q F0 .846<4966206769>123 424.8 R -.15<7665>-.25 G<6e2c>.15 E F1
<7069636f636f6d>3.346 E F0 .847<77696c6c206e6f7420696e697469616c697a652c
2072657365742c206f72206f7468657277697365206d6564646c65207769746820746865
2073657269616c20706f72742061742073746172742d75702e2049742077696c6c>3.346
F 1.706
<6a757374206f70656e2069742e20546869732069732075736566756c2c20666f722065>
123 436.8 R 1.706<78616d706c652c20666f7220636f6e6e656374696e67>-.15 F F1
<7069636f636f6d>4.206 E F0 1.705
<746f20616c72656164792d636f6e6e6563746564206d6f64656d732c206f72>4.205 F
.864<616c726561647920636f6e8c677572656420706f72747320776974686f75742074
65726d696e6174696e672074686520636f6e6e656374696f6e2c206f7220616c74657269
6e67207468652073657474696e67732e2049662072657175697265642073657269616c>
123 448.8 R<706f727420706172616d65746572732063616e207468656e206265206164
6a75737465642061742072756e2d74696d6520627920636f6d6d616e64732e>123 460.8
Q F1<2d2d6e6f72>108 477.6 Q<65736574207c202d72>-.18 E F0 .18<4966206769>
123 489.6 R -.15<7665>-.25 G<6e2c>.15 E F1<7069636f636f6d>2.68 E F0 .18<
77696c6c206e6f74202a72657365742a207468652073657269616c20706f727420776865
6e2065>2.68 F .18<786974696e672e2049742077696c6c206a75737420636c6f736520
746865208c6c6564657320616e6420646f206e6f74682d>-.15 F .798
<696e67206d6f72652e20546869732069732075736566756c2c20666f722065>123
501.6 R .798<78616d706c652c20666f72206c6561>-.15 F .798
<76696e67206d6f64656d7320636f6e6e6563746564207768656e2065>-.2 F
<786974696e67>-.15 E F1 .798<7069636f636f6d207069636f636f6d>3.298 F F0
.42<7573696e67207468652022517569742220636f6d6d616e642028696e737465616420
6f6620224578697422292c207768696368206e65>123 513.6 R -.15<7665>-.25 G
2.92<7272>.15 G .42<6573657473207468652073657269616c20706f72742e20496620
222d2d6e6f726573657422206973206769>-2.92 F -.15<7665>-.25 G<6e>.15 E
<7468656e2022517569742220616e64202245786974222062656861>123 525.6 Q .3
-.15<76652065>-.2 H<7373656e7469616c6c79207468652073616d652e>.15 E F1
<2d2d6e6f6c6f636b207c202d6c>108 542.4 Q F0 2.07<4966206769>123 554.4 R
-.15<7665>-.25 G<6e2c>.15 E F1<7069636f636f6d>4.57 E F0 2.07<77696c6c20
2a6e6f742a20617474656d707420746f206c6f636b207468652073657269616c20706f72
74206265666f7265206f70656e696e672069742e204e6f726d616c6c79207069636f636f
6d>4.57 F .456<617474656d70747320746f20676574206120555543502d7374796c65
206c6f636b2d8c6c652028652e672e20222f76>123 566.4 R .456<61722f6c6f636b2f
4c434b2e2e74747953302229206265666f7265206f70656e696e672074686520706f7274
2e2046>-.25 F .456<61696c696e6720746f>-.15 F .913
<646f20736f2c20726573756c747320696e207468652070726f6772616d2065>123
578.4 R .914
<786974696e6720616674657220656d697474696e6720616e206572726f72>-.15 F
.914<2d6d6573736167652e20497420697320706f737369626c65207468617420796f75
72207069636f636f6d>-.2 F<62696e61727920697320636f6d70696c65642077697468
6f75742074686973206f7074696f6e2e>123 590.4 Q F1
<2d2d73656e642d636d64207c202d73>108 607.2 Q F0
<53706563698c6573207468652065>123 619.2 Q
<787465726e616c2070726f6772616d2028616e6420616e>-.15 E 2.5<7961>-.15 G
-.18<7267>-2.5 G<756d656e747320746f2069742920746861742077696c6c20626520
7573656420666f72207472616e736d697474696e67208c6c65732e>.18 E<446566>123
638.4 Q<61756c743a2022737a202d767622>-.1 E F1<2d2d72>108 655.2 Q
<65636569>-.18 E -.1<7665>-.1 G<2d636d64207c202d76>.1 E F0
<53706563698c6573207468652065>123 667.2 Q
<787465726e616c2070726f6772616d2028616e6420616e>-.15 E 2.5<7961>-.15 G
-.18<7267>-2.5 G<756d656e747320746f2069742920746861742077696c6c20626520
7573656420666f72207265636569>.18 E<76696e67208c6c65732e>-.25 E<28446566>
123 686.4 Q<61756c743a2022727a202d76762229>-.1 E F1
<2d2d68656c70207c202d68>108 703.2 Q F0<5072696e7420612073686f7274206865
6c70206d6573736167652064657363726962696e672074686520636f6d6d616e642d6c69
6e65206f7074696f6e732e>123 715.2 Q<33>535 768 Q 0 Cg EP
%%Page: 4 4
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@0 SF 373.3
<7069636f636f6d283829207069636f636f6d283829>72 48 R/F1 10.95
/Times-Bold@0 SF -.548<4155>72 84 S<54484f52>.548 E F0
<7069636f636f6d2077>108 96 Q<6173207772697474656e206279204e69636b2050>
-.1 E<617461>-.15 E -.25<7661>-.2 G<6c697320286e706174406566>.25 E
<61756c742e6e657429>-.1 E F1 -1.04 -1.588<41562041>72 120 T
<494c4142494c495459>1.588 E F0<546865206c61746573742076>108 132 Q
<657273696f6e206f6620227069636f636f6d222063616e20626520646f>-.15 E
<776e6c6f616465642066726f6d3a>-.25 E/F2 10/Times-Bold@0 SF<687474703a2f
2f656661756c742e6e65742f6e7061742f6861636b732f7069636f636f6d2f>2.5 E F0
<34>535 768 Q 0 Cg EP
%%Trailer
end
%%EOF

403
picocom.8.xml Normal file
View File

@ -0,0 +1,403 @@
<?xml version="1.0" standalone='no'?>
<!DOCTYPE manpage SYSTEM "http://efault.net/npat/dtds/xmlmp/xmlmp-1.1.dtd">
<manpage
title="picocom"
section="8"
desc="minimal dumb-terminal emulation program">
<synopsis>
<synel>
picocom [ <arg>options</arg> ] <arg>device</arg>
</synel>
</synopsis>
<description>
<p>
As its name suggests, <cmd>picocom</cmd> is a minimal
dumb-terminal emulation program. It is, in principle, very much
like <manref name="minicom" section="1"/>, only it's "pico"
instead of "mini"! It was designed to serve as a simple, manual,
modem configuration, testing, and debugging tool. It has also
served (quite well) as a low-tech "terminal-window" to allow
operator intervention in PPP connection scripts (something like
the ms-windows "open terminal window before / after dialing"
feature). It could also prove useful in many other similar
tasks.
</p>
<p>
When <cmd>picocom</cmd> starts it opens the terminal (serial
device) given as its non-option argument. Unless the
<arg>--noinit</arg> option is given, it configures the device to
the settings specified by the option-arguments (or to some
default settings), and sets it to "raw" mode. If
<arg>--noinit</arg> is given, the initialization and
configuration is skipped; the device is just opened. Following
this, <cmd>picocom</cmd> sets the standard-input and
standard-output to raw mode. Having done so, it goes in a loop
where it listens for input from stdin, or from the serial
port. Input from the serial port is copied to the standard
output while input from the standard input is copied to the
serial port. <cmd>picocom</cmd> also scans its input stream for
a user-specified control character, called the "escape
character" (being by default "C-a"). If the escape character is
seen, then instead of sending it to the serial-device, the
program enters "command mode" and waits for the next character
(which is called the "function character"). Depending on the
value of the function character, <cmd>picocom</cmd> performs one
of the operations described in the "Commands" section below.
</p>
</description>
<section name="COMMANDS">
<p>
Commands are given to <cmd>picocom</cmd> by first keying the
"espace character" which by default is "C-a" (see "Options"
below on how to change it), and then keying one for the function
(command) characters shown here.
</p>
<dl>
<dt>[escape character]</dt>
<dd>
<p>
Send the escape character to the serial port and return to
"transparent" mode. This means that if the escape character
("C-a", by default) is typed twice, the program sends the
escape character to the serial port, and remains in
transparent mode. This is a new behavior implemented in
v1.4. Previously picocom used to ignore the escape-character
when it was entered as a function character.
</p>
</dd>
<dt>C-x</dt>
<dd>
<p>
Exit the program: if the "--noreset" option was not given
then the serial port is reset to its original settings
before exiting; if it was given the serial port is not
reset.
</p>
</dd>
<dt>C-q</dt>
<dd>
<p>
Quit the program *without* reseting the serial port,
regardless of the "--noreset" option.
</p>
</dd>
<dt>C-p</dt>
<dd>
<p>
Pulse the DTR line. Lower it for 1 sec, and then raise it
again.
</p>
</dd>
<dt>C-t</dt>
<dd>
<p>
Toggle the DTR line. If DTR is up, then lower it. If it is
down, then raise it.
</p>
</dd>
<dt>C-\e</dt>
<dd>
<p>
Generate a break sequence on the serial line. A break
sequence is usually generated by marking (driving to logical
one) the serial Tx line for an amount of time coresponding
to several character durations.
</p>
</dd>
<dt>C-u</dt>
<dd>
<p>
Baud up. Increase the baud-rate. The list of baud-rates
stepped-through by this command is: 300, 600, 1200, 2400,
4800, 9600, 19200, 38400, 57600, 115200.
</p>
</dd>
<dt>C-d</dt>
<dd>
<p>
Baud down. Decrease the baud-rate. The list of baud-rates
stepped-through by this command is the same as for the
"baud-up" command.
</p>
</dd>
<dt>C-f</dt>
<dd>
<p>
Cycle through flow-control settings (RTS/CTS, XON/XOFF, none).
</p>
</dd>
<dt>C-y</dt>
<dd>
<p>
Cycle through parity settings (even, odd, none).
</p>
</dd>
<dt>C-b</dt>
<dd>
<p>
Cycle through databits-number settings (5, 6, 7, 8).
</p>
</dd>
<dt>C-v</dt>
<dd>
<p>
Show program options (like baud rate, data bits, etc). Only
the options that can be modified online (through commands)
are shown, not those that can only be set at the
command-line.
</p>
</dd>
<dt>C-s</dt>
<dd>
<p>
Send (upload) a file (see "Sending and Receiving Files"
below)
</p>
</dd>
<dt>C-r</dt>
<dd>
<p>
Receive (download) a file (see "Sending and Receiving Files"
below)
</p>
</dd>
</dl>
<p>
After performing one of the above operations the program leaves
the command mode and enters transparent mode. Example: To
increase the baud-rate by two steps, you have to type:
</p>
<p>
C-a, C-u, C-a, C-u
</p>
<p>
assuming of-course that "C-a" is the escape character.
</p>
</section>
<section name = "SENDING AND RECEIVING FILES">
<p>
<cmd>picocom</cmd> can send and receive files over the serial
port using external programs that implement the respective
protocols. In Linux typical programs for this purpose are:
</p>
<ul>
<li><p><manref name="rx" section="1"/>
- receive using the X-MODEM protocol</p></li>
<li><p><manref name="rb" section="1"/>
- receive using the Y-MODEM protocol</p></li>
<li><p><manref name="rz" section="1"/>
- receive using the Z-MODEM protocol</p></li>
<li><p><manref name="sx" section="1"/>
- send using the X-MODEM protocol</p></li>
<li><p><manref name="sb" section="1"/>
- send using the Y-MODEM protocol</p></li>
<li><p><manref name="sz" section="1"/>
- send using the Z-MODEM protocol</p></li>
<li><p><manref name="ascii-xfr" section="1"/>
- receive or transmit ASCII files</p></li>
</ul>
<p>
The name of, and the command-line options to, the program to be
used for transmitting files are given by the "--send-cmd"
option. Similarly the program to receive files, and its
argumets, are given by the "--receive-cmd" option. For example,
in order to start a <cmd>picocom</cmd> session that uses "sz" to
transmit files, and "rz" to receive, you have to say something
like this:
</p>
<p>
picocom --send-cmd "sz -vv" --receive-cmd "rz -vv"
</p>
<p>
During the picocom session, if you key the "send" or "receive"
commands (e.g. by pressing C-a, C-s, or C-a, C-r) you will be
prompted for a filename. At this prompt you can enter one or
more file-names, and any additional arguments to the
transmission or reception program. After that, picocom will
start the the external program as specified by the "--send-cmd",
or "--receive-cmd" option, and with any filenames and additional
arguments you may have supplied. The standard input and output
of the external program will be connected to the serial
port. The standard error of the external program will be
connected to the terminal which---while the program is
running---will revert to canonical mode. Pressing 'C-c' while
the external program is running will prematurely terminate it,
and return control to <cmd>picocom</cmd>. Pressing 'C-c' at any other
time, has no special effect; the character is normally passed to
the serial port.
</p>
</section>
<section name = "OPTIONS">
<p>
<cmd>picocom</cmd> accepts the following command-line options
</p>
<dl>
<dt>--baud | -b</dt>
<dd>
<p>
Defines the baud-rate to set the serial-port (terminal) to.
</p>
</dd>
<dt>--flow | -f</dt>
<dd>
<p>
Defines the flow-control mode to set the serial-port to. Must be
one of:
</p>
<ul>
<li><p>\'x' for xon/xoff (software) mode</p></li>
<li><p>\'h' for hardware flow control (RTS/CTS)</p></li>
<li><p>\'n' for no flow control</p></li>
</ul>
<p>(Default: 'n')</p>
</dd>
<dt>--parity | -p</dt>
<dd>
<p>
Defines the parity mode to set the serial-port to.
Must be one of:
</p>
<ul>
<li><p>\'o' for odd parity mode.</p></li>
<li><p>\'e' for even parity mode.</p></li>
<li><p>\'n' for no parity, mode.</p></li>
</ul>
<p>(Default: 'n')</p>
</dd>
<dt>--databits | -d</dt>
<dd>
<p>
Defines the number of data bits in every character. Must be one of:
5, 6, 7, 8
</p>
<p>(Default: 8)</p>
</dd>
<dt>--esacpe | -e</dt>
<dd>
<p>
Defines the character that will make picocom enter command-mode
(see description above). If 'x' is given, then C-x will
make picocom enter command mode.
</p>
<p>
(Default: 'a')
</p>
</dd>
<dt>--noinit | -i</dt>
<dd>
<p>
If given, <cmd>picocom</cmd> will not initialize, reset, or
otherwise meddle with the serial port at start-up. It will
just open it. This is useful, for example, for connecting
<cmd>picocom</cmd> to already-connected modems, or already
configured ports without terminating the connection, or
altering the settings. If required serial port parameters
can then be adjusted at run-time by commands.
</p>
</dd>
<dt>--noreset | -r</dt>
<dd>
<p>
If given, <cmd>picocom</cmd> will not *reset* the serial
port when exiting. It will just close the filedes and do
nothing more. This is useful, for example, for leaving
modems connected when exiting <cmd>picocom</cmd>. Regardless
whether the "--noreset" option is given the user can exit
<cmd>picocom</cmd> using the "Quit" command (instead of
"Exit"), which never resets the serial port. If "--noreset"
is given then "Quit" and "Exit" behave essentially the same.
</p>
</dd>
<dt>--nolock | -l</dt>
<dd>
<p>
If given, <cmd>picocom</cmd> will *not* attempt to lock the
serial port before opening it. Normally picocom attempts to
get a UUCP-style lock-file (e.g. "/var/lock/LCK..ttyS0")
before opening the port. Failing to do so, results in the
program exiting after emitting an error-message. It is
possible that your picocom binary is compiled without this
option.
</p>
</dd>
<dt>--send-cmd | -s</dt>
<dd>
<p>
Specifies the external program (and any arguments to it)
that will be used for transmitting files.
</p>
<p>
Default: "sz -vv"
</p>
</dd>
<dt>--receive-cmd | -v</dt>
<dd>
<p>
Specifies the external program (and any arguments to it)
that will be used for receiving files.
</p>
<p>
(Default: "rz -vv")
</p>
</dd>
<dt>--help | -h</dt>
<dd>
<p>
Print a short help message describing the command-line
options.
</p>
</dd>
</dl>
</section>
<section name="AUTHOR">
<p>picocom was written by Nick Patavalis (npat@efault.net)</p>
</section>
<section name="AVAILABILITY">
<p>The latest version of "picocom" can be downloaded from: <url
href="http://efault.net/npat/hacks/picocom/"/>
</p>
</section>
</manpage>

1022
picocom.c Normal file

File diff suppressed because it is too large Load Diff

1193
term.c Normal file

File diff suppressed because it is too large Load Diff

543
term.h Normal file
View File

@ -0,0 +1,543 @@
/* vi: set sw=4 ts=4:
*
* term.h
*
* Simple terminal management library. Wraps termios(3), and
* simplifies the logistics required for the reliable management and
* control of terminals.
*
* Principles of operation:
*
* After the library is initialized one or more file-descriptors, can
* be added to (and latter removed from) the list managed by the
* library (framework). These file descriptos must be opened on
* terminal devices. For every fd, the original settings of the
* associated terminal device are saved by the library. These settings
* are restored when the fd is removed from the framework, or at
* porgram termination [by means of an atexit(3) handler installed by
* the library], or at user request. The library maintains three
* structures for every fd in the framework: The original settings
* structure ("origtermios"), keeping the setings of the terminal
* device when the respective filedes was added to the framework. The
* current settings structure ("currtermios"), keeping the current
* setings of the associated terminal device; and the next settings
* structure ("nexttermios") which keeps settings to be applied to the
* associated terminal device at a latter time, upon user request.
* The "term_set_*" functions can be used to modify the device
* settings stored in the nexttermios structure. Using functions
* provided by the library the user can: Apply the nexttermios
* settings to the device. Revert all changes made on nexttermios by
* copying the currtermios structure to nexttermios. Reset the device,
* by configuring it to the original settings, and copying origtermios
* to currtermios and nexttermios. Refresh the device by rereading the
* current settings from it and updating currtermios (to catch up with
* changes made to the device by means outside of this framework).
*
* Interface summary:
*
* F term_lib_init - library initialization
* F term_add - add a filedes to the framework
* F term_remove - remove a filedes from the framework
* F term_erase - remove a filedes from the framework without reset
* F term_replace - replace a fd w/o affecting the settings stuctures
* F term_reset - revert a device to the settings in "origtermios"
* F term_apply - configure a device to the settings in "nexttermios"
* F term_revert - discard "nexttermios" by copying-over "currtermios"
* F term_refresh - update "currtermios" from the device
* F term_set_raw - set "nexttermios" to raw mode
* F term_set_baudrate - set the baudrate in "nexttermios"
* F term_set_parity - set the parity mode in "nexttermios"
* F term_set_databits - set the databits in "nexttermios"
* F term_set_flowcntrl - set the flowcntl mode in "nexttermios"
* F term_set_hupcl - enable or disable hupcl in "nexttermios"
* F term_set_local - set "nexttermios" to local or non-local mode
* F term_set - set all params of "nexttermios" in a single stroke
* F term_pulse_dtr - pulse the DTR line a device
* F term_lower_dtr - lower the DTR line of a device
* F term_raise_dtr - raise the DTR line of a device
* F term_drain - drain the output from the terminal buffer
* F term_flush - discard terminal input and output queue contents
* F term_break - generate a break condition on a device
* F term_strerror - return a string describing current error condition
* F term_perror - print a string describing the current error condition
* G term_errno - current error condition of the library
* E term_errno_e - error condition codes
* E parity_t - library supported parity types
* E flocntrl_t - library supported folw-control modes
* M MAX_TERM - maximum number of fds that can be managed
*
* by Nick Patavalis (npat@inaccessnetworks.com)
*
* originaly by Pantelis Antoniou (panto@intranet.gr), Nick Patavalis
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
* published by the Free Software Foundation; either version 2 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
* USA
*
* $Id: term.h,v 1.1 2003/05/07 18:00:05 npat Exp $
*/
#ifndef TERM_H
#define TERM_H
/* M MAX_TERMS
*
* Maximum nuber of terminals that can be managed by the library. Keep
* relatively low, since linear searches are used. Reasonable values
* would be: 16, 32, 64, etc.
*/
#define MAX_TERMS 16
/*
* E term_errno_e
*
* Library error-condition codes. These marked with "see errno"
* correspond to system errors, so it makes sense to also check the
* system's error-condition code (errno) in order to fully determine
* what went wrong.
*
* See the error strings in "term.c" for a description of each.
*/
enum term_errno_e {
TERM_EOK = 0,
TERM_ENOINIT,
TERM_EFULL,
TERM_ENOTFOUND,
TERM_EEXISTS,
TERM_EATEXIT,
TERM_EISATTY,
TERM_EFLUSH, /* see errno */
TERM_EGETATTR, /* see errno */
TERM_ESETATTR, /* see errno */
TERM_EBAUD,
TERM_ESETOSPEED,
TERM_ESETISPEED,
TERM_EPARITY,
TERM_EDATABITS,
TERM_EFLOW,
TERM_EDTRDOWN,
TERM_EDTRUP,
TERM_EDRAIN, /* see errno */
TERM_EBREAK
};
/* E parity_e
*
* Parity modes supported by the library:
*
* P_NONE - no patiry
* P_EVEN - even parity
* P_ODD - odd parity
*/
enum parity_e {
P_NONE,
P_EVEN,
P_ODD
};
/*
* E flowcntrl_e
*
* Flow control modes, supported by the library.
*
* FC_NONE - no flow control
* FC_RTSCTS - RTS/CTS handshaking, also known as hardware
* flow-control.
* FC_XONXOFF - xon/xoff flow control.
*/
enum flowcntrl_e {
FC_NONE,
FC_RTSCTS,
FC_XONXOFF
};
/***************************************************************************/
/*
* G term_errno
*
* Keeps the current library error-condtion code
*/
extern int term_errno;
/***************************************************************************/
/*
* F term_strerror
*
* Return a string descibing the current library error condition. If
* the error condition reflects a system error, then the respective
* system-error description is appended at the end of the returned
* string. The returned string points to a statically allocated buffer
* that is overwritten with every call to term_strerror()
*
* Returns a string describing the current library (and possibly
* system) error condition.
*/
const char *term_strerror (int terrnum, int errnum);
/*
* F term_perror
*
* Emit a description of the current library (and possibly system)
* error condition to the standard-error stream. The description is
* prefixed by a user-supplied string. What is actually emmited is:
*
* <prefix><space><description>\n
*
* The description emitted is the string returned by term_strerror().
*
* Returns the number of characters emmited to the standard-error
* stream or a neagative on failure.
*/
int term_perror (const char *prefix);
/* F term_lib_init
*
* Initialize the library
*
* Initialize the library. This function must be called before any
* attemt to use the library. If this function is called and the
* library is already initialized, all terminals associated with the
* file-descriptors in the framework will be reset to their original
* settings, and the file-descriptors will be removed from the
* framework. An atexit(3) handler is installed by the library which
* resets and removes all managed terminals.
*
* Returns negative on failure, non-negative on success. This function
* will only fail if the atexit(3) handler cannot be
* installed. Failure to reset a terminal to the original settings is
* not considered an error.
*/
int term_lib_init (void);
/* F term_add
*
* Add the filedes "fd" to the framework. The filedes must be opened
* on a terminal device or else the addition will fail. The settings
* of the terminal device associated with the filedes are read and
* stored in the origtermios structure.
*
* Returns negative on failure, non-negative on success.
*/
int term_add (int fd);
/* F term_remove
*
* Remove the filedes "fd" from the framework. The device associated
* with the filedes is reset to its original settings (those it had
* when it was added to the framework)
*
* Return negative on failure, non-negative on success. The filedes is
* always removed form the framework even if this function returns
* failure, indicating that the device reset failed.
*/
int term_remove (int fd);
/* F term_erase
*
* Remove the filedes "fd" from the framework. The device associated
* with the filedes is *not* reset to its original settings.
*
* Return negative on failure, non-negative on success. The only
* reason for failure is the filedes not to be found.
*/
int term_erase (int fd);
/* F term_replace
*
* Replace a managed filedes without affecting the associated settings
* structures. The "newfd" takes the place of "oldfd". "oldfd" is
* removed from the framework without the associated device beign
* reset (it is most-likely no longer connected to a device anyway,
* and reset would fail). The device associated with "newfd" is
* configured with "oldfd"s current settings.
*
* Returns negative on failure, non-negative on success. In case of
* failure "oldfd" is not removed from the framework, and no
* replacement takes place.
*
* The usual reason to replace the filedes of a managed terminal is
* because the device was closed and re-opened. This function gives
* you a way to do transparent "open"s and "close"s: Before you close
* a device, it has certain settings managed by the library. When you
* close it and then re-open it many of these settings are lost, since
* the device reverts to system-default settings. By calling movefd,
* you conceptually _maintain_ the old (pre-close) settings to the new
* (post-open) filedes.
*/
int term_replace (int oldfd, int newfd);
/*
* F term_apply
*
* Applies the settings stored in the nexttermios structure associated
* with the managed filedes "fd", to the respective terminal device.
* It then copies nexttermios to currtermios.
*
* Returns negative on failure, non negative on success. In case of
* failure the currtermios structure is not affected.
*/
int term_apply (int fd);
/*
* F term_revert
*
* Discards all the changes made to the nexttermios structure
* associated with the managed filedes "fd" that have not been applied
* to the device. It does this by copying currtermios to nexttermios.
*
* Returns negative on failure, non negative on success. Returns
* failure only to indicate invalid arguments, so the return value can
* be safely ignored.
*/
int term_revert (int fd);
/* F term_reset
*
* Reset the terminal device associated with the managed filedes "fd"
* to its "original" settings. This function applies the settings in
* the "origtermios" structure to the actual device. It also discards
* the settings in the "currtermios" and "nexttermios" stuctures by
* making them equal to "origtermios".
*
* Returns negative on failure, non-negative of success. On failure
* the the "origtermios", "currtermios", and "nexttermios" stuctures
* associated with the filedes remain unaffected.
*/
int term_reset (int fd);
/*
* F term_refresh
*
* Updates the contents of the currtermios structure associated with
* the managed filedes "fd", by reading the settings from the
* respective terminal device.
*
* Returns negative on failure, non negative on success. On failure
* the currtermios structure remains unaffected.
*/
int term_refresh (int fd);
/* F term_set_raw
*
* Sets the "nexttermios" structure associated with the managed
* filedes "fd" to raw mode. The effective settings of the device are
* not affected by this function.
*
* Returns negative on failure, non-negative on success. Returns
* failure only to indicate invalid arguments, so the return value can
* be safely ignored.
*
* When in raw mode, no characters are processed by the terminal
* driver and there is no line-discipline or buffering. More
* technically setting to raw mode means, affecting the following
* terminal settings as indicated:
*
* -ignbrk -brkint -parmrk -istrip -inlcr -igncr -icrnl -ixon
* -opost -echo -echonl -icannon -isig -iexten -csize -parenb
* cs8 min=1 time=0
*/
int term_set_raw (int fd);
/* F term_set_baudrate
*
* Sets the baudrate in the "nexttermios" structure associated with
* the managed filedes "fd" to "baudrate". The effective settings of
* the device are not affected by this function.
*
* Supported baudrates: 0, 50, 75, 110, 134, 150, 200, 300, 600, 1200,
* 1800, 2400, 4800, 9600, 19200, 38400, 57600, 115200, 230400
*
* Returns negative on failure, non negative on success. Returns
* failure only to indicate invalid arguments, so the return value can
* be safely ignored.
*/
int term_set_baudrate (int fd, int baudrate);
/* F term_set_parity
*
* Sets the parity mode in the "nexttermios" structure associated with
* the managed filedes "fd" to "parity". The effective settings of the
* device are not affected by this function.
*
* Supported parity modes are: p_even, p_odd, p_none.
*
* Returns negative on failure, non negative on success. Returns
* failure only to indicate invalid arguments, so the return value can
* be safely ignored.
*/
int term_set_parity (int fd, enum parity_e parity);
/* F term_set_databits
*
* Sets the databits number in the "nexttermios" structure associated
* with the managed filedes "fd" to "databits". The effective settings
* of the device are not affected by this function.
*
* 5, 6, 7, and 8 databits are supported by the library.
*
* Returns negative on failure, non negative on success. Returns
* failure only to indicate invalid arguments, so the return value can
* be safely ignored.
*/
int term_set_databits (int fd, int databits);
/* F term_set_flowcntrl
*
* Sets the folwcontrol mode in the "nexttermios" structure associated
* with the managed filedes "fd" to "flowcntl". The effective settings
* of the device are not affected by this function.
*
* The following flow control modes are supportd by the library:
* FC_NONE, FC_RTSCTS, FC_XONXOFF.
*
* Returns negative on failure, non negative on success. Returns
* failure only to indicate invalid arguments, so the return value can
* be safely ignored.
*/
int term_set_flowcntrl (int fd, enum flowcntrl_e flowcntl);
/* F term_set_hupcl
*
* Enables ("on" = nonzero) or disables ("on" = zero) the
* "HUP-on-close" setting in the "nexttermios" structure associated
* with the managed filedes "fd". The effective settings of the device
* are not affected by this function.
*
* Returns negative on failure, non negative on success. Returns
* failure only to indicate invalid arguments, so the return value can
* be safely ignored.
*/
int term_set_hupcl (int fd, int on);
/* F term_set_local.
*
* Enables ("local" = nonzero) or disables ("local" = zero) the
* "local-mode" setting in the "nexttermios" structure associated with
* the managed filedes "fd". The effective settings of the device are
* not affected by this function.
*
* Returns negative on failure, non negative on success. Returns
* failure only to indicate invalid arguments, so the return value can
* be safely ignored.
*/
int term_set_local (int fd, int local);
/* F temr_set
*
* Sets most of the parameters in the "nexttermios" structure
* associated with the managed filedes "fd". Actually sets the
* following:
*
* Raw mode if "raw" is nonzero.
* Baudrate to "baud".
* Parity mode to "parity".
* Flow control mode to "fc".
* Enables local mode if "local" is nonzero, dis. otherwise.
* Enables HUP-on-close if "hupcl" is nonzero, dis. otherwise
*
* The effective settings of the device are not affected by this
* function. Additionally if the filedes "fd" is not managed, it is
* added to the framework.
*
* Returns negative on failure, non negative on success. On failure
* none of the settings of "nexttermios" is affected. *If* the filedes
* "fd" is already in the framework, then the function returns failure
* only to indicate invalid arguments, so, in this case, the return
* value can be safely ignored. If the function successfully adds the
* filedes to the framework, and following this it fails, then it will
* remove the filedes before returning.
*/
int term_set (int fd,
int raw,
int baud,
enum parity_e parity, int bits, enum flowcntrl_e fc,
int local, int hupcl);
/* F term_pulse_dtr
*
* Pulses the DTR line of the device associated with the managed
* filedes "fd". The DTR line is lowered for 1sec and then raised
* again.
*
* Returns negative on failure, non negative on success.
*/
int term_pulse_dtr (int fd);
/* F term_lower_dtr
*
* Lowers the DTR line of the device associated with the managed
* filedes "fd".
*
* Returns negative on failure, non negative on success.
*/
int term_lower_dtr (int fd);
/* F term_raise_dtr
*
* Raises the DTR line of the device associated with the managed
* filedes "fd".
*
* Returns negative on failure, non negative on success.
*/
int term_raise_dtr (int fd);
/* F term_drain
*
* Drains (flushes) the output queue of the device associated with the
* managed filedes "fd". This functions blocks until all the contents
* of output queue have been transmited.
*
* Returns negative on failure, non negative on success.
*/
int term_drain (int fd);
/* F term_flush
*
* Discards all the contents of the input AND output queues of the
* device associated with the managed filedes "fd". Although it is
* called flush this functions does NOT FLUSHES the terminal
* queues. It just DISCARDS their contents. The name has stuck from
* the POSIX terminal call: "tcflush".
*
* Returns negative on failure, non negative on success.
*/
int term_flush (int fd);
/* F term_break
*
* This function generates a break condition on the device associated
* with the managed filedes "fd", by transmiting a stream of
* zero-bits. The stream of zero-bits has a duriation typically
* between 0.25 and 0.5 seconds.
*
* Returns negative on failure, non negative on success.
*/
int term_break(int fd);
/***************************************************************************/
#endif /* of TERM_H */
/***************************************************************************/
/*
* Local Variables:
* mode:c
* tab-width: 4
* c-basic-offset: 4
* End:
*/