[27238] in Source-Commits
discuss commit: Remove pmtg
daemon@ATHENA.MIT.EDU (Victor Vasiliev)
Sun Aug 25 04:57:00 2013
Date: Sun, 25 Aug 2013 04:56:51 -0400
From: Victor Vasiliev <vasilvv@MIT.EDU>
Message-Id: <201308250856.r7P8up9c014573@drugstore.mit.edu>
To: source-commits@MIT.EDU
https://github.com/mit-athena/discuss/commit/0c5fc06e2bde6c285080c5c0f0ea1c0ebf5dce97
commit 0c5fc06e2bde6c285080c5c0f0ea1c0ebf5dce97
Author: Victor Vasiliev <vasilvv@mit.edu>
Date: Sun Aug 25 04:39:38 2013 -0400
Remove pmtg
It does not invoke open_rpc() with correct number of arguments (three
instead of four). The fact that the method signature was changed in
243d996, which happened 27 years ago, indicates that nobody actually
cares about that command and it was broken for longer than I have been
alive.
debian/changelog | 4 +-
debian/debathena-discuss.install | 1 -
mclient/Makefile.in | 9 +--
mclient/pmtg.1 | 34 -------
mclient/pmtg.c | 176 --------------------------------------
5 files changed, 5 insertions(+), 219 deletions(-)
diff --git a/debian/changelog b/debian/changelog
index 130d2b2..91005e6 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -7,7 +7,9 @@ debathena-discuss (10.0.16-0debathena1) UNRELEASED; urgency=low
[ Victor Vasiliev ]
* Fix segmentation fault caused by interrupting listing of the transactions
- in the meeting.
+ in the meeting
+ * Remove pmtg, which was broken and unmaintained for sufficiently long
+ amount of time
-- Jonathan Reed <jdreed@mit.edu> Wed, 03 Apr 2013 13:59:39 -0400
diff --git a/debian/debathena-discuss.install b/debian/debathena-discuss.install
index e051e97..ce440a3 100644
--- a/debian/debathena-discuss.install
+++ b/debian/debathena-discuss.install
@@ -5,7 +5,6 @@ usr/bin/dsgrep
usr/bin/dsmail
usr/bin/dspipe
usr/bin/mkds
-usr/bin/pmtg
usr/bin/rmds
usr/lib/debathena-discuss/edsc
usr/share/discuss
diff --git a/mclient/Makefile.in b/mclient/Makefile.in
index 078605a..1245151 100644
--- a/mclient/Makefile.in
+++ b/mclient/Makefile.in
@@ -29,10 +29,10 @@ KLIBS= ../libds/libdsk.a ../usp/libusp.a @KRB4_LIBS@ @KRB5_LIBS@ ${LIBS}
.c.o:
${CC} -c ${ALL_CFLAGS} $<
-all: create_mtg_dir crmtgs mkds pmtg dsmail dspipe
+all: create_mtg_dir crmtgs mkds dsmail dspipe
clean:
- rm -f create_mtg_dir crmtgs mkds pmtg dsmail dspipe *.o
+ rm -f create_mtg_dir crmtgs mkds dsmail dspipe *.o
distclean: clean
rm -f Makefile
@@ -46,7 +46,6 @@ install:
${INSTALL_PROGRAM} create_mtg_dir ${DESTDIR}${bindir}
${INSTALL_PROGRAM} crmtgs ${DESTDIR}${bindir}
${INSTALL_PROGRAM} mkds ${DESTDIR}${bindir}
- ${INSTALL_PROGRAM} pmtg ${DESTDIR}${bindir}
${INSTALL_PROGRAM} dsmail ${DESTDIR}${bindir}
${INSTALL_PROGRAM} dspipe ${DESTDIR}${bindir}
-rm -f $(DESTDIR)${bindir}/rmds
@@ -54,7 +53,6 @@ install:
${INSTALL} -m 755 dsc_setup.sh ${DESTDIR}${bindir}/dsc_setup
${INSTALL_DATA} crmtgs.1 ${DESTDIR}${mandir}/man1
${INSTALL_DATA} mkds.8 ${DESTDIR}${mandir}/man8
- ${INSTALL_DATA} pmtg.1 ${DESTDIR}${mandir}/man1
${INSTALL_DATA} dsmail.1 ${DESTDIR}${mandir}/man1
${INSTALL_DATA} dspipe.8 ${DESTDIR}${mandir}/man8
${INSTALL_DATA} dsc_setup.1 ${DESTDIR}${mandir}/man1
@@ -69,9 +67,6 @@ crmtgs: crmtgs.o ../ets/dsc_et.o
mkds: mkds.o ../ets/dsc_et.o ../client/edit.o
${CC} ${LDFLAGS} -o mkds mkds.o ../ets/dsc_et.o ../client/edit.o ${KLIBS}
-pmtg: pmtg.o ../ets/dsc_et.o
- ${CC} ${LDFLAGS} -o pmtg pmtg.o ../ets/dsc_et.o ${KLIBS}
-
dsmail: dsmail.o ../ets/dsc_et.o
${CC} ${LDFLAGS} -o dsmail dsmail.o ../ets/dsc_et.o ${KLIBS}
diff --git a/mclient/pmtg.1 b/mclient/pmtg.1
deleted file mode 100644
index 54f4c54..0000000
--- a/mclient/pmtg.1
+++ /dev/null
@@ -1,34 +0,0 @@
-.\"
-.\"
-.\"
-.\"
-.\"
-.\"
-.TH PMTG 1 "16 October 2009" "MIT SIPB"
-.SH NAME
-pmtg \- Print the contents of a discuss meeting
-.SH SYNOPSIS
-.B pmtg
-.I meeting_name
-.SH DESCRIPTION
-.I pmtg
-prints the contents of the specified discuss meeting.
-
-.I pmtg
-accepts no arguments.
-
-.SH FILES
-~/.meetings Data file listing meetings that you attend.
-
-.SH AUTHORS
-Ken Raeburn, MIT Student Information Processing Board
-
-.SH "SEE ALSO"
-.PP
-discuss(1)
-
-
-
-
-
-
diff --git a/mclient/pmtg.c b/mclient/pmtg.c
deleted file mode 100644
index ebd2c27..0000000
--- a/mclient/pmtg.c
+++ /dev/null
@@ -1,176 +0,0 @@
-/*
- *
- * Copyright (C) 1988, 1989 by the Massachusetts Institute of Technology
- * Developed by the MIT Student Information Processing Board (SIPB).
- * For copying information, see the file mit-copyright.h in this release.
- *
- */
-/*
- *
- * pmtg.c -- Program to print out a entire meeting.
- *
- */
-
-#include <discuss/discuss.h>
-#include <sys/types.h>
-#include <sys/file.h>
-#include <stdio.h>
-#include <string.h>
-
-tfile unix_tfile();
-mtg_info minfo;
-
-#ifndef lint
-static char rcsid_pmtg_c[] =
- "$Id: pmtg.c,v 1.7 1999-02-02 20:40:33 kcr Exp $";
-#endif
-
-int main (argc,argv)
- int argc;
- char **argv;
-{
- int result;
- trn_nums trn;
- trn_info tinfo;
- tfile tfstdout;
- char machine [50],mtg_name[100];
-
-#if defined(__APPLE__) && defined(__MACH__)
- add_error_table(&et_dsc_error_table);
-#else
- initialize_dsc_error_table();
-#endif
- argc--; argv++;
- if (argc != 1)
- goto lusage;
-
- resolve_mtg(*argv, machine, mtg_name);
-
- init_rpc();
- if (open_rpc (machine, "discuss", &result) == 0) {
- (void) fprintf (stderr, "%s\n", error_message(result));
- exit(1);
- }
- if (result) {
- (void) fprintf (stderr, "Warning: %s\n", error_message(result));
- }
-
- get_mtg_info (mtg_name, &minfo, &result);
- if (result != 0) {
- (void) fprintf (stderr, "%s\n", error_message (result));
- exit(1);
- }
-
- /* set up stdout tfile */
- tfstdout = unix_tfile (1);
-
- trn = minfo.first;
- while (trn != 0) {
- get_trn_info (mtg_name, trn, &tinfo, &result);
- if (result != 0) {
- if (result != DELETED_TRN) {
- (void) fprintf (stderr, "%s\n",
- error_message (result));
- exit (1);
- }
- } else {
- write_header (&tinfo, tfstdout);
- get_trn (mtg_name, trn, tfstdout, &result);
- if (result != 0) {
- (void) fprintf (stderr, "%s\n",
- error_message(result));
- exit (1);
- }
- write_trailer (&tinfo, tfstdout);
- }
- trn = tinfo.next;
- free (tinfo.author);
- free (tinfo.subject);
- }
-
- tdestroy (tfstdout);
- term_rpc ();
- return 0;
-
- lusage:
- (void) fprintf (stderr, "Usage: pmtg {mtg_name}\n");
- exit (1);
-}
-
-char *ctime();
-
-write_header(info, tf)
- trn_info *info;
- tfile tf;
-{
- char line [255];
- char newtime [26];
- char *plural;
- int dummy;
-
- (void) strcpy (newtime, ctime ((time_t *)&(info -> date_entered)));
- newtime [24] = '\0'; /* get rid of \n */
-
- if (info -> num_lines != 1)
- plural = "s";
- else
- plural = "";
-
- (void) sprintf (line, "[%04d] %s %s %s (%d line%s)\n",
- info -> current, info -> author, minfo.long_name,
- &newtime[4], info -> num_lines, plural);
- twrite (tf, line, strlen (line),&dummy);
- if (info -> subject [0] != '\0') {
- twrite (tf, "Subject: ", 9, &dummy);
- twrite (tf, info -> subject, strlen (info -> subject), &dummy);
- twrite (tf, "\n", 1, &dummy);
- }
- return;
-}
-
-write_trailer (info, tf)
-trn_info *info;
-tfile tf;
-{
- char line [255];
- int dummy;
-
- if (info -> pref == 0 && info -> nref == 0)
- sprintf (line, "--[%04d]--\n\n", info -> current);
- else if (info -> pref == 0)
- sprintf (line, "--[%04d]-- (nref = [%04d])\n\n", info -> current,
- info -> nref);
- else if (info -> nref == 0)
- sprintf (line, "--[%04d]-- (pref = [%04d])\n\n", info -> current,
- info -> pref);
- else
- sprintf (line, "--[%04d]-- (pref = [%04d], nref = [%04d])\n\n",
- info -> current, info -> pref, info -> nref);
- twrite (tf, line, strlen (line),&dummy);
-}
-/*
- *
- * resolve_mtg: Procedure to resolve a user meeting name into its host
- * an pathname.
- *
- */
-resolve_mtg (usr_string, machine, mtg_name)
-char *usr_string,*machine,*mtg_name;
-{
- char *colon;
- int machine_len;
-
- colon = strchr (usr_string, ':');
-
- if (colon == 0) {
- strcpy (mtg_name, usr_string);
- gethostname (machine, 50);
- return;
- }
-
- machine_len = colon - usr_string;
- memcpy (machine, usr_string, machine_len);
- machine [machine_len] = '\0';
- strcpy (mtg_name, colon+1);
- return;
-}