fbb (7.04j-8.2) direct (non packaging) changes

Summary

 Makefile                     |    6 ++++
 fbb                          |   10 +++---
 fbb.8                        |   34 +++++++++++++++++++++++
 fbbgetconf.1                 |   25 +++++++++++++++++
 include/serv.h               |    1 
 install_sh                   |   10 +++---
 patches/fbb703.linux2.6.diff |   42 +++++++++++++++++++++++++++++
 rc.fbb                       |    4 +-
 src/Makefile                 |    2 -
 src/clr_user.c               |    1 
 src/console.c                |   25 ++++++++++++++++-
 src/epurmess.c               |    6 +++-
 src/fbbgetconf.c             |    2 -
 src/initfwd.c                |    2 -
 src/trajec.c                 |    9 ------
 xfbbC.8                      |   62 +++++++++++++++++++++++++++++++++++++++++++
 xfbbd.8                      |   30 ++++++++++++++++++++
 17 files changed, 244 insertions(+), 27 deletions(-)

    
download this patch

Patch contents

--- fbb-7.04j.orig/xfbbd.8
+++ fbb-7.04j/xfbbd.8
@@ -0,0 +1,30 @@
+.TH XFBBD 8
+.SH NAME
+xfbbd \- Daemon for the fbb mailbox
+.SH SYNOPSIS
+.B xfbbd
+.I "[options]"
+
+.SH OPTIONS
+.TP
+.B \-v
+Verbose option. Prints errors, warnings and messages.
+.TP
+.B \-p <port>
+TCP/IP port for the console client. Default is 3286.
+.TP
+.B \-a
+Decode all packets when receiving data on a socket. Normally only
+AX.25 data (NET/ROM and Rose) will be monitored.
+.TP
+.B \-i
+Init mode. Only initialize, don't run. Use this to parse your
+configuration files without actually starting the daemon.
+.TP
+.B \-n
+Don't start communication socket for the console.
+
+
+
+.SH AUTHOR
+This manual page was written by Joop Stakenborg <pa3aba@debian.org>.
--- fbb-7.04j.orig/Makefile
+++ fbb-7.04j/Makefile
@@ -0,0 +1,6 @@
+SUBDIRS = src
+
+all clean install:
+	      for i in ${SUBDIRS} ;   do \
+        ( cd $$i && ${MAKE} $@ ) || exit 1; \
+        done
--- fbb-7.04j.orig/fbb
+++ fbb-7.04j/fbb
@@ -231,7 +231,7 @@
 	echo "# FBB$VERSION"
 	echo "#"
 	echo "#Ports TNCs"
-	echo " 1     $[ $NUMPORT - 1 ]"
+	echo " 1     $(( $NUMPORT - 1 ))"
 	echo "#"
 	echo "#Com Interface Adress (Hex) Baud"
 	echo " 1   9         0            9600"
@@ -241,7 +241,7 @@
 	while [ $NB -lt $NUMPORT ] ; do
 		printf " %-2s  %-2s   1   %-6s 250   2     1     10     00/15   XUWYL %s\n"\
 			$NB ${NB_CH[$NB]} ${PORT_NAME[$NB]} ${PORT_FREQ[$NB]}
-		NB=$[ $NB + 1 ]
+		NB=$(( $NB + 1 ))
 	done
 	echo "#"
 	echo "# End of file."
@@ -269,7 +269,7 @@
 				echo -n "Frequency                                            : "
 				read REP
 				PORT_FREQ[$NUMPORT]=$REP
-				NUMPORT=$[ $NUMPORT + 1 ]
+				NUMPORT=$(( $NUMPORT + 1 ))
 			done
 
 			NB=1
@@ -277,7 +277,7 @@
 			echo
 			while [ $NB -lt $NUMPORT ] ; do
 				echo "Port $NB on axport ${PORT_NAME[$NB]} (${NB_CH[$NB]} channels) Freq=${PORT_FREQ[$NB]}"
-				NB=$[ $NB + 1 ]
+				NB=$(( $NB + 1 ))
 			done
 
 			while true ; do
@@ -307,7 +307,7 @@
 				echo "! MAIL" >> $FILE
 				echo "\$d \$Tz Mailbox \$O-\$o (LINUX version)" >> $FILE
 			fi
-			NB=$[ $NB + 1 ]
+			NB=$(( $NB + 1 ))
 		done
 
 	fi
--- fbb-7.04j.orig/xfbbC.8
+++ fbb-7.04j/xfbbC.8
@@ -0,0 +1,62 @@
+.TH XFBBC 8 
+.SH NAME
+xfbbC \- Console for the fbb mailbox
+.SH SYNOPSIS
+.B xfbbC
+.I "[options]"
+
+.SH DESCRIPTION
+This is the console client for the xfbbd BBS daemon.
+
+.SH OPTIONS
+.TP
+.B \-h <address>
+Hostname address of the xfbbd server.
+.TP
+.B \-d <file>
+Download remote configuration file.
+.TP
+.B \-u <file>
+Upload configuration file.
+.TP
+.B \-l
+Display remote directory.
+.TP
+.B \-f
+Data filtering. Control characters are discarded.
+.TP
+.B \-p <port>
+IP port number (default 3286).
+.TP
+.B \-w <password>
+password of the callsign as defined in passwd.sys.
+.TP
+.B \-i <callsign>
+Callsign used for connection.
+.TP
+.B \-c
+Console connection.
+.TP
+.B \-m <channel>
+Displays a connected channel (0 = all channels).
+.TP
+.B \-r
+Don't use ncurses.
+.TP
+.B \-s <svc_nb>
+Request service number.
+
+.SH REMARKS
+Environment variables used by xfbbC are:
+.TP
+XFBBC_HOST : hostname (default localhost).
+.TP
+XFBBC_PORT : socket port (default 3286).
+.TP
+XFBBC_CALL : my callsign.
+.TP
+XFBBC_PASS : password string of passwd.sys in xfbbd.
+
+
+.SH AUTHOR
+This manual page was written by Joop Stakenborg <pa3aba@debian.org>.
--- fbb-7.04j.orig/fbb.8
+++ fbb-7.04j/fbb.8
@@ -0,0 +1,34 @@
+.TH FBB 8
+
+.SH NAME
+fbb \- Script to start the fbb daemon
+
+.SH SYNOPSIS
+.B fbb
+.I "[options]"
+
+.SH DESCRIPTION
+This script is used to start the daemon. It will ask you for configuration
+details (CALL, SSID, QRA, etc.) and port entries when the
+configuration file for fbb (/etc/ax25/fbb.conf) does not exist.
+If a configuration file is present the daemon will be started.
+
+.SH OPTIONS
+.TP
+.B \-f
+Runs fbb in foreground.
+.TP
+.B \-h
+Help information (only displayed when a valid configuration is present).
+.TP
+.B \-l <logfile>
+Log debug info to logfile.
+.TP
+.B \-s
+Run fbb silently.
+.TP
+Any other flags will be passed to the daemon.
+
+
+.SH AUTHOR
+This manual page was written by Joop Stakenborg <pa3aba@debian.org>.
--- fbb-7.04j.orig/rc.fbb
+++ fbb-7.04j/rc.fbb
@@ -22,13 +22,13 @@
 	else
 		return=$rc_failed
 	fi
-	echo -e "$return"
+	echo "$return"
 	;;
 stop)
 	echo -n "Shutting down FBB daemon"
 	killproc -TERM /usr/sbin/fbb || return=$rc_failed
 	sleep 4
-	echo -e "$return"
+	echo "$return"
 	;;
 restart|reload)
 	$0 stop && $0 start || return=$rc_failed
--- fbb-7.04j.orig/install_sh
+++ fbb-7.04j/install_sh
@@ -180,11 +180,11 @@
 echo "FBB installation tool"
 echo 
 echo "Warning ! This will replace binaries. Configuration files will not be replaced."
-echo -n "Go on anyway ? (Y/N) "
-read REP
-if [ "$REP" = "N" -o "$REP" = "n" ] ; then
-   	exit 0
-fi
+#echo -n "Go on anyway ? (Y/N) "
+#read REP
+#if [ "$REP" = "N" -o "$REP" = "n" ] ; then
+#   	exit 0
+#fi
 
 echo
 
--- fbb-7.04j.orig/fbbgetconf.1
+++ fbb-7.04j/fbbgetconf.1
@@ -0,0 +1,25 @@
+.TH FBBGETCONF 1
+.SH NAME
+fbbgetconf \- Returns values from the fbb configuration
+.SH SYNOPSIS
+.B fbbgetconf
+.I "[options]"
+.I [key] [key] ...
+
+.SH OPTIONS
+.TP
+.B \-a
+List all values.
+.TP
+.B \-h
+Display a short help.
+.TP
+.B \-d
+List default values.
+.TP
+.B \-f [configfile]
+Use configfile.
+
+
+.SH AUTHOR
+This manual page was written by Joop Stakenborg <pa3aba@debian.org>.
--- fbb-7.04j.orig/src/Makefile
+++ fbb-7.04j/src/Makefile
@@ -1,5 +1,5 @@
 # this is only if "old" ax25 for kernel 2.0.x are used
-AX25OLDPATH = /usr/src/ax25
+#AX25OLDPATH = /usr/src/ax25
 
 # the rest should not be changed
 AX25LIBPATH = /usr/lib
--- fbb-7.04j.orig/src/trajec.c
+++ fbb-7.04j/src/trajec.c
@@ -110,7 +110,6 @@
 
 static double julien (double, int, int, int, int, int);
 
-static int round (double);
 
 static long julien_to_pc (double);
 
@@ -128,14 +127,6 @@
 static void satsta (void);
 
 
-static int round (double val)
-{
-	if (val > 0.0)
-		return ((int) (val + 0.5));
-	else
-		return ((int) (val - 0.5));
-}
-
 static double julien (double d3, int n3, int y3, int h3, int m3, int s3)
 {
 	double j8;
--- fbb-7.04j.orig/src/console.c
+++ fbb-7.04j/src/console.c
@@ -911,7 +911,7 @@
 
 #define MEMINFO_FILE "/proc/meminfo"
 
-static char buf[300];
+static char buf[1000];
 
 #define MAX_ROW 3				/* these are a little liberal for flexibility */
 #define MAX_COL 7
@@ -947,6 +947,29 @@
 	for (i = 0; i < MAX_ROW; i++)	/* zero unassigned fields */
 		for (j = 0; j < MAX_COL; j++)
 			row[i][j] = 0;
+	if (!strncmp("MemTotal:", p, 8)) {
+/*		printf("Asuming 2.6 Kernel\n");*/
+		while (*p && !isdigit(*p)) p++;
+		l = sscanf(p, "%u%n", &row[meminfo_main][meminfo_total], &k);
+		p += k;
+		while (*p && !strncmp("MemFree:", p, 8)) p++;
+		while (*p && !isdigit(*p)) p++;
+		l = sscanf(p, "%u%n", &row[meminfo_main][meminfo_free], &k);
+		p += k;
+		while (*p && !strncmp("Buffers:", p, 8)) p++;
+		while (*p && !isdigit(*p)) p++;
+		l = sscanf(p, "%u%n", &row[meminfo_main][meminfo_buffers], &k);
+		p += k;
+		while (*p && !strncmp("Cached:", p, 7)) p++;
+		while (*p && !isdigit(*p)) p++;
+		l = sscanf(p, "%u%n", &row[meminfo_main][meminfo_cached], &k);
+		p += k;
+		while (*p && !strncmp("SwapFree:", p, 9)) p++;
+		while (*p && !isdigit(*p)) p++;
+		l = sscanf(p, "%u%n", &row[meminfo_swap][meminfo_free], &k);
+		p += k;
+		return row;
+	}
 	for (i = 0; i < MAX_ROW && *p; i++)
 	{							/* loop over rows */
 		while (*p && !isdigit (*p))
--- fbb-7.04j.orig/src/epurmess.c
+++ fbb-7.04j/src/epurmess.c
@@ -894,13 +894,17 @@
 
 #ifdef ENGLISH
 	printf ("Read %6ld %c%c %5ld %-6s%7s %-6s %-6s %s %1.19s\r",
+			ligne->numero, ligne->type, ligne->status,
+			ligne->taille, ligne->desti, bbs_v, ligne->exped,
+			date, datech, titre);
+}
 #else
 	printf ("Lect %6ld %c%c %5ld %-6s%7s %-6s %-6s %s %1.19s\r",
-#endif
 			ligne->numero, ligne->type, ligne->status,
 			ligne->taille, ligne->desti, bbs_v, ligne->exped,
 			date, datech, titre);
 }
+#endif
 
 
 int find (char *s)
--- fbb-7.04j.orig/src/fbbgetconf.c
+++ fbb-7.04j/src/fbbgetconf.c
@@ -83,7 +83,7 @@
 			fprintf(stderr, "\nfbbgetconf V %d.%02d\n", MAJEUR, MINEUR);
 #endif
 			fprintf(stderr,
-					"format  : fbbgetconf [-a] [-d] [-h] [-l] [-f configfile] [key] [key] ...\n");
+					"format  : fbbgetconf [-a] [-d] [-h] [-f configfile] [key] [key] ...\n");
 			exit(0);
 
 		}
--- fbb-7.04j.orig/src/initfwd.c
+++ fbb-7.04j/src/initfwd.c
@@ -31,7 +31,7 @@
 #include <serv.h>
 
 #define NBCAS 3
-
+#define niveau niveau_initfwd
 static int niveau;
 static int etat_bloc;
 static int nbif[NBCAS];
--- fbb-7.04j.orig/src/clr_user.c
+++ fbb-7.04j/src/clr_user.c
@@ -27,6 +27,7 @@
 #define ENGLISH
 
 #include <stdio.h>
+#include <stdlib.h>
 #include <ctype.h>
 #include <time.h>
 #include "version.h"
--- fbb-7.04j.orig/include/serv.h
+++ fbb-7.04j/include/serv.h
@@ -100,7 +100,6 @@
 extern "C" {
 #endif
 
-char *strupr (char *);
 char *itoa(int, char*, int);
 char *ltoa(long, char*, int);
 char *ultoa(unsigned long, char*, int);
--- fbb-7.04j.orig/patches/fbb703.linux2.6.diff
+++ fbb-7.04j/patches/fbb703.linux2.6.diff
@@ -0,0 +1,42 @@
+--- fbbsrc.703c/src/console.c	2000-09-14 22:16:38.000000000 +0200
++++ fbbsrc.703c.rxq/src/console.c	2004-02-13 19:49:34.000000000 +0100
+@@ -893,7 +893,7 @@
+ 
+ #define MEMINFO_FILE "/proc/meminfo"
+ 
+-static char buf[300];
++static char buf[1000];
+ 
+ #define MAX_ROW 3				/* these are a little liberal for flexibility */
+ #define MAX_COL 7
+@@ -929,6 +929,29 @@
+ 	for (i = 0; i < MAX_ROW; i++)	/* zero unassigned fields */
+ 		for (j = 0; j < MAX_COL; j++)
+ 			row[i][j] = 0;
++	if (!strncmp("MemTotal:", p, 8)) {
++/*		printf("Asuming 2.6 Kernel\n");*/
++		while (*p && !isdigit(*p)) p++;
++		l = sscanf(p, "%u%n", &row[meminfo_main][meminfo_total], &k);
++		p += k;
++		while (*p && !strncmp("MemFree:", p, 8)) p++;
++		while (*p && !isdigit(*p)) p++;
++		l = sscanf(p, "%u%n", &row[meminfo_main][meminfo_free], &k);
++		p += k;
++		while (*p && !strncmp("Buffers:", p, 8)) p++;
++		while (*p && !isdigit(*p)) p++;
++		l = sscanf(p, "%u%n", &row[meminfo_main][meminfo_buffers], &k);
++		p += k;
++		while (*p && !strncmp("Cached:", p, 7)) p++;
++		while (*p && !isdigit(*p)) p++;
++		l = sscanf(p, "%u%n", &row[meminfo_main][meminfo_cached], &k);
++		p += k;
++		while (*p && !strncmp("SwapFree:", p, 9)) p++;
++		while (*p && !isdigit(*p)) p++;
++		l = sscanf(p, "%u%n", &row[meminfo_swap][meminfo_free], &k);
++		p += k;
++		return row;
++	}
+ 	for (i = 0; i < MAX_ROW && *p; i++)
+ 	{							/* loop over rows */
+ 		while (*p && !isdigit (*p))
+