summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjoerg <joerg@pkgsrc.org>2012-10-24 15:37:58 +0000
committerjoerg <joerg@pkgsrc.org>2012-10-24 15:37:58 +0000
commitb05281ef64c92469348a8fe509d57eb4e814795c (patch)
tree7a9102f71dec0373fd562f60d55d63aeb3a20f9d
parent5745857b98cf6ccdea883d510e79121447310e2b (diff)
downloadpkgsrc-b05281ef64c92469348a8fe509d57eb4e814795c.tar.gz
Fix missing system header, inconsistent function definitions, return; in
non-void functions. Bump revision.
-rw-r--r--ham/yaesu/Makefile3
-rw-r--r--ham/yaesu/distinfo36
-rw-r--r--ham/yaesu/patches/patch-ad77
-rw-r--r--ham/yaesu/patches/patch-ae30
-rw-r--r--ham/yaesu/patches/patch-aux.c15
-rw-r--r--ham/yaesu/patches/patch-bright.c14
-rw-r--r--ham/yaesu/patches/patch-clar.c18
-rw-r--r--ham/yaesu/patches/patch-ctcss.c15
-rw-r--r--ham/yaesu/patches/patch-freq__out.c16
-rw-r--r--ham/yaesu/patches/patch-ham__gen.c15
-rw-r--r--ham/yaesu/patches/patch-lock.c15
-rw-r--r--ham/yaesu/patches/patch-mem__2vfo.c15
-rw-r--r--ham/yaesu/patches/patch-mem__hide.c14
-rw-r--r--ham/yaesu/patches/patch-mem__rec.c15
-rw-r--r--ham/yaesu/patches/patch-mem__scsk.c13
-rw-r--r--ham/yaesu/patches/patch-mode.c29
-rw-r--r--ham/yaesu/patches/patch-outport.c13
-rw-r--r--ham/yaesu/patches/patch-pacing.c18
-rw-r--r--ham/yaesu/patches/patch-ptt.c15
-rw-r--r--ham/yaesu/patches/patch-rd__flags.c15
-rw-r--r--ham/yaesu/patches/patch-repeater.c15
-rw-r--r--ham/yaesu/patches/patch-rptr__off.c15
-rw-r--r--ham/yaesu/patches/patch-save__mem.c22
-rw-r--r--ham/yaesu/patches/patch-splt__tog.c15
-rw-r--r--ham/yaesu/patches/patch-stat__out.c62
-rw-r--r--ham/yaesu/patches/patch-stat__upd.c17
-rw-r--r--ham/yaesu/patches/patch-step.c15
-rw-r--r--ham/yaesu/patches/patch-strt__tun.c15
-rw-r--r--ham/yaesu/patches/patch-tuner10.c15
-rw-r--r--ham/yaesu/patches/patch-vfo__2mem.c15
-rw-r--r--ham/yaesu/patches/patch-vfo__a2b.c15
-rw-r--r--ham/yaesu/patches/patch-vfo__ab.c15
-rw-r--r--ham/yaesu/patches/patch-wwv__find.c27
-rw-r--r--ham/yaesu/patches/patch-yaesu.c13
34 files changed, 657 insertions, 20 deletions
diff --git a/ham/yaesu/Makefile b/ham/yaesu/Makefile
index 6a096579399..fed4f0fb8cd 100644
--- a/ham/yaesu/Makefile
+++ b/ham/yaesu/Makefile
@@ -1,7 +1,8 @@
-# $NetBSD: Makefile,v 1.8 2012/10/03 13:01:46 asau Exp $
+# $NetBSD: Makefile,v 1.9 2012/10/24 15:37:58 joerg Exp $
#
DISTNAME= yaesu-0.13
+PKGREVISION= 1
CATEGORIES= ham
MASTER_SITES= ${MASTER_SITE_SUNSITE:=apps/ham/}
diff --git a/ham/yaesu/distinfo b/ham/yaesu/distinfo
index 891df1fc8ed..1c887855c28 100644
--- a/ham/yaesu/distinfo
+++ b/ham/yaesu/distinfo
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.9 2006/01/14 11:45:46 wulf Exp $
+$NetBSD: distinfo,v 1.10 2012/10/24 15:37:58 joerg Exp $
SHA1 (yaesu-0.13.tar.gz) = 188cd4f472bc191c0467f09cfd5d7df79a7b280b
RMD160 (yaesu-0.13.tar.gz) = 779c982112255c72f4fb1d95d8921714aa266bb8
@@ -6,5 +6,35 @@ Size (yaesu-0.13.tar.gz) = 26388 bytes
SHA1 (patch-aa) = 3b0181d8989dd6f69eb4e9f486a552d17f301908
SHA1 (patch-ab) = d51cb63253878428c9b751d64a138c7a0e54cbba
SHA1 (patch-ac) = cd5ee0384a53f436e07b4cec904c3a2176a40cdf
-SHA1 (patch-ad) = bc2029bf88a8b55e9484f27ec36bcc64dc68cc5a
-SHA1 (patch-ae) = e88f6f0742414abc1b5c533b88f94dd6e5fa2c48
+SHA1 (patch-ad) = 9ed611c78cfd5bae2e825a76b2af02eb1d4ddb9d
+SHA1 (patch-ae) = bdeb565940a70912bf03a0909eeccdfad30b928e
+SHA1 (patch-aux.c) = c9d4bd5dea9da933e16fcbe773f8b2462dd2c4fd
+SHA1 (patch-bright.c) = 6c4e2d6267b7ad1830894e2a611aa952b54fddb7
+SHA1 (patch-clar.c) = de407eb7614344e7ede24463819745dc3fbabfc6
+SHA1 (patch-ctcss.c) = 36bb06700194972f1f5da5f03a5efd53a2eca404
+SHA1 (patch-freq__out.c) = 8c8c560ff40539bc357048e4907b493438db22e7
+SHA1 (patch-ham__gen.c) = 6364b04ef9e1fb152fe251c3be01ab8bd37ceb52
+SHA1 (patch-lock.c) = c0f48d03973da8bfbca684d71c3c627eed9da626
+SHA1 (patch-mem__2vfo.c) = 0ae9ed46a6385d31f86e30cb27d0625e862c53b5
+SHA1 (patch-mem__hide.c) = ed040280149aa63c007606514ac2f311dd8fb7c5
+SHA1 (patch-mem__rec.c) = d7f28fd113f400054089bf595982a539bffe9e12
+SHA1 (patch-mem__scsk.c) = 1bf11f933a207eb4fc4034a113a93b6d80f5aec4
+SHA1 (patch-mode.c) = df61a11f4c3e678d827b7cc2b7b19829e1ccb5be
+SHA1 (patch-outport.c) = e1c9dc0aea69c745719165d018970c2cbde93f4b
+SHA1 (patch-pacing.c) = 173871b66de7fc2b5d8e2aea7c6558f019674029
+SHA1 (patch-ptt.c) = 567612d9fa0a91dc75c1e618b29ca1d08bfa9ff5
+SHA1 (patch-rd__flags.c) = 508723a7b850511ece4589ca965fb255b6c0fc9d
+SHA1 (patch-repeater.c) = 70176b7b4116ae5180177fa145cc894a6adf3685
+SHA1 (patch-rptr__off.c) = 24a2c2f5954e643d070b318900f0f75a320108a0
+SHA1 (patch-save__mem.c) = 03b0c8d045c5c0f68b9fb852cdaaae03360dcf6d
+SHA1 (patch-splt__tog.c) = 9c72f0e5e490128ef9b89bc8a784c7befdcdc272
+SHA1 (patch-stat__out.c) = 0d37d831af8e9ba93ac9f3fdc1c6de8fed97dc61
+SHA1 (patch-stat__upd.c) = 6fc172ab3cc3ee87d3af642a1391f7c59689693b
+SHA1 (patch-step.c) = 84bba0e93c32eb80a77cc5e57aedf9b681432afb
+SHA1 (patch-strt__tun.c) = 11616e796046869b19962d010062991cdb634a41
+SHA1 (patch-tuner10.c) = 7f90b3efc9e2b30490ff03a7c417efacf156b671
+SHA1 (patch-vfo__2mem.c) = 6ffab76f4940e6b0b8a25301ee8c540cdaf5db1d
+SHA1 (patch-vfo__a2b.c) = 368821a1ff98e401061bcab886c9aa93e5f95fbe
+SHA1 (patch-vfo__ab.c) = 0c8a1c882236004dada2c2ccbba5a9c490bec2e7
+SHA1 (patch-wwv__find.c) = f74d7196362c0bbe8546937004815e119c6f53e5
+SHA1 (patch-yaesu.c) = 37e46559d06c50ba104a49fc5402c142fd2c9aa4
diff --git a/ham/yaesu/patches/patch-ad b/ham/yaesu/patches/patch-ad
index 9045f79fab2..da94d12288c 100644
--- a/ham/yaesu/patches/patch-ad
+++ b/ham/yaesu/patches/patch-ad
@@ -1,16 +1,66 @@
-$NetBSD: patch-ad,v 1.7 2006/01/14 11:45:46 wulf Exp $
+$NetBSD: patch-ad,v 1.8 2012/10/24 15:38:00 joerg Exp $
---- main.c.orig 2004-07-27 11:56:47.000000000 +0930
-+++ main.c 2006-01-14 22:59:42.000000000 +1030
-@@ -5,7 +5,6 @@
+--- main.c.orig 2004-07-27 02:26:47.000000000 +0000
++++ main.c
+@@ -5,8 +5,13 @@
#include <stdlib.h>
#include <termios.h>
#include <signal.h>
-#include <asm/io.h>
- #include <config.h>
+-#include <config.h>
++#include "config.h"
++
++#include "yaesu.h"
++
++static void bye_msg(void);
++static int port_open(int, char*[]);
++
float freq_to_change_to;
char flag_data_return[5];
-@@ -100,29 +99,29 @@
+ char data_array[650];
+@@ -24,34 +29,6 @@ int main(int argc, char* argv[]) {
+ char flag_data_return[5];
+ struct termios termattribs;
+ struct termios *defaults_serial;
+- extern splt_tog();
+- extern freq_out();
+- extern mem_rec();
+- extern vfo_2mem();
+- extern mem_hide();
+- extern mem_2vfo();
+- extern step();
+- extern lock();
+- extern vfo_ab();
+- extern clar();
+- extern ham_gen();
+- extern ptt();
+- extern tuner10();
+- extern stat_up();
+- extern bright();
+- extern mode();
+- extern strt_tun();
+- extern meter_rd();
+- extern rd_flags();
+- extern rptr_off();
+- extern reptear();
+- extern ctcss();
+- extern stat_out();
+- extern aux();
+- extern wwv_find();
+- extern outport();
+- void yaesu();
+- void cleanup();
+ signal(SIGINT, cleanup);
+ yaesu_return = 1;
+
+@@ -94,35 +71,35 @@ int main(int argc, char* argv[]) {
+ /*
+ * This function returns the fd for the serial port.
+ */
+-port_open(int argc, char* argv[]) {
++static int port_open(int argc, char* argv[]) {
+ int fdSer;
+
if (argc == 2) {
switch(argv[1][0]) {
case '0':
@@ -48,7 +98,7 @@ $NetBSD: patch-ad,v 1.7 2006/01/14 11:45:46 wulf Exp $
exit(3);
}
break;
-@@ -130,6 +129,15 @@
+@@ -130,6 +107,15 @@ port_open(int argc, char* argv[]) {
printf("Invalid serial port number!!!\n Remember: com1 is 0, com2 is 1, etc.\n");
return(-1);
}
@@ -64,13 +114,16 @@ $NetBSD: patch-ad,v 1.7 2006/01/14 11:45:46 wulf Exp $
} else {
printf("usage: yaesu [port #]\n");
exit(3);
-@@ -139,8 +147,21 @@
-
- bye_msg() {
+@@ -137,10 +123,23 @@ port_open(int argc, char* argv[]) {
+ return(fdSer);
+ }
--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 or packet: KG0CQ@KF0UW.#NECO.USA.NOAM Having fun hamming, hope to catch you on the air!!!\n\n");
+-bye_msg() {
-
-++printf("\n\n\
+-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 or packet: KG0CQ@KF0UW.#NECO.USA.NOAM Having fun hamming, hope to catch you on the air!!!\n\n");
++static void bye_msg(void) {
+
++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\
diff --git a/ham/yaesu/patches/patch-ae b/ham/yaesu/patches/patch-ae
index 32f54a23e43..818e2c706fd 100644
--- a/ham/yaesu/patches/patch-ae
+++ b/ham/yaesu/patches/patch-ae
@@ -1,8 +1,30 @@
-$NetBSD: patch-ae,v 1.2 2006/01/14 11:45:46 wulf Exp $
+$NetBSD: patch-ae,v 1.3 2012/10/24 15:38:00 joerg Exp $
---- meter_rd.c.orig 2004-07-27 11:57:32.000000000 +0930
-+++ meter_rd.c 2006-01-14 23:05:46.000000000 +1030
-@@ -33,7 +33,8 @@
+--- meter_rd.c.orig 2004-07-27 02:27:32.000000000 +0000
++++ meter_rd.c
+@@ -1,10 +1,8 @@
+-extern main();
+-extern flag_data_return[];
+-extern outport();
++#include "yaesu.h"
+
+ int meter_rd(int fdSer) {
+ int opcode, tx_status, n;
+- char meter_value[5];
++ char meter_value[6];
+
+ opcode = 250;
+ rd_flags(fdSer);
+@@ -13,7 +11,7 @@ int meter_rd(int fdSer) {
+
+ if (tx_status != 1 && tx_status != 0) {
+ printf("The tx_status bit value is incorrect. Serious program error!!!\n");
+- return;
++ return -1;
+ } else {
+ opcode = 0x0f7;
+ }
+@@ -33,7 +31,8 @@ int meter_rd(int fdSer) {
n = n +1;
}
if (meter_value[5] != 0x0f7) {
diff --git a/ham/yaesu/patches/patch-aux.c b/ham/yaesu/patches/patch-aux.c
new file mode 100644
index 00000000000..e40294750ad
--- /dev/null
+++ b/ham/yaesu/patches/patch-aux.c
@@ -0,0 +1,15 @@
+$NetBSD: patch-aux.c,v 1.1 2012/10/24 15:38:00 joerg Exp $
+
+--- aux.c.orig 2012-10-21 10:06:08.000000000 +0000
++++ aux.c
+@@ -1,8 +1,6 @@
+-extern main();
+-extern freq_read();
+-extern aux_comeback;
++#include "yaesu.h"
+
+-aux(int fdSer) {
++void aux(int fdSer) {
+ int selector;
+ printf("\n1) status_output - Read frequency.\n");
+ printf("2) wwv_find - Find strongest WWV station and set frequency.\n");
diff --git a/ham/yaesu/patches/patch-bright.c b/ham/yaesu/patches/patch-bright.c
new file mode 100644
index 00000000000..42bb0db756f
--- /dev/null
+++ b/ham/yaesu/patches/patch-bright.c
@@ -0,0 +1,14 @@
+$NetBSD: patch-bright.c,v 1.1 2012/10/24 15:38:00 joerg Exp $
+
+--- bright.c.orig 2012-10-21 10:06:08.000000000 +0000
++++ bright.c
+@@ -1,7 +1,6 @@
+-extern main();
+-extern opcode();
++#include "yaesu.h"
+
+-bright(int fdSer) {
++void bright(int fdSer) {
+ int opcode, bright_level;
+ opcode = 0x0f8;
+ printf("Enter brightness level: 0..7 [brightest] -> ");
diff --git a/ham/yaesu/patches/patch-clar.c b/ham/yaesu/patches/patch-clar.c
new file mode 100644
index 00000000000..06edb04cbe1
--- /dev/null
+++ b/ham/yaesu/patches/patch-clar.c
@@ -0,0 +1,18 @@
+$NetBSD: patch-clar.c,v 1.1 2012/10/24 15:38:00 joerg Exp $
+
+--- clar.c.orig 2012-10-21 10:06:08.000000000 +0000
++++ clar.c
+@@ -1,11 +1,6 @@
+-extern main();
+-extern data_array[];
+-extern data_return_param;
+-extern flag_data_return[];
+-extern memory_number;
+-extern outport();
++#include "yaesu.h"
+
+-clar(int fdSer) {
++void clar(int fdSer) {
+ int opcode, vfo_a_b_op, vfo_b_op, mem_op, clar_finder, n, kHz_freq, Hz_freq;
+ int up_down, dummy;
+
diff --git a/ham/yaesu/patches/patch-ctcss.c b/ham/yaesu/patches/patch-ctcss.c
new file mode 100644
index 00000000000..90c08c2393d
--- /dev/null
+++ b/ham/yaesu/patches/patch-ctcss.c
@@ -0,0 +1,15 @@
+$NetBSD: patch-ctcss.c,v 1.1 2012/10/24 15:38:00 joerg Exp $
+
+--- ctcss.c.orig 2012-10-21 10:06:08.000000000 +0000
++++ ctcss.c
+@@ -1,8 +1,6 @@
+-extern main();
+-extern flag_data_return[];
+-extern outport();
++#include "yaesu.h"
+
+-ctcss(int fdSer) {
++void ctcss(int fdSer) {
+ int opcode, n, tx_mode;
+ float ctcss_user_value;
+ float ctcss_freq[34] = {67, 71.9, 77.0, 82.5, 88.5, 94.8, 100, 103.5, 107.2, 110.9, 114.8, 118.8, 123, 127.3, 131.8, 136.5, 141.3, 146.2, 151.4, 156.7, 162.2, 167.9, 173.8, 179.9, 186.2, 192.8, 203.5, 210.7, 218.1, 225.7, 233.6, 241.8, 250.3, 9};
diff --git a/ham/yaesu/patches/patch-freq__out.c b/ham/yaesu/patches/patch-freq__out.c
new file mode 100644
index 00000000000..eb25ee21411
--- /dev/null
+++ b/ham/yaesu/patches/patch-freq__out.c
@@ -0,0 +1,16 @@
+$NetBSD: patch-freq__out.c,v 1.1 2012/10/24 15:38:01 joerg Exp $
+
+--- freq_out.c.orig 2012-10-21 10:06:08.000000000 +0000
++++ freq_out.c
+@@ -1,9 +1,6 @@
+-extern main();
+-extern float freq_to_change_to;
+-extern flag_data_return[];
+-extern outport();
++#include "yaesu.h"
+
+-freq_out(int fdSer) {
++void freq_out(int fdSer) {
+ int tens_MHz, ones_MHz, hundreds_kHz, tens_kHz, packed_oh_MkHz, ones_kHz;
+ int packed_to_kHz, hundreds_Hz, tens_Hz, packed_ht_Hz, opcode, tx_mode;
+
diff --git a/ham/yaesu/patches/patch-ham__gen.c b/ham/yaesu/patches/patch-ham__gen.c
new file mode 100644
index 00000000000..b46108d88e6
--- /dev/null
+++ b/ham/yaesu/patches/patch-ham__gen.c
@@ -0,0 +1,15 @@
+$NetBSD: patch-ham__gen.c,v 1.1 2012/10/24 15:38:01 joerg Exp $
+
+--- ham_gen.c.orig 2012-10-21 10:06:08.000000000 +0000
++++ ham_gen.c
+@@ -1,8 +1,6 @@
+-extern main();
+-extern flag_data_return[];
+-extern outport();
++#include "yaesu.h"
+
+-ham_gen(int fdSer) {
++void ham_gen(int fdSer) {
+ int opcode, ham_gen_byte;
+
+ rd_flags(fdSer);
diff --git a/ham/yaesu/patches/patch-lock.c b/ham/yaesu/patches/patch-lock.c
new file mode 100644
index 00000000000..436569b4cc7
--- /dev/null
+++ b/ham/yaesu/patches/patch-lock.c
@@ -0,0 +1,15 @@
+$NetBSD: patch-lock.c,v 1.1 2012/10/24 15:38:01 joerg Exp $
+
+--- lock.c.orig 2012-10-21 10:06:08.000000000 +0000
++++ lock.c
+@@ -1,8 +1,6 @@
+-extern main();
+-extern flag_data_return[];
+-extern outport();
++#include "yaesu.h"
+
+-lock(int fdSer) {
++void lock(int fdSer) {
+ int opcode, lock_toggler;
+ char locker;
+ rd_flags(fdSer);
diff --git a/ham/yaesu/patches/patch-mem__2vfo.c b/ham/yaesu/patches/patch-mem__2vfo.c
new file mode 100644
index 00000000000..bae010266b5
--- /dev/null
+++ b/ham/yaesu/patches/patch-mem__2vfo.c
@@ -0,0 +1,15 @@
+$NetBSD: patch-mem__2vfo.c,v 1.1 2012/10/24 15:38:01 joerg Exp $
+
+--- mem_2vfo.c.orig 2012-10-21 10:06:08.000000000 +0000
++++ mem_2vfo.c
+@@ -1,8 +1,6 @@
+-extern main();
+-extern flag_data_return[];
+-extern outport();
++#include "yaesu.h"
+
+-mem_2vfo(int fdSer) {
++void mem_2vfo(int fdSer) {
+ int opcode, memory_number, bogus, tx_mode;
+ bogus = 1;
+
diff --git a/ham/yaesu/patches/patch-mem__hide.c b/ham/yaesu/patches/patch-mem__hide.c
new file mode 100644
index 00000000000..8c5e1e3c4cd
--- /dev/null
+++ b/ham/yaesu/patches/patch-mem__hide.c
@@ -0,0 +1,14 @@
+$NetBSD: patch-mem__hide.c,v 1.1 2012/10/24 15:38:02 joerg Exp $
+
+--- mem_hide.c.orig 2012-10-21 10:06:08.000000000 +0000
++++ mem_hide.c
+@@ -1,7 +1,6 @@
+-extern main();
+-extern outport();
++#include "yaesu.h"
+
+-mem_hide(int fdSer) {
++void mem_hide(int fdSer) {
+ int opcode, memory_number, hide_byte;
+ char hide_char;
+
diff --git a/ham/yaesu/patches/patch-mem__rec.c b/ham/yaesu/patches/patch-mem__rec.c
new file mode 100644
index 00000000000..9ea025c0b4f
--- /dev/null
+++ b/ham/yaesu/patches/patch-mem__rec.c
@@ -0,0 +1,15 @@
+$NetBSD: patch-mem__rec.c,v 1.1 2012/10/24 15:38:02 joerg Exp $
+
+--- mem_rec.c.orig 2012-10-21 10:06:08.000000000 +0000
++++ mem_rec.c
+@@ -1,8 +1,6 @@
+-extern main();
+-extern flag_data_return[];
+-extern outport();
++#include "yaesu.h"
+
+-mem_rec(int fdSer) {
++void mem_rec(int fdSer) {
+ int opcode;
+ int memory_number, tx_mode;
+
diff --git a/ham/yaesu/patches/patch-mem__scsk.c b/ham/yaesu/patches/patch-mem__scsk.c
new file mode 100644
index 00000000000..4570f7cd4be
--- /dev/null
+++ b/ham/yaesu/patches/patch-mem__scsk.c
@@ -0,0 +1,13 @@
+$NetBSD: patch-mem__scsk.c,v 1.1 2012/10/24 15:38:02 joerg Exp $
+
+--- mem_scsk.c.orig 2012-10-21 10:06:08.000000000 +0000
++++ mem_scsk.c
+@@ -1,6 +1,6 @@
+-extern main();
++#include "yaesu.h"
+
+-mem_scsk(int fdSer) {
++void mem_scsk(int fdSer) {
+ int opcode, memory_channel, scanning_include;
+
+ opcode = 0x8d;
diff --git a/ham/yaesu/patches/patch-mode.c b/ham/yaesu/patches/patch-mode.c
new file mode 100644
index 00000000000..a069a0a87ca
--- /dev/null
+++ b/ham/yaesu/patches/patch-mode.c
@@ -0,0 +1,29 @@
+$NetBSD: patch-mode.c,v 1.1 2012/10/24 15:38:03 joerg Exp $
+
+--- mode.c.orig 2012-10-21 10:06:08.000000000 +0000
++++ mode.c
+@@ -1,9 +1,8 @@
+-extern main();
+-extern flag_data_return[];
+-extern outport();
++#include "yaesu.h"
+
+-mode (int fdSer) {
+- int opcode, mode, mode_num, tx_mode, bogus;
++void mode (int fdSer) {
++ int opcode, mode_num, tx_mode, bogus;
++ char mode;
+ char cw_width, am_width;
+
+ rd_flags(fdSer);
+@@ -14,8 +13,8 @@ mode (int fdSer) {
+ return;
+ }
+ printf("Input mode (single letter) -> ");
+- scanf(" %s", &mode);
+- mode = tolower(mode);
++ scanf(" %c", &mode);
++ mode = tolower((unsigned char)mode);
+ switch(mode)
+ {
+ case 'l':
diff --git a/ham/yaesu/patches/patch-outport.c b/ham/yaesu/patches/patch-outport.c
new file mode 100644
index 00000000000..820d630da4c
--- /dev/null
+++ b/ham/yaesu/patches/patch-outport.c
@@ -0,0 +1,13 @@
+$NetBSD: patch-outport.c,v 1.1 2012/10/24 15:38:03 joerg Exp $
+
+--- outport.c.orig 2012-10-21 10:06:08.000000000 +0000
++++ outport.c
+@@ -1,6 +1,6 @@
+-extern main();
++#include "yaesu.h"
+
+-outport(int fdSer, int one, int two, int three, int four, int opcode) {
++void outport(int fdSer, int one, int two, int three, int four, int opcode) {
+
+ write(fdSer,&one,1);
+ write(fdSer,&two,1);
diff --git a/ham/yaesu/patches/patch-pacing.c b/ham/yaesu/patches/patch-pacing.c
new file mode 100644
index 00000000000..6de90278172
--- /dev/null
+++ b/ham/yaesu/patches/patch-pacing.c
@@ -0,0 +1,18 @@
+$NetBSD: patch-pacing.c,v 1.1 2012/10/24 15:38:03 joerg Exp $
+
+--- pacing.c.orig 2012-10-21 10:06:08.000000000 +0000
++++ pacing.c
+@@ -1,10 +1,8 @@
+-extern main();
+-extern outport();
+-
+-#include <config.h>
++#include "yaesu.h"
++#include "config.h"
+
+ /* Make sure pacing is set for the most speed */
+-pacing(int fdSer) {
++void pacing(int fdSer) {
+ int opcode;
+
+ opcode = 14;
diff --git a/ham/yaesu/patches/patch-ptt.c b/ham/yaesu/patches/patch-ptt.c
new file mode 100644
index 00000000000..767d751eb1c
--- /dev/null
+++ b/ham/yaesu/patches/patch-ptt.c
@@ -0,0 +1,15 @@
+$NetBSD: patch-ptt.c,v 1.1 2012/10/24 15:38:04 joerg Exp $
+
+--- ptt.c.orig 2012-10-21 10:06:08.000000000 +0000
++++ ptt.c
+@@ -1,8 +1,6 @@
+-extern main();
+-extern flag_data_return[];
+-extern outport();
++#include "yaesu.h"
+
+-ptt(int fdSer) {
++void ptt(int fdSer) {
+ int opcode, tx_status, cat_tx_status;
+
+ /* We have to make sure we can tx, we need to look for tx inhibitors */
diff --git a/ham/yaesu/patches/patch-rd__flags.c b/ham/yaesu/patches/patch-rd__flags.c
new file mode 100644
index 00000000000..58783de0386
--- /dev/null
+++ b/ham/yaesu/patches/patch-rd__flags.c
@@ -0,0 +1,15 @@
+$NetBSD: patch-rd__flags.c,v 1.1 2012/10/24 15:38:04 joerg Exp $
+
+--- rd_flags.c.orig 2012-10-21 10:06:08.000000000 +0000
++++ rd_flags.c
+@@ -1,8 +1,6 @@
+-extern main();
+-extern flag_data_return[];
+-extern outport();
++#include "yaesu.h"
+
+-rd_flags(int fdSer) {
++void rd_flags(int fdSer) {
+ int opcode, split_byte, n;
+
+ opcode = 250;
diff --git a/ham/yaesu/patches/patch-repeater.c b/ham/yaesu/patches/patch-repeater.c
new file mode 100644
index 00000000000..d615ac44568
--- /dev/null
+++ b/ham/yaesu/patches/patch-repeater.c
@@ -0,0 +1,15 @@
+$NetBSD: patch-repeater.c,v 1.1 2012/10/24 15:38:04 joerg Exp $
+
+--- repeater.c.orig 2012-10-21 10:06:08.000000000 +0000
++++ repeater.c
+@@ -1,8 +1,6 @@
+-extern main();
+-extern flag_data_return[];
+-extern outport();
++#include "yaesu.h"
+
+-repeater_simplex(int fdSer) {
++void repeater_simplex(int fdSer) {
+ int opcode, rptr_simplex, fm_byte, tx_mode;
+
+ rd_flags(fdSer);
diff --git a/ham/yaesu/patches/patch-rptr__off.c b/ham/yaesu/patches/patch-rptr__off.c
new file mode 100644
index 00000000000..56e50c61454
--- /dev/null
+++ b/ham/yaesu/patches/patch-rptr__off.c
@@ -0,0 +1,15 @@
+$NetBSD: patch-rptr__off.c,v 1.1 2012/10/24 15:38:04 joerg Exp $
+
+--- rptr_off.c.orig 2012-10-21 10:06:08.000000000 +0000
++++ rptr_off.c
+@@ -1,8 +1,6 @@
+-extern main();
+-extern flag_data_return[];
+-extern outport();
++#include "yaesu.h"
+
+-rptr_off(int fdSer) {
++void rptr_off(int fdSer) {
+ int hundreds_kHz, tens_kHz, ones_kHz, fm_byte, tx_mode;
+ int packed_to_kHz, hundreds_Hz, tens_Hz, packed_ht_Hz, opcode;
+ float freq;
diff --git a/ham/yaesu/patches/patch-save__mem.c b/ham/yaesu/patches/patch-save__mem.c
new file mode 100644
index 00000000000..9a39542621a
--- /dev/null
+++ b/ham/yaesu/patches/patch-save__mem.c
@@ -0,0 +1,22 @@
+$NetBSD: patch-save__mem.c,v 1.1 2012/10/24 15:38:05 joerg Exp $
+
+--- save_mem.c.orig 2012-10-21 10:06:08.000000000 +0000
++++ save_mem.c
+@@ -1,14 +1,9 @@
+ #include <sys/file.h>
+ #include <stdio.h>
+-#include <config.h>
+-extern main();
+-extern stat_upd();
+-extern rd_flags();
+-extern int data_return_param;
+-extern data_array[];
+-extern outport();
++#include "config.h"
++#include "yaesu.h"
+
+-mem_save(int fdSer) {
++void mem_save(int fdSer) {
+ int opcode, n, freq;
+ int memory_contents[650];
+ FILE *mem_fd;
diff --git a/ham/yaesu/patches/patch-splt__tog.c b/ham/yaesu/patches/patch-splt__tog.c
new file mode 100644
index 00000000000..ed7f9124a73
--- /dev/null
+++ b/ham/yaesu/patches/patch-splt__tog.c
@@ -0,0 +1,15 @@
+$NetBSD: patch-splt__tog.c,v 1.1 2012/10/24 15:38:05 joerg Exp $
+
+--- splt_tog.c.orig 2012-10-21 10:06:08.000000000 +0000
++++ splt_tog.c
+@@ -1,8 +1,6 @@
+-extern main();
+-extern flag_data_return[];
+-extern outport();
++#include "yaesu.h"
+
+-splt_tog(int fdSer) {
++void splt_tog(int fdSer) {
+ int opcode, split_toggler, split_byte, tx_mode;
+ rd_flags(fdSer);
+ tx_mode = flag_data_return[3];
diff --git a/ham/yaesu/patches/patch-stat__out.c b/ham/yaesu/patches/patch-stat__out.c
new file mode 100644
index 00000000000..fd032b91a19
--- /dev/null
+++ b/ham/yaesu/patches/patch-stat__out.c
@@ -0,0 +1,62 @@
+$NetBSD: patch-stat__out.c,v 1.1 2012/10/24 15:38:05 joerg Exp $
+
+--- stat_out.c.orig 2012-10-21 10:06:08.000000000 +0000
++++ stat_out.c
+@@ -1,20 +1,8 @@
+-extern main();
+-extern data_array[];
+-extern data_return_param;
+-extern flag_data_return[];
+-extern memory_number;
+-extern mode1;
+-extern mode2;
+-extern mode3;
+-extern narrow1;
+-extern narrow2;
+-extern narrow3;
+-extern narrow4;
+-extern narrow5;
+-extern narrow6;
+-extern white_space;
++#include "yaesu.h"
+
+-stat_out(int fdSer, int current_freq_mode) {
++void find_mode(int, int);
++
++void stat_out(int fdSer, int current_freq_mode) {
+ /*
+ * This function is intended to be called via some other function
+ * that needs some kind of output. current_freq_mode is the
+@@ -55,7 +43,7 @@ output_freq:
+ freq_fl = freq;
+ freq_fl = freq_fl/100000;
+ find_mode(data_array[7], data_array[9]);
+- printf("\nThe current VFO frequency in VFO A is %.5f MHz, operating in %c%c%c%c%c%c%c%c%c%c%c.\n", freq_fl, mode1, mode2, mode3, white_space, narrow1, narrow2, narrow3, narrow4, narrow5, narrow6);
++ printf("\nThe current VFO frequency in VFO A is %.5f MHz, operating in %c%c%c%c%c%c%c%c%c%c.\n", freq_fl, mode1, mode2, mode3, white_space, narrow1, narrow2, narrow3, narrow4, narrow5, narrow6);
+ /* printf("\nThe current VFO frequency in VFO A is %d.%d%d MHz, operating in %c%c%c%c%c%c%c%c%c%c%c.\n", freq_MHz, freq_kHz, freq_htHz, mode1, mode2, mode3, white_space, narrow1, narrow2, narrow3, narrow4, narrow5, narrow6); */
+ }
+ if (vfo_a_b_op == 1 && vfo_b_op == 1 && mem_op == 0) {
+@@ -71,7 +59,7 @@ output_freq:
+ freq_fl = freq;
+ freq_fl = freq_fl/100000;
+ find_mode(data_array[16], data_array[18]);
+- printf("\nThe current VFO frequency in VFO B is %.5f MHz, operating in %c%c%c%c%c%c%c%c%c%c%c.\n", freq_fl, mode1, mode2, mode3, white_space, narrow1, narrow2, narrow3, narrow4, narrow5, narrow6);
++ printf("\nThe current VFO frequency in VFO B is %.5f MHz, operating in %c%c%c%c%c%c%c%c%c%c.\n", freq_fl, mode1, mode2, mode3, white_space, narrow1, narrow2, narrow3, narrow4, narrow5, narrow6);
+ /* printf("\nThe current VFO frequency in VFO B is %d.%d%d MHz, operating in %c%c%c%c%c%c%c%c%c%c%c.\n", freq_MHz, freq_kHz, freq_htHz, mode1, mode2, mode3, white_space, narrow1, narrow2, narrow3, narrow4, narrow5, narrow6); */
+
+ }
+@@ -92,12 +80,12 @@ output_freq:
+ freq_fl = freq;
+ freq_fl = freq_fl/100000;
+ find_mode(data_array[16], data_array[18]);
+- printf("\nThe current memory frequency displayed is %.5f MHz, operating in %c%c%c%c%c%c%c%c%c%c%c.\n", freq_fl, mode1, mode2, mode3, white_space, narrow1, narrow2, narrow3, narrow4, narrow5, narrow6);
++ printf("\nThe current memory frequency displayed is %.5f MHz, operating in %c%c%c%c%c%c%c%c%c%c.\n", freq_fl, mode1, mode2, mode3, white_space, narrow1, narrow2, narrow3, narrow4, narrow5, narrow6);
+ /* printf("\nThe current memory frequency displayed is %d.%d%d MHz, operating in %c%c%c%c%c%c%c%c%c%c.\n", freq_MHz, freq_kHz, freq_htHz, mode1, mode2, mode3, white_space, narrow1, narrow2, narrow3, narrow4, narrow5, narrow6); */
+ }
+ }
+
+-find_mode(data_array_n, data_array_w) {
++void find_mode(int data_array_n, int data_array_w) {
+ int am_mode, cw_mode, three;
+
+ am_mode = (data_array_w >> 6) & 0x01;
diff --git a/ham/yaesu/patches/patch-stat__upd.c b/ham/yaesu/patches/patch-stat__upd.c
new file mode 100644
index 00000000000..9474be6452a
--- /dev/null
+++ b/ham/yaesu/patches/patch-stat__upd.c
@@ -0,0 +1,17 @@
+$NetBSD: patch-stat__upd.c,v 1.1 2012/10/24 15:38:06 joerg Exp $
+
+--- stat_upd.c.orig 2012-10-21 10:06:08.000000000 +0000
++++ stat_upd.c
+@@ -1,10 +1,6 @@
+-extern main();
+-extern data_array[];
+-extern data_return_param;
+-extern memory_number;
+-extern outport();
++#include "yaesu.h"
+
+-stat_upd(int fdSer) {
++void stat_upd(int fdSer) {
+ int opcode, data_return_size;
+ int n;
+ /*
diff --git a/ham/yaesu/patches/patch-step.c b/ham/yaesu/patches/patch-step.c
new file mode 100644
index 00000000000..503b1c653f2
--- /dev/null
+++ b/ham/yaesu/patches/patch-step.c
@@ -0,0 +1,15 @@
+$NetBSD: patch-step.c,v 1.1 2012/10/24 15:38:06 joerg Exp $
+
+--- step.c.orig 2012-10-21 10:06:08.000000000 +0000
++++ step.c
+@@ -1,8 +1,6 @@
+-extern main();
+-extern flag_data_return[];
+-extern outport();
++#include "yaesu.h"
+
+-step(int fdSer) {
++void step(int fdSer) {
+ int opcode, stepper, param_byte, up_down, tx_mode;
+ char step_decide;
+
diff --git a/ham/yaesu/patches/patch-strt__tun.c b/ham/yaesu/patches/patch-strt__tun.c
new file mode 100644
index 00000000000..181ce789a37
--- /dev/null
+++ b/ham/yaesu/patches/patch-strt__tun.c
@@ -0,0 +1,15 @@
+$NetBSD: patch-strt__tun.c,v 1.1 2012/10/24 15:38:06 joerg Exp $
+
+--- strt_tun.c.orig 2012-10-21 10:06:08.000000000 +0000
++++ strt_tun.c
+@@ -1,8 +1,6 @@
+-extern main();
+-extern flag_data_return[];
+-extern outport();
++#include "yaesu.h"
+
+-strt_tun(int fdSer) {
++void strt_tun(int fdSer) {
+
+ /*
+ * I do not know if this function works, I do not have
diff --git a/ham/yaesu/patches/patch-tuner10.c b/ham/yaesu/patches/patch-tuner10.c
new file mode 100644
index 00000000000..2120a23b3e4
--- /dev/null
+++ b/ham/yaesu/patches/patch-tuner10.c
@@ -0,0 +1,15 @@
+$NetBSD: patch-tuner10.c,v 1.1 2012/10/24 15:38:06 joerg Exp $
+
+--- tuner10.c.orig 2012-10-21 10:06:08.000000000 +0000
++++ tuner10.c
+@@ -1,8 +1,6 @@
+-extern main();
+-extern flag_data_return[];
+-extern outport();
++#include "yaesu.h"
+
+-tuner10(int fdSer) {
++void tuner10(int fdSer) {
+ /*
+ * I do not know if this function works, I do not have a
+ * tuner to test it with.
diff --git a/ham/yaesu/patches/patch-vfo__2mem.c b/ham/yaesu/patches/patch-vfo__2mem.c
new file mode 100644
index 00000000000..fa0dff4e443
--- /dev/null
+++ b/ham/yaesu/patches/patch-vfo__2mem.c
@@ -0,0 +1,15 @@
+$NetBSD: patch-vfo__2mem.c,v 1.1 2012/10/24 15:38:07 joerg Exp $
+
+--- vfo_2mem.c.orig 2012-10-21 10:06:08.000000000 +0000
++++ vfo_2mem.c
+@@ -1,8 +1,6 @@
+-extern main();
+-extern flag_data_return[];
+-extern outport();
++#include "yaesu.h"
+
+-vfo_2mem(int fdSer) {
++void vfo_2mem(int fdSer) {
+ int opcode, memory_number, hide_byte, tx_mode;
+
+ rd_flags(fdSer);
diff --git a/ham/yaesu/patches/patch-vfo__a2b.c b/ham/yaesu/patches/patch-vfo__a2b.c
new file mode 100644
index 00000000000..154f1959f54
--- /dev/null
+++ b/ham/yaesu/patches/patch-vfo__a2b.c
@@ -0,0 +1,15 @@
+$NetBSD: patch-vfo__a2b.c,v 1.1 2012/10/24 15:38:07 joerg Exp $
+
+--- vfo_a2b.c.orig 2012-10-21 10:06:08.000000000 +0000
++++ vfo_a2b.c
+@@ -1,8 +1,6 @@
+-extern main();
+-extern flag_data_return[];
+-extern outport();
++#include "yaesu.h"
+
+-vfo_a2b(int fdSer) {
++void vfo_a2b(int fdSer) {
+ int opcode, tx_mode;
+
+ rd_flags(fdSer);
diff --git a/ham/yaesu/patches/patch-vfo__ab.c b/ham/yaesu/patches/patch-vfo__ab.c
new file mode 100644
index 00000000000..f172cfc7aae
--- /dev/null
+++ b/ham/yaesu/patches/patch-vfo__ab.c
@@ -0,0 +1,15 @@
+$NetBSD: patch-vfo__ab.c,v 1.1 2012/10/24 15:38:07 joerg Exp $
+
+--- vfo_ab.c.orig 2012-10-21 10:06:08.000000000 +0000
++++ vfo_ab.c
+@@ -1,8 +1,6 @@
+-extern main();
+-extern flag_data_return[];
+-extern outport();
++#include "yaesu.h"
+
+-vfo_ab(int fdSer) {
++void vfo_ab(int fdSer) {
+ int opcode, vfo_choice, tx_mode;
+
+ rd_flags(fdSer);
diff --git a/ham/yaesu/patches/patch-wwv__find.c b/ham/yaesu/patches/patch-wwv__find.c
new file mode 100644
index 00000000000..755fa5255f7
--- /dev/null
+++ b/ham/yaesu/patches/patch-wwv__find.c
@@ -0,0 +1,27 @@
+$NetBSD: patch-wwv__find.c,v 1.1 2012/10/24 15:38:07 joerg Exp $
+
+--- wwv_find.c.orig 2012-10-21 10:06:08.000000000 +0000
++++ wwv_find.c
+@@ -1,10 +1,8 @@
+-extern main();
+-extern float freq_to_change_to;
+-extern flag_data_return[];
++#include "yaesu.h"
+
+-wwv_find(int fdSer) {
++void wwv_find(int fdSer) {
+ float new;
+- int find, meter[5], tx_mode;
++ int find, meter[6], tx_mode;
+
+ rd_flags(fdSer);
+ tx_mode = flag_data_return[3];
+@@ -16,7 +14,7 @@ wwv_find(int fdSer) {
+
+
+ freq_to_change_to = 2.5;
+- freq_out(fdSer, freq_to_change_to);
++ freq_out(fdSer);
+ sleep(1);
+ meter[1] = meter_rd(fdSer);
+ find = meter[1];
diff --git a/ham/yaesu/patches/patch-yaesu.c b/ham/yaesu/patches/patch-yaesu.c
new file mode 100644
index 00000000000..6a1180e29bf
--- /dev/null
+++ b/ham/yaesu/patches/patch-yaesu.c
@@ -0,0 +1,13 @@
+$NetBSD: patch-yaesu.c,v 1.1 2012/10/24 15:38:07 joerg Exp $
+
+--- yaesu.c.orig 2012-10-21 10:06:08.000000000 +0000
++++ yaesu.c
+@@ -1,6 +1,5 @@
+-extern main();
+-extern float freq_to_change_to;
+-extern int yaesu_return;
++#include "yaesu.h"
++
+ int aux_comeback;
+
+ void yaesu(int fdSer) {