Files
pkgsrc-ng/ham/yaesu/patches/patch-ae
2013-09-26 17:14:40 +02:00

37 lines
1.1 KiB
Plaintext
Raw Permalink Blame History

This file contains invisible Unicode characters
This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
$NetBSD: patch-ae,v 1.3 2012/10/24 15:38:00 joerg Exp $
--- 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) {
- printf("The dummy byte returned to the meter_rd function is incorrect, possible serial port noise?\n");
+ printf("The dummy byte returned to the meter_rd function is incorrect, possible "
+ "serial port noise?\n");
} else {
printf("\nCurrent meter value is %x. Range is 0..0ffh.\n", meter_value[3]);
}