[26130] in Source-Commits
/svn/athena r25411 - in trunk/athena/bin/discuss: debian edsc
daemon@ATHENA.MIT.EDU (Jonathan D Reed)
Sun Sep 25 17:08:03 2011
Date: Sun, 25 Sep 2011 17:07:50 -0400
From: Jonathan D Reed <jdreed@MIT.EDU>
Message-Id: <201109252107.p8PL7osr026560@drugstore.mit.edu>
To: source-commits@mit.edu
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Author: jdreed
Date: 2011-09-25 17:07:50 -0400 (Sun, 25 Sep 2011)
New Revision: 25411
Modified:
trunk/athena/bin/discuss/debian/changelog
trunk/athena/bin/discuss/edsc/edsc.c
Log:
In discuss:
* edsc now defines and sets its own com_err hook to avoid libdsk
confusing emacs (Trac: 603)
Modified: trunk/athena/bin/discuss/debian/changelog
===================================================================
--- trunk/athena/bin/discuss/debian/changelog 2011-09-25 20:25:40 UTC (rev 25410)
+++ trunk/athena/bin/discuss/debian/changelog 2011-09-25 21:07:50 UTC (rev 25411)
@@ -1,3 +1,10 @@
+debathena-discuss (10.0.14-0debathena1) unstable; urgency=low
+
+ * edsc now defines and sets its own com_err hook to avoid libdsk
+ confusing emacs (Trac: 603)
+
+ -- Jonathan Reed <jdreed@mit.edu> Sun, 25 Sep 2011 17:07:38 -0400
+
debathena-discuss (10.0.13-0debathena2) unstable; urgency=low
* Flesh out mkds.8 and rmds.8 some more.
Modified: trunk/athena/bin/discuss/edsc/edsc.c
===================================================================
--- trunk/athena/bin/discuss/edsc/edsc.c 2011-09-25 20:25:40 UTC (rev 25410)
+++ trunk/athena/bin/discuss/edsc/edsc.c 2011-09-25 21:07:50 UTC (rev 25411)
@@ -72,6 +72,12 @@
#define NUM_EDSC_REQUESTS (sizeof (edscr) / sizeof (struct edsc_req))
+void our_com_err(const char *who, long code, const char *fmt, va_list args)
+{
+ /* A simple com_err that keeps library errors from confusing emacs */
+ fprintf(stderr, ";%s: %s\n", who, error_message(code));
+}
+
/*
* This is we can cleanup when we have problems
*/
@@ -128,6 +134,9 @@
initialize_dsc_error_table();
#endif
+ /* Use our com_err so the library doesn't spew and confuse emacs */
+ set_com_err_hook(our_com_err);
+
temp_file = malloc(64);
pgm = malloc(64);
(void) sprintf(temp_file, "/tmp/mtg%d.%d", (int)getuid(), getpid());