$! ................... Cut between dotted lines and save. ................... $!........................................................................... $! VAX/VMS archive file created by VMS_SHARE V06.10 7-FEB-1989. $! $! VMS_SHARE was written by James Gray (Gray:OSBUSouth@Xerox.COM) from $! VMS_SHAR by Michael Bednarek (U3369429@ucsvc.dn.mu.oz.au). $! $! To unpack, simply save, concatinate all parts into one file and $! execute (@) that file. $! $! This archive was created by user TERRY $! on 4-MAY-1994 02:43:37.12. $! $! ATTENTION: To keep each article below 31 blocks (15872 bytes), this $! program has been transmitted in 16 parts. You should $! concatenate ALL parts to ONE file and execute (@) that file. $! $! It contains the following 31 files: $! BBOARD.$PACKAGE $! BBOARD.C $! BBOARD.CTL $! BBOARD.DOC $! BBOARD.H $! BBOARD_MAKE_CONF.COM $! BBSUPP.C $! BUILD.COM $! COMSUPP.C $! DIGEST.C $! HOOKS.C $! JANINFO.C $! JANINFO.COM $! JANTIDY_ADDITION.COM $! MAKEFILE. $! NOTELOG.C $! NOTES$COMMAND.SAMPLE $! NOTES-PRINT.SAMPLE $! NOTES_PURGE.COM $! NOTES_PURGE.FDL $! RULES.C $! RUN_BBOARD_DAEMON.COM $! SETUNAME.COM $! SETUNAME.PAS $! SETUNAMECLD.CLD $! SETUNAMEMSG.MSG $! SETUNAMESUB.MAR $! START-BBOARD.COM $! SUPP.C $! USEFILE.C $! USEMSG.C $! $!============================================================================ $ SET SYMBOL/SCOPE=( NOLOCAL, NOGLOBAL ) $ VERSION = F$GETSYI( "VERSION" ) $ IF VERSION .GES "V4.4" THEN GOTO VERSION_OK $ WRITE SYS$OUTPUT "You are running VMS ''VERSION'; ", - "VMS_SHARE V06.10 7-FEB-1989 requires VMS V4.4 or higher." $ EXIT 44 ! SS$_ABORT $VERSION_OK: $ GOTO START $! $UNPACK_FILE: $ WRITE SYS$OUTPUT "Creating ''FILE_IS'" $ DEFINE/USER_MODE SYS$OUTPUT NL: $ EDIT/TPU/COMMAND=SYS$INPUT/NODISPLAY/OUTPUT='FILE_IS'/NOSECTION - VMS_SHARE_DUMMY.DUMMY b_part := CREATE_BUFFER( "{Part}", GET_INFO( COMMAND_LINE, "file_name" ) ) ; s_file_spec := GET_INFO( COMMAND_LINE, "output_file" ); SET( OUTPUT_FILE , b_part, s_file_spec ); b_errors := CREATE_BUFFER( "{Errors}" ); i_errors := 0; pat_beg_1 := ANCHOR & "-+-+-+ Beginning"; pat_beg_2 := LINE_BEGIN & "+-+-+-+ Beginning"; pat_end := ANCHOR & "+-+-+-+-+ End"; POSITION ( BEGINNING_OF( b_part ) ); LOOP EXITIF SEARCH( SPAN( ' ' )@r_trail & LINE_END, FORWARD) = 0; POSITION( r_trail ); ERASE( r_trail ); ENDLOOP ; POSITION( BEGINNING_OF( b_part ) ); i_append_line := 0; LOOP EXITIF MARK ( NONE ) = END_OF( b_part ); s_x := ERASE_CHARACTER( 1 ) ; IF s_x = '+' THEN r_skip := SEARCH( pat_beg_1, FORWARD, EXACT ); IF r_skip <> 0 THEN s_x := ''; MOVE_HORIZONTAL( -CURRENT_OFFSET ); ERASE_LINE; ENDIF ; ENDIF; IF s_x = '-' THEN r_skip := SEARCH( pat_end, FORWARD, EXACT ) ; IF r_skip <> 0 THEN s_x := ''; MOVE_HORIZONTAL( -CURRENT_OFFSET ); m_skip := MARK( NONE ); r_skip := SEARCH( pat_beg_2, FORWARD, EXACT ); IF r_skip <> 0 THEN POSITION( END_OF( r_skip ) ); MOVE_HORIZONTAL( -CURRENT_OFFSET ) ; MOVE_VERTICAL( 1 ); MOVE_HORIZONTAL( -1 ); ELSE POSITION( END_OF( b_part ) ); ENDIF; ERASE( CREATE_RANGE( m_skip, MARK( NONE ), NONE ) ); ENDIF; ENDIF ; IF s_x = 'V' THEN s_x := ''; IF i_append_line <> 0 THEN APPEND_LINE ; MOVE_HORIZONTAL( -CURRENT_OFFSET ); ENDIF; i_append_line := 1 ; MOVE_VERTICAL( 1 ); ENDIF; IF s_x = 'X' THEN s_x := ''; IF i_append_line <> 0 THEN APPEND_LINE; MOVE_HORIZONTAL( -CURRENT_OFFSET ); ENDIF ; i_append_line := 0; MOVE_VERTICAL( 1 ); ENDIF; IF s_x <> '' THEN i_errors := i_errors + 1; s_text := CURRENT_LINE; POSITION( b_errors ); COPY_TEXT ( "The following line could not be unpacked properly:" ); SPLIT_LINE ; COPY_TEXT( s_x ); COPY_TEXT( s_text ); POSITION( b_part ); MOVE_VERTICAL ( 1 ); ENDIF; ENDLOOP; POSITION( BEGINNING_OF( b_part ) ); LOOP r_x := SEARCH ( "`", FORWARD, EXACT ); EXITIF r_x = 0; POSITION( r_x ); ERASE_CHARACTER( 1 ); COPY_TEXT( ASCII( INT( ERASE_CHARACTER( 3 ) ) ) ); ENDLOOP ; IF i_errors = 0 THEN SET( NO_WRITE, b_errors, ON ); ELSE POSITION ( BEGINNING_OF( b_errors ) ); COPY_TEXT( FAO ( "The following !UL errors were detected while unpacking !AS", i_errors , s_file_spec ) ); SPLIT_LINE; SET( OUTPUT_FILE, b_errors, "SYS$COMMAND" ) ; ENDIF; EXIT; $ DELETE VMS_SHARE_DUMMY.DUMMY;* $ CHECKSUM 'FILE_IS $ WRITE SYS$OUTPUT " CHECKSUM ", - F$ELEMENT( CHECKSUM_IS .EQ. CHECKSUM$CHECKSUM, ",", "failed!!,passed." ) $ RETURN $! $START: $ FILE_IS = "BBOARD.$PACKAGE" $ CHECKSUM_IS = 443575679 $ COPY SYS$INPUT VMS_SHARE_DUMMY.DUMMY X* BBoard V1.42 as maintained by Terry Kennedy at St. Peter's College X* You can either request BBOARD.PACKAGE to get the whole collection in X* a package, or you can request individual components. X* X* Info-BBoard is a mailing list for discussing BBoard. Here is the de- X* scription: X* X* I-BBoard@SPCVXA.SPC.EDU (Internet) X* I-BBOARD@SPCVXA.BITNET (Bitnet) X* V* Discussion of the BBoard package.`009BBoard is a VMS utility to link mai Xl, X* delivered by Jnet, and VAX Notes, an electronic conferencing system from X* Digital Equipment Corp. BBoard's primary purpose is to reduce the number V* of LISTSERV or mailing list subscribers at a node so that`009only one us Xer X* (BBOARD) is subscribed. The messages from each mailing list will then be X* posted in a separate Notes conference. X* V* There is no automated archive retrieval facility.`009However, requests f Xor X* archived material may be sent to the request address below. X* X* Requests to be added to or deleted from this list, problems, questions, V* etc., should be sent`009to I-BBReq@SPCVXA.SPC.EDU (Internet) X or X* I-BBREQ@SPCVXA.BITNET (Bitnet). X* X* Coordinator: Terry Kennedy X* XBBOARD.$PACKAGE XBBOARD.01_OF_15 XBBOARD.02_OF_15 XBBOARD.03_OF_15 XBBOARD.04_OF_15 XBBOARD.05_OF_15 XBBOARD.06_OF_15 XBBOARD.07_OF_15 XBBOARD.08_OF_15 XBBOARD.09_OF_15 XBBOARD.10_OF_15 XBBOARD.11_OF_15 XBBOARD.12_OF_15 XBBOARD.13_OF_15 XBBOARD.14_OF_15 XBBOARD.15_OF_15 $ GOSUB UNPACK_FILE $ FILE_IS = "BBOARD.C" $ CHECKSUM_IS = 758853824 $ COPY SYS$INPUT VMS_SHARE_DUMMY.DUMMY X/* Change History: X XT1.00 31-Jul-1989`009BMC X Initial version X Includes writing notes, unknown message handling, note_log_file parsing, X`009and some other strange and wonderous stuff. X XT1.10 06-Aug-1989`009BMC X Split USEFILE.C into USEFILE.C and RULES.C to further isolate Rules X`009processing. X Split BBSUPP.C into BBSUPP.C and HOOKS.C to isolate link trapping. X Add :manager, :ignore and :links. X Support messages (RELOAD, SHUTDOWN, and STATUS). X Add SHUTDOWN processing, checking for down links first. X Rewrite loading control files for future (and current) enhancement. X XT1.20 12-Aug-1989`009BMC X Remove 'xx' rule and replace with logical BBOARD_ERROR_CONF. V Remove '*' as comment character from control file for wildcarding purpose Xs. V Multiple line message header fields should have a " " added between lines X. X Expand tab characters when reading from files. X Rewrite entire control rules handling for dynamic allocation. V Investigate the new control file before reloading. Don't if it's not goin Xg X`009to fly. X Log all startup, shutdown, and initial error messages to OPCOM. X Use BECOME when writing the notes to support "reply/author". X XT1.22 21-Aug-1989`009BMC X Split Note-log-file handling from USEFILE.C into NOTELOG.C. X Change format of Note-log-file for better calculation and to allow X`009inclusion of last posting date. X Add RESET command to zap a conference close date back to the stone age X Add DISPLAY command to see close and last posting date of wildcarded X`009conferences. X Add #ifdef DEBUG code for future use X XT1.30 16-Sep-1989`009BMC X Add digest support X Move actual note addition into a detached run. Add note count and timer X`009information to control how often notes are added. X Add WRITE command to force immediate note addition. X Process messages while we're running through a digest. X Sort NOTELOG file whenever there are any additions. X XT1.31 20-Sep-1989`009BMC X Use SETUNAME, not BECOME X Support multiple length separators in digests. X Change informative log messages to start with 'I'. X Change interactive command log messages to start with 'C'. X XV1.32 05-Oct-1989`009BMC X Minor cleanup for real release. X XV1.33 20-Oct-1989`009BMC X Maintain conference posted to for the log file (SMTPUSER mixup). X Show destination conference in log file. X Don't delete Jnet file until _after_ we've built info to post the entry. X Add flag_user_exit in jnet_file_header for later development. X XT1.34 08-Dec-1989`009BMC X Minor change to digests. The topic and the replies should be written at X`009the same time. X Check on com_write_notes() that there aren't any other posting jobs X`009running. If there are, defer execution. This will prevent umpteen- X`009billion posting jobs running simultaneously if a link restarts after X`009being down for a while. X Add type "C" for digests. X XV1.40 02-Feb-1990`009BMC X Consolidate doing things to From: and Subj: text (individually). X If Subject text starts with a '$', prepend a space to keep DCL happy. X If From text doesn't have any of "<> ", throw "<>" around the text so X`009that the Notes support stuff can do (potentially) useful stuff with it. X Remove table_name as an internal logical. It belongs in bbsupp.c and now X`009resides there. V Restructure rules (one more time). Move some of the logicals into the rul Xes X`009file as "singular" lines. Additionally, move all defaults into X`009bboard.h. X Add a "HELP" command so we don't keep having BBOARD bothered by people. X Move logical names into bboard.h so so that, if TEST is defined, we can X`009change the names for testing, separate from DEBUG output. X Move digest definitions into new Control File section :digests. This lets X`009digest definitions be added on the fly. X XV1.41 24-Feb-1990`009BMC X Add SUSPend and RESUme commands to integrate well with purging Notes X`009conferences. X XV1.42 23-Jul-1992`009TMK X Make changes to work with Jnet X3.6 (can't log until hook is installed), X`009assorted cleanups. X XV1.43 19-Jun-1993`009TMK X Add additional debugging output in hooks.c, fix crash in rules.c if full X`009debugging is requested and no digests are configured, add DEBUG info X`009to STATUS command. X XV1.44 28-Jan-1994`009TMK X DEC broke served access from the local node in DEC Notes V2.5. Add an ex- X`009plicit 0:: in front of the conference name to work around this. X X*/ X X#include X#include X#include X#include X#include X#include X#include "bboard.h" X X/* Functions declared later, for prototyping purposes */ X Xstatic void do_logicals(void); Xstatic void timer_check(void); Xstatic void process_file(void); X X/* Global variables, please... */ X Xchar * version = "V1.44 28-Jan-94"; Xunsigned int mail_received = 0; Xchar host[9]; XSYSTIM bboard_start; Xunsigned int new_count = 0; Xint postings_suspended = FALSE; Xint shutdown_state = FALSE; Xint log_available = FALSE; X Xstruct dsc$descriptor hook_name; Xstatic char * bboard_hook_name_log = LOG_HOOK_NAME; Xstatic char * bboard_hook_name; X Xstruct dsc$descriptor root_dir; Xstatic char * bboard_root_dir_log = LOG_ROOT_DIR; Xstatic char * bboard_root_dir; X Xstruct dsc$descriptor scratch_dir; Xstatic char * bboard_scratch_dir_log = LOG_SCRATCH_DIR; Xstatic char * bboard_scratch_dir; X Xstruct dsc$descriptor control_file; Xstatic char * bboard_control_file_log = LOG_CONTROL_FILE; Xstatic char * bboard_control_file; X Xstruct dsc$descriptor log_file; Xstruct dsc$descriptor error_conf; XSYSTIM bboard_time_interval; Xunsigned int bboard_count_interval; Xstruct dsc$descriptor local_contact; X V/* These aren't really global, I just don't want to define them all over... * X/ X Xint mode;`009`009`009`009/* Used by Jnet routines */ Xint status;`009`009`009`009/* SYS$, etc. status returns */ Xchar temp[512]; `009`009`009/* Temporary string space */ X X/* Where the whole kit and caboodle starts... */ X Xint main(void) X`123 X X /* Set up the hardcoded defaults for all the possible logicals */ X X str_desc(&hook_name, DEF_HOOK_NAME); X str_desc(&root_dir, DEF_ROOT_DIR); X str_desc(&scratch_dir, DEF_SCRATCH_DIR); X str_desc(&control_file, DEF_CONTROL_FILE); X X /* Load the logicals */ X X do_logicals(); X X#ifdef DEBUG X printf("main: logicals loaded\n"); X#endif X X /* Are we the first ones to try for this hook name? */ X X if (check_for_hook(hook_name.dsc$a_pointer)) `123 X`009sprintf(temp, "F A duplicate hook name of '%s' currently exists.", X`009`009hook_name.dsc$a_pointer); X`009critical_error(temp); X `125; X X /* What's the local host name? */ X X load_host_name(host); X X /* When are we actually starting the hook (for STATUS commands) */ X X get_time(bboard_start);`009`009/* Save that for use later */ X X /* Set up the timer */ X X timer_reset(); X X /* Ok. Let's tell Jnet we're lurking about */ X X mode = 2; X if (!jan_hook_init(&mode, &hook_name)) `123 X`009return(0); X `125 X X /* Tell Jnet to update number of files queued for our hook */ X X jan_adjust(&hook_name); X X /* Indicate that we can begin logging */ X X log_available = TRUE; X X#ifdef DEBUG X printf("main: hook installed and adjusted\n"); X#endif X X /* Put a new startup entry to the log file and OPCOM */ X X init_log_file();`009`009`009/* start up a new one */ X X /* Read from the control file, as an initial read */ X X read_control_file(FALSE, NULL, NULL); X X#ifdef DEBUG X printf("main: control file loaded\n"); X#if (DEBUG & 1) X dump_control_file(); X#endif X#endif X X /* Now to the meat of everything... */ X X while (TRUE) `123 X`009sys$setast(TRUE);`009`009/* Allow ASTs while waiting */ X#ifdef DEBUG X`009printf("main: going to sleep\n"); X#endif X`009sys$hiber();`009`009`009/* Sleep until something interesting */ X`009sys$setast(FALSE);`009`009/* Don't wake up while we're running */ X#ifdef DEBUG X`009printf("main: woke up\n"); X#endif X`009process_message();`009`009/* Messages, maybe? */ X`009process_file(); `009`009/* Files, maybe? */ X`009if (new_count < 0 `124`124 new_count >= bboard_count_interval) `123 X`009 com_write_notes(); X`009`125 X`009if (shutdown_state) `123`009`009/* Asked to leave, maybe? */ X`009 if (new_count) `123`009`009/* Anything? Do it. */ X`009`009com_write_notes(); X`009 `125 X`009 sprintf(temp, "I BBOARD (%s) shutting down.", version); X`009 send_log_file(temp); X`009 send_opcom(temp+2); X`009 return(SS$_NORMAL); X`009`125 X `125; X`125 X X/* Build all of our interesting logicals */ X Xstatic void do_logicals(void) X`123 X unsigned int t_cnt; -+-+-+-+-+ End of part 1 +-+-+-+-+-