~ubuntu-branches/ubuntu/raring/picprog/raring

« back to all changes in this revision

Viewing changes to testport.cc

  • Committer: Package Import Robot
  • Author(s): Koichi Akabe
  • Date: 2011-12-03 10:08:38 UTC
  • mfrom: (4.1.3 sid)
  • Revision ID: package-import@ubuntu.com-20111203100838-f05iyixkqjdh2byd
Tags: 1.9.1-2
* debian/control
  - changed priority from extra to optional
  - narrowed environments: linux-any kfreebsd-any

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/* -*- c++ -*-
2
2
 
3
3
This is Testport, simple serial port testing program.
4
 
Copyright © 2007 Jaakko Hyvätti
 
4
Copyright © 2007,2010 Jaakko Hyvätti
5
5
 
6
 
This program is free software; you can redistribute it and/or modify
7
 
it under the terms of the GNU General Public License version 2 as
8
 
published by the Free Software Foundation.
 
6
This program is free software: you can redistribute it and/or modify
 
7
it under the terms of the GNU General Public License as published by
 
8
the Free Software Foundation, either version 3 of the License, or
 
9
(at your option) any later version.
9
10
 
10
11
This program is distributed in the hope that it will be useful,
11
12
but WITHOUT ANY WARRANTY; without even the implied warranty of
13
14
GNU General Public License for more details.
14
15
 
15
16
You should have received a copy of the GNU General Public License
16
 
along with this program; if not, write to the Free Software Foundation,
17
 
Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
 
17
along with this program.  If not, see http://www.gnu.org/licenses/ .
18
18
 
19
19
The author may be contacted at:
20
20
 
23
23
Phone: +358 40 5011222
24
24
 
25
25
Please send any suggestions, bug reports, success stories etc. to the
26
 
Email address above.
 
26
Email address above.  Include word 'picprog' in the subject line to
 
27
make sure your email passes my spam filtering.
27
28
 
28
29
*/
29
30
 
31
32
#include <fstream>
32
33
#include <iomanip>
33
34
#include <string>
 
35
#include <cstring>
 
36
#include <cstdlib>
 
37
#include <cerrno>
 
38
#include <ctime>
34
39
 
35
40
#include <sys/ioctl.h>
36
41
#include <sys/io.h>
37
42
#include <fcntl.h>
38
 
#include <errno.h>
39
 
#include <time.h>
40
43
#include <sys/time.h>
41
 
#include <stdlib.h>
42
44
#include <unistd.h>
43
45
#include <termios.h>
44
46
#include <sysexits.h>
45
 
#include <string.h>
46
47
#include <sched.h>
47
48
 
48
49
using namespace std;