Upgrade CVS to 0.33.18 current

This commit is contained in:
Michiel Broek
2001-08-25 19:53:11 +00:00
parent 2ff822f657
commit e90745a139
111 changed files with 3126 additions and 3121 deletions

View File

@@ -59,6 +59,7 @@ PRE_UNINSTALL = :
POST_UNINSTALL = :
AWK = @AWK@
CC = @CC@
CHOWN = @CHOWN@
COMPRESS = @COMPRESS@
GROUP = @GROUP@
GZIP = @GZIP@
@@ -70,7 +71,6 @@ OWNER = @OWNER@
PACKAGE = @PACKAGE@
RANLIB = @RANLIB@
VERSION = @VERSION@
YACC = @YACC@
SUBDIRS = .
noinst_PROGRAMS = mbmon
@@ -101,6 +101,7 @@ DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST)
TAR = tar
GZIP_ENV = --best
DEP_FILES = .deps/common.P .deps/mbmon.P .deps/mutil.P
SOURCES = $(mbmon_SOURCES)
OBJECTS = $(mbmon_OBJECTS)
@@ -108,9 +109,9 @@ all: all-redirect
.SUFFIXES:
.SUFFIXES: .S .c .o .s
$(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4)
cd $(top_srcdir) && $(AUTOMAKE) --gnu --include-deps mbmon/Makefile
cd $(top_srcdir) && $(AUTOMAKE) --gnu mbmon/Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status $(BUILT_SOURCES)
cd $(top_builddir) \
&& CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
@@ -124,9 +125,6 @@ distclean-noinstPROGRAMS:
maintainer-clean-noinstPROGRAMS:
.c.o:
$(COMPILE) -c $<
.s.o:
$(COMPILE) -c $<
@@ -241,6 +239,11 @@ distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir)
subdir = mbmon
distdir: $(DISTFILES)
here=`cd $(top_builddir) && pwd`; \
top_distdir=`cd $(top_distdir) && pwd`; \
distdir=`cd $(distdir) && pwd`; \
cd $(top_srcdir) \
&& $(AUTOMAKE) --include-deps --build-dir=$$here --srcdir-name=$(top_srcdir) --output-dir=$$top_distdir --gnu mbmon/Makefile
@for file in $(DISTFILES); do \
d=$(srcdir); \
if test -d $$d/$$file; then \
@@ -261,13 +264,38 @@ distdir: $(DISTFILES)
|| exit 1; \
fi; \
done
common.o: common.c ../lib/libs.h ../lib/../config.h \
../lib/../lib/memwatch.h common.h
mbmon.o: mbmon.c ../lib/libs.h ../lib/../config.h \
../lib/../lib/memwatch.h common.h mutil.h
mutil.o: mutil.c ../lib/libs.h ../lib/../config.h \
../lib/../lib/memwatch.h common.h mutil.h
DEPS_MAGIC := $(shell mkdir .deps > /dev/null 2>&1 || :)
-include $(DEP_FILES)
mostlyclean-depend:
clean-depend:
distclean-depend:
-rm -rf .deps
maintainer-clean-depend:
%.o: %.c
@echo '$(COMPILE) -c $<'; \
$(COMPILE) -Wp,-MD,.deps/$(*F).pp -c $<
@-cp .deps/$(*F).pp .deps/$(*F).P; \
tr ' ' '\012' < .deps/$(*F).pp \
| sed -e 's/^\\$$//' -e '/^$$/ d' -e '/:$$/ d' -e 's/$$/ :/' \
>> .deps/$(*F).P; \
rm .deps/$(*F).pp
%.lo: %.c
@echo '$(LTCOMPILE) -c $<'; \
$(LTCOMPILE) -Wp,-MD,.deps/$(*F).pp -c $<
@-sed -e 's/^\([^:]*\)\.o[ ]*:/\1.lo \1.o :/' \
< .deps/$(*F).pp > .deps/$(*F).P; \
tr ' ' '\012' < .deps/$(*F).pp \
| sed -e 's/^\\$$//' -e '/^$$/ d' -e '/:$$/ d' -e 's/$$/ :/' \
>> .deps/$(*F).P; \
rm -f .deps/$(*F).pp
info-am:
info: info-recursive
dvi-am:
@@ -305,23 +333,24 @@ distclean-generic:
maintainer-clean-generic:
mostlyclean-am: mostlyclean-noinstPROGRAMS mostlyclean-compile \
mostlyclean-tags mostlyclean-generic
mostlyclean-tags mostlyclean-depend mostlyclean-generic
mostlyclean: mostlyclean-recursive
clean-am: clean-noinstPROGRAMS clean-compile clean-tags clean-generic \
mostlyclean-am
clean-am: clean-noinstPROGRAMS clean-compile clean-tags clean-depend \
clean-generic mostlyclean-am
clean: clean-recursive
distclean-am: distclean-noinstPROGRAMS distclean-compile distclean-tags \
distclean-generic clean-am
distclean-depend distclean-generic clean-am
distclean: distclean-recursive
maintainer-clean-am: maintainer-clean-noinstPROGRAMS \
maintainer-clean-compile maintainer-clean-tags \
maintainer-clean-generic distclean-am
maintainer-clean-depend maintainer-clean-generic \
distclean-am
@echo "This command is intended for maintainers to use;"
@echo "it deletes files that may require special tools to rebuild."
@@ -336,13 +365,14 @@ uninstall-exec-recursive installdirs-recursive uninstalldirs-recursive \
all-recursive check-recursive installcheck-recursive info-recursive \
dvi-recursive mostlyclean-recursive distclean-recursive clean-recursive \
maintainer-clean-recursive tags tags-recursive mostlyclean-tags \
distclean-tags clean-tags maintainer-clean-tags distdir info-am info \
dvi-am dvi check check-am installcheck-am installcheck \
install-exec-local install-exec-am install-exec install-data-am \
install-data install-am install uninstall-am uninstall all-redirect \
all-am all installdirs-am installdirs mostlyclean-generic \
distclean-generic clean-generic maintainer-clean-generic clean \
mostlyclean distclean maintainer-clean
distclean-tags clean-tags maintainer-clean-tags distdir \
mostlyclean-depend distclean-depend clean-depend \
maintainer-clean-depend info-am info dvi-am dvi check check-am \
installcheck-am installcheck install-exec-local install-exec-am \
install-exec install-data-am install-data install-am install \
uninstall-am uninstall all-redirect all-am all installdirs-am \
installdirs mostlyclean-generic distclean-generic clean-generic \
maintainer-clean-generic clean mostlyclean distclean maintainer-clean
install-exec-local:

View File

@@ -2,7 +2,7 @@
*
* File ..................: mbmon/common.c
* Purpose ...............: Common utilities
* Last modification date : 25-May-2001
* Last modification date : 10-Aug-2001
*
*****************************************************************************
* Copyright (C) 1997-2001
@@ -39,6 +39,8 @@ unsigned long lcrc = 0, tcrc = 1; /* CRC value of logstring */
int lcnt = 0; /* Same message counter */
static char *pbuff = NULL;
static int sock = -1; /* TCP/IP socket */
int ttyfd; /* Filedescriptor for raw mode */
struct termios tbufs, tbufsavs; /* Structure for raw mode */
struct sockaddr_un clntaddr; /* Client socket address */
struct sockaddr_un servaddr; /* Server socket address */
@@ -453,26 +455,40 @@ int rawset = FALSE;
*/
void Setraw()
{
if (ioctl(ttyfd, TCGETA, &tbuf) == -1) {
perror("TCGETA Failed");
exit(1); /* ERROR - could not set get tty ioctl */
int rc;
if ((rc = tcgetattr(ttyfd, &tbufs))) {
perror("");
printf("$tcgetattr(0, save) return %d\n", rc);
exit(1);
}
tbufsav = tbuf;
tbuf.c_iflag &= ~(INLCR | ICRNL | IUCLC | ISTRIP | IXON );
// if (ioctl(ttyfd, TCGETA, &tbuf) == -1) {
// perror("TCGETA Failed");
// exit(1); /* ERROR - could not set get tty ioctl */
// }
tbufsavs = tbufs;
tbufs.c_iflag &= ~(INLCR | ICRNL | ISTRIP | IXON );
/*
* Map CRNL modes strip control characters and flow control
*/
tbuf.c_oflag &= ~OPOST; /* Don't do ouput character translation */
tbuf.c_lflag &= ~(ICANON | ECHO); /* No canonical input and no echo */
tbuf.c_cc[VMIN] = 1; /* Receive 1 character at a time */
tbuf.c_cc[VTIME] = 0; /* No time limit per character */
tbufs.c_oflag &= ~OPOST; /* Don't do ouput character translation */
tbufs.c_lflag &= ~(ICANON | ECHO); /* No canonical input and no echo */
tbufs.c_cc[VMIN] = 1; /* Receive 1 character at a time */
tbufs.c_cc[VTIME] = 0; /* No time limit per character */
if (ioctl(ttyfd, TCSETAF, &tbuf) == -1) {
perror("TCSETAF failed");
exit(1); /* ERROR - could not set tty ioctl */
if ((rc = tcsetattr(ttyfd, TCSADRAIN, &tbufs))) {
perror("");
printf("$tcsetattr(%d, TCSADRAIN, raw) return %d\n", ttyfd, rc);
exit(1);
}
// if (ioctl(ttyfd, TCSETAF, &tbuf) == -1) {
// perror("TCSETAF failed");
// exit(1); /* ERROR - could not set tty ioctl */
// }
rawset = TRUE;
}
@@ -483,13 +499,20 @@ void Setraw()
*/
void Unsetraw()
{
int rc;
/*
* Only unset the mode if it is set to raw mode
*/
if (rawset == TRUE) {
if (ioctl(ttyfd, TCSETAF, &tbufsav) == -1) {
perror("TCSETAF Normal Failed");
exit(1); /* ERROR - could not save original tty ioctl */
// if (ioctl(ttyfd, TCSETAF, &tbufsav) == -1) {
// perror("TCSETAF Normal Failed");
// exit(1); /* ERROR - could not save original tty ioctl */
// }
if ((rc = tcsetattr(ttyfd, TCSAFLUSH, &tbufsavs))) {
perror("");
printf("$tcsetattr(%d, TCSAFLUSH, save) return %d\n", ttyfd, rc);
exit(1);
}
}
rawset = FALSE;

View File

@@ -59,10 +59,6 @@ extern char SigName[32][16];
int ttyfd; /* Filedescriptor for raw mode */
struct termio tbuf, tbufsav; /* Structure for raw mode */
void InitClient(char *);
void ExitClient(int);
void SockS(const char *, ...);

View File

@@ -2,7 +2,7 @@
*
* File ..................: mbmon/mbmon.c
* Purpose ...............: Monitor Program
* Last modification date : 29-Jun-2001
* Last modification date : 11-Aug-2001
* Todo ..................: Trace logfiles
* Chat with user via server
*
@@ -366,7 +366,13 @@ void soft_info(void)
{
clr_index();
set_color(YELLOW, BLACK);
center_addstr( 7, (char *)"MBSE BBS");
#ifdef __linux__
center_addstr( 7, (char *)"MBSE BBS (Linux)");
#elif __FreeBSD__
center_addstr( 7, (char *)"MBSE BBS (FreeBSD)");
#else
center_addstr( 7, (char *)"MBSE BBS (Unknown)");
#endif
set_color(WHITE, BLACK);
center_addstr( 9, (char *)"(c) Michiel Broek");
set_color(YELLOW, BLACK);

View File

@@ -2,7 +2,7 @@
*
* File ..................: mutil.c
* Purpose ...............: Utilities
* Last modification date : 25-May-2001
* Last modification date : 07-Aug-2001
*
*****************************************************************************
* Copyright (C) 1997-2001
@@ -33,6 +33,8 @@
#include "common.h"
#include "mutil.h"
extern int ttyfd;
unsigned char readkey(int y, int x, int fg, int bg)
{