1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
|
$NetBSD: patch-ad,v 1.6 2004/07/10 17:08:53 kristerw Exp $
the addition of the -p flag is required for non-PC machines which
might use a different serial device.
--- main.c.orig 1995-11-04 23:48:33.000000000 +0100
+++ main.c 2004-07-10 19:01:57.000000000 +0200
@@ -5,7 +5,6 @@
#include <stdlib.h>
#include <termios.h>
#include <signal.h>
-#include <asm/io.h>
#include <config.h>
float freq_to_change_to;
char flag_data_return[5];
@@ -100,29 +99,29 @@
if (argc == 2) {
switch(argv[1][0]) {
case '0':
- if ((fdSer = open("/dev/ttyS0", O_RDWR )) < 0) {
- perror("open of /dev/ttyS0 failed!!!\n");
+ if ((fdSer = open("/dev/tty00", O_RDWR )) < 0) {
+ perror("open of /dev/tty00 failed!!!\n");
exit(3);
}
break;
case '1':
- if ((fdSer = open("/dev/ttyS1", O_RDWR )) < 0) {
- perror("open of /dev/ttyS1 failed!!!\n");
+ if ((fdSer = open("/dev/tty01", O_RDWR )) < 0) {
+ perror("open of /dev/tty01 failed!!!\n");
exit(3);
}
break;
case '2':
- if ((fdSer = open("/dev/ttyS2", O_RDWR )) < 0) {
- perror("open of /dev/ttyS2 failed");
+ if ((fdSer = open("/dev/tty02", O_RDWR )) < 0) {
+ perror("open of /dev/tty02 failed");
exit(3);
}
break;
case '3':
- if ((fdSer = open("/dev/ttyS3", O_RDWR )) < 0) {
- perror("open of /dev/ttyS3 failed");
+ if ((fdSer = open("/dev/tty03", O_RDWR )) < 0) {
+ perror("open of /dev/tty03 failed");
exit(3);
}
break;
@@ -130,6 +129,15 @@
printf("Invalid serial port number!!!\n Remember: com1 is 0, com2 is 1, etc.\n");
return(-1);
}
+ } else if (argc == 3) {
+ if (strcmp("-p",argv[1]) != 0) {
+ perror("Invalid flag");
+ exit(3);
+ }
+ if ((fdSer = open(argv[2], O_RDWR )) < 0) {
+ perror("open of serial port failed");
+ exit(3);
+ }
} else {
printf("usage: yaesu [port #]\n");
exit(3);
@@ -139,20 +147,20 @@
bye_msg() {
-printf("\n
-Thank you for using KG0CQ's 'yaesu' program, this is version .1lx.
-You may use this program for as long as you like, it will always
-be free to use, no matter what version. You may distribute this
-program freely so long as it distributed in and with the original
-zipfile or tar file. Please do not distribute modifed versions.
-A nice Windows version, DOS console version, Linux console, and
-Linux X version should be on their way in the coming months.
-If you wish to support the author's efforts just say thanks via
-email or packet!
-
- email: drranu@holly.ColoState.EDU
- packet: KG0CQ@KF0UW.#NECO.USA.NOAM
-
+printf("\n\n\
+Thank you for using KG0CQ's 'yaesu' program, this is version .1lx.\n\
+You may use this program for as long as you like, it will always \n\
+be free to use, no matter what version. You may distribute this \n\
+program freely so long as it distributed in and with the original \n\
+zipfile or tar file. Please do not distribute modifed versions. \n\
+A nice Windows version, DOS console version, Linux console, and \n\
+Linux X version should be on their way in the coming months. \n\
+If you wish to support the author's efforts just say thanks via\n\
+email or packet!\n\
+\n\
+ email: drranu@holly.ColoState.EDU\n\
+ packet: KG0CQ@KF0UW.#NECO.USA.NOAM\n\
+\n\
Having fun hamming, hope to catch you on the air!!!\n\n");
}
|