add changes to get it to compile on WEGA
This commit is contained in:
parent
4fce7f2075
commit
7f7cd5e473
|
|
@ -11,10 +11,11 @@ SHELL = /bin/sh
|
||||||
TAR = tar
|
TAR = tar
|
||||||
# Use gzip instead of compress if you and your correspondents have it
|
# Use gzip instead of compress if you and your correspondents have it
|
||||||
ZIPPER = compress
|
ZIPPER = compress
|
||||||
|
CC = lcc
|
||||||
|
|
||||||
# If you have shared libraries (usually /lib/libc_s.a) you can make
|
# If you have shared libraries (usually /lib/libc_s.a) you can make
|
||||||
# smaller executable with SHLIB defined:
|
# smaller executable with SHLIB defined:
|
||||||
SHLIB=-lc_s
|
#SHLIB=-lc_s
|
||||||
# Otherwise, enable:
|
# Otherwise, enable:
|
||||||
#SHLIB=
|
#SHLIB=
|
||||||
|
|
||||||
|
|
@ -22,7 +23,7 @@ SHLIB=-lc_s
|
||||||
# The W5GFE video modification has been put in unixopt.h. This modifi-
|
# The W5GFE video modification has been put in unixopt.h. This modifi-
|
||||||
# cation cause inverse video on incoming telnet data.
|
# cation cause inverse video on incoming telnet data.
|
||||||
# Change unixopt.h, if necessary, and define your curses library.
|
# Change unixopt.h, if necessary, and define your curses library.
|
||||||
CURSES=-lcurses
|
#CURSES=-lcurses
|
||||||
# Or, if you don't have curses, forget the whole thing and enable:
|
# Or, if you don't have curses, forget the whole thing and enable:
|
||||||
#CURSES=
|
#CURSES=
|
||||||
#
|
#
|
||||||
|
|
@ -74,8 +75,8 @@ CURSES=-lcurses
|
||||||
# Uncomment the next three lines for
|
# Uncomment the next three lines for
|
||||||
# Unix System V -- (AT&T 3B2 - K5JB)
|
# Unix System V -- (AT&T 3B2 - K5JB)
|
||||||
#
|
#
|
||||||
CFLAGS = -O -DUNIX -DSYS5 -DSLOWCHECK -DMSPTICK=10
|
CFLAGS = -DWEGA -DUNIX -DSYS5 -DSLOWCHECK
|
||||||
LINTFLAGS = -O -DUNIX -DSYS5 -DSLOWCHECK -DMSPTICK=10
|
LINTFLAGS = -DWEGA -DUNIX -DSYS5 -DSLOWCHECK
|
||||||
LIBS =$(SHLIB) $(CURSES)
|
LIBS =$(SHLIB) $(CURSES)
|
||||||
########################################################################
|
########################################################################
|
||||||
#
|
#
|
||||||
|
|
@ -137,7 +138,11 @@ lint: $(SRCS)
|
||||||
# lint $(LINTFLAGS) [i-z]*.ln > lint3.out 2>&1
|
# lint $(LINTFLAGS) [i-z]*.ln > lint3.out 2>&1
|
||||||
|
|
||||||
depend:
|
depend:
|
||||||
mkdep $(LINTFLAGS) $(SRCS) > depend.out
|
rm -f depend.out
|
||||||
|
touch depend.out
|
||||||
|
for file in $(SRCS) ; do \
|
||||||
|
mkdep $(LINTFLAGS) $$file > depend.out ; \
|
||||||
|
done
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
-rm *.o
|
-rm *.o
|
||||||
|
|
|
||||||
|
|
@ -589,7 +589,11 @@ int16 len;
|
||||||
sum += loword(ph->source);
|
sum += loword(ph->source);
|
||||||
sum += hiword(ph->dest);
|
sum += hiword(ph->dest);
|
||||||
sum += loword(ph->dest);
|
sum += loword(ph->dest);
|
||||||
|
#ifdef WEGA
|
||||||
|
sum += (int)ph->protocol;
|
||||||
|
#else
|
||||||
sum += uchar(ph->protocol);
|
sum += uchar(ph->protocol);
|
||||||
|
#endif
|
||||||
sum += ph->length;
|
sum += ph->length;
|
||||||
}
|
}
|
||||||
/* Now do each mbuf on the chain */
|
/* Now do each mbuf on the chain */
|
||||||
|
|
@ -601,9 +605,17 @@ int16 len;
|
||||||
if(((long)up) & 1){
|
if(((long)up) & 1){
|
||||||
/* Handle odd leading byte */
|
/* Handle odd leading byte */
|
||||||
if(swap)
|
if(swap)
|
||||||
|
#ifdef WEGA
|
||||||
|
csum = (int)(*up++);
|
||||||
|
#else
|
||||||
csum = uchar(*up++);
|
csum = uchar(*up++);
|
||||||
|
#endif
|
||||||
else
|
else
|
||||||
|
#ifdef WEGA
|
||||||
|
csum = (int16)((int)(*up++) << 8);
|
||||||
|
#else
|
||||||
csum = (int16)(uchar(*up++) << 8);
|
csum = (int16)(uchar(*up++) << 8);
|
||||||
|
#endif
|
||||||
cnt--;
|
cnt--;
|
||||||
swap = !swap;
|
swap = !swap;
|
||||||
}
|
}
|
||||||
|
|
@ -620,9 +632,24 @@ int16 len;
|
||||||
/* Handle odd trailing byte */
|
/* Handle odd trailing byte */
|
||||||
if(cnt & 1){
|
if(cnt & 1){
|
||||||
if(swap)
|
if(swap)
|
||||||
|
#ifdef WEGA
|
||||||
|
{
|
||||||
|
unsigned short tmp;
|
||||||
|
|
||||||
|
tmp = (unsigned short)up[--cnt];
|
||||||
|
tmp <<= 8;
|
||||||
|
tmp >>= 8;
|
||||||
|
csum += tmp;
|
||||||
|
}
|
||||||
|
#else
|
||||||
csum += uchar(up[--cnt]);
|
csum += uchar(up[--cnt]);
|
||||||
|
#endif
|
||||||
else
|
else
|
||||||
|
#ifdef WEGA
|
||||||
|
csum += (int16)((int)(up[--cnt]) << 8);
|
||||||
|
#else
|
||||||
csum += (int16)(uchar(up[--cnt]) << 8);
|
csum += (int16)(uchar(up[--cnt]) << 8);
|
||||||
|
#endif
|
||||||
swap = !swap;
|
swap = !swap;
|
||||||
}
|
}
|
||||||
sum += csum;
|
sum += csum;
|
||||||
|
|
|
||||||
|
|
@ -479,6 +479,9 @@ pull32(bpp)
|
||||||
struct mbuf **bpp;
|
struct mbuf **bpp;
|
||||||
{
|
{
|
||||||
int32 rval;
|
int32 rval;
|
||||||
|
#ifdef WEGA
|
||||||
|
int16 rval1, rval2;
|
||||||
|
#endif
|
||||||
char buf[4];
|
char buf[4];
|
||||||
register char *cp;
|
register char *cp;
|
||||||
|
|
||||||
|
|
@ -489,6 +492,18 @@ struct mbuf **bpp;
|
||||||
cp = buf;
|
cp = buf;
|
||||||
|
|
||||||
/* Unwound for speed */
|
/* Unwound for speed */
|
||||||
|
#ifdef WEGA
|
||||||
|
rval1 = uchar(*cp++);
|
||||||
|
rval1 <<= 8;
|
||||||
|
rval1 |= uchar(*cp++);
|
||||||
|
rval2 = uchar(*cp++);
|
||||||
|
rval2 <<= 8;
|
||||||
|
rval2 |= uchar(*cp);
|
||||||
|
|
||||||
|
rval = rval1;
|
||||||
|
rval <<= 16;
|
||||||
|
rval |= rval2;
|
||||||
|
#else
|
||||||
rval = uchar(*cp++);
|
rval = uchar(*cp++);
|
||||||
rval <<= 8;
|
rval <<= 8;
|
||||||
rval |= uchar(*cp++);
|
rval |= uchar(*cp++);
|
||||||
|
|
@ -496,6 +511,7 @@ struct mbuf **bpp;
|
||||||
rval |= uchar(*cp++);
|
rval |= uchar(*cp++);
|
||||||
rval <<= 8;
|
rval <<= 8;
|
||||||
rval |= uchar(*cp);
|
rval |= uchar(*cp);
|
||||||
|
#endif
|
||||||
|
|
||||||
return rval;
|
return rval;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -4,6 +4,13 @@
|
||||||
#
|
#
|
||||||
cpparg=
|
cpparg=
|
||||||
linelen=60 # desired length of dependency line
|
linelen=60 # desired length of dependency line
|
||||||
|
system=`uname -s`
|
||||||
|
if [ "$system" = "P8000" ] ; then
|
||||||
|
cpp_cmd=/z/LCC/lib/lcpp
|
||||||
|
else
|
||||||
|
cpp_cmd=/lib/cpp
|
||||||
|
fi
|
||||||
|
|
||||||
for arg in "$@"
|
for arg in "$@"
|
||||||
do
|
do
|
||||||
case $arg in
|
case $arg in
|
||||||
|
|
@ -15,7 +22,7 @@ do
|
||||||
target=`expr "$source" : '\\(.*\\)\\.c$'`
|
target=`expr "$source" : '\\(.*\\)\\.c$'`
|
||||||
if [ -n "$target" ]; then
|
if [ -n "$target" ]; then
|
||||||
target=`basename "$target"`
|
target=`basename "$target"`
|
||||||
/lib/cpp $cpparg "$source" |
|
$cpp_cmd $cpparg "$source" |
|
||||||
sed -n -e 's/^# 1 "\(.*\)"/\1/p' |
|
sed -n -e 's/^# 1 "\(.*\)"/\1/p' |
|
||||||
awk '
|
awk '
|
||||||
BEGIN { deplist = "'$target.o:'" }
|
BEGIN { deplist = "'$target.o:'" }
|
||||||
|
|
|
||||||
|
|
@ -56,7 +56,9 @@
|
||||||
#define MDKISSPORT /* Multidrop KISS, up to 16 pseudo ports, 1016 bytes */
|
#define MDKISSPORT /* Multidrop KISS, up to 16 pseudo ports, 1016 bytes */
|
||||||
#define MULPORT /* Grapes Multiport code - adds 1398 bytes */
|
#define MULPORT /* Grapes Multiport code - adds 1398 bytes */
|
||||||
#define AX25_HEARD /* Heard list - adds 3716 bytes */
|
#define AX25_HEARD /* Heard list - adds 3716 bytes */
|
||||||
|
#ifndef WEGA
|
||||||
#define CUTE_VIDEO /* Contrast video on incoming sessions. Adds 484 Bytes */
|
#define CUTE_VIDEO /* Contrast video on incoming sessions. Adds 484 Bytes */
|
||||||
|
#endif
|
||||||
#undef TRACE_TIME /* Trace timestamping */
|
#undef TRACE_TIME /* Trace timestamping */
|
||||||
#define SEG_CMD /* ax25 segment command */
|
#define SEG_CMD /* ax25 segment command */
|
||||||
#define REWRITE /* rewrite.net file for smtp server */
|
#define REWRITE /* rewrite.net file for smtp server */
|
||||||
|
|
|
||||||
|
|
@ -37,7 +37,9 @@ struct session {
|
||||||
char *rfile; /* Record file name */
|
char *rfile; /* Record file name */
|
||||||
FILE *upload; /* Send file */
|
FILE *upload; /* Send file */
|
||||||
char *ufile; /* Upload file name */
|
char *ufile; /* Upload file name */
|
||||||
|
#ifndef WEGA /* leads to problems because of conflicting function noecho() */
|
||||||
char noecho; /* Echo flag */
|
char noecho; /* Echo flag */
|
||||||
|
#endif
|
||||||
};
|
};
|
||||||
#define NULLSESSION (struct session *)0
|
#define NULLSESSION (struct session *)0
|
||||||
extern unsigned nsessions;
|
extern unsigned nsessions;
|
||||||
|
|
|
||||||
|
|
@ -39,6 +39,9 @@
|
||||||
#ifndef COH386
|
#ifndef COH386
|
||||||
#include <sys/file.h>
|
#include <sys/file.h>
|
||||||
#endif
|
#endif
|
||||||
|
#ifdef WEGA
|
||||||
|
#include <math.h> /* for errno declaration */
|
||||||
|
#endif
|
||||||
#include <time.h>
|
#include <time.h>
|
||||||
#include <fcntl.h>
|
#include <fcntl.h>
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
|
|
@ -56,8 +59,12 @@
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef B38400
|
#ifndef B38400
|
||||||
|
#ifdef WEGA
|
||||||
|
#define B38400 EXTA
|
||||||
|
#else
|
||||||
#define B38400 EXTB
|
#define B38400 EXTB
|
||||||
#endif
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
struct asy asy[ASY_MAX];
|
struct asy asy[ASY_MAX];
|
||||||
struct interface *ifaces;
|
struct interface *ifaces;
|
||||||
|
|
|
||||||
|
|
@ -48,6 +48,7 @@
|
||||||
#include "unix.h"
|
#include "unix.h"
|
||||||
#include "unixopt.h"
|
#include "unixopt.h"
|
||||||
#include "ndir.h"
|
#include "ndir.h"
|
||||||
|
#include "timer.h"
|
||||||
|
|
||||||
#define MAXCMD 1024
|
#define MAXCMD 1024
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -2,6 +2,9 @@
|
||||||
#include "config.h"
|
#include "config.h"
|
||||||
#ifdef _TELNET
|
#ifdef _TELNET
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
#ifdef WEGA
|
||||||
|
#include <memory.h> /* to get the return value of memchr() right */
|
||||||
|
#endif
|
||||||
#include "global.h"
|
#include "global.h"
|
||||||
#include "mbuf.h"
|
#include "mbuf.h"
|
||||||
#include "timer.h"
|
#include "timer.h"
|
||||||
|
|
|
||||||
|
|
@ -26,10 +26,14 @@ struct timer {
|
||||||
#if ATARI_ST && (!MWC)
|
#if ATARI_ST && (!MWC)
|
||||||
#define MSPTICK 100 /* Milliseconds per tick */
|
#define MSPTICK 100 /* Milliseconds per tick */
|
||||||
#else
|
#else
|
||||||
|
#ifdef WEGA
|
||||||
|
#define MSPTICK 17
|
||||||
|
#else
|
||||||
/* for only a 10% error you can make all time reports pretty by using
|
/* for only a 10% error you can make all time reports pretty by using
|
||||||
* 50 instead of 55 here
|
* 50 instead of 55 here
|
||||||
*/
|
*/
|
||||||
#define MSPTICK 55 /* (approx) Milliseconds per tick */
|
#define MSPTICK 55 /* (approx) Milliseconds per tick */
|
||||||
|
#endif /* WEGA */
|
||||||
#endif /* ATARI, etc */
|
#endif /* ATARI, etc */
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -22,7 +22,9 @@
|
||||||
#ifdef NETROM
|
#ifdef NETROM
|
||||||
#include "nr4.h"
|
#include "nr4.h"
|
||||||
#endif
|
#endif
|
||||||
|
#ifndef WEGA
|
||||||
#include "iface.h"
|
#include "iface.h"
|
||||||
|
#endif
|
||||||
#include "tcp.h"
|
#include "tcp.h"
|
||||||
#include "session.h"
|
#include "session.h"
|
||||||
#include "cmdparse.h"
|
#include "cmdparse.h"
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,9 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* if you have the mkdir() function, define the following: */
|
/* if you have the mkdir() function, define the following: */
|
||||||
|
#ifndef WEGA
|
||||||
#define HAVEMKDIR
|
#define HAVEMKDIR
|
||||||
|
#endif
|
||||||
|
|
||||||
/* This is a wait value for the Coherent sleep2() function */
|
/* This is a wait value for the Coherent sleep2() function */
|
||||||
#define COHWAIT 50 /* 50 ms */
|
#define COHWAIT 50 /* 50 ms */
|
||||||
|
|
@ -20,19 +22,25 @@
|
||||||
* Contact me for source code if you have same problem.
|
* Contact me for source code if you have same problem.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#ifndef WEGA
|
||||||
#define TELUNIX
|
#define TELUNIX
|
||||||
|
#endif
|
||||||
|
|
||||||
/* On k5jb3b2 only, has to do with brain damaged pty on my machine.
|
/* On k5jb3b2 only, has to do with brain damaged pty on my machine.
|
||||||
* Don't define this unless you have the file that I call telunix.c3
|
* Don't define this unless you have the file that I call telunix.c3
|
||||||
* linked to telunix.c in your set.
|
* linked to telunix.c in your set.
|
||||||
*/
|
*/
|
||||||
|
#ifndef WEGA
|
||||||
#define PTY_PIPE
|
#define PTY_PIPE
|
||||||
|
#endif
|
||||||
|
|
||||||
/* a client stub with PORT 87. Uses IPC to transact with a server.
|
/* a client stub with PORT 87. Uses IPC to transact with a server.
|
||||||
* Contact me for a sample server if you want to try this.
|
* Contact me for a sample server if you want to try this.
|
||||||
*/
|
*/
|
||||||
|
#ifndef WEGA
|
||||||
#define TELSERV
|
#define TELSERV
|
||||||
#define SERVNAME "telserv" /* suggest 7 max for screen formatting */
|
#define SERVNAME "telserv" /* suggest 7 max for screen formatting */
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef _OSK
|
#ifdef _OSK
|
||||||
#undef TELUNIX
|
#undef TELUNIX
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue